@moderneinc/neo-styled-components 2.6.0 → 2.7.0-next.4bcf59

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,7 @@
1
+ /**
2
+ * Shared color palette for avatar components (GeneralAvatar, NavigationAvatar).
3
+ * Maps color index (1-7) to background color token pairs.
4
+ */
5
+ export declare const avatarColorPalette: Record<number, {
6
+ bg: string;
7
+ }>;
@@ -1,10 +1,10 @@
1
1
  /**
2
- * Outline-based focus ring styles derived from Neo shadow tokens.
2
+ * Outline-based focus ring styles derived from Neo border tokens.
3
3
  * Uses CSS outline (not box-shadow) so focus rings are never clipped by overflow:hidden.
4
4
  *
5
- * Produces a double-ring effect: a white inner gap (via outline-offset) and a blue outer ring.
5
+ * Produces a double-ring effect: a white inner gap (via outline-offset) and a colored outer ring.
6
6
  */
7
7
  export declare const focusRingStyles: {
8
- readonly outline: `${number}px solid rgba(47, 66, 255, 1)`;
8
+ readonly outline: "2px solid #3bcca6";
9
9
  readonly outlineOffset: "2px";
10
10
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moderneinc/neo-styled-components",
3
- "version": "2.6.0",
3
+ "version": "2.7.0-next.4bcf59",
4
4
  "type": "module",
5
5
  "description": "Styled MUI components for Moderne applications",
6
6
  "main": "dist/index.js",
@@ -86,12 +86,12 @@
86
86
  "@semantic-release/github": "12.0.2",
87
87
  "@semantic-release/npm": "13.1.3",
88
88
  "@semantic-release/release-notes-generator": "14.1.0",
89
- "@types/node": "25.3.0",
89
+ "@types/node": "25.5.0",
90
90
  "@types/react": "^19.2.7",
91
91
  "conventional-changelog-conventionalcommits": "9.3.0",
92
92
  "mustache": "4.2.0",
93
93
  "rollup": "4.59.0",
94
- "rollup-plugin-dts": "6.3.0",
94
+ "rollup-plugin-dts": "6.4.0",
95
95
  "semantic-release": "25.0.2",
96
96
  "tslib": "2.8.1",
97
97
  "typescript": "5.9.2"
@@ -1,41 +0,0 @@
1
- import { type ButtonGroupProps as MuiButtonGroupProps } from '@mui/material/ButtonGroup';
2
- type ButtonGroupSize = 'small' | 'medium';
3
- export interface NeoButtonGroupProps extends Omit<MuiButtonGroupProps, 'size' | 'variant'> {
4
- /**
5
- * The size of the button group
6
- * @default "medium"
7
- *
8
- * @figma Size=Sm → small, Size=Md → medium
9
- */
10
- size?: ButtonGroupSize;
11
- /**
12
- * The visual variant of the buttons
13
- * ButtonGroup uses a fixed outlined style from the design
14
- */
15
- variant?: 'outlined';
16
- }
17
- /**
18
- * NeoButtonGroup - Button group component based on MUI ButtonGroup
19
- *
20
- * @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system---2025?node-id=4106-11129
21
- *
22
- * Figma Props Mapping:
23
- * - Size (Sm|Md) → size prop (small|medium)
24
- * - Active button state → Controlled externally via button props or classes
25
- *
26
- * Usage:
27
- * ```tsx
28
- * <NeoButtonGroup size="medium">
29
- * <NeoButton>Button 1</NeoButton>
30
- * <NeoButton>Button 2</NeoButton>
31
- * <NeoButton>Button 3</NeoButton>
32
- * </NeoButtonGroup>
33
- * ```
34
- *
35
- * Note: To show active state, add 'active' class to the selected button
36
- */
37
- export declare const NeoButtonGroup: {
38
- ({ size, variant, ...props }: NeoButtonGroupProps): import("react/jsx-runtime").JSX.Element;
39
- displayName: string;
40
- };
41
- export {};
@@ -1,45 +0,0 @@
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
- * @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system---2025?node-id=4305-41844 (Dropdown list pattern)
13
- *
14
- * Figma Props Mapping:
15
- * - Container shown in Figma is the Menu Paper component
16
- * - Menu items are styled separately via NeoMenuItem
17
- * - Any trigger component (Button, IconButton, etc.) can open the menu
18
- *
19
- * @example
20
- * ```tsx
21
- * const [anchorEl, setAnchorEl] = useState<null | HTMLElement>(null);
22
- * const open = Boolean(anchorEl);
23
- *
24
- * // Standard menu with icons and shortcuts
25
- * <Button onClick={(e) => setAnchorEl(e.currentTarget)}>Open Menu</Button>
26
- * <NeoMenu
27
- * open={open}
28
- * anchorEl={anchorEl}
29
- * onClose={() => setAnchorEl(null)}
30
- * >
31
- * <NeoMenuItem icon={<Icon />} shortcut="⌘+P">View profile</NeoMenuItem>
32
- * <NeoMenuItem>Settings</NeoMenuItem>
33
- * </NeoMenu>
34
- *
35
- * // Dropdown list with secondary text (user list pattern)
36
- * <NeoMenu open={open} anchorEl={anchorEl} onClose={() => setAnchorEl(null)}>
37
- * <NeoMenuItem secondaryText="@phoenix">Phoenix Baker</NeoMenuItem>
38
- * <NeoMenuItem secondaryText="@olivia" selected>Olivia Rhye</NeoMenuItem>
39
- * </NeoMenu>
40
- * ```
41
- */
42
- export declare const NeoMenu: {
43
- ({ children, ...props }: NeoMenuProps): import("react/jsx-runtime").JSX.Element;
44
- displayName: string;
45
- };
@@ -1,61 +0,0 @@
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
- * Note: Cannot be directly mapped from Figma (ReactNode)
7
- */
8
- icon?: ReactNode;
9
- /**
10
- * Optional keyboard shortcut to display on the right side
11
- * @example "⌘+P" or "Ctrl+K"
12
- * Note: Cannot be directly mapped from Figma (ReactNode/string)
13
- */
14
- shortcut?: string;
15
- /**
16
- * Optional secondary text to display next to the primary label
17
- * @example "@username" or supporting text
18
- * Note: Cannot be directly mapped from Figma (ReactNode/string)
19
- */
20
- secondaryText?: string;
21
- /**
22
- * Menu item content (text label)
23
- * @figma children mapped from Figma layer content
24
- */
25
- children?: ReactNode;
26
- }
27
- /**
28
- * NeoMenuItem - Menu item component based on MUI MenuItem
29
- *
30
- * @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system---2025?node-id=4159-8649
31
- *
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.
35
- * - Text label → children prop (mapped via figma.children)
36
- * - selected → selected prop (React-controlled)
37
- * - disabled → disabled prop (React-controlled)
38
- * - Hover state → CSS :hover (not mapped)
39
- * - Icon slot → icon prop (not mappable - ReactNode)
40
- * - Secondary text → secondaryText prop (not mappable - ReactNode/string)
41
- * - Keyboard shortcut → shortcut prop (not mappable - ReactNode/string)
42
- *
43
- * @example
44
- * ```tsx
45
- * // With icon and shortcut
46
- * <NeoMenuItem icon={<UserIcon />} shortcut="⌘+P">
47
- * View profile
48
- * </NeoMenuItem>
49
- *
50
- * // With secondary text (user list pattern from Figma node 4305:41844)
51
- * <NeoMenuItem secondaryText="@phoenix">Phoenix Baker</NeoMenuItem>
52
- * <NeoMenuItem secondaryText="@olivia">Olivia Rhye</NeoMenuItem>
53
- *
54
- * // Disabled state
55
- * <NeoMenuItem disabled>Disabled item</NeoMenuItem>
56
- * ```
57
- */
58
- export declare const NeoMenuItem: {
59
- ({ icon, shortcut, secondaryText, children, ...props }: NeoMenuItemProps): import("react/jsx-runtime").JSX.Element;
60
- displayName: string;
61
- };
@@ -1,24 +0,0 @@
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 dropdown 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 };