@oslokommune/punkt-elements 12.17.0 → 12.17.2
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.
- package/dist/{class-map-d4EVPLBg.js → class-map-CBvUV2N3.js} +1 -1
- package/dist/{class-map-C92zObAn.cjs → class-map-a5HUzP83.cjs} +1 -1
- package/dist/{helptext-P1rM1x3p.js → helptext-DBolvFI4.js} +3 -3
- package/dist/{helptext-CquaEC6K.cjs → helptext-_fMLOOCL.cjs} +1 -1
- package/dist/{index-BXyp3qCS.js → index-CFDwiDTU.js} +349 -337
- package/dist/{index-BsgcXRmM.cjs → index-CR7t1zY9.cjs} +29 -29
- package/dist/{index-D2toJo-e.cjs → index-CmTjXoAb.cjs} +1 -1
- package/dist/{index-CPB5TLrS.js → index-D2jSRMrn.js} +6 -6
- package/dist/{index-BPPtpQWt.js → index-RwtTBIhT.js} +1 -1
- package/dist/{index-BPXZmGWV.cjs → index-tvpcg-ad.cjs} +4 -4
- package/dist/index.d.ts +5 -0
- package/dist/{input-wrapper-BbLHt2GC.js → input-wrapper-6vTrKtsW.js} +5 -5
- package/dist/{input-wrapper-Bv0JBG3z.cjs → input-wrapper-DX41tnbj.cjs} +1 -1
- package/dist/{linkcard-Gc0adgx0.js → linkcard-BlWQ8jOv.js} +3 -3
- package/dist/{linkcard-nkS6ET7M.cjs → linkcard-Det6CJ5D.cjs} +1 -1
- package/dist/{modal-Dq7JVtPA.js → modal-3OZTPqee.js} +4 -4
- package/dist/{modal-D_7T-rg0.cjs → modal-DYTVJjYh.cjs} +1 -1
- package/dist/pkt-alert.cjs +1 -1
- package/dist/pkt-alert.js +4 -4
- package/dist/pkt-calendar.cjs +1 -1
- package/dist/pkt-calendar.js +4 -4
- package/dist/pkt-card.cjs +1 -1
- package/dist/pkt-card.js +4 -4
- package/dist/pkt-component-template.cjs +1 -1
- package/dist/pkt-component-template.js +3 -3
- package/dist/pkt-datepicker.cjs +4 -5
- package/dist/pkt-datepicker.js +52 -53
- package/dist/pkt-element.cjs +1 -1
- package/dist/pkt-element.js +1 -1
- package/dist/pkt-helptext.cjs +1 -1
- package/dist/pkt-helptext.js +1 -1
- package/dist/pkt-icon.cjs +1 -1
- package/dist/pkt-icon.js +2 -2
- package/dist/pkt-index.cjs +1 -1
- package/dist/pkt-index.js +8 -8
- package/dist/pkt-input-wrapper.cjs +1 -1
- package/dist/pkt-input-wrapper.js +1 -1
- package/dist/pkt-link.cjs +1 -1
- package/dist/pkt-link.js +4 -4
- package/dist/pkt-linkcard.cjs +1 -1
- package/dist/pkt-linkcard.js +1 -1
- package/dist/pkt-messagebox.cjs +1 -1
- package/dist/pkt-messagebox.js +4 -4
- package/dist/pkt-modal.cjs +1 -1
- package/dist/pkt-modal.js +1 -1
- package/dist/pkt-tag.cjs +1 -1
- package/dist/pkt-tag.js +4 -4
- package/dist/pkt-textarea.cjs +1 -1
- package/dist/pkt-textarea.js +1 -1
- package/dist/pkt-textinput.cjs +1 -1
- package/dist/pkt-textinput.js +1 -1
- package/dist/{ref-DPUgHtT0.cjs → ref-C2yPtMJA.cjs} +1 -1
- package/dist/{ref-B5hXBqpP.js → ref-CaiKp3S2.js} +1 -1
- package/dist/{textarea-DpLTy6XT.cjs → textarea-B45ZZYpx.cjs} +6 -3
- package/dist/{textarea-oZpJKjwI.js → textarea-BTpJjEhO.js} +25 -22
- package/dist/{textinput-BD4p3Biy.cjs → textinput-BIhQEr8z.cjs} +7 -3
- package/dist/{textinput-ToIpNAvm.js → textinput-CVo5wG14.js} +63 -56
- package/package.json +3 -3
- package/src/components/calendar/index.ts +4 -4
- package/src/components/datepicker/index.ts +3 -4
- package/src/components/element/index.ts +20 -0
- package/src/components/textarea/textarea.ts +6 -3
- package/src/components/textinput/textinput.ts +10 -3
package/dist/pkt-datepicker.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { T as A, r as P, a as L, x as v, E as b, n as u } from "./index-
|
|
1
|
+
import { T as A, r as P, a as L, x as v, E as b, n as u } from "./index-CFDwiDTU.js";
|
|
2
2
|
import { e as j, i as F, a as q, t as H } from "./custom-element-CWfU4dcr.js";
|
|
3
|
-
import { p as N, v as k, r as w, M as S, m as U, e as R, n as y } from "./ref-
|
|
4
|
-
import { e as x } from "./class-map-
|
|
3
|
+
import { p as N, v as k, r as w, M as S, m as U, e as R, n as y } from "./ref-CaiKp3S2.js";
|
|
4
|
+
import { e as x } from "./class-map-CBvUV2N3.js";
|
|
5
5
|
import { a as V } from "./converters-DNCwIFwr.js";
|
|
6
|
-
import { n as T, f as _, a as K, b as M } from "./index-
|
|
7
|
-
import "./input-wrapper-
|
|
8
|
-
import "./index-
|
|
6
|
+
import { n as T, f as _, a as K, b as M } from "./index-D2jSRMrn.js";
|
|
7
|
+
import "./input-wrapper-6vTrKtsW.js";
|
|
8
|
+
import "./index-RwtTBIhT.js";
|
|
9
9
|
import "./pkt-tag.js";
|
|
10
10
|
/**
|
|
11
11
|
* @license
|
|
@@ -23,37 +23,37 @@ const E = (e, t, i) => {
|
|
|
23
23
|
dt(e, t, i) {
|
|
24
24
|
let a;
|
|
25
25
|
i === void 0 ? i = t : t !== void 0 && (a = t);
|
|
26
|
-
const s = [],
|
|
26
|
+
const s = [], r = [];
|
|
27
27
|
let n = 0;
|
|
28
|
-
for (const f of e) s[n] = a ? a(f, n) : n,
|
|
29
|
-
return { values:
|
|
28
|
+
for (const f of e) s[n] = a ? a(f, n) : n, r[n] = i(f, n), n++;
|
|
29
|
+
return { values: r, keys: s };
|
|
30
30
|
}
|
|
31
31
|
render(e, t, i) {
|
|
32
32
|
return this.dt(e, t, i).values;
|
|
33
33
|
}
|
|
34
34
|
update(e, [t, i, a]) {
|
|
35
|
-
const s = N(e), { values:
|
|
36
|
-
if (!Array.isArray(s)) return this.ut = n,
|
|
35
|
+
const s = N(e), { values: r, keys: n } = this.dt(t, i, a);
|
|
36
|
+
if (!Array.isArray(s)) return this.ut = n, r;
|
|
37
37
|
const f = this.ut ?? (this.ut = []), m = [];
|
|
38
|
-
let C, I, p = 0, h = s.length - 1, d = 0, c =
|
|
38
|
+
let C, I, p = 0, h = s.length - 1, d = 0, c = r.length - 1;
|
|
39
39
|
for (; p <= h && d <= c; ) if (s[p] === null) p++;
|
|
40
40
|
else if (s[h] === null) h--;
|
|
41
|
-
else if (f[p] === n[d]) m[d] = k(s[p],
|
|
42
|
-
else if (f[h] === n[c]) m[c] = k(s[h],
|
|
43
|
-
else if (f[p] === n[c]) m[c] = k(s[p],
|
|
44
|
-
else if (f[h] === n[d]) m[d] = k(s[h],
|
|
41
|
+
else if (f[p] === n[d]) m[d] = k(s[p], r[d]), p++, d++;
|
|
42
|
+
else if (f[h] === n[c]) m[c] = k(s[h], r[c]), h--, c--;
|
|
43
|
+
else if (f[p] === n[c]) m[c] = k(s[p], r[c]), w(e, m[c + 1], s[p]), p++, c--;
|
|
44
|
+
else if (f[h] === n[d]) m[d] = k(s[h], r[d]), w(e, s[p], s[h]), h--, d++;
|
|
45
45
|
else if (C === void 0 && (C = E(n, d, c), I = E(f, p, h)), C.has(f[p])) if (C.has(f[h])) {
|
|
46
46
|
const g = I.get(n[d]), D = g !== void 0 ? s[g] : null;
|
|
47
47
|
if (D === null) {
|
|
48
48
|
const O = w(e, s[p]);
|
|
49
|
-
k(O,
|
|
50
|
-
} else m[d] = k(D,
|
|
49
|
+
k(O, r[d]), m[d] = O;
|
|
50
|
+
} else m[d] = k(D, r[d]), w(e, s[p], D), s[g] = null;
|
|
51
51
|
d++;
|
|
52
52
|
} else S(s[h]), h--;
|
|
53
53
|
else S(s[p]), p++;
|
|
54
54
|
for (; d <= c; ) {
|
|
55
55
|
const g = w(e, m[c + 1]);
|
|
56
|
-
k(g,
|
|
56
|
+
k(g, r[d]), m[d++] = g;
|
|
57
57
|
}
|
|
58
58
|
for (; p <= h; ) {
|
|
59
59
|
const g = s[p++];
|
|
@@ -251,12 +251,12 @@ const E = (e, t, i) => {
|
|
|
251
251
|
events: Q
|
|
252
252
|
};
|
|
253
253
|
var X = Object.defineProperty, Y = Object.getOwnPropertyDescriptor, o = (e, t, i, a) => {
|
|
254
|
-
for (var s = a > 1 ? void 0 : a ? Y(t, i) : t,
|
|
255
|
-
(n = e[
|
|
254
|
+
for (var s = a > 1 ? void 0 : a ? Y(t, i) : t, r = e.length - 1, n; r >= 0; r--)
|
|
255
|
+
(n = e[r]) && (s = (a ? n(t, i, s) : n(s)) || s);
|
|
256
256
|
return a && s && X(t, i, s), s;
|
|
257
257
|
};
|
|
258
258
|
const B = (e) => new Promise((t) => setTimeout(t, e));
|
|
259
|
-
let
|
|
259
|
+
let l = class extends L {
|
|
260
260
|
constructor() {
|
|
261
261
|
super(...arguments), this.value = "", this._value = this.value ? Array.isArray(this.value) ? this.value : this.value.split(",") : [], this.label = "Datovelger", this.dateformat = $.props.dateformat.default, this.multiple = $.props.multiple.default, this.maxlength = null, this.range = $.props.range.default, this.showRangeLabels = !1, this.min = null, this.max = null, this.weeknumbers = $.props.weeknumbers.default, this.withcontrols = $.props.withcontrols.default, this.excludedates = [], this.excludeweekdays = [], this.currentmonth = null, this.calendarOpen = !1, this.timezone = "Europe/Oslo", this.inputClasses = {}, this.buttonClasses = {}, this.inputRef = R(), this.inputRefTo = R(), this.btnRef = R(), this.calRef = R(), this.popupRef = R(), this.addToSelected = (e) => {
|
|
262
262
|
const t = e.target;
|
|
@@ -345,10 +345,10 @@ let r = class extends L {
|
|
|
345
345
|
.value=${this._value[0] ?? ""}
|
|
346
346
|
min=${this.min}
|
|
347
347
|
max=${this.max}
|
|
348
|
+
?disabled=${this.disabled}
|
|
348
349
|
@click=${(t) => {
|
|
349
350
|
t.preventDefault(), this.showCalendar();
|
|
350
351
|
}}
|
|
351
|
-
?disabled=${this.disabled}
|
|
352
352
|
@keydown=${(t) => {
|
|
353
353
|
var i;
|
|
354
354
|
(t.key === "," || t.key === "Enter") && ((i = this.inputRef.value) == null || i.blur()), (t.key === "Space" || t.key === " ") && (t.preventDefault(), this.toggleCalendar(t));
|
|
@@ -384,11 +384,10 @@ let r = class extends L {
|
|
|
384
384
|
.value=${this._value[1] ?? ""}
|
|
385
385
|
min=${this.min}
|
|
386
386
|
max=${this.max}
|
|
387
|
-
|
|
387
|
+
?disabled=${this.disabled}
|
|
388
388
|
@click=${(t) => {
|
|
389
389
|
t.preventDefault(), this.showCalendar();
|
|
390
390
|
}}
|
|
391
|
-
?disabled=${this.disabled}
|
|
392
391
|
@keydown=${(t) => {
|
|
393
392
|
var i;
|
|
394
393
|
(t.key === "," || t.key === "Enter") && ((i = this.inputRefTo.value) == null || i.blur()), (t.key === "Space" || t.key === " ") && (t.preventDefault(), this.toggleCalendar(t));
|
|
@@ -403,12 +402,12 @@ let r = class extends L {
|
|
|
403
402
|
var i, a, s;
|
|
404
403
|
if ((i = this.calRef.value) != null && i.contains(t.relatedTarget) || this.onBlur(), t.target.value) {
|
|
405
404
|
this.manageValidity(t.target);
|
|
406
|
-
const
|
|
407
|
-
this.min && this.min >
|
|
405
|
+
const r = t.target.value;
|
|
406
|
+
this.min && this.min > r ? this.internals.setValidity(
|
|
408
407
|
{ rangeUnderflow: !0 },
|
|
409
408
|
this.strings.forms.messages.rangeUnderflow,
|
|
410
409
|
t.target
|
|
411
|
-
) : this.max && this.max <
|
|
410
|
+
) : this.max && this.max < r && this.internals.setValidity(
|
|
412
411
|
{ rangeOverflow: !0 },
|
|
413
412
|
this.strings.forms.messages.rangeOverflow,
|
|
414
413
|
t.target
|
|
@@ -432,6 +431,7 @@ let r = class extends L {
|
|
|
432
431
|
id="${this.id}-input"
|
|
433
432
|
min=${this.min || b}
|
|
434
433
|
max=${this.max || b}
|
|
434
|
+
?disabled=${this.disabled || this.maxlength && this._value.length >= this.maxlength}
|
|
435
435
|
@click=${(e) => {
|
|
436
436
|
e.preventDefault(), this.showCalendar();
|
|
437
437
|
}}
|
|
@@ -448,7 +448,6 @@ let r = class extends L {
|
|
|
448
448
|
@keydown=${(e) => {
|
|
449
449
|
(e.key === "," || e.key === "Enter") && (e.preventDefault(), this.addToSelected(e)), (e.key === "Space" || e.key === " ") && (e.preventDefault(), this.toggleCalendar(e));
|
|
450
450
|
}}
|
|
451
|
-
?disabled=${this.disabled || this.maxlength && this._value.length >= this.maxlength}
|
|
452
451
|
@change=${(e) => {
|
|
453
452
|
e.stopImmediatePropagation();
|
|
454
453
|
}}
|
|
@@ -577,8 +576,8 @@ let r = class extends L {
|
|
|
577
576
|
var e;
|
|
578
577
|
if (this.popupRef.value && this.inputRef.value) {
|
|
579
578
|
const t = this.multiple && !!this.maxlength, i = ((e = this.inputRef.value.parentElement) == null ? void 0 : e.getBoundingClientRect()) || this.inputRef.value.getBoundingClientRect(), a = t ? i.height + 30 : i.height, s = this.popupRef.value.getBoundingClientRect().height;
|
|
580
|
-
let
|
|
581
|
-
i && i.top + s > window.innerHeight && i.top - s > 0 && (
|
|
579
|
+
let r = t ? "calc(100% - 30px)" : "100%";
|
|
580
|
+
i && i.top + s > window.innerHeight && i.top - s > 0 && (r = `calc(100% - ${a}px - ${s}px)`), this.popupRef.value.style.top = r;
|
|
582
581
|
}
|
|
583
582
|
}
|
|
584
583
|
handleFocusOut(e) {
|
|
@@ -597,64 +596,64 @@ let r = class extends L {
|
|
|
597
596
|
};
|
|
598
597
|
o([
|
|
599
598
|
u({ type: String, reflect: !0 })
|
|
600
|
-
],
|
|
599
|
+
], l.prototype, "value", 2);
|
|
601
600
|
o([
|
|
602
601
|
u({ type: Array })
|
|
603
|
-
],
|
|
602
|
+
], l.prototype, "_value", 2);
|
|
604
603
|
o([
|
|
605
604
|
u({ type: String, reflect: !0 })
|
|
606
|
-
],
|
|
605
|
+
], l.prototype, "label", 2);
|
|
607
606
|
o([
|
|
608
607
|
u({ type: String })
|
|
609
|
-
],
|
|
608
|
+
], l.prototype, "dateformat", 2);
|
|
610
609
|
o([
|
|
611
610
|
u({ type: Boolean, reflect: !0 })
|
|
612
|
-
],
|
|
611
|
+
], l.prototype, "multiple", 2);
|
|
613
612
|
o([
|
|
614
613
|
u({ type: Number, reflect: !0 })
|
|
615
|
-
],
|
|
614
|
+
], l.prototype, "maxlength", 2);
|
|
616
615
|
o([
|
|
617
616
|
u({ type: Boolean, reflect: !0 })
|
|
618
|
-
],
|
|
617
|
+
], l.prototype, "range", 2);
|
|
619
618
|
o([
|
|
620
619
|
u({ type: Boolean })
|
|
621
|
-
],
|
|
620
|
+
], l.prototype, "showRangeLabels", 2);
|
|
622
621
|
o([
|
|
623
622
|
u({ type: String, reflect: !0 })
|
|
624
|
-
],
|
|
623
|
+
], l.prototype, "min", 2);
|
|
625
624
|
o([
|
|
626
625
|
u({ type: String, reflect: !0 })
|
|
627
|
-
],
|
|
626
|
+
], l.prototype, "max", 2);
|
|
628
627
|
o([
|
|
629
628
|
u({ type: Boolean })
|
|
630
|
-
],
|
|
629
|
+
], l.prototype, "weeknumbers", 2);
|
|
631
630
|
o([
|
|
632
631
|
u({ type: Boolean, reflect: !0 })
|
|
633
|
-
],
|
|
632
|
+
], l.prototype, "withcontrols", 2);
|
|
634
633
|
o([
|
|
635
634
|
u({ converter: V.csvToArray })
|
|
636
|
-
],
|
|
635
|
+
], l.prototype, "excludedates", 2);
|
|
637
636
|
o([
|
|
638
637
|
u({ converter: V.csvToArray })
|
|
639
|
-
],
|
|
638
|
+
], l.prototype, "excludeweekdays", 2);
|
|
640
639
|
o([
|
|
641
640
|
u({ type: String })
|
|
642
|
-
],
|
|
641
|
+
], l.prototype, "currentmonth", 2);
|
|
643
642
|
o([
|
|
644
643
|
u({ type: Boolean, reflect: !0 })
|
|
645
|
-
],
|
|
644
|
+
], l.prototype, "calendarOpen", 2);
|
|
646
645
|
o([
|
|
647
646
|
u({ type: String })
|
|
648
|
-
],
|
|
647
|
+
], l.prototype, "timezone", 2);
|
|
649
648
|
o([
|
|
650
649
|
P()
|
|
651
|
-
],
|
|
650
|
+
], l.prototype, "inputClasses", 2);
|
|
652
651
|
o([
|
|
653
652
|
P()
|
|
654
|
-
],
|
|
655
|
-
|
|
653
|
+
], l.prototype, "buttonClasses", 2);
|
|
654
|
+
l = o([
|
|
656
655
|
H("pkt-datepicker")
|
|
657
|
-
],
|
|
656
|
+
], l);
|
|
658
657
|
export {
|
|
659
|
-
|
|
658
|
+
l as PktDatepicker
|
|
660
659
|
};
|
package/dist/pkt-element.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-CR7t1zY9.cjs");exports.PktElement=e.PktElement;exports.PktInputElement=e.PktInputElement;
|
package/dist/pkt-element.js
CHANGED
package/dist/pkt-helptext.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./helptext-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./helptext-_fMLOOCL.cjs"),t=e.PktHelptext;Object.defineProperty(exports,"PktHelptext",{enumerable:!0,get:()=>e.PktHelptext});exports.default=t;
|
package/dist/pkt-helptext.js
CHANGED
package/dist/pkt-icon.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("./index-CR7t1zY9.cjs");require("./custom-element-B-TlBwRu.cjs");const e=require("./index-CmTjXoAb.cjs");Object.defineProperty(exports,"PktIcon",{enumerable:!0,get:()=>e.PktIcon});
|
package/dist/pkt-icon.js
CHANGED
package/dist/pkt-index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./pkt-alert.cjs"),t=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./pkt-alert.cjs"),t=require("./index-tvpcg-ad.cjs"),r=require("./pkt-card.cjs"),n=require("./pkt-component-template.cjs"),u=require("./pkt-datepicker.cjs"),a=require("./helptext-_fMLOOCL.cjs"),o=require("./index-CmTjXoAb.cjs"),i=require("./input-wrapper-DX41tnbj.cjs"),P=require("./pkt-link.cjs"),c=require("./linkcard-Det6CJ5D.cjs"),k=require("./pkt-messagebox.cjs"),p=require("./modal-DYTVJjYh.cjs"),b=require("./pkt-tag.cjs"),l=require("./textarea-B45ZZYpx.cjs"),d=require("./textinput-BIhQEr8z.cjs");Object.defineProperty(exports,"PktAlert",{enumerable:!0,get:()=>e.PktAlert});Object.defineProperty(exports,"PktCalendar",{enumerable:!0,get:()=>t.PktCalendar});Object.defineProperty(exports,"PktCard",{enumerable:!0,get:()=>r.PktCard});Object.defineProperty(exports,"PktComponent",{enumerable:!0,get:()=>n.PktComponent});Object.defineProperty(exports,"PktDatepicker",{enumerable:!0,get:()=>u.PktDatepicker});Object.defineProperty(exports,"PktHelptext",{enumerable:!0,get:()=>a.PktHelptext});Object.defineProperty(exports,"PktIcon",{enumerable:!0,get:()=>o.PktIcon});Object.defineProperty(exports,"PktInputWrapper",{enumerable:!0,get:()=>i.PktInputWrapper});Object.defineProperty(exports,"PktLink",{enumerable:!0,get:()=>P.PktLink});Object.defineProperty(exports,"PktLinkCard",{enumerable:!0,get:()=>c.PktLinkCard});Object.defineProperty(exports,"PktMessagebox",{enumerable:!0,get:()=>k.PktMessagebox});Object.defineProperty(exports,"PktModal",{enumerable:!0,get:()=>p.PktModal});Object.defineProperty(exports,"PktTag",{enumerable:!0,get:()=>b.PktTag});Object.defineProperty(exports,"PktTextarea",{enumerable:!0,get:()=>l.PktTextarea});Object.defineProperty(exports,"PktTextinput",{enumerable:!0,get:()=>d.PktTextinput});
|
package/dist/pkt-index.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { PktAlert as o } from "./pkt-alert.js";
|
|
2
|
-
import { P } from "./index-
|
|
2
|
+
import { P } from "./index-D2jSRMrn.js";
|
|
3
3
|
import { PktCard as a } from "./pkt-card.js";
|
|
4
4
|
import { PktComponent as k } from "./pkt-component-template.js";
|
|
5
5
|
import { PktDatepicker as f } from "./pkt-datepicker.js";
|
|
6
|
-
import { P as n } from "./helptext-
|
|
7
|
-
import { P as i } from "./index-
|
|
8
|
-
import { P as C } from "./input-wrapper-
|
|
6
|
+
import { P as n } from "./helptext-DBolvFI4.js";
|
|
7
|
+
import { P as i } from "./index-RwtTBIhT.js";
|
|
8
|
+
import { P as C } from "./input-wrapper-6vTrKtsW.js";
|
|
9
9
|
import { PktLink as c } from "./pkt-link.js";
|
|
10
|
-
import { P as u } from "./linkcard-
|
|
10
|
+
import { P as u } from "./linkcard-BlWQ8jOv.js";
|
|
11
11
|
import { PktMessagebox as L } from "./pkt-messagebox.js";
|
|
12
|
-
import { P as b } from "./modal-
|
|
12
|
+
import { P as b } from "./modal-3OZTPqee.js";
|
|
13
13
|
import { PktTag as D } from "./pkt-tag.js";
|
|
14
|
-
import { P as W } from "./textarea-
|
|
15
|
-
import { P as j } from "./textinput-
|
|
14
|
+
import { P as W } from "./textarea-BTpJjEhO.js";
|
|
15
|
+
import { P as j } from "./textinput-CVo5wG14.js";
|
|
16
16
|
export {
|
|
17
17
|
o as PktAlert,
|
|
18
18
|
P as PktCalendar,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./input-wrapper-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./input-wrapper-DX41tnbj.cjs"),t=e.PktInputWrapper;Object.defineProperty(exports,"PktInputWrapper",{enumerable:!0,get:()=>e.PktInputWrapper});exports.default=t;
|
package/dist/pkt-link.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-CR7t1zY9.cjs"),c=require("./ref-C2yPtMJA.cjs"),k=require("./class-map-a5HUzP83.cjs"),h=require("./custom-element-B-TlBwRu.cjs");require("./index-CmTjXoAb.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.e(),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.x`<a
|
|
2
2
|
class=${k.e(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, x as k, E as h, n as i } from "./index-
|
|
2
|
-
import { e as m, P as d, n as u } from "./ref-
|
|
3
|
-
import { e as P } from "./class-map-
|
|
1
|
+
import { P as f, x as k, E as h, n as i } from "./index-CFDwiDTU.js";
|
|
2
|
+
import { e as m, P as d, n as u } from "./ref-CaiKp3S2.js";
|
|
3
|
+
import { e as P } from "./class-map-CBvUV2N3.js";
|
|
4
4
|
import { t as y } from "./custom-element-CWfU4dcr.js";
|
|
5
|
-
import "./index-
|
|
5
|
+
import "./index-RwtTBIhT.js";
|
|
6
6
|
const g = "pkt-link", v = !0, _ = {
|
|
7
7
|
href: {
|
|
8
8
|
name: "URL",
|
package/dist/pkt-linkcard.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./linkcard-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./linkcard-Det6CJ5D.cjs"),t=e.PktLinkCard;Object.defineProperty(exports,"PktLinkCard",{enumerable:!0,get:()=>e.PktLinkCard});exports.default=t;
|
package/dist/pkt-linkcard.js
CHANGED
package/dist/pkt-messagebox.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-CR7t1zY9.cjs"),c=require("./ref-C2yPtMJA.cjs"),b=require("./class-map-a5HUzP83.cjs"),k=require("./custom-element-B-TlBwRu.cjs");require("./index-CmTjXoAb.cjs");const d="pkt-messagebox",u=!0,m={onClose:{description:"React: Event som trigges når meldingsboksen lukkes"},"on-close":{description:"Vue: Event som trigges når meldingsboksen lukkes"}},g={title:{name:"Tittel",description:"Tittelen på meldingsboksen",type:"string"},skin:{name:"Utseende",description:"Velg farge på meldingsboksen",type:["beige","blue","red","green"],default:"beige"},compact:{name:"Kompakt",description:"Gjør meldingsboksen mindre",type:"boolean",default:!1},closable:{name:"Kan lukkes",description:"Viser lukkeknapp",type:"boolean",default:!1}},h={default:{description:"Innholdet i meldingsboksen"}},p={name:d,"css-class":"pkt-messagebox",isElement:u,events:m,props:g,slots:h};var f=Object.defineProperty,x=Object.getOwnPropertyDescriptor,o=(i,t,n,l)=>{for(var s=l>1?void 0:l?x(t,n):t,r=i.length-1,a;r>=0;r--)(a=i[r])&&(s=(l?a(t,n,s):a(s))||s);return l&&s&&f(t,n,s),s};exports.PktMessagebox=class extends e.PktElement{constructor(){super(),this.defaultSlot=c.e(),this.closable=p.props.closable.default,this.compact=p.props.compact.default,this.title="",this.skin=p.props.skin.default,this._isClosed=!1,this.close=t=>{this._isClosed=!0,this.dispatchEvent(new CustomEvent("close",{detail:{origin:t},bubbles:!0})),this.dispatchEvent(new CustomEvent("on-close",{detail:{origin:t},bubbles:!0}))},this.slotController=new c.PktSlotController(this,this.defaultSlot),this._isClosed=!1}render(){const t={"pkt-messagebox":!0,"pkt-messagebox--compact":this.compact,[`pkt-messagebox--${this.skin}`]:this.skin,"pkt-messagebox--closable":this.closable,"pkt-hide":this._isClosed};return e.x`<div class=${b.e(t)}>
|
|
2
2
|
${this.closable?e.x`<div class="pkt-messagebox__close">
|
|
3
3
|
<button
|
|
4
4
|
@click=${this.close}
|
package/dist/pkt-messagebox.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { r as b, P as k, x as c, E as d, n } from "./index-
|
|
2
|
-
import { e as u, P as g, n as h } from "./ref-
|
|
3
|
-
import { e as f } from "./class-map-
|
|
1
|
+
import { r as b, P as k, x as c, E as d, n } from "./index-CFDwiDTU.js";
|
|
2
|
+
import { e as u, P as g, n as h } from "./ref-CaiKp3S2.js";
|
|
3
|
+
import { e as f } from "./class-map-CBvUV2N3.js";
|
|
4
4
|
import { t as v } from "./custom-element-CWfU4dcr.js";
|
|
5
|
-
import "./index-
|
|
5
|
+
import "./index-RwtTBIhT.js";
|
|
6
6
|
const _ = "pkt-messagebox", x = !0, y = {
|
|
7
7
|
onClose: {
|
|
8
8
|
description: "React: Event som trigges når meldingsboksen lukkes"
|
package/dist/pkt-modal.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./modal-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./modal-DYTVJjYh.cjs"),t=e.PktModal;Object.defineProperty(exports,"PktModal",{enumerable:!0,get:()=>e.PktModal});exports.default=t;
|
package/dist/pkt-modal.js
CHANGED
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-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./class-map-a5HUzP83.cjs"),g=require("./custom-element-B-TlBwRu.cjs"),t=require("./index-CR7t1zY9.cjs"),o=require("./ref-C2yPtMJA.cjs");require("./index-CmTjXoAb.cjs");const h="pkt-tag",k=!0,d={closeTag:{type:"boolean",required:!1,default:!1},size:{required:!1,default:"medium",type:["small","medium","large"]},iconName:{type:"icon",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:"Lukk"}},f={default:{description:"Teksten til tag"}},a={name:h,"css-class":"pkt-tag",isElement:k,props:d,slots:f};var y=Object.defineProperty,m=Object.getOwnPropertyDescriptor,s=(n,e,l,r)=>{for(var i=r>1?void 0:r?m(e,l):e,p=n.length-1,c;p>=0;p--)(c=n[p])&&(i=(r?c(e,l,i):c(i))||i);return r&&i&&y(e,l,i),i};exports.PktTag=class extends t.PktElement{constructor(){super(),this.defaultSlot=o.e(),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=e=>{this._isClosed=!0,this.dispatchEvent(new CustomEvent("close",{detail:{origin:e},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("on-close",{detail:{origin:e},bubbles:!0,composed:!0}))},this.slotController=new o.PktSlotController(this,this.defaultSlot),this._isClosed=!1}render(){const e={"pkt-tag":!0,[`pkt-tag--${this.size}`]:!!this.size,[`pkt-tag--${this.skin}`]:!!this.skin,[`pkt-tag--${this.textStyle}`]:!!this.textStyle},l={"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,"pkt-hide":this._isClosed};return this.closeTag?t.x`
|
|
2
2
|
<button
|
|
3
3
|
class=${u.e(l)}
|
|
4
4
|
type=${this.type}
|
package/dist/pkt-tag.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { e as h } from "./class-map-
|
|
1
|
+
import { e as h } from "./class-map-CBvUV2N3.js";
|
|
2
2
|
import { t as d } from "./custom-element-CWfU4dcr.js";
|
|
3
|
-
import { r as y, P as g, x as p, n as l } from "./index-
|
|
4
|
-
import { e as m, P as k, n as f } from "./ref-
|
|
5
|
-
import "./index-
|
|
3
|
+
import { r as y, P as g, x as p, n as l } from "./index-CFDwiDTU.js";
|
|
4
|
+
import { e as m, P as k, n as f } from "./ref-CaiKp3S2.js";
|
|
5
|
+
import "./index-RwtTBIhT.js";
|
|
6
6
|
const b = "pkt-tag", S = !0, $ = {
|
|
7
7
|
closeTag: {
|
|
8
8
|
type: "boolean",
|
package/dist/pkt-textarea.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./textarea-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./textarea-B45ZZYpx.cjs"),t=e.PktTextarea;Object.defineProperty(exports,"PktTextarea",{enumerable:!0,get:()=>e.PktTextarea});exports.default=t;
|
package/dist/pkt-textarea.js
CHANGED
package/dist/pkt-textinput.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./textinput-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./textinput-BIhQEr8z.cjs"),t=e.PktTextinput;Object.defineProperty(exports,"PktTextinput",{enumerable:!0,get:()=>e.PktTextinput});exports.default=t;
|
package/dist/pkt-textinput.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const A=require("./index-
|
|
1
|
+
"use strict";const A=require("./index-CR7t1zY9.cjs"),$=require("./custom-element-B-TlBwRu.cjs");class N{constructor(e,...t){this.nodes=[],this.host=e,this.host.addController(this),this.slots=t,this.nodes=[],this.observer=new MutationObserver(i=>this.handleMutations(i))}hostConnected(){this.updateNodes(),this.observer.observe(this.host,{childList:!0})}hostDisconnected(){this.observer.disconnect()}hostUpdated(){this.updateSlots()}updateNodes(){this.nodes=[],Array.from(this.host.childNodes).forEach(t=>{var i;if(t.nodeType===Node.TEXT_NODE&&((i=t.nodeValue)!=null&&i.trim())){const o=document==null?void 0:document.createElement("template");o.content.appendChild(t),this.nodes.push(o)}else this.isSlotElement(t)||this.nodes.push(t)})}updateSlots(){this.slots.forEach(e=>{if(!e.value)return;const t=e.value.getAttribute("name"),o=this.nodes.flatMap(n=>n.getAttribute&&n.getAttribute("slot")==t?this.nodeFromElement(n,e):[]).filter(n=>e.value&&!e.value.contains(n)&&!n.contains(e.value));o.length>0&&e.value.replaceChildren(...o)})}handleMutations(e){let t=!1;e.forEach(i=>{i.type==="childList"&&(i.addedNodes.forEach(o=>{var h;const n=o.nodeType===Node.ELEMENT_NODE&&!this.isSlotElement(o),l=o.nodeType===Node.TEXT_NODE&&((h=o.nodeValue)==null?void 0:h.trim());if(n)this.nodes.push(o),t=!0;else if(l){const d=document==null?void 0:document.createElement("template");d.content.appendChild(o),this.nodes.push(d),t=!0}}),i.removedNodes.forEach(o=>{this.nodes=this.nodes.filter(n=>n!==o),t=!0}))}),t&&this.updateSlots()}isSlotElement(e){return this.slots.some(t=>t.value===e)}nodeFromElement(e,t){var i;return e===((i=t.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
|
-
"use strict";const a=require("./index-
|
|
1
|
+
"use strict";const a=require("./index-CR7t1zY9.cjs"),s=require("./custom-element-B-TlBwRu.cjs"),u=require("./ref-C2yPtMJA.cjs"),p=require("./class-map-a5HUzP83.cjs");require("./input-wrapper-DX41tnbj.cjs");require("./index-CmTjXoAb.cjs");/**
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright 2020 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -25,11 +25,15 @@
|
|
|
25
25
|
class="pkt-textarea"
|
|
26
26
|
>
|
|
27
27
|
<textarea
|
|
28
|
+
${u.n(this.inputRef)}
|
|
28
29
|
class=${e}
|
|
29
30
|
id=${this.id+"-input"}
|
|
30
31
|
name=${(this.name||this.id)+"-input"}
|
|
31
32
|
placeholder=${this.placeholder??a.E}
|
|
32
33
|
.value=${d(this.value)}
|
|
34
|
+
minlength=${this.minlength||a.E}
|
|
35
|
+
maxlength=${this.maxlength||a.E}
|
|
36
|
+
?readonly=${this.readonly}
|
|
33
37
|
autocomplete=${this.autocomplete}
|
|
34
38
|
aria-labelledby=${i}
|
|
35
39
|
aria-invalid=${this.hasError}
|
|
@@ -40,6 +44,5 @@
|
|
|
40
44
|
@change=${t=>{t.stopImmediatePropagation()}}
|
|
41
45
|
@focus=${t=>{this.onFocus(),t.stopImmediatePropagation()}}
|
|
42
46
|
@blur=${t=>{this.value=t.target.value,this.onBlur(),t.stopImmediatePropagation()}}
|
|
43
|
-
${u.n(this.inputRef)}
|
|
44
47
|
></textarea>
|
|
45
|
-
</pkt-input-wrapper>`}};o([a.n({type:String,reflect:!0})],exports.PktTextarea.prototype,"value",2);o([a.n({type:String})],exports.PktTextarea.prototype,"autocomplete",2);o([a.n({type:String
|
|
48
|
+
</pkt-input-wrapper>`}};o([a.n({type:String,reflect:!0})],exports.PktTextarea.prototype,"value",2);o([a.n({type:String})],exports.PktTextarea.prototype,"autocomplete",2);o([a.n({type:String})],exports.PktTextarea.prototype,"placeholder",2);o([a.n({type:Number})],exports.PktTextarea.prototype,"rows",2);o([a.r()],exports.PktTextarea.prototype,"counterCurrent",2);exports.PktTextarea=o([s.t("pkt-textarea")],exports.PktTextarea);
|