@oslokommune/punkt-react 8.0.2 → 8.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -5,6 +5,24 @@ og skriver commits ca etter [Conventional Commits](https://conventionalcommits.o
5
5
 
6
6
  ---
7
7
 
8
+ ## [8.0.3](https://github.com/oslokommune/punkt/compare/8.0.2...8.0.3) (2023-09-19)
9
+
10
+ ### ⚠ BREAKING CHANGES
11
+ Ingen
12
+
13
+ ### Features
14
+ Ingen
15
+
16
+ ### Bug Fixes
17
+ * aria-peker til feilmelding når skjemaelementer har feil (#1167).
18
+
19
+
20
+ ### Chores
21
+ Ingen
22
+
23
+ ---
24
+
25
+
8
26
  ## [8.0.2](https://github.com/oslokommune/punkt/compare/8.0.1...8.0.2) (2023-09-19)
9
27
 
10
28
  ### ⚠ BREAKING CHANGES
@@ -3,7 +3,7 @@ import q, { useState as ce, useEffect as yt, forwardRef as z, useRef as ln } fro
3
3
  function sn(e) {
4
4
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
5
5
  }
6
- var $e = { exports: {} }, ie = {};
6
+ var Ie = { exports: {} }, ie = {};
7
7
  /**
8
8
  * @license React
9
9
  * react-jsx-runtime.production.min.js
@@ -56,10 +56,10 @@ function un() {
56
56
  {
57
57
  for (var u = arguments.length, p = new Array(u > 1 ? u - 1 : 0), k = 1; k < u; k++)
58
58
  p[k - 1] = arguments[k];
59
- F("error", t, p);
59
+ $("error", t, p);
60
60
  }
61
61
  }
62
- function F(t, u, p) {
62
+ function $(t, u, p) {
63
63
  {
64
64
  var k = P.ReactDebugCurrentFrame, w = k.getStackAddendum();
65
65
  w !== "" && (u += "%s", p = p.concat([w]));
@@ -69,10 +69,10 @@ function un() {
69
69
  S.unshift("Warning: " + u), Function.prototype.apply.call(console[t], console, S);
70
70
  }
71
71
  }
72
- var $ = !1, A = !1, U = !1, G = !1, M = !1, K;
72
+ var I = !1, A = !1, U = !1, G = !1, M = !1, K;
73
73
  K = Symbol.for("react.module.reference");
74
74
  function B(t) {
75
- return !!(typeof t == "string" || typeof t == "function" || t === l || t === i || M || t === a || t === d || t === h || G || t === C || $ || A || U || typeof t == "object" && t !== null && (t.$$typeof === x || t.$$typeof === v || t.$$typeof === s || t.$$typeof === c || t.$$typeof === f || // This needs to include all possible module reference object
75
+ return !!(typeof t == "string" || typeof t == "function" || t === l || t === i || M || t === a || t === d || t === h || G || t === C || I || A || U || typeof t == "object" && t !== null && (t.$$typeof === x || t.$$typeof === v || t.$$typeof === s || t.$$typeof === c || t.$$typeof === f || // This needs to include all possible module reference object
76
76
  // types supported by any Flight configuration anywhere since
77
77
  // we don't know which Flight build this will end up being used
78
78
  // with.
@@ -137,7 +137,7 @@ function un() {
137
137
  function tt() {
138
138
  }
139
139
  tt.__reactDisabledLog = !0;
140
- function Ft() {
140
+ function $t() {
141
141
  {
142
142
  if (H === 0) {
143
143
  Q = console.log, oe = console.info, qe = console.warn, Xe = console.error, Ze = console.group, Qe = console.groupCollapsed, et = console.groupEnd;
@@ -160,7 +160,7 @@ function un() {
160
160
  H++;
161
161
  }
162
162
  }
163
- function It() {
163
+ function Ft() {
164
164
  {
165
165
  if (H--, H === 0) {
166
166
  var t = {
@@ -211,8 +211,8 @@ function un() {
211
211
  }
212
212
  var Pe = !1, pe;
213
213
  {
214
- var $t = typeof WeakMap == "function" ? WeakMap : Map;
215
- pe = new $t();
214
+ var It = typeof WeakMap == "function" ? WeakMap : Map;
215
+ pe = new It();
216
216
  }
217
217
  function nt(t, u) {
218
218
  if (!t || Pe)
@@ -227,7 +227,7 @@ function un() {
227
227
  var w = Error.prepareStackTrace;
228
228
  Error.prepareStackTrace = void 0;
229
229
  var S;
230
- S = Ce.current, Ce.current = null, Ft();
230
+ S = Ce.current, Ce.current = null, $t();
231
231
  try {
232
232
  if (u) {
233
233
  var E = function() {
@@ -280,7 +280,7 @@ function un() {
280
280
  }
281
281
  }
282
282
  } finally {
283
- Pe = !1, Ce.current = S, It(), Error.prepareStackTrace = w;
283
+ Pe = !1, Ce.current = S, Ft(), Error.prepareStackTrace = w;
284
284
  }
285
285
  var re = t ? t.displayName || t.name : "", ht = re ? fe(re) : "";
286
286
  return typeof t == "function" && pe.set(t, ht), ht;
@@ -628,8 +628,8 @@ Check the top-level render call using <` + p + ">.");
628
628
  se.Fragment = l, se.jsx = an, se.jsxs = on;
629
629
  }()), se;
630
630
  }
631
- process.env.NODE_ENV === "production" ? $e.exports = cn() : $e.exports = un();
632
- var Ye = $e.exports;
631
+ process.env.NODE_ENV === "production" ? Ie.exports = cn() : Ie.exports = un();
632
+ var Ye = Ie.exports;
633
633
  const Z = Ye.Fragment, o = Ye.jsx, m = Ye.jsxs, Le = {}, fn = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"></svg>';
634
634
  function pn(e, n) {
635
635
  return !Le[e] && typeof window.fetch == "function" && (Le[e] = window.fetch(n + e + ".svg").then((r) => r.ok ? r.text() : (console.error("Missing icon: " + n + e + ".svg"), fn)).then((r) => r)), Promise.resolve(Le[e]);
@@ -728,7 +728,7 @@ var _t;
728
728
  (function(e) {
729
729
  e.Pop = "POP", e.Push = "PUSH", e.Replace = "REPLACE";
730
730
  })(_t || (_t = {}));
731
- function I(e, n) {
731
+ function F(e, n) {
732
732
  if (e === !1 || e === null || typeof e > "u")
733
733
  throw new Error(n);
734
734
  }
@@ -790,7 +790,7 @@ function hn(e, n) {
790
790
  a === ".." ? r.length > 1 && r.pop() : a !== "." && r.push(a);
791
791
  }), r.length > 1 ? r.join("/") : "/";
792
792
  }
793
- function Fe(e, n, r, l) {
793
+ function $e(e, n, r, l) {
794
794
  return "Cannot include a '" + e + "' character in a manually specified " + ("`to." + n + "` field [" + JSON.stringify(l) + "]. Please separate it out to the ") + ("`to." + r + "` field. Alternatively you may provide the full path as ") + 'a string in <Link to="..."> and the router will parse it for you.';
795
795
  }
796
796
  function xt(e) {
@@ -799,7 +799,7 @@ function xt(e) {
799
799
  function wt(e, n, r, l) {
800
800
  l === void 0 && (l = !1);
801
801
  let a;
802
- typeof e == "string" ? a = Et(e) : (a = Ae({}, e), I(!a.pathname || !a.pathname.includes("?"), Fe("?", "pathname", "search", a)), I(!a.pathname || !a.pathname.includes("#"), Fe("#", "pathname", "hash", a)), I(!a.search || !a.search.includes("#"), Fe("#", "search", "hash", a)));
802
+ typeof e == "string" ? a = Et(e) : (a = Ae({}, e), F(!a.pathname || !a.pathname.includes("?"), $e("?", "pathname", "search", a)), F(!a.pathname || !a.pathname.includes("#"), $e("#", "pathname", "hash", a)), F(!a.search || !a.search.includes("#"), $e("#", "search", "hash", a)));
803
803
  let i = e === "" || a.pathname === "", s = i ? "/" : a.pathname, c;
804
804
  if (l || s == null)
805
805
  c = r;
@@ -862,12 +862,12 @@ function Nn(e, n) {
862
862
  let {
863
863
  relative: r
864
864
  } = n === void 0 ? {} : n;
865
- ze() || (process.env.NODE_ENV !== "production" ? I(
865
+ ze() || (process.env.NODE_ENV !== "production" ? F(
866
866
  !1,
867
867
  // TODO: This error is probably because they somehow have 2 versions of the
868
868
  // router loaded. We can help them understand how to avoid that.
869
869
  "useHref() may be used only in the context of a <Router> component."
870
- ) : I(!1));
870
+ ) : F(!1));
871
871
  let {
872
872
  basename: l,
873
873
  navigator: a
@@ -888,12 +888,12 @@ function ze() {
888
888
  return b.useContext(He) != null;
889
889
  }
890
890
  function ue() {
891
- return ze() || (process.env.NODE_ENV !== "production" ? I(
891
+ return ze() || (process.env.NODE_ENV !== "production" ? F(
892
892
  !1,
893
893
  // TODO: This error is probably because they somehow have 2 versions of the
894
894
  // router loaded. We can help them understand how to avoid that.
895
895
  "useLocation() may be used only in the context of a <Router> component."
896
- ) : I(!1)), b.useContext(He).location;
896
+ ) : F(!1)), b.useContext(He).location;
897
897
  }
898
898
  const Pt = "You should call navigate() in a React.useEffect(), not when your component is first rendered.";
899
899
  function St(e) {
@@ -906,12 +906,12 @@ function yn() {
906
906
  return e ? Rn() : En();
907
907
  }
908
908
  function En() {
909
- ze() || (process.env.NODE_ENV !== "production" ? I(
909
+ ze() || (process.env.NODE_ENV !== "production" ? F(
910
910
  !1,
911
911
  // TODO: This error is probably because they somehow have 2 versions of the
912
912
  // router loaded. We can help them understand how to avoid that.
913
913
  "useNavigate() may be used only in the context of a <Router> component."
914
- ) : I(!1));
914
+ ) : F(!1));
915
915
  let e = b.useContext(Ee), {
916
916
  basename: n,
917
917
  navigator: r
@@ -956,15 +956,15 @@ function Ot(e) {
956
956
  }
957
957
  function xn(e) {
958
958
  let n = b.useContext(Ee);
959
- return n || (process.env.NODE_ENV !== "production" ? I(!1, Ot(e)) : I(!1)), n;
959
+ return n || (process.env.NODE_ENV !== "production" ? F(!1, Ot(e)) : F(!1)), n;
960
960
  }
961
961
  function wn(e) {
962
962
  let n = b.useContext(ae);
963
- return n || (process.env.NODE_ENV !== "production" ? I(!1, Ot(e)) : I(!1)), n;
963
+ return n || (process.env.NODE_ENV !== "production" ? F(!1, Ot(e)) : F(!1)), n;
964
964
  }
965
965
  function Tt(e) {
966
966
  let n = wn(e), r = n.matches[n.matches.length - 1];
967
- return r.route.id || (process.env.NODE_ENV !== "production" ? I(!1, e + ' can only be used on routes that contain a unique "id"') : I(!1)), r.route.id;
967
+ return r.route.id || (process.env.NODE_ENV !== "production" ? F(!1, e + ' can only be used on routes that contain a unique "id"') : F(!1)), r.route.id;
968
968
  }
969
969
  function Cn() {
970
970
  return Tt(be.UseRouteId);
@@ -1051,20 +1051,20 @@ function Dn() {
1051
1051
  return ke;
1052
1052
  }
1053
1053
  const Ln = /* @__PURE__ */ new Set(["application/x-www-form-urlencoded", "multipart/form-data", "text/plain"]);
1054
- function Ie(e) {
1054
+ function Fe(e) {
1055
1055
  return e != null && !Ln.has(e) ? (process.env.NODE_ENV !== "production" && ye(!1, '"' + e + '" is not a valid `encType` for `<Form>`/`<fetcher.Form>` ' + ('and will default to "' + _e + '"')), null) : e;
1056
1056
  }
1057
- function Fn(e, n) {
1057
+ function $n(e, n) {
1058
1058
  let r, l, a, i, s;
1059
1059
  if (Sn(e)) {
1060
1060
  let c = e.getAttribute("action");
1061
- l = c ? Ve(c, n) : null, r = e.getAttribute("method") || ve, a = Ie(e.getAttribute("enctype")) || _e, i = new FormData(e);
1061
+ l = c ? Ve(c, n) : null, r = e.getAttribute("method") || ve, a = Fe(e.getAttribute("enctype")) || _e, i = new FormData(e);
1062
1062
  } else if (Pn(e) || On(e) && (e.type === "submit" || e.type === "image")) {
1063
1063
  let c = e.form;
1064
1064
  if (c == null)
1065
1065
  throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');
1066
1066
  let f = e.getAttribute("formaction") || c.getAttribute("action");
1067
- if (l = f ? Ve(f, n) : null, r = e.getAttribute("formmethod") || c.getAttribute("method") || ve, a = Ie(e.getAttribute("formenctype")) || Ie(c.getAttribute("enctype")) || _e, i = new FormData(c, e), !Dn()) {
1067
+ if (l = f ? Ve(f, n) : null, r = e.getAttribute("formmethod") || c.getAttribute("method") || ve, a = Fe(e.getAttribute("formenctype")) || Fe(c.getAttribute("enctype")) || _e, i = new FormData(c, e), !Dn()) {
1068
1068
  let {
1069
1069
  name: d,
1070
1070
  type: h,
@@ -1089,7 +1089,7 @@ function Fn(e, n) {
1089
1089
  body: s
1090
1090
  };
1091
1091
  }
1092
- const In = ["onClick", "relative", "reloadDocument", "replace", "state", "target", "to", "preventScrollReset"], $n = ["aria-current", "caseSensitive", "className", "end", "style", "to", "children"], An = ["reloadDocument", "replace", "method", "action", "onSubmit", "submit", "relative", "preventScrollReset"];
1092
+ const Fn = ["onClick", "relative", "reloadDocument", "replace", "state", "target", "to", "preventScrollReset"], In = ["aria-current", "caseSensitive", "className", "end", "style", "to", "children"], An = ["reloadDocument", "replace", "method", "action", "onSubmit", "submit", "relative", "preventScrollReset"];
1093
1093
  process.env.NODE_ENV;
1094
1094
  const Un = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u", Vn = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i, ge = /* @__PURE__ */ b.forwardRef(function(n, r) {
1095
1095
  let {
@@ -1101,13 +1101,13 @@ const Un = typeof window < "u" && typeof window.document < "u" && typeof window.
1101
1101
  target: f,
1102
1102
  to: d,
1103
1103
  preventScrollReset: h
1104
- } = n, v = Ge(n, In), {
1104
+ } = n, v = Ge(n, Fn), {
1105
1105
  basename: x
1106
1106
  } = b.useContext(ee), C, O = !1;
1107
1107
  if (typeof d == "string" && Vn.test(d) && (C = d, Un))
1108
1108
  try {
1109
- let g = new URL(window.location.href), F = d.startsWith("//") ? new URL(g.protocol + d) : new URL(d), $ = Ve(F.pathname, x);
1110
- F.origin === g.origin && $ != null ? d = $ + F.search + F.hash : O = !0;
1109
+ let g = new URL(window.location.href), $ = d.startsWith("//") ? new URL(g.protocol + d) : new URL(d), I = Ve($.pathname, x);
1110
+ $.origin === g.origin && I != null ? d = I + $.search + $.hash : O = !0;
1111
1111
  } catch {
1112
1112
  process.env.NODE_ENV !== "production" && ye(!1, '<Link to="' + d + '"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.');
1113
1113
  }
@@ -1143,30 +1143,30 @@ const Wn = /* @__PURE__ */ b.forwardRef(function(n, r) {
1143
1143
  style: c,
1144
1144
  to: f,
1145
1145
  children: d
1146
- } = n, h = Ge(n, $n), v = xe(f, {
1146
+ } = n, h = Ge(n, In), v = xe(f, {
1147
1147
  relative: h.relative
1148
1148
  }), x = ue(), C = b.useContext(Rt), {
1149
1149
  navigator: O
1150
1150
  } = b.useContext(ee), R = O.encodeLocation ? O.encodeLocation(v).pathname : v.pathname, T = x.pathname, P = C && C.navigation && C.navigation.location ? C.navigation.location.pathname : null;
1151
1151
  a || (T = T.toLowerCase(), P = P ? P.toLowerCase() : null, R = R.toLowerCase());
1152
- let g = T === R || !s && T.startsWith(R) && T.charAt(R.length) === "/", F = P != null && (P === R || !s && P.startsWith(R) && P.charAt(R.length) === "/"), $ = g ? l : void 0, A;
1152
+ let g = T === R || !s && T.startsWith(R) && T.charAt(R.length) === "/", $ = P != null && (P === R || !s && P.startsWith(R) && P.charAt(R.length) === "/"), I = g ? l : void 0, A;
1153
1153
  typeof i == "function" ? A = i({
1154
1154
  isActive: g,
1155
- isPending: F
1156
- }) : A = [i, g ? "active" : null, F ? "pending" : null].filter(Boolean).join(" ");
1155
+ isPending: $
1156
+ }) : A = [i, g ? "active" : null, $ ? "pending" : null].filter(Boolean).join(" ");
1157
1157
  let U = typeof c == "function" ? c({
1158
1158
  isActive: g,
1159
- isPending: F
1159
+ isPending: $
1160
1160
  }) : c;
1161
1161
  return /* @__PURE__ */ b.createElement(ge, te({}, h, {
1162
- "aria-current": $,
1162
+ "aria-current": I,
1163
1163
  className: A,
1164
1164
  ref: r,
1165
1165
  style: U,
1166
1166
  to: f
1167
1167
  }), typeof d == "function" ? d({
1168
1168
  isActive: g,
1169
- isPending: F
1169
+ isPending: $
1170
1170
  }) : d);
1171
1171
  });
1172
1172
  process.env.NODE_ENV !== "production" && (Wn.displayName = "NavLink");
@@ -1224,7 +1224,7 @@ function Bn(e) {
1224
1224
  }
1225
1225
  function Yn(e) {
1226
1226
  let n = b.useContext(Ee);
1227
- return n || (process.env.NODE_ENV !== "production" ? I(!1, Bn(e)) : I(!1)), n;
1227
+ return n || (process.env.NODE_ENV !== "production" ? F(!1, Bn(e)) : F(!1)), n;
1228
1228
  }
1229
1229
  function Jn(e, n) {
1230
1230
  let {
@@ -1267,7 +1267,7 @@ function zn() {
1267
1267
  encType: c,
1268
1268
  formData: f,
1269
1269
  body: d
1270
- } = Fn(l, n);
1270
+ } = $n(l, n);
1271
1271
  e.navigate(a.action || i, {
1272
1272
  preventScrollReset: a.preventScrollReset,
1273
1273
  formData: f,
@@ -1285,7 +1285,7 @@ function Gn(e, n) {
1285
1285
  } = n === void 0 ? {} : n, {
1286
1286
  basename: l
1287
1287
  } = b.useContext(ee), a = b.useContext(ae);
1288
- a || (process.env.NODE_ENV !== "production" ? I(!1, "useFormAction must be used inside a RouteContext") : I(!1));
1288
+ a || (process.env.NODE_ENV !== "production" ? F(!1, "useFormAction must be used inside a RouteContext") : F(!1));
1289
1289
  let [i] = a.matches.slice(-1), s = te({}, xe(e || ".", {
1290
1290
  relative: r
1291
1291
  })), c = ue();
@@ -1600,7 +1600,7 @@ const Lt = /* @__PURE__ */ sn(Kn), lr = z(
1600
1600
  year: "numeric",
1601
1601
  month: "long",
1602
1602
  day: "numeric"
1603
- }) : "", [a]), [g, F] = q.useState(!1), [$, A] = q.useState(0), [U, G] = q.useState(!1), M = q.useRef(null);
1603
+ }) : "", [a]), [g, $] = q.useState(!1), [I, A] = q.useState(0), [U, G] = q.useState(!1), M = q.useRef(null);
1604
1604
  q.useEffect(() => (document.addEventListener("mouseup", B), window.addEventListener("scroll", W), () => {
1605
1605
  document.removeEventListener("mouseup", B), window.removeEventListener("scroll", W);
1606
1606
  }));
@@ -1611,9 +1611,9 @@ const Lt = /* @__PURE__ */ sn(Kn), lr = z(
1611
1611
  }, W = () => {
1612
1612
  if (l) {
1613
1613
  const _ = window.pageYOffset || document.documentElement.scrollTop;
1614
- if (_ < 0 || Math.abs(_ - $) < 60)
1614
+ if (_ < 0 || Math.abs(_ - I) < 60)
1615
1615
  return;
1616
- F(_ > $), A(_);
1616
+ $(_ > I), A(_);
1617
1617
  }
1618
1618
  };
1619
1619
  return /* @__PURE__ */ m(
@@ -1795,8 +1795,8 @@ const Ke = z(
1795
1795
  children: R,
1796
1796
  className: T
1797
1797
  }, P) => {
1798
- const [g, F] = ce(!1), $ = () => {
1799
- F(!g);
1798
+ const [g, $] = ce(!1), I = () => {
1799
+ $(!g);
1800
1800
  }, A = () => i ? "pkt-tag pkt-tag--small pkt-tag--thin-text pkt-tag--blue-light" : c ? "pkt-tag pkt-tag--small pkt-tag--thin-text pkt-tag--beige" : "", U = i ? s : c ? f : "", G = v ? "pkt-inputwrapper--disabled" : "", M = x ? "pkt-inputwrapper--inline" : "", K = d ? "pkt-inputwrapper--error" : "", B = !!l && l !== "", W = a || 'Les mer <span class="pkt-sr-only">om inputfeltet</span>', _ = B ? "div" : "label", D = B ? "h2" : "span", Y = C || (r ? `${e}-helptext` : void 0);
1801
1801
  return /* @__PURE__ */ m(
1802
1802
  "div",
@@ -1829,7 +1829,7 @@ const Ke = z(
1829
1829
  variant: "icon-right",
1830
1830
  iconName: g ? "chevron-thin-up" : "chevron-thin-down",
1831
1831
  className: "pkt-inputwrapper__helptext-expandable pkt-link pkt-link--icon-right",
1832
- onClick: $,
1832
+ onClick: I,
1833
1833
  children: /* @__PURE__ */ o("span", { dangerouslySetInnerHTML: { __html: W } })
1834
1834
  }
1835
1835
  ),
@@ -1856,7 +1856,7 @@ const Ke = z(
1856
1856
  ),
1857
1857
  R
1858
1858
  ] }),
1859
- d && /* @__PURE__ */ o("div", { children: /* @__PURE__ */ o(dn, { skin: "error", "aria-live": "assertive", children: h }) })
1859
+ d && /* @__PURE__ */ o("div", { children: /* @__PURE__ */ o(dn, { skin: "error", "aria-live": "assertive", id: `${e}-error`, children: h }) })
1860
1860
  ]
1861
1861
  }
1862
1862
  );
