@moderneinc/neo-styled-components 4.1.2-next.f98de9 → 5.0.0-next.0fa9b3

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.
@@ -71,11 +71,11 @@ export interface NeoDatePickerProps {
71
71
  /**
72
72
  * Additional props passed to single DatePicker
73
73
  */
74
- datePickerProps?: Omit<Partial<DatePickerProps<false>>, 'value' | 'onChange' | 'open' | 'onOpen' | 'onClose' | 'label'>;
74
+ datePickerProps?: Omit<Partial<DatePickerProps>, 'value' | 'onChange' | 'open' | 'onOpen' | 'onClose' | 'label'>;
75
75
  /**
76
76
  * Additional props passed to DateRangePicker
77
77
  */
78
- dateRangePickerProps?: Omit<Partial<DateRangePickerProps<false>>, 'value' | 'onChange' | 'open' | 'onOpen' | 'onClose' | 'label'>;
78
+ dateRangePickerProps?: Omit<Partial<DateRangePickerProps>, 'value' | 'onChange' | 'open' | 'onOpen' | 'onClose' | 'label'>;
79
79
  }
80
80
  /**
81
81
  * NeoDatePicker - Moderne design system date picker component
package/dist/index.d.ts CHANGED
@@ -2852,11 +2852,11 @@ interface NeoDatePickerProps {
2852
2852
  /**
2853
2853
  * Additional props passed to single DatePicker
2854
2854
  */
2855
- datePickerProps?: Omit<Partial<DatePickerProps<false>>, 'value' | 'onChange' | 'open' | 'onOpen' | 'onClose' | 'label'>;
2855
+ datePickerProps?: Omit<Partial<DatePickerProps>, 'value' | 'onChange' | 'open' | 'onOpen' | 'onClose' | 'label'>;
2856
2856
  /**
2857
2857
  * Additional props passed to DateRangePicker
2858
2858
  */
2859
- dateRangePickerProps?: Omit<Partial<DateRangePickerProps<false>>, 'value' | 'onChange' | 'open' | 'onOpen' | 'onClose' | 'label'>;
2859
+ dateRangePickerProps?: Omit<Partial<DateRangePickerProps>, 'value' | 'onChange' | 'open' | 'onOpen' | 'onClose' | 'label'>;
2860
2860
  }
