@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,58 +1,41 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
2
|
+
import { jsx as c } from "react/jsx-runtime";
|
|
3
3
|
import "../../index-p1eeF8LQ.js";
|
|
4
|
-
import a, { forwardRef as
|
|
4
|
+
import a, { forwardRef as f } from "react";
|
|
5
5
|
import "../Button/Button.js";
|
|
6
6
|
import "../RootProvider/RootProvider.js";
|
|
7
7
|
import "../Snackbar/useSnackbar.js";
|
|
8
8
|
import { MetaItem as m } from "../Metadata/MetaItem.js";
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
import { S as s } from "../../Eye-BrbjRZJp.js";
|
|
10
|
+
import { u as p } from "../../useId-BVFxCjkq.js";
|
|
11
|
+
var d = function(t, o) {
|
|
12
|
+
var l = {};
|
|
13
|
+
for (var e in t) Object.prototype.hasOwnProperty.call(t, e) && o.indexOf(e) < 0 && (l[e] = t[e]);
|
|
13
14
|
if (t != null && typeof Object.getOwnPropertySymbols == "function")
|
|
14
|
-
for (var
|
|
15
|
-
|
|
16
|
-
return
|
|
15
|
+
for (var r = 0, e = Object.getOwnPropertySymbols(t); r < e.length; r++)
|
|
16
|
+
o.indexOf(e[r]) < 0 && Object.prototype.propertyIsEnumerable.call(t, e[r]) && (l[e[r]] = t[e[r]]);
|
|
17
|
+
return l;
|
|
17
18
|
};
|
|
18
|
-
const
|
|
19
|
-
var { title:
|
|
20
|
-
let
|
|
21
|
-
return
|
|
19
|
+
const u = f((t, o) => {
|
|
20
|
+
var { title: l, titleId: e } = t, r = d(t, ["title", "titleId"]);
|
|
21
|
+
let n = p();
|
|
22
|
+
return n = l ? e || "title-" + n : void 0, a.createElement(
|
|
22
23
|
"svg",
|
|
23
|
-
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:
|
|
24
|
-
|
|
25
|
-
a.createElement("path", { fill: "currentColor", fillRule: "evenodd", d: "M4.148 12.317A10 10 0 0 1 3.905 12q.103-.14.243-.317c.35-.438.878-1.025 1.582-1.61C7.136 8.902 9.222 7.75 12 7.75a4.25 4.25 0 0 0 0 8.5c-2.778 0-4.864-1.152-6.27-2.323a11.3 11.3 0 0 1-1.582-1.61M12 16.25a4.25 4.25 0 0 0 0-8.5c2.778 0 4.864 1.152 6.27 2.323A11.3 11.3 0 0 1 20.095 12q-.103.14-.243.317a11.3 11.3 0 0 1-1.582 1.61c-1.406 1.171-3.492 2.323-6.27 2.323m0-10c-3.222 0-5.636 1.343-7.23 2.67a12.8 12.8 0 0 0-1.793 1.826 10 10 0 0 0-.576.796l-.05.08-.011.022a1 1 0 0 0-.037.078c-.012.032-.045.17-.053.278.008.108.041.246.053.278l.037.078.012.022.05.08q.04.069.12.182c.103.152.254.363.455.614.4.5.997 1.163 1.793 1.826 1.594 1.327 4.008 2.67 7.23 2.67s5.636-1.343 7.23-2.67a12.8 12.8 0 0 0 1.793-1.826 10 10 0 0 0 .576-.796l.035-.056.005-.009.01-.015.011-.022.016-.03c.004-.01.015-.033.02-.048.013-.032.046-.17.054-.278a1.4 1.4 0 0 0-.053-.278l-.021-.047q-.012-.024-.016-.031l-.02-.034-.006-.012a4 4 0 0 0-.155-.238 10 10 0 0 0-.456-.614c-.4-.5-.997-1.163-1.793-1.826-1.594-1.327-4.008-2.67-7.23-2.67M9.25 12a2.75 2.75 0 1 1 5.5 0 2.75 2.75 0 0 1-5.5 0", clipRule: "evenodd" })
|
|
26
|
-
);
|
|
27
|
-
});
|
|
28
|
-
var u = function(t, n) {
|
|
29
|
-
var r = {};
|
|
30
|
-
for (var e in t) Object.prototype.hasOwnProperty.call(t, e) && n.indexOf(e) < 0 && (r[e] = t[e]);
|
|
31
|
-
if (t != null && typeof Object.getOwnPropertySymbols == "function")
|
|
32
|
-
for (var l = 0, e = Object.getOwnPropertySymbols(t); l < e.length; l++)
|
|
33
|
-
n.indexOf(e[l]) < 0 && Object.prototype.propertyIsEnumerable.call(t, e[l]) && (r[e[l]] = t[e[l]]);
|
|
34
|
-
return r;
|
|
35
|
-
};
|
|
36
|
-
const b = i((t, n) => {
|
|
37
|
-
var { title: r, titleId: e } = t, l = u(t, ["title", "titleId"]);
|
|
38
|
-
let o = c();
|
|
39
|
-
return o = r ? e || "title-" + o : void 0, a.createElement(
|
|
40
|
-
"svg",
|
|
41
|
-
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: n, "aria-labelledby": o }, l),
|
|
42
|
-
r ? a.createElement("title", { id: o }, r) : null,
|
|
24
|
+
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),
|
|
25
|
+
l ? a.createElement("title", { id: n }, l) : null,
|
|
43
26
|
a.createElement("path", { fill: "currentColor", d: "M2.614 9.357a.75.75 0 0 1 1.029.257l.003.005.02.033.093.139c.085.123.214.303.39.522.35.438.877 1.024 1.581 1.61C7.137 13.097 9.223 14.25 12 14.25s4.863-1.154 6.27-2.326a11.4 11.4 0 0 0 1.582-1.611 9 9 0 0 0 .481-.661q.015-.023.02-.033l.004-.005a.75.75 0 0 1 1.286.772L21 10c.643.386.642.387.642.387v.002l-.004.005-.01.015-.032.051-.118.179c-.103.15-.255.36-.455.61-.304.38-.722.856-1.256 1.353l.841 1.002a.75.75 0 1 1-1.149.965l-.847-1.01c-.577.423-1.24.83-1.987 1.176l.497 1.17a.75.75 0 1 1-1.38.587l-.518-1.22c-.758.233-1.582.394-2.474.453V17a.75.75 0 0 1-1.5 0v-1.275a11 11 0 0 1-2.475-.453l-.516 1.215a.75.75 0 1 1-1.38-.586l.494-1.166a11.7 11.7 0 0 1-1.987-1.178l-.845 1.007a.75.75 0 1 1-1.15-.964l.84-1c-.533-.496-.95-.97-1.254-1.35a11 11 0 0 1-.574-.79l-.032-.05-.01-.016-.002-.005-.001-.002-.001-.001a.75.75 0 0 1 .257-1.03" })
|
|
44
27
|
);
|
|
45
|
-
}),
|
|
28
|
+
}), j = ({
|
|
46
29
|
size: t = "xs",
|
|
47
|
-
label:
|
|
48
|
-
seenByEndUser:
|
|
30
|
+
label: o = "Seen by label",
|
|
31
|
+
seenByEndUser: l = !1,
|
|
49
32
|
seenByOthersCount: e = 0,
|
|
50
|
-
onClick:
|
|
51
|
-
...
|
|
33
|
+
onClick: r,
|
|
34
|
+
...n
|
|
52
35
|
}) => {
|
|
53
|
-
const
|
|
54
|
-
return /* @__PURE__ */
|
|
36
|
+
const i = l || e > 0 ? s : u;
|
|
37
|
+
return /* @__PURE__ */ c(m, { size: t, icon: i, ...n, children: o });
|
|
55
38
|
};
|
|
56
39
|
export {
|
|
57
|
-
|
|
40
|
+
j as DialogSeenBy
|
|
58
41
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import "../../index-p1eeF8LQ.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import "../Button/Button.js";
|
|
5
5
|
import "../RootProvider/RootProvider.js";
|
|
6
|
+
import { TabMenu as t } from "../Menu/TabMenu.js";
|
|
6
7
|
import "../Snackbar/useSnackbar.js";
|
|
7
|
-
|
|
8
|
-
const f = ({ id: o = "dialog-tabs", items: r = [] }) => /* @__PURE__ */ t(i, { id: o, items: r });
|
|
8
|
+
const b = ({ items: o = [] }) => /* @__PURE__ */ r(t, { items: o });
|
|
9
9
|
export {
|
|
10
|
-
|
|
10
|
+
b as DialogTabs
|
|
11
11
|
};
|
|
@@ -16,18 +16,18 @@ const q = ({
|
|
|
16
16
|
expanded: d,
|
|
17
17
|
title: n,
|
|
18
18
|
items: e,
|
|
19
|
-
size:
|
|
19
|
+
size: m = "sm",
|
|
20
20
|
endUserLabel: g = "You"
|
|
21
21
|
}) => {
|
|
22
|
-
const [
|
|
22
|
+
const [i, f] = a(d || !t && !0);
|
|
23
23
|
return /* @__PURE__ */ p(B, { spacing: 1, children: [
|
|
24
|
-
n && /* @__PURE__ */ o(y, { children: t ? /* @__PURE__ */ o(c, {
|
|
24
|
+
n && /* @__PURE__ */ o(y, { children: t ? /* @__PURE__ */ o(c, { items: e, as: "button", onClick: () => {
|
|
25
25
|
f((r) => !r);
|
|
26
|
-
}, children: n }) : /* @__PURE__ */ o(c, {
|
|
27
|
-
n &&
|
|
28
|
-
|
|
26
|
+
}, children: n }) : /* @__PURE__ */ o(c, { items: e, as: "div", children: n }) }),
|
|
27
|
+
n && i && /* @__PURE__ */ o(s, {}),
|
|
28
|
+
i && /* @__PURE__ */ o(x, { size: m, spacing: 1, children: e?.map((r, u) => /* @__PURE__ */ p(h, { children: [
|
|
29
29
|
u > 0 && /* @__PURE__ */ o(s, {}),
|
|
30
|
-
/* @__PURE__ */ l(S, { ...r, key: r.id, size:
|
|
30
|
+
/* @__PURE__ */ l(S, { ...r, key: r.id, size: m, endUserLabel: g })
|
|
31
31
|
] }, r.id)) })
|
|
32
32
|
] });
|
|
33
33
|
};
|
|
@@ -1,12 +1,18 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsxs as n, jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import "../../index-p1eeF8LQ.js";
|
|
3
3
|
import "react";
|
|
4
|
-
import "../
|
|
4
|
+
import { AvatarGroup as u } from "../Avatar/AvatarGroup.js";
|
|
5
|
+
import { Button as p } from "../Button/Button.js";
|
|
5
6
|
import "../RootProvider/RootProvider.js";
|
|
6
|
-
import { MetaItemLabel as p } from "../Metadata/MetaItemLabel.js";
|
|
7
|
-
import { MetaItem as s } from "../Metadata/MetaItem.js";
|
|
8
7
|
import "../Snackbar/useSnackbar.js";
|
|
9
|
-
const
|
|
8
|
+
import '../../assets/SeenByLogButton.css';const l = "_button_deo1u_1", m = "_label_deo1u_12", i = "_avatarGroup_deo1u_16", t = {
|
|
9
|
+
button: l,
|
|
10
|
+
label: m,
|
|
11
|
+
avatarGroup: i
|
|
12
|
+
}, f = ({ as: s, items: o, children: a, onClick: e }) => /* @__PURE__ */ n(p, { variant: "ghost", as: s, size: "xs", className: t.button, onClick: e, children: [
|
|
13
|
+
o && /* @__PURE__ */ r(u, { items: o, className: t.avatarGroup }),
|
|
14
|
+
a && /* @__PURE__ */ r("span", { "data-size": "xs", className: t.label, children: a })
|
|
15
|
+
] });
|
|
10
16
|
export {
|
|
11
|
-
|
|
17
|
+
f as SeenByLogButton
|
|
12
18
|
};
|
|
@@ -2,12 +2,12 @@ import { jsxs as d, Fragment as n, jsx as o } from "react/jsx-runtime";
|
|
|
2
2
|
import "../../index-p1eeF8LQ.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import "../Button/Button.js";
|
|
5
|
-
import "../RootProvider/RootProvider.js";
|
|
6
5
|
import { Backdrop as s } from "./Backdrop.js";
|
|
7
6
|
import { DrawerHeader as c } from "./DrawerHeader.js";
|
|
8
7
|
import { DrawerFooter as l } from "./DrawerFooter.js";
|
|
9
8
|
import { DrawerButton as f } from "./DrawerButton.js";
|
|
10
9
|
import { DrawerBody as h } from "./DrawerBody.js";
|
|
10
|
+
import "../RootProvider/RootProvider.js";
|
|
11
11
|
import "../Snackbar/useSnackbar.js";
|
|
12
12
|
import '../../assets/DrawerOrDropdown.css';const w = "_drawerOrDropdown_h06dg_1", D = "_header_h06dg_19", _ = "_footer_h06dg_20", e = {
|
|
13
13
|
drawerOrDropdown: w,
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
import { jsxs as g, Fragment as U, jsx as c } from "react/jsx-runtime";
|
|
2
|
+
import { c as Y } from "../../index-p1eeF8LQ.js";
|
|
3
|
+
import { useRef as _, useEffect as x, useState as M, useCallback as O, useLayoutEffect as W } from "react";
|
|
4
|
+
import { Button as F } from "../Button/Button.js";
|
|
5
|
+
import "../RootProvider/RootProvider.js";
|
|
6
|
+
import "../Snackbar/useSnackbar.js";
|
|
7
|
+
import { S as G } from "../../XMark-tKk6aExO.js";
|
|
8
|
+
import '../../assets/Dropdown.css';const P = "_dropdown_4f5qx_1", $ = "_content_4f5qx_16", J = "_backdrop_4f5qx_43", Q = "_header_4f5qx_68", V = "_footer_4f5qx_69", Z = "_title_4f5qx_140", a = {
|
|
9
|
+
dropdown: P,
|
|
10
|
+
content: $,
|
|
11
|
+
backdrop: J,
|
|
12
|
+
header: Q,
|
|
13
|
+
footer: V,
|
|
14
|
+
title: Z
|
|
15
|
+
}, tt = "data-focus-guard", A = (l) => {
|
|
16
|
+
const v = [
|
|
17
|
+
"a[href]",
|
|
18
|
+
"button:not([disabled])",
|
|
19
|
+
"input:not([disabled])",
|
|
20
|
+
"select:not([disabled])",
|
|
21
|
+
"textarea:not([disabled])",
|
|
22
|
+
'[tabindex]:not([tabindex="-1"])',
|
|
23
|
+
'[contenteditable="true"]'
|
|
24
|
+
].join(",");
|
|
25
|
+
return Array.from(l.querySelectorAll(v)).filter((o) => !o.hasAttribute(tt)).filter((o) => !o.hasAttribute("disabled")).filter((o) => o.getAttribute("aria-hidden") !== "true").filter((o) => o.tabIndex !== -1).filter((o) => {
|
|
26
|
+
const u = o.getClientRects();
|
|
27
|
+
return u.length > 0 && u[0].width > 0 && u[0].height > 0;
|
|
28
|
+
});
|
|
29
|
+
}, et = (l) => {
|
|
30
|
+
A(l)[0]?.focus({ preventScroll: !0 });
|
|
31
|
+
}, lt = ({
|
|
32
|
+
id: l = "dropdown",
|
|
33
|
+
size: v = "sm",
|
|
34
|
+
className: o,
|
|
35
|
+
backdrop: u = !0,
|
|
36
|
+
placement: k = "bottom-left",
|
|
37
|
+
variant: D = "dropdown",
|
|
38
|
+
title: L = "Title",
|
|
39
|
+
closeLabel: q = "Close",
|
|
40
|
+
submitLabel: E,
|
|
41
|
+
trigger: z,
|
|
42
|
+
children: H,
|
|
43
|
+
open: e,
|
|
44
|
+
onClose: f,
|
|
45
|
+
onSubmit: C,
|
|
46
|
+
activeDescendantId: N
|
|
47
|
+
}) => {
|
|
48
|
+
const h = _(null), m = _(null), R = _(e);
|
|
49
|
+
x(() => {
|
|
50
|
+
R.current = e;
|
|
51
|
+
}, [e]);
|
|
52
|
+
const [y, B] = M({
|
|
53
|
+
yDir: k.includes("top") ? "top" : "bottom",
|
|
54
|
+
xDir: k.includes("right") ? "right" : "left",
|
|
55
|
+
maxHeight: 300
|
|
56
|
+
}), w = O(() => {
|
|
57
|
+
if (e && h.current && m.current) {
|
|
58
|
+
const t = h.current.getBoundingClientRect(), i = m.current.getBoundingClientRect(), n = window.innerHeight, r = window.innerWidth, s = 16, d = n - t.bottom, p = t.top, b = r - t.right - i.width, S = d < 250 && p > d, T = S ? "top" : "bottom", X = (S ? p : d) - s, j = b < s ? "right" : "left";
|
|
59
|
+
B((K) => ({
|
|
60
|
+
...K,
|
|
61
|
+
yDir: T,
|
|
62
|
+
maxHeight: X,
|
|
63
|
+
xDir: j
|
|
64
|
+
}));
|
|
65
|
+
}
|
|
66
|
+
}, [e]);
|
|
67
|
+
W(() => (w(), window.addEventListener("resize", w), () => window.removeEventListener("resize", w)), [w]), x(() => {
|
|
68
|
+
if (!e) return;
|
|
69
|
+
const t = requestAnimationFrame(() => {
|
|
70
|
+
const i = m.current;
|
|
71
|
+
if (!i) return;
|
|
72
|
+
const n = i.querySelector(
|
|
73
|
+
'input[type="search"]:not([disabled]), input[role="searchbox"]:not([disabled]), input[data-dropdown-search]:not([disabled])'
|
|
74
|
+
);
|
|
75
|
+
if (n) {
|
|
76
|
+
const r = n.value.length;
|
|
77
|
+
n.focus({ preventScroll: !0 });
|
|
78
|
+
try {
|
|
79
|
+
n.setSelectionRange(r, r);
|
|
80
|
+
} catch {
|
|
81
|
+
}
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
i.focus?.({ preventScroll: !0 });
|
|
85
|
+
});
|
|
86
|
+
return () => cancelAnimationFrame(t);
|
|
87
|
+
}, [e]), x(() => {
|
|
88
|
+
const t = (n) => {
|
|
89
|
+
n.key === "Escape" && f();
|
|
90
|
+
}, i = (n) => {
|
|
91
|
+
h.current && !h.current.contains(n.target) && f();
|
|
92
|
+
};
|
|
93
|
+
return e && (document.addEventListener("mousedown", i), document.addEventListener("keydown", t)), () => {
|
|
94
|
+
document.removeEventListener("mousedown", i), document.removeEventListener("keydown", t);
|
|
95
|
+
};
|
|
96
|
+
}, [e, f]), x(() => {
|
|
97
|
+
if (!e) return;
|
|
98
|
+
const t = m.current;
|
|
99
|
+
if (!t) return;
|
|
100
|
+
const i = (r) => {
|
|
101
|
+
if (!R.current)
|
|
102
|
+
return;
|
|
103
|
+
const s = r.target;
|
|
104
|
+
s && !t.contains(s) && et(t);
|
|
105
|
+
}, n = (r) => {
|
|
106
|
+
if (r.key !== "Tab") return;
|
|
107
|
+
const s = A(t);
|
|
108
|
+
if (s.length === 0) {
|
|
109
|
+
r.preventDefault(), t.focus?.({ preventScroll: !0 });
|
|
110
|
+
return;
|
|
111
|
+
}
|
|
112
|
+
const d = s[0], p = s[s.length - 1], b = document.activeElement;
|
|
113
|
+
r.shiftKey ? b === d && (r.preventDefault(), p.focus({ preventScroll: !0 })) : b === p && (r.preventDefault(), d.focus({ preventScroll: !0 }));
|
|
114
|
+
};
|
|
115
|
+
return document.addEventListener("focusin", i), document.addEventListener("keydown", n), () => {
|
|
116
|
+
document.removeEventListener("focusin", i), document.removeEventListener("keydown", n);
|
|
117
|
+
};
|
|
118
|
+
}, [e]);
|
|
119
|
+
const I = {
|
|
120
|
+
position: "absolute",
|
|
121
|
+
zIndex: 50,
|
|
122
|
+
width: "max-content",
|
|
123
|
+
maxHeight: `${y.maxHeight}px`,
|
|
124
|
+
overflowY: "auto",
|
|
125
|
+
[y.xDir]: 0,
|
|
126
|
+
[y.yDir === "bottom" ? "top" : "bottom"]: "100%"
|
|
127
|
+
};
|
|
128
|
+
return /* @__PURE__ */ g(U, { children: [
|
|
129
|
+
u && /* @__PURE__ */ c("div", { className: a.backdrop, "aria-hidden": !e }),
|
|
130
|
+
/* @__PURE__ */ g("div", { id: l + "-root", ref: h, style: { position: "relative", display: "inline-block" }, children: [
|
|
131
|
+
z,
|
|
132
|
+
/* @__PURE__ */ g(
|
|
133
|
+
"div",
|
|
134
|
+
{
|
|
135
|
+
ref: m,
|
|
136
|
+
className: Y(a.dropdown, o),
|
|
137
|
+
style: I,
|
|
138
|
+
"aria-hidden": !e,
|
|
139
|
+
"data-variant": D,
|
|
140
|
+
"data-size": v,
|
|
141
|
+
tabIndex: -1,
|
|
142
|
+
role: "menu",
|
|
143
|
+
"aria-modal": D === "drawer-dropdown" ? !0 : void 0,
|
|
144
|
+
"aria-activedescendant": N,
|
|
145
|
+
children: [
|
|
146
|
+
/* @__PURE__ */ g("header", { className: a.header, children: [
|
|
147
|
+
/* @__PURE__ */ c("h2", { className: a.title, children: L }),
|
|
148
|
+
/* @__PURE__ */ c(F, { size: "sm", variant: "outline", onClick: f, "aria-label": q, children: /* @__PURE__ */ c(G, {}) })
|
|
149
|
+
] }),
|
|
150
|
+
/* @__PURE__ */ c("div", { className: a.content, children: H }),
|
|
151
|
+
E && /* @__PURE__ */ c("footer", { className: a.footer, children: /* @__PURE__ */ c(F, { size: "lg", variant: "solid", onClick: C || f, rounded: !0, children: /* @__PURE__ */ c("span", { "data-size": "md", children: E }) }) })
|
|
152
|
+
]
|
|
153
|
+
}
|
|
154
|
+
)
|
|
155
|
+
] })
|
|
156
|
+
] });
|
|
157
|
+
};
|
|
158
|
+
export {
|
|
159
|
+
lt as Dropdown
|
|
160
|
+
};
|
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
import { jsx as i } from "react/jsx-runtime";
|
|
2
2
|
import { c } from "../../index-p1eeF8LQ.js";
|
|
3
|
-
import { useRef as
|
|
4
|
-
import { useClickOutside as
|
|
3
|
+
import { useRef as f } from "react";
|
|
4
|
+
import { useClickOutside as l } from "../../hooks/useClickOutside.js";
|
|
5
5
|
import "../Button/Button.js";
|
|
6
6
|
import "../RootProvider/RootProvider.js";
|
|
7
7
|
import "../Snackbar/useSnackbar.js";
|
|
8
|
-
import '../../assets/DropdownBase.css';const u = "
|
|
8
|
+
import '../../assets/DropdownBase.css';const u = "_dropdown_fqgmt_1", w = {
|
|
9
9
|
dropdown: u
|
|
10
|
-
},
|
|
10
|
+
}, q = ({
|
|
11
11
|
layout: t,
|
|
12
12
|
size: a = "auto",
|
|
13
13
|
placement: d = "left",
|
|
14
14
|
padding: e = !0,
|
|
15
15
|
open: r = !1,
|
|
16
16
|
className: n,
|
|
17
|
-
children:
|
|
18
|
-
onClose:
|
|
19
|
-
as:
|
|
17
|
+
children: m,
|
|
18
|
+
onClose: p,
|
|
19
|
+
as: s = "div"
|
|
20
20
|
}) => {
|
|
21
|
-
const o =
|
|
22
|
-
return
|
|
23
|
-
|
|
21
|
+
const o = f(null);
|
|
22
|
+
return l(o, p), /* @__PURE__ */ i(
|
|
23
|
+
s,
|
|
24
24
|
{
|
|
25
25
|
ref: o,
|
|
26
26
|
className: c(w.dropdown, n),
|
|
@@ -31,10 +31,10 @@ import '../../assets/DropdownBase.css';const u = "_dropdown_1tyzv_1", w = {
|
|
|
31
31
|
"data-placement": d,
|
|
32
32
|
"data-padding": e,
|
|
33
33
|
"data-expanded": r,
|
|
34
|
-
children:
|
|
34
|
+
children: m
|
|
35
35
|
}
|
|
36
36
|
);
|
|
37
37
|
};
|
|
38
38
|
export {
|
|
39
|
-
|
|
39
|
+
q as DropdownBase
|
|
40
40
|
};
|
|
@@ -1,91 +1,136 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import { useRef as
|
|
4
|
-
import { useClickOutside as
|
|
5
|
-
import { useMenu as
|
|
2
|
+
import { jsxs as q, jsx as c } from "react/jsx-runtime";
|
|
3
|
+
import { useRef as u, useEffect as d } from "react";
|
|
4
|
+
import { useClickOutside as z } from "../../hooks/useClickOutside.js";
|
|
5
|
+
import { useMenu as B } from "../../hooks/useMenu.js";
|
|
6
6
|
import "../../index-p1eeF8LQ.js";
|
|
7
|
-
import { Icon as
|
|
8
|
-
import { Button as
|
|
9
|
-
import { ButtonIcon as
|
|
10
|
-
import { useRootContext as
|
|
7
|
+
import { Icon as O } from "../Icon/Icon.js";
|
|
8
|
+
import { Button as D } from "../Button/Button.js";
|
|
9
|
+
import { ButtonIcon as $ } from "../Button/ButtonIcon.js";
|
|
10
|
+
import { useRootContext as G } from "../RootProvider/RootProvider.js";
|
|
11
11
|
import "../Snackbar/useSnackbar.js";
|
|
12
|
-
import '../../assets/FloatingDropdown.css';const
|
|
13
|
-
container:
|
|
14
|
-
button:
|
|
15
|
-
dropdown:
|
|
16
|
-
dropdownItem:
|
|
17
|
-
itemTitle:
|
|
18
|
-
},
|
|
19
|
-
variant:
|
|
20
|
-
size:
|
|
21
|
-
icon:
|
|
22
|
-
iconOpen:
|
|
23
|
-
iconSize:
|
|
24
|
-
iconAltText:
|
|
25
|
-
id:
|
|
26
|
-
color:
|
|
27
|
-
items:
|
|
28
|
-
"data-testid":
|
|
12
|
+
import '../../assets/FloatingDropdown.css';const H = "_container_dqumv_1", J = "_button_dqumv_13", P = "_dropdown_dqumv_21", Q = "_dropdownItem_dqumv_45", U = "_itemTitle_dqumv_75", i = {
|
|
13
|
+
container: H,
|
|
14
|
+
button: J,
|
|
15
|
+
dropdown: P,
|
|
16
|
+
dropdownItem: Q,
|
|
17
|
+
itemTitle: U
|
|
18
|
+
}, st = ({
|
|
19
|
+
variant: F = "solid",
|
|
20
|
+
size: C,
|
|
21
|
+
icon: L,
|
|
22
|
+
iconOpen: p,
|
|
23
|
+
iconSize: R,
|
|
24
|
+
iconAltText: S,
|
|
25
|
+
id: a = "floatingDropdown",
|
|
26
|
+
color: v = "company",
|
|
27
|
+
items: A,
|
|
28
|
+
"data-testid": M
|
|
29
29
|
}) => {
|
|
30
|
-
const { currentId:
|
|
31
|
-
|
|
32
|
-
},
|
|
33
|
-
|
|
34
|
-
}, { menu: E, setActiveIndex: p } = R({
|
|
35
|
-
items: C,
|
|
30
|
+
const { currentId: N, toggleId: l } = G(), t = N === a, b = u(t), f = u(null), m = u(null), w = u(null), T = (e) => (n) => {
|
|
31
|
+
e(n), l(a);
|
|
32
|
+
}, { menu: K, setActiveIndex: g, activeIndex: _ } = B({
|
|
33
|
+
items: A,
|
|
36
34
|
groups: { ungrouped: {} },
|
|
37
|
-
keyboardEvents:
|
|
38
|
-
|
|
39
|
-
ref: s
|
|
35
|
+
keyboardEvents: t,
|
|
36
|
+
ref: f
|
|
40
37
|
});
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
38
|
+
d(() => {
|
|
39
|
+
const e = b.current;
|
|
40
|
+
b.current = t, e && !t && w.current?.focus();
|
|
41
|
+
}, [t]), d(() => {
|
|
42
|
+
t && g(0);
|
|
43
|
+
}, [t, g]), d(() => {
|
|
44
|
+
if (!t) return;
|
|
45
|
+
const e = requestAnimationFrame(() => {
|
|
46
|
+
m.current?.focus({ preventScroll: !0 });
|
|
47
|
+
});
|
|
48
|
+
return () => cancelAnimationFrame(e);
|
|
49
|
+
}, [t]), d(() => {
|
|
50
|
+
if (!t) return;
|
|
51
|
+
const e = m.current;
|
|
52
|
+
if (!e) return;
|
|
53
|
+
const n = () => Array.from(e.querySelectorAll('button:not([disabled]), [tabindex]:not([tabindex="-1"])')).filter(
|
|
54
|
+
(o) => o.tabIndex !== -1
|
|
55
|
+
), s = () => {
|
|
56
|
+
n()[0]?.focus({ preventScroll: !0 });
|
|
57
|
+
}, y = (o) => {
|
|
58
|
+
const r = o.target;
|
|
59
|
+
r && !e.contains(r) && s();
|
|
60
|
+
}, h = (o) => {
|
|
61
|
+
if (o.key !== "Tab") return;
|
|
62
|
+
const r = n();
|
|
63
|
+
if (r.length === 0) {
|
|
64
|
+
o.preventDefault(), e.focus({ preventScroll: !0 });
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
const x = r[0], E = r[r.length - 1], k = document.activeElement;
|
|
68
|
+
o.shiftKey && k === x ? (o.preventDefault(), E.focus({ preventScroll: !0 })) : !o.shiftKey && k === E && (o.preventDefault(), x.focus({ preventScroll: !0 }));
|
|
69
|
+
};
|
|
70
|
+
return document.addEventListener("focusin", y), document.addEventListener("keydown", h), () => {
|
|
71
|
+
document.removeEventListener("focusin", y), document.removeEventListener("keydown", h);
|
|
72
|
+
};
|
|
73
|
+
}, [t]), z(f, () => {
|
|
74
|
+
t && l(a);
|
|
45
75
|
});
|
|
46
|
-
const
|
|
47
|
-
return /* @__PURE__ */
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
76
|
+
const I = t && p ? p : L, j = t && _ >= 0 ? `floating-dropdown-button-${_}` : void 0;
|
|
77
|
+
return /* @__PURE__ */ q("div", { className: i.container, ref: f, children: [
|
|
78
|
+
t && /* @__PURE__ */ c(
|
|
79
|
+
"div",
|
|
80
|
+
{
|
|
81
|
+
id: "floating-dropdown-menu",
|
|
82
|
+
className: i.dropdown,
|
|
83
|
+
"data-color": v,
|
|
84
|
+
role: "menu",
|
|
85
|
+
"aria-labelledby": "floating-dropdown-button",
|
|
86
|
+
"aria-activedescendant": j,
|
|
87
|
+
tabIndex: -1,
|
|
88
|
+
ref: m,
|
|
89
|
+
children: K[0]?.items.map((e, n) => {
|
|
90
|
+
const s = e.props;
|
|
91
|
+
return /* @__PURE__ */ q(
|
|
92
|
+
D,
|
|
93
|
+
{
|
|
94
|
+
id: "floating-dropdown-button-" + n,
|
|
95
|
+
className: i.dropdownItem,
|
|
96
|
+
onClick: T(s.onClick),
|
|
97
|
+
type: "button",
|
|
98
|
+
role: "menuitem",
|
|
99
|
+
tabIndex: -1,
|
|
100
|
+
"data-active": e.active,
|
|
101
|
+
onMouseEnter: e.onMouseEnter,
|
|
102
|
+
onMouseLeave: e.onMouseLeave,
|
|
103
|
+
children: [
|
|
104
|
+
/* @__PURE__ */ c(O, { svgElement: s.icon, size: "md", color: "inherit" }),
|
|
105
|
+
/* @__PURE__ */ c("span", { className: i.itemTitle, children: s.title })
|
|
106
|
+
]
|
|
107
|
+
},
|
|
108
|
+
n
|
|
109
|
+
);
|
|
110
|
+
})
|
|
111
|
+
}
|
|
112
|
+
),
|
|
113
|
+
/* @__PURE__ */ c(
|
|
114
|
+
D,
|
|
71
115
|
{
|
|
72
|
-
className:
|
|
73
|
-
variant:
|
|
74
|
-
color:
|
|
75
|
-
size:
|
|
76
|
-
onClick: () =>
|
|
77
|
-
"data-testid":
|
|
78
|
-
"aria-label":
|
|
79
|
-
"aria-expanded":
|
|
116
|
+
className: i.button,
|
|
117
|
+
variant: F,
|
|
118
|
+
color: v,
|
|
119
|
+
size: C,
|
|
120
|
+
onClick: () => l(a),
|
|
121
|
+
"data-testid": M,
|
|
122
|
+
"aria-label": S,
|
|
123
|
+
"aria-expanded": t,
|
|
80
124
|
"aria-haspopup": "menu",
|
|
81
125
|
id: "floating-dropdown-button",
|
|
82
|
-
ref:
|
|
126
|
+
ref: w,
|
|
83
127
|
autoFocus: !1,
|
|
84
|
-
|
|
128
|
+
"aria-controls": t ? "floating-dropdown-menu" : void 0,
|
|
129
|
+
children: I && /* @__PURE__ */ c($, { icon: I, size: R })
|
|
85
130
|
}
|
|
86
131
|
)
|
|
87
132
|
] });
|
|
88
133
|
};
|
|
89
134
|
export {
|
|
90
|
-
|
|
135
|
+
st as FloatingDropdown
|
|
91
136
|
};
|
|
@@ -1,20 +1,22 @@
|
|
|
1
1
|
import { DropdownBase as e } from "./DropdownBase.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
2
|
+
import { Dropdown as t } from "./Dropdown.js";
|
|
3
|
+
import { Backdrop as f } from "./Backdrop.js";
|
|
4
|
+
import { DrawerBase as w } from "./DrawerBase.js";
|
|
5
|
+
import { DrawerHeader as D } from "./DrawerHeader.js";
|
|
6
|
+
import { DrawerFooter as n } from "./DrawerFooter.js";
|
|
7
|
+
import { DrawerButton as s } from "./DrawerButton.js";
|
|
8
|
+
import { DrawerBody as c } from "./DrawerBody.js";
|
|
9
|
+
import { DrawerOrDropdown as i } from "./DrawerOrDropdown.js";
|
|
10
|
+
import { FloatingDropdown as l } from "./FloatingDropdown.js";
|
|
10
11
|
export {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
12
|
+
f as Backdrop,
|
|
13
|
+
w as DrawerBase,
|
|
14
|
+
c as DrawerBody,
|
|
15
|
+
s as DrawerButton,
|
|
16
|
+
n as DrawerFooter,
|
|
17
|
+
D as DrawerHeader,
|
|
18
|
+
i as DrawerOrDropdown,
|
|
19
|
+
t as Dropdown,
|
|
18
20
|
e as DropdownBase,
|
|
19
|
-
|
|
21
|
+
l as FloatingDropdown
|
|
20
22
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { A as o } from "../../alert-BzifOfXl.js";
|
|
2
|
-
import { B as D, C as r, a as t, b as i, D as n, L as p, c as x, d as f, P as m, e as S, S as d, f as g, T as l, u as P } from "../../textfield-
|
|
2
|
+
import { B as D, C as r, a as t, b as i, D as n, L as p, c as x, d as f, P as m, e as S, S as d, f as g, T as l, u as P } from "../../textfield-Drdr9bio.js";
|
|
3
3
|
import { B as h, S as c } from "../../button-BB5sYVKY.js";
|
|
4
4
|
import { H as C, S as L } from "../../switch-Cemfhx0H.js";
|
|
5
5
|
import { D as u } from "../../index-Q0EA2XB0.js";
|
|
6
6
|
import { P as A } from "../../paragraph-BRiIBpbY.js";
|
|
7
|
-
import { S as V } from "../../index
|
|
7
|
+
import { S as V } from "../../index--jNxJmA8.js";
|
|
8
8
|
import { V as w } from "../../index-z82sbSVU.js";
|
|
9
9
|
export {
|
|
10
10
|
o as DsAlert,
|