@@ -2018,8 +2018,8 @@ const pr = z(
2018
2018
  optionalText: T,
2019
2019
  required: P = !1,
2020
2020
  requiredText: g,
2021
- placeholder: F,
2022
- rows: $,
2021
+ placeholder: $,
2022
+ rows: I,
2023
2023
  useWrapper: A,
2024
2024
  onChange: U,
2025
2025
  ...G
@@ -2059,11 +2059,12 @@ const pr = z(
2059
2059
  className: `pkt-input ${a && _ > a ? "pkt-input--counter-error" : ""}`,
2060
2060
  name: O || e,
2061
2061
  id: e,
2062
- placeholder: F,
2062
+ placeholder: $,
2063
2063
  disabled: s,
2064
- rows: $,
2064
+ rows: I,
2065
2065
  "aria-labelledby": B,
2066
2066
  "aria-invalid": f,
2067
+ "aria-errormessage": `${e}-error`,
2067
2068
  "aria-required": P,
2068
2069
  ...G,
2069
2070
  onChange: Y
@@ -2098,8 +2099,8 @@ const pr = z(
2098
2099
  optionalText: T,
2099
2100
  required: P = !1,
2100
2101
  requiredText: g,
2101
- placeholder: F,
2102
- prefix: $,
2102
+ placeholder: $,
2103
+ prefix: I,
2103
2104
  suffix: A,
2104
2105
  type: U = "text",
2105
2106
  useWrapper: G = !0,
@@ -2127,7 +2128,7 @@ const pr = z(
2127
2128
  requiredText: g,
2128
2129
  useWrapper: G,
2129
2130
  children: /* @__PURE__ */ m("div", { className: "pkt-input__container", children: [
2130
- $ && /* @__PURE__ */ o("div", { className: "pkt-input-prefix", children: $ }),
2131
+ I && /* @__PURE__ */ o("div", { className: "pkt-input-prefix", children: I }),
2131
2132
  /* @__PURE__ */ o(
2132
2133
  "input",
2133
2134
  {
@@ -2136,12 +2137,13 @@ const pr = z(
2136
2137
  type: U,
2137
2138
  name: O || e,
2138
2139
  id: e,
2139
- placeholder: F,
2140
+ placeholder: $,
2140
2141
  autoComplete: l,
2141
2142
  value: M,
2142
2143
  disabled: i,
2143
2144
  "aria-required": P,
2144
2145
  "aria-invalid": c,
2146
+ "aria-errormessage": `${e}-error`,
2145
2147
  "aria-labelledby": _,
2146
2148
  ...K
2147
2149
  }
@@ -14,17 +14,17 @@
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 Ke;function Vt(){return Ke||(Ke=1,process.env.NODE_ENV!=="production"&&function(){var e=E,n=Symbol.for("react.element"),r=Symbol.for("react.portal"),l=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),c=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),h=Symbol.for("react.suspense_list"),v=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),P=Symbol.for("react.offscreen"),j=Symbol.iterator,R="@@iterator";function D(t){if(t===null||typeof t!="object")return null;var u=j&&t[j]||t[R];return typeof u=="function"?u:null}var S=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function g(t){{for(var u=arguments.length,d=new Array(u>1?u-1:0),k=1;k<u;k++)d[k-1]=arguments[k];A("error",t,d)}}function A(t,u,d){{var k=S.ReactDebugCurrentFrame,C=k.getStackAddendum();C!==""&&(u+="%s",d=d.concat([C]));var O=d.map(function(w){return String(w)});O.unshift("Warning: "+u),Function.prototype.apply.call(console[t],console,O)}}var U=!1,W=!1,V=!1,q=!1,Y=!1,K;K=Symbol.for("react.module.reference");function J(t){return!!(typeof t=="string"||typeof t=="function"||t===l||t===i||Y||t===a||t===p||t===h||q||t===P||U||W||V||typeof t=="object"&&t!==null&&(t.$$typeof===x||t.$$typeof===v||t.$$typeof===s||t.$$typeof===c||t.$$typeof===f||t.$$typeof===K||t.getModuleId!==void 0))}function B(t,u,d){var k=t.displayName;if(k)return k;var C=u.displayName||u.name||"";return C!==""?d+"("+C+")":d}function _(t){return t.displayName||"Context"}function I(t){if(t==null)return null;if(typeof t.tag=="number"&&g("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case l:return"Fragment";case r:return"Portal";case i:return"Profiler";case a:return"StrictMode";case p:return"Suspense";case h:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case c:var u=t;return _(u)+".Consumer";case s:var d=t;return _(d._context)+".Provider";case f:return B(t,t.render,"ForwardRef");case v:var k=t.displayName||null;return k!==null?k:I(t.type)||"Memo";case x:{var C=t,O=C._payload,w=C._init;try{return I(w(O))}catch{return null}}}return null}var H=Object.assign,G=0,ee,ce,_t,bt,gt,Nt,yt;function Et(){}Et.__reactDisabledLog=!0;function Wn(){{if(G===0){ee=console.log,ce=console.info,_t=console.warn,bt=console.error,gt=console.group,Nt=console.groupCollapsed,yt=console.groupEnd;var t={configurable:!0,enumerable:!0,value:Et,writable:!0};Object.defineProperties(console,{info:t,log:t,warn:t,error:t,group:t,groupCollapsed:t,groupEnd:t})}G++}}function Vn(){{if(G--,G===0){var t={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:H({},t,{value:ee}),info:H({},t,{value:ce}),warn:H({},t,{value:_t}),error:H({},t,{value:bt}),group:H({},t,{value:gt}),groupCollapsed:H({},t,{value:Nt}),groupEnd:H({},t,{value:yt})})}G<0&&g("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Ve=S.ReactCurrentDispatcher,Me;function Ne(t,u,d){{if(Me===void 0)try{throw Error()}catch(C){var k=C.stack.trim().match(/\n( *(at )?)/);Me=k&&k[1]||""}return`
17
+ */var Ke;function Vt(){return Ke||(Ke=1,process.env.NODE_ENV!=="production"&&function(){var e=E,n=Symbol.for("react.element"),r=Symbol.for("react.portal"),l=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),c=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),h=Symbol.for("react.suspense_list"),v=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),P=Symbol.for("react.offscreen"),j=Symbol.iterator,R="@@iterator";function D(t){if(t===null||typeof t!="object")return null;var u=j&&t[j]||t[R];return typeof u=="function"?u:null}var S=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function g(t){{for(var u=arguments.length,d=new Array(u>1?u-1:0),k=1;k<u;k++)d[k-1]=arguments[k];A("error",t,d)}}function A(t,u,d){{var k=S.ReactDebugCurrentFrame,C=k.getStackAddendum();C!==""&&(u+="%s",d=d.concat([C]));var O=d.map(function(w){return String(w)});O.unshift("Warning: "+u),Function.prototype.apply.call(console[t],console,O)}}var U=!1,W=!1,V=!1,q=!1,Y=!1,K;K=Symbol.for("react.module.reference");function J(t){return!!(typeof t=="string"||typeof t=="function"||t===l||t===i||Y||t===a||t===p||t===h||q||t===P||U||W||V||typeof t=="object"&&t!==null&&(t.$$typeof===x||t.$$typeof===v||t.$$typeof===s||t.$$typeof===c||t.$$typeof===f||t.$$typeof===K||t.getModuleId!==void 0))}function B(t,u,d){var k=t.displayName;if(k)return k;var C=u.displayName||u.name||"";return C!==""?d+"("+C+")":d}function _(t){return t.displayName||"Context"}function $(t){if(t==null)return null;if(typeof t.tag=="number"&&g("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case l:return"Fragment";case r:return"Portal";case i:return"Profiler";case a:return"StrictMode";case p:return"Suspense";case h:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case c:var u=t;return _(u)+".Consumer";case s:var d=t;return _(d._context)+".Provider";case f:return B(t,t.render,"ForwardRef");case v:var k=t.displayName||null;return k!==null?k:$(t.type)||"Memo";case x:{var C=t,O=C._payload,w=C._init;try{return $(w(O))}catch{return null}}}return null}var H=Object.assign,G=0,ee,ce,_t,bt,gt,Nt,yt;function Et(){}Et.__reactDisabledLog=!0;function Wn(){{if(G===0){ee=console.log,ce=console.info,_t=console.warn,bt=console.error,gt=console.group,Nt=console.groupCollapsed,yt=console.groupEnd;var t={configurable:!0,enumerable:!0,value:Et,writable:!0};Object.defineProperties(console,{info:t,log:t,warn:t,error:t,group:t,groupCollapsed:t,groupEnd:t})}G++}}function Vn(){{if(G--,G===0){var t={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:H({},t,{value:ee}),info:H({},t,{value:ce}),warn:H({},t,{value:_t}),error:H({},t,{value:bt}),group:H({},t,{value:gt}),groupCollapsed:H({},t,{value:Nt}),groupEnd:H({},t,{value:yt})})}G<0&&g("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Ve=S.ReactCurrentDispatcher,Me;function Ne(t,u,d){{if(Me===void 0)try{throw Error()}catch(C){var k=C.stack.trim().match(/\n( *(at )?)/);Me=k&&k[1]||""}return`
18
18
  `+Me+t}}var Be=!1,ye;{var Mn=typeof WeakMap=="function"?WeakMap:Map;ye=new Mn}function wt(t,u){if(!t||Be)return"";{var d=ye.get(t);if(d!==void 0)return d}var k;Be=!0;var C=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var O;O=Ve.current,Ve.current=null,Wn();try{if(u){var w=function(){throw Error()};if(Object.defineProperty(w.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(w,[])}catch(Z){k=Z}Reflect.construct(t,[],w)}else{try{w.call()}catch(Z){k=Z}t.call(w.prototype)}}else{try{throw Error()}catch(Z){k=Z}t()}}catch(Z){if(Z&&k&&typeof Z.stack=="string"){for(var y=Z.stack.split(`
19
19
  `),M=k.stack.split(`
20
20
  `),L=y.length-1,F=M.length-1;L>=1&&F>=0&&y[L]!==M[F];)F--;for(;L>=1&&F>=0;L--,F--)if(y[L]!==M[F]){if(L!==1||F!==1)do if(L--,F--,F<0||y[L]!==M[F]){var z=`
21
- `+y[L].replace(" at new "," at ");return t.displayName&&z.includes("<anonymous>")&&(z=z.replace("<anonymous>",t.displayName)),typeof t=="function"&&ye.set(t,z),z}while(L>=1&&F>=0);break}}}finally{Be=!1,Ve.current=O,Vn(),Error.prepareStackTrace=C}var ae=t?t.displayName||t.name:"",$t=ae?Ne(ae):"";return typeof t=="function"&&ye.set(t,$t),$t}function Bn(t,u,d){return wt(t,!1)}function Yn(t){var u=t.prototype;return!!(u&&u.isReactComponent)}function Ee(t,u,d){if(t==null)return"";if(typeof t=="function")return wt(t,Yn(t));if(typeof t=="string")return Ne(t);switch(t){case p:return Ne("Suspense");case h:return Ne("SuspenseList")}if(typeof t=="object")switch(t.$$typeof){case f:return Bn(t.render);case v:return Ee(t.type,u,d);case x:{var k=t,C=k._payload,O=k._init;try{return Ee(O(C),u,d)}catch{}}}return""}var we=Object.prototype.hasOwnProperty,xt={},Ct=S.ReactDebugCurrentFrame;function xe(t){if(t){var u=t._owner,d=Ee(t.type,t._source,u?u.type:null);Ct.setExtraStackFrame(d)}else Ct.setExtraStackFrame(null)}function Jn(t,u,d,k,C){{var O=Function.call.bind(we);for(var w in t)if(O(t,w)){var y=void 0;try{if(typeof t[w]!="function"){var M=Error((k||"React class")+": "+d+" type `"+w+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof t[w]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw M.name="Invariant Violation",M}y=t[w](u,w,k,d,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(L){y=L}y&&!(y instanceof Error)&&(xe(C),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).",k||"React class",d,w,typeof y),xe(null)),y instanceof Error&&!(y.message in xt)&&(xt[y.message]=!0,xe(C),g("Failed %s type: %s",d,y.message),xe(null))}}}var Hn=Array.isArray;function Ye(t){return Hn(t)}function zn(t){{var u=typeof Symbol=="function"&&Symbol.toStringTag,d=u&&t[Symbol.toStringTag]||t.constructor.name||"Object";return d}}function Gn(t){try{return Pt(t),!1}catch{return!0}}function Pt(t){return""+t}function Rt(t){if(Gn(t))return g("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",zn(t)),Pt(t)}var ue=S.ReactCurrentOwner,qn={key:!0,ref:!0,__self:!0,__source:!0},St,Ot,Je;Je={};function Kn(t){if(we.call(t,"ref")){var u=Object.getOwnPropertyDescriptor(t,"ref").get;if(u&&u.isReactWarning)return!1}return t.ref!==void 0}function Xn(t){if(we.call(t,"key")){var u=Object.getOwnPropertyDescriptor(t,"key").get;if(u&&u.isReactWarning)return!1}return t.key!==void 0}function Zn(t,u){if(typeof t.ref=="string"&&ue.current&&u&&ue.current.stateNode!==u){var d=I(ue.current.type);Je[d]||(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',I(ue.current.type),t.ref),Je[d]=!0)}}function Qn(t,u){{var d=function(){St||(St=!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)",u))};d.isReactWarning=!0,Object.defineProperty(t,"key",{get:d,configurable:!0})}}function er(t,u){{var d=function(){Ot||(Ot=!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)",u))};d.isReactWarning=!0,Object.defineProperty(t,"ref",{get:d,configurable:!0})}}var tr=function(t,u,d,k,C,O,w){var y={$$typeof:n,type:t,key:u,ref:d,props:w,_owner:O};return y._store={},Object.defineProperty(y._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(y,"_self",{configurable:!1,enumerable:!1,writable:!1,value:k}),Object.defineProperty(y,"_source",{configurable:!1,enumerable:!1,writable:!1,value:C}),Object.freeze&&(Object.freeze(y.props),Object.freeze(y)),y};function nr(t,u,d,k,C){{var O,w={},y=null,M=null;d!==void 0&&(Rt(d),y=""+d),Xn(u)&&(Rt(u.key),y=""+u.key),Kn(u)&&(M=u.ref,Zn(u,C));for(O in u)we.call(u,O)&&!qn.hasOwnProperty(O)&&(w[O]=u[O]);if(t&&t.defaultProps){var L=t.defaultProps;for(O in L)w[O]===void 0&&(w[O]=L[O])}if(y||M){var F=typeof t=="function"?t.displayName||t.name||"Unknown":t;y&&Qn(w,F),M&&er(w,F)}return tr(t,y,M,C,k,ue.current,w)}}var He=S.ReactCurrentOwner,Tt=S.ReactDebugCurrentFrame;function re(t){if(t){var u=t._owner,d=Ee(t.type,t._source,u?u.type:null);Tt.setExtraStackFrame(d)}else Tt.setExtraStackFrame(null)}var ze;ze=!1;function Ge(t){return typeof t=="object"&&t!==null&&t.$$typeof===n}function jt(){{if(He.current){var t=I(He.current.type);if(t)return`
21
+ `+y[L].replace(" at new "," at ");return t.displayName&&z.includes("<anonymous>")&&(z=z.replace("<anonymous>",t.displayName)),typeof t=="function"&&ye.set(t,z),z}while(L>=1&&F>=0);break}}}finally{Be=!1,Ve.current=O,Vn(),Error.prepareStackTrace=C}var ae=t?t.displayName||t.name:"",It=ae?Ne(ae):"";return typeof t=="function"&&ye.set(t,It),It}function Bn(t,u,d){return wt(t,!1)}function Yn(t){var u=t.prototype;return!!(u&&u.isReactComponent)}function Ee(t,u,d){if(t==null)return"";if(typeof t=="function")return wt(t,Yn(t));if(typeof t=="string")return Ne(t);switch(t){case p:return Ne("Suspense");case h:return Ne("SuspenseList")}if(typeof t=="object")switch(t.$$typeof){case f:return Bn(t.render);case v:return Ee(t.type,u,d);case x:{var k=t,C=k._payload,O=k._init;try{return Ee(O(C),u,d)}catch{}}}return""}var we=Object.prototype.hasOwnProperty,xt={},Ct=S.ReactDebugCurrentFrame;function xe(t){if(t){var u=t._owner,d=Ee(t.type,t._source,u?u.type:null);Ct.setExtraStackFrame(d)}else Ct.setExtraStackFrame(null)}function Jn(t,u,d,k,C){{var O=Function.call.bind(we);for(var w in t)if(O(t,w)){var y=void 0;try{if(typeof t[w]!="function"){var M=Error((k||"React class")+": "+d+" type `"+w+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof t[w]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw M.name="Invariant Violation",M}y=t[w](u,w,k,d,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(L){y=L}y&&!(y instanceof Error)&&(xe(C),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).",k||"React class",d,w,typeof y),xe(null)),y instanceof Error&&!(y.message in xt)&&(xt[y.message]=!0,xe(C),g("Failed %s type: %s",d,y.message),xe(null))}}}var Hn=Array.isArray;function Ye(t){return Hn(t)}function zn(t){{var u=typeof Symbol=="function"&&Symbol.toStringTag,d=u&&t[Symbol.toStringTag]||t.constructor.name||"Object";return d}}function Gn(t){try{return Pt(t),!1}catch{return!0}}function Pt(t){return""+t}function Rt(t){if(Gn(t))return g("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",zn(t)),Pt(t)}var ue=S.ReactCurrentOwner,qn={key:!0,ref:!0,__self:!0,__source:!0},St,Ot,Je;Je={};function Kn(t){if(we.call(t,"ref")){var u=Object.getOwnPropertyDescriptor(t,"ref").get;if(u&&u.isReactWarning)return!1}return t.ref!==void 0}function Xn(t){if(we.call(t,"key")){var u=Object.getOwnPropertyDescriptor(t,"key").get;if(u&&u.isReactWarning)return!1}return t.key!==void 0}function Zn(t,u){if(typeof t.ref=="string"&&ue.current&&u&&ue.current.stateNode!==u){var d=$(ue.current.type);Je[d]||(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',$(ue.current.type),t.ref),Je[d]=!0)}}function Qn(t,u){{var d=function(){St||(St=!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)",u))};d.isReactWarning=!0,Object.defineProperty(t,"key",{get:d,configurable:!0})}}function er(t,u){{var d=function(){Ot||(Ot=!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)",u))};d.isReactWarning=!0,Object.defineProperty(t,"ref",{get:d,configurable:!0})}}var tr=function(t,u,d,k,C,O,w){var y={$$typeof:n,type:t,key:u,ref:d,props:w,_owner:O};return y._store={},Object.defineProperty(y._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(y,"_self",{configurable:!1,enumerable:!1,writable:!1,value:k}),Object.defineProperty(y,"_source",{configurable:!1,enumerable:!1,writable:!1,value:C}),Object.freeze&&(Object.freeze(y.props),Object.freeze(y)),y};function nr(t,u,d,k,C){{var O,w={},y=null,M=null;d!==void 0&&(Rt(d),y=""+d),Xn(u)&&(Rt(u.key),y=""+u.key),Kn(u)&&(M=u.ref,Zn(u,C));for(O in u)we.call(u,O)&&!qn.hasOwnProperty(O)&&(w[O]=u[O]);if(t&&t.defaultProps){var L=t.defaultProps;for(O in L)w[O]===void 0&&(w[O]=L[O])}if(y||M){var F=typeof t=="function"?t.displayName||t.name||"Unknown":t;y&&Qn(w,F),M&&er(w,F)}return tr(t,y,M,C,k,ue.current,w)}}var He=S.ReactCurrentOwner,Tt=S.ReactDebugCurrentFrame;function re(t){if(t){var u=t._owner,d=Ee(t.type,t._source,u?u.type:null);Tt.setExtraStackFrame(d)}else Tt.setExtraStackFrame(null)}var ze;ze=!1;function Ge(t){return typeof t=="object"&&t!==null&&t.$$typeof===n}function jt(){{if(He.current){var t=$(He.current.type);if(t)return`
22
22
 
23
23
  Check the render method of \``+t+"`."}return""}}function rr(t){{if(t!==void 0){var u=t.fileName.replace(/^.*[\\\/]/,""),d=t.lineNumber;return`
24
24
 
25
25
  Check your code at `+u+":"+d+"."}return""}}var Dt={};function ar(t){{var u=jt();if(!u){var d=typeof t=="string"?t:t.displayName||t.name;d&&(u=`
26
26
 
27
- Check the top-level render call using <`+d+">.")}return u}}function Lt(t,u){{if(!t._store||t._store.validated||t.key!=null)return;t._store.validated=!0;var d=ar(u);if(Dt[d])return;Dt[d]=!0;var k="";t&&t._owner&&t._owner!==He.current&&(k=" It was passed a child from "+I(t._owner.type)+"."),re(t),g('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',d,k),re(null)}}function It(t,u){{if(typeof t!="object")return;if(Ye(t))for(var d=0;d<t.length;d++){var k=t[d];Ge(k)&&Lt(k,u)}else if(Ge(t))t._store&&(t._store.validated=!0);else if(t){var C=D(t);if(typeof C=="function"&&C!==t.entries)for(var O=C.call(t),w;!(w=O.next()).done;)Ge(w.value)&&Lt(w.value,u)}}}function or(t){{var u=t.type;if(u==null||typeof u=="string")return;var d;if(typeof u=="function")d=u.propTypes;else if(typeof u=="object"&&(u.$$typeof===f||u.$$typeof===v))d=u.propTypes;else return;if(d){var k=I(u);Jn(d,t.props,"prop",k,t)}else if(u.PropTypes!==void 0&&!ze){ze=!0;var C=I(u);g("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",C||"Unknown")}typeof u.getDefaultProps=="function"&&!u.getDefaultProps.isReactClassApproved&&g("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function lr(t){{for(var u=Object.keys(t.props),d=0;d<u.length;d++){var k=u[d];if(k!=="children"&&k!=="key"){re(t),g("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",k),re(null);break}}t.ref!==null&&(re(t),g("Invalid attribute `ref` supplied to `React.Fragment`."),re(null))}}function Ft(t,u,d,k,C,O){{var w=J(t);if(!w){var y="";(t===void 0||typeof t=="object"&&t!==null&&Object.keys(t).length===0)&&(y+=" 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 M=rr(C);M?y+=M:y+=jt();var L;t===null?L="null":Ye(t)?L="array":t!==void 0&&t.$$typeof===n?(L="<"+(I(t.type)||"Unknown")+" />",y=" Did you accidentally export a JSX literal instead of a component?"):L=typeof t,g("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",L,y)}var F=nr(t,u,d,C,O);if(F==null)return F;if(w){var z=u.children;if(z!==void 0)if(k)if(Ye(z)){for(var ae=0;ae<z.length;ae++)It(z[ae],t);Object.freeze&&Object.freeze(z)}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 It(z,t)}return t===l?lr(F):or(F),F}}function ir(t,u,d){return Ft(t,u,d,!0)}function sr(t,u,d){return Ft(t,u,d,!1)}var cr=sr,ur=ir;le.Fragment=l,le.jsx=cr,le.jsxs=ur}()),le}process.env.NODE_ENV==="production"?Ce.exports=Wt():Ce.exports=Vt();var Pe=Ce.exports;const X=Pe.Fragment,o=Pe.jsx,m=Pe.jsxs,Re={},Mt='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"></svg>';function Bt(e,n){return!Re[e]&&typeof window.fetch=="function"&&(Re[e]=window.fetch(n+e+".svg").then(r=>r.ok?r.text():(console.error("Missing icon: "+n+e+".svg"),Mt)).then(r=>r)),Promise.resolve(Re[e])}const N=({name:e,path:n,className:r="",...l})=>{const a="https://punkt-cdn.oslo.kommune.no/8.0/icons/",[i,s]=E.useState(null);return E.useEffect(()=>{if(!e)return;Bt(e,n||a).then(f=>s(f))},[e,n,a]),i?o("span",{className:`pkt-icon ${r}`,dangerouslySetInnerHTML:{__html:i},...l}):null},Xe=E.forwardRef(({children:e,className:n,skin:r="info",closeAlert:l=!1,onClose:a,title:i,date:s,ariaLive:c="polite",...f},p)=>{const h=[n,"pkt-alert",r&&`pkt-alert--${r}`].filter(Boolean).join(" "),[v,x]=E.useState(!0),P=()=>{x(!1),a&&a()};return v?m("div",{...f,className:h,"aria-live":c,ref:p,children:[o(N,{className:"pkt-alert__icon",name:r==="info"?"alert-information":`alert-${r}`}),l&&o("div",{className:"pkt-alert__close",children:o("button",{type:"button",className:"pkt-btn pkt-btn--tertiary pkt-btn--small pkt-btn--icon-only",tabIndex:0,"aria-label":"close",onClick:P,children:o(N,{name:"close",className:"pkt-btn__icon","aria-hidden":"true"})})}),i&&o("div",{className:"pkt-alert__title",children:i}),o("div",{className:"pkt-alert__text",children:e}),s&&m("div",{className:"pkt-alert__date",children:["Sist oppdatert: ",s]})]}):null}),Yt=E.forwardRef(({href:e,text:n,onClick:r,className:l,...a},i)=>{const s=[l,"pkt-back-link"].filter(Boolean).join(" ");return o("nav",{ref:i,className:s,"aria-label":"Gå tilbake et steg",children:m("a",{href:e||"/",className:"pkt-link pkt-link--icon-left",onClick:()=>{r&&r()},...a,children:[o(N,{className:"pkt-back-link__icon pkt-icon pkt-link__icon",name:"chevron-thin-left","aria-hidden":"true"}),o("span",{className:"pkt-back-link__text",children:n||"Forsiden"})]})})});/**
27
+ Check the top-level render call using <`+d+">.")}return u}}function Lt(t,u){{if(!t._store||t._store.validated||t.key!=null)return;t._store.validated=!0;var d=ar(u);if(Dt[d])return;Dt[d]=!0;var k="";t&&t._owner&&t._owner!==He.current&&(k=" It was passed a child from "+$(t._owner.type)+"."),re(t),g('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',d,k),re(null)}}function $t(t,u){{if(typeof t!="object")return;if(Ye(t))for(var d=0;d<t.length;d++){var k=t[d];Ge(k)&&Lt(k,u)}else if(Ge(t))t._store&&(t._store.validated=!0);else if(t){var C=D(t);if(typeof C=="function"&&C!==t.entries)for(var O=C.call(t),w;!(w=O.next()).done;)Ge(w.value)&&Lt(w.value,u)}}}function or(t){{var u=t.type;if(u==null||typeof u=="string")return;var d;if(typeof u=="function")d=u.propTypes;else if(typeof u=="object"&&(u.$$typeof===f||u.$$typeof===v))d=u.propTypes;else return;if(d){var k=$(u);Jn(d,t.props,"prop",k,t)}else if(u.PropTypes!==void 0&&!ze){ze=!0;var C=$(u);g("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",C||"Unknown")}typeof u.getDefaultProps=="function"&&!u.getDefaultProps.isReactClassApproved&&g("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function lr(t){{for(var u=Object.keys(t.props),d=0;d<u.length;d++){var k=u[d];if(k!=="children"&&k!=="key"){re(t),g("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",k),re(null);break}}t.ref!==null&&(re(t),g("Invalid attribute `ref` supplied to `React.Fragment`."),re(null))}}function Ft(t,u,d,k,C,O){{var w=J(t);if(!w){var y="";(t===void 0||typeof t=="object"&&t!==null&&Object.keys(t).length===0)&&(y+=" 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 M=rr(C);M?y+=M:y+=jt();var L;t===null?L="null":Ye(t)?L="array":t!==void 0&&t.$$typeof===n?(L="<"+($(t.type)||"Unknown")+" />",y=" Did you accidentally export a JSX literal instead of a component?"):L=typeof t,g("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",L,y)}var F=nr(t,u,d,C,O);if(F==null)return F;if(w){var z=u.children;if(z!==void 0)if(k)if(Ye(z)){for(var ae=0;ae<z.length;ae++)$t(z[ae],t);Object.freeze&&Object.freeze(z)}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 $t(z,t)}return t===l?lr(F):or(F),F}}function ir(t,u,d){return Ft(t,u,d,!0)}function sr(t,u,d){return Ft(t,u,d,!1)}var cr=sr,ur=ir;le.Fragment=l,le.jsx=cr,le.jsxs=ur}()),le}process.env.NODE_ENV==="production"?Ce.exports=Wt():Ce.exports=Vt();var Pe=Ce.exports;const X=Pe.Fragment,o=Pe.jsx,m=Pe.jsxs,Re={},Mt='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"></svg>';function Bt(e,n){return!Re[e]&&typeof window.fetch=="function"&&(Re[e]=window.fetch(n+e+".svg").then(r=>r.ok?r.text():(console.error("Missing icon: "+n+e+".svg"),Mt)).then(r=>r)),Promise.resolve(Re[e])}const N=({name:e,path:n,className:r="",...l})=>{const a="https://punkt-cdn.oslo.kommune.no/8.0/icons/",[i,s]=E.useState(null);return E.useEffect(()=>{if(!e)return;Bt(e,n||a).then(f=>s(f))},[e,n,a]),i?o("span",{className:`pkt-icon ${r}`,dangerouslySetInnerHTML:{__html:i},...l}):null},Xe=E.forwardRef(({children:e,className:n,skin:r="info",closeAlert:l=!1,onClose:a,title:i,date:s,ariaLive:c="polite",...f},p)=>{const h=[n,"pkt-alert",r&&`pkt-alert--${r}`].filter(Boolean).join(" "),[v,x]=E.useState(!0),P=()=>{x(!1),a&&a()};return v?m("div",{...f,className:h,"aria-live":c,ref:p,children:[o(N,{className:"pkt-alert__icon",name:r==="info"?"alert-information":`alert-${r}`}),l&&o("div",{className:"pkt-alert__close",children:o("button",{type:"button",className:"pkt-btn pkt-btn--tertiary pkt-btn--small pkt-btn--icon-only",tabIndex:0,"aria-label":"close",onClick:P,children:o(N,{name:"close",className:"pkt-btn__icon","aria-hidden":"true"})})}),i&&o("div",{className:"pkt-alert__title",children:i}),o("div",{className:"pkt-alert__text",children:e}),s&&m("div",{className:"pkt-alert__date",children:["Sist oppdatert: ",s]})]}):null}),Yt=E.forwardRef(({href:e,text:n,onClick:r,className:l,...a},i)=>{const s=[l,"pkt-back-link"].filter(Boolean).join(" ");return o("nav",{ref:i,className:s,"aria-label":"Gå tilbake et steg",children:m("a",{href:e||"/",className:"pkt-link pkt-link--icon-left",onClick:()=>{r&&r()},...a,children:[o(N,{className:"pkt-back-link__icon pkt-icon pkt-link__icon",name:"chevron-thin-left","aria-hidden":"true"}),o("span",{className:"pkt-back-link__text",children:n||"Forsiden"})]})})});/**
28
28
  * @remix-run/router v1.7.1
29
29
  *
30
30
  * Copyright (c) Remix Software Inc.
@@ -33,7 +33,7 @@ Check the top-level render call using <`+d+">.")}return u}}function Lt(t,u){{if(
33
33
  * LICENSE.md file in the root directory of this source tree.
34
34
  *
35
35
  * @license MIT
36
- */function Se(){return Se=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var l in r)Object.prototype.hasOwnProperty.call(r,l)&&(e[l]=r[l])}return e},Se.apply(this,arguments)}var Ze;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(Ze||(Ze={}));function $(e,n){if(e===!1||e===null||typeof e>"u")throw new Error(n)}function fe(e,n){if(!e){typeof console<"u"&&console.warn(n);try{throw new Error(n)}catch{}}}function Oe(e){let{pathname:n="/",search:r="",hash:l=""}=e;return r&&r!=="?"&&(n+=r.charAt(0)==="?"?r:"?"+r),l&&l!=="#"&&(n+=l.charAt(0)==="#"?l:"#"+l),n}function Qe(e){let n={};if(e){let r=e.indexOf("#");r>=0&&(n.hash=e.substr(r),e=e.substr(0,r));let l=e.indexOf("?");l>=0&&(n.search=e.substr(l),e=e.substr(0,l)),e&&(n.pathname=e)}return n}var et;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(et||(et={}));function Te(e,n){if(n==="/")return e;if(!e.toLowerCase().startsWith(n.toLowerCase()))return null;let r=n.endsWith("/")?n.length-1:n.length,l=e.charAt(r);return l&&l!=="/"?null:e.slice(r)||"/"}function Jt(e,n){n===void 0&&(n="/");let{pathname:r,search:l="",hash:a=""}=typeof e=="string"?Qe(e):e;return{pathname:r?r.startsWith("/")?r:Ht(r,n):n,search:zt(l),hash:Gt(a)}}function Ht(e,n){let r=n.replace(/\/+$/,"").split("/");return e.split("/").forEach(a=>{a===".."?r.length>1&&r.pop():a!=="."&&r.push(a)}),r.length>1?r.join("/"):"/"}function je(e,n,r,l){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+n+"` field ["+JSON.stringify(l)+"]. Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function tt(e){return e.filter((n,r)=>r===0||n.route.path&&n.route.path.length>0)}function nt(e,n,r,l){l===void 0&&(l=!1);let a;typeof e=="string"?a=Qe(e):(a=Se({},e),$(!a.pathname||!a.pathname.includes("?"),je("?","pathname","search",a)),$(!a.pathname||!a.pathname.includes("#"),je("#","pathname","hash",a)),$(!a.search||!a.search.includes("#"),je("#","search","hash",a)));let i=e===""||a.pathname==="",s=i?"/":a.pathname,c;if(l||s==null)c=r;else{let v=n.length-1;if(s.startsWith("..")){let x=s.split("/");for(;x[0]==="..";)x.shift(),v-=1;a.pathname=x.join("/")}c=v>=0?n[v]:"/"}let f=Jt(a,c),p=s&&s!=="/"&&s.endsWith("/"),h=(i||s===".")&&r.endsWith("/");return!f.pathname.endsWith("/")&&(p||h)&&(f.pathname+="/"),f}const De=e=>e.join("/").replace(/\/\/+/g,"/"),zt=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Gt=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,rt=["post","put","patch","delete"];new Set(rt);const qt=["get",...rt];new Set(qt);/**
36
+ */function Se(){return Se=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var l in r)Object.prototype.hasOwnProperty.call(r,l)&&(e[l]=r[l])}return e},Se.apply(this,arguments)}var Ze;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(Ze||(Ze={}));function I(e,n){if(e===!1||e===null||typeof e>"u")throw new Error(n)}function fe(e,n){if(!e){typeof console<"u"&&console.warn(n);try{throw new Error(n)}catch{}}}function Oe(e){let{pathname:n="/",search:r="",hash:l=""}=e;return r&&r!=="?"&&(n+=r.charAt(0)==="?"?r:"?"+r),l&&l!=="#"&&(n+=l.charAt(0)==="#"?l:"#"+l),n}function Qe(e){let n={};if(e){let r=e.indexOf("#");r>=0&&(n.hash=e.substr(r),e=e.substr(0,r));let l=e.indexOf("?");l>=0&&(n.search=e.substr(l),e=e.substr(0,l)),e&&(n.pathname=e)}return n}var et;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(et||(et={}));function Te(e,n){if(n==="/")return e;if(!e.toLowerCase().startsWith(n.toLowerCase()))return null;let r=n.endsWith("/")?n.length-1:n.length,l=e.charAt(r);return l&&l!=="/"?null:e.slice(r)||"/"}function Jt(e,n){n===void 0&&(n="/");let{pathname:r,search:l="",hash:a=""}=typeof e=="string"?Qe(e):e;return{pathname:r?r.startsWith("/")?r:Ht(r,n):n,search:zt(l),hash:Gt(a)}}function Ht(e,n){let r=n.replace(/\/+$/,"").split("/");return e.split("/").forEach(a=>{a===".."?r.length>1&&r.pop():a!=="."&&r.push(a)}),r.length>1?r.join("/"):"/"}function je(e,n,r,l){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+n+"` field ["+JSON.stringify(l)+"]. Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function tt(e){return e.filter((n,r)=>r===0||n.route.path&&n.route.path.length>0)}function nt(e,n,r,l){l===void 0&&(l=!1);let a;typeof e=="string"?a=Qe(e):(a=Se({},e),I(!a.pathname||!a.pathname.includes("?"),je("?","pathname","search",a)),I(!a.pathname||!a.pathname.includes("#"),je("#","pathname","hash",a)),I(!a.search||!a.search.includes("#"),je("#","search","hash",a)));let i=e===""||a.pathname==="",s=i?"/":a.pathname,c;if(l||s==null)c=r;else{let v=n.length-1;if(s.startsWith("..")){let x=s.split("/");for(;x[0]==="..";)x.shift(),v-=1;a.pathname=x.join("/")}c=v>=0?n[v]:"/"}let f=Jt(a,c),p=s&&s!=="/"&&s.endsWith("/"),h=(i||s===".")&&r.endsWith("/");return!f.pathname.endsWith("/")&&(p||h)&&(f.pathname+="/"),f}const De=e=>e.join("/").replace(/\/\/+/g,"/"),zt=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Gt=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,rt=["post","put","patch","delete"];new Set(rt);const qt=["get",...rt];new Set(qt);/**
37
37
  * React Router v6.14.1
38
38
  *
39
39
  * Copyright (c) Remix Software Inc.
@@ -42,7 +42,7 @@ Check the top-level render call using <`+d+">.")}return u}}function Lt(t,u){{if(
42
42
  * LICENSE.md file in the root directory of this source tree.
43
43
  *
44
44
  * @license MIT
45
- */function Le(){return Le=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var l in r)Object.prototype.hasOwnProperty.call(r,l)&&(e[l]=r[l])}return e},Le.apply(this,arguments)}const de=b.createContext(null);process.env.NODE_ENV!=="production"&&(de.displayName="DataRouter");const at=b.createContext(null);process.env.NODE_ENV!=="production"&&(at.displayName="DataRouterState");const Kt=b.createContext(null);process.env.NODE_ENV!=="production"&&(Kt.displayName="Await");const Q=b.createContext(null);process.env.NODE_ENV!=="production"&&(Q.displayName="Navigation");const Ie=b.createContext(null);process.env.NODE_ENV!=="production"&&(Ie.displayName="Location");const ne=b.createContext({outlet:null,matches:[],isDataRoute:!1});process.env.NODE_ENV!=="production"&&(ne.displayName="Route");const Xt=b.createContext(null);process.env.NODE_ENV!=="production"&&(Xt.displayName="RouteError");function Zt(e,n){let{relative:r}=n===void 0?{}:n;Fe()||(process.env.NODE_ENV!=="production"?$(!1,"useHref() may be used only in the context of a <Router> component."):$(!1));let{basename:l,navigator:a}=b.useContext(Q),{hash:i,pathname:s,search:c}=pe(e,{relative:r}),f=s;return l!=="/"&&(f=s==="/"?l:De([l,s])),a.createHref({pathname:f,search:c,hash:i})}function Fe(){return b.useContext(Ie)!=null}function ie(){return Fe()||(process.env.NODE_ENV!=="production"?$(!1,"useLocation() may be used only in the context of a <Router> component."):$(!1)),b.useContext(Ie).location}const ot="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function lt(e){b.useContext(Q).static||b.useLayoutEffect(e)}function Qt(){let{isDataRoute:e}=b.useContext(ne);return e?an():en()}function en(){Fe()||(process.env.NODE_ENV!=="production"?$(!1,"useNavigate() may be used only in the context of a <Router> component."):$(!1));let e=b.useContext(de),{basename:n,navigator:r}=b.useContext(Q),{matches:l}=b.useContext(ne),{pathname:a}=ie(),i=JSON.stringify(tt(l).map(f=>f.pathnameBase)),s=b.useRef(!1);return lt(()=>{s.current=!0}),b.useCallback(function(f,p){if(p===void 0&&(p={}),process.env.NODE_ENV!=="production"&&fe(s.current,ot),!s.current)return;if(typeof f=="number"){r.go(f);return}let h=nt(f,JSON.parse(i),a,p.relative==="path");e==null&&n!=="/"&&(h.pathname=h.pathname==="/"?n:De([n,h.pathname])),(p.replace?r.replace:r.push)(h,p.state,p)},[n,r,i,a,e])}function pe(e,n){let{relative:r}=n===void 0?{}:n,{matches:l}=b.useContext(ne),{pathname:a}=ie(),i=JSON.stringify(tt(l).map(s=>s.pathnameBase));return b.useMemo(()=>nt(e,JSON.parse(i),a,r==="path"),[e,i,a,r])}var $e;(function(e){e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate"})($e||($e={}));var me;(function(e){e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId"})(me||(me={}));function it(e){return e+" must be used within a data router. See https://reactrouter.com/routers/picking-a-router."}function tn(e){let n=b.useContext(de);return n||(process.env.NODE_ENV!=="production"?$(!1,it(e)):$(!1)),n}function nn(e){let n=b.useContext(ne);return n||(process.env.NODE_ENV!=="production"?$(!1,it(e)):$(!1)),n}function st(e){let n=nn(e),r=n.matches[n.matches.length-1];return r.route.id||(process.env.NODE_ENV!=="production"?$(!1,e+' can only be used on routes that contain a unique "id"'):$(!1)),r.route.id}function rn(){return st(me.UseRouteId)}function an(){let{router:e}=tn($e.UseNavigateStable),n=st(me.UseNavigateStable),r=b.useRef(!1);return lt(()=>{r.current=!0}),b.useCallback(function(a,i){i===void 0&&(i={}),process.env.NODE_ENV!=="production"&&fe(r.current,ot),r.current&&(typeof a=="number"?e.navigate(a):e.navigate(a,Le({fromRouteId:n},i)))},[e,n])}var ct;(function(e){e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error"})(ct||(ct={})),new Promise(()=>{});/**
45
+ */function Le(){return Le=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var l in r)Object.prototype.hasOwnProperty.call(r,l)&&(e[l]=r[l])}return e},Le.apply(this,arguments)}const de=b.createContext(null);process.env.NODE_ENV!=="production"&&(de.displayName="DataRouter");const at=b.createContext(null);process.env.NODE_ENV!=="production"&&(at.displayName="DataRouterState");const Kt=b.createContext(null);process.env.NODE_ENV!=="production"&&(Kt.displayName="Await");const Q=b.createContext(null);process.env.NODE_ENV!=="production"&&(Q.displayName="Navigation");const $e=b.createContext(null);process.env.NODE_ENV!=="production"&&($e.displayName="Location");const ne=b.createContext({outlet:null,matches:[],isDataRoute:!1});process.env.NODE_ENV!=="production"&&(ne.displayName="Route");const Xt=b.createContext(null);process.env.NODE_ENV!=="production"&&(Xt.displayName="RouteError");function Zt(e,n){let{relative:r}=n===void 0?{}:n;Fe()||(process.env.NODE_ENV!=="production"?I(!1,"useHref() may be used only in the context of a <Router> component."):I(!1));let{basename:l,navigator:a}=b.useContext(Q),{hash:i,pathname:s,search:c}=pe(e,{relative:r}),f=s;return l!=="/"&&(f=s==="/"?l:De([l,s])),a.createHref({pathname:f,search:c,hash:i})}function Fe(){return b.useContext($e)!=null}function ie(){return Fe()||(process.env.NODE_ENV!=="production"?I(!1,"useLocation() may be used only in the context of a <Router> component."):I(!1)),b.useContext($e).location}const ot="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function lt(e){b.useContext(Q).static||b.useLayoutEffect(e)}function Qt(){let{isDataRoute:e}=b.useContext(ne);return e?an():en()}function en(){Fe()||(process.env.NODE_ENV!=="production"?I(!1,"useNavigate() may be used only in the context of a <Router> component."):I(!1));let e=b.useContext(de),{basename:n,navigator:r}=b.useContext(Q),{matches:l}=b.useContext(ne),{pathname:a}=ie(),i=JSON.stringify(tt(l).map(f=>f.pathnameBase)),s=b.useRef(!1);return lt(()=>{s.current=!0}),b.useCallback(function(f,p){if(p===void 0&&(p={}),process.env.NODE_ENV!=="production"&&fe(s.current,ot),!s.current)return;if(typeof f=="number"){r.go(f);return}let h=nt(f,JSON.parse(i),a,p.relative==="path");e==null&&n!=="/"&&(h.pathname=h.pathname==="/"?n:De([n,h.pathname])),(p.replace?r.replace:r.push)(h,p.state,p)},[n,r,i,a,e])}function pe(e,n){let{relative:r}=n===void 0?{}:n,{matches:l}=b.useContext(ne),{pathname:a}=ie(),i=JSON.stringify(tt(l).map(s=>s.pathnameBase));return b.useMemo(()=>nt(e,JSON.parse(i),a,r==="path"),[e,i,a,r])}var Ie;(function(e){e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate"})(Ie||(Ie={}));var me;(function(e){e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId"})(me||(me={}));function it(e){return e+" must be used within a data router. See https://reactrouter.com/routers/picking-a-router."}function tn(e){let n=b.useContext(de);return n||(process.env.NODE_ENV!=="production"?I(!1,it(e)):I(!1)),n}function nn(e){let n=b.useContext(ne);return n||(process.env.NODE_ENV!=="production"?I(!1,it(e)):I(!1)),n}function st(e){let n=nn(e),r=n.matches[n.matches.length-1];return r.route.id||(process.env.NODE_ENV!=="production"?I(!1,e+' can only be used on routes that contain a unique "id"'):I(!1)),r.route.id}function rn(){return st(me.UseRouteId)}function an(){let{router:e}=tn(Ie.UseNavigateStable),n=st(me.UseNavigateStable),r=b.useRef(!1);return lt(()=>{r.current=!0}),b.useCallback(function(a,i){i===void 0&&(i={}),process.env.NODE_ENV!=="production"&&fe(r.current,ot),r.current&&(typeof a=="number"?e.navigate(a):e.navigate(a,Le({fromRouteId:n},i)))},[e,n])}var ct;(function(e){e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error"})(ct||(ct={})),new Promise(()=>{});/**
46
46
  * React Router DOM v6.14.1
47
47
  *
48
48
  * Copyright (c) Remix Software Inc.
@@ -51,8 +51,8 @@ Check the top-level render call using <`+d+">.")}return u}}function Lt(t,u){{if(
51
51
  * LICENSE.md file in the root directory of this source tree.
52
52
  *
53
53
  * @license MIT
54
- */function te(){return te=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var l in r)Object.prototype.hasOwnProperty.call(r,l)&&(e[l]=r[l])}return e},te.apply(this,arguments)}function Ae(e,n){if(e==null)return{};var r={},l=Object.keys(e),a,i;for(i=0;i<l.length;i++)a=l[i],!(n.indexOf(a)>=0)&&(r[a]=e[a]);return r}const he="get",ke="application/x-www-form-urlencoded";function ve(e){return e!=null&&typeof e.tagName=="string"}function on(e){return ve(e)&&e.tagName.toLowerCase()==="button"}function ln(e){return ve(e)&&e.tagName.toLowerCase()==="form"}function sn(e){return ve(e)&&e.tagName.toLowerCase()==="input"}function cn(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function un(e,n){return e.button===0&&(!n||n==="_self")&&!cn(e)}let _e=null;function fn(){if(_e===null)try{new FormData(document.createElement("form"),0),_e=!1}catch{_e=!0}return _e}const dn=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Ue(e){return e!=null&&!dn.has(e)?(process.env.NODE_ENV!=="production"&&fe(!1,'"'+e+'" is not a valid `encType` for `<Form>`/`<fetcher.Form>` '+('and will default to "'+ke+'"')),null):e}function pn(e,n){let r,l,a,i,s;if(ln(e)){let c=e.getAttribute("action");l=c?Te(c,n):null,r=e.getAttribute("method")||he,a=Ue(e.getAttribute("enctype"))||ke,i=new FormData(e)}else if(on(e)||sn(e)&&(e.type==="submit"||e.type==="image")){let c=e.form;if(c==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let f=e.getAttribute("formaction")||c.getAttribute("action");if(l=f?Te(f,n):null,r=e.getAttribute("formmethod")||c.getAttribute("method")||he,a=Ue(e.getAttribute("formenctype"))||Ue(c.getAttribute("enctype"))||ke,i=new FormData(c,e),!fn()){let{name:p,type:h,value:v}=e;if(h==="image"){let x=p?p+".":"";i.append(x+"x","0"),i.append(x+"y","0")}else p&&i.append(p,v)}}else{if(ve(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=he,l=null,a=ke,s=e}return i&&a==="text/plain"&&(s=i,i=void 0),{action:l,method:r.toLowerCase(),encType:a,formData:i,body:s}}const mn=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"],hn=["aria-current","caseSensitive","className","end","style","to","children"],kn=["reloadDocument","replace","method","action","onSubmit","submit","relative","preventScrollReset"];process.env.NODE_ENV;const vn=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",_n=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,be=b.forwardRef(function(n,r){let{onClick:l,relative:a,reloadDocument:i,replace:s,state:c,target:f,to:p,preventScrollReset:h}=n,v=Ae(n,mn),{basename:x}=b.useContext(Q),P,j=!1;if(typeof p=="string"&&_n.test(p)&&(P=p,vn))try{let g=new URL(window.location.href),A=p.startsWith("//")?new URL(g.protocol+p):new URL(p),U=Te(A.pathname,x);A.origin===g.origin&&U!=null?p=U+A.search+A.hash:j=!0}catch{process.env.NODE_ENV!=="production"&&fe(!1,'<Link to="'+p+'"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.')}let R=Zt(p,{relative:a}),D=En(p,{replace:s,state:c,target:f,preventScrollReset:h,relative:a});function S(g){l&&l(g),g.defaultPrevented||D(g)}return b.createElement("a",te({},v,{href:P||R,onClick:j||i?l:S,ref:r,target:f}))});process.env.NODE_ENV!=="production"&&(be.displayName="Link");const bn=b.forwardRef(function(n,r){let{"aria-current":l="page",caseSensitive:a=!1,className:i="",end:s=!1,style:c,to:f,children:p}=n,h=Ae(n,hn),v=pe(f,{relative:h.relative}),x=ie(),P=b.useContext(at),{navigator:j}=b.useContext(Q),R=j.encodeLocation?j.encodeLocation(v).pathname:v.pathname,D=x.pathname,S=P&&P.navigation&&P.navigation.location?P.navigation.location.pathname:null;a||(D=D.toLowerCase(),S=S?S.toLowerCase():null,R=R.toLowerCase());let g=D===R||!s&&D.startsWith(R)&&D.charAt(R.length)==="/",A=S!=null&&(S===R||!s&&S.startsWith(R)&&S.charAt(R.length)==="/"),U=g?l:void 0,W;typeof i=="function"?W=i({isActive:g,isPending:A}):W=[i,g?"active":null,A?"pending":null].filter(Boolean).join(" ");let V=typeof c=="function"?c({isActive:g,isPending:A}):c;return b.createElement(be,te({},h,{"aria-current":U,className:W,ref:r,style:V,to:f}),typeof p=="function"?p({isActive:g,isPending:A}):p)});process.env.NODE_ENV!=="production"&&(bn.displayName="NavLink");const gn=b.forwardRef((e,n)=>{let r=xn();return b.createElement(ut,te({},e,{submit:r,ref:n}))});process.env.NODE_ENV!=="production"&&(gn.displayName="Form");const ut=b.forwardRef((e,n)=>{let{reloadDocument:r,replace:l,method:a=he,action:i,onSubmit:s,submit:c,relative:f,preventScrollReset:p}=e,h=Ae(e,kn),v=a.toLowerCase()==="get"?"get":"post",x=Cn(i,{relative:f}),P=j=>{if(s&&s(j),j.defaultPrevented)return;j.preventDefault();let R=j.nativeEvent.submitter,D=(R==null?void 0:R.getAttribute("formmethod"))||a;c(R||j.currentTarget,{method:D,replace:l,relative:f,preventScrollReset:p})};return b.createElement("form",te({ref:n,method:v,action:x,onSubmit:r?s:P},h))});process.env.NODE_ENV!=="production"&&(ut.displayName="FormImpl"),process.env.NODE_ENV;var We;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher"})(We||(We={}));var ft;(function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(ft||(ft={}));function Nn(e){return e+" must be used within a data router. See https://reactrouter.com/routers/picking-a-router."}function yn(e){let n=b.useContext(de);return n||(process.env.NODE_ENV!=="production"?$(!1,Nn(e)):$(!1)),n}function En(e,n){let{target:r,replace:l,state:a,preventScrollReset:i,relative:s}=n===void 0?{}:n,c=Qt(),f=ie(),p=pe(e,{relative:s});return b.useCallback(h=>{if(un(h,r)){h.preventDefault();let v=l!==void 0?l:Oe(f)===Oe(p);c(e,{replace:v,state:a,preventScrollReset:i,relative:s})}},[f,c,p,l,a,r,e,i,s])}function wn(){if(typeof document>"u")throw new Error("You are calling submit during the server render. Try calling submit within a `useEffect` or callback instead.")}function xn(){let{router:e}=yn(We.UseSubmit),{basename:n}=b.useContext(Q),r=rn();return b.useCallback(function(l,a){a===void 0&&(a={}),wn();let{action:i,method:s,encType:c,formData:f,body:p}=pn(l,n);e.navigate(a.action||i,{preventScrollReset:a.preventScrollReset,formData:f,body:p,formMethod:a.method||s,formEncType:a.encType||c,replace:a.replace,fromRouteId:r})},[e,n,r])}function Cn(e,n){let{relative:r}=n===void 0?{}:n,{basename:l}=b.useContext(Q),a=b.useContext(ne);a||(process.env.NODE_ENV!=="production"?$(!1,"useFormAction must be used inside a RouteContext"):$(!1));let[i]=a.matches.slice(-1),s=te({},pe(e||".",{relative:r})),c=ie();if(e==null&&(s.search=c.search,s.hash=c.hash,i.route.index)){let f=new URLSearchParams(s.search);f.delete("index"),s.search=f.toString()?"?"+f.toString():""}return(!e||e===".")&&i.route.index&&(s.search=s.search?s.search.replace(/^\?/,"?index&"):"?index"),l!=="/"&&(s.pathname=s.pathname==="/"?l:De([l,s.pathname])),Oe(s)}const Pn=E.forwardRef(({breadcrumbs:e,navigationType:n,className:r,...l},a)=>{const i=e.slice(0,4),s=i[i.length-2],c=[r,"pkt-breadcrumbs"].filter(Boolean).join(" ");return m("nav",{ref:a,"aria-label":"brødsmulemeny",className:c,children:[o("ol",{className:"pkt-breadcrumbs__list pkt-breadcrumbs--desktop",children:i.map((f,p)=>o("li",{className:"pkt-breadcrumbs__item",children:p===i.length-1?o("span",{className:"pkt-breadcrumbs__label","aria-current":"true",children:o("span",{className:"pkt-breadcrumbs__text",children:f.text})}):n==="router"?m(be,{to:f.href,className:"pkt-link pkt-link--icon-right pkt-breadcrumbs__label pkt-breadcrumbs__link",...l,children:[o(N,{className:"pkt-icon pkt-breadcrumbs__icon pkt-link__icon",name:"chevron-thin-right"}),o("span",{className:"pkt-breadcrumbs__text",children:f.text})]}):m("a",{href:f.href,className:"pkt-link pkt-link--icon-right pkt-breadcrumbs__label pkt-breadcrumbs__link",...l,children:[o(N,{className:"pkt-icon pkt-breadcrumbs__icon pkt-link__icon",name:"chevron-thin-right"}),o("span",{className:"pkt-breadcrumbs__text",children:f.text})]})},`breadcrumb-${p}`))}),n==="router"?m(be,{to:s.href,className:"pkt-link pkt-link--icon-left pkt-breadcrumbs--mobile",...l,children:[o(N,{className:"pkt-back-link__icon pkt-icon pkt-link__icon",name:"chevron-thin-left"}),o("span",{className:"pkt-breadcrumbs__text",children:s.text})]}):m("a",{href:s.href,className:"pkt-link pkt-link--icon-left pkt-breadcrumbs--mobile",...l,children:[o(N,{className:"pkt-back-link__icon pkt-icon pkt-link__icon",name:"chevron-thin-left"}),o("span",{className:"pkt-breadcrumbs__text",children:s.text})]})]})}),se=E.forwardRef(({children:e,className:n,iconName:r="user",secondIconName:l="user",size:a="medium",skin:i="primary",type:s="button",variant:c="label-only",color:f,...p},h)=>{const v=[n,"pkt-btn",a&&`pkt-btn--${a}`,i&&`pkt-btn--${i}`,c&&`pkt-btn--${c}`,f&&`pkt-btn--${f}`].filter(Boolean).join(" ");return m("button",{...p,className:v,type:s,ref:h,children:[c!=="label-only"&&o(N,{className:"pkt-btn__icon",name:r}),o("span",{className:"pkt-btn__text",children:e}),c==="icons-right-and-left"&&o(N,{className:"pkt-btn__icon",name:l})]})});se.displayName="PktButton";const Rn=({columnOne:e,columnTwo:n,socialLinks:r,className:l})=>{var i,s;const a=[l,"pkt-footer"].filter(Boolean).join(" ");return o("footer",{className:a,"data-mode":"dark",children:m("div",{className:"pkt-footer__container",children:[m("div",{className:"pkt-grid pkt-grid--rowgap-size-32 pkt-grid--gap-size-16",children:[m("div",{className:"pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up",children:[o("h2",{className:"pkt-footer__title",children:e.title}),m("ul",{className:"pkt-footer__list",children:[e.text&&o("li",{className:"pkt-footer__text",children:e.text}),(i=e.links)==null?void 0:i.map((c,f)=>o("li",{className:"pkt-footer__list-item",children:m("a",{className:`pkt-footer__link ${c.external?"pkt-link--external":""}`,href:c.href,target:c.openInNewTab?"_blank":"_self",rel:c.openInNewTab?"noopener noreferrer":void 0,children:[o(N,{className:"pkt-footer__link-icon",name:"chevron-right"}),c.text]})},`links-${f}`))]})]}),m("div",{className:"pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up",children:[o("h2",{className:"pkt-footer__title",children:n.title}),m("ul",{className:"pkt-footer__list",children:[n.text&&o("li",{className:"pkt-footer__text",children:n.text}),(s=n.links)==null?void 0:s.map((c,f)=>o("li",{className:"pkt-footer__list-item",children:m("a",{className:`pkt-footer__link ${c.external?"pkt-link--external":""}`,href:c.href,target:c.openInNewTab?"_blank":"_self",rel:c.openInNewTab?"noopener noreferrer":void 0,children:[o(N,{className:"pkt-footer__link-icon",name:"chevron-right"}),c.text]})},`links-${f}`))]})]}),m("div",{className:"pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up",children:[o("h2",{className:"pkt-footer__title",children:"Om nettstedet"}),m("ul",{className:"pkt-footer__list",children:[o("li",{className:"pkt-footer__list-item",children:m("a",{className:"pkt-footer__link",href:"https://www.oslo.kommune.no/personvern-og-informasjonskapsler/",children:[o(N,{className:"pkt-footer__link-icon",name:"chevron-right"}),"Personvern og informasjonskapsler"]})}),o("li",{className:"pkt-footer__list-item",children:m("a",{className:"pkt-footer__link",href:"https://www.oslo.kommune.no/tilgjengelighet/",children:[o(N,{className:"pkt-footer__link-icon",name:"chevron-right"}),"Tilgjengelighet"]})})]})]})]}),r&&m("div",{className:"pkt-footer__social","aria-label":"standard lenker",children:[o("div",{className:"pkt-footer__social-languages",children:r.filter(c=>c.language).map((c,f)=>o("div",{className:"pkt-footer__social-language",children:o("a",{href:c.href,"aria-label":`til ${c.language} versjon av nettsiden`,target:c.openInNewTab?"_blank":"_self",rel:c.openInNewTab?"noopener noreferrer":void 0,children:c.language})},`sociallinks-language-${f}`))}),o("div",{className:"pkt-footer__social-icons",children:r.filter(c=>c.iconName).map((c,f)=>o(E.Fragment,{children:o("a",{href:c.href,"aria-label":`til ${c.iconName}`,className:"pkt-footer__social-icon-link",target:c.openInNewTab?"_blank":"_self",rel:c.openInNewTab?"noopener noreferrer":void 0,children:o(N,{className:"pkt-footer__social-icon",name:c.iconName})})},`sociallinks-${f}`))})]})]})})},Sn=({links:e=[],className:n})=>{const r=[n,"pkt-footer-simple"].filter(Boolean).join(" ");return o("footer",{className:r,"data-mode":"dark",children:o("div",{className:"pkt-footer-simple__container",children:m("ul",{className:"pkt-footer-simple__list",children:[e.map((l,a)=>o("li",{className:"pkt-footer-simple__list-item",children:m("a",{className:`pkt-footer-simple__link ${l.external?" pkt-link--external":""}`,href:l.href,target:l.openInNewTab?"_blank":"_self",rel:l.openInNewTab?"noopener noreferrer":void 0,children:[o(N,{className:"pkt-footer-simple__link-icon",name:"chevron-right"}),l.text]})},a)),o("li",{className:"pkt-footer-simple__list-item",children:m("a",{className:"pkt-footer-simple__link",href:"https://www.oslo.kommune.no/personvern-og-informasjonskapsler/",children:[o(N,{className:"pkt-footer-simple__link-icon",name:"chevron-right"}),"Personvern og informasjonskapsler"]})}),o("li",{className:"pkt-footer-simple__list-item",children:m("a",{className:"pkt-footer-simple__link",href:"https://www.oslo.kommune.no/tilgjengelighet/",children:[o(N,{className:"pkt-footer-simple__link-icon",name:"chevron-right"}),"Tilgjengelighet"]})})]})})})};var dt={exports:{}};/*!
54
+ */function te(){return te=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var l in r)Object.prototype.hasOwnProperty.call(r,l)&&(e[l]=r[l])}return e},te.apply(this,arguments)}function Ae(e,n){if(e==null)return{};var r={},l=Object.keys(e),a,i;for(i=0;i<l.length;i++)a=l[i],!(n.indexOf(a)>=0)&&(r[a]=e[a]);return r}const he="get",ke="application/x-www-form-urlencoded";function ve(e){return e!=null&&typeof e.tagName=="string"}function on(e){return ve(e)&&e.tagName.toLowerCase()==="button"}function ln(e){return ve(e)&&e.tagName.toLowerCase()==="form"}function sn(e){return ve(e)&&e.tagName.toLowerCase()==="input"}function cn(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function un(e,n){return e.button===0&&(!n||n==="_self")&&!cn(e)}let _e=null;function fn(){if(_e===null)try{new FormData(document.createElement("form"),0),_e=!1}catch{_e=!0}return _e}const dn=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Ue(e){return e!=null&&!dn.has(e)?(process.env.NODE_ENV!=="production"&&fe(!1,'"'+e+'" is not a valid `encType` for `<Form>`/`<fetcher.Form>` '+('and will default to "'+ke+'"')),null):e}function pn(e,n){let r,l,a,i,s;if(ln(e)){let c=e.getAttribute("action");l=c?Te(c,n):null,r=e.getAttribute("method")||he,a=Ue(e.getAttribute("enctype"))||ke,i=new FormData(e)}else if(on(e)||sn(e)&&(e.type==="submit"||e.type==="image")){let c=e.form;if(c==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let f=e.getAttribute("formaction")||c.getAttribute("action");if(l=f?Te(f,n):null,r=e.getAttribute("formmethod")||c.getAttribute("method")||he,a=Ue(e.getAttribute("formenctype"))||Ue(c.getAttribute("enctype"))||ke,i=new FormData(c,e),!fn()){let{name:p,type:h,value:v}=e;if(h==="image"){let x=p?p+".":"";i.append(x+"x","0"),i.append(x+"y","0")}else p&&i.append(p,v)}}else{if(ve(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=he,l=null,a=ke,s=e}return i&&a==="text/plain"&&(s=i,i=void 0),{action:l,method:r.toLowerCase(),encType:a,formData:i,body:s}}const mn=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"],hn=["aria-current","caseSensitive","className","end","style","to","children"],kn=["reloadDocument","replace","method","action","onSubmit","submit","relative","preventScrollReset"];process.env.NODE_ENV;const vn=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",_n=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,be=b.forwardRef(function(n,r){let{onClick:l,relative:a,reloadDocument:i,replace:s,state:c,target:f,to:p,preventScrollReset:h}=n,v=Ae(n,mn),{basename:x}=b.useContext(Q),P,j=!1;if(typeof p=="string"&&_n.test(p)&&(P=p,vn))try{let g=new URL(window.location.href),A=p.startsWith("//")?new URL(g.protocol+p):new URL(p),U=Te(A.pathname,x);A.origin===g.origin&&U!=null?p=U+A.search+A.hash:j=!0}catch{process.env.NODE_ENV!=="production"&&fe(!1,'<Link to="'+p+'"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.')}let R=Zt(p,{relative:a}),D=En(p,{replace:s,state:c,target:f,preventScrollReset:h,relative:a});function S(g){l&&l(g),g.defaultPrevented||D(g)}return b.createElement("a",te({},v,{href:P||R,onClick:j||i?l:S,ref:r,target:f}))});process.env.NODE_ENV!=="production"&&(be.displayName="Link");const bn=b.forwardRef(function(n,r){let{"aria-current":l="page",caseSensitive:a=!1,className:i="",end:s=!1,style:c,to:f,children:p}=n,h=Ae(n,hn),v=pe(f,{relative:h.relative}),x=ie(),P=b.useContext(at),{navigator:j}=b.useContext(Q),R=j.encodeLocation?j.encodeLocation(v).pathname:v.pathname,D=x.pathname,S=P&&P.navigation&&P.navigation.location?P.navigation.location.pathname:null;a||(D=D.toLowerCase(),S=S?S.toLowerCase():null,R=R.toLowerCase());let g=D===R||!s&&D.startsWith(R)&&D.charAt(R.length)==="/",A=S!=null&&(S===R||!s&&S.startsWith(R)&&S.charAt(R.length)==="/"),U=g?l:void 0,W;typeof i=="function"?W=i({isActive:g,isPending:A}):W=[i,g?"active":null,A?"pending":null].filter(Boolean).join(" ");let V=typeof c=="function"?c({isActive:g,isPending:A}):c;return b.createElement(be,te({},h,{"aria-current":U,className:W,ref:r,style:V,to:f}),typeof p=="function"?p({isActive:g,isPending:A}):p)});process.env.NODE_ENV!=="production"&&(bn.displayName="NavLink");const gn=b.forwardRef((e,n)=>{let r=xn();return b.createElement(ut,te({},e,{submit:r,ref:n}))});process.env.NODE_ENV!=="production"&&(gn.displayName="Form");const ut=b.forwardRef((e,n)=>{let{reloadDocument:r,replace:l,method:a=he,action:i,onSubmit:s,submit:c,relative:f,preventScrollReset:p}=e,h=Ae(e,kn),v=a.toLowerCase()==="get"?"get":"post",x=Cn(i,{relative:f}),P=j=>{if(s&&s(j),j.defaultPrevented)return;j.preventDefault();let R=j.nativeEvent.submitter,D=(R==null?void 0:R.getAttribute("formmethod"))||a;c(R||j.currentTarget,{method:D,replace:l,relative:f,preventScrollReset:p})};return b.createElement("form",te({ref:n,method:v,action:x,onSubmit:r?s:P},h))});process.env.NODE_ENV!=="production"&&(ut.displayName="FormImpl"),process.env.NODE_ENV;var We;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher"})(We||(We={}));var ft;(function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(ft||(ft={}));function Nn(e){return e+" must be used within a data router. See https://reactrouter.com/routers/picking-a-router."}function yn(e){let n=b.useContext(de);return n||(process.env.NODE_ENV!=="production"?I(!1,Nn(e)):I(!1)),n}function En(e,n){let{target:r,replace:l,state:a,preventScrollReset:i,relative:s}=n===void 0?{}:n,c=Qt(),f=ie(),p=pe(e,{relative:s});return b.useCallback(h=>{if(un(h,r)){h.preventDefault();let v=l!==void 0?l:Oe(f)===Oe(p);c(e,{replace:v,state:a,preventScrollReset:i,relative:s})}},[f,c,p,l,a,r,e,i,s])}function wn(){if(typeof document>"u")throw new Error("You are calling submit during the server render. Try calling submit within a `useEffect` or callback instead.")}function xn(){let{router:e}=yn(We.UseSubmit),{basename:n}=b.useContext(Q),r=rn();return b.useCallback(function(l,a){a===void 0&&(a={}),wn();let{action:i,method:s,encType:c,formData:f,body:p}=pn(l,n);e.navigate(a.action||i,{preventScrollReset:a.preventScrollReset,formData:f,body:p,formMethod:a.method||s,formEncType:a.encType||c,replace:a.replace,fromRouteId:r})},[e,n,r])}function Cn(e,n){let{relative:r}=n===void 0?{}:n,{basename:l}=b.useContext(Q),a=b.useContext(ne);a||(process.env.NODE_ENV!=="production"?I(!1,"useFormAction must be used inside a RouteContext"):I(!1));let[i]=a.matches.slice(-1),s=te({},pe(e||".",{relative:r})),c=ie();if(e==null&&(s.search=c.search,s.hash=c.hash,i.route.index)){let f=new URLSearchParams(s.search);f.delete("index"),s.search=f.toString()?"?"+f.toString():""}return(!e||e===".")&&i.route.index&&(s.search=s.search?s.search.replace(/^\?/,"?index&"):"?index"),l!=="/"&&(s.pathname=s.pathname==="/"?l:De([l,s.pathname])),Oe(s)}const Pn=E.forwardRef(({breadcrumbs:e,navigationType:n,className:r,...l},a)=>{const i=e.slice(0,4),s=i[i.length-2],c=[r,"pkt-breadcrumbs"].filter(Boolean).join(" ");return m("nav",{ref:a,"aria-label":"brødsmulemeny",className:c,children:[o("ol",{className:"pkt-breadcrumbs__list pkt-breadcrumbs--desktop",children:i.map((f,p)=>o("li",{className:"pkt-breadcrumbs__item",children:p===i.length-1?o("span",{className:"pkt-breadcrumbs__label","aria-current":"true",children:o("span",{className:"pkt-breadcrumbs__text",children:f.text})}):n==="router"?m(be,{to:f.href,className:"pkt-link pkt-link--icon-right pkt-breadcrumbs__label pkt-breadcrumbs__link",...l,children:[o(N,{className:"pkt-icon pkt-breadcrumbs__icon pkt-link__icon",name:"chevron-thin-right"}),o("span",{className:"pkt-breadcrumbs__text",children:f.text})]}):m("a",{href:f.href,className:"pkt-link pkt-link--icon-right pkt-breadcrumbs__label pkt-breadcrumbs__link",...l,children:[o(N,{className:"pkt-icon pkt-breadcrumbs__icon pkt-link__icon",name:"chevron-thin-right"}),o("span",{className:"pkt-breadcrumbs__text",children:f.text})]})},`breadcrumb-${p}`))}),n==="router"?m(be,{to:s.href,className:"pkt-link pkt-link--icon-left pkt-breadcrumbs--mobile",...l,children:[o(N,{className:"pkt-back-link__icon pkt-icon pkt-link__icon",name:"chevron-thin-left"}),o("span",{className:"pkt-breadcrumbs__text",children:s.text})]}):m("a",{href:s.href,className:"pkt-link pkt-link--icon-left pkt-breadcrumbs--mobile",...l,children:[o(N,{className:"pkt-back-link__icon pkt-icon pkt-link__icon",name:"chevron-thin-left"}),o("span",{className:"pkt-breadcrumbs__text",children:s.text})]})]})}),se=E.forwardRef(({children:e,className:n,iconName:r="user",secondIconName:l="user",size:a="medium",skin:i="primary",type:s="button",variant:c="label-only",color:f,...p},h)=>{const v=[n,"pkt-btn",a&&`pkt-btn--${a}`,i&&`pkt-btn--${i}`,c&&`pkt-btn--${c}`,f&&`pkt-btn--${f}`].filter(Boolean).join(" ");return m("button",{...p,className:v,type:s,ref:h,children:[c!=="label-only"&&o(N,{className:"pkt-btn__icon",name:r}),o("span",{className:"pkt-btn__text",children:e}),c==="icons-right-and-left"&&o(N,{className:"pkt-btn__icon",name:l})]})});se.displayName="PktButton";const Rn=({columnOne:e,columnTwo:n,socialLinks:r,className:l})=>{var i,s;const a=[l,"pkt-footer"].filter(Boolean).join(" ");return o("footer",{className:a,"data-mode":"dark",children:m("div",{className:"pkt-footer__container",children:[m("div",{className:"pkt-grid pkt-grid--rowgap-size-32 pkt-grid--gap-size-16",children:[m("div",{className:"pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up",children:[o("h2",{className:"pkt-footer__title",children:e.title}),m("ul",{className:"pkt-footer__list",children:[e.text&&o("li",{className:"pkt-footer__text",children:e.text}),(i=e.links)==null?void 0:i.map((c,f)=>o("li",{className:"pkt-footer__list-item",children:m("a",{className:`pkt-footer__link ${c.external?"pkt-link--external":""}`,href:c.href,target:c.openInNewTab?"_blank":"_self",rel:c.openInNewTab?"noopener noreferrer":void 0,children:[o(N,{className:"pkt-footer__link-icon",name:"chevron-right"}),c.text]})},`links-${f}`))]})]}),m("div",{className:"pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up",children:[o("h2",{className:"pkt-footer__title",children:n.title}),m("ul",{className:"pkt-footer__list",children:[n.text&&o("li",{className:"pkt-footer__text",children:n.text}),(s=n.links)==null?void 0:s.map((c,f)=>o("li",{className:"pkt-footer__list-item",children:m("a",{className:`pkt-footer__link ${c.external?"pkt-link--external":""}`,href:c.href,target:c.openInNewTab?"_blank":"_self",rel:c.openInNewTab?"noopener noreferrer":void 0,children:[o(N,{className:"pkt-footer__link-icon",name:"chevron-right"}),c.text]})},`links-${f}`))]})]}),m("div",{className:"pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up",children:[o("h2",{className:"pkt-footer__title",children:"Om nettstedet"}),m("ul",{className:"pkt-footer__list",children:[o("li",{className:"pkt-footer__list-item",children:m("a",{className:"pkt-footer__link",href:"https://www.oslo.kommune.no/personvern-og-informasjonskapsler/",children:[o(N,{className:"pkt-footer__link-icon",name:"chevron-right"}),"Personvern og informasjonskapsler"]})}),o("li",{className:"pkt-footer__list-item",children:m("a",{className:"pkt-footer__link",href:"https://www.oslo.kommune.no/tilgjengelighet/",children:[o(N,{className:"pkt-footer__link-icon",name:"chevron-right"}),"Tilgjengelighet"]})})]})]})]}),r&&m("div",{className:"pkt-footer__social","aria-label":"standard lenker",children:[o("div",{className:"pkt-footer__social-languages",children:r.filter(c=>c.language).map((c,f)=>o("div",{className:"pkt-footer__social-language",children:o("a",{href:c.href,"aria-label":`til ${c.language} versjon av nettsiden`,target:c.openInNewTab?"_blank":"_self",rel:c.openInNewTab?"noopener noreferrer":void 0,children:c.language})},`sociallinks-language-${f}`))}),o("div",{className:"pkt-footer__social-icons",children:r.filter(c=>c.iconName).map((c,f)=>o(E.Fragment,{children:o("a",{href:c.href,"aria-label":`til ${c.iconName}`,className:"pkt-footer__social-icon-link",target:c.openInNewTab?"_blank":"_self",rel:c.openInNewTab?"noopener noreferrer":void 0,children:o(N,{className:"pkt-footer__social-icon",name:c.iconName})})},`sociallinks-${f}`))})]})]})})},Sn=({links:e=[],className:n})=>{const r=[n,"pkt-footer-simple"].filter(Boolean).join(" ");return o("footer",{className:r,"data-mode":"dark",children:o("div",{className:"pkt-footer-simple__container",children:m("ul",{className:"pkt-footer-simple__list",children:[e.map((l,a)=>o("li",{className:"pkt-footer-simple__list-item",children:m("a",{className:`pkt-footer-simple__link ${l.external?" pkt-link--external":""}`,href:l.href,target:l.openInNewTab?"_blank":"_self",rel:l.openInNewTab?"noopener noreferrer":void 0,children:[o(N,{className:"pkt-footer-simple__link-icon",name:"chevron-right"}),l.text]})},a)),o("li",{className:"pkt-footer-simple__list-item",children:m("a",{className:"pkt-footer-simple__link",href:"https://www.oslo.kommune.no/personvern-og-informasjonskapsler/",children:[o(N,{className:"pkt-footer-simple__link-icon",name:"chevron-right"}),"Personvern og informasjonskapsler"]})}),o("li",{className:"pkt-footer-simple__list-item",children:m("a",{className:"pkt-footer-simple__link",href:"https://www.oslo.kommune.no/tilgjengelighet/",children:[o(N,{className:"pkt-footer-simple__link-icon",name:"chevron-right"}),"Tilgjengelighet"]})})]})})})};var dt={exports:{}};/*!
55
55
  Copyright (c) 2018 Jed Watson.
56
56
  Licensed under the MIT License (MIT), see
57
57
  http://jedwatson.github.io/classnames
58
- */(function(e){(function(){var n={}.hasOwnProperty;function r(){for(var l=[],a=0;a<arguments.length;a++){var i=arguments[a];if(i){var s=typeof i;if(s==="string"||s==="number")l.push(i);else if(Array.isArray(i)){if(i.length){var c=r.apply(null,i);c&&l.push(c)}}else if(s==="object"){if(i.toString!==Object.prototype.toString&&!i.toString.toString().includes("[native code]")){l.push(i.toString());continue}for(var f in i)n.call(i,f)&&i[f]&&l.push(f)}}}return l.join(" ")}e.exports?(r.default=r,e.exports=r):window.classNames=r})()})(dt);var On=dt.exports;const pt=Ut(On),Tn=E.forwardRef(({logoLink:e="https://www.oslo.kommune.no/",serviceName:n,fixed:r=!0,scrollToHide:l=!0,user:a,userMenu:i,representing:s,userOptions:c,userMenuFooter:f,canChangeRepresentation:p=!0,showMenuButton:h=!1,showLogOutButton:v=!1,openMenu:x,logOut:P,changeRepresentation:j,...R},D)=>{const S=E.useMemo(()=>typeof(a==null?void 0:a.lastLoggedIn)=="string"?a.lastLoggedIn:a!=null&&a.lastLoggedIn?new Date(a.lastLoggedIn).toLocaleString("nb-NO",{year:"numeric",month:"long",day:"numeric"}):"",[a]),[g,A]=E.useState(!1),[U,W]=E.useState(0),[V,q]=E.useState(!1),Y=E.useRef(null);E.useEffect(()=>(document.addEventListener("mouseup",J),window.addEventListener("scroll",B),()=>{document.removeEventListener("mouseup",J),window.removeEventListener("scroll",B)}));const K=()=>{q(!V)},J=_=>{Y.current&&!Y.current.contains(_.target)&&q(!1)},B=()=>{if(l){const _=window.pageYOffset||document.documentElement.scrollTop;if(_<0||Math.abs(_-U)<60)return;A(_>U),W(_)}};return m("header",{...R,id:"pkt-header","data-testid":"pkt-header","aria-label":"Topp",className:pt("pkt-header",{"pkt-header--fixed":r,"pkt-header--scroll-to-hide":l,"pkt-header--hidden":g}),ref:D,children:[m("div",{className:"pkt-header__logo",children:[typeof e=="string"?o("a",{"aria-label":"Tilbake til forside",className:"pkt-header__logo-link",href:e,children:o(N,{name:"oslologo",className:"pkt-header__logo-svg","aria-hidden":"true",path:"https://punkt-cdn.oslo.kommune.no/8.0/logos/"})}):o("button",{"aria-label":"Tilbake til forside",className:"pkt-link-button pkt-link pkt-header__logo-link",onClick:e,children:o(N,{name:"oslologo",className:"pkt-header__logo-svg","aria-hidden":"true",path:"https://punkt-cdn.oslo.kommune.no/8.0/logos/"})}),o("span",{className:"pkt-header__logo-service",children:n})]}),o("nav",{className:"pkt-header__actions",children:m("ul",{className:"pkt-header__actions-row",children:[h&&o("li",{children:o(se,{className:"pkt-header__menu-btn",skin:"secondary",variant:"icon-right",iconName:"menu",onClick:x,children:"Meny"})}),(a||s)&&m("li",{"data-testid":"usermenu",className:`pkt-header--has-dropdown ${V&&!g?"pkt-header--open-dropdown":""}`,ref:Y,children:[m("button",{className:"pkt-header__user-btn pkt-btn pkt-btn--secondary pkt-btn--icons-right-and-left",type:"button",role:"button","aria-controls":"pktUserDropdown","aria-expanded":V,onClick:K,children:[o(N,{name:"user",className:"pkt-btn__icon"}),o("span",{className:"pkt-header__user-fullname",children:(s==null?void 0:s.name)||(a==null?void 0:a.name)}),o("span",{className:"pkt-header__user-shortname",children:(s==null?void 0:s.shortname)||(a==null?void 0:a.shortname)}),o(N,{name:"chevron-thin-down",className:"pkt-btn--closed"}),o(N,{name:"chevron-thin-up",className:"pkt-btn--open"})]}),m("ul",{id:"pktUserDropdown",className:"pkt-header__dropdown pkt-user-menu",children:[a&&m("li",{children:[o("div",{className:"pkt-user-menu__label",children:"Pålogget som"}),o("div",{className:"pkt-user-menu__name",children:a.name}),a.lastLoggedIn&&m("div",{className:"pkt-user-menu__last-logged-in",children:["Sist pålogget: ",o("time",{children:S})]})]}),i&&o("li",{children:o("ul",{className:"pkt-list",children:i.map((_,I)=>o("li",{children:typeof _.target=="string"?m("a",{href:_.target,className:"pkt-link",children:[_.iconName&&o(N,{name:_.iconName,className:"pkt-link__icon"}),_.title]}):m("button",{className:"pkt-link-button pkt-link",onClick:_.target,children:[_.iconName&&o(N,{name:_.iconName,className:"pkt-link__icon"}),_.title]})},`userMenu-${I}`))})}),(s||p)&&m("li",{children:[s&&m(X,{children:[o("div",{className:"pkt-user-menu__label",children:"Representerer"}),o("div",{className:"pkt-user-menu__name",children:s.name}),s.orgNumber&&m("div",{className:"pkt-user-menu__org-number",children:["Org.nr. ",s.orgNumber]})]}),o("ul",{className:"pkt-list mt-size-16",children:p&&o("li",{children:m("button",{className:"pkt-link-button pkt-link",onClick:j,children:[o(N,{name:"cogwheel",className:"pkt-link__icon"}),"Endre organisasjon"]})})})]}),o("li",{children:o("ul",{className:"pkt-list",children:(c||!v)&&m(X,{children:[c==null?void 0:c.map((_,I)=>o("li",{children:typeof _.target=="string"?m("a",{href:_.target,className:"pkt-link",children:[_.iconName&&o(N,{name:_.iconName,className:"pkt-link__icon"}),_.title]}):m("button",{className:"pkt-link-button pkt-link",onClick:_.target,children:[_.iconName&&o(N,{name:_.iconName,className:"pkt-link__icon"}),_.title]})},`userOptions-${I}`)),!v&&o("li",{children:m("button",{className:"pkt-link-button pkt-link",onClick:P,children:[o(N,{name:"exit",className:"pkt-link__icon"}),"Logg ut"]})})]})})}),f&&o("li",{className:"footer",children:o("ul",{className:"pkt-list-horizontal bordered",children:f.map((_,I)=>o("li",{children:typeof _.target=="string"?o("a",{href:_.target,className:"pkt-link",children:_.title}):o("button",{className:"pkt-link-button pkt-link",onClick:_.target,children:_.title})},`userMenuFooter-${I}`))})})]})]}),v&&o("li",{children:o(se,{className:"pkt-header__user-btn pkt-header__user-btn-logout",iconName:"exit",role:"button",onClick:P,skin:"secondary",variant:"icon-right",children:"Logg ut"})})]})})]})}),mt=E.forwardRef(({label:e,id:n,children:r,...l},a)=>m("div",{className:"pkt-form-group",children:[o("label",{htmlFor:n,className:"pkt-form-label",children:e}),o("input",{className:"pkt-form-input",id:n,...l,ref:a}),r]}));mt.displayName="PktInput";const ge=E.forwardRef(({forId:e,label:n,helptext:r,helptextDropdown:l,helptextDropdownButton:a,optional:i,optionalText:s="Valgfritt",required:c,requiredText:f="Må fylles ut",hasError:p,errorMessage:h,disabled:v,inline:x,ariaDescribedby:P,useWrapper:j=!0,children:R,className:D},S)=>{const[g,A]=E.useState(!1),U=()=>{A(!g)},W=()=>i?"pkt-tag pkt-tag--small pkt-tag--thin-text pkt-tag--blue-light":c?"pkt-tag pkt-tag--small pkt-tag--thin-text pkt-tag--beige":"",V=i?s:c?f:"",q=v?"pkt-inputwrapper--disabled":"",Y=x?"pkt-inputwrapper--inline":"",K=p?"pkt-inputwrapper--error":"",J=!!l&&l!=="",B=a||'Les mer <span class="pkt-sr-only">om inputfeltet</span>',_=J?"div":"label",I=J?"h2":"span",H=P||(r?`${e}-helptext`:void 0);return m("div",{className:["pkt-inputwrapper",D,q,Y,K].join(" "),ref:S,children:[j?m(X,{children:[o(_,{htmlFor:e,className:"pkt-inputwrapper__label","aria-describedby":J?"":P,children:m(I,{id:`${e}-label`,children:[n,V!==""&&o("span",{className:W(),children:V})]})}),r&&o("div",{className:"pkt-inputwrapper__helptext",id:`${e}-helptext`,children:r}),J&&l!==""&&m("div",{children:[o(se,{skin:"tertiary",size:"small",variant:"icon-right",iconName:g?"chevron-thin-up":"chevron-thin-down",className:"pkt-inputwrapper__helptext-expandable pkt-link pkt-link--icon-right",onClick:U,children:o("span",{dangerouslySetInnerHTML:{__html:B}})}),o("div",{className:`pkt-inputwrapper__helptext ${g?"pkt-inputwrapper__helptext-expandable-open":"pkt-inputwrapper__helptext-expandable-closed"}`,children:o("span",{dangerouslySetInnerHTML:{__html:l}})}),o("label",{htmlFor:e,className:"pkt-sr-only","aria-describedby":H,children:n})]}),o(X,{children:R})]}):m(X,{children:[o("label",{htmlFor:e,className:"pkt-sr-only","aria-describedby":H,id:`${e}-label`,children:n}),R]}),p&&o("div",{children:o(Xe,{skin:"error","aria-live":"assertive",children:h})})]})});ge.displayName="PktInputWrapper";const ht=E.forwardRef(({children:e,className:n,iconName:r="user",openInNewTab:l=!1,skin:a="normal",href:i="#",external:s=!1,title:c},f)=>{const p=[n,"pkt-linkcard",a&&`pkt-linkcard--${a}`].filter(Boolean).join(" ");return m("a",{href:i,className:`pkt-linkcard pkt-link ${p}`,target:l?"_blank":"_self",rel:l?"noopener noreferrer":void 0,ref:f,children:[o(N,{className:"pkt-link__icon",name:r}),m("div",{className:"pkt-linkcard__content",children:[o("div",{className:`pkt-linkcard__title ${s?"pkt-link pkt-link--external":""}`,children:c}),o("div",{className:"pkt-linkcard__text",children:e})]})]})});ht.displayName="PktLinkCard";const jn=({children:e,skin:n="beige",title:r,className:l,...a})=>{const i=["pkt-messagebox",n&&`pkt-messagebox--${n}`,l].filter(Boolean).join(" ");return m("div",{...a,className:i,children:[o("div",{className:"pkt-messagebox__title",children:r}),o("div",{className:"pkt-messagebox__text",children:e})]})},kt=E.forwardRef(({id:e,name:n,label:r,value:l,...a},i)=>m("div",{className:"pkt-form-group",children:[o("input",{type:"radio",className:"pkt-form-check-input",id:e,name:n,value:l,ref:i,...a}),o("label",{className:"pkt-form-label",htmlFor:e,children:r})]}));kt.displayName="PktRadio";const Dn=({label:e,children:n})=>m(X,{children:[o("p",{children:e}),o("div",{className:"pkt-form-group",children:n})]}),Ln=({isResponsive:e,children:n})=>e?o("div",{className:"pkt-table-container",children:n}):o(X,{children:n}),In=({isResponsive:e,modifiers:{info:n=!1,success:r=!1,strong:l=!1,shadow:a=!1}={},children:i})=>o(Ln,{isResponsive:e,children:o("table",{className:pt("pkt-table",{"pkt-table--info":n,"pkt-table--success":r,"pkt-table--strong":l,"pkt-table--shadow":a}),children:i})}),Fn=({children:e})=>o("td",{className:"pkt-table__th",children:e}),$n=({children:e})=>o("th",{className:"pkt-table__th",children:e}),vt=E.forwardRef(({children:e,className:n,skin:r="blue",textStyle:l="normal-text",size:a="medium",closeTag:i=!1,iconName:s="",type:c="button",ariaLabel:f="close",onClick:p=()=>{}},h)=>{const[v,x]=E.useState(!1),P=S=>{x(!0),p(S)},j=["pkt-tag",a&&`pkt-tag--${a}`,r&&`pkt-tag--${r}`,l&&`pkt-tag--${l}`,n].filter(Boolean).join(" "),R=["pkt-tag","pkt-btn","pkt-btn--tertiary",a&&`pkt-tag--${a}`,r&&`pkt-tag--${r}`,l&&`pkt-tag--${l}`,s&&i?"pkt-btn--icons-right-and-left":null,i&&!s?"pkt-btn--icon-right":null,n].filter(Boolean).join(" "),D=!v;return i&&s?o(X,{children:D&&m("button",{className:R,type:c,"aria-label":f,onClick:P,ref:h,children:[o(N,{className:"pkt-tag__icon",name:s}),e,o(N,{className:"pkt-tag__close-btn",name:"close"})]})}):i?o(X,{children:D&&m("button",{className:R,type:c,"aria-label":f,onClick:P,ref:h,children:[o(N,{className:"pkt-tag__close-btn",name:"close"}),e]})}):s?m("span",{className:j,children:[o(N,{className:"pkt-tag__icon",name:s}),e]}):o("span",{className:j,children:e})});vt.displayName="PktTag";const An=E.forwardRef(({id:e,ariaDescribedby:n,ariaLabelledby:r,counter:l,counterMaxLength:a,className:i,disabled:s,errorMessage:c,hasError:f,helptext:p,helptextDropdown:h,helptextDropdownButton:v,inline:x,label:P,name:j,optional:R=!1,optionalText:D,required:S=!1,requiredText:g,placeholder:A,rows:U,useWrapper:W,onChange:V,...q},Y)=>{const K=[i,"pkt-textinput","pkt-textarea"].join(" "),J=r||`${e}-label`,B=E.useRef(null),[_,I]=E.useState(0),H=G=>{var ee,ce;if(l&&I(((ce=(ee=G.currentTarget)==null?void 0:ee.value)==null?void 0:ce.length)||0),V)return V(G)};return E.useEffect(()=>{var G,ee;typeof Y=="function"&&Y(B.current),l&&I(((ee=(G=B==null?void 0:B.current)==null?void 0:G.value)==null?void 0:ee.length)||0)},[Y]),m(ge,{ariaDescribedby:n,className:K,disabled:s,errorMessage:c,forId:e,hasError:f,helptext:p,helptextDropdown:h,helptextDropdownButton:v,inline:x,label:P,optional:R,optionalText:D,required:S,requiredText:g,useWrapper:W,children:[o("textarea",{ref:B,className:`pkt-input ${a&&_>a?"pkt-input--counter-error":""}`,name:j||e,id:e,placeholder:A,disabled:s,rows:U,"aria-labelledby":J,"aria-invalid":f,"aria-required":S,...q,onChange:H}),l&&m("div",{className:"pkt-input__counter","aria-live":"polite","aria-atomic":!0,children:[_||0,a&&`/${a}`]})]})}),Un=E.forwardRef(({id:e,ariaDescribedby:n,ariaLabelledby:r,autocomplete:l="off",className:a,disabled:i=!1,errorMessage:s,hasError:c=!1,helptext:f,helptextDropdown:p,helptextDropdownButton:h,iconNameRight:v,inline:x=!1,label:P,name:j,optional:R=!1,optionalText:D,required:S=!1,requiredText:g,placeholder:A,prefix:U,suffix:W,type:V="text",useWrapper:q=!0,value:Y,...K},J)=>{const B=[a,"pkt-textinput"].join(" "),_=r||`${e}-label`;return o(ge,{ariaDescribedby:n,className:B,disabled:i,errorMessage:s,forId:e,hasError:c,helptext:f,helptextDropdown:p,helptextDropdownButton:h,inline:x,label:P,optional:R,optionalText:D,required:S,requiredText:g,useWrapper:q,children:m("div",{className:"pkt-input__container",children:[U&&o("div",{className:"pkt-input-prefix",children:U}),o("input",{ref:J,className:"pkt-input",type:V,name:j||e,id:e,placeholder:A,autoComplete:l,value:Y,disabled:i,"aria-required":S,"aria-invalid":c,"aria-labelledby":_,...K}),W&&m("p",{className:"pkt-input-suffix",children:[W,v&&o(N,{className:"pkt-input-suffix-icon",name:v})]}),!W&&v&&o(N,{className:"pkt-input-icon",name:v})]})})});T.PktAlert=Xe,T.PktBackLink=Yt,T.PktBreadcrumbs=Pn,T.PktButton=se,T.PktFooter=Rn,T.PktFooterSimple=Sn,T.PktHeader=Tn,T.PktIcon=N,T.PktInput=mt,T.PktInputWrapper=ge,T.PktLinkCard=ht,T.PktMessagebox=jn,T.PktRadio=kt,T.PktRadioGroup=Dn,T.PktTable=In,T.PktTableData=Fn,T.PktTableHeader=$n,T.PktTag=vt,T.PktTextarea=An,T.PktTextinput=Un,Object.defineProperty(T,Symbol.toStringTag,{value:"Module"})});
58
+ */(function(e){(function(){var n={}.hasOwnProperty;function r(){for(var l=[],a=0;a<arguments.length;a++){var i=arguments[a];if(i){var s=typeof i;if(s==="string"||s==="number")l.push(i);else if(Array.isArray(i)){if(i.length){var c=r.apply(null,i);c&&l.push(c)}}else if(s==="object"){if(i.toString!==Object.prototype.toString&&!i.toString.toString().includes("[native code]")){l.push(i.toString());continue}for(var f in i)n.call(i,f)&&i[f]&&l.push(f)}}}return l.join(" ")}e.exports?(r.default=r,e.exports=r):window.classNames=r})()})(dt);var On=dt.exports;const pt=Ut(On),Tn=E.forwardRef(({logoLink:e="https://www.oslo.kommune.no/",serviceName:n,fixed:r=!0,scrollToHide:l=!0,user:a,userMenu:i,representing:s,userOptions:c,userMenuFooter:f,canChangeRepresentation:p=!0,showMenuButton:h=!1,showLogOutButton:v=!1,openMenu:x,logOut:P,changeRepresentation:j,...R},D)=>{const S=E.useMemo(()=>typeof(a==null?void 0:a.lastLoggedIn)=="string"?a.lastLoggedIn:a!=null&&a.lastLoggedIn?new Date(a.lastLoggedIn).toLocaleString("nb-NO",{year:"numeric",month:"long",day:"numeric"}):"",[a]),[g,A]=E.useState(!1),[U,W]=E.useState(0),[V,q]=E.useState(!1),Y=E.useRef(null);E.useEffect(()=>(document.addEventListener("mouseup",J),window.addEventListener("scroll",B),()=>{document.removeEventListener("mouseup",J),window.removeEventListener("scroll",B)}));const K=()=>{q(!V)},J=_=>{Y.current&&!Y.current.contains(_.target)&&q(!1)},B=()=>{if(l){const _=window.pageYOffset||document.documentElement.scrollTop;if(_<0||Math.abs(_-U)<60)return;A(_>U),W(_)}};return m("header",{...R,id:"pkt-header","data-testid":"pkt-header","aria-label":"Topp",className:pt("pkt-header",{"pkt-header--fixed":r,"pkt-header--scroll-to-hide":l,"pkt-header--hidden":g}),ref:D,children:[m("div",{className:"pkt-header__logo",children:[typeof e=="string"?o("a",{"aria-label":"Tilbake til forside",className:"pkt-header__logo-link",href:e,children:o(N,{name:"oslologo",className:"pkt-header__logo-svg","aria-hidden":"true",path:"https://punkt-cdn.oslo.kommune.no/8.0/logos/"})}):o("button",{"aria-label":"Tilbake til forside",className:"pkt-link-button pkt-link pkt-header__logo-link",onClick:e,children:o(N,{name:"oslologo",className:"pkt-header__logo-svg","aria-hidden":"true",path:"https://punkt-cdn.oslo.kommune.no/8.0/logos/"})}),o("span",{className:"pkt-header__logo-service",children:n})]}),o("nav",{className:"pkt-header__actions",children:m("ul",{className:"pkt-header__actions-row",children:[h&&o("li",{children:o(se,{className:"pkt-header__menu-btn",skin:"secondary",variant:"icon-right",iconName:"menu",onClick:x,children:"Meny"})}),(a||s)&&m("li",{"data-testid":"usermenu",className:`pkt-header--has-dropdown ${V&&!g?"pkt-header--open-dropdown":""}`,ref:Y,children:[m("button",{className:"pkt-header__user-btn pkt-btn pkt-btn--secondary pkt-btn--icons-right-and-left",type:"button",role:"button","aria-controls":"pktUserDropdown","aria-expanded":V,onClick:K,children:[o(N,{name:"user",className:"pkt-btn__icon"}),o("span",{className:"pkt-header__user-fullname",children:(s==null?void 0:s.name)||(a==null?void 0:a.name)}),o("span",{className:"pkt-header__user-shortname",children:(s==null?void 0:s.shortname)||(a==null?void 0:a.shortname)}),o(N,{name:"chevron-thin-down",className:"pkt-btn--closed"}),o(N,{name:"chevron-thin-up",className:"pkt-btn--open"})]}),m("ul",{id:"pktUserDropdown",className:"pkt-header__dropdown pkt-user-menu",children:[a&&m("li",{children:[o("div",{className:"pkt-user-menu__label",children:"Pålogget som"}),o("div",{className:"pkt-user-menu__name",children:a.name}),a.lastLoggedIn&&m("div",{className:"pkt-user-menu__last-logged-in",children:["Sist pålogget: ",o("time",{children:S})]})]}),i&&o("li",{children:o("ul",{className:"pkt-list",children:i.map((_,$)=>o("li",{children:typeof _.target=="string"?m("a",{href:_.target,className:"pkt-link",children:[_.iconName&&o(N,{name:_.iconName,className:"pkt-link__icon"}),_.title]}):m("button",{className:"pkt-link-button pkt-link",onClick:_.target,children:[_.iconName&&o(N,{name:_.iconName,className:"pkt-link__icon"}),_.title]})},`userMenu-${$}`))})}),(s||p)&&m("li",{children:[s&&m(X,{children:[o("div",{className:"pkt-user-menu__label",children:"Representerer"}),o("div",{className:"pkt-user-menu__name",children:s.name}),s.orgNumber&&m("div",{className:"pkt-user-menu__org-number",children:["Org.nr. ",s.orgNumber]})]}),o("ul",{className:"pkt-list mt-size-16",children:p&&o("li",{children:m("button",{className:"pkt-link-button pkt-link",onClick:j,children:[o(N,{name:"cogwheel",className:"pkt-link__icon"}),"Endre organisasjon"]})})})]}),o("li",{children:o("ul",{className:"pkt-list",children:(c||!v)&&m(X,{children:[c==null?void 0:c.map((_,$)=>o("li",{children:typeof _.target=="string"?m("a",{href:_.target,className:"pkt-link",children:[_.iconName&&o(N,{name:_.iconName,className:"pkt-link__icon"}),_.title]}):m("button",{className:"pkt-link-button pkt-link",onClick:_.target,children:[_.iconName&&o(N,{name:_.iconName,className:"pkt-link__icon"}),_.title]})},`userOptions-${$}`)),!v&&o("li",{children:m("button",{className:"pkt-link-button pkt-link",onClick:P,children:[o(N,{name:"exit",className:"pkt-link__icon"}),"Logg ut"]})})]})})}),f&&o("li",{className:"footer",children:o("ul",{className:"pkt-list-horizontal bordered",children:f.map((_,$)=>o("li",{children:typeof _.target=="string"?o("a",{href:_.target,className:"pkt-link",children:_.title}):o("button",{className:"pkt-link-button pkt-link",onClick:_.target,children:_.title})},`userMenuFooter-${$}`))})})]})]}),v&&o("li",{children:o(se,{className:"pkt-header__user-btn pkt-header__user-btn-logout",iconName:"exit",role:"button",onClick:P,skin:"secondary",variant:"icon-right",children:"Logg ut"})})]})})]})}),mt=E.forwardRef(({label:e,id:n,children:r,...l},a)=>m("div",{className:"pkt-form-group",children:[o("label",{htmlFor:n,className:"pkt-form-label",children:e}),o("input",{className:"pkt-form-input",id:n,...l,ref:a}),r]}));mt.displayName="PktInput";const ge=E.forwardRef(({forId:e,label:n,helptext:r,helptextDropdown:l,helptextDropdownButton:a,optional:i,optionalText:s="Valgfritt",required:c,requiredText:f="Må fylles ut",hasError:p,errorMessage:h,disabled:v,inline:x,ariaDescribedby:P,useWrapper:j=!0,children:R,className:D},S)=>{const[g,A]=E.useState(!1),U=()=>{A(!g)},W=()=>i?"pkt-tag pkt-tag--small pkt-tag--thin-text pkt-tag--blue-light":c?"pkt-tag pkt-tag--small pkt-tag--thin-text pkt-tag--beige":"",V=i?s:c?f:"",q=v?"pkt-inputwrapper--disabled":"",Y=x?"pkt-inputwrapper--inline":"",K=p?"pkt-inputwrapper--error":"",J=!!l&&l!=="",B=a||'Les mer <span class="pkt-sr-only">om inputfeltet</span>',_=J?"div":"label",$=J?"h2":"span",H=P||(r?`${e}-helptext`:void 0);return m("div",{className:["pkt-inputwrapper",D,q,Y,K].join(" "),ref:S,children:[j?m(X,{children:[o(_,{htmlFor:e,className:"pkt-inputwrapper__label","aria-describedby":J?"":P,children:m($,{id:`${e}-label`,children:[n,V!==""&&o("span",{className:W(),children:V})]})}),r&&o("div",{className:"pkt-inputwrapper__helptext",id:`${e}-helptext`,children:r}),J&&l!==""&&m("div",{children:[o(se,{skin:"tertiary",size:"small",variant:"icon-right",iconName:g?"chevron-thin-up":"chevron-thin-down",className:"pkt-inputwrapper__helptext-expandable pkt-link pkt-link--icon-right",onClick:U,children:o("span",{dangerouslySetInnerHTML:{__html:B}})}),o("div",{className:`pkt-inputwrapper__helptext ${g?"pkt-inputwrapper__helptext-expandable-open":"pkt-inputwrapper__helptext-expandable-closed"}`,children:o("span",{dangerouslySetInnerHTML:{__html:l}})}),o("label",{htmlFor:e,className:"pkt-sr-only","aria-describedby":H,children:n})]}),o(X,{children:R})]}):m(X,{children:[o("label",{htmlFor:e,className:"pkt-sr-only","aria-describedby":H,id:`${e}-label`,children:n}),R]}),p&&o("div",{children:o(Xe,{skin:"error","aria-live":"assertive",id:`${e}-error`,children:h})})]})});ge.displayName="PktInputWrapper";const ht=E.forwardRef(({children:e,className:n,iconName:r="user",openInNewTab:l=!1,skin:a="normal",href:i="#",external:s=!1,title:c},f)=>{const p=[n,"pkt-linkcard",a&&`pkt-linkcard--${a}`].filter(Boolean).join(" ");return m("a",{href:i,className:`pkt-linkcard pkt-link ${p}`,target:l?"_blank":"_self",rel:l?"noopener noreferrer":void 0,ref:f,children:[o(N,{className:"pkt-link__icon",name:r}),m("div",{className:"pkt-linkcard__content",children:[o("div",{className:`pkt-linkcard__title ${s?"pkt-link pkt-link--external":""}`,children:c}),o("div",{className:"pkt-linkcard__text",children:e})]})]})});ht.displayName="PktLinkCard";const jn=({children:e,skin:n="beige",title:r,className:l,...a})=>{const i=["pkt-messagebox",n&&`pkt-messagebox--${n}`,l].filter(Boolean).join(" ");return m("div",{...a,className:i,children:[o("div",{className:"pkt-messagebox__title",children:r}),o("div",{className:"pkt-messagebox__text",children:e})]})},kt=E.forwardRef(({id:e,name:n,label:r,value:l,...a},i)=>m("div",{className:"pkt-form-group",children:[o("input",{type:"radio",className:"pkt-form-check-input",id:e,name:n,value:l,ref:i,...a}),o("label",{className:"pkt-form-label",htmlFor:e,children:r})]}));kt.displayName="PktRadio";const Dn=({label:e,children:n})=>m(X,{children:[o("p",{children:e}),o("div",{className:"pkt-form-group",children:n})]}),Ln=({isResponsive:e,children:n})=>e?o("div",{className:"pkt-table-container",children:n}):o(X,{children:n}),$n=({isResponsive:e,modifiers:{info:n=!1,success:r=!1,strong:l=!1,shadow:a=!1}={},children:i})=>o(Ln,{isResponsive:e,children:o("table",{className:pt("pkt-table",{"pkt-table--info":n,"pkt-table--success":r,"pkt-table--strong":l,"pkt-table--shadow":a}),children:i})}),Fn=({children:e})=>o("td",{className:"pkt-table__th",children:e}),In=({children:e})=>o("th",{className:"pkt-table__th",children:e}),vt=E.forwardRef(({children:e,className:n,skin:r="blue",textStyle:l="normal-text",size:a="medium",closeTag:i=!1,iconName:s="",type:c="button",ariaLabel:f="close",onClick:p=()=>{}},h)=>{const[v,x]=E.useState(!1),P=S=>{x(!0),p(S)},j=["pkt-tag",a&&`pkt-tag--${a}`,r&&`pkt-tag--${r}`,l&&`pkt-tag--${l}`,n].filter(Boolean).join(" "),R=["pkt-tag","pkt-btn","pkt-btn--tertiary",a&&`pkt-tag--${a}`,r&&`pkt-tag--${r}`,l&&`pkt-tag--${l}`,s&&i?"pkt-btn--icons-right-and-left":null,i&&!s?"pkt-btn--icon-right":null,n].filter(Boolean).join(" "),D=!v;return i&&s?o(X,{children:D&&m("button",{className:R,type:c,"aria-label":f,onClick:P,ref:h,children:[o(N,{className:"pkt-tag__icon",name:s}),e,o(N,{className:"pkt-tag__close-btn",name:"close"})]})}):i?o(X,{children:D&&m("button",{className:R,type:c,"aria-label":f,onClick:P,ref:h,children:[o(N,{className:"pkt-tag__close-btn",name:"close"}),e]})}):s?m("span",{className:j,children:[o(N,{className:"pkt-tag__icon",name:s}),e]}):o("span",{className:j,children:e})});vt.displayName="PktTag";const An=E.forwardRef(({id:e,ariaDescribedby:n,ariaLabelledby:r,counter:l,counterMaxLength:a,className:i,disabled:s,errorMessage:c,hasError:f,helptext:p,helptextDropdown:h,helptextDropdownButton:v,inline:x,label:P,name:j,optional:R=!1,optionalText:D,required:S=!1,requiredText:g,placeholder:A,rows:U,useWrapper:W,onChange:V,...q},Y)=>{const K=[i,"pkt-textinput","pkt-textarea"].join(" "),J=r||`${e}-label`,B=E.useRef(null),[_,$]=E.useState(0),H=G=>{var ee,ce;if(l&&$(((ce=(ee=G.currentTarget)==null?void 0:ee.value)==null?void 0:ce.length)||0),V)return V(G)};return E.useEffect(()=>{var G,ee;typeof Y=="function"&&Y(B.current),l&&$(((ee=(G=B==null?void 0:B.current)==null?void 0:G.value)==null?void 0:ee.length)||0)},[Y]),m(ge,{ariaDescribedby:n,className:K,disabled:s,errorMessage:c,forId:e,hasError:f,helptext:p,helptextDropdown:h,helptextDropdownButton:v,inline:x,label:P,optional:R,optionalText:D,required:S,requiredText:g,useWrapper:W,children:[o("textarea",{ref:B,className:`pkt-input ${a&&_>a?"pkt-input--counter-error":""}`,name:j||e,id:e,placeholder:A,disabled:s,rows:U,"aria-labelledby":J,"aria-invalid":f,"aria-errormessage":`${e}-error`,"aria-required":S,...q,onChange:H}),l&&m("div",{className:"pkt-input__counter","aria-live":"polite","aria-atomic":!0,children:[_||0,a&&`/${a}`]})]})}),Un=E.forwardRef(({id:e,ariaDescribedby:n,ariaLabelledby:r,autocomplete:l="off",className:a,disabled:i=!1,errorMessage:s,hasError:c=!1,helptext:f,helptextDropdown:p,helptextDropdownButton:h,iconNameRight:v,inline:x=!1,label:P,name:j,optional:R=!1,optionalText:D,required:S=!1,requiredText:g,placeholder:A,prefix:U,suffix:W,type:V="text",useWrapper:q=!0,value:Y,...K},J)=>{const B=[a,"pkt-textinput"].join(" "),_=r||`${e}-label`;return o(ge,{ariaDescribedby:n,className:B,disabled:i,errorMessage:s,forId:e,hasError:c,helptext:f,helptextDropdown:p,helptextDropdownButton:h,inline:x,label:P,optional:R,optionalText:D,required:S,requiredText:g,useWrapper:q,children:m("div",{className:"pkt-input__container",children:[U&&o("div",{className:"pkt-input-prefix",children:U}),o("input",{ref:J,className:"pkt-input",type:V,name:j||e,id:e,placeholder:A,autoComplete:l,value:Y,disabled:i,"aria-required":S,"aria-invalid":c,"aria-errormessage":`${e}-error`,"aria-labelledby":_,...K}),W&&m("p",{className:"pkt-input-suffix",children:[W,v&&o(N,{className:"pkt-input-suffix-icon",name:v})]}),!W&&v&&o(N,{className:"pkt-input-icon",name:v})]})})});T.PktAlert=Xe,T.PktBackLink=Yt,T.PktBreadcrumbs=Pn,T.PktButton=se,T.PktFooter=Rn,T.PktFooterSimple=Sn,T.PktHeader=Tn,T.PktIcon=N,T.PktInput=mt,T.PktInputWrapper=ge,T.PktLinkCard=ht,T.PktMessagebox=jn,T.PktRadio=kt,T.PktRadioGroup=Dn,T.PktTable=$n,T.PktTableData=Fn,T.PktTableHeader=In,T.PktTag=vt,T.PktTextarea=An,T.PktTextinput=Un,Object.defineProperty(T,Symbol.toStringTag,{value:"Module"})});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oslokommune/punkt-react",
3
- "version": "8.0.2",
3
+ "version": "8.0.3",
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",
@@ -91,5 +91,5 @@
91
91
  "url": "https://github.com/oslokommune/punkt/issues"
92
92
  },
