From bfcc3c35fe3e35f7e90791db8acd124585ba62ab Mon Sep 17 00:00:00 2001 From: George Desipris <73396808+desiprisg@users.noreply.github.com> Date: Mon, 27 Nov 2023 16:01:17 +0200 Subject: [PATCH] feat(clerk-js): Retheme inputs (#2214) * feat(clerk-js): Retheme input border radius * feat(clerk-js): Retheme Input focus ring --- .changeset/heavy-horses-nail.md | 2 ++ .../src/ui.retheme/elements/PhoneInput/PhoneInput.tsx | 7 ++++--- packages/clerk-js/src/ui.retheme/foundations/shadows.ts | 1 - packages/clerk-js/src/ui.retheme/styledSystem/common.ts | 6 +++--- 4 files changed, 9 insertions(+), 7 deletions(-) create mode 100644 .changeset/heavy-horses-nail.md diff --git a/.changeset/heavy-horses-nail.md b/.changeset/heavy-horses-nail.md new file mode 100644 index 0000000000..a845151cc8 --- /dev/null +++ b/.changeset/heavy-horses-nail.md @@ -0,0 +1,2 @@ +--- +--- diff --git a/packages/clerk-js/src/ui.retheme/elements/PhoneInput/PhoneInput.tsx b/packages/clerk-js/src/ui.retheme/elements/PhoneInput/PhoneInput.tsx index 9f1276c25a..4b0320cda5 100644 --- a/packages/clerk-js/src/ui.retheme/elements/PhoneInput/PhoneInput.tsx +++ b/packages/clerk-js/src/ui.retheme/elements/PhoneInput/PhoneInput.tsx @@ -100,12 +100,13 @@ const PhoneInputBase = forwardRef((props, ref comparator={(term, option) => option.searchTerm.toLowerCase().includes(term.toLowerCase())} > ({ border: 'none', + borderRadius: t.radii.$md, // needs to be specified as we can't use overflow: hidden on the parent, hides the popover borderBottomRightRadius: '0', borderTopRightRadius: '0', zIndex: 2, - }} + })} isDisabled={rest.isDisabled} > ((props, ref /> - + { const borderVariants = (t: InternalTheme, props?: any) => { return { normal: { - borderRadius: t.radii.$md, + borderRadius: t.radii.$lg, border: t.borders.$normal, ...borderColor(t, props), }, @@ -166,9 +166,9 @@ const focusRingInput = (t: InternalTheme, props?: any) => { return { '&:focus': { WebkitTapHighlightColor: 'transparent', - boxShadow: t.shadows.$focusRingInput.replace( + boxShadow: t.shadows.$focusRing.replace( '{{color}}', - props?.hasError ? t.colors.$danger200 : t.colors.$primary200, + props?.hasError ? t.colors.$danger400 : t.colors.$primary400, ), transitionProperty: t.transitionProperty.$common, transitionTimingFunction: t.transitionTiming.$common,