@oslokommune/punkt-elements 16.7.1 → 16.7.3
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-_9AiCIvd.cjs +34 -0
- package/dist/{accordionitem-ZlaXvjt5.js → accordionitem-dCfSrxh5.js} +57 -55
- package/dist/alert-BtOk8yRH.cjs +33 -0
- package/dist/{alert-BuAXrnKl.js → alert-DlY2_grU.js} +48 -46
- package/dist/backlink-Ce5Vldop.js +49 -0
- package/dist/backlink-y3dwjKPC.cjs +13 -0
- package/dist/button-B_TXwNzt.cjs +27 -0
- package/dist/{button-DEyvt1LI.js → button-BiY-wlKF.js} +79 -77
- package/dist/calendar-B2pji2zn.cjs +90 -0
- package/dist/{calendar-S63oreVW.js → calendar-DhjQDC4C.js} +689 -687
- package/dist/card-BwMNB5Bb.cjs +87 -0
- package/dist/{card-DDiLfuO4.js → card-CGlmcMSR.js} +99 -97
- package/dist/checkbox-BsJZYA26.js +147 -0
- package/dist/checkbox-CTY8f_qn.cjs +31 -0
- package/dist/{combobox-BmxSecfE.js → combobox-DSB5WOxg.js} +223 -226
- package/dist/{combobox-Hb2V-fPX.cjs → combobox-DbICIgKG.cjs} +4 -4
- package/dist/consent-DkOQpbsg.cjs +11 -0
- package/dist/{consent-iXyx5v6J.js → consent-SNWV_mMU.js} +48 -46
- package/dist/datepicker-BEWl9iz3.cjs +273 -0
- package/dist/{datepicker-CZl7b8Na.js → datepicker-euHyzXnb.js} +341 -329
- package/dist/{heading-CKt7cVn7.js → heading-D2tVS6lS.js} +30 -28
- package/dist/heading-DrzbgDb6.cjs +1 -0
- package/dist/helptext-BKtU4mas.js +82 -0
- package/dist/helptext-DcRC7wW2.cjs +24 -0
- package/dist/icon-CxQcIa5F.js +105 -0
- package/dist/icon-q81vqPK_.cjs +9 -0
- package/dist/input-wrapper-Bs4CRNst.js +181 -0
- package/dist/input-wrapper-Bv9aqqVq.cjs +54 -0
- package/dist/link-C0rl-86s.cjs +7 -0
- package/dist/link-Cdqgl60z.js +55 -0
- package/dist/linkcard-Dimu7Rlx.cjs +13 -0
- package/dist/linkcard-Lbq_UhjZ.js +56 -0
- package/dist/{listbox-BQKDZvZn.js → listbox-Bia4_tvN.js} +131 -129
- package/dist/listbox-La2GZQei.cjs +106 -0
- package/dist/loader-D1ugDXGV.cjs +16 -0
- package/dist/{loader-Ci3CHU8k.js → loader-DyN6RGC5.js} +51 -49
- package/dist/messagebox-BGMVm2t9.js +71 -0
- package/dist/messagebox-M0yIgCz9.cjs +13 -0
- package/dist/modal-CMO1RtIi.cjs +36 -0
- package/dist/{modal-DzGe1g8Z.js → modal-DjPQDE-Z.js} +53 -51
- 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 +3 -4
- package/dist/pkt-backlink.cjs +1 -1
- package/dist/pkt-backlink.js +2 -3
- package/dist/pkt-breadcrumbs.cjs +11 -11
- package/dist/pkt-breadcrumbs.js +30 -28
- package/dist/pkt-button.cjs +1 -1
- package/dist/pkt-button.js +3 -4
- package/dist/pkt-calendar.cjs +1 -1
- package/dist/pkt-calendar.js +2 -3
- package/dist/pkt-card.cjs +1 -1
- package/dist/pkt-card.js +2 -3
- package/dist/pkt-checkbox.cjs +1 -1
- package/dist/pkt-checkbox.js +3 -4
- package/dist/pkt-combobox.cjs +1 -1
- package/dist/pkt-combobox.js +3 -4
- package/dist/pkt-consent.cjs +1 -1
- package/dist/pkt-consent.js +2 -3
- package/dist/pkt-datepicker.cjs +1 -1
- package/dist/pkt-datepicker.js +7 -8
- package/dist/pkt-header.cjs +35 -35
- package/dist/pkt-header.js +224 -218
- package/dist/pkt-heading.cjs +1 -1
- package/dist/pkt-heading.js +3 -4
- package/dist/pkt-helptext.cjs +1 -1
- package/dist/pkt-helptext.js +3 -4
- package/dist/pkt-icon.cjs +1 -1
- package/dist/pkt-icon.js +3 -4
- package/dist/pkt-index.cjs +1 -1
- package/dist/pkt-index.js +26 -26
- package/dist/pkt-input-wrapper.cjs +1 -1
- package/dist/pkt-input-wrapper.js +2 -3
- package/dist/pkt-link.cjs +1 -1
- package/dist/pkt-link.js +2 -3
- package/dist/pkt-linkcard.cjs +1 -1
- package/dist/pkt-linkcard.js +3 -4
- package/dist/pkt-listbox.cjs +1 -1
- package/dist/pkt-listbox.js +3 -4
- package/dist/pkt-loader.cjs +1 -1
- package/dist/pkt-loader.js +3 -4
- package/dist/pkt-messagebox.cjs +1 -1
- package/dist/pkt-messagebox.js +3 -4
- package/dist/pkt-modal.cjs +1 -1
- package/dist/pkt-modal.js +3 -4
- package/dist/pkt-progressbar.cjs +1 -1
- package/dist/pkt-progressbar.js +2 -3
- package/dist/pkt-radiobutton.cjs +1 -1
- package/dist/pkt-radiobutton.js +3 -4
- package/dist/pkt-select.cjs +1 -1
- package/dist/pkt-select.js +3 -4
- package/dist/pkt-tabs.cjs +1 -1
- package/dist/pkt-tabs.js +2 -2
- package/dist/pkt-tag.cjs +1 -1
- package/dist/pkt-tag.js +3 -4
- package/dist/pkt-textarea.cjs +1 -1
- package/dist/pkt-textarea.js +3 -4
- package/dist/pkt-textinput.cjs +1 -1
- package/dist/pkt-textinput.js +3 -4
- package/dist/pkt-timepicker.cjs +16 -16
- package/dist/pkt-timepicker.js +91 -89
- package/dist/progressbar-BqlMzkM_.cjs +21 -0
- package/dist/{progressbar-By7e0lEI.js → progressbar-sbHDFC12.js} +88 -88
- package/dist/radiobutton-5ZqVVtTT.cjs +31 -0
- package/dist/{radiobutton-6frNG9J_.js → radiobutton-D8Ai8ETa.js} +44 -42
- package/dist/select-De-n8on9.js +230 -0
- package/dist/select-dTWibR6_.cjs +49 -0
- package/dist/tabitem-B9-jeV97.js +334 -0
- package/dist/tabitem-BnhzqfW3.cjs +65 -0
- package/dist/tag-CbwO8yvD.cjs +27 -0
- package/dist/{tag-BuCpqaks.js → tag-D4FI5t3y.js} +42 -40
- package/dist/textarea-BmLaKzsc.cjs +50 -0
- package/dist/{textarea-Bzuymclz.js → textarea-CMiSJaYL.js} +62 -60
- package/dist/textinput-em9y4yrL.cjs +70 -0
- package/dist/{textinput-9lHjs4ce.js → textinput-r8udK0IX.js} +57 -55
- package/package.json +2 -2
- package/src/components/accordion/accordion.ts +6 -1
- package/src/components/accordion/accordionitem.ts +6 -1
- package/src/components/alert/alert.ts +6 -1
- package/src/components/backlink/backlink.ts +6 -1
- package/src/components/breadcrumbs/breadcrumbs.ts +6 -1
- package/src/components/button/button.ts +6 -1
- package/src/components/calendar/calendar.ts +6 -1
- package/src/components/card/card.ts +6 -1
- package/src/components/checkbox/checkbox.ts +6 -1
- package/src/components/combobox/combobox.ts +6 -1
- package/src/components/consent/consent.ts +6 -1
- package/src/components/datepicker/date-tags.ts +6 -1
- package/src/components/datepicker/datepicker-multiple.ts +6 -1
- package/src/components/datepicker/datepicker-popup.ts +6 -1
- package/src/components/datepicker/datepicker-range.ts +6 -1
- package/src/components/datepicker/datepicker-single.ts +6 -1
- package/src/components/datepicker/datepicker.ts +6 -1
- package/src/components/header/header-service.ts +6 -1
- package/src/components/header/header-user-menu.ts +6 -1
- package/src/components/header/header.ts +6 -1
- package/src/components/heading/heading.ts +6 -1
- package/src/components/helptext/helptext.ts +6 -1
- package/src/components/icon/icon.ts +6 -1
- package/src/components/input-wrapper/input-wrapper.ts +6 -1
- package/src/components/link/link.ts +6 -1
- package/src/components/linkcard/linkcard.ts +6 -1
- package/src/components/listbox/listbox.ts +6 -1
- package/src/components/loader/loader.ts +6 -1
- package/src/components/messagebox/messagebox.ts +6 -1
- package/src/components/modal/modal.ts +6 -1
- package/src/components/progressbar/progressbar.ts +6 -1
- package/src/components/radiobutton/radiobutton.ts +6 -1
- package/src/components/select/select.ts +6 -1
- package/src/components/tabs/tabitem.ts +6 -1
- package/src/components/tabs/tabs.ts +6 -1
- package/src/components/tag/tag.ts +6 -1
- package/src/components/textarea/textarea.ts +6 -1
- package/src/components/textinput/textinput.ts +6 -1
- package/src/components/timepicker/timepicker.ts +6 -1
- package/dist/accordionitem-D1Agl1bB.cjs +0 -34
- package/dist/alert-DFkFNTxh.cjs +0 -33
- package/dist/backlink-EiAXUUZP.cjs +0 -13
- package/dist/backlink-V4DAt17e.js +0 -47
- package/dist/button-DYv5Dg4M.cjs +0 -27
- package/dist/calendar-HIE9nxcc.cjs +0 -90
- package/dist/card-CyeH6l1c.cjs +0 -87
- package/dist/checkbox-BLlwTABj.cjs +0 -31
- package/dist/checkbox-ejBUa5qQ.js +0 -145
- package/dist/consent-ruWAEVXW.cjs +0 -11
- package/dist/datepicker-D2H7U6MS.cjs +0 -273
- package/dist/heading-Cvz8m1xL.cjs +0 -1
- package/dist/helptext-5Mzp65-F.cjs +0 -24
- package/dist/helptext-jIoWRcCF.js +0 -80
- package/dist/icon-BlKA8YuW.js +0 -103
- package/dist/icon-Bqj9oBbl.cjs +0 -9
- package/dist/input-wrapper-B0MkQ0IZ.cjs +0 -54
- package/dist/input-wrapper-B2JpK016.js +0 -179
- package/dist/link-R_lNhViF.cjs +0 -7
- package/dist/link-Z_GizclR.js +0 -53
- package/dist/linkcard-BlQvdB1a.js +0 -54
- package/dist/linkcard-C7HbSLlX.cjs +0 -13
- package/dist/listbox-CGgV9MAe.cjs +0 -106
- package/dist/loader-e2gs_1xz.cjs +0 -16
- package/dist/messagebox-Bf-XMlvW.js +0 -69
- package/dist/messagebox-D67w71VX.cjs +0 -13
- package/dist/modal-CyvEkbfQ.cjs +0 -36
- package/dist/progressbar-DsJ2B9Vm.cjs +0 -21
- package/dist/radiobutton-Bv-BZ1Hw.cjs +0 -31
- package/dist/select-CXZt1nHS.js +0 -228
- package/dist/select-WFhS4Vfp.cjs +0 -49
- package/dist/tabitem-CB8wkKmv.js +0 -332
- package/dist/tabitem-DZpspU4Q.cjs +0 -65
- package/dist/tag-X6xdjR0N.cjs +0 -27
- package/dist/textarea-DoeHJ7HR.cjs +0 -50
- package/dist/textinput-BNsLd26i.cjs +0 -70
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
"use strict";const x=require("./element-with-slot-ZX-up7jO.cjs"),e=require("./element-gR_VtSiD.cjs"),h=require("./icon-Bqj9oBbl.cjs"),c=require("./class-map-CsENJXf1.cjs"),u=require("./state-Dg-53wQ8.cjs"),a=require("./utils-byXsEz1u.cjs"),d=require("./input-wrapper-EoSAbU-U.cjs");var k=Object.defineProperty,_=Object.getOwnPropertyDescriptor,r=(o,p,l,n)=>{for(var t=n>1?void 0:n?_(p,l):p,s=o.length-1,i;s>=0;s--)(i=o[s])&&(t=(n?i(p,l,t):i(t))||t);return n&&t&&k(p,l,t),t};exports.PktHelptext=class extends x.PktElementWithSlot{constructor(){super(...arguments),this.forId=a.uuidish(),this.helptext="",this.helptextDropdown="",this.helptextDropdownButton=d.specs.props.helptextDropdownButton.default,this.isHelpTextOpen=!1}render(){const p=()=>{const s=!this.isHelpTextOpen;this.isHelpTextOpen=s,this.dispatchEvent(new CustomEvent("toggleHelpText",{bubbles:!0,detail:{isOpen:s}}))},l=c.e({"pkt-inputwrapper__helptext-container":!0,"pkt-inputwrapper__has-helptext":this.helptext||this.helptextDropdown||this.hasSlotContent()}),n=()=>this.helptextDropdown?e.b`<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="${c.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.A,t=()=>e.b`<div class="${l}">
|
|
19
|
-
<div class="pkt-inputwrapper__helptext" id="${this.forId}-helptext">
|
|
20
|
-
<div class="pkt-contents" name="helptext">${x.slotContent(this)}</div>
|
|
21
|
-
${this.helptext&&h.o(this.helptext)}
|
|
22
|
-
</div>
|
|
23
|
-
${n()}
|
|
24
|
-
</div>`;return e.b`${t()}`}};r([e.n({type:String,reflect:!0})],exports.PktHelptext.prototype,"forId",2);r([e.n({type:String})],exports.PktHelptext.prototype,"helptext",2);r([e.n({type:String})],exports.PktHelptext.prototype,"helptextDropdown",2);r([e.n({type:String})],exports.PktHelptext.prototype,"helptextDropdownButton",2);r([u.r()],exports.PktHelptext.prototype,"isHelpTextOpen",2);exports.PktHelptext=r([e.t("pkt-helptext")],exports.PktHelptext);
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import { P as u, s as c } from "./element-with-slot-Dqk6-TRR.js";
|
|
2
|
-
import { b as a, A as _, n as i, t as m } from "./element-CPpT3rFQ.js";
|
|
3
|
-
import { o as x } from "./icon-BlKA8YuW.js";
|
|
4
|
-
import { e as d } from "./class-map-CEnykyO_.js";
|
|
5
|
-
import { r as w } from "./state-C_1EOo3D.js";
|
|
6
|
-
import { u as v } from "./utils-DznhwRXm.js";
|
|
7
|
-
import { s as f } from "./input-wrapper-CDgenrYA.js";
|
|
8
|
-
var k = Object.defineProperty, b = Object.getOwnPropertyDescriptor, n = (s, p, r, o) => {
|
|
9
|
-
for (var t = o > 1 ? void 0 : o ? b(p, r) : p, l = s.length - 1, h; l >= 0; l--)
|
|
10
|
-
(h = s[l]) && (t = (o ? h(p, r, t) : h(t)) || t);
|
|
11
|
-
return o && t && k(p, r, t), t;
|
|
12
|
-
};
|
|
13
|
-
let e = class extends u {
|
|
14
|
-
constructor() {
|
|
15
|
-
super(...arguments), this.forId = v(), this.helptext = "", this.helptextDropdown = "", this.helptextDropdownButton = f.props.helptextDropdownButton.default, this.isHelpTextOpen = !1;
|
|
16
|
-
}
|
|
17
|
-
render() {
|
|
18
|
-
const s = () => {
|
|
19
|
-
const t = !this.isHelpTextOpen;
|
|
20
|
-
this.isHelpTextOpen = t, this.dispatchEvent(
|
|
21
|
-
new CustomEvent("toggleHelpText", {
|
|
22
|
-
bubbles: !0,
|
|
23
|
-
detail: { isOpen: t }
|
|
24
|
-
})
|
|
25
|
-
);
|
|
26
|
-
}, p = d({
|
|
27
|
-
"pkt-inputwrapper__helptext-container": !0,
|
|
28
|
-
"pkt-inputwrapper__has-helptext": this.helptext || this.helptextDropdown || this.hasSlotContent()
|
|
29
|
-
}), r = () => this.helptextDropdown ? a`<div class="pkt-inputwrapper__helptext-expandable">
|
|
30
|
-
<button
|
|
31
|
-
class="pkt-link pkt-link--icon-right pkt-btn pkt-btn--small pkt-btn--tertiary pkt-btn--icon-right"
|
|
32
|
-
type="button"
|
|
33
|
-
@click=${s}
|
|
34
|
-
>
|
|
35
|
-
<pkt-icon
|
|
36
|
-
class="pkt-btn__icon"
|
|
37
|
-
name="${this.isHelpTextOpen ? "chevron-thin-up" : "chevron-thin-down"}"
|
|
38
|
-
></pkt-icon>
|
|
39
|
-
<span class="pkt-btn__text">${x(this.helptextDropdownButton)}</span>
|
|
40
|
-
</button>
|
|
41
|
-
<div
|
|
42
|
-
class="${d({
|
|
43
|
-
"pkt-inputwrapper__helptext": !0,
|
|
44
|
-
"pkt-inputwrapper__helptext-expandable-open": this.isHelpTextOpen,
|
|
45
|
-
"pkt-inputwrapper__helptext-expandable-closed": !this.isHelpTextOpen
|
|
46
|
-
})}"
|
|
47
|
-
>
|
|
48
|
-
${x(this.helptextDropdown)}
|
|
49
|
-
</div>
|
|
50
|
-
</div>` : _;
|
|
51
|
-
return a`${a`<div class="${p}">
|
|
52
|
-
<div class="pkt-inputwrapper__helptext" id="${this.forId}-helptext">
|
|
53
|
-
<div class="pkt-contents" name="helptext">${c(this)}</div>
|
|
54
|
-
${this.helptext && x(this.helptext)}
|
|
55
|
-
</div>
|
|
56
|
-
${r()}
|
|
57
|
-
</div>`}`;
|
|
58
|
-
}
|
|
59
|
-
};
|
|
60
|
-
n([
|
|
61
|
-
i({ type: String, reflect: !0 })
|
|
62
|
-
], e.prototype, "forId", 2);
|
|
63
|
-
n([
|
|
64
|
-
i({ type: String })
|
|
65
|
-
], e.prototype, "helptext", 2);
|
|
66
|
-
n([
|
|
67
|
-
i({ type: String })
|
|
68
|
-
], e.prototype, "helptextDropdown", 2);
|
|
69
|
-
n([
|
|
70
|
-
i({ type: String })
|
|
71
|
-
], e.prototype, "helptextDropdownButton", 2);
|
|
72
|
-
n([
|
|
73
|
-
w()
|
|
74
|
-
], e.prototype, "isHelpTextOpen", 2);
|
|
75
|
-
e = n([
|
|
76
|
-
m("pkt-helptext")
|
|
77
|
-
], e);
|
|
78
|
-
export {
|
|
79
|
-
e as P
|
|
80
|
-
};
|
package/dist/icon-BlKA8YuW.js
DELETED
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
import { A as y, E as P, P as k, b as I, n as p, t as _ } from "./element-CPpT3rFQ.js";
|
|
2
|
-
import { e as m, i as S, t as b } from "./directive-oAbCiebi.js";
|
|
3
|
-
/**
|
|
4
|
-
* @license
|
|
5
|
-
* Copyright 2017 Google LLC
|
|
6
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
7
|
-
*/
|
|
8
|
-
class h extends S {
|
|
9
|
-
constructor(t) {
|
|
10
|
-
if (super(t), this.it = y, t.type !== b.CHILD) throw Error(this.constructor.directiveName + "() can only be used in child bindings");
|
|
11
|
-
}
|
|
12
|
-
render(t) {
|
|
13
|
-
if (t === y || t == null) return this._t = void 0, this.it = t;
|
|
14
|
-
if (t === P) return t;
|
|
15
|
-
if (typeof t != "string") throw Error(this.constructor.directiveName + "() called with a non-string value");
|
|
16
|
-
if (t === this.it) return this._t;
|
|
17
|
-
this.it = t;
|
|
18
|
-
const n = [t];
|
|
19
|
-
return n.raw = n, this._t = { _$litType$: this.constructor.resultType, strings: n, values: [] };
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
h.directiveName = "unsafeHTML", h.resultType = 1;
|
|
23
|
-
const R = m(h);
|
|
24
|
-
/**
|
|
25
|
-
* @license
|
|
26
|
-
* Copyright 2017 Google LLC
|
|
27
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
28
|
-
*/
|
|
29
|
-
class l extends h {
|
|
30
|
-
}
|
|
31
|
-
l.directiveName = "unsafeSVG", l.resultType = 2;
|
|
32
|
-
const f = m(l);
|
|
33
|
-
var C = Object.defineProperty, E = Object.getOwnPropertyDescriptor, c = (e, t, n, s) => {
|
|
34
|
-
for (var o = s > 1 ? void 0 : s ? E(t, n) : t, d = e.length - 1, u; d >= 0; d--)
|
|
35
|
-
(u = e[d]) && (o = (s ? u(t, n, o) : u(o)) || o);
|
|
36
|
-
return s && o && C(t, n, o), o;
|
|
37
|
-
};
|
|
38
|
-
const w = "https://punkt-cdn.oslo.kommune.no/latest/icons/";
|
|
39
|
-
typeof window < "u" && (window.pktFetch = window.pktFetch === void 0 ? fetch : window.pktFetch, window.pktIconPath = window.pktIconPath || w);
|
|
40
|
-
const a = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"></svg>', r = {}, T = 2, F = 1500, g = typeof Storage < "u" && typeof sessionStorage < "u", $ = (e) => window.pktFetch(e).then((t) => {
|
|
41
|
-
if (!t.ok)
|
|
42
|
-
throw new Error("Missing icon: " + e);
|
|
43
|
-
return t.text();
|
|
44
|
-
}), v = async (e, t = T) => {
|
|
45
|
-
try {
|
|
46
|
-
return await $(e);
|
|
47
|
-
} catch {
|
|
48
|
-
return t > 0 ? (await new Promise((s) => setTimeout(s, F)), v(e, t - 1)) : (console.error("Failed to fetch icon: " + e), a);
|
|
49
|
-
}
|
|
50
|
-
}, A = async (e, t) => {
|
|
51
|
-
const n = t + e + ".svg";
|
|
52
|
-
return g && sessionStorage.getItem(n) ? sessionStorage.getItem(n) : n in r ? r[n] : typeof window < "u" && typeof window.pktFetch == "function" ? (r[n] = v(n).then((s) => (s !== a && g && sessionStorage.setItem(n, s), delete r[n], s)), r[n]) : a;
|
|
53
|
-
};
|
|
54
|
-
let i = class extends k {
|
|
55
|
-
constructor() {
|
|
56
|
-
super(...arguments), this.path = typeof window < "u" ? window.pktIconPath : w, this.name = "", this.icon = f(a), this._updatedProps = [];
|
|
57
|
-
}
|
|
58
|
-
connectedCallback() {
|
|
59
|
-
super.connectedCallback(), this.classList.add("pkt-icon");
|
|
60
|
-
}
|
|
61
|
-
async attributeChangedCallback(e, t, n) {
|
|
62
|
-
super.attributeChangedCallback(e, t, n), (e === "name" || e === "path") && this.getIcon(this.name);
|
|
63
|
-
}
|
|
64
|
-
async updated(e) {
|
|
65
|
-
super.updated(e), (e.has("name") || e.has("path")) && this.getIcon(this.name);
|
|
66
|
-
}
|
|
67
|
-
async getIcon(e = "") {
|
|
68
|
-
if (this._updatedProps.length > 0) {
|
|
69
|
-
this.path || (this.path = typeof window < "u" ? window.pktIconPath : w);
|
|
70
|
-
try {
|
|
71
|
-
this.icon = f(
|
|
72
|
-
await A(this.name || "", this.path)
|
|
73
|
-
);
|
|
74
|
-
} catch {
|
|
75
|
-
this.icon = f(a);
|
|
76
|
-
}
|
|
77
|
-
this._updatedProps = [];
|
|
78
|
-
} else
|
|
79
|
-
this._updatedProps.includes(e) || this._updatedProps.push(e);
|
|
80
|
-
}
|
|
81
|
-
render() {
|
|
82
|
-
return I`${this.name && this.icon}`;
|
|
83
|
-
}
|
|
84
|
-
};
|
|
85
|
-
c([
|
|
86
|
-
p({ type: String, reflect: !1 })
|
|
87
|
-
], i.prototype, "path", 2);
|
|
88
|
-
c([
|
|
89
|
-
p({ type: String, reflect: !0 })
|
|
90
|
-
], i.prototype, "name", 2);
|
|
91
|
-
c([
|
|
92
|
-
p({ type: SVGElement })
|
|
93
|
-
], i.prototype, "icon", 2);
|
|
94
|
-
c([
|
|
95
|
-
p({ type: Array, noAccessor: !0 })
|
|
96
|
-
], i.prototype, "_updatedProps", 2);
|
|
97
|
-
i = c([
|
|
98
|
-
_("pkt-icon")
|
|
99
|
-
], i);
|
|
100
|
-
export {
|
|
101
|
-
i as P,
|
|
102
|
-
R as o
|
|
103
|
-
};
|
package/dist/icon-Bqj9oBbl.cjs
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";const s=require("./element-gR_VtSiD.cjs"),h=require("./directive-C7oCP5Bh.cjs");/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2017 Google LLC
|
|
4
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
-
*/class p extends h.i{constructor(t){if(super(t),this.it=s.A,t.type!==h.t.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===s.A||t==null)return this._t=void 0,this.it=t;if(t===s.E)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 e=[t];return e.raw=e,this._t={_$litType$:this.constructor.resultType,strings:e,values:[]}}}p.directiveName="unsafeHTML",p.resultType=1;const k=h.e(p);/**
|
|
6
|
-
* @license
|
|
7
|
-
* Copyright 2017 Google LLC
|
|
8
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
9
|
-
*/class l extends p{}l.directiveName="unsafeSVG",l.resultType=2;const f=h.e(l);var I=Object.defineProperty,P=Object.getOwnPropertyDescriptor,a=(n,t,e,o)=>{for(var i=o>1?void 0:o?P(t,e):t,d=n.length-1,u;d>=0;d--)(u=n[d])&&(i=(o?u(t,e,i):u(i))||i);return o&&i&&I(t,e,i),i};const w="https://punkt-cdn.oslo.kommune.no/latest/icons/";typeof window<"u"&&(window.pktFetch=window.pktFetch===void 0?fetch:window.pktFetch,window.pktIconPath=window.pktIconPath||w);const c='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"></svg>',r={},m=2,v=1500,y=typeof Storage<"u"&&typeof sessionStorage<"u",_=n=>window.pktFetch(n).then(t=>{if(!t.ok)throw new Error("Missing icon: "+n);return t.text()}),g=async(n,t=m)=>{try{return await _(n)}catch{return t>0?(await new Promise(o=>setTimeout(o,v)),g(n,t-1)):(console.error("Failed to fetch icon: "+n),c)}},S=async(n,t)=>{const e=t+n+".svg";return y&&sessionStorage.getItem(e)?sessionStorage.getItem(e):e in r?r[e]:typeof window<"u"&&typeof window.pktFetch=="function"?(r[e]=g(e).then(o=>(o!==c&&y&&sessionStorage.setItem(e,o),delete r[e],o)),r[e]):c};exports.PktIcon=class extends s.PktElement{constructor(){super(...arguments),this.path=typeof window<"u"?window.pktIconPath:w,this.name="",this.icon=f(c),this._updatedProps=[]}connectedCallback(){super.connectedCallback(),this.classList.add("pkt-icon")}async attributeChangedCallback(t,e,o){super.attributeChangedCallback(t,e,o),(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=""){if(this._updatedProps.length>0){this.path||(this.path=typeof window<"u"?window.pktIconPath:w);try{this.icon=f(await S(this.name||"",this.path))}catch{this.icon=f(c)}this._updatedProps=[]}else this._updatedProps.includes(t)||this._updatedProps.push(t)}render(){return s.b`${this.name&&this.icon}`}};a([s.n({type:String,reflect:!1})],exports.PktIcon.prototype,"path",2);a([s.n({type:String,reflect:!0})],exports.PktIcon.prototype,"name",2);a([s.n({type:SVGElement})],exports.PktIcon.prototype,"icon",2);a([s.n({type:Array,noAccessor:!0})],exports.PktIcon.prototype,"_updatedProps",2);exports.PktIcon=a([s.t("pkt-icon")],exports.PktIcon);exports.o=k;
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
"use strict";const u=require("./element-with-slot-ZX-up7jO.cjs"),y=require("./if-defined-BOW3ODSj.cjs"),t=require("./element-gR_VtSiD.cjs"),k=require("./icon-Bqj9oBbl.cjs"),$=require("./class-map-CsENJXf1.cjs"),f=require("./utils-byXsEz1u.cjs"),x=require("./booleanish-BKVonob4.cjs"),r=require("./input-wrapper-EoSAbU-U.cjs");require("./helptext-5Mzp65-F.cjs");require("./alert-DFkFNTxh.cjs");var I=Object.defineProperty,P=Object.getOwnPropertyDescriptor,e=(l,p,n,o)=>{for(var s=o>1?void 0:o?P(p,n):p,i=l.length-1,a;i>=0;i--)(a=l[i])&&(s=(o?a(p,n,s):a(s))||s);return o&&s&&I(p,n,s),s};exports.PktInputWrapper=class extends u.PktElementWithSlot{constructor(){super(...arguments),this.forId=f.uuidish(),this.label="",this.helptext=null,this.helptextDropdown=null,this.helptextDropdownButton=null,this.counter=r.specs.props.counter.default,this.counterCurrent=0,this.counterMaxLength=0,this.counterError=null,this.counterPosition="bottom",this.optionalTag=r.specs.props.optionalTag.default,this.optionalText=r.specs.props.optionalText.default,this.requiredTag=r.specs.props.requiredTag.default,this.requiredText=r.specs.props.requiredText.default,this.tagText=null,this.hasError=r.specs.props.hasError.default,this.errorMessage="",this.disabled=r.specs.props.disabled.default,this.inline=r.specs.props.inline.default,this.ariaDescribedby=void 0,this.hasFieldset=r.specs.props.hasFieldset.default,this.role="group",this.useWrapper=r.specs.props.useWrapper.default}updated(p){super.updated(p)}render(){const p={"pkt-inputwrapper":!0,"pkt-inputwrapper--error":this.hasError,"pkt-inputwrapper--disabled":this.disabled,"pkt-inputwrapper--inline":this.inline},n="pkt-tag pkt-tag--small pkt-tag--thin-text",o=this.ariaDescribedby?this.ariaDescribedby:this.helptext?`${this.forId}-helptext`:t.A,s=()=>t.b`
|
|
2
|
-
${this.tagText?t.b`<span class=${n+" pkt-tag--gray"}>${this.tagText}</span>`:t.A}
|
|
3
|
-
${this.optionalTag?t.b`<span class=${n+" pkt-tag--blue-light"}>${this.optionalText}</span>`:t.A}
|
|
4
|
-
${this.requiredTag?t.b`<span class=${n+" pkt-tag--beige"}>${this.requiredText}</span>`:t.A}
|
|
5
|
-
`,i=()=>this.useWrapper?this.hasFieldset?t.b`<legend
|
|
6
|
-
class="pkt-inputwrapper__legend"
|
|
7
|
-
id="${this.forId}-label"
|
|
8
|
-
@click=${this.handleLabelClick}
|
|
9
|
-
>
|
|
10
|
-
${this.label} ${s()}
|
|
11
|
-
</legend>`:t.b`<label
|
|
12
|
-
class="pkt-inputwrapper__label"
|
|
13
|
-
for="${this.forId}"
|
|
14
|
-
aria-describedby="${o}"
|
|
15
|
-
id="${this.forId}-label"
|
|
16
|
-
@click=${this.handleLabelClick}
|
|
17
|
-
>${this.label}${s()}</label
|
|
18
|
-
>`:t.b`<label
|
|
19
|
-
for="${this.forId}"
|
|
20
|
-
class="pkt-sr-only"
|
|
21
|
-
aria-describedby="${o}"
|
|
22
|
-
id="${this.forId}-label"
|
|
23
|
-
>
|
|
24
|
-
${this.label}
|
|
25
|
-
</label>`,a=()=>t.b`
|
|
26
|
-
<pkt-helptext
|
|
27
|
-
class="${y.o(this.useWrapper?void 0:"pkt-hide")}"
|
|
28
|
-
.forId=${this.forId}
|
|
29
|
-
.helptext=${this.helptext}
|
|
30
|
-
.helptextDropdown=${this.helptextDropdown}
|
|
31
|
-
.helptextDropdownButton=${this.helptextDropdownButton||r.specs.props.helptextDropdownButton.default}
|
|
32
|
-
@toggleHelpText=${g=>{this.toggleDropdown(g)}}
|
|
33
|
-
>${u.slotContent(this,"helptext")}</pkt-helptext>
|
|
34
|
-
`,h=()=>this.counter?t.b`<div class="pkt-input__counter" aria-live="polite" aria-atomic="true">
|
|
35
|
-
${this.counterError?this.counterError:t.A} ${this.counterCurrent||0}
|
|
36
|
-
${this.counterMaxLength?`/${this.counterMaxLength}`:t.A}
|
|
37
|
-
</div>`:t.A,c=()=>this.hasError&&this.errorMessage?t.b`<pkt-alert
|
|
38
|
-
skin="error"
|
|
39
|
-
compact
|
|
40
|
-
id=${`${this.forId}-error`}
|
|
41
|
-
aria-live="assertive"
|
|
42
|
-
aria-atomic="true"
|
|
43
|
-
>
|
|
44
|
-
${k.o(this.errorMessage)}
|
|
45
|
-
</pkt-alert>`:t.A,d=()=>t.b`
|
|
46
|
-
${i()}
|
|
47
|
-
${a()}
|
|
48
|
-
${this.counterPosition==="top"?h():t.A}
|
|
49
|
-
<div class="pkt-contents">${u.slotContent(this)}</div>
|
|
50
|
-
${this.counterPosition==="bottom"?h():t.A}
|
|
51
|
-
${c()}
|
|
52
|
-
`,b=()=>this.hasFieldset?t.b`<fieldset class="pkt-inputwrapper__fieldset" aria-describedby="${o}">
|
|
53
|
-
${d()}
|
|
54
|
-
</fieldset>`:t.b`<div class="pkt-inputwrapper__fieldset">${d()}</div>`;return t.b`<div class=${$.e(p)}>${b()}</div> `}toggleDropdown(p){this.dispatchEvent(new CustomEvent("toggleHelpText",{bubbles:!1,detail:{isOpen:p.detail.isOpen}}))}handleLabelClick(){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:String})],exports.PktInputWrapper.prototype,"tagText",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:x.booleanishConverter})],exports.PktInputWrapper.prototype,"useWrapper",2);exports.PktInputWrapper=e([t.t("pkt-input-wrapper")],exports.PktInputWrapper);
|
|
@@ -1,179 +0,0 @@
|
|
|
1
|
-
import { P as $, s as g } from "./element-with-slot-Dqk6-TRR.js";
|
|
2
|
-
import { o as x } from "./if-defined-B0krMLad.js";
|
|
3
|
-
import { A as s, b as o, n as r, t as m } from "./element-CPpT3rFQ.js";
|
|
4
|
-
import { o as k } from "./icon-BlKA8YuW.js";
|
|
5
|
-
import { e as v } from "./class-map-CEnykyO_.js";
|
|
6
|
-
import { u as w } from "./utils-DznhwRXm.js";
|
|
7
|
-
import { b as T } from "./booleanish-C9R0tdXH.js";
|
|
8
|
-
import { s as p } from "./input-wrapper-CDgenrYA.js";
|
|
9
|
-
import "./helptext-jIoWRcCF.js";
|
|
10
|
-
import "./alert-BuAXrnKl.js";
|
|
11
|
-
var E = Object.defineProperty, D = Object.getOwnPropertyDescriptor, e = (l, a, n, h) => {
|
|
12
|
-
for (var i = h > 1 ? void 0 : h ? D(a, n) : a, d = l.length - 1, u; d >= 0; d--)
|
|
13
|
-
(u = l[d]) && (i = (h ? u(a, n, i) : u(i)) || i);
|
|
14
|
-
return h && i && E(a, n, i), i;
|
|
15
|
-
};
|
|
16
|
-
let t = class extends $ {
|
|
17
|
-
constructor() {
|
|
18
|
-
super(...arguments), this.forId = w(), 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.tagText = null, 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;
|
|
19
|
-
}
|
|
20
|
-
updated(l) {
|
|
21
|
-
super.updated(l);
|
|
22
|
-
}
|
|
23
|
-
render() {
|
|
24
|
-
const l = {
|
|
25
|
-
"pkt-inputwrapper": !0,
|
|
26
|
-
"pkt-inputwrapper--error": this.hasError,
|
|
27
|
-
"pkt-inputwrapper--disabled": this.disabled,
|
|
28
|
-
"pkt-inputwrapper--inline": this.inline
|
|
29
|
-
}, a = "pkt-tag pkt-tag--small pkt-tag--thin-text", n = this.ariaDescribedby ? this.ariaDescribedby : this.helptext ? `${this.forId}-helptext` : s, h = () => o`
|
|
30
|
-
${this.tagText ? o`<span class=${a + " pkt-tag--gray"}>${this.tagText}</span>` : s}
|
|
31
|
-
${this.optionalTag ? o`<span class=${a + " pkt-tag--blue-light"}>${this.optionalText}</span>` : s}
|
|
32
|
-
${this.requiredTag ? o`<span class=${a + " pkt-tag--beige"}>${this.requiredText}</span>` : s}
|
|
33
|
-
`, i = () => this.useWrapper ? this.hasFieldset ? o`<legend
|
|
34
|
-
class="pkt-inputwrapper__legend"
|
|
35
|
-
id="${this.forId}-label"
|
|
36
|
-
@click=${this.handleLabelClick}
|
|
37
|
-
>
|
|
38
|
-
${this.label} ${h()}
|
|
39
|
-
</legend>` : o`<label
|
|
40
|
-
class="pkt-inputwrapper__label"
|
|
41
|
-
for="${this.forId}"
|
|
42
|
-
aria-describedby="${n}"
|
|
43
|
-
id="${this.forId}-label"
|
|
44
|
-
@click=${this.handleLabelClick}
|
|
45
|
-
>${this.label}${h()}</label
|
|
46
|
-
>` : o`<label
|
|
47
|
-
for="${this.forId}"
|
|
48
|
-
class="pkt-sr-only"
|
|
49
|
-
aria-describedby="${n}"
|
|
50
|
-
id="${this.forId}-label"
|
|
51
|
-
>
|
|
52
|
-
${this.label}
|
|
53
|
-
</label>`, d = () => o`
|
|
54
|
-
<pkt-helptext
|
|
55
|
-
class="${x(this.useWrapper ? void 0 : "pkt-hide")}"
|
|
56
|
-
.forId=${this.forId}
|
|
57
|
-
.helptext=${this.helptext}
|
|
58
|
-
.helptextDropdown=${this.helptextDropdown}
|
|
59
|
-
.helptextDropdownButton=${this.helptextDropdownButton || p.props.helptextDropdownButton.default}
|
|
60
|
-
@toggleHelpText=${(f) => {
|
|
61
|
-
this.toggleDropdown(f);
|
|
62
|
-
}}
|
|
63
|
-
>${g(this, "helptext")}</pkt-helptext>
|
|
64
|
-
`, u = () => this.counter ? o`<div class="pkt-input__counter" aria-live="polite" aria-atomic="true">
|
|
65
|
-
${this.counterError ? this.counterError : s} ${this.counterCurrent || 0}
|
|
66
|
-
${this.counterMaxLength ? `/${this.counterMaxLength}` : s}
|
|
67
|
-
</div>` : s, b = () => this.hasError && this.errorMessage ? o`<pkt-alert
|
|
68
|
-
skin="error"
|
|
69
|
-
compact
|
|
70
|
-
id=${`${this.forId}-error`}
|
|
71
|
-
aria-live="assertive"
|
|
72
|
-
aria-atomic="true"
|
|
73
|
-
>
|
|
74
|
-
${k(this.errorMessage)}
|
|
75
|
-
</pkt-alert>` : s, c = () => o`
|
|
76
|
-
${i()}
|
|
77
|
-
${d()}
|
|
78
|
-
${this.counterPosition === "top" ? u() : s}
|
|
79
|
-
<div class="pkt-contents">${g(this)}</div>
|
|
80
|
-
${this.counterPosition === "bottom" ? u() : s}
|
|
81
|
-
${b()}
|
|
82
|
-
`, y = () => this.hasFieldset ? o`<fieldset class="pkt-inputwrapper__fieldset" aria-describedby="${n}">
|
|
83
|
-
${c()}
|
|
84
|
-
</fieldset>` : o`<div class="pkt-inputwrapper__fieldset">${c()}</div>`;
|
|
85
|
-
return o`<div class=${v(l)}>${y()}</div> `;
|
|
86
|
-
}
|
|
87
|
-
toggleDropdown(l) {
|
|
88
|
-
this.dispatchEvent(
|
|
89
|
-
new CustomEvent("toggleHelpText", {
|
|
90
|
-
bubbles: !1,
|
|
91
|
-
detail: { isOpen: l.detail.isOpen }
|
|
92
|
-
})
|
|
93
|
-
);
|
|
94
|
-
}
|
|
95
|
-
handleLabelClick() {
|
|
96
|
-
this.dispatchEvent(
|
|
97
|
-
new CustomEvent("labelClick", {
|
|
98
|
-
bubbles: !0,
|
|
99
|
-
composed: !0,
|
|
100
|
-
detail: "label clicked"
|
|
101
|
-
})
|
|
102
|
-
);
|
|
103
|
-
}
|
|
104
|
-
};
|
|
105
|
-
e([
|
|
106
|
-
r({ type: String })
|
|
107
|
-
], t.prototype, "forId", 2);
|
|
108
|
-
e([
|
|
109
|
-
r({ type: String })
|
|
110
|
-
], t.prototype, "label", 2);
|
|
111
|
-
e([
|
|
112
|
-
r({ type: String })
|
|
113
|
-
], t.prototype, "helptext", 2);
|
|
114
|
-
e([
|
|
115
|
-
r({ type: String })
|
|
116
|
-
], t.prototype, "helptextDropdown", 2);
|
|
117
|
-
e([
|
|
118
|
-
r({ type: String })
|
|
119
|
-
], t.prototype, "helptextDropdownButton", 2);
|
|
120
|
-
e([
|
|
121
|
-
r({ type: Boolean })
|
|
122
|
-
], t.prototype, "counter", 2);
|
|
123
|
-
e([
|
|
124
|
-
r({ type: Number })
|
|
125
|
-
], t.prototype, "counterCurrent", 2);
|
|
126
|
-
e([
|
|
127
|
-
r({ type: Number })
|
|
128
|
-
], t.prototype, "counterMaxLength", 2);
|
|
129
|
-
e([
|
|
130
|
-
r({ type: String })
|
|
131
|
-
], t.prototype, "counterError", 2);
|
|
132
|
-
e([
|
|
133
|
-
r({ type: String, reflect: !1 })
|
|
134
|
-
], t.prototype, "counterPosition", 2);
|
|
135
|
-
e([
|
|
136
|
-
r({ type: Boolean })
|
|
137
|
-
], t.prototype, "optionalTag", 2);
|
|
138
|
-
e([
|
|
139
|
-
r({ type: String })
|
|
140
|
-
], t.prototype, "optionalText", 2);
|
|
141
|
-
e([
|
|
142
|
-
r({ type: Boolean })
|
|
143
|
-
], t.prototype, "requiredTag", 2);
|
|
144
|
-
e([
|
|
145
|
-
r({ type: String })
|
|
146
|
-
], t.prototype, "requiredText", 2);
|
|
147
|
-
e([
|
|
148
|
-
r({ type: String })
|
|
149
|
-
], t.prototype, "tagText", 2);
|
|
150
|
-
e([
|
|
151
|
-
r({ type: Boolean })
|
|
152
|
-
], t.prototype, "hasError", 2);
|
|
153
|
-
e([
|
|
154
|
-
r({ type: String })
|
|
155
|
-
], t.prototype, "errorMessage", 2);
|
|
156
|
-
e([
|
|
157
|
-
r({ type: Boolean })
|
|
158
|
-
], t.prototype, "disabled", 2);
|
|
159
|
-
e([
|
|
160
|
-
r({ type: Boolean })
|
|
161
|
-
], t.prototype, "inline", 2);
|
|
162
|
-
e([
|
|
163
|
-
r({ type: String })
|
|
164
|
-
], t.prototype, "ariaDescribedby", 2);
|
|
165
|
-
e([
|
|
166
|
-
r({ type: Boolean })
|
|
167
|
-
], t.prototype, "hasFieldset", 2);
|
|
168
|
-
e([
|
|
169
|
-
r({ type: String, reflect: !0 })
|
|
170
|
-
], t.prototype, "role", 2);
|
|
171
|
-
e([
|
|
172
|
-
r({ type: Boolean, reflect: !0, converter: T })
|
|
173
|
-
], t.prototype, "useWrapper", 2);
|
|
174
|
-
t = e([
|
|
175
|
-
m("pkt-input-wrapper")
|
|
176
|
-
], t);
|
|
177
|
-
export {
|
|
178
|
-
t as P
|
|
179
|
-
};
|
package/dist/link-R_lNhViF.cjs
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
"use strict";const c=require("./element-with-slot-ZX-up7jO.cjs"),t=require("./element-gR_VtSiD.cjs"),h=require("./class-map-CsENJXf1.cjs");require("./icon-Bqj9oBbl.cjs");const k={href:{default:"#"},target:{default:"_self"}},a={props:k};var f=Object.defineProperty,u=Object.getOwnPropertyDescriptor,i=(o,n,s,r)=>{for(var e=r>1?void 0:r?u(n,s):n,l=o.length-1,p;l>=0;l--)(p=o[l])&&(e=(r?p(n,s,e):p(e))||e);return r&&e&&f(n,s,e),e};exports.PktLink=class extends c.PktElementWithSlot{constructor(){super(...arguments),this.href=a.props.href.default,this.iconName=void 0,this.iconPosition=void 0,this.external=!1,this.target=a.props.target.default}render(){const n={"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.b`<a
|
|
2
|
-
class=${h.e(n)}
|
|
3
|
-
href=${this.href}
|
|
4
|
-
.target=${this.target}
|
|
5
|
-
.rel=${this.external?"noopener noreferrer":t.A}
|
|
6
|
-
>${this.iconName?t.b`<pkt-icon name=${this.iconName} class="pkt-link__icon"></pkt-icon>`:""} <span>${c.slotContent(this)}</span></a
|
|
7
|
-
>`}};i([t.n({type:String,reflect:!0})],exports.PktLink.prototype,"href",2);i([t.n({type:String,reflect:!0})],exports.PktLink.prototype,"iconName",2);i([t.n({type:String,reflect:!0})],exports.PktLink.prototype,"iconPosition",2);i([t.n({type:Boolean,reflect:!0})],exports.PktLink.prototype,"external",2);i([t.n({type:String,reflect:!0})],exports.PktLink.prototype,"target",2);exports.PktLink=i([t.t("pkt-link")],exports.PktLink);
|
package/dist/link-Z_GizclR.js
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { P as h, s as m } from "./element-with-slot-Dqk6-TRR.js";
|
|
2
|
-
import { A as u, b as c, n as i, t as g } from "./element-CPpT3rFQ.js";
|
|
3
|
-
import { e as P } from "./class-map-CEnykyO_.js";
|
|
4
|
-
import "./icon-BlKA8YuW.js";
|
|
5
|
-
const k = { href: { default: "#" }, target: { default: "_self" } }, f = {
|
|
6
|
-
props: k
|
|
7
|
-
};
|
|
8
|
-
var y = Object.defineProperty, _ = Object.getOwnPropertyDescriptor, r = (o, n, p, s) => {
|
|
9
|
-
for (var t = s > 1 ? void 0 : s ? _(n, p) : n, a = o.length - 1, l; a >= 0; a--)
|
|
10
|
-
(l = o[a]) && (t = (s ? l(n, p, t) : l(t)) || t);
|
|
11
|
-
return s && t && y(n, p, t), t;
|
|
12
|
-
};
|
|
13
|
-
let e = class extends h {
|
|
14
|
-
constructor() {
|
|
15
|
-
super(...arguments), this.href = f.props.href.default, this.iconName = void 0, this.iconPosition = void 0, this.external = !1, this.target = f.props.target.default;
|
|
16
|
-
}
|
|
17
|
-
render() {
|
|
18
|
-
const o = {
|
|
19
|
-
"pkt-link": !0,
|
|
20
|
-
"pkt-link--icon-left": !!this.iconName && this.iconPosition === "left" || !!(this.iconName && !this.iconPosition),
|
|
21
|
-
"pkt-link--icon-right": !!this.iconName && this.iconPosition === "right",
|
|
22
|
-
"pkt-link--external": this.external
|
|
23
|
-
};
|
|
24
|
-
return c`<a
|
|
25
|
-
class=${P(o)}
|
|
26
|
-
href=${this.href}
|
|
27
|
-
.target=${this.target}
|
|
28
|
-
.rel=${this.external ? "noopener noreferrer" : u}
|
|
29
|
-
>${this.iconName ? c`<pkt-icon name=${this.iconName} class="pkt-link__icon"></pkt-icon>` : ""} <span>${m(this)}</span></a
|
|
30
|
-
>`;
|
|
31
|
-
}
|
|
32
|
-
};
|
|
33
|
-
r([
|
|
34
|
-
i({ type: String, reflect: !0 })
|
|
35
|
-
], e.prototype, "href", 2);
|
|
36
|
-
r([
|
|
37
|
-
i({ type: String, reflect: !0 })
|
|
38
|
-
], e.prototype, "iconName", 2);
|
|
39
|
-
r([
|
|
40
|
-
i({ type: String, reflect: !0 })
|
|
41
|
-
], e.prototype, "iconPosition", 2);
|
|
42
|
-
r([
|
|
43
|
-
i({ type: Boolean, reflect: !0 })
|
|
44
|
-
], e.prototype, "external", 2);
|
|
45
|
-
r([
|
|
46
|
-
i({ type: String, reflect: !0 })
|
|
47
|
-
], e.prototype, "target", 2);
|
|
48
|
-
e = r([
|
|
49
|
-
g("pkt-link")
|
|
50
|
-
], e);
|
|
51
|
-
export {
|
|
52
|
-
e as P
|
|
53
|
-
};
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { b as c, n, t as f } from "./element-CPpT3rFQ.js";
|
|
2
|
-
import { P as h, s as k } from "./element-with-slot-Dqk6-TRR.js";
|
|
3
|
-
import "./icon-BlKA8YuW.js";
|
|
4
|
-
import { o as m } from "./if-defined-B0krMLad.js";
|
|
5
|
-
var _ = Object.defineProperty, u = Object.getOwnPropertyDescriptor, r = (o, i, l, s) => {
|
|
6
|
-
for (var e = s > 1 ? void 0 : s ? u(i, l) : i, p = o.length - 1, a; p >= 0; p--)
|
|
7
|
-
(a = o[p]) && (e = (s ? a(i, l, e) : a(e)) || e);
|
|
8
|
-
return s && e && _(i, l, e), e;
|
|
9
|
-
};
|
|
10
|
-
let t = class extends h {
|
|
11
|
-
constructor() {
|
|
12
|
-
super(...arguments), this.title = "", this.href = "#", this.iconName = "", this.external = !1, this.openInNewTab = !1, this.skin = "normal";
|
|
13
|
-
}
|
|
14
|
-
render() {
|
|
15
|
-
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
|
-
return c`
|
|
17
|
-
<a
|
|
18
|
-
href=${this.href}
|
|
19
|
-
class=${o}
|
|
20
|
-
target=${this.openInNewTab ? "_blank" : "_self"}
|
|
21
|
-
rel=${m(this.openInNewTab ? "noopener noreferrer" : void 0)}
|
|
22
|
-
>
|
|
23
|
-
${this.iconName && c`<pkt-icon class="pkt-link__icon" name="${this.iconName}" />`}
|
|
24
|
-
${this.title && c`<div class=${i}>${this.title}</div>`}
|
|
25
|
-
|
|
26
|
-
<div class="pkt-linkcard__text">${k(this)}</div>
|
|
27
|
-
</a>
|
|
28
|
-
`;
|
|
29
|
-
}
|
|
30
|
-
};
|
|
31
|
-
r([
|
|
32
|
-
n({ type: String, reflect: !0 })
|
|
33
|
-
], t.prototype, "title", 2);
|
|
34
|
-
r([
|
|
35
|
-
n({ type: String, reflect: !0 })
|
|
36
|
-
], t.prototype, "href", 2);
|
|
37
|
-
r([
|
|
38
|
-
n({ type: String, reflect: !0 })
|
|
39
|
-
], t.prototype, "iconName", 2);
|
|
40
|
-
r([
|
|
41
|
-
n({ type: Boolean, reflect: !0 })
|
|
42
|
-
], t.prototype, "external", 2);
|
|
43
|
-
r([
|
|
44
|
-
n({ type: Boolean, reflect: !0 })
|
|
45
|
-
], t.prototype, "openInNewTab", 2);
|
|
46
|
-
r([
|
|
47
|
-
n({ type: String, reflect: !0 })
|
|
48
|
-
], t.prototype, "skin", 2);
|
|
49
|
-
t = r([
|
|
50
|
-
f("pkt-linkcard")
|
|
51
|
-
], t);
|
|
52
|
-
export {
|
|
53
|
-
t as P
|
|
54
|
-
};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";const t=require("./element-gR_VtSiD.cjs"),k=require("./element-with-slot-ZX-up7jO.cjs");require("./icon-Bqj9oBbl.cjs");const p=require("./if-defined-BOW3ODSj.cjs");var c=Object.defineProperty,h=Object.getOwnPropertyDescriptor,r=(l,n,i,s)=>{for(var e=s>1?void 0:s?h(n,i):n,o=l.length-1,a;o>=0;o--)(a=l[o])&&(e=(s?a(n,i,e):a(e))||e);return s&&e&&c(n,i,e),e};exports.PktLinkCard=class extends k.PktElementWithSlot{constructor(){super(...arguments),this.title="",this.href="#",this.iconName="",this.external=!1,this.openInNewTab=!1,this.skin="normal"}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.b`
|
|
2
|
-
<a
|
|
3
|
-
href=${this.href}
|
|
4
|
-
class=${n}
|
|
5
|
-
target=${this.openInNewTab?"_blank":"_self"}
|
|
6
|
-
rel=${p.o(this.openInNewTab?"noopener noreferrer":void 0)}
|
|
7
|
-
>
|
|
8
|
-
${this.iconName&&t.b`<pkt-icon class="pkt-link__icon" name="${this.iconName}" />`}
|
|
9
|
-
${this.title&&t.b`<div class=${i}>${this.title}</div>`}
|
|
10
|
-
|
|
11
|
-
<div class="pkt-linkcard__text">${k.slotContent(this)}</div>
|
|
12
|
-
</a>
|
|
13
|
-
`}};r([t.n({type:String,reflect:!0})],exports.PktLinkCard.prototype,"title",2);r([t.n({type:String,reflect:!0})],exports.PktLinkCard.prototype,"href",2);r([t.n({type:String,reflect:!0})],exports.PktLinkCard.prototype,"iconName",2);r([t.n({type:Boolean,reflect:!0})],exports.PktLinkCard.prototype,"external",2);r([t.n({type:Boolean,reflect:!0})],exports.PktLinkCard.prototype,"openInNewTab",2);r([t.n({type:String,reflect:!0})],exports.PktLinkCard.prototype,"skin",2);exports.PktLinkCard=r([t.t("pkt-linkcard")],exports.PktLinkCard);
|