@fluidattacks/design 10.0.0 → 10.0.1
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/advisories-card/index.js +2 -4
- package/dist/components/card/card-with-input/index.js +2 -3
- package/dist/components/carousel/index.js +10 -12
- package/dist/components/cloud-image/index.js +8 -10
- package/dist/components/conditions-dialog/index.js +21 -23
- package/dist/components/confirm-dialog/index.js +7 -9
- package/dist/components/filters/filters-menu/index.js +23 -24
- package/dist/components/filters/options-menu/options/index.js +37 -38
- package/dist/components/item-card-db/index.js +8 -10
- package/dist/components/modal/dialog/index.js +6 -8
- package/dist/components/package-card/index.js +23 -25
- package/dist/components/rules-card/index.js +17 -19
- package/dist/components/severity-indicator/index.js +14 -16
- package/dist/components/slider/index.js +2 -3
- package/dist/components/table/styles.js +1 -1
- package/dist/components/table/table-column-toggle/index.js +6 -7
- package/dist/components/table/wrapper/index.js +8 -10
- package/dist/components/weaknesses-card/index.js +2 -4
- package/dist/hooks/use-search.js +3 -4
- package/package.json +5 -5
|
@@ -8,10 +8,8 @@ import { Heading as T } from "../typography/heading/index.js";
|
|
|
8
8
|
import { Span as f } from "../typography/span/index.js";
|
|
9
9
|
import { Text as l } from "../typography/text/index.js";
|
|
10
10
|
import { CardContainer as k, Divisor as t } from "../weaknesses-card/styles.js";
|
|
11
|
-
import "../../_virtual/dayjs.min.js";
|
|
12
|
-
import "../../_virtual/lodash.js";
|
|
13
11
|
import { safeUrl as A } from "../../utils/url.js";
|
|
14
|
-
const
|
|
12
|
+
const W = ({
|
|
15
13
|
author: g,
|
|
16
14
|
creator: p,
|
|
17
15
|
cwes: d,
|
|
@@ -149,5 +147,5 @@ const G = ({
|
|
|
149
147
|
] });
|
|
150
148
|
};
|
|
151
149
|
export {
|
|
152
|
-
|
|
150
|
+
W as AdvisoriesCard
|
|
153
151
|
};
|
|
@@ -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,21 +1,19 @@
|
|
|
1
1
|
import { jsxs as u, jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import { useCallback as p } from "react";
|
|
3
|
-
import { CarouselContainer as
|
|
3
|
+
import { CarouselContainer as C, CarouselWrapper as m, CarouselSlide as d, NavContainer as v, NavButton as h } from "./styles.js";
|
|
4
4
|
import { useCarousel as k } from "../../hooks/use-carousel.js";
|
|
5
|
-
|
|
6
|
-
import "nuqs";
|
|
7
|
-
const j = ({
|
|
5
|
+
const N = ({
|
|
8
6
|
slides: a,
|
|
9
7
|
interval: c = 300
|
|
10
8
|
}) => {
|
|
11
|
-
const { cycle:
|
|
9
|
+
const { cycle: l, setCycle: n, setProgress: i } = k(c, a.length), s = p(
|
|
12
10
|
(e) => () => {
|
|
13
|
-
|
|
11
|
+
n(e), i(0);
|
|
14
12
|
},
|
|
15
|
-
[
|
|
13
|
+
[n, i]
|
|
16
14
|
);
|
|
17
|
-
return /* @__PURE__ */ u(
|
|
18
|
-
/* @__PURE__ */ o(
|
|
15
|
+
return /* @__PURE__ */ u(C, { "aria-roledescription": "carousel", children: [
|
|
16
|
+
/* @__PURE__ */ o(m, { $currentIndex: l, children: a.map((e, r) => {
|
|
19
17
|
const t = `slide-${r}`;
|
|
20
18
|
return /* @__PURE__ */ o(
|
|
21
19
|
d,
|
|
@@ -32,9 +30,9 @@ const j = ({
|
|
|
32
30
|
return /* @__PURE__ */ o(
|
|
33
31
|
h,
|
|
34
32
|
{
|
|
35
|
-
$isActive: r ===
|
|
33
|
+
$isActive: r === l,
|
|
36
34
|
"aria-label": `Go to slide ${r + 1}`,
|
|
37
|
-
"data-testid": r ===
|
|
35
|
+
"data-testid": r === l ? "active" : "inactive",
|
|
38
36
|
onClick: s(r)
|
|
39
37
|
},
|
|
40
38
|
t
|
|
@@ -43,5 +41,5 @@ const j = ({
|
|
|
43
41
|
] });
|
|
44
42
|
};
|
|
45
43
|
export {
|
|
46
|
-
|
|
44
|
+
N as Carousel
|
|
47
45
|
};
|
|
@@ -1,18 +1,16 @@
|
|
|
1
1
|
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
-
import { AdvancedImage as l, lazyload as g, placeholder as
|
|
3
|
-
import
|
|
4
|
-
import { useCloudinaryImage as
|
|
5
|
-
|
|
6
|
-
import "nuqs";
|
|
7
|
-
const n = ({
|
|
2
|
+
import { AdvancedImage as l, lazyload as g, placeholder as c } from "../../node_modules/@cloudinary/react/dist/index.js";
|
|
3
|
+
import f from "react";
|
|
4
|
+
import { useCloudinaryImage as n } from "../../hooks/use-cloudinary-image.js";
|
|
5
|
+
const p = ({
|
|
8
6
|
alt: e = "img",
|
|
9
7
|
height: a = "",
|
|
10
8
|
width: r = "",
|
|
11
9
|
transformation: m,
|
|
12
|
-
plugins: d = [g(),
|
|
10
|
+
plugins: d = [g(), c()],
|
|
13
11
|
publicId: t
|
|
14
12
|
}) => {
|
|
15
|
-
const o =
|
|
13
|
+
const o = n({ publicId: t });
|
|
16
14
|
return m && o.addTransformation(m), /* @__PURE__ */ i(
|
|
17
15
|
l,
|
|
18
16
|
{
|
|
@@ -23,7 +21,7 @@ const n = ({
|
|
|
23
21
|
width: r
|
|
24
22
|
}
|
|
25
23
|
);
|
|
26
|
-
},
|
|
24
|
+
}, x = f.memo(p);
|
|
27
25
|
export {
|
|
28
|
-
|
|
26
|
+
x as CloudImage
|
|
29
27
|
};
|
|
@@ -1,31 +1,29 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as h, jsxs as x } from "react/jsx-runtime";
|
|
2
2
|
import { useState as k, useRef as j, useCallback as r, useMemo as D } from "react";
|
|
3
3
|
import { Checkbox as M } from "../checkbox/index.js";
|
|
4
4
|
import { Container as O } from "../container/index.js";
|
|
5
5
|
import { Modal as y } from "../modal/index.js";
|
|
6
|
-
import "../../_virtual/lodash.js";
|
|
7
|
-
import "nuqs";
|
|
8
6
|
import { useModal as v } from "../../hooks/use-modal.js";
|
|
9
7
|
import { ModalConfirm as R } from "../modal/modal-confirm/index.js";
|
|
10
8
|
const S = ({
|
|
11
9
|
children: a,
|
|
12
|
-
conditions:
|
|
10
|
+
conditions: t,
|
|
13
11
|
id: c,
|
|
14
12
|
modalRef: s,
|
|
15
13
|
onConfirm: m,
|
|
16
14
|
title: d
|
|
17
15
|
}) => {
|
|
18
|
-
const [
|
|
19
|
-
i({ ...
|
|
20
|
-
}, [
|
|
16
|
+
const [n, i] = k(t), f = r(() => {
|
|
17
|
+
i({ ...t });
|
|
18
|
+
}, [t]), u = r((o) => () => {
|
|
21
19
|
i((e) => ({
|
|
22
20
|
...e,
|
|
23
21
|
[o]: { ...e[o], state: !e[o].state }
|
|
24
22
|
}));
|
|
25
|
-
}, []), l = !Object.values(
|
|
23
|
+
}, []), l = !Object.values(n).every(
|
|
26
24
|
({ state: o }) => o
|
|
27
|
-
),
|
|
28
|
-
([o, { state: e, label: C }]) => /* @__PURE__ */
|
|
25
|
+
), p = Object.entries(n).map(
|
|
26
|
+
([o, { state: e, label: C }]) => /* @__PURE__ */ h(
|
|
29
27
|
M,
|
|
30
28
|
{
|
|
31
29
|
defaultChecked: e,
|
|
@@ -47,17 +45,17 @@ const S = ({
|
|
|
47
45
|
title: d,
|
|
48
46
|
children: [
|
|
49
47
|
a,
|
|
50
|
-
/* @__PURE__ */
|
|
51
|
-
/* @__PURE__ */
|
|
48
|
+
/* @__PURE__ */ h(O, { display: "flex", flexDirection: "column", gap: 0.5, children: p }),
|
|
49
|
+
/* @__PURE__ */ h(R, { disabled: l, id: c, onConfirm: m })
|
|
52
50
|
]
|
|
53
51
|
}
|
|
54
52
|
);
|
|
55
|
-
},
|
|
56
|
-
const { close: s, isOpen: m, name: d, open:
|
|
53
|
+
}, E = (a, t, c) => {
|
|
54
|
+
const { close: s, isOpen: m, name: d, open: n, setIsOpen: i, toggle: f } = v(
|
|
57
55
|
"confirm-dialog-modal"
|
|
58
|
-
), [u] = k(c), l = j(null),
|
|
56
|
+
), [u] = k(c), l = j(null), p = r(async () => (n(), new Promise((g) => {
|
|
59
57
|
l.current = g;
|
|
60
|
-
})), [
|
|
58
|
+
})), [n]), o = r(() => {
|
|
61
59
|
s(), l.current?.(!0);
|
|
62
60
|
}, [s]), e = r(() => {
|
|
63
61
|
s(), l.current?.(!1);
|
|
@@ -66,27 +64,27 @@ const S = ({
|
|
|
66
64
|
close: e,
|
|
67
65
|
isOpen: m,
|
|
68
66
|
name: d,
|
|
69
|
-
open:
|
|
67
|
+
open: n,
|
|
70
68
|
setIsOpen: i,
|
|
71
69
|
toggle: f
|
|
72
70
|
}),
|
|
73
|
-
[e, m, d,
|
|
71
|
+
[e, m, d, n, i, f]
|
|
74
72
|
), b = r(
|
|
75
|
-
({ children: g }) => /* @__PURE__ */
|
|
73
|
+
({ children: g }) => /* @__PURE__ */ h(
|
|
76
74
|
S,
|
|
77
75
|
{
|
|
78
76
|
conditions: u,
|
|
79
77
|
id: a,
|
|
80
78
|
modalRef: C,
|
|
81
79
|
onConfirm: o,
|
|
82
|
-
title:
|
|
80
|
+
title: t,
|
|
83
81
|
children: g
|
|
84
82
|
}
|
|
85
83
|
),
|
|
86
|
-
[o, a, u, C,
|
|
84
|
+
[o, a, u, C, t]
|
|
87
85
|
);
|
|
88
|
-
return [
|
|
86
|
+
return [p, b];
|
|
89
87
|
};
|
|
90
88
|
export {
|
|
91
|
-
|
|
89
|
+
E as useConditionsDialog
|
|
92
90
|
};
|
|
@@ -1,25 +1,23 @@
|
|
|
1
1
|
import { jsxs as f } from "react/jsx-runtime";
|
|
2
2
|
import { useState as u, useRef as C, useCallback as l } from "react";
|
|
3
3
|
import { Modal as p } from "../modal/index.js";
|
|
4
|
-
import "../../_virtual/lodash.js";
|
|
5
|
-
import "nuqs";
|
|
6
4
|
import { useModal as g } from "../../hooks/use-modal.js";
|
|
7
|
-
const
|
|
8
|
-
const [o, n] = u(), r = C(null), c = g("confirm-dialog-modal"), { close: e, open: s } = c,
|
|
5
|
+
const M = () => {
|
|
6
|
+
const [o, n] = u(), r = C(null), c = g("confirm-dialog-modal"), { close: e, open: s } = c, m = l(
|
|
9
7
|
async (i) => (n(i), s(), new Promise((t) => {
|
|
10
8
|
r.current = t;
|
|
11
9
|
})),
|
|
12
10
|
[s]
|
|
13
11
|
), d = l(() => {
|
|
14
12
|
e(), n(void 0), r.current?.(!0);
|
|
15
|
-
}, [e]),
|
|
13
|
+
}, [e]), a = l(() => {
|
|
16
14
|
e(), n(void 0), r.current?.(!1);
|
|
17
15
|
}, [e]);
|
|
18
16
|
return { ConfirmDialog: ({ id: i = "confirm-dialog-modal", children: t }) => /* @__PURE__ */ f(
|
|
19
17
|
p,
|
|
20
18
|
{
|
|
21
19
|
cancelButton: o?.showCancel === !0 || o?.showCancel === void 0 ? {
|
|
22
|
-
onClick:
|
|
20
|
+
onClick: a,
|
|
23
21
|
text: o?.cancelText ?? "Cancel"
|
|
24
22
|
} : void 0,
|
|
25
23
|
confirmButton: o?.showConfirm === !0 || o?.showConfirm === void 0 ? {
|
|
@@ -29,7 +27,7 @@ const P = () => {
|
|
|
29
27
|
} : void 0,
|
|
30
28
|
description: o?.message,
|
|
31
29
|
id: i,
|
|
32
|
-
modalRef: { ...c, close:
|
|
30
|
+
modalRef: { ...c, close: a },
|
|
33
31
|
size: o?.modalSize ?? "sm",
|
|
34
32
|
title: o?.title,
|
|
35
33
|
children: [
|
|
@@ -37,8 +35,8 @@ const P = () => {
|
|
|
37
35
|
t
|
|
38
36
|
]
|
|
39
37
|
}
|
|
40
|
-
), confirm:
|
|
38
|
+
), confirm: m };
|
|
41
39
|
};
|
|
42
40
|
export {
|
|
43
|
-
|
|
41
|
+
M as useConfirmDialog
|
|
44
42
|
};
|
|
@@ -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
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as r, Fragment as q, jsxs as w } from "react/jsx-runtime";
|
|
2
2
|
import { useVirtualizer as H } from "../../../../node_modules/@tanstack/react-virtual/dist/esm/index.js";
|
|
3
3
|
import J from "../../../../_virtual/dayjs.min.js";
|
|
4
4
|
import E from "../../../../_virtual/isNaN.js";
|
|
@@ -16,16 +16,15 @@ import "react-dom";
|
|
|
16
16
|
import "../../../typography/heading/index.js";
|
|
17
17
|
import { Span as ee } from "../../../typography/span/index.js";
|
|
18
18
|
import "../../../typography/text/index.js";
|
|
19
|
-
import "../../../inputs/styles.js";
|
|
20
19
|
import "../../../container/index.js";
|
|
21
20
|
import { Tag as te } from "../../../tag/index.js";
|
|
22
21
|
import "../../../icon-button/index.js";
|
|
23
22
|
import "../../../button/index.js";
|
|
24
23
|
import { InputDateRange as oe } from "../../../inputs/fields/date-range/index.js";
|
|
25
|
-
import { TextInput as
|
|
24
|
+
import { TextInput as ne } from "../../../inputs/fields/text-input/index.js";
|
|
26
25
|
import "../../../layout/categories/buttons/index.js";
|
|
27
26
|
import "../../../inputs/utils/action-button/index.js";
|
|
28
|
-
import { InputNumberRange as
|
|
27
|
+
import { InputNumberRange as re } from "../../../inputs/fields/number-range/index.js";
|
|
29
28
|
import "../../../../node_modules/react-international-phone/dist/index.js";
|
|
30
29
|
import { useDebouncedCallback as le } from "../../../../hooks/use-debounced-callback.js";
|
|
31
30
|
import { useMountEffect as ae } from "../../../../hooks/use-mount-effect.js";
|
|
@@ -37,11 +36,11 @@ const ce = ({
|
|
|
37
36
|
onTextValue: t,
|
|
38
37
|
checkboxLabel: s,
|
|
39
38
|
onCheckboxChange: e,
|
|
40
|
-
debounceMs:
|
|
39
|
+
debounceMs: n
|
|
41
40
|
}) => {
|
|
42
41
|
const { text: c, checked: f } = se(
|
|
43
42
|
l ?? ""
|
|
44
|
-
), [u, d] = T(c), [g, R] = T(c), h = Number.isFinite(
|
|
43
|
+
), [u, d] = T(c), [g, R] = T(c), h = Number.isFinite(n) && (n ?? 0) >= 0 ? Math.min(n ?? 0, 5e3) : 0, b = le(t, h);
|
|
45
44
|
c !== g && (R(c), d(c), b.cancel());
|
|
46
45
|
const k = p(
|
|
47
46
|
(x) => {
|
|
@@ -61,7 +60,7 @@ const ce = ({
|
|
|
61
60
|
width: "100%"
|
|
62
61
|
},
|
|
63
62
|
children: [
|
|
64
|
-
s ? /* @__PURE__ */
|
|
63
|
+
s ? /* @__PURE__ */ r(
|
|
65
64
|
O,
|
|
66
65
|
{
|
|
67
66
|
checked: f,
|
|
@@ -71,8 +70,8 @@ const ce = ({
|
|
|
71
70
|
value: "textCheck"
|
|
72
71
|
}
|
|
73
72
|
) : void 0,
|
|
74
|
-
/* @__PURE__ */
|
|
75
|
-
|
|
73
|
+
/* @__PURE__ */ r(
|
|
74
|
+
ne,
|
|
76
75
|
{
|
|
77
76
|
name: i,
|
|
78
77
|
onChange: k,
|
|
@@ -91,12 +90,12 @@ const ce = ({
|
|
|
91
90
|
onTextValue: t,
|
|
92
91
|
checkboxLabel: s,
|
|
93
92
|
onCheckboxChange: e,
|
|
94
|
-
debounceMs:
|
|
95
|
-
}) => t === void 0 ? null : /* @__PURE__ */
|
|
93
|
+
debounceMs: n
|
|
94
|
+
}) => t === void 0 ? null : /* @__PURE__ */ r(
|
|
96
95
|
ce,
|
|
97
96
|
{
|
|
98
97
|
checkboxLabel: s,
|
|
99
|
-
debounceMs:
|
|
98
|
+
debounceMs: n,
|
|
100
99
|
filterValue: l,
|
|
101
100
|
id: i,
|
|
102
101
|
label: a,
|
|
@@ -111,7 +110,7 @@ const ce = ({
|
|
|
111
110
|
listRef: t,
|
|
112
111
|
ref: s,
|
|
113
112
|
scrollMargin: e,
|
|
114
|
-
totalSize:
|
|
113
|
+
totalSize: n,
|
|
115
114
|
onChange: c
|
|
116
115
|
}) => {
|
|
117
116
|
const f = new Set(
|
|
@@ -119,19 +118,19 @@ const ce = ({
|
|
|
119
118
|
);
|
|
120
119
|
return l.length > 0 ? (
|
|
121
120
|
// Positioning context for the absolute rows, and it reserves their height
|
|
122
|
-
/* @__PURE__ */
|
|
121
|
+
/* @__PURE__ */ r(
|
|
123
122
|
"div",
|
|
124
123
|
{
|
|
125
124
|
"data-testid": "options-virtual-list",
|
|
126
125
|
ref: t,
|
|
127
126
|
style: {
|
|
128
|
-
height: `${
|
|
127
|
+
height: `${n}px`,
|
|
129
128
|
position: "relative",
|
|
130
129
|
width: "100%"
|
|
131
130
|
},
|
|
132
131
|
children: l.map((u) => {
|
|
133
132
|
const d = i[u.index], g = f.has(d?.value);
|
|
134
|
-
return /* @__PURE__ */
|
|
133
|
+
return /* @__PURE__ */ r(
|
|
135
134
|
"div",
|
|
136
135
|
{
|
|
137
136
|
"data-index": u.index,
|
|
@@ -142,7 +141,7 @@ const ce = ({
|
|
|
142
141
|
left: 0,
|
|
143
142
|
width: "100%"
|
|
144
143
|
},
|
|
145
|
-
children: /* @__PURE__ */
|
|
144
|
+
children: /* @__PURE__ */ r(y, { "aria-selected": g, children: /* @__PURE__ */ r(
|
|
146
145
|
O,
|
|
147
146
|
{
|
|
148
147
|
checked: g,
|
|
@@ -158,7 +157,7 @@ const ce = ({
|
|
|
158
157
|
})
|
|
159
158
|
}
|
|
160
159
|
)
|
|
161
|
-
) : /* @__PURE__ */
|
|
160
|
+
) : /* @__PURE__ */ r(X, {});
|
|
162
161
|
},
|
|
163
162
|
combobox: ({
|
|
164
163
|
id: i,
|
|
@@ -166,14 +165,14 @@ const ce = ({
|
|
|
166
165
|
filterValue: a,
|
|
167
166
|
label: t,
|
|
168
167
|
onSelectChange: s
|
|
169
|
-
}) => /* @__PURE__ */
|
|
168
|
+
}) => /* @__PURE__ */ r(
|
|
170
169
|
Z,
|
|
171
170
|
{
|
|
172
171
|
items: l,
|
|
173
172
|
name: i,
|
|
174
173
|
onSelect: s,
|
|
175
174
|
placeholder: `Search ${t}`,
|
|
176
|
-
selected: a?.split(",").map((e) => e.trim()).find((e) => l.some((
|
|
175
|
+
selected: a?.split(",").map((e) => e.trim()).find((e) => l.some((n) => n.value === e)) ?? null
|
|
177
176
|
}
|
|
178
177
|
),
|
|
179
178
|
list: ({ items: i, filterValue: l, onListChange: a }) => i.map((t) => /* @__PURE__ */ w(
|
|
@@ -183,7 +182,7 @@ const ce = ({
|
|
|
183
182
|
as: "button",
|
|
184
183
|
onClick: a?.(t.value),
|
|
185
184
|
children: [
|
|
186
|
-
t.icon ? /* @__PURE__ */
|
|
185
|
+
t.icon ? /* @__PURE__ */ r(
|
|
187
186
|
z,
|
|
188
187
|
{
|
|
189
188
|
icon: t.icon,
|
|
@@ -192,7 +191,7 @@ const ce = ({
|
|
|
192
191
|
iconType: t.iconType ?? "fa-light"
|
|
193
192
|
}
|
|
194
193
|
) : void 0,
|
|
195
|
-
/* @__PURE__ */
|
|
194
|
+
/* @__PURE__ */ r(
|
|
196
195
|
ee,
|
|
197
196
|
{
|
|
198
197
|
color: L.palette.gray[800],
|
|
@@ -205,15 +204,15 @@ const ce = ({
|
|
|
205
204
|
children: t.label
|
|
206
205
|
}
|
|
207
206
|
),
|
|
208
|
-
/* @__PURE__ */
|
|
209
|
-
t.count === void 0 ? void 0 : /* @__PURE__ */
|
|
207
|
+
/* @__PURE__ */ r("span", { className: "filter-item" }),
|
|
208
|
+
t.count === void 0 ? void 0 : /* @__PURE__ */ r(Y, { children: /* @__PURE__ */ r(
|
|
210
209
|
te,
|
|
211
210
|
{
|
|
212
211
|
tagLabel: t.count.toLocaleString("en-US"),
|
|
213
212
|
variant: "default"
|
|
214
213
|
}
|
|
215
214
|
) }),
|
|
216
|
-
l?.split(",").includes(t?.value) ? /* @__PURE__ */
|
|
215
|
+
l?.split(",").includes(t?.value) ? /* @__PURE__ */ r("div", { style: { marginLeft: "auto" }, children: /* @__PURE__ */ r(
|
|
217
216
|
z,
|
|
218
217
|
{
|
|
219
218
|
icon: "check",
|
|
@@ -232,8 +231,8 @@ const ce = ({
|
|
|
232
231
|
onRangeChange: a,
|
|
233
232
|
updateCalendarState: t
|
|
234
233
|
}) => {
|
|
235
|
-
const [s, e] = l?.split(",").filter((
|
|
236
|
-
return /* @__PURE__ */
|
|
234
|
+
const [s, e] = l?.split(",").filter((n) => J(n).isValid() || n === "-") ?? [];
|
|
235
|
+
return /* @__PURE__ */ r(y, { children: /* @__PURE__ */ r(
|
|
237
236
|
oe,
|
|
238
237
|
{
|
|
239
238
|
name: i,
|
|
@@ -259,9 +258,9 @@ const ce = ({
|
|
|
259
258
|
maxValue: t,
|
|
260
259
|
onRangeNumberChange: s
|
|
261
260
|
}) => {
|
|
262
|
-
const e = l?.split(",") ?? [],
|
|
263
|
-
return /* @__PURE__ */
|
|
264
|
-
|
|
261
|
+
const e = l?.split(",") ?? [], n = e[0]?.trim(), c = e[1]?.trim(), f = n && n !== "" && n !== "-" && !E(Number(n)) ? Number(n) : void 0, u = c && c !== "" && c !== "-" && !E(Number(c)) ? Number(c) : void 0;
|
|
262
|
+
return /* @__PURE__ */ r(y, { children: /* @__PURE__ */ r(
|
|
263
|
+
re,
|
|
265
264
|
{
|
|
266
265
|
name: i,
|
|
267
266
|
propsMax: {
|
|
@@ -284,7 +283,7 @@ const ce = ({
|
|
|
284
283
|
}
|
|
285
284
|
) });
|
|
286
285
|
}
|
|
287
|
-
},
|
|
286
|
+
}, Ge = ({
|
|
288
287
|
id: i,
|
|
289
288
|
filteredItems: l,
|
|
290
289
|
filterValue: a,
|
|
@@ -292,7 +291,7 @@ const ce = ({
|
|
|
292
291
|
option: s,
|
|
293
292
|
onChange: e
|
|
294
293
|
}) => {
|
|
295
|
-
const { type:
|
|
294
|
+
const { type: n, minValue: c, maxValue: f, checkboxLabel: u, debounceMs: d } = s ?? {}, g = n && me[n], {
|
|
296
295
|
calendarState: { updateCalendarState: R },
|
|
297
296
|
scrollState: h
|
|
298
297
|
} = K(W), b = p(() => 36, []), k = p(
|
|
@@ -333,9 +332,9 @@ const ce = ({
|
|
|
333
332
|
useFlushSync: !1
|
|
334
333
|
}), D = N.getVirtualItems(), F = p(
|
|
335
334
|
(o) => {
|
|
336
|
-
o.stopPropagation(), o.preventDefault(), e(o.target.value,
|
|
335
|
+
o.stopPropagation(), o.preventDefault(), e(o.target.value, n ?? "");
|
|
337
336
|
},
|
|
338
|
-
[e,
|
|
337
|
+
[e, n]
|
|
339
338
|
), P = p(
|
|
340
339
|
(o) => (m) => {
|
|
341
340
|
e(m, "dateRange", o);
|
|
@@ -363,11 +362,11 @@ const ce = ({
|
|
|
363
362
|
[e]
|
|
364
363
|
), G = p(
|
|
365
364
|
(o) => {
|
|
366
|
-
e(o,
|
|
365
|
+
e(o, n ?? "text");
|
|
367
366
|
},
|
|
368
|
-
[e,
|
|
367
|
+
[e, n]
|
|
369
368
|
), U = N.getTotalSize();
|
|
370
|
-
return /* @__PURE__ */
|
|
369
|
+
return /* @__PURE__ */ r(q, { children: g?.({
|
|
371
370
|
items: l,
|
|
372
371
|
label: t,
|
|
373
372
|
virtualItems: D,
|
|
@@ -392,6 +391,6 @@ const ce = ({
|
|
|
392
391
|
}) ?? null });
|
|
393
392
|
};
|
|
394
393
|
export {
|
|
395
|
-
|
|
394
|
+
Ge as Options,
|
|
396
395
|
ce as TextFilterRenderer
|
|
397
396
|
};
|
|
@@ -7,27 +7,25 @@ import { Tag as y } from "../tag/index.js";
|
|
|
7
7
|
import { Heading as k } from "../typography/heading/index.js";
|
|
8
8
|
import "../typography/span/index.js";
|
|
9
9
|
import { Text as l } from "../typography/text/index.js";
|
|
10
|
-
import "../../_virtual/dayjs.min.js";
|
|
11
|
-
import "../../_virtual/lodash.js";
|
|
12
10
|
import { safeUrl as j } from "../../utils/url.js";
|
|
13
11
|
const L = {
|
|
14
12
|
md: { titleSize: "xs", descSize: "md", linkTextSize: "md" },
|
|
15
13
|
lg: { titleSize: "sm", descSize: "lg", linkTextSize: "lg" }
|
|
16
|
-
},
|
|
14
|
+
}, U = ({
|
|
17
15
|
desc: r,
|
|
18
16
|
href: c,
|
|
19
17
|
icon: n,
|
|
20
18
|
imageHeight: m = 48,
|
|
21
19
|
imageWidth: a = 48,
|
|
22
|
-
Link:
|
|
23
|
-
LinkElement:
|
|
24
|
-
linkText:
|
|
20
|
+
Link: h,
|
|
21
|
+
LinkElement: f,
|
|
22
|
+
linkText: p = "Learn more ",
|
|
25
23
|
publicId: o,
|
|
26
24
|
size: z = "lg",
|
|
27
25
|
tag: d,
|
|
28
26
|
title: t
|
|
29
27
|
}) => {
|
|
30
|
-
const g =
|
|
28
|
+
const g = h ?? "a", { titleSize: x, descSize: S, linkTextSize: I } = L[z];
|
|
31
29
|
return /* @__PURE__ */ i(C, { "data-testid": t, children: [
|
|
32
30
|
/* @__PURE__ */ i(
|
|
33
31
|
w,
|
|
@@ -63,12 +61,12 @@ const L = {
|
|
|
63
61
|
),
|
|
64
62
|
/* @__PURE__ */ e(k, { size: x, children: t }),
|
|
65
63
|
r ? /* @__PURE__ */ e(l, { size: S, children: r }) : void 0,
|
|
66
|
-
|
|
67
|
-
|
|
64
|
+
f ?? /* @__PURE__ */ e(g, { href: j(c), style: { textDecoration: "none" }, children: /* @__PURE__ */ i(l, { size: I, children: [
|
|
65
|
+
p,
|
|
68
66
|
/* @__PURE__ */ e(s, { icon: "arrow-right", iconSize: "sm", iconType: "fa-light" })
|
|
69
67
|
] }) })
|
|
70
68
|
] });
|
|
71
69
|
};
|
|
72
70
|
export {
|
|
73
|
-
|
|
71
|
+
U as ItemCardDB
|
|
74
72
|
};
|
|
@@ -1,23 +1,21 @@
|
|
|
1
1
|
import { jsx as m } from "react/jsx-runtime";
|
|
2
|
-
import { useRef as
|
|
2
|
+
import { useRef as f, useState as c } from "react";
|
|
3
3
|
import { trapTabKey as o } from "./utils.js";
|
|
4
|
-
import { ModalWrapper as
|
|
5
|
-
import "../../../_virtual/lodash.js";
|
|
6
|
-
import "nuqs";
|
|
4
|
+
import { ModalWrapper as p } from "../styles.js";
|
|
7
5
|
import { useMountEffect as s } from "../../../hooks/use-mount-effect.js";
|
|
8
|
-
const
|
|
6
|
+
const w = ({
|
|
9
7
|
children: n = void 0,
|
|
10
8
|
id: a = void 0,
|
|
11
9
|
label: i
|
|
12
10
|
}) => {
|
|
13
|
-
const r =
|
|
11
|
+
const r = f(null), [t] = c(() => document.activeElement);
|
|
14
12
|
return s(() => {
|
|
15
13
|
const e = r.current;
|
|
16
14
|
return e?.contains(document.activeElement) !== !0 && e?.focus(), e?.addEventListener("keydown", o), () => {
|
|
17
15
|
e?.removeEventListener("keydown", o), t instanceof HTMLElement && t.focus();
|
|
18
16
|
};
|
|
19
17
|
}), /* @__PURE__ */ m(
|
|
20
|
-
|
|
18
|
+
p,
|
|
21
19
|
{
|
|
22
20
|
"aria-label": i,
|
|
23
21
|
"aria-modal": "true",
|
|
@@ -30,5 +28,5 @@ const x = ({
|
|
|
30
28
|
);
|
|
31
29
|
};
|
|
32
30
|
export {
|
|
33
|
-
|
|
31
|
+
w as Dialog
|
|
34
32
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as l, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import x from "../../_virtual/capitalize.js";
|
|
3
3
|
import { Fragment as y } from "react";
|
|
4
4
|
import { useTheme as b } from "styled-components";
|
|
@@ -7,10 +7,8 @@ import { SeverityBadge as u } from "../severity-badge/index.js";
|
|
|
7
7
|
import { Tag as I } from "../tag/index.js";
|
|
8
8
|
import { Heading as w } from "../typography/heading/index.js";
|
|
9
9
|
import "../typography/span/index.js";
|
|
10
|
-
import { Text as
|
|
10
|
+
import { Text as t } from "../typography/text/index.js";
|
|
11
11
|
import { CardContainer as C, Divisor as z } from "../weaknesses-card/styles.js";
|
|
12
|
-
import "../../_virtual/dayjs.min.js";
|
|
13
|
-
import "../../_virtual/lodash.js";
|
|
14
12
|
import { safeUrl as v } from "../../utils/url.js";
|
|
15
13
|
const R = {
|
|
16
14
|
critical: "critical",
|
|
@@ -18,23 +16,23 @@ const R = {
|
|
|
18
16
|
low: "low",
|
|
19
17
|
medium: "medium",
|
|
20
18
|
none: "disable"
|
|
21
|
-
},
|
|
22
|
-
affectedVersions:
|
|
23
|
-
ecosystem:
|
|
24
|
-
href:
|
|
19
|
+
}, W = ({
|
|
20
|
+
affectedVersions: o,
|
|
21
|
+
ecosystem: d,
|
|
22
|
+
href: p,
|
|
25
23
|
indx: s,
|
|
26
24
|
packageName: m,
|
|
27
|
-
severity:
|
|
25
|
+
severity: a,
|
|
28
26
|
status: c,
|
|
29
27
|
Link: h
|
|
30
28
|
}) => {
|
|
31
|
-
const r = b(), n =
|
|
32
|
-
return /* @__PURE__ */
|
|
33
|
-
/* @__PURE__ */
|
|
34
|
-
/* @__PURE__ */ e(g, { href: v(
|
|
35
|
-
/* @__PURE__ */ e(I, { tagLabel:
|
|
29
|
+
const r = b(), n = a ? R[a.toLowerCase()] : void 0, g = h ?? "a", f = c === "vulnerable";
|
|
30
|
+
return /* @__PURE__ */ l(C, { $index: s, children: [
|
|
31
|
+
/* @__PURE__ */ l(i, { display: "flex", justify: "space-between", width: "100%", children: [
|
|
32
|
+
/* @__PURE__ */ e(g, { href: v(p), children: /* @__PURE__ */ e(i, { alignItems: "center", display: "flex", gap: 0.75, children: /* @__PURE__ */ e(w, { fontWeight: "bold", size: "sm", children: m }) }) }),
|
|
33
|
+
/* @__PURE__ */ e(I, { tagLabel: d })
|
|
36
34
|
] }),
|
|
37
|
-
/* @__PURE__ */
|
|
35
|
+
/* @__PURE__ */ l(
|
|
38
36
|
i,
|
|
39
37
|
{
|
|
40
38
|
alignItems: "center",
|
|
@@ -43,7 +41,7 @@ const R = {
|
|
|
43
41
|
width: "100%",
|
|
44
42
|
wrap: "wrap",
|
|
45
43
|
children: [
|
|
46
|
-
f ? /* @__PURE__ */
|
|
44
|
+
f ? /* @__PURE__ */ l(i, { alignItems: "center", display: "flex", children: [
|
|
47
45
|
/* @__PURE__ */ e(
|
|
48
46
|
i,
|
|
49
47
|
{
|
|
@@ -53,7 +51,7 @@ const R = {
|
|
|
53
51
|
borderRadius: "4px 0 0 4px",
|
|
54
52
|
display: "flex",
|
|
55
53
|
px: 0.25,
|
|
56
|
-
children: /* @__PURE__ */ e(
|
|
54
|
+
children: /* @__PURE__ */ e(t, { color: r.palette.primary[500], size: "md", children: "Vulnerable" })
|
|
57
55
|
}
|
|
58
56
|
),
|
|
59
57
|
/* @__PURE__ */ e(
|
|
@@ -64,7 +62,7 @@ const R = {
|
|
|
64
62
|
borderRadius: "0 4px 4px 0",
|
|
65
63
|
display: "flex",
|
|
66
64
|
px: 0.25,
|
|
67
|
-
children: /* @__PURE__ */ e(
|
|
65
|
+
children: /* @__PURE__ */ e(t, { color: r.palette.gray[800], size: "md", children: `${o} affected version${o === 1 ? "" : "s"}` })
|
|
68
66
|
}
|
|
69
67
|
)
|
|
70
68
|
] }) : /* @__PURE__ */ e(
|
|
@@ -75,14 +73,14 @@ const R = {
|
|
|
75
73
|
borderRadius: "4px",
|
|
76
74
|
display: "flex",
|
|
77
75
|
px: 0.25,
|
|
78
|
-
children: /* @__PURE__ */ e(
|
|
76
|
+
children: /* @__PURE__ */ e(t, { color: r.palette.success[500], size: "md", children: "Safe" })
|
|
79
77
|
}
|
|
80
78
|
),
|
|
81
|
-
|
|
79
|
+
a && /* @__PURE__ */ l(y, { children: [
|
|
82
80
|
/* @__PURE__ */ e(z, {}),
|
|
83
|
-
/* @__PURE__ */
|
|
81
|
+
/* @__PURE__ */ l(i, { alignItems: "center", display: "flex", gap: 0.5, children: [
|
|
84
82
|
/* @__PURE__ */ e(
|
|
85
|
-
|
|
83
|
+
t,
|
|
86
84
|
{
|
|
87
85
|
color: r.palette.gray[400],
|
|
88
86
|
fontWeight: "bold",
|
|
@@ -90,10 +88,10 @@ const R = {
|
|
|
90
88
|
children: "Max severity:"
|
|
91
89
|
}
|
|
92
90
|
),
|
|
93
|
-
n === void 0 ? /* @__PURE__ */ e(
|
|
91
|
+
n === void 0 ? /* @__PURE__ */ e(t, { color: r.palette.gray[400], size: "sm", children: "None" }) : /* @__PURE__ */ e(
|
|
94
92
|
u,
|
|
95
93
|
{
|
|
96
|
-
textR: x(
|
|
94
|
+
textR: x(a),
|
|
97
95
|
variant: n
|
|
98
96
|
}
|
|
99
97
|
)
|
|
@@ -105,5 +103,5 @@ const R = {
|
|
|
105
103
|
] });
|
|
106
104
|
};
|
|
107
105
|
export {
|
|
108
|
-
|
|
106
|
+
W as PackageCard
|
|
109
107
|
};
|
|
@@ -9,8 +9,6 @@ import { Heading as w } from "../typography/heading/index.js";
|
|
|
9
9
|
import "../typography/span/index.js";
|
|
10
10
|
import { Text as t } from "../typography/text/index.js";
|
|
11
11
|
import { CardContainer as E, Divisor as d } from "../weaknesses-card/styles.js";
|
|
12
|
-
import "../../_virtual/dayjs.min.js";
|
|
13
|
-
import "../../_virtual/lodash.js";
|
|
14
12
|
import { safeUrl as s } from "../../utils/url.js";
|
|
15
13
|
const N = {
|
|
16
14
|
md: {
|
|
@@ -23,7 +21,7 @@ const N = {
|
|
|
23
21
|
titleSize: "sm",
|
|
24
22
|
detailsSize: "lg"
|
|
25
23
|
}
|
|
26
|
-
},
|
|
24
|
+
}, M = ({
|
|
27
25
|
technology: g,
|
|
28
26
|
technique: f,
|
|
29
27
|
cwes: y,
|
|
@@ -34,11 +32,11 @@ const N = {
|
|
|
34
32
|
target: u,
|
|
35
33
|
lastUpdated: p,
|
|
36
34
|
score: v,
|
|
37
|
-
size:
|
|
35
|
+
size: l = "lg",
|
|
38
36
|
severity: a,
|
|
39
37
|
title: C
|
|
40
38
|
}) => {
|
|
41
|
-
const
|
|
39
|
+
const r = j(), { methodIdSize: I, titleSize: D, detailsSize: o } = N[l], h = b ?? "a";
|
|
42
40
|
return /* @__PURE__ */ i(E, { $index: S, children: [
|
|
43
41
|
/* @__PURE__ */ i(
|
|
44
42
|
c,
|
|
@@ -52,7 +50,7 @@ const N = {
|
|
|
52
50
|
/* @__PURE__ */ e(
|
|
53
51
|
t,
|
|
54
52
|
{
|
|
55
|
-
color:
|
|
53
|
+
color: r.palette.gray[800],
|
|
56
54
|
display: "inline",
|
|
57
55
|
size: I,
|
|
58
56
|
children: z
|
|
@@ -67,9 +65,9 @@ const N = {
|
|
|
67
65
|
/* @__PURE__ */ i(
|
|
68
66
|
c,
|
|
69
67
|
{
|
|
70
|
-
alignItems:
|
|
68
|
+
alignItems: l === "md" ? "flex-start" : "center",
|
|
71
69
|
display: "flex",
|
|
72
|
-
flexDirection:
|
|
70
|
+
flexDirection: l === "md" ? "column" : "row",
|
|
73
71
|
gap: 0.75,
|
|
74
72
|
width: "fit-content",
|
|
75
73
|
children: [
|
|
@@ -82,11 +80,11 @@ const N = {
|
|
|
82
80
|
}
|
|
83
81
|
),
|
|
84
82
|
/* @__PURE__ */ i(n, { children: [
|
|
85
|
-
|
|
83
|
+
l === "lg" ? /* @__PURE__ */ e(d, {}) : void 0,
|
|
86
84
|
/* @__PURE__ */ i(
|
|
87
85
|
t,
|
|
88
86
|
{
|
|
89
|
-
color:
|
|
87
|
+
color: r.palette.gray[400],
|
|
90
88
|
display: "inline",
|
|
91
89
|
size: o,
|
|
92
90
|
children: [
|
|
@@ -97,11 +95,11 @@ const N = {
|
|
|
97
95
|
)
|
|
98
96
|
] }),
|
|
99
97
|
/* @__PURE__ */ i(n, { children: [
|
|
100
|
-
|
|
98
|
+
l === "lg" ? /* @__PURE__ */ e(d, {}) : void 0,
|
|
101
99
|
/* @__PURE__ */ i(
|
|
102
100
|
t,
|
|
103
101
|
{
|
|
104
|
-
color:
|
|
102
|
+
color: r.palette.gray[400],
|
|
105
103
|
display: "inline",
|
|
106
104
|
size: o,
|
|
107
105
|
children: [
|
|
@@ -112,11 +110,11 @@ const N = {
|
|
|
112
110
|
)
|
|
113
111
|
] }),
|
|
114
112
|
/* @__PURE__ */ i(n, { children: [
|
|
115
|
-
|
|
113
|
+
l === "lg" ? /* @__PURE__ */ e(d, {}) : void 0,
|
|
116
114
|
/* @__PURE__ */ e(
|
|
117
115
|
t,
|
|
118
116
|
{
|
|
119
|
-
color:
|
|
117
|
+
color: r.palette.gray[400],
|
|
120
118
|
display: "inline",
|
|
121
119
|
fontWeight: "bold",
|
|
122
120
|
size: o,
|
|
@@ -127,7 +125,7 @@ const N = {
|
|
|
127
125
|
T > 0 ? /* @__PURE__ */ e(
|
|
128
126
|
t,
|
|
129
127
|
{
|
|
130
|
-
color:
|
|
128
|
+
color: r.palette.gray[400],
|
|
131
129
|
display: "inline",
|
|
132
130
|
size: o,
|
|
133
131
|
children: " , "
|
|
@@ -136,7 +134,7 @@ const N = {
|
|
|
136
134
|
/* @__PURE__ */ e(h, { href: s(m.href), children: /* @__PURE__ */ e(
|
|
137
135
|
t,
|
|
138
136
|
{
|
|
139
|
-
color:
|
|
137
|
+
color: r.palette.gray[400],
|
|
140
138
|
display: "inline",
|
|
141
139
|
size: o,
|
|
142
140
|
textDecoration: "underline",
|
|
@@ -146,11 +144,11 @@ const N = {
|
|
|
146
144
|
] }, m.key))
|
|
147
145
|
] }),
|
|
148
146
|
p ? /* @__PURE__ */ i(n, { children: [
|
|
149
|
-
|
|
147
|
+
l === "lg" ? /* @__PURE__ */ e(d, {}) : void 0,
|
|
150
148
|
/* @__PURE__ */ i(
|
|
151
149
|
t,
|
|
152
150
|
{
|
|
153
|
-
color:
|
|
151
|
+
color: r.palette.gray[400],
|
|
154
152
|
display: "inline",
|
|
155
153
|
size: o,
|
|
156
154
|
children: [
|
|
@@ -166,5 +164,5 @@ const N = {
|
|
|
166
164
|
] });
|
|
167
165
|
};
|
|
168
166
|
export {
|
|
169
|
-
|
|
167
|
+
M as RulesCard
|
|
170
168
|
};
|
|
@@ -1,21 +1,19 @@
|
|
|
1
1
|
import { jsxs as t, jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import { StyledContainer as
|
|
2
|
+
import { StyledContainer as d, StyledIndicatorPill as m } from "./styles.js";
|
|
3
3
|
import { variantColors as h } from "./utils.js";
|
|
4
|
-
import { theme as
|
|
4
|
+
import { theme as a } from "../colors/index.js";
|
|
5
5
|
import { Link as y } from "../link/index.js";
|
|
6
6
|
import "../typography/heading/index.js";
|
|
7
7
|
import "../typography/span/index.js";
|
|
8
|
-
import { Text as
|
|
9
|
-
import "../../_virtual/dayjs.min.js";
|
|
10
|
-
import "../../_virtual/lodash.js";
|
|
8
|
+
import { Text as p } from "../typography/text/index.js";
|
|
11
9
|
import { safeUrl as v } from "../../utils/url.js";
|
|
12
|
-
const
|
|
10
|
+
const u = ({
|
|
13
11
|
number: e,
|
|
14
12
|
text: n,
|
|
15
13
|
link: r,
|
|
16
14
|
variant: f
|
|
17
15
|
}) => {
|
|
18
|
-
const l = h[f], i = r && v(r) === r ? r : void 0, c = i ? "inherit" :
|
|
16
|
+
const l = h[f], i = r && v(r) === r ? r : void 0, c = i ? "inherit" : a.palette.gray[500], s = /* @__PURE__ */ t(
|
|
19
17
|
"span",
|
|
20
18
|
{
|
|
21
19
|
style: {
|
|
@@ -25,7 +23,7 @@ const P = ({
|
|
|
25
23
|
},
|
|
26
24
|
children: [
|
|
27
25
|
e !== void 0 ? /* @__PURE__ */ o(
|
|
28
|
-
|
|
26
|
+
p,
|
|
29
27
|
{
|
|
30
28
|
color: c,
|
|
31
29
|
display: "inline",
|
|
@@ -34,18 +32,18 @@ const P = ({
|
|
|
34
32
|
children: e
|
|
35
33
|
}
|
|
36
34
|
) : void 0,
|
|
37
|
-
n ? /* @__PURE__ */ o(
|
|
35
|
+
n ? /* @__PURE__ */ o(p, { color: c, display: "inline", size: "sm", children: n }) : void 0
|
|
38
36
|
]
|
|
39
37
|
}
|
|
40
38
|
);
|
|
41
|
-
return i ? /* @__PURE__ */ t(
|
|
42
|
-
/* @__PURE__ */ o(
|
|
43
|
-
/* @__PURE__ */ o(y, { color:
|
|
44
|
-
] }) : /* @__PURE__ */ t(
|
|
45
|
-
/* @__PURE__ */ o(
|
|
46
|
-
|
|
39
|
+
return i ? /* @__PURE__ */ t(d, { children: [
|
|
40
|
+
/* @__PURE__ */ o(m, { $color: l }),
|
|
41
|
+
/* @__PURE__ */ o(y, { color: a.palette.gray[500], href: i, children: s })
|
|
42
|
+
] }) : /* @__PURE__ */ t(d, { children: [
|
|
43
|
+
/* @__PURE__ */ o(m, { $color: l }),
|
|
44
|
+
s
|
|
47
45
|
] });
|
|
48
46
|
};
|
|
49
47
|
export {
|
|
50
|
-
|
|
48
|
+
u as SeverityIndicator
|
|
51
49
|
};
|
|
@@ -9,7 +9,6 @@ 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";
|
|
13
12
|
import "../checkbox/index.js";
|
|
14
13
|
import "../icon/index.js";
|
|
15
14
|
import "../../_virtual/lodash.js";
|
|
@@ -23,7 +22,7 @@ import "react-dom";
|
|
|
23
22
|
import "../layout/categories/buttons/index.js";
|
|
24
23
|
import "../inputs/utils/action-button/index.js";
|
|
25
24
|
import "../../node_modules/react-international-phone/dist/index.js";
|
|
26
|
-
const
|
|
25
|
+
const ee = (o) => {
|
|
27
26
|
const p = S(), m = $(null), { label: s, minValue: i = 0, maxValue: n = 100, name: r, setValue: d, watch: c } = o, a = x(), t = V({
|
|
28
27
|
...o,
|
|
29
28
|
numberFormatter: a,
|
|
@@ -76,6 +75,6 @@ const re = (o) => {
|
|
|
76
75
|
) });
|
|
77
76
|
};
|
|
78
77
|
export {
|
|
79
|
-
|
|
78
|
+
ee as Slider,
|
|
80
79
|
x as useNumberFormatter
|
|
81
80
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as p, jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import g from "../../../_virtual/isNil.js";
|
|
3
3
|
import { useMemo as l, useCallback as c } from "react";
|
|
4
4
|
import { Button as f } from "../../button/index.js";
|
|
@@ -6,7 +6,6 @@ import "../../../_virtual/lodash.js";
|
|
|
6
6
|
import "react-dom";
|
|
7
7
|
import "styled-components";
|
|
8
8
|
import { useColumnsModal as b } from "../../../hooks/use-columns-modal.js";
|
|
9
|
-
import "nuqs";
|
|
10
9
|
import "../../container/index.js";
|
|
11
10
|
import "../../icon-button/index.js";
|
|
12
11
|
import "../../typography/heading/index.js";
|
|
@@ -17,7 +16,7 @@ import "react-router";
|
|
|
17
16
|
import "../../notification-sign/index.js";
|
|
18
17
|
import "../../icon/index.js";
|
|
19
18
|
import { ColumnsModal as C } from "../../modal/columns-modal/index.js";
|
|
20
|
-
const
|
|
19
|
+
const G = (s) => {
|
|
21
20
|
const { table: t } = s, { meta: m } = t.options, [, n] = t.getHeaderGroups(), a = t.getVisibleLeafColumns().filter((o) => o.id !== "selection").length, i = l(
|
|
22
21
|
() => t.getAllLeafColumns().filter((o) => o.id !== "selection"),
|
|
23
22
|
[t]
|
|
@@ -34,16 +33,16 @@ const N = (s) => {
|
|
|
34
33
|
name: "table-column-management",
|
|
35
34
|
setColumnOrder: t.setColumnOrder,
|
|
36
35
|
setColumnVisibility: t.setColumnVisibility
|
|
37
|
-
}),
|
|
36
|
+
}), u = c(() => {
|
|
38
37
|
e.toggle();
|
|
39
38
|
}, [e]);
|
|
40
|
-
return /* @__PURE__ */
|
|
39
|
+
return /* @__PURE__ */ p("div", { id: "columns-filter", children: [
|
|
41
40
|
/* @__PURE__ */ r(
|
|
42
41
|
f,
|
|
43
42
|
{
|
|
44
43
|
icon: "columns",
|
|
45
44
|
id: "columns-toggle-btn",
|
|
46
|
-
onClick:
|
|
45
|
+
onClick: u,
|
|
47
46
|
tag: a.toString(),
|
|
48
47
|
variant: "ghost"
|
|
49
48
|
}
|
|
@@ -59,5 +58,5 @@ const N = (s) => {
|
|
|
59
58
|
] });
|
|
60
59
|
};
|
|
61
60
|
export {
|
|
62
|
-
|
|
61
|
+
G as ColumnToggle
|
|
63
62
|
};
|
|
@@ -2,17 +2,15 @@ import { jsx as a } from "react/jsx-runtime";
|
|
|
2
2
|
import { useRef as l, useState as x, useCallback as m } from "react";
|
|
3
3
|
import { TableContext as z } from "../context/index.js";
|
|
4
4
|
import { TableContainer as y } from "../styles.js";
|
|
5
|
-
import "../../../_virtual/lodash.js";
|
|
6
|
-
import "nuqs";
|
|
7
5
|
import { useMountEffect as u } from "../../../hooks/use-mount-effect.js";
|
|
8
6
|
const C = 160, f = (t) => Number.parseFloat(t) || 0, E = (t) => {
|
|
9
7
|
const { paddingLeft: e, paddingRight: n } = getComputedStyle(t);
|
|
10
8
|
return t.clientWidth - f(e) - f(n);
|
|
11
|
-
},
|
|
9
|
+
}, M = ({
|
|
12
10
|
children: t,
|
|
13
11
|
table: e
|
|
14
12
|
}) => {
|
|
15
|
-
const n = l(null), p = l(null), { id: h } = e.options.meta ?? {}, { enableMultiRowSelection: S } = e?.options ?? {},
|
|
13
|
+
const n = l(null), p = l(null), { id: h } = e.options.meta ?? {}, { enableMultiRowSelection: S } = e?.options ?? {}, s = Object.keys(e.getState().rowSelection).length, w = s === 1 ? "item" : "items", g = s === 0 || !S, [v, R] = x(0);
|
|
16
14
|
u(() => {
|
|
17
15
|
const o = () => {
|
|
18
16
|
const r = n.current ? E(n.current) : 0;
|
|
@@ -35,13 +33,13 @@ const C = 160, f = (t) => Number.parseFloat(t) || 0, E = (t) => {
|
|
|
35
33
|
const T = Math.max(
|
|
36
34
|
v,
|
|
37
35
|
e.getTotalSize() + C
|
|
38
|
-
),
|
|
36
|
+
), i = m(() => {
|
|
39
37
|
e.resetRowSelection();
|
|
40
38
|
}, [e]), b = m(
|
|
41
39
|
(o) => {
|
|
42
|
-
o.key === "Enter" &&
|
|
40
|
+
o.key === "Enter" && i();
|
|
43
41
|
},
|
|
44
|
-
[
|
|
42
|
+
[i]
|
|
45
43
|
);
|
|
46
44
|
return u(() => {
|
|
47
45
|
e.setPageIndex(0);
|
|
@@ -51,10 +49,10 @@ const C = 160, f = (t) => Number.parseFloat(t) || 0, E = (t) => {
|
|
|
51
49
|
value: {
|
|
52
50
|
containerRef: n,
|
|
53
51
|
elementName: w,
|
|
54
|
-
handleUnselectAll:
|
|
52
|
+
handleUnselectAll: i,
|
|
55
53
|
hidden: g,
|
|
56
54
|
onKeyDown: b,
|
|
57
|
-
selected:
|
|
55
|
+
selected: s,
|
|
58
56
|
tableSize: T,
|
|
59
57
|
tableRef: p,
|
|
60
58
|
table: e
|
|
@@ -64,5 +62,5 @@ const C = 160, f = (t) => Number.parseFloat(t) || 0, E = (t) => {
|
|
|
64
62
|
);
|
|
65
63
|
};
|
|
66
64
|
export {
|
|
67
|
-
|
|
65
|
+
M as Table
|
|
68
66
|
};
|
|
@@ -8,8 +8,6 @@ import { SeverityBadge as w } from "../severity-badge/index.js";
|
|
|
8
8
|
import { Heading as c } from "../typography/heading/index.js";
|
|
9
9
|
import "../typography/span/index.js";
|
|
10
10
|
import { Text as l } from "../typography/text/index.js";
|
|
11
|
-
import "../../_virtual/dayjs.min.js";
|
|
12
|
-
import "../../_virtual/lodash.js";
|
|
13
11
|
import { safeUrl as p } from "../../utils/url.js";
|
|
14
12
|
const G = {
|
|
15
13
|
md: {
|
|
@@ -24,7 +22,7 @@ const G = {
|
|
|
24
22
|
descriptionSize: "lg",
|
|
25
23
|
detailsSize: "lg"
|
|
26
24
|
}
|
|
27
|
-
},
|
|
25
|
+
}, A = ({
|
|
28
26
|
title: g,
|
|
29
27
|
href: h,
|
|
30
28
|
description: f,
|
|
@@ -167,5 +165,5 @@ const G = {
|
|
|
167
165
|
] });
|
|
168
166
|
};
|
|
169
167
|
export {
|
|
170
|
-
|
|
168
|
+
A as WeaknessesCard
|
|
171
169
|
};
|
package/dist/hooks/use-search.js
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { useState as a } from "react";
|
|
2
2
|
import { useDebouncedCallback as s } from "./use-debounced-callback.js";
|
|
3
|
-
import "nuqs";
|
|
4
3
|
const S = (e) => {
|
|
5
|
-
const [t,
|
|
6
|
-
|
|
4
|
+
const [t, c] = a(), o = s((r) => {
|
|
5
|
+
c(r);
|
|
7
6
|
}, e?.debounceWait ?? 300);
|
|
8
|
-
return [t,
|
|
7
|
+
return [t, o];
|
|
9
8
|
};
|
|
10
9
|
export {
|
|
11
10
|
S as useSearch
|
package/package.json
CHANGED
|
@@ -42,8 +42,8 @@
|
|
|
42
42
|
"@types/react-dom": "18.3.0",
|
|
43
43
|
"@types/react-syntax-highlighter": "15.5.13",
|
|
44
44
|
"@vitejs/plugin-react-swc": "4.3.1",
|
|
45
|
-
"@vitest/browser-playwright": "4.1.
|
|
46
|
-
"@vitest/coverage-v8": "4.1.
|
|
45
|
+
"@vitest/browser-playwright": "4.1.12",
|
|
46
|
+
"@vitest/coverage-v8": "4.1.12",
|
|
47
47
|
"eslint": "9.31.0",
|
|
48
48
|
"eslint-config-prettier": "10.0.1",
|
|
49
49
|
"eslint-import-resolver-typescript": "3.8.0",
|
|
@@ -70,10 +70,10 @@
|
|
|
70
70
|
"tailwindcss": "4.3.0",
|
|
71
71
|
"typescript": "6.0.3",
|
|
72
72
|
"typescript-eslint": "8.59.4",
|
|
73
|
-
"vite": "6.4.
|
|
73
|
+
"vite": "6.4.5",
|
|
74
74
|
"vite-plugin-dts": "5.0.3",
|
|
75
75
|
"vite-plugin-lib-inject-css": "2.2.2",
|
|
76
|
-
"vitest": "4.1.
|
|
76
|
+
"vitest": "4.1.12"
|
|
77
77
|
},
|
|
78
78
|
"eslintConfig": {
|
|
79
79
|
"extends": [
|
|
@@ -135,5 +135,5 @@
|
|
|
135
135
|
"./dist/index.js"
|
|
136
136
|
],
|
|
137
137
|
"typings": "./dist/index.d.ts",
|
|
138
|
-
"version": "10.0.
|
|
138
|
+
"version": "10.0.1"
|
|
139
139
|
}
|