@altinn/altinn-components 0.52.7 → 0.53.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/dist/assets/Button.css +1 -1
- package/dist/assets/ButtonGroup.css +1 -1
- package/dist/assets/ButtonGroupDivider.css +1 -1
- package/dist/assets/ButtonLabel.css +1 -1
- package/dist/assets/DatepickerTable.css +1 -1
- package/dist/assets/IconButton.css +1 -0
- package/dist/assets/LocaleButton.css +1 -1
- package/dist/assets/ModalBody.css +1 -1
- package/dist/assets/ModalHeader.css +1 -1
- package/dist/assets/SearchField.css +1 -1
- package/dist/button-BB5sYVKY.js +38 -0
- package/dist/components/AccessAreaListItem/AccessAreaListItem.js +7 -6
- package/dist/components/AccessPackageListItem/AccessPackageListItem.js +3 -2
- package/dist/components/Account/AccountList.js +3 -2
- package/dist/components/Account/AccountListItem.js +6 -5
- package/dist/components/Account/AccountListItemControls.js +16 -16
- package/dist/components/Account/AccountListItemDetails.js +2 -2
- package/dist/components/Account/AccountListVirtual.js +9 -8
- package/dist/components/Account/AccountMenu.js +7 -6
- package/dist/components/Account/AccountMenuButton.js +30 -30
- package/dist/components/Account/AccountNotificationSettings.js +9 -8
- package/dist/components/Account/AccountOrganization.js +7 -6
- package/dist/components/ActivityLog/ActivityLogItem.js +3 -2
- package/dist/components/ActivityLog/ActivityLogSegment.js +3 -2
- package/dist/components/Article/Article.js +3 -2
- package/dist/components/Article/ArticleContact.js +3 -2
- package/dist/components/Article/ArticleHeader.js +3 -2
- package/dist/components/Attachment/AttachmentLink.js +24 -23
- package/dist/components/Banner/Banner.js +10 -19
- package/dist/components/Button/Button.js +22 -58
- package/dist/components/Button/ButtonGroup.js +11 -21
- package/dist/components/Button/ButtonGroupDivider.js +5 -4
- package/dist/components/Button/ButtonIcon.js +5 -4
- package/dist/components/Button/ButtonLabel.js +2 -2
- package/dist/components/Button/ComboButton.js +11 -68
- package/dist/components/Button/FloatingActionButton.js +13 -18
- package/dist/components/Button/IconButton.js +6 -33
- package/dist/components/Button/index.js +16 -16
- package/dist/components/Byline/Byline.js +7 -6
- package/dist/components/ContextMenu/ContextMenu.js +35 -35
- package/dist/components/Dashboard/DashboardCard.js +3 -2
- package/dist/components/Dashboard/DashboardHeader.js +10 -9
- package/dist/components/Dashboard/DashboardIcon.js +3 -2
- package/dist/components/Datepicker/DatepickerHeader.js +22 -22
- package/dist/components/Datepicker/DatepickerTable.js +14 -14
- package/dist/components/Dialog/Dialog.js +3 -2
- package/dist/components/Dialog/DialogActions.js +36 -44
- package/dist/components/Dialog/DialogActivityLog.js +3 -2
- package/dist/components/Dialog/DialogAttachments.js +3 -2
- package/dist/components/Dialog/DialogBody.js +3 -2
- package/dist/components/Dialog/DialogByline.js +3 -2
- package/dist/components/Dialog/DialogContact.js +3 -2
- package/dist/components/Dialog/DialogHeader.js +7 -6
- package/dist/components/Dialog/DialogHistoryItem.js +3 -2
- package/dist/components/Dialog/DialogHistorySegment.js +3 -2
- package/dist/components/Dialog/DialogLayout.js +3 -2
- package/dist/components/Dialog/DialogList.js +5 -4
- package/dist/components/Dialog/DialogListGroup.js +3 -2
- package/dist/components/Dialog/DialogListItem.js +3 -2
- package/dist/components/Dialog/DialogMetadata.js +3 -2
- package/dist/components/Dialog/DialogSection.js +3 -2
- package/dist/components/Dialog/DialogSeenBy.js +3 -2
- package/dist/components/Dialog/DialogSelect.js +5 -4
- package/dist/components/Dialog/DialogStatus.js +3 -2
- package/dist/components/Dialog/DialogTabs.js +3 -2
- package/dist/components/Dialog/SeenByLog.js +9 -8
- package/dist/components/Dialog/SeenByLogButton.js +3 -2
- package/dist/components/Dialog/SeenByLogItem.js +11 -10
- package/dist/components/Dropdown/DrawerButton.js +3 -3
- package/dist/components/Dropdown/DrawerHeader.js +8 -18
- package/dist/components/Dropdown/DrawerOrDropdown.js +7 -6
- package/dist/components/Dropdown/DropdownBase.js +7 -6
- package/dist/components/Dropdown/FloatingDropdown.js +36 -36
- package/dist/components/DsComponents/index.js +15 -16
- package/dist/components/Forms/Checkbox.js +3 -2
- package/dist/components/Forms/CheckboxOptions.js +3 -2
- package/dist/components/Forms/FieldBase.js +3 -2
- package/dist/components/Forms/FieldsetBase.js +3 -2
- package/dist/components/Forms/Radio.js +3 -2
- package/dist/components/Forms/RadioOptions.js +3 -2
- package/dist/components/Forms/SearchField.js +22 -23
- package/dist/components/Forms/SelectField.js +4 -3
- package/dist/components/Forms/Switch.js +3 -2
- package/dist/components/Forms/SwitchOptions.js +3 -2
- package/dist/components/Forms/TextField.js +3 -2
- package/dist/components/Forms/TextareaField.js +3 -2
- package/dist/components/GlobalHeader/AccountSelector.js +2 -2
- package/dist/components/GlobalHeader/GlobalHeader.js +3 -2
- package/dist/components/GlobalHeader/GlobalHeaderBase.js +6 -5
- package/dist/components/GlobalHeader/GlobalSearch.js +7 -6
- package/dist/components/GlobalHeader/GlobalSearchButton.js +8 -7
- package/dist/components/GlobalHeader/HeaderLogo.js +13 -16
- package/dist/components/GlobalMenu/BackButton.js +3 -2
- package/dist/components/GlobalMenu/GlobalMenu.js +9 -8
- package/dist/components/GlobalMenu/GlobalMenuButton.js +2 -2
- package/dist/components/GlobalMenu/LocaleButton.js +3 -2
- package/dist/components/GlobalMenu/LocaleSwitcher.js +3 -2
- package/dist/components/GlobalMenu/LogoutButton.js +6 -8
- package/dist/components/GlobalMenu_old/BackButton.js +3 -2
- package/dist/components/GlobalMenu_old/CurrentAccount.js +5 -4
- package/dist/components/GlobalMenu_old/GlobalMenu.js +11 -10
- package/dist/components/GlobalMenu_old/GlobalMenuButton.js +23 -23
- package/dist/components/GlobalMenu_old/LogoutButton.js +6 -8
- package/dist/components/Header/Header.js +3 -2
- package/dist/components/Header/HeaderBase.js +5 -4
- package/dist/components/Header/HeaderButton.js +22 -22
- package/dist/components/Header/HeaderLogo.js +13 -17
- package/dist/components/Header/LocaleButton.js +17 -17
- package/dist/components/Header/LocaleSwitcher.js +8 -7
- package/dist/components/Icon/Icon.js +12 -11
- package/dist/components/Icon/IconOrAvatar.js +15 -14
- package/dist/components/InboxSearch/InboxSearch.js +11 -10
- package/dist/components/Layout/Layout.js +11 -10
- package/dist/components/LayoutAction/ActionHeader.js +18 -18
- package/dist/components/LayoutAction/LayoutAction.js +3 -2
- package/dist/components/List/List.js +3 -2
- package/dist/components/List/ListBase.js +3 -2
- package/dist/components/List/ListItemHeader.js +5 -4
- package/dist/components/List/ListItemIcon.js +3 -2
- package/dist/components/List/ListItemLabel.js +16 -15
- package/dist/components/List/ListItemSelect.js +4 -3
- package/dist/components/Menu/MenuItem.js +15 -14
- package/dist/components/Menu/MenuItemBase.js +5 -5
- package/dist/components/Menu/MenuItemIcon.js +6 -5
- package/dist/components/Menu/MenuItemLabel.js +13 -12
- package/dist/components/Menu/MenuItems.js +1 -0
- package/dist/components/Menu/MenuItemsVirtual.js +26 -25
- package/dist/components/Menu/MenuOption.js +17 -16
- package/dist/components/Menu/MenuSearch.js +3 -2
- package/dist/components/Metadata/MetaItem.js +7 -6
- package/dist/components/Metadata/MetaItemIcon.js +3 -2
- package/dist/components/Metadata/MetaProgress.js +3 -2
- package/dist/components/Metadata/MetaTimestamp.js +7 -6
- package/dist/components/Metadata/Metadata.js +8 -7
- package/dist/components/Modal/Modal.js +13 -13
- package/dist/components/Modal/ModalBase.js +7 -6
- package/dist/components/Modal/ModalBody.js +5 -10
- package/dist/components/Modal/ModalFooter.js +3 -2
- package/dist/components/Modal/ModalHeader.js +26 -36
- package/dist/components/Modal/ModalIcon.js +7 -6
- package/dist/components/Notifications/NotificationItem.js +6 -5
- package/dist/components/Notifications/NotificationItemBase.js +10 -9
- package/dist/components/Notifications/NotificationItemControls.js +14 -24
- package/dist/components/Notifications/NotificationItemIcon.js +8 -7
- package/dist/components/Page/AccordionSection.js +3 -2
- package/dist/components/Page/Breadcrumbs.js +7 -6
- package/dist/components/Page/ContactButtons.js +11 -6
- package/dist/components/Page/ContactSection.js +3 -2
- package/dist/components/Page/PageMenu.js +6 -5
- package/dist/components/Page/PageNav.js +11 -8
- package/dist/components/Page/PageTabs.js +6 -5
- package/dist/components/Page/Section.js +27 -7
- package/dist/components/ResourceListItem/ResourceListItem.js +3 -2
- package/dist/components/RootProvider/RootProvider.js +9 -8
- package/dist/components/Search/SearchItem.js +5 -4
- package/dist/components/Searchbar/Autocomplete.js +3 -2
- package/dist/components/Searchbar/AutocompleteItem.js +11 -10
- package/dist/components/Searchbar/Searchbar.js +10 -9
- package/dist/components/Searchbar/SearchbarField.js +54 -53
- package/dist/components/Settings/BookmarksSettingsList.js +7 -6
- package/dist/components/Settings/SettingsItem.js +3 -2
- package/dist/components/Settings/SettingsItemBase.js +7 -6
- package/dist/components/Settings/SettingsList.js +7 -6
- package/dist/components/Settings/SettingsModal.js +33 -26
- package/dist/components/Settings/SettingsSection.js +3 -2
- package/dist/components/Settings/UsedByLog.js +8 -7
- package/dist/components/Settings/UsedByLogItem.js +10 -9
- package/dist/components/Snackbar/SnackbarItem.js +13 -22
- package/dist/components/Timeline/Timeline.js +3 -2
- package/dist/components/Timeline/TimelineActivity.js +3 -2
- package/dist/components/Timeline/TimelineBase.js +10 -9
- package/dist/components/Timeline/TimelineFooter.js +6 -5
- package/dist/components/Timeline/TimelineHeader.js +3 -2
- package/dist/components/Timeline/TimelineIcon.js +6 -5
- package/dist/components/Timeline/TimelineSection.js +3 -2
- package/dist/components/Timeline/TimelineSegment.js +6 -5
- package/dist/components/Timeline/index.js +2 -4
- package/dist/components/Toolbar/ToolbarAccountMenu.js +18 -17
- package/dist/components/Toolbar/ToolbarAdd.js +5 -4
- package/dist/components/Toolbar/ToolbarButton.js +94 -88
- package/dist/components/Toolbar/ToolbarDaterange.js +3 -2
- package/dist/components/Toolbar/ToolbarFilter.js +24 -23
- package/dist/components/Toolbar/ToolbarFilterBase.js +8 -8
- package/dist/components/Toolbar/ToolbarMenu.js +3 -2
- package/dist/components/Toolbar/ToolbarOptions.js +3 -2
- package/dist/components/Toolbar/ToolbarSearch.js +7 -6
- package/dist/components/Transmission/Transmission.js +8 -7
- package/dist/components/Transmission/TransmissionList.js +8 -7
- package/dist/components/Transmission/TransmissionType.js +3 -2
- package/dist/components/Typography/Heading.js +3 -2
- package/dist/components/UserListItem/UserListItem.js +12 -11
- package/dist/components/index.js +192 -195
- package/dist/hooks/useAccountSelector.js +46 -46
- package/dist/{index-Dg71_7ad.js → index-DttADHE1.js} +1 -1
- package/dist/index.js +204 -207
- package/dist/{textfield-B_OMMEbF.js → textfield-C_c2H05R.js} +25 -26
- package/dist/types/lib/components/Account/AccountListItemDetails.d.ts +5 -1
- package/dist/types/lib/components/Button/Button.d.ts +21 -10
- package/dist/types/lib/components/Button/Button.stories.d.ts +13 -10
- package/dist/types/lib/components/Button/ButtonGroup.d.ts +6 -6
- package/dist/types/lib/components/Button/ButtonGroup.stories.d.ts +3 -1
- package/dist/types/lib/components/Button/ButtonGroupDivider.d.ts +5 -1
- package/dist/types/lib/components/Button/ButtonIcon.d.ts +2 -1
- package/dist/types/lib/components/Button/ButtonLabel.d.ts +1 -1
- package/dist/types/lib/components/Button/ComboButton.d.ts +6 -15
- package/dist/types/lib/components/Button/ComboButton.stories.d.ts +0 -3
- package/dist/types/lib/components/Button/FloatingActionButton.d.ts +5 -12
- package/dist/types/lib/components/Button/IconButton.d.ts +4 -17
- package/dist/types/lib/components/Button/index.d.ts +4 -4
- package/dist/types/lib/components/Datepicker/Datepicker.stories.d.ts +6 -0
- package/dist/types/lib/components/Dialog/DialogActions.d.ts +1 -0
- package/dist/types/lib/components/Dropdown/FloatingDropdown.d.ts +2 -2
- package/dist/types/lib/components/GlobalHeader/HeaderLogo.d.ts +1 -2
- package/dist/types/lib/components/Header/HeaderButton.d.ts +0 -2
- package/dist/types/lib/components/Header/HeaderLogo.d.ts +1 -1
- package/dist/types/lib/components/Menu/MenuItem.d.ts +1 -1
- package/dist/types/lib/components/Menu/MenuItemBase.d.ts +2 -2
- package/dist/types/lib/components/Modal/ModalBody.d.ts +2 -3
- package/dist/types/lib/components/Page/ContactButtons.d.ts +1 -0
- package/dist/types/lib/components/Page/Section.d.ts +1 -1
- package/dist/types/lib/components/Settings/SettingsModal.d.ts +1 -0
- package/dist/types/lib/components/Settings/VerifySettingsModal.stories.d.ts +14 -0
- package/dist/types/lib/components/Timeline/index.d.ts +0 -1
- package/dist/types/lib/components/Toolbar/ToolbarButton.d.ts +2 -3
- package/dist/types/lib/components/Toolbar/ToolbarButton.stories.d.ts +1 -1
- package/dist/types/lib/components/Toolbar/ToolbarFilterBase.d.ts +2 -2
- package/package.json +1 -1
- package/dist/assets/ButtonBase.css +0 -1
- package/dist/assets/ComboButton.css +0 -1
- package/dist/assets/TimelineLink.css +0 -1
- package/dist/button-MzZgmHyA.js +0 -23
- package/dist/components/Button/ButtonBase.js +0 -41
- package/dist/components/Timeline/TimelineLink.js +0 -36
- package/dist/spinner-0Qe_jRGB.js +0 -23
- package/dist/types/lib/components/Button/ButtonBase.d.ts +0 -26
- package/dist/types/lib/components/Button/IconButton.stories.d.ts +0 -7
- package/dist/types/lib/components/Timeline/TimelineLink.d.ts +0 -9
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
3
|
-
import { ButtonLabel as s } from "../Button/ButtonLabel.js";
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { Button as i } from "../Button/Button.js";
|
|
4
3
|
import "../../index-p1eeF8LQ.js";
|
|
5
4
|
import "react";
|
|
6
5
|
import "../RootProvider/RootProvider.js";
|
|
7
6
|
import "../Snackbar/useSnackbar.js";
|
|
8
|
-
import '../../assets/LogoutButton.css';const
|
|
9
|
-
button:
|
|
10
|
-
|
|
11
|
-
}, B = ({ label: l = "Logout", children: e, onClick: n }) => /* @__PURE__ */ t(r, { className: o.button, variant: "outline", size: "lg", onClick: n, children: /* @__PURE__ */ t(s, { className: o.label, size: "lg", children: e || l }) });
|
|
7
|
+
import '../../assets/LogoutButton.css';const s = "_button_1260s_1", u = {
|
|
8
|
+
button: s
|
|
9
|
+
}, b = ({ label: t = "Logout", children: o, onClick: n }) => /* @__PURE__ */ r(i, { className: u.button, variant: "outline", size: "lg", onClick: n, children: o || t });
|
|
12
10
|
export {
|
|
13
|
-
|
|
11
|
+
b as LogoutButton
|
|
14
12
|
};
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { jsx as m } from "react/jsx-runtime";
|
|
2
2
|
import "../../index-p1eeF8LQ.js";
|
|
3
3
|
import "react";
|
|
4
|
+
import "../Button/Button.js";
|
|
4
5
|
import "../RootProvider/RootProvider.js";
|
|
5
6
|
import "../Snackbar/useSnackbar.js";
|
|
6
7
|
import { MenuItem as i } from "../Menu/MenuItem.js";
|
|
7
8
|
import { S as p } from "../../ArrowUndo-hge1gMu8.js";
|
|
8
|
-
const
|
|
9
|
+
const k = ({ label: o, onClick: r, as: t }) => /* @__PURE__ */ m(i, { size: "sm", id: "back", icon: p, title: o, onClick: r, as: t });
|
|
9
10
|
export {
|
|
10
|
-
|
|
11
|
+
k as BackButton
|
|
11
12
|
};
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import "../../index-p1eeF8LQ.js";
|
|
3
3
|
import "react";
|
|
4
|
+
import "../Button/Button.js";
|
|
4
5
|
import "../RootProvider/RootProvider.js";
|
|
5
6
|
import { MenuItem as m } from "../Menu/MenuItem.js";
|
|
6
7
|
import "../Snackbar/useSnackbar.js";
|
|
7
|
-
const
|
|
8
|
+
const g = ({ account: i, multipleAccounts: r, as: t, onClick: e }) => /* @__PURE__ */ o(
|
|
8
9
|
m,
|
|
9
10
|
{
|
|
10
11
|
id: "account",
|
|
11
12
|
size: "lg",
|
|
12
13
|
interactive: !!r,
|
|
13
|
-
as: r ?
|
|
14
|
-
onClick:
|
|
14
|
+
as: r ? t : "div",
|
|
15
|
+
onClick: e,
|
|
15
16
|
linkIcon: r,
|
|
16
17
|
icon: i?.icon,
|
|
17
18
|
title: { children: i?.name, size: "sm", weight: "medium" },
|
|
@@ -19,5 +20,5 @@ const f = ({ account: i, multipleAccounts: r, as: e, onClick: t }) => /* @__PURE
|
|
|
19
20
|
}
|
|
20
21
|
);
|
|
21
22
|
export {
|
|
22
|
-
|
|
23
|
+
g as CurrentAccount
|
|
23
24
|
};
|
|
@@ -3,6 +3,7 @@ import { jsxs as c, jsx as r, Fragment as C } from "react/jsx-runtime";
|
|
|
3
3
|
import { useState as G, useMemo as S } from "react";
|
|
4
4
|
import "../../index-p1eeF8LQ.js";
|
|
5
5
|
import { AccountMenu as x } from "../Account/AccountMenu.js";
|
|
6
|
+
import "../Button/Button.js";
|
|
6
7
|
import "../RootProvider/RootProvider.js";
|
|
7
8
|
import { CurrentAccount as y } from "./CurrentAccount.js";
|
|
8
9
|
import { BackButton as j } from "./BackButton.js";
|
|
@@ -11,7 +12,7 @@ import { MenuListItem as h } from "../Menu/MenuBase.js";
|
|
|
11
12
|
import { Menu as k } from "../Menu/Menu.js";
|
|
12
13
|
import "../Snackbar/useSnackbar.js";
|
|
13
14
|
import { GlobalMenuBase as a, GlobalMenuHeader as B, GlobalMenuFooter as b } from "./GlobalMenuBase.js";
|
|
14
|
-
const
|
|
15
|
+
const L = ({
|
|
15
16
|
accountMenu: t,
|
|
16
17
|
menu: i,
|
|
17
18
|
backLabel: g = "Back",
|
|
@@ -19,12 +20,12 @@ const K = ({
|
|
|
19
20
|
onSelectAccount: A,
|
|
20
21
|
onClose: l,
|
|
21
22
|
logoutButton: s,
|
|
22
|
-
ariaLabel:
|
|
23
|
+
ariaLabel: m = "Menu"
|
|
23
24
|
}) => {
|
|
24
|
-
const [M, v] = G(!1),
|
|
25
|
+
const [M, v] = G(!1), n = () => {
|
|
25
26
|
v((o) => !o);
|
|
26
27
|
}, u = (o) => {
|
|
27
|
-
|
|
28
|
+
n(), l?.(), A?.(o);
|
|
28
29
|
}, p = S(() => (i?.items ?? []).map((o) => ({
|
|
29
30
|
...o,
|
|
30
31
|
onClick: () => {
|
|
@@ -38,14 +39,14 @@ const K = ({
|
|
|
38
39
|
})) : void 0
|
|
39
40
|
})), [i, l]);
|
|
40
41
|
if (M)
|
|
41
|
-
return /* @__PURE__ */ c(a, { "aria-label":
|
|
42
|
-
/* @__PURE__ */ r(B, { children: /* @__PURE__ */ r(j, { onClick:
|
|
42
|
+
return /* @__PURE__ */ c(a, { "aria-label": m, children: [
|
|
43
|
+
/* @__PURE__ */ r(B, { children: /* @__PURE__ */ r(j, { onClick: n, label: g }) }),
|
|
43
44
|
/* @__PURE__ */ r(h, { as: "div", role: "separator" }),
|
|
44
45
|
t && /* @__PURE__ */ r(x, { ...t, currentAccount: e, onSelectAccount: u })
|
|
45
46
|
] });
|
|
46
47
|
if (e) {
|
|
47
48
|
const o = t && t?.items?.length > 1;
|
|
48
|
-
return /* @__PURE__ */ c(a, { "aria-label":
|
|
49
|
+
return /* @__PURE__ */ c(a, { "aria-label": m, color: e?.type, children: [
|
|
49
50
|
e && /* @__PURE__ */ c(C, { children: [
|
|
50
51
|
/* @__PURE__ */ r(
|
|
51
52
|
y,
|
|
@@ -53,7 +54,7 @@ const K = ({
|
|
|
53
54
|
account: e,
|
|
54
55
|
multipleAccounts: o,
|
|
55
56
|
as: o ? "button" : "div",
|
|
56
|
-
onClick: o ?
|
|
57
|
+
onClick: o ? n : void 0
|
|
57
58
|
}
|
|
58
59
|
),
|
|
59
60
|
/* @__PURE__ */ r(h, { as: "div", role: "separator" })
|
|
@@ -62,11 +63,11 @@ const K = ({
|
|
|
62
63
|
s && /* @__PURE__ */ r(b, { children: /* @__PURE__ */ r(f, { ...s }) })
|
|
63
64
|
] });
|
|
64
65
|
}
|
|
65
|
-
return /* @__PURE__ */ c(a, { "aria-label":
|
|
66
|
+
return /* @__PURE__ */ c(a, { "aria-label": m, children: [
|
|
66
67
|
i && /* @__PURE__ */ r(k, { ...i, items: p }),
|
|
67
68
|
s && /* @__PURE__ */ r(b, { children: /* @__PURE__ */ r(f, { ...s }) })
|
|
68
69
|
] });
|
|
69
70
|
};
|
|
70
71
|
export {
|
|
71
|
-
|
|
72
|
+
L as GlobalMenu_old
|
|
72
73
|
};
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as e, jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import { c as l } from "../../index-p1eeF8LQ.js";
|
|
3
3
|
import { Badge as _ } from "../Badge/Badge.js";
|
|
4
4
|
import "react";
|
|
5
5
|
import { Avatar as f } from "../Avatar/Avatar.js";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
6
|
+
import { Button as u } from "../Button/Button.js";
|
|
7
|
+
import { ButtonIcon as I } from "../Button/ButtonIcon.js";
|
|
8
|
+
import { ButtonLabel as h } from "../Button/ButtonLabel.js";
|
|
9
9
|
import "../RootProvider/RootProvider.js";
|
|
10
10
|
import "../Snackbar/useSnackbar.js";
|
|
11
11
|
import { S as N } from "../../XMark-tKk6aExO.js";
|
|
12
12
|
import { S as g } from "../../PadlockLocked-XL1IB5Ae.js";
|
|
13
|
-
import '../../assets/GlobalMenuButton.css';const v = "_button_1uh95_1", b = "_avatarIcon_1uh95_19", B = "_loginIcon_1uh95_20", x = "_closeIcon_1uh95_21", S = "_avatar_1uh95_19", k = "_icon_1uh95_44", L = "_badge_1uh95_50",
|
|
13
|
+
import '../../assets/GlobalMenuButton.css';const v = "_button_1uh95_1", b = "_avatarIcon_1uh95_19", B = "_loginIcon_1uh95_20", x = "_closeIcon_1uh95_21", S = "_avatar_1uh95_19", k = "_icon_1uh95_44", L = "_badge_1uh95_50", n = {
|
|
14
14
|
button: v,
|
|
15
15
|
avatarIcon: b,
|
|
16
16
|
loginIcon: B,
|
|
@@ -26,32 +26,32 @@ import '../../assets/GlobalMenuButton.css';const v = "_button_1uh95_1", b = "_av
|
|
|
26
26
|
currentAccount: d,
|
|
27
27
|
expanded: p,
|
|
28
28
|
label: i = "Menu",
|
|
29
|
-
badge:
|
|
30
|
-
...
|
|
31
|
-
}) => p ? /* @__PURE__ */
|
|
32
|
-
/* @__PURE__ */ o(
|
|
33
|
-
/* @__PURE__ */ o(
|
|
34
|
-
|
|
35
|
-
] }) : d ? /* @__PURE__ */
|
|
36
|
-
/* @__PURE__ */ o(
|
|
29
|
+
badge: a,
|
|
30
|
+
...m
|
|
31
|
+
}) => p ? /* @__PURE__ */ e(u, { ...m, as: t, variant: r, color: s, className: l(n.button, c), children: [
|
|
32
|
+
/* @__PURE__ */ o(h, { children: i }),
|
|
33
|
+
/* @__PURE__ */ o(I, { className: n.closeIcon, icon: /* @__PURE__ */ o(N, { className: n.icon, "aria-label": "Close Icon" }) }),
|
|
34
|
+
a && /* @__PURE__ */ o(_, { ...a, className: n.badge })
|
|
35
|
+
] }) : d ? /* @__PURE__ */ e(u, { ...m, as: t, variant: r, color: s, className: l(n.button, c), children: [
|
|
36
|
+
/* @__PURE__ */ o(h, { children: i }),
|
|
37
37
|
/* @__PURE__ */ o(
|
|
38
|
-
|
|
38
|
+
I,
|
|
39
39
|
{
|
|
40
|
-
className:
|
|
41
|
-
icon: /* @__PURE__ */ o(f, { ...d?.icon, className:
|
|
40
|
+
className: n.avatarIcon,
|
|
41
|
+
icon: /* @__PURE__ */ o(f, { ...d?.icon, className: n.avatar })
|
|
42
42
|
}
|
|
43
43
|
),
|
|
44
|
-
|
|
45
|
-
] }) : /* @__PURE__ */
|
|
46
|
-
/* @__PURE__ */ o(
|
|
44
|
+
a && /* @__PURE__ */ o(_, { ...a, className: n.badge })
|
|
45
|
+
] }) : /* @__PURE__ */ e(u, { ...m, as: t, variant: r, color: s, className: l(n.button, c), children: [
|
|
46
|
+
/* @__PURE__ */ o(h, { children: i }),
|
|
47
47
|
/* @__PURE__ */ o(
|
|
48
|
-
|
|
48
|
+
I,
|
|
49
49
|
{
|
|
50
|
-
className:
|
|
51
|
-
icon: /* @__PURE__ */ o(g, { className:
|
|
50
|
+
className: n.loginIcon,
|
|
51
|
+
icon: /* @__PURE__ */ o(g, { className: n.icon, "aria-label": "Login Icon" })
|
|
52
52
|
}
|
|
53
53
|
),
|
|
54
|
-
|
|
54
|
+
a && /* @__PURE__ */ o(_, { ...a, className: n.badge })
|
|
55
55
|
] });
|
|
56
56
|
export {
|
|
57
57
|
F as GlobalMenuButton_old
|
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
3
|
-
import { ButtonLabel as s } from "../Button/ButtonLabel.js";
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { Button as i } from "../Button/Button.js";
|
|
4
3
|
import "../../index-p1eeF8LQ.js";
|
|
5
4
|
import "react";
|
|
6
5
|
import "../RootProvider/RootProvider.js";
|
|
7
6
|
import "../Snackbar/useSnackbar.js";
|
|
8
|
-
import '../../assets/LogoutButton.css';const
|
|
9
|
-
button:
|
|
10
|
-
|
|
11
|
-
}, B = ({ label: l = "Logout", children: e, onClick: n }) => /* @__PURE__ */ t(r, { className: o.button, variant: "outline", size: "lg", onClick: n, children: /* @__PURE__ */ t(s, { className: o.label, size: "lg", children: e || l }) });
|
|
7
|
+
import '../../assets/LogoutButton.css';const s = "_button_1260s_1", u = {
|
|
8
|
+
button: s
|
|
9
|
+
}, b = ({ label: t = "Logout", children: o, onClick: n }) => /* @__PURE__ */ r(i, { className: u.button, variant: "outline", size: "lg", onClick: n, children: o || t });
|
|
12
10
|
export {
|
|
13
|
-
|
|
11
|
+
b as LogoutButton
|
|
14
12
|
};
|
|
@@ -3,6 +3,7 @@ import { jsxs as d, jsx as o } from "react/jsx-runtime";
|
|
|
3
3
|
import "../../index-p1eeF8LQ.js";
|
|
4
4
|
import "react";
|
|
5
5
|
import { useIsDesktop as H } from "../../hooks/useIsDesktop.js";
|
|
6
|
+
import "../Button/Button.js";
|
|
6
7
|
import { useRootContext as S } from "../RootProvider/RootProvider.js";
|
|
7
8
|
import { DropdownBase as k } from "../Dropdown/DropdownBase.js";
|
|
8
9
|
import { DrawerBase as B } from "../Dropdown/DrawerBase.js";
|
|
@@ -19,7 +20,7 @@ import '../../assets/Header.css';const N = "_drawer_afyu3_1", g = "_dropdown_afy
|
|
|
19
20
|
drawer: N,
|
|
20
21
|
dropdown: g,
|
|
21
22
|
relative: j
|
|
22
|
-
},
|
|
23
|
+
}, b = ({
|
|
23
24
|
globalMenu: r,
|
|
24
25
|
desktopMenu: w,
|
|
25
26
|
mobileMenu: _,
|
|
@@ -94,5 +95,5 @@ import '../../assets/Header.css';const N = "_drawer_afyu3_1", g = "_dropdown_afy
|
|
|
94
95
|
);
|
|
95
96
|
};
|
|
96
97
|
export {
|
|
97
|
-
|
|
98
|
+
b as Header
|
|
98
99
|
};
|
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as t, jsx as s } from "react/jsx-runtime";
|
|
2
2
|
import { c as p } from "../../index-p1eeF8LQ.js";
|
|
3
3
|
import "react";
|
|
4
|
+
import "../Button/Button.js";
|
|
4
5
|
import "../RootProvider/RootProvider.js";
|
|
5
6
|
import { Backdrop as m } from "../Dropdown/Backdrop.js";
|
|
6
7
|
import "../Snackbar/useSnackbar.js";
|
|
7
8
|
import '../../assets/HeaderBase.css';const i = "_header_dg4o1_1", n = "_backdrop_dg4o1_17", r = {
|
|
8
9
|
header: i,
|
|
9
10
|
backdrop: n
|
|
10
|
-
},
|
|
11
|
-
c && /* @__PURE__ */
|
|
11
|
+
}, g = ({ currentId: o, className: e, children: a, open: c, onClose: d }) => /* @__PURE__ */ t("header", { className: p(r.header, e), "data-current-id": o, children: [
|
|
12
|
+
c && /* @__PURE__ */ s(m, { className: r.backdrop, onClick: d }),
|
|
12
13
|
a
|
|
13
14
|
] });
|
|
14
15
|
export {
|
|
15
|
-
|
|
16
|
+
g as HeaderBase
|
|
16
17
|
};
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { jsxs as i, jsx as
|
|
1
|
+
import { jsxs as i, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { c } from "../../index-p1eeF8LQ.js";
|
|
3
3
|
import { Avatar as b } from "../Avatar/Avatar.js";
|
|
4
4
|
import { AvatarGroup as g } from "../Avatar/AvatarGroup.js";
|
|
5
5
|
import { Badge as p } from "../Badge/Badge.js";
|
|
6
|
-
import {
|
|
6
|
+
import { Button as _ } from "../Button/Button.js";
|
|
7
7
|
import "react";
|
|
8
8
|
import { Icon as f } from "../Icon/Icon.js";
|
|
9
9
|
import "../RootProvider/RootProvider.js";
|
|
10
10
|
import "../Snackbar/useSnackbar.js";
|
|
11
11
|
import { S as I } from "../../XMark-tKk6aExO.js";
|
|
12
12
|
import { S as q } from "../../PadlockLocked-XL1IB5Ae.js";
|
|
13
|
-
import '../../assets/HeaderButton.css';const y = "_button_1p2eq_1", S = "_label_1p2eq_12", v = "_icon_1p2eq_18", x = "_avatarGroup_1p2eq_28",
|
|
13
|
+
import '../../assets/HeaderButton.css';const y = "_button_1p2eq_1", S = "_label_1p2eq_12", v = "_icon_1p2eq_18", x = "_avatarGroup_1p2eq_28", G = "_loginIcon_1p2eq_37", k = "_closeIcon_1p2eq_42", B = "_badge_1p2eq_46", o = {
|
|
14
14
|
button: y,
|
|
15
15
|
label: S,
|
|
16
16
|
icon: v,
|
|
17
17
|
avatarGroup: x,
|
|
18
|
-
loginIcon:
|
|
19
|
-
closeIcon:
|
|
20
|
-
badge:
|
|
18
|
+
loginIcon: G,
|
|
19
|
+
closeIcon: k,
|
|
20
|
+
badge: B
|
|
21
21
|
}, J = ({
|
|
22
22
|
className: s,
|
|
23
23
|
as: t = "button",
|
|
@@ -30,22 +30,22 @@ import '../../assets/HeaderButton.css';const y = "_button_1p2eq_1", S = "_label_
|
|
|
30
30
|
label: r = "Menu",
|
|
31
31
|
badge: n,
|
|
32
32
|
...m
|
|
33
|
-
}) => h ? /* @__PURE__ */ i(_, { ...m, as: t, variant: l, color: a, className: c(
|
|
34
|
-
/* @__PURE__ */
|
|
35
|
-
/* @__PURE__ */
|
|
36
|
-
n && /* @__PURE__ */
|
|
37
|
-
] }) : d ? /* @__PURE__ */ i(_, { ...m, as: t, variant: l, color: a, className: c(
|
|
38
|
-
/* @__PURE__ */
|
|
39
|
-
/* @__PURE__ */
|
|
40
|
-
n && /* @__PURE__ */
|
|
41
|
-
] }) : u ? /* @__PURE__ */ i(_, { ...m, as: t, variant: l, color: a, className: c(
|
|
42
|
-
/* @__PURE__ */
|
|
43
|
-
/* @__PURE__ */
|
|
44
|
-
n && /* @__PURE__ */
|
|
45
|
-
] }) : /* @__PURE__ */ i(_, { ...m, as: t, variant: l, color: a, className: c(
|
|
46
|
-
/* @__PURE__ */
|
|
47
|
-
/* @__PURE__ */
|
|
48
|
-
n && /* @__PURE__ */
|
|
33
|
+
}) => h ? /* @__PURE__ */ i(_, { ...m, as: t, variant: l, color: a, className: c(o.button, s), children: [
|
|
34
|
+
/* @__PURE__ */ e("span", { className: o.label, children: r }),
|
|
35
|
+
/* @__PURE__ */ e("span", { className: c(o.icon, o.closeIcon), children: /* @__PURE__ */ e(f, { svgElement: I }) }),
|
|
36
|
+
n && /* @__PURE__ */ e(p, { ...n, className: o.badge })
|
|
37
|
+
] }) : d ? /* @__PURE__ */ i(_, { ...m, as: t, variant: l, color: a, className: c(o.button, s), children: [
|
|
38
|
+
/* @__PURE__ */ e("span", { className: o.label, children: r }),
|
|
39
|
+
/* @__PURE__ */ e(g, { ...d, className: o.avatarGroup }),
|
|
40
|
+
n && /* @__PURE__ */ e(p, { ...n, className: o.badge })
|
|
41
|
+
] }) : u ? /* @__PURE__ */ i(_, { ...m, as: t, variant: l, color: a, className: c(o.button, s), children: [
|
|
42
|
+
/* @__PURE__ */ e("span", { className: o.label, children: r }),
|
|
43
|
+
/* @__PURE__ */ e(b, { type: u?.type, name: u?.name, style: { fontSize: "2.25rem" } }),
|
|
44
|
+
n && /* @__PURE__ */ e(p, { ...n, className: o.badge })
|
|
45
|
+
] }) : /* @__PURE__ */ i(_, { ...m, as: t, variant: l, color: a, className: c(o.button, s), children: [
|
|
46
|
+
/* @__PURE__ */ e("span", { className: o.label, children: r }),
|
|
47
|
+
/* @__PURE__ */ e("span", { className: c(o.icon, o.loginIcon), children: /* @__PURE__ */ e(f, { svgElement: N }) }),
|
|
48
|
+
n && /* @__PURE__ */ e(p, { ...n, className: o.badge })
|
|
49
49
|
] });
|
|
50
50
|
export {
|
|
51
51
|
J as HeaderButton
|
|
@@ -1,21 +1,17 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { c
|
|
3
|
-
import { Badge as
|
|
4
|
-
import {
|
|
5
|
-
import "
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
text: d
|
|
13
|
-
}, j = ({ className: s, as: r = "a", title: e = "Altinn", href: l = "/", badge: m }) => /* @__PURE__ */ i(n, { as: r, className: a(t.logo, s), href: l, children: [
|
|
14
|
-
/* @__PURE__ */ o(p, { className: t.symbol }),
|
|
15
|
-
/* @__PURE__ */ o("span", { className: t.text, children: e }),
|
|
1
|
+
import { jsxs as a, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { c } from "../../index-p1eeF8LQ.js";
|
|
3
|
+
import { Badge as i } from "../Badge/Badge.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 }),
|
|
16
12
|
" ",
|
|
17
|
-
|
|
13
|
+
s && /* @__PURE__ */ o(i, { ...s })
|
|
18
14
|
] });
|
|
19
15
|
export {
|
|
20
|
-
|
|
16
|
+
h as HeaderLogo
|
|
21
17
|
};
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
3
|
-
import "../../index-p1eeF8LQ.js";
|
|
2
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
3
|
+
import { c as s } from "../../index-p1eeF8LQ.js";
|
|
4
4
|
import "react";
|
|
5
|
-
import {
|
|
5
|
+
import { Button as m } from "../Button/Button.js";
|
|
6
6
|
import "../RootProvider/RootProvider.js";
|
|
7
7
|
import "../Snackbar/useSnackbar.js";
|
|
8
|
-
import { S as
|
|
9
|
-
import '../../assets/LocaleButton.css';const
|
|
10
|
-
button:
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
import { S as i } from "../../Globe-BcPkcH4E.js";
|
|
9
|
+
import '../../assets/LocaleButton.css';const p = "_button_mvy87_1", c = "_expanded_mvy87_13", o = {
|
|
10
|
+
button: p,
|
|
11
|
+
expanded: c
|
|
12
|
+
}, f = ({ id: e = "language-switcher", expanded: n, onClick: r, onBlurCapture: a }) => /* @__PURE__ */ t(
|
|
13
|
+
m,
|
|
13
14
|
{
|
|
14
|
-
className:
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
onBlurCapture: n
|
|
15
|
+
className: s(o.button, n && o.expanded),
|
|
16
|
+
rounded: !0,
|
|
17
|
+
size: "lg",
|
|
18
|
+
variant: "ghost",
|
|
19
|
+
onClick: r,
|
|
20
|
+
"aria-label": `Open ${e}`,
|
|
21
|
+
onBlurCapture: a,
|
|
22
|
+
children: /* @__PURE__ */ t(i, {})
|
|
23
23
|
}
|
|
24
24
|
);
|
|
25
25
|
export {
|
|
@@ -6,13 +6,14 @@ import { useIsDesktop as b } from "../../hooks/useIsDesktop.js";
|
|
|
6
6
|
import { DropdownBase as x } from "../Dropdown/DropdownBase.js";
|
|
7
7
|
import "../../index-p1eeF8LQ.js";
|
|
8
8
|
import { DrawerBase as I } from "../Dropdown/DrawerBase.js";
|
|
9
|
+
import "../Button/Button.js";
|
|
9
10
|
import { useRootContext as S } from "../RootProvider/RootProvider.js";
|
|
10
11
|
import { MenuItems as p } from "../Menu/MenuItems.js";
|
|
11
12
|
import { LocaleButton as w } from "./LocaleButton.js";
|
|
12
13
|
import "../Snackbar/useSnackbar.js";
|
|
13
14
|
import { S as C } from "../../Checkmark-Byz_C9x4.js";
|
|
14
|
-
const
|
|
15
|
-
const
|
|
15
|
+
const z = ({ title: m = "Select language", options: s, onSelect: a }) => {
|
|
16
|
+
const i = k(null), c = b(), { currentId: d, toggleId: g, closeAll: n } = S(), o = d === "locale", l = h(() => s.map((e) => ({
|
|
16
17
|
...e,
|
|
17
18
|
id: String(e.value),
|
|
18
19
|
tabIndex: -1,
|
|
@@ -27,17 +28,17 @@ const W = ({ title: m = "Select language", options: s, onSelect: a }) => {
|
|
|
27
28
|
return v((e) => {
|
|
28
29
|
if (o) {
|
|
29
30
|
e.preventDefault();
|
|
30
|
-
const t =
|
|
31
|
+
const t = i.current?.querySelector('[data-active="true"]');
|
|
31
32
|
t && (t.tagName === "A" && t.hasAttribute("href") ? t.click() : t.dispatchEvent(new MouseEvent("click", { bubbles: !0 }))), n();
|
|
32
33
|
}
|
|
33
|
-
}), /* @__PURE__ */ f("div", { ref:
|
|
34
|
+
}), /* @__PURE__ */ f("div", { ref: i, "data-testid": "locale-switcher", children: [
|
|
34
35
|
/* @__PURE__ */ r(w, { onClick: () => g("locale"), expanded: o, onBlurCapture: (e) => {
|
|
35
36
|
e?.relatedTarget?.closest('[data-testid="locale-switcher"]') || n();
|
|
36
37
|
} }),
|
|
37
|
-
o &&
|
|
38
|
-
o && !
|
|
38
|
+
o && c && /* @__PURE__ */ r(x, { layout: "desktop", padding: !0, placement: "right", open: !0, children: /* @__PURE__ */ r(p, { groups: u, items: l, keyboardEvents: !0 }) }),
|
|
39
|
+
o && !c && /* @__PURE__ */ r(I, { open: !0, placement: "bottom", children: /* @__PURE__ */ r(p, { groups: u, items: l, keyboardEvents: !0 }) })
|
|
39
40
|
] });
|
|
40
41
|
};
|
|
41
42
|
export {
|
|
42
|
-
|
|
43
|
+
z as LocaleSwitcher
|
|
43
44
|
};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { jsx as e, jsxs as d } from "react/jsx-runtime";
|
|
2
|
-
import { c
|
|
2
|
+
import { c } from "../../index-p1eeF8LQ.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import { Skeleton as h } from "../Skeleton/Skeleton.js";
|
|
5
|
+
import "../Button/Button.js";
|
|
5
6
|
import "../RootProvider/RootProvider.js";
|
|
6
7
|
import "../Snackbar/useSnackbar.js";
|
|
7
8
|
import '../../assets/Icon.css';const _ = "_icon_1y3dz_1", g = "_shape_1y3dz_9", v = "_svg_1y3dz_14", N = "_image_1y3dz_15", a = {
|
|
@@ -9,24 +10,24 @@ import '../../assets/Icon.css';const _ = "_icon_1y3dz_1", g = "_shape_1y3dz_9",
|
|
|
9
10
|
shape: g,
|
|
10
11
|
svg: v,
|
|
11
12
|
image: N
|
|
12
|
-
},
|
|
13
|
+
}, I = (s) => typeof s == "object" && s !== null && ("svgElement" in s || "iconUrl" in s), k = ({
|
|
13
14
|
loading: s,
|
|
14
|
-
altText:
|
|
15
|
+
altText: n,
|
|
15
16
|
svgElement: r,
|
|
16
17
|
size: i,
|
|
17
18
|
color: o,
|
|
18
19
|
theme: m,
|
|
19
20
|
iconUrl: p,
|
|
20
|
-
className:
|
|
21
|
+
className: t,
|
|
21
22
|
style: l
|
|
22
|
-
}) => r ? /* @__PURE__ */ e("span", { "data-size": i, "data-color": o, "data-theme": m, className:
|
|
23
|
+
}) => r ? /* @__PURE__ */ e("span", { "data-size": i, "data-color": o, "data-theme": m, className: c(a.icon, t), style: l, children: /* @__PURE__ */ d(h, { loading: s, variant: "circle", className: a.shape, children: [
|
|
23
24
|
/* @__PURE__ */ e("span", { className: a.shape }),
|
|
24
|
-
/* @__PURE__ */ e(r, { "aria-hidden": "true", "alt-label":
|
|
25
|
-
] }) }) : p ? /* @__PURE__ */ e("span", { "data-size": i, "data-color": o, "data-theme": m, className:
|
|
25
|
+
/* @__PURE__ */ e(r, { "aria-hidden": "true", "alt-label": n, className: a.svg })
|
|
26
|
+
] }) }) : p ? /* @__PURE__ */ e("span", { "data-size": i, "data-color": o, "data-theme": m, className: c(a.icon, t), style: l, children: /* @__PURE__ */ d(h, { loading: s, variant: "circle", className: a.shape, children: [
|
|
26
27
|
/* @__PURE__ */ e("span", { className: a.shape }),
|
|
27
|
-
/* @__PURE__ */ e("img", { src: p, alt:
|
|
28
|
-
] }) }) : /* @__PURE__ */ e("span", { className:
|
|
28
|
+
/* @__PURE__ */ e("img", { src: p, alt: n, className: a.image })
|
|
29
|
+
] }) }) : /* @__PURE__ */ e("span", { className: c(a.icon, t) });
|
|
29
30
|
export {
|
|
30
|
-
|
|
31
|
-
|
|
31
|
+
k as Icon,
|
|
32
|
+
I as isIconProps
|
|
32
33
|
};
|
|
@@ -1,32 +1,33 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { isValidElement as
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { isValidElement as p } from "react";
|
|
3
3
|
import "../../index-p1eeF8LQ.js";
|
|
4
|
-
import { Icon as
|
|
5
|
-
import { Avatar as
|
|
4
|
+
import { Icon as n } from "./Icon.js";
|
|
5
|
+
import { Avatar as f } from "../Avatar/Avatar.js";
|
|
6
6
|
import { AvatarGroup as c } from "../Avatar/AvatarGroup.js";
|
|
7
|
+
import "../Button/Button.js";
|
|
7
8
|
import "../RootProvider/RootProvider.js";
|
|
8
9
|
import "../Snackbar/useSnackbar.js";
|
|
9
10
|
import { S as l } from "../../XMark-tKk6aExO.js";
|
|
10
|
-
import '../../assets/IconOrAvatar.css';const u = "_icon_1ez59_1", _ = "_avatar_1ez59_2", v = "_avatarGroup_1ez59_6",
|
|
11
|
+
import '../../assets/IconOrAvatar.css';const u = "_icon_1ez59_1", _ = "_avatar_1ez59_2", v = "_avatarGroup_1ez59_6", e = {
|
|
11
12
|
icon: u,
|
|
12
13
|
avatar: _,
|
|
13
14
|
avatarGroup: v
|
|
14
15
|
};
|
|
15
16
|
function g(r) {
|
|
16
|
-
return typeof r == "string" || typeof r == "number" || typeof r == "boolean" || r === null ||
|
|
17
|
+
return typeof r == "string" || typeof r == "number" || typeof r == "boolean" || r === null || p(r);
|
|
17
18
|
}
|
|
18
|
-
const N = (r) => r.svgElement !== void 0 || r.iconUrl !== void 0,
|
|
19
|
-
if (!t && !s && !
|
|
19
|
+
const N = (r) => r.svgElement !== void 0 || r.iconUrl !== void 0, S = ({ loading: r, size: i, icon: t, iconTheme: a, avatar: s, avatarGroup: m }) => {
|
|
20
|
+
if (!t && !s && !m)
|
|
20
21
|
return null;
|
|
21
22
|
if (r)
|
|
22
|
-
return /* @__PURE__ */
|
|
23
|
+
return /* @__PURE__ */ o(n, { className: e.icon, svgElement: l, loading: !0 });
|
|
23
24
|
if (t)
|
|
24
|
-
return N(t) ? /* @__PURE__ */
|
|
25
|
+
return N(t) ? /* @__PURE__ */ o(n, { className: e.icon, theme: t.theme || a, ...t }) : g(t) ? t : /* @__PURE__ */ o(n, { className: e.icon, svgElement: t, theme: a });
|
|
25
26
|
if (s)
|
|
26
|
-
return /* @__PURE__ */
|
|
27
|
-
if (
|
|
28
|
-
return /* @__PURE__ */
|
|
27
|
+
return /* @__PURE__ */ o(f, { ...s, size: s.size || i, className: e.avatar });
|
|
28
|
+
if (m)
|
|
29
|
+
return /* @__PURE__ */ o(c, { ...m, className: e.avatarGroup });
|
|
29
30
|
};
|
|
30
31
|
export {
|
|
31
|
-
|
|
32
|
+
S as IconOrAvatar
|
|
32
33
|
};
|
|
@@ -1,20 +1,21 @@
|
|
|
1
|
-
import { jsxs as i, Fragment as
|
|
1
|
+
import { jsxs as i, Fragment as m, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import "../../index-p1eeF8LQ.js";
|
|
3
3
|
import "react";
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
4
|
+
import "../Button/Button.js";
|
|
5
|
+
import { useRootContext as s } from "../RootProvider/RootProvider.js";
|
|
6
|
+
import { Searchbar as p } from "../Searchbar/Searchbar.js";
|
|
6
7
|
import "../Snackbar/useSnackbar.js";
|
|
7
|
-
import { Backdrop as
|
|
8
|
-
const
|
|
9
|
-
const { currentId: o, toggleId: t, openId: c } =
|
|
8
|
+
import { Backdrop as x } from "../Dropdown/Backdrop.js";
|
|
9
|
+
const C = ({ search: n }) => {
|
|
10
|
+
const { currentId: o, toggleId: t, openId: c } = s(), a = () => {
|
|
10
11
|
c("inboxSearch");
|
|
11
12
|
}, r = () => {
|
|
12
13
|
t("inboxSearch");
|
|
13
14
|
};
|
|
14
|
-
return /* @__PURE__ */ i(
|
|
15
|
-
o === "inboxSearch" && /* @__PURE__ */ e(
|
|
15
|
+
return /* @__PURE__ */ i(m, { children: [
|
|
16
|
+
o === "inboxSearch" && /* @__PURE__ */ e(x, { onClick: r }),
|
|
16
17
|
/* @__PURE__ */ e(
|
|
17
|
-
|
|
18
|
+
p,
|
|
18
19
|
{
|
|
19
20
|
...n,
|
|
20
21
|
expanded: o === "inboxSearch",
|
|
@@ -26,5 +27,5 @@ const f = ({ search: n }) => {
|
|
|
26
27
|
] });
|
|
27
28
|
};
|
|
28
29
|
export {
|
|
29
|
-
|
|
30
|
+
C as InboxSearch
|
|
30
31
|
};
|