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