@altinn/altinn-components 0.61.1 → 0.61.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/HeaderLogo.css +1 -1
- package/dist/components/Footer/FooterLogo.js +1 -1
- package/dist/components/GlobalHeader/HeaderLogo.js +1 -1
- package/dist/components/GlobalMenu/GlobalMenu.js +57 -40
- package/dist/components/Layout/Layout.js +27 -29
- package/dist/components/Logo/index.js +4 -0
- package/dist/components/index.js +355 -377
- package/dist/index.js +365 -387
- package/dist/types/lib/components/Account/Account.stories.d.ts +0 -3
- package/dist/types/lib/components/Dialog/DialogLayout.d.ts +7 -2
- package/dist/types/lib/components/GlobalHeader/GlobalHeader.stories.d.ts +5 -4
- package/dist/types/lib/components/GlobalMenu/GlobalMenu.stories.d.ts +9 -12
- package/dist/types/lib/components/Layout/Layout.d.ts +2 -4
- package/dist/types/lib/components/Layout/Layout.stories.d.ts +2 -8
- package/dist/types/lib/components/Logo/index.d.ts +1 -0
- package/dist/types/lib/components/Page/PageNav.d.ts +5 -2
- package/dist/types/lib/components/index.d.ts +2 -2
- package/dist/types/lib/stories/Inbox.stories.d.ts +0 -4
- package/package.json +1 -1
- package/dist/Globe-BcPkcH4E.js +0 -24
- package/dist/PadlockLocked-XL1IB5Ae.js +0 -24
- package/dist/assets/EndUserLabel.css +0 -1
- package/dist/assets/GlobalMenuButton2.css +0 -1
- package/dist/assets/Header.css +0 -1
- package/dist/assets/HeaderBase.css +0 -1
- package/dist/assets/HeaderButton.css +0 -1
- package/dist/assets/HeaderGroup.css +0 -1
- package/dist/assets/HeaderLogo2.css +0 -1
- package/dist/assets/HeaderSearch.css +0 -1
- package/dist/assets/LocaleButton.css +0 -1
- package/dist/components/GlobalMenu_old/BackButton.js +0 -13
- package/dist/components/GlobalMenu_old/CurrentAccount.js +0 -24
- package/dist/components/GlobalMenu_old/EndUserLabel.js +0 -32
- package/dist/components/GlobalMenu_old/GlobalMenu.js +0 -81
- package/dist/components/GlobalMenu_old/GlobalMenuBase.js +0 -10
- package/dist/components/GlobalMenu_old/GlobalMenuButton.js +0 -58
- package/dist/components/GlobalMenu_old/LogoutButton.js +0 -14
- package/dist/components/GlobalMenu_old/index.js +0 -14
- package/dist/components/Header/Header.js +0 -101
- package/dist/components/Header/HeaderBase.js +0 -19
- package/dist/components/Header/HeaderButton.js +0 -51
- package/dist/components/Header/HeaderGroup.js +0 -8
- package/dist/components/Header/HeaderLogo.js +0 -17
- package/dist/components/Header/HeaderSearch.js +0 -12
- package/dist/components/Header/LocaleButton.js +0 -29
- package/dist/components/Header/LocaleSwitcher.js +0 -44
- package/dist/components/Header/index.js +0 -18
- package/dist/types/lib/components/GlobalMenu_old/BackButton.d.ts +0 -7
- package/dist/types/lib/components/GlobalMenu_old/CurrentAccount.d.ts +0 -16
- package/dist/types/lib/components/GlobalMenu_old/EndUserLabel.d.ts +0 -5
- package/dist/types/lib/components/GlobalMenu_old/GlobalMenu.d.ts +0 -18
- package/dist/types/lib/components/GlobalMenu_old/GlobalMenuBase.d.ts +0 -15
- package/dist/types/lib/components/GlobalMenu_old/GlobalMenuButton.d.ts +0 -13
- package/dist/types/lib/components/GlobalMenu_old/LogoutButton.d.ts +0 -7
- package/dist/types/lib/components/GlobalMenu_old/index.d.ts +0 -6
- package/dist/types/lib/components/Header/Header.d.ts +0 -18
- package/dist/types/lib/components/Header/Header.stories.d.ts +0 -29
- package/dist/types/lib/components/Header/HeaderBase.d.ts +0 -9
- package/dist/types/lib/components/Header/HeaderButton.d.ts +0 -11
- package/dist/types/lib/components/Header/HeaderButton.stories.d.ts +0 -17
- package/dist/types/lib/components/Header/HeaderGroup.d.ts +0 -7
- package/dist/types/lib/components/Header/HeaderLogo.d.ts +0 -11
- package/dist/types/lib/components/Header/HeaderSearch.d.ts +0 -7
- package/dist/types/lib/components/Header/LocaleButton.d.ts +0 -8
- package/dist/types/lib/components/Header/LocaleSwitcher.d.ts +0 -7
- package/dist/types/lib/components/Header/index.d.ts +0 -8
- package/dist/types/lib/stories/Beta/Beta.stories.d.ts +0 -15
- /package/dist/components/{Header → Logo}/DigdirLogomark.js +0 -0
- /package/dist/types/lib/components/{Header → Logo}/DigdirLogomark.d.ts +0 -0
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { jsxs as d, jsx as p } from "react/jsx-runtime";
|
|
2
|
-
import { c as s } from "../../index-p1eeF8LQ.js";
|
|
3
|
-
import "react";
|
|
4
|
-
import "../../ToolbarSearch-56Sm2j7P.js";
|
|
5
|
-
import "../Typography/Link.js";
|
|
6
|
-
import "../Button/Button.js";
|
|
7
|
-
import "react-dom";
|
|
8
|
-
import { Backdrop as m } from "../Dropdown/Backdrop.js";
|
|
9
|
-
import "../Snackbar/useSnackbar.js";
|
|
10
|
-
import '../../assets/HeaderBase.css';const i = "_header_dg4o1_1", n = "_backdrop_dg4o1_17", r = {
|
|
11
|
-
header: i,
|
|
12
|
-
backdrop: n
|
|
13
|
-
}, u = ({ currentId: o, className: e, children: a, open: t, onClose: c }) => /* @__PURE__ */ d("header", { className: s(r.header, e), "data-current-id": o, children: [
|
|
14
|
-
t && /* @__PURE__ */ p(m, { className: r.backdrop, onClick: c }),
|
|
15
|
-
a
|
|
16
|
-
] });
|
|
17
|
-
export {
|
|
18
|
-
u as HeaderBase
|
|
19
|
-
};
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { jsxs as i, jsx as n } from "react/jsx-runtime";
|
|
2
|
-
import { c as s } from "../../index-p1eeF8LQ.js";
|
|
3
|
-
import { Avatar as I } from "../Avatar/Avatar.js";
|
|
4
|
-
import { AvatarGroup as b } from "../Avatar/AvatarGroup.js";
|
|
5
|
-
import { I as N, s as g, B as p } from "../../ToolbarSearch-56Sm2j7P.js";
|
|
6
|
-
import { Button as _ } from "../Button/Button.js";
|
|
7
|
-
import "react";
|
|
8
|
-
import "../Typography/Link.js";
|
|
9
|
-
import "react-dom";
|
|
10
|
-
import "../Snackbar/useSnackbar.js";
|
|
11
|
-
import { S as q } from "../../PadlockLocked-XL1IB5Ae.js";
|
|
12
|
-
import '../../assets/HeaderButton.css';const y = "_button_1p2eq_1", v = "_label_1p2eq_12", x = "_icon_1p2eq_18", B = "_avatarGroup_1p2eq_28", G = "_loginIcon_1p2eq_37", S = "_closeIcon_1p2eq_42", k = "_badge_1p2eq_46", e = {
|
|
13
|
-
button: y,
|
|
14
|
-
label: v,
|
|
15
|
-
icon: x,
|
|
16
|
-
avatarGroup: B,
|
|
17
|
-
loginIcon: G,
|
|
18
|
-
closeIcon: S,
|
|
19
|
-
badge: k
|
|
20
|
-
}, F = ({
|
|
21
|
-
className: c,
|
|
22
|
-
as: t = "button",
|
|
23
|
-
color: a = "company",
|
|
24
|
-
variant: l = "solid",
|
|
25
|
-
avatar: u,
|
|
26
|
-
avatarGroup: d,
|
|
27
|
-
icon: f = q,
|
|
28
|
-
expanded: h,
|
|
29
|
-
label: r = "Menu",
|
|
30
|
-
badge: o,
|
|
31
|
-
...m
|
|
32
|
-
}) => h ? /* @__PURE__ */ i(_, { ...m, as: t, variant: l, color: a, className: s(e.button, c), children: [
|
|
33
|
-
/* @__PURE__ */ n("span", { className: e.label, children: r }),
|
|
34
|
-
/* @__PURE__ */ n("span", { className: s(e.icon, e.closeIcon), children: /* @__PURE__ */ n(N, { svgElement: g }) }),
|
|
35
|
-
o && /* @__PURE__ */ n(p, { ...o, className: e.badge })
|
|
36
|
-
] }) : d ? /* @__PURE__ */ i(_, { ...m, as: t, variant: l, color: a, className: s(e.button, c), children: [
|
|
37
|
-
/* @__PURE__ */ n("span", { className: e.label, children: r }),
|
|
38
|
-
/* @__PURE__ */ n(b, { ...d, className: e.avatarGroup }),
|
|
39
|
-
o && /* @__PURE__ */ n(p, { ...o, className: e.badge })
|
|
40
|
-
] }) : u ? /* @__PURE__ */ i(_, { ...m, as: t, variant: l, color: a, className: s(e.button, c), children: [
|
|
41
|
-
/* @__PURE__ */ n("span", { className: e.label, children: r }),
|
|
42
|
-
/* @__PURE__ */ n(I, { type: u?.type, name: u?.name, style: { fontSize: "2.25rem" } }),
|
|
43
|
-
o && /* @__PURE__ */ n(p, { ...o, className: e.badge })
|
|
44
|
-
] }) : /* @__PURE__ */ i(_, { ...m, as: t, variant: l, color: a, className: s(e.button, c), children: [
|
|
45
|
-
/* @__PURE__ */ n("span", { className: e.label, children: r }),
|
|
46
|
-
/* @__PURE__ */ n("span", { className: s(e.icon, e.loginIcon), children: /* @__PURE__ */ n(N, { svgElement: f }) }),
|
|
47
|
-
o && /* @__PURE__ */ n(p, { ...o, className: e.badge })
|
|
48
|
-
] });
|
|
49
|
-
export {
|
|
50
|
-
F as HeaderButton
|
|
51
|
-
};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
-
import { c as p } from "../../index-p1eeF8LQ.js";
|
|
3
|
-
import '../../assets/HeaderGroup.css';const t = "_group_oia4i_1", c = {
|
|
4
|
-
group: t
|
|
5
|
-
}, a = ({ className: o, children: r }) => /* @__PURE__ */ s("div", { className: p(c.group, o), children: r });
|
|
6
|
-
export {
|
|
7
|
-
a as HeaderGroup
|
|
8
|
-
};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { jsxs as a, jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import { c } from "../../index-p1eeF8LQ.js";
|
|
3
|
-
import { B as i } from "../../ToolbarSearch-56Sm2j7P.js";
|
|
4
|
-
import { DigdirLogomark as _ } from "./DigdirLogomark.js";
|
|
5
|
-
import '../../assets/HeaderLogo.css';const g = "_logo_mt7vd_1", p = "_symbol_mt7vd_8", x = "_text_mt7vd_26", t = {
|
|
6
|
-
logo: g,
|
|
7
|
-
symbol: p,
|
|
8
|
-
text: x
|
|
9
|
-
}, h = ({ className: m, as: n = "a", title: r = "Altinn", href: e = "/", onClick: l, badge: s }) => /* @__PURE__ */ a(n, { variant: "ghost", className: c(t.logo, m), href: e, onClick: l, children: [
|
|
10
|
-
/* @__PURE__ */ o(_, { className: t.symbol }),
|
|
11
|
-
/* @__PURE__ */ o("span", { className: t.text, children: r }),
|
|
12
|
-
" ",
|
|
13
|
-
s && /* @__PURE__ */ o(i, { ...s })
|
|
14
|
-
] });
|
|
15
|
-
export {
|
|
16
|
-
h as HeaderLogo
|
|
17
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { jsx as d } from "react/jsx-runtime";
|
|
2
|
-
import { c as h } from "../../index-p1eeF8LQ.js";
|
|
3
|
-
import '../../assets/HeaderSearch.css';const t = "_search_1czaf_1", n = "_searchExpanded_1czaf_5", e = {
|
|
4
|
-
search: t,
|
|
5
|
-
searchExpanded: n
|
|
6
|
-
}, x = ({ expanded: a = !1, className: s, children: c }) => {
|
|
7
|
-
const r = h(e.search, s, a && e.searchExpanded);
|
|
8
|
-
return /* @__PURE__ */ d("div", { className: r, children: c });
|
|
9
|
-
};
|
|
10
|
-
export {
|
|
11
|
-
x as HeaderSearch
|
|
12
|
-
};
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx as t } from "react/jsx-runtime";
|
|
3
|
-
import { c as m } from "../../index-p1eeF8LQ.js";
|
|
4
|
-
import "react";
|
|
5
|
-
import "../../ToolbarSearch-56Sm2j7P.js";
|
|
6
|
-
import "../Typography/Link.js";
|
|
7
|
-
import { Button as i } from "../Button/Button.js";
|
|
8
|
-
import "react-dom";
|
|
9
|
-
import "../Snackbar/useSnackbar.js";
|
|
10
|
-
import { S as p } from "../../Globe-BcPkcH4E.js";
|
|
11
|
-
import '../../assets/LocaleButton.css';const s = "_button_mvy87_1", c = "_expanded_mvy87_13", o = {
|
|
12
|
-
button: s,
|
|
13
|
-
expanded: c
|
|
14
|
-
}, h = ({ id: e = "language-switcher", expanded: r, onClick: n, onBlurCapture: a }) => /* @__PURE__ */ t(
|
|
15
|
-
i,
|
|
16
|
-
{
|
|
17
|
-
className: m(o.button, r && o.expanded),
|
|
18
|
-
rounded: !0,
|
|
19
|
-
size: "lg",
|
|
20
|
-
variant: "ghost",
|
|
21
|
-
onClick: n,
|
|
22
|
-
"aria-label": `Open ${e}`,
|
|
23
|
-
onBlurCapture: a,
|
|
24
|
-
children: /* @__PURE__ */ t(p, {})
|
|
25
|
-
}
|
|
26
|
-
);
|
|
27
|
-
export {
|
|
28
|
-
h as LocaleButton
|
|
29
|
-
};
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx as r, jsxs as f } from "react/jsx-runtime";
|
|
3
|
-
import { useRef as k, useMemo as h } from "react";
|
|
4
|
-
import { useEnterKey as v } from "../../hooks/useEnterKey.js";
|
|
5
|
-
import { useIsDesktop as b } from "../../hooks/useIsDesktop.js";
|
|
6
|
-
import { DropdownBase as x } from "../Dropdown/DropdownBase.js";
|
|
7
|
-
import "../../index-p1eeF8LQ.js";
|
|
8
|
-
import "react-dom";
|
|
9
|
-
import "../Button/Button.js";
|
|
10
|
-
import { u as I, r as w, l as p } from "../../ToolbarSearch-56Sm2j7P.js";
|
|
11
|
-
import "../Typography/Link.js";
|
|
12
|
-
import { LocaleButton as C } from "./LocaleButton.js";
|
|
13
|
-
import "../Snackbar/useSnackbar.js";
|
|
14
|
-
import { DrawerBase as S } from "../Dropdown/DrawerBase.js";
|
|
15
|
-
const z = ({ title: m = "Select language", options: s, onSelect: a }) => {
|
|
16
|
-
const i = k(null), c = b(), { currentId: d, toggleId: g, closeAll: n } = I(), o = d === "locale", l = h(() => s.map((e) => ({
|
|
17
|
-
...e,
|
|
18
|
-
id: String(e.value),
|
|
19
|
-
tabIndex: 0,
|
|
20
|
-
groupId: "locales",
|
|
21
|
-
icon: e.checked ? w : /* @__PURE__ */ r("span", { "aria-hidden": "true" }),
|
|
22
|
-
onClick: () => {
|
|
23
|
-
a?.(String(e.value)), n();
|
|
24
|
-
}
|
|
25
|
-
})), [s, a]), u = {
|
|
26
|
-
locales: { title: m || "Språk/language" }
|
|
27
|
-
};
|
|
28
|
-
return v((e) => {
|
|
29
|
-
if (o) {
|
|
30
|
-
e.preventDefault();
|
|
31
|
-
const t = i.current?.querySelector('[data-active="true"]');
|
|
32
|
-
t && (t.tagName === "A" && t.hasAttribute("href") ? t.click() : t.dispatchEvent(new MouseEvent("click", { bubbles: !0 }))), n();
|
|
33
|
-
}
|
|
34
|
-
}), /* @__PURE__ */ f("div", { ref: i, "data-testid": "locale-switcher", children: [
|
|
35
|
-
/* @__PURE__ */ r(C, { onClick: () => g("locale"), expanded: o, onBlurCapture: (e) => {
|
|
36
|
-
e?.relatedTarget?.closest('[data-testid="locale-switcher"]') || n();
|
|
37
|
-
} }),
|
|
38
|
-
o && c && /* @__PURE__ */ r(x, { layout: "desktop", padding: !0, placement: "right", open: !0, children: /* @__PURE__ */ r(p, { groups: u, items: l, keyboardEvents: !1 }) }),
|
|
39
|
-
o && !c && /* @__PURE__ */ r(S, { open: !0, placement: "bottom", children: /* @__PURE__ */ r(p, { groups: u, items: l, keyboardEvents: !1 }) })
|
|
40
|
-
] });
|
|
41
|
-
};
|
|
42
|
-
export {
|
|
43
|
-
z as LocaleSwitcher
|
|
44
|
-
};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { Header as o } from "./Header.js";
|
|
2
|
-
import { HeaderBase as a } from "./HeaderBase.js";
|
|
3
|
-
import { HeaderLogo as f } from "./HeaderLogo.js";
|
|
4
|
-
import { HeaderButton as x } from "./HeaderButton.js";
|
|
5
|
-
import { HeaderGroup as H } from "./HeaderGroup.js";
|
|
6
|
-
import { HeaderSearch as u } from "./HeaderSearch.js";
|
|
7
|
-
import { LocaleButton as L } from "./LocaleButton.js";
|
|
8
|
-
import { LocaleSwitcher as l } from "./LocaleSwitcher.js";
|
|
9
|
-
export {
|
|
10
|
-
o as Header,
|
|
11
|
-
a as HeaderBase,
|
|
12
|
-
x as HeaderButton,
|
|
13
|
-
H as HeaderGroup,
|
|
14
|
-
f as HeaderLogo,
|
|
15
|
-
u as HeaderSearch,
|
|
16
|
-
L as LocaleButton,
|
|
17
|
-
l as LocaleSwitcher
|
|
18
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { AvatarProps } from '..';
|
|
2
|
-
export type Account = {
|
|
3
|
-
id: string;
|
|
4
|
-
type: 'person' | 'company';
|
|
5
|
-
icon?: AvatarProps;
|
|
6
|
-
name: string;
|
|
7
|
-
description?: string;
|
|
8
|
-
};
|
|
9
|
-
export type CurrentAccountProps = {
|
|
10
|
-
account: Account;
|
|
11
|
-
description?: string;
|
|
12
|
-
as?: 'button' | 'div';
|
|
13
|
-
onClick?: () => void;
|
|
14
|
-
multipleAccounts?: boolean;
|
|
15
|
-
};
|
|
16
|
-
export declare const CurrentAccount: ({ account, multipleAccounts, as, onClick }: CurrentAccountProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { Account, AccountMenuProps } from '..';
|
|
2
|
-
import { MenuProps } from '../Menu';
|
|
3
|
-
import { LogoutButtonProps } from './LogoutButton';
|
|
4
|
-
export interface GlobalMenuProps_old {
|
|
5
|
-
accountMenu?: AccountMenuProps;
|
|
6
|
-
menu?: MenuProps;
|
|
7
|
-
menuLabel?: string;
|
|
8
|
-
backLabel?: string;
|
|
9
|
-
logoutButton?: LogoutButtonProps;
|
|
10
|
-
changeLabel?: string;
|
|
11
|
-
className?: string;
|
|
12
|
-
currentAccount?: Account;
|
|
13
|
-
currentEndUserLabel?: string;
|
|
14
|
-
onSelectAccount?: (id: string) => void;
|
|
15
|
-
onClose?: () => void;
|
|
16
|
-
ariaLabel?: string;
|
|
17
|
-
}
|
|
18
|
-
export declare const GlobalMenu_old: ({ accountMenu, menu, backLabel, currentAccount, onSelectAccount, onClose, logoutButton, ariaLabel, }: GlobalMenuProps_old) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
import { Color } from '..';
|
|
3
|
-
export type GlobalMenuBaseProps = {
|
|
4
|
-
color?: Color;
|
|
5
|
-
children: ReactNode;
|
|
6
|
-
} & React.HTMLAttributes<HTMLElement>;
|
|
7
|
-
export interface GlobalMenuHeaderProps {
|
|
8
|
-
children: ReactNode;
|
|
9
|
-
}
|
|
10
|
-
export interface GlobalMenuFooterProps {
|
|
11
|
-
children: ReactNode;
|
|
12
|
-
}
|
|
13
|
-
export declare const GlobalMenuBase: ({ color, children, ...rest }: GlobalMenuBaseProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
-
export declare const GlobalMenuHeader: ({ children }: GlobalMenuHeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
|
-
export declare const GlobalMenuFooter: ({ children }: GlobalMenuFooterProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { ElementType } from 'react';
|
|
2
|
-
import { Account, ButtonProps } from '..';
|
|
3
|
-
import { BadgeProps } from '../Badge';
|
|
4
|
-
export interface GlobalMenuButtonProps_old extends ButtonProps {
|
|
5
|
-
currentAccount?: Account;
|
|
6
|
-
label?: string;
|
|
7
|
-
as?: ElementType;
|
|
8
|
-
className?: string;
|
|
9
|
-
expanded?: boolean;
|
|
10
|
-
badge?: BadgeProps | undefined;
|
|
11
|
-
tabIndex?: number;
|
|
12
|
-
}
|
|
13
|
-
export declare const GlobalMenuButton_old: ({ className, as, color, variant, currentAccount, expanded, label, badge, ...buttonProps }: GlobalMenuButtonProps_old) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { MouseEventHandler, ReactNode } from 'react';
|
|
2
|
-
export interface LogoutButtonProps {
|
|
3
|
-
label?: string;
|
|
4
|
-
children?: ReactNode;
|
|
5
|
-
onClick?: MouseEventHandler;
|
|
6
|
-
}
|
|
7
|
-
export declare const LogoutButton: ({ label, children, onClick }: LogoutButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { HeaderLogoProps, MenuProps } from '../';
|
|
2
|
-
import { BadgeProps } from '../Badge';
|
|
3
|
-
import { GlobalMenuProps_old, Account } from '../GlobalMenu_old';
|
|
4
|
-
import { SearchbarProps } from '../Searchbar';
|
|
5
|
-
import { LocaleSwitcherProps } from './';
|
|
6
|
-
export interface HeaderProps {
|
|
7
|
-
globalMenu: GlobalMenuProps_old;
|
|
8
|
-
/** Use to override globalMenu.menu on desktop */
|
|
9
|
-
desktopMenu?: MenuProps;
|
|
10
|
-
/** Use to override globalMenu.menu on mobile */
|
|
11
|
-
mobileMenu?: MenuProps;
|
|
12
|
-
locale?: LocaleSwitcherProps;
|
|
13
|
-
search?: SearchbarProps;
|
|
14
|
-
currentAccount?: Account;
|
|
15
|
-
badge?: BadgeProps | undefined;
|
|
16
|
-
logo?: HeaderLogoProps;
|
|
17
|
-
}
|
|
18
|
-
export declare const Header: ({ globalMenu, desktopMenu, mobileMenu, locale, search, currentAccount, logo, badge, }: HeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { HeaderProps } from '../';
|
|
2
|
-
declare const meta: {
|
|
3
|
-
title: string;
|
|
4
|
-
component: ({ globalMenu, desktopMenu, mobileMenu, locale, search, currentAccount, logo, badge, }: HeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
-
tags: string[];
|
|
6
|
-
parameters: {
|
|
7
|
-
layout: string;
|
|
8
|
-
};
|
|
9
|
-
args: {
|
|
10
|
-
search: {
|
|
11
|
-
name: string;
|
|
12
|
-
placeholder: string;
|
|
13
|
-
};
|
|
14
|
-
globalMenu: import('../GlobalMenu_old').GlobalMenuProps_old;
|
|
15
|
-
desktopMenu?: import('../Menu').MenuProps;
|
|
16
|
-
mobileMenu?: import('../Menu').MenuProps;
|
|
17
|
-
locale?: import('./LocaleSwitcher').LocaleSwitcherProps;
|
|
18
|
-
currentAccount?: import('../GlobalMenu_old').Account;
|
|
19
|
-
badge?: import('../Badge').BadgeProps | undefined;
|
|
20
|
-
logo?: import('./HeaderLogo').HeaderLogoProps;
|
|
21
|
-
};
|
|
22
|
-
};
|
|
23
|
-
export default meta;
|
|
24
|
-
export declare const Login: (args: HeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
25
|
-
export declare const CurrentAccount: (args: HeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
26
|
-
export declare const CompanyAccount: (args: HeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
27
|
-
export declare const SubcompanyAccount: (args: HeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
28
|
-
export declare const MobileMenu: (args: HeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
29
|
-
export declare const WithCustomBadge: (args: HeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
export interface HeaderBaseProps {
|
|
3
|
-
currentId?: string;
|
|
4
|
-
className?: string;
|
|
5
|
-
children?: ReactNode;
|
|
6
|
-
open?: boolean;
|
|
7
|
-
onClose?: () => void;
|
|
8
|
-
}
|
|
9
|
-
export declare const HeaderBase: ({ currentId, className, children, open, onClose }: HeaderBaseProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { AvatarProps, AvatarGroupProps } from '../Avatar';
|
|
2
|
-
import { BadgeProps } from '../Badge';
|
|
3
|
-
import { ButtonProps } from '../Button';
|
|
4
|
-
export interface HeaderButtonProps extends ButtonProps {
|
|
5
|
-
label?: string;
|
|
6
|
-
avatar?: AvatarProps;
|
|
7
|
-
avatarGroup?: AvatarGroupProps;
|
|
8
|
-
expanded?: boolean;
|
|
9
|
-
badge?: BadgeProps | undefined;
|
|
10
|
-
}
|
|
11
|
-
export declare const HeaderButton: ({ className, as, color, variant, avatar, avatarGroup, icon, expanded, label, badge, ...buttonProps }: HeaderButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { StoryObj } from '@storybook/react-vite';
|
|
2
|
-
declare const meta: {
|
|
3
|
-
title: string;
|
|
4
|
-
component: ({ className, as, color, variant, avatar, avatarGroup, icon, expanded, label, badge, ...buttonProps }: import('./HeaderButton').HeaderButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
-
tags: string[];
|
|
6
|
-
parameters: {
|
|
7
|
-
layout: string;
|
|
8
|
-
};
|
|
9
|
-
args: {};
|
|
10
|
-
};
|
|
11
|
-
export default meta;
|
|
12
|
-
type Story = StoryObj<typeof meta>;
|
|
13
|
-
export declare const Default: Story;
|
|
14
|
-
export declare const Person: Story;
|
|
15
|
-
export declare const Company: Story;
|
|
16
|
-
export declare const CompanyGroup: Story;
|
|
17
|
-
export declare const Expanded: Story;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
export interface HeaderGroupProps {
|
|
3
|
-
className?: string;
|
|
4
|
-
expanded?: boolean;
|
|
5
|
-
children?: ReactNode;
|
|
6
|
-
}
|
|
7
|
-
export declare const HeaderGroup: ({ className, children }: HeaderGroupProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { ElementType, MouseEventHandler } from 'react';
|
|
2
|
-
import { BadgeProps } from '../Badge';
|
|
3
|
-
export interface HeaderLogoProps {
|
|
4
|
-
className?: string;
|
|
5
|
-
as?: ElementType;
|
|
6
|
-
href?: string;
|
|
7
|
-
onClick?: MouseEventHandler<HTMLButtonElement>;
|
|
8
|
-
title?: string;
|
|
9
|
-
badge?: BadgeProps;
|
|
10
|
-
}
|
|
11
|
-
export declare const HeaderLogo: ({ className, as, title, href, onClick, badge }: HeaderLogoProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
export interface HeaderSearchProps {
|
|
3
|
-
className?: string;
|
|
4
|
-
expanded?: boolean;
|
|
5
|
-
children?: ReactNode;
|
|
6
|
-
}
|
|
7
|
-
export declare const HeaderSearch: ({ expanded, className, children }: HeaderSearchProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { MouseEventHandler } from 'react';
|
|
2
|
-
export interface LocaleButtonProps {
|
|
3
|
-
id?: string;
|
|
4
|
-
expanded?: boolean;
|
|
5
|
-
onClick?: MouseEventHandler;
|
|
6
|
-
onBlurCapture?: React.FocusEventHandler<HTMLButtonElement>;
|
|
7
|
-
}
|
|
8
|
-
export declare const LocaleButton: ({ id, expanded, onClick, onBlurCapture }: LocaleButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { MenuOptionProps } from '../Menu';
|
|
2
|
-
export interface LocaleSwitcherProps {
|
|
3
|
-
title?: string;
|
|
4
|
-
options: MenuOptionProps[];
|
|
5
|
-
onSelect?: (value: string) => void;
|
|
6
|
-
}
|
|
7
|
-
export declare const LocaleSwitcher: ({ title, options, onSelect }: LocaleSwitcherProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
declare const meta: {
|
|
2
|
-
title: string;
|
|
3
|
-
tags: string[];
|
|
4
|
-
parameters: {
|
|
5
|
-
layout: string;
|
|
6
|
-
};
|
|
7
|
-
args: {};
|
|
8
|
-
};
|
|
9
|
-
export default meta;
|
|
10
|
-
export declare const BetaModal: ({ checkbox, open, }: {
|
|
11
|
-
checkbox?: boolean;
|
|
12
|
-
open?: boolean;
|
|
13
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
-
export declare const About: () => import("react/jsx-runtime").JSX.Element;
|
|
15
|
-
export declare const AboutInbox: () => import("react/jsx-runtime").JSX.Element;
|
|
File without changes
|
|
File without changes
|