@oslokommune/punkt-react 16.18.0 → 16.19.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 +18 -0
- package/dist/{dialog-polyfill.esm-B7W3teD0-CHMBcS-s.js → dialog-polyfill.esm-0dVT8G1o-Cf1Ux-Z9.js} +1 -1
- package/dist/index.d.ts +17 -5
- package/dist/punkt-react.es.js +293 -268
- package/dist/punkt-react.umd.js +24 -24
- package/package.json +3 -3
- package/src/components/heading/Heading.test.tsx +28 -28
- package/src/components/heading/Heading.tsx +65 -17
package/dist/punkt-react.es.js
CHANGED
|
@@ -93,7 +93,7 @@ var j = /* @__PURE__ */ k((/* @__PURE__ */ D(((e, t) => {
|
|
|
93
93
|
return n;
|
|
94
94
|
}) : window.classNames = n;
|
|
95
95
|
})();
|
|
96
|
-
})))(), 1), ne = "https://punkt-cdn.oslo.kommune.no/16.
|
|
96
|
+
})))(), 1), ne = "https://punkt-cdn.oslo.kommune.no/16.19/icons/";
|
|
97
97
|
typeof window < "u" && (window.pktFetch = window.pktFetch === void 0 ? fetch : window.pktFetch, window.pktIconPath = window.pktIconPath || ne);
|
|
98
98
|
var re = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 32 32\"></svg>", ie = {}, ae = 2, oe = 1500, se = typeof Storage < "u" && typeof sessionStorage < "u", ce = typeof window < "u" ? p : u, le = (e, t) => !e || !se ? "" : sessionStorage.getItem(t + e + ".svg") ?? "", ue = (e) => window.pktFetch(e).then((t) => {
|
|
99
99
|
if (!t.ok) throw Error("Missing icon: " + e);
|
|
@@ -208,7 +208,7 @@ var P = o(({ defaultOpen: e = !1, id: t, title: n, skin: r, compact: i = !1, isO
|
|
|
208
208
|
});
|
|
209
209
|
//#endregion
|
|
210
210
|
//#region src/components/button/Button.tsx
|
|
211
|
-
P.displayName = "PktAccordionItem", window.pktAnimationPath = window.pktAnimationPath || "https://punkt-cdn.oslo.kommune.no/16.
|
|
211
|
+
P.displayName = "PktAccordionItem", window.pktAnimationPath = window.pktAnimationPath || "https://punkt-cdn.oslo.kommune.no/16.19/animations/";
|
|
212
212
|
var F = o(({ children: e, className: t, iconName: n = "user", secondIconName: r = "user", iconPath: i, secondIconPath: a, size: o = "medium", fullWidth: s = !1, fullWidthOnMobile: c = !1, skin: l = "primary", type: u = "button", variant: d = "label-only", state: f, color: p, isLoading: m = void 0, disabled: h = void 0, loadingAnimationPath: g = window.pktAnimationPath, ..._ }, b) => {
|
|
213
213
|
let x = [
|
|
214
214
|
t,
|
|
@@ -4067,41 +4067,65 @@ var Br = (e, t, n) => {
|
|
|
4067
4067
|
r._$litPart$ = i = new Mr(t.insertBefore(fr(), e), e, void 0, n ?? {});
|
|
4068
4068
|
}
|
|
4069
4069
|
return i._$AI(e), i;
|
|
4070
|
+
}, Vr = {
|
|
4071
|
+
ATTRIBUTE: 1,
|
|
4072
|
+
CHILD: 2,
|
|
4073
|
+
PROPERTY: 3,
|
|
4074
|
+
BOOLEAN_ATTRIBUTE: 4,
|
|
4075
|
+
EVENT: 5,
|
|
4076
|
+
ELEMENT: 6
|
|
4077
|
+
}, Hr = (e) => (...t) => ({
|
|
4078
|
+
_$litDirective$: e,
|
|
4079
|
+
values: t
|
|
4080
|
+
}), Ur = class {
|
|
4081
|
+
constructor(e) {}
|
|
4082
|
+
get _$AU() {
|
|
4083
|
+
return this._$AM._$AU;
|
|
4084
|
+
}
|
|
4085
|
+
_$AT(e, t, n) {
|
|
4086
|
+
this._$Ct = e, this._$AM = t, this._$Ci = n;
|
|
4087
|
+
}
|
|
4088
|
+
_$AS(e, t) {
|
|
4089
|
+
return this.update(e, t);
|
|
4090
|
+
}
|
|
4091
|
+
update(e, t) {
|
|
4092
|
+
return this.render(...t);
|
|
4093
|
+
}
|
|
4070
4094
|
}, q = (e) => (t, n) => {
|
|
4071
4095
|
n === void 0 ? customElements.define(e, t) : n.addInitializer(() => {
|
|
4072
4096
|
customElements.define(e, t);
|
|
4073
4097
|
});
|
|
4074
|
-
},
|
|
4098
|
+
}, Wr = globalThis, Gr = Wr.ShadowRoot && (Wr.ShadyCSS === void 0 || Wr.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, Kr = Symbol(), qr = /* @__PURE__ */ new WeakMap(), Jr = class {
|
|
4075
4099
|
constructor(e, t, n) {
|
|
4076
|
-
if (this._$cssResult$ = !0, n !==
|
|
4100
|
+
if (this._$cssResult$ = !0, n !== Kr) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
4077
4101
|
this.cssText = e, this.t = t;
|
|
4078
4102
|
}
|
|
4079
4103
|
get styleSheet() {
|
|
4080
4104
|
let e = this.o, t = this.t;
|
|
4081
|
-
if (
|
|
4105
|
+
if (Gr && e === void 0) {
|
|
4082
4106
|
let n = t !== void 0 && t.length === 1;
|
|
4083
|
-
n && (e =
|
|
4107
|
+
n && (e = qr.get(t)), e === void 0 && ((this.o = e = new CSSStyleSheet()).replaceSync(this.cssText), n && qr.set(t, e));
|
|
4084
4108
|
}
|
|
4085
4109
|
return e;
|
|
4086
4110
|
}
|
|
4087
4111
|
toString() {
|
|
4088
4112
|
return this.cssText;
|
|
4089
4113
|
}
|
|
4090
|
-
},
|
|
4091
|
-
if (
|
|
4114
|
+
}, Yr = (e) => new Jr(typeof e == "string" ? e : e + "", void 0, Kr), Xr = (e, t) => {
|
|
4115
|
+
if (Gr) e.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet);
|
|
4092
4116
|
else for (let n of t) {
|
|
4093
|
-
let t = document.createElement("style"), r =
|
|
4117
|
+
let t = document.createElement("style"), r = Wr.litNonce;
|
|
4094
4118
|
r !== void 0 && t.setAttribute("nonce", r), t.textContent = n.cssText, e.appendChild(t);
|
|
4095
4119
|
}
|
|
4096
|
-
},
|
|
4120
|
+
}, Zr = Gr ? (e) => e : (e) => e instanceof CSSStyleSheet ? ((e) => {
|
|
4097
4121
|
let t = "";
|
|
4098
4122
|
for (let n of e.cssRules) t += n.cssText;
|
|
4099
|
-
return
|
|
4100
|
-
})(e) : e, { is:
|
|
4123
|
+
return Yr(t);
|
|
4124
|
+
})(e) : e, { is: Qr, defineProperty: $r, getOwnPropertyDescriptor: ei, getOwnPropertyNames: ti, getOwnPropertySymbols: ni, getPrototypeOf: ri } = Object, ii = globalThis, ai = ii.trustedTypes, oi = ai ? ai.emptyScript : "", si = ii.reactiveElementPolyfillSupport, ci = (e, t) => e, li = {
|
|
4101
4125
|
toAttribute(e, t) {
|
|
4102
4126
|
switch (t) {
|
|
4103
4127
|
case Boolean:
|
|
4104
|
-
e = e ?
|
|
4128
|
+
e = e ? oi : null;
|
|
4105
4129
|
break;
|
|
4106
4130
|
case Object:
|
|
4107
4131
|
case Array: e = e == null ? e : JSON.stringify(e);
|
|
@@ -4126,30 +4150,30 @@ var Br = (e, t, n) => {
|
|
|
4126
4150
|
}
|
|
4127
4151
|
return n;
|
|
4128
4152
|
}
|
|
4129
|
-
},
|
|
4153
|
+
}, ui = (e, t) => !Qr(e, t), di = {
|
|
4130
4154
|
attribute: !0,
|
|
4131
4155
|
type: String,
|
|
4132
|
-
converter:
|
|
4156
|
+
converter: li,
|
|
4133
4157
|
reflect: !1,
|
|
4134
4158
|
useDefault: !1,
|
|
4135
|
-
hasChanged:
|
|
4159
|
+
hasChanged: ui
|
|
4136
4160
|
};
|
|
4137
|
-
Symbol.metadata ??= Symbol("metadata"),
|
|
4138
|
-
var
|
|
4161
|
+
Symbol.metadata ??= Symbol("metadata"), ii.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap();
|
|
4162
|
+
var fi = class extends HTMLElement {
|
|
4139
4163
|
static addInitializer(e) {
|
|
4140
4164
|
this._$Ei(), (this.l ??= []).push(e);
|
|
4141
4165
|
}
|
|
4142
4166
|
static get observedAttributes() {
|
|
4143
4167
|
return this.finalize(), this._$Eh && [...this._$Eh.keys()];
|
|
4144
4168
|
}
|
|
4145
|
-
static createProperty(e, t =
|
|
4169
|
+
static createProperty(e, t = di) {
|
|
4146
4170
|
if (t.state && (t.attribute = !1), this._$Ei(), this.prototype.hasOwnProperty(e) && ((t = Object.create(t)).wrapped = !0), this.elementProperties.set(e, t), !t.noAccessor) {
|
|
4147
4171
|
let n = Symbol(), r = this.getPropertyDescriptor(e, n, t);
|
|
4148
|
-
r !== void 0 &&
|
|
4172
|
+
r !== void 0 && $r(this.prototype, e, r);
|
|
4149
4173
|
}
|
|
4150
4174
|
}
|
|
4151
4175
|
static getPropertyDescriptor(e, t, n) {
|
|
4152
|
-
let { get: r, set: i } =
|
|
4176
|
+
let { get: r, set: i } = ei(this.prototype, e) ?? {
|
|
4153
4177
|
get() {
|
|
4154
4178
|
return this[t];
|
|
4155
4179
|
},
|
|
@@ -4168,17 +4192,17 @@ var li = class extends HTMLElement {
|
|
|
4168
4192
|
};
|
|
4169
4193
|
}
|
|
4170
4194
|
static getPropertyOptions(e) {
|
|
4171
|
-
return this.elementProperties.get(e) ??
|
|
4195
|
+
return this.elementProperties.get(e) ?? di;
|
|
4172
4196
|
}
|
|
4173
4197
|
static _$Ei() {
|
|
4174
|
-
if (this.hasOwnProperty(
|
|
4175
|
-
let e =
|
|
4198
|
+
if (this.hasOwnProperty(ci("elementProperties"))) return;
|
|
4199
|
+
let e = ri(this);
|
|
4176
4200
|
e.finalize(), e.l !== void 0 && (this.l = [...e.l]), this.elementProperties = new Map(e.elementProperties);
|
|
4177
4201
|
}
|
|
4178
4202
|
static finalize() {
|
|
4179
|
-
if (this.hasOwnProperty(
|
|
4180
|
-
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(
|
|
4181
|
-
let e = this.properties, t = [...
|
|
4203
|
+
if (this.hasOwnProperty(ci("finalized"))) return;
|
|
4204
|
+
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(ci("properties"))) {
|
|
4205
|
+
let e = this.properties, t = [...ti(e), ...ni(e)];
|
|
4182
4206
|
for (let n of t) this.createProperty(n, e[n]);
|
|
4183
4207
|
}
|
|
4184
4208
|
let e = this[Symbol.metadata];
|
|
@@ -4197,8 +4221,8 @@ var li = class extends HTMLElement {
|
|
|
4197
4221
|
let t = [];
|
|
4198
4222
|
if (Array.isArray(e)) {
|
|
4199
4223
|
let n = new Set(e.flat(Infinity).reverse());
|
|
4200
|
-
for (let e of n) t.unshift(
|
|
4201
|
-
} else e !== void 0 && t.push(
|
|
4224
|
+
for (let e of n) t.unshift(Zr(e));
|
|
4225
|
+
} else e !== void 0 && t.push(Zr(e));
|
|
4202
4226
|
return t;
|
|
4203
4227
|
}
|
|
4204
4228
|
static _$Eu(e, t) {
|
|
@@ -4224,7 +4248,7 @@ var li = class extends HTMLElement {
|
|
|
4224
4248
|
}
|
|
4225
4249
|
createRenderRoot() {
|
|
4226
4250
|
let e = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
|
|
4227
|
-
return
|
|
4251
|
+
return Xr(e, this.constructor.elementStyles), e;
|
|
4228
4252
|
}
|
|
4229
4253
|
connectedCallback() {
|
|
4230
4254
|
this.renderRoot ??= this.createRenderRoot(), this.enableUpdating(!0), this._$EO?.forEach((e) => e.hostConnected?.());
|
|
@@ -4239,14 +4263,14 @@ var li = class extends HTMLElement {
|
|
|
4239
4263
|
_$ET(e, t) {
|
|
4240
4264
|
let n = this.constructor.elementProperties.get(e), r = this.constructor._$Eu(e, n);
|
|
4241
4265
|
if (r !== void 0 && !0 === n.reflect) {
|
|
4242
|
-
let i = (n.converter?.toAttribute === void 0 ?
|
|
4266
|
+
let i = (n.converter?.toAttribute === void 0 ? li : n.converter).toAttribute(t, n.type);
|
|
4243
4267
|
this._$Em = e, i == null ? this.removeAttribute(r) : this.setAttribute(r, i), this._$Em = null;
|
|
4244
4268
|
}
|
|
4245
4269
|
}
|
|
4246
4270
|
_$AK(e, t) {
|
|
4247
4271
|
let n = this.constructor, r = n._$Eh.get(e);
|
|
4248
4272
|
if (r !== void 0 && this._$Em !== r) {
|
|
4249
|
-
let e = n.getPropertyOptions(r), i = typeof e.converter == "function" ? { fromAttribute: e.converter } : e.converter?.fromAttribute === void 0 ?
|
|
4273
|
+
let e = n.getPropertyOptions(r), i = typeof e.converter == "function" ? { fromAttribute: e.converter } : e.converter?.fromAttribute === void 0 ? li : e.converter;
|
|
4250
4274
|
this._$Em = r;
|
|
4251
4275
|
let a = i.fromAttribute(t, e.type);
|
|
4252
4276
|
this[r] = a ?? this._$Ej?.get(r) ?? a, this._$Em = null;
|
|
@@ -4255,7 +4279,7 @@ var li = class extends HTMLElement {
|
|
|
4255
4279
|
requestUpdate(e, t, n, r = !1, i) {
|
|
4256
4280
|
if (e !== void 0) {
|
|
4257
4281
|
let a = this.constructor;
|
|
4258
|
-
if (!1 === r && (i = this[e]), n ??= a.getPropertyOptions(e), !((n.hasChanged ??
|
|
4282
|
+
if (!1 === r && (i = this[e]), n ??= a.getPropertyOptions(e), !((n.hasChanged ?? ui)(i, t) || n.useDefault && n.reflect && i === this._$Ej?.get(e) && !this.hasAttribute(a._$Eu(e, n)))) return;
|
|
4259
4283
|
this.C(e, t, n);
|
|
4260
4284
|
}
|
|
4261
4285
|
!1 === this.isUpdatePending && (this._$ES = this._$EP());
|
|
@@ -4319,14 +4343,14 @@ var li = class extends HTMLElement {
|
|
|
4319
4343
|
updated(e) {}
|
|
4320
4344
|
firstUpdated(e) {}
|
|
4321
4345
|
};
|
|
4322
|
-
|
|
4323
|
-
var
|
|
4346
|
+
fi.elementStyles = [], fi.shadowRootOptions = { mode: "open" }, fi[ci("elementProperties")] = /* @__PURE__ */ new Map(), fi[ci("finalized")] = /* @__PURE__ */ new Map(), si?.({ ReactiveElement: fi }), (ii.reactiveElementVersions ??= []).push("2.1.2");
|
|
4347
|
+
var pi = {
|
|
4324
4348
|
attribute: !0,
|
|
4325
4349
|
type: String,
|
|
4326
|
-
converter:
|
|
4350
|
+
converter: li,
|
|
4327
4351
|
reflect: !1,
|
|
4328
|
-
hasChanged:
|
|
4329
|
-
},
|
|
4352
|
+
hasChanged: ui
|
|
4353
|
+
}, mi = (e = pi, t, n) => {
|
|
4330
4354
|
let { kind: r, metadata: i } = n, a = globalThis.litPropertyMetadata.get(i);
|
|
4331
4355
|
if (a === void 0 && globalThis.litPropertyMetadata.set(i, a = /* @__PURE__ */ new Map()), r === "setter" && ((e = Object.create(e)).wrapped = !0), a.set(n.name, e), r === "accessor") {
|
|
4332
4356
|
let { name: r } = n;
|
|
@@ -4350,7 +4374,7 @@ var ui = {
|
|
|
4350
4374
|
throw Error("Unsupported decorator location: " + r);
|
|
4351
4375
|
};
|
|
4352
4376
|
function J(e) {
|
|
4353
|
-
return (t, n) => typeof n == "object" ?
|
|
4377
|
+
return (t, n) => typeof n == "object" ? mi(e, t, n) : ((e, t, n) => {
|
|
4354
4378
|
let r = t.hasOwnProperty(n);
|
|
4355
4379
|
return t.constructor.createProperty(n, e), r ? Object.getOwnPropertyDescriptor(t, n) : void 0;
|
|
4356
4380
|
})(e, t, n);
|
|
@@ -4362,7 +4386,7 @@ function Y(e) {
|
|
|
4362
4386
|
attribute: !1
|
|
4363
4387
|
});
|
|
4364
4388
|
}
|
|
4365
|
-
var
|
|
4389
|
+
var hi = globalThis, gi = class extends fi {
|
|
4366
4390
|
constructor() {
|
|
4367
4391
|
super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
|
|
4368
4392
|
}
|
|
@@ -4384,10 +4408,10 @@ var fi = globalThis, pi = class extends li {
|
|
|
4384
4408
|
return wr;
|
|
4385
4409
|
}
|
|
4386
4410
|
};
|
|
4387
|
-
|
|
4388
|
-
var
|
|
4389
|
-
|
|
4390
|
-
var
|
|
4411
|
+
gi._$litElement$ = !0, gi.finalized = !0, hi.litElementHydrateSupport?.({ LitElement: gi });
|
|
4412
|
+
var _i = hi.litElementPolyfillSupport;
|
|
4413
|
+
_i?.({ LitElement: gi }), (hi.litElementVersions ??= []).push("4.2.2");
|
|
4414
|
+
var vi = {
|
|
4391
4415
|
example: { hi: "Hei!" },
|
|
4392
4416
|
generic: {
|
|
4393
4417
|
from: "Fra",
|
|
@@ -4491,46 +4515,22 @@ function X(e, t, n, r) {
|
|
|
4491
4515
|
else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
|
|
4492
4516
|
return i > 3 && a && Object.defineProperty(t, n, a), a;
|
|
4493
4517
|
}
|
|
4494
|
-
var
|
|
4518
|
+
var yi = class extends gi {
|
|
4495
4519
|
constructor(...e) {
|
|
4496
|
-
super(...e), this.strings =
|
|
4520
|
+
super(...e), this.strings = vi, this.role = null;
|
|
4497
4521
|
}
|
|
4498
4522
|
hotReplacedCallback() {
|
|
4499
4523
|
this.requestUpdate();
|
|
4500
4524
|
}
|
|
4501
4525
|
};
|
|
4502
|
-
X([J({ type: Object })],
|
|
4503
|
-
var
|
|
4526
|
+
X([J({ type: Object })], yi.prototype, "strings", void 0), X([J({ type: String })], yi.prototype, "role", void 0);
|
|
4527
|
+
var bi = class extends yi {
|
|
4504
4528
|
createRenderRoot() {
|
|
4505
4529
|
return this;
|
|
4506
4530
|
}
|
|
4507
|
-
},
|
|
4508
|
-
ATTRIBUTE: 1,
|
|
4509
|
-
CHILD: 2,
|
|
4510
|
-
PROPERTY: 3,
|
|
4511
|
-
BOOLEAN_ATTRIBUTE: 4,
|
|
4512
|
-
EVENT: 5,
|
|
4513
|
-
ELEMENT: 6
|
|
4514
|
-
}, yi = (e) => (...t) => ({
|
|
4515
|
-
_$litDirective$: e,
|
|
4516
|
-
values: t
|
|
4517
|
-
}), bi = class {
|
|
4518
|
-
constructor(e) {}
|
|
4519
|
-
get _$AU() {
|
|
4520
|
-
return this._$AM._$AU;
|
|
4521
|
-
}
|
|
4522
|
-
_$AT(e, t, n) {
|
|
4523
|
-
this._$Ct = e, this._$AM = t, this._$Ci = n;
|
|
4524
|
-
}
|
|
4525
|
-
_$AS(e, t) {
|
|
4526
|
-
return this.update(e, t);
|
|
4527
|
-
}
|
|
4528
|
-
update(e, t) {
|
|
4529
|
-
return this.render(...t);
|
|
4530
|
-
}
|
|
4531
|
-
}, Z = yi(class extends bi {
|
|
4531
|
+
}, Z = Hr(class extends Ur {
|
|
4532
4532
|
constructor(e) {
|
|
4533
|
-
if (super(e), e.type !==
|
|
4533
|
+
if (super(e), e.type !== Vr.ATTRIBUTE || e.name !== "class" || e.strings?.length > 2) throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.");
|
|
4534
4534
|
}
|
|
4535
4535
|
render(e) {
|
|
4536
4536
|
return " " + Object.keys(e).filter((t) => e[t]).join(" ") + " ";
|
|
@@ -4598,8 +4598,8 @@ function Fi(e, t = !1, n = 0) {
|
|
|
4598
4598
|
else ji(this, e);
|
|
4599
4599
|
}
|
|
4600
4600
|
var Ii = (e) => {
|
|
4601
|
-
e.type ==
|
|
4602
|
-
}, Li = class extends
|
|
4601
|
+
e.type == Vr.CHILD && (e._$AP ??= Fi, e._$AQ ??= Pi);
|
|
4602
|
+
}, Li = class extends Ur {
|
|
4603
4603
|
constructor() {
|
|
4604
4604
|
super(...arguments), this._$AN = void 0;
|
|
4605
4605
|
}
|
|
@@ -4620,7 +4620,7 @@ var Ii = (e) => {
|
|
|
4620
4620
|
reconnected() {}
|
|
4621
4621
|
};
|
|
4622
4622
|
//#endregion
|
|
4623
|
-
//#region ../elements/dist/element-with-slot-
|
|
4623
|
+
//#region ../elements/dist/element-with-slot-BVj9MXzi.js
|
|
4624
4624
|
function Ri(e) {
|
|
4625
4625
|
return e.classList && (e.classList.contains("_dialog_overlay") || e.classList.contains("backdrop")) ? !0 : typeof e.hasAttribute == "function" && e.hasAttribute("data-skip");
|
|
4626
4626
|
}
|
|
@@ -4741,9 +4741,9 @@ var qi = class e {
|
|
|
4741
4741
|
notifyDirectives() {
|
|
4742
4742
|
for (let e of this.directives) e.handleNodesChanged();
|
|
4743
4743
|
}
|
|
4744
|
-
}, Ji =
|
|
4744
|
+
}, Ji = Hr(class extends Li {
|
|
4745
4745
|
constructor(e) {
|
|
4746
|
-
if (super(e), this.manager = null, this.lastGeneration = -1, e.type !==
|
|
4746
|
+
if (super(e), this.manager = null, this.lastGeneration = -1, e.type !== Vr.CHILD) throw Error("slotContent() can only be used in child expressions");
|
|
4747
4747
|
}
|
|
4748
4748
|
render(e, t) {
|
|
4749
4749
|
return wr;
|
|
@@ -4771,7 +4771,7 @@ var qi = class e {
|
|
|
4771
4771
|
let e = this.manager.generation;
|
|
4772
4772
|
return e === this.lastGeneration ? wr : (this.lastGeneration = e, this.manager.getNodes(this.slotName));
|
|
4773
4773
|
}
|
|
4774
|
-
}), Yi = class extends
|
|
4774
|
+
}), Yi = class extends bi {
|
|
4775
4775
|
connectedCallback() {
|
|
4776
4776
|
Hi(this).collectNodes(), super.connectedCallback();
|
|
4777
4777
|
}
|
|
@@ -4780,16 +4780,16 @@ var qi = class e {
|
|
|
4780
4780
|
}
|
|
4781
4781
|
};
|
|
4782
4782
|
//#endregion
|
|
4783
|
-
//#region ../elements/dist/classutils-
|
|
4783
|
+
//#region ../elements/dist/classutils-lVbGcvjN.js
|
|
4784
4784
|
function Xi(e, t, n) {
|
|
4785
4785
|
let r = e.getAttribute("class") || "", i = new Set(r.split(/\s+/).filter(Boolean));
|
|
4786
4786
|
n ? i.add(t) : i.delete(t), e.setAttribute("class", Array.from(i).join(" "));
|
|
4787
4787
|
}
|
|
4788
4788
|
//#endregion
|
|
4789
|
-
//#region ../elements/dist/icon-
|
|
4790
|
-
var Zi = class extends
|
|
4789
|
+
//#region ../elements/dist/icon-LaKyBKON.js
|
|
4790
|
+
var Zi = class extends Ur {
|
|
4791
4791
|
constructor(e) {
|
|
4792
|
-
if (super(e), this.it = K, e.type !==
|
|
4792
|
+
if (super(e), this.it = K, e.type !== Vr.CHILD) throw Error(this.constructor.directiveName + "() can only be used in child bindings");
|
|
4793
4793
|
}
|
|
4794
4794
|
render(e) {
|
|
4795
4795
|
if (e === K || e == null) return this._t = void 0, this.it = e;
|
|
@@ -4806,9 +4806,9 @@ var Zi = class extends bi {
|
|
|
4806
4806
|
}
|
|
4807
4807
|
};
|
|
4808
4808
|
Zi.directiveName = "unsafeHTML", Zi.resultType = 1;
|
|
4809
|
-
var Qi =
|
|
4809
|
+
var Qi = Hr(Zi), $i = class extends Zi {};
|
|
4810
4810
|
$i.directiveName = "unsafeSVG", $i.resultType = 2;
|
|
4811
|
-
var ea =
|
|
4811
|
+
var ea = Hr($i), ta = "https://punkt-cdn.oslo.kommune.no/16.19/icons/";
|
|
4812
4812
|
typeof window < "u" && (window.pktFetch = window.pktFetch === void 0 ? fetch : window.pktFetch, window.pktIconPath = window.pktIconPath || ta);
|
|
4813
4813
|
var na = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 32 32\"></svg>", ra = {}, ia = 2, aa = 1500, oa = typeof Storage < "u" && typeof sessionStorage < "u", sa = (e) => window.pktFetch(e).then((t) => {
|
|
4814
4814
|
if (!t.ok) throw Error("Missing icon: " + e);
|
|
@@ -4822,7 +4822,7 @@ var na = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 32 32\"></svg>
|
|
|
4822
4822
|
}, la = async (e, t) => {
|
|
4823
4823
|
let n = t + e + ".svg";
|
|
4824
4824
|
return oa && sessionStorage.getItem(n) ? sessionStorage.getItem(n) : n in ra ? ra[n] : typeof window < "u" && typeof window.pktFetch == "function" ? (ra[n] = ca(n).then((e) => (e !== na && oa && sessionStorage.setItem(n, e), delete ra[n], e)), ra[n]) : na;
|
|
4825
|
-
}, ua = class extends
|
|
4825
|
+
}, ua = class extends bi {
|
|
4826
4826
|
constructor(...e) {
|
|
4827
4827
|
super(...e), this.path = typeof window < "u" ? window.pktIconPath : ta, this.name = "", this.ariaHidden = null, this.ariaLabel = null, this.icon = ea(na), this._updatedProps = [];
|
|
4828
4828
|
}
|
|
@@ -4887,11 +4887,11 @@ try {
|
|
|
4887
4887
|
console.warn("Forsøker å definere <pkt-icon>, men den er allerede definert");
|
|
4888
4888
|
}
|
|
4889
4889
|
//#endregion
|
|
4890
|
-
//#region ../elements/dist/if-defined-
|
|
4890
|
+
//#region ../elements/dist/if-defined-VShASPdu.js
|
|
4891
4891
|
var Q = (e) => e ?? K;
|
|
4892
4892
|
//#endregion
|
|
4893
|
-
//#region ../elements/dist/button-
|
|
4894
|
-
window.pktAnimationPath = window.pktAnimationPath || "https://punkt-cdn.oslo.kommune.no/16.
|
|
4893
|
+
//#region ../elements/dist/button-CR-KWhTT.js
|
|
4894
|
+
window.pktAnimationPath = window.pktAnimationPath || "https://punkt-cdn.oslo.kommune.no/16.19/animations/";
|
|
4895
4895
|
var da = class extends Yi {
|
|
4896
4896
|
constructor(...e) {
|
|
4897
4897
|
super(...e), this.iconName = "user", this.secondIconName = "user", this.mode = "light", this.size = "medium", this.fullWidth = !1, this.fullWidthOnMobile = !1, this.skin = "primary", this.variant = "label-only", this.state = "normal", this.type = "button", this.form = void 0, this.isLoading = !1, this.disabled = !1, this.loadingAnimationPath = window.pktAnimationPath;
|
|
@@ -4976,7 +4976,7 @@ try {
|
|
|
4976
4976
|
console.warn("Forsøker å definere <pkt-button>, men den er allerede definert");
|
|
4977
4977
|
}
|
|
4978
4978
|
//#endregion
|
|
4979
|
-
//#region ../elements/dist/alert-
|
|
4979
|
+
//#region ../elements/dist/alert-BkzC5mVu.js
|
|
4980
4980
|
var fa = {
|
|
4981
4981
|
name: "pkt-alert",
|
|
4982
4982
|
react: "PktAlert",
|
|
@@ -5138,8 +5138,8 @@ try {
|
|
|
5138
5138
|
console.warn("Forsøker å definere <pkt-alert>, men den er allerede definert");
|
|
5139
5139
|
}
|
|
5140
5140
|
//#endregion
|
|
5141
|
-
//#region ../elements/dist/ref-
|
|
5142
|
-
var ma = () => new ha(), ha = class {}, ga = /* @__PURE__ */ new WeakMap(), _a =
|
|
5141
|
+
//#region ../elements/dist/ref-BgoHEsEt.js
|
|
5142
|
+
var ma = () => new ha(), ha = class {}, ga = /* @__PURE__ */ new WeakMap(), _a = Hr(class extends Li {
|
|
5143
5143
|
render(e) {
|
|
5144
5144
|
return K;
|
|
5145
5145
|
}
|
|
@@ -5162,7 +5162,7 @@ var ma = () => new ha(), ha = class {}, ga = /* @__PURE__ */ new WeakMap(), _a =
|
|
|
5162
5162
|
reconnected() {
|
|
5163
5163
|
this.rt(this.ct);
|
|
5164
5164
|
}
|
|
5165
|
-
}), va = class extends
|
|
5165
|
+
}), va = class extends gi {
|
|
5166
5166
|
constructor(...e) {
|
|
5167
5167
|
super(...e), this.ariaLabelledBy = "", this.compact = !1, this.skin = "borderless", this.name = "";
|
|
5168
5168
|
}
|
|
@@ -5294,8 +5294,8 @@ try {
|
|
|
5294
5294
|
console.warn("Forsøker å definere <pkt-accordion-item>, men den er allerede definert");
|
|
5295
5295
|
}
|
|
5296
5296
|
//#endregion
|
|
5297
|
-
//#region ../elements/dist/backlink-
|
|
5298
|
-
var ba = class extends
|
|
5297
|
+
//#region ../elements/dist/backlink-BXAdgAte.js
|
|
5298
|
+
var ba = class extends bi {
|
|
5299
5299
|
constructor(...e) {
|
|
5300
5300
|
super(...e), this.href = "", this.text = "Forsiden", this.ariaLabel = "";
|
|
5301
5301
|
}
|
|
@@ -5325,8 +5325,8 @@ try {
|
|
|
5325
5325
|
console.warn("Forsøker å definere <pkt-backlink>, men den er allerede definert");
|
|
5326
5326
|
}
|
|
5327
5327
|
//#endregion
|
|
5328
|
-
//#region ../elements/dist/breadcrumbs-
|
|
5329
|
-
var xa = class extends
|
|
5328
|
+
//#region ../elements/dist/breadcrumbs-Dkb9TxMp.js
|
|
5329
|
+
var xa = class extends bi {
|
|
5330
5330
|
constructor(...e) {
|
|
5331
5331
|
super(...e), this.breadcrumbs = [];
|
|
5332
5332
|
}
|
|
@@ -5398,7 +5398,7 @@ try {
|
|
|
5398
5398
|
console.warn("Forsøker å definere <pkt-breadcrumbs>, men den er allerede definert");
|
|
5399
5399
|
}
|
|
5400
5400
|
//#endregion
|
|
5401
|
-
//#region ../elements/dist/converters-
|
|
5401
|
+
//#region ../elements/dist/converters-DSQXaDQ_.js
|
|
5402
5402
|
var Sa = 365.2425, Ca = 6048e5, wa = 864e5, Ta = 3600 * 24;
|
|
5403
5403
|
Ta * 7, Ta * Sa / 12 * 3;
|
|
5404
5404
|
var Ea = Symbol.for("constructDateFrom");
|
|
@@ -6705,7 +6705,7 @@ var Ko = (e) => !e || isNaN(e.getTime()) ? "" : `${e.getFullYear()}-${String(e.g
|
|
|
6705
6705
|
}
|
|
6706
6706
|
};
|
|
6707
6707
|
//#endregion
|
|
6708
|
-
//#region ../elements/dist/calendar-
|
|
6708
|
+
//#region ../elements/dist/calendar-DAq6iJdx.js
|
|
6709
6709
|
function ds(e, t, n) {
|
|
6710
6710
|
let r = Oa(e, n?.in);
|
|
6711
6711
|
return isNaN(t) ? Da(n?.in || e, NaN) : (t && r.setDate(r.getDate() + t), r);
|
|
@@ -6971,7 +6971,7 @@ function Ms(e, t, n) {
|
|
|
6971
6971
|
function Ns(e) {
|
|
6972
6972
|
return As[e] ?? null;
|
|
6973
6973
|
}
|
|
6974
|
-
var Ps = class extends
|
|
6974
|
+
var Ps = class extends bi {
|
|
6975
6975
|
constructor(...e) {
|
|
6976
6976
|
super(...e), this.selected = [], this.multiple = hs.props.multiple.default, this.maxMultiple = hs.props.maxMultiple.default, this.range = hs.props.range.default, this.earliest = hs.props.earliest.default, this.latest = hs.props.latest.default, this.excludedates = [], this.excludeweekdays = [], this.weeknumbers = hs.props.weeknumbers.default, this.withcontrols = hs.props.withcontrols.default, this.currentmonth = null, this.today = null, this.dayStrings = this.strings.dates.daysShort, this.dayStringsLong = this.strings.dates.days, this.monthStrings = this.strings.dates.months, this.weekString = this.strings.dates.week, this.prevMonthString = this.strings.dates.prevMonth, this.nextMonthString = this.strings.dates.nextMonth, this._selected = [], this.inRange = {}, this.rangeHovered = null, this.year = 0, this.month = 0, this.week = 0, this.currentmonthtouched = !1, this.focusedDate = null, this.selectableDates = [], this.tabIndexSet = 0;
|
|
6977
6977
|
}
|
|
@@ -7339,7 +7339,7 @@ try {
|
|
|
7339
7339
|
console.warn("Forsøker å definere <pkt-calendar>, men den er allerede definert");
|
|
7340
7340
|
}
|
|
7341
7341
|
//#endregion
|
|
7342
|
-
//#region ../elements/dist/tag-
|
|
7342
|
+
//#region ../elements/dist/tag-CzlnHhho.js
|
|
7343
7343
|
var Fs = {
|
|
7344
7344
|
name: "pkt-tag",
|
|
7345
7345
|
react: "PktTag",
|
|
@@ -7510,22 +7510,13 @@ try {
|
|
|
7510
7510
|
console.warn("Forsøker å definere <pkt-tag>, men den er allerede definert");
|
|
7511
7511
|
}
|
|
7512
7512
|
//#endregion
|
|
7513
|
-
//#region ../elements/dist/heading-
|
|
7514
|
-
var Ls = class extends
|
|
7513
|
+
//#region ../elements/dist/heading-3o4Dk0Wn.js
|
|
7514
|
+
var Ls = class extends Yi {
|
|
7515
7515
|
constructor(...e) {
|
|
7516
7516
|
super(...e), this.size = void 0, this.level = 2, this.weight = void 0, this.visuallyHidden = !1, this.align = void 0;
|
|
7517
7517
|
}
|
|
7518
|
-
connectedCallback() {
|
|
7519
|
-
super.connectedCallback(), this.setAttribute("role", "heading"), this.setAttribute("aria-level", String(this.level)), this.updateHostClasses();
|
|
7520
|
-
}
|
|
7521
|
-
attributeChangedCallback(e, t, n) {
|
|
7522
|
-
super.attributeChangedCallback(e, t, n), e === "level" && n && this.setLevel(Number(n)), e === "visuallyHidden" && (this.visuallyHidden = n !== null && n !== "false"), (e === "size" || e === "visuallyHidden" || e === "align" || e === "weight") && this.updateHostClasses();
|
|
7523
|
-
}
|
|
7524
7518
|
updated(e) {
|
|
7525
|
-
super.updated(e), e.has("level") && (this.
|
|
7526
|
-
}
|
|
7527
|
-
setLevel(e) {
|
|
7528
|
-
e >= 1 && e <= 6 ? (this.level = e, this.setAttribute("aria-level", String(e))) : console.warn(`Invalid heading level: ${e}. Must be between 1 and 6.`);
|
|
7519
|
+
super.updated(e), e.has("level") && ((this.level < 1 || this.level > 6) && console.warn(`Invalid heading level: ${this.level}. Must be between 1 and 6.`), this.hasAttribute("size") || (this.size = this.defaultSizeForLevel), this.hasAttribute("weight") || (this.weight = this.defaultWeightForLevel)), !this.hasAttribute("size") && this.size === void 0 && (this.size = this.defaultSizeForLevel);
|
|
7529
7520
|
}
|
|
7530
7521
|
get defaultSizeForLevel() {
|
|
7531
7522
|
switch (this.level) {
|
|
@@ -7533,27 +7524,42 @@ var Ls = class extends gi {
|
|
|
7533
7524
|
case 2: return "large";
|
|
7534
7525
|
case 3: return "medium";
|
|
7535
7526
|
case 4: return "small";
|
|
7536
|
-
case 5:
|
|
7527
|
+
case 5:
|
|
7537
7528
|
case 6: return "xsmall";
|
|
7538
7529
|
default: return "medium";
|
|
7539
7530
|
}
|
|
7540
7531
|
}
|
|
7541
7532
|
get defaultWeightForLevel() {
|
|
7542
7533
|
switch (this.level) {
|
|
7543
|
-
case 1:
|
|
7534
|
+
case 1:
|
|
7544
7535
|
case 2: return "regular";
|
|
7545
|
-
case 3:
|
|
7546
|
-
case 4:
|
|
7547
|
-
case 5:
|
|
7536
|
+
case 3:
|
|
7537
|
+
case 4:
|
|
7538
|
+
case 5:
|
|
7548
7539
|
case 6: return "medium";
|
|
7549
7540
|
default: return "medium";
|
|
7550
7541
|
}
|
|
7551
7542
|
}
|
|
7552
|
-
|
|
7553
|
-
|
|
7543
|
+
get headingClasses() {
|
|
7544
|
+
return [
|
|
7545
|
+
"pkt-heading",
|
|
7546
|
+
this.size && `pkt-heading--${this.size}`,
|
|
7547
|
+
this.weight && `pkt-heading--fw-${this.weight}`,
|
|
7548
|
+
this.visuallyHidden && "pkt-sr-only",
|
|
7549
|
+
this.align && `pkt-heading--${this.align}`
|
|
7550
|
+
].filter(Boolean).join(" ");
|
|
7554
7551
|
}
|
|
7555
7552
|
render() {
|
|
7556
|
-
|
|
7553
|
+
let e = this.headingClasses, t = Ji(this);
|
|
7554
|
+
switch (this.level >= 1 && this.level <= 6 ? this.level : 2) {
|
|
7555
|
+
case 1: return G`<h1 class=${e}>${t}</h1>`;
|
|
7556
|
+
case 2: return G`<h2 class=${e}>${t}</h2>`;
|
|
7557
|
+
case 3: return G`<h3 class=${e}>${t}</h3>`;
|
|
7558
|
+
case 4: return G`<h4 class=${e}>${t}</h4>`;
|
|
7559
|
+
case 5: return G`<h5 class=${e}>${t}</h5>`;
|
|
7560
|
+
case 6: return G`<h6 class=${e}>${t}</h6>`;
|
|
7561
|
+
default: return G`<h2 class=${e}>${t}</h2>`;
|
|
7562
|
+
}
|
|
7557
7563
|
}
|
|
7558
7564
|
};
|
|
7559
7565
|
X([J({
|
|
@@ -7578,7 +7584,7 @@ try {
|
|
|
7578
7584
|
console.warn("Forsøker å definere <pkt-heading>, men den er allerede definert");
|
|
7579
7585
|
}
|
|
7580
7586
|
//#endregion
|
|
7581
|
-
//#region ../elements/dist/card-
|
|
7587
|
+
//#region ../elements/dist/card-5PydU247.js
|
|
7582
7588
|
var Rs = {
|
|
7583
7589
|
name: "pkt-card",
|
|
7584
7590
|
react: "PktCard",
|
|
@@ -7907,14 +7913,14 @@ try {
|
|
|
7907
7913
|
console.warn("Forsøker å definere <pkt-card>, men den er allerede definert");
|
|
7908
7914
|
}
|
|
7909
7915
|
//#endregion
|
|
7910
|
-
//#region ../elements/dist/repeat-
|
|
7916
|
+
//#region ../elements/dist/repeat-CKIii8Mi.js
|
|
7911
7917
|
var Bs = (e, t, n) => {
|
|
7912
7918
|
let r = /* @__PURE__ */ new Map();
|
|
7913
7919
|
for (let i = t; i <= n; i++) r.set(e[i], i);
|
|
7914
7920
|
return r;
|
|
7915
|
-
}, Vs =
|
|
7921
|
+
}, Vs = Hr(class extends Ur {
|
|
7916
7922
|
constructor(e) {
|
|
7917
|
-
if (super(e), e.type !==
|
|
7923
|
+
if (super(e), e.type !== Vr.CHILD) throw Error("repeat() can only be used in text expressions");
|
|
7918
7924
|
}
|
|
7919
7925
|
dt(e, t, n) {
|
|
7920
7926
|
let r;
|
|
@@ -8052,7 +8058,7 @@ var Bs = (e, t, n) => {
|
|
|
8052
8058
|
}
|
|
8053
8059
|
}
|
|
8054
8060
|
n[0] && tc(n[0]);
|
|
8055
|
-
}, cc = class extends
|
|
8061
|
+
}, cc = class extends bi {
|
|
8056
8062
|
constructor(...e) {
|
|
8057
8063
|
super(...e), this.id = Ws(), this.label = null, this.options = [], this.isOpen = !1, this.disabled = !1, this.includeSearch = !1, this.isMultiSelect = !1, this.allowUserInput = !1, this.maxIsReached = !1, this.customUserInput = null, this.searchPlaceholder = null, this.searchValue = null, this.maxLength = 0, this.userMessage = null, this._selectedOptions = 0, this.typeahead = $s(), this._filteredOptions = [];
|
|
8058
8064
|
}
|
|
@@ -8200,7 +8206,7 @@ var Bs = (e, t, n) => {
|
|
|
8200
8206
|
type="text"
|
|
8201
8207
|
aria-label="Søk i listen"
|
|
8202
8208
|
form=""
|
|
8203
|
-
placeholder=${this.searchPlaceholder ||
|
|
8209
|
+
placeholder=${this.searchPlaceholder || vi.forms.search.placeholder}
|
|
8204
8210
|
@input=${this.handleSearchInput}
|
|
8205
8211
|
@keydown=${this.handleSearchKeydown}
|
|
8206
8212
|
.value=${this.searchValue}
|
|
@@ -8348,7 +8354,7 @@ try {
|
|
|
8348
8354
|
console.warn("Forsøker å definere <pkt-listbox>, men den er allerede definert");
|
|
8349
8355
|
}
|
|
8350
8356
|
//#endregion
|
|
8351
|
-
//#region ../elements/dist/booleanish-
|
|
8357
|
+
//#region ../elements/dist/booleanish-BmcOU-43.js
|
|
8352
8358
|
var lc = {
|
|
8353
8359
|
fromAttribute(e) {
|
|
8354
8360
|
return e == null ? !1 : e === "" || e === "true" || e === !0 ? !0 : e === "false" || e === !1 ? !1 : !!e;
|
|
@@ -8519,7 +8525,7 @@ var lc = {
|
|
|
8519
8525
|
}
|
|
8520
8526
|
};
|
|
8521
8527
|
//#endregion
|
|
8522
|
-
//#region ../elements/dist/input-element-
|
|
8528
|
+
//#region ../elements/dist/input-element-BrmkXIXi.js
|
|
8523
8529
|
(function(e) {
|
|
8524
8530
|
let t = /* @__PURE__ */ new WeakMap(), n = /* @__PURE__ */ new WeakMap(), r = /* @__PURE__ */ new WeakMap(), i = /* @__PURE__ */ new WeakMap(), a = /* @__PURE__ */ new WeakMap(), o = /* @__PURE__ */ new WeakMap(), s = /* @__PURE__ */ new WeakMap(), c = /* @__PURE__ */ new WeakMap(), l = /* @__PURE__ */ new WeakMap(), u = /* @__PURE__ */ new WeakMap(), d = /* @__PURE__ */ new WeakMap(), f = /* @__PURE__ */ new WeakMap(), p = /* @__PURE__ */ new WeakMap(), m = /* @__PURE__ */ new WeakMap(), h = /* @__PURE__ */ new WeakMap(), g = {
|
|
8525
8531
|
ariaAtomic: "aria-atomic",
|
|
@@ -8972,14 +8978,14 @@ var dc = "on", fc = "--checked", pc = ",", $ = class extends Yi {
|
|
|
8972
8978
|
return !0;
|
|
8973
8979
|
}
|
|
8974
8980
|
constructor() {
|
|
8975
|
-
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.step = null, this.ariaDescribedBy = null, this.ariaLabelledby = null, this.name = "", this.pattern = null, this.placeholder = null, this.id = Ws(), 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 = uc.props.helptextDropdownButton.default, this.label = null, this.optionalText =
|
|
8981
|
+
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.step = null, this.ariaDescribedBy = null, this.ariaLabelledby = null, this.name = "", this.pattern = null, this.placeholder = null, this.id = Ws(), 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 = uc.props.helptextDropdownButton.default, this.label = null, this.optionalText = vi.forms.labels.optional, this.requiredText = vi.forms.labels.required, this.tagText = null, this.dataTestid = "", this.touched = !1, this.internals = this.attachInternals();
|
|
8976
8982
|
}
|
|
8977
8983
|
manageValidity(e) {
|
|
8978
8984
|
if (!e) {
|
|
8979
8985
|
console.warn("manageValidity called without valid input element");
|
|
8980
8986
|
return;
|
|
8981
8987
|
}
|
|
8982
|
-
this.required && !this.value ? this.internals.setValidity({ valueMissing: !0 },
|
|
8988
|
+
this.required && !this.value ? this.internals.setValidity({ valueMissing: !0 }, vi.forms.messages.required, e) : e.validity?.typeMismatch || e.validity?.badInput ? this.internals.setValidity({ typeMismatch: !0 }, vi.forms.messages.invalid, e) : e.validity?.patternMismatch ? this.internals.setValidity({ patternMismatch: !0 }, vi.forms.messages.invalidPattern, e) : e.validity?.tooShort || this.minlength && this.minlength > 0 && this.value.length < this.minlength ? this.internals.setValidity({ tooShort: !0 }, vi.forms.messages.tooShort, e) : e.validity?.tooLong || this.maxlength && this.maxlength > 0 && this.value.length > this.maxlength ? this.internals.setValidity({ tooLong: !0 }, vi.forms.messages.tooLong, e) : e.validity?.rangeUnderflow ? this.internals.setValidity({ rangeUnderflow: !0 }, this.min ? vi.forms.messages.rangeUnderflowMin.replace("{min}", this.min?.toString()) : vi.forms.messages.rangeUnderflow, e) : e.validity?.stepMismatch ? this.internals.setValidity({ stepMismatch: !0 }, vi.forms.messages.invalid, e) : e.validity?.rangeOverflow ? this.internals.setValidity({ rangeOverflow: !0 }, this.max ? vi.forms.messages.rangeOverflowMax.replace("{max}", this.max?.toString()) : vi.forms.messages.rangeOverflow, e) : e.validity?.customError ? this.internals.setValidity({ customError: !0 }, e.validationMessage, e) : this.internals.setValidity({});
|
|
8983
8989
|
}
|
|
8984
8990
|
setFormValue(e) {
|
|
8985
8991
|
if (this.internals) if (Array.isArray(e)) {
|
|
@@ -9154,7 +9160,7 @@ X([J({
|
|
|
9154
9160
|
attribute: "data-testid"
|
|
9155
9161
|
})], $.prototype, "dataTestid", void 0);
|
|
9156
9162
|
//#endregion
|
|
9157
|
-
//#region ../elements/dist/pkt-options-controller-
|
|
9163
|
+
//#region ../elements/dist/pkt-options-controller-BTNtjEIS.js
|
|
9158
9164
|
var mc = class {
|
|
9159
9165
|
constructor(e) {
|
|
9160
9166
|
this.nodes = [], this.options = [], this.generation = 0, this.host = e, this.host.addController(this), this.nodes = [], this.options = [], this.observer = new MutationObserver((e) => this.handleMutations(e));
|
|
@@ -9247,7 +9253,7 @@ try {
|
|
|
9247
9253
|
console.warn("Forsøker å definere <pkt-helptext>, men den er allerede definert");
|
|
9248
9254
|
}
|
|
9249
9255
|
//#endregion
|
|
9250
|
-
//#region ../elements/dist/focus-modality-controller-
|
|
9256
|
+
//#region ../elements/dist/focus-modality-controller-CaUqYdk0.js
|
|
9251
9257
|
var gc = class {
|
|
9252
9258
|
constructor(e, t = null) {
|
|
9253
9259
|
this.pointerJustUsed = !1, this.handlePointerDown = () => {
|
|
@@ -9376,7 +9382,7 @@ try {
|
|
|
9376
9382
|
console.warn("Forsøker å definere <pkt-input-wrapper>, men den er allerede definert");
|
|
9377
9383
|
}
|
|
9378
9384
|
//#endregion
|
|
9379
|
-
//#region ../elements/dist/combobox-
|
|
9385
|
+
//#region ../elements/dist/combobox-D-DY7YcW.js
|
|
9380
9386
|
var vc = (e, t, n) => {
|
|
9381
9387
|
switch (e) {
|
|
9382
9388
|
case ",": return n ? "addValue" : null;
|
|
@@ -10342,7 +10348,7 @@ try {
|
|
|
10342
10348
|
console.warn("Forsøker å definere <pkt-combobox>, men den er allerede definert");
|
|
10343
10349
|
}
|
|
10344
10350
|
//#endregion
|
|
10345
|
-
//#region ../elements/dist/link-
|
|
10351
|
+
//#region ../elements/dist/link-ClUNY__5.js
|
|
10346
10352
|
var Ac = {
|
|
10347
10353
|
name: "pkt-link",
|
|
10348
10354
|
react: "PktLink",
|
|
@@ -10424,7 +10430,7 @@ try {
|
|
|
10424
10430
|
console.warn("Forsøker å definere <pkt-link>, men den er allerede definert");
|
|
10425
10431
|
}
|
|
10426
10432
|
//#endregion
|
|
10427
|
-
//#region ../elements/dist/textinput-
|
|
10433
|
+
//#region ../elements/dist/textinput-CZrBM-Fj.js
|
|
10428
10434
|
var Mc = class extends $ {
|
|
10429
10435
|
constructor(...e) {
|
|
10430
10436
|
super(...e), this.inputRef = ma(), this.value = "", this.type = "text", this.size = null, this.autocomplete = null, this.iconNameRight = null, this.prefix = null, this.suffix = null, this.omitSearchIcon = !1, this.counterCurrent = 0;
|
|
@@ -10536,7 +10542,7 @@ try {
|
|
|
10536
10542
|
console.warn("Forsøker å definere <pkt-textinput>, men den er allerede definert");
|
|
10537
10543
|
}
|
|
10538
10544
|
//#endregion
|
|
10539
|
-
//#region ../elements/dist/header-
|
|
10545
|
+
//#region ../elements/dist/header-DONTGbD9.js
|
|
10540
10546
|
var Nc = (e) => typeof e.target == "string" ? {
|
|
10541
10547
|
title: e.title,
|
|
10542
10548
|
iconName: e.iconName,
|
|
@@ -10555,7 +10561,7 @@ var Nc = (e) => typeof e.target == "string" ? {
|
|
|
10555
10561
|
hour: "2-digit",
|
|
10556
10562
|
minute: "2-digit"
|
|
10557
10563
|
});
|
|
10558
|
-
}, Ic = class extends
|
|
10564
|
+
}, Ic = class extends bi {
|
|
10559
10565
|
constructor(...e) {
|
|
10560
10566
|
super(...e), this.canChangeRepresentation = !1, this.logoutOnClick = !1;
|
|
10561
10567
|
}
|
|
@@ -10706,7 +10712,7 @@ try {
|
|
|
10706
10712
|
} catch {
|
|
10707
10713
|
console.warn("Forsøker å definere <pkt-header-user-menu>, men den er allerede definert");
|
|
10708
10714
|
}
|
|
10709
|
-
var Lc = "https://punkt-cdn.oslo.kommune.no/16.
|
|
10715
|
+
var Lc = "https://punkt-cdn.oslo.kommune.no/16.19/logos/", Rc = class extends Yi {
|
|
10710
10716
|
constructor(...e) {
|
|
10711
10717
|
super(...e), 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 = ma(), this.userContainerRef = ma(), this.slotContainerRef = ma(), this.searchContainerRef = ma(), this.slotContentRef = ma(), this.searchMenuRef = ma(), this.lastScrollPosition = 0, this.savedScrollY = 0, this.lastFocusedElement = null, this.shouldRestoreFocus = !1, this.handleScroll = () => {
|
|
10712
10718
|
if (!this.shouldHideOnScroll) return;
|
|
@@ -11304,7 +11310,7 @@ try {
|
|
|
11304
11310
|
console.warn("Forsøker å definere <pkt-header>, men den er allerede definert");
|
|
11305
11311
|
}
|
|
11306
11312
|
//#endregion
|
|
11307
|
-
//#region ../elements/dist/header-menu-
|
|
11313
|
+
//#region ../elements/dist/header-menu-BU-ylGrJ.js
|
|
11308
11314
|
var Bc = "https://cdn.web.oslo.kommune.no/header-footer/header-footer.json", Vc = {
|
|
11309
11315
|
automat: "parking-meter",
|
|
11310
11316
|
bike: "bicycle",
|
|
@@ -11368,7 +11374,7 @@ async function Jc(e = Bc, t) {
|
|
|
11368
11374
|
if (!r || typeof r != "object") throw Error(`pkt-header-menu: ${e} returned a non-object payload`);
|
|
11369
11375
|
return r;
|
|
11370
11376
|
}
|
|
11371
|
-
var Yc = class extends
|
|
11377
|
+
var Yc = class extends bi {
|
|
11372
11378
|
constructor(...e) {
|
|
11373
11379
|
super(...e), this.dataUrl = Bc, this.locale = "nb-NO", this.open = !1, this.ariaLabelledBy = "", this.mobileBreakpoint = 768, this.loadState = "idle", this.isMobile = !1, this.handleMediaChange = (e) => {
|
|
11374
11380
|
this.isMobile = e.matches;
|
|
@@ -11608,14 +11614,14 @@ try {
|
|
|
11608
11614
|
console.warn("Forsøker å definere <pkt-header-menu>, men den er allerede definert");
|
|
11609
11615
|
}
|
|
11610
11616
|
//#endregion
|
|
11611
|
-
//#region ../elements/dist/datepicker-
|
|
11617
|
+
//#region ../elements/dist/datepicker-CRk7aiwH.js
|
|
11612
11618
|
var Xc = { calendar: { buttonAltText: "Åpne kalender" } }, Zc = {
|
|
11613
11619
|
calendar: { buttonAltText: "Åpne kalender" },
|
|
11614
11620
|
generic: {
|
|
11615
11621
|
from: "Fra",
|
|
11616
11622
|
to: "Til"
|
|
11617
11623
|
}
|
|
11618
|
-
}, Qc = class extends
|
|
11624
|
+
}, Qc = class extends bi {
|
|
11619
11625
|
constructor(...e) {
|
|
11620
11626
|
super(...e), this.dates = [], this.dateformat = "dd.MM.yyyy", this.className = "pkt-datepicker__tags", this.idBase = Ws();
|
|
11621
11627
|
}
|
|
@@ -11972,7 +11978,7 @@ var $c = {
|
|
|
11972
11978
|
}, vl = {
|
|
11973
11979
|
handleInputKeydown: ul,
|
|
11974
11980
|
handleButtonKeydown: dl
|
|
11975
|
-
}, yl = class extends
|
|
11981
|
+
}, yl = class extends bi {
|
|
11976
11982
|
constructor(...e) {
|
|
11977
11983
|
super(...e), this.open = !1, this.multiple = !1, this.range = !1, this.weeknumbers = !1, this.withcontrols = !1, this.maxMultiple = null, this.selected = [], this.earliest = null, this.latest = null, this.excludedates = [], this.excludeweekdays = [], this.currentmonth = null, this.today = null, this._hasBeenOpened = !1, this.popupRef = ma(), this.calendarRef = ma(), this.handleDocumentClick = (e) => {
|
|
11978
11984
|
if (!this.open) return;
|
|
@@ -12084,7 +12090,7 @@ try {
|
|
|
12084
12090
|
} catch {
|
|
12085
12091
|
console.warn("Forsøker å definere <pkt-datepicker-popup>, men den er allerede definert");
|
|
12086
12092
|
}
|
|
12087
|
-
var bl = class extends
|
|
12093
|
+
var bl = class extends bi {
|
|
12088
12094
|
constructor(...e) {
|
|
12089
12095
|
super(...e), this.inputType = "date", this.id = "", this.readonly = !1, this.disabled = !1, this.inputClasses = {}, this.inputRef = ma(), this.btnRef = ma();
|
|
12090
12096
|
}
|
|
@@ -12710,7 +12716,7 @@ try {
|
|
|
12710
12716
|
console.warn("Forsøker å definere <pkt-datepicker>, men den er allerede definert");
|
|
12711
12717
|
}
|
|
12712
12718
|
//#endregion
|
|
12713
|
-
//#region ../elements/dist/modal-
|
|
12719
|
+
//#region ../elements/dist/modal-CWgeT-RP.js
|
|
12714
12720
|
var Tl = "pkt-modal--open", El = "data-pkt-modal-open-count", Dl = () => {
|
|
12715
12721
|
let e = document.body.getAttribute(El), t = e ? parseInt(e, 10) : 0;
|
|
12716
12722
|
return Number.isFinite(t) && t > 0 ? t : 0;
|
|
@@ -12839,7 +12845,7 @@ var Tl = "pkt-modal--open", El = "data-pkt-modal-open-count", Dl = () => {
|
|
|
12839
12845
|
super.updated(e), e.has("open") && (this.open && !this._isOpen ? this.showModal() : !this.open && this._isOpen && this.close(new Event("close"), !1));
|
|
12840
12846
|
}
|
|
12841
12847
|
async firstUpdated(e) {
|
|
12842
|
-
super.firstUpdated(e), this.dialogRef.value && !window.HTMLDialogElement && !this.dialogRef.value.showModal && ("document" in window && "createElement" in document && (await import("./dialog-polyfill.esm-
|
|
12848
|
+
super.firstUpdated(e), this.dialogRef.value && !window.HTMLDialogElement && !this.dialogRef.value.showModal && ("document" in window && "createElement" in document && (await import("./dialog-polyfill.esm-0dVT8G1o-Cf1Ux-Z9.js").then((e) => e.default)).registerDialog(this.dialogRef.value), this.dialogRef.value.addEventListener("close", () => {
|
|
12843
12849
|
this.close(new Event("close"), !0);
|
|
12844
12850
|
}));
|
|
12845
12851
|
}
|
|
@@ -12920,10 +12926,10 @@ try {
|
|
|
12920
12926
|
console.warn("Forsøker å definere <pkt-modal>, men den er allerede definert");
|
|
12921
12927
|
}
|
|
12922
12928
|
//#endregion
|
|
12923
|
-
//#region ../elements/dist/progressbar-
|
|
12924
|
-
var Pl = "important", Fl = " !" + Pl, Il =
|
|
12929
|
+
//#region ../elements/dist/progressbar-B0P_vmGD.js
|
|
12930
|
+
var Pl = "important", Fl = " !" + Pl, Il = Hr(class extends Ur {
|
|
12925
12931
|
constructor(e) {
|
|
12926
|
-
if (super(e), e.type !==
|
|
12932
|
+
if (super(e), e.type !== Vr.ATTRIBUTE || e.name !== "style" || e.strings?.length > 2) throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.");
|
|
12927
12933
|
}
|
|
12928
12934
|
render(e) {
|
|
12929
12935
|
return Object.keys(e).reduce((t, n) => {
|
|
@@ -12945,7 +12951,7 @@ var Pl = "important", Fl = " !" + Pl, Il = yi(class extends bi {
|
|
|
12945
12951
|
}
|
|
12946
12952
|
return wr;
|
|
12947
12953
|
}
|
|
12948
|
-
}), Ll = class extends
|
|
12954
|
+
}), Ll = class extends bi {
|
|
12949
12955
|
constructor() {
|
|
12950
12956
|
super(), this.ariaLabel = null, this.ariaLabelledby = null, this.ariaValueText = null, this.ariaLive = "polite", this.id = Ws(), this.role = "progressbar", this.skin = "dark-blue", this.statusPlacement = "following", this.statusType = "none", this.title = "", this.titlePosition = "left", this.valueCurrent = 0, this.valueMax = 100, this.valueMin = 0, this.labelWidth = 0, this.progressbarId = this.id, this.computedAriaLabelledby = null, this.computedAriaValueText = "", this.labelRef = ma(), this.progressBarRef = ma();
|
|
12951
12957
|
}
|
|
@@ -13023,7 +13029,7 @@ try {
|
|
|
13023
13029
|
console.warn("Forsøker å definere <pkt-progressbar>, men den er allerede definert");
|
|
13024
13030
|
}
|
|
13025
13031
|
//#endregion
|
|
13026
|
-
//#region ../elements/dist/fileupload-
|
|
13032
|
+
//#region ../elements/dist/fileupload-C8muj8qd.js
|
|
13027
13033
|
var Rl = {
|
|
13028
13034
|
dropZoneDragMultiple: "Dra filer hit for å laste dem opp eller",
|
|
13029
13035
|
dropZoneDragSingle: "Dra en fil hit for å laste den opp eller",
|
|
@@ -13204,7 +13210,7 @@ function ru(e, t) {
|
|
|
13204
13210
|
function iu(e, t = Rl.unknownFilename) {
|
|
13205
13211
|
return e.attributes?.targetFilename || e.file?.name || t;
|
|
13206
13212
|
}
|
|
13207
|
-
var au = class extends
|
|
13213
|
+
var au = class extends bi {
|
|
13208
13214
|
constructor(...e) {
|
|
13209
13215
|
super(...e), this.id = `pkt-fileupload-${Ws()}`, this.name = "files", this.label = "", this.helptext = "", this.required = !1, this.multiple = !1, this.disabled = !1, this.fullwidth = !1, this.uploadStrategy = "form", this.itemRenderer = "filename", this.accept = "", this.allowedFormats = [], this.formatErrorMessage = "", this.sizeErrorMessage = "", this.transfers = [], this.addCommentsEnabled = !1, this.renameFilesEnabled = !1, this.extraOperations = [], this.enableImagePreview = !1, this.hasError = !1, this.errorMessage = "", this.optionalTag = !1, this.requiredTag = !1, this.truncateTail = 4, this.files = [], this.isDragActive = !1, this.validationErrorMessage = null, this.addedAnnouncement = "", this.thumbnailUrls = {}, this.hasInitializedValue = !1, this.hasWarnedInvalidValueCombo = !1, this.thumbnailFileById = /* @__PURE__ */ new Map(), this.connectedForm = null, this.addedAnnouncementTimer = null, this.requiredSelectionMessage = Rl.requiredMissing, this.onNativeFileChange = (e) => {
|
|
13210
13216
|
let t = e.target;
|
|
@@ -14360,7 +14366,7 @@ var ou = "comments", su = (e) => {
|
|
|
14360
14366
|
};
|
|
14361
14367
|
X([Y()], Ou.prototype, "activeOperationByFileId", void 0), X([Y()], Ou.prototype, "isPreviewModalOpen", void 0), X([Y()], Ou.prototype, "previewCurrentIndex", void 0), X([Y()], Ou.prototype, "failedImageFileIds", void 0), Ou = X([q("pkt-fileupload")], Ou);
|
|
14362
14368
|
//#endregion
|
|
14363
|
-
//#region ../elements/dist/consent-
|
|
14369
|
+
//#region ../elements/dist/consent-Y14WZ0JS.js
|
|
14364
14370
|
var ku = {
|
|
14365
14371
|
i18n: {
|
|
14366
14372
|
nb: {
|
|
@@ -14483,7 +14489,7 @@ function ju() {
|
|
|
14483
14489
|
r.href = "https://cdn.web.oslo.kommune.no/cb/cb-v1.1.0.css", r.type = "text/css", r.rel = "stylesheet", r.id = "oslo-consent-styles", document.head.appendChild(r);
|
|
14484
14490
|
}), Au);
|
|
14485
14491
|
}
|
|
14486
|
-
var Mu = class extends
|
|
14492
|
+
var Mu = class extends bi {
|
|
14487
14493
|
constructor() {
|
|
14488
14494
|
super(), this.devMode = !1, this.hotjarId = null, this.googleAnalyticsId = null, this.cookieDomain = null, this.cookieSecure = null, this.cookieExpiryDays = null, this.triggerType = "button", this.triggerText = null, this.i18nLanguage = "nb";
|
|
14489
14495
|
}
|
|
@@ -14550,7 +14556,7 @@ try {
|
|
|
14550
14556
|
console.warn("Forsøker å definere <pkt-consent>, men den er allerede definert");
|
|
14551
14557
|
}
|
|
14552
14558
|
//#endregion
|
|
14553
|
-
//#region ../elements/dist/checkbox-
|
|
14559
|
+
//#region ../elements/dist/checkbox-CC1X7fw4.js
|
|
14554
14560
|
var Nu = class extends $ {
|
|
14555
14561
|
constructor(...e) {
|
|
14556
14562
|
super(...e), this.inputRef = ma(), this.value = "", this.checkHelptext = null, this.defaultChecked = !1, this.hasTile = !1, this.isSwitch = !1, this.labelPosition = "right", this.hideLabel = !1, this.checked = null, this.indeterminate = !1, this.type = "checkbox", this.tagText = null, this.optionalTag = !1, this.optionalText = "Valgfritt", this.requiredTag = !1, this.requiredText = "Må fylles ut";
|
|
@@ -14653,7 +14659,7 @@ try {
|
|
|
14653
14659
|
console.warn("Forsøker å definere <pkt-checkbox>, men den er allerede definert");
|
|
14654
14660
|
}
|
|
14655
14661
|
//#endregion
|
|
14656
|
-
//#region ../elements/dist/linkcard-
|
|
14662
|
+
//#region ../elements/dist/linkcard-DNJm5FvA.js
|
|
14657
14663
|
var Pu = class extends Yi {
|
|
14658
14664
|
constructor(...e) {
|
|
14659
14665
|
super(...e), this.title = "", this.href = "#", this.iconName = "", this.external = !1, this.openInNewTab = !1, this.skin = "normal";
|
|
@@ -14700,8 +14706,8 @@ try {
|
|
|
14700
14706
|
console.warn("Forsøker å definere <pkt-linkcard>, men den er allerede definert");
|
|
14701
14707
|
}
|
|
14702
14708
|
//#endregion
|
|
14703
|
-
//#region ../elements/dist/loader-
|
|
14704
|
-
window.pktAnimationPath = window.pktAnimationPath || "https://punkt-cdn.oslo.kommune.no/16.
|
|
14709
|
+
//#region ../elements/dist/loader-gKdQpOOQ.js
|
|
14710
|
+
window.pktAnimationPath = window.pktAnimationPath || "https://punkt-cdn.oslo.kommune.no/16.19/animations/";
|
|
14705
14711
|
var Fu = class extends Yi {
|
|
14706
14712
|
constructor(...e) {
|
|
14707
14713
|
super(...e), this.delay = 0, this.inline = !1, this.isLoading = !0, this.message = null, this.size = "medium", this.variant = "shapes", this.loadingAnimationPath = window.pktAnimationPath, this._shouldDisplayLoader = !1;
|
|
@@ -14758,7 +14764,7 @@ try {
|
|
|
14758
14764
|
console.warn("Forsøker å definere <pkt-loader>, men den er allerede definert");
|
|
14759
14765
|
}
|
|
14760
14766
|
//#endregion
|
|
14761
|
-
//#region ../elements/dist/messagebox-
|
|
14767
|
+
//#region ../elements/dist/messagebox-XRFecqyS.js
|
|
14762
14768
|
var Iu = {
|
|
14763
14769
|
name: "pkt-messagebox",
|
|
14764
14770
|
react: "PktMessagebox",
|
|
@@ -14860,7 +14866,7 @@ try {
|
|
|
14860
14866
|
console.warn("Forsøker å definere <pkt-messagebox>, men den er allerede definert");
|
|
14861
14867
|
}
|
|
14862
14868
|
//#endregion
|
|
14863
|
-
//#region ../elements/dist/radiobutton-
|
|
14869
|
+
//#region ../elements/dist/radiobutton-C6zERHoy.js
|
|
14864
14870
|
var Ru = class extends $ {
|
|
14865
14871
|
constructor(...e) {
|
|
14866
14872
|
super(...e), this.inputRef = ma(), this.value = "", this.checkHelptext = null, this.defaultChecked = !1, this.hasTile = !1, this.checked = null, this.type = "radio", this.tagText = null, this.optionalTag = !1, this.optionalText = "Valgfritt", this.requiredTag = !1, this.requiredText = "Må fylles ut", this._checked = !1;
|
|
@@ -14936,7 +14942,7 @@ try {
|
|
|
14936
14942
|
console.warn("Forsøker å definere <pkt-radiobutton>, men den er allerede definert");
|
|
14937
14943
|
}
|
|
14938
14944
|
//#endregion
|
|
14939
|
-
//#region ../elements/dist/tabs-
|
|
14945
|
+
//#region ../elements/dist/tabs-BJx6wwXD.js
|
|
14940
14946
|
var zu = class extends Event {
|
|
14941
14947
|
constructor(e, t, n, r) {
|
|
14942
14948
|
super("context-request", {
|
|
@@ -15295,10 +15301,10 @@ try {
|
|
|
15295
15301
|
console.warn("Forsøker å definere <pkt-tab-item>, men den er allerede definert");
|
|
15296
15302
|
}
|
|
15297
15303
|
//#endregion
|
|
15298
|
-
//#region ../elements/dist/textarea-
|
|
15299
|
-
var Xu =
|
|
15304
|
+
//#region ../elements/dist/textarea-qHtkhelz.js
|
|
15305
|
+
var Xu = Hr(class extends Ur {
|
|
15300
15306
|
constructor(e) {
|
|
15301
|
-
if (super(e), e.type !==
|
|
15307
|
+
if (super(e), e.type !== Vr.PROPERTY && e.type !== Vr.ATTRIBUTE && e.type !== Vr.BOOLEAN_ATTRIBUTE) throw Error("The `live` directive is not allowed on child or event bindings");
|
|
15302
15308
|
if (!Ci(e)) throw Error("`live` bindings can only contain a single expression");
|
|
15303
15309
|
}
|
|
15304
15310
|
render(e) {
|
|
@@ -15307,11 +15313,11 @@ var Xu = yi(class extends bi {
|
|
|
15307
15313
|
update(e, [t]) {
|
|
15308
15314
|
if (t === wr || t === K) return t;
|
|
15309
15315
|
let n = e.element, r = e.name;
|
|
15310
|
-
if (e.type ===
|
|
15316
|
+
if (e.type === Vr.PROPERTY) {
|
|
15311
15317
|
if (t === n[r]) return wr;
|
|
15312
|
-
} else if (e.type ===
|
|
15318
|
+
} else if (e.type === Vr.BOOLEAN_ATTRIBUTE) {
|
|
15313
15319
|
if (!!t === n.hasAttribute(r)) return wr;
|
|
15314
|
-
} else if (e.type ===
|
|
15320
|
+
} else if (e.type === Vr.ATTRIBUTE && n.getAttribute(r) === t + "") return wr;
|
|
15315
15321
|
return Oi(e), t;
|
|
15316
15322
|
}
|
|
15317
15323
|
}), Zu = class extends $ {
|
|
@@ -15396,7 +15402,7 @@ try {
|
|
|
15396
15402
|
console.warn("Forsøker å definere <pkt-textarea>, men den er allerede definert");
|
|
15397
15403
|
}
|
|
15398
15404
|
//#endregion
|
|
15399
|
-
//#region ../elements/dist/select-
|
|
15405
|
+
//#region ../elements/dist/select-BIgFPp42.js
|
|
15400
15406
|
var Qu = class extends $ {
|
|
15401
15407
|
constructor(...e) {
|
|
15402
15408
|
super(...e), this._optionsProp = [], this._options = [];
|
|
@@ -15547,8 +15553,8 @@ try {
|
|
|
15547
15553
|
console.warn("Forsøker å definere <pkt-select>, men den er allerede definert");
|
|
15548
15554
|
}
|
|
15549
15555
|
//#endregion
|
|
15550
|
-
//#region ../elements/dist/searchinput-
|
|
15551
|
-
var ed = class extends
|
|
15556
|
+
//#region ../elements/dist/searchinput-fPvXHu2O.js
|
|
15557
|
+
var ed = class extends bi {
|
|
15552
15558
|
constructor(...e) {
|
|
15553
15559
|
super(...e), this.appearance = "local", this.disabled = !1, this.fullwidth = !1, this.id = "", this.placeholder = "Søk…", this.value = "", this.focusModality = new gc(this, ".pkt-searchinput");
|
|
15554
15560
|
}
|
|
@@ -15685,7 +15691,7 @@ try {
|
|
|
15685
15691
|
console.warn("Forsøker å definere <pkt-searchinput>, men den er allerede definert");
|
|
15686
15692
|
}
|
|
15687
15693
|
//#endregion
|
|
15688
|
-
//#region ../elements/dist/timepicker-
|
|
15694
|
+
//#region ../elements/dist/timepicker-O0iCeJyW.js
|
|
15689
15695
|
var td = (e) => /^\d{2}:\d{2}$/.test(e) && parseInt(e.slice(0, 2), 10) <= 23 && parseInt(e.slice(3), 10) <= 59, nd = (e) => {
|
|
15690
15696
|
let [t, n] = e.split(":").map(Number);
|
|
15691
15697
|
return t * 60 + n;
|
|
@@ -15835,7 +15841,7 @@ var td = (e) => /^\d{2}:\d{2}$/.test(e) && parseInt(e.slice(0, 2), 10) <= 23 &&
|
|
|
15835
15841
|
let t = this.hoursInputRef.value;
|
|
15836
15842
|
if (!t) return;
|
|
15837
15843
|
if (this.required && !this.value) {
|
|
15838
|
-
this.internals.setValidity({ valueMissing: !0 },
|
|
15844
|
+
this.internals.setValidity({ valueMissing: !0 }, vi.forms.messages.required, t), this._setAriaInvalid(!0);
|
|
15839
15845
|
return;
|
|
15840
15846
|
}
|
|
15841
15847
|
if (!this.value) {
|
|
@@ -15844,15 +15850,15 @@ var td = (e) => /^\d{2}:\d{2}$/.test(e) && parseInt(e.slice(0, 2), 10) <= 23 &&
|
|
|
15844
15850
|
}
|
|
15845
15851
|
let n = nd(this.value), r = rd(this.step);
|
|
15846
15852
|
if (this.min && n < nd(String(this.min))) {
|
|
15847
|
-
this.internals.setValidity({ rangeUnderflow: !0 },
|
|
15853
|
+
this.internals.setValidity({ rangeUnderflow: !0 }, vi.forms.messages.rangeUnderflowMin.replace("{min}", String(this.min)), t), this._setAriaInvalid(!0);
|
|
15848
15854
|
return;
|
|
15849
15855
|
}
|
|
15850
15856
|
if (this.max && n > nd(String(this.max))) {
|
|
15851
|
-
this.internals.setValidity({ rangeOverflow: !0 },
|
|
15857
|
+
this.internals.setValidity({ rangeOverflow: !0 }, vi.forms.messages.rangeOverflowMax.replace("{max}", String(this.max)), t), this._setAriaInvalid(!0);
|
|
15852
15858
|
return;
|
|
15853
15859
|
}
|
|
15854
15860
|
if (this.step && n % r !== 0) {
|
|
15855
|
-
let e = r === 60 ?
|
|
15861
|
+
let e = r === 60 ? vi.forms.messages.timeStepMismatchHour : r === 30 ? vi.forms.messages.timeStepMismatchHalfHour : vi.forms.messages.timeStepMismatch.replace("{step}", `${r}, ${r * 2}, ${r * 3}`);
|
|
15856
15862
|
this.internals.setValidity({ stepMismatch: !0 }, e, t), this._setAriaInvalid(!0);
|
|
15857
15863
|
return;
|
|
15858
15864
|
}
|
|
@@ -18617,7 +18623,7 @@ var cp = o(({ mobileBreakpoint: e = 768, tabletBreakpoint: t = 1280, children: n
|
|
|
18617
18623
|
children: /* @__PURE__ */ v(N, {
|
|
18618
18624
|
name: "oslologo",
|
|
18619
18625
|
"aria-hidden": "true",
|
|
18620
|
-
path: "https://punkt-cdn.oslo.kommune.no/16.
|
|
18626
|
+
path: "https://punkt-cdn.oslo.kommune.no/16.19/logos/"
|
|
18621
18627
|
})
|
|
18622
18628
|
}) : re ? /* @__PURE__ */ v("button", {
|
|
18623
18629
|
"aria-label": "Tilbake til forside",
|
|
@@ -18626,12 +18632,12 @@ var cp = o(({ mobileBreakpoint: e = 768, tabletBreakpoint: t = 1280, children: n
|
|
|
18626
18632
|
children: /* @__PURE__ */ v(N, {
|
|
18627
18633
|
name: "oslologo",
|
|
18628
18634
|
"aria-hidden": "true",
|
|
18629
|
-
path: "https://punkt-cdn.oslo.kommune.no/16.
|
|
18635
|
+
path: "https://punkt-cdn.oslo.kommune.no/16.19/logos/"
|
|
18630
18636
|
})
|
|
18631
18637
|
}) : /* @__PURE__ */ v(N, {
|
|
18632
18638
|
name: "oslologo",
|
|
18633
18639
|
"aria-hidden": "true",
|
|
18634
|
-
path: "https://punkt-cdn.oslo.kommune.no/16.
|
|
18640
|
+
path: "https://punkt-cdn.oslo.kommune.no/16.19/logos/"
|
|
18635
18641
|
})
|
|
18636
18642
|
}), T && /* @__PURE__ */ v("span", {
|
|
18637
18643
|
className: "pkt-header-service__service-name",
|
|
@@ -19052,27 +19058,46 @@ var vp = ({ dataUrl: e = Ed, data: t, locale: n = "nb-NO", open: r = !1, mobileB
|
|
|
19052
19058
|
"aria-hidden": "true"
|
|
19053
19059
|
}) : /* @__PURE__ */ v("span", { children: e.text })
|
|
19054
19060
|
}) });
|
|
19055
|
-
}, Dp =
|
|
19056
|
-
|
|
19057
|
-
|
|
19058
|
-
|
|
19059
|
-
|
|
19060
|
-
|
|
19061
|
-
|
|
19062
|
-
|
|
19063
|
-
|
|
19064
|
-
|
|
19065
|
-
})
|
|
19066
|
-
|
|
19061
|
+
}, Dp = (e) => {
|
|
19062
|
+
switch (e) {
|
|
19063
|
+
case 1: return "xlarge";
|
|
19064
|
+
case 2: return "large";
|
|
19065
|
+
case 3: return "medium";
|
|
19066
|
+
case 4: return "small";
|
|
19067
|
+
case 5:
|
|
19068
|
+
case 6: return "xsmall";
|
|
19069
|
+
default: return "medium";
|
|
19070
|
+
}
|
|
19071
|
+
}, Op = (e) => {
|
|
19072
|
+
switch (e) {
|
|
19073
|
+
case 1:
|
|
19074
|
+
case 2: return "regular";
|
|
19075
|
+
case 3:
|
|
19076
|
+
case 4:
|
|
19077
|
+
case 5:
|
|
19078
|
+
case 6: return "medium";
|
|
19079
|
+
default: return "medium";
|
|
19080
|
+
}
|
|
19081
|
+
}, kp = o(function({ level: e = 2, size: t, weight: n, visuallyHidden: r, align: i, className: a, children: o, ...s }, c) {
|
|
19082
|
+
let l = t ?? Dp(e), u = n ?? Op(e), d = (0, j.default)("pkt-heading", `pkt-heading--${l}`, `pkt-heading--fw-${u}`, i && `pkt-heading--${i}`, r && "pkt-sr-only", a);
|
|
19083
|
+
return /* @__PURE__ */ v(`h${e}`, {
|
|
19084
|
+
...s,
|
|
19085
|
+
ref: c,
|
|
19086
|
+
className: d,
|
|
19087
|
+
"data-testid": "pkt-heading",
|
|
19088
|
+
children: o
|
|
19089
|
+
});
|
|
19090
|
+
});
|
|
19091
|
+
kp.displayName = "PktHeading";
|
|
19067
19092
|
//#endregion
|
|
19068
19093
|
//#region src/components/helptext/Helptext.tsx
|
|
19069
|
-
var
|
|
19094
|
+
var Ap = nr({
|
|
19070
19095
|
tagName: "pkt-helptext",
|
|
19071
19096
|
elementClass: hc,
|
|
19072
19097
|
react: e,
|
|
19073
19098
|
displayName: "PktHelptext",
|
|
19074
19099
|
events: { onToggleHelpText: "toggleHelpText" }
|
|
19075
|
-
}),
|
|
19100
|
+
}), jp = o(({ children: e, ...t }, n) => /* @__PURE__ */ v(Ap, {
|
|
19076
19101
|
...t,
|
|
19077
19102
|
ref: n,
|
|
19078
19103
|
children: /* @__PURE__ */ v("div", {
|
|
@@ -19080,10 +19105,10 @@ var kp = nr({
|
|
|
19080
19105
|
children: e
|
|
19081
19106
|
})
|
|
19082
19107
|
}));
|
|
19083
|
-
|
|
19108
|
+
jp.displayName = "PktHelptext";
|
|
19084
19109
|
//#endregion
|
|
19085
19110
|
//#region src/components/input/Input.tsx
|
|
19086
|
-
var
|
|
19111
|
+
var Mp = o(({ label: e, id: t, children: n, ...r }, i) => /* @__PURE__ */ y("div", {
|
|
19087
19112
|
className: "pkt-form-group",
|
|
19088
19113
|
children: [
|
|
19089
19114
|
/* @__PURE__ */ v("label", {
|
|
@@ -19100,10 +19125,10 @@ var jp = o(({ label: e, id: t, children: n, ...r }, i) => /* @__PURE__ */ y("div
|
|
|
19100
19125
|
n
|
|
19101
19126
|
]
|
|
19102
19127
|
}));
|
|
19103
|
-
|
|
19128
|
+
Mp.displayName = "PktInput";
|
|
19104
19129
|
//#endregion
|
|
19105
19130
|
//#region src/components/linkcard/LinkCard.tsx
|
|
19106
|
-
var
|
|
19131
|
+
var Np = ({ children: e, skin: t, title: n, href: r, iconName: i, openInNewTab: a, external: o, className: s, ...c }) => {
|
|
19107
19132
|
let l = ["pkt-linkcard", t && `pkt-linkcard--${t}`].filter(Boolean).join(" "), u = ["pkt-linkcard__title", o && "pkt-link pkt-link--external"].filter(Boolean).join(" ");
|
|
19108
19133
|
return /* @__PURE__ */ y("a", {
|
|
19109
19134
|
...c,
|
|
@@ -19127,16 +19152,16 @@ var Mp = ({ children: e, skin: t, title: n, href: r, iconName: i, openInNewTab:
|
|
|
19127
19152
|
]
|
|
19128
19153
|
});
|
|
19129
19154
|
};
|
|
19130
|
-
|
|
19155
|
+
Np.displayName = "PktLinkCard";
|
|
19131
19156
|
//#endregion
|
|
19132
19157
|
//#region src/components/loader/Loader.tsx
|
|
19133
|
-
var
|
|
19158
|
+
var Pp = nr({
|
|
19134
19159
|
tagName: "pkt-loader",
|
|
19135
19160
|
elementClass: Fu,
|
|
19136
19161
|
react: e,
|
|
19137
19162
|
displayName: "PktLoader",
|
|
19138
19163
|
events: {}
|
|
19139
|
-
}),
|
|
19164
|
+
}), Fp = o(({ children: e, ...t }, n) => /* @__PURE__ */ v(Pp, {
|
|
19140
19165
|
...t,
|
|
19141
19166
|
ref: n,
|
|
19142
19167
|
children: /* @__PURE__ */ v("div", {
|
|
@@ -19144,10 +19169,10 @@ var Np = nr({
|
|
|
19144
19169
|
children: e
|
|
19145
19170
|
})
|
|
19146
19171
|
}));
|
|
19147
|
-
|
|
19172
|
+
Fp.displayName = "PktLoader";
|
|
19148
19173
|
//#endregion
|
|
19149
19174
|
//#region src/components/messagebox/Messagebox.tsx
|
|
19150
|
-
var
|
|
19175
|
+
var Ip = ({ children: e, className: t, skin: n, title: r, compact: i, closable: o, onClose: s, ...l }) => {
|
|
19151
19176
|
let [u, d] = g(!1), f = {
|
|
19152
19177
|
"pkt-messagebox": !0,
|
|
19153
19178
|
"pkt-messagebox--compact": i,
|
|
@@ -19185,10 +19210,10 @@ var Fp = ({ children: e, className: t, skin: n, title: r, compact: i, closable:
|
|
|
19185
19210
|
]
|
|
19186
19211
|
});
|
|
19187
19212
|
};
|
|
19188
|
-
|
|
19213
|
+
Ip.displayName = "PktMessagebox";
|
|
19189
19214
|
//#endregion
|
|
19190
19215
|
//#region src/components/radio/RadioButton.tsx
|
|
19191
|
-
var
|
|
19216
|
+
var Lp = o(({ id: e, name: t, label: n, className: r, hasTile: i = !1, disabled: a = !1, checkHelptext: o, hasError: s = !1, defaultChecked: c, checked: l, optionalTag: u, optionalText: d, requiredTag: f, requiredText: p, tagText: m, ...h }, g) => {
|
|
19192
19217
|
let b = [r, "pkt-input-check"].filter(Boolean).join(" "), x = [
|
|
19193
19218
|
"pkt-input-check__input",
|
|
19194
19219
|
i ? "pkt-input-check__input--tile" : "",
|
|
@@ -19240,10 +19265,10 @@ var Ip = o(({ id: e, name: t, label: n, className: r, hasTile: i = !1, disabled:
|
|
|
19240
19265
|
})
|
|
19241
19266
|
});
|
|
19242
19267
|
});
|
|
19243
|
-
|
|
19268
|
+
Lp.displayName = "PktRadioButton";
|
|
19244
19269
|
//#endregion
|
|
19245
19270
|
//#region src/components/searchinput/SearchInput.tsx
|
|
19246
|
-
var
|
|
19271
|
+
var Rp = o(({ appearance: e = "local", disabled: t = !1, fullwidth: n = !1, id: r, label: i, name: a, placeholder: o = "Søk…", suggestions: s, value: c = "", action: l, method: u, onChange: d, onSearch: f, onSuggestionClick: p, ...m }, h) => {
|
|
19247
19272
|
let g = (e, t) => {
|
|
19248
19273
|
e ? e() : p && p(t);
|
|
19249
19274
|
}, b = (e) => {
|
|
@@ -19327,10 +19352,10 @@ var Lp = o(({ appearance: e = "local", disabled: t = !1, fullwidth: n = !1, id:
|
|
|
19327
19352
|
})
|
|
19328
19353
|
] }));
|
|
19329
19354
|
});
|
|
19330
|
-
|
|
19355
|
+
Rp.displayName = "PktSearchInput";
|
|
19331
19356
|
//#endregion
|
|
19332
19357
|
//#region src/components/select/Select.tsx
|
|
19333
|
-
var
|
|
19358
|
+
var zp = o(({ ariaDescribedby: e, ariaLabelledby: t, children: n, className: r, disabled: i = !1, errorMessage: a, hasError: o, helptext: s, helptextDropdown: c, helptextDropdownButton: l, id: u, inline: d = !1, fullwidth: f = !1, label: p, name: m, optionalTag: h = !1, optionalText: g, requiredTag: _ = !1, requiredText: y, tagText: b, ...x }, S) => /* @__PURE__ */ v(Dn, {
|
|
19334
19359
|
className: [r, "pkt-select"].join(" "),
|
|
19335
19360
|
forId: `${u}-input`,
|
|
19336
19361
|
label: p,
|
|
@@ -19360,10 +19385,10 @@ var Rp = o(({ ariaDescribedby: e, ariaLabelledby: t, children: n, className: r,
|
|
|
19360
19385
|
children: n
|
|
19361
19386
|
})
|
|
19362
19387
|
}));
|
|
19363
|
-
|
|
19388
|
+
zp.displayName = "PktSelect";
|
|
19364
19389
|
//#endregion
|
|
19365
19390
|
//#region src/components/stepper/Step.tsx
|
|
19366
|
-
var
|
|
19391
|
+
var Bp = /* @__PURE__ */ v("svg", {
|
|
19367
19392
|
xmlns: "http://www.w3.org/2000/svg",
|
|
19368
19393
|
width: "24",
|
|
19369
19394
|
height: "24",
|
|
@@ -19374,7 +19399,7 @@ var zp = /* @__PURE__ */ v("svg", {
|
|
|
19374
19399
|
r: "7",
|
|
19375
19400
|
style: { fill: "var(--pkt-color-grays-grey-200, #CCC)" }
|
|
19376
19401
|
})
|
|
19377
|
-
}),
|
|
19402
|
+
}), Vp = /* @__PURE__ */ y("svg", {
|
|
19378
19403
|
xmlns: "http://www.w3.org/2000/svg",
|
|
19379
19404
|
width: "24",
|
|
19380
19405
|
height: "24",
|
|
@@ -19391,7 +19416,7 @@ var zp = /* @__PURE__ */ v("svg", {
|
|
|
19391
19416
|
r: "6",
|
|
19392
19417
|
fill: "#2A2859"
|
|
19393
19418
|
})]
|
|
19394
|
-
}),
|
|
19419
|
+
}), Hp = /* @__PURE__ */ y("svg", {
|
|
19395
19420
|
xmlns: "http://www.w3.org/2000/svg",
|
|
19396
19421
|
width: "24",
|
|
19397
19422
|
height: "24",
|
|
@@ -19403,7 +19428,7 @@ var zp = /* @__PURE__ */ v("svg", {
|
|
|
19403
19428
|
d: "m10.34 16-1.11-1.14L7 12.58l1.11-1.15 2.23 2.28L15.88 8 17 9.15l-5.55 5.71L10.34 16Z",
|
|
19404
19429
|
fill: "#F1FDFF"
|
|
19405
19430
|
})]
|
|
19406
|
-
}),
|
|
19431
|
+
}), Up = ({ children: e, className: t, status: n = "incomplete", title: r }) => /* @__PURE__ */ y("li", {
|
|
19407
19432
|
className: (0, j.default)("pkt-step", t, `pkt-step--${n}`),
|
|
19408
19433
|
"data-testid": "pkt-step",
|
|
19409
19434
|
children: [
|
|
@@ -19417,7 +19442,7 @@ var zp = /* @__PURE__ */ v("svg", {
|
|
|
19417
19442
|
}),
|
|
19418
19443
|
/* @__PURE__ */ v("span", {
|
|
19419
19444
|
className: (0, j.default)("pkt-step__indicator"),
|
|
19420
|
-
children: n === "current" ?
|
|
19445
|
+
children: n === "current" ? Vp : n === "completed" ? Hp : Bp
|
|
19421
19446
|
}),
|
|
19422
19447
|
/* @__PURE__ */ v("span", {
|
|
19423
19448
|
className: "pkt-step__line pkt-step__line--3",
|
|
@@ -19434,7 +19459,7 @@ var zp = /* @__PURE__ */ v("svg", {
|
|
|
19434
19459
|
})]
|
|
19435
19460
|
})
|
|
19436
19461
|
]
|
|
19437
|
-
}),
|
|
19462
|
+
}), Wp = o(({ activeStep: e, className: n, children: i, hideNonActiveSteps: a = !1, hideNonActiveStepsContent: o = !0, orientation: c = "vertical", ...l }, u) => {
|
|
19438
19463
|
let d = (0, j.default)(n, "pkt-stepper", c === "horizontal" ? "pkt-stepper--horizontal" : "pkt-stepper--vertical"), f = t.map(i, (t, n) => s(t) ? r(t, { className: (0, j.default)(t.props.className, {
|
|
19439
19464
|
"pkt-step--hideStep": a && n !== e,
|
|
19440
19465
|
"pkt-step--hideContent": o && n !== e
|
|
@@ -19447,10 +19472,10 @@ var zp = /* @__PURE__ */ v("svg", {
|
|
|
19447
19472
|
children: f
|
|
19448
19473
|
});
|
|
19449
19474
|
});
|
|
19450
|
-
|
|
19475
|
+
Wp.displayName = "PktStepper";
|
|
19451
19476
|
//#endregion
|
|
19452
19477
|
//#region src/components/table/Table.tsx
|
|
19453
|
-
var
|
|
19478
|
+
var Gp = ({ className: e, compact: t = !1, skin: n = "basic", responsiveView: r = !0, children: i, ...a }) => /* @__PURE__ */ v("table", {
|
|
19454
19479
|
"data-testid": "pkt-table",
|
|
19455
19480
|
className: (0, j.default)(e, "pkt-table", {
|
|
19456
19481
|
"pkt-table--responsive": r,
|
|
@@ -19461,36 +19486,36 @@ var Wp = ({ className: e, compact: t = !1, skin: n = "basic", responsiveView: r
|
|
|
19461
19486
|
role: "table",
|
|
19462
19487
|
...a,
|
|
19463
19488
|
children: i
|
|
19464
|
-
}),
|
|
19489
|
+
}), Kp = ({ id: e, children: t, className: n, ...r }) => /* @__PURE__ */ v("tbody", {
|
|
19465
19490
|
id: e,
|
|
19466
19491
|
className: (0, j.default)(n, "pkt-table__body", {}),
|
|
19467
19492
|
...r,
|
|
19468
19493
|
role: "rowgroup",
|
|
19469
19494
|
children: t
|
|
19470
|
-
}),
|
|
19495
|
+
}), qp = ({ children: e, className: t, dataLabel: n, ...r }) => /* @__PURE__ */ v("td", {
|
|
19471
19496
|
className: (0, j.default)(t, "pkt-table__data-cell", {}),
|
|
19472
19497
|
"data-label": n,
|
|
19473
19498
|
role: "cell",
|
|
19474
19499
|
"data-testid": "pkt-table__data-cell",
|
|
19475
19500
|
...r,
|
|
19476
19501
|
children: e
|
|
19477
|
-
}),
|
|
19502
|
+
}), Jp = ({ className: e, children: t, ...n }) => /* @__PURE__ */ v("thead", {
|
|
19478
19503
|
className: (0, j.default)(e, "pkt-table__header", {}),
|
|
19479
19504
|
role: "rowgroup",
|
|
19480
19505
|
...n,
|
|
19481
19506
|
children: t
|
|
19482
|
-
}),
|
|
19507
|
+
}), Yp = ({ className: e, children: t, ...n }) => /* @__PURE__ */ v("th", {
|
|
19483
19508
|
className: (0, j.default)(e, "pkt-table__header-cell", {}),
|
|
19484
19509
|
role: "columnheader",
|
|
19485
19510
|
...n,
|
|
19486
19511
|
children: t
|
|
19487
|
-
}),
|
|
19512
|
+
}), Xp = ({ className: e, children: t, ...n }) => /* @__PURE__ */ v("tr", {
|
|
19488
19513
|
className: (0, j.default)(e, "pkt-table__row", {}),
|
|
19489
19514
|
role: "row",
|
|
19490
19515
|
...n,
|
|
19491
19516
|
children: t
|
|
19492
|
-
}),
|
|
19493
|
-
let { arrowNav: d, registerTabRef: f, handleKeyPress: p, selectTab: m } =
|
|
19517
|
+
}), Zp = o(({ children: e, active: t, disabled: n = !1, href: r, onClick: i, icon: a, controls: o, tag: s, tagSkin: c, index: l = 0 }, u) => {
|
|
19518
|
+
let { arrowNav: d, registerTabRef: f, handleKeyPress: p, selectTab: m } = $p(), h = !!t && !n, g = {
|
|
19494
19519
|
"aria-selected": d ? h : void 0,
|
|
19495
19520
|
"aria-controls": o,
|
|
19496
19521
|
role: d ? "tab" : void 0,
|
|
@@ -19539,14 +19564,14 @@ var Wp = ({ className: e, compact: t = !1, skin: n = "basic", responsiveView: r
|
|
|
19539
19564
|
children: b
|
|
19540
19565
|
});
|
|
19541
19566
|
});
|
|
19542
|
-
|
|
19567
|
+
Zp.displayName = "PktTabItem";
|
|
19543
19568
|
//#endregion
|
|
19544
19569
|
//#region src/components/tabs/Tabs.tsx
|
|
19545
|
-
var
|
|
19546
|
-
let e = l(
|
|
19570
|
+
var Qp = i(null), $p = () => {
|
|
19571
|
+
let e = l(Qp);
|
|
19547
19572
|
if (!e) throw Error("TabItem must be used within a Tabs component");
|
|
19548
19573
|
return e;
|
|
19549
|
-
},
|
|
19574
|
+
}, em = o(({ arrowNav: e = !0, disableArrowNav: n = !1, separatorIconName: r, separatorIconPath: i, tabs: a, onTabSelected: o, children: s }, c) => {
|
|
19550
19575
|
let l = h([]), d = h({}), f = e && !n, p = t.toArray(s), m = p.length > 0, g = m ? p.length : a?.length || 0, _ = !!(r || i);
|
|
19551
19576
|
u(() => {
|
|
19552
19577
|
l.current = l.current.slice(0, g), Object.keys(d.current).forEach((e) => {
|
|
@@ -19593,7 +19618,7 @@ var Zp = i(null), Qp = () => {
|
|
|
19593
19618
|
name: r,
|
|
19594
19619
|
className: "pkt-tabs__separator-icon"
|
|
19595
19620
|
}) : null
|
|
19596
|
-
}, e), T = (e) => !_ || e.length <= 1 ? e : e.flatMap((t, n) => n < e.length - 1 ? [t, w(`separator-${n}`)] : [t]), E = a?.map((e, t) => /* @__PURE__ */ v(
|
|
19621
|
+
}, e), T = (e) => !_ || e.length <= 1 ? e : e.flatMap((t, n) => n < e.length - 1 ? [t, w(`separator-${n}`)] : [t]), E = a?.map((e, t) => /* @__PURE__ */ v(Zp, {
|
|
19597
19622
|
active: e.disabled ? !1 : e.active,
|
|
19598
19623
|
disabled: e.disabled,
|
|
19599
19624
|
href: e.href,
|
|
@@ -19604,7 +19629,7 @@ var Zp = i(null), Qp = () => {
|
|
|
19604
19629
|
index: t,
|
|
19605
19630
|
children: e.text
|
|
19606
19631
|
}, t)), D = ["pkt-tabs", _ && "pkt-tabs--with-separator"].filter(Boolean).join(" "), O = T(m ? p : E || []);
|
|
19607
|
-
return /* @__PURE__ */ v(
|
|
19632
|
+
return /* @__PURE__ */ v(Qp.Provider, {
|
|
19608
19633
|
value: {
|
|
19609
19634
|
arrowNav: f,
|
|
19610
19635
|
registerTabRef: C,
|
|
@@ -19622,25 +19647,25 @@ var Zp = i(null), Qp = () => {
|
|
|
19622
19647
|
})
|
|
19623
19648
|
});
|
|
19624
19649
|
});
|
|
19625
|
-
|
|
19650
|
+
em.displayName = "PktTabs";
|
|
19626
19651
|
//#endregion
|
|
19627
19652
|
//#region ../../shared-utils/timepicker/options.ts
|
|
19628
|
-
var
|
|
19653
|
+
var tm = (e) => e ? Math.max(1, Math.round(e / 60)) : 1, nm = (e, t) => {
|
|
19629
19654
|
let n = e ? parseInt(String(e).split(":")[0], 10) : 0, r = t ? parseInt(String(t).split(":")[0], 10) : 23;
|
|
19630
19655
|
return Array.from({ length: r - n + 1 }, (e, t) => t + n);
|
|
19631
|
-
},
|
|
19632
|
-
let t =
|
|
19656
|
+
}, rm = (e) => {
|
|
19657
|
+
let t = tm(e);
|
|
19633
19658
|
return Array.from({ length: Math.floor(60 / t) }, (e, n) => n * t);
|
|
19634
|
-
},
|
|
19659
|
+
}, im = (e, t, n, r) => {
|
|
19635
19660
|
let i = e === "" ? n === 1 ? 0 : 23 : parseInt(e, 10), a = t === "" ? n === 1 ? 0 : Math.floor(59 / r) * r : parseInt(t, 10);
|
|
19636
19661
|
return a += n * r, a > 59 ? (a = 0, i = (i + 1) % 24) : a < 0 && (a = Math.floor(59 / r) * r, i = (i - 1 + 24) % 24), {
|
|
19637
19662
|
hours: String(i).padStart(2, "0"),
|
|
19638
19663
|
minutes: String(a).padStart(2, "0")
|
|
19639
19664
|
};
|
|
19640
|
-
},
|
|
19665
|
+
}, am = (e) => /^\d{2}:\d{2}$/.test(e) && parseInt(e.slice(0, 2), 10) <= 23 && parseInt(e.slice(3), 10) <= 59, om = (e) => {
|
|
19641
19666
|
let [t, n] = e.split(":").map(Number);
|
|
19642
19667
|
return t * 60 + n;
|
|
19643
|
-
},
|
|
19668
|
+
}, sm = {
|
|
19644
19669
|
required: "Dette feltet er påkrevd",
|
|
19645
19670
|
invalid: "Ugyldig verdi",
|
|
19646
19671
|
timeStepMismatch: "Må treffe på et steg, for eksempel 0, {step} minutter",
|
|
@@ -19649,44 +19674,44 @@ var em = (e) => e ? Math.max(1, Math.round(e / 60)) : 1, tm = (e, t) => {
|
|
|
19649
19674
|
rangeUnderflowMin: "Verdien må være større enn eller lik {min}.",
|
|
19650
19675
|
rangeOverflowMax: "Verdien må være mindre enn eller lik {max}."
|
|
19651
19676
|
};
|
|
19652
|
-
function
|
|
19653
|
-
if (e &&
|
|
19677
|
+
function cm(e) {
|
|
19678
|
+
if (e && am(e)) {
|
|
19654
19679
|
let [t, n] = e.split(":");
|
|
19655
19680
|
return [t, n];
|
|
19656
19681
|
}
|
|
19657
19682
|
return ["", ""];
|
|
19658
19683
|
}
|
|
19659
|
-
function
|
|
19684
|
+
function lm(e, t) {
|
|
19660
19685
|
return `${String(parseInt(e, 10)).padStart(2, "0")}:${String(parseInt(t, 10)).padStart(2, "0")}`;
|
|
19661
19686
|
}
|
|
19662
|
-
function
|
|
19687
|
+
function um(e, t) {
|
|
19663
19688
|
let { required: n, min: r, max: i, step: a } = t;
|
|
19664
19689
|
if (n && !e) return {
|
|
19665
19690
|
valid: !1,
|
|
19666
|
-
message:
|
|
19691
|
+
message: sm.required
|
|
19667
19692
|
};
|
|
19668
19693
|
if (!e) return { valid: !0 };
|
|
19669
|
-
if (!
|
|
19694
|
+
if (!am(e)) return {
|
|
19670
19695
|
valid: !1,
|
|
19671
|
-
message:
|
|
19696
|
+
message: sm.invalid
|
|
19672
19697
|
};
|
|
19673
|
-
let o =
|
|
19674
|
-
return r && o <
|
|
19698
|
+
let o = om(e), s = tm(a);
|
|
19699
|
+
return r && o < om(String(r)) ? {
|
|
19675
19700
|
valid: !1,
|
|
19676
|
-
message:
|
|
19677
|
-
} : i && o >
|
|
19701
|
+
message: sm.rangeUnderflowMin.replace("{min}", String(r))
|
|
19702
|
+
} : i && o > om(String(i)) ? {
|
|
19678
19703
|
valid: !1,
|
|
19679
|
-
message:
|
|
19704
|
+
message: sm.rangeOverflowMax.replace("{max}", String(i))
|
|
19680
19705
|
} : a && o % s !== 0 ? {
|
|
19681
19706
|
valid: !1,
|
|
19682
|
-
message: s === 60 ?
|
|
19707
|
+
message: s === 60 ? sm.timeStepMismatchHour : s === 30 ? sm.timeStepMismatchHalfHour : sm.timeStepMismatch.replace("{step}", `${s}, ${s * 2}, ${s * 3}`)
|
|
19683
19708
|
} : { valid: !0 };
|
|
19684
19709
|
}
|
|
19685
|
-
function
|
|
19710
|
+
function dm(e) {
|
|
19686
19711
|
return e === 3600 || e < 3600 && 3600 % e == 0 && e % 60 == 0;
|
|
19687
19712
|
}
|
|
19688
|
-
function
|
|
19689
|
-
let { id: n, label: r, value: i, defaultValue: a, min: o, max: s, step: l = 60, hidePicker: d = !1, stepArrows: _ = !1, fullwidth: v = !1, name: y, disabled: b = !1, required: x = !1, helptext: S, helptextDropdown: C, helptextDropdownButton: w, hasError: T = !1, errorMessage: E, optionalTag: D = !1, optionalText: O, requiredTag: k = !1, requiredText: ee, tagText: te, inline: A = !1, useWrapper: j = !0, ariaDescribedby: ne, strings: re, className: ie, onValueChange: ae, onFocus: oe, onBlur: se } = e, ce = m(() => re ?? Dd, [re]), le = i !== void 0, ue = i === void 0 ? a ?? "" : i ?? "", de = h(ue), [M, fe] = g(() => ue), N = le ? i ?? "" : M, [P, F] = g(() =>
|
|
19713
|
+
function fm(e, t) {
|
|
19714
|
+
let { id: n, label: r, value: i, defaultValue: a, min: o, max: s, step: l = 60, hidePicker: d = !1, stepArrows: _ = !1, fullwidth: v = !1, name: y, disabled: b = !1, required: x = !1, helptext: S, helptextDropdown: C, helptextDropdownButton: w, hasError: T = !1, errorMessage: E, optionalTag: D = !1, optionalText: O, requiredTag: k = !1, requiredText: ee, tagText: te, inline: A = !1, useWrapper: j = !0, ariaDescribedby: ne, strings: re, className: ie, onValueChange: ae, onFocus: oe, onBlur: se } = e, ce = m(() => re ?? Dd, [re]), le = i !== void 0, ue = i === void 0 ? a ?? "" : i ?? "", de = h(ue), [M, fe] = g(() => ue), N = le ? i ?? "" : M, [P, F] = g(() => cm(i === void 0 ? a : i)[0]), [pe, I] = g(() => cm(i === void 0 ? a : i)[1]), L = h(P), R = h(pe), z = c((e) => {
|
|
19690
19715
|
L.current = e, F(e);
|
|
19691
19716
|
}, []), me = c((e) => {
|
|
19692
19717
|
R.current = e, I(e);
|
|
@@ -19694,7 +19719,7 @@ function dm(e, t) {
|
|
|
19694
19719
|
u(() => {
|
|
19695
19720
|
if (!le || i === V.current) return;
|
|
19696
19721
|
V.current = i;
|
|
19697
|
-
let [e, t] =
|
|
19722
|
+
let [e, t] = cm(i);
|
|
19698
19723
|
z(e), me(t);
|
|
19699
19724
|
}, [
|
|
19700
19725
|
i,
|
|
@@ -19702,13 +19727,13 @@ function dm(e, t) {
|
|
|
19702
19727
|
z,
|
|
19703
19728
|
me
|
|
19704
19729
|
]), u(() => {
|
|
19705
|
-
l != null && !
|
|
19730
|
+
l != null && !dm(l) && console.warn(`PktTimepicker: step="${l}" er ikke en gyldig verdi. Step må være et multiplum av 60 (hele minutter) eller nøyaktig 3600 (hel time).`);
|
|
19706
19731
|
}, [l]);
|
|
19707
|
-
let H = h(null), ve = h(null), U = h(null), ye = h(null), be = h(null), W = h(null), xe = h(0), Se = h(-1), Ce = h(0), we = h(-1), [Te, Ee] = g(!1), De = m(() => Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, "value")?.set, []), Oe = m(() =>
|
|
19732
|
+
let H = h(null), ve = h(null), U = h(null), ye = h(null), be = h(null), W = h(null), xe = h(0), Se = h(-1), Ce = h(0), we = h(-1), [Te, Ee] = g(!1), De = m(() => Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, "value")?.set, []), Oe = m(() => tm(l), [l]), ke = m(() => nm(o, s), [o, s]), Ae = m(() => rm(l), [l]), je = `${n}-hours`, Me = `${n}-minutes`, Ne = `${n}-popup`, Pe = `${n}-input`;
|
|
19708
19733
|
u(() => {
|
|
19709
19734
|
let e = H.current;
|
|
19710
19735
|
if (!e) return;
|
|
19711
|
-
let t =
|
|
19736
|
+
let t = um(N, {
|
|
19712
19737
|
required: x,
|
|
19713
19738
|
min: o,
|
|
19714
19739
|
max: s,
|
|
@@ -19734,20 +19759,20 @@ function dm(e, t) {
|
|
|
19734
19759
|
]), Ie = c(() => {
|
|
19735
19760
|
let e = L.current, t = R.current;
|
|
19736
19761
|
if (e !== "" && t !== "") {
|
|
19737
|
-
let n =
|
|
19762
|
+
let n = lm(e, t);
|
|
19738
19763
|
n !== N && Fe(n);
|
|
19739
19764
|
} else N !== "" && Fe("");
|
|
19740
19765
|
}, [N, Fe]), Le = c(() => {
|
|
19741
19766
|
let e = L.current, t = R.current;
|
|
19742
19767
|
if (e !== "" && t !== "") {
|
|
19743
|
-
let n =
|
|
19768
|
+
let n = lm(e, t);
|
|
19744
19769
|
n === N ? W.current?.dispatchEvent(new Event("input", { bubbles: !0 })) : Fe(n);
|
|
19745
19770
|
} else N === "" ? W.current?.dispatchEvent(new Event("input", { bubbles: !0 })) : Fe("");
|
|
19746
19771
|
}, [N, Fe]), Re = c(() => {
|
|
19747
19772
|
Ee(!0), Ie();
|
|
19748
19773
|
let e = H.current, t = W.current;
|
|
19749
19774
|
if (!e) return;
|
|
19750
|
-
let n =
|
|
19775
|
+
let n = um(t?.value ?? "", {
|
|
19751
19776
|
required: x,
|
|
19752
19777
|
min: o,
|
|
19753
19778
|
max: s,
|
|
@@ -19820,7 +19845,7 @@ function dm(e, t) {
|
|
|
19820
19845
|
z,
|
|
19821
19846
|
me
|
|
19822
19847
|
]), He = c((e) => {
|
|
19823
|
-
let t =
|
|
19848
|
+
let t = im(L.current, R.current, e, Oe);
|
|
19824
19849
|
z(t.hours), me(t.minutes), `${t.hours}:${t.minutes}` !== N && Fe(`${t.hours}:${t.minutes}`);
|
|
19825
19850
|
}, [
|
|
19826
19851
|
Oe,
|
|
@@ -20027,7 +20052,7 @@ function dm(e, t) {
|
|
|
20027
20052
|
set value(e) {
|
|
20028
20053
|
let t = e ?? "";
|
|
20029
20054
|
le || fe(t);
|
|
20030
|
-
let [n, r] =
|
|
20055
|
+
let [n, r] = cm(t);
|
|
20031
20056
|
z(n), me(r), W.current && (W.current.value = t);
|
|
20032
20057
|
},
|
|
20033
20058
|
focus() {
|
|
@@ -20045,7 +20070,7 @@ function dm(e, t) {
|
|
|
20045
20070
|
if (!e) return;
|
|
20046
20071
|
let t = () => {
|
|
20047
20072
|
window.setTimeout(() => {
|
|
20048
|
-
let e = de.current, [t, n] =
|
|
20073
|
+
let e = de.current, [t, n] = cm(e);
|
|
20049
20074
|
z(t), me(n), le || fe(e), W.current && (W.current.value = e), ge(!1), Ee(!1);
|
|
20050
20075
|
}, 0);
|
|
20051
20076
|
};
|
|
@@ -20118,8 +20143,8 @@ function dm(e, t) {
|
|
|
20118
20143
|
}
|
|
20119
20144
|
//#endregion
|
|
20120
20145
|
//#region src/components/timepicker/Timepicker.tsx
|
|
20121
|
-
var
|
|
20122
|
-
let { onChange: n, onInput: r } = e, i =
|
|
20146
|
+
var pm = o((e, t) => {
|
|
20147
|
+
let { onChange: n, onInput: r } = e, i = fm(e, t), a = i.strings.hours, o = i.strings.minutes, s = i.label ? `${a}, ${i.label}` : a, c = i.label ? `${o}, ${i.label}` : o, l = (e, t) => {
|
|
20123
20148
|
let n = String(e).padStart(2, "0"), r = e === (t === "hour" ? i.hours === "" ? NaN : parseInt(i.hours, 10) : i.minutes === "" ? NaN : parseInt(i.minutes, 10));
|
|
20124
20149
|
return /* @__PURE__ */ v("button", {
|
|
20125
20150
|
type: "button",
|
|
@@ -20320,6 +20345,6 @@ var fm = o((e, t) => {
|
|
|
20320
20345
|
})
|
|
20321
20346
|
});
|
|
20322
20347
|
});
|
|
20323
|
-
|
|
20348
|
+
pm.displayName = "PktTimepicker";
|
|
20324
20349
|
//#endregion
|
|
20325
|
-
export { Yd as FileItem, Xf as ItemRenderers, A as PktAccordion, P as PktAccordionItem, pe as PktAlert, I as PktBackLink, L as PktBreadcrumbs, F as PktButton, Sn as PktCalendar, wn as PktCard, Tn as PktCheckbox, Qn as PktCombobox, cd as PktConsent, Td as PktDatepicker, Zf as PktFileUpload, Qf as PktFooter, $f as PktFooterSimple, lp as PktHeader, vp as PktHeaderMenu, cp as PktHeaderService,
|
|
20350
|
+
export { Yd as FileItem, Xf as ItemRenderers, A as PktAccordion, P as PktAccordionItem, pe as PktAlert, I as PktBackLink, L as PktBreadcrumbs, F as PktButton, Sn as PktCalendar, wn as PktCard, Tn as PktCheckbox, Qn as PktCombobox, cd as PktConsent, Td as PktDatepicker, Zf as PktFileUpload, Qf as PktFooter, $f as PktFooterSimple, lp as PktHeader, vp as PktHeaderMenu, cp as PktHeaderService, kp as PktHeading, jp as PktHelptext, N as PktIcon, Mp as PktInput, Dn as PktInputWrapper, np as PktLink, Np as PktLinkCard, Fp as PktLoader, Ip as PktMessagebox, Df as PktModal, yf as PktProgressbar, Lp as PktRadioButton, Rp as PktSearchInput, zp as PktSelect, Up as PktStep, Wp as PktStepper, Zp as PktTabItem, Gp as PktTable, Kp as PktTableBody, qp as PktTableDataCell, Jp as PktTableHeader, Yp as PktTableHeaderCell, Xp as PktTableRow, em as PktTabs, Cn as PktTag, $d as PktTextarea, sp as PktTextinput, pm as PktTimepicker };
|