@fluidattacks/design 11.11.0 → 11.12.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/components/card/card-with-input/index.js +2 -3
- package/dist/components/filters/filters-menu/index.js +23 -24
- package/dist/components/filters/options-menu/options/index.js +2 -3
- package/dist/components/inputs/fields/combobox/field/index.js +230 -225
- package/dist/components/inputs/fields/combobox/index.stories.d.ts +3 -1
- package/dist/components/inputs/fields/combobox/option/index.d.ts +1 -1
- package/dist/components/inputs/fields/combobox/option/index.js +103 -87
- package/dist/components/inputs/fields/combobox/styles.d.ts +9 -8
- package/dist/components/inputs/fields/combobox/styles.js +84 -64
- package/dist/components/inputs/fields/combobox/types.d.ts +8 -3
- package/dist/components/inputs/fields/month/index.js +20 -20
- package/dist/components/inputs/fields/month/panel.js +0 -2
- package/dist/components/inputs/fields/month/styles.d.ts +2 -1
- package/dist/components/inputs/fields/month/styles.js +21 -16
- package/dist/components/slider/index.js +2 -3
- package/package.json +1 -1
|
@@ -12,7 +12,6 @@ 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";
|
|
16
15
|
import "../../container/index.js";
|
|
17
16
|
import "../../icon-button/index.js";
|
|
18
17
|
import "../../../_virtual/dayjs.min.js";
|
|
@@ -21,7 +20,7 @@ import "../../layout/categories/buttons/index.js";
|
|
|
21
20
|
import { InputNumber as S } from "../../inputs/fields/number/index.js";
|
|
22
21
|
import "../../inputs/utils/action-button/index.js";
|
|
23
22
|
import "../../../node_modules/react-international-phone/dist/index.js";
|
|
24
|
-
const
|
|
23
|
+
const it = ({
|
|
25
24
|
control: u,
|
|
26
25
|
description: B,
|
|
27
26
|
disabled: t,
|
|
@@ -142,5 +141,5 @@ const pt = ({
|
|
|
142
141
|
);
|
|
143
142
|
};
|
|
144
143
|
export {
|
|
145
|
-
|
|
144
|
+
it as CardWithInput
|
|
146
145
|
};
|
|
@@ -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 h, 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,7 +15,6 @@ 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";
|
|
19
18
|
import { Tag as K } from "../../tag/index.js";
|
|
20
19
|
import "../../../_virtual/dayjs.min.js";
|
|
21
20
|
import "../../icon-button/index.js";
|
|
@@ -27,8 +26,8 @@ import { parseTextFilterValue as U, parseCheckboxesFilterValue as X, parseInclud
|
|
|
27
26
|
const Z = (c, d) => {
|
|
28
27
|
if (d?.some((t) => t.type === "text") ?? !1)
|
|
29
28
|
return U(c ?? "").text ? "1" : "0";
|
|
30
|
-
const
|
|
31
|
-
if (
|
|
29
|
+
const l = new Set(d?.map((t) => t.type) ?? []);
|
|
30
|
+
if (l.size === 1 && l.has("checkboxes"))
|
|
32
31
|
return X(
|
|
33
32
|
c ?? ""
|
|
34
33
|
).values.length.toString();
|
|
@@ -39,11 +38,11 @@ const Z = (c, d) => {
|
|
|
39
38
|
return (t.length + f.length).toString();
|
|
40
39
|
}
|
|
41
40
|
return (c ?? "").split(",").filter((t) => t && t !== "-").length.toString();
|
|
42
|
-
},
|
|
41
|
+
}, ke = O(function({
|
|
43
42
|
includeSearch: d = !1,
|
|
44
43
|
groupedFilters: g,
|
|
45
|
-
handleChangeId:
|
|
46
|
-
pinnedFilters:
|
|
44
|
+
handleChangeId: l,
|
|
45
|
+
pinnedFilters: p
|
|
47
46
|
}, b) {
|
|
48
47
|
const t = R(), {
|
|
49
48
|
id: f,
|
|
@@ -52,16 +51,16 @@ const Z = (c, d) => {
|
|
|
52
51
|
values: s,
|
|
53
52
|
updateSearch: v,
|
|
54
53
|
setValues: u
|
|
55
|
-
} = $(A), C = q(g, y), w = B(() => Object.values(s).filter(Boolean).length > 0, [s]), S =
|
|
54
|
+
} = $(A), C = q(g, y), w = B(() => Object.values(s).filter(Boolean).length > 0, [s]), S = p.length > 0, V = h(
|
|
56
55
|
(e) => () => {
|
|
57
|
-
|
|
56
|
+
l(e), v({ previousValue: s[e] ?? "" }), m({ searchFilter: "", searchGlobal: "" });
|
|
58
57
|
},
|
|
59
|
-
[
|
|
60
|
-
), j =
|
|
58
|
+
[l, v, m, s]
|
|
59
|
+
), j = h(() => {
|
|
61
60
|
u(
|
|
62
61
|
(e) => Object.keys(e).reduce((n, r) => ({ ...n, [r]: "" }), {})
|
|
63
|
-
),
|
|
64
|
-
}, [u,
|
|
62
|
+
), l("");
|
|
63
|
+
}, [u, l]), z = h(
|
|
65
64
|
(e) => {
|
|
66
65
|
m((n) => ({
|
|
67
66
|
...n,
|
|
@@ -69,7 +68,7 @@ const Z = (c, d) => {
|
|
|
69
68
|
}));
|
|
70
69
|
},
|
|
71
70
|
[m]
|
|
72
|
-
), E =
|
|
71
|
+
), E = h(
|
|
73
72
|
(e) => (n) => {
|
|
74
73
|
u((r) => ({ ...r, [e]: n }));
|
|
75
74
|
},
|
|
@@ -108,7 +107,7 @@ const Z = (c, d) => {
|
|
|
108
107
|
scroll: "y",
|
|
109
108
|
width: "100%",
|
|
110
109
|
children: [
|
|
111
|
-
S ? /* @__PURE__ */ o(k, { "data-testid": "menu-pinned", children:
|
|
110
|
+
S ? /* @__PURE__ */ o(k, { "data-testid": "menu-pinned", children: p.map((e) => {
|
|
112
111
|
const n = e.options?.[0]?.items?.map((r) => ({
|
|
113
112
|
name: r.label ?? r.value,
|
|
114
113
|
value: r.value
|
|
@@ -141,17 +140,17 @@ const Z = (c, d) => {
|
|
|
141
140
|
children: e
|
|
142
141
|
}
|
|
143
142
|
) : void 0,
|
|
144
|
-
n.map((
|
|
145
|
-
const G = s[
|
|
143
|
+
n.map((i) => {
|
|
144
|
+
const G = s[i.id], F = Z(
|
|
146
145
|
G,
|
|
147
|
-
|
|
146
|
+
i.options
|
|
148
147
|
);
|
|
149
148
|
return /* @__PURE__ */ o(L, { children: /* @__PURE__ */ a(
|
|
150
149
|
N,
|
|
151
150
|
{
|
|
152
151
|
as: "button",
|
|
153
|
-
"data-testid":
|
|
154
|
-
onClick: V(
|
|
152
|
+
"data-testid": i.id,
|
|
153
|
+
onClick: V(i.id),
|
|
155
154
|
children: [
|
|
156
155
|
/* @__PURE__ */ o(
|
|
157
156
|
T,
|
|
@@ -162,7 +161,7 @@ const Z = (c, d) => {
|
|
|
162
161
|
iconType: "fa-light"
|
|
163
162
|
}
|
|
164
163
|
),
|
|
165
|
-
|
|
164
|
+
i.label,
|
|
166
165
|
/* @__PURE__ */ a(
|
|
167
166
|
x,
|
|
168
167
|
{
|
|
@@ -171,7 +170,7 @@ const Z = (c, d) => {
|
|
|
171
170
|
gap: 0.5,
|
|
172
171
|
style: { marginLeft: "auto" },
|
|
173
172
|
children: [
|
|
174
|
-
f ===
|
|
173
|
+
f === i.id ? /* @__PURE__ */ o(
|
|
175
174
|
T,
|
|
176
175
|
{
|
|
177
176
|
icon: "chevron-right",
|
|
@@ -186,7 +185,7 @@ const Z = (c, d) => {
|
|
|
186
185
|
)
|
|
187
186
|
]
|
|
188
187
|
}
|
|
189
|
-
) },
|
|
188
|
+
) }, i.id);
|
|
190
189
|
})
|
|
191
190
|
]
|
|
192
191
|
},
|
|
@@ -198,5 +197,5 @@ const Z = (c, d) => {
|
|
|
198
197
|
] });
|
|
199
198
|
});
|
|
200
199
|
export {
|
|
201
|
-
|
|
200
|
+
ke as FiltersMenu
|
|
202
201
|
};
|
|
@@ -17,7 +17,6 @@ import "react-dom";
|
|
|
17
17
|
import "../../../typography/heading/index.js";
|
|
18
18
|
import { Span as le } from "../../../typography/span/index.js";
|
|
19
19
|
import "../../../typography/text/index.js";
|
|
20
|
-
import "../../../inputs/styles.js";
|
|
21
20
|
import "../../../container/index.js";
|
|
22
21
|
import { Tag as O } from "../../../tag/index.js";
|
|
23
22
|
import "../../../icon-button/index.js";
|
|
@@ -325,7 +324,7 @@ const pe = ({
|
|
|
325
324
|
}
|
|
326
325
|
) });
|
|
327
326
|
}
|
|
328
|
-
},
|
|
327
|
+
}, He = ({
|
|
329
328
|
id: i,
|
|
330
329
|
filteredItems: l,
|
|
331
330
|
filterValue: a,
|
|
@@ -439,6 +438,6 @@ const pe = ({
|
|
|
439
438
|
}) ?? null });
|
|
440
439
|
};
|
|
441
440
|
export {
|
|
442
|
-
|
|
441
|
+
He as Options,
|
|
443
442
|
pe as TextFilterRenderer
|
|
444
443
|
};
|