@altinn/altinn-components 0.67.12 → 0.68.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (208) hide show
  1. package/dist/ToolbarSearch-CpAUv-Lw.js +2010 -0
  2. package/dist/assets/DatepickerTable.css +1 -1
  3. package/dist/assets/DialogBody.css +1 -0
  4. package/dist/assets/Transmission.css +1 -1
  5. package/dist/components/AccessAreaListItem/AccessAreaListItem.js +1 -1
  6. package/dist/components/AccessPackageListItem/AccessPackageListItem.js +1 -1
  7. package/dist/components/Account/AccountList.js +1 -1
  8. package/dist/components/Account/AccountListItem.js +1 -1
  9. package/dist/components/Account/AccountListItemControls.js +1 -1
  10. package/dist/components/Account/AccountListItemDetails.js +1 -1
  11. package/dist/components/Account/AccountListVirtual.js +1 -1
  12. package/dist/components/Account/AccountMenu.js +1 -1
  13. package/dist/components/Account/AccountNotificationSettings.js +1 -1
  14. package/dist/components/Account/AccountOrganization.js +1 -1
  15. package/dist/components/AccountSelector/AccountSelector.js +1 -1
  16. package/dist/components/ActivityLog/ActivityLog.js +1 -1
  17. package/dist/components/ActivityLog/ActivityLogItem.js +1 -1
  18. package/dist/components/ActivityLog/ActivityLogSegment.js +1 -1
  19. package/dist/components/Alert/Alert.js +1 -1
  20. package/dist/components/Article/Article.js +1 -1
  21. package/dist/components/Article/ArticleContact.js +1 -1
  22. package/dist/components/Article/ArticleHeader.js +1 -1
  23. package/dist/components/Attachment/AttachmentLink.js +1 -1
  24. package/dist/components/AuthEvidence/AuthEvidence.js +1 -1
  25. package/dist/components/AuthEvidence/AuthEvidenceItem.js +1 -1
  26. package/dist/components/AuthEvidence/AuthEvidenceOwner.js +1 -1
  27. package/dist/components/AuthEvidence/AuthEvidenceParent.js +1 -1
  28. package/dist/components/AuthEvidence/AuthEvidenceService.js +1 -1
  29. package/dist/components/Badge/Badge.js +1 -1
  30. package/dist/components/Badge/index.js +1 -1
  31. package/dist/components/Banner/Banner.js +1 -1
  32. package/dist/components/Bookmarks/BookmarkModal.js +1 -1
  33. package/dist/components/Bookmarks/BookmarkSettingsItem.js +1 -1
  34. package/dist/components/Bookmarks/BookmarkSettingsItemLabel.js +1 -1
  35. package/dist/components/Bookmarks/BookmarkSettingsList.js +1 -1
  36. package/dist/components/Breadcrumbs/Breadcrumbs.js +1 -1
  37. package/dist/components/Bulk/BulkHeader.js +1 -1
  38. package/dist/components/Button/ButtonIcon.js +1 -1
  39. package/dist/components/Button/ComboButton.js +1 -1
  40. package/dist/components/Button/FloatingActionButton.js +1 -1
  41. package/dist/components/Button/IconButton.js +1 -1
  42. package/dist/components/Byline/Byline.js +1 -1
  43. package/dist/components/Byline/index.js +1 -1
  44. package/dist/components/ContextMenu/ContextMenu.js +1 -1
  45. package/dist/components/Dashboard/DashboardCard.js +1 -1
  46. package/dist/components/Dashboard/DashboardHeader.js +1 -1
  47. package/dist/components/Datepicker/Datepicker.js +54 -25
  48. package/dist/components/Datepicker/DatepickerHeader.js +32 -26
  49. package/dist/components/Datepicker/DatepickerTable.js +30 -25
  50. package/dist/components/Dialog/Dialog.js +1 -1
  51. package/dist/components/Dialog/DialogActions.js +1 -1
  52. package/dist/components/Dialog/DialogActivityLog.js +1 -1
  53. package/dist/components/Dialog/DialogAttachments.js +1 -1
  54. package/dist/components/Dialog/DialogBody.js +35 -23
  55. package/dist/components/Dialog/DialogByline.js +1 -1
  56. package/dist/components/Dialog/DialogContact.js +1 -1
  57. package/dist/components/Dialog/DialogHeader.js +1 -1
  58. package/dist/components/Dialog/DialogHistory.js +1 -1
  59. package/dist/components/Dialog/DialogHistoryItem.js +1 -1
  60. package/dist/components/Dialog/DialogHistorySegment.js +1 -1
  61. package/dist/components/Dialog/DialogLayout.js +1 -1
  62. package/dist/components/Dialog/DialogList.js +1 -1
  63. package/dist/components/Dialog/DialogListItem.js +1 -1
  64. package/dist/components/Dialog/DialogMetadata.js +1 -1
  65. package/dist/components/Dialog/DialogSection.js +1 -1
  66. package/dist/components/Dialog/DialogSeenBy.js +1 -1
  67. package/dist/components/Dialog/DialogSelect.js +1 -1
  68. package/dist/components/Dialog/DialogStatus.js +1 -1
  69. package/dist/components/Dialog/DialogTabs.js +1 -1
  70. package/dist/components/Dialog/SeenByLog.js +1 -1
  71. package/dist/components/Dialog/SeenByLogButton.js +1 -1
  72. package/dist/components/Dialog/SeenByLogItem.js +1 -1
  73. package/dist/components/Dialog/index.js +1 -1
  74. package/dist/components/Dropdown/DrawerButton.js +1 -1
  75. package/dist/components/Dropdown/DrawerHeader.js +1 -1
  76. package/dist/components/Dropdown/Dropdown.js +1 -1
  77. package/dist/components/Dropdown/DropdownBase.js +1 -1
  78. package/dist/components/Dropdown/FloatingDropdown.js +1 -1
  79. package/dist/components/Dropdown/index.js +1 -1
  80. package/dist/components/Forms/Checkbox.js +1 -1
  81. package/dist/components/Forms/CheckboxOptions.js +1 -1
  82. package/dist/components/Forms/FieldBase.js +1 -1
  83. package/dist/components/Forms/FieldsetBase.js +1 -1
  84. package/dist/components/Forms/Radio.js +1 -1
  85. package/dist/components/Forms/RadioOptions.js +1 -1
  86. package/dist/components/Forms/SearchField.js +1 -1
  87. package/dist/components/Forms/SelectField.js +1 -1
  88. package/dist/components/Forms/Switch.js +1 -1
  89. package/dist/components/Forms/SwitchOptions.js +1 -1
  90. package/dist/components/Forms/TextField.js +1 -1
  91. package/dist/components/Forms/TextFieldDropdown.js +1 -1
  92. package/dist/components/Forms/TextareaField.js +1 -1
  93. package/dist/components/Forms/index.js +1 -1
  94. package/dist/components/GlobalHeader/GlobalAccountButton.js +1 -1
  95. package/dist/components/GlobalHeader/GlobalHeader.js +1 -1
  96. package/dist/components/GlobalHeader/GlobalMenuButton.js +1 -1
  97. package/dist/components/GlobalHeader/HeaderDrawer.js +1 -1
  98. package/dist/components/GlobalHeader/HeaderDropdown.js +1 -1
  99. package/dist/components/GlobalHeader/HeaderLogo.js +1 -1
  100. package/dist/components/GlobalMenu/GlobalMenu.js +1 -1
  101. package/dist/components/GlobalMenu/LocaleSwitcher.js +1 -1
  102. package/dist/components/GlobalMenu/LogoutButton.js +1 -1
  103. package/dist/components/Icon/Icon.js +1 -1
  104. package/dist/components/Icon/index.js +1 -1
  105. package/dist/components/Inbox/InboxPage.js +1 -1
  106. package/dist/components/InboxSearch/InboxSearch.js +1 -1
  107. package/dist/components/Item/ItemLabel.js +1 -1
  108. package/dist/components/Item/ItemMedia.js +1 -1
  109. package/dist/components/Item/ItemSelect.js +1 -1
  110. package/dist/components/Item/index.js +1 -1
  111. package/dist/components/Layout/Layout.js +1 -1
  112. package/dist/components/List/List.js +1 -1
  113. package/dist/components/List/ListBase.js +1 -1
  114. package/dist/components/List/ListItemHeader.js +1 -1
  115. package/dist/components/List/ListItemIcon.js +1 -1
  116. package/dist/components/List/ListItemLabel.js +1 -1
  117. package/dist/components/Menu/Menu.js +1 -1
  118. package/dist/components/Menu/MenuItem.js +1 -1
  119. package/dist/components/Menu/MenuItems.js +1 -1
  120. package/dist/components/Menu/MenuListGroup.js +16 -5
  121. package/dist/components/Menu/MenuListHeading.js +4 -4
  122. package/dist/components/Menu/MenuListSearch.js +1 -1
  123. package/dist/components/Menu/MenuOption.js +1 -1
  124. package/dist/components/Menu/TabMenu.js +1 -1
  125. package/dist/components/Menu/VirtualizedMenuItems.js +1 -1
  126. package/dist/components/Menu/index.js +1 -1
  127. package/dist/components/Menu/useMenuSearch.js +1 -1
  128. package/dist/components/Metadata/MetaItem.js +1 -1
  129. package/dist/components/Metadata/MetaItemIcon.js +1 -1
  130. package/dist/components/Metadata/MetaTimestamp.js +1 -1
  131. package/dist/components/Metadata/Metadata.js +1 -1
  132. package/dist/components/Metadata/index.js +1 -1
  133. package/dist/components/Modal/Modal.js +1 -1
  134. package/dist/components/Modal/ModalBase.js +1 -1
  135. package/dist/components/Modal/ModalHeader.js +1 -1
  136. package/dist/components/Modal/ModalIcon.js +1 -1
  137. package/dist/components/Notifications/NotificationItem.js +1 -1
  138. package/dist/components/Notifications/NotificationItemBase.js +1 -1
  139. package/dist/components/Notifications/NotificationItemControls.js +1 -1
  140. package/dist/components/Notifications/NotificationItemIcon.js +1 -1
  141. package/dist/components/Page/AccordionSection.js +1 -1
  142. package/dist/components/Page/ContactButtons.js +1 -1
  143. package/dist/components/Page/ContactSection.js +1 -1
  144. package/dist/components/Page/PageMenu.js +1 -1
  145. package/dist/components/Page/PageNav.js +1 -1
  146. package/dist/components/Page/Section.js +1 -1
  147. package/dist/components/Pagination/Pagination.js +1 -1
  148. package/dist/components/ResourceListItem/ResourceListItem.js +1 -1
  149. package/dist/components/RootProvider/RootProvider.js +1 -1
  150. package/dist/components/RootProvider/index.js +1 -1
  151. package/dist/components/Search/SearchItem.js +1 -1
  152. package/dist/components/Searchbar/Autocomplete.js +1 -1
  153. package/dist/components/Searchbar/AutocompleteItem.js +1 -1
  154. package/dist/components/Searchbar/Searchbar.js +1 -1
  155. package/dist/components/Searchbar/SearchbarField.js +1 -1
  156. package/dist/components/Settings/SettingsItem.js +1 -1
  157. package/dist/components/Settings/SettingsItemBase.js +1 -1
  158. package/dist/components/Settings/SettingsList.js +1 -1
  159. package/dist/components/Settings/SettingsListVirtual.js +1 -1
  160. package/dist/components/Settings/SettingsModal.js +1 -1
  161. package/dist/components/Settings/SettingsSection.js +1 -1
  162. package/dist/components/Settings/UsedByLog.js +1 -1
  163. package/dist/components/Settings/UsedByLogItem.js +1 -1
  164. package/dist/components/Snackbar/SnackbarItem.js +1 -1
  165. package/dist/components/Timeline/Timeline.js +1 -1
  166. package/dist/components/Timeline/TimelineActivity.js +1 -1
  167. package/dist/components/Timeline/TimelineBase.js +1 -1
  168. package/dist/components/Timeline/TimelineFooter.js +1 -1
  169. package/dist/components/Timeline/TimelineHeader.js +1 -1
  170. package/dist/components/Timeline/TimelineIcon.js +1 -1
  171. package/dist/components/Timeline/TimelineSection.js +1 -1
  172. package/dist/components/Timeline/TimelineSegment.js +1 -1
  173. package/dist/components/Toolbar/DatepickerFilter.js +45 -25
  174. package/dist/components/Toolbar/SelectDateFilter.js +1 -1
  175. package/dist/components/Toolbar/Toolbar.js +1 -1
  176. package/dist/components/Toolbar/ToolbarFilter.js +1 -1
  177. package/dist/components/Toolbar/ToolbarFilterAddMenu.js +1 -1
  178. package/dist/components/Toolbar/ToolbarFilterButton.js +37 -22
  179. package/dist/components/Toolbar/ToolbarFilterMenu.js +102 -92
  180. package/dist/components/Toolbar/ToolbarMenu.js +1 -1
  181. package/dist/components/Toolbar/ToolbarSearch.js +1 -1
  182. package/dist/components/Toolbar/index.js +1 -1
  183. package/dist/components/Toolbar/useFilter.js +8 -8
  184. package/dist/components/Transmission/Transmission.js +44 -43
  185. package/dist/components/Transmission/TransmissionList.js +1 -1
  186. package/dist/components/Transmission/TransmissionType.js +1 -1
  187. package/dist/components/Typography/Heading.js +1 -1
  188. package/dist/components/Typography/index.js +1 -1
  189. package/dist/components/UserListItem/UserListItem.js +1 -1
  190. package/dist/components/index.js +1 -1
  191. package/dist/hooks/useAccountSelector.js +1 -1
  192. package/dist/hooks/useMenu.js +35 -35
  193. package/dist/index.js +1 -1
  194. package/dist/types/lib/components/Datepicker/DatepickerAccessibility.stories.d.ts +15 -0
  195. package/dist/types/lib/components/Datepicker/DatepickerHeader.d.ts +3 -1
  196. package/dist/types/lib/components/Datepicker/DatepickerTable.d.ts +10 -1
  197. package/dist/types/lib/components/Menu/MenuAccessibility.stories.d.ts +16 -0
  198. package/dist/types/lib/components/Menu/MenuCombobox.stories.d.ts +11 -0
  199. package/dist/types/lib/components/Menu/MenuItem.d.ts +1 -1
  200. package/dist/types/lib/components/Menu/MenuKeyboardNav.stories.d.ts +11 -0
  201. package/dist/types/lib/components/Menu/MenuListGroup.d.ts +2 -1
  202. package/dist/types/lib/components/Menu/MenuListHeading.d.ts +1 -1
  203. package/dist/types/lib/components/Toolbar/ToolbarFilter.stories.d.ts +1 -0
  204. package/dist/types/lib/components/Toolbar/ToolbarFilterA11y.stories.d.ts +18 -0
  205. package/dist/types/lib/components/Toolbar/ToolbarFilterButton.d.ts +1 -1
  206. package/dist/types/lib/components/Toolbar/useFilter.d.ts +1 -1
  207. package/package.json +1 -1
  208. package/dist/ToolbarSearch-DyVcALSw.js +0 -2045
