@skf-design-system/ui-components 1.0.2-beta.6 → 1.0.2-beta.7

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 (88) hide show
  1. package/README.md +18 -0
  2. package/dist/components/alert/alert.component.d.ts +3 -2
  3. package/dist/components/alert/alert.component.js +39 -33
  4. package/dist/components/button/button.styles.js +3 -3
  5. package/dist/components/checkbox/checkbox.component.d.ts +4 -2
  6. package/dist/components/checkbox/checkbox.component.js +73 -65
  7. package/dist/components/checkbox/checkbox.styles.js +1 -1
  8. package/dist/components/datepicker/datepicker-calendar.component.d.ts +4 -0
  9. package/dist/components/datepicker/datepicker-calendar.component.js +134 -127
  10. package/dist/components/datepicker/datepicker-popup.component.d.ts +4 -0
  11. package/dist/components/datepicker/datepicker-popup.component.js +100 -88
  12. package/dist/components/datepicker/datepicker.component.d.ts +4 -2
  13. package/dist/components/datepicker/datepicker.component.js +150 -140
  14. package/dist/components/dialog/dialog.component.d.ts +3 -2
  15. package/dist/components/dialog/dialog.component.js +39 -37
  16. package/dist/components/divider/divider.component.js +13 -13
  17. package/dist/components/divider/divider.styles.js +2 -2
  18. package/dist/components/drawer/drawer.component.d.ts +3 -2
  19. package/dist/components/drawer/drawer.component.js +37 -35
  20. package/dist/components/drawer/drawer.styles.js +1 -1
  21. package/dist/components/header/header.component.d.ts +4 -2
  22. package/dist/components/header/header.component.js +66 -57
  23. package/dist/components/header/header.styles.js +2 -2
  24. package/dist/components/icon/icon.component.js +7 -7
  25. package/dist/components/icon/icon.styles.js +2 -2
  26. package/dist/components/input/input.component.d.ts +4 -8
  27. package/dist/components/input/input.component.js +146 -147
  28. package/dist/components/input/input.controllers.d.ts +0 -1
  29. package/dist/components/input/input.controllers.js +12 -12
  30. package/dist/components/link/link.component.js +19 -12
  31. package/dist/components/link/link.styles.js +11 -3
  32. package/dist/components/loader/loader.component.d.ts +0 -2
  33. package/dist/components/loader/loader.component.js +27 -30
  34. package/dist/components/loader/loader.styles.js +1 -1
  35. package/dist/components/menu/menu-item.styles.js +8 -7
  36. package/dist/components/menu/menu.component.d.ts +4 -1
  37. package/dist/components/nav/nav.component.d.ts +3 -0
  38. package/dist/components/nav/nav.component.js +38 -33
  39. package/dist/components/popover/popover.component.d.ts +6 -3
  40. package/dist/components/progress/progress.styles.js +3 -3
  41. package/dist/components/radio/radio.component.d.ts +4 -2
  42. package/dist/components/radio/radio.component.js +91 -83
  43. package/dist/components/radio/radio.styles.js +1 -1
  44. package/dist/components/segmented-button/segmented-button-item.component.js +1 -1
  45. package/dist/components/segmented-button/segmented-button-item.styles.js +1 -1
  46. package/dist/components/select/select-option.component.d.ts +2 -2
  47. package/dist/components/select/select-option.component.js +16 -19
  48. package/dist/components/select/select.component.d.ts +13 -9
  49. package/dist/components/select/select.component.js +169 -144
  50. package/dist/components/stepper/stepper-item.styles.js +4 -4
  51. package/dist/components/switch/switch.component.d.ts +4 -2
  52. package/dist/components/switch/switch.component.js +64 -56
  53. package/dist/components/switch/switch.styles.js +1 -1
  54. package/dist/components/tabs/tab.styles.js +2 -2
  55. package/dist/components/tag/tag.component.d.ts +3 -0
  56. package/dist/components/tag/tag.component.js +50 -41
  57. package/dist/components/textarea/textarea.component.d.ts +4 -2
  58. package/dist/components/textarea/textarea.component.js +126 -118
  59. package/dist/components/tooltip/tooltip.component.d.ts +8 -2
  60. package/dist/components/tooltip/tooltip.component.js +3 -0
  61. package/dist/custom-elements.json +569 -309
  62. package/dist/internal/base-classes/popover/popover.base.d.ts +21 -2
  63. package/dist/internal/base-classes/popover/popover.base.js +10 -12
  64. package/dist/internal/controllers/popover.controller.d.ts +2 -0
  65. package/dist/internal/helpers/uuid.d.ts +8 -10
  66. package/dist/internal/helpers/uuid.js +4 -11
  67. package/dist/internal/helpers/watch.d.ts +1 -1
  68. package/dist/internal/templates/asterisk.d.ts +1 -1
  69. package/dist/internal/templates/asterisk.js +4 -4
  70. package/dist/styles/global-alt.css +1 -1
  71. package/dist/styles/global.css +1 -1
  72. package/dist/translations/en.d.ts +3 -0
  73. package/dist/translations/en.js +27 -0
  74. package/dist/translations/es.d.ts +3 -0
  75. package/dist/translations/es.js +27 -0
  76. package/dist/translations/index.d.ts +4 -0
  77. package/dist/translations/pt.d.ts +3 -0
  78. package/dist/translations/pt.js +27 -0
  79. package/dist/translations/sv.d.ts +3 -0
  80. package/dist/translations/sv.js +27 -0
  81. package/dist/types/jsx/custom-element-jsx.d.ts +59 -47
  82. package/dist/types/vue/index.d.ts +59 -47
  83. package/dist/utilities/localize.d.ts +28 -0
  84. package/dist/utilities/localize.js +13 -0
  85. package/dist/vscode.html-custom-data.json +75 -80
  86. package/dist/web-types.json +201 -166
  87. package/package.json +26 -33
  88. package/custom-elements.json +0 -25490
