@oslokommune/punkt-elements 14.2.0 → 14.4.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.
Files changed (58) hide show
  1. package/CHANGELOG.md +34 -0
  2. package/dist/{checkbox-CnhA52o_.js → checkbox-DfVUNTjH.js} +1 -1
  3. package/dist/{checkbox-C0TPnShf.cjs → checkbox-uxeHrTLH.cjs} +1 -1
  4. package/dist/{combobox-C1xwAju5.cjs → combobox-CcyHcqdW.cjs} +13 -13
  5. package/dist/{combobox-Dcp_fHcL.js → combobox-MZsqmVL-.js} +45 -45
  6. package/dist/{datepicker-COIRRau0.cjs → datepicker-BeMs_vsm.cjs} +25 -25
  7. package/dist/{datepicker-Bjb9GK1E.js → datepicker-a2LvhbRb.js} +215 -234
  8. package/dist/index.d.ts +236 -34
  9. package/dist/input-element-CARcDzQB.js +840 -0
  10. package/dist/input-element-CiaV6jln.cjs +1 -0
  11. package/dist/pkt-checkbox.cjs +1 -1
  12. package/dist/pkt-checkbox.js +1 -1
  13. package/dist/pkt-combobox.cjs +1 -1
  14. package/dist/pkt-combobox.js +1 -1
  15. package/dist/pkt-datepicker.cjs +1 -1
  16. package/dist/pkt-datepicker.js +2 -2
  17. package/dist/pkt-header.cjs +9 -7
  18. package/dist/pkt-header.js +137 -123
  19. package/dist/pkt-index.cjs +1 -1
  20. package/dist/pkt-index.js +7 -7
  21. package/dist/pkt-options-controller-DjBCEHU4.cjs +1 -0
  22. package/dist/{pkt-options-controller-CZO1nxZ8.js → pkt-options-controller-zn5cmMvL.js} +3 -3
  23. package/dist/pkt-radiobutton.cjs +1 -1
  24. package/dist/pkt-radiobutton.js +1 -1
  25. package/dist/pkt-select.cjs +1 -1
  26. package/dist/pkt-select.js +1 -1
  27. package/dist/pkt-textarea.cjs +1 -1
  28. package/dist/pkt-textarea.js +1 -1
  29. package/dist/pkt-textinput.cjs +1 -1
  30. package/dist/pkt-textinput.js +1 -1
  31. package/dist/{radiobutton-Caq8-GhM.js → radiobutton-BmgdSpYf.js} +1 -1
  32. package/dist/{radiobutton-BkqaqO5E.cjs → radiobutton-DVe09YxP.cjs} +1 -1
  33. package/dist/select-7KFOnLln.cjs +49 -0
  34. package/dist/select-CKqz-JKZ.js +228 -0
  35. package/dist/{textarea-a6T4aJJU.js → textarea-Bmrv_vve.js} +1 -1
  36. package/dist/{textarea-DyUy8u7X.cjs → textarea-VBUXPS1O.cjs} +1 -1
  37. package/dist/{textinput-IN3b0nSH.cjs → textinput-BkYKotc1.cjs} +1 -1
  38. package/dist/{textinput-DIuM70dd.js → textinput-Lp1crOmj.js} +1 -1
  39. package/package.json +2 -2
  40. package/src/components/checkbox/checkbox.ts +1 -1
  41. package/src/components/combobox/combobox.ts +2 -2
  42. package/src/components/datepicker/datepicker-utils.test.ts +0 -25
  43. package/src/components/datepicker/datepicker-utils.ts +0 -28
  44. package/src/components/datepicker/datepicker.ts +0 -6
  45. package/src/components/header/header-service.ts +12 -8
  46. package/src/components/header/header.ts +8 -2
  47. package/src/components/header/index.ts +4 -1
  48. package/src/components/header/types.ts +18 -22
  49. package/src/components/index.ts +4 -1
  50. package/src/components/radiobutton/radiobutton.ts +1 -1
  51. package/src/components/select/select.ts +12 -47
  52. package/src/components/textarea/textarea.ts +1 -1
  53. package/src/components/textinput/textinput.ts +1 -1
  54. package/dist/input-element-B8M8Nppd.js +0 -708
  55. package/dist/input-element-D697OAJo.cjs +0 -1
  56. package/dist/pkt-options-controller-CiuBG6Lt.cjs +0 -1
  57. package/dist/select-3dwlk22G.cjs +0 -49
  58. package/dist/select-_C-yztI0.js +0 -173
@@ -1,8 +1,8 @@
1
- import { P as L, E as I, x as o, n as l, a as w } from "./element-CRDRygXu.js";
1
+ import { P as L, E, x as o, n as l, a as w } from "./element-CRDRygXu.js";
2
2
  import { r as G } from "./state-DS_kr2Fy.js";
3
- import { s as K, f as q, n as F, a as J, i as Q, b as M, v as D, d as X, e as Y, p as Z, g as W } from "./calendar-CvfMj3fA.js";
4
- import { P as ee } from "./input-element-B8M8Nppd.js";
5
- import { e as m, n as v } from "./ref-Xa5dbh--.js";
3
+ import { s as z, f as K, n as A, a as J, i as Q, b as F, v as D, d as X, e as Y, p as Z, g as H } from "./calendar-CvfMj3fA.js";
4
+ import { P as ee } from "./input-element-CARcDzQB.js";
5
+ import { e as g, n as v } from "./ref-Xa5dbh--.js";
6
6
  import "./icon-BB7e5iQN.js";
7
7
  import "./input-wrapper-1PCXqtiu.js";
8
8
  import { e as $ } from "./class-map-wy7PUk0P.js";
@@ -11,10 +11,10 @@ import "./tag-CES41g0D.js";
11
11
  import { u as se, s as ie } from "./utils-DznhwRXm.js";
12
12
  import { o as f } from "./if-defined-BWZGb3bh.js";
13
13
  import { P as ae } from "./pkt-slot-controller-BPGj-LC5.js";
