@redsift/design-system 10.6.6 → 10.7.0

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/index.d.ts CHANGED
@@ -2272,6 +2272,8 @@ interface SideNavigationMenuItemProps extends ComponentProps<'a'> {
2272
2272
  badge?: number | string;
2273
2273
  /** Custom props to pass to the Badge component, if any. */
2274
2274
  badgeProps?: Omit<BadgeProps, 'ref'>;
2275
+ /** Color variant. */
2276
+ color?: string;
2275
2277
  /** Whether the menu item has a border or not. */
2276
2278
  hasBorder?: boolean;
2277
2279
  /** Href is required for this component. */
@@ -2295,6 +2297,8 @@ interface SideNavigationMenuItemProps extends ComponentProps<'a'> {
2295
2297
  theme?: Theme;
2296
2298
  }
2297
2299
  type StyledSideNavigationMenuItemProps = Omit<SideNavigationMenuItemProps, 'isCurrent' | 'isDisabled' | 'isSecondLevel' | 'hasBorder'> & {
2300
+ $color: SideNavigationMenuItemProps['color'];
2301
+ $hasIcon: boolean;
2298
2302
  $isCurrent: SideNavigationMenuItemProps['isCurrent'];
2299
2303
  $isDisabled: SideNavigationMenuItemProps['isDisabled'];
2300
2304
  $isSecondLevel: SideNavigationMenuItemProps['isSecondLevel'];
package/index.js CHANGED
@@ -6494,11 +6494,12 @@ const StyledSideNavigationMenuItem = styled.a`
6494
6494
  ${_ref2 => {
6495
6495
  let {
6496
6496
  $isDisabled,
6497
- $theme
6497
+ $theme,
6498
+ $color
6498
6499
  } = _ref2;
6499
6500
  return !$isDisabled ? css`
6500
6501
  & {
6501
- color: var(--redsift-color-${$theme}-components-side-navigation-menu-item-text-resting);
6502
+ color: ${$color ? $color : `var(--redsift-color-${$theme}-components-side-navigation-menu-item-text-resting)`};
6502
6503
  }
6503
6504
  ` : css`
6504
6505
  & {
@@ -6526,12 +6527,13 @@ const StyledSideNavigationMenuItem = styled.a`
6526
6527
  ${_ref3 => {
6527
6528
  let {
6528
6529
  $isDisabled,
6529
- $theme
6530
+ $theme,
6531
+ $color
6530
6532
  } = _ref3;
6531
6533
  return !$isDisabled ? css`
6532
6534
  background-color: var(--redsift-color-${$theme}-components-side-navigation-menu-item-background-hover);
6533
6535
  & {
6534
- color: var(--redsift-color-${$theme}-components-side-navigation-menu-item-text-hover);
6536
+ color: ${$color ? $color : `var(--redsift-color-${$theme}-components-side-navigation-menu-item-text-hover)`};
6535
6537
  }
6536
6538
  ` : '';
6537
6539
  }}
@@ -6586,6 +6588,7 @@ const StyledSideNavigationMenuItem = styled.a`
6586
6588
 
6587
6589
  ${_ref6 => {
6588
6590
  let {
6591
+ $hasIcon,
6589
6592
  $isSecondLevel,
6590
6593
  $variant,
6591
6594
  $theme
@@ -6613,15 +6616,14 @@ const StyledSideNavigationMenuItem = styled.a`
6613
6616
  background-color: var(--redsift-color-${$theme}-components-side-navigation-menu-item-background-secondary);
6614
6617
  font-size: var(--redsift-typography-caption-font-size);
6615
6618
  padding-bottom: 7px;
6616
- padding-left: 62px;
6619
+ padding-left: ${$hasIcon ? '26px' : '62px'};
6617
6620
  padding-right: 8px;
6618
6621
  padding-top: 7px;
6619
6622
  border-radius: 0;
6620
6623
 
6621
-
6622
6624
  .redsift-icon.first {
6623
6625
  box-sizing: unset;
6624
- margin-right: 0;
6626
+ margin-right: 8px;
6625
6627
  }
6626
6628
  `;
6627
6629
  }}
@@ -6759,7 +6761,7 @@ const Badge = /*#__PURE__*/forwardRef((props, ref) => {
6759
6761
  Badge.className = CLASSNAME$J;
6760
6762
  Badge.displayName = COMPONENT_NAME$J;
6761
6763
 
6762
- const _excluded$M = ["as", "badge", "badgeProps", "children", "className", "hasBorder", "href", "icon", "iconProps", "iconRef", "isCurrent", "isDisabled", "isSecondLevel", "onClick", "onKeyDown", "tabIndex", "theme"];
6764
+ const _excluded$M = ["as", "badge", "badgeProps", "children", "className", "color", "hasBorder", "href", "icon", "iconProps", "iconRef", "isCurrent", "isDisabled", "isSecondLevel", "onClick", "onKeyDown", "tabIndex", "theme"];
6763
6765
  const COMPONENT_NAME$I = 'SideNavigationMenuItem';
6764
6766
  const CLASSNAME$I = 'redsift-side-navigation-menu-item';
6765
6767
 
@@ -6774,6 +6776,7 @@ const SideNavigationMenuItem = /*#__PURE__*/forwardRef((props, ref) => {
6774
6776
  badgeProps,
6775
6777
  children,
6776
6778
  className,
6779
+ color,
6777
6780
  hasBorder,
6778
6781
  href,
6779
6782
  icon,
@@ -6825,6 +6828,8 @@ const SideNavigationMenuItem = /*#__PURE__*/forwardRef((props, ref) => {
6825
6828
  as: as,
6826
6829
  role: "menuitem"
6827
6830
  }, forwardedProps, {
6831
+ $color: color,
6832
+ $hasIcon: icon !== undefined,
6828
6833
  $isCurrent: isCurrent,
6829
6834
  $isDisabled: isDisabled,
6830
6835
  $isSecondLevel: isSecondLevel,
@@ -6844,7 +6849,7 @@ const SideNavigationMenuItem = /*#__PURE__*/forwardRef((props, ref) => {
6844
6849
  icon: icon,
6845
6850
  ref: iconRef,
6846
6851
  className: "first",
6847
- size: isSecondLevel ? IconSize.xsmall : IconSize.large
6852
+ size: isSecondLevel ? IconSize.small : IconSize.large
6848
6853
  })) : null, /*#__PURE__*/React__default.createElement("span", {
6849
6854
  className: "content"
6850
6855
  }, children), badge ? /*#__PURE__*/React__default.createElement(Badge, _extends$1({