@altinn/altinn-components 0.56.1 → 0.56.2
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-BUp4_VIq.js → SearchField-CN2mo8ck.js} +42 -42
- package/dist/assets/Dropdown.css +1 -1
- package/dist/assets/QueryLabel.css +1 -1
- 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/Dropdown/Dropdown.js +32 -32
- package/dist/components/Forms/SearchField.js +1 -1
- 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/Searchbar/QueryLabel.js +5 -5
- package/dist/components/Toolbar/SelectDateFilter.js +1 -1
- package/dist/components/Toolbar/ToolbarFilter.js +33 -34
- package/dist/components/Toolbar/ToolbarFilterAddMenu.js +24 -22
- package/dist/components/Toolbar/ToolbarFilterMenu.js +53 -50
- package/dist/components/Toolbar/ToolbarMenu.js +19 -17
- 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/ToolbarFilterAddMenu.d.ts +3 -1
- package/dist/types/lib/components/Toolbar/ToolbarFilterMenu.d.ts +3 -1
- package/dist/types/lib/components/Toolbar/ToolbarMenu.d.ts +3 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as r, jsxs as L } from "react/jsx-runtime";
|
|
3
|
-
import { c as
|
|
3
|
+
import { c as fe } from "./index-p1eeF8LQ.js";
|
|
4
4
|
import { useRef as W, useState as X, useMemo as R, useEffect as j, Fragment as me, useLayoutEffect as oe, useId as ne } from "react";
|
|
5
5
|
import { Icon as he } from "./components/Icon/Icon.js";
|
|
6
6
|
import { Button as ye } from "./components/Button/Button.js";
|
|
@@ -27,7 +27,7 @@ import './assets/SearchField.css';const _e = "_search_18jfe_1", ke = "_searchInp
|
|
|
27
27
|
index: b,
|
|
28
28
|
name: M,
|
|
29
29
|
value: _,
|
|
30
|
-
placeholder:
|
|
30
|
+
placeholder: p = "Search",
|
|
31
31
|
clearButtonAltText: a = "Clear search",
|
|
32
32
|
onChange: A,
|
|
33
33
|
onClear: D,
|
|
@@ -50,7 +50,7 @@ import './assets/SearchField.css';const _e = "_search_18jfe_1", ke = "_searchInp
|
|
|
50
50
|
className: te.searchInput,
|
|
51
51
|
name: M,
|
|
52
52
|
value: _,
|
|
53
|
-
placeholder:
|
|
53
|
+
placeholder: p,
|
|
54
54
|
onChange: A,
|
|
55
55
|
onClear: D,
|
|
56
56
|
clearButtonAltText: a,
|
|
@@ -76,7 +76,7 @@ import './assets/SearchField.css';const _e = "_search_18jfe_1", ke = "_searchInp
|
|
|
76
76
|
className: te.searchInput,
|
|
77
77
|
name: M,
|
|
78
78
|
value: _,
|
|
79
|
-
placeholder:
|
|
79
|
+
placeholder: p,
|
|
80
80
|
onChange: A,
|
|
81
81
|
onClear: D,
|
|
82
82
|
clearButtonAltText: a,
|
|
@@ -91,12 +91,12 @@ import './assets/SearchField.css';const _e = "_search_18jfe_1", ke = "_searchInp
|
|
|
91
91
|
onFocus: w,
|
|
92
92
|
...k
|
|
93
93
|
}
|
|
94
|
-
) }),
|
|
94
|
+
) }), pe = ({
|
|
95
95
|
level: v = 0,
|
|
96
96
|
maxLevels: b,
|
|
97
97
|
expanded: M,
|
|
98
98
|
a11yMode: _ = "menu",
|
|
99
|
-
open:
|
|
99
|
+
open: p,
|
|
100
100
|
scrollToTopOnOpen: a = !1,
|
|
101
101
|
autoActivateFirstItem: A = !0,
|
|
102
102
|
autoFocusList: D = !0,
|
|
@@ -116,7 +116,7 @@ import './assets/SearchField.css';const _e = "_search_18jfe_1", ke = "_searchInp
|
|
|
116
116
|
}) => {
|
|
117
117
|
if (b && v >= b)
|
|
118
118
|
return null;
|
|
119
|
-
const
|
|
119
|
+
const f = _ === "combobox", u = f && s ? `${s}-listbox` : s, B = W(p), z = W(p), [Y, n] = X(!1), P = R(
|
|
120
120
|
() => g.map((o, x) => ({
|
|
121
121
|
...o,
|
|
122
122
|
id: o.id || `${s}-item-${x}`
|
|
@@ -135,20 +135,20 @@ import './assets/SearchField.css';const _e = "_search_18jfe_1", ke = "_searchInp
|
|
|
135
135
|
I?.($?.id);
|
|
136
136
|
}, [$?.id, I]), j(() => {
|
|
137
137
|
if (!a) {
|
|
138
|
-
B.current =
|
|
138
|
+
B.current = p;
|
|
139
139
|
return;
|
|
140
140
|
}
|
|
141
141
|
const o = B.current;
|
|
142
|
-
B.current =
|
|
143
|
-
}, [
|
|
142
|
+
B.current = p, p && !o && G.current?.scrollTo({ top: 0 });
|
|
143
|
+
}, [p, a]), j(() => {
|
|
144
144
|
const o = z.current;
|
|
145
|
-
z.current =
|
|
146
|
-
}, [
|
|
147
|
-
if (
|
|
145
|
+
z.current = p, !(!y || l || !D) && p && !o && requestAnimationFrame(() => G.current?.focus?.({ preventScroll: !0 }));
|
|
146
|
+
}, [p, y, l]), j(() => {
|
|
147
|
+
if (f && m) {
|
|
148
148
|
H(0), n(!0);
|
|
149
149
|
return;
|
|
150
150
|
}
|
|
151
|
-
}, [m,
|
|
151
|
+
}, [m, f, H]), /* @__PURE__ */ L(
|
|
152
152
|
Z,
|
|
153
153
|
{
|
|
154
154
|
variant: k,
|
|
@@ -156,17 +156,17 @@ import './assets/SearchField.css';const _e = "_search_18jfe_1", ke = "_searchInp
|
|
|
156
156
|
ref: G,
|
|
157
157
|
style: c,
|
|
158
158
|
id: u,
|
|
159
|
-
role:
|
|
159
|
+
role: f ? "listbox" : void 0,
|
|
160
160
|
tabIndex: y ? -1 : void 0,
|
|
161
161
|
children: [
|
|
162
162
|
l && /* @__PURE__ */ r(
|
|
163
163
|
de,
|
|
164
164
|
{
|
|
165
165
|
...l,
|
|
166
|
-
combobox:
|
|
166
|
+
combobox: f,
|
|
167
167
|
listId: u,
|
|
168
|
-
"aria-activedescendant":
|
|
169
|
-
onNavigate:
|
|
168
|
+
"aria-activedescendant": f && Y ? $?.id : void 0,
|
|
169
|
+
onNavigate: f ? () => n(!0) : void 0,
|
|
170
170
|
onChange: (o) => {
|
|
171
171
|
n(!1), l.onChange?.(o);
|
|
172
172
|
},
|
|
@@ -178,7 +178,7 @@ import './assets/SearchField.css';const _e = "_search_18jfe_1", ke = "_searchInp
|
|
|
178
178
|
},
|
|
179
179
|
onKeyDown: (o) => {
|
|
180
180
|
const x = o.key === "ArrowUp" || o.key === "ArrowDown", O = o.key.length === 1 || o.key === "Backspace" || o.key === "Delete";
|
|
181
|
-
|
|
181
|
+
f && !x && O && n(!1), l.onKeyDown?.(o);
|
|
182
182
|
}
|
|
183
183
|
}
|
|
184
184
|
),
|
|
@@ -189,13 +189,13 @@ import './assets/SearchField.css';const _e = "_search_18jfe_1", ke = "_searchInp
|
|
|
189
189
|
/* @__PURE__ */ r(ce, { hidden: q, children: /* @__PURE__ */ L(Z, { role: "presentation", children: [
|
|
190
190
|
F && /* @__PURE__ */ r(ue, { title: F, level: v }),
|
|
191
191
|
o?.items.filter((U) => !U.props?.hidden).map((U, e) => {
|
|
192
|
-
const { active: t, onMouseEnter: d } = U, { groupId: N, ...i } = U.props || {}, { expanded: K } = i, V = Array.isArray(i?.items) && i.items.length > 0, Q = i.role === "checkbox" || i.role === "radio", ee =
|
|
192
|
+
const { active: t, onMouseEnter: d } = U, { groupId: N, ...i } = U.props || {}, { expanded: K } = i, V = Array.isArray(i?.items) && i.items.length > 0, Q = i.role === "checkbox" || i.role === "radio", ee = f && !Q ? "option" : i.role;
|
|
193
193
|
return /* @__PURE__ */ L(
|
|
194
194
|
ae,
|
|
195
195
|
{
|
|
196
196
|
expanded: K,
|
|
197
197
|
onMouseLeave: () => H(-1),
|
|
198
|
-
role:
|
|
198
|
+
role: f || Q ? "presentation" : void 0,
|
|
199
199
|
children: [
|
|
200
200
|
/* @__PURE__ */ r(
|
|
201
201
|
ie,
|
|
@@ -206,7 +206,7 @@ import './assets/SearchField.css';const _e = "_search_18jfe_1", ke = "_searchInp
|
|
|
206
206
|
variant: i?.variant || O?.variant || k,
|
|
207
207
|
active: t,
|
|
208
208
|
role: ee,
|
|
209
|
-
selected:
|
|
209
|
+
selected: f && !Q ? t : i.selected,
|
|
210
210
|
tabIndex: i?.disabled || y ? -1 : i.tabIndex ?? 0,
|
|
211
211
|
onMouseEnter: d,
|
|
212
212
|
"aria-haspopup": V ? "menu" : void 0,
|
|
@@ -215,7 +215,7 @@ import './assets/SearchField.css';const _e = "_search_18jfe_1", ke = "_searchInp
|
|
|
215
215
|
}
|
|
216
216
|
),
|
|
217
217
|
K && i?.items && /* @__PURE__ */ r(
|
|
218
|
-
|
|
218
|
+
pe,
|
|
219
219
|
{
|
|
220
220
|
id: i.id + "-menu",
|
|
221
221
|
expanded: K,
|
|
@@ -240,7 +240,7 @@ import './assets/SearchField.css';const _e = "_search_18jfe_1", ke = "_searchInp
|
|
|
240
240
|
}
|
|
241
241
|
);
|
|
242
242
|
}, Ae = (v) => {
|
|
243
|
-
const b = W(null), M = W(null), [_,
|
|
243
|
+
const b = W(null), M = W(null), [_, p] = X(0), {
|
|
244
244
|
search: a,
|
|
245
245
|
items: A,
|
|
246
246
|
groups: D = {},
|
|
@@ -256,7 +256,7 @@ import './assets/SearchField.css';const _e = "_search_18jfe_1", ke = "_searchInp
|
|
|
256
256
|
scrollToTopOnOpen: y = !1,
|
|
257
257
|
autoActivateFirstItem: S = !0,
|
|
258
258
|
announceNoResults: I = !1,
|
|
259
|
-
onActiveItemIdChange:
|
|
259
|
+
onActiveItemIdChange: f
|
|
260
260
|
} = v, u = k === "combobox", B = u && s ? `${s}-listbox` : s, z = W(c), [Y, n] = X(!1), P = R(
|
|
261
261
|
() => A.map((e, t) => ({
|
|
262
262
|
...e,
|
|
@@ -278,7 +278,7 @@ import './assets/SearchField.css';const _e = "_search_18jfe_1", ke = "_searchInp
|
|
|
278
278
|
const e = M.current;
|
|
279
279
|
if (!e) return;
|
|
280
280
|
const t = Math.round(e.offsetTop);
|
|
281
|
-
|
|
281
|
+
p((d) => d === t ? d : t);
|
|
282
282
|
});
|
|
283
283
|
const F = R(() => {
|
|
284
284
|
const e = T?.id;
|
|
@@ -320,8 +320,8 @@ import './assets/SearchField.css';const _e = "_search_18jfe_1", ke = "_searchInp
|
|
|
320
320
|
}), { positions: e, total: t };
|
|
321
321
|
}, [o]);
|
|
322
322
|
j(() => {
|
|
323
|
-
|
|
324
|
-
}, [T?.id,
|
|
323
|
+
f?.(T?.id);
|
|
324
|
+
}, [T?.id, f]), j(() => {
|
|
325
325
|
if (u && I) {
|
|
326
326
|
H(0), n(!0);
|
|
327
327
|
return;
|
|
@@ -451,7 +451,7 @@ import './assets/SearchField.css';const _e = "_search_18jfe_1", ke = "_searchInp
|
|
|
451
451
|
search: b,
|
|
452
452
|
items: M = [],
|
|
453
453
|
groups: _ = {},
|
|
454
|
-
variant:
|
|
454
|
+
variant: p = "default",
|
|
455
455
|
size: a,
|
|
456
456
|
level: A = 0,
|
|
457
457
|
maxLevels: D = 3,
|
|
@@ -465,16 +465,16 @@ import './assets/SearchField.css';const _e = "_search_18jfe_1", ke = "_searchInp
|
|
|
465
465
|
autoFocusList: k,
|
|
466
466
|
id: c
|
|
467
467
|
}) => {
|
|
468
|
-
const y = we({ ...b, items: M, groups: _ }), S = v ? y.search : b, I = v && y.hasQuery && y.resultCount === 0,
|
|
468
|
+
const y = we({ ...b, items: M, groups: _ }), S = v ? y.search : b, I = v && y.hasQuery && y.resultCount === 0, f = v ? y.items : M, u = v ? { ..._, ...y.groups } : _, B = h !== "combobox";
|
|
469
469
|
return m ? /* @__PURE__ */ r(
|
|
470
470
|
Ae,
|
|
471
471
|
{
|
|
472
472
|
id: c,
|
|
473
473
|
search: S,
|
|
474
474
|
announceNoResults: I,
|
|
475
|
-
items:
|
|
475
|
+
items: f,
|
|
476
476
|
groups: u,
|
|
477
|
-
variant:
|
|
477
|
+
variant: p,
|
|
478
478
|
size: a,
|
|
479
479
|
level: A,
|
|
480
480
|
maxLevels: D,
|
|
@@ -488,14 +488,14 @@ import './assets/SearchField.css';const _e = "_search_18jfe_1", ke = "_searchInp
|
|
|
488
488
|
autoFocusList: k
|
|
489
489
|
}
|
|
490
490
|
) : /* @__PURE__ */ r(
|
|
491
|
-
|
|
491
|
+
pe,
|
|
492
492
|
{
|
|
493
493
|
id: c,
|
|
494
494
|
search: S,
|
|
495
495
|
announceNoResults: I,
|
|
496
|
-
items:
|
|
496
|
+
items: f,
|
|
497
497
|
groups: u,
|
|
498
|
-
variant:
|
|
498
|
+
variant: p,
|
|
499
499
|
size: a,
|
|
500
500
|
level: A,
|
|
501
501
|
maxLevels: D,
|
|
@@ -509,7 +509,7 @@ import './assets/SearchField.css';const _e = "_search_18jfe_1", ke = "_searchInp
|
|
|
509
509
|
autoFocusList: k
|
|
510
510
|
}
|
|
511
511
|
);
|
|
512
|
-
}, Ce = "
|
|
512
|
+
}, Ce = "_field_lyp0p_1", De = "_container_lyp0p_5", Be = "_icon_lyp0p_11", Fe = "_input_lyp0p_35", Se = "_clear_lyp0p_54", Ne = "_clearButton_lyp0p_66", ze = "_autocomplete_lyp0p_95", E = {
|
|
513
513
|
field: Ce,
|
|
514
514
|
container: De,
|
|
515
515
|
icon: Be,
|
|
@@ -522,7 +522,7 @@ import './assets/SearchField.css';const _e = "_search_18jfe_1", ke = "_searchInp
|
|
|
522
522
|
collapsible: b,
|
|
523
523
|
size: M,
|
|
524
524
|
color: _ = "neutral",
|
|
525
|
-
label:
|
|
525
|
+
label: p,
|
|
526
526
|
value: a,
|
|
527
527
|
onClear: A,
|
|
528
528
|
clearButtonAltText: D = "Clear search",
|
|
@@ -530,7 +530,7 @@ import './assets/SearchField.css';const _e = "_search_18jfe_1", ke = "_searchInp
|
|
|
530
530
|
minLength: l,
|
|
531
531
|
...g
|
|
532
532
|
}) => {
|
|
533
|
-
const C = ne(), [h, s] = X(!1), w = g.id || `search-field-${C}`, k = `${w}-listbox`, [c, y] = X(void 0), S = "searchfield-clear-button-" + ne(), I = R(() => !a || typeof l == "number" && typeof a == "string" && a.length < l ? !1 : h, [h, l, a]),
|
|
533
|
+
const C = ne(), [h, s] = X(!1), w = g.id || `search-field-${C}`, k = `${w}-listbox`, [c, y] = X(void 0), S = "searchfield-clear-button-" + ne(), I = R(() => !a || typeof l == "number" && typeof a == "string" && a.length < l ? !1 : h, [h, l, a]), f = R(() => (m?.items ?? []).map((n) => ({
|
|
534
534
|
...n,
|
|
535
535
|
onClick: () => {
|
|
536
536
|
n.onClick?.(), s(!1);
|
|
@@ -559,8 +559,8 @@ import './assets/SearchField.css';const _e = "_search_18jfe_1", ke = "_searchInp
|
|
|
559
559
|
{
|
|
560
560
|
size: M,
|
|
561
561
|
color: _,
|
|
562
|
-
label:
|
|
563
|
-
className:
|
|
562
|
+
label: p,
|
|
563
|
+
className: fe(E.field, v),
|
|
564
564
|
onBlurCapture: z,
|
|
565
565
|
children: [
|
|
566
566
|
/* @__PURE__ */ L("div", { className: E.container, children: [
|
|
@@ -614,7 +614,7 @@ import './assets/SearchField.css';const _e = "_search_18jfe_1", ke = "_searchInp
|
|
|
614
614
|
{
|
|
615
615
|
...m,
|
|
616
616
|
id: k,
|
|
617
|
-
items:
|
|
617
|
+
items: f,
|
|
618
618
|
groups: m?.groups,
|
|
619
619
|
keyboardEvents: !0,
|
|
620
620
|
a11yMode: "combobox",
|
|
@@ -631,6 +631,6 @@ export {
|
|
|
631
631
|
Me as M,
|
|
632
632
|
re as S,
|
|
633
633
|
Ae as V,
|
|
634
|
-
|
|
634
|
+
pe as a,
|
|
635
635
|
de as b
|
|
636
636
|
};
|
package/dist/assets/Dropdown.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._dropdown_15prw_1{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}._dropdown_15prw_1:focus{outline:none}._content_15prw_17{flex-grow:1}._dropdown_15prw_1[data-size=sm]{--var-width: 16rem;--var-min-width: 16rem;--var-max-width: 20rem}._dropdown_15prw_1[data-size=md]{--var-width: 20rem;--var-min-width: 20rem;--var-max-width: 24rem}._dropdown_15prw_1[data-size=lg]{--var-width: 24rem;--var-min-width: 24rem;--var-max-width: 28rem}._dropdown_15prw_1[aria-hidden=true]{display:none}._backdrop_15prw_47{z-index:1;background-color:#111d4640;position:fixed;inset:0;width:100%;height:100%}._backdrop_15prw_47[aria-hidden=true]{display:none}._dropdown_15prw_1{position:absolute;margin-top:.5rem;margin-bottom:.5rem;border-radius:.375rem}._dropdown_15prw_1[data-variant=dropdown] ._header_15prw_72,._dropdown_15prw_1[data-variant=dropdown] ._footer_15prw_73{display:none}._dropdown_15prw_1[data-variant=dropdown]{min-width:var(--var-min-width);max-width:var(--var-max-width);width:var(--var-width);max-height:80vh}._dropdown_15prw_1[data-variant=drawer]{position:fixed!important;inset:0!important;max-width:none!important;max-height:100vh!important;width:100%!important;margin-top:1rem;margin-bottom:0;border-bottom-left-radius:0;border-bottom-right-radius:0;padding-top:0}@media(max-width:1023px){._dropdown_15prw_1[data-variant=drawer-dropdown]{position:fixed!important;inset:0!important;max-width:none!important;max-height:100vh!important;width:100%!important;margin-top:1rem;margin-bottom:0;border-bottom-left-radius:0;border-bottom-right-radius:0;padding-top:0}}@media(min-width:1024px){._dropdown_15prw_1[data-variant=drawer-dropdown]{min-width:var(--var-min-width);max-width:var(--var-max-width);width:var(--var-width);max-height:80vh}._dropdown_15prw_1[data-variant=drawer-dropdown] ._header_15prw_72,._dropdown_15prw_1[data-variant=drawer-dropdown] ._footer_15prw_73{display:none}}._header_15prw_72{position:sticky;top:0;left:0;right:0;padding:1rem .5rem;display:flex;align-items:center;justify-content:space-between;background-color:var(--ds-color-background-default);border-bottom:1px solid var(--ds-color-border-subtle);z-index:999}._title_15prw_146{font-size:1.125rem;font-weight:500;margin:0}._footer_15prw_73{position:sticky;bottom:0;left:0;right:0;display:flex;flex-direction:column;align-items:center}._footer_15prw_73>*{margin:1rem auto}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._label_yf5z4_1{--dsc-item-font-size: .875rem;--dsc-item-padding-x: .5em;--dsc-item-padding-y: .25em;overflow:hidden;text-overflow:ellipsis;max-width:100%}._label_yf5z4_1[data-size=xs]{--dsc-item-font-size: .75rem;--dsc-item-padding-x: .25em;--dsc-item-padding-y: 0}._label_yf5z4_1{font-size:var(--dsc-item-font-size);display:flex;flex-wrap:wrap;align-items:center;column-gap:.25rem;row-gap:.25rem}._group_yf5z4_25{display:inline-flex;align-items:center;column-gap:.25rem}._plus_yf5z4_31{color:var(--ds-color-text-subtle)}._item_yf5z4_35{display:block;overflow:hidden;text-overflow:ellipsis;max-width:100%}._item_yf5z4_35[data-type=search]{background-color:transparent;font-weight:500;border-bottom:1px solid;padding:var(--dsc-item-padding-y) 0}._item_yf5z4_35[data-type=search]:before{content:"«"}._item_yf5z4_35[data-type=search]:after{content:"»"}._item_yf5z4_35[data-type=filter]{background-color:transparent;border:1px solid;font-weight:500;padding:var(--dsc-item-padding-y) var(--dsc-item-padding-x);border-radius:2px}
|
|
@@ -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}._field_lyp0p_1{position:relative}._container_lyp0p_5{position:relative;display:inline-flex;width:100%}._icon_lyp0p_11{position:absolute;top:0;bottom:0;left:0;width:2.5em;height:100%;color:var(--ds-color-text-subtle);display:flex;justify-content:center;align-items:center;pointer-events:none}._icon_lyp0p_11>*{pointer-events:none}._icon_lyp0p_11>svg{font-size:1.25em;width:1.25em;height:1.25em}._input_lyp0p_35{padding-left:2.25em;padding-right:2.25em}._input_lyp0p_35[type=search]::-webkit-search-decoration,._input_lyp0p_35[type=search]::-webkit-search-cancel-button{appearance:none}@media(max-width:1023px){._field_lyp0p_1[data-size=xs] input[type=search]{font-size:1rem;padding-left:2em;padding-right:2em}}._clear_lyp0p_54{position:absolute;top:0;right:0;bottom:0;width:2.5em;height:100%;display:flex;justify-content:center;align-items:center}._clearButton_lyp0p_66[data-size=xs]{--dsc-button-size: 2.5em;--dsc-button-padding: 0;font-size:.75em;border:none}._clearButton_lyp0p_66:focus-visible{outline-offset:0;outline-width:2px}._input_lyp0p_35[data-collapsible=true]{transition:width .5s ease-in-out}._input_lyp0p_35[data-collapsible=true]:placeholder-shown{background-color:transparent;width:8rem}._input_lyp0p_35[data-collapsible=true]:focus,._input_lyp0p_35[data-collapsible=true]:not(:placeholder-shown){width:auto;background-color:var(--ds-color-background-default)}._autocomplete_lyp0p_95{--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_lyp0p_95{--var-max-width: 100%;--var-width: 100%}}._autocomplete_lyp0p_95[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-CN2mo8ck.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-CN2mo8ck.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-CN2mo8ck.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,11 +1,11 @@
|
|
|
1
1
|
import { jsxs as g, Fragment as U, jsx as c } from "react/jsx-runtime";
|
|
2
2
|
import { c as Y } from "../../index-p1eeF8LQ.js";
|
|
3
|
-
import { useRef as _, useEffect as
|
|
3
|
+
import { useRef as _, useEffect as y, useState as M, useCallback as O, useLayoutEffect as W } from "react";
|
|
4
4
|
import { Button as F } from "../Button/Button.js";
|
|
5
5
|
import "../RootProvider/RootProvider.js";
|
|
6
6
|
import "../Snackbar/useSnackbar.js";
|
|
7
7
|
import { S as G } from "../../XMark-tKk6aExO.js";
|
|
8
|
-
import '../../assets/Dropdown.css';const P = "
|
|
8
|
+
import '../../assets/Dropdown.css';const P = "_dropdown_15prw_1", $ = "_content_15prw_17", J = "_backdrop_15prw_47", Q = "_header_15prw_72", V = "_footer_15prw_73", Z = "_title_15prw_146", a = {
|
|
9
9
|
dropdown: P,
|
|
10
10
|
content: $,
|
|
11
11
|
backdrop: J,
|
|
@@ -13,7 +13,7 @@ import '../../assets/Dropdown.css';const P = "_dropdown_4f5qx_1", $ = "_content_
|
|
|
13
13
|
footer: V,
|
|
14
14
|
title: Z
|
|
15
15
|
}, tt = "data-focus-guard", A = (l) => {
|
|
16
|
-
const
|
|
16
|
+
const w = [
|
|
17
17
|
"a[href]",
|
|
18
18
|
"button:not([disabled])",
|
|
19
19
|
"input:not([disabled])",
|
|
@@ -22,7 +22,7 @@ import '../../assets/Dropdown.css';const P = "_dropdown_4f5qx_1", $ = "_content_
|
|
|
22
22
|
'[tabindex]:not([tabindex="-1"])',
|
|
23
23
|
'[contenteditable="true"]'
|
|
24
24
|
].join(",");
|
|
25
|
-
return Array.from(l.querySelectorAll(
|
|
25
|
+
return Array.from(l.querySelectorAll(w)).filter((o) => !o.hasAttribute(tt)).filter((o) => !o.hasAttribute("disabled")).filter((o) => o.getAttribute("aria-hidden") !== "true").filter((o) => o.tabIndex !== -1).filter((o) => {
|
|
26
26
|
const u = o.getClientRects();
|
|
27
27
|
return u.length > 0 && u[0].width > 0 && u[0].height > 0;
|
|
28
28
|
});
|
|
@@ -30,41 +30,41 @@ import '../../assets/Dropdown.css';const P = "_dropdown_4f5qx_1", $ = "_content_
|
|
|
30
30
|
A(l)[0]?.focus({ preventScroll: !0 });
|
|
31
31
|
}, lt = ({
|
|
32
32
|
id: l = "dropdown",
|
|
33
|
-
size:
|
|
33
|
+
size: w = "sm",
|
|
34
34
|
className: o,
|
|
35
35
|
backdrop: u = !0,
|
|
36
36
|
placement: k = "bottom-left",
|
|
37
37
|
variant: D = "dropdown",
|
|
38
38
|
title: L = "Title",
|
|
39
|
-
closeLabel:
|
|
39
|
+
closeLabel: z = "Close",
|
|
40
40
|
submitLabel: E,
|
|
41
|
-
trigger:
|
|
42
|
-
children:
|
|
41
|
+
trigger: H,
|
|
42
|
+
children: C,
|
|
43
43
|
open: e,
|
|
44
44
|
onClose: f,
|
|
45
|
-
onSubmit:
|
|
46
|
-
activeDescendantId:
|
|
45
|
+
onSubmit: N,
|
|
46
|
+
activeDescendantId: B
|
|
47
47
|
}) => {
|
|
48
48
|
const h = _(null), m = _(null), R = _(e);
|
|
49
|
-
|
|
49
|
+
y(() => {
|
|
50
50
|
R.current = e;
|
|
51
51
|
}, [e]);
|
|
52
|
-
const [
|
|
52
|
+
const [x, I] = M({
|
|
53
53
|
yDir: k.includes("top") ? "top" : "bottom",
|
|
54
54
|
xDir: k.includes("right") ? "right" : "left",
|
|
55
55
|
maxHeight: 300
|
|
56
|
-
}),
|
|
56
|
+
}), v = O(() => {
|
|
57
57
|
if (e && h.current && m.current) {
|
|
58
|
-
const t = h.current.getBoundingClientRect(), i = m.current.getBoundingClientRect(), n = window.innerHeight, r = window.innerWidth, s = 16, d = n - t.bottom, p = t.top, b = r - t.right - i.width, S = d < 250 && p > d,
|
|
59
|
-
|
|
58
|
+
const t = h.current.getBoundingClientRect(), i = m.current.getBoundingClientRect(), n = window.innerHeight, r = window.innerWidth, s = 16, d = n - t.bottom, p = t.top, b = r - t.right - i.width, S = d < 250 && p > d, X = S ? "top" : "bottom", j = (S ? p : d) - s, q = b < s ? "right" : "left";
|
|
59
|
+
I((K) => ({
|
|
60
60
|
...K,
|
|
61
|
-
yDir:
|
|
62
|
-
maxHeight:
|
|
63
|
-
xDir:
|
|
61
|
+
yDir: X,
|
|
62
|
+
maxHeight: j,
|
|
63
|
+
xDir: q
|
|
64
64
|
}));
|
|
65
65
|
}
|
|
66
66
|
}, [e]);
|
|
67
|
-
W(() => (
|
|
67
|
+
W(() => (v(), window.addEventListener("resize", v), () => window.removeEventListener("resize", v)), [v]), y(() => {
|
|
68
68
|
if (!e) return;
|
|
69
69
|
const t = requestAnimationFrame(() => {
|
|
70
70
|
const i = m.current;
|
|
@@ -84,7 +84,7 @@ import '../../assets/Dropdown.css';const P = "_dropdown_4f5qx_1", $ = "_content_
|
|
|
84
84
|
i.focus?.({ preventScroll: !0 });
|
|
85
85
|
});
|
|
86
86
|
return () => cancelAnimationFrame(t);
|
|
87
|
-
}, [e]),
|
|
87
|
+
}, [e]), y(() => {
|
|
88
88
|
const t = (n) => {
|
|
89
89
|
n.key === "Escape" && f();
|
|
90
90
|
}, i = (n) => {
|
|
@@ -93,7 +93,7 @@ import '../../assets/Dropdown.css';const P = "_dropdown_4f5qx_1", $ = "_content_
|
|
|
93
93
|
return e && (document.addEventListener("mousedown", i), document.addEventListener("keydown", t)), () => {
|
|
94
94
|
document.removeEventListener("mousedown", i), document.removeEventListener("keydown", t);
|
|
95
95
|
};
|
|
96
|
-
}, [e, f]),
|
|
96
|
+
}, [e, f]), y(() => {
|
|
97
97
|
if (!e) return;
|
|
98
98
|
const t = m.current;
|
|
99
99
|
if (!t) return;
|
|
@@ -116,39 +116,39 @@ import '../../assets/Dropdown.css';const P = "_dropdown_4f5qx_1", $ = "_content_
|
|
|
116
116
|
document.removeEventListener("focusin", i), document.removeEventListener("keydown", n);
|
|
117
117
|
};
|
|
118
118
|
}, [e]);
|
|
119
|
-
const
|
|
119
|
+
const T = {
|
|
120
120
|
position: "absolute",
|
|
121
121
|
zIndex: 50,
|
|
122
122
|
width: "max-content",
|
|
123
|
-
maxHeight: `${
|
|
123
|
+
maxHeight: `${x.maxHeight}px`,
|
|
124
124
|
overflowY: "auto",
|
|
125
|
-
[
|
|
126
|
-
[
|
|
125
|
+
[x.xDir]: 0,
|
|
126
|
+
[x.yDir === "bottom" ? "top" : "bottom"]: "100%"
|
|
127
127
|
};
|
|
128
128
|
return /* @__PURE__ */ g(U, { children: [
|
|
129
129
|
u && /* @__PURE__ */ c("div", { className: a.backdrop, "aria-hidden": !e }),
|
|
130
130
|
/* @__PURE__ */ g("div", { id: l + "-root", ref: h, style: { position: "relative", display: "inline-block" }, children: [
|
|
131
|
-
|
|
131
|
+
H,
|
|
132
132
|
/* @__PURE__ */ g(
|
|
133
133
|
"div",
|
|
134
134
|
{
|
|
135
135
|
ref: m,
|
|
136
136
|
className: Y(a.dropdown, o),
|
|
137
|
-
style:
|
|
137
|
+
style: T,
|
|
138
138
|
"aria-hidden": !e,
|
|
139
139
|
"data-variant": D,
|
|
140
|
-
"data-size":
|
|
140
|
+
"data-size": w,
|
|
141
141
|
tabIndex: -1,
|
|
142
142
|
role: "menu",
|
|
143
143
|
"aria-modal": D === "drawer-dropdown" ? !0 : void 0,
|
|
144
|
-
"aria-activedescendant":
|
|
144
|
+
"aria-activedescendant": B,
|
|
145
145
|
children: [
|
|
146
146
|
/* @__PURE__ */ g("header", { className: a.header, children: [
|
|
147
147
|
/* @__PURE__ */ c("h2", { className: a.title, children: L }),
|
|
148
|
-
/* @__PURE__ */ c(F, { size: "sm", variant: "outline", onClick: f, "aria-label":
|
|
148
|
+
/* @__PURE__ */ c(F, { size: "sm", variant: "outline", onClick: f, "aria-label": z, children: /* @__PURE__ */ c(G, {}) })
|
|
149
149
|
] }),
|
|
150
|
-
/* @__PURE__ */ c("div", { className: a.content, children:
|
|
151
|
-
E && /* @__PURE__ */ c("footer", { className: a.footer, children: /* @__PURE__ */ c(F, { size: "lg", variant: "solid", onClick:
|
|
150
|
+
/* @__PURE__ */ c("div", { className: a.content, children: C }),
|
|
151
|
+
E && /* @__PURE__ */ c("footer", { className: a.footer, children: /* @__PURE__ */ c(F, { size: "lg", variant: "solid", onClick: N || f, rounded: !0, children: /* @__PURE__ */ c("span", { "data-size": "md", children: E }) }) })
|
|
152
152
|
]
|
|
153
153
|
}
|
|
154
154
|
)
|
|
@@ -4,7 +4,7 @@ import "react";
|
|
|
4
4
|
import "../Icon/Icon.js";
|
|
5
5
|
import "../Button/Button.js";
|
|
6
6
|
import "../RootProvider/RootProvider.js";
|
|
7
|
-
import { S as l } from "../../SearchField-
|
|
7
|
+
import { S as l } from "../../SearchField-CN2mo8ck.js";
|
|
8
8
|
import "./Input.js";
|
|
9
9
|
import "./FieldBase.js";
|
|
10
10
|
import "../Snackbar/useSnackbar.js";
|
|
@@ -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-CN2mo8ck.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-CN2mo8ck.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-CN2mo8ck.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-CN2mo8ck.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-CN2mo8ck.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-CN2mo8ck.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 d } 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-CN2mo8ck.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-CN2mo8ck.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-CN2mo8ck.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-CN2mo8ck.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-CN2mo8ck.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,12 +1,12 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import '../../assets/QueryLabel.css';const n = "
|
|
1
|
+
import { jsx as e, jsxs as c } from "react/jsx-runtime";
|
|
2
|
+
import '../../assets/QueryLabel.css';const n = "_label_yf5z4_1", o = "_group_yf5z4_25", p = "_plus_yf5z4_31", m = "_item_yf5z4_35", l = {
|
|
3
3
|
label: n,
|
|
4
4
|
group: o,
|
|
5
5
|
plus: p,
|
|
6
6
|
item: m
|
|
7
|
-
}, u = ({ type:
|
|
8
|
-
/* @__PURE__ */
|
|
9
|
-
|
|
7
|
+
}, u = ({ type: s = "search", label: t }) => /* @__PURE__ */ e("span", { className: l.item, "data-type": s, children: t }), i = ({ params: s = [], size: t = "sm" }) => /* @__PURE__ */ e("div", { className: l.label, "data-size": t, children: s.map((r, a) => /* @__PURE__ */ c("div", { className: l.group, children: [
|
|
8
|
+
/* @__PURE__ */ e(u, { ...r }),
|
|
9
|
+
s[a + 1] && /* @__PURE__ */ e("span", { className: l.plus, children: "+" })
|
|
10
10
|
] }, a)) });
|
|
11
11
|
export {
|
|
12
12
|
u as QueryItem,
|
|
@@ -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-CN2mo8ck.js";
|
|
4
4
|
import "../../index-p1eeF8LQ.js";
|
|
5
5
|
import "../Button/Button.js";
|
|
6
6
|
import "../RootProvider/RootProvider.js";
|
|
@@ -1,79 +1,78 @@
|
|
|
1
|
-
import { jsxs as g, jsx as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { Button as
|
|
1
|
+
import { jsxs as g, Fragment as f, jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import { useState as B, createElement as I } from "react";
|
|
3
|
+
import { Button as L } from "../Button/Button.js";
|
|
4
4
|
import "../../index-p1eeF8LQ.js";
|
|
5
5
|
import "../RootProvider/RootProvider.js";
|
|
6
6
|
import "../Snackbar/useSnackbar.js";
|
|
7
|
-
import { useFilter as
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { ToolbarFilterMenu as O } from "./ToolbarFilterMenu.js";
|
|
7
|
+
import { useFilter as N } from "./useFilter.js";
|
|
8
|
+
import { ToolbarFilterAddMenu as O } from "./ToolbarFilterAddMenu.js";
|
|
9
|
+
import { ToolbarFilterMenu as w } from "./ToolbarFilterMenu.js";
|
|
11
10
|
import { S as y } from "../../XMark-tKk6aExO.js";
|
|
12
|
-
const
|
|
11
|
+
const U = ({
|
|
13
12
|
filters: n,
|
|
14
13
|
filterState: e = {},
|
|
15
14
|
onFilterStateChange: r,
|
|
16
|
-
addLabel:
|
|
17
|
-
addNextLabel:
|
|
18
|
-
resetLabel:
|
|
19
|
-
removeLabel:
|
|
20
|
-
submitLabel:
|
|
15
|
+
addLabel: b = "Legg til filter",
|
|
16
|
+
addNextLabel: v = "Legg til",
|
|
17
|
+
resetLabel: u = "Nullstill",
|
|
18
|
+
removeLabel: F = "Fjern filter",
|
|
19
|
+
submitLabel: h,
|
|
21
20
|
getFilterLabel: T,
|
|
22
21
|
virtualized: j
|
|
23
22
|
}) => {
|
|
24
|
-
const { visibleFilters:
|
|
23
|
+
const { visibleFilters: m, hiddenFilters: s, onFilterAdd: R, onFilterChange: k, onFilterRemove: i } = N({
|
|
25
24
|
filters: n,
|
|
26
25
|
filterState: e,
|
|
27
26
|
onFilterStateChange: r
|
|
28
|
-
}),
|
|
27
|
+
}), x = (n?.filter((o) => o.removable)?.length || 0) > 0 && Object.values(e)?.some((o) => o && o?.length > 0), A = n?.filter((o) => o.removable)?.map((o) => o.name) ?? [], [a, d] = B(void 0), p = (o) => {
|
|
29
28
|
d((t) => t === o ? void 0 : o);
|
|
30
29
|
}, c = () => {
|
|
31
30
|
d(void 0);
|
|
32
|
-
},
|
|
33
|
-
for (const o of
|
|
31
|
+
}, C = () => {
|
|
32
|
+
for (const o of A)
|
|
34
33
|
i(o);
|
|
35
34
|
r?.({});
|
|
36
35
|
};
|
|
37
|
-
return /* @__PURE__ */ g(
|
|
38
|
-
|
|
39
|
-
const
|
|
40
|
-
return /* @__PURE__ */
|
|
41
|
-
|
|
36
|
+
return /* @__PURE__ */ g(f, { children: [
|
|
37
|
+
m?.map((o, t) => {
|
|
38
|
+
const M = T?.(o?.name, e?.[o?.id]) ?? o?.label;
|
|
39
|
+
return /* @__PURE__ */ I(
|
|
40
|
+
w,
|
|
42
41
|
{
|
|
43
42
|
...o,
|
|
44
|
-
submitLabel:
|
|
43
|
+
submitLabel: h,
|
|
45
44
|
key: t,
|
|
46
45
|
onToggle: () => p(o.name),
|
|
47
46
|
onClose: c,
|
|
48
47
|
open: a === o.name,
|
|
49
|
-
label:
|
|
48
|
+
label: M,
|
|
50
49
|
onRemove: () => i(o.name),
|
|
51
|
-
removeLabel:
|
|
52
|
-
onFilterChange:
|
|
50
|
+
removeLabel: F,
|
|
51
|
+
onFilterChange: k,
|
|
53
52
|
onFilterStateChange: r,
|
|
54
53
|
filterState: e
|
|
55
54
|
}
|
|
56
55
|
);
|
|
57
56
|
}),
|
|
58
|
-
s?.length > 0 && /* @__PURE__ */
|
|
59
|
-
|
|
57
|
+
s?.length > 0 && /* @__PURE__ */ l(
|
|
58
|
+
O,
|
|
60
59
|
{
|
|
61
60
|
name: "add",
|
|
62
61
|
onToggle: () => p("add"),
|
|
63
62
|
onClose: c,
|
|
64
63
|
open: a === "add",
|
|
65
64
|
items: s,
|
|
66
|
-
onAdd:
|
|
67
|
-
label:
|
|
65
|
+
onAdd: R,
|
|
66
|
+
label: m?.length > 0 ? v : b,
|
|
68
67
|
virtualized: j
|
|
69
68
|
}
|
|
70
69
|
),
|
|
71
|
-
|
|
72
|
-
/* @__PURE__ */
|
|
73
|
-
/* @__PURE__ */
|
|
70
|
+
x && /* @__PURE__ */ g(L, { onClick: C, variant: "ghost", children: [
|
|
71
|
+
/* @__PURE__ */ l(y, { "aria-hidden": "true" }),
|
|
72
|
+
/* @__PURE__ */ l("span", { children: u })
|
|
74
73
|
] })
|
|
75
74
|
] });
|
|
76
75
|
};
|
|
77
76
|
export {
|
|
78
|
-
|
|
77
|
+
U as ToolbarFilter
|
|
79
78
|
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as s, jsxs as
|
|
3
|
-
import u, { forwardRef as
|
|
4
|
-
import { Button as
|
|
2
|
+
import { jsx as s, jsxs as v } from "react/jsx-runtime";
|
|
3
|
+
import u, { forwardRef as y, useRef as m, useEffect as w } from "react";
|
|
4
|
+
import { Button as b } from "../Button/Button.js";
|
|
5
5
|
import "../../index-p1eeF8LQ.js";
|
|
6
|
-
import { Dropdown as
|
|
6
|
+
import { Dropdown as O } from "../Dropdown/Dropdown.js";
|
|
7
7
|
import "../RootProvider/RootProvider.js";
|
|
8
|
-
import { M as
|
|
9
|
-
import { useDropdownMenuController as
|
|
8
|
+
import { M as I } from "../../SearchField-CN2mo8ck.js";
|
|
9
|
+
import { useDropdownMenuController as x } from "../Menu/useDropdownMenuController.js";
|
|
10
10
|
import "../Snackbar/useSnackbar.js";
|
|
11
|
-
import { u as
|
|
12
|
-
var
|
|
11
|
+
import { u as R } from "../../useId-BVFxCjkq.js";
|
|
12
|
+
var j = function(t, a) {
|
|
13
13
|
var o = {};
|
|
14
14
|
for (var e in t) Object.prototype.hasOwnProperty.call(t, e) && a.indexOf(e) < 0 && (o[e] = t[e]);
|
|
15
15
|
if (t != null && typeof Object.getOwnPropertySymbols == "function")
|
|
@@ -17,9 +17,9 @@ var R = function(t, a) {
|
|
|
17
17
|
a.indexOf(e[r]) < 0 && Object.prototype.propertyIsEnumerable.call(t, e[r]) && (o[e[r]] = t[e[r]]);
|
|
18
18
|
return o;
|
|
19
19
|
};
|
|
20
|
-
const
|
|
21
|
-
var { title: o, titleId: e } = t, r =
|
|
22
|
-
let i =
|
|
20
|
+
const C = y((t, a) => {
|
|
21
|
+
var { title: o, titleId: e } = t, r = j(t, ["title", "titleId"]);
|
|
22
|
+
let i = R();
|
|
23
23
|
return i = o ? e || "title-" + i : void 0, u.createElement(
|
|
24
24
|
"svg",
|
|
25
25
|
Object.assign({ xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", fill: "none", viewBox: "0 0 24 24", focusable: !1, role: "img", ref: a, "aria-labelledby": i }, r),
|
|
@@ -33,28 +33,30 @@ const j = v((t, a) => {
|
|
|
33
33
|
onAdd: e,
|
|
34
34
|
onToggle: r,
|
|
35
35
|
onClose: i,
|
|
36
|
-
open: n
|
|
36
|
+
open: n,
|
|
37
|
+
dropdownSize: p = "sm"
|
|
37
38
|
}) => {
|
|
38
|
-
const l =
|
|
39
|
+
const l = x({ id: "tool-filter-add" }), f = m(n), g = m(!1), c = a?.map((d) => ({
|
|
39
40
|
linkIcon: !0,
|
|
40
41
|
...d,
|
|
41
42
|
onClick: () => e?.(d?.name ?? "")
|
|
42
43
|
}));
|
|
43
|
-
if (
|
|
44
|
+
if (w(() => {
|
|
44
45
|
const d = f.current;
|
|
45
46
|
f.current = n, d && !n && l?.triggerRef?.current?.focus();
|
|
46
47
|
}, [n, l.triggerRef]), !c?.length)
|
|
47
48
|
return null;
|
|
48
|
-
const
|
|
49
|
+
const h = () => {
|
|
49
50
|
const d = document.getElementById(l.menuId);
|
|
50
|
-
|
|
51
|
+
g.current = !!d?.querySelector('[aria-haspopup="menu"][aria-expanded="true"]'), i();
|
|
51
52
|
};
|
|
52
53
|
return /* @__PURE__ */ s(
|
|
53
|
-
|
|
54
|
+
O,
|
|
54
55
|
{
|
|
55
56
|
variant: "drawer-dropdown",
|
|
56
|
-
|
|
57
|
-
|
|
57
|
+
size: p,
|
|
58
|
+
trigger: /* @__PURE__ */ v(
|
|
59
|
+
b,
|
|
58
60
|
{
|
|
59
61
|
variant: "secondary",
|
|
60
62
|
style: {
|
|
@@ -66,15 +68,15 @@ const j = v((t, a) => {
|
|
|
66
68
|
onClick: r,
|
|
67
69
|
ref: l.triggerRef,
|
|
68
70
|
children: [
|
|
69
|
-
/* @__PURE__ */ s(
|
|
71
|
+
/* @__PURE__ */ s(C, { "aria-hidden": "true", focusable: "false" }),
|
|
70
72
|
/* @__PURE__ */ s("span", { children: t })
|
|
71
73
|
]
|
|
72
74
|
}
|
|
73
75
|
),
|
|
74
76
|
open: n,
|
|
75
|
-
onClose:
|
|
77
|
+
onClose: h,
|
|
76
78
|
...l.dropdownA11yProps,
|
|
77
|
-
children: /* @__PURE__ */ s(
|
|
79
|
+
children: /* @__PURE__ */ s(I, { groups: o, items: c, maxLevels: 1, keyboardEvents: n, open: n, ...l.menuA11yProps })
|
|
78
80
|
}
|
|
79
81
|
);
|
|
80
82
|
};
|
|
@@ -1,116 +1,119 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { useRef as
|
|
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
|
|
6
|
-
import { useDropdownMenuController as
|
|
5
|
+
import { M as H } from "../../SearchField-CN2mo8ck.js";
|
|
6
|
+
import { useDropdownMenuController as J } from "../Menu/useDropdownMenuController.js";
|
|
7
7
|
import "../RootProvider/RootProvider.js";
|
|
8
8
|
import "../Snackbar/useSnackbar.js";
|
|
9
|
-
import { Dropdown as
|
|
10
|
-
import { ToolbarFilterButton as
|
|
9
|
+
import { Dropdown as I } from "../Dropdown/Dropdown.js";
|
|
10
|
+
import { ToolbarFilterButton as R } from "./ToolbarFilterButton.js";
|
|
11
11
|
const L = ({
|
|
12
|
-
as:
|
|
13
|
-
size:
|
|
12
|
+
as: F,
|
|
13
|
+
size: s,
|
|
14
14
|
name: n,
|
|
15
|
-
label:
|
|
16
|
-
searchable:
|
|
15
|
+
label: a = "",
|
|
16
|
+
searchable: m,
|
|
17
17
|
groups: f,
|
|
18
18
|
items: l,
|
|
19
|
-
removable:
|
|
20
|
-
removeLabel:
|
|
21
|
-
filterState:
|
|
19
|
+
removable: P,
|
|
20
|
+
removeLabel: E = "Fjern filter",
|
|
21
|
+
filterState: d,
|
|
22
22
|
onFilterStateChange: p,
|
|
23
|
-
onFilterChange:
|
|
24
|
-
onRemove:
|
|
23
|
+
onFilterChange: j,
|
|
24
|
+
onRemove: C,
|
|
25
25
|
open: t,
|
|
26
26
|
onToggle: g,
|
|
27
27
|
onClose: u,
|
|
28
28
|
submitLabel: v,
|
|
29
|
-
search:
|
|
30
|
-
virtualized:
|
|
29
|
+
search: y,
|
|
30
|
+
virtualized: w,
|
|
31
31
|
title: b,
|
|
32
|
-
variant:
|
|
32
|
+
variant: D,
|
|
33
|
+
dropdownSize: x = "sm"
|
|
33
34
|
}) => {
|
|
34
|
-
const
|
|
35
|
-
|
|
36
|
-
const r =
|
|
37
|
-
|
|
35
|
+
const M = q(t), o = J({ id: "toolbar-filter-menu" });
|
|
36
|
+
G(() => {
|
|
37
|
+
const r = M.current;
|
|
38
|
+
M.current = t, r && !t && o?.triggerRef?.current?.focus();
|
|
38
39
|
}, [t, o.triggerRef]);
|
|
39
|
-
const
|
|
40
|
-
const c = r.target.type,
|
|
41
|
-
|
|
42
|
-
},
|
|
40
|
+
const O = (r) => {
|
|
41
|
+
const c = r.target.type, B = r.target.name, T = r.target.value;
|
|
42
|
+
j?.(c, B, T), c === "radio" && u();
|
|
43
|
+
}, h = l?.map((r) => ({
|
|
43
44
|
...r,
|
|
44
|
-
onChange: (c) =>
|
|
45
|
-
})),
|
|
46
|
-
return
|
|
47
|
-
|
|
45
|
+
onChange: (c) => O(c)
|
|
46
|
+
})), V = (l?.filter((r) => r.checked)?.map((r) => r.value || "true")).length > 0 || d?.[n]?.length, k = D || V ? "tinted" : "outline", A = F || H, i = m ? "combobox" : "menu";
|
|
47
|
+
return P ? /* @__PURE__ */ e(
|
|
48
|
+
I,
|
|
48
49
|
{
|
|
49
50
|
submitLabel: v,
|
|
50
51
|
title: b,
|
|
51
52
|
variant: "drawer-dropdown",
|
|
53
|
+
size: x,
|
|
52
54
|
trigger: /* @__PURE__ */ e(
|
|
53
|
-
|
|
55
|
+
R,
|
|
54
56
|
{
|
|
55
57
|
name: n,
|
|
56
58
|
onClick: g,
|
|
57
|
-
onRemove:
|
|
59
|
+
onRemove: C,
|
|
58
60
|
removable: !0,
|
|
59
|
-
variant:
|
|
60
|
-
removeLabel:
|
|
61
|
+
variant: k,
|
|
62
|
+
removeLabel: E,
|
|
61
63
|
open: t,
|
|
62
64
|
"aria-expanded": t,
|
|
63
65
|
"aria-controls": o.menuId,
|
|
64
66
|
ref: o.triggerRef,
|
|
65
|
-
children:
|
|
67
|
+
children: a
|
|
66
68
|
}
|
|
67
69
|
),
|
|
68
70
|
open: t,
|
|
69
71
|
onClose: u,
|
|
70
72
|
...o.dropdownA11yProps,
|
|
71
73
|
children: /* @__PURE__ */ e(
|
|
72
|
-
|
|
74
|
+
A,
|
|
73
75
|
{
|
|
74
|
-
search:
|
|
76
|
+
search: y,
|
|
75
77
|
name: n,
|
|
76
|
-
filterState:
|
|
78
|
+
filterState: d,
|
|
77
79
|
onFilterStateChange: p,
|
|
78
|
-
size:
|
|
79
|
-
searchable:
|
|
80
|
+
size: s,
|
|
81
|
+
searchable: m,
|
|
80
82
|
groups: f,
|
|
81
|
-
items:
|
|
83
|
+
items: h,
|
|
82
84
|
keyboardEvents: t,
|
|
83
85
|
a11yMode: i,
|
|
84
86
|
...i === "combobox" ? { id: o.menuId } : o.menuA11yProps,
|
|
85
|
-
virtualized:
|
|
87
|
+
virtualized: w
|
|
86
88
|
}
|
|
87
89
|
)
|
|
88
90
|
}
|
|
89
91
|
) : /* @__PURE__ */ e(
|
|
90
|
-
|
|
92
|
+
I,
|
|
91
93
|
{
|
|
94
|
+
size: x,
|
|
92
95
|
title: b,
|
|
93
96
|
variant: "drawer-dropdown",
|
|
94
97
|
submitLabel: v,
|
|
95
|
-
trigger: /* @__PURE__ */ e(
|
|
98
|
+
trigger: /* @__PURE__ */ e(R, { name: n, onClick: g, variant: k, children: a }),
|
|
96
99
|
open: t,
|
|
97
100
|
onClose: u,
|
|
98
101
|
...o.dropdownA11yProps,
|
|
99
102
|
children: /* @__PURE__ */ e(
|
|
100
|
-
|
|
103
|
+
A,
|
|
101
104
|
{
|
|
102
|
-
search:
|
|
105
|
+
search: y,
|
|
103
106
|
name: n,
|
|
104
|
-
filterState:
|
|
107
|
+
filterState: d,
|
|
105
108
|
onFilterStateChange: p,
|
|
106
|
-
size:
|
|
107
|
-
searchable:
|
|
109
|
+
size: s,
|
|
110
|
+
searchable: m,
|
|
108
111
|
groups: f,
|
|
109
|
-
items:
|
|
112
|
+
items: h,
|
|
110
113
|
keyboardEvents: t,
|
|
111
114
|
a11yMode: i,
|
|
112
115
|
...i === "combobox" ? { id: o.menuId } : o.menuA11yProps,
|
|
113
|
-
virtualized:
|
|
116
|
+
virtualized: w
|
|
114
117
|
}
|
|
115
118
|
)
|
|
116
119
|
}
|
|
@@ -1,34 +1,36 @@
|
|
|
1
|
-
import { jsx as r, jsxs as
|
|
2
|
-
import { Button as
|
|
1
|
+
import { jsx as r, jsxs as d } from "react/jsx-runtime";
|
|
2
|
+
import { Button as u } from "../Button/Button.js";
|
|
3
3
|
import "../../index-p1eeF8LQ.js";
|
|
4
4
|
import "react";
|
|
5
|
-
import { Dropdown as
|
|
5
|
+
import { Dropdown as c } from "../Dropdown/Dropdown.js";
|
|
6
6
|
import "../RootProvider/RootProvider.js";
|
|
7
|
-
import { M as
|
|
8
|
-
import { useDropdownMenuController as
|
|
7
|
+
import { M as b } from "../../SearchField-CN2mo8ck.js";
|
|
8
|
+
import { useDropdownMenuController as f } from "../Menu/useDropdownMenuController.js";
|
|
9
9
|
import "../Snackbar/useSnackbar.js";
|
|
10
|
-
import { S as
|
|
11
|
-
const
|
|
10
|
+
import { S as h } from "../../ChevronUpDown-DqGsU4MC.js";
|
|
11
|
+
const D = ({
|
|
12
12
|
title: a = "Title",
|
|
13
13
|
label: i = "Label",
|
|
14
14
|
items: p = [],
|
|
15
|
-
|
|
15
|
+
dropdownSize: s = "sm",
|
|
16
|
+
onSelectId: m,
|
|
16
17
|
...e
|
|
17
18
|
}) => {
|
|
18
|
-
const o =
|
|
19
|
+
const o = f({ id: "toolbar-menu", returnFocusOnClose: !0 }), n = e.searchable ? "combobox" : "menu", l = p.map((t) => ({
|
|
19
20
|
...t,
|
|
20
21
|
onClick: () => {
|
|
21
|
-
|
|
22
|
+
m?.(t?.id ?? ""), o.setOpen(!1);
|
|
22
23
|
}
|
|
23
24
|
}));
|
|
24
25
|
return /* @__PURE__ */ r(
|
|
25
|
-
|
|
26
|
+
c,
|
|
26
27
|
{
|
|
27
28
|
id: "toolbar-menu",
|
|
28
29
|
variant: "drawer-dropdown",
|
|
29
30
|
title: a,
|
|
30
|
-
|
|
31
|
-
|
|
31
|
+
size: s,
|
|
32
|
+
trigger: /* @__PURE__ */ d(
|
|
33
|
+
u,
|
|
32
34
|
{
|
|
33
35
|
variant: "primary",
|
|
34
36
|
onClick: o.toggleMenu,
|
|
@@ -38,7 +40,7 @@ const k = ({
|
|
|
38
40
|
ref: o.triggerRef,
|
|
39
41
|
children: [
|
|
40
42
|
/* @__PURE__ */ r("span", { children: i }),
|
|
41
|
-
/* @__PURE__ */ r(
|
|
43
|
+
/* @__PURE__ */ r(h, { "aria-hidden": "true", focusable: "false" })
|
|
42
44
|
]
|
|
43
45
|
}
|
|
44
46
|
),
|
|
@@ -46,10 +48,10 @@ const k = ({
|
|
|
46
48
|
onClose: () => o.setOpen(!1),
|
|
47
49
|
...e?.searchable ? {} : o.dropdownA11yProps,
|
|
48
50
|
children: /* @__PURE__ */ r(
|
|
49
|
-
|
|
51
|
+
b,
|
|
50
52
|
{
|
|
51
53
|
...e,
|
|
52
|
-
items:
|
|
54
|
+
items: l,
|
|
53
55
|
keyboardEvents: o.open,
|
|
54
56
|
a11yMode: n,
|
|
55
57
|
open: o.open,
|
|
@@ -61,5 +63,5 @@ const k = ({
|
|
|
61
63
|
);
|
|
62
64
|
};
|
|
63
65
|
export {
|
|
64
|
-
|
|
66
|
+
D as ToolbarMenu
|
|
65
67
|
};
|
|
@@ -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-CN2mo8ck.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-CN2mo8ck.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-CN2mo8ck.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";
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
import { DropdownProps } from '../Dropdown';
|
|
1
2
|
import { FilterProps } from './useFilter.tsx';
|
|
2
3
|
export interface ToolbarFilterAddMenuProps extends FilterProps {
|
|
4
|
+
dropdownSize?: DropdownProps['size'];
|
|
3
5
|
open: boolean;
|
|
4
6
|
onToggle: () => void;
|
|
5
7
|
onClose: () => void;
|
|
6
8
|
onAdd?: (name: string) => void;
|
|
7
9
|
}
|
|
8
|
-
export declare const ToolbarFilterAddMenu: ({ label, items, groups, onAdd, onToggle, onClose, open, }: ToolbarFilterAddMenuProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
10
|
+
export declare const ToolbarFilterAddMenu: ({ label, items, groups, onAdd, onToggle, onClose, open, dropdownSize, }: ToolbarFilterAddMenuProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ElementType } from 'react';
|
|
2
2
|
import { ButtonProps } from '../Button';
|
|
3
|
+
import { DropdownProps } from '../Dropdown';
|
|
3
4
|
import { FilterProps, FilterState } from './useFilter.tsx';
|
|
4
5
|
export interface ToolbarFilterMenuProps extends Omit<FilterProps, 'variant'> {
|
|
5
6
|
as?: ElementType;
|
|
@@ -14,5 +15,6 @@ export interface ToolbarFilterMenuProps extends Omit<FilterProps, 'variant'> {
|
|
|
14
15
|
submitLabel?: string;
|
|
15
16
|
title?: string;
|
|
16
17
|
variant?: ButtonProps['variant'];
|
|
18
|
+
dropdownSize?: DropdownProps['size'];
|
|
17
19
|
}
|
|
18
|
-
export declare const ToolbarFilterMenu: ({ as, size, name, label, searchable, groups, items, removable, removeLabel, filterState, onFilterStateChange, onFilterChange, onRemove, open, onToggle, onClose, submitLabel, search, virtualized, title, variant: customVariant, }: ToolbarFilterMenuProps) => import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export declare const ToolbarFilterMenu: ({ as, size, name, label, searchable, groups, items, removable, removeLabel, filterState, onFilterStateChange, onFilterChange, onRemove, open, onToggle, onClose, submitLabel, search, virtualized, title, variant: customVariant, dropdownSize, }: ToolbarFilterMenuProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import { DropdownProps } from '../Dropdown';
|
|
1
2
|
import { MenuProps } from '../Menu/';
|
|
2
3
|
export interface ToolbarMenuProps extends Omit<MenuProps, 'variant'> {
|
|
3
4
|
title?: string;
|
|
4
5
|
label?: string;
|
|
6
|
+
dropdownSize?: DropdownProps['size'];
|
|
5
7
|
onSelectId?: (id: string) => void;
|
|
6
8
|
}
|
|
7
|
-
export declare const ToolbarMenu: ({ title, label, items, onSelectId, ...props }: ToolbarMenuProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare const ToolbarMenu: ({ title, label, items, dropdownSize, onSelectId, ...props }: ToolbarMenuProps) => import("react/jsx-runtime").JSX.Element;
|