@moderneinc/neo-styled-components 3.0.0 → 4.0.0-next.572686

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.
@@ -0,0 +1,50 @@
1
+ import { type AlertProps } from '@mui/material/Alert';
2
+ import type { ReactNode } from 'react';
3
+ type Intent = 'success' | 'error' | 'warning' | 'offline' | 'info';
4
+ type AlertType = 'outlined' | 'filled';
5
+ export interface NeoAlertProps extends Omit<AlertProps, 'severity' | 'variant' | 'color'> {
6
+ /**
7
+ * The intent/purpose of the alert
8
+ * @default "success"
9
+ * @figma Intent
10
+ */
11
+ intent?: Intent;
12
+ /**
13
+ * Visual type: outlined (light bg) or filled (solid bg)
14
+ * @default "outlined"
15
+ * @figma Type
16
+ */
17
+ type?: AlertType;
18
+ /**
19
+ * The title text displayed in the alert
20
+ */
21
+ title: string;
22
+ /**
23
+ * Optional supporting description text
24
+ */
25
+ description?: string;
26
+ /**
27
+ * Custom icon to display (defaults to intent-based icon)
28
+ */
29
+ icon?: ReactNode;
30
+ /**
31
+ * Optional action element (typically a button) displayed on the right
32
+ */
33
+ action?: ReactNode;
34
+ }
35
+ /**
36
+ * NeoAlert - Alert component for displaying contextual status messages
37
+ *
38
+ * @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system---2025?node-id=4921-3427
39
+ *
40
+ * Figma Props Mapping:
41
+ * - Intent (Success|Error|Warning|Offline|Info) → intent
42
+ * - Type (Outlined|Filled) → type
43
+ * - Show supporting text → description prop presence
44
+ * - Show Button → action prop presence
45
+ */
46
+ export declare const NeoAlert: {
47
+ ({ intent, type, title, description, icon, action, ...props }: NeoAlertProps): import("react/jsx-runtime").JSX.Element;
48
+ displayName: string;
49
+ };
50
+ export {};
@@ -1,6 +1,6 @@
1
1
  import { GridFilterPanel as MuiGridFilterPanel } from '@mui/x-data-grid';
2
2
  import type React from 'react';
