@altinn/altinn-components 0.56.7 → 0.56.9
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-CqdLwxvV.js → SearchField-CXMhgFiw.js} +235 -236
- package/dist/assets/AccountListVirtual.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/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/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 +2 -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 +7 -6
- 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 +4 -3
- 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/Breadcrumbs.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 +3 -2
- package/dist/components/Page/Section.js +9 -8
- 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 +3 -2
- package/dist/components/Toolbar/SelectDateFilter.js +7 -6
- 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 +1 -1
- 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 +1 -1
- package/dist/hooks/useAccountSelector.js +3 -2
- package/dist/index.js +1 -1
- 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/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/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/Settings/SettingsItem.stories.d.ts +9 -9
- package/dist/types/lib/components/Skeleton/Skeleton.d.ts +1 -1
- package/dist/types/lib/components/Toolbar/Toolbar.stories.d.ts +4 -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/stories/Dialog/Dialog.stories.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,58 +1,58 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
2
|
+
import { jsx as o, jsxs as E } from "react/jsx-runtime";
|
|
3
3
|
import { c as oe } from "./index-p1eeF8LQ.js";
|
|
4
|
-
import { useRef as j, useState as Q, useMemo as R, useEffect as G, Fragment as
|
|
5
|
-
import { Icon as ie } from "./components/Icon/Icon.js";
|
|
4
|
+
import { useRef as j, useState as Q, useMemo as R, useEffect as G, Fragment as ge, useLayoutEffect as ne, useId as re } from "react";
|
|
6
5
|
import { Button as se } from "./components/Button/Button.js";
|
|
6
|
+
import "react-dom";
|
|
7
7
|
import "./components/RootProvider/RootProvider.js";
|
|
8
|
-
import { useMenu as
|
|
9
|
-
import { Input as
|
|
10
|
-
import { FieldBase as
|
|
8
|
+
import { useMenu as de } from "./hooks/useMenu.js";
|
|
9
|
+
import { Input as ie } from "./components/Forms/Input.js";
|
|
10
|
+
import { FieldBase as ae } from "./components/Forms/FieldBase.js";
|
|
11
11
|
import "./components/Snackbar/useSnackbar.js";
|
|
12
|
-
import { S as
|
|
13
|
-
import { S as
|
|
14
|
-
import { MenuItem as
|
|
12
|
+
import { S as ce } from "./MagnifyingGlass-bwVhw07z.js";
|
|
13
|
+
import { S as le } from "./XMark-tKk6aExO.js";
|
|
14
|
+
import { MenuItem as fe } from "./components/Menu/MenuItem.js";
|
|
15
15
|
import { MenuList as Z } from "./components/Menu/MenuList.js";
|
|
16
|
-
import { MenuListItem as
|
|
17
|
-
import { MenuListGroup as
|
|
18
|
-
import { MenuListDivider as
|
|
19
|
-
import { MenuListHeading as
|
|
16
|
+
import { MenuListItem as pe } from "./components/Menu/MenuListItem.js";
|
|
17
|
+
import { MenuListGroup as me } from "./components/Menu/MenuListGroup.js";
|
|
18
|
+
import { MenuListDivider as he } from "./components/Menu/MenuListDivider.js";
|
|
19
|
+
import { MenuListHeading as ye } from "./components/Menu/MenuListHeading.js";
|
|
20
20
|
import { a as be } from "./useMenuVirtualization-Cs426RCN.js";
|
|
21
|
-
import { useMenuSearch as
|
|
22
|
-
import './assets/SearchField.css';const
|
|
23
|
-
search:
|
|
24
|
-
searchInput:
|
|
25
|
-
},
|
|
26
|
-
style:
|
|
27
|
-
index:
|
|
28
|
-
name:
|
|
29
|
-
value:
|
|
21
|
+
import { useMenuSearch as ve } from "./components/Menu/useMenuSearch.js";
|
|
22
|
+
import './assets/SearchField.css';const we = "_search_18jfe_1", Ce = "_searchInput_18jfe_8", te = {
|
|
23
|
+
search: we,
|
|
24
|
+
searchInput: Ce
|
|
25
|
+
}, xe = ({
|
|
26
|
+
style: b,
|
|
27
|
+
index: v,
|
|
28
|
+
name: A,
|
|
29
|
+
value: k,
|
|
30
30
|
placeholder: d = "Search",
|
|
31
31
|
clearButtonAltText: r = "Clear search",
|
|
32
32
|
onChange: _,
|
|
33
|
-
onClear:
|
|
33
|
+
onClear: D,
|
|
34
34
|
onNavigate: p,
|
|
35
|
-
combobox:
|
|
35
|
+
combobox: i = !1,
|
|
36
36
|
listId: h,
|
|
37
37
|
"aria-activedescendant": B,
|
|
38
38
|
onKeyDown: y,
|
|
39
|
-
onInput:
|
|
39
|
+
onInput: s,
|
|
40
40
|
onFocus: x,
|
|
41
41
|
...M
|
|
42
|
-
}) => /* @__PURE__ */
|
|
42
|
+
}) => /* @__PURE__ */ o("li", { className: te.search, style: b, "data-index": v, "data-menu-search": "true", children: i ? (
|
|
43
43
|
// biome-ignore lint/a11y/useFocusableInteractive: <explanation>
|
|
44
44
|
// biome-ignore lint/a11y/useAriaPropsForRole: <explanation>
|
|
45
45
|
// biome-ignore lint/a11y/useSemanticElements: <explanation>
|
|
46
|
-
/* @__PURE__ */
|
|
47
|
-
|
|
46
|
+
/* @__PURE__ */ o("div", { role: "combobox", "aria-expanded": !0, "aria-haspopup": "listbox", "aria-owns": h, children: /* @__PURE__ */ o(
|
|
47
|
+
ue,
|
|
48
48
|
{
|
|
49
49
|
size: "xs",
|
|
50
50
|
className: te.searchInput,
|
|
51
|
-
name:
|
|
52
|
-
value:
|
|
51
|
+
name: A,
|
|
52
|
+
value: k,
|
|
53
53
|
placeholder: d,
|
|
54
54
|
onChange: _,
|
|
55
|
-
onClear:
|
|
55
|
+
onClear: D,
|
|
56
56
|
clearButtonAltText: r,
|
|
57
57
|
autoComplete: "off",
|
|
58
58
|
autoCorrect: "off",
|
|
@@ -64,21 +64,21 @@ import './assets/SearchField.css';const Ce = "_search_18jfe_1", we = "_searchInp
|
|
|
64
64
|
onKeyDown: (a) => {
|
|
65
65
|
(a.key === "ArrowUp" || a.key === "ArrowDown") && (a.preventDefault(), p?.()), y?.(a);
|
|
66
66
|
},
|
|
67
|
-
onInput:
|
|
67
|
+
onInput: s,
|
|
68
68
|
onFocus: x,
|
|
69
69
|
...M
|
|
70
70
|
}
|
|
71
71
|
) })
|
|
72
|
-
) : /* @__PURE__ */
|
|
73
|
-
|
|
72
|
+
) : /* @__PURE__ */ o(
|
|
73
|
+
ue,
|
|
74
74
|
{
|
|
75
75
|
size: "xs",
|
|
76
76
|
className: te.searchInput,
|
|
77
|
-
name:
|
|
78
|
-
value:
|
|
77
|
+
name: A,
|
|
78
|
+
value: k,
|
|
79
79
|
placeholder: d,
|
|
80
80
|
onChange: _,
|
|
81
|
-
onClear:
|
|
81
|
+
onClear: D,
|
|
82
82
|
clearButtonAltText: r,
|
|
83
83
|
autoComplete: "off",
|
|
84
84
|
autoCorrect: "off",
|
|
@@ -87,53 +87,53 @@ import './assets/SearchField.css';const Ce = "_search_18jfe_1", we = "_searchInp
|
|
|
87
87
|
onKeyDown: (a) => {
|
|
88
88
|
(a.key === "ArrowUp" || a.key === "ArrowDown") && (a.preventDefault(), p?.()), y?.(a);
|
|
89
89
|
},
|
|
90
|
-
onInput:
|
|
90
|
+
onInput: s,
|
|
91
91
|
onFocus: x,
|
|
92
92
|
...M
|
|
93
93
|
}
|
|
94
|
-
) }),
|
|
95
|
-
level:
|
|
96
|
-
maxLevels:
|
|
97
|
-
expanded:
|
|
98
|
-
a11yMode:
|
|
94
|
+
) }), Ie = ({
|
|
95
|
+
level: b = 0,
|
|
96
|
+
maxLevels: v,
|
|
97
|
+
expanded: A,
|
|
98
|
+
a11yMode: k = "menu",
|
|
99
99
|
open: d,
|
|
100
100
|
scrollToTopOnOpen: r = !1,
|
|
101
101
|
autoActivateFirstItem: _ = !0,
|
|
102
|
-
autoFocusList:
|
|
102
|
+
autoFocusList: D = !0,
|
|
103
103
|
announceNoResults: p = !1,
|
|
104
|
-
search:
|
|
104
|
+
search: i,
|
|
105
105
|
items: h,
|
|
106
106
|
groups: B = {},
|
|
107
107
|
size: y,
|
|
108
|
-
id:
|
|
108
|
+
id: s,
|
|
109
109
|
color: x,
|
|
110
110
|
variant: M,
|
|
111
111
|
scrollRefStyles: a = {},
|
|
112
|
-
keyboardEvents:
|
|
112
|
+
keyboardEvents: I = !1,
|
|
113
113
|
onSelect: z = () => {
|
|
114
114
|
},
|
|
115
|
-
onActiveItemIdChange:
|
|
115
|
+
onActiveItemIdChange: w
|
|
116
116
|
}) => {
|
|
117
|
-
if (
|
|
117
|
+
if (v && b >= v)
|
|
118
118
|
return null;
|
|
119
|
-
const m =
|
|
119
|
+
const m = k === "combobox", l = m && s ? `${s}-listbox` : s, F = j(d), O = j(d), [Y, C] = Q(!1), f = R(
|
|
120
120
|
() => h.map((n, g) => ({
|
|
121
121
|
...n,
|
|
122
|
-
id: n.id || `${
|
|
122
|
+
id: n.id || `${s}-item-${g}`
|
|
123
123
|
})),
|
|
124
|
-
[h,
|
|
125
|
-
), S = j(null), { menu: L, setActiveIndex: H, activeItem: W } =
|
|
124
|
+
[h, s]
|
|
125
|
+
), S = j(null), { menu: L, setActiveIndex: H, activeItem: W } = de({
|
|
126
126
|
items: f,
|
|
127
127
|
groups: B,
|
|
128
128
|
groupByKey: "groupId",
|
|
129
|
-
keyboardEvents:
|
|
129
|
+
keyboardEvents: I,
|
|
130
130
|
autoActivateFirstItem: _,
|
|
131
131
|
onSelect: z,
|
|
132
132
|
ref: S
|
|
133
133
|
});
|
|
134
134
|
return G(() => {
|
|
135
|
-
|
|
136
|
-
}, [W?.id,
|
|
135
|
+
w?.(W?.id);
|
|
136
|
+
}, [W?.id, w]), G(() => {
|
|
137
137
|
if (!r) {
|
|
138
138
|
F.current = d;
|
|
139
139
|
return;
|
|
@@ -142,8 +142,8 @@ import './assets/SearchField.css';const Ce = "_search_18jfe_1", we = "_searchInp
|
|
|
142
142
|
F.current = d, d && !n && S.current?.scrollTo({ top: 0 });
|
|
143
143
|
}, [d, r]), G(() => {
|
|
144
144
|
const n = O.current;
|
|
145
|
-
O.current = d, !(!
|
|
146
|
-
}, [d,
|
|
145
|
+
O.current = d, !(!I || i || !D) && d && !n && requestAnimationFrame(() => S.current?.focus?.({ preventScroll: !0 }));
|
|
146
|
+
}, [d, I, i]), G(() => {
|
|
147
147
|
if (m && p) {
|
|
148
148
|
H(0), C(!0);
|
|
149
149
|
return;
|
|
@@ -152,75 +152,75 @@ import './assets/SearchField.css';const Ce = "_search_18jfe_1", we = "_searchInp
|
|
|
152
152
|
Z,
|
|
153
153
|
{
|
|
154
154
|
variant: M,
|
|
155
|
-
expanded:
|
|
155
|
+
expanded: A,
|
|
156
156
|
ref: S,
|
|
157
157
|
style: a,
|
|
158
158
|
id: l,
|
|
159
159
|
role: m ? "listbox" : void 0,
|
|
160
|
-
tabIndex:
|
|
160
|
+
tabIndex: I ? -1 : void 0,
|
|
161
161
|
children: [
|
|
162
|
-
|
|
163
|
-
|
|
162
|
+
i && /* @__PURE__ */ o(
|
|
163
|
+
xe,
|
|
164
164
|
{
|
|
165
|
-
...
|
|
165
|
+
...i,
|
|
166
166
|
combobox: m,
|
|
167
167
|
listId: l,
|
|
168
168
|
"aria-activedescendant": m && Y ? W?.id : void 0,
|
|
169
169
|
onNavigate: m ? () => C(!0) : void 0,
|
|
170
170
|
onChange: (n) => {
|
|
171
|
-
C(!1),
|
|
171
|
+
C(!1), i.onChange?.(n);
|
|
172
172
|
},
|
|
173
173
|
onFocus: (n) => {
|
|
174
|
-
C(!1),
|
|
174
|
+
C(!1), i.onFocus?.(n);
|
|
175
175
|
},
|
|
176
176
|
onInput: (n) => {
|
|
177
|
-
C(!1),
|
|
177
|
+
C(!1), i.onInput?.(n);
|
|
178
178
|
},
|
|
179
179
|
onKeyDown: (n) => {
|
|
180
180
|
const g = n.key === "ArrowUp" || n.key === "ArrowDown", T = n.key.length === 1 || n.key === "Backspace" || n.key === "Delete";
|
|
181
|
-
m && !g && T && C(!1),
|
|
181
|
+
m && !g && T && C(!1), i.onKeyDown?.(n);
|
|
182
182
|
}
|
|
183
183
|
}
|
|
184
184
|
),
|
|
185
185
|
L.map((n, g) => {
|
|
186
186
|
const T = n?.props || {}, { title: P, hidden: q = !1, divider: X = !0 } = T;
|
|
187
|
-
return /* @__PURE__ */ E(
|
|
188
|
-
(
|
|
189
|
-
/* @__PURE__ */
|
|
190
|
-
P && /* @__PURE__ */
|
|
187
|
+
return /* @__PURE__ */ E(ge, { children: [
|
|
188
|
+
(b > 0 || g) && X ? /* @__PURE__ */ o(he, {}) : "",
|
|
189
|
+
/* @__PURE__ */ o(me, { hidden: q, children: /* @__PURE__ */ E(Z, { role: "presentation", children: [
|
|
190
|
+
P && /* @__PURE__ */ o(ye, { title: P, level: b }),
|
|
191
191
|
n?.items.filter((U) => !U.props?.hidden).map((U, e) => {
|
|
192
|
-
const { active:
|
|
192
|
+
const { active: t, onMouseEnter: u } = U, { groupId: K, ...c } = U.props || {}, { expanded: $ } = c, V = Array.isArray(c?.items) && c.items.length > 0, J = c.role === "checkbox" || c.role === "radio", ee = m && !J ? "option" : c.role;
|
|
193
193
|
return /* @__PURE__ */ E(
|
|
194
|
-
|
|
194
|
+
pe,
|
|
195
195
|
{
|
|
196
196
|
expanded: $,
|
|
197
197
|
onMouseLeave: () => H(-1),
|
|
198
198
|
role: m || J ? "presentation" : void 0,
|
|
199
199
|
children: [
|
|
200
|
-
/* @__PURE__ */
|
|
201
|
-
|
|
200
|
+
/* @__PURE__ */ o(
|
|
201
|
+
fe,
|
|
202
202
|
{
|
|
203
203
|
...c,
|
|
204
204
|
size: c?.size || T?.size || y,
|
|
205
205
|
color: c?.color || T?.color || x,
|
|
206
206
|
variant: c?.variant || T?.variant || M,
|
|
207
|
-
active:
|
|
207
|
+
active: t,
|
|
208
208
|
role: ee,
|
|
209
209
|
selected: c.selected,
|
|
210
|
-
tabIndex: c?.disabled ||
|
|
210
|
+
tabIndex: c?.disabled || I ? -1 : c.tabIndex ?? 0,
|
|
211
211
|
onMouseEnter: u,
|
|
212
212
|
"aria-haspopup": V ? "menu" : void 0,
|
|
213
213
|
"aria-expanded": V ? $ : void 0,
|
|
214
214
|
"aria-controls": V ? c.id + "-menu" : void 0
|
|
215
215
|
}
|
|
216
216
|
),
|
|
217
|
-
$ && c?.items && /* @__PURE__ */
|
|
218
|
-
|
|
217
|
+
$ && c?.items && /* @__PURE__ */ o(
|
|
218
|
+
Ie,
|
|
219
219
|
{
|
|
220
220
|
id: c.id + "-menu",
|
|
221
221
|
expanded: $,
|
|
222
|
-
level:
|
|
223
|
-
maxLevels:
|
|
222
|
+
level: b + 1,
|
|
223
|
+
maxLevels: v,
|
|
224
224
|
items: c?.items,
|
|
225
225
|
groups: B,
|
|
226
226
|
size: y,
|
|
@@ -239,68 +239,68 @@ import './assets/SearchField.css';const Ce = "_search_18jfe_1", we = "_searchInp
|
|
|
239
239
|
]
|
|
240
240
|
}
|
|
241
241
|
);
|
|
242
|
-
},
|
|
243
|
-
const
|
|
242
|
+
}, ke = (b) => {
|
|
243
|
+
const v = j(null), A = j(null), [k, d] = Q(0), {
|
|
244
244
|
search: r,
|
|
245
245
|
items: _,
|
|
246
|
-
groups:
|
|
246
|
+
groups: D = {},
|
|
247
247
|
size: p,
|
|
248
|
-
color:
|
|
248
|
+
color: i,
|
|
249
249
|
variant: h,
|
|
250
250
|
keyboardEvents: B,
|
|
251
251
|
scrollRefStyles: y = {},
|
|
252
|
-
id:
|
|
252
|
+
id: s,
|
|
253
253
|
expanded: x,
|
|
254
254
|
a11yMode: M = "menu",
|
|
255
255
|
open: a,
|
|
256
|
-
scrollToTopOnOpen:
|
|
256
|
+
scrollToTopOnOpen: I = !1,
|
|
257
257
|
autoActivateFirstItem: z = !0,
|
|
258
|
-
announceNoResults:
|
|
258
|
+
announceNoResults: w = !1,
|
|
259
259
|
onActiveItemIdChange: m
|
|
260
|
-
} =
|
|
261
|
-
() => _.map((e,
|
|
260
|
+
} = b, l = M === "combobox", F = l && s ? `${s}-listbox` : s, O = j(a), [Y, C] = Q(!1), f = R(
|
|
261
|
+
() => _.map((e, t) => ({
|
|
262
262
|
...e,
|
|
263
|
-
id: e.id || `${
|
|
263
|
+
id: e.id || `${s}-item-${t}`
|
|
264
264
|
})),
|
|
265
|
-
[_,
|
|
266
|
-
), { menu: S, activeItem: L, setActiveIndex: H, activeIndex: W } =
|
|
265
|
+
[_, s]
|
|
266
|
+
), { menu: S, activeItem: L, setActiveIndex: H, activeIndex: W } = de({
|
|
267
267
|
items: f,
|
|
268
|
-
groups:
|
|
268
|
+
groups: D,
|
|
269
269
|
groupByKey: "groupId",
|
|
270
270
|
keyboardEvents: B,
|
|
271
271
|
autoActivateFirstItem: z,
|
|
272
|
-
ref:
|
|
272
|
+
ref: v
|
|
273
273
|
}), { flatMenu: n, virtualizer: g, scrollMaxHeight: T } = be({
|
|
274
274
|
menu: S,
|
|
275
|
-
scrollRef:
|
|
275
|
+
scrollRef: v
|
|
276
276
|
});
|
|
277
277
|
ne(() => {
|
|
278
|
-
const e =
|
|
278
|
+
const e = A.current;
|
|
279
279
|
if (!e) return;
|
|
280
|
-
const
|
|
281
|
-
d((u) => u ===
|
|
280
|
+
const t = Math.round(e.offsetTop);
|
|
281
|
+
d((u) => u === t ? u : t);
|
|
282
282
|
});
|
|
283
283
|
const P = R(() => {
|
|
284
284
|
const e = L?.id;
|
|
285
285
|
if (e)
|
|
286
286
|
return n.findIndex((u) => u.type === "item" && u.itemProps?.id === e);
|
|
287
287
|
if (W < 0) return -1;
|
|
288
|
-
let
|
|
288
|
+
let t = -1;
|
|
289
289
|
for (let u = 0; u < n.length; u++)
|
|
290
|
-
if (n[u]?.type === "item" && (
|
|
290
|
+
if (n[u]?.type === "item" && (t += 1, t === W))
|
|
291
291
|
return u;
|
|
292
292
|
return -1;
|
|
293
293
|
}, [L?.id, W, n]), q = j(null);
|
|
294
294
|
ne(() => {
|
|
295
|
-
const e = q?.current,
|
|
295
|
+
const e = q?.current, t = typeof e == "number" ? P <= e : !1;
|
|
296
296
|
q.current = P;
|
|
297
|
-
const u =
|
|
298
|
-
if (!
|
|
297
|
+
const u = t ? P : P + 2;
|
|
298
|
+
if (!t) {
|
|
299
299
|
const V = g.getOffsetForIndex(u, "auto");
|
|
300
300
|
if (!V) return;
|
|
301
301
|
const [J, ee] = V;
|
|
302
302
|
if (ee === "auto") return;
|
|
303
|
-
g.scrollToOffset(J +
|
|
303
|
+
g.scrollToOffset(J + k + 10, { align: "start" });
|
|
304
304
|
return;
|
|
305
305
|
}
|
|
306
306
|
if (P <= 3) {
|
|
@@ -310,30 +310,30 @@ import './assets/SearchField.css';const Ce = "_search_18jfe_1", we = "_searchInp
|
|
|
310
310
|
const K = g.getOffsetForIndex(P - 1, "auto");
|
|
311
311
|
if (!K) return;
|
|
312
312
|
const [c, $] = K;
|
|
313
|
-
$ !== "auto" && g.scrollToOffset(c +
|
|
314
|
-
}, [P,
|
|
313
|
+
$ !== "auto" && g.scrollToOffset(c + k + 10, { align: "start" });
|
|
314
|
+
}, [P, k, g, q]);
|
|
315
315
|
const X = R(() => {
|
|
316
316
|
const e = /* @__PURE__ */ new Map();
|
|
317
|
-
let
|
|
317
|
+
let t = 0;
|
|
318
318
|
return n.forEach((u, K) => {
|
|
319
|
-
u.type === "item" && (
|
|
320
|
-
}), { positions: e, total:
|
|
319
|
+
u.type === "item" && (t += 1, e.set(K, t));
|
|
320
|
+
}), { positions: e, total: t };
|
|
321
321
|
}, [n]);
|
|
322
322
|
G(() => {
|
|
323
323
|
m?.(L?.id);
|
|
324
324
|
}, [L?.id, m]), G(() => {
|
|
325
|
-
if (l &&
|
|
325
|
+
if (l && w) {
|
|
326
326
|
H(0), C(!0);
|
|
327
327
|
return;
|
|
328
328
|
}
|
|
329
|
-
}, [
|
|
330
|
-
if (!
|
|
329
|
+
}, [w, l, H]), G(() => {
|
|
330
|
+
if (!I) {
|
|
331
331
|
O.current = a;
|
|
332
332
|
return;
|
|
333
333
|
}
|
|
334
334
|
const e = O.current;
|
|
335
|
-
O.current = a, a && !e &&
|
|
336
|
-
}, [a,
|
|
335
|
+
O.current = a, a && !e && v.current?.scrollTo({ top: 0 });
|
|
336
|
+
}, [a, I]);
|
|
337
337
|
const U = {
|
|
338
338
|
position: "relative",
|
|
339
339
|
maxHeight: y?.maxHeight || T,
|
|
@@ -346,16 +346,16 @@ import './assets/SearchField.css';const Ce = "_search_18jfe_1", we = "_searchInp
|
|
|
346
346
|
return /* @__PURE__ */ E(
|
|
347
347
|
Z,
|
|
348
348
|
{
|
|
349
|
-
ref:
|
|
349
|
+
ref: v,
|
|
350
350
|
style: U,
|
|
351
351
|
variant: h,
|
|
352
|
-
color:
|
|
352
|
+
color: i,
|
|
353
353
|
expanded: x,
|
|
354
354
|
id: F,
|
|
355
355
|
role: l ? "listbox" : void 0,
|
|
356
356
|
children: [
|
|
357
|
-
r && /* @__PURE__ */
|
|
358
|
-
|
|
357
|
+
r && /* @__PURE__ */ o(
|
|
358
|
+
xe,
|
|
359
359
|
{
|
|
360
360
|
...r,
|
|
361
361
|
combobox: l,
|
|
@@ -372,23 +372,23 @@ import './assets/SearchField.css';const Ce = "_search_18jfe_1", we = "_searchInp
|
|
|
372
372
|
C(!1), r.onInput?.(e);
|
|
373
373
|
},
|
|
374
374
|
onKeyDown: (e) => {
|
|
375
|
-
const
|
|
376
|
-
l && !
|
|
375
|
+
const t = e.key === "ArrowUp" || e.key === "ArrowDown", u = e.key.length === 1 || e.key === "Backspace" || e.key === "Delete";
|
|
376
|
+
l && !t && u && C(!1), r.onKeyDown?.(e);
|
|
377
377
|
}
|
|
378
378
|
}
|
|
379
379
|
),
|
|
380
|
-
/* @__PURE__ */
|
|
381
|
-
|
|
380
|
+
/* @__PURE__ */ o(
|
|
381
|
+
me,
|
|
382
382
|
{
|
|
383
|
-
ref:
|
|
383
|
+
ref: A,
|
|
384
384
|
style: {
|
|
385
385
|
position: "relative",
|
|
386
386
|
height: `${g.getTotalSize()}px`,
|
|
387
387
|
width: "100%"
|
|
388
388
|
},
|
|
389
|
-
children: /* @__PURE__ */
|
|
390
|
-
const
|
|
391
|
-
if (!
|
|
389
|
+
children: /* @__PURE__ */ o(Z, { style: { width: "100%", minWidth: "100%" }, children: g.getVirtualItems().map((e) => {
|
|
390
|
+
const t = n[e.index];
|
|
391
|
+
if (!t) return null;
|
|
392
392
|
const u = {
|
|
393
393
|
position: "absolute",
|
|
394
394
|
top: 0,
|
|
@@ -401,10 +401,10 @@ import './assets/SearchField.css';const Ce = "_search_18jfe_1", we = "_searchInp
|
|
|
401
401
|
"data-index": e.index,
|
|
402
402
|
ref: g.measureElement
|
|
403
403
|
};
|
|
404
|
-
switch (
|
|
404
|
+
switch (t.type) {
|
|
405
405
|
case "divider":
|
|
406
|
-
return /* @__PURE__ */
|
|
407
|
-
|
|
406
|
+
return /* @__PURE__ */ o(
|
|
407
|
+
he,
|
|
408
408
|
{
|
|
409
409
|
...K,
|
|
410
410
|
style: { ...u, padding: "0.25rem 0" }
|
|
@@ -412,27 +412,27 @@ import './assets/SearchField.css';const Ce = "_search_18jfe_1", we = "_searchInp
|
|
|
412
412
|
e.key
|
|
413
413
|
);
|
|
414
414
|
case "header":
|
|
415
|
-
return /* @__PURE__ */
|
|
415
|
+
return /* @__PURE__ */ o(ye, { ...K, title: t.title || "", level: 1 }, e.key);
|
|
416
416
|
default: {
|
|
417
|
-
const c =
|
|
418
|
-
return /* @__PURE__ */
|
|
419
|
-
|
|
417
|
+
const c = t.itemProps?.role === "checkbox" || t.itemProps?.role === "radio", $ = l && !c ? "option" : t.itemProps?.role;
|
|
418
|
+
return /* @__PURE__ */ o(
|
|
419
|
+
pe,
|
|
420
420
|
{
|
|
421
421
|
...K,
|
|
422
422
|
role: l || c ? "presentation" : "menuitem",
|
|
423
|
-
children: /* @__PURE__ */
|
|
424
|
-
|
|
423
|
+
children: /* @__PURE__ */ o(
|
|
424
|
+
fe,
|
|
425
425
|
{
|
|
426
|
-
...
|
|
427
|
-
size:
|
|
428
|
-
color:
|
|
429
|
-
variant:
|
|
430
|
-
active:
|
|
426
|
+
...t.itemProps || {},
|
|
427
|
+
size: t.itemProps?.size || p,
|
|
428
|
+
color: t.itemProps?.color || i,
|
|
429
|
+
variant: t.itemProps?.variant || h,
|
|
430
|
+
active: t.active,
|
|
431
431
|
role: $,
|
|
432
|
-
selected:
|
|
432
|
+
selected: t.itemProps?.selected,
|
|
433
433
|
"aria-posinset": l ? X.positions.get(e.index) : void 0,
|
|
434
434
|
"aria-setsize": l ? X.total : void 0,
|
|
435
|
-
tabIndex:
|
|
435
|
+
tabIndex: t.itemProps?.disabled || B ? -1 : 0
|
|
436
436
|
}
|
|
437
437
|
)
|
|
438
438
|
},
|
|
@@ -446,154 +446,153 @@ import './assets/SearchField.css';const Ce = "_search_18jfe_1", we = "_searchInp
|
|
|
446
446
|
]
|
|
447
447
|
}
|
|
448
448
|
);
|
|
449
|
-
},
|
|
450
|
-
searchable:
|
|
451
|
-
search:
|
|
452
|
-
items:
|
|
453
|
-
groups:
|
|
449
|
+
}, _e = ({
|
|
450
|
+
searchable: b,
|
|
451
|
+
search: v,
|
|
452
|
+
items: A = [],
|
|
453
|
+
groups: k = {},
|
|
454
454
|
variant: d = "default",
|
|
455
455
|
size: r,
|
|
456
456
|
level: _ = 0,
|
|
457
|
-
maxLevels:
|
|
457
|
+
maxLevels: D = 3,
|
|
458
458
|
virtualized: p = !1,
|
|
459
|
-
keyboardEvents:
|
|
459
|
+
keyboardEvents: i = !1,
|
|
460
460
|
scrollRefStyles: h = {},
|
|
461
461
|
onActiveItemIdChange: B,
|
|
462
462
|
a11yMode: y = "menu",
|
|
463
|
-
open:
|
|
463
|
+
open: s,
|
|
464
464
|
scrollToTopOnOpen: x,
|
|
465
465
|
autoFocusList: M,
|
|
466
466
|
id: a
|
|
467
467
|
}) => {
|
|
468
|
-
const
|
|
469
|
-
return p ? /* @__PURE__ */
|
|
470
|
-
|
|
468
|
+
const I = ve({ ...v, items: A, groups: k }), z = b ? I.search : v, w = b && I.hasQuery && I.resultCount === 0, m = b ? I.items : A, l = b ? { ...k, ...I.groups } : k, F = y !== "combobox";
|
|
469
|
+
return p ? /* @__PURE__ */ o(
|
|
470
|
+
ke,
|
|
471
471
|
{
|
|
472
472
|
id: a,
|
|
473
473
|
search: z,
|
|
474
|
-
announceNoResults:
|
|
474
|
+
announceNoResults: w,
|
|
475
475
|
items: m,
|
|
476
476
|
groups: l,
|
|
477
477
|
variant: d,
|
|
478
478
|
size: r,
|
|
479
479
|
level: _,
|
|
480
|
-
maxLevels:
|
|
481
|
-
keyboardEvents:
|
|
480
|
+
maxLevels: D,
|
|
481
|
+
keyboardEvents: i,
|
|
482
482
|
scrollRefStyles: h,
|
|
483
483
|
onActiveItemIdChange: B,
|
|
484
484
|
a11yMode: y,
|
|
485
|
-
open:
|
|
485
|
+
open: s,
|
|
486
486
|
scrollToTopOnOpen: x,
|
|
487
487
|
autoActivateFirstItem: F,
|
|
488
488
|
autoFocusList: M
|
|
489
489
|
}
|
|
490
|
-
) : /* @__PURE__ */
|
|
491
|
-
|
|
490
|
+
) : /* @__PURE__ */ o(
|
|
491
|
+
Ie,
|
|
492
492
|
{
|
|
493
493
|
id: a,
|
|
494
494
|
search: z,
|
|
495
|
-
announceNoResults:
|
|
495
|
+
announceNoResults: w,
|
|
496
496
|
items: m,
|
|
497
497
|
groups: l,
|
|
498
498
|
variant: d,
|
|
499
499
|
size: r,
|
|
500
500
|
level: _,
|
|
501
|
-
maxLevels:
|
|
502
|
-
keyboardEvents:
|
|
501
|
+
maxLevels: D,
|
|
502
|
+
keyboardEvents: i,
|
|
503
503
|
scrollRefStyles: h,
|
|
504
504
|
onActiveItemIdChange: B,
|
|
505
505
|
a11yMode: y,
|
|
506
|
-
open:
|
|
506
|
+
open: s,
|
|
507
507
|
scrollToTopOnOpen: x,
|
|
508
508
|
autoActivateFirstItem: F,
|
|
509
509
|
autoFocusList: M
|
|
510
510
|
}
|
|
511
511
|
);
|
|
512
|
-
},
|
|
513
|
-
fieldContainer:
|
|
514
|
-
field:
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
color: w = "neutral",
|
|
512
|
+
}, Me = "_fieldContainer_1rfas_1", Ae = "_field_1rfas_1", De = "_icon_1rfas_15", Be = "_input_1rfas_9", Ne = "_clear_1rfas_48", Fe = "_clearButton_1rfas_61", Se = "_autocomplete_1rfas_90", N = {
|
|
513
|
+
fieldContainer: Me,
|
|
514
|
+
field: Ae,
|
|
515
|
+
icon: De,
|
|
516
|
+
input: Be,
|
|
517
|
+
clear: Ne,
|
|
518
|
+
clearButton: Fe,
|
|
519
|
+
autocomplete: Se
|
|
520
|
+
}, ue = ({
|
|
521
|
+
className: b,
|
|
522
|
+
collapsible: v,
|
|
523
|
+
size: A,
|
|
524
|
+
color: k = "neutral",
|
|
526
525
|
label: d,
|
|
527
526
|
value: r,
|
|
528
527
|
onClear: _,
|
|
529
|
-
clearButtonAltText:
|
|
528
|
+
clearButtonAltText: D = "Clear search",
|
|
530
529
|
menu: p,
|
|
531
|
-
minLength:
|
|
530
|
+
minLength: i,
|
|
532
531
|
...h
|
|
533
532
|
}) => {
|
|
534
|
-
const B = re(), [y,
|
|
533
|
+
const B = re(), [y, s] = Q(!1), x = h.id || `search-field-${B}`, M = `${x}-listbox`, [a, I] = Q(void 0), z = "searchfield-clear-button-" + re(), w = R(() => !r || typeof i == "number" && typeof r == "string" && r.length < i ? !1 : y, [y, i, r]), m = R(() => (p?.items ?? []).map((f) => ({
|
|
535
534
|
...f,
|
|
536
535
|
onClick: () => {
|
|
537
|
-
f.onClick?.(),
|
|
536
|
+
f.onClick?.(), s(!1);
|
|
538
537
|
}
|
|
539
538
|
})), [p]), l = (f) => {
|
|
540
|
-
if (f.key === "Enter" &&
|
|
541
|
-
p?.items?.[0]?.onClick?.(),
|
|
539
|
+
if (f.key === "Enter" && w) {
|
|
540
|
+
p?.items?.[0]?.onClick?.(), s(!1);
|
|
542
541
|
return;
|
|
543
542
|
}
|
|
544
|
-
if (f.key === "Escape" &&
|
|
545
|
-
f.preventDefault(), f.stopPropagation(),
|
|
543
|
+
if (f.key === "Escape" && w) {
|
|
544
|
+
f.preventDefault(), f.stopPropagation(), s(!1), p?.onClose(), document.getElementById(x)?.focus();
|
|
546
545
|
return;
|
|
547
546
|
}
|
|
548
|
-
h.onKeyDown?.(f),
|
|
547
|
+
h.onKeyDown?.(f), s(!0);
|
|
549
548
|
}, F = () => {
|
|
550
|
-
|
|
549
|
+
s(!0);
|
|
551
550
|
}, O = (f) => {
|
|
552
551
|
if (!y) return;
|
|
553
552
|
const S = f.relatedTarget;
|
|
554
|
-
S && f.currentTarget.contains(S) ||
|
|
553
|
+
S && f.currentTarget.contains(S) || s(!1);
|
|
555
554
|
}, Y = (f) => {
|
|
556
555
|
f.preventDefault();
|
|
557
556
|
}, C = (f) => {
|
|
558
|
-
f.relatedTarget?.id === z &&
|
|
557
|
+
f.relatedTarget?.id === z && I(void 0), h.onBlur?.(f);
|
|
559
558
|
};
|
|
560
|
-
return p ? /* @__PURE__ */ E("div", { className:
|
|
561
|
-
/* @__PURE__ */
|
|
562
|
-
|
|
559
|
+
return p ? /* @__PURE__ */ E("div", { className: N.fieldContainer, children: [
|
|
560
|
+
/* @__PURE__ */ E(
|
|
561
|
+
ae,
|
|
563
562
|
{
|
|
564
|
-
size:
|
|
565
|
-
color:
|
|
563
|
+
size: A,
|
|
564
|
+
color: k,
|
|
566
565
|
label: d,
|
|
567
|
-
className: oe(
|
|
566
|
+
className: oe(N.field, b),
|
|
568
567
|
onBlurCapture: O,
|
|
569
|
-
children:
|
|
570
|
-
/* @__PURE__ */
|
|
571
|
-
|
|
568
|
+
children: [
|
|
569
|
+
/* @__PURE__ */ o(
|
|
570
|
+
ie,
|
|
572
571
|
{
|
|
573
572
|
...h,
|
|
574
573
|
id: x,
|
|
575
574
|
type: "search",
|
|
576
575
|
value: r,
|
|
577
|
-
className:
|
|
578
|
-
"data-collapsible":
|
|
576
|
+
className: N.input,
|
|
577
|
+
"data-collapsible": v,
|
|
579
578
|
autoCapitalize: "off",
|
|
580
579
|
autoComplete: "off",
|
|
581
|
-
minLength:
|
|
580
|
+
minLength: i,
|
|
582
581
|
onKeyDown: l,
|
|
583
582
|
onBlur: C,
|
|
584
583
|
...p && {
|
|
585
584
|
role: "combobox",
|
|
586
585
|
"aria-autocomplete": "list",
|
|
587
|
-
"aria-expanded": !!
|
|
586
|
+
"aria-expanded": !!w,
|
|
588
587
|
"aria-haspopup": "listbox",
|
|
589
588
|
"aria-controls": M,
|
|
590
|
-
"aria-activedescendant":
|
|
589
|
+
"aria-activedescendant": w ? a : void 0,
|
|
591
590
|
onFocus: F
|
|
592
591
|
}
|
|
593
592
|
}
|
|
594
593
|
),
|
|
595
|
-
/* @__PURE__ */
|
|
596
|
-
_ && !!r && /* @__PURE__ */
|
|
594
|
+
/* @__PURE__ */ o(ce, { className: N.icon }),
|
|
595
|
+
_ && !!r && /* @__PURE__ */ o("span", { className: N.clear, children: /* @__PURE__ */ o(
|
|
597
596
|
se,
|
|
598
597
|
{
|
|
599
598
|
id: z,
|
|
@@ -602,20 +601,20 @@ import './assets/SearchField.css';const Ce = "_search_18jfe_1", we = "_searchInp
|
|
|
602
601
|
rounded: !0,
|
|
603
602
|
icon: !0,
|
|
604
603
|
variant: "tinted",
|
|
605
|
-
className:
|
|
604
|
+
className: N.clearButton,
|
|
606
605
|
onClick: () => {
|
|
607
606
|
_?.(), document.getElementById(x)?.focus();
|
|
608
607
|
},
|
|
609
|
-
"aria-label":
|
|
608
|
+
"aria-label": D,
|
|
610
609
|
"data-action": "clear-input",
|
|
611
|
-
children: /* @__PURE__ */
|
|
610
|
+
children: /* @__PURE__ */ o(le, {})
|
|
612
611
|
}
|
|
613
612
|
) })
|
|
614
|
-
]
|
|
613
|
+
]
|
|
615
614
|
}
|
|
616
615
|
),
|
|
617
|
-
p &&
|
|
618
|
-
|
|
616
|
+
p && w && /* @__PURE__ */ o("div", { className: N.autocomplete, "aria-hidden": !w, onMouseDown: Y, children: /* @__PURE__ */ o(
|
|
617
|
+
_e,
|
|
619
618
|
{
|
|
620
619
|
...p,
|
|
621
620
|
id: M,
|
|
@@ -623,38 +622,38 @@ import './assets/SearchField.css';const Ce = "_search_18jfe_1", we = "_searchInp
|
|
|
623
622
|
groups: p?.groups,
|
|
624
623
|
keyboardEvents: !0,
|
|
625
624
|
a11yMode: "combobox",
|
|
626
|
-
open:
|
|
625
|
+
open: w,
|
|
627
626
|
autoFocusList: !1,
|
|
628
|
-
onActiveItemIdChange:
|
|
627
|
+
onActiveItemIdChange: I
|
|
629
628
|
}
|
|
630
629
|
) })
|
|
631
|
-
] }) : /* @__PURE__ */
|
|
632
|
-
|
|
630
|
+
] }) : /* @__PURE__ */ E(
|
|
631
|
+
ae,
|
|
633
632
|
{
|
|
634
|
-
size:
|
|
635
|
-
color:
|
|
633
|
+
size: A,
|
|
634
|
+
color: k,
|
|
636
635
|
label: d,
|
|
637
|
-
className: oe(
|
|
636
|
+
className: oe(N.field, b),
|
|
638
637
|
onBlurCapture: O,
|
|
639
|
-
children:
|
|
640
|
-
/* @__PURE__ */
|
|
641
|
-
|
|
638
|
+
children: [
|
|
639
|
+
/* @__PURE__ */ o(
|
|
640
|
+
ie,
|
|
642
641
|
{
|
|
643
642
|
...h,
|
|
644
643
|
id: x,
|
|
645
644
|
type: "search",
|
|
646
645
|
value: r,
|
|
647
|
-
className:
|
|
648
|
-
"data-collapsible":
|
|
646
|
+
className: N.input,
|
|
647
|
+
"data-collapsible": v,
|
|
649
648
|
autoCapitalize: "off",
|
|
650
649
|
autoComplete: "off",
|
|
651
|
-
minLength:
|
|
650
|
+
minLength: i,
|
|
652
651
|
onKeyDown: l,
|
|
653
652
|
onBlur: C
|
|
654
653
|
}
|
|
655
654
|
),
|
|
656
|
-
/* @__PURE__ */
|
|
657
|
-
_ && !!r && /* @__PURE__ */
|
|
655
|
+
/* @__PURE__ */ o(ce, { className: N.icon }),
|
|
656
|
+
_ && !!r && /* @__PURE__ */ o("span", { className: N.clear, children: /* @__PURE__ */ o(
|
|
658
657
|
se,
|
|
659
658
|
{
|
|
660
659
|
id: z,
|
|
@@ -663,23 +662,23 @@ import './assets/SearchField.css';const Ce = "_search_18jfe_1", we = "_searchInp
|
|
|
663
662
|
rounded: !0,
|
|
664
663
|
icon: !0,
|
|
665
664
|
variant: "tinted",
|
|
666
|
-
className:
|
|
665
|
+
className: N.clearButton,
|
|
667
666
|
onClick: () => {
|
|
668
667
|
_?.(), document.getElementById(x)?.focus();
|
|
669
668
|
},
|
|
670
|
-
"aria-label":
|
|
669
|
+
"aria-label": D,
|
|
671
670
|
"data-action": "clear-input",
|
|
672
|
-
children: /* @__PURE__ */
|
|
671
|
+
children: /* @__PURE__ */ o(le, {})
|
|
673
672
|
}
|
|
674
673
|
) })
|
|
675
|
-
]
|
|
674
|
+
]
|
|
676
675
|
}
|
|
677
676
|
);
|
|
678
677
|
};
|
|
679
678
|
export {
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
679
|
+
_e as M,
|
|
680
|
+
ue as S,
|
|
681
|
+
ke as V,
|
|
682
|
+
Ie as a,
|
|
683
|
+
xe as b
|
|
685
684
|
};
|