@altinn/altinn-components 0.68.6 → 0.68.7

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