@moderneinc/neo-styled-components 2.0.1-next.58c313 → 2.0.3-next.293c8b
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/PageContent/PageContent.d.ts +29 -1
- package/dist/index.d.ts +30 -2
- package/dist/index.esm.js +66 -38
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +66 -38
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
import type { BoxProps } from '@mui/material/Box';
|
|
2
2
|
import type { Breakpoint } from '@mui/material/styles';
|
|
3
3
|
import { type ReactNode } from 'react';
|
|
4
|
+
/**
|
|
5
|
+
* Breadcrumb item configuration
|
|
6
|
+
*/
|
|
7
|
+
export interface BreadcrumbItem {
|
|
8
|
+
/** Link label */
|
|
9
|
+
label: ReactNode;
|
|
10
|
+
/** Link href (omit for current/last item) */
|
|
11
|
+
href?: string;
|
|
12
|
+
}
|
|
4
13
|
export interface NeoPageContentProps extends BoxProps {
|
|
5
14
|
/**
|
|
6
15
|
* Main heading displayed on the page
|
|
@@ -12,6 +21,20 @@ export interface NeoPageContentProps extends BoxProps {
|
|
|
12
21
|
* Optional subtitle displayed below the page title
|
|
13
22
|
*/
|
|
14
23
|
subtitle?: ReactNode | string;
|
|
24
|
+
/**
|
|
25
|
+
* Optional breadcrumbs navigation displayed above the page title.
|
|
26
|
+
* Last item is automatically marked as current.
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* ```tsx
|
|
30
|
+
* breadcrumbs={[
|
|
31
|
+
* { label: 'Settings', href: '/settings' },
|
|
32
|
+
* { label: 'Team', href: '/team' },
|
|
33
|
+
* { label: 'Team Details' },
|
|
34
|
+
* ]}
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
37
|
+
breadcrumbs?: BreadcrumbItem[];
|
|
15
38
|
/**
|
|
16
39
|
* Action button displayed in the top-right corner
|
|
17
40
|
*
|
|
@@ -28,6 +51,11 @@ export interface NeoPageContentProps extends BoxProps {
|
|
|
28
51
|
* @default false
|
|
29
52
|
*/
|
|
30
53
|
contentMaxWidth?: Breakpoint | false;
|
|
54
|
+
/**
|
|
55
|
+
* Center content when using contentMaxWidth
|
|
56
|
+
* @default true
|
|
57
|
+
*/
|
|
58
|
+
centerContent?: boolean;
|
|
31
59
|
/**
|
|
32
60
|
* Disable gutters/padding
|
|
33
61
|
* @default false
|
|
@@ -103,7 +131,7 @@ export interface NeoPageContentProps extends BoxProps {
|
|
|
103
131
|
* </NeoPageContent>
|
|
104
132
|
* ```
|
|
105
133
|
*/
|
|
106
|
-
export declare function NeoPageContent({ pageTitle, subtitle, action, sticky, contentMaxWidth, disableGutters, isLoading, showBackToTop, children, sx, ...boxProps }: NeoPageContentProps): import("react/jsx-runtime").JSX.Element;
|
|
134
|
+
export declare function NeoPageContent({ pageTitle, subtitle, breadcrumbs, action, sticky, contentMaxWidth, centerContent, disableGutters, isLoading, showBackToTop, children, sx, ...boxProps }: NeoPageContentProps): import("react/jsx-runtime").JSX.Element;
|
|
107
135
|
export declare namespace NeoPageContent {
|
|
108
136
|
var displayName: string;
|
|
109
137
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -1596,6 +1596,15 @@ declare const NeoModalFooter: {
|
|
|
1596
1596
|
displayName: string;
|
|
1597
1597
|
};
|
|
1598
1598
|
|
|
1599
|
+
/**
|
|
1600
|
+
* Breadcrumb item configuration
|
|
1601
|
+
*/
|
|
1602
|
+
interface BreadcrumbItem {
|
|
1603
|
+
/** Link label */
|
|
1604
|
+
label: ReactNode;
|
|
1605
|
+
/** Link href (omit for current/last item) */
|
|
1606
|
+
href?: string;
|
|
1607
|
+
}
|
|
1599
1608
|
interface NeoPageContentProps extends BoxProps {
|
|
1600
1609
|
/**
|
|
1601
1610
|
* Main heading displayed on the page
|
|
@@ -1607,6 +1616,20 @@ interface NeoPageContentProps extends BoxProps {
|
|
|
1607
1616
|
* Optional subtitle displayed below the page title
|
|
1608
1617
|
*/
|
|
1609
1618
|
subtitle?: ReactNode | string;
|
|
1619
|
+
/**
|
|
1620
|
+
* Optional breadcrumbs navigation displayed above the page title.
|
|
1621
|
+
* Last item is automatically marked as current.
|
|
1622
|
+
*
|
|
1623
|
+
* @example
|
|
1624
|
+
* ```tsx
|
|
1625
|
+
* breadcrumbs={[
|
|
1626
|
+
* { label: 'Settings', href: '/settings' },
|
|
1627
|
+
* { label: 'Team', href: '/team' },
|
|
1628
|
+
* { label: 'Team Details' },
|
|
1629
|
+
* ]}
|
|
1630
|
+
* ```
|
|
1631
|
+
*/
|
|
1632
|
+
breadcrumbs?: BreadcrumbItem[];
|
|
1610
1633
|
/**
|
|
1611
1634
|
* Action button displayed in the top-right corner
|
|
1612
1635
|
*
|
|
@@ -1623,6 +1646,11 @@ interface NeoPageContentProps extends BoxProps {
|
|
|
1623
1646
|
* @default false
|
|
1624
1647
|
*/
|
|
1625
1648
|
contentMaxWidth?: Breakpoint | false;
|
|
1649
|
+
/**
|
|
1650
|
+
* Center content when using contentMaxWidth
|
|
1651
|
+
* @default true
|
|
1652
|
+
*/
|
|
1653
|
+
centerContent?: boolean;
|
|
1626
1654
|
/**
|
|
1627
1655
|
* Disable gutters/padding
|
|
1628
1656
|
* @default false
|
|
@@ -1698,7 +1726,7 @@ interface NeoPageContentProps extends BoxProps {
|
|
|
1698
1726
|
* </NeoPageContent>
|
|
1699
1727
|
* ```
|
|
1700
1728
|
*/
|
|
1701
|
-
declare function NeoPageContent({ pageTitle, subtitle, action, sticky, contentMaxWidth, disableGutters, isLoading, showBackToTop, children, sx, ...boxProps }: NeoPageContentProps): react_jsx_runtime.JSX.Element;
|
|
1729
|
+
declare function NeoPageContent({ pageTitle, subtitle, breadcrumbs, action, sticky, contentMaxWidth, centerContent, disableGutters, isLoading, showBackToTop, children, sx, ...boxProps }: NeoPageContentProps): react_jsx_runtime.JSX.Element;
|
|
1702
1730
|
declare namespace NeoPageContent {
|
|
1703
1731
|
var displayName: string;
|
|
1704
1732
|
}
|
|
@@ -2702,4 +2730,4 @@ declare module '@mui/x-data-grid-pro' {
|
|
|
2702
2730
|
declare const version: string
|
|
2703
2731
|
|
|
2704
2732
|
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, NeoFooter, NeoIconButton, NeoInfiniteScrollGrid, NeoInputField, NeoListItem, NeoListItemButton, NeoLoadingSpinner, NeoMarketplaceCard, NeoMenu, NeoMenuItem, NeoModal, NeoModalContent, NeoModalFooter, NeoModalHeader, NeoMultiBadgesCell, NeoPageContent, NeoPaginatedGrid, NeoProgressbar, NeoQuickFilter, NeoRadio, 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 };
|
|
2705
|
-
export type { ActivityColor, ActivityEvent, ActivityHeaderSize, DataGridSize, NeoActivityHeaderProps, NeoActivityIndicatorCellProps, NeoAvatarProps, NeoBadgeProps, NeoBannerProps, NeoBreadcrumbLinkProps, NeoBreadcrumbsProps, NeoButtonGroupProps, NeoButtonProps, NeoCheckboxProps, NeoCodeSnippetProps, NeoDataGridCellContentProps, NeoDataGridHeaderLabelProps, NeoDataGridProps, NeoDatePickerProps, NeoDividerProps, NeoDotProps, NeoFooterProps, NeoIconButtonProps, NeoInfiniteScrollGridProps, NeoInputFieldProps, NeoListItemButtonProps, NeoListItemProps, NeoLoadingSpinnerProps, NeoMarketplaceCardProps, NeoMenuItemProps, NeoMenuProps, NeoModalContentProps, NeoModalFooterProps, NeoModalHeaderProps, NeoModalProps, NeoMultiBadgesCellProps, NeoPageContentProps, NeoPaginatedGridProps, NeoProgressbarProps, NeoQuickFilterProps, NeoRadioProps, NeoSelectProps, NeoSkeletonProps, NeoStatusBadgeCellProps, NeoStatusBannerProps, NeoTabProps, NeoTagProps, NeoToastProps, NeoToggleProps, NeoToolbarProps, NeoTooltipProps, NeoTypologyControlProps, NeoUserAvatarCellProps };
|
|
2733
|
+
export type { ActivityColor, ActivityEvent, ActivityHeaderSize, BreadcrumbItem, DataGridSize, NeoActivityHeaderProps, NeoActivityIndicatorCellProps, NeoAvatarProps, NeoBadgeProps, NeoBannerProps, NeoBreadcrumbLinkProps, NeoBreadcrumbsProps, NeoButtonGroupProps, NeoButtonProps, NeoCheckboxProps, NeoCodeSnippetProps, NeoDataGridCellContentProps, NeoDataGridHeaderLabelProps, NeoDataGridProps, NeoDatePickerProps, NeoDividerProps, NeoDotProps, NeoFooterProps, NeoIconButtonProps, NeoInfiniteScrollGridProps, NeoInputFieldProps, NeoListItemButtonProps, NeoListItemProps, NeoLoadingSpinnerProps, NeoMarketplaceCardProps, NeoMenuItemProps, NeoMenuProps, NeoModalContentProps, NeoModalFooterProps, NeoModalHeaderProps, NeoModalProps, NeoMultiBadgesCellProps, NeoPageContentProps, NeoPaginatedGridProps, NeoProgressbarProps, NeoQuickFilterProps, NeoRadioProps, NeoSelectProps, NeoSkeletonProps, NeoStatusBadgeCellProps, NeoStatusBannerProps, NeoTabProps, NeoTagProps, NeoToastProps, NeoToggleProps, NeoToolbarProps, NeoTooltipProps, NeoTypologyControlProps, NeoUserAvatarCellProps };
|
package/dist/index.esm.js
CHANGED
|
@@ -499,7 +499,7 @@ const NeoActivityIndicatorCell = ({ event = 'commit-job', secondaryEvent, scene
|
|
|
499
499
|
NeoActivityIndicatorCell.displayName = 'NeoActivityIndicatorCell';
|
|
500
500
|
|
|
501
501
|
/**
|
|
502
|
-
* @license lucide-react v0.
|
|
502
|
+
* @license lucide-react v0.562.0 - ISC
|
|
503
503
|
*
|
|
504
504
|
* This source code is licensed under the ISC license.
|
|
505
505
|
* See the LICENSE file in the root directory of this source tree.
|
|
@@ -526,7 +526,7 @@ const hasA11yProp = (props) => {
|
|
|
526
526
|
};
|
|
527
527
|
|
|
528
528
|
/**
|
|
529
|
-
* @license lucide-react v0.
|
|
529
|
+
* @license lucide-react v0.562.0 - ISC
|
|
530
530
|
*
|
|
531
531
|
* This source code is licensed under the ISC license.
|
|
532
532
|
* See the LICENSE file in the root directory of this source tree.
|
|
@@ -545,7 +545,7 @@ var defaultAttributes = {
|
|
|
545
545
|
};
|
|
546
546
|
|
|
547
547
|
/**
|
|
548
|
-
* @license lucide-react v0.
|
|
548
|
+
* @license lucide-react v0.562.0 - ISC
|
|
549
549
|
*
|
|
550
550
|
* This source code is licensed under the ISC license.
|
|
551
551
|
* See the LICENSE file in the root directory of this source tree.
|
|
@@ -583,7 +583,7 @@ const Icon = forwardRef(
|
|
|
583
583
|
);
|
|
584
584
|
|
|
585
585
|
/**
|
|
586
|
-
* @license lucide-react v0.
|
|
586
|
+
* @license lucide-react v0.562.0 - ISC
|
|
587
587
|
*
|
|
588
588
|
* This source code is licensed under the ISC license.
|
|
589
589
|
* See the LICENSE file in the root directory of this source tree.
|
|
@@ -608,7 +608,7 @@ const createLucideIcon = (iconName, iconNode) => {
|
|
|
608
608
|
};
|
|
609
609
|
|
|
610
610
|
/**
|
|
611
|
-
* @license lucide-react v0.
|
|
611
|
+
* @license lucide-react v0.562.0 - ISC
|
|
612
612
|
*
|
|
613
613
|
* This source code is licensed under the ISC license.
|
|
614
614
|
* See the LICENSE file in the root directory of this source tree.
|
|
@@ -622,7 +622,7 @@ const __iconNode$h = [
|
|
|
622
622
|
const ArrowDown = createLucideIcon("arrow-down", __iconNode$h);
|
|
623
623
|
|
|
624
624
|
/**
|
|
625
|
-
* @license lucide-react v0.
|
|
625
|
+
* @license lucide-react v0.562.0 - ISC
|
|
626
626
|
*
|
|
627
627
|
* This source code is licensed under the ISC license.
|
|
628
628
|
* See the LICENSE file in the root directory of this source tree.
|
|
@@ -636,7 +636,7 @@ const __iconNode$g = [
|
|
|
636
636
|
const ArrowUp = createLucideIcon("arrow-up", __iconNode$g);
|
|
637
637
|
|
|
638
638
|
/**
|
|
639
|
-
* @license lucide-react v0.
|
|
639
|
+
* @license lucide-react v0.562.0 - ISC
|
|
640
640
|
*
|
|
641
641
|
* This source code is licensed under the ISC license.
|
|
642
642
|
* See the LICENSE file in the root directory of this source tree.
|
|
@@ -658,7 +658,7 @@ const __iconNode$f = [
|
|
|
658
658
|
const CalendarDays = createLucideIcon("calendar-days", __iconNode$f);
|
|
659
659
|
|
|
660
660
|
/**
|
|
661
|
-
* @license lucide-react v0.
|
|
661
|
+
* @license lucide-react v0.562.0 - ISC
|
|
662
662
|
*
|
|
663
663
|
* This source code is licensed under the ISC license.
|
|
664
664
|
* See the LICENSE file in the root directory of this source tree.
|
|
@@ -669,7 +669,7 @@ const __iconNode$e = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]];
|
|
|
669
669
|
const ChevronDown = createLucideIcon("chevron-down", __iconNode$e);
|
|
670
670
|
|
|
671
671
|
/**
|
|
672
|
-
* @license lucide-react v0.
|
|
672
|
+
* @license lucide-react v0.562.0 - ISC
|
|
673
673
|
*
|
|
674
674
|
* This source code is licensed under the ISC license.
|
|
675
675
|
* See the LICENSE file in the root directory of this source tree.
|
|
@@ -680,7 +680,7 @@ const __iconNode$d = [["path", { d: "m15 18-6-6 6-6", key: "1wnfg3" }]];
|
|
|
680
680
|
const ChevronLeft = createLucideIcon("chevron-left", __iconNode$d);
|
|
681
681
|
|
|
682
682
|
/**
|
|
683
|
-
* @license lucide-react v0.
|
|
683
|
+
* @license lucide-react v0.562.0 - ISC
|
|
684
684
|
*
|
|
685
685
|
* This source code is licensed under the ISC license.
|
|
686
686
|
* See the LICENSE file in the root directory of this source tree.
|
|
@@ -691,7 +691,7 @@ const __iconNode$c = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]];
|
|
|
691
691
|
const ChevronRight = createLucideIcon("chevron-right", __iconNode$c);
|
|
692
692
|
|
|
693
693
|
/**
|
|
694
|
-
* @license lucide-react v0.
|
|
694
|
+
* @license lucide-react v0.562.0 - ISC
|
|
695
695
|
*
|
|
696
696
|
* This source code is licensed under the ISC license.
|
|
697
697
|
* See the LICENSE file in the root directory of this source tree.
|
|
@@ -702,7 +702,7 @@ const __iconNode$b = [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]];
|
|
|
702
702
|
const ChevronUp = createLucideIcon("chevron-up", __iconNode$b);
|
|
703
703
|
|
|
704
704
|
/**
|
|
705
|
-
* @license lucide-react v0.
|
|
705
|
+
* @license lucide-react v0.562.0 - ISC
|
|
706
706
|
*
|
|
707
707
|
* This source code is licensed under the ISC license.
|
|
708
708
|
* See the LICENSE file in the root directory of this source tree.
|
|
@@ -716,7 +716,7 @@ const __iconNode$a = [
|
|
|
716
716
|
const ChevronsUpDown = createLucideIcon("chevrons-up-down", __iconNode$a);
|
|
717
717
|
|
|
718
718
|
/**
|
|
719
|
-
* @license lucide-react v0.
|
|
719
|
+
* @license lucide-react v0.562.0 - ISC
|
|
720
720
|
*
|
|
721
721
|
* This source code is licensed under the ISC license.
|
|
722
722
|
* See the LICENSE file in the root directory of this source tree.
|
|
@@ -731,7 +731,7 @@ const __iconNode$9 = [
|
|
|
731
731
|
const CircleAlert = createLucideIcon("circle-alert", __iconNode$9);
|
|
732
732
|
|
|
733
733
|
/**
|
|
734
|
-
* @license lucide-react v0.
|
|
734
|
+
* @license lucide-react v0.562.0 - ISC
|
|
735
735
|
*
|
|
736
736
|
* This source code is licensed under the ISC license.
|
|
737
737
|
* See the LICENSE file in the root directory of this source tree.
|
|
@@ -745,7 +745,7 @@ const __iconNode$8 = [
|
|
|
745
745
|
const CircleCheck = createLucideIcon("circle-check", __iconNode$8);
|
|
746
746
|
|
|
747
747
|
/**
|
|
748
|
-
* @license lucide-react v0.
|
|
748
|
+
* @license lucide-react v0.562.0 - ISC
|
|
749
749
|
*
|
|
750
750
|
* This source code is licensed under the ISC license.
|
|
751
751
|
* See the LICENSE file in the root directory of this source tree.
|
|
@@ -760,7 +760,7 @@ const __iconNode$7 = [
|
|
|
760
760
|
const CircleQuestionMark = createLucideIcon("circle-question-mark", __iconNode$7);
|
|
761
761
|
|
|
762
762
|
/**
|
|
763
|
-
* @license lucide-react v0.
|
|
763
|
+
* @license lucide-react v0.562.0 - ISC
|
|
764
764
|
*
|
|
765
765
|
* This source code is licensed under the ISC license.
|
|
766
766
|
* See the LICENSE file in the root directory of this source tree.
|
|
@@ -775,7 +775,7 @@ const __iconNode$6 = [
|
|
|
775
775
|
const Columns3 = createLucideIcon("columns-3", __iconNode$6);
|
|
776
776
|
|
|
777
777
|
/**
|
|
778
|
-
* @license lucide-react v0.
|
|
778
|
+
* @license lucide-react v0.562.0 - ISC
|
|
779
779
|
*
|
|
780
780
|
* This source code is licensed under the ISC license.
|
|
781
781
|
* See the LICENSE file in the root directory of this source tree.
|
|
@@ -790,7 +790,7 @@ const __iconNode$5 = [
|
|
|
790
790
|
const ListFilter = createLucideIcon("list-filter", __iconNode$5);
|
|
791
791
|
|
|
792
792
|
/**
|
|
793
|
-
* @license lucide-react v0.
|
|
793
|
+
* @license lucide-react v0.562.0 - ISC
|
|
794
794
|
*
|
|
795
795
|
* This source code is licensed under the ISC license.
|
|
796
796
|
* See the LICENSE file in the root directory of this source tree.
|
|
@@ -804,7 +804,7 @@ const __iconNode$4 = [
|
|
|
804
804
|
const Plus = createLucideIcon("plus", __iconNode$4);
|
|
805
805
|
|
|
806
806
|
/**
|
|
807
|
-
* @license lucide-react v0.
|
|
807
|
+
* @license lucide-react v0.562.0 - ISC
|
|
808
808
|
*
|
|
809
809
|
* This source code is licensed under the ISC license.
|
|
810
810
|
* See the LICENSE file in the root directory of this source tree.
|
|
@@ -818,7 +818,7 @@ const __iconNode$3 = [
|
|
|
818
818
|
const Search = createLucideIcon("search", __iconNode$3);
|
|
819
819
|
|
|
820
820
|
/**
|
|
821
|
-
* @license lucide-react v0.
|
|
821
|
+
* @license lucide-react v0.562.0 - ISC
|
|
822
822
|
*
|
|
823
823
|
* This source code is licensed under the ISC license.
|
|
824
824
|
* See the LICENSE file in the root directory of this source tree.
|
|
@@ -835,7 +835,7 @@ const __iconNode$2 = [
|
|
|
835
835
|
const Trash2 = createLucideIcon("trash-2", __iconNode$2);
|
|
836
836
|
|
|
837
837
|
/**
|
|
838
|
-
* @license lucide-react v0.
|
|
838
|
+
* @license lucide-react v0.562.0 - ISC
|
|
839
839
|
*
|
|
840
840
|
* This source code is licensed under the ISC license.
|
|
841
841
|
* See the LICENSE file in the root directory of this source tree.
|
|
@@ -854,7 +854,7 @@ const __iconNode$1 = [
|
|
|
854
854
|
const WifiOff = createLucideIcon("wifi-off", __iconNode$1);
|
|
855
855
|
|
|
856
856
|
/**
|
|
857
|
-
* @license lucide-react v0.
|
|
857
|
+
* @license lucide-react v0.562.0 - ISC
|
|
858
858
|
*
|
|
859
859
|
* This source code is licensed under the ISC license.
|
|
860
860
|
* See the LICENSE file in the root directory of this source tree.
|
|
@@ -4047,12 +4047,13 @@ const StyledListItemButton$1 = styled(ListItemButton, {
|
|
|
4047
4047
|
prop !== 'secondaryText' &&
|
|
4048
4048
|
prop !== 'badge' &&
|
|
4049
4049
|
prop !== 'icon' &&
|
|
4050
|
-
prop !== 'isLink'
|
|
4051
|
-
|
|
4050
|
+
prop !== 'isLink' &&
|
|
4051
|
+
prop !== 'hasSecondaryText',
|
|
4052
|
+
})(({ theme, size = 'medium', isLink, hasSecondaryText }) => {
|
|
4052
4053
|
const config = sizeConfig[size];
|
|
4053
4054
|
return {
|
|
4054
4055
|
minHeight: config.height,
|
|
4055
|
-
height: config.height,
|
|
4056
|
+
height: hasSecondaryText ? 'auto' : config.height,
|
|
4056
4057
|
paddingTop: config.paddingTop,
|
|
4057
4058
|
paddingRight: config.paddingRight,
|
|
4058
4059
|
paddingBottom: config.paddingBottom,
|
|
@@ -4060,6 +4061,8 @@ const StyledListItemButton$1 = styled(ListItemButton, {
|
|
|
4060
4061
|
borderRadius: spacing.spacing_3_4, // 6px
|
|
4061
4062
|
backgroundColor: semanticColors.input.background,
|
|
4062
4063
|
gap: config.gap,
|
|
4064
|
+
// Icon is always centered vertically per Figma design
|
|
4065
|
+
alignItems: 'center',
|
|
4063
4066
|
transition: theme.transitions.create(['background-color'], {
|
|
4064
4067
|
duration: theme.transitions.duration.short,
|
|
4065
4068
|
}),
|
|
@@ -4074,10 +4077,17 @@ const StyledListItemButton$1 = styled(ListItemButton, {
|
|
|
4074
4077
|
}),
|
|
4075
4078
|
},
|
|
4076
4079
|
// Primary text styling
|
|
4080
|
+
// Font weight varies by size per Figma:
|
|
4081
|
+
// - Default: small/medium use 400, large/xlarge/xxlarge use 500
|
|
4082
|
+
// - Link: xxlarge uses 600, others use their default weight
|
|
4077
4083
|
'& .list-item-primary': {
|
|
4078
4084
|
fontSize: theme.typography.pxToRem(config.fontSize),
|
|
4079
4085
|
lineHeight: config.lineHeight,
|
|
4080
|
-
fontWeight:
|
|
4086
|
+
fontWeight: isLink && size === 'xxlarge'
|
|
4087
|
+
? typography.fontWeight.semiBold
|
|
4088
|
+
: size === 'small' || size === 'medium'
|
|
4089
|
+
? typography.fontWeight.regular
|
|
4090
|
+
: typography.fontWeight.medium,
|
|
4081
4091
|
color: isLink
|
|
4082
4092
|
? semanticColors.typography.link.primary
|
|
4083
4093
|
: semanticColors.typography.navigation.default,
|
|
@@ -4092,15 +4102,14 @@ const StyledListItemButton$1 = styled(ListItemButton, {
|
|
|
4092
4102
|
fontWeight: typography.fontWeight.regular,
|
|
4093
4103
|
color: semanticColors.typography.bodySecondary,
|
|
4094
4104
|
},
|
|
4095
|
-
// Secondary text styling
|
|
4105
|
+
// Secondary text styling - wraps with word break
|
|
4096
4106
|
'& .list-item-secondary': {
|
|
4097
4107
|
fontSize: theme.typography.pxToRem('secondaryFontSize' in config ? config.secondaryFontSize : config.fontSize),
|
|
4098
4108
|
lineHeight: size === 'large' ? 1.5 : 1.4,
|
|
4099
4109
|
fontWeight: typography.fontWeight.regular,
|
|
4100
4110
|
color: semanticColors.typography.bodySecondary,
|
|
4101
|
-
|
|
4102
|
-
|
|
4103
|
-
whiteSpace: 'nowrap',
|
|
4111
|
+
wordBreak: 'break-word',
|
|
4112
|
+
whiteSpace: 'normal',
|
|
4104
4113
|
...(size === 'large' && {
|
|
4105
4114
|
marginBottom: -2,
|
|
4106
4115
|
}),
|
|
@@ -4110,6 +4119,9 @@ const StyledListItemButton$1 = styled(ListItemButton, {
|
|
|
4110
4119
|
backgroundColor: semanticColors.input.background,
|
|
4111
4120
|
},
|
|
4112
4121
|
// Selected/Active state
|
|
4122
|
+
// Font weights per Figma:
|
|
4123
|
+
// - Primary: small/medium/xxlarge use 500, large/xlarge use 600
|
|
4124
|
+
// - Secondary: large/xlarge use 500, xxlarge uses 400
|
|
4113
4125
|
[`&.${listItemButtonClasses.selected}`]: {
|
|
4114
4126
|
backgroundColor: semanticColors.buttons.secondary.hoverBackground,
|
|
4115
4127
|
'&:hover': {
|
|
@@ -4119,11 +4131,15 @@ const StyledListItemButton$1 = styled(ListItemButton, {
|
|
|
4119
4131
|
color: semanticColors.icons.pressed,
|
|
4120
4132
|
},
|
|
4121
4133
|
'& .list-item-primary': {
|
|
4122
|
-
fontWeight:
|
|
4134
|
+
fontWeight: size === 'large' || size === 'xlarge'
|
|
4135
|
+
? typography.fontWeight.semiBold
|
|
4136
|
+
: typography.fontWeight.medium,
|
|
4123
4137
|
color: semanticColors.typography.navigation.default,
|
|
4124
4138
|
},
|
|
4125
4139
|
'& .list-item-secondary': {
|
|
4126
|
-
fontWeight:
|
|
4140
|
+
fontWeight: size === 'large' || size === 'xlarge'
|
|
4141
|
+
? typography.fontWeight.medium
|
|
4142
|
+
: typography.fontWeight.regular,
|
|
4127
4143
|
},
|
|
4128
4144
|
},
|
|
4129
4145
|
// Disabled state
|
|
@@ -4192,7 +4208,7 @@ const NeoListItem = ({ size = 'medium', primaryText, secondaryText, badge, icon,
|
|
|
4192
4208
|
const showBadge = badge && size === 'xxlarge';
|
|
4193
4209
|
// Prepare primary text with badge if needed
|
|
4194
4210
|
const primaryContent = showBadge ? (jsxs(Fragment, { children: [primaryText, ' ', jsx(Typography, { component: "span", className: "list-item-badge", children: badge })] })) : (primaryText);
|
|
4195
|
-
return (jsxs(StyledListItemButton$1, { size: size, isLink: isLink, ...(component && { component }), ...props, children: [icon && jsx(ListItemIcon, { children: icon }), jsx(ListItemText, { primary: primaryContent, secondary: showSecondaryText ? secondaryText : undefined, slotProps: {
|
|
4211
|
+
return (jsxs(StyledListItemButton$1, { size: size, isLink: isLink, hasSecondaryText: !!showSecondaryText, ...(component && { component }), ...props, children: [icon && jsx(ListItemIcon, { children: icon }), jsx(ListItemText, { primary: primaryContent, secondary: showSecondaryText ? secondaryText : undefined, sx: { minWidth: 0, flex: 1 }, slotProps: {
|
|
4196
4212
|
primary: { className: 'list-item-primary' },
|
|
4197
4213
|
secondary: { className: 'list-item-secondary' },
|
|
4198
4214
|
} })] }));
|
|
@@ -4769,7 +4785,7 @@ const Subtitle = styled(Typography)(() => ({
|
|
|
4769
4785
|
* </NeoPageContent>
|
|
4770
4786
|
* ```
|
|
4771
4787
|
*/
|
|
4772
|
-
function NeoPageContent({ pageTitle, subtitle, action, sticky = false, contentMaxWidth = false, disableGutters = false, isLoading = false, showBackToTop = true, children, sx, ...boxProps }) {
|
|
4788
|
+
function NeoPageContent({ pageTitle, subtitle, breadcrumbs, action, sticky = false, contentMaxWidth = false, centerContent = true, disableGutters = false, isLoading = false, showBackToTop = true, children, sx, ...boxProps }) {
|
|
4773
4789
|
const [showBackToTopButton, setShowBackToTopButton] = useState(false);
|
|
4774
4790
|
const headerRef = useRef(null);
|
|
4775
4791
|
const containerRef = useRef(null);
|
|
@@ -4799,8 +4815,8 @@ function NeoPageContent({ pageTitle, subtitle, action, sticky = false, contentMa
|
|
|
4799
4815
|
// Also try to scroll window in case component is in a different context
|
|
4800
4816
|
window.scrollTo({ top: 0, behavior: 'smooth' });
|
|
4801
4817
|
};
|
|
4802
|
-
const headerContent = (jsxs(Stack, { ref: headerRef, direction: "row", justifyContent: "space-between", alignItems: "flex-start", sx: {
|
|
4803
|
-
|
|
4818
|
+
const headerContent = (jsxs(Stack, { ref: headerRef, sx: { flexShrink: 0, gap: '0.5rem' }, children: [breadcrumbs && breadcrumbs.length > 0 && (jsx(NeoBreadcrumbs, { children: breadcrumbs.map((item, index) => (jsx(NeoBreadcrumbLink, { href: item.href, current: index === breadcrumbs.length - 1, children: item.label }, item.href ?? index))) })), jsxs(Stack, { direction: "row", justifyContent: "space-between", alignItems: "flex-start", sx: { gap: '1rem' }, children: [jsxs(Stack, { sx: { gap: '0.5rem', flexGrow: 1 }, children: [jsx(PageTitle, { children: pageTitle }), subtitle &&
|
|
4819
|
+
(typeof subtitle === 'string' ? (jsx(Subtitle, { variant: "caption", children: subtitle })) : (subtitle))] }), action] })] }));
|
|
4804
4820
|
const content = isLoading ? (jsx(Box, { sx: {
|
|
4805
4821
|
display: 'flex',
|
|
4806
4822
|
alignItems: 'center',
|
|
@@ -4824,15 +4840,27 @@ function NeoPageContent({ pageTitle, subtitle, action, sticky = false, contentMa
|
|
|
4824
4840
|
pb: `${spacing.spacing_2_1_2}px`,
|
|
4825
4841
|
height: '100%',
|
|
4826
4842
|
overflow: 'auto',
|
|
4827
|
-
}, children: [sticky ? (jsx(StickyHeader, { ref: headerRef, sx: {
|
|
4843
|
+
}, children: [sticky ? (jsx(StickyHeader, { ref: headerRef, sx: {
|
|
4844
|
+
pt: `${spacing.spacing_2}px`,
|
|
4845
|
+
...(contentMaxWidth !== false && {
|
|
4846
|
+
maxWidth: theme => theme.breakpoints.values[contentMaxWidth],
|
|
4847
|
+
width: '100%',
|
|
4848
|
+
}),
|
|
4849
|
+
}, children: headerContent })) : (jsx(Box, { ref: headerRef, sx: {
|
|
4850
|
+
mb: `${spacing.spacing_1}px`,
|
|
4851
|
+
...(contentMaxWidth !== false && {
|
|
4852
|
+
maxWidth: theme => theme.breakpoints.values[contentMaxWidth],
|
|
4853
|
+
width: '100%',
|
|
4854
|
+
}),
|
|
4855
|
+
}, children: headerContent })), jsx(Box, { sx: {
|
|
4828
4856
|
flexGrow: 1,
|
|
4829
4857
|
minHeight: 0,
|
|
4830
4858
|
display: 'flex',
|
|
4831
4859
|
flexDirection: 'column',
|
|
4832
4860
|
...(contentMaxWidth !== false && {
|
|
4833
4861
|
maxWidth: theme => theme.breakpoints.values[contentMaxWidth],
|
|
4834
|
-
mx: 'auto',
|
|
4835
4862
|
width: '100%',
|
|
4863
|
+
...(centerContent ? { mx: 'auto' } : { alignSelf: 'flex-start' }),
|
|
4836
4864
|
}),
|
|
4837
4865
|
}, children: content })] }) }), showBackToTop && (jsx(Fade, { in: showBackToTopButton, children: jsx(Box, { sx: {
|
|
4838
4866
|
position: 'fixed',
|