@moderneinc/neo-styled-components 2.0.3-next.db03d1 → 2.1.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/dist/Button/Button.d.ts +4 -0
- package/dist/ListItem/ListItem.d.ts +8 -1
- package/dist/MarketplaceCard/MarketplaceCard.d.ts +4 -1
- package/dist/index.d.ts +16 -2
- package/dist/index.esm.js +102 -47
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +102 -47
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/Button/Button.d.ts
CHANGED
|
@@ -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
|
|
@@ -47,6 +47,12 @@ export interface NeoListItemProps extends Omit<ListItemButtonProps, 'children' |
|
|
|
47
47
|
* @figma state="link"
|
|
48
48
|
*/
|
|
49
49
|
isLink?: boolean;
|
|
50
|
+
/**
|
|
51
|
+
* Trailing element (optional, e.g., chevron icon for navigation)
|
|
52
|
+
* Renders at the end of the list item, typically used for navigation indicators.
|
|
53
|
+
* @figma Chevron icon for link variant
|
|
54
|
+
*/
|
|
55
|
+
trailingElement?: ReactNode;
|
|
50
56
|
}
|
|
51
57
|
/**
|
|
52
58
|
* NeoListItem - Flexible list item component with multiple size variants and states
|
|
@@ -62,6 +68,7 @@ export interface NeoListItemProps extends Omit<ListItemButtonProps, 'children' |
|
|
|
62
68
|
* - state (default|active|disabled|link) → selected, disabled, isLink props
|
|
63
69
|
* - showIcon → icon prop (pass ReactNode)
|
|
64
70
|
* - showSupportingText → secondaryText prop (pass ReactNode)
|
|
71
|
+
* - showChevron → trailingElement prop (pass ReactNode, e.g., ChevronRight icon)
|
|
65
72
|
* - Placeholder → primaryText prop
|
|
66
73
|
* - Recipe name → secondaryText prop
|
|
67
74
|
* - (# recipes) → badge prop
|
|
@@ -79,6 +86,6 @@ export interface NeoListItemProps extends Omit<ListItemButtonProps, 'children' |
|
|
|
79
86
|
* - semanticColors.buttons.tertiary.disabled (disabled text color)
|
|
80
87
|
*/
|
|
81
88
|
export declare const NeoListItem: {
|
|
82
|
-
({ size, primaryText, secondaryText, badge, icon, isLink, component, ...props }: NeoListItemProps): import("react/jsx-runtime").JSX.Element;
|
|
89
|
+
({ size, primaryText, secondaryText, badge, icon, isLink, trailingElement, component, ...props }: NeoListItemProps): import("react/jsx-runtime").JSX.Element;
|
|
83
90
|
displayName: string;
|
|
84
91
|
};
|
|
@@ -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
|
@@ -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
|
|
@@ -2319,6 +2323,12 @@ interface NeoListItemProps extends Omit<ListItemButtonProps, 'children' | 'size'
|
|
|
2319
2323
|
* @figma state="link"
|
|
2320
2324
|
*/
|
|
2321
2325
|
isLink?: boolean;
|
|
2326
|
+
/**
|
|
2327
|
+
* Trailing element (optional, e.g., chevron icon for navigation)
|
|
2328
|
+
* Renders at the end of the list item, typically used for navigation indicators.
|
|
2329
|
+
* @figma Chevron icon for link variant
|
|
2330
|
+
*/
|
|
2331
|
+
trailingElement?: ReactNode;
|
|
2322
2332
|
}
|
|
2323
2333
|
/**
|
|
2324
2334
|
* NeoListItem - Flexible list item component with multiple size variants and states
|
|
@@ -2334,6 +2344,7 @@ interface NeoListItemProps extends Omit<ListItemButtonProps, 'children' | 'size'
|
|
|
2334
2344
|
* - state (default|active|disabled|link) → selected, disabled, isLink props
|
|
2335
2345
|
* - showIcon → icon prop (pass ReactNode)
|
|
2336
2346
|
* - showSupportingText → secondaryText prop (pass ReactNode)
|
|
2347
|
+
* - showChevron → trailingElement prop (pass ReactNode, e.g., ChevronRight icon)
|
|
2337
2348
|
* - Placeholder → primaryText prop
|
|
2338
2349
|
* - Recipe name → secondaryText prop
|
|
2339
2350
|
* - (# recipes) → badge prop
|
|
@@ -2351,7 +2362,7 @@ interface NeoListItemProps extends Omit<ListItemButtonProps, 'children' | 'size'
|
|
|
2351
2362
|
* - semanticColors.buttons.tertiary.disabled (disabled text color)
|
|
2352
2363
|
*/
|
|
2353
2364
|
declare const NeoListItem: {
|
|
2354
|
-
({ size, primaryText, secondaryText, badge, icon, isLink, component, ...props }: NeoListItemProps): react_jsx_runtime.JSX.Element;
|
|
2365
|
+
({ size, primaryText, secondaryText, badge, icon, isLink, trailingElement, component, ...props }: NeoListItemProps): react_jsx_runtime.JSX.Element;
|
|
2355
2366
|
displayName: string;
|
|
2356
2367
|
};
|
|
2357
2368
|
|
|
@@ -2561,9 +2572,12 @@ interface NeoMarketplaceCardProps extends Omit<CardProps, 'children'> {
|
|
|
2561
2572
|
* - Property 1="Default" → Base state (no props)
|
|
2562
2573
|
*
|
|
2563
2574
|
* Design Tokens Used:
|
|
2564
|
-
* - semanticColors.surfaces.card (#FFFFFF) -
|
|
2575
|
+
* - semanticColors.surfaces.card (#FFFFFF) - Default card background
|
|
2576
|
+
* - semanticColors.status.info.light (#f2f3ff) - Active/focused card background
|
|
2565
2577
|
* - semanticColors.border.card (#d1d5db) - Default border
|
|
2566
2578
|
* - semanticColors.border.tabActive (#2f42ff) - Active/focused border
|
|
2579
|
+
* - shadows.focusWhite1 - Inner white focus ring (2px spread)
|
|
2580
|
+
* - shadows.focusBlue2 - Outer blue focus ring (4px spread)
|
|
2567
2581
|
* - colors.grey[800] (#1F2937) - Text color
|
|
2568
2582
|
* - typography.fontSize.xxs (10px) - Recipe count
|
|
2569
2583
|
* - 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,
|
|
@@ -4048,7 +4048,8 @@ const StyledListItemButton$1 = styled(ListItemButton, {
|
|
|
4048
4048
|
prop !== 'badge' &&
|
|
4049
4049
|
prop !== 'icon' &&
|
|
4050
4050
|
prop !== 'isLink' &&
|
|
4051
|
-
prop !== 'hasSecondaryText'
|
|
4051
|
+
prop !== 'hasSecondaryText' &&
|
|
4052
|
+
prop !== 'trailingElement',
|
|
4052
4053
|
})(({ theme, size = 'medium', isLink, hasSecondaryText }) => {
|
|
4053
4054
|
const config = sizeConfig[size];
|
|
4054
4055
|
return {
|
|
@@ -4077,17 +4078,32 @@ const StyledListItemButton$1 = styled(ListItemButton, {
|
|
|
4077
4078
|
}),
|
|
4078
4079
|
},
|
|
4079
4080
|
// Primary text styling
|
|
4081
|
+
// Font weight varies by size per Figma:
|
|
4082
|
+
// - Default: small/medium use 400, large/xlarge/xxlarge use 500
|
|
4083
|
+
// - Link: xxlarge uses 600, others use their default weight
|
|
4080
4084
|
'& .list-item-primary': {
|
|
4081
4085
|
fontSize: theme.typography.pxToRem(config.fontSize),
|
|
4082
4086
|
lineHeight: config.lineHeight,
|
|
4083
|
-
fontWeight:
|
|
4087
|
+
fontWeight: isLink && size === 'xxlarge'
|
|
4088
|
+
? typography.fontWeight.semiBold
|
|
4089
|
+
: size === 'small' || size === 'medium'
|
|
4090
|
+
? typography.fontWeight.regular
|
|
4091
|
+
: typography.fontWeight.medium,
|
|
4084
4092
|
color: isLink
|
|
4085
4093
|
? semanticColors.typography.link.primary
|
|
4086
4094
|
: semanticColors.typography.navigation.default,
|
|
4087
4095
|
overflow: 'hidden',
|
|
4088
4096
|
textOverflow: 'ellipsis',
|
|
4089
4097
|
whiteSpace: 'nowrap',
|
|
4098
|
+
...(isLink && size === 'xxlarge' && { textDecoration: 'none' }),
|
|
4090
4099
|
},
|
|
4100
|
+
// Link hover styling (underline on hover for xxlarge)
|
|
4101
|
+
...(isLink &&
|
|
4102
|
+
size === 'xxlarge' && {
|
|
4103
|
+
'&:hover .list-item-primary': {
|
|
4104
|
+
textDecoration: 'underline',
|
|
4105
|
+
},
|
|
4106
|
+
}),
|
|
4091
4107
|
// Badge styling (for xxlarge link variant)
|
|
4092
4108
|
'& .list-item-badge': {
|
|
4093
4109
|
fontSize: theme.typography.pxToRem(size === 'xxlarge' ? config.badgeFontSize || 12 : 12),
|
|
@@ -4107,11 +4123,22 @@ const StyledListItemButton$1 = styled(ListItemButton, {
|
|
|
4107
4123
|
marginBottom: -2,
|
|
4108
4124
|
}),
|
|
4109
4125
|
},
|
|
4126
|
+
// Trailing element styling (e.g., chevron icon)
|
|
4127
|
+
'& .list-item-trailing': {
|
|
4128
|
+
display: 'flex',
|
|
4129
|
+
alignItems: 'center',
|
|
4130
|
+
flexShrink: 0,
|
|
4131
|
+
marginLeft: spacing.spacing_1,
|
|
4132
|
+
color: semanticColors.icons.default,
|
|
4133
|
+
},
|
|
4110
4134
|
// Hover state
|
|
4111
4135
|
'&:hover': {
|
|
4112
4136
|
backgroundColor: semanticColors.input.background,
|
|
4113
4137
|
},
|
|
4114
4138
|
// Selected/Active state
|
|
4139
|
+
// Font weights per Figma:
|
|
4140
|
+
// - Primary: small/medium/xxlarge use 500, large/xlarge use 600
|
|
4141
|
+
// - Secondary: large/xlarge use 500, xxlarge uses 400
|
|
4115
4142
|
[`&.${listItemButtonClasses.selected}`]: {
|
|
4116
4143
|
backgroundColor: semanticColors.buttons.secondary.hoverBackground,
|
|
4117
4144
|
'&:hover': {
|
|
@@ -4121,11 +4148,15 @@ const StyledListItemButton$1 = styled(ListItemButton, {
|
|
|
4121
4148
|
color: semanticColors.icons.pressed,
|
|
4122
4149
|
},
|
|
4123
4150
|
'& .list-item-primary': {
|
|
4124
|
-
fontWeight:
|
|
4151
|
+
fontWeight: size === 'large' || size === 'xlarge'
|
|
4152
|
+
? typography.fontWeight.semiBold
|
|
4153
|
+
: typography.fontWeight.medium,
|
|
4125
4154
|
color: semanticColors.typography.navigation.default,
|
|
4126
4155
|
},
|
|
4127
4156
|
'& .list-item-secondary': {
|
|
4128
|
-
fontWeight:
|
|
4157
|
+
fontWeight: size === 'large' || size === 'xlarge'
|
|
4158
|
+
? typography.fontWeight.medium
|
|
4159
|
+
: typography.fontWeight.regular,
|
|
4129
4160
|
},
|
|
4130
4161
|
},
|
|
4131
4162
|
// Disabled state
|
|
@@ -4144,17 +4175,10 @@ const StyledListItemButton$1 = styled(ListItemButton, {
|
|
|
4144
4175
|
'& .list-item-badge': {
|
|
4145
4176
|
color: semanticColors.buttons.tertiary.disabled,
|
|
4146
4177
|
},
|
|
4147
|
-
|
|
4148
|
-
|
|
4149
|
-
...(isLink &&
|
|
4150
|
-
size === 'xxlarge' && {
|
|
4151
|
-
'& .list-item-primary': {
|
|
4152
|
-
textDecoration: 'none',
|
|
4153
|
-
},
|
|
4154
|
-
'&:hover .list-item-primary': {
|
|
4155
|
-
textDecoration: 'underline',
|
|
4178
|
+
'& .list-item-trailing': {
|
|
4179
|
+
color: semanticColors.icons.disabled,
|
|
4156
4180
|
},
|
|
4157
|
-
}
|
|
4181
|
+
},
|
|
4158
4182
|
};
|
|
4159
4183
|
});
|
|
4160
4184
|
/**
|
|
@@ -4171,6 +4195,7 @@ const StyledListItemButton$1 = styled(ListItemButton, {
|
|
|
4171
4195
|
* - state (default|active|disabled|link) → selected, disabled, isLink props
|
|
4172
4196
|
* - showIcon → icon prop (pass ReactNode)
|
|
4173
4197
|
* - showSupportingText → secondaryText prop (pass ReactNode)
|
|
4198
|
+
* - showChevron → trailingElement prop (pass ReactNode, e.g., ChevronRight icon)
|
|
4174
4199
|
* - Placeholder → primaryText prop
|
|
4175
4200
|
* - Recipe name → secondaryText prop
|
|
4176
4201
|
* - (# recipes) → badge prop
|
|
@@ -4187,7 +4212,7 @@ const StyledListItemButton$1 = styled(ListItemButton, {
|
|
|
4187
4212
|
* - semanticColors.surface.input.disabled-background (disabled background)
|
|
4188
4213
|
* - semanticColors.buttons.tertiary.disabled (disabled text color)
|
|
4189
4214
|
*/
|
|
4190
|
-
const NeoListItem = ({ size = 'medium', primaryText, secondaryText, badge, icon, isLink = false, component, ...props }) => {
|
|
4215
|
+
const NeoListItem = ({ size = 'medium', primaryText, secondaryText, badge, icon, isLink = false, trailingElement, component, ...props }) => {
|
|
4191
4216
|
// Determine if secondary text should be shown based on size
|
|
4192
4217
|
const showSecondaryText = secondaryText && (size === 'large' || size === 'xlarge' || size === 'xxlarge');
|
|
4193
4218
|
// Determine if badge should be shown (only for xxlarge)
|
|
@@ -4197,7 +4222,7 @@ const NeoListItem = ({ size = 'medium', primaryText, secondaryText, badge, icon,
|
|
|
4197
4222
|
return (jsxs(StyledListItemButton$1, { size: size, isLink: isLink, hasSecondaryText: !!showSecondaryText, ...(component && { component }), ...props, children: [icon && jsx(ListItemIcon, { children: icon }), jsx(ListItemText, { primary: primaryContent, secondary: showSecondaryText ? secondaryText : undefined, sx: { minWidth: 0, flex: 1 }, slotProps: {
|
|
4198
4223
|
primary: { className: 'list-item-primary' },
|
|
4199
4224
|
secondary: { className: 'list-item-secondary' },
|
|
4200
|
-
} })] }));
|
|
4225
|
+
} }), trailingElement && jsx(Box, { className: "list-item-trailing", children: trailingElement })] }));
|
|
4201
4226
|
};
|
|
4202
4227
|
NeoListItem.displayName = 'NeoListItem';
|
|
4203
4228
|
|
|
@@ -4313,6 +4338,15 @@ const NeoListItemButton = ({ children, selected = false, disabled = false, ...pr
|
|
|
4313
4338
|
};
|
|
4314
4339
|
NeoListItemButton.displayName = 'NeoListItemButton';
|
|
4315
4340
|
|
|
4341
|
+
/**
|
|
4342
|
+
* Focus ring box-shadow using Neo design tokens
|
|
4343
|
+
* Combines focusWhite1 (inner white ring) and focusBlue2 (outer blue ring)
|
|
4344
|
+
*/
|
|
4345
|
+
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}`;
|
|
4346
|
+
/**
|
|
4347
|
+
* Card box-shadow using Neo design tokens for hover and selected states
|
|
4348
|
+
*/
|
|
4349
|
+
const activeShadow = `${shadows.card.x}px ${shadows.card.y}px ${shadows.card.blur}px ${shadows.card.spread}px ${shadows.card.shadow}`;
|
|
4316
4350
|
/**
|
|
4317
4351
|
* Styled Card component with Neo design tokens
|
|
4318
4352
|
*/
|
|
@@ -4328,16 +4362,17 @@ const StyledCard = styled(MuiCard, {
|
|
|
4328
4362
|
backgroundColor: semanticColors.surfaces.card,
|
|
4329
4363
|
border: `1px solid ${selected ? semanticColors.border.tabActive : semanticColors.border.card}`,
|
|
4330
4364
|
borderRadius: theme.typography.pxToRem(4),
|
|
4331
|
-
boxShadow: 'none',
|
|
4332
|
-
transition: theme.transitions.create(['border-color']),
|
|
4365
|
+
boxShadow: selected ? activeShadow : 'none',
|
|
4366
|
+
transition: theme.transitions.create(['border-color', 'background-color', 'box-shadow']),
|
|
4333
4367
|
cursor: 'pointer',
|
|
4334
4368
|
'&:hover': {
|
|
4335
|
-
borderColor:
|
|
4369
|
+
borderColor: semanticColors.border.tabActive,
|
|
4370
|
+
boxShadow: activeShadow,
|
|
4336
4371
|
},
|
|
4337
4372
|
'&:focus-visible': {
|
|
4338
|
-
outline: `2px solid ${semanticColors.border.tabActive}`,
|
|
4339
|
-
outlineOffset: '2px',
|
|
4340
4373
|
borderColor: semanticColors.border.tabActive,
|
|
4374
|
+
boxShadow: focusRingShadow,
|
|
4375
|
+
outline: 'none',
|
|
4341
4376
|
},
|
|
4342
4377
|
...(disabled && {
|
|
4343
4378
|
opacity: 0.5,
|
|
@@ -4403,6 +4438,11 @@ const Description = styled('p')(({ theme }) => ({
|
|
|
4403
4438
|
lineHeight: 1.5,
|
|
4404
4439
|
color: colors.grey[800],
|
|
4405
4440
|
width: '100%',
|
|
4441
|
+
display: '-webkit-box',
|
|
4442
|
+
WebkitLineClamp: 2,
|
|
4443
|
+
WebkitBoxOrient: 'vertical',
|
|
4444
|
+
overflow: 'hidden',
|
|
4445
|
+
textOverflow: 'ellipsis',
|
|
4406
4446
|
}));
|
|
4407
4447
|
/**
|
|
4408
4448
|
* NeoMarketplaceCard - Selectable card component for marketplace items
|
|
@@ -4432,9 +4472,12 @@ const Description = styled('p')(({ theme }) => ({
|
|
|
4432
4472
|
* - Property 1="Default" → Base state (no props)
|
|
4433
4473
|
*
|
|
4434
4474
|
* Design Tokens Used:
|
|
4435
|
-
* - semanticColors.surfaces.card (#FFFFFF) -
|
|
4475
|
+
* - semanticColors.surfaces.card (#FFFFFF) - Default card background
|
|
4476
|
+
* - semanticColors.status.info.light (#f2f3ff) - Active/focused card background
|
|
4436
4477
|
* - semanticColors.border.card (#d1d5db) - Default border
|
|
4437
4478
|
* - semanticColors.border.tabActive (#2f42ff) - Active/focused border
|
|
4479
|
+
* - shadows.focusWhite1 - Inner white focus ring (2px spread)
|
|
4480
|
+
* - shadows.focusBlue2 - Outer blue focus ring (4px spread)
|
|
4438
4481
|
* - colors.grey[800] (#1F2937) - Text color
|
|
4439
4482
|
* - typography.fontSize.xxs (10px) - Recipe count
|
|
4440
4483
|
* - typography.fontSize.xs (12px) - Description
|
|
@@ -4826,7 +4869,19 @@ function NeoPageContent({ pageTitle, subtitle, breadcrumbs, action, sticky = fal
|
|
|
4826
4869
|
pb: `${spacing.spacing_2_1_2}px`,
|
|
4827
4870
|
height: '100%',
|
|
4828
4871
|
overflow: 'auto',
|
|
4829
|
-
}, children: [sticky ? (jsx(StickyHeader, { ref: headerRef, sx: {
|
|
4872
|
+
}, children: [sticky ? (jsx(StickyHeader, { ref: headerRef, sx: {
|
|
4873
|
+
pt: `${spacing.spacing_2}px`,
|
|
4874
|
+
...(contentMaxWidth !== false && {
|
|
4875
|
+
maxWidth: theme => theme.breakpoints.values[contentMaxWidth],
|
|
4876
|
+
width: '100%',
|
|
4877
|
+
}),
|
|
4878
|
+
}, children: headerContent })) : (jsx(Box, { ref: headerRef, sx: {
|
|
4879
|
+
mb: `${spacing.spacing_1}px`,
|
|
4880
|
+
...(contentMaxWidth !== false && {
|
|
4881
|
+
maxWidth: theme => theme.breakpoints.values[contentMaxWidth],
|
|
4882
|
+
width: '100%',
|
|
4883
|
+
}),
|
|
4884
|
+
}, children: headerContent })), jsx(Box, { sx: {
|
|
4830
4885
|
flexGrow: 1,
|
|
4831
4886
|
minHeight: 0,
|
|
4832
4887
|
display: 'flex',
|
|
@@ -5664,10 +5719,10 @@ const NeoToastButton = ({ primary, variant = 'default', children, ...props }) =>
|
|
|
5664
5719
|
NeoToast.displayName = 'NeoToast';
|
|
5665
5720
|
NeoToastButton.displayName = 'NeoToastButton';
|
|
5666
5721
|
|
|
5667
|
-
const ToggleContainer = styled('label')(({ disabled }) => ({
|
|
5722
|
+
const ToggleContainer = styled('label')(({ disabled, size = 'medium' }) => ({
|
|
5668
5723
|
display: 'inline-flex',
|
|
5669
5724
|
alignItems: 'flex-start',
|
|
5670
|
-
gap: 12,
|
|
5725
|
+
gap: size === 'small' ? 8 : 12,
|
|
5671
5726
|
cursor: disabled ? 'not-allowed' : 'pointer',
|
|
5672
5727
|
userSelect: 'none',
|
|
5673
5728
|
}));
|
|
@@ -5819,7 +5874,7 @@ const NeoToggle = ({ size = 'medium', label, helperText, disabled, ...props }) =
|
|
|
5819
5874
|
return jsx(StyledSwitch, { size: size, disabled: disabled, ...props });
|
|
5820
5875
|
}
|
|
5821
5876
|
// With label, wrap in container for proper layout
|
|
5822
|
-
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 })] })] }));
|
|
5877
|
+
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 })] })] }));
|
|
5823
5878
|
};
|
|
5824
5879
|
NeoToggle.displayName = 'NeoToggle';
|
|
5825
5880
|
|