Skip to content

Commit cf438ed

Browse files
fix(mosaic): use the neutral color for menus, close buttons and the You badge (#10494)
Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
1 parent 289710f commit cf438ed

16 files changed

Lines changed: 32 additions & 6 deletions

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@clerk/mosaic': patch
3+
---
4+
5+
Ellipsis menus, the dialog and card close buttons, the Cancel buttons in the confirmation, delete and rename dialogs, and the reverification Back button and resend and help links use the neutral color instead of the brand color, and the "You" badge in the members table is neutral. Field labels use the neutral text color, and disabled inputs and tag inputs are tinted with the neutral color. Email and phone values in the user profile use the primary text color. An interactive row's icon darkens fully on hover, and an outlined interactive row firms up its border on hover.

‎packages/mosaic/src/blocks/confirmation/confirmation.tsx‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ export function Confirmation<Payload = void>({ color = 'negative', ...props }: C
5555
<Dialog.Close
5656
render={
5757
<Button
58+
color='neutral'
5859
variant='outline'
5960
fullWidth
6061
>

‎packages/mosaic/src/blocks/destructive/destructive.tsx‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ function DestructiveStep<Payload>({
8686
<Dialog.Close
8787
render={
8888
<Button
89+
color='neutral'
8990
variant='outline'
9091
fullWidth
9192
>

‎packages/mosaic/src/components/card/card.tsx‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ function HeaderCloseButton() {
9999
aria-label='Close'
100100
render={props => (
101101
<Button
102+
color='neutral'
102103
variant='ghost'
103104
shape='circle'
104105
size='sm'

‎packages/mosaic/src/components/dialog/dialog.tsx‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,7 @@ const CloseButton = React.forwardRef<HTMLButtonElement, DialogCloseButtonProps>(
264264
aria-label={ariaLabel}
265265
render={props => (
266266
<Button
267+
color='neutral'
267268
variant='ghost'
268269
shape='circle'
269270
size='sm'

‎packages/mosaic/src/components/field/field.styles.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export const styles = stylex.create({
2222
minWidth: 0,
2323
},
2424
label: {
25-
color: colorVars['--cl-color-brand'],
25+
color: colorVars['--cl-color-foreground'],
2626
fontWeight: fontWeightVars['--cl-font-medium'],
2727
},
2828
message: {

‎packages/mosaic/src/components/item/item.styles.ts‎

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export const item = stylex.create({
3434
default: colorVars['--cl-color-foreground-secondary'],
3535
'@media (hover: hover)': {
3636
default: null,
37-
':hover:not(:disabled, [aria-disabled="true"])': colorVars['--cl-color-foreground'],
37+
':hover:not(:disabled, [aria-disabled="true"])': colorVars['--cl-color-neutral'],
3838
},
3939
},
4040
backgroundColor: {
@@ -63,6 +63,16 @@ export const item = stylex.create({
6363
borderWidth: '1px',
6464
},
6565

66+
interactiveOutline: {
67+
borderColor: {
68+
default: null,
69+
'@media (hover: hover)': {
70+
default: null,
71+
':hover:not(:disabled, [aria-disabled="true"])': colorVars['--cl-color-border'],
72+
},
73+
},
74+
},
75+
6676
xs: {
6777
gap: space['1.5'],
6878
height: space['8'],

‎packages/mosaic/src/components/item/item.tsx‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ const Root = React.forwardRef<HTMLDivElement, ItemProps>(function MosaicItem(
8080
slots.item[size],
8181
variant === 'outline' && slots.item.outline,
8282
interactive && slots.item.interactive,
83+
interactive && variant === 'outline' && slots.item.interactiveOutline,
8384
xstyle,
8485
),
8586
rest,

‎packages/mosaic/src/components/menu/menu.tsx‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ export const MenuTrigger = React.forwardRef<HTMLButtonElement, MenuTriggerProps>
4545
render ??
4646
(props => (
4747
<Button
48+
color='neutral'
4849
variant='ghost'
4950
size='sm'
5051
shape={children ? 'default' : 'square'}

‎packages/mosaic/src/components/tag-input/tag-input.styles.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export const styles = stylex.create({
2121
},
2222
disabled: {
2323
borderColor: colorVars['--cl-color-border'],
24-
backgroundColor: `color-mix(in oklab, ${colorVars['--cl-color-brand']} 5%, transparent)`,
24+
backgroundColor: `color-mix(in oklab, ${colorVars['--cl-color-neutral']} 5%, transparent)`,
2525
cursor: 'not-allowed',
2626
},
2727
list: {

0 commit comments

Comments
 (0)