14
- var ne = Object.defineProperty, le = Object.getOwnPropertyDescriptor, R = (e, t, i, s) => {
15
- for (var a = s > 1 ? void 0 : s ? le(t, i) : t, n = e.length - 1, r; n >= 0; n--)
16
- (r = e[n]) && (a = (s ? r(t, i, a) : r(a)) || a);
17
- return s && a && ne(t, i, a), a;
14
+ var ne = Object.defineProperty, le = Object.getOwnPropertyDescriptor, R = (e, t, a, s) => {
15
+ for (var i = s > 1 ? void 0 : s ? le(t, a) : t, n = e.length - 1, r; n >= 0; n--)
16
+ (r = e[n]) && (i = (s ? r(t, a, i) : r(i)) || i);
17
+ return s && i && ne(t, a, i), i;
18
18
  };
19
19
  let k = class extends L {
20
20
  constructor() {
@@ -27,7 +27,7 @@ let k = class extends L {
27
27
  }, o`
28
28
  <div class=${$(this.classes)} aria-live="polite">
29
29
  ${Array.isArray(this.dates) && this.dates[0] ? te(
30
- K((this.dates ?? []).filter(Boolean)),
30
+ z((this.dates ?? []).filter(Boolean)),
31
31
  (e) => e,
32
32
  (e) => {
33
33
  var t;
@@ -37,12 +37,12 @@ let k = class extends L {
37
37
  @close=${() => {
38
38
  this.dispatchEvent(new CustomEvent("date-tag-removed", { detail: e }));
39
39
  }}
40
- .ariaLabel=${`${(t = this.strings) == null ? void 0 : t.calendar.deleteDate} ${q(e, this.dateformat)}`}
40
+ .ariaLabel=${`${(t = this.strings) == null ? void 0 : t.calendar.deleteDate} ${K(e, this.dateformat)}`}
41
41
  >
42
- <time datetime=${e}>${q(e, this.dateformat)}</time>
42
+ <time datetime=${e}>${K(e, this.dateformat)}</time>
43
43
  </pkt-tag>`;
44
44
  }
45
- ) : I}
45
+ ) : E}
46
46
  </div>
