@altinn/altinn-components 0.68.0 → 0.68.1
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/ToolbarSearch-CpAUv-Lw.js +2010 -0
- package/dist/assets/DatepickerTable.css +1 -1
- package/dist/assets/DialogBody.css +1 -0
- package/dist/components/AccessAreaListItem/AccessAreaListItem.js +1 -1
- package/dist/components/AccessPackageListItem/AccessPackageListItem.js +1 -1
- package/dist/components/Account/AccountList.js +1 -1
- package/dist/components/Account/AccountListItem.js +1 -1
- package/dist/components/Account/AccountListItemControls.js +1 -1
- package/dist/components/Account/AccountListItemDetails.js +1 -1
- package/dist/components/Account/AccountListVirtual.js +1 -1
- package/dist/components/Account/AccountMenu.js +1 -1
- package/dist/components/Account/AccountNotificationSettings.js +1 -1
- package/dist/components/Account/AccountOrganization.js +1 -1
- package/dist/components/AccountSelector/AccountSelector.js +1 -1
- package/dist/components/ActivityLog/ActivityLog.js +1 -1
- package/dist/components/ActivityLog/ActivityLogItem.js +1 -1
- package/dist/components/ActivityLog/ActivityLogSegment.js +1 -1
- package/dist/components/Alert/Alert.js +1 -1
- package/dist/components/Article/Article.js +1 -1
- package/dist/components/Article/ArticleContact.js +1 -1
- package/dist/components/Article/ArticleHeader.js +1 -1
- package/dist/components/Attachment/AttachmentLink.js +1 -1
- package/dist/components/AuthEvidence/AuthEvidence.js +1 -1
- package/dist/components/AuthEvidence/AuthEvidenceItem.js +1 -1
- package/dist/components/AuthEvidence/AuthEvidenceOwner.js +1 -1
- package/dist/components/AuthEvidence/AuthEvidenceParent.js +1 -1
- package/dist/components/AuthEvidence/AuthEvidenceService.js +1 -1
- package/dist/components/Badge/Badge.js +1 -1
- package/dist/components/Badge/index.js +1 -1
- package/dist/components/Banner/Banner.js +1 -1
- package/dist/components/Bookmarks/BookmarkModal.js +1 -1
- package/dist/components/Bookmarks/BookmarkSettingsItem.js +1 -1
- package/dist/components/Bookmarks/BookmarkSettingsItemLabel.js +1 -1
- package/dist/components/Bookmarks/BookmarkSettingsList.js +1 -1
- package/dist/components/Breadcrumbs/Breadcrumbs.js +1 -1
- package/dist/components/Bulk/BulkHeader.js +1 -1
- package/dist/components/Button/ButtonIcon.js +1 -1
- package/dist/components/Button/ComboButton.js +1 -1
- package/dist/components/Button/FloatingActionButton.js +1 -1
- package/dist/components/Button/IconButton.js +1 -1
- package/dist/components/Byline/Byline.js +1 -1
- package/dist/components/Byline/index.js +1 -1
- package/dist/components/ContextMenu/ContextMenu.js +1 -1
- package/dist/components/Dashboard/DashboardCard.js +1 -1
- package/dist/components/Dashboard/DashboardHeader.js +1 -1
- package/dist/components/Datepicker/Datepicker.js +54 -25
- package/dist/components/Datepicker/DatepickerHeader.js +32 -26
- package/dist/components/Datepicker/DatepickerTable.js +30 -25
- package/dist/components/Dialog/Dialog.js +1 -1
- package/dist/components/Dialog/DialogActions.js +1 -1
- package/dist/components/Dialog/DialogActivityLog.js +1 -1
- package/dist/components/Dialog/DialogAttachments.js +1 -1
- package/dist/components/Dialog/DialogBody.js +35 -23
- package/dist/components/Dialog/DialogByline.js +1 -1
- package/dist/components/Dialog/DialogContact.js +1 -1
- package/dist/components/Dialog/DialogHeader.js +1 -1
- package/dist/components/Dialog/DialogHistory.js +1 -1
- package/dist/components/Dialog/DialogHistoryItem.js +1 -1
- package/dist/components/Dialog/DialogHistorySegment.js +1 -1
- package/dist/components/Dialog/DialogLayout.js +1 -1
- package/dist/components/Dialog/DialogList.js +1 -1
- package/dist/components/Dialog/DialogListItem.js +1 -1
- package/dist/components/Dialog/DialogMetadata.js +1 -1
- package/dist/components/Dialog/DialogSection.js +1 -1
- package/dist/components/Dialog/DialogSeenBy.js +1 -1
- package/dist/components/Dialog/DialogSelect.js +1 -1
- package/dist/components/Dialog/DialogStatus.js +1 -1
- package/dist/components/Dialog/DialogTabs.js +1 -1
- package/dist/components/Dialog/SeenByLog.js +1 -1
- package/dist/components/Dialog/SeenByLogButton.js +1 -1
- package/dist/components/Dialog/SeenByLogItem.js +1 -1
- package/dist/components/Dialog/index.js +1 -1
- package/dist/components/Dropdown/DrawerButton.js +1 -1
- package/dist/components/Dropdown/DrawerHeader.js +1 -1
- package/dist/components/Dropdown/Dropdown.js +1 -1
- package/dist/components/Dropdown/DropdownBase.js +1 -1
- package/dist/components/Dropdown/FloatingDropdown.js +1 -1
- package/dist/components/Dropdown/index.js +1 -1
- package/dist/components/Forms/Checkbox.js +1 -1
- package/dist/components/Forms/CheckboxOptions.js +1 -1
- package/dist/components/Forms/FieldBase.js +1 -1
- package/dist/components/Forms/FieldsetBase.js +1 -1
- package/dist/components/Forms/Radio.js +1 -1
- package/dist/components/Forms/RadioOptions.js +1 -1
- package/dist/components/Forms/SearchField.js +1 -1
- package/dist/components/Forms/SelectField.js +1 -1
- package/dist/components/Forms/Switch.js +1 -1
- package/dist/components/Forms/SwitchOptions.js +1 -1
- package/dist/components/Forms/TextField.js +1 -1
- package/dist/components/Forms/TextFieldDropdown.js +1 -1
- package/dist/components/Forms/TextareaField.js +1 -1
- package/dist/components/Forms/index.js +1 -1
- package/dist/components/GlobalHeader/GlobalAccountButton.js +1 -1
- package/dist/components/GlobalHeader/GlobalHeader.js +1 -1
- package/dist/components/GlobalHeader/GlobalMenuButton.js +1 -1
- package/dist/components/GlobalHeader/HeaderDrawer.js +1 -1
- package/dist/components/GlobalHeader/HeaderDropdown.js +1 -1
- package/dist/components/GlobalHeader/HeaderLogo.js +1 -1
- package/dist/components/GlobalMenu/GlobalMenu.js +1 -1
- package/dist/components/GlobalMenu/LocaleSwitcher.js +1 -1
- package/dist/components/GlobalMenu/LogoutButton.js +1 -1
- package/dist/components/Icon/Icon.js +1 -1
- package/dist/components/Icon/index.js +1 -1
- package/dist/components/Inbox/InboxPage.js +1 -1
- package/dist/components/InboxSearch/InboxSearch.js +1 -1
- package/dist/components/Item/ItemLabel.js +1 -1
- package/dist/components/Item/ItemMedia.js +1 -1
- package/dist/components/Item/ItemSelect.js +1 -1
- package/dist/components/Item/index.js +1 -1
- package/dist/components/Layout/Layout.js +1 -1
- package/dist/components/List/List.js +1 -1
- package/dist/components/List/ListBase.js +1 -1
- package/dist/components/List/ListItemHeader.js +1 -1
- package/dist/components/List/ListItemIcon.js +1 -1
- package/dist/components/List/ListItemLabel.js +1 -1
- package/dist/components/Menu/Menu.js +1 -1
- package/dist/components/Menu/MenuItem.js +1 -1
- package/dist/components/Menu/MenuItems.js +1 -1
- package/dist/components/Menu/MenuListGroup.js +16 -5
- package/dist/components/Menu/MenuListHeading.js +4 -4
- package/dist/components/Menu/MenuListSearch.js +1 -1
- package/dist/components/Menu/MenuOption.js +1 -1
- package/dist/components/Menu/TabMenu.js +1 -1
- package/dist/components/Menu/VirtualizedMenuItems.js +1 -1
- package/dist/components/Menu/index.js +1 -1
- package/dist/components/Menu/useMenuSearch.js +1 -1
- package/dist/components/Metadata/MetaItem.js +1 -1
- package/dist/components/Metadata/MetaItemIcon.js +1 -1
- package/dist/components/Metadata/MetaTimestamp.js +1 -1
- package/dist/components/Metadata/Metadata.js +1 -1
- package/dist/components/Metadata/index.js +1 -1
- package/dist/components/Modal/Modal.js +1 -1
- package/dist/components/Modal/ModalBase.js +1 -1
- package/dist/components/Modal/ModalHeader.js +1 -1
- package/dist/components/Modal/ModalIcon.js +1 -1
- package/dist/components/Notifications/NotificationItem.js +1 -1
- package/dist/components/Notifications/NotificationItemBase.js +1 -1
- package/dist/components/Notifications/NotificationItemControls.js +1 -1
- package/dist/components/Notifications/NotificationItemIcon.js +1 -1
- package/dist/components/Page/AccordionSection.js +1 -1
- package/dist/components/Page/ContactButtons.js +1 -1
- package/dist/components/Page/ContactSection.js +1 -1
- package/dist/components/Page/PageMenu.js +1 -1
- package/dist/components/Page/PageNav.js +1 -1
- package/dist/components/Page/Section.js +1 -1
- package/dist/components/Pagination/Pagination.js +1 -1
- package/dist/components/ResourceListItem/ResourceListItem.js +1 -1
- package/dist/components/RootProvider/RootProvider.js +1 -1
- package/dist/components/RootProvider/index.js +1 -1
- package/dist/components/Search/SearchItem.js +1 -1
- package/dist/components/Searchbar/Autocomplete.js +1 -1
- package/dist/components/Searchbar/AutocompleteItem.js +1 -1
- package/dist/components/Searchbar/Searchbar.js +1 -1
- package/dist/components/Searchbar/SearchbarField.js +1 -1
- package/dist/components/Settings/SettingsItem.js +1 -1
- package/dist/components/Settings/SettingsItemBase.js +1 -1
- package/dist/components/Settings/SettingsList.js +1 -1
- package/dist/components/Settings/SettingsListVirtual.js +1 -1
- package/dist/components/Settings/SettingsModal.js +1 -1
- package/dist/components/Settings/SettingsSection.js +1 -1
- package/dist/components/Settings/UsedByLog.js +1 -1
- package/dist/components/Settings/UsedByLogItem.js +1 -1
- package/dist/components/Snackbar/SnackbarItem.js +1 -1
- package/dist/components/Timeline/Timeline.js +1 -1
- package/dist/components/Timeline/TimelineActivity.js +1 -1
- package/dist/components/Timeline/TimelineBase.js +1 -1
- package/dist/components/Timeline/TimelineFooter.js +1 -1
- package/dist/components/Timeline/TimelineHeader.js +1 -1
- package/dist/components/Timeline/TimelineIcon.js +1 -1
- package/dist/components/Timeline/TimelineSection.js +1 -1
- package/dist/components/Timeline/TimelineSegment.js +1 -1
- package/dist/components/Toolbar/DatepickerFilter.js +45 -25
- package/dist/components/Toolbar/SelectDateFilter.js +1 -1
- package/dist/components/Toolbar/Toolbar.js +1 -1
- package/dist/components/Toolbar/ToolbarFilter.js +1 -1
- package/dist/components/Toolbar/ToolbarFilterAddMenu.js +1 -1
- package/dist/components/Toolbar/ToolbarFilterButton.js +37 -22
- package/dist/components/Toolbar/ToolbarFilterMenu.js +102 -92
- package/dist/components/Toolbar/ToolbarMenu.js +1 -1
- package/dist/components/Toolbar/ToolbarSearch.js +1 -1
- package/dist/components/Toolbar/index.js +1 -1
- package/dist/components/Toolbar/useFilter.js +8 -8
- package/dist/components/Transmission/Transmission.js +1 -1
- package/dist/components/Transmission/TransmissionList.js +1 -1
- package/dist/components/Transmission/TransmissionType.js +1 -1
- package/dist/components/Typography/Heading.js +1 -1
- package/dist/components/Typography/index.js +1 -1
- package/dist/components/UserListItem/UserListItem.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/hooks/useAccountSelector.js +1 -1
- package/dist/hooks/useMenu.js +35 -35
- package/dist/index.js +1 -1
- package/dist/types/lib/components/Datepicker/DatepickerAccessibility.stories.d.ts +15 -0
- package/dist/types/lib/components/Datepicker/DatepickerHeader.d.ts +3 -1
- package/dist/types/lib/components/Datepicker/DatepickerTable.d.ts +10 -1
- package/dist/types/lib/components/Menu/MenuAccessibility.stories.d.ts +16 -0
- package/dist/types/lib/components/Menu/MenuCombobox.stories.d.ts +11 -0
- package/dist/types/lib/components/Menu/MenuItem.d.ts +1 -1
- package/dist/types/lib/components/Menu/MenuKeyboardNav.stories.d.ts +11 -0
- package/dist/types/lib/components/Menu/MenuListGroup.d.ts +2 -1
- package/dist/types/lib/components/Menu/MenuListHeading.d.ts +1 -1
- package/dist/types/lib/components/Toolbar/ToolbarFilter.stories.d.ts +1 -0
- package/dist/types/lib/components/Toolbar/ToolbarFilterA11y.stories.d.ts +18 -0
- package/dist/types/lib/components/Toolbar/ToolbarFilterButton.d.ts +1 -1
- package/dist/types/lib/components/Toolbar/useFilter.d.ts +1 -1
- package/package.json +1 -1
- package/dist/ToolbarSearch-DyVcALSw.js +0 -2045
|
@@ -0,0 +1,2010 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as a, jsxs as w, Fragment as fe } from "react/jsx-runtime";
|
|
3
|
+
import * as G from "react";
|
|
4
|
+
import C, { forwardRef as Q, useRef as Z, useState as se, useMemo as ce, useEffect as Y, Fragment as Ge, useLayoutEffect as Re, createContext as lt, useContext as it, isValidElement as qe, useId as Be, useCallback as Ke, memo as Ne, createElement as ct } from "react";
|
|
5
|
+
import "./tooltip-Ct39-719.js";
|
|
6
|
+
import { c as V } from "./index-p1eeF8LQ.js";
|
|
7
|
+
import { useEscapeKey as dt } from "./hooks/useEscapeKey.js";
|
|
8
|
+
import "./components/Typography/Link.js";
|
|
9
|
+
import { Button as ye } from "./components/Button/Button.js";
|
|
10
|
+
import { createPortal as ut } from "react-dom";
|
|
11
|
+
import { useMenu as $e } from "./hooks/useMenu.js";
|
|
12
|
+
import { Typography as Ve } from "./components/Typography/Typography.js";
|
|
13
|
+
import { Skeleton as pe } from "./components/Skeleton/Skeleton.js";
|
|
14
|
+
import { useHighlightedText as mt } from "./components/Typography/useHighlightedText.js";
|
|
15
|
+
import { Tooltip as je } from "./components/Tooltip/Tooltip.js";
|
|
16
|
+
import "./components/GlobalMenu/GlobalMenuBase.js";
|
|
17
|
+
import { SnackbarProvider as ft } from "./components/Snackbar/useSnackbar.js";
|
|
18
|
+
import { Input as pt } from "./components/Forms/Input.js";
|
|
19
|
+
import { Field as ht } from "./components/Forms/Field.js";
|
|
20
|
+
import { Label as vt } from "./components/Forms/Label.js";
|
|
21
|
+
import { TypingIcon as bt } from "./components/Icon/TypingIcon.js";
|
|
22
|
+
import { u as X } from "./useId-BVFxCjkq.js";
|
|
23
|
+
import { isAvatarProps as Se, Avatar as Ae } from "./components/Avatar/Avatar.js";
|
|
24
|
+
import { isAvatarGroupProps as Pe, AvatarGroup as _e } from "./components/Avatar/AvatarGroup.js";
|
|
25
|
+
import { ItemControls as ze } from "./components/Item/ItemControls.js";
|
|
26
|
+
import { pickAriaProps as gt } from "./components/Menu/aria.js";
|
|
27
|
+
import { MenuList as Oe } from "./components/Menu/MenuList.js";
|
|
28
|
+
import { MenuListItem as Ue } from "./components/Menu/MenuListItem.js";
|
|
29
|
+
import { MenuListGroup as We } from "./components/Menu/MenuListGroup.js";
|
|
30
|
+
import { MenuListDivider as Ye } from "./components/Menu/MenuListDivider.js";
|
|
31
|
+
import { MenuListHeading as Qe } from "./components/Menu/MenuListHeading.js";
|
|
32
|
+
import { u as yt } from "./useMenuVirtualization-DpvWCsyD.js";
|
|
33
|
+
import { a as _t, b as wt, S as xt } from "./Paperclip-DhP0Uo69.js";
|
|
34
|
+
import { useDropdownMenuController as It } from "./components/Menu/useDropdownMenuController.js";
|
|
35
|
+
import { ItemBase as Ot } from "./components/Item/ItemBase.js";
|
|
36
|
+
import { ItemLink as Nt } from "./components/Item/ItemLink.js";
|
|
37
|
+
import { MetaBase as kt } from "./components/Metadata/MetaBase.js";
|
|
38
|
+
import { ProgressIcon as Ct } from "./components/Icon/ProgressIcon.js";
|
|
39
|
+
import './assets/ToolbarSearch.css';var Et = function(e, o) {
|
|
40
|
+
var n = {};
|
|
41
|
+
for (var t in e) Object.prototype.hasOwnProperty.call(e, t) && o.indexOf(t) < 0 && (n[t] = e[t]);
|
|
42
|
+
if (e != null && typeof Object.getOwnPropertySymbols == "function")
|
|
43
|
+
for (var r = 0, t = Object.getOwnPropertySymbols(e); r < t.length; r++)
|
|
44
|
+
o.indexOf(t[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, t[r]) && (n[t[r]] = e[t[r]]);
|
|
45
|
+
return n;
|
|
46
|
+
};
|
|
47
|
+
const Rt = Q((e, o) => {
|
|
48
|
+
var { title: n, titleId: t } = e, r = Et(e, ["title", "titleId"]);
|
|
49
|
+
let s = X();
|
|
50
|
+
return s = n ? t || "title-" + s : void 0, C.createElement(
|
|
51
|
+
"svg",
|
|
52
|
+
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": s }, r),
|
|
53
|
+
n ? C.createElement("title", { id: s }, n) : null,
|
|
54
|
+
C.createElement("path", { fill: "currentColor", fillRule: "evenodd", d: "M4 3.25a.75.75 0 0 0-.75.75v3.5c0 .414.336.75.75.75h16a.75.75 0 0 0 .75-.75V4a.75.75 0 0 0-.75-.75zm15.5 6a.25.25 0 0 1 .25.25V19A1.75 1.75 0 0 1 18 20.75H6A1.75 1.75 0 0 1 4.25 19V9.5a.25.25 0 0 1 .25-.25zm-4.75 3.25a.75.75 0 0 1-.75.75h-4a.75.75 0 0 1 0-1.5h4a.75.75 0 0 1 .75.75", clipRule: "evenodd" })
|
|
55
|
+
);
|
|
56
|
+
});
|
|
57
|
+
var St = function(e, o) {
|
|
58
|
+
var n = {};
|
|
59
|
+
for (var t in e) Object.prototype.hasOwnProperty.call(e, t) && o.indexOf(t) < 0 && (n[t] = e[t]);
|
|
60
|
+
if (e != null && typeof Object.getOwnPropertySymbols == "function")
|
|
61
|
+
for (var r = 0, t = Object.getOwnPropertySymbols(e); r < t.length; r++)
|
|
62
|
+
o.indexOf(t[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, t[r]) && (n[t[r]] = e[t[r]]);
|
|
63
|
+
return n;
|
|
64
|
+
};
|
|
65
|
+
const Pt = Q((e, o) => {
|
|
66
|
+
var { title: n, titleId: t } = e, r = St(e, ["title", "titleId"]);
|
|
67
|
+
let s = X();
|
|
68
|
+
return s = n ? t || "title-" + s : void 0, C.createElement(
|
|
69
|
+
"svg",
|
|
70
|
+
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": s }, r),
|
|
71
|
+
n ? C.createElement("title", { id: s }, n) : null,
|
|
72
|
+
C.createElement("path", { fill: "currentColor", d: "M12.75 5a.75.75 0 0 0-1.5 0v12.19l-3.22-3.22a.75.75 0 0 0-1.06 1.06l4.5 4.5a.75.75 0 0 0 1.06 0l4.5-4.5a.75.75 0 1 0-1.06-1.06l-3.22 3.22z" })
|
|
73
|
+
);
|
|
74
|
+
});
|
|
75
|
+
var zt = function(e, o) {
|
|
76
|
+
var n = {};
|
|
77
|
+
for (var t in e) Object.prototype.hasOwnProperty.call(e, t) && o.indexOf(t) < 0 && (n[t] = e[t]);
|
|
78
|
+
if (e != null && typeof Object.getOwnPropertySymbols == "function")
|
|
79
|
+
for (var r = 0, t = Object.getOwnPropertySymbols(e); r < t.length; r++)
|
|
80
|
+
o.indexOf(t[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, t[r]) && (n[t[r]] = e[t[r]]);
|
|
81
|
+
return n;
|
|
82
|
+
};
|
|
83
|
+
const Xe = Q((e, o) => {
|
|
84
|
+
var { title: n, titleId: t } = e, r = zt(e, ["title", "titleId"]);
|
|
85
|
+
let s = X();
|
|
86
|
+
return s = n ? t || "title-" + s : void 0, C.createElement(
|
|
87
|
+
"svg",
|
|
88
|
+
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": s }, r),
|
|
89
|
+
n ? C.createElement("title", { id: s }, n) : null,
|
|
90
|
+
C.createElement("path", { fill: "currentColor", fillRule: "evenodd", d: "M18.998 6.94a.75.75 0 0 1 .063 1.058l-8 9a.75.75 0 0 1-1.091.032l-5-5a.75.75 0 1 1 1.06-1.06l4.438 4.437 7.471-8.405A.75.75 0 0 1 19 6.939", clipRule: "evenodd" })
|
|
91
|
+
);
|
|
92
|
+
});
|
|
93
|
+
var Mt = function(e, o) {
|
|
94
|
+
var n = {};
|
|
95
|
+
for (var t in e) Object.prototype.hasOwnProperty.call(e, t) && o.indexOf(t) < 0 && (n[t] = e[t]);
|
|
96
|
+
if (e != null && typeof Object.getOwnPropertySymbols == "function")
|
|
97
|
+
for (var r = 0, t = Object.getOwnPropertySymbols(e); r < t.length; r++)
|
|
98
|
+
o.indexOf(t[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, t[r]) && (n[t[r]] = e[t[r]]);
|
|
99
|
+
return n;
|
|
100
|
+
};
|
|
101
|
+
const $t = Q((e, o) => {
|
|
102
|
+
var { title: n, titleId: t } = e, r = Mt(e, ["title", "titleId"]);
|
|
103
|
+
let s = X();
|
|
104
|
+
return s = n ? t || "title-" + s : void 0, C.createElement(
|
|
105
|
+
"svg",
|
|
106
|
+
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": s }, r),
|
|
107
|
+
n ? C.createElement("title", { id: s }, n) : null,
|
|
108
|
+
C.createElement("path", { fill: "currentColor", fillRule: "evenodd", d: "M9.47 5.97a.75.75 0 0 1 1.06 0l5.5 5.5a.75.75 0 0 1 0 1.06l-5.5 5.5a.75.75 0 1 1-1.06-1.06L14.44 12 9.47 7.03a.75.75 0 0 1 0-1.06", clipRule: "evenodd" })
|
|
109
|
+
);
|
|
110
|
+
});
|
|
111
|
+
var jt = function(e, o) {
|
|
112
|
+
var n = {};
|
|
113
|
+
for (var t in e) Object.prototype.hasOwnProperty.call(e, t) && o.indexOf(t) < 0 && (n[t] = e[t]);
|
|
114
|
+
if (e != null && typeof Object.getOwnPropertySymbols == "function")
|
|
115
|
+
for (var r = 0, t = Object.getOwnPropertySymbols(e); r < t.length; r++)
|
|
116
|
+
o.indexOf(t[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, t[r]) && (n[t[r]] = e[t[r]]);
|
|
117
|
+
return n;
|
|
118
|
+
};
|
|
119
|
+
const Te = Q((e, o) => {
|
|
120
|
+
var { title: n, titleId: t } = e, r = jt(e, ["title", "titleId"]);
|
|
121
|
+
let s = X();
|
|
122
|
+
return s = n ? t || "title-" + s : void 0, C.createElement(
|
|
123
|
+
"svg",
|
|
124
|
+
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": s }, r),
|
|
125
|
+
n ? C.createElement("title", { id: s }, n) : null,
|
|
126
|
+
C.createElement("path", { fill: "currentColor", fillRule: "evenodd", d: "M12.53 4.47a.75.75 0 0 0-1.06 0l-3.5 3.5a.75.75 0 0 0 1.06 1.06L12 6.06l2.97 2.97a.75.75 0 1 0 1.06-1.06zm-3.5 10.5a.75.75 0 0 0-1.06 1.06l3.5 3.5a.75.75 0 0 0 1.06 0l3.5-3.5a.75.75 0 1 0-1.06-1.06L12 17.94z", clipRule: "evenodd" })
|
|
127
|
+
);
|
|
128
|
+
});
|
|
129
|
+
var At = function(e, o) {
|
|
130
|
+
var n = {};
|
|
131
|
+
for (var t in e) Object.prototype.hasOwnProperty.call(e, t) && o.indexOf(t) < 0 && (n[t] = e[t]);
|
|
132
|
+
if (e != null && typeof Object.getOwnPropertySymbols == "function")
|
|
133
|
+
for (var r = 0, t = Object.getOwnPropertySymbols(e); r < t.length; r++)
|
|
134
|
+
o.indexOf(t[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, t[r]) && (n[t[r]] = e[t[r]]);
|
|
135
|
+
return n;
|
|
136
|
+
};
|
|
137
|
+
const Dt = Q((e, o) => {
|
|
138
|
+
var { title: n, titleId: t } = e, r = At(e, ["title", "titleId"]);
|
|
139
|
+
let s = X();
|
|
140
|
+
return s = n ? t || "title-" + s : void 0, C.createElement(
|
|
141
|
+
"svg",
|
|
142
|
+
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": s }, r),
|
|
143
|
+
n ? C.createElement("title", { id: s }, n) : null,
|
|
144
|
+
C.createElement("path", { fill: "currentColor", fillRule: "evenodd", d: "M4.5 1.75a.75.75 0 0 1 .75.75v2.464a9.75 9.75 0 1 1 12.342 15.023.75.75 0 1 1-.86-1.229A8.251 8.251 0 1 0 6.084 6.25H9a.75.75 0 0 1 0 1.5H4.5A.75.75 0 0 1 3.75 7V2.5a.75.75 0 0 1 .75-.75M12.75 6a.75.75 0 0 0-1.5 0v6c0 .199.079.39.22.53l2.5 2.5a.75.75 0 1 0 1.06-1.06l-2.28-2.28zM3 11.25a.75.75 0 0 1 .75.75q0 .66.105 1.31a.75.75 0 0 1-1.481.24A10 10 0 0 1 2.25 12a.75.75 0 0 1 .75-.75m1.855 4.875a.75.75 0 0 0-1.299.75q.39.675.882 1.28a.75.75 0 1 0 1.163-.947 8 8 0 0 1-.746-1.083m1.995 3.294a.75.75 0 0 1 1.025-.274q.57.33 1.188.564a.75.75 0 1 1-.535 1.402 10 10 0 0 1-1.403-.667.75.75 0 0 1-.275-1.025m6.7 2.207a.75.75 0 1 0-.24-1.48q-.65.104-1.31.104a.75.75 0 0 0 0 1.5q.78 0 1.55-.124", clipRule: "evenodd" })
|
|
145
|
+
);
|
|
146
|
+
});
|
|
147
|
+
var Bt = function(e, o) {
|
|
148
|
+
var n = {};
|
|
149
|
+
for (var t in e) Object.prototype.hasOwnProperty.call(e, t) && o.indexOf(t) < 0 && (n[t] = e[t]);
|
|
150
|
+
if (e != null && typeof Object.getOwnPropertySymbols == "function")
|
|
151
|
+
for (var r = 0, t = Object.getOwnPropertySymbols(e); r < t.length; r++)
|
|
152
|
+
o.indexOf(t[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, t[r]) && (n[t[r]] = e[t[r]]);
|
|
153
|
+
return n;
|
|
154
|
+
};
|
|
155
|
+
const Tt = Q((e, o) => {
|
|
156
|
+
var { title: n, titleId: t } = e, r = Bt(e, ["title", "titleId"]);
|
|
157
|
+
let s = X();
|
|
158
|
+
return s = n ? t || "title-" + s : void 0, C.createElement(
|
|
159
|
+
"svg",
|
|
160
|
+
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": s }, r),
|
|
161
|
+
n ? C.createElement("title", { id: s }, n) : null,
|
|
162
|
+
C.createElement("path", { fill: "currentColor", fillRule: "evenodd", d: "M8.25 3.5c0-.69.56-1.25 1.25-1.25H14a.75.75 0 0 1 .53.22l5 5c.141.14.22.331.22.53v8.5c0 .69-.56 1.25-1.25 1.25h-9c-.69 0-1.25-.56-1.25-1.25zm6.25 5.25c-.69 0-1.25-.56-1.25-1.25V3.75h-3.5v12.5h8.5v-7.5zm.25-3.94 2.44 2.44h-2.44zM6.502 7.75H5.75v12.5h8.5v-.748a.75.75 0 0 1 1.5 0v.998c0 .69-.56 1.25-1.25 1.25h-9c-.69 0-1.25-.56-1.25-1.25v-13c0-.69.56-1.25 1.25-1.25h1.002a.75.75 0 1 1 0 1.5", clipRule: "evenodd" })
|
|
163
|
+
);
|
|
164
|
+
});
|
|
165
|
+
var Lt = function(e, o) {
|
|
166
|
+
var n = {};
|
|
167
|
+
for (var t in e) Object.prototype.hasOwnProperty.call(e, t) && o.indexOf(t) < 0 && (n[t] = e[t]);
|
|
168
|
+
if (e != null && typeof Object.getOwnPropertySymbols == "function")
|
|
169
|
+
for (var r = 0, t = Object.getOwnPropertySymbols(e); r < t.length; r++)
|
|
170
|
+
o.indexOf(t[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, t[r]) && (n[t[r]] = e[t[r]]);
|
|
171
|
+
return n;
|
|
172
|
+
};
|
|
173
|
+
const Ft = Q((e, o) => {
|
|
174
|
+
var { title: n, titleId: t } = e, r = Lt(e, ["title", "titleId"]);
|
|
175
|
+
let s = X();
|
|
176
|
+
return s = n ? t || "title-" + s : void 0, C.createElement(
|
|
177
|
+
"svg",
|
|
178
|
+
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": s }, r),
|
|
179
|
+
n ? C.createElement("title", { id: s }, n) : null,
|
|
180
|
+
C.createElement("path", { fill: "currentColor", fillRule: "evenodd", d: "M10.5 3.25a7.25 7.25 0 1 0 4.569 12.88l5.411 5.41a.75.75 0 1 0 1.06-1.06l-5.41-5.411A7.25 7.25 0 0 0 10.5 3.25M4.75 10.5a5.75 5.75 0 1 1 11.5 0 5.75 5.75 0 0 1-11.5 0", clipRule: "evenodd" })
|
|
181
|
+
);
|
|
182
|
+
});
|
|
183
|
+
var Ht = function(e, o) {
|
|
184
|
+
var n = {};
|
|
185
|
+
for (var t in e) Object.prototype.hasOwnProperty.call(e, t) && o.indexOf(t) < 0 && (n[t] = e[t]);
|
|
186
|
+
if (e != null && typeof Object.getOwnPropertySymbols == "function")
|
|
187
|
+
for (var r = 0, t = Object.getOwnPropertySymbols(e); r < t.length; r++)
|
|
188
|
+
o.indexOf(t[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, t[r]) && (n[t[r]] = e[t[r]]);
|
|
189
|
+
return n;
|
|
190
|
+
};
|
|
191
|
+
const Gt = Q((e, o) => {
|
|
192
|
+
var { title: n, titleId: t } = e, r = Ht(e, ["title", "titleId"]);
|
|
193
|
+
let s = X();
|
|
194
|
+
return s = n ? t || "title-" + s : void 0, C.createElement(
|
|
195
|
+
"svg",
|
|
196
|
+
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": s }, r),
|
|
197
|
+
n ? C.createElement("title", { id: s }, n) : null,
|
|
198
|
+
C.createElement("path", { fill: "currentColor", fillRule: "evenodd", d: "M4.75 12a.75.75 0 0 1 .75-.75h13a.75.75 0 1 1 0 1.5h-13a.75.75 0 0 1-.75-.75", clipRule: "evenodd" })
|
|
199
|
+
);
|
|
200
|
+
});
|
|
201
|
+
var qt = function(e, o) {
|
|
202
|
+
var n = {};
|
|
203
|
+
for (var t in e) Object.prototype.hasOwnProperty.call(e, t) && o.indexOf(t) < 0 && (n[t] = e[t]);
|
|
204
|
+
if (e != null && typeof Object.getOwnPropertySymbols == "function")
|
|
205
|
+
for (var r = 0, t = Object.getOwnPropertySymbols(e); r < t.length; r++)
|
|
206
|
+
o.indexOf(t[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, t[r]) && (n[t[r]] = e[t[r]]);
|
|
207
|
+
return n;
|
|
208
|
+
};
|
|
209
|
+
const Kt = Q((e, o) => {
|
|
210
|
+
var { title: n, titleId: t } = e, r = qt(e, ["title", "titleId"]);
|
|
211
|
+
let s = X();
|
|
212
|
+
return s = n ? t || "title-" + s : void 0, C.createElement(
|
|
213
|
+
"svg",
|
|
214
|
+
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": s }, r),
|
|
215
|
+
n ? C.createElement("title", { id: s }, n) : null,
|
|
216
|
+
C.createElement("path", { fill: "currentColor", fillRule: "evenodd", d: "M10 4.75c-.69 0-1.25.56-1.25 1.25v.25h6.5V6c0-.69-.56-1.25-1.25-1.25zm6.75 1.5V6A2.75 2.75 0 0 0 14 3.25h-4A2.75 2.75 0 0 0 7.25 6v.25H4.5a.75.75 0 0 0 0 1.5h.805l.876 11.384a1.75 1.75 0 0 0 1.745 1.616h8.148a1.75 1.75 0 0 0 1.745-1.616l.875-11.384h.806a.75.75 0 0 0 0-1.5h-2.75m-6 4.25a.75.75 0 0 0-1.5 0v6a.75.75 0 0 0 1.5 0zM14 9.75a.75.75 0 0 1 .75.75v6a.75.75 0 0 1-1.5 0v-6a.75.75 0 0 1 .75-.75", clipRule: "evenodd" })
|
|
217
|
+
);
|
|
218
|
+
});
|
|
219
|
+
var Vt = function(e, o) {
|
|
220
|
+
var n = {};
|
|
221
|
+
for (var t in e) Object.prototype.hasOwnProperty.call(e, t) && o.indexOf(t) < 0 && (n[t] = e[t]);
|
|
222
|
+
if (e != null && typeof Object.getOwnPropertySymbols == "function")
|
|
223
|
+
for (var r = 0, t = Object.getOwnPropertySymbols(e); r < t.length; r++)
|
|
224
|
+
o.indexOf(t[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, t[r]) && (n[t[r]] = e[t[r]]);
|
|
225
|
+
return n;
|
|
226
|
+
};
|
|
227
|
+
const De = Q((e, o) => {
|
|
228
|
+
var { title: n, titleId: t } = e, r = Vt(e, ["title", "titleId"]);
|
|
229
|
+
let s = X();
|
|
230
|
+
return s = n ? t || "title-" + s : void 0, C.createElement(
|
|
231
|
+
"svg",
|
|
232
|
+
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": s }, r),
|
|
233
|
+
n ? C.createElement("title", { id: s }, n) : null,
|
|
234
|
+
C.createElement("path", { fill: "currentColor", d: "M6.53 5.47a.75.75 0 0 0-1.06 1.06L10.94 12l-5.47 5.47a.75.75 0 1 0 1.06 1.06L12 13.06l5.47 5.47a.75.75 0 1 0 1.06-1.06L13.06 12l5.47-5.47a.75.75 0 0 0-1.06-1.06L12 10.94z" })
|
|
235
|
+
);
|
|
236
|
+
}), Ut = "_badge_5li3b_1", Wt = "_label_5li3b_33", we = {
|
|
237
|
+
badge: Ut,
|
|
238
|
+
label: Wt
|
|
239
|
+
}, ne = ({
|
|
240
|
+
label: e,
|
|
241
|
+
color: o,
|
|
242
|
+
variant: n = "subtle",
|
|
243
|
+
theme: t,
|
|
244
|
+
size: r = "sm",
|
|
245
|
+
tooltip: s,
|
|
246
|
+
className: u,
|
|
247
|
+
style: f,
|
|
248
|
+
children: i
|
|
249
|
+
}) => s ? /* @__PURE__ */ a(je, { content: s, children: /* @__PURE__ */ a(
|
|
250
|
+
"span",
|
|
251
|
+
{
|
|
252
|
+
className: V(we.badge, u),
|
|
253
|
+
style: f,
|
|
254
|
+
"data-color": o,
|
|
255
|
+
"data-variant": n,
|
|
256
|
+
"data-theme": t,
|
|
257
|
+
"data-size": r,
|
|
258
|
+
...r === "xs" && { "aria-hidden": !0 },
|
|
259
|
+
children: /* @__PURE__ */ a("span", { className: we.label, children: e || i })
|
|
260
|
+
}
|
|
261
|
+
) }) : /* @__PURE__ */ a(
|
|
262
|
+
"span",
|
|
263
|
+
{
|
|
264
|
+
className: V(we.badge, u),
|
|
265
|
+
style: f,
|
|
266
|
+
"data-color": o,
|
|
267
|
+
"data-variant": n,
|
|
268
|
+
"data-theme": t,
|
|
269
|
+
"data-size": r,
|
|
270
|
+
...r === "xs" && { "aria-hidden": !0 },
|
|
271
|
+
children: /* @__PURE__ */ a("span", { className: we.label, children: e || i })
|
|
272
|
+
}
|
|
273
|
+
), Yt = "_icon_1y3dz_1", Qt = "_shape_1y3dz_9", Xt = "_svg_1y3dz_14", Jt = "_image_1y3dz_15", ve = {
|
|
274
|
+
icon: Yt,
|
|
275
|
+
shape: Qt,
|
|
276
|
+
svg: Xt,
|
|
277
|
+
image: Jt
|
|
278
|
+
}, Me = (e) => typeof e == "object" && e !== null && ("svgElement" in e || "iconUrl" in e), ie = ({
|
|
279
|
+
loading: e,
|
|
280
|
+
altText: o,
|
|
281
|
+
svgElement: n,
|
|
282
|
+
size: t,
|
|
283
|
+
color: r,
|
|
284
|
+
iconUrl: s,
|
|
285
|
+
className: u,
|
|
286
|
+
style: f,
|
|
287
|
+
children: i
|
|
288
|
+
}) => /* @__PURE__ */ a("span", { "data-ui": "icon", "data-size": t, "data-color": r, className: V(ve.icon, u), style: f, children: /* @__PURE__ */ w(pe, { loading: e, variant: "circle", className: ve.shape, children: [
|
|
289
|
+
/* @__PURE__ */ a("span", { className: ve.shape }),
|
|
290
|
+
n && /* @__PURE__ */ a(n, { "aria-hidden": "true", "alt-label": o, className: ve.svg }),
|
|
291
|
+
s && /* @__PURE__ */ a("img", { src: s, alt: o, className: ve.image }),
|
|
292
|
+
i
|
|
293
|
+
] }) }), Zt = ({ size: e, color: o, label: n, htmlFor: t, helperText: r, children: s, ...u }) => /* @__PURE__ */ w(ht, { size: e, color: o, ...u, children: [
|
|
294
|
+
n && /* @__PURE__ */ a(vt, { size: e, htmlFor: t, children: n }),
|
|
295
|
+
s,
|
|
296
|
+
r && /* @__PURE__ */ a(Ve, { size: "xs", children: r })
|
|
297
|
+
] }), en = "_search_18jfe_1", tn = "_searchInput_18jfe_8", Ee = {
|
|
298
|
+
search: en,
|
|
299
|
+
searchInput: tn
|
|
300
|
+
}, Je = ({
|
|
301
|
+
style: e,
|
|
302
|
+
index: o,
|
|
303
|
+
name: n,
|
|
304
|
+
value: t,
|
|
305
|
+
placeholder: r = "Search",
|
|
306
|
+
clearButtonAltText: s = "Clear search",
|
|
307
|
+
onChange: u,
|
|
308
|
+
onClear: f,
|
|
309
|
+
onNavigate: i,
|
|
310
|
+
combobox: m = !1,
|
|
311
|
+
listId: p,
|
|
312
|
+
"aria-activedescendant": l,
|
|
313
|
+
onKeyDown: h,
|
|
314
|
+
onInput: v,
|
|
315
|
+
onFocus: b,
|
|
316
|
+
...$
|
|
317
|
+
}) => {
|
|
318
|
+
const y = /* @__PURE__ */ a(
|
|
319
|
+
rt,
|
|
320
|
+
{
|
|
321
|
+
size: "xs",
|
|
322
|
+
className: Ee.searchInput,
|
|
323
|
+
name: n,
|
|
324
|
+
value: t,
|
|
325
|
+
placeholder: r,
|
|
326
|
+
onChange: u,
|
|
327
|
+
onClear: f,
|
|
328
|
+
clearButtonAltText: s,
|
|
329
|
+
autoComplete: "off",
|
|
330
|
+
autoCorrect: "off",
|
|
331
|
+
autoCapitalize: "off",
|
|
332
|
+
autoFocus: !0,
|
|
333
|
+
onKeyDown: (I) => {
|
|
334
|
+
(I.key === "ArrowUp" || I.key === "ArrowDown") && (I.preventDefault(), i?.()), h?.(I);
|
|
335
|
+
},
|
|
336
|
+
onInput: v,
|
|
337
|
+
onFocus: b,
|
|
338
|
+
...m ? {
|
|
339
|
+
role: "combobox",
|
|
340
|
+
"aria-autocomplete": "list",
|
|
341
|
+
"aria-expanded": !0,
|
|
342
|
+
"aria-haspopup": "listbox",
|
|
343
|
+
"aria-controls": p,
|
|
344
|
+
"aria-activedescendant": l
|
|
345
|
+
} : {},
|
|
346
|
+
...$
|
|
347
|
+
}
|
|
348
|
+
);
|
|
349
|
+
return m ? /* @__PURE__ */ a("div", { className: Ee.search, style: e, "data-index": o, "data-menu-search": "true", children: y }) : /* @__PURE__ */ a("li", { className: Ee.search, style: e, "data-index": o, "data-menu-search": "true", children: y });
|
|
350
|
+
}, Ze = ({
|
|
351
|
+
level: e = 0,
|
|
352
|
+
maxLevels: o,
|
|
353
|
+
expanded: n,
|
|
354
|
+
a11yMode: t = "menu",
|
|
355
|
+
open: r,
|
|
356
|
+
scrollToTopOnOpen: s = !1,
|
|
357
|
+
autoActivateFirstItem: u = !0,
|
|
358
|
+
autoFocusList: f = !0,
|
|
359
|
+
announceNoResults: i = !1,
|
|
360
|
+
search: m,
|
|
361
|
+
items: p,
|
|
362
|
+
groups: l = {},
|
|
363
|
+
size: h,
|
|
364
|
+
id: v,
|
|
365
|
+
color: b,
|
|
366
|
+
variant: $,
|
|
367
|
+
scrollRefStyles: y = {},
|
|
368
|
+
keyboardEvents: I = !1,
|
|
369
|
+
onSelect: D = () => {
|
|
370
|
+
},
|
|
371
|
+
onActiveItemIdChange: S
|
|
372
|
+
}) => {
|
|
373
|
+
if (o && e >= o)
|
|
374
|
+
return null;
|
|
375
|
+
const O = t === "combobox", c = O && v ? `${v}-listbox` : v, x = Z(r), P = Z(r), [H, j] = se(!1), z = ce(
|
|
376
|
+
() => p.map((k, B) => ({
|
|
377
|
+
...k,
|
|
378
|
+
id: `${v}-item-${B}`
|
|
379
|
+
})),
|
|
380
|
+
[p, v]
|
|
381
|
+
), M = Z(null), { menu: R, setActiveIndex: E, activeItem: d } = $e({
|
|
382
|
+
items: z,
|
|
383
|
+
groups: l,
|
|
384
|
+
groupByKey: "groupId",
|
|
385
|
+
keyboardEvents: I,
|
|
386
|
+
autoActivateFirstItem: u,
|
|
387
|
+
onSelect: D,
|
|
388
|
+
ref: M
|
|
389
|
+
});
|
|
390
|
+
Y(() => {
|
|
391
|
+
S?.(d?.id);
|
|
392
|
+
}, [d?.id, S]), Y(() => {
|
|
393
|
+
if (!s) {
|
|
394
|
+
x.current = r;
|
|
395
|
+
return;
|
|
396
|
+
}
|
|
397
|
+
const k = x.current;
|
|
398
|
+
x.current = r, r && !k && M.current?.scrollTo({ top: 0 });
|
|
399
|
+
}, [r, s]), Y(() => {
|
|
400
|
+
const k = P.current;
|
|
401
|
+
P.current = r, !(!I || m || !f) && r && !k && requestAnimationFrame(() => M.current?.focus?.({ preventScroll: !0 }));
|
|
402
|
+
}, [r, I, m]), Y(() => {
|
|
403
|
+
if (O && i) {
|
|
404
|
+
E(0), j(!0);
|
|
405
|
+
return;
|
|
406
|
+
}
|
|
407
|
+
}, [i, O, E]);
|
|
408
|
+
const _ = m ? /* @__PURE__ */ a(
|
|
409
|
+
Je,
|
|
410
|
+
{
|
|
411
|
+
...m,
|
|
412
|
+
combobox: O,
|
|
413
|
+
listId: c,
|
|
414
|
+
"aria-activedescendant": O && H ? d?.id : void 0,
|
|
415
|
+
onNavigate: O ? () => j(!0) : void 0,
|
|
416
|
+
onChange: (k) => {
|
|
417
|
+
j(!1), m.onChange?.(k);
|
|
418
|
+
},
|
|
419
|
+
onFocus: (k) => {
|
|
420
|
+
j(!1), m.onFocus?.(k);
|
|
421
|
+
},
|
|
422
|
+
onInput: (k) => {
|
|
423
|
+
j(!1), m.onInput?.(k);
|
|
424
|
+
},
|
|
425
|
+
onKeyDown: (k) => {
|
|
426
|
+
const B = k.key === "ArrowUp" || k.key === "ArrowDown", T = k.key.length === 1 || k.key === "Backspace" || k.key === "Delete";
|
|
427
|
+
O && !B && T && j(!1), m.onKeyDown?.(k);
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
) : null, A = /* @__PURE__ */ w(
|
|
431
|
+
Oe,
|
|
432
|
+
{
|
|
433
|
+
variant: $,
|
|
434
|
+
expanded: n,
|
|
435
|
+
ref: M,
|
|
436
|
+
style: y,
|
|
437
|
+
id: c,
|
|
438
|
+
role: O ? "listbox" : "menu",
|
|
439
|
+
tabIndex: I ? -1 : void 0,
|
|
440
|
+
children: [
|
|
441
|
+
!O && _,
|
|
442
|
+
R.map((k, B) => {
|
|
443
|
+
const T = k?.props || {}, { title: q, hidden: de = !1, divider: re = !0 } = T;
|
|
444
|
+
return /* @__PURE__ */ w(Ge, { children: [
|
|
445
|
+
(e > 0 || B) && re ? /* @__PURE__ */ a(Ye, {}) : "",
|
|
446
|
+
/* @__PURE__ */ a(We, { hidden: de, children: /* @__PURE__ */ w(Oe, { role: "presentation", children: [
|
|
447
|
+
q && /* @__PURE__ */ a(Qe, { title: q, level: e }),
|
|
448
|
+
k?.items.filter((U) => !U.props?.hidden).map((U, g) => {
|
|
449
|
+
const { active: N, onMouseEnter: L } = U, { groupId: W, ...F } = U.props || {}, { expanded: oe } = F, ae = Array.isArray(F?.items) && F.items.length > 0, ke = F.role === "checkbox" || F.role === "radio", Ce = F.role === "radio" ? "menuitemradio" : "menuitemcheckbox", st = O ? "option" : ke ? Ce : F.role;
|
|
450
|
+
return /* @__PURE__ */ w(
|
|
451
|
+
Ue,
|
|
452
|
+
{
|
|
453
|
+
expanded: oe,
|
|
454
|
+
onMouseLeave: () => E(-1),
|
|
455
|
+
role: "presentation",
|
|
456
|
+
children: [
|
|
457
|
+
/* @__PURE__ */ a(
|
|
458
|
+
nt,
|
|
459
|
+
{
|
|
460
|
+
...F,
|
|
461
|
+
size: F?.size || T?.size || h,
|
|
462
|
+
color: F?.color || T?.color || b,
|
|
463
|
+
variant: F?.variant || T?.variant || $,
|
|
464
|
+
active: N,
|
|
465
|
+
role: st,
|
|
466
|
+
selected: F.selected,
|
|
467
|
+
tabIndex: F?.disabled || I ? -1 : F.tabIndex ?? 0,
|
|
468
|
+
onMouseEnter: L,
|
|
469
|
+
"aria-haspopup": ae ? "menu" : void 0,
|
|
470
|
+
"aria-expanded": ae ? oe : void 0,
|
|
471
|
+
"aria-controls": ae ? F.id + "-menu" : void 0
|
|
472
|
+
}
|
|
473
|
+
),
|
|
474
|
+
oe && F?.items && /* @__PURE__ */ a(
|
|
475
|
+
Ze,
|
|
476
|
+
{
|
|
477
|
+
id: F.id + "-menu",
|
|
478
|
+
expanded: oe,
|
|
479
|
+
level: e + 1,
|
|
480
|
+
maxLevels: o,
|
|
481
|
+
items: F?.items,
|
|
482
|
+
groups: l,
|
|
483
|
+
size: h,
|
|
484
|
+
color: b,
|
|
485
|
+
variant: $
|
|
486
|
+
}
|
|
487
|
+
)
|
|
488
|
+
]
|
|
489
|
+
},
|
|
490
|
+
g
|
|
491
|
+
);
|
|
492
|
+
})
|
|
493
|
+
] }) }, B)
|
|
494
|
+
] }, B);
|
|
495
|
+
})
|
|
496
|
+
]
|
|
497
|
+
}
|
|
498
|
+
);
|
|
499
|
+
return O && _ ? /* @__PURE__ */ w(fe, { children: [
|
|
500
|
+
_,
|
|
501
|
+
A
|
|
502
|
+
] }) : A;
|
|
503
|
+
}, nn = (e) => {
|
|
504
|
+
const o = Z(null), n = Z(null), [t, r] = se(0), {
|
|
505
|
+
search: s,
|
|
506
|
+
items: u,
|
|
507
|
+
groups: f = {},
|
|
508
|
+
size: i,
|
|
509
|
+
color: m,
|
|
510
|
+
variant: p,
|
|
511
|
+
keyboardEvents: l,
|
|
512
|
+
scrollRefStyles: h = {},
|
|
513
|
+
id: v,
|
|
514
|
+
expanded: b,
|
|
515
|
+
a11yMode: $ = "menu",
|
|
516
|
+
open: y,
|
|
517
|
+
scrollToTopOnOpen: I = !1,
|
|
518
|
+
autoActivateFirstItem: D = !0,
|
|
519
|
+
announceNoResults: S = !1,
|
|
520
|
+
onActiveItemIdChange: O
|
|
521
|
+
} = e, c = $ === "combobox", x = c && v ? `${v}-listbox` : v, P = Z(y), [H, j] = se(!1), z = ce(
|
|
522
|
+
() => u.map((g, N) => ({
|
|
523
|
+
...g,
|
|
524
|
+
id: `${v}-item-${N}`
|
|
525
|
+
})),
|
|
526
|
+
[u, v]
|
|
527
|
+
), { menu: M, activeItem: R, setActiveIndex: E, activeIndex: d } = $e({
|
|
528
|
+
items: z,
|
|
529
|
+
groups: f,
|
|
530
|
+
groupByKey: "groupId",
|
|
531
|
+
keyboardEvents: l,
|
|
532
|
+
autoActivateFirstItem: D,
|
|
533
|
+
ref: o
|
|
534
|
+
}), { flatMenu: _, virtualizer: A, scrollMaxHeight: k } = yt({
|
|
535
|
+
menu: M,
|
|
536
|
+
scrollRef: o
|
|
537
|
+
});
|
|
538
|
+
Re(() => {
|
|
539
|
+
const g = n.current;
|
|
540
|
+
if (!g) return;
|
|
541
|
+
const N = Math.round(g.offsetTop);
|
|
542
|
+
r((L) => L === N ? L : N);
|
|
543
|
+
});
|
|
544
|
+
const B = ce(() => {
|
|
545
|
+
const g = R?.id;
|
|
546
|
+
if (g)
|
|
547
|
+
return _.findIndex((L) => L.type === "item" && L.itemProps?.id === g);
|
|
548
|
+
if (d < 0) return -1;
|
|
549
|
+
let N = -1;
|
|
550
|
+
for (let L = 0; L < _.length; L++)
|
|
551
|
+
if (_[L]?.type === "item" && (N += 1, N === d))
|
|
552
|
+
return L;
|
|
553
|
+
return -1;
|
|
554
|
+
}, [R?.id, d, _]), T = Z(null);
|
|
555
|
+
Re(() => {
|
|
556
|
+
const g = T?.current, N = typeof g == "number" ? B <= g : !1;
|
|
557
|
+
T.current = B;
|
|
558
|
+
const L = N ? B : B + 2;
|
|
559
|
+
if (!N) {
|
|
560
|
+
const ae = A.getOffsetForIndex(L, "auto");
|
|
561
|
+
if (!ae) return;
|
|
562
|
+
const [ke, Ce] = ae;
|
|
563
|
+
if (Ce === "auto") return;
|
|
564
|
+
A.scrollToOffset(ke + t + 10, { align: "start" });
|
|
565
|
+
return;
|
|
566
|
+
}
|
|
567
|
+
if (B <= 3) {
|
|
568
|
+
A.scrollToOffset(0);
|
|
569
|
+
return;
|
|
570
|
+
}
|
|
571
|
+
const W = A.getOffsetForIndex(B - 1, "auto");
|
|
572
|
+
if (!W) return;
|
|
573
|
+
const [F, oe] = W;
|
|
574
|
+
oe !== "auto" && A.scrollToOffset(F + t + 10, { align: "start" });
|
|
575
|
+
}, [B, t, A, T]);
|
|
576
|
+
const q = ce(() => {
|
|
577
|
+
const g = /* @__PURE__ */ new Map();
|
|
578
|
+
let N = 0;
|
|
579
|
+
return _.forEach((L, W) => {
|
|
580
|
+
L.type === "item" && (N += 1, g.set(W, N));
|
|
581
|
+
}), { positions: g, total: N };
|
|
582
|
+
}, [_]);
|
|
583
|
+
Y(() => {
|
|
584
|
+
O?.(R?.id);
|
|
585
|
+
}, [R?.id, O]), Y(() => {
|
|
586
|
+
if (c && S) {
|
|
587
|
+
E(0), j(!0);
|
|
588
|
+
return;
|
|
589
|
+
}
|
|
590
|
+
}, [S, c, E]), Y(() => {
|
|
591
|
+
if (!I) {
|
|
592
|
+
P.current = y;
|
|
593
|
+
return;
|
|
594
|
+
}
|
|
595
|
+
const g = P.current;
|
|
596
|
+
P.current = y, y && !g && o.current?.scrollTo({ top: 0 });
|
|
597
|
+
}, [y, I]);
|
|
598
|
+
const de = {
|
|
599
|
+
position: "relative",
|
|
600
|
+
maxHeight: h?.maxHeight || k,
|
|
601
|
+
margin: "-0.5rem",
|
|
602
|
+
padding: "0.5rem 0.5rem 1rem 0.5rem",
|
|
603
|
+
minWidth: h?.minWidth ?? "20rem",
|
|
604
|
+
overflowY: "auto",
|
|
605
|
+
...h
|
|
606
|
+
}, re = s ? /* @__PURE__ */ a(
|
|
607
|
+
Je,
|
|
608
|
+
{
|
|
609
|
+
...s,
|
|
610
|
+
combobox: c,
|
|
611
|
+
listId: x,
|
|
612
|
+
"aria-activedescendant": c && H ? R?.id : void 0,
|
|
613
|
+
onNavigate: c ? () => j(!0) : void 0,
|
|
614
|
+
onChange: (g) => {
|
|
615
|
+
j(!1), s.onChange?.(g);
|
|
616
|
+
},
|
|
617
|
+
onFocus: (g) => {
|
|
618
|
+
j(!1), s.onFocus?.(g);
|
|
619
|
+
},
|
|
620
|
+
onInput: (g) => {
|
|
621
|
+
j(!1), s.onInput?.(g);
|
|
622
|
+
},
|
|
623
|
+
onKeyDown: (g) => {
|
|
624
|
+
const N = g.key === "ArrowUp" || g.key === "ArrowDown", L = g.key.length === 1 || g.key === "Backspace" || g.key === "Delete";
|
|
625
|
+
c && !N && L && j(!1), s.onKeyDown?.(g);
|
|
626
|
+
}
|
|
627
|
+
}
|
|
628
|
+
) : null, U = /* @__PURE__ */ w(
|
|
629
|
+
Oe,
|
|
630
|
+
{
|
|
631
|
+
ref: o,
|
|
632
|
+
style: de,
|
|
633
|
+
variant: p,
|
|
634
|
+
color: m,
|
|
635
|
+
expanded: b,
|
|
636
|
+
id: x,
|
|
637
|
+
role: c ? "listbox" : "menu",
|
|
638
|
+
children: [
|
|
639
|
+
!c && re,
|
|
640
|
+
/* @__PURE__ */ a(
|
|
641
|
+
We,
|
|
642
|
+
{
|
|
643
|
+
ref: n,
|
|
644
|
+
style: {
|
|
645
|
+
position: "relative",
|
|
646
|
+
height: `${A.getTotalSize()}px`,
|
|
647
|
+
width: "100%"
|
|
648
|
+
},
|
|
649
|
+
children: /* @__PURE__ */ a(Oe, { style: { width: "100%", minWidth: "100%" }, children: A.getVirtualItems().map((g) => {
|
|
650
|
+
const N = _[g.index];
|
|
651
|
+
if (!N) return null;
|
|
652
|
+
const L = {
|
|
653
|
+
position: "absolute",
|
|
654
|
+
top: 0,
|
|
655
|
+
left: 0,
|
|
656
|
+
width: "100%",
|
|
657
|
+
transform: `translateY(${g.start}px)`
|
|
658
|
+
}, W = {
|
|
659
|
+
style: L,
|
|
660
|
+
index: g.index,
|
|
661
|
+
"data-index": g.index,
|
|
662
|
+
ref: A.measureElement
|
|
663
|
+
};
|
|
664
|
+
switch (N.type) {
|
|
665
|
+
case "divider":
|
|
666
|
+
return /* @__PURE__ */ a(
|
|
667
|
+
Ye,
|
|
668
|
+
{
|
|
669
|
+
...W,
|
|
670
|
+
style: { ...L, padding: "0.25rem 0" }
|
|
671
|
+
},
|
|
672
|
+
g.key
|
|
673
|
+
);
|
|
674
|
+
case "header":
|
|
675
|
+
return /* @__PURE__ */ a(Qe, { ...W, title: N.title || "", level: 1 }, g.key);
|
|
676
|
+
default: {
|
|
677
|
+
const F = N.itemProps?.role === "checkbox" || N.itemProps?.role === "radio", oe = N.itemProps?.role === "radio" ? "menuitemradio" : "menuitemcheckbox", ae = c ? "option" : F ? oe : N.itemProps?.role;
|
|
678
|
+
return /* @__PURE__ */ a(Ue, { ...W, role: "presentation", children: /* @__PURE__ */ a(
|
|
679
|
+
nt,
|
|
680
|
+
{
|
|
681
|
+
...N.itemProps || {},
|
|
682
|
+
size: N.itemProps?.size || i,
|
|
683
|
+
color: N.itemProps?.color || m,
|
|
684
|
+
variant: N.itemProps?.variant || p,
|
|
685
|
+
active: N.active,
|
|
686
|
+
role: ae,
|
|
687
|
+
selected: N.itemProps?.selected,
|
|
688
|
+
"aria-posinset": c ? q.positions.get(g.index) : void 0,
|
|
689
|
+
"aria-setsize": c ? q.total : void 0,
|
|
690
|
+
tabIndex: N.itemProps?.disabled || l ? -1 : 0
|
|
691
|
+
}
|
|
692
|
+
) }, g.key);
|
|
693
|
+
}
|
|
694
|
+
}
|
|
695
|
+
}) })
|
|
696
|
+
}
|
|
697
|
+
)
|
|
698
|
+
]
|
|
699
|
+
}
|
|
700
|
+
);
|
|
701
|
+
return c && re ? /* @__PURE__ */ w(fe, { children: [
|
|
702
|
+
re,
|
|
703
|
+
U
|
|
704
|
+
] }) : U;
|
|
705
|
+
}, rn = {
|
|
706
|
+
currentId: "",
|
|
707
|
+
previousId: "",
|
|
708
|
+
debug: !1,
|
|
709
|
+
setCurrentId: () => {
|
|
710
|
+
console.warn("setCurrentId called outside of RootProvider context");
|
|
711
|
+
},
|
|
712
|
+
setPreviousId: () => {
|
|
713
|
+
console.warn("setPreviousId called outside of RootProvider context");
|
|
714
|
+
},
|
|
715
|
+
languageCode: "nb"
|
|
716
|
+
}, et = lt(rn), to = ({ children: e, initialValue: o, debug: n, languageCode: t }) => {
|
|
717
|
+
const [r, s] = se(o?.currentId || ""), [u, f] = se(o?.previousId || "");
|
|
718
|
+
return /* @__PURE__ */ a(
|
|
719
|
+
et.Provider,
|
|
720
|
+
{
|
|
721
|
+
value: {
|
|
722
|
+
currentId: r,
|
|
723
|
+
setCurrentId: s,
|
|
724
|
+
setPreviousId: f,
|
|
725
|
+
previousId: u,
|
|
726
|
+
debug: n,
|
|
727
|
+
languageCode: t
|
|
728
|
+
},
|
|
729
|
+
children: /* @__PURE__ */ a(ft, { children: e })
|
|
730
|
+
}
|
|
731
|
+
);
|
|
732
|
+
}, on = () => {
|
|
733
|
+
const e = it(et);
|
|
734
|
+
if (!e)
|
|
735
|
+
throw new Error("useRootContext must be used within a RootProvider.");
|
|
736
|
+
const { currentId: o, setCurrentId: n, debug: t, setPreviousId: r, previousId: s, languageCode: u } = e, f = (l) => {
|
|
737
|
+
o && r(o), n(l);
|
|
738
|
+
}, i = (l) => {
|
|
739
|
+
t && console.debug(`useRootContext: toggleId called with value: ${l}`), f(o === l ? "" : l);
|
|
740
|
+
}, m = () => {
|
|
741
|
+
t && console.debug("useRootContext: closeAll called"), f("");
|
|
742
|
+
};
|
|
743
|
+
return dt(m), {
|
|
744
|
+
currentId: o,
|
|
745
|
+
previousId: s,
|
|
746
|
+
toggleId: i,
|
|
747
|
+
closeAll: m,
|
|
748
|
+
openId: (l) => {
|
|
749
|
+
t && console.debug(`useRootContext: openId called with value: ${l}`), f(l);
|
|
750
|
+
},
|
|
751
|
+
languageCode: u
|
|
752
|
+
};
|
|
753
|
+
}, an = (e) => {
|
|
754
|
+
switch (e) {
|
|
755
|
+
case "nn":
|
|
756
|
+
return {
|
|
757
|
+
placeholder: "Søk ...",
|
|
758
|
+
hits: (o) => `${o} treff`,
|
|
759
|
+
selected: (o) => `${o} valt`,
|
|
760
|
+
noResults: "Ingen treff"
|
|
761
|
+
};
|
|
762
|
+
case "en":
|
|
763
|
+
return {
|
|
764
|
+
placeholder: "Search ...",
|
|
765
|
+
hits: (o) => `${o} hit${o === 1 ? "" : "s"}`,
|
|
766
|
+
selected: (o) => `${o} selected`,
|
|
767
|
+
noResults: "No results"
|
|
768
|
+
};
|
|
769
|
+
default:
|
|
770
|
+
return {
|
|
771
|
+
placeholder: "Søk ...",
|
|
772
|
+
hits: (o) => `${o} treff`,
|
|
773
|
+
selected: (o) => `${o} valgt`,
|
|
774
|
+
noResults: "Ingen treff"
|
|
775
|
+
};
|
|
776
|
+
}
|
|
777
|
+
}, sn = (e) => {
|
|
778
|
+
const o = /* @__PURE__ */ new Set(), n = [];
|
|
779
|
+
for (const t of e) {
|
|
780
|
+
const r = t.id;
|
|
781
|
+
if (!r) {
|
|
782
|
+
n.push(t);
|
|
783
|
+
continue;
|
|
784
|
+
}
|
|
785
|
+
o.has(r) || (o.add(r), n.push(t));
|
|
786
|
+
}
|
|
787
|
+
return n;
|
|
788
|
+
}, ln = ({
|
|
789
|
+
placeholder: e,
|
|
790
|
+
name: o,
|
|
791
|
+
onChange: n,
|
|
792
|
+
onClear: t,
|
|
793
|
+
clearButtonAltText: r,
|
|
794
|
+
items: s = [],
|
|
795
|
+
groups: u = {}
|
|
796
|
+
}) => {
|
|
797
|
+
const { languageCode: f } = on(), i = G.useMemo(() => an(f), [f]), [m, p] = G.useState(""), l = G.useCallback(
|
|
798
|
+
(d) => {
|
|
799
|
+
p(d.target.value), n?.(d);
|
|
800
|
+
},
|
|
801
|
+
[n]
|
|
802
|
+
), h = G.useCallback(() => {
|
|
803
|
+
p(""), t?.();
|
|
804
|
+
}, [t]), v = G.useMemo(() => m.trim().replace(/\s+/g, " "), [m]), b = v.length > 0, $ = G.useMemo(() => v.toLowerCase(), [v]), y = G.useMemo(() => v ? v.split(" ") : [], [v]), I = G.useMemo(
|
|
805
|
+
() => ({
|
|
806
|
+
placeholder: e ?? i.placeholder,
|
|
807
|
+
name: o ?? "search",
|
|
808
|
+
value: m,
|
|
809
|
+
onChange: l,
|
|
810
|
+
onClear: h,
|
|
811
|
+
clearButtonAltText: r
|
|
812
|
+
}),
|
|
813
|
+
[e, i.placeholder, o, m, l, h, r]
|
|
814
|
+
), D = G.useMemo(
|
|
815
|
+
() => s.map((d) => {
|
|
816
|
+
const _ = d?.searchWords?.length ? d.searchWords : [d?.title, d?.description].filter(Boolean);
|
|
817
|
+
return {
|
|
818
|
+
...d,
|
|
819
|
+
searchWords: _ ?? []
|
|
820
|
+
};
|
|
821
|
+
}),
|
|
822
|
+
[s]
|
|
823
|
+
), S = G.useMemo(
|
|
824
|
+
() => [
|
|
825
|
+
{
|
|
826
|
+
id: "emptySearch",
|
|
827
|
+
"aria-disabled": !0,
|
|
828
|
+
title: i.noResults,
|
|
829
|
+
groupId: "emptySearch",
|
|
830
|
+
icon: _t,
|
|
831
|
+
size: "sm",
|
|
832
|
+
as: "div"
|
|
833
|
+
}
|
|
834
|
+
],
|
|
835
|
+
[i.noResults]
|
|
836
|
+
), O = G.useMemo(() => {
|
|
837
|
+
const d = s.filter((_) => _.groupId === "emptySearch").map((_) => ({ ..._, hidden: !1 }));
|
|
838
|
+
return d.length ? d : S;
|
|
839
|
+
}, [s, S]), { selectedItems: c, results: x } = G.useMemo(() => {
|
|
840
|
+
if (!b) return { selectedItems: [], results: [] };
|
|
841
|
+
const d = [], _ = [];
|
|
842
|
+
for (const A of D)
|
|
843
|
+
A.checked === !0 && d.push({ ...A, groupId: "selected" }), (A.searchWords ?? []).some((T) => String(T).toLowerCase().includes($)) && _.push({
|
|
844
|
+
...A,
|
|
845
|
+
groupId: "search",
|
|
846
|
+
highlightWords: y
|
|
847
|
+
});
|
|
848
|
+
return { selectedItems: d, results: _ };
|
|
849
|
+
}, [b, D, $, y]), P = x.length, H = c.length, j = G.useMemo(
|
|
850
|
+
() => ({
|
|
851
|
+
search: {
|
|
852
|
+
hidden: !0,
|
|
853
|
+
title: i.hits(P)
|
|
854
|
+
},
|
|
855
|
+
selected: {
|
|
856
|
+
hidden: !0,
|
|
857
|
+
title: i.selected(H)
|
|
858
|
+
},
|
|
859
|
+
emptySearch: {
|
|
860
|
+
hidden: !0,
|
|
861
|
+
title: i.noResults
|
|
862
|
+
},
|
|
863
|
+
...u
|
|
864
|
+
}),
|
|
865
|
+
[i, P, H, u]
|
|
866
|
+
), z = G.useMemo(
|
|
867
|
+
() => ({
|
|
868
|
+
...j,
|
|
869
|
+
search: {
|
|
870
|
+
hidden: !b,
|
|
871
|
+
title: i.hits(P)
|
|
872
|
+
},
|
|
873
|
+
selected: {
|
|
874
|
+
hidden: H === 0,
|
|
875
|
+
title: i.selected(H)
|
|
876
|
+
},
|
|
877
|
+
emptySearch: {
|
|
878
|
+
hidden: b && (P > 0 || H > 0),
|
|
879
|
+
title: i.noResults
|
|
880
|
+
}
|
|
881
|
+
}),
|
|
882
|
+
[j, b, i, P, H]
|
|
883
|
+
), M = G.useMemo(() => b ? sn([...x, ...c]) : [], [b, x, c]), R = G.useMemo(() => [...O || [], ...c || []], [O, c]), E = G.useMemo(() => b ? P ? M : R : s, [b, s, P, M, R]);
|
|
884
|
+
return {
|
|
885
|
+
search: I,
|
|
886
|
+
results: x,
|
|
887
|
+
resultCount: P,
|
|
888
|
+
hasQuery: b,
|
|
889
|
+
items: E,
|
|
890
|
+
groups: z
|
|
891
|
+
};
|
|
892
|
+
}, tt = ({
|
|
893
|
+
searchable: e,
|
|
894
|
+
search: o,
|
|
895
|
+
items: n = [],
|
|
896
|
+
groups: t = {},
|
|
897
|
+
variant: r = "default",
|
|
898
|
+
size: s,
|
|
899
|
+
level: u = 0,
|
|
900
|
+
maxLevels: f = 3,
|
|
901
|
+
virtualized: i = !1,
|
|
902
|
+
keyboardEvents: m = !1,
|
|
903
|
+
scrollRefStyles: p = {},
|
|
904
|
+
onActiveItemIdChange: l,
|
|
905
|
+
a11yMode: h = "menu",
|
|
906
|
+
open: v,
|
|
907
|
+
scrollToTopOnOpen: b,
|
|
908
|
+
autoFocusList: $,
|
|
909
|
+
id: y
|
|
910
|
+
}) => {
|
|
911
|
+
const I = ln({ ...o, items: n, groups: t }), D = e ? { label: o?.label, hideLabel: o?.hideLabel, ...I.search } : o, S = e && I.hasQuery && I.resultCount === 0, O = e ? I.items : n, c = e ? { ...t, ...I.groups } : t, x = h !== "combobox";
|
|
912
|
+
return i ? /* @__PURE__ */ a(
|
|
913
|
+
nn,
|
|
914
|
+
{
|
|
915
|
+
id: y,
|
|
916
|
+
search: D,
|
|
917
|
+
announceNoResults: S,
|
|
918
|
+
items: O,
|
|
919
|
+
groups: c,
|
|
920
|
+
variant: r,
|
|
921
|
+
size: s,
|
|
922
|
+
level: u,
|
|
923
|
+
maxLevels: f,
|
|
924
|
+
keyboardEvents: m,
|
|
925
|
+
scrollRefStyles: p,
|
|
926
|
+
onActiveItemIdChange: l,
|
|
927
|
+
a11yMode: h,
|
|
928
|
+
open: v,
|
|
929
|
+
scrollToTopOnOpen: b,
|
|
930
|
+
autoActivateFirstItem: x,
|
|
931
|
+
autoFocusList: $
|
|
932
|
+
}
|
|
933
|
+
) : /* @__PURE__ */ a(
|
|
934
|
+
Ze,
|
|
935
|
+
{
|
|
936
|
+
id: y,
|
|
937
|
+
search: D,
|
|
938
|
+
announceNoResults: S,
|
|
939
|
+
items: O,
|
|
940
|
+
groups: c,
|
|
941
|
+
variant: r,
|
|
942
|
+
size: s,
|
|
943
|
+
level: u,
|
|
944
|
+
maxLevels: f,
|
|
945
|
+
keyboardEvents: m,
|
|
946
|
+
scrollRefStyles: p,
|
|
947
|
+
onActiveItemIdChange: l,
|
|
948
|
+
a11yMode: h,
|
|
949
|
+
open: v,
|
|
950
|
+
scrollToTopOnOpen: b,
|
|
951
|
+
autoActivateFirstItem: x,
|
|
952
|
+
autoFocusList: $
|
|
953
|
+
}
|
|
954
|
+
);
|
|
955
|
+
}, cn = "_media_1089b_3", dn = "_icon_1089b_10", un = "_avatar_1089b_14", mn = "_avatarGroup_1089b_18", le = {
|
|
956
|
+
media: cn,
|
|
957
|
+
icon: dn,
|
|
958
|
+
avatar: un,
|
|
959
|
+
avatarGroup: mn
|
|
960
|
+
};
|
|
961
|
+
function fn(e) {
|
|
962
|
+
return typeof e == "string" || typeof e == "number" || typeof e == "boolean" || e === null || qe(e);
|
|
963
|
+
}
|
|
964
|
+
const Le = ({ className: e, loading: o, icon: n, children: t }) => {
|
|
965
|
+
if (!n)
|
|
966
|
+
return null;
|
|
967
|
+
if (o)
|
|
968
|
+
return /* @__PURE__ */ a("div", { className: V(le.icon, e), children: /* @__PURE__ */ a(ie, { svgElement: De, loading: !0 }) });
|
|
969
|
+
const r = Se(n) ? "avatar" : Pe(n) ? "avatarGroup" : (Me(n), "icon");
|
|
970
|
+
return /* @__PURE__ */ w("div", { className: V(le.media, e), "data-variant": r, children: [
|
|
971
|
+
Se(n) && /* @__PURE__ */ a(Ae, { ...n, className: le.avatar }) || Pe(n) && /* @__PURE__ */ a(_e, { ...n, className: le.avatarGroup }) || Me(n) && /* @__PURE__ */ a(ie, { ...n, className: le.icon }) || fn(n) && /* @__PURE__ */ a(ie, { className: le.icon, children: n }) || /* @__PURE__ */ a(ie, { className: le.icon, svgElement: n }),
|
|
972
|
+
t
|
|
973
|
+
] });
|
|
974
|
+
}, pn = "_heading_ydkmu_1", hn = {
|
|
975
|
+
heading: pn
|
|
976
|
+
}, he = ({
|
|
977
|
+
id: e,
|
|
978
|
+
loading: o,
|
|
979
|
+
highlightWords: n = [],
|
|
980
|
+
as: t = "h2",
|
|
981
|
+
size: r,
|
|
982
|
+
leading: s = "tight",
|
|
983
|
+
weight: u = "medium",
|
|
984
|
+
color: f,
|
|
985
|
+
variant: i,
|
|
986
|
+
maxRows: m,
|
|
987
|
+
className: p,
|
|
988
|
+
style: l,
|
|
989
|
+
children: h
|
|
990
|
+
}) => {
|
|
991
|
+
const v = t, b = mt(h, n || []);
|
|
992
|
+
return /* @__PURE__ */ a(
|
|
993
|
+
v,
|
|
994
|
+
{
|
|
995
|
+
id: e,
|
|
996
|
+
className: V(hn.heading, p),
|
|
997
|
+
style: l,
|
|
998
|
+
"data-size": r,
|
|
999
|
+
"data-leading": s,
|
|
1000
|
+
"data-weight": u,
|
|
1001
|
+
"data-color": f,
|
|
1002
|
+
"data-variant": r === "xxs" && "default" || i,
|
|
1003
|
+
"data-max-rows": m,
|
|
1004
|
+
children: /* @__PURE__ */ a(pe, { loading: o, children: b })
|
|
1005
|
+
}
|
|
1006
|
+
);
|
|
1007
|
+
}, vn = "_label_e5q28_3", bn = {
|
|
1008
|
+
label: vn
|
|
1009
|
+
}, Fe = ({
|
|
1010
|
+
className: e,
|
|
1011
|
+
title: o,
|
|
1012
|
+
titleProps: n = {},
|
|
1013
|
+
description: t,
|
|
1014
|
+
descriptionProps: r = {},
|
|
1015
|
+
highlightWords: s,
|
|
1016
|
+
loading: u,
|
|
1017
|
+
children: f
|
|
1018
|
+
}) => /* @__PURE__ */ a("span", { className: V(bn.label, e), children: f || /* @__PURE__ */ w(fe, { children: [
|
|
1019
|
+
o && /* @__PURE__ */ a(he, { ...n, as: "span", loading: u, highlightWords: s, maxRows: 2, children: o }),
|
|
1020
|
+
t && /* @__PURE__ */ a(
|
|
1021
|
+
he,
|
|
1022
|
+
{
|
|
1023
|
+
...r,
|
|
1024
|
+
as: "span",
|
|
1025
|
+
weight: "normal",
|
|
1026
|
+
leading: "inherit",
|
|
1027
|
+
loading: u,
|
|
1028
|
+
highlightWords: s,
|
|
1029
|
+
maxRows: 2,
|
|
1030
|
+
children: t
|
|
1031
|
+
}
|
|
1032
|
+
)
|
|
1033
|
+
] }) }), gn = "_item_h7sxa_3", yn = "_media_h7sxa_136", _n = "_label_h7sxa_157", wn = "_title_h7sxa_172", xn = "_description_h7sxa_176", In = "_count_h7sxa_188", On = "_linkIcon_h7sxa_196", K = {
|
|
1034
|
+
item: gn,
|
|
1035
|
+
media: yn,
|
|
1036
|
+
label: _n,
|
|
1037
|
+
title: wn,
|
|
1038
|
+
description: xn,
|
|
1039
|
+
count: In,
|
|
1040
|
+
linkIcon: On
|
|
1041
|
+
}, nt = ({
|
|
1042
|
+
id: e,
|
|
1043
|
+
groupId: o,
|
|
1044
|
+
role: n = "menuItem",
|
|
1045
|
+
as: t,
|
|
1046
|
+
href: r,
|
|
1047
|
+
onClick: s,
|
|
1048
|
+
onKeyPress: u,
|
|
1049
|
+
onMouseEnter: f,
|
|
1050
|
+
size: i = "sm",
|
|
1051
|
+
variant: m,
|
|
1052
|
+
color: p,
|
|
1053
|
+
checked: l,
|
|
1054
|
+
icon: h,
|
|
1055
|
+
label: v,
|
|
1056
|
+
badge: b,
|
|
1057
|
+
controls: $,
|
|
1058
|
+
title: y,
|
|
1059
|
+
htmlTitle: I,
|
|
1060
|
+
description: D,
|
|
1061
|
+
highlightWords: S,
|
|
1062
|
+
count: O,
|
|
1063
|
+
linkIcon: c = !1,
|
|
1064
|
+
disabled: x,
|
|
1065
|
+
selected: P,
|
|
1066
|
+
active: H,
|
|
1067
|
+
tabIndex: j = 0,
|
|
1068
|
+
className: z,
|
|
1069
|
+
"data-testid": M,
|
|
1070
|
+
...R
|
|
1071
|
+
}) => {
|
|
1072
|
+
const E = typeof v == "function" ? v() : v, d = gt(R), _ = n === "option";
|
|
1073
|
+
if (n === "radio" || n === "checkbox" || n === "menuitemradio" || n === "menuitemcheckbox" || _ && typeof l == "boolean") {
|
|
1074
|
+
const T = h || (l ? Xe : Gt);
|
|
1075
|
+
return /* @__PURE__ */ w(
|
|
1076
|
+
"div",
|
|
1077
|
+
{
|
|
1078
|
+
...d,
|
|
1079
|
+
className: V(K.item, z),
|
|
1080
|
+
id: e,
|
|
1081
|
+
"data-id": e,
|
|
1082
|
+
"data-group-id": o,
|
|
1083
|
+
"data-size": i,
|
|
1084
|
+
"data-variant": m,
|
|
1085
|
+
"data-color": p,
|
|
1086
|
+
"data-active": H,
|
|
1087
|
+
role: n,
|
|
1088
|
+
"aria-disabled": x,
|
|
1089
|
+
"aria-checked": _ ? void 0 : !!l,
|
|
1090
|
+
"aria-selected": _ ? !!l : void 0,
|
|
1091
|
+
"data-selected": l,
|
|
1092
|
+
"aria-label": y,
|
|
1093
|
+
title: I,
|
|
1094
|
+
"data-testid": M,
|
|
1095
|
+
onKeyUp: (q) => {
|
|
1096
|
+
x || (q.target === q.currentTarget && q.key === "Enter" && s?.(), u?.(q));
|
|
1097
|
+
},
|
|
1098
|
+
onClick: x ? void 0 : s,
|
|
1099
|
+
onMouseEnter: f,
|
|
1100
|
+
tabIndex: j,
|
|
1101
|
+
children: [
|
|
1102
|
+
/* @__PURE__ */ a(Le, { icon: T, className: K.media }),
|
|
1103
|
+
/* @__PURE__ */ a(
|
|
1104
|
+
Fe,
|
|
1105
|
+
{
|
|
1106
|
+
className: K.label,
|
|
1107
|
+
highlightWords: S,
|
|
1108
|
+
title: /* @__PURE__ */ w(fe, { children: [
|
|
1109
|
+
y,
|
|
1110
|
+
" ",
|
|
1111
|
+
O && /* @__PURE__ */ a("i", { className: K.count, children: O })
|
|
1112
|
+
] }),
|
|
1113
|
+
titleProps: {
|
|
1114
|
+
weight: "medium",
|
|
1115
|
+
className: K.title
|
|
1116
|
+
},
|
|
1117
|
+
description: D,
|
|
1118
|
+
descriptionProps: {
|
|
1119
|
+
weight: "normal",
|
|
1120
|
+
variant: "subtle",
|
|
1121
|
+
className: K.description
|
|
1122
|
+
},
|
|
1123
|
+
children: E
|
|
1124
|
+
}
|
|
1125
|
+
),
|
|
1126
|
+
/* @__PURE__ */ w(ze, { children: [
|
|
1127
|
+
b && /* @__PURE__ */ a(ne, { ...b }),
|
|
1128
|
+
!x && $
|
|
1129
|
+
] })
|
|
1130
|
+
]
|
|
1131
|
+
}
|
|
1132
|
+
);
|
|
1133
|
+
}
|
|
1134
|
+
const k = t || (r ? "a" : "button"), B = c && $t;
|
|
1135
|
+
return /* @__PURE__ */ w(
|
|
1136
|
+
k,
|
|
1137
|
+
{
|
|
1138
|
+
href: r,
|
|
1139
|
+
className: V(K.item, z),
|
|
1140
|
+
id: e,
|
|
1141
|
+
"data-id": e,
|
|
1142
|
+
"data-group-id": o,
|
|
1143
|
+
"data-size": i,
|
|
1144
|
+
"data-variant": m,
|
|
1145
|
+
"data-color": p,
|
|
1146
|
+
"data-active": H,
|
|
1147
|
+
"aria-disabled": x,
|
|
1148
|
+
...x ? { disabled: x } : {},
|
|
1149
|
+
"aria-current": n !== "option" && P ? "page" : void 0,
|
|
1150
|
+
"aria-selected": n === "option" ? P : void 0,
|
|
1151
|
+
"data-selected": P,
|
|
1152
|
+
"aria-label": y,
|
|
1153
|
+
title: I,
|
|
1154
|
+
"data-testid": M,
|
|
1155
|
+
onKeyUp: (T) => {
|
|
1156
|
+
x || (T.target === T.currentTarget && T.key === "Enter" && s?.(), u?.(T));
|
|
1157
|
+
},
|
|
1158
|
+
onClick: s,
|
|
1159
|
+
onMouseEnter: f,
|
|
1160
|
+
tabIndex: x ? -1 : j ?? 0,
|
|
1161
|
+
role: n === "menuItem" ? "menuitem" : n,
|
|
1162
|
+
...d,
|
|
1163
|
+
children: [
|
|
1164
|
+
h && /* @__PURE__ */ a(Le, { icon: h, className: K.media }),
|
|
1165
|
+
/* @__PURE__ */ a(
|
|
1166
|
+
Fe,
|
|
1167
|
+
{
|
|
1168
|
+
className: K.label,
|
|
1169
|
+
highlightWords: S,
|
|
1170
|
+
title: /* @__PURE__ */ w(fe, { children: [
|
|
1171
|
+
y,
|
|
1172
|
+
" ",
|
|
1173
|
+
O && /* @__PURE__ */ a("i", { className: K.count, children: O })
|
|
1174
|
+
] }),
|
|
1175
|
+
titleProps: {
|
|
1176
|
+
weight: "medium",
|
|
1177
|
+
className: K.title
|
|
1178
|
+
},
|
|
1179
|
+
description: D,
|
|
1180
|
+
descriptionProps: {
|
|
1181
|
+
variant: "subtle",
|
|
1182
|
+
className: K.description
|
|
1183
|
+
},
|
|
1184
|
+
children: E
|
|
1185
|
+
}
|
|
1186
|
+
),
|
|
1187
|
+
/* @__PURE__ */ w(ze, { children: [
|
|
1188
|
+
b && /* @__PURE__ */ a(ne, { ...b }),
|
|
1189
|
+
!x && $,
|
|
1190
|
+
c && /* @__PURE__ */ a(ie, { svgElement: B, className: K.linkIcon })
|
|
1191
|
+
] })
|
|
1192
|
+
]
|
|
1193
|
+
}
|
|
1194
|
+
);
|
|
1195
|
+
}, Nn = "_fieldContainer_kk0vx_13", kn = "_field_kk0vx_13", Cn = "_input_kk0vx_28", En = "_hiddenInput_kk0vx_29", Rn = "_icon_kk0vx_62", Sn = "_clear_kk0vx_80", Pn = "_clearButton_kk0vx_93", zn = "_autocomplete_kk0vx_120", ee = {
|
|
1196
|
+
fieldContainer: Nn,
|
|
1197
|
+
field: kn,
|
|
1198
|
+
input: Cn,
|
|
1199
|
+
hiddenInput: En,
|
|
1200
|
+
icon: Rn,
|
|
1201
|
+
clear: Sn,
|
|
1202
|
+
clearButton: Pn,
|
|
1203
|
+
autocomplete: zn
|
|
1204
|
+
}, rt = ({
|
|
1205
|
+
className: e,
|
|
1206
|
+
collapsible: o,
|
|
1207
|
+
loading: n,
|
|
1208
|
+
loadingLabel: t = "Loading ...",
|
|
1209
|
+
size: r,
|
|
1210
|
+
color: s = "neutral",
|
|
1211
|
+
label: u,
|
|
1212
|
+
hideLabel: f,
|
|
1213
|
+
value: i,
|
|
1214
|
+
onClear: m,
|
|
1215
|
+
clearButtonAltText: p = "Clear search",
|
|
1216
|
+
menu: l,
|
|
1217
|
+
minLength: h,
|
|
1218
|
+
...v
|
|
1219
|
+
}) => {
|
|
1220
|
+
const b = Be(), [$, y] = se(!1), I = v.id || `search-field-${b}`, D = `${I}-listbox`, [S, O] = se(void 0), c = "searchfield-clear-button-" + Be(), x = ce(() => !l || !i || typeof h == "number" && typeof i == "string" && i.length < h ? !1 : $, [l, $, h, i]), P = ce(() => (l?.items ?? []).map((d) => ({
|
|
1221
|
+
...d,
|
|
1222
|
+
onClick: () => {
|
|
1223
|
+
d.onClick?.(), y(!1);
|
|
1224
|
+
}
|
|
1225
|
+
})), [l]), H = (d) => {
|
|
1226
|
+
if (d.key === "Enter" && x) {
|
|
1227
|
+
l?.items?.[0]?.onClick?.(), y(!1);
|
|
1228
|
+
return;
|
|
1229
|
+
}
|
|
1230
|
+
if (d.key === "Escape" && x) {
|
|
1231
|
+
d.preventDefault(), d.stopPropagation(), y(!1), l?.onClose(), document.getElementById(I)?.focus();
|
|
1232
|
+
return;
|
|
1233
|
+
}
|
|
1234
|
+
v.onKeyDown?.(d), y(!0);
|
|
1235
|
+
}, j = () => {
|
|
1236
|
+
y(!0);
|
|
1237
|
+
}, z = (d) => {
|
|
1238
|
+
if (!$) return;
|
|
1239
|
+
const _ = d.relatedTarget;
|
|
1240
|
+
_ && d.currentTarget.contains(_) || y(!1);
|
|
1241
|
+
}, M = (d) => {
|
|
1242
|
+
d.preventDefault();
|
|
1243
|
+
}, R = (d) => {
|
|
1244
|
+
d.relatedTarget?.id === c && O(void 0), v.onBlur?.(d);
|
|
1245
|
+
}, E = /* @__PURE__ */ w(
|
|
1246
|
+
Zt,
|
|
1247
|
+
{
|
|
1248
|
+
size: r,
|
|
1249
|
+
color: s,
|
|
1250
|
+
label: f ? void 0 : u,
|
|
1251
|
+
htmlFor: I,
|
|
1252
|
+
className: V(ee.field, e),
|
|
1253
|
+
"data-collapsible": o ? !0 : void 0,
|
|
1254
|
+
onBlurCapture: z,
|
|
1255
|
+
children: [
|
|
1256
|
+
/* @__PURE__ */ a("span", { className: ee.hiddenInput, "aria-hidden": "true", children: i + " " }),
|
|
1257
|
+
/* @__PURE__ */ a(
|
|
1258
|
+
pt,
|
|
1259
|
+
{
|
|
1260
|
+
...v,
|
|
1261
|
+
id: I,
|
|
1262
|
+
"aria-label": f && typeof u == "string" ? u : void 0,
|
|
1263
|
+
inputSize: 5,
|
|
1264
|
+
type: "search",
|
|
1265
|
+
value: i,
|
|
1266
|
+
className: ee.input,
|
|
1267
|
+
"data-collapsible": o ? !0 : void 0,
|
|
1268
|
+
autoCapitalize: "off",
|
|
1269
|
+
autoComplete: "off",
|
|
1270
|
+
minLength: h,
|
|
1271
|
+
onKeyDown: H,
|
|
1272
|
+
onBlur: R,
|
|
1273
|
+
...l && {
|
|
1274
|
+
role: "combobox",
|
|
1275
|
+
"aria-autocomplete": "list",
|
|
1276
|
+
"aria-expanded": !!x,
|
|
1277
|
+
"aria-haspopup": "listbox",
|
|
1278
|
+
"aria-controls": x ? D : void 0,
|
|
1279
|
+
"aria-activedescendant": x ? S : void 0,
|
|
1280
|
+
onFocus: j
|
|
1281
|
+
}
|
|
1282
|
+
}
|
|
1283
|
+
),
|
|
1284
|
+
n ? /* @__PURE__ */ a(bt, { "aria-hidden": !0, className: ee.icon }) : /* @__PURE__ */ a(Ft, { "aria-hidden": !0, className: ee.icon }),
|
|
1285
|
+
m && !!i && /* @__PURE__ */ a("span", { className: ee.clear, children: /* @__PURE__ */ a(
|
|
1286
|
+
ye,
|
|
1287
|
+
{
|
|
1288
|
+
id: c,
|
|
1289
|
+
"data-testid": "clear-button",
|
|
1290
|
+
size: "xs",
|
|
1291
|
+
rounded: !0,
|
|
1292
|
+
icon: !0,
|
|
1293
|
+
variant: "tinted",
|
|
1294
|
+
className: ee.clearButton,
|
|
1295
|
+
onClick: () => {
|
|
1296
|
+
m?.(), document.getElementById(I)?.focus();
|
|
1297
|
+
},
|
|
1298
|
+
"aria-label": p,
|
|
1299
|
+
"data-action": "clear-input",
|
|
1300
|
+
children: /* @__PURE__ */ a(De, {})
|
|
1301
|
+
}
|
|
1302
|
+
) })
|
|
1303
|
+
]
|
|
1304
|
+
}
|
|
1305
|
+
);
|
|
1306
|
+
return l ? /* @__PURE__ */ w("div", { className: ee.fieldContainer, children: [
|
|
1307
|
+
E,
|
|
1308
|
+
x && /* @__PURE__ */ a("div", { className: ee.autocomplete, "aria-hidden": !x, onMouseDown: M, children: /* @__PURE__ */ a(
|
|
1309
|
+
tt,
|
|
1310
|
+
{
|
|
1311
|
+
...l,
|
|
1312
|
+
id: D,
|
|
1313
|
+
items: P,
|
|
1314
|
+
groups: l?.groups,
|
|
1315
|
+
keyboardEvents: !0,
|
|
1316
|
+
a11yMode: "combobox",
|
|
1317
|
+
open: x,
|
|
1318
|
+
autoFocusList: !1,
|
|
1319
|
+
onActiveItemIdChange: O
|
|
1320
|
+
}
|
|
1321
|
+
) })
|
|
1322
|
+
] }) : E;
|
|
1323
|
+
}, Mn = "_byline_fzp7k_1", $n = "_avatar_fzp7k_7", jn = "_avatarGroup_fzp7k_12", An = "_label_fzp7k_26", be = {
|
|
1324
|
+
byline: Mn,
|
|
1325
|
+
avatar: $n,
|
|
1326
|
+
avatarGroup: jn,
|
|
1327
|
+
label: An
|
|
1328
|
+
}, Dn = ({
|
|
1329
|
+
loading: e,
|
|
1330
|
+
color: o = "neutral",
|
|
1331
|
+
size: n = "xs",
|
|
1332
|
+
avatar: t,
|
|
1333
|
+
avatarGroup: r,
|
|
1334
|
+
datetime: s,
|
|
1335
|
+
children: u,
|
|
1336
|
+
as: f,
|
|
1337
|
+
...i
|
|
1338
|
+
}) => {
|
|
1339
|
+
const m = f || "div", p = s ? "time" : "span";
|
|
1340
|
+
return /* @__PURE__ */ w(m, { ...i, className: be.byline, "data-color": o, "data-size": n, children: [
|
|
1341
|
+
(r || t) && /* @__PURE__ */ a(pe, { variant: "circle", className: be.avatar, loading: e, children: r ? /* @__PURE__ */ a(_e, { ...r, size: n, className: be.avatarGroup }) : t && /* @__PURE__ */ a(Ae, { ...t, size: n, className: be.avatar }) }),
|
|
1342
|
+
/* @__PURE__ */ a(p, { "data-size": n, dateTime: s, className: be.label, children: /* @__PURE__ */ a(pe, { loading: e, children: u }) })
|
|
1343
|
+
] });
|
|
1344
|
+
}, Bn = "_dropdown_11cza_1", Tn = "_content_11cza_17", Ln = "_backdrop_11cza_47", Fn = "_header_11cza_76", Hn = "_footer_11cza_77", Gn = "_title_11cza_156", ue = {
|
|
1345
|
+
dropdown: Bn,
|
|
1346
|
+
content: Tn,
|
|
1347
|
+
backdrop: Ln,
|
|
1348
|
+
header: Fn,
|
|
1349
|
+
footer: Hn,
|
|
1350
|
+
title: Gn
|
|
1351
|
+
}, qn = "data-focus-guard", ot = (e) => {
|
|
1352
|
+
const o = [
|
|
1353
|
+
"a[href]",
|
|
1354
|
+
"button:not([disabled])",
|
|
1355
|
+
"input:not([disabled])",
|
|
1356
|
+
"select:not([disabled])",
|
|
1357
|
+
"textarea:not([disabled])",
|
|
1358
|
+
'[tabindex]:not([tabindex="-1"])',
|
|
1359
|
+
'[contenteditable="true"]'
|
|
1360
|
+
].join(",");
|
|
1361
|
+
return Array.from(e.querySelectorAll(o)).filter((n) => !n.hasAttribute(qn)).filter((n) => !n.hasAttribute("disabled")).filter((n) => n.getAttribute("aria-hidden") !== "true").filter((n) => n.tabIndex !== -1).filter((n) => {
|
|
1362
|
+
const t = n.getClientRects();
|
|
1363
|
+
return t.length > 0 && t[0].width > 0 && t[0].height > 0;
|
|
1364
|
+
});
|
|
1365
|
+
}, Kn = (e) => {
|
|
1366
|
+
ot(e)[0]?.focus({ preventScroll: !0 });
|
|
1367
|
+
}, Vn = ({
|
|
1368
|
+
id: e = "dropdown",
|
|
1369
|
+
size: o = "sm",
|
|
1370
|
+
className: n,
|
|
1371
|
+
backdrop: t = !0,
|
|
1372
|
+
placement: r = "bottom-left",
|
|
1373
|
+
variant: s = "dropdown",
|
|
1374
|
+
title: u = "Title",
|
|
1375
|
+
closeLabel: f = "Close",
|
|
1376
|
+
submitLabel: i,
|
|
1377
|
+
trigger: m,
|
|
1378
|
+
children: p,
|
|
1379
|
+
open: l,
|
|
1380
|
+
onClose: h,
|
|
1381
|
+
color: v,
|
|
1382
|
+
onSubmit: b,
|
|
1383
|
+
activeDescendantId: $,
|
|
1384
|
+
useFixedPosition: y = !1,
|
|
1385
|
+
expanded: I = !1
|
|
1386
|
+
}) => {
|
|
1387
|
+
const D = Z(null), S = Z(null), O = Z(l);
|
|
1388
|
+
Y(() => {
|
|
1389
|
+
O.current = l;
|
|
1390
|
+
}, [l]);
|
|
1391
|
+
const [c, x] = se({
|
|
1392
|
+
yDir: r.includes("top") ? "top" : "bottom",
|
|
1393
|
+
xDir: r.includes("right") ? "right" : "left",
|
|
1394
|
+
maxHeight: 300
|
|
1395
|
+
}), P = Ke(() => {
|
|
1396
|
+
if (l && D.current && S.current) {
|
|
1397
|
+
const z = D.current.getBoundingClientRect(), M = S.current.getBoundingClientRect(), R = window.innerHeight, E = window.innerWidth, d = 16, _ = R - z.bottom, A = z.top, k = E - z.right - M.width, B = _ < 250 && A > _, T = B ? "top" : "bottom", q = (B ? A : _) - d, re = k < d ? "right" : "left";
|
|
1398
|
+
x((U) => ({
|
|
1399
|
+
...U,
|
|
1400
|
+
yDir: T,
|
|
1401
|
+
maxHeight: q,
|
|
1402
|
+
xDir: re,
|
|
1403
|
+
triggerRect: y ? z : void 0
|
|
1404
|
+
}));
|
|
1405
|
+
}
|
|
1406
|
+
}, [l, y]);
|
|
1407
|
+
Re(() => (P(), window.addEventListener("resize", P), y && window.addEventListener("scroll", P, !0), () => {
|
|
1408
|
+
window.removeEventListener("resize", P), y && window.removeEventListener("scroll", P, !0);
|
|
1409
|
+
}), [P, y]), Y(() => {
|
|
1410
|
+
if (!l) return;
|
|
1411
|
+
const z = requestAnimationFrame(() => {
|
|
1412
|
+
const M = S.current;
|
|
1413
|
+
if (!M) return;
|
|
1414
|
+
const R = M.querySelector(
|
|
1415
|
+
'input[type="search"]:not([disabled]), input[role="searchbox"]:not([disabled]), input[data-dropdown-search]:not([disabled])'
|
|
1416
|
+
);
|
|
1417
|
+
if (R) {
|
|
1418
|
+
const E = R.value.length;
|
|
1419
|
+
R.focus({ preventScroll: !0 });
|
|
1420
|
+
try {
|
|
1421
|
+
R.setSelectionRange(E, E);
|
|
1422
|
+
} catch {
|
|
1423
|
+
}
|
|
1424
|
+
return;
|
|
1425
|
+
}
|
|
1426
|
+
M.focus?.({ preventScroll: !0 });
|
|
1427
|
+
});
|
|
1428
|
+
return () => cancelAnimationFrame(z);
|
|
1429
|
+
}, [l]), Y(() => {
|
|
1430
|
+
const z = (R) => {
|
|
1431
|
+
R.key === "Escape" && (R.preventDefault(), h());
|
|
1432
|
+
}, M = (R) => {
|
|
1433
|
+
const E = R.target, d = D.current?.contains(E), _ = S.current?.contains(E);
|
|
1434
|
+
!d && !_ && h();
|
|
1435
|
+
};
|
|
1436
|
+
return l && (document.addEventListener("mousedown", M), document.addEventListener("keydown", z)), () => {
|
|
1437
|
+
document.removeEventListener("mousedown", M), document.removeEventListener("keydown", z);
|
|
1438
|
+
};
|
|
1439
|
+
}, [l, h]), Y(() => {
|
|
1440
|
+
if (!l) return;
|
|
1441
|
+
const z = S.current;
|
|
1442
|
+
if (!z) return;
|
|
1443
|
+
const M = (E) => {
|
|
1444
|
+
if (!O.current)
|
|
1445
|
+
return;
|
|
1446
|
+
const d = E.target;
|
|
1447
|
+
d && !z.contains(d) && Kn(z);
|
|
1448
|
+
}, R = (E) => {
|
|
1449
|
+
if (E.key !== "Tab") return;
|
|
1450
|
+
const d = ot(z);
|
|
1451
|
+
if (d.length === 0) {
|
|
1452
|
+
E.preventDefault(), z.focus?.({ preventScroll: !0 });
|
|
1453
|
+
return;
|
|
1454
|
+
}
|
|
1455
|
+
const _ = d[0], A = d[d.length - 1], k = document.activeElement;
|
|
1456
|
+
E.shiftKey ? k === _ && (E.preventDefault(), A.focus({ preventScroll: !0 })) : k === A && (E.preventDefault(), _.focus({ preventScroll: !0 }));
|
|
1457
|
+
};
|
|
1458
|
+
return document.addEventListener("focusin", M), document.addEventListener("keydown", R), () => {
|
|
1459
|
+
document.removeEventListener("focusin", M), document.removeEventListener("keydown", R);
|
|
1460
|
+
};
|
|
1461
|
+
}, [l]);
|
|
1462
|
+
const H = y && c.triggerRect ? {
|
|
1463
|
+
position: "fixed",
|
|
1464
|
+
zIndex: 1e3,
|
|
1465
|
+
width: "max-content",
|
|
1466
|
+
maxHeight: `${c.maxHeight}px`,
|
|
1467
|
+
overflowY: "auto",
|
|
1468
|
+
[c.xDir === "left" ? "left" : "right"]: c.xDir === "left" ? c.triggerRect.left : window.innerWidth - c.triggerRect.right,
|
|
1469
|
+
[c.yDir === "bottom" ? "top" : "bottom"]: c.yDir === "bottom" ? c.triggerRect.bottom + 8 : window.innerHeight - c.triggerRect.top + 8
|
|
1470
|
+
} : {
|
|
1471
|
+
position: "absolute",
|
|
1472
|
+
zIndex: 50,
|
|
1473
|
+
width: "max-content",
|
|
1474
|
+
maxHeight: `${c.maxHeight}px`,
|
|
1475
|
+
overflowY: "auto",
|
|
1476
|
+
[c.xDir]: 0,
|
|
1477
|
+
[c.yDir === "bottom" ? "top" : "bottom"]: "100%"
|
|
1478
|
+
}, j = /* @__PURE__ */ w(
|
|
1479
|
+
"div",
|
|
1480
|
+
{
|
|
1481
|
+
ref: S,
|
|
1482
|
+
className: V(ue.dropdown, n),
|
|
1483
|
+
style: H,
|
|
1484
|
+
"aria-hidden": !l,
|
|
1485
|
+
"data-variant": s,
|
|
1486
|
+
"data-color": v,
|
|
1487
|
+
"data-expanded": I,
|
|
1488
|
+
"data-size": o,
|
|
1489
|
+
tabIndex: -1,
|
|
1490
|
+
role: l ? "menu" : void 0,
|
|
1491
|
+
"aria-modal": l && s === "drawer-dropdown" ? !0 : void 0,
|
|
1492
|
+
"aria-activedescendant": l ? $ : void 0,
|
|
1493
|
+
children: [
|
|
1494
|
+
/* @__PURE__ */ w("header", { className: ue.header, children: [
|
|
1495
|
+
/* @__PURE__ */ a("h2", { className: ue.title, children: u }),
|
|
1496
|
+
/* @__PURE__ */ a(ye, { size: "sm", variant: "outline", onClick: h, "aria-label": f, children: /* @__PURE__ */ a(De, {}) })
|
|
1497
|
+
] }),
|
|
1498
|
+
/* @__PURE__ */ a("div", { className: ue.content, children: p }),
|
|
1499
|
+
i && /* @__PURE__ */ a("footer", { className: ue.footer, children: /* @__PURE__ */ a(ye, { size: "lg", variant: "solid", onClick: b || h, rounded: !0, children: /* @__PURE__ */ a("span", { "data-size": "md", children: i }) }) })
|
|
1500
|
+
]
|
|
1501
|
+
}
|
|
1502
|
+
);
|
|
1503
|
+
return /* @__PURE__ */ w(fe, { children: [
|
|
1504
|
+
t && /* @__PURE__ */ a("div", { className: ue.backdrop, "aria-hidden": !l }),
|
|
1505
|
+
/* @__PURE__ */ w("div", { id: e + "-root", ref: D, style: { position: "relative", display: "inline-block" }, children: [
|
|
1506
|
+
m,
|
|
1507
|
+
y ? ut(j, document.body) : j
|
|
1508
|
+
] })
|
|
1509
|
+
] });
|
|
1510
|
+
}, Un = "_section_1v20z_1", Wn = "_header_1v20z_7", Yn = "_list_1v20z_13", xe = {
|
|
1511
|
+
section: Un,
|
|
1512
|
+
header: Wn,
|
|
1513
|
+
list: Yn
|
|
1514
|
+
}, Qn = Ne(
|
|
1515
|
+
({ title: e, description: o, items: n, groups: t = {}, sortGroupBy: r, highlightWords: s, isLoading: u }) => {
|
|
1516
|
+
const { menu: f } = $e({
|
|
1517
|
+
items: n,
|
|
1518
|
+
groups: t,
|
|
1519
|
+
groupByKey: "groupId",
|
|
1520
|
+
keyboardEvents: !1,
|
|
1521
|
+
sortGroupBy: r
|
|
1522
|
+
});
|
|
1523
|
+
return /* @__PURE__ */ w("section", { className: xe.section, "aria-busy": u, children: [
|
|
1524
|
+
e || o ? /* @__PURE__ */ w("header", { className: xe.header, children: [
|
|
1525
|
+
e && /* @__PURE__ */ a(he, { as: "h1", size: "lg", children: e }),
|
|
1526
|
+
o && /* @__PURE__ */ a(Ve, { as: "p", size: "sm", variant: "subtle", className: xe.description, children: o })
|
|
1527
|
+
] }) : null,
|
|
1528
|
+
f?.map((i, m) => {
|
|
1529
|
+
const p = i.props || {};
|
|
1530
|
+
return /* @__PURE__ */ w(Ge, { children: [
|
|
1531
|
+
p?.title && /* @__PURE__ */ a(he, { as: "h2", size: "lg", children: p.title }),
|
|
1532
|
+
/* @__PURE__ */ a("ul", { className: xe.list, children: i?.items.map((l, h) => {
|
|
1533
|
+
const v = l.props || {};
|
|
1534
|
+
return /* @__PURE__ */ ct(at, { ...v, highlightWords: s, key: "dialog-list-item" + h });
|
|
1535
|
+
}) })
|
|
1536
|
+
] }, "dialog-list-item" + m);
|
|
1537
|
+
})
|
|
1538
|
+
] });
|
|
1539
|
+
}
|
|
1540
|
+
);
|
|
1541
|
+
Qn.displayName = "DialogList";
|
|
1542
|
+
const Xn = "_item_1cw3x_3", Jn = "_border_1cw3x_75", Zn = "_header_1cw3x_86", er = "_summary_1cw3x_102", tr = "_controls_1cw3x_116", nr = "_footer_1cw3x_123", rr = "_seenBy_1cw3x_128", or = "_link_1cw3x_138", ar = "_title_1cw3x_143", J = {
|
|
1543
|
+
item: Xn,
|
|
1544
|
+
border: Jn,
|
|
1545
|
+
header: Zn,
|
|
1546
|
+
summary: er,
|
|
1547
|
+
controls: tr,
|
|
1548
|
+
footer: nr,
|
|
1549
|
+
seenBy: rr,
|
|
1550
|
+
link: or,
|
|
1551
|
+
title: ar
|
|
1552
|
+
}, at = Ne(
|
|
1553
|
+
({
|
|
1554
|
+
as: e = "a",
|
|
1555
|
+
size: o = "xl",
|
|
1556
|
+
variant: n = "default",
|
|
1557
|
+
color: t,
|
|
1558
|
+
loading: r,
|
|
1559
|
+
controls: s,
|
|
1560
|
+
selectable: u,
|
|
1561
|
+
selected: f,
|
|
1562
|
+
status: i,
|
|
1563
|
+
extendedStatusLabel: m,
|
|
1564
|
+
sender: p,
|
|
1565
|
+
recipient: l,
|
|
1566
|
+
recipientLabel: h = "to",
|
|
1567
|
+
grouped: v = !1,
|
|
1568
|
+
updatedAt: b,
|
|
1569
|
+
updatedAtLabel: $,
|
|
1570
|
+
archived: y,
|
|
1571
|
+
archivedAt: I,
|
|
1572
|
+
archivedAtLabel: D,
|
|
1573
|
+
trashed: S,
|
|
1574
|
+
trashedAt: O,
|
|
1575
|
+
trashedAtLabel: c,
|
|
1576
|
+
badge: x,
|
|
1577
|
+
dueAt: P,
|
|
1578
|
+
dueAtExpired: H,
|
|
1579
|
+
dueAtLabel: j,
|
|
1580
|
+
unread: z,
|
|
1581
|
+
unreadLabel: M = "Ulest",
|
|
1582
|
+
unreadItems: R,
|
|
1583
|
+
unreadItemsLabel: E = "Ulest innhold",
|
|
1584
|
+
seenByLog: d,
|
|
1585
|
+
draftsLabel: _,
|
|
1586
|
+
sentCount: A,
|
|
1587
|
+
receivedCount: k,
|
|
1588
|
+
attachmentsCount: B,
|
|
1589
|
+
attachmentsLabel: T,
|
|
1590
|
+
tooltips: q = {},
|
|
1591
|
+
title: de,
|
|
1592
|
+
description: re,
|
|
1593
|
+
summary: U,
|
|
1594
|
+
highlightWords: g,
|
|
1595
|
+
id: N,
|
|
1596
|
+
...L
|
|
1597
|
+
}) => {
|
|
1598
|
+
const W = u ? "select" : n;
|
|
1599
|
+
return /* @__PURE__ */ w(
|
|
1600
|
+
Ot,
|
|
1601
|
+
{
|
|
1602
|
+
as: "li",
|
|
1603
|
+
id: N,
|
|
1604
|
+
className: J.item,
|
|
1605
|
+
size: o,
|
|
1606
|
+
color: t,
|
|
1607
|
+
variant: W,
|
|
1608
|
+
"data-unread": z ? "true" : "false",
|
|
1609
|
+
"data-selected": f,
|
|
1610
|
+
"data-trashed": S,
|
|
1611
|
+
"data-archived": y,
|
|
1612
|
+
"data-loading": r,
|
|
1613
|
+
children: [
|
|
1614
|
+
/* @__PURE__ */ a(Nt, { ...L, className: J.link, as: e, children: /* @__PURE__ */ w("div", { className: J.border, children: [
|
|
1615
|
+
/* @__PURE__ */ w("header", { className: J.header, children: [
|
|
1616
|
+
/* @__PURE__ */ w(
|
|
1617
|
+
he,
|
|
1618
|
+
{
|
|
1619
|
+
as: "h2",
|
|
1620
|
+
highlightWords: g,
|
|
1621
|
+
weight: z ? "bold" : "normal",
|
|
1622
|
+
loading: r,
|
|
1623
|
+
maxRows: 2,
|
|
1624
|
+
className: J.title,
|
|
1625
|
+
children: [
|
|
1626
|
+
de,
|
|
1627
|
+
z && /* @__PURE__ */ a(ne, { label: M, variant: "tinted", style: { marginLeft: "0.75em", marginTop: "-2px" } }) || R && /* @__PURE__ */ a(ne, { label: E, style: { marginLeft: "0.75em", marginTop: "-2px" } })
|
|
1628
|
+
]
|
|
1629
|
+
}
|
|
1630
|
+
),
|
|
1631
|
+
/* @__PURE__ */ a(
|
|
1632
|
+
lr,
|
|
1633
|
+
{
|
|
1634
|
+
size: "xs",
|
|
1635
|
+
loading: r,
|
|
1636
|
+
sender: p,
|
|
1637
|
+
recipient: l,
|
|
1638
|
+
recipientLabel: h,
|
|
1639
|
+
grouped: v
|
|
1640
|
+
}
|
|
1641
|
+
),
|
|
1642
|
+
U && /* @__PURE__ */ a(
|
|
1643
|
+
he,
|
|
1644
|
+
{
|
|
1645
|
+
as: "h3",
|
|
1646
|
+
highlightWords: g,
|
|
1647
|
+
weight: "normal",
|
|
1648
|
+
className: J.summary,
|
|
1649
|
+
loading: r,
|
|
1650
|
+
maxRows: 2,
|
|
1651
|
+
children: U
|
|
1652
|
+
}
|
|
1653
|
+
)
|
|
1654
|
+
] }),
|
|
1655
|
+
/* @__PURE__ */ a(
|
|
1656
|
+
sr,
|
|
1657
|
+
{
|
|
1658
|
+
className: J.footer,
|
|
1659
|
+
loading: r,
|
|
1660
|
+
badge: x,
|
|
1661
|
+
status: i,
|
|
1662
|
+
extendedStatusLabel: m,
|
|
1663
|
+
draftsLabel: _,
|
|
1664
|
+
sentCount: A,
|
|
1665
|
+
receivedCount: k,
|
|
1666
|
+
updatedAt: b,
|
|
1667
|
+
updatedAtLabel: $,
|
|
1668
|
+
archivedAt: I,
|
|
1669
|
+
archivedAtLabel: D,
|
|
1670
|
+
trashedAt: O,
|
|
1671
|
+
trashedAtLabel: c,
|
|
1672
|
+
dueAt: P,
|
|
1673
|
+
dueAtExpired: H,
|
|
1674
|
+
dueAtLabel: j,
|
|
1675
|
+
attachmentsCount: B,
|
|
1676
|
+
attachmentsLabel: T,
|
|
1677
|
+
tooltips: q
|
|
1678
|
+
}
|
|
1679
|
+
),
|
|
1680
|
+
d && q?.seenBy ? /* @__PURE__ */ a(je, { placement: "bottom", content: q?.seenBy, children: /* @__PURE__ */ a("span", { className: J.seenBy, children: /* @__PURE__ */ a(_e, { items: d.items }) }) }) : d && /* @__PURE__ */ a(_e, { items: d.items, className: J.seenBy })
|
|
1681
|
+
] }) }),
|
|
1682
|
+
/* @__PURE__ */ a(ze, { className: J.controls, children: s })
|
|
1683
|
+
]
|
|
1684
|
+
}
|
|
1685
|
+
);
|
|
1686
|
+
}
|
|
1687
|
+
);
|
|
1688
|
+
at.displayName = "DialogListItem";
|
|
1689
|
+
const sr = ({
|
|
1690
|
+
className: e,
|
|
1691
|
+
loading: o,
|
|
1692
|
+
status: n,
|
|
1693
|
+
sender: t,
|
|
1694
|
+
updatedAt: r,
|
|
1695
|
+
updatedAtLabel: s,
|
|
1696
|
+
dueAt: u,
|
|
1697
|
+
dueAtExpired: f,
|
|
1698
|
+
dueAtLabel: i,
|
|
1699
|
+
archivedAt: m,
|
|
1700
|
+
archivedAtLabel: p,
|
|
1701
|
+
trashedAt: l,
|
|
1702
|
+
trashedAtLabel: h,
|
|
1703
|
+
draftsLabel: v,
|
|
1704
|
+
sentCount: b = 0,
|
|
1705
|
+
receivedCount: $ = 0,
|
|
1706
|
+
attachmentsCount: y = 0,
|
|
1707
|
+
attachmentsLabel: I,
|
|
1708
|
+
transmissionsLabel: D,
|
|
1709
|
+
activityLog: S,
|
|
1710
|
+
extendedStatusLabel: O,
|
|
1711
|
+
tooltips: c = {}
|
|
1712
|
+
}) => /* @__PURE__ */ w(kt, { className: e, size: "xs", children: [
|
|
1713
|
+
n && /* @__PURE__ */ a(hr, { tooltip: c.status, loading: o, ...n }),
|
|
1714
|
+
O && /* @__PURE__ */ a(ne, { tooltip: c.extendedStatus, variant: "outline", children: O }),
|
|
1715
|
+
v && /* @__PURE__ */ a(ne, { tooltip: c.drafts, variant: "dotted", children: v }),
|
|
1716
|
+
r && /* @__PURE__ */ w(te, { tooltip: c.updatedAt, loading: o, datetime: r, size: "xs", children: [
|
|
1717
|
+
/* @__PURE__ */ a("strong", { children: t && t.name + ", " }),
|
|
1718
|
+
s
|
|
1719
|
+
] }),
|
|
1720
|
+
y > 0 && /* @__PURE__ */ a(te, { tooltip: c.attachments, loading: o, size: "xs", icon: wt, children: I || y }),
|
|
1721
|
+
D && /* @__PURE__ */ a(te, { tooltip: c.transmissions, loading: o, size: "xs", icon: Tt, children: D }),
|
|
1722
|
+
b > 0 && /* @__PURE__ */ a(te, { tooltip: c.sent, size: "xs", icon: Xe, children: b }),
|
|
1723
|
+
$ > 0 && /* @__PURE__ */ a(te, { tooltip: c.received, size: "xs", icon: Pt, children: $ }),
|
|
1724
|
+
u && i && /* @__PURE__ */ a(
|
|
1725
|
+
te,
|
|
1726
|
+
{
|
|
1727
|
+
variant: "tinted",
|
|
1728
|
+
color: f ? "danger" : "warning",
|
|
1729
|
+
tooltip: c.dueAt,
|
|
1730
|
+
loading: o,
|
|
1731
|
+
datetime: u,
|
|
1732
|
+
size: "xs",
|
|
1733
|
+
icon: xt,
|
|
1734
|
+
children: i
|
|
1735
|
+
}
|
|
1736
|
+
),
|
|
1737
|
+
h && /* @__PURE__ */ a(
|
|
1738
|
+
te,
|
|
1739
|
+
{
|
|
1740
|
+
variant: "tinted",
|
|
1741
|
+
color: "neutral",
|
|
1742
|
+
tooltip: c.trashedAt,
|
|
1743
|
+
loading: o,
|
|
1744
|
+
datetime: l,
|
|
1745
|
+
size: "xs",
|
|
1746
|
+
icon: Kt,
|
|
1747
|
+
children: h
|
|
1748
|
+
}
|
|
1749
|
+
) || p && /* @__PURE__ */ a(
|
|
1750
|
+
te,
|
|
1751
|
+
{
|
|
1752
|
+
variant: "tinted",
|
|
1753
|
+
color: "neutral",
|
|
1754
|
+
tooltip: c.archivedAt,
|
|
1755
|
+
loading: o,
|
|
1756
|
+
datetime: m,
|
|
1757
|
+
size: "xs",
|
|
1758
|
+
icon: Rt,
|
|
1759
|
+
children: p
|
|
1760
|
+
}
|
|
1761
|
+
),
|
|
1762
|
+
S && /* @__PURE__ */ a(
|
|
1763
|
+
te,
|
|
1764
|
+
{
|
|
1765
|
+
tooltip: c.activityLog,
|
|
1766
|
+
loading: o,
|
|
1767
|
+
size: "xs",
|
|
1768
|
+
icon: Dt,
|
|
1769
|
+
as: S?.onClick ? "button" : "span",
|
|
1770
|
+
onClick: S?.onClick,
|
|
1771
|
+
children: S?.label || "Activity log"
|
|
1772
|
+
}
|
|
1773
|
+
)
|
|
1774
|
+
] }), lr = ({
|
|
1775
|
+
sender: e,
|
|
1776
|
+
recipient: o,
|
|
1777
|
+
recipientLabel: n = "to",
|
|
1778
|
+
grouped: t = !1,
|
|
1779
|
+
loading: r,
|
|
1780
|
+
size: s = "xs"
|
|
1781
|
+
}) => !e && !o ? null : /* @__PURE__ */ w(Dn, { loading: r, size: s, avatar: e, avatarGroup: !r && t && e && o ? {
|
|
1782
|
+
items: [o, e]
|
|
1783
|
+
} : void 0, children: [
|
|
1784
|
+
/* @__PURE__ */ a("strong", { children: e?.name }),
|
|
1785
|
+
" ",
|
|
1786
|
+
o && n + " " + o?.name
|
|
1787
|
+
] }), ir = "_media_1x8z9_1", cr = "_icon_1x8z9_10", dr = "_avatarGroup_1x8z9_17", me = {
|
|
1788
|
+
media: ir,
|
|
1789
|
+
icon: cr,
|
|
1790
|
+
avatarGroup: dr
|
|
1791
|
+
};
|
|
1792
|
+
function ur(e) {
|
|
1793
|
+
return typeof e == "string" || typeof e == "number" || typeof e == "boolean" || e === null || qe(e);
|
|
1794
|
+
}
|
|
1795
|
+
const He = ({ size: e = "xs", icon: o, progress: n }) => !o && typeof n != "number" ? !1 : /* @__PURE__ */ w("span", { className: me.media, "data-size": e, children: [
|
|
1796
|
+
Se(o) && /* @__PURE__ */ a(Ae, { ...o, className: me.avatar }) || Pe(o) && /* @__PURE__ */ a(_e, { ...o, className: me.avatarGroup }) || Me(o) && /* @__PURE__ */ a(ie, { ...o, className: me.icon }) || ur(o) && o || /* @__PURE__ */ a(ie, { svgElement: o, className: me.icon }),
|
|
1797
|
+
n && /* @__PURE__ */ a(Ct, { value: n, className: me.icon })
|
|
1798
|
+
] }), mr = "_item_cqtms_1", fr = "_label_cqtms_54", Ie = {
|
|
1799
|
+
item: mr,
|
|
1800
|
+
label: fr
|
|
1801
|
+
}, te = ({
|
|
1802
|
+
as: e,
|
|
1803
|
+
loading: o,
|
|
1804
|
+
className: n,
|
|
1805
|
+
reverse: t,
|
|
1806
|
+
size: r = "xs",
|
|
1807
|
+
variant: s,
|
|
1808
|
+
color: u,
|
|
1809
|
+
icon: f,
|
|
1810
|
+
children: i,
|
|
1811
|
+
datetime: m,
|
|
1812
|
+
tooltip: p,
|
|
1813
|
+
...l
|
|
1814
|
+
}) => {
|
|
1815
|
+
const h = e || (m ? "time" : "span");
|
|
1816
|
+
return p ? /* @__PURE__ */ a(je, { content: p, placement: "bottom", children: /* @__PURE__ */ a(
|
|
1817
|
+
h,
|
|
1818
|
+
{
|
|
1819
|
+
"data-size": r,
|
|
1820
|
+
"data-color": u,
|
|
1821
|
+
"data-variant": s,
|
|
1822
|
+
dateTime: m,
|
|
1823
|
+
className: V(Ie.item, n),
|
|
1824
|
+
...l,
|
|
1825
|
+
children: /* @__PURE__ */ w(pe, { loading: o, children: [
|
|
1826
|
+
!o && f && /* @__PURE__ */ a(He, { size: r, icon: f }),
|
|
1827
|
+
/* @__PURE__ */ a("span", { className: Ie.label, children: i })
|
|
1828
|
+
] })
|
|
1829
|
+
}
|
|
1830
|
+
) }) : /* @__PURE__ */ a(
|
|
1831
|
+
h,
|
|
1832
|
+
{
|
|
1833
|
+
"data-size": r,
|
|
1834
|
+
"data-color": u,
|
|
1835
|
+
"data-variant": s,
|
|
1836
|
+
dateTime: m,
|
|
1837
|
+
className: V(Ie.item, n),
|
|
1838
|
+
...l,
|
|
1839
|
+
children: /* @__PURE__ */ w(pe, { loading: o, children: [
|
|
1840
|
+
!o && f && /* @__PURE__ */ a(He, { size: r, icon: f }),
|
|
1841
|
+
/* @__PURE__ */ a("span", { className: Ie.label, children: i })
|
|
1842
|
+
] })
|
|
1843
|
+
}
|
|
1844
|
+
);
|
|
1845
|
+
};
|
|
1846
|
+
var pr = /* @__PURE__ */ ((e) => (e["not-applicable"] = "NOT_APPLICABLE", e.draft = "DRAFT", e.awaiting = "AWAITING", e.completed = "COMPLETED", e["in-progress"] = "IN_PROGRESS", e["requires-attention"] = "REQUIRES_ATTENTION", e))(pr || {});
|
|
1847
|
+
const hr = ({ loading: e, value: o = "not-applicable", label: n, tooltip: t }) => {
|
|
1848
|
+
if (e)
|
|
1849
|
+
return null;
|
|
1850
|
+
switch (o) {
|
|
1851
|
+
case "draft":
|
|
1852
|
+
return /* @__PURE__ */ a(ne, { tooltip: t, variant: "dotted", children: n || o });
|
|
1853
|
+
case "requires-attention":
|
|
1854
|
+
return /* @__PURE__ */ a(ne, { tooltip: t, variant: "strong", children: n || o });
|
|
1855
|
+
case "not-applicable":
|
|
1856
|
+
return null;
|
|
1857
|
+
default:
|
|
1858
|
+
return /* @__PURE__ */ a(ne, { tooltip: t, variant: "outline", children: n || o });
|
|
1859
|
+
}
|
|
1860
|
+
}, vr = "_menu_16mue_4", br = "_button_16mue_12", gr = "_label_16mue_16", ge = {
|
|
1861
|
+
menu: vr,
|
|
1862
|
+
button: br,
|
|
1863
|
+
label: gr
|
|
1864
|
+
}, no = Ne(
|
|
1865
|
+
({
|
|
1866
|
+
disabled: e,
|
|
1867
|
+
label: o = "Label",
|
|
1868
|
+
variant: n = "solid",
|
|
1869
|
+
title: t = "Title",
|
|
1870
|
+
htmlTitle: r,
|
|
1871
|
+
items: s = [],
|
|
1872
|
+
dropdownSize: u = "sm",
|
|
1873
|
+
id: f = "toolbar-menu",
|
|
1874
|
+
onSelectId: i,
|
|
1875
|
+
...m
|
|
1876
|
+
}) => {
|
|
1877
|
+
const p = It({ id: f, returnFocusOnClose: !0 }), l = m.searchable ? "combobox" : "menu", h = Ke(
|
|
1878
|
+
(b) => {
|
|
1879
|
+
i?.(b?.id ?? ""), b?.role !== "checkbox" && p.setOpen(!1);
|
|
1880
|
+
},
|
|
1881
|
+
[i, p]
|
|
1882
|
+
), v = ce(
|
|
1883
|
+
() => s.map((b) => ({
|
|
1884
|
+
...b,
|
|
1885
|
+
onClick: () => h(b)
|
|
1886
|
+
})),
|
|
1887
|
+
[s, h]
|
|
1888
|
+
);
|
|
1889
|
+
return e ? /* @__PURE__ */ w(ye, { className: ge.button, variant: n, title: r, disabled: !0, children: [
|
|
1890
|
+
/* @__PURE__ */ a("span", { className: ge.label, children: o }),
|
|
1891
|
+
/* @__PURE__ */ a(Te, { "aria-hidden": "true", focusable: "false" })
|
|
1892
|
+
] }) : /* @__PURE__ */ a("span", { className: ge.menu, children: /* @__PURE__ */ a(
|
|
1893
|
+
Vn,
|
|
1894
|
+
{
|
|
1895
|
+
id: f,
|
|
1896
|
+
variant: "drawer-dropdown",
|
|
1897
|
+
title: t,
|
|
1898
|
+
size: u,
|
|
1899
|
+
trigger: /* @__PURE__ */ w(
|
|
1900
|
+
ye,
|
|
1901
|
+
{
|
|
1902
|
+
className: ge.button,
|
|
1903
|
+
variant: n,
|
|
1904
|
+
title: r,
|
|
1905
|
+
onClick: p.toggleMenu,
|
|
1906
|
+
"aria-expanded": p.open,
|
|
1907
|
+
"aria-haspopup": "menu",
|
|
1908
|
+
"aria-controls": p.open ? p.menuId : void 0,
|
|
1909
|
+
ref: p.triggerRef,
|
|
1910
|
+
children: [
|
|
1911
|
+
/* @__PURE__ */ a("span", { className: ge.label, children: o }),
|
|
1912
|
+
/* @__PURE__ */ a(Te, { "aria-hidden": "true", focusable: "false" })
|
|
1913
|
+
]
|
|
1914
|
+
}
|
|
1915
|
+
),
|
|
1916
|
+
open: p.open,
|
|
1917
|
+
onClose: () => p.setOpen(!1),
|
|
1918
|
+
...m?.searchable ? {} : p.dropdownA11yProps,
|
|
1919
|
+
children: /* @__PURE__ */ a(
|
|
1920
|
+
tt,
|
|
1921
|
+
{
|
|
1922
|
+
...m,
|
|
1923
|
+
items: v,
|
|
1924
|
+
keyboardEvents: p.open,
|
|
1925
|
+
a11yMode: l,
|
|
1926
|
+
open: p.open,
|
|
1927
|
+
scrollToTopOnOpen: m.virtualized,
|
|
1928
|
+
...l === "combobox" ? { id: p.menuId } : p.menuA11yProps
|
|
1929
|
+
}
|
|
1930
|
+
)
|
|
1931
|
+
}
|
|
1932
|
+
) });
|
|
1933
|
+
}
|
|
1934
|
+
), ro = Ne(
|
|
1935
|
+
({
|
|
1936
|
+
label: e,
|
|
1937
|
+
hideLabel: o = !0,
|
|
1938
|
+
value: n,
|
|
1939
|
+
name: t,
|
|
1940
|
+
placeholder: r = "Search",
|
|
1941
|
+
loading: s,
|
|
1942
|
+
collapsible: u,
|
|
1943
|
+
clearButtonAltText: f = "Clear search",
|
|
1944
|
+
onChange: i,
|
|
1945
|
+
onClear: m,
|
|
1946
|
+
onKeyDown: p,
|
|
1947
|
+
menu: l,
|
|
1948
|
+
minLength: h,
|
|
1949
|
+
disabled: v,
|
|
1950
|
+
htmlTitle: b
|
|
1951
|
+
}) => /* @__PURE__ */ a(
|
|
1952
|
+
rt,
|
|
1953
|
+
{
|
|
1954
|
+
size: "xs",
|
|
1955
|
+
label: e,
|
|
1956
|
+
hideLabel: o,
|
|
1957
|
+
value: n,
|
|
1958
|
+
name: t,
|
|
1959
|
+
title: b,
|
|
1960
|
+
placeholder: r,
|
|
1961
|
+
clearButtonAltText: f,
|
|
1962
|
+
onChange: i,
|
|
1963
|
+
onClear: m,
|
|
1964
|
+
onKeyDown: p,
|
|
1965
|
+
collapsible: u,
|
|
1966
|
+
autoComplete: "off",
|
|
1967
|
+
autoCapitalize: "off",
|
|
1968
|
+
type: "search",
|
|
1969
|
+
minLength: h,
|
|
1970
|
+
loading: s,
|
|
1971
|
+
menu: l,
|
|
1972
|
+
disabled: v
|
|
1973
|
+
}
|
|
1974
|
+
)
|
|
1975
|
+
);
|
|
1976
|
+
export {
|
|
1977
|
+
ne as B,
|
|
1978
|
+
lr as D,
|
|
1979
|
+
Zt as F,
|
|
1980
|
+
he as H,
|
|
1981
|
+
ie as I,
|
|
1982
|
+
tt as M,
|
|
1983
|
+
to as R,
|
|
1984
|
+
rt as S,
|
|
1985
|
+
no as T,
|
|
1986
|
+
nn as V,
|
|
1987
|
+
Dn as a,
|
|
1988
|
+
Qn as b,
|
|
1989
|
+
at as c,
|
|
1990
|
+
sr as d,
|
|
1991
|
+
hr as e,
|
|
1992
|
+
pr as f,
|
|
1993
|
+
Vn as g,
|
|
1994
|
+
Fe as h,
|
|
1995
|
+
Le as i,
|
|
1996
|
+
nt as j,
|
|
1997
|
+
Ze as k,
|
|
1998
|
+
Je as l,
|
|
1999
|
+
te as m,
|
|
2000
|
+
He as n,
|
|
2001
|
+
Xe as o,
|
|
2002
|
+
$t as p,
|
|
2003
|
+
Te as q,
|
|
2004
|
+
Ft as r,
|
|
2005
|
+
De as s,
|
|
2006
|
+
ro as t,
|
|
2007
|
+
Me as u,
|
|
2008
|
+
ln as v,
|
|
2009
|
+
on as w
|
|
2010
|
+
};
|