@oslokommune/punkt-elements 14.5.3 → 15.0.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.
- package/CHANGELOG.md +50 -0
- package/dist/{accordionitem-DB3tAjIZ.js → accordionitem-BbeS44TD.js} +1 -1
- package/dist/{accordionitem-DHYmPA-o.cjs → accordionitem-DUWhTUEI.cjs} +1 -1
- package/dist/{alert-GrKyqxuR.cjs → alert-B9flMht5.cjs} +1 -1
- package/dist/{alert-DqXar67l.js → alert-BpFxQviu.js} +3 -3
- package/dist/{backlink-QDcQd6vK.cjs → backlink-Bn16ZEIX.cjs} +1 -1
- package/dist/{backlink-CqUcmiPQ.js → backlink-DfMabyBp.js} +1 -1
- package/dist/{button-R4l10Nqd.cjs → button-BgCKV0zW.cjs} +1 -1
- package/dist/{button-f36menSU.js → button-CKgpX5QA.js} +2 -2
- package/dist/{calendar-DiNuZ8Ai.js → calendar-BMarIeVp.js} +333 -326
- package/dist/calendar-C6xgAJ7Z.cjs +90 -0
- package/dist/{card-C2hWaMev.cjs → card-DI3KodEc.cjs} +1 -1
- package/dist/{card-CnINxZma.js → card-h8ekgJRr.js} +3 -3
- package/dist/{checkbox-B-0FOdwi.cjs → checkbox-B2t7wfxe.cjs} +1 -1
- package/dist/{checkbox-CkAwPK_E.js → checkbox-BJ9pz3kV.js} +1 -1
- package/dist/{combobox-Dxa7XjLz.js → combobox-BjAvk8Y-.js} +6 -6
- package/dist/{combobox-yy6hIGmB.cjs → combobox-HNN7GTzh.cjs} +1 -1
- package/dist/{consent-FbFS1pmz.cjs → consent-C37tuFwZ.cjs} +1 -1
- package/dist/{consent-c9PhWxnP.js → consent-DAk2BJ7I.js} +2 -2
- package/dist/datepicker-2bneToiA.cjs +275 -0
- package/dist/datepicker-DvcH2QD9.js +1160 -0
- package/dist/{helptext-DebHGRsD.cjs → helptext-BG1P_9j0.cjs} +1 -1
- package/dist/{helptext-DuyRRfCn.js → helptext-Cm6FLBVf.js} +2 -2
- package/dist/icon-DBZvMard.js +103 -0
- package/dist/icon-n4-ve48P.cjs +9 -0
- package/dist/index.d.ts +10 -42
- package/dist/input-element-BBv4xjPb.cjs +1 -0
- package/dist/{input-element-DVZhYDJ_.js → input-element-CbjYtVou.js} +143 -147
- package/dist/{input-wrapper-3qfjLkrP.js → input-wrapper-Bwmva-69.js} +4 -4
- package/dist/{input-wrapper-rgXsRNkk.cjs → input-wrapper-CJqmwe3I.cjs} +1 -1
- package/dist/{link-CZvcdRek.js → link-BKnT-97D.js} +2 -2
- package/dist/{link-D85g20GS.cjs → link-DRPFqqEn.cjs} +1 -1
- package/dist/{linkcard-B-9K02q8.cjs → linkcard-02fxYQ2g.cjs} +1 -1
- package/dist/{linkcard-C3RTcMqc.js → linkcard-C2UENcqo.js} +2 -2
- package/dist/{loader-Dci0SrOz.js → loader-BW-AWQiE.js} +2 -2
- package/dist/{loader-1EXLdxfq.cjs → loader-Cj4kUNRE.cjs} +1 -1
- package/dist/{messagebox-dscnWgCd.cjs → messagebox-CK0sSRep.cjs} +1 -1
- package/dist/{messagebox-CnZlttZp.js → messagebox-DB8tEXrV.js} +2 -2
- package/dist/{modal-ncKVjcyZ.cjs → modal-BzVQSQy2.cjs} +1 -1
- package/dist/{modal-wSGthXAC.js → modal-ClYfWW2a.js} +2 -2
- package/dist/pkt-accordion.cjs +1 -1
- package/dist/pkt-accordion.js +2 -2
- package/dist/pkt-alert.cjs +1 -1
- package/dist/pkt-alert.js +1 -1
- package/dist/pkt-backlink.cjs +1 -1
- package/dist/pkt-backlink.js +1 -1
- package/dist/pkt-button.cjs +1 -1
- package/dist/pkt-button.js +1 -1
- package/dist/pkt-calendar.cjs +1 -1
- package/dist/pkt-calendar.js +1 -1
- package/dist/pkt-card.cjs +1 -1
- package/dist/pkt-card.js +1 -1
- package/dist/pkt-checkbox.cjs +1 -1
- package/dist/pkt-checkbox.js +1 -1
- package/dist/pkt-combobox.cjs +1 -1
- package/dist/pkt-combobox.js +1 -1
- package/dist/pkt-consent.cjs +1 -1
- package/dist/pkt-consent.js +1 -1
- package/dist/pkt-datepicker.cjs +1 -1
- package/dist/pkt-datepicker.js +2 -2
- package/dist/pkt-header.cjs +1 -1
- package/dist/pkt-header.js +5 -5
- 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 +1 -1
- package/dist/pkt-index.cjs +1 -1
- package/dist/pkt-index.js +25 -25
- 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 +1 -1
- package/dist/pkt-linkcard.cjs +1 -1
- package/dist/pkt-linkcard.js +1 -1
- package/dist/pkt-loader.cjs +1 -1
- package/dist/pkt-loader.js +1 -1
- package/dist/pkt-messagebox.cjs +1 -1
- package/dist/pkt-messagebox.js +1 -1
- package/dist/pkt-modal.cjs +1 -1
- package/dist/pkt-modal.js +1 -1
- package/dist/{pkt-options-controller-zn5cmMvL.js → pkt-options-controller-BcGywCmf.js} +1 -1
- package/dist/{pkt-options-controller-DjBCEHU4.cjs → pkt-options-controller-BnTmkl3g.cjs} +1 -1
- package/dist/pkt-progressbar.cjs +1 -1
- package/dist/pkt-progressbar.js +2 -2
- package/dist/pkt-radiobutton.cjs +1 -1
- package/dist/pkt-radiobutton.js +1 -1
- package/dist/pkt-select.cjs +1 -1
- package/dist/pkt-select.js +1 -1
- package/dist/pkt-slot-controller-D4nKlom5.cjs +1 -0
- package/dist/{pkt-slot-controller-BPGj-LC5.js → pkt-slot-controller-D7CrjM52.js} +27 -25
- package/dist/pkt-tabs.cjs +1 -1
- package/dist/pkt-tabs.js +2 -2
- package/dist/pkt-tag.cjs +1 -1
- package/dist/pkt-tag.js +1 -1
- 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/{progressbar-D5WBW1Dm.js → progressbar-CJa70NEo.js} +1 -1
- package/dist/{progressbar-ClY1WgnM.cjs → progressbar-ClZOyCz9.cjs} +1 -1
- package/dist/{radiobutton-oA20HijB.js → radiobutton-CvKKNFMd.js} +1 -1
- package/dist/{radiobutton-iHuLnuAn.cjs → radiobutton-DWoYQn8H.cjs} +1 -1
- package/dist/{select-jbIbD7hW.cjs → select-BQUp88lY.cjs} +1 -1
- package/dist/{select-Bug9sfr5.js → select-CFkxir_l.js} +4 -4
- package/dist/{tabitem-CypTmORF.js → tabitem-C8-tZyc_.js} +1 -1
- package/dist/{tabitem-CtltSqDK.cjs → tabitem-DaYfUaxw.cjs} +1 -1
- package/dist/{tag-DgoTYNVA.js → tag-DIJMJhyp.js} +2 -2
- package/dist/{tag-BfjOlIyS.cjs → tag-h0vD2Na0.cjs} +1 -1
- package/dist/{textarea-Da9E3RM7.js → textarea-CMuiBUee.js} +4 -4
- package/dist/{textarea-Dfa4_ZBy.cjs → textarea-DcCOfNlr.cjs} +1 -1
- package/dist/{textinput-DaMYc5gd.js → textinput-D30TCADP.js} +4 -4
- package/dist/{textinput-CLM9fRjm.cjs → textinput-DR3aaHTH.cjs} +1 -1
- package/package.json +4 -4
- package/src/components/calendar/calendar.core.test.ts +1 -1
- package/src/components/calendar/calendar.selection.test.ts +1 -1
- package/src/components/calendar/calendar.ts +32 -22
- package/src/components/datepicker/datepicker-popup.test.ts +1 -1
- package/src/components/datepicker/datepicker-popup.ts +73 -30
- package/src/components/datepicker/datepicker-range.ts +5 -1
- package/src/components/datepicker/datepicker-types.ts +4 -54
- package/src/components/datepicker/datepicker-utils.ts +38 -517
- package/src/components/datepicker/datepicker.core.test.ts +12 -10
- package/src/components/datepicker/datepicker.selection.test.ts +8 -6
- package/src/components/datepicker/datepicker.ts +26 -7
- package/src/components/icon/icon.test.ts +8 -8
- package/src/components/icon/icon.ts +56 -39
- package/dist/calendar-wuD6ZH0t.cjs +0 -90
- package/dist/datepicker-C7GWMtXH.js +0 -1444
- package/dist/datepicker-D_3vYgMt.cjs +0 -271
- package/dist/icon-BgG6oO4Q.js +0 -89
- package/dist/icon-Dl9ZPqe6.cjs +0 -9
- package/dist/input-element-RBQVA8i0.cjs +0 -1
- package/dist/pkt-slot-controller-BzddBp7z.cjs +0 -1
- package/src/components/calendar/helpers/calendar-grid.ts +0 -93
- package/src/components/calendar/helpers/date-validation.ts +0 -86
- package/src/components/calendar/helpers/index.ts +0 -49
- package/src/components/calendar/helpers/keyboard-navigation.ts +0 -54
- package/src/components/calendar/helpers/selection-manager.ts +0 -184
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import { P as Ft, s as g, n as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { s as Rt } from "./input-wrapper-CDgenrYA.js";
|
|
1
|
+
import { P as Ft, s as g, n as o } from "./element-BXsf_NlG.js";
|
|
2
|
+
import { u as Tt } from "./utils-DznhwRXm.js";
|
|
3
|
+
import { b as xt } from "./booleanish-C9R0tdXH.js";
|
|
4
|
+
import { s as It } from "./input-wrapper-CDgenrYA.js";
|
|
6
5
|
var ct = {}, dt;
|
|
7
|
-
function
|
|
6
|
+
function Rt() {
|
|
8
7
|
return dt || (dt = 1, (function() {
|
|
9
8
|
(function(p) {
|
|
10
|
-
const a = /* @__PURE__ */ new WeakMap(), r = /* @__PURE__ */ new WeakMap(), f = /* @__PURE__ */ new WeakMap(), u = /* @__PURE__ */ new WeakMap(), w = /* @__PURE__ */ new WeakMap(), V = /* @__PURE__ */ new WeakMap(),
|
|
9
|
+
const a = /* @__PURE__ */ new WeakMap(), r = /* @__PURE__ */ new WeakMap(), f = /* @__PURE__ */ new WeakMap(), u = /* @__PURE__ */ new WeakMap(), w = /* @__PURE__ */ new WeakMap(), V = /* @__PURE__ */ new WeakMap(), C = /* @__PURE__ */ new WeakMap(), v = /* @__PURE__ */ new WeakMap(), S = /* @__PURE__ */ new WeakMap(), A = /* @__PURE__ */ new WeakMap(), F = /* @__PURE__ */ new WeakMap(), T = /* @__PURE__ */ new WeakMap(), K = /* @__PURE__ */ new WeakMap(), j = /* @__PURE__ */ new WeakMap(), I = /* @__PURE__ */ new WeakMap(), R = {
|
|
11
10
|
ariaAtomic: "aria-atomic",
|
|
12
11
|
ariaAutoComplete: "aria-autocomplete",
|
|
13
12
|
ariaBusy: "aria-busy",
|
|
@@ -60,7 +59,7 @@ function Lt() {
|
|
|
60
59
|
return s;
|
|
61
60
|
},
|
|
62
61
|
set(d) {
|
|
63
|
-
s = d, e.isConnected ? k(e, n, d) :
|
|
62
|
+
s = d, e.isConnected ? k(e, n, d) : A.set(e, t);
|
|
64
63
|
}
|
|
65
64
|
});
|
|
66
65
|
}
|
|
@@ -93,11 +92,11 @@ function Lt() {
|
|
|
93
92
|
const { addedNodes: i, removedNodes: s } = t, n = Array.from(i), d = Array.from(s);
|
|
94
93
|
n.forEach((h) => {
|
|
95
94
|
var y;
|
|
96
|
-
if (u.has(h) && h.constructor.formAssociated && G(h),
|
|
97
|
-
const m =
|
|
95
|
+
if (u.has(h) && h.constructor.formAssociated && G(h), A.has(h)) {
|
|
96
|
+
const m = A.get(h);
|
|
98
97
|
Object.keys(R).filter((b) => m[b] !== null).forEach((b) => {
|
|
99
98
|
k(h, R[b], m[b]);
|
|
100
|
-
}),
|
|
99
|
+
}), A.delete(h);
|
|
101
100
|
}
|
|
102
101
|
if (I.has(h)) {
|
|
103
102
|
const m = I.get(h);
|
|
@@ -116,7 +115,7 @@ function Lt() {
|
|
|
116
115
|
h.localName === "fieldset" && ((y = L.observe) === null || y === void 0 || y.call(L, h, Q), J(h, !0));
|
|
117
116
|
}), d.forEach((h) => {
|
|
118
117
|
const y = u.get(h);
|
|
119
|
-
y && f.get(y) && X(y),
|
|
118
|
+
y && f.get(y) && X(y), C.has(h) && C.get(h).disconnect();
|
|
120
119
|
});
|
|
121
120
|
});
|
|
122
121
|
}
|
|
@@ -265,7 +264,7 @@ function Lt() {
|
|
|
265
264
|
return t.set(e, i), i;
|
|
266
265
|
}
|
|
267
266
|
var x;
|
|
268
|
-
class
|
|
267
|
+
class At {
|
|
269
268
|
constructor(t) {
|
|
270
269
|
x.set(this, void 0), Vt(this, x, t);
|
|
271
270
|
for (let i = 0; i < t.length; i++) {
|
|
@@ -287,7 +286,7 @@ function Lt() {
|
|
|
287
286
|
return this[t] == null ? null : this[t];
|
|
288
287
|
}
|
|
289
288
|
}
|
|
290
|
-
function
|
|
289
|
+
function Ct() {
|
|
291
290
|
const e = HTMLFormElement.prototype.checkValidity;
|
|
292
291
|
HTMLFormElement.prototype.checkValidity = i;
|
|
293
292
|
const t = HTMLFormElement.prototype.reportValidity;
|
|
@@ -307,7 +306,7 @@ function Lt() {
|
|
|
307
306
|
if (y.length === 0)
|
|
308
307
|
return h;
|
|
309
308
|
const m = Array.from(h).concat(y).sort((M, b) => M.compareDocumentPosition ? M.compareDocumentPosition(b) & 2 ? 1 : -1 : 0);
|
|
310
|
-
return new
|
|
309
|
+
return new At(m);
|
|
311
310
|
}
|
|
312
311
|
});
|
|
313
312
|
}
|
|
@@ -463,30 +462,30 @@ function Lt() {
|
|
|
463
462
|
const n = i.apply(this, s);
|
|
464
463
|
if (F.set(this, n), D()) {
|
|
465
464
|
const d = new MutationObserver(B);
|
|
466
|
-
window.ShadyDOM ? d.observe(this, _) : d.observe(n, _),
|
|
465
|
+
window.ShadyDOM ? d.observe(this, _) : d.observe(n, _), C.set(this, d);
|
|
467
466
|
}
|
|
468
467
|
return n;
|
|
469
468
|
};
|
|
470
469
|
const i = Element.prototype.attachShadow;
|
|
471
470
|
Element.prototype.attachShadow = t;
|
|
472
471
|
}
|
|
473
|
-
D() && typeof document < "u" && new MutationObserver(B).observe(document.documentElement, _), typeof HTMLFormElement < "u" &&
|
|
472
|
+
D() && typeof document < "u" && new MutationObserver(B).observe(document.documentElement, _), typeof HTMLFormElement < "u" && Ct(), (e || typeof window < "u" && !window.CustomStateSet) && $();
|
|
474
473
|
}
|
|
475
474
|
}
|
|
476
475
|
return !!customElements.polyfillWrapFlushCallback || (St() ? typeof window < "u" && !window.CustomStateSet && $(HTMLElement.prototype.attachInternals) : lt(!1)), p.forceCustomStateSetPolyfill = $, p.forceElementInternalsPolyfill = lt, Object.defineProperty(p, "__esModule", { value: !0 }), p;
|
|
477
476
|
})({});
|
|
478
477
|
})()), ct;
|
|
479
478
|
}
|
|
480
|
-
|
|
481
|
-
var
|
|
479
|
+
Rt();
|
|
480
|
+
var Lt = Object.defineProperty, l = (p, a, r, f) => {
|
|
482
481
|
for (var u = void 0, w = p.length - 1, V; w >= 0; w--)
|
|
483
482
|
(V = p[w]) && (u = V(a, r, u) || u);
|
|
484
|
-
return u &&
|
|
483
|
+
return u && Lt(a, r, u), u;
|
|
485
484
|
};
|
|
486
485
|
const ht = "on", z = "--checked", P = ",";
|
|
487
|
-
class
|
|
486
|
+
class c extends Ft {
|
|
488
487
|
constructor() {
|
|
489
|
-
super(), this.defaultValue = null, this.disabled = !1, this.readonly = !1, this.required = !1, this.max = null, this.maxlength = null, this.min = null, this.minlength = null, this.step = null, this.ariaDescribedBy = null, this.ariaLabelledby = null, this.name = "", this.pattern = null, this.placeholder = null, this.id =
|
|
488
|
+
super(), this.defaultValue = null, this.disabled = !1, this.readonly = !1, this.required = !1, this.max = null, this.maxlength = null, this.min = null, this.minlength = null, this.step = null, this.ariaDescribedBy = null, this.ariaLabelledby = null, this.name = "", this.pattern = null, this.placeholder = null, this.id = Tt(), this.counter = !1, this.hasError = !1, this.inline = !1, this.hasFieldset = !1, this.optionalTag = !1, this.requiredTag = !1, this.skipForwardTestid = !1, this.useWrapper = !0, this.fullwidth = !1, this.counterMaxLength = 0, this.errorMessage = "", this.helptext = "", this.helptextDropdown = "", this.helptextDropdownButton = It.props.helptextDropdownButton.default, this.label = null, this.optionalText = g.forms.labels.optional, this.requiredText = g.forms.labels.required, this.tagText = null, this.dataTestid = "", this.touched = !1, this.internals = this.attachInternals();
|
|
490
489
|
}
|
|
491
490
|
static get formAssociated() {
|
|
492
491
|
return !0;
|
|
@@ -499,7 +498,7 @@ class l extends Ft {
|
|
|
499
498
|
* @protected
|
|
500
499
|
*/
|
|
501
500
|
manageValidity(a) {
|
|
502
|
-
var r, f, u, w, V,
|
|
501
|
+
var r, f, u, w, V, C, v, S, A, F, T;
|
|
503
502
|
if (!a) {
|
|
504
503
|
console.warn("manageValidity called without valid input element");
|
|
505
504
|
return;
|
|
@@ -508,11 +507,11 @@ class l extends Ft {
|
|
|
508
507
|
{ patternMismatch: !0 },
|
|
509
508
|
g.forms.messages.invalidPattern,
|
|
510
509
|
a
|
|
511
|
-
) : (w = a.validity) != null && w.tooShort || this.minlength && this.minlength > 0 && this.value.length < this.minlength ? this.internals.setValidity({ tooShort: !0 }, g.forms.messages.tooShort, a) : (V = a.validity) != null && V.tooLong || this.maxlength && this.maxlength > 0 && this.value.length > this.maxlength ? this.internals.setValidity({ tooLong: !0 }, g.forms.messages.tooLong, a) : (
|
|
510
|
+
) : (w = a.validity) != null && w.tooShort || this.minlength && this.minlength > 0 && this.value.length < this.minlength ? this.internals.setValidity({ tooShort: !0 }, g.forms.messages.tooShort, a) : (V = a.validity) != null && V.tooLong || this.maxlength && this.maxlength > 0 && this.value.length > this.maxlength ? this.internals.setValidity({ tooLong: !0 }, g.forms.messages.tooLong, a) : (C = a.validity) != null && C.rangeUnderflow ? this.internals.setValidity(
|
|
512
511
|
{ rangeUnderflow: !0 },
|
|
513
512
|
this.min ? g.forms.messages.rangeUnderflowMin.replace("{min}", (v = this.min) == null ? void 0 : v.toString()) : g.forms.messages.rangeUnderflow,
|
|
514
513
|
a
|
|
515
|
-
) : (S = a.validity) != null && S.stepMismatch ? this.internals.setValidity({ stepMismatch: !0 }, g.forms.messages.invalid, a) : (
|
|
514
|
+
) : (S = a.validity) != null && S.stepMismatch ? this.internals.setValidity({ stepMismatch: !0 }, g.forms.messages.invalid, a) : (A = a.validity) != null && A.rangeOverflow ? this.internals.setValidity(
|
|
516
515
|
{ rangeOverflow: !0 },
|
|
517
516
|
this.max ? g.forms.messages.rangeOverflowMax.replace("{max}", (F = this.max) == null ? void 0 : F.toString()) : g.forms.messages.rangeOverflow,
|
|
518
517
|
a
|
|
@@ -586,7 +585,7 @@ class l extends Ft {
|
|
|
586
585
|
* ```
|
|
587
586
|
*/
|
|
588
587
|
valueChanged(a, r) {
|
|
589
|
-
(r !== this.value || r !== this._value) && (typeof a == "string" ? ((this.multiple || this.range) && a.includes(P) && (a = a.split(P)), this.value = a, this._value = Array.isArray(a) ? a : [a]) : Array.isArray(a) ? (this.value = this.multiple || this.range ? a : a[0], this._value = a) : (this.value = "", this._value = []), (!this.value || this.value.length === 0) && r && r.length !== 0 ? this.clearInputValue() : this.value && this.value.toString() !== (r == null ? void 0 : r.toString()) && this.onChange(this.value)
|
|
588
|
+
(r !== this.value || r !== this._value) && (typeof a == "string" ? ((this.multiple || this.range) && a.includes(P) && (a = a.split(P)), this.value = a, this._value = Array.isArray(a) ? a : [a]) : Array.isArray(a) ? (this.value = this.multiple || this.range ? a : a[0], this._value = a) : (this.value = "", this._value = []), (!this.value || this.value.length === 0) && r && r.length !== 0 ? this.clearInputValue() : this.value && this.value.toString() !== (r == null ? void 0 : r.toString()) && this.onChange(this.value));
|
|
590
589
|
}
|
|
591
590
|
/**
|
|
592
591
|
* Dispatches change and value-change events
|
|
@@ -703,138 +702,135 @@ class l extends Ft {
|
|
|
703
702
|
this.inputRef && this.inputRef.value && (this.inputRef.value.setAttribute("form", ""), this.manageValidity(this.inputRef.value)), this.inputRefTo && this.inputRefTo.value && (this.inputRefTo.value.setAttribute("form", ""), this.manageValidity(this.inputRefTo.value));
|
|
704
703
|
}
|
|
705
704
|
}
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
],
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
],
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
],
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
],
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
],
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
],
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
],
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
],
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
],
|
|
733
|
-
|
|
734
|
-
|
|
705
|
+
l([
|
|
706
|
+
o({ type: Boolean, reflect: !0 })
|
|
707
|
+
], c.prototype, "checked");
|
|
708
|
+
l([
|
|
709
|
+
o({ type: Boolean })
|
|
710
|
+
], c.prototype, "defaultChecked");
|
|
711
|
+
l([
|
|
712
|
+
o({ type: Boolean })
|
|
713
|
+
], c.prototype, "multiple");
|
|
714
|
+
l([
|
|
715
|
+
o({ type: Boolean })
|
|
716
|
+
], c.prototype, "range");
|
|
717
|
+
l([
|
|
718
|
+
o({ type: String, reflect: !0 })
|
|
719
|
+
], c.prototype, "type");
|
|
720
|
+
l([
|
|
721
|
+
o()
|
|
722
|
+
], c.prototype, "defaultValue");
|
|
723
|
+
l([
|
|
724
|
+
o({ type: Boolean, reflect: !0 })
|
|
725
|
+
], c.prototype, "disabled");
|
|
726
|
+
l([
|
|
727
|
+
o({ type: Boolean, reflect: !0 })
|
|
728
|
+
], c.prototype, "readonly");
|
|
729
|
+
l([
|
|
730
|
+
o({ type: Boolean, reflect: !0 })
|
|
731
|
+
], c.prototype, "required");
|
|
732
|
+
l([
|
|
733
|
+
o({
|
|
735
734
|
reflect: !0,
|
|
736
735
|
converter: {
|
|
737
736
|
fromAttribute: (p) => p,
|
|
738
737
|
toAttribute: (p) => (p == null ? void 0 : p.toString()) ?? null
|
|
739
738
|
}
|
|
740
739
|
})
|
|
741
|
-
],
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
],
|
|
745
|
-
|
|
746
|
-
|
|
740
|
+
], c.prototype, "max");
|
|
741
|
+
l([
|
|
742
|
+
o({ type: Number, reflect: !0 })
|
|
743
|
+
], c.prototype, "maxlength");
|
|
744
|
+
l([
|
|
745
|
+
o({
|
|
747
746
|
reflect: !0,
|
|
748
747
|
converter: {
|
|
749
748
|
fromAttribute: (p) => p,
|
|
750
749
|
toAttribute: (p) => (p == null ? void 0 : p.toString()) ?? null
|
|
751
750
|
}
|
|
752
751
|
})
|
|
753
|
-
],
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
],
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
],
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
],
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
],
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
],
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
],
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
],
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
],
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
],
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
],
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
],
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
],
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
],
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
],
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
],
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
],
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
],
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
],
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
],
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
],
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
],
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
],
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
],
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
],
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
],
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
],
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
],
|
|
835
|
-
o([
|
|
836
|
-
Tt()
|
|
837
|
-
], l.prototype, "touched");
|
|
752
|
+
], c.prototype, "min");
|
|
753
|
+
l([
|
|
754
|
+
o({ type: Number, reflect: !0 })
|
|
755
|
+
], c.prototype, "minlength");
|
|
756
|
+
l([
|
|
757
|
+
o({ type: Number, reflect: !0 })
|
|
758
|
+
], c.prototype, "step");
|
|
759
|
+
l([
|
|
760
|
+
o({ type: String })
|
|
761
|
+
], c.prototype, "ariaDescribedBy");
|
|
762
|
+
l([
|
|
763
|
+
o({ type: String })
|
|
764
|
+
], c.prototype, "ariaLabelledby");
|
|
765
|
+
l([
|
|
766
|
+
o({ type: String, reflect: !0 })
|
|
767
|
+
], c.prototype, "name");
|
|
768
|
+
l([
|
|
769
|
+
o({ type: String, reflect: !0 })
|
|
770
|
+
], c.prototype, "pattern");
|
|
771
|
+
l([
|
|
772
|
+
o({ type: String, reflect: !0 })
|
|
773
|
+
], c.prototype, "placeholder");
|
|
774
|
+
l([
|
|
775
|
+
o({ type: String, reflect: !0 })
|
|
776
|
+
], c.prototype, "id");
|
|
777
|
+
l([
|
|
778
|
+
o({ type: Boolean })
|
|
779
|
+
], c.prototype, "counter");
|
|
780
|
+
l([
|
|
781
|
+
o({ type: Boolean })
|
|
782
|
+
], c.prototype, "hasError");
|
|
783
|
+
l([
|
|
784
|
+
o({ type: Boolean })
|
|
785
|
+
], c.prototype, "inline");
|
|
786
|
+
l([
|
|
787
|
+
o({ type: Boolean })
|
|
788
|
+
], c.prototype, "hasFieldset");
|
|
789
|
+
l([
|
|
790
|
+
o({ type: Boolean })
|
|
791
|
+
], c.prototype, "optionalTag");
|
|
792
|
+
l([
|
|
793
|
+
o({ type: Boolean })
|
|
794
|
+
], c.prototype, "requiredTag");
|
|
795
|
+
l([
|
|
796
|
+
o({ type: Boolean })
|
|
797
|
+
], c.prototype, "skipForwardTestid");
|
|
798
|
+
l([
|
|
799
|
+
o({ type: Boolean, reflect: !0, converter: xt })
|
|
800
|
+
], c.prototype, "useWrapper");
|
|
801
|
+
l([
|
|
802
|
+
o({ type: Boolean, reflect: !0 })
|
|
803
|
+
], c.prototype, "fullwidth");
|
|
804
|
+
l([
|
|
805
|
+
o({ type: Number })
|
|
806
|
+
], c.prototype, "counterMaxLength");
|
|
807
|
+
l([
|
|
808
|
+
o({ type: String })
|
|
809
|
+
], c.prototype, "errorMessage");
|
|
810
|
+
l([
|
|
811
|
+
o({ type: String })
|
|
812
|
+
], c.prototype, "helptext");
|
|
813
|
+
l([
|
|
814
|
+
o({ type: String })
|
|
815
|
+
], c.prototype, "helptextDropdown");
|
|
816
|
+
l([
|
|
817
|
+
o({ type: String, reflect: !1 })
|
|
818
|
+
], c.prototype, "helptextDropdownButton");
|
|
819
|
+
l([
|
|
820
|
+
o({ type: String })
|
|
821
|
+
], c.prototype, "label");
|
|
822
|
+
l([
|
|
823
|
+
o({ type: String, reflect: !1 })
|
|
824
|
+
], c.prototype, "optionalText");
|
|
825
|
+
l([
|
|
826
|
+
o({ type: String, reflect: !1 })
|
|
827
|
+
], c.prototype, "requiredText");
|
|
828
|
+
l([
|
|
829
|
+
o({ type: String, reflect: !1 })
|
|
830
|
+
], c.prototype, "tagText");
|
|
831
|
+
l([
|
|
832
|
+
o({ type: String, attribute: "data-testid" })
|
|
833
|
+
], c.prototype, "dataTestid");
|
|
838
834
|
export {
|
|
839
|
-
|
|
835
|
+
c as P
|
|
840
836
|
};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { P as x, E as s, x as o, n as r, t as m } from "./element-BXsf_NlG.js";
|
|
2
|
-
import { P as k } from "./pkt-slot-controller-
|
|
2
|
+
import { P as k } from "./pkt-slot-controller-D7CrjM52.js";
|
|
3
3
|
import { e as g, n as y } from "./ref-BxiKhrfa.js";
|
|
4
4
|
import { o as w } from "./if-defined-CxHgig4I.js";
|
|
5
|
-
import { o as v } from "./icon-
|
|
5
|
+
import { o as v } from "./icon-DBZvMard.js";
|
|
6
6
|
import { e as T } from "./class-map-Dt2jXOlF.js";
|
|
7
7
|
import { u as E } from "./utils-DznhwRXm.js";
|
|
8
8
|
import { b as S } from "./booleanish-C9R0tdXH.js";
|
|
9
9
|
import { s as p } from "./input-wrapper-CDgenrYA.js";
|
|
10
|
-
import "./helptext-
|
|
11
|
-
import "./alert-
|
|
10
|
+
import "./helptext-Cm6FLBVf.js";
|
|
11
|
+
import "./alert-BpFxQviu.js";
|
|
12
12
|
var D = Object.defineProperty, _ = Object.getOwnPropertyDescriptor, e = (l, a, n, h) => {
|
|
13
13
|
for (var i = h > 1 ? void 0 : h ? _(a, n) : a, d = l.length - 1, u; d >= 0; d--)
|
|
14
14
|
(u = l[d]) && (i = (h ? u(a, n, i) : u(i)) || i);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const t=require("./element-aUzIoa1s.cjs"),x=require("./pkt-slot-controller-
|
|
1
|
+
"use strict";const t=require("./element-aUzIoa1s.cjs"),x=require("./pkt-slot-controller-D4nKlom5.cjs"),a=require("./ref-C5iJMIE1.cjs"),y=require("./if-defined-BElHLTlB.cjs"),b=require("./icon-n4-ve48P.cjs"),$=require("./class-map-CApIYSRo.cjs"),f=require("./utils-byXsEz1u.cjs"),I=require("./booleanish-BKVonob4.cjs"),r=require("./input-wrapper-EoSAbU-U.cjs");require("./helptext-BG1P_9j0.cjs");require("./alert-B9flMht5.cjs");var P=Object.defineProperty,W=Object.getOwnPropertyDescriptor,e=(u,p,n,o)=>{for(var s=o>1?void 0:o?W(p,n):p,i=u.length-1,l;i>=0;i--)(l=u[i])&&(s=(o?l(p,n,s):l(s))||s);return o&&s&&P(p,n,s),s};exports.PktInputWrapper=class extends t.PktElement{constructor(){super(),this.defaultSlot=a.e(),this.helptextSlot=a.e(),this.forId=f.uuidish(),this.label="",this.helptext=null,this.helptextDropdown=null,this.helptextDropdownButton=null,this.counter=r.specs.props.counter.default,this.counterCurrent=0,this.counterMaxLength=0,this.counterError=null,this.counterPosition="bottom",this.optionalTag=r.specs.props.optionalTag.default,this.optionalText=r.specs.props.optionalText.default,this.requiredTag=r.specs.props.requiredTag.default,this.requiredText=r.specs.props.requiredText.default,this.tagText=null,this.hasError=r.specs.props.hasError.default,this.errorMessage="",this.disabled=r.specs.props.disabled.default,this.inline=r.specs.props.inline.default,this.ariaDescribedby=void 0,this.hasFieldset=r.specs.props.hasFieldset.default,this.role="group",this.useWrapper=r.specs.props.useWrapper.default,this.slotController=new x.PktSlotController(this,this.defaultSlot,this.helptextSlot)}updated(p){super.updated(p)}render(){const p={"pkt-inputwrapper":!0,"pkt-inputwrapper--error":this.hasError,"pkt-inputwrapper--disabled":this.disabled,"pkt-inputwrapper--inline":this.inline},n="pkt-tag pkt-tag--small pkt-tag--thin-text",o=this.ariaDescribedby?this.ariaDescribedby:this.helptext?`${this.forId}-helptext`:t.E,s=()=>t.x`
|
|
2
2
|
${this.tagText?t.x`<span class=${n+" pkt-tag--gray"}>${this.tagText}</span>`:t.E}
|
|
3
3
|
${this.optionalTag?t.x`<span class=${n+" pkt-tag--blue-light"}>${this.optionalText}</span>`:t.E}
|
|
4
4
|
${this.requiredTag?t.x`<span class=${n+" pkt-tag--beige"}>${this.requiredText}</span>`:t.E}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { P as h, E as m, x as c, n as o, t as u } from "./element-BXsf_NlG.js";
|
|
2
|
-
import { P } from "./pkt-slot-controller-
|
|
2
|
+
import { P } from "./pkt-slot-controller-D7CrjM52.js";
|
|
3
3
|
import { e as k, n as g } from "./ref-BxiKhrfa.js";
|
|
4
4
|
import { e as y } from "./class-map-Dt2jXOlF.js";
|
|
5
|
-
import "./icon-
|
|
5
|
+
import "./icon-DBZvMard.js";
|
|
6
6
|
const d = { href: { default: "#" }, target: { default: "_self" } }, f = {
|
|
7
7
|
props: d
|
|
8
8
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const t=require("./element-aUzIoa1s.cjs"),h=require("./pkt-slot-controller-
|
|
1
|
+
"use strict";const t=require("./element-aUzIoa1s.cjs"),h=require("./pkt-slot-controller-D4nKlom5.cjs"),c=require("./ref-C5iJMIE1.cjs"),k=require("./class-map-CApIYSRo.cjs");require("./icon-n4-ve48P.cjs");const f={href:{default:"#"},target:{default:"_self"}},a={props:f};var u=Object.defineProperty,P=Object.getOwnPropertyDescriptor,i=(o,r,s,n)=>{for(var e=n>1?void 0:n?P(r,s):r,l=o.length-1,p;l>=0;l--)(p=o[l])&&(e=(n?p(r,s,e):p(e))||e);return n&&e&&u(r,s,e),e};exports.PktLink=class extends t.PktElement{constructor(){super(),this.defaultSlot=c.e(),this.href=a.props.href.default,this.iconName=void 0,this.iconPosition=void 0,this.external=!1,this.target=a.props.target.default,this.slotController=new h.PktSlotController(this,this.defaultSlot)}render(){const r={"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 t.x`<a
|
|
2
2
|
class=${k.e(r)}
|
|
3
3
|
href=${this.href}
|
|
4
4
|
.target=${this.target}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const t=require("./element-aUzIoa1s.cjs"),k=require("./ref-C5iJMIE1.cjs"),p=require("./pkt-slot-controller-
|
|
1
|
+
"use strict";const t=require("./element-aUzIoa1s.cjs"),k=require("./ref-C5iJMIE1.cjs"),p=require("./pkt-slot-controller-D4nKlom5.cjs");require("./icon-n4-ve48P.cjs");const c=require("./if-defined-BElHLTlB.cjs");var f=Object.defineProperty,h=Object.getOwnPropertyDescriptor,r=(o,n,i,l)=>{for(var e=l>1?void 0:l?h(n,i):n,s=o.length-1,a;s>=0;s--)(a=o[s])&&(e=(l?a(n,i,e):a(e))||e);return l&&e&&f(n,i,e),e};exports.PktLinkCard=class extends t.PktElement{constructor(){super(),this.defaultSlot=k.e(),this.title="",this.href="#",this.iconName="",this.external=!1,this.openInNewTab=!1,this.skin="normal",this.slotController=new p.PktSlotController(this,this.defaultSlot)}render(){const n=["pkt-linkcard",this.skin&&`pkt-linkcard--${this.skin}`].filter(Boolean).join(" "),i=["pkt-linkcard__title",this.external&&"pkt-link pkt-link--external"].filter(Boolean).join(" ");return t.x`
|
|
2
2
|
<a
|
|
3
3
|
href=${this.href}
|
|
4
4
|
class=${n}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { P as f, x as c, n as o, t as h } from "./element-BXsf_NlG.js";
|
|
2
2
|
import { e as k, n as m } from "./ref-BxiKhrfa.js";
|
|
3
|
-
import { P as d } from "./pkt-slot-controller-
|
|
4
|
-
import "./icon-
|
|
3
|
+
import { P as d } from "./pkt-slot-controller-D7CrjM52.js";
|
|
4
|
+
import "./icon-DBZvMard.js";
|
|
5
5
|
import { o as u } from "./if-defined-CxHgig4I.js";
|
|
6
6
|
var _ = Object.defineProperty, y = Object.getOwnPropertyDescriptor, r = (n, i, s, l) => {
|
|
7
7
|
for (var e = l > 1 ? void 0 : l ? y(i, s) : i, a = n.length - 1, p; a >= 0; a--)
|
|
@@ -2,8 +2,8 @@ import { P as u, E as m, x as d, n as a, t as y } from "./element-BXsf_NlG.js";
|
|
|
2
2
|
import { e as h } from "./class-map-Dt2jXOlF.js";
|
|
3
3
|
import { r as c } from "./state-DgnkjP0q.js";
|
|
4
4
|
import { e as f, n as g } from "./ref-BxiKhrfa.js";
|
|
5
|
-
import { P as v } from "./pkt-slot-controller-
|
|
6
|
-
import "./icon-
|
|
5
|
+
import { P as v } from "./pkt-slot-controller-D7CrjM52.js";
|
|
6
|
+
import "./icon-DBZvMard.js";
|
|
7
7
|
var _ = Object.defineProperty, k = Object.getOwnPropertyDescriptor, e = (s, o, n, r) => {
|
|
8
8
|
for (var i = r > 1 ? void 0 : r ? k(o, n) : o, l = s.length - 1, p; l >= 0; l--)
|
|
9
9
|
(p = s[l]) && (i = (r ? p(o, n, i) : p(i)) || i);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const t=require("./element-aUzIoa1s.cjs"),d=require("./class-map-CApIYSRo.cjs"),h=require("./state-GDzxl12x.cjs"),p=require("./ref-C5iJMIE1.cjs"),u=require("./pkt-slot-controller-
|
|
1
|
+
"use strict";const t=require("./element-aUzIoa1s.cjs"),d=require("./class-map-CApIYSRo.cjs"),h=require("./state-GDzxl12x.cjs"),p=require("./ref-C5iJMIE1.cjs"),u=require("./pkt-slot-controller-D4nKlom5.cjs");require("./icon-n4-ve48P.cjs");var c=Object.defineProperty,y=Object.getOwnPropertyDescriptor,s=(r,e,a,o)=>{for(var i=o>1?void 0:o?y(e,a):e,n=r.length-1,l;n>=0;n--)(l=r[n])&&(i=(o?l(e,a,i):l(i))||i);return o&&i&&c(e,a,i),i};window.pktAnimationPath=window.pktAnimationPath||"https://punkt-cdn.oslo.kommune.no/latest/animations/";exports.PktLoader=class extends t.PktElement{constructor(){super(),this.defaultSlot=p.e(),this.delay=0,this.inline=!1,this.isLoading=!0,this.message=null,this.size="medium",this.variant="shapes",this.loadingAnimationPath=window.pktAnimationPath,this._shouldDisplayLoader=!1,this.slotController=new u.PktSlotController(this,this.defaultSlot)}connectedCallback(){super.connectedCallback(),this._shouldDisplayLoader=this.delay===0,this.delay>0&&this.setupLoader()}updated(e){e.has("delay")&&this.setupLoader()}render(){const e=d.e({"pkt-loader":!0,[`pkt-loader--${this.inline?"inline":"box"}`]:!0,[`pkt-loader--${this.size}`]:!0}),a=d.e({"pkt-contents":!0,"pkt-hide":this.isLoading});return t.x`<div
|
|
2
2
|
role="status"
|
|
3
3
|
aria-live="polite"
|
|
4
4
|
aria-busy=${this.isLoading?"true":"false"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const e=require("./element-aUzIoa1s.cjs"),u=require("./pkt-slot-controller-
|
|
1
|
+
"use strict";const e=require("./element-aUzIoa1s.cjs"),u=require("./pkt-slot-controller-D4nKlom5.cjs"),n=require("./ref-C5iJMIE1.cjs"),b=require("./class-map-CApIYSRo.cjs"),d=require("./state-GDzxl12x.cjs");require("./icon-n4-ve48P.cjs");const k=require("./classutils-BwNK82ZQ.cjs"),h={skin:{default:"beige"},compact:{default:!1},closable:{default:!1}},p={props:h};var f=Object.defineProperty,x=Object.getOwnPropertyDescriptor,o=(i,t,a,l)=>{for(var s=l>1?void 0:l?x(t,a):t,r=i.length-1,c;r>=0;r--)(c=i[r])&&(s=(l?c(t,a,s):c(s))||s);return l&&s&&f(t,a,s),s};exports.PktMessagebox=class extends e.PktElement{constructor(){super(),this.defaultSlot=n.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 u.PktSlotController(this,this.defaultSlot),this._isClosed=!1}updated(t){super.updated(t),t.has("_isClosed")&&k.updateClassAttribute(this,"pkt-hide",this._isClosed)}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}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { P as b, E as d, x as n, n as a, t as m } from "./element-BXsf_NlG.js";
|
|
2
|
-
import { P as h } from "./pkt-slot-controller-
|
|
2
|
+
import { P as h } from "./pkt-slot-controller-D7CrjM52.js";
|
|
3
3
|
import { e as f, n as k } from "./ref-BxiKhrfa.js";
|
|
4
4
|
import { e as _ } from "./class-map-Dt2jXOlF.js";
|
|
5
5
|
import { r as v } from "./state-DgnkjP0q.js";
|
|
6
|
-
import "./icon-
|
|
6
|
+
import "./icon-DBZvMard.js";
|
|
7
7
|
import { u as g } from "./classutils-RQs1k6D9.js";
|
|
8
8
|
const x = { skin: { default: "beige" }, compact: { default: !1 }, closable: { default: !1 } }, u = {
|
|
9
9
|
props: x
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const d=require("./class-map-CApIYSRo.cjs"),o=require("./element-aUzIoa1s.cjs"),h=require("./state-GDzxl12x.cjs"),u=require("./pkt-slot-controller-
|
|
1
|
+
"use strict";const d=require("./class-map-CApIYSRo.cjs"),o=require("./element-aUzIoa1s.cjs"),h=require("./state-GDzxl12x.cjs"),u=require("./pkt-slot-controller-D4nKlom5.cjs"),r=require("./ref-C5iJMIE1.cjs");require("./icon-n4-ve48P.cjs");const k={hideCloseButton:{default:!1},closeOnBackdropClick:{default:!1},size:{default:"medium"}},p={props:k};var m=Object.defineProperty,v=Object.getOwnPropertyDescriptor,l=(c,t,e,i)=>{for(var s=i>1?void 0:i?v(t,e):t,a=c.length-1,n;a>=0;a--)(n=c[a])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&m(t,e,s),s};exports.PktModal=class extends o.PktElement{constructor(){super(),this.headingText="",this.removePadding=!1,this.hideCloseButton=p.props.hideCloseButton.default,this.closeOnBackdropClick=p.props.closeOnBackdropClick.default,this.closeButtonSkin="blue",this.size=p.props.size.default,this.variant="dialog",this.drawerPosition="right",this.transparentBackdrop=!1,this.defaultSlot=r.e(),this.dialogRef=r.e(),this._isOpen=!1,this.close=(t,e=!1)=>{var s;if(!this._isOpen)return;this._isOpen=!1,document.body.classList.remove("pkt-modal--open");const i=document.activeElement;i&&!this.isElementInViewport(i)&&i.scrollIntoView({behavior:"smooth",block:"nearest"}),this.dispatchEvent(new CustomEvent("close",{detail:{origin:t},bubbles:!0,composed:!0})),e||(s=this.dialogRef.value)==null||s.close(),this.requestUpdate()},this.showModal=(t=null)=>{var i;this._isOpen=!0,(i=this.dialogRef.value)==null||i.showModal();const e=document.querySelector(".pkt-modal");requestAnimationFrame(()=>{var s;this.dialogRef.value&&((s=this.dialogRef.value)==null||s.focus())}),e&&document.body.classList.add("pkt-modal--open"),this.dispatchEvent(new CustomEvent("showModal",{detail:{origin:t},bubbles:!0,composed:!0})),this.requestUpdate()},this.slotController=new u.PktSlotController(this,this.defaultSlot),this._isOpen=!1}async connectedCallback(){super.connectedCallback(),document.addEventListener("keydown",this.handleKeyDown.bind(this)),document.addEventListener("click",this.handleBackdropClick.bind(this))}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("keydown",this.handleKeyDown),document.removeEventListener("click",this.handleBackdropClick)}async firstUpdated(t){super.firstUpdated(t),this.dialogRef.value&&!window.HTMLDialogElement&&!this.dialogRef.value.showModal&&("document"in window&&"createElement"in document&&(await Promise.resolve().then(()=>require("./dialog-polyfill.esm-CPKZe7AL.cjs")).then(i=>i.default)).registerDialog(this.dialogRef.value),this.dialogRef.value.addEventListener("close",()=>{this.close(new Event("close"),!0)}))}handleKeyDown(t){t.key==="Escape"&&this.close(t)}handleBackdropClick(t){var e;this.closeOnBackdropClick&&t.target===((e=this.dialogRef)==null?void 0:e.value)&&this.close(t)}isElementInViewport(t){const e=t.getBoundingClientRect();return e.top>=0&&e.left>=0&&e.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&e.right<=(window.innerWidth||document.documentElement.clientWidth)}render(){const t={"pkt-modal":!0,"pkt-modal--removePadding":this.removePadding??!1,"pkt-modal--noHeadingText":this.headingText===""||this.headingText===void 0,"pkt-modal--noShadow":this.closeButtonSkin==="yellow-filled","pkt-modal--transparentBackdrop":this.transparentBackdrop??!1,[`pkt-modal--${this.size}`]:this.size!==void 0,[`pkt-modal__${this.variant}`]:this.variant!==void 0,[`pkt-modal__drawer--${this.drawerPosition}`]:this.variant==="drawer"},e={"pkt-modal__headingText":!0,"pkt-txt-24":!0},i={"pkt-modal__content":!0,"pkt-txt-18-light":!0},s=this.closeButtonSkin==="blue",a={"pkt-modal__closeButton":!0,[`pkt-modal__closeButton--${this.closeButtonSkin}`]:!0};return o.x`
|
|
2
2
|
<dialog
|
|
3
3
|
class=${d.e(t)}
|
|
4
4
|
${r.n(this.dialogRef)}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { e as c } from "./class-map-Dt2jXOlF.js";
|
|
2
2
|
import { P as k, E as f, x as r, n, t as v } from "./element-BXsf_NlG.js";
|
|
3
3
|
import { r as g } from "./state-DgnkjP0q.js";
|
|
4
|
-
import { P as _ } from "./pkt-slot-controller-
|
|
4
|
+
import { P as _ } from "./pkt-slot-controller-D7CrjM52.js";
|
|
5
5
|
import { e as u, n as m } from "./ref-BxiKhrfa.js";
|
|
6
|
-
import "./icon-
|
|
6
|
+
import "./icon-DBZvMard.js";
|
|
7
7
|
const y = { hideCloseButton: { default: !1 }, closeOnBackdropClick: { default: !1 }, size: { default: "medium" } }, h = {
|
|
8
8
|
props: y
|
|
9
9
|
};
|
package/dist/pkt-accordion.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./accordionitem-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./accordionitem-DUWhTUEI.cjs");exports.PktAccordion=e.PktAccordion;exports.PktAccordionItem=e.PktAccordionItem;exports.default=e.PktAccordion;
|
package/dist/pkt-accordion.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { P as r } from "./accordionitem-
|
|
2
|
-
import { a as c } from "./accordionitem-
|
|
1
|
+
import { P as r } from "./accordionitem-BbeS44TD.js";
|
|
2
|
+
import { a as c } from "./accordionitem-BbeS44TD.js";
|
|
3
3
|
export {
|
|
4
4
|
r as PktAccordion,
|
|
5
5
|
c as PktAccordionItem,
|
package/dist/pkt-alert.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./alert-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./alert-B9flMht5.cjs"),t=e.PktAlert;Object.defineProperty(exports,"PktAlert",{enumerable:!0,get:()=>e.PktAlert});exports.default=t;
|
package/dist/pkt-alert.js
CHANGED
package/dist/pkt-backlink.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./backlink-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./backlink-Bn16ZEIX.cjs"),t=e.PktBackLink;Object.defineProperty(exports,"PktBackLink",{enumerable:!0,get:()=>e.PktBackLink});exports.default=t;
|
package/dist/pkt-backlink.js
CHANGED
package/dist/pkt-button.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("./button-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("./button-BgCKV0zW.cjs"),e=t.PktButton;Object.defineProperty(exports,"PktButton",{enumerable:!0,get:()=>t.PktButton});exports.default=e;
|
package/dist/pkt-button.js
CHANGED