@moderneinc/neo-styled-components 2.5.0 → 2.6.0
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/ActivityHeader/ActivityHeader.d.ts +1 -0
- package/dist/Avatar/Avatar.d.ts +2 -1
- package/dist/Badge/Badge.d.ts +3 -3
- package/dist/Button/Button.d.ts +22 -10
- package/dist/ButtonGroup/ButtonGroup.d.ts +0 -1
- package/dist/CodeSnippet/CodeSnippet.d.ts +4 -4
- package/dist/FilterChip/FilterChip.d.ts +42 -0
- package/dist/Footer/Footer.d.ts +6 -1
- package/dist/IconWrapper/IconWrapper.d.ts +23 -0
- package/dist/ListItemButton/ListItemButton.d.ts +5 -4
- package/dist/MarketplaceCard/MarketplaceCard.d.ts +7 -6
- package/dist/MarketplaceLargeCard/MarketplaceLargeCard.d.ts +91 -0
- package/dist/MenuItem/MenuItem.d.ts +4 -2
- package/dist/NavigationItem/NavigationItem.d.ts +36 -0
- package/dist/SearchChip/SearchChip.d.ts +19 -0
- package/dist/StatusBanner/StatusBanner.d.ts +6 -5
- package/dist/Tag/Tag.d.ts +4 -3
- package/dist/Tree/Tree.d.ts +31 -15
- package/dist/index.d.ts +205 -43
- package/dist/index.esm.js +827 -199
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +847 -212
- package/dist/index.js.map +1 -1
- package/dist/utils/focusRing.d.ts +10 -0
- package/package.json +27 -5
- package/dist/LargeCard/LargeCard.d.ts +0 -26
|
@@ -34,6 +34,7 @@ export interface NeoActivityHeaderProps {
|
|
|
34
34
|
*
|
|
35
35
|
* **Figma Props Mapping:**
|
|
36
36
|
* - `Size` (Figma) → `size` (React): Height variant matching DataGrid sizes
|
|
37
|
+
* - `Type` (Figma) → `color` (React): Activity type (Commit Job → commitJob, Recipe Run → recipeRun, Visualization → visualization)
|
|
37
38
|
*
|
|
38
39
|
* **Design Tokens:**
|
|
39
40
|
* - `semanticColors.activity.commitJob` - Blue dot for commit job events (#2F42FF)
|
package/dist/Avatar/Avatar.d.ts
CHANGED
|
@@ -20,8 +20,9 @@ export interface NeoAvatarProps extends Omit<AvatarProps, 'variant'> {
|
|
|
20
20
|
*
|
|
21
21
|
* Figma Props Mapping:
|
|
22
22
|
* - Figma Type "Initials" → variant="initials", size="small" (20px)
|
|
23
|
-
* - Figma Type "Small" → variant="circular", size="small" (
|
|
23
|
+
* - Figma Type "Small" → variant="circular", size="small" (32px with image)
|
|
24
24
|
* - Figma Type "Medium" → variant="circular", size="medium" (44px white container with image)
|
|
25
|
+
* - State: Focus → CSS :focus-visible ring (2px white inner + 4px blue outer)
|
|
25
26
|
* - State: Hover (tooltip) → Wrap component with MUI Tooltip
|
|
26
27
|
*
|
|
27
28
|
* Usage:
|
package/dist/Badge/Badge.d.ts
CHANGED
|
@@ -12,9 +12,9 @@ export interface NeoBadgeProps extends Omit<ChipProps, 'variant' | 'size'> {
|
|
|
12
12
|
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system-w--correct-set-of-tokens?node-id=4091-17230
|
|
13
13
|
*
|
|
14
14
|
* Figma Props Mapping:
|
|
15
|
-
* -
|
|
16
|
-
* -
|
|
17
|
-
* -
|
|
15
|
+
* - Intent (Neutral|Error|Warning|Success|Info) → color (default|error|warning|success|info)
|
|
16
|
+
* - LeadingIcon → icon prop (pass React element)
|
|
17
|
+
* - TrailingIcon → deleteIcon prop (pass React element)
|
|
18
18
|
* - Label → label prop
|
|
19
19
|
*/
|
|
20
20
|
export declare const NeoBadge: {
|
package/dist/Button/Button.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import ButtonBase from '@mui/material/ButtonBase';
|
|
2
|
+
import React, { type ElementType, type ReactNode } from 'react';
|
|
3
3
|
declare module '@mui/material/ButtonBase' {
|
|
4
4
|
interface ButtonBasePropsVariantOverrides {
|
|
5
5
|
primary: true;
|
|
@@ -7,11 +7,12 @@ declare module '@mui/material/ButtonBase' {
|
|
|
7
7
|
destructive: true;
|
|
8
8
|
link: true;
|
|
9
9
|
linkColor: true;
|
|
10
|
+
tertiary: true;
|
|
10
11
|
}
|
|
11
12
|
}
|
|
12
|
-
type ButtonVariant = 'primary' | 'secondary' | 'destructive' | 'link' | 'linkColor';
|
|
13
|
+
type ButtonVariant = 'primary' | 'secondary' | 'destructive' | 'link' | 'linkColor' | 'tertiary';
|
|
13
14
|
type ButtonSize = 'small' | 'medium';
|
|
14
|
-
|
|
15
|
+
type NeoButtonOwnProps = {
|
|
15
16
|
/**
|
|
16
17
|
* The visual variant of the button
|
|
17
18
|
* @default "primary"
|
|
@@ -41,14 +42,25 @@ export interface NeoButtonProps extends Omit<ButtonBaseProps, 'children'> {
|
|
|
41
42
|
* URL to link to. When provided, the button renders as a link element.
|
|
42
43
|
*/
|
|
43
44
|
href?: string;
|
|
44
|
-
|
|
45
|
+
/**
|
|
46
|
+
* Icon placed before the button label
|
|
47
|
+
*/
|
|
48
|
+
startIcon?: ReactNode;
|
|
49
|
+
/**
|
|
50
|
+
* Icon placed after the button label
|
|
51
|
+
*/
|
|
52
|
+
endIcon?: ReactNode;
|
|
53
|
+
};
|
|
54
|
+
export type NeoButtonProps<C extends ElementType = typeof ButtonBase> = NeoButtonOwnProps & Omit<React.ComponentPropsWithoutRef<C>, keyof NeoButtonOwnProps> & {
|
|
55
|
+
component?: C;
|
|
56
|
+
};
|
|
45
57
|
/**
|
|
46
58
|
* NeoButton - Text button component based on MUI ButtonBase
|
|
47
59
|
*
|
|
48
60
|
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system---2025?node-id=4086-7590
|
|
49
61
|
*
|
|
50
62
|
* Figma Props Mapping:
|
|
51
|
-
* - Hierarchy (Primary|Secondary|Destructive|Link|Link Color) → variant prop
|
|
63
|
+
* - Hierarchy (Primary|Secondary|Destructive|Link|Link Color|Tertiary) → variant prop
|
|
52
64
|
* - Size (Small|Medium) → size prop
|
|
53
65
|
* - State=Disabled → disabled prop
|
|
54
66
|
* - State=Loading → loading prop
|
|
@@ -56,8 +68,8 @@ export interface NeoButtonProps extends Omit<ButtonBaseProps, 'children'> {
|
|
|
56
68
|
* - State=Pressed → CSS :active
|
|
57
69
|
* - State=Focused → CSS :focus-visible
|
|
58
70
|
*/
|
|
59
|
-
export declare
|
|
60
|
-
|
|
61
|
-
displayName: string;
|
|
62
|
-
}
|
|
71
|
+
export declare function NeoButton<C extends ElementType = typeof ButtonBase>({ variant, size, loading, children, disabled, startIcon, endIcon, ...rest }: NeoButtonProps<C>): import("react/jsx-runtime").JSX.Element;
|
|
72
|
+
export declare namespace NeoButton {
|
|
73
|
+
var displayName: string;
|
|
74
|
+
}
|
|
63
75
|
export {};
|
|
@@ -21,7 +21,6 @@ export interface NeoButtonGroupProps extends Omit<MuiButtonGroupProps, 'size' |
|
|
|
21
21
|
*
|
|
22
22
|
* Figma Props Mapping:
|
|
23
23
|
* - Size (Sm|Md) → size prop (small|medium)
|
|
24
|
-
* - Icon=False → Icon support not included in this implementation
|
|
25
24
|
* - Active button state → Controlled externally via button props or classes
|
|
26
25
|
*
|
|
27
26
|
* Usage:
|
|
@@ -7,20 +7,20 @@ declare module '@mui/material/ButtonBase' {
|
|
|
7
7
|
}
|
|
8
8
|
}
|
|
9
9
|
type CodeSnippetVariant = 'outlined' | 'filled';
|
|
10
|
-
type CodeSnippetSize = 'xs' | 'small' | 'large';
|
|
10
|
+
type CodeSnippetSize = 'xs' | 'small' | 'large' | 'inline';
|
|
11
11
|
export interface NeoCodeSnippetProps extends Omit<ButtonBaseProps, 'children'> {
|
|
12
12
|
/**
|
|
13
13
|
* The visual variant of the code snippet
|
|
14
14
|
* @default "outlined"
|
|
15
15
|
*
|
|
16
|
-
* @figma
|
|
16
|
+
* @figma Theme (Dark|Light)
|
|
17
17
|
*/
|
|
18
18
|
variant?: CodeSnippetVariant;
|
|
19
19
|
/**
|
|
20
20
|
* The size of the code snippet
|
|
21
21
|
* @default "small"
|
|
22
22
|
*
|
|
23
|
-
* @figma
|
|
23
|
+
* @figma Size (Single line|multiline|inline)
|
|
24
24
|
*/
|
|
25
25
|
size?: CodeSnippetSize;
|
|
26
26
|
/**
|
|
@@ -39,7 +39,7 @@ export interface NeoCodeSnippetProps extends Omit<ButtonBaseProps, 'children'> {
|
|
|
39
39
|
*
|
|
40
40
|
* Figma Props Mapping:
|
|
41
41
|
* - Color (Light|Dark) → variant (outlined|filled)
|
|
42
|
-
* - size (Single line|multiline) → auto-detected
|
|
42
|
+
* - size (Single line|multiline|inline) → size prop + auto-detected multiline
|
|
43
43
|
* - Copy button → endIcon (ReactNode)
|
|
44
44
|
* - Text content → children prop
|
|
45
45
|
*/
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { type ChipProps } from '@mui/material/Chip';
|
|
2
|
+
export interface NeoFilterChipProps extends Omit<ChipProps, 'variant' | 'color' | 'label'> {
|
|
3
|
+
/**
|
|
4
|
+
* The filter label text
|
|
5
|
+
*/
|
|
6
|
+
label: string;
|
|
7
|
+
/**
|
|
8
|
+
* Whether the filter has active selections
|
|
9
|
+
* @default false
|
|
10
|
+
*/
|
|
11
|
+
selected?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Whether the filter dropdown is expanded
|
|
14
|
+
* @default false
|
|
15
|
+
*/
|
|
16
|
+
expanded?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Value text shown when selected (e.g. "Filter 1, Filter 2")
|
|
19
|
+
*/
|
|
20
|
+
selectedLabel?: string;
|
|
21
|
+
/**
|
|
22
|
+
* Number of active filter selections (shown as badge when selected)
|
|
23
|
+
* @default 0
|
|
24
|
+
*/
|
|
25
|
+
count?: number;
|
|
26
|
+
/**
|
|
27
|
+
* Handler for clearing the filter (shows X icon when provided and selected)
|
|
28
|
+
*/
|
|
29
|
+
onClear?: (e: React.MouseEvent) => void;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* NeoFilterChip - Filter chip for filtering data, based on MUI Chip.
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* <NeoFilterChip label="Status" selected selectedLabel="Active, Pending" count={2} onClear={handleClear} />
|
|
36
|
+
*
|
|
37
|
+
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC?node-id=8257-239
|
|
38
|
+
*/
|
|
39
|
+
export declare const NeoFilterChip: {
|
|
40
|
+
({ label, selected, expanded, selectedLabel, count, onClear, onClick, ...props }: NeoFilterChipProps): import("react/jsx-runtime").JSX.Element;
|
|
41
|
+
displayName: string;
|
|
42
|
+
};
|
package/dist/Footer/Footer.d.ts
CHANGED
|
@@ -54,6 +54,11 @@ export interface NeoFooterProps {
|
|
|
54
54
|
* If not provided, will attempt to use DataGrid's pagination state
|
|
55
55
|
*/
|
|
56
56
|
hasNextPage?: boolean;
|
|
57
|
+
/**
|
|
58
|
+
* Whether to show the selected row count on the left side (pagination variant)
|
|
59
|
+
* @default true
|
|
60
|
+
*/
|
|
61
|
+
showSelected?: boolean;
|
|
57
62
|
/**
|
|
58
63
|
* Custom content to render in the footer
|
|
59
64
|
*/
|
|
@@ -103,6 +108,6 @@ export interface NeoFooterProps {
|
|
|
103
108
|
* />
|
|
104
109
|
*/
|
|
105
110
|
export declare const NeoFooter: {
|
|
106
|
-
({ variant, showShadow, loading, resultCount, onLoadMore, hasMore, paginationInfo, onPreviousPage, onNextPage, hasPreviousPage, hasNextPage, children, }: NeoFooterProps): import("react/jsx-runtime").JSX.Element;
|
|
111
|
+
({ variant, showShadow, loading, resultCount, onLoadMore, hasMore, paginationInfo, onPreviousPage, onNextPage, hasPreviousPage, hasNextPage, showSelected, children, }: NeoFooterProps): import("react/jsx-runtime").JSX.Element;
|
|
107
112
|
displayName: string;
|
|
108
113
|
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
export type IconWrapperSize = 8 | 12 | 16 | 20 | 24 | 28 | 32 | 36 | 40 | 44 | 48 | 52 | 56 | 60 | 64 | 72 | 80 | 96 | 128 | 160 | 192;
|
|
3
|
+
export interface NeoIconWrapperProps extends Omit<HTMLAttributes<HTMLDivElement>, 'color'> {
|
|
4
|
+
/**
|
|
5
|
+
* The size of the icon wrapper in pixels
|
|
6
|
+
* @figma Size (8px|12px|...|192px)
|
|
7
|
+
* @default 20
|
|
8
|
+
*/
|
|
9
|
+
size?: IconWrapperSize;
|
|
10
|
+
/**
|
|
11
|
+
* Icon element to render inside the wrapper
|
|
12
|
+
*/
|
|
13
|
+
children?: ReactNode;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* NeoIconWrapper - Flex-centered container that sizes icons
|
|
17
|
+
*
|
|
18
|
+
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system---2025?node-id=4061-9955
|
|
19
|
+
*/
|
|
20
|
+
export declare const NeoIconWrapper: {
|
|
21
|
+
({ size, children, ...props }: NeoIconWrapperProps): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
displayName: string;
|
|
23
|
+
};
|
|
@@ -20,7 +20,7 @@ export interface NeoListItemButtonProps extends ListItemButtonProps {
|
|
|
20
20
|
* NeoListItemButton - Selectable list item with icon and text
|
|
21
21
|
*
|
|
22
22
|
* A selectable list item component that displays an optional icon with primary
|
|
23
|
-
* and secondary text. Supports active (selected), deselected, and disabled states.
|
|
23
|
+
* and secondary text. Supports active (selected), deselected, focus, and disabled states.
|
|
24
24
|
*
|
|
25
25
|
* Uses MUI's ListItemButton as base for proper accessibility and interaction.
|
|
26
26
|
* Compose with ListItemIcon and ListItemText for proper structure.
|
|
@@ -41,9 +41,10 @@ export interface NeoListItemButtonProps extends ListItemButtonProps {
|
|
|
41
41
|
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system---2025?node-id=4925-3764
|
|
42
42
|
*
|
|
43
43
|
* Figma Props Mapping:
|
|
44
|
-
* -
|
|
45
|
-
* -
|
|
46
|
-
* -
|
|
44
|
+
* - state="active" → selected={true}
|
|
45
|
+
* - state="deselected" → selected={false}
|
|
46
|
+
* - state="focus" → focus-visible CSS state
|
|
47
|
+
* - state="disabled" → disabled={true}
|
|
47
48
|
* - showIcon → Conditional rendering of ListItemIcon child
|
|
48
49
|
*
|
|
49
50
|
* Design Tokens Used:
|
|
@@ -23,13 +23,13 @@ export interface NeoMarketplaceCardProps extends Omit<CardProps, 'children' | 't
|
|
|
23
23
|
/**
|
|
24
24
|
* Whether the card is in selected/active state
|
|
25
25
|
* @default false
|
|
26
|
-
* @figma
|
|
26
|
+
* @figma State (Active)
|
|
27
27
|
*/
|
|
28
28
|
selected?: boolean;
|
|
29
29
|
/**
|
|
30
30
|
* Whether the card is disabled
|
|
31
31
|
* @default false
|
|
32
|
-
* @figma
|
|
32
|
+
* @figma State (Disabled)
|
|
33
33
|
*/
|
|
34
34
|
disabled?: boolean;
|
|
35
35
|
/**
|
|
@@ -59,10 +59,11 @@ export interface NeoMarketplaceCardProps extends Omit<CardProps, 'children' | 't
|
|
|
59
59
|
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system---2025?node-id=4286-1635&t=Bo58EpFmg6ILJtmv-11
|
|
60
60
|
*
|
|
61
61
|
* Figma Props Mapping:
|
|
62
|
-
* -
|
|
63
|
-
* -
|
|
64
|
-
* -
|
|
65
|
-
* -
|
|
62
|
+
* - State="Active" → selected={true}
|
|
63
|
+
* - State="Disabled" → disabled={true}
|
|
64
|
+
* - State="Focused" → CSS :focus-visible state (not a prop)
|
|
65
|
+
* - State="Hover" → CSS :hover state (not a prop)
|
|
66
|
+
* - State="Default" → Base state (no props)
|
|
66
67
|
*
|
|
67
68
|
* Design Tokens Used:
|
|
68
69
|
* - semanticColors.surfaces.card (#FFFFFF) - Default card background
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { type CardProps } from '@mui/material/Card';
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
3
|
+
type LargeCardState = 'default' | 'active' | 'disabled' | 'focused';
|
|
4
|
+
type LargeCardTheme = 'light' | 'dark';
|
|
5
|
+
export interface NeoMarketplaceLargeCardProps extends Omit<CardProps, 'children' | 'title'> {
|
|
6
|
+
/**
|
|
7
|
+
* The visual state of the card
|
|
8
|
+
* @default "default"
|
|
9
|
+
* @figma State
|
|
10
|
+
*/
|
|
11
|
+
state?: LargeCardState;
|
|
12
|
+
/**
|
|
13
|
+
* The theme variant of the card
|
|
14
|
+
* @default "light"
|
|
15
|
+
* @figma Theme
|
|
16
|
+
*/
|
|
17
|
+
cardTheme?: LargeCardTheme;
|
|
18
|
+
/**
|
|
19
|
+
* Whether to show the icon
|
|
20
|
+
* @default true
|
|
21
|
+
* @figma Show Icon
|
|
22
|
+
*/
|
|
23
|
+
showIcon?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Whether to show the gel brand icon
|
|
26
|
+
* @default true
|
|
27
|
+
* @figma Show Gel
|
|
28
|
+
*/
|
|
29
|
+
showGel?: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Whether to show the button area
|
|
32
|
+
* @default true
|
|
33
|
+
* @figma Show Buttons
|
|
34
|
+
*/
|
|
35
|
+
showButtons?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Icon element to display in the header row (rendered at 20x20)
|
|
38
|
+
*/
|
|
39
|
+
icon?: ReactNode;
|
|
40
|
+
/**
|
|
41
|
+
* Gel/brand icon to display in the header row (rendered at 20x20)
|
|
42
|
+
*/
|
|
43
|
+
gel?: ReactNode;
|
|
44
|
+
/**
|
|
45
|
+
* Title text displayed inline in the header row with icon and gel
|
|
46
|
+
*/
|
|
47
|
+
title?: ReactNode;
|
|
48
|
+
/**
|
|
49
|
+
* Description text displayed below the header row
|
|
50
|
+
*/
|
|
51
|
+
children?: ReactNode;
|
|
52
|
+
/**
|
|
53
|
+
* Button/action elements for the footer row
|
|
54
|
+
*/
|
|
55
|
+
actions?: ReactNode;
|
|
56
|
+
/**
|
|
57
|
+
* Click handler for the card
|
|
58
|
+
*/
|
|
59
|
+
onClick?: () => void;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* NeoMarketplaceLargeCard - A large marketplace card with state and theme variants
|
|
63
|
+
*
|
|
64
|
+
* A 340x162px card with optional icon, gel brand icon, title, description, and action buttons.
|
|
65
|
+
* Icon, gel, and title display inline in a header row.
|
|
66
|
+
* Supports 4 states (default, active, disabled, focused) and 2 themes (light, dark).
|
|
67
|
+
*
|
|
68
|
+
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC?node-id=5925-11
|
|
69
|
+
*
|
|
70
|
+
* Figma Props Mapping:
|
|
71
|
+
* - State → state (Default/Active/Disabled/Focused)
|
|
72
|
+
* - Theme → cardTheme (Dark/Light)
|
|
73
|
+
* - Show Icon → showIcon
|
|
74
|
+
* - Show Gel → showGel
|
|
75
|
+
* - Show Buttons → showButtons
|
|
76
|
+
*
|
|
77
|
+
* Design Tokens Used:
|
|
78
|
+
* - semanticColors.surfaces.card (#ffffff) - Light theme background
|
|
79
|
+
* - colors.grey[800] (#1f2937) - Dark theme background
|
|
80
|
+
* - semanticColors.border.card (#d1d5db) - Default border (50% opacity on dark)
|
|
81
|
+
* - semanticColors.border.tabActive (#2f42ff) - Active/focused border (light theme)
|
|
82
|
+
* - colors.digitalGreen[300] (#88fe9b) - Active/focused border (dark theme)
|
|
83
|
+
* - borderRadius.xS (4px) - Corner radius
|
|
84
|
+
* - shadows.focusWhite1 + shadows.focusBlue2 - Focus ring
|
|
85
|
+
* - shadows.card - Active state shadow
|
|
86
|
+
*/
|
|
87
|
+
export declare const NeoMarketplaceLargeCard: {
|
|
88
|
+
({ state, cardTheme, showIcon, showGel, showButtons, icon, gel, title, children, actions, onClick, ...props }: NeoMarketplaceLargeCardProps): import("react/jsx-runtime").JSX.Element;
|
|
89
|
+
displayName: string;
|
|
90
|
+
};
|
|
91
|
+
export {};
|
|
@@ -30,9 +30,11 @@ export interface NeoMenuItemProps extends MenuItemProps {
|
|
|
30
30
|
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system---2025?node-id=4159-8649
|
|
31
31
|
*
|
|
32
32
|
* Figma Props Mapping:
|
|
33
|
+
* - Figma "Dropdown - Menu" component uses Type (Avatar|Button|Icon) and Open (True|False)
|
|
34
|
+
* to control the menu trigger. NeoMenuItem is the individual item inside the menu.
|
|
33
35
|
* - Text label → children prop (mapped via figma.children)
|
|
34
|
-
* -
|
|
35
|
-
* -
|
|
36
|
+
* - selected → selected prop (React-controlled)
|
|
37
|
+
* - disabled → disabled prop (React-controlled)
|
|
36
38
|
* - Hover state → CSS :hover (not mapped)
|
|
37
39
|
* - Icon slot → icon prop (not mappable - ReactNode)
|
|
38
40
|
* - Secondary text → secondaryText prop (not mappable - ReactNode/string)
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { type ButtonBaseProps } from '@mui/material/ButtonBase';
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
3
|
+
export interface NeoNavigationItemProps extends Omit<ButtonBaseProps, 'children'> {
|
|
4
|
+
/**
|
|
5
|
+
* Icon element to display
|
|
6
|
+
*/
|
|
7
|
+
icon?: ReactNode;
|
|
8
|
+
/**
|
|
9
|
+
* Text label below the icon
|
|
10
|
+
*/
|
|
11
|
+
label?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Whether the item is selected/active
|
|
14
|
+
* @figma State (Selected)
|
|
15
|
+
* @default false
|
|
16
|
+
*/
|
|
17
|
+
selected?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Optional tag badge content (e.g., count)
|
|
20
|
+
* @figma Tag
|
|
21
|
+
*/
|
|
22
|
+
tag?: string;
|
|
23
|
+
/**
|
|
24
|
+
* Additional content
|
|
25
|
+
*/
|
|
26
|
+
children?: ReactNode;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* NeoNavigationItem - Vertical navigation item with icon, label, and optional tag
|
|
30
|
+
*
|
|
31
|
+
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system---2025?node-id=8455-6120
|
|
32
|
+
*/
|
|
33
|
+
export declare const NeoNavigationItem: {
|
|
34
|
+
({ icon, label, selected, tag, children, ...props }: NeoNavigationItemProps): import("react/jsx-runtime").JSX.Element;
|
|
35
|
+
displayName: string;
|
|
36
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { type InputBaseProps } from '@mui/material/InputBase';
|
|
2
|
+
export interface NeoSearchChipProps extends Omit<InputBaseProps, 'startAdornment' | 'endAdornment' | 'type'> {
|
|
3
|
+
/**
|
|
4
|
+
* Handler for clearing the search value (shows X icon when provided and value is non-empty)
|
|
5
|
+
*/
|
|
6
|
+
onClear?: () => void;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* NeoSearchChip - Pill-shaped search input for inline search functionality.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* <NeoSearchChip placeholder="Search titles" value={query} onChange={handleChange} onClear={handleClear} />
|
|
13
|
+
*
|
|
14
|
+
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC?node-id=8542-921
|
|
15
|
+
*/
|
|
16
|
+
export declare const NeoSearchChip: {
|
|
17
|
+
({ onClear, value, ...props }: NeoSearchChipProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
displayName: string;
|
|
19
|
+
};
|
|
@@ -7,13 +7,13 @@ export interface NeoStatusBannerProps extends Omit<AlertProps, 'severity' | 'var
|
|
|
7
7
|
/**
|
|
8
8
|
* The severity level of the status banner
|
|
9
9
|
* @default "success"
|
|
10
|
-
* @figma
|
|
10
|
+
* @figma Intent
|
|
11
11
|
*/
|
|
12
|
-
severity?: 'success' | 'error' | 'neutral';
|
|
12
|
+
severity?: 'success' | 'error' | 'neutral' | 'info';
|
|
13
13
|
/**
|
|
14
14
|
* The visual variant style
|
|
15
15
|
* @default "outlined"
|
|
16
|
-
* @figma
|
|
16
|
+
* @figma Theme
|
|
17
17
|
*/
|
|
18
18
|
variant?: 'outlined' | 'filled';
|
|
19
19
|
/**
|
|
@@ -28,19 +28,20 @@ export interface NeoStatusBannerProps extends Omit<AlertProps, 'severity' | 'var
|
|
|
28
28
|
/**
|
|
29
29
|
* NeoStatusBanner - Status banner component for displaying system status messages
|
|
30
30
|
*
|
|
31
|
-
* Displays status information with different severity levels (success, error, neutral) and
|
|
31
|
+
* Displays status information with different severity levels (success, error, info, neutral) and
|
|
32
32
|
* visual modes (outlined for light backgrounds, filled for emphasis).
|
|
33
33
|
*
|
|
34
34
|
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system---2025?node-id=4921-3427
|
|
35
35
|
*
|
|
36
36
|
* Figma Props Mapping:
|
|
37
|
-
* - Status (Success|Error|Offline) → severity ('success'|'error'|'neutral')
|
|
37
|
+
* - Status (Success|Error|Info|Offline) → severity ('success'|'error'|'info'|'neutral')
|
|
38
38
|
* - Mode (Light|Dark) → variant ('outlined'|'filled')
|
|
39
39
|
*
|
|
40
40
|
* Design Tokens Used:
|
|
41
41
|
* - status.success.light, status.success.medium
|
|
42
42
|
* - status.error.light, status.error.medium
|
|
43
43
|
* - status.neutral.light, status.neutral.medium
|
|
44
|
+
* - status.info.light, status.info.medium
|
|
44
45
|
* - typography.tooltip, typography.bodySecondary
|
|
45
46
|
* - grey[800]
|
|
46
47
|
* - fontSize.default, fontSize.sm
|
package/dist/Tag/Tag.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { type ChipProps } from '@mui/material/Chip';
|
|
|
2
2
|
declare module '@mui/material/Chip' {
|
|
3
3
|
interface ChipPropsColorOverrides {
|
|
4
4
|
violet: true;
|
|
5
|
+
beta: true;
|
|
5
6
|
}
|
|
6
7
|
interface ChipPropsSizeOverrides {
|
|
7
8
|
large: true;
|
|
@@ -26,10 +27,10 @@ export interface NeoTagProps extends Omit<ChipProps, 'variant' | 'size'> {
|
|
|
26
27
|
variant?: 'outlined' | 'filled';
|
|
27
28
|
/**
|
|
28
29
|
* The color/state of the tag
|
|
29
|
-
* @figma state (Neutral|Error|Warning|Success|Info|Violet)
|
|
30
|
+
* @figma state (Neutral|Error|Warning|Success|Info|Violet|Beta)
|
|
30
31
|
* @default "default"
|
|
31
32
|
*/
|
|
32
|
-
color?: 'default' | 'error' | 'warning' | 'success' | 'info' | 'violet';
|
|
33
|
+
color?: 'default' | 'error' | 'warning' | 'success' | 'info' | 'violet' | 'beta';
|
|
33
34
|
}
|
|
34
35
|
/**
|
|
35
36
|
* NeoTag - Small pill-shaped label component based on MUI Chip
|
|
@@ -39,7 +40,7 @@ export interface NeoTagProps extends Omit<ChipProps, 'variant' | 'size'> {
|
|
|
39
40
|
* Figma Props Mapping:
|
|
40
41
|
* - m (sm|md|lg) → size (small|medium|large)
|
|
41
42
|
* - type (light|dark) → variant (outlined|filled)
|
|
42
|
-
* - state (Neutral|Error|Warning|Success|Info|Violet) → color (default|error|warning|success|info|violet)
|
|
43
|
+
* - state (Neutral|Error|Warning|Success|Info|Violet|Beta) → color (default|error|warning|success|info|violet|beta)
|
|
43
44
|
* - Label text → label prop
|
|
44
45
|
*/
|
|
45
46
|
export declare const NeoTag: {
|
package/dist/Tree/Tree.d.ts
CHANGED
|
@@ -1,26 +1,42 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type TreeItemProps } from '@mui/x-tree-view/TreeItem';
|
|
2
|
+
import { type RichTreeViewProProps } from '@mui/x-tree-view-pro/RichTreeViewPro';
|
|
3
|
+
import { type ReactNode } from 'react';
|
|
2
4
|
/**
|
|
3
|
-
*
|
|
5
|
+
* Extended item data that NeoTreeItem can read from the items array.
|
|
6
|
+
* Consumers pass these via the `items` prop on NeoTreeView.
|
|
4
7
|
*/
|
|
5
|
-
export interface
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
export interface NeoTreeItemData {
|
|
9
|
+
id: string;
|
|
10
|
+
label: string;
|
|
11
|
+
icon?: ReactNode;
|
|
12
|
+
checkbox?: ReactNode;
|
|
13
|
+
secondaryLabel?: ReactNode;
|
|
14
|
+
endAction?: ReactNode;
|
|
15
|
+
statusIcon?: ReactNode;
|
|
16
|
+
children?: NeoTreeItemData[];
|
|
10
17
|
}
|
|
18
|
+
export type NeoTreeItemProps = TreeItemProps;
|
|
11
19
|
/**
|
|
12
|
-
*
|
|
20
|
+
* NeoTreeItem - Styled tree item row with optional icon, checkbox,
|
|
21
|
+
* secondaryLabel, endAction, and statusIcon slots.
|
|
22
|
+
*
|
|
23
|
+
* Slot data is read from the item model (passed via `items` on NeoTreeView).
|
|
13
24
|
*
|
|
14
25
|
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC?node-id=4190-30493
|
|
26
|
+
*/
|
|
27
|
+
export declare const NeoTreeItem: import("react").ForwardRefExoticComponent<TreeItemProps & import("react").RefAttributes<HTMLLIElement>>;
|
|
28
|
+
export interface NeoTreeViewProps extends Omit<RichTreeViewProProps<NeoTreeItemData, false>, 'slots'> {
|
|
29
|
+
slots?: RichTreeViewProProps<NeoTreeItemData, false>['slots'];
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* NeoTreeView - Styled tree container wrapping MUI RichTreeViewPro.
|
|
15
33
|
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
* - FigmaProp → reactProp
|
|
34
|
+
* Provides neo-design token styling, default expand/collapse icons,
|
|
35
|
+
* and NeoTreeItem as the default item slot.
|
|
19
36
|
*
|
|
20
|
-
*
|
|
21
|
-
* - TODO: List design tokens used (e.g., semanticColors.text.primary, typography.body.medium)
|
|
37
|
+
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC?node-id=4190-30493
|
|
22
38
|
*/
|
|
23
|
-
export declare const
|
|
24
|
-
({
|
|
39
|
+
export declare const NeoTreeView: {
|
|
40
|
+
({ slots, ...props }: NeoTreeViewProps): import("react/jsx-runtime").JSX.Element;
|
|
25
41
|
displayName: string;
|
|
26
42
|
};
|