Commit 9413a344 authored by tom's avatar tom

transition and shadow tokens

parent 404cb56c
const transitionDuration = {
'ultra-fast': '50ms',
faster: '100ms',
fast: '150ms',
normal: '200ms',
slow: '300ms',
slower: '400ms',
'ultra-slow': '500ms',
};
const transition = {
duration: transitionDuration,
};
export default transition;
...@@ -5,6 +5,7 @@ import config from './config'; ...@@ -5,6 +5,7 @@ import config from './config';
import borders from './foundations/borders'; import borders from './foundations/borders';
import breakpoints from './foundations/breakpoints'; import breakpoints from './foundations/breakpoints';
import colors from './foundations/colors'; import colors from './foundations/colors';
import transition from './foundations/transition';
import typography from './foundations/typography'; import typography from './foundations/typography';
import global from './global'; import global from './global';
...@@ -18,6 +19,7 @@ const overrides = { ...@@ -18,6 +19,7 @@ const overrides = {
global, global,
}, },
breakpoints, breakpoints,
transition,
}; };
export default extendTheme(overrides); export default extendTheme(overrides);
...@@ -35,7 +35,7 @@ export default function getOutlinedFieldStyles(props: StyleFunctionProps) { ...@@ -35,7 +35,7 @@ export default function getOutlinedFieldStyles(props: StyleFunctionProps) {
_focusVisible: { _focusVisible: {
zIndex: 1, zIndex: 1,
borderColor: getColor(theme, fc), borderColor: getColor(theme, fc),
boxShadow: '0px 4px 6px -1px rgba(0, 0, 0, 0.1), 0px 2px 4px -1px rgba(0, 0, 0, 0.06)', boxShadow: 'md',
}, },
_placeholder: { _placeholder: {
color: mode('blackAlpha.600', 'whiteAlpha.600')(props), color: mode('blackAlpha.600', 'whiteAlpha.600')(props),
......
...@@ -49,12 +49,12 @@ const ColorModeToggler = forwardRef<ColorModeTogglerProps, 'input'>((props, ref) ...@@ -49,12 +49,12 @@ const ColorModeToggler = forwardRef<ColorModeTogglerProps, 'input'>((props, ref)
boxSizing: 'content-box', boxSizing: 'content-box',
cursor: 'pointer', cursor: 'pointer',
...transitionProps, ...transitionProps,
transitionDuration: '500ms', transitionDuration: 'ultra-slow',
}), [ trackBg, transitionProps ]); }), [ trackBg, transitionProps ]);
const thumbStyles: SystemStyleObject = React.useMemo(() => ({ const thumbStyles: SystemStyleObject = React.useMemo(() => ({
bg: thumbBg, bg: thumbBg,
boxShadow: '0px 4px 8px rgba(0, 0, 0, 0.1)', boxShadow: 'md',
width: '24px', width: '24px',
height: '24px', height: '24px',
borderRadius: 'md', borderRadius: 'md',
...@@ -62,7 +62,7 @@ const ColorModeToggler = forwardRef<ColorModeTogglerProps, 'input'>((props, ref) ...@@ -62,7 +62,7 @@ const ColorModeToggler = forwardRef<ColorModeTogglerProps, 'input'>((props, ref)
transform: state.isChecked ? 'translate(44px, 4px)' : 'translate(4px, 4px)', transform: state.isChecked ? 'translate(44px, 4px)' : 'translate(4px, 4px)',
...transitionProps, ...transitionProps,
transitionProperty: 'background-color, transform', transitionProperty: 'background-color, transform',
transitionDuration: '500ms', transitionDuration: 'ultra-slow',
}), [ thumbBg, transitionProps, state.isChecked ]); }), [ thumbBg, transitionProps, state.isChecked ]);
return ( return (
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment