@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.
- package/dist/ToolbarSearch-CpAUv-Lw.js +2010 -0
- package/dist/assets/DatepickerTable.css +1 -1
- package/dist/assets/DialogBody.css +1 -0
- package/dist/assets/Transmission.css +1 -1
- package/dist/components/AccessAreaListItem/AccessAreaListItem.js +1 -1
- package/dist/components/AccessPackageListItem/AccessPackageListItem.js +1 -1
- package/dist/components/Account/AccountList.js +1 -1
- package/dist/components/Account/AccountListItem.js +1 -1
- package/dist/components/Account/AccountListItemControls.js +1 -1
- package/dist/components/Account/AccountListItemDetails.js +1 -1
- package/dist/components/Account/AccountListVirtual.js +1 -1
- package/dist/components/Account/AccountMenu.js +1 -1
- package/dist/components/Account/AccountNotificationSettings.js +1 -1
- package/dist/components/Account/AccountOrganization.js +1 -1
- package/dist/components/AccountSelector/AccountSelector.js +1 -1
- package/dist/components/ActivityLog/ActivityLog.js +1 -1
- package/dist/components/ActivityLog/ActivityLogItem.js +1 -1
- package/dist/components/ActivityLog/ActivityLogSegment.js +1 -1
- package/dist/components/Alert/Alert.js +1 -1
- package/dist/components/Article/Article.js +1 -1
- package/dist/components/Article/ArticleContact.js +1 -1
- package/dist/components/Article/ArticleHeader.js +1 -1
- package/dist/components/Attachment/AttachmentLink.js +1 -1
- package/dist/components/AuthEvidence/AuthEvidence.js +1 -1
- package/dist/components/AuthEvidence/AuthEvidenceItem.js +1 -1
- package/dist/components/AuthEvidence/AuthEvidenceOwner.js +1 -1
- package/dist/components/AuthEvidence/AuthEvidenceParent.js +1 -1
- package/dist/components/AuthEvidence/AuthEvidenceService.js +1 -1
- package/dist/components/Badge/Badge.js +1 -1
- package/dist/components/Badge/index.js +1 -1
- package/dist/components/Banner/Banner.js +1 -1
- package/dist/components/Bookmarks/BookmarkModal.js +1 -1
- package/dist/components/Bookmarks/BookmarkSettingsItem.js +1 -1
- package/dist/components/Bookmarks/BookmarkSettingsItemLabel.js +1 -1
- package/dist/components/Bookmarks/BookmarkSettingsList.js +1 -1
- package/dist/components/Breadcrumbs/Breadcrumbs.js +1 -1
- package/dist/components/Bulk/BulkHeader.js +1 -1
- package/dist/components/Button/ButtonIcon.js +1 -1
- package/dist/components/Button/ComboButton.js +1 -1
- package/dist/components/Button/FloatingActionButton.js +1 -1
- package/dist/components/Button/IconButton.js +1 -1
- package/dist/components/Byline/Byline.js +1 -1
- package/dist/components/Byline/index.js +1 -1
- package/dist/components/ContextMenu/ContextMenu.js +1 -1
- package/dist/components/Dashboard/DashboardCard.js +1 -1
- package/dist/components/Dashboard/DashboardHeader.js +1 -1
- package/dist/components/Datepicker/Datepicker.js +54 -25
- package/dist/components/Datepicker/DatepickerHeader.js +32 -26
- package/dist/components/Datepicker/DatepickerTable.js +30 -25
- package/dist/components/Dialog/Dialog.js +1 -1
- package/dist/components/Dialog/DialogActions.js +1 -1
- package/dist/components/Dialog/DialogActivityLog.js +1 -1
- package/dist/components/Dialog/DialogAttachments.js +1 -1
- package/dist/components/Dialog/DialogBody.js +35 -23
- package/dist/components/Dialog/DialogByline.js +1 -1
- package/dist/components/Dialog/DialogContact.js +1 -1
- package/dist/components/Dialog/DialogHeader.js +1 -1
- package/dist/components/Dialog/DialogHistory.js +1 -1
- package/dist/components/Dialog/DialogHistoryItem.js +1 -1
- package/dist/components/Dialog/DialogHistorySegment.js +1 -1
- package/dist/components/Dialog/DialogLayout.js +1 -1
- package/dist/components/Dialog/DialogList.js +1 -1
- package/dist/components/Dialog/DialogListItem.js +1 -1
- package/dist/components/Dialog/DialogMetadata.js +1 -1
- package/dist/components/Dialog/DialogSection.js +1 -1
- package/dist/components/Dialog/DialogSeenBy.js +1 -1
- package/dist/components/Dialog/DialogSelect.js +1 -1
- package/dist/components/Dialog/DialogStatus.js +1 -1
- package/dist/components/Dialog/DialogTabs.js +1 -1
- package/dist/components/Dialog/SeenByLog.js +1 -1
- package/dist/components/Dialog/SeenByLogButton.js +1 -1
- package/dist/components/Dialog/SeenByLogItem.js +1 -1
- package/dist/components/Dialog/index.js +1 -1
- package/dist/components/Dropdown/DrawerButton.js +1 -1
- package/dist/components/Dropdown/DrawerHeader.js +1 -1
- package/dist/components/Dropdown/Dropdown.js +1 -1
- package/dist/components/Dropdown/DropdownBase.js +1 -1
- package/dist/components/Dropdown/FloatingDropdown.js +1 -1
- package/dist/components/Dropdown/index.js +1 -1
- package/dist/components/Forms/Checkbox.js +1 -1
- package/dist/components/Forms/CheckboxOptions.js +1 -1
- package/dist/components/Forms/FieldBase.js +1 -1
- package/dist/components/Forms/FieldsetBase.js +1 -1
- package/dist/components/Forms/Radio.js +1 -1
- package/dist/components/Forms/RadioOptions.js +1 -1
- package/dist/components/Forms/SearchField.js +1 -1
- package/dist/components/Forms/SelectField.js +1 -1
- package/dist/components/Forms/Switch.js +1 -1
- package/dist/components/Forms/SwitchOptions.js +1 -1
- package/dist/components/Forms/TextField.js +1 -1
- package/dist/components/Forms/TextFieldDropdown.js +1 -1
- package/dist/components/Forms/TextareaField.js +1 -1
- package/dist/components/Forms/index.js +1 -1
- package/dist/components/GlobalHeader/GlobalAccountButton.js +1 -1
- package/dist/components/GlobalHeader/GlobalHeader.js +1 -1
- package/dist/components/GlobalHeader/GlobalMenuButton.js +1 -1
- package/dist/components/GlobalHeader/HeaderDrawer.js +1 -1
- package/dist/components/GlobalHeader/HeaderDropdown.js +1 -1
- package/dist/components/GlobalHeader/HeaderLogo.js +1 -1
- package/dist/components/GlobalMenu/GlobalMenu.js +1 -1
- package/dist/components/GlobalMenu/LocaleSwitcher.js +1 -1
- package/dist/components/GlobalMenu/LogoutButton.js +1 -1
- package/dist/components/Icon/Icon.js +1 -1
- package/dist/components/Icon/index.js +1 -1
- package/dist/components/Inbox/InboxPage.js +1 -1
- package/dist/components/InboxSearch/InboxSearch.js +1 -1
- package/dist/components/Item/ItemLabel.js +1 -1
- package/dist/components/Item/ItemMedia.js +1 -1
- package/dist/components/Item/ItemSelect.js +1 -1
- package/dist/components/Item/index.js +1 -1
- package/dist/components/Layout/Layout.js +1 -1
- package/dist/components/List/List.js +1 -1
- package/dist/components/List/ListBase.js +1 -1
- package/dist/components/List/ListItemHeader.js +1 -1
- package/dist/components/List/ListItemIcon.js +1 -1
- package/dist/components/List/ListItemLabel.js +1 -1
- package/dist/components/Menu/Menu.js +1 -1
- package/dist/components/Menu/MenuItem.js +1 -1
- package/dist/components/Menu/MenuItems.js +1 -1
- package/dist/components/Menu/MenuListGroup.js +16 -5
- package/dist/components/Menu/MenuListHeading.js +4 -4
- package/dist/components/Menu/MenuListSearch.js +1 -1
- package/dist/components/Menu/MenuOption.js +1 -1
- package/dist/components/Menu/TabMenu.js +1 -1
- package/dist/components/Menu/VirtualizedMenuItems.js +1 -1
- package/dist/components/Menu/index.js +1 -1
- package/dist/components/Menu/useMenuSearch.js +1 -1
- package/dist/components/Metadata/MetaItem.js +1 -1
- package/dist/components/Metadata/MetaItemIcon.js +1 -1
- package/dist/components/Metadata/MetaTimestamp.js +1 -1
- package/dist/components/Metadata/Metadata.js +1 -1
- package/dist/components/Metadata/index.js +1 -1
- package/dist/components/Modal/Modal.js +1 -1
- package/dist/components/Modal/ModalBase.js +1 -1
- package/dist/components/Modal/ModalHeader.js +1 -1
- package/dist/components/Modal/ModalIcon.js +1 -1
- package/dist/components/Notifications/NotificationItem.js +1 -1
- package/dist/components/Notifications/NotificationItemBase.js +1 -1
- package/dist/components/Notifications/NotificationItemControls.js +1 -1
- package/dist/components/Notifications/NotificationItemIcon.js +1 -1
- package/dist/components/Page/AccordionSection.js +1 -1
- package/dist/components/Page/ContactButtons.js +1 -1
- package/dist/components/Page/ContactSection.js +1 -1
- package/dist/components/Page/PageMenu.js +1 -1
- package/dist/components/Page/PageNav.js +1 -1
- package/dist/components/Page/Section.js +1 -1
- package/dist/components/Pagination/Pagination.js +1 -1
- package/dist/components/ResourceListItem/ResourceListItem.js +1 -1
- package/dist/components/RootProvider/RootProvider.js +1 -1
- package/dist/components/RootProvider/index.js +1 -1
- package/dist/components/Search/SearchItem.js +1 -1
- package/dist/components/Searchbar/Autocomplete.js +1 -1
- package/dist/components/Searchbar/AutocompleteItem.js +1 -1
- package/dist/components/Searchbar/Searchbar.js +1 -1
- package/dist/components/Searchbar/SearchbarField.js +1 -1
- package/dist/components/Settings/SettingsItem.js +1 -1
- package/dist/components/Settings/SettingsItemBase.js +1 -1
- package/dist/components/Settings/SettingsList.js +1 -1
- package/dist/components/Settings/SettingsListVirtual.js +1 -1
- package/dist/components/Settings/SettingsModal.js +1 -1
- package/dist/components/Settings/SettingsSection.js +1 -1
- package/dist/components/Settings/UsedByLog.js +1 -1
- package/dist/components/Settings/UsedByLogItem.js +1 -1
- package/dist/components/Snackbar/SnackbarItem.js +1 -1
- package/dist/components/Timeline/Timeline.js +1 -1
- package/dist/components/Timeline/TimelineActivity.js +1 -1
- package/dist/components/Timeline/TimelineBase.js +1 -1
- package/dist/components/Timeline/TimelineFooter.js +1 -1
- package/dist/components/Timeline/TimelineHeader.js +1 -1
- package/dist/components/Timeline/TimelineIcon.js +1 -1
- package/dist/components/Timeline/TimelineSection.js +1 -1
- package/dist/components/Timeline/TimelineSegment.js +1 -1
- package/dist/components/Toolbar/DatepickerFilter.js +45 -25
- package/dist/components/Toolbar/SelectDateFilter.js +1 -1
- package/dist/components/Toolbar/Toolbar.js +1 -1
- package/dist/components/Toolbar/ToolbarFilter.js +1 -1
- package/dist/components/Toolbar/ToolbarFilterAddMenu.js +1 -1
- package/dist/components/Toolbar/ToolbarFilterButton.js +37 -22
- package/dist/components/Toolbar/ToolbarFilterMenu.js +102 -92
- package/dist/components/Toolbar/ToolbarMenu.js +1 -1
- package/dist/components/Toolbar/ToolbarSearch.js +1 -1
- package/dist/components/Toolbar/index.js +1 -1
- package/dist/components/Toolbar/useFilter.js +8 -8
- package/dist/components/Transmission/Transmission.js +44 -43
- package/dist/components/Transmission/TransmissionList.js +1 -1
- package/dist/components/Transmission/TransmissionType.js +1 -1
- package/dist/components/Typography/Heading.js +1 -1
- package/dist/components/Typography/index.js +1 -1
- package/dist/components/UserListItem/UserListItem.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/hooks/useAccountSelector.js +1 -1
- package/dist/hooks/useMenu.js +35 -35
- package/dist/index.js +1 -1
- package/dist/types/lib/components/Datepicker/DatepickerAccessibility.stories.d.ts +15 -0
- package/dist/types/lib/components/Datepicker/DatepickerHeader.d.ts +3 -1
- package/dist/types/lib/components/Datepicker/DatepickerTable.d.ts +10 -1
- package/dist/types/lib/components/Menu/MenuAccessibility.stories.d.ts +16 -0
- package/dist/types/lib/components/Menu/MenuCombobox.stories.d.ts +11 -0
- package/dist/types/lib/components/Menu/MenuItem.d.ts +1 -1
- package/dist/types/lib/components/Menu/MenuKeyboardNav.stories.d.ts +11 -0
- package/dist/types/lib/components/Menu/MenuListGroup.d.ts +2 -1
- package/dist/types/lib/components/Menu/MenuListHeading.d.ts +1 -1
- package/dist/types/lib/components/Toolbar/ToolbarFilter.stories.d.ts +1 -0
- package/dist/types/lib/components/Toolbar/ToolbarFilterA11y.stories.d.ts +18 -0
- package/dist/types/lib/components/Toolbar/ToolbarFilterButton.d.ts +1 -1
- package/dist/types/lib/components/Toolbar/useFilter.d.ts +1 -1
- package/package.json +1 -1
- package/dist/ToolbarSearch-DyVcALSw.js +0 -2045
|
@@ -1,145 +1,155 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useRef as
|
|
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
|
|
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
|
|
12
|
-
const
|
|
13
|
-
as:
|
|
14
|
-
disabled:
|
|
15
|
-
size:
|
|
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:
|
|
18
|
+
searchable: s,
|
|
19
19
|
groups: b,
|
|
20
|
-
items:
|
|
21
|
-
removable:
|
|
22
|
-
removeLabel:
|
|
20
|
+
items: w,
|
|
21
|
+
removable: N,
|
|
22
|
+
removeLabel: y = "Fjern filter",
|
|
23
23
|
filterState: c,
|
|
24
|
-
onFilterStateChange:
|
|
24
|
+
onFilterStateChange: h,
|
|
25
25
|
onFilterChange: V,
|
|
26
|
-
onRemove:
|
|
27
|
-
open:
|
|
28
|
-
onToggle:
|
|
29
|
-
onClose:
|
|
30
|
-
submitLabel:
|
|
31
|
-
search:
|
|
32
|
-
virtualized:
|
|
33
|
-
title:
|
|
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:
|
|
36
|
-
dropdownSize:
|
|
35
|
+
variant: l,
|
|
36
|
+
dropdownSize: P = "sm"
|
|
37
37
|
}) => {
|
|
38
|
-
const
|
|
39
|
-
|
|
40
|
-
const r =
|
|
41
|
-
|
|
42
|
-
}, [
|
|
43
|
-
const
|
|
44
|
-
const
|
|
45
|
-
V?.(
|
|
46
|
-
},
|
|
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
|
-
|
|
49
|
-
})),
|
|
50
|
-
|
|
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
|
-
|
|
52
|
+
f?.filter((g) => g.checked)?.length === 0 && !r && x?.();
|
|
53
53
|
};
|
|
54
|
-
return
|
|
55
|
-
|
|
54
|
+
return B ? /* @__PURE__ */ i(
|
|
55
|
+
k,
|
|
56
56
|
{
|
|
57
57
|
disabled: !0,
|
|
58
58
|
name: o,
|
|
59
59
|
removable: !0,
|
|
60
|
-
variant:
|
|
61
|
-
removeLabel:
|
|
62
|
-
open:
|
|
60
|
+
variant: l || v,
|
|
61
|
+
removeLabel: y,
|
|
62
|
+
open: e,
|
|
63
63
|
htmlTitle: m,
|
|
64
64
|
children: d
|
|
65
65
|
}
|
|
66
|
-
) :
|
|
67
|
-
|
|
66
|
+
) : N ? /* @__PURE__ */ i(
|
|
67
|
+
O,
|
|
68
68
|
{
|
|
69
|
-
submitLabel:
|
|
70
|
-
title:
|
|
69
|
+
submitLabel: M,
|
|
70
|
+
title: F,
|
|
71
71
|
variant: "drawer-dropdown",
|
|
72
|
-
size:
|
|
73
|
-
trigger: /* @__PURE__ */
|
|
74
|
-
|
|
72
|
+
size: P,
|
|
73
|
+
trigger: /* @__PURE__ */ i(
|
|
74
|
+
k,
|
|
75
75
|
{
|
|
76
76
|
name: o,
|
|
77
|
-
onClick:
|
|
78
|
-
onRemove:
|
|
77
|
+
onClick: A,
|
|
78
|
+
onRemove: x,
|
|
79
79
|
removable: !0,
|
|
80
|
-
variant:
|
|
81
|
-
removeLabel:
|
|
82
|
-
open:
|
|
80
|
+
variant: l || v,
|
|
81
|
+
removeLabel: y,
|
|
82
|
+
open: e,
|
|
83
|
+
menuId: D,
|
|
83
84
|
htmlTitle: m,
|
|
84
|
-
|
|
85
|
-
"aria-controls": e.menuId,
|
|
86
|
-
ref: e.triggerRef,
|
|
85
|
+
ref: t.triggerRef,
|
|
87
86
|
children: d
|
|
88
87
|
}
|
|
89
88
|
),
|
|
90
|
-
open:
|
|
91
|
-
onClose:
|
|
92
|
-
...
|
|
93
|
-
children: /* @__PURE__ */
|
|
94
|
-
|
|
89
|
+
open: e,
|
|
90
|
+
onClose: q,
|
|
91
|
+
...t.dropdownA11yProps,
|
|
92
|
+
children: /* @__PURE__ */ i(
|
|
93
|
+
j,
|
|
95
94
|
{
|
|
96
|
-
open:
|
|
97
|
-
search:
|
|
95
|
+
open: e,
|
|
96
|
+
search: R,
|
|
98
97
|
name: o,
|
|
99
98
|
filterState: c,
|
|
100
|
-
onFilterStateChange:
|
|
101
|
-
size:
|
|
102
|
-
searchable:
|
|
99
|
+
onFilterStateChange: h,
|
|
100
|
+
size: I,
|
|
101
|
+
searchable: s,
|
|
103
102
|
groups: b,
|
|
104
|
-
items:
|
|
105
|
-
keyboardEvents:
|
|
106
|
-
a11yMode:
|
|
107
|
-
...
|
|
108
|
-
virtualized:
|
|
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__ */
|
|
113
|
-
|
|
111
|
+
) : /* @__PURE__ */ i(
|
|
112
|
+
O,
|
|
114
113
|
{
|
|
115
|
-
size:
|
|
116
|
-
title:
|
|
114
|
+
size: P,
|
|
115
|
+
title: F,
|
|
117
116
|
variant: "drawer-dropdown",
|
|
118
|
-
submitLabel:
|
|
119
|
-
trigger: /* @__PURE__ */
|
|
120
|
-
|
|
121
|
-
onClose: a,
|
|
122
|
-
...e.dropdownA11yProps,
|
|
123
|
-
children: /* @__PURE__ */ n(
|
|
124
|
-
E,
|
|
117
|
+
submitLabel: M,
|
|
118
|
+
trigger: /* @__PURE__ */ i(
|
|
119
|
+
k,
|
|
125
120
|
{
|
|
126
|
-
|
|
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:
|
|
130
|
-
size:
|
|
131
|
-
searchable:
|
|
139
|
+
onFilterStateChange: h,
|
|
140
|
+
size: I,
|
|
141
|
+
searchable: s,
|
|
132
142
|
groups: b,
|
|
133
|
-
items:
|
|
134
|
-
keyboardEvents:
|
|
135
|
-
a11yMode:
|
|
136
|
-
...
|
|
137
|
-
virtualized:
|
|
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
|
-
|
|
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-
|
|
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-
|
|
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-
|
|
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,
|
|
4
|
-
const i =
|
|
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,
|
|
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
|
-
|
|
26
|
+
r(e === "radio" ? {
|
|
27
27
|
...i,
|
|
28
28
|
[t]: l
|
|
29
29
|
} : {
|
|
30
30
|
...i,
|
|
31
|
-
[t]: i[t] ? i[t].some((
|
|
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)),
|
|
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]),
|
|
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
|
|
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
|
|
3
|
-
import { useState as
|
|
4
|
-
import { B as v } from "../../ToolbarSearch-
|
|
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
|
|
12
|
+
import { SeenByLog as A } from "../Dialog/SeenByLog.js";
|
|
13
13
|
import "../GlobalMenu/GlobalMenuBase.js";
|
|
14
|
-
import { ListItem as
|
|
14
|
+
import { ListItem as S } from "../List/ListItem.js";
|
|
15
15
|
import "../Snackbar/useSnackbar.js";
|
|
16
|
-
import { Section as
|
|
17
|
-
import { TransmissionType as
|
|
18
|
-
import '../../assets/Transmission.css';const
|
|
19
|
-
title:
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
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:
|
|
25
|
-
title:
|
|
26
|
-
createdAt:
|
|
27
|
-
createdAtLabel:
|
|
28
|
-
badge:
|
|
29
|
-
sender:
|
|
30
|
-
summary:
|
|
31
|
-
attachments:
|
|
32
|
-
children:
|
|
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
|
-
...
|
|
35
|
+
...c
|
|
35
36
|
}) => {
|
|
36
|
-
const [e, u] =
|
|
37
|
+
const [e, u] = _(c.expanded || !1);
|
|
37
38
|
return /* @__PURE__ */ t(
|
|
38
|
-
|
|
39
|
+
S,
|
|
39
40
|
{
|
|
40
|
-
...
|
|
41
|
-
icon:
|
|
42
|
-
badge:
|
|
41
|
+
...c,
|
|
42
|
+
icon: h,
|
|
43
|
+
badge: o && /* @__PURE__ */ t(k, { value: o?.value, label: o?.label }),
|
|
43
44
|
size: d,
|
|
44
|
-
variant:
|
|
45
|
+
variant: i ? "subtle" : "default",
|
|
45
46
|
border: e ? "none" : "solid",
|
|
46
47
|
shadow: "none",
|
|
47
|
-
color:
|
|
48
|
+
color: f,
|
|
48
49
|
title: {
|
|
49
50
|
as: "span",
|
|
50
|
-
className:
|
|
51
|
-
children: /* @__PURE__ */
|
|
52
|
-
/* @__PURE__ */ t("h2", { children:
|
|
53
|
-
|
|
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:
|
|
56
|
+
weight: i ? "bold" : "normal"
|
|
56
57
|
},
|
|
57
58
|
expanded: e,
|
|
58
59
|
selected: e,
|
|
59
|
-
onClick: () => u((
|
|
60
|
+
onClick: () => u((x) => !x),
|
|
60
61
|
collapsible: !0,
|
|
61
62
|
linkIcon: !0,
|
|
62
63
|
as: "button",
|
|
63
|
-
ariaLabel:
|
|
64
|
-
children: /* @__PURE__ */
|
|
65
|
-
/* @__PURE__ */
|
|
66
|
-
|
|
67
|
-
e ? typeof
|
|
68
|
-
|
|
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(
|
|
71
|
+
m && /* @__PURE__ */ t(A, { ...m })
|
|
71
72
|
] })
|
|
72
73
|
}
|
|
73
74
|
);
|
|
74
75
|
};
|
|
75
76
|
export {
|
|
76
|
-
|
|
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-
|
|
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";
|
|
@@ -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-
|
|
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";
|
package/dist/components/index.js
CHANGED
|
@@ -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-
|
|
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-
|
|
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";
|
package/dist/hooks/useMenu.js
CHANGED
|
@@ -1,66 +1,66 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { useState as
|
|
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:
|
|
6
|
-
groups:
|
|
7
|
-
groupByKey:
|
|
8
|
-
keyboardEvents:
|
|
9
|
-
autoActivateFirstItem:
|
|
10
|
-
sortGroupBy:
|
|
11
|
-
onSelect:
|
|
12
|
-
ref:
|
|
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 [
|
|
14
|
+
const [o, r] = M(-1);
|
|
15
15
|
D((e) => {
|
|
16
|
-
if (
|
|
17
|
-
const n = (
|
|
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 }))),
|
|
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
|
|
23
|
+
const c = a(() => d.reduce(
|
|
24
24
|
(e, t) => {
|
|
25
|
-
const n =
|
|
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
|
-
), [
|
|
30
|
-
() => Object.values(
|
|
31
|
-
[
|
|
32
|
-
), w =
|
|
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 <
|
|
35
|
-
e.set(
|
|
34
|
+
for (let t = 0; t < u.length; t++)
|
|
35
|
+
e.set(u[t], t);
|
|
36
36
|
return e;
|
|
37
|
-
}, [
|
|
37
|
+
}, [u]), I = a(() => Object.entries(c).sort(v || (() => 0)).map(([e, t]) => ({
|
|
38
38
|
items: t.map((n) => {
|
|
39
|
-
const
|
|
39
|
+
const l = w.get(n) ?? -1;
|
|
40
40
|
return {
|
|
41
|
-
menuIndex:
|
|
42
|
-
active:
|
|
43
|
-
onMouseEnter:
|
|
44
|
-
r(
|
|
41
|
+
menuIndex: l,
|
|
42
|
+
active: o === l,
|
|
43
|
+
onMouseEnter: s ? () => {
|
|
44
|
+
r(l);
|
|
45
45
|
} : void 0,
|
|
46
|
-
onMouseLeave:
|
|
46
|
+
onMouseLeave: s ? () => {
|
|
47
47
|
r(-1);
|
|
48
48
|
} : void 0,
|
|
49
49
|
props: n
|
|
50
50
|
};
|
|
51
51
|
}),
|
|
52
52
|
props: {
|
|
53
|
-
...
|
|
53
|
+
...p[e] || {}
|
|
54
54
|
}
|
|
55
|
-
})), [
|
|
55
|
+
})), [c, w, o, s, v, p]), m = k(
|
|
56
56
|
(e) => {
|
|
57
|
-
e.key === "ArrowDown" ? (e.preventDefault(), r((t) => (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
|
-
[
|
|
59
|
+
[u.length]
|
|
60
60
|
);
|
|
61
|
-
return A(() => (
|
|
62
|
-
document.removeEventListener("keydown",
|
|
63
|
-
}), [
|
|
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-
|
|
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
|
+
};
|