@oslokommune/punkt-elements 16.7.3 → 16.7.4
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 +18 -0
- package/dist/accordion-BB1JrONI.cjs +34 -0
- package/dist/accordion-nNH87Y60.js +130 -0
- package/dist/alert-BEEnTiCb.cjs +33 -0
- package/dist/alert-ePJuDtmm.js +171 -0
- package/dist/async-directive-B9P1Qa0k.cjs +1 -0
- package/dist/async-directive-CaQiqjyV.js +55 -0
- package/dist/backlink-Ba03LlbB.cjs +13 -0
- package/dist/backlink-CiwXrQYD.js +38 -0
- package/dist/booleanish-BmcOU-43.js +11 -0
- package/dist/booleanish-jJLlnr6-.cjs +1 -0
- package/dist/breadcrumbs-CD1zib3s.cjs +43 -0
- package/dist/breadcrumbs-CpuVqWhF.js +76 -0
- package/dist/button-BIpd1xJh.js +95 -0
- package/dist/button-D-TOBaJB.cjs +27 -0
- package/dist/calendar-BzEtOJla.js +2031 -0
- package/dist/calendar-E5jJLt8D.cjs +90 -0
- package/dist/card-BYJu1MYm.js +339 -0
- package/dist/card-CUFhMVim.cjs +87 -0
- package/dist/checkbox-BARDb9iV.cjs +31 -0
- package/dist/checkbox-Cspxcvt_.js +111 -0
- package/dist/class-map-C8HuhNzZ.js +27 -0
- package/dist/class-map-CJ-msbHs.cjs +1 -0
- package/dist/classutils-DEL164Ur.js +7 -0
- package/dist/classutils-z8YsPlOf.cjs +1 -0
- package/dist/combobox-BcdLZRDU.js +984 -0
- package/dist/combobox-CGbFTWq_.cjs +135 -0
- package/dist/consent-DeB_5sWH.js +197 -0
- package/dist/consent-hwu7pp3S.cjs +11 -0
- package/dist/datepicker-DpmlsnH_.cjs +273 -0
- package/dist/datepicker-OVd8pmnZ.js +1125 -0
- package/dist/dialog-polyfill.esm-1hPr0gl9.js +280 -0
- package/dist/dialog-polyfill.esm-D3Oinvk0.cjs +1 -0
- package/dist/directive-3THFsVew.js +28 -0
- package/dist/directive-CJ2giQBZ.cjs +1 -0
- package/dist/directive-helpers-D1QSxY17.cjs +1 -0
- package/dist/directive-helpers-Dkv2gKgs.js +25 -0
- package/dist/element-DjtxO-1r.cjs +2 -0
- package/dist/element-cZ85T_aa.js +693 -0
- package/dist/element-with-slot-4J2o3SeU.js +166 -0
- package/dist/element-with-slot-CWoTGA1B.cjs +1 -0
- package/dist/header-DWgPgGfS.cjs +304 -0
- package/dist/header-a6ztVNp3.js +782 -0
- package/dist/heading-BgSWIRii.cjs +1 -0
- package/dist/heading-DiQLPxdf.js +73 -0
- package/dist/helptext-CCBKKLus.js +65 -0
- package/dist/helptext-D-3QfZv5.cjs +24 -0
- package/dist/icon-Co72KtgF.js +86 -0
- package/dist/icon-Dr8sfT2X.cjs +1 -0
- package/dist/if-defined-Cjj8qN-Z.js +5 -0
- package/dist/if-defined-XKOD_t_V.cjs +1 -0
- package/dist/index.d.ts +1 -2
- package/dist/input-element-B1yxcfz4.cjs +1 -0
- package/dist/input-element-Bw1s6NlF.js +643 -0
- package/dist/input-wrapper-BRuVELpK.cjs +54 -0
- package/dist/input-wrapper-CDyHTR1V.js +164 -0
- package/dist/input-wrapper-Dwd-_sKm.cjs +1 -0
- package/dist/input-wrapper-YfTmpSSY.js +117 -0
- package/dist/link-CKAFMz9j.js +89 -0
- package/dist/link-CyTCpI0k.cjs +7 -0
- package/dist/linkcard-B0KOGaGj.js +55 -0
- package/dist/linkcard-BE4-FewK.cjs +13 -0
- package/dist/listbox-DCA2JoPV.cjs +106 -0
- package/dist/listbox-DuBgTFvH.js +397 -0
- package/dist/loader-6kFZUErT.js +66 -0
- package/dist/loader-CX2rsC01.cjs +16 -0
- package/dist/messagebox-Cwlg5sOr.js +110 -0
- package/dist/messagebox-Din9X53b.cjs +13 -0
- package/dist/modal-C_wtsh9m.js +209 -0
- package/dist/modal-DS_wUOIv.cjs +36 -0
- package/dist/pkt-accordion.cjs +1 -1
- package/dist/pkt-accordion.js +2 -7
- package/dist/pkt-alert.cjs +1 -1
- package/dist/pkt-alert.js +2 -5
- package/dist/pkt-backlink.cjs +1 -1
- package/dist/pkt-backlink.js +2 -5
- package/dist/pkt-breadcrumbs.cjs +1 -43
- package/dist/pkt-breadcrumbs.js +2 -81
- package/dist/pkt-button.cjs +1 -1
- package/dist/pkt-button.js +2 -5
- package/dist/pkt-calendar.cjs +1 -1
- package/dist/pkt-calendar.js +2 -5
- package/dist/pkt-card.cjs +1 -1
- package/dist/pkt-card.js +2 -5
- package/dist/pkt-checkbox.cjs +1 -1
- package/dist/pkt-checkbox.js +2 -5
- package/dist/pkt-combobox.cjs +1 -1
- package/dist/pkt-combobox.js +2 -5
- package/dist/pkt-consent.cjs +1 -1
- package/dist/pkt-consent.js +2 -5
- package/dist/pkt-datepicker.cjs +1 -1
- package/dist/pkt-datepicker.js +5 -9
- package/dist/pkt-header.cjs +1 -304
- package/dist/pkt-header.js +2 -861
- package/dist/pkt-heading.cjs +1 -1
- package/dist/pkt-heading.js +2 -5
- package/dist/pkt-helptext.cjs +1 -1
- package/dist/pkt-helptext.js +2 -5
- package/dist/pkt-icon.cjs +1 -1
- package/dist/pkt-icon.js +2 -5
- package/dist/pkt-index.cjs +1 -1
- package/dist/pkt-index.js +30 -66
- package/dist/pkt-input-wrapper.cjs +1 -1
- package/dist/pkt-input-wrapper.js +2 -5
- package/dist/pkt-link.cjs +1 -1
- package/dist/pkt-link.js +2 -5
- package/dist/pkt-linkcard.cjs +1 -1
- package/dist/pkt-linkcard.js +2 -5
- package/dist/pkt-listbox.cjs +1 -1
- package/dist/pkt-listbox.js +2 -5
- package/dist/pkt-loader.cjs +1 -1
- package/dist/pkt-loader.js +2 -5
- package/dist/pkt-messagebox.cjs +1 -1
- package/dist/pkt-messagebox.js +2 -5
- package/dist/pkt-modal.cjs +1 -1
- package/dist/pkt-modal.js +2 -5
- package/dist/pkt-options-controller-CRrI6WMk.js +43 -0
- package/dist/pkt-options-controller-CXUGx134.cjs +1 -0
- package/dist/pkt-progressbar.cjs +1 -1
- package/dist/pkt-progressbar.js +2 -5
- package/dist/pkt-radiobutton.cjs +1 -1
- package/dist/pkt-radiobutton.js +2 -5
- package/dist/pkt-select.cjs +1 -1
- package/dist/pkt-select.js +2 -5
- package/dist/pkt-tabs.cjs +1 -1
- package/dist/pkt-tabs.js +2 -7
- package/dist/pkt-tag.cjs +1 -1
- package/dist/pkt-tag.js +2 -5
- package/dist/pkt-textarea.cjs +1 -1
- package/dist/pkt-textarea.js +2 -5
- package/dist/pkt-textinput.cjs +1 -1
- package/dist/pkt-textinput.js +2 -5
- package/dist/pkt-timepicker.cjs +1 -191
- package/dist/pkt-timepicker.js +2 -560
- package/dist/progressbar-CdXtmOBb.cjs +17 -0
- package/dist/progressbar-Dy9AiYQz.js +113 -0
- package/dist/radiobutton-GOnpUbCW.cjs +31 -0
- package/dist/radiobutton-V_KPbup_.js +84 -0
- package/dist/ref-BaJ0mBT_.cjs +1 -0
- package/dist/ref-RS8Uv6uC.js +30 -0
- package/dist/repeat-Cepr3469.js +57 -0
- package/dist/repeat-CqcDYBxr.cjs +1 -0
- package/dist/select-BSAFd8Wa.js +164 -0
- package/dist/select-C2i8sOk5.cjs +49 -0
- package/dist/tabs-D8nL9rWx.cjs +37 -0
- package/dist/tabs-Y7utmJi9.js +318 -0
- package/dist/tag-DLthw5b4.cjs +27 -0
- package/dist/tag-VwykmuQR.js +179 -0
- package/dist/textarea-D7aGOyDf.cjs +46 -0
- package/dist/textarea-DYOBhJrN.js +115 -0
- package/dist/textinput-BUgntXnM.js +124 -0
- package/dist/textinput-DFh8_9cx.cjs +70 -0
- package/dist/timepicker-BIfE7KKJ.cjs +191 -0
- package/dist/timepicker-DaSwn1FA.js +503 -0
- package/dist/utils-CUqCKGvp.js +7 -0
- package/dist/utils-CjAbIttF.cjs +1 -0
- package/package.json +6 -6
- package/src/components/alert/alert.test.ts +1 -1
- package/src/components/alert/alert.ts +6 -6
- package/src/components/datepicker/datepicker-utils.test.ts +16 -23
- package/dist/accordionitem-_9AiCIvd.cjs +0 -34
- package/dist/accordionitem-dCfSrxh5.js +0 -140
- package/dist/alert-BtOk8yRH.cjs +0 -33
- package/dist/alert-DlY2_grU.js +0 -117
- package/dist/async-directive-CMzWMlZ5.js +0 -65
- package/dist/async-directive-DoMuclel.cjs +0 -5
- package/dist/backlink-Ce5Vldop.js +0 -49
- package/dist/backlink-y3dwjKPC.cjs +0 -13
- package/dist/booleanish-BKVonob4.cjs +0 -1
- package/dist/booleanish-C9R0tdXH.js +0 -11
- package/dist/button-B_TXwNzt.cjs +0 -27
- package/dist/button-BiY-wlKF.js +0 -139
- package/dist/calendar-B2pji2zn.cjs +0 -90
- package/dist/calendar-DhjQDC4C.js +0 -2140
- package/dist/card-BwMNB5Bb.cjs +0 -87
- package/dist/card-CGlmcMSR.js +0 -233
- package/dist/checkbox-BsJZYA26.js +0 -147
- package/dist/checkbox-CTY8f_qn.cjs +0 -31
- package/dist/class-map-CEnykyO_.js +0 -34
- package/dist/class-map-CsENJXf1.cjs +0 -5
- package/dist/classutils-BwNK82ZQ.cjs +0 -1
- package/dist/classutils-RQs1k6D9.js +0 -7
- package/dist/combobox-DSB5WOxg.js +0 -815
- package/dist/combobox-DbICIgKG.cjs +0 -135
- package/dist/consent-DkOQpbsg.cjs +0 -11
- package/dist/consent-SNWV_mMU.js +0 -175
- package/dist/datepicker-BEWl9iz3.cjs +0 -273
- package/dist/datepicker-euHyzXnb.js +0 -1170
- package/dist/dialog-polyfill.esm-CPKZe7AL.cjs +0 -1
- package/dist/dialog-polyfill.esm-CbjBMXAG.js +0 -395
- package/dist/directive-C7oCP5Bh.cjs +0 -5
- package/dist/directive-helpers-BP2WOx60.cjs +0 -5
- package/dist/directive-helpers-rm-28gIj.js +0 -38
- package/dist/directive-oAbCiebi.js +0 -27
- package/dist/element-CPpT3rFQ.js +0 -638
- package/dist/element-gR_VtSiD.cjs +0 -27
- package/dist/element-with-slot-Dqk6-TRR.js +0 -240
- package/dist/element-with-slot-ZX-up7jO.cjs +0 -1
- package/dist/heading-D2tVS6lS.js +0 -103
- package/dist/heading-DrzbgDb6.cjs +0 -1
- package/dist/helptext-BKtU4mas.js +0 -82
- package/dist/helptext-DcRC7wW2.cjs +0 -24
- package/dist/icon-CxQcIa5F.js +0 -105
- package/dist/icon-q81vqPK_.cjs +0 -9
- package/dist/if-defined-B0krMLad.js +0 -10
- package/dist/if-defined-BOW3ODSj.cjs +0 -5
- package/dist/input-element-8nLwuQS4.js +0 -837
- package/dist/input-element-DdVhUvva.cjs +0 -1
- package/dist/input-wrapper-Bs4CRNst.js +0 -181
- package/dist/input-wrapper-Bv9aqqVq.cjs +0 -54
- package/dist/input-wrapper-CDgenrYA.js +0 -6
- package/dist/input-wrapper-EoSAbU-U.cjs +0 -1
- package/dist/link-C0rl-86s.cjs +0 -7
- package/dist/link-Cdqgl60z.js +0 -55
- package/dist/linkcard-Dimu7Rlx.cjs +0 -13
- package/dist/linkcard-Lbq_UhjZ.js +0 -56
- package/dist/listbox-Bia4_tvN.js +0 -440
- package/dist/listbox-La2GZQei.cjs +0 -106
- package/dist/loader-D1ugDXGV.cjs +0 -16
- package/dist/loader-DyN6RGC5.js +0 -95
- package/dist/messagebox-BGMVm2t9.js +0 -71
- package/dist/messagebox-M0yIgCz9.cjs +0 -13
- package/dist/modal-CMO1RtIi.cjs +0 -36
- package/dist/modal-DjPQDE-Z.js +0 -156
- package/dist/pkt-options-controller-5LXbEzuk.cjs +0 -1
- package/dist/pkt-options-controller-B5YalfCb.js +0 -39
- package/dist/progressbar-BqlMzkM_.cjs +0 -21
- package/dist/progressbar-sbHDFC12.js +0 -162
- package/dist/radiobutton-5ZqVVtTT.cjs +0 -31
- package/dist/radiobutton-D8Ai8ETa.js +0 -113
- package/dist/ref-Bg_Swj5w.js +0 -42
- package/dist/ref-CL-Xk9Xm.cjs +0 -5
- package/dist/repeat-BD8TKgJb.js +0 -61
- package/dist/repeat-Cfq8CDlf.cjs +0 -5
- package/dist/select-De-n8on9.js +0 -230
- package/dist/select-dTWibR6_.cjs +0 -49
- package/dist/state-C_1EOo3D.js +0 -12
- package/dist/state-Dg-53wQ8.cjs +0 -5
- package/dist/tabitem-B9-jeV97.js +0 -334
- package/dist/tabitem-BnhzqfW3.cjs +0 -65
- package/dist/tag-CbwO8yvD.cjs +0 -27
- package/dist/tag-D4FI5t3y.js +0 -117
- package/dist/textarea-BmLaKzsc.cjs +0 -50
- package/dist/textarea-CMiSJaYL.js +0 -133
- package/dist/textinput-em9y4yrL.cjs +0 -70
- package/dist/textinput-r8udK0IX.js +0 -152
- package/dist/utils-DznhwRXm.js +0 -8
- package/dist/utils-byXsEz1u.cjs +0 -1
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { c as e, d as t, l as n, o as r, r as i, s as a, t as o, u as s } from "./element-cZ85T_aa.js";
|
|
2
|
+
import { n as c, r as l, t as u } from "./directive-3THFsVew.js";
|
|
3
|
+
import { t as d } from "./class-map-C8HuhNzZ.js";
|
|
4
|
+
import "./icon-Co72KtgF.js";
|
|
5
|
+
import { n as f, t as p } from "./ref-RS8Uv6uC.js";
|
|
6
|
+
import { n as m } from "./utils-CUqCKGvp.js";
|
|
7
|
+
//#region ../../node_modules/lit-html/directives/style-map.js
|
|
8
|
+
var h = "important", g = " !" + h, _ = u(class extends c {
|
|
9
|
+
constructor(e) {
|
|
10
|
+
if (super(e), e.type !== l.ATTRIBUTE || e.name !== "style" || e.strings?.length > 2) throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.");
|
|
11
|
+
}
|
|
12
|
+
render(e) {
|
|
13
|
+
return Object.keys(e).reduce((t, n) => {
|
|
14
|
+
let r = e[n];
|
|
15
|
+
return r == null ? t : t + `${n = n.includes("-") ? n : n.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g, "-$&").toLowerCase()}:${r};`;
|
|
16
|
+
}, "");
|
|
17
|
+
}
|
|
18
|
+
update(e, [t]) {
|
|
19
|
+
let { style: n } = e.element;
|
|
20
|
+
if (this.ft === void 0) return this.ft = new Set(Object.keys(t)), this.render(t);
|
|
21
|
+
for (let e of this.ft) t[e] ?? (this.ft.delete(e), e.includes("-") ? n.removeProperty(e) : n[e] = null);
|
|
22
|
+
for (let e in t) {
|
|
23
|
+
let r = t[e];
|
|
24
|
+
if (r != null) {
|
|
25
|
+
this.ft.add(e);
|
|
26
|
+
let t = typeof r == "string" && r.endsWith(g);
|
|
27
|
+
e.includes("-") || t ? n.setProperty(e, t ? r.slice(0, -11) : r, t ? h : "") : n[e] = r;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
return s;
|
|
31
|
+
}
|
|
32
|
+
}), v = class extends o {
|
|
33
|
+
constructor() {
|
|
34
|
+
super(), this.ariaLabel = null, this.ariaLabelledby = null, this.ariaValueText = null, this.ariaLive = "polite", this.id = m(), 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 = p(), this.progressBarRef = p();
|
|
35
|
+
}
|
|
36
|
+
firstUpdated(e) {
|
|
37
|
+
super.firstUpdated(e), this.setComputedValues(), this.syncAttributes();
|
|
38
|
+
}
|
|
39
|
+
updated(e) {
|
|
40
|
+
super.updated(e), e.has("valueCurrent") && this.labelRef.value && (this.labelWidth = this.labelRef.value.getBoundingClientRect().width || 0), e.has("id") && this.id && (this.progressBarId = this.id), (e.has("statusType") || e.has("id") || e.has("ariaLabelledby")) && (this.progressbarId = this.id || m(), this.computedAriaLabelledby = this.ariaLabelledby || `${this.progressbarId}-title`), (e.has("ariaValueText") || e.has("valueCurrent") || e.has("valueMax")) && (this.computedAriaValueText = this.statusType === "fraction" && !this.ariaValueText ? `${this.valueCurrent} av ${this.valueMax - this.valueMin}` : this.ariaValueText || ""), this.syncAttributes();
|
|
41
|
+
}
|
|
42
|
+
render() {
|
|
43
|
+
let e = this.statusType !== "none", r = this.valueMax - this.valueMin, i = this.valueCurrent / r * 100, a = this.statusType === "fraction" ? Math.round(i) : Math.round((this.valueCurrent - this.valueMin) / (this.valueMax - this.valueMin) * 100), o = `${this.valueCurrent} av ${r}`, s = d({
|
|
44
|
+
"pkt-progressbar__bar": !0,
|
|
45
|
+
[`pkt-progressbar__bar--${this.skin}`]: !!this.skin
|
|
46
|
+
}), c = d({
|
|
47
|
+
"pkt-progressbar__title": !0,
|
|
48
|
+
"pkt-progressbar__title-center": this.titlePosition === "center"
|
|
49
|
+
}), l = d({
|
|
50
|
+
"pkt-progressbar__status": !0,
|
|
51
|
+
"pkt-progressbar__status--center": this.statusPlacement === "center"
|
|
52
|
+
}), u = d({
|
|
53
|
+
"pkt-progressbar__status-placement--following": this.statusPlacement === "following",
|
|
54
|
+
"pkt-progressbar__status-placement--center": this.statusPlacement === "center",
|
|
55
|
+
"pkt-progressbar__status-placement--left": this.statusPlacement === "left"
|
|
56
|
+
});
|
|
57
|
+
return t` <div
|
|
58
|
+
class="pkt-progressbar__container"
|
|
59
|
+
.ref=${this.progressBarRef}
|
|
60
|
+
style=${_({
|
|
61
|
+
"--pkt-progress-label-width": `${this.labelWidth}px`,
|
|
62
|
+
"--pkt-progress-width": `${a}%`
|
|
63
|
+
})}
|
|
64
|
+
>
|
|
65
|
+
${this.title ? t`<p id=${`${this.progressBarId}-title`} class=${c}>${this.title}</p>` : n}
|
|
66
|
+
|
|
67
|
+
<div class="pkt-progressbar__bar-wrapper">
|
|
68
|
+
<div class=${s}></div>
|
|
69
|
+
</div>
|
|
70
|
+
|
|
71
|
+
${e ? t`<div class=${l}>
|
|
72
|
+
<span class=${u} ${f(this.labelRef)}>
|
|
73
|
+
${this.statusType === "percentage" ? `${a}%` : o}
|
|
74
|
+
</span>
|
|
75
|
+
</div>` : n}
|
|
76
|
+
</div>`;
|
|
77
|
+
}
|
|
78
|
+
setComputedValues() {
|
|
79
|
+
this.progressbarId = this.id || m(), this.computedAriaLabelledby = this.ariaLabelledby || `${this.progressbarId}-title`, this.computedAriaValueText = this.statusType === "fraction" && !this.ariaValueText ? `${this.valueCurrent} av ${this.valueMax - this.valueMin}` : this.ariaValueText || "";
|
|
80
|
+
}
|
|
81
|
+
syncAttributes() {
|
|
82
|
+
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);
|
|
83
|
+
}
|
|
84
|
+
_handleAttribute(e, t) {
|
|
85
|
+
t == null || t === "" ? this.removeAttribute(e) : this.setAttribute(e, String(t));
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
i([a({ type: String })], v.prototype, "ariaLabel", void 0), i([a({
|
|
89
|
+
type: String,
|
|
90
|
+
reflect: !0
|
|
91
|
+
})], v.prototype, "ariaLabelledby", void 0), i([a({
|
|
92
|
+
type: String,
|
|
93
|
+
reflect: !0
|
|
94
|
+
})], v.prototype, "ariaValueText", void 0), i([a({ type: String })], v.prototype, "ariaLive", void 0), i([a({
|
|
95
|
+
type: String,
|
|
96
|
+
reflect: !0
|
|
97
|
+
})], v.prototype, "id", void 0), i([a({ type: String })], v.prototype, "role", void 0), i([a({ type: String })], v.prototype, "skin", void 0), i([a({ type: String })], v.prototype, "statusPlacement", void 0), i([a({ type: String })], v.prototype, "statusType", void 0), i([a({
|
|
98
|
+
type: String,
|
|
99
|
+
reflect: !0
|
|
100
|
+
})], v.prototype, "title", void 0), i([a({ type: String })], v.prototype, "titlePosition", void 0), i([a({
|
|
101
|
+
type: Number,
|
|
102
|
+
reflect: !0
|
|
103
|
+
})], v.prototype, "valueCurrent", void 0), i([a({ type: Number })], v.prototype, "valueMax", void 0), i([a({ type: Number })], v.prototype, "valueMin", void 0), i([r()], v.prototype, "labelWidth", void 0), i([r()], v.prototype, "progressbarId", void 0), i([r()], v.prototype, "computedAriaLabelledby", void 0), i([r()], v.prototype, "computedAriaValueText", void 0);
|
|
104
|
+
try {
|
|
105
|
+
e("pkt-progressbar")(v);
|
|
106
|
+
} catch {
|
|
107
|
+
console.warn("Forsøker å definere <pkt-progressbar>, men den er allerede definert");
|
|
108
|
+
}
|
|
109
|
+
//#endregion
|
|
110
|
+
//#region src/components/progressbar/index.ts
|
|
111
|
+
var y = v;
|
|
112
|
+
//#endregion
|
|
113
|
+
export { v as n, y as t };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
const e=require(`./element-DjtxO-1r.cjs`),t=require(`./class-map-CJ-msbHs.cjs`),n=require(`./ref-BaJ0mBT_.cjs`),r=require(`./input-element-B1yxcfz4.cjs`);var i=class extends r.t{constructor(...e){super(...e),this.inputRef=n.t(),this.value=``,this.checkHelptext=null,this.defaultChecked=!1,this.hasTile=!1,this.checked=null,this.type=`radio`,this.tagText=null,this.optionalTag=!1,this.optionalText=`Valgfritt`,this.requiredTag=!1,this.requiredText=`Må fylles ut`,this._checked=!1}connectedCallback(){super.connectedCallback()}attributeChangedCallback(e,t,n){e===`defaultChecked`&&(this._checked=this.defaultChecked),e===`checked`&&(this._checked=this.checked===``||this.checked===`true`||this.checked===!0),super.attributeChangedCallback(e,t,n)}render(){let r=t.t({"pkt-input-check__input":!0,"pkt-input-check__input--tile":this.hasTile,"pkt-input-check__input--tile-disabled":this.disabled&&this.hasTile}),i=t.t({"pkt-input-check__input-checkbox":!0,"pkt-input-check__input-checkbox--error":this.hasError}),a=t.t({"pkt-input-check__input-label":!0,"pkt-input-check__input-label--disabled":this.disabled,"pkt-sr-only":this.hideLabel}),o=`pkt-tag pkt-tag--small pkt-tag--thin-text`;return e.d`
|
|
2
|
+
<div class="pkt-input-check">
|
|
3
|
+
<div class=${r}>
|
|
4
|
+
<input
|
|
5
|
+
id=${this.id+`-internal`}
|
|
6
|
+
class=${i}
|
|
7
|
+
type="radio"
|
|
8
|
+
role="radio"
|
|
9
|
+
?disabled=${this.disabled}
|
|
10
|
+
form=""
|
|
11
|
+
name=${this.name+`-internal`}
|
|
12
|
+
${n.n(this.inputRef)}
|
|
13
|
+
@change=${this.toggleChecked}
|
|
14
|
+
@input=${this.onInput}
|
|
15
|
+
@blur=${this.onBlur}
|
|
16
|
+
@focus=${this.onFocus}
|
|
17
|
+
?checked=${this.checked}
|
|
18
|
+
/>
|
|
19
|
+
${e.d`
|
|
20
|
+
<label class=${a} for=${this.id+`-internal`}>
|
|
21
|
+
${this.label} ${e.d`
|
|
22
|
+
${this.tagText?e.d`<span class=${o+` pkt-tag--gray`}>${this.tagText}</span>`:e.l}
|
|
23
|
+
${this.optionalTag?e.d`<span class=${o+` pkt-tag--blue-light`}>${this.optionalText}</span>`:e.l}
|
|
24
|
+
${this.requiredTag?e.d`<span class=${o+` pkt-tag--beige`}>${this.requiredText}</span>`:e.l}
|
|
25
|
+
`}
|
|
26
|
+
${this.checkHelptext?e.d`<div class="pkt-input-check__input-helptext">${this.checkHelptext}</div>`:e.l}
|
|
27
|
+
</label>
|
|
28
|
+
`}
|
|
29
|
+
</div>
|
|
30
|
+
</div>
|
|
31
|
+
`}toggleChecked(e=null){e&&e.preventDefault(),e&&e.stopImmediatePropagation(),this.touched=!0,this.inputRef.value&&(this._checked=this.inputRef.value.matches(`:checked`),this.valueChecked(this._checked))}};e.r([e.s({type:String,reflect:!0})],i.prototype,`value`,void 0),e.r([e.s({type:String})],i.prototype,`checkHelptext`,void 0),e.r([e.s({type:Boolean})],i.prototype,`defaultChecked`,void 0),e.r([e.s({type:Boolean})],i.prototype,`hasTile`,void 0),e.r([e.s({type:Boolean,reflect:!0})],i.prototype,`checked`,void 0),e.r([e.s({type:String,reflect:!0})],i.prototype,`type`,void 0),e.r([e.s({type:String})],i.prototype,`tagText`,void 0),e.r([e.s({type:Boolean})],i.prototype,`optionalTag`,void 0),e.r([e.s({type:String})],i.prototype,`optionalText`,void 0),e.r([e.s({type:Boolean})],i.prototype,`requiredTag`,void 0),e.r([e.s({type:String})],i.prototype,`requiredText`,void 0),e.r([e.o()],i.prototype,`_checked`,void 0);try{e.c(`pkt-radiobutton`)(i)}catch{console.warn(`Forsøker å definere <pkt-radiobutton>, men den er allerede definert`)}var a=i;Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return i}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return a}});
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { c as e, d as t, l as n, o as r, r as i, s as a } from "./element-cZ85T_aa.js";
|
|
2
|
+
import { t as o } from "./class-map-C8HuhNzZ.js";
|
|
3
|
+
import { n as s, t as c } from "./ref-RS8Uv6uC.js";
|
|
4
|
+
import { t as l } from "./input-element-Bw1s6NlF.js";
|
|
5
|
+
//#region src/components/radiobutton/radiobutton.ts
|
|
6
|
+
var u = class extends l {
|
|
7
|
+
constructor(...e) {
|
|
8
|
+
super(...e), this.inputRef = c(), this.value = "", this.checkHelptext = null, this.defaultChecked = !1, this.hasTile = !1, this.checked = null, this.type = "radio", this.tagText = null, this.optionalTag = !1, this.optionalText = "Valgfritt", this.requiredTag = !1, this.requiredText = "Må fylles ut", this._checked = !1;
|
|
9
|
+
}
|
|
10
|
+
connectedCallback() {
|
|
11
|
+
super.connectedCallback();
|
|
12
|
+
}
|
|
13
|
+
attributeChangedCallback(e, t, n) {
|
|
14
|
+
e === "defaultChecked" && (this._checked = this.defaultChecked), e === "checked" && (this._checked = this.checked === "" || this.checked === "true" || this.checked === !0), super.attributeChangedCallback(e, t, n);
|
|
15
|
+
}
|
|
16
|
+
render() {
|
|
17
|
+
let e = o({
|
|
18
|
+
"pkt-input-check__input": !0,
|
|
19
|
+
"pkt-input-check__input--tile": this.hasTile,
|
|
20
|
+
"pkt-input-check__input--tile-disabled": this.disabled && this.hasTile
|
|
21
|
+
}), r = o({
|
|
22
|
+
"pkt-input-check__input-checkbox": !0,
|
|
23
|
+
"pkt-input-check__input-checkbox--error": this.hasError
|
|
24
|
+
}), i = o({
|
|
25
|
+
"pkt-input-check__input-label": !0,
|
|
26
|
+
"pkt-input-check__input-label--disabled": this.disabled,
|
|
27
|
+
"pkt-sr-only": this.hideLabel
|
|
28
|
+
}), a = "pkt-tag pkt-tag--small pkt-tag--thin-text";
|
|
29
|
+
return t`
|
|
30
|
+
<div class="pkt-input-check">
|
|
31
|
+
<div class=${e}>
|
|
32
|
+
<input
|
|
33
|
+
id=${this.id + "-internal"}
|
|
34
|
+
class=${r}
|
|
35
|
+
type="radio"
|
|
36
|
+
role="radio"
|
|
37
|
+
?disabled=${this.disabled}
|
|
38
|
+
form=""
|
|
39
|
+
name=${this.name + "-internal"}
|
|
40
|
+
${s(this.inputRef)}
|
|
41
|
+
@change=${this.toggleChecked}
|
|
42
|
+
@input=${this.onInput}
|
|
43
|
+
@blur=${this.onBlur}
|
|
44
|
+
@focus=${this.onFocus}
|
|
45
|
+
?checked=${this.checked}
|
|
46
|
+
/>
|
|
47
|
+
${t`
|
|
48
|
+
<label class=${i} for=${this.id + "-internal"}>
|
|
49
|
+
${this.label} ${t`
|
|
50
|
+
${this.tagText ? t`<span class=${a + " pkt-tag--gray"}>${this.tagText}</span>` : n}
|
|
51
|
+
${this.optionalTag ? t`<span class=${a + " pkt-tag--blue-light"}>${this.optionalText}</span>` : n}
|
|
52
|
+
${this.requiredTag ? t`<span class=${a + " pkt-tag--beige"}>${this.requiredText}</span>` : n}
|
|
53
|
+
`}
|
|
54
|
+
${this.checkHelptext ? t`<div class="pkt-input-check__input-helptext">${this.checkHelptext}</div>` : n}
|
|
55
|
+
</label>
|
|
56
|
+
`}
|
|
57
|
+
</div>
|
|
58
|
+
</div>
|
|
59
|
+
`;
|
|
60
|
+
}
|
|
61
|
+
toggleChecked(e = null) {
|
|
62
|
+
e && e.preventDefault(), e && e.stopImmediatePropagation(), this.touched = !0, this.inputRef.value && (this._checked = this.inputRef.value.matches(":checked"), this.valueChecked(this._checked));
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
i([a({
|
|
66
|
+
type: String,
|
|
67
|
+
reflect: !0
|
|
68
|
+
})], u.prototype, "value", void 0), i([a({ type: String })], u.prototype, "checkHelptext", void 0), i([a({ type: Boolean })], u.prototype, "defaultChecked", void 0), i([a({ type: Boolean })], u.prototype, "hasTile", void 0), i([a({
|
|
69
|
+
type: Boolean,
|
|
70
|
+
reflect: !0
|
|
71
|
+
})], u.prototype, "checked", void 0), i([a({
|
|
72
|
+
type: String,
|
|
73
|
+
reflect: !0
|
|
74
|
+
})], u.prototype, "type", void 0), i([a({ type: String })], u.prototype, "tagText", void 0), i([a({ type: Boolean })], u.prototype, "optionalTag", void 0), i([a({ type: String })], u.prototype, "optionalText", void 0), i([a({ type: Boolean })], u.prototype, "requiredTag", void 0), i([a({ type: String })], u.prototype, "requiredText", void 0), i([r()], u.prototype, "_checked", void 0);
|
|
75
|
+
try {
|
|
76
|
+
e("pkt-radiobutton")(u);
|
|
77
|
+
} catch {
|
|
78
|
+
console.warn("Forsøker å definere <pkt-radiobutton>, men den er allerede definert");
|
|
79
|
+
}
|
|
80
|
+
//#endregion
|
|
81
|
+
//#region src/components/radiobutton/index.ts
|
|
82
|
+
var d = u;
|
|
83
|
+
//#endregion
|
|
84
|
+
export { u as n, d as t };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`./element-DjtxO-1r.cjs`),t=require(`./directive-CJ2giQBZ.cjs`),n=require(`./async-directive-B9P1Qa0k.cjs`);var r=()=>new i,i=class{},a=new WeakMap,o=t.t(class extends n.t{render(t){return e.l}update(t,[n]){let r=n!==this.G;return r&&this.G!==void 0&&this.rt(void 0),(r||this.lt!==this.ct)&&(this.G=n,this.ht=t.options?.host,this.rt(this.ct=t.element)),e.l}rt(e){if(this.isConnected||(e=void 0),typeof this.G==`function`){let t=this.ht??globalThis,n=a.get(t);n===void 0&&(n=new WeakMap,a.set(t,n)),n.get(this.G)!==void 0&&this.G.call(this.ht,void 0),n.set(this.G,e),e!==void 0&&this.G.call(this.ht,e)}else this.G.value=e}get lt(){return typeof this.G==`function`?a.get(this.ht??globalThis)?.get(this.G):this.G?.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return r}});
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { l as e } from "./element-cZ85T_aa.js";
|
|
2
|
+
import { t } from "./directive-3THFsVew.js";
|
|
3
|
+
import { t as n } from "./async-directive-CaQiqjyV.js";
|
|
4
|
+
//#region ../../node_modules/lit-html/directives/ref.js
|
|
5
|
+
var r = () => new i(), i = class {}, a = /* @__PURE__ */ new WeakMap(), o = t(class extends n {
|
|
6
|
+
render(t) {
|
|
7
|
+
return e;
|
|
8
|
+
}
|
|
9
|
+
update(t, [n]) {
|
|
10
|
+
let r = n !== this.G;
|
|
11
|
+
return r && this.G !== void 0 && this.rt(void 0), (r || this.lt !== this.ct) && (this.G = n, this.ht = t.options?.host, this.rt(this.ct = t.element)), e;
|
|
12
|
+
}
|
|
13
|
+
rt(e) {
|
|
14
|
+
if (this.isConnected || (e = void 0), typeof this.G == "function") {
|
|
15
|
+
let t = this.ht ?? globalThis, n = a.get(t);
|
|
16
|
+
n === void 0 && (n = /* @__PURE__ */ new WeakMap(), a.set(t, n)), n.get(this.G) !== void 0 && this.G.call(this.ht, void 0), n.set(this.G, e), e !== void 0 && this.G.call(this.ht, e);
|
|
17
|
+
} else this.G.value = e;
|
|
18
|
+
}
|
|
19
|
+
get lt() {
|
|
20
|
+
return typeof this.G == "function" ? a.get(this.ht ?? globalThis)?.get(this.G) : this.G?.value;
|
|
21
|
+
}
|
|
22
|
+
disconnected() {
|
|
23
|
+
this.lt === this.ct && this.rt(void 0);
|
|
24
|
+
}
|
|
25
|
+
reconnected() {
|
|
26
|
+
this.rt(this.ct);
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
//#endregion
|
|
30
|
+
export { o as n, r as t };
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { u as e } from "./element-cZ85T_aa.js";
|
|
2
|
+
import { n as t, r as n, t as r } from "./directive-3THFsVew.js";
|
|
3
|
+
import { a as i, n as a, o, r as s, t as c } from "./directive-helpers-Dkv2gKgs.js";
|
|
4
|
+
//#region ../../node_modules/lit-html/directives/repeat.js
|
|
5
|
+
var l = (e, t, n) => {
|
|
6
|
+
let r = /* @__PURE__ */ new Map();
|
|
7
|
+
for (let i = t; i <= n; i++) r.set(e[i], i);
|
|
8
|
+
return r;
|
|
9
|
+
}, u = r(class extends t {
|
|
10
|
+
constructor(e) {
|
|
11
|
+
if (super(e), e.type !== n.CHILD) throw Error("repeat() can only be used in text expressions");
|
|
12
|
+
}
|
|
13
|
+
dt(e, t, n) {
|
|
14
|
+
let r;
|
|
15
|
+
n === void 0 ? n = t : t !== void 0 && (r = t);
|
|
16
|
+
let i = [], a = [], o = 0;
|
|
17
|
+
for (let t of e) i[o] = r ? r(t, o) : o, a[o] = n(t, o), o++;
|
|
18
|
+
return {
|
|
19
|
+
values: a,
|
|
20
|
+
keys: i
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
render(e, t, n) {
|
|
24
|
+
return this.dt(e, t, n).values;
|
|
25
|
+
}
|
|
26
|
+
update(t, [n, r, u]) {
|
|
27
|
+
let d = c(t), { values: f, keys: p } = this.dt(n, r, u);
|
|
28
|
+
if (!Array.isArray(d)) return this.ut = p, f;
|
|
29
|
+
let m = this.ut ??= [], h = [], g, _, v = 0, y = d.length - 1, b = 0, x = f.length - 1;
|
|
30
|
+
for (; v <= y && b <= x;) if (d[v] === null) v++;
|
|
31
|
+
else if (d[y] === null) y--;
|
|
32
|
+
else if (m[v] === p[b]) h[b] = i(d[v], f[b]), v++, b++;
|
|
33
|
+
else if (m[y] === p[x]) h[x] = i(d[y], f[x]), y--, x--;
|
|
34
|
+
else if (m[v] === p[x]) h[x] = i(d[v], f[x]), o(t, h[x + 1], d[v]), v++, x--;
|
|
35
|
+
else if (m[y] === p[b]) h[b] = i(d[y], f[b]), o(t, d[v], d[y]), y--, b++;
|
|
36
|
+
else if (g === void 0 && (g = l(p, b, x), _ = l(m, v, y)), g.has(m[v])) if (g.has(m[y])) {
|
|
37
|
+
let e = _.get(p[b]), n = e === void 0 ? null : d[e];
|
|
38
|
+
if (n === null) {
|
|
39
|
+
let e = o(t, d[v]);
|
|
40
|
+
i(e, f[b]), h[b] = e;
|
|
41
|
+
} else h[b] = i(n, f[b]), o(t, d[v], n), d[e] = null;
|
|
42
|
+
b++;
|
|
43
|
+
} else a(d[y]), y--;
|
|
44
|
+
else a(d[v]), v++;
|
|
45
|
+
for (; b <= x;) {
|
|
46
|
+
let e = o(t, h[x + 1]);
|
|
47
|
+
i(e, f[b]), h[b++] = e;
|
|
48
|
+
}
|
|
49
|
+
for (; v <= y;) {
|
|
50
|
+
let e = d[v++];
|
|
51
|
+
e !== null && a(e);
|
|
52
|
+
}
|
|
53
|
+
return this.ut = p, s(t, h), e;
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
//#endregion
|
|
57
|
+
export { u as t };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`./element-DjtxO-1r.cjs`),t=require(`./directive-CJ2giQBZ.cjs`),n=require(`./directive-helpers-D1QSxY17.cjs`);var r=(e,t,n)=>{let r=new Map;for(let i=t;i<=n;i++)r.set(e[i],i);return r},i=t.t(class extends t.n{constructor(e){if(super(e),e.type!==t.r.CHILD)throw Error(`repeat() can only be used in text expressions`)}dt(e,t,n){let r;n===void 0?n=t:t!==void 0&&(r=t);let i=[],a=[],o=0;for(let t of e)i[o]=r?r(t,o):o,a[o]=n(t,o),o++;return{values:a,keys:i}}render(e,t,n){return this.dt(e,t,n).values}update(t,[i,a,o]){let s=n.t(t),{values:c,keys:l}=this.dt(i,a,o);if(!Array.isArray(s))return this.ut=l,c;let u=this.ut??=[],d=[],f,p,m=0,h=s.length-1,g=0,_=c.length-1;for(;m<=h&&g<=_;)if(s[m]===null)m++;else if(s[h]===null)h--;else if(u[m]===l[g])d[g]=n.a(s[m],c[g]),m++,g++;else if(u[h]===l[_])d[_]=n.a(s[h],c[_]),h--,_--;else if(u[m]===l[_])d[_]=n.a(s[m],c[_]),n.o(t,d[_+1],s[m]),m++,_--;else if(u[h]===l[g])d[g]=n.a(s[h],c[g]),n.o(t,s[m],s[h]),h--,g++;else if(f===void 0&&(f=r(l,g,_),p=r(u,m,h)),f.has(u[m]))if(f.has(u[h])){let e=p.get(l[g]),r=e===void 0?null:s[e];if(r===null){let e=n.o(t,s[m]);n.a(e,c[g]),d[g]=e}else d[g]=n.a(r,c[g]),n.o(t,s[m],r),s[e]=null;g++}else n.n(s[h]),h--;else n.n(s[m]),m++;for(;g<=_;){let e=n.o(t,d[_+1]);n.a(e,c[g]),d[g++]=e}for(;m<=h;){let e=s[m++];e!==null&&n.n(e)}return this.ut=l,n.r(t,d),e.u}});Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return i}});
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
import { c as e, d as t, o as n, r, s as i } from "./element-cZ85T_aa.js";
|
|
2
|
+
import { n as a } from "./element-with-slot-4J2o3SeU.js";
|
|
3
|
+
import { t as o } from "./if-defined-Cjj8qN-Z.js";
|
|
4
|
+
import { n as s, t as c } from "./ref-RS8Uv6uC.js";
|
|
5
|
+
import { t as l } from "./input-element-Bw1s6NlF.js";
|
|
6
|
+
import { t as u } from "./pkt-options-controller-CRrI6WMk.js";
|
|
7
|
+
import "./input-wrapper-YfTmpSSY.js";
|
|
8
|
+
//#region src/base-elements/options-input-element.ts
|
|
9
|
+
var d = class extends l {
|
|
10
|
+
constructor(...e) {
|
|
11
|
+
super(...e), this._optionsProp = [], this._options = [];
|
|
12
|
+
}
|
|
13
|
+
get options() {
|
|
14
|
+
return this._options.map((e) => ({
|
|
15
|
+
...e,
|
|
16
|
+
selected: this.isOptionSelected(e)
|
|
17
|
+
}));
|
|
18
|
+
}
|
|
19
|
+
set options(e) {
|
|
20
|
+
this._optionsProp = e, this.requestUpdate("_optionsProp", this._options);
|
|
21
|
+
}
|
|
22
|
+
isOptionSelected(e) {
|
|
23
|
+
return Array.isArray(this.value) ? this.value.includes(e.value) : e.value === this.value;
|
|
24
|
+
}
|
|
25
|
+
findOptionByValue(e) {
|
|
26
|
+
return this._options.find((t) => t.value === e);
|
|
27
|
+
}
|
|
28
|
+
getSelectedOptions() {
|
|
29
|
+
return this._options.filter((e) => this.isOptionSelected(e));
|
|
30
|
+
}
|
|
31
|
+
parseOptions() {
|
|
32
|
+
let e = this._optionsProp.length > 0, t = this.optionsController?.nodes?.length && this.optionsController.nodes.length > 0;
|
|
33
|
+
e ? this._options = this._optionsProp : t && (this._options = this.optionsController.options);
|
|
34
|
+
}
|
|
35
|
+
willUpdate(e) {
|
|
36
|
+
super.willUpdate(e), this.parseOptions();
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
r([i({
|
|
40
|
+
type: Array,
|
|
41
|
+
attribute: "options"
|
|
42
|
+
})], d.prototype, "_optionsProp", void 0), r([n()], d.prototype, "_options", void 0);
|
|
43
|
+
//#endregion
|
|
44
|
+
//#region src/components/select/select.ts
|
|
45
|
+
var f = class extends d {
|
|
46
|
+
constructor() {
|
|
47
|
+
super(), this.inputRef = c(), this.value = "", this.selectedIndex = -1, this.selectedOptions = void 0, this.optionsController = new u(this);
|
|
48
|
+
}
|
|
49
|
+
connectedCallback() {
|
|
50
|
+
super.connectedCallback(), this.parseOptions(), this._options.forEach((e) => {
|
|
51
|
+
e.selected && !this.value && (this.value = e.value);
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
add(e, t) {
|
|
55
|
+
let n = {
|
|
56
|
+
value: e.value || e.text,
|
|
57
|
+
label: e.text || e.value,
|
|
58
|
+
selected: e.selected,
|
|
59
|
+
disabled: e.disabled
|
|
60
|
+
};
|
|
61
|
+
if (t === void 0) this._options.push(n);
|
|
62
|
+
else if (typeof t == "number") this._options.splice(t, 0, n);
|
|
63
|
+
else {
|
|
64
|
+
let e = t.value || t.text, r = this._options.findIndex((t) => t.value === e);
|
|
65
|
+
r >= 0 ? this._options.splice(r, 0, n) : this._options.push(n);
|
|
66
|
+
}
|
|
67
|
+
e.selected && (this.value = e.value || e.text, this.selectedIndex = this._options.findIndex((e) => e.value === this.value)), this.requestUpdate();
|
|
68
|
+
}
|
|
69
|
+
remove(e) {
|
|
70
|
+
typeof e == "number" && (this.selectedIndex === e && (this.value = this._options[0]?.value || ""), this._options.splice(e, 1), this.requestUpdate());
|
|
71
|
+
}
|
|
72
|
+
item(e) {
|
|
73
|
+
return this.inputRef.value?.item(e);
|
|
74
|
+
}
|
|
75
|
+
namedItem(e) {
|
|
76
|
+
return this.inputRef.value?.namedItem(e);
|
|
77
|
+
}
|
|
78
|
+
showPicker() {
|
|
79
|
+
this.inputRef.value && "showPicker" in this.inputRef.value && this.inputRef.value.showPicker();
|
|
80
|
+
}
|
|
81
|
+
attributeChangedCallback(e, t, n) {
|
|
82
|
+
e === "options" && (this._options = n ? JSON.parse(n) : []), e === "value" && this.value !== t && (this.selectedIndex = this.touched ? this.returnNumberOrNull(this.inputRef.value?.selectedIndex) : this._options.findIndex((e) => e.value === n), this.selectedOptions = this.inputRef.value?.selectedOptions, this.valueChanged(n, t)), super.attributeChangedCallback(e, t, n);
|
|
83
|
+
}
|
|
84
|
+
update(e) {
|
|
85
|
+
super.update(e), e.has("_optionsProp") && this._optionsProp.length > 0 && (this._options = this._optionsProp, this.requestUpdate("_options"), !this.value && this._options.length > 0 && (this.value = this._options[0].value, this.selectedIndex = 0)), e.has("value") && this.value !== e.get("value") && (this.selectedIndex = this.touched ? this.returnNumberOrNull(this.inputRef.value?.selectedIndex) : this._options.findIndex((e) => e.value === this.value), this.selectedOptions = this.inputRef.value?.selectedOptions, this.valueChanged(this.value, e.get("value"))), e.has("id") && !this.name && this.id && (this.name = this.id);
|
|
86
|
+
}
|
|
87
|
+
firstUpdated(e) {
|
|
88
|
+
super.firstUpdated(e), this._optionsProp.length && (this._options = this._optionsProp), !this.value && this._options.length > 0 ? (this.value = this._options[0].value, this.selectedIndex = 0) : this.selectedIndex = this._options.findIndex((e) => e.value === this.value), this.selectedOptions = this.inputRef.value?.selectedOptions;
|
|
89
|
+
}
|
|
90
|
+
render() {
|
|
91
|
+
let e = `pkt-input ${this.fullwidth ? "pkt-input--fullwidth" : ""}`;
|
|
92
|
+
return t`
|
|
93
|
+
<pkt-input-wrapper
|
|
94
|
+
?counter=${this.counter}
|
|
95
|
+
?disabled=${this.disabled}
|
|
96
|
+
?hasError=${this.hasError}
|
|
97
|
+
?hasFieldset=${this.hasFieldset}
|
|
98
|
+
?inline=${this.inline}
|
|
99
|
+
?optionalTag=${this.optionalTag}
|
|
100
|
+
?requiredTag=${this.requiredTag}
|
|
101
|
+
useWrapper=${this.useWrapper}
|
|
102
|
+
ariaDescribedBy=${o(this.ariaDescribedBy)}
|
|
103
|
+
class="pkt-select"
|
|
104
|
+
errorMessage=${o(this.errorMessage)}
|
|
105
|
+
forId=${this.id + "-input"}
|
|
106
|
+
helptext=${o(this.helptext)}
|
|
107
|
+
helptextDropdown=${o(this.helptextDropdown)}
|
|
108
|
+
helptextDropdownButton=${o(this.helptextDropdownButton)}
|
|
109
|
+
label=${o(this.label)}
|
|
110
|
+
optionalText=${o(this.optionalText)}
|
|
111
|
+
requiredText=${o(this.requiredText)}
|
|
112
|
+
tagText=${o(this.tagText)}
|
|
113
|
+
>
|
|
114
|
+
<select
|
|
115
|
+
class=${e}
|
|
116
|
+
aria-invalid=${this.hasError}
|
|
117
|
+
aria-errormessage=${`${this.id}-error`}
|
|
118
|
+
aria-labelledby=${o(this.ariaLabelledby)}
|
|
119
|
+
?disabled=${this.disabled}
|
|
120
|
+
id=${this.id + "-input"}
|
|
121
|
+
name=${(this.name || this.id) + "-input"}
|
|
122
|
+
value=${this.value}
|
|
123
|
+
@change=${(e) => {
|
|
124
|
+
this.touched = !0, this.value = e.target.value, e.stopImmediatePropagation();
|
|
125
|
+
}}
|
|
126
|
+
@input=${(e) => {
|
|
127
|
+
this.onInput(), e.stopImmediatePropagation();
|
|
128
|
+
}}
|
|
129
|
+
@focus=${(e) => {
|
|
130
|
+
this.onFocus(), e.stopImmediatePropagation();
|
|
131
|
+
}}
|
|
132
|
+
@blur=${(e) => {
|
|
133
|
+
this.onBlur(), e.stopImmediatePropagation();
|
|
134
|
+
}}
|
|
135
|
+
${s(this.inputRef)}
|
|
136
|
+
>
|
|
137
|
+
${this._options.length > 0 ? this._options.map((e) => t`<option
|
|
138
|
+
value=${e.value}
|
|
139
|
+
?selected=${this.value == e.value || e.selected}
|
|
140
|
+
?disabled=${e.disabled}
|
|
141
|
+
?hidden=${e.hidden}
|
|
142
|
+
>
|
|
143
|
+
${e.label}
|
|
144
|
+
</option>`) : ""}
|
|
145
|
+
</select>
|
|
146
|
+
<div class="pkt-contents" slot="helptext">${a(this, "helptext")}</div>
|
|
147
|
+
</pkt-input-wrapper>
|
|
148
|
+
`;
|
|
149
|
+
}
|
|
150
|
+
returnNumberOrNull(e) {
|
|
151
|
+
return e == null || isNaN(e) ? null : e;
|
|
152
|
+
}
|
|
153
|
+
};
|
|
154
|
+
r([i({ type: String })], f.prototype, "value", void 0);
|
|
155
|
+
try {
|
|
156
|
+
e("pkt-select")(f);
|
|
157
|
+
} catch {
|
|
158
|
+
console.warn("Forsøker å definere <pkt-select>, men den er allerede definert");
|
|
159
|
+
}
|
|
160
|
+
//#endregion
|
|
161
|
+
//#region src/components/select/index.ts
|
|
162
|
+
var p = f;
|
|
163
|
+
//#endregion
|
|
164
|
+
export { f as n, p as t };
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
const e=require(`./element-DjtxO-1r.cjs`),t=require(`./element-with-slot-CWoTGA1B.cjs`),n=require(`./if-defined-XKOD_t_V.cjs`),r=require(`./ref-BaJ0mBT_.cjs`),i=require(`./input-element-B1yxcfz4.cjs`),a=require(`./pkt-options-controller-CXUGx134.cjs`);require(`./input-wrapper-BRuVELpK.cjs`);var o=class extends i.t{constructor(...e){super(...e),this._optionsProp=[],this._options=[]}get options(){return this._options.map(e=>({...e,selected:this.isOptionSelected(e)}))}set options(e){this._optionsProp=e,this.requestUpdate(`_optionsProp`,this._options)}isOptionSelected(e){return Array.isArray(this.value)?this.value.includes(e.value):e.value===this.value}findOptionByValue(e){return this._options.find(t=>t.value===e)}getSelectedOptions(){return this._options.filter(e=>this.isOptionSelected(e))}parseOptions(){let e=this._optionsProp.length>0,t=this.optionsController?.nodes?.length&&this.optionsController.nodes.length>0;e?this._options=this._optionsProp:t&&(this._options=this.optionsController.options)}willUpdate(e){super.willUpdate(e),this.parseOptions()}};e.r([e.s({type:Array,attribute:`options`})],o.prototype,`_optionsProp`,void 0),e.r([e.o()],o.prototype,`_options`,void 0);var s=class extends o{constructor(){super(),this.inputRef=r.t(),this.value=``,this.selectedIndex=-1,this.selectedOptions=void 0,this.optionsController=new a.t(this)}connectedCallback(){super.connectedCallback(),this.parseOptions(),this._options.forEach(e=>{e.selected&&!this.value&&(this.value=e.value)})}add(e,t){let n={value:e.value||e.text,label:e.text||e.value,selected:e.selected,disabled:e.disabled};if(t===void 0)this._options.push(n);else if(typeof t==`number`)this._options.splice(t,0,n);else{let e=t.value||t.text,r=this._options.findIndex(t=>t.value===e);r>=0?this._options.splice(r,0,n):this._options.push(n)}e.selected&&(this.value=e.value||e.text,this.selectedIndex=this._options.findIndex(e=>e.value===this.value)),this.requestUpdate()}remove(e){typeof e==`number`&&(this.selectedIndex===e&&(this.value=this._options[0]?.value||``),this._options.splice(e,1),this.requestUpdate())}item(e){return this.inputRef.value?.item(e)}namedItem(e){return this.inputRef.value?.namedItem(e)}showPicker(){this.inputRef.value&&`showPicker`in this.inputRef.value&&this.inputRef.value.showPicker()}attributeChangedCallback(e,t,n){e===`options`&&(this._options=n?JSON.parse(n):[]),e===`value`&&this.value!==t&&(this.selectedIndex=this.touched?this.returnNumberOrNull(this.inputRef.value?.selectedIndex):this._options.findIndex(e=>e.value===n),this.selectedOptions=this.inputRef.value?.selectedOptions,this.valueChanged(n,t)),super.attributeChangedCallback(e,t,n)}update(e){super.update(e),e.has(`_optionsProp`)&&this._optionsProp.length>0&&(this._options=this._optionsProp,this.requestUpdate(`_options`),!this.value&&this._options.length>0&&(this.value=this._options[0].value,this.selectedIndex=0)),e.has(`value`)&&this.value!==e.get(`value`)&&(this.selectedIndex=this.touched?this.returnNumberOrNull(this.inputRef.value?.selectedIndex):this._options.findIndex(e=>e.value===this.value),this.selectedOptions=this.inputRef.value?.selectedOptions,this.valueChanged(this.value,e.get(`value`))),e.has(`id`)&&!this.name&&this.id&&(this.name=this.id)}firstUpdated(e){super.firstUpdated(e),this._optionsProp.length&&(this._options=this._optionsProp),!this.value&&this._options.length>0?(this.value=this._options[0].value,this.selectedIndex=0):this.selectedIndex=this._options.findIndex(e=>e.value===this.value),this.selectedOptions=this.inputRef.value?.selectedOptions}render(){let i=`pkt-input ${this.fullwidth?`pkt-input--fullwidth`:``}`;return e.d`
|
|
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=${n.t(this.ariaDescribedBy)}
|
|
12
|
+
class="pkt-select"
|
|
13
|
+
errorMessage=${n.t(this.errorMessage)}
|
|
14
|
+
forId=${this.id+`-input`}
|
|
15
|
+
helptext=${n.t(this.helptext)}
|
|
16
|
+
helptextDropdown=${n.t(this.helptextDropdown)}
|
|
17
|
+
helptextDropdownButton=${n.t(this.helptextDropdownButton)}
|
|
18
|
+
label=${n.t(this.label)}
|
|
19
|
+
optionalText=${n.t(this.optionalText)}
|
|
20
|
+
requiredText=${n.t(this.requiredText)}
|
|
21
|
+
tagText=${n.t(this.tagText)}
|
|
22
|
+
>
|
|
23
|
+
<select
|
|
24
|
+
class=${i}
|
|
25
|
+
aria-invalid=${this.hasError}
|
|
26
|
+
aria-errormessage=${`${this.id}-error`}
|
|
27
|
+
aria-labelledby=${n.t(this.ariaLabelledby)}
|
|
28
|
+
?disabled=${this.disabled}
|
|
29
|
+
id=${this.id+`-input`}
|
|
30
|
+
name=${(this.name||this.id)+`-input`}
|
|
31
|
+
value=${this.value}
|
|
32
|
+
@change=${e=>{this.touched=!0,this.value=e.target.value,e.stopImmediatePropagation()}}
|
|
33
|
+
@input=${e=>{this.onInput(),e.stopImmediatePropagation()}}
|
|
34
|
+
@focus=${e=>{this.onFocus(),e.stopImmediatePropagation()}}
|
|
35
|
+
@blur=${e=>{this.onBlur(),e.stopImmediatePropagation()}}
|
|
36
|
+
${r.n(this.inputRef)}
|
|
37
|
+
>
|
|
38
|
+
${this._options.length>0?this._options.map(t=>e.d`<option
|
|
39
|
+
value=${t.value}
|
|
40
|
+
?selected=${this.value==t.value||t.selected}
|
|
41
|
+
?disabled=${t.disabled}
|
|
42
|
+
?hidden=${t.hidden}
|
|
43
|
+
>
|
|
44
|
+
${t.label}
|
|
45
|
+
</option>`):``}
|
|
46
|
+
</select>
|
|
47
|
+
<div class="pkt-contents" slot="helptext">${t.n(this,`helptext`)}</div>
|
|
48
|
+
</pkt-input-wrapper>
|
|
49
|
+
`}returnNumberOrNull(e){return e==null||isNaN(e)?null:e}};e.r([e.s({type:String})],s.prototype,`value`,void 0);try{e.c(`pkt-select`)(s)}catch{console.warn(`Forsøker å definere <pkt-select>, men den er allerede definert`)}var c=s;Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return c}});
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
const e=require(`./element-DjtxO-1r.cjs`),t=require(`./element-with-slot-CWoTGA1B.cjs`),n=require(`./if-defined-XKOD_t_V.cjs`),r=require(`./ref-BaJ0mBT_.cjs`);var i=class extends Event{constructor(e,t,n,r){super(`context-request`,{bubbles:!0,composed:!0}),this.context=e,this.contextTarget=t,this.callback=n,this.subscribe=r??!1}};function a(e){return e}var o=class{constructor(e,t,n,r){if(this.subscribe=!1,this.provided=!1,this.value=void 0,this.t=(e,t)=>{this.unsubscribe&&(this.unsubscribe!==t&&(this.provided=!1,this.unsubscribe()),this.subscribe||this.unsubscribe()),this.value=e,this.host.requestUpdate(),this.provided&&!this.subscribe||(this.provided=!0,this.callback&&this.callback(e,t)),this.unsubscribe=t},this.host=e,t.context!==void 0){let e=t;this.context=e.context,this.callback=e.callback,this.subscribe=e.subscribe??!1}else this.context=t,this.callback=n,this.subscribe=r??!1;this.host.addController(this)}hostConnected(){this.dispatchRequest()}hostDisconnected(){this.unsubscribe&&=(this.unsubscribe(),void 0)}dispatchRequest(){this.host.dispatchEvent(new i(this.context,this.host,this.t,this.subscribe))}},s=class{get value(){return this.o}set value(e){this.setValue(e)}setValue(e,t=!1){let n=t||!Object.is(e,this.o);this.o=e,n&&this.updateObservers()}constructor(e){this.subscriptions=new Map,this.updateObservers=()=>{for(let[e,{disposer:t}]of this.subscriptions)e(this.o,t)},e!==void 0&&(this.value=e)}addCallback(e,t,n){if(!n)return void e(this.value);this.subscriptions.has(e)||this.subscriptions.set(e,{disposer:()=>{this.subscriptions.delete(e)},consumerHost:t});let{disposer:r}=this.subscriptions.get(e);e(this.value,r)}clearCallbacks(){this.subscriptions.clear()}},c=class extends Event{constructor(e,t){super(`context-provider`,{bubbles:!0,composed:!0}),this.context=e,this.contextTarget=t}},l=class extends s{constructor(e,t,n){super(t.context===void 0?n:t.initialValue),this.onContextRequest=e=>{if(e.context!==this.context)return;let t=e.contextTarget??e.composedPath()[0];t!==this.host&&(e.stopPropagation(),this.addCallback(e.callback,t,e.subscribe))},this.onProviderRequest=e=>{if(e.context!==this.context||(e.contextTarget??e.composedPath()[0])===this.host)return;let t=new Set;for(let[e,{consumerHost:n}]of this.subscriptions)t.has(e)||(t.add(e),n.dispatchEvent(new i(this.context,n,e,!0)));e.stopPropagation()},this.host=e,t.context===void 0?this.context=t:this.context=t.context,this.attachListeners(),this.host.addController?.(this)}attachListeners(){this.host.addEventListener(`context-request`,this.onContextRequest),this.host.addEventListener(`context-provider`,this.onProviderRequest)}hostConnected(){this.host.dispatchEvent(new c(this.context,this.host))}};function u({context:e}){return(t,n)=>{let r=new WeakMap;if(typeof n==`object`)return{get(){return t.get.call(this)},set(e){return r.get(this).setValue(e),t.set.call(this,e)},init(t){return r.set(this,new l(this,{context:e,initialValue:t})),t}};{t.constructor.addInitializer((t=>{r.set(t,new l(t,{context:e}))}));let i=Object.getOwnPropertyDescriptor(t,n),a;if(i===void 0){let e=new WeakMap;a={get(){return e.get(this)},set(t){r.get(this).setValue(t),e.set(this,t)},configurable:!0,enumerable:!0}}else{let e=i.set;a={...i,set(t){r.get(this).setValue(t),e?.call(this,t)}}}Object.defineProperty(t,n,a);return}}}function d({context:e,subscribe:t}){return(n,r)=>{typeof r==`object`?r.addInitializer((function(){new o(this,{context:e,callback:e=>{n.set.call(this,e)},subscribe:t})})):n.constructor.addInitializer((n=>{new o(n,{context:e,callback:e=>{n[r]=e},subscribe:t})}))}}var f=a(Symbol(`pkt-tabs-context`)),p=class extends t.t{constructor(...e){super(...e),this.arrowNav=!0,this.disableArrowNav=!1,this.tabRefs=[],this.tabCount=0,this.context={useArrowNav:this.useArrowNav,registerTab:this.registerTab.bind(this),handleClick:this.handleClick.bind(this),handleKeyUp:this.handleKeyUp.bind(this)}}get useArrowNav(){return this.arrowNav&&!this.disableArrowNav}updated(e){(e.has(`arrowNav`)||e.has(`disableArrowNav`))&&(this.context={...this.context,useArrowNav:this.useArrowNav})}registerTab(e,t){this.tabRefs[t]=e,this.tabCount=Math.max(this.tabCount,t+1)}handleClick(e){this.dispatchEvent(new CustomEvent(`tab-selected`,{detail:{index:e},bubbles:!0,composed:!0}))}handleKeyUp(e,t){this.useArrowNav&&(e.code===`ArrowLeft`&&t!==0&&this.tabRefs[t-1]?.focus(),e.code===`ArrowRight`&&t<this.tabCount-1&&this.tabRefs[t+1]?.focus(),(e.code===`ArrowDown`||e.code===`Space`)&&this.dispatchEvent(new CustomEvent(`tab-selected`,{detail:{index:t},bubbles:!0,composed:!0})))}render(){return e.d`
|
|
2
|
+
<div class="pkt-tabs">
|
|
3
|
+
<div class="pkt-tabs__list" role=${this.useArrowNav?`tablist`:`navigation`}>${t.n(this)}</div>
|
|
4
|
+
</div>
|
|
5
|
+
`}};e.r([e.s({type:Boolean,reflect:!0,attribute:`arrow-nav`})],p.prototype,`arrowNav`,void 0),e.r([e.s({type:Boolean,reflect:!0,attribute:`disable-arrow-nav`})],p.prototype,`disableArrowNav`,void 0),e.r([e.o()],p.prototype,`tabRefs`,void 0),e.r([e.o()],p.prototype,`tabCount`,void 0),e.r([u({context:f}),e.o()],p.prototype,`context`,void 0);try{e.c(`pkt-tabs`)(p)}catch{console.warn(`Forsøker å definere <pkt-tabs>, men den er allerede definert`)}var m=class extends t.t{constructor(){super(),this.active=!1,this.href=``,this.icon=``,this.controls=``,this.tag=``,this.tagSkin=`blue`,this.index=0,this.elementRef=r.t()}connectedCallback(){super.connectedCallback(),this.updateComplete.then(()=>{this.elementRef.value&&this.context&&this.context.registerTab(this.elementRef.value,this.index)})}handleClick(){this.context&&this.context.handleClick(this.index)}handleKeyUp(e){this.context&&this.context.handleKeyUp(e,this.index)}render(){let i=this.context?.useArrowNav??!0,a=this.active?`active`:``,o=i?`tab`:void 0,s=i?this.active:void 0,c=this.active||!i?void 0:-1,l=e.d`
|
|
6
|
+
${this.icon?e.d`<pkt-icon name=${this.icon} class="pkt-icon--small"></pkt-icon>`:``}
|
|
7
|
+
<span>${t.n(this)}</span>
|
|
8
|
+
${this.tag?e.d`<pkt-tag skin=${this.tagSkin} size="small">${this.tag}</pkt-tag>`:``}
|
|
9
|
+
`;return this.href?e.d`
|
|
10
|
+
<a
|
|
11
|
+
${r.n(this.elementRef)}
|
|
12
|
+
href=${this.href}
|
|
13
|
+
class="pkt-tabs__link ${a}"
|
|
14
|
+
role=${n.t(o)}
|
|
15
|
+
aria-selected=${n.t(s)}
|
|
16
|
+
aria-controls=${n.t(this.controls||void 0)}
|
|
17
|
+
tabindex=${n.t(c)}
|
|
18
|
+
@click=${this.handleClick}
|
|
19
|
+
@keyup=${this.handleKeyUp}
|
|
20
|
+
>
|
|
21
|
+
${l}
|
|
22
|
+
</a>
|
|
23
|
+
`:e.d`
|
|
24
|
+
<button
|
|
25
|
+
${r.n(this.elementRef)}
|
|
26
|
+
type="button"
|
|
27
|
+
class="pkt-tabs__button pkt-link-button ${a}"
|
|
28
|
+
role=${n.t(o)}
|
|
29
|
+
aria-selected=${n.t(s)}
|
|
30
|
+
aria-controls=${n.t(this.controls||void 0)}
|
|
31
|
+
tabindex=${n.t(c)}
|
|
32
|
+
@click=${this.handleClick}
|
|
33
|
+
@keyup=${this.handleKeyUp}
|
|
34
|
+
>
|
|
35
|
+
${l}
|
|
36
|
+
</button>
|
|
37
|
+
`}};e.r([e.s({type:Boolean,reflect:!0})],m.prototype,`active`,void 0),e.r([e.s({type:String,reflect:!0})],m.prototype,`href`,void 0),e.r([e.s({type:String,reflect:!0})],m.prototype,`icon`,void 0),e.r([e.s({type:String,reflect:!0})],m.prototype,`controls`,void 0),e.r([e.s({type:String,reflect:!0})],m.prototype,`tag`,void 0),e.r([e.s({type:String,reflect:!0,attribute:`tag-skin`})],m.prototype,`tagSkin`,void 0),e.r([e.s({type:Number,reflect:!0})],m.prototype,`index`,void 0),e.r([d({context:f,subscribe:!0}),e.s({attribute:!1})],m.prototype,`context`,void 0);try{e.c(`pkt-tab-item`)(m)}catch{console.warn(`Forsøker å definere <pkt-tab-item>, men den er allerede definert`)}var h=p;Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return m}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return p}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return h}});
|