@altinn/altinn-components 0.54.2 → 0.55.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (302) hide show
  1. package/dist/{PersonCircle-DlX_3kRO.js → ChevronUpDown-DqGsU4MC.js} +5 -5
  2. package/dist/Eye-BrbjRZJp.js +24 -0
  3. package/dist/InboxFill-vGck_zM_.js +81 -0
  4. package/dist/InformationSquare-D3WAxfVw.js +24 -0
  5. package/dist/Trash-DBcymOP9.js +81 -0
  6. package/dist/assets/AccountMenuButton.css +1 -1
  7. package/dist/assets/AccountSelector.css +1 -1
  8. package/dist/assets/AutocompleteBase.css +1 -1
  9. package/dist/assets/ButtonGroup.css +1 -1
  10. package/dist/assets/ButtonIcon.css +1 -1
  11. package/dist/assets/DashboardCard.css +1 -0
  12. package/dist/assets/DashboardHeader.css +1 -0
  13. package/dist/assets/DialogListItem.css +1 -1
  14. package/dist/assets/Dropdown.css +1 -0
  15. package/dist/assets/DropdownBase.css +1 -1
  16. package/dist/assets/GlobalHeader.css +1 -1
  17. package/dist/assets/ItemControls.css +1 -0
  18. package/dist/assets/ItemLabel.css +1 -0
  19. package/dist/assets/ItemMedia.css +1 -0
  20. package/dist/assets/MenuItem.css +1 -1
  21. package/dist/assets/MenuListDivider.css +1 -0
  22. package/dist/assets/MenuListHeading.css +1 -0
  23. package/dist/assets/MenuListItem.css +1 -0
  24. package/dist/assets/MenuListSearch.css +1 -0
  25. package/dist/assets/MetaItemIcon.css +1 -1
  26. package/dist/assets/SearchField.css +1 -1
  27. package/dist/assets/SeenByLogButton.css +1 -0
  28. package/dist/assets/Switch.css +1 -0
  29. package/dist/assets/TabMenu.css +1 -0
  30. package/dist/assets/Tooltip.css +1 -0
  31. package/dist/assets/menuList.css +1 -0
  32. package/dist/components/Account/AccountList.js +1 -1
  33. package/dist/components/Account/AccountListVirtual.js +4 -4
  34. package/dist/components/Account/AccountMenu.js +14 -11
  35. package/dist/components/Account/AccountMenuButton.js +58 -56
  36. package/dist/components/Attachment/AttachmentLink.js +47 -41
  37. package/dist/components/Avatar/Avatar.js +11 -12
  38. package/dist/components/Avatar/AvatarGroup.js +38 -28
  39. package/dist/components/Banner/Banner.js +20 -38
  40. package/dist/components/Button/ButtonGroup.js +28 -12
  41. package/dist/components/Button/ButtonIcon.js +15 -15
  42. package/dist/components/Button/FloatingActionButton.js +22 -19
  43. package/dist/components/Byline/Byline.js +1 -1
  44. package/dist/components/ContextMenu/ContextMenu.js +73 -67
  45. package/dist/components/Dashboard/DashboardCard.js +24 -21
  46. package/dist/components/Dashboard/DashboardHeader.js +16 -14
  47. package/dist/components/Dashboard/index.js +2 -4
  48. package/dist/components/Datepicker/Datepicker.js +16 -14
  49. package/dist/components/Datepicker/DatepickerHeader.js +13 -13
  50. package/dist/components/Dialog/DialogActions.js +9 -9
  51. package/dist/components/Dialog/DialogAttachments.js +1 -1
  52. package/dist/components/Dialog/DialogListItem.js +113 -112
  53. package/dist/components/Dialog/DialogMetadata.js +83 -154
  54. package/dist/components/Dialog/DialogSeenBy.js +24 -41
  55. package/dist/components/Dialog/DialogTabs.js +4 -4
  56. package/dist/components/Dialog/SeenByLog.js +7 -7
  57. package/dist/components/Dialog/SeenByLogButton.js +12 -6
  58. package/dist/components/Dropdown/DrawerOrDropdown.js +1 -1
  59. package/dist/components/Dropdown/Dropdown.js +160 -0
  60. package/dist/components/Dropdown/DropdownBase.js +12 -12
  61. package/dist/components/Dropdown/FloatingDropdown.js +119 -74
  62. package/dist/components/Dropdown/index.js +18 -16
  63. package/dist/components/DsComponents/index.js +2 -2
  64. package/dist/components/Forms/SearchField.js +44 -29
  65. package/dist/components/Forms/Switch.js +10 -8
  66. package/dist/components/GlobalHeader/AccountSelector.js +55 -55
  67. package/dist/components/GlobalHeader/GlobalHeader.js +55 -54
  68. package/dist/components/GlobalHeader/GlobalSearch.js +1 -1
  69. package/dist/components/GlobalHeader/GlobalSearchButton.js +1 -0
  70. package/dist/components/GlobalMenu/BackButton.js +1 -1
  71. package/dist/components/GlobalMenu/GlobalMenu.js +52 -43
  72. package/dist/components/GlobalMenu/GlobalMenuButton.js +15 -14
  73. package/dist/components/GlobalMenu/LocaleSwitcher.js +30 -24
  74. package/dist/components/GlobalMenu_old/BackButton.js +1 -1
  75. package/dist/components/GlobalMenu_old/CurrentAccount.js +8 -9
  76. package/dist/components/GlobalMenu_old/EndUserLabel.js +29 -10
  77. package/dist/components/GlobalMenu_old/GlobalMenu.js +15 -8
  78. package/dist/components/GlobalMenu_old/GlobalMenuButton.js +1 -1
  79. package/dist/components/Header/Header.js +6 -6
  80. package/dist/components/Header/HeaderBase.js +1 -1
  81. package/dist/components/Header/LocaleSwitcher.js +10 -10
  82. package/dist/components/Icon/Icon.js +19 -20
  83. package/dist/components/Icon/ProgressIcon.js +1 -0
  84. package/dist/components/Icon/index.js +4 -6
  85. package/dist/components/Item/ItemControls.js +8 -0
  86. package/dist/components/Item/ItemLabel.js +34 -0
  87. package/dist/components/Item/ItemMedia.js +33 -0
  88. package/dist/components/Item/index.js +8 -0
  89. package/dist/components/Layout/Layout.js +4 -4
  90. package/dist/components/Menu/Menu.js +67 -45
  91. package/dist/components/Menu/MenuItem.js +192 -66
  92. package/dist/components/Menu/MenuItems.js +154 -71
  93. package/dist/components/Menu/MenuList.js +39 -0
  94. package/dist/components/Menu/MenuListDivider.js +8 -0
  95. package/dist/components/Menu/MenuListGroup.js +7 -0
  96. package/dist/components/Menu/MenuListHeading.js +7 -0
  97. package/dist/components/Menu/MenuListItem.js +34 -0
  98. package/dist/components/Menu/MenuListSearch.js +83 -0
  99. package/dist/components/Menu/MenuOption.js +4 -87
  100. package/dist/components/Menu/TabMenu.js +15 -0
  101. package/dist/components/Menu/VirtualizedMenuItems.js +227 -0
  102. package/dist/components/Menu/aria.js +9 -0
  103. package/dist/components/Menu/example.data.js +373 -0
  104. package/dist/components/Menu/example.hooks.js +75 -0
  105. package/dist/components/Menu/index.js +24 -25
  106. package/dist/components/Menu/types.js +1 -0
  107. package/dist/components/Menu/useDropdownMenuController.js +43 -0
  108. package/dist/components/Menu/useMenuSearch.js +146 -0
  109. package/dist/components/Menu/useMenuVirtualization.js +5 -0
  110. package/dist/components/Metadata/MetaItemIcon.js +4 -4
  111. package/dist/components/Notifications/NotificationItemBase.js +49 -50
  112. package/dist/components/Page/ContactButtons.js +13 -10
  113. package/dist/components/Page/PageTabs.js +4 -13
  114. package/dist/components/Searchbar/Autocomplete.js +34 -32
  115. package/dist/components/Searchbar/AutocompleteBase.js +3 -3
  116. package/dist/components/Searchbar/AutocompleteItem.js +29 -42
  117. package/dist/components/Settings/SettingsItemBase.js +25 -26
  118. package/dist/components/Settings/UsedByLog.js +6 -6
  119. package/dist/components/Toolbar/DatepickerFilter.js +87 -0
  120. package/dist/components/Toolbar/SelectDateFilter.js +51 -0
  121. package/dist/components/Toolbar/Toolbar.js +18 -104
  122. package/dist/components/Toolbar/ToolbarFilter.js +69 -73
  123. package/dist/components/Toolbar/ToolbarFilterAddMenu.js +82 -0
  124. package/dist/components/Toolbar/ToolbarFilterButton.js +46 -0
  125. package/dist/components/Toolbar/ToolbarFilterMenu.js +117 -0
  126. package/dist/components/Toolbar/ToolbarMenu.js +58 -21
  127. package/dist/components/Toolbar/ToolbarSearch.js +15 -10
  128. package/dist/components/Toolbar/example.data.js +388 -0
  129. package/dist/components/Toolbar/example.hooks.js +68 -0
  130. package/dist/components/Toolbar/formatDateRange.js +19 -0
  131. package/dist/components/Toolbar/index.js +12 -14
  132. package/dist/components/Toolbar/useFilter.js +63 -0
  133. package/dist/components/Tooltip/Tooltip.js +101 -0
  134. package/dist/components/Tooltip/index.js +4 -0
  135. package/dist/components/UserListItem/UserListItem.js +15 -13
  136. package/dist/components/index.js +389 -386
  137. package/dist/floating-ui.dom-bEgaHJCq.js +997 -0
  138. package/dist/global.css +1 -1
  139. package/dist/hooks/useAccountSelector.js +9 -9
  140. package/dist/hooks/useMenu.js +48 -47
  141. package/dist/index--jNxJmA8.js +2000 -0
  142. package/dist/index.js +402 -399
  143. package/dist/menuList.module-DFH60CqT.js +6 -0
  144. package/dist/{textfield-DAuYWtUj.js → textfield-Drdr9bio.js} +40 -39
  145. package/dist/types/lib/components/Account/AccountList.d.ts +2 -2
  146. package/dist/types/lib/components/Account/AccountList.stories.d.ts +3 -4
  147. package/dist/types/lib/components/Account/AccountMenu.d.ts +3 -3
  148. package/dist/types/lib/components/Account/AccountMenu.stories.d.ts +1 -1
  149. package/dist/types/lib/components/Account/AccountMenuButton.stories.d.ts +10 -2
  150. package/dist/types/lib/components/Attachment/AttachmentLink.d.ts +3 -1
  151. package/dist/types/lib/components/Attachment/AttachmentLink.stories.d.ts +1 -1
  152. package/dist/types/lib/components/Button/ButtonGroup.d.ts +3 -1
  153. package/dist/types/lib/components/Button/ButtonGroup.stories.d.ts +1 -1
  154. package/dist/types/lib/components/Button/FloatingActionButton.d.ts +1 -6
  155. package/dist/types/lib/components/ContextMenu/ContextMenu.d.ts +7 -8
  156. package/dist/types/lib/components/Dashboard/DashboardCard.d.ts +2 -2
  157. package/dist/types/lib/components/Dashboard/DashboardHeader.d.ts +2 -2
  158. package/dist/types/lib/components/Dashboard/index.d.ts +0 -1
  159. package/dist/types/lib/components/Dialog/DialogTabs.d.ts +2 -4
  160. package/dist/types/lib/components/Dialog/SeenByLogButton.d.ts +8 -5
  161. package/dist/types/lib/components/Dropdown/Dropdown.d.ts +22 -0
  162. package/dist/types/lib/components/Dropdown/Dropdown.stories.d.ts +14 -0
  163. package/dist/types/lib/components/Dropdown/DropdownBase.d.ts +3 -2
  164. package/dist/types/lib/components/Dropdown/index.d.ts +1 -0
  165. package/dist/types/lib/components/Forms/SearchField.d.ts +2 -1
  166. package/dist/types/lib/components/Forms/SearchField.stories.d.ts +1 -1
  167. package/dist/types/lib/components/Forms/Switch.d.ts +2 -1
  168. package/dist/types/lib/components/Forms/Switch.stories.d.ts +1 -1
  169. package/dist/types/lib/components/GlobalMenu/GlobalMenu.d.ts +1 -1
  170. package/dist/types/lib/components/GlobalMenu/GlobalMenu.stories.d.ts +1 -3
  171. package/dist/types/lib/components/GlobalMenu/LocaleSwitcher.d.ts +1 -1
  172. package/dist/types/lib/components/Header/HeaderButton.d.ts +0 -4
  173. package/dist/types/lib/components/Header/HeaderButton.stories.d.ts +0 -1
  174. package/dist/types/lib/components/Icon/Icon.d.ts +3 -2
  175. package/dist/types/lib/components/Icon/index.d.ts +0 -1
  176. package/dist/types/lib/components/Item/ItemControls.d.ts +7 -0
  177. package/dist/types/lib/components/Item/ItemLabel.d.ts +14 -0
  178. package/dist/types/lib/components/Item/ItemMedia.d.ts +9 -0
  179. package/dist/types/lib/components/Item/index.d.ts +3 -0
  180. package/dist/types/lib/components/Menu/Menu.d.ts +4 -7
  181. package/dist/types/lib/components/Menu/Menu.stories.d.ts +64 -4
  182. package/dist/types/lib/components/Menu/MenuItem.d.ts +53 -21
  183. package/dist/types/lib/components/Menu/MenuItems.d.ts +21 -14
  184. package/dist/types/lib/components/Menu/MenuList.d.ts +21 -0
  185. package/dist/types/lib/components/Menu/MenuListDivider.d.ts +6 -0
  186. package/dist/types/lib/components/Menu/MenuListGroup.d.ts +8 -0
  187. package/dist/types/lib/components/Menu/MenuListHeading.d.ts +8 -0
  188. package/dist/types/lib/components/Menu/MenuListItem.d.ts +9 -0
  189. package/dist/types/lib/components/Menu/MenuListSearch.d.ts +15 -0
  190. package/dist/types/lib/components/Menu/MenuListSearch.stories.d.ts +18 -0
  191. package/dist/types/lib/components/Menu/MenuOption.d.ts +5 -16
  192. package/dist/types/lib/components/Menu/TabMenu.d.ts +8 -0
  193. package/dist/types/lib/components/Menu/VirtualizedMenu.stories.d.ts +22 -0
  194. package/dist/types/lib/components/Menu/VirtualizedMenuItems.d.ts +2 -0
  195. package/dist/types/lib/components/Menu/aria.d.ts +1 -0
  196. package/dist/types/lib/components/Menu/example.hooks.d.ts +24 -0
  197. package/dist/types/lib/components/Menu/index.d.ts +10 -9
  198. package/dist/types/lib/components/Menu/types.d.ts +1 -0
  199. package/dist/types/lib/components/Menu/useDropdownMenuController.d.ts +27 -0
  200. package/dist/types/lib/components/Menu/useMenuSearch.d.ts +129 -0
  201. package/dist/types/lib/components/Menu/useMenuVirtualization.d.ts +35 -0
  202. package/dist/types/lib/components/Page/ContactButtons.d.ts +6 -2
  203. package/dist/types/lib/components/Page/PageTabs.d.ts +3 -10
  204. package/dist/types/lib/components/Page/PageTabs.stories.d.ts +1 -1
  205. package/dist/types/lib/components/Searchbar/AutocompleteItem.d.ts +3 -3
  206. package/dist/types/lib/components/Searchbar/Searchbar.stories.d.ts +1 -1
  207. package/dist/types/lib/components/Toolbar/DatepickerFilter.d.ts +15 -0
  208. package/dist/types/lib/components/Toolbar/SelectDateFilter.d.ts +8 -0
  209. package/dist/types/lib/components/Toolbar/SelectDateFilter.stories.d.ts +9 -0
  210. package/dist/types/lib/components/Toolbar/Toolbar.d.ts +6 -19
  211. package/dist/types/lib/components/Toolbar/Toolbar.stories.d.ts +21 -19
  212. package/dist/types/lib/components/Toolbar/ToolbarFilter.d.ts +11 -23
  213. package/dist/types/lib/components/Toolbar/ToolbarFilter.stories.d.ts +6 -13
  214. package/dist/types/lib/components/Toolbar/ToolbarFilterAddMenu.d.ts +8 -0
  215. package/dist/types/lib/components/Toolbar/ToolbarFilterButton.d.ts +15 -0
  216. package/dist/types/lib/components/Toolbar/ToolbarFilterMenu.d.ts +15 -0
  217. package/dist/types/lib/components/Toolbar/ToolbarMenu.d.ts +5 -10
  218. package/dist/types/lib/components/Toolbar/ToolbarSearch.d.ts +3 -5
  219. package/dist/types/lib/components/Toolbar/ToolbarSearch.stories.d.ts +635 -1
  220. package/dist/types/lib/components/Toolbar/example.hooks.d.ts +41 -0
  221. package/dist/types/lib/components/Toolbar/formatDateRange.d.ts +10 -0
  222. package/dist/types/lib/components/Toolbar/index.d.ts +4 -5
  223. package/dist/types/lib/components/Toolbar/useFilter.d.ts +173 -0
  224. package/dist/types/lib/components/Tooltip/Tooltip.d.ts +8 -0
  225. package/dist/types/lib/components/Tooltip/Tooltip.stories.d.ts +9 -0
  226. package/dist/types/lib/components/Tooltip/index.d.ts +1 -0
  227. package/dist/types/lib/components/Transmission/Transmission.stories.d.ts +2 -2
  228. package/dist/types/lib/components/Typography/Heading.d.ts +2 -2
  229. package/dist/types/lib/components/UserListItem/UserListItem.d.ts +3 -1
  230. package/dist/types/lib/components/UserListItem/UserListItem.stories.d.ts +7 -1
  231. package/dist/types/lib/components/index.d.ts +2 -0
  232. package/dist/types/lib/hooks/useAccountSelector.d.ts +2 -2
  233. package/dist/types/lib/hooks/useMenu.d.ts +3 -1
  234. package/dist/{index-De5bF0Gf.js → useMenuVirtualization-DpvWCsyD.js} +216 -165
  235. package/package.json +1 -1
  236. package/dist/assets/ContextMenu.css +0 -1
  237. package/dist/assets/IconOrAvatar.css +0 -1
  238. package/dist/assets/MenuBase.css +0 -1
  239. package/dist/assets/MenuHeader.css +0 -1
  240. package/dist/assets/MenuInputField.css +0 -1
  241. package/dist/assets/MenuItemBase.css +0 -1
  242. package/dist/assets/MenuItemIcon.css +0 -1
  243. package/dist/assets/MenuItemLabel.css +0 -1
  244. package/dist/assets/MenuItemsVirtual.css +0 -1
  245. package/dist/assets/MenuOption.css +0 -1
  246. package/dist/assets/MenuSearch.css +0 -1
  247. package/dist/assets/PageTabs.css +0 -1
  248. package/dist/assets/ToolbarBase.css +0 -1
  249. package/dist/assets/ToolbarButton.css +0 -1
  250. package/dist/assets/ToolbarDaterange.css +0 -1
  251. package/dist/assets/ToolbarFilterBase.css +0 -1
  252. package/dist/components/Dashboard/DashboardIcon.js +0 -11
  253. package/dist/components/Datepicker/DatepickerBase.js +0 -8
  254. package/dist/components/GlobalMenu/EndUserLabel.js +0 -13
  255. package/dist/components/GlobalMenu/LocaleButton.js +0 -13
  256. package/dist/components/Icon/IconOrAvatar.js +0 -33
  257. package/dist/components/Menu/MenuBase.js +0 -56
  258. package/dist/components/Menu/MenuHeader.js +0 -8
  259. package/dist/components/Menu/MenuInputField.js +0 -31
  260. package/dist/components/Menu/MenuItemBase.js +0 -58
  261. package/dist/components/Menu/MenuItemIcon.js +0 -27
  262. package/dist/components/Menu/MenuItemLabel.js +0 -76
  263. package/dist/components/Menu/MenuItemsVirtual.js +0 -168
  264. package/dist/components/Menu/MenuSearch.js +0 -41
  265. package/dist/components/Toolbar/ToolbarAccountMenu.js +0 -52
  266. package/dist/components/Toolbar/ToolbarAdd.js +0 -24
  267. package/dist/components/Toolbar/ToolbarBase.js +0 -8
  268. package/dist/components/Toolbar/ToolbarButton.js +0 -115
  269. package/dist/components/Toolbar/ToolbarDaterange.js +0 -58
  270. package/dist/components/Toolbar/ToolbarFilterBase.js +0 -17
  271. package/dist/components/Toolbar/ToolbarOptions.js +0 -84
  272. package/dist/index-DttADHE1.js +0 -2993
  273. package/dist/types/lib/components/ContextMenu/ContextMenu.stories.d.ts +0 -8
  274. package/dist/types/lib/components/Dashboard/DashboardIcon.d.ts +0 -7
  275. package/dist/types/lib/components/Datepicker/DatepickerBase.d.ts +0 -6
  276. package/dist/types/lib/components/GlobalMenu/EndUserLabel.d.ts +0 -5
  277. package/dist/types/lib/components/GlobalMenu/LocaleButton.d.ts +0 -3
  278. package/dist/types/lib/components/Icon/IconOrAvatar.d.ts +0 -13
  279. package/dist/types/lib/components/Menu/MenuBase.d.ts +0 -42
  280. package/dist/types/lib/components/Menu/MenuHeader.d.ts +0 -4
  281. package/dist/types/lib/components/Menu/MenuInputField.d.ts +0 -12
  282. package/dist/types/lib/components/Menu/MenuItemBase.d.ts +0 -28
  283. package/dist/types/lib/components/Menu/MenuItemIcon.d.ts +0 -10
  284. package/dist/types/lib/components/Menu/MenuItemLabel.d.ts +0 -15
  285. package/dist/types/lib/components/Menu/MenuItemsVirtual.d.ts +0 -2
  286. package/dist/types/lib/components/Menu/MenuSearch.d.ts +0 -10
  287. package/dist/types/lib/components/Menu/MenuSearch.stories.d.ts +0 -18
  288. package/dist/types/lib/components/Toolbar/ToolbarAccountMenu.d.ts +0 -8
  289. package/dist/types/lib/components/Toolbar/ToolbarAdd.d.ts +0 -8
  290. package/dist/types/lib/components/Toolbar/ToolbarAdd.stories.d.ts +0 -13
  291. package/dist/types/lib/components/Toolbar/ToolbarBase.d.ts +0 -5
  292. package/dist/types/lib/components/Toolbar/ToolbarButton.d.ts +0 -16
  293. package/dist/types/lib/components/Toolbar/ToolbarButton.stories.d.ts +0 -15
  294. package/dist/types/lib/components/Toolbar/ToolbarDate.stories.d.ts +0 -26
  295. package/dist/types/lib/components/Toolbar/ToolbarDaterange.d.ts +0 -11
  296. package/dist/types/lib/components/Toolbar/ToolbarDaterange.stories.d.ts +0 -15
  297. package/dist/types/lib/components/Toolbar/ToolbarFilterBase.d.ts +0 -8
  298. package/dist/types/lib/components/Toolbar/ToolbarMenu.stories.d.ts +0 -19
  299. package/dist/types/lib/components/Toolbar/ToolbarOptions.d.ts +0 -22
  300. package/dist/types/lib/components/Toolbar/ToolbarOptions.stories.d.ts +0 -12
  301. /package/dist/assets/{DatepickerBase.css → Datepicker.css} +0 -0
  302. /package/dist/types/lib/components/GlobalHeader/{AccountSector.stories.d.ts → AccountSelector.stories.d.ts} +0 -0
