@altinn/altinn-components 0.29.0 → 0.29.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/PadlockLocked-CwhOOPnp.js +25 -0
- package/dist/assets/Badge.css +1 -1
- package/dist/assets/ButtonIcon.css +1 -1
- package/dist/assets/GlobalMenuButton.css +1 -0
- package/dist/assets/MenuItemBase.css +1 -1
- package/dist/assets/SettingsItem.css +1 -1
- package/dist/components/Badge/Badge.js +5 -5
- package/dist/components/Button/ButtonIcon.js +15 -12
- package/dist/components/Dashboard/DashboardHeader.js +11 -11
- package/dist/components/GlobalMenu/CurrentAccount.js +13 -14
- package/dist/components/GlobalMenu/GlobalMenu.js +37 -39
- package/dist/components/GlobalMenu/GlobalMenuButton.js +50 -0
- package/dist/components/GlobalMenu/index.js +10 -8
- package/dist/components/Header/Header.js +25 -30
- package/dist/components/Header/HeaderButton.js +45 -64
- package/dist/components/Menu/MenuItemBase.js +19 -17
- package/dist/components/Menu/MenuItemLabel.js +9 -9
- package/dist/components/Settings/SettingsItem.js +13 -13
- package/dist/components/Settings/SettingsList.js +30 -0
- package/dist/components/Settings/SettingsSection.js +20 -0
- package/dist/components/Settings/index.js +6 -4
- package/dist/components/Snackbar/useSnackbar.js +6 -6
- package/dist/components/index.js +319 -315
- package/dist/index.js +321 -317
- package/dist/types/lib/components/Account/Account.stories.d.ts +8 -0
- package/dist/types/lib/components/Account/AccountList.stories.d.ts +16 -6
- package/dist/types/lib/components/Account/AccountListItem.stories.d.ts +2 -2
- package/dist/types/lib/components/Account/AccountMenu.stories.d.ts +2 -1
- package/dist/types/lib/components/Account/AccountSettingsList.stories.d.ts +14 -0
- package/dist/types/lib/components/ActivityLog/ActivityLog.stories.d.ts +1 -0
- package/dist/types/lib/components/Article/ArticleContact.stories.d.ts +1 -1
- package/dist/types/lib/components/Article/ArticleHeader.stories.d.ts +1 -1
- package/dist/types/lib/components/Attachment/AttachmentLink.stories.d.ts +1 -1
- package/dist/types/lib/components/Attachment/AttachmentList.stories.d.ts +1 -1
- package/dist/types/lib/components/Avatar/AvatarGroup.stories.d.ts +1 -1
- package/dist/types/lib/components/Avatar/avatar.stories.d.ts +1 -1
- package/dist/types/lib/components/Badge/Badge.d.ts +1 -1
- package/dist/types/lib/components/Badge/Badge.stories.d.ts +2 -1
- package/dist/types/lib/components/Bookmarks/BookmarksListItem.stories.d.ts +1 -1
- package/dist/types/lib/components/Bookmarks/BookmarksSection.stories.d.ts +1 -1
- package/dist/types/lib/components/Button/Button.stories.d.ts +1 -1
- package/dist/types/lib/components/Button/ButtonIcon.d.ts +2 -1
- package/dist/types/lib/components/Button/ComboButton.stories.d.ts +1 -1
- package/dist/types/lib/components/Button/IconButton.stories.d.ts +1 -1
- package/dist/types/lib/components/Byline/Byline.stories.d.ts +1 -1
- package/dist/types/lib/components/ContextMenu/ContextMenu.stories.d.ts +1 -1
- package/dist/types/lib/components/Dashboard/DashboardHeader.stories.d.ts +1 -1
- package/dist/types/lib/components/Dialog/Dialog.stories.d.ts +1 -1
- package/dist/types/lib/components/Dialog/DialogActions.stories.d.ts +1 -1
- package/dist/types/lib/components/Dialog/DialogAttachments.stories.d.ts +1 -1
- package/dist/types/lib/components/Dialog/DialogBody.stories.d.ts +1 -1
- package/dist/types/lib/components/Dialog/DialogBylline.stories.d.ts +1 -1
- package/dist/types/lib/components/Dialog/DialogHeader.stories.d.ts +1 -1
- package/dist/types/lib/components/Dialog/DialogHistory.stories.d.ts +1 -1
- package/dist/types/lib/components/Dialog/DialogList.stories.d.ts +1 -1
- package/dist/types/lib/components/Dialog/DialogListItem.stories.d.ts +1 -1
- package/dist/types/lib/components/Dialog/DialogMetadata.stories.d.ts +1 -1
- package/dist/types/lib/components/Dialog/DialogSeenBy.stories.d.ts +1 -1
- package/dist/types/lib/components/Dialog/DialogStatus.stories.d.ts +1 -1
- package/dist/types/lib/components/Dialog/DialogTouchedBy.stories.d.ts +1 -1
- package/dist/types/lib/components/Dialog/SeenByLog.stories.d.ts +1 -1
- package/dist/types/lib/components/DsComponents/DsComponents.stories.d.ts +1 -1
- package/dist/types/lib/components/Footer/Footer.stories.d.ts +1 -1
- package/dist/types/lib/components/Forms/Checkbox.stories.d.ts +1 -1
- package/dist/types/lib/components/Forms/CheckboxOptions.stories.d.ts +1 -1
- package/dist/types/lib/components/Forms/Radio.stories.d.ts +1 -1
- package/dist/types/lib/components/Forms/RadioOptions.stories.d.ts +1 -1
- package/dist/types/lib/components/Forms/SearchField.stories.d.ts +1 -1
- package/dist/types/lib/components/Forms/SelectField.stories.d.ts +1 -1
- package/dist/types/lib/components/Forms/Switch.stories.d.ts +1 -1
- package/dist/types/lib/components/Forms/SwitchOptions.stories.d.ts +1 -1
- package/dist/types/lib/components/Forms/TextField.stories.d.ts +1 -1
- package/dist/types/lib/components/Forms/TextareaField.stories.d.ts +1 -1
- package/dist/types/lib/components/GlobalMenu/CurrentAccount.d.ts +1 -2
- package/dist/types/lib/components/GlobalMenu/GlobalMenu.d.ts +1 -1
- package/dist/types/lib/components/GlobalMenu/GlobalMenu.stories.d.ts +3 -3
- package/dist/types/lib/components/GlobalMenu/GlobalMenuButton.d.ts +13 -0
- package/dist/types/lib/components/GlobalMenu/GlobalMenuButton.stories.d.ts +19 -0
- package/dist/types/lib/components/GlobalMenu/index.d.ts +2 -1
- package/dist/types/lib/components/Header/Header.stories.d.ts +2 -2
- package/dist/types/lib/components/Header/HeaderButton.stories.d.ts +1 -1
- package/dist/types/lib/components/Header/LocaleSwitcher.stories.d.ts +1 -1
- package/dist/types/lib/components/Icon/CheckboxIcon.stories.d.ts +1 -1
- package/dist/types/lib/components/Icon/Icon.stories.d.ts +1 -1
- package/dist/types/lib/components/Icon/ProgressIcon.stories.d.ts +1 -1
- package/dist/types/lib/components/Icon/RadioIcon.stories.d.ts +1 -1
- package/dist/types/lib/components/LayoutAction/LayoutAction.stories.d.ts +1 -1
- package/dist/types/lib/components/List/ListItem.stories.d.ts +1 -1
- package/dist/types/lib/components/Menu/Menu.stories.d.ts +1 -1
- package/dist/types/lib/components/Menu/MenuItem.d.ts +1 -0
- package/dist/types/lib/components/Menu/MenuItemBase.d.ts +2 -1
- package/dist/types/lib/components/Menu/MenuOption.stories.d.ts +1 -1
- package/dist/types/lib/components/Menu/MenuSearch.stories.d.ts +1 -1
- package/dist/types/lib/components/Metadata/MetaItem.stories.d.ts +1 -1
- package/dist/types/lib/components/Metadata/MetaProgress.stories.d.ts +1 -1
- package/dist/types/lib/components/Metadata/MetaTimestamp.stories.d.ts +1 -1
- package/dist/types/lib/components/Metadata/Metadata.stories.d.ts +1 -1
- package/dist/types/lib/components/Page/Breadcrumbs.stories.d.ts +1 -1
- package/dist/types/lib/components/Page/ContactSection.stories.d.ts +1 -1
- package/dist/types/lib/components/Page/Flex.stories.d.ts +1 -1
- package/dist/types/lib/components/Page/Grid.stories.d.ts +1 -1
- package/dist/types/lib/components/Page/List.stories.d.ts +1 -1
- package/dist/types/lib/components/Page/PageMenu.stories.d.ts +1 -1
- package/dist/types/lib/components/Page/PageNav.stories.d.ts +1 -1
- package/dist/types/lib/components/Page/PageTabs.stories.d.ts +1 -1
- package/dist/types/lib/components/ResourceList/ResourceList.stories.d.ts +1 -1
- package/dist/types/lib/components/ResourceList/ResourceListItem.stories.d.ts +1 -1
- package/dist/types/lib/components/Searchbar/Autocomplete.stories.d.ts +1 -1
- package/dist/types/lib/components/Searchbar/Searchbar.stories.d.ts +1 -1
- package/dist/types/lib/components/Settings/Settings.stories.d.ts +0 -1
- package/dist/types/lib/components/Settings/SettingsItem.d.ts +1 -0
- package/dist/types/lib/components/Settings/SettingsItem.stories.d.ts +3 -2
- package/dist/types/lib/components/Settings/SettingsList.d.ts +9 -0
- package/dist/types/lib/components/Settings/SettingsSection.d.ts +9 -0
- package/dist/types/lib/components/Settings/index.d.ts +2 -1
- package/dist/types/lib/components/Snackbar/SnackbarItem.stories.d.ts +1 -1
- package/dist/types/lib/components/Timeline/TimelineActivity.stories.d.ts +1 -1
- package/dist/types/lib/components/Timeline/TimelineFooter.stories.d.ts +1 -1
- package/dist/types/lib/components/Timeline/TimelineHeader.stories.d.ts +1 -1
- package/dist/types/lib/components/Timeline/TimelineSection.stories.d.ts +1 -1
- package/dist/types/lib/components/Toolbar/Toolbar.stories.d.ts +1 -1
- package/dist/types/lib/components/Toolbar/ToolbarAdd.stories.d.ts +1 -1
- package/dist/types/lib/components/Toolbar/ToolbarButton.stories.d.ts +1 -1
- package/dist/types/lib/components/Toolbar/ToolbarDate.stories.d.ts +1 -1
- package/dist/types/lib/components/Toolbar/ToolbarDaterange.stories.d.ts +1 -1
- package/dist/types/lib/components/Toolbar/ToolbarFilter.stories.d.ts +1 -1
- package/dist/types/lib/components/Toolbar/ToolbarMenu.stories.d.ts +1 -1
- package/dist/types/lib/components/Toolbar/ToolbarOptions.stories.d.ts +1 -1
- package/dist/types/lib/components/Toolbar/ToolbarSearch.stories.d.ts +1 -1
- package/dist/types/lib/components/Transmission/Transmission.stories.d.ts +1 -1
- package/dist/types/lib/components/Typography/Heading.stories.d.ts +1 -1
- package/dist/types/lib/components/Typography/Typography.stories.d.ts +1 -1
- package/dist/types/lib/stories/Profile/Settings.stories.d.ts +3 -4
- package/dist/types/lib/stories/Profile.stories.d.ts +7 -7
- package/package.json +12 -16
- package/dist/components/Settings/Settings.js +0 -20
- package/dist/types/lib/components/Settings/Settings.d.ts +0 -9
- package/dist/types/lib/stories/Profile/Accounts.stories.d.ts +0 -14
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import * as a from "react";
|
|
3
|
+
import { forwardRef as i } from "react";
|
|
4
|
+
import { u as d } from "./useId-BVFxCjkq.js";
|
|
5
|
+
var f = function(t, o) {
|
|
6
|
+
var l = {};
|
|
7
|
+
for (var e in t) Object.prototype.hasOwnProperty.call(t, e) && o.indexOf(e) < 0 && (l[e] = t[e]);
|
|
8
|
+
if (t != null && typeof Object.getOwnPropertySymbols == "function")
|
|
9
|
+
for (var r = 0, e = Object.getOwnPropertySymbols(t); r < e.length; r++)
|
|
10
|
+
o.indexOf(e[r]) < 0 && Object.prototype.propertyIsEnumerable.call(t, e[r]) && (l[e[r]] = t[e[r]]);
|
|
11
|
+
return l;
|
|
12
|
+
};
|
|
13
|
+
const p = i((t, o) => {
|
|
14
|
+
var { title: l, titleId: e } = t, r = f(t, ["title", "titleId"]);
|
|
15
|
+
let n = d();
|
|
16
|
+
return n = l ? e || "title-" + n : void 0, a.createElement(
|
|
17
|
+
"svg",
|
|
18
|
+
Object.assign({ xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", fill: "none", viewBox: "0 0 24 24", focusable: !1, role: "img", ref: o, "aria-labelledby": n }, r),
|
|
19
|
+
l ? a.createElement("title", { id: n }, l) : null,
|
|
20
|
+
a.createElement("path", { fill: "currentColor", fillRule: "evenodd", d: "M7.25 7a4.75 4.75 0 0 1 9.5 0v2.25H17c.966 0 1.75.784 1.75 1.75v9a.75.75 0 0 1-.75.75H6a.75.75 0 0 1-.75-.75v-9c0-.966.784-1.75 1.75-1.75h.25zm1.5 0a3.25 3.25 0 0 1 6.5 0v2.25h-6.5zM7 10.75a.25.25 0 0 0-.25.25v8.25h10.5V11a.25.25 0 0 0-.25-.25zm3.5 3.75a1.5 1.5 0 1 1 2.25 1.3V17a.75.75 0 0 1-1.5 0v-1.2a1.5 1.5 0 0 1-.75-1.3", clipRule: "evenodd" })
|
|
21
|
+
);
|
|
22
|
+
});
|
|
23
|
+
export {
|
|
24
|
+
p as S
|
|
25
|
+
};
|
package/dist/assets/Badge.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._badge_80cwt_1{display:inline-flex;align-items:center;justify-content:center;white-space:nowrap;flex:0 0 auto;max-height:min-content;--dsc-badge-background: var(--ds-color-base-default);--dsc-badge-color: var(--ds-color-base-contrast-default);background-color:var(--dsc-badge-background);color:var(--dsc-badge-color)}._badge_80cwt_1[data-size=xs]{width:.75rem;height:.75rem;padding:0;border-radius:1em}._badge_80cwt_1[data-size=xs] ._label_80cwt_22{color:transparent;width:100%;height:100%}._badge_80cwt_1[data-size=sm]{font-weight:500;font-size:.75rem;line-height:1;padding:.5em;min-width:2em;border-radius:2em}._badge_80cwt_1[data-variant=tinted]{--dsc-badge-background: var(--ds-color-surface-tinted);--dsc-badge-color: var(--ds-color-text-default)}._badge_80cwt_1[data-variant=base]{--dsc-badge-background: var(--ds-color-base-default);--dsc-badge-color: var(--ds-color-base-contrast-default)}._badge_80cwt_1[data-variant=text],._badge_80cwt_1[data-variant=text][data-size=xs],._badge_80cwt_1[data-variant=text][data-size=sm]{--dsc-badge-background: "transparent";--dsc-badge-color: var(--ds-color-text-subtle);font-size:.875rem;font-weight:400;padding:.5em 0}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._wrapper_1tenp_1{display:flex;align-items:center;justify-content:center;font-size:1em}._icon_1tenp_8[data-size=xs]{font-size:.875rem}._icon_1tenp_8[data-size=sm]{font-size:1rem}._icon_1tenp_8[data-size=md]{font-size:1.125rem}._icon_1tenp_8[data-size=lg]{font-size:1.5rem}._icon_1tenp_8 svg,._icon_1tenp_8 img{display:block;width:1em;height:1em;font-size:1.5em}._avatar_1tenp_32{font-size:1.5em}._avatarGroup_1tenp_36{font-size:1.125em}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._button_af7mx_1{flex-shrink:0;position:relative;z-index:2;display:inline-flex;align-items:center;column-gap:.625rem;padding:.625rem;border:none;border-radius:4px}._label_af7mx_13{font-size:1.125rem;font-weight:500;padding:.25rem}._loginIcon_af7mx_19,._closeIcon_af7mx_20,._avatar_af7mx_21{font-size:1.5rem;width:2.25rem;height:2.25rem;border-radius:2px}._loginIcon_af7mx_19{background-color:#fff;color:#000}._closeIcon_af7mx_20{outline:1px solid white}._badge_af7mx_37{position:absolute;top:0;right:0;margin-top:-.75rem;margin-right:-.75rem}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._item_1k1tk_1{font:inherit;color:inherit;padding:0;border:0;text-align:inherit;text-decoration:none;line-height:normal;-webkit-font-smoothing:inherit;-moz-osx-font-smoothing:inherit;-webkit-appearance:none;-moz-appearance:none;appearance:none;-webkit-user-select:none;user-select:none;cursor:pointer;position:relative;width:100%;display:flex;align-items:center;column-gap:.25rem;margin:.5rem 0;border-radius:2px}._item_1k1tk_1[aria-disabled=true]{opacity:.5;pointer-events:none}._item_1k1tk_1[data-size=md]{min-height:56px}._item_1k1tk_1[data-size=md]{min-height:44px}._item_1k1tk_1[data-size=sm]{min-height:40px}._content_1k1tk_45{display:flex;width:100%;align-items:center;column-gap:6px;padding:6px}._item_1k1tk_1,._item_1k1tk_1[data-theme]{background-color:transparent}._item_1k1tk_1{pointer-events:none}._item_1k1tk_1[data-interactive=true]{pointer-events:all}[data-theme=subtle] ._item_1k1tk_1:hover{background-color:var(--ds-color-surface-hover)}[data-theme=subtle] ._item_1k1tk_1:active{background-color:var(--ds-color-surface-active)}[data-theme=subtle] ._item_1k1tk_1[data-selected=true]{background-color:var(--ds-color-background-default)}[data-theme=default] ._item_1k1tk_1:hover{background-color:var(--ds-color-surface-hover)}[data-theme=default] ._item_1k1tk_1:active{background-color:var(--ds-color-surface-active)}[data-theme=default] ._item_1k1tk_1[data-selected=true]{background-color:var(--ds-color-background-tinted)}._content_1k1tk_45{display:flex;width:100%;align-items:center;column-gap:.5em;padding:.5}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._item_s2olz_1{--dsc-item-px: 0;--dsc-item-py: 0;--dsc-item-height: 2rem;--dsc-item-background: transparent;--dsc-item-background-hover: none;--dsc-item-outline-color: transparent;--dsc-item-border-color: transparent;box-shadow:none}._item_s2olz_1+._item_s2olz_1{margin-top:.5em}._label_s2olz_16{margin:0}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { jsx as a } from "react/jsx-runtime";
|
|
2
2
|
import { c as r } from "../../index-L8X2o7IH.js";
|
|
3
|
-
import '../../assets/Badge.css';const b = "
|
|
3
|
+
import '../../assets/Badge.css';const b = "_badge_80cwt_1", m = "_label_80cwt_22", e = {
|
|
4
4
|
badge: b,
|
|
5
5
|
label: m
|
|
6
|
-
}, g = ({ label: t, color: s, variant:
|
|
6
|
+
}, g = ({ label: t, color: s, variant: l = "tinted", theme: c, size: d = "sm", className: n, children: o }) => /* @__PURE__ */ a(
|
|
7
7
|
"span",
|
|
8
8
|
{
|
|
9
9
|
className: r(e.badge, n),
|
|
10
10
|
"data-color": s,
|
|
11
|
-
"data-variant":
|
|
12
|
-
"data-theme":
|
|
13
|
-
"data-size":
|
|
11
|
+
"data-variant": l,
|
|
12
|
+
"data-theme": c,
|
|
13
|
+
"data-size": d,
|
|
14
14
|
children: /* @__PURE__ */ a("span", { className: e.label, children: t || o })
|
|
15
15
|
}
|
|
16
16
|
);
|
|
@@ -1,19 +1,22 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { c as
|
|
3
|
-
import { isValidElement as
|
|
4
|
-
import { isIconProps as
|
|
5
|
-
import { isAvatarProps as c, Avatar as
|
|
6
|
-
import { isAvatarGroupProps as l, AvatarGroup as
|
|
1
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { c as m } from "../../index-L8X2o7IH.js";
|
|
3
|
+
import { isValidElement as n } from "react";
|
|
4
|
+
import { isIconProps as i, Icon as o } from "../Icon/Icon.js";
|
|
5
|
+
import { isAvatarProps as c, Avatar as _ } from "../Avatar/Avatar.js";
|
|
6
|
+
import { isAvatarGroupProps as l, AvatarGroup as f } from "../Avatar/AvatarGroup.js";
|
|
7
7
|
import "../RootProvider/RootProvider.js";
|
|
8
8
|
import "../Searchbar/AutocompleteBase.js";
|
|
9
9
|
import "../Snackbar/useSnackbar.js";
|
|
10
|
-
import '../../assets/ButtonIcon.css';const
|
|
11
|
-
|
|
10
|
+
import '../../assets/ButtonIcon.css';const v = "_wrapper_1tenp_1", u = "_icon_1tenp_8", G = "_avatar_1tenp_32", N = "_avatarGroup_1tenp_36", t = {
|
|
11
|
+
wrapper: v,
|
|
12
|
+
icon: u,
|
|
13
|
+
avatar: G,
|
|
14
|
+
avatarGroup: N
|
|
12
15
|
};
|
|
13
|
-
function
|
|
14
|
-
return typeof r == "string" || typeof r == "number" || typeof r == "boolean" || r === null ||
|
|
16
|
+
function d(r) {
|
|
17
|
+
return typeof r == "string" || typeof r == "number" || typeof r == "boolean" || r === null || n(r);
|
|
15
18
|
}
|
|
16
|
-
const
|
|
19
|
+
const h = ({ icon: r, size: p, iconAltText: s, className: e }) => /* @__PURE__ */ a("span", { className: m(t.wrapper, e), "data-size": p, "aria-label": s, children: c(r) && /* @__PURE__ */ a(_, { ...r, className: t.avatar }) || l(r) && /* @__PURE__ */ a(f, { ...r, className: t.avatarGroup }) || i(r) && /* @__PURE__ */ a(o, { ...r, className: t.icon }) || d(r) && r || /* @__PURE__ */ a(o, { svgElement: r, className: t.icon }) });
|
|
17
20
|
export {
|
|
18
|
-
|
|
21
|
+
h as ButtonIcon
|
|
19
22
|
};
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import { jsxs as i, jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import "../../index-L8X2o7IH.js";
|
|
3
3
|
import "react";
|
|
4
|
-
import { Avatar as
|
|
4
|
+
import { Avatar as a } from "../Avatar/Avatar.js";
|
|
5
5
|
import "../RootProvider/RootProvider.js";
|
|
6
|
-
import { Typography as
|
|
7
|
-
import { Heading as
|
|
6
|
+
import { Typography as c } from "../Typography/Typography.js";
|
|
7
|
+
import { Heading as d } from "../Typography/Heading.js";
|
|
8
8
|
import { Skeleton as l } from "../Skeleton/Skeleton.js";
|
|
9
9
|
import "../Searchbar/AutocompleteBase.js";
|
|
10
10
|
import "../Snackbar/useSnackbar.js";
|
|
11
|
-
import { Flex as
|
|
11
|
+
import { Flex as p } from "../Page/Flex.js";
|
|
12
12
|
import { Section as h } from "../Page/Section.js";
|
|
13
|
-
const k = ({ type: o, name: t, title:
|
|
14
|
-
/* @__PURE__ */ i(
|
|
15
|
-
/* @__PURE__ */ r("div", { style: { position: "relative" }, children: /* @__PURE__ */ r(
|
|
16
|
-
/* @__PURE__ */ i(
|
|
17
|
-
/* @__PURE__ */ r(
|
|
18
|
-
/* @__PURE__ */ r(
|
|
13
|
+
const k = ({ type: o, name: t, title: m, description: s, loading: e, children: n }) => /* @__PURE__ */ i(h, { as: "header", theme: "default", padding: "page", spacing: 6, shadow: "xs", bleed: !0, children: [
|
|
14
|
+
/* @__PURE__ */ i(p, { direction: "row", align: "center", spacing: 3, children: [
|
|
15
|
+
/* @__PURE__ */ r("div", { style: { position: "relative" }, children: /* @__PURE__ */ r(a, { style: { fontSize: "2.75rem" }, type: o, name: t, loading: e }) }),
|
|
16
|
+
/* @__PURE__ */ i(p, { direction: "col", spacing: 0, children: [
|
|
17
|
+
/* @__PURE__ */ r(d, { size: "lg", loading: e, children: m || t }),
|
|
18
|
+
/* @__PURE__ */ r(c, { as: "p", variant: "subtle", size: "xs", loading: e, children: s || o })
|
|
19
19
|
] })
|
|
20
20
|
] }),
|
|
21
|
-
/* @__PURE__ */ r(l, { loading: e, children:
|
|
21
|
+
/* @__PURE__ */ r(l, { loading: e, children: n })
|
|
22
22
|
] });
|
|
23
23
|
export {
|
|
24
24
|
k as DashboardHeader
|
|
@@ -1,28 +1,27 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as p } from "react/jsx-runtime";
|
|
2
2
|
import "../../index-L8X2o7IH.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import "../RootProvider/RootProvider.js";
|
|
5
|
-
import { MenuItem as o } from "../Menu/MenuItem.js";
|
|
6
5
|
import "../Searchbar/AutocompleteBase.js";
|
|
7
6
|
import "../Snackbar/useSnackbar.js";
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
o,
|
|
7
|
+
import { MenuItem as t } from "../Menu/MenuItem.js";
|
|
8
|
+
const v = ({ account: i, multipleAccounts: e, as: r, onClick: m }) => /* @__PURE__ */ p(
|
|
9
|
+
t,
|
|
12
10
|
{
|
|
13
11
|
id: "account",
|
|
14
12
|
size: "lg",
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
13
|
+
interactive: !!e,
|
|
14
|
+
as: e ? r : "div",
|
|
15
|
+
onClick: m,
|
|
16
|
+
linkIcon: e,
|
|
18
17
|
icon: {
|
|
19
|
-
name:
|
|
20
|
-
type:
|
|
18
|
+
name: i.name,
|
|
19
|
+
type: i.type
|
|
21
20
|
},
|
|
22
|
-
title: { children:
|
|
23
|
-
description:
|
|
21
|
+
title: { children: i == null ? void 0 : i.name, size: "sm", weight: "medium" },
|
|
22
|
+
description: i == null ? void 0 : i.description
|
|
24
23
|
}
|
|
25
24
|
);
|
|
26
25
|
export {
|
|
27
|
-
|
|
26
|
+
v as CurrentAccount
|
|
28
27
|
};
|
|
@@ -1,36 +1,35 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs as p, jsx as r, Fragment as y } from "react/jsx-runtime";
|
|
3
|
-
import { useState as
|
|
3
|
+
import { useState as q, useMemo as w } from "react";
|
|
4
4
|
import "../../index-L8X2o7IH.js";
|
|
5
|
-
import { AccountMenu as
|
|
5
|
+
import { AccountMenu as z } from "../Account/AccountMenu.js";
|
|
6
6
|
import "../RootProvider/RootProvider.js";
|
|
7
|
-
import { CurrentAccount as
|
|
8
|
-
import { BackButton as
|
|
9
|
-
import { LogoutButton as
|
|
10
|
-
import { EndUserLabel as
|
|
7
|
+
import { CurrentAccount as D } from "./CurrentAccount.js";
|
|
8
|
+
import { BackButton as J } from "./BackButton.js";
|
|
9
|
+
import { LogoutButton as j } from "./LogoutButton.js";
|
|
10
|
+
import { EndUserLabel as B } from "./EndUserLabel.js";
|
|
11
11
|
import "../Searchbar/AutocompleteBase.js";
|
|
12
|
-
import { MenuListItem as
|
|
13
|
-
import { Menu as
|
|
12
|
+
import { MenuListItem as f } from "../Menu/MenuBase.js";
|
|
13
|
+
import { Menu as F } from "../Menu/Menu.js";
|
|
14
14
|
import "../Snackbar/useSnackbar.js";
|
|
15
|
-
import { GlobalMenuBase as s, GlobalMenuHeader as
|
|
15
|
+
import { GlobalMenuBase as s, GlobalMenuHeader as K, GlobalMenuFooter as T } from "./GlobalMenuBase.js";
|
|
16
16
|
const c = ({
|
|
17
17
|
accountMenu: l,
|
|
18
18
|
items: k = [],
|
|
19
|
-
groups:
|
|
20
|
-
|
|
21
|
-
backLabel: M = "Back",
|
|
19
|
+
groups: v,
|
|
20
|
+
backLabel: H = "Back",
|
|
22
21
|
currentAccount: d,
|
|
23
22
|
currentEndUserLabel: t = "Signed in",
|
|
24
|
-
onSelectAccount:
|
|
23
|
+
onSelectAccount: h,
|
|
25
24
|
onClose: m,
|
|
26
25
|
logoutButton: e
|
|
27
26
|
}) => {
|
|
28
|
-
var
|
|
29
|
-
const [
|
|
30
|
-
|
|
31
|
-
},
|
|
32
|
-
o(), m == null || m(),
|
|
33
|
-
},
|
|
27
|
+
var G;
|
|
28
|
+
const [M, S] = q(!1), o = () => {
|
|
29
|
+
S((i) => !i);
|
|
30
|
+
}, W = (i) => {
|
|
31
|
+
o(), m == null || m(), h == null || h(i);
|
|
32
|
+
}, g = w(() => k.map((i) => ({
|
|
34
33
|
...i,
|
|
35
34
|
onClick: () => {
|
|
36
35
|
var a;
|
|
@@ -39,48 +38,47 @@ const c = ({
|
|
|
39
38
|
items: Array.isArray(i.items) ? i.items.map((a) => ({
|
|
40
39
|
...a,
|
|
41
40
|
onClick: () => {
|
|
42
|
-
var
|
|
43
|
-
(
|
|
41
|
+
var x;
|
|
42
|
+
(x = a.onClick) == null || x.call(a), m == null || m();
|
|
44
43
|
}
|
|
45
44
|
})) : void 0
|
|
46
45
|
})), [k, m]);
|
|
47
|
-
if (
|
|
46
|
+
if (M)
|
|
48
47
|
return /* @__PURE__ */ p(s, { children: [
|
|
49
|
-
/* @__PURE__ */ r(
|
|
50
|
-
/* @__PURE__ */ r(
|
|
51
|
-
l && /* @__PURE__ */ r(
|
|
48
|
+
/* @__PURE__ */ r(K, { children: /* @__PURE__ */ r(J, { onClick: o, label: H }) }),
|
|
49
|
+
/* @__PURE__ */ r(f, { as: "div", role: "separator" }),
|
|
50
|
+
l && /* @__PURE__ */ r(z, { ...l, currentAccount: d, onSelectAccount: W })
|
|
52
51
|
] });
|
|
53
52
|
if (d) {
|
|
54
|
-
const i = l && ((
|
|
53
|
+
const i = l && ((G = l == null ? void 0 : l.items) == null ? void 0 : G.length) > 1;
|
|
55
54
|
return /* @__PURE__ */ p(s, { color: d == null ? void 0 : d.type, children: [
|
|
56
55
|
/* @__PURE__ */ r(
|
|
57
|
-
|
|
56
|
+
D,
|
|
58
57
|
{
|
|
59
58
|
account: d,
|
|
60
|
-
linkText: H,
|
|
61
59
|
multipleAccounts: i,
|
|
62
60
|
as: i ? "button" : "div",
|
|
63
61
|
onClick: i ? o : void 0
|
|
64
62
|
}
|
|
65
63
|
),
|
|
66
|
-
/* @__PURE__ */ r(
|
|
67
|
-
/* @__PURE__ */ r(
|
|
64
|
+
/* @__PURE__ */ r(f, { as: "div", role: "separator" }),
|
|
65
|
+
/* @__PURE__ */ r(F, { groups: v, items: g, theme: "default" }),
|
|
68
66
|
e && /* @__PURE__ */ p(y, { children: [
|
|
69
|
-
/* @__PURE__ */ r(
|
|
70
|
-
/* @__PURE__ */ p(
|
|
71
|
-
t && /* @__PURE__ */ r(
|
|
72
|
-
/* @__PURE__ */ r(
|
|
67
|
+
/* @__PURE__ */ r(f, { as: "div", role: "separator" }),
|
|
68
|
+
/* @__PURE__ */ p(T, { children: [
|
|
69
|
+
t && /* @__PURE__ */ r(B, { children: t }),
|
|
70
|
+
/* @__PURE__ */ r(j, { ...e })
|
|
73
71
|
] })
|
|
74
72
|
] })
|
|
75
73
|
] });
|
|
76
74
|
}
|
|
77
75
|
return /* @__PURE__ */ p(s, { children: [
|
|
78
|
-
/* @__PURE__ */ r(
|
|
76
|
+
/* @__PURE__ */ r(F, { groups: v, items: g }),
|
|
79
77
|
e && /* @__PURE__ */ p(y, { children: [
|
|
80
|
-
/* @__PURE__ */ r(
|
|
81
|
-
/* @__PURE__ */ p(
|
|
82
|
-
t && /* @__PURE__ */ r(
|
|
83
|
-
/* @__PURE__ */ r(
|
|
78
|
+
/* @__PURE__ */ r(f, { as: "div", role: "separator" }),
|
|
79
|
+
/* @__PURE__ */ p(T, { children: [
|
|
80
|
+
t && /* @__PURE__ */ r(B, { children: t }),
|
|
81
|
+
/* @__PURE__ */ r(j, { ...e })
|
|
84
82
|
] })
|
|
85
83
|
] })
|
|
86
84
|
] });
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { jsxs as l, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { c as f } from "../../index-L8X2o7IH.js";
|
|
3
|
+
import "react";
|
|
4
|
+
import { Badge as _ } from "../Badge/Badge.js";
|
|
5
|
+
import { ButtonBase as p } from "../Button/ButtonBase.js";
|
|
6
|
+
import { ButtonLabel as d } from "../Button/ButtonLabel.js";
|
|
7
|
+
import { ButtonIcon as I } from "../Button/ButtonIcon.js";
|
|
8
|
+
import "../RootProvider/RootProvider.js";
|
|
9
|
+
import "../Searchbar/AutocompleteBase.js";
|
|
10
|
+
import "../Snackbar/useSnackbar.js";
|
|
11
|
+
import { S as g } from "../../XMark-DIqxCTTQ.js";
|
|
12
|
+
import { S as x } from "../../PadlockLocked-CwhOOPnp.js";
|
|
13
|
+
import '../../assets/GlobalMenuButton.css';const N = "_button_af7mx_1", b = "_loginIcon_af7mx_19", h = "_closeIcon_af7mx_20", B = "_avatar_af7mx_21", v = "_badge_af7mx_37", a = {
|
|
14
|
+
button: N,
|
|
15
|
+
loginIcon: b,
|
|
16
|
+
closeIcon: h,
|
|
17
|
+
avatar: B,
|
|
18
|
+
badge: v
|
|
19
|
+
}, D = ({
|
|
20
|
+
className: t,
|
|
21
|
+
as: c = "button",
|
|
22
|
+
color: m = "accent",
|
|
23
|
+
variant: s = "solid",
|
|
24
|
+
currentAccount: e,
|
|
25
|
+
expanded: u,
|
|
26
|
+
label: i = "Menu",
|
|
27
|
+
badge: n,
|
|
28
|
+
...r
|
|
29
|
+
}) => u ? /* @__PURE__ */ l(p, { ...r, as: c, variant: s, color: m, className: f(a.button, t), children: [
|
|
30
|
+
/* @__PURE__ */ o(d, { children: i }),
|
|
31
|
+
/* @__PURE__ */ o(I, { className: a.closeIcon, icon: /* @__PURE__ */ o(g, { className: a.icon, "aria-label": "Close Icon" }) }),
|
|
32
|
+
n && /* @__PURE__ */ o(_, { ...n, className: a.badge })
|
|
33
|
+
] }) : e ? /* @__PURE__ */ l(p, { ...r, as: c, variant: s, color: m, className: f(a.button, t), children: [
|
|
34
|
+
/* @__PURE__ */ o(d, { children: i }),
|
|
35
|
+
/* @__PURE__ */ o(I, { className: a.avatar, icon: { type: e.type, name: e.name } }),
|
|
36
|
+
n && /* @__PURE__ */ o(_, { ...n, className: a.badge })
|
|
37
|
+
] }) : /* @__PURE__ */ l(p, { ...r, as: c, variant: s, color: m, className: f(a.button, t), children: [
|
|
38
|
+
/* @__PURE__ */ o(d, { children: i }),
|
|
39
|
+
/* @__PURE__ */ o(
|
|
40
|
+
I,
|
|
41
|
+
{
|
|
42
|
+
className: a.loginIcon,
|
|
43
|
+
icon: /* @__PURE__ */ o(x, { className: a.icon, "aria-label": "Login Icon" })
|
|
44
|
+
}
|
|
45
|
+
),
|
|
46
|
+
n && /* @__PURE__ */ o(_, { ...n, className: a.badge })
|
|
47
|
+
] });
|
|
48
|
+
export {
|
|
49
|
+
D as GlobalMenuButton
|
|
50
|
+
};
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { CurrentAccount as t } from "./CurrentAccount.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
2
|
+
import { BackButton as n } from "./BackButton.js";
|
|
3
|
+
import { LogoutButton as f } from "./LogoutButton.js";
|
|
4
|
+
import { EndUserLabel as p } from "./EndUserLabel.js";
|
|
5
|
+
import { GlobalMenu as l } from "./GlobalMenu.js";
|
|
6
|
+
import { GlobalMenuButton as B } from "./GlobalMenuButton.js";
|
|
6
7
|
export {
|
|
7
|
-
|
|
8
|
+
n as BackButton,
|
|
8
9
|
t as CurrentAccount,
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
p as EndUserLabel,
|
|
11
|
+
l as GlobalMenu,
|
|
12
|
+
B as GlobalMenuButton,
|
|
13
|
+
f as LogoutButton
|
|
12
14
|
};
|
|
@@ -1,63 +1,58 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs as s, jsx as o } from "react/jsx-runtime";
|
|
3
|
-
import { DropdownBase as
|
|
3
|
+
import { DropdownBase as c } from "../Dropdown/DropdownBase.js";
|
|
4
4
|
import "../../index-L8X2o7IH.js";
|
|
5
|
-
import { DrawerBase as
|
|
5
|
+
import { DrawerBase as p } from "../Dropdown/DrawerBase.js";
|
|
6
6
|
import "react";
|
|
7
7
|
import { useRootContext as C } from "../RootProvider/RootProvider.js";
|
|
8
|
-
import { GlobalMenu as
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import { LocaleButton as
|
|
8
|
+
import { GlobalMenu as m } from "../GlobalMenu/GlobalMenu.js";
|
|
9
|
+
import { GlobalMenuButton as b } from "../GlobalMenu/GlobalMenuButton.js";
|
|
10
|
+
import { HeaderBase as N } from "./HeaderBase.js";
|
|
11
|
+
import { HeaderLogo as j } from "./HeaderLogo.js";
|
|
12
|
+
import { LocaleButton as y } from "./LocaleButton.js";
|
|
13
13
|
import { LocaleSwitcher as h } from "./LocaleSwitcher.js";
|
|
14
|
-
import { Searchbar as
|
|
14
|
+
import { Searchbar as B } from "../Searchbar/Searchbar.js";
|
|
15
15
|
import "../Searchbar/AutocompleteBase.js";
|
|
16
16
|
import "../Snackbar/useSnackbar.js";
|
|
17
|
-
import { HeaderGroup as
|
|
17
|
+
import { HeaderGroup as H } from "./HeaderGroup.js";
|
|
18
18
|
import { HeaderSearch as L } from "./HeaderSearch.js";
|
|
19
19
|
import '../../assets/Header.css';const S = "_drawer_1vzjh_1", k = "_dropdown_1vzjh_5", z = "_relative_1vzjh_19", a = {
|
|
20
20
|
drawer: S,
|
|
21
21
|
dropdown: k,
|
|
22
22
|
relative: z
|
|
23
23
|
}, X = ({ menu: r, locale: l, search: i, currentAccount: t, logo: f = {}, badge: w }) => {
|
|
24
|
-
const { currentId: e, toggleId: n, openId: g, closeAll: d } = C(),
|
|
24
|
+
const { currentId: e, toggleId: n, openId: g, closeAll: d } = C(), u = () => {
|
|
25
25
|
g("search");
|
|
26
|
-
},
|
|
26
|
+
}, v = () => {
|
|
27
27
|
n("search");
|
|
28
|
-
},
|
|
28
|
+
}, _ = () => {
|
|
29
29
|
n("menu");
|
|
30
|
-
},
|
|
30
|
+
}, x = () => {
|
|
31
31
|
n("locale");
|
|
32
32
|
};
|
|
33
33
|
return /* @__PURE__ */ s(
|
|
34
|
-
|
|
34
|
+
N,
|
|
35
35
|
{
|
|
36
36
|
currentId: e,
|
|
37
37
|
open: e === "search" || e === "menu" || e === "locale",
|
|
38
38
|
onClose: d,
|
|
39
39
|
children: [
|
|
40
|
-
/* @__PURE__ */ o(
|
|
41
|
-
/* @__PURE__ */ s(
|
|
42
|
-
l && /* @__PURE__ */ o("div", { className: a.relative, children: /* @__PURE__ */ o(
|
|
40
|
+
/* @__PURE__ */ o(j, { ...f, className: a.logo }),
|
|
41
|
+
/* @__PURE__ */ s(H, { children: [
|
|
42
|
+
l && /* @__PURE__ */ o("div", { className: a.relative, children: /* @__PURE__ */ o(y, { onClick: x, expanded: e === "locale" }) }),
|
|
43
43
|
/* @__PURE__ */ s("div", { className: a.relative, children: [
|
|
44
44
|
/* @__PURE__ */ o(
|
|
45
45
|
b,
|
|
46
46
|
{
|
|
47
|
-
color: "company",
|
|
48
|
-
variant: "solid",
|
|
49
47
|
badge: w,
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
name: t.name
|
|
53
|
-
},
|
|
54
|
-
onClick: x,
|
|
48
|
+
currentAccount: t,
|
|
49
|
+
onClick: _,
|
|
55
50
|
expanded: e === "menu",
|
|
56
51
|
label: r == null ? void 0 : r.menuLabel
|
|
57
52
|
}
|
|
58
53
|
),
|
|
59
54
|
l && /* @__PURE__ */ o(
|
|
60
|
-
|
|
55
|
+
c,
|
|
61
56
|
{
|
|
62
57
|
layout: "desktop",
|
|
63
58
|
padding: !0,
|
|
@@ -68,21 +63,21 @@ import '../../assets/Header.css';const S = "_drawer_1vzjh_1", k = "_dropdown_1vz
|
|
|
68
63
|
}
|
|
69
64
|
),
|
|
70
65
|
r && /* @__PURE__ */ o(
|
|
71
|
-
|
|
66
|
+
c,
|
|
72
67
|
{
|
|
73
68
|
layout: "desktop",
|
|
74
69
|
padding: !0,
|
|
75
70
|
placement: "right",
|
|
76
71
|
open: e === "menu",
|
|
77
72
|
className: a.dropdown,
|
|
78
|
-
children: /* @__PURE__ */ o(
|
|
73
|
+
children: /* @__PURE__ */ o(m, { ...r, currentAccount: t, onClose: d })
|
|
79
74
|
}
|
|
80
75
|
)
|
|
81
76
|
] })
|
|
82
77
|
] }),
|
|
83
|
-
i && /* @__PURE__ */ o(L, { expanded: e === "search", children: /* @__PURE__ */ o(
|
|
84
|
-
l && /* @__PURE__ */ o(
|
|
85
|
-
r && /* @__PURE__ */ o(
|
|
78
|
+
i && /* @__PURE__ */ o(L, { expanded: e === "search", children: /* @__PURE__ */ o(B, { ...i, expanded: e === "search", onClose: v, onFocus: u }) }),
|
|
79
|
+
l && /* @__PURE__ */ o(p, { layout: "mobile", open: e === "locale", className: a.drawer, children: /* @__PURE__ */ o(h, { ...l }) }),
|
|
80
|
+
r && /* @__PURE__ */ o(p, { layout: "mobile", open: e === "menu", className: a.drawer, children: /* @__PURE__ */ o(m, { ...r, currentAccount: t, onClose: d }) })
|
|
86
81
|
]
|
|
87
82
|
}
|
|
88
83
|
);
|