@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,23 +1,23 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { t as d, A as a, b as p, n } from "./element-CPpT3rFQ.js";
|
|
2
2
|
import { o as l } from "./if-defined-B0krMLad.js";
|
|
3
3
|
import { r as m } from "./state-C_1EOo3D.js";
|
|
4
4
|
import { e as $, n as f } from "./ref-Bg_Swj5w.js";
|
|
5
5
|
import { e as g } from "./class-map-CEnykyO_.js";
|
|
6
6
|
import { P as x } from "./input-element-8nLwuQS4.js";
|
|
7
7
|
import { s as v } from "./element-with-slot-Dqk6-TRR.js";
|
|
8
|
-
import "./input-wrapper-
|
|
9
|
-
import "./icon-
|
|
10
|
-
var y = Object.defineProperty,
|
|
11
|
-
for (var
|
|
12
|
-
(
|
|
13
|
-
return t &&
|
|
8
|
+
import "./input-wrapper-Bs4CRNst.js";
|
|
9
|
+
import "./icon-CxQcIa5F.js";
|
|
10
|
+
var y = Object.defineProperty, r = (c, i, e, o) => {
|
|
11
|
+
for (var t = void 0, h = c.length - 1, u; h >= 0; h--)
|
|
12
|
+
(u = c[h]) && (t = u(i, e, t) || t);
|
|
13
|
+
return t && y(i, e, t), t;
|
|
14
14
|
};
|
|
15
|
-
|
|
15
|
+
class s extends x {
|
|
16
16
|
constructor() {
|
|
17
17
|
super(...arguments), this.inputRef = $(), this.value = "", this.type = "text", this.size = null, this.autocomplete = null, this.iconNameRight = null, this.prefix = null, this.suffix = null, this.omitSearchIcon = !1, this.counterCurrent = 0;
|
|
18
18
|
}
|
|
19
|
-
attributeChangedCallback(i, e,
|
|
20
|
-
i === "value" && this.value !== e && (this.counterCurrent =
|
|
19
|
+
attributeChangedCallback(i, e, o) {
|
|
20
|
+
i === "value" && this.value !== e && (this.counterCurrent = o ? o.length : 0, this.valueChanged(o, e)), super.attributeChangedCallback(i, e, o);
|
|
21
21
|
}
|
|
22
22
|
updated(i) {
|
|
23
23
|
var e;
|
|
@@ -28,8 +28,8 @@ let s = class extends x {
|
|
|
28
28
|
"pkt-input": !0,
|
|
29
29
|
"pkt-input--fullwidth": this.fullwidth,
|
|
30
30
|
"pkt-input--counter-error": this.counter && this.counterMaxLength && this.value.length && this.value.length > this.counterMaxLength
|
|
31
|
-
}),
|
|
32
|
-
return
|
|
31
|
+
}), o = this.ariaLabelledby || `${this.id}-input-label`;
|
|
32
|
+
return p`
|
|
33
33
|
<pkt-input-wrapper
|
|
34
34
|
label="${this.label}"
|
|
35
35
|
?counter=${this.counter}
|
|
@@ -56,7 +56,7 @@ let s = class extends x {
|
|
|
56
56
|
>
|
|
57
57
|
<div class="pkt-contents" slot="helptext">${v(this, "helptext")}</div>
|
|
58
58
|
<div class="pkt-input__container">
|
|
59
|
-
${this.prefix ?
|
|
59
|
+
${this.prefix ? p`<div class="pkt-input-prefix">${this.prefix}</div>` : a}
|
|
60
60
|
<input
|
|
61
61
|
${f(this.inputRef)}
|
|
62
62
|
class=${e}
|
|
@@ -64,7 +64,7 @@ let s = class extends x {
|
|
|
64
64
|
name=${(this.name || this.id) + "-input"}
|
|
65
65
|
id=${this.id + "-input"}
|
|
66
66
|
placeholder=${l(this.placeholder)}
|
|
67
|
-
aria-labelledby=${
|
|
67
|
+
aria-labelledby=${o}
|
|
68
68
|
autocomplete=${this.autocomplete || "off"}
|
|
69
69
|
minlength=${l(this.minlength || void 0)}
|
|
70
70
|
maxlength=${l(this.maxlength || void 0)}
|
|
@@ -72,7 +72,7 @@ let s = class extends x {
|
|
|
72
72
|
max=${l(this.max || void 0)}
|
|
73
73
|
step=${l(this.step || void 0)}
|
|
74
74
|
?readonly=${this.readonly}
|
|
75
|
-
size=${this.size ||
|
|
75
|
+
size=${this.size || a}
|
|
76
76
|
.value=${this.value}
|
|
77
77
|
?disabled=${this.disabled}
|
|
78
78
|
aria-invalid=${this.hasError}
|
|
@@ -90,61 +90,63 @@ let s = class extends x {
|
|
|
90
90
|
this.value = t.target.value, this.onBlur(), t.stopImmediatePropagation();
|
|
91
91
|
}}
|
|
92
92
|
@keydown=${(t) => {
|
|
93
|
-
var
|
|
93
|
+
var h;
|
|
94
94
|
if (t.key === "Enter") {
|
|
95
95
|
const u = this.internals.form;
|
|
96
|
-
u ? u.requestSubmit() : (
|
|
96
|
+
u ? u.requestSubmit() : (h = this.inputRef.value) == null || h.blur();
|
|
97
97
|
}
|
|
98
98
|
}}
|
|
99
99
|
/>
|
|
100
|
-
${this.suffix ?
|
|
100
|
+
${this.suffix ? p`<div class="pkt-input-suffix">
|
|
101
101
|
${this.suffix}
|
|
102
|
-
${this.iconNameRight ?
|
|
102
|
+
${this.iconNameRight ? p`<pkt-icon
|
|
103
103
|
class="pkt-input-suffix-icon"
|
|
104
104
|
name=${this.iconNameRight}
|
|
105
|
-
></pkt-icon>` :
|
|
106
|
-
${i ?
|
|
105
|
+
></pkt-icon>` : a}
|
|
106
|
+
${i ? p`<pkt-icon
|
|
107
107
|
class="pkt-input-suffix-icon"
|
|
108
108
|
name="magnifying-glass-big"
|
|
109
|
-
></pkt-icon>` :
|
|
110
|
-
</div>` :
|
|
111
|
-
${!this.suffix && this.iconNameRight ?
|
|
112
|
-
${!this.suffix && i ?
|
|
109
|
+
></pkt-icon>` : a}
|
|
110
|
+
</div>` : a}
|
|
111
|
+
${!this.suffix && this.iconNameRight ? p`<pkt-icon class="pkt-input-icon" name=${this.iconNameRight}></pkt-icon>` : a}
|
|
112
|
+
${!this.suffix && i ? p`<pkt-icon class="pkt-input-icon" name="magnifying-glass-big"></pkt-icon>` : a}
|
|
113
113
|
</div>
|
|
114
114
|
</pkt-input-wrapper>
|
|
115
115
|
`;
|
|
116
116
|
}
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
], s.prototype, "value"
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
], s.prototype, "type"
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
], s.prototype, "size"
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
], s.prototype, "autocomplete"
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
], s.prototype, "iconNameRight"
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
], s.prototype, "prefix"
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
], s.prototype, "suffix"
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
], s.prototype, "omitSearchIcon"
|
|
142
|
-
|
|
117
|
+
}
|
|
118
|
+
r([
|
|
119
|
+
n({ type: String, reflect: !0 })
|
|
120
|
+
], s.prototype, "value");
|
|
121
|
+
r([
|
|
122
|
+
n({ type: String })
|
|
123
|
+
], s.prototype, "type");
|
|
124
|
+
r([
|
|
125
|
+
n({ type: Number })
|
|
126
|
+
], s.prototype, "size");
|
|
127
|
+
r([
|
|
128
|
+
n({ type: String })
|
|
129
|
+
], s.prototype, "autocomplete");
|
|
130
|
+
r([
|
|
131
|
+
n({ type: String })
|
|
132
|
+
], s.prototype, "iconNameRight");
|
|
133
|
+
r([
|
|
134
|
+
n({ type: String })
|
|
135
|
+
], s.prototype, "prefix");
|
|
136
|
+
r([
|
|
137
|
+
n({ type: String })
|
|
138
|
+
], s.prototype, "suffix");
|
|
139
|
+
r([
|
|
140
|
+
n({ type: Boolean })
|
|
141
|
+
], s.prototype, "omitSearchIcon");
|
|
142
|
+
r([
|
|
143
143
|
m()
|
|
144
|
-
], s.prototype, "counterCurrent"
|
|
145
|
-
|
|
146
|
-
d("pkt-textinput")
|
|
147
|
-
|
|
144
|
+
], s.prototype, "counterCurrent");
|
|
145
|
+
try {
|
|
146
|
+
d("pkt-textinput")(s);
|
|
147
|
+
} catch {
|
|
148
|
+
console.warn("Forsøker å definere <pkt-textinput>, men den er allerede definert");
|
|
149
|
+
}
|
|
148
150
|
export {
|
|
149
151
|
s as P
|
|
150
152
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oslokommune/punkt-elements",
|
|
3
|
-
"version": "16.7.
|
|
3
|
+
"version": "16.7.3",
|
|
4
4
|
"description": "Komponentbiblioteket til Punkt, et designsystem laget av Oslo Origo",
|
|
5
5
|
"homepage": "https://punkt.oslo.kommune.no",
|
|
6
6
|
"author": "Team Designsystem, Oslo Origo",
|
|
@@ -78,5 +78,5 @@
|
|
|
78
78
|
"url": "https://github.com/oslokommune/punkt/issues"
|
|
79
79
|
},
|
|
80
80
|
"license": "MIT",
|
|
81
|
-
"gitHead": "
|
|
81
|
+
"gitHead": "0f6fe32d4c462b5b2931a2dd042123552cec77fa"
|
|
82
82
|
}
|
|
@@ -15,7 +15,6 @@ export interface IPktAccordion {
|
|
|
15
15
|
*/
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
@customElement('pkt-accordion')
|
|
19
18
|
export class PktAccordion extends LitElement implements IPktAccordion {
|
|
20
19
|
// Properties
|
|
21
20
|
@property({ type: String, reflect: true, attribute: 'aria-labelledby' }) ariaLabelledBy: string =
|
|
@@ -81,3 +80,9 @@ export class PktAccordion extends LitElement implements IPktAccordion {
|
|
|
81
80
|
}
|
|
82
81
|
|
|
83
82
|
export default PktAccordion
|
|
83
|
+
|
|
84
|
+
try {
|
|
85
|
+
customElement('pkt-accordion')(PktAccordion)
|
|
86
|
+
} catch (e) {
|
|
87
|
+
console.warn('Forsøker å definere <pkt-accordion>, men den er allerede definert')
|
|
88
|
+
}
|
|
@@ -24,7 +24,6 @@ export interface IPktAccordionItem {
|
|
|
24
24
|
name?: string | undefined
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
@customElement('pkt-accordion-item')
|
|
28
27
|
export class PktAccordionItem extends PktElementWithSlot implements IPktAccordionItem {
|
|
29
28
|
@property({ type: Boolean }) defaultOpen: boolean = false
|
|
30
29
|
@property({ type: String }) title: string = ''
|
|
@@ -81,3 +80,9 @@ export class PktAccordionItem extends PktElementWithSlot implements IPktAccordio
|
|
|
81
80
|
}
|
|
82
81
|
|
|
83
82
|
export default PktAccordionItem
|
|
83
|
+
|
|
84
|
+
try {
|
|
85
|
+
customElement('pkt-accordion-item')(PktAccordionItem)
|
|
86
|
+
} catch (e) {
|
|
87
|
+
console.warn('Forsøker å definere <pkt-accordion-item>, men den er allerede definert')
|
|
88
|
+
}
|
|
@@ -22,7 +22,6 @@ export interface IPktAlert {
|
|
|
22
22
|
compact?: boolean
|
|
23
23
|
role?: string
|
|
24
24
|
}
|
|
25
|
-
@customElement('pkt-alert')
|
|
26
25
|
export class PktAlert extends PktElementWithSlot implements IPktAlert {
|
|
27
26
|
constructor() {
|
|
28
27
|
super()
|
|
@@ -135,3 +134,9 @@ export class PktAlert extends PktElementWithSlot implements IPktAlert {
|
|
|
135
134
|
)
|
|
136
135
|
}
|
|
137
136
|
}
|
|
137
|
+
|
|
138
|
+
try {
|
|
139
|
+
customElement('pkt-alert')(PktAlert)
|
|
140
|
+
} catch (e) {
|
|
141
|
+
console.warn('Forsøker å definere <pkt-alert>, men den er allerede definert')
|
|
142
|
+
}
|
|
@@ -11,7 +11,6 @@ export interface IPktBackLink {
|
|
|
11
11
|
ariaLabel?: string
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
@customElement('pkt-backlink')
|
|
15
14
|
export class PktBackLink extends PktElement<IPktBackLink> implements IPktBackLink {
|
|
16
15
|
// Properties
|
|
17
16
|
|
|
@@ -52,3 +51,9 @@ export class PktBackLink extends PktElement<IPktBackLink> implements IPktBackLin
|
|
|
52
51
|
}
|
|
53
52
|
|
|
54
53
|
export default PktBackLink
|
|
54
|
+
|
|
55
|
+
try {
|
|
56
|
+
customElement('pkt-backlink')(PktBackLink)
|
|
57
|
+
} catch (e) {
|
|
58
|
+
console.warn('Forsøker å definere <pkt-backlink>, men den er allerede definert')
|
|
59
|
+
}
|
|
@@ -13,7 +13,6 @@ export interface IPktBreadcrumbs {
|
|
|
13
13
|
breadcrumbs: IBreadcrumbItem[]
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
@customElement('pkt-breadcrumbs')
|
|
17
16
|
export class PktBreadcrumbs extends PktElement implements IPktBreadcrumbs {
|
|
18
17
|
@property({ type: Array }) breadcrumbs: IBreadcrumbItem[] = []
|
|
19
18
|
|
|
@@ -93,3 +92,9 @@ export class PktBreadcrumbs extends PktElement implements IPktBreadcrumbs {
|
|
|
93
92
|
}
|
|
94
93
|
|
|
95
94
|
export default PktBreadcrumbs
|
|
95
|
+
|
|
96
|
+
try {
|
|
97
|
+
customElement('pkt-breadcrumbs')(PktBreadcrumbs)
|
|
98
|
+
} catch (e) {
|
|
99
|
+
console.warn('Forsøker å definere <pkt-breadcrumbs>, men den er allerede definert')
|
|
100
|
+
}
|
|
@@ -55,7 +55,6 @@ export interface IPktButton {
|
|
|
55
55
|
disabled?: Booleanish
|
|
56
56
|
loadingAnimationPath?: string
|
|
57
57
|
}
|
|
58
|
-
@customElement('pkt-button')
|
|
59
58
|
export class PktButton extends PktElementWithSlot<IPktButton> implements IPktButton {
|
|
60
59
|
|
|
61
60
|
// Properties
|
|
@@ -183,3 +182,9 @@ export class PktButton extends PktElementWithSlot<IPktButton> implements IPktBut
|
|
|
183
182
|
}
|
|
184
183
|
|
|
185
184
|
export default PktButton
|
|
185
|
+
|
|
186
|
+
try {
|
|
187
|
+
customElement('pkt-button')(PktButton)
|
|
188
|
+
} catch (e) {
|
|
189
|
+
console.warn('Forsøker å definere <pkt-button>, men den er allerede definert')
|
|
190
|
+
}
|
|
@@ -54,7 +54,6 @@ type TDayViewData = {
|
|
|
54
54
|
tabindex: string
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
-
@customElement('pkt-calendar')
|
|
58
57
|
export class PktCalendar extends PktElement {
|
|
59
58
|
// Selection properties
|
|
60
59
|
@property({ converter: converters.csvToArray })
|
|
@@ -718,3 +717,9 @@ export class PktCalendar extends PktElement {
|
|
|
718
717
|
)
|
|
719
718
|
}
|
|
720
719
|
}
|
|
720
|
+
|
|
721
|
+
try {
|
|
722
|
+
customElement('pkt-calendar')(PktCalendar)
|
|
723
|
+
} catch (e) {
|
|
724
|
+
console.warn('Forsøker å definere <pkt-calendar>, men den er allerede definert')
|
|
725
|
+
}
|
|
@@ -36,7 +36,6 @@ export interface IPktCard {
|
|
|
36
36
|
tags?: (Omit<IPktTag, 'closeTag'> & { text: string })[]
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
-
@customElement('pkt-card')
|
|
40
39
|
export class PktCard extends PktElementWithSlot implements IPktCard {
|
|
41
40
|
// Properties
|
|
42
41
|
|
|
@@ -260,3 +259,9 @@ export class PktCard extends PktElementWithSlot implements IPktCard {
|
|
|
260
259
|
`
|
|
261
260
|
}
|
|
262
261
|
}
|
|
262
|
+
|
|
263
|
+
try {
|
|
264
|
+
customElement('pkt-card')(PktCard)
|
|
265
|
+
} catch (e) {
|
|
266
|
+
console.warn('Forsøker å definere <pkt-card>, men den er allerede definert')
|
|
267
|
+
}
|
|
@@ -21,7 +21,6 @@ type Props = ElementProps<
|
|
|
21
21
|
| 'requiredText'
|
|
22
22
|
>
|
|
23
23
|
|
|
24
|
-
@customElement('pkt-checkbox')
|
|
25
24
|
export class PktCheckbox extends PktInputElement<Props> {
|
|
26
25
|
inputRef: Ref<HTMLInputElement> = createRef()
|
|
27
26
|
|
|
@@ -202,3 +201,9 @@ export class PktCheckbox extends PktInputElement<Props> {
|
|
|
202
201
|
}
|
|
203
202
|
}
|
|
204
203
|
}
|
|
204
|
+
|
|
205
|
+
try {
|
|
206
|
+
customElement('pkt-checkbox')(PktCheckbox)
|
|
207
|
+
} catch (e) {
|
|
208
|
+
console.warn('Forsøker å definere <pkt-checkbox>, men den er allerede definert')
|
|
209
|
+
}
|
|
@@ -62,7 +62,6 @@ declare global {
|
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
-
@customElement('pkt-combobox')
|
|
66
65
|
export class PktCombobox extends ComboboxHandlers implements IPktCombobox {
|
|
67
66
|
// Bound handler for body click — stored for cleanup in disconnectedCallback
|
|
68
67
|
private handleBodyClick = (e: MouseEvent) => {
|
|
@@ -498,3 +497,9 @@ export class PktCombobox extends ComboboxHandlers implements IPktCombobox {
|
|
|
498
497
|
}
|
|
499
498
|
|
|
500
499
|
export default PktCombobox
|
|
500
|
+
|
|
501
|
+
try {
|
|
502
|
+
customElement('pkt-combobox')(PktCombobox)
|
|
503
|
+
} catch (e) {
|
|
504
|
+
console.warn('Forsøker å definere <pkt-combobox>, men den er allerede definert')
|
|
505
|
+
}
|
|
@@ -58,7 +58,6 @@ export interface IPktConsent {
|
|
|
58
58
|
triggerText?: string | null
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
@customElement('pkt-consent')
|
|
62
61
|
export class PktConsent extends PktElement<IPktConsent> implements IPktConsent {
|
|
63
62
|
private _cookieEventHandler?: (consent: any) => void
|
|
64
63
|
|
|
@@ -189,3 +188,9 @@ export class PktConsent extends PktElement<IPktConsent> implements IPktConsent {
|
|
|
189
188
|
return html`<pkt-button @click=${this.openModal}>${this.triggerText}</pkt-button>`
|
|
190
189
|
}
|
|
191
190
|
}
|
|
191
|
+
|
|
192
|
+
try {
|
|
193
|
+
customElement('pkt-consent')(PktConsent)
|
|
194
|
+
} catch (e) {
|
|
195
|
+
console.warn('Forsøker å definere <pkt-consent>, men den er allerede definert')
|
|
196
|
+
}
|
|
@@ -22,7 +22,6 @@ export type TISODate = `${TYear}-${TMonth}-${TDay}`
|
|
|
22
22
|
* https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table
|
|
23
23
|
*/
|
|
24
24
|
|
|
25
|
-
@customElement('pkt-date-tags')
|
|
26
25
|
export class PktDateTags extends PktElement {
|
|
27
26
|
@property({ type: Array }) dates: TISODate[] = []
|
|
28
27
|
@property({ type: String }) dateformat: string = 'dd.MM.yyyy' // se kommentar over
|
|
@@ -58,3 +57,9 @@ export class PktDateTags extends PktElement {
|
|
|
58
57
|
`
|
|
59
58
|
}
|
|
60
59
|
}
|
|
60
|
+
|
|
61
|
+
try {
|
|
62
|
+
customElement('pkt-date-tags')(PktDateTags)
|
|
63
|
+
} catch (e) {
|
|
64
|
+
console.warn('Forsøker å definere <pkt-date-tags>, men den er allerede definert')
|
|
65
|
+
}
|
|
@@ -9,7 +9,6 @@ import { IDatepickerStrings, defaultSingleStrings } from './datepicker-types'
|
|
|
9
9
|
import { isIOS } from 'shared-utils/device-utils'
|
|
10
10
|
import '@/components/icon'
|
|
11
11
|
|
|
12
|
-
@customElement('pkt-datepicker-multiple')
|
|
13
12
|
export class PktDatepickerMultiple extends PktDatepickerBase {
|
|
14
13
|
@property({ type: Array })
|
|
15
14
|
value: string[] = []
|
|
@@ -94,3 +93,9 @@ export class PktDatepickerMultiple extends PktDatepickerBase {
|
|
|
94
93
|
`
|
|
95
94
|
}
|
|
96
95
|
}
|
|
96
|
+
|
|
97
|
+
try {
|
|
98
|
+
customElement('pkt-datepicker-multiple')(PktDatepickerMultiple)
|
|
99
|
+
} catch (e) {
|
|
100
|
+
console.warn('Forsøker å definere <pkt-datepicker-multiple>, men den er allerede definert')
|
|
101
|
+
}
|
|
@@ -8,7 +8,6 @@ import { formatISODate, newDate } from 'shared-utils/date-utils'
|
|
|
8
8
|
import { PktCalendar } from '../calendar/calendar'
|
|
9
9
|
import { calendarUtils } from './datepicker-utils'
|
|
10
10
|
|
|
11
|
-
@customElement('pkt-datepicker-popup')
|
|
12
11
|
export class PktDatepickerPopup extends PktElement {
|
|
13
12
|
@property({ type: Boolean, reflect: true }) open = false
|
|
14
13
|
@property({ type: Boolean }) multiple = false
|
|
@@ -178,3 +177,9 @@ export class PktDatepickerPopup extends PktElement {
|
|
|
178
177
|
`
|
|
179
178
|
}
|
|
180
179
|
}
|
|
180
|
+
|
|
181
|
+
try {
|
|
182
|
+
customElement('pkt-datepicker-popup')(PktDatepickerPopup)
|
|
183
|
+
} catch (e) {
|
|
184
|
+
console.warn('Forsøker å definere <pkt-datepicker-popup>, men den er allerede definert')
|
|
185
|
+
}
|
|
@@ -9,7 +9,6 @@ import { IDatepickerStrings, defaultRangeStrings } from './datepicker-types'
|
|
|
9
9
|
import { isIOS } from 'shared-utils/device-utils'
|
|
10
10
|
import '@/components/icon'
|
|
11
11
|
|
|
12
|
-
@customElement('pkt-datepicker-range')
|
|
13
12
|
export class PktDatepickerRange extends PktDatepickerBase {
|
|
14
13
|
@property({ type: Array })
|
|
15
14
|
value: string[] = []
|
|
@@ -164,3 +163,9 @@ export class PktDatepickerRange extends PktDatepickerBase {
|
|
|
164
163
|
`
|
|
165
164
|
}
|
|
166
165
|
}
|
|
166
|
+
|
|
167
|
+
try {
|
|
168
|
+
customElement('pkt-datepicker-range')(PktDatepickerRange)
|
|
169
|
+
} catch (e) {
|
|
170
|
+
console.warn('Forsøker å definere <pkt-datepicker-range>, men den er allerede definert')
|
|
171
|
+
}
|
|
@@ -8,7 +8,6 @@ import { keyboardUtils, formUtils } from './datepicker-utils'
|
|
|
8
8
|
import { IDatepickerStrings, defaultSingleStrings } from './datepicker-types'
|
|
9
9
|
import { isIOS } from 'shared-utils/device-utils'
|
|
10
10
|
|
|
11
|
-
@customElement('pkt-datepicker-single')
|
|
12
11
|
export class PktDatepickerSingle extends PktDatepickerBase {
|
|
13
12
|
@property({ type: String })
|
|
14
13
|
value: string = ''
|
|
@@ -89,3 +88,9 @@ export class PktDatepickerSingle extends PktDatepickerBase {
|
|
|
89
88
|
`
|
|
90
89
|
}
|
|
91
90
|
}
|
|
91
|
+
|
|
92
|
+
try {
|
|
93
|
+
customElement('pkt-datepicker-single')(PktDatepickerSingle)
|
|
94
|
+
} catch (e) {
|
|
95
|
+
console.warn('Forsøker å definere <pkt-datepicker-single>, men den er allerede definert')
|
|
96
|
+
}
|
|
@@ -51,7 +51,6 @@ type Props = ElementProps<
|
|
|
51
51
|
| 'timezone'
|
|
52
52
|
>
|
|
53
53
|
|
|
54
|
-
@customElement('pkt-datepicker')
|
|
55
54
|
export class PktDatepicker extends PktInputElement<Props> {
|
|
56
55
|
/**
|
|
57
56
|
* Element attributes and properties
|
|
@@ -609,3 +608,9 @@ export class PktDatepicker extends PktInputElement<Props> {
|
|
|
609
608
|
)
|
|
610
609
|
}
|
|
611
610
|
}
|
|
611
|
+
|
|
612
|
+
try {
|
|
613
|
+
customElement('pkt-datepicker')(PktDatepicker)
|
|
614
|
+
} catch (e) {
|
|
615
|
+
console.warn('Forsøker å definere <pkt-datepicker>, men den er allerede definert')
|
|
616
|
+
}
|
|
@@ -27,7 +27,6 @@ import './header-user-menu'
|
|
|
27
27
|
|
|
28
28
|
const CDN_LOGO_PATH = 'https://punkt-cdn.oslo.kommune.no/latest/logos/'
|
|
29
29
|
|
|
30
|
-
@customElement('pkt-header-service')
|
|
31
30
|
export class PktHeaderService extends PktElementWithSlot<IPktHeader> implements IPktHeader {
|
|
32
31
|
@property({ type: String, attribute: 'service-name' }) serviceName?: string
|
|
33
32
|
@property({ type: String, attribute: 'service-link' }) serviceLink?: string
|
|
@@ -756,3 +755,9 @@ declare global {
|
|
|
756
755
|
'pkt-header-service': PktHeaderService
|
|
757
756
|
}
|
|
758
757
|
}
|
|
758
|
+
|
|
759
|
+
try {
|
|
760
|
+
customElement('pkt-header-service')(PktHeaderService)
|
|
761
|
+
} catch (e) {
|
|
762
|
+
console.warn('Forsøker å definere <pkt-header-service>, men den er allerede definert')
|
|
763
|
+
}
|
|
@@ -24,7 +24,6 @@ export interface IPktHeaderUserMenu {
|
|
|
24
24
|
logoutOnClick?: Booleanish
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
@customElement('pkt-header-user-menu')
|
|
28
27
|
export class PktHeaderUserMenu
|
|
29
28
|
extends PktElement<IPktHeaderUserMenu>
|
|
30
29
|
implements IPktHeaderUserMenu
|
|
@@ -213,3 +212,9 @@ declare global {
|
|
|
213
212
|
'pkt-header-user-menu': PktHeaderUserMenu
|
|
214
213
|
}
|
|
215
214
|
}
|
|
215
|
+
|
|
216
|
+
try {
|
|
217
|
+
customElement('pkt-header-user-menu')(PktHeaderUserMenu)
|
|
218
|
+
} catch (e) {
|
|
219
|
+
console.warn('Forsøker å definere <pkt-header-user-menu>, men den er allerede definert')
|
|
220
|
+
}
|
|
@@ -31,7 +31,6 @@ import './header-service'
|
|
|
31
31
|
*
|
|
32
32
|
* TODO: Add `type` prop to switch between `service` and `global` header types
|
|
33
33
|
*/
|
|
34
|
-
@customElement('pkt-header')
|
|
35
34
|
export class PktHeader extends PktElementWithSlot<IPktHeader> implements IPktHeader {
|
|
36
35
|
@property({ type: String, attribute: 'service-name' }) serviceName?: string
|
|
37
36
|
@property({ type: String, attribute: 'service-link' }) serviceLink?: string
|
|
@@ -140,3 +139,9 @@ declare global {
|
|
|
140
139
|
'pkt-header': PktHeader
|
|
141
140
|
}
|
|
142
141
|
}
|
|
142
|
+
|
|
143
|
+
try {
|
|
144
|
+
customElement('pkt-header')(PktHeader)
|
|
145
|
+
} catch (e) {
|
|
146
|
+
console.warn('Forsøker å definere <pkt-header>, men den er allerede definert')
|
|
147
|
+
}
|
|
@@ -15,7 +15,6 @@ export interface IPktHeading {
|
|
|
15
15
|
align?: 'start' | 'center' | 'end'
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
@customElement('pkt-heading')
|
|
19
18
|
export class PktHeading extends PktShadowElement<IPktHeading> implements IPktHeading {
|
|
20
19
|
@property({ type: String, reflect: true }) size: TPktHeadingSize | undefined = undefined
|
|
21
20
|
@property({ type: Number, reflect: true }) level: TPktHeadingLevel = 2
|
|
@@ -151,3 +150,9 @@ export class PktHeading extends PktShadowElement<IPktHeading> implements IPktHea
|
|
|
151
150
|
return html`<slot></slot>`
|
|
152
151
|
}
|
|
153
152
|
}
|
|
153
|
+
|
|
154
|
+
try {
|
|
155
|
+
customElement('pkt-heading')(PktHeading)
|
|
156
|
+
} catch (e) {
|
|
157
|
+
console.warn('Forsøker å definere <pkt-heading>, men den er allerede definert')
|
|
158
|
+
}
|
|
@@ -8,7 +8,6 @@ import specs from 'componentSpecs/input-wrapper.json'
|
|
|
8
8
|
import '@/components/icon'
|
|
9
9
|
import { slotContent } from '@/directives/slot-content'
|
|
10
10
|
|
|
11
|
-
@customElement('pkt-helptext')
|
|
12
11
|
export class PktHelptext extends PktElementWithSlot {
|
|
13
12
|
@property({ type: String, reflect: true })
|
|
14
13
|
forId: string = uuidish()
|
|
@@ -84,3 +83,9 @@ export class PktHelptext extends PktElementWithSlot {
|
|
|
84
83
|
return html`${helptextElement()}`
|
|
85
84
|
}
|
|
86
85
|
}
|
|
86
|
+
|
|
87
|
+
try {
|
|
88
|
+
customElement('pkt-helptext')(PktHelptext)
|
|
89
|
+
} catch (e) {
|
|
90
|
+
console.warn('Forsøker å definere <pkt-helptext>, men den er allerede definert')
|
|
91
|
+
}
|
|
@@ -75,7 +75,6 @@ const downloadIconOrGetFromCache = async (
|
|
|
75
75
|
|
|
76
76
|
type Props = ElementProps<PktIcon, 'path' | 'name'>
|
|
77
77
|
|
|
78
|
-
@customElement('pkt-icon')
|
|
79
78
|
export class PktIcon extends PktElement<Props> {
|
|
80
79
|
@property({ type: String, reflect: false })
|
|
81
80
|
path: string | undefined = typeof window !== 'undefined' ? window.pktIconPath : defaultPath
|
|
@@ -133,3 +132,9 @@ declare global {
|
|
|
133
132
|
'pkt-icon': PktIcon
|
|
134
133
|
}
|
|
135
134
|
}
|
|
135
|
+
|
|
136
|
+
try {
|
|
137
|
+
customElement('pkt-icon')(PktIcon)
|
|
138
|
+
} catch (e) {
|
|
139
|
+
console.warn('Forsøker å definere <pkt-icon>, men den er allerede definert')
|
|
140
|
+
}
|
|
@@ -40,7 +40,6 @@ type Props = ElementProps<
|
|
|
40
40
|
| 'role'
|
|
41
41
|
>
|
|
42
42
|
|
|
43
|
-
@customElement('pkt-input-wrapper')
|
|
44
43
|
export class PktInputWrapper extends PktElementWithSlot<Props> {
|
|
45
44
|
/**
|
|
46
45
|
* Element attributes
|
|
@@ -222,3 +221,9 @@ export class PktInputWrapper extends PktElementWithSlot<Props> {
|
|
|
222
221
|
)
|
|
223
222
|
}
|
|
224
223
|
}
|
|
224
|
+
|
|
225
|
+
try {
|
|
226
|
+
customElement('pkt-input-wrapper')(PktInputWrapper)
|
|
227
|
+
} catch (e) {
|
|
228
|
+
console.warn('Forsøker å definere <pkt-input-wrapper>, men den er allerede definert')
|
|
229
|
+
}
|
|
@@ -6,7 +6,6 @@ import { customElement, property } from 'lit/decorators.js'
|
|
|
6
6
|
import specs from 'componentSpecs/link.json'
|
|
7
7
|
import '@/components/icon'
|
|
8
8
|
|
|
9
|
-
@customElement('pkt-link')
|
|
10
9
|
export class PktLink extends PktElementWithSlot {
|
|
11
10
|
/**
|
|
12
11
|
* Element attributes
|
|
@@ -37,3 +36,9 @@ export class PktLink extends PktElementWithSlot {
|
|
|
37
36
|
>`
|
|
38
37
|
}
|
|
39
38
|
}
|
|
39
|
+
|
|
40
|
+
try {
|
|
41
|
+
customElement('pkt-link')(PktLink)
|
|
42
|
+
} catch (e) {
|
|
43
|
+
console.warn('Forsøker å definere <pkt-link>, men den er allerede definert')
|
|
44
|
+
}
|