@os-design/core 1.0.259 → 1.0.260
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/InputPassword/index.tsx"],"names":[],"mappings":"AAOA,OAAc,EAAE,KAAK,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE3D,OAAsB,EACpB,KAAK,mBAAmB,EACzB,MAAM,0BAA0B,CAAC;AAElC,MAAM,WAAW,kBAAmB,SAAQ,IAAI,CAAC,UAAU,EAAE,MAAM,CAAC;IAClE;;;OAGG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B;;;;OAIG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,GAAG,MAAM,GAAG,QAAQ,GAAG,UAAU,EAAE,MAAM,CAAC,CAAC;IACxE;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IAC9C;;;OAGG;IACH,MAAM,CAAC,EAAE,mBAAmB,CAAC;IAC7B;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;OAGG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACpC;AAWD;;GAEG;AACH,QAAA,MAAM,aAAa,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/InputPassword/index.tsx"],"names":[],"mappings":"AAOA,OAAc,EAAE,KAAK,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE3D,OAAsB,EACpB,KAAK,mBAAmB,EACzB,MAAM,0BAA0B,CAAC;AAElC,MAAM,WAAW,kBAAmB,SAAQ,IAAI,CAAC,UAAU,EAAE,MAAM,CAAC;IAClE;;;OAGG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B;;;;OAIG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,GAAG,MAAM,GAAG,QAAQ,GAAG,UAAU,EAAE,MAAM,CAAC,CAAC;IACxE;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IAC9C;;;OAGG;IACH,MAAM,CAAC,EAAE,mBAAmB,CAAC;IAC7B;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;OAGG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACpC;AAWD;;GAEG;AACH,QAAA,MAAM,aAAa,iHAiIlB,CAAC;AAIF,eAAe,aAAa,CAAC"}
|
|
@@ -2,7 +2,7 @@ import styled from '@emotion/styled';
|
|
|
2
2
|
import { Eye, EyeInvisible } from '@os-design/icons';
|
|
3
3
|
import { ThemeOverrider, useTheme } from '@os-design/theming';
|
|
4
4
|
import { useForwardedRef, useForwardedState } from '@os-design/utils';
|
|
5
|
-
|
|
5
|
+
import { getPasswordScore } from '@os-design/input-password-utils';
|
|
6
6
|
import { forwardRef, useEffect, useMemo, useState } from 'react';
|
|
7
7
|
import Button from '../Button/index.js';
|
|
8
8
|
import Input from '../Input/index.js';
|
|
@@ -49,9 +49,7 @@ const InputPassword = /*#__PURE__*/forwardRef(({
|
|
|
49
49
|
if (!inputRef.current) return;
|
|
50
50
|
inputRef.current.setSelectionRange(selection.start, selection.end);
|
|
51
51
|
}, [inputRef, selection, invisible]);
|
|
52
|
-
const score = useMemo(() =>
|
|
53
|
-
// () => getPasswordScore(forwardedValue || ''),
|
|
54
|
-
[forwardedValue]);
|
|
52
|
+
const score = useMemo(() => getPasswordScore(forwardedValue || ''), [forwardedValue]);
|
|
55
53
|
const strength = useMemo(() => {
|
|
56
54
|
if (score >= strengthThresholds[2]) {
|
|
57
55
|
return {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@os-design/core",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.260",
|
|
4
4
|
"license": "UNLICENSED",
|
|
5
5
|
"repository": "git@gitlab.com:os-team/libs/os-design.git",
|
|
6
6
|
"type": "module",
|
|
@@ -32,6 +32,7 @@
|
|
|
32
32
|
"@os-design/date-picker-utils": "^1.0.27",
|
|
33
33
|
"@os-design/icons": "^1.0.63",
|
|
34
34
|
"@os-design/input-number-utils": "^1.0.33",
|
|
35
|
+
"@os-design/input-password-utils": "^1.0.0",
|
|
35
36
|
"@os-design/media": "^1.0.29",
|
|
36
37
|
"@os-design/menu-utils": "^1.0.24",
|
|
37
38
|
"@os-design/portal": "^1.0.21",
|
|
@@ -57,5 +58,5 @@
|
|
|
57
58
|
"react": ">=18",
|
|
58
59
|
"react-dom": ">=18"
|
|
59
60
|
},
|
|
60
|
-
"gitHead": "
|
|
61
|
+
"gitHead": "73a0cea6ed693ca28f40da565cb48c3f5e291a4a"
|
|
61
62
|
}
|
|
@@ -2,7 +2,7 @@ import styled from '@emotion/styled';
|
|
|
2
2
|
import { Eye, EyeInvisible } from '@os-design/icons';
|
|
3
3
|
import { ThemeOverrider, useTheme } from '@os-design/theming';
|
|
4
4
|
import { useForwardedRef, useForwardedState } from '@os-design/utils';
|
|
5
|
-
|
|
5
|
+
import { getPasswordScore } from '@os-design/input-password-utils';
|
|
6
6
|
import { forwardRef, useEffect, useMemo, useState } from 'react';
|
|
7
7
|
import Button from '../Button/index.js';
|
|
8
8
|
import Input, { type InputProps } from '../Input/index.js';
|
|
@@ -97,8 +97,7 @@ const InputPassword = forwardRef<HTMLInputElement, InputPasswordProps>(
|
|
|
97
97
|
}, [inputRef, selection, invisible]);
|
|
98
98
|
|
|
99
99
|
const score = useMemo(
|
|
100
|
-
() =>
|
|
101
|
-
// () => getPasswordScore(forwardedValue || ''),
|
|
100
|
+
() => getPasswordScore(forwardedValue || ''),
|
|
102
101
|
[forwardedValue]
|
|
103
102
|
);
|
|
104
103
|
|