@alfalab/core-components-password-input 3.0.10 → 4.0.1
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/component.d.ts +3 -3
- package/component.js +3 -3
- package/cssm/component.d.ts +3 -3
- package/cssm/component.js +2 -2
- package/cssm/index.js +1 -1
- package/esm/component.d.ts +3 -3
- package/esm/component.js +3 -3
- package/esm/index.css +5 -5
- package/esm/index.js +1 -1
- package/index.css +5 -5
- package/index.js +1 -1
- package/modern/component.d.ts +3 -3
- package/modern/component.js +4 -4
- package/modern/index.css +5 -5
- package/modern/index.js +1 -1
- package/package.json +3 -3
package/component.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ type PasswordInputProps = InputProps & {
|
|
|
11
11
|
*/
|
|
12
12
|
onPasswordVisibleChange?: (visible: boolean) => void;
|
|
13
13
|
};
|
|
14
|
-
declare const PasswordInput: React.ForwardRefExoticComponent<
|
|
14
|
+
declare const PasswordInput: React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "size" | "type" | "defaultValue" | "onChange" | "onClick" | "onMouseDown" | "value" | "enterKeyHint"> & {
|
|
15
15
|
value?: string | undefined;
|
|
16
16
|
defaultValue?: string | undefined;
|
|
17
17
|
block?: boolean | undefined;
|
|
@@ -23,8 +23,8 @@ declare const PasswordInput: React.ForwardRefExoticComponent<Pick<React.InputHTM
|
|
|
23
23
|
hint?: React.ReactNode;
|
|
24
24
|
label?: React.ReactNode;
|
|
25
25
|
labelView?: "inner" | "outer" | undefined;
|
|
26
|
-
type?: "number" | "text" | "tel" | "email" | "
|
|
27
|
-
wrapperRef?:
|
|
26
|
+
type?: "number" | "text" | "tel" | "email" | "password" | "card" | "money" | undefined;
|
|
27
|
+
wrapperRef?: React.Ref<HTMLDivElement> | undefined;
|
|
28
28
|
leftAddons?: React.ReactNode;
|
|
29
29
|
rightAddons?: React.ReactNode;
|
|
30
30
|
bottomAddons?: React.ReactNode;
|
package/component.js
CHANGED
|
@@ -4,8 +4,8 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var React = require('react');
|
|
6
6
|
var cn = require('classnames');
|
|
7
|
-
var coreComponentsInput = require('@alfalab/core-components-input');
|
|
8
7
|
var coreComponentsIconButton = require('@alfalab/core-components-icon-button');
|
|
8
|
+
var coreComponentsInput = require('@alfalab/core-components-input');
|
|
9
9
|
var EyeMIcon = require('@alfalab/icons-glyph/EyeMIcon');
|
|
10
10
|
var EyeOffMIcon = require('@alfalab/icons-glyph/EyeOffMIcon');
|
|
11
11
|
|
|
@@ -14,7 +14,7 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
14
14
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
15
15
|
var cn__default = /*#__PURE__*/_interopDefaultLegacy(cn);
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
/******************************************************************************
|
|
18
18
|
Copyright (c) Microsoft Corporation.
|
|
19
19
|
|
|
20
20
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
@@ -53,7 +53,7 @@ function __rest(s, e) {
|
|
|
53
53
|
return t;
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
-
var styles = {"eye":"password-
|
|
56
|
+
var styles = {"eye":"password-input__eye_vhrqt","xl":"password-input__xl_vhrqt","input":"password-input__input_vhrqt"};
|
|
57
57
|
require('./index.css')
|
|
58
58
|
|
|
59
59
|
var PasswordInput = React.forwardRef(function (_a, ref) {
|
package/cssm/component.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ type PasswordInputProps = InputProps & {
|
|
|
11
11
|
*/
|
|
12
12
|
onPasswordVisibleChange?: (visible: boolean) => void;
|
|
13
13
|
};
|
|
14
|
-
declare const PasswordInput: React.ForwardRefExoticComponent<
|
|
14
|
+
declare const PasswordInput: React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "size" | "type" | "defaultValue" | "onChange" | "onClick" | "onMouseDown" | "value" | "enterKeyHint"> & {
|
|
15
15
|
value?: string | undefined;
|
|
16
16
|
defaultValue?: string | undefined;
|
|
17
17
|
block?: boolean | undefined;
|
|
@@ -23,8 +23,8 @@ declare const PasswordInput: React.ForwardRefExoticComponent<Pick<React.InputHTM
|
|
|
23
23
|
hint?: React.ReactNode;
|
|
24
24
|
label?: React.ReactNode;
|
|
25
25
|
labelView?: "inner" | "outer" | undefined;
|
|
26
|
-
type?: "number" | "text" | "tel" | "email" | "
|
|
27
|
-
wrapperRef?:
|
|
26
|
+
type?: "number" | "text" | "tel" | "email" | "password" | "card" | "money" | undefined;
|
|
27
|
+
wrapperRef?: React.Ref<HTMLDivElement> | undefined;
|
|
28
28
|
leftAddons?: React.ReactNode;
|
|
29
29
|
rightAddons?: React.ReactNode;
|
|
30
30
|
bottomAddons?: React.ReactNode;
|
package/cssm/component.js
CHANGED
|
@@ -4,8 +4,8 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var React = require('react');
|
|
6
6
|
var cn = require('classnames');
|
|
7
|
-
var coreComponentsInput = require('@alfalab/core-components-input/cssm');
|
|
8
7
|
var coreComponentsIconButton = require('@alfalab/core-components-icon-button/cssm');
|
|
8
|
+
var coreComponentsInput = require('@alfalab/core-components-input/cssm');
|
|
9
9
|
var EyeMIcon = require('@alfalab/icons-glyph/EyeMIcon');
|
|
10
10
|
var EyeOffMIcon = require('@alfalab/icons-glyph/EyeOffMIcon');
|
|
11
11
|
var styles = require('./index.module.css');
|
|
@@ -16,7 +16,7 @@ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
|
16
16
|
var cn__default = /*#__PURE__*/_interopDefaultLegacy(cn);
|
|
17
17
|
var styles__default = /*#__PURE__*/_interopDefaultLegacy(styles);
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
/******************************************************************************
|
|
20
20
|
Copyright (c) Microsoft Corporation.
|
|
21
21
|
|
|
22
22
|
Permission to use, copy, modify, and/or distribute this software for any
|
package/cssm/index.js
CHANGED
|
@@ -5,8 +5,8 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var component = require('./component.js');
|
|
6
6
|
require('react');
|
|
7
7
|
require('classnames');
|
|
8
|
-
require('@alfalab/core-components-input/cssm');
|
|
9
8
|
require('@alfalab/core-components-icon-button/cssm');
|
|
9
|
+
require('@alfalab/core-components-input/cssm');
|
|
10
10
|
require('@alfalab/icons-glyph/EyeMIcon');
|
|
11
11
|
require('@alfalab/icons-glyph/EyeOffMIcon');
|
|
12
12
|
require('./index.module.css');
|
package/esm/component.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ type PasswordInputProps = InputProps & {
|
|
|
11
11
|
*/
|
|
12
12
|
onPasswordVisibleChange?: (visible: boolean) => void;
|
|
13
13
|
};
|
|
14
|
-
declare const PasswordInput: React.ForwardRefExoticComponent<
|
|
14
|
+
declare const PasswordInput: React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "size" | "type" | "defaultValue" | "onChange" | "onClick" | "onMouseDown" | "value" | "enterKeyHint"> & {
|
|
15
15
|
value?: string | undefined;
|
|
16
16
|
defaultValue?: string | undefined;
|
|
17
17
|
block?: boolean | undefined;
|
|
@@ -23,8 +23,8 @@ declare const PasswordInput: React.ForwardRefExoticComponent<Pick<React.InputHTM
|
|
|
23
23
|
hint?: React.ReactNode;
|
|
24
24
|
label?: React.ReactNode;
|
|
25
25
|
labelView?: "inner" | "outer" | undefined;
|
|
26
|
-
type?: "number" | "text" | "tel" | "email" | "
|
|
27
|
-
wrapperRef?:
|
|
26
|
+
type?: "number" | "text" | "tel" | "email" | "password" | "card" | "money" | undefined;
|
|
27
|
+
wrapperRef?: React.Ref<HTMLDivElement> | undefined;
|
|
28
28
|
leftAddons?: React.ReactNode;
|
|
29
29
|
rightAddons?: React.ReactNode;
|
|
30
30
|
bottomAddons?: React.ReactNode;
|
package/esm/component.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React, { forwardRef, useState, useCallback } from 'react';
|
|
2
2
|
import cn from 'classnames';
|
|
3
|
-
import { Input } from '@alfalab/core-components-input/esm';
|
|
4
3
|
import { IconButton } from '@alfalab/core-components-icon-button/esm';
|
|
4
|
+
import { Input } from '@alfalab/core-components-input/esm';
|
|
5
5
|
import { EyeMIcon } from '@alfalab/icons-glyph/EyeMIcon';
|
|
6
6
|
import { EyeOffMIcon } from '@alfalab/icons-glyph/EyeOffMIcon';
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
/******************************************************************************
|
|
9
9
|
Copyright (c) Microsoft Corporation.
|
|
10
10
|
|
|
11
11
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
@@ -44,7 +44,7 @@ function __rest(s, e) {
|
|
|
44
44
|
return t;
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
-
var styles = {"eye":"password-
|
|
47
|
+
var styles = {"eye":"password-input__eye_vhrqt","xl":"password-input__xl_vhrqt","input":"password-input__input_vhrqt"};
|
|
48
48
|
require('./index.css')
|
|
49
49
|
|
|
50
50
|
var PasswordInput = forwardRef(function (_a, ref) {
|
package/esm/index.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: e4gbo */
|
|
2
2
|
:root {
|
|
3
3
|
|
|
4
4
|
/* Hard */
|
|
@@ -12,15 +12,15 @@
|
|
|
12
12
|
--gap-s-neg: -12px;
|
|
13
13
|
--gap-m-neg: -16px;
|
|
14
14
|
}
|
|
15
|
-
.password-
|
|
15
|
+
.password-input__eye_vhrqt:last-child {
|
|
16
16
|
margin-right: var(--gap-s-neg);
|
|
17
17
|
}
|
|
18
|
-
.password-
|
|
18
|
+
.password-input__xl_vhrqt .password-input__eye_vhrqt:last-child {
|
|
19
19
|
margin-right: var(--gap-m-neg);
|
|
20
20
|
}
|
|
21
|
-
.password-
|
|
21
|
+
.password-input__xl_vhrqt .password-input__eye_vhrqt {
|
|
22
22
|
margin-left: var(--gap-2xs);
|
|
23
23
|
}
|
|
24
|
-
.password-
|
|
24
|
+
.password-input__input_vhrqt::-ms-reveal {
|
|
25
25
|
display: none;
|
|
26
26
|
}
|
package/esm/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { PasswordInput } from './component.js';
|
|
2
2
|
import 'react';
|
|
3
3
|
import 'classnames';
|
|
4
|
-
import '@alfalab/core-components-input/esm';
|
|
5
4
|
import '@alfalab/core-components-icon-button/esm';
|
|
5
|
+
import '@alfalab/core-components-input/esm';
|
|
6
6
|
import '@alfalab/icons-glyph/EyeMIcon';
|
|
7
7
|
import '@alfalab/icons-glyph/EyeOffMIcon';
|
package/index.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: e4gbo */
|
|
2
2
|
:root {
|
|
3
3
|
|
|
4
4
|
/* Hard */
|
|
@@ -12,15 +12,15 @@
|
|
|
12
12
|
--gap-s-neg: -12px;
|
|
13
13
|
--gap-m-neg: -16px;
|
|
14
14
|
}
|
|
15
|
-
.password-
|
|
15
|
+
.password-input__eye_vhrqt:last-child {
|
|
16
16
|
margin-right: var(--gap-s-neg);
|
|
17
17
|
}
|
|
18
|
-
.password-
|
|
18
|
+
.password-input__xl_vhrqt .password-input__eye_vhrqt:last-child {
|
|
19
19
|
margin-right: var(--gap-m-neg);
|
|
20
20
|
}
|
|
21
|
-
.password-
|
|
21
|
+
.password-input__xl_vhrqt .password-input__eye_vhrqt {
|
|
22
22
|
margin-left: var(--gap-2xs);
|
|
23
23
|
}
|
|
24
|
-
.password-
|
|
24
|
+
.password-input__input_vhrqt::-ms-reveal {
|
|
25
25
|
display: none;
|
|
26
26
|
}
|
package/index.js
CHANGED
|
@@ -5,8 +5,8 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var component = require('./component.js');
|
|
6
6
|
require('react');
|
|
7
7
|
require('classnames');
|
|
8
|
-
require('@alfalab/core-components-input');
|
|
9
8
|
require('@alfalab/core-components-icon-button');
|
|
9
|
+
require('@alfalab/core-components-input');
|
|
10
10
|
require('@alfalab/icons-glyph/EyeMIcon');
|
|
11
11
|
require('@alfalab/icons-glyph/EyeOffMIcon');
|
|
12
12
|
|
package/modern/component.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ type PasswordInputProps = InputProps & {
|
|
|
11
11
|
*/
|
|
12
12
|
onPasswordVisibleChange?: (visible: boolean) => void;
|
|
13
13
|
};
|
|
14
|
-
declare const PasswordInput: React.ForwardRefExoticComponent<
|
|
14
|
+
declare const PasswordInput: React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "size" | "type" | "defaultValue" | "onChange" | "onClick" | "onMouseDown" | "value" | "enterKeyHint"> & {
|
|
15
15
|
value?: string | undefined;
|
|
16
16
|
defaultValue?: string | undefined;
|
|
17
17
|
block?: boolean | undefined;
|
|
@@ -23,8 +23,8 @@ declare const PasswordInput: React.ForwardRefExoticComponent<Pick<React.InputHTM
|
|
|
23
23
|
hint?: React.ReactNode;
|
|
24
24
|
label?: React.ReactNode;
|
|
25
25
|
labelView?: "inner" | "outer" | undefined;
|
|
26
|
-
type?: "number" | "text" | "tel" | "email" | "
|
|
27
|
-
wrapperRef?:
|
|
26
|
+
type?: "number" | "text" | "tel" | "email" | "password" | "card" | "money" | undefined;
|
|
27
|
+
wrapperRef?: React.Ref<HTMLDivElement> | undefined;
|
|
28
28
|
leftAddons?: React.ReactNode;
|
|
29
29
|
rightAddons?: React.ReactNode;
|
|
30
30
|
bottomAddons?: React.ReactNode;
|
package/modern/component.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React, { forwardRef, useState, useCallback } from 'react';
|
|
2
2
|
import cn from 'classnames';
|
|
3
|
-
import { Input } from '@alfalab/core-components-input/modern';
|
|
4
3
|
import { IconButton } from '@alfalab/core-components-icon-button/modern';
|
|
4
|
+
import { Input } from '@alfalab/core-components-input/modern';
|
|
5
5
|
import { EyeMIcon } from '@alfalab/icons-glyph/EyeMIcon';
|
|
6
6
|
import { EyeOffMIcon } from '@alfalab/icons-glyph/EyeOffMIcon';
|
|
7
7
|
|
|
8
|
-
var styles = {"eye":"password-
|
|
8
|
+
var styles = {"eye":"password-input__eye_vhrqt","xl":"password-input__xl_vhrqt","input":"password-input__input_vhrqt"};
|
|
9
9
|
require('./index.css')
|
|
10
10
|
|
|
11
11
|
const PasswordInput = forwardRef(({ onPasswordVisibleChange, passwordVisible, disabled, colors, rightAddons, size = 's', className, ...restProps }, ref) => {
|
|
@@ -20,9 +20,9 @@ const PasswordInput = forwardRef(({ onPasswordVisibleChange, passwordVisible, di
|
|
|
20
20
|
}
|
|
21
21
|
}, [passwordVisible, uncontrolled, onPasswordVisibleChange]);
|
|
22
22
|
const isPasswordVisible = uncontrolled ? statePasswordVisible : passwordVisible;
|
|
23
|
-
return (React.createElement(Input,
|
|
23
|
+
return (React.createElement(Input, { ...restProps, disabled: disabled, type: isPasswordVisible ? 'text' : 'password', size: size, ref: ref, colors: colors, className: cn(className, styles[size]), rightAddons: React.createElement(React.Fragment, null,
|
|
24
24
|
rightAddons,
|
|
25
|
-
React.createElement(IconButton, { className: styles.eye, colors: colors, view: 'secondary', size: 's', icon: isPasswordVisible ? EyeMIcon : EyeOffMIcon, onClick: handleButtonClick, disabled: disabled })), addonsClassName: styles.addons, inputClassName: styles.input }))
|
|
25
|
+
React.createElement(IconButton, { className: styles.eye, colors: colors, view: 'secondary', size: 's', icon: isPasswordVisible ? EyeMIcon : EyeOffMIcon, onClick: handleButtonClick, disabled: disabled })), addonsClassName: styles.addons, inputClassName: styles.input }));
|
|
26
26
|
});
|
|
27
27
|
|
|
28
28
|
export { PasswordInput };
|
package/modern/index.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: e4gbo */
|
|
2
2
|
:root {
|
|
3
3
|
|
|
4
4
|
/* Hard */
|
|
@@ -12,15 +12,15 @@
|
|
|
12
12
|
--gap-s-neg: -12px;
|
|
13
13
|
--gap-m-neg: -16px;
|
|
14
14
|
}
|
|
15
|
-
.password-
|
|
15
|
+
.password-input__eye_vhrqt:last-child {
|
|
16
16
|
margin-right: var(--gap-s-neg);
|
|
17
17
|
}
|
|
18
|
-
.password-
|
|
18
|
+
.password-input__xl_vhrqt .password-input__eye_vhrqt:last-child {
|
|
19
19
|
margin-right: var(--gap-m-neg);
|
|
20
20
|
}
|
|
21
|
-
.password-
|
|
21
|
+
.password-input__xl_vhrqt .password-input__eye_vhrqt {
|
|
22
22
|
margin-left: var(--gap-2xs);
|
|
23
23
|
}
|
|
24
|
-
.password-
|
|
24
|
+
.password-input__input_vhrqt::-ms-reveal {
|
|
25
25
|
display: none;
|
|
26
26
|
}
|
package/modern/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import 'react';
|
|
2
2
|
import 'classnames';
|
|
3
|
-
import '@alfalab/core-components-input/modern';
|
|
4
3
|
import '@alfalab/core-components-icon-button/modern';
|
|
4
|
+
import '@alfalab/core-components-input/modern';
|
|
5
5
|
import '@alfalab/icons-glyph/EyeMIcon';
|
|
6
6
|
import '@alfalab/icons-glyph/EyeOffMIcon';
|
|
7
7
|
export { PasswordInput } from './component.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alfalab/core-components-password-input",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.1",
|
|
4
4
|
"description": "Input password",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"license": "MIT",
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
"react-dom": "^16.9.0 || ^17.0.1 || ^18.0.0"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@alfalab/core-components-icon-button": "^
|
|
19
|
-
"@alfalab/core-components-input": "^
|
|
18
|
+
"@alfalab/core-components-icon-button": "^6.0.0",
|
|
19
|
+
"@alfalab/core-components-input": "^11.0.1",
|
|
20
20
|
"@alfalab/icons-glyph": "^2.71.0",
|
|
21
21
|
"classnames": "^2.3.1"
|
|
22
22
|
}
|