@oslokommune/punkt-elements 12.42.10 → 12.42.12
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-aQHOrGzf.js → accordionitem-Be6vyX31.js} +8 -7
- package/dist/{accordionitem-C4NQFQHo.cjs → accordionitem-ogt0KNGP.cjs} +5 -5
- package/dist/{alert-sBHt7DSh.js → alert-CZyqekhG.js} +22 -21
- package/dist/alert-DifeONO7.cjs +32 -0
- package/dist/{backlink-BnlrDl9O.js → backlink-C3dfam09.js} +12 -11
- package/dist/backlink-C9qmM67k.cjs +13 -0
- package/dist/{button-B4Oe8Ar0.js → button-OoC1RGJL.js} +8 -7
- package/dist/button-zO41ySZl.cjs +19 -0
- package/dist/calendar-BYYJH15O.cjs +108 -0
- package/dist/{calendar-Df6-FDRW.js → calendar-qEV4u3xs.js} +11 -10
- package/dist/{card-CXhVAeOG.cjs → card-CJue0Esh.cjs} +1 -1
- package/dist/{card-0Kf9L0A_.js → card-p-fcc7Wh.js} +9 -8
- package/dist/{checkbox-B67_cfqW.js → checkbox-BLI7dfpW.js} +4 -4
- package/dist/{checkbox-CiXWukkL.cjs → checkbox-iLywLQwL.cjs} +1 -1
- package/dist/{class-map-m7ZCZ49w.js → class-map-DO0E7GkW.js} +1 -1
- package/dist/{class-map-DWDPOqjO.cjs → class-map-dph2jLEp.cjs} +1 -1
- package/dist/{combobox-Dq7F5v-u.cjs → combobox-BJOVpwAW.cjs} +1 -1
- package/dist/{combobox-CsFDvh8U.js → combobox-C_Zj-ZxE.js} +11 -11
- package/dist/consent-BkgHuZ37.cjs +11 -0
- package/dist/{consent-B17ZIuwm.js → consent-C0pd0E2Q.js} +6 -5
- package/dist/{datepicker-DOf9XK9v.cjs → datepicker--I3DF-Ci.cjs} +1 -1
- package/dist/{datepicker-Cz6seIz1.js → datepicker-Y6-ORa5u.js} +11 -11
- package/dist/{directive-helpers--4ibN__v.js → directive-helpers-D2BEk_ct.js} +1 -1
- package/dist/{directive-helpers-v9b0v7lu.cjs → directive-helpers-lOXMtxMR.cjs} +2 -2
- package/dist/{element-gAd63VwC.js → element-Cfyyg4nF.js} +8658 -9250
- package/dist/element-DUJa1sRq.cjs +212 -0
- package/dist/heading-BWV1JThP.js +58 -0
- package/dist/heading-C6U6xiqH.cjs +1 -0
- package/dist/helptext-BxHMB-XH.cjs +24 -0
- package/dist/{helptext-BG_b6ytC.js → helptext-C7oP6VRp.js} +19 -18
- package/dist/{icon-CO1TLSs5.js → icon-DPnB79MP.js} +12 -11
- package/dist/{icon-B1_BRNqf.cjs → icon-RJ9Op-BB.cjs} +3 -3
- package/dist/if-defined-BQOEcjlp.cjs +5 -0
- package/dist/{if-defined-Cj-3Kdsr.js → if-defined-I-IZkUY2.js} +1 -1
- package/dist/index.d.ts +7 -6
- package/dist/input-element-B2JauW-Y.cjs +1 -0
- package/dist/{input-element-BEvaQK4g.js → input-element-CaCDNzdI.js} +7 -6
- package/dist/{input-wrapper-CC_R5w7V.js → input-wrapper-BDm0DwAW.js} +14 -13
- package/dist/{input-wrapper-Dk0rKRlz.cjs → input-wrapper-DrJgi10C.cjs} +4 -4
- package/dist/{link-C9X0huxP.js → link-BzKHhT3c.js} +12 -11
- package/dist/link-Dhs4dS0S.cjs +7 -0
- package/dist/{linkcard-Bhk2ttou.js → linkcard-CyepaY-g.js} +14 -13
- package/dist/{linkcard-CaBz6i7A.cjs → linkcard-Czsb01sQ.cjs} +1 -1
- package/dist/{listbox-AjDNhDsQ.cjs → listbox-BIcmMiAK.cjs} +7 -7
- package/dist/{listbox-DCWdrjFp.js → listbox-Br7v_BsA.js} +11 -10
- package/dist/lit-element-DHqqtYbj.cjs +27 -0
- package/dist/lit-element-DcUrSbRH.js +595 -0
- package/dist/loader-5lt2W9RX.cjs +11 -0
- package/dist/{loader-DMp859px.js → loader-Co35Rkbv.js} +16 -15
- package/dist/messagebox-BSUbetVQ.cjs +12 -0
- package/dist/{messagebox-_1f12rDq.js → messagebox-CQXmoqzD.js} +18 -17
- package/dist/modal-5PZ-TDkV.cjs +36 -0
- package/dist/{modal-C3kEgTMj.js → modal-DuubDFPT.js} +27 -26
- 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 +3 -3
- package/dist/pkt-index.js +63 -62
- 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-BSO0KWzv.js → progressbar-B75UwwRZ.js} +14 -13
- package/dist/{progressbar-BrXtjUvh.cjs → progressbar-DF8IG5IY.cjs} +7 -7
- package/dist/{radiobutton-BaIDDCwK.js → radiobutton-CDO-HMP_.js} +5 -5
- package/dist/{radiobutton-x10h-JEh.cjs → radiobutton-DUpADoLc.cjs} +1 -1
- package/dist/{ref-B-w1vCo8.cjs → ref-BMQZJJEo.cjs} +1 -1
- package/dist/{ref-DnSbnXsj.js → ref-DX488m2G.js} +2 -2
- package/dist/{repeat-CxQA3AeF.cjs → repeat-B93vZu9q.cjs} +1 -1
- package/dist/{repeat-lUFq9w5d.js → repeat-Dl4RVQIF.js} +2 -2
- package/dist/select-CE5L--Xw.cjs +48 -0
- package/dist/{select-BlL8T2BX.js → select-q7qkLeW4.js} +20 -20
- package/dist/{state-BxrO4zNJ.js → state-P2J1I2ny.js} +1 -1
- package/dist/{state-D-Recv7U.cjs → state-y-GU-VH8.cjs} +1 -1
- package/dist/{tag-m7OTZaCG.js → tag-OSIRLJc0.js} +21 -20
- package/dist/tag-sEPrma2U.cjs +18 -0
- package/dist/{textarea-Dk8hQMD2.js → textarea-BIvwbRBK.js} +22 -22
- package/dist/{textarea-Dc1sUaxx.cjs → textarea-BuhpS5Jj.cjs} +1 -1
- package/dist/{textinput-6Ip-0aVY.js → textinput-BFbenR3I.js} +8 -8
- package/dist/{textinput-DuLZ26DB.cjs → textinput-BUMlqXQC.cjs} +1 -1
- package/package.json +4 -4
- package/src/components/heading/heading.ts +63 -37
- package/dist/alert-DUWuhtFC.cjs +0 -32
- package/dist/backlink-CcAZfB1d.cjs +0 -13
- package/dist/button-BT-FRGMk.cjs +0 -19
- package/dist/calendar-D4qfcRtv.cjs +0 -108
- package/dist/consent-CILYIgC-.cjs +0 -11
- package/dist/element-90YeMNbV.cjs +0 -238
- package/dist/heading-CGGKEZve.js +0 -59
- package/dist/heading-Cmh5bbTl.cjs +0 -1
- package/dist/helptext-CC3qLmEz.cjs +0 -24
- package/dist/if-defined-C8eotHpL.cjs +0 -5
- package/dist/input-element-CInrWeac.cjs +0 -1
- package/dist/link-qTz-qNVI.cjs +0 -7
- package/dist/loader-BqYcg8Di.cjs +0 -11
- package/dist/messagebox-Do_nAUo3.cjs +0 -12
- package/dist/modal-C1inKvts.cjs +0 -36
- package/dist/select-BkVSXR5K.cjs +0 -48
- package/dist/tag-DrbI0ng3.cjs +0 -18
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { i as p, x as u, n as d, t as g } from "./lit-element-DcUrSbRH.js";
|
|
2
|
+
var o = Object.defineProperty, c = Object.getOwnPropertyDescriptor, l = (t, i, e, r) => {
|
|
3
|
+
for (var s = r > 1 ? void 0 : r ? c(i, e) : i, n = t.length - 1, h; n >= 0; n--)
|
|
4
|
+
(h = t[n]) && (s = (r ? h(i, e, s) : h(s)) || s);
|
|
5
|
+
return r && s && o(i, e, s), s;
|
|
6
|
+
};
|
|
7
|
+
let a = class extends p {
|
|
8
|
+
constructor() {
|
|
9
|
+
super(...arguments), this.size = "medium", this.level = 2, this.visuallyHidden = !1, this.align = "start";
|
|
10
|
+
}
|
|
11
|
+
connectedCallback() {
|
|
12
|
+
super.connectedCallback(), this.setAttribute("role", "heading"), this.setAttribute("aria-level", String(this.level)), this.updateHostClasses();
|
|
13
|
+
}
|
|
14
|
+
attributeChangedCallback(t, i, e) {
|
|
15
|
+
super.attributeChangedCallback(t, i, e), t === "level" && e && this.setLevel(Number(e)), (t === "size" || t === "visuallyHidden" || t === "align") && this.updateHostClasses();
|
|
16
|
+
}
|
|
17
|
+
updated(t) {
|
|
18
|
+
super.updated(t), t.has("level") && this.setLevel(this.level), (t.has("size") || t.has("visuallyHidden") || t.has("align")) && this.updateHostClasses();
|
|
19
|
+
}
|
|
20
|
+
setLevel(t) {
|
|
21
|
+
t >= 1 && t <= 6 ? (this.level = t, this.setAttribute("aria-level", String(t))) : console.warn(`Invalid heading level: ${t}. Must be between 1 and 6.`);
|
|
22
|
+
}
|
|
23
|
+
updateHostClasses() {
|
|
24
|
+
this.classList.remove(
|
|
25
|
+
"pkt-heading",
|
|
26
|
+
"pkt-heading--xsmall",
|
|
27
|
+
"pkt-heading--small",
|
|
28
|
+
"pkt-heading--medium",
|
|
29
|
+
"pkt-heading--large",
|
|
30
|
+
"pkt-heading--xlarge",
|
|
31
|
+
"pkt-sr-only",
|
|
32
|
+
"pkt-heading--start",
|
|
33
|
+
"pkt-heading--center",
|
|
34
|
+
"pkt-heading--end"
|
|
35
|
+
), this.classList.add("pkt-heading"), this.size && this.classList.add(`pkt-heading--${this.size}`), this.visuallyHidden && this.classList.add("pkt-sr-only"), this.align && this.classList.add(`pkt-heading--${this.align}`);
|
|
36
|
+
}
|
|
37
|
+
render() {
|
|
38
|
+
return u`<slot></slot>`;
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
l([
|
|
42
|
+
d({ type: String, reflect: !0 })
|
|
43
|
+
], a.prototype, "size", 2);
|
|
44
|
+
l([
|
|
45
|
+
d({ type: Number, reflect: !0 })
|
|
46
|
+
], a.prototype, "level", 2);
|
|
47
|
+
l([
|
|
48
|
+
d({ type: Boolean, reflect: !0 })
|
|
49
|
+
], a.prototype, "visuallyHidden", 2);
|
|
50
|
+
l([
|
|
51
|
+
d({ type: String, reflect: !0 })
|
|
52
|
+
], a.prototype, "align", 2);
|
|
53
|
+
a = l([
|
|
54
|
+
g("pkt-heading")
|
|
55
|
+
], a);
|
|
56
|
+
export {
|
|
57
|
+
a as P
|
|
58
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const i=require("./lit-element-DHqqtYbj.cjs");var h=Object.defineProperty,p=Object.getOwnPropertyDescriptor,l=(n,t,a,e)=>{for(var s=e>1?void 0:e?p(t,a):t,d=n.length-1,r;d>=0;d--)(r=n[d])&&(s=(e?r(t,a,s):r(s))||s);return e&&s&&h(t,a,s),s};exports.PktHeading=class extends i.i{constructor(){super(...arguments),this.size="medium",this.level=2,this.visuallyHidden=!1,this.align="start"}connectedCallback(){super.connectedCallback(),this.setAttribute("role","heading"),this.setAttribute("aria-level",String(this.level)),this.updateHostClasses()}attributeChangedCallback(t,a,e){super.attributeChangedCallback(t,a,e),t==="level"&&e&&this.setLevel(Number(e)),(t==="size"||t==="visuallyHidden"||t==="align")&&this.updateHostClasses()}updated(t){super.updated(t),t.has("level")&&this.setLevel(this.level),(t.has("size")||t.has("visuallyHidden")||t.has("align"))&&this.updateHostClasses()}setLevel(t){t>=1&&t<=6?(this.level=t,this.setAttribute("aria-level",String(t))):console.warn(`Invalid heading level: ${t}. Must be between 1 and 6.`)}updateHostClasses(){this.classList.remove("pkt-heading","pkt-heading--xsmall","pkt-heading--small","pkt-heading--medium","pkt-heading--large","pkt-heading--xlarge","pkt-sr-only","pkt-heading--start","pkt-heading--center","pkt-heading--end"),this.classList.add("pkt-heading"),this.size&&this.classList.add(`pkt-heading--${this.size}`),this.visuallyHidden&&this.classList.add("pkt-sr-only"),this.align&&this.classList.add(`pkt-heading--${this.align}`)}render(){return i.x`<slot></slot>`}};l([i.n({type:String,reflect:!0})],exports.PktHeading.prototype,"size",2);l([i.n({type:Number,reflect:!0})],exports.PktHeading.prototype,"level",2);l([i.n({type:Boolean,reflect:!0})],exports.PktHeading.prototype,"visuallyHidden",2);l([i.n({type:String,reflect:!0})],exports.PktHeading.prototype,"align",2);exports.PktHeading=l([i.t("pkt-heading")],exports.PktHeading);
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";const a=require("./element-DUJa1sRq.cjs"),e=require("./lit-element-DHqqtYbj.cjs"),x=require("./ref-BMQZJJEo.cjs"),h=require("./icon-RJ9Op-BB.cjs"),u=require("./class-map-dph2jLEp.cjs"),c=require("./state-y-GU-VH8.cjs"),d=require("./stringutils-CkVRq4jP.cjs"),k=require("./input-wrapper-EoSAbU-U.cjs"),w=require("./pkt-slot-controller-BzddBp7z.cjs");var _=Object.defineProperty,f=Object.getOwnPropertyDescriptor,n=(o,p,r,l)=>{for(var t=l>1?void 0:l?f(p,r):p,s=o.length-1,i;s>=0;s--)(i=o[s])&&(t=(l?i(p,r,t):i(t))||t);return l&&t&&_(p,r,t),t};exports.PktHelptext=class extends a.PktElement{constructor(){super(),this.defaultSlot=x.e(),this.forId=d.uuidish(),this.helptext="",this.helptextDropdown="",this.helptextDropdownButton=k.specs.props.helptextDropdownButton.default,this.isHelpTextOpen=!1,this.filledSlots=new Set,this.slotController=new w.PktSlotController(this,this.defaultSlot)}updateSlots(p){this.filledSlots=new Set(p)}render(){const p=()=>{const s=!this.isHelpTextOpen;this.isHelpTextOpen=s,this.dispatchEvent(new CustomEvent("toggleHelpText",{bubbles:!0,detail:{isOpen:s}}))},r=u.e({"pkt-inputwrapper__helptext-container":!0,"pkt-inputwrapper__has-helptext":this.helptext||this.helptextDropdown||this.filledSlots.size>0}),l=()=>this.helptextDropdown?e.x`<div class="pkt-inputwrapper__helptext-expandable">
|
|
2
|
+
<button
|
|
3
|
+
class="pkt-link pkt-link--icon-right pkt-btn pkt-btn--small pkt-btn--tertiary pkt-btn--icon-right"
|
|
4
|
+
type="button"
|
|
5
|
+
@click=${p}
|
|
6
|
+
>
|
|
7
|
+
<pkt-icon
|
|
8
|
+
class="pkt-btn__icon"
|
|
9
|
+
name="${this.isHelpTextOpen?"chevron-thin-up":"chevron-thin-down"}"
|
|
10
|
+
></pkt-icon>
|
|
11
|
+
<span class="pkt-btn__text">${h.o(this.helptextDropdownButton)}</span>
|
|
12
|
+
</button>
|
|
13
|
+
<div
|
|
14
|
+
class="${u.e({"pkt-inputwrapper__helptext":!0,"pkt-inputwrapper__helptext-expandable-open":this.isHelpTextOpen,"pkt-inputwrapper__helptext-expandable-closed":!this.isHelpTextOpen})}"
|
|
15
|
+
>
|
|
16
|
+
${h.o(this.helptextDropdown)}
|
|
17
|
+
</div>
|
|
18
|
+
</div>`:e.E,t=()=>e.x`<div class="${r}">
|
|
19
|
+
<div class="pkt-inputwrapper__helptext" id="${this.forId}-helptext">
|
|
20
|
+
<div class="pkt-contents" ${x.n(this.defaultSlot)} name="helptext"></div>
|
|
21
|
+
${this.helptext&&h.o(this.helptext)}
|
|
22
|
+
</div>
|
|
23
|
+
${l()}
|
|
24
|
+
</div>`;return e.x`${t()}`}};n([e.n({type:String,reflect:!0})],exports.PktHelptext.prototype,"forId",2);n([e.n({type:String})],exports.PktHelptext.prototype,"helptext",2);n([e.n({type:String})],exports.PktHelptext.prototype,"helptextDropdown",2);n([e.n({type:String})],exports.PktHelptext.prototype,"helptextDropdownButton",2);n([c.r()],exports.PktHelptext.prototype,"isHelpTextOpen",2);n([c.r()],exports.PktHelptext.prototype,"filledSlots",2);exports.PktHelptext=n([e.t("pkt-helptext")],exports.PktHelptext);
|
|
@@ -1,19 +1,20 @@
|
|
|
1
|
-
import { P as c
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { P as c } from "./element-Cfyyg4nF.js";
|
|
2
|
+
import { x as a, E as f, n, t as m } from "./lit-element-DcUrSbRH.js";
|
|
3
|
+
import { e as w, n as _ } from "./ref-DX488m2G.js";
|
|
4
|
+
import { o as x } from "./icon-DPnB79MP.js";
|
|
5
|
+
import { e as d } from "./class-map-DO0E7GkW.js";
|
|
6
|
+
import { r as u } from "./state-P2J1I2ny.js";
|
|
6
7
|
import { u as k } from "./stringutils-DJjRa8dG.js";
|
|
7
8
|
import { s as v } from "./input-wrapper-8iKEzDRZ.js";
|
|
8
9
|
import { P as b } from "./pkt-slot-controller-BPGj-LC5.js";
|
|
9
|
-
var S = Object.defineProperty, D = Object.getOwnPropertyDescriptor, p = (o, s,
|
|
10
|
-
for (var t =
|
|
11
|
-
(h = o[i]) && (t = (
|
|
12
|
-
return
|
|
10
|
+
var S = Object.defineProperty, D = Object.getOwnPropertyDescriptor, p = (o, s, r, l) => {
|
|
11
|
+
for (var t = l > 1 ? void 0 : l ? D(s, r) : s, i = o.length - 1, h; i >= 0; i--)
|
|
12
|
+
(h = o[i]) && (t = (l ? h(s, r, t) : h(t)) || t);
|
|
13
|
+
return l && t && S(s, r, t), t;
|
|
13
14
|
};
|
|
14
15
|
let e = class extends c {
|
|
15
16
|
constructor() {
|
|
16
|
-
super(), this.defaultSlot =
|
|
17
|
+
super(), this.defaultSlot = w(), this.forId = k(), this.helptext = "", this.helptextDropdown = "", this.helptextDropdownButton = v.props.helptextDropdownButton.default, this.isHelpTextOpen = !1, this.filledSlots = /* @__PURE__ */ new Set(), this.slotController = new b(this, this.defaultSlot);
|
|
17
18
|
}
|
|
18
19
|
updateSlots(o) {
|
|
19
20
|
this.filledSlots = new Set(o);
|
|
@@ -30,7 +31,7 @@ let e = class extends c {
|
|
|
30
31
|
}, s = d({
|
|
31
32
|
"pkt-inputwrapper__helptext-container": !0,
|
|
32
33
|
"pkt-inputwrapper__has-helptext": this.helptext || this.helptextDropdown || this.filledSlots.size > 0
|
|
33
|
-
}),
|
|
34
|
+
}), r = () => this.helptextDropdown ? a`<div class="pkt-inputwrapper__helptext-expandable">
|
|
34
35
|
<button
|
|
35
36
|
class="pkt-link pkt-link--icon-right pkt-btn pkt-btn--small pkt-btn--tertiary pkt-btn--icon-right"
|
|
36
37
|
type="button"
|
|
@@ -54,24 +55,24 @@ let e = class extends c {
|
|
|
54
55
|
</div>` : f;
|
|
55
56
|
return a`${a`<div class="${s}">
|
|
56
57
|
<div class="pkt-inputwrapper__helptext" id="${this.forId}-helptext">
|
|
57
|
-
<div class="pkt-contents" ${
|
|
58
|
+
<div class="pkt-contents" ${_(this.defaultSlot)} name="helptext"></div>
|
|
58
59
|
${this.helptext && x(this.helptext)}
|
|
59
60
|
</div>
|
|
60
|
-
${
|
|
61
|
+
${r()}
|
|
61
62
|
</div>`}`;
|
|
62
63
|
}
|
|
63
64
|
};
|
|
64
65
|
p([
|
|
65
|
-
|
|
66
|
+
n({ type: String, reflect: !0 })
|
|
66
67
|
], e.prototype, "forId", 2);
|
|
67
68
|
p([
|
|
68
|
-
|
|
69
|
+
n({ type: String })
|
|
69
70
|
], e.prototype, "helptext", 2);
|
|
70
71
|
p([
|
|
71
|
-
|
|
72
|
+
n({ type: String })
|
|
72
73
|
], e.prototype, "helptextDropdown", 2);
|
|
73
74
|
p([
|
|
74
|
-
|
|
75
|
+
n({ type: String })
|
|
75
76
|
], e.prototype, "helptextDropdownButton", 2);
|
|
76
77
|
p([
|
|
77
78
|
u()
|
|
@@ -80,7 +81,7 @@ p([
|
|
|
80
81
|
u()
|
|
81
82
|
], e.prototype, "filledSlots", 2);
|
|
82
83
|
e = p([
|
|
83
|
-
|
|
84
|
+
m("pkt-helptext")
|
|
84
85
|
], e);
|
|
85
86
|
export {
|
|
86
87
|
e as P
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { P as v } from "./element-Cfyyg4nF.js";
|
|
2
|
+
import { E as f, T as m, x as y, n as p, t as P } from "./lit-element-DcUrSbRH.js";
|
|
2
3
|
import { e as g, i as k, t as _ } from "./directive-oAbCiebi.js";
|
|
3
4
|
/**
|
|
4
5
|
* @license
|
|
@@ -11,7 +12,7 @@ class a extends k {
|
|
|
11
12
|
}
|
|
12
13
|
render(t) {
|
|
13
14
|
if (t === f || t == null) return this._t = void 0, this.it = t;
|
|
14
|
-
if (t ===
|
|
15
|
+
if (t === m) return t;
|
|
15
16
|
if (typeof t != "string") throw Error(this.constructor.directiveName + "() called with a non-string value");
|
|
16
17
|
if (t === this.it) return this._t;
|
|
17
18
|
this.it = t;
|
|
@@ -20,7 +21,7 @@ class a extends k {
|
|
|
20
21
|
}
|
|
21
22
|
}
|
|
22
23
|
a.directiveName = "unsafeHTML", a.resultType = 1;
|
|
23
|
-
const
|
|
24
|
+
const F = g(a);
|
|
24
25
|
/**
|
|
25
26
|
* @license
|
|
26
27
|
* Copyright 2017 Google LLC
|
|
@@ -31,8 +32,8 @@ class d extends a {
|
|
|
31
32
|
d.directiveName = "unsafeSVG", d.resultType = 2;
|
|
32
33
|
const w = g(d);
|
|
33
34
|
var I = Object.defineProperty, b = Object.getOwnPropertyDescriptor, n = (e, t, s, o) => {
|
|
34
|
-
for (var i = o > 1 ? void 0 : o ? b(t, s) : t,
|
|
35
|
-
(l = e[
|
|
35
|
+
for (var i = o > 1 ? void 0 : o ? b(t, s) : t, h = e.length - 1, l; h >= 0; h--)
|
|
36
|
+
(l = e[h]) && (i = (o ? l(t, s, i) : l(i)) || i);
|
|
36
37
|
return o && i && I(t, s, i), i;
|
|
37
38
|
};
|
|
38
39
|
window.pktFetch = window.pktFetch === void 0 ? fetch : window.pktFetch;
|
|
@@ -45,7 +46,7 @@ const C = (e) => new Promise((t) => setTimeout(t, e)), c = '<svg xmlns="http://w
|
|
|
45
46
|
window.pktFetch(t + e + ".svg").then((o) => o.ok ? o.text() : (console.error("Missing icon: " + t + e + ".svg"), c)).then((o) => (o !== c && localStorage.setItem(t + e + ".svg", o), u[t + e + ".svg"] = "fetched", o))
|
|
46
47
|
)) : Promise.resolve(c);
|
|
47
48
|
};
|
|
48
|
-
let r = class extends
|
|
49
|
+
let r = class extends v {
|
|
49
50
|
constructor() {
|
|
50
51
|
super(...arguments), this.path = window.pktIconPath, this.name = "", this.icon = w(c), this._updatedProps = [];
|
|
51
52
|
}
|
|
@@ -68,21 +69,21 @@ let r = class extends m {
|
|
|
68
69
|
}
|
|
69
70
|
};
|
|
70
71
|
n([
|
|
71
|
-
|
|
72
|
+
p({ type: String, reflect: !1 })
|
|
72
73
|
], r.prototype, "path", 2);
|
|
73
74
|
n([
|
|
74
|
-
|
|
75
|
+
p({ type: String, reflect: !0 })
|
|
75
76
|
], r.prototype, "name", 2);
|
|
76
77
|
n([
|
|
77
|
-
|
|
78
|
+
p({ type: SVGElement })
|
|
78
79
|
], r.prototype, "icon", 2);
|
|
79
80
|
n([
|
|
80
|
-
|
|
81
|
+
p({ type: Array, noAccessor: !0 })
|
|
81
82
|
], r.prototype, "_updatedProps", 2);
|
|
82
83
|
r = n([
|
|
83
84
|
P("pkt-icon")
|
|
84
85
|
], r);
|
|
85
86
|
export {
|
|
86
87
|
r as P,
|
|
87
|
-
|
|
88
|
+
F as o
|
|
88
89
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
"use strict";const o=require("./element-
|
|
1
|
+
"use strict";const f=require("./element-DUJa1sRq.cjs"),o=require("./lit-element-DHqqtYbj.cjs"),a=require("./directive-C7oCP5Bh.cjs");/**
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright 2017 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
-
*/class h extends a.i{constructor(t){if(super(t),this.it=o.E,t.type!==a.t.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===o.E||t==null)return this._t=void 0,this.it=t;if(t===o.T)return t;if(typeof t!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this._t;this.it=t;const s=[t];return s.raw=s,this._t={_$litType$:this.constructor.resultType,strings:s,values:[]}}}h.directiveName="unsafeHTML",h.resultType=1;const
|
|
5
|
+
*/class h extends a.i{constructor(t){if(super(t),this.it=o.E,t.type!==a.t.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===o.E||t==null)return this._t=void 0,this.it=t;if(t===o.T)return t;if(typeof t!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this._t;this.it=t;const s=[t];return s.raw=s,this._t={_$litType$:this.constructor.resultType,strings:s,values:[]}}}h.directiveName="unsafeHTML",h.resultType=1;const g=a.e(h);/**
|
|
6
6
|
* @license
|
|
7
7
|
* Copyright 2017 Google LLC
|
|
8
8
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
9
|
-
*/class d extends h{}d.directiveName="unsafeSVG",d.resultType=2;const w=a.e(d);var
|
|
9
|
+
*/class d extends h{}d.directiveName="unsafeSVG",d.resultType=2;const w=a.e(d);var v=Object.defineProperty,P=Object.getOwnPropertyDescriptor,r=(e,t,s,n)=>{for(var i=n>1?void 0:n?P(t,s):t,l=e.length-1,p;l>=0;l--)(p=e[l])&&(i=(n?p(t,s,i):p(i))||i);return n&&i&&v(t,s,i),i};window.pktFetch=window.pktFetch===void 0?fetch:window.pktFetch;window.pktIconPath=window.pktIconPath||"https://punkt-cdn.oslo.kommune.no/latest/icons/";const k=e=>new Promise(t=>setTimeout(t,e)),c='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"></svg>',u={},y=async(e,t)=>{let s=0;for(;u[t+e+".svg"]==="fetching"&&(s++,!(s>50));)await k(50);return localStorage.getItem(t+e+".svg")?Promise.resolve(localStorage.getItem(t+e+".svg")):typeof window.pktFetch=="function"?(u[t+e+".svg"]="fetching",Promise.resolve(window.pktFetch(t+e+".svg").then(n=>n.ok?n.text():(console.error("Missing icon: "+t+e+".svg"),c)).then(n=>(n!==c&&localStorage.setItem(t+e+".svg",n),u[t+e+".svg"]="fetched",n)))):Promise.resolve(c)};exports.PktIcon=class extends f.PktElement{constructor(){super(...arguments),this.path=window.pktIconPath,this.name="",this.icon=w(c),this._updatedProps=[]}connectedCallback(){super.connectedCallback(),this.classList.add("pkt-icon")}async attributeChangedCallback(t,s,n){super.attributeChangedCallback(t,s,n),(t==="name"||t==="path")&&this.getIcon(this.name)}async updated(t){super.updated(t),(t.has("name")||t.has("path"))&&this.getIcon(this.name)}async getIcon(t=""){this._updatedProps.length>0?(this.path||(this.path,window.pktIconPath),this.icon=w(await y(this.name||"",this.path).then(s=>s)),this._updatedProps=[]):this._updatedProps.includes(t)||this._updatedProps.push(t)}render(){return o.x`${this.name&&this.icon}`}};r([o.n({type:String,reflect:!1})],exports.PktIcon.prototype,"path",2);r([o.n({type:String,reflect:!0})],exports.PktIcon.prototype,"name",2);r([o.n({type:SVGElement})],exports.PktIcon.prototype,"icon",2);r([o.n({type:Array,noAccessor:!0})],exports.PktIcon.prototype,"_updatedProps",2);exports.PktIcon=r([o.t("pkt-icon")],exports.PktIcon);exports.o=g;
|
package/dist/index.d.ts
CHANGED
|
@@ -201,9 +201,8 @@ export declare interface IPktConsent {
|
|
|
201
201
|
export declare interface IPktHeading {
|
|
202
202
|
size?: TPktHeadingSize;
|
|
203
203
|
level?: TPktHeadingLevel;
|
|
204
|
-
spacing?: boolean;
|
|
205
204
|
visuallyHidden?: boolean;
|
|
206
|
-
|
|
205
|
+
align?: 'start' | 'center' | 'end';
|
|
207
206
|
}
|
|
208
207
|
|
|
209
208
|
declare interface IPktLinkCard {
|
|
@@ -736,14 +735,16 @@ declare class PktElement<T = {}> extends LitElement {
|
|
|
736
735
|
constructor();
|
|
737
736
|
}
|
|
738
737
|
|
|
739
|
-
export declare class PktHeading extends
|
|
740
|
-
defaultSlot: Ref<HTMLElement>;
|
|
741
|
-
constructor();
|
|
738
|
+
export declare class PktHeading extends LitElement implements IPktHeading {
|
|
742
739
|
size: TPktHeadingSize;
|
|
743
740
|
level: TPktHeadingLevel;
|
|
744
|
-
noSpacing: boolean;
|
|
745
741
|
visuallyHidden: boolean;
|
|
746
742
|
align: 'start' | 'center' | 'end';
|
|
743
|
+
connectedCallback(): void;
|
|
744
|
+
attributeChangedCallback(name: string, _old: string | null, value: string | null): void;
|
|
745
|
+
protected updated(_changedProperties: PropertyValues): void;
|
|
746
|
+
private setLevel;
|
|
747
|
+
private updateHostClasses;
|
|
747
748
|
render(): TemplateResult<1>;
|
|
748
749
|
}
|
|
749
750
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const i=require("./lit-element-DHqqtYbj.cjs"),g=require("./state-y-GU-VH8.cjs"),v=require("./stringutils-CkVRq4jP.cjs"),r=require("./element-DUJa1sRq.cjs"),b=require("./input-wrapper-EoSAbU-U.cjs");var V=Object.defineProperty,s=(u,t,a,h)=>{for(var n=void 0,l=u.length-1,o;l>=0;l--)(o=u[l])&&(n=o(t,a,n)||n);return n&&V(t,a,n),n};class e extends r.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=v.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=b.specs.props.helptextDropdownButton.default,this.label=null,this.optionalText=r.translations.forms.labels.optional,this.requiredText=r.translations.forms.labels.required,this.dataTestid="",this.touched=!1,this.internals=this.attachInternals()}static get formAssociated(){return!0}manageValidity(t){var a,h,n,l,o,p,d,f,c,m,y;t&&(this.required&&!this.value?this.internals.setValidity({valueMissing:!0},r.translations.forms.messages.required,t):(a=t.validity)!=null&&a.typeMismatch||(h=t.validity)!=null&&h.badInput?this.internals.setValidity({typeMismatch:!0},r.translations.forms.messages.invalid,t):(n=t.validity)!=null&&n.patternMismatch?this.internals.setValidity({patternMismatch:!0},r.translations.forms.messages.invalidPattern,t):(l=t.validity)!=null&&l.tooShort||this.minlength&&this.minlength>0&&this.value.length<this.minlength?this.internals.setValidity({tooShort:!0},r.translations.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},r.translations.forms.messages.tooLong,t):(p=t.validity)!=null&&p.rangeUnderflow?this.internals.setValidity({rangeUnderflow:!0},this.min?r.translations.forms.messages.rangeUnderflowMin.replace("{min}",(d=this.min)==null?void 0:d.toString()):r.translations.forms.messages.rangeUnderflow,t):(f=t.validity)!=null&&f.stepMismatch?this.internals.setValidity({stepMismatch:!0},r.translations.forms.messages.invalid,t):(c=t.validity)!=null&&c.rangeOverflow?this.internals.setValidity({rangeOverflow:!0},this.max?r.translations.forms.messages.rangeOverflowMax.replace("{max}",(m=this.max)==null?void 0:m.toString()):r.translations.forms.messages.rangeOverflow,t):(y=t.validity)!=null&&y.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(h=>{a.append(this.name,h)}),this.internals.setFormValue(a)}else this.internals.setFormValue(t)}valueChecked(t){if(!this.touched)return;const a=this.internals.form||this.closest("form"),h=a?new FormData(a):null;a&&a.querySelectorAll(`pkt-radiobutton[name="${this.name}"], input[type=radio][name="${this.name}"]`).forEach(n=>{const l=n;l.name===this.name&&l.value!==this.value&&l.checked&&(l.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"),h&&h.append(this.name,this.value||"on"),this.internals.states.add("--checked")):(this.internals.setFormValue(null,null),h&&h.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))}}s([i.n()],e.prototype,"defaultValue");s([i.n({type:Boolean,reflect:!0})],e.prototype,"disabled");s([i.n({type:Boolean,reflect:!0})],e.prototype,"readonly");s([i.n({type:Boolean,reflect:!0})],e.prototype,"required");s([i.n({type:Number,reflect:!0})],e.prototype,"max");s([i.n({type:Number,reflect:!0})],e.prototype,"maxlength");s([i.n({type:Number,reflect:!0})],e.prototype,"min");s([i.n({type:Number,reflect:!0})],e.prototype,"minlength");s([i.n({type:Number,reflect:!0})],e.prototype,"step");s([i.n({type:String})],e.prototype,"ariaDescribedBy");s([i.n({type:String})],e.prototype,"ariaLabelledby");s([i.n({type:String,reflect:!0})],e.prototype,"name");s([i.n({type:String,reflect:!0})],e.prototype,"pattern");s([i.n({type:String,reflect:!0})],e.prototype,"placeholder");s([i.n({type:String,reflect:!0})],e.prototype,"id");s([i.n({type:Boolean})],e.prototype,"counter");s([i.n({type:Boolean})],e.prototype,"hasError");s([i.n({type:Boolean})],e.prototype,"inline");s([i.n({type:Boolean})],e.prototype,"hasFieldset");s([i.n({type:Boolean})],e.prototype,"optionalTag");s([i.n({type:Boolean})],e.prototype,"requiredTag");s([i.n({type:Boolean})],e.prototype,"skipForwardTestid");s([i.n({type:Boolean,reflect:!1})],e.prototype,"useWrapper");s([i.n({type:Boolean,reflect:!0})],e.prototype,"fullwidth");s([i.n({type:Number})],e.prototype,"counterMaxLength");s([i.n({type:String})],e.prototype,"errorMessage");s([i.n({type:String})],e.prototype,"helptext");s([i.n({type:String})],e.prototype,"helptextDropdown");s([i.n({type:String,reflect:!1})],e.prototype,"helptextDropdownButton");s([i.n({type:String})],e.prototype,"label");s([i.n({type:String,reflect:!1})],e.prototype,"optionalText");s([i.n({type:String,reflect:!1})],e.prototype,"requiredText");s([i.n({type:String,attribute:"data-testid"})],e.prototype,"dataTestid");s([g.r()],e.prototype,"touched");exports.PktInputElement=e;
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { r as
|
|
3
|
-
import { u as
|
|
1
|
+
import { n as s } from "./lit-element-DcUrSbRH.js";
|
|
2
|
+
import { r as g } from "./state-P2J1I2ny.js";
|
|
3
|
+
import { u as v } from "./stringutils-DJjRa8dG.js";
|
|
4
|
+
import { P as b, t as a } from "./element-Cfyyg4nF.js";
|
|
4
5
|
import { s as V } from "./input-wrapper-8iKEzDRZ.js";
|
|
5
6
|
var k = Object.defineProperty, e = (u, t, r, n) => {
|
|
6
7
|
for (var l = void 0, h = u.length - 1, o; h >= 0; h--)
|
|
7
8
|
(o = u[h]) && (l = o(t, r, l) || l);
|
|
8
9
|
return l && k(t, r, l), l;
|
|
9
10
|
};
|
|
10
|
-
class i extends
|
|
11
|
+
class i extends b {
|
|
11
12
|
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.step = null, this.ariaDescribedBy = null, this.ariaLabelledby = null, this.name = "", this.pattern = null, this.placeholder = null, this.id =
|
|
13
|
+
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 = v(), 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
14
|
}
|
|
14
15
|
static get formAssociated() {
|
|
15
16
|
return !0;
|
|
@@ -222,7 +223,7 @@ e([
|
|
|
222
223
|
s({ type: String, attribute: "data-testid" })
|
|
223
224
|
], i.prototype, "dataTestid");
|
|
224
225
|
e([
|
|
225
|
-
|
|
226
|
+
g()
|
|
226
227
|
], i.prototype, "touched");
|
|
227
228
|
export {
|
|
228
229
|
i as P
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import { P as
|
|
2
|
-
import { P as
|
|
3
|
-
import { e as f, n as b } from "./ref-
|
|
4
|
-
import { o as
|
|
5
|
-
import { o as
|
|
6
|
-
import {
|
|
1
|
+
import { P as x } from "./element-Cfyyg4nF.js";
|
|
2
|
+
import { P as k } from "./pkt-slot-controller-BPGj-LC5.js";
|
|
3
|
+
import { e as f, n as b } from "./ref-DX488m2G.js";
|
|
4
|
+
import { o as w } from "./if-defined-I-IZkUY2.js";
|
|
5
|
+
import { E as l, x as i, n as o, t as v } from "./lit-element-DcUrSbRH.js";
|
|
6
|
+
import { o as T } from "./icon-DPnB79MP.js";
|
|
7
|
+
import { e as g } from "./class-map-DO0E7GkW.js";
|
|
7
8
|
import { u as E } from "./stringutils-DJjRa8dG.js";
|
|
8
9
|
import { s as p } from "./input-wrapper-8iKEzDRZ.js";
|
|
9
|
-
import "./helptext-
|
|
10
|
+
import "./helptext-C7oP6VRp.js";
|
|
10
11
|
var _ = Object.defineProperty, S = Object.getOwnPropertyDescriptor, e = (r, h, a, n) => {
|
|
11
12
|
for (var s = n > 1 ? void 0 : n ? S(h, a) : h, d = r.length - 1, u; d >= 0; d--)
|
|
12
13
|
(u = r[d]) && (s = (n ? u(h, a, s) : u(s)) || s);
|
|
@@ -20,9 +21,9 @@ const D = {
|
|
|
20
21
|
return r ? "true" : "false";
|
|
21
22
|
}
|
|
22
23
|
};
|
|
23
|
-
let t = class extends
|
|
24
|
+
let t = class extends x {
|
|
24
25
|
constructor() {
|
|
25
|
-
super(), this.defaultSlot = f(), this.helptextSlot = f(), this.forId = E(), this.label = "", this.helptext = null, this.helptextDropdown = null, this.helptextDropdownButton = null, this.counter = p.props.counter.default, this.counterCurrent = 0, this.counterMaxLength = 0, this.counterError = null, this.counterPosition = "bottom", this.optionalTag = p.props.optionalTag.default, this.optionalText = p.props.optionalText.default, this.requiredTag = p.props.requiredTag.default, this.requiredText = p.props.requiredText.default, this.hasError = p.props.hasError.default, this.errorMessage = "", this.disabled = p.props.disabled.default, this.inline = p.props.inline.default, this.ariaDescribedby = void 0, this.hasFieldset = p.props.hasFieldset.default, this.role = "group", this.useWrapper = p.props.useWrapper.default, this.slotController = new
|
|
26
|
+
super(), this.defaultSlot = f(), this.helptextSlot = f(), this.forId = E(), this.label = "", this.helptext = null, this.helptextDropdown = null, this.helptextDropdownButton = null, this.counter = p.props.counter.default, this.counterCurrent = 0, this.counterMaxLength = 0, this.counterError = null, this.counterPosition = "bottom", this.optionalTag = p.props.optionalTag.default, this.optionalText = p.props.optionalText.default, this.requiredTag = p.props.requiredTag.default, this.requiredText = p.props.requiredText.default, this.hasError = p.props.hasError.default, this.errorMessage = "", this.disabled = p.props.disabled.default, this.inline = p.props.inline.default, this.ariaDescribedby = void 0, this.hasFieldset = p.props.hasFieldset.default, this.role = "group", this.useWrapper = p.props.useWrapper.default, this.slotController = new k(this, this.defaultSlot, this.helptextSlot);
|
|
26
27
|
}
|
|
27
28
|
updated(r) {
|
|
28
29
|
super.updated(r);
|
|
@@ -63,13 +64,13 @@ let t = class extends m {
|
|
|
63
64
|
${this.label}
|
|
64
65
|
</label>`, d = () => i`
|
|
65
66
|
<pkt-helptext
|
|
66
|
-
class="${
|
|
67
|
+
class="${w(this.useWrapper ? void 0 : "pkt-hide")}"
|
|
67
68
|
.forId=${this.forId}
|
|
68
69
|
.helptext=${this.helptext}
|
|
69
70
|
.helptextDropdown=${this.helptextDropdown}
|
|
70
71
|
.helptextDropdownButton=${this.helptextDropdownButton || p.props.helptextDropdownButton.default}
|
|
71
|
-
@toggleHelpText=${(
|
|
72
|
-
this.toggleDropdown(
|
|
72
|
+
@toggleHelpText=${(m) => {
|
|
73
|
+
this.toggleDropdown(m);
|
|
73
74
|
}}
|
|
74
75
|
${b(this.helptextSlot)}
|
|
75
76
|
name="helptext"
|
|
@@ -181,7 +182,7 @@ e([
|
|
|
181
182
|
o({ type: Boolean, reflect: !0, converter: D })
|
|
182
183
|
], t.prototype, "useWrapper", 2);
|
|
183
184
|
t = e([
|
|
184
|
-
|
|
185
|
+
v("pkt-input-wrapper")
|
|
185
186
|
], t);
|
|
186
187
|
export {
|
|
187
188
|
t as P
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const
|
|
1
|
+
"use strict";const g=require("./element-DUJa1sRq.cjs"),y=require("./pkt-slot-controller-BzddBp7z.cjs"),u=require("./ref-BMQZJJEo.cjs"),x=require("./if-defined-BQOEcjlp.cjs"),t=require("./lit-element-DHqqtYbj.cjs"),$=require("./icon-RJ9Op-BB.cjs"),c=require("./class-map-dph2jLEp.cjs"),I=require("./stringutils-CkVRq4jP.cjs"),o=require("./input-wrapper-EoSAbU-U.cjs");require("./helptext-BxHMB-XH.cjs");var P=Object.defineProperty,W=Object.getOwnPropertyDescriptor,e=(r,p,n,i)=>{for(var s=i>1?void 0:i?W(p,n):p,l=r.length-1,a;l>=0;l--)(a=r[l])&&(s=(i?a(p,n,s):a(s))||s);return i&&s&&P(p,n,s),s};const E={fromAttribute(r){return r==null?!1:r===""||r==="true"||r===!0?!0:r==="false"||r===!1?!1:!!r},toAttribute(r){return r?"true":"false"}};exports.PktInputWrapper=class extends g.PktElement{constructor(){super(),this.defaultSlot=u.e(),this.helptextSlot=u.e(),this.forId=I.uuidish(),this.label="",this.helptext=null,this.helptextDropdown=null,this.helptextDropdownButton=null,this.counter=o.specs.props.counter.default,this.counterCurrent=0,this.counterMaxLength=0,this.counterError=null,this.counterPosition="bottom",this.optionalTag=o.specs.props.optionalTag.default,this.optionalText=o.specs.props.optionalText.default,this.requiredTag=o.specs.props.requiredTag.default,this.requiredText=o.specs.props.requiredText.default,this.hasError=o.specs.props.hasError.default,this.errorMessage="",this.disabled=o.specs.props.disabled.default,this.inline=o.specs.props.inline.default,this.ariaDescribedby=void 0,this.hasFieldset=o.specs.props.hasFieldset.default,this.role="group",this.useWrapper=o.specs.props.useWrapper.default,this.slotController=new y.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":!0,"pkt-tag--small":!0,"pkt-tag--thin-text":!0,"pkt-tag--blue-light":this.optionalTag,"pkt-tag--beige":!this.optionalTag&&this.requiredTag},i=this.ariaDescribedby?this.ariaDescribedby:this.helptext?`${this.forId}-helptext`:t.E,s=()=>this.optionalTag||this.requiredTag?t.x`<span class=${c.e(n)}
|
|
2
2
|
>${this.optionalTag?this.optionalText:this.requiredTag?this.requiredText:t.E}</span
|
|
3
3
|
>`:t.E,l=()=>this.useWrapper?this.hasFieldset?t.x`<legend
|
|
4
4
|
class="pkt-inputwrapper__legend"
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
${this.label}
|
|
23
23
|
</label>`,a=()=>t.x`
|
|
24
24
|
<pkt-helptext
|
|
25
|
-
class="${
|
|
25
|
+
class="${x.o(this.useWrapper?void 0:"pkt-hide")}"
|
|
26
26
|
.forId=${this.forId}
|
|
27
27
|
.helptext=${this.helptext}
|
|
28
28
|
.helptextDropdown=${this.helptextDropdown}
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
id="${this.forId}-error"
|
|
43
43
|
>
|
|
44
44
|
<pkt-icon name="alert-error" class="pkt-alert__icon"></pkt-icon>
|
|
45
|
-
<div class="pkt-alert__text">${
|
|
45
|
+
<div class="pkt-alert__text">${$.o(this.errorMessage)}</div>
|
|
46
46
|
</div>`:t.E,d=()=>t.x`
|
|
47
47
|
${l()} ${a()}
|
|
48
48
|
${this.counterPosition==="top"?h():t.E}
|
|
@@ -50,4 +50,4 @@
|
|
|
50
50
|
${this.counterPosition==="bottom"?h():t.E} ${f()}
|
|
51
51
|
`,k=()=>this.hasFieldset?t.x`<fieldset class="pkt-inputwrapper__fieldset" aria-describedby="${i}">
|
|
52
52
|
${d()}
|
|
53
|
-
</fieldset>`:t.x`<div class="pkt-inputwrapper__fieldset">${d()}</div>`;return t.x`<div class=${c.e(p)}>${k()}</div> `}toggleDropdown(p){this.dispatchEvent(new CustomEvent("toggleHelpText",{bubbles:!1,detail:{isOpen:p.detail.isOpen}}))}handleLabelClick(p){this.disabled&&(p.preventDefault(),p.stopImmediatePropagation()),this.dispatchEvent(new CustomEvent("labelClick",{bubbles:!0,composed:!0,detail:"label clicked"}))}};e([t.n({type:String})],exports.PktInputWrapper.prototype,"forId",2);e([t.n({type:String})],exports.PktInputWrapper.prototype,"label",2);e([t.n({type:String})],exports.PktInputWrapper.prototype,"helptext",2);e([t.n({type:String})],exports.PktInputWrapper.prototype,"helptextDropdown",2);e([t.n({type:String})],exports.PktInputWrapper.prototype,"helptextDropdownButton",2);e([t.n({type:Boolean})],exports.PktInputWrapper.prototype,"counter",2);e([t.n({type:Number})],exports.PktInputWrapper.prototype,"counterCurrent",2);e([t.n({type:Number})],exports.PktInputWrapper.prototype,"counterMaxLength",2);e([t.n({type:String})],exports.PktInputWrapper.prototype,"counterError",2);e([t.n({type:String,reflect:!1})],exports.PktInputWrapper.prototype,"counterPosition",2);e([t.n({type:Boolean})],exports.PktInputWrapper.prototype,"optionalTag",2);e([t.n({type:String})],exports.PktInputWrapper.prototype,"optionalText",2);e([t.n({type:Boolean})],exports.PktInputWrapper.prototype,"requiredTag",2);e([t.n({type:String})],exports.PktInputWrapper.prototype,"requiredText",2);e([t.n({type:Boolean})],exports.PktInputWrapper.prototype,"hasError",2);e([t.n({type:String})],exports.PktInputWrapper.prototype,"errorMessage",2);e([t.n({type:Boolean})],exports.PktInputWrapper.prototype,"disabled",2);e([t.n({type:Boolean})],exports.PktInputWrapper.prototype,"inline",2);e([t.n({type:String})],exports.PktInputWrapper.prototype,"ariaDescribedby",2);e([t.n({type:Boolean})],exports.PktInputWrapper.prototype,"hasFieldset",2);e([t.n({type:String,reflect:!0})],exports.PktInputWrapper.prototype,"role",2);e([t.n({type:Boolean,reflect:!0,converter:
|
|
53
|
+
</fieldset>`:t.x`<div class="pkt-inputwrapper__fieldset">${d()}</div>`;return t.x`<div class=${c.e(p)}>${k()}</div> `}toggleDropdown(p){this.dispatchEvent(new CustomEvent("toggleHelpText",{bubbles:!1,detail:{isOpen:p.detail.isOpen}}))}handleLabelClick(p){this.disabled&&(p.preventDefault(),p.stopImmediatePropagation()),this.dispatchEvent(new CustomEvent("labelClick",{bubbles:!0,composed:!0,detail:"label clicked"}))}};e([t.n({type:String})],exports.PktInputWrapper.prototype,"forId",2);e([t.n({type:String})],exports.PktInputWrapper.prototype,"label",2);e([t.n({type:String})],exports.PktInputWrapper.prototype,"helptext",2);e([t.n({type:String})],exports.PktInputWrapper.prototype,"helptextDropdown",2);e([t.n({type:String})],exports.PktInputWrapper.prototype,"helptextDropdownButton",2);e([t.n({type:Boolean})],exports.PktInputWrapper.prototype,"counter",2);e([t.n({type:Number})],exports.PktInputWrapper.prototype,"counterCurrent",2);e([t.n({type:Number})],exports.PktInputWrapper.prototype,"counterMaxLength",2);e([t.n({type:String})],exports.PktInputWrapper.prototype,"counterError",2);e([t.n({type:String,reflect:!1})],exports.PktInputWrapper.prototype,"counterPosition",2);e([t.n({type:Boolean})],exports.PktInputWrapper.prototype,"optionalTag",2);e([t.n({type:String})],exports.PktInputWrapper.prototype,"optionalText",2);e([t.n({type:Boolean})],exports.PktInputWrapper.prototype,"requiredTag",2);e([t.n({type:String})],exports.PktInputWrapper.prototype,"requiredText",2);e([t.n({type:Boolean})],exports.PktInputWrapper.prototype,"hasError",2);e([t.n({type:String})],exports.PktInputWrapper.prototype,"errorMessage",2);e([t.n({type:Boolean})],exports.PktInputWrapper.prototype,"disabled",2);e([t.n({type:Boolean})],exports.PktInputWrapper.prototype,"inline",2);e([t.n({type:String})],exports.PktInputWrapper.prototype,"ariaDescribedby",2);e([t.n({type:Boolean})],exports.PktInputWrapper.prototype,"hasFieldset",2);e([t.n({type:String,reflect:!0})],exports.PktInputWrapper.prototype,"role",2);e([t.n({type:Boolean,reflect:!0,converter:E})],exports.PktInputWrapper.prototype,"useWrapper",2);exports.PktInputWrapper=e([t.t("pkt-input-wrapper")],exports.PktInputWrapper);
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { P as h
|
|
2
|
-
import { P } from "./pkt-slot-controller-BPGj-LC5.js";
|
|
3
|
-
import { e as
|
|
4
|
-
import {
|
|
5
|
-
import "./
|
|
1
|
+
import { P as h } from "./element-Cfyyg4nF.js";
|
|
2
|
+
import { P as m } from "./pkt-slot-controller-BPGj-LC5.js";
|
|
3
|
+
import { e as u, n as P } from "./ref-DX488m2G.js";
|
|
4
|
+
import { E as k, x as c, n as o, t as g } from "./lit-element-DcUrSbRH.js";
|
|
5
|
+
import { e as d } from "./class-map-DO0E7GkW.js";
|
|
6
|
+
import "./icon-DPnB79MP.js";
|
|
6
7
|
const x = {
|
|
7
8
|
href: {
|
|
8
9
|
default: "#"
|
|
@@ -13,7 +14,7 @@ const x = {
|
|
|
13
14
|
external: {
|
|
14
15
|
default: !1
|
|
15
16
|
}
|
|
16
|
-
},
|
|
17
|
+
}, f = {
|
|
17
18
|
props: x
|
|
18
19
|
};
|
|
19
20
|
var y = Object.defineProperty, _ = Object.getOwnPropertyDescriptor, r = (i, n, l, s) => {
|
|
@@ -23,7 +24,7 @@ var y = Object.defineProperty, _ = Object.getOwnPropertyDescriptor, r = (i, n, l
|
|
|
23
24
|
};
|
|
24
25
|
let e = class extends h {
|
|
25
26
|
constructor() {
|
|
26
|
-
super(), this.defaultSlot =
|
|
27
|
+
super(), this.defaultSlot = u(), this.href = f.props.href.default, this.iconName = void 0, this.iconPosition = void 0, this.external = f.props.external.default, this.target = f.props.target.default, this.slotController = new m(this, this.defaultSlot);
|
|
27
28
|
}
|
|
28
29
|
render() {
|
|
29
30
|
const i = {
|
|
@@ -32,12 +33,12 @@ let e = class extends h {
|
|
|
32
33
|
"pkt-link--icon-right": !!this.iconName && this.iconPosition === "right",
|
|
33
34
|
"pkt-link--external": this.external
|
|
34
35
|
};
|
|
35
|
-
return
|
|
36
|
+
return c`<a
|
|
36
37
|
class=${d(i)}
|
|
37
38
|
href=${this.href}
|
|
38
39
|
.target=${this.target}
|
|
39
|
-
.rel=${this.external ? "noopener noreferrer" :
|
|
40
|
-
>${this.iconName ?
|
|
40
|
+
.rel=${this.external ? "noopener noreferrer" : k}
|
|
41
|
+
>${this.iconName ? c`<pkt-icon name=${this.iconName} class="pkt-link__icon"></pkt-icon>` : ""} <span ${P(this.defaultSlot)}>Link</span></a
|
|
41
42
|
>`;
|
|
42
43
|
}
|
|
43
44
|
};
|
|
@@ -57,7 +58,7 @@ r([
|
|
|
57
58
|
o({ type: String, reflect: !0 })
|
|
58
59
|
], e.prototype, "target", 2);
|
|
59
60
|
e = r([
|
|
60
|
-
|
|
61
|
+
g("pkt-link")
|
|
61
62
|
], e);
|
|
62
63
|
export {
|
|
63
64
|
e as P
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";const f=require("./element-DUJa1sRq.cjs"),h=require("./pkt-slot-controller-BzddBp7z.cjs"),c=require("./ref-BMQZJJEo.cjs"),t=require("./lit-element-DHqqtYbj.cjs"),k=require("./class-map-dph2jLEp.cjs");require("./icon-RJ9Op-BB.cjs");const u={href:{default:"#"},target:{default:"_self"},external:{default:!1}},a={props:u};var P=Object.defineProperty,g=Object.getOwnPropertyDescriptor,n=(o,r,s,i)=>{for(var e=i>1?void 0:i?g(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&&P(r,s,e),e};exports.PktLink=class extends f.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 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
|
+
class=${k.e(r)}
|
|
3
|
+
href=${this.href}
|
|
4
|
+
.target=${this.target}
|
|
5
|
+
.rel=${this.external?"noopener noreferrer":t.E}
|
|
6
|
+
>${this.iconName?t.x`<pkt-icon name=${this.iconName} class="pkt-link__icon"></pkt-icon>`:""} <span ${c.n(this.defaultSlot)}>Link</span></a
|
|
7
|
+
>`}};n([t.n({type:String,reflect:!0})],exports.PktLink.prototype,"href",2);n([t.n({type:String,reflect:!0})],exports.PktLink.prototype,"iconName",2);n([t.n({type:String,reflect:!0})],exports.PktLink.prototype,"iconPosition",2);n([t.n({type:Boolean,reflect:!0})],exports.PktLink.prototype,"external",2);n([t.n({type:String,reflect:!0})],exports.PktLink.prototype,"target",2);exports.PktLink=n([t.t("pkt-link")],exports.PktLink);
|
|
@@ -1,29 +1,30 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { e as
|
|
1
|
+
import { x as c, n, t as f } from "./lit-element-DcUrSbRH.js";
|
|
2
|
+
import { e as h, n as k } from "./ref-DX488m2G.js";
|
|
3
|
+
import { P as m } from "./element-Cfyyg4nF.js";
|
|
3
4
|
import { P as u } from "./pkt-slot-controller-BPGj-LC5.js";
|
|
4
|
-
import "./icon-
|
|
5
|
-
var _ = Object.defineProperty, d = Object.getOwnPropertyDescriptor, r = (
|
|
6
|
-
for (var e =
|
|
7
|
-
(p =
|
|
8
|
-
return
|
|
5
|
+
import "./icon-DPnB79MP.js";
|
|
6
|
+
var _ = Object.defineProperty, d = Object.getOwnPropertyDescriptor, r = (o, i, s, l) => {
|
|
7
|
+
for (var e = l > 1 ? void 0 : l ? d(i, s) : i, a = o.length - 1, p; a >= 0; a--)
|
|
8
|
+
(p = o[a]) && (e = (l ? p(i, s, e) : p(e)) || e);
|
|
9
|
+
return l && e && _(i, s, e), e;
|
|
9
10
|
};
|
|
10
|
-
let t = class extends
|
|
11
|
+
let t = class extends m {
|
|
11
12
|
constructor() {
|
|
12
|
-
super(), this.defaultSlot =
|
|
13
|
+
super(), this.defaultSlot = h(), this.title = "", this.href = "#", this.iconName = "", this.external = !1, this.openInNewTab = !1, this.skin = "normal", this.slotController = new u(this, this.defaultSlot);
|
|
13
14
|
}
|
|
14
15
|
render() {
|
|
15
|
-
const
|
|
16
|
+
const o = ["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(" ");
|
|
16
17
|
return c`
|
|
17
18
|
<a
|
|
18
19
|
href=${this.href}
|
|
19
|
-
class=${
|
|
20
|
+
class=${o}
|
|
20
21
|
target=${this.openInNewTab ? "_blank" : "_self"}
|
|
21
22
|
rel=${this.openInNewTab ?? "noopener noreferrer"}
|
|
22
23
|
>
|
|
23
24
|
${this.iconName && c`<pkt-icon class="pkt-link__icon" name="${this.iconName}" />`}
|
|
24
25
|
${this.title && c`<div class=${i}>${this.title}</div>`}
|
|
25
26
|
|
|
26
|
-
<div class="pkt-linkcard__text" ${
|
|
27
|
+
<div class="pkt-linkcard__text" ${k(this.defaultSlot)}></div>
|
|
27
28
|
</a>
|
|
28
29
|
`;
|
|
29
30
|
}
|
|
@@ -47,7 +48,7 @@ r([
|
|
|
47
48
|
n({ type: String, reflect: !0 })
|
|
48
49
|
], t.prototype, "skin", 2);
|
|
49
50
|
t = r([
|
|
50
|
-
|
|
51
|
+
f("pkt-linkcard")
|
|
51
52
|
], t);
|
|
52
53
|
export {
|
|
53
54
|
t as P
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const t=require("./element-
|
|
1
|
+
"use strict";const t=require("./lit-element-DHqqtYbj.cjs"),k=require("./ref-BMQZJJEo.cjs"),p=require("./element-DUJa1sRq.cjs"),c=require("./pkt-slot-controller-BzddBp7z.cjs");require("./icon-RJ9Op-BB.cjs");var h=Object.defineProperty,f=Object.getOwnPropertyDescriptor,r=(s,n,i,l)=>{for(var e=l>1?void 0:l?f(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&&h(n,i,e),e};exports.PktLinkCard=class extends p.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 c.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}
|