File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -61,3 +61,10 @@ export const TEXT_FIELD_BORDER_RADIUS = 4;
6161// ============
6262export const MULTILINE_PADDING_TOP =
6363 ACTIVE_LABEL_FONT_SIZE + TEXT_FIELD_PADDING_VERTICAL ;
64+
65+ // ============
66+ // OPACITY
67+ // ============
68+
69+ export const OUTLINE_ALPHA = 0.12 ;
70+ export const FILLED_CONTAINER_ALPHA = 0.04 ;
Original file line number Diff line number Diff line change 11import color from 'color' ;
22
3- import { tokens } from '../../../styles/themes/v3/tokens' ;
43import type { InternalTheme } from '../../../types' ;
4+ import { OUTLINE_ALPHA } from '../constants' ;
55
66export const getOutlinedFieldColors = ( {
77 theme,
@@ -19,10 +19,7 @@ export const getOutlinedFieldColors = ({
1919 let inactiveOutlineColor = outline ;
2020
2121 if ( disabled ) {
22- inactiveOutlineColor = color ( onSurface )
23- . alpha ( tokens . md . ref . stateOpacity . dragged )
24- . rgb ( )
25- . string ( ) ;
22+ inactiveOutlineColor = color ( onSurface ) . alpha ( OUTLINE_ALPHA ) . rgb ( ) . string ( ) ;
2623 }
2724
2825 let activeOutlineColor = primary ;
Original file line number Diff line number Diff line change 11import color from 'color' ;
22
3- import { tokens } from '../../styles/themes/v3/tokens ' ;
3+ import { FILLED_CONTAINER_ALPHA } from './constants ' ;
44import type { InternalTheme } from '../../types' ;
55
66export const getAccentColors = ( {
@@ -80,10 +80,7 @@ export const getFieldBackgroundColor = ({
8080 colors : { onSurface, surfaceContainerHighest } ,
8181 } = theme ;
8282 if ( disabled ) {
83- return color ( onSurface )
84- . alpha ( tokens . md . ref . stateOpacity . hover )
85- . rgb ( )
86- . string ( ) ;
83+ return color ( onSurface ) . alpha ( FILLED_CONTAINER_ALPHA ) . rgb ( ) . string ( ) ;
8784 }
8885
8986 return surfaceContainerHighest ;
You can’t perform that action at this time.
0 commit comments