@okta/okta-signin-widget 7.16.0 → 7.16.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/README.md +5 -5
- package/dist/css/fonts.css +172 -0
- package/dist/css/okta-sign-in.next.css +1 -240
- package/dist/css/okta-sign-in.next.css.map +1 -1
- package/dist/esm/src/config/config.json.js +1 -1
- package/dist/js/okta-sign-in.classic.js +1 -1
- package/dist/js/okta-sign-in.classic.min.js +1 -1
- package/dist/js/okta-sign-in.js +1 -1
- package/dist/js/okta-sign-in.min.js +1 -1
- package/dist/js/okta-sign-in.next.js +61 -19
- package/dist/js/okta-sign-in.next.js.map +1 -1
- package/dist/js/okta-sign-in.next.no-polyfill.js +60 -18
- package/dist/js/okta-sign-in.next.no-polyfill.js.map +1 -1
- package/dist/js/okta-sign-in.no-polyfill.min.js +1 -1
- package/dist/js/okta-sign-in.oie.js +1 -1
- package/dist/js/okta-sign-in.oie.min.js +1 -1
- package/package.json +10 -5
- package/src/config/config.json +1 -1
- package/src/v3/components/AuthCoin/AuthCoin.tsx +15 -17
- package/src/v3/components/AuthContainer/AuthContainer.tsx +11 -17
- package/src/v3/components/AuthContent/AuthContent.tsx +21 -16
- package/src/v3/components/AuthHeader/AuthHeader.tsx +18 -19
- package/src/v3/components/AuthenticatorButton/AuthenticatorButton.tsx +116 -77
- package/src/v3/components/AuthenticatorButton/AuthenticatorButtonList.tsx +9 -3
- package/src/v3/components/Button/Button.tsx +16 -20
- package/src/v3/components/CaptchaContainer/CaptchaContainer.tsx +1 -1
- package/src/v3/components/Checkbox/Checkbox.tsx +33 -82
- package/src/v3/components/ConsentHeader/ConsentHeader.tsx +23 -23
- package/src/v3/components/Divider/Divider.tsx +2 -2
- package/src/v3/components/Form/Accordion.tsx +15 -36
- package/src/v3/components/Form/ElementContainer.tsx +6 -3
- package/src/v3/components/Form/Form.tsx +2 -4
- package/src/v3/components/Form/Layout.tsx +1 -1
- package/src/v3/components/Form/LayoutContainer.tsx +4 -2
- package/src/v3/components/Heading/Heading.tsx +7 -5
- package/src/v3/components/Icon/CustomAppIcon.tsx +13 -15
- package/src/v3/components/Icon/CustomOTPIcon.tsx +5 -10
- package/src/v3/components/Icon/DuoIcon.tsx +5 -10
- package/src/v3/components/Icon/EmailIcon.tsx +5 -10
- package/src/v3/components/Icon/GoogleOTPIcon.tsx +5 -10
- package/src/v3/components/Icon/IDPIcon.tsx +5 -10
- package/src/v3/components/Icon/OktaVerifyIcon.tsx +0 -7
- package/src/v3/components/Icon/OnPremMFAIcon.tsx +5 -10
- package/src/v3/components/Icon/PasswordIcon.tsx +5 -10
- package/src/v3/components/Icon/PhoneIcon.tsx +5 -10
- package/src/v3/components/Icon/RSAIcon.tsx +6 -11
- package/src/v3/components/Icon/SecurityKeyOrBiometricsIcon.tsx +5 -10
- package/src/v3/components/Icon/SecurityQuestionIcon.tsx +5 -10
- package/src/v3/components/Icon/SmartCardIcon.tsx +5 -10
- package/src/v3/components/Icon/SymantecIcon.tsx +5 -10
- package/src/v3/components/Icon/YubiKeyIcon.tsx +5 -10
- package/src/v3/components/Icon/index.tsx +0 -2
- package/src/v3/components/IdentifierContainer/IdentifierContainer.tsx +31 -47
- package/src/v3/components/Image/Image.tsx +42 -0
- package/src/v3/{src/components/CustomPluginsOdysseyCacheProvider → components/Image}/index.tsx +2 -2
- package/src/v3/components/ImageWithText/ImageWithText.tsx +7 -4
- package/src/v3/components/Images/AppIcon.tsx +16 -46
- package/src/v3/components/Images/DeviceIcon.tsx +16 -32
- package/src/v3/components/Images/LocationIcon.tsx +16 -26
- package/src/v3/components/Images/PhoneIcon.tsx +34 -29
- package/src/v3/components/Images/YubikeyDemoImage.tsx +32 -27
- package/src/v3/components/Images/index.tsx +0 -1
- package/src/v3/components/InfoBox/InfoBox.tsx +12 -12
- package/src/v3/components/InfoSection/InfoSection.tsx +20 -14
- package/src/v3/components/InformationalText/InformationalText.tsx +16 -6
- package/src/v3/components/InputPassword/InputPassword.tsx +31 -164
- package/src/v3/components/InputText/InputText.tsx +27 -103
- package/src/v3/components/LaunchAuthenticatorButton/LaunchAuthenticatorButton.tsx +14 -26
- package/src/v3/components/Link/Link.tsx +8 -20
- package/src/v3/components/List/List.tsx +16 -12
- package/src/v3/components/PIVButton/PIVButton.tsx +10 -8
- package/src/v3/components/PasswordRequirements/Icon.tsx +17 -23
- package/src/v3/components/PasswordRequirements/PasswordMatches.tsx +9 -2
- package/src/v3/components/PasswordRequirements/PasswordRequirementListItem.tsx +6 -5
- package/src/v3/components/PasswordRequirements/PasswordRequirements.tsx +5 -3
- package/src/v3/components/PhoneAuthenticator/PhoneAuthenticator.tsx +53 -137
- package/src/v3/components/QRCode/QRCode.tsx +27 -20
- package/src/v3/components/Radio/Radio.tsx +31 -93
- package/src/v3/components/ReminderPrompt/ReminderPrompt.tsx +9 -12
- package/src/v3/components/Select/Select.tsx +45 -92
- package/src/v3/components/Spinner/Spinner.tsx +6 -8
- package/src/v3/components/StepperButton/StepperButton.tsx +6 -10
- package/src/v3/components/StepperLink/StepperLink.tsx +1 -1
- package/src/v3/components/StepperRadio/StepperRadio.tsx +22 -43
- package/src/v3/components/TextWithActionLink/TextWithActionLink.tsx +1 -1
- package/src/v3/components/Title/Title.tsx +5 -9
- package/src/v3/components/WebAuthNSubmitButton/WebAuthNSubmitButton.tsx +10 -9
- package/src/v3/components/Widget/GlobalStyles.tsx +16 -21
- package/src/v3/components/Widget/index.tsx +51 -36
- package/src/v3/components/Widget/style.scss +295 -0
- package/src/v3/components/WidgetMessageContainer/WidgetMessageContainer.tsx +11 -8
- package/src/v3/components/hocs/withFormValidationState.tsx +2 -5
- package/src/v3/jest.config.js +1 -0
- package/src/v3/jest.setup.js +1 -0
- package/src/v3/package.json +11 -7
- package/src/v3/screenshots/base/UI_demo/UI_demo_RTL_VRT.png +0 -0
- package/src/v3/screenshots/base/UI_demo/UI_demo_VRT.png +0 -0
- package/src/v3/src/components/AuthCoin/AuthCoin.tsx +15 -17
- package/src/v3/src/components/AuthCoin/__snapshots__/AuthCoin.test.tsx.snap +20 -47
- package/src/v3/src/components/AuthContainer/AuthContainer.tsx +11 -17
- package/src/v3/src/components/AuthContent/AuthContent.tsx +21 -16
- package/src/v3/src/components/AuthHeader/AuthHeader.tsx +18 -19
- package/src/v3/src/components/AuthenticatorButton/AuthenticatorButton.tsx +116 -77
- package/src/v3/src/components/AuthenticatorButton/AuthenticatorButtonList.tsx +9 -3
- package/src/v3/src/components/Button/Button.tsx +16 -20
- package/src/v3/src/components/CaptchaContainer/CaptchaContainer.tsx +1 -1
- package/src/v3/src/components/Checkbox/Checkbox.tsx +33 -82
- package/src/v3/src/components/ConsentHeader/ConsentHeader.tsx +23 -23
- package/src/v3/src/components/Divider/Divider.tsx +2 -2
- package/src/v3/src/components/Form/Accordion.tsx +15 -36
- package/src/v3/src/components/Form/ElementContainer.tsx +6 -3
- package/src/v3/src/components/Form/Form.tsx +2 -4
- package/src/v3/src/components/Form/Layout.tsx +1 -1
- package/src/v3/src/components/Form/LayoutContainer.tsx +4 -2
- package/src/v3/src/components/Heading/Heading.tsx +7 -5
- package/src/v3/src/components/Icon/CustomAppIcon.tsx +13 -15
- package/src/v3/src/components/Icon/CustomOTPIcon.tsx +5 -10
- package/src/v3/src/components/Icon/DuoIcon.tsx +5 -10
- package/src/v3/src/components/Icon/EmailIcon.tsx +5 -10
- package/src/v3/src/components/Icon/GoogleOTPIcon.tsx +5 -10
- package/src/v3/src/components/Icon/IDPIcon.tsx +5 -10
- package/src/v3/src/components/Icon/OktaVerifyIcon.tsx +0 -7
- package/src/v3/src/components/Icon/OnPremMFAIcon.tsx +5 -10
- package/src/v3/src/components/Icon/PasswordIcon.tsx +5 -10
- package/src/v3/src/components/Icon/PhoneIcon.tsx +5 -10
- package/src/v3/src/components/Icon/RSAIcon.tsx +6 -11
- package/src/v3/src/components/Icon/SecurityKeyOrBiometricsIcon.tsx +5 -10
- package/src/v3/src/components/Icon/SecurityQuestionIcon.tsx +5 -10
- package/src/v3/src/components/Icon/SmartCardIcon.tsx +5 -10
- package/src/v3/src/components/Icon/SymantecIcon.tsx +5 -10
- package/src/v3/src/components/Icon/YubiKeyIcon.tsx +5 -10
- package/src/v3/src/components/Icon/index.tsx +0 -2
- package/src/v3/src/components/IdentifierContainer/IdentifierContainer.tsx +31 -47
- package/src/v3/src/components/Image/Image.tsx +42 -0
- package/src/v3/{components/CustomPluginsOdysseyCacheProvider → src/components/Image}/index.tsx +2 -2
- package/src/v3/src/components/ImageWithText/ImageWithText.tsx +7 -4
- package/src/v3/src/components/Images/AppIcon.tsx +16 -46
- package/src/v3/src/components/Images/DeviceIcon.tsx +16 -32
- package/src/v3/src/components/Images/LocationIcon.tsx +16 -26
- package/src/v3/src/components/Images/PhoneIcon.tsx +34 -29
- package/src/v3/src/components/Images/YubikeyDemoImage.tsx +32 -27
- package/src/v3/src/components/Images/index.tsx +0 -1
- package/src/v3/src/components/InfoBox/InfoBox.tsx +12 -12
- package/src/v3/src/components/InfoSection/InfoSection.tsx +20 -14
- package/src/v3/src/components/InformationalText/InformationalText.tsx +16 -6
- package/src/v3/src/components/InputPassword/InputPassword.tsx +31 -164
- package/src/v3/src/components/InputText/InputText.tsx +27 -103
- package/src/v3/src/components/LaunchAuthenticatorButton/LaunchAuthenticatorButton.tsx +14 -26
- package/src/v3/src/components/Link/Link.tsx +8 -20
- package/src/v3/src/components/List/List.tsx +16 -12
- package/src/v3/src/components/PIVButton/PIVButton.tsx +10 -8
- package/src/v3/src/components/PasswordRequirements/Icon.tsx +17 -23
- package/src/v3/src/components/PasswordRequirements/PasswordMatches.tsx +9 -2
- package/src/v3/src/components/PasswordRequirements/PasswordRequirementListItem.tsx +6 -5
- package/src/v3/src/components/PasswordRequirements/PasswordRequirements.tsx +5 -3
- package/src/v3/src/components/PhoneAuthenticator/PhoneAuthenticator.tsx +53 -137
- package/src/v3/src/components/QRCode/QRCode.tsx +27 -20
- package/src/v3/src/components/Radio/Radio.tsx +31 -93
- package/src/v3/src/components/ReminderPrompt/ReminderPrompt.tsx +9 -12
- package/src/v3/src/components/ReminderPrompt/__snapshots__/ReminderPrompt.test.tsx.snap +37 -17
- package/src/v3/src/components/Select/Select.tsx +45 -92
- package/src/v3/src/components/Spinner/Spinner.tsx +6 -8
- package/src/v3/src/components/StepperButton/StepperButton.tsx +6 -10
- package/src/v3/src/components/StepperLink/StepperLink.tsx +1 -1
- package/src/v3/src/components/StepperRadio/StepperRadio.tsx +22 -43
- package/src/v3/src/components/TextWithActionLink/TextWithActionLink.tsx +1 -1
- package/src/v3/src/components/Title/Title.tsx +5 -9
- package/src/v3/src/components/WebAuthNSubmitButton/WebAuthNSubmitButton.tsx +10 -9
- package/src/v3/src/components/Widget/GlobalStyles.tsx +16 -21
- package/src/v3/src/components/Widget/index.tsx +51 -36
- package/src/v3/src/components/Widget/style.scss +295 -0
- package/src/v3/src/components/WidgetMessageContainer/WidgetMessageContainer.tsx +11 -8
- package/src/v3/src/components/hocs/withFormValidationState.tsx +2 -5
- package/src/v3/src/transformer/button/__snapshots__/transformIDPButtons.test.ts.snap +0 -2
- package/src/v3/src/transformer/i18n/__snapshots__/transformAuthenticatorButton.test.ts.snap +4 -4
- package/src/v3/src/transformer/i18n/transformAuthenticatorButton.test.ts +3 -3
- package/src/v3/src/transformer/i18n/transformAuthenticatorButton.ts +18 -2
- package/src/v3/src/transformer/layout/development/transformEnumerateComponents.ts +72 -5
- package/src/v3/src/transformer/layout/idp/__snapshots__/transformIdpRedirect.test.ts.snap +4 -4
- package/src/v3/src/transformer/selectAuthenticator/__snapshots__/transformSelectAuthenticatorVerify.test.ts.snap +0 -3
- package/src/v3/src/transformer/selectAuthenticator/__snapshots__/transformSelectOVCustomAppMethodVerify.test.ts.snap +0 -1
- package/src/v3/src/transformer/selectAuthenticator/__snapshots__/utils.test.ts.snap +163 -42
- package/src/v3/src/transformer/selectAuthenticator/transformSelectAuthenticatorEnroll.ts +7 -1
- package/src/v3/src/transformer/selectAuthenticator/transformSelectAuthenticatorVerify.ts +0 -1
- package/src/v3/src/transformer/selectAuthenticator/transformSelectOVCustomAppMethodVerify.ts +0 -1
- package/src/v3/src/transformer/selectAuthenticator/utils.test.ts +117 -39
- package/src/v3/src/transformer/selectAuthenticator/utils.ts +102 -58
- package/src/v3/src/transformer/terminal/transformEmailMagicLinkOTPOnlyElements.ts +1 -3
- package/src/v3/src/transformer/uischema/transform.test.ts +0 -6
- package/src/v3/src/transformer/uischema/transform.ts +0 -2
- package/src/v3/src/{components/FieldLevelMessageContainer/index.tsx → types/image.ts} +10 -3
- package/src/v3/src/types/index.ts +1 -0
- package/src/v3/src/types/schema.ts +2 -1
- package/src/v3/src/types/widget.ts +3 -3
- package/src/v3/src/util/buildFieldLevelErrorMessages.ts +48 -0
- package/src/v3/src/util/formUtils.ts +5 -17
- package/src/v3/src/util/htmlContentParserUtils.tsx +3 -1
- package/src/v3/src/util/index.ts +2 -0
- package/src/v3/src/util/isLtrField.ts +22 -0
- package/src/v3/src/util/languageUtils.ts +14 -0
- package/src/v3/src/util/leonardo.d.ts +571 -0
- package/src/v3/src/util/mergeThemes.test.tsx +20 -7
- package/src/v3/src/util/mergeThemes.ts +32 -1
- package/src/v3/src/util/stylisPlugins.ts +21 -0
- package/src/v3/src/util/theme.test.ts +63 -187
- package/src/v3/src/util/theme.ts +274 -247
- package/src/v3/svgo.config.js +0 -6
- package/src/v3/transformer/i18n/transformAuthenticatorButton.ts +18 -2
- package/src/v3/transformer/layout/development/transformEnumerateComponents.ts +72 -5
- package/src/v3/transformer/selectAuthenticator/transformSelectAuthenticatorEnroll.ts +7 -1
- package/src/v3/transformer/selectAuthenticator/transformSelectAuthenticatorVerify.ts +0 -1
- package/src/v3/transformer/selectAuthenticator/transformSelectOVCustomAppMethodVerify.ts +0 -1
- package/src/v3/transformer/selectAuthenticator/utils.ts +102 -58
- package/src/v3/transformer/terminal/transformEmailMagicLinkOTPOnlyElements.ts +1 -3
- package/src/v3/transformer/uischema/transform.ts +0 -2
- package/src/v3/tsconfig.base.json +3 -0
- package/src/v3/{components/FieldLevelMessageContainer/index.tsx → types/image.ts} +10 -3
- package/src/v3/types/index.ts +1 -0
- package/src/v3/types/schema.ts +2 -1
- package/src/v3/types/widget.ts +3 -3
- package/src/v3/util/buildFieldLevelErrorMessages.ts +48 -0
- package/src/v3/util/formUtils.ts +5 -17
- package/src/v3/util/htmlContentParserUtils.tsx +3 -1
- package/src/v3/util/index.ts +2 -0
- package/src/v3/util/isLtrField.ts +22 -0
- package/src/v3/util/languageUtils.ts +14 -0
- package/src/v3/util/leonardo.d.ts +571 -0
- package/src/v3/util/mergeThemes.ts +32 -1
- package/src/v3/util/stylisPlugins.ts +21 -0
- package/src/v3/util/theme.ts +274 -247
- package/src/v3/components/CustomPluginsOdysseyCacheProvider/CustomPluginsOdysseyCacheProvider.tsx +0 -66
- package/src/v3/components/FieldLevelMessageContainer/FieldLevelMessageContainer.tsx +0 -55
- package/src/v3/components/Icon/CheckCircle.tsx +0 -30
- package/src/v3/components/Icon/RightArrowIcon.tsx +0 -30
- package/src/v3/components/Images/MobileDeviceIcon.tsx +0 -38
- package/src/v3/components/Widget/style.css +0 -181
- package/src/v3/src/components/CustomPluginsOdysseyCacheProvider/CustomPluginsOdysseyCacheProvider.tsx +0 -66
- package/src/v3/src/components/FieldLevelMessageContainer/FieldLevelMessageContainer.tsx +0 -55
- package/src/v3/src/components/Icon/CheckCircle.tsx +0 -30
- package/src/v3/src/components/Icon/RightArrowIcon.tsx +0 -30
- package/src/v3/src/components/Images/MobileDeviceIcon.tsx +0 -38
- package/src/v3/src/components/Widget/style.css +0 -181
- package/src/v3/src/transformer/uischema/setLtrFields.ts +0 -41
- package/src/v3/src/util/designTokens.ts +0 -249
- package/src/v3/transformer/uischema/setLtrFields.ts +0 -41
- package/src/v3/util/designTokens.ts +0 -249
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
import {
|
|
13
|
+
import { Button as OdyButton, useOdysseyDesignTokens } from '@okta/odyssey-react-mui';
|
|
14
14
|
import { h } from 'preact';
|
|
15
15
|
|
|
16
16
|
import Util from '../../../../util/Util';
|
|
@@ -30,6 +30,7 @@ import { OktaVerifyIcon } from '../Icon';
|
|
|
30
30
|
const LaunchAuthenticatorButton: UISchemaElementComponent<{
|
|
31
31
|
uischema: LaunchAuthenticatorButtonElement
|
|
32
32
|
}> = ({ uischema }) => {
|
|
33
|
+
const tokens = useOdysseyDesignTokens();
|
|
33
34
|
const onSubmitHandler = useOnSubmit();
|
|
34
35
|
const {
|
|
35
36
|
translations = [],
|
|
@@ -79,32 +80,19 @@ const LaunchAuthenticatorButton: UISchemaElementComponent<{
|
|
|
79
80
|
return (
|
|
80
81
|
<OdyButton
|
|
81
82
|
variant="secondary"
|
|
82
|
-
|
|
83
|
+
isFullWidth
|
|
83
84
|
onClick={handleClick}
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
marginBlockEnd: '-3px',
|
|
96
|
-
}}
|
|
97
|
-
>
|
|
98
|
-
<OktaVerifyIcon
|
|
99
|
-
name="mfa-okta-verify"
|
|
100
|
-
description={iconDescription}
|
|
101
|
-
width={24}
|
|
102
|
-
height={24}
|
|
103
|
-
/>
|
|
104
|
-
</Box>
|
|
105
|
-
{label}
|
|
106
|
-
</Box>
|
|
107
|
-
</OdyButton>
|
|
85
|
+
buttonRef={focusRef}
|
|
86
|
+
label={label || ''}
|
|
87
|
+
startIcon={(
|
|
88
|
+
<OktaVerifyIcon
|
|
89
|
+
name="mfa-okta-verify"
|
|
90
|
+
description={iconDescription}
|
|
91
|
+
width={tokens.Spacing5}
|
|
92
|
+
height={tokens.Spacing5}
|
|
93
|
+
/>
|
|
94
|
+
)}
|
|
95
|
+
/>
|
|
108
96
|
);
|
|
109
97
|
};
|
|
110
98
|
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
import { Link as
|
|
13
|
+
import { Link as MuiLink } from '@mui/material';
|
|
14
|
+
import { Link as OdyLink } from '@okta/odyssey-react-mui';
|
|
15
15
|
import { h } from 'preact';
|
|
16
16
|
|
|
17
17
|
import { useWidgetContext } from '../../contexts';
|
|
@@ -27,7 +27,6 @@ const Link: UISchemaElementComponent<{
|
|
|
27
27
|
} = widgetContext;
|
|
28
28
|
const {
|
|
29
29
|
focus,
|
|
30
|
-
ariaDescribedBy,
|
|
31
30
|
options: {
|
|
32
31
|
label,
|
|
33
32
|
href,
|
|
@@ -63,38 +62,27 @@ const Link: UISchemaElementComponent<{
|
|
|
63
62
|
|
|
64
63
|
return (
|
|
65
64
|
typeof href === 'undefined' ? (
|
|
66
|
-
<
|
|
65
|
+
<MuiLink
|
|
67
66
|
component="button"
|
|
68
|
-
// Fixes OKTA-653788 (see comments) - Currently we treat all links as buttons
|
|
69
|
-
type="button"
|
|
70
|
-
variant="body1"
|
|
71
67
|
role="link"
|
|
72
68
|
onClick={onClick}
|
|
73
|
-
aria-describedby={ariaDescribedBy}
|
|
74
69
|
ref={focusRef}
|
|
75
70
|
data-se={dataSe}
|
|
76
|
-
sx={{
|
|
77
|
-
'&:hover': {
|
|
78
|
-
cursor: 'pointer',
|
|
79
|
-
},
|
|
80
|
-
verticalAlign: 'baseline',
|
|
81
|
-
}}
|
|
82
71
|
>
|
|
83
72
|
{label}
|
|
84
|
-
</
|
|
73
|
+
</MuiLink>
|
|
85
74
|
)
|
|
86
75
|
: (
|
|
87
|
-
<
|
|
76
|
+
<OdyLink
|
|
88
77
|
href={href}
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
data-se={dataSe}
|
|
78
|
+
linkRef={focusRef}
|
|
79
|
+
testId={dataSe}
|
|
92
80
|
target={target}
|
|
93
81
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
94
82
|
{...(target === '_blank' && { rel: 'noopener noreferrer' })}
|
|
95
83
|
>
|
|
96
84
|
{label}
|
|
97
|
-
</
|
|
85
|
+
</OdyLink>
|
|
98
86
|
)
|
|
99
87
|
);
|
|
100
88
|
};
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
import { List as ListMui, ListItem } from '@mui/material';
|
|
14
|
-
import {
|
|
13
|
+
import { Box, List as ListMui, ListItem } from '@mui/material';
|
|
14
|
+
import { Typography, useOdysseyDesignTokens } from '@okta/odyssey-react-mui';
|
|
15
15
|
import { FunctionComponent, h } from 'preact';
|
|
16
16
|
|
|
17
17
|
import Logger from '../../../../util/Logger';
|
|
@@ -28,14 +28,17 @@ import Button from '../Button';
|
|
|
28
28
|
import InformationalText from '../InformationalText';
|
|
29
29
|
|
|
30
30
|
const renderElement = (item: UISchemaElement) => {
|
|
31
|
-
const Container: FunctionComponent = ({ children }) =>
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
31
|
+
const Container: FunctionComponent = ({ children }) => {
|
|
32
|
+
const tokens = useOdysseyDesignTokens();
|
|
33
|
+
return (
|
|
34
|
+
<Box
|
|
35
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
36
|
+
{...(!(item).noMargin && { marginBlockEnd: tokens.Spacing4 })}
|
|
37
|
+
>
|
|
38
|
+
{children}
|
|
39
|
+
</Box>
|
|
40
|
+
);
|
|
41
|
+
};
|
|
39
42
|
|
|
40
43
|
switch (item.type) {
|
|
41
44
|
case 'Button':
|
|
@@ -75,18 +78,19 @@ const List: UISchemaElementComponent<{
|
|
|
75
78
|
uischema: ListElement
|
|
76
79
|
}> = ({ uischema }) => {
|
|
77
80
|
const { options } = uischema;
|
|
81
|
+
const tokens = useOdysseyDesignTokens();
|
|
78
82
|
|
|
79
83
|
return options.items?.length ? (
|
|
80
84
|
<Box
|
|
81
85
|
display="flex"
|
|
82
86
|
flexDirection="column"
|
|
83
87
|
justifyContent="flex-start"
|
|
84
|
-
marginBlockEnd={
|
|
88
|
+
marginBlockEnd={tokens.Spacing4}
|
|
85
89
|
>
|
|
86
90
|
{ options.description && <Typography component="p">{options.description}</Typography> }
|
|
87
91
|
<ListMui
|
|
88
92
|
component={options.type}
|
|
89
|
-
sx={{ listStyleType: options.type === 'ol' ? 'decimal' : 'disc', pl:
|
|
93
|
+
sx={{ listStyleType: options.type === 'ol' ? 'decimal' : 'disc', pl: tokens.Spacing4 }}
|
|
90
94
|
>
|
|
91
95
|
{
|
|
92
96
|
options.items.map((item: string | UISchemaLayout, index: number) => (
|
|
@@ -10,7 +10,8 @@
|
|
|
10
10
|
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
import { Box
|
|
13
|
+
import { Box } from '@mui/material';
|
|
14
|
+
import { Button as OdyButton, useOdysseyDesignTokens } from '@okta/odyssey-react-mui';
|
|
14
15
|
import { h } from 'preact';
|
|
15
16
|
import { useEffect, useState } from 'preact/hooks';
|
|
16
17
|
|
|
@@ -37,6 +38,8 @@ const PIVButton: UISchemaElementComponent<{
|
|
|
37
38
|
|
|
38
39
|
const showLoading = waiting || loading;
|
|
39
40
|
|
|
41
|
+
const tokens = useOdysseyDesignTokens();
|
|
42
|
+
|
|
40
43
|
const initCertPrompt = () => {
|
|
41
44
|
setWaiting(true);
|
|
42
45
|
setMessage(undefined);
|
|
@@ -61,7 +64,7 @@ const PIVButton: UISchemaElementComponent<{
|
|
|
61
64
|
|
|
62
65
|
return (
|
|
63
66
|
<Box
|
|
64
|
-
marginBlockEnd={
|
|
67
|
+
marginBlockEnd={tokens.Spacing4}
|
|
65
68
|
display={showLoading ? 'flex' : undefined}
|
|
66
69
|
justifyContent={showLoading ? 'center' : undefined}
|
|
67
70
|
>
|
|
@@ -70,14 +73,13 @@ const PIVButton: UISchemaElementComponent<{
|
|
|
70
73
|
? <Spinner dataSe="okta-spinner" />
|
|
71
74
|
: (
|
|
72
75
|
<OdyButton
|
|
73
|
-
|
|
76
|
+
label={btnLabel || ''}
|
|
77
|
+
testId="button"
|
|
74
78
|
onClick={handleClick}
|
|
75
79
|
variant="primary"
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
{btnLabel}
|
|
80
|
-
</OdyButton>
|
|
80
|
+
ariaDescribedBy={ariaDescribedBy}
|
|
81
|
+
isFullWidth
|
|
82
|
+
/>
|
|
81
83
|
)
|
|
82
84
|
}
|
|
83
85
|
</Box>
|
|
@@ -10,12 +10,12 @@
|
|
|
10
10
|
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
import { Box
|
|
14
|
-
import
|
|
13
|
+
import { Box } from '@mui/material';
|
|
14
|
+
import { useOdysseyDesignTokens } from '@okta/odyssey-react-mui';
|
|
15
|
+
import { CheckCircleFilledIcon, CloseIcon, InformationCircleIcon } from '@okta/odyssey-react-mui/icons';
|
|
15
16
|
import { FunctionComponent, h } from 'preact';
|
|
16
17
|
|
|
17
18
|
import { PasswordRequirementStatus } from '../../types';
|
|
18
|
-
import { CheckCircle } from '../Icon';
|
|
19
19
|
|
|
20
20
|
type PasswordRequirementIconProps = {
|
|
21
21
|
status: PasswordRequirementStatus;
|
|
@@ -25,35 +25,29 @@ const Icon: FunctionComponent<PasswordRequirementIconProps> = (
|
|
|
25
25
|
props,
|
|
26
26
|
) => {
|
|
27
27
|
const { status } = props;
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
28
|
+
const tokens = useOdysseyDesignTokens();
|
|
29
|
+
const statusToIcon = {
|
|
30
|
+
incomplete: { component: CloseIcon, color: tokens.PaletteNeutralMain },
|
|
31
|
+
complete: { component: CheckCircleFilledIcon, color: tokens.PaletteSuccessMain },
|
|
32
|
+
info: { component: InformationCircleIcon, color: tokens.PalettePrimaryMain },
|
|
32
33
|
};
|
|
33
|
-
const
|
|
34
|
+
const OdyIcon = statusToIcon[status].component;
|
|
34
35
|
|
|
35
36
|
return (
|
|
36
37
|
<Box
|
|
37
|
-
className={iconClasses}
|
|
38
38
|
data-se={`passwordRequirementIcon-${status}`}
|
|
39
|
-
sx={
|
|
40
|
-
marginInlineEnd:
|
|
39
|
+
sx={{
|
|
40
|
+
marginInlineEnd: tokens.Spacing2,
|
|
41
41
|
// This is to force the icon align with the top of the text
|
|
42
42
|
marginBlockStart: '2px',
|
|
43
|
-
}
|
|
43
|
+
}}
|
|
44
44
|
aria-hidden
|
|
45
45
|
>
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
<OdyIcon
|
|
52
|
-
name={statusToIconProps[status].name}
|
|
53
|
-
color={statusToIconProps[status].color}
|
|
54
|
-
/>
|
|
55
|
-
)
|
|
56
|
-
}
|
|
46
|
+
<OdyIcon
|
|
47
|
+
sx={{
|
|
48
|
+
color: statusToIcon[status].color,
|
|
49
|
+
}}
|
|
50
|
+
/>
|
|
57
51
|
</Box>
|
|
58
52
|
);
|
|
59
53
|
};
|
|
@@ -10,7 +10,8 @@
|
|
|
10
10
|
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
import { Box } from '@
|
|
13
|
+
import { Box } from '@mui/material';
|
|
14
|
+
import { useOdysseyDesignTokens } from '@okta/odyssey-react-mui';
|
|
14
15
|
import debounce from 'lodash/debounce';
|
|
15
16
|
import { h } from 'preact';
|
|
16
17
|
import {
|
|
@@ -38,6 +39,7 @@ const PasswordMatches: UISchemaElementComponent<{
|
|
|
38
39
|
const { confirmPassword } = data;
|
|
39
40
|
const { translations = [] } = uischema;
|
|
40
41
|
const label = getTranslation(translations, 'label');
|
|
42
|
+
const tokens = useOdysseyDesignTokens();
|
|
41
43
|
|
|
42
44
|
const [isMatching, setIsMatching] = useState<boolean>(false);
|
|
43
45
|
|
|
@@ -60,7 +62,12 @@ const PasswordMatches: UISchemaElementComponent<{
|
|
|
60
62
|
<Box
|
|
61
63
|
component="ul"
|
|
62
64
|
id="credentials.newPassword-list"
|
|
63
|
-
sx={{
|
|
65
|
+
sx={{
|
|
66
|
+
listStyle: 'none',
|
|
67
|
+
padding: '0',
|
|
68
|
+
marginBlockStart: '0',
|
|
69
|
+
marginBlockEnd: `-${tokens.Spacing3}`,
|
|
70
|
+
}}
|
|
64
71
|
aria-hidden
|
|
65
72
|
>
|
|
66
73
|
<PasswordRequirementListItem
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
import
|
|
14
|
-
import {
|
|
13
|
+
import { Box } from '@mui/material';
|
|
14
|
+
import { Typography, useOdysseyDesignTokens } from '@okta/odyssey-react-mui';
|
|
15
15
|
import { FunctionComponent, h } from 'preact';
|
|
16
16
|
|
|
17
17
|
import { PasswordRequirementProps } from '../../types';
|
|
@@ -21,12 +21,13 @@ const PasswordRequirementListItem: FunctionComponent<PasswordRequirementProps> =
|
|
|
21
21
|
props,
|
|
22
22
|
) => {
|
|
23
23
|
const { status, label } = props;
|
|
24
|
+
const tokens = useOdysseyDesignTokens();
|
|
24
25
|
|
|
25
26
|
return (
|
|
26
27
|
<Box
|
|
27
28
|
component="li"
|
|
28
|
-
sx={{ marginBlockEnd:
|
|
29
|
-
color={status === 'complete' ?
|
|
29
|
+
sx={{ marginBlockEnd: tokens.Spacing3 }}
|
|
30
|
+
color={status === 'complete' ? tokens.PaletteSuccessMain : undefined}
|
|
30
31
|
>
|
|
31
32
|
<Box
|
|
32
33
|
display="flex"
|
|
@@ -38,7 +39,7 @@ const PasswordRequirementListItem: FunctionComponent<PasswordRequirementProps> =
|
|
|
38
39
|
* of the icon. See: OKTA-586924
|
|
39
40
|
* */}
|
|
40
41
|
<Icon status={status} />
|
|
41
|
-
<Box><Typography variant="
|
|
42
|
+
<Box><Typography variant="body">{label}</Typography></Box>
|
|
42
43
|
</Box>
|
|
43
44
|
</Box>
|
|
44
45
|
);
|
|
@@ -10,7 +10,8 @@
|
|
|
10
10
|
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
import { Box } from '@
|
|
13
|
+
import { Box } from '@mui/material';
|
|
14
|
+
import { useOdysseyDesignTokens } from '@okta/odyssey-react-mui';
|
|
14
15
|
import debounce from 'lodash/debounce';
|
|
15
16
|
import { h } from 'preact';
|
|
16
17
|
import {
|
|
@@ -48,6 +49,7 @@ const PasswordRequirements: UISchemaElementComponent<{
|
|
|
48
49
|
: data['credentials.passcode'];
|
|
49
50
|
|
|
50
51
|
const [passwordValidations, setPasswordValidations] = useState<PasswordValidation>({});
|
|
52
|
+
const tokens = useOdysseyDesignTokens();
|
|
51
53
|
|
|
52
54
|
const getPasswordStatus = (
|
|
53
55
|
ruleKey: string,
|
|
@@ -96,14 +98,14 @@ const PasswordRequirements: UISchemaElementComponent<{
|
|
|
96
98
|
>
|
|
97
99
|
<Box
|
|
98
100
|
component="figcaption"
|
|
99
|
-
|
|
101
|
+
data-se="password-authenticator--heading"
|
|
100
102
|
>
|
|
101
103
|
{header}
|
|
102
104
|
</Box>
|
|
103
105
|
<Box
|
|
104
106
|
component="ul"
|
|
105
107
|
id={listId}
|
|
106
|
-
sx={{ listStyle: 'none', padding: '0', marginBlockStart:
|
|
108
|
+
sx={{ listStyle: 'none', padding: '0', marginBlockStart: tokens.Spacing3 }}
|
|
107
109
|
>
|
|
108
110
|
{requirements.map(({ ruleKey, label }) => (
|
|
109
111
|
<PasswordRequirementListItem
|