Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 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
8 changes: 8 additions & 0 deletions .changeset/nine-worms-count.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
'@clerk/clerk-js': patch
'@clerk/types': patch
---

- Render parsed `colorRing` at 15% vs 100%
- Render parsed `colorModalBackdrop` at 50% vs 100%
Comment thread
alexcarpenter marked this conversation as resolved.
Outdated
- Ensure `avatarBackground` and `avatarBorder` render with parsed neutral colors when `colorNeutral` is passed in via variables prop
12 changes: 10 additions & 2 deletions packages/clerk-js/src/ui/customizables/parseVariables.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,17 @@ 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,
colorRing: variables.colorRing ? colors.makeTransparent(colors.toHslaString(variables.colorRing), 0.85) : undefined,
colorShadow: variables.colorShadow ? colors.toHslaString(variables.colorShadow) : undefined,
colorModalBackdrop: variables.colorModalBackdrop ? colors.toHslaString(variables.colorModalBackdrop) : undefined,
colorModalBackdrop: variables.colorModalBackdrop
? colors.makeTransparent(colors.toHslaString(variables.colorModalBackdrop), 0.5)
: undefined,
avatarBackground: neutralAlphaScale?.neutralAlpha400
? colors.toHslaString(neutralAlphaScale.neutralAlpha400)
: undefined,
avatarBorder: neutralAlphaScale?.neutralAlpha200
? colors.toHslaString(neutralAlphaScale.neutralAlpha200)
: undefined,
});
};

Expand Down
4 changes: 2 additions & 2 deletions packages/clerk-js/src/ui/foundations/colors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,13 @@ const colorMutedForeground = clerkCssVar(
const colors = Object.freeze({
avatarBorder: neutralAlphaScale.neutralAlpha200,
avatarBackground: neutralAlphaScale.neutralAlpha400,
colorModalBackdrop: clerkCssVar('color-modal-backdrop', neutralAlphaScale.neutralAlpha700),
colorModalBackdrop: colorUtils.makeTransparent(clerkCssVar('color-modal-backdrop', defaultColorNeutral), 0.27),
Comment thread
alexcarpenter marked this conversation as resolved.
Outdated
colorBackground: clerkCssVar('color-background', 'white'),
colorInput: clerkCssVar('color-input', 'white'),
colorForeground,
colorMutedForeground,
colorMuted: undefined,
colorRing: clerkCssVar('color-ring', neutralAlphaScale.neutralAlpha200),
colorRing: colorUtils.makeTransparent(clerkCssVar('color-ring', defaultColorNeutral), 0.85),
colorInputForeground: clerkCssVar('color-input-foreground', '#131316'),
colorPrimaryForeground: clerkCssVar('color-primary-foreground', 'white'),
colorShimmer: clerkCssVar('color-shimmer', 'rgba(255, 255, 255, 0.36)'),
Expand Down
2 changes: 1 addition & 1 deletion packages/clerk-js/src/ui/polishedAppearance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const BUTTON_OUTLINE_SHADOW = (color: string) =>

const cardContentStyles = (theme: InternalTheme) => ({
borderWidth: 0,
boxShadow: `${theme.shadows.$cardContentShadow}, ${BORDER_SHADOW_LENGTH} ${theme.colors.$neutralAlpha50}`,
boxShadow: `${theme.shadows.$cardContentShadow}, ${BORDER_SHADOW_LENGTH} ${theme.colors.$borderAlpha50}`,
});

const inputShadowStyles = (
Expand Down
6 changes: 3 additions & 3 deletions packages/types/src/appearance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -738,7 +738,7 @@ export type Variables = {
*/
colorShimmer?: CssColor;
/**
* The color of the ring when an interactive element is focused.
* The color of the ring when an interactive element is focused rendered at 15% opacity.
* @default {@link Variables.colorNeutral} at 15% opacity
*/
colorRing?: CssColor;
Expand All @@ -753,8 +753,8 @@ export type Variables = {
*/
colorBorder?: CssColor;
/**
* The background color of the modal backdrop.
* @default {@link Variables.colorNeutral} at 70% opacity
* The background color of the modal backdrop rendered at 50% opacity.
* @default {@link Variables.colorNeutral} at 50% opacity
*/
colorModalBackdrop?: CssColor;
/**
Expand Down