+
{icon}
@@ -56,7 +55,7 @@ const SidePanelHeader = ({
{actions?.map((action, index) => (
- {action}
+ {action}
))}
@@ -66,14 +65,14 @@ const SidePanelHeader = ({
};
interface SidePanelSectionProps {
- children: React.ReactNode;
+ children: ReactNode;
}
const SidePanelSection = ({ children }: SidePanelSectionProps) => {
- return
{children}
;
+ return
{children}
;
};
export const SidePanel = Object.assign(SidePanelRoot, {
Header: SidePanelHeader,
- Section: SidePanelSection,
+ Section: SidePanelSection
});
diff --git a/packages/raystack/components/sidebar/sidebar-item.tsx b/packages/raystack/components/sidebar/sidebar-item.tsx
index 339867522..a5e4a96eb 100644
--- a/packages/raystack/components/sidebar/sidebar-item.tsx
+++ b/packages/raystack/components/sidebar/sidebar-item.tsx
@@ -3,17 +3,17 @@
import { cx } from 'class-variance-authority';
import {
ComponentPropsWithoutRef,
- ReactElement,
- ReactNode,
cloneElement,
forwardRef,
+ ReactElement,
+ ReactNode,
useContext
} from 'react';
import { Avatar } from '../avatar';
import { Flex } from '../flex';
import { Tooltip } from '../tooltip';
-import { SidebarContext } from './sidebar-root';
import styles from './sidebar.module.css';
+import { SidebarContext } from './sidebar-root';
export interface SidebarItemProps extends ComponentPropsWithoutRef<'a'> {
leadingIcon?: ReactNode;
@@ -49,6 +49,13 @@ export const SidebarItem = forwardRef
(
typeof children === 'string' &&
children.length > 0;
+ const iconProps = {
+ align: 'center',
+ gap: 3,
+ className: cx(styles['nav-leading-icon'], classNames?.leadingIcon),
+ ariaHidden: true
+ } as const;
+
const content = cloneElement(
as,
{
@@ -62,13 +69,8 @@ export const SidebarItem = forwardRef(
...props
},
<>
-
- {shouldShowFallback ? (
+ {shouldShowFallback ? (
+
(
fallback={children[0].toUpperCase()}
style={{ cursor: 'pointer' }}
/>
- ) : (
- leadingIcon
- )}
-
+
+ ) : null}
+ {!shouldShowFallback && leadingIcon ? (
+ {leadingIcon}
+ ) : null}
{!isCollapsed && (
{children}
diff --git a/packages/raystack/components/sidebar/sidebar-misc.tsx b/packages/raystack/components/sidebar/sidebar-misc.tsx
index 0e94eeecb..8de58bca9 100644
--- a/packages/raystack/components/sidebar/sidebar-misc.tsx
+++ b/packages/raystack/components/sidebar/sidebar-misc.tsx
@@ -1,7 +1,7 @@
'use client';
import { cx } from 'class-variance-authority';
-import { ComponentPropsWithoutRef, ReactNode, forwardRef } from 'react';
+import { ComponentPropsWithoutRef, forwardRef, ReactNode } from 'react';
import { Flex } from '../flex';
import styles from './sidebar.module.css';
@@ -42,25 +42,43 @@ export interface SidebarNavigationGroupProps
extends ComponentPropsWithoutRef<'div'> {
label: string;
leadingIcon?: ReactNode;
+ classNames?: {
+ header?: string;
+ items?: string;
+ label?: string;
+ icon?: string;
+ };
}
export const SidebarNavigationGroup = forwardRef<
HTMLElement,
SidebarNavigationGroupProps
->(({ className, label, leadingIcon, children, ...props }, ref) => (
+>(({ className, label, leadingIcon, classNames, children, ...props }, ref) => (
-
+
{leadingIcon && (
- {leadingIcon}
+
+ {leadingIcon}
+
)}
- {label}
+
+ {label}
+
-
+
{children}
diff --git a/packages/raystack/components/sidebar/sidebar.module.css b/packages/raystack/components/sidebar/sidebar.module.css
index 37ec7c520..018f97c22 100644
--- a/packages/raystack/components/sidebar/sidebar.module.css
+++ b/packages/raystack/components/sidebar/sidebar.module.css
@@ -2,13 +2,11 @@
display: flex;
width: 220px;
height: 100%;
- padding: var(--rs-space-1) var(--rs-space-4) var(--rs-space-5)
- var(--rs-space-4);
+ padding: var(--rs-space-5) var(--rs-space-4);
flex-direction: column;
justify-content: flex-start;
align-items: flex-start;
flex-shrink: 0;
- border-right: 1px solid var(--rs-color-border-base-primary);
background: var(--rs-color-background-base-primary);
transition: width 0.2s ease;
position: relative;
@@ -27,16 +25,17 @@
}
.root[data-state="collapsed"] {
- width: 56px;
+ width: 57px;
}
.header {
gap: var(--rs-space-3);
- padding: var(--rs-space-6) var(--rs-space-2);
+ padding: var(--rs-space-2);
align-self: stretch;
border-radius: var(--rs-radius-2);
background: var(--rs-color-background-base-primary);
overflow: hidden;
+ margin-bottom: var(--rs-space-6);
}
.main {
@@ -149,6 +148,7 @@
left: 0;
right: auto;
cursor: ew-resize;
+ transform: translateX(-50%);
}
.nav-group {
diff --git a/packages/raystack/components/slider/slider.module.css b/packages/raystack/components/slider/slider.module.css
index 9c97439f1..565d8f1e9 100644
--- a/packages/raystack/components/slider/slider.module.css
+++ b/packages/raystack/components/slider/slider.module.css
@@ -64,7 +64,7 @@
height: 16px;
border-radius: var(--rs-radius-full);
background-color: var(--rs-color-background-base-primary);
- border: 1px solid var(--rs-color-border-base-tertiary);
+ border: 0.5px solid var(--rs-color-border-base-tertiary);
box-shadow: var(--rs-shadow-soft);
}
diff --git a/packages/raystack/components/spinner/spinner.module.css b/packages/raystack/components/spinner/spinner.module.css
index 6fa95bce8..b996568fa 100644
--- a/packages/raystack/components/spinner/spinner.module.css
+++ b/packages/raystack/components/spinner/spinner.module.css
@@ -56,7 +56,6 @@
}
@keyframes spin {
-
0%,
100% {
opacity: 0.8;
@@ -112,13 +111,13 @@
}
.spinner-size-5 {
- width: var(--rs-space-8);
- height: var(--rs-space-8);
+ width: var(--rs-space-9);
+ height: var(--rs-space-9);
}
.spinner-size-6 {
- width: var(--rs-space-9);
- height: var(--rs-space-9);
+ width: var(--rs-space-10);
+ height: var(--rs-space-10);
}
.spinner-color-default {
@@ -143,4 +142,4 @@
.spinner-color-attention {
color: var(--rs-color-foreground-attention-primary);
-}
\ No newline at end of file
+}
diff --git a/packages/raystack/components/tabs/tabs.module.css b/packages/raystack/components/tabs/tabs.module.css
index da0fc850e..5b0bc8743 100644
--- a/packages/raystack/components/tabs/tabs.module.css
+++ b/packages/raystack/components/tabs/tabs.module.css
@@ -10,7 +10,7 @@
gap: var(--rs-space-2);
background-color: var(--rs-color-background-neutral-secondary);
padding: var(--rs-space-1);
- border-radius: var(--rs-radius-3);
+ border-radius: var(--rs-radius-2);
width: 100%;
box-shadow: var(--rs-shadow-inset);
}
diff --git a/packages/raystack/components/text-area/text-area.module.css b/packages/raystack/components/text-area/text-area.module.css
index 3dd4781f3..2c822f275 100644
--- a/packages/raystack/components/text-area/text-area.module.css
+++ b/packages/raystack/components/text-area/text-area.module.css
@@ -63,7 +63,6 @@
color: var(--rs-color-foreground-base-primary);
padding: var(--rs-space-3);
transition: all 0.2s ease;
- box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.05);
overflow: hidden;
}
@@ -76,7 +75,6 @@
border-color: var(--rs-color-border-accent-emphasis);
background: var(--rs-color-background-base-primary);
outline: none;
- box-shadow: 0 0 0 2px rgba(var(--rs-color-border-accent-emphasis), 0.2);
}
.textarea::placeholder {
@@ -108,7 +106,6 @@
.error:focus {
border-color: var(--rs-color-border-danger-emphasis-hover);
- box-shadow: 0 0 0 2px rgba(var(--rs-color-border-danger-primary), 0.2);
}
.helperTextError {
diff --git a/packages/raystack/components/toast/toast.module.css b/packages/raystack/components/toast/toast.module.css
index 0f11ccbd7..06bcc2e58 100644
--- a/packages/raystack/components/toast/toast.module.css
+++ b/packages/raystack/components/toast/toast.module.css
@@ -1,9 +1,3 @@
-.raystack-toast [data-sonner-toast] {
- background: var(--rs-color-background-base-primary);
- color: var(--rs-color-foreground-base-primary);
- border: 1px solid var(--rs-color-border-base-primary);
-}
-
.toast-wrapper {
margin-right: var(--rs-space-3);
}
diff --git a/packages/raystack/components/toast/toast.tsx b/packages/raystack/components/toast/toast.tsx
index 12e0b546e..ff6c21851 100644
--- a/packages/raystack/components/toast/toast.tsx
+++ b/packages/raystack/components/toast/toast.tsx
@@ -1,7 +1,7 @@
'use client';
import { ReactNode } from 'react';
-import { Toaster, type ToasterProps, toast as sonnerToast } from 'sonner';
+import { toast as sonnerToast, Toaster, type ToasterProps } from 'sonner';
import { useTheme } from '../theme-provider';
import { UseThemeProps } from '../theme-provider/types';
@@ -16,6 +16,15 @@ const ToastContainer = (props: ToastContainerProps) => {
);
diff --git a/packages/raystack/components/tooltip/tooltip.module.css b/packages/raystack/components/tooltip/tooltip.module.css
index f77836ae3..2794b9fcd 100644
--- a/packages/raystack/components/tooltip/tooltip.module.css
+++ b/packages/raystack/components/tooltip/tooltip.module.css
@@ -10,7 +10,7 @@
padding: var(--rs-space-2) var(--rs-space-3);
border-radius: var(--rs-radius-2);
background: var(--rs-color-background-base-primary);
- border: 1px solid var(--rs-color-border-base-primary);
+ border: 0.5px solid var(--rs-color-border-base-primary);
box-shadow: var(--rs-shadow-soft);
color: var(--rs-color-foreground-base-primary);
font-size: var(--rs-font-size-mini);
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index f4c1bdbd8..4bef7689d 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -108,8 +108,8 @@ importers:
specifier: ^5.0.0
version: 5.0.0
zod:
- specifier: ^3.24.2
- version: 3.25.58
+ specifier: ^4.1.12
+ version: 4.1.12
devDependencies:
'@raystack/tools-config':
specifier: workspace:*