@wallarm-org/design-system 0.53.1 → 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/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,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.53.
|
|
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