Show password in plain text.
diff --git a/packages/react/src/components/text-input/text-input.test.tsx.snap b/packages/react/src/components/text-input/text-input.test.tsx.snap
index e904214eb9..bc9b5b58ca 100644
--- a/packages/react/src/components/text-input/text-input.test.tsx.snap
+++ b/packages/react/src/components/text-input/text-input.test.tsx.snap
@@ -119,7 +119,6 @@ input + .c1 {
display: -ms-flexbox;
display: flex;
height: var(--size-2x);
- border-color: #CD2C23;
background-color: #F1F2F2;
border-color: #B7BBC2;
}
@@ -282,7 +281,6 @@ input + .c1 {
display: -ms-flexbox;
display: flex;
height: var(--size-2x);
- border-color: #CD2C23;
}
.c3 {
@@ -443,7 +441,6 @@ input + .c1 {
display: -ms-flexbox;
display: flex;
height: var(--size-2x);
- border-color: #CD2C23;
}
.c3 {
@@ -614,7 +611,6 @@ input + .c1 {
display: -ms-flexbox;
display: flex;
height: var(--size-2x);
- border-color: #CD2C23;
}
.c3 {
@@ -795,7 +791,6 @@ input + .c1 {
display: -ms-flexbox;
display: flex;
height: var(--size-2x);
- border-color: #CD2C23;
}
.c3 {
@@ -971,7 +966,6 @@ input + .c1 {
display: -ms-flexbox;
display: flex;
height: var(--size-2x);
- border-color: #CD2C23;
}
.c3 {
From 1d204d19f6fbf818ea30d0631ea948799ee3768b Mon Sep 17 00:00:00 2001
From: Williams Tardif <32278060+WilliamsTardif@users.noreply.github.com>
Date: Mon, 22 Jul 2024 16:51:26 -0400
Subject: [PATCH 4/9] fix(TextInput): fix linting
---
packages/storybook/stories/text-input.stories.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/packages/storybook/stories/text-input.stories.tsx b/packages/storybook/stories/text-input.stories.tsx
index 09164b90c9..75e0e85707 100644
--- a/packages/storybook/stories/text-input.stories.tsx
+++ b/packages/storybook/stories/text-input.stories.tsx
@@ -1,4 +1,4 @@
-import {Icon, TextInput} from '@equisoft/design-elements-react';
+import { Icon, TextInput } from '@equisoft/design-elements-react';
import { Meta, StoryObj } from '@storybook/react';
import { rawCodeParameters } from './utils/parameters';
From 6e19e99ac44dd5d39144bbed4e51d3e44abe0d8c Mon Sep 17 00:00:00 2001
From: Williams Tardif <32278060+WilliamsTardif@users.noreply.github.com>
Date: Fri, 2 Aug 2024 11:57:26 -0400
Subject: [PATCH 5/9] feat(TextInput, MoneyInput): test and new props for
textInput
---
.../money-input/money-input.test.tsx.snap | 3 -
.../components/text-input/text-input.test.tsx | 8 +--
.../text-input/text-input.test.tsx.snap | 68 ++++++++++++-------
.../src/components/text-input/text-input.tsx | 63 +++++++++--------
.../tokens/component/text-input-tokens.ts | 5 +-
packages/storybook/stories/text-input.mdx | 3 +
.../storybook/stories/text-input.stories.tsx | 16 +++--
7 files changed, 99 insertions(+), 67 deletions(-)
diff --git a/packages/react/src/components/money-input/money-input.test.tsx.snap b/packages/react/src/components/money-input/money-input.test.tsx.snap
index 6430252aa9..1a7338f42d 100644
--- a/packages/react/src/components/money-input/money-input.test.tsx.snap
+++ b/packages/react/src/components/money-input/money-input.test.tsx.snap
@@ -38,7 +38,6 @@ exports[`CurrencyInput Component matches snapshot (en-CA) 1`] = `
-ms-flex: 1 1 auto;
flex: 1 1 auto;
min-height: 100%;
- text-align: left;
}
.c3::-webkit-input-placeholder {
@@ -179,7 +178,6 @@ exports[`CurrencyInput Component matches snapshot (en-US) 1`] = `
-ms-flex: 1 1 auto;
flex: 1 1 auto;
min-height: 100%;
- text-align: left;
}
.c3::-webkit-input-placeholder {
@@ -320,7 +318,6 @@ exports[`CurrencyInput Component matches snapshot (fr-CA) 1`] = `
-ms-flex: 1 1 auto;
flex: 1 1 auto;
min-height: 100%;
- text-align: left;
}
.c3::-webkit-input-placeholder {
diff --git a/packages/react/src/components/text-input/text-input.test.tsx b/packages/react/src/components/text-input/text-input.test.tsx
index 64b60f299a..ccff23e80a 100644
--- a/packages/react/src/components/text-input/text-input.test.tsx
+++ b/packages/react/src/components/text-input/text-input.test.tsx
@@ -196,7 +196,7 @@ describe('TextInput', () => {
type="tel"
validationErrorMessage="Please enter a valid phone number"
defaultValue="foo"
- adornment='#'
+ leftAdornment='#'
/>,
);
@@ -212,7 +212,7 @@ describe('TextInput', () => {
type="tel"
validationErrorMessage="Please enter a valid phone number"
defaultValue="foo"
- adornment={
}
+ leftAdornment={
}
/>,
);
@@ -228,8 +228,8 @@ describe('TextInput', () => {
type="tel"
validationErrorMessage="Please enter a valid phone number"
defaultValue="foo"
- adornment='#'
- adornmentPosition='end'
+ leftAdornment='#'
+ rightAdornment='end'
/>,
);
diff --git a/packages/react/src/components/text-input/text-input.test.tsx.snap b/packages/react/src/components/text-input/text-input.test.tsx.snap
index bc9b5b58ca..3608e1df55 100644
--- a/packages/react/src/components/text-input/text-input.test.tsx.snap
+++ b/packages/react/src/components/text-input/text-input.test.tsx.snap
@@ -58,7 +58,6 @@ input + .c1 {
-ms-flex: 1 1 auto;
flex: 1 1 auto;
min-height: 100%;
- text-align: left;
}
.c4::-webkit-input-placeholder {
@@ -220,7 +219,6 @@ input + .c1 {
-ms-flex: 1 1 auto;
flex: 1 1 auto;
min-height: 100%;
- text-align: left;
}
.c4::-webkit-input-placeholder {
@@ -380,7 +378,6 @@ input + .c1 {
-ms-flex: 1 1 auto;
flex: 1 1 auto;
min-height: 100%;
- text-align: left;
}
.c4::-webkit-input-placeholder {
@@ -539,7 +536,6 @@ input + .c1 {
-ms-flex: 1 1 auto;
flex: 1 1 auto;
min-height: 100%;
- text-align: left;
}
.c5::-webkit-input-placeholder {
@@ -594,6 +590,7 @@ input + .c1 {
-webkit-align-self: center;
-ms-flex-item-align: center;
align-self: center;
+ color: #60666E;
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
@@ -601,6 +598,11 @@ input + .c1 {
padding-left: var(--spacing-1x);
}
+.c4 > svg {
+ height: 16px;
+ width: 16px;
+}
+
.c3 {
background: #FFFFFF;
border: 1px solid #60666E;
@@ -719,7 +721,6 @@ input + .c1 {
-ms-flex: 1 1 auto;
flex: 1 1 auto;
min-height: 100%;
- text-align: left;
}
.c5::-webkit-input-placeholder {
@@ -774,6 +775,7 @@ input + .c1 {
-webkit-align-self: center;
-ms-flex-item-align: center;
align-self: center;
+ color: #60666E;
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
@@ -781,6 +783,11 @@ input + .c1 {
padding-left: var(--spacing-1x);
}
+.c4 > svg {
+ height: 16px;
+ width: 16px;
+}
+
.c3 {
background: #FFFFFF;
border: 1px solid #60666E;
@@ -871,7 +878,7 @@ input + .c1 {
margin-bottom: var(--spacing-half);
}
-.c4 {
+.c5 {
background: #FFFFFF;
border: 1px solid #60666E;
border-radius: var(--border-radius);
@@ -894,68 +901,74 @@ input + .c1 {
-ms-flex: 1 1 auto;
flex: 1 1 auto;
min-height: 100%;
- text-align: right;
}
-.c4::-webkit-input-placeholder {
+.c5::-webkit-input-placeholder {
color: #60666E;
}
-.c4::-moz-placeholder {
+.c5::-moz-placeholder {
color: #60666E;
}
-.c4:-ms-input-placeholder {
+.c5:-ms-input-placeholder {
color: #60666E;
}
-.c4::placeholder {
+.c5::placeholder {
color: #60666E;
}
-.c4:disabled {
+.c5:disabled {
background-color: #F1F2F2;
border-color: #B7BBC2;
color: #B7BBC2;
}
-.c4:disabled,
-.c4:disabled::-webkit-input-placeholder {
+.c5:disabled,
+.c5:disabled::-webkit-input-placeholder {
color: #B7BBC2;
}
-.c4:disabled,
-.c4:disabled::-moz-placeholder {
+.c5:disabled,
+.c5:disabled::-moz-placeholder {
color: #B7BBC2;
}
-.c4:disabled,
-.c4:disabled:-ms-input-placeholder {
+.c5:disabled,
+.c5:disabled:-ms-input-placeholder {
color: #B7BBC2;
}
-.c4:disabled,
-.c4:disabled::placeholder {
+.c5:disabled,
+.c5:disabled::placeholder {
color: #B7BBC2;
}
-.c4:focus,
-.c4:disabled {
+.c5:focus,
+.c5:disabled {
border: 0;
box-shadow: none;
}
-.c5 {
+.c4 {
-webkit-align-self: center;
-ms-flex-item-align: center;
align-self: center;
+ color: #60666E;
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
+ padding-left: var(--spacing-1x);
padding-right: var(--spacing-1x);
}
+.c4 > svg {
+ height: 16px;
+ width: 16px;
+}
+
.c3 {
background: #FFFFFF;
border: 1px solid #60666E;
@@ -993,8 +1006,13 @@ input + .c1 {
-
+ #
+
+
#
diff --git a/packages/react/src/components/text-input/text-input.tsx b/packages/react/src/components/text-input/text-input.tsx
index f70a1bbbc6..cdf293b65a 100644
--- a/packages/react/src/components/text-input/text-input.tsx
+++ b/packages/react/src/components/text-input/text-input.tsx
@@ -28,17 +28,11 @@ import { useAriaConditionalIds } from '../../hooks/use-aria-conditional-ids';
import { useId } from '../../hooks/use-id';
import { focus } from '../../utils/css-state';
-interface StyledInputProps {
- isMobile: boolean;
- $textAlign?: 'left' | 'right';
-}
-
-const StyleInput = styled.input
`
+const StyleInput = styled.input<{ isMobile: boolean }>`
${({ theme, isMobile }) => inputsStyle({ theme, isMobile, isFocusable: false })};
border: 0;
flex: 1 1 auto;
min-height: 100%;
- text-align: ${({ $textAlign }) => $textAlign};
&:focus,
&:disabled {
border: 0;
@@ -46,11 +40,23 @@ const StyleInput = styled.input`
}
`;
-const Adornment = styled.span<{ $position: 'start' | 'end' }>`
+interface AdornmentProps {
+ isMobile: boolean;
+ hasLeftAdornment: boolean;
+ hasRightAdornment: boolean;
+}
+
+const Adornment = styled.span`
align-self: center;
+ color: ${({ theme }) => (theme.component['text-input-adornment-text-color'])};
display: flex;
- padding-left: ${({ $position }) => ($position === 'start' ? 'var(--spacing-1x)' : undefined)};
- padding-right: ${({ $position }) => ($position === 'end' ? 'var(--spacing-1x)' : undefined)};
+ padding-left: ${({ hasLeftAdornment }) => (hasLeftAdornment ? 'var(--spacing-1x)' : undefined)};
+ padding-right: ${({ hasRightAdornment }) => (hasRightAdornment ? 'var(--spacing-1x)' : undefined)};
+
+ > svg {
+ height: ${({ isMobile }) => (isMobile ? '24px' : '16px')};
+ width: ${({ isMobile }) => (isMobile ? '24px' : '16px')};
+ }
`;
interface StyledWrapperProps {
@@ -58,7 +64,7 @@ interface StyledWrapperProps {
$valid?: boolean;
}
-const Wrapper = styled.div`
+const StyleWrapper = styled.div`
background: ${({ theme }) => theme.component['text-input-background-color']};
border: 1px solid ${({ theme }) => theme.component['text-input-border-color']};
border-radius: var(--border-radius);
@@ -85,8 +91,8 @@ type PartialInputProps = Pick;
interface TextInputProps extends PartialInputProps {
- adornment?: ReactNode;
- adornmentPosition?: 'start' | 'end';
+ leftAdornment?: ReactNode;
+ rightAdornment?: ReactNode;
ariaDescribedBy?: string;
ariaInvalid?: boolean;
className?: string;
@@ -119,8 +125,8 @@ interface TextInputProps extends PartialInputProps {
}
export const TextInput = forwardRef(({
- adornment,
- adornmentPosition = 'start',
+ leftAdornment,
+ rightAdornment,
ariaDescribedBy,
ariaInvalid,
className,
@@ -196,15 +202,15 @@ export const TextInput = forwardRef(({
};
const adornmentContent = useMemo(() => (
- adornment ? (
-
- {adornment}
-
- ) : null
- ), [adornment, adornmentPosition]);
+
+ {leftAdornment || rightAdornment}
+
+ ), [leftAdornment, rightAdornment, isMobile]);
useEffect(() => {
if (valid !== undefined) {
@@ -225,10 +231,9 @@ export const TextInput = forwardRef(({
hint={hint}
data-testid="field-container"
>
-
- {(adornment && adornmentPosition === 'start') && adornmentContent}
+
+ {leftAdornment && adornmentContent}
- {(adornment && adornmentPosition === 'end') && adornmentContent}
-
+ {rightAdornment && adornmentContent}
+
);
});
diff --git a/packages/react/src/themes/tokens/component/text-input-tokens.ts b/packages/react/src/themes/tokens/component/text-input-tokens.ts
index 26491cf073..75bcd1a349 100644
--- a/packages/react/src/themes/tokens/component/text-input-tokens.ts
+++ b/packages/react/src/themes/tokens/component/text-input-tokens.ts
@@ -11,7 +11,8 @@ export type TextInputTokens =
| 'text-input-disabled-border-color'
| 'text-input-disabled-text-color'
| 'text-input-placeholder-disabled-text-color'
- | 'text-input-disabled-adornment-text-color';
+ | 'text-input-disabled-adornment-text-color'
+ | 'text-input-adornment-text-color';
export type TextInputTokenValue = AliasTokens | RefTokens;
@@ -35,4 +36,6 @@ export const defaultTextInputTokens: TextInputTokenMap = {
'text-input-placeholder-disabled-text-color': 'color-control-auxiliary-disabled',
'text-input-disabled-adornment-text-color': 'color-control-auxiliary-disabled',
+
+ 'text-input-adornment-text-color': 'color-control-auxiliary',
};
diff --git a/packages/storybook/stories/text-input.mdx b/packages/storybook/stories/text-input.mdx
index 3c48ea6015..e856924552 100644
--- a/packages/storybook/stories/text-input.mdx
+++ b/packages/storybook/stories/text-input.mdx
@@ -33,6 +33,9 @@ Text input allows users to enter a single line of text into a form.
### With icon as adornment
+### With text as adornment
+
+
## Properties
diff --git a/packages/storybook/stories/text-input.stories.tsx b/packages/storybook/stories/text-input.stories.tsx
index 75e0e85707..d40d53397e 100644
--- a/packages/storybook/stories/text-input.stories.tsx
+++ b/packages/storybook/stories/text-input.stories.tsx
@@ -7,12 +7,8 @@ const TextInputMeta: Meta = {
component: TextInput,
args: {
type: 'text',
- adornment: '%',
},
argTypes: {
- adornment: {
- control: { disable: true },
- },
onBlur: {
control: { disable: true },
},
@@ -54,7 +50,17 @@ export const IconAsAdornment: Story = {
args: {
label: 'First Name',
validationErrorMessage: 'Error message',
- adornment: ,
+ leftAdornment: ,
+ hint: 'Hint',
+ },
+};
+
+export const TextAsAdornment: Story = {
+ ...TextInputMeta,
+ args: {
+ label: 'First Name',
+ validationErrorMessage: 'Error message',
+ rightAdornment: '%',
hint: 'Hint',
},
};
From 2de3dc2b4e43e4048b6287aa02741a87bba666cf Mon Sep 17 00:00:00 2001
From: Williams Tardif <32278060+WilliamsTardif@users.noreply.github.com>
Date: Mon, 5 Aug 2024 15:07:25 -0400
Subject: [PATCH 6/9] fix(PasswordInput): fix snapshot tests
---
.../components/password-input/password-input.test.tsx.snap | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/packages/react/src/components/password-input/password-input.test.tsx.snap b/packages/react/src/components/password-input/password-input.test.tsx.snap
index 51e243f824..4bb59d9ce1 100644
--- a/packages/react/src/components/password-input/password-input.test.tsx.snap
+++ b/packages/react/src/components/password-input/password-input.test.tsx.snap
@@ -85,7 +85,7 @@ exports[`PasswordInput matches the snapshot (Disabled) 1`] = `
color: #000000;
}
-.c6:disabled {
+.c6[aria-disabled='true'] {
background-color: transparent;
border-color: transparent;
color: #B7BBC2;
@@ -510,7 +510,7 @@ exports[`PasswordInput matches the snapshot (Invalid) 1`] = `
color: #000000;
}
-.c8:disabled {
+.c8[aria-disabled='true'] {
background-color: transparent;
border-color: transparent;
color: #B7BBC2;
@@ -975,7 +975,7 @@ exports[`PasswordInput matches the snapshot (Normal) 1`] = `
color: #000000;
}
-.c6:disabled {
+.c6[aria-disabled='true'] {
background-color: transparent;
border-color: transparent;
color: #B7BBC2;
From 977787b81f9241e7aac607239eeb67e738c9764f Mon Sep 17 00:00:00 2001
From: Williams Tardif <32278060+WilliamsTardif@users.noreply.github.com>
Date: Fri, 6 Sep 2024 13:53:24 -0400
Subject: [PATCH 7/9] fix(TextInput): fix bug and rename token
---
.../src/components/text-input/text-input.tsx | 60 +++++++++++--------
.../tokens/component/text-input-tokens.ts | 4 +-
packages/storybook/stories/text-input.mdx | 2 +-
3 files changed, 37 insertions(+), 29 deletions(-)
diff --git a/packages/react/src/components/text-input/text-input.tsx b/packages/react/src/components/text-input/text-input.tsx
index cdf293b65a..4fd0e5e5ab 100644
--- a/packages/react/src/components/text-input/text-input.tsx
+++ b/packages/react/src/components/text-input/text-input.tsx
@@ -13,7 +13,6 @@ import {
useCallback,
useEffect,
useImperativeHandle,
- useMemo,
useRef,
useState,
} from 'react';
@@ -41,24 +40,28 @@ const StyleInput = styled.input<{ isMobile: boolean }>`
`;
interface AdornmentProps {
- isMobile: boolean;
- hasLeftAdornment: boolean;
- hasRightAdornment: boolean;
+ $isMobile: boolean;
}
const Adornment = styled.span`
align-self: center;
- color: ${({ theme }) => (theme.component['text-input-adornment-text-color'])};
+ color: ${({ theme }) => theme.component['text-input-adornment-color']};
display: flex;
- padding-left: ${({ hasLeftAdornment }) => (hasLeftAdornment ? 'var(--spacing-1x)' : undefined)};
- padding-right: ${({ hasRightAdornment }) => (hasRightAdornment ? 'var(--spacing-1x)' : undefined)};
+ flex-shrink: 0;
> svg {
- height: ${({ isMobile }) => (isMobile ? '24px' : '16px')};
- width: ${({ isMobile }) => (isMobile ? '24px' : '16px')};
+ height: ${({ $isMobile }) => ($isMobile ? '24px' : '16px')};
+ width: ${({ $isMobile }) => ($isMobile ? '24px' : '16px')};
}
`;
+const LeftAdornment = styled(Adornment)`
+ padding-left: var(--spacing-1x);
+`;
+const RightAdornment = styled(Adornment)`
+ padding-right: var(--spacing-1x);
+`;
+
interface StyledWrapperProps {
$disabled?: boolean;
$valid?: boolean;
@@ -91,8 +94,6 @@ type PartialInputProps = Pick;
interface TextInputProps extends PartialInputProps {
- leftAdornment?: ReactNode;
- rightAdornment?: ReactNode;
ariaDescribedBy?: string;
ariaInvalid?: boolean;
className?: string;
@@ -102,10 +103,12 @@ interface TextInputProps extends PartialInputProps {
noMargin?: boolean;
id?: string;
label?: string;
+ leftAdornment?: ReactNode;
tooltip?: TooltipProps;
pattern?: string;
placeholder?: string;
required?: boolean;
+ rightAdornment?: ReactNode;
type?: string;
valid?: boolean;
validationErrorMessage?: string;
@@ -125,8 +128,6 @@ interface TextInputProps extends PartialInputProps {
}
export const TextInput = forwardRef(({
- leftAdornment,
- rightAdornment,
ariaDescribedBy,
ariaInvalid,
className,
@@ -136,12 +137,14 @@ export const TextInput = forwardRef(({
id: providedId,
inputMode,
label,
+ leftAdornment,
tooltip,
name,
noMargin,
pattern,
placeholder,
required,
+ rightAdornment,
type,
valid,
validationErrorMessage,
@@ -201,17 +204,6 @@ export const TextInput = forwardRef(({
inputRef.current?.focus();
};
- const adornmentContent = useMemo(() => (
-
- {leftAdornment || rightAdornment}
-
- ), [leftAdornment, rightAdornment, isMobile]);
-
useEffect(() => {
if (valid !== undefined) {
setValidity({ validity: valid });
@@ -232,7 +224,15 @@ export const TextInput = forwardRef(({
data-testid="field-container"
>
- {leftAdornment && adornmentContent}
+ {leftAdornment && (
+
+ {leftAdornment}
+
+ )}
+
- {rightAdornment && adornmentContent}
+ {rightAdornment && (
+
+ {rightAdornment}
+
+ )}
+
);
diff --git a/packages/react/src/themes/tokens/component/text-input-tokens.ts b/packages/react/src/themes/tokens/component/text-input-tokens.ts
index 75bcd1a349..e1e4d6b8c3 100644
--- a/packages/react/src/themes/tokens/component/text-input-tokens.ts
+++ b/packages/react/src/themes/tokens/component/text-input-tokens.ts
@@ -12,7 +12,7 @@ export type TextInputTokens =
| 'text-input-disabled-text-color'
| 'text-input-placeholder-disabled-text-color'
| 'text-input-disabled-adornment-text-color'
- | 'text-input-adornment-text-color';
+ | 'text-input-adornment-color';
export type TextInputTokenValue = AliasTokens | RefTokens;
@@ -37,5 +37,5 @@ export const defaultTextInputTokens: TextInputTokenMap = {
'text-input-disabled-adornment-text-color': 'color-control-auxiliary-disabled',
- 'text-input-adornment-text-color': 'color-control-auxiliary',
+ 'text-input-adornment-color': 'color-control-auxiliary',
};
diff --git a/packages/storybook/stories/text-input.mdx b/packages/storybook/stories/text-input.mdx
index e856924552..6852ef5801 100644
--- a/packages/storybook/stories/text-input.mdx
+++ b/packages/storybook/stories/text-input.mdx
@@ -11,7 +11,7 @@ import * as TextInputStories from './text-input.stories';
4. [Properties](#properties)
## Definition
-Text input allows users to enter a single line of text into a form.
+- Text input allows users to enter a single line of text into a form.
## Usage
From 2a69c54cfb63820c5afb7b75b09d76f7b4f3bfcf Mon Sep 17 00:00:00 2001
From: Williams Tardif <32278060+WilliamsTardif@users.noreply.github.com>
Date: Fri, 6 Sep 2024 14:08:29 -0400
Subject: [PATCH 8/9] fix(TextInput, PasswordInput): fix snapshot
---
.../password-input.test.tsx.snap | 3 +
.../text-input/text-input.test.tsx.snap | 141 ++++++++++--------
2 files changed, 84 insertions(+), 60 deletions(-)
diff --git a/packages/react/src/components/password-input/password-input.test.tsx.snap b/packages/react/src/components/password-input/password-input.test.tsx.snap
index 4bb59d9ce1..54a5d585de 100644
--- a/packages/react/src/components/password-input/password-input.test.tsx.snap
+++ b/packages/react/src/components/password-input/password-input.test.tsx.snap
@@ -89,6 +89,7 @@ exports[`PasswordInput matches the snapshot (Disabled) 1`] = `
background-color: transparent;
border-color: transparent;
color: #B7BBC2;
+ cursor: not-allowed;
}
.c6 > svg {
@@ -514,6 +515,7 @@ exports[`PasswordInput matches the snapshot (Invalid) 1`] = `
background-color: transparent;
border-color: transparent;
color: #B7BBC2;
+ cursor: not-allowed;
}
.c8 > svg {
@@ -979,6 +981,7 @@ exports[`PasswordInput matches the snapshot (Normal) 1`] = `
background-color: transparent;
border-color: transparent;
color: #B7BBC2;
+ cursor: not-allowed;
}
.c6 > svg {
diff --git a/packages/react/src/components/text-input/text-input.test.tsx.snap b/packages/react/src/components/text-input/text-input.test.tsx.snap
index 3608e1df55..56cf4e0e81 100644
--- a/packages/react/src/components/text-input/text-input.test.tsx.snap
+++ b/packages/react/src/components/text-input/text-input.test.tsx.snap
@@ -513,7 +513,7 @@ input + .c1 {
margin-bottom: var(--spacing-half);
}
-.c5 {
+.c6 {
background: #FFFFFF;
border: 1px solid #60666E;
border-radius: var(--border-radius);
@@ -538,50 +538,50 @@ input + .c1 {
min-height: 100%;
}
-.c5::-webkit-input-placeholder {
+.c6::-webkit-input-placeholder {
color: #60666E;
}
-.c5::-moz-placeholder {
+.c6::-moz-placeholder {
color: #60666E;
}
-.c5:-ms-input-placeholder {
+.c6:-ms-input-placeholder {
color: #60666E;
}
-.c5::placeholder {
+.c6::placeholder {
color: #60666E;
}
-.c5:disabled {
+.c6:disabled {
background-color: #F1F2F2;
border-color: #B7BBC2;
color: #B7BBC2;
}
-.c5:disabled,
-.c5:disabled::-webkit-input-placeholder {
+.c6:disabled,
+.c6:disabled::-webkit-input-placeholder {
color: #B7BBC2;
}
-.c5:disabled,
-.c5:disabled::-moz-placeholder {
+.c6:disabled,
+.c6:disabled::-moz-placeholder {
color: #B7BBC2;
}
-.c5:disabled,
-.c5:disabled:-ms-input-placeholder {
+.c6:disabled,
+.c6:disabled:-ms-input-placeholder {
color: #B7BBC2;
}
-.c5:disabled,
-.c5:disabled::placeholder {
+.c6:disabled,
+.c6:disabled::placeholder {
color: #B7BBC2;
}
-.c5:focus,
-.c5:disabled {
+.c6:focus,
+.c6:disabled {
border: 0;
box-shadow: none;
}
@@ -595,7 +595,9 @@ input + .c1 {
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
- padding-left: var(--spacing-1x);
+ -webkit-flex-shrink: 0;
+ -ms-flex-negative: 0;
+ flex-shrink: 0;
}
.c4 > svg {
@@ -603,6 +605,10 @@ input + .c1 {
width: 16px;
}
+.c5 {
+ padding-left: var(--spacing-1x);
+}
+
.c3 {
background: #FFFFFF;
border: 1px solid #60666E;
@@ -641,7 +647,7 @@ input + .c1 {
class="c3"
>
svg {
@@ -788,6 +796,10 @@ input + .c1 {
width: 16px;
}
+.c5 {
+ padding-left: var(--spacing-1x);
+}
+
.c3 {
background: #FFFFFF;
border: 1px solid #60666E;
@@ -826,12 +838,12 @@ input + .c1 {
class="c3"
>
#
svg {
@@ -969,6 +982,14 @@ input + .c1 {
width: 16px;
}
+.c5 {
+ padding-left: var(--spacing-1x);
+}
+
+.c7 {
+ padding-right: var(--spacing-1x);
+}
+
.c3 {
background: #FFFFFF;
border: 1px solid #60666E;
@@ -1007,12 +1028,12 @@ input + .c1 {
class="c3"
>
#
- #
+ end
From 6db6cef5a6e605db12c66c4e3236c8ac8119f9a0 Mon Sep 17 00:00:00 2001
From: Williams Tardif <32278060+WilliamsTardif@users.noreply.github.com>
Date: Wed, 25 Sep 2024 16:39:15 -0400
Subject: [PATCH 9/9] fix(passwordInput): fix snapshot
---
.../src/components/password-input/password-input.test.tsx.snap | 3 ---
1 file changed, 3 deletions(-)
diff --git a/packages/react/src/components/password-input/password-input.test.tsx.snap b/packages/react/src/components/password-input/password-input.test.tsx.snap
index 54a5d585de..69c406502f 100644
--- a/packages/react/src/components/password-input/password-input.test.tsx.snap
+++ b/packages/react/src/components/password-input/password-input.test.tsx.snap
@@ -53,7 +53,6 @@ exports[`PasswordInput matches the snapshot (Disabled) 1`] = `
}
.c5 > svg {
- color: inherit;
height: var(--size-1x);
width: var(--size-1x);
}
@@ -479,7 +478,6 @@ exports[`PasswordInput matches the snapshot (Invalid) 1`] = `
}
.c7 > svg {
- color: inherit;
height: var(--size-1x);
width: var(--size-1x);
}
@@ -945,7 +943,6 @@ exports[`PasswordInput matches the snapshot (Normal) 1`] = `
}
.c5 > svg {
- color: inherit;
height: var(--size-1x);
width: var(--size-1x);
}