M: Improve color animations
This commit is contained in:
parent
39c3a84c9a
commit
27dcb3a4cc
|
@ -39,7 +39,7 @@ export function MiniButton({
|
||||||
tabIndex={tabIndex ?? -1}
|
tabIndex={tabIndex ?? -1}
|
||||||
className={clsx(
|
className={clsx(
|
||||||
'rounded-lg',
|
'rounded-lg',
|
||||||
'clr-text-controls cc-animate-color',
|
'clr-text-controls cc-animate-background',
|
||||||
'cursor-pointer disabled:cursor-auto',
|
'cursor-pointer disabled:cursor-auto',
|
||||||
noHover ? 'outline-hidden' : 'clr-hover',
|
noHover ? 'outline-hidden' : 'clr-hover',
|
||||||
!noPadding && 'px-1 py-1',
|
!noPadding && 'px-1 py-1',
|
||||||
|
|
|
@ -25,7 +25,7 @@ export function SubmitButton({ text = 'ОК', icon, disabled, loading, className
|
||||||
'border',
|
'border',
|
||||||
'font-medium',
|
'font-medium',
|
||||||
'clr-btn-primary cc-animate-color',
|
'clr-btn-primary cc-animate-color',
|
||||||
'select-none disabled:cursor-auto',
|
'select-none cursor-pointer disabled:cursor-auto',
|
||||||
loading && 'cursor-progress',
|
loading && 'cursor-progress',
|
||||||
className
|
className
|
||||||
)}
|
)}
|
||||||
|
|
|
@ -75,7 +75,7 @@ export function TableBody<TData>({
|
||||||
key={row.id}
|
key={row.id}
|
||||||
className={clsx(
|
className={clsx(
|
||||||
'cc-scroll-row',
|
'cc-scroll-row',
|
||||||
'clr-hover cc-animate-color',
|
'clr-hover cc-animate-background duration-300',
|
||||||
!noHeader && 'scroll-mt-[calc(2px+2rem)]',
|
!noHeader && 'scroll-mt-[calc(2px+2rem)]',
|
||||||
table.options.enableRowSelection && row.getIsSelected()
|
table.options.enableRowSelection && row.getIsSelected()
|
||||||
? 'clr-selected'
|
? 'clr-selected'
|
||||||
|
|
|
@ -37,7 +37,7 @@ export function DropdownButton({
|
||||||
'px-3 py-1 inline-flex items-center gap-2',
|
'px-3 py-1 inline-flex items-center gap-2',
|
||||||
'text-left text-sm text-ellipsis whitespace-nowrap',
|
'text-left text-sm text-ellipsis whitespace-nowrap',
|
||||||
'disabled:clr-text-controls',
|
'disabled:clr-text-controls',
|
||||||
'cc-animate-color',
|
'cc-animate-background',
|
||||||
!!onClick ? 'clr-hover cursor-pointer disabled:cursor-auto' : 'clr-btn-default',
|
!!onClick ? 'clr-hover cursor-pointer disabled:cursor-auto' : 'clr-btn-default',
|
||||||
className
|
className
|
||||||
)}
|
)}
|
||||||
|
|
|
@ -47,7 +47,7 @@ export function DlgShowAST() {
|
||||||
{!isDragging && hoverNodeDebounced ? (
|
{!isDragging && hoverNodeDebounced ? (
|
||||||
<div key={hoverNodeDebounced.uid}>
|
<div key={hoverNodeDebounced.uid}>
|
||||||
<span>{expression.slice(0, hoverNodeDebounced.start)}</span>
|
<span>{expression.slice(0, hoverNodeDebounced.start)}</span>
|
||||||
<span className='bg-sec-200 cc-animate-color starting:bg-prim-100 duration-500'>
|
<span className='bg-sec-200 cc-animate-background starting:bg-prim-100 duration-500'>
|
||||||
{expression.slice(hoverNodeDebounced.start, hoverNodeDebounced.finish)}
|
{expression.slice(hoverNodeDebounced.start, hoverNodeDebounced.finish)}
|
||||||
</span>
|
</span>
|
||||||
<span>{expression.slice(hoverNodeDebounced.finish)}</span>
|
<span>{expression.slice(hoverNodeDebounced.finish)}</span>
|
||||||
|
|
|
@ -76,8 +76,8 @@
|
||||||
--clr-prim-999: oklch(095% 0 0deg);
|
--clr-prim-999: oklch(095% 0 0deg);
|
||||||
|
|
||||||
--clr-sec-0: oklch(100% 0 0deg);
|
--clr-sec-0: oklch(100% 0 0deg);
|
||||||
--clr-sec-100: oklch(025% 0.100 295deg);
|
--clr-sec-100: oklch(025% 0.200 295deg);
|
||||||
--clr-sec-200: oklch(035% 0.100 295deg);
|
--clr-sec-200: oklch(035% 0.150 295deg);
|
||||||
--clr-sec-300: oklch(045% 0.150 295deg);
|
--clr-sec-300: oklch(045% 0.150 295deg);
|
||||||
--clr-sec-400: oklch(055% 0.200 295deg);
|
--clr-sec-400: oklch(055% 0.200 295deg);
|
||||||
--clr-sec-600: oklch(065% 0.250 295deg);
|
--clr-sec-600: oklch(065% 0.250 295deg);
|
||||||
|
|
|
@ -195,6 +195,12 @@
|
||||||
transition-duration: var(--duration-select);
|
transition-duration: var(--duration-select);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@utility cc-animate-background {
|
||||||
|
transition-property: background-color;
|
||||||
|
transition-timing-function: var(--ease-bezier);
|
||||||
|
transition-duration: var(--duration-select);
|
||||||
|
}
|
||||||
|
|
||||||
@utility cc-mask-sides {
|
@utility cc-mask-sides {
|
||||||
--mask-border-size: 2rem;
|
--mask-border-size: 2rem;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user