3
- import { NeoDropdown } from '../Dropdown/Dropdown';
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 { NeoDropdown as NeoDataGridSelect };
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;
@@ -12,11 +12,11 @@ export interface NeoDividerProps extends DividerProps {
12
12
  * @example
13
13
  * ```tsx
14
14
  * // In a menu
15
- * <NeoDropdownMenu>
16
- * <NeoDropdownMenuItem>Settings</NeoDropdownMenuItem>
15
+ * <NeoMenu>
16
+ * <NeoMenuItem>Settings</NeoMenuItem>
17
17
  * <NeoDivider />
18
- * <NeoDropdownMenuItem>Sign out</NeoDropdownMenuItem>
19
- * </NeoDropdownMenu>
18
+ * <NeoMenuItem>Sign out</NeoMenuItem>
19
+ * </NeoMenu>
20
20
  *
21
21
  * // In a card
22
22
  * <Card>
@@ -2,7 +2,7 @@ import { type ListItemButtonProps } from '@mui/material/ListItemButton';
2
2
  import type { ReactNode } from 'react';
3
3
  declare module '@mui/material/ListItemButton' {
4
4
  interface ListItemButtonPropsVariantOverrides {
5
- size?: 'small' | 'medium' | 'large' | 'xlarge' | 'xxlarge';
5
+ size?: 'small' | 'medium' | 'large' | 'xlarge' | 'xxlarge' | 'xxxlarge';
6
6
  }
7
7
  }
8
8
  /**
@@ -14,19 +14,19 @@ export interface NeoListItemProps extends Omit<ListItemButtonProps, 'children' |
14
14
  * @default "medium"
15
15
  * @figma size
16
16
  */
17
- size?: 'small' | 'medium' | 'large' | 'xlarge' | 'xxlarge';
17
+ size?: 'small' | 'medium' | 'large' | 'xlarge' | 'xxlarge' | 'xxxlarge';
18
18
  /**
19
19
  * Primary text content (required)
20
20
  * @figma Placeholder (primary text)
21
21
  */
22
22
  primaryText: ReactNode;
23
23
  /**
24
- * Secondary/supporting text content (optional, shown in large/xlarge/xxlarge)
24
+ * Secondary/supporting text content (optional, shown in large/xlarge/xxlarge/xxxlarge)
25
25
  * @figma Recipe name (secondary text)
26
26
  */
27
27
  secondaryText?: ReactNode;
28
28
  /**
29
- * Badge content for count display (optional, for xxlarge link variant)
29
+ * Badge content for count display (optional, for xxlarge/xxxlarge link variant)
30
30
  * @figma (# recipes)
31
31
  */
32
32
  badge?: ReactNode;
@@ -57,14 +57,14 @@ export interface NeoListItemProps extends Omit<ListItemButtonProps, 'children' |
57
57
  /**
58
58
  * NeoListItem - Flexible list item component with multiple size variants and states
59
59
  *
60
- * A versatile list item component built on MUI's ListItemButton that supports five size variants
61
- * (small to xxlarge), interactive states (default, selected, disabled, link), and optional
60
+ * A versatile list item component built on MUI's ListItemButton that supports six size variants
61
+ * (small to xxxlarge), interactive states (default, selected, disabled, link), and optional
62
62
  * icons/logos, secondary text, and badges.
63
63
  *
64
64
  * @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system---2025?node-id=4205-36442
65
65
  *
66
66
  * Figma Props Mapping:
67
- * - size (small|medium|large|xlarge|XXL) → size (small|medium|large|xlarge|xxlarge)
67
+ * - size (Small|Medium|Large|Extra Large|XX Large|TripleExtraLarge) → size (small|medium|large|xlarge|xxlarge|xxxlarge)
68
68
  * - state (default|active|disabled|link) → selected, disabled, isLink props
69
69
  * - showIcon → icon prop (pass ReactNode)
70
70
  * - showSupportingText → secondaryText prop (pass ReactNode)
@@ -1,12 +1,12 @@
1
1
  import { type MenuProps } from '@mui/material/Menu';
2
- export interface NeoDropdownMenuProps extends MenuProps {
2
+ export interface NeoMenuProps extends MenuProps {
3
3
  /**
4
- * Menu content (typically NeoDropdownMenuItem components)
4
+ * Menu content (typically NeoMenuItem components)
5
5
  */
6
6
  children?: React.ReactNode;
7
7
  }
8
8
  /**
9
- * NeoDropdownMenu - Dropdown menu component based on MUI Menu
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
- * <NeoDropdownMenu
19
+ * <NeoMenu
20
20
  * open={open}
21
21
  * anchorEl={anchorEl}
22
22
  * onClose={() => setAnchorEl(null)}
23
23
  * >
24
- * <NeoDropdownMenuItem icon={<Icon />} shortcut="⌘+P">View profile</NeoDropdownMenuItem>
25
- * <NeoDropdownMenuItem>Settings</NeoDropdownMenuItem>
26
- * </NeoDropdownMenu>
24
+ * <NeoMenuItem icon={<Icon />} shortcut="⌘+P">View profile</NeoMenuItem>
25
+ * <NeoMenuItem>Settings</NeoMenuItem>
26
+ * </NeoMenu>
27
27
  * ```
28
28
  */
29
- export declare const NeoDropdownMenu: {
30
- ({ children, ...props }: NeoDropdownMenuProps): import("react/jsx-runtime").JSX.Element;
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 NeoDropdownMenuItemProps extends MenuItemProps {
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
- * NeoDropdownMenuItem - Dropdown menu item component based on MUI MenuItem
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
- * <NeoDropdownMenuItem icon={<UserIcon />} shortcut="⌘+P">
35
+ * <NeoMenuItem icon={<UserIcon />} shortcut="⌘+P">
36
36
  * View profile
37
- * </NeoDropdownMenuItem>
37
+ * </NeoMenuItem>
38
38
  *
39
39
  * // With secondary text (user list pattern from Figma node 4305:41844)
40
- * <NeoDropdownMenuItem secondaryText="@phoenix">Phoenix Baker</NeoDropdownMenuItem>
41
- * <NeoDropdownMenuItem secondaryText="@olivia">Olivia Rhye</NeoDropdownMenuItem>
40
+ * <NeoMenuItem secondaryText="@phoenix">Phoenix Baker</NeoMenuItem>
41
+ * <NeoMenuItem secondaryText="@olivia">Olivia Rhye</NeoMenuItem>
42
42
  *
43
43
  * // Disabled state
44
- * <NeoDropdownMenuItem disabled>Disabled item</NeoDropdownMenuItem>
44
+ * <NeoMenuItem disabled>Disabled item</NeoMenuItem>
45
45
  * ```
46
46
  */
47
- export declare const NeoDropdownMenuItem: {
48
- ({ icon, shortcut, secondaryText, children, ...props }: NeoDropdownMenuItemProps): import("react/jsx-runtime").JSX.Element;
47
+ export declare const NeoMenuItem: {
48
+ ({ icon, shortcut, secondaryText, children, ...props }: NeoMenuItemProps): import("react/jsx-runtime").JSX.Element;
49
49
  displayName: string;
50
50
  };
@@ -1,6 +1,6 @@
1
- import { type ButtonBaseProps } from '@mui/material/ButtonBase';
2
- import type { ReactNode } from 'react';
3
- export interface NeoNavigationItemProps extends Omit<ButtonBaseProps, 'children'> {
1
+ import ButtonBase, { type ButtonBaseProps } from '@mui/material/ButtonBase';
2
+ import type { ComponentPropsWithoutRef, ElementType, ReactNode } from 'react';
3
+ type NeoNavigationItemOwnProps = {
4
4
  /**
5
5
  * Icon element to display
6
6
  */
@@ -24,13 +24,17 @@ export interface NeoNavigationItemProps extends Omit<ButtonBaseProps, 'children'
24
24
  * Additional content
25
25
  */
26
26
  children?: ReactNode;
27
- }
27
+ };
28
+ export type NeoNavigationItemProps<C extends ElementType = typeof ButtonBase> = NeoNavigationItemOwnProps & Omit<ButtonBaseProps, keyof NeoNavigationItemOwnProps | 'component'> & Omit<ComponentPropsWithoutRef<C>, keyof NeoNavigationItemOwnProps | keyof ButtonBaseProps> & {
29
+ component?: C;
30
+ };
28
31
  /**
29
32
  * NeoNavigationItem - Vertical navigation item with icon, label, and optional tag
30
33
  *
31
34
  * @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system---2025?node-id=8455-6120
32
35
  */
33
- export declare const NeoNavigationItem: {
34
- ({ icon, label, selected, tag, children, ...props }: NeoNavigationItemProps): import("react/jsx-runtime").JSX.Element;
35
- displayName: string;
36
- };
36
+ export declare function NeoNavigationItem<C extends ElementType = typeof ButtonBase>({ icon, label, selected, tag, children, ...props }: NeoNavigationItemProps<C>): import("react/jsx-runtime").JSX.Element;
37
+ export declare namespace NeoNavigationItem {
38
+ var displayName: string;
39
+ }
40
+ export {};
@@ -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 };
@@ -39,10 +39,7 @@ export interface NeoTabProps extends Omit<TabProps, 'label'> {
39
39
  *
40
40
  * Figma Props Mapping:
41
41
  * - Current=True/False → Controlled by parent NeoTabs value
42
- * - State=Defaultdefault styling
43
- * - State=Hover → CSS :hover
44
- * - State=Focus → CSS :focus-visible
45
- * - Tag count → count prop (renders NeoTag)
42
+ * - Show tag count prop (renders NeoTag)
46
43
  * - Text label → label prop
47
44
  */
48
45
  export declare const NeoTab: {
package/dist/Tag/Tag.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import Chip from '@mui/material/Chip';
1
+ import Chip, { type ChipProps } from '@mui/material/Chip';
2
2
  import type { ComponentPropsWithoutRef, ElementType } from 'react';
3
3
  declare module '@mui/material/Chip' {
4
4
  interface ChipPropsColorOverrides {
@@ -33,7 +33,7 @@ type NeoTagOwnProps = {
33
33
  */
34
34
  color?: 'default' | 'error' | 'warning' | 'success' | 'info' | 'violet' | 'beta';
35
35
  };
36
- export type NeoTagProps<C extends ElementType = typeof Chip> = NeoTagOwnProps & Omit<ComponentPropsWithoutRef<C>, keyof NeoTagOwnProps> & {
36
+ export type NeoTagProps<C extends ElementType = typeof Chip> = NeoTagOwnProps & Omit<ChipProps, keyof NeoTagOwnProps | 'component'> & Omit<ComponentPropsWithoutRef<C>, keyof NeoTagOwnProps | keyof ChipProps> & {
37
37
  component?: C;
38
38
  };
39
39
  /**