@moderneinc/neo-styled-components 2.0.3 → 2.1.0-next.1c3b0f

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.
@@ -1,5 +1,5 @@
1
1
  import { type LinkProps } from '@mui/material/Link';
2
- import type { ReactNode } from 'react';
2
+ import type { ElementType, ReactNode } from 'react';
3
3
  /**
4
4
  * NeoBreadcrumbs - Navigation breadcrumb component
5
5
  *
@@ -26,6 +26,8 @@ export interface NeoBreadcrumbLinkProps extends Omit<LinkProps, 'color'> {
26
26
  current?: boolean;
27
27
  /** Link content */
28
28
  children: ReactNode;
29
+ /** Custom link component for client-side navigation (e.g., Next.js Link) */
30
+ component?: ElementType;
29
31
  }
30
32
  /**
31
33
  * NeoBreadcrumbLink - Individual breadcrumb link
@@ -42,7 +44,7 @@ export interface NeoBreadcrumbLinkProps extends Omit<LinkProps, 'color'> {
42
44
  * </NeoBreadcrumbs>
43
45
  * ```
44
46
  */
45
- export declare function NeoBreadcrumbLink({ current, children, ...props }: NeoBreadcrumbLinkProps): import("react/jsx-runtime").JSX.Element;
47
+ export declare function NeoBreadcrumbLink({ current, children, component, ...props }: NeoBreadcrumbLinkProps): import("react/jsx-runtime").JSX.Element;
46
48
  /**
47
49
  * NeoBreadcrumbs - Navigation breadcrumb component
48
50
  *
@@ -37,6 +37,10 @@ export interface NeoButtonProps extends Omit<ButtonBaseProps, 'children'> {
37
37
  * Button content
38
38
  */
39
39
  children?: ReactNode;
40
+ /**
41
+ * URL to link to. When provided, the button renders as a link element.
42
+ */
43
+ href?: string;
40
44
  }
41
45
  /**
42
46
  * NeoButton - Text button component based on MUI ButtonBase
@@ -47,6 +47,12 @@ export interface NeoListItemProps extends Omit<ListItemButtonProps, 'children' |
47
47
  * @figma state="link"
48
48
  */
49
49
  isLink?: boolean;
50
+ /**
51
+ * Trailing element (optional, e.g., chevron icon for navigation)
52
+ * Renders at the end of the list item, typically used for navigation indicators.
53
+ * @figma Chevron icon for link variant
54
+ */
55
+ trailingElement?: ReactNode;
50
56
  }
51
57
  /**
52
58
  * NeoListItem - Flexible list item component with multiple size variants and states
@@ -62,6 +68,7 @@ export interface NeoListItemProps extends Omit<ListItemButtonProps, 'children' |
62
68
  * - state (default|active|disabled|link) → selected, disabled, isLink props
63
69
  * - showIcon → icon prop (pass ReactNode)
64
70
  * - showSupportingText → secondaryText prop (pass ReactNode)
71
+ * - showChevron → trailingElement prop (pass ReactNode, e.g., ChevronRight icon)
65
72
  * - Placeholder → primaryText prop
66
73
  * - Recipe name → secondaryText prop
67
74
  * - (# recipes) → badge prop
@@ -79,6 +86,6 @@ export interface NeoListItemProps extends Omit<ListItemButtonProps, 'children' |
79
86
  * - semanticColors.buttons.tertiary.disabled (disabled text color)
80
87
  */
81
88
  export declare const NeoListItem: {
82
- ({ size, primaryText, secondaryText, badge, icon, isLink, component, ...props }: NeoListItemProps): import("react/jsx-runtime").JSX.Element;
89
+ ({ size, primaryText, secondaryText, badge, icon, isLink, trailingElement, component, ...props }: NeoListItemProps): import("react/jsx-runtime").JSX.Element;
83
90
  displayName: string;
84
91
  };
