|
@@ -48,6 +48,9 @@ const ComponentBase = styled('div')({ |
|
|
':focus-within': { |
|
|
':focus-within': { |
|
|
'--color-accent': 'var(--color-active, Highlight)', |
|
|
'--color-accent': 'var(--color-active, Highlight)', |
|
|
}, |
|
|
}, |
|
|
|
|
|
'fieldset[disabled] &': { |
|
|
|
|
|
opacity: 0.5, |
|
|
|
|
|
}, |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
ComponentBase.displayName = 'div' |
|
|
ComponentBase.displayName = 'div' |
|
@@ -114,38 +117,6 @@ const Border = styled('span')({ |
|
|
}, |
|
|
}, |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
const Input = styled('input')({ |
|
|
|
|
|
display: 'block', |
|
|
|
|
|
verticalAlign: 'top', |
|
|
|
|
|
paddingTop: 0, |
|
|
|
|
|
paddingBottom: 0, |
|
|
|
|
|
boxSizing: 'border-box', |
|
|
|
|
|
position: 'relative', |
|
|
|
|
|
border: 0, |
|
|
|
|
|
borderRadius: 'inherit', |
|
|
|
|
|
margin: 0, |
|
|
|
|
|
font: 'inherit', |
|
|
|
|
|
minHeight: '4rem', |
|
|
|
|
|
minWidth: '8rem', |
|
|
|
|
|
maxWidth: '100%', |
|
|
|
|
|
width: '100%', |
|
|
|
|
|
zIndex: 1, |
|
|
|
|
|
transitionProperty: 'background-color, color', |
|
|
|
|
|
':focus': { |
|
|
|
|
|
outline: 0, |
|
|
|
|
|
color: 'var(--color-fg, black)', |
|
|
|
|
|
}, |
|
|
|
|
|
':disabled': { |
|
|
|
|
|
cursor: 'not-allowed', |
|
|
|
|
|
}, |
|
|
|
|
|
'@media only screen': { |
|
|
|
|
|
backgroundColor: 'var(--color-bg, white)', |
|
|
|
|
|
color: 'var(--color-fg, black)', |
|
|
|
|
|
}, |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
Input.displayName = 'input' |
|
|
|
|
|
|
|
|
|
|
|
const TextArea = styled('textarea')({ |
|
|
const TextArea = styled('textarea')({ |
|
|
display: 'block', |
|
|
display: 'block', |
|
|
verticalAlign: 'top', |
|
|
verticalAlign: 'top', |
|
@@ -164,10 +135,16 @@ const TextArea = styled('textarea')({ |
|
|
zIndex: 1, |
|
|
zIndex: 1, |
|
|
transitionProperty: 'background-color, color', |
|
|
transitionProperty: 'background-color, color', |
|
|
resize: 'none', |
|
|
resize: 'none', |
|
|
|
|
|
lineHeight: 'normal', |
|
|
':focus': { |
|
|
':focus': { |
|
|
outline: 0, |
|
|
outline: 0, |
|
|
|
|
|
color: 'var(--color-fg, black)', |
|
|
|
|
|
}, |
|
|
|
|
|
':disabled': { |
|
|
|
|
|
cursor: 'not-allowed', |
|
|
}, |
|
|
}, |
|
|
'@media only screen': { |
|
|
'@media only screen': { |
|
|
|
|
|
backgroundColor: 'var(--color-bg, white)', |
|
|
color: 'var(--color-fg, black)', |
|
|
color: 'var(--color-fg, black)', |
|
|
}, |
|
|
}, |
|
|
}) |
|
|
}) |
|
@@ -259,19 +236,16 @@ export const MultilineTextInput = React.forwardRef<HTMLTextAreaElement, Props>( |
|
|
{ |
|
|
{ |
|
|
label = '', |
|
|
label = '', |
|
|
hint = '', |
|
|
hint = '', |
|
|
indicator = null, |
|
|
|
|
|
size = MultilineTextInputSize.MEDIUM, |
|
|
size = MultilineTextInputSize.MEDIUM, |
|
|
disabled = false, |
|
|
|
|
|
rows = 3, |
|
|
|
|
|
|
|
|
indicator = null, |
|
|
border = false, |
|
|
border = false, |
|
|
onChange, |
|
|
|
|
|
onFocus, |
|
|
|
|
|
onBlur, |
|
|
|
|
|
alternate = false, |
|
|
alternate = false, |
|
|
|
|
|
block = false, |
|
|
|
|
|
disabled = false, |
|
|
|
|
|
rows = 3, |
|
|
defaultValue, |
|
|
defaultValue, |
|
|
value, |
|
|
value, |
|
|
name, |
|
|
name, |
|
|
block = false, |
|
|
|
|
|
...etcProps |
|
|
...etcProps |
|
|
}, |
|
|
}, |
|
|
ref, |
|
|
ref, |
|
@@ -320,6 +294,7 @@ export const MultilineTextInput = React.forwardRef<HTMLTextAreaElement, Props>( |
|
|
defaultValue={defaultValue} |
|
|
defaultValue={defaultValue} |
|
|
value={value} |
|
|
value={value} |
|
|
name={name} |
|
|
name={name} |
|
|
|
|
|
rows={rows} |
|
|
/> |
|
|
/> |
|
|
</CaptureArea> |
|
|
</CaptureArea> |
|
|
{hint && ( |
|
|
{hint && ( |
|
|