@oslokommune/punkt-react 3.0.2 → 3.1.1

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 CHANGED
@@ -1,7 +1,34 @@
1
- # Change Log
1
+ # Changelog
2
2
 
3
- All notable changes to this project will be documented in this file.
4
- See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
3
+ Punkt følger [Semantic Versioning 2.0.0](https://semver.org/spec/v2.0.0.html) for versjonering,
4
+ og skriver commits ca etter [Conventional Commits](https://conventionalcommits.org).
5
+
6
+ ---
7
+
8
+ ## [3.1.1](https://github.com/oslokommune/punkt/compare/3.1.0...3.1.1) (2023-03-23)
9
+
10
+ ### ⚠ BREAKING CHANGES
11
+ Ingen
12
+
13
+ ### Features
14
+ Ingen
15
+
16
+ ### Bug Fixes
17
+ Ingen
18
+
19
+ ### Chores
20
+ * [670](https://github.com/oslokommune/punkt/issues/670) Generer changelog automatisk (#746). Changelog genereres nå automatisk utifra commits, så lenge de følger Convential commits malen.
21
+
22
+ Dette er dokumentert i [CONTRIBUTING.md](https://github.com/oslokommune/punkt/blob/main/CONTRIBUTING.md) og i [scriptet som gjør dette ved publisering](https://github.com/oslokommune/punkt/blob/main/scripts/update-changelog.js).
23
+
24
+
25
+ ---
26
+
27
+
28
+ ## [3.1.0](https://github.com/oslokommune/punkt/compare/v3.0.2...v3.1.0) (2023-03-20)
29
+
30
+ ### Features
31
+ * [#720](https://github.com/oslokommune/punkt/issues/720) Lag Messagebox i React
5
32
 
6
33
  ## [3.0.2](https://github.com/oslokommune/punkt/compare/v3.0.1...v3.0.2) (2023-03-16)
7
34
 
package/dist/index.d.ts CHANGED
@@ -2,6 +2,7 @@ export { PktAlert } from './alert/Alert';
2
2
  export { PktButton } from './button/Button';
3
3
  export { PktHeader } from './header/Header';
4
4
  export { PktInput } from './input/Input';
5
+ export { PktMessagebox } from './messagebox/Messagebox';
5
6
  export { PktTextarea } from './textarea/Textarea';
6
7
  export { PktRadio } from './radio/Radio';
7
8
  export { PktRadioGroup } from './radioGroup/RadioGroup';
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ export interface IPktMessagebox extends React.HTMLAttributes<HTMLDivElement> {
3
+ skin?: 'beige' | 'red' | 'green' | 'blue';
4
+ title?: string;
5
+ }
6
+ export declare const PktMessagebox: React.FC<IPktMessagebox>;
@@ -21,18 +21,18 @@ function vr() {
21
21
  if (Pe)
22
22
  return I;
23
23
  Pe = 1;
24
- var o = re, f = Symbol.for("react.element"), d = Symbol.for("react.fragment"), l = Object.prototype.hasOwnProperty, v = o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, u = { key: !0, ref: !0, __self: !0, __source: !0 };
24
+ var o = re, c = Symbol.for("react.element"), f = Symbol.for("react.fragment"), l = Object.prototype.hasOwnProperty, p = o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, d = { key: !0, ref: !0, __self: !0, __source: !0 };
25
25
  function k(_, m, T) {
26
- var g, R = {}, P = null, L = null;
26
+ var g, x = {}, P = null, L = null;
27
27
  T !== void 0 && (P = "" + T), m.key !== void 0 && (P = "" + m.key), m.ref !== void 0 && (L = m.ref);
28
28
  for (g in m)
29
- l.call(m, g) && !u.hasOwnProperty(g) && (R[g] = m[g]);
29
+ l.call(m, g) && !d.hasOwnProperty(g) && (x[g] = m[g]);
30
30
  if (_ && _.defaultProps)
31
31
  for (g in m = _.defaultProps, m)
32
- R[g] === void 0 && (R[g] = m[g]);
33
- return { $$typeof: f, type: _, key: P, ref: L, props: R, _owner: v.current };
32
+ x[g] === void 0 && (x[g] = m[g]);
33
+ return { $$typeof: c, type: _, key: P, ref: L, props: x, _owner: p.current };
34
34
  }
35
- return I.Fragment = d, I.jsx = k, I.jsxs = k, I;
35
+ return I.Fragment = f, I.jsx = k, I.jsxs = k, I;
36
36
  }
37
37
  var W = {};
38
38
  /**
@@ -47,7 +47,7 @@ var W = {};
47
47
  var Ne;
48
48
  function mr() {
49
49
  return Ne || (Ne = 1, process.env.NODE_ENV !== "production" && function() {
50
- var o = re, f = Symbol.for("react.element"), d = Symbol.for("react.portal"), l = Symbol.for("react.fragment"), v = Symbol.for("react.strict_mode"), u = Symbol.for("react.profiler"), k = Symbol.for("react.provider"), _ = Symbol.for("react.context"), m = Symbol.for("react.forward_ref"), T = Symbol.for("react.suspense"), g = Symbol.for("react.suspense_list"), R = Symbol.for("react.memo"), P = Symbol.for("react.lazy"), L = Symbol.for("react.offscreen"), te = Symbol.iterator, Ce = "@@iterator";
50
+ var o = re, c = Symbol.for("react.element"), f = Symbol.for("react.portal"), l = Symbol.for("react.fragment"), p = Symbol.for("react.strict_mode"), d = Symbol.for("react.profiler"), k = Symbol.for("react.provider"), _ = Symbol.for("react.context"), m = Symbol.for("react.forward_ref"), T = Symbol.for("react.suspense"), g = Symbol.for("react.suspense_list"), x = Symbol.for("react.memo"), P = Symbol.for("react.lazy"), L = Symbol.for("react.offscreen"), te = Symbol.iterator, Ce = "@@iterator";
51
51
  function je(e) {
52
52
  if (e === null || typeof e != "object")
53
53
  return null;
@@ -64,18 +64,18 @@ function mr() {
64
64
  }
65
65
  function Fe(e, r, t) {
66
66
  {
67
- var a = j.ReactDebugCurrentFrame, c = a.getStackAddendum();
68
- c !== "" && (r += "%s", t = t.concat([c]));
69
- var p = t.map(function(s) {
67
+ var a = j.ReactDebugCurrentFrame, u = a.getStackAddendum();
68
+ u !== "" && (r += "%s", t = t.concat([u]));
69
+ var v = t.map(function(s) {
70
70
  return String(s);
71
71
  });
72
- p.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, p);
72
+ v.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, v);
73
73
  }
74
74
  }
75
75
  var De = !1, Ae = !1, $e = !1, Ie = !1, We = !1, ae;
76
76
  ae = Symbol.for("react.module.reference");
77
77
  function Ye(e) {
78
- return !!(typeof e == "string" || typeof e == "function" || e === l || e === u || We || e === v || e === T || e === g || Ie || e === L || De || Ae || $e || typeof e == "object" && e !== null && (e.$$typeof === P || e.$$typeof === R || e.$$typeof === k || e.$$typeof === _ || e.$$typeof === m || // This needs to include all possible module reference object
78
+ return !!(typeof e == "string" || typeof e == "function" || e === l || e === d || We || e === p || e === T || e === g || Ie || e === L || De || Ae || $e || typeof e == "object" && e !== null && (e.$$typeof === P || e.$$typeof === x || e.$$typeof === k || e.$$typeof === _ || e.$$typeof === m || // This needs to include all possible module reference object
79
79
  // types supported by any Flight configuration anywhere since
80
80
  // we don't know which Flight build this will end up being used
81
81
  // with.
@@ -85,8 +85,8 @@ function mr() {
85
85
  var a = e.displayName;
86
86
  if (a)
87
87
  return a;
88
- var c = r.displayName || r.name || "";
89
- return c !== "" ? t + "(" + c + ")" : t;
88
+ var u = r.displayName || r.name || "";
89
+ return u !== "" ? t + "(" + u + ")" : t;
90
90
  }
91
91
  function ne(e) {
92
92
  return e.displayName || "Context";
@@ -101,11 +101,11 @@ function mr() {
101
101
  switch (e) {
102
102
  case l:
103
103
  return "Fragment";
104
- case d:
104
+ case f:
105
105
  return "Portal";
106
- case u:
106
+ case d:
107
107
  return "Profiler";
108
- case v:
108
+ case p:
109
109
  return "StrictMode";
110
110
  case T:
111
111
  return "Suspense";
@@ -122,13 +122,13 @@ function mr() {
122
122
  return ne(t._context) + ".Provider";
123
123
  case m:
124
124
  return Le(e, e.render, "ForwardRef");
125
- case R:
125
+ case x:
126
126
  var a = e.displayName || null;
127
127
  return a !== null ? a : N(e.type) || "Memo";
128
128
  case P: {
129
- var c = e, p = c._payload, s = c._init;
129
+ var u = e, v = u._payload, s = u._init;
130
130
  try {
131
- return N(s(p));
131
+ return N(s(v));
132
132
  } catch {
133
133
  return null;
134
134
  }
@@ -140,7 +140,7 @@ function mr() {
140
140
  function de() {
141
141
  }
142
142
  de.__reactDisabledLog = !0;
143
- function Ve() {
143
+ function Me() {
144
144
  {
145
145
  if (A === 0) {
146
146
  oe = console.log, ie = console.info, se = console.warn, le = console.error, ce = console.group, ue = console.groupCollapsed, fe = console.groupEnd;
@@ -163,7 +163,7 @@ function mr() {
163
163
  A++;
164
164
  }
165
165
  }
166
- function Me() {
166
+ function Ve() {
167
167
  {
168
168
  if (A--, A === 0) {
169
169
  var e = {
@@ -199,38 +199,38 @@ function mr() {
199
199
  }
200
200
  }
201
201
  var G = j.ReactCurrentDispatcher, J;
202
- function V(e, r, t) {
202
+ function M(e, r, t) {
203
203
  {
204
204
  if (J === void 0)
205
205
  try {
206
206
  throw Error();
207
- } catch (c) {
208
- var a = c.stack.trim().match(/\n( *(at )?)/);
207
+ } catch (u) {
208
+ var a = u.stack.trim().match(/\n( *(at )?)/);
209
209
  J = a && a[1] || "";
210
210
  }
211
211
  return `
212
212
  ` + J + e;
213
213
  }
214
214
  }
215
- var z = !1, M;
215
+ var z = !1, V;
216
216
  {
217
- var Ue = typeof WeakMap == "function" ? WeakMap : Map;
218
- M = new Ue();
217
+ var Be = typeof WeakMap == "function" ? WeakMap : Map;
218
+ V = new Be();
219
219
  }
220
220
  function pe(e, r) {
221
221
  if (!e || z)
222
222
  return "";
223
223
  {
224
- var t = M.get(e);
224
+ var t = V.get(e);
225
225
  if (t !== void 0)
226
226
  return t;
227
227
  }
228
228
  var a;
229
229
  z = !0;
230
- var c = Error.prepareStackTrace;
230
+ var u = Error.prepareStackTrace;
231
231
  Error.prepareStackTrace = void 0;
232
- var p;
233
- p = G.current, G.current = null, Ve();
232
+ var v;
233
+ v = G.current, G.current = null, Me();
234
234
  try {
235
235
  if (r) {
236
236
  var s = function() {
@@ -276,67 +276,67 @@ function mr() {
276
276
  if (h--, b--, b < 0 || i[h] !== E[b]) {
277
277
  var w = `
278
278
  ` + i[h].replace(" at new ", " at ");
279
- return e.displayName && w.includes("<anonymous>") && (w = w.replace("<anonymous>", e.displayName)), typeof e == "function" && M.set(e, w), w;
279
+ return e.displayName && w.includes("<anonymous>") && (w = w.replace("<anonymous>", e.displayName)), typeof e == "function" && V.set(e, w), w;
280
280
  }
281
281
  while (h >= 1 && b >= 0);
282
282
  break;
283
283
  }
284
284
  }
285
285
  } finally {
286
- z = !1, G.current = p, Me(), Error.prepareStackTrace = c;
286
+ z = !1, G.current = v, Ve(), Error.prepareStackTrace = u;
287
287
  }
288
- var D = e ? e.displayName || e.name : "", we = D ? V(D) : "";
289
- return typeof e == "function" && M.set(e, we), we;
288
+ var D = e ? e.displayName || e.name : "", we = D ? M(D) : "";
289
+ return typeof e == "function" && V.set(e, we), we;
290
290
  }
291
- function Be(e, r, t) {
291
+ function Ue(e, r, t) {
292
292
  return pe(e, !1);
293
293
  }
294
294
  function qe(e) {
295
295
  var r = e.prototype;
296
296
  return !!(r && r.isReactComponent);
297
297
  }
298
- function U(e, r, t) {
298
+ function B(e, r, t) {
299
299
  if (e == null)
300
300
  return "";
301
301
  if (typeof e == "function")
302
302
  return pe(e, qe(e));
303
303
  if (typeof e == "string")
304
- return V(e);
304
+ return M(e);
305
305
  switch (e) {
306
306
  case T:
307
- return V("Suspense");
307
+ return M("Suspense");
308
308
  case g:
309
- return V("SuspenseList");
309
+ return M("SuspenseList");
310
310
  }
311
311
  if (typeof e == "object")
312
312
  switch (e.$$typeof) {
313
313
  case m:
314
- return Be(e.render);
315
- case R:
316
- return U(e.type, r, t);
314
+ return Ue(e.render);
315
+ case x:
316
+ return B(e.type, r, t);
317
317
  case P: {
318
- var a = e, c = a._payload, p = a._init;
318
+ var a = e, u = a._payload, v = a._init;
319
319
  try {
320
- return U(p(c), r, t);
320
+ return B(v(u), r, t);
321
321
  } catch {
322
322
  }
323
323
  }
324
324
  }
325
325
  return "";
326
326
  }
327
- var B = Object.prototype.hasOwnProperty, ve = {}, me = j.ReactDebugCurrentFrame;
327
+ var U = Object.prototype.hasOwnProperty, ve = {}, me = j.ReactDebugCurrentFrame;
328
328
  function q(e) {
329
329
  if (e) {
330
- var r = e._owner, t = U(e.type, e._source, r ? r.type : null);
330
+ var r = e._owner, t = B(e.type, e._source, r ? r.type : null);
331
331
  me.setExtraStackFrame(t);
332
332
  } else
333
333
  me.setExtraStackFrame(null);
334
334
  }
335
- function Ge(e, r, t, a, c) {
335
+ function Ge(e, r, t, a, u) {
336
336
  {
337
- var p = Function.call.bind(B);
337
+ var v = Function.call.bind(U);
338
338
  for (var s in e)
339
- if (p(e, s)) {
339
+ if (v(e, s)) {
340
340
  var i = void 0;
341
341
  try {
342
342
  if (typeof e[s] != "function") {
@@ -347,7 +347,7 @@ function mr() {
347
347
  } catch (h) {
348
348
  i = h;
349
349
  }
350
- i && !(i instanceof Error) && (q(c), y("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", a || "React class", t, s, typeof i), q(null)), i instanceof Error && !(i.message in ve) && (ve[i.message] = !0, q(c), y("Failed %s type: %s", t, i.message), q(null));
350
+ i && !(i instanceof Error) && (q(u), y("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", a || "React class", t, s, typeof i), q(null)), i instanceof Error && !(i.message in ve) && (ve[i.message] = !0, q(u), y("Failed %s type: %s", t, i.message), q(null));
351
351
  }
352
352
  }
353
353
  }
@@ -383,7 +383,7 @@ function mr() {
383
383
  }, _e, ke, K;
384
384
  K = {};
385
385
  function Xe(e) {
386
- if (B.call(e, "ref")) {
386
+ if (U.call(e, "ref")) {
387
387
  var r = Object.getOwnPropertyDescriptor(e, "ref").get;
388
388
  if (r && r.isReactWarning)
389
389
  return !1;
@@ -391,7 +391,7 @@ function mr() {
391
391
  return e.ref !== void 0;
392
392
  }
393
393
  function Ze(e) {
394
- if (B.call(e, "key")) {
394
+ if (U.call(e, "key")) {
395
395
  var r = Object.getOwnPropertyDescriptor(e, "key").get;
396
396
  if (r && r.isReactWarning)
397
397
  return !1;
@@ -426,17 +426,17 @@ function mr() {
426
426
  });
427
427
  }
428
428
  }
429
- var tr = function(e, r, t, a, c, p, s) {
429
+ var tr = function(e, r, t, a, u, v, s) {
430
430
  var i = {
431
431
  // This tag allows us to uniquely identify this as a React Element
432
- $$typeof: f,
432
+ $$typeof: c,
433
433
  // Built-in properties that belong on the element
434
434
  type: e,
435
435
  key: r,
436
436
  ref: t,
437
437
  props: s,
438
438
  // Record the component responsible for creating this element.
439
- _owner: p
439
+ _owner: v
440
440
  };
441
441
  return i._store = {}, Object.defineProperty(i._store, "validated", {
442
442
  configurable: !1,
@@ -452,31 +452,31 @@ function mr() {
452
452
  configurable: !1,
453
453
  enumerable: !1,
454
454
  writable: !1,
455
- value: c
455
+ value: u
456
456
  }), Object.freeze && (Object.freeze(i.props), Object.freeze(i)), i;
457
457
  };
458
- function ar(e, r, t, a, c) {
458
+ function ar(e, r, t, a, u) {
459
459
  {
460
- var p, s = {}, i = null, E = null;
461
- t !== void 0 && (be(t), i = "" + t), Ze(r) && (be(r.key), i = "" + r.key), Xe(r) && (E = r.ref, Qe(r, c));
462
- for (p in r)
463
- B.call(r, p) && !Ke.hasOwnProperty(p) && (s[p] = r[p]);
460
+ var v, s = {}, i = null, E = null;
461
+ t !== void 0 && (be(t), i = "" + t), Ze(r) && (be(r.key), i = "" + r.key), Xe(r) && (E = r.ref, Qe(r, u));
462
+ for (v in r)
463
+ U.call(r, v) && !Ke.hasOwnProperty(v) && (s[v] = r[v]);
464
464
  if (e && e.defaultProps) {
465
465
  var h = e.defaultProps;
466
- for (p in h)
467
- s[p] === void 0 && (s[p] = h[p]);
466
+ for (v in h)
467
+ s[v] === void 0 && (s[v] = h[v]);
468
468
  }
469
469
  if (i || E) {
470
470
  var b = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
471
471
  i && er(s, b), E && rr(s, b);
472
472
  }
473
- return tr(e, i, E, c, a, $.current, s);
473
+ return tr(e, i, E, u, a, $.current, s);
474
474
  }
475
475
  }
476
476
  var X = j.ReactCurrentOwner, ge = j.ReactDebugCurrentFrame;
477
477
  function F(e) {
478
478
  if (e) {
479
- var r = e._owner, t = U(e.type, e._source, r ? r.type : null);
479
+ var r = e._owner, t = B(e.type, e._source, r ? r.type : null);
480
480
  ge.setExtraStackFrame(t);
481
481
  } else
482
482
  ge.setExtraStackFrame(null);
@@ -484,7 +484,7 @@ function mr() {
484
484
  var Z;
485
485
  Z = !1;
486
486
  function Q(e) {
487
- return typeof e == "object" && e !== null && e.$$typeof === f;
487
+ return typeof e == "object" && e !== null && e.$$typeof === c;
488
488
  }
489
489
  function ye() {
490
490
  {
@@ -547,9 +547,9 @@ Check the top-level render call using <` + t + ">.");
547
547
  else if (Q(e))
548
548
  e._store && (e._store.validated = !0);
549
549
  else if (e) {
550
- var c = je(e);
551
- if (typeof c == "function" && c !== e.entries)
552
- for (var p = c.call(e), s; !(s = p.next()).done; )
550
+ var u = je(e);
551
+ if (typeof u == "function" && u !== e.entries)
552
+ for (var v = u.call(e), s; !(s = v.next()).done; )
553
553
  Q(s.value) && Re(s.value, r);
554
554
  }
555
555
  }
@@ -564,7 +564,7 @@ Check the top-level render call using <` + t + ">.");
564
564
  t = r.propTypes;
565
565
  else if (typeof r == "object" && (r.$$typeof === m || // Note: Memo only checks outer props here.
566
566
  // Inner props are checked in the reconciler.
567
- r.$$typeof === R))
567
+ r.$$typeof === x))
568
568
  t = r.propTypes;
569
569
  else
570
570
  return;
@@ -573,8 +573,8 @@ Check the top-level render call using <` + t + ">.");
573
573
  Ge(t, e.props, "prop", a, e);
574
574
  } else if (r.PropTypes !== void 0 && !Z) {
575
575
  Z = !0;
576
- var c = N(r);
577
- y("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", c || "Unknown");
576
+ var u = N(r);
577
+ y("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", u || "Unknown");
578
578
  }
579
579
  typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && y("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
580
580
  }
@@ -591,18 +591,18 @@ Check the top-level render call using <` + t + ">.");
591
591
  e.ref !== null && (F(e), y("Invalid attribute `ref` supplied to `React.Fragment`."), F(null));
592
592
  }
593
593
  }
594
- function Te(e, r, t, a, c, p) {
594
+ function Te(e, r, t, a, u, v) {
595
595
  {
596
596
  var s = Ye(e);
597
597
  if (!s) {
598
598
  var i = "";
599
599
  (e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (i += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
600
- var E = nr(c);
600
+ var E = nr(u);
601
601
  E ? i += E : i += ye();
602
602
  var h;
603
- e === null ? h = "null" : H(e) ? h = "array" : e !== void 0 && e.$$typeof === f ? (h = "<" + (N(e.type) || "Unknown") + " />", i = " Did you accidentally export a JSX literal instead of a component?") : h = typeof e, y("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", h, i);
603
+ e === null ? h = "null" : H(e) ? h = "array" : e !== void 0 && e.$$typeof === c ? (h = "<" + (N(e.type) || "Unknown") + " />", i = " Did you accidentally export a JSX literal instead of a component?") : h = typeof e, y("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", h, i);
604
604
  }
605
- var b = ar(e, r, t, c, p);
605
+ var b = ar(e, r, t, u, v);
606
606
  if (b == null)
607
607
  return b;
608
608
  if (s) {
@@ -634,30 +634,30 @@ Check the top-level render call using <` + t + ">.");
634
634
  (function(o) {
635
635
  process.env.NODE_ENV === "production" ? o.exports = vr() : o.exports = mr();
636
636
  })(pr);
637
- const Se = Y.Fragment, n = Y.jsx, x = Y.jsxs, S = ({
637
+ const Se = Y.Fragment, n = Y.jsx, R = Y.jsxs, S = ({
638
638
  className: o,
639
- name: f,
640
- viewBox: d = "0 0 32 32",
639
+ name: c,
640
+ viewBox: f = "0 0 32 32",
641
641
  ...l
642
642
  }) => {
643
- const v = [o].filter(Boolean).join(" ");
644
- return /* @__PURE__ */ n("svg", { ...l, className: v, viewBox: d, children: /* @__PURE__ */ n("use", { href: `#${f}` }) });
643
+ const p = [o].filter(Boolean).join(" ");
644
+ return /* @__PURE__ */ n("svg", { ...l, className: p, viewBox: f, children: /* @__PURE__ */ n("use", { href: `#${c}` }) });
645
645
  }, Rr = ({
646
646
  children: o,
647
- className: f,
648
- skin: d = "info",
647
+ className: c,
648
+ skin: f = "info",
649
649
  closeAlert: l = !1,
650
- onClose: v,
651
- title: u,
650
+ onClose: p,
651
+ title: d,
652
652
  date: k,
653
653
  ariaLive: _ = "polite",
654
654
  ...m
655
655
  }) => {
656
- const T = [f, "pkt-alert", d && `pkt-alert--${d}`].filter(Boolean).join(" "), [g, R] = dr(!0), P = () => {
657
- R(!1), v && v();
656
+ const T = [c, "pkt-alert", f && `pkt-alert--${f}`].filter(Boolean).join(" "), [g, x] = dr(!0), P = () => {
657
+ x(!1), p && p();
658
658
  };
659
- return g ? /* @__PURE__ */ x("div", { ...m, className: T, "aria-live": _, children: [
660
- /* @__PURE__ */ n("div", { className: "pkt-alert__icon", children: /* @__PURE__ */ n(S, { name: d === "info" ? "alert-information" : `alert-${d}` }) }),
659
+ return g ? /* @__PURE__ */ R("div", { ...m, className: T, "aria-live": _, children: [
660
+ /* @__PURE__ */ n("div", { className: "pkt-alert__icon", children: /* @__PURE__ */ n(S, { name: f === "info" ? "alert-information" : `alert-${f}` }) }),
661
661
  l && /* @__PURE__ */ n("div", { className: "pkt-alert__close", children: /* @__PURE__ */ n(
662
662
  "button",
663
663
  {
@@ -668,52 +668,52 @@ const Se = Y.Fragment, n = Y.jsx, x = Y.jsxs, S = ({
668
668
  children: /* @__PURE__ */ n(S, { name: "close", className: "pkt-btn__icon", "aria-hidden": "true" })
669
669
  }
670
670
  ) }),
671
- u && /* @__PURE__ */ n("div", { className: "pkt-alert__title", children: u }),
671
+ d && /* @__PURE__ */ n("div", { className: "pkt-alert__title", children: d }),
672
672
  /* @__PURE__ */ n("div", { className: "pkt-alert__text", children: o }),
673
- k && /* @__PURE__ */ x("div", { className: "pkt-alert__date", children: [
673
+ k && /* @__PURE__ */ R("div", { className: "pkt-alert__date", children: [
674
674
  "Sist oppdatert: ",
675
675
  k
676
676
  ] })
677
677
  ] }) : null;
678
678
  }, xr = ({
679
679
  children: o,
680
- className: f,
681
- iconName: d = "user",
680
+ className: c,
681
+ iconName: f = "user",
682
682
  secondIconName: l = "user",
683
- size: v = "medium",
684
- skin: u = "primary",
683
+ size: p = "medium",
684
+ skin: d = "primary",
685
685
  type: k = "button",
686
686
  variant: _ = "label-only",
687
687
  ...m
688
688
  }) => {
689
689
  const T = [
690
- f,
690
+ c,
691
691
  "pkt-btn",
692
- v && `pkt-btn--${v}`,
693
- u && `pkt-btn--${u}`,
692
+ p && `pkt-btn--${p}`,
693
+ d && `pkt-btn--${d}`,
694
694
  _ && `pkt-btn--${_}`
695
695
  ].filter(Boolean).join(" ");
696
- return /* @__PURE__ */ x("button", { ...m, className: T, type: k, children: [
697
- /* @__PURE__ */ n(S, { className: "pkt-btn__icon", name: d }),
696
+ return /* @__PURE__ */ R("button", { ...m, className: T, type: k, children: [
697
+ /* @__PURE__ */ n(S, { className: "pkt-btn__icon", name: f }),
698
698
  /* @__PURE__ */ n("span", { className: "pkt-btn__text", children: o }),
699
699
  _ === "icons-right-and-left" && /* @__PURE__ */ n(S, { className: "pkt-btn__icon", name: l })
700
700
  ] });
701
701
  }, Tr = ({
702
702
  children: o,
703
- className: f,
704
- logoLink: d = "https://www.oslo.kommune.no/",
703
+ className: c,
704
+ logoLink: f = "https://www.oslo.kommune.no/",
705
705
  isLoggedIn: l = !1,
706
- representing: v = "",
707
- canChangeRepresentation: u = !1,
706
+ representing: p = "",
707
+ canChangeRepresentation: d = !1,
708
708
  showLogInButton: k = !0,
709
709
  onLogIn: _,
710
710
  onLogOut: m,
711
711
  onChangeRepresentation: T,
712
712
  ...g
713
713
  }) => {
714
- const R = [f, "pkt-header"].filter(Boolean).join(" ");
715
- return /* @__PURE__ */ x("header", { id: "pkt-header", className: R, "aria-label": "Topp", children: [
716
- /* @__PURE__ */ n("div", { className: "pkt-header__logo", children: /* @__PURE__ */ n("a", { "aria-label": "Tilbake til forside", className: "pkt-header__logo-link", href: d, children: /* @__PURE__ */ n(
714
+ const x = [c, "pkt-header"].filter(Boolean).join(" ");
715
+ return /* @__PURE__ */ R("header", { id: "pkt-header", className: x, "aria-label": "Topp", children: [
716
+ /* @__PURE__ */ n("div", { className: "pkt-header__logo", children: /* @__PURE__ */ n("a", { "aria-label": "Tilbake til forside", className: "pkt-header__logo-link", href: f, children: /* @__PURE__ */ n(
717
717
  S,
718
718
  {
719
719
  name: "oslologo",
@@ -722,26 +722,26 @@ const Se = Y.Fragment, n = Y.jsx, x = Y.jsxs, S = ({
722
722
  "aria-hidden": "true"
723
723
  }
724
724
  ) }) }),
725
- /* @__PURE__ */ x("div", { className: "pkt-header__actions", children: [
726
- l && u && /* @__PURE__ */ x(
725
+ /* @__PURE__ */ R("div", { className: "pkt-header__actions", children: [
726
+ l && d && /* @__PURE__ */ R(
727
727
  "button",
728
728
  {
729
729
  className: "pkt-btn pkt-btn--secondary pkt-btn--icon-right",
730
- "aria-label": `Bytt bruker fra ${v}`,
730
+ "aria-label": `Bytt bruker fra ${p}`,
731
731
  onClick: T,
732
732
  children: [
733
733
  /* @__PURE__ */ n(S, { name: "user", className: "pkt-btn__icon pkt-show-tablet-up" }),
734
734
  /* @__PURE__ */ n("span", { className: "pkt-header__action-change pkt-hide pkt-show-tablet-up ml-size-15", children: "Endre" }),
735
735
  /* @__PURE__ */ n("span", { className: "pkt-btn__text pkt-hide-tablet-up", children: "Endre" }),
736
- /* @__PURE__ */ n("span", { className: "pkt-btn__text--representing pkt-hide pkt-show-tablet-up", children: v })
736
+ /* @__PURE__ */ n("span", { className: "pkt-btn__text--representing pkt-hide pkt-show-tablet-up", children: p })
737
737
  ]
738
738
  }
739
739
  ),
740
- l && !u && /* @__PURE__ */ x("div", { className: "pkt-header__action", children: [
741
- /* @__PURE__ */ n("span", { className: "pkt-header__action-text", children: /* @__PURE__ */ n("span", { className: "pkt-btn__text pkt-header__action-textrow text-row-inline pkt-truncate-text", children: v }) }),
740
+ l && !d && /* @__PURE__ */ R("div", { className: "pkt-header__action", children: [
741
+ /* @__PURE__ */ n("span", { className: "pkt-header__action-text", children: /* @__PURE__ */ n("span", { className: "pkt-btn__text pkt-header__action-textrow text-row-inline pkt-truncate-text", children: p }) }),
742
742
  /* @__PURE__ */ n("span", { className: "pkt-header__action-icon pkt-show-phablet-up", children: /* @__PURE__ */ n(S, { name: "user" }) })
743
743
  ] }),
744
- k && l && /* @__PURE__ */ x(
744
+ k && l && /* @__PURE__ */ R(
745
745
  "button",
746
746
  {
747
747
  className: "pkt-btn pkt-btn--tertiary pkt-btn--icon-right",
@@ -753,7 +753,7 @@ const Se = Y.Fragment, n = Y.jsx, x = Y.jsxs, S = ({
753
753
  ]
754
754
  }
755
755
  ),
756
- k && !l && /* @__PURE__ */ x(
756
+ k && !l && /* @__PURE__ */ R(
757
757
  "button",
758
758
  {
759
759
  className: "pkt-btn pkt-btn--tertiary pkt-btn--icon-right",
@@ -768,30 +768,41 @@ const Se = Y.Fragment, n = Y.jsx, x = Y.jsxs, S = ({
768
768
  ] })
769
769
  ] });
770
770
  }, hr = re.forwardRef(
771
- ({ label: o, id: f, children: d, ...l }, v) => /* @__PURE__ */ x("div", { className: "pkt-form-group", children: [
772
- /* @__PURE__ */ n("label", { htmlFor: f, className: "pkt-form-label", children: o }),
773
- /* @__PURE__ */ n("input", { className: "pkt-form-input", id: f, ...l, ref: v }),
774
- d
771
+ ({ label: o, id: c, children: f, ...l }, p) => /* @__PURE__ */ R("div", { className: "pkt-form-group", children: [
772
+ /* @__PURE__ */ n("label", { htmlFor: c, className: "pkt-form-label", children: o }),
773
+ /* @__PURE__ */ n("input", { className: "pkt-form-input", id: c, ...l, ref: p }),
774
+ f
775
775
  ] })
776
776
  );
777
777
  hr.displayName = "PktInput";
778
- const br = Oe(
779
- ({ id: o, label: f, ...d }, l) => /* @__PURE__ */ x("div", { className: "pkt-form-group", children: [
780
- /* @__PURE__ */ n("label", { htmlFor: o, className: "pkt-form-label", children: f }),
781
- /* @__PURE__ */ n("textarea", { className: "pkt-form-textarea", id: o, ref: l, ...d })
778
+ const wr = ({
779
+ children: o,
780
+ skin: c = "beige",
781
+ title: f,
782
+ ...l
783
+ }) => {
784
+ const p = ["pkt-messagebox", c && `pkt-messagebox--${c}`].filter(Boolean).join(" ");
785
+ return /* @__PURE__ */ R("div", { ...l, className: p, children: [
786
+ /* @__PURE__ */ n("div", { className: "pkt-messagebox__title", children: f }),
787
+ /* @__PURE__ */ n("div", { className: "pkt-messagebox__text", children: o })
788
+ ] });
789
+ }, br = Oe(
790
+ ({ id: o, label: c, ...f }, l) => /* @__PURE__ */ R("div", { className: "pkt-form-group", children: [
791
+ /* @__PURE__ */ n("label", { htmlFor: o, className: "pkt-form-label", children: c }),
792
+ /* @__PURE__ */ n("textarea", { className: "pkt-form-textarea", id: o, ref: l, ...f })
782
793
  ] })
783
794
  );
784
795
  br.displayName = "PktTextarea";
785
796
  const _r = Oe(
786
- ({ id: o, name: f, label: d, value: l, ...v }, u) => /* @__PURE__ */ x("div", { className: "pkt-form-group", children: [
787
- /* @__PURE__ */ n("input", { type: "radio", className: "pkt-form-check-input", id: o, name: f, value: l, ref: u, ...v }),
788
- /* @__PURE__ */ n("label", { className: "pkt-form-label", htmlFor: o, children: d })
797
+ ({ id: o, name: c, label: f, value: l, ...p }, d) => /* @__PURE__ */ R("div", { className: "pkt-form-group", children: [
798
+ /* @__PURE__ */ n("input", { type: "radio", className: "pkt-form-check-input", id: o, name: c, value: l, ref: d, ...p }),
799
+ /* @__PURE__ */ n("label", { className: "pkt-form-label", htmlFor: o, children: f })
789
800
  ] })
790
801
  );
791
802
  _r.displayName = "PktRadio";
792
- const wr = ({ label: o, children: f }) => /* @__PURE__ */ x(Se, { children: [
803
+ const Pr = ({ label: o, children: c }) => /* @__PURE__ */ R(Se, { children: [
793
804
  /* @__PURE__ */ n("p", { children: o }),
794
- /* @__PURE__ */ n("div", { className: "pkt-form-group", children: f })
805
+ /* @__PURE__ */ n("div", { className: "pkt-form-group", children: c })
795
806
  ] });
796
807
  var ee = {}, kr = {
797
808
  get exports() {
@@ -808,59 +819,60 @@ var ee = {}, kr = {
808
819
  */
809
820
  (function(o) {
810
821
  (function() {
811
- var f = {}.hasOwnProperty;
812
- function d() {
813
- for (var l = [], v = 0; v < arguments.length; v++) {
814
- var u = arguments[v];
815
- if (u) {
816
- var k = typeof u;
822
+ var c = {}.hasOwnProperty;
823
+ function f() {
824
+ for (var l = [], p = 0; p < arguments.length; p++) {
825
+ var d = arguments[p];
826
+ if (d) {
827
+ var k = typeof d;
817
828
  if (k === "string" || k === "number")
818
- l.push(u);
819
- else if (Array.isArray(u)) {
820
- if (u.length) {
821
- var _ = d.apply(null, u);
829
+ l.push(d);
830
+ else if (Array.isArray(d)) {
831
+ if (d.length) {
832
+ var _ = f.apply(null, d);
822
833
  _ && l.push(_);
823
834
  }
824
835
  } else if (k === "object") {
825
- if (u.toString !== Object.prototype.toString && !u.toString.toString().includes("[native code]")) {
826
- l.push(u.toString());
836
+ if (d.toString !== Object.prototype.toString && !d.toString.toString().includes("[native code]")) {
837
+ l.push(d.toString());
827
838
  continue;
828
839
  }
829
- for (var m in u)
830
- f.call(u, m) && u[m] && l.push(m);
840
+ for (var m in d)
841
+ c.call(d, m) && d[m] && l.push(m);
831
842
  }
832
843
  }
833
844
  }
834
845
  return l.join(" ");
835
846
  }
836
- o.exports ? (d.default = d, o.exports = d) : window.classNames = d;
847
+ o.exports ? (f.default = f, o.exports = f) : window.classNames = f;
837
848
  })();
838
849
  })(kr);
839
- const gr = ee, yr = ({ isResponsive: o, children: f }) => o ? /* @__PURE__ */ n("div", { className: "pkt-table-container", children: f }) : /* @__PURE__ */ n(Se, { children: f }), Pr = ({
850
+ const gr = ee, yr = ({ isResponsive: o, children: c }) => o ? /* @__PURE__ */ n("div", { className: "pkt-table-container", children: c }) : /* @__PURE__ */ n(Se, { children: c }), Nr = ({
840
851
  isResponsive: o,
841
- modifiers: { info: f = !1, success: d = !1, strong: l = !1, shadow: v = !1 } = {},
842
- children: u
852
+ modifiers: { info: c = !1, success: f = !1, strong: l = !1, shadow: p = !1 } = {},
853
+ children: d
843
854
  }) => /* @__PURE__ */ n(yr, { isResponsive: o, children: /* @__PURE__ */ n(
844
855
  "table",
845
856
  {
846
857
  className: gr("pkt-table", {
847
- "pkt-table--info": f,
848
- "pkt-table--success": d,
858
+ "pkt-table--info": c,
859
+ "pkt-table--success": f,
849
860
  "pkt-table--strong": l,
850
- "pkt-table--shadow": v
861
+ "pkt-table--shadow": p
851
862
  }),
852
- children: u
863
+ children: d
853
864
  }
854
- ) }), Nr = ({ children: o }) => /* @__PURE__ */ n("td", { className: "pkt-table__th", children: o }), Or = ({ children: o }) => /* @__PURE__ */ n("th", { className: "pkt-table__th", children: o });
865
+ ) }), Or = ({ children: o }) => /* @__PURE__ */ n("td", { className: "pkt-table__th", children: o }), Sr = ({ children: o }) => /* @__PURE__ */ n("th", { className: "pkt-table__th", children: o });
855
866
  export {
856
867
  Rr as PktAlert,
857
868
  xr as PktButton,
858
869
  Tr as PktHeader,
859
870
  hr as PktInput,
871
+ wr as PktMessagebox,
860
872
  _r as PktRadio,
861
- wr as PktRadioGroup,
862
- Pr as PktTable,
863
- Nr as PktTableData,
864
- Or as PktTableHeader,
873
+ Pr as PktRadioGroup,
874
+ Nr as PktTable,
875
+ Or as PktTableData,
876
+ Sr as PktTableHeader,
865
877
  br as PktTextarea
866
878
  };
@@ -1,4 +1,4 @@
1
- (function(g,N){typeof exports=="object"&&typeof module<"u"?N(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],N):(g=typeof globalThis<"u"?globalThis:g||self,N(g["punkt-react"]={},g.React))})(this,function(g,N){"use strict";var W={},Fe={get exports(){return W},set exports(i){W=i}},Y={};/**
1
+ (function(k,N){typeof exports=="object"&&typeof module<"u"?N(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],N):(k=typeof globalThis<"u"?globalThis:k||self,N(k["punkt-react"]={},k.React))})(this,function(k,N){"use strict";var W={},Fe={get exports(){return W},set exports(o){W=o}},Y={};/**
2
2
  * @license React
3
3
  * react-jsx-runtime.production.min.js
4
4
  *
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var ae;function Ae(){if(ae)return Y;ae=1;var i=N,f=Symbol.for("react.element"),d=Symbol.for("react.fragment"),l=Object.prototype.hasOwnProperty,v=i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,u={key:!0,ref:!0,__self:!0,__source:!0};function k(_,m,w){var y,T={},O=null,V=null;w!==void 0&&(O=""+w),m.key!==void 0&&(O=""+m.key),m.ref!==void 0&&(V=m.ref);for(y in m)l.call(m,y)&&!u.hasOwnProperty(y)&&(T[y]=m[y]);if(_&&_.defaultProps)for(y in m=_.defaultProps,m)T[y]===void 0&&(T[y]=m[y]);return{$$typeof:f,type:_,key:O,ref:V,props:T,_owner:v.current}}return Y.Fragment=d,Y.jsx=k,Y.jsxs=k,Y}var $={};/**
9
+ */var ae;function Ae(){if(ae)return Y;ae=1;var o=N,c=Symbol.for("react.element"),f=Symbol.for("react.fragment"),l=Object.prototype.hasOwnProperty,p=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,d={key:!0,ref:!0,__self:!0,__source:!0};function g(_,m,x){var y,T={},O=null,B=null;x!==void 0&&(O=""+x),m.key!==void 0&&(O=""+m.key),m.ref!==void 0&&(B=m.ref);for(y in m)l.call(m,y)&&!d.hasOwnProperty(y)&&(T[y]=m[y]);if(_&&_.defaultProps)for(y in m=_.defaultProps,m)T[y]===void 0&&(T[y]=m[y]);return{$$typeof:c,type:_,key:O,ref:B,props:T,_owner:p.current}}return Y.Fragment=f,Y.jsx=g,Y.jsxs=g,Y}var $={};/**
10
10
  * @license React
11
11
  * react-jsx-runtime.development.js
12
12
  *
@@ -14,18 +14,18 @@
14
14
  *
15
15
  * This source code is licensed under the MIT license found in the
16
16
  * LICENSE file in the root directory of this source tree.
17
- */var ne;function Ie(){return ne||(ne=1,process.env.NODE_ENV!=="production"&&function(){var i=N,f=Symbol.for("react.element"),d=Symbol.for("react.portal"),l=Symbol.for("react.fragment"),v=Symbol.for("react.strict_mode"),u=Symbol.for("react.profiler"),k=Symbol.for("react.provider"),_=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),w=Symbol.for("react.suspense"),y=Symbol.for("react.suspense_list"),T=Symbol.for("react.memo"),O=Symbol.for("react.lazy"),V=Symbol.for("react.offscreen"),ce=Symbol.iterator,Je="@@iterator";function ze(e){if(e===null||typeof e!="object")return null;var r=ce&&e[ce]||e[Je];return typeof r=="function"?r:null}var F=i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function R(e){{for(var r=arguments.length,t=new Array(r>1?r-1:0),a=1;a<r;a++)t[a-1]=arguments[a];Ke("error",e,t)}}function Ke(e,r,t){{var a=F.ReactDebugCurrentFrame,c=a.getStackAddendum();c!==""&&(r+="%s",t=t.concat([c]));var p=t.map(function(s){return String(s)});p.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,p)}}var qe=!1,Xe=!1,Ze=!1,Qe=!1,er=!1,ue;ue=Symbol.for("react.module.reference");function rr(e){return!!(typeof e=="string"||typeof e=="function"||e===l||e===u||er||e===v||e===w||e===y||Qe||e===V||qe||Xe||Ze||typeof e=="object"&&e!==null&&(e.$$typeof===O||e.$$typeof===T||e.$$typeof===k||e.$$typeof===_||e.$$typeof===m||e.$$typeof===ue||e.getModuleId!==void 0))}function tr(e,r,t){var a=e.displayName;if(a)return a;var c=r.displayName||r.name||"";return c!==""?t+"("+c+")":t}function fe(e){return e.displayName||"Context"}function C(e){if(e==null)return null;if(typeof e.tag=="number"&&R("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case l:return"Fragment";case d:return"Portal";case u:return"Profiler";case v:return"StrictMode";case w:return"Suspense";case y:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case _:var r=e;return fe(r)+".Consumer";case k:var t=e;return fe(t._context)+".Provider";case m:return tr(e,e.render,"ForwardRef");case T:var a=e.displayName||null;return a!==null?a:C(e.type)||"Memo";case O:{var c=e,p=c._payload,s=c._init;try{return C(s(p))}catch{return null}}}return null}var D=Object.assign,L=0,de,pe,ve,me,he,be,_e;function ke(){}ke.__reactDisabledLog=!0;function ar(){{if(L===0){de=console.log,pe=console.info,ve=console.warn,me=console.error,he=console.group,be=console.groupCollapsed,_e=console.groupEnd;var e={configurable:!0,enumerable:!0,value:ke,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}L++}}function nr(){{if(L--,L===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:D({},e,{value:de}),info:D({},e,{value:pe}),warn:D({},e,{value:ve}),error:D({},e,{value:me}),group:D({},e,{value:he}),groupCollapsed:D({},e,{value:be}),groupEnd:D({},e,{value:_e})})}L<0&&R("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var K=F.ReactCurrentDispatcher,q;function B(e,r,t){{if(q===void 0)try{throw Error()}catch(c){var a=c.stack.trim().match(/\n( *(at )?)/);q=a&&a[1]||""}return`
18
- `+q+e}}var X=!1,U;{var ir=typeof WeakMap=="function"?WeakMap:Map;U=new ir}function ge(e,r){if(!e||X)return"";{var t=U.get(e);if(t!==void 0)return t}var a;X=!0;var c=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var p;p=K.current,K.current=null,ar();try{if(r){var s=function(){throw Error()};if(Object.defineProperty(s.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(s,[])}catch(j){a=j}Reflect.construct(e,[],s)}else{try{s.call()}catch(j){a=j}e.call(s.prototype)}}else{try{throw Error()}catch(j){a=j}e()}}catch(j){if(j&&a&&typeof j.stack=="string"){for(var o=j.stack.split(`
17
+ */var ne;function Ie(){return ne||(ne=1,process.env.NODE_ENV!=="production"&&function(){var o=N,c=Symbol.for("react.element"),f=Symbol.for("react.portal"),l=Symbol.for("react.fragment"),p=Symbol.for("react.strict_mode"),d=Symbol.for("react.profiler"),g=Symbol.for("react.provider"),_=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),x=Symbol.for("react.suspense"),y=Symbol.for("react.suspense_list"),T=Symbol.for("react.memo"),O=Symbol.for("react.lazy"),B=Symbol.for("react.offscreen"),ce=Symbol.iterator,ze="@@iterator";function Ke(e){if(e===null||typeof e!="object")return null;var r=ce&&e[ce]||e[ze];return typeof r=="function"?r:null}var F=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function R(e){{for(var r=arguments.length,t=new Array(r>1?r-1:0),a=1;a<r;a++)t[a-1]=arguments[a];qe("error",e,t)}}function qe(e,r,t){{var a=F.ReactDebugCurrentFrame,u=a.getStackAddendum();u!==""&&(r+="%s",t=t.concat([u]));var v=t.map(function(s){return String(s)});v.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,v)}}var Xe=!1,Ze=!1,Qe=!1,er=!1,rr=!1,ue;ue=Symbol.for("react.module.reference");function tr(e){return!!(typeof e=="string"||typeof e=="function"||e===l||e===d||rr||e===p||e===x||e===y||er||e===B||Xe||Ze||Qe||typeof e=="object"&&e!==null&&(e.$$typeof===O||e.$$typeof===T||e.$$typeof===g||e.$$typeof===_||e.$$typeof===m||e.$$typeof===ue||e.getModuleId!==void 0))}function ar(e,r,t){var a=e.displayName;if(a)return a;var u=r.displayName||r.name||"";return u!==""?t+"("+u+")":t}function fe(e){return e.displayName||"Context"}function j(e){if(e==null)return null;if(typeof e.tag=="number"&&R("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case l:return"Fragment";case f:return"Portal";case d:return"Profiler";case p:return"StrictMode";case x:return"Suspense";case y:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case _:var r=e;return fe(r)+".Consumer";case g:var t=e;return fe(t._context)+".Provider";case m:return ar(e,e.render,"ForwardRef");case T:var a=e.displayName||null;return a!==null?a:j(e.type)||"Memo";case O:{var u=e,v=u._payload,s=u._init;try{return j(s(v))}catch{return null}}}return null}var D=Object.assign,M=0,de,pe,ve,me,be,he,_e;function ke(){}ke.__reactDisabledLog=!0;function nr(){{if(M===0){de=console.log,pe=console.info,ve=console.warn,me=console.error,be=console.group,he=console.groupCollapsed,_e=console.groupEnd;var e={configurable:!0,enumerable:!0,value:ke,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}M++}}function or(){{if(M--,M===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:D({},e,{value:de}),info:D({},e,{value:pe}),warn:D({},e,{value:ve}),error:D({},e,{value:me}),group:D({},e,{value:be}),groupCollapsed:D({},e,{value:he}),groupEnd:D({},e,{value:_e})})}M<0&&R("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var K=F.ReactCurrentDispatcher,q;function V(e,r,t){{if(q===void 0)try{throw Error()}catch(u){var a=u.stack.trim().match(/\n( *(at )?)/);q=a&&a[1]||""}return`
18
+ `+q+e}}var X=!1,U;{var ir=typeof WeakMap=="function"?WeakMap:Map;U=new ir}function ge(e,r){if(!e||X)return"";{var t=U.get(e);if(t!==void 0)return t}var a;X=!0;var u=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var v;v=K.current,K.current=null,nr();try{if(r){var s=function(){throw Error()};if(Object.defineProperty(s.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(s,[])}catch(C){a=C}Reflect.construct(e,[],s)}else{try{s.call()}catch(C){a=C}e.call(s.prototype)}}else{try{throw Error()}catch(C){a=C}e()}}catch(C){if(C&&a&&typeof C.stack=="string"){for(var i=C.stack.split(`
19
19
  `),E=a.stack.split(`
20
- `),h=o.length-1,b=E.length-1;h>=1&&b>=0&&o[h]!==E[b];)b--;for(;h>=1&&b>=0;h--,b--)if(o[h]!==E[b]){if(h!==1||b!==1)do if(h--,b--,b<0||o[h]!==E[b]){var x=`
21
- `+o[h].replace(" at new "," at ");return e.displayName&&x.includes("<anonymous>")&&(x=x.replace("<anonymous>",e.displayName)),typeof e=="function"&&U.set(e,x),x}while(h>=1&&b>=0);break}}}finally{X=!1,K.current=p,nr(),Error.prepareStackTrace=c}var I=e?e.displayName||e.name:"",De=I?B(I):"";return typeof e=="function"&&U.set(e,De),De}function or(e,r,t){return ge(e,!1)}function sr(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function G(e,r,t){if(e==null)return"";if(typeof e=="function")return ge(e,sr(e));if(typeof e=="string")return B(e);switch(e){case w:return B("Suspense");case y:return B("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case m:return or(e.render);case T:return G(e.type,r,t);case O:{var a=e,c=a._payload,p=a._init;try{return G(p(c),r,t)}catch{}}}return""}var H=Object.prototype.hasOwnProperty,ye={},Re=F.ReactDebugCurrentFrame;function J(e){if(e){var r=e._owner,t=G(e.type,e._source,r?r.type:null);Re.setExtraStackFrame(t)}else Re.setExtraStackFrame(null)}function lr(e,r,t,a,c){{var p=Function.call.bind(H);for(var s in e)if(p(e,s)){var o=void 0;try{if(typeof e[s]!="function"){var E=Error((a||"React class")+": "+t+" type `"+s+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[s]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw E.name="Invariant Violation",E}o=e[s](r,s,a,t,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(h){o=h}o&&!(o instanceof Error)&&(J(c),R("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",a||"React class",t,s,typeof o),J(null)),o instanceof Error&&!(o.message in ye)&&(ye[o.message]=!0,J(c),R("Failed %s type: %s",t,o.message),J(null))}}}var cr=Array.isArray;function Z(e){return cr(e)}function ur(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,t=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t}}function fr(e){try{return Ee(e),!1}catch{return!0}}function Ee(e){return""+e}function Pe(e){if(fr(e))return R("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",ur(e)),Ee(e)}var M=F.ReactCurrentOwner,dr={key:!0,ref:!0,__self:!0,__source:!0},Te,we,Q;Q={};function pr(e){if(H.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function vr(e){if(H.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function mr(e,r){if(typeof e.ref=="string"&&M.current&&r&&M.current.stateNode!==r){var t=C(M.current.type);Q[t]||(R('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',C(M.current.type),e.ref),Q[t]=!0)}}function hr(e,r){{var t=function(){Te||(Te=!0,R("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};t.isReactWarning=!0,Object.defineProperty(e,"key",{get:t,configurable:!0})}}function br(e,r){{var t=function(){we||(we=!0,R("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};t.isReactWarning=!0,Object.defineProperty(e,"ref",{get:t,configurable:!0})}}var _r=function(e,r,t,a,c,p,s){var o={$$typeof:f,type:e,key:r,ref:t,props:s,_owner:p};return o._store={},Object.defineProperty(o._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(o,"_self",{configurable:!1,enumerable:!1,writable:!1,value:a}),Object.defineProperty(o,"_source",{configurable:!1,enumerable:!1,writable:!1,value:c}),Object.freeze&&(Object.freeze(o.props),Object.freeze(o)),o};function kr(e,r,t,a,c){{var p,s={},o=null,E=null;t!==void 0&&(Pe(t),o=""+t),vr(r)&&(Pe(r.key),o=""+r.key),pr(r)&&(E=r.ref,mr(r,c));for(p in r)H.call(r,p)&&!dr.hasOwnProperty(p)&&(s[p]=r[p]);if(e&&e.defaultProps){var h=e.defaultProps;for(p in h)s[p]===void 0&&(s[p]=h[p])}if(o||E){var b=typeof e=="function"?e.displayName||e.name||"Unknown":e;o&&hr(s,b),E&&br(s,b)}return _r(e,o,E,c,a,M.current,s)}}var ee=F.ReactCurrentOwner,xe=F.ReactDebugCurrentFrame;function A(e){if(e){var r=e._owner,t=G(e.type,e._source,r?r.type:null);xe.setExtraStackFrame(t)}else xe.setExtraStackFrame(null)}var re;re=!1;function te(e){return typeof e=="object"&&e!==null&&e.$$typeof===f}function Ne(){{if(ee.current){var e=C(ee.current.type);if(e)return`
20
+ `),b=i.length-1,h=E.length-1;b>=1&&h>=0&&i[b]!==E[h];)h--;for(;b>=1&&h>=0;b--,h--)if(i[b]!==E[h]){if(b!==1||h!==1)do if(b--,h--,h<0||i[b]!==E[h]){var w=`
21
+ `+i[b].replace(" at new "," at ");return e.displayName&&w.includes("<anonymous>")&&(w=w.replace("<anonymous>",e.displayName)),typeof e=="function"&&U.set(e,w),w}while(b>=1&&h>=0);break}}}finally{X=!1,K.current=v,or(),Error.prepareStackTrace=u}var I=e?e.displayName||e.name:"",De=I?V(I):"";return typeof e=="function"&&U.set(e,De),De}function sr(e,r,t){return ge(e,!1)}function lr(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function G(e,r,t){if(e==null)return"";if(typeof e=="function")return ge(e,lr(e));if(typeof e=="string")return V(e);switch(e){case x:return V("Suspense");case y:return V("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case m:return sr(e.render);case T:return G(e.type,r,t);case O:{var a=e,u=a._payload,v=a._init;try{return G(v(u),r,t)}catch{}}}return""}var H=Object.prototype.hasOwnProperty,ye={},Re=F.ReactDebugCurrentFrame;function J(e){if(e){var r=e._owner,t=G(e.type,e._source,r?r.type:null);Re.setExtraStackFrame(t)}else Re.setExtraStackFrame(null)}function cr(e,r,t,a,u){{var v=Function.call.bind(H);for(var s in e)if(v(e,s)){var i=void 0;try{if(typeof e[s]!="function"){var E=Error((a||"React class")+": "+t+" type `"+s+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[s]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw E.name="Invariant Violation",E}i=e[s](r,s,a,t,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(b){i=b}i&&!(i instanceof Error)&&(J(u),R("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",a||"React class",t,s,typeof i),J(null)),i instanceof Error&&!(i.message in ye)&&(ye[i.message]=!0,J(u),R("Failed %s type: %s",t,i.message),J(null))}}}var ur=Array.isArray;function Z(e){return ur(e)}function fr(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,t=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t}}function dr(e){try{return Ee(e),!1}catch{return!0}}function Ee(e){return""+e}function Pe(e){if(dr(e))return R("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",fr(e)),Ee(e)}var L=F.ReactCurrentOwner,pr={key:!0,ref:!0,__self:!0,__source:!0},Te,xe,Q;Q={};function vr(e){if(H.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function mr(e){if(H.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function br(e,r){if(typeof e.ref=="string"&&L.current&&r&&L.current.stateNode!==r){var t=j(L.current.type);Q[t]||(R('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',j(L.current.type),e.ref),Q[t]=!0)}}function hr(e,r){{var t=function(){Te||(Te=!0,R("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};t.isReactWarning=!0,Object.defineProperty(e,"key",{get:t,configurable:!0})}}function _r(e,r){{var t=function(){xe||(xe=!0,R("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};t.isReactWarning=!0,Object.defineProperty(e,"ref",{get:t,configurable:!0})}}var kr=function(e,r,t,a,u,v,s){var i={$$typeof:c,type:e,key:r,ref:t,props:s,_owner:v};return i._store={},Object.defineProperty(i._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(i,"_self",{configurable:!1,enumerable:!1,writable:!1,value:a}),Object.defineProperty(i,"_source",{configurable:!1,enumerable:!1,writable:!1,value:u}),Object.freeze&&(Object.freeze(i.props),Object.freeze(i)),i};function gr(e,r,t,a,u){{var v,s={},i=null,E=null;t!==void 0&&(Pe(t),i=""+t),mr(r)&&(Pe(r.key),i=""+r.key),vr(r)&&(E=r.ref,br(r,u));for(v in r)H.call(r,v)&&!pr.hasOwnProperty(v)&&(s[v]=r[v]);if(e&&e.defaultProps){var b=e.defaultProps;for(v in b)s[v]===void 0&&(s[v]=b[v])}if(i||E){var h=typeof e=="function"?e.displayName||e.name||"Unknown":e;i&&hr(s,h),E&&_r(s,h)}return kr(e,i,E,u,a,L.current,s)}}var ee=F.ReactCurrentOwner,we=F.ReactDebugCurrentFrame;function A(e){if(e){var r=e._owner,t=G(e.type,e._source,r?r.type:null);we.setExtraStackFrame(t)}else we.setExtraStackFrame(null)}var re;re=!1;function te(e){return typeof e=="object"&&e!==null&&e.$$typeof===c}function Ne(){{if(ee.current){var e=j(ee.current.type);if(e)return`
22
22
 
23
- Check the render method of \``+e+"`."}return""}}function gr(e){{if(e!==void 0){var r=e.fileName.replace(/^.*[\\\/]/,""),t=e.lineNumber;return`
23
+ Check the render method of \``+e+"`."}return""}}function yr(e){{if(e!==void 0){var r=e.fileName.replace(/^.*[\\\/]/,""),t=e.lineNumber;return`
24
24
 
25
- Check your code at `+r+":"+t+"."}return""}}var Se={};function yr(e){{var r=Ne();if(!r){var t=typeof e=="string"?e:e.displayName||e.name;t&&(r=`
25
+ Check your code at `+r+":"+t+"."}return""}}var Se={};function Rr(e){{var r=Ne();if(!r){var t=typeof e=="string"?e:e.displayName||e.name;t&&(r=`
26
26
 
27
- Check the top-level render call using <`+t+">.")}return r}}function Oe(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var t=yr(r);if(Se[t])return;Se[t]=!0;var a="";e&&e._owner&&e._owner!==ee.current&&(a=" It was passed a child from "+C(e._owner.type)+"."),A(e),R('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',t,a),A(null)}}function Ce(e,r){{if(typeof e!="object")return;if(Z(e))for(var t=0;t<e.length;t++){var a=e[t];te(a)&&Oe(a,r)}else if(te(e))e._store&&(e._store.validated=!0);else if(e){var c=ze(e);if(typeof c=="function"&&c!==e.entries)for(var p=c.call(e),s;!(s=p.next()).done;)te(s.value)&&Oe(s.value,r)}}}function Rr(e){{var r=e.type;if(r==null||typeof r=="string")return;var t;if(typeof r=="function")t=r.propTypes;else if(typeof r=="object"&&(r.$$typeof===m||r.$$typeof===T))t=r.propTypes;else return;if(t){var a=C(r);lr(t,e.props,"prop",a,e)}else if(r.PropTypes!==void 0&&!re){re=!0;var c=C(r);R("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",c||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&R("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Er(e){{for(var r=Object.keys(e.props),t=0;t<r.length;t++){var a=r[t];if(a!=="children"&&a!=="key"){A(e),R("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",a),A(null);break}}e.ref!==null&&(A(e),R("Invalid attribute `ref` supplied to `React.Fragment`."),A(null))}}function je(e,r,t,a,c,p){{var s=rr(e);if(!s){var o="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(o+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var E=gr(c);E?o+=E:o+=Ne();var h;e===null?h="null":Z(e)?h="array":e!==void 0&&e.$$typeof===f?(h="<"+(C(e.type)||"Unknown")+" />",o=" Did you accidentally export a JSX literal instead of a component?"):h=typeof e,R("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",h,o)}var b=kr(e,r,t,c,p);if(b==null)return b;if(s){var x=r.children;if(x!==void 0)if(a)if(Z(x)){for(var I=0;I<x.length;I++)Ce(x[I],e);Object.freeze&&Object.freeze(x)}else R("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Ce(x,e)}return e===l?Er(b):Rr(b),b}}function Pr(e,r,t){return je(e,r,t,!0)}function Tr(e,r,t){return je(e,r,t,!1)}var wr=Tr,xr=Pr;$.Fragment=l,$.jsx=wr,$.jsxs=xr}()),$}(function(i){process.env.NODE_ENV==="production"?i.exports=Ae():i.exports=Ie()})(Fe);const ie=W.Fragment,n=W.jsx,P=W.jsxs,S=({className:i,name:f,viewBox:d="0 0 32 32",...l})=>{const v=[i].filter(Boolean).join(" ");return n("svg",{...l,className:v,viewBox:d,children:n("use",{href:`#${f}`})})},We=({children:i,className:f,skin:d="info",closeAlert:l=!1,onClose:v,title:u,date:k,ariaLive:_="polite",...m})=>{const w=[f,"pkt-alert",d&&`pkt-alert--${d}`].filter(Boolean).join(" "),[y,T]=N.useState(!0),O=()=>{T(!1),v&&v()};return y?P("div",{...m,className:w,"aria-live":_,children:[n("div",{className:"pkt-alert__icon",children:n(S,{name:d==="info"?"alert-information":`alert-${d}`})}),l&&n("div",{className:"pkt-alert__close",children:n("button",{className:"pkt-btn pkt-btn--tertiary pkt-btn--small pkt-btn--icon-only",tabIndex:0,"aria-label":"close",onClick:O,children:n(S,{name:"close",className:"pkt-btn__icon","aria-hidden":"true"})})}),u&&n("div",{className:"pkt-alert__title",children:u}),n("div",{className:"pkt-alert__text",children:i}),k&&P("div",{className:"pkt-alert__date",children:["Sist oppdatert: ",k]})]}):null},Ye=({children:i,className:f,iconName:d="user",secondIconName:l="user",size:v="medium",skin:u="primary",type:k="button",variant:_="label-only",...m})=>{const w=[f,"pkt-btn",v&&`pkt-btn--${v}`,u&&`pkt-btn--${u}`,_&&`pkt-btn--${_}`].filter(Boolean).join(" ");return P("button",{...m,className:w,type:k,children:[n(S,{className:"pkt-btn__icon",name:d}),n("span",{className:"pkt-btn__text",children:i}),_==="icons-right-and-left"&&n(S,{className:"pkt-btn__icon",name:l})]})},$e=({children:i,className:f,logoLink:d="https://www.oslo.kommune.no/",isLoggedIn:l=!1,representing:v="",canChangeRepresentation:u=!1,showLogInButton:k=!0,onLogIn:_,onLogOut:m,onChangeRepresentation:w,...y})=>{const T=[f,"pkt-header"].filter(Boolean).join(" ");return P("header",{id:"pkt-header",className:T,"aria-label":"Topp",children:[n("div",{className:"pkt-header__logo",children:n("a",{"aria-label":"Tilbake til forside",className:"pkt-header__logo-link",href:d,children:n(S,{name:"oslologo",className:"pkt-header__logo-svg",viewBox:"0 0 60 31","aria-hidden":"true"})})}),P("div",{className:"pkt-header__actions",children:[l&&u&&P("button",{className:"pkt-btn pkt-btn--secondary pkt-btn--icon-right","aria-label":`Bytt bruker fra ${v}`,onClick:w,children:[n(S,{name:"user",className:"pkt-btn__icon pkt-show-tablet-up"}),n("span",{className:"pkt-header__action-change pkt-hide pkt-show-tablet-up ml-size-15",children:"Endre"}),n("span",{className:"pkt-btn__text pkt-hide-tablet-up",children:"Endre"}),n("span",{className:"pkt-btn__text--representing pkt-hide pkt-show-tablet-up",children:v})]}),l&&!u&&P("div",{className:"pkt-header__action",children:[n("span",{className:"pkt-header__action-text",children:n("span",{className:"pkt-btn__text pkt-header__action-textrow text-row-inline pkt-truncate-text",children:v})}),n("span",{className:"pkt-header__action-icon pkt-show-phablet-up",children:n(S,{name:"user"})})]}),k&&l&&P("button",{className:"pkt-btn pkt-btn--tertiary pkt-btn--icon-right","aria-label":"Logg ut",onClick:m,children:[n(S,{className:"pkt-btn__icon pkt-show-tablet-up",name:"exit"}),n("span",{className:"pkt-btn__text",children:"Logg ut"})]}),k&&!l&&P("button",{className:"pkt-btn pkt-btn--tertiary pkt-btn--icon-right","aria-label":"Logg inn",onClick:_,children:[n(S,{className:"pkt-btn__icon",name:"user"}),n("span",{className:"pkt-btn__text",children:"Logg inn"})]})]})]})},oe=N.forwardRef(({label:i,id:f,children:d,...l},v)=>P("div",{className:"pkt-form-group",children:[n("label",{htmlFor:f,className:"pkt-form-label",children:i}),n("input",{className:"pkt-form-input",id:f,...l,ref:v}),d]}));oe.displayName="PktInput";const se=N.forwardRef(({id:i,label:f,...d},l)=>P("div",{className:"pkt-form-group",children:[n("label",{htmlFor:i,className:"pkt-form-label",children:f}),n("textarea",{className:"pkt-form-textarea",id:i,ref:l,...d})]}));se.displayName="PktTextarea";const le=N.forwardRef(({id:i,name:f,label:d,value:l,...v},u)=>P("div",{className:"pkt-form-group",children:[n("input",{type:"radio",className:"pkt-form-check-input",id:i,name:f,value:l,ref:u,...v}),n("label",{className:"pkt-form-label",htmlFor:i,children:d})]}));le.displayName="PktRadio";const Le=({label:i,children:f})=>P(ie,{children:[n("p",{children:i}),n("div",{className:"pkt-form-group",children:f})]});var z={},Me={get exports(){return z},set exports(i){z=i}};/*!
27
+ Check the top-level render call using <`+t+">.")}return r}}function Oe(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var t=Rr(r);if(Se[t])return;Se[t]=!0;var a="";e&&e._owner&&e._owner!==ee.current&&(a=" It was passed a child from "+j(e._owner.type)+"."),A(e),R('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',t,a),A(null)}}function je(e,r){{if(typeof e!="object")return;if(Z(e))for(var t=0;t<e.length;t++){var a=e[t];te(a)&&Oe(a,r)}else if(te(e))e._store&&(e._store.validated=!0);else if(e){var u=Ke(e);if(typeof u=="function"&&u!==e.entries)for(var v=u.call(e),s;!(s=v.next()).done;)te(s.value)&&Oe(s.value,r)}}}function Er(e){{var r=e.type;if(r==null||typeof r=="string")return;var t;if(typeof r=="function")t=r.propTypes;else if(typeof r=="object"&&(r.$$typeof===m||r.$$typeof===T))t=r.propTypes;else return;if(t){var a=j(r);cr(t,e.props,"prop",a,e)}else if(r.PropTypes!==void 0&&!re){re=!0;var u=j(r);R("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",u||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&R("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Pr(e){{for(var r=Object.keys(e.props),t=0;t<r.length;t++){var a=r[t];if(a!=="children"&&a!=="key"){A(e),R("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",a),A(null);break}}e.ref!==null&&(A(e),R("Invalid attribute `ref` supplied to `React.Fragment`."),A(null))}}function Ce(e,r,t,a,u,v){{var s=tr(e);if(!s){var i="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(i+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var E=yr(u);E?i+=E:i+=Ne();var b;e===null?b="null":Z(e)?b="array":e!==void 0&&e.$$typeof===c?(b="<"+(j(e.type)||"Unknown")+" />",i=" Did you accidentally export a JSX literal instead of a component?"):b=typeof e,R("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",b,i)}var h=gr(e,r,t,u,v);if(h==null)return h;if(s){var w=r.children;if(w!==void 0)if(a)if(Z(w)){for(var I=0;I<w.length;I++)je(w[I],e);Object.freeze&&Object.freeze(w)}else R("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else je(w,e)}return e===l?Pr(h):Er(h),h}}function Tr(e,r,t){return Ce(e,r,t,!0)}function xr(e,r,t){return Ce(e,r,t,!1)}var wr=xr,Nr=Tr;$.Fragment=l,$.jsx=wr,$.jsxs=Nr}()),$}(function(o){process.env.NODE_ENV==="production"?o.exports=Ae():o.exports=Ie()})(Fe);const oe=W.Fragment,n=W.jsx,P=W.jsxs,S=({className:o,name:c,viewBox:f="0 0 32 32",...l})=>{const p=[o].filter(Boolean).join(" ");return n("svg",{...l,className:p,viewBox:f,children:n("use",{href:`#${c}`})})},We=({children:o,className:c,skin:f="info",closeAlert:l=!1,onClose:p,title:d,date:g,ariaLive:_="polite",...m})=>{const x=[c,"pkt-alert",f&&`pkt-alert--${f}`].filter(Boolean).join(" "),[y,T]=N.useState(!0),O=()=>{T(!1),p&&p()};return y?P("div",{...m,className:x,"aria-live":_,children:[n("div",{className:"pkt-alert__icon",children:n(S,{name:f==="info"?"alert-information":`alert-${f}`})}),l&&n("div",{className:"pkt-alert__close",children:n("button",{className:"pkt-btn pkt-btn--tertiary pkt-btn--small pkt-btn--icon-only",tabIndex:0,"aria-label":"close",onClick:O,children:n(S,{name:"close",className:"pkt-btn__icon","aria-hidden":"true"})})}),d&&n("div",{className:"pkt-alert__title",children:d}),n("div",{className:"pkt-alert__text",children:o}),g&&P("div",{className:"pkt-alert__date",children:["Sist oppdatert: ",g]})]}):null},Ye=({children:o,className:c,iconName:f="user",secondIconName:l="user",size:p="medium",skin:d="primary",type:g="button",variant:_="label-only",...m})=>{const x=[c,"pkt-btn",p&&`pkt-btn--${p}`,d&&`pkt-btn--${d}`,_&&`pkt-btn--${_}`].filter(Boolean).join(" ");return P("button",{...m,className:x,type:g,children:[n(S,{className:"pkt-btn__icon",name:f}),n("span",{className:"pkt-btn__text",children:o}),_==="icons-right-and-left"&&n(S,{className:"pkt-btn__icon",name:l})]})},$e=({children:o,className:c,logoLink:f="https://www.oslo.kommune.no/",isLoggedIn:l=!1,representing:p="",canChangeRepresentation:d=!1,showLogInButton:g=!0,onLogIn:_,onLogOut:m,onChangeRepresentation:x,...y})=>{const T=[c,"pkt-header"].filter(Boolean).join(" ");return P("header",{id:"pkt-header",className:T,"aria-label":"Topp",children:[n("div",{className:"pkt-header__logo",children:n("a",{"aria-label":"Tilbake til forside",className:"pkt-header__logo-link",href:f,children:n(S,{name:"oslologo",className:"pkt-header__logo-svg",viewBox:"0 0 60 31","aria-hidden":"true"})})}),P("div",{className:"pkt-header__actions",children:[l&&d&&P("button",{className:"pkt-btn pkt-btn--secondary pkt-btn--icon-right","aria-label":`Bytt bruker fra ${p}`,onClick:x,children:[n(S,{name:"user",className:"pkt-btn__icon pkt-show-tablet-up"}),n("span",{className:"pkt-header__action-change pkt-hide pkt-show-tablet-up ml-size-15",children:"Endre"}),n("span",{className:"pkt-btn__text pkt-hide-tablet-up",children:"Endre"}),n("span",{className:"pkt-btn__text--representing pkt-hide pkt-show-tablet-up",children:p})]}),l&&!d&&P("div",{className:"pkt-header__action",children:[n("span",{className:"pkt-header__action-text",children:n("span",{className:"pkt-btn__text pkt-header__action-textrow text-row-inline pkt-truncate-text",children:p})}),n("span",{className:"pkt-header__action-icon pkt-show-phablet-up",children:n(S,{name:"user"})})]}),g&&l&&P("button",{className:"pkt-btn pkt-btn--tertiary pkt-btn--icon-right","aria-label":"Logg ut",onClick:m,children:[n(S,{className:"pkt-btn__icon pkt-show-tablet-up",name:"exit"}),n("span",{className:"pkt-btn__text",children:"Logg ut"})]}),g&&!l&&P("button",{className:"pkt-btn pkt-btn--tertiary pkt-btn--icon-right","aria-label":"Logg inn",onClick:_,children:[n(S,{className:"pkt-btn__icon",name:"user"}),n("span",{className:"pkt-btn__text",children:"Logg inn"})]})]})]})},ie=N.forwardRef(({label:o,id:c,children:f,...l},p)=>P("div",{className:"pkt-form-group",children:[n("label",{htmlFor:c,className:"pkt-form-label",children:o}),n("input",{className:"pkt-form-input",id:c,...l,ref:p}),f]}));ie.displayName="PktInput";const Me=({children:o,skin:c="beige",title:f,...l})=>{const p=["pkt-messagebox",c&&`pkt-messagebox--${c}`].filter(Boolean).join(" ");return P("div",{...l,className:p,children:[n("div",{className:"pkt-messagebox__title",children:f}),n("div",{className:"pkt-messagebox__text",children:o})]})},se=N.forwardRef(({id:o,label:c,...f},l)=>P("div",{className:"pkt-form-group",children:[n("label",{htmlFor:o,className:"pkt-form-label",children:c}),n("textarea",{className:"pkt-form-textarea",id:o,ref:l,...f})]}));se.displayName="PktTextarea";const le=N.forwardRef(({id:o,name:c,label:f,value:l,...p},d)=>P("div",{className:"pkt-form-group",children:[n("input",{type:"radio",className:"pkt-form-check-input",id:o,name:c,value:l,ref:d,...p}),n("label",{className:"pkt-form-label",htmlFor:o,children:f})]}));le.displayName="PktRadio";const Le=({label:o,children:c})=>P(oe,{children:[n("p",{children:o}),n("div",{className:"pkt-form-group",children:c})]});var z={},Be={get exports(){return z},set exports(o){z=o}};/*!
28
28
  Copyright (c) 2018 Jed Watson.
29
29
  Licensed under the MIT License (MIT), see
30
30
  http://jedwatson.github.io/classnames
31
- */(function(i){(function(){var f={}.hasOwnProperty;function d(){for(var l=[],v=0;v<arguments.length;v++){var u=arguments[v];if(u){var k=typeof u;if(k==="string"||k==="number")l.push(u);else if(Array.isArray(u)){if(u.length){var _=d.apply(null,u);_&&l.push(_)}}else if(k==="object"){if(u.toString!==Object.prototype.toString&&!u.toString.toString().includes("[native code]")){l.push(u.toString());continue}for(var m in u)f.call(u,m)&&u[m]&&l.push(m)}}}return l.join(" ")}i.exports?(d.default=d,i.exports=d):window.classNames=d})()})(Me);const Ve=z,Be=({isResponsive:i,children:f})=>i?n("div",{className:"pkt-table-container",children:f}):n(ie,{children:f}),Ue=({isResponsive:i,modifiers:{info:f=!1,success:d=!1,strong:l=!1,shadow:v=!1}={},children:u})=>n(Be,{isResponsive:i,children:n("table",{className:Ve("pkt-table",{"pkt-table--info":f,"pkt-table--success":d,"pkt-table--strong":l,"pkt-table--shadow":v}),children:u})}),Ge=({children:i})=>n("td",{className:"pkt-table__th",children:i}),He=({children:i})=>n("th",{className:"pkt-table__th",children:i});g.PktAlert=We,g.PktButton=Ye,g.PktHeader=$e,g.PktInput=oe,g.PktRadio=le,g.PktRadioGroup=Le,g.PktTable=Ue,g.PktTableData=Ge,g.PktTableHeader=He,g.PktTextarea=se,Object.defineProperty(g,Symbol.toStringTag,{value:"Module"})});
31
+ */(function(o){(function(){var c={}.hasOwnProperty;function f(){for(var l=[],p=0;p<arguments.length;p++){var d=arguments[p];if(d){var g=typeof d;if(g==="string"||g==="number")l.push(d);else if(Array.isArray(d)){if(d.length){var _=f.apply(null,d);_&&l.push(_)}}else if(g==="object"){if(d.toString!==Object.prototype.toString&&!d.toString.toString().includes("[native code]")){l.push(d.toString());continue}for(var m in d)c.call(d,m)&&d[m]&&l.push(m)}}}return l.join(" ")}o.exports?(f.default=f,o.exports=f):window.classNames=f})()})(Be);const Ve=z,Ue=({isResponsive:o,children:c})=>o?n("div",{className:"pkt-table-container",children:c}):n(oe,{children:c}),Ge=({isResponsive:o,modifiers:{info:c=!1,success:f=!1,strong:l=!1,shadow:p=!1}={},children:d})=>n(Ue,{isResponsive:o,children:n("table",{className:Ve("pkt-table",{"pkt-table--info":c,"pkt-table--success":f,"pkt-table--strong":l,"pkt-table--shadow":p}),children:d})}),He=({children:o})=>n("td",{className:"pkt-table__th",children:o}),Je=({children:o})=>n("th",{className:"pkt-table__th",children:o});k.PktAlert=We,k.PktButton=Ye,k.PktHeader=$e,k.PktInput=ie,k.PktMessagebox=Me,k.PktRadio=le,k.PktRadioGroup=Le,k.PktTable=Ge,k.PktTableData=He,k.PktTableHeader=Je,k.PktTextarea=se,Object.defineProperty(k,Symbol.toStringTag,{value:"Module"})});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oslokommune/punkt-react",
3
- "version": "3.0.2",
3
+ "version": "3.1.1",
4
4
  "description": "React komponentbibliotek til Punkt, et designsystem laget av Oslo Origo",
5
5
  "homepage": "https://punkt.oslo.kommune.no",
6
6
  "author": "Team Designsystem, Oslo Origo",
@@ -30,8 +30,8 @@
30
30
  "preview": "vite preview --outDir dist-app"
31
31
  },
32
32
  "devDependencies": {
33
- "@oslokommune/punkt-assets": "^3.0.0",
34
- "@oslokommune/punkt-css": "^3.0.2",
33
+ "@oslokommune/punkt-assets": "^3.1.1",
34
+ "@oslokommune/punkt-css": "^3.1.1",
35
35
  "@testing-library/react": "^14.0.0",
36
36
  "@types/jest": "^29.4.0",
37
37
  "@types/node": "^18.14.1",
@@ -80,5 +80,5 @@
80
80
  "url": "https://github.com/oslokommune/punkt/issues"
81
81
  },
82
82
  "license": "MIT",
83
- "gitHead": "f524e3e0014929ad7f9034afdd9a3fda050673c6"
83
+ "gitHead": "7c3dbc3909ada6d66ad4a2e4c9027ce24fe75f16"
84
84
  }
@@ -2,6 +2,7 @@ export { PktAlert } from './alert/Alert'
2
2
  export { PktButton } from './button/Button'
3
3
  export { PktHeader } from './header/Header'
4
4
  export { PktInput } from './input/Input'
5
+ export { PktMessagebox } from './messagebox/Messagebox'
5
6
  export { PktTextarea } from './textarea/Textarea'
6
7
  export { PktRadio } from './radio/Radio'
7
8
  export { PktRadioGroup } from './radioGroup/RadioGroup'
@@ -0,0 +1,23 @@
1
+ import React, { useState } from 'react'
2
+
3
+ export interface IPktMessagebox extends React.HTMLAttributes<HTMLDivElement> {
4
+ skin?: 'beige' | 'red' | 'green' | 'blue'
5
+ title?: string
6
+ }
7
+
8
+ export const PktMessagebox: React.FC<IPktMessagebox> = ({
9
+ children,
10
+ skin = 'beige',
11
+ title,
12
+ ...props
13
+ }) => {
14
+ const classes = ['pkt-messagebox', skin && `pkt-messagebox--${skin}`].filter(Boolean).join(' ')
15
+
16
+ return (
17
+ <div {...props} className={classes}>
18
+ <div className="pkt-messagebox__title">{title}</div>
19
+
20
+ <div className="pkt-messagebox__text">{children}</div>
21
+ </div>
22
+ )
23
+ }