@oslokommune/punkt-elements 12.39.6 → 12.39.8
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 +35 -0
- package/dist/{card-CZG7XGlj.js → card-Bx2WyoYH.js} +62 -62
- package/dist/card-C8wbJJyj.cjs +87 -0
- package/dist/{checkbox-zqd3KVfz.cjs → checkbox-7ct89AUo.cjs} +1 -1
- package/dist/{checkbox-Ds1FrhqK.js → checkbox-D5fSFvhs.js} +1 -1
- package/dist/{combobox-B6x7Qukm.js → combobox-DewmPXyJ.js} +1 -1
- package/dist/{combobox-yUrUarU_.cjs → combobox-dwkB9Yv_.cjs} +1 -1
- package/dist/{datepicker-CH5ZmFhf.cjs → datepicker-BDnncwne.cjs} +1 -1
- package/dist/{datepicker-WpOJS948.js → datepicker-CISpFZSs.js} +1 -1
- package/dist/index.d.ts +5 -6
- package/dist/{input-element-4hgBpSNJ.js → input-element-B2GjFOXX.js} +1 -1
- package/dist/input-element-DK0UmdGZ.cjs +1 -0
- 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-datepicker.cjs +1 -1
- package/dist/pkt-datepicker.js +1 -1
- package/dist/pkt-index.cjs +1 -1
- package/dist/pkt-index.js +8 -8
- 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-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/radiobutton-CET0zjgD.js +86 -0
- package/dist/radiobutton-DGWTMdAZ.cjs +25 -0
- package/dist/{select-BCL790jM.cjs → select-Brv7vglu.cjs} +1 -1
- package/dist/{select-D3LR5zgE.js → select-C36Z4gui.js} +1 -1
- package/dist/{textarea-B8H6-8qY.js → textarea-l10XGym1.js} +1 -1
- package/dist/{textarea-DxbylapQ.cjs → textarea-yUzqcBYY.cjs} +1 -1
- package/dist/{textinput-B__c4c1z.cjs → textinput-8mT0npMY.cjs} +1 -1
- package/dist/{textinput-CPYLokFV.js → textinput-B1n0gFaS.js} +1 -1
- package/package.json +3 -3
- package/src/components/card/card.ts +12 -12
- package/src/components/radiobutton/radiobutton.ts +2 -15
- package/dist/card-Di1MQneh.cjs +0 -87
- package/dist/input-element-CwUniARD.cjs +0 -1
- package/dist/radiobutton-CI2xaqAB.cjs +0 -25
- package/dist/radiobutton-CYJawqxD.js +0 -89
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,41 @@ og skriver commits ca etter [Conventional Commits](https://conventionalcommits.o
|
|
|
5
5
|
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
+
## [12.39.8](https://github.com/oslokommune/punkt/compare/12.39.7...12.39.8) (2025-05-19)
|
|
9
|
+
|
|
10
|
+
### ⚠ BREAKING CHANGES
|
|
11
|
+
Ingen
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
Ingen
|
|
15
|
+
|
|
16
|
+
### Bug Fixes
|
|
17
|
+
Ingen
|
|
18
|
+
|
|
19
|
+
### Chores
|
|
20
|
+
Ingen
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
## [12.39.7](https://github.com/oslokommune/punkt/compare/12.39.6...12.39.7) (2025-05-16)
|
|
26
|
+
|
|
27
|
+
### ⚠ BREAKING CHANGES
|
|
28
|
+
Ingen
|
|
29
|
+
|
|
30
|
+
### Features
|
|
31
|
+
Ingen
|
|
32
|
+
|
|
33
|
+
### Bug Fixes
|
|
34
|
+
* [2559](https://github.com/oslokommune/punkt/issues/2559) #2560 #2561 Bugs i Accordion og Radiobutton (#2562).
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
### Chores
|
|
38
|
+
Ingen
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
|
|
8
43
|
## [12.39.6](https://github.com/oslokommune/punkt/compare/12.39.5...12.39.6) (2025-05-16)
|
|
9
44
|
|
|
10
45
|
### ⚠ BREAKING CHANGES
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { e as
|
|
2
|
-
import { o as
|
|
3
|
-
import { P as
|
|
4
|
-
import { P as
|
|
1
|
+
import { e as g } from "./class-map-KyMqi0fa.js";
|
|
2
|
+
import { o as c } from "./if-defined-BErSJCeJ.js";
|
|
3
|
+
import { P as m, E as d, x as t, n as i, a as $ } from "./element-DjjF_tEh.js";
|
|
4
|
+
import { P as u } from "./pkt-slot-controller-DtDaD9q_.js";
|
|
5
5
|
import { e as _, n as y } from "./ref-iIffqQAI.js";
|
|
6
6
|
import "./icon-Beoxup8E.js";
|
|
7
7
|
import "./tag-Cu8afZy8.js";
|
|
@@ -18,18 +18,18 @@ const b = {
|
|
|
18
18
|
}, k = {
|
|
19
19
|
props: b
|
|
20
20
|
};
|
|
21
|
-
var f = Object.defineProperty, S = Object.getOwnPropertyDescriptor,
|
|
22
|
-
for (var n = o > 1 ? void 0 : o ? S(s, p) : s, h =
|
|
23
|
-
(l =
|
|
21
|
+
var f = Object.defineProperty, S = Object.getOwnPropertyDescriptor, a = (r, s, p, o) => {
|
|
22
|
+
for (var n = o > 1 ? void 0 : o ? S(s, p) : s, h = r.length - 1, l; h >= 0; h--)
|
|
23
|
+
(l = r[h]) && (n = (o ? l(s, p, n) : l(n)) || n);
|
|
24
24
|
return o && n && f(s, p, n), n;
|
|
25
25
|
};
|
|
26
|
-
let e = class extends
|
|
26
|
+
let e = class extends m {
|
|
27
27
|
//Constructor
|
|
28
28
|
constructor() {
|
|
29
|
-
super(), this.defaultSlot = _(), this.ariaLabel = "", this.
|
|
29
|
+
super(), this.defaultSlot = _(), this.ariaLabel = "", this.metaLead = null, this.borderOnHover = !0, this.clickCardLink = null, this.metaTrail = null, this.direction = k.props.direction.default, this.heading = "", this.headinglevel = 3, this.image = {
|
|
30
30
|
src: "",
|
|
31
31
|
alt: ""
|
|
32
|
-
}, this.imageShape = "square", this.openLinkInNewTab = !1, this.padding = k.props.padding.default, this.skin = k.props.skin.default, this.subheading = "", this.tagPosition = "top", this.tags = [], this.slotController = new
|
|
32
|
+
}, this.imageShape = "square", this.openLinkInNewTab = !1, this.padding = k.props.padding.default, this.skin = k.props.skin.default, this.subheading = "", this.tagPosition = "top", this.tags = [], this.slotController = new u(this, this.defaultSlot);
|
|
33
33
|
}
|
|
34
34
|
connectedCallback() {
|
|
35
35
|
super.connectedCallback();
|
|
@@ -39,7 +39,7 @@ let e = class extends u {
|
|
|
39
39
|
// prettier-ignore
|
|
40
40
|
render() {
|
|
41
41
|
var o, n;
|
|
42
|
-
const
|
|
42
|
+
const r = {
|
|
43
43
|
"pkt-card": !0,
|
|
44
44
|
[`pkt-card--${this.skin}`]: this.skin,
|
|
45
45
|
[`pkt-card--${this.direction}`]: this.direction,
|
|
@@ -48,8 +48,8 @@ let e = class extends u {
|
|
|
48
48
|
}, s = ((o = this.ariaLabel) == null ? void 0 : o.trim()) || (this.heading ? `${this.heading} lenkekort` : "lenkekort"), p = ((n = this.ariaLabel) == null ? void 0 : n.trim()) || (this.heading ? this.heading : "kort");
|
|
49
49
|
return t`
|
|
50
50
|
<article
|
|
51
|
-
class=${
|
|
52
|
-
aria-label=${
|
|
51
|
+
class=${g(r)}
|
|
52
|
+
aria-label=${c(this.clickCardLink ? s : p)}
|
|
53
53
|
>
|
|
54
54
|
${this.renderImage()}
|
|
55
55
|
<div class="pkt-card__wrapper">
|
|
@@ -57,20 +57,20 @@ let e = class extends u {
|
|
|
57
57
|
${this.renderHeader()}
|
|
58
58
|
${this.renderSlot()}
|
|
59
59
|
${this.tagPosition === "bottom" ? this.renderTags() : d}
|
|
60
|
-
${this.
|
|
60
|
+
${this.renderMetadata()}
|
|
61
61
|
</div>
|
|
62
62
|
</article>
|
|
63
63
|
`;
|
|
64
64
|
}
|
|
65
65
|
// Render methods for different parts of the card
|
|
66
66
|
renderImage() {
|
|
67
|
-
const
|
|
67
|
+
const r = {
|
|
68
68
|
"pkt-card__image": !0,
|
|
69
69
|
[`pkt-card__image-${this.imageShape}`]: this.imageShape
|
|
70
70
|
};
|
|
71
71
|
return t`
|
|
72
72
|
${this.image.src && t`
|
|
73
|
-
<div class=${
|
|
73
|
+
<div class=${g(r)}>
|
|
74
74
|
<img src=${this.image.src} alt=${this.image.alt || ""} />
|
|
75
75
|
</div>
|
|
76
76
|
`}
|
|
@@ -119,9 +119,9 @@ let e = class extends u {
|
|
|
119
119
|
// Render header
|
|
120
120
|
// prettier-ignore
|
|
121
121
|
renderHeader() {
|
|
122
|
-
const
|
|
122
|
+
const r = !!this.heading || !!this.subheading;
|
|
123
123
|
return t`
|
|
124
|
-
${
|
|
124
|
+
${r ? t`
|
|
125
125
|
<header class="pkt-card__header">
|
|
126
126
|
${this.renderHeading()}
|
|
127
127
|
${this.renderLinkHeading()}
|
|
@@ -131,14 +131,14 @@ let e = class extends u {
|
|
|
131
131
|
`;
|
|
132
132
|
}
|
|
133
133
|
renderTags() {
|
|
134
|
-
const
|
|
134
|
+
const r = {
|
|
135
135
|
"pkt-card__tags": !0,
|
|
136
136
|
[`pkt-card__tags-${this.tagPosition}`]: this.tagPosition
|
|
137
137
|
};
|
|
138
138
|
return t`
|
|
139
139
|
${this.tags.length > 0 ? t`
|
|
140
140
|
<div
|
|
141
|
-
class=${
|
|
141
|
+
class=${g(r)}
|
|
142
142
|
role="list"
|
|
143
143
|
aria-label=${this.tags.length > 1 ? "merkelapper" : "merkelapp"}
|
|
144
144
|
>
|
|
@@ -148,8 +148,8 @@ let e = class extends u {
|
|
|
148
148
|
role="listitem"
|
|
149
149
|
textStyle="normal-text"
|
|
150
150
|
size="medium"
|
|
151
|
-
skin=${
|
|
152
|
-
iconName=${
|
|
151
|
+
skin=${c(s.skin)}
|
|
152
|
+
iconName=${c(s.iconName)}
|
|
153
153
|
>
|
|
154
154
|
${s.text}
|
|
155
155
|
</pkt-tag>
|
|
@@ -164,66 +164,66 @@ let e = class extends u {
|
|
|
164
164
|
${this.defaultSlot && t`<section class="pkt-card__content" ${y(this.defaultSlot)}></section>`}
|
|
165
165
|
`;
|
|
166
166
|
}
|
|
167
|
-
|
|
167
|
+
renderMetadata() {
|
|
168
168
|
return t`
|
|
169
|
-
${this.
|
|
170
|
-
<footer class="pkt-
|
|
171
|
-
${this.
|
|
172
|
-
${this.
|
|
169
|
+
${this.metaLead || this.metaTrail ? t`
|
|
170
|
+
<footer class="pkt-card__metadata">
|
|
171
|
+
${this.metaLead ? t`<span class="pkt-card__metadata-lead">${this.metaLead}</span>` : d}
|
|
172
|
+
${this.metaTrail ? t`<span class="pkt-card__metadata-trail">${this.metaTrail}</span>` : d}
|
|
173
173
|
</footer>
|
|
174
174
|
` : d}
|
|
175
175
|
`;
|
|
176
176
|
}
|
|
177
177
|
};
|
|
178
|
-
|
|
179
|
-
|
|
178
|
+
a([
|
|
179
|
+
i({ type: String })
|
|
180
180
|
], e.prototype, "ariaLabel", 2);
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
], e.prototype, "
|
|
184
|
-
|
|
185
|
-
|
|
181
|
+
a([
|
|
182
|
+
i({ type: String })
|
|
183
|
+
], e.prototype, "metaLead", 2);
|
|
184
|
+
a([
|
|
185
|
+
i({ type: Boolean })
|
|
186
186
|
], e.prototype, "borderOnHover", 2);
|
|
187
|
-
|
|
188
|
-
|
|
187
|
+
a([
|
|
188
|
+
i({ type: String, reflect: !0 })
|
|
189
189
|
], e.prototype, "clickCardLink", 2);
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
], e.prototype, "
|
|
193
|
-
|
|
194
|
-
|
|
190
|
+
a([
|
|
191
|
+
i({ type: String })
|
|
192
|
+
], e.prototype, "metaTrail", 2);
|
|
193
|
+
a([
|
|
194
|
+
i({ type: String })
|
|
195
195
|
], e.prototype, "direction", 2);
|
|
196
|
-
|
|
197
|
-
|
|
196
|
+
a([
|
|
197
|
+
i({ type: String })
|
|
198
198
|
], e.prototype, "heading", 2);
|
|
199
|
-
|
|
200
|
-
|
|
199
|
+
a([
|
|
200
|
+
i({ type: Number })
|
|
201
201
|
], e.prototype, "headinglevel", 2);
|
|
202
|
-
|
|
203
|
-
|
|
202
|
+
a([
|
|
203
|
+
i({ type: Object })
|
|
204
204
|
], e.prototype, "image", 2);
|
|
205
|
-
|
|
206
|
-
|
|
205
|
+
a([
|
|
206
|
+
i({ type: String })
|
|
207
207
|
], e.prototype, "imageShape", 2);
|
|
208
|
-
|
|
209
|
-
|
|
208
|
+
a([
|
|
209
|
+
i({ type: Boolean })
|
|
210
210
|
], e.prototype, "openLinkInNewTab", 2);
|
|
211
|
-
|
|
212
|
-
|
|
211
|
+
a([
|
|
212
|
+
i({ type: String })
|
|
213
213
|
], e.prototype, "padding", 2);
|
|
214
|
-
|
|
215
|
-
|
|
214
|
+
a([
|
|
215
|
+
i({ type: String })
|
|
216
216
|
], e.prototype, "skin", 2);
|
|
217
|
-
|
|
218
|
-
|
|
217
|
+
a([
|
|
218
|
+
i({ type: String })
|
|
219
219
|
], e.prototype, "subheading", 2);
|
|
220
|
-
|
|
221
|
-
|
|
220
|
+
a([
|
|
221
|
+
i({ type: String })
|
|
222
222
|
], e.prototype, "tagPosition", 2);
|
|
223
|
-
|
|
224
|
-
|
|
223
|
+
a([
|
|
224
|
+
i({ type: Array })
|
|
225
225
|
], e.prototype, "tags", 2);
|
|
226
|
-
e =
|
|
226
|
+
e = a([
|
|
227
227
|
$("pkt-card")
|
|
228
228
|
], e);
|
|
229
229
|
export {
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
"use strict";const p=require("./class-map-DCyaICmy.cjs"),l=require("./if-defined-a3sotaUr.cjs"),t=require("./element-BSypUpzA.cjs"),g=require("./pkt-slot-controller-Da-RgXfS.cjs"),c=require("./ref-BvbyvXRH.cjs");require("./icon-BnKGwYjj.cjs");require("./tag-B9kFYxHg.cjs");const k={skin:{default:"outlined"},direction:{default:"portrait"},padding:{default:"standard"}},h={props:k};var u=Object.defineProperty,m=Object.getOwnPropertyDescriptor,e=(d,a,r,s)=>{for(var i=s>1?void 0:s?m(a,r):a,n=d.length-1,o;n>=0;n--)(o=d[n])&&(i=(s?o(a,r,i):o(i))||i);return s&&i&&u(a,r,i),i};exports.PktCard=class extends t.PktElement{constructor(){super(),this.defaultSlot=c.e(),this.ariaLabel="",this.metaLead=null,this.borderOnHover=!0,this.clickCardLink=null,this.metaTrail=null,this.direction=h.props.direction.default,this.heading="",this.headinglevel=3,this.image={src:"",alt:""},this.imageShape="square",this.openLinkInNewTab=!1,this.padding=h.props.padding.default,this.skin=h.props.skin.default,this.subheading="",this.tagPosition="top",this.tags=[],this.slotController=new g.PktSlotController(this,this.defaultSlot)}connectedCallback(){super.connectedCallback()}render(){var i,n;const a={"pkt-card":!0,[`pkt-card--${this.skin}`]:this.skin,[`pkt-card--${this.direction}`]:this.direction,[`pkt-card--padding-${this.padding}`]:this.padding,"pkt-card--border-on-hover":this.borderOnHover},r=((i=this.ariaLabel)==null?void 0:i.trim())||(this.heading?`${this.heading} lenkekort`:"lenkekort"),s=((n=this.ariaLabel)==null?void 0:n.trim())||(this.heading?this.heading:"kort");return t.x`
|
|
2
|
+
<article
|
|
3
|
+
class=${p.e(a)}
|
|
4
|
+
aria-label=${l.o(this.clickCardLink?r:s)}
|
|
5
|
+
>
|
|
6
|
+
${this.renderImage()}
|
|
7
|
+
<div class="pkt-card__wrapper">
|
|
8
|
+
${this.tagPosition==="top"?this.renderTags():t.E}
|
|
9
|
+
${this.renderHeader()}
|
|
10
|
+
${this.renderSlot()}
|
|
11
|
+
${this.tagPosition==="bottom"?this.renderTags():t.E}
|
|
12
|
+
${this.renderMetadata()}
|
|
13
|
+
</div>
|
|
14
|
+
</article>
|
|
15
|
+
`}renderImage(){const a={"pkt-card__image":!0,[`pkt-card__image-${this.imageShape}`]:this.imageShape};return t.x`
|
|
16
|
+
${this.image.src&&t.x`
|
|
17
|
+
<div class=${p.e(a)}>
|
|
18
|
+
<img src=${this.image.src} alt=${this.image.alt||""} />
|
|
19
|
+
</div>
|
|
20
|
+
`}
|
|
21
|
+
`}renderHeading(){return t.x`
|
|
22
|
+
${this.heading&&!this.clickCardLink?t.x`
|
|
23
|
+
<pkt-heading
|
|
24
|
+
class="pkt-card__heading"
|
|
25
|
+
.level=${this.headinglevel||3}
|
|
26
|
+
size="medium"
|
|
27
|
+
nospacing
|
|
28
|
+
>
|
|
29
|
+
${this.heading}
|
|
30
|
+
</pkt-heading>
|
|
31
|
+
`:t.E}
|
|
32
|
+
`}renderLinkHeading(){return t.x`
|
|
33
|
+
${this.clickCardLink?t.x`
|
|
34
|
+
<pkt-heading
|
|
35
|
+
class="pkt-card__link-heading pkt-card__heading"
|
|
36
|
+
.level=${this.headinglevel||3}
|
|
37
|
+
size="medium"
|
|
38
|
+
nospacing
|
|
39
|
+
>
|
|
40
|
+
<a
|
|
41
|
+
class="pkt-card__link"
|
|
42
|
+
href=${this.clickCardLink}
|
|
43
|
+
target=${this.openLinkInNewTab?"_blank":"_self"}
|
|
44
|
+
>${this.heading}</a
|
|
45
|
+
>
|
|
46
|
+
</pkt-heading>
|
|
47
|
+
`:t.E}
|
|
48
|
+
`}renderSubheading(){return t.x`
|
|
49
|
+
${this.subheading?t.x` <p class="pkt-card__subheading ">${this.subheading}</p> `:t.E}
|
|
50
|
+
`}renderHeader(){const a=!!this.heading||!!this.subheading;return t.x`
|
|
51
|
+
${a?t.x`
|
|
52
|
+
<header class="pkt-card__header">
|
|
53
|
+
${this.renderHeading()}
|
|
54
|
+
${this.renderLinkHeading()}
|
|
55
|
+
${this.renderSubheading()}
|
|
56
|
+
</header>
|
|
57
|
+
`:t.E}
|
|
58
|
+
`}renderTags(){const a={"pkt-card__tags":!0,[`pkt-card__tags-${this.tagPosition}`]:this.tagPosition};return t.x`
|
|
59
|
+
${this.tags.length>0?t.x`
|
|
60
|
+
<div
|
|
61
|
+
class=${p.e(a)}
|
|
62
|
+
role="list"
|
|
63
|
+
aria-label=${this.tags.length>1?"merkelapper":"merkelapp"}
|
|
64
|
+
>
|
|
65
|
+
${this.tags.map(r=>t.x`
|
|
66
|
+
<pkt-tag
|
|
67
|
+
role="listitem"
|
|
68
|
+
textStyle="normal-text"
|
|
69
|
+
size="medium"
|
|
70
|
+
skin=${l.o(r.skin)}
|
|
71
|
+
iconName=${l.o(r.iconName)}
|
|
72
|
+
>
|
|
73
|
+
${r.text}
|
|
74
|
+
</pkt-tag>
|
|
75
|
+
`)}
|
|
76
|
+
</div>
|
|
77
|
+
`:t.E}
|
|
78
|
+
`}renderSlot(){return t.x`
|
|
79
|
+
${this.defaultSlot&&t.x`<section class="pkt-card__content" ${c.n(this.defaultSlot)}></section>`}
|
|
80
|
+
`}renderMetadata(){return t.x`
|
|
81
|
+
${this.metaLead||this.metaTrail?t.x`
|
|
82
|
+
<footer class="pkt-card__metadata">
|
|
83
|
+
${this.metaLead?t.x`<span class="pkt-card__metadata-lead">${this.metaLead}</span>`:t.E}
|
|
84
|
+
${this.metaTrail?t.x`<span class="pkt-card__metadata-trail">${this.metaTrail}</span>`:t.E}
|
|
85
|
+
</footer>
|
|
86
|
+
`:t.E}
|
|
87
|
+
`}};e([t.n({type:String})],exports.PktCard.prototype,"ariaLabel",2);e([t.n({type:String})],exports.PktCard.prototype,"metaLead",2);e([t.n({type:Boolean})],exports.PktCard.prototype,"borderOnHover",2);e([t.n({type:String,reflect:!0})],exports.PktCard.prototype,"clickCardLink",2);e([t.n({type:String})],exports.PktCard.prototype,"metaTrail",2);e([t.n({type:String})],exports.PktCard.prototype,"direction",2);e([t.n({type:String})],exports.PktCard.prototype,"heading",2);e([t.n({type:Number})],exports.PktCard.prototype,"headinglevel",2);e([t.n({type:Object})],exports.PktCard.prototype,"image",2);e([t.n({type:String})],exports.PktCard.prototype,"imageShape",2);e([t.n({type:Boolean})],exports.PktCard.prototype,"openLinkInNewTab",2);e([t.n({type:String})],exports.PktCard.prototype,"padding",2);e([t.n({type:String})],exports.PktCard.prototype,"skin",2);e([t.n({type:String})],exports.PktCard.prototype,"subheading",2);e([t.n({type:String})],exports.PktCard.prototype,"tagPosition",2);e([t.n({type:Array})],exports.PktCard.prototype,"tags",2);exports.PktCard=e([t.t("pkt-card")],exports.PktCard);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const e=require("./element-BSypUpzA.cjs"),a=require("./input-element-
|
|
1
|
+
"use strict";const e=require("./element-BSypUpzA.cjs"),a=require("./input-element-DK0UmdGZ.cjs"),k=require("./ref-BvbyvXRH.cjs"),o=require("./class-map-DCyaICmy.cjs");var r=Object.defineProperty,u=Object.getOwnPropertyDescriptor,c=(l,t,s,h)=>{for(var i=h>1?void 0:h?u(t,s):t,n=l.length-1,p;n>=0;n--)(p=l[n])&&(i=(h?p(t,s,i):p(i))||i);return h&&i&&r(t,s,i),i};exports.PktCheckbox=class extends a.PktInputElement{constructor(){super(...arguments),this.inputRef=k.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.type="checkbox"}connectedCallback(){super.connectedCallback()}attributeChangedCallback(t,s,h){t==="defaultChecked"&&!this.checked&&(this.checked=this.defaultChecked),t==="checked"&&(this.checked=this.checked===""||this.checked==="true"||this.checked===!0),super.attributeChangedCallback(t,s,h)}firstUpdated(t){t.has("defaultChecked")&&!this.checked&&(this.checked=this.defaultChecked),super.firstUpdated(t)}render(){const t=o.e({"pkt-input-check__input":!0,"pkt-input-check__input--tile":this.hasTile,"pkt-input-check__input--tile-disabled":this.disabled&&this.hasTile}),s=o.e({"pkt-input-check__input-checkbox":!0,"pkt-input-check__input-checkbox--error":this.hasError}),h=o.e({"pkt-input-check__input-label":!0,"pkt-input-check__input-label--left":this.labelPosition==="left","pkt-input-check__input-label--right":this.labelPosition==="right","pkt-sr-only":this.hideLabel}),i=()=>e.x`
|
|
2
2
|
<label class=${h} for=${this.id+"-internal"}>
|
|
3
3
|
${this.label}
|
|
4
4
|
${this.checkHelptext?e.x`<div class="pkt-input-check__input-helptext">${this.checkHelptext}</div>`:e.E}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { E as n, x as r, n as s, a as d } from "./element-DjjF_tEh.js";
|
|
2
|
-
import { P as k } from "./input-element-
|
|
2
|
+
import { P as k } from "./input-element-B2GjFOXX.js";
|
|
3
3
|
import { e as b, n as f } from "./ref-iIffqQAI.js";
|
|
4
4
|
import { e as u } from "./class-map-KyMqi0fa.js";
|
|
5
5
|
var _ = Object.defineProperty, y = Object.getOwnPropertyDescriptor, i = (e, h, c, l) => {
|
|
@@ -4,7 +4,7 @@ import { r as c } from "./state-BtbpSrdV.js";
|
|
|
4
4
|
import { e as _, n as v } from "./ref-iIffqQAI.js";
|
|
5
5
|
import { e as k } from "./class-map-KyMqi0fa.js";
|
|
6
6
|
import { c as R } from "./repeat-D4kMediE.js";
|
|
7
|
-
import { P as V } from "./input-element-
|
|
7
|
+
import { P as V } from "./input-element-B2GjFOXX.js";
|
|
8
8
|
import { P as C } from "./pkt-options-controller-DepYQBqb.js";
|
|
9
9
|
import { P as S } from "./pkt-slot-controller-DtDaD9q_.js";
|
|
10
10
|
import "./input-wrapper-BdeoMGnk.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const l=require("./element-BSypUpzA.cjs"),c=require("./if-defined-a3sotaUr.cjs"),d=require("./state-B5KCNjEd.cjs"),r=require("./ref-BvbyvXRH.cjs"),$=require("./class-map-DCyaICmy.cjs"),I=require("./repeat-BnuruAat.cjs"),w=require("./input-element-
|
|
1
|
+
"use strict";const l=require("./element-BSypUpzA.cjs"),c=require("./if-defined-a3sotaUr.cjs"),d=require("./state-B5KCNjEd.cjs"),r=require("./ref-BvbyvXRH.cjs"),$=require("./class-map-DCyaICmy.cjs"),I=require("./repeat-BnuruAat.cjs"),w=require("./input-element-DK0UmdGZ.cjs"),y=require("./pkt-options-controller-Ay9ELZTV.cjs"),O=require("./pkt-slot-controller-Da-RgXfS.cjs");require("./input-wrapper-B-f_SotM.cjs");require("./icon-BnKGwYjj.cjs");require("./tag-B9kFYxHg.cjs");require("./listbox-DqpGh7eq.cjs");const C={displayValueAs:{default:"label"}},R={props:C};var V=Object.defineProperty,S=Object.getOwnPropertyDescriptor,o=(b,e,t,i)=>{for(var s=i>1?void 0:i?S(e,t):e,h=b.length-1,n;h>=0;h--)(n=b[h])&&(s=(i?n(e,t,s):n(s))||s);return i&&s&&V(e,t,s),s};exports.PktCombobox=class extends w.PktInputElement{constructor(){super(),this.helptextSlot=r.e(),this.value="",this.options=[],this.allowUserInput=!1,this.typeahead=!1,this.includeSearch=!1,this.searchPlaceholder="",this.multiple=!1,this.maxlength=null,this.displayValueAs=R.props.displayValueAs.default,this.tagPlacement=null,this._options=[],this._isOptionsOpen=!1,this._value=[],this._userInfoMessage="",this._addValueText=null,this._maxIsReached=!1,this._search="",this._inputFocus=!1,this._editingSingleValue=!1,this.inputRef=r.e(),this.arrowRef=r.e(),this.listboxRef=r.e(),this.focusRef=r.e(),this.optionTagRef=r.e(),this.optionsController=new y.PktOptionsSlotController(this),this.slotController=new O.PktSlotController(this,this.helptextSlot),this.slotController.skipOptions=!0}connectedCallback(){if(super.connectedCallback(),document&&document.body.addEventListener("click",e=>{this._isOptionsOpen&&!this.contains(e.target)&&this.handleFocusOut(e)}),this._options=[],this.optionsController.nodes.length){const e=[];this.optionsController.nodes.forEach(t=>{if(!t.textContent&&!t.getAttribute("value"))return null;const i={value:t.getAttribute("value")||t.textContent||"",label:t.textContent||t.getAttribute("value")||""};t.getAttribute("data-prefix")&&(i.prefix=t.getAttribute("data-prefix")||void 0),t.getAttribute("tagskincolor")&&(i.tagSkinColor=t.getAttribute("tagskincolor")),t.getAttribute("description")&&(i.description=t.getAttribute("description")||void 0),i.fulltext=i.value+i.label+(i.prefix||""),e.push(i)}),e.length&&(this.options=[...e],this._options=[...e])}}updated(e){e.has("_value")&&this.valueChanged(this._value,e.get("_value")),e.has("value")&&(this._value=Array.isArray(this.value)?this.value:this.value?this.value.split(","):[],!this.multiple&&this._value.length>1&&(this._value=[this._value[0]]),this.isMaxItemsReached()),e.has("options")&&this.options.length&&(this._options=this.options,this._options.forEach(t=>{if(t.value&&!t.label&&(t.label=t.value),t.selected&&!this._value.includes(t.value)){const i=[...this._value];this._value=[...this._value,t.value],this.valueChanged(this._value,i)}t.fulltext=t.value+t.label+(t.prefix||""),t.selected=t.selected||this._value.includes(t.value)})),e.has("_search")&&this.dispatchEvent(new CustomEvent("search",{detail:this._search,bubbles:!1})),super.updated(e)}attributeChangedCallback(e,t,i){e==="value"&&(this._value=Array.isArray(this.value)?this.value:this.value?this.value.split(","):[],!this.multiple&&this._value.length>1&&(this._value=[this._value[0]])),e==="options"&&(this._options=this.options,this._options.forEach(s=>{s.value&&!s.label&&(s.label=s.value),s.selected&&!this._value.includes(s.value)&&(this._value=[...this._value,s.value]),s.fulltext=s.value+s.label+(s.prefix||"")}),this._search=""),super.attributeChangedCallback(e,t,i)}render(){return l.x`
|
|
2
2
|
<pkt-input-wrapper
|
|
3
3
|
.label=${this.label}
|
|
4
4
|
.helptext=${this.helptext}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const d=require("./class-map-DCyaICmy.cjs"),p=require("./if-defined-a3sotaUr.cjs"),s=require("./element-BSypUpzA.cjs"),m=require("./state-B5KCNjEd.cjs"),h=require("./calendar-CYY42kN4.cjs"),k=require("./input-element-
|
|
1
|
+
"use strict";const d=require("./class-map-DCyaICmy.cjs"),p=require("./if-defined-a3sotaUr.cjs"),s=require("./element-BSypUpzA.cjs"),m=require("./state-B5KCNjEd.cjs"),h=require("./calendar-CYY42kN4.cjs"),k=require("./input-element-DK0UmdGZ.cjs"),r=require("./ref-BvbyvXRH.cjs"),v=require("./repeat-BnuruAat.cjs");require("./icon-BnKGwYjj.cjs");require("./input-wrapper-B-f_SotM.cjs");require("./tag-B9kFYxHg.cjs");const $=require("./pkt-slot-controller-Da-RgXfS.cjs"),y={dateformat:{default:"dd.MM.yyyy"},min:{default:null},max:{default:null},weeknumbers:{default:!1},withcontrols:{default:!1},multiple:{default:!1},range:{default:!1}},o={props:y};var b=Object.defineProperty,x=Object.getOwnPropertyDescriptor,l=(c,t,e,i)=>{for(var a=i>1?void 0:i?x(t,e):t,n=c.length-1,u;n>=0;n--)(u=c[n])&&(a=(i?u(t,e,a):u(a))||a);return i&&a&&b(t,e,a),a};const g=c=>new Promise(t=>setTimeout(t,c));exports.PktDatepicker=class extends k.PktInputElement{constructor(){super(),this.value="",this._value=this.value?Array.isArray(this.value)?this.value:this.value.split(","):[],this.label="Datovelger",this.dateformat=o.props.dateformat.default,this.multiple=o.props.multiple.default,this.maxlength=null,this.range=o.props.range.default,this.showRangeLabels=!1,this.min=null,this.max=null,this.weeknumbers=o.props.weeknumbers.default,this.withcontrols=o.props.withcontrols.default,this.excludedates=[],this.excludeweekdays=[],this.currentmonth=null,this.calendarOpen=!1,this.timezone="Europe/Oslo",this.inputClasses={},this.buttonClasses={},this.inputRef=r.e(),this.inputRefTo=r.e(),this.btnRef=r.e(),this.calRef=r.e(),this.popupRef=r.e(),this.helptextSlot=r.e(),this.addToSelected=t=>{const e=t.target;if(!e.value)return;const i=this.min?h.newDate(this.min):null,a=this.max?h.newDate(this.max):null,n=h.newDate(e.value.split(",")[0]);n&&!isNaN(n.getTime())&&(!i||n>=i)&&(!a||n<=a)&&this.calRef.value&&this.calRef.value.handleDateSelect(n),e.value=""},this.slotController=new $.PktSlotController(this,this.helptextSlot)}async connectedCallback(){super.connectedCallback();const t=navigator.userAgent,e=/iP(hone|od|ad)/.test(t);this.inputType=e?"text":"date",document&&document.body.addEventListener("click",i=>{var a,n;(a=this.inputRef)!=null&&a.value&&((n=this.btnRef)!=null&&n.value)&&!this.inputRef.value.contains(i.target)&&!(this.inputRefTo.value&&this.inputRefTo.value.contains(i.target))&&!this.btnRef.value.contains(i.target)&&!i.target.closest(".pkt-calendar-popup")&&this.calendarOpen&&(this.onBlur(),this.hideCalendar())}),this.value.length&&this._value.length===0&&(this._value=Array.isArray(this.value)?this.value:this.value.split(",")),this.min=this.min||o.props.min.default,this.max=this.max||o.props.max.default,typeof this.excludedates=="string"&&(this.excludedates=this.excludedates.split(",")),typeof this.excludeweekdays=="string"&&(this.excludeweekdays=this.excludeweekdays.split(",")),(this.multiple||this.range)&&this.name&&!this.name.endsWith("[]")&&(this.name=this.name+"[]"),this.calendarOpen&&(await g(20),this.handleCalendarPosition())}disconnectedCallback(){super.disconnectedCallback(),document&&document.body.removeEventListener("click",t=>{var e,i;(e=this.inputRef)!=null&&e.value&&((i=this.btnRef)!=null&&i.value)&&!this.inputRef.value.contains(t.target)&&!this.btnRef.value.contains(t.target)&&this.hideCalendar()})}attributeChangedCallback(t,e,i){if(t==="value"){if(this.range&&(i==null?void 0:i.split(",").length)===1)return;this.value!==e&&this.valueChanged(i,e)}t==="excludedates"&&typeof this.excludedates=="string"&&(this.excludedates=(i==null?void 0:i.split(","))??[]),t==="excludeweekdays"&&typeof this.excludeweekdays=="string"&&(this.excludeweekdays=(i==null?void 0:i.split(","))??[]),super.attributeChangedCallback(t,e,i)}updated(t){if(t.has("value")){if(this.range&&this.value.length===1)return;this.valueChanged(this.value,t.get("value"))}super.updated(t)}renderInput(){return s.x`
|
|
2
2
|
<input
|
|
3
3
|
class="${d.e(this.inputClasses)}"
|
|
4
4
|
.type=${this.inputType}
|
|
@@ -3,7 +3,7 @@ import { o } from "./if-defined-BErSJCeJ.js";
|
|
|
3
3
|
import { x as u, E as g, n as r, a as w } from "./element-DjjF_tEh.js";
|
|
4
4
|
import { r as k } from "./state-BtbpSrdV.js";
|
|
5
5
|
import { n as v, f as $, a as R, b as y, d as x } from "./calendar-KDcOWD6V.js";
|
|
6
|
-
import { P as C } from "./input-element-
|
|
6
|
+
import { P as C } from "./input-element-B2GjFOXX.js";
|
|
7
7
|
import { e as m, n as p } from "./ref-iIffqQAI.js";
|
|
8
8
|
import { c as T } from "./repeat-D4kMediE.js";
|
|
9
9
|
import "./icon-Beoxup8E.js";
|
package/dist/index.d.ts
CHANGED
|
@@ -120,8 +120,8 @@ export declare interface IPktButton {
|
|
|
120
120
|
|
|
121
121
|
declare interface IPktCard {
|
|
122
122
|
ariaLabel?: IAriaAttributes['aria-label'];
|
|
123
|
-
|
|
124
|
-
|
|
123
|
+
metaLead?: string | null;
|
|
124
|
+
metaTrail?: string | null;
|
|
125
125
|
direction?: TDirection;
|
|
126
126
|
heading?: string;
|
|
127
127
|
headingLevel?: IPktHeading['level'];
|
|
@@ -462,10 +462,10 @@ export declare class PktCard extends PktElement implements IPktCard {
|
|
|
462
462
|
defaultSlot: Ref<HTMLElement>;
|
|
463
463
|
constructor();
|
|
464
464
|
ariaLabel: string;
|
|
465
|
-
|
|
465
|
+
metaLead: string | null;
|
|
466
466
|
borderOnHover: boolean;
|
|
467
467
|
clickCardLink: IPktCard['clickCardLink'];
|
|
468
|
-
|
|
468
|
+
metaTrail: string | null;
|
|
469
469
|
direction: TDirection;
|
|
470
470
|
heading: string;
|
|
471
471
|
headinglevel: IPktHeading['level'];
|
|
@@ -491,7 +491,7 @@ export declare class PktCard extends PktElement implements IPktCard {
|
|
|
491
491
|
renderHeader(): TemplateResult<1>;
|
|
492
492
|
renderTags(): TemplateResult<1>;
|
|
493
493
|
renderSlot(): TemplateResult<1>;
|
|
494
|
-
|
|
494
|
+
renderMetadata(): TemplateResult<1>;
|
|
495
495
|
}
|
|
496
496
|
|
|
497
497
|
export declare class PktCheckbox extends PktInputElement {
|
|
@@ -1017,7 +1017,6 @@ declare class PktRadioButton extends PktInputElement {
|
|
|
1017
1017
|
_checked: boolean;
|
|
1018
1018
|
connectedCallback(): void;
|
|
1019
1019
|
attributeChangedCallback(name: string, _old: string | null, value: string | null): void;
|
|
1020
|
-
updated(changedProperties: PropertyValues): void;
|
|
1021
1020
|
render(): TemplateResult<1>;
|
|
1022
1021
|
private toggleChecked;
|
|
1023
1022
|
}
|
|
@@ -46,7 +46,7 @@ class i extends c {
|
|
|
46
46
|
if (!this.touched) return;
|
|
47
47
|
const r = this.internals.form || this.closest("form"), h = r ? new FormData(r) : null;
|
|
48
48
|
r && r.querySelectorAll(
|
|
49
|
-
`pkt-radiobutton[name
|
|
49
|
+
`pkt-radiobutton[name="${this.name}"], input[type=radio][name="${this.name}"]`
|
|
50
50
|
).forEach((a) => {
|
|
51
51
|
const l = a;
|
|
52
52
|
l.name === this.name && l.value !== this.value && l.checked && (l.checked = !1);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("./element-BSypUpzA.cjs"),f=require("./state-B5KCNjEd.cjs"),c=require("./stringutils-CkVRq4jP.cjs"),y=require("./input-wrapper-EoSAbU-U.cjs");var m=Object.defineProperty,s=(o,t,r,l)=>{for(var a=void 0,n=o.length-1,h;n>=0;n--)(h=o[n])&&(a=h(t,r,a)||a);return a&&m(t,r,a),a};class i extends e.PktElement{constructor(){super(),this.defaultValue=null,this.disabled=!1,this.readonly=!1,this.required=!1,this.max=null,this.maxlength=null,this.min=null,this.minlength=null,this.ariaDescribedBy=null,this.ariaLabelledby=null,this.name="",this.pattern=null,this.placeholder=null,this.id=c.uuidish(),this.counter=!1,this.hasError=!1,this.inline=!1,this.hasFieldset=!1,this.optionalTag=!1,this.requiredTag=!1,this.skipForwardTestid=!1,this.useWrapper=!0,this.fullwidth=!1,this.counterMaxLength=0,this.errorMessage="",this.helptext="",this.helptextDropdown="",this.helptextDropdownButton=y.specs.props.helptextDropdownButton.default,this.label=null,this.optionalText=e.translations.forms.labels.optional,this.requiredText=e.translations.forms.labels.required,this.dataTestid="",this.touched=!1,this.internals=this.attachInternals()}static get formAssociated(){return!0}manageValidity(t){var r,l,a,n,h,u,p,d;t&&(this.required&&!this.value?this.internals.setValidity({valueMissing:!0},e.translations.forms.messages.required,t):(r=t.validity)!=null&&r.typeMismatch||(l=t.validity)!=null&&l.badInput?this.internals.setValidity({typeMismatch:!0},e.translations.forms.messages.invalid,t):(a=t.validity)!=null&&a.patternMismatch?this.internals.setValidity({patternMismatch:!0},e.translations.forms.messages.invalidPattern,t):(n=t.validity)!=null&&n.tooShort||this.minlength&&this.minlength>0&&this.value.length<this.minlength?this.internals.setValidity({tooShort:!0},e.translations.forms.messages.tooShort,t):(h=t.validity)!=null&&h.tooLong||this.maxlength&&this.maxlength>0&&this.value.length>this.maxlength?this.internals.setValidity({tooLong:!0},e.translations.forms.messages.tooLong,t):(u=t.validity)!=null&&u.rangeUnderflow?this.internals.setValidity({rangeUnderflow:!0},e.translations.forms.messages.rangeUnderflow,t):(p=t.validity)!=null&&p.rangeOverflow?this.internals.setValidity({rangeOverflow:!0},e.translations.forms.messages.rangeOverflow,t):(d=t.validity)!=null&&d.customError?this.internals.setValidity({customError:!0},t.validationMessage,t):this.internals.setValidity({}))}setFormValue(t){if(this.internals)if(Array.isArray(t)){const r=new FormData;t.forEach(l=>{r.append(this.name,l)}),this.internals.setFormValue(r)}else this.internals.setFormValue(t)}valueChecked(t){if(!this.touched)return;const r=this.internals.form||this.closest("form"),l=r?new FormData(r):null;r&&r.querySelectorAll(`pkt-radiobutton[name="${this.name}"], input[type=radio][name="${this.name}"]`).forEach(a=>{const n=a;n.name===this.name&&n.value!==this.value&&n.checked&&(n.checked=!1)}),typeof t=="string"?(this.checked=t==="true",this.internals.ariaChecked=t==="true"):typeof t=="boolean"&&(this.checked=t,this.internals.ariaChecked=t),this.checked?(this.internals.setFormValue(this.value||"on",this.value||"on"),l&&l.append(this.name,this.value||"on"),this.internals.states.add("--checked")):(this.internals.setFormValue(null,null),l&&l.delete(this.name),this.internals.states.delete("--checked")),this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("value-change",{detail:this.checked,bubbles:!0,composed:!0})),this.internals.reportValidity()}valueChanged(t,r){(r!==this.value||r!==this._value)&&(typeof t=="string"?((this.multiple||this.range)&&t.includes(",")&&(t=t.split(",")),this.value=t,this._value=Array.isArray(t)?t:[t]):Array.isArray(t)?(this.value=this.multiple||this.range?t:t[0],this._value=t):(this.value="",this._value=[]),(!this.value||this.value.length===0)&&r&&r.length!==0?this.clearInputValue():this.value&&this.value.toString()!==(r==null?void 0:r.toString())&&this.onChange(this.value),this.updateComplete.then(()=>this.requestUpdate()))}clearInputValue(){const t=this.multiple||this.range?[]:"";this.value=t,this.internals.setFormValue(t),this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("value-change",{detail:t,bubbles:!0,composed:!0}))}onFocus(){this.dispatchEvent(new FocusEvent("focus",{bubbles:!0,composed:!0}))}onBlur(){this.dispatchEvent(new FocusEvent("blur",{bubbles:!0,composed:!0}))}onInput(){this.dispatchEvent(new InputEvent("input",{bubbles:!0,composed:!0}))}onChange(t){if(!this.touched){this.touched=!0,t&&this.setFormValue(t);return}typeof t!="string"&&!Array.isArray(t)||((this.range||this.multiple)&&!Array.isArray(t)&&t.includes(",")&&(t=t.split(",")),!this.multiple&&!this.range&&Array.isArray(t)&&(t=t[0]),this.setFormValue(t),this.manageValidity(this.inputRef.value),this.inputRefTo&&this.manageValidity(this.inputRefTo.value),this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("value-change",{detail:t,bubbles:!0,composed:!0})),this.internals.reportValidity())}formResetCallback(){this.touched=!1,this._options&&this._options.length&&this._options.forEach(t=>{t.selected=!1}),this.checked!==void 0?(this.checked=!1,this.internals.ariaChecked=!1,this.internals.setFormValue("",""),this.inputRef.value.checked=!1,this.valueChecked(this.checked)):(this.internals.setFormValue(""),this.value=this.defaultValue||(this.multiple||this.range?[]:""),this._value=this.value,this.valueChanged(this.value,null)),this.internals.ariaInvalid=!1}updated(t){super.updated(t),t.has("dataTestid")&&this.dataTestid&&this.inputRef.value&&(this.skipForwardTestid?this.hasAttribute("data-testid")||this.setAttribute("data-testid",this.dataTestid):(this.inputRef.value.dataset.testid=this.dataTestid,this.removeAttribute("data-testid")))}firstUpdated(t){if(super.firstUpdated(t),!this.form){const r=this.internals.form||this.closest("form");this.form=r}if(this.value&&this.defaultValue!==null&&(this.defaultValue=this.value),this.defaultValue!==null&&!this.value&&this.valueChanged(this.defaultValue,null),this.defaultChecked&&(this.internals.ariaChecked=!0,this.checked=!0),this.required&&(this.internals.ariaRequired=!0),this.disabled&&(this.internals.ariaDisabled=!0),this.id&&!this.name&&(this.name=this.id),this.checked!==void 0){const r=this.checked===""||this.checked==="true"||this.checked===!0;this.internals.ariaChecked=r,this.internals.setFormValue(r?this.value||"on":"",r?this.value||"on":"")}else this.internals.setFormValue(this.value);this.inputRef&&this.inputRef.value&&(this.inputRef.value.setAttribute("form",""),this.manageValidity(this.inputRef.value)),this.inputRefTo&&this.inputRefTo.value&&(this.inputRefTo.value.setAttribute("form",""),this.manageValidity(this.inputRefTo.value))}}s([e.n()],i.prototype,"defaultValue");s([e.n({type:Boolean,reflect:!0})],i.prototype,"disabled");s([e.n({type:Boolean,reflect:!0})],i.prototype,"readonly");s([e.n({type:Boolean,reflect:!0})],i.prototype,"required");s([e.n({type:Number,reflect:!0})],i.prototype,"max");s([e.n({type:Number,reflect:!0})],i.prototype,"maxlength");s([e.n({type:Number,reflect:!0})],i.prototype,"min");s([e.n({type:Number,reflect:!0})],i.prototype,"minlength");s([e.n({type:String})],i.prototype,"ariaDescribedBy");s([e.n({type:String})],i.prototype,"ariaLabelledby");s([e.n({type:String,reflect:!0})],i.prototype,"name");s([e.n({type:String,reflect:!0})],i.prototype,"pattern");s([e.n({type:String,reflect:!0})],i.prototype,"placeholder");s([e.n({type:String,reflect:!0})],i.prototype,"id");s([e.n({type:Boolean})],i.prototype,"counter");s([e.n({type:Boolean})],i.prototype,"hasError");s([e.n({type:Boolean})],i.prototype,"inline");s([e.n({type:Boolean})],i.prototype,"hasFieldset");s([e.n({type:Boolean})],i.prototype,"optionalTag");s([e.n({type:Boolean})],i.prototype,"requiredTag");s([e.n({type:Boolean})],i.prototype,"skipForwardTestid");s([e.n({type:Boolean,reflect:!1})],i.prototype,"useWrapper");s([e.n({type:Boolean,reflect:!0})],i.prototype,"fullwidth");s([e.n({type:Number})],i.prototype,"counterMaxLength");s([e.n({type:String})],i.prototype,"errorMessage");s([e.n({type:String})],i.prototype,"helptext");s([e.n({type:String})],i.prototype,"helptextDropdown");s([e.n({type:String,reflect:!1})],i.prototype,"helptextDropdownButton");s([e.n({type:String})],i.prototype,"label");s([e.n({type:String,reflect:!1})],i.prototype,"optionalText");s([e.n({type:String,reflect:!1})],i.prototype,"requiredText");s([e.n({type:String,attribute:"data-testid"})],i.prototype,"dataTestid");s([f.r()],i.prototype,"touched");exports.PktInputElement=i;
|
package/dist/pkt-card.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./card-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./card-C8wbJJyj.cjs"),t=e.PktCard;Object.defineProperty(exports,"PktCard",{enumerable:!0,get:()=>e.PktCard});exports.default=t;
|
package/dist/pkt-card.js
CHANGED
package/dist/pkt-checkbox.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./checkbox-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./checkbox-7ct89AUo.cjs"),t=e.PktCheckbox;Object.defineProperty(exports,"PktCheckbox",{enumerable:!0,get:()=>e.PktCheckbox});exports.default=t;
|
package/dist/pkt-checkbox.js
CHANGED
package/dist/pkt-combobox.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./combobox-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./combobox-dwkB9Yv_.cjs"),o=e.PktCombobox;Object.defineProperty(exports,"PktCombobox",{enumerable:!0,get:()=>e.PktCombobox});exports.default=o;
|
package/dist/pkt-combobox.js
CHANGED
package/dist/pkt-datepicker.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./datepicker-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./datepicker-BDnncwne.cjs"),t=e.PktDatepicker;Object.defineProperty(exports,"PktDatepicker",{enumerable:!0,get:()=>e.PktDatepicker});exports.default=t;
|
package/dist/pkt-datepicker.js
CHANGED
package/dist/pkt-index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const P=require("./alert-C2EPmB0W.cjs"),l=require("./accordionitem-RFwXQC_0.cjs"),d=require("./backlink-HHM21crL.cjs"),b=require("./button-C60j8BsA.cjs"),k=require("./calendar-CYY42kN4.cjs"),m=require("./card-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const P=require("./alert-C2EPmB0W.cjs"),l=require("./accordionitem-RFwXQC_0.cjs"),d=require("./backlink-HHM21crL.cjs"),b=require("./button-C60j8BsA.cjs"),k=require("./calendar-CYY42kN4.cjs"),m=require("./card-C8wbJJyj.cjs"),g=require("./combobox-dwkB9Yv_.cjs"),h=require("./consent-1ZSUrWK9.cjs"),f=require("./checkbox-7ct89AUo.cjs"),t=require("./element-BSypUpzA.cjs"),y=require("./pkt-slot-controller-Da-RgXfS.cjs"),s=require("./ref-BvbyvXRH.cjs"),O=require("./class-map-DCyaICmy.cjs"),j=require("./datepicker-BDnncwne.cjs"),q=require("./helptext-bMgnhZ1R.cjs"),x=require("./heading-BnJhJDMD.cjs"),C=require("./icon-BnKGwYjj.cjs"),v=require("./input-wrapper-B-f_SotM.cjs"),S=require("./link-nesPZCIx.cjs"),$=require("./linkcard-s9yoOq90.cjs"),L=require("./loader-ndMy12Pb.cjs"),_=require("./messagebox-B0kgftoP.cjs"),A=require("./modal-C8GbUY8p.cjs"),B=require("./progressbar-DiRfScnB.cjs"),p=require("./radiobutton-DGWTMdAZ.cjs"),T=require("./tag-B9kFYxHg.cjs"),I=require("./textarea-yUzqcBYY.cjs"),M=require("./textinput-8mT0npMY.cjs"),R=require("./select-Brv7vglu.cjs");var H=Object.defineProperty,w=Object.getOwnPropertyDescriptor,o=(a,e,r,i)=>{for(var n=i>1?void 0:i?w(e,r):e,u=a.length-1,c;u>=0;u--)(c=a[u])&&(n=(i?c(e,r,n):c(n))||n);return i&&n&&H(e,r,n),n};exports.PktComponent=class extends t.PktElement{constructor(){super(),this.string="",this.strings=[],this.darkmode=!1,this._list=[],this.defaultSlot=s.e(),this.namedSlot=s.e(),this.slotController=new y.PktSlotController(this,this.defaultSlot,this.namedSlot)}connectedCallback(){this.strings.length&&this.strings.forEach(e=>{this._list.push(e.toUpperCase())}),super.connectedCallback()}render(){const e={"pkt-component":!0,"pkt-component--has-list":this.strings.length>0,"pkt-darkmode":this.darkmode};return t.x`
|
|
2
2
|
<div class="${O.e(e)}">
|
|
3
3
|
<h1 class="pkt-txt-28">${this.string}</h1>
|
|
4
4
|
|
package/dist/pkt-index.js
CHANGED
|
@@ -4,15 +4,15 @@ import { P as O } from "./backlink-hvyJmwrO.js";
|
|
|
4
4
|
import { P as T } from "./button-BCCtR9ff.js";
|
|
5
5
|
import { c as f } from "./calendar-KDcOWD6V.js";
|
|
6
6
|
import { P as D } from "./calendar-KDcOWD6V.js";
|
|
7
|
-
import { P as G } from "./card-
|
|
8
|
-
import { P as K } from "./combobox-
|
|
7
|
+
import { P as G } from "./card-Bx2WyoYH.js";
|
|
8
|
+
import { P as K } from "./combobox-DewmPXyJ.js";
|
|
9
9
|
import { P as U } from "./consent-c6eWVBWx.js";
|
|
10
|
-
import { P as q } from "./checkbox-
|
|
10
|
+
import { P as q } from "./checkbox-D5fSFvhs.js";
|
|
11
11
|
import { P as k, t as h, x as P, n, a as c } from "./element-DjjF_tEh.js";
|
|
12
12
|
import { P as x } from "./pkt-slot-controller-DtDaD9q_.js";
|
|
13
13
|
import { e as m, n as d } from "./ref-iIffqQAI.js";
|
|
14
14
|
import { e as u } from "./class-map-KyMqi0fa.js";
|
|
15
|
-
import { P as F } from "./datepicker-
|
|
15
|
+
import { P as F } from "./datepicker-CISpFZSs.js";
|
|
16
16
|
import { P as Q } from "./helptext-DcSUjjEq.js";
|
|
17
17
|
import { P as X } from "./heading-DNLQdsXY.js";
|
|
18
18
|
import { P as Z } from "./icon-Beoxup8E.js";
|
|
@@ -23,11 +23,11 @@ import { P as it } from "./loader-DhmtCyQA.js";
|
|
|
23
23
|
import { P as lt } from "./messagebox-DZDP8XZt.js";
|
|
24
24
|
import { P as mt } from "./modal-nU8cELiR.js";
|
|
25
25
|
import { P as ft } from "./progressbar-BKt_aj7f.js";
|
|
26
|
-
import { P as ht, P as ct } from "./radiobutton-
|
|
26
|
+
import { P as ht, P as ct } from "./radiobutton-CET0zjgD.js";
|
|
27
27
|
import { P as ut } from "./tag-Cu8afZy8.js";
|
|
28
|
-
import { P as vt } from "./textarea-
|
|
29
|
-
import { P as bt } from "./textinput-
|
|
30
|
-
import { P as $t } from "./select-
|
|
28
|
+
import { P as vt } from "./textarea-l10XGym1.js";
|
|
29
|
+
import { P as bt } from "./textinput-B1n0gFaS.js";
|
|
30
|
+
import { P as $t } from "./select-C36Z4gui.js";
|
|
31
31
|
var g = Object.defineProperty, v = Object.getOwnPropertyDescriptor, s = (t, e, i, a) => {
|
|
32
32
|
for (var r = a > 1 ? void 0 : a ? v(e, i) : e, p = t.length - 1, l; p >= 0; p--)
|
|
33
33
|
(l = t[p]) && (r = (a ? l(e, i, r) : l(r)) || r);
|