@fluidattacks/design 9.8.0 → 9.9.0
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/_virtual/index.js +3 -2
- package/dist/_virtual/index2.js +5 -3
- package/dist/_virtual/index3.js +5 -5
- package/dist/_virtual/index4.js +5 -5
- package/dist/_virtual/index5.js +2 -5
- package/dist/components/card/card-with-input/index.js +3 -2
- package/dist/components/drawer/index.js +77 -73
- package/dist/components/drawer/types.d.ts +2 -0
- package/dist/components/filters/filters-menu/index.js +24 -23
- package/dist/components/filters/index.d.ts +2 -2
- package/dist/components/filters/options-menu/index.js +21 -21
- package/dist/components/filters/options-menu/options/index.js +3 -2
- package/dist/components/filters/types.d.ts +2 -0
- package/dist/components/list-item/styles.js +1 -1
- package/dist/components/slider/index.js +3 -2
- package/dist/node_modules/react-joyride/dist/index.js +4 -4
- package/dist/node_modules/use-sync-external-store/shim/index.js +1 -1
- package/package.json +1 -1
package/dist/_virtual/index.js
CHANGED
package/dist/_virtual/index2.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { getDefaultExportFromCjs as r } from "./_commonjsHelpers.js";
|
|
2
|
+
import { __require as e } from "../node_modules/react-innertext/index.js";
|
|
3
|
+
var t = e();
|
|
4
|
+
const n = /* @__PURE__ */ r(t);
|
|
3
5
|
export {
|
|
4
|
-
|
|
6
|
+
n as default
|
|
5
7
|
};
|
package/dist/_virtual/index3.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { getDefaultExportFromCjs as
|
|
2
|
-
import { __require as
|
|
3
|
-
var
|
|
4
|
-
const
|
|
1
|
+
import { getDefaultExportFromCjs as e } from "./_commonjsHelpers.js";
|
|
2
|
+
import { __require as r } from "../node_modules/@fastify/deepmerge/index.js";
|
|
3
|
+
var o = r();
|
|
4
|
+
const p = /* @__PURE__ */ e(o);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
p as default
|
|
7
7
|
};
|
package/dist/_virtual/index4.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { getDefaultExportFromCjs as
|
|
2
|
-
import { __require as
|
|
3
|
-
var
|
|
4
|
-
const
|
|
1
|
+
import { getDefaultExportFromCjs as r } from "./_commonjsHelpers.js";
|
|
2
|
+
import { __require as o } from "../node_modules/scroll/index.js";
|
|
3
|
+
var t = o();
|
|
4
|
+
const s = /* @__PURE__ */ r(t);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
s as default
|
|
7
7
|
};
|
package/dist/_virtual/index5.js
CHANGED
|
@@ -12,6 +12,7 @@ import "react-dom";
|
|
|
12
12
|
import "../../typography/heading/index.js";
|
|
13
13
|
import "../../typography/span/index.js";
|
|
14
14
|
import "../../typography/text/index.js";
|
|
15
|
+
import "../../inputs/styles.js";
|
|
15
16
|
import "../../container/index.js";
|
|
16
17
|
import "../../icon-button/index.js";
|
|
17
18
|
import "../../../_virtual/dayjs.min.js";
|
|
@@ -20,7 +21,7 @@ import "../../layout/categories/buttons/index.js";
|
|
|
20
21
|
import { InputNumber as S } from "../../inputs/fields/number/index.js";
|
|
21
22
|
import "../../inputs/utils/action-button/index.js";
|
|
22
23
|
import "../../../node_modules/react-international-phone/dist/index.js";
|
|
23
|
-
const
|
|
24
|
+
const pt = ({
|
|
24
25
|
control: u,
|
|
25
26
|
description: B,
|
|
26
27
|
disabled: t,
|
|
@@ -141,5 +142,5 @@ const it = ({
|
|
|
141
142
|
);
|
|
142
143
|
};
|
|
143
144
|
export {
|
|
144
|
-
|
|
145
|
+
pt as CardWithInput
|
|
145
146
|
};
|
|
@@ -1,68 +1,68 @@
|
|
|
1
1
|
import { jsx as e, jsxs as t } from "react/jsx-runtime";
|
|
2
|
-
import { useCallback as
|
|
2
|
+
import { useCallback as k, useEffect as O } from "react";
|
|
3
3
|
import { createPortal as L } from "react-dom";
|
|
4
4
|
import { useTheme as P } from "styled-components";
|
|
5
5
|
import { DrawerWrapper as K, DrawerPanel as q, DrawerBody as A } from "./styles.js";
|
|
6
6
|
import { Button as F } from "../button/index.js";
|
|
7
7
|
import { Container as i } from "../container/index.js";
|
|
8
8
|
import { Icon as G } from "../icon/index.js";
|
|
9
|
-
import { IconButton as
|
|
9
|
+
import { IconButton as C } from "../icon-button/index.js";
|
|
10
10
|
import { Tabs as H } from "../tabs/index.js";
|
|
11
11
|
import "../typography/heading/index.js";
|
|
12
12
|
import "../typography/span/index.js";
|
|
13
|
-
import { Text as
|
|
13
|
+
import { Text as T } from "../typography/text/index.js";
|
|
14
14
|
const re = ({
|
|
15
|
-
_containerId:
|
|
16
|
-
_portal:
|
|
17
|
-
actions:
|
|
18
|
-
children:
|
|
15
|
+
_containerId: D = "portals",
|
|
16
|
+
_portal: S = !0,
|
|
17
|
+
actions: W = void 0,
|
|
18
|
+
children: z = void 0,
|
|
19
19
|
dismissable: a = !0,
|
|
20
|
-
footer:
|
|
21
|
-
footerMessage:
|
|
22
|
-
header:
|
|
20
|
+
footer: s = void 0,
|
|
21
|
+
footerMessage: y = void 0,
|
|
22
|
+
header: B = void 0,
|
|
23
23
|
id: d = "drawer-container",
|
|
24
|
-
modalRef:
|
|
25
|
-
side:
|
|
26
|
-
size:
|
|
27
|
-
subtitle:
|
|
28
|
-
tabs:
|
|
29
|
-
title:
|
|
30
|
-
titleIcon:
|
|
31
|
-
titleTag:
|
|
32
|
-
onClose:
|
|
24
|
+
modalRef: n,
|
|
25
|
+
side: g = "right",
|
|
26
|
+
size: I = "md",
|
|
27
|
+
subtitle: v = void 0,
|
|
28
|
+
tabs: w = void 0,
|
|
29
|
+
title: b,
|
|
30
|
+
titleIcon: x = void 0,
|
|
31
|
+
titleTag: j = void 0,
|
|
32
|
+
onClose: u = void 0
|
|
33
33
|
}) => {
|
|
34
|
-
const o = P(), p =
|
|
35
|
-
|
|
36
|
-
}, [
|
|
34
|
+
const o = P(), p = k(() => {
|
|
35
|
+
n.close(), u?.();
|
|
36
|
+
}, [n, u]), E = k(
|
|
37
37
|
(r) => {
|
|
38
38
|
a && r.target === r.currentTarget && p();
|
|
39
39
|
},
|
|
40
40
|
[a, p]
|
|
41
41
|
);
|
|
42
42
|
O(() => {
|
|
43
|
-
if (!a || !
|
|
43
|
+
if (!a || !n.isOpen)
|
|
44
44
|
return () => {
|
|
45
45
|
};
|
|
46
|
-
const r = (
|
|
47
|
-
|
|
46
|
+
const r = (l) => {
|
|
47
|
+
l.key === "Escape" && p();
|
|
48
48
|
};
|
|
49
49
|
return window.addEventListener("keydown", r), () => {
|
|
50
50
|
window.removeEventListener("keydown", r);
|
|
51
51
|
};
|
|
52
|
-
}, [a, p,
|
|
53
|
-
const
|
|
52
|
+
}, [a, p, n.isOpen]);
|
|
53
|
+
const $ = /* @__PURE__ */ e(
|
|
54
54
|
K,
|
|
55
55
|
{
|
|
56
|
-
$side:
|
|
56
|
+
$side: g,
|
|
57
57
|
id: `${d}-wrapper`,
|
|
58
|
-
onClick:
|
|
58
|
+
onClick: E,
|
|
59
59
|
role: "presentation",
|
|
60
60
|
children: /* @__PURE__ */ t(
|
|
61
61
|
q,
|
|
62
62
|
{
|
|
63
|
-
$side:
|
|
64
|
-
$size:
|
|
65
|
-
"aria-label":
|
|
63
|
+
$side: g,
|
|
64
|
+
$size: I,
|
|
65
|
+
"aria-label": n.name,
|
|
66
66
|
"aria-modal": "true",
|
|
67
67
|
"data-testid": d,
|
|
68
68
|
id: d,
|
|
@@ -96,7 +96,7 @@ const re = ({
|
|
|
96
96
|
gap: 0.5,
|
|
97
97
|
minWidth: "0",
|
|
98
98
|
children: [
|
|
99
|
-
|
|
99
|
+
x === void 0 ? void 0 : /* @__PURE__ */ e(
|
|
100
100
|
i,
|
|
101
101
|
{
|
|
102
102
|
alignItems: "center",
|
|
@@ -110,7 +110,7 @@ const re = ({
|
|
|
110
110
|
children: /* @__PURE__ */ e(
|
|
111
111
|
G,
|
|
112
112
|
{
|
|
113
|
-
icon:
|
|
113
|
+
icon: x,
|
|
114
114
|
iconColor: o.palette.gray[700],
|
|
115
115
|
iconSize: "md",
|
|
116
116
|
iconType: "fa-solid"
|
|
@@ -134,7 +134,7 @@ const re = ({
|
|
|
134
134
|
minWidth: "0",
|
|
135
135
|
children: [
|
|
136
136
|
/* @__PURE__ */ e(
|
|
137
|
-
|
|
137
|
+
T,
|
|
138
138
|
{
|
|
139
139
|
color: o.palette.gray[800],
|
|
140
140
|
display: "inline-block",
|
|
@@ -143,22 +143,22 @@ const re = ({
|
|
|
143
143
|
size: "lg",
|
|
144
144
|
textOverflow: "ellipsis",
|
|
145
145
|
whiteSpace: "nowrap",
|
|
146
|
-
children:
|
|
146
|
+
children: b
|
|
147
147
|
}
|
|
148
148
|
),
|
|
149
|
-
|
|
149
|
+
j
|
|
150
150
|
]
|
|
151
151
|
}
|
|
152
152
|
),
|
|
153
|
-
|
|
154
|
-
|
|
153
|
+
v === void 0 ? void 0 : /* @__PURE__ */ e(
|
|
154
|
+
T,
|
|
155
155
|
{
|
|
156
156
|
color: o.palette.gray[400],
|
|
157
157
|
overflow: "hidden",
|
|
158
158
|
size: "md",
|
|
159
159
|
textOverflow: "ellipsis",
|
|
160
160
|
whiteSpace: "nowrap",
|
|
161
|
-
children:
|
|
161
|
+
children: v
|
|
162
162
|
}
|
|
163
163
|
)
|
|
164
164
|
]
|
|
@@ -167,37 +167,37 @@ const re = ({
|
|
|
167
167
|
]
|
|
168
168
|
}
|
|
169
169
|
),
|
|
170
|
-
|
|
170
|
+
B
|
|
171
171
|
]
|
|
172
172
|
}
|
|
173
173
|
),
|
|
174
174
|
/* @__PURE__ */ t(i, { display: "flex", gap: 0.25, children: [
|
|
175
|
-
|
|
175
|
+
W?.map(
|
|
176
176
|
({
|
|
177
177
|
disabled: r,
|
|
178
|
-
icon:
|
|
179
|
-
iconColor:
|
|
178
|
+
icon: l,
|
|
179
|
+
iconColor: h,
|
|
180
180
|
shadow: c,
|
|
181
|
-
tooltip:
|
|
182
|
-
onClick:
|
|
181
|
+
tooltip: f,
|
|
182
|
+
onClick: m
|
|
183
183
|
}) => /* @__PURE__ */ e(
|
|
184
|
-
|
|
184
|
+
C,
|
|
185
185
|
{
|
|
186
186
|
disabled: r,
|
|
187
|
-
icon:
|
|
188
|
-
iconColor:
|
|
187
|
+
icon: l ?? "paper-plane",
|
|
188
|
+
iconColor: h ?? o.palette.gray[400],
|
|
189
189
|
iconSize: "sm",
|
|
190
190
|
iconType: "fa-light",
|
|
191
|
-
onClick:
|
|
191
|
+
onClick: m,
|
|
192
192
|
shadow: c,
|
|
193
|
-
tooltip:
|
|
193
|
+
tooltip: f,
|
|
194
194
|
variant: "ghost"
|
|
195
195
|
},
|
|
196
|
-
`${d}-${
|
|
196
|
+
`${d}-${l}`
|
|
197
197
|
)
|
|
198
198
|
),
|
|
199
199
|
a ? /* @__PURE__ */ e(
|
|
200
|
-
|
|
200
|
+
C,
|
|
201
201
|
{
|
|
202
202
|
icon: "xmark",
|
|
203
203
|
iconColor: o.palette.gray[400],
|
|
@@ -212,9 +212,9 @@ const re = ({
|
|
|
212
212
|
]
|
|
213
213
|
}
|
|
214
214
|
),
|
|
215
|
-
|
|
216
|
-
/* @__PURE__ */ e(A, { children:
|
|
217
|
-
|
|
215
|
+
w ? /* @__PURE__ */ e(i, { display: "flex", pt: 0.25, width: "100%", children: /* @__PURE__ */ e(H, { items: w }) }) : void 0,
|
|
216
|
+
/* @__PURE__ */ e(A, { children: z }),
|
|
217
|
+
s || y ? /* @__PURE__ */ t(
|
|
218
218
|
i,
|
|
219
219
|
{
|
|
220
220
|
alignSelf: "stretch",
|
|
@@ -225,25 +225,29 @@ const re = ({
|
|
|
225
225
|
px: 1.25,
|
|
226
226
|
py: 1,
|
|
227
227
|
children: [
|
|
228
|
-
|
|
229
|
-
|
|
228
|
+
y,
|
|
229
|
+
s ? /* @__PURE__ */ e(
|
|
230
230
|
i,
|
|
231
231
|
{
|
|
232
232
|
display: "flex",
|
|
233
233
|
gap: 0.5,
|
|
234
234
|
justify: "end",
|
|
235
235
|
width: "100%",
|
|
236
|
-
children:
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
236
|
+
children: s.map(
|
|
237
|
+
({ disabled: r, icon: l, id: h, text: c, onClick: f }, m) => /* @__PURE__ */ e(
|
|
238
|
+
F,
|
|
239
|
+
{
|
|
240
|
+
disabled: r,
|
|
241
|
+
icon: l,
|
|
242
|
+
id: h,
|
|
243
|
+
onClick: f,
|
|
244
|
+
variant: m === 0 ? "primary" : "tertiary",
|
|
245
|
+
width: "100%",
|
|
246
|
+
children: c
|
|
247
|
+
},
|
|
248
|
+
`${m}-${c}`
|
|
249
|
+
)
|
|
250
|
+
)
|
|
247
251
|
}
|
|
248
252
|
) : void 0
|
|
249
253
|
]
|
|
@@ -254,10 +258,10 @@ const re = ({
|
|
|
254
258
|
)
|
|
255
259
|
}
|
|
256
260
|
);
|
|
257
|
-
return
|
|
258
|
-
|
|
259
|
-
document.getElementById(
|
|
260
|
-
) :
|
|
261
|
+
return n.isOpen ? S ? L(
|
|
262
|
+
$,
|
|
263
|
+
document.getElementById(D) ?? document.body
|
|
264
|
+
) : $ : null;
|
|
261
265
|
};
|
|
262
266
|
export {
|
|
263
267
|
re as Drawer
|
|
@@ -23,11 +23,13 @@ interface IDrawerActionProps extends Partial<IIconModifiable>, Pick<IDisplayModi
|
|
|
23
23
|
* Drawer footer button props.
|
|
24
24
|
* @interface IDrawerButtonProps
|
|
25
25
|
* @extends IIconModifiable
|
|
26
|
+
* @property { boolean } [disabled] - Whether the button is disabled.
|
|
26
27
|
* @property { string } [id] - Button id.
|
|
27
28
|
* @property { string } [text] - Button text.
|
|
28
29
|
* @property { Function } [onClick] - Button click handler.
|
|
29
30
|
*/
|
|
30
31
|
interface IDrawerButtonProps extends Partial<IIconModifiable> {
|
|
32
|
+
disabled?: boolean;
|
|
31
33
|
id?: string;
|
|
32
34
|
onClick?: () => void;
|
|
33
35
|
text?: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as a, jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import I from "../../../_virtual/snakeCase.js";
|
|
3
|
-
import { forwardRef as O, useContext as $, useMemo as B, useCallback as
|
|
3
|
+
import { forwardRef as O, useContext as $, useMemo as B, useCallback as p, Fragment as L } from "react";
|
|
4
4
|
import { useTheme as R } from "styled-components";
|
|
5
5
|
import { FiltersContext as A } from "../context/index.js";
|
|
6
6
|
import { NoMatches as P } from "../search/no-matches/index.js";
|
|
@@ -15,6 +15,7 @@ import "react-dom";
|
|
|
15
15
|
import "../../typography/heading/index.js";
|
|
16
16
|
import "../../typography/span/index.js";
|
|
17
17
|
import { Text as M } from "../../typography/text/index.js";
|
|
18
|
+
import "../../inputs/styles.js";
|
|
18
19
|
import { Tag as K } from "../../tag/index.js";
|
|
19
20
|
import "../../../_virtual/dayjs.min.js";
|
|
20
21
|
import "../../icon-button/index.js";
|
|
@@ -26,8 +27,8 @@ import { parseTextFilterValue as U, parseCheckboxesFilterValue as X, parseInclud
|
|
|
26
27
|
const Z = (c, d) => {
|
|
27
28
|
if (d?.some((t) => t.type === "text") ?? !1)
|
|
28
29
|
return U(c ?? "").text ? "1" : "0";
|
|
29
|
-
const
|
|
30
|
-
if (
|
|
30
|
+
const i = new Set(d?.map((t) => t.type) ?? []);
|
|
31
|
+
if (i.size === 1 && i.has("checkboxes"))
|
|
31
32
|
return X(
|
|
32
33
|
c ?? ""
|
|
33
34
|
).values.length.toString();
|
|
@@ -38,11 +39,11 @@ const Z = (c, d) => {
|
|
|
38
39
|
return (t.length + f.length).toString();
|
|
39
40
|
}
|
|
40
41
|
return (c ?? "").split(",").filter((t) => t && t !== "-").length.toString();
|
|
41
|
-
},
|
|
42
|
+
}, Te = O(function({
|
|
42
43
|
includeSearch: d = !1,
|
|
43
44
|
groupedFilters: g,
|
|
44
|
-
handleChangeId:
|
|
45
|
-
pinnedFilters:
|
|
45
|
+
handleChangeId: i,
|
|
46
|
+
pinnedFilters: h
|
|
46
47
|
}, b) {
|
|
47
48
|
const t = R(), {
|
|
48
49
|
id: f,
|
|
@@ -51,16 +52,16 @@ const Z = (c, d) => {
|
|
|
51
52
|
values: s,
|
|
52
53
|
updateSearch: v,
|
|
53
54
|
setValues: u
|
|
54
|
-
} = $(A), C = q(g, y), w = B(() => Object.values(s).filter(Boolean).length > 0, [s]), S =
|
|
55
|
+
} = $(A), C = q(g, y), w = B(() => Object.values(s).filter(Boolean).length > 0, [s]), S = h.length > 0, V = p(
|
|
55
56
|
(e) => () => {
|
|
56
|
-
|
|
57
|
+
i(e), v({ previousValue: s[e] ?? "" }), m({ searchFilter: "", searchGlobal: "" });
|
|
57
58
|
},
|
|
58
|
-
[
|
|
59
|
-
), j =
|
|
59
|
+
[i, v, m, s]
|
|
60
|
+
), j = p(() => {
|
|
60
61
|
u(
|
|
61
62
|
(e) => Object.keys(e).reduce((n, r) => ({ ...n, [r]: "" }), {})
|
|
62
|
-
),
|
|
63
|
-
}, [u,
|
|
63
|
+
), i("");
|
|
64
|
+
}, [u, i]), z = p(
|
|
64
65
|
(e) => {
|
|
65
66
|
m((n) => ({
|
|
66
67
|
...n,
|
|
@@ -68,7 +69,7 @@ const Z = (c, d) => {
|
|
|
68
69
|
}));
|
|
69
70
|
},
|
|
70
71
|
[m]
|
|
71
|
-
), E =
|
|
72
|
+
), E = p(
|
|
72
73
|
(e) => (n) => {
|
|
73
74
|
u((r) => ({ ...r, [e]: n }));
|
|
74
75
|
},
|
|
@@ -107,7 +108,7 @@ const Z = (c, d) => {
|
|
|
107
108
|
scroll: "y",
|
|
108
109
|
width: "100%",
|
|
109
110
|
children: [
|
|
110
|
-
S ? /* @__PURE__ */ o(k, { "data-testid": "menu-pinned", children:
|
|
111
|
+
S ? /* @__PURE__ */ o(k, { "data-testid": "menu-pinned", children: h.map((e) => {
|
|
111
112
|
const n = e.options?.[0]?.items?.map((r) => ({
|
|
112
113
|
name: r.label ?? r.value,
|
|
113
114
|
value: r.value
|
|
@@ -140,17 +141,17 @@ const Z = (c, d) => {
|
|
|
140
141
|
children: e
|
|
141
142
|
}
|
|
142
143
|
) : void 0,
|
|
143
|
-
n.map((
|
|
144
|
-
const G = s[
|
|
144
|
+
n.map((l) => {
|
|
145
|
+
const G = s[l.id], F = Z(
|
|
145
146
|
G,
|
|
146
|
-
|
|
147
|
+
l.options
|
|
147
148
|
);
|
|
148
149
|
return /* @__PURE__ */ o(L, { children: /* @__PURE__ */ a(
|
|
149
150
|
N,
|
|
150
151
|
{
|
|
151
152
|
as: "button",
|
|
152
|
-
"data-testid":
|
|
153
|
-
onClick: V(
|
|
153
|
+
"data-testid": l.id,
|
|
154
|
+
onClick: V(l.id),
|
|
154
155
|
children: [
|
|
155
156
|
/* @__PURE__ */ o(
|
|
156
157
|
T,
|
|
@@ -161,7 +162,7 @@ const Z = (c, d) => {
|
|
|
161
162
|
iconType: "fa-light"
|
|
162
163
|
}
|
|
163
164
|
),
|
|
164
|
-
|
|
165
|
+
l.label,
|
|
165
166
|
/* @__PURE__ */ a(
|
|
166
167
|
x,
|
|
167
168
|
{
|
|
@@ -170,7 +171,7 @@ const Z = (c, d) => {
|
|
|
170
171
|
gap: 0.5,
|
|
171
172
|
style: { marginLeft: "auto" },
|
|
172
173
|
children: [
|
|
173
|
-
f ===
|
|
174
|
+
f === l.id ? /* @__PURE__ */ o(
|
|
174
175
|
T,
|
|
175
176
|
{
|
|
176
177
|
icon: "chevron-right",
|
|
@@ -185,7 +186,7 @@ const Z = (c, d) => {
|
|
|
185
186
|
)
|
|
186
187
|
]
|
|
187
188
|
}
|
|
188
|
-
) },
|
|
189
|
+
) }, l.id);
|
|
189
190
|
})
|
|
190
191
|
]
|
|
191
192
|
},
|
|
@@ -197,5 +198,5 @@ const Z = (c, d) => {
|
|
|
197
198
|
] });
|
|
198
199
|
});
|
|
199
200
|
export {
|
|
200
|
-
|
|
201
|
+
Te as FiltersMenu
|
|
201
202
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ActiveFilters } from './active-filters';
|
|
2
|
-
import { IFilterItem, IFilterProps, IFiltersImperativeHandle, IFiltersOptions, TFilterType } from './types';
|
|
2
|
+
import { IFilterItem, IFilterOptionProps, IFilterProps, IFiltersImperativeHandle, IFiltersOptions, TFilterType } from './types';
|
|
3
3
|
import { partitionFilters } from './utils';
|
|
4
4
|
declare const Filters: import('react').ForwardRefExoticComponent<IFilterProps & import('react').RefAttributes<IFiltersImperativeHandle>>;
|
|
5
|
-
export type { IFilterItem, IFiltersImperativeHandle, IFiltersOptions, TFilterType, };
|
|
5
|
+
export type { IFilterItem, IFilterOptionProps, IFiltersImperativeHandle, IFiltersOptions, TFilterType, };
|
|
6
6
|
export { Filters, ActiveFilters, partitionFilters };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as d, jsxs as
|
|
1
|
+
import { jsx as d, jsxs as p } from "react/jsx-runtime";
|
|
2
2
|
import b from "../../../_virtual/dayjs.min.js";
|
|
3
3
|
import { l as Q } from "../../../_virtual/lodash.js";
|
|
4
4
|
import { forwardRef as U, useContext as Z, useMemo as ee, useCallback as C, Fragment as te } from "react";
|
|
@@ -17,20 +17,20 @@ import "../../typography/span/index.js";
|
|
|
17
17
|
import { Text as H } from "../../typography/text/index.js";
|
|
18
18
|
import { parseCheckboxesFilterValue as S, formatCheckboxesFilterValue as A } from "../../../utils/filters.js";
|
|
19
19
|
const Ie = U(function({ hideTitle: x = !1, label: V, options: m }, F) {
|
|
20
|
-
const
|
|
20
|
+
const w = oe(), {
|
|
21
21
|
id: t,
|
|
22
22
|
searchValues: { searchFilter: h },
|
|
23
23
|
setSearchValues: I,
|
|
24
24
|
values: Y,
|
|
25
25
|
setValues: f,
|
|
26
26
|
scrollState: z
|
|
27
|
-
} = Z(re), { ref: B } = z,
|
|
27
|
+
} = Z(re), { ref: B } = z, g = Y[t], k = (m ?? []).some(
|
|
28
28
|
(e) => e.type !== "combobox" && (e.items ?? []).length > de
|
|
29
29
|
), L = m?.find(
|
|
30
30
|
(e) => e.type === "includeExclude"
|
|
31
|
-
),
|
|
31
|
+
), y = m?.find(
|
|
32
32
|
(e) => e.type === "checkboxes" && e.excludeLabel
|
|
33
|
-
), { mode: D, values: T } = S(
|
|
33
|
+
), { mode: D, values: T } = S(g ?? ""), W = D === "exclude", _ = T.length > 0, N = !x || k || y !== void 0, $ = ee(() => m?.map((e) => {
|
|
34
34
|
const s = e?.items ?? [];
|
|
35
35
|
return e.type === "combobox" ? s : s.filter(
|
|
36
36
|
(u) => u.label?.toLowerCase().includes(h.toLowerCase()) ?? !1
|
|
@@ -97,10 +97,10 @@ const Ie = U(function({ hideTitle: x = !1, label: V, options: m }, F) {
|
|
|
97
97
|
), c = l.filter(
|
|
98
98
|
(a) => a === "-" || RegExp(/^\d+$/).test(a.trim())
|
|
99
99
|
), n = ["-", "-"];
|
|
100
|
-
c.forEach((a,
|
|
101
|
-
if (
|
|
100
|
+
c.forEach((a, R) => {
|
|
101
|
+
if (R >= 2) return;
|
|
102
102
|
const E = a.trim();
|
|
103
|
-
RegExp(/^\d+$/).test(E) ? n[
|
|
103
|
+
RegExp(/^\d+$/).test(E) ? n[R] = Number(E) : E === "-" && (n[R] = "-");
|
|
104
104
|
});
|
|
105
105
|
const i = u ?? 0;
|
|
106
106
|
if (e === "" || e === void 0 || e === null)
|
|
@@ -150,8 +150,8 @@ const Ie = U(function({ hideTitle: x = !1, label: V, options: m }, F) {
|
|
|
150
150
|
ref: F
|
|
151
151
|
}
|
|
152
152
|
);
|
|
153
|
-
const P =
|
|
154
|
-
|
|
153
|
+
const P = g !== void 0 && g !== "" && h === "" || k && h !== "", O = /* @__PURE__ */ p(te, { children: [
|
|
154
|
+
g && h === "" ? /* @__PURE__ */ d(
|
|
155
155
|
v,
|
|
156
156
|
{
|
|
157
157
|
$variant: "lowRelevance",
|
|
@@ -172,7 +172,7 @@ const Ie = U(function({ hideTitle: x = !1, label: V, options: m }, F) {
|
|
|
172
172
|
}
|
|
173
173
|
) : void 0
|
|
174
174
|
] });
|
|
175
|
-
return /* @__PURE__ */
|
|
175
|
+
return /* @__PURE__ */ p(
|
|
176
176
|
le,
|
|
177
177
|
{
|
|
178
178
|
$left: "346px",
|
|
@@ -180,8 +180,8 @@ const Ie = U(function({ hideTitle: x = !1, label: V, options: m }, F) {
|
|
|
180
180
|
ref: F,
|
|
181
181
|
children: [
|
|
182
182
|
x && !N && P ? /* @__PURE__ */ d(ce, { "data-testid": "options-menu-floating-actions", children: O }) : void 0,
|
|
183
|
-
N ? /* @__PURE__ */
|
|
184
|
-
/* @__PURE__ */
|
|
183
|
+
N ? /* @__PURE__ */ p(ae, { "data-testid": "options-menu-header", children: [
|
|
184
|
+
/* @__PURE__ */ p(
|
|
185
185
|
j,
|
|
186
186
|
{
|
|
187
187
|
display: "flex",
|
|
@@ -191,7 +191,7 @@ const Ie = U(function({ hideTitle: x = !1, label: V, options: m }, F) {
|
|
|
191
191
|
x ? void 0 : /* @__PURE__ */ d(
|
|
192
192
|
H,
|
|
193
193
|
{
|
|
194
|
-
color:
|
|
194
|
+
color: w.palette.gray[800],
|
|
195
195
|
fontWeight: "bold",
|
|
196
196
|
size: "md",
|
|
197
197
|
children: `Select ${V}`
|
|
@@ -201,7 +201,7 @@ const Ie = U(function({ hideTitle: x = !1, label: V, options: m }, F) {
|
|
|
201
201
|
]
|
|
202
202
|
}
|
|
203
203
|
),
|
|
204
|
-
|
|
204
|
+
y ? /* @__PURE__ */ d(
|
|
205
205
|
j,
|
|
206
206
|
{
|
|
207
207
|
"data-testid": "exclude-toggle-row",
|
|
@@ -214,7 +214,7 @@ const Ie = U(function({ hideTitle: x = !1, label: V, options: m }, F) {
|
|
|
214
214
|
defaultChecked: W,
|
|
215
215
|
disabled: !_,
|
|
216
216
|
justify: "space-between",
|
|
217
|
-
leftText:
|
|
217
|
+
leftText: y.excludeLabel,
|
|
218
218
|
name: `${t}-exclude`,
|
|
219
219
|
onChange: q,
|
|
220
220
|
variant: "inline"
|
|
@@ -245,17 +245,17 @@ const Ie = U(function({ hideTitle: x = !1, label: V, options: m }, F) {
|
|
|
245
245
|
"div",
|
|
246
246
|
{
|
|
247
247
|
style: { position: "relative" },
|
|
248
|
-
children: /* @__PURE__ */
|
|
248
|
+
children: /* @__PURE__ */ p(
|
|
249
249
|
ie,
|
|
250
250
|
{
|
|
251
251
|
$border: u.length > 1 && s > 0,
|
|
252
252
|
$overflow: o,
|
|
253
|
-
style: { padding: l ?
|
|
253
|
+
style: { padding: l ? w.spacing[0.875] : 0 },
|
|
254
254
|
children: [
|
|
255
|
-
x || u.length > 1 && !o ? /* @__PURE__ */ d(
|
|
255
|
+
x || e.showLabel === !0 || u.length > 1 && !o ? /* @__PURE__ */ d(
|
|
256
256
|
H,
|
|
257
257
|
{
|
|
258
|
-
color:
|
|
258
|
+
color: w.palette.gray[x ? 800 : 400],
|
|
259
259
|
fontWeight: "bold",
|
|
260
260
|
mb: 0.5,
|
|
261
261
|
size: "md",
|
|
@@ -265,7 +265,7 @@ const Ie = U(function({ hideTitle: x = !1, label: V, options: m }, F) {
|
|
|
265
265
|
/* @__PURE__ */ d(
|
|
266
266
|
ne,
|
|
267
267
|
{
|
|
268
|
-
filterValue:
|
|
268
|
+
filterValue: g,
|
|
269
269
|
filteredItems: $[s] ?? [],
|
|
270
270
|
id: t,
|
|
271
271
|
label: V,
|
|
@@ -16,6 +16,7 @@ import "react-dom";
|
|
|
16
16
|
import "../../../typography/heading/index.js";
|
|
17
17
|
import { Span as G } from "../../../typography/span/index.js";
|
|
18
18
|
import "../../../typography/text/index.js";
|
|
19
|
+
import "../../../inputs/styles.js";
|
|
19
20
|
import "../../../container/index.js";
|
|
20
21
|
import { Tag as H } from "../../../tag/index.js";
|
|
21
22
|
import "../../../icon-button/index.js";
|
|
@@ -279,7 +280,7 @@ const Z = ({
|
|
|
279
280
|
}
|
|
280
281
|
) });
|
|
281
282
|
}
|
|
282
|
-
},
|
|
283
|
+
}, De = ({
|
|
283
284
|
id: i,
|
|
284
285
|
filteredItems: n,
|
|
285
286
|
filterValue: l,
|
|
@@ -357,6 +358,6 @@ const Z = ({
|
|
|
357
358
|
}) ?? null });
|
|
358
359
|
};
|
|
359
360
|
export {
|
|
360
|
-
|
|
361
|
+
De as Options,
|
|
361
362
|
Z as TextFilterRenderer
|
|
362
363
|
};
|
|
@@ -77,6 +77,8 @@ interface IFilterOptionProps {
|
|
|
77
77
|
includeLabel?: string;
|
|
78
78
|
/** Debounce window in ms before committing typed value to filter state. Applies to type "text". */
|
|
79
79
|
debounceMs?: number;
|
|
80
|
+
/** Whether the block shows its label as a heading under the menu title. Checkboxes blocks hide it by default. */
|
|
81
|
+
showLabel?: boolean;
|
|
80
82
|
}
|
|
81
83
|
/** Filter option properties. */
|
|
82
84
|
interface IFiltersOptions {
|
|
@@ -9,6 +9,7 @@ import { Thumb as k } from "./thumb/index.js";
|
|
|
9
9
|
import { normalizeValue as v } from "./utils.js";
|
|
10
10
|
import { Container as w } from "../container/index.js";
|
|
11
11
|
import { OutlineContainer as y } from "../inputs/outline-container/index.js";
|
|
12
|
+
import "../inputs/styles.js";
|
|
12
13
|
import "../checkbox/index.js";
|
|
13
14
|
import "../icon/index.js";
|
|
14
15
|
import "../../_virtual/lodash.js";
|
|
@@ -22,7 +23,7 @@ import "react-dom";
|
|
|
22
23
|
import "../layout/categories/buttons/index.js";
|
|
23
24
|
import "../inputs/utils/action-button/index.js";
|
|
24
25
|
import "../../node_modules/react-international-phone/dist/index.js";
|
|
25
|
-
const
|
|
26
|
+
const re = (o) => {
|
|
26
27
|
const p = S(), m = $(null), { label: s, minValue: i = 0, maxValue: n = 100, name: r, setValue: d, watch: c } = o, a = x(), t = V({
|
|
27
28
|
...o,
|
|
28
29
|
numberFormatter: a,
|
|
@@ -75,6 +76,6 @@ const ee = (o) => {
|
|
|
75
76
|
) });
|
|
76
77
|
};
|
|
77
78
|
export {
|
|
78
|
-
|
|
79
|
+
re as Slider,
|
|
79
80
|
x as useNumberFormatter
|
|
80
81
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import E, { useMemo as J, useCallback as Q, useRef as N, useState as nt, useEffect as F, isValidElement as dt, cloneElement as ht } from "react";
|
|
2
2
|
import { useMemoDeepCompare as $t, usePrevious as xt, useMount as Ut, useUpdateEffect as Mt, useWindowSize as jt } from "../../@gilbarbara/hooks/dist/index.js";
|
|
3
|
-
import { s as Ht } from "../../../_virtual/
|
|
3
|
+
import { s as Ht } from "../../../_virtual/index.js";
|
|
4
4
|
import z from "../../is-lite/dist/index.js";
|
|
5
|
-
import ut from "../../../_virtual/
|
|
6
|
-
import Yt from "../../../_virtual/
|
|
5
|
+
import ut from "../../../_virtual/index2.js";
|
|
6
|
+
import Yt from "../../../_virtual/index3.js";
|
|
7
7
|
import It from "../../@gilbarbara/deep-equal/dist/index.js";
|
|
8
|
-
import zt from "../../../_virtual/
|
|
8
|
+
import zt from "../../../_virtual/index4.js";
|
|
9
9
|
import Nt from "../../../_virtual/scrollparent.js";
|
|
10
10
|
import { createPortal as Wt } from "react-dom";
|
|
11
11
|
import { offset as yt, shift as Kt, arrow as Gt, useFloating as Et, autoPlacement as Vt, flip as Jt } from "../../@floating-ui/react-dom/dist/floating-ui.react-dom.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __module as r } from "../../../_virtual/
|
|
1
|
+
import { __module as r } from "../../../_virtual/index5.js";
|
|
2
2
|
import { __require as o } from "../cjs/use-sync-external-store-shim.production.js";
|
|
3
3
|
import { __require as i } from "../cjs/use-sync-external-store-shim.development.js";
|
|
4
4
|
var e;
|
package/package.json
CHANGED