47
47
  `;
48
48
  }
@@ -67,26 +67,7 @@ const re = { dateformat: { default: "dd.MM.yyyy" }, weeknumbers: { default: !1 }
67
67
  }, b = () => {
68
68
  const e = navigator.userAgent;
69
69
  return !!(/iP(hone|od|ad)/.test(e) || /Macintosh/.test(e) && "ontouchend" in document);
70
- }, E = {
71
- /**
72
- * Ensures name attribute ends with [] for multiple/range inputs
73
- *
74
- * For form submission to work correctly with multiple values,
75
- * the input name must end with [] to indicate it's an array.
76
- *
77
- * @param name - The original name attribute value
78
- * @param isMultiple - Whether this is a multiple-date picker
79
- * @param isRange - Whether this is a range date picker
80
- * @returns The normalized name with [] suffix if needed, or null if name is null
81
- *
82
- * @example
83
- * normalizeNameForMultiple('dates', true, false) // Returns 'dates[]'
84
- * normalizeNameForMultiple('dates[]', true, false) // Returns 'dates[]' (no change)
85
- * normalizeNameForMultiple('date', false, false) // Returns 'date' (no change)
86
- */
87
- normalizeNameForMultiple(e, t, i) {
88
- return e ? (t || i) && !e.endsWith("[]") ? e + "[]" : e : null;
89
- },
70
+ }, N = {
90
71
  /**
91
72
  * Validates that a range has valid order (start <= end)
92
73
  *
@@ -112,7 +93,7 @@ const re = { dateformat: { default: "dd.MM.yyyy" }, weeknumbers: { default: !1 }
112
93
  * // Returns ['2024-01-10', '2024-02-20', '2024-03-15']
113
94
  */
114
95
  sortDates(e) {
115
- return K(e);
96
+ return z(e);
116
97
  },
117
98
  /**
118
99
  * Filters dates to only include selectable ones based on constraints
@@ -139,10 +120,10 @@ const re = { dateformat: { default: "dd.MM.yyyy" }, weeknumbers: { default: !1 }
139
120
  * )
140
121
  * // Returns ['2024-01-06'] (after min, not excluded, not a weekend)
141
122
  */
142
- filterSelectableDates(e, t, i, s, a) {
143
- return J(e, t, i, s, a);
123
+ filterSelectableDates(e, t, a, s, i) {
124
+ return J(e, t, a, s, i);
144
125
  }
145
- }, ue = {
126
+ }, pe = {
146
127
  /**
147
128
  * Determines the appropriate input type based on device
148
129
  *
@@ -172,8 +153,8 @@ const re = { dateformat: { default: "dd.MM.yyyy" }, weeknumbers: { default: !1 }
172
153
  * submitForm(this) // From within a custom element
173
154
  */
174
155
  submitForm(e) {
175
- var i;
176
- const t = (i = e.internals) == null ? void 0 : i.form;
156
+ var a;
157
+ const t = (a = e.internals) == null ? void 0 : a.form;
177
158
  t && t.requestSubmit();
178
159
  },
179
160
  /**
@@ -192,8 +173,8 @@ const re = { dateformat: { default: "dd.MM.yyyy" }, weeknumbers: { default: !1 }
192
173
  * )
193
174
  */
194
175
  submitFormOrFallback(e, t) {
195
- const i = e == null ? void 0 : e.form;
196
- i ? i.requestSubmit() : t();
176
+ const a = e == null ? void 0 : e.form;
177
+ a ? a.requestSubmit() : t();
197
178
  },
198
179
  /**
199
180
  * Validates a date input and sets validity state
@@ -216,20 +197,20 @@ const re = { dateformat: { default: "dd.MM.yyyy" }, weeknumbers: { default: !1 }
216
197
  * { forms: { messages: { rangeUnderflow: 'Date too early' } } }
217
198
  * )
218
199
  */
219
- validateDateInput(e, t, i, s, a) {
220
- var r, h, U, z;
200
+ validateDateInput(e, t, a, s, i) {
201
+ var r, h, U, q;
221
202
  const n = e.value;
222
- n && (i && i > n ? t.setValidity(
203
+ n && (a && a > n ? t.setValidity(
223
204
  { rangeUnderflow: !0 },
224
- ((h = (r = a == null ? void 0 : a.forms) == null ? void 0 : r.messages) == null ? void 0 : h.rangeUnderflow) || "Value is below minimum",
205
+ ((h = (r = i == null ? void 0 : i.forms) == null ? void 0 : r.messages) == null ? void 0 : h.rangeUnderflow) || "Value is below minimum",
225
206
  e
226
207
  ) : s && s < n && t.setValidity(
227
208
  { rangeOverflow: !0 },
228
- ((z = (U = a == null ? void 0 : a.forms) == null ? void 0 : U.messages) == null ? void 0 : z.rangeOverflow) || "Value is above maximum",
209
+ ((q = (U = i == null ? void 0 : i.forms) == null ? void 0 : U.messages) == null ? void 0 : q.rangeOverflow) || "Value is above maximum",
229
210
  e
230
211
  ));
231
212
  }
232
- }, S = {
213
+ }, P = {
233
214
  /**
234
215
  * Adds a date to selected dates if it's valid
235
216
  *
@@ -250,11 +231,11 @@ const re = { dateformat: { default: "dd.MM.yyyy" }, weeknumbers: { default: !1 }
250
231
  * '2024-12-31'
251
232
  * )
252
233
  */
253
- addToSelected(e, t, i, s) {
254
- const a = e.target;
255
- if (!a.value) return;
256
- const n = i ? F(i) : null, r = s ? F(s) : null, h = F(a.value.split(",")[0]);
257
- h && !isNaN(h.getTime()) && (!n || h >= n) && (!r || h <= r) && t.value && t.value.handleDateSelect(h), a.value = "";
234
+ addToSelected(e, t, a, s) {
235
+ const i = e.target;
236
+ if (!i.value) return;
237
+ const n = a ? A(a) : null, r = s ? A(s) : null, h = A(i.value.split(",")[0]);
238
+ h && !isNaN(h.getTime()) && (!n || h >= n) && (!r || h <= r) && t.value && t.value.handleDateSelect(h), i.value = "";
258
239
  },
259
240
  /**
260
241
  * Handles calendar positioning based on viewport and input position
@@ -278,12 +259,12 @@ const re = { dateformat: { default: "dd.MM.yyyy" }, weeknumbers: { default: !1 }
278
259
  * this.multiple && this.maxlength !== null
279
260
  * )
280
261
  */
281
- handleCalendarPosition(e, t, i = !1) {
262
+ handleCalendarPosition(e, t, a = !1) {
282
263
  var h;
283
264
  if (!e.value || !t.value) return;
284
- const s = ((h = t.value.parentElement) == null ? void 0 : h.getBoundingClientRect()) || t.value.getBoundingClientRect(), a = i ? s.height + 30 : s.height, n = e.value.getBoundingClientRect().height;
285
- let r = i ? "calc(100% - 30px)" : "100%";
286
- s && s.top + n > window.innerHeight && s.top - n > 0 && (r = `calc(100% - ${a}px - ${n}px)`), e.value.style.top = r;
265
+ const s = ((h = t.value.parentElement) == null ? void 0 : h.getBoundingClientRect()) || t.value.getBoundingClientRect(), i = a ? s.height + 30 : s.height, n = e.value.getBoundingClientRect().height;
266
+ let r = a ? "calc(100% - 30px)" : "100%";
267
+ s && s.top + n > window.innerHeight && s.top - n > 0 && (r = `calc(100% - ${i}px - ${n}px)`), e.value.style.top = r;
287
268
  }
288
269
  }, V = {
289
270
  /**
@@ -301,15 +282,15 @@ const re = { dateformat: { default: "dd.MM.yyyy" }, weeknumbers: { default: !1 }
301
282
  * const classes = getInputClasses(true, false, false, false, false, 'date')
302
283
  * // Returns { 'pkt-input': true, 'pkt-input--fullwidth': true, ... }
303
284
  */
304
- getInputClasses(e, t, i, s, a, n) {
285
+ getInputClasses(e, t, a, s, i, n) {
305
286
  return {
306
287
  "pkt-input": !0,
307
288
  "pkt-datepicker__input": !0,
308
289
  "pkt-input--fullwidth": e,
309
290
  "pkt-datepicker--hasrangelabels": t,
310
- "pkt-datepicker--multiple": i,
291
+ "pkt-datepicker--multiple": a,
311
292
  "pkt-datepicker--range": s,
312
- "ios-readonly-hack": a === !1 && n === "text"
293
+ "ios-readonly-hack": i === !1 && n === "text"
313
294
  };
314
295
  },
315
296
  /**
@@ -362,8 +343,8 @@ const re = { dateformat: { default: "dd.MM.yyyy" }, weeknumbers: { default: !1 }
362
343
  * processDateSelection(['2024-01-15'], false, false) // Returns '2024-01-15'
363
344
  * processDateSelection(['2024-01-15', '2024-01-20'], true, false) // Returns '2024-01-15,2024-01-20'
364
345
  */
365
- processDateSelection(e, t, i) {
366
- return !t && !i ? e[0] || "" : Array.isArray(e) ? e.join(",") : e;
346
+ processDateSelection(e, t, a) {
347
+ return !t && !a ? e[0] || "" : Array.isArray(e) ? e.join(",") : e;
367
348
  },
368
349
  /**
369
350
  * Updates input values after calendar selection
@@ -392,8 +373,8 @@ const re = { dateformat: { default: "dd.MM.yyyy" }, weeknumbers: { default: !1 }
392
373
  * (input) => this.dispatchManageValidity(input)
393
374
  * )
394
375
  */
395
- updateInputValues(e, t, i, s, a, n) {
396
- e.value && (s && (t != null && t.value) ? (e.value.value = i[0] ?? "", t.value.value = i[1] ?? "", n(e.value), n(t.value)) : a || (e.value.value = i.length ? i[0] : "", n(e.value)));
376
+ updateInputValues(e, t, a, s, i, n) {
377
+ e.value && (s && (t != null && t.value) ? (e.value.value = a[0] ?? "", t.value.value = a[1] ?? "", n(e.value), n(t.value)) : i || (e.value.value = a.length ? a[0] : "", n(e.value)));
397
378
  },
398
379
  /**
399
380
  * Processes blur events for range inputs
@@ -419,16 +400,16 @@ const re = { dateformat: { default: "dd.MM.yyyy" }, weeknumbers: { default: !1 }
419
400
  * (input) => this.dispatchManageValidity(input)
420
401
  * )
421
402
  */
422
- processRangeBlur(e, t, i, s, a) {
403
+ processRangeBlur(e, t, a, s, i) {
423
404
  var r;
424
405
  const n = e.target;
425
406
  if (n.value) {
426
- a(n);
427
- const h = M(n.value);
428
- h && ((r = i == null ? void 0 : i.value) == null || r.handleDateSelect(h));
407
+ i(n);
408
+ const h = F(n.value);
409
+ h && ((r = a == null ? void 0 : a.value) == null || r.handleDateSelect(h));
429
410
  } else t[0] && s();
430
411
  }
431
- }, P = {
412
+ }, I = {
432
413
  /**
433
414
  * Handles common keyboard interactions for datepicker inputs
434
415
  *
@@ -467,9 +448,9 @@ const re = { dateformat: { default: "dd.MM.yyyy" }, weeknumbers: { default: !1 }
467
448
  * () => this.inputRef.value?.blur()
468
449
  * )
469
450
  */
470
- handleInputKeydown(e, t, i, s, a, n) {
451
+ handleInputKeydown(e, t, a, s, i, n) {
471
452
  const { key: r } = e;
472
- r === "," && (e.preventDefault(), n ? n(e) : a && a()), (r === "Space" || r === " ") && (e.preventDefault(), t(e)), r === "Enter" && (e.preventDefault(), i ? i() : s ? s() : a && a());
453
+ r === "," && (e.preventDefault(), n ? n(e) : i && i()), (r === "Space" || r === " ") && (e.preventDefault(), t(e)), r === "Enter" && (e.preventDefault(), a ? a() : s ? s() : i && i());
473
454
  },
474
455
  /**
475
456
  * Handles keyboard interactions for calendar button
@@ -487,21 +468,21 @@ const re = { dateformat: { default: "dd.MM.yyyy" }, weeknumbers: { default: !1 }
487
468
  * )
488
469
  */
489
470
  handleButtonKeydown(e, t) {
490
- const { key: i } = e;
491
- (i === "Enter" || i === " " || i === "Space") && (e.preventDefault(), t(e));
471
+ const { key: a } = e;
472
+ (a === "Enter" || a === " " || a === "Space") && (e.preventDefault(), t(e));
492
473
  }
493
474
  };
494
- var pe = Object.defineProperty, oe = Object.getOwnPropertyDescriptor, c = (e, t, i, s) => {
495
- for (var a = s > 1 ? void 0 : s ? oe(t, i) : t, n = e.length - 1, r; n >= 0; n--)
496
- (r = e[n]) && (a = (s ? r(t, i, a) : r(a)) || a);
497
- return s && a && pe(t, i, a), a;
475
+ var ue = Object.defineProperty, oe = Object.getOwnPropertyDescriptor, c = (e, t, a, s) => {
476
+ for (var i = s > 1 ? void 0 : s ? oe(t, a) : t, n = e.length - 1, r; n >= 0; n--)
477
+ (r = e[n]) && (i = (s ? r(t, a, i) : r(i)) || i);
478
+ return s && i && ue(t, a, i), i;
498
479
  };
499
480
  let d = class extends L {
500
481
  constructor() {
501
- super(...arguments), this.open = !1, this.multiple = !1, this.range = !1, this.weeknumbers = !1, this.withcontrols = !1, this.maxMultiple = null, this.selected = [], this.earliest = null, this.latest = null, this.excludedates = [], this.excludeweekdays = [], this.currentmonth = null, this.popupRef = m(), this.calendarRef = m(), this.handleDocumentClick = (e) => {
482
+ super(...arguments), this.open = !1, this.multiple = !1, this.range = !1, this.weeknumbers = !1, this.withcontrols = !1, this.maxMultiple = null, this.selected = [], this.earliest = null, this.latest = null, this.excludedates = [], this.excludeweekdays = [], this.currentmonth = null, this.popupRef = g(), this.calendarRef = g(), this.handleDocumentClick = (e) => {
502
483
  if (!this.open) return;
503
- const t = e.composedPath(), i = this.parentElement, s = this.popupRef.value;
504
- !t.includes(this) && !t.includes(s) && !(i && t.includes(i)) && (this.hide(), this.dispatchEvent(new CustomEvent("close", { bubbles: !0, composed: !0 })));
484
+ const t = e.composedPath(), a = this.parentElement, s = this.popupRef.value;
485
+ !t.includes(this) && !t.includes(s) && !(a && t.includes(a)) && (this.hide(), this.dispatchEvent(new CustomEvent("close", { bubbles: !0, composed: !0 })));
505
486
  }, this.handleDocumentKeydown = (e) => {
506
487
  this.open && e.key === "Escape" && (this.hide(), this.dispatchEvent(new CustomEvent("close", { bubbles: !0, composed: !0 })));
507
488
  };
@@ -530,9 +511,9 @@ let d = class extends L {
530
511
  const e = this.calendarRef.value;
531
512
  e && typeof e.focusOnCurrentDate == "function" && e.focusOnCurrentDate();
532
513
  }
533
- addToSelected(e, t, i) {
534
- if (typeof S.addToSelected == "function")
535
- return S.addToSelected(e, this.calendarRef, t, i);
514
+ addToSelected(e, t, a) {
515
+ if (typeof P.addToSelected == "function")
516
+ return P.addToSelected(e, this.calendarRef, t, a);
536
517
  }
537
518
  handleDateSelect(e) {
538
519
  const t = this.calendarRef.value;
@@ -613,14 +594,14 @@ c([
613
594
  d = c([
614
595
  w("pkt-datepicker-popup")
615
596
  ], d);
616
- var he = Object.defineProperty, y = (e, t, i, s) => {
617
- for (var a = void 0, n = e.length - 1, r; n >= 0; n--)
618
- (r = e[n]) && (a = r(t, i, a) || a);
619
- return a && he(t, i, a), a;
597
+ var he = Object.defineProperty, y = (e, t, a, s) => {
598
+ for (var i = void 0, n = e.length - 1, r; n >= 0; n--)
599
+ (r = e[n]) && (i = r(t, a, i) || i);
600
+ return i && he(t, a, i), i;
620
601
  };
621
- class g extends L {
602
+ class m extends L {
622
603
  constructor() {
623
- super(...arguments), this.inputType = "date", this.id = "", this.readonly = !1, this.disabled = !1, this.inputClasses = {}, this.inputRef = m(), this.btnRef = m();
604
+ super(...arguments), this.inputType = "date", this.id = "", this.readonly = !1, this.disabled = !1, this.inputClasses = {}, this.inputRef = g(), this.btnRef = g();
624
605
  }
625
606
  // Shared getters
626
607
  get inputElement() {
@@ -684,10 +665,10 @@ class g extends L {
684
665
  <button
685
666
  class="${$(V.getButtonClasses())}"
686
667
  type="button"
687
- @click=${(i) => this.dispatchToggleCalendar(i)}
688
- @keydown=${(i) => {
689
- const { key: s } = i;
690
- (s === "Enter" || s === " " || s === "Space") && (i.preventDefault(), this.dispatchToggleCalendar(i));
668
+ @click=${(a) => this.dispatchToggleCalendar(a)}
669
+ @keydown=${(a) => {
670
+ const { key: s } = a;
671
+ (s === "Enter" || s === " " || s === "Space") && (a.preventDefault(), this.dispatchToggleCalendar(a));
691
672
  }}
692
673
  ?disabled=${this.disabled}
693
674
  ${this.btnRef}
@@ -704,45 +685,45 @@ class g extends L {
704
685
  }
705
686
  y([
706
687
  l({ type: String })
707
- ], g.prototype, "inputType");
688
+ ], m.prototype, "inputType");
708
689
  y([
709
690
  l({ type: String })
710
- ], g.prototype, "id");
691
+ ], m.prototype, "id");
711
692
  y([
712
693
  l({ type: String })
713
- ], g.prototype, "min");
694
+ ], m.prototype, "min");
714
695
  y([
715
696
  l({ type: String })
716
- ], g.prototype, "max");
697
+ ], m.prototype, "max");
717
698
  y([
718
699
  l({ type: String })
719
- ], g.prototype, "placeholder");
700
+ ], m.prototype, "placeholder");
720
701
  y([
721
702
  l({ type: Boolean })
722
- ], g.prototype, "readonly");
703
+ ], m.prototype, "readonly");
723
704
  y([
724
705
  l({ type: Boolean })
725
- ], g.prototype, "disabled");
706
+ ], m.prototype, "disabled");
726
707
  y([
727
708
  l({ type: Object })
728
- ], g.prototype, "inputClasses");
709
+ ], m.prototype, "inputClasses");
729
710
  y([
730
711
  l({ type: Object })
731
- ], g.prototype, "internals");
732
- const H = {
712
+ ], m.prototype, "internals");
713
+ const W = {
733
714
  calendar: { buttonAltText: "Åpne kalender" }
734
715
  }, de = {
735
716
  calendar: { buttonAltText: "Åpne kalender" },
736
717
  generic: { from: "Fra", to: "Til" }
737
718
  };
738
- var ce = Object.defineProperty, me = Object.getOwnPropertyDescriptor, N = (e, t, i, s) => {
739
- for (var a = s > 1 ? void 0 : s ? me(t, i) : t, n = e.length - 1, r; n >= 0; n--)
740
- (r = e[n]) && (a = (s ? r(t, i, a) : r(a)) || a);
741
- return s && a && ce(t, i, a), a;
719
+ var ce = Object.defineProperty, ge = Object.getOwnPropertyDescriptor, M = (e, t, a, s) => {
720
+ for (var i = s > 1 ? void 0 : s ? ge(t, a) : t, n = e.length - 1, r; n >= 0; n--)
721
+ (r = e[n]) && (i = (s ? r(t, a, i) : r(i)) || i);
722
+ return s && i && ce(t, a, i), i;
742
723
  };
743
- let O = class extends g {
724
+ let S = class extends m {
744
725
  constructor() {
745
- super(...arguments), this.value = "", this.strings = H;
726
+ super(...arguments), this.value = "", this.strings = W;
746
727
  }
747
728
  dispatchManageValidity(e) {
748
729
  this.dispatchEvent(
@@ -773,7 +754,7 @@ let O = class extends g {
773
754
  e.preventDefault(), this.dispatchToggleCalendar(e);
774
755
  }}
775
756
  ?disabled=${this.disabled}
776
- @keydown=${(e) => P.handleInputKeydown(
757
+ @keydown=${(e) => I.handleInputKeydown(
777
758
  e,
778
759
  (t) => this.dispatchToggleCalendar(t),
779
760
  () => x.submitFormOrFallback(this.internals, () => {
@@ -811,33 +792,33 @@ let O = class extends g {
811
792
  `;
