@altinn/altinn-components 0.56.8 → 0.56.10
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/{SearchField-xsZAikgq.js → SearchField-CYYz0JvC.js} +92 -91
- package/dist/assets/AccountListVirtual.css +1 -1
- package/dist/assets/DatepickerFilter.css +1 -0
- package/dist/assets/FooterBase.css +1 -1
- package/dist/assets/GlobalHeaderBase.css +1 -1
- package/dist/assets/LayoutBody.css +1 -1
- package/dist/assets/LayoutContent.css +1 -1
- package/dist/assets/LayoutGrid.css +1 -0
- package/dist/assets/LayoutSidebar.css +1 -1
- package/dist/assets/SearchField.css +1 -1
- package/dist/components/AccessAreaListItem/AccessAreaListItem.js +15 -14
- package/dist/components/AccessPackageListItem/AccessPackageListItem.js +9 -8
- package/dist/components/Account/AccountList.js +8 -7
- package/dist/components/Account/AccountListItem.js +7 -6
- package/dist/components/Account/AccountListItemControls.js +7 -6
- package/dist/components/Account/AccountListItemDetails.js +3 -2
- package/dist/components/Account/AccountListVirtual.js +16 -15
- package/dist/components/Account/AccountMenu.js +8 -7
- package/dist/components/Account/AccountMenuButton.js +3 -2
- package/dist/components/Account/AccountNotificationSettings.js +8 -7
- package/dist/components/Account/AccountOrganization.js +14 -13
- package/dist/components/ActivityLog/ActivityLog.js +7 -6
- package/dist/components/ActivityLog/ActivityLogItem.js +3 -2
- package/dist/components/ActivityLog/ActivityLogSegment.js +3 -2
- package/dist/components/Article/Article.js +3 -2
- package/dist/components/Article/ArticleContact.js +3 -2
- package/dist/components/Article/ArticleHeader.js +7 -6
- package/dist/components/Banner/Banner.js +7 -6
- package/dist/components/{Page → Breadcrumbs}/Breadcrumbs.js +4 -3
- package/dist/components/Breadcrumbs/index.js +6 -0
- package/dist/components/Button/ButtonIcon.js +3 -2
- package/dist/components/Button/ComboButton.js +3 -2
- package/dist/components/Button/FloatingActionButton.js +7 -6
- package/dist/components/Button/IconButton.js +5 -4
- package/dist/components/Byline/Byline.js +9 -8
- package/dist/components/ContextMenu/ContextMenu.js +10 -9
- package/dist/components/Dashboard/DashboardCard.js +9 -8
- package/dist/components/Dashboard/DashboardHeader.js +5 -4
- package/dist/components/Datepicker/DatepickerHeader.js +3 -2
- package/dist/components/Datepicker/DatepickerTable.js +12 -11
- package/dist/components/Dialog/Dialog.js +3 -2
- package/dist/components/Dialog/DialogActions.js +4 -3
- package/dist/components/Dialog/DialogActivityLog.js +3 -2
- package/dist/components/Dialog/DialogAttachments.js +3 -2
- package/dist/components/Dialog/DialogBody.js +3 -2
- package/dist/components/Dialog/DialogByline.js +9 -8
- package/dist/components/Dialog/DialogContact.js +3 -2
- package/dist/components/Dialog/DialogHeader.js +3 -2
- package/dist/components/Dialog/DialogHistory.js +6 -5
- package/dist/components/Dialog/DialogHistoryItem.js +3 -2
- package/dist/components/Dialog/DialogHistorySegment.js +3 -2
- package/dist/components/Dialog/DialogLayout.js +4 -3
- package/dist/components/Dialog/DialogList.js +3 -2
- package/dist/components/Dialog/DialogListGroup.js +3 -2
- package/dist/components/Dialog/DialogListItem.js +27 -26
- package/dist/components/Dialog/DialogMetadata.js +3 -2
- package/dist/components/Dialog/DialogSection.js +3 -2
- package/dist/components/Dialog/DialogSeenBy.js +7 -6
- package/dist/components/Dialog/DialogSelect.js +9 -8
- package/dist/components/Dialog/DialogStatus.js +3 -2
- package/dist/components/Dialog/DialogTabs.js +3 -2
- package/dist/components/Dialog/SeenByLog.js +3 -2
- package/dist/components/Dialog/SeenByLogButton.js +9 -8
- package/dist/components/Dialog/SeenByLogItem.js +8 -7
- package/dist/components/Dropdown/DrawerButton.js +4 -3
- package/dist/components/Dropdown/DrawerHeader.js +7 -6
- package/dist/components/Dropdown/DrawerOrDropdown.js +3 -2
- package/dist/components/Dropdown/Dropdown.js +132 -118
- package/dist/components/Dropdown/DropdownBase.js +7 -6
- package/dist/components/Dropdown/FloatingDropdown.js +3 -2
- package/dist/components/Footer/FooterBase.js +7 -7
- package/dist/components/Forms/Checkbox.js +3 -2
- package/dist/components/Forms/CheckboxOptions.js +3 -2
- package/dist/components/Forms/FieldBase.js +3 -2
- package/dist/components/Forms/FieldsetBase.js +6 -5
- package/dist/components/Forms/Radio.js +3 -2
- package/dist/components/Forms/RadioOptions.js +3 -2
- package/dist/components/Forms/SearchField.js +3 -2
- package/dist/components/Forms/SelectField.js +5 -4
- package/dist/components/Forms/Switch.js +3 -2
- package/dist/components/Forms/SwitchOptions.js +3 -2
- package/dist/components/Forms/TextField.js +3 -2
- package/dist/components/Forms/TextFieldDropdown.js +13 -12
- package/dist/components/Forms/TextareaField.js +3 -2
- package/dist/components/Forms/index.js +1 -1
- package/dist/components/GlobalHeader/AccountSelector.js +4 -3
- package/dist/components/GlobalHeader/GlobalHeader.js +11 -10
- package/dist/components/GlobalHeader/GlobalHeaderBase.js +8 -7
- package/dist/components/GlobalHeader/GlobalSearch.js +3 -2
- package/dist/components/GlobalHeader/GlobalSearchButton.js +9 -8
- package/dist/components/GlobalMenu/GlobalMenu.js +10 -9
- package/dist/components/GlobalMenu/GlobalMenuButton.js +9 -8
- package/dist/components/GlobalMenu/LocaleSwitcher.js +9 -8
- package/dist/components/GlobalMenu/LogoutButton.js +6 -5
- package/dist/components/GlobalMenu_old/BackButton.js +3 -2
- package/dist/components/GlobalMenu_old/CurrentAccount.js +3 -2
- package/dist/components/GlobalMenu_old/GlobalMenu.js +10 -9
- package/dist/components/GlobalMenu_old/GlobalMenuButton.js +11 -10
- package/dist/components/GlobalMenu_old/LogoutButton.js +6 -5
- package/dist/components/Header/Header.js +10 -9
- package/dist/components/Header/HeaderBase.js +5 -4
- package/dist/components/Header/HeaderButton.js +13 -12
- package/dist/components/Header/LocaleButton.js +7 -6
- package/dist/components/Header/LocaleSwitcher.js +4 -3
- package/dist/components/Icon/Icon.js +13 -12
- package/dist/components/InboxSearch/InboxSearch.js +10 -9
- package/dist/components/Item/ItemMedia.js +3 -2
- package/dist/components/Layout/Layout.js +45 -33
- package/dist/components/Layout/LayoutBody.js +5 -5
- package/dist/components/Layout/LayoutContent.js +1 -1
- package/dist/components/Layout/LayoutGrid.js +7 -0
- package/dist/components/Layout/LayoutSidebar.js +4 -4
- package/dist/components/Layout/index.js +12 -10
- package/dist/components/LayoutAction/ActionHeader.js +10 -9
- package/dist/components/LayoutAction/LayoutAction.js +3 -2
- package/dist/components/List/List.js +5 -4
- package/dist/components/List/ListBase.js +3 -2
- package/dist/components/List/ListItemHeader.js +22 -21
- package/dist/components/List/ListItemIcon.js +3 -2
- package/dist/components/List/ListItemLabel.js +11 -10
- package/dist/components/List/ListItemSelect.js +9 -8
- package/dist/components/Menu/Menu.js +1 -1
- package/dist/components/Menu/MenuItem.js +3 -2
- package/dist/components/Menu/MenuItems.js +3 -2
- package/dist/components/Menu/MenuListSearch.js +3 -2
- package/dist/components/Menu/TabMenu.js +7 -6
- package/dist/components/Menu/VirtualizedMenuItems.js +3 -2
- package/dist/components/Menu/index.js +1 -1
- package/dist/components/Metadata/MetaItem.js +3 -2
- package/dist/components/Metadata/MetaItemIcon.js +3 -2
- package/dist/components/Metadata/MetaProgress.js +3 -2
- package/dist/components/Metadata/MetaTimestamp.js +3 -2
- package/dist/components/Metadata/Metadata.js +3 -2
- package/dist/components/Modal/Modal.js +7 -6
- package/dist/components/Modal/ModalBase.js +9 -8
- package/dist/components/Modal/ModalFooter.js +3 -2
- package/dist/components/Modal/ModalHeader.js +7 -6
- package/dist/components/Modal/ModalIcon.js +3 -2
- package/dist/components/Notifications/NotificationItem.js +3 -2
- package/dist/components/Notifications/NotificationItemBase.js +7 -6
- package/dist/components/Notifications/NotificationItemControls.js +7 -6
- package/dist/components/Notifications/NotificationItemIcon.js +7 -6
- package/dist/components/Page/AccordionSection.js +3 -2
- package/dist/components/Page/ContactButtons.js +3 -2
- package/dist/components/Page/ContactSection.js +10 -9
- package/dist/components/Page/PageMenu.js +6 -5
- package/dist/components/Page/PageNav.js +7 -6
- package/dist/components/Page/Section.js +9 -8
- package/dist/components/Page/index.js +18 -22
- package/dist/components/ResourceListItem/ResourceListItem.js +7 -6
- package/dist/components/RootProvider/RootProvider.js +5 -4
- package/dist/components/Search/SearchItem.js +5 -4
- package/dist/components/Searchbar/Autocomplete.js +3 -2
- package/dist/components/Searchbar/AutocompleteItem.js +5 -4
- package/dist/components/Searchbar/Searchbar.js +3 -2
- package/dist/components/Searchbar/SearchbarField.js +7 -6
- package/dist/components/Settings/BookmarksSettingsItem.js +3 -2
- package/dist/components/Settings/BookmarksSettingsList.js +7 -6
- package/dist/components/Settings/SettingsItem.js +7 -6
- package/dist/components/Settings/SettingsItemBase.js +12 -11
- package/dist/components/Settings/SettingsList.js +3 -2
- package/dist/components/Settings/SettingsModal.js +3 -2
- package/dist/components/Settings/SettingsSection.js +10 -9
- package/dist/components/Settings/UsedByLog.js +3 -2
- package/dist/components/Settings/UsedByLogItem.js +8 -7
- package/dist/components/Snackbar/SnackbarItem.js +3 -2
- package/dist/components/Timeline/Timeline.js +3 -2
- package/dist/components/Timeline/TimelineActivity.js +3 -2
- package/dist/components/Timeline/TimelineBase.js +3 -2
- package/dist/components/Timeline/TimelineFooter.js +6 -5
- package/dist/components/Timeline/TimelineHeader.js +3 -2
- package/dist/components/Timeline/TimelineIcon.js +4 -3
- package/dist/components/Timeline/TimelineSection.js +3 -2
- package/dist/components/Timeline/TimelineSegment.js +3 -2
- package/dist/components/Toolbar/DatepickerFilter.js +58 -57
- package/dist/components/Toolbar/SelectDateFilter.js +50 -34
- package/dist/components/Toolbar/Toolbar.js +3 -2
- package/dist/components/Toolbar/ToolbarFilter.js +13 -12
- package/dist/components/Toolbar/ToolbarFilterAddMenu.js +1 -1
- package/dist/components/Toolbar/ToolbarFilterButton.js +3 -2
- package/dist/components/Toolbar/ToolbarFilterMenu.js +83 -78
- package/dist/components/Toolbar/ToolbarMenu.js +1 -1
- package/dist/components/Toolbar/ToolbarSearch.js +4 -3
- package/dist/components/Transmission/Transmission.js +16 -15
- package/dist/components/Transmission/TransmissionList.js +3 -2
- package/dist/components/Transmission/TransmissionType.js +1 -0
- package/dist/components/Typography/Heading.js +7 -6
- package/dist/components/UserListItem/UserListItem.js +6 -5
- package/dist/components/index.js +443 -441
- package/dist/hooks/useAccountSelector.js +3 -2
- package/dist/index.js +455 -453
- package/dist/types/lib/components/Account/AccountListItem.stories.d.ts +9 -9
- package/dist/types/lib/components/Avatar/Avatar.stories.d.ts +1 -1
- package/dist/types/lib/components/Breadcrumbs/index.d.ts +2 -0
- package/dist/types/lib/components/Button/Button.stories.d.ts +2 -2
- package/dist/types/lib/components/Dialog/SeenByLogItem.stories.d.ts +1 -1
- package/dist/types/lib/components/Dropdown/Dropdown.d.ts +2 -1
- package/dist/types/lib/components/Dropdown/Dropdown.stories.d.ts +1 -1
- package/dist/types/lib/components/Layout/Layout.d.ts +3 -1
- package/dist/types/lib/components/Layout/Layout.stories.d.ts +2 -1
- package/dist/types/lib/components/Layout/LayoutGrid.d.ts +13 -0
- package/dist/types/lib/components/Layout/index.d.ts +1 -0
- package/dist/types/lib/components/List/Specimens.stories.d.ts +1 -1
- package/dist/types/lib/components/Menu/Menu.stories.d.ts +4 -4
- package/dist/types/lib/components/Menu/useDropdownMenuController.d.ts +6 -6
- package/dist/types/lib/components/Page/index.d.ts +0 -2
- package/dist/types/lib/components/Settings/SettingsItem.stories.d.ts +9 -9
- package/dist/types/lib/components/Skeleton/Skeleton.d.ts +1 -1
- package/dist/types/lib/components/Toolbar/SelectDateFilter.d.ts +1 -0
- package/dist/types/lib/components/Toolbar/Toolbar.stories.d.ts +2 -2
- package/dist/types/lib/components/Toolbar/ToolbarSearch.stories.d.ts +348 -348
- package/dist/types/lib/components/Toolbar/example.hooks.d.ts +1 -1
- package/dist/types/lib/components/Toolbar/useFilter.d.ts +8 -8
- package/dist/types/lib/components/Transmission/Transmission.stories.d.ts +10 -10
- package/dist/types/lib/components/index.d.ts +1 -0
- package/dist/types/lib/stories/Dialog/Dialog.stories.d.ts +1 -1
- package/package.json +1 -1
- /package/dist/components/{Page → Breadcrumbs}/BreadcrumbsLink.js +0 -0
- /package/dist/types/lib/components/{Page → Breadcrumbs}/Breadcrumbs.d.ts +0 -0
- /package/dist/types/lib/components/{Page → Breadcrumbs}/Breadcrumbs.stories.d.ts +0 -0
- /package/dist/types/lib/components/{Page → Breadcrumbs}/BreadcrumbsLink.d.ts +0 -0
|
@@ -1,19 +1,20 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { c as
|
|
3
|
-
import { useRef as
|
|
4
|
-
import {
|
|
1
|
+
import { jsxs as x, jsx as a, Fragment as W } from "react/jsx-runtime";
|
|
2
|
+
import { c as M } from "../../index-p1eeF8LQ.js";
|
|
3
|
+
import { useRef as R, useEffect as D, useState as O, useCallback as $, useLayoutEffect as G } from "react";
|
|
4
|
+
import { createPortal as J } from "react-dom";
|
|
5
|
+
import { Button as H } from "../Button/Button.js";
|
|
5
6
|
import "../RootProvider/RootProvider.js";
|
|
6
7
|
import "../Snackbar/useSnackbar.js";
|
|
7
|
-
import { S as
|
|
8
|
-
import '../../assets/Dropdown.css';const
|
|
9
|
-
dropdown:
|
|
10
|
-
content:
|
|
11
|
-
backdrop:
|
|
12
|
-
header:
|
|
13
|
-
footer:
|
|
14
|
-
title:
|
|
15
|
-
},
|
|
16
|
-
const
|
|
8
|
+
import { S as Q } from "../../XMark-tKk6aExO.js";
|
|
9
|
+
import '../../assets/Dropdown.css';const V = "_dropdown_15prw_1", Z = "_content_15prw_17", P = "_backdrop_15prw_47", tt = "_header_15prw_72", et = "_footer_15prw_73", rt = "_title_15prw_146", m = {
|
|
10
|
+
dropdown: V,
|
|
11
|
+
content: Z,
|
|
12
|
+
backdrop: P,
|
|
13
|
+
header: tt,
|
|
14
|
+
footer: et,
|
|
15
|
+
title: rt
|
|
16
|
+
}, nt = "data-focus-guard", z = (h) => {
|
|
17
|
+
const v = [
|
|
17
18
|
"a[href]",
|
|
18
19
|
"button:not([disabled])",
|
|
19
20
|
"input:not([disabled])",
|
|
@@ -22,139 +23,152 @@ import '../../assets/Dropdown.css';const P = "_dropdown_15prw_1", $ = "_content_
|
|
|
22
23
|
'[tabindex]:not([tabindex="-1"])',
|
|
23
24
|
'[contenteditable="true"]'
|
|
24
25
|
].join(",");
|
|
25
|
-
return Array.from(
|
|
26
|
-
const
|
|
27
|
-
return
|
|
26
|
+
return Array.from(h.querySelectorAll(v)).filter((c) => !c.hasAttribute(nt)).filter((c) => !c.hasAttribute("disabled")).filter((c) => c.getAttribute("aria-hidden") !== "true").filter((c) => c.tabIndex !== -1).filter((c) => {
|
|
27
|
+
const p = c.getClientRects();
|
|
28
|
+
return p.length > 0 && p[0].width > 0 && p[0].height > 0;
|
|
28
29
|
});
|
|
29
|
-
},
|
|
30
|
-
|
|
31
|
-
},
|
|
32
|
-
id:
|
|
33
|
-
size:
|
|
34
|
-
className:
|
|
35
|
-
backdrop:
|
|
36
|
-
placement:
|
|
37
|
-
variant:
|
|
38
|
-
title:
|
|
39
|
-
closeLabel:
|
|
40
|
-
submitLabel:
|
|
41
|
-
trigger:
|
|
42
|
-
children:
|
|
43
|
-
open:
|
|
44
|
-
onClose:
|
|
45
|
-
onSubmit:
|
|
46
|
-
activeDescendantId:
|
|
30
|
+
}, ot = (h) => {
|
|
31
|
+
z(h)[0]?.focus({ preventScroll: !0 });
|
|
32
|
+
}, ht = ({
|
|
33
|
+
id: h = "dropdown",
|
|
34
|
+
size: v = "sm",
|
|
35
|
+
className: c,
|
|
36
|
+
backdrop: p = !0,
|
|
37
|
+
placement: _ = "bottom-left",
|
|
38
|
+
variant: E = "dropdown",
|
|
39
|
+
title: C = "Title",
|
|
40
|
+
closeLabel: F = "Close",
|
|
41
|
+
submitLabel: k,
|
|
42
|
+
trigger: N,
|
|
43
|
+
children: B,
|
|
44
|
+
open: r,
|
|
45
|
+
onClose: w,
|
|
46
|
+
onSubmit: I,
|
|
47
|
+
activeDescendantId: T,
|
|
48
|
+
useFixedPosition: l = !1
|
|
47
49
|
}) => {
|
|
48
|
-
const
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
}, [
|
|
52
|
-
const [
|
|
53
|
-
yDir:
|
|
54
|
-
xDir:
|
|
50
|
+
const b = R(null), u = R(null), S = R(r);
|
|
51
|
+
D(() => {
|
|
52
|
+
S.current = r;
|
|
53
|
+
}, [r]);
|
|
54
|
+
const [n, X] = O({
|
|
55
|
+
yDir: _.includes("top") ? "top" : "bottom",
|
|
56
|
+
xDir: _.includes("right") ? "right" : "left",
|
|
55
57
|
maxHeight: 300
|
|
56
|
-
}),
|
|
57
|
-
if (
|
|
58
|
-
const t =
|
|
59
|
-
|
|
60
|
-
...
|
|
61
|
-
yDir:
|
|
62
|
-
maxHeight:
|
|
63
|
-
xDir:
|
|
58
|
+
}), f = $(() => {
|
|
59
|
+
if (r && b.current && u.current) {
|
|
60
|
+
const t = b.current.getBoundingClientRect(), s = u.current.getBoundingClientRect(), o = window.innerHeight, e = window.innerWidth, i = 16, d = o - t.bottom, g = t.top, y = e - t.right - s.width, A = d < 250 && g > d, j = A ? "top" : "bottom", q = (A ? g : d) - i, K = y < i ? "right" : "left";
|
|
61
|
+
X((U) => ({
|
|
62
|
+
...U,
|
|
63
|
+
yDir: j,
|
|
64
|
+
maxHeight: q,
|
|
65
|
+
xDir: K,
|
|
66
|
+
triggerRect: l ? t : void 0
|
|
64
67
|
}));
|
|
65
68
|
}
|
|
66
|
-
}, [
|
|
67
|
-
|
|
68
|
-
|
|
69
|
+
}, [r, l]);
|
|
70
|
+
G(() => (f(), window.addEventListener("resize", f), l && window.addEventListener("scroll", f, !0), () => {
|
|
71
|
+
window.removeEventListener("resize", f), l && window.removeEventListener("scroll", f, !0);
|
|
72
|
+
}), [f, l]), D(() => {
|
|
73
|
+
if (!r) return;
|
|
69
74
|
const t = requestAnimationFrame(() => {
|
|
70
|
-
const
|
|
71
|
-
if (!
|
|
72
|
-
const
|
|
75
|
+
const s = u.current;
|
|
76
|
+
if (!s) return;
|
|
77
|
+
const o = s.querySelector(
|
|
73
78
|
'input[type="search"]:not([disabled]), input[role="searchbox"]:not([disabled]), input[data-dropdown-search]:not([disabled])'
|
|
74
79
|
);
|
|
75
|
-
if (
|
|
76
|
-
const
|
|
77
|
-
|
|
80
|
+
if (o) {
|
|
81
|
+
const e = o.value.length;
|
|
82
|
+
o.focus({ preventScroll: !0 });
|
|
78
83
|
try {
|
|
79
|
-
|
|
84
|
+
o.setSelectionRange(e, e);
|
|
80
85
|
} catch {
|
|
81
86
|
}
|
|
82
87
|
return;
|
|
83
88
|
}
|
|
84
|
-
|
|
89
|
+
s.focus?.({ preventScroll: !0 });
|
|
85
90
|
});
|
|
86
91
|
return () => cancelAnimationFrame(t);
|
|
87
|
-
}, [
|
|
88
|
-
const t = (
|
|
89
|
-
|
|
90
|
-
},
|
|
91
|
-
|
|
92
|
+
}, [r]), D(() => {
|
|
93
|
+
const t = (o) => {
|
|
94
|
+
o.key === "Escape" && w();
|
|
95
|
+
}, s = (o) => {
|
|
96
|
+
const e = o.target, i = b.current?.contains(e), d = u.current?.contains(e);
|
|
97
|
+
!i && !d && w();
|
|
92
98
|
};
|
|
93
|
-
return
|
|
94
|
-
document.removeEventListener("mousedown",
|
|
99
|
+
return r && (document.addEventListener("mousedown", s), document.addEventListener("keydown", t)), () => {
|
|
100
|
+
document.removeEventListener("mousedown", s), document.removeEventListener("keydown", t);
|
|
95
101
|
};
|
|
96
|
-
}, [
|
|
97
|
-
if (!
|
|
98
|
-
const t =
|
|
102
|
+
}, [r, w]), D(() => {
|
|
103
|
+
if (!r) return;
|
|
104
|
+
const t = u.current;
|
|
99
105
|
if (!t) return;
|
|
100
|
-
const
|
|
101
|
-
if (!
|
|
106
|
+
const s = (e) => {
|
|
107
|
+
if (!S.current)
|
|
102
108
|
return;
|
|
103
|
-
const
|
|
104
|
-
|
|
105
|
-
},
|
|
106
|
-
if (
|
|
107
|
-
const
|
|
108
|
-
if (
|
|
109
|
-
|
|
109
|
+
const i = e.target;
|
|
110
|
+
i && !t.contains(i) && ot(t);
|
|
111
|
+
}, o = (e) => {
|
|
112
|
+
if (e.key !== "Tab") return;
|
|
113
|
+
const i = z(t);
|
|
114
|
+
if (i.length === 0) {
|
|
115
|
+
e.preventDefault(), t.focus?.({ preventScroll: !0 });
|
|
110
116
|
return;
|
|
111
117
|
}
|
|
112
|
-
const d =
|
|
113
|
-
|
|
118
|
+
const d = i[0], g = i[i.length - 1], y = document.activeElement;
|
|
119
|
+
e.shiftKey ? y === d && (e.preventDefault(), g.focus({ preventScroll: !0 })) : y === g && (e.preventDefault(), d.focus({ preventScroll: !0 }));
|
|
114
120
|
};
|
|
115
|
-
return document.addEventListener("focusin",
|
|
116
|
-
document.removeEventListener("focusin",
|
|
121
|
+
return document.addEventListener("focusin", s), document.addEventListener("keydown", o), () => {
|
|
122
|
+
document.removeEventListener("focusin", s), document.removeEventListener("keydown", o);
|
|
117
123
|
};
|
|
118
|
-
}, [
|
|
119
|
-
const
|
|
124
|
+
}, [r]);
|
|
125
|
+
const Y = l && n.triggerRect ? {
|
|
126
|
+
position: "fixed",
|
|
127
|
+
zIndex: 1e3,
|
|
128
|
+
width: "max-content",
|
|
129
|
+
maxHeight: `${n.maxHeight}px`,
|
|
130
|
+
overflowY: "auto",
|
|
131
|
+
[n.xDir === "left" ? "left" : "right"]: n.xDir === "left" ? n.triggerRect.left : window.innerWidth - n.triggerRect.right,
|
|
132
|
+
[n.yDir === "bottom" ? "top" : "bottom"]: n.yDir === "bottom" ? n.triggerRect.bottom + 8 : window.innerHeight - n.triggerRect.top + 8
|
|
133
|
+
} : {
|
|
120
134
|
position: "absolute",
|
|
121
135
|
zIndex: 50,
|
|
122
136
|
width: "max-content",
|
|
123
|
-
maxHeight: `${
|
|
137
|
+
maxHeight: `${n.maxHeight}px`,
|
|
124
138
|
overflowY: "auto",
|
|
125
|
-
[
|
|
126
|
-
[
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
"
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
)
|
|
139
|
+
[n.xDir]: 0,
|
|
140
|
+
[n.yDir === "bottom" ? "top" : "bottom"]: "100%"
|
|
141
|
+
}, L = /* @__PURE__ */ x(
|
|
142
|
+
"div",
|
|
143
|
+
{
|
|
144
|
+
ref: u,
|
|
145
|
+
className: M(m.dropdown, c),
|
|
146
|
+
style: Y,
|
|
147
|
+
"aria-hidden": !r,
|
|
148
|
+
"data-variant": E,
|
|
149
|
+
"data-size": v,
|
|
150
|
+
tabIndex: -1,
|
|
151
|
+
role: "menu",
|
|
152
|
+
"aria-modal": E === "drawer-dropdown" ? !0 : void 0,
|
|
153
|
+
"aria-activedescendant": T,
|
|
154
|
+
children: [
|
|
155
|
+
/* @__PURE__ */ x("header", { className: m.header, children: [
|
|
156
|
+
/* @__PURE__ */ a("h2", { className: m.title, children: C }),
|
|
157
|
+
/* @__PURE__ */ a(H, { size: "sm", variant: "outline", onClick: w, "aria-label": F, children: /* @__PURE__ */ a(Q, {}) })
|
|
158
|
+
] }),
|
|
159
|
+
/* @__PURE__ */ a("div", { className: m.content, children: B }),
|
|
160
|
+
k && /* @__PURE__ */ a("footer", { className: m.footer, children: /* @__PURE__ */ a(H, { size: "lg", variant: "solid", onClick: I || w, rounded: !0, children: /* @__PURE__ */ a("span", { "data-size": "md", children: k }) }) })
|
|
161
|
+
]
|
|
162
|
+
}
|
|
163
|
+
);
|
|
164
|
+
return /* @__PURE__ */ x(W, { children: [
|
|
165
|
+
p && /* @__PURE__ */ a("div", { className: m.backdrop, "aria-hidden": !r }),
|
|
166
|
+
/* @__PURE__ */ x("div", { id: h + "-root", ref: b, style: { position: "relative", display: "inline-block" }, children: [
|
|
167
|
+
N,
|
|
168
|
+
l ? J(L, document.body) : L
|
|
155
169
|
] })
|
|
156
170
|
] });
|
|
157
171
|
};
|
|
158
172
|
export {
|
|
159
|
-
|
|
173
|
+
ht as Dropdown
|
|
160
174
|
};
|
|
@@ -3,18 +3,19 @@ import { c } from "../../index-p1eeF8LQ.js";
|
|
|
3
3
|
import { useRef as f } from "react";
|
|
4
4
|
import { useClickOutside as l } from "../../hooks/useClickOutside.js";
|
|
5
5
|
import "../Button/Button.js";
|
|
6
|
+
import "react-dom";
|
|
6
7
|
import "../RootProvider/RootProvider.js";
|
|
7
8
|
import "../Snackbar/useSnackbar.js";
|
|
8
9
|
import '../../assets/DropdownBase.css';const u = "_dropdown_fqgmt_1", w = {
|
|
9
10
|
dropdown: u
|
|
10
|
-
},
|
|
11
|
+
}, v = ({
|
|
11
12
|
layout: t,
|
|
12
13
|
size: a = "auto",
|
|
13
14
|
placement: d = "left",
|
|
14
15
|
padding: e = !0,
|
|
15
16
|
open: r = !1,
|
|
16
|
-
className:
|
|
17
|
-
children:
|
|
17
|
+
className: m,
|
|
18
|
+
children: n,
|
|
18
19
|
onClose: p,
|
|
19
20
|
as: s = "div"
|
|
20
21
|
}) => {
|
|
@@ -23,7 +24,7 @@ import '../../assets/DropdownBase.css';const u = "_dropdown_fqgmt_1", w = {
|
|
|
23
24
|
s,
|
|
24
25
|
{
|
|
25
26
|
ref: o,
|
|
26
|
-
className: c(w.dropdown,
|
|
27
|
+
className: c(w.dropdown, m),
|
|
27
28
|
"data-layout": t,
|
|
28
29
|
"data-theme": "default",
|
|
29
30
|
"data-shadow": "md",
|
|
@@ -31,10 +32,10 @@ import '../../assets/DropdownBase.css';const u = "_dropdown_fqgmt_1", w = {
|
|
|
31
32
|
"data-placement": d,
|
|
32
33
|
"data-padding": e,
|
|
33
34
|
"data-expanded": r,
|
|
34
|
-
children:
|
|
35
|
+
children: n
|
|
35
36
|
}
|
|
36
37
|
);
|
|
37
38
|
};
|
|
38
39
|
export {
|
|
39
|
-
|
|
40
|
+
v as DropdownBase
|
|
40
41
|
};
|
|
@@ -7,6 +7,7 @@ import "../../index-p1eeF8LQ.js";
|
|
|
7
7
|
import { Icon as O } from "../Icon/Icon.js";
|
|
8
8
|
import { Button as D } from "../Button/Button.js";
|
|
9
9
|
import { ButtonIcon as $ } from "../Button/ButtonIcon.js";
|
|
10
|
+
import "react-dom";
|
|
10
11
|
import { useRootContext as G } from "../RootProvider/RootProvider.js";
|
|
11
12
|
import "../Snackbar/useSnackbar.js";
|
|
12
13
|
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 = {
|
|
@@ -15,7 +16,7 @@ import '../../assets/FloatingDropdown.css';const H = "_container_dqumv_1", J = "
|
|
|
15
16
|
dropdown: P,
|
|
16
17
|
dropdownItem: Q,
|
|
17
18
|
itemTitle: U
|
|
18
|
-
},
|
|
19
|
+
}, ct = ({
|
|
19
20
|
variant: F = "solid",
|
|
20
21
|
size: C,
|
|
21
22
|
icon: L,
|
|
@@ -132,5 +133,5 @@ import '../../assets/FloatingDropdown.css';const H = "_container_dqumv_1", J = "
|
|
|
132
133
|
] });
|
|
133
134
|
};
|
|
134
135
|
export {
|
|
135
|
-
|
|
136
|
+
ct as FloatingDropdown
|
|
136
137
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as t, jsxs as e } from "react/jsx-runtime";
|
|
2
2
|
import { c } from "../../index-p1eeF8LQ.js";
|
|
3
|
-
import '../../assets/FooterBase.css';const
|
|
4
|
-
footer:
|
|
5
|
-
grid:
|
|
6
|
-
},
|
|
7
|
-
|
|
3
|
+
import '../../assets/FooterBase.css';const d = "_footer_1yxd7_1", i = "_grid_1yxd7_13", o = {
|
|
4
|
+
footer: d,
|
|
5
|
+
grid: i
|
|
6
|
+
}, a = ({ className: r, children: s }) => /* @__PURE__ */ t("footer", { className: c(o.footer, r), children: /* @__PURE__ */ e("div", { className: o.grid, children: [
|
|
7
|
+
s,
|
|
8
8
|
" "
|
|
9
9
|
] }) });
|
|
10
10
|
export {
|
|
11
|
-
|
|
11
|
+
a as FooterBase
|
|
12
12
|
};
|
|
@@ -2,15 +2,16 @@ import { jsxs as p, 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 "react-dom";
|
|
5
6
|
import "../RootProvider/RootProvider.js";
|
|
6
7
|
import { Field as e } from "./Field.js";
|
|
7
8
|
import { Label as c } from "./Label.js";
|
|
8
9
|
import { Input as n } from "./Input.js";
|
|
9
10
|
import "../Snackbar/useSnackbar.js";
|
|
10
|
-
const
|
|
11
|
+
const y = ({ size: t, color: m, label: r, ...i }) => /* @__PURE__ */ p(e, { size: t, color: m, children: [
|
|
11
12
|
/* @__PURE__ */ o(n, { ...i, type: "checkbox" }),
|
|
12
13
|
!!r && /* @__PURE__ */ o(c, { children: r })
|
|
13
14
|
] });
|
|
14
15
|
export {
|
|
15
|
-
|
|
16
|
+
y as Checkbox
|
|
16
17
|
};
|
|
@@ -2,11 +2,12 @@ import { 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 "react-dom";
|
|
5
6
|
import "../RootProvider/RootProvider.js";
|
|
6
7
|
import { Checkbox as i } from "./Checkbox.js";
|
|
7
8
|
import { OptionsBase as e } from "./OptionsBase.js";
|
|
8
9
|
import "../Snackbar/useSnackbar.js";
|
|
9
|
-
const
|
|
10
|
+
const C = ({ options: r = [], ...t }) => /* @__PURE__ */ o(e, { ...t, children: r.map((m, p) => /* @__PURE__ */ o(i, { ...m }, p)) });
|
|
10
11
|
export {
|
|
11
|
-
|
|
12
|
+
C as CheckboxOptions
|
|
12
13
|
};
|
|
@@ -3,15 +3,16 @@ import "../../index-p1eeF8LQ.js";
|
|
|
3
3
|
import "react";
|
|
4
4
|
import { Typography as e } from "../Typography/Typography.js";
|
|
5
5
|
import "../Button/Button.js";
|
|
6
|
+
import "react-dom";
|
|
6
7
|
import "../RootProvider/RootProvider.js";
|
|
7
8
|
import { Field as n } from "./Field.js";
|
|
8
9
|
import { Label as c } from "./Label.js";
|
|
9
10
|
import "../Snackbar/useSnackbar.js";
|
|
10
|
-
const
|
|
11
|
+
const B = ({ size: r, color: p, label: o, helperText: i, children: t, ...s }) => /* @__PURE__ */ d(n, { size: r, color: p, ...s, children: [
|
|
11
12
|
o && /* @__PURE__ */ m(c, { size: r, children: o }),
|
|
12
13
|
t,
|
|
13
14
|
i && /* @__PURE__ */ m(e, { size: "xs", children: i })
|
|
14
15
|
] });
|
|
15
16
|
export {
|
|
16
|
-
|
|
17
|
+
B as FieldBase
|
|
17
18
|
};
|
|
@@ -2,14 +2,15 @@ import { jsxs as i, jsx as m } from "react/jsx-runtime";
|
|
|
2
2
|
import "../../index-p1eeF8LQ.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import "../Button/Button.js";
|
|
5
|
+
import "react-dom";
|
|
5
6
|
import "../RootProvider/RootProvider.js";
|
|
6
|
-
import { Fieldset as
|
|
7
|
-
import { Legend as
|
|
7
|
+
import { Fieldset as p } from "./Fieldset.js";
|
|
8
|
+
import { Legend as e } from "./Legend.js";
|
|
8
9
|
import "../Snackbar/useSnackbar.js";
|
|
9
|
-
const
|
|
10
|
-
!!r && /* @__PURE__ */ m(
|
|
10
|
+
const F = ({ legend: r, children: o, ...t }) => /* @__PURE__ */ i(p, { ...t, children: [
|
|
11
|
+
!!r && /* @__PURE__ */ m(e, { children: r }),
|
|
11
12
|
o
|
|
12
13
|
] });
|
|
13
14
|
export {
|
|
14
|
-
|
|
15
|
+
F as FieldsetBase
|
|
15
16
|
};
|
|
@@ -2,15 +2,16 @@ import { jsxs as p, 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 "react-dom";
|
|
5
6
|
import "../RootProvider/RootProvider.js";
|
|
6
7
|
import { Field as e } from "./Field.js";
|
|
7
8
|
import { Label as d } from "./Label.js";
|
|
8
9
|
import { Input as n } from "./Input.js";
|
|
9
10
|
import "../Snackbar/useSnackbar.js";
|
|
10
|
-
const
|
|
11
|
+
const F = ({ size: i, color: t, label: r, ...m }) => /* @__PURE__ */ p(e, { size: i, color: t, children: [
|
|
11
12
|
/* @__PURE__ */ o(n, { ...m, type: "radio" }),
|
|
12
13
|
!!r && /* @__PURE__ */ o(d, { children: r })
|
|
13
14
|
] });
|
|
14
15
|
export {
|
|
15
|
-
|
|
16
|
+
F as Radio
|
|
16
17
|
};
|
|
@@ -2,11 +2,12 @@ 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
|
+
import "react-dom";
|
|
5
6
|
import "../RootProvider/RootProvider.js";
|
|
6
7
|
import { Radio as a } from "./Radio.js";
|
|
7
8
|
import { OptionsBase as e } from "./OptionsBase.js";
|
|
8
9
|
import "../Snackbar/useSnackbar.js";
|
|
9
|
-
const
|
|
10
|
+
const j = ({ name: m, options: i = [], ...t }) => /* @__PURE__ */ r(e, { ...t, children: i.map((o, p) => /* @__PURE__ */ r(a, { name: o?.name || m, ...o }, p)) });
|
|
10
11
|
export {
|
|
11
|
-
|
|
12
|
+
j as RadioOptions
|
|
12
13
|
};
|
|
@@ -2,13 +2,14 @@ import "react/jsx-runtime";
|
|
|
2
2
|
import "../../index-p1eeF8LQ.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import "../Button/Button.js";
|
|
5
|
+
import "react-dom";
|
|
5
6
|
import "../RootProvider/RootProvider.js";
|
|
6
|
-
import { S as
|
|
7
|
+
import { S as l } from "../../SearchField-CYYz0JvC.js";
|
|
7
8
|
import "./Input.js";
|
|
8
9
|
import "./FieldBase.js";
|
|
9
10
|
import "../Snackbar/useSnackbar.js";
|
|
10
11
|
import "../../MagnifyingGlass-bwVhw07z.js";
|
|
11
12
|
import "../../XMark-tKk6aExO.js";
|
|
12
13
|
export {
|
|
13
|
-
|
|
14
|
+
l as SearchField
|
|
14
15
|
};
|
|
@@ -2,11 +2,12 @@ import { 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 "react-dom";
|
|
5
6
|
import "../RootProvider/RootProvider.js";
|
|
6
|
-
import { Select as
|
|
7
|
-
import { FieldBase as
|
|
7
|
+
import { Select as p } from "./Select.js";
|
|
8
|
+
import { FieldBase as e } from "./FieldBase.js";
|
|
8
9
|
import "../Snackbar/useSnackbar.js";
|
|
9
|
-
const
|
|
10
|
+
const a = ({ size: r = "md", label: t, children: m, ...i }) => /* @__PURE__ */ o(e, { label: t, size: r, children: /* @__PURE__ */ o(p, { ...i, size: r, children: m }) });
|
|
10
11
|
export {
|
|
11
|
-
|
|
12
|
+
a as SelectField
|
|
12
13
|
};
|
|
@@ -2,6 +2,7 @@ import { jsxs as p, jsx as r } from "react/jsx-runtime";
|
|
|
2
2
|
import { c as e } from "../../index-p1eeF8LQ.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import "../Button/Button.js";
|
|
5
|
+
import "react-dom";
|
|
5
6
|
import "../RootProvider/RootProvider.js";
|
|
6
7
|
import { Field as h } from "./Field.js";
|
|
7
8
|
import { Label as n } from "./Label.js";
|
|
@@ -9,10 +10,10 @@ import { Input as f } from "./Input.js";
|
|
|
9
10
|
import "../Snackbar/useSnackbar.js";
|
|
10
11
|
import '../../assets/Switch.css';const l = {
|
|
11
12
|
switch: "_switch_en83f_1"
|
|
12
|
-
},
|
|
13
|
+
}, F = ({ className: o, reverse: i, size: m, color: c, label: t, ...s }) => /* @__PURE__ */ p(h, { size: m, color: c, reverse: i, className: e(l.switch, o), children: [
|
|
13
14
|
/* @__PURE__ */ r(f, { ...s, type: "checkbox", role: "switch" }),
|
|
14
15
|
!!t && /* @__PURE__ */ r(n, { children: t })
|
|
15
16
|
] });
|
|
16
17
|
export {
|
|
17
|
-
|
|
18
|
+
F as Switch
|
|
18
19
|
};
|
|
@@ -2,11 +2,12 @@ import { jsx as m } from "react/jsx-runtime";
|
|
|
2
2
|
import "../../index-p1eeF8LQ.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import "../Button/Button.js";
|
|
5
|
+
import "react-dom";
|
|
5
6
|
import "../RootProvider/RootProvider.js";
|
|
6
7
|
import { Switch as e } from "./Switch.js";
|
|
7
8
|
import { OptionsBase as n } from "./OptionsBase.js";
|
|
8
9
|
import "../Snackbar/useSnackbar.js";
|
|
9
|
-
const
|
|
10
|
+
const d = ({ name: t, options: o = [], ...i }) => /* @__PURE__ */ m(n, { ...i, children: o.map((r, p) => /* @__PURE__ */ m(e, { name: r?.name || t, ...r }, p)) });
|
|
10
11
|
export {
|
|
11
|
-
|
|
12
|
+
d as SwitchOptions
|
|
12
13
|
};
|
|
@@ -2,11 +2,12 @@ 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
|
+
import "react-dom";
|
|
5
6
|
import "../RootProvider/RootProvider.js";
|
|
6
7
|
import { Input as e } from "./Input.js";
|
|
7
8
|
import { FieldBase as n } from "./FieldBase.js";
|
|
8
9
|
import "../Snackbar/useSnackbar.js";
|
|
9
|
-
const
|
|
10
|
+
const h = ({ size: o, color: t, label: i, helperText: m, ...p }) => /* @__PURE__ */ r(n, { size: o, color: t, label: i, helperText: m, children: /* @__PURE__ */ r(e, { ...p }) });
|
|
10
11
|
export {
|
|
11
|
-
|
|
12
|
+
h as TextField
|
|
12
13
|
};
|