@moderneinc/neo-styled-components 2.0.3-next.04b340 → 2.0.3-next.46edb3

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.
@@ -37,6 +37,10 @@ export interface NeoButtonProps extends Omit<ButtonBaseProps, 'children'> {
37
37
  * Button content
38
38
  */
39
39
  children?: ReactNode;
40
+ /**
41
+ * URL to link to. When provided, the button renders as a link element.
42
+ */
43
+ href?: string;
40
44
  }
41
45
  /**
42
46
  * NeoButton - Text button component based on MUI ButtonBase
@@ -65,9 +65,12 @@ export interface NeoMarketplaceCardProps extends Omit<CardProps, 'children'> {
65
65
  * - Property 1="Default" → Base state (no props)
66
66
  *
67
67
  * Design Tokens Used:
68
- * - semanticColors.surfaces.card (#FFFFFF) - Card background
68
+ * - semanticColors.surfaces.card (#FFFFFF) - Default card background
69
+ * - semanticColors.status.info.light (#f2f3ff) - Active/focused card background
69
70
  * - semanticColors.border.card (#d1d5db) - Default border
70
71
  * - semanticColors.border.tabActive (#2f42ff) - Active/focused border
72
+ * - shadows.focusWhite1 - Inner white focus ring (2px spread)
73
+ * - shadows.focusBlue2 - Outer blue focus ring (4px spread)
71
74
  * - colors.grey[800] (#1F2937) - Text color
72
75
  * - typography.fontSize.xxs (10px) - Recipe count
73
76
  * - typography.fontSize.xs (12px) - Description
package/dist/index.d.ts CHANGED
@@ -515,6 +515,10 @@ interface NeoButtonProps extends Omit<ButtonBaseProps, 'children'> {
515
515
  * Button content
516
516
  */
517
517
  children?: ReactNode;
518
+ /**
519
+ * URL to link to. When provided, the button renders as a link element.
520
+ */
521
+ href?: string;
518
522
  }
519
523
  /**
520
524
  * NeoButton - Text button component based on MUI ButtonBase
@@ -2561,9 +2565,12 @@ interface NeoMarketplaceCardProps extends Omit<CardProps, 'children'> {
2561
2565
  * - Property 1="Default" → Base state (no props)
2562
2566
  *
2563
2567
  * Design Tokens Used:
2564
- * - semanticColors.surfaces.card (#FFFFFF) - Card background
2568
+ * - semanticColors.surfaces.card (#FFFFFF) - Default card background
2569
+ * - semanticColors.status.info.light (#f2f3ff) - Active/focused card background
2565
2570
  * - semanticColors.border.card (#d1d5db) - Default border
2566
2571
  * - semanticColors.border.tabActive (#2f42ff) - Active/focused border
2572
+ * - shadows.focusWhite1 - Inner white focus ring (2px spread)
2573
+ * - shadows.focusBlue2 - Outer blue focus ring (4px spread)
2567
2574
  * - colors.grey[800] (#1F2937) - Text color
2568
2575
  * - typography.fontSize.xxs (10px) - Recipe count
2569
2576
  * - typography.fontSize.xs (12px) - Description
package/dist/index.esm.js CHANGED
@@ -4327,6 +4327,11 @@ const NeoListItemButton = ({ children, selected = false, disabled = false, ...pr
4327
4327
  };
4328
4328
  NeoListItemButton.displayName = 'NeoListItemButton';
4329
4329
 
4330
+ /**
4331
+ * Focus ring box-shadow using Neo design tokens
4332
+ * Combines focusWhite1 (inner white ring) and focusBlue2 (outer blue ring)
4333
+ */
4334
+ const focusRingShadow = `${shadows.focusWhite1.x}px ${shadows.focusWhite1.y}px ${shadows.focusWhite1.blur}px ${shadows.focusWhite1.spread}px ${shadows.focusWhite1.shadow}, ${shadows.focusBlue2.x}px ${shadows.focusBlue2.y}px ${shadows.focusBlue2.blur}px ${shadows.focusBlue2.spread}px ${shadows.focusBlue2.shadow}`;
4330
4335
  /**
4331
4336
  * Styled Card component with Neo design tokens
4332
4337
  */
