@moderneinc/neo-styled-components 2.0.3-next.ba615c → 2.0.3-next.bac2ba
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/MarketplaceCard/MarketplaceCard.d.ts +4 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.esm.js +55 -32
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +55 -32
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -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) -
|
|
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
|
@@ -2561,9 +2561,12 @@ interface NeoMarketplaceCardProps extends Omit<CardProps, 'children'> {
|
|
|
2561
2561
|
* - Property 1="Default" → Base state (no props)
|
|
2562
2562
|
*
|
|
2563
2563
|
* Design Tokens Used:
|
|
2564
|
-
* - semanticColors.surfaces.card (#FFFFFF) -
|
|
2564
|
+
* - semanticColors.surfaces.card (#FFFFFF) - Default card background
|
|
2565
|
+
* - semanticColors.status.info.light (#f2f3ff) - Active/focused card background
|
|
2565
2566
|
* - semanticColors.border.card (#d1d5db) - Default border
|
|
2566
2567
|
* - semanticColors.border.tabActive (#2f42ff) - Active/focused border
|
|
2568
|
+
* - shadows.focusWhite1 - Inner white focus ring (2px spread)
|
|
2569
|
+
* - shadows.focusBlue2 - Outer blue focus ring (4px spread)
|
|
2567
2570
|
* - colors.grey[800] (#1F2937) - Text color
|
|
2568
2571
|
* - typography.fontSize.xxs (10px) - Recipe count
|
|
2569
2572
|
* - typography.fontSize.xs (12px) - Description
|
package/dist/index.esm.js
CHANGED
|
@@ -3982,11 +3982,11 @@ NeoInputField.displayName = 'NeoInputField';
|
|
|
3982
3982
|
// Size configuration for consistent styling
|
|
3983
3983
|
const sizeConfig = {
|
|
3984
3984
|
small: {
|
|
3985
|
-
height:
|
|
3986
|
-
paddingTop:
|
|
3987
|
-
paddingRight: spacing.
|
|
3988
|
-
paddingBottom:
|
|
3989
|
-
paddingLeft: spacing.
|
|
3985
|
+
height: spacing.spacing_3_1_2,
|
|
3986
|
+
paddingTop: 1,
|
|
3987
|
+
paddingRight: spacing.spacing_3_4,
|
|
3988
|
+
paddingBottom: 1,
|
|
3989
|
+
paddingLeft: spacing.spacing_3_4,
|
|
3990
3990
|
gap: spacing.spacing_1,
|
|
3991
3991
|
iconSize: typography.fontSize.h4,
|
|
3992
3992
|
fontSize: typography.fontSize.sm,
|
|
@@ -3994,10 +3994,10 @@ const sizeConfig = {
|
|
|
3994
3994
|
},
|
|
3995
3995
|
medium: {
|
|
3996
3996
|
height: spacing.spacing_5,
|
|
3997
|
-
paddingTop:
|
|
3998
|
-
paddingRight: spacing.
|
|
3999
|
-
paddingBottom:
|
|
4000
|
-
paddingLeft: spacing.
|
|
3997
|
+
paddingTop: 1,
|
|
3998
|
+
paddingRight: spacing.spacing_3_4,
|
|
3999
|
+
paddingBottom: 1,
|
|
4000
|
+
paddingLeft: spacing.spacing_3_4,
|
|
4001
4001
|
gap: spacing.spacing_1,
|
|
4002
4002
|
iconSize: typography.fontSize.h4,
|
|
4003
4003
|
fontSize: typography.fontSize.default,
|
|
@@ -4005,10 +4005,10 @@ const sizeConfig = {
|
|
|
4005
4005
|
},
|
|
4006
4006
|
large: {
|
|
4007
4007
|
height: spacing.spacing_6,
|
|
4008
|
-
paddingTop:
|
|
4009
|
-
paddingRight: spacing.
|
|
4010
|
-
paddingBottom:
|
|
4011
|
-
paddingLeft: spacing.
|
|
4008
|
+
paddingTop: 1,
|
|
4009
|
+
paddingRight: spacing.spacing_3_4,
|
|
4010
|
+
paddingBottom: 1,
|
|
4011
|
+
paddingLeft: spacing.spacing_3_4,
|
|
4012
4012
|
gap: spacing.spacing_1_1_2,
|
|
4013
4013
|
iconSize: typography.fontSize.h2,
|
|
4014
4014
|
fontSize: typography.fontSize.default,
|
|
@@ -4017,10 +4017,10 @@ const sizeConfig = {
|
|
|
4017
4017
|
},
|
|
4018
4018
|
xlarge: {
|
|
4019
4019
|
height: spacing.spacing_8,
|
|
4020
|
-
paddingTop:
|
|
4021
|
-
paddingRight: spacing.
|
|
4022
|
-
paddingBottom:
|
|
4023
|
-
paddingLeft: spacing.
|
|
4020
|
+
paddingTop: 1,
|
|
4021
|
+
paddingRight: spacing.spacing_3_4,
|
|
4022
|
+
paddingBottom: 1,
|
|
4023
|
+
paddingLeft: spacing.spacing_3_4,
|
|
4024
4024
|
gap: spacing.spacing_2,
|
|
4025
4025
|
iconSize: typography.fontSize.h2,
|
|
4026
4026
|
fontSize: typography.fontSize.default,
|
|
@@ -4029,10 +4029,10 @@ const sizeConfig = {
|
|
|
4029
4029
|
},
|
|
4030
4030
|
xxlarge: {
|
|
4031
4031
|
height: spacing.spacing_10,
|
|
4032
|
-
paddingTop:
|
|
4033
|
-
paddingRight: spacing.
|
|
4034
|
-
paddingBottom:
|
|
4035
|
-
paddingLeft: spacing.
|
|
4032
|
+
paddingTop: 1,
|
|
4033
|
+
paddingRight: spacing.spacing_3_4,
|
|
4034
|
+
paddingBottom: 1,
|
|
4035
|
+
paddingLeft: spacing.spacing_3_4,
|
|
4036
4036
|
gap: spacing.spacing_2,
|
|
4037
4037
|
iconSize: spacing.spacing_5,
|
|
4038
4038
|
fontSize: typography.fontSize.h5,
|
|
@@ -4077,10 +4077,17 @@ const StyledListItemButton$1 = styled(ListItemButton, {
|
|
|
4077
4077
|
}),
|
|
4078
4078
|
},
|
|
4079
4079
|
// Primary text styling
|
|
4080
|
+
// Font weight varies by size per Figma:
|
|
4081
|
+
// - Default: small/medium use 400, large/xlarge/xxlarge use 500
|
|
4082
|
+
// - Link: xxlarge uses 600, others use their default weight
|
|
4080
4083
|
'& .list-item-primary': {
|
|
4081
4084
|
fontSize: theme.typography.pxToRem(config.fontSize),
|
|
4082
4085
|
lineHeight: config.lineHeight,
|
|
4083
|
-
fontWeight:
|
|
4086
|
+
fontWeight: isLink && size === 'xxlarge'
|
|
4087
|
+
? typography.fontWeight.semiBold
|
|
4088
|
+
: size === 'small' || size === 'medium'
|
|
4089
|
+
? typography.fontWeight.regular
|
|
4090
|
+
: typography.fontWeight.medium,
|
|
4084
4091
|
color: isLink
|
|
4085
4092
|
? semanticColors.typography.link.primary
|
|
4086
4093
|
: semanticColors.typography.navigation.default,
|
|
@@ -4112,6 +4119,9 @@ const StyledListItemButton$1 = styled(ListItemButton, {
|
|
|
4112
4119
|
backgroundColor: semanticColors.input.background,
|
|
4113
4120
|
},
|
|
4114
4121
|
// Selected/Active state
|
|
4122
|
+
// Font weights per Figma:
|
|
4123
|
+
// - Primary: small/medium/xxlarge use 500, large/xlarge use 600
|
|
4124
|
+
// - Secondary: large/xlarge use 500, xxlarge uses 400
|
|
4115
4125
|
[`&.${listItemButtonClasses.selected}`]: {
|
|
4116
4126
|
backgroundColor: semanticColors.buttons.secondary.hoverBackground,
|
|
4117
4127
|
'&:hover': {
|
|
@@ -4121,11 +4131,15 @@ const StyledListItemButton$1 = styled(ListItemButton, {
|
|
|
4121
4131
|
color: semanticColors.icons.pressed,
|
|
4122
4132
|
},
|
|
4123
4133
|
'& .list-item-primary': {
|
|
4124
|
-
fontWeight:
|
|
4134
|
+
fontWeight: size === 'large' || size === 'xlarge'
|
|
4135
|
+
? typography.fontWeight.semiBold
|
|
4136
|
+
: typography.fontWeight.medium,
|
|
4125
4137
|
color: semanticColors.typography.navigation.default,
|
|
4126
4138
|
},
|
|
4127
4139
|
'& .list-item-secondary': {
|
|
4128
|
-
fontWeight:
|
|
4140
|
+
fontWeight: size === 'large' || size === 'xlarge'
|
|
4141
|
+
? typography.fontWeight.medium
|
|
4142
|
+
: typography.fontWeight.regular,
|
|
4129
4143
|
},
|
|
4130
4144
|
},
|
|
4131
4145
|
// Disabled state
|
|
@@ -4313,6 +4327,11 @@ const NeoListItemButton = ({ children, selected = false, disabled = false, ...pr
|
|
|
4313
4327
|
};
|
|
4314
4328
|
NeoListItemButton.displayName = 'NeoListItemButton';
|
|
4315
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}`;
|
|
4316
4335
|
/**
|
|
4317
4336
|
* Styled Card component with Neo design tokens
|
|
4318
4337
|
*/
|
|
@@ -4325,19 +4344,20 @@ const StyledCard = styled(MuiCard, {
|
|
|
4325
4344
|
display: 'flex',
|
|
4326
4345
|
flexDirection: 'column',
|
|
4327
4346
|
gap: theme.spacing(2), // 16px
|
|
4328
|
-
backgroundColor: semanticColors.surfaces.card,
|
|
4347
|
+
backgroundColor: selected ? semanticColors.status.info.light : semanticColors.surfaces.card,
|
|
4329
4348
|
border: `1px solid ${selected ? semanticColors.border.tabActive : semanticColors.border.card}`,
|
|
4330
4349
|
borderRadius: theme.typography.pxToRem(4),
|
|
4331
4350
|
boxShadow: 'none',
|
|
4332
|
-
transition: theme.transitions.create(['border-color']),
|
|
4351
|
+
transition: theme.transitions.create(['border-color', 'background-color', 'box-shadow']),
|
|
4333
4352
|
cursor: 'pointer',
|
|
4334
4353
|
'&:hover': {
|
|
4335
4354
|
borderColor: selected ? semanticColors.border.tabActive : semanticColors.border.card,
|
|
4336
4355
|
},
|
|
4337
4356
|
'&:focus-visible': {
|
|
4338
|
-
|
|
4339
|
-
outlineOffset: '2px',
|
|
4357
|
+
backgroundColor: semanticColors.status.info.light,
|
|
4340
4358
|
borderColor: semanticColors.border.tabActive,
|
|
4359
|
+
boxShadow: focusRingShadow,
|
|
4360
|
+
outline: 'none',
|
|
4341
4361
|
},
|
|
4342
4362
|
...(disabled && {
|
|
4343
4363
|
opacity: 0.5,
|
|
@@ -4432,9 +4452,12 @@ const Description = styled('p')(({ theme }) => ({
|
|
|
4432
4452
|
* - Property 1="Default" → Base state (no props)
|
|
4433
4453
|
*
|
|
4434
4454
|
* Design Tokens Used:
|
|
4435
|
-
* - semanticColors.surfaces.card (#FFFFFF) -
|
|
4455
|
+
* - semanticColors.surfaces.card (#FFFFFF) - Default card background
|
|
4456
|
+
* - semanticColors.status.info.light (#f2f3ff) - Active/focused card background
|
|
4436
4457
|
* - semanticColors.border.card (#d1d5db) - Default border
|
|
4437
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)
|
|
4438
4461
|
* - colors.grey[800] (#1F2937) - Text color
|
|
4439
4462
|
* - typography.fontSize.xxs (10px) - Recipe count
|
|
4440
4463
|
* - typography.fontSize.xs (12px) - Description
|
|
@@ -5676,10 +5699,10 @@ const NeoToastButton = ({ primary, variant = 'default', children, ...props }) =>
|
|
|
5676
5699
|
NeoToast.displayName = 'NeoToast';
|
|
5677
5700
|
NeoToastButton.displayName = 'NeoToastButton';
|
|
5678
5701
|
|
|
5679
|
-
const ToggleContainer = styled('label')(({ disabled }) => ({
|
|
5702
|
+
const ToggleContainer = styled('label')(({ disabled, size = 'medium' }) => ({
|
|
5680
5703
|
display: 'inline-flex',
|
|
5681
5704
|
alignItems: 'flex-start',
|
|
5682
|
-
gap: 12,
|
|
5705
|
+
gap: size === 'small' ? 8 : 12,
|
|
5683
5706
|
cursor: disabled ? 'not-allowed' : 'pointer',
|
|
5684
5707
|
userSelect: 'none',
|
|
5685
5708
|
}));
|
|
@@ -5831,7 +5854,7 @@ const NeoToggle = ({ size = 'medium', label, helperText, disabled, ...props }) =
|
|
|
5831
5854
|
return jsx(StyledSwitch, { size: size, disabled: disabled, ...props });
|
|
5832
5855
|
}
|
|
5833
5856
|
// With label, wrap in container for proper layout
|
|
5834
|
-
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 })] })] }));
|
|
5835
5858
|
};
|
|
5836
5859
|
NeoToggle.displayName = 'NeoToggle';
|
|
5837
5860
|
|