@aws-amplify/ui 6.0.10 → 6.0.11
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/esm/helpers/authenticator/utils.mjs +13 -1
- package/dist/esm/i18n/dictionaries/authenticator/he.mjs +1 -1
- package/dist/esm/index.mjs +1 -1
- package/dist/esm/theme/tokens/components/checkbox.mjs +4 -1
- package/dist/index.js +19 -2
- package/dist/styles/base.css +1 -0
- package/dist/styles/base.layer.css +1 -0
- package/dist/styles/checkbox.css +4 -1
- package/dist/styles/checkbox.layer.css +4 -1
- package/dist/styles.css +5 -1
- package/dist/styles.layer.css +5 -1
- package/dist/theme.css +1 -0
- package/dist/types/helpers/authenticator/utils.d.ts +3 -0
- package/dist/types/theme/tokens/components/checkbox.d.ts +1 -1
- package/package.json +1 -1
|
@@ -21,6 +21,18 @@ const censorPhoneNumber = (val) => {
|
|
|
21
21
|
}
|
|
22
22
|
return split.join('');
|
|
23
23
|
};
|
|
24
|
+
// censors all but the first and last of the name of an email and keeps domain
|
|
25
|
+
const censorEmail = (val) => {
|
|
26
|
+
const splitEmail = val.split('@');
|
|
27
|
+
const censoredName = censorAllButFirstAndLast(splitEmail[0]);
|
|
28
|
+
return `${censoredName}@${splitEmail[1]}`;
|
|
29
|
+
};
|
|
30
|
+
// based on the ContactMethod type, returns a censored contact value
|
|
31
|
+
const censorContactMethod = (type, value) => {
|
|
32
|
+
return type === 'Phone Number'
|
|
33
|
+
? censorPhoneNumber(value)
|
|
34
|
+
: censorEmail(value);
|
|
35
|
+
};
|
|
24
36
|
const hasSpecialChars = (password) => ALLOWED_SPECIAL_CHARACTERS.some((char) => password.includes(char));
|
|
25
37
|
const getTotpCodeURL = (issuer, username, secret) => encodeURI(`otpauth://totp/${issuer}:${username}?secret=${secret}&issuer=${issuer}`);
|
|
26
38
|
function trimValues(values, ...ignored) {
|
|
@@ -35,4 +47,4 @@ const isValidEmail = (value) => {
|
|
|
35
47
|
return emailRegex.test(value);
|
|
36
48
|
};
|
|
37
49
|
|
|
38
|
-
export { censorAllButFirstAndLast, censorPhoneNumber, getTotpCodeURL, hasSpecialChars, isValidEmail, trimValues };
|
|
50
|
+
export { censorAllButFirstAndLast, censorContactMethod, censorEmail, censorPhoneNumber, getTotpCodeURL, hasSpecialChars, isValidEmail, trimValues };
|
|
@@ -20,7 +20,7 @@ const heDict = {
|
|
|
20
20
|
'Enter your Email': 'הכנס את המייל שלך',
|
|
21
21
|
'Enter your phone number': 'הכנס את מספר הטלפון שלך',
|
|
22
22
|
'Enter your username': 'הכנס את שם המתמש שלך',
|
|
23
|
-
'Forgot your password?': '
|
|
23
|
+
'Forgot your password?': 'שכחת סיסמא ?',
|
|
24
24
|
'Hide password': 'הסתר סיסמא',
|
|
25
25
|
Loading: 'טוען',
|
|
26
26
|
'New password': 'סיסמא חדשה',
|
package/dist/esm/index.mjs
CHANGED
|
@@ -3,7 +3,7 @@ export { defaultAuthHubHandler, listenToAuthHub } from './helpers/authenticator/
|
|
|
3
3
|
export { getNextServiceContextFacade, getNextServiceFacade, getSendEventAliases, getServiceContextFacade, getServiceFacade } from './helpers/authenticator/facade.mjs';
|
|
4
4
|
export { ALLOWED_SPECIAL_CHARACTERS, NAVIGABLE_ROUTE_EVENT, defaultFormFieldOptions, emailRegex } from './helpers/authenticator/constants.mjs';
|
|
5
5
|
export { getErrors, getFormDataFromEvent, isAuthFieldWithDefaults, setFormOrder } from './helpers/authenticator/form.mjs';
|
|
6
|
-
export { censorAllButFirstAndLast, censorPhoneNumber, getTotpCodeURL, hasSpecialChars, isValidEmail, trimValues } from './helpers/authenticator/utils.mjs';
|
|
6
|
+
export { censorAllButFirstAndLast, censorContactMethod, censorEmail, censorPhoneNumber, getTotpCodeURL, hasSpecialChars, isValidEmail, trimValues } from './helpers/authenticator/utils.mjs';
|
|
7
7
|
export { getCustomFormFields, getDefaultFormFields, getFormFields, getSortedFormFields, removeOrderKeys } from './helpers/authenticator/formFields/formFields.mjs';
|
|
8
8
|
export { DEFAULT_COUNTRY_CODE, defaultFormFieldsGetters, getAliasDefaultFormField } from './helpers/authenticator/formFields/defaults.mjs';
|
|
9
9
|
export { applyTranslation, getPrimaryAlias, sortFormFields } from './helpers/authenticator/formFields/utils.mjs';
|
package/dist/index.js
CHANGED
|
@@ -1919,7 +1919,7 @@ const heDict$1 = {
|
|
|
1919
1919
|
'Enter your Email': 'הכנס את המייל שלך',
|
|
1920
1920
|
'Enter your phone number': 'הכנס את מספר הטלפון שלך',
|
|
1921
1921
|
'Enter your username': 'הכנס את שם המתמש שלך',
|
|
1922
|
-
'Forgot your password?': '
|
|
1922
|
+
'Forgot your password?': 'שכחת סיסמא ?',
|
|
1923
1923
|
'Hide password': 'הסתר סיסמא',
|
|
1924
1924
|
Loading: 'טוען',
|
|
1925
1925
|
'New password': 'סיסמא חדשה',
|
|
@@ -2815,6 +2815,18 @@ const censorPhoneNumber = (val) => {
|
|
|
2815
2815
|
}
|
|
2816
2816
|
return split.join('');
|
|
2817
2817
|
};
|
|
2818
|
+
// censors all but the first and last of the name of an email and keeps domain
|
|
2819
|
+
const censorEmail = (val) => {
|
|
2820
|
+
const splitEmail = val.split('@');
|
|
2821
|
+
const censoredName = censorAllButFirstAndLast(splitEmail[0]);
|
|
2822
|
+
return `${censoredName}@${splitEmail[1]}`;
|
|
2823
|
+
};
|
|
2824
|
+
// based on the ContactMethod type, returns a censored contact value
|
|
2825
|
+
const censorContactMethod = (type, value) => {
|
|
2826
|
+
return type === 'Phone Number'
|
|
2827
|
+
? censorPhoneNumber(value)
|
|
2828
|
+
: censorEmail(value);
|
|
2829
|
+
};
|
|
2818
2830
|
const hasSpecialChars = (password) => ALLOWED_SPECIAL_CHARACTERS.some((char) => password.includes(char));
|
|
2819
2831
|
const getTotpCodeURL = (issuer, username, secret) => encodeURI(`otpauth://totp/${issuer}:${username}?secret=${secret}&issuer=${issuer}`);
|
|
2820
2832
|
function trimValues(values, ...ignored) {
|
|
@@ -6036,8 +6048,11 @@ const checkbox = {
|
|
|
6036
6048
|
},
|
|
6037
6049
|
},
|
|
6038
6050
|
label: {
|
|
6051
|
+
color: { value: '{components.text.color.value}' },
|
|
6039
6052
|
_disabled: {
|
|
6040
|
-
color: {
|
|
6053
|
+
color: {
|
|
6054
|
+
value: '{colors.font.disabled.value}',
|
|
6055
|
+
},
|
|
6041
6056
|
},
|
|
6042
6057
|
},
|
|
6043
6058
|
};
|
|
@@ -8323,6 +8338,8 @@ exports.authFieldsWithDefaults = authFieldsWithDefaults;
|
|
|
8323
8338
|
exports.authenticatorTextUtil = authenticatorTextUtil;
|
|
8324
8339
|
exports.capitalize = capitalize;
|
|
8325
8340
|
exports.censorAllButFirstAndLast = censorAllButFirstAndLast;
|
|
8341
|
+
exports.censorContactMethod = censorContactMethod;
|
|
8342
|
+
exports.censorEmail = censorEmail;
|
|
8326
8343
|
exports.censorPhoneNumber = censorPhoneNumber;
|
|
8327
8344
|
exports.changePassword = changePassword;
|
|
8328
8345
|
exports.classNameModifier = classNameModifier;
|
package/dist/styles/base.css
CHANGED
|
@@ -512,6 +512,7 @@
|
|
|
512
512
|
--amplify-components-checkbox-icon-indeterminate-opacity: var(--amplify-opacities-100);
|
|
513
513
|
--amplify-components-checkbox-icon-indeterminate-transform: scale(1);
|
|
514
514
|
--amplify-components-checkbox-icon-indeterminate-disabled-background-color: var(--amplify-colors-background-disabled);
|
|
515
|
+
--amplify-components-checkbox-label-color: var(--amplify-components-text-color);
|
|
515
516
|
--amplify-components-checkbox-label-disabled-color: var(--amplify-colors-font-disabled);
|
|
516
517
|
--amplify-components-checkboxfield-align-items: flex-start;
|
|
517
518
|
--amplify-components-checkboxfield-align-content: center;
|
|
@@ -513,6 +513,7 @@
|
|
|
513
513
|
--amplify-components-checkbox-icon-indeterminate-opacity: var(--amplify-opacities-100);
|
|
514
514
|
--amplify-components-checkbox-icon-indeterminate-transform: scale(1);
|
|
515
515
|
--amplify-components-checkbox-icon-indeterminate-disabled-background-color: var(--amplify-colors-background-disabled);
|
|
516
|
+
--amplify-components-checkbox-label-color: var(--amplify-components-text-color);
|
|
516
517
|
--amplify-components-checkbox-label-disabled-color: var(--amplify-colors-font-disabled);
|
|
517
518
|
--amplify-components-checkboxfield-align-items: flex-start;
|
|
518
519
|
--amplify-components-checkboxfield-align-content: center;
|
package/dist/styles/checkbox.css
CHANGED
package/dist/styles.css
CHANGED
|
@@ -512,6 +512,7 @@
|
|
|
512
512
|
--amplify-components-checkbox-icon-indeterminate-opacity: var(--amplify-opacities-100);
|
|
513
513
|
--amplify-components-checkbox-icon-indeterminate-transform: scale(1);
|
|
514
514
|
--amplify-components-checkbox-icon-indeterminate-disabled-background-color: var(--amplify-colors-background-disabled);
|
|
515
|
+
--amplify-components-checkbox-label-color: var(--amplify-components-text-color);
|
|
515
516
|
--amplify-components-checkbox-label-disabled-color: var(--amplify-colors-font-disabled);
|
|
516
517
|
--amplify-components-checkboxfield-align-items: flex-start;
|
|
517
518
|
--amplify-components-checkboxfield-align-content: center;
|
|
@@ -3668,7 +3669,10 @@ strong.amplify-text {
|
|
|
3668
3669
|
}
|
|
3669
3670
|
|
|
3670
3671
|
.amplify-checkbox__label {
|
|
3671
|
-
color:
|
|
3672
|
+
color: var(--amplify-components-checkbox-label-color);
|
|
3673
|
+
}
|
|
3674
|
+
.amplify-checkbox__label--disabled {
|
|
3675
|
+
color: var(--amplify-components-checkbox-label-disabled-color);
|
|
3672
3676
|
}
|
|
3673
3677
|
|
|
3674
3678
|
.amplify-checkboxfield {
|
package/dist/styles.layer.css
CHANGED
|
@@ -513,6 +513,7 @@
|
|
|
513
513
|
--amplify-components-checkbox-icon-indeterminate-opacity: var(--amplify-opacities-100);
|
|
514
514
|
--amplify-components-checkbox-icon-indeterminate-transform: scale(1);
|
|
515
515
|
--amplify-components-checkbox-icon-indeterminate-disabled-background-color: var(--amplify-colors-background-disabled);
|
|
516
|
+
--amplify-components-checkbox-label-color: var(--amplify-components-text-color);
|
|
516
517
|
--amplify-components-checkbox-label-disabled-color: var(--amplify-colors-font-disabled);
|
|
517
518
|
--amplify-components-checkboxfield-align-items: flex-start;
|
|
518
519
|
--amplify-components-checkboxfield-align-content: center;
|
|
@@ -3669,7 +3670,10 @@ strong.amplify-text {
|
|
|
3669
3670
|
}
|
|
3670
3671
|
|
|
3671
3672
|
.amplify-checkbox__label {
|
|
3672
|
-
color:
|
|
3673
|
+
color: var(--amplify-components-checkbox-label-color);
|
|
3674
|
+
}
|
|
3675
|
+
.amplify-checkbox__label--disabled {
|
|
3676
|
+
color: var(--amplify-components-checkbox-label-disabled-color);
|
|
3673
3677
|
}
|
|
3674
3678
|
|
|
3675
3679
|
.amplify-checkboxfield {
|
package/dist/theme.css
CHANGED
|
@@ -509,6 +509,7 @@
|
|
|
509
509
|
--amplify-components-checkbox-icon-indeterminate-opacity: var(--amplify-opacities-100);
|
|
510
510
|
--amplify-components-checkbox-icon-indeterminate-transform: scale(1);
|
|
511
511
|
--amplify-components-checkbox-icon-indeterminate-disabled-background-color: var(--amplify-colors-background-disabled);
|
|
512
|
+
--amplify-components-checkbox-label-color: var(--amplify-components-text-color);
|
|
512
513
|
--amplify-components-checkbox-label-disabled-color: var(--amplify-colors-font-disabled);
|
|
513
514
|
--amplify-components-checkboxfield-align-items: flex-start;
|
|
514
515
|
--amplify-components-checkboxfield-align-content: center;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
+
import type { ContactMethod } from '../../types';
|
|
1
2
|
export declare const censorAllButFirstAndLast: (value: string) => string;
|
|
2
3
|
export declare const censorPhoneNumber: (val: string) => string;
|
|
4
|
+
export declare const censorEmail: (val: string) => string;
|
|
5
|
+
export declare const censorContactMethod: (type: ContactMethod, value: string) => string;
|
|
3
6
|
export declare const hasSpecialChars: (password: string) => boolean;
|
|
4
7
|
export declare const getTotpCodeURL: (issuer: string, username: string, secret: string) => string;
|
|
5
8
|
export declare function trimValues<T extends Record<string, string>>(values: T, ...ignored: string[]): T;
|
|
@@ -20,7 +20,7 @@ export type CheckboxTokens<Output extends OutputVariantKey> = DesignTokenPropert
|
|
|
20
20
|
_disabled?: DesignTokenProperties<'cursor', Output>;
|
|
21
21
|
button?: ButtonToken<Output>;
|
|
22
22
|
icon?: IconToken<Output>;
|
|
23
|
-
label?: {
|
|
23
|
+
label?: DesignTokenProperties<'color', Output> & {
|
|
24
24
|
_disabled?: DesignTokenProperties<'color', Output>;
|
|
25
25
|
};
|
|
26
26
|
};
|