93
93
  "license": "MIT",
94
- "gitHead": "c0579dfb9a77431626d07ef984cf1453e06ef215"
94
+ "gitHead": "551405eede805fd9a18830498465f72478bf68a6"
95
95
  }
@@ -149,7 +149,7 @@ export const PktInputWrapper = forwardRef(
149
149
  )}
150
150
  {hasError && (
151
151
  <div>
152
- <PktAlert skin="error" aria-live="assertive">
152
+ <PktAlert skin="error" aria-live="assertive" id={`${forId}-error`}>
153
153
  {errorMessage}
154
154
  </PktAlert>
155
155
  </div>
@@ -70,6 +70,7 @@ export const PktSelect = forwardRef(
70
70
  ref={ref}
71
71
  className="pkt-input"
72
72
  aria-invalid={hasError}
73
+ aria-errormessage={`${id}-error`}
73
74
  aria-labelledby={ariaLabelledby || `${id}-label`}
74
75
  aria-required={required}
75
76
  disabled={disabled}
@@ -114,6 +114,7 @@ export const PktTextarea = forwardRef(
114
114
  rows={rows}
115
115
  aria-labelledby={labelledBy}
116
116
  aria-invalid={hasError}
117
+ aria-errormessage={`${id}-error`}
117
118
  aria-required={required}
118
119
  {...props}
119
120
  onChange={handleChange}
@@ -97,6 +97,7 @@ export const PktTextinput = forwardRef(
97
97
  disabled={disabled}
98
98
  aria-required={required}
99
99
  aria-invalid={hasError}
100
+ aria-errormessage={`${id}-error`}
100
101
  aria-labelledby={labelledBy}
101
102
  {...props}
102
103
  />