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