@@ -1,58 +1,41 @@
1
1
  "use client";
2
- import { jsx as d } from "react/jsx-runtime";
2
+ import { jsx as c } from "react/jsx-runtime";
3
3
  import "../../index-p1eeF8LQ.js";
4
- import a, { forwardRef as i } from "react";
4
+ import a, { forwardRef as f } from "react";
5
5
  import "../Button/Button.js";
6
6
  import "../RootProvider/RootProvider.js";
7
7
  import "../Snackbar/useSnackbar.js";
8
8
  import { MetaItem as m } from "../Metadata/MetaItem.js";
9
- import { u as c } from "../../useId-BVFxCjkq.js";
10
- var p = function(t, n) {
11
- var r = {};
12
- for (var e in t) Object.prototype.hasOwnProperty.call(t, e) && n.indexOf(e) < 0 && (r[e] = t[e]);
9
+ import { S as s } from "../../Eye-BrbjRZJp.js";
10
+ import { u as p } from "../../useId-BVFxCjkq.js";
11
+ var d = function(t, o) {
12
+ var l = {};
13
+ for (var e in t) Object.prototype.hasOwnProperty.call(t, e) && o.indexOf(e) < 0 && (l[e] = t[e]);
13
14
  if (t != null && typeof Object.getOwnPropertySymbols == "function")
14
- for (var l = 0, e = Object.getOwnPropertySymbols(t); l < e.length; l++)
15
- n.indexOf(e[l]) < 0 && Object.prototype.propertyIsEnumerable.call(t, e[l]) && (r[e[l]] = t[e[l]]);
16
- return r;
15
+ for (var r = 0, e = Object.getOwnPropertySymbols(t); r < e.length; r++)
16
+ o.indexOf(e[r]) < 0 && Object.prototype.propertyIsEnumerable.call(t, e[r]) && (l[e[r]] = t[e[r]]);
17
+ return l;
17
18
  };
18
- const s = i((t, n) => {
19
- var { title: r, titleId: e } = t, l = p(t, ["title", "titleId"]);
20
- let o = c();
21
- return o = r ? e || "title-" + o : void 0, a.createElement(
19
+ const u = f((t, o) => {
20
+ var { title: l, titleId: e } = t, r = d(t, ["title", "titleId"]);
21
+ let n = p();
22
+ return n = l ? e || "title-" + n : void 0, a.createElement(
22
23
  "svg",
23
- Object.assign({ xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", fill: "none", viewBox: "0 0 24 24", focusable: !1, role: "img", ref: n, "aria-labelledby": o }, l),
24
- r ? a.createElement("title", { id: o }, r) : null,
25
- a.createElement("path", { fill: "currentColor", fillRule: "evenodd", d: "M4.148 12.317A10 10 0 0 1 3.905 12q.103-.14.243-.317c.35-.438.878-1.025 1.582-1.61C7.136 8.902 9.222 7.75 12 7.75a4.25 4.25 0 0 0 0 8.5c-2.778 0-4.864-1.152-6.27-2.323a11.3 11.3 0 0 1-1.582-1.61M12 16.25a4.25 4.25 0 0 0 0-8.5c2.778 0 4.864 1.152 6.27 2.323A11.3 11.3 0 0 1 20.095 12q-.103.14-.243.317a11.3 11.3 0 0 1-1.582 1.61c-1.406 1.171-3.492 2.323-6.27 2.323m0-10c-3.222 0-5.636 1.343-7.23 2.67a12.8 12.8 0 0 0-1.793 1.826 10 10 0 0 0-.576.796l-.05.08-.011.022a1 1 0 0 0-.037.078c-.012.032-.045.17-.053.278.008.108.041.246.053.278l.037.078.012.022.05.08q.04.069.12.182c.103.152.254.363.455.614.4.5.997 1.163 1.793 1.826 1.594 1.327 4.008 2.67 7.23 2.67s5.636-1.343 7.23-2.67a12.8 12.8 0 0 0 1.793-1.826 10 10 0 0 0 .576-.796l.035-.056.005-.009.01-.015.011-.022.016-.03c.004-.01.015-.033.02-.048.013-.032.046-.17.054-.278a1.4 1.4 0 0 0-.053-.278l-.021-.047q-.012-.024-.016-.031l-.02-.034-.006-.012a4 4 0 0 0-.155-.238 10 10 0 0 0-.456-.614c-.4-.5-.997-1.163-1.793-1.826-1.594-1.327-4.008-2.67-7.23-2.67M9.25 12a2.75 2.75 0 1 1 5.5 0 2.75 2.75 0 0 1-5.5 0", clipRule: "evenodd" })
26
- );
27
- });
28
- var u = function(t, n) {
29
- var r = {};
30
- for (var e in t) Object.prototype.hasOwnProperty.call(t, e) && n.indexOf(e) < 0 && (r[e] = t[e]);
31
- if (t != null && typeof Object.getOwnPropertySymbols == "function")
32
- for (var l = 0, e = Object.getOwnPropertySymbols(t); l < e.length; l++)
33
- n.indexOf(e[l]) < 0 && Object.prototype.propertyIsEnumerable.call(t, e[l]) && (r[e[l]] = t[e[l]]);
34
- return r;
35
- };
36
- const b = i((t, n) => {
37
- var { title: r, titleId: e } = t, l = u(t, ["title", "titleId"]);
38
- let o = c();
39
- return o = r ? e || "title-" + o : void 0, a.createElement(
40
- "svg",
41
- Object.assign({ xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", fill: "none", viewBox: "0 0 24 24", focusable: !1, role: "img", ref: n, "aria-labelledby": o }, l),
42
- r ? a.createElement("title", { id: o }, r) : null,
24
+ Object.assign({ xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", fill: "none", viewBox: "0 0 24 24", focusable: !1, role: "img", ref: o, "aria-labelledby": n }, r),
25
+ l ? a.createElement("title", { id: n }, l) : null,
43
26
  a.createElement("path", { fill: "currentColor", d: "M2.614 9.357a.75.75 0 0 1 1.029.257l.003.005.02.033.093.139c.085.123.214.303.39.522.35.438.877 1.024 1.581 1.61C7.137 13.097 9.223 14.25 12 14.25s4.863-1.154 6.27-2.326a11.4 11.4 0 0 0 1.582-1.611 9 9 0 0 0 .481-.661q.015-.023.02-.033l.004-.005a.75.75 0 0 1 1.286.772L21 10c.643.386.642.387.642.387v.002l-.004.005-.01.015-.032.051-.118.179c-.103.15-.255.36-.455.61-.304.38-.722.856-1.256 1.353l.841 1.002a.75.75 0 1 1-1.149.965l-.847-1.01c-.577.423-1.24.83-1.987 1.176l.497 1.17a.75.75 0 1 1-1.38.587l-.518-1.22c-.758.233-1.582.394-2.474.453V17a.75.75 0 0 1-1.5 0v-1.275a11 11 0 0 1-2.475-.453l-.516 1.215a.75.75 0 1 1-1.38-.586l.494-1.166a11.7 11.7 0 0 1-1.987-1.178l-.845 1.007a.75.75 0 1 1-1.15-.964l.84-1c-.533-.496-.95-.97-1.254-1.35a11 11 0 0 1-.574-.79l-.032-.05-.01-.016-.002-.005-.001-.002-.001-.001a.75.75 0 0 1 .257-1.03" })
44
27
  );
45
- }), E = ({
28
+ }), j = ({
46
29
  size: t = "xs",
47
- label: n = "Seen by label",
48
- seenByEndUser: r = !1,
30
+ label: o = "Seen by label",
31
+ seenByEndUser: l = !1,
49
32
  seenByOthersCount: e = 0,
50
- onClick: l,
51
- ...o
33
+ onClick: r,
34
+ ...n
52
35
  }) => {
53
- const f = r || e > 0 ? s : b;
54
- return /* @__PURE__ */ d(m, { size: t, icon: f, ...o, children: n });
36
+ const i = l || e > 0 ? s : u;
37
+ return /* @__PURE__ */ c(m, { size: t, icon: i, ...n, children: o });
55
38
  };
56
39
  export {
57
- E as DialogSeenBy
40
+ j as DialogSeenBy
58
41
  };
@@ -1,11 +1,11 @@
1
- import { jsx as t } from "react/jsx-runtime";
1
+ import { jsx as r } from "react/jsx-runtime";
2
2
  import "../../index-p1eeF8LQ.js";
3
3
  import "react";
4
4
  import "../Button/Button.js";
5
5
  import "../RootProvider/RootProvider.js";
6
+ import { TabMenu as t } from "../Menu/TabMenu.js";
6
7
  import "../Snackbar/useSnackbar.js";
7
- import { PageTabs as i } from "../Page/PageTabs.js";
8
- const f = ({ id: o = "dialog-tabs", items: r = [] }) => /* @__PURE__ */ t(i, { id: o, items: r });
8
+ const b = ({ items: o = [] }) => /* @__PURE__ */ r(t, { items: o });
9
9
  export {
10
- f as DialogTabs
10
+ b as DialogTabs
11
11
  };
@@ -16,18 +16,18 @@ const q = ({
16
16
  expanded: d,
17
17
  title: n,
18
18
  items: e,
19
- size: i = "sm",
19
+ size: m = "sm",
20
20
  endUserLabel: g = "You"
21
21
  }) => {
22
- const [m, f] = a(d || !t && !0);
22
+ const [i, f] = a(d || !t && !0);
23
23
  return /* @__PURE__ */ p(B, { spacing: 1, children: [
24
- n && /* @__PURE__ */ o(y, { children: t ? /* @__PURE__ */ o(c, { icon: { items: e }, as: "button", onClick: () => {
24
+ n && /* @__PURE__ */ o(y, { children: t ? /* @__PURE__ */ o(c, { items: e, as: "button", onClick: () => {
25
25
  f((r) => !r);
26
- }, children: n }) : /* @__PURE__ */ o(c, { icon: { items: e }, as: "div", children: n }) }),
27
- n && m && /* @__PURE__ */ o(s, {}),
28
- m && /* @__PURE__ */ o(x, { size: i, spacing: 1, children: e?.map((r, u) => /* @__PURE__ */ p(h, { children: [
26
+ }, children: n }) : /* @__PURE__ */ o(c, { items: e, as: "div", children: n }) }),
27
+ n && i && /* @__PURE__ */ o(s, {}),
28
+ i && /* @__PURE__ */ o(x, { size: m, spacing: 1, children: e?.map((r, u) => /* @__PURE__ */ p(h, { children: [
29
29
  u > 0 && /* @__PURE__ */ o(s, {}),
30
- /* @__PURE__ */ l(S, { ...r, key: r.id, size: i, endUserLabel: g })
30
+ /* @__PURE__ */ l(S, { ...r, key: r.id, size: m, endUserLabel: g })
31
31
  ] }, r.id)) })
32
32
  ] });
33
33
  };
@@ -1,12 +1,18 @@
1
- import { jsx as o } from "react/jsx-runtime";
1
+ import { jsxs as n, jsx as r } from "react/jsx-runtime";
2
2
  import "../../index-p1eeF8LQ.js";
3
3
  import "react";
4
- import "../Button/Button.js";
4
+ import { AvatarGroup as u } from "../Avatar/AvatarGroup.js";
5
+ import { Button as p } from "../Button/Button.js";
5
6
  import "../RootProvider/RootProvider.js";
6
- import { MetaItemLabel as p } from "../Metadata/MetaItemLabel.js";
7
- import { MetaItem as s } from "../Metadata/MetaItem.js";
8
7
  import "../Snackbar/useSnackbar.js";
9
- const L = ({ as: r, icon: m, children: t, className: e, onClick: i }) => /* @__PURE__ */ o(s, { as: r, size: "xs", className: e, icon: m, onClick: i, children: t && /* @__PURE__ */ o(p, { size: "xs", children: t }) });
8
+ import '../../assets/SeenByLogButton.css';const l = "_button_deo1u_1", m = "_label_deo1u_12", i = "_avatarGroup_deo1u_16", t = {
9
+ button: l,
10
+ label: m,
11
+ avatarGroup: i
12
+ }, f = ({ as: s, items: o, children: a, onClick: e }) => /* @__PURE__ */ n(p, { variant: "ghost", as: s, size: "xs", className: t.button, onClick: e, children: [
13
+ o && /* @__PURE__ */ r(u, { items: o, className: t.avatarGroup }),
14
+ a && /* @__PURE__ */ r("span", { "data-size": "xs", className: t.label, children: a })
15
+ ] });
10
16
  export {
11
- L as SeenByLogButton
17
+ f as SeenByLogButton
12
18
  };
@@ -2,12 +2,12 @@ import { jsxs as d, Fragment as n, jsx as o } from "react/jsx-runtime";
2
2
  import "../../index-p1eeF8LQ.js";
3
3
  import "react";
4
4
  import "../Button/Button.js";
5
- import "../RootProvider/RootProvider.js";
6
5
  import { Backdrop as s } from "./Backdrop.js";
7
6
  import { DrawerHeader as c } from "./DrawerHeader.js";
8
7
  import { DrawerFooter as l } from "./DrawerFooter.js";
9
8
  import { DrawerButton as f } from "./DrawerButton.js";
10
9
  import { DrawerBody as h } from "./DrawerBody.js";
10
+ import "../RootProvider/RootProvider.js";
11
11
  import "../Snackbar/useSnackbar.js";
12
12
  import '../../assets/DrawerOrDropdown.css';const w = "_drawerOrDropdown_h06dg_1", D = "_header_h06dg_19", _ = "_footer_h06dg_20", e = {
13
13
  drawerOrDropdown: w,
@@ -0,0 +1,160 @@
1
+ import { jsxs as g, Fragment as U, jsx as c } from "react/jsx-runtime";
2
+ import { c as Y } from "../../index-p1eeF8LQ.js";
3
+ import { useRef as _, useEffect as x, useState as M, useCallback as O, useLayoutEffect as W } from "react";
4
+ import { Button as F } from "../Button/Button.js";
5
+ import "../RootProvider/RootProvider.js";
6
+ import "../Snackbar/useSnackbar.js";
7
+ import { S as G } from "../../XMark-tKk6aExO.js";
8
+ import '../../assets/Dropdown.css';const P = "_dropdown_4f5qx_1", $ = "_content_4f5qx_16", J = "_backdrop_4f5qx_43", Q = "_header_4f5qx_68", V = "_footer_4f5qx_69", Z = "_title_4f5qx_140", a = {
9
+ dropdown: P,
10
+ content: $,
11
+ backdrop: J,
12
+ header: Q,
13
+ footer: V,
14
+ title: Z
15
+ }, tt = "data-focus-guard", A = (l) => {
16
+ const v = [
17
+ "a[href]",
18
+ "button:not([disabled])",
19
+ "input:not([disabled])",
20
+ "select:not([disabled])",
21
+ "textarea:not([disabled])",
22
+ '[tabindex]:not([tabindex="-1"])',
23
+ '[contenteditable="true"]'
24
+ ].join(",");
25
+ return Array.from(l.querySelectorAll(v)).filter((o) => !o.hasAttribute(tt)).filter((o) => !o.hasAttribute("disabled")).filter((o) => o.getAttribute("aria-hidden") !== "true").filter((o) => o.tabIndex !== -1).filter((o) => {
26
+ const u = o.getClientRects();
27
+ return u.length > 0 && u[0].width > 0 && u[0].height > 0;
28
+ });
29
+ }, et = (l) => {
30
+ A(l)[0]?.focus({ preventScroll: !0 });
31
+ }, lt = ({
32
+ id: l = "dropdown",
33
+ size: v = "sm",
34
+ className: o,
35
+ backdrop: u = !0,
36
+ placement: k = "bottom-left",
37
+ variant: D = "dropdown",
38
+ title: L = "Title",
39
+ closeLabel: q = "Close",
40
+ submitLabel: E,
41
+ trigger: z,
42
+ children: H,
43
+ open: e,
44
+ onClose: f,
45
+ onSubmit: C,
46
+ activeDescendantId: N
47
+ }) => {
48
+ const h = _(null), m = _(null), R = _(e);
49
+ x(() => {
50
+ R.current = e;
51
+ }, [e]);
52
+ const [y, B] = M({
53
+ yDir: k.includes("top") ? "top" : "bottom",
54
+ xDir: k.includes("right") ? "right" : "left",
55
+ maxHeight: 300
56
+ }), w = O(() => {
57
+ if (e && h.current && m.current) {
58
+ const t = h.current.getBoundingClientRect(), i = m.current.getBoundingClientRect(), n = window.innerHeight, r = window.innerWidth, s = 16, d = n - t.bottom, p = t.top, b = r - t.right - i.width, S = d < 250 && p > d, T = S ? "top" : "bottom", X = (S ? p : d) - s, j = b < s ? "right" : "left";
59
+ B((K) => ({
60
+ ...K,
61
+ yDir: T,
62
+ maxHeight: X,
63
+ xDir: j
64
+ }));
65
+ }
66
+ }, [e]);
67
+ W(() => (w(), window.addEventListener("resize", w), () => window.removeEventListener("resize", w)), [w]), x(() => {
68
+ if (!e) return;
69
+ const t = requestAnimationFrame(() => {
70
+ const i = m.current;
71
+ if (!i) return;
72
+ const n = i.querySelector(
73
+ 'input[type="search"]:not([disabled]), input[role="searchbox"]:not([disabled]), input[data-dropdown-search]:not([disabled])'
74
+ );
75
+ if (n) {
76
+ const r = n.value.length;
77
+ n.focus({ preventScroll: !0 });
78
+ try {
79
+ n.setSelectionRange(r, r);
80
+ } catch {
81
+ }
82
+ return;
83
+ }
84
+ i.focus?.({ preventScroll: !0 });
85
+ });
86
+ return () => cancelAnimationFrame(t);
87
+ }, [e]), x(() => {
88
+ const t = (n) => {
89
+ n.key === "Escape" && f();
90
+ }, i = (n) => {
91
+ h.current && !h.current.contains(n.target) && f();
92
+ };
93
+ return e && (document.addEventListener("mousedown", i), document.addEventListener("keydown", t)), () => {
94
+ document.removeEventListener("mousedown", i), document.removeEventListener("keydown", t);
95
+ };
96
+ }, [e, f]), x(() => {
97
+ if (!e) return;
98
+ const t = m.current;
99
+ if (!t) return;
100
+ const i = (r) => {
101
+ if (!R.current)
102
+ return;
103
+ const s = r.target;
104
+ s && !t.contains(s) && et(t);
105
+ }, n = (r) => {
106
+ if (r.key !== "Tab") return;
107
+ const s = A(t);
108
+ if (s.length === 0) {
109
+ r.preventDefault(), t.focus?.({ preventScroll: !0 });
110
+ return;
111
+ }
112
+ const d = s[0], p = s[s.length - 1], b = document.activeElement;
113
+ r.shiftKey ? b === d && (r.preventDefault(), p.focus({ preventScroll: !0 })) : b === p && (r.preventDefault(), d.focus({ preventScroll: !0 }));
114
+ };
115
+ return document.addEventListener("focusin", i), document.addEventListener("keydown", n), () => {
116
+ document.removeEventListener("focusin", i), document.removeEventListener("keydown", n);
117
+ };
118
+ }, [e]);
119
+ const I = {
120
+ position: "absolute",
121
+ zIndex: 50,
122
+ width: "max-content",
123
+ maxHeight: `${y.maxHeight}px`,
124
+ overflowY: "auto",
125
+ [y.xDir]: 0,
126
+ [y.yDir === "bottom" ? "top" : "bottom"]: "100%"
127
+ };
128
+ return /* @__PURE__ */ g(U, { children: [
129
+ u && /* @__PURE__ */ c("div", { className: a.backdrop, "aria-hidden": !e }),
130
+ /* @__PURE__ */ g("div", { id: l + "-root", ref: h, style: { position: "relative", display: "inline-block" }, children: [
131
+ z,
132
+ /* @__PURE__ */ g(
133
+ "div",
134
+ {
135
+ ref: m,
136
+ className: Y(a.dropdown, o),
137
+ style: I,
138
+ "aria-hidden": !e,
139
+ "data-variant": D,
140
+ "data-size": v,
141
+ tabIndex: -1,
142
+ role: "menu",
143
+ "aria-modal": D === "drawer-dropdown" ? !0 : void 0,
144
+ "aria-activedescendant": N,
145
+ children: [
146
+ /* @__PURE__ */ g("header", { className: a.header, children: [
147
+ /* @__PURE__ */ c("h2", { className: a.title, children: L }),
148
+ /* @__PURE__ */ c(F, { size: "sm", variant: "outline", onClick: f, "aria-label": q, children: /* @__PURE__ */ c(G, {}) })
149
+ ] }),
150
+ /* @__PURE__ */ c("div", { className: a.content, children: H }),
151
+ E && /* @__PURE__ */ c("footer", { className: a.footer, children: /* @__PURE__ */ c(F, { size: "lg", variant: "solid", onClick: C || f, rounded: !0, children: /* @__PURE__ */ c("span", { "data-size": "md", children: E }) }) })
152
+ ]
153
+ }
154
+ )
155
+ ] })
156
+ ] });
157
+ };
158
+ export {
159
+ lt as Dropdown
160
+ };
@@ -1,26 +1,26 @@
1
1
  import { jsx as i } from "react/jsx-runtime";
2
2
  import { c } from "../../index-p1eeF8LQ.js";
3
- import { useRef as l } from "react";
4
- import { useClickOutside as f } from "../../hooks/useClickOutside.js";
3
+ import { useRef as f } from "react";
4
+ import { useClickOutside as l } from "../../hooks/useClickOutside.js";
5
5
  import "../Button/Button.js";
6
6
  import "../RootProvider/RootProvider.js";
7
7
  import "../Snackbar/useSnackbar.js";
8
- import '../../assets/DropdownBase.css';const u = "_dropdown_1tyzv_1", w = {
8
+ import '../../assets/DropdownBase.css';const u = "_dropdown_fqgmt_1", w = {
9
9
  dropdown: u
10
- }, j = ({
10
+ }, q = ({
11
11
  layout: t,
12
12
  size: a = "auto",
13
13
  placement: d = "left",
14
14
  padding: e = !0,
15
15
  open: r = !1,
16
16
  className: n,
17
- children: p,
18
- onClose: s,
19
- as: m = "div"
17
+ children: m,
18
+ onClose: p,
19
+ as: s = "div"
20
20
  }) => {
21
- const o = l(null);
22
- return f(o, s), /* @__PURE__ */ i(
23
- m,
21
+ const o = f(null);
22
+ return l(o, p), /* @__PURE__ */ i(
23
+ s,
24
24
  {
25
25
  ref: o,
26
26
  className: c(w.dropdown, n),
@@ -31,10 +31,10 @@ import '../../assets/DropdownBase.css';const u = "_dropdown_1tyzv_1", w = {
31
31
  "data-placement": d,
32
32
  "data-padding": e,
33
33
  "data-expanded": r,
34
- children: p
34
+ children: m
35
35
  }
36
36
  );
37
37
  };
38
38
  export {
39
- j as DropdownBase
39
+ q as DropdownBase
40
40
  };
@@ -1,91 +1,136 @@
1
1
  "use client";
2
- import { jsxs as v, jsx as e } from "react/jsx-runtime";
3
- import { useRef as _, useEffect as M } from "react";
4
- import { useClickOutside as N } from "../../hooks/useClickOutside.js";
5
- import { useMenu as R } from "../../hooks/useMenu.js";
2
+ import { jsxs as q, jsx as c } from "react/jsx-runtime";
3
+ import { useRef as u, useEffect as d } from "react";
4
+ import { useClickOutside as z } from "../../hooks/useClickOutside.js";
5
+ import { useMenu as B } from "../../hooks/useMenu.js";
6
6
  import "../../index-p1eeF8LQ.js";
7
- import { Icon as T } from "../Icon/Icon.js";
8
- import { Button as b } from "../Button/Button.js";
9
- import { ButtonIcon as j } from "../Button/ButtonIcon.js";
10
- import { useRootContext as z } from "../RootProvider/RootProvider.js";
7
+ import { Icon as O } from "../Icon/Icon.js";
8
+ import { Button as D } from "../Button/Button.js";
9
+ import { ButtonIcon as $ } from "../Button/ButtonIcon.js";
10
+ import { useRootContext as G } from "../RootProvider/RootProvider.js";
11
11
  import "../Snackbar/useSnackbar.js";
12
- import '../../assets/FloatingDropdown.css';const B = "_container_dqumv_1", D = "_button_dqumv_13", F = "_dropdown_dqumv_21", L = "_dropdownItem_dqumv_45", A = "_itemTitle_dqumv_75", n = {
13
- container: B,
14
- button: D,
15
- dropdown: F,
16
- dropdownItem: L,
17
- itemTitle: A
18
- }, W = ({
19
- variant: w = "solid",
20
- size: g,
21
- icon: h,
22
- iconOpen: c,
23
- iconSize: x,
24
- iconAltText: I,
25
- id: r = "floatingDropdown",
26
- color: l = "company",
27
- items: C,
28
- "data-testid": k
12
+ import '../../assets/FloatingDropdown.css';const H = "_container_dqumv_1", J = "_button_dqumv_13", P = "_dropdown_dqumv_21", Q = "_dropdownItem_dqumv_45", U = "_itemTitle_dqumv_75", i = {
13
+ container: H,
14
+ button: J,
15
+ dropdown: P,
16
+ dropdownItem: Q,
17
+ itemTitle: U
18
+ }, st = ({
19
+ variant: F = "solid",
20
+ size: C,
21
+ icon: L,
22
+ iconOpen: p,
23
+ iconSize: R,
24
+ iconAltText: S,
25
+ id: a = "floatingDropdown",
26
+ color: v = "company",
27
+ items: A,
28
+ "data-testid": M
29
29
  }) => {
30
- const { currentId: q, toggleId: i } = z(), o = q === r, s = _(null), u = _(null), m = () => {
31
- u.current?.focus();
32
- }, y = (t) => (d) => {
33
- t(d), i(r), m();
34
- }, { menu: E, setActiveIndex: p } = R({
35
- items: C,
30
+ const { currentId: N, toggleId: l } = G(), t = N === a, b = u(t), f = u(null), m = u(null), w = u(null), T = (e) => (n) => {
31
+ e(n), l(a);
32
+ }, { menu: K, setActiveIndex: g, activeIndex: _ } = B({
33
+ items: A,
36
34
  groups: { ungrouped: {} },
37
- keyboardEvents: o,
38
- onSelect: m,
39
- ref: s
35
+ keyboardEvents: t,
36
+ ref: f
40
37
  });
41
- M(() => {
42
- o && p(0);
43
- }, [o, p]), N(s, () => {
44
- o && i(r);
38
+ d(() => {
39
+ const e = b.current;
40
+ b.current = t, e && !t && w.current?.focus();
41
+ }, [t]), d(() => {
42
+ t && g(0);
43
+ }, [t, g]), d(() => {
44
+ if (!t) return;
45
+ const e = requestAnimationFrame(() => {
46
+ m.current?.focus({ preventScroll: !0 });
47
+ });
48
+ return () => cancelAnimationFrame(e);
49
+ }, [t]), d(() => {
50
+ if (!t) return;
51
+ const e = m.current;
52
+ if (!e) return;
53
+ const n = () => Array.from(e.querySelectorAll('button:not([disabled]), [tabindex]:not([tabindex="-1"])')).filter(
54
+ (o) => o.tabIndex !== -1
55
+ ), s = () => {
56
+ n()[0]?.focus({ preventScroll: !0 });
57
+ }, y = (o) => {
58
+ const r = o.target;
59
+ r && !e.contains(r) && s();
60
+ }, h = (o) => {
61
+ if (o.key !== "Tab") return;
62
+ const r = n();
63
+ if (r.length === 0) {
64
+ o.preventDefault(), e.focus({ preventScroll: !0 });
65
+ return;
66
+ }
67
+ const x = r[0], E = r[r.length - 1], k = document.activeElement;
68
+ o.shiftKey && k === x ? (o.preventDefault(), E.focus({ preventScroll: !0 })) : !o.shiftKey && k === E && (o.preventDefault(), x.focus({ preventScroll: !0 }));
69
+ };
70
+ return document.addEventListener("focusin", y), document.addEventListener("keydown", h), () => {
71
+ document.removeEventListener("focusin", y), document.removeEventListener("keydown", h);
72
+ };
73
+ }, [t]), z(f, () => {
74
+ t && l(a);
45
75
  });
46
- const f = o && c ? c : h;
47
- return /* @__PURE__ */ v("div", { className: n.container, ref: s, children: [
48
- o && /* @__PURE__ */ e("div", { className: n.dropdown, "data-color": l, role: "menu", "aria-labelledby": "floating-dropdown-button", children: E[0]?.items.map((t, d) => {
49
- const a = t.props;
50
- return /* @__PURE__ */ v(
51
- b,
52
- {
53
- className: n.dropdownItem,
54
- onClick: y(a.onClick),
55
- type: "button",
56
- role: "menuitem",
57
- tabIndex: t.active ? 0 : -1,
58
- "data-active": t.active,
59
- onMouseEnter: t.onMouseEnter,
60
- onMouseLeave: t.onMouseLeave,
61
- children: [
62
- /* @__PURE__ */ e(T, { svgElement: a.icon, size: "md", color: "inherit" }),
63
- /* @__PURE__ */ e("span", { className: n.itemTitle, children: a.title })
64
- ]
65
- },
66
- d
67
- );
68
- }) }),
69
- /* @__PURE__ */ e(
70
- b,
76
+ const I = t && p ? p : L, j = t && _ >= 0 ? `floating-dropdown-button-${_}` : void 0;
77
+ return /* @__PURE__ */ q("div", { className: i.container, ref: f, children: [
78
+ t && /* @__PURE__ */ c(
79
+ "div",
80
+ {
81
+ id: "floating-dropdown-menu",
82
+ className: i.dropdown,
83
+ "data-color": v,
84
+ role: "menu",
85
+ "aria-labelledby": "floating-dropdown-button",
86
+ "aria-activedescendant": j,
87
+ tabIndex: -1,
88
+ ref: m,
89
+ children: K[0]?.items.map((e, n) => {
90
+ const s = e.props;
91
+ return /* @__PURE__ */ q(
92
+ D,
93
+ {
94
+ id: "floating-dropdown-button-" + n,
95
+ className: i.dropdownItem,
96
+ onClick: T(s.onClick),
97
+ type: "button",
98
+ role: "menuitem",
99
+ tabIndex: -1,
100
+ "data-active": e.active,
101
+ onMouseEnter: e.onMouseEnter,
102
+ onMouseLeave: e.onMouseLeave,
103
+ children: [
104
+ /* @__PURE__ */ c(O, { svgElement: s.icon, size: "md", color: "inherit" }),
105
+ /* @__PURE__ */ c("span", { className: i.itemTitle, children: s.title })
106
+ ]
107
+ },
108
+ n
109
+ );
110
+ })
111
+ }
112
+ ),
113
+ /* @__PURE__ */ c(
114
+ D,
71
115
  {
72
- className: n.button,
73
- variant: w,
74
- color: l,
75
- size: g,
76
- onClick: () => i(r),
77
- "data-testid": k,
78
- "aria-label": I,
79
- "aria-expanded": o,
116
+ className: i.button,
117
+ variant: F,
118
+ color: v,
119
+ size: C,
120
+ onClick: () => l(a),
121
+ "data-testid": M,
122
+ "aria-label": S,
123
+ "aria-expanded": t,
80
124
  "aria-haspopup": "menu",
81
125
  id: "floating-dropdown-button",
82
- ref: u,
126
+ ref: w,
83
127
  autoFocus: !1,
84
- children: f && /* @__PURE__ */ e(j, { icon: f, size: x })
128
+ "aria-controls": t ? "floating-dropdown-menu" : void 0,
129
+ children: I && /* @__PURE__ */ c($, { icon: I, size: R })
85
130
  }
86
131
  )
87
132
  ] });
88
133
  };
89
134
  export {
90
- W as FloatingDropdown
135
+ st as FloatingDropdown
91
136
  };
@@ -1,20 +1,22 @@
1
1
  import { DropdownBase as e } from "./DropdownBase.js";
2
- import { Backdrop as t } from "./Backdrop.js";
3
- import { DrawerBase as f } from "./DrawerBase.js";
4
- import { DrawerHeader as w } from "./DrawerHeader.js";
5
- import { DrawerFooter as D } from "./DrawerFooter.js";
6
- import { DrawerButton as n } from "./DrawerButton.js";
7
- import { DrawerBody as s } from "./DrawerBody.js";
8
- import { DrawerOrDropdown as c } from "./DrawerOrDropdown.js";
9
- import { FloatingDropdown as i } from "./FloatingDropdown.js";
2
+ import { Dropdown as t } from "./Dropdown.js";
3
+ import { Backdrop as f } from "./Backdrop.js";
4
+ import { DrawerBase as w } from "./DrawerBase.js";
5
+ import { DrawerHeader as D } from "./DrawerHeader.js";
6
+ import { DrawerFooter as n } from "./DrawerFooter.js";
7
+ import { DrawerButton as s } from "./DrawerButton.js";
8
+ import { DrawerBody as c } from "./DrawerBody.js";
9
+ import { DrawerOrDropdown as i } from "./DrawerOrDropdown.js";
10
+ import { FloatingDropdown as l } from "./FloatingDropdown.js";
10
11
  export {
11
- t as Backdrop,
12
- f as DrawerBase,
13
- s as DrawerBody,
14
- n as DrawerButton,
15
- D as DrawerFooter,
16
- w as DrawerHeader,
17
- c as DrawerOrDropdown,
12
+ f as Backdrop,
13
+ w as DrawerBase,
14
+ c as DrawerBody,
15
+ s as DrawerButton,
16
+ n as DrawerFooter,
17
+ D as DrawerHeader,
18
+ i as DrawerOrDropdown,
19
+ t as Dropdown,
18
20
  e as DropdownBase,
19
- i as FloatingDropdown
21
+ l as FloatingDropdown
20
22
  };
@@ -1,10 +1,10 @@
1
1
  import { A as o } from "../../alert-BzifOfXl.js";
2
- import { B as D, C as r, a as t, b as i, D as n, L as p, c as x, d as f, P as m, e as S, S as d, f as g, T as l, u as P } from "../../textfield-DAuYWtUj.js";
2
+ import { B as D, C as r, a as t, b as i, D as n, L as p, c as x, d as f, P as m, e as S, S as d, f as g, T as l, u as P } from "../../textfield-Drdr9bio.js";
3
3
  import { B as h, S as c } from "../../button-BB5sYVKY.js";
4
4
  import { H as C, S as L } from "../../switch-Cemfhx0H.js";
5
5
  import { D as u } from "../../index-Q0EA2XB0.js";
6
6
  import { P as A } from "../../paragraph-BRiIBpbY.js";
7
- import { S as V } from "../../index-DttADHE1.js";
7
+ import { S as V } from "../../index--jNxJmA8.js";
8
8
  import { V as w } from "../../index-z82sbSVU.js";
9
9
  export {
10
10
  o as DsAlert,