@@ -1,21 +1,29 @@
1
- import { SkfElement as O } from "../../internal/components/skf-element.js";
2
- import { watch as R } from "../../internal/helpers/watch.js";
3
- import { Temporal as m } from "@js-temporal/polyfill";
4
- import { componentStyles as C } from "../../styles/component.styles.js";
5
- import { html as p } from "lit";
6
- import { property as g, state as M } from "lit/decorators.js";
7
- import { repeat as w } from "lit/directives/repeat.js";
8
- import { styles as F } from "./datepicker-calendar.styles.js";
9
- import { compareDates as $ } from "./datepicker-popup.helpers.js";
10
- import { dateFormatter as y } from "./datepicker.helpers.js";
11
- var P = Object.defineProperty, A = Object.getOwnPropertyDescriptor, d = (D, t, e, a) => {
12
- for (var s = a > 1 ? void 0 : a ? A(t, e) : t, i = D.length - 1, h; i >= 0; i--)
13
- (h = D[i]) && (s = (a ? h(t, e, s) : h(s)) || s);
14
- return a && s && P(t, e, s), s;
1
+ var R = (s) => {
2
+ throw TypeError(s);
15
3
  };
16
- const E = class E extends O {
4
+ var C = (s, r, t) => r.has(s) || R("Cannot " + t);
5
+ var v = (s, r, t) => (C(s, r, "read from private field"), t ? t.call(s) : r.get(s)), F = (s, r, t) => r.has(s) ? R("Cannot add the same private member more than once") : r instanceof WeakSet ? r.add(s) : r.set(s, t), A = (s, r, t, e) => (C(s, r, "write to private field"), e ? e.call(s, t) : r.set(s, t), t);
6
+ import { SkfElement as L } from "../../internal/components/skf-element.js";
7
+ import { watch as P } from "../../internal/helpers/watch.js";
8
+ import { Temporal as f } from "@js-temporal/polyfill";
9
+ import { componentStyles as T } from "../../styles/component.styles.js";
10
+ import { LocalizeController as I } from "../../utilities/localize.js";
11
+ import { html as b } from "lit";
12
+ import { property as m, state as k } from "lit/decorators.js";
13
+ import { repeat as E } from "lit/directives/repeat.js";
14
+ import { styles as W } from "./datepicker-calendar.styles.js";
15
+ import { compareDates as Y } from "./datepicker-popup.helpers.js";
16
+ import { dateFormatter as _ } from "./datepicker.helpers.js";
17
+ var j = Object.defineProperty, x = Object.getOwnPropertyDescriptor, c = (s, r, t, e) => {
18
+ for (var a = e > 1 ? void 0 : e ? x(r, t) : r, o = s.length - 1, l; o >= 0; o--)
19
+ (l = s[o]) && (a = (e ? l(r, t, a) : l(a)) || a);
20
+ return e && a && j(r, t, a), a;
21
+ }, D;
22
+ const O = class O extends L {
17
23
  constructor() {
18
- super(...arguments), this._secondCalendarOffset = 0, this.date = /* @__PURE__ */ new Date(), this.firstDayOfWeek = 0, this.locale = "en-CA", this.range = !1, this.selectedDate = void 0, this.selectedDateRange = {
24
+ super(...arguments);
25
+ F(this, D);
26
+ A(this, D, new I(this)), this._secondCalendarOffset = 0, this.date = /* @__PURE__ */ new Date(), this.firstDayOfWeek = 0, this.lang = "en", this.locale = "en-CA", this.range = !1, this.selectedDate = void 0, this.selectedDateRange = {
19
27
  start: null,
20
28
  end: null
21
29
  }, this._numberOfDays = 0, this._numberOfDaysLastMonth = 0, this._listenToKeyboard = () => ({
@@ -26,34 +34,34 @@ const E = class E extends O {
26
34
  this.removeEventListener("keydown", this._handleKeyDown);
27
35
  }
28
36
  }), this._handleKeyDown = (t) => {
29
- var s, i, h, v, _, S, b;
37
+ var o, l, p, S, $, M, w;
30
38
  const { key: e } = t;
31
39
  if ((e === "ArrowRight" || e === "ArrowLeft" || e === "ArrowDown" || e === "ArrowUp") && t.preventDefault(), e === "ArrowRight") {
32
- const n = (s = this.shadowRoot) == null ? void 0 : s.activeElement, r = n == null ? void 0 : n.parentElement, c = r == null ? void 0 : r.nextElementSibling, l = c == null ? void 0 : c.firstElementChild;
33
- l == null || l.focus();
40
+ const n = (o = this.shadowRoot) == null ? void 0 : o.activeElement, i = n == null ? void 0 : n.parentElement, u = i == null ? void 0 : i.nextElementSibling, d = u == null ? void 0 : u.firstElementChild;
41
+ d == null || d.focus();
34
42
  }
35
43
  if (e === "ArrowLeft") {
36
- const n = (i = this.shadowRoot) == null ? void 0 : i.activeElement, r = n == null ? void 0 : n.parentElement, c = r == null ? void 0 : r.previousElementSibling, l = c == null ? void 0 : c.firstElementChild;
37
- l == null || l.focus();
44
+ const n = (l = this.shadowRoot) == null ? void 0 : l.activeElement, i = n == null ? void 0 : n.parentElement, u = i == null ? void 0 : i.previousElementSibling, d = u == null ? void 0 : u.firstElementChild;
45
+ d == null || d.focus();
38
46
  }
39
47
  if (e === "ArrowDown") {
40
- const n = (h = this.shadowRoot) == null ? void 0 : h.activeElement, r = n == null ? void 0 : n.parentElement, c = a(r), l = (v = r == null ? void 0 : r.parentElement) == null ? void 0 : v.children[c + 7], f = l == null ? void 0 : l.firstElementChild;
41
- f == null || f.focus();
48
+ const n = (p = this.shadowRoot) == null ? void 0 : p.activeElement, i = n == null ? void 0 : n.parentElement, u = a(i), d = (S = i == null ? void 0 : i.parentElement) == null ? void 0 : S.children[u + 7], y = d == null ? void 0 : d.firstElementChild;
49
+ y == null || y.focus();
42
50
  }
43
51
  if (e === "ArrowUp") {
44
- const n = (_ = this.shadowRoot) == null ? void 0 : _.activeElement, r = n == null ? void 0 : n.parentElement;
45
- if (!r) return;
46
- const c = Array.from(((S = r.parentElement) == null ? void 0 : S.children) ?? []).indexOf(r), l = (b = r.parentElement) == null ? void 0 : b.children[c - 7], f = l == null ? void 0 : l.firstElementChild;
47
- f == null || f.focus();
52
+ const n = ($ = this.shadowRoot) == null ? void 0 : $.activeElement, i = n == null ? void 0 : n.parentElement;
53
+ if (!i) return;
54
+ const u = Array.from(((M = i.parentElement) == null ? void 0 : M.children) ?? []).indexOf(i), d = (w = i.parentElement) == null ? void 0 : w.children[u - 7], y = d == null ? void 0 : d.firstElementChild;
55
+ y == null || y.focus();
48
56
  }
49
- function a(u) {
57
+ function a(g) {
50
58
  var n;
51
- return u ? Array.from(((n = u.parentElement) == null ? void 0 : n.children) ?? []).indexOf(u) : 0;
59
+ return g ? Array.from(((n = g.parentElement) == null ? void 0 : n.children) ?? []).indexOf(g) : 0;
52
60
  }
53
61
  }, this.dateSelectable = (t) => {
54
- var h;
55
- const e = (h = this.invalidDates) == null ? void 0 : h.split(",").includes(t), a = !this.selectableTo || $(t, this.selectableTo) < 0, s = !this.selectableFrom || $(t, this.selectableFrom) > 0;
56
- return { matchesInvalidDates: e, dateWithinRange: !(a && s) };
62
+ var p;
63
+ const e = (p = this.invalidDates) == null ? void 0 : p.split(",").includes(t), a = !this.selectableTo || Y(t, this.selectableTo) < 0, o = !this.selectableFrom || Y(t, this.selectableFrom) > 0;
64
+ return { matchesInvalidDates: e, dateWithinRange: !(a && o) };
57
65
  };
58
66
  }
59
67
  firstUpdated() {
@@ -69,7 +77,7 @@ const E = class E extends O {
69
77
  months: 1
70
78
  }).daysInMonth) ?? 0;
71
79
  }
72
- _createDate({ year: t, month: e, day: a = 1 }, s) {
80
+ _createDate({ year: t, month: e, day: a = 1 }, o) {
73
81
  switch (e ?? (e = this.date.getMonth()), t ?? (t = this.date.getFullYear()), !0) {
74
82
  case e < 0:
75
83
  e = 11, t--;
@@ -78,15 +86,15 @@ const E = class E extends O {
78
86
  e = 0, t++;
79
87
  break;
80
88
  }
81
- if (s)
89
+ if (o)
82
90
  try {
83
- return m.PlainDate.from({
91
+ return f.PlainDate.from({
84
92
  year: t,
85
93
  month: e + 1,
86
94
  day: a
87
95
  });
88
- } catch (i) {
89
- console.error("error", i);
96
+ } catch (l) {
97
+ console.error("error", l);
90
98
  }
91
99
  return new Date(t, e, a);
92
100
  }
@@ -100,7 +108,7 @@ const E = class E extends O {
100
108
  day: t.getDate()
101
109
  };
102
110
  try {
103
- return m.PlainDate.from(e);
111
+ return f.PlainDate.from(e);
104
112
  } catch (a) {
105
113
  return console.log(e), console.error("error", a), null;
106
114
  }
@@ -108,19 +116,19 @@ const E = class E extends O {
108
116
  /** @internal Check if a day is between two dates */
109
117
  _isDateBetween(t, e, a) {
110
118
  if (!e || !a) return !1;
111
- const s = m.PlainDate.compare(t, e) > 0, i = m.PlainDate.compare(t, a) < 0;
112
- return s && i;
119
+ const o = f.PlainDate.compare(t, e) > 0, l = f.PlainDate.compare(t, a) < 0;
120
+ return o && l;
113
121
  }
114
122
  render() {
115
- return p`
123
+ return b`
116
124
  ${this.getCalendarHead()}
117
125
 
118
126
  <!-- weekdays -->
119
127
  <ul class="weekdays grid">
120
- ${w(
128
+ ${E(
121
129
  Array.from({ length: 7 }, (t, e) => e),
122
130
  (t) => t,
123
- (t) => p`<li>
131
+ (t) => b`<li>
124
132
  ${new Intl.DateTimeFormat(this.locale, {
125
133
  weekday: "short"
126
134
  }).format(new Date(2018, 0, t)).slice(0, 2)}
@@ -133,16 +141,16 @@ const E = class E extends O {
133
141
  <!-- previous month -->
134
142
  ${this.getCalendarPreMonthDays()}
135
143
  <!-- current days -->
136
- ${w(
144
+ ${E(
137
145
  Array.from({ length: this._numberOfDays }, (t, e) => e + 1),
138
146
  (t) => t,
139
147
  (t) => {
140
148
  const e = this._createDate({ day: t }, !0).toString(), a = this.returnDayClasses(t);
141
- return p`<li>
149
+ return b`<li>
142
150
  <button
143
151
  class="day ${a}"
144
152
  data-date=${e}
145
- aria-label="Choose ${this._createDate({
153
+ aria-label="${v(this, D).term("choose")} ${this._createDate({
146
154
  day: t
147
155
  }).toLocaleDateString(this.locale, {
148
156
  weekday: "long",
@@ -169,19 +177,19 @@ const E = class E extends O {
169
177
  }
170
178
  /** @internal */
171
179
  returnDayClasses(t) {
172
- var b, u, n, r;
173
- const e = [], a = this._createDate({ day: t }).getDate(), s = ((b = this.selectedDate) == null ? void 0 : b.getMonth()) === this.date.getMonth(), i = ((u = this.selectedDate) == null ? void 0 : u.getFullYear()) === this.date.getFullYear();
180
+ var w, g, n, i;
181
+ const e = [], a = this._createDate({ day: t }).getDate(), o = ((w = this.selectedDate) == null ? void 0 : w.getMonth()) === this.date.getMonth(), l = ((g = this.selectedDate) == null ? void 0 : g.getFullYear()) === this.date.getFullYear();
174
182
  this.range && this._isDateBetween(
175
183
  this._createDate({ day: t }, !0),
176
184
  this._plainDate(this.selectedDateRange.start) ?? void 0,
177
185
  this._plainDate(this.selectedDateRange.end) ?? void 0
178
186
  ) && e.push("in-range"), this.range && this.selectedDateRange.start && (this.selectedDateRange.start.getFullYear() === this.date.getFullYear() && this.selectedDateRange.start.getMonth() === this.date.getMonth() && this.selectedDateRange.start.getDate() === a && e.push("selected selected-start"), ((n = this.selectedDateRange.end) == null ? void 0 : n.getFullYear()) === this.date.getFullYear() && this.selectedDateRange.end.getMonth() === this.date.getMonth() && this.selectedDateRange.end.getDate() === a && e.push("selected selected-end"));
179
- const { matchesInvalidDates: h, dateWithinRange: v } = this.dateSelectable(
187
+ const { matchesInvalidDates: p, dateWithinRange: S } = this.dateSelectable(
180
188
  this._createDate({ day: t }, !0).toString()
181
189
  );
182
- (h || v) && e.push("invalid");
183
- const _ = ((r = this.selectedDate) == null ? void 0 : r.getDate()) === a;
184
- return !this.range && _ && s && i && (console.log("is single date selected", this.selectedDate), e.push("selected")), this._createDate({ day: t }, !0).equals(String(this._plainDate(/* @__PURE__ */ new Date()))) && e.push("today"), e.join(" ");
190
+ (p || S) && e.push("invalid");
191
+ const $ = ((i = this.selectedDate) == null ? void 0 : i.getDate()) === a;
192
+ return !this.range && $ && o && l && (console.log("is single date selected", this.selectedDate), e.push("selected")), this._createDate({ day: t }, !0).equals(String(this._plainDate(/* @__PURE__ */ new Date()))) && e.push("today"), e.join(" ");
185
193
  }
186
194
  /** @internal */
187
195
  handleSelectDay({
@@ -198,7 +206,7 @@ const E = class E extends O {
198
206
  }
199
207
  /** @internal */
200
208
  getCalendarPreMonthDays() {
201
- return w(
209
+ return E(
202
210
  Array.from(
203
211
  {
204
212
  length: this.getCalendarStartDay().getDay()
@@ -214,8 +222,8 @@ const E = class E extends O {
214
222
  day: t + 1
215
223
  },
216
224
  !0
217
- ).toString(), { matchesInvalidDates: s, dateWithinRange: i } = this.dateSelectable(a);
218
- return (s || i) && e.push("invalid"), p`<li class="day ">
225
+ ).toString(), { matchesInvalidDates: o, dateWithinRange: l } = this.dateSelectable(a);
226
+ return (o || l) && e.push("invalid"), b`<li class="day ">
219
227
  <button
220
228
  class=${e.join(" ")}
221
229
  data-date=${a}
@@ -223,8 +231,8 @@ const E = class E extends O {
223
231
  this.handleSelectDay({
224
232
  month: this.date.getMonth() - 1,
225
233
  day: t
226
- }), this.emit("update-calendar-view", {
227
- detail: m.PlainDate.from(y(this.date)).subtract({ months: 1 }).toString()
234
+ }), this.emit("skf-update-calendar-view", {
235
+ detail: f.PlainDate.from(_(this.date)).subtract({ months: 1 }).toString()
228
236
  });
229
237
  }}"
230
238
  ?disabled=${e.includes("invalid")}
@@ -237,7 +245,7 @@ const E = class E extends O {
237
245
  }
238
246
  /** @internal */
239
247
  getCalendarRemaningDays() {
240
- return (this._numberOfDays + this.calendarMonthStartsOn()) % 7 === 0 ? "" : w(
248
+ return (this._numberOfDays + this.calendarMonthStartsOn()) % 7 === 0 ? "" : E(
241
249
  Array.from(
242
250
  {
243
251
  length: 7 - this._createDate({
@@ -257,8 +265,8 @@ const E = class E extends O {
257
265
  day: t + 1
258
266
  },
259
267
  !0
260
- ).toString(), { matchesInvalidDates: s, dateWithinRange: i } = this.dateSelectable(a);
261
- return (s || i) && e.push("invalid"), p`<li class="day">
268
+ ).toString(), { matchesInvalidDates: o, dateWithinRange: l } = this.dateSelectable(a);
269
+ return (o || l) && e.push("invalid"), b`<li class="day">
262
270
  <button
263
271
  data-date=${a}
264
272
  class=${e.join(" ")}
@@ -266,8 +274,8 @@ const E = class E extends O {
266
274
  this.handleSelectDay({
267
275
  month: this.date.getMonth() + 1,
268
276
  day: t + 1
269
- }), this.emit("update-calendar-view", {
270
- detail: m.PlainDate.from(y(this.date)).add({ months: 1 }).toString()
277
+ }), this.emit("skf-update-calendar-view", {
278
+ detail: f.PlainDate.from(_(this.date)).add({ months: 1 }).toString()
271
279
  });
272
280
  }}"
273
281
  ?disabled=${e.includes("invalid")}
@@ -296,27 +304,25 @@ const E = class E extends O {
296
304
  }
297
305
  /** @internal */
298
306
  getCalendarHead() {
299
- return p` <div class="calendar-head">
307
+ return b` <div class="calendar-head">
300
308
  <div
301
309
  class="calendar-head-controls${this.range && this.classList.contains("end") ? " hide" : ""}"
302
310
  >
303
311
  <button
304
- aria-label="Previous year"
305
- title="Previous year"
312
+ title=${v(this, D).term("previousYear")}
306
313
  @click="${() => {
307
- this.emit("update-calendar-view", {
308
- detail: m.PlainDate.from(y(this.date)).subtract({ years: 1 }).toString()
314
+ this.emit("skf-update-calendar-view", {
315
+ detail: f.PlainDate.from(_(this.date)).subtract({ years: 1 }).toString()
309
316
  });
310
317
  }}"
311
318
  >
312
319
  <div style="letter-spacing: -0.2em" aria-hidden="true" data-comp="icon">❮❮</div>
313
320
  </button>
314
321
  <button
315
- aria-label="Previous month"
316
- title="Previous month"
322
+ title=${v(this, D).term("previousMonth")}
317
323
  @click="${() => {
318
- this.emit("update-calendar-view", {
319
- detail: m.PlainDate.from(y(this.date)).subtract({ months: 1 }).toString()
324
+ this.emit("skf-update-calendar-view", {
325
+ detail: f.PlainDate.from(_(this.date)).subtract({ months: 1 }).toString()
320
326
  });
321
327
  }}"
322
328
  >
@@ -325,28 +331,26 @@ const E = class E extends O {
325
331
  </div>
326
332
  <h4>
327
333
  ${this.date.toLocaleString(this.locale, { month: "short" })}
328
- ${this.range && this.classList.contains("start") ? p` -&nbsp;` : this.date.getFullYear()}
334
+ ${this.range && this.classList.contains("start") ? b` -&nbsp;` : this.date.getFullYear()}
329
335
  </h4>
330
336
  <div
331
337
  class="calendar-head-controls${this.range && this.classList.contains("start") ? " hide" : ""}"
332
338
  >
333
339
  <button
334
- aria-label="Next month"
335
- title="Next month"
340
+ title=${v(this, D).term("nextMonth")}
336
341
  @click="${() => {
337
- this.emit("update-calendar-view", {
338
- detail: m.PlainDate.from(y(this.date)).add({ months: 1 + this._secondCalendarOffset }).toString()
342
+ this.emit("skf-update-calendar-view", {
343
+ detail: f.PlainDate.from(_(this.date)).add({ months: 1 + this._secondCalendarOffset }).toString()
339
344
  });
340
345
  }}"
341
346
  >
342
347
 
343
348
  </button>
344
349
  <button
345
- aria-label="Next year"
346
- title="Next year"
350
+ title=${v(this, D).term("nextYear")}
347
351
  @click="${() => {
348
- this.emit("update-calendar-view", {
349
- detail: m.PlainDate.from(y(this.date)).add({ months: 12 + this._secondCalendarOffset }).toString()
352
+ this.emit("skf-update-calendar-view", {
353
+ detail: f.PlainDate.from(_(this.date)).add({ months: 12 + this._secondCalendarOffset }).toString()
350
354
  });
351
355
  }}"
352
356
  >
@@ -356,60 +360,63 @@ const E = class E extends O {
356
360
  </div>`;
357
361
  }
358
362
  };
359
- E.styles = [C, F];
360
- let o = E;
361
- d([
362
- g({
363
+ D = new WeakMap(), O.styles = [T, W];
364
+ let h = O;
365
+ c([
366
+ m({
363
367
  converter: {
364
- fromAttribute(D) {
365
- return console.log("value", typeof D), new Date(D);
368
+ fromAttribute(s) {
369
+ return console.log("value", typeof s), new Date(s);
366
370
  },
367
- toAttribute(D) {
368
- return D.toISOString();
371
+ toAttribute(s) {
372
+ return s.toISOString();
369
373
  }
370
374
  }
371
375
  })
372
- ], o.prototype, "date", 2);
373
- d([
374
- g()
375
- ], o.prototype, "eventid", 2);
376
- d([
377
- g({ type: Number })
378
- ], o.prototype, "firstDayOfWeek", 2);
379
- d([
380
- g({ reflect: !0, attribute: "invalid-dates" })
381
- ], o.prototype, "invalidDates", 2);
382
- d([
383
- g({ reflect: !0 })
384
- ], o.prototype, "locale", 2);
385
- d([
386
- g({ type: Boolean })
387
- ], o.prototype, "range", 2);
388
- d([
389
- g({ attribute: "selectable-from" })
390
- ], o.prototype, "selectableFrom", 2);
391
- d([
392
- g({ attribute: "selectable-to" })
393
- ], o.prototype, "selectableTo", 2);
394
- d([
395
- g({
376
+ ], h.prototype, "date", 2);
377
+ c([
378
+ m()
379
+ ], h.prototype, "eventid", 2);
380
+ c([
381
+ m({ type: Number })
382
+ ], h.prototype, "firstDayOfWeek", 2);
383
+ c([
384
+ m({ reflect: !0, attribute: "invalid-dates" })
385
+ ], h.prototype, "invalidDates", 2);
386
+ c([
387
+ m({ type: String })
388
+ ], h.prototype, "lang", 2);
389
+ c([
390
+ m({ reflect: !0 })
391
+ ], h.prototype, "locale", 2);
392
+ c([
393
+ m({ type: Boolean })
394
+ ], h.prototype, "range", 2);
395
+ c([
396
+ m({ attribute: "selectable-from" })
397
+ ], h.prototype, "selectableFrom", 2);
398
+ c([
399
+ m({ attribute: "selectable-to" })
400
+ ], h.prototype, "selectableTo", 2);
401
+ c([
402
+ m({
396
403
  attribute: "selected-date",
397
- converter: { fromAttribute: (D) => new Date(D) },
404
+ converter: { fromAttribute: (s) => new Date(s) },
398
405
  reflect: !0
399
406
  })
400
- ], o.prototype, "selectedDate", 2);
401
- d([
402
- g({ type: Object })
403
- ], o.prototype, "selectedDateRange", 2);
404
- d([
405
- M()
406
- ], o.prototype, "_numberOfDays", 2);
407
- d([
408
- M()
409
- ], o.prototype, "_numberOfDaysLastMonth", 2);
410
- d([
411
- R("date")
412
- ], o.prototype, "handleDateChange", 1);
407
+ ], h.prototype, "selectedDate", 2);
408
+ c([
409
+ m({ type: Object })
410
+ ], h.prototype, "selectedDateRange", 2);
411
+ c([
412
+ k()
413
+ ], h.prototype, "_numberOfDays", 2);
414
+ c([
415
+ k()
416
+ ], h.prototype, "_numberOfDaysLastMonth", 2);
417
+ c([
418
+ P("date")
419
+ ], h.prototype, "handleDateChange", 1);
413
420
  export {
414
- o as SkfDatepickerCalendar
421
+ h as SkfDatepickerCalendar
415
422
  };
@@ -1,5 +1,6 @@
1
1
  import '../button/button.js';
2
2
  import { SkfElement } from '../../internal/components/skf-element.js';
3
+ import { type Language } from '../../utilities/localize.js';
3
4
  import { type CSSResultGroup } from 'lit';
4
5
  import './datepicker-calendar.js';
5
6
  export interface SkfDatepickerPopupDateRange {
@@ -7,6 +8,7 @@ export interface SkfDatepickerPopupDateRange {
7
8
  end: Date | null;
8
9
  }
9
10
  export declare class SkfDatepickerPopup extends SkfElement {
11
+ #private;
10
12
  static styles: CSSResultGroup;
11
13
  locale: string;
12
14
  date: string;
@@ -15,6 +17,8 @@ export declare class SkfDatepickerPopup extends SkfElement {
15
17
  * A comma-separated list of dates (yyyy-mm-dd format) that are not selectable.
16
18
  */
17
19
  invalidDates?: string;
20
+ /** Sets the internal language of the component */
21
+ lang: Language;
18
22
  range: boolean;
19
23
  selectedDate: Date | undefined;
20
24
  /**