812
793
  }
813
794
  };
814
- N([
795
+ M([
815
796
  l({ type: String })
816
- ], O.prototype, "value", 2);
817
- N([
797
+ ], S.prototype, "value", 2);
798
+ M([
818
799
  l({ type: Object })
819
- ], O.prototype, "strings", 2);
820
- O = N([
800
+ ], S.prototype, "strings", 2);
801
+ S = M([
821
802
  w("pkt-datepicker-single")
822
- ], O);
823
- var fe = Object.defineProperty, ge = Object.getOwnPropertyDescriptor, B = (e, t, i, s) => {
824
- for (var a = s > 1 ? void 0 : s ? ge(t, i) : t, n = e.length - 1, r; n >= 0; n--)
825
- (r = e[n]) && (a = (s ? r(t, i, a) : r(a)) || a);
826
- return s && a && fe(t, i, a), a;
803
+ ], S);
804
+ var fe = Object.defineProperty, me = Object.getOwnPropertyDescriptor, O = (e, t, a, s) => {
805
+ for (var i = s > 1 ? void 0 : s ? me(t, a) : t, n = e.length - 1, r; n >= 0; n--)
806
+ (r = e[n]) && (i = (s ? r(t, a, i) : r(i)) || i);
807
+ return s && i && fe(t, a, i), i;
827
808
  };
828
- let _ = class extends g {
809
+ let _ = class extends m {
829
810
  constructor() {
830
- super(...arguments), this.value = [], this.showRangeLabels = !1, this.strings = de, this.inputRefTo = m();
811
+ super(...arguments), this.value = [], this.showRangeLabels = !1, this.strings = de, this.inputRefTo = g();
831
812
  }
832
813
  get inputElementTo() {
833
814
  return this.inputRefTo.value;
834
815
  }
835
816
  render() {
836
- var t, i;
817
+ var t, a;
837
818
  const e = V.getRangeLabelClasses(this.showRangeLabels);
838
819
  return o`
839
820
  <div class="pkt-input__container">
840
- ${this.showRangeLabels ? o` <div class="pkt-input-prefix">${(t = this.strings.generic) == null ? void 0 : t.from}</div> ` : I}
821
+ ${this.showRangeLabels ? o` <div class="pkt-input-prefix">${(t = this.strings.generic) == null ? void 0 : t.from}</div> ` : E}
841
822
  <input
842
823
  class=${$(this.inputClasses)}
843
824
  .type=${this.inputType}
@@ -854,23 +835,23 @@ let _ = class extends g {
854
835
  @touchend=${(s) => {
855
836
  s.preventDefault(), this.dispatchToggleCalendar(s);
856
837
  }}
857
- @keydown=${(s) => P.handleInputKeydown(
838
+ @keydown=${(s) => I.handleInputKeydown(
858
839
  s,
859
- (a) => this.dispatchToggleCalendar(a),
840
+ (i) => this.dispatchToggleCalendar(i),
860
841
  () => x.submitFormOrFallback(
861
842
  this.internals,
862
843
  () => {
863
- var a;
864
- return (a = this.inputRefTo.value) == null ? void 0 : a.focus();
844
+ var i;
845
+ return (i = this.inputRefTo.value) == null ? void 0 : i.focus();
865
846
  }
866
847
  ),
867
848
  () => {
868
- var a;
869
- return (a = this.inputRefTo.value) == null ? void 0 : a.focus();
849
+ var i;
850
+ return (i = this.inputRefTo.value) == null ? void 0 : i.focus();
870
851
  },
871
852
  () => {
872
- var a;
873
- return (a = this.inputRef.value) == null ? void 0 : a.blur();
853
+ var i;
854
+ return (i = this.inputRef.value) == null ? void 0 : i.blur();
874
855
  }
875
856
  )}
876
857
  @input=${(s) => {
@@ -898,9 +879,9 @@ let _ = class extends g {
898
879
  ${v(this.inputRef)}
899
880
  />
900
881
  <div class="${$(e)}" id="${this.id}-to-label">
901
- ${(i = this.strings.generic) == null ? void 0 : i.to}
882
+ ${(a = this.strings.generic) == null ? void 0 : a.to}
902
883
  </div>
903
- ${this.showRangeLabels ? I : o` <div class="pkt-input-separator">–</div> `}
884
+ ${this.showRangeLabels ? E : o` <div class="pkt-input-separator">–</div> `}
904
885
  <input
905
886
  class=${$(this.inputClasses)}
906
887
  .type=${this.inputType}
@@ -918,17 +899,17 @@ let _ = class extends g {
918
899
  @touchend=${(s) => {
919
900
  s.preventDefault(), this.dispatchToggleCalendar(s);
920
901
  }}
921
- @keydown=${(s) => P.handleInputKeydown(
902
+ @keydown=${(s) => I.handleInputKeydown(
922
903
  s,
923
- (a) => this.dispatchToggleCalendar(a),
904
+ (i) => this.dispatchToggleCalendar(i),
924
905
  () => x.submitFormOrFallback(this.internals, () => {
925
- var a;
926
- return (a = this.inputRefTo.value) == null ? void 0 : a.blur();
906
+ var i;
907
+ return (i = this.inputRefTo.value) == null ? void 0 : i.blur();
927
908
  }),
928
909
  void 0,
929
910
  () => {
930
- var a;
931
- return (a = this.inputRefTo.value) == null ? void 0 : a.blur();
911
+ var i;
912
+ return (i = this.inputRefTo.value) == null ? void 0 : i.blur();
932
913
  }
933
914
  )}
934
915
  @input=${(s) => {
@@ -960,26 +941,26 @@ let _ = class extends g {
960
941
  `;
961
942
  }
962
943
  };
963
- B([
944
+ O([
964
945
  l({ type: Array })
965
946
  ], _.prototype, "value", 2);
966
- B([
947
+ O([
967
948
  l({ type: Boolean })
968
949
  ], _.prototype, "showRangeLabels", 2);
969
- B([
950
+ O([
970
951
  l({ type: Object })
971
952
  ], _.prototype, "strings", 2);
972
- _ = B([
953
+ _ = O([
973
954
  w("pkt-datepicker-range")
974
955
  ], _);
975
- var ve = Object.defineProperty, ye = Object.getOwnPropertyDescriptor, A = (e, t, i, s) => {
976
- for (var a = s > 1 ? void 0 : s ? ye(t, i) : t, n = e.length - 1, r; n >= 0; n--)
977
- (r = e[n]) && (a = (s ? r(t, i, a) : r(a)) || a);
978
- return s && a && ve(t, i, a), a;
956
+ var ve = Object.defineProperty, ye = Object.getOwnPropertyDescriptor, B = (e, t, a, s) => {
957
+ for (var i = s > 1 ? void 0 : s ? ye(t, a) : t, n = e.length - 1, r; n >= 0; n--)
958
+ (r = e[n]) && (i = (s ? r(t, a, i) : r(i)) || i);
959
+ return s && i && ve(t, a, i), i;
979
960
  };
980
- let T = class extends g {
961
+ let T = class extends m {
981
962
  constructor() {
982
- super(...arguments), this.value = [], this.strings = H;
963
+ super(...arguments), this.value = [], this.strings = W;
983
964
  }
984
965
  get isInputDisabled() {
985
966
  return this.disabled || this.maxlength !== void 0 && this.maxlength !== null && this.value.length >= this.maxlength;
@@ -1020,7 +1001,7 @@ let T = class extends g {
1020
1001
  @focus=${() => {
1021
1002
  this.dispatchFocus(), b() && this.dispatchToggleCalendar(new Event("focus"));
1022
1003
  }}
1023
- @keydown=${(e) => P.handleInputKeydown(
1004
+ @keydown=${(e) => I.handleInputKeydown(
1024
1005
  e,
1025
1006
  (t) => this.dispatchToggleCalendar(t),
1026
1007
  () => x.submitFormOrFallback(this.internals, () => {
@@ -1041,31 +1022,31 @@ let T = class extends g {
1041
1022
  `;
1042
1023
  }
1043
1024
  };
1044
- A([
1025
+ B([
1045
1026
  l({ type: Array })
1046
1027
  ], T.prototype, "value", 2);
1047
- A([
1028
+ B([
1048
1029
  l({ type: Number })
1049
1030
  ], T.prototype, "maxlength", 2);
1050
- A([
1031
+ B([
1051
1032
  l({ type: Object })
1052
1033
  ], T.prototype, "strings", 2);
1053
- T = A([
1034
+ T = B([
1054
1035
  w("pkt-datepicker-multiple")
1055
1036
  ], T);
1056
- var $e = Object.defineProperty, be = Object.getOwnPropertyDescriptor, p = (e, t, i, s) => {
1057
- for (var a = s > 1 ? void 0 : s ? be(t, i) : t, n = e.length - 1, r; n >= 0; n--)
1058
- (r = e[n]) && (a = (s ? r(t, i, a) : r(a)) || a);
1059
- return s && a && $e(t, i, a), a;
1037
+ var $e = Object.defineProperty, be = Object.getOwnPropertyDescriptor, u = (e, t, a, s) => {
1038
+ for (var i = s > 1 ? void 0 : s ? be(t, a) : t, n = e.length - 1, r; n >= 0; n--)
1039
+ (r = e[n]) && (i = (s ? r(t, a, i) : r(i)) || i);
1040
+ return s && i && $e(t, a, i), i;
1060
1041
  };
1061
- let u = class extends ee {
1042
+ let p = class extends ee {
1062
1043
  /**
1063
1044
  * Housekeeping / lifecycle methods
1064
1045
  */
1065
1046
  constructor() {
1066
- super(), this._valueProperty = "", this.datepickerPopupRef = m(), this._value = [], this.label = "Datovelger", this.dateformat = C.props.dateformat.default, this.multiple = C.props.multiple.default, this.maxlength = null, this.range = C.props.range.default, this.showRangeLabels = !1, this.min = null, this.max = null, this.weeknumbers = C.props.weeknumbers.default, this.withcontrols = C.props.withcontrols.default, this.excludedates = [], this.excludeweekdays = [], this.currentmonth = null, this.calendarOpen = !1, this.timezone = "Europe/Oslo", this.inputClasses = {}, this.calRef = m(), this.popupRef = m(), this.helptextSlot = m(), this.singleInputRef = m(), this.rangeInputRef = m(), this.multipleInputRef = m(), this.addToSelected = (e) => {
1047
+ super(), this._valueProperty = "", this.datepickerPopupRef = g(), this._value = [], this.label = "Datovelger", this.dateformat = C.props.dateformat.default, this.multiple = C.props.multiple.default, this.maxlength = null, this.range = C.props.range.default, this.showRangeLabels = !1, this.min = null, this.max = null, this.weeknumbers = C.props.weeknumbers.default, this.withcontrols = C.props.withcontrols.default, this.excludedates = [], this.excludeweekdays = [], this.currentmonth = null, this.calendarOpen = !1, this.timezone = "Europe/Oslo", this.inputClasses = {}, this.calRef = g(), this.popupRef = g(), this.helptextSlot = g(), this.singleInputRef = g(), this.rangeInputRef = g(), this.multipleInputRef = g(), this.addToSelected = (e) => {
1067
1048
  const t = this.datepickerPopupRef.value;
1068
- return t && typeof t.addToSelected == "function" ? t.addToSelected(e, this.min, this.max) : S.addToSelected(e, this.calRef, this.min, this.max);
1049
+ return t && typeof t.addToSelected == "function" ? t.addToSelected(e, this.min, this.max) : P.addToSelected(e, this.calRef, this.min, this.max);
1069
1050
  }, this.slotController = new ae(this, this.helptextSlot);
1070
1051
  }
1071
1052
  get value() {
@@ -1079,10 +1060,10 @@ let u = class extends ee {
1079
1060
  * Computed properties
1080
1061
  */
1081
1062
  get inputType() {
1082
- return ue.getInputType();
1063
+ return pe.getInputType();
1083
1064
  }
1084
1065
  connectedCallback() {
1085
- super.connectedCallback(), this.timezone && this.timezone !== window.pktTz && (window.pktTz = this.timezone), this.name = E.normalizeNameForMultiple(this.name, this.multiple, this.range) || this.name;
1066
+ super.connectedCallback(), this.timezone && this.timezone !== window.pktTz && (window.pktTz = this.timezone);
1086
1067
  }
1087
1068
  disconnectedCallback() {
1088
1069
  super.disconnectedCallback();
@@ -1092,30 +1073,30 @@ let u = class extends ee {
1092
1073
  }
1093
1074
  valueChanged(e, t) {
1094
1075
  if (e === t) return;
1095
- const i = D(e), s = this.multiple && i.length > 1 ? E.filterSelectableDates(
1096
- i,
1076
+ const a = D(e), s = this.multiple && a.length > 1 ? N.filterSelectableDates(
1077
+ a,
1097
1078
  this.min,
1098
1079
  this.max,
1099
1080
  this.excludedates,
1100
1081
  this.excludeweekdays
1101
- ) : i;
1102
- if (this.range && !E.validateRangeOrder(s)) {
1082
+ ) : a;
1083
+ if (this.range && !N.validateRangeOrder(s)) {
1103
1084
  this._value = [], this._valueProperty = "", super.valueChanged("", t);
1104
1085
  return;
1105
1086
  }
1106
1087
  this._value = s;
1107
- const a = X(s);
1108
- this._valueProperty !== a && (this._valueProperty = a), super.valueChanged(a, t);
1088
+ const i = X(s);
1089
+ this._valueProperty !== i && (this._valueProperty = i), super.valueChanged(i, t);
1109
1090
  }
1110
- attributeChangedCallback(e, t, i) {
1111
- e === "value" && this.value !== t && this.valueChanged(i, t), e === "excludedates" && typeof this.excludedates == "string" && (this.excludedates = D(i || "")), e === "excludeweekdays" && typeof this.excludeweekdays == "string" && (this.excludeweekdays = D(i || "")), super.attributeChangedCallback(e, t, i);
1091
+ attributeChangedCallback(e, t, a) {
1092
+ e === "value" && this.value !== t && this.valueChanged(a, t), e === "excludedates" && typeof this.excludedates == "string" && (this.excludedates = D(a || "")), e === "excludeweekdays" && typeof this.excludeweekdays == "string" && (this.excludeweekdays = D(a || "")), super.attributeChangedCallback(e, t, a);
1112
1093
  }
1113
1094
  updated(e) {
1114
1095
  if (e.has("value")) {
1115
- const t = Array.isArray(this.value) ? this.value.join(",") : this.value, i = e.get("value"), s = Array.isArray(i) ? i.join(",") : i;
1096
+ const t = Array.isArray(this.value) ? this.value.join(",") : this.value, a = e.get("value"), s = Array.isArray(a) ? a.join(",") : a;
1116
1097
  this.valueChanged(t, s);
1117
1098
  }
1118
- (e.has("multiple") || e.has("range")) && (this.name = E.normalizeNameForMultiple(this.name, this.multiple, this.range) || this.name), e.has("multiple") && (this.multiple && !Array.isArray(this._value) ? this._value = D(this.value) : !this.multiple && Array.isArray(this._value) && (this._value = this._value.filter(Boolean)), !this.multiple && !this.range && Array.isArray(this._value) && (this._value = [this._value[0] ?? ""])), super.updated(e);
1099
+ e.has("multiple") && (this.multiple && !Array.isArray(this._value) ? this._value = D(this.value) : !this.multiple && Array.isArray(this._value) && (this._value = this._value.filter(Boolean)), !this.multiple && !this.range && Array.isArray(this._value) && (this._value = [this._value[0] ?? ""])), super.updated(e);
1119
1100
  }
1120
1101
  /**
1121
1102
  * Element references
@@ -1129,8 +1110,8 @@ let u = class extends ee {
1129
1110
  }
1130
1111
  // Getters for backward compatibility with input refs
1131
1112
  get currentInputElement() {
1132
- var e, t, i;
1133
- return this.multiple ? (e = this.multipleInputRef.value) == null ? void 0 : e.inputElement : this.range ? (t = this.rangeInputRef.value) == null ? void 0 : t.inputElement : (i = this.singleInputRef.value) == null ? void 0 : i.inputElement;
1113
+ var e, t, a;
1114
+ return this.multiple ? (e = this.multipleInputRef.value) == null ? void 0 : e.inputElement : this.range ? (t = this.rangeInputRef.value) == null ? void 0 : t.inputElement : (a = this.singleInputRef.value) == null ? void 0 : a.inputElement;
1134
1115
  }
1135
1116
  get currentInputElementTo() {
1136
1117
  var e;
@@ -1138,8 +1119,8 @@ let u = class extends ee {
1138
1119
  return (e = this.rangeInputRef.value) == null ? void 0 : e.inputElementTo;
1139
1120
  }
1140
1121
  get currentButtonElement() {
1141
- var e, t, i;
1142
- return this.multiple ? (e = this.multipleInputRef.value) == null ? void 0 : e.buttonElement : this.range ? (t = this.rangeInputRef.value) == null ? void 0 : t.buttonElement : (i = this.singleInputRef.value) == null ? void 0 : i.buttonElement;
1122
+ var e, t, a;
1123
+ return this.multiple ? (e = this.multipleInputRef.value) == null ? void 0 : e.buttonElement : this.range ? (t = this.rangeInputRef.value) == null ? void 0 : t.buttonElement : (a = this.singleInputRef.value) == null ? void 0 : a.buttonElement;
1143
1124
  }
1144
1125
  // Override btnRef for compatibility
1145
1126
  get btnRef() {
@@ -1203,13 +1184,13 @@ let u = class extends ee {
1203
1184
  (t = this.calRef.value) != null && t.contains(e.detail.relatedTarget) || this.onBlur();
1204
1185
  }}
1205
1186
  @range-blur=${(e) => {
1206
- const t = this.currentInputElement, i = this.currentInputElementTo;
1207
- if (t && i) {
1208
- const s = t.value, a = i.value;
1209
- if (s && a && s > a)
1210
- i.value = "", this._value = [s], this.value = s;
1187
+ const t = this.currentInputElement, a = this.currentInputElementTo;
1188
+ if (t && a) {
1189
+ const s = t.value, i = a.value;
1190
+ if (s && i && s > i)
1191
+ a.value = "", this._value = [s], this.value = s;
1211
1192
  else {
1212
- const n = [s, a].filter(Boolean);
1193
+ const n = [s, i].filter(Boolean);
1213
1194
  n.length > 0 && (n[0] !== this._value[0] || n[1] !== this._value[1]) && (this._value = n, this.value = n.join(","));
1214
1195
  }
1215
1196
  }
@@ -1226,11 +1207,11 @@ let u = class extends ee {
1226
1207
  x.validateDateInput(e.detail, this.internals, this.min, this.max, this.strings);
1227
1208
  }}
1228
1209
  @handle-date-select=${(e) => {
1229
- var i, s;
1230
- const t = M(e.detail);
1210
+ var a, s;
1211
+ const t = F(e.detail);
1231
1212
  if (t) {
1232
- const a = Y(t);
1233
- this._value[0] !== a && this._value[1] !== a && ((s = (i = this.calRef) == null ? void 0 : i.value) == null || s.handleDateSelect(t));
1213
+ const i = Y(t);
1214
+ this._value[0] !== i && this._value[1] !== i && ((s = (a = this.calRef) == null ? void 0 : a.value) == null || s.handleDateSelect(t));
1234
1215
  }
1235
1216
  }}
1236
1217
  @input-changed=${() => {
@@ -1344,10 +1325,10 @@ let u = class extends ee {
1344
1325
  id-base=${this.id}
1345
1326
  @date-tag-removed=${(e) => {
1346
1327
  var s;
1347
- const t = this.datepickerPopupRef.value, i = M(e.detail);
1348
- t && i && typeof t.handleDateSelect == "function" ? t.handleDateSelect(i) : (s = this.calRef.value) == null || s.handleDateSelect(i);
1328
+ const t = this.datepickerPopupRef.value, a = F(e.detail);
1329
+ t && a && typeof t.handleDateSelect == "function" ? t.handleDateSelect(a) : (s = this.calRef.value) == null || s.handleDateSelect(a);
1349
1330
  }}
1350
- ></pkt-date-tags>` : I}
1331
+ ></pkt-date-tags>` : E}
1351
1332
  <div
1352
1333
  class="pkt-datepicker__inputs ${this.range && this.showRangeLabels ? "pkt-input__range-inputs" : ""}"
1353
1334
  >
@@ -1362,7 +1343,7 @@ let u = class extends ee {
1362
1343
  */
1363
1344
  handleCalendarPosition() {
1364
1345
  const e = this.multiple && !!this.maxlength;
1365
- S.handleCalendarPosition(this.popupRef, this.inputRef, e);
1346
+ P.handleCalendarPosition(this.popupRef, this.inputRef, e);
1366
1347
  }
1367
1348
  async showCalendar() {
1368
1349
  var t;
@@ -1381,8 +1362,8 @@ let u = class extends ee {
1381
1362
  e.preventDefault();
1382
1363
  const t = this.datepickerPopupRef.value;
1383
1364
  if (t && typeof t.toggle == "function") {
1384
- const i = !!t.open;
1385
- t.toggle(), this.calendarOpen = !i;
1365
+ const a = !!t.open;
1366
+ t.toggle(), this.calendarOpen = !a;
1386
1367
  return;
1387
1368
  }
1388
1369
  this.calendarOpen ? this.hideCalendar() : this.showCalendar();
@@ -1397,67 +1378,67 @@ let u = class extends ee {
1397
1378
  );
1398
1379
  }
1399
1380
  };
1400
- p([
1381
+ u([
1401
1382
  l({ type: String, reflect: !0 })
1402
- ], u.prototype, "value", 1);
1403
- p([
1383
+ ], p.prototype, "value", 1);
1384
+ u([
1404
1385
  l({ type: Array })
1405
- ], u.prototype, "_value", 2);
1406
- p([
1386
+ ], p.prototype, "_value", 2);
1387
+ u([
1407
1388
  l({ type: String, reflect: !0 })
1408
- ], u.prototype, "label", 2);
1409
- p([
1389
+ ], p.prototype, "label", 2);
1390
+ u([
1410
1391
  l({ type: String })
1411
- ], u.prototype, "dateformat", 2);
1412
- p([
1392
+ ], p.prototype, "dateformat", 2);
1393
+ u([
1413
1394
  l({ type: Boolean, reflect: !0 })
1414
- ], u.prototype, "multiple", 2);
1415
- p([
1395
+ ], p.prototype, "multiple", 2);
1396
+ u([
1416
1397
  l({ type: Number, reflect: !0 })
1417
- ], u.prototype, "maxlength", 2);
1418
- p([
1398
+ ], p.prototype, "maxlength", 2);
1399
+ u([
1419
1400
  l({ type: Boolean, reflect: !0 })
1420
- ], u.prototype, "range", 2);
1421
- p([
1401
+ ], p.prototype, "range", 2);
1402
+ u([
1422
1403
  l({ type: Boolean })
1423
- ], u.prototype, "showRangeLabels", 2);
1424
- p([
1404
+ ], p.prototype, "showRangeLabels", 2);
1405
+ u([
1425
1406
  l({ type: String, reflect: !0 })
1426
- ], u.prototype, "min", 2);
1427
- p([
1407
+ ], p.prototype, "min", 2);
1408
+ u([
1428
1409
  l({ type: String, reflect: !0 })
1429
- ], u.prototype, "max", 2);
1430
- p([
1410
+ ], p.prototype, "max", 2);
1411
+ u([
1431
1412
  l({ type: Boolean })
1432
- ], u.prototype, "weeknumbers", 2);
1433
- p([
1413
+ ], p.prototype, "weeknumbers", 2);
1414
+ u([
1434
1415
  l({ type: Boolean, reflect: !0 })
1435
- ], u.prototype, "withcontrols", 2);
1436
- p([
1437
- l({ converter: W.csvToArray })
1438
- ], u.prototype, "excludedates", 2);
1439
- p([
1440
- l({ converter: W.csvToArray })
1441
- ], u.prototype, "excludeweekdays", 2);
1442
- p([
1416
+ ], p.prototype, "withcontrols", 2);
1417
+ u([
1418
+ l({ converter: H.csvToArray })
1419
+ ], p.prototype, "excludedates", 2);
1420
+ u([
1421
+ l({ converter: H.csvToArray })
1422
+ ], p.prototype, "excludeweekdays", 2);
1423
+ u([
1443
1424
  l({ type: String })
1444
- ], u.prototype, "currentmonth", 2);
1445
- p([
1425
+ ], p.prototype, "currentmonth", 2);
1426
+ u([
1446
1427
  l({ type: Boolean, reflect: !0 })
1447
- ], u.prototype, "calendarOpen", 2);
1448
- p([
1428
+ ], p.prototype, "calendarOpen", 2);
1429
+ u([
1449
1430
  l({ type: String })
1450
- ], u.prototype, "timezone", 2);
1451
- p([
1431
+ ], p.prototype, "timezone", 2);
1432
+ u([
1452
1433
  G()
1453
- ], u.prototype, "inputClasses", 2);
1454
- u = p([
1434
+ ], p.prototype, "inputClasses", 2);
1435
+ p = u([
1455
1436
  w("pkt-datepicker")
1456
- ], u);
1437
+ ], p);
1457
1438
  export {
1458
1439
  k as P,
1459
- u as a,
1460
- O as b,
1440
+ p as a,
1441
+ S as b,
1461
1442
  _ as c,
1462
1443
  T as d
1463
1444
  };