@obosbbl/grunnmuren-react 1.12.0 → 1.12.2

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.
@@ -1,15 +1,48 @@
1
1
  'use client';
2
- import { jsx as a, jsxs as b, Fragment as T } from "react/jsx-runtime";
3
- import { useState as E, useCallback as R, useEffect as be, useId as D, createContext as w, useContext as x, forwardRef as h, Children as F, isValidElement as _, cloneElement as Z, useRef as k, useMemo as L } from "react";
4
- import { ChevronDown as $, Warning as ee, InfoCircle as re, LoadingSpinner as fe, MenuAlt as ge, Close as he, ChevronRight as pe, ChevronLeft as Ae } from "@obosbbl/grunnmuren-icons";
5
- import xe from "react-collapsed";
2
+ import { jsx as a, jsxs as g, Fragment as j } from "react/jsx-runtime";
3
+ import he, { useState as L, useCallback as q, useEffect as pe, useId as ee, createContext as I, useContext as A, forwardRef as b, Children as W, isValidElement as re, cloneElement as K, useRef as M, useMemo as k } from "react";
4
+ import { ChevronDown as te, Warning as ne, InfoCircle as ae, LoadingSpinner as Ae, MenuAlt as ve, Close as xe, ChevronRight as Ne, ChevronLeft as we } from "@obosbbl/grunnmuren-icons";
5
+ import ye from "react-collapsed";
6
6
  import l from "clsx";
