@oslokommune/punkt-elements 12.17.2 → 12.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +47 -0
- package/dist/{input-wrapper-6vTrKtsW.js → input-wrapper-DVXNuxVu.js} +4 -3
- package/dist/{input-wrapper-DX41tnbj.cjs → input-wrapper-tJE-X4Ac.cjs} +3 -3
- package/dist/{linkcard-BlWQ8jOv.js → linkcard-BHokvuVN.js} +10 -9
- package/dist/{linkcard-Det6CJ5D.cjs → linkcard-CUXMP6BH.cjs} +1 -1
- package/dist/modal-CjsQgmmH.cjs +30 -0
- package/dist/{modal-3OZTPqee.js → modal-lQfiTbGh.js} +2 -1
- package/dist/pkt-alert.cjs +1 -1
- package/dist/pkt-alert.js +18 -17
- package/dist/pkt-card.cjs +1 -1
- package/dist/pkt-card.js +4 -3
- package/dist/pkt-component-template.cjs +5 -5
- package/dist/pkt-component-template.js +18 -17
- package/dist/pkt-datepicker.cjs +1 -1
- package/dist/pkt-datepicker.js +2 -2
- package/dist/pkt-index.cjs +1 -1
- package/dist/pkt-index.js +17 -15
- package/dist/pkt-input-wrapper.cjs +1 -1
- package/dist/pkt-input-wrapper.js +1 -1
- package/dist/pkt-link.cjs +4 -4
- package/dist/pkt-link.js +3 -2
- package/dist/pkt-linkcard.cjs +1 -1
- package/dist/pkt-linkcard.js +1 -1
- package/dist/pkt-messagebox.cjs +3 -3
- package/dist/pkt-messagebox.js +7 -6
- package/dist/pkt-modal.cjs +1 -1
- package/dist/pkt-modal.js +1 -1
- package/dist/pkt-progressbar.cjs +1 -0
- package/dist/pkt-progressbar.js +6 -0
- package/dist/pkt-slot-controller-Ckk_yV0j.cjs +1 -0
- package/dist/pkt-slot-controller-RJvOnbF4.js +61 -0
- package/dist/pkt-tag.cjs +3 -3
- package/dist/pkt-tag.js +21 -20
- 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-1PEs_SMc.js +155 -0
- package/dist/progressbar-BlzTFI9U.cjs +36 -0
- package/dist/progressbar.d.ts +8 -0
- package/dist/ref-CA2-0S_W.cjs +13 -0
- package/dist/ref-Dzme4zb6.js +143 -0
- package/dist/{textarea-BTpJjEhO.js → textarea-BXzQA_ub.js} +2 -2
- package/dist/{textarea-B45ZZYpx.cjs → textarea-D_ud1Mpa.cjs} +1 -1
- package/dist/{textinput-BIhQEr8z.cjs → textinput-52G3CfwA.cjs} +1 -1
- package/dist/{textinput-CVo5wG14.js → textinput-CTNWiIaP.js} +2 -2
- package/package.json +2 -2
- package/src/components/index.ts +10 -0
- package/src/components/progressbar/index.ts +12 -0
- package/src/components/progressbar/progressbar.ts +144 -0
- package/dist/modal-DYTVJjYh.cjs +0 -30
- package/dist/ref-C2yPtMJA.cjs +0 -13
- package/dist/ref-CaiKp3S2.js +0 -202
package/dist/pkt-linkcard.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./linkcard-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./linkcard-CUXMP6BH.cjs"),t=e.PktLinkCard;Object.defineProperty(exports,"PktLinkCard",{enumerable:!0,get:()=>e.PktLinkCard});exports.default=t;
|
package/dist/pkt-linkcard.js
CHANGED
package/dist/pkt-messagebox.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-CR7t1zY9.cjs"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-CR7t1zY9.cjs"),b=require("./pkt-slot-controller-Ckk_yV0j.cjs"),p=require("./ref-CA2-0S_W.cjs"),k=require("./class-map-a5HUzP83.cjs"),d=require("./custom-element-B-TlBwRu.cjs");require("./index-CmTjXoAb.cjs");const u="pkt-messagebox",m=!0,g={onClose:{description:"React: Event som trigges når meldingsboksen lukkes"},"on-close":{description:"Vue: Event som trigges når meldingsboksen lukkes"}},h={title:{name:"Tittel",description:"Tittelen på meldingsboksen",type:"string"},skin:{name:"Utseende",description:"Velg farge på meldingsboksen",type:["beige","blue","red","green"],default:"beige"},compact:{name:"Kompakt",description:"Gjør meldingsboksen mindre",type:"boolean",default:!1},closable:{name:"Kan lukkes",description:"Viser lukkeknapp",type:"boolean",default:!1}},f={default:{description:"Innholdet i meldingsboksen"}},c={name:u,"css-class":"pkt-messagebox",isElement:m,events:g,props:h,slots:f};var x=Object.defineProperty,v=Object.getOwnPropertyDescriptor,o=(n,t,i,l)=>{for(var s=l>1?void 0:l?v(t,i):t,r=n.length-1,a;r>=0;r--)(a=n[r])&&(s=(l?a(t,i,s):a(s))||s);return l&&s&&x(t,i,s),s};exports.PktMessagebox=class extends e.PktElement{constructor(){super(),this.defaultSlot=p.e(),this.closable=c.props.closable.default,this.compact=c.props.compact.default,this.title="",this.skin=c.props.skin.default,this._isClosed=!1,this.close=t=>{this._isClosed=!0,this.dispatchEvent(new CustomEvent("close",{detail:{origin:t},bubbles:!0})),this.dispatchEvent(new CustomEvent("on-close",{detail:{origin:t},bubbles:!0}))},this.slotController=new b.PktSlotController(this,this.defaultSlot),this._isClosed=!1}render(){const t={"pkt-messagebox":!0,"pkt-messagebox--compact":this.compact,[`pkt-messagebox--${this.skin}`]:this.skin,"pkt-messagebox--closable":this.closable,"pkt-hide":this._isClosed};return e.x`<div class=${k.e(t)}>
|
|
2
2
|
${this.closable?e.x`<div class="pkt-messagebox__close">
|
|
3
3
|
<button
|
|
4
4
|
@click=${this.close}
|
|
@@ -8,5 +8,5 @@
|
|
|
8
8
|
</button>
|
|
9
9
|
</div>`:e.E}
|
|
10
10
|
${this.title?e.x`<div class="pkt-messagebox__title">${this.title}</div>`:e.E}
|
|
11
|
-
<div class="pkt-messagebox__text" ${
|
|
12
|
-
</div>`}};o([e.n({type:Boolean,reflect:!0})],exports.PktMessagebox.prototype,"closable",2);o([e.n({type:Boolean,reflect:!0})],exports.PktMessagebox.prototype,"compact",2);o([e.n({type:String,reflect:!0})],exports.PktMessagebox.prototype,"title",2);o([e.n({type:String,reflect:!0})],exports.PktMessagebox.prototype,"skin",2);o([e.r()],exports.PktMessagebox.prototype,"_isClosed",2);exports.PktMessagebox=o([
|
|
11
|
+
<div class="pkt-messagebox__text" ${p.n(this.defaultSlot)}></div>
|
|
12
|
+
</div>`}};o([e.n({type:Boolean,reflect:!0})],exports.PktMessagebox.prototype,"closable",2);o([e.n({type:Boolean,reflect:!0})],exports.PktMessagebox.prototype,"compact",2);o([e.n({type:String,reflect:!0})],exports.PktMessagebox.prototype,"title",2);o([e.n({type:String,reflect:!0})],exports.PktMessagebox.prototype,"skin",2);o([e.r()],exports.PktMessagebox.prototype,"_isClosed",2);exports.PktMessagebox=o([d.t("pkt-messagebox")],exports.PktMessagebox);
|
package/dist/pkt-messagebox.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { r as b, P as k, x as c, E as d, n } from "./index-CFDwiDTU.js";
|
|
2
|
-
import {
|
|
3
|
-
import { e as f } from "./
|
|
2
|
+
import { P as u } from "./pkt-slot-controller-RJvOnbF4.js";
|
|
3
|
+
import { e as g, n as f } from "./ref-Dzme4zb6.js";
|
|
4
|
+
import { e as h } from "./class-map-CBvUV2N3.js";
|
|
4
5
|
import { t as v } from "./custom-element-CWfU4dcr.js";
|
|
5
6
|
import "./index-RwtTBIhT.js";
|
|
6
7
|
const _ = "pkt-messagebox", x = !0, y = {
|
|
@@ -58,9 +59,9 @@ var P = Object.defineProperty, $ = Object.getOwnPropertyDescriptor, o = (e, l, p
|
|
|
58
59
|
};
|
|
59
60
|
let s = class extends k {
|
|
60
61
|
constructor() {
|
|
61
|
-
super(), this.defaultSlot =
|
|
62
|
+
super(), this.defaultSlot = g(), this.closable = m.props.closable.default, this.compact = m.props.compact.default, this.title = "", this.skin = m.props.skin.default, this._isClosed = !1, this.close = (e) => {
|
|
62
63
|
this._isClosed = !0, this.dispatchEvent(new CustomEvent("close", { detail: { origin: e }, bubbles: !0 })), this.dispatchEvent(new CustomEvent("on-close", { detail: { origin: e }, bubbles: !0 }));
|
|
63
|
-
}, this.slotController = new
|
|
64
|
+
}, this.slotController = new u(this, this.defaultSlot), this._isClosed = !1;
|
|
64
65
|
}
|
|
65
66
|
render() {
|
|
66
67
|
const e = {
|
|
@@ -70,7 +71,7 @@ let s = class extends k {
|
|
|
70
71
|
"pkt-messagebox--closable": this.closable,
|
|
71
72
|
"pkt-hide": this._isClosed
|
|
72
73
|
};
|
|
73
|
-
return c`<div class=${
|
|
74
|
+
return c`<div class=${h(e)}>
|
|
74
75
|
${this.closable ? c`<div class="pkt-messagebox__close">
|
|
75
76
|
<button
|
|
76
77
|
@click=${this.close}
|
|
@@ -80,7 +81,7 @@ let s = class extends k {
|
|
|
80
81
|
</button>
|
|
81
82
|
</div>` : d}
|
|
82
83
|
${this.title ? c`<div class="pkt-messagebox__title">${this.title}</div>` : d}
|
|
83
|
-
<div class="pkt-messagebox__text" ${
|
|
84
|
+
<div class="pkt-messagebox__text" ${f(this.defaultSlot)}></div>
|
|
84
85
|
</div>`;
|
|
85
86
|
}
|
|
86
87
|
};
|
package/dist/pkt-modal.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./modal-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./modal-CjsQgmmH.cjs"),t=e.PktModal;Object.defineProperty(exports,"PktModal",{enumerable:!0,get:()=>e.PktModal});exports.default=t;
|
package/dist/pkt-modal.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./progressbar-BlzTFI9U.cjs");Object.defineProperty(exports,"PktProgressbar",{enumerable:!0,get:()=>e.PktProgressbar});exports.default=e.PktProgressbar$1;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";class h{constructor(t,...e){this.nodes=[],this.host=t,this.host.addController(this),this.slots=e,this.nodes=[],this.observer=new MutationObserver(o=>this.handleMutations(o))}hostConnected(){this.updateNodes(),this.observer.observe(this.host,{childList:!0})}hostDisconnected(){this.observer.disconnect()}hostUpdated(){this.updateSlots()}updateNodes(){this.nodes=[],Array.from(this.host.childNodes).forEach(e=>{var o;if(e.nodeType===Node.TEXT_NODE&&((o=e.nodeValue)!=null&&o.trim())){const s=document==null?void 0:document.createElement("template");s.content.appendChild(e),this.nodes.push(s)}else this.isSlotElement(e)||this.nodes.push(e)})}updateSlots(){this.slots.forEach(t=>{if(!t.value)return;const e=t.value.getAttribute("name"),s=this.nodes.flatMap(i=>i.getAttribute&&i.getAttribute("slot")==e?this.nodeFromElement(i,t):[]).filter(i=>t.value&&!t.value.contains(i)&&!i.contains(t.value));s.length>0&&t.value.replaceChildren(...s)})}handleMutations(t){let e=!1;t.forEach(o=>{o.type==="childList"&&(o.addedNodes.forEach(s=>{var l;const i=s.nodeType===Node.ELEMENT_NODE&&!this.isSlotElement(s),n=s.nodeType===Node.TEXT_NODE&&((l=s.nodeValue)==null?void 0:l.trim());if(i)this.nodes.push(s),e=!0;else if(n){const d=document==null?void 0:document.createElement("template");d.content.appendChild(s),this.nodes.push(d),e=!0}}),o.removedNodes.forEach(s=>{this.nodes=this.nodes.filter(i=>i!==s),e=!0}))}),e&&this.updateSlots()}isSlotElement(t){return this.slots.some(e=>e.value===t)}nodeFromElement(t,e){var o;return t===((o=e.value)==null?void 0:o.parentNode)?[]:t instanceof HTMLTemplateElement?Array.from(t.content.childNodes):[t]}}exports.PktSlotController=h;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
class r {
|
|
2
|
+
constructor(t, ...e) {
|
|
3
|
+
this.nodes = [], this.host = t, this.host.addController(this), this.slots = e, this.nodes = [], this.observer = new MutationObserver((o) => this.handleMutations(o));
|
|
4
|
+
}
|
|
5
|
+
hostConnected() {
|
|
6
|
+
this.updateNodes(), this.observer.observe(this.host, { childList: !0 });
|
|
7
|
+
}
|
|
8
|
+
hostDisconnected() {
|
|
9
|
+
this.observer.disconnect();
|
|
10
|
+
}
|
|
11
|
+
hostUpdated() {
|
|
12
|
+
this.updateSlots();
|
|
13
|
+
}
|
|
14
|
+
updateNodes() {
|
|
15
|
+
this.nodes = [], Array.from(this.host.childNodes).forEach((e) => {
|
|
16
|
+
var o;
|
|
17
|
+
if (e.nodeType === Node.TEXT_NODE && ((o = e.nodeValue) != null && o.trim())) {
|
|
18
|
+
const s = document == null ? void 0 : document.createElement("template");
|
|
19
|
+
s.content.appendChild(e), this.nodes.push(s);
|
|
20
|
+
} else this.isSlotElement(e) || this.nodes.push(e);
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
updateSlots() {
|
|
24
|
+
this.slots.forEach((t) => {
|
|
25
|
+
if (!t.value) return;
|
|
26
|
+
const e = t.value.getAttribute("name"), s = this.nodes.flatMap(
|
|
27
|
+
(i) => i.getAttribute && i.getAttribute("slot") == e ? this.nodeFromElement(i, t) : []
|
|
28
|
+
).filter(
|
|
29
|
+
(i) => t.value && !t.value.contains(i) && !i.contains(t.value)
|
|
30
|
+
);
|
|
31
|
+
s.length > 0 && t.value.replaceChildren(...s);
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
handleMutations(t) {
|
|
35
|
+
let e = !1;
|
|
36
|
+
t.forEach((o) => {
|
|
37
|
+
o.type === "childList" && (o.addedNodes.forEach((s) => {
|
|
38
|
+
var d;
|
|
39
|
+
const i = s.nodeType === Node.ELEMENT_NODE && !this.isSlotElement(s), l = s.nodeType === Node.TEXT_NODE && ((d = s.nodeValue) == null ? void 0 : d.trim());
|
|
40
|
+
if (i)
|
|
41
|
+
this.nodes.push(s), e = !0;
|
|
42
|
+
else if (l) {
|
|
43
|
+
const n = document == null ? void 0 : document.createElement("template");
|
|
44
|
+
n.content.appendChild(s), this.nodes.push(n), e = !0;
|
|
45
|
+
}
|
|
46
|
+
}), o.removedNodes.forEach((s) => {
|
|
47
|
+
this.nodes = this.nodes.filter((i) => i !== s), e = !0;
|
|
48
|
+
}));
|
|
49
|
+
}), e && this.updateSlots();
|
|
50
|
+
}
|
|
51
|
+
isSlotElement(t) {
|
|
52
|
+
return this.slots.some((e) => e.value === t);
|
|
53
|
+
}
|
|
54
|
+
nodeFromElement(t, e) {
|
|
55
|
+
var o;
|
|
56
|
+
return t === ((o = e.value) == null ? void 0 : o.parentNode) ? [] : t instanceof HTMLTemplateElement ? Array.from(t.content.childNodes) : [t];
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
export {
|
|
60
|
+
r as P
|
|
61
|
+
};
|
package/dist/pkt-tag.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./class-map-a5HUzP83.cjs"),g=require("./custom-element-B-TlBwRu.cjs"),t=require("./index-CR7t1zY9.cjs"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./class-map-a5HUzP83.cjs"),g=require("./custom-element-B-TlBwRu.cjs"),t=require("./index-CR7t1zY9.cjs"),h=require("./pkt-slot-controller-Ckk_yV0j.cjs"),c=require("./ref-CA2-0S_W.cjs");require("./index-CmTjXoAb.cjs");const k="pkt-tag",d=!0,f={closeTag:{type:"boolean",required:!1,default:!1},size:{required:!1,default:"medium",type:["small","medium","large"]},iconName:{type:"icon",required:!1},skin:{required:!1,default:"blue",type:["blue","green","red","beige","yellow","gray","blue-light"]},textStyle:{required:!1,default:"normal-text",type:["thin-text","normal-text"]},type:{required:!1,default:"button",type:["button","submit","reset"]},ariaLabel:{type:"string",required:!1,default:"Lukk"}},y={default:{description:"Teksten til tag"}},a={name:k,"css-class":"pkt-tag",isElement:d,props:f,slots:y};var m=Object.defineProperty,b=Object.getOwnPropertyDescriptor,s=(o,e,l,r)=>{for(var i=r>1?void 0:r?b(e,l):e,n=o.length-1,p;n>=0;n--)(p=o[n])&&(i=(r?p(e,l,i):p(i))||i);return r&&i&&m(e,l,i),i};exports.PktTag=class extends t.PktElement{constructor(){super(),this.defaultSlot=c.e(),this.closeTag=a.props.closeTag.default,this.size=a.props.size.default,this.skin=a.props.skin.default,this.textStyle=a.props.textStyle.default,this.iconName=void 0,this.type=a.props.type.default,this.ariaLabel=a.props.ariaLabel.default,this._isClosed=!1,this.close=e=>{this._isClosed=!0,this.dispatchEvent(new CustomEvent("close",{detail:{origin:e},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("on-close",{detail:{origin:e},bubbles:!0,composed:!0}))},this.slotController=new h.PktSlotController(this,this.defaultSlot),this._isClosed=!1}render(){const e={"pkt-tag":!0,[`pkt-tag--${this.size}`]:!!this.size,[`pkt-tag--${this.skin}`]:!!this.skin,[`pkt-tag--${this.textStyle}`]:!!this.textStyle},l={"pkt-tag":!0,"pkt-btn":!0,"pkt-btn--tertiary":!0,[`pkt-tag--${this.size}`]:!!this.size,[`pkt-tag--${this.skin}`]:!!this.skin,[`pkt-tag--${this.textStyle}`]:!!this.textStyle,"pkt-btn--icons-right-and-left":this.closeTag&&!!this.iconName,"pkt-hide":this._isClosed};return this.closeTag?t.x`
|
|
2
2
|
<button
|
|
3
3
|
class=${u.e(l)}
|
|
4
4
|
type=${this.type}
|
|
@@ -6,12 +6,12 @@
|
|
|
6
6
|
@click=${this.close}
|
|
7
7
|
>
|
|
8
8
|
${this.iconName&&t.x`<pkt-icon class="pkt-tag__icon" name=${this.iconName}></pkt-icon>`}
|
|
9
|
-
<span ${
|
|
9
|
+
<span ${c.n(this.defaultSlot)}></span>
|
|
10
10
|
<pkt-icon class="pkt-tag__close-btn" name="close"></pkt-icon>
|
|
11
11
|
</button>
|
|
12
12
|
`:t.x`
|
|
13
13
|
<span class=${u.e(e)}>
|
|
14
14
|
${this.iconName&&t.x` <pkt-icon class="pkt-tag__icon" name=${this.iconName}></pkt-icon> `}
|
|
15
|
-
<span ${
|
|
15
|
+
<span ${c.n(this.defaultSlot)}></span>
|
|
16
16
|
</span>
|
|
17
17
|
`}};s([t.n({type:Boolean,reflect:!0})],exports.PktTag.prototype,"closeTag",2);s([t.n({type:String,reflect:!0})],exports.PktTag.prototype,"size",2);s([t.n({type:String,reflect:!0})],exports.PktTag.prototype,"skin",2);s([t.n({type:String,reflect:!0})],exports.PktTag.prototype,"textStyle",2);s([t.n({type:String,reflect:!0})],exports.PktTag.prototype,"iconName",2);s([t.n({type:String,reflect:!0})],exports.PktTag.prototype,"type",2);s([t.n({type:String,reflect:!0})],exports.PktTag.prototype,"ariaLabel",2);s([t.r()],exports.PktTag.prototype,"_isClosed",2);exports.PktTag=s([g.t("pkt-tag")],exports.PktTag);
|
package/dist/pkt-tag.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { e as h } from "./class-map-CBvUV2N3.js";
|
|
2
2
|
import { t as d } from "./custom-element-CWfU4dcr.js";
|
|
3
|
-
import { r as
|
|
4
|
-
import {
|
|
3
|
+
import { r as m, P as y, x as p, n as o } from "./index-CFDwiDTU.js";
|
|
4
|
+
import { P as g } from "./pkt-slot-controller-RJvOnbF4.js";
|
|
5
|
+
import { e as k, n as f } from "./ref-Dzme4zb6.js";
|
|
5
6
|
import "./index-RwtTBIhT.js";
|
|
6
7
|
const b = "pkt-tag", S = !0, $ = {
|
|
7
8
|
closeTag: {
|
|
@@ -61,27 +62,27 @@ const b = "pkt-tag", S = !0, $ = {
|
|
|
61
62
|
default: {
|
|
62
63
|
description: "Teksten til tag"
|
|
63
64
|
}
|
|
64
|
-
},
|
|
65
|
+
}, r = {
|
|
65
66
|
name: b,
|
|
66
67
|
"css-class": "pkt-tag",
|
|
67
68
|
isElement: S,
|
|
68
69
|
props: $,
|
|
69
70
|
slots: _
|
|
70
71
|
};
|
|
71
|
-
var x = Object.defineProperty, C = Object.getOwnPropertyDescriptor, e = (s,
|
|
72
|
-
for (var i =
|
|
73
|
-
(u = s[c]) && (i = (
|
|
74
|
-
return
|
|
72
|
+
var x = Object.defineProperty, C = Object.getOwnPropertyDescriptor, e = (s, l, n, a) => {
|
|
73
|
+
for (var i = a > 1 ? void 0 : a ? C(l, n) : l, c = s.length - 1, u; c >= 0; c--)
|
|
74
|
+
(u = s[c]) && (i = (a ? u(l, n, i) : u(i)) || i);
|
|
75
|
+
return a && i && x(l, n, i), i;
|
|
75
76
|
};
|
|
76
|
-
let t = class extends
|
|
77
|
+
let t = class extends y {
|
|
77
78
|
constructor() {
|
|
78
|
-
super(), this.defaultSlot =
|
|
79
|
+
super(), this.defaultSlot = k(), this.closeTag = r.props.closeTag.default, this.size = r.props.size.default, this.skin = r.props.skin.default, this.textStyle = r.props.textStyle.default, this.iconName = void 0, this.type = r.props.type.default, this.ariaLabel = r.props.ariaLabel.default, this._isClosed = !1, this.close = (s) => {
|
|
79
80
|
this._isClosed = !0, this.dispatchEvent(
|
|
80
81
|
new CustomEvent("close", { detail: { origin: s }, bubbles: !0, composed: !0 })
|
|
81
82
|
), this.dispatchEvent(
|
|
82
83
|
new CustomEvent("on-close", { detail: { origin: s }, bubbles: !0, composed: !0 })
|
|
83
84
|
);
|
|
84
|
-
}, this.slotController = new
|
|
85
|
+
}, this.slotController = new g(this, this.defaultSlot), this._isClosed = !1;
|
|
85
86
|
}
|
|
86
87
|
render() {
|
|
87
88
|
const s = {
|
|
@@ -89,7 +90,7 @@ let t = class extends g {
|
|
|
89
90
|
[`pkt-tag--${this.size}`]: !!this.size,
|
|
90
91
|
[`pkt-tag--${this.skin}`]: !!this.skin,
|
|
91
92
|
[`pkt-tag--${this.textStyle}`]: !!this.textStyle
|
|
92
|
-
},
|
|
93
|
+
}, l = {
|
|
93
94
|
"pkt-tag": !0,
|
|
94
95
|
"pkt-btn": !0,
|
|
95
96
|
"pkt-btn--tertiary": !0,
|
|
@@ -101,7 +102,7 @@ let t = class extends g {
|
|
|
101
102
|
};
|
|
102
103
|
return this.closeTag ? p`
|
|
103
104
|
<button
|
|
104
|
-
class=${h(
|
|
105
|
+
class=${h(l)}
|
|
105
106
|
type=${this.type}
|
|
106
107
|
aria-label=${this.ariaLabel}
|
|
107
108
|
@click=${this.close}
|
|
@@ -119,28 +120,28 @@ let t = class extends g {
|
|
|
119
120
|
}
|
|
120
121
|
};
|
|
121
122
|
e([
|
|
122
|
-
|
|
123
|
+
o({ type: Boolean, reflect: !0 })
|
|
123
124
|
], t.prototype, "closeTag", 2);
|
|
124
125
|
e([
|
|
125
|
-
|
|
126
|
+
o({ type: String, reflect: !0 })
|
|
126
127
|
], t.prototype, "size", 2);
|
|
127
128
|
e([
|
|
128
|
-
|
|
129
|
+
o({ type: String, reflect: !0 })
|
|
129
130
|
], t.prototype, "skin", 2);
|
|
130
131
|
e([
|
|
131
|
-
|
|
132
|
+
o({ type: String, reflect: !0 })
|
|
132
133
|
], t.prototype, "textStyle", 2);
|
|
133
134
|
e([
|
|
134
|
-
|
|
135
|
+
o({ type: String, reflect: !0 })
|
|
135
136
|
], t.prototype, "iconName", 2);
|
|
136
137
|
e([
|
|
137
|
-
|
|
138
|
+
o({ type: String, reflect: !0 })
|
|
138
139
|
], t.prototype, "type", 2);
|
|
139
140
|
e([
|
|
140
|
-
|
|
141
|
+
o({ type: String, reflect: !0 })
|
|
141
142
|
], t.prototype, "ariaLabel", 2);
|
|
142
143
|
e([
|
|
143
|
-
|
|
144
|
+
m()
|
|
144
145
|
], t.prototype, "_isClosed", 2);
|
|
145
146
|
t = e([
|
|
146
147
|
d("pkt-tag")
|
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-D_ud1Mpa.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-52G3CfwA.cjs"),t=e.PktTextinput;Object.defineProperty(exports,"PktTextinput",{enumerable:!0,get:()=>e.PktTextinput});exports.default=t;
|
package/dist/pkt-textinput.js
CHANGED
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
import { E as $, T as m, r as b, P as _, u as P, x as h, n as o } from "./index-CFDwiDTU.js";
|
|
2
|
+
import { e as u } from "./class-map-CBvUV2N3.js";
|
|
3
|
+
import { e as k, i as x, a as w, t as B } from "./custom-element-CWfU4dcr.js";
|
|
4
|
+
import { e as d, n as C } from "./ref-Dzme4zb6.js";
|
|
5
|
+
import "./index-RwtTBIhT.js";
|
|
6
|
+
/**
|
|
7
|
+
* @license
|
|
8
|
+
* Copyright 2018 Google LLC
|
|
9
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
10
|
+
*/
|
|
11
|
+
const c = (t) => t ?? $;
|
|
12
|
+
/**
|
|
13
|
+
* @license
|
|
14
|
+
* Copyright 2018 Google LLC
|
|
15
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
16
|
+
*/
|
|
17
|
+
const f = "important", T = " !" + f, M = k(class extends x {
|
|
18
|
+
constructor(t) {
|
|
19
|
+
var s;
|
|
20
|
+
if (super(t), t.type !== w.ATTRIBUTE || t.name !== "style" || ((s = t.strings) == null ? void 0 : s.length) > 2) throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.");
|
|
21
|
+
}
|
|
22
|
+
render(t) {
|
|
23
|
+
return Object.keys(t).reduce((s, r) => {
|
|
24
|
+
const e = t[r];
|
|
25
|
+
return e == null ? s : s + `${r = r.includes("-") ? r : r.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g, "-$&").toLowerCase()}:${e};`;
|
|
26
|
+
}, "");
|
|
27
|
+
}
|
|
28
|
+
update(t, [s]) {
|
|
29
|
+
const { style: r } = t.element;
|
|
30
|
+
if (this.ft === void 0) return this.ft = new Set(Object.keys(s)), this.render(s);
|
|
31
|
+
for (const e of this.ft) s[e] == null && (this.ft.delete(e), e.includes("-") ? r.removeProperty(e) : r[e] = null);
|
|
32
|
+
for (const e in s) {
|
|
33
|
+
const i = s[e];
|
|
34
|
+
if (i != null) {
|
|
35
|
+
this.ft.add(e);
|
|
36
|
+
const p = typeof i == "string" && i.endsWith(T);
|
|
37
|
+
e.includes("-") || p ? r.setProperty(e, p ? i.slice(0, -11) : i, p ? f : "") : r[e] = i;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
return m;
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
var S = Object.defineProperty, I = Object.getOwnPropertyDescriptor, l = (t, s, r, e) => {
|
|
44
|
+
for (var i = e > 1 ? void 0 : e ? I(s, r) : s, p = t.length - 1, n; p >= 0; p--)
|
|
45
|
+
(n = t[p]) && (i = (e ? n(s, r, i) : n(i)) || i);
|
|
46
|
+
return e && i && S(s, r, i), i;
|
|
47
|
+
};
|
|
48
|
+
let a = class extends _ {
|
|
49
|
+
constructor() {
|
|
50
|
+
super(...arguments), this.valueCurrent = 0, this.valueMax = 100, this.valueMin = 0, this.skin = "dark-blue", this.title = "", this.titlePosition = "left", this.statusType = "none", this.statusPlacement = "following", this.ariaLabel = "", this.ariaLabelledby = "", this.ariaValueText = "", this.role = "progressbar", this.labelWidth = 0, this.progressBarId = this.id, this.labelRef = d(), this.progressBarRef = d();
|
|
51
|
+
}
|
|
52
|
+
firstUpdated(t) {
|
|
53
|
+
super.firstUpdated(t), this.id ? this.progressBarId = this.id : this.progressBarId = P();
|
|
54
|
+
}
|
|
55
|
+
updated(t) {
|
|
56
|
+
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);
|
|
57
|
+
}
|
|
58
|
+
render() {
|
|
59
|
+
const t = this.valueMax - this.valueMin, s = this.valueCurrent / t * 100, r = this.valueMax !== 100 || this.valueMin !== 0 ? Math.round(s) : this.valueCurrent, e = `${this.valueCurrent} av ${this.valueMax}`, i = this.statusType !== "none", p = this.ariaLabelledby || this.progressBarId && `${this.progressBarId}-title`, n = u({
|
|
60
|
+
"pkt-progressbar__bar": !0,
|
|
61
|
+
[`pkt-progressbar__bar--${this.skin}`]: !!this.skin
|
|
62
|
+
}), g = u({
|
|
63
|
+
"pkt-progressbar__title": !0,
|
|
64
|
+
"pkt-progressbar__title-center": this.titlePosition === "center"
|
|
65
|
+
}), y = u({
|
|
66
|
+
"pkt-progressbar__status": !0,
|
|
67
|
+
"pkt-progressbar__status--center": this.statusPlacement === "center"
|
|
68
|
+
}), v = u({
|
|
69
|
+
"pkt-progressbar__status-placement--following": this.statusPlacement === "following",
|
|
70
|
+
"pkt-progressbar__status-placement--center": this.statusPlacement === "center",
|
|
71
|
+
"pkt-progressbar__status-placement--left": this.statusPlacement === "left"
|
|
72
|
+
});
|
|
73
|
+
return h` <div
|
|
74
|
+
id=${this.progressBarId}
|
|
75
|
+
class="pkt-progressbar__container"
|
|
76
|
+
.ref=${this.progressBarRef}
|
|
77
|
+
style=${M({
|
|
78
|
+
"--pkt-progress-label-width": `${this.labelWidth}px`,
|
|
79
|
+
"--pkt-progress-width": `${r}%`
|
|
80
|
+
})}
|
|
81
|
+
>
|
|
82
|
+
${this.title && h`<p id=${`${this.progressBarId}-title`} class=${g}>${this.title}</p>`}
|
|
83
|
+
|
|
84
|
+
<div
|
|
85
|
+
.id=${this.progressBarId}
|
|
86
|
+
role=${this.role}
|
|
87
|
+
class="pkt-progressbar__bar-wrapper"
|
|
88
|
+
aria-valuemin=${this.valueMin}
|
|
89
|
+
aria-valuemax=${this.valueMax}
|
|
90
|
+
aria-valuenow=${this.valueCurrent}
|
|
91
|
+
aria-labelledby=${c(p)}
|
|
92
|
+
aria-label=${c(this.ariaLabel)}
|
|
93
|
+
aria-valuetext=${c(this.ariaValueText)}
|
|
94
|
+
>
|
|
95
|
+
<div class=${n}></div>
|
|
96
|
+
</div>
|
|
97
|
+
|
|
98
|
+
${i && h`<div class=${y}>
|
|
99
|
+
<span class=${v} ${C(this.labelRef)}>
|
|
100
|
+
${this.statusType === "percentage" ? `${r}%` : e}
|
|
101
|
+
</span>
|
|
102
|
+
</div>`}
|
|
103
|
+
</div>`;
|
|
104
|
+
}
|
|
105
|
+
};
|
|
106
|
+
l([
|
|
107
|
+
o({ type: Number, reflect: !0 })
|
|
108
|
+
], a.prototype, "valueCurrent", 2);
|
|
109
|
+
l([
|
|
110
|
+
o({ type: Number, reflect: !0 })
|
|
111
|
+
], a.prototype, "valueMax", 2);
|
|
112
|
+
l([
|
|
113
|
+
o({ type: Number, reflect: !0 })
|
|
114
|
+
], a.prototype, "valueMin", 2);
|
|
115
|
+
l([
|
|
116
|
+
o({ type: String, reflect: !0 })
|
|
117
|
+
], a.prototype, "skin", 2);
|
|
118
|
+
l([
|
|
119
|
+
o({ type: String, reflect: !0 })
|
|
120
|
+
], a.prototype, "title", 2);
|
|
121
|
+
l([
|
|
122
|
+
o({ type: String, reflect: !0 })
|
|
123
|
+
], a.prototype, "titlePosition", 2);
|
|
124
|
+
l([
|
|
125
|
+
o({ type: String, reflect: !0 })
|
|
126
|
+
], a.prototype, "statusType", 2);
|
|
127
|
+
l([
|
|
128
|
+
o({ type: String, reflect: !0 })
|
|
129
|
+
], a.prototype, "statusPlacement", 2);
|
|
130
|
+
l([
|
|
131
|
+
o({ type: String, reflect: !0 })
|
|
132
|
+
], a.prototype, "ariaLabel", 2);
|
|
133
|
+
l([
|
|
134
|
+
o({ type: String, reflect: !0 })
|
|
135
|
+
], a.prototype, "ariaLabelledby", 2);
|
|
136
|
+
l([
|
|
137
|
+
o({ type: String, reflect: !0 })
|
|
138
|
+
], a.prototype, "ariaValueText", 2);
|
|
139
|
+
l([
|
|
140
|
+
o({ type: String, reflect: !0 })
|
|
141
|
+
], a.prototype, "role", 2);
|
|
142
|
+
l([
|
|
143
|
+
b()
|
|
144
|
+
], a.prototype, "labelWidth", 2);
|
|
145
|
+
l([
|
|
146
|
+
b()
|
|
147
|
+
], a.prototype, "progressBarId", 2);
|
|
148
|
+
a = l([
|
|
149
|
+
B("pkt-progressbar")
|
|
150
|
+
], a);
|
|
151
|
+
const E = a;
|
|
152
|
+
export {
|
|
153
|
+
a as P,
|
|
154
|
+
E as a
|
|
155
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";const r=require("./index-CR7t1zY9.cjs"),p=require("./class-map-a5HUzP83.cjs"),u=require("./custom-element-B-TlBwRu.cjs"),h=require("./ref-CA2-0S_W.cjs");require("./index-CmTjXoAb.cjs");/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2018 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
+
*/const c=i=>i??r.E;/**
|
|
6
|
+
* @license
|
|
7
|
+
* Copyright 2018 Google LLC
|
|
8
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
9
|
+
*/const b="important",y=" !"+b,v=u.e(class extends u.i{constructor(i){var t;if(super(i),i.type!==u.t$1.ATTRIBUTE||i.name!=="style"||((t=i.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(i){return Object.keys(i).reduce((t,s)=>{const e=i[s];return e==null?t:t+`${s=s.includes("-")?s:s.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${e};`},"")}update(i,[t]){const{style:s}=i.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(t)),this.render(t);for(const e of this.ft)t[e]==null&&(this.ft.delete(e),e.includes("-")?s.removeProperty(e):s[e]=null);for(const e in t){const a=t[e];if(a!=null){this.ft.add(e);const o=typeof a=="string"&&a.endsWith(y);e.includes("-")||o?s.setProperty(e,o?a.slice(0,-11):a,o?b:""):s[e]=a}}return r.T}});var k=Object.defineProperty,$=Object.getOwnPropertyDescriptor,l=(i,t,s,e)=>{for(var a=e>1?void 0:e?$(t,s):t,o=i.length-1,n;o>=0;o--)(n=i[o])&&(a=(e?n(t,s,a):n(a))||a);return e&&a&&k(t,s,a),a};exports.PktProgressbar=class extends r.PktElement{constructor(){super(...arguments),this.valueCurrent=0,this.valueMax=100,this.valueMin=0,this.skin="dark-blue",this.title="",this.titlePosition="left",this.statusType="none",this.statusPlacement="following",this.ariaLabel="",this.ariaLabelledby="",this.ariaValueText="",this.role="progressbar",this.labelWidth=0,this.progressBarId=this.id,this.labelRef=h.e(),this.progressBarRef=h.e()}firstUpdated(t){super.firstUpdated(t),this.id?this.progressBarId=this.id:this.progressBarId=r.uuidish()}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)}render(){const t=this.valueMax-this.valueMin,s=this.valueCurrent/t*100,e=this.valueMax!==100||this.valueMin!==0?Math.round(s):this.valueCurrent,a=`${this.valueCurrent} av ${this.valueMax}`,o=this.statusType!=="none",n=this.ariaLabelledby||this.progressBarId&&`${this.progressBarId}-title`,g=p.e({"pkt-progressbar__bar":!0,[`pkt-progressbar__bar--${this.skin}`]:!!this.skin}),d=p.e({"pkt-progressbar__title":!0,"pkt-progressbar__title-center":this.titlePosition==="center"}),P=p.e({"pkt-progressbar__status":!0,"pkt-progressbar__status--center":this.statusPlacement==="center"}),f=p.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 r.x` <div
|
|
10
|
+
id=${this.progressBarId}
|
|
11
|
+
class="pkt-progressbar__container"
|
|
12
|
+
.ref=${this.progressBarRef}
|
|
13
|
+
style=${v({"--pkt-progress-label-width":`${this.labelWidth}px`,"--pkt-progress-width":`${e}%`})}
|
|
14
|
+
>
|
|
15
|
+
${this.title&&r.x`<p id=${`${this.progressBarId}-title`} class=${d}>${this.title}</p>`}
|
|
16
|
+
|
|
17
|
+
<div
|
|
18
|
+
.id=${this.progressBarId}
|
|
19
|
+
role=${this.role}
|
|
20
|
+
class="pkt-progressbar__bar-wrapper"
|
|
21
|
+
aria-valuemin=${this.valueMin}
|
|
22
|
+
aria-valuemax=${this.valueMax}
|
|
23
|
+
aria-valuenow=${this.valueCurrent}
|
|
24
|
+
aria-labelledby=${c(n)}
|
|
25
|
+
aria-label=${c(this.ariaLabel)}
|
|
26
|
+
aria-valuetext=${c(this.ariaValueText)}
|
|
27
|
+
>
|
|
28
|
+
<div class=${g}></div>
|
|
29
|
+
</div>
|
|
30
|
+
|
|
31
|
+
${o&&r.x`<div class=${P}>
|
|
32
|
+
<span class=${f} ${h.n(this.labelRef)}>
|
|
33
|
+
${this.statusType==="percentage"?`${e}%`:a}
|
|
34
|
+
</span>
|
|
35
|
+
</div>`}
|
|
36
|
+
</div>`}};l([r.n({type:Number,reflect:!0})],exports.PktProgressbar.prototype,"valueCurrent",2);l([r.n({type:Number,reflect:!0})],exports.PktProgressbar.prototype,"valueMax",2);l([r.n({type:Number,reflect:!0})],exports.PktProgressbar.prototype,"valueMin",2);l([r.n({type:String,reflect:!0})],exports.PktProgressbar.prototype,"skin",2);l([r.n({type:String,reflect:!0})],exports.PktProgressbar.prototype,"title",2);l([r.n({type:String,reflect:!0})],exports.PktProgressbar.prototype,"titlePosition",2);l([r.n({type:String,reflect:!0})],exports.PktProgressbar.prototype,"statusType",2);l([r.n({type:String,reflect:!0})],exports.PktProgressbar.prototype,"statusPlacement",2);l([r.n({type:String,reflect:!0})],exports.PktProgressbar.prototype,"ariaLabel",2);l([r.n({type:String,reflect:!0})],exports.PktProgressbar.prototype,"ariaLabelledby",2);l([r.n({type:String,reflect:!0})],exports.PktProgressbar.prototype,"ariaValueText",2);l([r.n({type:String,reflect:!0})],exports.PktProgressbar.prototype,"role",2);l([r.r()],exports.PktProgressbar.prototype,"labelWidth",2);l([r.r()],exports.PktProgressbar.prototype,"progressBarId",2);exports.PktProgressbar=l([u.t("pkt-progressbar")],exports.PktProgressbar);const m=exports.PktProgressbar;exports.PktProgressbar$1=m;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";const l=require("./index-CR7t1zY9.cjs"),d=require("./custom-element-B-TlBwRu.cjs");/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2020 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
+
*/const{I:p}=l.Z,a=t=>t.strings===void 0,u=()=>document.createComment(""),Y=(t,s,e)=>{var h;const i=t._$AA.parentNode,n=s===void 0?t._$AB:s._$AA;if(e===void 0){const r=i.insertBefore(u(),n),$=i.insertBefore(u(),n);e=new p(r,$,t,t.options)}else{const r=e._$AB.nextSibling,$=e._$AM,f=$!==t;if(f){let o;(h=e._$AQ)==null||h.call(e,t),e._$AM=t,e._$AP!==void 0&&(o=t._$AU)!==$._$AU&&e._$AP(o)}if(r!==n||f){let o=e._$AA;for(;o!==r;){const g=o.nextSibling;i.insertBefore(o,n),o=g}}}return e},m=(t,s,e=t)=>(t._$AI(s,e),t),C={},M=(t,s=C)=>t._$AH=s,b=t=>t._$AH,N=t=>{var i;(i=t._$AP)==null||i.call(t,!1,!0);let s=t._$AA;const e=t._$AB.nextSibling;for(;s!==e;){const n=s.nextSibling;s.remove(),s=n}};/**
|
|
6
|
+
* @license
|
|
7
|
+
* Copyright 2017 Google LLC
|
|
8
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
9
|
+
*/const c=(t,s)=>{var i;const e=t._$AN;if(e===void 0)return!1;for(const n of e)(i=n._$AO)==null||i.call(n,s,!1),c(n,s);return!0},A=t=>{let s,e;do{if((s=t._$AM)===void 0)break;e=s._$AN,e.delete(t),t=s}while((e==null?void 0:e.size)===0)},v=t=>{for(let s;s=t._$AM;t=s){let e=s._$AN;if(e===void 0)s._$AN=e=new Set;else if(e.has(t))break;e.add(t),B(s)}};function w(t){this._$AN!==void 0?(A(this),this._$AM=t,v(this)):this._$AM=t}function x(t,s=!1,e=0){const i=this._$AH,n=this._$AN;if(n!==void 0&&n.size!==0)if(s)if(Array.isArray(i))for(let h=e;h<i.length;h++)c(i[h],!1),A(i[h]);else i!=null&&(c(i,!1),A(i));else c(this,t)}const B=t=>{t.type==d.t$1.CHILD&&(t._$AP??(t._$AP=x),t._$AQ??(t._$AQ=w))};class y extends d.i{constructor(){super(...arguments),this._$AN=void 0}_$AT(s,e,i){super._$AT(s,e,i),v(this),this.isConnected=s._$AU}_$AO(s,e=!0){var i,n;s!==this.isConnected&&(this.isConnected=s,s?(i=this.reconnected)==null||i.call(this):(n=this.disconnected)==null||n.call(this)),e&&(c(this,s),A(this))}setValue(s){if(a(this._$Ct))this._$Ct._$AI(s,this);else{const e=[...this._$Ct._$AH];e[this._$Ci]=s,this._$Ct._$AI(e,this,0)}}disconnected(){}reconnected(){}}/**
|
|
10
|
+
* @license
|
|
11
|
+
* Copyright 2020 Google LLC
|
|
12
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
13
|
+
*/const H=()=>new I;class I{}const _=new WeakMap,S=d.e(class extends y{render(t){return l.E}update(t,[s]){var i;const e=s!==this.Y;return e&&this.Y!==void 0&&this.rt(void 0),(e||this.lt!==this.ct)&&(this.Y=s,this.ht=(i=t.options)==null?void 0:i.host,this.rt(this.ct=t.element)),l.E}rt(t){if(this.isConnected||(t=void 0),typeof this.Y=="function"){const s=this.ht??globalThis;let e=_.get(s);e===void 0&&(e=new WeakMap,_.set(s,e)),e.get(this.Y)!==void 0&&this.Y.call(this.ht,void 0),e.set(this.Y,t),t!==void 0&&this.Y.call(this.ht,t)}else this.Y.value=t}get lt(){var t,s;return typeof this.Y=="function"?(t=_.get(this.ht??globalThis))==null?void 0:t.get(this.Y):(s=this.Y)==null?void 0:s.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});exports.M=N;exports.e=H;exports.f=a;exports.m=M;exports.n=S;exports.p=b;exports.r=Y;exports.v=m;
|