From da9d3ae65521177749a819894fd3091130931485 Mon Sep 17 00:00:00 2001 From: "ashwin.srivastav1" Date: Mon, 9 Oct 2023 17:11:33 +0530 Subject: [PATCH 1/3] text area css changes --- components/field/src/field.module.scss | 11 +++++++-- components/field/src/field.tsx | 5 ++++ .../src/input-text-area.module.scss | 4 ++++ .../input-text-area/src/input-text-area.tsx | 6 +++-- components/input/src/_input.scss | 14 +++++++++++ components/input/src/input.tsx | 3 ++- packages/accoutrement/src/config/colors.scss | 23 ++++++++++++------- 7 files changed, 53 insertions(+), 13 deletions(-) diff --git a/components/field/src/field.module.scss b/components/field/src/field.module.scss index 4fe00b8b6..45087efa6 100644 --- a/components/field/src/field.module.scss +++ b/components/field/src/field.module.scss @@ -5,9 +5,10 @@ align-items: center; justify-content: space-between; width: 100%; - margin: size('1x') size('0'); + margin: size('0') size('1x'); @include typography('caption-revamp'); + color: #3D4152; } .required { @@ -20,6 +21,11 @@ margin-top: margin-top('small'); margin-bottom: negative(margin-bottom('field') - 1); overflow: hidden; + + &-icon { + padding-right: 4px; + margin-top: 1px; + } } .meta:hover { @@ -31,6 +37,7 @@ color: color('text-dark-medium-emphasis'); // TODO: Change to mid-emphasis. @include typography('caption-revamp-light'); + font-weight: 200; } .meta > [role='alert'] { @@ -53,7 +60,7 @@ color: color('input.error'); } .success { - color: color('success-base-new'); + color: color('success-base-new-1'); } .icon { color: color('primary-base-new'); diff --git a/components/field/src/field.tsx b/components/field/src/field.tsx index 37f4b637b..36064683b 100644 --- a/components/field/src/field.tsx +++ b/components/field/src/field.tsx @@ -4,6 +4,9 @@ import React, { Children, isValidElement, } from 'react' +import Icon from '@applique-ui/icon' +import TimesSolid from "uikit-icons/svgs/TimesSolid" +import CheckSolid from "uikit-icons/svgs/CheckSolid" import classnames from './field.module.scss' @@ -103,6 +106,7 @@ export default function Field({ role="alert" className={classnames({ error: !!error })} > + {Array.isArray(error) ? error.join(' ') : error} ) : success ? ( @@ -110,6 +114,7 @@ export default function Field({ id={htmlFor ? htmlFor + '__success' : null} className={classnames('success')} > + {success} ) : ( diff --git a/components/input-text-area/src/input-text-area.module.scss b/components/input-text-area/src/input-text-area.module.scss index f3709ed58..b6d346cb4 100644 --- a/components/input-text-area/src/input-text-area.module.scss +++ b/components/input-text-area/src/input-text-area.module.scss @@ -18,6 +18,7 @@ textarea { color: text-color('input.text'); resize: none; + font-family: Roboto, Helvetica, sans-serif; } &.disable { resize: none; @@ -28,6 +29,9 @@ &.noResize { resize: none; } + &.readOnly { + resize: none; + } } .icon { margin-top: size('1x'); diff --git a/components/input-text-area/src/input-text-area.tsx b/components/input-text-area/src/input-text-area.tsx index ee97b3a6f..1fdc86cac 100644 --- a/components/input-text-area/src/input-text-area.tsx +++ b/components/input-text-area/src/input-text-area.tsx @@ -55,6 +55,7 @@ export default function InputTextArea({ __fieldContext = {}, adornmentPosition = 'start', icon, + readOnly, ...props }: Props) { error = !!(error || __fieldContext.error) @@ -69,7 +70,8 @@ export default function InputTextArea({ { standard: variant === 'standard' }, { bordered: variant === 'bordered' }, { filled: !isEmptyValue(value) }, - { noResize } + { noResize }, + { readOnly } )} > {icon && } @@ -77,7 +79,7 @@ export default function InputTextArea({