@oslokommune/punkt-elements 16.18.0 → 16.21.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 +34 -0
- package/dist/{accordion-CU2tJ5vn.js → accordion-BjYsEbSM.js} +19 -19
- package/dist/{accordion-DDZkjXFb.cjs → accordion-DaeWPWod.cjs} +5 -5
- package/dist/{alert-D_eXGOez.js → alert-BkzC5mVu.js} +22 -22
- package/dist/{alert-NyLr62jZ.cjs → alert-D_45dWPn.cjs} +6 -6
- package/dist/{async-directive-CaQiqjyV.js → async-directive-Cz6tcqge.js} +2 -2
- package/dist/async-directive-DO1QtVmf.cjs +1 -0
- package/dist/{backlink-CTu44BHn.js → backlink-BXAdgAte.js} +6 -6
- package/dist/{backlink-BsQ0Rmxj.cjs → backlink-C42-3OG3.cjs} +2 -2
- package/dist/{breadcrumbs-BNZ1L-0q.cjs → breadcrumbs-CkjeLh3U.cjs} +6 -6
- package/dist/{breadcrumbs-DPnoURvl.js → breadcrumbs-Dkb9TxMp.js} +15 -15
- package/dist/{button-ZYlrRRfu.js → button-CR-KWhTT.js} +21 -21
- package/dist/{button-DsGvcLIn.cjs → button-Dwv11n6R.cjs} +7 -7
- package/dist/{calendar-CDDVoUby.cjs → calendar-Buvxe4l_.cjs} +11 -11
- package/dist/{calendar-VOqO5um6.js → calendar-DAq6iJdx.js} +50 -50
- package/dist/{card-B4oDGIRP.js → card-5PydU247.js} +43 -43
- package/dist/{card-DZuZy0ay.cjs → card-C__IlsUa.cjs} +26 -26
- package/dist/{checkbox-CF5mSBR5.js → checkbox-CC1X7fw4.js} +23 -23
- package/dist/{checkbox-BerAYcfK.cjs → checkbox-DzMc0AJX.cjs} +10 -10
- package/dist/class-map-B8Ja0q7n.cjs +1 -0
- package/dist/{class-map-C8HuhNzZ.js → class-map-DH9hlJny.js} +7 -8
- package/dist/{combobox-BDYoPZmg.js → combobox-D-DY7YcW.js} +42 -42
- package/dist/{combobox-Ct9gCFa1.cjs → combobox-x4tBGP3F.cjs} +17 -17
- package/dist/components/heading/heading.d.ts +5 -8
- package/dist/{consent-BME_rQ2w.cjs → consent-BB3g_ByO.cjs} +3 -3
- package/dist/{consent-1IUuWZAh.js → consent-Y14WZ0JS.js} +8 -8
- package/dist/{datepicker-ByqXCpCd.cjs → datepicker-BFI-3stE.cjs} +20 -20
- package/dist/{datepicker-BGpoabCM.js → datepicker-CRk7aiwH.js} +57 -57
- package/dist/{directive-helpers-Dkv2gKgs.js → directive-helpers-Cep_4cpj.js} +1 -1
- package/dist/{directive-helpers-D1QSxY17.cjs → directive-helpers-f36YZFOG.cjs} +1 -1
- package/dist/docs/components/loader.d.ts +6 -0
- package/dist/element-CXAtr6Gu.cjs +2 -0
- package/dist/{element-cZ85T_aa.js → element-CduG0XyF.js} +47 -23
- package/dist/{element-with-slot-4J2o3SeU.js → element-with-slot-BVj9MXzi.js} +5 -6
- package/dist/element-with-slot-Cmxb9h4H.cjs +1 -0
- package/dist/{fileupload-B6W7qOQT.js → fileupload-C8muj8qd.js} +149 -149
- package/dist/{fileupload-a2OL3dzG.cjs → fileupload-YtsrgQTY.cjs} +40 -40
- package/dist/{header-BZFSan0_.cjs → header-CjBip0zj.cjs} +57 -57
- package/dist/{header-BgVpJMHQ.js → header-DONTGbD9.js} +130 -130
- package/dist/{header-menu-BXzVVOHq.js → header-menu-BU-ylGrJ.js} +45 -45
- package/dist/{header-menu-BLngov1D.cjs → header-menu-CnW7nzmF.cjs} +24 -24
- package/dist/heading-3o4Dk0Wn.js +80 -0
- package/dist/heading-C40-NX0r.cjs +1 -0
- package/dist/{helptext-BeU-enix.js → helptext-C2aQBBo_.js} +12 -12
- package/dist/{helptext-DWMFqMnV.cjs → helptext-DNLg43eI.cjs} +4 -4
- package/dist/icon-Dw6I0HDV.cjs +1 -0
- package/dist/{icon-CZQkrK6B.js → icon-LaKyBKON.js} +18 -19
- package/dist/if-defined-LTjAScFG.cjs +1 -0
- package/dist/{if-defined-Cjj8qN-Z.js → if-defined-VShASPdu.js} +1 -1
- package/dist/{input-element-D0egtEnr.cjs → input-element-BHQVt4Q9.cjs} +1 -1
- package/dist/{input-element-B1ciW1N2.js → input-element-BrmkXIXi.js} +30 -30
- package/dist/{input-wrapper-oYcbCFow.js → input-wrapper-B6WowlWG.js} +33 -33
- package/dist/{input-wrapper-Y98KV-sy.cjs → input-wrapper-Dhkt20WW.cjs} +17 -17
- package/dist/{link-BMMIjg50.cjs → link-B5ur0Rym.cjs} +4 -4
- package/dist/{link-CT0LB3S7.js → link-ClUNY__5.js} +13 -13
- package/dist/linkcard-BIcCW-qw.cjs +13 -0
- package/dist/{linkcard-Bz5zb69P.js → linkcard-DNJm5FvA.js} +15 -15
- package/dist/{listbox-0NHJvNjz.js → listbox-DXMIBv3y.js} +35 -35
- package/dist/{listbox-CcThiNBY.cjs → listbox-DbEobJNx.cjs} +14 -14
- package/dist/{loader-8T6M0FCQ.cjs → loader-Uap9qDsV.cjs} +5 -5
- package/dist/{loader-Cbrc4FFx.js → loader-gKdQpOOQ.js} +12 -12
- package/dist/{messagebox-C6LHT78_.cjs → messagebox-BqBxXK8c.cjs} +5 -5
- package/dist/{messagebox-TKKUVTo4.js → messagebox-XRFecqyS.js} +15 -15
- package/dist/{modal-BVHH8koz.js → modal-CWgeT-RP.js} +19 -19
- package/dist/{modal-CRzbtqL3.cjs → modal-CrYHKOmr.cjs} +8 -8
- package/dist/pkt-accordion.cjs +1 -1
- package/dist/pkt-accordion.js +1 -1
- package/dist/pkt-alert.cjs +1 -1
- package/dist/pkt-alert.js +1 -1
- package/dist/pkt-backlink.cjs +1 -1
- package/dist/pkt-backlink.js +1 -1
- package/dist/pkt-breadcrumbs.cjs +1 -1
- package/dist/pkt-breadcrumbs.js +1 -1
- package/dist/pkt-button.cjs +1 -1
- package/dist/pkt-button.js +1 -1
- package/dist/pkt-calendar.cjs +1 -1
- package/dist/pkt-calendar.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 +1 -1
- package/dist/pkt-fileupload.cjs +1 -1
- package/dist/pkt-fileupload.js +1 -1
- package/dist/pkt-header-menu.cjs +1 -1
- package/dist/pkt-header-menu.js +1 -1
- package/dist/pkt-header.cjs +1 -1
- package/dist/pkt-header.js +1 -1
- package/dist/pkt-heading.cjs +1 -1
- package/dist/pkt-heading.js +1 -1
- package/dist/pkt-helptext.cjs +1 -1
- package/dist/pkt-helptext.js +1 -1
- package/dist/pkt-icon.cjs +1 -1
- package/dist/pkt-icon.js +1 -1
- package/dist/pkt-index.cjs +1 -1
- package/dist/pkt-index.js +32 -32
- 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-listbox.cjs +1 -1
- package/dist/pkt-listbox.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-CCB15L_G.js → pkt-options-controller-BTNtjEIS.js} +1 -1
- package/dist/{pkt-options-controller-CeAQ-D-i.cjs → pkt-options-controller-CBM8xHwR.cjs} +1 -1
- package/dist/pkt-progressbar.cjs +1 -1
- package/dist/pkt-progressbar.js +1 -1
- package/dist/pkt-radiobutton.cjs +1 -1
- package/dist/pkt-radiobutton.js +1 -1
- package/dist/pkt-searchinput.cjs +1 -1
- package/dist/pkt-searchinput.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 +1 -1
- 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/pkt-timepicker.cjs +1 -1
- package/dist/pkt-timepicker.js +1 -1
- package/dist/{progressbar-C-5oESiB.js → progressbar-B0P_vmGD.js} +23 -24
- package/dist/progressbar-DADdvDl5.cjs +17 -0
- package/dist/{radiobutton-B1Xg6XzP.cjs → radiobutton-BfURufrZ.cjs} +8 -8
- package/dist/{radiobutton-BAn1V_mQ.js → radiobutton-C6zERHoy.js} +20 -20
- package/dist/{ref-RS8Uv6uC.js → ref-BgoHEsEt.js} +7 -8
- package/dist/ref-CBdWMlde.cjs +1 -0
- package/dist/{repeat-DV1O43YU.js → repeat-CKIii8Mi.js} +15 -16
- package/dist/repeat-CRRgmzVn.cjs +1 -0
- package/dist/{searchinput-DUgZb_zm.cjs → searchinput-BrxfRzez.cjs} +13 -13
- package/dist/{searchinput-C9FP89qD.js → searchinput-fPvXHu2O.js} +31 -31
- package/dist/{select-DkKIW7zD.js → select-BIgFPp42.js} +13 -13
- package/dist/{select-DAs8kzN4.cjs → select-DzZHv6Bz.cjs} +3 -3
- package/dist/{tabs-ClI1XQDt.js → tabs-BJx6wwXD.js} +29 -29
- package/dist/{tabs-CN_RIMWg.cjs → tabs-DxQy8U-0.cjs} +7 -7
- package/dist/{tag-vgKH9B4k.cjs → tag-CBFz0R9N.cjs} +5 -5
- package/dist/{tag-DSZ-czu-.js → tag-CzlnHhho.js} +19 -19
- package/dist/textarea-M_S9WK7s.cjs +46 -0
- package/dist/{textarea-BfjI6d7Q.js → textarea-qHtkhelz.js} +24 -25
- package/dist/{textinput-DhoupEyI.js → textinput-CZrBM-Fj.js} +26 -26
- package/dist/{textinput-BM66vo5e.cjs → textinput-C_6kvf87.cjs} +12 -12
- package/dist/{timepicker-CtRGbypF.js → timepicker-O0iCeJyW.js} +51 -51
- package/dist/{timepicker-C4oRmmRd.cjs → timepicker-WiYLAncb.cjs} +20 -20
- package/package.json +2 -2
- package/src/components/card/card.ts +1 -1
- package/src/components/heading/heading.test.ts +79 -70
- package/src/components/heading/heading.ts +40 -78
- package/dist/async-directive-B9P1Qa0k.cjs +0 -1
- package/dist/class-map-CJ-msbHs.cjs +0 -1
- package/dist/directive-3THFsVew.js +0 -28
- package/dist/directive-CJ2giQBZ.cjs +0 -1
- package/dist/element-DjtxO-1r.cjs +0 -2
- package/dist/element-with-slot-CWoTGA1B.cjs +0 -1
- package/dist/heading-BxvE80bb.js +0 -73
- package/dist/heading-DRJTS27k.cjs +0 -1
- package/dist/icon-PbaC9uUg.cjs +0 -1
- package/dist/if-defined-XKOD_t_V.cjs +0 -1
- package/dist/linkcard-CupEMkvj.cjs +0 -13
- package/dist/progressbar-C0g830Tk.cjs +0 -17
- package/dist/ref-BaJ0mBT_.cjs +0 -1
- package/dist/repeat-DaDFvx86.cjs +0 -1
- package/dist/textarea-C7YiheLo.cjs +0 -46
- /package/dist/{booleanish-CRaKZ75t.js → booleanish-BmcOU-43.js} +0 -0
- /package/dist/{booleanish-B5EFqFpJ.cjs → booleanish-jJLlnr6-.cjs} +0 -0
- /package/dist/{classutils-z8YsPlOf.cjs → classutils-CVTzKF0J.cjs} +0 -0
- /package/dist/{classutils-DEL164Ur.js → classutils-lVbGcvjN.js} +0 -0
- /package/dist/{converters-Bffq_YDm.cjs → converters-C_66kHUN.cjs} +0 -0
- /package/dist/{converters-jauYkvNh.js → converters-DSQXaDQ_.js} +0 -0
- /package/dist/{dialog-polyfill.esm-B7W3teD0.js → dialog-polyfill.esm-0dVT8G1o.js} +0 -0
- /package/dist/{dialog-polyfill.esm-BnAQvMQO.cjs → dialog-polyfill.esm-CYs2AHP1.cjs} +0 -0
- /package/dist/{focus-modality-controller-pzSZkDkH.js → focus-modality-controller-CaUqYdk0.js} +0 -0
- /package/dist/{focus-modality-controller-BSZAQk8y.cjs → focus-modality-controller-wI5SR8wH.cjs} +0 -0
- /package/dist/{input-wrapper-CQGoyLdZ.cjs → input-wrapper-CYCCx8MP.cjs} +0 -0
- /package/dist/{input-wrapper-DwSsP39J.js → input-wrapper-kw2y6Jp_.js} +0 -0
- /package/dist/{utils-BOOZ0ppt.js → utils-CUqCKGvp.js} +0 -0
- /package/dist/{utils-CM67Oudc.cjs → utils-CjAbIttF.cjs} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,40 @@ og skriver commits ca etter [Conventional Commits](https://conventionalcommits.o
|
|
|
5
5
|
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
+
## [16.21.0](https://github.com/oslokommune/punkt/compare/16.20.0...16.21.0) (2026-05-29)
|
|
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
|
+
## [16.19.0](https://github.com/oslokommune/punkt/compare/16.18.0...16.19.0) (2026-05-28)
|
|
26
|
+
|
|
27
|
+
### ⚠ BREAKING CHANGES
|
|
28
|
+
Ingen
|
|
29
|
+
|
|
30
|
+
### Features
|
|
31
|
+
Ingen
|
|
32
|
+
|
|
33
|
+
### Bug Fixes
|
|
34
|
+
Ingen
|
|
35
|
+
|
|
36
|
+
### Chores
|
|
37
|
+
Ingen
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
|
|
8
42
|
## [16.18.0](https://github.com/oslokommune/punkt/compare/16.17.4...16.18.0) (2026-05-28)
|
|
9
43
|
|
|
10
44
|
### ⚠ BREAKING CHANGES
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as a } from "./class-map-
|
|
3
|
-
import { n as o, t as s } from "./element-with-slot-
|
|
4
|
-
import { t as c } from "./if-defined-
|
|
5
|
-
import { n as l, t as u } from "./ref-
|
|
1
|
+
import { i as e, n as t, o as n, p as r, s as i } from "./element-CduG0XyF.js";
|
|
2
|
+
import { t as a } from "./class-map-DH9hlJny.js";
|
|
3
|
+
import { n as o, t as s } from "./element-with-slot-BVj9MXzi.js";
|
|
4
|
+
import { t as c } from "./if-defined-VShASPdu.js";
|
|
5
|
+
import { n as l, t as u } from "./ref-BgoHEsEt.js";
|
|
6
6
|
//#region src/components/accordion/accordion.ts
|
|
7
7
|
var d = class extends e {
|
|
8
8
|
constructor(...e) {
|
|
@@ -26,7 +26,7 @@ var d = class extends e {
|
|
|
26
26
|
});
|
|
27
27
|
}
|
|
28
28
|
render() {
|
|
29
|
-
return
|
|
29
|
+
return r`
|
|
30
30
|
<div
|
|
31
31
|
part="container"
|
|
32
32
|
class=${a({
|
|
@@ -42,25 +42,25 @@ var d = class extends e {
|
|
|
42
42
|
`;
|
|
43
43
|
}
|
|
44
44
|
};
|
|
45
|
-
|
|
45
|
+
t([n({
|
|
46
46
|
type: String,
|
|
47
47
|
reflect: !0,
|
|
48
48
|
attribute: "aria-labelledby"
|
|
49
|
-
})], d.prototype, "ariaLabelledBy", void 0),
|
|
49
|
+
})], d.prototype, "ariaLabelledBy", void 0), t([n({
|
|
50
50
|
type: Boolean,
|
|
51
51
|
reflect: !0,
|
|
52
52
|
attribute: "compact"
|
|
53
|
-
})], d.prototype, "compact", void 0),
|
|
53
|
+
})], d.prototype, "compact", void 0), t([n({
|
|
54
54
|
type: String,
|
|
55
55
|
reflect: !0,
|
|
56
56
|
attribute: "skin"
|
|
57
|
-
})], d.prototype, "skin", void 0),
|
|
57
|
+
})], d.prototype, "skin", void 0), t([n({
|
|
58
58
|
type: String,
|
|
59
59
|
reflect: !0,
|
|
60
60
|
attribute: "name"
|
|
61
61
|
})], d.prototype, "name", void 0);
|
|
62
62
|
try {
|
|
63
|
-
|
|
63
|
+
i("pkt-accordion")(d);
|
|
64
64
|
} catch {
|
|
65
65
|
console.warn("Forsøker å definere <pkt-accordion>, men den er allerede definert");
|
|
66
66
|
}
|
|
@@ -79,7 +79,7 @@ var f = class extends s {
|
|
|
79
79
|
"pkt-accordion-item--compact": this.compact,
|
|
80
80
|
[`pkt-accordion-item--${this.skin}`]: !!this.skin
|
|
81
81
|
}, t = this.skin === "plus-minus";
|
|
82
|
-
return
|
|
82
|
+
return r`
|
|
83
83
|
<details
|
|
84
84
|
class=${a(e)}
|
|
85
85
|
id=${this.id}
|
|
@@ -89,7 +89,7 @@ var f = class extends s {
|
|
|
89
89
|
>
|
|
90
90
|
<summary class="pkt-accordion-item__title" id=${`pkt-accordion-item-summary-${this.id}`}>
|
|
91
91
|
${this.title}
|
|
92
|
-
${t ?
|
|
92
|
+
${t ? r`
|
|
93
93
|
<pkt-icon
|
|
94
94
|
name="plus-sign"
|
|
95
95
|
class="pkt-accordion-item__icon pkt-accordion-item__icon--plus"
|
|
@@ -100,7 +100,7 @@ var f = class extends s {
|
|
|
100
100
|
class="pkt-accordion-item__icon pkt-accordion-item__icon--minus"
|
|
101
101
|
aria-hidden="true"
|
|
102
102
|
></pkt-icon>
|
|
103
|
-
` :
|
|
103
|
+
` : r`
|
|
104
104
|
<pkt-icon
|
|
105
105
|
name="chevron-thin-down"
|
|
106
106
|
class="pkt-accordion-item__icon"
|
|
@@ -119,21 +119,21 @@ var f = class extends s {
|
|
|
119
119
|
`;
|
|
120
120
|
}
|
|
121
121
|
};
|
|
122
|
-
|
|
122
|
+
t([n({ type: Boolean })], f.prototype, "defaultOpen", void 0), t([n({ type: String })], f.prototype, "title", void 0), t([n({
|
|
123
123
|
type: String,
|
|
124
124
|
reflect: !0
|
|
125
|
-
})], f.prototype, "skin", void 0),
|
|
125
|
+
})], f.prototype, "skin", void 0), t([n({
|
|
126
126
|
type: Boolean,
|
|
127
127
|
reflect: !0
|
|
128
|
-
})], f.prototype, "compact", void 0),
|
|
128
|
+
})], f.prototype, "compact", void 0), t([n({
|
|
129
129
|
type: Boolean,
|
|
130
130
|
reflect: !0
|
|
131
|
-
})], f.prototype, "isOpen", void 0),
|
|
131
|
+
})], f.prototype, "isOpen", void 0), t([n({
|
|
132
132
|
type: String,
|
|
133
133
|
reflect: !0
|
|
134
134
|
})], f.prototype, "name", void 0);
|
|
135
135
|
try {
|
|
136
|
-
|
|
136
|
+
i("pkt-accordion-item")(f);
|
|
137
137
|
} catch {
|
|
138
138
|
console.warn("Forsøker å definere <pkt-accordion-item>, men den er allerede definert");
|
|
139
139
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const e=require(`./element-
|
|
1
|
+
const e=require(`./element-CXAtr6Gu.cjs`),t=require(`./class-map-B8Ja0q7n.cjs`),n=require(`./element-with-slot-Cmxb9h4H.cjs`),r=require(`./if-defined-LTjAScFG.cjs`),i=require(`./ref-CBdWMlde.cjs`);var a=class extends e.i{constructor(...e){super(...e),this.ariaLabelledBy=``,this.compact=!1,this.skin=`borderless`,this.name=``}updated(e){e.has(`skin`)&&this.requestUpdate(),e.has(`name`)&&this.updateAccordionItemNames()}updateAccordionItemNames(){if(this.name){let e=this.renderRoot?.querySelector(`slot`);e&&e.assignedElements().forEach(e=>{e.tagName.toLowerCase()===`pkt-accordion-item`&&(e.hasAttribute(`name`)||e.setAttribute(`name`,this.name))})}}firstUpdated(){let e=this.renderRoot?.querySelector(`slot`);e&&e.addEventListener(`slotchange`,()=>{this.updateAccordionItemNames()})}render(){return e.p`
|
|
2
2
|
<div
|
|
3
3
|
part="container"
|
|
4
4
|
class=${t.t({"pkt-accordion":!0,"pkt-accordion--compact":this.compact,[`pkt-accordion--${this.skin}`]:this.skin})}
|
|
@@ -7,7 +7,7 @@ const e=require(`./element-DjtxO-1r.cjs`),t=require(`./class-map-CJ-msbHs.cjs`),
|
|
|
7
7
|
>
|
|
8
8
|
<slot></slot>
|
|
9
9
|
</div>
|
|
10
|
-
`}};e.
|
|
10
|
+
`}};e.n([e.o({type:String,reflect:!0,attribute:`aria-labelledby`})],a.prototype,`ariaLabelledBy`,void 0),e.n([e.o({type:Boolean,reflect:!0,attribute:`compact`})],a.prototype,`compact`,void 0),e.n([e.o({type:String,reflect:!0,attribute:`skin`})],a.prototype,`skin`,void 0),e.n([e.o({type:String,reflect:!0,attribute:`name`})],a.prototype,`name`,void 0);try{e.s(`pkt-accordion`)(a)}catch{console.warn(`Forsøker å definere <pkt-accordion>, men den er allerede definert`)}var o=class extends n.t{constructor(){super(),this.defaultOpen=!1,this.title=``,this.skin=void 0,this.compact=!1,this.isOpen=!1,this.name=void 0,this.accordionItemRef=i.t()}firstUpdated(e){this.defaultOpen&&(this.isOpen=!0)}render(){let a={"pkt-accordion-item":!0,"pkt-accordion-item--compact":this.compact,[`pkt-accordion-item--${this.skin}`]:!!this.skin},o=this.skin===`plus-minus`;return e.p`
|
|
11
11
|
<details
|
|
12
12
|
class=${t.t(a)}
|
|
13
13
|
id=${this.id}
|
|
@@ -17,7 +17,7 @@ const e=require(`./element-DjtxO-1r.cjs`),t=require(`./class-map-CJ-msbHs.cjs`),
|
|
|
17
17
|
>
|
|
18
18
|
<summary class="pkt-accordion-item__title" id=${`pkt-accordion-item-summary-${this.id}`}>
|
|
19
19
|
${this.title}
|
|
20
|
-
${o?e.
|
|
20
|
+
${o?e.p`
|
|
21
21
|
<pkt-icon
|
|
22
22
|
name="plus-sign"
|
|
23
23
|
class="pkt-accordion-item__icon pkt-accordion-item__icon--plus"
|
|
@@ -28,7 +28,7 @@ const e=require(`./element-DjtxO-1r.cjs`),t=require(`./class-map-CJ-msbHs.cjs`),
|
|
|
28
28
|
class="pkt-accordion-item__icon pkt-accordion-item__icon--minus"
|
|
29
29
|
aria-hidden="true"
|
|
30
30
|
></pkt-icon>
|
|
31
|
-
`:e.
|
|
31
|
+
`:e.p`
|
|
32
32
|
<pkt-icon
|
|
33
33
|
name="chevron-thin-down"
|
|
34
34
|
class="pkt-accordion-item__icon"
|
|
@@ -44,4 +44,4 @@ const e=require(`./element-DjtxO-1r.cjs`),t=require(`./class-map-CJ-msbHs.cjs`),
|
|
|
44
44
|
<div class="pkt-accordion-item__content-inner">${n.n(this)}</div>
|
|
45
45
|
</div>
|
|
46
46
|
</details>
|
|
47
|
-
`}};e.
|
|
47
|
+
`}};e.n([e.o({type:Boolean})],o.prototype,`defaultOpen`,void 0),e.n([e.o({type:String})],o.prototype,`title`,void 0),e.n([e.o({type:String,reflect:!0})],o.prototype,`skin`,void 0),e.n([e.o({type:Boolean,reflect:!0})],o.prototype,`compact`,void 0),e.n([e.o({type:Boolean,reflect:!0})],o.prototype,`isOpen`,void 0),e.n([e.o({type:String,reflect:!0})],o.prototype,`name`,void 0);try{e.s(`pkt-accordion-item`)(o)}catch{console.warn(`Forsøker å definere <pkt-accordion-item>, men den er allerede definert`)}var s=a;Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return s}});
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as o } from "./class-map-
|
|
3
|
-
import { n as s, t as c } from "./element-with-slot-
|
|
4
|
-
import { t as l } from "./classutils-
|
|
5
|
-
import "./icon-
|
|
6
|
-
import "./button-
|
|
1
|
+
import { a as e, d as t, n, o as r, p as i, s as a } from "./element-CduG0XyF.js";
|
|
2
|
+
import { t as o } from "./class-map-DH9hlJny.js";
|
|
3
|
+
import { n as s, t as c } from "./element-with-slot-BVj9MXzi.js";
|
|
4
|
+
import { t as l } from "./classutils-lVbGcvjN.js";
|
|
5
|
+
import "./icon-LaKyBKON.js";
|
|
6
|
+
import "./button-CR-KWhTT.js";
|
|
7
7
|
var u = {
|
|
8
8
|
name: "pkt-alert",
|
|
9
9
|
react: "PktAlert",
|
|
@@ -96,21 +96,21 @@ var u = {
|
|
|
96
96
|
"pkt-alert--compact": this.compact,
|
|
97
97
|
[`pkt-alert--${this.skin}`]: this.skin,
|
|
98
98
|
"pkt-hide": this._isClosed
|
|
99
|
-
},
|
|
99
|
+
}, n = {
|
|
100
100
|
"pkt-alert__grid": !0,
|
|
101
101
|
"pkt-alert__noTitle": !this.title,
|
|
102
102
|
"pkt-alert__noDate": !this.date
|
|
103
103
|
};
|
|
104
|
-
return
|
|
104
|
+
return i`
|
|
105
105
|
<div class=${o(e)} aria-live=${this.ariaLiveAttr}>
|
|
106
|
-
<div class=${o(
|
|
106
|
+
<div class=${o(n)}>
|
|
107
107
|
<pkt-icon
|
|
108
108
|
class="pkt-alert__icon"
|
|
109
109
|
aria-hidden="true"
|
|
110
110
|
name=${this.skin === "info" ? "alert-information" : `alert-${this.skin}`}
|
|
111
111
|
></pkt-icon>
|
|
112
112
|
|
|
113
|
-
${this.closeAlert ?
|
|
113
|
+
${this.closeAlert ? i`
|
|
114
114
|
<div class="pkt-alert__close">
|
|
115
115
|
<pkt-button
|
|
116
116
|
tabindex="0"
|
|
@@ -125,42 +125,42 @@ var u = {
|
|
|
125
125
|
<span class="sr-only">Lukk</span>
|
|
126
126
|
</pkt-button>
|
|
127
127
|
</div>
|
|
128
|
-
` :
|
|
129
|
-
${this.title ?
|
|
128
|
+
` : t}
|
|
129
|
+
${this.title ? i`<div class="pkt-alert__title">${this.title}</div>` : t}
|
|
130
130
|
|
|
131
131
|
<div class="pkt-alert__text">${s(this)}</div>
|
|
132
132
|
|
|
133
|
-
${this.date ?
|
|
133
|
+
${this.date ? i`<div class="pkt-alert__date">Sist oppdatert: ${this.date}</div>` : t}
|
|
134
134
|
</div>
|
|
135
135
|
</div>
|
|
136
136
|
`;
|
|
137
137
|
}
|
|
138
138
|
};
|
|
139
|
-
|
|
139
|
+
n([r({
|
|
140
140
|
type: Boolean,
|
|
141
141
|
reflect: !1
|
|
142
|
-
})], d.prototype, "compact", void 0),
|
|
142
|
+
})], d.prototype, "compact", void 0), n([r({
|
|
143
143
|
type: String,
|
|
144
144
|
reflect: !0
|
|
145
|
-
})], d.prototype, "title", void 0),
|
|
145
|
+
})], d.prototype, "title", void 0), n([r({
|
|
146
146
|
type: String,
|
|
147
147
|
reflect: !0
|
|
148
|
-
})], d.prototype, "skin", void 0),
|
|
148
|
+
})], d.prototype, "skin", void 0), n([r({ type: String })], d.prototype, "ariaLive", void 0), n([r({
|
|
149
149
|
type: String,
|
|
150
150
|
reflect: !0,
|
|
151
151
|
attribute: "aria-live"
|
|
152
|
-
})], d.prototype, "ariaLiveAttr", void 0),
|
|
152
|
+
})], d.prototype, "ariaLiveAttr", void 0), n([r({
|
|
153
153
|
type: Boolean,
|
|
154
154
|
reflect: !0
|
|
155
|
-
})], d.prototype, "closeAlert", void 0),
|
|
155
|
+
})], d.prototype, "closeAlert", void 0), n([r({
|
|
156
156
|
type: String,
|
|
157
157
|
reflect: !0
|
|
158
|
-
})], d.prototype, "date", void 0),
|
|
158
|
+
})], d.prototype, "date", void 0), n([r({
|
|
159
159
|
type: String,
|
|
160
160
|
reflect: !0
|
|
161
|
-
})], d.prototype, "role", void 0),
|
|
161
|
+
})], d.prototype, "role", void 0), n([e()], d.prototype, "_isClosed", void 0);
|
|
162
162
|
try {
|
|
163
|
-
|
|
163
|
+
a("pkt-alert")(d);
|
|
164
164
|
} catch {
|
|
165
165
|
console.warn("Forsøker å definere <pkt-alert>, men den er allerede definert");
|
|
166
166
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const e=require(`./element-
|
|
1
|
+
const e=require(`./element-CXAtr6Gu.cjs`),t=require(`./class-map-B8Ja0q7n.cjs`),n=require(`./element-with-slot-Cmxb9h4H.cjs`),r=require(`./classutils-CVTzKF0J.cjs`);require(`./icon-Dw6I0HDV.cjs`),require(`./button-Dwv11n6R.cjs`);var i={name:`pkt-alert`,react:`PktAlert`,"css-class":`pkt-alert`,"dark-mode":!0,isElement:!0,isPureReact:!0,events:{onClose:{description:`React: Klikk-event for 'Lukk'-knappen`},close:{description:`Vue: Klikk-event for 'Lukk'-knappen`}},props:{title:{name:`Tittel`,description:`Tittelen som vises øverst i på meldingen`,type:`string`,category:`contents`},skin:{name:`Utseende`,description:`Hvordan type melding er dette?`,type:[`info`,`success`,`warning`,`error`],default:`info`,category:`ui`},date:{name:`Sist oppdatert`,description:`Dato som vises nederst i på meldingen`,type:`string`,category:`contents`},ariaLive:{name:`aria-live`,description:`Hvordan skal skjermleseren lese opp meldingen?`,type:[`off`,`polite`,`assertive`],default:`polite`,category:`accessibility`},compact:{name:`Kompakt`,description:`Gjør meldingen mindre`,type:`boolean`,category:`ui`,default:!1},closeAlert:{name:`Vis 'Lukk'-knapp`,description:`Viser 'Lukk'-knappen`,type:`boolean`,default:!1,category:`ui`}},slots:{default:{description:`Innholdet i meldingen`}}},a=class extends n.t{constructor(){super(),this.compact=i.props.compact.default,this.title=``,this.skin=i.props.skin.default,this.ariaLive=i.props.ariaLive.default,this.ariaLiveAttr=null,this.closeAlert=i.props.closeAlert.default,this.date=null,this.role=`status`,this._isClosed=!1,this.close=e=>{this._isClosed=!0,this.dispatchEvent(new CustomEvent(`close`,{detail:{origin:e},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent(`on-close`,{detail:{origin:e},bubbles:!0,composed:!0}))},this._isClosed=!1}connectedCallback(){super.connectedCallback(),this.ariaLiveAttr=this.getAttribute(`aria-live`)||this.ariaLive}attributeChangedCallback(e,t,n){e===`ariaLive`&&(this.ariaLiveAttr=n),super.attributeChangedCallback(e,t,n)}updated(e){super.updated(e),e.has(`ariaLive`)&&(this.ariaLiveAttr=this.ariaLive),e.has(`_isClosed`)&&r.t(this,`pkt-hide`,this._isClosed)}render(){let r={"pkt-alert":!0,"pkt-alert--compact":this.compact,[`pkt-alert--${this.skin}`]:this.skin,"pkt-hide":this._isClosed},i={"pkt-alert__grid":!0,"pkt-alert__noTitle":!this.title,"pkt-alert__noDate":!this.date};return e.p`
|
|
2
2
|
<div class=${t.t(r)} aria-live=${this.ariaLiveAttr}>
|
|
3
3
|
<div class=${t.t(i)}>
|
|
4
4
|
<pkt-icon
|
|
@@ -7,7 +7,7 @@ const e=require(`./element-DjtxO-1r.cjs`),t=require(`./class-map-CJ-msbHs.cjs`),
|
|
|
7
7
|
name=${this.skin===`info`?`alert-information`:`alert-${this.skin}`}
|
|
8
8
|
></pkt-icon>
|
|
9
9
|
|
|
10
|
-
${this.closeAlert?e.
|
|
10
|
+
${this.closeAlert?e.p`
|
|
11
11
|
<div class="pkt-alert__close">
|
|
12
12
|
<pkt-button
|
|
13
13
|
tabindex="0"
|
|
@@ -22,12 +22,12 @@ const e=require(`./element-DjtxO-1r.cjs`),t=require(`./class-map-CJ-msbHs.cjs`),
|
|
|
22
22
|
<span class="sr-only">Lukk</span>
|
|
23
23
|
</pkt-button>
|
|
24
24
|
</div>
|
|
25
|
-
`:e.
|
|
26
|
-
${this.title?e.
|
|
25
|
+
`:e.d}
|
|
26
|
+
${this.title?e.p`<div class="pkt-alert__title">${this.title}</div>`:e.d}
|
|
27
27
|
|
|
28
28
|
<div class="pkt-alert__text">${n.n(this)}</div>
|
|
29
29
|
|
|
30
|
-
${this.date?e.
|
|
30
|
+
${this.date?e.p`<div class="pkt-alert__date">Sist oppdatert: ${this.date}</div>`:e.d}
|
|
31
31
|
</div>
|
|
32
32
|
</div>
|
|
33
|
-
`}};e.
|
|
33
|
+
`}};e.n([e.o({type:Boolean,reflect:!1})],a.prototype,`compact`,void 0),e.n([e.o({type:String,reflect:!0})],a.prototype,`title`,void 0),e.n([e.o({type:String,reflect:!0})],a.prototype,`skin`,void 0),e.n([e.o({type:String})],a.prototype,`ariaLive`,void 0),e.n([e.o({type:String,reflect:!0,attribute:`aria-live`})],a.prototype,`ariaLiveAttr`,void 0),e.n([e.o({type:Boolean,reflect:!0})],a.prototype,`closeAlert`,void 0),e.n([e.o({type:String,reflect:!0})],a.prototype,`date`,void 0),e.n([e.o({type:String,reflect:!0})],a.prototype,`role`,void 0),e.n([e.a()],a.prototype,`_isClosed`,void 0);try{e.s(`pkt-alert`)(a)}catch{console.warn(`Forsøker å definere <pkt-alert>, men den er allerede definert`)}var o=a;Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return o}});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { i as n } from "./directive-helpers-
|
|
1
|
+
import { l as e, u as t } from "./element-CduG0XyF.js";
|
|
2
|
+
import { i as n } from "./directive-helpers-Cep_4cpj.js";
|
|
3
3
|
//#region ../../node_modules/lit-html/async-directive.js
|
|
4
4
|
var r = (e, t) => {
|
|
5
5
|
let n = e._$AN;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`./element-CXAtr6Gu.cjs`),t=require(`./directive-helpers-f36YZFOG.cjs`);var n=(e,t)=>{let r=e._$AN;if(r===void 0)return!1;for(let e of r)e._$AO?.(t,!1),n(e,t);return!0},r=e=>{let t,n;do{if((t=e._$AM)===void 0)break;n=t._$AN,n.delete(e),e=t}while(n?.size===0)},i=e=>{for(let t;t=e._$AM;e=t){let n=t._$AN;if(n===void 0)t._$AN=n=new Set;else if(n.has(e))break;n.add(e),s(t)}};function a(e){this._$AN===void 0?this._$AM=e:(r(this),this._$AM=e,i(this))}function o(e,t=!1,i=0){let a=this._$AH,o=this._$AN;if(o!==void 0&&o.size!==0)if(t)if(Array.isArray(a))for(let e=i;e<a.length;e++)n(a[e],!1),r(a[e]);else a!=null&&(n(a,!1),r(a));else n(this,e)}var s=t=>{t.type==e.u.CHILD&&(t._$AP??=o,t._$AQ??=a)},c=class extends e.l{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,t,n){super._$AT(e,t,n),i(this),this.isConnected=e._$AU}_$AO(e,t=!0){e!==this.isConnected&&(this.isConnected=e,e?this.reconnected?.():this.disconnected?.()),t&&(n(this,e),r(this))}setValue(e){if(t.i(this._$Ct))this._$Ct._$AI(e,this);else{let t=[...this._$Ct._$AH];t[this._$Ci]=e,this._$Ct._$AI(t,this,0)}}disconnected(){}reconnected(){}};Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return c}});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "./icon-
|
|
3
|
-
import { t as a } from "./if-defined-
|
|
1
|
+
import { n as e, o as t, p as n, s as r, t as i } from "./element-CduG0XyF.js";
|
|
2
|
+
import "./icon-LaKyBKON.js";
|
|
3
|
+
import { t as a } from "./if-defined-VShASPdu.js";
|
|
4
4
|
//#region src/components/backlink/backlink.ts
|
|
5
5
|
var o = class extends i {
|
|
6
6
|
constructor(...e) {
|
|
@@ -10,7 +10,7 @@ var o = class extends i {
|
|
|
10
10
|
e === "arialabel" && this.removeAttribute("arialabel"), e === "href" && this.removeAttribute("href"), e === "text" && this.removeAttribute("text"), super.attributeChangedCallback(e, t, n);
|
|
11
11
|
}
|
|
12
12
|
render() {
|
|
13
|
-
return
|
|
13
|
+
return n`<nav
|
|
14
14
|
class="pkt-back-link"
|
|
15
15
|
aria-label=${this.ariaLabel || "Gå tilbake til forrige side"}
|
|
16
16
|
>
|
|
@@ -25,9 +25,9 @@ var o = class extends i {
|
|
|
25
25
|
</nav>`;
|
|
26
26
|
}
|
|
27
27
|
};
|
|
28
|
-
|
|
28
|
+
e([t({ type: String })], o.prototype, "href", void 0), e([t({ type: String })], o.prototype, "text", void 0), e([t({ type: String })], o.prototype, "ariaLabel", void 0);
|
|
29
29
|
try {
|
|
30
|
-
|
|
30
|
+
r("pkt-backlink")(o);
|
|
31
31
|
} catch {
|
|
32
32
|
console.warn("Forsøker å definere <pkt-backlink>, men den er allerede definert");
|
|
33
33
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const e=require(`./element-
|
|
1
|
+
const e=require(`./element-CXAtr6Gu.cjs`);require(`./icon-Dw6I0HDV.cjs`);const t=require(`./if-defined-LTjAScFG.cjs`);var n=class extends e.t{constructor(...e){super(...e),this.href=``,this.text=`Forsiden`,this.ariaLabel=``}attributeChangedCallback(e,t,n){e===`arialabel`&&this.removeAttribute(`arialabel`),e===`href`&&this.removeAttribute(`href`),e===`text`&&this.removeAttribute(`text`),super.attributeChangedCallback(e,t,n)}render(){return e.p`<nav
|
|
2
2
|
class="pkt-back-link"
|
|
3
3
|
aria-label=${this.ariaLabel||`Gå tilbake til forrige side`}
|
|
4
4
|
>
|
|
@@ -10,4 +10,4 @@ const e=require(`./element-DjtxO-1r.cjs`);require(`./icon-PbaC9uUg.cjs`);const t
|
|
|
10
10
|
></pkt-icon
|
|
11
11
|
><span class="pkt-back-link__text">${this.text}</span></a
|
|
12
12
|
>
|
|
13
|
-
</nav>`}};e.
|
|
13
|
+
</nav>`}};e.n([e.o({type:String})],n.prototype,`href`,void 0),e.n([e.o({type:String})],n.prototype,`text`,void 0),e.n([e.o({type:String})],n.prototype,`ariaLabel`,void 0);try{e.s(`pkt-backlink`)(n)}catch{console.warn(`Forsøker å definere <pkt-backlink>, men den er allerede definert`)}var r=n;Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return n}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return r}});
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
const e=require(`./element-
|
|
1
|
+
const e=require(`./element-CXAtr6Gu.cjs`);require(`./icon-Dw6I0HDV.cjs`);var t=class extends e.t{constructor(...e){super(...e),this.breadcrumbs=[]}handleLinkClick(e,t,n){let r=new CustomEvent(`navigate`,{detail:{item:t,index:n,originalEvent:e},bubbles:!0,composed:!0,cancelable:!0});this.dispatchEvent(r)||e.preventDefault()}render(){if(!this.breadcrumbs||this.breadcrumbs.length===0)return e.d;let t=this.breadcrumbs[this.breadcrumbs.length-2];return e.p`
|
|
2
2
|
<nav class="pkt-breadcrumbs" aria-label="brødsmulemeny">
|
|
3
3
|
<ol class="pkt-breadcrumbs__list pkt-breadcrumbs--desktop">
|
|
4
|
-
${this.breadcrumbs.map((t,n)=>n===this.breadcrumbs.length-1?e.
|
|
4
|
+
${this.breadcrumbs.map((t,n)=>n===this.breadcrumbs.length-1?e.p`
|
|
5
5
|
<li class="pkt-breadcrumbs__item">
|
|
6
6
|
<span class="pkt-breadcrumbs__label" aria-current="true">
|
|
7
7
|
<span class="pkt-breadcrumbs__text">${t.text}</span>
|
|
8
8
|
</span>
|
|
9
9
|
</li>
|
|
10
|
-
`:e.
|
|
10
|
+
`:e.p`
|
|
11
11
|
<li class="pkt-breadcrumbs__item">
|
|
12
12
|
<a
|
|
13
13
|
class="pkt-link pkt-link--icon-right pkt-breadcrumbs__label pkt-breadcrumbs__link"
|
|
@@ -25,7 +25,7 @@ const e=require(`./element-DjtxO-1r.cjs`);require(`./icon-PbaC9uUg.cjs`);var t=c
|
|
|
25
25
|
`)}
|
|
26
26
|
</ol>
|
|
27
27
|
|
|
28
|
-
${t?e.
|
|
28
|
+
${t?e.p`
|
|
29
29
|
<a
|
|
30
30
|
class="pkt-link pkt-link--icon-left pkt-breadcrumbs--mobile"
|
|
31
31
|
href=${t.href}
|
|
@@ -38,6 +38,6 @@ const e=require(`./element-DjtxO-1r.cjs`);require(`./icon-PbaC9uUg.cjs`);var t=c
|
|
|
38
38
|
></pkt-icon>
|
|
39
39
|
<span class="pkt-breadcrumbs__text">${t.text}</span>
|
|
40
40
|
</a>
|
|
41
|
-
`:e.
|
|
41
|
+
`:e.d}
|
|
42
42
|
</nav>
|
|
43
|
-
`}};e.
|
|
43
|
+
`}};e.n([e.o({type:Array})],t.prototype,`breadcrumbs`,void 0);try{e.s(`pkt-breadcrumbs`)(t)}catch{console.warn(`Forsøker å definere <pkt-breadcrumbs>, men den er allerede definert`)}Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return t}});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "./icon-
|
|
1
|
+
import { d as e, n as t, o as n, p as r, s as i, t as a } from "./element-CduG0XyF.js";
|
|
2
|
+
import "./icon-LaKyBKON.js";
|
|
3
3
|
//#region src/components/breadcrumbs/breadcrumbs.ts
|
|
4
4
|
var o = class extends a {
|
|
5
5
|
constructor(...e) {
|
|
@@ -19,23 +19,23 @@ var o = class extends a {
|
|
|
19
19
|
this.dispatchEvent(r) || e.preventDefault();
|
|
20
20
|
}
|
|
21
21
|
render() {
|
|
22
|
-
if (!this.breadcrumbs || this.breadcrumbs.length === 0) return
|
|
23
|
-
let
|
|
24
|
-
return
|
|
22
|
+
if (!this.breadcrumbs || this.breadcrumbs.length === 0) return e;
|
|
23
|
+
let t = this.breadcrumbs[this.breadcrumbs.length - 2];
|
|
24
|
+
return r`
|
|
25
25
|
<nav class="pkt-breadcrumbs" aria-label="brødsmulemeny">
|
|
26
26
|
<ol class="pkt-breadcrumbs__list pkt-breadcrumbs--desktop">
|
|
27
|
-
${this.breadcrumbs.map((e,
|
|
27
|
+
${this.breadcrumbs.map((e, t) => t === this.breadcrumbs.length - 1 ? r`
|
|
28
28
|
<li class="pkt-breadcrumbs__item">
|
|
29
29
|
<span class="pkt-breadcrumbs__label" aria-current="true">
|
|
30
30
|
<span class="pkt-breadcrumbs__text">${e.text}</span>
|
|
31
31
|
</span>
|
|
32
32
|
</li>
|
|
33
|
-
` :
|
|
33
|
+
` : r`
|
|
34
34
|
<li class="pkt-breadcrumbs__item">
|
|
35
35
|
<a
|
|
36
36
|
class="pkt-link pkt-link--icon-right pkt-breadcrumbs__label pkt-breadcrumbs__link"
|
|
37
37
|
href=${e.href}
|
|
38
|
-
@click=${(
|
|
38
|
+
@click=${(n) => this.handleLinkClick(n, e, t)}
|
|
39
39
|
>
|
|
40
40
|
<pkt-icon
|
|
41
41
|
class="pkt-icon pkt-breadcrumbs__icon pkt-link__icon"
|
|
@@ -48,27 +48,27 @@ var o = class extends a {
|
|
|
48
48
|
`)}
|
|
49
49
|
</ol>
|
|
50
50
|
|
|
51
|
-
${
|
|
51
|
+
${t ? r`
|
|
52
52
|
<a
|
|
53
53
|
class="pkt-link pkt-link--icon-left pkt-breadcrumbs--mobile"
|
|
54
|
-
href=${
|
|
55
|
-
@click=${(
|
|
54
|
+
href=${t.href}
|
|
55
|
+
@click=${(e) => this.handleLinkClick(e, t, this.breadcrumbs.length - 2)}
|
|
56
56
|
>
|
|
57
57
|
<pkt-icon
|
|
58
58
|
class="pkt-back-link__icon pkt-icon pkt-link__icon"
|
|
59
59
|
name="chevron-thin-left"
|
|
60
60
|
aria-hidden="true"
|
|
61
61
|
></pkt-icon>
|
|
62
|
-
<span class="pkt-breadcrumbs__text">${
|
|
62
|
+
<span class="pkt-breadcrumbs__text">${t.text}</span>
|
|
63
63
|
</a>
|
|
64
|
-
` :
|
|
64
|
+
` : e}
|
|
65
65
|
</nav>
|
|
66
66
|
`;
|
|
67
67
|
}
|
|
68
68
|
};
|
|
69
|
-
|
|
69
|
+
t([n({ type: Array })], o.prototype, "breadcrumbs", void 0);
|
|
70
70
|
try {
|
|
71
|
-
|
|
71
|
+
i("pkt-breadcrumbs")(o);
|
|
72
72
|
} catch {
|
|
73
73
|
console.warn("Forsøker å definere <pkt-breadcrumbs>, men den er allerede definert");
|
|
74
74
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as a } from "./class-map-
|
|
3
|
-
import { n as o, t as s } from "./element-with-slot-
|
|
4
|
-
import "./icon-
|
|
5
|
-
import { t as c } from "./if-defined-
|
|
1
|
+
import { d as e, n as t, o as n, p as r, s as i } from "./element-CduG0XyF.js";
|
|
2
|
+
import { t as a } from "./class-map-DH9hlJny.js";
|
|
3
|
+
import { n as o, t as s } from "./element-with-slot-BVj9MXzi.js";
|
|
4
|
+
import "./icon-LaKyBKON.js";
|
|
5
|
+
import { t as c } from "./if-defined-VShASPdu.js";
|
|
6
6
|
//#region src/components/button/button.ts
|
|
7
7
|
window.pktAnimationPath = window.pktAnimationPath || "https://punkt-cdn.oslo.kommune.no/latest/animations/";
|
|
8
8
|
var l = class extends s {
|
|
@@ -23,8 +23,8 @@ var l = class extends s {
|
|
|
23
23
|
super.firstUpdated(e), this.disabled === "false" && (this.disabled = !1), this.isLoading === "false" && (this.isLoading = !1);
|
|
24
24
|
}
|
|
25
25
|
render() {
|
|
26
|
-
let
|
|
27
|
-
return
|
|
26
|
+
let t = this.form ?? this.getAttribute("form") ?? void 0;
|
|
27
|
+
return r`
|
|
28
28
|
<button
|
|
29
29
|
class=${a({
|
|
30
30
|
"pkt-btn": !0,
|
|
@@ -42,49 +42,49 @@ var l = class extends s {
|
|
|
42
42
|
?disabled=${!!this.disabled}
|
|
43
43
|
aria-busy=${c(this.isLoading ? "true" : void 0)}
|
|
44
44
|
aria-disabled=${c(this.disabled || this.isLoading ? "true" : void 0)}
|
|
45
|
-
form=${c(
|
|
45
|
+
form=${c(t)}
|
|
46
46
|
>
|
|
47
|
-
${this.isLoading ?
|
|
47
|
+
${this.isLoading ? r`<pkt-icon
|
|
48
48
|
class="pkt-btn__icon pkt-btn__spinner"
|
|
49
49
|
name="spinner-blue"
|
|
50
50
|
path=${c(this.loadingAnimationPath)}
|
|
51
|
-
></pkt-icon>` :
|
|
52
|
-
${this.variant === "label-only" ?
|
|
51
|
+
></pkt-icon>` : e}
|
|
52
|
+
${this.variant === "label-only" ? e : r`<pkt-icon
|
|
53
53
|
class="pkt-btn__icon pkt-icon"
|
|
54
54
|
name=${this.iconName}
|
|
55
55
|
path=${c(this.iconPath)}
|
|
56
56
|
></pkt-icon>`}
|
|
57
57
|
<span class="pkt-btn__text">${o(this)}</span>
|
|
58
|
-
${this.variant === "icons-right-and-left" ?
|
|
58
|
+
${this.variant === "icons-right-and-left" ? r`<pkt-icon
|
|
59
59
|
class="pkt-btn__icon"
|
|
60
60
|
name=${this.secondIconName}
|
|
61
61
|
path=${c(this.secondIconPath)}
|
|
62
|
-
></pkt-icon>` :
|
|
62
|
+
></pkt-icon>` : e}
|
|
63
63
|
</button>
|
|
64
64
|
`;
|
|
65
65
|
}
|
|
66
66
|
};
|
|
67
|
-
|
|
67
|
+
t([n({ type: String })], l.prototype, "iconName", void 0), t([n({ type: String })], l.prototype, "secondIconName", void 0), t([n({ type: String })], l.prototype, "iconPath", void 0), t([n({ type: String })], l.prototype, "secondIconPath", void 0), t([n({ type: String })], l.prototype, "mode", void 0), t([n({ type: String })], l.prototype, "size", void 0), t([n({
|
|
68
68
|
type: Boolean,
|
|
69
69
|
attribute: "full-width"
|
|
70
|
-
})], l.prototype, "fullWidth", void 0),
|
|
70
|
+
})], l.prototype, "fullWidth", void 0), t([n({
|
|
71
71
|
type: Boolean,
|
|
72
72
|
attribute: "full-width-on-mobile"
|
|
73
|
-
})], l.prototype, "fullWidthOnMobile", void 0),
|
|
73
|
+
})], l.prototype, "fullWidthOnMobile", void 0), t([n({ type: String })], l.prototype, "color", void 0), t([n({ type: String })], l.prototype, "skin", void 0), t([n({ type: String })], l.prototype, "variant", void 0), t([n({
|
|
74
74
|
type: String,
|
|
75
75
|
reflect: !0
|
|
76
|
-
})], l.prototype, "state", void 0),
|
|
76
|
+
})], l.prototype, "state", void 0), t([n({
|
|
77
77
|
type: String,
|
|
78
78
|
reflect: !0
|
|
79
|
-
})], l.prototype, "type", void 0),
|
|
79
|
+
})], l.prototype, "type", void 0), t([n({ type: String })], l.prototype, "form", void 0), t([n({
|
|
80
80
|
type: Boolean,
|
|
81
81
|
reflect: !0
|
|
82
|
-
})], l.prototype, "isLoading", void 0),
|
|
82
|
+
})], l.prototype, "isLoading", void 0), t([n({
|
|
83
83
|
type: Boolean,
|
|
84
84
|
reflect: !0
|
|
85
|
-
})], l.prototype, "disabled", void 0),
|
|
85
|
+
})], l.prototype, "disabled", void 0), t([n({ type: String })], l.prototype, "loadingAnimationPath", void 0);
|
|
86
86
|
try {
|
|
87
|
-
|
|
87
|
+
i("pkt-button")(l);
|
|
88
88
|
} catch {
|
|
89
89
|
console.warn("Forsøker å definere <pkt-button>, men den er allerede definert");
|
|
90
90
|
}
|