@@ -4339,19 +4344,20 @@ const StyledCard = styled(MuiCard, {
4339
4344
  display: 'flex',
4340
4345
  flexDirection: 'column',
4341
4346
  gap: theme.spacing(2), // 16px
4342
- backgroundColor: semanticColors.surfaces.card,
4347
+ backgroundColor: selected ? semanticColors.status.info.light : semanticColors.surfaces.card,
4343
4348
  border: `1px solid ${selected ? semanticColors.border.tabActive : semanticColors.border.card}`,
4344
4349
  borderRadius: theme.typography.pxToRem(4),
4345
4350
  boxShadow: 'none',
4346
- transition: theme.transitions.create(['border-color']),
4351
+ transition: theme.transitions.create(['border-color', 'background-color', 'box-shadow']),
4347
4352
  cursor: 'pointer',
4348
4353
  '&:hover': {
4349
4354
  borderColor: selected ? semanticColors.border.tabActive : semanticColors.border.card,
4350
4355
  },
4351
4356
  '&:focus-visible': {
4352
- outline: `2px solid ${semanticColors.border.tabActive}`,
4353
- outlineOffset: '2px',
4357
+ backgroundColor: semanticColors.status.info.light,
4354
4358
  borderColor: semanticColors.border.tabActive,
4359
+ boxShadow: focusRingShadow,
4360
+ outline: 'none',
4355
4361
  },
4356
4362
  ...(disabled && {
4357
4363
  opacity: 0.5,
@@ -4446,9 +4452,12 @@ const Description = styled('p')(({ theme }) => ({
4446
4452
  * - Property 1="Default" → Base state (no props)
4447
4453
  *
4448
4454
  * Design Tokens Used:
4449
- * - semanticColors.surfaces.card (#FFFFFF) - Card background
4455
+ * - semanticColors.surfaces.card (#FFFFFF) - Default card background
4456
+ * - semanticColors.status.info.light (#f2f3ff) - Active/focused card background
4450
4457
  * - semanticColors.border.card (#d1d5db) - Default border
4451
4458
  * - semanticColors.border.tabActive (#2f42ff) - Active/focused border
4459
+ * - shadows.focusWhite1 - Inner white focus ring (2px spread)
4460
+ * - shadows.focusBlue2 - Outer blue focus ring (4px spread)
4452
4461
  * - colors.grey[800] (#1F2937) - Text color
4453
4462
  * - typography.fontSize.xxs (10px) - Recipe count
4454
4463
  * - typography.fontSize.xs (12px) - Description
@@ -5690,10 +5699,10 @@ const NeoToastButton = ({ primary, variant = 'default', children, ...props }) =>
5690
5699
  NeoToast.displayName = 'NeoToast';
5691
5700
  NeoToastButton.displayName = 'NeoToastButton';
5692
5701
 
5693
- const ToggleContainer = styled('label')(({ disabled }) => ({
5702
+ const ToggleContainer = styled('label')(({ disabled, size = 'medium' }) => ({
5694
5703
  display: 'inline-flex',
5695
5704
  alignItems: 'flex-start',
5696
- gap: 12,
5705
+ gap: size === 'small' ? 8 : 12,
5697
5706
  cursor: disabled ? 'not-allowed' : 'pointer',
5698
5707
  userSelect: 'none',
5699
5708
  }));
@@ -5845,7 +5854,7 @@ const NeoToggle = ({ size = 'medium', label, helperText, disabled, ...props }) =
5845
5854
  return jsx(StyledSwitch, { size: size, disabled: disabled, ...props });
5846
5855
  }
5847
5856
  // With label, wrap in container for proper layout
5848
- return (jsxs(ToggleContainer, { disabled: disabled, children: [jsx(StyledSwitch, { size: size, disabled: disabled, ...props }), jsxs(LabelContainer, { children: [label && jsx(Label, { size: size, children: label }), helperText && jsx(HelperText, { size: size, children: helperText })] })] }));
5857
+ return (jsxs(ToggleContainer, { disabled: disabled, size: size, children: [jsx(StyledSwitch, { size: size, disabled: disabled, ...props }), jsxs(LabelContainer, { children: [label && jsx(Label, { size: size, children: label }), helperText && jsx(HelperText, { size: size, children: helperText })] })] }));
5849
5858
  };
5850
5859
  NeoToggle.displayName = 'NeoToggle';
5851
5860