@equisoft/design-elements-react 4.0.1-snapshot.20220413152148 → 4.0.1-snapshot.20220425150834
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/dist/bundle.js +124 -37
- package/dist/components/feedbacks/invalid-field.d.ts +2 -1
- package/dist/components/field-container/field-container.d.ts +6 -5
- package/dist/components/icon/icon.d.ts +3 -0
- package/dist/components/password-creation-input/password-creation-input.d.ts +14 -0
- package/dist/components/password-creation-input/password-rule.d.ts +8 -0
- package/dist/components/password-creation-input/password-strength-container.d.ts +8 -0
- package/dist/components/password-creation-input/password-strength-meter.d.ts +7 -0
- package/dist/components/password-creation-input/password-strength.d.ts +2 -0
- package/dist/components/password-creation-input/password-strength.enum.d.ts +7 -0
- package/dist/components/password-creation-input/password-strength.test.d.ts +1 -0
- package/dist/components/password-creation-input/validation-condition.d.ts +9 -0
- package/dist/components/password-creation-input/validation-condition.test.d.ts +1 -0
- package/dist/components/text-input/text-input.d.ts +2 -0
- package/dist/i18n/translations.d.ts +28 -0
- package/dist/index.d.ts +2 -0
- package/package.json +1 -1
|
@@ -2,6 +2,7 @@ import { ReactElement } from 'react';
|
|
|
2
2
|
interface InvalidFieldProps {
|
|
3
3
|
controlId: string;
|
|
4
4
|
feedbackMsg: string;
|
|
5
|
+
noIcon?: boolean;
|
|
5
6
|
}
|
|
6
|
-
declare function InvalidField({ controlId, feedbackMsg }: InvalidFieldProps): ReactElement;
|
|
7
|
+
declare function InvalidField({ controlId, feedbackMsg, noIcon }: InvalidFieldProps): ReactElement;
|
|
7
8
|
export { InvalidField };
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { ReactElement, ReactNode } from 'react';
|
|
2
2
|
import { TooltipProps } from '../tooltip/tooltip';
|
|
3
3
|
export interface FieldContainerProps {
|
|
4
|
-
className?: string;
|
|
5
4
|
children: ReactNode;
|
|
6
|
-
|
|
5
|
+
className?: string;
|
|
7
6
|
fieldId: string;
|
|
7
|
+
hint?: string;
|
|
8
8
|
label?: string;
|
|
9
|
+
noInvalidFieldIcon?: boolean;
|
|
10
|
+
noMargin?: boolean;
|
|
11
|
+
tooltip?: TooltipProps;
|
|
9
12
|
valid: boolean;
|
|
10
13
|
validationErrorMessage: string;
|
|
11
|
-
hint?: string;
|
|
12
|
-
tooltip?: TooltipProps;
|
|
13
14
|
}
|
|
14
|
-
export declare function FieldContainer({
|
|
15
|
+
export declare function FieldContainer({ children, className, fieldId, hint, label, noInvalidFieldIcon, noMargin, tooltip, valid, validationErrorMessage, ...props }: FieldContainerProps): ReactElement;
|
|
@@ -18,12 +18,14 @@ declare const iconMapping: {
|
|
|
18
18
|
readonly chevronUp: any;
|
|
19
19
|
readonly chevronsLeft: any;
|
|
20
20
|
readonly chevronsRight: any;
|
|
21
|
+
readonly circle: any;
|
|
21
22
|
readonly contracts: any;
|
|
22
23
|
readonly copy: any;
|
|
23
24
|
readonly edit: any;
|
|
24
25
|
readonly equisoft: any;
|
|
25
26
|
readonly externalLink: any;
|
|
26
27
|
readonly eye: any;
|
|
28
|
+
readonly eyeOff: any;
|
|
27
29
|
readonly files: any;
|
|
28
30
|
readonly helpCircle: any;
|
|
29
31
|
readonly history: any;
|
|
@@ -55,6 +57,7 @@ export interface IconProps {
|
|
|
55
57
|
className?: string;
|
|
56
58
|
/** Name of the icon, has to be in IconName */
|
|
57
59
|
name: IconName;
|
|
60
|
+
focusable?: boolean;
|
|
58
61
|
/**
|
|
59
62
|
* Size will affect both width and height
|
|
60
63
|
* @default 24
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ChangeEvent, VoidFunctionComponent } from 'react';
|
|
2
|
+
import { StyledProps } from 'styled-components';
|
|
3
|
+
import { ValidationCondition } from './validation-condition';
|
|
4
|
+
export declare function getBorderColor({ isValid, theme }: StyledProps<{
|
|
5
|
+
isValid: boolean;
|
|
6
|
+
}>): string;
|
|
7
|
+
interface PasswordCreationInputProps {
|
|
8
|
+
name?: string;
|
|
9
|
+
id?: string;
|
|
10
|
+
onChange(newPassword: string, isValid: boolean, event: ChangeEvent<HTMLInputElement>): void;
|
|
11
|
+
validations?: ValidationCondition[];
|
|
12
|
+
}
|
|
13
|
+
export declare const PasswordCreationInput: VoidFunctionComponent<PasswordCreationInputProps>;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { VoidFunctionComponent } from 'react';
|
|
2
|
+
import { PasswordStrengthEnum } from './password-strength.enum';
|
|
3
|
+
interface PasswordStrengthContainerProps {
|
|
4
|
+
strength: PasswordStrengthEnum;
|
|
5
|
+
id: string;
|
|
6
|
+
}
|
|
7
|
+
export declare const PasswordStrengthContainer: VoidFunctionComponent<PasswordStrengthContainerProps>;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { VoidFunctionComponent } from 'react';
|
|
2
|
+
import { PasswordStrengthEnum } from './password-strength.enum';
|
|
3
|
+
interface PasswordStrengthMeterProps {
|
|
4
|
+
strength: PasswordStrengthEnum;
|
|
5
|
+
}
|
|
6
|
+
export declare const PasswordStrengthMeter: VoidFunctionComponent<PasswordStrengthMeterProps>;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { TFunction } from 'i18next';
|
|
2
|
+
export interface ValidationCondition {
|
|
3
|
+
label: string;
|
|
4
|
+
isValid(password: string): boolean;
|
|
5
|
+
}
|
|
6
|
+
export declare function hasMinLength(minLength?: number): (password: string) => boolean;
|
|
7
|
+
export declare function hasAnUpperCaseLetter(password: string): boolean;
|
|
8
|
+
export declare function hasALowerCaseLetter(password: string): boolean;
|
|
9
|
+
export declare function getDefaultValidationConditions(t: TFunction): ValidationCondition[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -2,6 +2,8 @@ import { ChangeEvent, DetailedHTMLProps, FocusEvent, InputHTMLAttributes, Keyboa
|
|
|
2
2
|
import { TooltipProps } from '../tooltip/tooltip';
|
|
3
3
|
declare type PartialInputProps = Pick<DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, 'inputMode' | 'name' | 'value' | 'autoComplete'>;
|
|
4
4
|
interface TextInputProps extends PartialInputProps {
|
|
5
|
+
ariaDescribedBy?: string;
|
|
6
|
+
ariaInvalid?: boolean;
|
|
5
7
|
className?: string;
|
|
6
8
|
defaultValue?: string;
|
|
7
9
|
disabled?: boolean;
|
|
@@ -10,6 +10,7 @@ export declare const Translations: {
|
|
|
10
10
|
common: {
|
|
11
11
|
opensInNewTab: string;
|
|
12
12
|
opensInNewTabScreenReader: string;
|
|
13
|
+
error: string;
|
|
13
14
|
};
|
|
14
15
|
datepicker: {
|
|
15
16
|
calendarButtonLabel: string;
|
|
@@ -42,6 +43,19 @@ export declare const Translations: {
|
|
|
42
43
|
pagination: {
|
|
43
44
|
results: string;
|
|
44
45
|
};
|
|
46
|
+
'password-creation-input': {
|
|
47
|
+
'password-strength': string;
|
|
48
|
+
'min-8-characters': string;
|
|
49
|
+
'min-1-lower-case': string;
|
|
50
|
+
'min-1-upper-case': string;
|
|
51
|
+
'create-password': string;
|
|
52
|
+
weak: string;
|
|
53
|
+
fair: string;
|
|
54
|
+
good: string;
|
|
55
|
+
strong: string;
|
|
56
|
+
'show-password': string;
|
|
57
|
+
'hide-password': string;
|
|
58
|
+
};
|
|
45
59
|
'search-input': {
|
|
46
60
|
label: string;
|
|
47
61
|
};
|
|
@@ -95,6 +109,7 @@ export declare const Translations: {
|
|
|
95
109
|
common: {
|
|
96
110
|
opensInNewTab: string;
|
|
97
111
|
opensInNewTabScreenReader: string;
|
|
112
|
+
error: string;
|
|
98
113
|
};
|
|
99
114
|
datepicker: {
|
|
100
115
|
calendarButtonLabel: string;
|
|
@@ -127,6 +142,19 @@ export declare const Translations: {
|
|
|
127
142
|
pagination: {
|
|
128
143
|
results: string;
|
|
129
144
|
};
|
|
145
|
+
'password-creation-input': {
|
|
146
|
+
'password-strength': string;
|
|
147
|
+
'min-8-characters': string;
|
|
148
|
+
'min-1-lower-case': string;
|
|
149
|
+
'min-1-upper-case': string;
|
|
150
|
+
'create-password': string;
|
|
151
|
+
weak: string;
|
|
152
|
+
fair: string;
|
|
153
|
+
good: string;
|
|
154
|
+
strong: string;
|
|
155
|
+
'show-password': string;
|
|
156
|
+
'hide-password': string;
|
|
157
|
+
};
|
|
130
158
|
'search-input': {
|
|
131
159
|
label: string;
|
|
132
160
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -21,6 +21,8 @@ export { PhoneInput } from './components/phone-input/phone-input';
|
|
|
21
21
|
export { Avatar } from './components/avatar/avatar';
|
|
22
22
|
export { Tab, Tabs } from './components/tabs/tabs';
|
|
23
23
|
export { ToggleSwitch } from './components/toggle-switch/toggle-switch';
|
|
24
|
+
export { PasswordCreationInput } from './components/password-creation-input/password-creation-input';
|
|
25
|
+
export { hasALowerCaseLetter, hasAnUpperCaseLetter, hasMinLength as isLongEnough, } from './components/password-creation-input/validation-condition';
|
|
24
26
|
export { ThemeWrapper } from './components/theme-wrapper/theme-wrapper';
|
|
25
27
|
export { DeviceContextProvider, useDeviceContext } from './components/device-context-provider/device-context-provider';
|
|
26
28
|
export { IntlProvider } from './components/internationalization-provider/internationalization-provider';
|
package/package.json
CHANGED