@@ -1,145 +1,155 @@
1
- import { jsx as n } from "react/jsx-runtime";
2
- import { useRef as J, useEffect as K } from "react";
1
+ import { jsx as i } from "react/jsx-runtime";
2
+ import { useRef as H, useEffect as J } from "react";
3
3
  import "../../index-p1eeF8LQ.js";
4
4
  import "../../tooltip-Ct39-719.js";
5
- import { g as j, M as N } from "../../ToolbarSearch-DyVcALSw.js";
5
+ import { g as O, M as K } from "../../ToolbarSearch-CpAUv-Lw.js";
6
6
  import "../Typography/Link.js";
7
7
  import "../Button/Button.js";
8
8
  import { useDropdownMenuController as Q } from "../Menu/useDropdownMenuController.js";
9
9
  import "../GlobalMenu/GlobalMenuBase.js";
10
10
  import "../Snackbar/useSnackbar.js";
11
- import { ToolbarFilterButton as v } from "./ToolbarFilterButton.js";
12
- const er = ({
13
- as: D,
14
- disabled: O,
15
- size: y,
11
+ import { ToolbarFilterButton as k } from "./ToolbarFilterButton.js";
12
+ const or = ({
13
+ as: p,
14
+ disabled: B,
15
+ size: I,
16
16
  name: o,
17
17
  label: d = "",
18
- searchable: u,
18
+ searchable: s,
19
19
  groups: b,
20
- items: h,
21
- removable: B,
22
- removeLabel: k = "Fjern filter",
20
+ items: w,
21
+ removable: N,
22
+ removeLabel: y = "Fjern filter",
23
23
  filterState: c,
24
- onFilterStateChange: w,
24
+ onFilterStateChange: h,
25
25
  onFilterChange: V,
26
- onRemove: I,
27
- open: t,
28
- onToggle: x,
29
- onClose: a,
30
- submitLabel: A,
31
- search: M,
32
- virtualized: R,
33
- title: C,
26
+ onRemove: x,
27
+ open: e,
28
+ onToggle: A,
29
+ onClose: u,
30
+ submitLabel: M,
31
+ search: R,
32
+ virtualized: C,
33
+ title: F,
34
34
  htmlTitle: m,
35
- variant: f,
36
- dropdownSize: F = "sm"
35
+ variant: l,
36
+ dropdownSize: P = "sm"
37
37
  }) => {
38
- const P = J(t), e = Q({ id: "toolbar-filter-menu" });
39
- K(() => {
40
- const r = P.current;
41
- P.current = t, r && !t && e?.triggerRef?.current?.focus();
42
- }, [t, e.triggerRef]);
43
- const q = (r) => {
44
- const i = r.target.type, g = r.target.name, H = r.target.value;
45
- V?.(i, g, H), i === "radio" && a();
46
- }, l = h?.map((r) => ({
38
+ const E = H(e), t = Q({ id: `toolbar-filter-menu-${o}` });
39
+ J(() => {
40
+ const r = E.current;
41
+ E.current = e, r && !e && t?.triggerRef?.current?.focus();
42
+ }, [e, t.triggerRef]);
43
+ const $ = (r) => {
44
+ const a = r.role === "radio" ? "radio" : "checkbox", g = r.name ?? o, G = r.value !== void 0 ? String(r.value) : "on";
45
+ V?.(a, g, G), a === "radio" && u();
46
+ }, f = w?.map((r) => ({
47
47
  ...r,
48
- onChange: (i) => q(i)
49
- })), p = (h?.filter((r) => r.checked)?.map((r) => r.value || "true")).length > 0 || c?.[o]?.length ? "tinted" : "outline", E = D || N, s = u ? "combobox" : "menu", G = () => {
50
- a();
48
+ onClick: () => $(r)
49
+ })), v = (w?.filter((r) => r.checked)?.map((r) => r.value || "true")).length > 0 || c?.[o]?.length ? "tinted" : "outline", j = p || K, n = s ? "combobox" : "menu", D = !p && n === "menu" && e ? t.menuId : void 0, q = () => {
50
+ u();
51
51
  const r = c?.[o]?.[0];
52
- l?.filter((g) => g.checked)?.length === 0 && !r && I?.();
52
+ f?.filter((g) => g.checked)?.length === 0 && !r && x?.();
53
53
  };
54
- return O ? /* @__PURE__ */ n(
55
- v,
54
+ return B ? /* @__PURE__ */ i(
55
+ k,
56
56
  {
57
57
  disabled: !0,
58
58
  name: o,
59
59
  removable: !0,
60
- variant: f || p,
61
- removeLabel: k,
62
- open: t,
60
+ variant: l || v,
61
+ removeLabel: y,
62
+ open: e,
63
63
  htmlTitle: m,
64
64
  children: d
65
65
  }
66
- ) : B ? /* @__PURE__ */ n(
67
- j,
66
+ ) : N ? /* @__PURE__ */ i(
67
+ O,
68
68
  {
69
- submitLabel: A,
70
- title: C,
69
+ submitLabel: M,
70
+ title: F,
71
71
  variant: "drawer-dropdown",
72
- size: F,
73
- trigger: /* @__PURE__ */ n(
74
- v,
72
+ size: P,
73
+ trigger: /* @__PURE__ */ i(
74
+ k,
75
75
  {
76
76
  name: o,
77
- onClick: x,
78
- onRemove: I,
77
+ onClick: A,
78
+ onRemove: x,
79
79
  removable: !0,
80
- variant: f || p,
81
- removeLabel: k,
82
- open: t,
80
+ variant: l || v,
81
+ removeLabel: y,
82
+ open: e,
83
+ menuId: D,
83
84
  htmlTitle: m,
84
- "aria-expanded": t,
85
- "aria-controls": e.menuId,
86
- ref: e.triggerRef,
85
+ ref: t.triggerRef,
87
86
  children: d
88
87
  }
89
88
  ),
90
- open: t,
91
- onClose: G,
92
- ...e.dropdownA11yProps,
93
- children: /* @__PURE__ */ n(
94
- E,
89
+ open: e,
90
+ onClose: q,
91
+ ...t.dropdownA11yProps,
92
+ children: /* @__PURE__ */ i(
93
+ j,
95
94
  {
96
- open: t,
97
- search: M,
95
+ open: e,
96
+ search: R,
98
97
  name: o,
99
98
  filterState: c,
100
- onFilterStateChange: w,
101
- size: y,
102
- searchable: u,
99
+ onFilterStateChange: h,
100
+ size: I,
101
+ searchable: s,
103
102
  groups: b,
104
- items: l,
105
- keyboardEvents: t,
106
- a11yMode: s,
107
- ...s === "combobox" ? { id: e.menuId } : e.menuA11yProps,
108
- virtualized: R
103
+ items: f,
104
+ keyboardEvents: e,
105
+ a11yMode: n,
106
+ ...n === "combobox" ? { id: t.menuId } : t.menuA11yProps,
107
+ virtualized: C
109
108
  }
110
109
  )
111
110
  }
112
- ) : /* @__PURE__ */ n(
113
- j,
111
+ ) : /* @__PURE__ */ i(
112
+ O,
114
113
  {
115
- size: F,
116
- title: C,
114
+ size: P,
115
+ title: F,
117
116
  variant: "drawer-dropdown",
118
- submitLabel: A,
119
- trigger: /* @__PURE__ */ n(v, { name: o, onClick: x, variant: f || p, htmlTitle: m, children: d }),
120
- open: t,
121
- onClose: a,
122
- ...e.dropdownA11yProps,
123
- children: /* @__PURE__ */ n(
124
- E,
117
+ submitLabel: M,
118
+ trigger: /* @__PURE__ */ i(
119
+ k,
125
120
  {
126
- search: M,
121
+ name: o,
122
+ onClick: A,
123
+ variant: l || v,
124
+ htmlTitle: m,
125
+ open: e,
126
+ menuId: D,
127
+ children: d
128
+ }
129
+ ),
130
+ open: e,
131
+ onClose: u,
132
+ ...t.dropdownA11yProps,
133
+ children: /* @__PURE__ */ i(
134
+ j,
135
+ {
136
+ search: R,
127
137
  name: o,
128
138
  filterState: c,
129
- onFilterStateChange: w,
130
- size: y,
131
- searchable: u,
139
+ onFilterStateChange: h,
140
+ size: I,
141
+ searchable: s,
132
142
  groups: b,
133
- items: l,
134
- keyboardEvents: t,
135
- a11yMode: s,
136
- ...s === "combobox" ? { id: e.menuId } : e.menuA11yProps,
137
- virtualized: R
143
+ items: f,
144
+ keyboardEvents: e,
145
+ a11yMode: n,
146
+ ...n === "combobox" ? { id: t.menuId } : t.menuA11yProps,
147
+ virtualized: C
138
148
  }
139
149
  )
140
150
  }
141
151
  );
142
152
  };
143
153
  export {
144
- er as ToolbarFilterMenu
154
+ or as ToolbarFilterMenu
145
155
  };
@@ -3,7 +3,7 @@ import "react";
3
3
  import "../Button/Button.js";
4
4
  import "../../index-p1eeF8LQ.js";
5
5
  import "../../tooltip-Ct39-719.js";
6
- import { T as l } from "../../ToolbarSearch-DyVcALSw.js";
6
+ import { T as l } from "../../ToolbarSearch-CpAUv-Lw.js";
7
7
  import "../Typography/Link.js";
8
8
  import "../Menu/useDropdownMenuController.js";
9
9
  import "../GlobalMenu/GlobalMenuBase.js";
@@ -2,7 +2,7 @@ import "react/jsx-runtime";
2
2
  import "react";
3
3
  import "../../tooltip-Ct39-719.js";
4
4
  import "../../index-p1eeF8LQ.js";
5
- import { t as h } from "../../ToolbarSearch-DyVcALSw.js";
5
+ import { t as h } from "../../ToolbarSearch-CpAUv-Lw.js";
6
6
  import "../Typography/Link.js";
7
7
  import "../Button/Button.js";
8
8
  import "react-dom";
@@ -1,7 +1,7 @@
1
1
  import { Toolbar as e } from "./Toolbar.js";
2
2
  import { ToolbarFilter as l } from "./ToolbarFilter.js";
3
3
  import { ToolbarFilterMenu as m } from "./ToolbarFilterMenu.js";
4
- import { T as p, t as x } from "../../ToolbarSearch-DyVcALSw.js";
4
+ import { T as p, t as x } from "../../ToolbarSearch-CpAUv-Lw.js";
5
5
  import { useFilter as T } from "./useFilter.js";
6
6
  import { SelectDateFilter as i } from "./SelectDateFilter.js";
7
7
  import { QueryLabel as s } from "./QueryLabel.js";
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { useState as h, useMemo as f, useEffect as p } from "react";
3
- const m = (n, o) => o || `toolbar-filter-${n}`, x = ({ filters: n = [], filterState: o, onFilterStateChange: u }) => {
4
- const i = o || {}, c = typeof u == "function" ? u : () => {
3
+ const m = (n, c) => c || `toolbar-filter-${n}`, x = ({ filters: n = [], filterState: c, onFilterStateChange: u }) => {
4
+ const i = c || {}, r = typeof u == "function" ? u : () => {
5
5
  }, [d, a] = h(
6
6
  () => n.filter((e) => !e.removable || typeof i[e.name] < "u").map((e) => e.name)
7
7
  ), F = f(
@@ -18,25 +18,25 @@ const m = (n, o) => o || `toolbar-filter-${n}`, x = ({ filters: n = [], filterSt
18
18
  ...t.filter((l) => e.includes(l)),
19
19
  ...e.filter((l) => !t.includes(l))
20
20
  ];
21
- return s.length === t.length && s.every((l, r) => l === t[r]) ? t : s;
21
+ return s.length === t.length && s.every((l, o) => l === t[o]) ? t : s;
22
22
  });
23
23
  }, [n, i]);
24
24
  const v = (e, t, s) => {
25
25
  const l = [s];
26
- c(e === "radio" ? {
26
+ r(e === "radio" ? {
27
27
  ...i,
28
28
  [t]: l
29
29
  } : {
30
30
  ...i,
31
- [t]: i[t] ? i[t].some((r) => l.includes(String(r))) ? i[t].filter((r) => !(l || []).includes(String(r))) : [...i[t], ...l || []] : l
31
+ [t]: i[t] ? i[t].some((o) => l.includes(String(o))) ? i[t].filter((o) => !(l || []).includes(String(o))) : [...i[t], ...l || []] : l
32
32
  });
33
33
  }, y = (e) => {
34
- a((t) => t.filter((s) => s !== e)), c({
34
+ a((t) => t.filter((s) => s !== e)), r({
35
35
  ...i,
36
36
  [e]: void 0
37
37
  });
38
38
  }, g = (e) => {
39
- d.includes(e) || a((t) => [...t, e]), c({
39
+ d.includes(e) || a((t) => [...t, e]), r({
40
40
  ...i,
41
41
  [e]: i[e] ?? []
42
42
  }), requestAnimationFrame(() => {
@@ -48,7 +48,7 @@ const m = (n, o) => o || `toolbar-filter-${n}`, x = ({ filters: n = [], filterSt
48
48
  ...e,
49
49
  items: e.items?.map((t) => ({
50
50
  ...t,
51
- checked: t?.name && t?.value !== void 0 ? i?.[t.name]?.includes(t.value) : !1
51
+ checked: !!(t?.name && t?.value !== void 0 && i?.[t.name]?.includes(t.value))
52
52
  })),
53
53
  id: m(e.name, e.id)
54
54
  })),
@@ -1,7 +1,7 @@
1
1
  "use client";
2
- import { jsx as t, jsxs as l, Fragment as x } from "react/jsx-runtime";
3
- import { useState as g } from "react";
4
- import { B as v } from "../../ToolbarSearch-DyVcALSw.js";
2
+ import { jsx as t, jsxs as r, Fragment as g } from "react/jsx-runtime";
3
+ import { useState as _ } from "react";
4
+ import { B as v } from "../../ToolbarSearch-CpAUv-Lw.js";
5
5
  import "../../index-p1eeF8LQ.js";
6
6
  import { AttachmentList as L } from "../Attachment/AttachmentList.js";
7
7
  import "../../tooltip-Ct39-719.js";
@@ -9,69 +9,70 @@ import { Typography as T } from "../Typography/Typography.js";
9
9
  import "../Typography/Link.js";
10
10
  import "../Button/Button.js";
11
11
  import "react-dom";
12
- import { SeenByLog as y } from "../Dialog/SeenByLog.js";
12
+ import { SeenByLog as A } from "../Dialog/SeenByLog.js";
13
13
  import "../GlobalMenu/GlobalMenuBase.js";
14
- import { ListItem as A } from "../List/ListItem.js";
14
+ import { ListItem as S } from "../List/ListItem.js";
15
15
  import "../Snackbar/useSnackbar.js";
16
- import { Section as S } from "../Page/Section.js";
17
- import { TransmissionType as _ } from "./TransmissionType.js";
18
- import '../../assets/Transmission.css';const j = "_title_cy7ua_1", k = {
19
- title: j
20
- }, Q = ({
21
- type: i,
22
- unread: o,
16
+ import { Section as j } from "../Page/Section.js";
17
+ import { TransmissionType as k } from "./TransmissionType.js";
18
+ import '../../assets/Transmission.css';const w = "_title_1hel0_1", y = "_content_1hel0_16", p = {
19
+ title: w,
20
+ content: y
21
+ }, R = ({
22
+ type: o,
23
+ unread: i,
23
24
  size: d = "xs",
24
- color: c = "neutral",
25
- title: n,
26
- createdAt: w,
27
- createdAtLabel: z,
28
- badge: f = { label: "Ulest" },
29
- sender: b,
30
- summary: a,
31
- attachments: s,
32
- children: r,
25
+ color: f = "neutral",
26
+ title: l,
27
+ createdAt: z,
28
+ createdAtLabel: B,
29
+ badge: b = { label: "Ulest" },
30
+ sender: h,
31
+ summary: s,
32
+ attachments: a,
33
+ children: n,
33
34
  seenByLog: m,
34
- ...p
35
+ ...c
35
36
  }) => {
36
- const [e, u] = g(p.expanded || !1);
37
+ const [e, u] = _(c.expanded || !1);
37
38
  return /* @__PURE__ */ t(
38
- A,
39
+ S,
39
40
  {
40
- ...p,
41
- icon: b,
42
- badge: i && /* @__PURE__ */ t(_, { value: i?.value, label: i?.label }),
41
+ ...c,
42
+ icon: h,
43
+ badge: o && /* @__PURE__ */ t(k, { value: o?.value, label: o?.label }),
43
44
  size: d,
44
- variant: o ? "subtle" : "default",
45
+ variant: i ? "subtle" : "default",
45
46
  border: e ? "none" : "solid",
46
47
  shadow: "none",
47
- color: c,
48
+ color: f,
48
49
  title: {
49
50
  as: "span",
50
- className: k.title,
51
- children: /* @__PURE__ */ l(x, { children: [
52
- /* @__PURE__ */ t("h2", { children: n }),
53
- o && /* @__PURE__ */ t(v, { variant: "tinted", size: "xs", ...f })
51
+ className: p.title,
52
+ children: /* @__PURE__ */ r(g, { children: [
53
+ /* @__PURE__ */ t("h2", { children: l }),
54
+ i && /* @__PURE__ */ t(v, { variant: "tinted", size: "xs", ...b })
54
55
  ] }),
55
- weight: o ? "bold" : "normal"
56
+ weight: i ? "bold" : "normal"
56
57
  },
57
58
  expanded: e,
58
59
  selected: e,
59
- onClick: () => u((h) => !h),
60
+ onClick: () => u((x) => !x),
60
61
  collapsible: !0,
61
62
  linkIcon: !0,
62
63
  as: "button",
63
- ariaLabel: n,
64
- children: /* @__PURE__ */ l(S, { padding: 4, spacing: 4, children: [
65
- /* @__PURE__ */ l(T, { size: "md", children: [
66
- a && /* @__PURE__ */ t("p", { children: a }),
67
- e ? typeof r == "function" ? r() : r : null,
68
- s?.items && /* @__PURE__ */ t(L, { ...s })
64
+ ariaLabel: l,
65
+ children: /* @__PURE__ */ r(j, { className: p.content, padding: 4, spacing: 4, children: [
66
+ /* @__PURE__ */ r(T, { size: "md", children: [
67
+ s && /* @__PURE__ */ t("p", { children: s }),
68
+ e ? typeof n == "function" ? n() : n : null,
69
+ a?.items && /* @__PURE__ */ t(L, { ...a })
69
70
  ] }),
70
- m && /* @__PURE__ */ t(y, { ...m })
71
+ m && /* @__PURE__ */ t(A, { ...m })
71
72
  ] })
72
73
  }
73
74
  );
74
75
  };
75
76
  export {
76
- Q as Transmission
77
+ R as Transmission
77
78
  };
@@ -2,7 +2,7 @@ import { jsx as i, jsxs as s } from "react/jsx-runtime";
2
2
  import { createElement as l } from "react";
3
3
  import "../../index-p1eeF8LQ.js";
4
4
  import "../../tooltip-Ct39-719.js";
5
- import { a } from "../../ToolbarSearch-DyVcALSw.js";
5
+ import { a } from "../../ToolbarSearch-CpAUv-Lw.js";
6
6
  import "../Typography/Link.js";
7
7
  import "../Button/Button.js";
8
8
  import "react-dom";
@@ -1,5 +1,5 @@
1
1
  import { jsx as e } from "react/jsx-runtime";
2
- import { B as o } from "../../ToolbarSearch-DyVcALSw.js";
2
+ import { B as o } from "../../ToolbarSearch-CpAUv-Lw.js";
3
3
  import "../../index-p1eeF8LQ.js";
4
4
  import "react";
5
5
  import "../../tooltip-Ct39-719.js";
@@ -3,7 +3,7 @@ import "../../index-p1eeF8LQ.js";
3
3
  import "react";
4
4
  import "../Skeleton/Skeleton.js";
5
5
  import "../../tooltip-Ct39-719.js";
6
- import { H as s } from "../../ToolbarSearch-DyVcALSw.js";
6
+ import { H as s } from "../../ToolbarSearch-CpAUv-Lw.js";
7
7
  import "./useHighlightedText.js";
8
8
  import "./Link.js";
9
9
  import "../Button/Button.js";
@@ -1,5 +1,5 @@
1
1
  import { Typography as p } from "./Typography.js";
2
- import { H as a } from "../../ToolbarSearch-DyVcALSw.js";
2
+ import { H as a } from "../../ToolbarSearch-CpAUv-Lw.js";
3
3
  import { Link as m } from "./Link.js";
4
4
  export {
5
5
  a as Heading,
@@ -1,5 +1,5 @@
1
1
  import { jsx as s, jsxs as _ } from "react/jsx-runtime";
2
- import { B as h } from "../../ToolbarSearch-DyVcALSw.js";
2
+ import { B as h } from "../../ToolbarSearch-CpAUv-Lw.js";
3
3
  import "../../index-p1eeF8LQ.js";
4
4
  import "react";
5
5
  import "../../tooltip-Ct39-719.js";
@@ -11,7 +11,7 @@ import { AccountNotificationSettings as A } from "./Account/AccountNotificationS
11
11
  import { AccountOrganization as y } from "./Account/AccountOrganization.js";
12
12
  import { AccountSelector as k } from "./AccountSelector/AccountSelector.js";
13
13
  import { Alert as v } from "./Alert/Alert.js";
14
- import { B as P, a as C, D as H, b as w, c as E, d as G, e as O, f as R, g as N, F as V, H as U, I as z, h as j, i as Q, M as q, j as J, k as K, l as W, m as X, n as Y, R as Z, S as _, T as $, t as oo, V as ro, u as eo, w as to } from "../ToolbarSearch-DyVcALSw.js";
14
+ import { B as P, a as C, D as H, b as w, c as E, d as G, e as O, f as R, g as N, F as V, H as U, I as z, h as j, i as Q, M as q, j as J, k as K, l as W, m as X, n as Y, R as Z, S as _, T as $, t as oo, V as ro, u as eo, w as to } from "../ToolbarSearch-CpAUv-Lw.js";
15
15
  import { Banner as ao, BannerColorEnum as po, BannerVariantEnum as io } from "./Banner/Banner.js";
16
16
  import { BookmarkSettingsItem as fo } from "./Bookmarks/BookmarkSettingsItem.js";
17
17
  import { BookmarkSettingsList as no } from "./Bookmarks/BookmarkSettingsList.js";
@@ -2,7 +2,7 @@ import { jsx as F } from "react/jsx-runtime";
2
2
  import { useRef as R, useMemo as h } from "react";
3
3
  import "../index-p1eeF8LQ.js";
4
4
  import "../tooltip-Ct39-719.js";
5
- import "../ToolbarSearch-DyVcALSw.js";
5
+ import "../ToolbarSearch-CpAUv-Lw.js";
6
6
  import "../components/Typography/Link.js";
7
7
  import { Button as q } from "../components/Button/Button.js";
8
8
  import "react-dom";
@@ -1,66 +1,66 @@
1
1
  "use client";
2
- import { useState as g, useMemo as f, useCallback as k, useEffect as A } from "react";
2
+ import { useState as M, useMemo as a, useCallback as k, useEffect as A } from "react";
3
3
  import { useEnterKey as D } from "./useEnterKey.js";
4
4
  const x = ({
5
- items: s,
6
- groups: m,
7
- groupByKey: o,
8
- keyboardEvents: u = !1,
9
- autoActivateFirstItem: v = !0,
10
- sortGroupBy: h,
11
- onSelect: I,
12
- ref: d
5
+ items: d,
6
+ groups: p,
7
+ groupByKey: i,
8
+ keyboardEvents: s = !1,
9
+ autoActivateFirstItem: h = !0,
10
+ sortGroupBy: v,
11
+ onSelect: g,
12
+ ref: f
13
13
  }) => {
14
- const [c, r] = g(-1);
14
+ const [o, r] = M(-1);
15
15
  D((e) => {
16
- if (u) {
17
- const n = (d && "current" in d ? d.current : null)?.querySelector('[data-active="true"]');
16
+ if (s) {
17
+ const n = (f && "current" in f ? f.current : null)?.querySelector('[data-active="true"]');
18
18
  if (document.activeElement?.getAttribute("data-action") === "clear-input")
19
19
  return;
20
- n && (e.stopPropagation(), e.preventDefault(), n.tagName === "A" && n.hasAttribute("href") ? n.click() : n.dispatchEvent(new MouseEvent("click", { bubbles: !0 }))), I?.();
20
+ n && (e.stopPropagation(), e.preventDefault(), n.tagName === "A" && n.hasAttribute("href") ? n.click() : n.dispatchEvent(new MouseEvent("click", { bubbles: !0 }))), g?.();
21
21
  }
22
22
  });
23
- const i = f(() => s.reduce(
23
+ const c = a(() => d.reduce(
24
24
  (e, t) => {
25
- const n = o && t[o] ? t[o] : "ungrouped";
25
+ const n = i && t[i] ? t[i] : "ungrouped";
26
26
  return e[n] = e[n] || [], e[n].push(t), e;
27
27
  },
28
28
  {}
29
- ), [s, o]), l = f(
30
- () => Object.values(i).flat().filter((e) => !e?.disabled),
31
- [i]
32
- ), w = f(() => {
29
+ ), [d, i]), u = a(
30
+ () => Object.values(c).flat().filter((e) => !e?.disabled),
31
+ [c]
32
+ ), w = a(() => {
33
33
  const e = /* @__PURE__ */ new Map();
34
- for (let t = 0; t < l.length; t++)
35
- e.set(l[t], t);
34
+ for (let t = 0; t < u.length; t++)
35
+ e.set(u[t], t);
36
36
  return e;
37
- }, [l]), M = f(() => Object.entries(i).sort(h || (() => 0)).map(([e, t]) => ({
37
+ }, [u]), I = a(() => Object.entries(c).sort(v || (() => 0)).map(([e, t]) => ({
38
38
  items: t.map((n) => {
39
- const a = w.get(n) ?? -1;
39
+ const l = w.get(n) ?? -1;
40
40
  return {
41
- menuIndex: a,
42
- active: c === a,
43
- onMouseEnter: u ? () => {
44
- r(a);
41
+ menuIndex: l,
42
+ active: o === l,
43
+ onMouseEnter: s ? () => {
44
+ r(l);
45
45
  } : void 0,
46
- onMouseLeave: u ? () => {
46
+ onMouseLeave: s ? () => {
47
47
  r(-1);
48
48
  } : void 0,
49
49
  props: n
50
50
  };
51
51
  }),
52
52
  props: {
53
- ...m[e] || {}
53
+ ...p[e] || {}
54
54
  }
55
- })), [i, w, c, u, h, m]), p = k(
55
+ })), [c, w, o, s, v, p]), m = k(
56
56
  (e) => {
57
- e.key === "ArrowDown" ? (e.preventDefault(), r((t) => (t + 1) % s.length)) : e.key === "ArrowUp" && (e.preventDefault(), r((t) => t <= 0 ? 0 : t - 1));
57
+ u.length !== 0 && (e.key === "ArrowDown" ? (e.preventDefault(), r((t) => (t + 1) % u.length)) : e.key === "ArrowUp" && (e.preventDefault(), r((t) => t <= 0 ? 0 : t - 1)));
58
58
  },
59
- [s.length]
59
+ [u.length]
60
60
  );
61
- return A(() => (u && (r(v ? 0 : -1), document.addEventListener("keydown", p)), () => {
62
- document.removeEventListener("keydown", p);
63
- }), [p, u, v]), { menu: M, activeIndex: c, setActiveIndex: r, activeItem: l[c] };
61
+ return A(() => (s && (r(h ? 0 : -1), document.addEventListener("keydown", m)), () => {
62
+ document.removeEventListener("keydown", m);
63
+ }), [m, s, h]), { menu: I, activeIndex: o, setActiveIndex: r, activeItem: u[o] };
64
64
  };
65
65
  export {
66
66
  x as useMenu
package/dist/index.js CHANGED
@@ -11,7 +11,7 @@ import { AccountNotificationSettings as b } from "./components/Account/AccountNo
11
11
  import { AccountOrganization as y } from "./components/Account/AccountOrganization.js";
12
12
  import { AccountSelector as k } from "./components/AccountSelector/AccountSelector.js";
13
13
  import { Alert as v } from "./components/Alert/Alert.js";
14
- import { B as C, a as P, D as H, b as w, c as E, d as G, e as O, f as N, g as R, F as V, H as U, I as z, h as j, i as Q, M as K, j as q, k as J, l as W, m as X, n as Y, R as Z, S as _, T as $, t as oo, V as ro, u as eo, w as to } from "./ToolbarSearch-DyVcALSw.js";
14
+ import { B as C, a as P, D as H, b as w, c as E, d as G, e as O, f as N, g as R, F as V, H as U, I as z, h as j, i as Q, M as K, j as q, k as J, l as W, m as X, n as Y, R as Z, S as _, T as $, t as oo, V as ro, u as eo, w as to } from "./ToolbarSearch-CpAUv-Lw.js";
15
15
  import { Banner as ao, BannerColorEnum as po, BannerVariantEnum as xo } from "./components/Banner/Banner.js";
16
16
  import { BookmarkSettingsItem as fo } from "./components/Bookmarks/BookmarkSettingsItem.js";
17
17
  import { BookmarkSettingsList as no } from "./components/Bookmarks/BookmarkSettingsList.js";
@@ -0,0 +1,15 @@
1
+ declare const meta: {
2
+ title: string;
3
+ parameters: {
4
+ a11y: {
5
+ test: string;
6
+ };
7
+ };
8
+ };
9
+ export default meta;
10
+ export declare const Calendar: {
11
+ render: () => import("react/jsx-runtime").JSX.Element;
12
+ };
13
+ export declare const RangeFilter: {
14
+ render: () => import("react/jsx-runtime").JSX.Element;
15
+ };