7
- import W from "@seznam/compose-react-refs";
8
- import { useMedia as te } from "react-use";
9
- import { useMedia as Tr } from "react-use";
10
- const N = () => {
11
- }, ve = "(prefers-reduced-motion: reduce)", Ne = (e = !1) => te(ve, e);
12
- function ne(e) {
7
+ import Y from "@react-hook/merged-ref";
8
+ const y = () => {
9
+ };
10
+ var oe = {}, N = {};
11
+ Object.defineProperty(N, "__esModule", { value: !0 });
12
+ N.isNavigator = N.isBrowser = N.off = N.on = N.noop = void 0;
13
+ var Ie = function() {
14
+ };
15
+ N.noop = Ie;
16
+ function Ce(e) {
17
+ for (var t = [], r = 1; r < arguments.length; r++)
18
+ t[r - 1] = arguments[r];
19
+ e && e.addEventListener && e.addEventListener.apply(e, t);
20
+ }
21
+ N.on = Ce;
22
+ function Ee(e) {
23
+ for (var t = [], r = 1; r < arguments.length; r++)
24
+ t[r - 1] = arguments[r];
25
+ e && e.removeEventListener && e.removeEventListener.apply(e, t);
26
+ }
27
+ N.off = Ee;
28
+ N.isBrowser = typeof window < "u";
29
+ N.isNavigator = typeof navigator < "u";
30
+ Object.defineProperty(oe, "__esModule", { value: !0 });
31
+ var D = he, Re = N, qe = function(e, t) {
32
+ return t !== void 0 ? t : Re.isBrowser ? window.matchMedia(e).matches : (process.env.NODE_ENV !== "production" && console.warn("`useMedia` When server side rendering, defaultState should be defined to prevent a hydration mismatches."), !1);
33
+ }, Le = function(e, t) {
34
+ var r = D.useState(qe(e, t)), n = r[0], o = r[1];
35
+ return D.useEffect(function() {
36
+ var s = !0, i = window.matchMedia(e), c = function() {
37
+ s && o(!!i.matches);
38
+ };
39
+ return i.addListener(c), o(i.matches), function() {
40
+ s = !1, i.removeListener(c);
41
+ };
42
+ }, [e]), n;
43
+ }, se = oe.default = Le;
44
+ const Me = "(prefers-reduced-motion: reduce)", ke = (e = !1) => se(Me, e);
45
+ function ie(e) {
13
46
  switch (e) {
14
47
  case "gray":
15
48
  return "bg-gray-concrete";
@@ -21,53 +54,53 @@ function ne(e) {
21
54
  return "bg-blue-lightest";
22
55
  }
23
56
  }
24
- const we = (e) => te("(max-width: 767.9px)", e);
25
- function M(e, t = !0) {
26
- const [r, n] = E("indeterminate"), [o, s] = E(), d = R((i) => {
27
- i.target.checkValidity() && (n("valid"), s(void 0));
28
- }, []), c = R(
29
- (i) => {
30
- r !== "indeterminate" && i.target.checkValidity() && (n("valid"), s(void 0));
57
+ const ze = (e) => se("(max-width: 767.9px)", e);
58
+ function z(e, t = !0) {
59
+ const [r, n] = L("indeterminate"), [o, s] = L(), i = q((d) => {
60
+ d.target.checkValidity() && (n("valid"), s(void 0));
61
+ }, []), c = q(
62
+ (d) => {
63
+ r !== "indeterminate" && d.target.checkValidity() && (n("valid"), s(void 0));
31
64
  },
32
65
  [r]
33
- ), m = R((i) => {
34
- i.preventDefault();
35
- const u = i.target.validationMessage;
36
- s(u), n("invalid");
66
+ ), u = q((d) => {
67
+ d.preventDefault();
68
+ const m = d.target.validationMessage;
69
+ s(m), n("invalid");
37
70
  }, []);
38
- return be(() => {
39
- var u;
40
- const { current: i } = e;
71
+ return pe(() => {
72
+ var m;
73
+ const { current: d } = e;
41
74
  return t && // @ts-expect-error respect the <form noValidate> attribute if we are rendered inside a form
42
- ((u = i == null ? void 0 : i.form) == null ? void 0 : u.noValidate) !== !0 && (i == null || i.addEventListener("blur", d), i == null || i.addEventListener("input", c), i == null || i.addEventListener("invalid", m)), () => {
43
- i == null || i.removeEventListener("blur", d), i == null || i.removeEventListener("input", c), i == null || i.removeEventListener("invalid", m);
75
+ ((m = d == null ? void 0 : d.form) == null ? void 0 : m.noValidate) !== !0 && (d == null || d.addEventListener("blur", i), d == null || d.addEventListener("input", c), d == null || d.addEventListener("invalid", u)), () => {
76
+ d == null || d.removeEventListener("blur", i), d == null || d.removeEventListener("input", c), d == null || d.removeEventListener("invalid", u);
44
77
  };
45
78
  }, [t, c]), { validity: r, validationMessage: o };
46
79
  }
47
- function y(e) {
48
- const t = D();
80
+ function C(e) {
81
+ const t = ee();
49
82
  return e ?? t;
50
83
  }
51
- const Ie = 300, ye = "duration-300", K = (e) => {
84
+ const Pe = 300, Se = "duration-300", X = (e) => {
52
85
  const { className: t, ...r } = e;
53
86
  return /* @__PURE__ */ a("div", { className: l(t, "flex flex-col gap-2"), ...r });
54
- }, Y = w({
87
+ }, B = I({
55
88
  isExpanded: !1,
56
- setExpanded: N,
89
+ setExpanded: y,
57
90
  // @ts-expect-error noop
58
- getCollapseProps: N,
91
+ getCollapseProps: y,
59
92
  // @ts-expect-error noop
60
- getToggleProps: N,
61
- onChange: N
62
- }), Ce = (e) => {
63
- const t = Ne(), { className: r, defaultOpen: n, onChange: o = N, open: s, ...d } = e, c = xe({
93
+ getToggleProps: y,
94
+ onChange: y
95
+ }), Ve = (e) => {
96
+ const t = ke(), { className: r, defaultOpen: n, onChange: o = y, open: s, ...i } = e, c = ye({
64
97
  defaultExpanded: n,
65
98
  isExpanded: s,
66
- duration: Ie,
99
+ duration: Pe,
67
100
  hasDisabledAnimation: t,
68
101
  easing: "cubic-bezier(0.25, 0.1, 0.25, 1)"
69
102
  });
70
- return /* @__PURE__ */ a(Y.Provider, { value: { onChange: o, ...c }, children: /* @__PURE__ */ a(
103
+ return /* @__PURE__ */ a(B.Provider, { value: { onChange: o, ...c }, children: /* @__PURE__ */ a(
71
104
  "div",
72
105
  {
73
106
  className: l(
@@ -75,12 +108,12 @@ const Ie = 300, ye = "duration-300", K = (e) => {
75
108
  "rounded-sm border-b-2 border-l-4 border-solid",
76
109
  c.isExpanded ? "border-l-green-dark" : "border-l-green"
77
110
  ),
78
- ...d
111
+ ...i
79
112
  }
80
113
  ) });
81
- }, qe = (e) => {
82
- const { children: t, className: r, as: n = "h3", ...o } = e, { getToggleProps: s, onChange: d, isExpanded: c } = x(Y), m = s({ onClick: () => d(!c) });
83
- return /* @__PURE__ */ a(n, { children: /* @__PURE__ */ b(
114
+ }, Je = (e) => {
115
+ const { children: t, className: r, as: n = "h3", ...o } = e, { getToggleProps: s, onChange: i, isExpanded: c } = A(B), u = s({ onClick: () => i(!c) });
116
+ return /* @__PURE__ */ a(n, { children: /* @__PURE__ */ g(
84
117
  "button",
85
118
  {
86
119
  className: l(
@@ -88,35 +121,35 @@ const Ie = 300, ye = "duration-300", K = (e) => {
88
121
  "focus-visible:outline-blue-dark aria-expanded:bg-green-dark group flex min-h-[4rem] w-full items-center justify-between px-5 py-4 text-left text-lg font-semibold focus:outline-none focus-visible:outline-4 focus-visible:outline-offset-0 aria-expanded:text-white"
89
122
  ),
90
123
  ...o,
91
- ...m,
92
- id: ae(m["aria-controls"]),
124
+ ...u,
125
+ id: le(u["aria-controls"]),
93
126
  children: [
94
127
  t,
95
128
  /* @__PURE__ */ a(
96
- $,
129
+ te,
97
130
  {
98
- className: `shrink-0 text-sm ${ye} group-aria-expanded:rotate-180`
131
+ className: `shrink-0 text-sm ${Se} group-aria-expanded:rotate-180`
99
132
  }
100
133
  )
101
134
  ]
102
135
  }
103
136
  ) });
104
- }, Re = (e) => {
105
- const { getCollapseProps: t } = x(Y), { className: r, ...n } = e, o = t();
137
+ }, Oe = (e) => {
138
+ const { getCollapseProps: t } = A(B), { className: r, ...n } = e, o = t();
106
139
  return /* @__PURE__ */ a(
107
140
  "div",
108
141
  {
109
142
  ...o,
110
143
  role: "region",
111
- "aria-labelledby": ae(o.id),
144
+ "aria-labelledby": le(o.id),
112
145
  children: /* @__PURE__ */ a("div", { className: l(r, "p-5 pb-10"), ...n })
113
146
  }
114
147
  );
115
- }, ae = (e) => e + "toggle";
116
- K.Item = Ce;
117
- K.Header = qe;
118
- K.Content = Re;
119
- const tr = (e) => {
148
+ }, le = (e) => e + "toggle";
149
+ X.Item = Ve;
150
+ X.Header = Je;
151
+ X.Content = Oe;
152
+ const mr = (e) => {
120
153
  const { className: t, children: r, heading: n, severity: o = "alert", ...s } = e;
121
154
  return /* @__PURE__ */ a(
122
155
  "section",
@@ -127,38 +160,38 @@ const tr = (e) => {
127
160
  }),
128
161
  role: "alert",
129
162
  ...s,
130
- children: /* @__PURE__ */ b("div", { className: "flex justify-center", children: [
163
+ children: /* @__PURE__ */ g("div", { className: "flex justify-center", children: [
131
164
  /* @__PURE__ */ a(
132
- Ee,
165
+ Te,
133
166
  {
134
167
  className: "mr-4 flex-none md:mr-8 md:text-2xl",
135
168
  severity: o
136
169
  }
137
170
  ),
138
- /* @__PURE__ */ b("div", { className: "w-prose flex-initial", children: [
171
+ /* @__PURE__ */ g("div", { className: "w-prose flex-initial", children: [
139
172
  /* @__PURE__ */ a("h2", { className: "h4 mb-2", children: n }),
140
173
  r
141
174
  ] })
142
175
  ] })
143
176
  }
144
177
  );
145
- }, Ee = ({ severity: e, className: t }) => e === "alert" ? /* @__PURE__ */ a(ee, { className: l(t, "text-red") }) : /* @__PURE__ */ a(re, { className: l(t, "text-orange") }), nr = (e) => {
178
+ }, Te = ({ severity: e, className: t }) => e === "alert" ? /* @__PURE__ */ a(ne, { className: l(t, "text-red") }) : /* @__PURE__ */ a(ae, { className: l(t, "text-orange") }), ur = (e) => {
146
179
  const {
147
180
  bgColor: t,
148
181
  className: r,
149
182
  children: n,
150
183
  heading: o,
151
184
  image: s,
152
- ...d
153
- } = e, c = ne(t);
154
- return /* @__PURE__ */ a("article", { className: l(r, c, "py-8 px-4 md:py-14"), ...d, children: /* @__PURE__ */ b("div", { className: "container flex gap-4 max-md:flex-wrap md:gap-12", children: [
185
+ ...i
186
+ } = e, c = ie(t);
187
+ return /* @__PURE__ */ a("article", { className: l(r, c, "py-8 px-4 md:py-14"), ...i, children: /* @__PURE__ */ g("div", { className: "container flex gap-4 max-md:flex-wrap md:gap-12", children: [
155
188
  s,
156
- /* @__PURE__ */ b("div", { className: "w-prose", children: [
189
+ /* @__PURE__ */ g("div", { className: "w-prose", children: [
157
190
  o && /* @__PURE__ */ a("h2", { className: "mb-4", children: o }),
158
191
  n
159
192
  ] })
160
193
  ] }) });
161
- }, ar = (e) => /* @__PURE__ */ a(
194
+ }, fr = (e) => /* @__PURE__ */ a(
162
195
  "img",
163
196
  {
164
197
  loading: "lazy",
@@ -166,79 +199,79 @@ const tr = (e) => {
166
199
  className: "w-24 flex-none self-center md:w-40 md:self-start",
167
200
  ...e
168
201
  }
169
- ), ke = {
202
+ ), Fe = {
170
203
  "standard-primary": "bg-green border-green text-white",
171
204
  "standard-secondary": "bg-white border-green text-black",
172
205
  "light-green-primary": "bg-green-light border-green-light text-black",
173
206
  "light-green-secondary": "bg-transparent border-green-light text-green-light",
174
207
  "white-primary": "bg-white border-white text-black",
175
208
  "white-secondary": "bg-transparent border-white text-white"
176
- }, or = h((e, t) => {
209
+ }, gr = b((e, t) => {
177
210
  const {
178
211
  children: r,
179
212
  className: n,
180
213
  color: o,
181
214
  href: s,
182
- loading: d,
215
+ loading: i,
183
216
  type: c = "button",
184
- variant: m = "primary",
185
- ...i
186
- } = e, u = x(z), g = ke[`${o ?? u}-${m}`], p = l(n, g, "button"), A = d ? /* @__PURE__ */ a(Le, { children: r }) : r;
187
- return /* @__PURE__ */ a(T, { children: s ? /* @__PURE__ */ a(
217
+ variant: u = "primary",
218
+ ...d
219
+ } = e, m = A(P), f = Fe[`${o ?? m}-${u}`], p = l(n, f, "button"), x = i ? /* @__PURE__ */ a(Ze, { children: r }) : r;
220
+ return /* @__PURE__ */ a(j, { children: s ? /* @__PURE__ */ a(
188
221
  "a",
189
222
  {
190
- "aria-busy": d ? !0 : void 0,
191
- ...i,
223
+ "aria-busy": i ? !0 : void 0,
224
+ ...d,
192
225
  href: s,
193
226
  ref: t,
194
227
  className: p,
195
- children: A
228
+ children: x
196
229
  }
197
230
  ) : /* @__PURE__ */ a(
198
231
  "button",
199
232
  {
200
- "aria-busy": d ? !0 : void 0,
201
- ...i,
233
+ "aria-busy": i ? !0 : void 0,
234
+ ...d,
202
235
  type: c,
203
236
  ref: t,
204
237
  className: p,
205
- children: A
238
+ children: x
206
239
  }
207
240
  ) });
208
- }), Le = (e) => /* @__PURE__ */ b(T, { children: [
209
- oe(e.children),
241
+ }), Ze = (e) => /* @__PURE__ */ g(j, { children: [
242
+ de(e.children),
210
243
  /* @__PURE__ */ a(
211
244
  "span",
212
245
  {
213
246
  className: "!visible absolute top-1 bottom-1 left-1 right-1 grid place-items-center overflow-hidden bg-inherit",
214
247
  "aria-hidden": !0,
215
- children: /* @__PURE__ */ a(fe, { className: "animate-spin" })
248
+ children: /* @__PURE__ */ a(Ae, { className: "animate-spin" })
216
249
  }
217
250
  )
218
251
  ] });
219
- function oe(e) {
220
- return F.map(e, (t) => {
221
- if (!_(t))
252
+ function de(e) {
253
+ return W.map(e, (t) => {
254
+ if (!re(t))
222
255
  return typeof t == "string" ? /* @__PURE__ */ a("span", { children: t }) : t;
223
256
  if (t.props.children) {
224
257
  const r = {
225
- children: oe(t.props.children)
258
+ children: de(t.props.children)
226
259
  };
227
- t = Z(t, r);
260
+ t = K(t, r);
228
261
  }
229
262
  return t;
230
263
  });
231
264
  }
232
- const z = w("standard"), se = w(!0), Me = (e, t) => {
265
+ const P = I("standard"), ce = I(!0), je = (e, t) => {
233
266
  const {
234
267
  as: r = "div",
235
268
  body: n,
236
269
  className: o,
237
270
  image: s,
238
- rightAlignBody: d = !0,
271
+ rightAlignBody: i = !0,
239
272
  ...c
240
273
  } = e;
241
- return /* @__PURE__ */ b(
274
+ return /* @__PURE__ */ g(
242
275
  r,
243
276
  {
244
277
  className: l(
@@ -248,12 +281,12 @@ const z = w("standard"), se = w(!0), Me = (e, t) => {
248
281
  ...c,
249
282
  ref: t,
250
283
  children: [
251
- /* @__PURE__ */ a(se.Provider, { value: d, children: s }),
284
+ /* @__PURE__ */ a(ce.Provider, { value: i, children: s }),
252
285
  n
253
286
  ]
254
287
  }
255
288
  );
256
- }, ze = h(Me), Pe = h(
289
+ }, We = b(je), Ke = b(
257
290
  (e, t) => {
258
291
  const { className: r, ...n } = e;
259
292
  return /* @__PURE__ */ a(
@@ -265,28 +298,28 @@ const z = w("standard"), se = w(!0), Me = (e, t) => {
265
298
  }
266
299
  );
267
300
  }
268
- ), Ve = h(
301
+ ), Ye = b(
269
302
  (e, t) => {
270
- const { className: r, children: n, ...o } = e, s = x(se), d = l(
303
+ const { className: r, children: n, ...o } = e, s = A(ce), i = l(
271
304
  r,
272
305
  "max-md:rounded-b-3xl w-full",
273
306
  s ? "md:rounded-r-3xl" : "md:rounded-l-3xl md:order-1"
274
307
  );
275
- if (_(n)) {
276
- const c = F.only(n);
277
- return Z(c, {
308
+ if (re(n)) {
309
+ const c = W.only(n);
310
+ return K(c, {
278
311
  // @ts-expect-error assume className prop is allowed
279
- className: d,
312
+ className: i,
280
313
  ref: t,
281
314
  ...o
282
315
  });
283
316
  }
284
- return /* @__PURE__ */ a("img", { className: d, ref: t, ...o });
317
+ return /* @__PURE__ */ a("img", { className: i, ref: t, ...o });
285
318
  }
286
- ), sr = Object.assign({}, ze, {
287
- Body: Pe,
288
- Image: Ve
289
- }), Se = (e, t) => {
319
+ ), br = Object.assign({}, We, {
320
+ Body: Ke,
321
+ Image: Ye
322
+ }), Xe = (e, t) => {
290
323
  const {
291
324
  as: r = "div",
292
325
  className: n,
@@ -304,7 +337,7 @@ const z = w("standard"), se = w(!0), Me = (e, t) => {
304
337
  ref: t
305
338
  }
306
339
  );
307
- }, ir = h(Se), lr = h(
340
+ }, hr = b(Xe), pr = b(
308
341
  (e, t) => {
309
342
  const { className: r, ...n } = e;
310
343
  return /* @__PURE__ */ a(
@@ -317,9 +350,9 @@ const z = w("standard"), se = w(!0), Me = (e, t) => {
317
350
  }
318
351
  );
319
352
  }
320
- ), dr = h(
353
+ ), Ar = b(
321
354
  (e, t) => {
322
- const { bgColor: r, className: n, ...o } = e, s = ne(r);
355
+ const { bgColor: r, className: n, ...o } = e, s = ie(r);
323
356
  return /* @__PURE__ */ a("div", { className: l(s, n), children: /* @__PURE__ */ a(
324
357
  "div",
325
358
  {
@@ -329,12 +362,12 @@ const z = w("standard"), se = w(!0), Me = (e, t) => {
329
362
  }
330
363
  ) });
331
364
  }
332
- ), cr = h(
365
+ ), vr = b(
333
366
  (e, t) => {
334
367
  const { className: r, ...n } = e;
335
368
  return /* @__PURE__ */ a("div", { className: l(r, "p-8 md:px-10"), ...n, ref: t });
336
369
  }
337
- ), mr = h((e, t) => {
370
+ ), xr = b((e, t) => {
338
371
  const { className: r, ...n } = e;
339
372
  return /* @__PURE__ */ a(
340
373
  "a",
@@ -347,25 +380,25 @@ const z = w("standard"), se = w(!0), Me = (e, t) => {
347
380
  ...n
348
381
  }
349
382
  );
350
- }), ur = h(
383
+ }), Nr = b(
351
384
  (e, t) => {
352
385
  const {
353
386
  children: r,
354
387
  className: n,
355
388
  error: o,
356
389
  id: s,
357
- disableValidation: d = !1,
390
+ disableValidation: i = !1,
358
391
  ...c
359
- } = e, m = k(null), { validity: i, validationMessage: u } = M(
360
- m,
361
- !d
362
- ), f = y(s), g = f + "err", p = o || u;
363
- return /* @__PURE__ */ b("div", { className: "grid gap-2", children: [
364
- /* @__PURE__ */ b("label", { className: l(n, "flex cursor-pointer gap-2.5"), children: [
392
+ } = e, u = M(null), { validity: d, validationMessage: m } = z(
393
+ u,
394
+ !i
395
+ ), h = C(s), f = h + "err", p = o || m;
396
+ return /* @__PURE__ */ g("div", { className: "grid gap-2", children: [
397
+ /* @__PURE__ */ g("label", { className: l(n, "flex cursor-pointer gap-2.5"), children: [
365
398
  /* @__PURE__ */ a(
366
399
  "input",
367
400
  {
368
- id: f,
401
+ id: h,
369
402
  className: l(
370
403
  "checkbox checked:bg-green checked:border-green grid h-[1.25em] w-[1.25em] flex-none translate-y-[0.1em] cursor-pointer appearance-none place-content-center rounded border-2 border-solid bg-white text-white focus:outline-none focus:ring-2",
371
404
  {
@@ -376,33 +409,33 @@ const z = w("standard"), se = w(!0), Me = (e, t) => {
376
409
  ref: t,
377
410
  type: "checkbox",
378
411
  ...c,
379
- "aria-describedby": p ? g : void 0,
380
- "aria-invalid": !!o || i === "invalid"
412
+ "aria-describedby": p ? f : void 0,
413
+ "aria-invalid": !!o || d === "invalid"
381
414
  }
382
415
  ),
383
416
  r
384
417
  ] }),
385
- p && /* @__PURE__ */ a(C, { id: g, children: p })
418
+ p && /* @__PURE__ */ a(E, { id: f, children: p })
386
419
  ] });
387
420
  }
388
- ), Je = {
421
+ ), Be = {
389
422
  "blue-light": "bg-blue-light border-blue-light",
390
423
  "red-light": "bg-red-light border-red-light",
391
424
  "green-light": "bg-green-light border-green-light",
392
425
  "orange-light": "bg-orange-light border-orange-light"
393
- }, je = {
426
+ }, Qe = {
394
427
  "blue-light": "text-blue-dark",
395
428
  "red-light": "text-red",
396
429
  "green-light": "text-green",
397
430
  "orange-light": "text-black"
398
- }, br = (e) => {
399
- const { className: t, color: r, icon: n, children: o, variant: s = "filled" } = e, d = r && Je[r], c = r && je[r];
400
- return /* @__PURE__ */ b(
431
+ }, wr = (e) => {
432
+ const { className: t, color: r, icon: n, children: o, variant: s = "filled" } = e, i = r && Be[r], c = r && Qe[r];
433
+ return /* @__PURE__ */ g(
401
434
  "div",
402
435
  {
403
436
  className: l(
404
437
  "inline-flex items-center gap-0.5 overflow-hidden rounded-lg border-2 text-sm font-semibold",
405
- d,
438
+ i,
406
439
  t
407
440
  ),
408
441
  children: [
@@ -419,9 +452,9 @@ const z = w("standard"), se = w(!0), Me = (e, t) => {
419
452
  ]
420
453
  }
421
454
  );
422
- }, fr = (e) => {
455
+ }, yr = (e) => {
423
456
  const { className: t, children: r, ...n } = e;
424
- return /* @__PURE__ */ a(z.Provider, { value: "white", children: /* @__PURE__ */ a(
457
+ return /* @__PURE__ */ a(P.Provider, { value: "white", children: /* @__PURE__ */ a(
425
458
  "footer",
426
459
  {
427
460
  className: l(
@@ -433,9 +466,9 @@ const z = w("standard"), se = w(!0), Me = (e, t) => {
433
466
  children: /* @__PURE__ */ a("div", { className: "container", children: r })
434
467
  }
435
468
  ) });
436
- }, gr = (e) => {
469
+ }, Ir = (e) => {
437
470
  const { heading: t, children: r, className: n, ...o } = e;
438
- return /* @__PURE__ */ b(
471
+ return /* @__PURE__ */ g(
439
472
  "form",
440
473
  {
441
474
  className: l(
@@ -444,12 +477,12 @@ const z = w("standard"), se = w(!0), Me = (e, t) => {
444
477
  ),
445
478
  ...o,
446
479
  children: [
447
- t && /* @__PURE__ */ a(Oe, { children: t }),
480
+ t && /* @__PURE__ */ a(Ue, { children: t }),
448
481
  /* @__PURE__ */ a("div", { className: "p-6 md:p-10", children: r })
449
482
  ]
450
483
  }
451
484
  );
452
- }, Oe = (e) => {
485
+ }, Ue = (e) => {
453
486
  const { className: t, ...r } = e;
454
487
  return /* @__PURE__ */ a(
455
488
  "h2",
@@ -461,7 +494,7 @@ const z = w("standard"), se = w(!0), Me = (e, t) => {
461
494
  ...r
462
495
  }
463
496
  );
464
- }, hr = (e) => {
497
+ }, Cr = (e) => {
465
498
  const { className: t, ...r } = e;
466
499
  return /* @__PURE__ */ a(
467
500
  "div",
@@ -475,9 +508,9 @@ const z = w("standard"), se = w(!0), Me = (e, t) => {
475
508
  children: "Beklager! Noe gikk dessverre galt under innesendingen av skjemaet. Prøv gjerne igjen om en stund."
476
509
  }
477
510
  );
478
- }, C = (e) => {
511
+ }, E = (e) => {
479
512
  const { children: t, className: r, ...n } = e;
480
- return /* @__PURE__ */ b(
513
+ return /* @__PURE__ */ g(
481
514
  "div",
482
515
  {
483
516
  className: l(
@@ -487,17 +520,17 @@ const z = w("standard"), se = w(!0), Me = (e, t) => {
487
520
  "aria-live": "polite",
488
521
  ...n,
489
522
  children: [
490
- /* @__PURE__ */ a(ee, { className: "text-red flex-shrink-0" }),
523
+ /* @__PURE__ */ a(ne, { className: "text-red flex-shrink-0" }),
491
524
  t
492
525
  ]
493
526
  }
494
527
  );
495
- }, P = (e) => {
528
+ }, S = (e) => {
496
529
  const { className: t, children: r, ...n } = e;
497
530
  return /* @__PURE__ */ a("div", { className: l(t, "text-gray-dark text-sm"), ...n, children: r });
498
531
  }, V = (e) => {
499
532
  const { className: t, children: r, isRequired: n, isInvalid: o, ...s } = e;
500
- return /* @__PURE__ */ b(
533
+ return /* @__PURE__ */ g(
501
534
  "label",
502
535
  {
503
536
  className: l(t, "block cursor-pointer font-semibold"),
@@ -518,9 +551,9 @@ const z = w("standard"), se = w(!0), Me = (e, t) => {
518
551
  ]
519
552
  }
520
553
  );
521
- }, pr = (e) => {
554
+ }, Er = (e) => {
522
555
  const { className: t, heading: r, text: n, ...o } = e;
523
- return /* @__PURE__ */ b(
556
+ return /* @__PURE__ */ g(
524
557
  "div",
525
558
  {
526
559
  className: l(
@@ -545,30 +578,30 @@ const z = w("standard"), se = w(!0), Me = (e, t) => {
545
578
  }
546
579
  );
547
580
  };
548
- function ie(e) {
581
+ function me(e) {
549
582
  return e !== "vertical-split" && e !== "below-center" && e !== "below-left";
550
583
  }
551
- const S = w({ bgColor: "white", contentPosition: "below-center", hasImage: !1 }), Ar = h((e, t) => {
584
+ const J = I({ bgColor: "white", contentPosition: "below-center", hasImage: !1 }), Rr = b((e, t) => {
552
585
  const {
553
586
  bgColor: r = "white",
554
587
  children: n,
555
588
  className: o,
556
589
  contentPosition: s = "below-center",
557
- image: d,
590
+ image: i,
558
591
  ...c
559
- } = e, m = d != null, i = m ? s : "below-center", u = L(
592
+ } = e, u = i != null, d = u ? s : "below-center", m = k(
560
593
  () => ({
561
594
  bgColor: r,
562
- contentPosition: i,
563
- hasImage: m
595
+ contentPosition: d,
596
+ hasImage: u
564
597
  }),
565
- [r, i, m]
598
+ [r, d, u]
566
599
  );
567
600
  return /* @__PURE__ */ a(
568
- z.Provider,
601
+ P.Provider,
569
602
  {
570
603
  value: r === "white" ? "standard" : "light-green",
571
- children: /* @__PURE__ */ a(S.Provider, { value: u, children: /* @__PURE__ */ b(
604
+ children: /* @__PURE__ */ a(J.Provider, { value: m, children: /* @__PURE__ */ g(
572
605
  "div",
573
606
  {
574
607
  className: l(
@@ -576,24 +609,24 @@ const S = w({ bgColor: "white", contentPosition: "below-center", hasImage: !1 })
576
609
  // disable padding on small screens so the hero image is flush with the screen edges
577
610
  "container max-md:px-0 md:grid",
578
611
  {
579
- "md:grid-cols-[50%,50%]": i === "vertical-split"
612
+ "md:grid-cols-[50%,50%]": d === "vertical-split"
580
613
  }
581
614
  ),
582
- style: ie(i) ? { gridTemplateAreas: '"hero"' } : void 0,
615
+ style: me(d) ? { gridTemplateAreas: '"hero"' } : void 0,
583
616
  ...c,
584
617
  ref: t,
585
618
  children: [
586
- d,
619
+ i,
587
620
  n
588
621
  ]
589
622
  }
590
623
  ) })
591
624
  }
592
625
  );
593
- }), xr = h(
626
+ }), qr = b(
594
627
  (e, t) => {
595
- const { contentPosition: r } = x(S);
596
- return /* @__PURE__ */ b(
628
+ const { contentPosition: r } = A(J);
629
+ return /* @__PURE__ */ g(
597
630
  "picture",
598
631
  {
599
632
  className: l(e.className, "aspect-w-6 aspect-h-7 block", {
@@ -618,14 +651,14 @@ const S = w({ bgColor: "white", contentPosition: "below-center", hasImage: !1 })
618
651
  }
619
652
  );
620
653
  }
621
- ), vr = h(
654
+ ), Lr = b(
622
655
  (e, t) => {
623
- const { bgColor: r, contentPosition: n, hasImage: o } = x(S), { children: s, className: d, heading: c, description: m, ...i } = e, u = ie(n);
624
- return /* @__PURE__ */ b(
656
+ const { bgColor: r, contentPosition: n, hasImage: o } = A(J), { children: s, className: i, heading: c, description: u, ...d } = e, m = me(n);
657
+ return /* @__PURE__ */ g(
625
658
  "div",
626
659
  {
627
660
  className: l(
628
- d,
661
+ i,
629
662
  "relative grid grid-flow-row grid-cols-[minmax(auto,_37rem)] content-center gap-6 rounded-3xl py-10 px-6 text-center max-md:mx-4 md:p-12",
630
663
  {
631
664
  // On mobile we use negative margin on the content to pull the content up into the image
@@ -643,7 +676,7 @@ const S = w({ bgColor: "white", contentPosition: "below-center", hasImage: !1 })
643
676
  // Below left style
644
677
  "md:ml-[8%] md:-mt-32 md:max-w-[58%] md:text-left": n === "below-left",
645
678
  // styles for when the contain is fully contained within the image
646
- "md:my-9 md:mx-32 md:w-2/5": u,
679
+ "md:my-9 md:mx-32 md:w-2/5": m,
647
680
  "self-end justify-self-start": n === "bottom-left",
648
681
  "self-start justify-self-start": n === "top-left",
649
682
  "self-start justify-self-end": n === "top-right",
@@ -651,20 +684,20 @@ const S = w({ bgColor: "white", contentPosition: "below-center", hasImage: !1 })
651
684
  "self-center justify-self-center": n === "center"
652
685
  }
653
686
  ),
654
- ...i,
655
- style: u ? { gridArea: "hero" } : void 0,
687
+ ...d,
688
+ style: m ? { gridArea: "hero" } : void 0,
656
689
  ref: t,
657
690
  children: [
658
691
  /* @__PURE__ */ a("h1", { children: c }),
659
- m && /* @__PURE__ */ a("p", { className: "text-lg font-semibold md:text-xl", children: m }),
692
+ u && /* @__PURE__ */ a("p", { className: "text-lg font-semibold md:text-xl", children: u }),
660
693
  s
661
694
  ]
662
695
  }
663
696
  );
664
697
  }
665
- ), Nr = h(
698
+ ), Mr = b(
666
699
  (e, t) => {
667
- const { className: r, ...n } = e, { contentPosition: o } = x(S);
700
+ const { className: r, ...n } = e, { contentPosition: o } = A(J);
668
701
  return /* @__PURE__ */ a(
669
702
  "div",
670
703
  {
@@ -681,18 +714,18 @@ const S = w({ bgColor: "white", contentPosition: "below-center", hasImage: !1 })
681
714
  }
682
715
  );
683
716
  }
684
- ), le = h((e, t) => {
717
+ ), ue = b((e, t) => {
685
718
  const {
686
719
  className: r,
687
720
  isInvalid: n,
688
721
  size: o,
689
722
  as: s,
690
- type: d,
723
+ type: i,
691
724
  rightAddon: c,
692
- leftAddon: m,
693
- ...i
694
- } = e, u = s ?? "input", f = Te(u, d);
695
- return /* @__PURE__ */ b(
725
+ leftAddon: u,
726
+ ...d
727
+ } = e, m = s ?? "input", h = Ge(m, i);
728
+ return /* @__PURE__ */ g(
696
729
  "div",
697
730
  {
698
731
  className: l(
@@ -703,21 +736,21 @@ const S = w({ bgColor: "white", contentPosition: "below-center", hasImage: !1 })
703
736
  "border-red focus-within:border-red": n,
704
737
  "w-fit": o != null,
705
738
  "w-full": o == null,
706
- "pl-4": m,
739
+ "pl-4": u,
707
740
  "pr-4": c
708
741
  }
709
742
  ),
710
743
  children: [
711
- m,
744
+ u,
712
745
  /* @__PURE__ */ a(
713
- u,
746
+ m,
714
747
  {
715
748
  "aria-invalid": n,
716
749
  ref: t,
717
750
  className: "focus:none placeholder-gray w-full rounded-lg border-none px-4 py-3.5 focus:outline-none",
718
751
  size: o,
719
- type: f,
720
- ...i
752
+ type: h,
753
+ ...d
721
754
  }
722
755
  ),
723
756
  c
@@ -725,28 +758,28 @@ const S = w({ bgColor: "white", contentPosition: "below-center", hasImage: !1 })
725
758
  }
726
759
  );
727
760
  });
728
- function Te(e, t) {
761
+ function Ge(e, t) {
729
762
  if (t != null)
730
763
  return t;
731
764
  if (e === "input")
732
765
  return "text";
733
766
  }
734
- const wr = (e) => {
767
+ const kr = (e) => {
735
768
  let t = "";
736
- return e.icon && (t = "inline-flex items-center gap-2"), /* @__PURE__ */ b("a", { className: t, href: e.href, children: [
769
+ return e.icon && (t = "inline-flex items-center gap-2"), /* @__PURE__ */ g("a", { className: t, href: e.href, children: [
737
770
  e.icon,
738
771
  e.children
739
772
  ] });
740
- }, q = w({
741
- setIsExpanded: N,
773
+ }, R = I({
774
+ setIsExpanded: y,
742
775
  isExpanded: !1,
743
776
  collapsibleId: ""
744
- }), Ir = (e) => {
745
- const { className: t, children: r, ...n } = e, o = D(), [s, d] = E(!1), c = L(
746
- () => ({ isExpanded: s, setIsExpanded: d, collapsibleId: o }),
777
+ }), zr = (e) => {
778
+ const { className: t, children: r, ...n } = e, o = ee(), [s, i] = L(!1), c = k(
779
+ () => ({ isExpanded: s, setIsExpanded: i, collapsibleId: o }),
747
780
  [s, o]
748
781
  );
749
- return /* @__PURE__ */ a(z.Provider, { value: "white", children: /* @__PURE__ */ a(q.Provider, { value: c, children: /* @__PURE__ */ a(
782
+ return /* @__PURE__ */ a(P.Provider, { value: "white", children: /* @__PURE__ */ a(R.Provider, { value: c, children: /* @__PURE__ */ a(
750
783
  "div",
751
784
  {
752
785
  className: l(
@@ -757,8 +790,8 @@ const wr = (e) => {
757
790
  children: /* @__PURE__ */ a("div", { className: "container", children: r })
758
791
  }
759
792
  ) }) });
760
- }, yr = (e) => {
761
- const { className: t, children: r, ...n } = e, { isExpanded: o } = x(q);
793
+ }, Pr = (e) => {
794
+ const { className: t, children: r, ...n } = e, { isExpanded: o } = A(R);
762
795
  return /* @__PURE__ */ a(
763
796
  "nav",
764
797
  {
@@ -773,7 +806,7 @@ const wr = (e) => {
773
806
  children: r
774
807
  }
775
808
  );
776
- }, Cr = h(
809
+ }, Sr = b(
777
810
  (e, t) => {
778
811
  const { active: r, className: n, children: o, ...s } = e;
779
812
  return /* @__PURE__ */ a(
@@ -793,10 +826,10 @@ const wr = (e) => {
793
826
  }
794
827
  );
795
828
  }
796
- ), Fe = () => {
797
- const { isExpanded: e, setIsExpanded: t, collapsibleId: r } = x(q);
798
- let n = ge, o = "Meny";
799
- return e && (n = he, o = "Lukk"), /* @__PURE__ */ b(
829
+ ), He = () => {
830
+ const { isExpanded: e, setIsExpanded: t, collapsibleId: r } = A(R);
831
+ let n = ve, o = "Meny";
832
+ return e && (n = xe, o = "Lukk"), /* @__PURE__ */ g(
800
833
  "button",
801
834
  {
802
835
  "aria-controls": r,
@@ -810,9 +843,9 @@ const wr = (e) => {
810
843
  ]
811
844
  }
812
845
  );
813
- }, qr = (e) => {
846
+ }, Vr = (e) => {
814
847
  const { className: t, children: r, logo: n, ...o } = e;
815
- return /* @__PURE__ */ b(
848
+ return /* @__PURE__ */ g(
816
849
  "div",
817
850
  {
818
851
  className: l(t, "flex items-center justify-between gap-8"),
@@ -820,12 +853,12 @@ const wr = (e) => {
820
853
  children: [
821
854
  n,
822
855
  /* @__PURE__ */ a("div", { className: "hidden md:block", children: r }),
823
- /* @__PURE__ */ a(Fe, {})
856
+ /* @__PURE__ */ a(He, {})
824
857
  ]
825
858
  }
826
859
  );
827
- }, Rr = (e) => {
828
- const { className: t, children: r, ...n } = e, { collapsibleId: o, isExpanded: s } = x(q);
860
+ }, Jr = (e) => {
861
+ const { className: t, children: r, ...n } = e, { collapsibleId: o, isExpanded: s } = A(R);
829
862
  return /* @__PURE__ */ a(
830
863
  "div",
831
864
  {
@@ -838,103 +871,103 @@ const wr = (e) => {
838
871
  children: r
839
872
  }
840
873
  );
841
- }, Er = (e) => {
842
- const { isExpanded: t } = x(q), r = we(!1);
843
- return !t || !r ? null : /* @__PURE__ */ a(T, { children: e.children });
844
- }, v = 2, J = w({ currentPage: 0, pageCount: 0 }), kr = (e) => {
874
+ }, Or = (e) => {
875
+ const { isExpanded: t } = A(R), r = ze(!1);
876
+ return !t || !r ? null : /* @__PURE__ */ a(j, { children: e.children });
877
+ }, w = 2, O = I({ currentPage: 0, pageCount: 0 }), Tr = (e) => {
845
878
  const {
846
879
  className: t,
847
880
  page: r,
848
881
  count: n,
849
882
  onChange: o,
850
883
  getItemHref: s,
851
- getItemAriaLabel: d,
884
+ getItemAriaLabel: i,
852
885
  nextPageAriaLabel: c,
853
- prevPageAriaLabel: m,
854
- ...i
855
- } = e, u = L(
886
+ prevPageAriaLabel: u,
887
+ ...d
888
+ } = e, m = k(
856
889
  () => ({
857
890
  currentPage: Math.max(1, Math.min(r, n)),
858
891
  pageCount: Math.max(1, n)
859
892
  }),
860
893
  [r, n]
861
- ), f = (g) => (p) => {
862
- o && (p.preventDefault(), o(g));
894
+ ), h = (f) => (p) => {
895
+ o && (p.preventDefault(), o(f));
863
896
  };
864
- return /* @__PURE__ */ a(J.Provider, { value: u, children: /* @__PURE__ */ b(
897
+ return /* @__PURE__ */ a(O.Provider, { value: m, children: /* @__PURE__ */ g(
865
898
  "nav",
866
899
  {
867
900
  className: l("flex justify-center gap-2 sm:gap-4", t),
868
- ...i,
901
+ ...d,
869
902
  children: [
870
903
  /* @__PURE__ */ a(
871
- We,
904
+ _e,
872
905
  {
873
- "aria-label": m,
906
+ "aria-label": u,
874
907
  href: s(r - 1),
875
- onClick: f(r - 1)
908
+ onClick: h(r - 1)
876
909
  }
877
910
  ),
878
911
  /* @__PURE__ */ a(
879
- G,
912
+ _,
880
913
  {
881
914
  page: 1,
882
915
  href: s(1),
883
- onClick: f(1),
884
- "aria-label": d(1),
916
+ onClick: h(1),
917
+ "aria-label": i(1),
885
918
  selected: r === 1
886
919
  }
887
920
  ),
888
- n > 2 + v * 2 && r > v + 2 && /* @__PURE__ */ a(Ke, {}),
889
- /* @__PURE__ */ a(Ye, { children: (g) => /* @__PURE__ */ a(
890
- G,
921
+ n > 2 + w * 2 && r > w + 2 && /* @__PURE__ */ a($e, {}),
922
+ /* @__PURE__ */ a(er, { children: (f) => /* @__PURE__ */ a(
923
+ _,
891
924
  {
892
- href: s(g),
893
- onClick: f(g),
894
- "aria-label": d(g),
895
- page: g,
896
- selected: g === r
925
+ href: s(f),
926
+ onClick: h(f),
927
+ "aria-label": i(f),
928
+ page: f,
929
+ selected: f === r
897
930
  },
898
- g
931
+ f
899
932
  ) }),
900
933
  /* @__PURE__ */ a(
901
- Ze,
934
+ De,
902
935
  {
903
936
  "aria-label": c,
904
937
  href: s(r + 1),
905
- onClick: f(r + 1)
938
+ onClick: h(r + 1)
906
939
  }
907
940
  )
908
941
  ]
909
942
  }
910
943
  ) });
911
- }, Ze = h((e, t) => {
912
- const { currentPage: r, pageCount: n } = x(J), o = r >= n;
944
+ }, De = b((e, t) => {
945
+ const { currentPage: r, pageCount: n } = A(O), o = r >= n;
913
946
  return /* @__PURE__ */ a(
914
- X,
947
+ Q,
915
948
  {
916
949
  "aria-hidden": o,
917
950
  className: o ? "invisible" : void 0,
918
951
  ref: t,
919
952
  rel: "next",
920
953
  ...e,
921
- children: /* @__PURE__ */ a(pe, {})
954
+ children: /* @__PURE__ */ a(Ne, {})
922
955
  }
923
956
  );
924
- }), We = h((e, t) => {
925
- const { currentPage: r } = x(J), n = r <= 1;
957
+ }), _e = b((e, t) => {
958
+ const { currentPage: r } = A(O), n = r <= 1;
926
959
  return /* @__PURE__ */ a(
927
- X,
960
+ Q,
928
961
  {
929
962
  "aria-hidden": n,
930
963
  className: n ? "invisible" : void 0,
931
964
  ref: t,
932
965
  rel: "prev",
933
966
  ...e,
934
- children: /* @__PURE__ */ a(Ae, {})
967
+ children: /* @__PURE__ */ a(we, {})
935
968
  }
936
969
  );
937
- }), X = h((e, t) => {
970
+ }), Q = b((e, t) => {
938
971
  const { className: r, ...n } = e;
939
972
  return /* @__PURE__ */ a(
940
973
  "a",
@@ -947,39 +980,39 @@ const wr = (e) => {
947
980
  ...n
948
981
  }
949
982
  );
950
- }), Ke = () => /* @__PURE__ */ a("span", { className: "flex h-9 w-9 cursor-default items-center justify-center border-2 border-transparent sm:h-10 sm:w-10", children: "..." }), Ye = ({ children: e }) => {
951
- const { currentPage: t, pageCount: r } = x(J), n = Math.min(
952
- Math.max(2 + v * 2, t + v),
983
+ }), $e = () => /* @__PURE__ */ a("span", { className: "flex h-9 w-9 cursor-default items-center justify-center border-2 border-transparent sm:h-10 sm:w-10", children: "..." }), er = ({ children: e }) => {
984
+ const { currentPage: t, pageCount: r } = A(O), n = Math.min(
985
+ Math.max(2 + w * 2, t + w),
953
986
  r
954
987
  );
955
988
  let o = Math.max(
956
- Math.min(t - v, n - v * 2),
989
+ Math.min(t - w, n - w * 2),
957
990
  1
958
991
  );
959
- return o - v === 0 && (o = o - 1), Array.from({ length: n - o }, (d, c) => o + c + 1).map((d) => e(d));
960
- }, G = h((e, t) => {
992
+ return o - w === 0 && (o = o - 1), Array.from({ length: n - o }, (i, c) => o + c + 1).map((i) => e(i));
993
+ }, _ = b((e, t) => {
961
994
  const { page: r, selected: n, ...o } = e;
962
- return /* @__PURE__ */ a(X, { "aria-current": n ? "page" : void 0, ref: t, ...o, children: r });
963
- }), de = w({
995
+ return /* @__PURE__ */ a(Q, { "aria-current": n ? "page" : void 0, ref: t, ...o, children: r });
996
+ }), fe = I({
964
997
  defaultValue: void 0,
965
998
  isControlled: !1,
966
999
  name: void 0,
967
- onChange: N,
1000
+ onChange: y,
968
1001
  required: !1,
969
1002
  value: void 0,
970
1003
  error: !1
971
- }), Lr = h((e, t) => {
972
- const { children: r, className: n, ...o } = e, { defaultValue: s, isControlled: d, name: c, onChange: m, required: i, value: u, error: f } = x(de);
973
- return /* @__PURE__ */ b("label", { className: l(n, "flex cursor-pointer gap-2.5"), children: [
1004
+ }), Fr = b((e, t) => {
1005
+ const { children: r, className: n, ...o } = e, { defaultValue: s, isControlled: i, name: c, onChange: u, required: d, value: m, error: h } = A(fe);
1006
+ return /* @__PURE__ */ g("label", { className: l(n, "flex cursor-pointer gap-2.5"), children: [
974
1007
  /* @__PURE__ */ a(
975
1008
  "input",
976
1009
  {
977
- className: l("radio", f && "border-red"),
978
- defaultChecked: d ? void 0 : o.value === s,
979
- checked: d ? o.value === u : void 0,
1010
+ className: l("radio", h && "border-red"),
1011
+ defaultChecked: i ? void 0 : o.value === s,
1012
+ checked: i ? o.value === m : void 0,
980
1013
  name: c,
981
- onChange: d ? m : void 0,
982
- required: i,
1014
+ onChange: i ? u : void 0,
1015
+ required: d,
983
1016
  type: "radio",
984
1017
  ref: t,
985
1018
  ...o
@@ -987,70 +1020,70 @@ const wr = (e) => {
987
1020
  ),
988
1021
  r
989
1022
  ] });
990
- }), Mr = h(
1023
+ }), Zr = b(
991
1024
  (e, t) => {
992
1025
  const r = "value" in e, {
993
1026
  className: n,
994
1027
  defaultValue: o,
995
1028
  description: s,
996
- error: d,
1029
+ error: i,
997
1030
  id: c,
998
- children: m,
999
- label: i,
1000
- name: u,
1001
- onChange: f,
1002
- required: g,
1031
+ children: u,
1032
+ label: d,
1033
+ name: m,
1034
+ onChange: h,
1035
+ required: f,
1003
1036
  value: p,
1004
- ...A
1005
- } = e, I = R(
1006
- (me) => {
1007
- const ue = me.target.value;
1008
- f == null || f(ue);
1037
+ ...x
1038
+ } = e, v = q(
1039
+ (ge) => {
1040
+ const be = ge.target.value;
1041
+ h == null || h(be);
1009
1042
  },
1010
- [f]
1011
- ), ce = L(
1043
+ [h]
1044
+ ), T = k(
1012
1045
  () => ({
1013
1046
  defaultValue: o,
1014
1047
  isControlled: r,
1015
- name: u,
1016
- onChange: I,
1017
- required: g,
1048
+ name: m,
1049
+ onChange: v,
1050
+ required: f,
1018
1051
  value: p,
1019
- error: Boolean(d)
1052
+ error: Boolean(i)
1020
1053
  }),
1021
- [o, r, u, I, g, p, d]
1022
- ), j = y(c), B = `${j}:label`, Q = `${j}:help`, U = j + "err", O = d;
1023
- return /* @__PURE__ */ a(de.Provider, { value: ce, children: /* @__PURE__ */ b(
1054
+ [o, r, m, v, f, p, i]
1055
+ ), F = C(c), U = `${F}:label`, G = `${F}:help`, H = F + "err", Z = i;
1056
+ return /* @__PURE__ */ a(fe.Provider, { value: T, children: /* @__PURE__ */ g(
1024
1057
  "div",
1025
1058
  {
1026
1059
  "aria-describedby": l({
1027
- [U]: O,
1028
- [Q]: s
1060
+ [H]: Z,
1061
+ [G]: s
1029
1062
  }) || void 0,
1030
- "aria-invalid": !!d,
1031
- "aria-labelledby": i ? B : void 0,
1063
+ "aria-invalid": !!i,
1064
+ "aria-labelledby": d ? U : void 0,
1032
1065
  className: l(n, "flex flex-col gap-4"),
1033
1066
  role: "radiogroup",
1034
1067
  ref: t,
1035
- ...A,
1068
+ ...x,
1036
1069
  children: [
1037
- i && /* @__PURE__ */ a(V, { id: B, isRequired: g, isInvalid: !!d, children: i }),
1038
- s && /* @__PURE__ */ a(P, { id: Q, children: s }),
1039
- m,
1040
- O && /* @__PURE__ */ a(C, { id: U, children: O })
1070
+ d && /* @__PURE__ */ a(V, { id: U, isRequired: f, isInvalid: !!i, children: d }),
1071
+ s && /* @__PURE__ */ a(S, { id: G, children: s }),
1072
+ u,
1073
+ Z && /* @__PURE__ */ a(E, { id: H, children: Z })
1041
1074
  ]
1042
1075
  }
1043
1076
  ) });
1044
1077
  }
1045
- ), Xe = h(
1078
+ ), rr = b(
1046
1079
  (e, t) => {
1047
- const { children: r, className: n, isInvalid: o, size: s, ...d } = e, c = s === "small";
1048
- return /* @__PURE__ */ b("div", { className: l(n, "relative", c && "text-sm"), children: [
1080
+ const { children: r, className: n, isInvalid: o, size: s, ...i } = e, c = s === "small";
1081
+ return /* @__PURE__ */ g("div", { className: l(n, "relative", c && "text-sm"), children: [
1049
1082
  /* @__PURE__ */ a(
1050
1083
  "select",
1051
1084
  {
1052
1085
  "aria-invalid": o,
1053
- ...d,
1086
+ ...i,
1054
1087
  className: l(
1055
1088
  "w-full cursor-pointer appearance-none border border-b-[3px] bg-white focus:-mt-0.5 focus:-ml-0.5 focus:border-[3px] focus:shadow focus:outline-none",
1056
1089
  c ? "rounded px-3.5 py-2" : "rounded-lg px-4 py-3.5",
@@ -1061,7 +1094,7 @@ const wr = (e) => {
1061
1094
  }
1062
1095
  ),
1063
1096
  /* @__PURE__ */ a(
1064
- $,
1097
+ te,
1065
1098
  {
1066
1099
  className: l(
1067
1100
  "pointer-events-none absolute top-0 bottom-0 my-auto",
@@ -1071,50 +1104,50 @@ const wr = (e) => {
1071
1104
  )
1072
1105
  ] });
1073
1106
  }
1074
- ), zr = h(
1107
+ ), jr = b(
1075
1108
  (e, t) => {
1076
1109
  const {
1077
1110
  description: r,
1078
1111
  error: n,
1079
1112
  id: o,
1080
1113
  label: s,
1081
- disableValidation: d = !1,
1114
+ disableValidation: i = !1,
1082
1115
  ...c
1083
- } = e, m = k(null), { validity: i, validationMessage: u } = M(
1084
- m,
1085
- !d
1086
- ), f = y(o), g = f + "help", p = f + "err", A = n || u;
1087
- return /* @__PURE__ */ b("div", { className: "grid gap-2", children: [
1116
+ } = e, u = M(null), d = Y(u, t), { validity: m, validationMessage: h } = z(
1117
+ u,
1118
+ !i
1119
+ ), f = C(o), p = f + "help", x = f + "err", v = n || h;
1120
+ return /* @__PURE__ */ g("div", { className: "grid gap-2", children: [
1088
1121
  /* @__PURE__ */ a(
1089
1122
  V,
1090
1123
  {
1091
1124
  htmlFor: f,
1092
1125
  isRequired: e.required,
1093
- isInvalid: !!n || i === "invalid",
1126
+ isInvalid: !!n || m === "invalid",
1094
1127
  children: s
1095
1128
  }
1096
1129
  ),
1097
- r && /* @__PURE__ */ a(P, { id: g, children: r }),
1130
+ r && /* @__PURE__ */ a(S, { id: p, children: r }),
1098
1131
  /* @__PURE__ */ a(
1099
- Xe,
1132
+ rr,
1100
1133
  {
1101
1134
  id: f,
1102
- ref: W(m, t),
1135
+ ref: d,
1103
1136
  ...c,
1104
- isInvalid: !!n || i === "invalid",
1137
+ isInvalid: !!n || m === "invalid",
1105
1138
  "aria-describedby": l({
1106
- [p]: A,
1107
- [g]: r
1139
+ [x]: v,
1140
+ [p]: r
1108
1141
  }) || void 0
1109
1142
  }
1110
1143
  ),
1111
- A && /* @__PURE__ */ a(C, { id: p, children: A })
1144
+ v && /* @__PURE__ */ a(E, { id: x, children: v })
1112
1145
  ] });
1113
1146
  }
1114
- ), Pr = (e) => {
1115
- const { heading: t, children: r, closeSnackbar: n } = e, [o, s] = E(!1);
1116
- return /* @__PURE__ */ a("div", { className: "container max-w-[59rem]", children: /* @__PURE__ */ a("div", { className: "bg-orange-light px-8 py-4 max-md:p-4", children: /* @__PURE__ */ b("div", { className: "snackbar grid items-center", children: [
1117
- /* @__PURE__ */ a(re, { className: "text-orange snackbar-icon mr-4 self-start md:mr-8 md:text-2xl" }),
1147
+ ), Wr = (e) => {
1148
+ const { heading: t, children: r, closeSnackbar: n } = e, [o, s] = L(!1);
1149
+ return /* @__PURE__ */ a("div", { className: "container max-w-[59rem]", children: /* @__PURE__ */ a("div", { className: "bg-orange-light px-8 py-4 max-md:p-4", children: /* @__PURE__ */ g("div", { className: "snackbar grid items-center", children: [
1150
+ /* @__PURE__ */ a(ae, { className: "text-orange snackbar-icon mr-4 self-start md:mr-8 md:text-2xl" }),
1118
1151
  /* @__PURE__ */ a(
1119
1152
  "h3",
1120
1153
  {
@@ -1127,20 +1160,20 @@ const wr = (e) => {
1127
1160
  children: t
1128
1161
  }
1129
1162
  ),
1130
- /* @__PURE__ */ b("div", { className: "snackbar-actions flex justify-end gap-4 max-md:mt-3 md:ml-4", children: [
1163
+ /* @__PURE__ */ g("div", { className: "snackbar-actions flex justify-end gap-4 max-md:mt-3 md:ml-4", children: [
1131
1164
  /* @__PURE__ */ a(
1132
- H,
1165
+ $,
1133
1166
  {
1134
1167
  "aria-expanded": o,
1135
1168
  onClick: () => s(!o),
1136
1169
  children: o ? "Les mindre" : "Les mer"
1137
1170
  }
1138
1171
  ),
1139
- /* @__PURE__ */ a(H, { onClick: n, children: "Ok" })
1172
+ /* @__PURE__ */ a($, { onClick: n, children: "Ok" })
1140
1173
  ] }),
1141
1174
  o && r
1142
1175
  ] }) }) });
1143
- }, H = (e) => /* @__PURE__ */ a(
1176
+ }, $ = (e) => /* @__PURE__ */ a(
1144
1177
  "button",
1145
1178
  {
1146
1179
  className: l(
@@ -1150,21 +1183,21 @@ const wr = (e) => {
1150
1183
  ...e,
1151
1184
  children: e.children
1152
1185
  }
1153
- ), Vr = (e) => /* @__PURE__ */ a(
1186
+ ), Kr = (e) => /* @__PURE__ */ a(
1154
1187
  "div",
1155
1188
  {
1156
1189
  className: "snackbar-content my-4 max-h-[50vh] max-w-prose overflow-y-auto",
1157
1190
  ...e,
1158
1191
  children: e.children
1159
1192
  }
1160
- ), Be = (e) => {
1193
+ ), tr = (e) => {
1161
1194
  const { align: t = "center", children: r, className: n, ...o } = e;
1162
- return /* @__PURE__ */ a("ol", { className: l(n, "flex flex-col gap-8 md:gap-12"), ...o, children: F.map(r, (s) => Z(s, {
1195
+ return /* @__PURE__ */ a("ol", { className: l(n, "flex flex-col gap-8 md:gap-12"), ...o, children: W.map(r, (s) => K(s, {
1163
1196
  align: t
1164
1197
  })) });
1165
- }, Qe = (e) => {
1198
+ }, nr = (e) => {
1166
1199
  const { className: t, children: r, bullet: n, align: o = "center", ...s } = e;
1167
- return /* @__PURE__ */ b(
1200
+ return /* @__PURE__ */ g(
1168
1201
  "li",
1169
1202
  {
1170
1203
  className: l(
@@ -1174,12 +1207,12 @@ const wr = (e) => {
1174
1207
  ),
1175
1208
  ...s,
1176
1209
  children: [
1177
- /* @__PURE__ */ a(Ue, { align: o, children: n }),
1210
+ /* @__PURE__ */ a(ar, { align: o, children: n }),
1178
1211
  r
1179
1212
  ]
1180
1213
  }
1181
1214
  );
1182
- }, Ue = ({ align: e, ...t }) => /* @__PURE__ */ a(
1215
+ }, ar = ({ align: e, ...t }) => /* @__PURE__ */ a(
1183
1216
  "span",
1184
1217
  {
1185
1218
  "aria-hidden": !0,
@@ -1193,145 +1226,145 @@ const wr = (e) => {
1193
1226
  ...t
1194
1227
  }
1195
1228
  );
1196
- Be.Item = Qe;
1197
- const Sr = h(
1229
+ tr.Item = nr;
1230
+ const Yr = b(
1198
1231
  (e, t) => {
1199
1232
  const {
1200
1233
  description: r,
1201
1234
  error: n,
1202
1235
  id: o,
1203
1236
  label: s,
1204
- disableValidation: d = !1,
1237
+ disableValidation: i = !1,
1205
1238
  ...c
1206
- } = e, m = k(null), { validity: i, validationMessage: u } = M(
1207
- m,
1208
- !d
1209
- ), f = y(o), g = f + "help", p = f + "err", A = n || u;
1210
- return /* @__PURE__ */ b("div", { className: "grid gap-2", children: [
1239
+ } = e, u = M(null), d = Y(u, t), { validity: m, validationMessage: h } = z(
1240
+ u,
1241
+ !i
1242
+ ), f = C(o), p = f + "help", x = f + "err", v = n || h;
1243
+ return /* @__PURE__ */ g("div", { className: "grid gap-2", children: [
1211
1244
  /* @__PURE__ */ a(
1212
1245
  V,
1213
1246
  {
1214
1247
  htmlFor: f,
1215
1248
  isRequired: e.required,
1216
- isInvalid: !!n || i === "invalid",
1249
+ isInvalid: !!n || m === "invalid",
1217
1250
  children: s
1218
1251
  }
1219
1252
  ),
1220
- r && /* @__PURE__ */ a(P, { id: g, children: r }),
1253
+ r && /* @__PURE__ */ a(S, { id: p, children: r }),
1221
1254
  /* @__PURE__ */ a(
1222
- le,
1255
+ ue,
1223
1256
  {
1224
1257
  as: "textarea",
1225
- ref: W(m, t),
1258
+ ref: d,
1226
1259
  id: f,
1227
1260
  ...c,
1228
- isInvalid: !!n || i === "invalid",
1261
+ isInvalid: !!n || m === "invalid",
1229
1262
  "aria-describedby": l({
1230
- [p]: A,
1231
- [g]: r
1263
+ [x]: v,
1264
+ [p]: r
1232
1265
  }) || void 0
1233
1266
  }
1234
1267
  ),
1235
- A && /* @__PURE__ */ a(C, { id: p, children: A })
1268
+ v && /* @__PURE__ */ a(E, { id: x, children: v })
1236
1269
  ] });
1237
1270
  }
1238
- ), Jr = h(
1271
+ ), Xr = b(
1239
1272
  (e, t) => {
1240
1273
  const {
1241
1274
  description: r,
1242
1275
  error: n,
1243
1276
  id: o,
1244
1277
  label: s,
1245
- type: d = "text",
1278
+ type: i = "text",
1246
1279
  disableValidation: c = !1,
1247
- ...m
1248
- } = e, i = k(null), { validity: u, validationMessage: f } = M(
1249
- i,
1280
+ ...u
1281
+ } = e, d = M(null), { validity: m, validationMessage: h } = z(
1282
+ d,
1250
1283
  !c
1251
- ), g = y(o), p = g + "help", A = g + "err", I = n || f;
1252
- return /* @__PURE__ */ b("div", { className: "grid gap-2", children: [
1284
+ ), f = C(o), p = f + "help", x = f + "err", v = n || h, T = Y(d, t);
1285
+ return /* @__PURE__ */ g("div", { className: "grid gap-2", children: [
1253
1286
  /* @__PURE__ */ a(
1254
1287
  V,
1255
1288
  {
1256
- htmlFor: g,
1289
+ htmlFor: f,
1257
1290
  isRequired: e.required,
1258
- isInvalid: !!n || u === "invalid",
1291
+ isInvalid: !!n || m === "invalid",
1259
1292
  children: s
1260
1293
  }
1261
1294
  ),
1262
- r && /* @__PURE__ */ a(P, { id: p, children: r }),
1295
+ r && /* @__PURE__ */ a(S, { id: p, children: r }),
1263
1296
  /* @__PURE__ */ a(
1264
- le,
1297
+ ue,
1265
1298
  {
1266
- id: g,
1267
- ref: W(i, t),
1268
- type: d,
1269
- ...m,
1270
- isInvalid: !!n || u === "invalid",
1299
+ id: f,
1300
+ ref: T,
1301
+ type: i,
1302
+ ...u,
1303
+ isInvalid: !!n || m === "invalid",
1271
1304
  "aria-describedby": l({
1272
- [A]: I,
1305
+ [x]: v,
1273
1306
  [p]: r
1274
1307
  }) || void 0
1275
1308
  }
1276
1309
  ),
1277
- I && /* @__PURE__ */ a(C, { id: A, children: I })
1310
+ v && /* @__PURE__ */ a(E, { id: x, children: v })
1278
1311
  ] });
1279
1312
  }
1280
1313
  );
1281
1314
  export {
1282
- K as Accordion,
1283
- Re as AccordionContent,
1284
- qe as AccordionHeader,
1285
- Ce as AccordionItem,
1286
- tr as Alert,
1287
- nr as Banner,
1288
- ar as BannerImage,
1289
- or as Button,
1290
- z as ButtonColorContext,
1291
- sr as Campaign,
1292
- ir as Card,
1293
- cr as CardContent,
1294
- lr as CardImage,
1295
- mr as CardLinkOverlay,
1296
- dr as CardList,
1297
- ur as Checkbox,
1298
- br as Chip,
1299
- fr as Footer,
1300
- gr as Form,
1301
- hr as FormError,
1302
- C as FormErrorMessage,
1303
- Oe as FormHeading,
1304
- P as FormHelperText,
1315
+ X as Accordion,
1316
+ Oe as AccordionContent,
1317
+ Je as AccordionHeader,
1318
+ Ve as AccordionItem,
1319
+ mr as Alert,
1320
+ ur as Banner,
1321
+ fr as BannerImage,
1322
+ gr as Button,
1323
+ P as ButtonColorContext,
1324
+ br as Campaign,
1325
+ hr as Card,
1326
+ vr as CardContent,
1327
+ pr as CardImage,
1328
+ xr as CardLinkOverlay,
1329
+ Ar as CardList,
1330
+ Nr as Checkbox,
1331
+ wr as Chip,
1332
+ yr as Footer,
1333
+ Ir as Form,
1334
+ Cr as FormError,
1335
+ E as FormErrorMessage,
1336
+ Ue as FormHeading,
1337
+ S as FormHelperText,
1305
1338
  V as FormLabel,
1306
- pr as FormSuccess,
1307
- Ar as Hero,
1308
- Nr as HeroActions,
1309
- vr as HeroContent,
1310
- S as HeroContext,
1311
- xr as HeroImage,
1312
- le as Input,
1313
- wr as Link,
1314
- Ir as Navbar,
1315
- Rr as NavbarCollapsible,
1316
- qr as NavbarContent,
1317
- Er as NavbarExpandedMobileContent,
1318
- Cr as NavbarItem,
1319
- yr as NavbarItems,
1320
- kr as Pagination,
1321
- Lr as Radio,
1322
- Mr as RadioGroup,
1323
- zr as Select,
1324
- Pr as Snackbar,
1325
- H as SnackbarButton,
1326
- Vr as SnackbarContent,
1327
- Be as StepList,
1328
- Qe as StepListItem,
1329
- Sr as TextArea,
1330
- Jr as TextField,
1331
- ne as useBlockBackgroundColor,
1332
- y as useFallbackId,
1333
- M as useFormControlValidity,
1334
- Tr as useMedia,
1335
- Ne as usePrefersReducedMotion,
1336
- we as useScreenMaxWidthMd
1339
+ Er as FormSuccess,
1340
+ Rr as Hero,
1341
+ Mr as HeroActions,
1342
+ Lr as HeroContent,
1343
+ J as HeroContext,
1344
+ qr as HeroImage,
1345
+ ue as Input,
1346
+ kr as Link,
1347
+ zr as Navbar,
1348
+ Jr as NavbarCollapsible,
1349
+ Vr as NavbarContent,
1350
+ Or as NavbarExpandedMobileContent,
1351
+ Sr as NavbarItem,
1352
+ Pr as NavbarItems,
1353
+ Tr as Pagination,
1354
+ Fr as Radio,
1355
+ Zr as RadioGroup,
1356
+ jr as Select,
1357
+ Wr as Snackbar,
1358
+ $ as SnackbarButton,
1359
+ Kr as SnackbarContent,
1360
+ tr as StepList,
1361
+ nr as StepListItem,
1362
+ Yr as TextArea,
1363
+ Xr as TextField,
1364
+ ie as useBlockBackgroundColor,
1365
+ C as useFallbackId,
1366
+ z as useFormControlValidity,
1367
+ se as useMedia,
1368
+ ke as usePrefersReducedMotion,
1369
+ ze as useScreenMaxWidthMd
1337
1370
  };