@moderneinc/neo-styled-components 0.0.0-development → 1.6.1-next.024dce
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/Badge.d.ts +23 -0
- package/dist/Banner.d.ts +66 -0
- package/dist/Button.d.ts +59 -0
- package/dist/CodeSnippet.d.ts +59 -0
- package/dist/Divider.d.ts +32 -0
- package/dist/Dot.d.ts +36 -0
- package/dist/IconButton.d.ts +31 -0
- package/dist/InputField.d.ts +90 -0
- package/dist/Menu.d.ts +37 -0
- package/dist/MenuItem.d.ts +47 -0
- package/dist/Tabs.d.ts +51 -0
- package/dist/Tag.d.ts +48 -0
- package/dist/Toast.d.ts +68 -0
- package/dist/Toggle.d.ts +69 -0
- package/dist/index.d.ts +698 -4
- package/dist/index.esm.js +1691 -2
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +1706 -1
- package/dist/index.js.map +1 -1
- package/dist/types.d.ts +28 -0
- package/package.json +15 -6
package/dist/Badge.d.ts
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { type ChipProps } from '@mui/material/Chip';
|
|
2
|
+
export interface NeoBadgeProps extends Omit<ChipProps, 'variant' | 'size'> {
|
|
3
|
+
/**
|
|
4
|
+
* The color/state of the badge
|
|
5
|
+
* @default "default"
|
|
6
|
+
*/
|
|
7
|
+
color?: 'default' | 'error' | 'warning' | 'success' | 'info';
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* NeoBadge - Status badge component based on MUI Chip
|
|
11
|
+
*
|
|
12
|
+
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system-w--correct-set-of-tokens?node-id=4091-17230
|
|
13
|
+
*
|
|
14
|
+
* Figma Props Mapping:
|
|
15
|
+
* - state (Neutral|Error|Warning|Success|Info) → color (default|error|warning|success|info)
|
|
16
|
+
* - iconLeading → icon prop (pass React element)
|
|
17
|
+
* - iconTrailing → deleteIcon prop (pass React element)
|
|
18
|
+
* - Label → label prop
|
|
19
|
+
*/
|
|
20
|
+
export declare const NeoBadge: {
|
|
21
|
+
(props: NeoBadgeProps): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
displayName: string;
|
|
23
|
+
};
|
package/dist/Banner.d.ts
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { type AlertProps } from '@mui/material/Alert';
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
3
|
+
export interface NeoBannerProps extends Omit<AlertProps, 'variant' | 'severity' | 'color'> {
|
|
4
|
+
/**
|
|
5
|
+
* The visual style variant of the banner
|
|
6
|
+
* @default "light"
|
|
7
|
+
*
|
|
8
|
+
* @figmaPropMapping color (Dark|Light|Success|Error|Warning) → variant
|
|
9
|
+
*/
|
|
10
|
+
variant?: 'dark' | 'light' | 'success' | 'error' | 'warning';
|
|
11
|
+
/**
|
|
12
|
+
* The message text to display
|
|
13
|
+
*
|
|
14
|
+
* @figmaPropMapping {Message} → message
|
|
15
|
+
*/
|
|
16
|
+
message: string;
|
|
17
|
+
/**
|
|
18
|
+
* Horizontal alignment of the message content
|
|
19
|
+
* @default "left"
|
|
20
|
+
*
|
|
21
|
+
* @figmaPropMapping messagePosition (Left|Center) → messagePosition
|
|
22
|
+
*/
|
|
23
|
+
messagePosition?: 'left' | 'center';
|
|
24
|
+
/**
|
|
25
|
+
* Optional link text to display after the message
|
|
26
|
+
*
|
|
27
|
+
* @figmaPropMapping link (boolean) → linkText (string)
|
|
28
|
+
*/
|
|
29
|
+
linkText?: string;
|
|
30
|
+
/**
|
|
31
|
+
* Whether to show the close button
|
|
32
|
+
* @default true
|
|
33
|
+
*
|
|
34
|
+
* @figmaPropMapping closeIcon → showClose
|
|
35
|
+
*/
|
|
36
|
+
showClose?: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Custom icon to display (optional)
|
|
39
|
+
* If not provided, no icon will be shown
|
|
40
|
+
*/
|
|
41
|
+
icon?: ReactNode;
|
|
42
|
+
/**
|
|
43
|
+
* Callback when close button is clicked
|
|
44
|
+
*/
|
|
45
|
+
onClose?: () => void;
|
|
46
|
+
/**
|
|
47
|
+
* Callback when link text is clicked
|
|
48
|
+
*/
|
|
49
|
+
onLinkClick?: () => void;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* NeoBanner - Inline banner/alert component based on MUI Alert
|
|
53
|
+
*
|
|
54
|
+
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system---2025?node-id=4170-2158
|
|
55
|
+
*
|
|
56
|
+
* Figma Props Mapping:
|
|
57
|
+
* - color (Dark|Light|Success|Error|Warning) → variant (dark|light|success|error|warning)
|
|
58
|
+
* - messagePosition (Left|Center) → messagePosition ("left"|"center")
|
|
59
|
+
* - closeIcon (boolean) → showClose (boolean)
|
|
60
|
+
* - link (boolean) → linkText (string)
|
|
61
|
+
* - {Message} → message (string)
|
|
62
|
+
*/
|
|
63
|
+
export declare const NeoBanner: {
|
|
64
|
+
({ variant, message, messagePosition, linkText, showClose, icon, onClose, onLinkClick, ...props }: NeoBannerProps): import("react/jsx-runtime").JSX.Element;
|
|
65
|
+
displayName: string;
|
|
66
|
+
};
|
package/dist/Button.d.ts
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { type ButtonBaseProps } from '@mui/material/ButtonBase';
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
3
|
+
declare module '@mui/material/ButtonBase' {
|
|
4
|
+
interface ButtonBasePropsVariantOverrides {
|
|
5
|
+
primary: true;
|
|
6
|
+
secondary: true;
|
|
7
|
+
destructive: true;
|
|
8
|
+
link: true;
|
|
9
|
+
linkColor: true;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
type ButtonVariant = 'primary' | 'secondary' | 'destructive' | 'link' | 'linkColor';
|
|
13
|
+
type ButtonSize = 'small' | 'medium';
|
|
14
|
+
export interface NeoButtonProps extends Omit<ButtonBaseProps, 'children'> {
|
|
15
|
+
/**
|
|
16
|
+
* The visual variant of the button
|
|
17
|
+
* @default "primary"
|
|
18
|
+
*
|
|
19
|
+
* @figma Hierarchy
|
|
20
|
+
*/
|
|
21
|
+
variant?: ButtonVariant;
|
|
22
|
+
/**
|
|
23
|
+
* The size of the button
|
|
24
|
+
* @default "medium"
|
|
25
|
+
*
|
|
26
|
+
* @figma Size
|
|
27
|
+
*/
|
|
28
|
+
size?: ButtonSize;
|
|
29
|
+
/**
|
|
30
|
+
* Show loading spinner instead of children
|
|
31
|
+
* @default false
|
|
32
|
+
*
|
|
33
|
+
* @figma State=Loading
|
|
34
|
+
*/
|
|
35
|
+
loading?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Button content
|
|
38
|
+
*/
|
|
39
|
+
children?: ReactNode;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* NeoButton - Text button component based on MUI ButtonBase
|
|
43
|
+
*
|
|
44
|
+
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system---2025?node-id=4086-7590
|
|
45
|
+
*
|
|
46
|
+
* Figma Props Mapping:
|
|
47
|
+
* - Hierarchy (Primary|Secondary|Destructive|Link|Link Color) → variant prop
|
|
48
|
+
* - Size (Small|Medium) → size prop
|
|
49
|
+
* - State=Disabled → disabled prop
|
|
50
|
+
* - State=Loading → loading prop
|
|
51
|
+
* - State=Hover → CSS :hover
|
|
52
|
+
* - State=Pressed → CSS :active
|
|
53
|
+
* - State=Focused → CSS :focus-visible
|
|
54
|
+
*/
|
|
55
|
+
export declare const NeoButton: {
|
|
56
|
+
({ variant, size, loading, children, disabled, ...props }: NeoButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
57
|
+
displayName: string;
|
|
58
|
+
};
|
|
59
|
+
export {};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import type { ButtonBaseProps } from '@mui/material/ButtonBase';
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
3
|
+
declare module '@mui/material/ButtonBase' {
|
|
4
|
+
interface ButtonBasePropsVariantOverrides {
|
|
5
|
+
outlined: true;
|
|
6
|
+
filled: true;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
type CodeSnippetVariant = 'outlined' | 'filled';
|
|
10
|
+
type CodeSnippetSize = 'xs' | 'small' | 'large';
|
|
11
|
+
export interface NeoCodeSnippetProps extends Omit<ButtonBaseProps, 'children'> {
|
|
12
|
+
/**
|
|
13
|
+
* The visual variant of the code snippet
|
|
14
|
+
* @default "outlined"
|
|
15
|
+
*
|
|
16
|
+
* @figma Color (Light|Dark)
|
|
17
|
+
*/
|
|
18
|
+
variant?: CodeSnippetVariant;
|
|
19
|
+
/**
|
|
20
|
+
* The size of the code snippet
|
|
21
|
+
* @default "small"
|
|
22
|
+
*
|
|
23
|
+
* @figma size (xs|small|large)
|
|
24
|
+
*/
|
|
25
|
+
size?: CodeSnippetSize;
|
|
26
|
+
/**
|
|
27
|
+
* Icon to display at the start (leading position)
|
|
28
|
+
*
|
|
29
|
+
* @figma leadingIcon
|
|
30
|
+
*/
|
|
31
|
+
startIcon?: ReactNode;
|
|
32
|
+
/**
|
|
33
|
+
* Icon to display at the end (trailing position)
|
|
34
|
+
*
|
|
35
|
+
* @figma trailingIcon
|
|
36
|
+
*/
|
|
37
|
+
endIcon?: ReactNode;
|
|
38
|
+
/**
|
|
39
|
+
* Code snippet content to display
|
|
40
|
+
*/
|
|
41
|
+
children: ReactNode;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* NeoCodeSnippet - Inline code snippet component based on MUI ButtonBase
|
|
45
|
+
*
|
|
46
|
+
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system---2025?node-id=4187-30353
|
|
47
|
+
*
|
|
48
|
+
* Figma Props Mapping:
|
|
49
|
+
* - Color (Light|Dark) → variant (outlined|filled)
|
|
50
|
+
* - size (xs|small|large) → size prop
|
|
51
|
+
* - leadingIcon (boolean) → startIcon (ReactNode)
|
|
52
|
+
* - trailingIcon (boolean) → endIcon (ReactNode)
|
|
53
|
+
* - Text content → children prop
|
|
54
|
+
*/
|
|
55
|
+
export declare const NeoCodeSnippet: {
|
|
56
|
+
({ variant, size, startIcon, endIcon, children, ...props }: NeoCodeSnippetProps): import("react/jsx-runtime").JSX.Element;
|
|
57
|
+
displayName: string;
|
|
58
|
+
};
|
|
59
|
+
export {};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { type DividerProps } from '@mui/material/Divider';
|
|
2
|
+
export interface NeoDividerProps extends DividerProps {
|
|
3
|
+
}
|
|
4
|
+
/**
|
|
5
|
+
* NeoDivider - Horizontal divider for separating content
|
|
6
|
+
*
|
|
7
|
+
* Generic divider component that can be used in menus, lists, cards, or any layout
|
|
8
|
+
* that needs visual separation between content sections.
|
|
9
|
+
*
|
|
10
|
+
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system---2025?node-id=4159-8649
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```tsx
|
|
14
|
+
* // In a menu
|
|
15
|
+
* <NeoMenu>
|
|
16
|
+
* <NeoMenuItem>Settings</NeoMenuItem>
|
|
17
|
+
* <NeoDivider />
|
|
18
|
+
* <NeoMenuItem>Sign out</NeoMenuItem>
|
|
19
|
+
* </NeoMenu>
|
|
20
|
+
*
|
|
21
|
+
* // In a card
|
|
22
|
+
* <Card>
|
|
23
|
+
* <CardHeader>Title</CardHeader>
|
|
24
|
+
* <NeoDivider />
|
|
25
|
+
* <CardContent>Content</CardContent>
|
|
26
|
+
* </Card>
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
export declare const NeoDivider: {
|
|
30
|
+
(props: NeoDividerProps): import("react/jsx-runtime").JSX.Element;
|
|
31
|
+
displayName: string;
|
|
32
|
+
};
|
package/dist/Dot.d.ts
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { type BadgeProps } from '@mui/material/Badge';
|
|
2
|
+
type DotSize = 'small' | 'medium' | 'large';
|
|
3
|
+
type DotVariant = 'solid' | 'outline';
|
|
4
|
+
type DotColor = 'success' | 'error' | 'warning' | 'info' | 'neutral';
|
|
5
|
+
export interface NeoDotProps extends Omit<BadgeProps, 'variant' | 'color' | 'badgeContent' | 'children'> {
|
|
6
|
+
/**
|
|
7
|
+
* The size of the dot
|
|
8
|
+
* @default "medium"
|
|
9
|
+
*/
|
|
10
|
+
size?: DotSize;
|
|
11
|
+
/**
|
|
12
|
+
* The variant of the dot
|
|
13
|
+
* @default "solid"
|
|
14
|
+
*/
|
|
15
|
+
variant?: DotVariant;
|
|
16
|
+
/**
|
|
17
|
+
* The color/status of the dot
|
|
18
|
+
* @default "neutral"
|
|
19
|
+
*/
|
|
20
|
+
color?: DotColor;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* NeoDot - Status indicator dot component based on MUI Badge
|
|
24
|
+
*
|
|
25
|
+
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system---2025?node-id=4163-3577
|
|
26
|
+
*
|
|
27
|
+
* Figma Props Mapping:
|
|
28
|
+
* - size (sm|md|lg) → size prop (small|medium|large)
|
|
29
|
+
* - outline (False|True) → variant prop (solid|outline)
|
|
30
|
+
* - Color is configurable via color prop (success|error|warning|info|neutral)
|
|
31
|
+
*/
|
|
32
|
+
export declare const NeoDot: {
|
|
33
|
+
({ size, variant, color, ...props }: NeoDotProps): import("react/jsx-runtime").JSX.Element;
|
|
34
|
+
displayName: string;
|
|
35
|
+
};
|
|
36
|
+
export {};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { type IconButtonProps } from '@mui/material/IconButton';
|
|
2
|
+
type IconButtonSize = 'small' | 'medium';
|
|
3
|
+
export interface NeoIconButtonProps extends Omit<IconButtonProps, 'color' | 'size'> {
|
|
4
|
+
/**
|
|
5
|
+
* The size of the icon button
|
|
6
|
+
* @default "medium"
|
|
7
|
+
*
|
|
8
|
+
* @figma Size
|
|
9
|
+
*/
|
|
10
|
+
size?: IconButtonSize;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* NeoIconButton - Icon-only button component based on MUI IconButton
|
|
14
|
+
*
|
|
15
|
+
* Simple, neutral icon button with transparent background and icon color states.
|
|
16
|
+
*
|
|
17
|
+
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system---2025?node-id=4086-7590
|
|
18
|
+
*
|
|
19
|
+
* Figma Props Mapping:
|
|
20
|
+
* - Hierarchy=Icon → Single default style (no variant prop)
|
|
21
|
+
* - Size (Small|Medium) → size prop
|
|
22
|
+
* - State=Disabled → disabled prop
|
|
23
|
+
* - State=Hover → CSS :hover
|
|
24
|
+
* - State=Pressed → CSS :active
|
|
25
|
+
* - State=Focused → CSS :focus-visible
|
|
26
|
+
*/
|
|
27
|
+
export declare const NeoIconButton: {
|
|
28
|
+
({ size, ...props }: NeoIconButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
displayName: string;
|
|
30
|
+
};
|
|
31
|
+
export {};
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { type InputBaseProps } from '@mui/material/InputBase';
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
3
|
+
type InputFieldSize = 'small' | 'medium';
|
|
4
|
+
export interface NeoInputFieldProps extends Omit<InputBaseProps, 'size'> {
|
|
5
|
+
/**
|
|
6
|
+
* The size of the input field
|
|
7
|
+
* @default "medium"
|
|
8
|
+
*
|
|
9
|
+
* @figma Size
|
|
10
|
+
*/
|
|
11
|
+
size?: InputFieldSize;
|
|
12
|
+
/**
|
|
13
|
+
* Show error/destructive state with red styling
|
|
14
|
+
* @default false
|
|
15
|
+
*
|
|
16
|
+
* @figma Destructive
|
|
17
|
+
*/
|
|
18
|
+
destructive?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Label text for the input
|
|
21
|
+
*
|
|
22
|
+
* @figma Label
|
|
23
|
+
*/
|
|
24
|
+
label?: string;
|
|
25
|
+
/**
|
|
26
|
+
* Show required indicator (asterisk)
|
|
27
|
+
* @default false
|
|
28
|
+
*
|
|
29
|
+
* @figma Required indicator
|
|
30
|
+
*/
|
|
31
|
+
required?: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Info icon to display next to the label
|
|
34
|
+
*
|
|
35
|
+
* @figma Info icon
|
|
36
|
+
*/
|
|
37
|
+
infoIcon?: ReactNode;
|
|
38
|
+
/**
|
|
39
|
+
* Helper text displayed below the input (normal state)
|
|
40
|
+
*
|
|
41
|
+
* @figma Helper text
|
|
42
|
+
*/
|
|
43
|
+
helperText?: string;
|
|
44
|
+
/**
|
|
45
|
+
* Error message displayed below the input (destructive state)
|
|
46
|
+
* Takes precedence over helperText when destructive is true
|
|
47
|
+
*
|
|
48
|
+
* @figma Error message
|
|
49
|
+
*/
|
|
50
|
+
errorMessage?: string;
|
|
51
|
+
/**
|
|
52
|
+
* Icon to display at the start of the input
|
|
53
|
+
*
|
|
54
|
+
* @figma Left icon
|
|
55
|
+
*/
|
|
56
|
+
startIcon?: ReactNode;
|
|
57
|
+
/**
|
|
58
|
+
* Icon to display at the end of the input
|
|
59
|
+
* In destructive state, an error icon is automatically shown
|
|
60
|
+
*
|
|
61
|
+
* @figma Right icon
|
|
62
|
+
*/
|
|
63
|
+
endIcon?: ReactNode;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* NeoInputField - Form input field component using MUI FormControl composition
|
|
67
|
+
*
|
|
68
|
+
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system---2025?node-id=4091-23373
|
|
69
|
+
*
|
|
70
|
+
* Figma Props Mapping:
|
|
71
|
+
* - Size (small|medium) → size prop
|
|
72
|
+
* - Destructive (false|true) → destructive prop
|
|
73
|
+
* - State=Placeholder → empty value with placeholder text
|
|
74
|
+
* - State=Hover → CSS :hover
|
|
75
|
+
* - State=Filled → value prop with text
|
|
76
|
+
* - State=Focused → CSS :focus
|
|
77
|
+
* - State=Disabled → disabled prop
|
|
78
|
+
* - Label → label prop
|
|
79
|
+
* - Required indicator (*) → required prop
|
|
80
|
+
* - Info icon → infoIcon prop
|
|
81
|
+
* - Helper text → helperText prop
|
|
82
|
+
* - Error message → errorMessage prop (shown when destructive=true)
|
|
83
|
+
* - Left icon → startIcon prop
|
|
84
|
+
* - Right icon → endIcon prop (auto error icon when destructive=true)
|
|
85
|
+
*/
|
|
86
|
+
export declare const NeoInputField: {
|
|
87
|
+
({ size, destructive, label, required, infoIcon, helperText, errorMessage, startIcon, endIcon, disabled, id, ...props }: NeoInputFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
88
|
+
displayName: string;
|
|
89
|
+
};
|
|
90
|
+
export {};
|
package/dist/Menu.d.ts
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { type MenuProps } from '@mui/material/Menu';
|
|
2
|
+
export interface NeoMenuProps extends MenuProps {
|
|
3
|
+
/**
|
|
4
|
+
* Menu content (typically NeoMenuItem components)
|
|
5
|
+
*/
|
|
6
|
+
children?: React.ReactNode;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* NeoMenu - Dropdown menu component based on MUI Menu
|
|
10
|
+
*
|
|
11
|
+
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system---2025?node-id=4159-8649
|
|
12
|
+
*
|
|
13
|
+
* Figma Props Mapping:
|
|
14
|
+
* - Container shown in Figma is the Menu Paper component
|
|
15
|
+
* - Menu items are styled separately via NeoMenuItem
|
|
16
|
+
* - Any trigger component (Button, IconButton, etc.) can open the menu
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```tsx
|
|
20
|
+
* const [anchorEl, setAnchorEl] = useState<null | HTMLElement>(null);
|
|
21
|
+
* const open = Boolean(anchorEl);
|
|
22
|
+
*
|
|
23
|
+
* <Button onClick={(e) => setAnchorEl(e.currentTarget)}>Open Menu</Button>
|
|
24
|
+
* <NeoMenu
|
|
25
|
+
* open={open}
|
|
26
|
+
* anchorEl={anchorEl}
|
|
27
|
+
* onClose={() => setAnchorEl(null)}
|
|
28
|
+
* >
|
|
29
|
+
* <NeoMenuItem icon={<Icon />} shortcut="⌘+P">View profile</NeoMenuItem>
|
|
30
|
+
* <NeoMenuItem>Settings</NeoMenuItem>
|
|
31
|
+
* </NeoMenu>
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
export declare const NeoMenu: {
|
|
35
|
+
({ children, ...props }: NeoMenuProps): import("react/jsx-runtime").JSX.Element;
|
|
36
|
+
displayName: string;
|
|
37
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { type MenuItemProps } from '@mui/material/MenuItem';
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
3
|
+
export interface NeoMenuItemProps extends MenuItemProps {
|
|
4
|
+
/**
|
|
5
|
+
* Optional icon to display on the left side
|
|
6
|
+
*/
|
|
7
|
+
icon?: ReactNode;
|
|
8
|
+
/**
|
|
9
|
+
* Optional keyboard shortcut to display on the right side
|
|
10
|
+
* @example "⌘+P" or "Ctrl+K"
|
|
11
|
+
*/
|
|
12
|
+
shortcut?: string;
|
|
13
|
+
/**
|
|
14
|
+
* Menu item content (text label)
|
|
15
|
+
*/
|
|
16
|
+
children?: ReactNode;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* NeoMenuItem - Menu item component based on MUI MenuItem
|
|
20
|
+
*
|
|
21
|
+
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system---2025?node-id=4159-8649
|
|
22
|
+
*
|
|
23
|
+
* Figma Props Mapping:
|
|
24
|
+
* - Icon slot → icon prop
|
|
25
|
+
* - Text label → children prop
|
|
26
|
+
* - Keyboard shortcut → shortcut prop
|
|
27
|
+
* - Hover state → CSS :hover
|
|
28
|
+
* - Selected state → selected prop
|
|
29
|
+
* - Disabled state → disabled prop
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* ```tsx
|
|
33
|
+
* <NeoMenuItem icon={<UserIcon />} shortcut="⌘+P">
|
|
34
|
+
* View profile
|
|
35
|
+
* </NeoMenuItem>
|
|
36
|
+
* <NeoMenuItem icon={<SettingsIcon />} shortcut="⌘+S">
|
|
37
|
+
* Settings
|
|
38
|
+
* </NeoMenuItem>
|
|
39
|
+
* <NeoMenuItem disabled>
|
|
40
|
+
* Disabled item
|
|
41
|
+
* </NeoMenuItem>
|
|
42
|
+
* ```
|
|
43
|
+
*/
|
|
44
|
+
export declare const NeoMenuItem: {
|
|
45
|
+
({ icon, shortcut, children, ...props }: NeoMenuItemProps): import("react/jsx-runtime").JSX.Element;
|
|
46
|
+
displayName: string;
|
|
47
|
+
};
|
package/dist/Tabs.d.ts
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { type TabProps } from '@mui/material/Tab';
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
3
|
+
/**
|
|
4
|
+
* NeoTabs - Tabs container component based on MUI Tabs
|
|
5
|
+
*
|
|
6
|
+
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system---2025?node-id=3368-26152
|
|
7
|
+
*
|
|
8
|
+
* Figma Props Mapping:
|
|
9
|
+
* - Horizontal tab bar → default layout
|
|
10
|
+
* - Tab selection → value prop + onChange
|
|
11
|
+
* - Active indicator → styled via indicator slot
|
|
12
|
+
*/
|
|
13
|
+
export declare const NeoTabs: import("@emotion/styled").StyledComponent<import("@mui/material/Tabs").TabsOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "className" | "style" | "classes" | "children" | "sx" | "variant" | "slots" | "slotProps" | "aria-label" | "aria-labelledby" | "onChange" | "action" | "value" | "orientation" | "allowScrollButtonsMobile" | "centered" | "indicatorColor" | "ScrollButtonComponent" | "scrollButtons" | "selectionFollowsFocus" | "TabIndicatorProps" | "TabScrollButtonProps" | "textColor" | "visibleScrollbar"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
|
|
14
|
+
export interface NeoTabProps extends Omit<TabProps, 'label'> {
|
|
15
|
+
/**
|
|
16
|
+
* The label for the tab
|
|
17
|
+
*
|
|
18
|
+
* @figma Text layer in tab
|
|
19
|
+
*/
|
|
20
|
+
label: ReactNode;
|
|
21
|
+
/**
|
|
22
|
+
* Optional count to display in a tag next to the label
|
|
23
|
+
* @default undefined
|
|
24
|
+
*
|
|
25
|
+
* @figma Tag with number (999)
|
|
26
|
+
*/
|
|
27
|
+
count?: number | string;
|
|
28
|
+
/**
|
|
29
|
+
* Tab value identifier
|
|
30
|
+
*
|
|
31
|
+
* @figma Used for Current=True/False state
|
|
32
|
+
*/
|
|
33
|
+
value: string | number;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* NeoTab - Individual tab button component based on MUI Tab
|
|
37
|
+
*
|
|
38
|
+
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system---2025?node-id=3368-26152
|
|
39
|
+
*
|
|
40
|
+
* Figma Props Mapping:
|
|
41
|
+
* - Current=True/False → Controlled by parent NeoTabs value
|
|
42
|
+
* - State=Default → default styling
|
|
43
|
+
* - State=Hover → CSS :hover
|
|
44
|
+
* - State=Focus → CSS :focus-visible
|
|
45
|
+
* - Tag count → count prop (renders NeoTag)
|
|
46
|
+
* - Text label → label prop
|
|
47
|
+
*/
|
|
48
|
+
export declare const NeoTab: {
|
|
49
|
+
({ label, count, ...props }: NeoTabProps): import("react/jsx-runtime").JSX.Element;
|
|
50
|
+
displayName: string;
|
|
51
|
+
};
|
package/dist/Tag.d.ts
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { type ChipProps } from '@mui/material/Chip';
|
|
2
|
+
declare module '@mui/material/Chip' {
|
|
3
|
+
interface ChipPropsColorOverrides {
|
|
4
|
+
violet: true;
|
|
5
|
+
}
|
|
6
|
+
interface ChipPropsSizeOverrides {
|
|
7
|
+
large: true;
|
|
8
|
+
}
|
|
9
|
+
interface ChipPropsVariantOverrides {
|
|
10
|
+
outlined: true;
|
|
11
|
+
filled: true;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
export interface NeoTagProps extends Omit<ChipProps, 'variant' | 'size'> {
|
|
15
|
+
/**
|
|
16
|
+
* The size of the tag
|
|
17
|
+
* @figma m (sm|md|lg)
|
|
18
|
+
* @default "small"
|
|
19
|
+
*/
|
|
20
|
+
size?: 'small' | 'medium' | 'large';
|
|
21
|
+
/**
|
|
22
|
+
* The variant style of the tag
|
|
23
|
+
* @figma type (light|dark)
|
|
24
|
+
* @default "outlined"
|
|
25
|
+
*/
|
|
26
|
+
variant?: 'outlined' | 'filled';
|
|
27
|
+
/**
|
|
28
|
+
* The color/state of the tag
|
|
29
|
+
* @figma state (Neutral|Error|Warning|Success|Info|Violet)
|
|
30
|
+
* @default "default"
|
|
31
|
+
*/
|
|
32
|
+
color?: 'default' | 'error' | 'warning' | 'success' | 'info' | 'violet';
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* NeoTag - Small pill-shaped label component based on MUI Chip
|
|
36
|
+
*
|
|
37
|
+
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system---2025?node-id=4120-34533
|
|
38
|
+
*
|
|
39
|
+
* Figma Props Mapping:
|
|
40
|
+
* - m (sm|md|lg) → size (small|medium|large)
|
|
41
|
+
* - type (light|dark) → variant (outlined|filled)
|
|
42
|
+
* - state (Neutral|Error|Warning|Success|Info|Violet) → color (default|error|warning|success|info|violet)
|
|
43
|
+
* - Label text → label prop
|
|
44
|
+
*/
|
|
45
|
+
export declare const NeoTag: {
|
|
46
|
+
({ size, variant, ...props }: NeoTagProps): import("react/jsx-runtime").JSX.Element;
|
|
47
|
+
displayName: string;
|
|
48
|
+
};
|
package/dist/Toast.d.ts
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { type AlertProps } from '@mui/material/Alert';
|
|
2
|
+
import Button from '@mui/material/Button';
|
|
3
|
+
import type { ReactNode } from 'react';
|
|
4
|
+
export interface NeoToastProps extends Omit<AlertProps, 'variant' | 'severity' | 'color'> {
|
|
5
|
+
/**
|
|
6
|
+
* The visual style variant of the toast
|
|
7
|
+
* @default "default"
|
|
8
|
+
*/
|
|
9
|
+
variant?: 'default' | 'dark' | 'brand' | 'error' | 'success' | 'info' | 'download';
|
|
10
|
+
/**
|
|
11
|
+
* The title/header text
|
|
12
|
+
*/
|
|
13
|
+
title?: string;
|
|
14
|
+
/**
|
|
15
|
+
* The body/supporting text
|
|
16
|
+
*/
|
|
17
|
+
message?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Whether to show the close button
|
|
20
|
+
* @default true
|
|
21
|
+
*/
|
|
22
|
+
showClose?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Custom action buttons (for default toast types)
|
|
25
|
+
* Pass action buttons as children of this prop
|
|
26
|
+
*/
|
|
27
|
+
actions?: ReactNode;
|
|
28
|
+
/**
|
|
29
|
+
* Progress value (0-100) for download variant
|
|
30
|
+
*/
|
|
31
|
+
progress?: number;
|
|
32
|
+
/**
|
|
33
|
+
* File name for download variant
|
|
34
|
+
*/
|
|
35
|
+
fileName?: string;
|
|
36
|
+
/**
|
|
37
|
+
* Callback when close button is clicked
|
|
38
|
+
*/
|
|
39
|
+
onClose?: () => void;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* NeoToast - Notification/Toast component based on MUI Alert
|
|
43
|
+
*
|
|
44
|
+
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system---2025?node-id=4122-37223
|
|
45
|
+
*
|
|
46
|
+
* Figma Props Mapping:
|
|
47
|
+
* - type (Light mode|Dark mode|Brand color|Error|Success|Info|Download) → variant (default|dark|brand|error|success|info|download)
|
|
48
|
+
* - header → title (string)
|
|
49
|
+
* - supportingText → message (string)
|
|
50
|
+
* - xCloseButton → showClose (boolean)
|
|
51
|
+
* - actions → actions (ReactNode)
|
|
52
|
+
* - Progress bar → progress (number 0-100)
|
|
53
|
+
*/
|
|
54
|
+
export declare const NeoToast: {
|
|
55
|
+
({ variant, title, message, showClose, actions, progress, fileName, onClose, ...props }: NeoToastProps): import("react/jsx-runtime").JSX.Element;
|
|
56
|
+
displayName: string;
|
|
57
|
+
};
|
|
58
|
+
/**
|
|
59
|
+
* Helper component for creating toast action buttons with proper styling
|
|
60
|
+
*/
|
|
61
|
+
export declare const NeoToastButton: {
|
|
62
|
+
({ primary, variant, children, ...props }: {
|
|
63
|
+
primary?: boolean;
|
|
64
|
+
variant?: NeoToastProps["variant"];
|
|
65
|
+
children: ReactNode;
|
|
66
|
+
} & Omit<React.ComponentProps<typeof Button>, "variant">): import("react/jsx-runtime").JSX.Element;
|
|
67
|
+
displayName: string;
|
|
68
|
+
};
|