@moderneinc/neo-styled-components 5.0.0-next.78c447 → 5.0.0-next.862835

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.
@@ -21,6 +21,11 @@ type NeoNavigationItemOwnProps = {
21
21
  * @figma Tag
22
22
  */
23
23
  tag?: string;
24
+ /**
25
+ * Hover tooltip shown only when the surrounding NeoSideNav is collapsed
26
+ * (and the label is therefore hidden).
27
+ */
28
+ tooltip?: ReactNode;
24
29
  /**
25
30
  * Slot props for internal sub-components.
26
31
  */
@@ -47,7 +52,7 @@ export type NeoNavigationItemProps<C extends ElementType = typeof ButtonBase> =
47
52
  *
48
53
  * @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system---2025?node-id=8455-6120
49
54
  */
50
- export declare function NeoNavigationItem<C extends ElementType = typeof ButtonBase>({ icon, label, selected, tag, slotProps, children, ...props }: NeoNavigationItemProps<C>): import("react/jsx-runtime").JSX.Element;
55
+ export declare function NeoNavigationItem<C extends ElementType = typeof ButtonBase>({ icon, label, selected, tag, tooltip, slotProps, children, ...props }: NeoNavigationItemProps<C>): import("react/jsx-runtime").JSX.Element;
51
56
  export declare namespace NeoNavigationItem {
52
57
  var displayName: string;
53
58
  }
@@ -0,0 +1,5 @@
1
+ export type NeoSideNavContextValue = {
2
+ collapsed: boolean;
3
+ };
4
+ export declare const NeoSideNavContext: import("react").Context<NeoSideNavContextValue>;
5
+ export declare const useNeoSideNav: () => NeoSideNavContextValue;
@@ -1,6 +1,19 @@
1
- /**
2
- * NeoSideNav
3
- *
4
- * @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC?node-id=4065-3425
5
- */
6
- export declare const NeoSideNav: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
1
+ import { type ComponentPropsWithoutRef, type ReactNode } from 'react';
2
+ export type NeoSideNavProps = {
3
+ /** Controlled collapsed state. */
4
+ collapsed: boolean;
5
+ /** Called with the next collapsed value when the toggle is activated. */
6
+ onCollapsedChange: (next: boolean) => void;
7
+ /** Fixed top slot (e.g. product logo). */
8
+ header?: ReactNode;
9
+ /** Fixed bottom slot (e.g. tenant branding), rendered above the toggle. */
10
+ footer?: ReactNode;
11
+ /** Scrolling content slot — the nav items. */
12
+ children: ReactNode;
13
+ /** Toggle label shown when expanded. Default "Less". */
14
+ collapseLabel?: string;
15
+ } & Pick<ComponentPropsWithoutRef<'nav'>, 'className' | 'id' | 'aria-label'>;
16
+ export declare function NeoSideNav({ collapsed, onCollapsedChange, header, footer, children, collapseLabel, ...rest }: NeoSideNavProps): import("react/jsx-runtime").JSX.Element;
17
+ export declare namespace NeoSideNav {
18
+ var displayName: string;
19
+ }
@@ -1,4 +1,5 @@
1
1
  import { type TooltipProps } from '@mui/material/Tooltip';
2
+ import type { ReactNode } from 'react';
2
3
  /**
3
4
  * Variant type for NeoTooltip
4
5
  */
@@ -14,13 +15,15 @@ export interface NeoTooltipProps extends Omit<TooltipProps, 'title' | 'variant'>
14
15
  */
15
16
  variant?: TooltipVariant;
16
17
  /**
17
- * The main tooltip text
18
+ * The main tooltip content. Accepts a string or any ReactNode, so callers can
19
+ * compose richer content when the `description` variant isn't enough.
18
20
  * @figma text (literal content, not a variant property)
19
21
  */
20
- title: string;
22
+ title: ReactNode;
21
23
  /**
22
- * Optional supporting description text
23
- * When provided, shows a larger tooltip with title (semibold) + description (medium)
24
+ * Optional supporting description text. When provided, shows a larger tooltip
25
+ * with a heading + body hierarchy: title (13px semibold) above a muted
26
+ * description (12px medium).
24
27
  * @default undefined
25
28
  * @figma Supporting text
26
29
  */
@@ -45,7 +48,7 @@ export interface NeoTooltipProps extends Omit<TooltipProps, 'title' | 'variant'>
45
48
  * - Dark: grey[50] (#f9fafb), grey[800] (#1f2937)
46
49
  * - Brand: digitalBlue[800] (#131e7a), typography.tooltip (#ffffff)
47
50
  * - Shadow: neutralMedium (0px 8px 15px 0px rgba(31,41,55,0.1))
48
- * - Typography: fontSize.xs (12), fontWeight.medium (500), fontWeight.semiBold (600)
51
+ * - Typography: fontSize.xs (12), fontSize.caption (13), fontWeight.medium (500), fontWeight.semiBold (600)
49
52
  */
50
53
  export declare const NeoTooltip: {
51
54
  ({ variant, title, description, children, arrow, placement, ...props }: NeoTooltipProps): import("react/jsx-runtime").JSX.Element;
package/dist/index.d.ts CHANGED
@@ -1937,6 +1937,11 @@ type NeoNavigationItemOwnProps = {
1937
1937
  * @figma Tag
1938
1938
  */
1939
1939
  tag?: string;
1940
+ /**
1941
+ * Hover tooltip shown only when the surrounding NeoSideNav is collapsed
1942
+ * (and the label is therefore hidden).
1943
+ */
1944
+ tooltip?: ReactNode;
1940
1945
  /**
1941
1946
  * Slot props for internal sub-components.
1942
1947
  */
@@ -1963,7 +1968,7 @@ type NeoNavigationItemProps<C extends ElementType = typeof ButtonBase__default>
1963
1968
  *
1964
1969
  * @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system---2025?node-id=8455-6120
1965
1970
  */
1966
- declare function NeoNavigationItem<C extends ElementType = typeof ButtonBase__default>({ icon, label, selected, tag, slotProps, children, ...props }: NeoNavigationItemProps<C>): react_jsx_runtime.JSX.Element;
1971
+ declare function NeoNavigationItem<C extends ElementType = typeof ButtonBase__default>({ icon, label, selected, tag, tooltip, slotProps, children, ...props }: NeoNavigationItemProps<C>): react_jsx_runtime.JSX.Element;
1967
1972
  declare namespace NeoNavigationItem {
1968
1973
  var displayName: string;
1969
1974
  }
@@ -2381,12 +2386,24 @@ declare const NeoSelectField: {
2381
2386
 
2382
2387
  type NeoSelectFieldChangeEvent<T = unknown> = SelectChangeEvent<T>;
2383
2388
 
2384
- /**
2385
- * NeoSideNav
2386
- *
2387
- * @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC?node-id=4065-3425
2388
- */
2389
- declare const NeoSideNav: StyledComponent<_mui_system.MUIStyledCommonProps<_mui_material_styles.Theme>, React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
2389
+ type NeoSideNavProps = {
2390
+ /** Controlled collapsed state. */
2391
+ collapsed: boolean;
2392
+ /** Called with the next collapsed value when the toggle is activated. */
2393
+ onCollapsedChange: (next: boolean) => void;
2394
+ /** Fixed top slot (e.g. product logo). */
2395
+ header?: ReactNode;
2396
+ /** Fixed bottom slot (e.g. tenant branding), rendered above the toggle. */
2397
+ footer?: ReactNode;
2398
+ /** Scrolling content slot — the nav items. */
2399
+ children: ReactNode;
2400
+ /** Toggle label shown when expanded. Default "Less". */
2401
+ collapseLabel?: string;
2402
+ } & Pick<ComponentPropsWithoutRef<'nav'>, 'className' | 'id' | 'aria-label'>;
2403
+ declare function NeoSideNav({ collapsed, onCollapsedChange, header, footer, children, collapseLabel, ...rest }: NeoSideNavProps): react_jsx_runtime.JSX.Element;
2404
+ declare namespace NeoSideNav {
2405
+ var displayName: string;
2406
+ }
2390
2407
 
2391
2408
  /**
2392
2409
  * Extended props for NeoSkeleton component
@@ -3053,13 +3070,15 @@ interface NeoTooltipProps extends Omit<TooltipProps, 'title' | 'variant'> {
3053
3070
  */
3054
3071
  variant?: TooltipVariant;
3055
3072
  /**
3056
- * The main tooltip text
3073
+ * The main tooltip content. Accepts a string or any ReactNode, so callers can
3074
+ * compose richer content when the `description` variant isn't enough.
3057
3075
  * @figma text (literal content, not a variant property)
3058
3076
  */
3059
- title: string;
3077
+ title: ReactNode;
3060
3078
  /**
3061
- * Optional supporting description text
3062
- * When provided, shows a larger tooltip with title (semibold) + description (medium)
3079
+ * Optional supporting description text. When provided, shows a larger tooltip
3080
+ * with a heading + body hierarchy: title (13px semibold) above a muted
3081
+ * description (12px medium).
3063
3082
  * @default undefined
3064
3083
  * @figma Supporting text
3065
3084
  */
@@ -3084,7 +3103,7 @@ interface NeoTooltipProps extends Omit<TooltipProps, 'title' | 'variant'> {
3084
3103
  * - Dark: grey[50] (#f9fafb), grey[800] (#1f2937)
3085
3104
  * - Brand: digitalBlue[800] (#131e7a), typography.tooltip (#ffffff)
3086
3105
  * - Shadow: neutralMedium (0px 8px 15px 0px rgba(31,41,55,0.1))
3087
- * - Typography: fontSize.xs (12), fontWeight.medium (500), fontWeight.semiBold (600)
3106
+ * - Typography: fontSize.xs (12), fontSize.caption (13), fontWeight.medium (500), fontWeight.semiBold (600)
3088
3107
  */
3089
3108
  declare const NeoTooltip: {
3090
3109
  ({ variant, title, description, children, arrow, placement, ...props }: NeoTooltipProps): react_jsx_runtime.JSX.Element;
@@ -3377,4 +3396,4 @@ declare module '@mui/x-data-grid-pro' {
3377
3396
  declare const version: string
3378
3397
 
3379
3398
  export { ActivityScene, CIRCLE_RADIUS, NeoActionsCell, NeoActivityHeader, NeoActivityIndicatorCell, NeoAlert, NeoAvatarCell, NeoBadge, NeoBanner, NeoBreadcrumbLink, NeoBreadcrumbs, NeoButton, NeoButtonTab, NeoButtonTabGroup, NeoCard, NeoCheckbox, NeoCheckboxWithText, NeoCodeSnippet, NeoDataGrid, NeoDataGridCellContent, NeoDataGridColumnsButton, NeoDataGridColumnsPanel, NeoDataGridFilterPanel, NeoDataGridFilterPanelAddIcon, NeoDataGridFilterPanelDeleteIcon, NeoDataGridFilterPanelRemoveAllIcon, NeoDataGridFiltersButton, NeoDataGridHeaderLabel, NeoSelect as NeoDataGridSelect, NeoDatePicker, NeoDatePickerListItem, NeoDatePickerMenu, NeoDivider, NeoDot, NeoDownloadToast, NeoSelect as NeoDropdown, NeoMenu as NeoDropdownMenu, NeoMenuItem as NeoDropdownMenuItem, NeoMenuItem as NeoDropdownOption, NeoFilterChip, NeoFooter, NeoGeneralAvatar, NeoIconButton, NeoIconCell, NeoInfiniteScrollGrid, NeoInputField, NeoListItem, NeoListItemButton, NeoLoadingSpinner, NeoLogoCell, NeoMenu, NeoMenuItem, NeoModal, NeoModalContent, NeoModalFooter, NeoModalHeader, NeoMultiBadgesCell, NeoNavigationAvatar, NeoNavigationItem, NeoPageContent, NeoPaginatedGrid, NeoProgressCell, NeoProgressbar, NeoQuickFilter, NeoRadio, NeoRadioButtonWithText, NeoSearchChip, NeoSelect, NeoSelectField, NeoMenuItem as NeoSelectOption, NeoSideNav, NeoSkeleton, NeoStatusBadgeCell, NeoStatusCell, NeoTab, NeoTabPanel, NeoTable, NeoTabs, NeoTag, NeoToast, NeoToastButton, NeoToggle, NeoToggleButton, NeoToggleButtonGroup, NeoToggleButtonWithText, NeoToolbar, NeoTooltip, NeoTopNav, NeoTourModal, NeoTreeItem, NeoTreeView, StyledToggleButton as NeoTypologyButton, NeoTypologyControl, NeoUserAvatarCell, SortedAscendingIcon, SortedDescendingIcon, UnsortedIcon, focusRingStyles, getDataGridHeaderStyles, getDataGridRowStyles, version };
3380
- export type { ActivityColor, ActivityEvent, ActivityHeaderSize, BreadcrumbItem, DataGridSize, NeoActionsCellProps, NeoActivityHeaderProps, NeoActivityIndicatorCellProps, NeoAlertProps, NeoAvatarCellProps, NeoBadgeProps, NeoBannerProps, NeoBreadcrumbLinkProps, NeoBreadcrumbsProps, NeoButtonProps, NeoButtonTabGroupProps, NeoButtonTabProps, NeoCardLargeProps, NeoCardProps, NeoCardSize, NeoCardSmallProps, NeoCheckboxProps, NeoCheckboxWithTextProps, NeoCodeSnippetProps, NeoDataGridCellContentProps, NeoDataGridHeaderLabelProps, NeoDataGridProps, NeoDatePickerProps, NeoDividerProps, NeoDotProps, NeoDownloadToastProps, NeoMenuItemProps as NeoDropdownMenuItemProps, NeoMenuProps as NeoDropdownMenuProps, NeoSelectProps as NeoDropdownProps, NeoFilterChipProps, NeoFooterProps, NeoGeneralAvatarProps, NeoIconButtonProps, NeoIconCellProps, NeoInfiniteScrollGridProps, NeoInputFieldProps, NeoListItemButtonProps, NeoListItemProps, NeoLoadingSpinnerProps, NeoLogoCellProps, NeoMenuItemProps, NeoMenuProps, NeoModalContentProps, NeoModalFooterProps, NeoModalHeaderProps, NeoModalProps, NeoMultiBadgesCellProps, NeoNavigationAvatarProps, NeoNavigationItemProps, NeoPageContentProps, NeoPaginatedGridProps, NeoProgressCellProps, NeoProgressbarProps, NeoQuickFilterProps, NeoRadioProps, NeoSearchChipProps, NeoSelectFieldChangeEvent, NeoSelectFieldOption, NeoSelectFieldProps, NeoSelectProps, NeoSkeletonProps, NeoStatusBadgeCellProps, NeoStatusCellProps, NeoStatusCellVariant, NeoTabPanelProps, NeoTabProps, NeoTableColumn, NeoTableProps, NeoTagProps, NeoToastProps, NeoToggleButtonGroupProps, NeoToggleButtonProps, NeoToggleProps, NeoToolbarProps, NeoTooltipProps, NeoTreeItemData, NeoTreeItemProps, NeoTreeViewProps, NeoTypologyControlProps, NeoUserAvatarCellProps };
3399
+ export type { ActivityColor, ActivityEvent, ActivityHeaderSize, BreadcrumbItem, DataGridSize, NeoActionsCellProps, NeoActivityHeaderProps, NeoActivityIndicatorCellProps, NeoAlertProps, NeoAvatarCellProps, NeoBadgeProps, NeoBannerProps, NeoBreadcrumbLinkProps, NeoBreadcrumbsProps, NeoButtonProps, NeoButtonTabGroupProps, NeoButtonTabProps, NeoCardLargeProps, NeoCardProps, NeoCardSize, NeoCardSmallProps, NeoCheckboxProps, NeoCheckboxWithTextProps, NeoCodeSnippetProps, NeoDataGridCellContentProps, NeoDataGridHeaderLabelProps, NeoDataGridProps, NeoDatePickerProps, NeoDividerProps, NeoDotProps, NeoDownloadToastProps, NeoMenuItemProps as NeoDropdownMenuItemProps, NeoMenuProps as NeoDropdownMenuProps, NeoSelectProps as NeoDropdownProps, NeoFilterChipProps, NeoFooterProps, NeoGeneralAvatarProps, NeoIconButtonProps, NeoIconCellProps, NeoInfiniteScrollGridProps, NeoInputFieldProps, NeoListItemButtonProps, NeoListItemProps, NeoLoadingSpinnerProps, NeoLogoCellProps, NeoMenuItemProps, NeoMenuProps, NeoModalContentProps, NeoModalFooterProps, NeoModalHeaderProps, NeoModalProps, NeoMultiBadgesCellProps, NeoNavigationAvatarProps, NeoNavigationItemProps, NeoPageContentProps, NeoPaginatedGridProps, NeoProgressCellProps, NeoProgressbarProps, NeoQuickFilterProps, NeoRadioProps, NeoSearchChipProps, NeoSelectFieldChangeEvent, NeoSelectFieldOption, NeoSelectFieldProps, NeoSelectProps, NeoSideNavProps, NeoSkeletonProps, NeoStatusBadgeCellProps, NeoStatusCellProps, NeoStatusCellVariant, NeoTabPanelProps, NeoTabProps, NeoTableColumn, NeoTableProps, NeoTagProps, NeoToastProps, NeoToggleButtonGroupProps, NeoToggleButtonProps, NeoToggleProps, NeoToolbarProps, NeoTooltipProps, NeoTreeItemData, NeoTreeItemProps, NeoTreeViewProps, NeoTypologyControlProps, NeoUserAvatarCellProps };