@graphcommerce/ecommerce-ui 6.2.0-canary.44 → 6.2.0-canary.46
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @graphcommerce/ecommerce-ui
|
|
2
2
|
|
|
3
|
+
## 6.2.0-canary.46
|
|
4
|
+
|
|
5
|
+
## 6.2.0-canary.45
|
|
6
|
+
|
|
7
|
+
### Minor Changes
|
|
8
|
+
|
|
9
|
+
- [#1962](https://github.com/graphcommerce-org/graphcommerce/pull/1962) [`518b6ca24`](https://github.com/graphcommerce-org/graphcommerce/commit/518b6ca248fc94624dc06eb02de5b3eac0fc9483) - Created a new `<ValidatedPasswordElement/>` which validates according to Magento's validation groups and implement on all locations. Move remaining password fields to `<PasswordElement />` ([@carlocarels90](https://github.com/carlocarels90))
|
|
10
|
+
|
|
3
11
|
## 6.2.0-canary.44
|
|
4
12
|
|
|
5
13
|
## 6.2.0-canary.43
|
|
@@ -8,17 +8,21 @@ export type PasswordElementProps<T extends FieldValues> = TextFieldElementProps<
|
|
|
8
8
|
iconColor?: IconButtonProps['color']
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
export function PasswordElement<TFieldValues extends FieldValues>(
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
11
|
+
export function PasswordElement<TFieldValues extends FieldValues>(
|
|
12
|
+
props: PasswordElementProps<TFieldValues>,
|
|
13
|
+
): JSX.Element {
|
|
14
|
+
const { iconColor, ...textFieldProps } = props
|
|
15
15
|
const [password, setPassword] = useState<boolean>(true)
|
|
16
16
|
return (
|
|
17
17
|
<TextFieldElement
|
|
18
|
-
{...
|
|
18
|
+
{...textFieldProps}
|
|
19
19
|
InputProps={{
|
|
20
|
+
...textFieldProps.InputProps,
|
|
20
21
|
endAdornment: (
|
|
21
|
-
<InputAdornment
|
|
22
|
+
<InputAdornment
|
|
23
|
+
position='end'
|
|
24
|
+
sx={(theme) => ({ display: 'flex', columnGap: theme.spacings.xxs })}
|
|
25
|
+
>
|
|
22
26
|
<IconButton
|
|
23
27
|
onMouseDown={(e: MouseEvent<HTMLButtonElement>) => e.preventDefault()}
|
|
24
28
|
onClick={() => setPassword(!password)}
|
|
@@ -27,6 +31,7 @@ export function PasswordElement<TFieldValues extends FieldValues>({
|
|
|
27
31
|
>
|
|
28
32
|
<IconSvg src={password ? iconEyeCrossed : iconEye} size='medium' />
|
|
29
33
|
</IconButton>
|
|
34
|
+
{textFieldProps.InputProps?.endAdornment}
|
|
30
35
|
</InputAdornment>
|
|
31
36
|
),
|
|
32
37
|
}}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@graphcommerce/ecommerce-ui",
|
|
3
3
|
"homepage": "https://www.graphcommerce.org/",
|
|
4
4
|
"repository": "github:graphcommerce-org/graphcommerce",
|
|
5
|
-
"version": "6.2.0-canary.
|
|
5
|
+
"version": "6.2.0-canary.46",
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"prettier": "@graphcommerce/prettier-config-pwa",
|
|
8
8
|
"eslintConfig": {
|
|
@@ -12,14 +12,14 @@
|
|
|
12
12
|
}
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@graphcommerce/graphql": "6.2.0-canary.
|
|
16
|
-
"@graphcommerce/next-ui": "6.2.0-canary.
|
|
17
|
-
"@graphcommerce/react-hook-form": "6.2.0-canary.
|
|
15
|
+
"@graphcommerce/graphql": "6.2.0-canary.46",
|
|
16
|
+
"@graphcommerce/next-ui": "6.2.0-canary.46",
|
|
17
|
+
"@graphcommerce/react-hook-form": "6.2.0-canary.46"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
|
-
"@graphcommerce/eslint-config-pwa": "6.2.0-canary.
|
|
21
|
-
"@graphcommerce/prettier-config-pwa": "6.2.0-canary.
|
|
22
|
-
"@graphcommerce/typescript-config-pwa": "6.2.0-canary.
|
|
20
|
+
"@graphcommerce/eslint-config-pwa": "6.2.0-canary.46",
|
|
21
|
+
"@graphcommerce/prettier-config-pwa": "6.2.0-canary.46",
|
|
22
|
+
"@graphcommerce/typescript-config-pwa": "6.2.0-canary.46"
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|
|
25
25
|
"@lingui/react": "^4.2.1",
|