@wallarm-org/design-system 0.53.0 → 0.54.0-rc-feature-shell.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/AnimatedBackground/AnimatedBackground.d.ts +0 -2
- package/dist/components/AnimatedBackground/lib.js +3 -4
- package/dist/components/AnimatedBackground/types.d.ts +0 -1
- package/dist/components/NavRail/NavRail.d.ts +1 -0
- package/dist/components/NavRail/NavRail.js +2 -2
- package/dist/components/NavRail/classes.js +1 -1
- package/dist/components/TopHeader/TopHeader.d.ts +1 -0
- package/dist/components/TopHeader/TopHeader.js +2 -2
- package/dist/hooks/useOverflowItems.d.ts +2 -4
- package/dist/hooks/useOverflowItems.js +56 -38
- package/dist/hooks/useOverflowItems.observer.d.ts +12 -0
- package/dist/hooks/useOverflowItems.observer.js +14 -0
- package/dist/hooks/useOverflowItems.scheduler.d.ts +8 -3
- package/dist/metadata/components.json +13 -9
- package/dist/theme/components/login-background.css +4 -8
- package/package.json +1 -1
|
@@ -26,8 +26,6 @@ export interface AnimatedBackgroundProps extends Omit<CanvasHTMLAttributes<HTMLC
|
|
|
26
26
|
accentColorVar?: string;
|
|
27
27
|
/** CSS custom-property name for the base fill. */
|
|
28
28
|
baseColorVar?: string;
|
|
29
|
-
/** CSS custom-property name for the clean leading-edge scan line. */
|
|
30
|
-
sweepColorVar?: string;
|
|
31
29
|
/** Force a single static frame (also auto-true under reduced motion). */
|
|
32
30
|
paused?: boolean;
|
|
33
31
|
}
|
|
@@ -23,10 +23,9 @@ const resolveOptions = (props)=>{
|
|
|
23
23
|
bloomAlpha: props.bloomAlpha ?? 0.2,
|
|
24
24
|
maxDotSize: props.maxDotSize ?? d.maxDotSize,
|
|
25
25
|
tilt: props.tilt ?? 16,
|
|
26
|
-
dotColorVar: props.dotColorVar ?? '--
|
|
27
|
-
accentColorVar: props.accentColorVar ?? '--
|
|
28
|
-
baseColorVar: props.baseColorVar ?? '--
|
|
29
|
-
sweepColorVar: props.sweepColorVar ?? '--login-bg-sweep'
|
|
26
|
+
dotColorVar: props.dotColorVar ?? '--animated-bg-dot',
|
|
27
|
+
accentColorVar: props.accentColorVar ?? '--animated-bg-accent-dot',
|
|
28
|
+
baseColorVar: props.baseColorVar ?? '--color-component-app-shell-bg'
|
|
30
29
|
};
|
|
31
30
|
};
|
|
32
31
|
export { resolveOptions };
|
|
@@ -6,7 +6,7 @@ import { cn } from "../../utils/cn.js";
|
|
|
6
6
|
import { TestIdProvider } from "../../utils/testId.js";
|
|
7
7
|
import { navRailVariants } from "./classes.js";
|
|
8
8
|
import { NavRailContextProvider } from "./NavRailContext.js";
|
|
9
|
-
const NavRail = ({ ref, collapsed = false, className, children, 'data-testid': testId, ...props })=>{
|
|
9
|
+
const NavRail = ({ ref, collapsed = false, appeared, className, children, 'data-testid': testId, ...props })=>{
|
|
10
10
|
const internalRef = useRef(null);
|
|
11
11
|
const focusPanel = useCallback(()=>{
|
|
12
12
|
const panel = document.querySelector('[data-slot="nav-panel"]');
|
|
@@ -47,7 +47,7 @@ const NavRail = ({ ref, collapsed = false, className, children, 'data-testid': t
|
|
|
47
47
|
"data-testid": testId,
|
|
48
48
|
className: cn(navRailVariants({
|
|
49
49
|
collapsed
|
|
50
|
-
}), className),
|
|
50
|
+
}), false === appeared && 'opacity-0', className),
|
|
51
51
|
children: children
|
|
52
52
|
})
|
|
53
53
|
})
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { cva } from "class-variance-authority";
|
|
2
|
-
const navRailVariants = cva('flex h-full shrink-0 flex-col overflow-hidden px-8 pt-6 pb-12 transition-[width] duration-200 ease-in-out', {
|
|
2
|
+
const navRailVariants = cva('flex h-full shrink-0 flex-col overflow-hidden px-8 pt-6 pb-12 transition-[width] duration-200 ease-in-out transition-[width,opacity] duration-200 ease-in-out', {
|
|
3
3
|
variants: {
|
|
4
4
|
collapsed: {
|
|
5
5
|
true: 'w-[48px]',
|
|
@@ -3,5 +3,6 @@ import { type TestableProps } from '../../utils/testId';
|
|
|
3
3
|
export interface TopHeaderProps extends HTMLAttributes<HTMLDivElement>, TestableProps {
|
|
4
4
|
ref?: Ref<HTMLDivElement>;
|
|
5
5
|
children?: ReactNode;
|
|
6
|
+
appeared?: boolean;
|
|
6
7
|
}
|
|
7
8
|
export declare const TopHeader: FC<TopHeaderProps>;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { cn } from "../../utils/cn.js";
|
|
3
3
|
import { TestIdProvider } from "../../utils/testId.js";
|
|
4
|
-
const TopHeader = ({ ref, className, children, 'data-testid': testId, ...props })=>/*#__PURE__*/ jsx(TestIdProvider, {
|
|
4
|
+
const TopHeader = ({ ref, appeared, className, children, 'data-testid': testId, ...props })=>/*#__PURE__*/ jsx(TestIdProvider, {
|
|
5
5
|
value: testId,
|
|
6
6
|
children: /*#__PURE__*/ jsx("div", {
|
|
7
7
|
...props,
|
|
8
8
|
ref: ref,
|
|
9
9
|
"data-slot": "top-header",
|
|
10
10
|
"data-testid": testId,
|
|
11
|
-
className: cn('flex items-center justify-between pl-7 pr-12 py-6', className),
|
|
11
|
+
className: cn('flex items-center justify-between pl-7 pr-12 py-6', 'transition-opacity duration-200 ease-in-out', false === appeared && 'opacity-0', className),
|
|
12
12
|
children: children
|
|
13
13
|
})
|
|
14
14
|
});
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { type ReactElement, type RefObject } from 'react';
|
|
2
2
|
export interface UseOverflowItemsOptions<T> {
|
|
3
3
|
/**
|
|
4
|
-
* Invariant:
|
|
5
|
-
*
|
|
6
|
-
* renderers/reserveSpace, so changing those to alter widths needs a fresh
|
|
7
|
-
* array.
|
|
4
|
+
* Invariant: measurements are cached by array identity, so changing the
|
|
5
|
+
* renderers/reserveSpace to alter widths needs a fresh array.
|
|
8
6
|
*/
|
|
9
7
|
items: T[];
|
|
10
8
|
renderItem: (item: T) => ReactElement;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useCallback, useLayoutEffect, useRef, useState } from "react";
|
|
3
3
|
import { calculateVisibleCount } from "./useOverflowItems.helpers.js";
|
|
4
|
+
import { observeOverflowResize } from "./useOverflowItems.observer.js";
|
|
4
5
|
import { scheduleOverflowMeasurement } from "./useOverflowItems.scheduler.js";
|
|
5
6
|
const crossMountCache = new WeakMap();
|
|
6
7
|
function useOverflowItems({ items, renderItem, renderMeasurementItem, overflowRenderer, reserveSpace = 60 }) {
|
|
@@ -18,87 +19,104 @@ function useOverflowItems({ items, renderItem, renderMeasurementItem, overflowRe
|
|
|
18
19
|
const cacheRef = useRef({
|
|
19
20
|
widths: [],
|
|
20
21
|
gap: 0,
|
|
21
|
-
indicatorWidth: reserveSpace
|
|
22
|
+
indicatorWidth: reserveSpace,
|
|
23
|
+
lastCount: 0
|
|
22
24
|
});
|
|
23
25
|
const recompute = useCallback((availableWidth)=>{
|
|
24
26
|
const container = containerRef.current;
|
|
25
27
|
if (!container) return;
|
|
28
|
+
const width = availableWidth ?? container.offsetWidth;
|
|
29
|
+
if (0 === width) return;
|
|
26
30
|
const { widths, gap, indicatorWidth } = cacheRef.current;
|
|
27
31
|
if (0 === widths.length) return;
|
|
28
32
|
const next = calculateVisibleCount({
|
|
29
33
|
itemWidths: widths,
|
|
30
34
|
gap,
|
|
31
|
-
availableWidth:
|
|
35
|
+
availableWidth: width,
|
|
32
36
|
indicatorWidth
|
|
33
37
|
});
|
|
34
38
|
const entry = crossMountCache.get(itemsRef.current);
|
|
35
39
|
if (entry) entry.lastCount = next;
|
|
36
40
|
setVisibleCount((prev)=>prev === next ? prev : next);
|
|
37
41
|
}, []);
|
|
42
|
+
const pendingMeasureRef = useRef(false);
|
|
43
|
+
const measure = useCallback(()=>{
|
|
44
|
+
const container = containerRef.current;
|
|
45
|
+
if (container && 0 === container.offsetWidth) return ()=>{
|
|
46
|
+
pendingMeasureRef.current = true;
|
|
47
|
+
};
|
|
48
|
+
const gap = container ? Number.parseFloat(getComputedStyle(container).gap || '0') || 0 : 0;
|
|
49
|
+
const widths = measurementRefs.current.slice(0, items.length).map((ref)=>ref?.offsetWidth ?? 0);
|
|
50
|
+
const indicatorWidth = indicatorRef.current?.offsetWidth || reserveSpace;
|
|
51
|
+
const availableWidth = container?.offsetWidth ?? 0;
|
|
52
|
+
return ()=>{
|
|
53
|
+
pendingMeasureRef.current = false;
|
|
54
|
+
const entry = {
|
|
55
|
+
widths,
|
|
56
|
+
gap,
|
|
57
|
+
indicatorWidth,
|
|
58
|
+
lastCount: items.length
|
|
59
|
+
};
|
|
60
|
+
cacheRef.current = entry;
|
|
61
|
+
crossMountCache.set(items, entry);
|
|
62
|
+
recompute(availableWidth);
|
|
63
|
+
measurementLayerRef.current?.style.setProperty('display', 'none');
|
|
64
|
+
};
|
|
65
|
+
}, [
|
|
66
|
+
items,
|
|
67
|
+
reserveSpace,
|
|
68
|
+
recompute
|
|
69
|
+
]);
|
|
70
|
+
const measureRef = useRef(measure);
|
|
71
|
+
measureRef.current = measure;
|
|
72
|
+
const recomputeRead = useCallback(()=>{
|
|
73
|
+
const availableWidth = containerRef.current?.offsetWidth ?? 0;
|
|
74
|
+
return ()=>recompute(availableWidth);
|
|
75
|
+
}, [
|
|
76
|
+
recompute
|
|
77
|
+
]);
|
|
38
78
|
useLayoutEffect(()=>{
|
|
39
79
|
if (0 === items.length) {
|
|
40
80
|
cacheRef.current = {
|
|
41
81
|
widths: [],
|
|
42
82
|
gap: 0,
|
|
43
|
-
indicatorWidth: reserveSpace
|
|
83
|
+
indicatorWidth: reserveSpace,
|
|
84
|
+
lastCount: 0
|
|
44
85
|
};
|
|
45
86
|
setVisibleCount(0);
|
|
87
|
+
pendingMeasureRef.current = false;
|
|
46
88
|
return;
|
|
47
89
|
}
|
|
48
90
|
const cached = crossMountCache.get(items);
|
|
49
91
|
if (cached) {
|
|
50
92
|
cacheRef.current = cached;
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
return ()=>recompute(availableWidth);
|
|
54
|
-
});
|
|
93
|
+
pendingMeasureRef.current = false;
|
|
94
|
+
return scheduleOverflowMeasurement(recomputeRead);
|
|
55
95
|
}
|
|
56
96
|
measurementLayerRef.current?.style.removeProperty('display');
|
|
57
|
-
return scheduleOverflowMeasurement(
|
|
58
|
-
const container = containerRef.current;
|
|
59
|
-
const gap = container ? Number.parseFloat(getComputedStyle(container).gap || '0') || 0 : 0;
|
|
60
|
-
const widths = measurementRefs.current.slice(0, items.length).map((ref)=>ref?.offsetWidth ?? 0);
|
|
61
|
-
const indicatorWidth = indicatorRef.current?.offsetWidth || reserveSpace;
|
|
62
|
-
const availableWidth = container?.offsetWidth ?? 0;
|
|
63
|
-
return ()=>{
|
|
64
|
-
const entry = {
|
|
65
|
-
widths,
|
|
66
|
-
gap,
|
|
67
|
-
indicatorWidth,
|
|
68
|
-
lastCount: items.length
|
|
69
|
-
};
|
|
70
|
-
cacheRef.current = entry;
|
|
71
|
-
crossMountCache.set(items, entry);
|
|
72
|
-
recompute(availableWidth);
|
|
73
|
-
measurementLayerRef.current?.style.setProperty('display', 'none');
|
|
74
|
-
};
|
|
75
|
-
});
|
|
97
|
+
return scheduleOverflowMeasurement(measure);
|
|
76
98
|
}, [
|
|
77
99
|
items,
|
|
78
100
|
renderItem,
|
|
79
101
|
renderMeasurementItem,
|
|
80
102
|
overflowRenderer,
|
|
81
103
|
reserveSpace,
|
|
82
|
-
|
|
104
|
+
recomputeRead,
|
|
105
|
+
measure
|
|
83
106
|
]);
|
|
84
107
|
useLayoutEffect(()=>{
|
|
85
108
|
const container = containerRef.current;
|
|
86
109
|
if (!container) return;
|
|
87
|
-
let
|
|
88
|
-
const
|
|
89
|
-
|
|
90
|
-
frame = requestAnimationFrame(()=>{
|
|
91
|
-
frame = 0;
|
|
92
|
-
recompute();
|
|
93
|
-
});
|
|
110
|
+
let cancelScheduled;
|
|
111
|
+
const unobserve = observeOverflowResize(container, ()=>{
|
|
112
|
+
cancelScheduled = pendingMeasureRef.current ? scheduleOverflowMeasurement(measureRef.current) : scheduleOverflowMeasurement(recomputeRead);
|
|
94
113
|
});
|
|
95
|
-
observer.observe(container);
|
|
96
114
|
return ()=>{
|
|
97
|
-
|
|
98
|
-
|
|
115
|
+
cancelScheduled?.();
|
|
116
|
+
unobserve();
|
|
99
117
|
};
|
|
100
118
|
}, [
|
|
101
|
-
|
|
119
|
+
recomputeRead
|
|
102
120
|
]);
|
|
103
121
|
const visibleItems = items.slice(0, visibleCount);
|
|
104
122
|
const hiddenItems = items.slice(visibleCount);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Single shared ResizeObserver for all overflow lists. The browser drains
|
|
3
|
+
* microtasks between separate observer callbacks, so per-instance observers
|
|
4
|
+
* cannot share one read/write batch — one observer delivers every entry in a
|
|
5
|
+
* single callback, letting all instances enqueue into the same flush. It also
|
|
6
|
+
* fires pre-paint: a measurement scheduled here lands before the frame paints.
|
|
7
|
+
*/
|
|
8
|
+
/** Called when the observed element resizes (including display:none toggles). */
|
|
9
|
+
export interface OverflowResizeHandler {
|
|
10
|
+
(): void;
|
|
11
|
+
}
|
|
12
|
+
export declare const observeOverflowResize: (element: Element, handler: OverflowResizeHandler) => (() => void);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
const handlers = new Map();
|
|
2
|
+
let observer = null;
|
|
3
|
+
const observeOverflowResize = (element, handler)=>{
|
|
4
|
+
observer ??= new ResizeObserver((entries)=>{
|
|
5
|
+
for (const entry of entries)handlers.get(entry.target)?.();
|
|
6
|
+
});
|
|
7
|
+
handlers.set(element, handler);
|
|
8
|
+
observer.observe(element);
|
|
9
|
+
return ()=>{
|
|
10
|
+
handlers.delete(element);
|
|
11
|
+
observer?.unobserve(element);
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
export { observeOverflowResize };
|
|
@@ -5,12 +5,17 @@
|
|
|
5
5
|
* the next reads `offsetWidth`. One pre-paint microtask runs all reads against
|
|
6
6
|
* clean layout, then all writes — React batches them, no interleaving.
|
|
7
7
|
*/
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
/** Write phase of a batched measurement: state + style writes, no DOM reads. */
|
|
9
|
+
export interface WritePhase {
|
|
10
|
+
(): void;
|
|
11
|
+
}
|
|
12
|
+
/** Read phase: DOM reads only; returns the write to run after all reads. */
|
|
13
|
+
export interface ReadPhase {
|
|
14
|
+
(): WritePhase;
|
|
15
|
+
}
|
|
10
16
|
/**
|
|
11
17
|
* Queue a measurement for the next pre-paint flush. Returns a cancel
|
|
12
18
|
* function — call it on effect cleanup so unmounted or re-rendered
|
|
13
19
|
* instances never measure stale refs.
|
|
14
20
|
*/
|
|
15
21
|
export declare const scheduleOverflowMeasurement: (read: ReadPhase) => (() => void);
|
|
16
|
-
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.
|
|
3
|
-
"generatedAt": "2026-06-
|
|
2
|
+
"version": "0.53.1",
|
|
3
|
+
"generatedAt": "2026-06-03T21:17:22.457Z",
|
|
4
4
|
"components": [
|
|
5
5
|
{
|
|
6
6
|
"name": "Accordion",
|
|
@@ -3406,12 +3406,6 @@
|
|
|
3406
3406
|
"required": false,
|
|
3407
3407
|
"description": "CSS custom-property name for the base fill."
|
|
3408
3408
|
},
|
|
3409
|
-
{
|
|
3410
|
-
"name": "sweepColorVar",
|
|
3411
|
-
"type": "string | undefined",
|
|
3412
|
-
"required": false,
|
|
3413
|
-
"description": "CSS custom-property name for the clean leading-edge scan line."
|
|
3414
|
-
},
|
|
3415
3409
|
{
|
|
3416
3410
|
"name": "paused",
|
|
3417
3411
|
"type": "boolean | undefined",
|
|
@@ -4827,7 +4821,7 @@
|
|
|
4827
4821
|
"examples": [
|
|
4828
4822
|
{
|
|
4829
4823
|
"name": "Basic",
|
|
4830
|
-
"code": "() => {\n const pathname = useLocationPathname();\n const activeProduct = deriveProduct(pathname);\n\n const [loading, setLoading] = useState(true);\n const [sidebarMode, setSidebarMode] = useState<SidebarMode>('adaptive');\n const { theme, setTheme } = useTheme();\n const collapsed = sidebarMode === 'adaptive' && activeProduct !== 'home';\n\n return (\n <AppShell>\n <AppShellHeader>\n <TopHeader>\n <TopHeaderLogo href='/'>\n <WallarmLogo />\n </TopHeaderLogo>\n\n <TopHeaderActions>\n {loading ? (\n <>\n <Skeleton width='150px' height='20px' rounded={6} />\n <TopHeaderSeparator />\n <Skeleton width='150px' height='20px' rounded={6} />\n </>\n ) : (\n <>\n <Button\n variant='ghost'\n size='small'\n color='neutral'\n className='p-4 gap-6 rounded-6'\n >\n <Code size='s' color='secondary'>\n Search Wallarm\n </Code>\n <Kbd size='xsmall'>⌘ K</Kbd>\n </Button>\n\n <TopHeaderSeparator />\n\n <Button variant='ghost' size='small' color='neutral' className='py-4 rounded-6'>\n <Text size='xs' weight='medium'>\n Tenant Name\n </Text>\n <span className='text-text-tertiary mx-[-2px]'>•</span>\n <Code size='s' color='secondary'>\n 12345\n </Code>\n <ChevronUpDown className='!icon-sm' />\n </Button>\n </>\n )}\n\n <Tooltip>\n <TooltipTrigger asChild>\n <Button variant='ghost' size='small' color='neutral' aria-label='Wallarm Updates'>\n <Bell />\n </Button>\n </TooltipTrigger>\n <TooltipContent>Wallarm updates</TooltipContent>\n </Tooltip>\n\n <QuickHelpDropdown />\n </TopHeaderActions>\n </TopHeader>\n </AppShellHeader>\n\n <AppShellRail>\n <NavRail collapsed={collapsed}>\n <NavRailBody>\n <NavRailItem\n icon={Home}\n label='Home'\n shortcut={['G', 'H']}\n active={activeProduct === 'home'}\n onClick={() => navigateToProduct('home')}\n />\n <RecentDropdown />\n\n <NavRailSeparator />\n\n {loading ? (\n <NavRailSkeleton />\n ) : (\n <>\n <NavRailItem\n icon={CircleDashed}\n label='Edge'\n shortcut={['G', 'E']}\n active={activeProduct === 'edge'}\n onClick={() => navigateToProduct('edge')}\n />\n <NavRailItem\n icon={CircleDashed}\n label='AI Hypervisor'\n shortcut={['G', 'A']}\n active={activeProduct === 'ai-hypervisor'}\n onClick={() => navigateToProduct('ai-hypervisor')}\n />\n <NavRailItem\n icon={CircleDashed}\n label='Infra Discovery'\n shortcut={['G', 'I']}\n active={activeProduct === 'infra-discovery'}\n onClick={() => navigateToProduct('infra-discovery')}\n />\n <NavRailItem\n icon={CircleDashed}\n label='Security Testing'\n shortcut={['G', 'T']}\n active={activeProduct === 'security-testing'}\n onClick={() => navigateToProduct('security-testing')}\n />\n </>\n )}\n </NavRailBody>\n\n <NavRailFooter>\n <NavRailItem\n icon={Settings}\n label='Settings'\n shortcut={['G', 'S']}\n active={activeProduct === 'settings'}\n onClick={() => navigateToProduct('settings')}\n />\n <AccountDropdown\n sidebarMode={sidebarMode}\n onSidebarModeChange={setSidebarMode}\n theme={theme}\n onThemeChange={setTheme}\n />\n </NavRailFooter>\n </NavRail>\n </AppShellRail>\n\n <AppShellRemote>\n <div className='absolute top-4 right-4 z-10'>\n <Button variant='ghost' size='small' color='neutral' onClick={() => setLoading(v => !v)}>\n {loading ? 'Finish loading' : 'Start loading'}\n </Button>\n </div>\n\n <RemoteForProduct product={activeProduct} />\n </AppShellRemote>\n </AppShell>\n );\n}"
|
|
4824
|
+
"code": "() => {\n const pathname = useLocationPathname();\n const activeProduct = deriveProduct(pathname);\n\n const [appeared, setAppeared] = useState(true);\n const [loading, setLoading] = useState(true);\n const [sidebarMode, setSidebarMode] = useState<SidebarMode>('adaptive');\n const { theme, setTheme } = useTheme();\n const collapsed = sidebarMode === 'adaptive' && activeProduct !== 'home';\n\n return (\n <AppShell>\n <AppShellHeader>\n <TopHeader appeared={appeared}>\n <TopHeaderLogo href='/'>\n <WallarmLogo />\n </TopHeaderLogo>\n\n <TopHeaderActions>\n {loading ? (\n <>\n <Skeleton width='150px' height='20px' rounded={6} />\n <TopHeaderSeparator />\n <Skeleton width='150px' height='20px' rounded={6} />\n </>\n ) : (\n <>\n <Button\n variant='ghost'\n size='small'\n color='neutral'\n className='p-4 gap-6 rounded-6'\n >\n <Code size='s' color='secondary'>\n Search Wallarm\n </Code>\n <Kbd size='xsmall'>⌘ K</Kbd>\n </Button>\n\n <TopHeaderSeparator />\n\n <Button variant='ghost' size='small' color='neutral' className='py-4 rounded-6'>\n <Text size='xs' weight='medium'>\n Tenant Name\n </Text>\n <span className='text-text-tertiary mx-[-2px]'>•</span>\n <Code size='s' color='secondary'>\n 12345\n </Code>\n <ChevronUpDown className='!icon-sm' />\n </Button>\n </>\n )}\n\n <Tooltip>\n <TooltipTrigger asChild>\n <Button variant='ghost' size='small' color='neutral' aria-label='Wallarm Updates'>\n <Bell />\n </Button>\n </TooltipTrigger>\n <TooltipContent>Wallarm updates</TooltipContent>\n </Tooltip>\n\n <QuickHelpDropdown />\n </TopHeaderActions>\n </TopHeader>\n </AppShellHeader>\n\n <AppShellRail>\n <NavRail collapsed={collapsed} appeared={appeared}>\n <NavRailBody>\n <NavRailItem\n icon={Home}\n label='Home'\n shortcut={['G', 'H']}\n active={activeProduct === 'home'}\n onClick={() => navigateToProduct('home')}\n />\n <RecentDropdown />\n\n <NavRailSeparator />\n\n {loading ? (\n <NavRailSkeleton />\n ) : (\n <>\n <NavRailItem\n icon={CircleDashed}\n label='Edge'\n shortcut={['G', 'E']}\n active={activeProduct === 'edge'}\n onClick={() => navigateToProduct('edge')}\n />\n <NavRailItem\n icon={CircleDashed}\n label='AI Hypervisor'\n shortcut={['G', 'A']}\n active={activeProduct === 'ai-hypervisor'}\n onClick={() => navigateToProduct('ai-hypervisor')}\n />\n <NavRailItem\n icon={CircleDashed}\n label='Infra Discovery'\n shortcut={['G', 'I']}\n active={activeProduct === 'infra-discovery'}\n onClick={() => navigateToProduct('infra-discovery')}\n />\n <NavRailItem\n icon={CircleDashed}\n label='Security Testing'\n shortcut={['G', 'T']}\n active={activeProduct === 'security-testing'}\n onClick={() => navigateToProduct('security-testing')}\n />\n </>\n )}\n </NavRailBody>\n\n <NavRailFooter>\n <NavRailItem\n icon={Settings}\n label='Settings'\n shortcut={['G', 'S']}\n active={activeProduct === 'settings'}\n onClick={() => navigateToProduct('settings')}\n />\n <AccountDropdown\n sidebarMode={sidebarMode}\n onSidebarModeChange={setSidebarMode}\n theme={theme}\n onThemeChange={setTheme}\n />\n </NavRailFooter>\n </NavRail>\n </AppShellRail>\n\n <AppShellRemote>\n <div className='flex gap-8 absolute top-4 right-4 z-10'>\n <Button variant='ghost' size='small' color='neutral' onClick={() => setAppeared(v => !v)}>\n {appeared ? 'Hide menu' : 'Show menu'}\n </Button>\n\n <Button variant='ghost' size='small' color='neutral' onClick={() => setLoading(v => !v)}>\n {loading ? 'Finish loading' : 'Start loading'}\n </Button>\n </div>\n\n <RemoteForProduct product={activeProduct} />\n </AppShellRemote>\n </AppShell>\n );\n}"
|
|
4831
4825
|
}
|
|
4832
4826
|
]
|
|
4833
4827
|
},
|
|
@@ -28217,6 +28211,11 @@
|
|
|
28217
28211
|
"required": false,
|
|
28218
28212
|
"defaultValue": "false"
|
|
28219
28213
|
},
|
|
28214
|
+
{
|
|
28215
|
+
"name": "appeared",
|
|
28216
|
+
"type": "boolean | undefined",
|
|
28217
|
+
"required": false
|
|
28218
|
+
},
|
|
28220
28219
|
{
|
|
28221
28220
|
"name": "defaultChecked",
|
|
28222
28221
|
"type": "boolean | undefined",
|
|
@@ -54728,6 +54727,11 @@
|
|
|
54728
54727
|
"name": "TopHeader",
|
|
54729
54728
|
"importPath": "@wallarm-org/design-system/TopHeader",
|
|
54730
54729
|
"props": [
|
|
54730
|
+
{
|
|
54731
|
+
"name": "appeared",
|
|
54732
|
+
"type": "boolean | undefined",
|
|
54733
|
+
"required": false
|
|
54734
|
+
},
|
|
54731
54735
|
{
|
|
54732
54736
|
"name": "defaultChecked",
|
|
54733
54737
|
"type": "boolean | undefined",
|
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
:root {
|
|
2
|
-
--
|
|
3
|
-
--
|
|
4
|
-
--login-bg-base: var(--color-slate-50);
|
|
5
|
-
--login-bg-sweep: var(--color-slate-950);
|
|
2
|
+
--animated-bg-dot: var(--color-slate-500);
|
|
3
|
+
--animated-bg-accent-dot: var(--color-red-400);
|
|
6
4
|
}
|
|
7
5
|
|
|
8
6
|
[data-theme="dark"] {
|
|
9
|
-
--
|
|
10
|
-
--
|
|
11
|
-
--login-bg-base: var(--color-slate-950);
|
|
12
|
-
--login-bg-sweep: var(--color-slate-50);
|
|
7
|
+
--animated-bg-dot: var(--color-slate-500);
|
|
8
|
+
--animated-bg-accent-dot: var(--color-red-400);
|
|
13
9
|
}
|
package/package.json
CHANGED