@oslokommune/punkt-elements 12.40.5 → 12.40.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +17 -0
- package/dist/{accordionitem-vmwqD9rr.js → accordionitem-DkE9or0K.js} +3 -3
- package/dist/{accordionitem-RFwXQC_0.cjs → accordionitem-Dz6jwPpb.cjs} +1 -1
- package/dist/{alert-C33z1kBf.js → alert-CoGYPbs-.js} +5 -5
- package/dist/{alert-C2EPmB0W.cjs → alert-D2PhTV94.cjs} +1 -1
- package/dist/{backlink-hvyJmwrO.js → backlink-BnlrDl9O.js} +2 -2
- package/dist/{backlink-HHM21crL.cjs → backlink-CcAZfB1d.cjs} +1 -1
- package/dist/{button-C60j8BsA.cjs → button-D_yRZQCa.cjs} +1 -1
- package/dist/{button-BCCtR9ff.js → button-o5SOFZKg.js} +2 -2
- package/dist/{calendar-CYY42kN4.cjs → calendar-BDeaGBaH.cjs} +1 -1
- package/dist/{calendar-KDcOWD6V.js → calendar-Beno8yU7.js} +4 -4
- package/dist/{card-Vy3_XLAy.js → card-BxHlJq4J.js} +6 -6
- package/dist/{card-CibYYPmF.cjs → card-CmdIb2X9.cjs} +1 -1
- package/dist/{checkbox-D5fSFvhs.js → checkbox-CtM5Hr2H.js} +4 -4
- package/dist/{checkbox-7ct89AUo.cjs → checkbox-Dqd2_fcU.cjs} +1 -1
- package/dist/{class-map-DCyaICmy.cjs → class-map-DWDPOqjO.cjs} +1 -1
- package/dist/{class-map-KyMqi0fa.js → class-map-m7ZCZ49w.js} +1 -1
- package/dist/{combobox-DewmPXyJ.js → combobox-Ct7-a2Vy.js} +31 -31
- package/dist/{combobox-dwkB9Yv_.cjs → combobox-lds6Lryq.cjs} +7 -7
- package/dist/{consent-1ZSUrWK9.cjs → consent-CVMm8lGt.cjs} +1 -1
- package/dist/{consent-c6eWVBWx.js → consent-DZ_-dQle.js} +3 -3
- package/dist/{datepicker-CISpFZSs.js → datepicker-D6gkp_6p.js} +11 -11
- package/dist/{datepicker-BDnncwne.cjs → datepicker-DpQV8G6g.cjs} +1 -1
- package/dist/{directive-helpers-8uS_Izwn.js → directive-helpers--4ibN__v.js} +1 -1
- package/dist/{directive-helpers-CG7Oxal3.cjs → directive-helpers-v9b0v7lu.cjs} +1 -1
- package/dist/{element-BSypUpzA.cjs → element-90YeMNbV.cjs} +35 -35
- package/dist/{element-DjjF_tEh.js → element-gAd63VwC.js} +629 -627
- package/dist/{heading-DNLQdsXY.js → heading-Bxonbv8M.js} +3 -3
- package/dist/{heading-BnJhJDMD.cjs → heading-CxJ0IqpU.cjs} +1 -1
- package/dist/{helptext-bMgnhZ1R.cjs → helptext-AqNI_oFG.cjs} +1 -1
- package/dist/{helptext-DcSUjjEq.js → helptext-DBearL3P.js} +5 -5
- package/dist/{icon-BnKGwYjj.cjs → icon-B1_BRNqf.cjs} +1 -1
- package/dist/{icon-Beoxup8E.js → icon-CO1TLSs5.js} +1 -1
- package/dist/{if-defined-a3sotaUr.cjs → if-defined-C8eotHpL.cjs} +1 -1
- package/dist/{if-defined-BErSJCeJ.js → if-defined-Cj-3Kdsr.js} +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/{input-element-B2GjFOXX.js → input-element-BEvaQK4g.js} +30 -27
- package/dist/input-element-CInrWeac.cjs +1 -0
- package/dist/{input-wrapper-B-f_SotM.cjs → input-wrapper-B_TtkGqo.cjs} +1 -1
- package/dist/{input-wrapper-BdeoMGnk.js → input-wrapper-CDgnd3WJ.js} +6 -6
- package/dist/{link-nesPZCIx.cjs → link-BWJrqWi7.cjs} +1 -1
- package/dist/{link-DCYJhFKJ.js → link-Qj1bJCPw.js} +4 -4
- package/dist/{linkcard-s9yoOq90.cjs → linkcard-0KLDuaGM.cjs} +1 -1
- package/dist/{linkcard-Bt-Qa_SP.js → linkcard-Byt10fUI.js} +3 -3
- package/dist/{listbox-DqpGh7eq.cjs → listbox-AjDNhDsQ.cjs} +1 -1
- package/dist/{listbox-C1oYnM-t.js → listbox-DCWdrjFp.js} +5 -5
- package/dist/{loader-ndMy12Pb.cjs → loader--5h6NKGl.cjs} +1 -1
- package/dist/{loader-DhmtCyQA.js → loader-xkMMWgaj.js} +5 -5
- package/dist/{messagebox-DZDP8XZt.js → messagebox-BLTBG8nD.js} +5 -5
- package/dist/{messagebox-B0kgftoP.cjs → messagebox-IJOkv427.cjs} +1 -1
- package/dist/{modal-nU8cELiR.js → modal-C6ljjVs6.js} +5 -5
- package/dist/{modal-C8GbUY8p.cjs → modal-CBURcXBd.cjs} +1 -1
- 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 +1 -1
- package/dist/pkt-heading.cjs +1 -1
- package/dist/pkt-heading.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 +1 -1
- package/dist/pkt-index.cjs +1 -1
- package/dist/pkt-index.js +29 -29
- 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-listbox.cjs +1 -1
- package/dist/pkt-listbox.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-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-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-BKt_aj7f.js → progressbar-BSO0KWzv.js} +5 -5
- package/dist/{progressbar-DiRfScnB.cjs → progressbar-BrXtjUvh.cjs} +1 -1
- package/dist/{radiobutton-DGWTMdAZ.cjs → radiobutton-C7tqzN0V.cjs} +1 -1
- package/dist/{radiobutton-CET0zjgD.js → radiobutton-CxEBrLss.js} +5 -5
- package/dist/{ref-BvbyvXRH.cjs → ref-B-w1vCo8.cjs} +1 -1
- package/dist/{ref-iIffqQAI.js → ref-DnSbnXsj.js} +2 -2
- package/dist/{repeat-BnuruAat.cjs → repeat-CxQA3AeF.cjs} +1 -1
- package/dist/{repeat-D4kMediE.js → repeat-lUFq9w5d.js} +2 -2
- package/dist/{select-ChpPtH7u.cjs → select-BUvu5SFp.cjs} +1 -1
- package/dist/{select-C2Lr2fdU.js → select-BVBllbIG.js} +7 -7
- package/dist/{state-BtbpSrdV.js → state-BxrO4zNJ.js} +1 -1
- package/dist/{state-B5KCNjEd.cjs → state-D-Recv7U.cjs} +1 -1
- package/dist/{tag-Cu8afZy8.js → tag-CX-zbR-7.js} +6 -6
- package/dist/{tag-B9kFYxHg.cjs → tag-lU4vz70a.cjs} +1 -1
- package/dist/{textarea-l10XGym1.js → textarea-CmXiVLbl.js} +9 -9
- package/dist/{textarea-yUzqcBYY.cjs → textarea-j8kBS-hf.cjs} +1 -1
- package/dist/{textinput-B1n0gFaS.js → textinput-LLaLZX3h.js} +19 -16
- package/dist/{textinput-8mT0npMY.cjs → textinput-kmcj-FlC.cjs} +9 -6
- package/package.json +3 -3
- package/src/components/combobox/combobox.ts +4 -3
- package/src/components/select/select.ts +1 -2
- package/src/components/textinput/textinput.ts +3 -0
- package/dist/input-element-DK0UmdGZ.cjs +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { P as f, x as l, n as o, a as d } from "./element-
|
|
1
|
+
import { P as f, x as l, n as o, a as d } from "./element-gAd63VwC.js";
|
|
2
2
|
import { P as g } from "./pkt-slot-controller-DtDaD9q_.js";
|
|
3
|
-
import { e as r } from "./class-map-
|
|
4
|
-
import { e as $, n as i } from "./ref-
|
|
3
|
+
import { e as r } from "./class-map-m7ZCZ49w.js";
|
|
4
|
+
import { e as $, n as i } from "./ref-DnSbnXsj.js";
|
|
5
5
|
var S = Object.defineProperty, y = Object.getOwnPropertyDescriptor, a = (t, n, p, h) => {
|
|
6
6
|
for (var e = h > 1 ? void 0 : h ? y(n, p) : n, u = t.length - 1, c; u >= 0; u--)
|
|
7
7
|
(c = t[u]) && (e = (h ? c(n, p, e) : c(e)) || e);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("./element-
|
|
1
|
+
"use strict";const e=require("./element-90YeMNbV.cjs"),c=require("./pkt-slot-controller-Da-RgXfS.cjs"),l=require("./class-map-DWDPOqjO.cjs"),n=require("./ref-B-w1vCo8.cjs");var p=Object.defineProperty,d=Object.getOwnPropertyDescriptor,r=(a,t,o,i)=>{for(var s=i>1?void 0:i?d(t,o):t,h=a.length-1,u;h>=0;h--)(u=a[h])&&(s=(i?u(t,o,s):u(s))||s);return i&&s&&p(t,o,s),s};exports.PktHeading=class extends e.PktElement{constructor(){super(),this.defaultSlot=n.e(),this.size="medium",this.level=2,this.noSpacing=!0,this.visuallyHidden=!1,this.align="start",this.slotController=new c.PktSlotController(this,this.defaultSlot)}render(){const t={"pkt-heading":!0,[`pkt-heading--${this.size}`]:this.size,"pkt-heading--noSpacing":this.noSpacing,"pkt-sr-only":this.visuallyHidden,[`pkt-heading--${this.align}`]:this.align};switch(this.level){case 2:return e.x`<h2 class=${l.e(t)} ${n.n(this.defaultSlot)}></h2>`;case 3:return e.x`<h3 class=${l.e(t)} ${n.n(this.defaultSlot)}></h3>`;case 4:return e.x`<h4 class=${l.e(t)} ${n.n(this.defaultSlot)}></h4>`;case 5:return e.x`<h5 class=${l.e(t)} ${n.n(this.defaultSlot)}></h5>`;case 6:return e.x`<h6 class=${l.e(t)} ${n.n(this.defaultSlot)}></h6>`;case 1:default:return e.x`<h1 class=${l.e(t)} ${n.n(this.defaultSlot)}></h1>`}}};r([e.n({type:String,reflect:!0})],exports.PktHeading.prototype,"size",2);r([e.n({type:Number,reflect:!0})],exports.PktHeading.prototype,"level",2);r([e.n({type:Boolean,reflect:!0})],exports.PktHeading.prototype,"noSpacing",2);r([e.n({type:Boolean,reflect:!0})],exports.PktHeading.prototype,"visuallyHidden",2);r([e.n({type:String,reflect:!0})],exports.PktHeading.prototype,"align",2);exports.PktHeading=r([e.t("pkt-heading")],exports.PktHeading);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const e=require("./element-
|
|
1
|
+
"use strict";const e=require("./element-90YeMNbV.cjs"),x=require("./ref-B-w1vCo8.cjs"),h=require("./icon-B1_BRNqf.cjs"),u=require("./class-map-DWDPOqjO.cjs"),c=require("./state-D-Recv7U.cjs"),a=require("./stringutils-CkVRq4jP.cjs"),d=require("./input-wrapper-EoSAbU-U.cjs"),k=require("./pkt-slot-controller-Da-RgXfS.cjs");var _=Object.defineProperty,w=Object.getOwnPropertyDescriptor,r=(s,p,l,n)=>{for(var t=n>1?void 0:n?w(p,l):p,o=s.length-1,i;o>=0;o--)(i=s[o])&&(t=(n?i(p,l,t):i(t))||t);return n&&t&&_(p,l,t),t};exports.PktHelptext=class extends e.PktElement{constructor(){super(),this.defaultSlot=x.e(),this.forId=a.uuidish(),this.helptext="",this.helptextDropdown="",this.helptextDropdownButton=d.specs.props.helptextDropdownButton.default,this.isHelpTextOpen=!1,this.slotController=new k.PktSlotController(this,this.defaultSlot)}render(){const p=()=>{const t=!this.isHelpTextOpen;this.isHelpTextOpen=t,this.dispatchEvent(new CustomEvent("toggleHelpText",{bubbles:!0,detail:{isOpen:t}}))},l=()=>this.helptextDropdown?e.x`<div class="pkt-inputwrapper__helptext-expandable">
|
|
2
2
|
<button
|
|
3
3
|
class="pkt-link pkt-link--icon-right pkt-btn pkt-btn--small pkt-btn--tertiary pkt-btn--icon-right"
|
|
4
4
|
type="button"
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { P as d, x as a, E as u, n as i, a as c } from "./element-
|
|
2
|
-
import { e as f, n as m } from "./ref-
|
|
3
|
-
import { o as x } from "./icon-
|
|
4
|
-
import { e as _ } from "./class-map-
|
|
5
|
-
import { r as w } from "./state-
|
|
1
|
+
import { P as d, x as a, E as u, n as i, a as c } from "./element-gAd63VwC.js";
|
|
2
|
+
import { e as f, n as m } from "./ref-DnSbnXsj.js";
|
|
3
|
+
import { o as x } from "./icon-CO1TLSs5.js";
|
|
4
|
+
import { e as _ } from "./class-map-m7ZCZ49w.js";
|
|
5
|
+
import { r as w } from "./state-BxrO4zNJ.js";
|
|
6
6
|
import { u as v } from "./stringutils-DJjRa8dG.js";
|
|
7
7
|
import { s as k } from "./input-wrapper-8iKEzDRZ.js";
|
|
8
8
|
import { P as b } from "./pkt-slot-controller-DtDaD9q_.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const o=require("./element-
|
|
1
|
+
"use strict";const o=require("./element-90YeMNbV.cjs"),a=require("./directive-C7oCP5Bh.cjs");/**
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright 2017 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
package/dist/index.d.ts
CHANGED
|
@@ -773,6 +773,7 @@ declare class PktInputElement<T = {}> extends PktElement<Props_2 & T> {
|
|
|
773
773
|
maxlength: number | null;
|
|
774
774
|
min: string | number | null;
|
|
775
775
|
minlength: number | null;
|
|
776
|
+
step: number | null;
|
|
776
777
|
ariaDescribedBy: string | null;
|
|
777
778
|
ariaLabelledby: string | null;
|
|
778
779
|
name: string;
|
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
import { P as
|
|
2
|
-
import { r as
|
|
3
|
-
import { u as
|
|
4
|
-
import { s as
|
|
5
|
-
var
|
|
6
|
-
for (var
|
|
7
|
-
(o = u[
|
|
8
|
-
return
|
|
1
|
+
import { P as g, t as a, n as s } from "./element-gAd63VwC.js";
|
|
2
|
+
import { r as v } from "./state-BxrO4zNJ.js";
|
|
3
|
+
import { u as b } from "./stringutils-DJjRa8dG.js";
|
|
4
|
+
import { s as V } from "./input-wrapper-8iKEzDRZ.js";
|
|
5
|
+
var k = Object.defineProperty, e = (u, t, r, n) => {
|
|
6
|
+
for (var l = void 0, h = u.length - 1, o; h >= 0; h--)
|
|
7
|
+
(o = u[h]) && (l = o(t, r, l) || l);
|
|
8
|
+
return l && k(t, r, l), l;
|
|
9
9
|
};
|
|
10
|
-
class i extends
|
|
10
|
+
class i extends g {
|
|
11
11
|
constructor() {
|
|
12
|
-
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.ariaDescribedBy = null, this.ariaLabelledby = null, this.name = "", this.pattern = null, this.placeholder = null, this.id =
|
|
12
|
+
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 = b(), 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 = V.props.helptextDropdownButton.default, this.label = null, this.optionalText = a.forms.labels.optional, this.requiredText = a.forms.labels.required, this.dataTestid = "", this.touched = !1, this.internals = this.attachInternals();
|
|
13
13
|
}
|
|
14
14
|
static get formAssociated() {
|
|
15
15
|
return !0;
|
|
16
16
|
}
|
|
17
17
|
manageValidity(t) {
|
|
18
|
-
var r,
|
|
19
|
-
t && (this.required && !this.value ? this.internals.setValidity({ valueMissing: !0 },
|
|
18
|
+
var r, n, l, h, o, p, d, f, c, m, y;
|
|
19
|
+
t && (this.required && !this.value ? this.internals.setValidity({ valueMissing: !0 }, a.forms.messages.required, t) : (r = t.validity) != null && r.typeMismatch || (n = t.validity) != null && n.badInput ? this.internals.setValidity({ typeMismatch: !0 }, a.forms.messages.invalid, t) : (l = t.validity) != null && l.patternMismatch ? this.internals.setValidity(
|
|
20
20
|
{ patternMismatch: !0 },
|
|
21
|
-
|
|
21
|
+
a.forms.messages.invalidPattern,
|
|
22
22
|
t
|
|
23
|
-
) : (
|
|
23
|
+
) : (h = t.validity) != null && h.tooShort || this.minlength && this.minlength > 0 && this.value.length < this.minlength ? this.internals.setValidity({ tooShort: !0 }, a.forms.messages.tooShort, t) : (o = t.validity) != null && o.tooLong || this.maxlength && this.maxlength > 0 && this.value.length > this.maxlength ? this.internals.setValidity({ tooLong: !0 }, a.forms.messages.tooLong, t) : (p = t.validity) != null && p.rangeUnderflow ? this.internals.setValidity(
|
|
24
24
|
{ rangeUnderflow: !0 },
|
|
25
|
-
|
|
25
|
+
this.min ? a.forms.messages.rangeUnderflowMin.replace("{min}", (d = this.min) == null ? void 0 : d.toString()) : a.forms.messages.rangeUnderflow,
|
|
26
26
|
t
|
|
27
|
-
) : (
|
|
27
|
+
) : (f = t.validity) != null && f.stepMismatch ? this.internals.setValidity({ stepMismatch: !0 }, a.forms.messages.invalid, t) : (c = t.validity) != null && c.rangeOverflow ? this.internals.setValidity(
|
|
28
28
|
{ rangeOverflow: !0 },
|
|
29
|
-
|
|
29
|
+
this.max ? a.forms.messages.rangeOverflowMax.replace("{max}", (m = this.max) == null ? void 0 : m.toString()) : a.forms.messages.rangeOverflow,
|
|
30
30
|
t
|
|
31
|
-
) : (
|
|
31
|
+
) : (y = t.validity) != null && y.customError ? this.internals.setValidity({ customError: !0 }, t.validationMessage, t) : this.internals.setValidity({}));
|
|
32
32
|
}
|
|
33
33
|
setFormValue(t) {
|
|
34
34
|
if (this.internals)
|
|
35
35
|
if (Array.isArray(t)) {
|
|
36
36
|
const r = new FormData();
|
|
37
|
-
t.forEach((
|
|
38
|
-
r.append(this.name,
|
|
37
|
+
t.forEach((n) => {
|
|
38
|
+
r.append(this.name, n);
|
|
39
39
|
}), this.internals.setFormValue(r);
|
|
40
40
|
} else
|
|
41
41
|
this.internals.setFormValue(t);
|
|
@@ -44,13 +44,13 @@ class i extends c {
|
|
|
44
44
|
// Do not use valueChanged or onChange for radios and checkboxes!
|
|
45
45
|
valueChecked(t) {
|
|
46
46
|
if (!this.touched) return;
|
|
47
|
-
const r = this.internals.form || this.closest("form"),
|
|
47
|
+
const r = this.internals.form || this.closest("form"), n = r ? new FormData(r) : null;
|
|
48
48
|
r && r.querySelectorAll(
|
|
49
49
|
`pkt-radiobutton[name="${this.name}"], input[type=radio][name="${this.name}"]`
|
|
50
|
-
).forEach((
|
|
51
|
-
const
|
|
52
|
-
|
|
53
|
-
}), typeof t == "string" ? (this.checked = t === "true", this.internals.ariaChecked = t === "true") : typeof t == "boolean" && (this.checked = t, this.internals.ariaChecked = t), this.checked ? (this.internals.setFormValue(this.value || "on", this.value || "on"),
|
|
50
|
+
).forEach((l) => {
|
|
51
|
+
const h = l;
|
|
52
|
+
h.name === this.name && h.value !== this.value && h.checked && (h.checked = !1);
|
|
53
|
+
}), typeof t == "string" ? (this.checked = t === "true", this.internals.ariaChecked = t === "true") : typeof t == "boolean" && (this.checked = t, this.internals.ariaChecked = t), this.checked ? (this.internals.setFormValue(this.value || "on", this.value || "on"), n && n.append(this.name, this.value || "on"), this.internals.states.add("--checked")) : (this.internals.setFormValue(null, null), n && n.delete(this.name), this.internals.states.delete("--checked")), this.dispatchEvent(new Event("change", { bubbles: !0, composed: !0 })), this.dispatchEvent(
|
|
54
54
|
new CustomEvent("value-change", {
|
|
55
55
|
detail: this.checked,
|
|
56
56
|
bubbles: !0,
|
|
@@ -96,7 +96,7 @@ class i extends c {
|
|
|
96
96
|
bubbles: !0,
|
|
97
97
|
composed: !0
|
|
98
98
|
})
|
|
99
|
-
)
|
|
99
|
+
));
|
|
100
100
|
}
|
|
101
101
|
formResetCallback() {
|
|
102
102
|
this.touched = !1, this._options && this._options.length && this._options.forEach((t) => {
|
|
@@ -146,6 +146,9 @@ e([
|
|
|
146
146
|
e([
|
|
147
147
|
s({ type: Number, reflect: !0 })
|
|
148
148
|
], i.prototype, "minlength");
|
|
149
|
+
e([
|
|
150
|
+
s({ type: Number, reflect: !0 })
|
|
151
|
+
], i.prototype, "step");
|
|
149
152
|
e([
|
|
150
153
|
s({ type: String })
|
|
151
154
|
], i.prototype, "ariaDescribedBy");
|
|
@@ -219,7 +222,7 @@ e([
|
|
|
219
222
|
s({ type: String, attribute: "data-testid" })
|
|
220
223
|
], i.prototype, "dataTestid");
|
|
221
224
|
e([
|
|
222
|
-
|
|
225
|
+
v()
|
|
223
226
|
], i.prototype, "touched");
|
|
224
227
|
export {
|
|
225
228
|
i as P
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("./element-90YeMNbV.cjs"),y=require("./state-D-Recv7U.cjs"),g=require("./stringutils-CkVRq4jP.cjs"),v=require("./input-wrapper-EoSAbU-U.cjs");var b=Object.defineProperty,i=(o,t,a,l)=>{for(var r=void 0,n=o.length-1,h;n>=0;n--)(h=o[n])&&(r=h(t,a,r)||r);return r&&b(t,a,r),r};class s extends e.PktElement{constructor(){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=g.uuidish(),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=v.specs.props.helptextDropdownButton.default,this.label=null,this.optionalText=e.translations.forms.labels.optional,this.requiredText=e.translations.forms.labels.required,this.dataTestid="",this.touched=!1,this.internals=this.attachInternals()}static get formAssociated(){return!0}manageValidity(t){var a,l,r,n,h,u,p,d,f,c,m;t&&(this.required&&!this.value?this.internals.setValidity({valueMissing:!0},e.translations.forms.messages.required,t):(a=t.validity)!=null&&a.typeMismatch||(l=t.validity)!=null&&l.badInput?this.internals.setValidity({typeMismatch:!0},e.translations.forms.messages.invalid,t):(r=t.validity)!=null&&r.patternMismatch?this.internals.setValidity({patternMismatch:!0},e.translations.forms.messages.invalidPattern,t):(n=t.validity)!=null&&n.tooShort||this.minlength&&this.minlength>0&&this.value.length<this.minlength?this.internals.setValidity({tooShort:!0},e.translations.forms.messages.tooShort,t):(h=t.validity)!=null&&h.tooLong||this.maxlength&&this.maxlength>0&&this.value.length>this.maxlength?this.internals.setValidity({tooLong:!0},e.translations.forms.messages.tooLong,t):(u=t.validity)!=null&&u.rangeUnderflow?this.internals.setValidity({rangeUnderflow:!0},this.min?e.translations.forms.messages.rangeUnderflowMin.replace("{min}",(p=this.min)==null?void 0:p.toString()):e.translations.forms.messages.rangeUnderflow,t):(d=t.validity)!=null&&d.stepMismatch?this.internals.setValidity({stepMismatch:!0},e.translations.forms.messages.invalid,t):(f=t.validity)!=null&&f.rangeOverflow?this.internals.setValidity({rangeOverflow:!0},this.max?e.translations.forms.messages.rangeOverflowMax.replace("{max}",(c=this.max)==null?void 0:c.toString()):e.translations.forms.messages.rangeOverflow,t):(m=t.validity)!=null&&m.customError?this.internals.setValidity({customError:!0},t.validationMessage,t):this.internals.setValidity({}))}setFormValue(t){if(this.internals)if(Array.isArray(t)){const a=new FormData;t.forEach(l=>{a.append(this.name,l)}),this.internals.setFormValue(a)}else this.internals.setFormValue(t)}valueChecked(t){if(!this.touched)return;const a=this.internals.form||this.closest("form"),l=a?new FormData(a):null;a&&a.querySelectorAll(`pkt-radiobutton[name="${this.name}"], input[type=radio][name="${this.name}"]`).forEach(r=>{const n=r;n.name===this.name&&n.value!==this.value&&n.checked&&(n.checked=!1)}),typeof t=="string"?(this.checked=t==="true",this.internals.ariaChecked=t==="true"):typeof t=="boolean"&&(this.checked=t,this.internals.ariaChecked=t),this.checked?(this.internals.setFormValue(this.value||"on",this.value||"on"),l&&l.append(this.name,this.value||"on"),this.internals.states.add("--checked")):(this.internals.setFormValue(null,null),l&&l.delete(this.name),this.internals.states.delete("--checked")),this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("value-change",{detail:this.checked,bubbles:!0,composed:!0})),this.internals.reportValidity()}valueChanged(t,a){(a!==this.value||a!==this._value)&&(typeof t=="string"?((this.multiple||this.range)&&t.includes(",")&&(t=t.split(",")),this.value=t,this._value=Array.isArray(t)?t:[t]):Array.isArray(t)?(this.value=this.multiple||this.range?t:t[0],this._value=t):(this.value="",this._value=[]),(!this.value||this.value.length===0)&&a&&a.length!==0?this.clearInputValue():this.value&&this.value.toString()!==(a==null?void 0:a.toString())&&this.onChange(this.value),this.updateComplete.then(()=>this.requestUpdate()))}clearInputValue(){const t=this.multiple||this.range?[]:"";this.value=t,this.internals.setFormValue(t),this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("value-change",{detail:t,bubbles:!0,composed:!0}))}onFocus(){this.dispatchEvent(new FocusEvent("focus",{bubbles:!0,composed:!0}))}onBlur(){this.dispatchEvent(new FocusEvent("blur",{bubbles:!0,composed:!0}))}onInput(){this.dispatchEvent(new InputEvent("input",{bubbles:!0,composed:!0}))}onChange(t){if(!this.touched){this.touched=!0,t&&this.setFormValue(t);return}typeof t!="string"&&!Array.isArray(t)||((this.range||this.multiple)&&!Array.isArray(t)&&t.includes(",")&&(t=t.split(",")),!this.multiple&&!this.range&&Array.isArray(t)&&(t=t[0]),this.setFormValue(t),this.manageValidity(this.inputRef.value),this.inputRefTo&&this.manageValidity(this.inputRefTo.value),this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("value-change",{detail:t,bubbles:!0,composed:!0})))}formResetCallback(){this.touched=!1,this._options&&this._options.length&&this._options.forEach(t=>{t.selected=!1}),this.checked!==void 0?(this.checked=!1,this.internals.ariaChecked=!1,this.internals.setFormValue("",""),this.inputRef.value.checked=!1,this.valueChecked(this.checked)):(this.internals.setFormValue(""),this.value=this.defaultValue||(this.multiple||this.range?[]:""),this._value=this.value,this.valueChanged(this.value,null)),this.internals.ariaInvalid=!1}updated(t){super.updated(t),t.has("dataTestid")&&this.dataTestid&&this.inputRef.value&&(this.skipForwardTestid?this.hasAttribute("data-testid")||this.setAttribute("data-testid",this.dataTestid):(this.inputRef.value.dataset.testid=this.dataTestid,this.removeAttribute("data-testid")))}firstUpdated(t){if(super.firstUpdated(t),!this.form){const a=this.internals.form||this.closest("form");this.form=a}if(this.value&&this.defaultValue!==null&&(this.defaultValue=this.value),this.defaultValue!==null&&!this.value&&this.valueChanged(this.defaultValue,null),this.defaultChecked&&(this.internals.ariaChecked=!0,this.checked=!0),this.required&&(this.internals.ariaRequired=!0),this.disabled&&(this.internals.ariaDisabled=!0),this.id&&!this.name&&(this.name=this.id),this.checked!==void 0){const a=this.checked===""||this.checked==="true"||this.checked===!0;this.internals.ariaChecked=a,this.internals.setFormValue(a?this.value||"on":"",a?this.value||"on":"")}else this.internals.setFormValue(this.value);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))}}i([e.n()],s.prototype,"defaultValue");i([e.n({type:Boolean,reflect:!0})],s.prototype,"disabled");i([e.n({type:Boolean,reflect:!0})],s.prototype,"readonly");i([e.n({type:Boolean,reflect:!0})],s.prototype,"required");i([e.n({type:Number,reflect:!0})],s.prototype,"max");i([e.n({type:Number,reflect:!0})],s.prototype,"maxlength");i([e.n({type:Number,reflect:!0})],s.prototype,"min");i([e.n({type:Number,reflect:!0})],s.prototype,"minlength");i([e.n({type:Number,reflect:!0})],s.prototype,"step");i([e.n({type:String})],s.prototype,"ariaDescribedBy");i([e.n({type:String})],s.prototype,"ariaLabelledby");i([e.n({type:String,reflect:!0})],s.prototype,"name");i([e.n({type:String,reflect:!0})],s.prototype,"pattern");i([e.n({type:String,reflect:!0})],s.prototype,"placeholder");i([e.n({type:String,reflect:!0})],s.prototype,"id");i([e.n({type:Boolean})],s.prototype,"counter");i([e.n({type:Boolean})],s.prototype,"hasError");i([e.n({type:Boolean})],s.prototype,"inline");i([e.n({type:Boolean})],s.prototype,"hasFieldset");i([e.n({type:Boolean})],s.prototype,"optionalTag");i([e.n({type:Boolean})],s.prototype,"requiredTag");i([e.n({type:Boolean})],s.prototype,"skipForwardTestid");i([e.n({type:Boolean,reflect:!1})],s.prototype,"useWrapper");i([e.n({type:Boolean,reflect:!0})],s.prototype,"fullwidth");i([e.n({type:Number})],s.prototype,"counterMaxLength");i([e.n({type:String})],s.prototype,"errorMessage");i([e.n({type:String})],s.prototype,"helptext");i([e.n({type:String})],s.prototype,"helptextDropdown");i([e.n({type:String,reflect:!1})],s.prototype,"helptextDropdownButton");i([e.n({type:String})],s.prototype,"label");i([e.n({type:String,reflect:!1})],s.prototype,"optionalText");i([e.n({type:String,reflect:!1})],s.prototype,"requiredText");i([e.n({type:String,attribute:"data-testid"})],s.prototype,"dataTestid");i([y.r()],s.prototype,"touched");exports.PktInputElement=s;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const t=require("./element-
|
|
1
|
+
"use strict";const t=require("./element-90YeMNbV.cjs"),b=require("./pkt-slot-controller-Da-RgXfS.cjs"),a=require("./ref-B-w1vCo8.cjs"),y=require("./icon-B1_BRNqf.cjs"),c=require("./class-map-DWDPOqjO.cjs"),f=require("./state-D-Recv7U.cjs"),$=require("./stringutils-CkVRq4jP.cjs"),p=require("./input-wrapper-EoSAbU-U.cjs");require("./helptext-AqNI_oFG.cjs");var I=Object.defineProperty,P=Object.getOwnPropertyDescriptor,e=(u,r,i,o)=>{for(var s=o>1?void 0:o?P(r,i):r,n=u.length-1,l;n>=0;n--)(l=u[n])&&(s=(o?l(r,i,s):l(s))||s);return o&&s&&I(r,i,s),s};exports.PktInputWrapper=class extends t.PktElement{constructor(){super(),this.defaultSlot=a.e(),this.helptextSlot=a.e(),this.hasHelptextSlot=!0,this.forId=$.uuidish(),this.label="",this.helptext=null,this.helptextDropdown=null,this.helptextDropdownButton=null,this.counter=p.specs.props.counter.default,this.counterCurrent=0,this.counterMaxLength=0,this.counterError=null,this.counterPosition="bottom",this.optionalTag=p.specs.props.optionalTag.default,this.optionalText=p.specs.props.optionalText.default,this.requiredTag=p.specs.props.requiredTag.default,this.requiredText=p.specs.props.requiredText.default,this.hasError=p.specs.props.hasError.default,this.errorMessage="",this.disabled=p.specs.props.disabled.default,this.inline=p.specs.props.inline.default,this.ariaDescribedby=void 0,this.hasFieldset=p.specs.props.hasFieldset.default,this.useWrapper=p.specs.props.useWrapper.default,this.role="group",this.slotController=new b.PktSlotController(this,this.defaultSlot,this.helptextSlot)}updateSlots(r){this.hasHelptextSlot=r.has("helptext"),this.requestUpdate()}updated(r){super.updated(r)}render(){const r={"pkt-inputwrapper":!0,"pkt-inputwrapper--error":this.hasError,"pkt-inputwrapper--disabled":this.disabled,"pkt-inputwrapper--inline":this.inline},i={"pkt-tag":!0,"pkt-tag--small":!0,"pkt-tag--thin-text":!0,"pkt-tag--blue-light":this.optionalTag,"pkt-tag--beige":!this.optionalTag&&this.requiredTag},o=this.ariaDescribedby?this.ariaDescribedby:this.helptext?`${this.forId}-helptext`:t.E,s=()=>this.optionalTag||this.requiredTag?t.x`<span class=${c.e(i)}
|
|
2
2
|
>${this.optionalTag?this.optionalText:this.requiredTag?this.requiredText:t.E}</span
|
|
3
3
|
>`:t.E,n=()=>this.useWrapper?this.hasFieldset?t.x`<legend
|
|
4
4
|
class="pkt-inputwrapper__legend"
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { P as m, E as s, x as p, n as r, a as k } from "./element-
|
|
1
|
+
import { P as m, E as s, x as p, n as r, a as k } from "./element-gAd63VwC.js";
|
|
2
2
|
import { P as v } from "./pkt-slot-controller-DtDaD9q_.js";
|
|
3
|
-
import { e as f, n as g } from "./ref-
|
|
4
|
-
import { o as w } from "./icon-
|
|
5
|
-
import { e as b } from "./class-map-
|
|
6
|
-
import { r as S } from "./state-
|
|
3
|
+
import { e as f, n as g } from "./ref-DnSbnXsj.js";
|
|
4
|
+
import { o as w } from "./icon-CO1TLSs5.js";
|
|
5
|
+
import { e as b } from "./class-map-m7ZCZ49w.js";
|
|
6
|
+
import { r as S } from "./state-BxrO4zNJ.js";
|
|
7
7
|
import { u as T } from "./stringutils-DJjRa8dG.js";
|
|
8
8
|
import { s as i } from "./input-wrapper-8iKEzDRZ.js";
|
|
9
|
-
import "./helptext-
|
|
9
|
+
import "./helptext-DBearL3P.js";
|
|
10
10
|
var E = Object.defineProperty, _ = Object.getOwnPropertyDescriptor, e = (o, h, a, n) => {
|
|
11
11
|
for (var l = n > 1 ? void 0 : n ? _(h, a) : h, u = o.length - 1, d; u >= 0; u--)
|
|
12
12
|
(d = o[u]) && (l = (n ? d(h, a, l) : d(l)) || l);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const t=require("./element-
|
|
1
|
+
"use strict";const t=require("./element-90YeMNbV.cjs"),f=require("./pkt-slot-controller-Da-RgXfS.cjs"),c=require("./ref-B-w1vCo8.cjs"),h=require("./class-map-DWDPOqjO.cjs");require("./icon-B1_BRNqf.cjs");const k={href:{default:"#"},target:{default:"_self"},external:{default:!1}},a={props:k};var u=Object.defineProperty,P=Object.getOwnPropertyDescriptor,n=(o,r,s,i)=>{for(var e=i>1?void 0:i?P(r,s):r,l=o.length-1,p;l>=0;l--)(p=o[l])&&(e=(i?p(r,s,e):p(e))||e);return i&&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=a.props.external.default,this.target=a.props.target.default,this.slotController=new f.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=${h.e(r)}
|
|
3
3
|
href=${this.href}
|
|
4
4
|
.target=${this.target}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { P as h, E as u, x as f, n as o, a as m } from "./element-
|
|
1
|
+
import { P as h, E as u, x as f, n as o, a as m } from "./element-gAd63VwC.js";
|
|
2
2
|
import { P } from "./pkt-slot-controller-DtDaD9q_.js";
|
|
3
|
-
import { e as k, n as g } from "./ref-
|
|
4
|
-
import { e as d } from "./class-map-
|
|
5
|
-
import "./icon-
|
|
3
|
+
import { e as k, n as g } from "./ref-DnSbnXsj.js";
|
|
4
|
+
import { e as d } from "./class-map-m7ZCZ49w.js";
|
|
5
|
+
import "./icon-CO1TLSs5.js";
|
|
6
6
|
const x = {
|
|
7
7
|
href: {
|
|
8
8
|
default: "#"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const t=require("./element-
|
|
1
|
+
"use strict";const t=require("./element-90YeMNbV.cjs"),k=require("./ref-B-w1vCo8.cjs"),p=require("./pkt-slot-controller-Da-RgXfS.cjs");require("./icon-B1_BRNqf.cjs");var c=Object.defineProperty,h=Object.getOwnPropertyDescriptor,r=(s,n,i,l)=>{for(var e=l>1?void 0:l?h(n,i):n,o=s.length-1,a;o>=0;o--)(a=s[o])&&(e=(l?a(n,i,e):a(e))||e);return l&&e&&c(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
|
-
import { P as f, x as c, n, a as h } from "./element-
|
|
2
|
-
import { e as k, n as m } from "./ref-
|
|
1
|
+
import { P as f, x as c, n, a as h } from "./element-gAd63VwC.js";
|
|
2
|
+
import { e as k, n as m } from "./ref-DnSbnXsj.js";
|
|
3
3
|
import { P as u } from "./pkt-slot-controller-DtDaD9q_.js";
|
|
4
|
-
import "./icon-
|
|
4
|
+
import "./icon-CO1TLSs5.js";
|
|
5
5
|
var _ = Object.defineProperty, d = Object.getOwnPropertyDescriptor, r = (l, i, s, o) => {
|
|
6
6
|
for (var e = o > 1 ? void 0 : o ? d(i, s) : i, a = l.length - 1, p; a >= 0; a--)
|
|
7
7
|
(p = l[a]) && (e = (o ? p(i, s, e) : p(e)) || e);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const s=require("./element-
|
|
1
|
+
"use strict";const s=require("./element-90YeMNbV.cjs"),p=require("./state-D-Recv7U.cjs"),h=require("./if-defined-C8eotHpL.cjs"),u=require("./repeat-CxQA3AeF.cjs"),c=require("./class-map-DWDPOqjO.cjs"),d=require("./stringutils-CkVRq4jP.cjs");var b=Object.defineProperty,f=Object.getOwnPropertyDescriptor,n=(r,e,t,i)=>{for(var a=i>1?void 0:i?f(e,t):e,o=r.length-1,l;o>=0;o--)(l=r[o])&&(a=(i?l(e,t,a):l(a))||a);return i&&a&&b(e,t,a),a};exports.PktListbox=class extends s.PktElement{constructor(){super(...arguments),this.id=d.uuidish(),this.label=null,this.options=[],this.isOpen=!1,this.disabled=!1,this.includeSearch=!1,this.isMultiSelect=!1,this.allowUserInput=!1,this.maxIsReached=!1,this.customUserInput=null,this.searchPlaceholder=null,this.searchValue=null,this.maxLength=0,this.userMessage=null,this._selectedOptions=0,this._filteredOptions=[]}connectedCallback(){super.connectedCallback(),this.includeSearch&&!this.searchValue&&(this.searchValue=""),this.options.length>0&&this.filterOptions(),this.setAttribute("tabindex","-1"),this.addEventListener("focus",this.focusFirstOrSelectedOption)}updated(e){(e.has("options")||e.has("searchValue"))&&this.filterOptions(),super.updated(e)}attributeChangedCallback(e,t,i){(e==="options"||e==="searchValue"||e==="search-value")&&this.filterOptions(),super.attributeChangedCallback(e,t,i)}render(){return s.x`
|
|
2
2
|
<div
|
|
3
3
|
class=${c.e({"pkt-listbox":!0,"pkt-listbox__open":this.isOpen,"pkt-txt-16-light":!0})}
|
|
4
4
|
role="listbox"
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { P as u, x as r, E as p, t as b, n as l, a as f } from "./element-
|
|
2
|
-
import { r as m } from "./state-
|
|
3
|
-
import { o as y } from "./if-defined-
|
|
4
|
-
import { c as k } from "./repeat-
|
|
5
|
-
import { e as d } from "./class-map-
|
|
1
|
+
import { P as u, x as r, E as p, t as b, n as l, a as f } from "./element-gAd63VwC.js";
|
|
2
|
+
import { r as m } from "./state-BxrO4zNJ.js";
|
|
3
|
+
import { o as y } from "./if-defined-Cj-3Kdsr.js";
|
|
4
|
+
import { c as k } from "./repeat-lUFq9w5d.js";
|
|
5
|
+
import { e as d } from "./class-map-m7ZCZ49w.js";
|
|
6
6
|
import { u as x } from "./stringutils-DJjRa8dG.js";
|
|
7
7
|
var O = Object.defineProperty, g = Object.getOwnPropertyDescriptor, a = (e, t, s, o) => {
|
|
8
8
|
for (var n = o > 1 ? void 0 : o ? g(t, s) : t, c = e.length - 1, h; c >= 0; c--)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const t=require("./element-
|
|
1
|
+
"use strict";const t=require("./element-90YeMNbV.cjs"),d=require("./class-map-DWDPOqjO.cjs"),h=require("./state-D-Recv7U.cjs"),p=require("./ref-B-w1vCo8.cjs"),u=require("./pkt-slot-controller-Da-RgXfS.cjs");require("./icon-B1_BRNqf.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 role="status" aria-live="polite" .aria-busy=${this.isLoading} class=${e}>
|
|
2
2
|
${this.isLoading&&this._shouldDisplayLoader?t.x`<div class="pkt-loader__spinner">
|
|
3
3
|
<pkt-icon
|
|
4
4
|
name=${this.getVariant(this.variant)}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { P as u, E as m, x as d, n as a, a as y } from "./element-
|
|
2
|
-
import { e as h } from "./class-map-
|
|
3
|
-
import { r as c } from "./state-
|
|
4
|
-
import { e as f, n as g } from "./ref-
|
|
1
|
+
import { P as u, E as m, x as d, n as a, a as y } from "./element-gAd63VwC.js";
|
|
2
|
+
import { e as h } from "./class-map-m7ZCZ49w.js";
|
|
3
|
+
import { r as c } from "./state-BxrO4zNJ.js";
|
|
4
|
+
import { e as f, n as g } from "./ref-DnSbnXsj.js";
|
|
5
5
|
import { P as v } from "./pkt-slot-controller-DtDaD9q_.js";
|
|
6
|
-
import "./icon-
|
|
6
|
+
import "./icon-CO1TLSs5.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,9 +1,9 @@
|
|
|
1
|
-
import { P as b, E as u, x as n, n as p, a as m } from "./element-
|
|
1
|
+
import { P as b, E as u, x as n, n as p, a as m } from "./element-gAd63VwC.js";
|
|
2
2
|
import { P as h } from "./pkt-slot-controller-DtDaD9q_.js";
|
|
3
|
-
import { e as f, n as k } from "./ref-
|
|
4
|
-
import { e as _ } from "./class-map-
|
|
5
|
-
import { r as v } from "./state-
|
|
6
|
-
import "./icon-
|
|
3
|
+
import { e as f, n as k } from "./ref-DnSbnXsj.js";
|
|
4
|
+
import { e as _ } from "./class-map-m7ZCZ49w.js";
|
|
5
|
+
import { r as v } from "./state-BxrO4zNJ.js";
|
|
6
|
+
import "./icon-CO1TLSs5.js";
|
|
7
7
|
import { u as g } from "./classutils-RQs1k6D9.js";
|
|
8
8
|
const x = {
|
|
9
9
|
skin: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const e=require("./element-
|
|
1
|
+
"use strict";const e=require("./element-90YeMNbV.cjs"),u=require("./pkt-slot-controller-Da-RgXfS.cjs"),n=require("./ref-B-w1vCo8.cjs"),b=require("./class-map-DWDPOqjO.cjs"),d=require("./state-D-Recv7U.cjs");require("./icon-B1_BRNqf.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
|
-
import { e as p } from "./class-map-
|
|
2
|
-
import { P as k, E as f, x as r, n as l, a as v } from "./element-
|
|
3
|
-
import { r as g } from "./state-
|
|
1
|
+
import { e as p } from "./class-map-m7ZCZ49w.js";
|
|
2
|
+
import { P as k, E as f, x as r, n as l, a as v } from "./element-gAd63VwC.js";
|
|
3
|
+
import { r as g } from "./state-BxrO4zNJ.js";
|
|
4
4
|
import { P as _ } from "./pkt-slot-controller-DtDaD9q_.js";
|
|
5
|
-
import { e as u, n as m } from "./ref-
|
|
6
|
-
import "./icon-
|
|
5
|
+
import { e as u, n as m } from "./ref-DnSbnXsj.js";
|
|
6
|
+
import "./icon-CO1TLSs5.js";
|
|
7
7
|
const y = {
|
|
8
8
|
hideCloseButton: {
|
|
9
9
|
default: !1
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const d=require("./class-map-
|
|
1
|
+
"use strict";const d=require("./class-map-DWDPOqjO.cjs"),o=require("./element-90YeMNbV.cjs"),u=require("./state-D-Recv7U.cjs"),k=require("./pkt-slot-controller-Da-RgXfS.cjs"),r=require("./ref-B-w1vCo8.cjs");require("./icon-B1_BRNqf.cjs");const m={hideCloseButton:{default:!1},closeOnBackdropClick:{default:!1},size:{default:"medium"}},h={props:m};var v=Object.defineProperty,f=Object.getOwnPropertyDescriptor,l=(c,t,e,i)=>{for(var s=i>1?void 0:i?f(t,e):t,n=c.length-1,a;n>=0;n--)(a=c[n])&&(s=(i?a(t,e,s):a(s))||s);return i&&s&&v(t,e,s),s};exports.PktModal=class extends o.PktElement{constructor(){super(),this.headingText="",this.removePadding=!1,this.hideCloseButton=h.props.hideCloseButton.default,this.closeOnBackdropClick=h.props.closeOnBackdropClick.default,this.closeButtonSkin="blue",this.size=h.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 k.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",n={"pkt-modal__closeButton":!0,[`pkt-modal__closeButton--${this.closeButtonSkin}`]:!0},a={"pkt-btn":!0,[`pkt-btn--${s?"tertiary":"primary"}`]:!0,"pkt-btn--icon-only":!0,"pkt-btn--medium":!0};return o.x`
|
|
2
2
|
<dialog
|
|
3
3
|
class=${d.e(t)}
|
|
4
4
|
${r.n(this.dialogRef)}
|
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-Dz6jwPpb.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-DkE9or0K.js";
|
|
2
|
+
import { a as c } from "./accordionitem-DkE9or0K.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-D2PhTV94.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-CcAZfB1d.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-D_yRZQCa.cjs"),e=t.PktButton;Object.defineProperty(exports,"PktButton",{enumerable:!0,get:()=>t.PktButton});exports.default=e;
|
package/dist/pkt-button.js
CHANGED
package/dist/pkt-calendar.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./calendar-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./calendar-BDeaGBaH.cjs"),t=e.PktCalendar;Object.defineProperty(exports,"PktCalendar",{enumerable:!0,get:()=>e.PktCalendar});exports.default=t;
|
package/dist/pkt-calendar.js
CHANGED
package/dist/pkt-card.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./card-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./card-CmdIb2X9.cjs"),t=e.PktCard;Object.defineProperty(exports,"PktCard",{enumerable:!0,get:()=>e.PktCard});exports.default=t;
|
package/dist/pkt-card.js
CHANGED
package/dist/pkt-checkbox.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./checkbox-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./checkbox-Dqd2_fcU.cjs"),t=e.PktCheckbox;Object.defineProperty(exports,"PktCheckbox",{enumerable:!0,get:()=>e.PktCheckbox});exports.default=t;
|
package/dist/pkt-checkbox.js
CHANGED
package/dist/pkt-combobox.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./combobox-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./combobox-lds6Lryq.cjs"),o=e.PktCombobox;Object.defineProperty(exports,"PktCombobox",{enumerable:!0,get:()=>e.PktCombobox});exports.default=o;
|
package/dist/pkt-combobox.js
CHANGED
package/dist/pkt-consent.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./consent-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./consent-CVMm8lGt.cjs"),t=e.PktConsent;Object.defineProperty(exports,"PktConsent",{enumerable:!0,get:()=>e.PktConsent});exports.default=t;
|
package/dist/pkt-consent.js
CHANGED
package/dist/pkt-datepicker.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./datepicker-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./datepicker-DpQV8G6g.cjs"),t=e.PktDatepicker;Object.defineProperty(exports,"PktDatepicker",{enumerable:!0,get:()=>e.PktDatepicker});exports.default=t;
|
package/dist/pkt-datepicker.js
CHANGED
package/dist/pkt-heading.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./heading-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./heading-CxJ0IqpU.cjs"),t=e.PktHeading;Object.defineProperty(exports,"PktHeading",{enumerable:!0,get:()=>e.PktHeading});exports.default=t;
|
package/dist/pkt-heading.js
CHANGED