@moderneinc/neo-styled-components 2.0.2-next.b7dcad → 2.0.3-next.04b340
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 +87 -59
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +87 -59
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -501,7 +501,7 @@ const NeoActivityIndicatorCell = ({ event = 'commit-job', secondaryEvent, scene
|
|
|
501
501
|
NeoActivityIndicatorCell.displayName = 'NeoActivityIndicatorCell';
|
|
502
502
|
|
|
503
503
|
/**
|
|
504
|
-
* @license lucide-react v0.
|
|
504
|
+
* @license lucide-react v0.562.0 - ISC
|
|
505
505
|
*
|
|
506
506
|
* This source code is licensed under the ISC license.
|
|
507
507
|
* See the LICENSE file in the root directory of this source tree.
|
|
@@ -528,7 +528,7 @@ const hasA11yProp = (props) => {
|
|
|
528
528
|
};
|
|
529
529
|
|
|
530
530
|
/**
|
|
531
|
-
* @license lucide-react v0.
|
|
531
|
+
* @license lucide-react v0.562.0 - ISC
|
|
532
532
|
*
|
|
533
533
|
* This source code is licensed under the ISC license.
|
|
534
534
|
* See the LICENSE file in the root directory of this source tree.
|
|
@@ -547,7 +547,7 @@ var defaultAttributes = {
|
|
|
547
547
|
};
|
|
548
548
|
|
|
549
549
|
/**
|
|
550
|
-
* @license lucide-react v0.
|
|
550
|
+
* @license lucide-react v0.562.0 - ISC
|
|
551
551
|
*
|
|
552
552
|
* This source code is licensed under the ISC license.
|
|
553
553
|
* See the LICENSE file in the root directory of this source tree.
|
|
@@ -585,7 +585,7 @@ const Icon = react.forwardRef(
|
|
|
585
585
|
);
|
|
586
586
|
|
|
587
587
|
/**
|
|
588
|
-
* @license lucide-react v0.
|
|
588
|
+
* @license lucide-react v0.562.0 - ISC
|
|
589
589
|
*
|
|
590
590
|
* This source code is licensed under the ISC license.
|
|
591
591
|
* See the LICENSE file in the root directory of this source tree.
|
|
@@ -610,7 +610,7 @@ const createLucideIcon = (iconName, iconNode) => {
|
|
|
610
610
|
};
|
|
611
611
|
|
|
612
612
|
/**
|
|
613
|
-
* @license lucide-react v0.
|
|
613
|
+
* @license lucide-react v0.562.0 - ISC
|
|
614
614
|
*
|
|
615
615
|
* This source code is licensed under the ISC license.
|
|
616
616
|
* See the LICENSE file in the root directory of this source tree.
|
|
@@ -624,7 +624,7 @@ const __iconNode$h = [
|
|
|
624
624
|
const ArrowDown = createLucideIcon("arrow-down", __iconNode$h);
|
|
625
625
|
|
|
626
626
|
/**
|
|
627
|
-
* @license lucide-react v0.
|
|
627
|
+
* @license lucide-react v0.562.0 - ISC
|
|
628
628
|
*
|
|
629
629
|
* This source code is licensed under the ISC license.
|
|
630
630
|
* See the LICENSE file in the root directory of this source tree.
|
|
@@ -638,7 +638,7 @@ const __iconNode$g = [
|
|
|
638
638
|
const ArrowUp = createLucideIcon("arrow-up", __iconNode$g);
|
|
639
639
|
|
|
640
640
|
/**
|
|
641
|
-
* @license lucide-react v0.
|
|
641
|
+
* @license lucide-react v0.562.0 - ISC
|
|
642
642
|
*
|
|
643
643
|
* This source code is licensed under the ISC license.
|
|
644
644
|
* See the LICENSE file in the root directory of this source tree.
|
|
@@ -660,7 +660,7 @@ const __iconNode$f = [
|
|
|
660
660
|
const CalendarDays = createLucideIcon("calendar-days", __iconNode$f);
|
|
661
661
|
|
|
662
662
|
/**
|
|
663
|
-
* @license lucide-react v0.
|
|
663
|
+
* @license lucide-react v0.562.0 - ISC
|
|
664
664
|
*
|
|
665
665
|
* This source code is licensed under the ISC license.
|
|
666
666
|
* See the LICENSE file in the root directory of this source tree.
|
|
@@ -671,7 +671,7 @@ const __iconNode$e = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]];
|
|
|
671
671
|
const ChevronDown = createLucideIcon("chevron-down", __iconNode$e);
|
|
672
672
|
|
|
673
673
|
/**
|
|
674
|
-
* @license lucide-react v0.
|
|
674
|
+
* @license lucide-react v0.562.0 - ISC
|
|
675
675
|
*
|
|
676
676
|
* This source code is licensed under the ISC license.
|
|
677
677
|
* See the LICENSE file in the root directory of this source tree.
|
|
@@ -682,7 +682,7 @@ const __iconNode$d = [["path", { d: "m15 18-6-6 6-6", key: "1wnfg3" }]];
|
|
|
682
682
|
const ChevronLeft = createLucideIcon("chevron-left", __iconNode$d);
|
|
683
683
|
|
|
684
684
|
/**
|
|
685
|
-
* @license lucide-react v0.
|
|
685
|
+
* @license lucide-react v0.562.0 - ISC
|
|
686
686
|
*
|
|
687
687
|
* This source code is licensed under the ISC license.
|
|
688
688
|
* See the LICENSE file in the root directory of this source tree.
|
|
@@ -693,7 +693,7 @@ const __iconNode$c = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]];
|
|
|
693
693
|
const ChevronRight = createLucideIcon("chevron-right", __iconNode$c);
|
|
694
694
|
|
|
695
695
|
/**
|
|
696
|
-
* @license lucide-react v0.
|
|
696
|
+
* @license lucide-react v0.562.0 - ISC
|
|
697
697
|
*
|
|
698
698
|
* This source code is licensed under the ISC license.
|
|
699
699
|
* See the LICENSE file in the root directory of this source tree.
|
|
@@ -704,7 +704,7 @@ const __iconNode$b = [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]];
|
|
|
704
704
|
const ChevronUp = createLucideIcon("chevron-up", __iconNode$b);
|
|
705
705
|
|
|
706
706
|
/**
|
|
707
|
-
* @license lucide-react v0.
|
|
707
|
+
* @license lucide-react v0.562.0 - ISC
|
|
708
708
|
*
|
|
709
709
|
* This source code is licensed under the ISC license.
|
|
710
710
|
* See the LICENSE file in the root directory of this source tree.
|
|
@@ -718,7 +718,7 @@ const __iconNode$a = [
|
|
|
718
718
|
const ChevronsUpDown = createLucideIcon("chevrons-up-down", __iconNode$a);
|
|
719
719
|
|
|
720
720
|
/**
|
|
721
|
-
* @license lucide-react v0.
|
|
721
|
+
* @license lucide-react v0.562.0 - ISC
|
|
722
722
|
*
|
|
723
723
|
* This source code is licensed under the ISC license.
|
|
724
724
|
* See the LICENSE file in the root directory of this source tree.
|
|
@@ -733,7 +733,7 @@ const __iconNode$9 = [
|
|
|
733
733
|
const CircleAlert = createLucideIcon("circle-alert", __iconNode$9);
|
|
734
734
|
|
|
735
735
|
/**
|
|
736
|
-
* @license lucide-react v0.
|
|
736
|
+
* @license lucide-react v0.562.0 - ISC
|
|
737
737
|
*
|
|
738
738
|
* This source code is licensed under the ISC license.
|
|
739
739
|
* See the LICENSE file in the root directory of this source tree.
|
|
@@ -747,7 +747,7 @@ const __iconNode$8 = [
|
|
|
747
747
|
const CircleCheck = createLucideIcon("circle-check", __iconNode$8);
|
|
748
748
|
|
|
749
749
|
/**
|
|
750
|
-
* @license lucide-react v0.
|
|
750
|
+
* @license lucide-react v0.562.0 - ISC
|
|
751
751
|
*
|
|
752
752
|
* This source code is licensed under the ISC license.
|
|
753
753
|
* See the LICENSE file in the root directory of this source tree.
|
|
@@ -762,7 +762,7 @@ const __iconNode$7 = [
|
|
|
762
762
|
const CircleQuestionMark = createLucideIcon("circle-question-mark", __iconNode$7);
|
|
763
763
|
|
|
764
764
|
/**
|
|
765
|
-
* @license lucide-react v0.
|
|
765
|
+
* @license lucide-react v0.562.0 - ISC
|
|
766
766
|
*
|
|
767
767
|
* This source code is licensed under the ISC license.
|
|
768
768
|
* See the LICENSE file in the root directory of this source tree.
|
|
@@ -777,7 +777,7 @@ const __iconNode$6 = [
|
|
|
777
777
|
const Columns3 = createLucideIcon("columns-3", __iconNode$6);
|
|
778
778
|
|
|
779
779
|
/**
|
|
780
|
-
* @license lucide-react v0.
|
|
780
|
+
* @license lucide-react v0.562.0 - ISC
|
|
781
781
|
*
|
|
782
782
|
* This source code is licensed under the ISC license.
|
|
783
783
|
* See the LICENSE file in the root directory of this source tree.
|
|
@@ -792,7 +792,7 @@ const __iconNode$5 = [
|
|
|
792
792
|
const ListFilter = createLucideIcon("list-filter", __iconNode$5);
|
|
793
793
|
|
|
794
794
|
/**
|
|
795
|
-
* @license lucide-react v0.
|
|
795
|
+
* @license lucide-react v0.562.0 - ISC
|
|
796
796
|
*
|
|
797
797
|
* This source code is licensed under the ISC license.
|
|
798
798
|
* See the LICENSE file in the root directory of this source tree.
|
|
@@ -806,7 +806,7 @@ const __iconNode$4 = [
|
|
|
806
806
|
const Plus = createLucideIcon("plus", __iconNode$4);
|
|
807
807
|
|
|
808
808
|
/**
|
|
809
|
-
* @license lucide-react v0.
|
|
809
|
+
* @license lucide-react v0.562.0 - ISC
|
|
810
810
|
*
|
|
811
811
|
* This source code is licensed under the ISC license.
|
|
812
812
|
* See the LICENSE file in the root directory of this source tree.
|
|
@@ -820,7 +820,7 @@ const __iconNode$3 = [
|
|
|
820
820
|
const Search = createLucideIcon("search", __iconNode$3);
|
|
821
821
|
|
|
822
822
|
/**
|
|
823
|
-
* @license lucide-react v0.
|
|
823
|
+
* @license lucide-react v0.562.0 - ISC
|
|
824
824
|
*
|
|
825
825
|
* This source code is licensed under the ISC license.
|
|
826
826
|
* See the LICENSE file in the root directory of this source tree.
|
|
@@ -837,7 +837,7 @@ const __iconNode$2 = [
|
|
|
837
837
|
const Trash2 = createLucideIcon("trash-2", __iconNode$2);
|
|
838
838
|
|
|
839
839
|
/**
|
|
840
|
-
* @license lucide-react v0.
|
|
840
|
+
* @license lucide-react v0.562.0 - ISC
|
|
841
841
|
*
|
|
842
842
|
* This source code is licensed under the ISC license.
|
|
843
843
|
* See the LICENSE file in the root directory of this source tree.
|
|
@@ -856,7 +856,7 @@ const __iconNode$1 = [
|
|
|
856
856
|
const WifiOff = createLucideIcon("wifi-off", __iconNode$1);
|
|
857
857
|
|
|
858
858
|
/**
|
|
859
|
-
* @license lucide-react v0.
|
|
859
|
+
* @license lucide-react v0.562.0 - ISC
|
|
860
860
|
*
|
|
861
861
|
* This source code is licensed under the ISC license.
|
|
862
862
|
* See the LICENSE file in the root directory of this source tree.
|
|
@@ -3984,11 +3984,11 @@ NeoInputField.displayName = 'NeoInputField';
|
|
|
3984
3984
|
// Size configuration for consistent styling
|
|
3985
3985
|
const sizeConfig = {
|
|
3986
3986
|
small: {
|
|
3987
|
-
height:
|
|
3988
|
-
paddingTop:
|
|
3989
|
-
paddingRight: neoDesign.spacing.
|
|
3990
|
-
paddingBottom:
|
|
3991
|
-
paddingLeft: neoDesign.spacing.
|
|
3987
|
+
height: neoDesign.spacing.spacing_3_1_2,
|
|
3988
|
+
paddingTop: 1,
|
|
3989
|
+
paddingRight: neoDesign.spacing.spacing_3_4,
|
|
3990
|
+
paddingBottom: 1,
|
|
3991
|
+
paddingLeft: neoDesign.spacing.spacing_3_4,
|
|
3992
3992
|
gap: neoDesign.spacing.spacing_1,
|
|
3993
3993
|
iconSize: neoDesign.typography.fontSize.h4,
|
|
3994
3994
|
fontSize: neoDesign.typography.fontSize.sm,
|
|
@@ -3996,10 +3996,10 @@ const sizeConfig = {
|
|
|
3996
3996
|
},
|
|
3997
3997
|
medium: {
|
|
3998
3998
|
height: neoDesign.spacing.spacing_5,
|
|
3999
|
-
paddingTop:
|
|
4000
|
-
paddingRight: neoDesign.spacing.
|
|
4001
|
-
paddingBottom:
|
|
4002
|
-
paddingLeft: neoDesign.spacing.
|
|
3999
|
+
paddingTop: 1,
|
|
4000
|
+
paddingRight: neoDesign.spacing.spacing_3_4,
|
|
4001
|
+
paddingBottom: 1,
|
|
4002
|
+
paddingLeft: neoDesign.spacing.spacing_3_4,
|
|
4003
4003
|
gap: neoDesign.spacing.spacing_1,
|
|
4004
4004
|
iconSize: neoDesign.typography.fontSize.h4,
|
|
4005
4005
|
fontSize: neoDesign.typography.fontSize.default,
|
|
@@ -4007,10 +4007,10 @@ const sizeConfig = {
|
|
|
4007
4007
|
},
|
|
4008
4008
|
large: {
|
|
4009
4009
|
height: neoDesign.spacing.spacing_6,
|
|
4010
|
-
paddingTop:
|
|
4011
|
-
paddingRight: neoDesign.spacing.
|
|
4012
|
-
paddingBottom:
|
|
4013
|
-
paddingLeft: neoDesign.spacing.
|
|
4010
|
+
paddingTop: 1,
|
|
4011
|
+
paddingRight: neoDesign.spacing.spacing_3_4,
|
|
4012
|
+
paddingBottom: 1,
|
|
4013
|
+
paddingLeft: neoDesign.spacing.spacing_3_4,
|
|
4014
4014
|
gap: neoDesign.spacing.spacing_1_1_2,
|
|
4015
4015
|
iconSize: neoDesign.typography.fontSize.h2,
|
|
4016
4016
|
fontSize: neoDesign.typography.fontSize.default,
|
|
@@ -4019,10 +4019,10 @@ const sizeConfig = {
|
|
|
4019
4019
|
},
|
|
4020
4020
|
xlarge: {
|
|
4021
4021
|
height: neoDesign.spacing.spacing_8,
|
|
4022
|
-
paddingTop:
|
|
4023
|
-
paddingRight: neoDesign.spacing.
|
|
4024
|
-
paddingBottom:
|
|
4025
|
-
paddingLeft: neoDesign.spacing.
|
|
4022
|
+
paddingTop: 1,
|
|
4023
|
+
paddingRight: neoDesign.spacing.spacing_3_4,
|
|
4024
|
+
paddingBottom: 1,
|
|
4025
|
+
paddingLeft: neoDesign.spacing.spacing_3_4,
|
|
4026
4026
|
gap: neoDesign.spacing.spacing_2,
|
|
4027
4027
|
iconSize: neoDesign.typography.fontSize.h2,
|
|
4028
4028
|
fontSize: neoDesign.typography.fontSize.default,
|
|
@@ -4031,10 +4031,10 @@ const sizeConfig = {
|
|
|
4031
4031
|
},
|
|
4032
4032
|
xxlarge: {
|
|
4033
4033
|
height: neoDesign.spacing.spacing_10,
|
|
4034
|
-
paddingTop:
|
|
4035
|
-
paddingRight: neoDesign.spacing.
|
|
4036
|
-
paddingBottom:
|
|
4037
|
-
paddingLeft: neoDesign.spacing.
|
|
4034
|
+
paddingTop: 1,
|
|
4035
|
+
paddingRight: neoDesign.spacing.spacing_3_4,
|
|
4036
|
+
paddingBottom: 1,
|
|
4037
|
+
paddingLeft: neoDesign.spacing.spacing_3_4,
|
|
4038
4038
|
gap: neoDesign.spacing.spacing_2,
|
|
4039
4039
|
iconSize: neoDesign.spacing.spacing_5,
|
|
4040
4040
|
fontSize: neoDesign.typography.fontSize.h5,
|
|
@@ -4049,12 +4049,13 @@ const StyledListItemButton$1 = styles.styled(ListItemButton, {
|
|
|
4049
4049
|
prop !== 'secondaryText' &&
|
|
4050
4050
|
prop !== 'badge' &&
|
|
4051
4051
|
prop !== 'icon' &&
|
|
4052
|
-
prop !== 'isLink'
|
|
4053
|
-
|
|
4052
|
+
prop !== 'isLink' &&
|
|
4053
|
+
prop !== 'hasSecondaryText',
|
|
4054
|
+
})(({ theme, size = 'medium', isLink, hasSecondaryText }) => {
|
|
4054
4055
|
const config = sizeConfig[size];
|
|
4055
4056
|
return {
|
|
4056
4057
|
minHeight: config.height,
|
|
4057
|
-
height: config.height,
|
|
4058
|
+
height: hasSecondaryText ? 'auto' : config.height,
|
|
4058
4059
|
paddingTop: config.paddingTop,
|
|
4059
4060
|
paddingRight: config.paddingRight,
|
|
4060
4061
|
paddingBottom: config.paddingBottom,
|
|
@@ -4062,6 +4063,8 @@ const StyledListItemButton$1 = styles.styled(ListItemButton, {
|
|
|
4062
4063
|
borderRadius: neoDesign.spacing.spacing_3_4, // 6px
|
|
4063
4064
|
backgroundColor: neoDesign.semanticColors.input.background,
|
|
4064
4065
|
gap: config.gap,
|
|
4066
|
+
// Icon is always centered vertically per Figma design
|
|
4067
|
+
alignItems: 'center',
|
|
4065
4068
|
transition: theme.transitions.create(['background-color'], {
|
|
4066
4069
|
duration: theme.transitions.duration.short,
|
|
4067
4070
|
}),
|
|
@@ -4076,10 +4079,17 @@ const StyledListItemButton$1 = styles.styled(ListItemButton, {
|
|
|
4076
4079
|
}),
|
|
4077
4080
|
},
|
|
4078
4081
|
// Primary text styling
|
|
4082
|
+
// Font weight varies by size per Figma:
|
|
4083
|
+
// - Default: small/medium use 400, large/xlarge/xxlarge use 500
|
|
4084
|
+
// - Link: xxlarge uses 600, others use their default weight
|
|
4079
4085
|
'& .list-item-primary': {
|
|
4080
4086
|
fontSize: theme.typography.pxToRem(config.fontSize),
|
|
4081
4087
|
lineHeight: config.lineHeight,
|
|
4082
|
-
fontWeight:
|
|
4088
|
+
fontWeight: isLink && size === 'xxlarge'
|
|
4089
|
+
? neoDesign.typography.fontWeight.semiBold
|
|
4090
|
+
: size === 'small' || size === 'medium'
|
|
4091
|
+
? neoDesign.typography.fontWeight.regular
|
|
4092
|
+
: neoDesign.typography.fontWeight.medium,
|
|
4083
4093
|
color: isLink
|
|
4084
4094
|
? neoDesign.semanticColors.typography.link.primary
|
|
4085
4095
|
: neoDesign.semanticColors.typography.navigation.default,
|
|
@@ -4094,15 +4104,14 @@ const StyledListItemButton$1 = styles.styled(ListItemButton, {
|
|
|
4094
4104
|
fontWeight: neoDesign.typography.fontWeight.regular,
|
|
4095
4105
|
color: neoDesign.semanticColors.typography.bodySecondary,
|
|
4096
4106
|
},
|
|
4097
|
-
// Secondary text styling
|
|
4107
|
+
// Secondary text styling - wraps with word break
|
|
4098
4108
|
'& .list-item-secondary': {
|
|
4099
4109
|
fontSize: theme.typography.pxToRem('secondaryFontSize' in config ? config.secondaryFontSize : config.fontSize),
|
|
4100
4110
|
lineHeight: size === 'large' ? 1.5 : 1.4,
|
|
4101
4111
|
fontWeight: neoDesign.typography.fontWeight.regular,
|
|
4102
4112
|
color: neoDesign.semanticColors.typography.bodySecondary,
|
|
4103
|
-
|
|
4104
|
-
|
|
4105
|
-
whiteSpace: 'nowrap',
|
|
4113
|
+
wordBreak: 'break-word',
|
|
4114
|
+
whiteSpace: 'normal',
|
|
4106
4115
|
...(size === 'large' && {
|
|
4107
4116
|
marginBottom: -2,
|
|
4108
4117
|
}),
|
|
@@ -4112,6 +4121,9 @@ const StyledListItemButton$1 = styles.styled(ListItemButton, {
|
|
|
4112
4121
|
backgroundColor: neoDesign.semanticColors.input.background,
|
|
4113
4122
|
},
|
|
4114
4123
|
// Selected/Active state
|
|
4124
|
+
// Font weights per Figma:
|
|
4125
|
+
// - Primary: small/medium/xxlarge use 500, large/xlarge use 600
|
|
4126
|
+
// - Secondary: large/xlarge use 500, xxlarge uses 400
|
|
4115
4127
|
[`&.${ListItemButton.listItemButtonClasses.selected}`]: {
|
|
4116
4128
|
backgroundColor: neoDesign.semanticColors.buttons.secondary.hoverBackground,
|
|
4117
4129
|
'&:hover': {
|
|
@@ -4121,11 +4133,15 @@ const StyledListItemButton$1 = styles.styled(ListItemButton, {
|
|
|
4121
4133
|
color: neoDesign.semanticColors.icons.pressed,
|
|
4122
4134
|
},
|
|
4123
4135
|
'& .list-item-primary': {
|
|
4124
|
-
fontWeight:
|
|
4136
|
+
fontWeight: size === 'large' || size === 'xlarge'
|
|
4137
|
+
? neoDesign.typography.fontWeight.semiBold
|
|
4138
|
+
: neoDesign.typography.fontWeight.medium,
|
|
4125
4139
|
color: neoDesign.semanticColors.typography.navigation.default,
|
|
4126
4140
|
},
|
|
4127
4141
|
'& .list-item-secondary': {
|
|
4128
|
-
fontWeight:
|
|
4142
|
+
fontWeight: size === 'large' || size === 'xlarge'
|
|
4143
|
+
? neoDesign.typography.fontWeight.medium
|
|
4144
|
+
: neoDesign.typography.fontWeight.regular,
|
|
4129
4145
|
},
|
|
4130
4146
|
},
|
|
4131
4147
|
// Disabled state
|
|
@@ -4194,7 +4210,7 @@ const NeoListItem = ({ size = 'medium', primaryText, secondaryText, badge, icon,
|
|
|
4194
4210
|
const showBadge = badge && size === 'xxlarge';
|
|
4195
4211
|
// Prepare primary text with badge if needed
|
|
4196
4212
|
const primaryContent = showBadge ? (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [primaryText, ' ', jsxRuntime.jsx(Typography, { component: "span", className: "list-item-badge", children: badge })] })) : (primaryText);
|
|
4197
|
-
return (jsxRuntime.jsxs(StyledListItemButton$1, { size: size, isLink: isLink, ...(component && { component }), ...props, children: [icon && jsxRuntime.jsx(ListItemIcon, { children: icon }), jsxRuntime.jsx(ListItemText, { primary: primaryContent, secondary: showSecondaryText ? secondaryText : undefined, slotProps: {
|
|
4213
|
+
return (jsxRuntime.jsxs(StyledListItemButton$1, { size: size, isLink: isLink, hasSecondaryText: !!showSecondaryText, ...(component && { component }), ...props, children: [icon && jsxRuntime.jsx(ListItemIcon, { children: icon }), jsxRuntime.jsx(ListItemText, { primary: primaryContent, secondary: showSecondaryText ? secondaryText : undefined, sx: { minWidth: 0, flex: 1 }, slotProps: {
|
|
4198
4214
|
primary: { className: 'list-item-primary' },
|
|
4199
4215
|
secondary: { className: 'list-item-secondary' },
|
|
4200
4216
|
} })] }));
|
|
@@ -4771,7 +4787,7 @@ const Subtitle = styles.styled(Typography)(() => ({
|
|
|
4771
4787
|
* </NeoPageContent>
|
|
4772
4788
|
* ```
|
|
4773
4789
|
*/
|
|
4774
|
-
function NeoPageContent({ pageTitle, subtitle, action, sticky = false, contentMaxWidth = false, disableGutters = false, isLoading = false, showBackToTop = true, children, sx, ...boxProps }) {
|
|
4790
|
+
function NeoPageContent({ pageTitle, subtitle, breadcrumbs, action, sticky = false, contentMaxWidth = false, centerContent = true, disableGutters = false, isLoading = false, showBackToTop = true, children, sx, ...boxProps }) {
|
|
4775
4791
|
const [showBackToTopButton, setShowBackToTopButton] = react.useState(false);
|
|
4776
4792
|
const headerRef = react.useRef(null);
|
|
4777
4793
|
const containerRef = react.useRef(null);
|
|
@@ -4801,8 +4817,8 @@ function NeoPageContent({ pageTitle, subtitle, action, sticky = false, contentMa
|
|
|
4801
4817
|
// Also try to scroll window in case component is in a different context
|
|
4802
4818
|
window.scrollTo({ top: 0, behavior: 'smooth' });
|
|
4803
4819
|
};
|
|
4804
|
-
const headerContent = (jsxRuntime.jsxs(Stack, { ref: headerRef, direction: "row", justifyContent: "space-between", alignItems: "flex-start", sx: {
|
|
4805
|
-
|
|
4820
|
+
const headerContent = (jsxRuntime.jsxs(Stack, { ref: headerRef, sx: { flexShrink: 0, gap: '0.5rem' }, children: [breadcrumbs && breadcrumbs.length > 0 && (jsxRuntime.jsx(NeoBreadcrumbs, { children: breadcrumbs.map((item, index) => (jsxRuntime.jsx(NeoBreadcrumbLink, { href: item.href, current: index === breadcrumbs.length - 1, children: item.label }, item.href ?? index))) })), jsxRuntime.jsxs(Stack, { direction: "row", justifyContent: "space-between", alignItems: "flex-start", sx: { gap: '1rem' }, children: [jsxRuntime.jsxs(Stack, { sx: { gap: '0.5rem', flexGrow: 1 }, children: [jsxRuntime.jsx(PageTitle, { children: pageTitle }), subtitle &&
|
|
4821
|
+
(typeof subtitle === 'string' ? (jsxRuntime.jsx(Subtitle, { variant: "caption", children: subtitle })) : (subtitle))] }), action] })] }));
|
|
4806
4822
|
const content = isLoading ? (jsxRuntime.jsx(Box, { sx: {
|
|
4807
4823
|
display: 'flex',
|
|
4808
4824
|
alignItems: 'center',
|
|
@@ -4826,15 +4842,27 @@ function NeoPageContent({ pageTitle, subtitle, action, sticky = false, contentMa
|
|
|
4826
4842
|
pb: `${neoDesign.spacing.spacing_2_1_2}px`,
|
|
4827
4843
|
height: '100%',
|
|
4828
4844
|
overflow: 'auto',
|
|
4829
|
-
}, children: [sticky ? (jsxRuntime.jsx(StickyHeader, { ref: headerRef, sx: {
|
|
4845
|
+
}, children: [sticky ? (jsxRuntime.jsx(StickyHeader, { ref: headerRef, sx: {
|
|
4846
|
+
pt: `${neoDesign.spacing.spacing_2}px`,
|
|
4847
|
+
...(contentMaxWidth !== false && {
|
|
4848
|
+
maxWidth: theme => theme.breakpoints.values[contentMaxWidth],
|
|
4849
|
+
width: '100%',
|
|
4850
|
+
}),
|
|
4851
|
+
}, children: headerContent })) : (jsxRuntime.jsx(Box, { ref: headerRef, sx: {
|
|
4852
|
+
mb: `${neoDesign.spacing.spacing_1}px`,
|
|
4853
|
+
...(contentMaxWidth !== false && {
|
|
4854
|
+
maxWidth: theme => theme.breakpoints.values[contentMaxWidth],
|
|
4855
|
+
width: '100%',
|
|
4856
|
+
}),
|
|
4857
|
+
}, children: headerContent })), jsxRuntime.jsx(Box, { sx: {
|
|
4830
4858
|
flexGrow: 1,
|
|
4831
4859
|
minHeight: 0,
|
|
4832
4860
|
display: 'flex',
|
|
4833
4861
|
flexDirection: 'column',
|
|
4834
4862
|
...(contentMaxWidth !== false && {
|
|
4835
4863
|
maxWidth: theme => theme.breakpoints.values[contentMaxWidth],
|
|
4836
|
-
mx: 'auto',
|
|
4837
4864
|
width: '100%',
|
|
4865
|
+
...(centerContent ? { mx: 'auto' } : { alignSelf: 'flex-start' }),
|
|
4838
4866
|
}),
|
|
4839
4867
|
}, children: content })] }) }), showBackToTop && (jsxRuntime.jsx(Fade, { in: showBackToTopButton, children: jsxRuntime.jsx(Box, { sx: {
|
|
4840
4868
|
position: 'fixed',
|