@oslokommune/punkt-elements 16.7.0 → 16.7.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +34 -0
- package/dist/accordionitem-_9AiCIvd.cjs +34 -0
- package/dist/{accordionitem-ZlaXvjt5.js → accordionitem-dCfSrxh5.js} +57 -55
- package/dist/alert-BtOk8yRH.cjs +33 -0
- package/dist/{alert-BuAXrnKl.js → alert-DlY2_grU.js} +48 -46
- package/dist/backlink-Ce5Vldop.js +49 -0
- package/dist/backlink-y3dwjKPC.cjs +13 -0
- package/dist/button-B_TXwNzt.cjs +27 -0
- package/dist/{button-DEyvt1LI.js → button-BiY-wlKF.js} +79 -77
- package/dist/calendar-B2pji2zn.cjs +90 -0
- package/dist/{calendar-S63oreVW.js → calendar-DhjQDC4C.js} +689 -687
- package/dist/card-BwMNB5Bb.cjs +87 -0
- package/dist/{card-DDiLfuO4.js → card-CGlmcMSR.js} +99 -97
- package/dist/checkbox-BsJZYA26.js +147 -0
- package/dist/checkbox-CTY8f_qn.cjs +31 -0
- package/dist/{combobox-BmxSecfE.js → combobox-DSB5WOxg.js} +223 -226
- package/dist/{combobox-Hb2V-fPX.cjs → combobox-DbICIgKG.cjs} +4 -4
- package/dist/consent-DkOQpbsg.cjs +11 -0
- package/dist/{consent-iXyx5v6J.js → consent-SNWV_mMU.js} +48 -46
- package/dist/datepicker-BEWl9iz3.cjs +273 -0
- package/dist/{datepicker-CZl7b8Na.js → datepicker-euHyzXnb.js} +341 -329
- package/dist/{heading-CKt7cVn7.js → heading-D2tVS6lS.js} +30 -28
- package/dist/heading-DrzbgDb6.cjs +1 -0
- package/dist/helptext-BKtU4mas.js +82 -0
- package/dist/helptext-DcRC7wW2.cjs +24 -0
- package/dist/icon-CxQcIa5F.js +105 -0
- package/dist/icon-q81vqPK_.cjs +9 -0
- package/dist/input-wrapper-Bs4CRNst.js +181 -0
- package/dist/input-wrapper-Bv9aqqVq.cjs +54 -0
- package/dist/link-C0rl-86s.cjs +7 -0
- package/dist/link-Cdqgl60z.js +55 -0
- package/dist/linkcard-Dimu7Rlx.cjs +13 -0
- package/dist/linkcard-Lbq_UhjZ.js +56 -0
- package/dist/{listbox-BQKDZvZn.js → listbox-Bia4_tvN.js} +131 -129
- package/dist/listbox-La2GZQei.cjs +106 -0
- package/dist/loader-D1ugDXGV.cjs +16 -0
- package/dist/{loader-Ci3CHU8k.js → loader-DyN6RGC5.js} +51 -49
- package/dist/messagebox-BGMVm2t9.js +71 -0
- package/dist/messagebox-M0yIgCz9.cjs +13 -0
- package/dist/modal-CMO1RtIi.cjs +36 -0
- package/dist/{modal-DzGe1g8Z.js → modal-DjPQDE-Z.js} +53 -51
- package/dist/pkt-accordion.cjs +1 -1
- package/dist/pkt-accordion.js +2 -2
- package/dist/pkt-alert.cjs +1 -1
- package/dist/pkt-alert.js +3 -4
- package/dist/pkt-backlink.cjs +1 -1
- package/dist/pkt-backlink.js +2 -3
- package/dist/pkt-breadcrumbs.cjs +11 -11
- package/dist/pkt-breadcrumbs.js +30 -28
- package/dist/pkt-button.cjs +1 -1
- package/dist/pkt-button.js +3 -4
- package/dist/pkt-calendar.cjs +1 -1
- package/dist/pkt-calendar.js +2 -3
- package/dist/pkt-card.cjs +1 -1
- package/dist/pkt-card.js +2 -3
- package/dist/pkt-checkbox.cjs +1 -1
- package/dist/pkt-checkbox.js +3 -4
- package/dist/pkt-combobox.cjs +1 -1
- package/dist/pkt-combobox.js +3 -4
- package/dist/pkt-consent.cjs +1 -1
- package/dist/pkt-consent.js +2 -3
- package/dist/pkt-datepicker.cjs +1 -1
- package/dist/pkt-datepicker.js +7 -8
- package/dist/pkt-header.cjs +35 -35
- package/dist/pkt-header.js +224 -218
- package/dist/pkt-heading.cjs +1 -1
- package/dist/pkt-heading.js +3 -4
- package/dist/pkt-helptext.cjs +1 -1
- package/dist/pkt-helptext.js +3 -4
- package/dist/pkt-icon.cjs +1 -1
- package/dist/pkt-icon.js +3 -4
- package/dist/pkt-index.cjs +1 -1
- package/dist/pkt-index.js +26 -26
- package/dist/pkt-input-wrapper.cjs +1 -1
- package/dist/pkt-input-wrapper.js +2 -3
- package/dist/pkt-link.cjs +1 -1
- package/dist/pkt-link.js +2 -3
- package/dist/pkt-linkcard.cjs +1 -1
- package/dist/pkt-linkcard.js +3 -4
- package/dist/pkt-listbox.cjs +1 -1
- package/dist/pkt-listbox.js +3 -4
- package/dist/pkt-loader.cjs +1 -1
- package/dist/pkt-loader.js +3 -4
- package/dist/pkt-messagebox.cjs +1 -1
- package/dist/pkt-messagebox.js +3 -4
- package/dist/pkt-modal.cjs +1 -1
- package/dist/pkt-modal.js +3 -4
- package/dist/pkt-progressbar.cjs +1 -1
- package/dist/pkt-progressbar.js +2 -3
- package/dist/pkt-radiobutton.cjs +1 -1
- package/dist/pkt-radiobutton.js +3 -4
- package/dist/pkt-select.cjs +1 -1
- package/dist/pkt-select.js +3 -4
- package/dist/pkt-tabs.cjs +1 -1
- package/dist/pkt-tabs.js +2 -2
- package/dist/pkt-tag.cjs +1 -1
- package/dist/pkt-tag.js +3 -4
- package/dist/pkt-textarea.cjs +1 -1
- package/dist/pkt-textarea.js +3 -4
- package/dist/pkt-textinput.cjs +1 -1
- package/dist/pkt-textinput.js +3 -4
- package/dist/pkt-timepicker.cjs +22 -19
- package/dist/pkt-timepicker.js +84 -76
- package/dist/progressbar-BqlMzkM_.cjs +21 -0
- package/dist/{progressbar-By7e0lEI.js → progressbar-sbHDFC12.js} +88 -88
- package/dist/radiobutton-5ZqVVtTT.cjs +31 -0
- package/dist/{radiobutton-6frNG9J_.js → radiobutton-D8Ai8ETa.js} +44 -42
- package/dist/select-De-n8on9.js +230 -0
- package/dist/select-dTWibR6_.cjs +49 -0
- package/dist/tabitem-B9-jeV97.js +334 -0
- package/dist/tabitem-BnhzqfW3.cjs +65 -0
- package/dist/tag-CbwO8yvD.cjs +27 -0
- package/dist/{tag-BuCpqaks.js → tag-D4FI5t3y.js} +42 -40
- package/dist/textarea-BmLaKzsc.cjs +50 -0
- package/dist/{textarea-Bzuymclz.js → textarea-CMiSJaYL.js} +62 -60
- package/dist/textinput-em9y4yrL.cjs +70 -0
- package/dist/{textinput-9lHjs4ce.js → textinput-r8udK0IX.js} +57 -55
- package/package.json +2 -2
- package/src/components/accordion/accordion.ts +6 -1
- package/src/components/accordion/accordionitem.ts +6 -1
- package/src/components/alert/alert.ts +6 -1
- package/src/components/backlink/backlink.ts +6 -1
- package/src/components/breadcrumbs/breadcrumbs.ts +6 -1
- package/src/components/button/button.ts +6 -1
- package/src/components/calendar/calendar.ts +6 -1
- package/src/components/card/card.ts +6 -1
- package/src/components/checkbox/checkbox.ts +6 -1
- package/src/components/combobox/combobox.ts +6 -1
- package/src/components/consent/consent.ts +6 -1
- package/src/components/datepicker/date-tags.ts +6 -1
- package/src/components/datepicker/datepicker-multiple.ts +6 -1
- package/src/components/datepicker/datepicker-popup.ts +6 -1
- package/src/components/datepicker/datepicker-range.ts +6 -1
- package/src/components/datepicker/datepicker-single.ts +6 -1
- package/src/components/datepicker/datepicker.ts +6 -1
- package/src/components/header/header-service.ts +6 -1
- package/src/components/header/header-user-menu.ts +6 -1
- package/src/components/header/header.ts +6 -1
- package/src/components/heading/heading.ts +6 -1
- package/src/components/helptext/helptext.ts +6 -1
- package/src/components/icon/icon.ts +6 -1
- package/src/components/input-wrapper/input-wrapper.ts +6 -1
- package/src/components/link/link.ts +6 -1
- package/src/components/linkcard/linkcard.ts +6 -1
- package/src/components/listbox/listbox.ts +6 -1
- package/src/components/loader/loader.ts +6 -1
- package/src/components/messagebox/messagebox.ts +6 -1
- package/src/components/modal/modal.ts +6 -1
- package/src/components/progressbar/progressbar.ts +6 -1
- package/src/components/radiobutton/radiobutton.ts +6 -1
- package/src/components/select/select.ts +6 -1
- package/src/components/tabs/tabitem.ts +6 -1
- package/src/components/tabs/tabs.ts +6 -1
- package/src/components/tag/tag.ts +6 -1
- package/src/components/textarea/textarea.ts +6 -1
- package/src/components/textinput/textinput.ts +6 -1
- package/src/components/timepicker/timepicker.ts +14 -2
- package/dist/accordionitem-D1Agl1bB.cjs +0 -34
- package/dist/alert-DFkFNTxh.cjs +0 -33
- package/dist/backlink-EiAXUUZP.cjs +0 -13
- package/dist/backlink-V4DAt17e.js +0 -47
- package/dist/button-DYv5Dg4M.cjs +0 -27
- package/dist/calendar-HIE9nxcc.cjs +0 -90
- package/dist/card-CyeH6l1c.cjs +0 -87
- package/dist/checkbox-BLlwTABj.cjs +0 -31
- package/dist/checkbox-ejBUa5qQ.js +0 -145
- package/dist/consent-ruWAEVXW.cjs +0 -11
- package/dist/datepicker-D2H7U6MS.cjs +0 -273
- package/dist/heading-Cvz8m1xL.cjs +0 -1
- package/dist/helptext-5Mzp65-F.cjs +0 -24
- package/dist/helptext-jIoWRcCF.js +0 -80
- package/dist/icon-BlKA8YuW.js +0 -103
- package/dist/icon-Bqj9oBbl.cjs +0 -9
- package/dist/input-wrapper-B0MkQ0IZ.cjs +0 -54
- package/dist/input-wrapper-B2JpK016.js +0 -179
- package/dist/link-R_lNhViF.cjs +0 -7
- package/dist/link-Z_GizclR.js +0 -53
- package/dist/linkcard-BlQvdB1a.js +0 -54
- package/dist/linkcard-C7HbSLlX.cjs +0 -13
- package/dist/listbox-CGgV9MAe.cjs +0 -106
- package/dist/loader-e2gs_1xz.cjs +0 -16
- package/dist/messagebox-Bf-XMlvW.js +0 -69
- package/dist/messagebox-D67w71VX.cjs +0 -13
- package/dist/modal-CyvEkbfQ.cjs +0 -36
- package/dist/progressbar-DsJ2B9Vm.cjs +0 -21
- package/dist/radiobutton-Bv-BZ1Hw.cjs +0 -31
- package/dist/select-CXZt1nHS.js +0 -228
- package/dist/select-WFhS4Vfp.cjs +0 -49
- package/dist/tabitem-CB8wkKmv.js +0 -332
- package/dist/tabitem-DZpspU4Q.cjs +0 -65
- package/dist/tag-X6xdjR0N.cjs +0 -27
- package/dist/textarea-DoeHJ7HR.cjs +0 -50
- package/dist/textinput-BNsLd26i.cjs +0 -70
package/dist/pkt-breadcrumbs.js
CHANGED
|
@@ -1,79 +1,81 @@
|
|
|
1
|
-
import { P as k, A as l, b as c, n as
|
|
2
|
-
import "./icon-
|
|
3
|
-
var
|
|
4
|
-
for (var
|
|
5
|
-
(i =
|
|
6
|
-
return
|
|
1
|
+
import { t as p, P as k, A as l, b as c, n as d } from "./element-CPpT3rFQ.js";
|
|
2
|
+
import "./icon-CxQcIa5F.js";
|
|
3
|
+
var u = Object.defineProperty, m = (s, r, e, a) => {
|
|
4
|
+
for (var t = void 0, n = s.length - 1, i; n >= 0; n--)
|
|
5
|
+
(i = s[n]) && (t = i(r, e, t) || t);
|
|
6
|
+
return t && u(r, e, t), t;
|
|
7
7
|
};
|
|
8
|
-
|
|
8
|
+
class b extends k {
|
|
9
9
|
constructor() {
|
|
10
10
|
super(...arguments), this.breadcrumbs = [];
|
|
11
11
|
}
|
|
12
|
-
handleLinkClick(
|
|
13
|
-
const
|
|
14
|
-
detail: { item:
|
|
12
|
+
handleLinkClick(r, e, a) {
|
|
13
|
+
const t = new CustomEvent("navigate", {
|
|
14
|
+
detail: { item: e, index: a, originalEvent: r },
|
|
15
15
|
bubbles: !0,
|
|
16
16
|
composed: !0,
|
|
17
17
|
cancelable: !0
|
|
18
18
|
});
|
|
19
|
-
this.dispatchEvent(
|
|
19
|
+
this.dispatchEvent(t) || r.preventDefault();
|
|
20
20
|
}
|
|
21
21
|
render() {
|
|
22
22
|
if (!this.breadcrumbs || this.breadcrumbs.length === 0) return l;
|
|
23
|
-
const
|
|
23
|
+
const r = this.breadcrumbs[this.breadcrumbs.length - 2];
|
|
24
24
|
return c`
|
|
25
25
|
<nav class="pkt-breadcrumbs" aria-label="brødsmulemeny">
|
|
26
26
|
<ol class="pkt-breadcrumbs__list pkt-breadcrumbs--desktop">
|
|
27
27
|
${this.breadcrumbs.map(
|
|
28
|
-
(
|
|
28
|
+
(e, a) => a === this.breadcrumbs.length - 1 ? c`
|
|
29
29
|
<li class="pkt-breadcrumbs__item">
|
|
30
30
|
<span class="pkt-breadcrumbs__label" aria-current="true">
|
|
31
|
-
<span class="pkt-breadcrumbs__text">${
|
|
31
|
+
<span class="pkt-breadcrumbs__text">${e.text}</span>
|
|
32
32
|
</span>
|
|
33
33
|
</li>
|
|
34
34
|
` : c`
|
|
35
35
|
<li class="pkt-breadcrumbs__item">
|
|
36
36
|
<a
|
|
37
37
|
class="pkt-link pkt-link--icon-right pkt-breadcrumbs__label pkt-breadcrumbs__link"
|
|
38
|
-
href=${
|
|
39
|
-
@click=${(
|
|
38
|
+
href=${e.href}
|
|
39
|
+
@click=${(t) => this.handleLinkClick(t, e, a)}
|
|
40
40
|
>
|
|
41
41
|
<pkt-icon
|
|
42
42
|
class="pkt-icon pkt-breadcrumbs__icon pkt-link__icon"
|
|
43
43
|
name="chevron-thin-right"
|
|
44
44
|
aria-hidden="true"
|
|
45
45
|
></pkt-icon>
|
|
46
|
-
<span class="pkt-breadcrumbs__text">${
|
|
46
|
+
<span class="pkt-breadcrumbs__text">${e.text}</span>
|
|
47
47
|
</a>
|
|
48
48
|
</li>
|
|
49
49
|
`
|
|
50
50
|
)}
|
|
51
51
|
</ol>
|
|
52
52
|
|
|
53
|
-
${
|
|
53
|
+
${r ? c`
|
|
54
54
|
<a
|
|
55
55
|
class="pkt-link pkt-link--icon-left pkt-breadcrumbs--mobile"
|
|
56
|
-
href=${
|
|
57
|
-
@click=${(
|
|
56
|
+
href=${r.href}
|
|
57
|
+
@click=${(e) => this.handleLinkClick(e, r, this.breadcrumbs.length - 2)}
|
|
58
58
|
>
|
|
59
59
|
<pkt-icon
|
|
60
60
|
class="pkt-back-link__icon pkt-icon pkt-link__icon"
|
|
61
61
|
name="chevron-thin-left"
|
|
62
62
|
aria-hidden="true"
|
|
63
63
|
></pkt-icon>
|
|
64
|
-
<span class="pkt-breadcrumbs__text">${
|
|
64
|
+
<span class="pkt-breadcrumbs__text">${r.text}</span>
|
|
65
65
|
</a>
|
|
66
66
|
` : l}
|
|
67
67
|
</nav>
|
|
68
68
|
`;
|
|
69
69
|
}
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
], b.prototype, "breadcrumbs"
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
70
|
+
}
|
|
71
|
+
m([
|
|
72
|
+
d({ type: Array })
|
|
73
|
+
], b.prototype, "breadcrumbs");
|
|
74
|
+
try {
|
|
75
|
+
p("pkt-breadcrumbs")(b);
|
|
76
|
+
} catch {
|
|
77
|
+
console.warn("Forsøker å definere <pkt-breadcrumbs>, men den er allerede definert");
|
|
78
|
+
}
|
|
77
79
|
export {
|
|
78
80
|
b as PktBreadcrumbs
|
|
79
81
|
};
|
package/dist/pkt-button.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("./button-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("./button-B_TXwNzt.cjs");exports.PktButton=t.PktButton;exports.default=t.PktButton;
|
package/dist/pkt-button.js
CHANGED
package/dist/pkt-calendar.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./calendar-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./calendar-B2pji2zn.cjs");exports.PktCalendar=e.PktCalendar;exports.default=e.PktCalendar;
|
package/dist/pkt-calendar.js
CHANGED
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-BwMNB5Bb.cjs");exports.PktCard=e.PktCard;exports.default=e.PktCard;
|
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-CTY8f_qn.cjs");exports.PktCheckbox=e.PktCheckbox;exports.default=e.PktCheckbox;
|
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
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("./combobox-DbICIgKG.cjs");exports.PktCombobox=o.PktCombobox;exports.default=o.PktCombobox;
|
package/dist/pkt-combobox.js
CHANGED
package/dist/pkt-consent.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./consent-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./consent-DkOQpbsg.cjs");exports.PktConsent=e.PktConsent;exports.default=e.PktConsent;
|
package/dist/pkt-consent.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-BEWl9iz3.cjs");exports.PktDatepicker=e.PktDatepicker;exports.PktDatepickerMultiple=e.PktDatepickerMultiple;exports.PktDatepickerRange=e.PktDatepickerRange;exports.PktDatepickerSingle=e.PktDatepickerSingle;exports.default=e.PktDatepicker;
|
package/dist/pkt-datepicker.js
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
import { b as
|
|
3
|
-
const a = e;
|
|
1
|
+
import { a as t } from "./datepicker-euHyzXnb.js";
|
|
2
|
+
import { b as k, c as p, d as i } from "./datepicker-euHyzXnb.js";
|
|
4
3
|
export {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
4
|
+
t as PktDatepicker,
|
|
5
|
+
k as PktDatepickerMultiple,
|
|
6
|
+
p as PktDatepickerRange,
|
|
7
|
+
i as PktDatepickerSingle,
|
|
8
|
+
t as default
|
|
10
9
|
};
|
package/dist/pkt-header.cjs
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("./element-with-slot-ZX-up7jO.cjs"),t=require("./element-gR_VtSiD.cjs"),f=require("./if-defined-BOW3ODSj.cjs"),p=require("./booleanish-BKVonob4.cjs"),g=require("./state-Dg-53wQ8.cjs"),b=require("./class-map-CsENJXf1.cjs"),u=require("./ref-CL-Xk9Xm.cjs");require("./button-B_TXwNzt.cjs");require("./icon-q81vqPK_.cjs");require("./link-C0rl-86s.cjs");require("./textinput-em9y4yrL.cjs");const $=r=>typeof r.target=="string"?{title:r.title,iconName:r.iconName,href:r.target}:{title:r.title,iconName:r.iconName,onClick:r.target},M=r=>$(r),y=r=>{if(!r)return;const e=typeof r=="string"?new Date(r):r;if(!isNaN(e.getTime()))return e.toLocaleDateString("nb-NO",{day:"numeric",month:"long",year:"numeric",hour:"2-digit",minute:"2-digit"})};var _=Object.defineProperty,v=(r,e,n,s)=>{for(var o=void 0,c=r.length-1,d;c>=0;c--)(d=r[c])&&(o=d(e,n,o)||o);return o&&_(e,n,o),o};class k extends t.PktElement{constructor(){super(...arguments),this.canChangeRepresentation=!1,this.logoutOnClick=!1}handleChangeRepresentation(){this.dispatchEvent(new CustomEvent("change-representation",{bubbles:!0,composed:!0}))}handleLogout(){this.dispatchEvent(new CustomEvent("log-out",{bubbles:!0,composed:!0}))}handleMenuItemClick(e){"onClick"in e&&typeof e.onClick=="function"&&e.onClick()}renderLinkOrButton(e,n){const s="href"in e,o=b.e({"pkt-user-menu__link":!0,"pkt-link-button":!s,"pkt-link":!s,"pkt-link--icon-left":!s,[n||""]:!!n});return s?t.b`
|
|
2
2
|
<pkt-link
|
|
3
3
|
icon-name=${e.iconName||t.A}
|
|
4
4
|
href=${e.href}
|
|
5
5
|
aria-hidden="true"
|
|
6
|
-
class="pkt-user-menu__link ${
|
|
6
|
+
class="pkt-user-menu__link ${n||""}"
|
|
7
7
|
>
|
|
8
8
|
${e.title}
|
|
9
9
|
</pkt-link>
|
|
10
10
|
`:t.b`
|
|
11
|
-
<button class=${
|
|
11
|
+
<button class=${o} type="button" @click=${()=>this.handleMenuItemClick(e)}>
|
|
12
12
|
${e.iconName?t.b`<pkt-icon
|
|
13
13
|
name=${e.iconName}
|
|
14
14
|
class="pkt-link__icon"
|
|
@@ -18,11 +18,11 @@
|
|
|
18
18
|
</button>
|
|
19
19
|
`}renderLinkSection(e){return t.b`
|
|
20
20
|
<ul class="pkt-user-menu__sublist">
|
|
21
|
-
${e.map(
|
|
22
|
-
<li class="pkt-user-menu__subitem">${this.renderLinkOrButton(
|
|
21
|
+
${e.map(n=>t.b`
|
|
22
|
+
<li class="pkt-user-menu__subitem">${this.renderLinkOrButton(n)}</li>
|
|
23
23
|
`)}
|
|
24
24
|
</ul>
|
|
25
|
-
`}render(){var
|
|
25
|
+
`}render(){var n;const e=(n=this.userMenu)==null?void 0:n.map(M);return t.b`
|
|
26
26
|
<nav class="pkt-user-menu" aria-label="Meny for innlogget bruker">
|
|
27
27
|
<ul class="pkt-user-menu__list">
|
|
28
28
|
<!-- User section -->
|
|
@@ -80,8 +80,8 @@
|
|
|
80
80
|
`:t.A}
|
|
81
81
|
</ul>
|
|
82
82
|
</nav>
|
|
83
|
-
`}}
|
|
84
|
-
<pkt-icon name="oslologo" aria-hidden="true" path=${
|
|
83
|
+
`}}v([t.n({type:Object})],k.prototype,"user");v([t.n({type:String,attribute:"formatted-last-logged-in"})],k.prototype,"formattedLastLoggedIn");v([t.n({type:Object})],k.prototype,"representing");v([t.n({type:Array,attribute:"user-menu"})],k.prototype,"userMenu");v([t.n({type:Boolean,attribute:"can-change-representation",converter:p.booleanishConverter})],k.prototype,"canChangeRepresentation");v([t.n({type:Boolean,attribute:"logout-on-click",converter:p.booleanishConverter})],k.prototype,"logoutOnClick");try{t.t("pkt-header-user-menu")(k)}catch{console.warn("Forsøker å definere <pkt-header-user-menu>, men den er allerede definert")}var S=Object.defineProperty,a=(r,e,n,s)=>{for(var o=void 0,c=r.length-1,d;c>=0;c--)(d=r[c])&&(o=d(e,n,o)||o);return o&&S(e,n,o),o};const C="https://punkt-cdn.oslo.kommune.no/latest/logos/";class i extends m.PktElementWithSlot{constructor(){super(...arguments),this.searchPlaceholder="Søk",this.searchValue="",this.mobileBreakpoint=768,this.tabletBreakpoint=1280,this.openedMenu="none",this.logOutButtonPlacement="none",this.position="fixed",this.scrollBehavior="hide",this.slotMenuVariant="icon-only",this.slotMenuText="Meny",this.hideLogo=!1,this.compact=!1,this.showSearch=!1,this.canChangeRepresentation=!1,this.hasLogOut=!1,this.isMobile=!1,this.isTablet=!1,this.openMenu="none",this.isHidden=!1,this.componentWidth=typeof window<"u"?window.innerWidth:0,this.alignSlotRight=!1,this.alignSearchRight=!1,this.headerRef=u.e(),this.userContainerRef=u.e(),this.slotContainerRef=u.e(),this.searchContainerRef=u.e(),this.slotContentRef=u.e(),this.searchMenuRef=u.e(),this.lastScrollPosition=0,this.savedScrollY=0,this.lastFocusedElement=null,this.shouldRestoreFocus=!1,this.handleScroll=()=>{if(!this.shouldHideOnScroll)return;const e=window.pageYOffset||document.documentElement.scrollTop;e<0||Math.abs(e-this.lastScrollPosition)<60||(this.isHidden=e>this.lastScrollPosition,this.lastScrollPosition=e)},this.handleClickOutside=e=>{const n=e.target;this.user&&this.openMenu==="user"&&!n.closest(".pkt-header-service__user-container")&&(this.openMenu="none"),this.openMenu==="slot"&&!n.closest(".pkt-header-service__slot-container")&&(this.openMenu="none"),this.openMenu==="search"&&!n.closest(".pkt-header-service__search-container")&&!n.closest(".pkt-header-service__search-input")&&(this.openMenu="none")},this.handleFocusOut=(e,n)=>{const s=e.relatedTarget;let o;switch(n){case"user":o=this.userContainerRef;break;case"slot":o=this.slotContainerRef;break;case"search":o=this.searchContainerRef;break;default:return}const c=o.value;c&&(!s||!c.contains(s))&&(this.openMenu="none")},this.handleEscapeKey=e=>{e.key==="Escape"&&this.openMenu!=="none"&&(e.preventDefault(),this.shouldRestoreFocus=!0,this.openMenu="none")}}connectedCallback(){super.connectedCallback(),this.setupScrollListener()}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this.resizeObserver)==null||e.disconnect(),window.removeEventListener("scroll",this.handleScroll),this.unlockScroll()}firstUpdated(){this.setupResizeObserver()}updated(e){if(super.updated(e),e.has("openedMenu")&&this.openedMenu!==this.openMenu&&(this.openMenu=this.openedMenu),(e.has("mobileBreakpoint")||e.has("tabletBreakpoint"))&&(this.updateIsMobile(),this.updateIsTablet()),e.has("openMenu")){const n=e.get("openMenu");this.openMenu!=="none"&&(n==="none"||n===void 0)?(document.addEventListener("mousedown",this.handleClickOutside),document.addEventListener("keydown",this.handleEscapeKey),(this.openMenu==="slot"||this.openMenu==="search")&&requestAnimationFrame(()=>{this.checkDropdownAlignment(this.openMenu)})):this.openMenu==="none"&&n!=="none"&&(document.removeEventListener("mousedown",this.handleClickOutside),document.removeEventListener("keydown",this.handleEscapeKey),this.restoreFocus())}(e.has("openMenu")||e.has("isMobile"))&&this.updateScrollLock()}setupResizeObserver(){const e=this.headerRef.value;e&&(this.componentWidth=e.offsetWidth,this.updateIsMobile(),this.updateIsTablet(),this.resizeObserver=new ResizeObserver(n=>{for(const s of n)s.borderBoxSize&&s.borderBoxSize.length>0?this.componentWidth=s.borderBoxSize[0].inlineSize:this.componentWidth=s.contentRect.width,this.updateIsMobile(),this.updateIsTablet()}),this.resizeObserver.observe(e))}updateIsMobile(){this.isMobile=this.componentWidth<this.mobileBreakpoint}updateIsTablet(){this.isTablet=this.componentWidth<this.tabletBreakpoint}updateScrollLock(){this.position==="fixed"&&this.isMobile&&this.openMenu!=="none"?this.lockScroll():this.unlockScroll()}lockScroll(){const e=document.body,n=document.documentElement;this.savedScrollY=window.scrollY||window.pageYOffset;const s=window.innerWidth-n.clientWidth;s>0&&(e.style.paddingRight=`${s}px`),e.style.position="fixed",e.style.top=`-${this.savedScrollY}px`,e.style.left="0",e.style.right="0",e.style.width="100%",e.style.overflow="hidden",n.classList.add("is-scroll-locked")}unlockScroll(){const e=document.body,n=document.documentElement;n.classList.contains("is-scroll-locked")&&(e.style.removeProperty("position"),e.style.removeProperty("top"),e.style.removeProperty("left"),e.style.removeProperty("right"),e.style.removeProperty("width"),e.style.removeProperty("overflow"),e.style.removeProperty("padding-right"),n.classList.remove("is-scroll-locked"),window.scrollTo({top:this.savedScrollY}))}setupScrollListener(){window.addEventListener("scroll",this.handleScroll)}restoreFocus(){this.shouldRestoreFocus&&this.lastFocusedElement&&document.contains(this.lastFocusedElement)&&this.lastFocusedElement.focus(),this.lastFocusedElement=null,this.shouldRestoreFocus=!1}checkDropdownAlignment(e){const n=e==="slot"?this.slotContainerRef:this.searchContainerRef,s=e==="slot"?this.slotContentRef:this.searchMenuRef;if(!n.value||!s.value||!this.isTablet||this.isMobile)return;const o=n.value.getBoundingClientRect(),c=s.value.offsetWidth,d=o.left+c>window.innerWidth;e==="slot"?this.alignSlotRight=d:this.alignSearchRight=d}handleMenuToggle(e){this.openMenu!=="none"?this.openMenu="none":(this.lastFocusedElement=document.activeElement,this.openMenu=e)}handleLogoClick(e){this.dispatchEvent(new CustomEvent("logo-click",{bubbles:!0,composed:!0,detail:{originalEvent:e}}))}handleServiceClick(e){this.dispatchEvent(new CustomEvent("service-click",{bubbles:!0,composed:!0,detail:{originalEvent:e}}))}handleLogout(){this.dispatchEvent(new CustomEvent("log-out",{bubbles:!0,composed:!0}))}handleSearch(e){this.dispatchEvent(new CustomEvent("search",{detail:{query:e},bubbles:!0,composed:!0}))}handleSearchChange(e){this.dispatchEvent(new CustomEvent("search-change",{detail:{query:e},bubbles:!0,composed:!0}))}handleSearchInputChange(e){const n=e.target.value;this.handleSearchChange(n)}handleSearchKeyDown(e){e.key==="Enter"&&this.handleSearch(e.target.value)}get formattedLastLoggedIn(){var e;return y((e=this.user)==null?void 0:e.lastLoggedIn)}get isFixed(){return this.position==="fixed"}get shouldHideOnScroll(){return this.scrollBehavior==="hide"}get showLogoutInHeader(){return this.hasLogOut&&(this.logOutButtonPlacement==="header"||this.logOutButtonPlacement==="both")}get showLogoutInUserMenu(){return this.hasLogOut&&(this.logOutButtonPlacement==="userMenu"||this.logOutButtonPlacement==="both")}renderLogo(){if(this.hideLogo)return t.A;const e=t.b`
|
|
84
|
+
<pkt-icon name="oslologo" aria-hidden="true" path=${C}></pkt-icon>
|
|
85
85
|
`;return this.logoLink&&typeof this.logoLink=="string"?t.b`
|
|
86
86
|
<span class="pkt-header-service__logo">
|
|
87
87
|
<a href=${this.logoLink} aria-label="Tilbake til forside" @click=${this.handleLogoClick}>
|
|
@@ -123,11 +123,11 @@
|
|
|
123
123
|
<span class="pkt-header-service__service-name" @click=${this.handleServiceClick}>
|
|
124
124
|
<span class="pkt-header-service__service-link">${this.serviceName}</span>
|
|
125
125
|
</span>
|
|
126
|
-
`:t.A}renderSlotContainer(){if(!this.hasSlotContent())return t.A;const e=
|
|
126
|
+
`:t.A}renderSlotContainer(){if(!this.hasSlotContent())return t.A;const e=b.e({"pkt-header-service__slot-container":!0,"is-open":this.openMenu==="slot"}),n=b.e({"pkt-header-service__slot-content":!0,"align-right":this.alignSlotRight});return t.b`
|
|
127
127
|
<div
|
|
128
128
|
class=${e}
|
|
129
|
-
@focusout=${
|
|
130
|
-
${
|
|
129
|
+
@focusout=${s=>this.handleFocusOut(s,"slot")}
|
|
130
|
+
${u.n(this.slotContainerRef)}
|
|
131
131
|
>
|
|
132
132
|
${this.isTablet&&this.hasSlotContent()?t.b`
|
|
133
133
|
<pkt-button
|
|
@@ -145,20 +145,20 @@
|
|
|
145
145
|
</pkt-button>
|
|
146
146
|
`:t.A}
|
|
147
147
|
<div
|
|
148
|
-
class=${
|
|
148
|
+
class=${n}
|
|
149
149
|
id="mobile-slot-menu"
|
|
150
150
|
role=${this.isTablet?"menu":t.A}
|
|
151
151
|
aria-label=${this.isTablet?"Meny":t.A}
|
|
152
|
-
${
|
|
152
|
+
${u.n(this.slotContentRef)}
|
|
153
153
|
>
|
|
154
|
-
${
|
|
154
|
+
${m.slotContent(this)}
|
|
155
155
|
</div>
|
|
156
156
|
</div>
|
|
157
|
-
`}renderSearch(){if(!this.showSearch)return t.A;if(this.isTablet){const e=
|
|
157
|
+
`}renderSearch(){if(!this.showSearch)return t.A;if(this.isTablet){const e=b.e({"pkt-header-service__search-container":!0,"is-open":this.openMenu==="search"}),n=b.e({"pkt-header-service__mobile-menu":!0,"is-open":this.openMenu==="search","align-right":this.alignSearchRight});return t.b`
|
|
158
158
|
<div
|
|
159
159
|
class=${e}
|
|
160
|
-
@focusout=${
|
|
161
|
-
${
|
|
160
|
+
@focusout=${s=>this.handleFocusOut(s,"search")}
|
|
161
|
+
${u.n(this.searchContainerRef)}
|
|
162
162
|
>
|
|
163
163
|
<pkt-button
|
|
164
164
|
skin="secondary"
|
|
@@ -173,7 +173,7 @@
|
|
|
173
173
|
>
|
|
174
174
|
Søk
|
|
175
175
|
</pkt-button>
|
|
176
|
-
<div class=${
|
|
176
|
+
<div class=${n} ${u.n(this.searchMenuRef)}>
|
|
177
177
|
${this.openMenu==="search"?t.b`
|
|
178
178
|
<pkt-textinput
|
|
179
179
|
id="mobile-search-menu"
|
|
@@ -186,7 +186,7 @@
|
|
|
186
186
|
autofocus
|
|
187
187
|
fullwidth
|
|
188
188
|
@input=${this.handleSearchInputChange}
|
|
189
|
-
@keydown=${
|
|
189
|
+
@keydown=${s=>{s.key==="Enter"&&this.handleSearch(s.target.value)}}
|
|
190
190
|
></pkt-textinput>
|
|
191
191
|
`:t.A}
|
|
192
192
|
</div>
|
|
@@ -203,14 +203,14 @@
|
|
|
203
203
|
@input=${this.handleSearchInputChange}
|
|
204
204
|
@keydown=${this.handleSearchKeyDown}
|
|
205
205
|
></pkt-textinput>
|
|
206
|
-
`}renderUserButton(){var
|
|
206
|
+
`}renderUserButton(){var n;if(!this.user)return t.A;const e=b.e({"pkt-header-service__user-menu":this.isMobile===!1,"pkt-header-service__mobile-menu":this.isMobile===!0,"is-open":this.openMenu==="user"});return t.b`
|
|
207
207
|
<div
|
|
208
208
|
class="pkt-header-service__user-container"
|
|
209
|
-
@focusout=${
|
|
210
|
-
${
|
|
209
|
+
@focusout=${s=>this.handleFocusOut(s,"user")}
|
|
210
|
+
${u.n(this.userContainerRef)}
|
|
211
211
|
>
|
|
212
212
|
<pkt-button
|
|
213
|
-
class=${
|
|
213
|
+
class=${b.e({"pkt-header-service__user-button":!0,"pkt-header-service__user-button--mobile":this.isMobile})}
|
|
214
214
|
skin="secondary"
|
|
215
215
|
size=${this.isMobile?"small":"medium"}
|
|
216
216
|
state=${this.openMenu==="user"?"active":"normal"}
|
|
@@ -220,7 +220,7 @@
|
|
|
220
220
|
@click=${()=>this.handleMenuToggle("user")}
|
|
221
221
|
>
|
|
222
222
|
<span class="pkt-sr-only">Brukermeny: </span>
|
|
223
|
-
<span>${((
|
|
223
|
+
<span>${((n=this.representing)==null?void 0:n.name)||this.user.name}</span>
|
|
224
224
|
</pkt-button>
|
|
225
225
|
${this.openMenu==="user"&&this.user?t.b`
|
|
226
226
|
<div class=${e}>
|
|
@@ -237,9 +237,9 @@
|
|
|
237
237
|
</div>
|
|
238
238
|
`:t.A}
|
|
239
239
|
</div>
|
|
240
|
-
`}renderHeader(){const e=
|
|
241
|
-
<header class=${e} ${
|
|
242
|
-
<div class=${
|
|
240
|
+
`}renderHeader(){const e=b.e({"pkt-header-service":!0,"pkt-header-service--compact":this.compact,"pkt-header-service--mobile":this.isMobile,"pkt-header-service--tablet":this.isTablet,"pkt-header-service--fixed":this.isFixed,"pkt-header-service--scroll-to-hide":this.shouldHideOnScroll,"pkt-header-service--hidden":this.isHidden}),n=b.e({"pkt-header-service__logo-area":!0,"pkt-header-service__logo-area--without-service":!this.serviceName});return t.b`
|
|
241
|
+
<header class=${e} ${u.n(this.headerRef)}>
|
|
242
|
+
<div class=${n}>${this.renderLogo()} ${this.renderServiceName()}</div>
|
|
243
243
|
|
|
244
244
|
${this.hasSlotContent()||this.showSearch||this.showLogoutInHeader?t.b`<div class="pkt-header-service__content">
|
|
245
245
|
${this.renderSlotContainer()} ${this.renderSearch()}
|
|
@@ -270,16 +270,16 @@
|
|
|
270
270
|
`:t.A}
|
|
271
271
|
</div>`:t.A}
|
|
272
272
|
</header>
|
|
273
|
-
`}render(){const e=this.renderHeader();if(this.isFixed){const
|
|
273
|
+
`}render(){const e=this.renderHeader();if(this.isFixed){const n=b.e({"pkt-header-service-spacer":!0,"pkt-header-service-spacer--compact":this.compact,"pkt-header-service-spacer--has-user":!!this.user,"pkt-header-service-spacer--mobile":this.isMobile});return t.b`
|
|
274
274
|
<div class="pkt-header-service-wrapper">
|
|
275
275
|
${e}
|
|
276
|
-
<div class=${
|
|
276
|
+
<div class=${n}></div>
|
|
277
277
|
</div>
|
|
278
|
-
`}return e}}
|
|
278
|
+
`}return e}}a([t.n({type:String,attribute:"service-name"})],i.prototype,"serviceName");a([t.n({type:String,attribute:"service-link"})],i.prototype,"serviceLink");a([t.n({type:String,attribute:"logo-link"})],i.prototype,"logoLink");a([t.n({type:String,attribute:"search-placeholder"})],i.prototype,"searchPlaceholder");a([t.n({type:String,attribute:"search-value"})],i.prototype,"searchValue");a([t.n({type:Number,attribute:"mobile-breakpoint"})],i.prototype,"mobileBreakpoint");a([t.n({type:Number,attribute:"tablet-breakpoint"})],i.prototype,"tabletBreakpoint");a([t.n({type:String,attribute:"opened-menu"})],i.prototype,"openedMenu");a([t.n({type:String,attribute:"log-out-button-placement"})],i.prototype,"logOutButtonPlacement");a([t.n({type:String})],i.prototype,"position");a([t.n({type:String,attribute:"scroll-behavior"})],i.prototype,"scrollBehavior");a([t.n({type:String,attribute:"slot-menu-variant"})],i.prototype,"slotMenuVariant");a([t.n({type:String,attribute:"slot-menu-text"})],i.prototype,"slotMenuText");a([t.n({type:Boolean,attribute:"hide-logo",converter:p.booleanishConverter})],i.prototype,"hideLogo");a([t.n({type:Boolean,converter:p.booleanishConverter})],i.prototype,"compact");a([t.n({type:Boolean,attribute:"show-search",converter:p.booleanishConverter})],i.prototype,"showSearch");a([t.n({type:Boolean,attribute:"can-change-representation",converter:p.booleanishConverter})],i.prototype,"canChangeRepresentation");a([t.n({type:Boolean,attribute:"has-log-out",converter:p.booleanishConverter})],i.prototype,"hasLogOut");a([t.n({type:Object})],i.prototype,"user");a([t.n({type:Array,attribute:"user-menu"})],i.prototype,"userMenu");a([t.n({type:Object})],i.prototype,"representing");a([g.r()],i.prototype,"isMobile");a([g.r()],i.prototype,"isTablet");a([g.r()],i.prototype,"openMenu");a([g.r()],i.prototype,"isHidden");a([g.r()],i.prototype,"componentWidth");a([g.r()],i.prototype,"alignSlotRight");a([g.r()],i.prototype,"alignSearchRight");try{t.t("pkt-header-service")(i)}catch{console.warn("Forsøker å definere <pkt-header-service>, men den er allerede definert")}var L=Object.defineProperty,h=(r,e,n,s)=>{for(var o=void 0,c=r.length-1,d;c>=0;c--)(d=r[c])&&(o=d(e,n,o)||o);return o&&L(e,n,o),o};class l extends m.PktElementWithSlot{constructor(){super(...arguments),this.searchPlaceholder="Søk",this.searchValue="",this.mobileBreakpoint=768,this.tabletBreakpoint=1280,this.openedMenu="none",this.logOutButtonPlacement="none",this.position="fixed",this.scrollBehavior="hide",this.slotMenuVariant="icon-only",this.slotMenuText="Meny",this.hideLogo=!1,this.compact=!1,this.showSearch=!1,this.canChangeRepresentation=!1,this.hasLogOut=!1}firstUpdated(e){super.firstUpdated(e),this.emitDeprecationWarnings()}emitDeprecationWarnings(){this.userMenuFooter!==void 0&&console.warn("[PktHeader] userMenuFooter is deprecated. Use userMenu instead."),this.userOptions!==void 0&&console.warn("[PktHeader] userOptions is deprecated. Use userMenu instead.")}get effectiveUserMenu(){const e=this.userMenu||[],n=this.userMenuFooter||[],s=this.userOptions||[];return n.length||s.length?[...e,...s,...n]:this.userMenu}render(){return t.b`
|
|
279
279
|
<pkt-header-service
|
|
280
|
-
service-name=${
|
|
281
|
-
service-link=${
|
|
282
|
-
logo-link=${
|
|
280
|
+
service-name=${f.o(this.serviceName)}
|
|
281
|
+
service-link=${f.o(this.serviceLink)}
|
|
282
|
+
logo-link=${f.o(this.logoLink)}
|
|
283
283
|
search-placeholder=${this.searchPlaceholder}
|
|
284
284
|
search-value=${this.searchValue}
|
|
285
285
|
mobile-breakpoint=${this.mobileBreakpoint}
|
|
@@ -299,6 +299,6 @@
|
|
|
299
299
|
.userMenu=${this.effectiveUserMenu}
|
|
300
300
|
.representing=${this.representing}
|
|
301
301
|
>
|
|
302
|
-
${this.hasSlotContent()?t.b`<div class="pkt-contents">${
|
|
302
|
+
${this.hasSlotContent()?t.b`<div class="pkt-contents">${m.slotContent(this)}</div>`:t.A}
|
|
303
303
|
</pkt-header-service>
|
|
304
|
-
`}}
|
|
304
|
+
`}}h([t.n({type:String,attribute:"service-name"})],l.prototype,"serviceName");h([t.n({type:String,attribute:"service-link"})],l.prototype,"serviceLink");h([t.n({type:String,attribute:"logo-link"})],l.prototype,"logoLink");h([t.n({type:String,attribute:"search-placeholder"})],l.prototype,"searchPlaceholder");h([t.n({type:String,attribute:"search-value"})],l.prototype,"searchValue");h([t.n({type:Number,attribute:"mobile-breakpoint"})],l.prototype,"mobileBreakpoint");h([t.n({type:Number,attribute:"tablet-breakpoint"})],l.prototype,"tabletBreakpoint");h([t.n({type:String,attribute:"opened-menu"})],l.prototype,"openedMenu");h([t.n({type:String,attribute:"log-out-button-placement"})],l.prototype,"logOutButtonPlacement");h([t.n({type:String})],l.prototype,"position");h([t.n({type:String,attribute:"scroll-behavior"})],l.prototype,"scrollBehavior");h([t.n({type:String,attribute:"slot-menu-variant"})],l.prototype,"slotMenuVariant");h([t.n({type:String,attribute:"slot-menu-text"})],l.prototype,"slotMenuText");h([t.n({type:Boolean,attribute:"hide-logo",converter:p.booleanishConverter})],l.prototype,"hideLogo");h([t.n({type:Boolean,converter:p.booleanishConverter})],l.prototype,"compact");h([t.n({type:Boolean,attribute:"show-search",converter:p.booleanishConverter})],l.prototype,"showSearch");h([t.n({type:Boolean,attribute:"can-change-representation",converter:p.booleanishConverter})],l.prototype,"canChangeRepresentation");h([t.n({type:Boolean,attribute:"has-log-out",converter:p.booleanishConverter})],l.prototype,"hasLogOut");h([t.n({type:Object})],l.prototype,"user");h([t.n({type:Array,attribute:"user-menu"})],l.prototype,"userMenu");h([t.n({type:Object})],l.prototype,"representing");h([t.n({type:Array,attribute:"user-menu-footer"})],l.prototype,"userMenuFooter");h([t.n({type:Array,attribute:"user-options"})],l.prototype,"userOptions");try{t.t("pkt-header")(l)}catch{console.warn("Forsøker å definere <pkt-header>, men den er allerede definert")}exports.PktHeader=l;exports.PktHeaderService=i;exports.PktHeaderUserMenu=k;exports.formatLastLoggedIn=y;
|