@oslokommune/punkt-elements 12.42.12 → 12.42.13
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-Be6vyX31.js → accordionitem-C9FI-NXW.js} +7 -8
- package/dist/{accordionitem-ogt0KNGP.cjs → accordionitem-DjAWPtsn.cjs} +5 -5
- package/dist/{alert-CZyqekhG.js → alert-B0OUR9oD.js} +21 -22
- package/dist/alert-BH0lJ2ny.cjs +32 -0
- package/dist/{backlink-C3dfam09.js → backlink-B13JTp9D.js} +11 -12
- package/dist/backlink-C5jQRMwJ.cjs +13 -0
- package/dist/button-CDocR7iN.cjs +19 -0
- package/dist/{button-OoC1RGJL.js → button-DrrEvUy9.js} +7 -8
- package/dist/calendar-BZe2D4Sr.cjs +108 -0
- package/dist/{calendar-qEV4u3xs.js → calendar-DevQhOup.js} +10 -11
- package/dist/{card-CJue0Esh.cjs → card-Bx36j0q4.cjs} +1 -1
- package/dist/{card-p-fcc7Wh.js → card-Djnd-pgo.js} +8 -9
- package/dist/{checkbox-iLywLQwL.cjs → checkbox-CJ4tK9RC.cjs} +1 -1
- package/dist/{checkbox-BLI7dfpW.js → checkbox-cD_5LDzV.js} +4 -4
- package/dist/{class-map-dph2jLEp.cjs → class-map-BBG2gMX4.cjs} +1 -1
- package/dist/{class-map-DO0E7GkW.js → class-map-BpTj9gtz.js} +1 -1
- package/dist/{combobox-BJOVpwAW.cjs → combobox-Cv6i7BEk.cjs} +1 -1
- package/dist/{combobox-C_Zj-ZxE.js → combobox-kWGI4RHI.js} +11 -11
- package/dist/{consent-C0pd0E2Q.js → consent-CftYu8Di.js} +5 -6
- package/dist/consent-DrS71kvz.cjs +11 -0
- package/dist/{datepicker--I3DF-Ci.cjs → datepicker-BJe92Vor.cjs} +1 -1
- package/dist/{datepicker-Y6-ORa5u.js → datepicker-LpbYHx8L.js} +11 -11
- package/dist/{directive-helpers-lOXMtxMR.cjs → directive-helpers-BBbxqP2W.cjs} +2 -2
- package/dist/{directive-helpers-D2BEk_ct.js → directive-helpers-r-kOS_Mf.js} +1 -1
- package/dist/element-6DBpyGQm.cjs +238 -0
- package/dist/{element-Cfyyg4nF.js → element-CgEWt74-.js} +9272 -9157
- package/dist/heading-BRE_iFtR.cjs +1 -0
- package/dist/{heading-BWV1JThP.js → heading-D6jXE_Mz.js} +4 -4
- package/dist/{helptext-C7oP6VRp.js → helptext-B7eI0iBQ.js} +18 -19
- package/dist/helptext-CzQX6YVE.cjs +24 -0
- package/dist/{icon-RJ9Op-BB.cjs → icon-B_ryAy4Q.cjs} +3 -3
- package/dist/{icon-DPnB79MP.js → icon-CC1js8eR.js} +11 -12
- package/dist/{if-defined-I-IZkUY2.js → if-defined-CmuO4Vz9.js} +1 -1
- package/dist/if-defined-Cni-RHLS.cjs +5 -0
- package/dist/index.d.ts +27 -27
- package/dist/input-element-CHjLWeKt.cjs +1 -0
- package/dist/input-element-Cco4PA2M.js +700 -0
- package/dist/{input-wrapper-DrJgi10C.cjs → input-wrapper-BxZf8wEP.cjs} +4 -4
- package/dist/{input-wrapper-BDm0DwAW.js → input-wrapper-gz7ppKrK.js} +13 -14
- package/dist/{link-BzKHhT3c.js → link-C76H6Qf1.js} +11 -12
- package/dist/link-DTkjNlmy.cjs +7 -0
- package/dist/{linkcard-CyepaY-g.js → linkcard-BVEsUPwG.js} +13 -14
- package/dist/{linkcard-Czsb01sQ.cjs → linkcard-BlMhPNry.cjs} +1 -1
- package/dist/{listbox-BIcmMiAK.cjs → listbox-C4supLfR.cjs} +7 -7
- package/dist/{listbox-Br7v_BsA.js → listbox-CLsSW32I.js} +10 -11
- package/dist/loader-CHPxY9c6.cjs +11 -0
- package/dist/{loader-Co35Rkbv.js → loader-Da4IOk_T.js} +15 -16
- package/dist/messagebox-CqUBJs_D.cjs +12 -0
- package/dist/{messagebox-CQXmoqzD.js → messagebox-DwGdcdm7.js} +17 -18
- package/dist/modal-BdA5aWGU.cjs +36 -0
- package/dist/{modal-DuubDFPT.js → modal-DcXPnFus.js} +26 -27
- 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 +62 -63
- 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-DF8IG5IY.cjs → progressbar-DhMBXkww.cjs} +7 -7
- package/dist/{progressbar-B75UwwRZ.js → progressbar-Dj_mI_A6.js} +13 -14
- package/dist/{radiobutton-DUpADoLc.cjs → radiobutton-0vVqu-GU.cjs} +1 -1
- package/dist/{radiobutton-CDO-HMP_.js → radiobutton-BcFRJFvI.js} +5 -5
- package/dist/{ref-DX488m2G.js → ref-BBYSqgeW.js} +2 -2
- package/dist/{ref-BMQZJJEo.cjs → ref-iJtiv3o2.cjs} +1 -1
- package/dist/{repeat-Dl4RVQIF.js → repeat-C8BeHwYx.js} +2 -2
- package/dist/{repeat-B93vZu9q.cjs → repeat-CDsZqct8.cjs} +1 -1
- package/dist/{select-q7qkLeW4.js → select-BaLHLuvH.js} +20 -20
- package/dist/select-CFpdOlDE.cjs +48 -0
- package/dist/{state-P2J1I2ny.js → state-Bo2bck5_.js} +1 -1
- package/dist/{state-y-GU-VH8.cjs → state-DPobt-Yz.cjs} +1 -1
- package/dist/{tag-OSIRLJc0.js → tag-BWm6s48d.js} +20 -21
- package/dist/tag-DPk3fpEg.cjs +18 -0
- package/dist/{textarea-BuhpS5Jj.cjs → textarea-CViiuZdR.cjs} +1 -1
- package/dist/{textarea-BIvwbRBK.js → textarea-EIFo7GZz.js} +22 -22
- package/dist/{textinput-BFbenR3I.js → textinput-BHS7b-Jt.js} +8 -8
- package/dist/{textinput-BUMlqXQC.cjs → textinput-_ZdyMA9O.cjs} +1 -1
- package/package.json +3 -3
- package/src/components/heading/heading.ts +3 -2
- package/dist/alert-DifeONO7.cjs +0 -32
- package/dist/backlink-C9qmM67k.cjs +0 -13
- package/dist/button-zO41ySZl.cjs +0 -19
- package/dist/calendar-BYYJH15O.cjs +0 -108
- package/dist/consent-BkgHuZ37.cjs +0 -11
- package/dist/element-DUJa1sRq.cjs +0 -212
- package/dist/heading-C6U6xiqH.cjs +0 -1
- package/dist/helptext-BxHMB-XH.cjs +0 -24
- package/dist/if-defined-BQOEcjlp.cjs +0 -5
- package/dist/input-element-B2JauW-Y.cjs +0 -1
- package/dist/input-element-CaCDNzdI.js +0 -230
- package/dist/link-Dhs4dS0S.cjs +0 -7
- package/dist/lit-element-DHqqtYbj.cjs +0 -27
- package/dist/lit-element-DcUrSbRH.js +0 -595
- package/dist/loader-5lt2W9RX.cjs +0 -11
- package/dist/messagebox-BSUbetVQ.cjs +0 -12
- package/dist/modal-5PZ-TDkV.cjs +0 -36
- package/dist/select-CE5L--Xw.cjs +0 -48
- package/dist/tag-sEPrma2U.cjs +0 -18
package/dist/pkt-tag.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./tag-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./tag-DPk3fpEg.cjs"),t=e.PktTag;Object.defineProperty(exports,"PktTag",{enumerable:!0,get:()=>e.PktTag});exports.default=t;
|
package/dist/pkt-tag.js
CHANGED
package/dist/pkt-textarea.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./textarea-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./textarea-CViiuZdR.cjs"),t=e.PktTextarea;Object.defineProperty(exports,"PktTextarea",{enumerable:!0,get:()=>e.PktTextarea});exports.default=t;
|
package/dist/pkt-textarea.js
CHANGED
package/dist/pkt-textinput.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./textinput-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./textinput-_ZdyMA9O.cjs"),t=e.PktTextinput;Object.defineProperty(exports,"PktTextinput",{enumerable:!0,get:()=>e.PktTextinput});exports.default=t;
|
package/dist/pkt-textinput.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
"use strict";const n=require("./class-map-
|
|
1
|
+
"use strict";const n=require("./class-map-BBG2gMX4.cjs"),e=require("./element-6DBpyGQm.cjs"),p=require("./state-DPobt-Yz.cjs"),h=require("./ref-iJtiv3o2.cjs"),b=require("./directive-C7oCP5Bh.cjs"),d=require("./stringutils-CkVRq4jP.cjs");require("./icon-B_ryAy4Q.cjs");/**
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright 2018 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
-
*/const c="important",
|
|
5
|
+
*/const c="important",v=" !"+c,f=b.e(class extends b.i{constructor(l){var t;if(super(l),l.type!==b.t.ATTRIBUTE||l.name!=="style"||((t=l.strings)==null?void 0:t.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(l){return Object.keys(l).reduce((t,s)=>{const r=l[s];return r==null?t:t+`${s=s.includes("-")?s:s.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${r};`},"")}update(l,[t]){const{style:s}=l.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(t)),this.render(t);for(const r of this.ft)t[r]==null&&(this.ft.delete(r),r.includes("-")?s.removeProperty(r):s[r]=null);for(const r in t){const i=t[r];if(i!=null){this.ft.add(r);const u=typeof i=="string"&&i.endsWith(v);r.includes("-")||u?s.setProperty(r,u?i.slice(0,-11):i,u?c:""):s[r]=i}}return e.T}});var k=Object.defineProperty,m=Object.getOwnPropertyDescriptor,a=(l,t,s,r)=>{for(var i=r>1?void 0:r?m(t,s):t,u=l.length-1,o;u>=0;u--)(o=l[u])&&(i=(r?o(t,s,i):o(i))||i);return r&&i&&k(t,s,i),i};exports.PktProgressbar=class extends e.PktElement{constructor(){super(),this.ariaLabel=null,this.ariaLabelledby=null,this.ariaValueText=null,this.ariaLive="polite",this.id=d.uuidish(),this.role="progressbar",this.skin="dark-blue",this.statusPlacement="following",this.statusType="none",this.title="",this.titlePosition="left",this.valueCurrent=0,this.valueMax=100,this.valueMin=0,this.labelWidth=0,this.progressbarId=this.id,this.computedAriaLabelledby=null,this.computedAriaValueText="",this.labelRef=h.e(),this.progressBarRef=h.e()}firstUpdated(t){super.firstUpdated(t),this.setComputedValues(),this.syncAttributes()}updated(t){super.updated(t),t.has("valueCurrent")&&this.labelRef.value&&(this.labelWidth=this.labelRef.value.getBoundingClientRect().width||0),t.has("id")&&this.id&&(this.progressBarId=this.id),(t.has("statusType")||t.has("id")||t.has("ariaLabelledby"))&&(this.progressbarId=this.id||d.uuidish(),this.computedAriaLabelledby=this.ariaLabelledby||`${this.progressbarId}-title`),(t.has("ariaValueText")||t.has("valueCurrent")||t.has("valueMax"))&&(this.computedAriaValueText=this.statusType==="fraction"&&!this.ariaValueText?`${this.valueCurrent} av ${this.valueMax-this.valueMin}`:this.ariaValueText||""),this.syncAttributes()}render(){const t=this.statusType!=="none",s=this.valueMax-this.valueMin,r=this.valueCurrent/s*100,i=this.statusType==="fraction"?Math.round(r):Math.round((this.valueCurrent-this.valueMin)/(this.valueMax-this.valueMin)*100),u=`${this.valueCurrent} av ${s}`,o=n.e({"pkt-progressbar__bar":!0,[`pkt-progressbar__bar--${this.skin}`]:!!this.skin}),g=n.e({"pkt-progressbar__title":!0,"pkt-progressbar__title-center":this.titlePosition==="center"}),y=n.e({"pkt-progressbar__status":!0,"pkt-progressbar__status--center":this.statusPlacement==="center"}),P=n.e({"pkt-progressbar__status-placement--following":this.statusPlacement==="following","pkt-progressbar__status-placement--center":this.statusPlacement==="center","pkt-progressbar__status-placement--left":this.statusPlacement==="left"});return e.x` <div
|
|
6
6
|
class="pkt-progressbar__container"
|
|
7
7
|
.ref=${this.progressBarRef}
|
|
8
|
-
style=${
|
|
8
|
+
style=${f({"--pkt-progress-label-width":`${this.labelWidth}px`,"--pkt-progress-width":`${i}%`})}
|
|
9
9
|
>
|
|
10
|
-
${this.title?
|
|
10
|
+
${this.title?e.x`<p id=${`${this.progressBarId}-title`} class=${g}>${this.title}</p>`:e.E}
|
|
11
11
|
|
|
12
12
|
<div class="pkt-progressbar__bar-wrapper">
|
|
13
13
|
<div class=${o}></div>
|
|
14
14
|
</div>
|
|
15
15
|
|
|
16
|
-
${t?
|
|
16
|
+
${t?e.x`<div class=${y}>
|
|
17
17
|
<span class=${P} ${h.n(this.labelRef)}>
|
|
18
18
|
${this.statusType==="percentage"?`${i}%`:u}
|
|
19
19
|
</span>
|
|
20
|
-
</div>`:
|
|
21
|
-
</div>`}setComputedValues(){this.progressbarId=this.id||d.uuidish(),this.computedAriaLabelledby=this.ariaLabelledby||`${this.progressbarId}-title`,this.computedAriaValueText=this.statusType==="fraction"&&!this.ariaValueText?`${this.valueCurrent} av ${this.valueMax-this.valueMin}`:this.ariaValueText||""}syncAttributes(){this._handleAttribute("aria-live",this.ariaLive),this._handleAttribute("aria-valuenow",this.valueCurrent),this._handleAttribute("aria-valuemin",this.valueMin),this._handleAttribute("aria-valuemax",this.valueMax),this._handleAttribute("aria-valuetext",this.computedAriaValueText),this._handleAttribute("aria-label",this.ariaLabel),this._handleAttribute("role",this.role),this._handleAttribute("aria-atomic","true"),this._handleAttribute("id",this.progressbarId),this.ariaLabel||this._handleAttribute("aria-labelledby",this.computedAriaLabelledby)}_handleAttribute(t,
|
|
20
|
+
</div>`:e.E}
|
|
21
|
+
</div>`}setComputedValues(){this.progressbarId=this.id||d.uuidish(),this.computedAriaLabelledby=this.ariaLabelledby||`${this.progressbarId}-title`,this.computedAriaValueText=this.statusType==="fraction"&&!this.ariaValueText?`${this.valueCurrent} av ${this.valueMax-this.valueMin}`:this.ariaValueText||""}syncAttributes(){this._handleAttribute("aria-live",this.ariaLive),this._handleAttribute("aria-valuenow",this.valueCurrent),this._handleAttribute("aria-valuemin",this.valueMin),this._handleAttribute("aria-valuemax",this.valueMax),this._handleAttribute("aria-valuetext",this.computedAriaValueText),this._handleAttribute("aria-label",this.ariaLabel),this._handleAttribute("role",this.role),this._handleAttribute("aria-atomic","true"),this._handleAttribute("id",this.progressbarId),this.ariaLabel||this._handleAttribute("aria-labelledby",this.computedAriaLabelledby)}_handleAttribute(t,s){s==null||s===""?this.removeAttribute(t):this.setAttribute(t,String(s))}};a([e.n({type:String})],exports.PktProgressbar.prototype,"ariaLabel",2);a([e.n({type:String,reflect:!0})],exports.PktProgressbar.prototype,"ariaLabelledby",2);a([e.n({type:String,reflect:!0})],exports.PktProgressbar.prototype,"ariaValueText",2);a([e.n({type:String})],exports.PktProgressbar.prototype,"ariaLive",2);a([e.n({type:String,reflect:!0})],exports.PktProgressbar.prototype,"id",2);a([e.n({type:String})],exports.PktProgressbar.prototype,"role",2);a([e.n({type:String})],exports.PktProgressbar.prototype,"skin",2);a([e.n({type:String})],exports.PktProgressbar.prototype,"statusPlacement",2);a([e.n({type:String})],exports.PktProgressbar.prototype,"statusType",2);a([e.n({type:String,reflect:!0})],exports.PktProgressbar.prototype,"title",2);a([e.n({type:String})],exports.PktProgressbar.prototype,"titlePosition",2);a([e.n({type:Number,reflect:!0})],exports.PktProgressbar.prototype,"valueCurrent",2);a([e.n({type:Number})],exports.PktProgressbar.prototype,"valueMax",2);a([e.n({type:Number})],exports.PktProgressbar.prototype,"valueMin",2);a([p.r()],exports.PktProgressbar.prototype,"labelWidth",2);a([p.r()],exports.PktProgressbar.prototype,"progressbarId",2);a([p.r()],exports.PktProgressbar.prototype,"computedAriaLabelledby",2);a([p.r()],exports.PktProgressbar.prototype,"computedAriaValueText",2);exports.PktProgressbar=a([e.t("pkt-progressbar")],exports.PktProgressbar);const _=exports.PktProgressbar;exports.PktProgressbar$1=_;
|
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
import { e as n } from "./class-map-
|
|
2
|
-
import { T as g, E as c, x as b, n as u,
|
|
3
|
-
import { r as h } from "./state-
|
|
4
|
-
import {
|
|
5
|
-
import { e as y, n as A } from "./ref-DX488m2G.js";
|
|
1
|
+
import { e as n } from "./class-map-BpTj9gtz.js";
|
|
2
|
+
import { T as g, P as _, E as c, x as b, n as u, a as $ } from "./element-CgEWt74-.js";
|
|
3
|
+
import { r as h } from "./state-Bo2bck5_.js";
|
|
4
|
+
import { e as y, n as A } from "./ref-BBYSqgeW.js";
|
|
6
5
|
import { e as x, i as T, t as k } from "./directive-oAbCiebi.js";
|
|
7
6
|
import { u as d } from "./stringutils-DJjRa8dG.js";
|
|
8
|
-
import "./icon-
|
|
7
|
+
import "./icon-CC1js8eR.js";
|
|
9
8
|
/**
|
|
10
9
|
* @license
|
|
11
10
|
* Copyright 2018 Google LLC
|
|
12
11
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
13
12
|
*/
|
|
14
|
-
const
|
|
13
|
+
const v = "important", C = " !" + v, M = x(class extends T {
|
|
15
14
|
constructor(t) {
|
|
16
15
|
var e;
|
|
17
16
|
if (super(t), t.type !== k.ATTRIBUTE || t.name !== "style" || ((e = t.strings) == null ? void 0 : e.length) > 2) throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.");
|
|
@@ -31,7 +30,7 @@ const f = "important", C = " !" + f, M = x(class extends T {
|
|
|
31
30
|
if (l != null) {
|
|
32
31
|
this.ft.add(s);
|
|
33
32
|
const o = typeof l == "string" && l.endsWith(C);
|
|
34
|
-
s.includes("-") || o ? a.setProperty(s, o ? l.slice(0, -11) : l, o ?
|
|
33
|
+
s.includes("-") || o ? a.setProperty(s, o ? l.slice(0, -11) : l, o ? v : "") : a[s] = l;
|
|
35
34
|
}
|
|
36
35
|
}
|
|
37
36
|
return g;
|
|
@@ -42,7 +41,7 @@ var L = Object.defineProperty, S = Object.getOwnPropertyDescriptor, i = (t, e, a
|
|
|
42
41
|
(p = t[o]) && (l = (s ? p(e, a, l) : p(l)) || l);
|
|
43
42
|
return s && l && L(e, a, l), l;
|
|
44
43
|
};
|
|
45
|
-
let r = class extends
|
|
44
|
+
let r = class extends _ {
|
|
46
45
|
constructor() {
|
|
47
46
|
super(), this.ariaLabel = null, this.ariaLabelledby = null, this.ariaValueText = null, this.ariaLive = "polite", this.id = d(), this.role = "progressbar", this.skin = "dark-blue", this.statusPlacement = "following", this.statusType = "none", this.title = "", this.titlePosition = "left", this.valueCurrent = 0, this.valueMax = 100, this.valueMin = 0, this.labelWidth = 0, this.progressbarId = this.id, this.computedAriaLabelledby = null, this.computedAriaValueText = "", this.labelRef = y(), this.progressBarRef = y();
|
|
48
47
|
}
|
|
@@ -59,7 +58,7 @@ let r = class extends $ {
|
|
|
59
58
|
}), p = n({
|
|
60
59
|
"pkt-progressbar__title": !0,
|
|
61
60
|
"pkt-progressbar__title-center": this.titlePosition === "center"
|
|
62
|
-
}),
|
|
61
|
+
}), f = n({
|
|
63
62
|
"pkt-progressbar__status": !0,
|
|
64
63
|
"pkt-progressbar__status--center": this.statusPlacement === "center"
|
|
65
64
|
}), m = n({
|
|
@@ -81,7 +80,7 @@ let r = class extends $ {
|
|
|
81
80
|
<div class=${o}></div>
|
|
82
81
|
</div>
|
|
83
82
|
|
|
84
|
-
${t ? b`<div class=${
|
|
83
|
+
${t ? b`<div class=${f}>
|
|
85
84
|
<span class=${m} ${A(this.labelRef)}>
|
|
86
85
|
${this.statusType === "percentage" ? `${s}%` : l}
|
|
87
86
|
</span>
|
|
@@ -154,10 +153,10 @@ i([
|
|
|
154
153
|
h()
|
|
155
154
|
], r.prototype, "computedAriaValueText", 2);
|
|
156
155
|
r = i([
|
|
157
|
-
|
|
156
|
+
$("pkt-progressbar")
|
|
158
157
|
], r);
|
|
159
|
-
const
|
|
158
|
+
const W = r;
|
|
160
159
|
export {
|
|
161
160
|
r as P,
|
|
162
|
-
|
|
161
|
+
W as a
|
|
163
162
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const e=require("./
|
|
1
|
+
"use strict";const e=require("./element-6DBpyGQm.cjs"),p=require("./state-DPobt-Yz.cjs"),r=require("./input-element-CHjLWeKt.cjs"),o=require("./ref-iJtiv3o2.cjs"),u=require("./class-map-BBG2gMX4.cjs");var d=Object.defineProperty,k=Object.getOwnPropertyDescriptor,s=(l,t,n,c)=>{for(var i=c>1?void 0:c?k(t,n):t,h=l.length-1,a;h>=0;h--)(a=l[h])&&(i=(c?a(t,n,i):a(i))||i);return c&&i&&d(t,n,i),i};exports.PktRadioButton=class extends r.PktInputElement{constructor(){super(...arguments),this.inputRef=o.e(),this.value="",this.checkHelptext=null,this.defaultChecked=!1,this.hasTile=!1,this.checked=null,this.type="radio",this._checked=!1}connectedCallback(){super.connectedCallback()}attributeChangedCallback(t,n,c){t==="defaultChecked"&&(this._checked=this.defaultChecked),t==="checked"&&(this._checked=this.checked===""||this.checked==="true"||this.checked===!0),super.attributeChangedCallback(t,n,c)}render(){const t=u.e({"pkt-input-check__input":!0,"pkt-input-check__input--tile":this.hasTile,"pkt-input-check__input--tile-disabled":this.disabled&&this.hasTile}),n=u.e({"pkt-input-check__input-checkbox":!0,"pkt-input-check__input-checkbox--error":this.hasError}),c=u.e({"pkt-input-check__input-label":!0,"pkt-input-check__input-label--disabled":this.disabled,"pkt-sr-only":this.hideLabel}),i=()=>e.x`
|
|
2
2
|
<label class=${c} for=${this.id+"-internal"}>
|
|
3
3
|
${this.label}
|
|
4
4
|
${this.checkHelptext?e.x`<div class="pkt-input-check__input-helptext">${this.checkHelptext}</div>`:e.E}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { x as n, E as u, n as p,
|
|
2
|
-
import { r as k } from "./state-
|
|
3
|
-
import { P as f } from "./input-element-
|
|
4
|
-
import { e as _, n as b } from "./ref-
|
|
5
|
-
import { e as o } from "./class-map-
|
|
1
|
+
import { x as n, E as u, n as p, a as d } from "./element-CgEWt74-.js";
|
|
2
|
+
import { r as k } from "./state-Bo2bck5_.js";
|
|
3
|
+
import { P as f } from "./input-element-Cco4PA2M.js";
|
|
4
|
+
import { e as _, n as b } from "./ref-BBYSqgeW.js";
|
|
5
|
+
import { e as o } from "./class-map-BpTj9gtz.js";
|
|
6
6
|
var $ = Object.defineProperty, v = Object.getOwnPropertyDescriptor, c = (e, i, s, l) => {
|
|
7
7
|
for (var h = l > 1 ? void 0 : l ? v(i, s) : i, r = e.length - 1, a; r >= 0; r--)
|
|
8
8
|
(a = e[r]) && (h = (l ? a(i, s, h) : a(h)) || h);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { E as l } from "./
|
|
2
|
-
import { f as $ } from "./directive-helpers-
|
|
1
|
+
import { E as l } from "./element-CgEWt74-.js";
|
|
2
|
+
import { f as $ } from "./directive-helpers-r-kOS_Mf.js";
|
|
3
3
|
import { i as f, t as a, e as _ } from "./directive-oAbCiebi.js";
|
|
4
4
|
/**
|
|
5
5
|
* @license
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const d=require("./
|
|
1
|
+
"use strict";const d=require("./element-6DBpyGQm.cjs"),a=require("./directive-helpers-BBbxqP2W.cjs"),l=require("./directive-C7oCP5Bh.cjs");/**
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright 2017 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { T as $ } from "./
|
|
1
|
+
import { T as $ } from "./element-CgEWt74-.js";
|
|
2
2
|
import { e as A, i as M, t as b } from "./directive-oAbCiebi.js";
|
|
3
|
-
import { p as j, v as h, r as v, M as x, m as C } from "./directive-helpers-
|
|
3
|
+
import { p as j, v as h, r as v, M as x, m as C } from "./directive-helpers-r-kOS_Mf.js";
|
|
4
4
|
/**
|
|
5
5
|
* @license
|
|
6
6
|
* Copyright 2017 Google LLC
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const m=require("./
|
|
1
|
+
"use strict";const m=require("./element-6DBpyGQm.cjs"),x=require("./directive-C7oCP5Bh.cjs"),s=require("./directive-helpers-BBbxqP2W.cjs");/**
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright 2017 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { x as p, n as c,
|
|
2
|
-
import { r as f } from "./state-
|
|
3
|
-
import { e as u, n as d } from "./ref-
|
|
4
|
-
import { o } from "./if-defined-
|
|
5
|
-
import { P as b } from "./input-element-
|
|
1
|
+
import { x as p, n as c, a as v } from "./element-CgEWt74-.js";
|
|
2
|
+
import { r as f } from "./state-Bo2bck5_.js";
|
|
3
|
+
import { e as u, n as d } from "./ref-BBYSqgeW.js";
|
|
4
|
+
import { o } from "./if-defined-CmuO4Vz9.js";
|
|
5
|
+
import { P as b } from "./input-element-Cco4PA2M.js";
|
|
6
6
|
import { P as $ } from "./pkt-options-controller-CZO1nxZ8.js";
|
|
7
7
|
import { P as x } from "./pkt-slot-controller-BPGj-LC5.js";
|
|
8
|
-
import "./input-wrapper-
|
|
9
|
-
var m = Object.defineProperty, g = Object.getOwnPropertyDescriptor,
|
|
10
|
-
for (var l = i > 1 ? void 0 : i ? g(e, s) : e,
|
|
11
|
-
(r = t[
|
|
8
|
+
import "./input-wrapper-gz7ppKrK.js";
|
|
9
|
+
var m = Object.defineProperty, g = Object.getOwnPropertyDescriptor, h = (t, e, s, i) => {
|
|
10
|
+
for (var l = i > 1 ? void 0 : i ? g(e, s) : e, a = t.length - 1, r; a >= 0; a--)
|
|
11
|
+
(r = t[a]) && (l = (i ? r(e, s, l) : r(l)) || l);
|
|
12
12
|
return i && l && m(e, s, l), l;
|
|
13
13
|
};
|
|
14
|
-
let
|
|
14
|
+
let n = class extends b {
|
|
15
15
|
constructor() {
|
|
16
16
|
super(), this.inputRef = u(), this.helptextSlot = u(), this.options = [], this.value = "", this._options = [], this.selectedIndex = -1, this.selectedOptions = void 0, this.optionsController = new $(this), this.slotController = new x(this, this.helptextSlot), this.slotController.skipOptions = !0;
|
|
17
17
|
}
|
|
@@ -63,7 +63,7 @@ let h = class extends b {
|
|
|
63
63
|
}
|
|
64
64
|
attributeChangedCallback(t, e, s) {
|
|
65
65
|
var i, l;
|
|
66
|
-
t === "options" && (this._options = s ? JSON.parse(s) : []), t === "value" && this.value !== e && (this.selectedIndex = this.touched ? this.returnNumberOrNull((i = this.inputRef.value) == null ? void 0 : i.selectedIndex) : this.options.findIndex((
|
|
66
|
+
t === "options" && (this._options = s ? JSON.parse(s) : []), t === "value" && this.value !== e && (this.selectedIndex = this.touched ? this.returnNumberOrNull((i = this.inputRef.value) == null ? void 0 : i.selectedIndex) : this.options.findIndex((a) => a.value === s), this.selectedOptions = (l = this.inputRef.value) == null ? void 0 : l.selectedOptions, this.valueChanged(s, e)), super.attributeChangedCallback(t, e, s);
|
|
67
67
|
}
|
|
68
68
|
update(t) {
|
|
69
69
|
var e, s;
|
|
@@ -138,18 +138,18 @@ let h = class extends b {
|
|
|
138
138
|
return t == null || isNaN(t) ? null : t;
|
|
139
139
|
}
|
|
140
140
|
};
|
|
141
|
-
|
|
141
|
+
h([
|
|
142
142
|
c({ type: Array })
|
|
143
|
-
],
|
|
144
|
-
|
|
143
|
+
], n.prototype, "options", 2);
|
|
144
|
+
h([
|
|
145
145
|
c({ type: String })
|
|
146
|
-
],
|
|
147
|
-
|
|
146
|
+
], n.prototype, "value", 2);
|
|
147
|
+
h([
|
|
148
148
|
f()
|
|
149
|
-
],
|
|
150
|
-
|
|
149
|
+
], n.prototype, "_options", 2);
|
|
150
|
+
n = h([
|
|
151
151
|
v("pkt-select")
|
|
152
|
-
],
|
|
152
|
+
], n);
|
|
153
153
|
export {
|
|
154
|
-
|
|
154
|
+
n as P
|
|
155
155
|
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";const r=require("./element-6DBpyGQm.cjs"),p=require("./state-DPobt-Yz.cjs"),h=require("./ref-iJtiv3o2.cjs"),o=require("./if-defined-Cni-RHLS.cjs"),d=require("./input-element-CHjLWeKt.cjs"),c=require("./pkt-options-controller-CiuBG6Lt.cjs"),v=require("./pkt-slot-controller-BzddBp7z.cjs");require("./input-wrapper-BxZf8wEP.cjs");var f=Object.defineProperty,b=Object.getOwnPropertyDescriptor,a=(u,t,e,s)=>{for(var i=s>1?void 0:s?b(t,e):t,l=u.length-1,n;l>=0;l--)(n=u[l])&&(i=(s?n(t,e,i):n(i))||i);return s&&i&&f(t,e,i),i};exports.PktSelect=class extends d.PktInputElement{constructor(){super(),this.inputRef=h.e(),this.helptextSlot=h.e(),this.options=[],this.value="",this._options=[],this.selectedIndex=-1,this.selectedOptions=void 0,this.optionsController=new c.PktOptionsSlotController(this),this.slotController=new v.PktSlotController(this,this.helptextSlot),this.slotController.skipOptions=!0}connectedCallback(){super.connectedCallback();const t=this.options.length>0,e=this.optionsController.nodes.length&&this.optionsController.nodes.length>0;!t&&e?this.optionsController.nodes.forEach(s=>{const i={value:s.hasAttribute("value")?s.getAttribute("value")??"":s.textContent??"",label:s.textContent||s.getAttribute("value")||"",disabled:s.hasAttribute("disabled"),hidden:s.hasAttribute("data-hidden")};s.getAttribute("selected")&&!this.value&&(this.value=i.value),this._options.push(i)}):(this._options=this.options,this._options.forEach(s=>{s.selected&&!this.value&&(this.value=s.value)}))}add(t,e){var s,i,l;(s=this.inputRef.value)==null||s.add(t,e),this._options.push({value:t.value||t.text,label:t.text||t.value,selected:t.selected,disabled:t.disabled}),t.selected&&(this.value=t.value||t.text,this.selectedIndex=this.returnNumberOrNull((i=this.inputRef.value)==null?void 0:i.selectedIndex),this.selectedOptions=(l=this.inputRef.value)==null?void 0:l.selectedOptions),this.requestUpdate()}remove(t){var e,s;typeof t=="number"&&(this.selectedIndex===t&&(this.value=((e=this._options[0])==null?void 0:e.value)||""),(s=this.inputRef.value)==null||s.remove(t))}item(t){var e;return(e=this.inputRef.value)==null?void 0:e.item(t)}namedItem(t){var e;return(e=this.inputRef.value)==null?void 0:e.namedItem(t)}showPicker(){var t;(t=this.inputRef.value)==null||t.showPicker()}attributeChangedCallback(t,e,s){var i,l;t==="options"&&(this._options=s?JSON.parse(s):[]),t==="value"&&this.value!==e&&(this.selectedIndex=this.touched?this.returnNumberOrNull((i=this.inputRef.value)==null?void 0:i.selectedIndex):this.options.findIndex(n=>n.value===s),this.selectedOptions=(l=this.inputRef.value)==null?void 0:l.selectedOptions,this.valueChanged(s,e)),super.attributeChangedCallback(t,e,s)}update(t){var e,s;super.update(t),t.has("value")&&this.value!==t.get("value")&&(this.selectedIndex=this.touched?this.returnNumberOrNull((e=this.inputRef.value)==null?void 0:e.selectedIndex):this.options.findIndex(i=>i.value===this.value),this.selectedOptions=(s=this.inputRef.value)==null?void 0:s.selectedOptions,this.valueChanged(this.value,t.get("value"))),t.has("id")&&!this.name&&this.id&&(this.name=this.id)}firstUpdated(t){var e;super.firstUpdated(t),this.options.length&&(this._options=this.options),!this.value&&this._options.length>0?(this.value=this._options[0].value,this.selectedIndex=0):this.selectedIndex=this._options.findIndex(s=>s.value===this.value),this.selectedOptions=(e=this.inputRef.value)==null?void 0:e.selectedOptions}render(){const t=`pkt-input ${this.fullwidth?"pkt-input--fullwidth":""}`;return r.x`
|
|
2
|
+
<pkt-input-wrapper
|
|
3
|
+
?counter=${this.counter}
|
|
4
|
+
?disabled=${this.disabled}
|
|
5
|
+
?hasError=${this.hasError}
|
|
6
|
+
?hasFieldset=${this.hasFieldset}
|
|
7
|
+
?inline=${this.inline}
|
|
8
|
+
?optionalTag=${this.optionalTag}
|
|
9
|
+
?requiredTag=${this.requiredTag}
|
|
10
|
+
?useWrapper=${this.useWrapper}
|
|
11
|
+
ariaDescribedBy=${o.o(this.ariaDescribedBy)}
|
|
12
|
+
class="pkt-select"
|
|
13
|
+
errorMessage=${o.o(this.errorMessage)}
|
|
14
|
+
forId=${this.id+"-input"}
|
|
15
|
+
helptext=${o.o(this.helptext)}
|
|
16
|
+
helptextDropdown=${o.o(this.helptextDropdown)}
|
|
17
|
+
helptextDropdownButton=${o.o(this.helptextDropdownButton)}
|
|
18
|
+
label=${o.o(this.label)}
|
|
19
|
+
optionalText=${o.o(this.optionalText)}
|
|
20
|
+
requiredText=${o.o(this.requiredText)}
|
|
21
|
+
>
|
|
22
|
+
<select
|
|
23
|
+
class=${t}
|
|
24
|
+
aria-invalid=${this.hasError}
|
|
25
|
+
aria-errormessage=${`${this.id}-error`}
|
|
26
|
+
aria-labelledby=${o.o(this.ariaLabelledby)}
|
|
27
|
+
?disabled=${this.disabled}
|
|
28
|
+
id=${this.id+"-input"}
|
|
29
|
+
name=${(this.name||this.id)+"-input"}
|
|
30
|
+
value=${this.value}
|
|
31
|
+
@change=${e=>{this.touched=!0,this.value=e.target.value,e.stopImmediatePropagation()}}
|
|
32
|
+
@input=${e=>{this.onInput(),e.stopImmediatePropagation()}}
|
|
33
|
+
@focus=${e=>{this.onFocus(),e.stopImmediatePropagation()}}
|
|
34
|
+
@blur=${e=>{this.onBlur(),e.stopImmediatePropagation()}}
|
|
35
|
+
${h.n(this.inputRef)}
|
|
36
|
+
>
|
|
37
|
+
${this._options.length>0&&this._options.map(e=>r.x`<option
|
|
38
|
+
value=${e.value}
|
|
39
|
+
?selected=${this.value==e.value||e.selected}
|
|
40
|
+
?disabled=${e.disabled}
|
|
41
|
+
?hidden=${e.hidden}
|
|
42
|
+
>
|
|
43
|
+
${e.label}
|
|
44
|
+
</option>`)}
|
|
45
|
+
</select>
|
|
46
|
+
<div class="pkt-contents" ${h.n(this.helptextSlot)} name="helptext" slot="helptext"></div>
|
|
47
|
+
</pkt-input-wrapper>
|
|
48
|
+
`}returnNumberOrNull(t){return t==null||isNaN(t)?null:t}};a([r.n({type:Array})],exports.PktSelect.prototype,"options",2);a([r.n({type:String})],exports.PktSelect.prototype,"value",2);a([p.r()],exports.PktSelect.prototype,"_options",2);exports.PktSelect=a([r.t("pkt-select")],exports.PktSelect);
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { e as u } from "./class-map-
|
|
2
|
-
import { x as l, n as
|
|
3
|
-
import { r as
|
|
4
|
-
import { P as g } from "./element-Cfyyg4nF.js";
|
|
1
|
+
import { e as u } from "./class-map-BpTj9gtz.js";
|
|
2
|
+
import { P as m, x as l, n as r, a as g } from "./element-CgEWt74-.js";
|
|
3
|
+
import { r as k } from "./state-Bo2bck5_.js";
|
|
5
4
|
import { P as y } from "./pkt-slot-controller-BPGj-LC5.js";
|
|
6
|
-
import { e as b, n as f } from "./ref-
|
|
7
|
-
import "./icon-
|
|
8
|
-
import { o as d } from "./if-defined-
|
|
5
|
+
import { e as b, n as f } from "./ref-BBYSqgeW.js";
|
|
6
|
+
import "./icon-CC1js8eR.js";
|
|
7
|
+
import { o as d } from "./if-defined-CmuO4Vz9.js";
|
|
9
8
|
const _ = {
|
|
10
9
|
closeTag: {
|
|
11
10
|
default: !1
|
|
@@ -23,11 +22,11 @@ const _ = {
|
|
|
23
22
|
props: _
|
|
24
23
|
};
|
|
25
24
|
var $ = Object.defineProperty, S = Object.getOwnPropertyDescriptor, e = (s, i, p, o) => {
|
|
26
|
-
for (var
|
|
27
|
-
(h = s[c]) && (
|
|
28
|
-
return o &&
|
|
25
|
+
for (var a = o > 1 ? void 0 : o ? S(i, p) : i, c = s.length - 1, h; c >= 0; c--)
|
|
26
|
+
(h = s[c]) && (a = (o ? h(i, p, a) : h(a)) || a);
|
|
27
|
+
return o && a && $(i, p, a), a;
|
|
29
28
|
};
|
|
30
|
-
let t = class extends
|
|
29
|
+
let t = class extends m {
|
|
31
30
|
constructor() {
|
|
32
31
|
super(), this.defaultSlot = b(), this.closeTag = n.props.closeTag.default, this.size = n.props.size.default, this.skin = n.props.skin.default, this.textStyle = null, this.iconName = void 0, this.type = n.props.type.default, this.ariaLabel = null, this._isClosed = !1, this._ariaDescription = null, this.close = (s) => {
|
|
33
32
|
this._isClosed = !0, this.dispatchEvent(
|
|
@@ -84,34 +83,34 @@ let t = class extends g {
|
|
|
84
83
|
}
|
|
85
84
|
};
|
|
86
85
|
e([
|
|
87
|
-
|
|
86
|
+
r({ type: Boolean, reflect: !0 })
|
|
88
87
|
], t.prototype, "closeTag", 2);
|
|
89
88
|
e([
|
|
90
|
-
|
|
89
|
+
r({ type: String, reflect: !0 })
|
|
91
90
|
], t.prototype, "size", 2);
|
|
92
91
|
e([
|
|
93
|
-
|
|
92
|
+
r({ type: String, reflect: !0 })
|
|
94
93
|
], t.prototype, "skin", 2);
|
|
95
94
|
e([
|
|
96
|
-
|
|
95
|
+
r({ type: String, reflect: !0 })
|
|
97
96
|
], t.prototype, "textStyle", 2);
|
|
98
97
|
e([
|
|
99
|
-
|
|
98
|
+
r({ type: String, reflect: !0 })
|
|
100
99
|
], t.prototype, "iconName", 2);
|
|
101
100
|
e([
|
|
102
|
-
|
|
101
|
+
r({ type: String })
|
|
103
102
|
], t.prototype, "type", 2);
|
|
104
103
|
e([
|
|
105
|
-
|
|
104
|
+
r({ type: String })
|
|
106
105
|
], t.prototype, "ariaLabel", 2);
|
|
107
106
|
e([
|
|
108
|
-
|
|
107
|
+
k()
|
|
109
108
|
], t.prototype, "_isClosed", 2);
|
|
110
109
|
e([
|
|
111
|
-
|
|
110
|
+
k()
|
|
112
111
|
], t.prototype, "_ariaDescription", 2);
|
|
113
112
|
t = e([
|
|
114
|
-
|
|
113
|
+
g("pkt-tag")
|
|
115
114
|
], t);
|
|
116
115
|
export {
|
|
117
116
|
t as P
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";const u=require("./class-map-BBG2gMX4.cjs"),t=require("./element-6DBpyGQm.cjs"),k=require("./state-DPobt-Yz.cjs"),g=require("./pkt-slot-controller-BzddBp7z.cjs"),c=require("./ref-iJtiv3o2.cjs");require("./icon-B_ryAy4Q.cjs");const h=require("./if-defined-Cni-RHLS.cjs"),f={closeTag:{default:!1},size:{default:"medium"},skin:{default:"blue"},type:{default:"button"}},r={props:f};var d=Object.defineProperty,y=Object.getOwnPropertyDescriptor,i=(n,e,o,a)=>{for(var s=a>1?void 0:a?y(e,o):e,l=n.length-1,p;l>=0;l--)(p=n[l])&&(s=(a?p(e,o,s):p(s))||s);return a&&s&&d(e,o,s),s};exports.PktTag=class extends t.PktElement{constructor(){super(),this.defaultSlot=c.e(),this.closeTag=r.props.closeTag.default,this.size=r.props.size.default,this.skin=r.props.skin.default,this.textStyle=null,this.iconName=void 0,this.type=r.props.type.default,this.ariaLabel=null,this._isClosed=!1,this._ariaDescription=null,this.close=e=>{this._isClosed=!0,this.dispatchEvent(new CustomEvent("close",{detail:{origin:e},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("on-close",{detail:{origin:e},bubbles:!0,composed:!0}))},this.slotController=new g.PktSlotController(this,this.defaultSlot),this._isClosed=!1}firstUpdated(e){var o,a;if(super.firstUpdated(e),this.closeTag&&!this.ariaLabel){const s=(a=(o=this.defaultSlot.value)==null?void 0:o.textContent)==null?void 0:a.trim();s&&(this._ariaDescription=`Klikk for å fjerne ${s}`)}}render(){const e={"pkt-tag":!0,[`pkt-tag--${this.size}`]:!!this.size,[`pkt-tag--${this.skin}`]:!!this.skin,[`pkt-tag--${this.textStyle}`]:!!this.textStyle},o={"pkt-tag":!0,"pkt-btn":!0,"pkt-btn--tertiary":!0,[`pkt-tag--${this.textStyle}`]:!!this.textStyle,[`pkt-tag--${this.size}`]:!!this.size,[`pkt-tag--${this.skin}`]:!!this.skin,"pkt-btn--icons-right-and-left":this.closeTag&&!!this.iconName,"pkt-hide":this._isClosed};return this.closeTag?t.x`
|
|
2
|
+
<button
|
|
3
|
+
class=${u.e(o)}
|
|
4
|
+
type=${this.type}
|
|
5
|
+
@click=${this.close}
|
|
6
|
+
aria-label=${h.o(this.ariaLabel||void 0)}
|
|
7
|
+
aria-description=${h.o(this._ariaDescription||void 0)}
|
|
8
|
+
>
|
|
9
|
+
${this.iconName&&t.x`<pkt-icon class="pkt-tag__icon" name=${this.iconName}></pkt-icon>`}
|
|
10
|
+
<span ${c.n(this.defaultSlot)}></span>
|
|
11
|
+
<pkt-icon class="pkt-tag__close-btn" name="close"></pkt-icon>
|
|
12
|
+
</button>
|
|
13
|
+
`:t.x`
|
|
14
|
+
<span class=${u.e(e)}>
|
|
15
|
+
${this.iconName&&t.x`<pkt-icon class="pkt-tag__icon" name=${this.iconName}></pkt-icon>`}
|
|
16
|
+
<span ${c.n(this.defaultSlot)}></span>
|
|
17
|
+
</span>
|
|
18
|
+
`}};i([t.n({type:Boolean,reflect:!0})],exports.PktTag.prototype,"closeTag",2);i([t.n({type:String,reflect:!0})],exports.PktTag.prototype,"size",2);i([t.n({type:String,reflect:!0})],exports.PktTag.prototype,"skin",2);i([t.n({type:String,reflect:!0})],exports.PktTag.prototype,"textStyle",2);i([t.n({type:String,reflect:!0})],exports.PktTag.prototype,"iconName",2);i([t.n({type:String})],exports.PktTag.prototype,"type",2);i([t.n({type:String})],exports.PktTag.prototype,"ariaLabel",2);i([k.r()],exports.PktTag.prototype,"_isClosed",2);i([k.r()],exports.PktTag.prototype,"_ariaDescription",2);exports.PktTag=i([t.t("pkt-tag")],exports.PktTag);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const s=require("./
|
|
1
|
+
"use strict";const s=require("./element-6DBpyGQm.cjs"),p=require("./if-defined-Cni-RHLS.cjs"),c=require("./state-DPobt-Yz.cjs"),l=require("./ref-iJtiv3o2.cjs"),$=require("./class-map-BBG2gMX4.cjs"),a=require("./directive-C7oCP5Bh.cjs"),d=require("./directive-helpers-BBbxqP2W.cjs"),x=require("./input-element-CHjLWeKt.cjs"),T=require("./pkt-slot-controller-BzddBp7z.cjs");require("./input-wrapper-BxZf8wEP.cjs");require("./icon-B_ryAy4Q.cjs");/**
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright 2020 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { T as l, E as $, x as f, n as d,
|
|
2
|
-
import { o as u } from "./if-defined-
|
|
3
|
-
import { r as x } from "./state-
|
|
4
|
-
import { e as m, n as c } from "./ref-
|
|
5
|
-
import { e as v } from "./class-map-
|
|
6
|
-
import { e as b, i as T, t as
|
|
7
|
-
import { f as y, m as w } from "./directive-helpers-
|
|
8
|
-
import { P as C } from "./input-element-
|
|
1
|
+
import { T as l, E as $, x as f, n as d, a as g } from "./element-CgEWt74-.js";
|
|
2
|
+
import { o as u } from "./if-defined-CmuO4Vz9.js";
|
|
3
|
+
import { r as x } from "./state-Bo2bck5_.js";
|
|
4
|
+
import { e as m, n as c } from "./ref-BBYSqgeW.js";
|
|
5
|
+
import { e as v } from "./class-map-BpTj9gtz.js";
|
|
6
|
+
import { e as b, i as T, t as a } from "./directive-oAbCiebi.js";
|
|
7
|
+
import { f as y, m as w } from "./directive-helpers-r-kOS_Mf.js";
|
|
8
|
+
import { P as C } from "./input-element-Cco4PA2M.js";
|
|
9
9
|
import { P as E } from "./pkt-slot-controller-BPGj-LC5.js";
|
|
10
|
-
import "./input-wrapper-
|
|
11
|
-
import "./icon-
|
|
10
|
+
import "./input-wrapper-gz7ppKrK.js";
|
|
11
|
+
import "./icon-CC1js8eR.js";
|
|
12
12
|
/**
|
|
13
13
|
* @license
|
|
14
14
|
* Copyright 2020 Google LLC
|
|
@@ -16,7 +16,7 @@ import "./icon-DPnB79MP.js";
|
|
|
16
16
|
*/
|
|
17
17
|
const P = b(class extends T {
|
|
18
18
|
constructor(t) {
|
|
19
|
-
if (super(t), t.type !==
|
|
19
|
+
if (super(t), t.type !== a.PROPERTY && t.type !== a.ATTRIBUTE && t.type !== a.BOOLEAN_ATTRIBUTE) throw Error("The `live` directive is not allowed on child or event bindings");
|
|
20
20
|
if (!y(t)) throw Error("`live` bindings can only contain a single expression");
|
|
21
21
|
}
|
|
22
22
|
render(t) {
|
|
@@ -25,11 +25,11 @@ const P = b(class extends T {
|
|
|
25
25
|
update(t, [r]) {
|
|
26
26
|
if (r === l || r === $) return r;
|
|
27
27
|
const e = t.element, i = t.name;
|
|
28
|
-
if (t.type ===
|
|
28
|
+
if (t.type === a.PROPERTY) {
|
|
29
29
|
if (r === e[i]) return l;
|
|
30
|
-
} else if (t.type ===
|
|
30
|
+
} else if (t.type === a.BOOLEAN_ATTRIBUTE) {
|
|
31
31
|
if (!!r === e.hasAttribute(i)) return l;
|
|
32
|
-
} else if (t.type ===
|
|
32
|
+
} else if (t.type === a.ATTRIBUTE && e.getAttribute(i) === r + "") return l;
|
|
33
33
|
return w(t), r;
|
|
34
34
|
}
|
|
35
35
|
});
|
|
@@ -38,7 +38,7 @@ var B = Object.defineProperty, I = Object.getOwnPropertyDescriptor, n = (t, r, e
|
|
|
38
38
|
(p = t[h]) && (s = (i ? p(r, e, s) : p(s)) || s);
|
|
39
39
|
return i && s && B(r, e, s), s;
|
|
40
40
|
};
|
|
41
|
-
let
|
|
41
|
+
let o = class extends C {
|
|
42
42
|
constructor() {
|
|
43
43
|
super(), this.inputRef = m(), this.helptextSlot = m(), this.value = "", this.autocomplete = "off", this.rows = null, this.counterCurrent = 0, this.slotController = new E(this, this.helptextSlot);
|
|
44
44
|
}
|
|
@@ -112,19 +112,19 @@ let a = class extends C {
|
|
|
112
112
|
};
|
|
113
113
|
n([
|
|
114
114
|
d({ type: String, reflect: !0 })
|
|
115
|
-
],
|
|
115
|
+
], o.prototype, "value", 2);
|
|
116
116
|
n([
|
|
117
117
|
d({ type: String })
|
|
118
|
-
],
|
|
118
|
+
], o.prototype, "autocomplete", 2);
|
|
119
119
|
n([
|
|
120
120
|
d({ type: Number })
|
|
121
|
-
],
|
|
121
|
+
], o.prototype, "rows", 2);
|
|
122
122
|
n([
|
|
123
123
|
x()
|
|
124
|
-
],
|
|
125
|
-
|
|
124
|
+
], o.prototype, "counterCurrent", 2);
|
|
125
|
+
o = n([
|
|
126
126
|
g("pkt-textarea")
|
|
127
|
-
],
|
|
127
|
+
], o);
|
|
128
128
|
export {
|
|
129
|
-
|
|
129
|
+
o as P
|
|
130
130
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { E as p, x as h, n as a,
|
|
2
|
-
import { o as u } from "./if-defined-
|
|
3
|
-
import { r as f } from "./state-
|
|
4
|
-
import { e as m, n as d } from "./ref-
|
|
5
|
-
import { e as g } from "./class-map-
|
|
6
|
-
import { P as x } from "./input-element-
|
|
1
|
+
import { E as p, x as h, n as a, a as $ } from "./element-CgEWt74-.js";
|
|
2
|
+
import { o as u } from "./if-defined-CmuO4Vz9.js";
|
|
3
|
+
import { r as f } from "./state-Bo2bck5_.js";
|
|
4
|
+
import { e as m, n as d } from "./ref-BBYSqgeW.js";
|
|
5
|
+
import { e as g } from "./class-map-BpTj9gtz.js";
|
|
6
|
+
import { P as x } from "./input-element-Cco4PA2M.js";
|
|
7
7
|
import { P as y } from "./pkt-slot-controller-BPGj-LC5.js";
|
|
8
|
-
import "./input-wrapper-
|
|
9
|
-
import "./icon-
|
|
8
|
+
import "./input-wrapper-gz7ppKrK.js";
|
|
9
|
+
import "./icon-CC1js8eR.js";
|
|
10
10
|
var v = Object.defineProperty, b = Object.getOwnPropertyDescriptor, o = (e, i, r, t) => {
|
|
11
11
|
for (var n = t > 1 ? void 0 : t ? b(i, r) : i, l = e.length - 1, c; l >= 0; l--)
|
|
12
12
|
(c = e[l]) && (n = (t ? c(i, r, n) : c(n)) || n);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const t=require("./
|
|
1
|
+
"use strict";const t=require("./element-6DBpyGQm.cjs"),a=require("./if-defined-Cni-RHLS.cjs"),l=require("./state-DPobt-Yz.cjs"),h=require("./ref-iJtiv3o2.cjs"),c=require("./class-map-BBG2gMX4.cjs"),x=require("./input-element-CHjLWeKt.cjs"),d=require("./pkt-slot-controller-BzddBp7z.cjs");require("./input-wrapper-BxZf8wEP.cjs");require("./icon-B_ryAy4Q.cjs");var $=Object.defineProperty,f=Object.getOwnPropertyDescriptor,r=(u,i,s,n)=>{for(var e=n>1?void 0:n?f(i,s):i,o=u.length-1,p;o>=0;o--)(p=u[o])&&(e=(n?p(i,s,e):p(e))||e);return n&&e&&$(i,s,e),e};exports.PktTextinput=class extends x.PktInputElement{constructor(){super(),this.inputRef=h.e(),this.helptextSlot=h.e(),this.value="",this.type="text",this.size=null,this.autocomplete=null,this.iconNameRight=null,this.prefix=null,this.suffix=null,this.omitSearchIcon=!1,this.counterCurrent=0,this.slotController=new d.PktSlotController(this,this.helptextSlot)}attributeChangedCallback(i,s,n){i==="value"&&this.value!==s&&(this.counterCurrent=n?n.length:0,this.valueChanged(n,s)),super.attributeChangedCallback(i,s,n)}updated(i){var s;super.updated(i),i.has("value")&&(this.counterCurrent=((s=this.value)==null?void 0:s.length)||0,this.valueChanged(this.value,i.get("value"))),i.has("id")&&!this.name&&this.id&&(this.name=this.id)}render(){const i=this.type==="search"&&!this.iconNameRight&&!this.omitSearchIcon,s=c.e({"pkt-input":!0,"pkt-input--fullwidth":this.fullwidth,"pkt-input--counter-error":this.counter&&this.counterMaxLength&&this.value.length&&this.value.length>this.counterMaxLength}),n=this.ariaLabelledby||`${this.id}-input-label`;return t.x`
|
|
2
2
|
<pkt-input-wrapper
|
|
3
3
|
label="${this.label}"
|
|
4
4
|
?counter=${this.counter}
|