@leabankab/component-library 8.8.0 → 8.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +21 -0
- package/dist/component-library.es.js +881 -857
- package/dist/component-library.es.js.map +1 -1
- package/dist/component-library.umd.js +2 -2
- package/dist/component-library.umd.js.map +1 -1
- package/dist/components/form/select-field.d.ts +20 -1
- package/dist/components/form/select.d.ts +13 -3
- package/dist/index.css +1 -1
- package/dist/website/alert-banner.d.ts +48 -0
- package/dist/website/arrow-reveal-link.d.ts +22 -0
- package/dist/website/flags.d.ts +7 -0
- package/dist/website/index.d.ts +4 -0
- package/dist/website/side-nav.d.ts +57 -0
- package/dist/website/site-footer.d.ts +122 -0
- package/dist/website/site-header-link.d.ts +16 -0
- package/dist/website/site-header-menu.d.ts +21 -0
- package/dist/website/site-header.d.ts +141 -0
- package/dist/website/use-side-nav-labels.d.ts +5 -0
- package/dist/website/use-site-footer-labels.d.ts +7 -0
- package/dist/website/use-site-header-labels.d.ts +7 -0
- package/dist/website.cjs +1 -1
- package/dist/website.cjs.map +1 -1
- package/dist/website.css +1 -1
- package/dist/website.mjs +1101 -394
- package/dist/website.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { ComponentProps, ReactElement, ReactNode } from 'react';
|
|
2
|
+
/** A title, a text or both: a banner with neither does not compile. */
|
|
3
|
+
type AlertBannerContent = {
|
|
4
|
+
/** The title, 14px semibold, a heading (`titleRender`). */
|
|
5
|
+
title: ReactNode;
|
|
6
|
+
/**
|
|
7
|
+
* The notice. A string becomes a `<p>`; anything else (the CMS's
|
|
8
|
+
* paragraphs, with links) goes in a `<div>`.
|
|
9
|
+
*/
|
|
10
|
+
text?: ReactNode;
|
|
11
|
+
} | {
|
|
12
|
+
title?: ReactNode;
|
|
13
|
+
text: ReactNode;
|
|
14
|
+
};
|
|
15
|
+
export type AlertBannerProps = Omit<ComponentProps<"div">, "children" | "title"> & AlertBannerContent & {
|
|
16
|
+
/**
|
|
17
|
+
* The element of the title.
|
|
18
|
+
* @default <h2 />
|
|
19
|
+
*/
|
|
20
|
+
titleRender?: ReactElement;
|
|
21
|
+
/**
|
|
22
|
+
* The picture before the text, 48px, decoration: the CMS's image with
|
|
23
|
+
* `alt=""`, or an icon. Left out, Lucide's `TriangleAlert`; `null` for
|
|
24
|
+
* none.
|
|
25
|
+
*/
|
|
26
|
+
icon?: ReactNode;
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* The website's notice (`AlertBanner`, the global one at the foot of every
|
|
30
|
+
* page and the `sections.alert-banner` block): a 48px icon beside a short
|
|
31
|
+
* title and a text, in the colour of the `Section` it sits in.
|
|
32
|
+
*
|
|
33
|
+
* ```tsx
|
|
34
|
+
* <Section surface="muted" spacingTop="sm" spacingBottom="sm">
|
|
35
|
+
* <AlertBanner
|
|
36
|
+
* title="Viktig informasjon"
|
|
37
|
+
* text="Lea Bank ringer deg aldri for å be om BankID, passord eller kortopplysninger."
|
|
38
|
+
* />
|
|
39
|
+
* </Section>
|
|
40
|
+
* ```
|
|
41
|
+
*
|
|
42
|
+
* A notice that stays on the page, not a message that has just appeared: it
|
|
43
|
+
* has no `role="alert"` and is not announced, and it has no close button.
|
|
44
|
+
* For a status message over the page, use `GlobalAlert`. The icon and the
|
|
45
|
+
* text are 32px apart (16 below 768px); title and text are 14px.
|
|
46
|
+
*/
|
|
47
|
+
export declare function AlertBanner({ title, text, titleRender, icon, className, ...rest }: AlertBannerProps): import("react").JSX.Element;
|
|
48
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { useRender } from '@base-ui/react/use-render';
|
|
2
|
+
export type ArrowRevealLinkProps = useRender.ComponentProps<"a"> & {
|
|
3
|
+
/**
|
|
4
|
+
* `"md"`: the header's menus, 16px, the arrow growing in on hover. `"lg"`:
|
|
5
|
+
* the `SideNav`, 18px, underlined on hover, the arrow before the link to
|
|
6
|
+
* the current page (`aria-current="page"`) only.
|
|
7
|
+
* @default "md"
|
|
8
|
+
*/
|
|
9
|
+
size?: "md" | "lg";
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Internal: Figma's `.ArrowRevealLink`. At `md`, the links of the header's
|
|
13
|
+
* menus: a plain 16px link whose purple arrow grows in on hover while the
|
|
14
|
+
* text turns purple and steps aside, as the website's `DropdownLink`. At
|
|
15
|
+
* `lg`, the links of `SideNav`: 18px, underlined on hover, and the arrow
|
|
16
|
+
* marks the current page, as the website's `SidebarLink`. Not exported.
|
|
17
|
+
*
|
|
18
|
+
* Renders an `<a>`, or the element passed to `render`: a router link, or the
|
|
19
|
+
* `NavigationMenu.Link` of the desktop menu, which renders the page's own
|
|
20
|
+
* link in turn.
|
|
21
|
+
*/
|
|
22
|
+
export declare function ArrowRevealLink({ render, className, children, size, ...rest }: ArrowRevealLinkProps): import('react').ReactElement<unknown, string | import('react').JSXElementConstructor<any>>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ComponentProps } from 'react';
|
|
2
|
+
type FlagProps = Omit<ComponentProps<"svg">, "children">;
|
|
3
|
+
export declare function FlagNorway(props: FlagProps): import("react").JSX.Element;
|
|
4
|
+
export declare function FlagSweden(props: FlagProps): import("react").JSX.Element;
|
|
5
|
+
export declare function FlagFinland(props: FlagProps): import("react").JSX.Element;
|
|
6
|
+
export declare function FlagSpain(props: FlagProps): import("react").JSX.Element;
|
|
7
|
+
export {};
|
package/dist/website/index.d.ts
CHANGED
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
* Names are flat (`SectionHeader`, not `Section.Header`): the website renders
|
|
14
14
|
* these from server components, which can't dot into a client bundle.
|
|
15
15
|
*/
|
|
16
|
+
export * from './alert-banner';
|
|
16
17
|
export * from './brand-letters';
|
|
17
18
|
export * from './calculator';
|
|
18
19
|
export * from './carousel';
|
|
@@ -28,6 +29,9 @@ export * from './promo-grid';
|
|
|
28
29
|
export * from './section';
|
|
29
30
|
export * from './section-header';
|
|
30
31
|
export * from './service-card-grid';
|
|
32
|
+
export * from './side-nav';
|
|
33
|
+
export * from './site-footer';
|
|
34
|
+
export * from './site-header';
|
|
31
35
|
export * from './split-content';
|
|
32
36
|
export * from './stats';
|
|
33
37
|
export * from './testimonials';
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { ComponentProps, ReactNode } from 'react';
|
|
2
|
+
import { SiteHeaderLink } from './site-header';
|
|
3
|
+
/**
|
|
4
|
+
* A link in the side navigation: `{ label, href }`, or `{ label, render }`
|
|
5
|
+
* with a router link carrying its own `href`. A link without either does not
|
|
6
|
+
* compile.
|
|
7
|
+
*/
|
|
8
|
+
export type SideNavItem = SiteHeaderLink & {
|
|
9
|
+
/**
|
|
10
|
+
* This page: the link is marked `aria-current="page"` and has the arrow
|
|
11
|
+
* before it.
|
|
12
|
+
*/
|
|
13
|
+
current?: boolean;
|
|
14
|
+
};
|
|
15
|
+
export type SideNavProps = Omit<ComponentProps<"div">, "children"> & {
|
|
16
|
+
/** The pages beside this one (the website's child pages), in order. */
|
|
17
|
+
items: SideNavItem[];
|
|
18
|
+
/**
|
|
19
|
+
* The name of the navigation, read out with it: the part of the site it
|
|
20
|
+
* covers ("Investor Relations"). Left out, "Sidemeny".
|
|
21
|
+
*/
|
|
22
|
+
label?: string;
|
|
23
|
+
/** The `Breadcrumbs` at the top of the content panel. */
|
|
24
|
+
breadcrumbs?: ReactNode;
|
|
25
|
+
/** The page's content, in the white panel. */
|
|
26
|
+
children: ReactNode;
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* The website's two-column page (`TwoColumnLayout`, the Investor Relations
|
|
30
|
+
* pages of leabank.no): a beige sidebar of links to the pages of one part of
|
|
31
|
+
* the site, beside a white panel with the breadcrumbs and the content. Put it
|
|
32
|
+
* in a `Section` (grey, `spacingTop` and `spacingBottom` `sm`, as on the
|
|
33
|
+
* website).
|
|
34
|
+
*
|
|
35
|
+
* ```tsx
|
|
36
|
+
* <Section surface="subtle" spacingTop="sm" spacingBottom="sm">
|
|
37
|
+
* <SideNav
|
|
38
|
+
* label="Investor Relations"
|
|
39
|
+
* items={[
|
|
40
|
+
* { label: "About Lea Bank", render: <NextLink href="/om-oss/investor-relations/about-lea-bank" />, current: true },
|
|
41
|
+
* { label: "Dividend policy", render: <NextLink href="/om-oss/investor-relations/dividend-policy" /> },
|
|
42
|
+
* ]}
|
|
43
|
+
* breadcrumbs={<Breadcrumbs items={crumbs} />}
|
|
44
|
+
* >
|
|
45
|
+
* <RichText>…</RichText>
|
|
46
|
+
* </SideNav>
|
|
47
|
+
* </Section>
|
|
48
|
+
* ```
|
|
49
|
+
*
|
|
50
|
+
* From 1024px the sidebar is 280px wide (360 from 1312px), 16 from the
|
|
51
|
+
* panel, and stays in view while the page scrolls (32 from the top); below
|
|
52
|
+
* 1024px it is a block over the panel, 32 apart. The sidebar is a `nav`
|
|
53
|
+
* named by `label`; the link to this page is marked `aria-current="page"`
|
|
54
|
+
* and has a purple arrow before it, the others underline on hover. The panel
|
|
55
|
+
* is a `Panel size="sm"`: what is in it stacks 16 apart.
|
|
56
|
+
*/
|
|
57
|
+
export declare function SideNav({ items, label, breadcrumbs, children, className, ...rest }: SideNavProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { ComponentProps, ReactElement, ReactNode } from 'react';
|
|
2
|
+
import { SiteHeaderLink } from './site-header';
|
|
3
|
+
/**
|
|
4
|
+
* A link in the footer: `{ label, href }`, or `{ label, render }` with a
|
|
5
|
+
* router link carrying its own `href`. A link without either does not
|
|
6
|
+
* compile. A link that opens in a new tab is a `render` with `target`.
|
|
7
|
+
*/
|
|
8
|
+
export type SiteFooterLink = SiteHeaderLink;
|
|
9
|
+
/** A column of links under a title ("Tjenester", "Support", "Juridisk"). */
|
|
10
|
+
export type SiteFooterColumn = {
|
|
11
|
+
/** The title over the links, a heading (`titleRender`). */
|
|
12
|
+
title: ReactNode;
|
|
13
|
+
links: SiteFooterLink[];
|
|
14
|
+
};
|
|
15
|
+
/** A link to one of the bank's pages on a social network. */
|
|
16
|
+
export type SiteFooterSocialLink = SiteFooterLink & {
|
|
17
|
+
/**
|
|
18
|
+
* The network's logo, 24px: an `<img>` or `next/image` with `alt=""`, as
|
|
19
|
+
* the label names the link.
|
|
20
|
+
*/
|
|
21
|
+
icon: ReactNode;
|
|
22
|
+
};
|
|
23
|
+
/** The four markets, by the codes of the languages they speak. */
|
|
24
|
+
export type SiteFooterMarketCode = "no" | "se" | "fi" | "es";
|
|
25
|
+
/** The list of markets: the select that takes the visitor to another one. */
|
|
26
|
+
export type SiteFooterMarket = {
|
|
27
|
+
/** The market of this site, shown with its flag. */
|
|
28
|
+
value: SiteFooterMarketCode;
|
|
29
|
+
/**
|
|
30
|
+
* Called with the market the visitor picks. The website goes to that
|
|
31
|
+
* market's site (`https://leabank.se/`).
|
|
32
|
+
*/
|
|
33
|
+
onValueChange: (value: SiteFooterMarketCode) => void;
|
|
34
|
+
/**
|
|
35
|
+
* The markets to choose from, sorted by name in the page's language.
|
|
36
|
+
* @default ["no", "se", "fi", "es"]
|
|
37
|
+
*/
|
|
38
|
+
options?: readonly SiteFooterMarketCode[];
|
|
39
|
+
/** The title over the select, which names it. Left out, "Marked". */
|
|
40
|
+
title?: ReactNode;
|
|
41
|
+
};
|
|
42
|
+
/** The links to the bank on social networks, under a title. */
|
|
43
|
+
export type SiteFooterSocial = {
|
|
44
|
+
/** The title over the links. Left out, "Sosiale medier". */
|
|
45
|
+
title?: ReactNode;
|
|
46
|
+
links: SiteFooterSocialLink[];
|
|
47
|
+
};
|
|
48
|
+
export type SiteFooterProps = Omit<ComponentProps<"footer">, "children"> & {
|
|
49
|
+
/**
|
|
50
|
+
* The white logo, an `<img>` or `next/image`, 140px wide. It is the
|
|
51
|
+
* content of the link to the start page, named "Lea Bank, forside" as in
|
|
52
|
+
* `SiteHeader`, so the image can take `alt=""`.
|
|
53
|
+
*/
|
|
54
|
+
logo: ReactNode;
|
|
55
|
+
/**
|
|
56
|
+
* The link to the start page, a router link carrying its own `href`:
|
|
57
|
+
* `<NextLink href="/" />`.
|
|
58
|
+
* @default <a href="/" />
|
|
59
|
+
*/
|
|
60
|
+
homeRender?: ReactElement;
|
|
61
|
+
/** The columns of links, in order. */
|
|
62
|
+
columns?: SiteFooterColumn[];
|
|
63
|
+
/** The market select, at the top of the last column. */
|
|
64
|
+
market?: SiteFooterMarket;
|
|
65
|
+
/** The social links, at the foot of the last column. */
|
|
66
|
+
social?: SiteFooterSocial;
|
|
67
|
+
/**
|
|
68
|
+
* Called by the button that opens the cookie settings, which shows only
|
|
69
|
+
* with it: `openCookieSettings` from
|
|
70
|
+
* `@leabankab/component-library/cookie-consent`, or the website's own.
|
|
71
|
+
*/
|
|
72
|
+
onOpenCookieSettings?: () => void;
|
|
73
|
+
/**
|
|
74
|
+
* The line at the very end. A string becomes a `<p>`; anything else (the
|
|
75
|
+
* CMS's paragraphs) goes in a `<div>`.
|
|
76
|
+
*/
|
|
77
|
+
copyright?: ReactNode;
|
|
78
|
+
/**
|
|
79
|
+
* The element of every title in the footer.
|
|
80
|
+
* @default <h2 />
|
|
81
|
+
*/
|
|
82
|
+
titleRender?: ReactElement;
|
|
83
|
+
};
|
|
84
|
+
/**
|
|
85
|
+
* The website's footer, as at the end of every page of leabank.no: the
|
|
86
|
+
* white logo, the columns of links, the market select and the social links
|
|
87
|
+
* on a near-black band, then a line, the cookie settings and the copyright.
|
|
88
|
+
*
|
|
89
|
+
* ```tsx
|
|
90
|
+
* <SiteFooter
|
|
91
|
+
* logo={<img src="/lea-bank-white.svg" alt="" />}
|
|
92
|
+
* homeRender={<NextLink href="/" />}
|
|
93
|
+
* columns={[
|
|
94
|
+
* {
|
|
95
|
+
* title: "Tjenester",
|
|
96
|
+
* links: [{ label: "Lån", render: <NextLink href="/lan" /> }],
|
|
97
|
+
* },
|
|
98
|
+
* ]}
|
|
99
|
+
* market={{ value: "no", onValueChange: (market) => location.assign(sites[market]) }}
|
|
100
|
+
* social={{
|
|
101
|
+
* links: [
|
|
102
|
+
* {
|
|
103
|
+
* label: "Facebook",
|
|
104
|
+
* icon: <img src="/facebook.svg" alt="" />,
|
|
105
|
+
* render: <a href="https://www.facebook.com/leabank" target="_blank" rel="noopener noreferrer" />,
|
|
106
|
+
* },
|
|
107
|
+
* ],
|
|
108
|
+
* }}
|
|
109
|
+
* onOpenCookieSettings={openCookieSettings}
|
|
110
|
+
* copyright="Copyright © 2005–2026 Lea Bank AB NUF (publ)."
|
|
111
|
+
* />
|
|
112
|
+
* ```
|
|
113
|
+
*
|
|
114
|
+
* The columns share the width, as many 140px columns as fit beside the logo
|
|
115
|
+
* from 1024px (five at 1440px), under it below; two columns below 768px and
|
|
116
|
+
* one below 640px. The market select is Paloma's `Select` at `size="sm"`,
|
|
117
|
+
* each market with its flag, named by the title over it; picking a market
|
|
118
|
+
* calls `onValueChange` and goes nowhere by itself. `market.onValueChange`
|
|
119
|
+
* and `onOpenCookieSettings` are functions, so a server component renders
|
|
120
|
+
* the footer through a client component of its own.
|
|
121
|
+
*/
|
|
122
|
+
export declare function SiteFooter({ logo, homeRender, columns, market, social, onOpenCookieSettings, copyright, titleRender, className, ...rest }: SiteFooterProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ComponentProps, ReactElement } from 'react';
|
|
2
|
+
import { SiteHeaderGroup, SiteHeaderItem } from './site-header';
|
|
3
|
+
/**
|
|
4
|
+
* Internal to `SiteHeader`: a link to `href`, or the router link in
|
|
5
|
+
* `render`, which carries its own.
|
|
6
|
+
*/
|
|
7
|
+
export declare function SiteLink({ href, render, ...rest }: Omit<ComponentProps<"a">, "href"> & {
|
|
8
|
+
href?: string;
|
|
9
|
+
render?: ReactElement;
|
|
10
|
+
}): ReactElement<unknown, string | import('react').JSXElementConstructor<any>>;
|
|
11
|
+
/** Whether an item opens a menu: it has a group to show. */
|
|
12
|
+
export declare const hasMenu: (item: SiteHeaderItem) => item is Extract<SiteHeaderItem, {
|
|
13
|
+
groups: SiteHeaderGroup[];
|
|
14
|
+
}>;
|
|
15
|
+
/** Whether an item has a page of its own to link to. */
|
|
16
|
+
export declare const hasPage: (item: SiteHeaderItem) => boolean;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { SiteHeaderItem } from './site-header';
|
|
3
|
+
type SiteHeaderMenuProps = {
|
|
4
|
+
items: SiteHeaderItem[];
|
|
5
|
+
/** The link around the logo, shown in the menu's own bar too. */
|
|
6
|
+
home: ReactNode;
|
|
7
|
+
/** The account link, shown in the menu's own bar too. */
|
|
8
|
+
account: ReactNode;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Internal to `SiteHeader`: the menu below 1312px. The button in the bar
|
|
12
|
+
* opens a dialog that drops in from the top (Base UI's `Drawer`): focus
|
|
13
|
+
* moves into it and stays there, the page behind it does not scroll, and
|
|
14
|
+
* Escape, the close button, a swipe up or a press outside closes it. The
|
|
15
|
+
* dialog starts with a bar of its own, the bar of the header with a close
|
|
16
|
+
* button where the menu button was, so the visitor sees the same bar and
|
|
17
|
+
* always has a visible way out. Its links are not in the page while it is
|
|
18
|
+
* closed, and following one closes it.
|
|
19
|
+
*/
|
|
20
|
+
export declare function SiteHeaderMenu({ items, home, account }: SiteHeaderMenuProps): import("react").JSX.Element;
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import { ComponentProps, ReactElement, ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Where a link goes: `href`, or a router link in `render` that carries its
|
|
4
|
+
* own (`<NextLink href="/lan" />`). A link without either does not compile.
|
|
5
|
+
*/
|
|
6
|
+
export type SiteHeaderLinkTarget = {
|
|
7
|
+
/** Where the link goes. */
|
|
8
|
+
href: string;
|
|
9
|
+
/**
|
|
10
|
+
* A router link to render instead of an `<a>`, carrying its own
|
|
11
|
+
* `href`, and any `target` or `data-` attribute the page wants on it.
|
|
12
|
+
*/
|
|
13
|
+
render?: ReactElement;
|
|
14
|
+
} | {
|
|
15
|
+
href?: undefined;
|
|
16
|
+
render: ReactElement;
|
|
17
|
+
};
|
|
18
|
+
/** A link in the header or in one of its menus. */
|
|
19
|
+
export type SiteHeaderLink = SiteHeaderLinkTarget & {
|
|
20
|
+
/** The text of the link. */
|
|
21
|
+
label: ReactNode;
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* A group of links in a menu: the website's "Sublink", a column of the
|
|
25
|
+
* dropdown. The menus on leabank.no have one each.
|
|
26
|
+
*/
|
|
27
|
+
export type SiteHeaderGroup = {
|
|
28
|
+
/**
|
|
29
|
+
* The small title over the links on a wide screen ("Låneprodukter"). It
|
|
30
|
+
* names the list; the phone menu leaves it out, as the website's.
|
|
31
|
+
*/
|
|
32
|
+
title?: ReactNode;
|
|
33
|
+
/** The links, each with the arrow that grows in on hover. */
|
|
34
|
+
links: SiteHeaderLink[];
|
|
35
|
+
/**
|
|
36
|
+
* The last link, under a short purple line, with an arrow pointing up and
|
|
37
|
+
* to the right ("Se våre lån").
|
|
38
|
+
*/
|
|
39
|
+
cta?: SiteHeaderLink;
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* A top-level item: a link, or a menu of `groups`. With a menu the item is a
|
|
43
|
+
* button that opens it, so its own page is not a click on the item any more:
|
|
44
|
+
* link to it in the menu (the website's menus do, with the `cta` or a link).
|
|
45
|
+
* Given `href` or `render`, a menu item's own page is the first link of its
|
|
46
|
+
* submenu on a phone, in small bold type, as on the website.
|
|
47
|
+
*/
|
|
48
|
+
export type SiteHeaderItem = (SiteHeaderLink & {
|
|
49
|
+
groups?: undefined;
|
|
50
|
+
}) | {
|
|
51
|
+
/** The text of the item. */
|
|
52
|
+
label: ReactNode;
|
|
53
|
+
/** The item's own page, the first link of its submenu on a phone. */
|
|
54
|
+
href?: string;
|
|
55
|
+
/** A router link to the item's own page, instead of `href`. */
|
|
56
|
+
render?: ReactElement;
|
|
57
|
+
/** The menu that opens from the item. */
|
|
58
|
+
groups: SiteHeaderGroup[];
|
|
59
|
+
};
|
|
60
|
+
/** The account link, a round icon beside the call to action. */
|
|
61
|
+
export type SiteHeaderAccount = SiteHeaderLinkTarget & {
|
|
62
|
+
/**
|
|
63
|
+
* The link's name, read out in place of the icon ("Logg inn", "Min side").
|
|
64
|
+
*/
|
|
65
|
+
label: string;
|
|
66
|
+
/**
|
|
67
|
+
* The icon, 40px (32px below 1312px). Left out, Lucide's
|
|
68
|
+
* `CircleUserRound`; the website passes its own image with `alt=""`.
|
|
69
|
+
*/
|
|
70
|
+
icon?: ReactNode;
|
|
71
|
+
};
|
|
72
|
+
export type SiteHeaderProps = Omit<ComponentProps<"header">, "children"> & {
|
|
73
|
+
/**
|
|
74
|
+
* The logo, an `<img>` or `next/image`, 38px tall (32px below 1312px). It
|
|
75
|
+
* is the content of the link to the start page, which is named "Lea Bank,
|
|
76
|
+
* forside" by the header, so the image can take `alt=""`.
|
|
77
|
+
*/
|
|
78
|
+
logo: ReactNode;
|
|
79
|
+
/**
|
|
80
|
+
* The link to the start page, a router link carrying its own `href`:
|
|
81
|
+
* `<NextLink href="/" />`.
|
|
82
|
+
* @default <a href="/" />
|
|
83
|
+
*/
|
|
84
|
+
homeRender?: ReactElement;
|
|
85
|
+
/** The items at the start of the row (Lån, Sparing, Forsikring …). */
|
|
86
|
+
items: SiteHeaderItem[];
|
|
87
|
+
/**
|
|
88
|
+
* The items pushed to the end of the row (Kundeservice, Om oss). On a
|
|
89
|
+
* phone they follow `items` in the menu.
|
|
90
|
+
*/
|
|
91
|
+
endItems?: SiteHeaderItem[];
|
|
92
|
+
/** The account link, an icon at the end of the bar at every width. */
|
|
93
|
+
account?: SiteHeaderAccount;
|
|
94
|
+
/**
|
|
95
|
+
* The call to action at the end of the bar from 1312px, an
|
|
96
|
+
* `ActionButton size="sm"` ("Min side"). Below 1312px it is left out, as
|
|
97
|
+
* on the website.
|
|
98
|
+
*/
|
|
99
|
+
action?: ReactNode;
|
|
100
|
+
};
|
|
101
|
+
/**
|
|
102
|
+
* The website's header, as on every page of leabank.no: the logo, the main
|
|
103
|
+
* navigation, the account link and a call to action on a white bar, with
|
|
104
|
+
* the brand stripe under it.
|
|
105
|
+
*
|
|
106
|
+
* ```tsx
|
|
107
|
+
* <SiteHeader
|
|
108
|
+
* logo={<img src="/lea-bank.svg" alt="" />}
|
|
109
|
+
* homeRender={<NextLink href="/" />}
|
|
110
|
+
* items={[
|
|
111
|
+
* {
|
|
112
|
+
* label: "Lån",
|
|
113
|
+
* render: <NextLink href="/lan" />,
|
|
114
|
+
* groups: [
|
|
115
|
+
* {
|
|
116
|
+
* title: "Låneprodukter",
|
|
117
|
+
* links: [{ label: "Forbrukslån", render: <NextLink href="/lan/forbrukslan" /> }],
|
|
118
|
+
* cta: { label: "Se våre lån", render: <NextLink href="/lan" /> },
|
|
119
|
+
* },
|
|
120
|
+
* ],
|
|
121
|
+
* },
|
|
122
|
+
* { label: "Økonomiguiden", render: <NextLink href="/okonomiguiden" /> },
|
|
123
|
+
* ]}
|
|
124
|
+
* endItems={[{ label: "Kundeservice", href: "/kundeservice" }]}
|
|
125
|
+
* account={{ label: "Logg inn", href: "https://secure.leabank.no/" }}
|
|
126
|
+
* action={<ActionButton size="sm" render={<a href="https://secure.leabank.no/" />}>Min side</ActionButton>}
|
|
127
|
+
* />
|
|
128
|
+
* ```
|
|
129
|
+
*
|
|
130
|
+
* From 1312px the bar is 72px tall: the items are 40px pills that turn grey
|
|
131
|
+
* on hover, and an item with `groups` opens its menu, a white panel with the
|
|
132
|
+
* website's soft shadow, on hover, on a click and with the arrow-down key
|
|
133
|
+
* (Base UI's `NavigationMenu`: links, not a `role="menu"`; Escape closes it,
|
|
134
|
+
* and the focus moves into it with Tab). Below 1312px the bar is 55px tall
|
|
135
|
+
* with a menu button, the logo in the middle and the account icon; the menu
|
|
136
|
+
* drops in from under the bar as a dialog (Base UI's `Drawer` from the top),
|
|
137
|
+
* the items 72px rows and the menus disclosures, one open at a time. The
|
|
138
|
+
* menu closes when a link in it is followed, and its links are not in the
|
|
139
|
+
* page while it is closed.
|
|
140
|
+
*/
|
|
141
|
+
export declare function SiteHeader({ logo, homeRender, items, endItems, account, action, className, ...rest }: SiteHeaderProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The words of `SiteFooter`: the titles of the market and social columns
|
|
3
|
+
* when the page gives none, and the button that opens the cookie settings.
|
|
4
|
+
* `collation` is the language the markets are sorted in, as a BCP 47 tag
|
|
5
|
+
* for `Intl.Collator`. The link round the logo takes `SiteHeader`'s name.
|
|
6
|
+
*/
|
|
7
|
+
export declare const useSiteFooterLabels: () => Record<"collation" | "market" | "social" | "cookieSettings", string>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The words of `SiteHeader`: the name of the navigation, the menu button on
|
|
3
|
+
* a phone and the button that closes the menu, and the name of the link
|
|
4
|
+
* around the logo. The link's name starts with the words in the logo, so
|
|
5
|
+
* what a voice user reads out matches what they see.
|
|
6
|
+
*/
|
|
7
|
+
export declare const useSiteHeaderLabels: () => Record<"menu" | "navigation" | "home" | "closeMenu", string>;
|
package/dist/website.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});require('./website.css');let e=require("@base-ui/react/use-render"),t=require("lucide-react"),n=require("react"),r=require("./component-library.umd.js"),i=require("react/jsx-runtime");var a=(e,t)=>n=>[e,typeof t==`function`?t(n):t].filter(Boolean).join(` `),o={BrandLetters:`_BrandLetters_1ygg1_9`,Letters:`_Letters_1ygg1_17`,Letter:`_Letter_1ygg1_17`,Video:`_Video_1ygg1_48`},s=(0,r.createTranslation)({play:{no:`Spill av videoene`,se:`Spela upp videorna`,fi:`Toista videot`,es:`Reproducir los vídeos`},pause:{no:`Sett videoene på pause`,se:`Pausa videorna`,fi:`Keskeytä videot`,es:`Pausar los vídeos`}}),c=`(prefers-reduced-motion: reduce)`,l=[`L`,`E`,`A`];function u({videos:u,render:d,ref:f,className:p,...m}){let h=s(),g=(0,n.useRef)([]),[_,v]=(0,n.useState)(!1),y=e=>{for(let t of g.current)t&&e(t)},b=e=>{e.muted=!0,e.play().catch(()=>{})};(0,n.useEffect)(()=>{let e=window.matchMedia(c);e.matches||y(b);let t=e=>{e.matches&&y(e=>e.pause())};return e.addEventListener(`change`,t),()=>e.removeEventListener(`change`,t)},[]);let x=()=>v(g.current.some(e=>e!=null&&!e.paused)),S=()=>{y(_?e=>e.pause():b)};return(0,e.useRender)({render:d,ref:f,defaultTagName:`div`,props:{...m,className:a(o.BrandLetters,p)({}),children:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(`div`,{className:o.Letters,children:l.map((e,t)=>(0,i.jsx)(`div`,{className:o.Letter,"data-letter":e,children:(0,i.jsx)(`video`,{ref:e=>{g.current[t]=e},className:o.Video,src:u[t].src,poster:u[t].poster,muted:!0,loop:!0,playsInline:!0,"aria-hidden":!0,onPlay:x,onPause:x})},e))}),(0,i.jsx)(r.IconButton,{variant:`elevated`,color:`secondary`,"aria-label":_?h.pause:h.play,onClick:S,children:_?(0,i.jsx)(t.Pause,{"aria-hidden":!0}):(0,i.jsx)(t.Play,{"aria-hidden":!0})})]})}})}var d={Calculator:`_Calculator_1mamd_12`,Body:`_Body_1mamd_26`,Panel:`_Panel_1mamd_41`,Summary:`_Summary_1mamd_55`,Results:`_Results_1mamd_64`,Result:`_Result_1mamd_64`,Label:`_Label_1mamd_77`,Value:`_Value_1mamd_78`,Actions:`_Actions_1mamd_95`,Price:`_Price_1mamd_103`};function f({header:t,results:n,action:r,priceExample:o,render:s,ref:c,className:l,children:u,...f}){return(0,e.useRender)({render:s,ref:c,defaultTagName:`div`,props:{...f,className:a(d.Calculator,l)({}),children:(0,i.jsxs)(i.Fragment,{children:[t,(0,i.jsxs)(`div`,{className:d.Body,children:[(0,i.jsx)(`div`,{className:d.Panel,children:u}),(0,i.jsxs)(`div`,{className:d.Summary,children:[n.length>0&&(0,i.jsx)(`dl`,{className:d.Results,"aria-live":`polite`,children:n.map((e,t)=>(0,i.jsxs)(`div`,{className:d.Result,children:[(0,i.jsx)(`dt`,{className:d.Label,children:e.label}),(0,i.jsx)(`dd`,{className:d.Value,children:e.value})]},t))}),(r!=null||o!=null)&&(0,i.jsxs)(`div`,{className:d.Actions,children:[r,o!=null&&(0,i.jsx)(`p`,{className:d.Price,children:o})]})]})]})]})}})}var p={Carousel:`_Carousel_17a24_14`,Viewport:`_Viewport_17a24_31`,Track:`_Track_17a24_66`,Slide:`_Slide_17a24_94`,Controls:`_Controls_17a24_100`,VisuallyHidden:`_VisuallyHidden_17a24_109`},m=`(prefers-reduced-motion: reduce)`,h=150;function g(e,t){let r=(0,n.useRef)([0]),i=(0,n.useRef)(void 0),[a,o]=(0,n.useState)(()=>({pageCount:Math.max(1,t-1),page:0,settledPage:0,atStart:!0,atEnd:t<=2,overflowing:t>2,moved:!1})),s=(0,n.useCallback)((t,n=!1)=>{let i=e.current;if(!i)return;let a=i.scrollLeft,s=Math.max(0,i.scrollWidth-i.clientWidth),c=r.current,l=0;for(let e=1;e<c.length;e+=1)Math.abs(c[e]-a)<Math.abs(c[l]-a)&&(l=e);o(e=>{let r={pageCount:c.length,page:l,settledPage:t?l:e.settledPage,atStart:a<=1,atEnd:a>=s-1,overflowing:s>1,moved:e.moved||n};return Object.keys(r).every(t=>r[t]===e[t])?e:r})},[e]),c=(0,n.useCallback)(()=>{let t=e.current;if(!t)return;let n=Math.max(0,t.scrollWidth-t.clientWidth),i=Array.from(t.children),a=i[0]?.offsetLeft??0,o=[];for(let e of i){let t=Math.min(Math.max(0,e.offsetLeft-a),n);(o.length===0||t-o[o.length-1]>1)&&o.push(t)}r.current=o.length>0?o:[0],s(!0)},[s,e]);(0,n.useEffect)(()=>{let t=e.current;if(!t)return;c();let n=()=>{s(!1,!0),clearTimeout(i.current),i.current=setTimeout(()=>s(!0),h)},r=new ResizeObserver(c);return t.addEventListener(`scroll`,n,{passive:!0}),r.observe(t),()=>{t.removeEventListener(`scroll`,n),r.disconnect(),clearTimeout(i.current)}},[c,s,t,e]);let l=(0,n.useCallback)(t=>{let n=e.current;if(!n)return;let i=r.current,a=Math.min(i.length-1,Math.max(0,t)),o=!window.matchMedia(m).matches;n.scrollTo({left:i[a],behavior:o?`smooth`:`auto`})},[e]);return{...a,goTo:l}}var _=(0,r.createTranslation)({carousel:{no:`karusell`,se:`karusell`,fi:`karuselli`,es:`carrusel`},previous:{no:`Forrige`,se:`Föregående`,fi:`Edellinen`,es:`Anterior`},next:{no:`Neste`,se:`Nästa`,fi:`Seuraava`,es:`Siguiente`},status:{no:`Side {page} av {count}`,se:`Sida {page} av {count}`,fi:`Sivu {page}/{count}`,es:`Página {page} de {count}`}});function v({getItemLabel:o,render:s,ref:c,className:l,children:u,...d}){let f=_(),m=(0,n.useRef)(null),h=n.Children.toArray(u),{pageCount:v,page:y,settledPage:b,atStart:x,atEnd:S,overflowing:C,moved:w,goTo:T}=g(m,h.length);return(0,e.useRender)({render:s,ref:c,defaultTagName:`div`,props:{role:`region`,"aria-roledescription":f.carousel,...d,className:a(p.Carousel,l)({}),children:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(`div`,{className:p.Viewport,"data-at-start":x||void 0,"data-at-end":S||void 0,children:(0,i.jsx)(`ul`,{ref:m,className:p.Track,tabIndex:C?0:void 0,children:h.map((e,t)=>(0,i.jsx)(`li`,{className:p.Slide,children:e},t))})}),v>1&&(0,i.jsxs)(`div`,{className:p.Controls,children:[(0,i.jsx)(r.IconButton,{variant:`elevated`,color:`secondary`,"aria-label":f.previous,disabled:y===0,focusableWhenDisabled:!0,onClick:()=>T(y-1),children:(0,i.jsx)(t.ChevronLeft,{"aria-hidden":!0})}),(0,i.jsx)(r.PaginationDots,{count:v,value:y+1,onValueChange:e=>T(e-1),getItemLabel:o}),(0,i.jsx)(r.IconButton,{variant:`elevated`,color:`secondary`,"aria-label":f.next,disabled:y===v-1,focusableWhenDisabled:!0,onClick:()=>T(y+1),children:(0,i.jsx)(t.ChevronRight,{"aria-hidden":!0})}),(0,i.jsx)(`span`,{role:`status`,className:p.VisuallyHidden,children:w&&f.status.replace(`{page}`,String(b+1)).replace(`{count}`,String(v))})]})]})}})}var y={CtaBanner:`_CtaBanner_vkp5c_7`,Title:`_Title_vkp5c_15`,Content:`_Content_vkp5c_24`,Text:`_Text_vkp5c_32`,Action:`_Action_vkp5c_48`,Price:`_Price_vkp5c_53`};function b({className:e,id:t,children:n}){return typeof n==`string`||typeof n==`number`?(0,i.jsx)(`p`,{className:e,id:t,children:n}):(0,i.jsx)(`div`,{className:e,id:t,children:n})}function x({title:t,titleRender:n,text:r,action:o,priceExample:s,render:c,ref:l,className:u,...d}){let f=(0,e.useRender)({render:n,defaultTagName:`h2`,props:{className:y.Title,children:t}}),p=r!=null||o!=null||s!=null;return(0,e.useRender)({render:c,ref:l,defaultTagName:`div`,props:{...d,"data-has-content":p||void 0,className:a(y.CtaBanner,u)({}),children:(0,i.jsxs)(i.Fragment,{children:[f,p&&(0,i.jsxs)(`div`,{className:y.Content,children:[r!=null&&(0,i.jsx)(b,{className:y.Text,children:r}),o!=null&&(0,i.jsx)(`div`,{className:y.Action,children:o}),s!=null&&(0,i.jsx)(`p`,{className:y.Price,children:s})]})]})}})}var S=(0,n.createContext)({open:!0}),C={ExpandingCards:`_ExpandingCards_14pq8_19`,List:`_List_14pq8_23`,Item:`_Item_14pq8_32`},w=`(min-width: 1312px)`,T={open:!0},E={open:!1},D=e=>{let t=window.matchMedia(w);return t.addEventListener(`change`,e),()=>t.removeEventListener(`change`,e)},ee=()=>(0,n.useSyncExternalStore)(D,()=>window.matchMedia(w).matches,()=>!0);function te({defaultOpen:t=`first`,render:r,ref:o,className:s,children:c,...l}){let u=n.Children.toArray(c),d=ee(),[f,p]=(0,n.useState)(()=>t===`last`?Math.max(0,u.length-1):0);return(0,e.useRender)({render:r,ref:o,defaultTagName:`div`,props:{...l,className:a(C.ExpandingCards,s)({}),children:(0,i.jsx)(`ul`,{className:C.List,style:{"--expanding-cards-count":u.length},children:u.map((e,t)=>(0,i.jsx)(`li`,{className:C.Item,"data-open":t===f||void 0,onPointerEnter:()=>p(t),onFocus:()=>p(t),children:(0,i.jsx)(S.Provider,{value:!d||t===f?T:E,children:e})},t))})}})}var O={ExpandingCardsItem:`_ExpandingCardsItem_1v7ai_17`,Content:`_Content_1v7ai_53`,Title:`_Title_1v7ai_70`,Text:`_Text_1v7ai_81`,Action:`_Action_1v7ai_99`,Photo:`_Photo_1v7ai_110`,Image:`_Image_1v7ai_117`};function k({title:t,titleRender:o,text:s,action:c,src:l,alt:u,imageRender:d,surface:f=`base`,render:p,ref:m,className:h,...g}){let{open:_}=(0,n.useContext)(S),v=(0,e.useRender)({render:o,defaultTagName:`h2`,props:{className:O.Title,children:t}}),y=(0,e.useRender)({enabled:l!=null,render:d,defaultTagName:`img`,props:{src:l,alt:u,className:O.Image}}),x=(0,n.isValidElement)(c)&&c.type===r.ActionButton?(0,n.cloneElement)(c,{iconOnly:!_}):c;return(0,e.useRender)({render:p,ref:m,defaultTagName:`div`,props:{...g,"data-surface":f,"data-open":_||void 0,"data-image":l!=null||void 0,className:a(O.ExpandingCardsItem,h)({}),children:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(`div`,{className:O.Content,children:[v,s!=null&&(0,i.jsx)(b,{className:O.Text,children:s}),c!=null&&(0,i.jsx)(`div`,{className:O.Action,children:x})]}),y!=null&&(0,i.jsx)(`div`,{className:O.Photo,children:y})]})}})}var A={Hero:`_Hero_1ik22_8`,Background:`_Background_1ik22_24`,Image:`_Image_1ik22_30`,Container:`_Container_1ik22_37`,Box:`_Box_1ik22_45`,Title:`_Title_1ik22_50`,Text:`_Text_1ik22_59`,Action:`_Action_1ik22_75`,Price:`_Price_1ik22_80`};function j({src:t,alt:n,imageRender:o,title:s,titleRender:c,text:l,action:u,priceExample:d,render:f,ref:p,className:m,...h}){let g=(0,e.useRender)({render:c,defaultTagName:`h1`,props:{className:A.Title,children:s}}),_=(0,e.useRender)({render:o,defaultTagName:`img`,props:{src:t,alt:n,className:A.Image}});return(0,e.useRender)({render:f,ref:p,defaultTagName:`section`,props:{...h,className:a(A.Hero,m)({}),children:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(`div`,{className:A.Container,children:(0,i.jsxs)(r.Panel,{className:A.Box,children:[g,l!=null&&(0,i.jsx)(b,{className:A.Text,children:l}),u!=null&&(0,i.jsx)(`div`,{className:A.Action,children:u}),d!=null&&(0,i.jsx)(`p`,{className:A.Price,children:d})]})}),(0,i.jsx)(`div`,{className:A.Background,children:_})]})}})}var M={HeroServiceGrid:`_HeroServiceGrid_yr3eo_8`,Cards:`_Cards_yr3eo_15`,Item:`_Item_yr3eo_26`,Featured:`_Featured_yr3eo_51`};function N({src:t,alt:o,imageRender:s,action:c,imagePosition:l=`start`,render:u,ref:d,className:f,children:p,...m}){let h=n.Children.toArray(p);return(0,e.useRender)({render:u,ref:d,defaultTagName:`div`,props:{...m,"data-image-position":l,className:a(M.HeroServiceGrid,f)({}),children:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(r.FeaturedImage,{className:M.Featured,src:t,alt:o,imageRender:s,action:c}),h.length>0&&(0,i.jsx)(`ul`,{className:M.Cards,children:h.map((e,t)=>(0,i.jsx)(`li`,{className:M.Item,children:e},t))})]})}})}var P={NavigationGrid:`_NavigationGrid_ocatr_9`,Title:`_Title_ocatr_16`,List:`_List_ocatr_25`,Item:`_Item_ocatr_35`};function F({title:t,titleRender:r,render:o,ref:s,className:c,children:l,...u}){let d=n.Children.toArray(l),f=d.length>=3&&d.length%2==1,p=(0,e.useRender)({enabled:t!=null,render:r,defaultTagName:`h2`,props:{className:P.Title,children:t}});return(0,e.useRender)({render:o,ref:s,defaultTagName:`div`,props:{...u,className:a(P.NavigationGrid,c)({}),children:(0,i.jsxs)(i.Fragment,{children:[p,(0,i.jsx)(`ul`,{className:P.List,"data-odd":f||void 0,children:d.map((e,t)=>(0,i.jsx)(`li`,{className:P.Item,children:e},t))})]})}})}var I={PartnerList:`_PartnerList_9o9wx_7`,List:`_List_9o9wx_11`,Controls:`_Controls_9o9wx_19`,VisuallyHidden:`_VisuallyHidden_9o9wx_29`},L=(0,r.createTranslation)({previous:{no:`Forrige side`,se:`Föregående sida`,fi:`Edellinen sivu`,es:`Página anterior`},next:{no:`Neste side`,se:`Nästa sida`,fi:`Seuraava sivu`,es:`Página siguiente`},status:{no:`Side {page} av {count}`,se:`Sida {page} av {count}`,fi:`Sivu {page}/{count}`,es:`Página {page} de {count}`},collation:{no:`nb`,se:`sv`,fi:`fi`,es:`es`}});function R({items:o,pageSize:s=9,value:c,defaultValue:l=1,onValueChange:u,render:d,ref:f,className:p,...m}){let h=L(),[g,_]=(0,n.useState)(l),v=(0,n.useMemo)(()=>{let e=new Intl.Collator(h.collation,{sensitivity:`base`});return[...o].sort((t,n)=>e.compare(t.name,n.name))},[o,h.collation]),y=Math.max(1,Math.floor(s)),b=Math.max(1,Math.ceil(v.length/y)),x=Math.min(b,Math.max(1,c??g)),S=(x-1)*y,C=e=>{let t=Math.min(b,Math.max(1,e));c===void 0&&_(t),t!==x&&u?.(t)};return(0,e.useRender)({enabled:v.length>0,render:d,ref:f,defaultTagName:`div`,props:{...m,className:a(I.PartnerList,p)({}),children:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(`ul`,{className:I.List,children:v.slice(S,S+y).map(({name:e,content:t,...n},a)=>(0,i.jsx)(r.PartnerRow,{...n,render:(0,i.jsx)(`li`,{}),children:t},`${S+a}-${e}`))}),b>1&&(0,i.jsxs)(`div`,{className:I.Controls,children:[(0,i.jsx)(r.IconButton,{variant:`elevated`,color:`secondary`,"aria-label":h.previous,disabled:x===1,focusableWhenDisabled:!0,onClick:()=>C(x-1),children:(0,i.jsx)(t.ChevronLeft,{"aria-hidden":!0})}),(0,i.jsx)(r.PaginationDots,{count:b,value:x,onValueChange:C}),(0,i.jsx)(r.IconButton,{variant:`elevated`,color:`secondary`,"aria-label":h.next,disabled:x===b,focusableWhenDisabled:!0,onClick:()=>C(x+1),children:(0,i.jsx)(t.ChevronRight,{"aria-hidden":!0})}),(0,i.jsx)(`span`,{role:`status`,className:I.VisuallyHidden,children:h.status.replace(`{page}`,String(x)).replace(`{count}`,String(b))})]})]})}})}var z={Grid:`_Grid_1vukg_10`,Content:`_Content_1vukg_17`,Logos:`_Logos_1vukg_28`,LogoItem:`_LogoItem_1vukg_38`,Logo:`_Logo_1vukg_28`,Text:`_Text_1vukg_60`,Title:`_Title_1vukg_66`,Description:`_Description_1vukg_75`,Actions:`_Actions_1vukg_91`,Price:`_Price_1vukg_98`,Media:`_Media_1vukg_106`,PaymentFeature:`_PaymentFeature_1vukg_111`,Image:`_Image_1vukg_115`};function B({logos:t,title:n,titleRender:a,text:o,actions:s,priceExample:c,src:l,alt:u,imageRender:d,imagePosition:f=`end`,className:p,...m}){let h=(0,e.useRender)({render:a,defaultTagName:`h2`,props:{className:z.Title,children:n}}),g=(0,e.useRender)({enabled:l!=null,render:d,defaultTagName:`img`,props:{src:l,alt:u,className:z.Image}});return(0,i.jsx)(r.Panel,{...m,className:[z.PaymentFeature,p].filter(Boolean).join(` `),"data-image-position":f,"data-has-image":g!=null||void 0,children:(0,i.jsxs)(`div`,{className:z.Grid,children:[(0,i.jsxs)(`div`,{className:z.Content,children:[t!=null&&t.length>0&&(0,i.jsx)(`ul`,{className:z.Logos,children:t.map((e,t)=>(0,i.jsx)(V,{...e},t))}),(0,i.jsxs)(`div`,{className:z.Text,children:[h,o!=null&&(0,i.jsx)(b,{className:z.Description,children:o})]}),s!=null&&(0,i.jsx)(`div`,{className:z.Actions,children:s}),c!=null&&(0,i.jsx)(`p`,{className:z.Price,children:c})]}),g!=null&&(0,i.jsx)(`div`,{className:z.Media,children:g})]})})}function V({src:t,alt:n,imageRender:r}){let a=(0,e.useRender)({render:r,defaultTagName:`img`,props:{src:t,alt:n,className:z.Logo}});return(0,i.jsx)(`li`,{className:z.LogoItem,children:a})}var H={PromoGrid:`_PromoGrid_1l2yi_10`,Featured:`_Featured_1l2yi_19`,Content:`_Content_1l2yi_23`,Photos:`_Photos_1l2yi_31`,Photo:`_Photo_1l2yi_31`,Block:`_Block_1l2yi_51`,Title:`_Title_1l2yi_63`,Subtitle:`_Subtitle_1l2yi_73`};function U({src:t,alt:n,imageRender:o,action:s,images:c,title:l,titleRender:u,subtitle:d,imagePosition:f=`start`,render:p,ref:m,className:h,...g}){let _=(0,e.useRender)({render:u,defaultTagName:`h2`,props:{className:H.Title,children:l}});return(0,e.useRender)({render:p,ref:m,defaultTagName:`div`,props:{...g,"data-image-position":f,className:a(H.PromoGrid,h)({}),children:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(r.FeaturedImage,{className:H.Featured,src:t,alt:n,imageRender:o,action:s}),(0,i.jsxs)(`div`,{className:H.Content,children:[c!=null&&c.length>0&&(0,i.jsx)(`div`,{className:H.Photos,"data-count":c.length,children:c.map((e,t)=>(0,i.jsx)(W,{...e},t))}),(0,i.jsxs)(`div`,{className:H.Block,children:[_,d!=null&&(0,i.jsx)(b,{className:H.Subtitle,children:d})]})]})]})}})}function W({src:t,alt:n,imageRender:r}){return(0,e.useRender)({render:r,defaultTagName:`img`,props:{src:t,alt:n,className:H.Photo}})}var G={Section:`_Section_f8rp9_11`,Content:`_Content_f8rp9_60`};function K({surface:t=`base`,spacingTop:n=`lg`,spacingBottom:r=`lg`,width:o=`full`,render:s,ref:c,className:l,children:u,...d}){return(0,e.useRender)({render:s,ref:c,defaultTagName:`section`,props:{...d,"data-surface":t,"data-spacing-top":n,"data-spacing-bottom":r,className:a(G.Section,l)({}),children:(0,i.jsx)(`div`,{className:G.Content,"data-width":o,children:u})}})}var q={SectionHeader:`_SectionHeader_11mff_8`,Text:`_Text_11mff_17`,Eyebrow:`_Eyebrow_11mff_25`,Title:`_Title_11mff_33`,Subtitle:`_Subtitle_11mff_49`,Actions:`_Actions_11mff_67`,Price:`_Price_11mff_75`};function J({eyebrow:t,title:n,titleRender:r,titleSize:o=`lg`,subtitle:s,actions:c,priceExample:l,render:u,ref:d,className:f,...p}){let m=(0,e.useRender)({render:r,defaultTagName:`h2`,props:{className:q.Title,children:n}});return(0,e.useRender)({render:u,ref:d,defaultTagName:`div`,props:{...p,"data-title-size":o,className:a(q.SectionHeader,f)({}),children:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(`div`,{className:q.Text,children:[t!=null&&(0,i.jsx)(`p`,{className:q.Eyebrow,children:t}),m,s!=null&&(0,i.jsx)(b,{className:q.Subtitle,children:s})]}),c!=null&&(0,i.jsx)(`div`,{className:q.Actions,children:c}),l!=null&&(0,i.jsx)(`p`,{className:q.Price,children:l})]})}})}var Y={ServiceCardGrid:`_ServiceCardGrid_nutvc_9`,List:`_List_nutvc_13`,Item:`_Item_nutvc_23`};function X({render:t,ref:r,className:o,children:s,...c}){let l=n.Children.toArray(s);return(0,e.useRender)({render:t,ref:r,defaultTagName:`div`,props:{...c,className:a(Y.ServiceCardGrid,o)({}),children:(0,i.jsx)(`ul`,{className:Y.List,"data-count":l.length,children:l.map((e,t)=>(0,i.jsx)(`li`,{className:Y.Item,children:e},t))})}})}var Z={SplitContent:`_SplitContent_16c8f_11`,Grid:`_Grid_16c8f_19`,Text:`_Text_16c8f_26`,Title:`_Title_16c8f_33`,Description:`_Description_16c8f_42`,Media:`_Media_16c8f_58`,Image:`_Image_16c8f_67`,Actions:`_Actions_16c8f_75`,Price:`_Price_16c8f_82`};function ne({title:t,titleRender:n,text:r,src:o,alt:s,imageRender:c,imagePosition:l=`end`,action:u,priceExample:d,render:f,ref:p,className:m,...h}){let g=(0,e.useRender)({render:n,defaultTagName:`h2`,props:{className:Z.Title,children:t}}),_=(0,e.useRender)({enabled:o!=null,render:c,defaultTagName:`img`,props:{src:o,alt:s,className:Z.Image}});return(0,e.useRender)({render:f,ref:p,defaultTagName:`div`,props:{...h,"data-image-position":l,"data-has-image":_!=null||void 0,className:a(Z.SplitContent,m)({}),children:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(`div`,{className:Z.Grid,children:[(0,i.jsxs)(`div`,{className:Z.Text,children:[g,r!=null&&(0,i.jsx)(b,{className:Z.Description,children:r})]}),_!=null&&(0,i.jsx)(`div`,{className:Z.Media,children:_})]}),(u!=null||d!=null)&&(0,i.jsxs)(`div`,{className:Z.Actions,children:[u,d!=null&&(0,i.jsx)(`p`,{className:Z.Price,children:d})]})]})}})}var Q={Stats:`_Stats_1o0ef_16`,List:`_List_1o0ef_25`,Bar:`_Bar_1o0ef_33`,Stat:`_Stat_1o0ef_16`,Number:`_Number_1o0ef_59`,Labels:`_Labels_1o0ef_69`,Title:`_Title_1o0ef_77`,Text:`_Text_1o0ef_85`,Actions:`_Actions_1o0ef_95`,Price:`_Price_1o0ef_103`};function re({header:t,items:r,titleRender:o,action:s,priceExample:c,render:l,ref:u,className:d,...f}){return(0,e.useRender)({render:l,ref:u,defaultTagName:`div`,props:{...f,className:a(Q.Stats,d)({}),children:(0,i.jsxs)(i.Fragment,{children:[t,(0,i.jsxs)(`ul`,{className:Q.List,children:[r.map((e,t)=>(0,i.jsxs)(n.Fragment,{children:[(0,i.jsx)(`li`,{"aria-hidden":!0,className:Q.Bar}),(0,i.jsx)(ie,{...e,titleRender:o})]},t)),(0,i.jsx)(`li`,{"aria-hidden":!0,className:Q.Bar})]}),(s!=null||c!=null)&&(0,i.jsxs)(`div`,{className:Q.Actions,children:[s,c!=null&&(0,i.jsx)(`p`,{className:Q.Price,children:c})]})]})}})}function ie({number:t,title:n,text:r,titleRender:a}){let o=(0,e.useRender)({enabled:n!=null,render:a,defaultTagName:`h3`,props:{className:Q.Title,children:n}});return(0,i.jsxs)(`li`,{className:Q.Stat,children:[(0,i.jsx)(`p`,{className:Q.Number,children:t}),(o!=null||r!=null)&&(0,i.jsxs)(`div`,{className:Q.Labels,children:[o,r!=null&&(0,i.jsx)(`p`,{className:Q.Text,children:r})]})]})}var $={Testimonials:`_Testimonials_13hpt_11`,Featured:`_Featured_13hpt_18`,Video:`_Video_13hpt_31`,Quote:`_Quote_13hpt_36`,Blockquote:`_Blockquote_13hpt_44`,Person:`_Person_13hpt_72`,Name:`_Name_13hpt_81`,Meta:`_Meta_13hpt_88`,Still:`_Still_13hpt_124`,Play:`_Play_13hpt_133`,DialogViewport:`_DialogViewport_13hpt_143`,DialogPopup:`_DialogPopup_13hpt_143`,DialogVideo:`_DialogVideo_13hpt_149`,Close:`_Close_13hpt_157`},ae=(0,r.createTranslation)({reviews:{no:`Kundeomtaler`,se:`Kundomdömen`,fi:`Asiakasarviot`,es:`Opiniones de clientes`},play:{no:`Spill av video`,se:`Spela upp video`,fi:`Toista video`,es:`Reproducir vídeo`},video:{no:`Video fra kunde`,se:`Video från kund`,fi:`Asiakkaan video`,es:`Vídeo de un cliente`},close:{no:`Lukk video`,se:`Stäng video`,fi:`Sulje video`,es:`Cerrar vídeo`},captionsLanguage:{no:`nb`,se:`sv`,fi:`fi`,es:`es`},captionsLabel:{no:`Norsk`,se:`Svenska`,fi:`Suomi`,es:`Español`}});function oe({title:o,titleRender:s,subtitle:c,quote:l,name:u,meta:d,rating:f,videoSrc:p,videoPoster:m,videoCaptions:h,videoPosition:g=`start`,render:_,ref:y,className:b,children:x,...S}){let C=ae(),w=(0,n.useId)(),T=l!=null||u!=null,E=n.Children.toArray(x).length>0;return(0,e.useRender)({render:_,ref:y,defaultTagName:`div`,props:{...S,className:a($.Testimonials,b)({}),children:(0,i.jsxs)(i.Fragment,{children:[o!=null&&(0,i.jsx)(J,{title:o,titleRender:(0,n.cloneElement)(s??(0,i.jsx)(`h2`,{}),{id:w}),subtitle:c}),(T||p!=null)&&(0,i.jsxs)(`div`,{className:$.Featured,"data-video":p!=null||void 0,"data-video-position":g,children:[T&&(0,i.jsxs)(`figure`,{className:$.Quote,children:[f!=null&&(0,i.jsx)(r.StarRating,{rating:f}),l!=null&&(0,i.jsx)(`blockquote`,{className:$.Blockquote,children:typeof l==`string`||typeof l==`number`?(0,i.jsx)(`p`,{children:l}):l}),(u!=null||d!=null)&&(0,i.jsxs)(`figcaption`,{className:$.Person,children:[u!=null&&(0,i.jsx)(`span`,{className:$.Name,children:u}),d!=null&&(0,i.jsx)(`span`,{className:$.Meta,children:d})]})]}),p!=null&&(0,i.jsxs)(`div`,{className:$.Video,children:[m==null?(0,i.jsx)(`video`,{className:$.Still,src:`${p}#t=0.1`,preload:`metadata`,muted:!0,playsInline:!0,"aria-hidden":!0,tabIndex:-1}):(0,i.jsx)(`img`,{className:$.Still,src:m,alt:``}),(0,i.jsxs)(r.Dialog.Root,{children:[(0,i.jsx)(r.Dialog.Trigger,{render:(0,i.jsx)(r.IconButton,{variant:`elevated`,color:`secondary`,"aria-label":C.play,className:$.Play,children:(0,i.jsx)(t.Play,{"aria-hidden":!0})})}),(0,i.jsxs)(r.Dialog.Portal,{children:[(0,i.jsx)(r.Dialog.Backdrop,{}),(0,i.jsx)(r.Dialog.Viewport,{className:$.DialogViewport,children:(0,i.jsxs)(r.Dialog.Popup,{size:`lg`,"aria-label":C.video,className:$.DialogPopup,children:[(0,i.jsx)(r.Dialog.Close,{render:(0,i.jsx)(r.IconButton,{variant:`elevated`,color:`secondary`,"aria-label":C.close,className:$.Close,children:(0,i.jsx)(t.X,{"aria-hidden":!0})})}),(0,i.jsx)(`video`,{className:$.DialogVideo,src:p,controls:!0,autoPlay:!0,playsInline:!0,children:h!=null&&(0,i.jsx)(`track`,{kind:`captions`,src:h,srcLang:C.captionsLanguage,label:C.captionsLabel,default:!0})})]})})]})]})]})]}),E&&(0,i.jsx)(v,{...o==null?{"aria-label":C.reviews}:{"aria-labelledby":w},children:x})]})}})}exports.BrandLetters=u,exports.Calculator=f,exports.Carousel=v,exports.CtaBanner=x,exports.ExpandingCards=te,exports.ExpandingCardsItem=k,exports.Hero=j,exports.HeroServiceGrid=N,exports.NavigationGrid=F,exports.PartnerList=R,exports.PaymentFeature=B,exports.PromoGrid=U,exports.Section=K,exports.SectionHeader=J,exports.ServiceCardGrid=X,exports.SplitContent=ne,exports.Stats=re,exports.Testimonials=oe;
|
|
1
|
+
"use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});require('./website.css');let e=require("@base-ui/react/use-render"),t=require("lucide-react"),n=require("react/jsx-runtime"),r=require("react"),i=require("./component-library.umd.js"),a=require("@base-ui/react/navigation-menu"),o=require("@base-ui/react/collapsible"),s=require("@base-ui/react/drawer");function c({className:e,id:t,children:r}){return typeof r==`string`||typeof r==`number`?(0,n.jsx)(`p`,{className:e,id:t,children:r}):(0,n.jsx)(`div`,{className:e,id:t,children:r})}var l={AlertBanner:`_AlertBanner_vmi8l_6`,Icon:`_Icon_vmi8l_18`,Content:`_Content_vmi8l_31`,Title:`_Title_vmi8l_40`,Text:`_Text_vmi8l_47`};function u({render:t,children:n}){return(0,e.useRender)({render:t,defaultTagName:`h2`,props:{className:l.Title,children:n}})}function d({title:e,text:r,titleRender:i,icon:a,className:o,...s}){let d=a===void 0?(0,n.jsx)(t.TriangleAlert,{}):a;return(0,n.jsxs)(`div`,{...s,className:[l.AlertBanner,o].filter(Boolean).join(` `),children:[d!=null&&d!==!1&&(0,n.jsx)(`span`,{"aria-hidden":!0,className:l.Icon,children:d}),(0,n.jsxs)(`div`,{className:l.Content,children:[e!=null&&(0,n.jsx)(u,{render:i,children:e}),r!=null&&(0,n.jsx)(c,{className:l.Text,children:r})]})]})}var f=(e,t)=>n=>[e,typeof t==`function`?t(n):t].filter(Boolean).join(` `),p={BrandLetters:`_BrandLetters_1ygg1_9`,Letters:`_Letters_1ygg1_17`,Letter:`_Letter_1ygg1_17`,Video:`_Video_1ygg1_48`},m=(0,i.createTranslation)({play:{no:`Spill av videoene`,se:`Spela upp videorna`,fi:`Toista videot`,es:`Reproducir los vídeos`},pause:{no:`Sett videoene på pause`,se:`Pausa videorna`,fi:`Keskeytä videot`,es:`Pausar los vídeos`}}),h=`(prefers-reduced-motion: reduce)`,g=[`L`,`E`,`A`];function _({videos:a,render:o,ref:s,className:c,...l}){let u=m(),d=(0,r.useRef)([]),[_,v]=(0,r.useState)(!1),y=e=>{for(let t of d.current)t&&e(t)},b=e=>{e.muted=!0,e.play().catch(()=>{})};(0,r.useEffect)(()=>{let e=window.matchMedia(h);e.matches||y(b);let t=e=>{e.matches&&y(e=>e.pause())};return e.addEventListener(`change`,t),()=>e.removeEventListener(`change`,t)},[]);let x=()=>v(d.current.some(e=>e!=null&&!e.paused)),S=()=>{y(_?e=>e.pause():b)};return(0,e.useRender)({render:o,ref:s,defaultTagName:`div`,props:{...l,className:f(p.BrandLetters,c)({}),children:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(`div`,{className:p.Letters,children:g.map((e,t)=>(0,n.jsx)(`div`,{className:p.Letter,"data-letter":e,children:(0,n.jsx)(`video`,{ref:e=>{d.current[t]=e},className:p.Video,src:a[t].src,poster:a[t].poster,muted:!0,loop:!0,playsInline:!0,"aria-hidden":!0,onPlay:x,onPause:x})},e))}),(0,n.jsx)(i.IconButton,{variant:`elevated`,color:`secondary`,"aria-label":_?u.pause:u.play,onClick:S,children:_?(0,n.jsx)(t.Pause,{"aria-hidden":!0}):(0,n.jsx)(t.Play,{"aria-hidden":!0})})]})}})}var v={Calculator:`_Calculator_1mamd_12`,Body:`_Body_1mamd_26`,Panel:`_Panel_1mamd_41`,Summary:`_Summary_1mamd_55`,Results:`_Results_1mamd_64`,Result:`_Result_1mamd_64`,Label:`_Label_1mamd_77`,Value:`_Value_1mamd_78`,Actions:`_Actions_1mamd_95`,Price:`_Price_1mamd_103`};function y({header:t,results:r,action:i,priceExample:a,render:o,ref:s,className:c,children:l,...u}){return(0,e.useRender)({render:o,ref:s,defaultTagName:`div`,props:{...u,className:f(v.Calculator,c)({}),children:(0,n.jsxs)(n.Fragment,{children:[t,(0,n.jsxs)(`div`,{className:v.Body,children:[(0,n.jsx)(`div`,{className:v.Panel,children:l}),(0,n.jsxs)(`div`,{className:v.Summary,children:[r.length>0&&(0,n.jsx)(`dl`,{className:v.Results,"aria-live":`polite`,children:r.map((e,t)=>(0,n.jsxs)(`div`,{className:v.Result,children:[(0,n.jsx)(`dt`,{className:v.Label,children:e.label}),(0,n.jsx)(`dd`,{className:v.Value,children:e.value})]},t))}),(i!=null||a!=null)&&(0,n.jsxs)(`div`,{className:v.Actions,children:[i,a!=null&&(0,n.jsx)(`p`,{className:v.Price,children:a})]})]})]})]})}})}var b={Carousel:`_Carousel_17a24_14`,Viewport:`_Viewport_17a24_31`,Track:`_Track_17a24_66`,Slide:`_Slide_17a24_94`,Controls:`_Controls_17a24_100`,VisuallyHidden:`_VisuallyHidden_17a24_109`},x=`(prefers-reduced-motion: reduce)`,S=150;function C(e,t){let n=(0,r.useRef)([0]),i=(0,r.useRef)(void 0),[a,o]=(0,r.useState)(()=>({pageCount:Math.max(1,t-1),page:0,settledPage:0,atStart:!0,atEnd:t<=2,overflowing:t>2,moved:!1})),s=(0,r.useCallback)((t,r=!1)=>{let i=e.current;if(!i)return;let a=i.scrollLeft,s=Math.max(0,i.scrollWidth-i.clientWidth),c=n.current,l=0;for(let e=1;e<c.length;e+=1)Math.abs(c[e]-a)<Math.abs(c[l]-a)&&(l=e);o(e=>{let n={pageCount:c.length,page:l,settledPage:t?l:e.settledPage,atStart:a<=1,atEnd:a>=s-1,overflowing:s>1,moved:e.moved||r};return Object.keys(n).every(t=>n[t]===e[t])?e:n})},[e]),c=(0,r.useCallback)(()=>{let t=e.current;if(!t)return;let r=Math.max(0,t.scrollWidth-t.clientWidth),i=Array.from(t.children),a=i[0]?.offsetLeft??0,o=[];for(let e of i){let t=Math.min(Math.max(0,e.offsetLeft-a),r);(o.length===0||t-o[o.length-1]>1)&&o.push(t)}n.current=o.length>0?o:[0],s(!0)},[s,e]);(0,r.useEffect)(()=>{let t=e.current;if(!t)return;c();let n=()=>{s(!1,!0),clearTimeout(i.current),i.current=setTimeout(()=>s(!0),S)},r=new ResizeObserver(c);return t.addEventListener(`scroll`,n,{passive:!0}),r.observe(t),()=>{t.removeEventListener(`scroll`,n),r.disconnect(),clearTimeout(i.current)}},[c,s,t,e]);let l=(0,r.useCallback)(t=>{let r=e.current;if(!r)return;let i=n.current,a=Math.min(i.length-1,Math.max(0,t)),o=!window.matchMedia(x).matches;r.scrollTo({left:i[a],behavior:o?`smooth`:`auto`})},[e]);return{...a,goTo:l}}var w=(0,i.createTranslation)({carousel:{no:`karusell`,se:`karusell`,fi:`karuselli`,es:`carrusel`},previous:{no:`Forrige`,se:`Föregående`,fi:`Edellinen`,es:`Anterior`},next:{no:`Neste`,se:`Nästa`,fi:`Seuraava`,es:`Siguiente`},status:{no:`Side {page} av {count}`,se:`Sida {page} av {count}`,fi:`Sivu {page}/{count}`,es:`Página {page} de {count}`}});function T({getItemLabel:a,render:o,ref:s,className:c,children:l,...u}){let d=w(),p=(0,r.useRef)(null),m=r.Children.toArray(l),{pageCount:h,page:g,settledPage:_,atStart:v,atEnd:y,overflowing:x,moved:S,goTo:T}=C(p,m.length);return(0,e.useRender)({render:o,ref:s,defaultTagName:`div`,props:{role:`region`,"aria-roledescription":d.carousel,...u,className:f(b.Carousel,c)({}),children:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(`div`,{className:b.Viewport,"data-at-start":v||void 0,"data-at-end":y||void 0,children:(0,n.jsx)(`ul`,{ref:p,className:b.Track,tabIndex:x?0:void 0,children:m.map((e,t)=>(0,n.jsx)(`li`,{className:b.Slide,children:e},t))})}),h>1&&(0,n.jsxs)(`div`,{className:b.Controls,children:[(0,n.jsx)(i.IconButton,{variant:`elevated`,color:`secondary`,"aria-label":d.previous,disabled:g===0,focusableWhenDisabled:!0,onClick:()=>T(g-1),children:(0,n.jsx)(t.ChevronLeft,{"aria-hidden":!0})}),(0,n.jsx)(i.PaginationDots,{count:h,value:g+1,onValueChange:e=>T(e-1),getItemLabel:a}),(0,n.jsx)(i.IconButton,{variant:`elevated`,color:`secondary`,"aria-label":d.next,disabled:g===h-1,focusableWhenDisabled:!0,onClick:()=>T(g+1),children:(0,n.jsx)(t.ChevronRight,{"aria-hidden":!0})}),(0,n.jsx)(`span`,{role:`status`,className:b.VisuallyHidden,children:S&&d.status.replace(`{page}`,String(_+1)).replace(`{count}`,String(h))})]})]})}})}var E={CtaBanner:`_CtaBanner_vkp5c_7`,Title:`_Title_vkp5c_15`,Content:`_Content_vkp5c_24`,Text:`_Text_vkp5c_32`,Action:`_Action_vkp5c_48`,Price:`_Price_vkp5c_53`};function ee({title:t,titleRender:r,text:i,action:a,priceExample:o,render:s,ref:l,className:u,...d}){let p=(0,e.useRender)({render:r,defaultTagName:`h2`,props:{className:E.Title,children:t}}),m=i!=null||a!=null||o!=null;return(0,e.useRender)({render:s,ref:l,defaultTagName:`div`,props:{...d,"data-has-content":m||void 0,className:f(E.CtaBanner,u)({}),children:(0,n.jsxs)(n.Fragment,{children:[p,m&&(0,n.jsxs)(`div`,{className:E.Content,children:[i!=null&&(0,n.jsx)(c,{className:E.Text,children:i}),a!=null&&(0,n.jsx)(`div`,{className:E.Action,children:a}),o!=null&&(0,n.jsx)(`p`,{className:E.Price,children:o})]})]})}})}var te=(0,r.createContext)({open:!0}),D={ExpandingCards:`_ExpandingCards_14pq8_19`,List:`_List_14pq8_23`,Item:`_Item_14pq8_32`},O=`(min-width: 1312px)`,ne={open:!0},re={open:!1},ie=e=>{let t=window.matchMedia(O);return t.addEventListener(`change`,e),()=>t.removeEventListener(`change`,e)},ae=()=>(0,r.useSyncExternalStore)(ie,()=>window.matchMedia(O).matches,()=>!0);function oe({defaultOpen:t=`first`,render:i,ref:a,className:o,children:s,...c}){let l=r.Children.toArray(s),u=ae(),[d,p]=(0,r.useState)(()=>t===`last`?Math.max(0,l.length-1):0);return(0,e.useRender)({render:i,ref:a,defaultTagName:`div`,props:{...c,className:f(D.ExpandingCards,o)({}),children:(0,n.jsx)(`ul`,{className:D.List,style:{"--expanding-cards-count":l.length},children:l.map((e,t)=>(0,n.jsx)(`li`,{className:D.Item,"data-open":t===d||void 0,onPointerEnter:()=>p(t),onFocus:()=>p(t),children:(0,n.jsx)(te.Provider,{value:!u||t===d?ne:re,children:e})},t))})}})}var k={ExpandingCardsItem:`_ExpandingCardsItem_1v7ai_17`,Content:`_Content_1v7ai_53`,Title:`_Title_1v7ai_70`,Text:`_Text_1v7ai_81`,Action:`_Action_1v7ai_99`,Photo:`_Photo_1v7ai_110`,Image:`_Image_1v7ai_117`};function se({title:t,titleRender:a,text:o,action:s,src:l,alt:u,imageRender:d,surface:p=`base`,render:m,ref:h,className:g,..._}){let{open:v}=(0,r.useContext)(te),y=(0,e.useRender)({render:a,defaultTagName:`h2`,props:{className:k.Title,children:t}}),b=(0,e.useRender)({enabled:l!=null,render:d,defaultTagName:`img`,props:{src:l,alt:u,className:k.Image}}),x=(0,r.isValidElement)(s)&&s.type===i.ActionButton?(0,r.cloneElement)(s,{iconOnly:!v}):s;return(0,e.useRender)({render:m,ref:h,defaultTagName:`div`,props:{..._,"data-surface":p,"data-open":v||void 0,"data-image":l!=null||void 0,className:f(k.ExpandingCardsItem,g)({}),children:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(`div`,{className:k.Content,children:[y,o!=null&&(0,n.jsx)(c,{className:k.Text,children:o}),s!=null&&(0,n.jsx)(`div`,{className:k.Action,children:x})]}),b!=null&&(0,n.jsx)(`div`,{className:k.Photo,children:b})]})}})}var A={Hero:`_Hero_1ik22_8`,Background:`_Background_1ik22_24`,Image:`_Image_1ik22_30`,Container:`_Container_1ik22_37`,Box:`_Box_1ik22_45`,Title:`_Title_1ik22_50`,Text:`_Text_1ik22_59`,Action:`_Action_1ik22_75`,Price:`_Price_1ik22_80`};function ce({src:t,alt:r,imageRender:a,title:o,titleRender:s,text:l,action:u,priceExample:d,render:p,ref:m,className:h,...g}){let _=(0,e.useRender)({render:s,defaultTagName:`h1`,props:{className:A.Title,children:o}}),v=(0,e.useRender)({render:a,defaultTagName:`img`,props:{src:t,alt:r,className:A.Image}});return(0,e.useRender)({render:p,ref:m,defaultTagName:`section`,props:{...g,className:f(A.Hero,h)({}),children:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(`div`,{className:A.Container,children:(0,n.jsxs)(i.Panel,{className:A.Box,children:[_,l!=null&&(0,n.jsx)(c,{className:A.Text,children:l}),u!=null&&(0,n.jsx)(`div`,{className:A.Action,children:u}),d!=null&&(0,n.jsx)(`p`,{className:A.Price,children:d})]})}),(0,n.jsx)(`div`,{className:A.Background,children:v})]})}})}var j={HeroServiceGrid:`_HeroServiceGrid_yr3eo_8`,Cards:`_Cards_yr3eo_15`,Item:`_Item_yr3eo_26`,Featured:`_Featured_yr3eo_51`};function le({src:t,alt:a,imageRender:o,action:s,imagePosition:c=`start`,render:l,ref:u,className:d,children:p,...m}){let h=r.Children.toArray(p);return(0,e.useRender)({render:l,ref:u,defaultTagName:`div`,props:{...m,"data-image-position":c,className:f(j.HeroServiceGrid,d)({}),children:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(i.FeaturedImage,{className:j.Featured,src:t,alt:a,imageRender:o,action:s}),h.length>0&&(0,n.jsx)(`ul`,{className:j.Cards,children:h.map((e,t)=>(0,n.jsx)(`li`,{className:j.Item,children:e},t))})]})}})}var M={NavigationGrid:`_NavigationGrid_ocatr_9`,Title:`_Title_ocatr_16`,List:`_List_ocatr_25`,Item:`_Item_ocatr_35`};function ue({title:t,titleRender:i,render:a,ref:o,className:s,children:c,...l}){let u=r.Children.toArray(c),d=u.length>=3&&u.length%2==1,p=(0,e.useRender)({enabled:t!=null,render:i,defaultTagName:`h2`,props:{className:M.Title,children:t}});return(0,e.useRender)({render:a,ref:o,defaultTagName:`div`,props:{...l,className:f(M.NavigationGrid,s)({}),children:(0,n.jsxs)(n.Fragment,{children:[p,(0,n.jsx)(`ul`,{className:M.List,"data-odd":d||void 0,children:u.map((e,t)=>(0,n.jsx)(`li`,{className:M.Item,children:e},t))})]})}})}var N={PartnerList:`_PartnerList_9o9wx_7`,List:`_List_9o9wx_11`,Controls:`_Controls_9o9wx_19`,VisuallyHidden:`_VisuallyHidden_9o9wx_29`},de=(0,i.createTranslation)({previous:{no:`Forrige side`,se:`Föregående sida`,fi:`Edellinen sivu`,es:`Página anterior`},next:{no:`Neste side`,se:`Nästa sida`,fi:`Seuraava sivu`,es:`Página siguiente`},status:{no:`Side {page} av {count}`,se:`Sida {page} av {count}`,fi:`Sivu {page}/{count}`,es:`Página {page} de {count}`},collation:{no:`nb`,se:`sv`,fi:`fi`,es:`es`}});function fe({items:a,pageSize:o=9,value:s,defaultValue:c=1,onValueChange:l,render:u,ref:d,className:p,...m}){let h=de(),[g,_]=(0,r.useState)(c),v=(0,r.useMemo)(()=>{let e=new Intl.Collator(h.collation,{sensitivity:`base`});return[...a].sort((t,n)=>e.compare(t.name,n.name))},[a,h.collation]),y=Math.max(1,Math.floor(o)),b=Math.max(1,Math.ceil(v.length/y)),x=Math.min(b,Math.max(1,s??g)),S=(x-1)*y,C=e=>{let t=Math.min(b,Math.max(1,e));s===void 0&&_(t),t!==x&&l?.(t)};return(0,e.useRender)({enabled:v.length>0,render:u,ref:d,defaultTagName:`div`,props:{...m,className:f(N.PartnerList,p)({}),children:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(`ul`,{className:N.List,children:v.slice(S,S+y).map(({name:e,content:t,...r},a)=>(0,n.jsx)(i.PartnerRow,{...r,render:(0,n.jsx)(`li`,{}),children:t},`${S+a}-${e}`))}),b>1&&(0,n.jsxs)(`div`,{className:N.Controls,children:[(0,n.jsx)(i.IconButton,{variant:`elevated`,color:`secondary`,"aria-label":h.previous,disabled:x===1,focusableWhenDisabled:!0,onClick:()=>C(x-1),children:(0,n.jsx)(t.ChevronLeft,{"aria-hidden":!0})}),(0,n.jsx)(i.PaginationDots,{count:b,value:x,onValueChange:C}),(0,n.jsx)(i.IconButton,{variant:`elevated`,color:`secondary`,"aria-label":h.next,disabled:x===b,focusableWhenDisabled:!0,onClick:()=>C(x+1),children:(0,n.jsx)(t.ChevronRight,{"aria-hidden":!0})}),(0,n.jsx)(`span`,{role:`status`,className:N.VisuallyHidden,children:h.status.replace(`{page}`,String(x)).replace(`{count}`,String(b))})]})]})}})}var P={Grid:`_Grid_1vukg_10`,Content:`_Content_1vukg_17`,Logos:`_Logos_1vukg_28`,LogoItem:`_LogoItem_1vukg_38`,Logo:`_Logo_1vukg_28`,Text:`_Text_1vukg_60`,Title:`_Title_1vukg_66`,Description:`_Description_1vukg_75`,Actions:`_Actions_1vukg_91`,Price:`_Price_1vukg_98`,Media:`_Media_1vukg_106`,PaymentFeature:`_PaymentFeature_1vukg_111`,Image:`_Image_1vukg_115`};function pe({logos:t,title:r,titleRender:a,text:o,actions:s,priceExample:l,src:u,alt:d,imageRender:f,imagePosition:p=`end`,className:m,...h}){let g=(0,e.useRender)({render:a,defaultTagName:`h2`,props:{className:P.Title,children:r}}),_=(0,e.useRender)({enabled:u!=null,render:f,defaultTagName:`img`,props:{src:u,alt:d,className:P.Image}});return(0,n.jsx)(i.Panel,{...h,className:[P.PaymentFeature,m].filter(Boolean).join(` `),"data-image-position":p,"data-has-image":_!=null||void 0,children:(0,n.jsxs)(`div`,{className:P.Grid,children:[(0,n.jsxs)(`div`,{className:P.Content,children:[t!=null&&t.length>0&&(0,n.jsx)(`ul`,{className:P.Logos,children:t.map((e,t)=>(0,n.jsx)(me,{...e},t))}),(0,n.jsxs)(`div`,{className:P.Text,children:[g,o!=null&&(0,n.jsx)(c,{className:P.Description,children:o})]}),s!=null&&(0,n.jsx)(`div`,{className:P.Actions,children:s}),l!=null&&(0,n.jsx)(`p`,{className:P.Price,children:l})]}),_!=null&&(0,n.jsx)(`div`,{className:P.Media,children:_})]})})}function me({src:t,alt:r,imageRender:i}){let a=(0,e.useRender)({render:i,defaultTagName:`img`,props:{src:t,alt:r,className:P.Logo}});return(0,n.jsx)(`li`,{className:P.LogoItem,children:a})}var F={PromoGrid:`_PromoGrid_1l2yi_10`,Featured:`_Featured_1l2yi_19`,Content:`_Content_1l2yi_23`,Photos:`_Photos_1l2yi_31`,Photo:`_Photo_1l2yi_31`,Block:`_Block_1l2yi_51`,Title:`_Title_1l2yi_63`,Subtitle:`_Subtitle_1l2yi_73`};function he({src:t,alt:r,imageRender:a,action:o,images:s,title:l,titleRender:u,subtitle:d,imagePosition:p=`start`,render:m,ref:h,className:g,..._}){let v=(0,e.useRender)({render:u,defaultTagName:`h2`,props:{className:F.Title,children:l}});return(0,e.useRender)({render:m,ref:h,defaultTagName:`div`,props:{..._,"data-image-position":p,className:f(F.PromoGrid,g)({}),children:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(i.FeaturedImage,{className:F.Featured,src:t,alt:r,imageRender:a,action:o}),(0,n.jsxs)(`div`,{className:F.Content,children:[s!=null&&s.length>0&&(0,n.jsx)(`div`,{className:F.Photos,"data-count":s.length,children:s.map((e,t)=>(0,n.jsx)(ge,{...e},t))}),(0,n.jsxs)(`div`,{className:F.Block,children:[v,d!=null&&(0,n.jsx)(c,{className:F.Subtitle,children:d})]})]})]})}})}function ge({src:t,alt:n,imageRender:r}){return(0,e.useRender)({render:r,defaultTagName:`img`,props:{src:t,alt:n,className:F.Photo}})}var I={Section:`_Section_f8rp9_11`,Content:`_Content_f8rp9_60`};function _e({surface:t=`base`,spacingTop:r=`lg`,spacingBottom:i=`lg`,width:a=`full`,render:o,ref:s,className:c,children:l,...u}){return(0,e.useRender)({render:o,ref:s,defaultTagName:`section`,props:{...u,"data-surface":t,"data-spacing-top":r,"data-spacing-bottom":i,className:f(I.Section,c)({}),children:(0,n.jsx)(`div`,{className:I.Content,"data-width":a,children:l})}})}var L={SectionHeader:`_SectionHeader_11mff_8`,Text:`_Text_11mff_17`,Eyebrow:`_Eyebrow_11mff_25`,Title:`_Title_11mff_33`,Subtitle:`_Subtitle_11mff_49`,Actions:`_Actions_11mff_67`,Price:`_Price_11mff_75`};function ve({eyebrow:t,title:r,titleRender:i,titleSize:a=`lg`,subtitle:o,actions:s,priceExample:l,render:u,ref:d,className:p,...m}){let h=(0,e.useRender)({render:i,defaultTagName:`h2`,props:{className:L.Title,children:r}});return(0,e.useRender)({render:u,ref:d,defaultTagName:`div`,props:{...m,"data-title-size":a,className:f(L.SectionHeader,p)({}),children:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(`div`,{className:L.Text,children:[t!=null&&(0,n.jsx)(`p`,{className:L.Eyebrow,children:t}),h,o!=null&&(0,n.jsx)(c,{className:L.Subtitle,children:o})]}),s!=null&&(0,n.jsx)(`div`,{className:L.Actions,children:s}),l!=null&&(0,n.jsx)(`p`,{className:L.Price,children:l})]})}})}var R={ServiceCardGrid:`_ServiceCardGrid_nutvc_9`,List:`_List_nutvc_13`,Item:`_Item_nutvc_23`};function ye({render:t,ref:i,className:a,children:o,...s}){let c=r.Children.toArray(o);return(0,e.useRender)({render:t,ref:i,defaultTagName:`div`,props:{...s,className:f(R.ServiceCardGrid,a)({}),children:(0,n.jsx)(`ul`,{className:R.List,"data-count":c.length,children:c.map((e,t)=>(0,n.jsx)(`li`,{className:R.Item,children:e},t))})}})}var z={ArrowRevealLink:`_ArrowRevealLink_140ct_2`,Arrow:`_Arrow_140ct_2`,Text:`_Text_140ct_40`};function B({render:r,className:i,children:a,size:o=`md`,...s}){return(0,e.useRender)({render:r,defaultTagName:`a`,props:{...s,"data-size":o===`md`?void 0:o,className:f(z.ArrowRevealLink,i)({}),children:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(`span`,{"aria-hidden":!0,className:z.Arrow,children:(0,n.jsx)(t.ArrowRight,{})}),(0,n.jsx)(`span`,{className:z.Text,children:a})]})}})}var V={SideNav:`_SideNav_1ha5v_6`,Sidebar:`_Sidebar_1ha5v_29`,List:`_List_1ha5v_44`,Content:`_Content_1ha5v_61`},be=(0,i.createTranslation)({navigation:{no:`Sidemeny`,se:`Sidomeny`,fi:`Sivuvalikko`,es:`Menú lateral`}});function xe({items:e,label:t,breadcrumbs:r,children:a,className:o,...s}){let c=be();return(0,n.jsxs)(`div`,{...s,className:[V.SideNav,o].filter(Boolean).join(` `),children:[(0,n.jsx)(`nav`,{className:V.Sidebar,"aria-label":t??c.navigation,children:(0,n.jsx)(`ul`,{className:V.List,children:e.map((e,t)=>(0,n.jsx)(`li`,{children:(0,n.jsx)(B,{size:`lg`,href:e.href,render:e.render,"aria-current":e.current?`page`:void 0,children:e.label})},t))})}),(0,n.jsxs)(i.Panel,{size:`sm`,className:V.Content,children:[r,a]})]})}var H=`M10 20C15.5228 20 20 15.5228 20 10C20 4.47715 15.5228 0 10 0C4.47715 0 0 4.47715 0 10C0 15.5228 4.47715 20 10 20Z`,Se=`M19.9154 8.69625H7.82613H7.82609V0.238281C6.90195 0.443203 6.02582 0.775352 5.21738 1.21648V8.69617V8.69621H0.0846484C0.0289844 9.1232 0 9.55852 0 10.0006C0 10.4427 0.0289844 10.878 0.0846484 11.3049H5.21734H5.21738V18.7846C6.02582 19.2257 6.90195 19.558 7.82609 19.7629V11.305V11.305H19.9154C19.9709 10.878 20 10.4427 20 10.0006C20 9.55852 19.9709 9.1232 19.9154 8.69625V8.69625Z`;function U({children:e,...t}){return(0,n.jsx)(`svg`,{width:`20`,height:`20`,viewBox:`0 0 20 20`,fill:`none`,"aria-hidden":!0,focusable:`false`,...t,children:e})}function Ce(e){return(0,n.jsxs)(U,{...e,children:[(0,n.jsx)(`path`,{d:H,fill:`#F0F0F0`}),(0,n.jsx)(`path`,{d:`M0.34375 12.6094C0.922344 14.7562 2.19754 16.6169 3.9123 17.9345V12.6094H0.34375Z`,fill:`#D80027`}),(0,n.jsx)(`path`,{d:`M9.12891 19.9626C9.41555 19.9873 9.70543 20.0007 9.99848 20.0007C14.6188 20.0007 18.5065 16.867 19.654 12.6094H9.12891V19.9626Z`,fill:`#D80027`}),(0,n.jsx)(`path`,{d:`M19.654 7.39129C18.5065 3.13363 14.6188 0 9.99848 0C9.70543 0 9.41555 0.0133594 9.12891 0.0380469V7.39129H19.654Z`,fill:`#D80027`}),(0,n.jsx)(`path`,{d:`M3.9123 2.06641C2.19754 3.38398 0.922344 5.24465 0.34375 7.39148H3.9123V2.06641Z`,fill:`#D80027`}),(0,n.jsx)(`path`,{d:Se,fill:`#0052B4`})]})}function we(e){return(0,n.jsxs)(U,{...e,children:[(0,n.jsx)(`path`,{d:H,fill:`#FFDA44`}),(0,n.jsx)(`path`,{d:`M7.82816 8.69566H19.9174C19.2782 3.78914 15.0828 0 10.002 0C9.25539 0 8.52809 0.0825391 7.82812 0.237695V8.69566H7.82816Z`,fill:`#0052B4`}),(0,n.jsx)(`path`,{d:`M5.21867 8.69848V1.21875C2.47281 2.71695 0.507148 5.46504 0.0859375 8.69852H5.21867V8.69848Z`,fill:`#0052B4`}),(0,n.jsx)(`path`,{d:`M5.21863 11.3047H0.0859375C0.507148 14.5382 2.47281 17.2863 5.21867 18.7844L5.21863 11.3047Z`,fill:`#0052B4`}),(0,n.jsx)(`path`,{d:`M7.82812 11.3047V19.7627C8.52809 19.9178 9.25539 20.0004 10.002 20.0004C15.0828 20.0004 19.2782 16.2112 19.9174 11.3047H7.82812V11.3047Z`,fill:`#0052B4`})]})}function Te(e){return(0,n.jsxs)(U,{...e,children:[(0,n.jsx)(`path`,{d:H,fill:`#F0F0F0`}),(0,n.jsx)(`path`,{d:Se,fill:`#0052B4`})]})}function Ee(e){return(0,n.jsxs)(U,{...e,children:[(0,n.jsx)(`path`,{d:`M0 10.0002C0 11.2234 0.220039 12.3951 0.621992 13.4784L10 14.348L19.378 13.4784C19.78 12.3951 20 11.2234 20 10.0002C20 8.77695 19.78 7.60523 19.378 6.52191L10 5.65234L0.621992 6.52191C0.220039 7.60523 0 8.77695 0 10.0002H0Z`,fill:`#FFDA44`}),(0,n.jsx)(`path`,{d:`M19.3771 6.52176C17.9642 2.71379 14.2987 0 9.9991 0C5.69945 0 2.03402 2.71379 0.621094 6.52176H19.3771Z`,fill:`#D80027`}),(0,n.jsx)(`path`,{d:`M0.621094 13.4766C2.03402 17.2845 5.69945 19.9983 9.9991 19.9983C14.2987 19.9983 17.9642 17.2845 19.3771 13.4766H0.621094Z`,fill:`#D80027`})]})}function W({href:t,render:n,...r}){return(0,e.useRender)({render:n,defaultTagName:`a`,props:t==null?r:{...r,href:t}})}var De=e=>e.groups!=null&&e.groups.length>0,G=e=>e.href!=null||e.render!=null,K={SiteFooter:`_SiteFooter_o2ixe_7`,Content:`_Content_o2ixe_23`,Main:`_Main_o2ixe_32`,Home:`_Home_o2ixe_46`,Columns:`_Columns_o2ixe_64`,Column:`_Column_o2ixe_64`,Title:`_Title_o2ixe_94`,Links:`_Links_o2ixe_108`,Social:`_Social_o2ixe_109`,Link:`_Link_o2ixe_108`,SocialIcon:`_SocialIcon_o2ixe_147`,Market:`_Market_o2ixe_161`,Divider:`_Divider_o2ixe_165`,CookieSettings:`_CookieSettings_o2ixe_176`,Copyright:`_Copyright_o2ixe_192`},Oe=(0,i.createTranslation)({market:{no:`Marked`,se:`Marknad`,fi:`Markkina`,es:`Mercado`},social:{no:`Sosiale medier`,se:`Sociala medier`,fi:`Sosiaalinen media`,es:`Redes sociales`},cookieSettings:{no:`Cookie-innstillinger`,se:`Cookieinställningar`,fi:`Evästeasetukset`,es:`Configuración de cookies`},collation:{no:`nb`,se:`sv`,fi:`fi`,es:`es`}}),q=(0,i.createTranslation)({navigation:{no:`Hovedmeny`,se:`Huvudmeny`,fi:`Päävalikko`,es:`Menú principal`},menu:{no:`Meny`,se:`Meny`,fi:`Valikko`,es:`Menú`},closeMenu:{no:`Lukk meny`,se:`Stäng menyn`,fi:`Sulje valikko`,es:`Cerrar menú`},home:{no:`Lea Bank, forside`,se:`Lea Bank, startsida`,fi:`Lea Bank, etusivu`,es:`Lea Bank, página de inicio`}}),J={no:{name:`Norge`,flag:(0,n.jsx)(Ce,{})},se:{name:`Sverige`,flag:(0,n.jsx)(we,{})},fi:{name:`Suomi`,flag:(0,n.jsx)(Te,{})},es:{name:`España`,flag:(0,n.jsx)(Ee,{})}},ke=[`no`,`se`,`fi`,`es`];function Y({render:t,id:n,children:r}){return(0,e.useRender)({render:t,defaultTagName:`h2`,props:{id:n,className:K.Title,children:r}})}function Ae({market:e,render:t}){let a=Oe(),o=(0,r.useId)(),s=e.options??ke,c=(0,r.useMemo)(()=>{let e=new Intl.Collator(a.collation,{sensitivity:`base`});return[...s].sort((t,n)=>e.compare(J[t].name,J[n].name)).map(e=>({value:e,label:J[e].name,icon:J[e].flag}))},[s,a.collation]);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(Y,{render:t,id:o,children:e.title??a.market}),(0,n.jsx)(i.Select,{size:`sm`,"aria-labelledby":o,options:c,value:e.value,onValueChange:e.onValueChange,className:K.Market})]})}function je({logo:e,homeRender:t,columns:r=[],market:i,social:a,onOpenCookieSettings:o,copyright:s,titleRender:l,className:u,...d}){let f=Oe(),p=q(),m=o!=null||s!=null;return(0,n.jsx)(`footer`,{...d,className:[K.SiteFooter,u].filter(Boolean).join(` `),children:(0,n.jsxs)(`div`,{className:K.Content,children:[(0,n.jsxs)(`div`,{className:K.Main,children:[(0,n.jsx)(W,{href:t==null?`/`:void 0,render:t,className:K.Home,"aria-label":p.home,children:e}),(0,n.jsxs)(`div`,{className:K.Columns,children:[r.map((e,t)=>(0,n.jsxs)(`div`,{className:K.Column,children:[(0,n.jsx)(Y,{render:l,children:e.title}),e.links.length>0&&(0,n.jsx)(`ul`,{className:K.Links,children:e.links.map((e,t)=>(0,n.jsx)(`li`,{children:(0,n.jsx)(W,{href:e.href,render:e.render,className:K.Link,children:e.label})},t))})]},t)),(i!=null||a!=null)&&(0,n.jsxs)(`div`,{className:K.Column,children:[i!=null&&(0,n.jsx)(Ae,{market:i,render:l}),a!=null&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(Y,{render:l,children:a.title??f.social}),(0,n.jsx)(`ul`,{className:K.Social,children:a.links.map((e,t)=>(0,n.jsx)(`li`,{children:(0,n.jsxs)(W,{href:e.href,render:e.render,className:K.Link,children:[(0,n.jsx)(`span`,{"aria-hidden":!0,className:K.SocialIcon,children:e.icon}),e.label]})},t))})]})]})]})]}),m&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(`span`,{"aria-hidden":!0,className:K.Divider}),o!=null&&(0,n.jsx)(`button`,{type:`button`,className:K.CookieSettings,onClick:o,children:f.cookieSettings}),s!=null&&(0,n.jsx)(c,{className:K.Copyright,children:s})]})]})})}var X={SiteHeader:`_SiteHeader_dcn2t_9`,Bar:`_Bar_dcn2t_19`,BarContent:`_BarContent_dcn2t_24`,Home:`_Home_dcn2t_40`,Actions:`_Actions_dcn2t_57`,Account:`_Account_dcn2t_64`,MenuButton:`_MenuButton_dcn2t_80`,Action:`_Action_dcn2t_57`,Nav:`_Nav_dcn2t_121`,Pill:`_Pill_dcn2t_128`,Cta:`_Cta_dcn2t_129`,List:`_List_dcn2t_136`,Item:`_Item_dcn2t_148`,Chevron:`_Chevron_dcn2t_189`,Positioner:`_Positioner_dcn2t_263`,Popup:`_Popup_dcn2t_291`,Viewport:`_Viewport_dcn2t_311`,Content:`_Content_dcn2t_319`,Group:`_Group_dcn2t_339`,GroupTitle:`_GroupTitle_dcn2t_348`,Links:`_Links_dcn2t_355`,Separator:`_Separator_dcn2t_370`,CtaArrow:`_CtaArrow_dcn2t_402`,Backdrop:`_Backdrop_dcn2t_410`,DrawerViewport:`_DrawerViewport_dcn2t_424`,MenuPopup:`_MenuPopup_dcn2t_439`,MenuTop:`_MenuTop_dcn2t_479`,MenuContent:`_MenuContent_dcn2t_486`,MenuList:`_MenuList_dcn2t_499`,Row:`_Row_dcn2t_506`,RowChevron:`_RowChevron_dcn2t_545`,SubmenuPanel:`_SubmenuPanel_dcn2t_556`,Submenu:`_Submenu_dcn2t_556`,Parent:`_Parent_dcn2t_577`},Me=`(min-width: 1312px)`;function Ne({item:e,open:r,onOpenChange:i}){let a=e.groups.flatMap(e=>e.links),s=e.groups.flatMap(e=>e.cta==null?[]:[e.cta]);return(0,n.jsxs)(o.Collapsible.Root,{open:r,onOpenChange:i,children:[(0,n.jsxs)(o.Collapsible.Trigger,{className:X.Row,children:[e.label,(0,n.jsx)(t.ChevronDown,{"aria-hidden":!0,className:X.RowChevron})]}),(0,n.jsx)(o.Collapsible.Panel,{className:X.SubmenuPanel,children:(0,n.jsxs)(`div`,{className:X.Submenu,children:[(G(e)||a.length>0)&&(0,n.jsxs)(`ul`,{className:X.Links,children:[G(e)&&(0,n.jsx)(`li`,{children:(0,n.jsx)(B,{className:X.Parent,href:e.href,render:e.render,children:e.label})}),a.map((e,t)=>(0,n.jsx)(`li`,{children:(0,n.jsx)(B,{href:e.href,render:e.render,children:e.label})},t))]}),s.length>0&&a.length>0&&(0,n.jsx)(`span`,{"aria-hidden":!0,className:X.Separator}),s.map((e,r)=>(0,n.jsxs)(W,{className:X.Cta,href:e.href,render:e.render,children:[(0,n.jsx)(`span`,{children:e.label}),(0,n.jsx)(t.ArrowUpRight,{"aria-hidden":!0,className:X.CtaArrow})]},r))]})})]})}function Pe({items:e}){let t=q(),[i,a]=(0,r.useState)(null);return(0,n.jsx)(`nav`,{"aria-label":t.navigation,children:(0,n.jsx)(`ul`,{className:X.MenuList,children:e.map((e,t)=>(0,n.jsx)(`li`,{children:De(e)?(0,n.jsx)(Ne,{item:e,open:i===t,onOpenChange:e=>a(e?t:null)}):(0,n.jsx)(W,{className:X.Row,href:e.href,render:e.render,children:e.label})},t))})})}function Fe({items:e,home:a,account:o}){let c=q(),[l,u]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{if(!l)return;let e=window.matchMedia(Me),t=()=>{e.matches&&u(!1)};return e.addEventListener(`change`,t),()=>e.removeEventListener(`change`,t)},[l]),(0,n.jsxs)(s.Drawer.Root,{open:l,onOpenChange:u,swipeDirection:`up`,children:[(0,n.jsx)(s.Drawer.Trigger,{className:X.MenuButton,"aria-label":c.menu,children:(0,n.jsx)(t.Menu,{"aria-hidden":!0})}),(0,n.jsxs)(s.Drawer.Portal,{children:[(0,n.jsx)(s.Drawer.Backdrop,{className:X.Backdrop}),(0,n.jsx)(s.Drawer.Viewport,{className:X.DrawerViewport,children:(0,n.jsxs)(s.Drawer.Popup,{className:X.MenuPopup,"aria-label":c.menu,onClick:e=>{e.target instanceof Element&&e.target.closest(`a`)&&u(!1)},children:[(0,n.jsxs)(`div`,{className:X.MenuTop,children:[(0,n.jsx)(`div`,{className:X.Bar,children:(0,n.jsxs)(`div`,{className:X.BarContent,children:[(0,n.jsx)(s.Drawer.Close,{className:X.MenuButton,"aria-label":c.closeMenu,children:(0,n.jsx)(t.X,{"aria-hidden":!0})}),a,o&&(0,n.jsx)(`div`,{className:X.Actions,children:o})]})}),(0,n.jsx)(i.BrandDivider,{size:`sm`})]}),(0,n.jsx)(s.Drawer.Content,{className:X.MenuContent,children:(0,n.jsx)(Pe,{items:e})})]})})]})]})}function Ie({group:e}){let i=(0,r.useId)(),o=e.title!=null,s=e.links.length>0;return(0,n.jsxs)(`div`,{className:X.Group,children:[o&&(0,n.jsx)(`p`,{id:i,className:X.GroupTitle,children:e.title}),s&&(0,n.jsx)(`ul`,{className:X.Links,"aria-labelledby":o?i:void 0,children:e.links.map((e,t)=>(0,n.jsx)(`li`,{children:(0,n.jsx)(B,{render:(0,n.jsx)(a.NavigationMenu.Link,{closeOnClick:!0,href:e.href,render:e.render}),children:e.label})},t))}),e.cta!=null&&s&&(0,n.jsx)(`span`,{"aria-hidden":!0,className:X.Separator}),e.cta!=null&&(0,n.jsxs)(a.NavigationMenu.Link,{closeOnClick:!0,className:X.Cta,href:e.cta.href,render:e.cta.render,children:[(0,n.jsx)(`span`,{children:e.cta.label}),(0,n.jsx)(t.ArrowUpRight,{"aria-hidden":!0,className:X.CtaArrow})]})]})}function Le({item:e,value:r,end:i,onFocus:o}){return(0,n.jsx)(a.NavigationMenu.Item,{value:r,className:X.Item,"data-end":i||void 0,onFocus:()=>o(r),children:De(e)?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(a.NavigationMenu.Trigger,{className:X.Pill,children:[e.label,(0,n.jsx)(a.NavigationMenu.Icon,{className:X.Chevron,children:(0,n.jsx)(t.ChevronDown,{})})]}),(0,n.jsx)(a.NavigationMenu.Content,{keepMounted:!0,className:X.Content,children:e.groups.map((e,t)=>(0,n.jsx)(Ie,{group:e},t))})]}):(0,n.jsx)(a.NavigationMenu.Link,{closeOnClick:!0,className:X.Pill,href:e.href,render:e.render,children:e.label})})}function Re({logo:e,homeRender:o,items:s,endItems:c=[],account:l,action:u,className:d,...f}){let p=q(),[m,h]=(0,r.useState)(null),g=e=>{m!=null&&m!==e&&h(null)},_=(0,n.jsx)(W,{href:o==null?`/`:void 0,render:o,className:X.Home,"aria-label":p.home,children:e}),v=l!=null&&(0,n.jsx)(W,{href:l.href,render:l.render,className:X.Account,"aria-label":l.label,children:l.icon??(0,n.jsx)(t.CircleUserRound,{"aria-hidden":!0})});return(0,n.jsxs)(`header`,{...f,className:[X.SiteHeader,d].filter(Boolean).join(` `),children:[(0,n.jsx)(`div`,{className:X.Bar,children:(0,n.jsxs)(`div`,{className:X.BarContent,children:[(0,n.jsx)(Fe,{items:[...s,...c],home:_,account:v}),_,(0,n.jsxs)(a.NavigationMenu.Root,{className:X.Nav,"aria-label":p.navigation,closeDelay:150,value:m,onValueChange:h,children:[(0,n.jsx)(a.NavigationMenu.List,{className:X.List,children:[...s,...c].map((e,t)=>(0,n.jsx)(Le,{item:e,value:`item-${t}`,end:c.length>0&&t===s.length,onFocus:g},t))}),(0,n.jsx)(a.NavigationMenu.Portal,{children:(0,n.jsx)(a.NavigationMenu.Positioner,{className:X.Positioner,side:`bottom`,align:`start`,sideOffset:8,collisionPadding:16,children:(0,n.jsx)(a.NavigationMenu.Popup,{className:X.Popup,render:(0,n.jsx)(`div`,{}),children:(0,n.jsx)(a.NavigationMenu.Viewport,{className:X.Viewport})})})})]}),(v||u!=null)&&(0,n.jsxs)(`div`,{className:X.Actions,children:[v,u!=null&&(0,n.jsx)(`div`,{className:X.Action,children:u})]})]})}),(0,n.jsx)(i.BrandDivider,{size:`sm`})]})}var Z={SplitContent:`_SplitContent_16c8f_11`,Grid:`_Grid_16c8f_19`,Text:`_Text_16c8f_26`,Title:`_Title_16c8f_33`,Description:`_Description_16c8f_42`,Media:`_Media_16c8f_58`,Image:`_Image_16c8f_67`,Actions:`_Actions_16c8f_75`,Price:`_Price_16c8f_82`};function ze({title:t,titleRender:r,text:i,src:a,alt:o,imageRender:s,imagePosition:l=`end`,action:u,priceExample:d,render:p,ref:m,className:h,...g}){let _=(0,e.useRender)({render:r,defaultTagName:`h2`,props:{className:Z.Title,children:t}}),v=(0,e.useRender)({enabled:a!=null,render:s,defaultTagName:`img`,props:{src:a,alt:o,className:Z.Image}});return(0,e.useRender)({render:p,ref:m,defaultTagName:`div`,props:{...g,"data-image-position":l,"data-has-image":v!=null||void 0,className:f(Z.SplitContent,h)({}),children:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(`div`,{className:Z.Grid,children:[(0,n.jsxs)(`div`,{className:Z.Text,children:[_,i!=null&&(0,n.jsx)(c,{className:Z.Description,children:i})]}),v!=null&&(0,n.jsx)(`div`,{className:Z.Media,children:v})]}),(u!=null||d!=null)&&(0,n.jsxs)(`div`,{className:Z.Actions,children:[u,d!=null&&(0,n.jsx)(`p`,{className:Z.Price,children:d})]})]})}})}var Q={Stats:`_Stats_1o0ef_16`,List:`_List_1o0ef_25`,Bar:`_Bar_1o0ef_33`,Stat:`_Stat_1o0ef_16`,Number:`_Number_1o0ef_59`,Labels:`_Labels_1o0ef_69`,Title:`_Title_1o0ef_77`,Text:`_Text_1o0ef_85`,Actions:`_Actions_1o0ef_95`,Price:`_Price_1o0ef_103`};function Be({header:t,items:i,titleRender:a,action:o,priceExample:s,render:c,ref:l,className:u,...d}){return(0,e.useRender)({render:c,ref:l,defaultTagName:`div`,props:{...d,className:f(Q.Stats,u)({}),children:(0,n.jsxs)(n.Fragment,{children:[t,(0,n.jsxs)(`ul`,{className:Q.List,children:[i.map((e,t)=>(0,n.jsxs)(r.Fragment,{children:[(0,n.jsx)(`li`,{"aria-hidden":!0,className:Q.Bar}),(0,n.jsx)(Ve,{...e,titleRender:a})]},t)),(0,n.jsx)(`li`,{"aria-hidden":!0,className:Q.Bar})]}),(o!=null||s!=null)&&(0,n.jsxs)(`div`,{className:Q.Actions,children:[o,s!=null&&(0,n.jsx)(`p`,{className:Q.Price,children:s})]})]})}})}function Ve({number:t,title:r,text:i,titleRender:a}){let o=(0,e.useRender)({enabled:r!=null,render:a,defaultTagName:`h3`,props:{className:Q.Title,children:r}});return(0,n.jsxs)(`li`,{className:Q.Stat,children:[(0,n.jsx)(`p`,{className:Q.Number,children:t}),(o!=null||i!=null)&&(0,n.jsxs)(`div`,{className:Q.Labels,children:[o,i!=null&&(0,n.jsx)(`p`,{className:Q.Text,children:i})]})]})}var $={Testimonials:`_Testimonials_13hpt_11`,Featured:`_Featured_13hpt_18`,Video:`_Video_13hpt_31`,Quote:`_Quote_13hpt_36`,Blockquote:`_Blockquote_13hpt_44`,Person:`_Person_13hpt_72`,Name:`_Name_13hpt_81`,Meta:`_Meta_13hpt_88`,Still:`_Still_13hpt_124`,Play:`_Play_13hpt_133`,DialogViewport:`_DialogViewport_13hpt_143`,DialogPopup:`_DialogPopup_13hpt_143`,DialogVideo:`_DialogVideo_13hpt_149`,Close:`_Close_13hpt_157`},He=(0,i.createTranslation)({reviews:{no:`Kundeomtaler`,se:`Kundomdömen`,fi:`Asiakasarviot`,es:`Opiniones de clientes`},play:{no:`Spill av video`,se:`Spela upp video`,fi:`Toista video`,es:`Reproducir vídeo`},video:{no:`Video fra kunde`,se:`Video från kund`,fi:`Asiakkaan video`,es:`Vídeo de un cliente`},close:{no:`Lukk video`,se:`Stäng video`,fi:`Sulje video`,es:`Cerrar vídeo`},captionsLanguage:{no:`nb`,se:`sv`,fi:`fi`,es:`es`},captionsLabel:{no:`Norsk`,se:`Svenska`,fi:`Suomi`,es:`Español`}});function Ue({title:a,titleRender:o,subtitle:s,quote:c,name:l,meta:u,rating:d,videoSrc:p,videoPoster:m,videoCaptions:h,videoPosition:g=`start`,render:_,ref:v,className:y,children:b,...x}){let S=He(),C=(0,r.useId)(),w=c!=null||l!=null,E=r.Children.toArray(b).length>0;return(0,e.useRender)({render:_,ref:v,defaultTagName:`div`,props:{...x,className:f($.Testimonials,y)({}),children:(0,n.jsxs)(n.Fragment,{children:[a!=null&&(0,n.jsx)(ve,{title:a,titleRender:(0,r.cloneElement)(o??(0,n.jsx)(`h2`,{}),{id:C}),subtitle:s}),(w||p!=null)&&(0,n.jsxs)(`div`,{className:$.Featured,"data-video":p!=null||void 0,"data-video-position":g,children:[w&&(0,n.jsxs)(`figure`,{className:$.Quote,children:[d!=null&&(0,n.jsx)(i.StarRating,{rating:d}),c!=null&&(0,n.jsx)(`blockquote`,{className:$.Blockquote,children:typeof c==`string`||typeof c==`number`?(0,n.jsx)(`p`,{children:c}):c}),(l!=null||u!=null)&&(0,n.jsxs)(`figcaption`,{className:$.Person,children:[l!=null&&(0,n.jsx)(`span`,{className:$.Name,children:l}),u!=null&&(0,n.jsx)(`span`,{className:$.Meta,children:u})]})]}),p!=null&&(0,n.jsxs)(`div`,{className:$.Video,children:[m==null?(0,n.jsx)(`video`,{className:$.Still,src:`${p}#t=0.1`,preload:`metadata`,muted:!0,playsInline:!0,"aria-hidden":!0,tabIndex:-1}):(0,n.jsx)(`img`,{className:$.Still,src:m,alt:``}),(0,n.jsxs)(i.Dialog.Root,{children:[(0,n.jsx)(i.Dialog.Trigger,{render:(0,n.jsx)(i.IconButton,{variant:`elevated`,color:`secondary`,"aria-label":S.play,className:$.Play,children:(0,n.jsx)(t.Play,{"aria-hidden":!0})})}),(0,n.jsxs)(i.Dialog.Portal,{children:[(0,n.jsx)(i.Dialog.Backdrop,{}),(0,n.jsx)(i.Dialog.Viewport,{className:$.DialogViewport,children:(0,n.jsxs)(i.Dialog.Popup,{size:`lg`,"aria-label":S.video,className:$.DialogPopup,children:[(0,n.jsx)(i.Dialog.Close,{render:(0,n.jsx)(i.IconButton,{variant:`elevated`,color:`secondary`,"aria-label":S.close,className:$.Close,children:(0,n.jsx)(t.X,{"aria-hidden":!0})})}),(0,n.jsx)(`video`,{className:$.DialogVideo,src:p,controls:!0,autoPlay:!0,playsInline:!0,children:h!=null&&(0,n.jsx)(`track`,{kind:`captions`,src:h,srcLang:S.captionsLanguage,label:S.captionsLabel,default:!0})})]})})]})]})]})]}),E&&(0,n.jsx)(T,{...a==null?{"aria-label":S.reviews}:{"aria-labelledby":C},children:b})]})}})}exports.AlertBanner=d,exports.BrandLetters=_,exports.Calculator=y,exports.Carousel=T,exports.CtaBanner=ee,exports.ExpandingCards=oe,exports.ExpandingCardsItem=se,exports.Hero=ce,exports.HeroServiceGrid=le,exports.NavigationGrid=ue,exports.PartnerList=fe,exports.PaymentFeature=pe,exports.PromoGrid=he,exports.Section=_e,exports.SectionHeader=ve,exports.ServiceCardGrid=ye,exports.SideNav=xe,exports.SiteFooter=je,exports.SiteHeader=Re,exports.SplitContent=ze,exports.Stats=Be,exports.Testimonials=Ue;
|
|
2
2
|
//# sourceMappingURL=website.cjs.map
|