@oslokommune/punkt-react 1.0.1 → 2.0.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
@@ -3,6 +3,40 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [2.0.1](https://github.com/oslokommune/punkt/compare/v2.0.0...v2.0.1) (2023-03-07)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * Endre flat-button i alert ([#697](https://github.com/oslokommune/punkt/issues/697)) ([c98aa2a](https://github.com/oslokommune/punkt/commit/c98aa2aa647a8c200013e2770ba5b0e7d17c7a26))
12
+
13
+
14
+
15
+ ## [2.0.0](https://github.com/oslokommune/punkt/compare/v1.0.2...v2.0.0) (2023-03-07)
16
+
17
+
18
+ ### ⚠ BREAKING CHANGES
19
+
20
+ * #595 Button (#696)
21
+ Buttons har fått ny styling og buttonskins har gått fra 5 til 3:
22
+
23
+ - Primary: Ny styling
24
+ - Secondary: Ny styling
25
+ - Tertiary: **breaking** har fått stylingen til flat-button
26
+
27
+ - Flat: **breaking** fjernet
28
+ - Primary-confirm: **breaking** fjernet
29
+
30
+ **Migrering**:
31
+ - Endre Flat til Tertiary
32
+ - Endre gammel Tertiary til Secondary (du kan overstyre fargen selv)
33
+
34
+ ### Features
35
+
36
+ * [#595](https://github.com/oslokommune/punkt/issues/595) Button ([#696](https://github.com/oslokommune/punkt/issues/696)) ([8870dd7](https://github.com/oslokommune/punkt/commit/8870dd732251160f06d59691064045b111c19ed7))
37
+
38
+
39
+
6
40
  ## [1.0.1](https://github.com/oslokommune/punkt/compare/v1.0.0...v1.0.1) (2023-02-27)
7
41
 
8
42
 
@@ -1,10 +1,12 @@
1
1
  import React from 'react';
2
2
  export interface IPktButton extends React.ButtonHTMLAttributes<HTMLButtonElement> {
3
3
  iconName?: string;
4
+ secondIconName?: string;
4
5
  mode?: 'light' | 'dark';
5
6
  size?: 'small' | 'medium' | 'large';
6
- skin?: 'primary' | 'secondary' | 'tertiary' | 'flat' | 'primary-confirm';
7
+ skin?: 'primary' | 'secondary' | 'tertiary';
8
+ variant?: 'label-only' | 'icon-left' | 'icon-right' | 'icon-only' | 'icons-right-and-left';
7
9
  state?: 'normal' | 'focus' | 'hover' | 'active';
8
- variant?: 'label-only' | 'icon-left' | 'icon-right' | 'icon-only';
10
+ onClick?: (event: React.MouseEvent<HTMLButtonElement>) => void;
9
11
  }
10
12
  export declare const PktButton: React.FC<IPktButton>;
@@ -21,18 +21,18 @@ function pr() {
21
21
  if (Pe)
22
22
  return I;
23
23
  Pe = 1;
24
- var n = re, c = Symbol.for("react.element"), p = Symbol.for("react.fragment"), u = Object.prototype.hasOwnProperty, v = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, d = { key: !0, ref: !0, __self: !0, __source: !0 };
25
- function _(y, m, O) {
24
+ var n = re, c = Symbol.for("react.element"), p = Symbol.for("react.fragment"), u = Object.prototype.hasOwnProperty, v = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, f = { key: !0, ref: !0, __self: !0, __source: !0 };
25
+ function y(_, m, w) {
26
26
  var E, x = {}, S = null, L = null;
27
- O !== void 0 && (S = "" + O), m.key !== void 0 && (S = "" + m.key), m.ref !== void 0 && (L = m.ref);
27
+ w !== void 0 && (S = "" + w), m.key !== void 0 && (S = "" + m.key), m.ref !== void 0 && (L = m.ref);
28
28
  for (E in m)
29
- u.call(m, E) && !d.hasOwnProperty(E) && (x[E] = m[E]);
30
- if (y && y.defaultProps)
31
- for (E in m = y.defaultProps, m)
29
+ u.call(m, E) && !f.hasOwnProperty(E) && (x[E] = m[E]);
30
+ if (_ && _.defaultProps)
31
+ for (E in m = _.defaultProps, m)
32
32
  x[E] === void 0 && (x[E] = m[E]);
33
- return { $$typeof: c, type: y, key: S, ref: L, props: x, _owner: v.current };
33
+ return { $$typeof: c, type: _, key: S, ref: L, props: x, _owner: v.current };
34
34
  }
35
- return I.Fragment = p, I.jsx = _, I.jsxs = _, I;
35
+ return I.Fragment = p, I.jsx = y, I.jsxs = y, I;
36
36
  }
37
37
  var W = {};
38
38
  /**
@@ -47,14 +47,14 @@ var W = {};
47
47
  var Oe;
48
48
  function vr() {
49
49
  return Oe || (Oe = 1, process.env.NODE_ENV !== "production" && function() {
50
- var n = re, c = Symbol.for("react.element"), p = Symbol.for("react.portal"), u = Symbol.for("react.fragment"), v = Symbol.for("react.strict_mode"), d = Symbol.for("react.profiler"), _ = Symbol.for("react.provider"), y = Symbol.for("react.context"), m = Symbol.for("react.forward_ref"), O = Symbol.for("react.suspense"), E = Symbol.for("react.suspense_list"), x = Symbol.for("react.memo"), S = Symbol.for("react.lazy"), L = Symbol.for("react.offscreen"), te = Symbol.iterator, Ne = "@@iterator";
50
+ var n = re, c = Symbol.for("react.element"), p = Symbol.for("react.portal"), u = Symbol.for("react.fragment"), v = Symbol.for("react.strict_mode"), f = Symbol.for("react.profiler"), y = Symbol.for("react.provider"), _ = Symbol.for("react.context"), m = Symbol.for("react.forward_ref"), w = Symbol.for("react.suspense"), E = Symbol.for("react.suspense_list"), x = Symbol.for("react.memo"), S = Symbol.for("react.lazy"), L = Symbol.for("react.offscreen"), te = Symbol.iterator, Ne = "@@iterator";
51
51
  function je(e) {
52
52
  if (e === null || typeof e != "object")
53
53
  return null;
54
54
  var r = te && e[te] || e[Ne];
55
55
  return typeof r == "function" ? r : null;
56
56
  }
57
- var N = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
57
+ var j = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
58
58
  function g(e) {
59
59
  {
60
60
  for (var r = arguments.length, t = new Array(r > 1 ? r - 1 : 0), a = 1; a < r; a++)
@@ -64,18 +64,18 @@ function vr() {
64
64
  }
65
65
  function Fe(e, r, t) {
66
66
  {
67
- var a = N.ReactDebugCurrentFrame, l = a.getStackAddendum();
67
+ var a = j.ReactDebugCurrentFrame, l = a.getStackAddendum();
68
68
  l !== "" && (r += "%s", t = t.concat([l]));
69
- var f = t.map(function(i) {
69
+ var d = t.map(function(i) {
70
70
  return String(i);
71
71
  });
72
- f.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, f);
72
+ d.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, d);
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 === u || e === d || We || e === v || e === O || e === E || Ie || e === L || De || Ae || $e || typeof e == "object" && e !== null && (e.$$typeof === S || e.$$typeof === x || e.$$typeof === _ || e.$$typeof === y || e.$$typeof === m || // This needs to include all possible module reference object
78
+ return !!(typeof e == "string" || typeof e == "function" || e === u || e === f || We || e === v || e === w || e === E || Ie || e === L || De || Ae || $e || typeof e == "object" && e !== null && (e.$$typeof === S || e.$$typeof === x || e.$$typeof === y || 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.
@@ -91,7 +91,7 @@ function vr() {
91
91
  function ne(e) {
92
92
  return e.displayName || "Context";
93
93
  }
94
- function w(e) {
94
+ function P(e) {
95
95
  if (e == null)
96
96
  return null;
97
97
  if (typeof e.tag == "number" && g("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
@@ -103,32 +103,32 @@ function vr() {
103
103
  return "Fragment";
104
104
  case p:
105
105
  return "Portal";
106
- case d:
106
+ case f:
107
107
  return "Profiler";
108
108
  case v:
109
109
  return "StrictMode";
110
- case O:
110
+ case w:
111
111
  return "Suspense";
112
112
  case E:
113
113
  return "SuspenseList";
114
114
  }
115
115
  if (typeof e == "object")
116
116
  switch (e.$$typeof) {
117
- case y:
117
+ case _:
118
118
  var r = e;
119
119
  return ne(r) + ".Consumer";
120
- case _:
120
+ case y:
121
121
  var t = e;
122
122
  return ne(t._context) + ".Provider";
123
123
  case m:
124
124
  return Le(e, e.render, "ForwardRef");
125
125
  case x:
126
126
  var a = e.displayName || null;
127
- return a !== null ? a : w(e.type) || "Memo";
127
+ return a !== null ? a : P(e.type) || "Memo";
128
128
  case S: {
129
- var l = e, f = l._payload, i = l._init;
129
+ var l = e, d = l._payload, i = l._init;
130
130
  try {
131
- return w(i(f));
131
+ return P(i(d));
132
132
  } catch {
133
133
  return null;
134
134
  }
@@ -198,7 +198,7 @@ function vr() {
198
198
  A < 0 && g("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
199
199
  }
200
200
  }
201
- var G = N.ReactCurrentDispatcher, J;
201
+ var G = j.ReactCurrentDispatcher, J;
202
202
  function V(e, r, t) {
203
203
  {
204
204
  if (J === void 0)
@@ -229,8 +229,8 @@ function vr() {
229
229
  z = !0;
230
230
  var l = Error.prepareStackTrace;
231
231
  Error.prepareStackTrace = void 0;
232
- var f;
233
- f = G.current, G.current = null, Ve();
232
+ var d;
233
+ d = G.current, G.current = null, Ve();
234
234
  try {
235
235
  if (r) {
236
236
  var i = function() {
@@ -243,29 +243,29 @@ function vr() {
243
243
  }), typeof Reflect == "object" && Reflect.construct) {
244
244
  try {
245
245
  Reflect.construct(i, []);
246
- } catch (P) {
247
- a = P;
246
+ } catch (O) {
247
+ a = O;
248
248
  }
249
249
  Reflect.construct(e, [], i);
250
250
  } else {
251
251
  try {
252
252
  i.call();
253
- } catch (P) {
254
- a = P;
253
+ } catch (O) {
254
+ a = O;
255
255
  }
256
256
  e.call(i.prototype);
257
257
  }
258
258
  } else {
259
259
  try {
260
260
  throw Error();
261
- } catch (P) {
262
- a = P;
261
+ } catch (O) {
262
+ a = O;
263
263
  }
264
264
  e();
265
265
  }
266
- } catch (P) {
267
- if (P && a && typeof P.stack == "string") {
268
- for (var o = P.stack.split(`
266
+ } catch (O) {
267
+ if (O && a && typeof O.stack == "string") {
268
+ for (var o = O.stack.split(`
269
269
  `), k = a.stack.split(`
270
270
  `), h = o.length - 1, b = k.length - 1; h >= 1 && b >= 0 && o[h] !== k[b]; )
271
271
  b--;
@@ -283,9 +283,9 @@ function vr() {
283
283
  }
284
284
  }
285
285
  } finally {
286
- z = !1, G.current = f, Me(), Error.prepareStackTrace = l;
286
+ z = !1, G.current = d, Me(), Error.prepareStackTrace = l;
287
287
  }
288
- var F = e ? e.displayName || e.name : "", we = F ? V(F) : "";
288
+ var D = e ? e.displayName || e.name : "", we = D ? V(D) : "";
289
289
  return typeof e == "function" && M.set(e, we), we;
290
290
  }
291
291
  function Be(e, r, t) {
@@ -303,7 +303,7 @@ function vr() {
303
303
  if (typeof e == "string")
304
304
  return V(e);
305
305
  switch (e) {
306
- case O:
306
+ case w:
307
307
  return V("Suspense");
308
308
  case E:
309
309
  return V("SuspenseList");
@@ -315,16 +315,16 @@ function vr() {
315
315
  case x:
316
316
  return U(e.type, r, t);
317
317
  case S: {
318
- var a = e, l = a._payload, f = a._init;
318
+ var a = e, l = a._payload, d = a._init;
319
319
  try {
320
- return U(f(l), r, t);
320
+ return U(d(l), r, t);
321
321
  } catch {
322
322
  }
323
323
  }
324
324
  }
325
325
  return "";
326
326
  }
327
- var B = Object.prototype.hasOwnProperty, ve = {}, me = N.ReactDebugCurrentFrame;
327
+ var B = Object.prototype.hasOwnProperty, ve = {}, me = j.ReactDebugCurrentFrame;
328
328
  function q(e) {
329
329
  if (e) {
330
330
  var r = e._owner, t = U(e.type, e._source, r ? r.type : null);
@@ -334,9 +334,9 @@ function vr() {
334
334
  }
335
335
  function Ge(e, r, t, a, l) {
336
336
  {
337
- var f = Function.call.bind(B);
337
+ var d = Function.call.bind(B);
338
338
  for (var i in e)
339
- if (f(e, i)) {
339
+ if (d(e, i)) {
340
340
  var o = void 0;
341
341
  try {
342
342
  if (typeof e[i] != "function") {
@@ -375,7 +375,7 @@ function vr() {
375
375
  if (He(e))
376
376
  return g("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", ze(e)), he(e);
377
377
  }
378
- var $ = N.ReactCurrentOwner, Ke = {
378
+ var $ = j.ReactCurrentOwner, Ke = {
379
379
  key: !0,
380
380
  ref: !0,
381
381
  __self: !0,
@@ -400,8 +400,8 @@ function vr() {
400
400
  }
401
401
  function Qe(e, r) {
402
402
  if (typeof e.ref == "string" && $.current && r && $.current.stateNode !== r) {
403
- var t = w($.current.type);
404
- K[t] || (g('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', w($.current.type), e.ref), K[t] = !0);
403
+ var t = P($.current.type);
404
+ K[t] || (g('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', P($.current.type), e.ref), K[t] = !0);
405
405
  }
406
406
  }
407
407
  function er(e, r) {
@@ -426,7 +426,7 @@ function vr() {
426
426
  });
427
427
  }
428
428
  }
429
- var tr = function(e, r, t, a, l, f, i) {
429
+ var tr = function(e, r, t, a, l, d, i) {
430
430
  var o = {
431
431
  // This tag allows us to uniquely identify this as a React Element
432
432
  $$typeof: c,
@@ -436,7 +436,7 @@ function vr() {
436
436
  ref: t,
437
437
  props: i,
438
438
  // Record the component responsible for creating this element.
439
- _owner: f
439
+ _owner: d
440
440
  };
441
441
  return o._store = {}, Object.defineProperty(o._store, "validated", {
442
442
  configurable: !1,
@@ -457,14 +457,14 @@ function vr() {
457
457
  };
458
458
  function ar(e, r, t, a, l) {
459
459
  {
460
- var f, i = {}, o = null, k = null;
460
+ var d, i = {}, o = null, k = null;
461
461
  t !== void 0 && (be(t), o = "" + t), Ze(r) && (be(r.key), o = "" + r.key), Xe(r) && (k = r.ref, Qe(r, l));
462
- for (f in r)
463
- B.call(r, f) && !Ke.hasOwnProperty(f) && (i[f] = r[f]);
462
+ for (d in r)
463
+ B.call(r, d) && !Ke.hasOwnProperty(d) && (i[d] = r[d]);
464
464
  if (e && e.defaultProps) {
465
465
  var h = e.defaultProps;
466
- for (f in h)
467
- i[f] === void 0 && (i[f] = h[f]);
466
+ for (d in h)
467
+ i[d] === void 0 && (i[d] = h[d]);
468
468
  }
469
469
  if (o || k) {
470
470
  var b = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
@@ -473,8 +473,8 @@ function vr() {
473
473
  return tr(e, o, k, l, a, $.current, i);
474
474
  }
475
475
  }
476
- var X = N.ReactCurrentOwner, ke = N.ReactDebugCurrentFrame;
477
- function j(e) {
476
+ var X = j.ReactCurrentOwner, ke = j.ReactDebugCurrentFrame;
477
+ function F(e) {
478
478
  if (e) {
479
479
  var r = e._owner, t = U(e.type, e._source, r ? r.type : null);
480
480
  ke.setExtraStackFrame(t);
@@ -489,7 +489,7 @@ function vr() {
489
489
  function ye() {
490
490
  {
491
491
  if (X.current) {
492
- var e = w(X.current.type);
492
+ var e = P(X.current.type);
493
493
  if (e)
494
494
  return `
495
495
 
@@ -532,7 +532,7 @@ Check the top-level render call using <` + t + ">.");
532
532
  return;
533
533
  Ee[t] = !0;
534
534
  var a = "";
535
- e && e._owner && e._owner !== X.current && (a = " It was passed a child from " + w(e._owner.type) + "."), j(e), g('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), j(null);
535
+ e && e._owner && e._owner !== X.current && (a = " It was passed a child from " + P(e._owner.type) + "."), F(e), g('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), F(null);
536
536
  }
537
537
  }
538
538
  function xe(e, r) {
@@ -549,7 +549,7 @@ Check the top-level render call using <` + t + ">.");
549
549
  else if (e) {
550
550
  var l = je(e);
551
551
  if (typeof l == "function" && l !== e.entries)
552
- for (var f = l.call(e), i; !(i = f.next()).done; )
552
+ for (var d = l.call(e), i; !(i = d.next()).done; )
553
553
  Q(i.value) && Re(i.value, r);
554
554
  }
555
555
  }
@@ -569,11 +569,11 @@ Check the top-level render call using <` + t + ">.");
569
569
  else
570
570
  return;
571
571
  if (t) {
572
- var a = w(r);
572
+ var a = P(r);
573
573
  Ge(t, e.props, "prop", a, e);
574
574
  } else if (r.PropTypes !== void 0 && !Z) {
575
575
  Z = !0;
576
- var l = w(r);
576
+ var l = P(r);
577
577
  g("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", l || "Unknown");
578
578
  }
579
579
  typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && g("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
@@ -584,14 +584,14 @@ Check the top-level render call using <` + t + ">.");
584
584
  for (var r = Object.keys(e.props), t = 0; t < r.length; t++) {
585
585
  var a = r[t];
586
586
  if (a !== "children" && a !== "key") {
587
- j(e), g("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", a), j(null);
587
+ F(e), g("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", a), F(null);
588
588
  break;
589
589
  }
590
590
  }
591
- e.ref !== null && (j(e), g("Invalid attribute `ref` supplied to `React.Fragment`."), j(null));
591
+ e.ref !== null && (F(e), g("Invalid attribute `ref` supplied to `React.Fragment`."), F(null));
592
592
  }
593
593
  }
594
- function Te(e, r, t, a, l, f) {
594
+ function Te(e, r, t, a, l, d) {
595
595
  {
596
596
  var i = Ye(e);
597
597
  if (!i) {
@@ -600,9 +600,9 @@ Check the top-level render call using <` + t + ">.");
600
600
  var k = nr(l);
601
601
  k ? o += k : o += ye();
602
602
  var h;
603
- e === null ? h = "null" : H(e) ? h = "array" : e !== void 0 && e.$$typeof === c ? (h = "<" + (w(e.type) || "Unknown") + " />", o = " Did you accidentally export a JSX literal instead of a component?") : h = typeof e, g("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);
603
+ e === null ? h = "null" : H(e) ? h = "array" : e !== void 0 && e.$$typeof === c ? (h = "<" + (P(e.type) || "Unknown") + " />", o = " Did you accidentally export a JSX literal instead of a component?") : h = typeof e, g("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);
604
604
  }
605
- var b = ar(e, r, t, l, f);
605
+ var b = ar(e, r, t, l, d);
606
606
  if (b == null)
607
607
  return b;
608
608
  if (i) {
@@ -610,8 +610,8 @@ Check the top-level render call using <` + t + ">.");
610
610
  if (R !== void 0)
611
611
  if (a)
612
612
  if (H(R)) {
613
- for (var F = 0; F < R.length; F++)
614
- xe(R[F], e);
613
+ for (var D = 0; D < R.length; D++)
614
+ xe(R[D], e);
615
615
  Object.freeze && Object.freeze(R);
616
616
  } else
617
617
  g("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
@@ -634,7 +634,7 @@ Check the top-level render call using <` + t + ">.");
634
634
  (function(n) {
635
635
  process.env.NODE_ENV === "production" ? n.exports = pr() : n.exports = vr();
636
636
  })(dr);
637
- const Ce = Y.Fragment, s = Y.jsx, T = Y.jsxs, D = ({
637
+ const Ce = Y.Fragment, s = Y.jsx, T = Y.jsxs, N = ({
638
638
  className: n,
639
639
  name: c,
640
640
  viewBox: p = "0 0 32 32",
@@ -646,22 +646,24 @@ const Ce = Y.Fragment, s = Y.jsx, T = Y.jsxs, D = ({
646
646
  children: n,
647
647
  className: c,
648
648
  iconName: p = "user",
649
- size: u = "medium",
650
- skin: v = "primary",
651
- type: d = "button",
649
+ secondIconName: u = "user",
650
+ size: v = "medium",
651
+ skin: f = "primary",
652
+ type: y = "button",
652
653
  variant: _ = "label-only",
653
- ...y
654
+ ...m
654
655
  }) => {
655
- const m = [
656
+ const w = [
656
657
  c,
657
658
  "pkt-btn",
658
- u && `pkt-btn--${u}`,
659
659
  v && `pkt-btn--${v}`,
660
+ f && `pkt-btn--${f}`,
660
661
  _ && `pkt-btn--${_}`
661
662
  ].filter(Boolean).join(" ");
662
- return /* @__PURE__ */ T("button", { ...y, className: m, type: d, children: [
663
- /* @__PURE__ */ s(D, { className: "pkt-btn__icon", name: p }),
664
- /* @__PURE__ */ s("span", { className: "pkt-btn__text", children: n })
663
+ return /* @__PURE__ */ T("button", { ...m, className: w, type: y, children: [
664
+ /* @__PURE__ */ s(N, { className: "pkt-btn__icon", name: p }),
665
+ /* @__PURE__ */ s("span", { className: "pkt-btn__text", children: n }),
666
+ _ === "icons-right-and-left" && /* @__PURE__ */ s(N, { className: "pkt-btn__icon", name: u })
665
667
  ] });
666
668
  }, Rr = ({
667
669
  children: n,
@@ -669,43 +671,67 @@ const Ce = Y.Fragment, s = Y.jsx, T = Y.jsxs, D = ({
669
671
  logoLink: p = "https://www.oslo.kommune.no/",
670
672
  isLoggedIn: u = !1,
671
673
  representing: v = "",
672
- canChangeRepresentation: d = !1,
673
- showLogInButton: _ = !0,
674
- onLogIn: y,
674
+ canChangeRepresentation: f = !1,
675
+ showLogInButton: y = !0,
676
+ onLogIn: _,
675
677
  onLogOut: m,
676
- onChangeRepresentation: O,
678
+ onChangeRepresentation: w,
677
679
  ...E
678
680
  }) => {
679
681
  const x = [c, "pkt-header"].filter(Boolean).join(" ");
680
682
  return /* @__PURE__ */ T("header", { id: "pkt-header", className: x, "aria-label": "Topp", children: [
681
- /* @__PURE__ */ s("div", { className: "pkt-header__logo", children: /* @__PURE__ */ s("a", { "aria-label": "Tilbake til forside", className: "pkt-header__logo-link", href: p, children: /* @__PURE__ */ s(D, { name: "oslologo", className: "pkt-header__logo-svg", viewBox: "0 0 60 31", "aria-hidden": "true" }) }) }),
683
+ /* @__PURE__ */ s("div", { className: "pkt-header__logo", children: /* @__PURE__ */ s("a", { "aria-label": "Tilbake til forside", className: "pkt-header__logo-link", href: p, children: /* @__PURE__ */ s(
684
+ N,
685
+ {
686
+ name: "oslologo",
687
+ className: "pkt-header__logo-svg",
688
+ viewBox: "0 0 60 31",
689
+ "aria-hidden": "true"
690
+ }
691
+ ) }) }),
682
692
  /* @__PURE__ */ T("div", { className: "pkt-header__actions", children: [
683
- u && d && /* @__PURE__ */ T(
693
+ u && f && /* @__PURE__ */ T(
684
694
  "button",
685
695
  {
686
696
  className: "pkt-btn pkt-btn--secondary pkt-btn--icon-right",
687
697
  "aria-label": `Bytt bruker fra ${v}`,
688
- onClick: O,
698
+ onClick: w,
689
699
  children: [
690
- /* @__PURE__ */ s(D, { name: "user", className: "pkt-btn__icon pkt-show-tablet-up" }),
700
+ /* @__PURE__ */ s(N, { name: "user", className: "pkt-btn__icon pkt-show-tablet-up" }),
691
701
  /* @__PURE__ */ s("span", { className: "pkt-header__action-change pkt-hide pkt-show-tablet-up ml-size-15", children: "Endre" }),
692
702
  /* @__PURE__ */ s("span", { className: "pkt-btn__text pkt-hide-tablet-up", children: "Endre" }),
693
703
  /* @__PURE__ */ s("span", { className: "pkt-btn__text--representing pkt-hide pkt-show-tablet-up", children: v })
694
704
  ]
695
705
  }
696
706
  ),
697
- u && !d && /* @__PURE__ */ T("div", { className: "pkt-header__action", children: [
707
+ u && !f && /* @__PURE__ */ T("div", { className: "pkt-header__action", children: [
698
708
  /* @__PURE__ */ s("span", { className: "pkt-header__action-text", children: /* @__PURE__ */ s("span", { className: "pkt-btn__text pkt-header__action-textrow text-row-inline truncate-text", children: v }) }),
699
- /* @__PURE__ */ s("span", { className: "pkt-header__action-icon pkt-show-phablet-up", children: /* @__PURE__ */ s(D, { name: "user" }) })
700
- ] }),
701
- _ && u && /* @__PURE__ */ T("button", { className: "pkt-btn pkt-btn--flat pkt-btn--icon-right", "aria-label": "Logg ut", onClick: m, children: [
702
- /* @__PURE__ */ s(D, { className: "pkt-btn__icon pkt-show-tablet-up", name: "exit" }),
703
- /* @__PURE__ */ s("span", { className: "pkt-btn__text", children: "Logg ut" })
709
+ /* @__PURE__ */ s("span", { className: "pkt-header__action-icon pkt-show-phablet-up", children: /* @__PURE__ */ s(N, { name: "user" }) })
704
710
  ] }),
705
- _ && !u && /* @__PURE__ */ T("button", { className: "pkt-btn pkt-btn--flat pkt-btn--icon-right", "aria-label": "Logg inn", onClick: y, children: [
706
- /* @__PURE__ */ s(D, { className: "pkt-btn__icon", name: "user" }),
707
- /* @__PURE__ */ s("span", { className: "pkt-btn__text", children: "Logg inn" })
708
- ] })
711
+ y && u && /* @__PURE__ */ T(
712
+ "button",
713
+ {
714
+ className: "pkt-btn pkt-btn--tertiary pkt-btn--icon-right",
715
+ "aria-label": "Logg ut",
716
+ onClick: m,
717
+ children: [
718
+ /* @__PURE__ */ s(N, { className: "pkt-btn__icon pkt-show-tablet-up", name: "exit" }),
719
+ /* @__PURE__ */ s("span", { className: "pkt-btn__text", children: "Logg ut" })
720
+ ]
721
+ }
722
+ ),
723
+ y && !u && /* @__PURE__ */ T(
724
+ "button",
725
+ {
726
+ className: "pkt-btn pkt-btn--tertiary pkt-btn--icon-right",
727
+ "aria-label": "Logg inn",
728
+ onClick: _,
729
+ children: [
730
+ /* @__PURE__ */ s(N, { className: "pkt-btn__icon", name: "user" }),
731
+ /* @__PURE__ */ s("span", { className: "pkt-btn__text", children: "Logg inn" })
732
+ ]
733
+ }
734
+ )
709
735
  ] })
710
736
  ] });
711
737
  }, mr = re.forwardRef(
@@ -724,8 +750,8 @@ const hr = Se(
724
750
  );
725
751
  hr.displayName = "PktTextarea";
726
752
  const br = Se(
727
- ({ id: n, name: c, label: p, value: u, ...v }, d) => /* @__PURE__ */ T("div", { className: "pkt-form-group", children: [
728
- /* @__PURE__ */ s("input", { type: "radio", className: "pkt-form-check-input", id: n, name: c, value: u, ref: d, ...v }),
753
+ ({ id: n, name: c, label: p, value: u, ...v }, f) => /* @__PURE__ */ T("div", { className: "pkt-form-group", children: [
754
+ /* @__PURE__ */ s("input", { type: "radio", className: "pkt-form-check-input", id: n, name: c, value: u, ref: f, ...v }),
729
755
  /* @__PURE__ */ s("label", { className: "pkt-form-label", htmlFor: n, children: p })
730
756
  ] })
731
757
  );
@@ -752,23 +778,23 @@ var ee = {}, _r = {
752
778
  var c = {}.hasOwnProperty;
753
779
  function p() {
754
780
  for (var u = [], v = 0; v < arguments.length; v++) {
755
- var d = arguments[v];
756
- if (d) {
757
- var _ = typeof d;
758
- if (_ === "string" || _ === "number")
759
- u.push(d);
760
- else if (Array.isArray(d)) {
761
- if (d.length) {
762
- var y = p.apply(null, d);
763
- y && u.push(y);
781
+ var f = arguments[v];
782
+ if (f) {
783
+ var y = typeof f;
784
+ if (y === "string" || y === "number")
785
+ u.push(f);
786
+ else if (Array.isArray(f)) {
787
+ if (f.length) {
788
+ var _ = p.apply(null, f);
789
+ _ && u.push(_);
764
790
  }
765
- } else if (_ === "object") {
766
- if (d.toString !== Object.prototype.toString && !d.toString.toString().includes("[native code]")) {
767
- u.push(d.toString());
791
+ } else if (y === "object") {
792
+ if (f.toString !== Object.prototype.toString && !f.toString.toString().includes("[native code]")) {
793
+ u.push(f.toString());
768
794
  continue;
769
795
  }
770
- for (var m in d)
771
- c.call(d, m) && d[m] && u.push(m);
796
+ for (var m in f)
797
+ c.call(f, m) && f[m] && u.push(m);
772
798
  }
773
799
  }
774
800
  }
@@ -780,7 +806,7 @@ var ee = {}, _r = {
780
806
  const gr = ee, kr = ({ isResponsive: n, children: c }) => n ? /* @__PURE__ */ s("div", { className: "pkt-table-container", children: c }) : /* @__PURE__ */ s(Ce, { children: c }), Tr = ({
781
807
  isResponsive: n,
782
808
  modifiers: { info: c = !1, success: p = !1, strong: u = !1, shadow: v = !1 } = {},
783
- children: d
809
+ children: f
784
810
  }) => /* @__PURE__ */ s(kr, { isResponsive: n, children: /* @__PURE__ */ s(
785
811
  "table",
786
812
  {
@@ -790,7 +816,7 @@ const gr = ee, kr = ({ isResponsive: n, children: c }) => n ? /* @__PURE__ */ s(
790
816
  "pkt-table--strong": u,
791
817
  "pkt-table--shadow": v
792
818
  }),
793
- children: d
819
+ children: f
794
820
  }
795
821
  ) }), wr = ({ children: n }) => /* @__PURE__ */ s("td", { className: "pkt-table__th", children: n }), Pr = ({ children: n }) => /* @__PURE__ */ s("th", { className: "pkt-table__th", children: n });
796
822
  export {
@@ -1,4 +1,4 @@
1
- (function(_,x){typeof exports=="object"&&typeof module<"u"?x(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],x):(_=typeof globalThis<"u"?globalThis:_||self,x(_["punkt-react"]={},_.React))})(this,function(_,x){"use strict";var W={},De={get exports(){return W},set exports(n){W=n}},Y={};/**
1
+ (function(k,O){typeof exports=="object"&&typeof module<"u"?O(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],O):(k=typeof globalThis<"u"?globalThis:k||self,O(k["punkt-react"]={},k.React))})(this,function(k,O){"use strict";var W={},De={get exports(){return W},set exports(n){W=n}},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 n=x,c=Symbol.for("react.element"),p=Symbol.for("react.fragment"),u=Object.prototype.hasOwnProperty,v=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,d={key:!0,ref:!0,__self:!0,__source:!0};function k(R,m,C){var E,w={},j=null,V=null;C!==void 0&&(j=""+C),m.key!==void 0&&(j=""+m.key),m.ref!==void 0&&(V=m.ref);for(E in m)u.call(m,E)&&!d.hasOwnProperty(E)&&(w[E]=m[E]);if(R&&R.defaultProps)for(E in m=R.defaultProps,m)w[E]===void 0&&(w[E]=m[E]);return{$$typeof:c,type:R,key:j,ref:V,props:w,_owner:v.current}}return Y.Fragment=p,Y.jsx=k,Y.jsxs=k,Y}var $={};/**
9
+ */var ae;function Ae(){if(ae)return Y;ae=1;var n=O,c=Symbol.for("react.element"),p=Symbol.for("react.fragment"),u=Object.prototype.hasOwnProperty,v=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,f={key:!0,ref:!0,__self:!0,__source:!0};function R(_,m,x){var E,w={},j=null,V=null;x!==void 0&&(j=""+x),m.key!==void 0&&(j=""+m.key),m.ref!==void 0&&(V=m.ref);for(E in m)u.call(m,E)&&!f.hasOwnProperty(E)&&(w[E]=m[E]);if(_&&_.defaultProps)for(E in m=_.defaultProps,m)w[E]===void 0&&(w[E]=m[E]);return{$$typeof:c,type:_,key:j,ref:V,props:w,_owner:v.current}}return Y.Fragment=p,Y.jsx=R,Y.jsxs=R,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 n=x,c=Symbol.for("react.element"),p=Symbol.for("react.portal"),u=Symbol.for("react.fragment"),v=Symbol.for("react.strict_mode"),d=Symbol.for("react.profiler"),k=Symbol.for("react.provider"),R=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),C=Symbol.for("react.suspense"),E=Symbol.for("react.suspense_list"),w=Symbol.for("react.memo"),j=Symbol.for("react.lazy"),V=Symbol.for("react.offscreen"),ue=Symbol.iterator,He="@@iterator";function Je(e){if(e===null||typeof e!="object")return null;var r=ue&&e[ue]||e[He];return typeof r=="function"?r:null}var D=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function g(e){{for(var r=arguments.length,t=new Array(r>1?r-1:0),a=1;a<r;a++)t[a-1]=arguments[a];ze("error",e,t)}}function ze(e,r,t){{var a=D.ReactDebugCurrentFrame,l=a.getStackAddendum();l!==""&&(r+="%s",t=t.concat([l]));var f=t.map(function(i){return String(i)});f.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,f)}}var qe=!1,Ke=!1,Xe=!1,Ze=!1,Qe=!1,ce;ce=Symbol.for("react.module.reference");function er(e){return!!(typeof e=="string"||typeof e=="function"||e===u||e===d||Qe||e===v||e===C||e===E||Ze||e===V||qe||Ke||Xe||typeof e=="object"&&e!==null&&(e.$$typeof===j||e.$$typeof===w||e.$$typeof===k||e.$$typeof===R||e.$$typeof===m||e.$$typeof===ce||e.getModuleId!==void 0))}function rr(e,r,t){var a=e.displayName;if(a)return a;var l=r.displayName||r.name||"";return l!==""?t+"("+l+")":t}function fe(e){return e.displayName||"Context"}function O(e){if(e==null)return null;if(typeof e.tag=="number"&&g("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 u:return"Fragment";case p:return"Portal";case d:return"Profiler";case v:return"StrictMode";case C:return"Suspense";case E:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case R:var r=e;return fe(r)+".Consumer";case k:var t=e;return fe(t._context)+".Provider";case m:return rr(e,e.render,"ForwardRef");case w:var a=e.displayName||null;return a!==null?a:O(e.type)||"Memo";case j:{var l=e,f=l._payload,i=l._init;try{return O(i(f))}catch{return null}}}return null}var N=Object.assign,L=0,de,pe,ve,me,he,be,_e;function ke(){}ke.__reactDisabledLog=!0;function tr(){{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 ar(){{if(L--,L===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:N({},e,{value:de}),info:N({},e,{value:pe}),warn:N({},e,{value:ve}),error:N({},e,{value:me}),group:N({},e,{value:he}),groupCollapsed:N({},e,{value:be}),groupEnd:N({},e,{value:_e})})}L<0&&g("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var q=D.ReactCurrentDispatcher,K;function U(e,r,t){{if(K===void 0)try{throw Error()}catch(l){var a=l.stack.trim().match(/\n( *(at )?)/);K=a&&a[1]||""}return`
18
- `+K+e}}var X=!1,B;{var nr=typeof WeakMap=="function"?WeakMap:Map;B=new nr}function ge(e,r){if(!e||X)return"";{var t=B.get(e);if(t!==void 0)return t}var a;X=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var f;f=q.current,q.current=null,tr();try{if(r){var i=function(){throw Error()};if(Object.defineProperty(i.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(i,[])}catch(S){a=S}Reflect.construct(e,[],i)}else{try{i.call()}catch(S){a=S}e.call(i.prototype)}}else{try{throw Error()}catch(S){a=S}e()}}catch(S){if(S&&a&&typeof S.stack=="string"){for(var o=S.stack.split(`
17
+ */var ne;function Ie(){return ne||(ne=1,process.env.NODE_ENV!=="production"&&function(){var n=O,c=Symbol.for("react.element"),p=Symbol.for("react.portal"),u=Symbol.for("react.fragment"),v=Symbol.for("react.strict_mode"),f=Symbol.for("react.profiler"),R=Symbol.for("react.provider"),_=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),x=Symbol.for("react.suspense"),E=Symbol.for("react.suspense_list"),w=Symbol.for("react.memo"),j=Symbol.for("react.lazy"),V=Symbol.for("react.offscreen"),ue=Symbol.iterator,He="@@iterator";function Je(e){if(e===null||typeof e!="object")return null;var r=ue&&e[ue]||e[He];return typeof r=="function"?r:null}var D=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function g(e){{for(var r=arguments.length,t=new Array(r>1?r-1:0),a=1;a<r;a++)t[a-1]=arguments[a];ze("error",e,t)}}function ze(e,r,t){{var a=D.ReactDebugCurrentFrame,l=a.getStackAddendum();l!==""&&(r+="%s",t=t.concat([l]));var d=t.map(function(s){return String(s)});d.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,d)}}var qe=!1,Ke=!1,Xe=!1,Ze=!1,Qe=!1,ce;ce=Symbol.for("react.module.reference");function er(e){return!!(typeof e=="string"||typeof e=="function"||e===u||e===f||Qe||e===v||e===x||e===E||Ze||e===V||qe||Ke||Xe||typeof e=="object"&&e!==null&&(e.$$typeof===j||e.$$typeof===w||e.$$typeof===R||e.$$typeof===_||e.$$typeof===m||e.$$typeof===ce||e.getModuleId!==void 0))}function rr(e,r,t){var a=e.displayName;if(a)return a;var l=r.displayName||r.name||"";return l!==""?t+"("+l+")":t}function fe(e){return e.displayName||"Context"}function S(e){if(e==null)return null;if(typeof e.tag=="number"&&g("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 u:return"Fragment";case p:return"Portal";case f:return"Profiler";case v:return"StrictMode";case x:return"Suspense";case E:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case _:var r=e;return fe(r)+".Consumer";case R:var t=e;return fe(t._context)+".Provider";case m:return rr(e,e.render,"ForwardRef");case w:var a=e.displayName||null;return a!==null?a:S(e.type)||"Memo";case j:{var l=e,d=l._payload,s=l._init;try{return S(s(d))}catch{return null}}}return null}var F=Object.assign,L=0,de,pe,ve,me,he,be,_e;function ke(){}ke.__reactDisabledLog=!0;function tr(){{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 ar(){{if(L--,L===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:F({},e,{value:de}),info:F({},e,{value:pe}),warn:F({},e,{value:ve}),error:F({},e,{value:me}),group:F({},e,{value:he}),groupCollapsed:F({},e,{value:be}),groupEnd:F({},e,{value:_e})})}L<0&&g("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var q=D.ReactCurrentDispatcher,K;function U(e,r,t){{if(K===void 0)try{throw Error()}catch(l){var a=l.stack.trim().match(/\n( *(at )?)/);K=a&&a[1]||""}return`
18
+ `+K+e}}var X=!1,B;{var nr=typeof WeakMap=="function"?WeakMap:Map;B=new nr}function ge(e,r){if(!e||X)return"";{var t=B.get(e);if(t!==void 0)return t}var a;X=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var d;d=q.current,q.current=null,tr();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 o=C.stack.split(`
19
19
  `),y=a.stack.split(`
20
20
  `),h=o.length-1,b=y.length-1;h>=1&&b>=0&&o[h]!==y[b];)b--;for(;h>=1&&b>=0;h--,b--)if(o[h]!==y[b]){if(h!==1||b!==1)do if(h--,b--,b<0||o[h]!==y[b]){var P=`
21
- `+o[h].replace(" at new "," at ");return e.displayName&&P.includes("<anonymous>")&&(P=P.replace("<anonymous>",e.displayName)),typeof e=="function"&&B.set(e,P),P}while(h>=1&&b>=0);break}}}finally{X=!1,q.current=f,ar(),Error.prepareStackTrace=l}var I=e?e.displayName||e.name:"",Fe=I?U(I):"";return typeof e=="function"&&B.set(e,Fe),Fe}function or(e,r,t){return ge(e,!1)}function ir(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,ir(e));if(typeof e=="string")return U(e);switch(e){case C:return U("Suspense");case E:return U("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case m:return or(e.render);case w:return G(e.type,r,t);case j:{var a=e,l=a._payload,f=a._init;try{return G(f(l),r,t)}catch{}}}return""}var H=Object.prototype.hasOwnProperty,ye={},Re=D.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 sr(e,r,t,a,l){{var f=Function.call.bind(H);for(var i in e)if(f(e,i)){var o=void 0;try{if(typeof e[i]!="function"){var y=Error((a||"React class")+": "+t+" type `"+i+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[i]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw y.name="Invariant Violation",y}o=e[i](r,i,a,t,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(h){o=h}o&&!(o instanceof Error)&&(J(l),g("%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,i,typeof o),J(null)),o instanceof Error&&!(o.message in ye)&&(ye[o.message]=!0,J(l),g("Failed %s type: %s",t,o.message),J(null))}}}var lr=Array.isArray;function Z(e){return lr(e)}function ur(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,t=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t}}function cr(e){try{return Ee(e),!1}catch{return!0}}function Ee(e){return""+e}function Pe(e){if(cr(e))return g("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=D.ReactCurrentOwner,fr={key:!0,ref:!0,__self:!0,__source:!0},Te,we,Q;Q={};function dr(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 pr(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 vr(e,r){if(typeof e.ref=="string"&&M.current&&r&&M.current.stateNode!==r){var t=O(M.current.type);Q[t]||(g('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',O(M.current.type),e.ref),Q[t]=!0)}}function mr(e,r){{var t=function(){Te||(Te=!0,g("%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 hr(e,r){{var t=function(){we||(we=!0,g("%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 br=function(e,r,t,a,l,f,i){var o={$$typeof:c,type:e,key:r,ref:t,props:i,_owner:f};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:l}),Object.freeze&&(Object.freeze(o.props),Object.freeze(o)),o};function _r(e,r,t,a,l){{var f,i={},o=null,y=null;t!==void 0&&(Pe(t),o=""+t),pr(r)&&(Pe(r.key),o=""+r.key),dr(r)&&(y=r.ref,vr(r,l));for(f in r)H.call(r,f)&&!fr.hasOwnProperty(f)&&(i[f]=r[f]);if(e&&e.defaultProps){var h=e.defaultProps;for(f in h)i[f]===void 0&&(i[f]=h[f])}if(o||y){var b=typeof e=="function"?e.displayName||e.name||"Unknown":e;o&&mr(i,b),y&&hr(i,b)}return br(e,o,y,l,a,M.current,i)}}var ee=D.ReactCurrentOwner,xe=D.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===c}function Oe(){{if(ee.current){var e=O(ee.current.type);if(e)return`
21
+ `+o[h].replace(" at new "," at ");return e.displayName&&P.includes("<anonymous>")&&(P=P.replace("<anonymous>",e.displayName)),typeof e=="function"&&B.set(e,P),P}while(h>=1&&b>=0);break}}}finally{X=!1,q.current=d,ar(),Error.prepareStackTrace=l}var I=e?e.displayName||e.name:"",Fe=I?U(I):"";return typeof e=="function"&&B.set(e,Fe),Fe}function or(e,r,t){return ge(e,!1)}function ir(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,ir(e));if(typeof e=="string")return U(e);switch(e){case x:return U("Suspense");case E:return U("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case m:return or(e.render);case w:return G(e.type,r,t);case j:{var a=e,l=a._payload,d=a._init;try{return G(d(l),r,t)}catch{}}}return""}var H=Object.prototype.hasOwnProperty,ye={},Re=D.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 sr(e,r,t,a,l){{var d=Function.call.bind(H);for(var s in e)if(d(e,s)){var o=void 0;try{if(typeof e[s]!="function"){var y=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 y.name="Invariant Violation",y}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(l),g("%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(l),g("Failed %s type: %s",t,o.message),J(null))}}}var lr=Array.isArray;function Z(e){return lr(e)}function ur(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,t=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t}}function cr(e){try{return Ee(e),!1}catch{return!0}}function Ee(e){return""+e}function Pe(e){if(cr(e))return g("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=D.ReactCurrentOwner,fr={key:!0,ref:!0,__self:!0,__source:!0},Te,we,Q;Q={};function dr(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 pr(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 vr(e,r){if(typeof e.ref=="string"&&M.current&&r&&M.current.stateNode!==r){var t=S(M.current.type);Q[t]||(g('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',S(M.current.type),e.ref),Q[t]=!0)}}function mr(e,r){{var t=function(){Te||(Te=!0,g("%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 hr(e,r){{var t=function(){we||(we=!0,g("%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 br=function(e,r,t,a,l,d,s){var o={$$typeof:c,type:e,key:r,ref:t,props:s,_owner:d};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:l}),Object.freeze&&(Object.freeze(o.props),Object.freeze(o)),o};function _r(e,r,t,a,l){{var d,s={},o=null,y=null;t!==void 0&&(Pe(t),o=""+t),pr(r)&&(Pe(r.key),o=""+r.key),dr(r)&&(y=r.ref,vr(r,l));for(d in r)H.call(r,d)&&!fr.hasOwnProperty(d)&&(s[d]=r[d]);if(e&&e.defaultProps){var h=e.defaultProps;for(d in h)s[d]===void 0&&(s[d]=h[d])}if(o||y){var b=typeof e=="function"?e.displayName||e.name||"Unknown":e;o&&mr(s,b),y&&hr(s,b)}return br(e,o,y,l,a,M.current,s)}}var ee=D.ReactCurrentOwner,xe=D.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===c}function Oe(){{if(ee.current){var e=S(ee.current.type);if(e)return`
22
22
 
23
23
  Check the render method of \``+e+"`."}return""}}function kr(e){{if(e!==void 0){var r=e.fileName.replace(/^.*[\\\/]/,""),t=e.lineNumber;return`
24
24
 
25
25
  Check your code at `+r+":"+t+"."}return""}}var Se={};function gr(e){{var r=Oe();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 Ce(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var t=gr(r);if(Se[t])return;Se[t]=!0;var a="";e&&e._owner&&e._owner!==ee.current&&(a=" It was passed a child from "+O(e._owner.type)+"."),A(e),g('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)&&Ce(a,r)}else if(te(e))e._store&&(e._store.validated=!0);else if(e){var l=Je(e);if(typeof l=="function"&&l!==e.entries)for(var f=l.call(e),i;!(i=f.next()).done;)te(i.value)&&Ce(i.value,r)}}}function yr(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===w))t=r.propTypes;else return;if(t){var a=O(r);sr(t,e.props,"prop",a,e)}else if(r.PropTypes!==void 0&&!re){re=!0;var l=O(r);g("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",l||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&g("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Rr(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),g("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),g("Invalid attribute `ref` supplied to `React.Fragment`."),A(null))}}function Ne(e,r,t,a,l,f){{var i=er(e);if(!i){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 y=kr(l);y?o+=y:o+=Oe();var h;e===null?h="null":Z(e)?h="array":e!==void 0&&e.$$typeof===c?(h="<"+(O(e.type)||"Unknown")+" />",o=" Did you accidentally export a JSX literal instead of a component?"):h=typeof e,g("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=_r(e,r,t,l,f);if(b==null)return b;if(i){var P=r.children;if(P!==void 0)if(a)if(Z(P)){for(var I=0;I<P.length;I++)je(P[I],e);Object.freeze&&Object.freeze(P)}else g("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(P,e)}return e===u?Rr(b):yr(b),b}}function Er(e,r,t){return Ne(e,r,t,!0)}function Pr(e,r,t){return Ne(e,r,t,!1)}var Tr=Pr,wr=Er;$.Fragment=u,$.jsx=Tr,$.jsxs=wr}()),$}(function(n){process.env.NODE_ENV==="production"?n.exports=Ae():n.exports=Ie()})(De);const oe=W.Fragment,s=W.jsx,T=W.jsxs,F=({className:n,name:c,viewBox:p="0 0 32 32",...u})=>{const v=[n,"balle"].filter(Boolean).join(" ");return s("svg",{...u,className:v,viewBox:p,children:s("use",{href:`#${c}`})})},We=({children:n,className:c,iconName:p="user",size:u="medium",skin:v="primary",type:d="button",variant:k="label-only",...R})=>{const m=[c,"pkt-btn",u&&`pkt-btn--${u}`,v&&`pkt-btn--${v}`,k&&`pkt-btn--${k}`].filter(Boolean).join(" ");return T("button",{...R,className:m,type:d,children:[s(F,{className:"pkt-btn__icon",name:p}),s("span",{className:"pkt-btn__text",children:n})]})},Ye=({children:n,className:c,logoLink:p="https://www.oslo.kommune.no/",isLoggedIn:u=!1,representing:v="",canChangeRepresentation:d=!1,showLogInButton:k=!0,onLogIn:R,onLogOut:m,onChangeRepresentation:C,...E})=>{const w=[c,"pkt-header"].filter(Boolean).join(" ");return T("header",{id:"pkt-header",className:w,"aria-label":"Topp",children:[s("div",{className:"pkt-header__logo",children:s("a",{"aria-label":"Tilbake til forside",className:"pkt-header__logo-link",href:p,children:s(F,{name:"oslologo",className:"pkt-header__logo-svg",viewBox:"0 0 60 31","aria-hidden":"true"})})}),T("div",{className:"pkt-header__actions",children:[u&&d&&T("button",{className:"pkt-btn pkt-btn--secondary pkt-btn--icon-right","aria-label":`Bytt bruker fra ${v}`,onClick:C,children:[s(F,{name:"user",className:"pkt-btn__icon pkt-show-tablet-up"}),s("span",{className:"pkt-header__action-change pkt-hide pkt-show-tablet-up ml-size-15",children:"Endre"}),s("span",{className:"pkt-btn__text pkt-hide-tablet-up",children:"Endre"}),s("span",{className:"pkt-btn__text--representing pkt-hide pkt-show-tablet-up",children:v})]}),u&&!d&&T("div",{className:"pkt-header__action",children:[s("span",{className:"pkt-header__action-text",children:s("span",{className:"pkt-btn__text pkt-header__action-textrow text-row-inline truncate-text",children:v})}),s("span",{className:"pkt-header__action-icon pkt-show-phablet-up",children:s(F,{name:"user"})})]}),k&&u&&T("button",{className:"pkt-btn pkt-btn--flat pkt-btn--icon-right","aria-label":"Logg ut",onClick:m,children:[s(F,{className:"pkt-btn__icon pkt-show-tablet-up",name:"exit"}),s("span",{className:"pkt-btn__text",children:"Logg ut"})]}),k&&!u&&T("button",{className:"pkt-btn pkt-btn--flat pkt-btn--icon-right","aria-label":"Logg inn",onClick:R,children:[s(F,{className:"pkt-btn__icon",name:"user"}),s("span",{className:"pkt-btn__text",children:"Logg inn"})]})]})]})},ie=x.forwardRef(({label:n,id:c,children:p,...u},v)=>T("div",{className:"pkt-form-group",children:[s("label",{htmlFor:c,className:"pkt-form-label",children:n}),s("input",{className:"pkt-form-input",id:c,...u,ref:v}),p]}));ie.displayName="PktInput";const se=x.forwardRef(({id:n,label:c,...p},u)=>T("div",{className:"pkt-form-group",children:[s("label",{htmlFor:n,className:"pkt-form-label",children:c}),s("textarea",{className:"pkt-form-textarea",id:n,ref:u,...p})]}));se.displayName="PktTextarea";const le=x.forwardRef(({id:n,name:c,label:p,value:u,...v},d)=>T("div",{className:"pkt-form-group",children:[s("input",{type:"radio",className:"pkt-form-check-input",id:n,name:c,value:u,ref:d,...v}),s("label",{className:"pkt-form-label",htmlFor:n,children:p})]}));le.displayName="PktRadio";const $e=({label:n,children:c})=>T(oe,{children:[s("p",{children:n}),s("div",{className:"pkt-form-group",children:c})]});var z={},Le={get exports(){return z},set exports(n){z=n}};/*!
27
+ Check the top-level render call using <`+t+">.")}return r}}function Ce(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var t=gr(r);if(Se[t])return;Se[t]=!0;var a="";e&&e._owner&&e._owner!==ee.current&&(a=" It was passed a child from "+S(e._owner.type)+"."),A(e),g('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 Ne(e,r){{if(typeof e!="object")return;if(Z(e))for(var t=0;t<e.length;t++){var a=e[t];te(a)&&Ce(a,r)}else if(te(e))e._store&&(e._store.validated=!0);else if(e){var l=Je(e);if(typeof l=="function"&&l!==e.entries)for(var d=l.call(e),s;!(s=d.next()).done;)te(s.value)&&Ce(s.value,r)}}}function yr(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===w))t=r.propTypes;else return;if(t){var a=S(r);sr(t,e.props,"prop",a,e)}else if(r.PropTypes!==void 0&&!re){re=!0;var l=S(r);g("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",l||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&g("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Rr(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),g("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),g("Invalid attribute `ref` supplied to `React.Fragment`."),A(null))}}function je(e,r,t,a,l,d){{var s=er(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 y=kr(l);y?o+=y:o+=Oe();var h;e===null?h="null":Z(e)?h="array":e!==void 0&&e.$$typeof===c?(h="<"+(S(e.type)||"Unknown")+" />",o=" Did you accidentally export a JSX literal instead of a component?"):h=typeof e,g("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=_r(e,r,t,l,d);if(b==null)return b;if(s){var P=r.children;if(P!==void 0)if(a)if(Z(P)){for(var I=0;I<P.length;I++)Ne(P[I],e);Object.freeze&&Object.freeze(P)}else g("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 Ne(P,e)}return e===u?Rr(b):yr(b),b}}function Er(e,r,t){return je(e,r,t,!0)}function Pr(e,r,t){return je(e,r,t,!1)}var Tr=Pr,wr=Er;$.Fragment=u,$.jsx=Tr,$.jsxs=wr}()),$}(function(n){process.env.NODE_ENV==="production"?n.exports=Ae():n.exports=Ie()})(De);const oe=W.Fragment,i=W.jsx,T=W.jsxs,N=({className:n,name:c,viewBox:p="0 0 32 32",...u})=>{const v=[n,"balle"].filter(Boolean).join(" ");return i("svg",{...u,className:v,viewBox:p,children:i("use",{href:`#${c}`})})},We=({children:n,className:c,iconName:p="user",secondIconName:u="user",size:v="medium",skin:f="primary",type:R="button",variant:_="label-only",...m})=>{const x=[c,"pkt-btn",v&&`pkt-btn--${v}`,f&&`pkt-btn--${f}`,_&&`pkt-btn--${_}`].filter(Boolean).join(" ");return T("button",{...m,className:x,type:R,children:[i(N,{className:"pkt-btn__icon",name:p}),i("span",{className:"pkt-btn__text",children:n}),_==="icons-right-and-left"&&i(N,{className:"pkt-btn__icon",name:u})]})},Ye=({children:n,className:c,logoLink:p="https://www.oslo.kommune.no/",isLoggedIn:u=!1,representing:v="",canChangeRepresentation:f=!1,showLogInButton:R=!0,onLogIn:_,onLogOut:m,onChangeRepresentation:x,...E})=>{const w=[c,"pkt-header"].filter(Boolean).join(" ");return T("header",{id:"pkt-header",className:w,"aria-label":"Topp",children:[i("div",{className:"pkt-header__logo",children:i("a",{"aria-label":"Tilbake til forside",className:"pkt-header__logo-link",href:p,children:i(N,{name:"oslologo",className:"pkt-header__logo-svg",viewBox:"0 0 60 31","aria-hidden":"true"})})}),T("div",{className:"pkt-header__actions",children:[u&&f&&T("button",{className:"pkt-btn pkt-btn--secondary pkt-btn--icon-right","aria-label":`Bytt bruker fra ${v}`,onClick:x,children:[i(N,{name:"user",className:"pkt-btn__icon pkt-show-tablet-up"}),i("span",{className:"pkt-header__action-change pkt-hide pkt-show-tablet-up ml-size-15",children:"Endre"}),i("span",{className:"pkt-btn__text pkt-hide-tablet-up",children:"Endre"}),i("span",{className:"pkt-btn__text--representing pkt-hide pkt-show-tablet-up",children:v})]}),u&&!f&&T("div",{className:"pkt-header__action",children:[i("span",{className:"pkt-header__action-text",children:i("span",{className:"pkt-btn__text pkt-header__action-textrow text-row-inline truncate-text",children:v})}),i("span",{className:"pkt-header__action-icon pkt-show-phablet-up",children:i(N,{name:"user"})})]}),R&&u&&T("button",{className:"pkt-btn pkt-btn--tertiary pkt-btn--icon-right","aria-label":"Logg ut",onClick:m,children:[i(N,{className:"pkt-btn__icon pkt-show-tablet-up",name:"exit"}),i("span",{className:"pkt-btn__text",children:"Logg ut"})]}),R&&!u&&T("button",{className:"pkt-btn pkt-btn--tertiary pkt-btn--icon-right","aria-label":"Logg inn",onClick:_,children:[i(N,{className:"pkt-btn__icon",name:"user"}),i("span",{className:"pkt-btn__text",children:"Logg inn"})]})]})]})},ie=O.forwardRef(({label:n,id:c,children:p,...u},v)=>T("div",{className:"pkt-form-group",children:[i("label",{htmlFor:c,className:"pkt-form-label",children:n}),i("input",{className:"pkt-form-input",id:c,...u,ref:v}),p]}));ie.displayName="PktInput";const se=O.forwardRef(({id:n,label:c,...p},u)=>T("div",{className:"pkt-form-group",children:[i("label",{htmlFor:n,className:"pkt-form-label",children:c}),i("textarea",{className:"pkt-form-textarea",id:n,ref:u,...p})]}));se.displayName="PktTextarea";const le=O.forwardRef(({id:n,name:c,label:p,value:u,...v},f)=>T("div",{className:"pkt-form-group",children:[i("input",{type:"radio",className:"pkt-form-check-input",id:n,name:c,value:u,ref:f,...v}),i("label",{className:"pkt-form-label",htmlFor:n,children:p})]}));le.displayName="PktRadio";const $e=({label:n,children:c})=>T(oe,{children:[i("p",{children:n}),i("div",{className:"pkt-form-group",children:c})]});var z={},Le={get exports(){return z},set exports(n){z=n}};/*!
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(n){(function(){var c={}.hasOwnProperty;function p(){for(var u=[],v=0;v<arguments.length;v++){var d=arguments[v];if(d){var k=typeof d;if(k==="string"||k==="number")u.push(d);else if(Array.isArray(d)){if(d.length){var R=p.apply(null,d);R&&u.push(R)}}else if(k==="object"){if(d.toString!==Object.prototype.toString&&!d.toString.toString().includes("[native code]")){u.push(d.toString());continue}for(var m in d)c.call(d,m)&&d[m]&&u.push(m)}}}return u.join(" ")}n.exports?(p.default=p,n.exports=p):window.classNames=p})()})(Le);const Me=z,Ve=({isResponsive:n,children:c})=>n?s("div",{className:"pkt-table-container",children:c}):s(oe,{children:c}),Ue=({isResponsive:n,modifiers:{info:c=!1,success:p=!1,strong:u=!1,shadow:v=!1}={},children:d})=>s(Ve,{isResponsive:n,children:s("table",{className:Me("pkt-table",{"pkt-table--info":c,"pkt-table--success":p,"pkt-table--strong":u,"pkt-table--shadow":v}),children:d})}),Be=({children:n})=>s("td",{className:"pkt-table__th",children:n}),Ge=({children:n})=>s("th",{className:"pkt-table__th",children:n});_.PktButton=We,_.PktHeader=Ye,_.PktInput=ie,_.PktRadio=le,_.PktRadioGroup=$e,_.PktTable=Ue,_.PktTableData=Be,_.PktTableHeader=Ge,_.PktTextarea=se,Object.defineProperty(_,Symbol.toStringTag,{value:"Module"})});
31
+ */(function(n){(function(){var c={}.hasOwnProperty;function p(){for(var u=[],v=0;v<arguments.length;v++){var f=arguments[v];if(f){var R=typeof f;if(R==="string"||R==="number")u.push(f);else if(Array.isArray(f)){if(f.length){var _=p.apply(null,f);_&&u.push(_)}}else if(R==="object"){if(f.toString!==Object.prototype.toString&&!f.toString.toString().includes("[native code]")){u.push(f.toString());continue}for(var m in f)c.call(f,m)&&f[m]&&u.push(m)}}}return u.join(" ")}n.exports?(p.default=p,n.exports=p):window.classNames=p})()})(Le);const Me=z,Ve=({isResponsive:n,children:c})=>n?i("div",{className:"pkt-table-container",children:c}):i(oe,{children:c}),Ue=({isResponsive:n,modifiers:{info:c=!1,success:p=!1,strong:u=!1,shadow:v=!1}={},children:f})=>i(Ve,{isResponsive:n,children:i("table",{className:Me("pkt-table",{"pkt-table--info":c,"pkt-table--success":p,"pkt-table--strong":u,"pkt-table--shadow":v}),children:f})}),Be=({children:n})=>i("td",{className:"pkt-table__th",children:n}),Ge=({children:n})=>i("th",{className:"pkt-table__th",children:n});k.PktButton=We,k.PktHeader=Ye,k.PktInput=ie,k.PktRadio=le,k.PktRadioGroup=$e,k.PktTable=Ue,k.PktTableData=Be,k.PktTableHeader=Ge,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": "1.0.1",
3
+ "version": "2.0.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",
@@ -34,8 +34,8 @@
34
34
  "react-dom": "^18.2.0"
35
35
  },
36
36
  "devDependencies": {
37
- "@oslokommune/punkt-assets": "^1.0.1",
38
- "@oslokommune/punkt-css": "^1.0.1",
37
+ "@oslokommune/punkt-assets": "^2.0.1",
38
+ "@oslokommune/punkt-css": "^2.0.1",
39
39
  "@testing-library/react": "^14.0.0",
40
40
  "@types/jest": "^29.4.0",
41
41
  "@types/node": "^18.14.1",
@@ -84,5 +84,5 @@
84
84
  "url": "https://github.com/oslokommune/punkt/issues"
85
85
  },
86
86
  "license": "MIT",
87
- "gitHead": "d7ac432cd087de571b0a677778b4e86a604721d1"
87
+ "gitHead": "a051333929386ca562d829a3f3aedda17f4d289e"
88
88
  }
@@ -3,17 +3,20 @@ import { PktIcon } from '../icon/Icon'
3
3
 
4
4
  export interface IPktButton extends React.ButtonHTMLAttributes<HTMLButtonElement> {
5
5
  iconName?: string
6
+ secondIconName?: string
6
7
  mode?: 'light' | 'dark'
7
8
  size?: 'small' | 'medium' | 'large'
8
- skin?: 'primary' | 'secondary' | 'tertiary' | 'flat' | 'primary-confirm'
9
+ skin?: 'primary' | 'secondary' | 'tertiary'
10
+ variant?: 'label-only' | 'icon-left' | 'icon-right' | 'icon-only' | 'icons-right-and-left'
9
11
  state?: 'normal' | 'focus' | 'hover' | 'active'
10
- variant?: 'label-only' | 'icon-left' | 'icon-right' | 'icon-only'
12
+ onClick?: (event: React.MouseEvent<HTMLButtonElement>) => void
11
13
  }
12
14
 
13
15
  export const PktButton: React.FC<IPktButton> = ({
14
16
  children,
15
17
  className,
16
18
  iconName = 'user',
19
+ secondIconName = 'user',
17
20
  size = 'medium',
18
21
  skin = 'primary',
19
22
  type = 'button',
@@ -34,6 +37,9 @@ export const PktButton: React.FC<IPktButton> = ({
34
37
  <button {...props} className={classes} type={type}>
35
38
  <PktIcon className="pkt-btn__icon" name={iconName}></PktIcon>
36
39
  <span className="pkt-btn__text">{children}</span>
40
+ {variant === 'icons-right-and-left' && (
41
+ <PktIcon className="pkt-btn__icon" name={secondIconName}></PktIcon>
42
+ )}
37
43
  </button>
38
44
  )
39
45
  }
@@ -30,7 +30,12 @@ export const PktHeader: React.FC<HeaderProps> = ({
30
30
  <header id="pkt-header" className={classNames} aria-label="Topp">
31
31
  <div className="pkt-header__logo">
32
32
  <a aria-label="Tilbake til forside" className="pkt-header__logo-link" href={logoLink}>
33
- <PktIcon name="oslologo" className="pkt-header__logo-svg" viewBox="0 0 60 31" aria-hidden="true" />
33
+ <PktIcon
34
+ name="oslologo"
35
+ className="pkt-header__logo-svg"
36
+ viewBox="0 0 60 31"
37
+ aria-hidden="true"
38
+ />
34
39
  </a>
35
40
  </div>
36
41
  <div className="pkt-header__actions">
@@ -42,10 +47,14 @@ export const PktHeader: React.FC<HeaderProps> = ({
42
47
  >
43
48
  <PktIcon name="user" className="pkt-btn__icon pkt-show-tablet-up" />
44
49
 
45
- <span className="pkt-header__action-change pkt-hide pkt-show-tablet-up ml-size-15">Endre</span>
50
+ <span className="pkt-header__action-change pkt-hide pkt-show-tablet-up ml-size-15">
51
+ Endre
52
+ </span>
46
53
 
47
54
  <span className="pkt-btn__text pkt-hide-tablet-up">Endre</span>
48
- <span className="pkt-btn__text--representing pkt-hide pkt-show-tablet-up">{representing}</span>
55
+ <span className="pkt-btn__text--representing pkt-hide pkt-show-tablet-up">
56
+ {representing}
57
+ </span>
49
58
  </button>
50
59
  )}
51
60
 
@@ -63,14 +72,22 @@ export const PktHeader: React.FC<HeaderProps> = ({
63
72
  )}
64
73
 
65
74
  {showLogInButton && isLoggedIn && (
66
- <button className="pkt-btn pkt-btn--flat pkt-btn--icon-right" aria-label="Logg ut" onClick={onLogOut}>
75
+ <button
76
+ className="pkt-btn pkt-btn--tertiary pkt-btn--icon-right"
77
+ aria-label="Logg ut"
78
+ onClick={onLogOut}
79
+ >
67
80
  <PktIcon className="pkt-btn__icon pkt-show-tablet-up" name="exit" />
68
81
  <span className="pkt-btn__text">Logg ut</span>
69
82
  </button>
70
83
  )}
71
84
 
72
85
  {showLogInButton && !isLoggedIn && (
73
- <button className="pkt-btn pkt-btn--flat pkt-btn--icon-right" aria-label="Logg inn" onClick={onLogIn}>
86
+ <button
87
+ className="pkt-btn pkt-btn--tertiary pkt-btn--icon-right"
88
+ aria-label="Logg inn"
89
+ onClick={onLogIn}
90
+ >
74
91
  <PktIcon className="pkt-btn__icon" name="user" />
75
92
  <span className="pkt-btn__text">Logg inn</span>
76
93
  </button>