@moderneinc/neo-styled-components 4.0.0-next.557dc6 → 4.0.0-next.75a01f
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/DataGridFilterPanel/DataGridFilterPanel.d.ts +2 -2
- package/dist/DatePicker/DatePicker.d.ts +3 -5
- package/dist/Divider/Divider.d.ts +4 -4
- package/dist/{DropdownMenu/DropdownMenu.d.ts → Menu/Menu.d.ts} +9 -9
- package/dist/{DropdownMenuItem/DropdownMenuItem.d.ts → MenuItem/MenuItem.d.ts} +9 -9
- package/dist/Select/Select.d.ts +24 -0
- package/dist/Tag/Tag.d.ts +11 -12
- package/dist/Toast/Toast.d.ts +20 -14
- package/dist/Tooltip/Tooltip.d.ts +3 -3
- package/dist/index.d.ts +74 -118
- package/dist/index.esm.js +129 -214
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +137 -224
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/Dropdown/Dropdown.d.ts +0 -24
- package/dist/MarketplaceCard/MarketplaceCard.d.ts +0 -23
- package/dist/MarketplaceLargeCard/MarketplaceLargeCard.d.ts +0 -23
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { GridFilterPanel as MuiGridFilterPanel } from '@mui/x-data-grid';
|
|
2
2
|
import type React from 'react';
|
|
3
|
-
import {
|
|
3
|
+
import { NeoSelect } from '../Select/Select';
|
|
4
4
|
export type { GridFilterItem as FilterItem, GridFilterOperator as FilterOperator, } from '@mui/x-data-grid';
|
|
5
5
|
/**
|
|
6
6
|
* Icon components for DataGrid filter panel slots
|
|
@@ -50,7 +50,7 @@ export declare const NeoDataGridFilterPanelRemoveAllIcon: {
|
|
|
50
50
|
* />
|
|
51
51
|
* ```
|
|
52
52
|
*/
|
|
53
|
-
export {
|
|
53
|
+
export { NeoSelect as NeoDataGridSelect };
|
|
54
54
|
export declare const NeoDataGridFilterPanel: {
|
|
55
55
|
(props: React.ComponentProps<typeof MuiGridFilterPanel>): import("react/jsx-runtime").JSX.Element;
|
|
56
56
|
displayName: string;
|
|
@@ -10,13 +10,12 @@ export interface NeoDatePickerProps {
|
|
|
10
10
|
/**
|
|
11
11
|
* Type of date picker to render
|
|
12
12
|
* @default "single"
|
|
13
|
-
* @figma
|
|
13
|
+
* @figma Mode
|
|
14
14
|
*/
|
|
15
15
|
type?: DatePickerType;
|
|
16
16
|
/**
|
|
17
17
|
* Whether the picker is open
|
|
18
18
|
* When not provided, the picker manages its own open state (uncontrolled mode)
|
|
19
|
-
* @figma opened
|
|
20
19
|
*/
|
|
21
20
|
open?: boolean;
|
|
22
21
|
/**
|
|
@@ -85,11 +84,10 @@ export interface NeoDatePickerProps {
|
|
|
85
84
|
* customization. Supports both single date selection and date range selection with
|
|
86
85
|
* built-in shortcuts.
|
|
87
86
|
*
|
|
88
|
-
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system---2025?node-id=4176-
|
|
87
|
+
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system---2025?node-id=4176-8593
|
|
89
88
|
*
|
|
90
89
|
* Figma Props Mapping:
|
|
91
|
-
* -
|
|
92
|
-
* - type ('Single date'|'Dual dates') → type ('single'|'range')
|
|
90
|
+
* - Mode ('Single'|'Range') → type ('single'|'range')
|
|
93
91
|
*
|
|
94
92
|
* Design Tokens Used:
|
|
95
93
|
* - colors: semanticColors.grey[800], semanticColors.grey[700], semanticColors.surfaces.white, semanticColors.icons.hoverBackground
|
|
@@ -12,11 +12,11 @@ export interface NeoDividerProps extends DividerProps {
|
|
|
12
12
|
* @example
|
|
13
13
|
* ```tsx
|
|
14
14
|
* // In a menu
|
|
15
|
-
* <
|
|
16
|
-
* <
|
|
15
|
+
* <NeoMenu>
|
|
16
|
+
* <NeoMenuItem>Settings</NeoMenuItem>
|
|
17
17
|
* <NeoDivider />
|
|
18
|
-
* <
|
|
19
|
-
* </
|
|
18
|
+
* <NeoMenuItem>Sign out</NeoMenuItem>
|
|
19
|
+
* </NeoMenu>
|
|
20
20
|
*
|
|
21
21
|
* // In a card
|
|
22
22
|
* <Card>
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { type MenuProps } from '@mui/material/Menu';
|
|
2
|
-
export interface
|
|
2
|
+
export interface NeoMenuProps extends MenuProps {
|
|
3
3
|
/**
|
|
4
|
-
* Menu content (typically
|
|
4
|
+
* Menu content (typically NeoMenuItem components)
|
|
5
5
|
*/
|
|
6
6
|
children?: React.ReactNode;
|
|
7
7
|
}
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
9
|
+
* NeoMenu - Menu component based on MUI Menu
|
|
10
10
|
*
|
|
11
11
|
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system---2025?node-id=11141-4980
|
|
12
12
|
*
|
|
@@ -16,17 +16,17 @@ export interface NeoDropdownMenuProps extends MenuProps {
|
|
|
16
16
|
* const open = Boolean(anchorEl);
|
|
17
17
|
*
|
|
18
18
|
* <Button onClick={(e) => setAnchorEl(e.currentTarget)}>Open Menu</Button>
|
|
19
|
-
* <
|
|
19
|
+
* <NeoMenu
|
|
20
20
|
* open={open}
|
|
21
21
|
* anchorEl={anchorEl}
|
|
22
22
|
* onClose={() => setAnchorEl(null)}
|
|
23
23
|
* >
|
|
24
|
-
* <
|
|
25
|
-
* <
|
|
26
|
-
* </
|
|
24
|
+
* <NeoMenuItem icon={<Icon />} shortcut="⌘+P">View profile</NeoMenuItem>
|
|
25
|
+
* <NeoMenuItem>Settings</NeoMenuItem>
|
|
26
|
+
* </NeoMenu>
|
|
27
27
|
* ```
|
|
28
28
|
*/
|
|
29
|
-
export declare const
|
|
30
|
-
({ children, ...props }:
|
|
29
|
+
export declare const NeoMenu: {
|
|
30
|
+
({ children, ...props }: NeoMenuProps): import("react/jsx-runtime").JSX.Element;
|
|
31
31
|
displayName: string;
|
|
32
32
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type MenuItemProps } from '@mui/material/MenuItem';
|
|
2
2
|
import type { ReactNode } from 'react';
|
|
3
|
-
export interface
|
|
3
|
+
export interface NeoMenuItemProps extends MenuItemProps {
|
|
4
4
|
/**
|
|
5
5
|
* Optional icon to display on the left side
|
|
6
6
|
* Note: Cannot be directly mapped from Figma (ReactNode)
|
|
@@ -25,26 +25,26 @@ export interface NeoDropdownMenuItemProps extends MenuItemProps {
|
|
|
25
25
|
children?: ReactNode;
|
|
26
26
|
}
|
|
27
27
|
/**
|
|
28
|
-
*
|
|
28
|
+
* NeoMenuItem - Menu item component based on MUI MenuItem
|
|
29
29
|
*
|
|
30
30
|
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system---2025?node-id=4159-8584
|
|
31
31
|
*
|
|
32
32
|
* @example
|
|
33
33
|
* ```tsx
|
|
34
34
|
* // With icon and shortcut
|
|
35
|
-
* <
|
|
35
|
+
* <NeoMenuItem icon={<UserIcon />} shortcut="⌘+P">
|
|
36
36
|
* View profile
|
|
37
|
-
* </
|
|
37
|
+
* </NeoMenuItem>
|
|
38
38
|
*
|
|
39
39
|
* // With secondary text (user list pattern from Figma node 4305:41844)
|
|
40
|
-
* <
|
|
41
|
-
* <
|
|
40
|
+
* <NeoMenuItem secondaryText="@phoenix">Phoenix Baker</NeoMenuItem>
|
|
41
|
+
* <NeoMenuItem secondaryText="@olivia">Olivia Rhye</NeoMenuItem>
|
|
42
42
|
*
|
|
43
43
|
* // Disabled state
|
|
44
|
-
* <
|
|
44
|
+
* <NeoMenuItem disabled>Disabled item</NeoMenuItem>
|
|
45
45
|
* ```
|
|
46
46
|
*/
|
|
47
|
-
export declare const
|
|
48
|
-
({ icon, shortcut, secondaryText, children, ...props }:
|
|
47
|
+
export declare const NeoMenuItem: {
|
|
48
|
+
({ icon, shortcut, secondaryText, children, ...props }: NeoMenuItemProps): import("react/jsx-runtime").JSX.Element;
|
|
49
49
|
displayName: string;
|
|
50
50
|
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { type SelectProps as MuiSelectProps } from '@mui/material/Select';
|
|
2
|
+
import { NeoMenuItem } from '../MenuItem/MenuItem';
|
|
3
|
+
export type NeoSelectProps = MuiSelectProps;
|
|
4
|
+
/**
|
|
5
|
+
* NeoSelect - Select component with Neo design system styling
|
|
6
|
+
*
|
|
7
|
+
* A styled version of MUI's Select that uses Neo design tokens, Lucide ChevronDown icon,
|
|
8
|
+
* and NeoMenu/NeoMenuItem for the dropdown list.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```tsx
|
|
12
|
+
* import { NeoSelect, NeoSelectOption } from '@moderneinc/neo-styled-components'
|
|
13
|
+
*
|
|
14
|
+
* <NeoSelect value={value} onChange={handleChange}>
|
|
15
|
+
* <NeoSelectOption value="option1">Option 1</NeoSelectOption>
|
|
16
|
+
* <NeoSelectOption value="option2">Option 2</NeoSelectOption>
|
|
17
|
+
* </NeoSelect>
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
export declare const NeoSelect: {
|
|
21
|
+
(props: NeoSelectProps): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
displayName: string;
|
|
23
|
+
};
|
|
24
|
+
export { NeoMenuItem as NeoSelectOption };
|
package/dist/Tag/Tag.d.ts
CHANGED
|
@@ -3,7 +3,6 @@ import type { ComponentPropsWithoutRef, ElementType } from 'react';
|
|
|
3
3
|
declare module '@mui/material/Chip' {
|
|
4
4
|
interface ChipPropsColorOverrides {
|
|
5
5
|
violet: true;
|
|
6
|
-
beta: true;
|
|
7
6
|
}
|
|
8
7
|
interface ChipPropsSizeOverrides {
|
|
9
8
|
large: true;
|
|
@@ -16,24 +15,24 @@ declare module '@mui/material/Chip' {
|
|
|
16
15
|
type NeoTagOwnProps = {
|
|
17
16
|
/**
|
|
18
17
|
* The size of the tag
|
|
19
|
-
* @figma
|
|
18
|
+
* @figma Size (Small|Medium|Large)
|
|
20
19
|
* @default "small"
|
|
21
20
|
*/
|
|
22
21
|
size?: 'small' | 'medium' | 'large';
|
|
23
22
|
/**
|
|
24
23
|
* The variant style of the tag
|
|
25
|
-
* @figma
|
|
24
|
+
* @figma Variant (Subtle|Filled)
|
|
26
25
|
* @default "outlined"
|
|
27
26
|
*/
|
|
28
27
|
variant?: 'outlined' | 'filled';
|
|
29
28
|
/**
|
|
30
|
-
* The
|
|
31
|
-
* @figma
|
|
29
|
+
* The intent/purpose of the tag
|
|
30
|
+
* @figma Intent (Neutral|Error|Warning|Success|Info|Violet)
|
|
32
31
|
* @default "default"
|
|
33
32
|
*/
|
|
34
|
-
|
|
33
|
+
intent?: 'default' | 'error' | 'warning' | 'success' | 'info' | 'violet';
|
|
35
34
|
};
|
|
36
|
-
export type NeoTagProps<C extends ElementType = typeof Chip> = NeoTagOwnProps & Omit<ChipProps, keyof NeoTagOwnProps | 'component'> & Omit<ComponentPropsWithoutRef<C>, keyof NeoTagOwnProps | keyof ChipProps> & {
|
|
35
|
+
export type NeoTagProps<C extends ElementType = typeof Chip> = NeoTagOwnProps & Omit<ChipProps, keyof NeoTagOwnProps | 'component' | 'color'> & Omit<ComponentPropsWithoutRef<C>, keyof NeoTagOwnProps | keyof ChipProps> & {
|
|
37
36
|
component?: C;
|
|
38
37
|
};
|
|
39
38
|
/**
|
|
@@ -42,12 +41,12 @@ export type NeoTagProps<C extends ElementType = typeof Chip> = NeoTagOwnProps &
|
|
|
42
41
|
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system---2025?node-id=4120-34533
|
|
43
42
|
*
|
|
44
43
|
* Figma Props Mapping:
|
|
45
|
-
* -
|
|
46
|
-
* -
|
|
47
|
-
* -
|
|
48
|
-
* - Label
|
|
44
|
+
* - Size (Small|Medium|Large) → size (small|medium|large)
|
|
45
|
+
* - Variant (Subtle|Filled) → variant (outlined|filled)
|
|
46
|
+
* - Intent (Neutral|Error|Warning|Success|Info|Violet) → intent (default|error|warning|success|info|violet)
|
|
47
|
+
* - TEXT Label → label prop
|
|
49
48
|
*/
|
|
50
|
-
export declare function NeoTag<C extends ElementType = typeof Chip>({ size, variant, ...props }: NeoTagProps<C>): import("react/jsx-runtime").JSX.Element;
|
|
49
|
+
export declare function NeoTag<C extends ElementType = typeof Chip>({ size, variant, intent, ...props }: NeoTagProps<C>): import("react/jsx-runtime").JSX.Element;
|
|
51
50
|
export declare namespace NeoTag {
|
|
52
51
|
var displayName: string;
|
|
53
52
|
}
|
package/dist/Toast/Toast.d.ts
CHANGED
|
@@ -1,12 +1,23 @@
|
|
|
1
1
|
import { type AlertProps } from '@mui/material/Alert';
|
|
2
2
|
import Button from '@mui/material/Button';
|
|
3
3
|
import type { ReactNode } from 'react';
|
|
4
|
+
type Intent = 'neutral' | 'info' | 'success' | 'error' | 'warning';
|
|
5
|
+
type ToastType = 'outlined' | 'filled';
|
|
4
6
|
export interface NeoToastProps extends Omit<AlertProps, 'variant' | 'severity' | 'color'> {
|
|
5
7
|
/**
|
|
6
|
-
* The
|
|
7
|
-
* @default "
|
|
8
|
+
* The intent/purpose of the toast
|
|
9
|
+
* @default "neutral"
|
|
10
|
+
*
|
|
11
|
+
* @figmaPropMapping Intent (Neutral|Error|Success|Info|Warning) → intent
|
|
8
12
|
*/
|
|
9
|
-
|
|
13
|
+
intent?: Intent;
|
|
14
|
+
/**
|
|
15
|
+
* Visual type: outlined (light bg + border) or filled (solid bg)
|
|
16
|
+
* @default "outlined"
|
|
17
|
+
*
|
|
18
|
+
* @figmaPropMapping Style (Outlined|Filled) → type
|
|
19
|
+
*/
|
|
20
|
+
type?: ToastType;
|
|
10
21
|
/**
|
|
11
22
|
* The title/header text
|
|
12
23
|
*/
|
|
@@ -17,7 +28,7 @@ export interface NeoToastProps extends Omit<AlertProps, 'variant' | 'severity' |
|
|
|
17
28
|
message?: string;
|
|
18
29
|
/**
|
|
19
30
|
* Whether to show the close button
|
|
20
|
-
* @default
|
|
31
|
+
* @default false
|
|
21
32
|
*/
|
|
22
33
|
showClose?: boolean;
|
|
23
34
|
/**
|
|
@@ -34,26 +45,21 @@ export interface NeoToastProps extends Omit<AlertProps, 'variant' | 'severity' |
|
|
|
34
45
|
* NeoToast - Notification/Toast component based on MUI Alert
|
|
35
46
|
*
|
|
36
47
|
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system---2025?node-id=4122-37223
|
|
37
|
-
*
|
|
38
|
-
* Figma Props Mapping:
|
|
39
|
-
* - type (Light mode|Dark mode|Brand color|Error|Success|Info) → variant (default|dark|brand|error|success|info)
|
|
40
|
-
* - header → title (string)
|
|
41
|
-
* - supportingText → message (string)
|
|
42
|
-
* - xCloseButton → showClose (boolean)
|
|
43
|
-
* - actions → actions (ReactNode)
|
|
44
48
|
*/
|
|
45
49
|
export declare const NeoToast: {
|
|
46
|
-
({
|
|
50
|
+
({ intent, type, title, message, showClose, actions, onClose, ...props }: NeoToastProps): import("react/jsx-runtime").JSX.Element;
|
|
47
51
|
displayName: string;
|
|
48
52
|
};
|
|
49
53
|
/**
|
|
50
54
|
* Helper component for creating toast action buttons with proper styling
|
|
51
55
|
*/
|
|
52
56
|
export declare const NeoToastButton: {
|
|
53
|
-
({ primary,
|
|
57
|
+
({ primary, intent, type, children, ...props }: {
|
|
54
58
|
primary?: boolean;
|
|
55
|
-
|
|
59
|
+
intent?: Intent;
|
|
60
|
+
type?: ToastType;
|
|
56
61
|
children: ReactNode;
|
|
57
62
|
} & Omit<React.ComponentProps<typeof Button>, "variant">): import("react/jsx-runtime").JSX.Element;
|
|
58
63
|
displayName: string;
|
|
59
64
|
};
|
|
65
|
+
export {};
|
|
@@ -10,7 +10,7 @@ export interface NeoTooltipProps extends Omit<TooltipProps, 'title' | 'variant'>
|
|
|
10
10
|
/**
|
|
11
11
|
* The visual style variant
|
|
12
12
|
* @default "light"
|
|
13
|
-
* @figma
|
|
13
|
+
* @figma Theme
|
|
14
14
|
*/
|
|
15
15
|
variant?: TooltipVariant;
|
|
16
16
|
/**
|
|
@@ -35,8 +35,8 @@ export interface NeoTooltipProps extends Omit<TooltipProps, 'title' | 'variant'>
|
|
|
35
35
|
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system---2025?node-id=4091-26557&t=Bo58EpFmg6ILJtmv-11
|
|
36
36
|
*
|
|
37
37
|
* Figma Props Mapping:
|
|
38
|
-
* -
|
|
39
|
-
* -
|
|
38
|
+
* - Theme (Light mode|Dark mode|Brand color) → variant ('light'|'dark'|'brand')
|
|
39
|
+
* - Placement → arrow (boolean) + placement (top/bottom/left/right/etc)
|
|
40
40
|
* - Supporting text (True|False) → description (string|undefined)
|
|
41
41
|
* - text → title (string, literal content)
|
|
42
42
|
*
|