@oslokommune/punkt-elements 12.3.3 → 12.3.4

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 (40) hide show
  1. package/dist/{class-map-DfznHRRW.cjs → class-map-1LSYgumx.cjs} +1 -1
  2. package/dist/{class-map-CEzmgstO.js → class-map-QbdgvBsV.js} +1 -1
  3. package/dist/{index-BkqOsymS.cjs → index-B5_qWvbO.cjs} +5 -5
  4. package/dist/{index-BCVyjeWS.cjs → index-C7NOKSUx.cjs} +1 -1
  5. package/dist/{index-BkKs8Yam.js → index-C9AIH4rL.js} +101 -99
  6. package/dist/{index-CINnuWkG.js → index-CGGB6fVA.js} +58 -53
  7. package/dist/{index-CkBUiPHx.cjs → index-CSa2k4ML.cjs} +5 -5
  8. package/dist/{index-C7OaW8f8.js → index-t0H-gKGh.js} +1 -1
  9. package/dist/index.d.ts +1 -1
  10. package/dist/pkt-alert.cjs +1 -1
  11. package/dist/pkt-alert.js +4 -4
  12. package/dist/pkt-calendar.cjs +1 -1
  13. package/dist/pkt-calendar.js +4 -4
  14. package/dist/pkt-card.cjs +3 -3
  15. package/dist/pkt-card.js +9 -9
  16. package/dist/pkt-component-template.cjs +1 -1
  17. package/dist/pkt-component-template.js +3 -3
  18. package/dist/pkt-datepicker.cjs +31 -40
  19. package/dist/pkt-datepicker.js +65 -83
  20. package/dist/pkt-element.cjs +1 -1
  21. package/dist/pkt-element.js +1 -1
  22. package/dist/pkt-icon.cjs +1 -1
  23. package/dist/pkt-icon.js +2 -2
  24. package/dist/pkt-index.cjs +1 -1
  25. package/dist/pkt-index.js +2 -2
  26. package/dist/pkt-input-wrapper.cjs +1 -1
  27. package/dist/pkt-input-wrapper.js +4 -4
  28. package/dist/pkt-link.cjs +1 -1
  29. package/dist/pkt-link.js +4 -4
  30. package/dist/pkt-messagebox.cjs +1 -1
  31. package/dist/pkt-messagebox.js +4 -4
  32. package/dist/pkt-tag.cjs +1 -1
  33. package/dist/pkt-tag.js +4 -4
  34. package/dist/{ref-BkUqMgQu.cjs → ref-BK6FYWo3.cjs} +1 -1
  35. package/dist/{ref-Cau3ksvI.js → ref-v9geUvt6.js} +1 -1
  36. package/package.json +3 -3
  37. package/src/components/calendar/index.ts +19 -3
  38. package/src/components/card/index.ts +0 -1
  39. package/src/components/datepicker/index.ts +18 -21
  40. package/src/components/element/index.ts +15 -8
@@ -1,19 +1,19 @@
1
- import { R as K, a as z, k as P, D as N, n as y } from "./index-CINnuWkG.js";
1
+ import { R as K, a as z, k as P, D as N, n as y } from "./index-CGGB6fVA.js";
2
2
  import { e as Z, i as tt, a as et, t as nt } from "./directive-DA0-wdk7.js";
3
- import { u as at, c as M, a as S, p as F, d as rt, i as R, K as $ } from "./ref-Cau3ksvI.js";
4
- import { R as C } from "./class-map-CEzmgstO.js";
3
+ import { u as at, c as M, a as S, p as F, d as rt, i as C, K as D } from "./ref-v9geUvt6.js";
4
+ import { R } from "./class-map-QbdgvBsV.js";
5
5
  import { a as G } from "./converters-DNCwIFwr.js";
6
- import { s as it, t as k, c as _, m as st, a as ot, g as ut, b as lt, d as dt } from "./index-BkKs8Yam.js";
6
+ import { s as it, t as k, c as E, m as st, a as ot, g as ut, b as lt, d as dt } from "./index-C9AIH4rL.js";
7
7
  import "./pkt-input-wrapper.js";
8
- import "./index-C7OaW8f8.js";
8
+ import "./index-t0H-gKGh.js";
9
9
  import "./pkt-tag.js";
10
10
  function Y(t) {
11
11
  return it(t, { weekStartsOn: 1 });
12
12
  }