2861
2861
  /**
2862
2862
  * NeoDatePicker - Moderne design system date picker component
package/dist/index.esm.js CHANGED
@@ -31,8 +31,8 @@ import Tooltip, { tooltipClasses } from '@mui/material/Tooltip';
31
31
  import { dayCalendarClasses } from '@mui/x-date-pickers/DateCalendar';
32
32
  import { DatePicker } from '@mui/x-date-pickers/DatePicker';
33
33
  import { pickerPopperClasses } from '@mui/x-date-pickers/internals';
34
+ import { pickerDayClasses } from '@mui/x-date-pickers/PickerDay';
34
35
  import { pickersCalendarHeaderClasses } from '@mui/x-date-pickers/PickersCalendarHeader';
35
- import { pickersDayClasses } from '@mui/x-date-pickers/PickersDay';
36
36
  import { PickersShortcuts } from '@mui/x-date-pickers/PickersShortcuts';
37
37
  import { DateRangePicker } from '@mui/x-date-pickers-pro/DateRangePicker';
38
38
  import { dateRangePickerDayClasses } from '@mui/x-date-pickers-pro/DateRangePickerDay';
@@ -2785,18 +2785,21 @@ NeoDataGridColumnsButton.displayName = 'NeoDataGridColumnsButton';
2785
2785
  const sizeStyles = {
2786
2786
  small: {
2787
2787
  height: 16,
2788
+ minWidth: 16,
2788
2789
  paddingLeft: spacing.spacing_1_2, // 4px
2789
2790
  paddingRight: spacing.spacing_1_2, // 4px
2790
2791
  },
2791
2792
  medium: {
2792
2793
  height: 18,
2794
+ minWidth: 18,
2793
2795
  paddingLeft: spacing.spacing_3_4, // 6px
2794
2796
  paddingRight: spacing.spacing_3_4, // 6px
2795
2797
  },
2796
2798
  large: {
2797
2799
  height: 20,
2798
- paddingLeft: spacing.spacing_3_4, // 6px
2799
- paddingRight: spacing.spacing_3_4, // 6px
2800
+ minWidth: 20,
2801
+ paddingLeft: spacing.spacing_1, // 8px
2802
+ paddingRight: spacing.spacing_1, // 8px
2800
2803
  },
2801
2804
  };
2802
2805
  const outlinedColorStyles = {
@@ -2847,8 +2850,10 @@ const filledColorStyles = {
2847
2850
  };
2848
2851
  const StyledChip$1 = styled(Chip)(({ theme, size, variant, color }) => ({
2849
2852
  padding: 0,
2853
+ boxSizing: 'border-box',
2850
2854
  borderRadius: borderRadius.full,
2851
2855
  fontSize: theme.typography.pxToRem(typography.fontSize.xs),
2856
+ lineHeight: 1,
2852
2857
  fontWeight: typography.fontWeight.medium,
2853
2858
  ...(size && sizeStyles[size]),
2854
2859
  [`& .${chipClasses.label}`]: {
@@ -3573,7 +3578,7 @@ const StyledDatePicker = styled(DatePicker)(({ theme }) => ({
3573
3578
  fontWeight: typography.fontWeight.medium,
3574
3579
  color: semanticColors.typography.bodySecondary,
3575
3580
  },
3576
- [`& .${pickersDayClasses.root}`]: {
3581
+ [`& .${pickerDayClasses.root}`]: {
3577
3582
  fontSize: theme.typography.pxToRem(typography.fontSize.sm),
3578
3583
  color: semanticColors.typography.bodySecondary,
3579
3584
  borderRadius: borderRadius.l,
@@ -3587,7 +3592,7 @@ const StyledDatePicker = styled(DatePicker)(({ theme }) => ({
3587
3592
  backgroundColor: colors.grey[800],
3588
3593
  },
3589
3594
  },
3590
- [`&.${pickersDayClasses.today}`]: {
3595
+ [`&.${pickerDayClasses.today}`]: {
3591
3596
  border: `2px solid ${colors.grey[800]}`,
3592
3597
  backgroundColor: 'transparent',
3593
3598
  },
@@ -3613,8 +3618,6 @@ const StyledDateRangePicker = styled(DateRangePicker)(({ theme }) => ({
3613
3618
  fontSize: theme.typography.pxToRem(typography.fontSize.sm),
3614
3619
  color: semanticColors.typography.bodySecondary,
3615
3620
  borderRadius: borderRadius.l,
3616
- },
3617
- [`& .${dateRangePickerDayClasses.day}`]: {
3618
3621
  '&:hover': {
3619
3622
  backgroundColor: semanticColors.icons.hoverBackground,
3620
3623
  },
@@ -3623,15 +3626,13 @@ const StyledDateRangePicker = styled(DateRangePicker)(({ theme }) => ({
3623
3626
  color: semanticColors.surfaces.white,
3624
3627
  },
3625
3628
  },
3626
- [`& .${dateRangePickerDayClasses.rangeIntervalDayHighlight}`]: {
3629
+ [`& .${dateRangePickerDayClasses.insideSelection}`]: {
3627
3630
  backgroundColor: semanticColors.icons.hoverBackground,
3631
+ color: semanticColors.typography.input.default,
3628
3632
  },
3629
- [`& .${dateRangePickerDayClasses.rangeIntervalDayHighlightStart}, & .${dateRangePickerDayClasses.rangeIntervalDayHighlightEnd}`]: {
3633
+ [`& .${dateRangePickerDayClasses.selectionStart}, & .${dateRangePickerDayClasses.selectionEnd}`]: {
3630
3634
  backgroundColor: colors.grey[800],
3631
3635
  },
3632
- [`& .${dateRangePickerDayClasses.dayInsideRangeInterval}`]: {
3633
- color: semanticColors.typography.input.default,
3634
- },
3635
3636
  [`& .${pickersCalendarHeaderClasses.label}`]: {
3636
3637
  fontSize: theme.typography.pxToRem(typography.fontSize.sm),
3637
3638
  fontWeight: typography.fontWeight.semiBold,
@@ -6554,7 +6555,11 @@ const ItemEndAction = styled('span')({
6554
6555
  * @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC?node-id=4190-30493
6555
6556
  */
6556
6557
  const NeoTreeView = ({ slots, ...props }) => {
6557
- return (jsx(StyledTreeView, { slots: {
6558
+ return (jsx(StyledTreeView
6559
+ // v9 enables virtualization by default; disabled to preserve current layout behavior
6560
+ , {
6561
+ // v9 enables virtualization by default; disabled to preserve current layout behavior
6562
+ disableVirtualization: true, slots: {
6558
6563
  item: NeoTreeItem,
6559
6564
  collapseIcon: CollapseIcon,
6560
6565
  expandIcon: ExpandIcon,
@@ -6575,17 +6580,14 @@ const StyledTreeView = styled(RichTreeViewPro)({
6575
6580
  [`& .${treeItemClasses.content}:hover`]: {
6576
6581
  backgroundColor: semanticColors.surfaces.listHover,
6577
6582
  },
6578
- [`& .${treeItemClasses.content}.Mui-focused`]: {
6583
+ [`& .${treeItemClasses.content}[data-focused]`]: {
6579
6584
  boxShadow: `inset 0 0 0 2px ${semanticColors.border.focus}`,
6580
6585
  backgroundColor: 'transparent',
6581
6586
  },
6582
- [`& .${treeItemClasses.content}.Mui-selected`]: {
6583
- backgroundColor: semanticColors.surfaces.listHover,
6584
- },
6585
- [`& .${treeItemClasses.content}.Mui-selected:hover`]: {
6587
+ [`& .${treeItemClasses.content}[data-selected]`]: {
6586
6588
  backgroundColor: semanticColors.surfaces.listHover,
6587
6589
  },
6588
- [`& .${treeItemClasses.content}.Mui-selected.Mui-focused`]: {
6590
+ [`& .${treeItemClasses.content}[data-selected][data-focused]`]: {
6589
6591
  backgroundColor: semanticColors.surfaces.listHover,
6590
6592
  boxShadow: `inset 0 0 0 2px ${semanticColors.border.focus}`,
6591
6593
  },