@fluidattacks/design 9.9.1 → 10.0.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/advisories-card/index.js +4 -2
- package/dist/components/card/card-with-input/index.js +3 -2
- package/dist/components/carousel/index.js +12 -10
- package/dist/components/cloud-image/index.js +10 -8
- package/dist/components/conditions-dialog/index.js +23 -21
- package/dist/components/confirm-dialog/index.js +9 -7
- package/dist/components/filters/filters-menu/index.js +24 -23
- package/dist/components/filters/options-menu/options/index.js +38 -37
- package/dist/components/item-card-db/index.js +10 -8
- package/dist/components/modal/dialog/index.js +8 -6
- package/dist/components/modal/footer/index.js +15 -14
- package/dist/components/modal/header/index.d.ts +1 -1
- package/dist/components/modal/header/index.js +58 -40
- package/dist/components/modal/index.d.ts +1 -1
- package/dist/components/modal/index.js +2 -2
- package/dist/components/modal/index.stories.d.ts +17 -5
- package/dist/components/modal/styles.js +22 -13
- package/dist/components/modal/types.d.ts +23 -3
- package/dist/components/package-card/index.js +25 -23
- package/dist/components/rules-card/index.js +19 -17
- package/dist/components/severity-indicator/index.js +16 -14
- package/dist/components/slider/index.js +3 -2
- package/dist/components/table/pagination/pagination-dropdown/index.js +4 -4
- package/dist/components/table/table-column-toggle/index.js +7 -6
- package/dist/components/table/wrapper/index.js +10 -8
- package/dist/components/weaknesses-card/index.js +4 -2
- package/dist/hooks/use-search.js +4 -3
- package/package.json +1 -1
|
@@ -9,6 +9,8 @@ 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";
|
|
12
14
|
import { safeUrl as s } from "../../utils/url.js";
|
|
13
15
|
const N = {
|
|
14
16
|
md: {
|
|
@@ -21,7 +23,7 @@ const N = {
|
|
|
21
23
|
titleSize: "sm",
|
|
22
24
|
detailsSize: "lg"
|
|
23
25
|
}
|
|
24
|
-
},
|
|
26
|
+
}, Q = ({
|
|
25
27
|
technology: g,
|
|
26
28
|
technique: f,
|
|
27
29
|
cwes: y,
|
|
@@ -32,11 +34,11 @@ const N = {
|
|
|
32
34
|
target: u,
|
|
33
35
|
lastUpdated: p,
|
|
34
36
|
score: v,
|
|
35
|
-
size:
|
|
37
|
+
size: r = "lg",
|
|
36
38
|
severity: a,
|
|
37
39
|
title: C
|
|
38
40
|
}) => {
|
|
39
|
-
const
|
|
41
|
+
const l = j(), { methodIdSize: I, titleSize: D, detailsSize: o } = N[r], h = b ?? "a";
|
|
40
42
|
return /* @__PURE__ */ i(E, { $index: S, children: [
|
|
41
43
|
/* @__PURE__ */ i(
|
|
42
44
|
c,
|
|
@@ -50,7 +52,7 @@ const N = {
|
|
|
50
52
|
/* @__PURE__ */ e(
|
|
51
53
|
t,
|
|
52
54
|
{
|
|
53
|
-
color:
|
|
55
|
+
color: l.palette.gray[800],
|
|
54
56
|
display: "inline",
|
|
55
57
|
size: I,
|
|
56
58
|
children: z
|
|
@@ -65,9 +67,9 @@ const N = {
|
|
|
65
67
|
/* @__PURE__ */ i(
|
|
66
68
|
c,
|
|
67
69
|
{
|
|
68
|
-
alignItems:
|
|
70
|
+
alignItems: r === "md" ? "flex-start" : "center",
|
|
69
71
|
display: "flex",
|
|
70
|
-
flexDirection:
|
|
72
|
+
flexDirection: r === "md" ? "column" : "row",
|
|
71
73
|
gap: 0.75,
|
|
72
74
|
width: "fit-content",
|
|
73
75
|
children: [
|
|
@@ -80,11 +82,11 @@ const N = {
|
|
|
80
82
|
}
|
|
81
83
|
),
|
|
82
84
|
/* @__PURE__ */ i(n, { children: [
|
|
83
|
-
|
|
85
|
+
r === "lg" ? /* @__PURE__ */ e(d, {}) : void 0,
|
|
84
86
|
/* @__PURE__ */ i(
|
|
85
87
|
t,
|
|
86
88
|
{
|
|
87
|
-
color:
|
|
89
|
+
color: l.palette.gray[400],
|
|
88
90
|
display: "inline",
|
|
89
91
|
size: o,
|
|
90
92
|
children: [
|
|
@@ -95,11 +97,11 @@ const N = {
|
|
|
95
97
|
)
|
|
96
98
|
] }),
|
|
97
99
|
/* @__PURE__ */ i(n, { children: [
|
|
98
|
-
|
|
100
|
+
r === "lg" ? /* @__PURE__ */ e(d, {}) : void 0,
|
|
99
101
|
/* @__PURE__ */ i(
|
|
100
102
|
t,
|
|
101
103
|
{
|
|
102
|
-
color:
|
|
104
|
+
color: l.palette.gray[400],
|
|
103
105
|
display: "inline",
|
|
104
106
|
size: o,
|
|
105
107
|
children: [
|
|
@@ -110,11 +112,11 @@ const N = {
|
|
|
110
112
|
)
|
|
111
113
|
] }),
|
|
112
114
|
/* @__PURE__ */ i(n, { children: [
|
|
113
|
-
|
|
115
|
+
r === "lg" ? /* @__PURE__ */ e(d, {}) : void 0,
|
|
114
116
|
/* @__PURE__ */ e(
|
|
115
117
|
t,
|
|
116
118
|
{
|
|
117
|
-
color:
|
|
119
|
+
color: l.palette.gray[400],
|
|
118
120
|
display: "inline",
|
|
119
121
|
fontWeight: "bold",
|
|
120
122
|
size: o,
|
|
@@ -125,7 +127,7 @@ const N = {
|
|
|
125
127
|
T > 0 ? /* @__PURE__ */ e(
|
|
126
128
|
t,
|
|
127
129
|
{
|
|
128
|
-
color:
|
|
130
|
+
color: l.palette.gray[400],
|
|
129
131
|
display: "inline",
|
|
130
132
|
size: o,
|
|
131
133
|
children: " , "
|
|
@@ -134,7 +136,7 @@ const N = {
|
|
|
134
136
|
/* @__PURE__ */ e(h, { href: s(m.href), children: /* @__PURE__ */ e(
|
|
135
137
|
t,
|
|
136
138
|
{
|
|
137
|
-
color:
|
|
139
|
+
color: l.palette.gray[400],
|
|
138
140
|
display: "inline",
|
|
139
141
|
size: o,
|
|
140
142
|
textDecoration: "underline",
|
|
@@ -144,11 +146,11 @@ const N = {
|
|
|
144
146
|
] }, m.key))
|
|
145
147
|
] }),
|
|
146
148
|
p ? /* @__PURE__ */ i(n, { children: [
|
|
147
|
-
|
|
149
|
+
r === "lg" ? /* @__PURE__ */ e(d, {}) : void 0,
|
|
148
150
|
/* @__PURE__ */ i(
|
|
149
151
|
t,
|
|
150
152
|
{
|
|
151
|
-
color:
|
|
153
|
+
color: l.palette.gray[400],
|
|
152
154
|
display: "inline",
|
|
153
155
|
size: o,
|
|
154
156
|
children: [
|
|
@@ -164,5 +166,5 @@ const N = {
|
|
|
164
166
|
] });
|
|
165
167
|
};
|
|
166
168
|
export {
|
|
167
|
-
|
|
169
|
+
Q as RulesCard
|
|
168
170
|
};
|
|
@@ -1,19 +1,21 @@
|
|
|
1
1
|
import { jsxs as t, jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import { StyledContainer as
|
|
2
|
+
import { StyledContainer as s, StyledIndicatorPill as d } from "./styles.js";
|
|
3
3
|
import { variantColors as h } from "./utils.js";
|
|
4
|
-
import { theme as
|
|
4
|
+
import { theme as p } 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
|
|
8
|
+
import { Text as a } from "../typography/text/index.js";
|
|
9
|
+
import "../../_virtual/dayjs.min.js";
|
|
10
|
+
import "../../_virtual/lodash.js";
|
|
9
11
|
import { safeUrl as v } from "../../utils/url.js";
|
|
10
|
-
const
|
|
12
|
+
const P = ({
|
|
11
13
|
number: e,
|
|
12
14
|
text: n,
|
|
13
15
|
link: r,
|
|
14
16
|
variant: f
|
|
15
17
|
}) => {
|
|
16
|
-
const l = h[f], i = r && v(r) === r ? r : void 0, c = i ? "inherit" :
|
|
18
|
+
const l = h[f], i = r && v(r) === r ? r : void 0, c = i ? "inherit" : p.palette.gray[500], m = /* @__PURE__ */ t(
|
|
17
19
|
"span",
|
|
18
20
|
{
|
|
19
21
|
style: {
|
|
@@ -23,7 +25,7 @@ const u = ({
|
|
|
23
25
|
},
|
|
24
26
|
children: [
|
|
25
27
|
e !== void 0 ? /* @__PURE__ */ o(
|
|
26
|
-
|
|
28
|
+
a,
|
|
27
29
|
{
|
|
28
30
|
color: c,
|
|
29
31
|
display: "inline",
|
|
@@ -32,18 +34,18 @@ const u = ({
|
|
|
32
34
|
children: e
|
|
33
35
|
}
|
|
34
36
|
) : void 0,
|
|
35
|
-
n ? /* @__PURE__ */ o(
|
|
37
|
+
n ? /* @__PURE__ */ o(a, { color: c, display: "inline", size: "sm", children: n }) : void 0
|
|
36
38
|
]
|
|
37
39
|
}
|
|
38
40
|
);
|
|
39
|
-
return i ? /* @__PURE__ */ t(
|
|
40
|
-
/* @__PURE__ */ o(
|
|
41
|
-
/* @__PURE__ */ o(y, { color:
|
|
42
|
-
] }) : /* @__PURE__ */ t(
|
|
43
|
-
/* @__PURE__ */ o(
|
|
44
|
-
|
|
41
|
+
return i ? /* @__PURE__ */ t(s, { children: [
|
|
42
|
+
/* @__PURE__ */ o(d, { $color: l }),
|
|
43
|
+
/* @__PURE__ */ o(y, { color: p.palette.gray[500], href: i, children: m })
|
|
44
|
+
] }) : /* @__PURE__ */ t(s, { children: [
|
|
45
|
+
/* @__PURE__ */ o(d, { $color: l }),
|
|
46
|
+
m
|
|
45
47
|
] });
|
|
46
48
|
};
|
|
47
49
|
export {
|
|
48
|
-
|
|
50
|
+
P as SeverityIndicator
|
|
49
51
|
};
|
|
@@ -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
|
};
|
|
@@ -14,12 +14,12 @@ import { autoUpdate as j } from "../../../../node_modules/@floating-ui/dom/dist/
|
|
|
14
14
|
const G = 10, H = 20, U = 50, C = 100, ne = () => {
|
|
15
15
|
const t = T(), { table: o } = F(_), S = o?.options.meta?.hasNextPage ?? !1, f = o?.options.meta?.dataSize ?? 0, b = Number.isFinite(f) ? f : 0, g = o?.getRowCount() ?? 0, y = Number.isFinite(g) ? Math.max(0, g) : 0, l = S ? Math.max(b, C) : y, [n, i] = x(!1), [a, u] = x(
|
|
16
16
|
o?.getState().pagination.pageSize ?? 10
|
|
17
|
-
), { refs: p, floatingStyles:
|
|
17
|
+
), { refs: p, floatingStyles: z } = L({
|
|
18
18
|
middleware: [k({ mainAxis: 4 })],
|
|
19
19
|
open: n,
|
|
20
20
|
placement: "top-end",
|
|
21
21
|
whileElementsMounted: j
|
|
22
|
-
}), { setFloating:
|
|
22
|
+
}), { setFloating: E, setReference: I } = p, R = D(
|
|
23
23
|
() => A(
|
|
24
24
|
[G, H, U, C],
|
|
25
25
|
// eslint-disable-next-line functional/prefer-immutable-types
|
|
@@ -87,9 +87,9 @@ const G = 10, H = 20, U = 50, C = 100, ne = () => {
|
|
|
87
87
|
flexDirection: "column",
|
|
88
88
|
px: 0.25,
|
|
89
89
|
py: 0.25,
|
|
90
|
-
ref:
|
|
90
|
+
ref: E,
|
|
91
91
|
shadow: "md",
|
|
92
|
-
style:
|
|
92
|
+
style: { ...z, zIndex: 10 },
|
|
93
93
|
children: R.map((e) => {
|
|
94
94
|
const r = M(e);
|
|
95
95
|
return /* @__PURE__ */ s(
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as u, 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,6 +6,7 @@ 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";
|
|
9
10
|
import "../../container/index.js";
|
|
10
11
|
import "../../icon-button/index.js";
|
|
11
12
|
import "../../typography/heading/index.js";
|
|
@@ -16,7 +17,7 @@ import "react-router";
|
|
|
16
17
|
import "../../notification-sign/index.js";
|
|
17
18
|
import "../../icon/index.js";
|
|
18
19
|
import { ColumnsModal as C } from "../../modal/columns-modal/index.js";
|
|
19
|
-
const
|
|
20
|
+
const N = (s) => {
|
|
20
21
|
const { table: t } = s, { meta: m } = t.options, [, n] = t.getHeaderGroups(), a = t.getVisibleLeafColumns().filter((o) => o.id !== "selection").length, i = l(
|
|
21
22
|
() => t.getAllLeafColumns().filter((o) => o.id !== "selection"),
|
|
22
23
|
[t]
|
|
@@ -33,16 +34,16 @@ const G = (s) => {
|
|
|
33
34
|
name: "table-column-management",
|
|
34
35
|
setColumnOrder: t.setColumnOrder,
|
|
35
36
|
setColumnVisibility: t.setColumnVisibility
|
|
36
|
-
}),
|
|
37
|
+
}), p = c(() => {
|
|
37
38
|
e.toggle();
|
|
38
39
|
}, [e]);
|
|
39
|
-
return /* @__PURE__ */
|
|
40
|
+
return /* @__PURE__ */ u("div", { id: "columns-filter", children: [
|
|
40
41
|
/* @__PURE__ */ r(
|
|
41
42
|
f,
|
|
42
43
|
{
|
|
43
44
|
icon: "columns",
|
|
44
45
|
id: "columns-toggle-btn",
|
|
45
|
-
onClick:
|
|
46
|
+
onClick: p,
|
|
46
47
|
tag: a.toString(),
|
|
47
48
|
variant: "ghost"
|
|
48
49
|
}
|
|
@@ -58,5 +59,5 @@ const G = (s) => {
|
|
|
58
59
|
] });
|
|
59
60
|
};
|
|
60
61
|
export {
|
|
61
|
-
|
|
62
|
+
N as ColumnToggle
|
|
62
63
|
};
|
|
@@ -2,15 +2,17 @@ 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";
|
|
5
7
|
import { useMountEffect as u } from "../../../hooks/use-mount-effect.js";
|
|
6
8
|
const C = 160, f = (t) => Number.parseFloat(t) || 0, E = (t) => {
|
|
7
9
|
const { paddingLeft: e, paddingRight: n } = getComputedStyle(t);
|
|
8
10
|
return t.clientWidth - f(e) - f(n);
|
|
9
|
-
},
|
|
11
|
+
}, j = ({
|
|
10
12
|
children: t,
|
|
11
13
|
table: e
|
|
12
14
|
}) => {
|
|
13
|
-
const n = l(null), p = l(null), { id: h } = e.options.meta ?? {}, { enableMultiRowSelection: S } = e?.options ?? {},
|
|
15
|
+
const n = l(null), p = l(null), { id: h } = e.options.meta ?? {}, { enableMultiRowSelection: S } = e?.options ?? {}, i = Object.keys(e.getState().rowSelection).length, w = i === 1 ? "item" : "items", g = i === 0 || !S, [v, R] = x(0);
|
|
14
16
|
u(() => {
|
|
15
17
|
const o = () => {
|
|
16
18
|
const r = n.current ? E(n.current) : 0;
|
|
@@ -33,13 +35,13 @@ const C = 160, f = (t) => Number.parseFloat(t) || 0, E = (t) => {
|
|
|
33
35
|
const T = Math.max(
|
|
34
36
|
v,
|
|
35
37
|
e.getTotalSize() + C
|
|
36
|
-
),
|
|
38
|
+
), s = m(() => {
|
|
37
39
|
e.resetRowSelection();
|
|
38
40
|
}, [e]), b = m(
|
|
39
41
|
(o) => {
|
|
40
|
-
o.key === "Enter" &&
|
|
42
|
+
o.key === "Enter" && s();
|
|
41
43
|
},
|
|
42
|
-
[
|
|
44
|
+
[s]
|
|
43
45
|
);
|
|
44
46
|
return u(() => {
|
|
45
47
|
e.setPageIndex(0);
|
|
@@ -49,10 +51,10 @@ const C = 160, f = (t) => Number.parseFloat(t) || 0, E = (t) => {
|
|
|
49
51
|
value: {
|
|
50
52
|
containerRef: n,
|
|
51
53
|
elementName: w,
|
|
52
|
-
handleUnselectAll:
|
|
54
|
+
handleUnselectAll: s,
|
|
53
55
|
hidden: g,
|
|
54
56
|
onKeyDown: b,
|
|
55
|
-
selected:
|
|
57
|
+
selected: i,
|
|
56
58
|
tableSize: T,
|
|
57
59
|
tableRef: p,
|
|
58
60
|
table: e
|
|
@@ -62,5 +64,5 @@ const C = 160, f = (t) => Number.parseFloat(t) || 0, E = (t) => {
|
|
|
62
64
|
);
|
|
63
65
|
};
|
|
64
66
|
export {
|
|
65
|
-
|
|
67
|
+
j as Table
|
|
66
68
|
};
|
|
@@ -8,6 +8,8 @@ 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";
|
|
11
13
|
import { safeUrl as p } from "../../utils/url.js";
|
|
12
14
|
const G = {
|
|
13
15
|
md: {
|
|
@@ -22,7 +24,7 @@ const G = {
|
|
|
22
24
|
descriptionSize: "lg",
|
|
23
25
|
detailsSize: "lg"
|
|
24
26
|
}
|
|
25
|
-
},
|
|
27
|
+
}, K = ({
|
|
26
28
|
title: g,
|
|
27
29
|
href: h,
|
|
28
30
|
description: f,
|
|
@@ -165,5 +167,5 @@ const G = {
|
|
|
165
167
|
] });
|
|
166
168
|
};
|
|
167
169
|
export {
|
|
168
|
-
|
|
170
|
+
K as WeaknessesCard
|
|
169
171
|
};
|
package/dist/hooks/use-search.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { useState as a } from "react";
|
|
2
2
|
import { useDebouncedCallback as s } from "./use-debounced-callback.js";
|
|
3
|
+
import "nuqs";
|
|
3
4
|
const S = (e) => {
|
|
4
|
-
const [t,
|
|
5
|
-
c
|
|
5
|
+
const [t, o] = a(), r = s((c) => {
|
|
6
|
+
o(c);
|
|
6
7
|
}, e?.debounceWait ?? 300);
|
|
7
|
-
return [t,
|
|
8
|
+
return [t, r];
|
|
8
9
|
};
|
|
9
10
|
export {
|
|
10
11
|
S as useSearch
|
package/package.json
CHANGED