13
13
  function U(t) {
14
- const e = k(t), n = e.getFullYear(), a = _(t, 0);
14
+ const e = k(t), n = e.getFullYear(), a = E(t, 0);
15
15
  a.setFullYear(n + 1, 0, 4), a.setHours(0, 0, 0, 0);
16
- const r = Y(a), i = _(t, 0);
16
+ const r = Y(a), i = E(t, 0);
17
17
  i.setFullYear(n, 0, 4), i.setHours(0, 0, 0, 0);
18
18
  const s = Y(i);
19
19
  return e.getTime() >= r.getTime() ? n + 1 : e.getTime() >= s.getTime() ? n : n - 1;
@@ -41,7 +41,7 @@ function ct(t, e) {
41
41
  return Math.round((r - i) / st);
42
42
  }
43
43
  function ht(t) {
44
- const e = U(t), n = _(t, 0);
44
+ const e = U(t), n = E(t, 0);
45
45
  return n.setFullYear(e, 0, 4), n.setHours(0, 0, 0, 0), Y(n);
46
46
  }
47
47
  function mt(t) {
@@ -54,7 +54,7 @@ function ft(t) {
54
54
  return !isNaN(Number(e));
55
55
  }
56
56
  function pt(t) {
57
- const e = k(t), n = _(t, 0);
57
+ const e = k(t), n = E(t, 0);
58
58
  return n.setFullYear(e.getFullYear(), 0, 1), n.setHours(0, 0, 0, 0), n;
59
59
  }
60
60
  const gt = {
@@ -189,7 +189,7 @@ const Pt = {
189
189
  narrow: ["1", "2", "3", "4"],
190
190
  abbreviated: ["Q1", "Q2", "Q3", "Q4"],
191
191
  wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"]
192
- }, $t = {
192
+ }, Dt = {
193
193
  narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
194
194
  abbreviated: [
195
195
  "Jan",
@@ -219,7 +219,7 @@ const Pt = {
219
219
  "November",
220
220
  "December"
221
221
  ]
222
- }, Dt = {
222
+ }, Tt = {
223
223
  narrow: ["S", "M", "T", "W", "T", "F", "S"],
224
224
  short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
225
225
  abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
@@ -232,7 +232,7 @@ const Pt = {
232
232
  "Friday",
233
233
  "Saturday"
234
234
  ]
235
- }, Tt = {
235
+ }, $t = {
236
236
  narrow: {
237
237
  am: "a",
238
238
  pm: "p",
@@ -294,7 +294,7 @@ const Pt = {
294
294
  evening: "in the evening",
295
295
  night: "at night"
296
296
  }
297
- }, Rt = (t, e) => {
297
+ }, Ct = (t, e) => {
298
298
  const n = Number(t), a = n % 100;
299
299
  if (a > 20 || a < 10)
300
300
  switch (a % 10) {
@@ -306,8 +306,8 @@ const Pt = {
306
306
  return n + "rd";
307
307
  }
308
308
  return n + "th";
309
- }, Ct = {
310
- ordinalNumber: Rt,
309
+ }, Rt = {
310
+ ordinalNumber: Ct,
311
311
  era: W({
312
312
  values: Pt,
313
313
  defaultWidth: "wide"
@@ -318,26 +318,26 @@ const Pt = {
318
318
  argumentCallback: (t) => t - 1
319
319
  }),
320
320
  month: W({
321
- values: $t,
321
+ values: Dt,
322
322
  defaultWidth: "wide"
323
323
  }),
324
324
  day: W({
325
- values: Dt,
325
+ values: Tt,
326
326
  defaultWidth: "wide"
327
327
  }),
328
328
  dayPeriod: W({
329
- values: Tt,
329
+ values: $t,
330
330
  defaultWidth: "wide",
331
331
  formattingValues: St,
332
332
  defaultFormattingWidth: "wide"
333
333
  })
334
334
  };
335
- function E(t) {
335
+ function _(t) {
336
336
  return (e, n = {}) => {
337
337
  const a = n.width, r = a && t.matchPatterns[a] || t.matchPatterns[t.defaultMatchWidth], i = e.match(r);
338
338
  if (!i)
339
339
  return null;
340
- const s = i[0], d = a && t.parsePatterns[a] || t.parsePatterns[t.defaultParseWidth], g = Array.isArray(d) ? Et(d, (l) => l.test(s)) : (
340
+ const s = i[0], d = a && t.parsePatterns[a] || t.parsePatterns[t.defaultParseWidth], g = Array.isArray(d) ? _t(d, (l) => l.test(s)) : (
341
341
  // eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type
342
342
  Wt(d, (l) => l.test(s))
343
343
  );
@@ -355,12 +355,12 @@ function Wt(t, e) {
355
355
  if (Object.prototype.hasOwnProperty.call(t, n) && e(t[n]))
356
356
  return n;
357
357
  }
358
- function Et(t, e) {
358
+ function _t(t, e) {
359
359
  for (let n = 0; n < t.length; n++)
360
360
  if (e(t[n]))
361
361
  return n;
362
362
  }
363
- function _t(t) {
363
+ function Et(t) {
364
364
  return (e, n = {}) => {
365
365
  const a = e.match(t.matchPattern);
366
366
  if (!a) return null;
@@ -440,37 +440,37 @@ const Yt = /^(\d+)(th|st|nd|rd)?/i, Ft = /\d+/i, qt = {
440
440
  night: /night/i
441
441
  }
442
442
  }, Xt = {
443
- ordinalNumber: _t({
443
+ ordinalNumber: Et({
444
444
  matchPattern: Yt,
445
445
  parsePattern: Ft,
446
446
  valueCallback: (t) => parseInt(t, 10)
447
447
  }),
448
- era: E({
448
+ era: _({
449
449
  matchPatterns: qt,
450
450
  defaultMatchWidth: "wide",
451
451
  parsePatterns: It,
452
452
  defaultParseWidth: "any"
453
453
  }),
454
- quarter: E({
454
+ quarter: _({
455
455
  matchPatterns: Nt,
456
456
  defaultMatchWidth: "wide",
457
457
  parsePatterns: At,
458
458
  defaultParseWidth: "any",
459
459
  valueCallback: (t) => t + 1
460
460
  }),
461
- month: E({
461
+ month: _({
462
462
  matchPatterns: Bt,
463
463
  defaultMatchWidth: "wide",
464
464
  parsePatterns: Ht,
465
465
  defaultParseWidth: "any"
466
466
  }),
467
- day: E({
467
+ day: _({
468
468
  matchPatterns: jt,
469
469
  defaultMatchWidth: "wide",
470
470
  parsePatterns: Vt,
471
471
  defaultParseWidth: "any"
472
472
  }),
473
- dayPeriod: E({
473
+ dayPeriod: _({
474
474
  matchPatterns: Lt,
475
475
  defaultMatchWidth: "any",
476
476
  parsePatterns: Qt,
@@ -481,7 +481,7 @@ const Yt = /^(\d+)(th|st|nd|rd)?/i, Ft = /\d+/i, qt = {
481
481
  formatDistance: yt,
482
482
  formatLong: kt,
483
483
  formatRelative: Ot,
484
- localize: Ct,
484
+ localize: Rt,
485
485
  match: Xt,
486
486
  options: {
487
487
  weekStartsOn: 0,
@@ -554,7 +554,7 @@ const b = {
554
554
  );
555
555
  return o(r, e.length);
556
556
  }
557
- }, T = {
557
+ }, $ = {
558
558
  am: "am",
559
559
  pm: "pm",
560
560
  midnight: "midnight",
@@ -898,7 +898,7 @@ const b = {
898
898
  b: function(t, e, n) {
899
899
  const a = t.getHours();
900
900
  let r;
901
- switch (a === 12 ? r = T.noon : a === 0 ? r = T.midnight : r = a / 12 >= 1 ? "pm" : "am", e) {
901
+ switch (a === 12 ? r = $.noon : a === 0 ? r = $.midnight : r = a / 12 >= 1 ? "pm" : "am", e) {
902
902
  case "b":
903
903
  case "bb":
904
904
  return n.dayPeriod(r, {
@@ -927,7 +927,7 @@ const b = {
927
927
  B: function(t, e, n) {
928
928
  const a = t.getHours();
929
929
  let r;
930
- switch (a >= 17 ? r = T.evening : a >= 12 ? r = T.afternoon : a >= 4 ? r = T.morning : r = T.night, e) {
930
+ switch (a >= 17 ? r = $.evening : a >= 12 ? r = $.afternoon : a >= 4 ? r = $.morning : r = $.night, e) {
931
931
  case "B":
932
932
  case "BB":
933
933
  case "BBB":
@@ -992,11 +992,11 @@ const b = {
992
992
  return V(a);
993
993
  case "XXXX":
994
994
  case "XX":
995
- return D(a);
995
+ return T(a);
996
996
  case "XXXXX":
997
997
  case "XXX":
998
998
  default:
999
- return D(a, ":");
999
+ return T(a, ":");
1000
1000
  }
1001
1001
  },
1002
1002
  // Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)
@@ -1007,11 +1007,11 @@ const b = {
1007
1007
  return V(a);
1008
1008
  case "xxxx":
1009
1009
  case "xx":
1010
- return D(a);
1010
+ return T(a);
1011
1011
  case "xxxxx":
1012
1012
  case "xxx":
1013
1013
  default:
1014
- return D(a, ":");
1014
+ return T(a, ":");
1015
1015
  }
1016
1016
  },
1017
1017
  // Timezone (GMT)
@@ -1024,7 +1024,7 @@ const b = {
1024
1024
  return "GMT" + j(a, ":");
1025
1025
  case "OOOO":
1026
1026
  default:
1027
- return "GMT" + D(a, ":");
1027
+ return "GMT" + T(a, ":");
1028
1028
  }
1029
1029
  },
1030
1030
  // Timezone (specific non-location)
@@ -1037,7 +1037,7 @@ const b = {
1037
1037
  return "GMT" + j(a, ":");
1038
1038
  case "zzzz":
1039
1039
  default:
1040
- return "GMT" + D(a, ":");
1040
+ return "GMT" + T(a, ":");
1041
1041
  }
1042
1042
  },
1043
1043
  // Seconds timestamp
@@ -1056,9 +1056,9 @@ function j(t, e = "") {
1056
1056
  return i === 0 ? n + String(r) : n + String(r) + e + o(i, 2);
1057
1057
  }
1058
1058
  function V(t, e) {
1059
- return t % 60 === 0 ? (t > 0 ? "-" : "+") + o(Math.abs(t) / 60, 2) : D(t, e);
1059
+ return t % 60 === 0 ? (t > 0 ? "-" : "+") + o(Math.abs(t) / 60, 2) : T(t, e);
1060
1060
  }
1061
- function D(t, e = "") {
1061
+ function T(t, e = "") {
1062
1062
  const n = t > 0 ? "-" : "+", a = Math.abs(t), r = o(Math.trunc(a / 60), 2), i = o(a % 60, 2);
1063
1063
  return n + r + e + i;
1064
1064
  }
@@ -1411,7 +1411,7 @@ var ve = Object.defineProperty, we = Object.getOwnPropertyDescriptor, p = (t, e,
1411
1411
  const X = (t) => new Promise((e) => setTimeout(e, t));
1412
1412
  let m = class extends z {
1413
1413
  constructor() {
1414
- super(...arguments), this.value = "", this._value = this.value ? Array.isArray(this.value) ? this.value : this.value.split(",") : [], this.label = "Datovelger", this.helptext = "", this.helptextDropdown = "", this.helptextDropdownButton = w.props.helptextDropdownButton.default, this.dateformat = w.props.dateformat.default, this.multiple = w.props.multiple.default, this.maxlength = w.props.maxlength.default, this.range = w.props.range.default, this.weeknumbers = w.props.weeknumbers.default, this.withcontrols = w.props.withcontrols.default, this.fullwidth = !1, this.excludedates = [], this.excludeweekdays = [], this.currentmonth = this.formatISODate(/* @__PURE__ */ new Date()), this.calendarOpen = !1, this.inputRef = R(), this.inputRefTo = R(), this.btnRef = R(), this.calRef = R(), this.popupRef = R(), this.inputClasses = {
1414
+ super(...arguments), this.value = "", this._value = this.value ? Array.isArray(this.value) ? this.value : this.value.split(",") : [], this.label = "Datovelger", this.helptext = "", this.helptextDropdown = "", this.helptextDropdownButton = w.props.helptextDropdownButton.default, this.dateformat = w.props.dateformat.default, this.multiple = w.props.multiple.default, this.maxlength = w.props.maxlength.default, this.range = w.props.range.default, this.weeknumbers = w.props.weeknumbers.default, this.withcontrols = w.props.withcontrols.default, this.fullwidth = !1, this.excludedates = [], this.excludeweekdays = [], this.currentmonth = this.formatISODate(/* @__PURE__ */ new Date()), this.calendarOpen = !1, this.inputRef = C(), this.inputRefTo = C(), this.btnRef = C(), this.calRef = C(), this.popupRef = C(), this.inputClasses = {
1415
1415
  "pkt-input": !0,
1416
1416
  "pkt-datepicker__input": !0,
1417
1417
  "pkt-input--fullwidth": this.fullwidth
@@ -1433,7 +1433,7 @@ let m = class extends z {
1433
1433
  return this.multiple ? e : this.range ? e.slice(0, 2) : [e[0]];
1434
1434
  }, this.addToSelected = (t) => {
1435
1435
  const e = t.target, n = this.min ? new Date(this.min) : null, a = this.max ? new Date(this.max) : null, r = new Date(e.value.split(",")[0]);
1436
- r.setHours(12, 0, 0, 0), r && !isNaN(r.getTime()) && (!n || r >= n) && (!a || r <= a) && this.calRef.value && this.calRef.value.handleDateSelect(r), e.value = "", this.requestUpdate("value");
1436
+ r.setHours(12, 0, 0, 0), r && !isNaN(r.getTime()) && (!n || r >= n) && (!a || r <= a) && this.calRef.value && this.calRef.value.handleDateSelect(r), e.value = "";
1437
1437
  };
1438
1438
  }
1439
1439
  /**
@@ -1452,24 +1452,15 @@ let m = class extends z {
1452
1452
  });
1453
1453
  }
1454
1454
  attributeChangedCallback(t, e, n) {
1455
- var a, r;
1456
- if (super.attributeChangedCallback(t, e, n), t === "value") {
1457
- if (this.value === "" || this.value.length === 0)
1458
- this._value = [];
1459
- else if (this.value.length && this._value.length === 0) {
1460
- const i = Array.isArray(this.value) ? this.value : this.value.split(",");
1461
- for (const s of i)
1462
- s && !this._value.includes(s) && ((r = (a = this.calRef) == null ? void 0 : a.value) == null || r.handleDateSelect(this.fromISOToDate(s)));
1463
- }
1464
- }
1465
- t === "excludedates" && typeof this.excludedates == "string" && (this.excludedates = (n == null ? void 0 : n.split(",")) ?? []), t === "excludeweekdays" && typeof this.excludeweekdays == "string" && (this.excludeweekdays = (n == null ? void 0 : n.split(",")) ?? []);
1455
+ t === "value" && (this.value === "" || this.value.length === 0 || typeof this.value > "u" ? this._value = [] : this.value.length && this._value.length === 0 && (!Array.isArray(this.value) && this.value.includes(",") && (this.value = this.value.split(",")), this._value = Array.isArray(this.value) ? this.value : this.value.split(","))), t === "excludedates" && typeof this.excludedates == "string" && (this.excludedates = (n == null ? void 0 : n.split(",")) ?? []), t === "excludeweekdays" && typeof this.excludeweekdays == "string" && (this.excludeweekdays = (n == null ? void 0 : n.split(",")) ?? []), super.attributeChangedCallback(t, e, n);
1466
1456
  }
1467
1457
  firstUpdated(t) {
1468
1458
  super.firstUpdated(t);
1469
1459
  }
1470
1460
  updated(t) {
1461
+ var e;
1471
1462
  if (super.updated(t), t.has("value")) {
1472
- if (this.range && this._value.length === 1)
1463
+ if (this.range && this._value.length === 1 || ((e = t.get("value")) == null ? void 0 : e.toString()) === this.value.toString())
1473
1464
  return;
1474
1465
  this.onInput(this.value);
1475
1466
  }
@@ -1483,16 +1474,14 @@ let m = class extends z {
1483
1474
  renderInput() {
1484
1475
  return P`
1485
1476
  <input
1486
- class="${C(this.inputClasses)}"
1477
+ class="${R(this.inputClasses)}"
1487
1478
  type="date"
1488
1479
  id="${this.id}-input"
1489
- name="${this.name}"
1490
- .value=${this.value}
1480
+ value=${this.value}
1491
1481
  min=${this.min}
1492
1482
  max=${this.max}
1493
- @focus=${this.showCalendar}
1494
1483
  @click=${(t) => {
1495
- t.preventDefault();
1484
+ t.preventDefault(), this.showCalendar();
1496
1485
  }}
1497
1486
  ?disabled=${this.disabled}
1498
1487
  @blur=${(t) => {
@@ -1501,7 +1490,7 @@ let m = class extends z {
1501
1490
  @change=${(t) => {
1502
1491
  t.stopImmediatePropagation();
1503
1492
  }}
1504
- ${$(this.inputRef)}
1493
+ ${D(this.inputRef)}
1505
1494
  />
1506
1495
  `;
1507
1496
  }
@@ -1509,16 +1498,14 @@ let m = class extends z {
1509
1498
  return P`
1510
1499
  <div class="pkt-input-prefix">Fra</div>
1511
1500
  <input
1512
- class=${C(this.inputClasses)}
1501
+ class=${R(this.inputClasses)}
1513
1502
  type="date"
1514
1503
  id="${this.id}-input"
1515
- name="${this.name}"
1516
- .value=${this._value[0] ?? ""}
1504
+ value=${this._value[0] ?? ""}
1517
1505
  min=${this.min}
1518
1506
  max=${this.max}
1519
- @focus=${this.showCalendar}
1520
1507
  @click=${(t) => {
1521
- t.preventDefault();
1508
+ t.preventDefault(), this.showCalendar();
1522
1509
  }}
1523
1510
  ?disabled=${this.disabled}
1524
1511
  @blur=${(t) => {
@@ -1526,26 +1513,24 @@ let m = class extends z {
1526
1513
  if (t.target.value) {
1527
1514
  this.manageValidity(t.target);
1528
1515
  const a = this.fromISOToDate(t.target.value);
1529
- a && ((n = (e = this.calRef) == null ? void 0 : e.value) == null || n.handleDateSelect(a));
1516
+ a && this._value[0] !== t.target.value && this._value[1] && ((n = (e = this.calRef) == null ? void 0 : e.value) == null || n.handleDateSelect(a));
1530
1517
  }
1531
1518
  }}
1532
1519
  @change=${(t) => {
1533
1520
  t.stopImmediatePropagation();
1534
1521
  }}
1535
- ${$(this.inputRef)}
1522
+ ${D(this.inputRef)}
1536
1523
  />
1537
1524
  <div class="pkt-input-prefix">Til</div>
1538
1525
  <input
1539
- class=${C(this.inputClasses)}
1526
+ class=${R(this.inputClasses)}
1540
1527
  type="date"
1541
1528
  id="${this.id}-to"
1542
- name="${this.name}-to"
1543
- .value=${this._value[1] ?? ""}
1529
+ value=${this._value[1] ?? ""}
1544
1530
  min=${this.min}
1545
1531
  max=${this.max}
1546
- @focus=${this.showCalendar}
1547
1532
  @click=${(t) => {
1548
- t.preventDefault();
1533
+ t.preventDefault(), this.showCalendar();
1549
1534
  }}
1550
1535
  ?disabled=${this.disabled}
1551
1536
  @blur=${(t) => {
@@ -1569,22 +1554,20 @@ let m = class extends z {
1569
1554
  @change=${(t) => {
1570
1555
  t.stopImmediatePropagation();
1571
1556
  }}
1572
- ${$(this.inputRefTo)}
1557
+ ${D(this.inputRefTo)}
1573
1558
  />
1574
1559
  `;
1575
1560
  }
1576
1561
  renderMultipleInput() {
1577
1562
  return P`
1578
1563
  <input
1579
- class=${C(this.inputClasses)}
1564
+ class=${R(this.inputClasses)}
1580
1565
  type="date"
1581
1566
  id="${this.id}-input"
1582
- name="${this.name}"
1583
1567
  min=${this.min}
1584
1568
  max=${this.max}
1585
- @focus=${this.showCalendar}
1586
1569
  @click=${(t) => {
1587
- t.preventDefault();
1570
+ t.preventDefault(), this.showCalendar();
1588
1571
  }}
1589
1572
  @blur=${(t) => {
1590
1573
  this.addToSelected(t);
@@ -1596,7 +1579,7 @@ let m = class extends z {
1596
1579
  @change=${(t) => {
1597
1580
  t.stopImmediatePropagation();
1598
1581
  }}
1599
- ${$(this.inputRef)}
1582
+ ${D(this.inputRef)}
1600
1583
  />
1601
1584
  `;
1602
1585
  }
@@ -1626,14 +1609,13 @@ let m = class extends z {
1626
1609
  class="pkt-calendar-popup pkt-${this.calendarOpen ? "show" : "hide"}"
1627
1610
  @focusout=${this.handleFocusOut}
1628
1611
  id="${this.id}-popup"
1629
- ${$(this.popupRef)}
1612
+ ${D(this.popupRef)}
1630
1613
  >
1631
1614
  <pkt-calendar
1632
1615
  ?multiple=${this.multiple}
1633
1616
  ?range=${this.range}
1634
1617
  ?weeknumbers=${this.weeknumbers}
1635
1618
  ?withcontrols=${this.withcontrols}
1636
- ?focused=${this.calendarOpen}
1637
1619
  .maxMultiple=${this.maxlength}
1638
1620
  .selected=${this._value}
1639
1621
  .earliest=${this.min}
@@ -1645,7 +1627,7 @@ let m = class extends z {
1645
1627
  this.value = !this.multiple && !this.range ? Array.isArray(t.detail) ? t.detail[0] : t.detail.split(",")[0] : t.detail, this._value = t.detail, this.inputRef.value && (this.range && this.inputRefTo.value ? (this.inputRef.value.value = this._value[0] ?? "", this.inputRefTo.value.value = this._value[1] ?? "") : this.multiple || (this.inputRef.value.value = this._value.length ? this._value[0] : ""));
1646
1628
  }}
1647
1629
  @close=${this.hideCalendar}
1648
- ${$(this.calRef)}
1630
+ ${D(this.calRef)}
1649
1631
  ></pkt-calendar>
1650
1632
  </div>`;
1651
1633
  }
@@ -1675,9 +1657,9 @@ let m = class extends z {
1675
1657
  <div class="pkt-input__container">
1676
1658
  ${this.range ? this.renderRangeInput() : this.multiple ? this.renderMultipleInput() : this.renderInput()}
1677
1659
  <button
1678
- class="${C(this.buttonClasses)}"
1660
+ class="${R(this.buttonClasses)}"
1679
1661
  @click=${this.toggleCalendar}
1680
- ${$(this.btnRef)}
1662
+ ${D(this.btnRef)}
1681
1663
  >
1682
1664
  <pkt-icon name="calendar"></pkt-icon>
1683
1665
  <span class="pkt-btn__text">${this.strings.calendar.buttonAltText}</span>
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-CkBUiPHx.cjs");exports.PktElement=e.PktElement;exports.PktInputElement=e.PktInputElement;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-CSa2k4ML.cjs");exports.PktElement=e.PktElement;exports.PktInputElement=e.PktInputElement;
@@ -1,4 +1,4 @@
1
- import { P as a, a as m } from "./index-CINnuWkG.js";
1
+ import { P as a, a as m } from "./index-CGGB6fVA.js";
2
2
  export {
3
3
  a as PktElement,
4
4
  m as PktInputElement
package/dist/pkt-icon.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("./index-CkBUiPHx.cjs");require("./directive-19_ixLKS.cjs");const e=require("./index-BCVyjeWS.cjs");Object.defineProperty(exports,"PktIcon",{enumerable:!0,get:()=>e.PktIcon});
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("./index-CSa2k4ML.cjs");require("./directive-19_ixLKS.cjs");const e=require("./index-C7NOKSUx.cjs");Object.defineProperty(exports,"PktIcon",{enumerable:!0,get:()=>e.PktIcon});
package/dist/pkt-icon.js CHANGED
@@ -1,6 +1,6 @@
1
- import "./index-CINnuWkG.js";
1
+ import "./index-CGGB6fVA.js";
2
2
  import "./directive-DA0-wdk7.js";
3
- import { P as p } from "./index-C7OaW8f8.js";
3
+ import { P as p } from "./index-t0H-gKGh.js";
4
4
  export {
5
5
  p as PktIcon
6
6
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-BkqOsymS.cjs"),t=require("./pkt-card.cjs"),r=require("./pkt-component-template.cjs"),n=require("./pkt-datepicker.cjs"),o=require("./index-BCVyjeWS.cjs"),a=require("./pkt-input-wrapper.cjs"),u=require("./pkt-link.cjs"),c=require("./pkt-messagebox.cjs"),i=require("./pkt-tag.cjs");Object.defineProperty(exports,"PktCalendar",{enumerable:!0,get:()=>e.PktCalendar});Object.defineProperty(exports,"PktCard",{enumerable:!0,get:()=>t.PktCard});Object.defineProperty(exports,"PktComponent",{enumerable:!0,get:()=>r.PktComponent});Object.defineProperty(exports,"PktDatepicker",{enumerable:!0,get:()=>n.PktDatepicker});Object.defineProperty(exports,"PktIcon",{enumerable:!0,get:()=>o.PktIcon});Object.defineProperty(exports,"PktInputWrapper",{enumerable:!0,get:()=>a.PktInputWrapper});Object.defineProperty(exports,"PktLink",{enumerable:!0,get:()=>u.PktLink});Object.defineProperty(exports,"PktMessagebox",{enumerable:!0,get:()=>c.PktMessagebox});Object.defineProperty(exports,"PktTag",{enumerable:!0,get:()=>i.PktTag});
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-B5_qWvbO.cjs"),t=require("./pkt-card.cjs"),r=require("./pkt-component-template.cjs"),n=require("./pkt-datepicker.cjs"),o=require("./index-C7NOKSUx.cjs"),a=require("./pkt-input-wrapper.cjs"),u=require("./pkt-link.cjs"),c=require("./pkt-messagebox.cjs"),i=require("./pkt-tag.cjs");Object.defineProperty(exports,"PktCalendar",{enumerable:!0,get:()=>e.PktCalendar});Object.defineProperty(exports,"PktCard",{enumerable:!0,get:()=>t.PktCard});Object.defineProperty(exports,"PktComponent",{enumerable:!0,get:()=>r.PktComponent});Object.defineProperty(exports,"PktDatepicker",{enumerable:!0,get:()=>n.PktDatepicker});Object.defineProperty(exports,"PktIcon",{enumerable:!0,get:()=>o.PktIcon});Object.defineProperty(exports,"PktInputWrapper",{enumerable:!0,get:()=>a.PktInputWrapper});Object.defineProperty(exports,"PktLink",{enumerable:!0,get:()=>u.PktLink});Object.defineProperty(exports,"PktMessagebox",{enumerable:!0,get:()=>c.PktMessagebox});Object.defineProperty(exports,"PktTag",{enumerable:!0,get:()=>i.PktTag});
package/dist/pkt-index.js CHANGED
@@ -1,8 +1,8 @@
1
- import { P as t } from "./index-BkKs8Yam.js";
1
+ import { P as t } from "./index-C9AIH4rL.js";
2
2
  import { PktCard as p } from "./pkt-card.js";
3
3
  import { PktComponent as P } from "./pkt-component-template.js";
4
4
  import { PktDatepicker as x } from "./pkt-datepicker.js";
5
- import { P as f } from "./index-C7OaW8f8.js";
5
+ import { P as f } from "./index-t0H-gKGh.js";
6
6
  import { PktInputWrapper as s } from "./pkt-input-wrapper.js";
7
7
  import { PktLink as c } from "./pkt-link.js";
8
8
  import { PktMessagebox as g } from "./pkt-messagebox.js";
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-CkBUiPHx.cjs"),f=require("./ref-BkUqMgQu.cjs"),c=require("./index-BCVyjeWS.cjs"),u=require("./class-map-DfznHRRW.cjs"),$=require("./directive-19_ixLKS.cjs");/**
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-CSa2k4ML.cjs"),f=require("./ref-BK6FYWo3.cjs"),c=require("./index-C7NOKSUx.cjs"),u=require("./class-map-1LSYgumx.cjs"),$=require("./directive-19_ixLKS.cjs");/**
2
2
  * @license
3
3
  * Copyright 2020 Google LLC
4
4
  * SPDX-License-Identifier: BSD-3-Clause
@@ -1,7 +1,7 @@
1
- import { P as w, v as T, D as o, k as i, n as r } from "./index-CINnuWkG.js";
2
- import { i as _, P as D, K as I } from "./ref-Cau3ksvI.js";
3
- import { a as f } from "./index-C7OaW8f8.js";
4
- import { R as c } from "./class-map-CEzmgstO.js";
1
+ import { P as w, v as T, D as o, k as i, n as r } from "./index-CGGB6fVA.js";
2
+ import { i as _, P as D, K as I } from "./ref-v9geUvt6.js";
3
+ import { a as f } from "./index-t0H-gKGh.js";
4
+ import { R as c } from "./class-map-QbdgvBsV.js";
5
5
  import { t as S } from "./directive-DA0-wdk7.js";
6
6
  /**
7
7
  * @license
package/dist/pkt-link.cjs CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-CkBUiPHx.cjs"),c=require("./ref-BkUqMgQu.cjs"),k=require("./class-map-DfznHRRW.cjs"),h=require("./directive-19_ixLKS.cjs");require("./index-BCVyjeWS.cjs");const f="pkt-link",u=!0,d={href:{name:"URL",description:"URL til lenken",type:"string",default:"#"},target:{name:"Mål",description:"Mål for lenken",type:["_blank","_self","_parent","_top"],default:"_self"},iconName:{name:"Ikon",description:"Ikon som skal vises ved siden av lenketeksten",type:"icon"},iconPosition:{name:"Ikonposisjon",description:"Posisjonen til ikonet i forhold til lenketeksten",type:["left","right"]},external:{name:"Ekstern lenke",description:"Vis ikon for ekstern lenke",type:"boolean",default:!1}},m={default:{description:"Innholdet i lenken"}},p={name:f,"css-class":"pkt-link","dark-mode":!0,isElement:u,props:d,slots:m};var P=Object.defineProperty,y=Object.getOwnPropertyDescriptor,i=(s,n,r,o)=>{for(var t=o>1?void 0:o?y(n,r):n,l=s.length-1,a;l>=0;l--)(a=s[l])&&(t=(o?a(n,r,t):a(t))||t);return o&&t&&P(n,r,t),t};exports.PktLink=class extends e.PktElement{constructor(){super(),this.defaultSlot=c.ii(),this.href=p.props.href.default,this.iconName=void 0,this.iconPosition=void 0,this.external=p.props.external.default,this.target=p.props.target.default,this.slotController=new c.PktSlotController(this,this.defaultSlot)}render(){const n={"pkt-link":!0,"pkt-link--icon-left":!!this.iconName&&this.iconPosition==="left"||!!(this.iconName&&!this.iconPosition),"pkt-link--icon-right":!!this.iconName&&this.iconPosition==="right","pkt-link--external":this.external};return e.ke`<a
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-CSa2k4ML.cjs"),c=require("./ref-BK6FYWo3.cjs"),k=require("./class-map-1LSYgumx.cjs"),h=require("./directive-19_ixLKS.cjs");require("./index-C7NOKSUx.cjs");const f="pkt-link",u=!0,d={href:{name:"URL",description:"URL til lenken",type:"string",default:"#"},target:{name:"Mål",description:"Mål for lenken",type:["_blank","_self","_parent","_top"],default:"_self"},iconName:{name:"Ikon",description:"Ikon som skal vises ved siden av lenketeksten",type:"icon"},iconPosition:{name:"Ikonposisjon",description:"Posisjonen til ikonet i forhold til lenketeksten",type:["left","right"]},external:{name:"Ekstern lenke",description:"Vis ikon for ekstern lenke",type:"boolean",default:!1}},m={default:{description:"Innholdet i lenken"}},p={name:f,"css-class":"pkt-link","dark-mode":!0,isElement:u,props:d,slots:m};var P=Object.defineProperty,y=Object.getOwnPropertyDescriptor,i=(s,n,r,o)=>{for(var t=o>1?void 0:o?y(n,r):n,l=s.length-1,a;l>=0;l--)(a=s[l])&&(t=(o?a(n,r,t):a(t))||t);return o&&t&&P(n,r,t),t};exports.PktLink=class extends e.PktElement{constructor(){super(),this.defaultSlot=c.ii(),this.href=p.props.href.default,this.iconName=void 0,this.iconPosition=void 0,this.external=p.props.external.default,this.target=p.props.target.default,this.slotController=new c.PktSlotController(this,this.defaultSlot)}render(){const n={"pkt-link":!0,"pkt-link--icon-left":!!this.iconName&&this.iconPosition==="left"||!!(this.iconName&&!this.iconPosition),"pkt-link--icon-right":!!this.iconName&&this.iconPosition==="right","pkt-link--external":this.external};return e.ke`<a
2
2
  class=${k.Rt(n)}
3
3
  href=${this.href}
4
4
  @click=${this.handleClick}
package/dist/pkt-link.js CHANGED
@@ -1,8 +1,8 @@
1
- import { P as f, k, D as h, n as i } from "./index-CINnuWkG.js";
2
- import { i as m, P as d, K as u } from "./ref-Cau3ksvI.js";
3
- import { R as P } from "./class-map-CEzmgstO.js";
1
+ import { P as f, k, D as h, n as i } from "./index-CGGB6fVA.js";
2
+ import { i as m, P as d, K as u } from "./ref-v9geUvt6.js";
3
+ import { R as P } from "./class-map-QbdgvBsV.js";
4
4
  import { t as y } from "./directive-DA0-wdk7.js";
5
- import "./index-C7OaW8f8.js";
5
+ import "./index-t0H-gKGh.js";
6
6
  const g = "pkt-link", v = !0, _ = {
7
7
  href: {
8
8
  name: "URL",
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-CkBUiPHx.cjs"),c=require("./ref-BkUqMgQu.cjs"),p=require("./class-map-DfznHRRW.cjs"),b=require("./directive-19_ixLKS.cjs");require("./index-BCVyjeWS.cjs");var k=Object.defineProperty,u=Object.getOwnPropertyDescriptor,s=(i,o,r,l)=>{for(var t=l>1?void 0:l?u(o,r):o,a=i.length-1,n;a>=0;a--)(n=i[a])&&(t=(l?n(o,r,t):n(t))||t);return l&&t&&k(o,r,t),t};exports.PktMessagebox=class extends e.PktElement{constructor(){super(),this.defaultSlot=c.ii(),this.closable=!1,this.compact=!1,this.title="",this.skin="beige",this.isDisplayed=!0,this.slotController=new c.PktSlotController(this,this.defaultSlot)}handleClose(){this.isDisplayed=!1,this.onClose&&this.onClose()}render(){const o={"pkt-messagebox":!0,"pkt-messagebox--compact":this.compact,[`pkt-messagebox--${this.skin}`]:this.skin,"pkt-messagebox--closable":this.closable};return this.isDisplayed?e.ke`<div class=${p.Rt(o)}>
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-CSa2k4ML.cjs"),c=require("./ref-BK6FYWo3.cjs"),p=require("./class-map-1LSYgumx.cjs"),b=require("./directive-19_ixLKS.cjs");require("./index-C7NOKSUx.cjs");var k=Object.defineProperty,u=Object.getOwnPropertyDescriptor,s=(i,o,r,l)=>{for(var t=l>1?void 0:l?u(o,r):o,a=i.length-1,n;a>=0;a--)(n=i[a])&&(t=(l?n(o,r,t):n(t))||t);return l&&t&&k(o,r,t),t};exports.PktMessagebox=class extends e.PktElement{constructor(){super(),this.defaultSlot=c.ii(),this.closable=!1,this.compact=!1,this.title="",this.skin="beige",this.isDisplayed=!0,this.slotController=new c.PktSlotController(this,this.defaultSlot)}handleClose(){this.isDisplayed=!1,this.onClose&&this.onClose()}render(){const o={"pkt-messagebox":!0,"pkt-messagebox--compact":this.compact,[`pkt-messagebox--${this.skin}`]:this.skin,"pkt-messagebox--closable":this.closable};return this.isDisplayed?e.ke`<div class=${p.Rt(o)}>
2
2
  ${this.closable?e.ke`<div class="pkt-messagebox__close">
3
3
  <button
4
4
  @click=${this.handleClose}
@@ -1,8 +1,8 @@
1
- import { P as m, D as c, k as h, n as o } from "./index-CINnuWkG.js";
2
- import { i as b, P as f, K as k } from "./ref-Cau3ksvI.js";
3
- import { R as u } from "./class-map-CEzmgstO.js";
1
+ import { P as m, D as c, k as h, n as o } from "./index-CGGB6fVA.js";
2
+ import { i as b, P as f, K as k } from "./ref-v9geUvt6.js";
3
+ import { R as u } from "./class-map-QbdgvBsV.js";
4
4
  import { t as y } from "./directive-DA0-wdk7.js";
5
- import "./index-C7OaW8f8.js";
5
+ import "./index-t0H-gKGh.js";
6
6
  var d = Object.defineProperty, v = Object.getOwnPropertyDescriptor, s = (l, i, p, r) => {
7
7
  for (var e = r > 1 ? void 0 : r ? v(i, p) : i, a = l.length - 1, n; a >= 0; a--)
8
8
  (n = l[a]) && (e = (r ? n(i, p, e) : n(e)) || e);
package/dist/pkt-tag.cjs CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./class-map-DfznHRRW.cjs"),g=require("./directive-19_ixLKS.cjs"),t=require("./index-CkBUiPHx.cjs"),o=require("./ref-BkUqMgQu.cjs");require("./index-BCVyjeWS.cjs");const h="pkt-tag",k={closeTag:{type:"boolean",required:!1,default:!1},size:{required:!1,default:"medium",type:["small","medium","large"]},iconName:{type:"string",required:!1},skin:{required:!1,default:"blue",type:["blue","green","red","beige","yellow","gray","blue-light"]},textStyle:{required:!1,default:"normal-text",type:["thin-text","normal-text"]},type:{required:!1,default:"button",type:["button","submit","reset"]},ariaLabel:{type:"string",required:!1,default:"close"}},f={default:{description:"Teksten til tag"}},a={name:h,"css-class":"pkt-tag",props:k,slots:f};var d=Object.defineProperty,y=Object.getOwnPropertyDescriptor,e=(n,s,r,l)=>{for(var i=l>1?void 0:l?y(s,r):s,p=n.length-1,c;p>=0;p--)(c=n[p])&&(i=(l?c(s,r,i):c(i))||i);return l&&i&&d(s,r,i),i};exports.PktTag=class extends t.PktElement{constructor(){super(),this.defaultSlot=o.ii(),this.closeTag=a.props.closeTag.default,this.size=a.props.size.default,this.skin=a.props.skin.default,this.textStyle=a.props.textStyle.default,this.iconName=void 0,this.type=a.props.type.default,this.ariaLabel=a.props.ariaLabel.default,this._isClosed=!1,this.close=s=>{this._isClosed=!0,this.dispatchEvent(new CustomEvent("onClose",{detail:{origin:s},bubbles:!0,composed:!0}))},this.slotController=new o.PktSlotController(this,this.defaultSlot),this._isClosed=!1}render(){const s={"pkt-tag":!0,[`pkt-tag--${this.size}`]:!!this.size,[`pkt-tag--${this.skin}`]:!!this.skin,[`pkt-tag--${this.textStyle}`]:!!this.textStyle},r={"pkt-tag":!0,"pkt-btn":!0,"pkt-btn--tertiary":!0,[`pkt-tag--${this.size}`]:!!this.size,[`pkt-tag--${this.skin}`]:!!this.skin,[`pkt-tag--${this.textStyle}`]:!!this.textStyle,"pkt-btn--icons-right-and-left":this.closeTag&&!!this.iconName};return this.closeTag?this._isClosed?t.D:t.ke`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./class-map-1LSYgumx.cjs"),g=require("./directive-19_ixLKS.cjs"),t=require("./index-CSa2k4ML.cjs"),o=require("./ref-BK6FYWo3.cjs");require("./index-C7NOKSUx.cjs");const h="pkt-tag",k={closeTag:{type:"boolean",required:!1,default:!1},size:{required:!1,default:"medium",type:["small","medium","large"]},iconName:{type:"string",required:!1},skin:{required:!1,default:"blue",type:["blue","green","red","beige","yellow","gray","blue-light"]},textStyle:{required:!1,default:"normal-text",type:["thin-text","normal-text"]},type:{required:!1,default:"button",type:["button","submit","reset"]},ariaLabel:{type:"string",required:!1,default:"close"}},f={default:{description:"Teksten til tag"}},a={name:h,"css-class":"pkt-tag",props:k,slots:f};var d=Object.defineProperty,y=Object.getOwnPropertyDescriptor,e=(n,s,r,l)=>{for(var i=l>1?void 0:l?y(s,r):s,p=n.length-1,c;p>=0;p--)(c=n[p])&&(i=(l?c(s,r,i):c(i))||i);return l&&i&&d(s,r,i),i};exports.PktTag=class extends t.PktElement{constructor(){super(),this.defaultSlot=o.ii(),this.closeTag=a.props.closeTag.default,this.size=a.props.size.default,this.skin=a.props.skin.default,this.textStyle=a.props.textStyle.default,this.iconName=void 0,this.type=a.props.type.default,this.ariaLabel=a.props.ariaLabel.default,this._isClosed=!1,this.close=s=>{this._isClosed=!0,this.dispatchEvent(new CustomEvent("onClose",{detail:{origin:s},bubbles:!0,composed:!0}))},this.slotController=new o.PktSlotController(this,this.defaultSlot),this._isClosed=!1}render(){const s={"pkt-tag":!0,[`pkt-tag--${this.size}`]:!!this.size,[`pkt-tag--${this.skin}`]:!!this.skin,[`pkt-tag--${this.textStyle}`]:!!this.textStyle},r={"pkt-tag":!0,"pkt-btn":!0,"pkt-btn--tertiary":!0,[`pkt-tag--${this.size}`]:!!this.size,[`pkt-tag--${this.skin}`]:!!this.skin,[`pkt-tag--${this.textStyle}`]:!!this.textStyle,"pkt-btn--icons-right-and-left":this.closeTag&&!!this.iconName};return this.closeTag?this._isClosed?t.D:t.ke`
2
2
  <button
3
3
  class=${u.Rt(r)}
4
4
  type=${this.type}
package/dist/pkt-tag.js CHANGED
@@ -1,8 +1,8 @@
1
- import { R as h } from "./class-map-CEzmgstO.js";
1
+ import { R as h } from "./class-map-QbdgvBsV.js";
2
2
  import { t as y } from "./directive-DA0-wdk7.js";
3
- import { r as d, P as g, k as p, D as k, n as i } from "./index-CINnuWkG.js";
4
- import { i as m, P as b, K as f } from "./ref-Cau3ksvI.js";
5
- import "./index-C7OaW8f8.js";
3
+ import { r as d, P as g, k as p, D as k, n as i } from "./index-CGGB6fVA.js";
4
+ import { i as m, P as b, K as f } from "./ref-v9geUvt6.js";
5
+ import "./index-t0H-gKGh.js";
6
6
  const S = "pkt-tag", _ = {
7
7
  closeTag: {
8
8
  type: "boolean",
@@ -1,4 +1,4 @@
1
- "use strict";const a=require("./index-CkBUiPHx.cjs"),$=require("./directive-19_ixLKS.cjs");class p{constructor(e,...s){this.nodes=[],this.host=e,this.host.addController(this),this.slots=s,this.nodes=[]}hostConnected(){Array.from(this.host.childNodes).forEach(e=>{var s;if(e.nodeName==="#text"){if((s=e.nodeValue)!=null&&s.trim()){const i=document==null?void 0:document.createElement("template");i.content.appendChild(e),this.nodes.push(i)}}else this.nodes.push(e)})}hostUpdated(){this.slots.forEach(e=>{if(!e.value)return;const s=e.value.getAttribute("name"),i=this.nodes.flatMap(n=>n.getAttribute&&n.getAttribute("slot")==s?this.nodeFromElement(n,e):[]);i.length&&e.value.replaceChildren(...i)})}nodeFromElement(e,s){var i;return e===((i=s.value)==null?void 0:i.parentNode)?[]:e instanceof HTMLTemplateElement?Array.from(e.content.childNodes):e}}/**
1
+ "use strict";const a=require("./index-CSa2k4ML.cjs"),$=require("./directive-19_ixLKS.cjs");class p{constructor(e,...s){this.nodes=[],this.host=e,this.host.addController(this),this.slots=s,this.nodes=[]}hostConnected(){Array.from(this.host.childNodes).forEach(e=>{var s;if(e.nodeName==="#text"){if((s=e.nodeValue)!=null&&s.trim()){const i=document==null?void 0:document.createElement("template");i.content.appendChild(e),this.nodes.push(i)}}else this.nodes.push(e)})}hostUpdated(){this.slots.forEach(e=>{if(!e.value)return;const s=e.value.getAttribute("name"),i=this.nodes.flatMap(n=>n.getAttribute&&n.getAttribute("slot")==s?this.nodeFromElement(n,e):[]);i.length&&e.value.replaceChildren(...i)})}nodeFromElement(e,s){var i;return e===((i=s.value)==null?void 0:i.parentNode)?[]:e instanceof HTMLTemplateElement?Array.from(e.content.childNodes):e}}/**
2
2
  * @license
3
3
  * Copyright 2020 Google LLC
4
4
  * SPDX-License-Identifier: BSD-3-Clause
@@ -1,4 +1,4 @@
1
- import { s as p, D as _ } from "./index-CINnuWkG.js";
1
+ import { s as p, D as _ } from "./index-CGGB6fVA.js";
2
2
  import { i as v, a as m, e as g } from "./directive-DA0-wdk7.js";
3
3
  class H {
4
4
  constructor(e, ...s) {