rk-designsystem 1.1.127 → 1.1.129
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/dist/componentlibrary.es.js +943 -813
- package/dist/componentlibrary.umd.js +11 -11
- package/dist/index.d.ts +9 -1
- package/package.json +1 -1
|
@@ -1,60 +1,60 @@
|
|
|
1
1
|
import { jsx as n, jsxs as r, Fragment as Re } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
3
|
-
import { Alert as Je, Avatar as Qe, BadgePosition as et, Badge as tt, Breadcrumbs as nt, BreadcrumbsList as ot, BreadcrumbsItem as rt, BreadcrumbsLink as st, Button as
|
|
4
|
-
import { startOfMonth as
|
|
2
|
+
import De, { forwardRef as re, useState as q, createContext as Ze, useContext as Ge, useEffect as z, useMemo as ue, useCallback as oe, useRef as Xe } from "react";
|
|
3
|
+
import { Alert as Je, Avatar as Qe, BadgePosition as et, Badge as tt, Breadcrumbs as nt, BreadcrumbsList as ot, BreadcrumbsItem as rt, BreadcrumbsLink as st, Button as Ae, Card as at, CardBlock as it, Checkbox as lt, useCheckboxGroup as dt, Fieldset as We, Chip as ct, Spinner as pt, Details as mt, Dialog as gt, Divider as ut, Dropdown as ht, DropdownTrigger as ft, DropdownTriggerContext as kt, DropdownHeading as vt, DropdownList as bt, DropdownItem as yt, DropdownButton as xt, ErrorSummary as Tt, Field as Ct, FieldDescription as wt, FieldCounter as St, Heading as It, Input as _t, Label as Dt, Link as At, List as Lt, Pagination as Nt, PaginationList as Mt, PaginationItem as jt, PaginationButton as Ft, usePagination as Et, Paragraph as Bt, Popover as zt, Radio as Pt, useRadioGroup as $t, Search as Rt, SearchInput as Gt, SearchClear as Wt, SearchButton as Ht, Select as Ut, Skeleton as Vt, SkipLink as Ot, EXPERIMENTAL_Suggestion as Kt, Switch as qt, Table as Yt, Tabs as Zt, Tag as Xt, Textarea as Jt, Textfield as Qt, ToggleGroup as en, Tooltip as tn, ValidationMessage as nn } from "@digdir/designsystemet-react";
|
|
4
|
+
import { startOfMonth as me, isValid as we, isSameMonth as Ne, startOfWeek as He, format as he, addDays as Ue, subMonths as on, addMonths as rn, isSameDay as sn, isToday as an, eachDayOfInterval as ln } from "date-fns";
|
|
5
5
|
import dn from "embla-carousel-react";
|
|
6
6
|
import { ChevronLeftIcon as cn, ChevronRightIcon as pn, ChevronDownIcon as Me, XMarkIcon as je, MagnifyingGlassIcon as Fe, MenuHamburgerIcon as mn, HeartIcon as gn } from "@navikt/aksel-icons";
|
|
7
|
-
const un =
|
|
7
|
+
const un = re((t, e) => /* @__PURE__ */ n(Je, { ref: e, ...t }));
|
|
8
8
|
un.displayName = "Alert";
|
|
9
|
-
const Ve =
|
|
9
|
+
const Ve = re((t, e) => /* @__PURE__ */ n(Qe, { ref: e, ...t }));
|
|
10
10
|
Ve.displayName = "Avatar";
|
|
11
|
-
const hn =
|
|
11
|
+
const hn = re((t, e) => /* @__PURE__ */ n(tt, { ref: e, ...t }));
|
|
12
12
|
hn.displayName = "Badge";
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
const fn = at,
|
|
13
|
+
const Sa = et, Ia = nt, _a = ot, Da = rt, Aa = st, ie = Ae;
|
|
14
|
+
ie.displayName = "Button";
|
|
15
|
+
const fn = at, La = it;
|
|
16
16
|
fn.displayName = "Card";
|
|
17
|
-
const kn = lt, vn = We,
|
|
17
|
+
const kn = lt, vn = We, Na = dt;
|
|
18
18
|
kn.displayName = "Checkbox";
|
|
19
19
|
vn.displayName = "Fieldset";
|
|
20
|
-
const
|
|
21
|
-
function
|
|
20
|
+
const Ma = ct;
|
|
21
|
+
function Se(t) {
|
|
22
22
|
return (e = {}) => {
|
|
23
23
|
const s = e.width ? String(e.width) : t.defaultWidth;
|
|
24
24
|
return t.formats[s] || t.formats[t.defaultWidth];
|
|
25
25
|
};
|
|
26
26
|
}
|
|
27
|
-
function
|
|
27
|
+
function fe(t) {
|
|
28
28
|
return (e, s) => {
|
|
29
|
-
const
|
|
30
|
-
let
|
|
31
|
-
if (
|
|
32
|
-
const u = t.defaultFormattingWidth || t.defaultWidth,
|
|
33
|
-
|
|
29
|
+
const p = s != null && s.context ? String(s.context) : "standalone";
|
|
30
|
+
let k;
|
|
31
|
+
if (p === "formatting" && t.formattingValues) {
|
|
32
|
+
const u = t.defaultFormattingWidth || t.defaultWidth, x = s != null && s.width ? String(s.width) : u;
|
|
33
|
+
k = t.formattingValues[x] || t.formattingValues[u];
|
|
34
34
|
} else {
|
|
35
|
-
const u = t.defaultWidth,
|
|
36
|
-
|
|
35
|
+
const u = t.defaultWidth, x = s != null && s.width ? String(s.width) : t.defaultWidth;
|
|
36
|
+
k = t.values[x] || t.values[u];
|
|
37
37
|
}
|
|
38
|
-
const
|
|
39
|
-
return
|
|
38
|
+
const y = t.argumentCallback ? t.argumentCallback(e) : e;
|
|
39
|
+
return k[y];
|
|
40
40
|
};
|
|
41
41
|
}
|
|
42
|
-
function
|
|
42
|
+
function ke(t) {
|
|
43
43
|
return (e, s = {}) => {
|
|
44
|
-
const
|
|
45
|
-
if (!
|
|
44
|
+
const p = s.width, k = p && t.matchPatterns[p] || t.matchPatterns[t.defaultMatchWidth], y = e.match(k);
|
|
45
|
+
if (!y)
|
|
46
46
|
return null;
|
|
47
|
-
const u =
|
|
47
|
+
const u = y[0], x = p && t.parsePatterns[p] || t.parsePatterns[t.defaultParseWidth], F = Array.isArray(x) ? yn(x, (w) => w.test(u)) : (
|
|
48
48
|
// [TODO] -- I challenge you to fix the type
|
|
49
|
-
bn(
|
|
49
|
+
bn(x, (w) => w.test(u))
|
|
50
50
|
);
|
|
51
51
|
let C;
|
|
52
52
|
C = t.valueCallback ? t.valueCallback(F) : F, C = s.valueCallback ? (
|
|
53
53
|
// [TODO] -- I challenge you to fix the type
|
|
54
54
|
s.valueCallback(C)
|
|
55
55
|
) : C;
|
|
56
|
-
const
|
|
57
|
-
return { value: C, rest:
|
|
56
|
+
const U = e.slice(u.length);
|
|
57
|
+
return { value: C, rest: U };
|
|
58
58
|
};
|
|
59
59
|
}
|
|
60
60
|
function bn(t, e) {
|
|
@@ -69,14 +69,14 @@ function yn(t, e) {
|
|
|
69
69
|
}
|
|
70
70
|
function xn(t) {
|
|
71
71
|
return (e, s = {}) => {
|
|
72
|
-
const
|
|
73
|
-
if (!
|
|
74
|
-
const
|
|
75
|
-
if (!
|
|
76
|
-
let u = t.valueCallback ? t.valueCallback(
|
|
72
|
+
const p = e.match(t.matchPattern);
|
|
73
|
+
if (!p) return null;
|
|
74
|
+
const k = p[0], y = e.match(t.parsePattern);
|
|
75
|
+
if (!y) return null;
|
|
76
|
+
let u = t.valueCallback ? t.valueCallback(y[0]) : y[0];
|
|
77
77
|
u = s.valueCallback ? s.valueCallback(u) : u;
|
|
78
|
-
const
|
|
79
|
-
return { value: u, rest:
|
|
78
|
+
const x = e.slice(k.length);
|
|
79
|
+
return { value: u, rest: x };
|
|
80
80
|
};
|
|
81
81
|
}
|
|
82
82
|
const Tn = {
|
|
@@ -142,9 +142,9 @@ const Tn = {
|
|
|
142
142
|
other: "nesten {{count}} år"
|
|
143
143
|
}
|
|
144
144
|
}, Cn = (t, e, s) => {
|
|
145
|
-
let
|
|
146
|
-
const
|
|
147
|
-
return typeof
|
|
145
|
+
let p;
|
|
146
|
+
const k = Tn[t];
|
|
147
|
+
return typeof k == "string" ? p = k : e === 1 ? p = k.one : p = k.other.replace("{{count}}", String(e)), s != null && s.addSuffix ? s.comparison && s.comparison > 0 ? "om " + p : p + " siden" : p;
|
|
148
148
|
}, wn = {
|
|
149
149
|
full: "EEEE d. MMMM y",
|
|
150
150
|
long: "d. MMMM y",
|
|
@@ -161,15 +161,15 @@ const Tn = {
|
|
|
161
161
|
medium: "{{date}} {{time}}",
|
|
162
162
|
short: "{{date}} {{time}}"
|
|
163
163
|
}, _n = {
|
|
164
|
-
date:
|
|
164
|
+
date: Se({
|
|
165
165
|
formats: wn,
|
|
166
166
|
defaultWidth: "full"
|
|
167
167
|
}),
|
|
168
|
-
time:
|
|
168
|
+
time: Se({
|
|
169
169
|
formats: Sn,
|
|
170
170
|
defaultWidth: "full"
|
|
171
171
|
}),
|
|
172
|
-
dateTime:
|
|
172
|
+
dateTime: Se({
|
|
173
173
|
formats: In,
|
|
174
174
|
defaultWidth: "full"
|
|
175
175
|
})
|
|
@@ -180,7 +180,7 @@ const Tn = {
|
|
|
180
180
|
tomorrow: "'i morgen kl.' p",
|
|
181
181
|
nextWeek: "EEEE 'kl.' p",
|
|
182
182
|
other: "P"
|
|
183
|
-
}, An = (t, e, s,
|
|
183
|
+
}, An = (t, e, s, p) => Dn[t], Ln = {
|
|
184
184
|
narrow: ["f.Kr.", "e.Kr."],
|
|
185
185
|
abbreviated: ["f.Kr.", "e.Kr."],
|
|
186
186
|
wide: ["før Kristus", "etter Kristus"]
|
|
@@ -264,28 +264,28 @@ const Tn = {
|
|
|
264
264
|
}
|
|
265
265
|
}, En = (t, e) => Number(t) + ".", Bn = {
|
|
266
266
|
ordinalNumber: En,
|
|
267
|
-
era:
|
|
267
|
+
era: fe({
|
|
268
268
|
values: Ln,
|
|
269
269
|
defaultWidth: "wide"
|
|
270
270
|
}),
|
|
271
|
-
quarter:
|
|
271
|
+
quarter: fe({
|
|
272
272
|
values: Nn,
|
|
273
273
|
defaultWidth: "wide",
|
|
274
274
|
argumentCallback: (t) => t - 1
|
|
275
275
|
}),
|
|
276
|
-
month:
|
|
276
|
+
month: fe({
|
|
277
277
|
values: Mn,
|
|
278
278
|
defaultWidth: "wide"
|
|
279
279
|
}),
|
|
280
|
-
day:
|
|
280
|
+
day: fe({
|
|
281
281
|
values: jn,
|
|
282
282
|
defaultWidth: "wide"
|
|
283
283
|
}),
|
|
284
|
-
dayPeriod:
|
|
284
|
+
dayPeriod: fe({
|
|
285
285
|
values: Fn,
|
|
286
286
|
defaultWidth: "wide"
|
|
287
287
|
})
|
|
288
|
-
}, zn = /^(\d+)\.?/i,
|
|
288
|
+
}, zn = /^(\d+)\.?/i, Pn = /\d+/i, $n = {
|
|
289
289
|
narrow: /^(f\.? ?Kr\.?|fvt\.?|e\.? ?Kr\.?|evt\.?)/i,
|
|
290
290
|
abbreviated: /^(f\.? ?Kr\.?|fvt\.?|e\.? ?Kr\.?|evt\.?)/i,
|
|
291
291
|
wide: /^(før Kristus|før vår tid|etter Kristus|vår tid)/i
|
|
@@ -354,41 +354,41 @@ const Tn = {
|
|
|
354
354
|
}, Yn = {
|
|
355
355
|
ordinalNumber: xn({
|
|
356
356
|
matchPattern: zn,
|
|
357
|
-
parsePattern:
|
|
357
|
+
parsePattern: Pn,
|
|
358
358
|
valueCallback: (t) => parseInt(t, 10)
|
|
359
359
|
}),
|
|
360
|
-
era:
|
|
361
|
-
matchPatterns:
|
|
360
|
+
era: ke({
|
|
361
|
+
matchPatterns: $n,
|
|
362
362
|
defaultMatchWidth: "wide",
|
|
363
363
|
parsePatterns: Rn,
|
|
364
364
|
defaultParseWidth: "any"
|
|
365
365
|
}),
|
|
366
|
-
quarter:
|
|
366
|
+
quarter: ke({
|
|
367
367
|
matchPatterns: Gn,
|
|
368
368
|
defaultMatchWidth: "wide",
|
|
369
369
|
parsePatterns: Wn,
|
|
370
370
|
defaultParseWidth: "any",
|
|
371
371
|
valueCallback: (t) => t + 1
|
|
372
372
|
}),
|
|
373
|
-
month:
|
|
373
|
+
month: ke({
|
|
374
374
|
matchPatterns: Hn,
|
|
375
375
|
defaultMatchWidth: "wide",
|
|
376
376
|
parsePatterns: Un,
|
|
377
377
|
defaultParseWidth: "any"
|
|
378
378
|
}),
|
|
379
|
-
day:
|
|
379
|
+
day: ke({
|
|
380
380
|
matchPatterns: Vn,
|
|
381
381
|
defaultMatchWidth: "wide",
|
|
382
382
|
parsePatterns: On,
|
|
383
383
|
defaultParseWidth: "any"
|
|
384
384
|
}),
|
|
385
|
-
dayPeriod:
|
|
385
|
+
dayPeriod: ke({
|
|
386
386
|
matchPatterns: Kn,
|
|
387
387
|
defaultMatchWidth: "any",
|
|
388
388
|
parsePatterns: qn,
|
|
389
389
|
defaultParseWidth: "any"
|
|
390
390
|
})
|
|
391
|
-
},
|
|
391
|
+
}, ge = {
|
|
392
392
|
code: "nb",
|
|
393
393
|
formatDistance: Cn,
|
|
394
394
|
formatLong: _n,
|
|
@@ -451,7 +451,7 @@ const Ke = ({ title: t, ...e }) => /* @__PURE__ */ r(
|
|
|
451
451
|
}
|
|
452
452
|
);
|
|
453
453
|
Ke.displayName = "ChevronRightIcon";
|
|
454
|
-
const Zn = "_calendarContainer_htlea_1", Xn = "_calendarHeader_htlea_16", Jn = "_monthYear_htlea_23", Qn = "_navigationButtons_htlea_34", eo = "_grid_htlea_43", to = "_dayNameCell_htlea_51", no = "_dateCell_htlea_69", oo = "_dateNumberContainer_htlea_95", ro = "_otherMonth_htlea_108", so = "_disabled_htlea_108", ao = "_selectedDate_htlea_134",
|
|
454
|
+
const Zn = "_calendarContainer_htlea_1", Xn = "_calendarHeader_htlea_16", Jn = "_monthYear_htlea_23", Qn = "_navigationButtons_htlea_34", eo = "_grid_htlea_43", to = "_dayNameCell_htlea_51", no = "_dateCell_htlea_69", oo = "_dateNumberContainer_htlea_95", ro = "_otherMonth_htlea_108", so = "_disabled_htlea_108", ao = "_selectedDate_htlea_134", J = {
|
|
455
455
|
calendarContainer: Zn,
|
|
456
456
|
calendarHeader: Xn,
|
|
457
457
|
monthYear: Jn,
|
|
@@ -530,6 +530,34 @@ const Zn = "_calendarContainer_htlea_1", Xn = "_calendarHeader_htlea_16", Jn = "
|
|
|
530
530
|
featureFont: "Source Sans 3 inkludert",
|
|
531
531
|
featureComponent: "Nye komponentvarianter",
|
|
532
532
|
featureSeeAll: "Se alle oppdateringer",
|
|
533
|
+
// Interactive Showcase
|
|
534
|
+
showcase: {
|
|
535
|
+
eyebrow: "Designsystemet i bruk",
|
|
536
|
+
title: "Fra idé til kode",
|
|
537
|
+
lead: "Designsystemet fungerer både i Figma og i React. Se hvordan en komponent settes sammen visuelt, og hvordan den samme komposisjonen skrives ut i kode.",
|
|
538
|
+
designRow: {
|
|
539
|
+
kicker: "01 · Design",
|
|
540
|
+
heading: "Komponér visuelt",
|
|
541
|
+
body: "Alle komponentene finnes som ferdige byggeklosser i Figma. Dra dem inn på lerretet, kombinér dem, og finn et uttrykk som fungerer — før en eneste linje kode er skrevet."
|
|
542
|
+
},
|
|
543
|
+
codeRow: {
|
|
544
|
+
kicker: "02 · Kode",
|
|
545
|
+
heading: "Samme komposisjon i React",
|
|
546
|
+
body: "Det du bygger i Figma kan gjenskapes i React med de samme komponentene. Props, tokens og struktur er delt mellom de to verdenene, så designet og koden holder seg i takt."
|
|
547
|
+
},
|
|
548
|
+
canvasTitle: "Lerret",
|
|
549
|
+
fileName: "ProfileCard.tsx",
|
|
550
|
+
palette: {
|
|
551
|
+
title: "Komponenter",
|
|
552
|
+
avatar: "Avatar",
|
|
553
|
+
heading: "Overskrift",
|
|
554
|
+
button: "Button",
|
|
555
|
+
tag: "Tag"
|
|
556
|
+
},
|
|
557
|
+
labels: {
|
|
558
|
+
save: "Lagre"
|
|
559
|
+
}
|
|
560
|
+
},
|
|
533
561
|
// Visual elements (cards)
|
|
534
562
|
profile: "Profil",
|
|
535
563
|
name: "Navn Navnesen",
|
|
@@ -1418,6 +1446,23 @@ Map design elements to our existing components where possible (e.g. Buttons, Hea
|
|
|
1418
1446
|
githubIssuesLink: "https://github.com/norwegianredcross/DesignSystem/issues"
|
|
1419
1447
|
}
|
|
1420
1448
|
},
|
|
1449
|
+
// Tokens Page
|
|
1450
|
+
tokensPage: {
|
|
1451
|
+
title: "Designtokens",
|
|
1452
|
+
description: "Alle designtokens tilgjengelig fra theme.css. Disse CSS-variablene kan brukes i hele applikasjonen.",
|
|
1453
|
+
categoriesLabel: "Kategorier",
|
|
1454
|
+
categories: {
|
|
1455
|
+
colors: "Farger",
|
|
1456
|
+
sizes: "Størrelser og avstand",
|
|
1457
|
+
typography: "Typografi",
|
|
1458
|
+
borders: "Kantlinjer",
|
|
1459
|
+
shadows: "Skygger",
|
|
1460
|
+
effects: "Effekter",
|
|
1461
|
+
other: "Annet"
|
|
1462
|
+
},
|
|
1463
|
+
copyTokenLabel: "Kopier {name} til utklippstavlen",
|
|
1464
|
+
colorPreviewLabel: "Fargeforhåndsvisning: {value}"
|
|
1465
|
+
},
|
|
1421
1466
|
// Footer
|
|
1422
1467
|
footer: {
|
|
1423
1468
|
shortcuts: "Snarveier",
|
|
@@ -1526,6 +1571,34 @@ Map design elements to our existing components where possible (e.g. Buttons, Hea
|
|
|
1526
1571
|
featureFont: "Source Sans 3 included",
|
|
1527
1572
|
featureComponent: "New component variants",
|
|
1528
1573
|
featureSeeAll: "See all updates",
|
|
1574
|
+
// Interactive Showcase
|
|
1575
|
+
showcase: {
|
|
1576
|
+
eyebrow: "The design system in action",
|
|
1577
|
+
title: "From idea to code",
|
|
1578
|
+
lead: "The design system works in both Figma and React. Watch how a component gets assembled visually, and how the same composition is written out in code.",
|
|
1579
|
+
designRow: {
|
|
1580
|
+
kicker: "01 · Design",
|
|
1581
|
+
heading: "Compose visually",
|
|
1582
|
+
body: "Every component ships as a ready-made building block in Figma. Drag them onto the canvas, combine them, and find the right expression — before a single line of code is written."
|
|
1583
|
+
},
|
|
1584
|
+
codeRow: {
|
|
1585
|
+
kicker: "02 · Code",
|
|
1586
|
+
heading: "The same composition in React",
|
|
1587
|
+
body: "What you build in Figma can be recreated in React with the exact same components. Props, tokens and structure are shared between both worlds, so design and code stay in lockstep."
|
|
1588
|
+
},
|
|
1589
|
+
canvasTitle: "Canvas",
|
|
1590
|
+
fileName: "ProfileCard.tsx",
|
|
1591
|
+
palette: {
|
|
1592
|
+
title: "Components",
|
|
1593
|
+
avatar: "Avatar",
|
|
1594
|
+
heading: "Heading",
|
|
1595
|
+
button: "Button",
|
|
1596
|
+
tag: "Tag"
|
|
1597
|
+
},
|
|
1598
|
+
labels: {
|
|
1599
|
+
save: "Save"
|
|
1600
|
+
}
|
|
1601
|
+
},
|
|
1529
1602
|
// Visual elements (cards)
|
|
1530
1603
|
profile: "Profile",
|
|
1531
1604
|
name: "Name Namerson",
|
|
@@ -2416,6 +2489,23 @@ Map design elements to our existing components where possible (e.g. Buttons, Hea
|
|
|
2416
2489
|
githubIssuesLink: "https://github.com/norwegianredcross/DesignSystem/issues"
|
|
2417
2490
|
}
|
|
2418
2491
|
},
|
|
2492
|
+
// Tokens Page
|
|
2493
|
+
tokensPage: {
|
|
2494
|
+
title: "Design Tokens",
|
|
2495
|
+
description: "All design tokens available from theme.css. These CSS custom properties can be used throughout your application.",
|
|
2496
|
+
categoriesLabel: "Categories",
|
|
2497
|
+
categories: {
|
|
2498
|
+
colors: "Colors",
|
|
2499
|
+
sizes: "Sizes & Spacing",
|
|
2500
|
+
typography: "Typography",
|
|
2501
|
+
borders: "Borders",
|
|
2502
|
+
shadows: "Shadows",
|
|
2503
|
+
effects: "Effects",
|
|
2504
|
+
other: "Other"
|
|
2505
|
+
},
|
|
2506
|
+
copyTokenLabel: "Copy {name} to clipboard",
|
|
2507
|
+
colorPreviewLabel: "Color preview: {value}"
|
|
2508
|
+
},
|
|
2419
2509
|
// Footer
|
|
2420
2510
|
footer: {
|
|
2421
2511
|
shortcuts: "Shortcuts",
|
|
@@ -2458,25 +2548,25 @@ Map design elements to our existing components where possible (e.g. Buttons, Hea
|
|
|
2458
2548
|
openDatePicker: "Open date picker"
|
|
2459
2549
|
}
|
|
2460
2550
|
}
|
|
2461
|
-
},
|
|
2462
|
-
const [e, s] =
|
|
2463
|
-
const
|
|
2551
|
+
}, Le = Ze(void 0), ja = ({ children: t }) => {
|
|
2552
|
+
const [e, s] = q("NO"), p = (k) => {
|
|
2553
|
+
const y = k.split(".");
|
|
2464
2554
|
let u = io[e];
|
|
2465
|
-
for (const
|
|
2466
|
-
if (u[
|
|
2467
|
-
return console.warn(`Translation missing for key: ${
|
|
2468
|
-
u = u[
|
|
2555
|
+
for (const x of y) {
|
|
2556
|
+
if (u[x] === void 0)
|
|
2557
|
+
return console.warn(`Translation missing for key: ${k} in language: ${e}`), k;
|
|
2558
|
+
u = u[x];
|
|
2469
2559
|
}
|
|
2470
2560
|
return u;
|
|
2471
2561
|
};
|
|
2472
|
-
return /* @__PURE__ */ n(
|
|
2473
|
-
},
|
|
2474
|
-
const t = Ge(
|
|
2562
|
+
return /* @__PURE__ */ n(Le.Provider, { value: { language: e, setLanguage: s, t: p }, children: t });
|
|
2563
|
+
}, Fa = () => {
|
|
2564
|
+
const t = Ge(Le);
|
|
2475
2565
|
if (t === void 0)
|
|
2476
2566
|
throw new Error("useLanguage must be used within a LanguageProvider");
|
|
2477
2567
|
return t;
|
|
2478
|
-
},
|
|
2479
|
-
const t = Ge(
|
|
2568
|
+
}, ye = () => {
|
|
2569
|
+
const t = Ge(Le);
|
|
2480
2570
|
return t === void 0 ? {
|
|
2481
2571
|
language: "NO",
|
|
2482
2572
|
setLanguage: () => {
|
|
@@ -2537,111 +2627,111 @@ Map design elements to our existing components where possible (e.g. Buttons, Hea
|
|
|
2537
2627
|
})[e] || e
|
|
2538
2628
|
} : t;
|
|
2539
2629
|
}, lo = (t) => {
|
|
2540
|
-
const e =
|
|
2541
|
-
return ln({ start: s, end:
|
|
2630
|
+
const e = me(t), s = He(e, { locale: ge }), p = Ue(s, 41);
|
|
2631
|
+
return ln({ start: s, end: p });
|
|
2542
2632
|
}, Ee = (t) => t && t.charAt(0).toUpperCase() + t.slice(1), co = ({
|
|
2543
2633
|
initialDate: t = /* @__PURE__ */ new Date(),
|
|
2544
2634
|
selectedDate: e = null,
|
|
2545
2635
|
// Prop for valgt dato
|
|
2546
2636
|
onDateSelect: s,
|
|
2547
|
-
"data-color":
|
|
2637
|
+
"data-color": p,
|
|
2548
2638
|
// <-- Destrukturert
|
|
2549
|
-
"data-size":
|
|
2639
|
+
"data-size": k
|
|
2550
2640
|
// <-- Destrukturert
|
|
2551
2641
|
}) => {
|
|
2552
|
-
const { t:
|
|
2553
|
-
|
|
2642
|
+
const { t: y } = ye();
|
|
2643
|
+
z(() => {
|
|
2554
2644
|
const d = "rk-datepicker-inline-styles";
|
|
2555
2645
|
if (typeof document > "u" || document.getElementById(d)) return;
|
|
2556
|
-
const
|
|
2557
|
-
|
|
2646
|
+
const A = po(J), S = document.createElement("style");
|
|
2647
|
+
S.id = d, S.textContent = A, document.head.appendChild(S);
|
|
2558
2648
|
}, []);
|
|
2559
|
-
const [u,
|
|
2560
|
-
|
|
2649
|
+
const [u, x] = q(
|
|
2650
|
+
me(e && we(e) ? e : t)
|
|
2561
2651
|
);
|
|
2562
|
-
|
|
2563
|
-
if (e &&
|
|
2564
|
-
const d =
|
|
2565
|
-
Ne(d, u) ||
|
|
2652
|
+
z(() => {
|
|
2653
|
+
if (e && we(e)) {
|
|
2654
|
+
const d = me(e);
|
|
2655
|
+
Ne(d, u) || x(d);
|
|
2566
2656
|
}
|
|
2567
2657
|
}, [e]);
|
|
2568
|
-
const F =
|
|
2658
|
+
const F = ue(() => me(/* @__PURE__ */ new Date()), []), C = ue(() => !1, [u, F]), U = ue(
|
|
2569
2659
|
() => lo(u),
|
|
2570
2660
|
[u]
|
|
2571
|
-
),
|
|
2572
|
-
const d = He(/* @__PURE__ */ new Date(), { locale:
|
|
2573
|
-
return Array.from({ length: 7 }).map((
|
|
2574
|
-
const
|
|
2575
|
-
return Ee(
|
|
2661
|
+
), w = ue(() => {
|
|
2662
|
+
const d = He(/* @__PURE__ */ new Date(), { locale: ge });
|
|
2663
|
+
return Array.from({ length: 7 }).map((A, S) => {
|
|
2664
|
+
const R = he(Ue(d, S), "EEEEEE", { locale: ge });
|
|
2665
|
+
return Ee(R);
|
|
2576
2666
|
});
|
|
2577
|
-
}, []), P =
|
|
2578
|
-
C ||
|
|
2579
|
-
}, [C]),
|
|
2580
|
-
|
|
2581
|
-
}, []), l =
|
|
2667
|
+
}, []), P = oe(() => {
|
|
2668
|
+
C || x((d) => me(on(d, 1)));
|
|
2669
|
+
}, [C]), j = oe(() => {
|
|
2670
|
+
x((d) => me(rn(d, 1)));
|
|
2671
|
+
}, []), l = oe(
|
|
2582
2672
|
(d) => {
|
|
2583
2673
|
s && s(d);
|
|
2584
2674
|
},
|
|
2585
2675
|
[s]
|
|
2586
|
-
),
|
|
2587
|
-
(d,
|
|
2588
|
-
(d.key === "Enter" || d.key === " ") && (d.preventDefault(), l(
|
|
2676
|
+
), Q = oe(
|
|
2677
|
+
(d, A) => {
|
|
2678
|
+
(d.key === "Enter" || d.key === " ") && (d.preventDefault(), l(A));
|
|
2589
2679
|
},
|
|
2590
2680
|
[l]
|
|
2591
|
-
),
|
|
2681
|
+
), $ = he(u, "MMMM", { locale: ge }), E = he(u, "yyyy", { locale: ge }), Z = `${Ee($)} ${E}`;
|
|
2592
2682
|
return /* @__PURE__ */ r(
|
|
2593
2683
|
"div",
|
|
2594
2684
|
{
|
|
2595
|
-
className:
|
|
2596
|
-
"data-color":
|
|
2597
|
-
"data-size":
|
|
2685
|
+
className: J.calendarContainer,
|
|
2686
|
+
"data-color": p,
|
|
2687
|
+
"data-size": k,
|
|
2598
2688
|
children: [
|
|
2599
|
-
/* @__PURE__ */ r("div", { className:
|
|
2600
|
-
/* @__PURE__ */ n("span", { className:
|
|
2601
|
-
/* @__PURE__ */ r("div", { className:
|
|
2689
|
+
/* @__PURE__ */ r("div", { className: J.calendarHeader, children: [
|
|
2690
|
+
/* @__PURE__ */ n("span", { className: J.monthYear, children: Z }),
|
|
2691
|
+
/* @__PURE__ */ r("div", { className: J.navigationButtons, children: [
|
|
2602
2692
|
/* @__PURE__ */ n(
|
|
2603
|
-
|
|
2693
|
+
Ae,
|
|
2604
2694
|
{
|
|
2605
2695
|
variant: "tertiary",
|
|
2606
2696
|
icon: !0,
|
|
2607
2697
|
onClick: P,
|
|
2608
|
-
"aria-label":
|
|
2698
|
+
"aria-label": y("datePicker.previousMonth"),
|
|
2609
2699
|
disabled: C,
|
|
2610
2700
|
children: /* @__PURE__ */ n(Oe, {})
|
|
2611
2701
|
}
|
|
2612
2702
|
),
|
|
2613
2703
|
/* @__PURE__ */ n(
|
|
2614
|
-
|
|
2704
|
+
Ae,
|
|
2615
2705
|
{
|
|
2616
2706
|
variant: "tertiary",
|
|
2617
2707
|
icon: !0,
|
|
2618
|
-
onClick:
|
|
2619
|
-
"aria-label":
|
|
2708
|
+
onClick: j,
|
|
2709
|
+
"aria-label": y("datePicker.nextMonth"),
|
|
2620
2710
|
children: /* @__PURE__ */ n(Ke, {})
|
|
2621
2711
|
}
|
|
2622
2712
|
)
|
|
2623
2713
|
] })
|
|
2624
2714
|
] }),
|
|
2625
|
-
/* @__PURE__ */ n("div", { className:
|
|
2626
|
-
/* @__PURE__ */ n("div", { className:
|
|
2627
|
-
const
|
|
2628
|
-
|
|
2629
|
-
|
|
2630
|
-
|
|
2715
|
+
/* @__PURE__ */ n("div", { className: J.grid, children: w.map((d) => /* @__PURE__ */ n("div", { className: J.dayNameCell, children: d }, d)) }),
|
|
2716
|
+
/* @__PURE__ */ n("div", { className: J.grid, children: U.map((d) => {
|
|
2717
|
+
const A = Ne(d, u), S = e && we(e) && sn(d, e), R = an(d), L = [
|
|
2718
|
+
J.dateCell,
|
|
2719
|
+
A ? "" : J.otherMonth,
|
|
2720
|
+
S ? J.selectedDate : "",
|
|
2631
2721
|
// Utheving basert på prop
|
|
2632
|
-
|
|
2722
|
+
R && !S ? J.todayDate : ""
|
|
2633
2723
|
].filter(Boolean).join(" ");
|
|
2634
2724
|
return /* @__PURE__ */ n(
|
|
2635
2725
|
"div",
|
|
2636
2726
|
{
|
|
2637
|
-
className:
|
|
2727
|
+
className: L,
|
|
2638
2728
|
onClick: () => l(d),
|
|
2639
|
-
onKeyDown: (
|
|
2729
|
+
onKeyDown: (O) => Q(O, d),
|
|
2640
2730
|
role: "button",
|
|
2641
2731
|
tabIndex: 0,
|
|
2642
|
-
"aria-pressed":
|
|
2643
|
-
"aria-label":
|
|
2644
|
-
children: /* @__PURE__ */ n("span", { className:
|
|
2732
|
+
"aria-pressed": S ?? !1,
|
|
2733
|
+
"aria-label": he(d, "PPP", { locale: ge }),
|
|
2734
|
+
children: /* @__PURE__ */ n("span", { className: J.dateNumberContainer, children: he(d, "d") })
|
|
2645
2735
|
},
|
|
2646
2736
|
d.toISOString()
|
|
2647
2737
|
);
|
|
@@ -2811,7 +2901,7 @@ function po(t) {
|
|
|
2811
2901
|
}
|
|
2812
2902
|
`;
|
|
2813
2903
|
}
|
|
2814
|
-
const mo = "_fieldset_16fx7_2", go = "_description_16fx7_14", uo = "_error_16fx7_21", ho = "_inputWrapper_16fx7_30", fo = "_inputWrapperError_16fx7_42", ko = "_suffixButton_16fx7_80", vo = "_suffixButtonInteractive_16fx7_100",
|
|
2904
|
+
const mo = "_fieldset_16fx7_2", go = "_description_16fx7_14", uo = "_error_16fx7_21", ho = "_inputWrapper_16fx7_30", fo = "_inputWrapperError_16fx7_42", ko = "_suffixButton_16fx7_80", vo = "_suffixButtonInteractive_16fx7_100", ae = {
|
|
2815
2905
|
fieldset: mo,
|
|
2816
2906
|
description: go,
|
|
2817
2907
|
error: uo,
|
|
@@ -2820,9 +2910,9 @@ const mo = "_fieldset_16fx7_2", go = "_description_16fx7_14", uo = "_error_16fx7
|
|
|
2820
2910
|
suffixButton: ko,
|
|
2821
2911
|
suffixButtonInteractive: vo
|
|
2822
2912
|
}, Be = (t) => {
|
|
2823
|
-
const e = t.slice(0, 2), s = t.slice(2, 4),
|
|
2824
|
-
return t.length > 4 ? `${e}.${s}.${
|
|
2825
|
-
}, ze = (t) => (t || "").replace(/\D/g, ""),
|
|
2913
|
+
const e = t.slice(0, 2), s = t.slice(2, 4), p = t.slice(4, 8);
|
|
2914
|
+
return t.length > 4 ? `${e}.${s}.${p}` : t.length > 2 ? `${e}.${s}` : t.length > 0 ? e : "";
|
|
2915
|
+
}, ze = (t) => (t || "").replace(/\D/g, ""), Pe = (t) => {
|
|
2826
2916
|
let e = t;
|
|
2827
2917
|
if (e.length >= 2) {
|
|
2828
2918
|
const s = parseInt(e.substring(0, 2), 10);
|
|
@@ -2833,153 +2923,153 @@ const mo = "_fieldset_16fx7_2", go = "_description_16fx7_14", uo = "_error_16fx7
|
|
|
2833
2923
|
!isNaN(s) && s > 12 && (e = e.substring(0, 2) + "12" + e.substring(4));
|
|
2834
2924
|
}
|
|
2835
2925
|
return e.slice(0, 8);
|
|
2836
|
-
}, bo =
|
|
2926
|
+
}, bo = re(
|
|
2837
2927
|
(t, e) => {
|
|
2838
|
-
const { t: s } =
|
|
2839
|
-
|
|
2840
|
-
const
|
|
2841
|
-
if (typeof document > "u" || document.getElementById(
|
|
2842
|
-
const
|
|
2843
|
-
|
|
2928
|
+
const { t: s } = ye();
|
|
2929
|
+
z(() => {
|
|
2930
|
+
const M = "rk-dateinput-inline-styles";
|
|
2931
|
+
if (typeof document > "u" || document.getElementById(M)) return;
|
|
2932
|
+
const se = yo(ae), te = document.createElement("style");
|
|
2933
|
+
te.id = M, te.textContent = se, document.head.appendChild(te);
|
|
2844
2934
|
}, []);
|
|
2845
2935
|
const {
|
|
2846
|
-
label:
|
|
2847
|
-
suffixIcon:
|
|
2848
|
-
onSuffixClick:
|
|
2936
|
+
label: p,
|
|
2937
|
+
suffixIcon: k,
|
|
2938
|
+
onSuffixClick: y,
|
|
2849
2939
|
className: u,
|
|
2850
2940
|
// For ytre fieldset
|
|
2851
|
-
inputWrapperClassName:
|
|
2941
|
+
inputWrapperClassName: x,
|
|
2852
2942
|
// For input wrapper div
|
|
2853
2943
|
inputClassName: F,
|
|
2854
2944
|
// For selve input-elementet
|
|
2855
2945
|
value: C,
|
|
2856
|
-
defaultValue:
|
|
2857
|
-
onChange:
|
|
2946
|
+
defaultValue: U,
|
|
2947
|
+
onChange: w,
|
|
2858
2948
|
readOnly: P,
|
|
2859
|
-
placeholder:
|
|
2949
|
+
placeholder: j = "dd.mm.åååå",
|
|
2860
2950
|
id: l,
|
|
2861
|
-
name:
|
|
2862
|
-
required:
|
|
2951
|
+
name: Q,
|
|
2952
|
+
required: $,
|
|
2863
2953
|
disabled: E,
|
|
2864
|
-
onClick:
|
|
2954
|
+
onClick: Z,
|
|
2865
2955
|
onFocus: d,
|
|
2866
2956
|
// Send ekstern onFocus videre
|
|
2867
|
-
onBlur:
|
|
2957
|
+
onBlur: A,
|
|
2868
2958
|
// Send ekstern onBlur videre
|
|
2869
|
-
autoComplete:
|
|
2870
|
-
"aria-label":
|
|
2871
|
-
"aria-labelledby":
|
|
2872
|
-
description:
|
|
2873
|
-
error:
|
|
2959
|
+
autoComplete: S = "off",
|
|
2960
|
+
"aria-label": R,
|
|
2961
|
+
"aria-labelledby": L,
|
|
2962
|
+
description: O,
|
|
2963
|
+
error: G,
|
|
2874
2964
|
// Bruk error-prop for styling
|
|
2875
|
-
"data-color":
|
|
2965
|
+
"data-color": K,
|
|
2876
2966
|
// <-- Destrukturering
|
|
2877
|
-
"data-size":
|
|
2967
|
+
"data-size": _,
|
|
2878
2968
|
// <-- Destrukturering
|
|
2879
|
-
...
|
|
2880
|
-
} = t,
|
|
2881
|
-
|
|
2969
|
+
...ee
|
|
2970
|
+
} = t, c = C !== void 0, v = Xe(null);
|
|
2971
|
+
De.useImperativeHandle(
|
|
2882
2972
|
e,
|
|
2883
|
-
() =>
|
|
2973
|
+
() => v.current
|
|
2884
2974
|
);
|
|
2885
|
-
const
|
|
2886
|
-
(
|
|
2887
|
-
const
|
|
2888
|
-
return Be(
|
|
2975
|
+
const h = oe(
|
|
2976
|
+
(M) => {
|
|
2977
|
+
const se = ze(M), te = Pe(se);
|
|
2978
|
+
return Be(te);
|
|
2889
2979
|
},
|
|
2890
2980
|
[]
|
|
2891
|
-
), [
|
|
2892
|
-
() =>
|
|
2981
|
+
), [T, Y] = q(
|
|
2982
|
+
() => h(C ?? U)
|
|
2893
2983
|
);
|
|
2894
|
-
|
|
2895
|
-
if (
|
|
2896
|
-
const
|
|
2897
|
-
|
|
2984
|
+
z(() => {
|
|
2985
|
+
if (c) {
|
|
2986
|
+
const M = h(C);
|
|
2987
|
+
M !== T && (Y(M), v.current && v.current.value !== M && (v.current.value = M));
|
|
2898
2988
|
}
|
|
2899
|
-
}, [C,
|
|
2900
|
-
const
|
|
2901
|
-
(
|
|
2902
|
-
const
|
|
2903
|
-
let
|
|
2904
|
-
const
|
|
2905
|
-
|
|
2906
|
-
if (
|
|
2989
|
+
}, [C, c, T, h]);
|
|
2990
|
+
const le = oe(
|
|
2991
|
+
(M) => {
|
|
2992
|
+
const se = M.target, te = se.value, Ce = T, i = ze(te).slice(0, 8), g = Pe(i), b = Be(g);
|
|
2993
|
+
let W = 0;
|
|
2994
|
+
const ce = g.length;
|
|
2995
|
+
ce <= 2 ? W = ce : ce <= 4 ? W = ce + 1 : W = ce + 2, W = Math.min(W, b.length), requestAnimationFrame(() => {
|
|
2996
|
+
if (v.current && (Y(b), v.current.value = b, v.current.setSelectionRange(W, W), (b !== Ce || c) && w)) {
|
|
2907
2997
|
const Ye = {
|
|
2908
|
-
...
|
|
2909
|
-
target: { ...
|
|
2998
|
+
...M,
|
|
2999
|
+
target: { ...se, value: b }
|
|
2910
3000
|
};
|
|
2911
|
-
|
|
3001
|
+
w(Ye, b);
|
|
2912
3002
|
}
|
|
2913
3003
|
});
|
|
2914
3004
|
},
|
|
2915
|
-
[
|
|
2916
|
-
),
|
|
2917
|
-
|
|
2918
|
-
|
|
2919
|
-
|
|
2920
|
-
].filter(Boolean).join(" "),
|
|
3005
|
+
[T, c, w, h]
|
|
3006
|
+
), I = [ae.fieldset, u].filter(Boolean).join(" "), D = [
|
|
3007
|
+
ae.inputWrapper,
|
|
3008
|
+
x,
|
|
3009
|
+
G ? ae.inputWrapperError : ""
|
|
3010
|
+
].filter(Boolean).join(" "), f = [
|
|
2921
3011
|
F
|
|
2922
|
-
].filter(Boolean).join(" "),
|
|
2923
|
-
|
|
2924
|
-
|
|
3012
|
+
].filter(Boolean).join(" "), X = [
|
|
3013
|
+
ae.suffixButton,
|
|
3014
|
+
y ? ae.suffixButtonInteractive : ""
|
|
2925
3015
|
].filter(Boolean).join(" ");
|
|
2926
|
-
!
|
|
2927
|
-
const
|
|
3016
|
+
!p && !R && !L && console.warn("Advarsel: DateInput-komponenten bør ha label, aria-label, eller aria-labelledby for tilgjengelighet.");
|
|
3017
|
+
const pe = p && typeof p == "string" ? L || `${l}-label` : void 0, de = O ? `${l}-desc` : void 0, m = G ? `${l}-err` : void 0, N = [de, m].filter(Boolean).join(" ") || void 0;
|
|
2928
3018
|
return (
|
|
2929
3019
|
// --- Bruk data-color og data-size på den ytre wrapperen ---
|
|
2930
3020
|
/* @__PURE__ */ r(
|
|
2931
3021
|
"div",
|
|
2932
3022
|
{
|
|
2933
|
-
className:
|
|
2934
|
-
"data-color":
|
|
2935
|
-
"data-size":
|
|
3023
|
+
className: I,
|
|
3024
|
+
"data-color": K,
|
|
3025
|
+
"data-size": _,
|
|
2936
3026
|
children: [
|
|
2937
|
-
|
|
2938
|
-
|
|
2939
|
-
/* @__PURE__ */ r("div", { className:
|
|
3027
|
+
p && typeof p == "string" ? /* @__PURE__ */ n("label", { id: pe, htmlFor: l, children: p }) : p,
|
|
3028
|
+
O && /* @__PURE__ */ n("p", { id: de, className: ae.description, children: O }),
|
|
3029
|
+
/* @__PURE__ */ r("div", { className: D, children: [
|
|
2940
3030
|
/* @__PURE__ */ n(
|
|
2941
3031
|
"input",
|
|
2942
3032
|
{
|
|
2943
|
-
ref:
|
|
3033
|
+
ref: v,
|
|
2944
3034
|
type: "text",
|
|
2945
3035
|
inputMode: "numeric",
|
|
2946
3036
|
pattern: "\\d{2}\\.\\d{2}\\.\\d{4}",
|
|
2947
3037
|
maxLength: 10,
|
|
2948
|
-
value:
|
|
3038
|
+
value: T,
|
|
2949
3039
|
readOnly: P,
|
|
2950
|
-
placeholder:
|
|
3040
|
+
placeholder: j,
|
|
2951
3041
|
id: l,
|
|
2952
|
-
name:
|
|
2953
|
-
required:
|
|
3042
|
+
name: Q,
|
|
3043
|
+
required: $,
|
|
2954
3044
|
disabled: E,
|
|
2955
|
-
onClick:
|
|
2956
|
-
onChange:
|
|
3045
|
+
onClick: Z,
|
|
3046
|
+
onChange: le,
|
|
2957
3047
|
onFocus: d,
|
|
2958
|
-
onBlur:
|
|
2959
|
-
autoComplete:
|
|
2960
|
-
"aria-label":
|
|
2961
|
-
"aria-labelledby":
|
|
3048
|
+
onBlur: A,
|
|
3049
|
+
autoComplete: S,
|
|
3050
|
+
"aria-label": R,
|
|
3051
|
+
"aria-labelledby": pe,
|
|
2962
3052
|
"aria-describedby": N,
|
|
2963
|
-
"aria-invalid": !!
|
|
2964
|
-
className:
|
|
2965
|
-
...
|
|
3053
|
+
"aria-invalid": !!G,
|
|
3054
|
+
className: f,
|
|
3055
|
+
...ee
|
|
2966
3056
|
}
|
|
2967
3057
|
),
|
|
2968
|
-
|
|
3058
|
+
k && /* @__PURE__ */ n(
|
|
2969
3059
|
"button",
|
|
2970
3060
|
{
|
|
2971
3061
|
type: "button",
|
|
2972
|
-
className:
|
|
2973
|
-
onClick: E ? void 0 :
|
|
2974
|
-
tabIndex:
|
|
2975
|
-
"aria-hidden": !
|
|
3062
|
+
className: X,
|
|
3063
|
+
onClick: E ? void 0 : y,
|
|
3064
|
+
tabIndex: y && !E ? 0 : -1,
|
|
3065
|
+
"aria-hidden": !y,
|
|
2976
3066
|
disabled: E,
|
|
2977
|
-
"aria-label":
|
|
2978
|
-
children:
|
|
3067
|
+
"aria-label": y ? s("dateInput.openDatePicker") : void 0,
|
|
3068
|
+
children: k
|
|
2979
3069
|
}
|
|
2980
3070
|
)
|
|
2981
3071
|
] }),
|
|
2982
|
-
|
|
3072
|
+
G && /* @__PURE__ */ n("p", { id: m, className: ae.error, role: "alert", children: G })
|
|
2983
3073
|
]
|
|
2984
3074
|
}
|
|
2985
3075
|
)
|
|
@@ -3080,7 +3170,7 @@ function yo(t) {
|
|
|
3080
3170
|
}
|
|
3081
3171
|
`;
|
|
3082
3172
|
}
|
|
3083
|
-
const xo = "_carouselContainer_eo3g5_1", To = "_viewport_eo3g5_14", Co = "_slides_eo3g5_20", wo = "_slide_eo3g5_20", So = "_slideInner_eo3g5_40", Io = "_loaderOverlay_eo3g5_48", _o = "_image_eo3g5_58", Do = "_loaded_eo3g5_69", Ao = "_loading_eo3g5_73", Lo = "_empty_eo3g5_81", No = "_controls_eo3g5_87", Mo = "_arrows_eo3g5_97", jo = "_dots_eo3g5_107", Fo = "_dot_eo3g5_107", Eo = "_dotActive_eo3g5_133",
|
|
3173
|
+
const xo = "_carouselContainer_eo3g5_1", To = "_viewport_eo3g5_14", Co = "_slides_eo3g5_20", wo = "_slide_eo3g5_20", So = "_slideInner_eo3g5_40", Io = "_loaderOverlay_eo3g5_48", _o = "_image_eo3g5_58", Do = "_loaded_eo3g5_69", Ao = "_loading_eo3g5_73", Lo = "_empty_eo3g5_81", No = "_controls_eo3g5_87", Mo = "_arrows_eo3g5_97", jo = "_dots_eo3g5_107", Fo = "_dot_eo3g5_107", Eo = "_dotActive_eo3g5_133", H = {
|
|
3084
3174
|
carouselContainer: xo,
|
|
3085
3175
|
viewport: To,
|
|
3086
3176
|
slides: Co,
|
|
@@ -3100,144 +3190,144 @@ const xo = "_carouselContainer_eo3g5_1", To = "_viewport_eo3g5_14", Co = "_slide
|
|
|
3100
3190
|
images: t,
|
|
3101
3191
|
autoPlay: e = !1,
|
|
3102
3192
|
autoDelay: s = 5,
|
|
3103
|
-
showArrows:
|
|
3104
|
-
showDots:
|
|
3105
|
-
variant:
|
|
3193
|
+
showArrows: p = !0,
|
|
3194
|
+
showDots: k = !0,
|
|
3195
|
+
variant: y,
|
|
3106
3196
|
slidesPerView: u = 1,
|
|
3107
|
-
slideSpacing:
|
|
3197
|
+
slideSpacing: x = 16,
|
|
3108
3198
|
cornerRadius: F = 0,
|
|
3109
3199
|
"data-color": C,
|
|
3110
|
-
"data-size":
|
|
3200
|
+
"data-size": U
|
|
3111
3201
|
}) => {
|
|
3112
|
-
const { t:
|
|
3113
|
-
|
|
3114
|
-
const
|
|
3115
|
-
if (typeof document > "u" || document.getElementById(
|
|
3116
|
-
const
|
|
3117
|
-
|
|
3202
|
+
const { t: w } = ye();
|
|
3203
|
+
z(() => {
|
|
3204
|
+
const v = "rk-carousel-inline-styles";
|
|
3205
|
+
if (typeof document > "u" || document.getElementById(v)) return;
|
|
3206
|
+
const h = Po(H), T = document.createElement("style");
|
|
3207
|
+
T.id = v, T.textContent = h, document.head.appendChild(T);
|
|
3118
3208
|
}, []);
|
|
3119
3209
|
const P = {
|
|
3120
3210
|
loop: !0,
|
|
3121
3211
|
align: "start",
|
|
3122
3212
|
containScroll: "trimSnaps",
|
|
3123
3213
|
slidesToScroll: 1
|
|
3124
|
-
}, [
|
|
3125
|
-
|
|
3126
|
-
|
|
3214
|
+
}, [j, l] = dn(P), [Q, $] = q(0), [E, Z] = q([]), [d, A] = q([]);
|
|
3215
|
+
z(() => {
|
|
3216
|
+
A(new Array((t == null ? void 0 : t.length) || 0).fill(!1));
|
|
3127
3217
|
}, [t]);
|
|
3128
|
-
const
|
|
3129
|
-
|
|
3130
|
-
const
|
|
3131
|
-
return
|
|
3218
|
+
const S = oe((v) => {
|
|
3219
|
+
A((h) => {
|
|
3220
|
+
const T = [...h];
|
|
3221
|
+
return T[v] = !0, T;
|
|
3132
3222
|
});
|
|
3133
|
-
}, []),
|
|
3134
|
-
l &&
|
|
3135
|
-
}, [l]),
|
|
3136
|
-
|
|
3223
|
+
}, []), R = ue(() => s * 1e3, [s]), L = oe(() => {
|
|
3224
|
+
l && $(l.selectedScrollSnap());
|
|
3225
|
+
}, [l]), O = oe((v) => l && l.scrollTo(v), [l]), G = oe(() => l && l.scrollPrev(), [l]), K = oe(() => l && l.scrollNext(), [l]);
|
|
3226
|
+
z(() => {
|
|
3137
3227
|
if (l)
|
|
3138
|
-
return l.on("select",
|
|
3139
|
-
l.off("select",
|
|
3228
|
+
return l.on("select", L), l.on("reInit", L), Z(l.scrollSnapList()), () => {
|
|
3229
|
+
l.off("select", L), l.off("reInit", L);
|
|
3140
3230
|
};
|
|
3141
|
-
}, [l,
|
|
3142
|
-
l && (l.reInit(),
|
|
3143
|
-
}, [l, t, u,
|
|
3231
|
+
}, [l, L]), z(() => {
|
|
3232
|
+
l && (l.reInit(), Z(l.scrollSnapList()));
|
|
3233
|
+
}, [l, t, u, x]), z(() => {
|
|
3144
3234
|
if (!e || !l || !t || t.length <= 1) return;
|
|
3145
|
-
const
|
|
3235
|
+
const v = window.setInterval(() => {
|
|
3146
3236
|
l.canScrollNext() && l.scrollNext();
|
|
3147
|
-
},
|
|
3237
|
+
}, R);
|
|
3148
3238
|
return () => {
|
|
3149
|
-
window.clearInterval(
|
|
3239
|
+
window.clearInterval(v);
|
|
3150
3240
|
};
|
|
3151
|
-
}, [e,
|
|
3152
|
-
const
|
|
3241
|
+
}, [e, R, l, t]);
|
|
3242
|
+
const _ = Math.max(1, u), ee = `${100 / _}%`, c = x / 2;
|
|
3153
3243
|
return /* @__PURE__ */ r(
|
|
3154
3244
|
"div",
|
|
3155
3245
|
{
|
|
3156
|
-
className:
|
|
3246
|
+
className: H.carouselContainer,
|
|
3157
3247
|
"data-color": C,
|
|
3158
|
-
"data-size":
|
|
3159
|
-
"data-variant":
|
|
3248
|
+
"data-size": U,
|
|
3249
|
+
"data-variant": y,
|
|
3160
3250
|
children: [
|
|
3161
|
-
/* @__PURE__ */ n("div", { className:
|
|
3251
|
+
/* @__PURE__ */ n("div", { className: H.viewport, ref: j, children: /* @__PURE__ */ n(
|
|
3162
3252
|
"div",
|
|
3163
3253
|
{
|
|
3164
|
-
className:
|
|
3254
|
+
className: H.slides,
|
|
3165
3255
|
style: {
|
|
3166
|
-
marginLeft: `-${
|
|
3167
|
-
marginRight: `-${
|
|
3256
|
+
marginLeft: `-${c}px`,
|
|
3257
|
+
marginRight: `-${c}px`
|
|
3168
3258
|
},
|
|
3169
|
-
children: t && t.length > 0 ? t.map((
|
|
3259
|
+
children: t && t.length > 0 ? t.map((v, h) => /* @__PURE__ */ n(
|
|
3170
3260
|
"div",
|
|
3171
3261
|
{
|
|
3172
|
-
className:
|
|
3262
|
+
className: H.slide,
|
|
3173
3263
|
style: {
|
|
3174
|
-
flex: `0 0 ${
|
|
3175
|
-
paddingLeft: `${
|
|
3176
|
-
paddingRight: `${
|
|
3264
|
+
flex: `0 0 ${ee}`,
|
|
3265
|
+
paddingLeft: `${c}px`,
|
|
3266
|
+
paddingRight: `${c}px`,
|
|
3177
3267
|
borderRadius: F > 0 ? `${F}px` : void 0,
|
|
3178
3268
|
overflow: "hidden"
|
|
3179
3269
|
// Ensure radius clips content
|
|
3180
3270
|
},
|
|
3181
|
-
children: /* @__PURE__ */ r("div", { className:
|
|
3182
|
-
!d[
|
|
3271
|
+
children: /* @__PURE__ */ r("div", { className: H.slideInner, style: { borderRadius: `${F}px`, overflow: "hidden", position: "relative", width: "100%", height: "100%" }, children: [
|
|
3272
|
+
!d[h] && /* @__PURE__ */ n("div", { className: H.loaderOverlay, children: /* @__PURE__ */ n(Bo, { "aria-label": w("carousel.loading") }) }),
|
|
3183
3273
|
/* @__PURE__ */ n(
|
|
3184
3274
|
"img",
|
|
3185
3275
|
{
|
|
3186
|
-
className: `${
|
|
3187
|
-
src:
|
|
3188
|
-
alt:
|
|
3189
|
-
loading:
|
|
3276
|
+
className: `${H.image} ${d[h] ? H.loaded : H.loadingImage}`,
|
|
3277
|
+
src: v.src,
|
|
3278
|
+
alt: v.alt,
|
|
3279
|
+
loading: h < _ ? "eager" : "lazy",
|
|
3190
3280
|
crossOrigin: "anonymous",
|
|
3191
|
-
onLoad: () =>
|
|
3192
|
-
onError: (
|
|
3193
|
-
|
|
3281
|
+
onLoad: () => S(h),
|
|
3282
|
+
onError: (T) => {
|
|
3283
|
+
T.target.style.display = "none", S(h);
|
|
3194
3284
|
}
|
|
3195
3285
|
}
|
|
3196
3286
|
)
|
|
3197
3287
|
] })
|
|
3198
3288
|
},
|
|
3199
|
-
`image-${
|
|
3200
|
-
)) : /* @__PURE__ */ n("div", { className:
|
|
3289
|
+
`image-${h}-${v.src}`
|
|
3290
|
+
)) : /* @__PURE__ */ n("div", { className: H.slide, style: { flex: "0 0 100%" }, children: /* @__PURE__ */ n("div", { className: H.empty, children: "Ingen bilder" }) })
|
|
3201
3291
|
}
|
|
3202
3292
|
) }),
|
|
3203
|
-
(
|
|
3204
|
-
|
|
3293
|
+
(p || k && t && t.length > 1) && /* @__PURE__ */ r("div", { className: H.controls, "aria-hidden": "false", children: [
|
|
3294
|
+
p && /* @__PURE__ */ r("div", { className: H.arrows, children: [
|
|
3205
3295
|
/* @__PURE__ */ n(
|
|
3206
|
-
|
|
3296
|
+
ie,
|
|
3207
3297
|
{
|
|
3208
3298
|
variant: "primary",
|
|
3209
3299
|
icon: !0,
|
|
3210
|
-
"aria-label":
|
|
3211
|
-
onClick:
|
|
3300
|
+
"aria-label": w("carousel.previousImage"),
|
|
3301
|
+
onClick: G,
|
|
3212
3302
|
disabled: !t || t.length <= 1,
|
|
3213
3303
|
children: /* @__PURE__ */ n(cn, { "aria-hidden": !0 })
|
|
3214
3304
|
}
|
|
3215
3305
|
),
|
|
3216
3306
|
/* @__PURE__ */ n(
|
|
3217
|
-
|
|
3307
|
+
ie,
|
|
3218
3308
|
{
|
|
3219
3309
|
variant: "primary",
|
|
3220
3310
|
icon: !0,
|
|
3221
|
-
"aria-label":
|
|
3222
|
-
onClick:
|
|
3311
|
+
"aria-label": w("carousel.nextImage"),
|
|
3312
|
+
onClick: K,
|
|
3223
3313
|
disabled: !t || t.length <= 1,
|
|
3224
3314
|
children: /* @__PURE__ */ n(pn, { "aria-hidden": !0 })
|
|
3225
3315
|
}
|
|
3226
3316
|
)
|
|
3227
3317
|
] }),
|
|
3228
|
-
|
|
3229
|
-
const
|
|
3318
|
+
k && t && t.length > 1 && /* @__PURE__ */ n("div", { className: H.dots, role: "tablist", "aria-label": w("carousel.imagePosition"), children: E.map((v, h) => {
|
|
3319
|
+
const T = h === Q;
|
|
3230
3320
|
return /* @__PURE__ */ n(
|
|
3231
3321
|
"button",
|
|
3232
3322
|
{
|
|
3233
3323
|
type: "button",
|
|
3234
|
-
className: `${
|
|
3235
|
-
onClick: () =>
|
|
3236
|
-
"aria-label": `${
|
|
3237
|
-
"aria-selected":
|
|
3324
|
+
className: `${H.dot} ${T ? H.dotActive : ""}`,
|
|
3325
|
+
onClick: () => O(h),
|
|
3326
|
+
"aria-label": `${w("carousel.goToImage")} ${h + 1}`,
|
|
3327
|
+
"aria-selected": T,
|
|
3238
3328
|
role: "tab"
|
|
3239
3329
|
},
|
|
3240
|
-
`dot-${
|
|
3330
|
+
`dot-${h}`
|
|
3241
3331
|
);
|
|
3242
3332
|
}) })
|
|
3243
3333
|
] })
|
|
@@ -3246,7 +3336,7 @@ const xo = "_carouselContainer_eo3g5_1", To = "_viewport_eo3g5_14", Co = "_slide
|
|
|
3246
3336
|
);
|
|
3247
3337
|
};
|
|
3248
3338
|
zo.displayName = "Carousel";
|
|
3249
|
-
function
|
|
3339
|
+
function Po(t) {
|
|
3250
3340
|
return `
|
|
3251
3341
|
.${t.carouselContainer} {
|
|
3252
3342
|
position: relative;
|
|
@@ -3418,8 +3508,8 @@ function $o(t) {
|
|
|
3418
3508
|
}
|
|
3419
3509
|
`;
|
|
3420
3510
|
}
|
|
3421
|
-
const
|
|
3422
|
-
crossCorner:
|
|
3511
|
+
const $o = "_crossCorner_1caiu_1", Ro = "_shape_1caiu_6", Ie = {
|
|
3512
|
+
crossCorner: $o,
|
|
3423
3513
|
shape: Ro
|
|
3424
3514
|
};
|
|
3425
3515
|
function Go(t) {
|
|
@@ -3458,79 +3548,79 @@ const Wo = {
|
|
|
3458
3548
|
"top-right": 0,
|
|
3459
3549
|
"bottom-right": 90,
|
|
3460
3550
|
"bottom-left": 180
|
|
3461
|
-
},
|
|
3551
|
+
}, ve = re(
|
|
3462
3552
|
({
|
|
3463
3553
|
position: t = "top-left",
|
|
3464
3554
|
size: e = "md",
|
|
3465
3555
|
className: s,
|
|
3466
|
-
"aria-label":
|
|
3467
|
-
"aria-hidden":
|
|
3468
|
-
"data-color":
|
|
3556
|
+
"aria-label": p,
|
|
3557
|
+
"aria-hidden": k = !0,
|
|
3558
|
+
"data-color": y,
|
|
3469
3559
|
"data-size": u,
|
|
3470
|
-
...
|
|
3560
|
+
...x
|
|
3471
3561
|
}, F) => {
|
|
3472
|
-
|
|
3473
|
-
const
|
|
3474
|
-
if (typeof document > "u" || document.getElementById(
|
|
3475
|
-
const P = Go(
|
|
3476
|
-
|
|
3562
|
+
z(() => {
|
|
3563
|
+
const w = "rk-crosscorner-inline-styles";
|
|
3564
|
+
if (typeof document > "u" || document.getElementById(w)) return;
|
|
3565
|
+
const P = Go(Ie), j = document.createElement("style");
|
|
3566
|
+
j.id = w, j.textContent = P, document.head.appendChild(j);
|
|
3477
3567
|
}, []);
|
|
3478
|
-
const C = Wo[e],
|
|
3568
|
+
const C = Wo[e], U = Ho[t];
|
|
3479
3569
|
return /* @__PURE__ */ n(
|
|
3480
3570
|
"svg",
|
|
3481
3571
|
{
|
|
3482
3572
|
ref: F,
|
|
3483
|
-
className: `${
|
|
3573
|
+
className: `${Ie.crossCorner} ${s || ""}`,
|
|
3484
3574
|
width: C,
|
|
3485
3575
|
height: C,
|
|
3486
3576
|
viewBox: "0 0 68 68",
|
|
3487
3577
|
fill: "none",
|
|
3488
3578
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3489
|
-
"aria-label":
|
|
3490
|
-
"aria-hidden":
|
|
3491
|
-
role:
|
|
3492
|
-
"data-color":
|
|
3579
|
+
"aria-label": p,
|
|
3580
|
+
"aria-hidden": k,
|
|
3581
|
+
role: k ? void 0 : "img",
|
|
3582
|
+
"data-color": y,
|
|
3493
3583
|
"data-size": u,
|
|
3494
3584
|
style: {
|
|
3495
|
-
transform:
|
|
3585
|
+
transform: U ? `rotate(${U}deg)` : void 0
|
|
3496
3586
|
},
|
|
3497
|
-
...
|
|
3587
|
+
...x,
|
|
3498
3588
|
children: /* @__PURE__ */ n(
|
|
3499
3589
|
"path",
|
|
3500
3590
|
{
|
|
3501
3591
|
d: "M68 0V33.8203H67.998V68H34.1777V33.8203H0V0H68Z",
|
|
3502
|
-
className:
|
|
3592
|
+
className: Ie.shape
|
|
3503
3593
|
}
|
|
3504
3594
|
)
|
|
3505
3595
|
}
|
|
3506
3596
|
);
|
|
3507
3597
|
}
|
|
3508
3598
|
);
|
|
3509
|
-
|
|
3510
|
-
const
|
|
3599
|
+
ve.displayName = "CrossCorner";
|
|
3600
|
+
const Ea = mt, Ba = gt, za = ut, V = ht, Pa = ft, $a = kt, Ra = vt, Ga = bt, Wa = yt, Ha = xt, Ua = Tt, Va = Ct, Uo = wt, Vo = St;
|
|
3511
3601
|
Uo.displayName = "Field.Description";
|
|
3512
3602
|
Vo.displayName = "Field.Counter";
|
|
3513
|
-
const
|
|
3603
|
+
const Oa = We, Oo = re((t, e) => /* @__PURE__ */ n(It, { ref: e, ...t }));
|
|
3514
3604
|
Oo.displayName = "Heading";
|
|
3515
3605
|
const qe = _t;
|
|
3516
3606
|
qe.displayName = "Input";
|
|
3517
|
-
const Ko =
|
|
3607
|
+
const Ko = re((t, e) => /* @__PURE__ */ n(Dt, { ref: e, ...t }));
|
|
3518
3608
|
Ko.displayName = "Label";
|
|
3519
|
-
const
|
|
3609
|
+
const ne = At, Ka = Lt, qo = Nt, qa = Mt, Ya = jt, Za = Ft, Xa = Et;
|
|
3520
3610
|
qo.displayName = "Pagination";
|
|
3521
|
-
const
|
|
3611
|
+
const be = re(
|
|
3522
3612
|
(t, e) => /* @__PURE__ */ n(Bt, { ref: e, ...t })
|
|
3523
3613
|
);
|
|
3524
|
-
|
|
3525
|
-
const
|
|
3614
|
+
be.displayName = "Paragraph";
|
|
3615
|
+
const Ja = zt, Qa = Pt, ei = $t, xe = Object.assign(Rt, {
|
|
3526
3616
|
Button: Ht,
|
|
3527
3617
|
ClearButton: Wt,
|
|
3528
3618
|
Input: Gt
|
|
3529
|
-
}),
|
|
3619
|
+
}), ti = Ut, ni = Vt, oi = Ot, Yo = Kt;
|
|
3530
3620
|
Yo.displayName = "Suggestion";
|
|
3531
|
-
const
|
|
3621
|
+
const _e = qt, ri = Yt, Te = Zt, si = Xt, ai = Jt, Zo = Qt, ii = en, li = tn, Xo = re((t, e) => /* @__PURE__ */ n(nn, { ref: e, ...t }));
|
|
3532
3622
|
Xo.displayName = "ValidationMessage";
|
|
3533
|
-
const Jo = "_header_1e6zx_1", Qo = "_languageSwitch_1e6zx_37", er = "_searchOverlay_1e6zx_41", tr = "_headerExtension_1e6zx_46", nr = "_headerExtensionTinted_1e6zx_75", or = "_languageLabel_1e6zx_83", rr = "_languageLink_1e6zx_88", sr = "_extensionContent_1e6zx_93", ar = "_extensionDivider_1e6zx_98", ir = "_extensionContentWrapper_1e6zx_103", lr = "_headerInner_1e6zx_199", dr = "_logoWrapper_1e6zx_216", cr = "_logo_1e6zx_216", pr = "_secondaryLogoWrapper_1e6zx_239", mr = "_slotComponent_1e6zx_248", gr = "_slotContainer_1e6zx_258", ur = "_slotText_1e6zx_266", hr = "_secondaryLogo_1e6zx_239", fr = "_redCrossLogo_1e6zx_293", kr = "_primaryLogo_1e6zx_299", vr = "_navItems_1e6zx_303", br = "_navLink_1e6zx_312", yr = "_actions_1e6zx_325", xr = "_ctaButton_1e6zx_333", Tr = "_themeToggle_1e6zx_338", Cr = "_userInfo_1e6zx_343", wr = "_userName_1e6zx_349", Sr = "_loginLink_1e6zx_356", Ir = "_loginText_1e6zx_365", _r = "_underline_1e6zx_372", Dr = "_searchButtonWrapper_1e6zx_378", Ar = "_buttonText_1e6zx_382", Lr = "_menuButton_1e6zx_387", Nr = "_menuOverlay_1e6zx_392", Mr = "_searchContent_1e6zx_426", jr = "_menuContent_1e6zx_436", Fr = "_menuLeftColumn_1e6zx_445", Er = "_menuRightColumn_1e6zx_451", Br = "_slotContent_1e6zx_465", zr = "_navList_1e6zx_478",
|
|
3623
|
+
const Jo = "_header_1e6zx_1", Qo = "_languageSwitch_1e6zx_37", er = "_searchOverlay_1e6zx_41", tr = "_headerExtension_1e6zx_46", nr = "_headerExtensionTinted_1e6zx_75", or = "_languageLabel_1e6zx_83", rr = "_languageLink_1e6zx_88", sr = "_extensionContent_1e6zx_93", ar = "_extensionDivider_1e6zx_98", ir = "_extensionContentWrapper_1e6zx_103", lr = "_headerInner_1e6zx_199", dr = "_logoWrapper_1e6zx_216", cr = "_logo_1e6zx_216", pr = "_secondaryLogoWrapper_1e6zx_239", mr = "_slotComponent_1e6zx_248", gr = "_slotContainer_1e6zx_258", ur = "_slotText_1e6zx_266", hr = "_secondaryLogo_1e6zx_239", fr = "_redCrossLogo_1e6zx_293", kr = "_primaryLogo_1e6zx_299", vr = "_navItems_1e6zx_303", br = "_navLink_1e6zx_312", yr = "_actions_1e6zx_325", xr = "_ctaButton_1e6zx_333", Tr = "_themeToggle_1e6zx_338", Cr = "_userInfo_1e6zx_343", wr = "_userName_1e6zx_349", Sr = "_loginLink_1e6zx_356", Ir = "_loginText_1e6zx_365", _r = "_underline_1e6zx_372", Dr = "_searchButtonWrapper_1e6zx_378", Ar = "_buttonText_1e6zx_382", Lr = "_menuButton_1e6zx_387", Nr = "_menuOverlay_1e6zx_392", Mr = "_searchContent_1e6zx_426", jr = "_menuContent_1e6zx_436", Fr = "_menuLeftColumn_1e6zx_445", Er = "_menuRightColumn_1e6zx_451", Br = "_slotContent_1e6zx_465", zr = "_navList_1e6zx_478", Pr = "_menuUtilities_1e6zx_485", $r = "_menuBrand_1e6zx_492", Rr = "_suggestionsSection_1e6zx_496", Gr = "_suggestionsTitle_1e6zx_502", Wr = "_searchResults_1e6zx_511", Hr = "_resultList_1e6zx_517", Ur = "_resultItem_1e6zx_523", Vr = "_resultLink_1e6zx_531", Or = "_suggestionIcon_1e6zx_545", Kr = "_suggestionText_1e6zx_558", qr = "_highlightedText_1e6zx_565", Yr = "_remainingText_1e6zx_570", Zr = "_viewAllLink_1e6zx_583", Xr = "_noResults_1e6zx_618", a = {
|
|
3534
3624
|
header: Jo,
|
|
3535
3625
|
languageSwitch: Qo,
|
|
3536
3626
|
searchOverlay: er,
|
|
@@ -3571,8 +3661,8 @@ const Jo = "_header_1e6zx_1", Qo = "_languageSwitch_1e6zx_37", er = "_searchOver
|
|
|
3571
3661
|
menuRightColumn: Er,
|
|
3572
3662
|
slotContent: Br,
|
|
3573
3663
|
navList: zr,
|
|
3574
|
-
menuUtilities:
|
|
3575
|
-
menuBrand:
|
|
3664
|
+
menuUtilities: Pr,
|
|
3665
|
+
menuBrand: $r,
|
|
3576
3666
|
suggestionsSection: Rr,
|
|
3577
3667
|
suggestionsTitle: Gr,
|
|
3578
3668
|
searchResults: Wr,
|
|
@@ -3648,39 +3738,47 @@ const Jo = "_header_1e6zx_1", Qo = "_languageSwitch_1e6zx_37", er = "_searchOver
|
|
|
3648
3738
|
{ id: "komponent-kreasjon", title: "Komponent Kreasjon", category: "Code", path: "code/komponent-kreasjon", description: "Opprette nye komponenter" },
|
|
3649
3739
|
{ id: "progression", title: "Progresjon", category: "Code", path: "code/progression", description: "Fra design til ferdig komponent" },
|
|
3650
3740
|
{ id: "metadata-files", title: "Metadata filer", category: "Code", path: "code/metadata-files", description: "Struktur og bruk av metadata.json" }
|
|
3651
|
-
]
|
|
3741
|
+
];
|
|
3742
|
+
function Qr(t) {
|
|
3743
|
+
return t.split(/\s+/).map((e) => e[0] ?? "").join("").slice(0, 2).toUpperCase();
|
|
3744
|
+
}
|
|
3745
|
+
const di = ({
|
|
3652
3746
|
"data-color": t = "primary",
|
|
3653
3747
|
activePage: e,
|
|
3654
3748
|
setPage: s,
|
|
3655
|
-
children:
|
|
3656
|
-
showUser:
|
|
3657
|
-
showSearch:
|
|
3749
|
+
children: p,
|
|
3750
|
+
showUser: k = !0,
|
|
3751
|
+
showSearch: y = !0,
|
|
3658
3752
|
showLogin: u = !0,
|
|
3659
|
-
showCta:
|
|
3753
|
+
showCta: x = !1,
|
|
3660
3754
|
ctaLabel: F,
|
|
3661
3755
|
ctaIcon: C = /* @__PURE__ */ n(gn, { "aria-hidden": !0 }),
|
|
3662
|
-
onCtaClick:
|
|
3663
|
-
showThemeToggle:
|
|
3756
|
+
onCtaClick: U,
|
|
3757
|
+
showThemeToggle: w = !1,
|
|
3664
3758
|
secondaryLogo: P = !1,
|
|
3665
|
-
secondaryLogoSrc:
|
|
3759
|
+
secondaryLogoSrc: j,
|
|
3666
3760
|
secondaryLogoSrcDark: l,
|
|
3667
|
-
secondaryLogoAlt:
|
|
3668
|
-
navItems:
|
|
3761
|
+
secondaryLogoAlt: Q = "Secondary Logo",
|
|
3762
|
+
navItems: $,
|
|
3669
3763
|
showNavItems: E = !0,
|
|
3670
|
-
showMenuButton:
|
|
3764
|
+
showMenuButton: Z = !0,
|
|
3671
3765
|
showHeaderExtension: d = !1,
|
|
3672
|
-
showModeToggle:
|
|
3673
|
-
showLanguageSwitch:
|
|
3674
|
-
extensionColor:
|
|
3766
|
+
showModeToggle: A = !1,
|
|
3767
|
+
showLanguageSwitch: S = !1,
|
|
3768
|
+
extensionColor: R,
|
|
3769
|
+
userName: L,
|
|
3770
|
+
userInitials: O,
|
|
3771
|
+
userAvatarSrc: G,
|
|
3772
|
+
onUserClick: K
|
|
3675
3773
|
}) => {
|
|
3676
|
-
const [
|
|
3677
|
-
|
|
3678
|
-
const
|
|
3679
|
-
if (typeof document > "u" || document.getElementById(
|
|
3680
|
-
const g =
|
|
3681
|
-
|
|
3774
|
+
const [_, ee] = q(!1), [c, v] = q(!1), [h, T] = q(""), [Y, le] = q("light"), { language: I, setLanguage: D, t: f } = ye(), [X, pe] = q(!1);
|
|
3775
|
+
z(() => {
|
|
3776
|
+
const i = "rk-header-inline-styles";
|
|
3777
|
+
if (typeof document > "u" || document.getElementById(i)) return;
|
|
3778
|
+
const g = es(a), b = document.createElement("style");
|
|
3779
|
+
b.id = i, b.textContent = g, document.head.appendChild(b);
|
|
3682
3780
|
}, []);
|
|
3683
|
-
const
|
|
3781
|
+
const de = () => /* @__PURE__ */ r(
|
|
3684
3782
|
"svg",
|
|
3685
3783
|
{
|
|
3686
3784
|
width: "170",
|
|
@@ -3690,7 +3788,7 @@ const Jo = "_header_1e6zx_1", Qo = "_languageSwitch_1e6zx_37", er = "_searchOver
|
|
|
3690
3788
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3691
3789
|
"aria-hidden": !0,
|
|
3692
3790
|
focusable: "false",
|
|
3693
|
-
className:
|
|
3791
|
+
className: a.redCrossLogo,
|
|
3694
3792
|
children: [
|
|
3695
3793
|
/* @__PURE__ */ n("path", { d: "M76.1036 48.1397C77.8925 47.8781 79.6984 47.7525 81.5061 47.7639C84.1713 47.7639 86.0396 48.1669 87.3182 49.1857C87.8735 49.639 88.3149 50.2176 88.6067 50.8744C88.8984 51.5312 89.0323 52.2479 88.9974 52.9665C88.9839 53.9451 88.6724 54.896 88.1049 55.691C87.5373 56.4861 86.7411 57.087 85.8235 57.4129V57.4944C87.0796 58.006 87.7684 59.2104 88.2231 60.8722C88.7813 62.9097 89.3441 65.2688 89.6907 65.9661H85.5309C85.2382 65.4544 84.7835 63.9829 84.2793 61.7597C83.7751 59.5365 83.0097 58.8527 81.344 58.8527H80.1284V65.9661H76.1036V48.1397ZM80.1284 55.9141H81.7312C83.7526 55.9141 84.9546 54.8954 84.9546 53.3151C84.9546 51.6534 83.8336 50.8202 81.9698 50.7931C81.3532 50.7814 80.7368 50.8268 80.1284 50.9289V55.9141Z", fill: "#1E1E1E" }),
|
|
3696
3794
|
/* @__PURE__ */ n("path", { d: "M97.8528 52.5633C98.9439 52.5351 100.026 52.7744 101.004 53.2606L102.256 51.4087L103.669 52.4003L102.467 54.2115C103.188 54.8589 103.758 55.6585 104.137 56.5531C104.515 57.4478 104.692 58.4154 104.655 59.3869C104.655 64.0506 101.243 66.2738 97.8573 66.2738C96.7852 66.2984 95.7234 66.059 94.7644 65.5765L93.4543 67.4556L92.1037 66.387L93.2787 64.6438C91.8651 63.4892 91.0277 61.7233 91.0277 59.414C91.0277 55.2891 93.7965 52.5543 97.8213 52.5543L97.8528 52.5633ZM99.2934 55.9411C98.8798 55.6237 98.3731 55.4533 97.8528 55.4566C95.7458 55.4566 94.949 57.5757 94.949 59.4005C94.9265 60.126 95.0909 60.845 95.4262 61.4878L95.4802 61.515L99.2934 55.9411ZM96.4932 62.8552C96.8653 63.1843 97.3486 63.3576 97.8438 63.3397C99.6446 63.3397 100.748 61.7821 100.748 59.4774C100.76 58.7777 100.625 58.0833 100.351 57.4399L100.27 57.4127L96.4932 62.8552Z", fill: "#1E1E1E" }),
|
|
@@ -3705,111 +3803,111 @@ const Jo = "_header_1e6zx_1", Qo = "_languageSwitch_1e6zx_37", er = "_searchOver
|
|
|
3705
3803
|
]
|
|
3706
3804
|
}
|
|
3707
3805
|
);
|
|
3708
|
-
|
|
3709
|
-
|
|
3710
|
-
}, [e]),
|
|
3711
|
-
if (!(typeof document > "u") &&
|
|
3712
|
-
const
|
|
3806
|
+
z(() => {
|
|
3807
|
+
ee(!1), v(!1), T("");
|
|
3808
|
+
}, [e]), z(() => {
|
|
3809
|
+
if (!(typeof document > "u") && _ && X) {
|
|
3810
|
+
const i = document.body.style.overflow;
|
|
3713
3811
|
return document.body.style.overflow = "hidden", () => {
|
|
3714
|
-
document.body.style.overflow =
|
|
3812
|
+
document.body.style.overflow = i;
|
|
3715
3813
|
};
|
|
3716
3814
|
}
|
|
3717
|
-
}, [
|
|
3815
|
+
}, [_, X]), z(() => {
|
|
3718
3816
|
if (typeof window > "u" || typeof window.matchMedia > "u") return;
|
|
3719
|
-
const
|
|
3720
|
-
return g(
|
|
3721
|
-
|
|
3817
|
+
const i = window.matchMedia("(max-width: 850px)"), g = (b) => pe("matches" in b ? b.matches : i.matches);
|
|
3818
|
+
return g(i), i.addEventListener ? i.addEventListener("change", g) : i.addListener(g), () => {
|
|
3819
|
+
i.removeEventListener ? i.removeEventListener("change", g) : i.removeListener(g);
|
|
3722
3820
|
};
|
|
3723
|
-
}, []),
|
|
3821
|
+
}, []), z(() => {
|
|
3724
3822
|
if (typeof document > "u") return;
|
|
3725
|
-
const
|
|
3726
|
-
if (!
|
|
3823
|
+
const i = document.querySelector(`.${a.header}`);
|
|
3824
|
+
if (!i) return;
|
|
3727
3825
|
const g = () => {
|
|
3728
|
-
const
|
|
3729
|
-
document.documentElement.style.setProperty("--header-height-mobile", `${
|
|
3826
|
+
const W = i.offsetHeight;
|
|
3827
|
+
document.documentElement.style.setProperty("--header-height-mobile", `${W}px`);
|
|
3730
3828
|
};
|
|
3731
3829
|
g(), window.addEventListener("resize", g);
|
|
3732
|
-
const
|
|
3830
|
+
const b = new ResizeObserver(() => {
|
|
3733
3831
|
g();
|
|
3734
3832
|
});
|
|
3735
|
-
return
|
|
3736
|
-
window.removeEventListener("resize", g),
|
|
3833
|
+
return b.observe(i), () => {
|
|
3834
|
+
window.removeEventListener("resize", g), b.disconnect();
|
|
3737
3835
|
};
|
|
3738
|
-
}, [
|
|
3836
|
+
}, [X]), z(() => {
|
|
3739
3837
|
if (typeof document > "u") return;
|
|
3740
|
-
const
|
|
3741
|
-
if (!
|
|
3838
|
+
const i = document.querySelector(`.${a.logoWrapper}`);
|
|
3839
|
+
if (!i) return;
|
|
3742
3840
|
const g = () => {
|
|
3743
|
-
const
|
|
3744
|
-
document.documentElement.style.setProperty("--rk-logo-width", `${
|
|
3841
|
+
const b = i.offsetWidth;
|
|
3842
|
+
document.documentElement.style.setProperty("--rk-logo-width", `${b}px`);
|
|
3745
3843
|
};
|
|
3746
3844
|
return g(), window.addEventListener("resize", g), () => window.removeEventListener("resize", g);
|
|
3747
|
-
}, [
|
|
3748
|
-
if (typeof document > "u" || !
|
|
3845
|
+
}, [X]), z(() => {
|
|
3846
|
+
if (typeof document > "u" || !c) {
|
|
3749
3847
|
document.documentElement.style.setProperty("--rk-search-overlay-height", "0px");
|
|
3750
3848
|
return;
|
|
3751
3849
|
}
|
|
3752
|
-
const
|
|
3753
|
-
if (!
|
|
3850
|
+
const i = document.querySelector(`.${a.searchOverlay}`);
|
|
3851
|
+
if (!i) return;
|
|
3754
3852
|
const g = () => {
|
|
3755
|
-
const
|
|
3756
|
-
document.documentElement.style.setProperty("--rk-search-overlay-height", `${
|
|
3853
|
+
const W = i.offsetHeight;
|
|
3854
|
+
document.documentElement.style.setProperty("--rk-search-overlay-height", `${W}px`);
|
|
3757
3855
|
};
|
|
3758
3856
|
requestAnimationFrame(g), window.addEventListener("resize", g);
|
|
3759
|
-
const
|
|
3760
|
-
return
|
|
3761
|
-
window.removeEventListener("resize", g),
|
|
3857
|
+
const b = new ResizeObserver(g);
|
|
3858
|
+
return b.observe(i), () => {
|
|
3859
|
+
window.removeEventListener("resize", g), b.disconnect();
|
|
3762
3860
|
};
|
|
3763
|
-
}, [
|
|
3764
|
-
const
|
|
3765
|
-
const
|
|
3766
|
-
|
|
3767
|
-
},
|
|
3768
|
-
s && (
|
|
3769
|
-
},
|
|
3770
|
-
|
|
3771
|
-
const
|
|
3772
|
-
if (
|
|
3773
|
-
const g =
|
|
3861
|
+
}, [c]);
|
|
3862
|
+
const m = () => {
|
|
3863
|
+
const i = Y === "light" ? "dark" : "light";
|
|
3864
|
+
le(i), document.documentElement.setAttribute("data-color-scheme", i);
|
|
3865
|
+
}, N = (i) => {
|
|
3866
|
+
s && (i.preventDefault(), s("home")), ee(!1), v(!1);
|
|
3867
|
+
}, M = () => {
|
|
3868
|
+
ee(!_), c && v(!1), !_ && typeof document < "u" && requestAnimationFrame(() => {
|
|
3869
|
+
const i = document.querySelector(`.${a.header}`);
|
|
3870
|
+
if (i) {
|
|
3871
|
+
const g = i.offsetHeight;
|
|
3774
3872
|
document.documentElement.style.setProperty("--header-height-mobile", `${g}px`);
|
|
3775
3873
|
}
|
|
3776
3874
|
});
|
|
3777
|
-
},
|
|
3778
|
-
|
|
3779
|
-
},
|
|
3780
|
-
if (!
|
|
3781
|
-
const
|
|
3875
|
+
}, se = () => {
|
|
3876
|
+
v(!c), _ && ee(!1);
|
|
3877
|
+
}, te = ue(() => {
|
|
3878
|
+
if (!h.trim()) return [];
|
|
3879
|
+
const i = h.toLowerCase();
|
|
3782
3880
|
return Jr.filter(
|
|
3783
|
-
(g) => g.title.toLowerCase().startsWith(
|
|
3881
|
+
(g) => g.title.toLowerCase().startsWith(i)
|
|
3784
3882
|
);
|
|
3785
|
-
}, [
|
|
3786
|
-
s && s(
|
|
3883
|
+
}, [h]), Ce = (i) => {
|
|
3884
|
+
s && s(i), v(!1), T("");
|
|
3787
3885
|
};
|
|
3788
|
-
return /* @__PURE__ */ r("header", { className:
|
|
3789
|
-
d && /* @__PURE__ */ n("div", { className: `${
|
|
3790
|
-
|
|
3791
|
-
|
|
3886
|
+
return /* @__PURE__ */ r("header", { className: a.header, "data-open": _ ? "true" : "false", "data-color": t, children: [
|
|
3887
|
+
d && /* @__PURE__ */ n("div", { className: `${a.headerExtension}${R === "tinted" ? ` ${a.headerExtensionTinted}` : ""}`, "data-color-scheme": "light", "data-extension-color": R, children: /* @__PURE__ */ r("div", { className: a.extensionContentWrapper, children: [
|
|
3888
|
+
A && /* @__PURE__ */ n("div", { className: a.extensionContent, children: /* @__PURE__ */ n(
|
|
3889
|
+
_e,
|
|
3792
3890
|
{
|
|
3793
3891
|
"data-size": "sm",
|
|
3794
|
-
checked:
|
|
3795
|
-
onChange:
|
|
3892
|
+
checked: Y === "dark",
|
|
3893
|
+
onChange: m,
|
|
3796
3894
|
label: f("header.darkMode"),
|
|
3797
3895
|
color: "neutral",
|
|
3798
3896
|
"data-color-scheme": "light"
|
|
3799
3897
|
}
|
|
3800
3898
|
) }),
|
|
3801
|
-
|
|
3802
|
-
|
|
3803
|
-
/* @__PURE__ */ n("span", { className:
|
|
3899
|
+
A && S && /* @__PURE__ */ n("div", { className: a.extensionDivider }),
|
|
3900
|
+
S && /* @__PURE__ */ r("div", { className: a.languageSwitch, children: [
|
|
3901
|
+
/* @__PURE__ */ n("span", { className: a.languageLabel, children: f("header.language") }),
|
|
3804
3902
|
/* @__PURE__ */ r(V.TriggerContext, { children: [
|
|
3805
3903
|
/* @__PURE__ */ r(
|
|
3806
3904
|
V.Trigger,
|
|
3807
3905
|
{
|
|
3808
|
-
className:
|
|
3906
|
+
className: a.languageLink,
|
|
3809
3907
|
"aria-label": f("header.selectLanguage"),
|
|
3810
3908
|
style: { background: "transparent", border: "none", padding: 0, cursor: "pointer", font: "inherit" },
|
|
3811
3909
|
children: [
|
|
3812
|
-
|
|
3910
|
+
I,
|
|
3813
3911
|
" ",
|
|
3814
3912
|
/* @__PURE__ */ n(Me, { "aria-hidden": !0 })
|
|
3815
3913
|
]
|
|
@@ -3818,129 +3916,161 @@ const Jo = "_header_1e6zx_1", Qo = "_languageSwitch_1e6zx_37", er = "_searchOver
|
|
|
3818
3916
|
/* @__PURE__ */ n(
|
|
3819
3917
|
V,
|
|
3820
3918
|
{
|
|
3821
|
-
"data-color-scheme":
|
|
3919
|
+
"data-color-scheme": Y,
|
|
3822
3920
|
placement: "bottom-end",
|
|
3823
3921
|
children: /* @__PURE__ */ r(V.List, { children: [
|
|
3824
|
-
/* @__PURE__ */ n(V.Item, { children: /* @__PURE__ */ n(V.Button, { onClick: () =>
|
|
3825
|
-
/* @__PURE__ */ n(V.Item, { children: /* @__PURE__ */ n(V.Button, { onClick: () =>
|
|
3922
|
+
/* @__PURE__ */ n(V.Item, { children: /* @__PURE__ */ n(V.Button, { onClick: () => D("NO"), children: "Norsk (NO)" }) }),
|
|
3923
|
+
/* @__PURE__ */ n(V.Item, { children: /* @__PURE__ */ n(V.Button, { onClick: () => D("EN"), children: "English (EN)" }) })
|
|
3826
3924
|
] })
|
|
3827
3925
|
}
|
|
3828
3926
|
)
|
|
3829
3927
|
] })
|
|
3830
3928
|
] })
|
|
3831
3929
|
] }) }),
|
|
3832
|
-
/* @__PURE__ */ r("div", { className:
|
|
3833
|
-
/* @__PURE__ */ r("div", { className:
|
|
3930
|
+
/* @__PURE__ */ r("div", { className: a.headerInner, children: [
|
|
3931
|
+
/* @__PURE__ */ r("div", { className: a.logoWrapper, children: [
|
|
3834
3932
|
/* @__PURE__ */ n(
|
|
3835
|
-
|
|
3933
|
+
ne,
|
|
3836
3934
|
{
|
|
3837
3935
|
href: "/",
|
|
3838
|
-
className: `${
|
|
3936
|
+
className: `${a.logo} ${a.primaryLogo}`,
|
|
3839
3937
|
"aria-label": f("header.homeAriaLabel"),
|
|
3840
|
-
onClick:
|
|
3841
|
-
children: /* @__PURE__ */ n(
|
|
3938
|
+
onClick: N,
|
|
3939
|
+
children: /* @__PURE__ */ n(de, {})
|
|
3842
3940
|
}
|
|
3843
3941
|
),
|
|
3844
|
-
/* @__PURE__ */ n("div", { className:
|
|
3942
|
+
/* @__PURE__ */ n("div", { className: a.secondaryLogoWrapper, children: P && j ? /* @__PURE__ */ n(
|
|
3845
3943
|
"img",
|
|
3846
3944
|
{
|
|
3847
|
-
src:
|
|
3848
|
-
alt:
|
|
3849
|
-
className:
|
|
3945
|
+
src: Y === "dark" && l ? l : j,
|
|
3946
|
+
alt: Q,
|
|
3947
|
+
className: a.secondaryLogo
|
|
3850
3948
|
}
|
|
3851
|
-
) : P ? /* @__PURE__ */ n("div", { className:
|
|
3949
|
+
) : P ? /* @__PURE__ */ n("div", { className: a.slotComponent, children: /* @__PURE__ */ n("div", { className: a.slotContainer, children: /* @__PURE__ */ n("p", { className: a.slotText, children: "SLOT" }) }) }) : null })
|
|
3852
3950
|
] }),
|
|
3853
|
-
E &&
|
|
3854
|
-
|
|
3951
|
+
E && $ && $.length > 0 && !X && /* @__PURE__ */ n("nav", { className: a.navItems, children: $.map((i, g) => /* @__PURE__ */ n(
|
|
3952
|
+
ne,
|
|
3855
3953
|
{
|
|
3856
|
-
href:
|
|
3857
|
-
className:
|
|
3858
|
-
onClick: (
|
|
3859
|
-
s && (
|
|
3954
|
+
href: i.href,
|
|
3955
|
+
className: a.navLink,
|
|
3956
|
+
onClick: (b) => {
|
|
3957
|
+
s && (b.preventDefault(), s(i.href));
|
|
3860
3958
|
},
|
|
3861
|
-
children:
|
|
3959
|
+
children: i.label
|
|
3862
3960
|
},
|
|
3863
3961
|
g
|
|
3864
3962
|
)) }),
|
|
3865
|
-
/* @__PURE__ */ r("div", { className:
|
|
3866
|
-
|
|
3867
|
-
|
|
3963
|
+
/* @__PURE__ */ r("div", { className: a.actions, children: [
|
|
3964
|
+
x && /* @__PURE__ */ r(
|
|
3965
|
+
ie,
|
|
3868
3966
|
{
|
|
3869
3967
|
variant: "primary",
|
|
3870
3968
|
"data-color": "main",
|
|
3871
3969
|
"data-size": "md",
|
|
3872
|
-
className:
|
|
3873
|
-
onClick:
|
|
3970
|
+
className: a.ctaButton,
|
|
3971
|
+
onClick: U,
|
|
3874
3972
|
children: [
|
|
3875
3973
|
C,
|
|
3876
|
-
/* @__PURE__ */ n("span", { className: C ?
|
|
3974
|
+
/* @__PURE__ */ n("span", { className: C ? a.buttonText : void 0, children: F || f("header.supportUs") })
|
|
3877
3975
|
]
|
|
3878
3976
|
}
|
|
3879
3977
|
),
|
|
3880
|
-
!d &&
|
|
3881
|
-
|
|
3978
|
+
!d && w && /* @__PURE__ */ n("div", { className: a.themeToggle, children: /* @__PURE__ */ n(
|
|
3979
|
+
_e,
|
|
3882
3980
|
{
|
|
3883
|
-
checked:
|
|
3884
|
-
onChange:
|
|
3981
|
+
checked: Y === "dark",
|
|
3982
|
+
onChange: m,
|
|
3885
3983
|
"aria-label": f("header.toggleTheme")
|
|
3886
3984
|
}
|
|
3887
3985
|
) }),
|
|
3888
|
-
|
|
3889
|
-
|
|
3890
|
-
/* @__PURE__ */
|
|
3891
|
-
|
|
3892
|
-
|
|
3893
|
-
|
|
3894
|
-
|
|
3986
|
+
k && (() => {
|
|
3987
|
+
const i = L ?? "Frodo Baggins", g = O ?? (L ? Qr(L) : "FB"), b = !!K;
|
|
3988
|
+
return /* @__PURE__ */ r(
|
|
3989
|
+
"div",
|
|
3990
|
+
{
|
|
3991
|
+
className: a.userInfo,
|
|
3992
|
+
onClick: K,
|
|
3993
|
+
role: b ? "button" : void 0,
|
|
3994
|
+
tabIndex: b ? 0 : void 0,
|
|
3995
|
+
onKeyDown: b ? (W) => {
|
|
3996
|
+
(W.key === "Enter" || W.key === " ") && (W.preventDefault(), K == null || K());
|
|
3997
|
+
} : void 0,
|
|
3998
|
+
style: b ? { cursor: "pointer" } : void 0,
|
|
3999
|
+
children: [
|
|
4000
|
+
/* @__PURE__ */ n(be, { "data-size": "md", className: a.userName, children: i }),
|
|
4001
|
+
/* @__PURE__ */ n(
|
|
4002
|
+
Ve,
|
|
4003
|
+
{
|
|
4004
|
+
"aria-label": i,
|
|
4005
|
+
"data-color": "main",
|
|
4006
|
+
variant: "circle",
|
|
4007
|
+
initials: G ? void 0 : g,
|
|
4008
|
+
children: G ? /* @__PURE__ */ n(
|
|
4009
|
+
"img",
|
|
4010
|
+
{
|
|
4011
|
+
src: G,
|
|
4012
|
+
alt: "",
|
|
4013
|
+
style: { width: "100%", height: "100%", objectFit: "cover" }
|
|
4014
|
+
}
|
|
4015
|
+
) : void 0
|
|
4016
|
+
}
|
|
4017
|
+
)
|
|
4018
|
+
]
|
|
4019
|
+
}
|
|
4020
|
+
);
|
|
4021
|
+
})(),
|
|
4022
|
+
u && /* @__PURE__ */ r("a", { href: "#", className: a.loginLink, children: [
|
|
4023
|
+
/* @__PURE__ */ n(be, { "data-size": "md", className: a.loginText, children: f("header.login") }),
|
|
4024
|
+
/* @__PURE__ */ n("div", { className: a.underline })
|
|
3895
4025
|
] }),
|
|
3896
|
-
|
|
3897
|
-
|
|
4026
|
+
y && /* @__PURE__ */ n("div", { className: a.searchButtonWrapper, children: /* @__PURE__ */ r(
|
|
4027
|
+
ie,
|
|
3898
4028
|
{
|
|
3899
4029
|
variant: "secondary",
|
|
3900
4030
|
"data-color": "main",
|
|
3901
4031
|
"data-size": "md",
|
|
3902
|
-
onClick:
|
|
3903
|
-
"aria-expanded":
|
|
3904
|
-
"aria-label": f(
|
|
4032
|
+
onClick: se,
|
|
4033
|
+
"aria-expanded": c,
|
|
4034
|
+
"aria-label": f(c ? "header.closeSearch" : "header.openSearch"),
|
|
3905
4035
|
children: [
|
|
3906
|
-
|
|
3907
|
-
/* @__PURE__ */ n("span", { className:
|
|
4036
|
+
c ? /* @__PURE__ */ n(je, { "aria-hidden": !0 }) : /* @__PURE__ */ n(Fe, { "aria-hidden": !0 }),
|
|
4037
|
+
/* @__PURE__ */ n("span", { className: a.buttonText, children: f(c ? "header.close" : "header.search") })
|
|
3908
4038
|
]
|
|
3909
4039
|
}
|
|
3910
4040
|
) }),
|
|
3911
|
-
(
|
|
3912
|
-
|
|
4041
|
+
(Z || X) && /* @__PURE__ */ r(
|
|
4042
|
+
ie,
|
|
3913
4043
|
{
|
|
3914
4044
|
variant: "primary",
|
|
3915
4045
|
"data-color": "main",
|
|
3916
4046
|
"data-size": "md",
|
|
3917
|
-
onClick:
|
|
3918
|
-
"aria-expanded":
|
|
3919
|
-
"aria-label": f(
|
|
3920
|
-
className:
|
|
4047
|
+
onClick: M,
|
|
4048
|
+
"aria-expanded": _,
|
|
4049
|
+
"aria-label": f(_ ? "header.closeMenu" : "header.openMenu"),
|
|
4050
|
+
className: a.menuButton,
|
|
3921
4051
|
children: [
|
|
3922
|
-
|
|
3923
|
-
/* @__PURE__ */ n("span", { className:
|
|
4052
|
+
_ ? /* @__PURE__ */ n(je, { "aria-hidden": !0 }) : /* @__PURE__ */ n(mn, { "aria-hidden": !0 }),
|
|
4053
|
+
/* @__PURE__ */ n("span", { className: a.buttonText, children: f(_ ? "header.close" : "header.menu") })
|
|
3924
4054
|
]
|
|
3925
4055
|
}
|
|
3926
4056
|
)
|
|
3927
4057
|
] })
|
|
3928
4058
|
] }),
|
|
3929
|
-
|
|
3930
|
-
/* @__PURE__ */ n("div", { className:
|
|
3931
|
-
/* @__PURE__ */ r("div", { className:
|
|
3932
|
-
|
|
3933
|
-
|
|
3934
|
-
/* @__PURE__ */ n("span", { className:
|
|
4059
|
+
_ && /* @__PURE__ */ n("div", { className: a.menuOverlay, children: /* @__PURE__ */ r("div", { className: a.menuContent, children: [
|
|
4060
|
+
/* @__PURE__ */ n("div", { className: a.menuLeftColumn }),
|
|
4061
|
+
/* @__PURE__ */ r("div", { className: a.menuRightColumn, children: [
|
|
4062
|
+
X && (S || A) && /* @__PURE__ */ r("div", { className: a.menuUtilities, children: [
|
|
4063
|
+
S && /* @__PURE__ */ r("div", { className: a.languageSwitch, children: [
|
|
4064
|
+
/* @__PURE__ */ n("span", { className: a.languageLabel, children: f("header.language") }),
|
|
3935
4065
|
/* @__PURE__ */ r(V.TriggerContext, { children: [
|
|
3936
4066
|
/* @__PURE__ */ r(
|
|
3937
4067
|
V.Trigger,
|
|
3938
4068
|
{
|
|
3939
|
-
className:
|
|
4069
|
+
className: a.languageLink,
|
|
3940
4070
|
"aria-label": f("header.selectLanguage"),
|
|
3941
4071
|
style: { background: "transparent", border: "none", padding: 0, cursor: "pointer", font: "inherit" },
|
|
3942
4072
|
children: [
|
|
3943
|
-
|
|
4073
|
+
I,
|
|
3944
4074
|
" ",
|
|
3945
4075
|
/* @__PURE__ */ n(Me, { "aria-hidden": !0 })
|
|
3946
4076
|
]
|
|
@@ -3949,109 +4079,109 @@ const Jo = "_header_1e6zx_1", Qo = "_languageSwitch_1e6zx_37", er = "_searchOver
|
|
|
3949
4079
|
/* @__PURE__ */ n(
|
|
3950
4080
|
V,
|
|
3951
4081
|
{
|
|
3952
|
-
"data-color-scheme":
|
|
4082
|
+
"data-color-scheme": Y,
|
|
3953
4083
|
placement: "bottom-start",
|
|
3954
4084
|
children: /* @__PURE__ */ r(V.List, { children: [
|
|
3955
|
-
/* @__PURE__ */ n(V.Item, { children: /* @__PURE__ */ n(V.Button, { onClick: () =>
|
|
3956
|
-
/* @__PURE__ */ n(V.Item, { children: /* @__PURE__ */ n(V.Button, { onClick: () =>
|
|
4085
|
+
/* @__PURE__ */ n(V.Item, { children: /* @__PURE__ */ n(V.Button, { onClick: () => D("NO"), children: "Norsk (NO)" }) }),
|
|
4086
|
+
/* @__PURE__ */ n(V.Item, { children: /* @__PURE__ */ n(V.Button, { onClick: () => D("EN"), children: "English (EN)" }) })
|
|
3957
4087
|
] })
|
|
3958
4088
|
}
|
|
3959
4089
|
)
|
|
3960
4090
|
] })
|
|
3961
4091
|
] }),
|
|
3962
|
-
|
|
3963
|
-
|
|
4092
|
+
A && /* @__PURE__ */ n("div", { className: a.extensionContent, children: /* @__PURE__ */ n(
|
|
4093
|
+
_e,
|
|
3964
4094
|
{
|
|
3965
4095
|
"data-size": "sm",
|
|
3966
|
-
checked:
|
|
3967
|
-
onChange:
|
|
4096
|
+
checked: Y === "dark",
|
|
4097
|
+
onChange: m,
|
|
3968
4098
|
label: f("header.darkMode"),
|
|
3969
4099
|
color: "neutral",
|
|
3970
4100
|
"data-color-scheme": "light"
|
|
3971
4101
|
}
|
|
3972
4102
|
) })
|
|
3973
4103
|
] }),
|
|
3974
|
-
/* @__PURE__ */ r("div", { className:
|
|
3975
|
-
|
|
3976
|
-
|
|
3977
|
-
|
|
4104
|
+
/* @__PURE__ */ r("div", { className: a.slotContent, children: [
|
|
4105
|
+
p,
|
|
4106
|
+
X && E && $ && $.length > 0 && /* @__PURE__ */ n("nav", { className: a.navList, children: $.map((i, g) => /* @__PURE__ */ n(
|
|
4107
|
+
ne,
|
|
3978
4108
|
{
|
|
3979
|
-
href:
|
|
3980
|
-
className:
|
|
3981
|
-
onClick: (
|
|
3982
|
-
s && (
|
|
4109
|
+
href: i.href,
|
|
4110
|
+
className: a.navLink,
|
|
4111
|
+
onClick: (b) => {
|
|
4112
|
+
s && (b.preventDefault(), s(i.href));
|
|
3983
4113
|
},
|
|
3984
|
-
children:
|
|
4114
|
+
children: i.label
|
|
3985
4115
|
},
|
|
3986
4116
|
g
|
|
3987
4117
|
)) })
|
|
3988
4118
|
] }),
|
|
3989
|
-
|
|
4119
|
+
X && /* @__PURE__ */ n("div", { className: a.menuBrand, children: /* @__PURE__ */ n(de, {}) })
|
|
3990
4120
|
] })
|
|
3991
4121
|
] }) }),
|
|
3992
|
-
|
|
3993
|
-
/* @__PURE__ */ r(
|
|
4122
|
+
c && /* @__PURE__ */ n("div", { className: a.searchOverlay, children: /* @__PURE__ */ r("div", { className: a.searchContent, children: [
|
|
4123
|
+
/* @__PURE__ */ r(xe, { children: [
|
|
3994
4124
|
/* @__PURE__ */ n(
|
|
3995
|
-
|
|
4125
|
+
xe.Input,
|
|
3996
4126
|
{
|
|
3997
4127
|
"aria-label": f("header.search"),
|
|
3998
4128
|
placeholder: f("header.searchPlaceholder"),
|
|
3999
|
-
value:
|
|
4000
|
-
onChange: (
|
|
4129
|
+
value: h,
|
|
4130
|
+
onChange: (i) => T(i.target.value)
|
|
4001
4131
|
}
|
|
4002
4132
|
),
|
|
4003
|
-
/* @__PURE__ */ n(
|
|
4004
|
-
/* @__PURE__ */ n(
|
|
4133
|
+
/* @__PURE__ */ n(xe.Button, { "aria-label": f("header.search") }),
|
|
4134
|
+
/* @__PURE__ */ n(xe.ClearButton, { onClick: () => T(""), "aria-label": f("header.clearSearch") })
|
|
4005
4135
|
] }),
|
|
4006
|
-
|
|
4007
|
-
/* @__PURE__ */ n("h3", { className:
|
|
4008
|
-
/* @__PURE__ */ n("ul", { className:
|
|
4136
|
+
h && /* @__PURE__ */ n("div", { className: a.searchResults, children: te.length > 0 ? /* @__PURE__ */ r("div", { className: a.suggestionsSection, children: [
|
|
4137
|
+
/* @__PURE__ */ n("h3", { className: a.suggestionsTitle, children: f("header.suggestions") }),
|
|
4138
|
+
/* @__PURE__ */ n("ul", { className: a.resultList, children: te.slice(0, 5).map((i) => /* @__PURE__ */ n("li", { className: a.resultItem, children: /* @__PURE__ */ r(
|
|
4009
4139
|
"button",
|
|
4010
4140
|
{
|
|
4011
|
-
className:
|
|
4012
|
-
onClick: () =>
|
|
4141
|
+
className: a.resultLink,
|
|
4142
|
+
onClick: () => Ce(i.path),
|
|
4013
4143
|
children: [
|
|
4014
|
-
/* @__PURE__ */ n("span", { className:
|
|
4015
|
-
/* @__PURE__ */ n("span", { className:
|
|
4016
|
-
const g =
|
|
4017
|
-
if (g === -1) return /* @__PURE__ */ n("span", { className:
|
|
4018
|
-
const
|
|
4144
|
+
/* @__PURE__ */ n("span", { className: a.suggestionIcon, children: /* @__PURE__ */ n(Fe, { "aria-hidden": !0 }) }),
|
|
4145
|
+
/* @__PURE__ */ n("span", { className: a.suggestionText, children: (() => {
|
|
4146
|
+
const g = i.title.toLowerCase().indexOf(h.toLowerCase());
|
|
4147
|
+
if (g === -1) return /* @__PURE__ */ n("span", { className: a.remainingText, children: i.title });
|
|
4148
|
+
const b = i.title.slice(0, g), W = i.title.slice(g, g + h.length), ce = i.title.slice(g + h.length);
|
|
4019
4149
|
return /* @__PURE__ */ r(Re, { children: [
|
|
4020
|
-
/* @__PURE__ */ n("span", { className:
|
|
4021
|
-
/* @__PURE__ */ n("span", { className:
|
|
4022
|
-
/* @__PURE__ */ n("span", { className:
|
|
4150
|
+
/* @__PURE__ */ n("span", { className: a.remainingText, children: b }),
|
|
4151
|
+
/* @__PURE__ */ n("span", { className: a.highlightedText, children: W }),
|
|
4152
|
+
/* @__PURE__ */ n("span", { className: a.remainingText, children: ce })
|
|
4023
4153
|
] });
|
|
4024
4154
|
})() })
|
|
4025
4155
|
]
|
|
4026
4156
|
}
|
|
4027
|
-
) },
|
|
4028
|
-
|
|
4029
|
-
|
|
4157
|
+
) }, i.id)) }),
|
|
4158
|
+
te.length > 5 && /* @__PURE__ */ r(
|
|
4159
|
+
ne,
|
|
4030
4160
|
{
|
|
4031
4161
|
href: "#",
|
|
4032
4162
|
"data-color": "neutral",
|
|
4033
|
-
className:
|
|
4034
|
-
onClick: (
|
|
4035
|
-
|
|
4163
|
+
className: a.viewAllLink,
|
|
4164
|
+
onClick: (i) => {
|
|
4165
|
+
i.preventDefault(), s && s(`search/${h}`), v(!1), T("");
|
|
4036
4166
|
},
|
|
4037
4167
|
children: [
|
|
4038
4168
|
f("header.viewAll"),
|
|
4039
4169
|
" (",
|
|
4040
|
-
|
|
4170
|
+
te.length,
|
|
4041
4171
|
")"
|
|
4042
4172
|
]
|
|
4043
4173
|
}
|
|
4044
4174
|
)
|
|
4045
|
-
] }) : /* @__PURE__ */ n("div", { className:
|
|
4175
|
+
] }) : /* @__PURE__ */ n("div", { className: a.noResults, children: /* @__PURE__ */ r(be, { children: [
|
|
4046
4176
|
f("header.noResults"),
|
|
4047
4177
|
' "',
|
|
4048
|
-
|
|
4178
|
+
h,
|
|
4049
4179
|
'"'
|
|
4050
4180
|
] }) }) })
|
|
4051
4181
|
] }) })
|
|
4052
4182
|
] });
|
|
4053
4183
|
};
|
|
4054
|
-
function
|
|
4184
|
+
function es(t) {
|
|
4055
4185
|
const e = t;
|
|
4056
4186
|
return `
|
|
4057
4187
|
.${e.header} {
|
|
@@ -4132,7 +4262,7 @@ function Qr(t) {
|
|
|
4132
4262
|
.${e.redCrossLogo} { width: 169px; height: auto; display: block; }
|
|
4133
4263
|
.${e.secondaryLogoWrapper} { display: flex; align-items: center; justify-content: center; height: 100%; padding: 0 var(--ds-size-6); background: var(--ds-color-neutral-background-default); }
|
|
4134
4264
|
.${e.secondaryLogo} { height: 24px; width: auto; display: block; }
|
|
4135
|
-
.${e.navItems} { display: flex; gap: 40px; align-items: center; margin-left: 24px; flex-grow: 1; justify-content:
|
|
4265
|
+
.${e.navItems} { display: flex; gap: 40px; align-items: center; margin-left: 24px; flex-grow: 1; justify-content: center; }
|
|
4136
4266
|
.${e.navLink} { color: var(--ds-color-primary-color-red-text-default); font-family: inherit; font-size: var(--ds-font-size-md); text-decoration: none; font-weight: var(--ds-font-weight-regular); letter-spacing: 0.09px; }
|
|
4137
4267
|
.${e.navLink}:hover { text-decoration: underline; }
|
|
4138
4268
|
.${e.actions} { display: flex; align-items: center; gap: var(--ds-size-6); flex-shrink: 0; margin-left: auto; }
|
|
@@ -4216,97 +4346,97 @@ function Qr(t) {
|
|
|
4216
4346
|
}
|
|
4217
4347
|
`;
|
|
4218
4348
|
}
|
|
4219
|
-
const
|
|
4220
|
-
footer:
|
|
4221
|
-
mainSection:
|
|
4222
|
-
mainContainer:
|
|
4223
|
-
crossCornerTopRight:
|
|
4224
|
-
crossCornerBottomLeft:
|
|
4225
|
-
contentRow:
|
|
4226
|
-
newsletterSection:
|
|
4227
|
-
newsletterDescription:
|
|
4228
|
-
newsletterForm:
|
|
4229
|
-
newsletterInputGroup:
|
|
4230
|
-
newsletterInput:
|
|
4231
|
-
consentText:
|
|
4232
|
-
linksSection:
|
|
4233
|
-
linksColumn:
|
|
4234
|
-
linksTitle:
|
|
4235
|
-
linksList:
|
|
4236
|
-
footerLink:
|
|
4237
|
-
divider:
|
|
4238
|
-
contactSection:
|
|
4239
|
-
contactColumn:
|
|
4240
|
-
contactTitle:
|
|
4241
|
-
contactContent:
|
|
4242
|
-
copyrightSection:
|
|
4243
|
-
copyrightText:
|
|
4244
|
-
whiteSection:
|
|
4245
|
-
whiteContainer:
|
|
4246
|
-
whiteContent:
|
|
4247
|
-
logo:
|
|
4248
|
-
redCrossLogo:
|
|
4249
|
-
slotLarge:
|
|
4250
|
-
contentRowContact:
|
|
4251
|
-
socialLinksSection:
|
|
4252
|
-
socialLinksTitle:
|
|
4253
|
-
socialLinksList:
|
|
4254
|
-
socialLink:
|
|
4255
|
-
socialLinkIcon:
|
|
4256
|
-
contactPersonsSection:
|
|
4257
|
-
contactPersonsTitle:
|
|
4349
|
+
const ts = "_footer_1l5de_1", ns = "_mainSection_1l5de_7", os = "_mainContainer_1l5de_25", rs = "_crossCornerTopRight_1l5de_35", ss = "_crossCornerBottomLeft_1l5de_42", as = "_contentRow_1l5de_50", is = "_newsletterSection_1l5de_60", ls = "_newsletterDescription_1l5de_67", ds = "_newsletterForm_1l5de_76", cs = "_newsletterInputGroup_1l5de_82", ps = "_newsletterInput_1l5de_82", ms = "_consentText_1l5de_93", gs = "_linksSection_1l5de_103", us = "_linksColumn_1l5de_109", hs = "_linksTitle_1l5de_116", fs = "_linksList_1l5de_127", ks = "_footerLink_1l5de_136", vs = "_divider_1l5de_158", bs = "_contactSection_1l5de_166", ys = "_contactColumn_1l5de_173", xs = "_contactTitle_1l5de_181", Ts = "_contactContent_1l5de_190", Cs = "_copyrightSection_1l5de_204", ws = "_copyrightText_1l5de_209", Ss = "_whiteSection_1l5de_219", Is = "_whiteContainer_1l5de_224", _s = "_whiteContent_1l5de_232", Ds = "_logo_1l5de_240", As = "_redCrossLogo_1l5de_254", Ls = "_slotLarge_1l5de_260", Ns = "_contentRowContact_1l5de_315", Ms = "_socialLinksSection_1l5de_325", js = "_socialLinksTitle_1l5de_332", Fs = "_socialLinksList_1l5de_343", Es = "_socialLink_1l5de_325", Bs = "_socialLinkIcon_1l5de_376", zs = "_contactPersonsSection_1l5de_391", Ps = "_contactPersonsTitle_1l5de_398", $s = "_contactPersonsGrid_1l5de_409", Rs = "_contactPersonCard_1l5de_415", Gs = "_contactPersonName_1l5de_422", Ws = "_contactPersonRole_1l5de_431", Hs = "_contactPersonDetails_1l5de_440", Us = "_contactPersonLabel_1l5de_447", Vs = "_contactPersonEmail_1l5de_451", Os = "_contactPersonPhone_1l5de_452", Ks = "_contactPersonAddress_1l5de_453", qs = "_bottomRowContact_1l5de_474", Ys = "_legalLinksRow_1l5de_483", Zs = "_legalLink_1l5de_483", o = {
|
|
4350
|
+
footer: ts,
|
|
4351
|
+
mainSection: ns,
|
|
4352
|
+
mainContainer: os,
|
|
4353
|
+
crossCornerTopRight: rs,
|
|
4354
|
+
crossCornerBottomLeft: ss,
|
|
4355
|
+
contentRow: as,
|
|
4356
|
+
newsletterSection: is,
|
|
4357
|
+
newsletterDescription: ls,
|
|
4358
|
+
newsletterForm: ds,
|
|
4359
|
+
newsletterInputGroup: cs,
|
|
4360
|
+
newsletterInput: ps,
|
|
4361
|
+
consentText: ms,
|
|
4362
|
+
linksSection: gs,
|
|
4363
|
+
linksColumn: us,
|
|
4364
|
+
linksTitle: hs,
|
|
4365
|
+
linksList: fs,
|
|
4366
|
+
footerLink: ks,
|
|
4367
|
+
divider: vs,
|
|
4368
|
+
contactSection: bs,
|
|
4369
|
+
contactColumn: ys,
|
|
4370
|
+
contactTitle: xs,
|
|
4371
|
+
contactContent: Ts,
|
|
4372
|
+
copyrightSection: Cs,
|
|
4373
|
+
copyrightText: ws,
|
|
4374
|
+
whiteSection: Ss,
|
|
4375
|
+
whiteContainer: Is,
|
|
4376
|
+
whiteContent: _s,
|
|
4377
|
+
logo: Ds,
|
|
4378
|
+
redCrossLogo: As,
|
|
4379
|
+
slotLarge: Ls,
|
|
4380
|
+
contentRowContact: Ns,
|
|
4381
|
+
socialLinksSection: Ms,
|
|
4382
|
+
socialLinksTitle: js,
|
|
4383
|
+
socialLinksList: Fs,
|
|
4384
|
+
socialLink: Es,
|
|
4385
|
+
socialLinkIcon: Bs,
|
|
4386
|
+
contactPersonsSection: zs,
|
|
4387
|
+
contactPersonsTitle: Ps,
|
|
4258
4388
|
contactPersonsGrid: $s,
|
|
4259
|
-
contactPersonCard:
|
|
4260
|
-
contactPersonName:
|
|
4261
|
-
contactPersonRole:
|
|
4262
|
-
contactPersonDetails:
|
|
4263
|
-
contactPersonLabel:
|
|
4264
|
-
contactPersonEmail:
|
|
4265
|
-
contactPersonPhone:
|
|
4266
|
-
contactPersonAddress:
|
|
4267
|
-
bottomRowContact:
|
|
4268
|
-
legalLinksRow:
|
|
4269
|
-
legalLink:
|
|
4270
|
-
},
|
|
4389
|
+
contactPersonCard: Rs,
|
|
4390
|
+
contactPersonName: Gs,
|
|
4391
|
+
contactPersonRole: Ws,
|
|
4392
|
+
contactPersonDetails: Hs,
|
|
4393
|
+
contactPersonLabel: Us,
|
|
4394
|
+
contactPersonEmail: Vs,
|
|
4395
|
+
contactPersonPhone: Os,
|
|
4396
|
+
contactPersonAddress: Ks,
|
|
4397
|
+
bottomRowContact: qs,
|
|
4398
|
+
legalLinksRow: Ys,
|
|
4399
|
+
legalLink: Zs
|
|
4400
|
+
}, ci = ({
|
|
4271
4401
|
"data-color": t = "neutral",
|
|
4272
4402
|
variant: e = "default",
|
|
4273
4403
|
showCrossCorners: s = !1,
|
|
4274
|
-
newsletterDescription:
|
|
4275
|
-
newsletterPlaceholder:
|
|
4276
|
-
newsletterButtonText:
|
|
4404
|
+
newsletterDescription: p = "Tekst om rødekors som kan være rundt 2 linjebrudd i lengde.",
|
|
4405
|
+
newsletterPlaceholder: k = "Input tekst",
|
|
4406
|
+
newsletterButtonText: y = "Meld deg på",
|
|
4277
4407
|
newsletterConsentText: u,
|
|
4278
|
-
onNewsletterSubmit:
|
|
4408
|
+
onNewsletterSubmit: x,
|
|
4279
4409
|
hideNewsletter: F = !1,
|
|
4280
4410
|
shortcutsLinks: C,
|
|
4281
|
-
linksLinks:
|
|
4282
|
-
shortcutsTitle:
|
|
4411
|
+
linksLinks: U,
|
|
4412
|
+
shortcutsTitle: w,
|
|
4283
4413
|
linksTitle: P,
|
|
4284
|
-
visitingAddress:
|
|
4414
|
+
visitingAddress: j = ["Hausmannsgate 7 (Korsegården)", "0186 Oslo"],
|
|
4285
4415
|
organizationNumber: l = "XXX XXX XXX",
|
|
4286
|
-
email:
|
|
4287
|
-
showPrimaryLogo:
|
|
4416
|
+
email: Q = "post@redcross.no",
|
|
4417
|
+
showPrimaryLogo: $ = !0,
|
|
4288
4418
|
primaryLogoSrc: E,
|
|
4289
|
-
primaryLogoAlt:
|
|
4419
|
+
primaryLogoAlt: Z = "Røde Kors Logo",
|
|
4290
4420
|
whiteSectionSlot: d,
|
|
4291
|
-
socialLinks:
|
|
4292
|
-
contactPersons:
|
|
4293
|
-
legalLinks:
|
|
4294
|
-
socialLinksTitle:
|
|
4295
|
-
contactPersonsTitle:
|
|
4421
|
+
socialLinks: A = [],
|
|
4422
|
+
contactPersons: S = [],
|
|
4423
|
+
legalLinks: R = [],
|
|
4424
|
+
socialLinksTitle: L,
|
|
4425
|
+
contactPersonsTitle: O
|
|
4296
4426
|
} = {}) => {
|
|
4297
|
-
const
|
|
4298
|
-
const
|
|
4299
|
-
return
|
|
4427
|
+
const G = (/* @__PURE__ */ new Date()).getFullYear(), { t: K } = ye(), [_, ee] = De.useState(""), c = (m, N) => {
|
|
4428
|
+
const M = K(m);
|
|
4429
|
+
return M === m ? N : M;
|
|
4300
4430
|
};
|
|
4301
|
-
|
|
4302
|
-
const
|
|
4303
|
-
if (typeof document > "u" || document.getElementById(
|
|
4304
|
-
const N =
|
|
4305
|
-
|
|
4431
|
+
De.useEffect(() => {
|
|
4432
|
+
const m = "rk-footer-inline-styles";
|
|
4433
|
+
if (typeof document > "u" || document.getElementById(m)) return;
|
|
4434
|
+
const N = Xs(o), M = document.createElement("style");
|
|
4435
|
+
M.id = m, M.textContent = N, document.head.appendChild(M);
|
|
4306
4436
|
}, []);
|
|
4307
|
-
const
|
|
4308
|
-
|
|
4309
|
-
},
|
|
4437
|
+
const v = (m) => {
|
|
4438
|
+
m.preventDefault(), x == null || x(_);
|
|
4439
|
+
}, h = () => /* @__PURE__ */ r(
|
|
4310
4440
|
"svg",
|
|
4311
4441
|
{
|
|
4312
4442
|
width: "170",
|
|
@@ -4330,175 +4460,175 @@ const es = "_footer_1l5de_1", ts = "_mainSection_1l5de_7", ns = "_mainContainer_
|
|
|
4330
4460
|
/* @__PURE__ */ n("path", { d: "M63.2545 52.9331H24.0869V66.0625H63.2545V52.9331Z", fill: "#D52B1E" })
|
|
4331
4461
|
]
|
|
4332
4462
|
}
|
|
4333
|
-
),
|
|
4334
|
-
{ label:
|
|
4335
|
-
{ label:
|
|
4336
|
-
{ label:
|
|
4337
|
-
{ label:
|
|
4338
|
-
{ label:
|
|
4339
|
-
{ label:
|
|
4340
|
-
],
|
|
4341
|
-
{ label:
|
|
4342
|
-
{ label:
|
|
4343
|
-
{ label:
|
|
4344
|
-
{ label:
|
|
4345
|
-
],
|
|
4463
|
+
), T = [
|
|
4464
|
+
{ label: c("footer.shortcutsLinks.services", "Tilbudene"), href: "#" },
|
|
4465
|
+
{ label: c("footer.shortcutsLinks.volunteer", "Bli frivillig"), href: "#" },
|
|
4466
|
+
{ label: c("footer.shortcutsLinks.ourWork", "Vårt arbeid"), href: "#" },
|
|
4467
|
+
{ label: c("footer.shortcutsLinks.about", "Om Røde Kors"), href: "#" },
|
|
4468
|
+
{ label: c("footer.shortcutsLinks.support", "Støtt arbeidet"), href: "#" },
|
|
4469
|
+
{ label: c("footer.shortcutsLinks.contact", "Kontakt oss"), href: "#" }
|
|
4470
|
+
], Y = [
|
|
4471
|
+
{ label: c("footer.legal.privacy", "Personvern"), href: "#" },
|
|
4472
|
+
{ label: c("footer.legal.press", "For presse"), href: "#" },
|
|
4473
|
+
{ label: c("footer.legal.procurement", "Regler for innkjøp"), href: "#" },
|
|
4474
|
+
{ label: c("footer.legal.whistleblowing", "Varsling/Misconduct"), href: "#" }
|
|
4475
|
+
], le = /* @__PURE__ */ r(Re, { children: [
|
|
4346
4476
|
'Ved å trykke "',
|
|
4347
|
-
|
|
4477
|
+
y,
|
|
4348
4478
|
'" samtykker du til å motta nyhetsbrev.',
|
|
4349
4479
|
/* @__PURE__ */ n("br", {}),
|
|
4350
4480
|
"Du kan når som helst ",
|
|
4351
|
-
/* @__PURE__ */ n(
|
|
4481
|
+
/* @__PURE__ */ n(ne, { href: "#", children: "melde deg av" }),
|
|
4352
4482
|
" nyhetsbrevet uten kostnad."
|
|
4353
|
-
] }),
|
|
4354
|
-
|
|
4355
|
-
/* @__PURE__ */ n("ul", { className: o.socialLinksList, children:
|
|
4356
|
-
/* @__PURE__ */ n("span", { className: o.socialLinkIcon, children:
|
|
4357
|
-
|
|
4483
|
+
] }), I = C || T, D = U || Y, f = () => /* @__PURE__ */ r("div", { className: o.socialLinksSection, children: [
|
|
4484
|
+
L && /* @__PURE__ */ n("h3", { className: o.socialLinksTitle, children: L }),
|
|
4485
|
+
/* @__PURE__ */ n("ul", { className: o.socialLinksList, children: A.map((m, N) => /* @__PURE__ */ n("li", { children: /* @__PURE__ */ r(ne, { href: m.href, className: o.socialLink, children: [
|
|
4486
|
+
/* @__PURE__ */ n("span", { className: o.socialLinkIcon, children: m.icon }),
|
|
4487
|
+
m.label
|
|
4358
4488
|
] }) }, N)) })
|
|
4359
|
-
] }),
|
|
4360
|
-
/* @__PURE__ */ n("p", { className: o.contactPersonName, children:
|
|
4361
|
-
/* @__PURE__ */ n("p", { className: o.contactPersonRole, children:
|
|
4489
|
+
] }), X = ({ person: m }) => /* @__PURE__ */ r("div", { className: o.contactPersonCard, children: [
|
|
4490
|
+
/* @__PURE__ */ n("p", { className: o.contactPersonName, children: m.name }),
|
|
4491
|
+
/* @__PURE__ */ n("p", { className: o.contactPersonRole, children: m.role }),
|
|
4362
4492
|
/* @__PURE__ */ r("div", { className: o.contactPersonDetails, children: [
|
|
4363
4493
|
/* @__PURE__ */ r("p", { className: o.contactPersonEmail, children: [
|
|
4364
4494
|
/* @__PURE__ */ r("span", { className: o.contactPersonLabel, children: [
|
|
4365
|
-
|
|
4495
|
+
c("footer.contact.email", "E-post"),
|
|
4366
4496
|
":"
|
|
4367
4497
|
] }),
|
|
4368
4498
|
" ",
|
|
4369
|
-
/* @__PURE__ */ n(
|
|
4499
|
+
/* @__PURE__ */ n(ne, { href: `mailto:${m.email}`, children: m.email })
|
|
4370
4500
|
] }),
|
|
4371
|
-
|
|
4501
|
+
m.phone && /* @__PURE__ */ r("p", { className: o.contactPersonPhone, children: [
|
|
4372
4502
|
/* @__PURE__ */ r("span", { className: o.contactPersonLabel, children: [
|
|
4373
|
-
|
|
4503
|
+
c("footer.contact.phone", "Telefon"),
|
|
4374
4504
|
":"
|
|
4375
4505
|
] }),
|
|
4376
4506
|
" ",
|
|
4377
|
-
|
|
4507
|
+
m.phone
|
|
4378
4508
|
] }),
|
|
4379
|
-
|
|
4509
|
+
m.address && /* @__PURE__ */ n("p", { className: o.contactPersonAddress, children: m.address })
|
|
4380
4510
|
] })
|
|
4381
|
-
] }),
|
|
4382
|
-
|
|
4383
|
-
/* @__PURE__ */ n("div", { className: o.contactPersonsGrid, children:
|
|
4384
|
-
] }),
|
|
4511
|
+
] }), pe = () => /* @__PURE__ */ r("div", { className: o.contactPersonsSection, children: [
|
|
4512
|
+
O && /* @__PURE__ */ n("h3", { className: o.contactPersonsTitle, children: O }),
|
|
4513
|
+
/* @__PURE__ */ n("div", { className: o.contactPersonsGrid, children: S.map((m, N) => /* @__PURE__ */ n(X, { person: m }, N)) })
|
|
4514
|
+
] }), de = () => /* @__PURE__ */ n("ul", { className: o.legalLinksRow, children: R.map((m, N) => /* @__PURE__ */ n("li", { children: /* @__PURE__ */ n(ne, { href: m.href, className: o.legalLink, children: m.label }) }, N)) });
|
|
4385
4515
|
return e === "contact" ? /* @__PURE__ */ r("footer", { className: o.footer, "data-color": t, children: [
|
|
4386
4516
|
/* @__PURE__ */ n("div", { className: o.mainSection, children: /* @__PURE__ */ r("div", { className: o.mainContainer, children: [
|
|
4387
|
-
s && /* @__PURE__ */ n("div", { className: o.crossCornerTopRight, children: /* @__PURE__ */ n(
|
|
4517
|
+
s && /* @__PURE__ */ n("div", { className: o.crossCornerTopRight, children: /* @__PURE__ */ n(ve, { position: "top-right", size: "md", "aria-hidden": !0 }) }),
|
|
4388
4518
|
/* @__PURE__ */ r("div", { className: o.contentRowContact, children: [
|
|
4389
|
-
|
|
4390
|
-
|
|
4519
|
+
A.length > 0 && /* @__PURE__ */ n(f, {}),
|
|
4520
|
+
S.length > 0 && /* @__PURE__ */ n(pe, {})
|
|
4391
4521
|
] }),
|
|
4392
4522
|
/* @__PURE__ */ n("div", { className: o.divider }),
|
|
4393
4523
|
/* @__PURE__ */ r("div", { className: o.contactSection, children: [
|
|
4394
4524
|
/* @__PURE__ */ r("div", { className: o.contactColumn, children: [
|
|
4395
|
-
/* @__PURE__ */ n("h4", { className: o.contactTitle, children:
|
|
4396
|
-
/* @__PURE__ */ n("div", { className: o.contactContent, children:
|
|
4525
|
+
/* @__PURE__ */ n("h4", { className: o.contactTitle, children: c("footer.contact.visitingAddress", "Besøks adresse") }),
|
|
4526
|
+
/* @__PURE__ */ n("div", { className: o.contactContent, children: j.map((m, N) => /* @__PURE__ */ n("p", { children: m }, N)) })
|
|
4397
4527
|
] }),
|
|
4398
4528
|
/* @__PURE__ */ r("div", { className: o.contactColumn, children: [
|
|
4399
|
-
/* @__PURE__ */ n("h4", { className: o.contactTitle, children:
|
|
4529
|
+
/* @__PURE__ */ n("h4", { className: o.contactTitle, children: c("footer.contact.organizationNumber", "Organisasjonsnummer") }),
|
|
4400
4530
|
/* @__PURE__ */ n("p", { className: o.contactContent, children: l })
|
|
4401
4531
|
] }),
|
|
4402
4532
|
/* @__PURE__ */ r("div", { className: o.contactColumn, children: [
|
|
4403
|
-
/* @__PURE__ */ n("h4", { className: o.contactTitle, children:
|
|
4404
|
-
/* @__PURE__ */ n("p", { className: o.contactContent, children:
|
|
4533
|
+
/* @__PURE__ */ n("h4", { className: o.contactTitle, children: c("footer.contact.email", "E-post") }),
|
|
4534
|
+
/* @__PURE__ */ n("p", { className: o.contactContent, children: Q })
|
|
4405
4535
|
] })
|
|
4406
4536
|
] }),
|
|
4407
4537
|
/* @__PURE__ */ n("div", { className: o.divider }),
|
|
4408
4538
|
/* @__PURE__ */ r("div", { className: o.bottomRowContact, children: [
|
|
4409
|
-
|
|
4539
|
+
R.length > 0 && /* @__PURE__ */ n(de, {}),
|
|
4410
4540
|
/* @__PURE__ */ r("p", { className: o.copyrightText, children: [
|
|
4411
4541
|
"© ",
|
|
4412
|
-
|
|
4542
|
+
G,
|
|
4413
4543
|
" ",
|
|
4414
|
-
|
|
4544
|
+
c("footer.copyright", "Rødekors")
|
|
4415
4545
|
] })
|
|
4416
4546
|
] }),
|
|
4417
|
-
s && /* @__PURE__ */ n("div", { className: o.crossCornerBottomLeft, children: /* @__PURE__ */ n(
|
|
4547
|
+
s && /* @__PURE__ */ n("div", { className: o.crossCornerBottomLeft, children: /* @__PURE__ */ n(ve, { position: "bottom-left", size: "md", "aria-hidden": !0 }) })
|
|
4418
4548
|
] }) }),
|
|
4419
4549
|
/* @__PURE__ */ n("div", { className: o.whiteSection, children: /* @__PURE__ */ n("div", { className: o.whiteContainer, children: /* @__PURE__ */ r("div", { className: o.whiteContent, children: [
|
|
4420
|
-
|
|
4550
|
+
$ && (E ? /* @__PURE__ */ n(
|
|
4421
4551
|
"img",
|
|
4422
4552
|
{
|
|
4423
4553
|
src: E,
|
|
4424
|
-
alt:
|
|
4554
|
+
alt: Z,
|
|
4425
4555
|
className: o.logo,
|
|
4426
4556
|
loading: "lazy"
|
|
4427
4557
|
}
|
|
4428
|
-
) : /* @__PURE__ */ n("div", { className: o.logo, children: /* @__PURE__ */ n(
|
|
4558
|
+
) : /* @__PURE__ */ n("div", { className: o.logo, children: /* @__PURE__ */ n(h, {}) })),
|
|
4429
4559
|
d && /* @__PURE__ */ n("div", { className: o.slotLarge, children: d })
|
|
4430
4560
|
] }) }) })
|
|
4431
4561
|
] }) : /* @__PURE__ */ r("footer", { className: o.footer, "data-color": t, children: [
|
|
4432
4562
|
/* @__PURE__ */ n("div", { className: o.mainSection, children: /* @__PURE__ */ r("div", { className: o.mainContainer, children: [
|
|
4433
|
-
s && /* @__PURE__ */ n("div", { className: o.crossCornerTopRight, children: /* @__PURE__ */ n(
|
|
4563
|
+
s && /* @__PURE__ */ n("div", { className: o.crossCornerTopRight, children: /* @__PURE__ */ n(ve, { position: "top-right", size: "md", "aria-hidden": !0 }) }),
|
|
4434
4564
|
/* @__PURE__ */ r("div", { className: o.contentRow, children: [
|
|
4435
4565
|
!F && /* @__PURE__ */ r("div", { className: o.newsletterSection, children: [
|
|
4436
|
-
/* @__PURE__ */ n("p", { className: o.newsletterDescription, children:
|
|
4437
|
-
/* @__PURE__ */ n("form", { className: o.newsletterForm, onSubmit:
|
|
4566
|
+
/* @__PURE__ */ n("p", { className: o.newsletterDescription, children: p }),
|
|
4567
|
+
/* @__PURE__ */ n("form", { className: o.newsletterForm, onSubmit: v, children: /* @__PURE__ */ r("div", { className: o.newsletterInputGroup, children: [
|
|
4438
4568
|
/* @__PURE__ */ n(
|
|
4439
4569
|
qe,
|
|
4440
4570
|
{
|
|
4441
4571
|
type: "email",
|
|
4442
|
-
placeholder:
|
|
4443
|
-
value:
|
|
4444
|
-
onChange: (
|
|
4572
|
+
placeholder: k,
|
|
4573
|
+
value: _,
|
|
4574
|
+
onChange: (m) => ee(m.target.value),
|
|
4445
4575
|
className: o.newsletterInput
|
|
4446
4576
|
}
|
|
4447
4577
|
),
|
|
4448
|
-
/* @__PURE__ */ n(
|
|
4578
|
+
/* @__PURE__ */ n(ie, { type: "submit", variant: "primary", "data-color": "neutral", children: y })
|
|
4449
4579
|
] }) }),
|
|
4450
|
-
/* @__PURE__ */ n("p", { className: o.consentText, children: u ||
|
|
4580
|
+
/* @__PURE__ */ n("p", { className: o.consentText, children: u || le })
|
|
4451
4581
|
] }),
|
|
4452
4582
|
/* @__PURE__ */ r("div", { className: o.linksSection, children: [
|
|
4453
|
-
/* @__PURE__ */ r("nav", { className: o.linksColumn, "aria-label":
|
|
4454
|
-
/* @__PURE__ */ n("h3", { className: o.linksTitle, children:
|
|
4455
|
-
/* @__PURE__ */ n("ul", { className: o.linksList, children:
|
|
4583
|
+
/* @__PURE__ */ r("nav", { className: o.linksColumn, "aria-label": w || c("footer.shortcuts", "Snarveier"), children: [
|
|
4584
|
+
/* @__PURE__ */ n("h3", { className: o.linksTitle, children: w || c("footer.shortcuts", "Snarveier") }),
|
|
4585
|
+
/* @__PURE__ */ n("ul", { className: o.linksList, children: I.map((m, N) => /* @__PURE__ */ n("li", { children: /* @__PURE__ */ n(ne, { href: m.href, className: o.footerLink, children: m.label }) }, N)) })
|
|
4456
4586
|
] }),
|
|
4457
|
-
/* @__PURE__ */ r("nav", { className: o.linksColumn, "aria-label": P ||
|
|
4458
|
-
/* @__PURE__ */ n("h3", { className: o.linksTitle, children: P ||
|
|
4459
|
-
/* @__PURE__ */ n("ul", { className: o.linksList, children:
|
|
4587
|
+
/* @__PURE__ */ r("nav", { className: o.linksColumn, "aria-label": P || c("footer.links", "Lenker"), children: [
|
|
4588
|
+
/* @__PURE__ */ n("h3", { className: o.linksTitle, children: P || c("footer.links", "Lenker") }),
|
|
4589
|
+
/* @__PURE__ */ n("ul", { className: o.linksList, children: D.map((m, N) => /* @__PURE__ */ n("li", { children: /* @__PURE__ */ n(ne, { href: m.href, className: o.footerLink, children: m.label }) }, N)) })
|
|
4460
4590
|
] })
|
|
4461
4591
|
] })
|
|
4462
4592
|
] }),
|
|
4463
4593
|
/* @__PURE__ */ n("div", { className: o.divider }),
|
|
4464
4594
|
/* @__PURE__ */ r("div", { className: o.contactSection, children: [
|
|
4465
4595
|
/* @__PURE__ */ r("div", { className: o.contactColumn, children: [
|
|
4466
|
-
/* @__PURE__ */ n("h4", { className: o.contactTitle, children:
|
|
4467
|
-
/* @__PURE__ */ n("div", { className: o.contactContent, children:
|
|
4596
|
+
/* @__PURE__ */ n("h4", { className: o.contactTitle, children: c("footer.contact.visitingAddress", "Besøks adresse") }),
|
|
4597
|
+
/* @__PURE__ */ n("div", { className: o.contactContent, children: j.map((m, N) => /* @__PURE__ */ n("p", { children: m }, N)) })
|
|
4468
4598
|
] }),
|
|
4469
4599
|
/* @__PURE__ */ r("div", { className: o.contactColumn, children: [
|
|
4470
|
-
/* @__PURE__ */ n("h4", { className: o.contactTitle, children:
|
|
4600
|
+
/* @__PURE__ */ n("h4", { className: o.contactTitle, children: c("footer.contact.organizationNumber", "Organisasjonsnummer") }),
|
|
4471
4601
|
/* @__PURE__ */ n("p", { className: o.contactContent, children: l })
|
|
4472
4602
|
] }),
|
|
4473
4603
|
/* @__PURE__ */ r("div", { className: o.contactColumn, children: [
|
|
4474
|
-
/* @__PURE__ */ n("h4", { className: o.contactTitle, children:
|
|
4475
|
-
/* @__PURE__ */ n("p", { className: o.contactContent, children:
|
|
4604
|
+
/* @__PURE__ */ n("h4", { className: o.contactTitle, children: c("footer.contact.email", "E-post") }),
|
|
4605
|
+
/* @__PURE__ */ n("p", { className: o.contactContent, children: Q })
|
|
4476
4606
|
] })
|
|
4477
4607
|
] }),
|
|
4478
4608
|
/* @__PURE__ */ n("div", { className: o.divider }),
|
|
4479
4609
|
/* @__PURE__ */ n("div", { className: o.copyrightSection, children: /* @__PURE__ */ r("p", { className: o.copyrightText, children: [
|
|
4480
4610
|
"© ",
|
|
4481
|
-
|
|
4611
|
+
G,
|
|
4482
4612
|
" ",
|
|
4483
|
-
|
|
4613
|
+
c("footer.copyright", "Rødekors")
|
|
4484
4614
|
] }) }),
|
|
4485
|
-
s && /* @__PURE__ */ n("div", { className: o.crossCornerBottomLeft, children: /* @__PURE__ */ n(
|
|
4615
|
+
s && /* @__PURE__ */ n("div", { className: o.crossCornerBottomLeft, children: /* @__PURE__ */ n(ve, { position: "bottom-left", size: "md", "aria-hidden": !0 }) })
|
|
4486
4616
|
] }) }),
|
|
4487
4617
|
/* @__PURE__ */ n("div", { className: o.whiteSection, children: /* @__PURE__ */ n("div", { className: o.whiteContainer, children: /* @__PURE__ */ r("div", { className: o.whiteContent, children: [
|
|
4488
|
-
|
|
4618
|
+
$ && (E ? /* @__PURE__ */ n(
|
|
4489
4619
|
"img",
|
|
4490
4620
|
{
|
|
4491
4621
|
src: E,
|
|
4492
|
-
alt:
|
|
4622
|
+
alt: Z,
|
|
4493
4623
|
className: o.logo,
|
|
4494
4624
|
loading: "lazy"
|
|
4495
4625
|
}
|
|
4496
|
-
) : /* @__PURE__ */ n("div", { className: o.logo, children: /* @__PURE__ */ n(
|
|
4626
|
+
) : /* @__PURE__ */ n("div", { className: o.logo, children: /* @__PURE__ */ n(h, {}) })),
|
|
4497
4627
|
d && /* @__PURE__ */ n("div", { className: o.slotLarge, children: d })
|
|
4498
4628
|
] }) }) })
|
|
4499
4629
|
] });
|
|
4500
4630
|
};
|
|
4501
|
-
function
|
|
4631
|
+
function Xs(t) {
|
|
4502
4632
|
const e = t;
|
|
4503
4633
|
return `
|
|
4504
4634
|
.${e.footer} {
|
|
@@ -4923,25 +5053,25 @@ function Zs(t) {
|
|
|
4923
5053
|
}
|
|
4924
5054
|
`;
|
|
4925
5055
|
}
|
|
4926
|
-
const
|
|
4927
|
-
donor:
|
|
4928
|
-
tabsWrapper:
|
|
4929
|
-
content:
|
|
4930
|
-
amountSection:
|
|
4931
|
-
amountLabel:
|
|
4932
|
-
amountButtons:
|
|
4933
|
-
customAmountField:
|
|
4934
|
-
impactRow:
|
|
4935
|
-
heartIcon:
|
|
4936
|
-
impactText:
|
|
4937
|
-
impactAmount:
|
|
4938
|
-
actionsSection:
|
|
4939
|
-
vippsButton:
|
|
4940
|
-
vippsButtonLabel:
|
|
4941
|
-
vippsLogo:
|
|
4942
|
-
avtalegiroLink:
|
|
4943
|
-
tabHeartIcon:
|
|
4944
|
-
},
|
|
5056
|
+
const Js = "_donor_1hxqz_1", Qs = "_tabsWrapper_1hxqz_14", ea = "_content_1hxqz_35", ta = "_amountSection_1hxqz_47", na = "_amountLabel_1hxqz_55", oa = "_amountButtons_1hxqz_64", ra = "_customAmountField_1hxqz_75", sa = "_impactRow_1hxqz_80", aa = "_heartIcon_1hxqz_88", ia = "_impactText_1hxqz_102", la = "_impactAmount_1hxqz_112", da = "_actionsSection_1hxqz_117", ca = "_vippsButton_1hxqz_127", pa = "_vippsButtonLabel_1hxqz_157", ma = "_vippsLogo_1hxqz_166", ga = "_avtalegiroLink_1hxqz_179", ua = "_tabHeartIcon_1hxqz_184", B = {
|
|
5057
|
+
donor: Js,
|
|
5058
|
+
tabsWrapper: Qs,
|
|
5059
|
+
content: ea,
|
|
5060
|
+
amountSection: ta,
|
|
5061
|
+
amountLabel: na,
|
|
5062
|
+
amountButtons: oa,
|
|
5063
|
+
customAmountField: ra,
|
|
5064
|
+
impactRow: sa,
|
|
5065
|
+
heartIcon: aa,
|
|
5066
|
+
impactText: ia,
|
|
5067
|
+
impactAmount: la,
|
|
5068
|
+
actionsSection: da,
|
|
5069
|
+
vippsButton: ca,
|
|
5070
|
+
vippsButtonLabel: pa,
|
|
5071
|
+
vippsLogo: ma,
|
|
5072
|
+
avtalegiroLink: ga,
|
|
5073
|
+
tabHeartIcon: ua
|
|
5074
|
+
}, $e = () => /* @__PURE__ */ n(
|
|
4945
5075
|
"svg",
|
|
4946
5076
|
{
|
|
4947
5077
|
width: "19",
|
|
@@ -4959,7 +5089,7 @@ const Xs = "_donor_1hxqz_1", Js = "_tabsWrapper_1hxqz_14", Qs = "_content_1hxqz_
|
|
|
4959
5089
|
}
|
|
4960
5090
|
)
|
|
4961
5091
|
}
|
|
4962
|
-
),
|
|
5092
|
+
), ha = () => /* @__PURE__ */ n(
|
|
4963
5093
|
"svg",
|
|
4964
5094
|
{
|
|
4965
5095
|
width: "16",
|
|
@@ -4977,7 +5107,7 @@ const Xs = "_donor_1hxqz_1", Js = "_tabsWrapper_1hxqz_14", Qs = "_content_1hxqz_
|
|
|
4977
5107
|
}
|
|
4978
5108
|
)
|
|
4979
5109
|
}
|
|
4980
|
-
),
|
|
5110
|
+
), fa = () => /* @__PURE__ */ n(
|
|
4981
5111
|
"svg",
|
|
4982
5112
|
{
|
|
4983
5113
|
width: "64",
|
|
@@ -4995,125 +5125,125 @@ const Xs = "_donor_1hxqz_1", Js = "_tabsWrapper_1hxqz_14", Qs = "_content_1hxqz_
|
|
|
4995
5125
|
}
|
|
4996
5126
|
)
|
|
4997
5127
|
}
|
|
4998
|
-
),
|
|
5128
|
+
), ka = [
|
|
4999
5129
|
{ value: 220, label: "220 kr" },
|
|
5000
5130
|
{ value: 345, label: "345 kr" },
|
|
5001
5131
|
{ value: 660, label: "660 kr" }
|
|
5002
|
-
],
|
|
5132
|
+
], pi = ({
|
|
5003
5133
|
"data-color": t = "primary",
|
|
5004
|
-
amounts: e =
|
|
5134
|
+
amounts: e = ka,
|
|
5005
5135
|
defaultAmount: s = 345,
|
|
5006
|
-
oneTimeLabel:
|
|
5007
|
-
monthlyLabel:
|
|
5008
|
-
customAmountPlaceholder:
|
|
5136
|
+
oneTimeLabel: p = "En gang",
|
|
5137
|
+
monthlyLabel: k = "Hver måned",
|
|
5138
|
+
customAmountPlaceholder: y = "Valgfritt beløp",
|
|
5009
5139
|
amountLabel: u = "Velg ønsket beløp:",
|
|
5010
|
-
impactMessage:
|
|
5140
|
+
impactMessage: x = "En gave på {amount} bidrar til ...",
|
|
5011
5141
|
vippsButtonLabel: F = "Gi med",
|
|
5012
5142
|
avtalegiroLabel: C = "Gi med avtalegiro",
|
|
5013
|
-
avtalegiroHref:
|
|
5014
|
-
currencySuffix:
|
|
5143
|
+
avtalegiroHref: U = "#",
|
|
5144
|
+
currencySuffix: w = "kr",
|
|
5015
5145
|
onVippsClick: P,
|
|
5016
|
-
onAvtalegiroClick:
|
|
5146
|
+
onAvtalegiroClick: j,
|
|
5017
5147
|
onAmountChange: l,
|
|
5018
|
-
showVippsButton:
|
|
5019
|
-
showAvtalegiroLink:
|
|
5148
|
+
showVippsButton: Q = !0,
|
|
5149
|
+
showAvtalegiroLink: $ = !0,
|
|
5020
5150
|
showImpactMessage: E = !0,
|
|
5021
|
-
heartVariant:
|
|
5151
|
+
heartVariant: Z = "outlined"
|
|
5022
5152
|
}) => {
|
|
5023
|
-
const [d,
|
|
5024
|
-
|
|
5025
|
-
const
|
|
5026
|
-
if (typeof document > "u" || document.getElementById(
|
|
5027
|
-
const
|
|
5028
|
-
|
|
5153
|
+
const [d, A] = q("monthly"), [S, R] = q(s), [L, O] = q(""), [G, K] = q(!1);
|
|
5154
|
+
z(() => {
|
|
5155
|
+
const I = "rk-donor-inline-styles";
|
|
5156
|
+
if (typeof document > "u" || document.getElementById(I)) return;
|
|
5157
|
+
const D = va(B), f = document.createElement("style");
|
|
5158
|
+
f.id = I, f.textContent = D, document.head.appendChild(f);
|
|
5029
5159
|
}, []);
|
|
5030
|
-
const
|
|
5031
|
-
|
|
5032
|
-
},
|
|
5033
|
-
const
|
|
5034
|
-
|
|
5035
|
-
const
|
|
5036
|
-
|
|
5037
|
-
},
|
|
5038
|
-
|
|
5039
|
-
},
|
|
5040
|
-
const
|
|
5041
|
-
|
|
5042
|
-
},
|
|
5043
|
-
P == null || P(
|
|
5044
|
-
},
|
|
5045
|
-
|
|
5046
|
-
},
|
|
5047
|
-
const
|
|
5160
|
+
const _ = G && L ? parseInt(L, 10) || 0 : S, ee = (I) => {
|
|
5161
|
+
R(I), K(!1), O(""), l == null || l(I, d);
|
|
5162
|
+
}, c = (I) => {
|
|
5163
|
+
const D = I.target.value;
|
|
5164
|
+
O(D), K(!0);
|
|
5165
|
+
const f = parseInt(D, 10);
|
|
5166
|
+
f > 0 && (l == null || l(f, d));
|
|
5167
|
+
}, v = () => {
|
|
5168
|
+
K(!0);
|
|
5169
|
+
}, h = (I) => {
|
|
5170
|
+
const D = I;
|
|
5171
|
+
A(D), l == null || l(_, D);
|
|
5172
|
+
}, T = () => {
|
|
5173
|
+
P == null || P(_, d);
|
|
5174
|
+
}, Y = () => {
|
|
5175
|
+
j == null || j();
|
|
5176
|
+
}, le = () => {
|
|
5177
|
+
const I = `${_} ${w}`, D = x.split("{amount}");
|
|
5048
5178
|
return /* @__PURE__ */ r("span", { children: [
|
|
5049
|
-
|
|
5050
|
-
/* @__PURE__ */ n("span", { className:
|
|
5051
|
-
|
|
5179
|
+
D[0],
|
|
5180
|
+
/* @__PURE__ */ n("span", { className: B.impactAmount, children: I }),
|
|
5181
|
+
D[1] || ""
|
|
5052
5182
|
] });
|
|
5053
5183
|
};
|
|
5054
|
-
return /* @__PURE__ */ r("div", { className:
|
|
5055
|
-
/* @__PURE__ */ n("div", { className:
|
|
5056
|
-
/* @__PURE__ */ n(
|
|
5057
|
-
/* @__PURE__ */ r(
|
|
5058
|
-
/* @__PURE__ */ n("span", { className:
|
|
5059
|
-
|
|
5184
|
+
return /* @__PURE__ */ r("div", { className: B.donor, "data-color": t, children: [
|
|
5185
|
+
/* @__PURE__ */ n("div", { className: B.tabsWrapper, children: /* @__PURE__ */ n(Te, { defaultValue: "monthly", onChange: h, "data-size": "md", children: /* @__PURE__ */ r(Te.List, { children: [
|
|
5186
|
+
/* @__PURE__ */ n(Te.Tab, { value: "one-time", children: p }),
|
|
5187
|
+
/* @__PURE__ */ r(Te.Tab, { value: "monthly", children: [
|
|
5188
|
+
/* @__PURE__ */ n("span", { className: B.tabHeartIcon, children: /* @__PURE__ */ n($e, {}) }),
|
|
5189
|
+
k
|
|
5060
5190
|
] })
|
|
5061
5191
|
] }) }) }),
|
|
5062
|
-
/* @__PURE__ */ r("div", { className:
|
|
5063
|
-
/* @__PURE__ */ r("div", { className:
|
|
5064
|
-
/* @__PURE__ */ n(
|
|
5065
|
-
/* @__PURE__ */ n("div", { className:
|
|
5066
|
-
const
|
|
5192
|
+
/* @__PURE__ */ r("div", { className: B.content, children: [
|
|
5193
|
+
/* @__PURE__ */ r("div", { className: B.amountSection, children: [
|
|
5194
|
+
/* @__PURE__ */ n(be, { className: B.amountLabel, "data-size": "sm", children: u }),
|
|
5195
|
+
/* @__PURE__ */ n("div", { className: B.amountButtons, children: e.map((I) => {
|
|
5196
|
+
const D = !G && S === I.value;
|
|
5067
5197
|
return /* @__PURE__ */ n(
|
|
5068
|
-
|
|
5198
|
+
ie,
|
|
5069
5199
|
{
|
|
5070
|
-
variant:
|
|
5071
|
-
"data-color":
|
|
5072
|
-
onClick: () =>
|
|
5073
|
-
children:
|
|
5200
|
+
variant: D ? "primary" : "secondary",
|
|
5201
|
+
"data-color": D ? "accent" : "neutral",
|
|
5202
|
+
onClick: () => ee(I.value),
|
|
5203
|
+
children: I.label
|
|
5074
5204
|
},
|
|
5075
|
-
|
|
5205
|
+
I.value
|
|
5076
5206
|
);
|
|
5077
5207
|
}) }),
|
|
5078
|
-
/* @__PURE__ */ n("div", { className:
|
|
5208
|
+
/* @__PURE__ */ n("div", { className: B.customAmountField, children: /* @__PURE__ */ n(
|
|
5079
5209
|
Zo,
|
|
5080
5210
|
{
|
|
5081
|
-
"aria-label":
|
|
5082
|
-
placeholder:
|
|
5083
|
-
value:
|
|
5084
|
-
onChange:
|
|
5085
|
-
onFocus:
|
|
5211
|
+
"aria-label": y,
|
|
5212
|
+
placeholder: y,
|
|
5213
|
+
value: L,
|
|
5214
|
+
onChange: c,
|
|
5215
|
+
onFocus: v,
|
|
5086
5216
|
type: "number",
|
|
5087
5217
|
min: 1
|
|
5088
5218
|
}
|
|
5089
5219
|
) })
|
|
5090
5220
|
] }),
|
|
5091
|
-
E && /* @__PURE__ */ r("div", { className:
|
|
5092
|
-
/* @__PURE__ */ n("div", { className:
|
|
5093
|
-
/* @__PURE__ */ n("p", { className:
|
|
5221
|
+
E && /* @__PURE__ */ r("div", { className: B.impactRow, children: [
|
|
5222
|
+
/* @__PURE__ */ n("div", { className: B.heartIcon, children: Z === "filled" ? /* @__PURE__ */ n($e, {}) : /* @__PURE__ */ n(ha, {}) }),
|
|
5223
|
+
/* @__PURE__ */ n("p", { className: B.impactText, children: le() })
|
|
5094
5224
|
] }),
|
|
5095
|
-
/* @__PURE__ */ r("div", { className:
|
|
5096
|
-
|
|
5225
|
+
/* @__PURE__ */ r("div", { className: B.actionsSection, children: [
|
|
5226
|
+
Q && /* @__PURE__ */ r(
|
|
5097
5227
|
"button",
|
|
5098
5228
|
{
|
|
5099
|
-
className:
|
|
5100
|
-
onClick:
|
|
5229
|
+
className: B.vippsButton,
|
|
5230
|
+
onClick: T,
|
|
5101
5231
|
type: "button",
|
|
5102
5232
|
"aria-label": `${F} Vipps`,
|
|
5103
5233
|
children: [
|
|
5104
|
-
/* @__PURE__ */ n("span", { className:
|
|
5105
|
-
/* @__PURE__ */ n("span", { className:
|
|
5234
|
+
/* @__PURE__ */ n("span", { className: B.vippsButtonLabel, children: F }),
|
|
5235
|
+
/* @__PURE__ */ n("span", { className: B.vippsLogo, children: /* @__PURE__ */ n(fa, {}) })
|
|
5106
5236
|
]
|
|
5107
5237
|
}
|
|
5108
5238
|
),
|
|
5109
|
-
|
|
5110
|
-
|
|
5239
|
+
$ && /* @__PURE__ */ n(
|
|
5240
|
+
ne,
|
|
5111
5241
|
{
|
|
5112
|
-
href:
|
|
5242
|
+
href: U,
|
|
5113
5243
|
"data-color": "neutral",
|
|
5114
|
-
className:
|
|
5115
|
-
onClick: (
|
|
5116
|
-
|
|
5244
|
+
className: B.avtalegiroLink,
|
|
5245
|
+
onClick: (I) => {
|
|
5246
|
+
j && (I.preventDefault(), Y());
|
|
5117
5247
|
},
|
|
5118
5248
|
children: C
|
|
5119
5249
|
}
|
|
@@ -5122,7 +5252,7 @@ const Xs = "_donor_1hxqz_1", Js = "_tabsWrapper_1hxqz_14", Qs = "_content_1hxqz_
|
|
|
5122
5252
|
] })
|
|
5123
5253
|
] });
|
|
5124
5254
|
};
|
|
5125
|
-
function
|
|
5255
|
+
function va(t) {
|
|
5126
5256
|
return `
|
|
5127
5257
|
.${t.donor} {
|
|
5128
5258
|
border-radius: 16px;
|
|
@@ -5291,69 +5421,69 @@ export {
|
|
|
5291
5421
|
un as Alert,
|
|
5292
5422
|
Ve as Avatar,
|
|
5293
5423
|
hn as Badge,
|
|
5294
|
-
|
|
5295
|
-
|
|
5296
|
-
|
|
5297
|
-
|
|
5298
|
-
|
|
5299
|
-
|
|
5424
|
+
Sa as BadgePosition,
|
|
5425
|
+
Ia as Breadcrumbs,
|
|
5426
|
+
Da as BreadcrumbsItem,
|
|
5427
|
+
Aa as BreadcrumbsLink,
|
|
5428
|
+
_a as BreadcrumbsList,
|
|
5429
|
+
ie as Button,
|
|
5300
5430
|
fn as Card,
|
|
5301
|
-
|
|
5431
|
+
La as CardBlock,
|
|
5302
5432
|
zo as Carousel,
|
|
5303
5433
|
kn as Checkbox,
|
|
5304
|
-
|
|
5305
|
-
|
|
5434
|
+
Ma as Chip,
|
|
5435
|
+
ve as CrossCorner,
|
|
5306
5436
|
bo as DateInput,
|
|
5307
5437
|
co as DatePicker,
|
|
5308
|
-
|
|
5309
|
-
|
|
5310
|
-
|
|
5311
|
-
|
|
5438
|
+
Ea as Details,
|
|
5439
|
+
Ba as Dialog,
|
|
5440
|
+
za as Divider,
|
|
5441
|
+
pi as Donor,
|
|
5312
5442
|
V as Dropdown,
|
|
5313
|
-
|
|
5314
|
-
|
|
5315
|
-
|
|
5316
|
-
|
|
5317
|
-
|
|
5443
|
+
Ha as DropdownButton,
|
|
5444
|
+
Ra as DropdownHeading,
|
|
5445
|
+
Wa as DropdownItem,
|
|
5446
|
+
Ga as DropdownList,
|
|
5447
|
+
Pa as DropdownTrigger,
|
|
5318
5448
|
$a as DropdownTriggerContext,
|
|
5319
|
-
|
|
5320
|
-
|
|
5449
|
+
Ua as ErrorSummary,
|
|
5450
|
+
Va as Field,
|
|
5321
5451
|
Vo as FieldCounter,
|
|
5322
5452
|
Uo as FieldDescription,
|
|
5323
|
-
|
|
5324
|
-
|
|
5325
|
-
|
|
5453
|
+
Oa as Fieldset,
|
|
5454
|
+
ci as Footer,
|
|
5455
|
+
di as Header,
|
|
5326
5456
|
Oo as Heading,
|
|
5327
5457
|
qe as Input,
|
|
5328
5458
|
Ko as Label,
|
|
5329
|
-
|
|
5330
|
-
|
|
5331
|
-
|
|
5459
|
+
ja as LanguageProvider,
|
|
5460
|
+
ne as Link,
|
|
5461
|
+
Ka as List,
|
|
5332
5462
|
qo as Pagination,
|
|
5333
|
-
|
|
5334
|
-
|
|
5335
|
-
|
|
5336
|
-
|
|
5337
|
-
|
|
5338
|
-
|
|
5339
|
-
|
|
5340
|
-
|
|
5341
|
-
|
|
5342
|
-
|
|
5463
|
+
Za as PaginationButton,
|
|
5464
|
+
Ya as PaginationItem,
|
|
5465
|
+
qa as PaginationList,
|
|
5466
|
+
be as Paragraph,
|
|
5467
|
+
Ja as Popover,
|
|
5468
|
+
Qa as Radio,
|
|
5469
|
+
xe as Search,
|
|
5470
|
+
ti as Select,
|
|
5471
|
+
ni as SkeletonLoader,
|
|
5472
|
+
oi as SkipLink,
|
|
5343
5473
|
Bo as Spinner,
|
|
5344
5474
|
Yo as Suggestion,
|
|
5345
|
-
|
|
5346
|
-
|
|
5347
|
-
|
|
5348
|
-
|
|
5349
|
-
|
|
5475
|
+
_e as Switch,
|
|
5476
|
+
ri as Table,
|
|
5477
|
+
Te as Tabs,
|
|
5478
|
+
si as Tag,
|
|
5479
|
+
ai as Textarea,
|
|
5350
5480
|
Zo as Textfield,
|
|
5351
|
-
|
|
5352
|
-
|
|
5481
|
+
ii as ToggleGroup,
|
|
5482
|
+
li as Tooltip,
|
|
5353
5483
|
Xo as ValidationMessage,
|
|
5354
|
-
|
|
5355
|
-
|
|
5356
|
-
|
|
5357
|
-
|
|
5358
|
-
|
|
5484
|
+
Na as useCheckboxGroup,
|
|
5485
|
+
Fa as useLanguage,
|
|
5486
|
+
ye as useLanguageOptional,
|
|
5487
|
+
Xa as usePagination,
|
|
5488
|
+
ei as useRadioGroup
|
|
5359
5489
|
};
|