@moderneinc/neo-styled-components 2.0.3-next.293c8b → 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
@@ -3984,11 +3984,11 @@ NeoInputField.displayName = 'NeoInputField';
3984
3984
  // Size configuration for consistent styling
3985
3985
  const sizeConfig = {
3986
3986
  small: {
3987
- height: 36,
3988
- paddingTop: neoDesign.spacing.spacing_1,
3989
- paddingRight: neoDesign.spacing.spacing_1_1_4,
3990
- paddingBottom: neoDesign.spacing.spacing_1,
3991
- paddingLeft: neoDesign.spacing.spacing_1_1_4,
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: neoDesign.spacing.spacing_1,
4000
- paddingRight: neoDesign.spacing.spacing_1_1_4,
4001
- paddingBottom: neoDesign.spacing.spacing_1,
4002
- paddingLeft: neoDesign.spacing.spacing_1,
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: neoDesign.spacing.spacing_1,
4011
- paddingRight: neoDesign.spacing.spacing_1_1_4,
4012
- paddingBottom: neoDesign.spacing.spacing_1,
4013
- paddingLeft: neoDesign.spacing.spacing_1_1_4,
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: neoDesign.spacing.spacing_1,
4023
- paddingRight: neoDesign.spacing.spacing_1_1_4,
4024
- paddingBottom: neoDesign.spacing.spacing_1,
4025
- paddingLeft: neoDesign.spacing.spacing_1_1_4,
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: neoDesign.spacing.spacing_1,
4035
- paddingRight: neoDesign.spacing.spacing_1_1_2,
4036
- paddingBottom: neoDesign.spacing.spacing_1,
4037
- paddingLeft: neoDesign.spacing.spacing_1_1_2,
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,
@@ -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