Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ function CopyButton({ text, copyLabel = 'Copy' }: { text: string; copyLabel?: st
borderRadius: t.radii.$sm,
'&:focus-visible': {
outline: '2px solid',
outlineColor: t.colors.$neutralAlpha200,
outlineColor: t.colors.$colorRing,
},
})}
focusRing={false}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ function CopyButton({ text, copyLabel = 'Copy' }: { text: string; copyLabel?: st
borderRadius: t.radii.$sm,
'&:focus-visible': {
outline: '2px solid',
outlineColor: t.colors.$neutralAlpha200,
outlineColor: t.colors.$colorRing,
},
})}
focusRing={false}
Expand Down
1 change: 1 addition & 0 deletions packages/clerk-js/src/ui/customizables/parseVariables.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ export const createColorScales = (theme: Theme) => {
: colors.toHslaString(variables.colorInputBackground),
colorShimmer: colors.toHslaString(variables.colorShimmer),
colorMuted: variables.colorMuted ? colors.toHslaString(variables.colorMuted) : undefined,
colorRing: variables.colorRing ? colors.toHslaString(variables.colorRing) : undefined,
});
};

Expand Down
2 changes: 1 addition & 1 deletion packages/clerk-js/src/ui/elements/LineItems.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ function CopyButton({ text, copyLabel = 'Copy' }: { text: string; copyLabel?: st
borderRadius: t.radii.$sm,
'&:focus-visible': {
outline: '2px solid',
outlineColor: t.colors.$neutralAlpha200,
outlineColor: t.colors.$colorRing,
},
})}
focusRing={false}
Expand Down
1 change: 1 addition & 0 deletions packages/clerk-js/src/ui/foundations/colors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ const colors = Object.freeze({
colorForeground,
colorMutedForeground,
colorMuted: undefined,
colorRing: clerkCssVar('color-ring', neutralAlphaScale.neutralAlpha200),
colorInputForeground: clerkCssVar('color-input-foreground', '#131316'),
colorPrimaryForeground: clerkCssVar('color-primary-foreground', 'white'),
colorShimmer: clerkCssVar('color-shimmer', 'rgba(255, 255, 255, 0.36)'),
Expand Down
8 changes: 4 additions & 4 deletions packages/clerk-js/src/ui/polishedAppearance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ const inputStyles = (theme: InternalTheme) => ({
idle2: theme.colors.$neutralAlpha100,
hover1: theme.colors.$neutralAlpha300,
hover2: theme.colors.$neutralAlpha150,
focus: theme.colors.$neutralAlpha150,
focus: theme.colors.$colorRing,
}),
'&[data-feedback="error"]': inputShadowStyles(theme, {
idle1: theme.colors.$dangerAlpha400,
Expand Down Expand Up @@ -121,7 +121,7 @@ export const polishedAppearance: Appearance = {
'&:focus': {
boxShadow: [
BUTTON_SOLID_SHADOW(theme.colors.$primary500),
theme.shadows.$focusRing.replace('{{color}}', theme.colors.$neutralAlpha200),
theme.shadows.$focusRing.replace('{{color}}', theme.colors.$colorRing),
].toString(),
},
},
Expand All @@ -141,7 +141,7 @@ export const polishedAppearance: Appearance = {
'&:focus': {
boxShadow: [
BUTTON_OUTLINE_SHADOW(theme.colors.$neutralAlpha100),
theme.shadows.$focusRing.replace('{{color}}', theme.colors.$neutralAlpha200),
theme.shadows.$focusRing.replace('{{color}}', theme.colors.$colorRing),
].toString(),
},
},
Expand All @@ -151,7 +151,7 @@ export const polishedAppearance: Appearance = {
'&:focus': {
boxShadow: [
BUTTON_OUTLINE_SHADOW(theme.colors.$neutralAlpha100),
theme.shadows.$focusRing.replace('{{color}}', theme.colors.$neutralAlpha200),
theme.shadows.$focusRing.replace('{{color}}', theme.colors.$colorRing),
].toString(),
},
},
Expand Down
2 changes: 1 addition & 1 deletion packages/clerk-js/src/ui/styledSystem/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ const focusRingStyles = (t: InternalTheme) => {
return {
'&::-moz-focus-inner': { border: '0' },
WebkitTapHighlightColor: 'transparent',
boxShadow: t.shadows.$focusRing.replace('{{color}}', t.colors.$neutralAlpha200),
boxShadow: t.shadows.$focusRing.replace('{{color}}', t.colors.$colorRing),
transitionProperty: t.transitionProperty.$common,
transitionTimingFunction: t.transitionTiming.$common,
transitionDuration: t.transitionDuration.$focusRing,
Expand Down
5 changes: 5 additions & 0 deletions packages/types/src/appearance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -717,6 +717,11 @@ export type Variables = {
* @default 'rgba(255, 255, 255, 0.36)'
*/
colorShimmer?: CssColor;
/**
* The color of the ring when an interactive element is focused.
* @default {@link Variables.colorNeutral} at 15% opacity
*/
colorRing?: CssColor;
/**
* The default font that will be used in all components.
* This can be the name of a custom font loaded by your code or the name of a web-safe font ((@link WebSafeFont})
Expand Down