@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.
package/dist/index.js CHANGED
@@ -4329,6 +4329,11 @@ const NeoListItemButton = ({ children, selected = false, disabled = false, ...pr
4329
4329
  };
4330
4330
  NeoListItemButton.displayName = 'NeoListItemButton';
4331
4331
 
4332
+ /**
4333
+ * Focus ring box-shadow using Neo design tokens
4334
+ * Combines focusWhite1 (inner white ring) and focusBlue2 (outer blue ring)
4335
+ */
4336
+ const focusRingShadow = `${neoDesign.shadows.focusWhite1.x}px ${neoDesign.shadows.focusWhite1.y}px ${neoDesign.shadows.focusWhite1.blur}px ${neoDesign.shadows.focusWhite1.spread}px ${neoDesign.shadows.focusWhite1.shadow}, ${neoDesign.shadows.focusBlue2.x}px ${neoDesign.shadows.focusBlue2.y}px ${neoDesign.shadows.focusBlue2.blur}px ${neoDesign.shadows.focusBlue2.spread}px ${neoDesign.shadows.focusBlue2.shadow}`;
4332
4337
  /**
4333
4338
  * Styled Card component with Neo design tokens
4334
4339
  */
@@ -4341,19 +4346,20 @@ const StyledCard = styles.styled(MuiCard, {
4341
4346
  display: 'flex',
4342
4347
  flexDirection: 'column',
4343
4348
  gap: theme.spacing(2), // 16px
4344
- backgroundColor: neoDesign.semanticColors.surfaces.card,
4349
+ backgroundColor: selected ? neoDesign.semanticColors.status.info.light : neoDesign.semanticColors.surfaces.card,
4345
4350
  border: `1px solid ${selected ? neoDesign.semanticColors.border.tabActive : neoDesign.semanticColors.border.card}`,
4346
4351
  borderRadius: theme.typography.pxToRem(4),
4347
4352
  boxShadow: 'none',
4348
- transition: theme.transitions.create(['border-color']),
4353
+ transition: theme.transitions.create(['border-color', 'background-color', 'box-shadow']),
4349
4354
  cursor: 'pointer',
4350
4355
  '&:hover': {
4351
4356
  borderColor: selected ? neoDesign.semanticColors.border.tabActive : neoDesign.semanticColors.border.card,
4352
4357
  },
4353
4358
  '&:focus-visible': {
4354
- outline: `2px solid ${neoDesign.semanticColors.border.tabActive}`,
4355
- outlineOffset: '2px',
4359
+ backgroundColor: neoDesign.semanticColors.status.info.light,
4356
4360
  borderColor: neoDesign.semanticColors.border.tabActive,
4361
+ boxShadow: focusRingShadow,
4362
+ outline: 'none',
4357
4363
  },
4358
4364
  ...(disabled && {
4359
4365
  opacity: 0.5,
@@ -4448,9 +4454,12 @@ const Description = styles.styled('p')(({ theme }) => ({
4448
4454
  * - Property 1="Default" → Base state (no props)
4449
4455
  *
4450
4456
  * Design Tokens Used:
4451
- * - semanticColors.surfaces.card (#FFFFFF) - Card background
4457
+ * - semanticColors.surfaces.card (#FFFFFF) - Default card background
4458
+ * - semanticColors.status.info.light (#f2f3ff) - Active/focused card background
4452
4459
  * - semanticColors.border.card (#d1d5db) - Default border
4453
4460
  * - semanticColors.border.tabActive (#2f42ff) - Active/focused border
4461
+ * - shadows.focusWhite1 - Inner white focus ring (2px spread)
4462
+ * - shadows.focusBlue2 - Outer blue focus ring (4px spread)
4454
4463
  * - colors.grey[800] (#1F2937) - Text color
4455
4464
  * - typography.fontSize.xxs (10px) - Recipe count
4456
4465
  * - typography.fontSize.xs (12px) - Description
@@ -5692,10 +5701,10 @@ const NeoToastButton = ({ primary, variant = 'default', children, ...props }) =>
5692
5701
  NeoToast.displayName = 'NeoToast';
5693
5702
  NeoToastButton.displayName = 'NeoToastButton';
5694
5703
 
5695
- const ToggleContainer = styles.styled('label')(({ disabled }) => ({
5704
+ const ToggleContainer = styles.styled('label')(({ disabled, size = 'medium' }) => ({
5696
5705
  display: 'inline-flex',
5697
5706
  alignItems: 'flex-start',
5698
- gap: 12,
5707
+ gap: size === 'small' ? 8 : 12,
5699
5708
  cursor: disabled ? 'not-allowed' : 'pointer',
5700
5709
  userSelect: 'none',
5701
5710
  }));
@@ -5847,7 +5856,7 @@ const NeoToggle = ({ size = 'medium', label, helperText, disabled, ...props }) =
5847
5856
  return jsxRuntime.jsx(StyledSwitch, { size: size, disabled: disabled, ...props });
5848
5857
  }
5849
5858
  // With label, wrap in container for proper layout
5850
- return (jsxRuntime.jsxs(ToggleContainer, { disabled: disabled, children: [jsxRuntime.jsx(StyledSwitch, { size: size, disabled: disabled, ...props }), jsxRuntime.jsxs(LabelContainer, { children: [label && jsxRuntime.jsx(Label, { size: size, children: label }), helperText && jsxRuntime.jsx(HelperText, { size: size, children: helperText })] })] }));
5859
+ return (jsxRuntime.jsxs(ToggleContainer, { disabled: disabled, size: size, children: [jsxRuntime.jsx(StyledSwitch, { size: size, disabled: disabled, ...props }), jsxRuntime.jsxs(LabelContainer, { children: [label && jsxRuntime.jsx(Label, { size: size, children: label }), helperText && jsxRuntime.jsx(HelperText, { size: size, children: helperText })] })] }));
5851
5860
  };
5852
5861
  NeoToggle.displayName = 'NeoToggle';
5853
5862