@@ -65,9 +65,12 @@ export interface NeoMarketplaceCardProps extends Omit<CardProps, 'children'> {
65
65
  * - Property 1="Default" → Base state (no props)
66
66
  *
67
67
  * Design Tokens Used:
68
- * - semanticColors.surfaces.card (#FFFFFF) - Card background
68
+ * - semanticColors.surfaces.card (#FFFFFF) - Default card background
69
+ * - semanticColors.status.info.light (#f2f3ff) - Active/focused card background
69
70
  * - semanticColors.border.card (#d1d5db) - Default border
70
71
  * - semanticColors.border.tabActive (#2f42ff) - Active/focused border
72
+ * - shadows.focusWhite1 - Inner white focus ring (2px spread)
73
+ * - shadows.focusBlue2 - Outer blue focus ring (4px spread)
71
74
  * - colors.grey[800] (#1F2937) - Text color
72
75
  * - typography.fontSize.xxs (10px) - Recipe count
73
76
  * - typography.fontSize.xs (12px) - Description
@@ -1,6 +1,24 @@
1
1
  import type { BoxProps } from '@mui/material/Box';
2
2
  import type { Breakpoint } from '@mui/material/styles';
3
- import { type ReactNode } from 'react';
3
+ import type { ElementType, ReactNode } from 'react';
4
+ /**
5
+ * Breadcrumb item configuration
6
+ */
7
+ export interface BreadcrumbItem {
8
+ /** Link label */
9
+ label: ReactNode;
10
+ /** Link href (omit for current/last item) */
11
+ href?: string;
12
+ }
13
+ /**
14
+ * Breadcrumb configuration with link component and items
15
+ */
16
+ export interface BreadcrumbConfig {
17
+ /** Custom link component for client-side navigation (e.g., Next.js Link) */
18
+ linkComponent?: ElementType;
19
+ /** Breadcrumb items */
20
+ items: BreadcrumbItem[];
21
+ }
4
22
  export interface NeoPageContentProps extends BoxProps {
5
23
  /**
6
24
  * Main heading displayed on the page
@@ -12,6 +30,23 @@ export interface NeoPageContentProps extends BoxProps {
12
30
  * Optional subtitle displayed below the page title
13
31
  */
14
32
  subtitle?: ReactNode | string;
33
+ /**
34
+ * Optional breadcrumbs navigation displayed above the page title.
35
+ * Last item is automatically marked as current.
36
+ *
37
+ * @example
38
+ * ```tsx
39
+ * breadcrumbs={{
40
+ * linkComponent: NextLink,
41
+ * items: [
42
+ * { label: 'Settings', href: '/settings' },
43
+ * { label: 'Team', href: '/team' },
44
+ * { label: 'Team Details' },
45
+ * ]
46
+ * }}
47
+ * ```
48
+ */
49
+ breadcrumbs?: BreadcrumbConfig;
15
50
  /**
16
51
  * Action button displayed in the top-right corner
17
52
  *
@@ -28,6 +63,11 @@ export interface NeoPageContentProps extends BoxProps {
28
63
  * @default false
29
64
  */
30
65
  contentMaxWidth?: Breakpoint | false;
66
+ /**
67
+ * Center content when using contentMaxWidth
68
+ * @default true
69
+ */
70
+ centerContent?: boolean;
31
71
  /**
32
72
  * Disable gutters/padding
33
73
  * @default false
@@ -103,7 +143,7 @@ export interface NeoPageContentProps extends BoxProps {
103
143
  * </NeoPageContent>
104
144
  * ```
105
145
  */
106
- export declare function NeoPageContent({ pageTitle, subtitle, action, sticky, contentMaxWidth, disableGutters, isLoading, showBackToTop, children, sx, ...boxProps }: NeoPageContentProps): import("react/jsx-runtime").JSX.Element;
146
+ export declare function NeoPageContent({ pageTitle, subtitle, breadcrumbs, action, sticky, contentMaxWidth, centerContent, disableGutters, isLoading, showBackToTop, children, sx, ...boxProps }: NeoPageContentProps): import("react/jsx-runtime").JSX.Element;
107
147
  export declare namespace NeoPageContent {
108
148
  var displayName: string;
109
149
  }
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import * as React$1 from 'react';
3
- import React__default, { ReactNode, HTMLAttributes, ComponentType } from 'react';
3
+ import React__default, { ReactNode, ElementType, HTMLAttributes, ComponentType } from 'react';
4
4
  import { GridDensity, GridFilterPanel } from '@mui/x-data-grid';
5
5
  import { AvatarProps } from '@mui/material/Avatar';
6
6
  import { ChipProps } from '@mui/material/Chip';
@@ -444,6 +444,8 @@ interface NeoBreadcrumbLinkProps extends Omit<LinkProps, 'color'> {
444
444
  current?: boolean;
445
445
  /** Link content */
446
446
  children: ReactNode;
447
+ /** Custom link component for client-side navigation (e.g., Next.js Link) */
448
+ component?: ElementType;
447
449
  }
448
450
  /**
449
451
  * NeoBreadcrumbLink - Individual breadcrumb link
@@ -460,7 +462,7 @@ interface NeoBreadcrumbLinkProps extends Omit<LinkProps, 'color'> {
460
462
  * </NeoBreadcrumbs>
461
463
  * ```
462
464
  */
463
- declare function NeoBreadcrumbLink({ current, children, ...props }: NeoBreadcrumbLinkProps): react_jsx_runtime.JSX.Element;
465
+ declare function NeoBreadcrumbLink({ current, children, component, ...props }: NeoBreadcrumbLinkProps): react_jsx_runtime.JSX.Element;
464
466
  /**
465
467
  * NeoBreadcrumbs - Navigation breadcrumb component
466
468
  *
@@ -515,6 +517,10 @@ interface NeoButtonProps extends Omit<ButtonBaseProps, 'children'> {
515
517
  * Button content
516
518
  */
517
519
  children?: ReactNode;
520
+ /**
521
+ * URL to link to. When provided, the button renders as a link element.
522
+ */
523
+ href?: string;
518
524
  }
519
525
  /**
520
526
  * NeoButton - Text button component based on MUI ButtonBase
@@ -1596,6 +1602,24 @@ declare const NeoModalFooter: {
1596
1602
  displayName: string;
1597
1603
  };
1598
1604
 
1605
+ /**
1606
+ * Breadcrumb item configuration
1607
+ */
1608
+ interface BreadcrumbItem {
1609
+ /** Link label */
1610
+ label: ReactNode;
1611
+ /** Link href (omit for current/last item) */
1612
+ href?: string;
1613
+ }
1614
+ /**
1615
+ * Breadcrumb configuration with link component and items
1616
+ */
1617
+ interface BreadcrumbConfig {
1618
+ /** Custom link component for client-side navigation (e.g., Next.js Link) */
1619
+ linkComponent?: ElementType;
1620
+ /** Breadcrumb items */
1621
+ items: BreadcrumbItem[];
1622
+ }
1599
1623
  interface NeoPageContentProps extends BoxProps {
1600
1624
  /**
1601
1625
  * Main heading displayed on the page
@@ -1607,6 +1631,23 @@ interface NeoPageContentProps extends BoxProps {
1607
1631
  * Optional subtitle displayed below the page title
1608
1632
  */
1609
1633
  subtitle?: ReactNode | string;
1634
+ /**
1635
+ * Optional breadcrumbs navigation displayed above the page title.
1636
+ * Last item is automatically marked as current.
1637
+ *
1638
+ * @example
1639
+ * ```tsx
1640
+ * breadcrumbs={{
1641
+ * linkComponent: NextLink,
1642
+ * items: [
1643
+ * { label: 'Settings', href: '/settings' },
1644
+ * { label: 'Team', href: '/team' },
1645
+ * { label: 'Team Details' },
1646
+ * ]
1647
+ * }}
1648
+ * ```
1649
+ */
1650
+ breadcrumbs?: BreadcrumbConfig;
1610
1651
  /**
1611
1652
  * Action button displayed in the top-right corner
1612
1653
  *
@@ -1623,6 +1664,11 @@ interface NeoPageContentProps extends BoxProps {
1623
1664
  * @default false
1624
1665
  */
1625
1666
  contentMaxWidth?: Breakpoint | false;
1667
+ /**
1668
+ * Center content when using contentMaxWidth
1669
+ * @default true
1670
+ */
1671
+ centerContent?: boolean;
1626
1672
  /**
1627
1673
  * Disable gutters/padding
1628
1674
  * @default false
@@ -1698,7 +1744,7 @@ interface NeoPageContentProps extends BoxProps {
1698
1744
  * </NeoPageContent>
1699
1745
  * ```
1700
1746
  */
1701
- declare function NeoPageContent({ pageTitle, subtitle, action, sticky, contentMaxWidth, disableGutters, isLoading, showBackToTop, children, sx, ...boxProps }: NeoPageContentProps): react_jsx_runtime.JSX.Element;
1747
+ declare function NeoPageContent({ pageTitle, subtitle, breadcrumbs, action, sticky, contentMaxWidth, centerContent, disableGutters, isLoading, showBackToTop, children, sx, ...boxProps }: NeoPageContentProps): react_jsx_runtime.JSX.Element;
1702
1748
  declare namespace NeoPageContent {
1703
1749
  var displayName: string;
1704
1750
  }
@@ -2291,6 +2337,12 @@ interface NeoListItemProps extends Omit<ListItemButtonProps, 'children' | 'size'
2291
2337
  * @figma state="link"
2292
2338
  */
2293
2339
  isLink?: boolean;
2340
+ /**
2341
+ * Trailing element (optional, e.g., chevron icon for navigation)
2342
+ * Renders at the end of the list item, typically used for navigation indicators.
2343
+ * @figma Chevron icon for link variant
2344
+ */
2345
+ trailingElement?: ReactNode;
2294
2346
  }
2295
2347
  /**
2296
2348
  * NeoListItem - Flexible list item component with multiple size variants and states
@@ -2306,6 +2358,7 @@ interface NeoListItemProps extends Omit<ListItemButtonProps, 'children' | 'size'
2306
2358
  * - state (default|active|disabled|link) → selected, disabled, isLink props
2307
2359
  * - showIcon → icon prop (pass ReactNode)
2308
2360
  * - showSupportingText → secondaryText prop (pass ReactNode)
2361
+ * - showChevron → trailingElement prop (pass ReactNode, e.g., ChevronRight icon)
2309
2362
  * - Placeholder → primaryText prop
2310
2363
  * - Recipe name → secondaryText prop
2311
2364
  * - (# recipes) → badge prop
@@ -2323,7 +2376,7 @@ interface NeoListItemProps extends Omit<ListItemButtonProps, 'children' | 'size'
2323
2376
  * - semanticColors.buttons.tertiary.disabled (disabled text color)
2324
2377
  */
2325
2378
  declare const NeoListItem: {
2326
- ({ size, primaryText, secondaryText, badge, icon, isLink, component, ...props }: NeoListItemProps): react_jsx_runtime.JSX.Element;
2379
+ ({ size, primaryText, secondaryText, badge, icon, isLink, trailingElement, component, ...props }: NeoListItemProps): react_jsx_runtime.JSX.Element;
2327
2380
  displayName: string;
2328
2381
  };
2329
2382
 
@@ -2533,9 +2586,12 @@ interface NeoMarketplaceCardProps extends Omit<CardProps, 'children'> {
2533
2586
  * - Property 1="Default" → Base state (no props)
2534
2587
  *
2535
2588
  * Design Tokens Used:
2536
- * - semanticColors.surfaces.card (#FFFFFF) - Card background
2589
+ * - semanticColors.surfaces.card (#FFFFFF) - Default card background
2590
+ * - semanticColors.status.info.light (#f2f3ff) - Active/focused card background
2537
2591
  * - semanticColors.border.card (#d1d5db) - Default border
2538
2592
  * - semanticColors.border.tabActive (#2f42ff) - Active/focused border
2593
+ * - shadows.focusWhite1 - Inner white focus ring (2px spread)
2594
+ * - shadows.focusBlue2 - Outer blue focus ring (4px spread)
2539
2595
  * - colors.grey[800] (#1F2937) - Text color
2540
2596
  * - typography.fontSize.xxs (10px) - Recipe count
2541
2597
  * - typography.fontSize.xs (12px) - Description
@@ -2702,4 +2758,4 @@ declare module '@mui/x-data-grid-pro' {
2702
2758
  declare const version: string
2703
2759
 
2704
2760
  export { ActivityScene, CIRCLE_RADIUS, NeoActivityHeader, NeoActivityIndicatorCell, NeoAvatar, NeoBadge, NeoBanner, NeoBreadcrumbLink, NeoBreadcrumbs, NeoButton, NeoButtonGroup, NeoCheckbox, NeoCodeSnippet, NeoDataGrid, NeoDataGridCellContent, NeoDataGridColumnsButton, NeoDataGridColumnsPanel, NeoDataGridFilterPanel, NeoDataGridFilterPanelAddIcon, NeoDataGridFilterPanelDeleteIcon, NeoDataGridFilterPanelRemoveAllIcon, NeoDataGridFiltersButton, NeoDataGridHeaderLabel, NeoSelect as NeoDataGridSelect, NeoDatePicker, NeoDivider, NeoDot, NeoFooter, NeoIconButton, NeoInfiniteScrollGrid, NeoInputField, NeoListItem, NeoListItemButton, NeoLoadingSpinner, NeoMarketplaceCard, NeoMenu, NeoMenuItem, NeoModal, NeoModalContent, NeoModalFooter, NeoModalHeader, NeoMultiBadgesCell, NeoPageContent, NeoPaginatedGrid, NeoProgressbar, NeoQuickFilter, NeoRadio, NeoSelect, NeoMenuItem as NeoSelectOption, NeoSkeleton, NeoStatusBadgeCell, NeoStatusBanner, NeoTab, NeoTabs, NeoTag, NeoToast, NeoToastButton, NeoToggle, NeoToolbar, NeoTooltip, StyledToggleButton as NeoTypologyButton, NeoTypologyControl, NeoUserAvatarCell, SortedAscendingIcon, SortedDescendingIcon, UnsortedIcon, getDataGridHeaderStyles, version };
2705
- export type { ActivityColor, ActivityEvent, ActivityHeaderSize, DataGridSize, NeoActivityHeaderProps, NeoActivityIndicatorCellProps, NeoAvatarProps, NeoBadgeProps, NeoBannerProps, NeoBreadcrumbLinkProps, NeoBreadcrumbsProps, NeoButtonGroupProps, NeoButtonProps, NeoCheckboxProps, NeoCodeSnippetProps, NeoDataGridCellContentProps, NeoDataGridHeaderLabelProps, NeoDataGridProps, NeoDatePickerProps, NeoDividerProps, NeoDotProps, NeoFooterProps, NeoIconButtonProps, NeoInfiniteScrollGridProps, NeoInputFieldProps, NeoListItemButtonProps, NeoListItemProps, NeoLoadingSpinnerProps, NeoMarketplaceCardProps, NeoMenuItemProps, NeoMenuProps, NeoModalContentProps, NeoModalFooterProps, NeoModalHeaderProps, NeoModalProps, NeoMultiBadgesCellProps, NeoPageContentProps, NeoPaginatedGridProps, NeoProgressbarProps, NeoQuickFilterProps, NeoRadioProps, NeoSelectProps, NeoSkeletonProps, NeoStatusBadgeCellProps, NeoStatusBannerProps, NeoTabProps, NeoTagProps, NeoToastProps, NeoToggleProps, NeoToolbarProps, NeoTooltipProps, NeoTypologyControlProps, NeoUserAvatarCellProps };
2761
+ export type { ActivityColor, ActivityEvent, ActivityHeaderSize, BreadcrumbItem, DataGridSize, NeoActivityHeaderProps, NeoActivityIndicatorCellProps, NeoAvatarProps, NeoBadgeProps, NeoBannerProps, NeoBreadcrumbLinkProps, NeoBreadcrumbsProps, NeoButtonGroupProps, NeoButtonProps, NeoCheckboxProps, NeoCodeSnippetProps, NeoDataGridCellContentProps, NeoDataGridHeaderLabelProps, NeoDataGridProps, NeoDatePickerProps, NeoDividerProps, NeoDotProps, NeoFooterProps, NeoIconButtonProps, NeoInfiniteScrollGridProps, NeoInputFieldProps, NeoListItemButtonProps, NeoListItemProps, NeoLoadingSpinnerProps, NeoMarketplaceCardProps, NeoMenuItemProps, NeoMenuProps, NeoModalContentProps, NeoModalFooterProps, NeoModalHeaderProps, NeoModalProps, NeoMultiBadgesCellProps, NeoPageContentProps, NeoPaginatedGridProps, NeoProgressbarProps, NeoQuickFilterProps, NeoRadioProps, NeoSelectProps, NeoSkeletonProps, NeoStatusBadgeCellProps, NeoStatusBannerProps, NeoTabProps, NeoTagProps, NeoToastProps, NeoToggleProps, NeoToolbarProps, NeoTooltipProps, NeoTypologyControlProps, NeoUserAvatarCellProps };