@altinn/altinn-components 0.54.2 → 0.55.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/{PersonCircle-DlX_3kRO.js → ChevronUpDown-DqGsU4MC.js} +5 -5
- package/dist/Eye-BrbjRZJp.js +24 -0
- package/dist/InboxFill-vGck_zM_.js +81 -0
- package/dist/InformationSquare-D3WAxfVw.js +24 -0
- package/dist/Trash-DBcymOP9.js +81 -0
- package/dist/assets/AccountMenuButton.css +1 -1
- package/dist/assets/AccountSelector.css +1 -1
- package/dist/assets/AutocompleteBase.css +1 -1
- package/dist/assets/ButtonGroup.css +1 -1
- package/dist/assets/ButtonIcon.css +1 -1
- package/dist/assets/DashboardCard.css +1 -0
- package/dist/assets/DashboardHeader.css +1 -0
- package/dist/assets/DialogListItem.css +1 -1
- package/dist/assets/Dropdown.css +1 -0
- package/dist/assets/DropdownBase.css +1 -1
- package/dist/assets/GlobalHeader.css +1 -1
- package/dist/assets/ItemControls.css +1 -0
- package/dist/assets/ItemLabel.css +1 -0
- package/dist/assets/ItemMedia.css +1 -0
- package/dist/assets/MenuItem.css +1 -1
- package/dist/assets/MenuListDivider.css +1 -0
- package/dist/assets/MenuListHeading.css +1 -0
- package/dist/assets/MenuListItem.css +1 -0
- package/dist/assets/MenuListSearch.css +1 -0
- package/dist/assets/MetaItemIcon.css +1 -1
- package/dist/assets/SearchField.css +1 -1
- package/dist/assets/SeenByLogButton.css +1 -0
- package/dist/assets/Switch.css +1 -0
- package/dist/assets/TabMenu.css +1 -0
- package/dist/assets/Tooltip.css +1 -0
- package/dist/assets/menuList.css +1 -0
- package/dist/components/Account/AccountList.js +1 -1
- package/dist/components/Account/AccountListVirtual.js +4 -4
- package/dist/components/Account/AccountMenu.js +14 -11
- package/dist/components/Account/AccountMenuButton.js +58 -56
- package/dist/components/Attachment/AttachmentLink.js +47 -41
- package/dist/components/Avatar/Avatar.js +11 -12
- package/dist/components/Avatar/AvatarGroup.js +38 -28
- package/dist/components/Banner/Banner.js +20 -38
- package/dist/components/Button/ButtonGroup.js +28 -12
- package/dist/components/Button/ButtonIcon.js +15 -15
- package/dist/components/Button/FloatingActionButton.js +22 -19
- package/dist/components/Byline/Byline.js +1 -1
- package/dist/components/ContextMenu/ContextMenu.js +73 -67
- package/dist/components/Dashboard/DashboardCard.js +24 -21
- package/dist/components/Dashboard/DashboardHeader.js +16 -14
- package/dist/components/Dashboard/index.js +2 -4
- package/dist/components/Datepicker/Datepicker.js +16 -14
- package/dist/components/Datepicker/DatepickerHeader.js +13 -13
- package/dist/components/Dialog/DialogActions.js +9 -9
- package/dist/components/Dialog/DialogAttachments.js +1 -1
- package/dist/components/Dialog/DialogListItem.js +113 -112
- package/dist/components/Dialog/DialogMetadata.js +83 -154
- package/dist/components/Dialog/DialogSeenBy.js +24 -41
- package/dist/components/Dialog/DialogTabs.js +4 -4
- package/dist/components/Dialog/SeenByLog.js +7 -7
- package/dist/components/Dialog/SeenByLogButton.js +12 -6
- package/dist/components/Dropdown/DrawerOrDropdown.js +1 -1
- package/dist/components/Dropdown/Dropdown.js +160 -0
- package/dist/components/Dropdown/DropdownBase.js +12 -12
- package/dist/components/Dropdown/FloatingDropdown.js +119 -74
- package/dist/components/Dropdown/index.js +18 -16
- package/dist/components/DsComponents/index.js +2 -2
- package/dist/components/Forms/SearchField.js +44 -29
- package/dist/components/Forms/Switch.js +10 -8
- package/dist/components/GlobalHeader/AccountSelector.js +55 -55
- package/dist/components/GlobalHeader/GlobalHeader.js +55 -54
- package/dist/components/GlobalHeader/GlobalSearch.js +1 -1
- package/dist/components/GlobalHeader/GlobalSearchButton.js +1 -0
- package/dist/components/GlobalMenu/BackButton.js +1 -1
- package/dist/components/GlobalMenu/GlobalMenu.js +52 -43
- package/dist/components/GlobalMenu/GlobalMenuButton.js +15 -14
- package/dist/components/GlobalMenu/LocaleSwitcher.js +30 -24
- package/dist/components/GlobalMenu_old/BackButton.js +1 -1
- package/dist/components/GlobalMenu_old/CurrentAccount.js +8 -9
- package/dist/components/GlobalMenu_old/EndUserLabel.js +29 -10
- package/dist/components/GlobalMenu_old/GlobalMenu.js +15 -8
- package/dist/components/GlobalMenu_old/GlobalMenuButton.js +1 -1
- package/dist/components/Header/Header.js +6 -6
- package/dist/components/Header/HeaderBase.js +1 -1
- package/dist/components/Header/LocaleSwitcher.js +10 -10
- package/dist/components/Icon/Icon.js +19 -20
- package/dist/components/Icon/ProgressIcon.js +1 -0
- package/dist/components/Icon/index.js +4 -6
- package/dist/components/Item/ItemControls.js +8 -0
- package/dist/components/Item/ItemLabel.js +34 -0
- package/dist/components/Item/ItemMedia.js +33 -0
- package/dist/components/Item/index.js +8 -0
- package/dist/components/Layout/Layout.js +4 -4
- package/dist/components/Menu/Menu.js +67 -45
- package/dist/components/Menu/MenuItem.js +192 -66
- package/dist/components/Menu/MenuItems.js +154 -71
- package/dist/components/Menu/MenuList.js +39 -0
- package/dist/components/Menu/MenuListDivider.js +8 -0
- package/dist/components/Menu/MenuListGroup.js +7 -0
- package/dist/components/Menu/MenuListHeading.js +7 -0
- package/dist/components/Menu/MenuListItem.js +34 -0
- package/dist/components/Menu/MenuListSearch.js +83 -0
- package/dist/components/Menu/MenuOption.js +4 -87
- package/dist/components/Menu/TabMenu.js +15 -0
- package/dist/components/Menu/VirtualizedMenuItems.js +227 -0
- package/dist/components/Menu/aria.js +9 -0
- package/dist/components/Menu/example.data.js +373 -0
- package/dist/components/Menu/example.hooks.js +75 -0
- package/dist/components/Menu/index.js +24 -25
- package/dist/components/Menu/types.js +1 -0
- package/dist/components/Menu/useDropdownMenuController.js +43 -0
- package/dist/components/Menu/useMenuSearch.js +146 -0
- package/dist/components/Menu/useMenuVirtualization.js +5 -0
- package/dist/components/Metadata/MetaItemIcon.js +4 -4
- package/dist/components/Notifications/NotificationItemBase.js +49 -50
- package/dist/components/Page/ContactButtons.js +13 -10
- package/dist/components/Page/PageTabs.js +4 -13
- package/dist/components/Searchbar/Autocomplete.js +34 -32
- package/dist/components/Searchbar/AutocompleteBase.js +3 -3
- package/dist/components/Searchbar/AutocompleteItem.js +29 -42
- package/dist/components/Settings/SettingsItemBase.js +25 -26
- package/dist/components/Settings/UsedByLog.js +6 -6
- package/dist/components/Toolbar/DatepickerFilter.js +87 -0
- package/dist/components/Toolbar/SelectDateFilter.js +51 -0
- package/dist/components/Toolbar/Toolbar.js +18 -104
- package/dist/components/Toolbar/ToolbarFilter.js +69 -73
- package/dist/components/Toolbar/ToolbarFilterAddMenu.js +82 -0
- package/dist/components/Toolbar/ToolbarFilterButton.js +46 -0
- package/dist/components/Toolbar/ToolbarFilterMenu.js +117 -0
- package/dist/components/Toolbar/ToolbarMenu.js +58 -21
- package/dist/components/Toolbar/ToolbarSearch.js +15 -10
- package/dist/components/Toolbar/example.data.js +388 -0
- package/dist/components/Toolbar/example.hooks.js +68 -0
- package/dist/components/Toolbar/formatDateRange.js +19 -0
- package/dist/components/Toolbar/index.js +12 -14
- package/dist/components/Toolbar/useFilter.js +63 -0
- package/dist/components/Tooltip/Tooltip.js +101 -0
- package/dist/components/Tooltip/index.js +4 -0
- package/dist/components/UserListItem/UserListItem.js +15 -13
- package/dist/components/index.js +389 -386
- package/dist/floating-ui.dom-bEgaHJCq.js +997 -0
- package/dist/global.css +1 -1
- package/dist/hooks/useAccountSelector.js +9 -9
- package/dist/hooks/useMenu.js +48 -47
- package/dist/index--jNxJmA8.js +2000 -0
- package/dist/index.js +402 -399
- package/dist/menuList.module-DFH60CqT.js +6 -0
- package/dist/{textfield-DAuYWtUj.js → textfield-Drdr9bio.js} +40 -39
- package/dist/types/lib/components/Account/AccountList.d.ts +2 -2
- package/dist/types/lib/components/Account/AccountList.stories.d.ts +3 -4
- package/dist/types/lib/components/Account/AccountMenu.d.ts +3 -3
- package/dist/types/lib/components/Account/AccountMenu.stories.d.ts +1 -1
- package/dist/types/lib/components/Account/AccountMenuButton.stories.d.ts +10 -2
- package/dist/types/lib/components/Attachment/AttachmentLink.d.ts +3 -1
- package/dist/types/lib/components/Attachment/AttachmentLink.stories.d.ts +1 -1
- package/dist/types/lib/components/Button/ButtonGroup.d.ts +3 -1
- package/dist/types/lib/components/Button/ButtonGroup.stories.d.ts +1 -1
- package/dist/types/lib/components/Button/FloatingActionButton.d.ts +1 -6
- package/dist/types/lib/components/ContextMenu/ContextMenu.d.ts +7 -8
- package/dist/types/lib/components/Dashboard/DashboardCard.d.ts +2 -2
- package/dist/types/lib/components/Dashboard/DashboardHeader.d.ts +2 -2
- package/dist/types/lib/components/Dashboard/index.d.ts +0 -1
- package/dist/types/lib/components/Dialog/DialogTabs.d.ts +2 -4
- package/dist/types/lib/components/Dialog/SeenByLogButton.d.ts +8 -5
- package/dist/types/lib/components/Dropdown/Dropdown.d.ts +22 -0
- package/dist/types/lib/components/Dropdown/Dropdown.stories.d.ts +14 -0
- package/dist/types/lib/components/Dropdown/DropdownBase.d.ts +3 -2
- package/dist/types/lib/components/Dropdown/index.d.ts +1 -0
- package/dist/types/lib/components/Forms/SearchField.d.ts +2 -1
- package/dist/types/lib/components/Forms/SearchField.stories.d.ts +1 -1
- package/dist/types/lib/components/Forms/Switch.d.ts +2 -1
- package/dist/types/lib/components/Forms/Switch.stories.d.ts +1 -1
- package/dist/types/lib/components/GlobalMenu/GlobalMenu.d.ts +1 -1
- package/dist/types/lib/components/GlobalMenu/GlobalMenu.stories.d.ts +1 -3
- package/dist/types/lib/components/GlobalMenu/LocaleSwitcher.d.ts +1 -1
- package/dist/types/lib/components/Header/HeaderButton.d.ts +0 -4
- package/dist/types/lib/components/Header/HeaderButton.stories.d.ts +0 -1
- package/dist/types/lib/components/Icon/Icon.d.ts +3 -2
- package/dist/types/lib/components/Icon/index.d.ts +0 -1
- package/dist/types/lib/components/Item/ItemControls.d.ts +7 -0
- package/dist/types/lib/components/Item/ItemLabel.d.ts +14 -0
- package/dist/types/lib/components/Item/ItemMedia.d.ts +9 -0
- package/dist/types/lib/components/Item/index.d.ts +3 -0
- package/dist/types/lib/components/Menu/Menu.d.ts +4 -7
- package/dist/types/lib/components/Menu/Menu.stories.d.ts +64 -4
- package/dist/types/lib/components/Menu/MenuItem.d.ts +53 -21
- package/dist/types/lib/components/Menu/MenuItems.d.ts +21 -14
- package/dist/types/lib/components/Menu/MenuList.d.ts +21 -0
- package/dist/types/lib/components/Menu/MenuListDivider.d.ts +6 -0
- package/dist/types/lib/components/Menu/MenuListGroup.d.ts +8 -0
- package/dist/types/lib/components/Menu/MenuListHeading.d.ts +8 -0
- package/dist/types/lib/components/Menu/MenuListItem.d.ts +9 -0
- package/dist/types/lib/components/Menu/MenuListSearch.d.ts +15 -0
- package/dist/types/lib/components/Menu/MenuListSearch.stories.d.ts +18 -0
- package/dist/types/lib/components/Menu/MenuOption.d.ts +5 -16
- package/dist/types/lib/components/Menu/TabMenu.d.ts +8 -0
- package/dist/types/lib/components/Menu/VirtualizedMenu.stories.d.ts +22 -0
- package/dist/types/lib/components/Menu/VirtualizedMenuItems.d.ts +2 -0
- package/dist/types/lib/components/Menu/aria.d.ts +1 -0
- package/dist/types/lib/components/Menu/example.hooks.d.ts +24 -0
- package/dist/types/lib/components/Menu/index.d.ts +10 -9
- package/dist/types/lib/components/Menu/types.d.ts +1 -0
- package/dist/types/lib/components/Menu/useDropdownMenuController.d.ts +27 -0
- package/dist/types/lib/components/Menu/useMenuSearch.d.ts +129 -0
- package/dist/types/lib/components/Menu/useMenuVirtualization.d.ts +35 -0
- package/dist/types/lib/components/Page/ContactButtons.d.ts +6 -2
- package/dist/types/lib/components/Page/PageTabs.d.ts +3 -10
- package/dist/types/lib/components/Page/PageTabs.stories.d.ts +1 -1
- package/dist/types/lib/components/Searchbar/AutocompleteItem.d.ts +3 -3
- package/dist/types/lib/components/Searchbar/Searchbar.stories.d.ts +1 -1
- package/dist/types/lib/components/Toolbar/DatepickerFilter.d.ts +15 -0
- package/dist/types/lib/components/Toolbar/SelectDateFilter.d.ts +8 -0
- package/dist/types/lib/components/Toolbar/SelectDateFilter.stories.d.ts +9 -0
- package/dist/types/lib/components/Toolbar/Toolbar.d.ts +6 -19
- package/dist/types/lib/components/Toolbar/Toolbar.stories.d.ts +21 -19
- package/dist/types/lib/components/Toolbar/ToolbarFilter.d.ts +11 -23
- package/dist/types/lib/components/Toolbar/ToolbarFilter.stories.d.ts +6 -13
- package/dist/types/lib/components/Toolbar/ToolbarFilterAddMenu.d.ts +8 -0
- package/dist/types/lib/components/Toolbar/ToolbarFilterButton.d.ts +15 -0
- package/dist/types/lib/components/Toolbar/ToolbarFilterMenu.d.ts +15 -0
- package/dist/types/lib/components/Toolbar/ToolbarMenu.d.ts +5 -10
- package/dist/types/lib/components/Toolbar/ToolbarSearch.d.ts +3 -5
- package/dist/types/lib/components/Toolbar/ToolbarSearch.stories.d.ts +635 -1
- package/dist/types/lib/components/Toolbar/example.hooks.d.ts +41 -0
- package/dist/types/lib/components/Toolbar/formatDateRange.d.ts +10 -0
- package/dist/types/lib/components/Toolbar/index.d.ts +4 -5
- package/dist/types/lib/components/Toolbar/useFilter.d.ts +173 -0
- package/dist/types/lib/components/Tooltip/Tooltip.d.ts +8 -0
- package/dist/types/lib/components/Tooltip/Tooltip.stories.d.ts +9 -0
- package/dist/types/lib/components/Tooltip/index.d.ts +1 -0
- package/dist/types/lib/components/Transmission/Transmission.stories.d.ts +2 -2
- package/dist/types/lib/components/Typography/Heading.d.ts +2 -2
- package/dist/types/lib/components/UserListItem/UserListItem.d.ts +3 -1
- package/dist/types/lib/components/UserListItem/UserListItem.stories.d.ts +7 -1
- package/dist/types/lib/components/index.d.ts +2 -0
- package/dist/types/lib/hooks/useAccountSelector.d.ts +2 -2
- package/dist/types/lib/hooks/useMenu.d.ts +3 -1
- package/dist/{index-De5bF0Gf.js → useMenuVirtualization-DpvWCsyD.js} +216 -165
- package/package.json +1 -1
- package/dist/assets/ContextMenu.css +0 -1
- package/dist/assets/IconOrAvatar.css +0 -1
- package/dist/assets/MenuBase.css +0 -1
- package/dist/assets/MenuHeader.css +0 -1
- package/dist/assets/MenuInputField.css +0 -1
- package/dist/assets/MenuItemBase.css +0 -1
- package/dist/assets/MenuItemIcon.css +0 -1
- package/dist/assets/MenuItemLabel.css +0 -1
- package/dist/assets/MenuItemsVirtual.css +0 -1
- package/dist/assets/MenuOption.css +0 -1
- package/dist/assets/MenuSearch.css +0 -1
- package/dist/assets/PageTabs.css +0 -1
- package/dist/assets/ToolbarBase.css +0 -1
- package/dist/assets/ToolbarButton.css +0 -1
- package/dist/assets/ToolbarDaterange.css +0 -1
- package/dist/assets/ToolbarFilterBase.css +0 -1
- package/dist/components/Dashboard/DashboardIcon.js +0 -11
- package/dist/components/Datepicker/DatepickerBase.js +0 -8
- package/dist/components/GlobalMenu/EndUserLabel.js +0 -13
- package/dist/components/GlobalMenu/LocaleButton.js +0 -13
- package/dist/components/Icon/IconOrAvatar.js +0 -33
- package/dist/components/Menu/MenuBase.js +0 -56
- package/dist/components/Menu/MenuHeader.js +0 -8
- package/dist/components/Menu/MenuInputField.js +0 -31
- package/dist/components/Menu/MenuItemBase.js +0 -58
- package/dist/components/Menu/MenuItemIcon.js +0 -27
- package/dist/components/Menu/MenuItemLabel.js +0 -76
- package/dist/components/Menu/MenuItemsVirtual.js +0 -168
- package/dist/components/Menu/MenuSearch.js +0 -41
- package/dist/components/Toolbar/ToolbarAccountMenu.js +0 -52
- package/dist/components/Toolbar/ToolbarAdd.js +0 -24
- package/dist/components/Toolbar/ToolbarBase.js +0 -8
- package/dist/components/Toolbar/ToolbarButton.js +0 -115
- package/dist/components/Toolbar/ToolbarDaterange.js +0 -58
- package/dist/components/Toolbar/ToolbarFilterBase.js +0 -17
- package/dist/components/Toolbar/ToolbarOptions.js +0 -84
- package/dist/index-DttADHE1.js +0 -2993
- package/dist/types/lib/components/ContextMenu/ContextMenu.stories.d.ts +0 -8
- package/dist/types/lib/components/Dashboard/DashboardIcon.d.ts +0 -7
- package/dist/types/lib/components/Datepicker/DatepickerBase.d.ts +0 -6
- package/dist/types/lib/components/GlobalMenu/EndUserLabel.d.ts +0 -5
- package/dist/types/lib/components/GlobalMenu/LocaleButton.d.ts +0 -3
- package/dist/types/lib/components/Icon/IconOrAvatar.d.ts +0 -13
- package/dist/types/lib/components/Menu/MenuBase.d.ts +0 -42
- package/dist/types/lib/components/Menu/MenuHeader.d.ts +0 -4
- package/dist/types/lib/components/Menu/MenuInputField.d.ts +0 -12
- package/dist/types/lib/components/Menu/MenuItemBase.d.ts +0 -28
- package/dist/types/lib/components/Menu/MenuItemIcon.d.ts +0 -10
- package/dist/types/lib/components/Menu/MenuItemLabel.d.ts +0 -15
- package/dist/types/lib/components/Menu/MenuItemsVirtual.d.ts +0 -2
- package/dist/types/lib/components/Menu/MenuSearch.d.ts +0 -10
- package/dist/types/lib/components/Menu/MenuSearch.stories.d.ts +0 -18
- package/dist/types/lib/components/Toolbar/ToolbarAccountMenu.d.ts +0 -8
- package/dist/types/lib/components/Toolbar/ToolbarAdd.d.ts +0 -8
- package/dist/types/lib/components/Toolbar/ToolbarAdd.stories.d.ts +0 -13
- package/dist/types/lib/components/Toolbar/ToolbarBase.d.ts +0 -5
- package/dist/types/lib/components/Toolbar/ToolbarButton.d.ts +0 -16
- package/dist/types/lib/components/Toolbar/ToolbarButton.stories.d.ts +0 -15
- package/dist/types/lib/components/Toolbar/ToolbarDate.stories.d.ts +0 -26
- package/dist/types/lib/components/Toolbar/ToolbarDaterange.d.ts +0 -11
- package/dist/types/lib/components/Toolbar/ToolbarDaterange.stories.d.ts +0 -15
- package/dist/types/lib/components/Toolbar/ToolbarFilterBase.d.ts +0 -8
- package/dist/types/lib/components/Toolbar/ToolbarMenu.stories.d.ts +0 -19
- package/dist/types/lib/components/Toolbar/ToolbarOptions.d.ts +0 -22
- package/dist/types/lib/components/Toolbar/ToolbarOptions.stories.d.ts +0 -12
- /package/dist/assets/{DatepickerBase.css → Datepicker.css} +0 -0
- /package/dist/types/lib/components/GlobalHeader/{AccountSector.stories.d.ts → AccountSelector.stories.d.ts} +0 -0
|
@@ -1,44 +1,59 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as e, jsxs as f } from "react/jsx-runtime";
|
|
2
2
|
import { c as p } from "../../index-p1eeF8LQ.js";
|
|
3
|
-
import { Icon as
|
|
3
|
+
import { Icon as u } from "../Icon/Icon.js";
|
|
4
4
|
import "react";
|
|
5
|
-
import { Button as
|
|
5
|
+
import { Button as _ } from "../Button/Button.js";
|
|
6
6
|
import "../RootProvider/RootProvider.js";
|
|
7
7
|
import { Input as d } from "./Input.js";
|
|
8
|
-
import { FieldBase as
|
|
8
|
+
import { FieldBase as v } from "./FieldBase.js";
|
|
9
9
|
import "../Snackbar/useSnackbar.js";
|
|
10
10
|
import { S as h } from "../../MagnifyingGlass-bwVhw07z.js";
|
|
11
|
-
import { S as
|
|
12
|
-
import '../../assets/SearchField.css';const
|
|
13
|
-
container:
|
|
14
|
-
icon:
|
|
15
|
-
input:
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
11
|
+
import { S as B } from "../../XMark-tKk6aExO.js";
|
|
12
|
+
import '../../assets/SearchField.css';const N = "_container_1fveu_1", g = "_icon_1fveu_7", x = "_input_1fveu_27", S = "_field_1fveu_39", y = "_clear_1fveu_46", C = "_clearButton_1fveu_58", t = {
|
|
13
|
+
container: N,
|
|
14
|
+
icon: g,
|
|
15
|
+
input: x,
|
|
16
|
+
field: S,
|
|
17
|
+
clear: y,
|
|
18
|
+
clearButton: C
|
|
19
|
+
}, w = ({
|
|
20
|
+
className: a,
|
|
21
|
+
collapsible: i,
|
|
22
|
+
size: n,
|
|
21
23
|
color: c = "neutral",
|
|
22
|
-
label:
|
|
23
|
-
value:
|
|
24
|
-
onClear:
|
|
25
|
-
clearButtonAltText:
|
|
26
|
-
...
|
|
27
|
-
}) => /* @__PURE__ */
|
|
28
|
-
/* @__PURE__ */
|
|
29
|
-
|
|
30
|
-
a && !!t && /* @__PURE__ */ o("span", { className: r.clear, children: /* @__PURE__ */ o(
|
|
31
|
-
u,
|
|
24
|
+
label: s,
|
|
25
|
+
value: o,
|
|
26
|
+
onClear: r,
|
|
27
|
+
clearButtonAltText: l = "Clear search",
|
|
28
|
+
...m
|
|
29
|
+
}) => /* @__PURE__ */ e(v, { size: n, color: c, label: s, className: p(t.field, a), children: /* @__PURE__ */ f("div", { className: t.container, children: [
|
|
30
|
+
/* @__PURE__ */ e(
|
|
31
|
+
d,
|
|
32
32
|
{
|
|
33
|
+
...m,
|
|
34
|
+
type: "search",
|
|
35
|
+
value: o,
|
|
36
|
+
className: t.input,
|
|
37
|
+
"data-collapsible": i,
|
|
38
|
+
autoCapitalize: "off",
|
|
39
|
+
autoComplete: "off"
|
|
40
|
+
}
|
|
41
|
+
),
|
|
42
|
+
/* @__PURE__ */ e(u, { svgElement: h, className: t.icon }),
|
|
43
|
+
r && !!o && /* @__PURE__ */ e("span", { className: t.clear, children: /* @__PURE__ */ e(
|
|
44
|
+
_,
|
|
45
|
+
{
|
|
46
|
+
size: "xs",
|
|
33
47
|
rounded: !0,
|
|
48
|
+
icon: !0,
|
|
34
49
|
variant: "tinted",
|
|
35
|
-
className:
|
|
36
|
-
onClick:
|
|
37
|
-
"aria-label":
|
|
38
|
-
children: /* @__PURE__ */
|
|
50
|
+
className: t.clearButton,
|
|
51
|
+
onClick: r,
|
|
52
|
+
"aria-label": l,
|
|
53
|
+
children: /* @__PURE__ */ e(B, {})
|
|
39
54
|
}
|
|
40
55
|
) })
|
|
41
56
|
] }) });
|
|
42
57
|
export {
|
|
43
|
-
|
|
58
|
+
w as SearchField
|
|
44
59
|
};
|
|
@@ -1,15 +1,17 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import "../../index-p1eeF8LQ.js";
|
|
1
|
+
import { jsxs as p, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { c as e } from "../../index-p1eeF8LQ.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import "../Button/Button.js";
|
|
5
5
|
import "../RootProvider/RootProvider.js";
|
|
6
|
-
import { Field as
|
|
7
|
-
import { Label as
|
|
8
|
-
import { Input as
|
|
6
|
+
import { Field as h } from "./Field.js";
|
|
7
|
+
import { Label as n } from "./Label.js";
|
|
8
|
+
import { Input as f } from "./Input.js";
|
|
9
9
|
import "../Snackbar/useSnackbar.js";
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
import '../../assets/Switch.css';const l = {
|
|
11
|
+
switch: "_switch_en83f_1"
|
|
12
|
+
}, k = ({ className: o, reverse: i, size: m, color: c, label: t, ...s }) => /* @__PURE__ */ p(h, { size: m, color: c, reverse: i, className: e(l.switch, o), children: [
|
|
13
|
+
/* @__PURE__ */ r(f, { ...s, type: "checkbox", role: "switch" }),
|
|
14
|
+
!!t && /* @__PURE__ */ r(n, { children: t })
|
|
13
15
|
] });
|
|
14
16
|
export {
|
|
15
17
|
k as Switch
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as a, jsxs as m, Fragment as
|
|
3
|
-
import { c as
|
|
4
|
-
import u, { forwardRef as
|
|
5
|
-
import { useIsDesktop as
|
|
6
|
-
import { AccountMenu as
|
|
7
|
-
import { Button as
|
|
8
|
-
import { useRootContext as
|
|
2
|
+
import { jsx as a, jsxs as m, Fragment as w } from "react/jsx-runtime";
|
|
3
|
+
import { c as x } from "../../index-p1eeF8LQ.js";
|
|
4
|
+
import u, { forwardRef as z, useState as I, useEffect as O } from "react";
|
|
5
|
+
import { useIsDesktop as R } from "../../hooks/useIsDesktop.js";
|
|
6
|
+
import { AccountMenu as L } from "../Account/AccountMenu.js";
|
|
7
|
+
import { Button as A } from "../Button/Button.js";
|
|
8
|
+
import { useRootContext as P } from "../RootProvider/RootProvider.js";
|
|
9
9
|
import "../Snackbar/useSnackbar.js";
|
|
10
|
-
import { SearchField as
|
|
11
|
-
import { S as
|
|
12
|
-
import { H, S as
|
|
13
|
-
import { u as
|
|
14
|
-
import '../../assets/AccountSelector.css';var
|
|
10
|
+
import { SearchField as H } from "../Forms/SearchField.js";
|
|
11
|
+
import { S as T } from "../../button-BB5sYVKY.js";
|
|
12
|
+
import { H as V, S as B } from "../../switch-Cemfhx0H.js";
|
|
13
|
+
import { u as j } from "../../useId-BVFxCjkq.js";
|
|
14
|
+
import '../../assets/AccountSelector.css';var $ = function(e, l) {
|
|
15
15
|
var n = {};
|
|
16
16
|
for (var t in e) Object.prototype.hasOwnProperty.call(e, t) && l.indexOf(t) < 0 && (n[t] = e[t]);
|
|
17
17
|
if (e != null && typeof Object.getOwnPropertySymbols == "function")
|
|
@@ -19,17 +19,17 @@ import '../../assets/AccountSelector.css';var B = function(e, l) {
|
|
|
19
19
|
l.indexOf(t[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, t[r]) && (n[t[r]] = e[t[r]]);
|
|
20
20
|
return n;
|
|
21
21
|
};
|
|
22
|
-
const
|
|
23
|
-
var { title: n, titleId: t } = e, r =
|
|
24
|
-
let
|
|
25
|
-
return
|
|
22
|
+
const D = z((e, l) => {
|
|
23
|
+
var { title: n, titleId: t } = e, r = $(e, ["title", "titleId"]);
|
|
24
|
+
let c = j();
|
|
25
|
+
return c = n ? t || "title-" + c : void 0, u.createElement(
|
|
26
26
|
"svg",
|
|
27
|
-
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: l, "aria-labelledby":
|
|
28
|
-
n ? u.createElement("title", { id:
|
|
27
|
+
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: l, "aria-labelledby": c }, r),
|
|
28
|
+
n ? u.createElement("title", { id: c }, n) : null,
|
|
29
29
|
u.createElement("path", { fill: "currentColor", fillRule: "evenodd", d: "M3.75 12a8.25 8.25 0 1 1 16.5 0 8.25 8.25 0 0 1-16.5 0M12 2.25c-5.385 0-9.75 4.365-9.75 9.75s4.365 9.75 9.75 9.75 9.75-4.365 9.75-9.75S17.385 2.25 12 2.25m4.03 9.28-3.5 3.5a.75.75 0 0 1-1.06 0l-3.5-3.5a.75.75 0 0 1 .53-1.28h7a.75.75 0 0 1 .53 1.28m-2.34.22h-3.38L12 13.44z", clipRule: "evenodd" })
|
|
30
30
|
);
|
|
31
31
|
});
|
|
32
|
-
var
|
|
32
|
+
var K = function(e, l) {
|
|
33
33
|
var n = {};
|
|
34
34
|
for (var t in e) Object.prototype.hasOwnProperty.call(e, t) && l.indexOf(t) < 0 && (n[t] = e[t]);
|
|
35
35
|
if (e != null && typeof Object.getOwnPropertySymbols == "function")
|
|
@@ -37,17 +37,17 @@ var D = function(e, l) {
|
|
|
37
37
|
l.indexOf(t[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, t[r]) && (n[t[r]] = e[t[r]]);
|
|
38
38
|
return n;
|
|
39
39
|
};
|
|
40
|
-
const
|
|
41
|
-
var { title: n, titleId: t } = e, r =
|
|
42
|
-
let
|
|
43
|
-
return
|
|
40
|
+
const W = z((e, l) => {
|
|
41
|
+
var { title: n, titleId: t } = e, r = K(e, ["title", "titleId"]);
|
|
42
|
+
let c = j();
|
|
43
|
+
return c = n ? t || "title-" + c : void 0, u.createElement(
|
|
44
44
|
"svg",
|
|
45
|
-
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: l, "aria-labelledby":
|
|
46
|
-
n ? u.createElement("title", { id:
|
|
45
|
+
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: l, "aria-labelledby": c }, r),
|
|
46
|
+
n ? u.createElement("title", { id: c }, n) : null,
|
|
47
47
|
u.createElement("path", { fill: "currentColor", fillRule: "evenodd", d: "M3.75 12a8.25 8.25 0 1 1 16.5 0 8.25 8.25 0 0 1-16.5 0M12 2.25c-5.385 0-9.75 4.365-9.75 9.75s4.365 9.75 9.75 9.75 9.75-4.365 9.75-9.75S17.385 2.25 12 2.25m.53 6.72a.75.75 0 0 0-1.06 0l-3.5 3.5a.75.75 0 0 0 .53 1.28h7a.75.75 0 0 0 .53-1.28zM12 10.56l1.69 1.69h-3.38z", clipRule: "evenodd" })
|
|
48
48
|
);
|
|
49
|
-
}),
|
|
50
|
-
accountSelector:
|
|
49
|
+
}), q = "_accountSelector_lyp2e_1", G = "_heading_lyp2e_11", J = "_searchSection_lyp2e_17", Q = "_searchField_lyp2e_26", U = "_accountMenu_lyp2e_30", X = "_fullScreen_lyp2e_38", Y = "_virtualized_lyp2e_42", Z = "_btnIcon_lyp2e_46", ee = "_spinner_lyp2e_50", i = {
|
|
50
|
+
accountSelector: q,
|
|
51
51
|
heading: G,
|
|
52
52
|
searchSection: J,
|
|
53
53
|
searchField: Q,
|
|
@@ -62,38 +62,38 @@ const K = O((e, l) => {
|
|
|
62
62
|
className: n,
|
|
63
63
|
loading: t,
|
|
64
64
|
showDeletedUnits: r,
|
|
65
|
-
onShowDeletedUnitsChange:
|
|
65
|
+
onShowDeletedUnitsChange: c
|
|
66
66
|
}) => {
|
|
67
|
-
const { currentId: h, openId: d, closeAll: g, languageCode: v } =
|
|
68
|
-
|
|
69
|
-
!l && f && o && g(),
|
|
70
|
-
}, [l]),
|
|
67
|
+
const { currentId: h, openId: d, closeAll: g, languageCode: v } = P(), p = R(), o = h === "accountFullscreen", [S, _] = I(""), [f, b] = I(l);
|
|
68
|
+
O(() => {
|
|
69
|
+
!l && f && o && g(), b(l);
|
|
70
|
+
}, [l]), O(() => {
|
|
71
71
|
(f === !0 && !o || !p && h === "account") && d("accountFullscreen");
|
|
72
72
|
}, [f, o, p, h, d]);
|
|
73
|
-
const { minimize: k, fullscreen: C, searchText:
|
|
73
|
+
const { minimize: k, fullscreen: C, searchText: y, heading: E, switchLabel: F } = te(v), M = () => {
|
|
74
74
|
d(o ? "account" : "accountFullscreen");
|
|
75
75
|
}, N = (s) => {
|
|
76
|
-
e.onSelectAccount?.(s), g(),
|
|
76
|
+
e.onSelectAccount?.(s), g(), b(!1);
|
|
77
77
|
};
|
|
78
|
-
return t ? /* @__PURE__ */ a(
|
|
79
|
-
/* @__PURE__ */ a(
|
|
80
|
-
/* @__PURE__ */ m("div", { className:
|
|
78
|
+
return t ? /* @__PURE__ */ a(T, { "aria-hidden": !0, "data-color": "neutral", className: i.spinner }) : /* @__PURE__ */ m("div", { className: x(n, i.accountSelector), children: [
|
|
79
|
+
/* @__PURE__ */ a(V, { "data-size": "sm", level: 2, className: i.heading, children: E }),
|
|
80
|
+
/* @__PURE__ */ m("div", { className: i.searchSection, children: [
|
|
81
81
|
/* @__PURE__ */ a(
|
|
82
|
-
|
|
82
|
+
H,
|
|
83
83
|
{
|
|
84
|
-
name:
|
|
85
|
-
placeholder:
|
|
84
|
+
name: y,
|
|
85
|
+
placeholder: y,
|
|
86
86
|
value: S,
|
|
87
|
-
onChange: (s) =>
|
|
88
|
-
onClear: () =>
|
|
89
|
-
className:
|
|
87
|
+
onChange: (s) => _(s.target.value),
|
|
88
|
+
onClear: () => _(""),
|
|
89
|
+
className: i.searchField
|
|
90
90
|
}
|
|
91
91
|
),
|
|
92
92
|
r !== void 0 && /* @__PURE__ */ a(
|
|
93
|
-
|
|
93
|
+
B,
|
|
94
94
|
{
|
|
95
95
|
checked: r,
|
|
96
|
-
onChange: (s) =>
|
|
96
|
+
onChange: (s) => c?.(s.target.checked),
|
|
97
97
|
label: F
|
|
98
98
|
}
|
|
99
99
|
)
|
|
@@ -101,13 +101,13 @@ const K = O((e, l) => {
|
|
|
101
101
|
/* @__PURE__ */ a(
|
|
102
102
|
"div",
|
|
103
103
|
{
|
|
104
|
-
className:
|
|
105
|
-
|
|
106
|
-
o &&
|
|
107
|
-
e.
|
|
104
|
+
className: x(
|
|
105
|
+
i.accountMenu,
|
|
106
|
+
o && i.fullScreen,
|
|
107
|
+
e.virtualized && i.virtualized
|
|
108
108
|
),
|
|
109
109
|
children: /* @__PURE__ */ a(
|
|
110
|
-
|
|
110
|
+
L,
|
|
111
111
|
{
|
|
112
112
|
...e,
|
|
113
113
|
onSelectAccount: N,
|
|
@@ -118,16 +118,16 @@ const K = O((e, l) => {
|
|
|
118
118
|
value: S,
|
|
119
119
|
getResultsLabel: (s) => ne(s, v)
|
|
120
120
|
},
|
|
121
|
-
scrollRefStyles: !o && e.
|
|
121
|
+
scrollRefStyles: !o && e.virtualized ? { maxHeight: "calc(40vh)" } : void 0
|
|
122
122
|
}
|
|
123
123
|
)
|
|
124
124
|
}
|
|
125
125
|
),
|
|
126
|
-
f !== !0 && p && /* @__PURE__ */ a(
|
|
127
|
-
/* @__PURE__ */ a(
|
|
126
|
+
f !== !0 && p && /* @__PURE__ */ a(A, { variant: "ghost", onClick: M, children: o ? /* @__PURE__ */ m(w, { children: [
|
|
127
|
+
/* @__PURE__ */ a(W, { className: i.btnIcon, "aria-hidden": "true" }),
|
|
128
128
|
k
|
|
129
|
-
] }) : /* @__PURE__ */ m(
|
|
130
|
-
/* @__PURE__ */ a(
|
|
129
|
+
] }) : /* @__PURE__ */ m(w, { children: [
|
|
130
|
+
/* @__PURE__ */ a(D, { className: i.btnIcon, "aria-hidden": "true" }),
|
|
131
131
|
C
|
|
132
132
|
] }) })
|
|
133
133
|
] });
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
2
|
+
import { jsxs as l, jsx as o } from "react/jsx-runtime";
|
|
3
3
|
import { useIsDesktop as A } from "../../hooks/useIsDesktop.js";
|
|
4
4
|
import { AccountMenuButton as C } from "../Account/AccountMenuButton.js";
|
|
5
5
|
import { DropdownBase as G } from "../Dropdown/DropdownBase.js";
|
|
6
6
|
import { c as u } from "../../index-p1eeF8LQ.js";
|
|
7
|
-
import { DrawerBase as d } from "../Dropdown/DrawerBase.js";
|
|
8
|
-
import "../Button/Button.js";
|
|
9
7
|
import "react";
|
|
8
|
+
import "../Button/Button.js";
|
|
10
9
|
import { useRootContext as N } from "../RootProvider/RootProvider.js";
|
|
11
10
|
import { GlobalHeaderBase as b } from "./GlobalHeaderBase.js";
|
|
12
11
|
import "../Snackbar/useSnackbar.js";
|
|
12
|
+
import { DrawerBase as m } from "../Dropdown/DrawerBase.js";
|
|
13
13
|
import { GlobalMenu as f } from "../GlobalMenu/GlobalMenu.js";
|
|
14
14
|
import { GlobalMenuButton as v } from "../GlobalMenu/GlobalMenuButton.js";
|
|
15
15
|
import { AccountSelector as y } from "./AccountSelector.js";
|
|
@@ -17,61 +17,62 @@ import { GlobalSearch as D } from "./GlobalSearch.js";
|
|
|
17
17
|
import { GlobalSearchButton as H } from "./GlobalSearchButton.js";
|
|
18
18
|
import { HeaderGroup as I } from "./HeaderGroup.js";
|
|
19
19
|
import { HeaderLogo as L } from "./HeaderLogo.js";
|
|
20
|
-
import '../../assets/GlobalHeader.css';const T = "
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
20
|
+
import '../../assets/GlobalHeader.css';const T = "_logo_i35in_1", j = "_drawer_i35in_4", z = "_dropdown_i35in_9", M = "_relative_i35in_22", t = {
|
|
21
|
+
logo: T,
|
|
22
|
+
drawer: j,
|
|
23
|
+
dropdown: z,
|
|
24
|
+
relative: M
|
|
24
25
|
}, re = ({
|
|
25
|
-
globalMenu:
|
|
26
|
+
globalMenu: r,
|
|
26
27
|
desktopMenu: h,
|
|
27
28
|
mobileMenu: w,
|
|
28
|
-
globalSearch:
|
|
29
|
-
locale:
|
|
30
|
-
accountSelector:
|
|
31
|
-
logo:
|
|
32
|
-
badge:
|
|
33
|
-
onLoginClick:
|
|
29
|
+
globalSearch: c,
|
|
30
|
+
locale: d,
|
|
31
|
+
accountSelector: n,
|
|
32
|
+
logo: _ = {},
|
|
33
|
+
badge: g,
|
|
34
|
+
onLoginClick: k
|
|
34
35
|
}) => {
|
|
35
|
-
const { currentId: e, toggleId:
|
|
36
|
-
|
|
36
|
+
const { currentId: e, toggleId: a, openId: O, closeAll: i } = N(), x = () => {
|
|
37
|
+
a("search");
|
|
38
|
+
}, B = () => {
|
|
39
|
+
e === "account" || e === "accountFullscreen" ? i() : O("account");
|
|
37
40
|
}, F = () => {
|
|
38
|
-
|
|
39
|
-
},
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
/* @__PURE__ */ m(I, { children: [
|
|
45
|
-
r && /* @__PURE__ */ o(
|
|
41
|
+
a("menu");
|
|
42
|
+
}, p = e === "account" || e === "accountFullscreen" || n?.forceOpenFullScreen, s = A();
|
|
43
|
+
return /* @__PURE__ */ l(b, { currentId: e, openBackdrop: e === "menu", onCloseBackdrop: i, children: [
|
|
44
|
+
/* @__PURE__ */ o(L, { ..._, badge: g, className: t.logo }),
|
|
45
|
+
/* @__PURE__ */ l(I, { children: [
|
|
46
|
+
n && /* @__PURE__ */ o(
|
|
46
47
|
C,
|
|
47
48
|
{
|
|
48
|
-
currentAccount:
|
|
49
|
-
minimized: !
|
|
50
|
-
onClick:
|
|
49
|
+
currentAccount: n.accountMenu?.currentAccount,
|
|
50
|
+
minimized: !s,
|
|
51
|
+
onClick: n.accountMenu?.currentAccount ? B : k,
|
|
51
52
|
expanded: p,
|
|
52
|
-
loading:
|
|
53
|
-
disabled:
|
|
53
|
+
loading: n.loading,
|
|
54
|
+
disabled: n.forceOpenFullScreen
|
|
54
55
|
}
|
|
55
56
|
),
|
|
56
|
-
|
|
57
|
+
c && /* @__PURE__ */ o(
|
|
57
58
|
H,
|
|
58
59
|
{
|
|
59
|
-
onClick:
|
|
60
|
+
onClick: x,
|
|
60
61
|
expanded: e === "search",
|
|
61
|
-
disabled:
|
|
62
|
+
disabled: n?.forceOpenFullScreen
|
|
62
63
|
}
|
|
63
64
|
),
|
|
64
|
-
/* @__PURE__ */
|
|
65
|
+
/* @__PURE__ */ l("div", { className: t.relative, children: [
|
|
65
66
|
/* @__PURE__ */ o(
|
|
66
67
|
v,
|
|
67
68
|
{
|
|
68
|
-
onClick:
|
|
69
|
+
onClick: F,
|
|
69
70
|
expanded: e === "menu",
|
|
70
|
-
disabled:
|
|
71
|
-
label:
|
|
71
|
+
disabled: n?.forceOpenFullScreen,
|
|
72
|
+
label: r?.menuLabel
|
|
72
73
|
}
|
|
73
74
|
),
|
|
74
|
-
|
|
75
|
+
r && /* @__PURE__ */ o(
|
|
75
76
|
G,
|
|
76
77
|
{
|
|
77
78
|
layout: "desktop",
|
|
@@ -83,10 +84,10 @@ import '../../assets/GlobalHeader.css';const T = "_drawer_1r5ak_1", j = "_dropdo
|
|
|
83
84
|
children: /* @__PURE__ */ o(
|
|
84
85
|
f,
|
|
85
86
|
{
|
|
86
|
-
...
|
|
87
|
-
menu: h ||
|
|
88
|
-
onClose:
|
|
89
|
-
localeSwitcher:
|
|
87
|
+
...r,
|
|
88
|
+
menu: h || r?.menu,
|
|
89
|
+
onClose: i,
|
|
90
|
+
localeSwitcher: d,
|
|
90
91
|
isOpen: e === "menu"
|
|
91
92
|
}
|
|
92
93
|
)
|
|
@@ -94,32 +95,32 @@ import '../../assets/GlobalHeader.css';const T = "_drawer_1r5ak_1", j = "_dropdo
|
|
|
94
95
|
)
|
|
95
96
|
] })
|
|
96
97
|
] }),
|
|
97
|
-
|
|
98
|
+
r && /* @__PURE__ */ o(m, { open: e === "menu", className: t.drawer, children: /* @__PURE__ */ o(
|
|
98
99
|
f,
|
|
99
100
|
{
|
|
100
|
-
...
|
|
101
|
-
menu: w ||
|
|
102
|
-
onClose:
|
|
103
|
-
localeSwitcher:
|
|
101
|
+
...r,
|
|
102
|
+
menu: w || r?.menu,
|
|
103
|
+
onClose: i,
|
|
104
|
+
localeSwitcher: d,
|
|
104
105
|
isOpen: e === "menu"
|
|
105
106
|
}
|
|
106
107
|
) }),
|
|
107
|
-
|
|
108
|
-
|
|
108
|
+
n && /* @__PURE__ */ o(
|
|
109
|
+
m,
|
|
109
110
|
{
|
|
110
111
|
open: p,
|
|
111
112
|
className: u(t.drawer),
|
|
112
|
-
dataLayout:
|
|
113
|
-
children: /* @__PURE__ */ o(y, { ...
|
|
113
|
+
dataLayout: s ? "desktop" : "mobile",
|
|
114
|
+
children: /* @__PURE__ */ o(y, { ...n, forceOpenFullScreen: n.forceOpenFullScreen })
|
|
114
115
|
}
|
|
115
116
|
),
|
|
116
|
-
|
|
117
|
-
|
|
117
|
+
c && /* @__PURE__ */ o(
|
|
118
|
+
m,
|
|
118
119
|
{
|
|
119
120
|
open: e === "search",
|
|
120
121
|
className: u(t.drawer),
|
|
121
|
-
dataLayout:
|
|
122
|
-
children: /* @__PURE__ */ o(D, { ...
|
|
122
|
+
dataLayout: s ? "desktop" : "mobile",
|
|
123
|
+
children: /* @__PURE__ */ o(D, { ...c })
|
|
123
124
|
}
|
|
124
125
|
)
|
|
125
126
|
] });
|
|
@@ -6,7 +6,7 @@ import "../Button/Button.js";
|
|
|
6
6
|
import { useRootContext as v } from "../RootProvider/RootProvider.js";
|
|
7
7
|
import { s as o } from "../../globalSearch.module-DziLSGZg.js";
|
|
8
8
|
import "../Snackbar/useSnackbar.js";
|
|
9
|
-
import { S as r } from "../../index
|
|
9
|
+
import { S as r } from "../../index--jNxJmA8.js";
|
|
10
10
|
import { S as x } from "../../MagnifyingGlass-bwVhw07z.js";
|
|
11
11
|
const w = ({ onSearch: t }) => {
|
|
12
12
|
const i = k(), [n, u] = d(""), { languageCode: m, closeAll: p, currentId: s } = v(), { search: h, placeholder: c } = y(m), f = () => {
|
|
@@ -22,6 +22,7 @@ const G = ({ onClick: t, expanded: o, ...a }) => {
|
|
|
22
22
|
onClick: t,
|
|
23
23
|
"data-color": "neutral",
|
|
24
24
|
className: u.searchButton,
|
|
25
|
+
"aria-expanded": o,
|
|
25
26
|
children: [
|
|
26
27
|
o ? /* @__PURE__ */ s(h, { "aria-hidden": "true" }) : /* @__PURE__ */ s(f, { "aria-hidden": "true" }),
|
|
27
28
|
e ? r : null
|
|
@@ -1,56 +1,65 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import { useState as d, useEffect as
|
|
2
|
+
import { jsxs as s, jsx as o } from "react/jsx-runtime";
|
|
3
|
+
import { useState as d, useCallback as C, useEffect as G, useMemo as L } from "react";
|
|
4
|
+
import { Menu as B } from "../Menu/Menu.js";
|
|
4
5
|
import "../../index-p1eeF8LQ.js";
|
|
5
6
|
import "../Button/Button.js";
|
|
6
7
|
import "../RootProvider/RootProvider.js";
|
|
7
|
-
import { LocaleSwitcher as
|
|
8
|
+
import { LocaleSwitcher as S } from "./LocaleSwitcher.js";
|
|
8
9
|
import "../Snackbar/useSnackbar.js";
|
|
9
|
-
import { MenuListItem as
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
logoutButton: a,
|
|
10
|
+
import { MenuListItem as h } from "../Menu/MenuListItem.js";
|
|
11
|
+
import { BackButton as v } from "./BackButton.js";
|
|
12
|
+
import { GlobalMenuBase as u, GlobalMenuHeader as x, GlobalMenuFooter as j } from "./GlobalMenuBase.js";
|
|
13
|
+
import { LogoutButton as y } from "./LogoutButton.js";
|
|
14
|
+
import { S as A } from "../../Globe-BcPkcH4E.js";
|
|
15
|
+
const Q = ({
|
|
16
|
+
menu: e,
|
|
17
|
+
backLabel: k = "Back",
|
|
18
|
+
onClose: l,
|
|
19
|
+
logoutButton: n,
|
|
20
20
|
ariaLabel: m = "Menu",
|
|
21
|
-
localeSwitcher:
|
|
22
|
-
isOpen:
|
|
21
|
+
localeSwitcher: r,
|
|
22
|
+
isOpen: c = !1
|
|
23
23
|
}) => {
|
|
24
|
-
const [
|
|
25
|
-
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
}, [
|
|
30
|
-
const
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
e.onClick?.(), t?.();
|
|
34
|
-
},
|
|
35
|
-
items: Array.isArray(e.items) ? e.items.map((f) => ({
|
|
36
|
-
...f,
|
|
24
|
+
const [g, f] = d(!1), a = C(() => {
|
|
25
|
+
f((t) => !t);
|
|
26
|
+
}, []);
|
|
27
|
+
G(() => {
|
|
28
|
+
c || f(!1);
|
|
29
|
+
}, [c]);
|
|
30
|
+
const b = L(() => {
|
|
31
|
+
const t = (e?.items ?? []).map((i) => ({
|
|
32
|
+
...i,
|
|
37
33
|
onClick: () => {
|
|
38
|
-
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
34
|
+
i.onClick?.(), l?.();
|
|
35
|
+
},
|
|
36
|
+
items: Array.isArray(i.items) ? i.items.map((p) => ({
|
|
37
|
+
...p,
|
|
38
|
+
onClick: () => {
|
|
39
|
+
p.onClick?.(), l?.();
|
|
40
|
+
}
|
|
41
|
+
})) : void 0
|
|
42
|
+
}));
|
|
43
|
+
if (!r) return t;
|
|
44
|
+
const M = {
|
|
45
|
+
title: "Språk/language",
|
|
46
|
+
icon: A,
|
|
47
|
+
size: "sm",
|
|
48
|
+
onClick: a
|
|
49
|
+
};
|
|
50
|
+
return [...t, M];
|
|
51
|
+
}, [e, l, r, a]);
|
|
52
|
+
return g ? /* @__PURE__ */ s(u, { "aria-label": m, children: [
|
|
53
|
+
/* @__PURE__ */ s(x, { children: [
|
|
54
|
+
/* @__PURE__ */ o(v, { onClick: a, label: k }),
|
|
55
|
+
r && /* @__PURE__ */ o(S, { ...r })
|
|
46
56
|
] }),
|
|
47
|
-
/* @__PURE__ */ o(
|
|
48
|
-
] }) : /* @__PURE__ */
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
a && /* @__PURE__ */ o(x, { children: /* @__PURE__ */ o(v, { ...a }) })
|
|
57
|
+
/* @__PURE__ */ o(h, { as: "div", role: "separator" })
|
|
58
|
+
] }) : /* @__PURE__ */ s(u, { "aria-label": m, children: [
|
|
59
|
+
e && /* @__PURE__ */ o(B, { ...e, items: b }),
|
|
60
|
+
n && /* @__PURE__ */ o(j, { children: /* @__PURE__ */ o(y, { ...n }) })
|
|
52
61
|
] });
|
|
53
62
|
};
|
|
54
63
|
export {
|
|
55
|
-
|
|
64
|
+
Q as GlobalMenu
|
|
56
65
|
};
|