@oslokommune/punkt-elements 16.0.5 → 16.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +17 -0
- package/dist/{accordionitem-CHXGzgLv.js → accordionitem-Cj74XruR.js} +31 -31
- package/dist/accordionitem-D7sWqDM_.cjs +34 -0
- package/dist/alert-C95U_RZ0.cjs +33 -0
- package/dist/{alert-BHSd2Vpj.js → alert-ca_hFi-u.js} +19 -20
- package/dist/async-directive-B158h3ba.cjs +5 -0
- package/dist/async-directive-CKx6pubI.js +65 -0
- package/dist/{button-CHUuxLQV.js → button-BRovt5nm.js} +10 -11
- package/dist/button-BXN_JPaH.cjs +27 -0
- package/dist/{card-Db9QSEqh.cjs → card-DfHo45CG.cjs} +11 -13
- package/dist/{card-CmfUyl_s.js → card-DvgCTN4B.js} +47 -51
- package/dist/{checkbox-D6nltMuc.js → checkbox-CbIUMIYt.js} +2 -2
- package/dist/{checkbox-Cpyay9_l.cjs → checkbox-mmn3v9ry.cjs} +1 -1
- package/dist/{combobox-TKTemUxN.js → combobox-CwW0md6G.js} +31 -31
- package/dist/combobox-TKL44xnV.cjs +135 -0
- package/dist/{consent-BQLkfN3d.cjs → consent-CIhFwuFO.cjs} +1 -1
- package/dist/{consent-knPF4PS_.js → consent-CgS1L1xF.js} +1 -1
- package/dist/{datepicker-CPNcXd-o.cjs → datepicker-oN9L0Wnm.cjs} +14 -14
- package/dist/{datepicker-MuQYeXhL.js → datepicker-qRWWzmbo.js} +51 -51
- package/dist/element-with-slot-1djk8KXi.js +240 -0
- package/dist/element-with-slot-yT8k1Z37.cjs +1 -0
- package/dist/helptext-B366oeR9.cjs +24 -0
- package/dist/{helptext-TFpeGJ1P.js → helptext-DepcDYFV.js} +32 -39
- package/dist/index.d.ts +39 -90
- package/dist/input-element-Xe9FTi2a.cjs +1 -0
- package/dist/{input-element-BGNbdzy2.js → input-element-n5U38pZ1.js} +8 -7
- package/dist/{input-wrapper-CaUY90qz.js → input-wrapper-B__6jW4U.js} +25 -28
- package/dist/{input-wrapper-JU4D2TGu.cjs → input-wrapper-BdFdJU-k.cjs} +7 -9
- package/dist/link-DLjXMpvi.cjs +7 -0
- package/dist/link-oGYvBLYL.js +53 -0
- package/dist/linkcard-BhVIc18n.js +54 -0
- package/dist/linkcard-C20WC6Nw.cjs +13 -0
- package/dist/{loader-BF9K1VCZ.js → loader-BHt9i5Xp.js} +12 -13
- package/dist/{loader-C1LI8Q4z.cjs → loader-DxAGCcNF.cjs} +2 -2
- package/dist/messagebox-B8LW0PSQ.cjs +13 -0
- package/dist/messagebox-DkspcMQg.js +69 -0
- package/dist/modal-Bfk_ncLQ.cjs +36 -0
- package/dist/{modal-CGHWsjk8.js → modal-p1rvuP8e.js} +26 -27
- package/dist/pkt-accordion.cjs +1 -1
- package/dist/pkt-accordion.js +2 -2
- package/dist/pkt-alert.cjs +1 -1
- package/dist/pkt-alert.js +1 -1
- package/dist/pkt-button.cjs +1 -1
- package/dist/pkt-button.js +1 -1
- package/dist/pkt-card.cjs +1 -1
- package/dist/pkt-card.js +1 -1
- package/dist/pkt-checkbox.cjs +1 -1
- package/dist/pkt-checkbox.js +1 -1
- package/dist/pkt-combobox.cjs +1 -1
- package/dist/pkt-combobox.js +1 -1
- package/dist/pkt-consent.cjs +1 -1
- package/dist/pkt-consent.js +1 -1
- package/dist/pkt-datepicker.cjs +1 -1
- package/dist/pkt-datepicker.js +2 -2
- package/dist/pkt-header.cjs +16 -17
- package/dist/pkt-header.js +62 -69
- package/dist/pkt-helptext.cjs +1 -1
- package/dist/pkt-helptext.js +1 -1
- package/dist/pkt-index.cjs +1 -1
- package/dist/pkt-index.js +22 -22
- package/dist/pkt-input-wrapper.cjs +1 -1
- package/dist/pkt-input-wrapper.js +1 -1
- package/dist/pkt-link.cjs +1 -1
- package/dist/pkt-link.js +1 -1
- package/dist/pkt-linkcard.cjs +1 -1
- package/dist/pkt-linkcard.js +1 -1
- package/dist/pkt-loader.cjs +1 -1
- package/dist/pkt-loader.js +1 -1
- package/dist/pkt-messagebox.cjs +1 -1
- package/dist/pkt-messagebox.js +1 -1
- package/dist/pkt-modal.cjs +1 -1
- package/dist/pkt-modal.js +1 -1
- package/dist/pkt-options-controller-DIeKSpWv.cjs +1 -0
- package/dist/{pkt-options-controller-Z-bPox7n.js → pkt-options-controller-W4ITGQy9.js} +1 -1
- package/dist/pkt-progressbar.cjs +1 -1
- package/dist/pkt-progressbar.js +2 -2
- package/dist/pkt-radiobutton.cjs +1 -1
- package/dist/pkt-radiobutton.js +1 -1
- package/dist/pkt-select.cjs +1 -1
- package/dist/pkt-select.js +1 -1
- package/dist/pkt-tabs.cjs +1 -1
- package/dist/pkt-tabs.js +2 -2
- package/dist/pkt-tag.cjs +1 -1
- package/dist/pkt-tag.js +1 -1
- package/dist/pkt-textarea.cjs +1 -1
- package/dist/pkt-textarea.js +1 -1
- package/dist/pkt-textinput.cjs +1 -1
- package/dist/pkt-textinput.js +1 -1
- package/dist/{progressbar-Bxh335uT.cjs → progressbar-CC9Qr82_.cjs} +1 -1
- package/dist/{progressbar-GSA4Md1u.js → progressbar-CcX-xiPI.js} +1 -1
- package/dist/{radiobutton-CNHCpKn0.cjs → radiobutton-BUDQYAH-.cjs} +1 -1
- package/dist/{radiobutton-DgC27mb0.js → radiobutton-RW3h0tJj.js} +2 -2
- package/dist/ref-DBGHvw2G.js +42 -0
- package/dist/ref-DahIePMT.cjs +5 -0
- package/dist/select-PuEeK4jQ.cjs +49 -0
- package/dist/{select-7VuYtPZv.js → select-iXKeM3yz.js} +37 -37
- package/dist/{tabitem-DQRzgAT4.js → tabitem-DZSzwag2.js} +30 -30
- package/dist/{tabitem-BKv4eN0a.cjs → tabitem-Jenus4Qd.cjs} +13 -13
- package/dist/{tag-DZPqFiem.js → tag-CIWBLpjv.js} +17 -18
- package/dist/tag-DeE1OpmF.cjs +27 -0
- package/dist/{textarea-VpCEjVFx.js → textarea-DR9lVDN-.js} +13 -13
- package/dist/{textarea-CO7Ikug5.cjs → textarea-DtiYQWjy.cjs} +7 -7
- package/dist/{textinput-C2AZ9ss2.js → textinput-0Bttvt9V.js} +22 -22
- package/dist/{textinput-DRFZU3dA.cjs → textinput-cKrjvbJW.cjs} +9 -9
- package/package.json +3 -3
- package/src/components/accordion/accordionitem.ts +4 -6
- package/src/components/alert/alert.ts +4 -8
- package/src/components/button/button.ts +4 -12
- package/src/components/card/card.ts +4 -19
- package/src/components/combobox/combobox-base.ts +0 -5
- package/src/components/combobox/combobox-utils.ts +1 -1
- package/src/components/combobox/combobox.ts +2 -1
- package/src/components/datepicker/datepicker.ts +2 -8
- package/src/components/header/header-service.ts +5 -19
- package/src/components/header/header.ts +4 -13
- package/src/components/helptext/helptext.test.ts +2 -12
- package/src/components/helptext/helptext.ts +5 -19
- package/src/components/input-wrapper/input-wrapper.test.ts +3 -3
- package/src/components/input-wrapper/input-wrapper.ts +5 -16
- package/src/components/link/link.ts +4 -12
- package/src/components/linkcard/linkcard.test.ts +2 -2
- package/src/components/linkcard/linkcard.ts +4 -13
- package/src/components/loader/loader.ts +4 -12
- package/src/components/messagebox/messagebox.ts +4 -9
- package/src/components/modal/modal.ts +4 -7
- package/src/components/select/select.ts +2 -5
- package/src/components/tabs/tabitem.ts +4 -7
- package/src/components/tabs/tabs.ts +4 -13
- package/src/components/tag/tag.ts +6 -12
- package/src/components/textarea/textarea.ts +2 -8
- package/src/components/textinput/textinput.ts +2 -8
- package/dist/accordionitem-To95GT6b.cjs +0 -34
- package/dist/alert-BDXWFRcf.cjs +0 -33
- package/dist/button-VWxZW89G.cjs +0 -27
- package/dist/combobox-DX2BLzIm.cjs +0 -135
- package/dist/helptext-BjW1WdOn.cjs +0 -24
- package/dist/input-element-CSDVA3Y6.cjs +0 -1
- package/dist/link-Bscfb6s9.js +0 -54
- package/dist/link-CDuv1jxx.cjs +0 -7
- package/dist/linkcard-3WUL0CpY.cjs +0 -13
- package/dist/linkcard-wNgRxJ-S.js +0 -55
- package/dist/messagebox-Dmot5szX.cjs +0 -13
- package/dist/messagebox-LBEzcr6B.js +0 -70
- package/dist/modal-S9MOKOaz.cjs +0 -37
- package/dist/pkt-options-controller-BogGk-6J.cjs +0 -1
- package/dist/pkt-slot-controller-D4nKlom5.cjs +0 -1
- package/dist/pkt-slot-controller-D7CrjM52.js +0 -95
- package/dist/ref-CxLwrCxt.cjs +0 -9
- package/dist/ref-Dma3n3i8.js +0 -102
- package/dist/select-PWPy5gTB.cjs +0 -49
- package/dist/tag-DmbgBCKu.cjs +0 -27
|
@@ -1,26 +1,24 @@
|
|
|
1
1
|
import { e as c } from "./class-map-3ADKve8g.js";
|
|
2
2
|
import { o as k } from "./if-defined-rXcLNTzN.js";
|
|
3
|
-
import {
|
|
4
|
-
import { P as $ } from "./
|
|
5
|
-
import { e as y, n as _ } from "./ref-Dma3n3i8.js";
|
|
3
|
+
import { A as d, b as e, n as r, t as u } from "./element-CV9utnHJ.js";
|
|
4
|
+
import { P as m, s as $ } from "./element-with-slot-1djk8KXi.js";
|
|
6
5
|
import "./icon-D0IQAVwS.js";
|
|
7
|
-
import "./tag-
|
|
6
|
+
import "./tag-CIWBLpjv.js";
|
|
8
7
|
import "./heading-D9R5UBcv.js";
|
|
9
|
-
const
|
|
10
|
-
props:
|
|
8
|
+
const y = { layout: { default: "vertical" }, skin: { type: ["outlined", "outlined-beige", "gray", "blue", "beige", "green"], default: "outlined" }, padding: { default: "default" } }, o = {
|
|
9
|
+
props: y
|
|
11
10
|
};
|
|
12
|
-
var
|
|
13
|
-
for (var n =
|
|
14
|
-
(g =
|
|
15
|
-
return
|
|
11
|
+
var _ = Object.defineProperty, b = Object.getOwnPropertyDescriptor, i = (t, s, l, p) => {
|
|
12
|
+
for (var n = p > 1 ? void 0 : p ? b(s, l) : s, h = t.length - 1, g; h >= 0; h--)
|
|
13
|
+
(g = t[h]) && (n = (p ? g(s, l, n) : g(n)) || n);
|
|
14
|
+
return p && n && _(s, l, n), n;
|
|
16
15
|
};
|
|
17
|
-
let a = class extends
|
|
18
|
-
//Constructor
|
|
16
|
+
let a = class extends m {
|
|
19
17
|
constructor() {
|
|
20
|
-
super(), this.
|
|
18
|
+
super(...arguments), this.ariaLabel = "", this.metaLead = null, this.borderOnHover = !0, this.clickCardLink = null, this.metaTrail = null, this.layout = o.props.layout.default, this.heading = "", this.headinglevel = 3, this.image = {
|
|
21
19
|
src: "",
|
|
22
20
|
alt: ""
|
|
23
|
-
}, this.imageShape = "square", this.openLinkInNewTab = !1, this.padding =
|
|
21
|
+
}, this.imageShape = "square", this.openLinkInNewTab = !1, this.padding = o.props.padding.default, this.skin = o.props.skin.default, this.subheading = "", this.tagPosition = "top", this.tags = [];
|
|
24
22
|
}
|
|
25
23
|
connectedCallback() {
|
|
26
24
|
super.connectedCallback();
|
|
@@ -29,17 +27,17 @@ let a = class extends u {
|
|
|
29
27
|
// Main render method
|
|
30
28
|
// prettier-ignore
|
|
31
29
|
render() {
|
|
32
|
-
var
|
|
33
|
-
const
|
|
30
|
+
var p, n;
|
|
31
|
+
const t = {
|
|
34
32
|
"pkt-card": !0,
|
|
35
33
|
[`pkt-card--${this.skin}`]: this.skin,
|
|
36
34
|
[`pkt-card--${this.layout}`]: this.layout,
|
|
37
35
|
[`pkt-card--padding-${this.padding}`]: this.padding,
|
|
38
36
|
"pkt-card--border-on-hover": this.borderOnHover
|
|
39
|
-
}, s = ((
|
|
40
|
-
return
|
|
37
|
+
}, s = ((p = this.ariaLabel) == null ? void 0 : p.trim()) || (this.heading ? `${this.heading} lenkekort` : "lenkekort"), l = ((n = this.ariaLabel) == null ? void 0 : n.trim()) || (this.heading ? this.heading : "kort");
|
|
38
|
+
return e`
|
|
41
39
|
<article
|
|
42
|
-
class=${c(
|
|
40
|
+
class=${c(t)}
|
|
43
41
|
aria-label=${k(this.clickCardLink ? s : l)}
|
|
44
42
|
>
|
|
45
43
|
${this.renderImage()}
|
|
@@ -55,13 +53,13 @@ let a = class extends u {
|
|
|
55
53
|
}
|
|
56
54
|
// Render methods for different parts of the card
|
|
57
55
|
renderImage() {
|
|
58
|
-
const
|
|
56
|
+
const t = {
|
|
59
57
|
"pkt-card__image": !0,
|
|
60
58
|
[`pkt-card__image-${this.imageShape}`]: this.imageShape
|
|
61
59
|
};
|
|
62
|
-
return
|
|
63
|
-
${this.image.src &&
|
|
64
|
-
<div class=${c(
|
|
60
|
+
return e`
|
|
61
|
+
${this.image.src && e`
|
|
62
|
+
<div class=${c(t)}>
|
|
65
63
|
<img src=${this.image.src} alt=${this.image.alt || ""} />
|
|
66
64
|
</div>
|
|
67
65
|
`}
|
|
@@ -70,8 +68,8 @@ let a = class extends u {
|
|
|
70
68
|
// Do not render heading if link is present, render link heading instead
|
|
71
69
|
// Combine the rendering for headings into a renderHeader method
|
|
72
70
|
renderHeading() {
|
|
73
|
-
return
|
|
74
|
-
${this.heading && !this.clickCardLink ?
|
|
71
|
+
return e`
|
|
72
|
+
${this.heading && !this.clickCardLink ? e`
|
|
75
73
|
<pkt-heading
|
|
76
74
|
class="pkt-card__heading"
|
|
77
75
|
.level=${this.headinglevel || 3}
|
|
@@ -85,8 +83,8 @@ let a = class extends u {
|
|
|
85
83
|
`;
|
|
86
84
|
}
|
|
87
85
|
renderLinkHeading() {
|
|
88
|
-
return
|
|
89
|
-
${this.clickCardLink ?
|
|
86
|
+
return e`
|
|
87
|
+
${this.clickCardLink ? e`
|
|
90
88
|
<pkt-heading
|
|
91
89
|
class="pkt-card__link-heading pkt-card__heading"
|
|
92
90
|
.level=${this.headinglevel || 3}
|
|
@@ -105,16 +103,16 @@ let a = class extends u {
|
|
|
105
103
|
`;
|
|
106
104
|
}
|
|
107
105
|
renderSubheading() {
|
|
108
|
-
return
|
|
109
|
-
${this.subheading ?
|
|
106
|
+
return e`
|
|
107
|
+
${this.subheading ? e` <p class="pkt-card__subheading ">${this.subheading}</p> ` : d}
|
|
110
108
|
`;
|
|
111
109
|
}
|
|
112
110
|
// Render header
|
|
113
111
|
// prettier-ignore
|
|
114
112
|
renderHeader() {
|
|
115
|
-
const
|
|
116
|
-
return
|
|
117
|
-
${
|
|
113
|
+
const t = !!this.heading || !!this.subheading;
|
|
114
|
+
return e`
|
|
115
|
+
${t ? e`
|
|
118
116
|
<header class="pkt-card__header">
|
|
119
117
|
${this.renderHeading()}
|
|
120
118
|
${this.renderLinkHeading()}
|
|
@@ -124,19 +122,19 @@ let a = class extends u {
|
|
|
124
122
|
`;
|
|
125
123
|
}
|
|
126
124
|
renderTags() {
|
|
127
|
-
const
|
|
125
|
+
const t = {
|
|
128
126
|
"pkt-card__tags": !0,
|
|
129
127
|
[`pkt-card__tags-${this.tagPosition}`]: this.tagPosition
|
|
130
128
|
};
|
|
131
|
-
return
|
|
132
|
-
${this.tags.length > 0 ?
|
|
129
|
+
return e`
|
|
130
|
+
${this.tags.length > 0 ? e`
|
|
133
131
|
<div
|
|
134
|
-
class=${c(
|
|
132
|
+
class=${c(t)}
|
|
135
133
|
role="list"
|
|
136
134
|
aria-label=${this.tags.length > 1 ? "merkelapper" : "merkelapp"}
|
|
137
135
|
>
|
|
138
136
|
${this.tags.map(
|
|
139
|
-
(s) =>
|
|
137
|
+
(s) => e`
|
|
140
138
|
<pkt-tag
|
|
141
139
|
role="listitem"
|
|
142
140
|
textStyle="normal-text"
|
|
@@ -153,16 +151,14 @@ let a = class extends u {
|
|
|
153
151
|
`;
|
|
154
152
|
}
|
|
155
153
|
renderSlot() {
|
|
156
|
-
return
|
|
157
|
-
${this.defaultSlot && t`<section class="pkt-card__content" ${_(this.defaultSlot)}></section>`}
|
|
158
|
-
`;
|
|
154
|
+
return e`<section class="pkt-card__content">${$(this)}</section>`;
|
|
159
155
|
}
|
|
160
156
|
renderMetadata() {
|
|
161
|
-
return
|
|
162
|
-
${this.metaLead || this.metaTrail ?
|
|
157
|
+
return e`
|
|
158
|
+
${this.metaLead || this.metaTrail ? e`
|
|
163
159
|
<footer class="pkt-card__metadata">
|
|
164
|
-
${this.metaLead ?
|
|
165
|
-
${this.metaTrail ?
|
|
160
|
+
${this.metaLead ? e`<span class="pkt-card__metadata-lead">${this.metaLead}</span>` : d}
|
|
161
|
+
${this.metaTrail ? e`<span class="pkt-card__metadata-trail">${this.metaTrail}</span>` : d}
|
|
166
162
|
</footer>
|
|
167
163
|
` : d}
|
|
168
164
|
`;
|
|
@@ -208,13 +204,13 @@ i([
|
|
|
208
204
|
r({
|
|
209
205
|
type: String,
|
|
210
206
|
converter: {
|
|
211
|
-
fromAttribute: (
|
|
212
|
-
const s =
|
|
213
|
-
return
|
|
214
|
-
`Invalid skin value "${
|
|
215
|
-
),
|
|
207
|
+
fromAttribute: (t) => {
|
|
208
|
+
const s = o.props.skin.type;
|
|
209
|
+
return t && s.includes(t) ? t : (t && !s.includes(t) && console.warn(
|
|
210
|
+
`Invalid skin value "${t}". Using default skin "${o.props.skin.default}".`
|
|
211
|
+
), o.props.skin.default);
|
|
216
212
|
},
|
|
217
|
-
toAttribute: (
|
|
213
|
+
toAttribute: (t) => t
|
|
218
214
|
}
|
|
219
215
|
})
|
|
220
216
|
], a.prototype, "skin", 2);
|
|
@@ -228,7 +224,7 @@ i([
|
|
|
228
224
|
r({ type: Array })
|
|
229
225
|
], a.prototype, "tags", 2);
|
|
230
226
|
a = i([
|
|
231
|
-
|
|
227
|
+
u("pkt-card")
|
|
232
228
|
], a);
|
|
233
229
|
export {
|
|
234
230
|
a as P
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { A as r, b as p, n as s, t as d } from "./element-CV9utnHJ.js";
|
|
2
|
-
import { P as k } from "./input-element-
|
|
3
|
-
import { e as f, n as b } from "./ref-
|
|
2
|
+
import { P as k } from "./input-element-n5U38pZ1.js";
|
|
3
|
+
import { e as f, n as b } from "./ref-DBGHvw2G.js";
|
|
4
4
|
import { e as u } from "./class-map-3ADKve8g.js";
|
|
5
5
|
var g = Object.defineProperty, m = Object.getOwnPropertyDescriptor, i = (t, a, n, l) => {
|
|
6
6
|
for (var h = l > 1 ? void 0 : l ? m(a, n) : a, c = t.length - 1, o; c >= 0; c--)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const t=require("./element-CMTfByxQ.cjs"),o=require("./input-element-
|
|
1
|
+
"use strict";const t=require("./element-CMTfByxQ.cjs"),o=require("./input-element-Xe9FTi2a.cjs"),r=require("./ref-DahIePMT.cjs"),p=require("./class-map-Bokp1SoS.cjs");var u=Object.defineProperty,d=Object.getOwnPropertyDescriptor,i=(l,e,h,a)=>{for(var s=a>1?void 0:a?d(e,h):e,c=l.length-1,n;c>=0;c--)(n=l[c])&&(s=(a?n(e,h,s):n(s))||s);return a&&s&&u(e,h,s),s};exports.PktCheckbox=class extends o.PktInputElement{constructor(){super(...arguments),this.inputRef=r.e(),this.value="",this.checkHelptext=null,this.defaultChecked=!1,this.hasTile=!1,this.isSwitch=!1,this.labelPosition="right",this.hideLabel=!1,this.checked=null,this.indeterminate=!1,this.type="checkbox",this.tagText=null,this.optionalTag=!1,this.optionalText="Valgfritt",this.requiredTag=!1,this.requiredText="Må fylles ut"}connectedCallback(){super.connectedCallback()}attributeChangedCallback(e,h,a){e==="defaultChecked"&&!this.checked&&(this.checked=this.defaultChecked),e==="checked"&&(this.checked=this.checked===""||this.checked==="true"||this.checked===!0,this.inputRef.value&&(this.inputRef.value.checked=this.checked)),e==="indeterminate"&&(this.indeterminate=this.indeterminate===""||this.indeterminate==="true"||this.indeterminate===!0,this.inputRef.value&&(this.inputRef.value.indeterminate=this.indeterminate)),super.attributeChangedCallback(e,h,a)}firstUpdated(e){e.has("defaultChecked")&&!this.checked&&(this.checked=this.defaultChecked),this.inputRef.value&&(this.inputRef.value.indeterminate=this.indeterminate===""||this.indeterminate==="true"||this.indeterminate===!0),super.firstUpdated(e)}updated(e){e.has("defaultChecked")&&!this.checked&&(this.checked=this.defaultChecked),e.has("checked")&&this.inputRef.value&&(this.inputRef.value.checked=this.checked===""||this.checked==="true"||this.checked===!0),e.has("indeterminate")&&this.inputRef.value&&(this.inputRef.value.indeterminate=this.indeterminate===""||this.indeterminate==="true"||this.indeterminate===!0),super.updated(e)}render(){const e=p.e({"pkt-input-check__input":!0,"pkt-input-check__input--tile":this.hasTile,"pkt-input-check__input--tile-disabled":this.disabled&&this.hasTile}),h=p.e({"pkt-input-check__input-checkbox":!0,"pkt-input-check__input-checkbox--error":this.hasError}),a=p.e({"pkt-input-check__input-label":!0,"pkt-input-check__input-label--disabled":this.disabled,"pkt-input-check__input-label--left":this.labelPosition==="left","pkt-input-check__input-label--right":this.labelPosition==="right","pkt-sr-only":this.hideLabel}),s="pkt-tag pkt-tag--small pkt-tag--thin-text",c=()=>t.b`
|
|
2
2
|
${this.tagText?t.b`<span class=${s+" pkt-tag--gray"}>${this.tagText}</span>`:t.A}
|
|
3
3
|
${this.optionalTag?t.b`<span class=${s+" pkt-tag--blue-light"}>${this.optionalText}</span>`:t.A}
|
|
4
4
|
${this.requiredTag?t.b`<span class=${s+" pkt-tag--beige"}>${this.requiredText}</span>`:t.A}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { n as r, A as m, b as c, t as M } from "./element-CV9utnHJ.js";
|
|
2
2
|
import { o as u } from "./if-defined-rXcLNTzN.js";
|
|
3
|
-
import { e as
|
|
3
|
+
import { e as I, n as y } from "./ref-DBGHvw2G.js";
|
|
4
4
|
import { e as w } from "./class-map-3ADKve8g.js";
|
|
5
5
|
import { c as P } from "./repeat-DnlRNf63.js";
|
|
6
|
-
import { f, g as B, b as U, i as
|
|
6
|
+
import { f, g as B, b as U, i as O, a as E, c as R } from "./listbox-CS4WQOuf.js";
|
|
7
|
+
import { s as q } from "./element-with-slot-1djk8KXi.js";
|
|
7
8
|
import { r as v } from "./state-l4hGZdFJ.js";
|
|
8
|
-
import { P as
|
|
9
|
-
import { P as
|
|
10
|
-
import
|
|
11
|
-
import "./input-wrapper-CaUY90qz.js";
|
|
9
|
+
import { P as N } from "./input-element-n5U38pZ1.js";
|
|
10
|
+
import { P as L } from "./pkt-options-controller-W4ITGQy9.js";
|
|
11
|
+
import "./input-wrapper-B__6jW4U.js";
|
|
12
12
|
import "./icon-D0IQAVwS.js";
|
|
13
|
-
import "./tag-
|
|
13
|
+
import "./tag-CIWBLpjv.js";
|
|
14
14
|
const j = (i, t, e) => {
|
|
15
15
|
switch (i) {
|
|
16
16
|
case ",":
|
|
@@ -38,10 +38,10 @@ const j = (i, t, e) => {
|
|
|
38
38
|
userInfoMessage: "",
|
|
39
39
|
shouldRemoveValue: !l && !!t[0],
|
|
40
40
|
shouldResetInput: !0
|
|
41
|
-
},
|
|
41
|
+
}, k = (i, t, e) => {
|
|
42
42
|
const s = f(t, i);
|
|
43
43
|
return e === "label" && (s != null && s.label) ? s.label : i;
|
|
44
|
-
},
|
|
44
|
+
}, b = {
|
|
45
45
|
markOptionSelected(i, t) {
|
|
46
46
|
if (t) {
|
|
47
47
|
for (const e of i)
|
|
@@ -113,9 +113,9 @@ var H = Object.defineProperty, h = (i, t, e, s) => {
|
|
|
113
113
|
(o = i[a]) && (l = o(t, e, l) || l);
|
|
114
114
|
return l && H(t, e, l), l;
|
|
115
115
|
};
|
|
116
|
-
class n extends
|
|
116
|
+
class n extends N {
|
|
117
117
|
constructor() {
|
|
118
|
-
super(), this.
|
|
118
|
+
super(), this.value = "", this.options = [], this.defaultOptions = [], this.allowUserInput = !1, this.typeahead = !1, this.includeSearch = !1, this.searchPlaceholder = "", this.multiple = !1, this.maxlength = null, this.displayValueAs = J.props.displayValueAs.default, this.tagPlacement = null, this.isOpen = !1, this._options = [], this._value = [], this._isOptionsOpen = !1, this._userInfoMessage = "", this._addValueText = null, this._maxIsReached = !1, this._search = "", this._inputFocus = !1, this._internalValueSync = !1, this._optionsFromSlot = !1, this._lastSlotGeneration = 0, this._suppressNextOpen = !1, this.inputRef = I(), this.triggerRef = I(), this.listboxRef = I(), this.optionsController = new L(this);
|
|
119
119
|
}
|
|
120
120
|
get _hasTextInput() {
|
|
121
121
|
return this.typeahead || this.allowUserInput;
|
|
@@ -142,7 +142,7 @@ class n extends q {
|
|
|
142
142
|
* Updates the _maxIsReached state flag.
|
|
143
143
|
*/
|
|
144
144
|
updateMaxReached() {
|
|
145
|
-
this._maxIsReached =
|
|
145
|
+
this._maxIsReached = O(this._value.length, this.maxlength);
|
|
146
146
|
}
|
|
147
147
|
/**
|
|
148
148
|
* Syncs the public value property from internal _value state and dispatches
|
|
@@ -239,26 +239,26 @@ class z extends n {
|
|
|
239
239
|
var T, S;
|
|
240
240
|
if (this.disabled) return;
|
|
241
241
|
this.touched = !0, this._userInfoMessage = "", this._addValueText = null;
|
|
242
|
-
const e = ((T = f(this.options, t)) == null ? void 0 : T.value) || null, s = this._value.includes(t || e || ""), l = !!e, a = ((S = this._options.find((D) => D.value === t)) == null ? void 0 : S.disabled) || !1, o = !(t != null && t.trim()), p = !this.multiple, d = this.multiple, V =
|
|
243
|
-
let _ = !1,
|
|
244
|
-
a || (!l && this.allowUserInput && !o ? (this.addNewUserValue(t), g = "Ny verdi lagt til", _ = d) : !l && !this.allowUserInput ? (p && this._value[0] && this.removeValue(this._value[0]),
|
|
242
|
+
const e = ((T = f(this.options, t)) == null ? void 0 : T.value) || null, s = this._value.includes(t || e || ""), l = !!e, a = ((S = this._options.find((D) => D.value === t)) == null ? void 0 : S.disabled) || !1, o = !(t != null && t.trim()), p = !this.multiple, d = this.multiple, V = O(this._value.length, this.maxlength);
|
|
243
|
+
let _ = !1, x = !0, g = "", $ = "";
|
|
244
|
+
a || (!l && this.allowUserInput && !o ? (this.addNewUserValue(t), g = "Ny verdi lagt til", _ = d) : !l && !this.allowUserInput ? (p && this._value[0] && this.removeValue(this._value[0]), x = !1, _ = !0, g = "Ingen treff i søket") : s ? (this.removeValue(e), _ = !0, p && this._hasTextInput && this.inputRef.value && this.inputRef.value.type !== "hidden" && (this.inputRef.value.value = "")) : o && p ? (this.removeAllSelected(), _ = !0) : p ? (this._value[0] && this.removeSelected(this._value[0]), this.setSelected(e), _ = !1) : d && !V ? (this.setSelected(e), _ = !0) : d && V ? (g = "Maks antall valg nådd", x = !1, $ = t) : (p && this.removeAllSelected(), g = "Ingen gyldig verdi valgt", x = !1, _ = !0, $ = t), this._isOptionsOpen = _, _ || (p && this._hasTextInput && (this._suppressNextOpen = !0), window.setTimeout(() => {
|
|
245
245
|
this.focusTrigger();
|
|
246
|
-
}, 0)), this._userInfoMessage = g, this._search =
|
|
246
|
+
}, 0)), this._userInfoMessage = g, this._search = $ || "", this.resetComboboxInput(x), d && this.updateMaxReached());
|
|
247
247
|
}
|
|
248
248
|
setSelected(t) {
|
|
249
249
|
if (!this._value.includes(t)) {
|
|
250
|
-
if (this.multiple &&
|
|
250
|
+
if (this.multiple && O(this._value.length, this.maxlength)) {
|
|
251
251
|
this._userInfoMessage = "Maks antall valg nådd";
|
|
252
252
|
return;
|
|
253
253
|
}
|
|
254
|
-
!this.multiple && this.removeAllSelected(), this._value = t ? [...this._value, t] : this._value,
|
|
254
|
+
!this.multiple && this.removeAllSelected(), this._value = t ? [...this._value, t] : this._value, b.markOptionSelected(this._options, t), this.resetComboboxInput(!0);
|
|
255
255
|
}
|
|
256
256
|
}
|
|
257
257
|
removeSelected(t) {
|
|
258
258
|
if (!t) return;
|
|
259
259
|
this._value = this._value.filter((s) => s !== t);
|
|
260
260
|
const e = f(this.options, t);
|
|
261
|
-
e && (
|
|
261
|
+
e && (b.markOptionDeselected(this.options, t), e.userAdded ? (this._options = [...this._options.filter((s) => s.value !== t)], this.options = [...this.options.filter((s) => s.value !== t)]) : this._options.some((s) => s.value === t) || (this._options = [...this._options, e]));
|
|
262
262
|
}
|
|
263
263
|
addAllOptions() {
|
|
264
264
|
if (this.multiple) {
|
|
@@ -266,11 +266,11 @@ class z extends n {
|
|
|
266
266
|
this._userInfoMessage = "For mange valgt";
|
|
267
267
|
return;
|
|
268
268
|
}
|
|
269
|
-
this._value = this._options.map((t) => t.value),
|
|
269
|
+
this._value = this._options.map((t) => t.value), b.markAllSelected(this._options), this.requestUpdate();
|
|
270
270
|
}
|
|
271
271
|
}
|
|
272
272
|
removeAllSelected() {
|
|
273
|
-
this._value = [],
|
|
273
|
+
this._value = [], b.markAllDeselected(this._options), this._options = b.removeUserAddedOptions(this._options), this.requestUpdate();
|
|
274
274
|
}
|
|
275
275
|
addValue() {
|
|
276
276
|
var e;
|
|
@@ -289,7 +289,7 @@ class z extends n {
|
|
|
289
289
|
if (!this.multiple)
|
|
290
290
|
this._value[0] && this.removeSelected(this._value[0]), this._value = [t];
|
|
291
291
|
else if (!f(this.options, t)) {
|
|
292
|
-
if (
|
|
292
|
+
if (O(this._value.length, this.maxlength)) return;
|
|
293
293
|
this._value = [...this._value, t];
|
|
294
294
|
}
|
|
295
295
|
const e = { value: t, label: t, userAdded: !0, selected: !0 };
|
|
@@ -298,7 +298,7 @@ class z extends n {
|
|
|
298
298
|
}, 0)), this.requestUpdate();
|
|
299
299
|
}
|
|
300
300
|
resetComboboxInput(t = !0) {
|
|
301
|
-
this._addValueText = null, this.inputRef.value && this.inputRef.value.type !== "hidden" && t && (this._search = "", this.multiple ? this.inputRef.value.value = "" : (this.inputRef.value.value = this._value[0] ?
|
|
301
|
+
this._addValueText = null, this.inputRef.value && this.inputRef.value.type !== "hidden" && t && (this._search = "", this.multiple ? this.inputRef.value.value = "" : (this.inputRef.value.value = this._value[0] ? k(this._value[0], this.options, this.displayValueAs) : "", this._userInfoMessage = "")), this._options = [...this.options];
|
|
302
302
|
}
|
|
303
303
|
removeLastValue(t) {
|
|
304
304
|
if (this._value.length === 0) return;
|
|
@@ -328,7 +328,7 @@ class Q extends z {
|
|
|
328
328
|
this._suppressNextOpen = !1, this._inputFocus = !0, this.requestUpdate();
|
|
329
329
|
return;
|
|
330
330
|
}
|
|
331
|
-
!this.multiple && this._value[0] && this.inputRef.value && this.inputRef.value.type !== "hidden" && (this.inputRef.value.value =
|
|
331
|
+
!this.multiple && this._value[0] && this.inputRef.value && this.inputRef.value.type !== "hidden" && (this.inputRef.value.value = k(
|
|
332
332
|
this._value[0],
|
|
333
333
|
this.options,
|
|
334
334
|
this.displayValueAs
|
|
@@ -375,7 +375,7 @@ class Q extends z {
|
|
|
375
375
|
const e = f(this.options, t);
|
|
376
376
|
e && e.value !== this._value[0] ? (this._value[0] && this.removeSelected(this._value[0]), this.setSelected(e.value)) : !e && this.allowUserInput && (this._value[0] && this.removeSelected(this._value[0]), this.addNewUserValue(t));
|
|
377
377
|
}
|
|
378
|
-
!this.multiple && this._value[0] ? this.inputRef.value.value =
|
|
378
|
+
!this.multiple && this._value[0] ? this.inputRef.value.value = k(
|
|
379
379
|
this._value[0],
|
|
380
380
|
this.options,
|
|
381
381
|
this.displayValueAs
|
|
@@ -599,7 +599,7 @@ let F = class extends Q {
|
|
|
599
599
|
bubbles: !1
|
|
600
600
|
})
|
|
601
601
|
), !this._isOptionsOpen && !this.multiple && this._hasTextInput && this.inputRef.value && this.inputRef.value.type !== "hidden") {
|
|
602
|
-
const l = this._value[0] ?
|
|
602
|
+
const l = this._value[0] ? k(this._value[0], this.options, this.displayValueAs) : "";
|
|
603
603
|
this.inputRef.value.value !== l && (this.inputRef.value.value = l);
|
|
604
604
|
}
|
|
605
605
|
super.updated(i);
|
|
@@ -647,7 +647,7 @@ let F = class extends Q {
|
|
|
647
647
|
class="pkt-combobox__wrapper"
|
|
648
648
|
@labelClick=${this.handleInputClick}
|
|
649
649
|
>
|
|
650
|
-
<div class="pkt-contents"
|
|
650
|
+
<div class="pkt-contents" slot="helptext">${q(this, "helptext")}</div>
|
|
651
651
|
<div class="pkt-combobox" @focusout=${this.handleFocusOut}>
|
|
652
652
|
<div
|
|
653
653
|
class=${w({
|
|
@@ -674,7 +674,7 @@ let F = class extends Q {
|
|
|
674
674
|
tabindex=${this._hasTextInput || this.disabled ? "-1" : "0"}
|
|
675
675
|
@click=${this.handleInputClick}
|
|
676
676
|
@keydown=${this._hasTextInput ? m : this.handleSelectOnlyKeydown}
|
|
677
|
-
${
|
|
677
|
+
${y(this.triggerRef)}
|
|
678
678
|
>
|
|
679
679
|
${!this._hasTextInput && this.placeholder && (!this._value.length || this.multiple && this.tagPlacement == "outside") && !this._inputFocus ? c`<span class="pkt-combobox__placeholder" @click=${this.handlePlaceholderClick}
|
|
680
680
|
>${this.placeholder}</span
|
|
@@ -709,7 +709,7 @@ let F = class extends Q {
|
|
|
709
709
|
@tab-close=${() => this.closeAndProcessInput()}
|
|
710
710
|
.searchValue=${this._search || null}
|
|
711
711
|
.maxLength=${this.maxlength || 0}
|
|
712
|
-
${
|
|
712
|
+
${y(this.listboxRef)}
|
|
713
713
|
></pkt-listbox>
|
|
714
714
|
</div>
|
|
715
715
|
|
|
@@ -746,7 +746,7 @@ let F = class extends Q {
|
|
|
746
746
|
this._value[0] && f(this.options, this._value[0]) ? `${this.id}-listbox-${R(this._options, this._value[0])}` : void 0
|
|
747
747
|
)}
|
|
748
748
|
aria-description=${u(this._selectionDescription || void 0)}
|
|
749
|
-
${
|
|
749
|
+
${y(this.inputRef)}
|
|
750
750
|
/>
|
|
751
751
|
</div>
|
|
752
752
|
` : c`
|
|
@@ -755,7 +755,7 @@ let F = class extends Q {
|
|
|
755
755
|
id="${this.id}-input"
|
|
756
756
|
name=${(this.name || this.id) + "-input"}
|
|
757
757
|
.value=${this._value.join(",")}
|
|
758
|
-
${
|
|
758
|
+
${y(this.inputRef)}
|
|
759
759
|
/>
|
|
760
760
|
`;
|
|
761
761
|
}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
"use strict";const o=require("./element-CMTfByxQ.cjs"),d=require("./if-defined-hKKmbsI8.cjs"),b=require("./ref-DahIePMT.cjs"),V=require("./class-map-Bokp1SoS.cjs"),S=require("./repeat-C-FJ2vfy.cjs"),u=require("./listbox-OAVh_U7u.cjs"),R=require("./element-with-slot-yT8k1Z37.cjs"),v=require("./state-BNgpvY-A.cjs"),w=require("./input-element-Xe9FTi2a.cjs"),C=require("./pkt-options-controller-DIeKSpWv.cjs");require("./input-wrapper-BdFdJU-k.cjs");require("./icon-Dj0oZZSa.cjs");require("./tag-DeE1OpmF.cjs");const F=(a,t,e)=>{switch(a){case",":return e?"addValue":null;case"Enter":return"addValue";case"Tab":case"ArrowDown":return t?null:"focusListbox";case"Escape":return"closeOptions";default:return null}},M=(a,t,e,s,i)=>{if(!a)return{action:"none",value:null};const l=u.findOptionByValue(e,a);return!t.includes(a)&&!l?s?{action:"addUserValue",value:a}:i?{action:"none",value:null}:{action:"removeValue",value:t[0]}:l&&!t.includes(l.value)?{action:"selectOption",value:l.value}:{action:"none",value:null}},U=(a,t,e,s,i)=>a.trim().toLowerCase()?{...u.getSearchInfoMessage(a,t,e,s),shouldRemoveValue:!1,shouldResetInput:!1}:{addValueText:null,userInfoMessage:"",shouldRemoveValue:!i&&!!t[0],shouldResetInput:!0},O=(a,t,e)=>{const s=u.findOptionByValue(t,a);return e==="label"&&(s!=null&&s.label)?s.label:a},m={markOptionSelected(a,t){if(t){for(const e of a)if(e.value===t){e.selected=!0;break}}},markOptionDeselected(a,t){if(t){for(const e of a)if(e.value===t){e.selected=!1;break}}},markAllSelected(a){for(const t of a)t.selected=!0},markAllDeselected(a){for(const t of a)t.selected=!1},removeUserAddedOptions(a){return a.filter(t=>!t.userAdded)}},A={parseOptionsFromSlot(a){const t=[];return a.forEach(e=>{if(!e.textContent&&!e.getAttribute("value"))return;const s={value:e.getAttribute("value")||e.textContent||"",label:e.textContent||e.getAttribute("value")||""};e.getAttribute("data-prefix")&&(s.prefix=e.getAttribute("data-prefix")||void 0),e.getAttribute("tagskincolor")&&(s.tagSkinColor=e.getAttribute("tagskincolor")),e.getAttribute("description")&&(s.description=e.getAttribute("description")||void 0),s.fulltext=u.buildFulltext(s),t.push(s)}),t}},k={syncOptionsWithValues(a,t){const e=[...t];return a.forEach(s=>{s.value&&!s.label&&(s.label=s.value),s.selected&&!e.includes(s.value)&&e.push(s.value),s.fulltext=u.buildFulltext(s),s.selected=s.selected||e.includes(s.value)}),{options:a,newValues:e}},mergeWithUserAdded(a,t){return[...t.filter(i=>(i==null?void 0:i.userAdded)&&i.selected).filter(i=>!(Array.isArray(a)?a:[]).some(l=>l.value===i.value)),...a]}},D={displayValueAs:{default:"label"}},q={props:D};var P=Object.defineProperty,r=(a,t,e,s)=>{for(var i=void 0,l=a.length-1,n;l>=0;l--)(n=a[l])&&(i=n(t,e,i)||i);return i&&P(t,e,i),i};class h extends w.PktInputElement{constructor(){super(),this.value="",this.options=[],this.defaultOptions=[],this.allowUserInput=!1,this.typeahead=!1,this.includeSearch=!1,this.searchPlaceholder="",this.multiple=!1,this.maxlength=null,this.displayValueAs=q.props.displayValueAs.default,this.tagPlacement=null,this.isOpen=!1,this._options=[],this._value=[],this._isOptionsOpen=!1,this._userInfoMessage="",this._addValueText=null,this._maxIsReached=!1,this._search="",this._inputFocus=!1,this._internalValueSync=!1,this._optionsFromSlot=!1,this._lastSlotGeneration=0,this._suppressNextOpen=!1,this.inputRef=b.e(),this.triggerRef=b.e(),this.listboxRef=b.e(),this.optionsController=new C.PktOptionsSlotController(this)}get _hasTextInput(){return this.typeahead||this.allowUserInput}get _selectionDescription(){if(!(!this.multiple||this._value.length===0))return`${this._value.length} valgt`}focusTrigger(){var t,e;this._hasTextInput?(t=this.inputRef.value)==null||t.focus():(e=this.triggerRef.value)==null||e.focus()}parseValue(){return Array.isArray(this.value)?this.multiple?this.value:this.value.length>0?[this.value[0]]:[]:this.value&&this.multiple?this.value.split(","):this.value?[this.value]:[]}updateMaxReached(){this._maxIsReached=u.isMaxSelectionReached(this._value.length,this.maxlength)}syncValueAndDispatch(t){const e=this._value,s=this.multiple?e.join(","):e[0]||"",i=Array.isArray(this.value)?this.value.join(","):String(this.value||"");if(s!==i&&(this._internalValueSync=!0,this.value=s),(t==null?void 0:t.join(","))!==e.join(",")){const l=this.multiple?[...e]:e[0]||"";this.onChange(l)}else e.length===0&&t&&t.length>0&&this.clearInputValue()}onChange(t){this.touched=!0,super.onChange(t)}valueChanged(){}}r([o.n({type:String,reflect:!0})],h.prototype,"value");r([o.n({type:Array})],h.prototype,"options");r([o.n({type:Array,attribute:"default-options"})],h.prototype,"defaultOptions");r([o.n({type:Boolean,attribute:"allow-user-input"})],h.prototype,"allowUserInput");r([o.n({type:Boolean})],h.prototype,"typeahead");r([o.n({type:Boolean,attribute:"include-search"})],h.prototype,"includeSearch");r([o.n({type:String,attribute:"search-placeholder"})],h.prototype,"searchPlaceholder");r([o.n({type:Boolean})],h.prototype,"multiple");r([o.n({type:Number})],h.prototype,"maxlength");r([o.n({type:String,attribute:"display-value-as"})],h.prototype,"displayValueAs");r([o.n({type:String,attribute:"tag-placement"})],h.prototype,"tagPlacement");r([o.n({type:Boolean,attribute:"open"})],h.prototype,"isOpen");r([v.r()],h.prototype,"_options");r([v.r()],h.prototype,"_value");r([v.r()],h.prototype,"_isOptionsOpen");r([v.r()],h.prototype,"_userInfoMessage");r([v.r()],h.prototype,"_addValueText");r([v.r()],h.prototype,"_maxIsReached");r([v.r()],h.prototype,"_search");r([v.r()],h.prototype,"_inputFocus");class B extends h{toggleValue(t){var $,I;if(this.disabled)return;this.touched=!0,this._userInfoMessage="",this._addValueText=null;const e=(($=u.findOptionByValue(this.options,t))==null?void 0:$.value)||null,s=this._value.includes(t||e||""),i=!!e,l=((I=this._options.find(T=>T.value===t))==null?void 0:I.disabled)||!1,n=!(t!=null&&t.trim()),p=!this.multiple,f=this.multiple,_=u.isMaxSelectionReached(this._value.length,this.maxlength);let c=!1,x=!0,g="",y="";l||(!i&&this.allowUserInput&&!n?(this.addNewUserValue(t),g="Ny verdi lagt til",c=f):!i&&!this.allowUserInput?(p&&this._value[0]&&this.removeValue(this._value[0]),x=!1,c=!0,g="Ingen treff i søket"):s?(this.removeValue(e),c=!0,p&&this._hasTextInput&&this.inputRef.value&&this.inputRef.value.type!=="hidden"&&(this.inputRef.value.value="")):n&&p?(this.removeAllSelected(),c=!0):p?(this._value[0]&&this.removeSelected(this._value[0]),this.setSelected(e),c=!1):f&&!_?(this.setSelected(e),c=!0):f&&_?(g="Maks antall valg nådd",x=!1,y=t):(p&&this.removeAllSelected(),g="Ingen gyldig verdi valgt",x=!1,c=!0,y=t),this._isOptionsOpen=c,c||(p&&this._hasTextInput&&(this._suppressNextOpen=!0),window.setTimeout(()=>{this.focusTrigger()},0)),this._userInfoMessage=g,this._search=y||"",this.resetComboboxInput(x),f&&this.updateMaxReached())}setSelected(t){if(!this._value.includes(t)){if(this.multiple&&u.isMaxSelectionReached(this._value.length,this.maxlength)){this._userInfoMessage="Maks antall valg nådd";return}!this.multiple&&this.removeAllSelected(),this._value=t?[...this._value,t]:this._value,m.markOptionSelected(this._options,t),this.resetComboboxInput(!0)}}removeSelected(t){if(!t)return;this._value=this._value.filter(s=>s!==t);const e=u.findOptionByValue(this.options,t);e&&(m.markOptionDeselected(this.options,t),e.userAdded?(this._options=[...this._options.filter(s=>s.value!==t)],this.options=[...this.options.filter(s=>s.value!==t)]):this._options.some(s=>s.value===t)||(this._options=[...this._options,e]))}addAllOptions(){if(this.multiple){if(this.maxlength&&this._options.length>this.maxlength){this._userInfoMessage="For mange valgt";return}this._value=this._options.map(t=>t.value),m.markAllSelected(this._options),this.requestUpdate()}}removeAllSelected(){this._value=[],m.markAllDeselected(this._options),this._options=m.removeUserAddedOptions(this._options),this.requestUpdate()}addValue(){var e;const t=((e=this.inputRef.value)==null?void 0:e.value.trim())||"";if(this._search=t,t&&this._value.includes(t)){this.resetComboboxInput(!0),this._userInfoMessage="Verdien er allerede valgt";return}this.toggleValue(t)}removeValue(t){this._value=this.multiple?this._value.filter(e=>e!==t):[],this.removeSelected(t)}addNewUserValue(t){if(!t||t.trim()==="")return;if(!this.multiple)this._value[0]&&this.removeSelected(this._value[0]),this._value=[t];else if(!u.findOptionByValue(this.options,t)){if(u.isMaxSelectionReached(this._value.length,this.maxlength))return;this._value=[...this._value,t]}const e={value:t,label:t,userAdded:!0,selected:!0};this.options=[e,...this.options],this._options=[e,...this._options],this.resetComboboxInput(!0),this.multiple||(this._isOptionsOpen=!1,this._hasTextInput&&(this._suppressNextOpen=!0),window.setTimeout(()=>{this.focusTrigger()},0)),this.requestUpdate()}resetComboboxInput(t=!0){this._addValueText=null,this.inputRef.value&&this.inputRef.value.type!=="hidden"&&t&&(this._search="",this.multiple?this.inputRef.value.value="":(this.inputRef.value.value=this._value[0]?O(this._value[0],this.options,this.displayValueAs):"",this._userInfoMessage="")),this._options=[...this.options]}removeLastValue(t){if(this._value.length===0)return;t.preventDefault();const e=this._value[this._value.length-1];e&&this.removeSelected(e),this.updateMaxReached()}}class E extends B{handleInput(t){if(t.stopPropagation(),t.stopImmediatePropagation(),this.disabled)return;this.touched=!0;const e=t.target;if(this._search=e.value,this.checkForMatches(),this.typeahead)if(this._search){const{filtered:s,suggestion:i}=u.findTypeaheadMatches(this.options,this._search);this._options=s,t.inputType!=="deleteContentBackward"&&(i!=null&&i.label)&&this.inputRef.value&&this.inputRef.value.type!=="hidden"&&(e.value=i.label,window.setTimeout(()=>e.setSelectionRange(this._search.length,e.value.length),0),e.selectionDirection="backward")}else this._options=[...this.options]}handleFocus(){if(!this.disabled){if(this._suppressNextOpen){this._suppressNextOpen=!1,this._inputFocus=!0,this.requestUpdate();return}!this.multiple&&this._value[0]&&this.inputRef.value&&this.inputRef.value.type!=="hidden"&&(this.inputRef.value.value=O(this._value[0],this.options,this.displayValueAs)),this._inputFocus=!0,this._search="",this._options=[...this.options],this._isOptionsOpen=!0,this.onFocus(),this.requestUpdate()}}handleFocusOut(t){var i,l;if(this.disabled||!this._isOptionsOpen)return;const e=t.relatedTarget;((i=e==null?void 0:e.closest("pkt-combobox"))==null?void 0:i.id)===this.id||((l=t.target)==null?void 0:l.getAttribute("data-focusfix"))===this.id||e===this.inputRef.value||e===this.triggerRef.value||this.closeAndProcessInput()}closeAndProcessInput(){if(this._inputFocus=!1,this._addValueText=null,this._userInfoMessage="",this._search="",this.inputRef.value&&this.inputRef.value.type!=="hidden"){const t=this.inputRef.value.value;if(this.multiple){if(t!==""){const{action:e,value:s}=M(t,this._value,this.options,this.allowUserInput,this.multiple);switch(e){case"addUserValue":this.addNewUserValue(s);break;case"selectOption":this.setSelected(s);break;case"removeValue":this.removeValue(s);break}}}else if(!t)this._value[0]&&this.removeSelected(this._value[0]);else{const e=u.findOptionByValue(this.options,t);e&&e.value!==this._value[0]?(this._value[0]&&this.removeSelected(this._value[0]),this.setSelected(e.value)):!e&&this.allowUserInput&&(this._value[0]&&this.removeSelected(this._value[0]),this.addNewUserValue(t))}!this.multiple&&this._value[0]?this.inputRef.value.value=O(this._value[0],this.options,this.displayValueAs):this.inputRef.value.value=""}this._isOptionsOpen=!1,this.onBlur()}handleBlur(){this._inputFocus=!1,this.onBlur()}handleInputClick(t){var e,s;if(this.disabled){t.preventDefault(),t.stopImmediatePropagation();return}this._hasTextInput?((e=this.inputRef.value)==null||e.focus(),this.requestUpdate()):(t.stopImmediatePropagation(),t.preventDefault(),this._isOptionsOpen=!this._isOptionsOpen,this._isOptionsOpen&&((s=this.listboxRef.value)==null||s.focusFirstOrSelectedOption()))}handlePlaceholderClick(t){this.disabled||(t.stopPropagation(),this._hasTextInput&&this.inputRef.value?(this.inputRef.value.focus(),this._inputFocus=!0,this.requestUpdate()):(this._isOptionsOpen=!this._isOptionsOpen,this.requestUpdate()))}handleSelectOnlyKeydown(t){var e,s;if(!this.disabled)switch(t.key){case"Enter":case" ":case"ArrowDown":case"ArrowUp":t.preventDefault(),this._isOptionsOpen?this._isOptionsOpen=!1:(this._isOptionsOpen=!0,(e=this.listboxRef.value)==null||e.focusFirstOrSelectedOption());break;case"Escape":this._isOptionsOpen&&(t.preventDefault(),this._isOptionsOpen=!1);break;case"Home":case"End":t.preventDefault(),this._isOptionsOpen||(this._isOptionsOpen=!0),(s=this.listboxRef.value)==null||s.focusFirstOrSelectedOption();break;case"ArrowLeft":this.multiple&&this._value.length>0&&(t.preventDefault(),this.focusTag(this._value.length-1));break;case"Backspace":case"Delete":this.multiple&&this._value.length>0&&(t.preventDefault(),this.removeSelected(this._value[this._value.length-1]));break}}handleOptionToggled(t){this.toggleValue(t.detail)}handleSearch(t){t.stopPropagation(),this._search=t.detail.toLowerCase(),this.checkForMatches()}handleInputKeydown(t){var s,i,l;if(t.key==="Backspace"){const n=!((s=this.inputRef.value)!=null&&s.value);!this._search&&n&&this.multiple&&this._value.length>0&&this.removeLastValue(t);return}if(t.key==="ArrowLeft"&&this.multiple&&this._value.length>0){const n=this.inputRef.value;if(n&&n.selectionStart===0&&!n.value){t.preventDefault(),this.focusTag(this._value.length-1);return}}const e=F(t.key,t.shiftKey,this.multiple);if(e&&!(t.key==="Tab"&&!this._isOptionsOpen)){if(e==="focusListbox"&&t.key==="Tab"&&!((i=this.listboxRef.value)==null?void 0:i.querySelector('[role="option"]:not([data-disabled]), [data-type="new-option"]'))){this.closeAndProcessInput();return}switch(t.preventDefault(),e){case"addValue":this.addValue();break;case"focusListbox":(l=this.listboxRef.value)==null||l.focusFirstOrSelectedOption();break;case"closeOptions":this._isOptionsOpen=!1;break}}}handleTagRemove(t){this.removeSelected(t),this._hasTextInput&&this.inputRef.value&&(this._inputFocus=!0,this.inputRef.value.focus(),this.requestUpdate())}getInsideTags(){return Array.from(this.querySelectorAll(".pkt-combobox__input .pkt-combobox__tag-list pkt-tag"))}focusTag(t){var i;const e=this.getInsideTags();e.forEach((l,n)=>{l.buttonTabindex=n===t?0:-1});const s=(i=e[t])==null?void 0:i.querySelector("button");s==null||s.focus()}resetTagTabindices(){this.getInsideTags().forEach(e=>{e.buttonTabindex=-1})}handleTagKeydown(t,e){t.stopPropagation();const s=()=>{var i;this.resetTagTabindices(),this._hasTextInput&&this.inputRef.value?this.inputRef.value.focus():(i=this.triggerRef.value)==null||i.focus()};switch(t.key){case"ArrowLeft":t.preventDefault(),e>0&&this.focusTag(e-1);break;case"ArrowRight":t.preventDefault(),e<this._value.length-1?this.focusTag(e+1):s();break;case"Backspace":case"Delete":t.preventDefault();{const i=this._value[e],l=e>=this._value.length-1?e-1:e;this.removeSelected(i),l>=0?(this.requestUpdate(),this.updateComplete.then(()=>this.focusTag(l))):s()}break;case"Tab":this.resetTagTabindices();break;case"Escape":t.preventDefault(),s();break}}checkForMatches(){var s;const t=((s=this.inputRef.value)==null?void 0:s.value)||this._search||"",e=U(t,this._value,this.options,this.allowUserInput,this.multiple);if(e.shouldRemoveValue&&this.removeValue(this._value[0]),e.shouldResetInput){this.resetComboboxInput(!1);return}this._addValueText=e.addValueText,this._userInfoMessage=e.userInfoMessage}}var N=Object.getOwnPropertyDescriptor,L=(a,t,e,s)=>{for(var i=s>1?void 0:s?N(t,e):t,l=a.length-1,n;l>=0;l--)(n=a[l])&&(i=n(i)||i);return i};exports.PktCombobox=class extends E{constructor(){super(...arguments),this.handleBodyClick=t=>{this._isOptionsOpen&&!this.contains(t.target)&&this.closeAndProcessInput()}}connectedCallback(){var t,e;if(super.connectedCallback(),document==null||document.body.addEventListener("click",this.handleBodyClick),this._options=[],this.defaultOptions&&this.defaultOptions.length){const s=((t=this.options)==null?void 0:t.filter(i=>i.userAdded))||[];this.options=[...s,...JSON.parse(JSON.stringify(this.defaultOptions))],this._options=Array.isArray(this.options)?[...this.options]:[]}if((e=this.optionsController)!=null&&e.nodes&&this.optionsController.nodes.length){const s=A.parseOptionsFromSlot(this.optionsController.nodes);s.length&&(this.options=[...s],this._options=[...s],this._optionsFromSlot=!0,this._lastSlotGeneration=this.optionsController.generation)}}willUpdate(t){if(this._optionsFromSlot&&this.optionsController){const e=this.optionsController.generation;if(e!==this._lastSlotGeneration){this._lastSlotGeneration=e;const s=A.parseOptionsFromSlot(this.optionsController.nodes),i=this._options.filter(l=>l.userAdded);this.options=[...i,...s]}}super.willUpdate(t)}disconnectedCallback(){super.disconnectedCallback(),document==null||document.body.removeEventListener("click",this.handleBodyClick)}firstUpdated(t){this.defaultValue!==null&&!this.value&&(this.value=this.defaultValue),super.firstUpdated(t)}updated(t){t.has("isOpen")&&(this._isOptionsOpen=this.isOpen);const e=t.has("value"),s=t.has("_value");if(e&&this._internalValueSync)this._internalValueSync=!1,s&&this.syncValueAndDispatch(t.get("_value"));else if(e){const l=[...this._value],n=this.parseValue();n.join(",")!==this._value.join(",")&&(this._value=n),this.updateMaxReached(),this.syncValueAndDispatch(l)}else s&&this.syncValueAndDispatch(t.get("_value"));if(t.has("defaultOptions")&&this.defaultOptions.length){const l=(Array.isArray(this.options)?this.options:[]).filter(n=>n.userAdded)||[];this.options=[...l,...JSON.parse(JSON.stringify(this.defaultOptions))],this._options=Array.isArray(this.options)?[...this.options]:[]}if(t.has("options")){const l=t.get("options")||this._options||[],n=k.mergeWithUserAdded(this.options,l);this._options=n,n.length>this.options.length&&(this.options=n);const p=k.syncOptionsWithValues(this._options,this._value);if(this._options=p.options,p.newValues.length>this._value.length){const f=[...this._value];this._value=p.newValues,this.syncValueAndDispatch(f)}}if(t.has("_search")&&this.dispatchEvent(new CustomEvent("search",{detail:this._search,bubbles:!1})),!this._isOptionsOpen&&!this.multiple&&this._hasTextInput&&this.inputRef.value&&this.inputRef.value.type!=="hidden"){const l=this._value[0]?O(this._value[0],this.options,this.displayValueAs):"";this.inputRef.value.value!==l&&(this.inputRef.value.value=l)}super.updated(t)}formResetCallback(){this.touched=!1;const t=this.defaultValue||(this.multiple,"");this.value=t,this._value=this.parseValue(),this._options=this._options.filter(e=>!e.userAdded).map(e=>({...e,selected:this._value.includes(e.value)})),this.options=this.options.filter(e=>!e.userAdded).map(e=>({...e,selected:this._value.includes(e.value)})),this._search="",this._isOptionsOpen=!1,this._userInfoMessage="",this._addValueText=null,this._inputFocus=!1,this.updateMaxReached(),this.inputRef.value&&this.inputRef.value.type!=="hidden"&&(this.inputRef.value.value=""),this.internals.setFormValue(""),this.internals.ariaInvalid="false",this.requestUpdate()}attributeChangedCallback(t,e,s){if(t==="options"){this._options=Array.isArray(this.options)?[...this.options]:[];const i=k.syncOptionsWithValues(this._options,this._value);this._options=i.options,i.newValues.length>this._value.length&&(this._value=i.newValues),this._search=""}super.attributeChangedCallback(t,e,s)}render(){return o.b`
|
|
2
|
+
<pkt-input-wrapper
|
|
3
|
+
.label=${this.label}
|
|
4
|
+
.helptext=${this.helptext}
|
|
5
|
+
.helptextDropdown=${d.o(this.helptextDropdown)}
|
|
6
|
+
.helptextDropdownButton=${d.o(this.helptextDropdownButton)}
|
|
7
|
+
?fullwidth=${this.fullwidth}
|
|
8
|
+
?hasError=${this.hasError}
|
|
9
|
+
?inline=${this.inline}
|
|
10
|
+
?disabled=${this.disabled}
|
|
11
|
+
.errorMessage=${this.errorMessage}
|
|
12
|
+
?optionalTag=${this.optionalTag}
|
|
13
|
+
.optionalText=${this.optionalText}
|
|
14
|
+
?requiredTag=${this.requiredTag}
|
|
15
|
+
.requiredText=${this.requiredText}
|
|
16
|
+
.tagText=${this.tagText}
|
|
17
|
+
useWrapper=${this.useWrapper}
|
|
18
|
+
.forId=${this._hasTextInput?this.id+"-input":this.id+"-combobox"}
|
|
19
|
+
?hasFieldset=${!this._hasTextInput}
|
|
20
|
+
class="pkt-combobox__wrapper"
|
|
21
|
+
@labelClick=${this.handleInputClick}
|
|
22
|
+
>
|
|
23
|
+
<div class="pkt-contents" slot="helptext">${R.slotContent(this,"helptext")}</div>
|
|
24
|
+
<div class="pkt-combobox" @focusout=${this.handleFocusOut}>
|
|
25
|
+
<div
|
|
26
|
+
class=${V.e({"pkt-combobox__input":!0,"pkt-combobox__input--fullwidth":this.fullwidth,"pkt-combobox__input--open":this._isOptionsOpen,"pkt-combobox__input--error":this.hasError,"pkt-combobox__input--disabled":this.disabled})}
|
|
27
|
+
id=${d.o(this._hasTextInput?void 0:`${this.id}-combobox`)}
|
|
28
|
+
role=${d.o(this._hasTextInput?void 0:"combobox")}
|
|
29
|
+
aria-expanded=${d.o(this._hasTextInput?void 0:this._isOptionsOpen?"true":"false")}
|
|
30
|
+
aria-controls=${d.o(this._hasTextInput?void 0:`${this.id}-listbox`)}
|
|
31
|
+
aria-haspopup=${d.o(this._hasTextInput?void 0:"listbox")}
|
|
32
|
+
aria-labelledby=${d.o(this._hasTextInput?void 0:`${this.id}-combobox-label`)}
|
|
33
|
+
aria-activedescendant=${d.o(!this._hasTextInput&&this._value[0]&&u.findOptionByValue(this.options,this._value[0])?`${this.id}-listbox-${u.findOptionIndex(this._options,this._value[0])}`:void 0)}
|
|
34
|
+
aria-description=${d.o(this._selectionDescription||void 0)}
|
|
35
|
+
tabindex=${this._hasTextInput||this.disabled?"-1":"0"}
|
|
36
|
+
@click=${this.handleInputClick}
|
|
37
|
+
@keydown=${this._hasTextInput?o.A:this.handleSelectOnlyKeydown}
|
|
38
|
+
${b.n(this.triggerRef)}
|
|
39
|
+
>
|
|
40
|
+
${!this._hasTextInput&&this.placeholder&&(!this._value.length||this.multiple&&this.tagPlacement=="outside")&&!this._inputFocus?o.b`<span class="pkt-combobox__placeholder" @click=${this.handlePlaceholderClick}
|
|
41
|
+
>${this.placeholder}</span
|
|
42
|
+
>`:this.tagPlacement!=="outside"?this.renderSingleOrMultipleValues():o.A}
|
|
43
|
+
${this.renderInputField()}
|
|
44
|
+
<pkt-icon
|
|
45
|
+
class=${V.e({"pkt-combobox__arrow-icon":!0,"pkt-combobox__arrow-icon--open":this._isOptionsOpen})}
|
|
46
|
+
name="chevron-thin-down"
|
|
47
|
+
aria-hidden="true"
|
|
48
|
+
></pkt-icon>
|
|
49
|
+
</div>
|
|
50
|
+
|
|
51
|
+
<pkt-listbox
|
|
52
|
+
id="${this.id}-listbox"
|
|
53
|
+
.options=${this._options}
|
|
54
|
+
.isOpen=${this._isOptionsOpen}
|
|
55
|
+
.searchPlaceholder=${this.searchPlaceholder}
|
|
56
|
+
.label="Liste: ${this.label||""}"
|
|
57
|
+
?include-search=${this.includeSearch}
|
|
58
|
+
?is-multi-select=${this.multiple}
|
|
59
|
+
?allow-user-input=${this.allowUserInput&&!this._maxIsReached}
|
|
60
|
+
?max-is-reached=${this._maxIsReached}
|
|
61
|
+
.customUserInput=${d.o(this._addValueText)}
|
|
62
|
+
.userMessage=${this._userInfoMessage}
|
|
63
|
+
@search=${this.handleSearch}
|
|
64
|
+
@option-toggle=${this.handleOptionToggled}
|
|
65
|
+
@select-all=${this.addAllOptions}
|
|
66
|
+
@close-options=${()=>this._isOptionsOpen=!1}
|
|
67
|
+
@tab-close=${()=>this.closeAndProcessInput()}
|
|
68
|
+
.searchValue=${this._search||null}
|
|
69
|
+
.maxLength=${this.maxlength||0}
|
|
70
|
+
${b.n(this.listboxRef)}
|
|
71
|
+
></pkt-listbox>
|
|
72
|
+
</div>
|
|
73
|
+
|
|
74
|
+
${this.tagPlacement==="outside"&&this.multiple?o.b`<div class="pkt-combobox__tags-outside">
|
|
75
|
+
${this.renderSingleOrMultipleValues()}
|
|
76
|
+
</div>`:o.A}
|
|
77
|
+
</pkt-input-wrapper>
|
|
78
|
+
`}renderInputField(){return this.typeahead||this.allowUserInput?o.b`
|
|
79
|
+
<div class="pkt-combobox__input-div combobox__input">
|
|
80
|
+
<input
|
|
81
|
+
type="text"
|
|
82
|
+
id="${this.id}-input"
|
|
83
|
+
name=${(this.name||this.id)+"-input"}
|
|
84
|
+
placeholder=${d.o(!this._value.length||this.multiple&&this.tagPlacement==="outside"?this.placeholder:void 0)}
|
|
85
|
+
@input=${this.handleInput}
|
|
86
|
+
@change=${t=>{t.stopPropagation(),t.stopImmediatePropagation()}}
|
|
87
|
+
@keydown=${this.handleInputKeydown}
|
|
88
|
+
@focus=${this.handleFocus}
|
|
89
|
+
@blur=${this.handleBlur}
|
|
90
|
+
autocomplete="off"
|
|
91
|
+
role="combobox"
|
|
92
|
+
aria-expanded=${this._isOptionsOpen?"true":"false"}
|
|
93
|
+
aria-label=${d.o(this.label)}
|
|
94
|
+
aria-autocomplete=${this.typeahead?"both":this.allowUserInput?"list":"none"}
|
|
95
|
+
aria-controls="${this.id}-listbox"
|
|
96
|
+
aria-activedescendant=${d.o(this._value[0]&&u.findOptionByValue(this.options,this._value[0])?`${this.id}-listbox-${u.findOptionIndex(this._options,this._value[0])}`:void 0)}
|
|
97
|
+
aria-description=${d.o(this._selectionDescription||void 0)}
|
|
98
|
+
${b.n(this.inputRef)}
|
|
99
|
+
/>
|
|
100
|
+
</div>
|
|
101
|
+
`:o.b`
|
|
102
|
+
<input
|
|
103
|
+
type="hidden"
|
|
104
|
+
id="${this.id}-input"
|
|
105
|
+
name=${(this.name||this.id)+"-input"}
|
|
106
|
+
.value=${this._value.join(",")}
|
|
107
|
+
${b.n(this.inputRef)}
|
|
108
|
+
/>
|
|
109
|
+
`}renderSingleOrMultipleValues(){if(!this.multiple&&this._hasTextInput)return o.A;const t=!this.multiple,e=this.renderValueTag(u.findOptionByValue(this.options,this._value[0])),s=this.tagPlacement==="outside",i=o.b`
|
|
110
|
+
<ul role="list" class="pkt-combobox__tag-list">
|
|
111
|
+
${S.c(this._value,l=>l,(l,n)=>{const p=u.findOptionByValue(this.options,l),f=p==null?void 0:p.tagSkinColor;return o.b`
|
|
112
|
+
<li
|
|
113
|
+
role="listitem"
|
|
114
|
+
@click=${s?o.A:_=>_.stopPropagation()}
|
|
115
|
+
@mousedown=${s?o.A:_=>_.preventDefault()}
|
|
116
|
+
>
|
|
117
|
+
<pkt-tag
|
|
118
|
+
skin=${f||"blue-dark"}
|
|
119
|
+
?closeTag=${!this.disabled}
|
|
120
|
+
.buttonTabindex=${s?void 0:-1}
|
|
121
|
+
@close=${()=>this.handleTagRemove(l)}
|
|
122
|
+
@keydown=${s?o.A:_=>this.handleTagKeydown(_,n)}
|
|
123
|
+
>
|
|
124
|
+
${this.renderValueTag(p)}
|
|
125
|
+
</pkt-tag>
|
|
126
|
+
</li>
|
|
127
|
+
`})}
|
|
128
|
+
</ul>
|
|
129
|
+
`;return t?e:i}renderValueTag(t){if(!t)return"";switch(this.displayValueAs){case"prefixAndValue":return o.b`<span class="pkt-combobox__value" data-focusfix=${this.id}
|
|
130
|
+
>${t.prefix||""} ${t.value}</span
|
|
131
|
+
>`;case"value":return o.b`<span class="pkt-combobox__value" data-focusfix=${this.id}
|
|
132
|
+
>${t.value}</span
|
|
133
|
+
>`;case"label":default:return o.b`<span class="pkt-combobox__value" data-focusfix=${this.id}
|
|
134
|
+
>${t.label||t.value}</span
|
|
135
|
+
>`}}};exports.PktCombobox=L([o.t("pkt-combobox")],exports.PktCombobox);
|