@wallarm-org/design-system 4.9.0 → 4.10.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/README.md +1 -1
- package/dist/components/Badge/generateBadgeVariants.js +9 -28
- package/dist/components/CodeSnippet/internal/FoldToggle.js +1 -1
- package/dist/components/SimpleCharts/Chart/classes.js +1 -1
- package/dist/components/SimpleCharts/HorizontalBarStack/classes.js +1 -1
- package/dist/components/SimpleCharts/Metric/classes.d.ts +2 -2
- package/dist/components/SimpleCharts/Metric/classes.js +2 -2
- package/dist/components/Table/TableBody/TableBodyCell.js +4 -1
- package/dist/guidelines/patterns/complex-drawer.md +1084 -0
- package/dist/guidelines/patterns/confirmation-dialogs.md +3 -11
- package/dist/guidelines/patterns/detail-drawer.md +31 -13
- package/dist/guidelines/patterns/empty-states.md +6 -5
- package/dist/guidelines/patterns/entity-table.md +25 -29
- package/dist/guidelines/patterns/feedback-toasts.md +3 -11
- package/dist/guidelines/patterns/resource-list-page.md +14 -16
- package/dist/guidelines/rules.md +6 -5
- package/dist/guidelines/templates/ai-assistant.md +1133 -0
- package/dist/guidelines/templates/api-inventory.md +905 -0
- package/dist/guidelines/templates/attack-events.md +2722 -0
- package/dist/guidelines/templates/incident-detail.md +2085 -0
- package/dist/guidelines/templates/integrations-settings.md +836 -0
- package/dist/guidelines/templates/page-states.md +798 -0
- package/dist/guidelines/templates/rule-editor.md +886 -0
- package/dist/guidelines/templates/security-dashboard.md +681 -0
- package/dist/metadata/components.json +10 -10
- package/dist/metadata/guidelines.json +1204 -37
- package/dist/theme/tokens.test.ts +52 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -95,7 +95,7 @@ pnpm build
|
|
|
95
95
|
|
|
96
96
|
### Icons from Figma
|
|
97
97
|
|
|
98
|
-
Icons in `src/icons/` are generated from the
|
|
98
|
+
Icons in `src/icons/` are generated from the WADS-Iconography Figma page — don't edit them by hand.
|
|
99
99
|
|
|
100
100
|
To get a `FIGMA_ACCESS_TOKEN`:
|
|
101
101
|
|
|
@@ -12,61 +12,42 @@ const generateBadgeVariants = ()=>{
|
|
|
12
12
|
solid: 'bg-badge-slate-strong text-badge-on-solid',
|
|
13
13
|
solidMuted: 'bg-badge-slate-dark-alt text-badge-on-solid',
|
|
14
14
|
secondary: 'bg-badge-slate-light text-badge-slate-dark',
|
|
15
|
-
secondaryMuted: 'bg-badge-slate-light text-badge-slate-muted',
|
|
16
15
|
outline: 'border-badge-slate-dark text-badge-slate-dark',
|
|
17
16
|
outlineMuted: 'border-border-primary text-badge-slate-dark',
|
|
18
17
|
text: 'text-badge-label-primary [&_svg]:text-badge-slate-strong before:bg-badge-slate-strong',
|
|
19
|
-
|
|
20
|
-
textColor: 'text-badge-slate-strong',
|
|
21
|
-
textColorMuted: 'text-badge-slate-muted'
|
|
18
|
+
textColor: 'text-badge-slate-strong'
|
|
22
19
|
},
|
|
23
20
|
gray: {
|
|
24
21
|
solid: 'bg-badge-gray-strong text-badge-on-solid',
|
|
25
22
|
solidMuted: 'bg-badge-gray-dark-alt text-badge-on-solid',
|
|
26
23
|
secondary: 'bg-badge-gray-light text-badge-gray-dark',
|
|
27
|
-
secondaryMuted: 'bg-badge-gray-light text-badge-gray-muted',
|
|
28
24
|
outline: 'border-badge-gray-dark text-badge-gray-dark',
|
|
29
|
-
outlineMuted: 'border-badge-gray-muted text-badge-gray-muted',
|
|
30
25
|
text: 'text-badge-label-primary [&_svg]:text-badge-gray-strong before:bg-badge-gray-strong',
|
|
31
|
-
|
|
32
|
-
textColor: 'text-badge-gray-strong',
|
|
33
|
-
textColorMuted: 'text-badge-gray-muted'
|
|
26
|
+
textColor: 'text-badge-gray-strong'
|
|
34
27
|
},
|
|
35
28
|
zinc: {
|
|
36
29
|
solid: 'bg-badge-zinc-strong text-badge-on-solid',
|
|
37
30
|
solidMuted: 'bg-badge-zinc-dark-alt text-badge-on-solid',
|
|
38
31
|
secondary: 'bg-badge-zinc-light text-badge-zinc-dark',
|
|
39
|
-
secondaryMuted: 'bg-badge-zinc-light text-badge-zinc-muted',
|
|
40
32
|
outline: 'border-badge-zinc-dark text-badge-zinc-dark',
|
|
41
|
-
outlineMuted: 'border-badge-zinc-muted text-badge-zinc-muted',
|
|
42
33
|
text: 'text-badge-label-primary [&_svg]:text-badge-zinc-strong before:bg-badge-zinc-strong',
|
|
43
|
-
|
|
44
|
-
textColor: 'text-badge-zinc-strong',
|
|
45
|
-
textColorMuted: 'text-badge-zinc-muted'
|
|
34
|
+
textColor: 'text-badge-zinc-strong'
|
|
46
35
|
},
|
|
47
36
|
neutral: {
|
|
48
37
|
solid: 'bg-badge-neutral-strong text-badge-on-solid',
|
|
49
38
|
solidMuted: 'bg-badge-neutral-dark-alt text-badge-on-solid',
|
|
50
39
|
secondary: 'bg-badge-neutral-light text-badge-neutral-dark',
|
|
51
|
-
secondaryMuted: 'bg-badge-neutral-light text-badge-neutral-muted',
|
|
52
40
|
outline: 'border-badge-neutral-dark text-badge-neutral-dark',
|
|
53
|
-
outlineMuted: 'border-badge-neutral-muted text-badge-neutral-muted',
|
|
54
41
|
text: 'text-badge-label-primary [&_svg]:text-badge-neutral-strong before:bg-badge-neutral-strong',
|
|
55
|
-
|
|
56
|
-
textColor: 'text-badge-neutral-strong',
|
|
57
|
-
textColorMuted: 'text-badge-neutral-muted'
|
|
42
|
+
textColor: 'text-badge-neutral-strong'
|
|
58
43
|
},
|
|
59
44
|
stone: {
|
|
60
45
|
solid: 'bg-badge-stone-strong text-badge-on-solid',
|
|
61
46
|
solidMuted: 'bg-badge-stone-dark-alt text-badge-on-solid',
|
|
62
47
|
secondary: 'bg-badge-stone-light text-badge-stone-dark',
|
|
63
|
-
secondaryMuted: 'bg-badge-stone-light text-badge-stone-muted',
|
|
64
48
|
outline: 'border-badge-stone-dark text-badge-stone-dark',
|
|
65
|
-
outlineMuted: 'border-badge-stone-muted text-badge-stone-muted',
|
|
66
49
|
text: 'text-badge-label-primary [&_svg]:text-badge-stone-strong before:bg-badge-stone-strong',
|
|
67
|
-
|
|
68
|
-
textColor: 'text-badge-stone-strong',
|
|
69
|
-
textColorMuted: 'text-badge-stone-muted'
|
|
50
|
+
textColor: 'text-badge-stone-strong'
|
|
70
51
|
},
|
|
71
52
|
red: {
|
|
72
53
|
solid: 'bg-badge-red-strong text-badge-on-solid',
|
|
@@ -193,13 +174,13 @@ const generateBadgeVariants = ()=>{
|
|
|
193
174
|
variants.push(createVariant('solid', color, classes.solid, false));
|
|
194
175
|
variants.push(createVariant('solid', color, classes.solidMuted ?? '', true));
|
|
195
176
|
variants.push(createVariant('secondary', color, classes.secondary, false));
|
|
196
|
-
variants.push(createVariant('secondary', color, classes.
|
|
177
|
+
variants.push(createVariant('secondary', color, classes.secondary, true));
|
|
197
178
|
variants.push(createVariant('outline', color, classes.outline, false));
|
|
198
|
-
variants.push(createVariant('outline', color, classes.outlineMuted ??
|
|
179
|
+
variants.push(createVariant('outline', color, classes.outlineMuted ?? classes.outline, true));
|
|
199
180
|
variants.push(createVariant('text', color, classes.text, false));
|
|
200
|
-
variants.push(createVariant('text', color, classes.
|
|
181
|
+
variants.push(createVariant('text', color, classes.text, true));
|
|
201
182
|
variants.push(createVariant('text-color', color, classes.textColor, false));
|
|
202
|
-
variants.push(createVariant('text-color', color, classes.
|
|
183
|
+
variants.push(createVariant('text-color', color, classes.textColor, true));
|
|
203
184
|
});
|
|
204
185
|
const colorsWithoutMuted = [
|
|
205
186
|
BadgeColorEnum.Red,
|
|
@@ -50,7 +50,7 @@ const FoldToggle = (t0)=>{
|
|
|
50
50
|
const handleClick = t3;
|
|
51
51
|
let t4;
|
|
52
52
|
if ($[12] !== className) {
|
|
53
|
-
t4 = cn("flex items-center justify-center w-16 h-16 rounded-2 text-text-secondary hover:text-text-primary hover:bg-
|
|
53
|
+
t4 = cn("flex items-center justify-center w-16 h-16 rounded-2 text-text-secondary hover:text-text-primary hover:bg-states-primary-hover transition-colors cursor-pointer", className);
|
|
54
54
|
$[12] = className;
|
|
55
55
|
$[13] = t4;
|
|
56
56
|
} else t4 = $[13];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { cva } from "class-variance-authority";
|
|
2
|
-
const chartRootClasses = "group/chart relative flex flex-col w-full
|
|
2
|
+
const chartRootClasses = "group/chart relative flex flex-col w-full bg-bg-surface-1 border border-border-primary-light rounded-8 overflow-clip";
|
|
3
3
|
const chartHeaderClasses = "flex items-center justify-between h-32 shrink-0 pl-12 pr-4 text-text-primary";
|
|
4
4
|
const chartEmptyClasses = "flex flex-1 items-center justify-center px-12 py-24 text-center";
|
|
5
5
|
const chartActionsVariants = cva('flex items-center gap-4 ml-auto', {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { cva } from "class-variance-authority";
|
|
2
|
-
const horizontalBarStackRootClasses = "flex flex-col w-full";
|
|
2
|
+
const horizontalBarStackRootClasses = "mt-auto flex flex-col w-full";
|
|
3
3
|
const horizontalBarStackBarWrapperClasses = "px-16 py-8 w-full";
|
|
4
4
|
const horizontalBarStackBarClasses = "flex h-8 w-full overflow-hidden rounded-4";
|
|
5
5
|
const horizontalBarStackRemainderClasses = "bg-bg-strong-primary";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const metricRootClasses = "flex flex-col items-start px-16 py-8 w-full";
|
|
1
|
+
export declare const metricRootClasses = "mt-auto flex flex-col items-start px-16 py-8 w-full";
|
|
2
2
|
export declare const metricHeaderClasses = "flex items-baseline gap-8";
|
|
3
3
|
export declare const metricValueClasses = "font-sans-display text-3xl font-medium leading-3xl text-text-primary";
|
|
4
4
|
export declare const metricTotalClasses = "-ml-2 flex items-baseline gap-6";
|
|
@@ -6,7 +6,7 @@ export declare const metricTotalValueClasses = "font-sans-display text-lg font-m
|
|
|
6
6
|
export declare const metricTotalWordClasses = "text-xs font-normal text-text-secondary";
|
|
7
7
|
export declare const metricCaptionClasses = "text-xs text-text-secondary";
|
|
8
8
|
export declare const metricSkeletonLineClasses = "w-full py-4";
|
|
9
|
-
export declare const metricSparklineClasses = "
|
|
9
|
+
export declare const metricSparklineClasses = "w-full px-px";
|
|
10
10
|
export declare const metricSparklinePlotClasses = "relative h-48";
|
|
11
11
|
export declare const metricSparklineRulerClasses = "pointer-events-none absolute top-0 h-full w-px -translate-x-1/2 overflow-visible";
|
|
12
12
|
export declare const metricSparklinePopoverClasses = "pointer-events-none fixed z-(--tooltip-z-index)";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const metricRootClasses = 'flex flex-col items-start px-16 py-8 w-full';
|
|
1
|
+
const metricRootClasses = 'mt-auto flex flex-col items-start px-16 py-8 w-full';
|
|
2
2
|
const metricHeaderClasses = 'flex items-baseline gap-8';
|
|
3
3
|
const metricValueClasses = 'font-sans-display text-3xl font-medium leading-3xl text-text-primary';
|
|
4
4
|
const metricTotalClasses = '-ml-2 flex items-baseline gap-6';
|
|
@@ -6,7 +6,7 @@ const metricTotalValueClasses = 'font-sans-display text-lg font-medium text-text
|
|
|
6
6
|
const metricTotalWordClasses = 'text-xs font-normal text-text-secondary';
|
|
7
7
|
const metricCaptionClasses = 'text-xs text-text-secondary';
|
|
8
8
|
const metricSkeletonLineClasses = 'w-full py-4';
|
|
9
|
-
const metricSparklineClasses = '
|
|
9
|
+
const metricSparklineClasses = 'w-full px-px';
|
|
10
10
|
const metricSparklinePlotClasses = 'relative h-48';
|
|
11
11
|
const metricSparklineRulerClasses = 'pointer-events-none absolute top-0 h-full w-px -translate-x-1/2 overflow-visible';
|
|
12
12
|
const metricSparklinePopoverClasses = 'pointer-events-none fixed z-(--tooltip-z-index)';
|
|
@@ -77,7 +77,10 @@ const TableBodyCell = (t0)=>{
|
|
|
77
77
|
if (isCut && hasActions) return /*#__PURE__*/ jsxs("div", {
|
|
78
78
|
className: "flex items-center justify-between gap-2",
|
|
79
79
|
children: [
|
|
80
|
-
|
|
80
|
+
/*#__PURE__*/ jsx("div", {
|
|
81
|
+
className: "min-w-0 overflow-hidden",
|
|
82
|
+
children: tooltipText ? wrappedContent : content
|
|
83
|
+
}),
|
|
81
84
|
/*#__PURE__*/ jsx(TableMasterCellActions, {
|
|
82
85
|
children: menuAction
|
|
83
86
|
})
|