@moderneinc/neo-styled-components 2.5.0-next.80ef49 → 2.5.0-next.a04193
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/Button/Button.d.ts +13 -4
- package/dist/Tree/Tree.d.ts +31 -15
- package/dist/index.d.ts +92 -6
- package/dist/index.esm.js +165 -5
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +182 -20
- package/dist/index.js.map +1 -1
- package/package.json +24 -2
package/dist/Button/Button.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import ButtonBase from '@mui/material/ButtonBase';
|
|
2
|
-
import
|
|
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,9 +7,10 @@ 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
|
/**
|
|
@@ -41,6 +42,14 @@ type NeoButtonOwnProps = {
|
|
|
41
42
|
* URL to link to. When provided, the button renders as a link element.
|
|
42
43
|
*/
|
|
43
44
|
href?: string;
|
|
45
|
+
/**
|
|
46
|
+
* Icon placed before the button label
|
|
47
|
+
*/
|
|
48
|
+
startIcon?: ReactNode;
|
|
49
|
+
/**
|
|
50
|
+
* Icon placed after the button label
|
|
51
|
+
*/
|
|
52
|
+
endIcon?: ReactNode;
|
|
44
53
|
};
|
|
45
54
|
export type NeoButtonProps<C extends ElementType = typeof ButtonBase> = NeoButtonOwnProps & Omit<React.ComponentPropsWithoutRef<C>, keyof NeoButtonOwnProps> & {
|
|
46
55
|
component?: C;
|
|
@@ -51,7 +60,7 @@ export type NeoButtonProps<C extends ElementType = typeof ButtonBase> = NeoButto
|
|
|
51
60
|
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system---2025?node-id=4086-7590
|
|
52
61
|
*
|
|
53
62
|
* Figma Props Mapping:
|
|
54
|
-
* - Hierarchy (Primary|Secondary|Destructive|Link|Link Color) → variant prop
|
|
63
|
+
* - Hierarchy (Primary|Secondary|Destructive|Link|Link Color|Tertiary) → variant prop
|
|
55
64
|
* - Size (Small|Medium) → size prop
|
|
56
65
|
* - State=Disabled → disabled prop
|
|
57
66
|
* - State=Loading → loading prop
|
|
@@ -59,7 +68,7 @@ export type NeoButtonProps<C extends ElementType = typeof ButtonBase> = NeoButto
|
|
|
59
68
|
* - State=Pressed → CSS :active
|
|
60
69
|
* - State=Focused → CSS :focus-visible
|
|
61
70
|
*/
|
|
62
|
-
export declare function NeoButton<C extends ElementType = typeof ButtonBase>({ variant, size, loading, children, disabled, ...rest }: NeoButtonProps<C>): import("react/jsx-runtime").JSX.Element;
|
|
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;
|
|
63
72
|
export declare namespace NeoButton {
|
|
64
73
|
var displayName: string;
|
|
65
74
|
}
|
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
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -40,6 +40,8 @@ import { DatePickerProps } from '@mui/x-date-pickers/DatePicker';
|
|
|
40
40
|
import { PickersShortcutsItem } from '@mui/x-date-pickers/PickersShortcuts';
|
|
41
41
|
import { DateRangePickerProps } from '@mui/x-date-pickers-pro/DateRangePicker';
|
|
42
42
|
import { DateRange } from '@mui/x-date-pickers-pro/models';
|
|
43
|
+
import { TreeItemProps } from '@mui/x-tree-view/TreeItem';
|
|
44
|
+
import { RichTreeViewProProps } from '@mui/x-tree-view-pro/RichTreeViewPro';
|
|
43
45
|
|
|
44
46
|
interface NeoFooterProps {
|
|
45
47
|
/**
|
|
@@ -489,9 +491,10 @@ declare module '@mui/material/ButtonBase' {
|
|
|
489
491
|
destructive: true;
|
|
490
492
|
link: true;
|
|
491
493
|
linkColor: true;
|
|
494
|
+
tertiary: true;
|
|
492
495
|
}
|
|
493
496
|
}
|
|
494
|
-
type ButtonVariant = 'primary' | 'secondary' | 'destructive' | 'link' | 'linkColor';
|
|
497
|
+
type ButtonVariant = 'primary' | 'secondary' | 'destructive' | 'link' | 'linkColor' | 'tertiary';
|
|
495
498
|
type ButtonSize = 'small' | 'medium';
|
|
496
499
|
type NeoButtonOwnProps = {
|
|
497
500
|
/**
|
|
@@ -523,8 +526,16 @@ type NeoButtonOwnProps = {
|
|
|
523
526
|
* URL to link to. When provided, the button renders as a link element.
|
|
524
527
|
*/
|
|
525
528
|
href?: string;
|
|
529
|
+
/**
|
|
530
|
+
* Icon placed before the button label
|
|
531
|
+
*/
|
|
532
|
+
startIcon?: ReactNode;
|
|
533
|
+
/**
|
|
534
|
+
* Icon placed after the button label
|
|
535
|
+
*/
|
|
536
|
+
endIcon?: ReactNode;
|
|
526
537
|
};
|
|
527
|
-
type NeoButtonProps<C extends ElementType = typeof ButtonBase__default> = NeoButtonOwnProps & Omit<
|
|
538
|
+
type NeoButtonProps<C extends ElementType = typeof ButtonBase__default> = NeoButtonOwnProps & Omit<React__default.ComponentPropsWithoutRef<C>, keyof NeoButtonOwnProps> & {
|
|
528
539
|
component?: C;
|
|
529
540
|
};
|
|
530
541
|
/**
|
|
@@ -533,7 +544,7 @@ type NeoButtonProps<C extends ElementType = typeof ButtonBase__default> = NeoBut
|
|
|
533
544
|
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system---2025?node-id=4086-7590
|
|
534
545
|
*
|
|
535
546
|
* Figma Props Mapping:
|
|
536
|
-
* - Hierarchy (Primary|Secondary|Destructive|Link|Link Color) → variant prop
|
|
547
|
+
* - Hierarchy (Primary|Secondary|Destructive|Link|Link Color|Tertiary) → variant prop
|
|
537
548
|
* - Size (Small|Medium) → size prop
|
|
538
549
|
* - State=Disabled → disabled prop
|
|
539
550
|
* - State=Loading → loading prop
|
|
@@ -541,7 +552,7 @@ type NeoButtonProps<C extends ElementType = typeof ButtonBase__default> = NeoBut
|
|
|
541
552
|
* - State=Pressed → CSS :active
|
|
542
553
|
* - State=Focused → CSS :focus-visible
|
|
543
554
|
*/
|
|
544
|
-
declare function NeoButton<C extends ElementType = typeof ButtonBase__default>({ variant, size, loading, children, disabled, ...rest }: NeoButtonProps<C>): react_jsx_runtime.JSX.Element;
|
|
555
|
+
declare function NeoButton<C extends ElementType = typeof ButtonBase__default>({ variant, size, loading, children, disabled, startIcon, endIcon, ...rest }: NeoButtonProps<C>): react_jsx_runtime.JSX.Element;
|
|
545
556
|
declare namespace NeoButton {
|
|
546
557
|
var displayName: string;
|
|
547
558
|
}
|
|
@@ -1650,6 +1661,41 @@ declare const NeoModalFooter: {
|
|
|
1650
1661
|
displayName: string;
|
|
1651
1662
|
};
|
|
1652
1663
|
|
|
1664
|
+
interface NeoNavigationItemProps extends Omit<ButtonBaseProps, 'children'> {
|
|
1665
|
+
/**
|
|
1666
|
+
* Icon element to display
|
|
1667
|
+
*/
|
|
1668
|
+
icon?: ReactNode;
|
|
1669
|
+
/**
|
|
1670
|
+
* Text label below the icon
|
|
1671
|
+
*/
|
|
1672
|
+
label?: string;
|
|
1673
|
+
/**
|
|
1674
|
+
* Whether the item is selected/active
|
|
1675
|
+
* @figma State (Selected)
|
|
1676
|
+
* @default false
|
|
1677
|
+
*/
|
|
1678
|
+
selected?: boolean;
|
|
1679
|
+
/**
|
|
1680
|
+
* Optional tag badge content (e.g., count)
|
|
1681
|
+
* @figma Tag
|
|
1682
|
+
*/
|
|
1683
|
+
tag?: string;
|
|
1684
|
+
/**
|
|
1685
|
+
* Additional content
|
|
1686
|
+
*/
|
|
1687
|
+
children?: ReactNode;
|
|
1688
|
+
}
|
|
1689
|
+
/**
|
|
1690
|
+
* NeoNavigationItem - Vertical navigation item with icon, label, and optional tag
|
|
1691
|
+
*
|
|
1692
|
+
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system---2025?node-id=8455-6120
|
|
1693
|
+
*/
|
|
1694
|
+
declare const NeoNavigationItem: {
|
|
1695
|
+
({ icon, label, selected, tag, children, ...props }: NeoNavigationItemProps): react_jsx_runtime.JSX.Element;
|
|
1696
|
+
displayName: string;
|
|
1697
|
+
};
|
|
1698
|
+
|
|
1653
1699
|
/**
|
|
1654
1700
|
* Breadcrumb item configuration
|
|
1655
1701
|
*/
|
|
@@ -2808,6 +2854,46 @@ declare const NeoDatePicker: {
|
|
|
2808
2854
|
displayName: string;
|
|
2809
2855
|
};
|
|
2810
2856
|
|
|
2857
|
+
/**
|
|
2858
|
+
* Extended item data that NeoTreeItem can read from the items array.
|
|
2859
|
+
* Consumers pass these via the `items` prop on NeoTreeView.
|
|
2860
|
+
*/
|
|
2861
|
+
interface NeoTreeItemData {
|
|
2862
|
+
id: string;
|
|
2863
|
+
label: string;
|
|
2864
|
+
icon?: ReactNode;
|
|
2865
|
+
checkbox?: ReactNode;
|
|
2866
|
+
secondaryLabel?: ReactNode;
|
|
2867
|
+
endAction?: ReactNode;
|
|
2868
|
+
statusIcon?: ReactNode;
|
|
2869
|
+
children?: NeoTreeItemData[];
|
|
2870
|
+
}
|
|
2871
|
+
type NeoTreeItemProps = TreeItemProps;
|
|
2872
|
+
/**
|
|
2873
|
+
* NeoTreeItem - Styled tree item row with optional icon, checkbox,
|
|
2874
|
+
* secondaryLabel, endAction, and statusIcon slots.
|
|
2875
|
+
*
|
|
2876
|
+
* Slot data is read from the item model (passed via `items` on NeoTreeView).
|
|
2877
|
+
*
|
|
2878
|
+
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC?node-id=4190-30493
|
|
2879
|
+
*/
|
|
2880
|
+
declare const NeoTreeItem: React$1.ForwardRefExoticComponent<TreeItemProps & React$1.RefAttributes<HTMLLIElement>>;
|
|
2881
|
+
interface NeoTreeViewProps extends Omit<RichTreeViewProProps<NeoTreeItemData, false>, 'slots'> {
|
|
2882
|
+
slots?: RichTreeViewProProps<NeoTreeItemData, false>['slots'];
|
|
2883
|
+
}
|
|
2884
|
+
/**
|
|
2885
|
+
* NeoTreeView - Styled tree container wrapping MUI RichTreeViewPro.
|
|
2886
|
+
*
|
|
2887
|
+
* Provides neo-design token styling, default expand/collapse icons,
|
|
2888
|
+
* and NeoTreeItem as the default item slot.
|
|
2889
|
+
*
|
|
2890
|
+
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC?node-id=4190-30493
|
|
2891
|
+
*/
|
|
2892
|
+
declare const NeoTreeView: {
|
|
2893
|
+
({ slots, ...props }: NeoTreeViewProps): react_jsx_runtime.JSX.Element;
|
|
2894
|
+
displayName: string;
|
|
2895
|
+
};
|
|
2896
|
+
|
|
2811
2897
|
/**
|
|
2812
2898
|
* @moderneinc/neo-styled-components
|
|
2813
2899
|
*
|
|
@@ -2827,5 +2913,5 @@ declare module '@mui/x-data-grid-pro' {
|
|
|
2827
2913
|
|
|
2828
2914
|
declare const version: string
|
|
2829
2915
|
|
|
2830
|
-
export { ActivityScene, CIRCLE_RADIUS, NeoActivityHeader, NeoActivityIndicatorCell, NeoAvatar, NeoBadge, NeoBanner, NeoBreadcrumbLink, NeoBreadcrumbs, NeoButton, NeoButtonGroup, NeoCheckbox, NeoCodeSnippet, NeoDataGrid, NeoDataGridCellContent, NeoDataGridColumnsButton, NeoDataGridColumnsPanel, NeoDataGridFilterPanel, NeoDataGridFilterPanelAddIcon, NeoDataGridFilterPanelDeleteIcon, NeoDataGridFilterPanelRemoveAllIcon, NeoDataGridFiltersButton, NeoDataGridHeaderLabel, NeoSelect as NeoDataGridSelect, NeoDatePicker, NeoDivider, NeoDot, NeoFilterChip, NeoFooter, NeoIconButton, NeoInfiniteScrollGrid, NeoInputField, NeoListItem, NeoListItemButton, NeoLoadingSpinner, NeoMarketplaceCard, NeoMenu, NeoMenuItem, NeoModal, NeoModalContent, NeoModalFooter, NeoModalHeader, NeoMultiBadgesCell, NeoPageContent, NeoPaginatedGrid, NeoProgressbar, NeoQuickFilter, NeoRadio, NeoSearchChip, NeoSelect, NeoMenuItem as NeoSelectOption, NeoSkeleton, NeoStatusBadgeCell, NeoStatusBanner, NeoTab, NeoTabs, NeoTag, NeoToast, NeoToastButton, NeoToggle, NeoToolbar, NeoTooltip, StyledToggleButton as NeoTypologyButton, NeoTypologyControl, NeoUserAvatarCell, SortedAscendingIcon, SortedDescendingIcon, UnsortedIcon, getDataGridHeaderStyles, version };
|
|
2831
|
-
export type { ActivityColor, ActivityEvent, ActivityHeaderSize, BreadcrumbItem, DataGridSize, NeoActivityHeaderProps, NeoActivityIndicatorCellProps, NeoAvatarProps, NeoBadgeProps, NeoBannerProps, NeoBreadcrumbLinkProps, NeoBreadcrumbsProps, NeoButtonGroupProps, NeoButtonProps, NeoCheckboxProps, NeoCodeSnippetProps, NeoDataGridCellContentProps, NeoDataGridHeaderLabelProps, NeoDataGridProps, NeoDatePickerProps, NeoDividerProps, NeoDotProps, NeoFilterChipProps, NeoFooterProps, NeoIconButtonProps, NeoInfiniteScrollGridProps, NeoInputFieldProps, NeoListItemButtonProps, NeoListItemProps, NeoLoadingSpinnerProps, NeoMarketplaceCardProps, NeoMenuItemProps, NeoMenuProps, NeoModalContentProps, NeoModalFooterProps, NeoModalHeaderProps, NeoModalProps, NeoMultiBadgesCellProps, NeoPageContentProps, NeoPaginatedGridProps, NeoProgressbarProps, NeoQuickFilterProps, NeoRadioProps, NeoSearchChipProps, NeoSelectProps, NeoSkeletonProps, NeoStatusBadgeCellProps, NeoStatusBannerProps, NeoTabProps, NeoTagProps, NeoToastProps, NeoToggleProps, NeoToolbarProps, NeoTooltipProps, NeoTypologyControlProps, NeoUserAvatarCellProps };
|
|
2916
|
+
export { ActivityScene, CIRCLE_RADIUS, NeoActivityHeader, NeoActivityIndicatorCell, NeoAvatar, NeoBadge, NeoBanner, NeoBreadcrumbLink, NeoBreadcrumbs, NeoButton, NeoButtonGroup, NeoCheckbox, NeoCodeSnippet, NeoDataGrid, NeoDataGridCellContent, NeoDataGridColumnsButton, NeoDataGridColumnsPanel, NeoDataGridFilterPanel, NeoDataGridFilterPanelAddIcon, NeoDataGridFilterPanelDeleteIcon, NeoDataGridFilterPanelRemoveAllIcon, NeoDataGridFiltersButton, NeoDataGridHeaderLabel, NeoSelect as NeoDataGridSelect, NeoDatePicker, NeoDivider, NeoDot, NeoFilterChip, NeoFooter, NeoIconButton, NeoInfiniteScrollGrid, NeoInputField, NeoListItem, NeoListItemButton, NeoLoadingSpinner, NeoMarketplaceCard, NeoMenu, NeoMenuItem, NeoModal, NeoModalContent, NeoModalFooter, NeoModalHeader, NeoMultiBadgesCell, NeoNavigationItem, NeoPageContent, NeoPaginatedGrid, NeoProgressbar, NeoQuickFilter, NeoRadio, NeoSearchChip, NeoSelect, NeoMenuItem as NeoSelectOption, NeoSkeleton, NeoStatusBadgeCell, NeoStatusBanner, NeoTab, NeoTabs, NeoTag, NeoToast, NeoToastButton, NeoToggle, NeoToolbar, NeoTooltip, NeoTreeItem, NeoTreeView, StyledToggleButton as NeoTypologyButton, NeoTypologyControl, NeoUserAvatarCell, SortedAscendingIcon, SortedDescendingIcon, UnsortedIcon, getDataGridHeaderStyles, version };
|
|
2917
|
+
export type { ActivityColor, ActivityEvent, ActivityHeaderSize, BreadcrumbItem, DataGridSize, NeoActivityHeaderProps, NeoActivityIndicatorCellProps, NeoAvatarProps, NeoBadgeProps, NeoBannerProps, NeoBreadcrumbLinkProps, NeoBreadcrumbsProps, NeoButtonGroupProps, NeoButtonProps, NeoCheckboxProps, NeoCodeSnippetProps, NeoDataGridCellContentProps, NeoDataGridHeaderLabelProps, NeoDataGridProps, NeoDatePickerProps, NeoDividerProps, NeoDotProps, NeoFilterChipProps, NeoFooterProps, NeoIconButtonProps, NeoInfiniteScrollGridProps, NeoInputFieldProps, NeoListItemButtonProps, NeoListItemProps, NeoLoadingSpinnerProps, NeoMarketplaceCardProps, NeoMenuItemProps, NeoMenuProps, NeoModalContentProps, NeoModalFooterProps, NeoModalHeaderProps, NeoModalProps, NeoMultiBadgesCellProps, NeoNavigationItemProps, NeoPageContentProps, NeoPaginatedGridProps, NeoProgressbarProps, NeoQuickFilterProps, NeoRadioProps, NeoSearchChipProps, NeoSelectProps, NeoSkeletonProps, NeoStatusBadgeCellProps, NeoStatusBannerProps, NeoTabProps, NeoTagProps, NeoToastProps, NeoToggleProps, NeoToolbarProps, NeoTooltipProps, NeoTreeItemData, NeoTreeItemProps, NeoTreeViewProps, NeoTypologyControlProps, NeoUserAvatarCellProps };
|
package/dist/index.esm.js
CHANGED
|
@@ -7,7 +7,7 @@ import Chip, { chipClasses } from '@mui/material/Chip';
|
|
|
7
7
|
import SvgIcon, { svgIconClasses } from '@mui/material/SvgIcon';
|
|
8
8
|
import Alert, { alertClasses } from '@mui/material/Alert';
|
|
9
9
|
import IconButton, { iconButtonClasses } from '@mui/material/IconButton';
|
|
10
|
-
import { forwardRef, createElement, useState, useMemo, useRef, useEffect } from 'react';
|
|
10
|
+
import React, { forwardRef, createElement, useState, useMemo, useRef, useEffect } from 'react';
|
|
11
11
|
import Breadcrumbs, { breadcrumbsClasses } from '@mui/material/Breadcrumbs';
|
|
12
12
|
import Link from '@mui/material/Link';
|
|
13
13
|
import ButtonBase, { buttonBaseClasses } from '@mui/material/ButtonBase';
|
|
@@ -57,6 +57,9 @@ import Skeleton from '@mui/material/Skeleton';
|
|
|
57
57
|
import MuiTab, { tabClasses } from '@mui/material/Tab';
|
|
58
58
|
import MuiTabs, { tabsClasses } from '@mui/material/Tabs';
|
|
59
59
|
import Switch, { switchClasses } from '@mui/material/Switch';
|
|
60
|
+
import { useTreeItemModel } from '@mui/x-tree-view/hooks';
|
|
61
|
+
import { TreeItem, treeItemClasses } from '@mui/x-tree-view/TreeItem';
|
|
62
|
+
import { RichTreeViewPro } from '@mui/x-tree-view-pro/RichTreeViewPro';
|
|
60
63
|
import ToggleButton, { toggleButtonClasses } from '@mui/material/ToggleButton';
|
|
61
64
|
import ToggleButtonGroup, { toggleButtonGroupClasses } from '@mui/material/ToggleButtonGroup';
|
|
62
65
|
|
|
@@ -1290,6 +1293,28 @@ const StyledButtonBase$1 = styled(ButtonBase, {
|
|
|
1290
1293
|
},
|
|
1291
1294
|
}),
|
|
1292
1295
|
},
|
|
1296
|
+
tertiary: {
|
|
1297
|
+
backgroundColor: 'transparent',
|
|
1298
|
+
color: semanticColors.typography.input.default,
|
|
1299
|
+
border: 'none',
|
|
1300
|
+
padding: 0,
|
|
1301
|
+
lineHeight: 1,
|
|
1302
|
+
'&:hover': {
|
|
1303
|
+
backgroundColor: 'transparent',
|
|
1304
|
+
color: semanticColors.buttons.tertiary.hover,
|
|
1305
|
+
},
|
|
1306
|
+
'&:active': {
|
|
1307
|
+
color: semanticColors.buttons.tertiary.pressed,
|
|
1308
|
+
},
|
|
1309
|
+
...(loading
|
|
1310
|
+
? {}
|
|
1311
|
+
: {
|
|
1312
|
+
[`&.${buttonBaseClasses.disabled}`]: {
|
|
1313
|
+
backgroundColor: 'transparent',
|
|
1314
|
+
color: semanticColors.buttons.tertiary.disabled,
|
|
1315
|
+
},
|
|
1316
|
+
}),
|
|
1317
|
+
},
|
|
1293
1318
|
};
|
|
1294
1319
|
return {
|
|
1295
1320
|
...baseStyles,
|
|
@@ -1304,6 +1329,7 @@ const LoadingSpinner = styled(CircularProgress)(({ theme, $variant }) => {
|
|
|
1304
1329
|
destructive: theme.palette.common.white,
|
|
1305
1330
|
link: semanticColors.buttons.primary.default,
|
|
1306
1331
|
linkColor: semanticColors.buttons.primary.default,
|
|
1332
|
+
tertiary: semanticColors.buttons.tertiary.default,
|
|
1307
1333
|
};
|
|
1308
1334
|
return {
|
|
1309
1335
|
color: spinnerColors[$variant],
|
|
@@ -1315,7 +1341,7 @@ const LoadingSpinner = styled(CircularProgress)(({ theme, $variant }) => {
|
|
|
1315
1341
|
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system---2025?node-id=4086-7590
|
|
1316
1342
|
*
|
|
1317
1343
|
* Figma Props Mapping:
|
|
1318
|
-
* - Hierarchy (Primary|Secondary|Destructive|Link|Link Color) → variant prop
|
|
1344
|
+
* - Hierarchy (Primary|Secondary|Destructive|Link|Link Color|Tertiary) → variant prop
|
|
1319
1345
|
* - Size (Small|Medium) → size prop
|
|
1320
1346
|
* - State=Disabled → disabled prop
|
|
1321
1347
|
* - State=Loading → loading prop
|
|
@@ -1323,8 +1349,8 @@ const LoadingSpinner = styled(CircularProgress)(({ theme, $variant }) => {
|
|
|
1323
1349
|
* - State=Pressed → CSS :active
|
|
1324
1350
|
* - State=Focused → CSS :focus-visible
|
|
1325
1351
|
*/
|
|
1326
|
-
function NeoButton({ variant = 'primary', size = 'medium', loading = false, children, disabled, ...rest }) {
|
|
1327
|
-
return (jsx(StyledButtonBase$1, { variant: variant, size: size, loading: loading, disabled: disabled || loading, ...rest, children: loading ? jsx(LoadingSpinner, { "$variant": variant, size: size === 'small' ? 16 : 20 }) : children }));
|
|
1352
|
+
function NeoButton({ variant = 'primary', size = 'medium', loading = false, children, disabled, startIcon, endIcon, ...rest }) {
|
|
1353
|
+
return (jsx(StyledButtonBase$1, { variant: variant, size: size, loading: loading, disabled: disabled || loading, ...rest, children: loading ? (jsx(LoadingSpinner, { "$variant": variant, size: size === 'small' ? 16 : 20 })) : (jsxs(React.Fragment, { children: [startIcon, children, endIcon] })) }));
|
|
1328
1354
|
}
|
|
1329
1355
|
NeoButton.displayName = 'NeoButton';
|
|
1330
1356
|
|
|
@@ -6511,6 +6537,140 @@ const NeoTooltip = ({ variant = 'light', title, description, children, arrow = f
|
|
|
6511
6537
|
};
|
|
6512
6538
|
NeoTooltip.displayName = 'NeoTooltip';
|
|
6513
6539
|
|
|
6540
|
+
/**
|
|
6541
|
+
* Custom label component that reads extra slot data from the item model.
|
|
6542
|
+
* Used as `slots.label` on the TreeItem.
|
|
6543
|
+
*/
|
|
6544
|
+
const NeoTreeItemLabel = (props) => {
|
|
6545
|
+
const { children, itemId, ...rest } = props;
|
|
6546
|
+
const item = useTreeItemModel(itemId);
|
|
6547
|
+
return (jsxs(ItemContentRow, { ...rest, children: [item?.checkbox, (item?.statusIcon ?? item?.icon) && jsx(ItemIcon, { children: item?.statusIcon ?? item?.icon }), jsx(ItemLabel, { children: children }), item?.secondaryLabel && jsx(ItemSecondaryLabel, { children: item.secondaryLabel }), item?.endAction && jsx(ItemEndAction, { children: item.endAction })] }));
|
|
6548
|
+
};
|
|
6549
|
+
/**
|
|
6550
|
+
* NeoTreeItem - Styled tree item row with optional icon, checkbox,
|
|
6551
|
+
* secondaryLabel, endAction, and statusIcon slots.
|
|
6552
|
+
*
|
|
6553
|
+
* Slot data is read from the item model (passed via `items` on NeoTreeView).
|
|
6554
|
+
*
|
|
6555
|
+
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC?node-id=4190-30493
|
|
6556
|
+
*/
|
|
6557
|
+
const NeoTreeItem = forwardRef(function NeoTreeItem({ slots, slotProps, ...props }, ref) {
|
|
6558
|
+
return (jsx(TreeItem, { ref: ref, slots: { label: NeoTreeItemLabel, ...slots },
|
|
6559
|
+
// itemId is not in MUI's label slot type but NeoTreeItemLabel needs it for useTreeItemModel
|
|
6560
|
+
slotProps: {
|
|
6561
|
+
...slotProps,
|
|
6562
|
+
label: { ...slotProps?.label, itemId: props.itemId },
|
|
6563
|
+
}, ...props }));
|
|
6564
|
+
});
|
|
6565
|
+
const ItemContentRow = styled('div')({
|
|
6566
|
+
display: 'flex',
|
|
6567
|
+
alignItems: 'center',
|
|
6568
|
+
gap: spacing.spacing_1_2,
|
|
6569
|
+
flex: 1,
|
|
6570
|
+
minWidth: 0,
|
|
6571
|
+
});
|
|
6572
|
+
const ItemIcon = styled('span')({
|
|
6573
|
+
display: 'inline-flex',
|
|
6574
|
+
alignItems: 'center',
|
|
6575
|
+
justifyContent: 'center',
|
|
6576
|
+
width: 16,
|
|
6577
|
+
height: 16,
|
|
6578
|
+
flexShrink: 0,
|
|
6579
|
+
color: semanticColors.icons.default,
|
|
6580
|
+
'& svg': {
|
|
6581
|
+
width: 16,
|
|
6582
|
+
height: 16,
|
|
6583
|
+
},
|
|
6584
|
+
});
|
|
6585
|
+
const ItemLabel = styled('span')({
|
|
6586
|
+
flex: 1,
|
|
6587
|
+
minWidth: 0,
|
|
6588
|
+
overflow: 'hidden',
|
|
6589
|
+
textOverflow: 'ellipsis',
|
|
6590
|
+
whiteSpace: 'nowrap',
|
|
6591
|
+
});
|
|
6592
|
+
const ItemSecondaryLabel = styled('span')({
|
|
6593
|
+
flexShrink: 0,
|
|
6594
|
+
fontSize: typography.fontSize.xs,
|
|
6595
|
+
fontWeight: typography.fontWeight.regular,
|
|
6596
|
+
fontFamily: typography.fontFamily.body,
|
|
6597
|
+
color: semanticColors.typography.link.primary,
|
|
6598
|
+
});
|
|
6599
|
+
const ItemEndAction = styled('span')({
|
|
6600
|
+
display: 'inline-flex',
|
|
6601
|
+
alignItems: 'center',
|
|
6602
|
+
flexShrink: 0,
|
|
6603
|
+
color: semanticColors.icons.utility,
|
|
6604
|
+
'& svg': {
|
|
6605
|
+
width: 16,
|
|
6606
|
+
height: 16,
|
|
6607
|
+
},
|
|
6608
|
+
});
|
|
6609
|
+
/**
|
|
6610
|
+
* NeoTreeView - Styled tree container wrapping MUI RichTreeViewPro.
|
|
6611
|
+
*
|
|
6612
|
+
* Provides neo-design token styling, default expand/collapse icons,
|
|
6613
|
+
* and NeoTreeItem as the default item slot.
|
|
6614
|
+
*
|
|
6615
|
+
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC?node-id=4190-30493
|
|
6616
|
+
*/
|
|
6617
|
+
const NeoTreeView = ({ slots, ...props }) => {
|
|
6618
|
+
return (jsx(StyledTreeView, { slots: {
|
|
6619
|
+
item: NeoTreeItem,
|
|
6620
|
+
collapseIcon: CollapseIcon,
|
|
6621
|
+
expandIcon: ExpandIcon,
|
|
6622
|
+
...slots,
|
|
6623
|
+
}, itemChildrenIndentation: spacing.spacing_2_1_2, ...props }));
|
|
6624
|
+
};
|
|
6625
|
+
NeoTreeView.displayName = 'NeoTreeView';
|
|
6626
|
+
const CollapseIcon = () => jsx(ChevronDown, { size: 16 });
|
|
6627
|
+
const ExpandIcon = () => jsx(ChevronRight, { size: 16 });
|
|
6628
|
+
const StyledTreeView = styled(RichTreeViewPro)({
|
|
6629
|
+
[`& .${treeItemClasses.content}`]: {
|
|
6630
|
+
height: 28,
|
|
6631
|
+
gap: spacing.spacing_1_2,
|
|
6632
|
+
paddingLeft: spacing.spacing_1,
|
|
6633
|
+
paddingRight: spacing.spacing_1,
|
|
6634
|
+
borderRadius: 0,
|
|
6635
|
+
},
|
|
6636
|
+
[`& .${treeItemClasses.content}:hover`]: {
|
|
6637
|
+
backgroundColor: semanticColors.surfaces.listHover,
|
|
6638
|
+
},
|
|
6639
|
+
[`& .${treeItemClasses.content}.Mui-focused`]: {
|
|
6640
|
+
boxShadow: `inset 0 0 0 2px ${semanticColors.buttons.primary.focus}`,
|
|
6641
|
+
backgroundColor: 'transparent',
|
|
6642
|
+
},
|
|
6643
|
+
[`& .${treeItemClasses.content}.Mui-selected`]: {
|
|
6644
|
+
backgroundColor: semanticColors.surfaces.listHover,
|
|
6645
|
+
},
|
|
6646
|
+
[`& .${treeItemClasses.content}.Mui-selected:hover`]: {
|
|
6647
|
+
backgroundColor: semanticColors.surfaces.listHover,
|
|
6648
|
+
},
|
|
6649
|
+
[`& .${treeItemClasses.content}.Mui-selected.Mui-focused`]: {
|
|
6650
|
+
backgroundColor: semanticColors.surfaces.listHover,
|
|
6651
|
+
boxShadow: `inset 0 0 0 2px ${semanticColors.buttons.primary.focus}`,
|
|
6652
|
+
},
|
|
6653
|
+
[`& .${treeItemClasses.label}`]: {
|
|
6654
|
+
fontSize: typography.fontSize.xs,
|
|
6655
|
+
fontWeight: typography.fontWeight.regular,
|
|
6656
|
+
fontFamily: typography.fontFamily.body,
|
|
6657
|
+
color: semanticColors.typography.body,
|
|
6658
|
+
padding: 0,
|
|
6659
|
+
},
|
|
6660
|
+
[`& .${treeItemClasses.iconContainer}`]: {
|
|
6661
|
+
width: 16,
|
|
6662
|
+
color: semanticColors.icons.default,
|
|
6663
|
+
'& svg': {
|
|
6664
|
+
width: 16,
|
|
6665
|
+
height: 16,
|
|
6666
|
+
},
|
|
6667
|
+
},
|
|
6668
|
+
[`& .${treeItemClasses.groupTransition}`]: {
|
|
6669
|
+
borderLeft: `1px solid ${semanticColors.border.primary}`,
|
|
6670
|
+
marginLeft: spacing.spacing_1_1_4,
|
|
6671
|
+
},
|
|
6672
|
+
});
|
|
6673
|
+
|
|
6514
6674
|
// Figma-exact border radius for toggle buttons — no matching design token
|
|
6515
6675
|
const TOGGLE_BUTTON_BORDER_RADIUS = 14;
|
|
6516
6676
|
const StyledToggleButtonGroup = styled(ToggleButtonGroup)(({ theme }) => ({
|
|
@@ -6580,5 +6740,5 @@ NeoTypologyControl.displayName = 'NeoTypologyControl';
|
|
|
6580
6740
|
|
|
6581
6741
|
const version = '0.0.0-development';
|
|
6582
6742
|
|
|
6583
|
-
export { ActivityScene, CIRCLE_RADIUS, NeoActivityHeader, NeoActivityIndicatorCell, NeoAvatar, NeoBadge, NeoBanner, NeoBreadcrumbLink, NeoBreadcrumbs, NeoButton, NeoButtonGroup, NeoCheckbox, NeoCodeSnippet, NeoDataGrid, NeoDataGridCellContent, NeoDataGridColumnsButton, NeoDataGridColumnsPanel, NeoDataGridFilterPanel, NeoDataGridFilterPanelAddIcon, NeoDataGridFilterPanelDeleteIcon, NeoDataGridFilterPanelRemoveAllIcon, NeoDataGridFiltersButton, NeoDataGridHeaderLabel, NeoSelect as NeoDataGridSelect, NeoDatePicker, NeoDivider, NeoDot, NeoFilterChip, NeoFooter, NeoIconButton, NeoIconWrapper, NeoInfiniteScrollGrid, NeoInputField, NeoListItem, NeoListItemButton, NeoLoadingSpinner, NeoMarketplaceCard, NeoMarketplaceLargeCard, NeoMenu, NeoMenuItem, NeoModal, NeoModalContent, NeoModalFooter, NeoModalHeader, NeoMultiBadgesCell, NeoNavigationItem, NeoPageContent, NeoPaginatedGrid, NeoProgressbar, NeoQuickFilter, NeoRadio, NeoSearchChip, NeoSelect, NeoMenuItem as NeoSelectOption, NeoSkeleton, NeoStatusBadgeCell, NeoStatusBanner, NeoTab, NeoTabs, NeoTag, NeoToast, NeoToastButton, NeoToggle, NeoToolbar, NeoTooltip, StyledToggleButton as NeoTypologyButton, NeoTypologyControl, NeoUserAvatarCell, SortedAscendingIcon, SortedDescendingIcon, UnsortedIcon, getDataGridHeaderStyles, neoRowHeights, version };
|
|
6743
|
+
export { ActivityScene, CIRCLE_RADIUS, NeoActivityHeader, NeoActivityIndicatorCell, NeoAvatar, NeoBadge, NeoBanner, NeoBreadcrumbLink, NeoBreadcrumbs, NeoButton, NeoButtonGroup, NeoCheckbox, NeoCodeSnippet, NeoDataGrid, NeoDataGridCellContent, NeoDataGridColumnsButton, NeoDataGridColumnsPanel, NeoDataGridFilterPanel, NeoDataGridFilterPanelAddIcon, NeoDataGridFilterPanelDeleteIcon, NeoDataGridFilterPanelRemoveAllIcon, NeoDataGridFiltersButton, NeoDataGridHeaderLabel, NeoSelect as NeoDataGridSelect, NeoDatePicker, NeoDivider, NeoDot, NeoFilterChip, NeoFooter, NeoIconButton, NeoIconWrapper, NeoInfiniteScrollGrid, NeoInputField, NeoListItem, NeoListItemButton, NeoLoadingSpinner, NeoMarketplaceCard, NeoMarketplaceLargeCard, NeoMenu, NeoMenuItem, NeoModal, NeoModalContent, NeoModalFooter, NeoModalHeader, NeoMultiBadgesCell, NeoNavigationItem, NeoPageContent, NeoPaginatedGrid, NeoProgressbar, NeoQuickFilter, NeoRadio, NeoSearchChip, NeoSelect, NeoMenuItem as NeoSelectOption, NeoSkeleton, NeoStatusBadgeCell, NeoStatusBanner, NeoTab, NeoTabs, NeoTag, NeoToast, NeoToastButton, NeoToggle, NeoToolbar, NeoTooltip, NeoTreeItem, NeoTreeView, StyledToggleButton as NeoTypologyButton, NeoTypologyControl, NeoUserAvatarCell, SortedAscendingIcon, SortedDescendingIcon, UnsortedIcon, getDataGridHeaderStyles, neoRowHeights, version };
|
|
6584
6744
|
//# sourceMappingURL=index.esm.js.map
|