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