@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,34 +10,39 @@
|
|
|
10
10
|
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
+
import { useOdysseyDesignTokens } from '@okta/odyssey-react-mui';
|
|
13
14
|
import { FunctionComponent, h } from 'preact';
|
|
14
15
|
|
|
15
16
|
import { loc } from '../../util';
|
|
16
17
|
|
|
17
|
-
export const YubikeyDemoImage: FunctionComponent = () =>
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
18
|
+
export const YubikeyDemoImage: FunctionComponent = () => {
|
|
19
|
+
const tokens = useOdysseyDesignTokens();
|
|
20
|
+
|
|
21
|
+
return (
|
|
22
|
+
<svg
|
|
23
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
24
|
+
width={tokens.Spacing9}
|
|
25
|
+
height={tokens.Spacing9}
|
|
26
|
+
fill="none"
|
|
27
|
+
role="img"
|
|
28
|
+
viewBox="0 0 43 58"
|
|
29
|
+
aria-hidden="true"
|
|
30
|
+
>
|
|
31
|
+
<title>{loc('factor.totpHard.yubikey', 'login')}</title>
|
|
32
|
+
<path
|
|
33
|
+
fill="#00297A"
|
|
34
|
+
fillRule="evenodd"
|
|
35
|
+
d="M10.61 0a9 9 0 0 0-9 9v.5a8.5 8.5 0 0 0 8.5 8.5v-2a6.5 6.5 0 0 1-6.5-6.5V9a7 7 0 0 1 7-7h13v14h-5.75v2h7.75v-3h8V3h-8V0h-15Zm15 5v8h6V5h-6Z"
|
|
36
|
+
class="siwIconFillPrimaryDark"
|
|
37
|
+
clipRule="evenodd"
|
|
38
|
+
/>
|
|
39
|
+
<path
|
|
40
|
+
fill="#A7B5EC"
|
|
41
|
+
fillRule="evenodd"
|
|
42
|
+
d="M25.61 6.5h4v2h-4v-2Zm0 3h4v2h-4v-2Zm-15.356 2.486a2.986 2.986 0 0 1 5.973 0V32.86a1 1 0 1 0 2 0v-4.892a2 2 0 0 1 2-2h2.13a2 2 0 0 1 2 2v7.475a1 1 0 1 0 2 0v-1.047c0-1.633 1.352-2.975 3.005-2.975 1.619 0 2.944 1.315 2.944 2.914v5.764a1 1 0 1 0 2 0v-.614a3.042 3.042 0 1 1 6.084 0v4.683h2v-4.683a5.042 5.042 0 0 0-8.084-4.022v-1.128c0-2.724-2.24-4.914-4.944-4.914a5.003 5.003 0 0 0-3.006 1.002v-2.455a4 4 0 0 0-4-4h-2.13c-.728 0-1.411.195-2 .535V11.986a4.986 4.986 0 0 0-9.972 0v19.607c-1.398.5-2.847 1.495-4.072 2.492A29.391 29.391 0 0 0 .935 37.18l-.155.175-.062.226c-.146.542-.128 1.168-.044 1.783.086.633.254 1.345.478 2.1.447 1.509 1.139 3.276 1.93 5.082 1.581 3.616 3.6 7.483 4.977 9.943l.489.872 1.745-.977-.489-.873c-1.356-2.421-3.342-6.227-4.89-9.767-.776-1.772-1.431-3.453-1.845-4.849a12.468 12.468 0 0 1-.414-1.8 3.726 3.726 0 0 1-.038-.795 27.872 27.872 0 0 1 2.828-2.664c.943-.768 1.918-1.44 2.81-1.874v8.552a1 1 0 1 0 2 0V11.986Z"
|
|
43
|
+
class="siwIconFillSecondary"
|
|
44
|
+
clipRule="evenodd"
|
|
45
|
+
/>
|
|
46
|
+
</svg>
|
|
47
|
+
);
|
|
48
|
+
};
|
|
@@ -10,10 +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
|
-
|
|
15
|
-
Box,
|
|
16
|
-
} from '@okta/odyssey-react-mui';
|
|
13
|
+
import { Box } from '@mui/material';
|
|
14
|
+
import { Callout, useOdysseyDesignTokens } from '@okta/odyssey-react-mui';
|
|
17
15
|
import { h } from 'preact';
|
|
18
16
|
|
|
19
17
|
import { useWidgetContext } from '../../contexts';
|
|
@@ -41,23 +39,25 @@ const InfoBox: UISchemaElementComponent<{
|
|
|
41
39
|
},
|
|
42
40
|
} = uischema;
|
|
43
41
|
|
|
42
|
+
const tokens = useOdysseyDesignTokens();
|
|
43
|
+
|
|
44
44
|
return loading ? null : (
|
|
45
45
|
<Box
|
|
46
|
-
marginBlockEnd={
|
|
46
|
+
marginBlockEnd={tokens.Spacing4}
|
|
47
47
|
width={1}
|
|
48
|
-
data-se=
|
|
48
|
+
data-se={`infobox-${messageClass.toLowerCase()}`}
|
|
49
49
|
>
|
|
50
|
-
<
|
|
50
|
+
<Callout
|
|
51
51
|
severity={MessageTypeVariant[messageClass as MessageType] ?? MessageTypeVariant.INFO}
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
52
|
+
testId={dataSe}
|
|
53
|
+
// visually-hidden severity text is not translated
|
|
54
|
+
translate="no"
|
|
55
55
|
>
|
|
56
56
|
{
|
|
57
57
|
Array.isArray(message)
|
|
58
58
|
? message.map((msg) => (
|
|
59
59
|
<Box
|
|
60
|
-
marginBlockEnd={
|
|
60
|
+
marginBlockEnd={tokens.Spacing2}
|
|
61
61
|
key={msg.message}
|
|
62
62
|
>
|
|
63
63
|
<WidgetMessageContainer
|
|
@@ -75,7 +75,7 @@ const InfoBox: UISchemaElementComponent<{
|
|
|
75
75
|
/>
|
|
76
76
|
)
|
|
77
77
|
}
|
|
78
|
-
</
|
|
78
|
+
</Callout>
|
|
79
79
|
</Box>
|
|
80
80
|
);
|
|
81
81
|
};
|
|
@@ -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 {
|
|
13
|
+
import { Box } from '@mui/material';
|
|
14
|
+
import { Callout, useOdysseyDesignTokens } from '@okta/odyssey-react-mui';
|
|
14
15
|
import { IdxMessage } from '@okta/okta-auth-js';
|
|
15
16
|
import { FunctionComponent, h } from 'preact';
|
|
16
17
|
|
|
@@ -20,19 +21,24 @@ type Props = {
|
|
|
20
21
|
message?: IdxMessage;
|
|
21
22
|
};
|
|
22
23
|
|
|
23
|
-
const InfoSection: FunctionComponent<Props> = ({ message }) =>
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
severity={MessageTypeVariant[message.class as MessageType] ?? MessageTypeVariant.INFO}
|
|
31
|
-
variant="infobox"
|
|
24
|
+
const InfoSection: FunctionComponent<Props> = ({ message }) => {
|
|
25
|
+
const tokens = useOdysseyDesignTokens();
|
|
26
|
+
|
|
27
|
+
return (message ? (
|
|
28
|
+
<Box
|
|
29
|
+
marginBlockEnd={tokens.Spacing4}
|
|
30
|
+
width={1}
|
|
32
31
|
>
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
32
|
+
<Callout
|
|
33
|
+
key={message.i18n?.key || message.message}
|
|
34
|
+
severity={MessageTypeVariant[message.class as MessageType] ?? MessageTypeVariant.INFO}
|
|
35
|
+
// visually-hidden severity text is not translated
|
|
36
|
+
translate="no"
|
|
37
|
+
>
|
|
38
|
+
{message.message}
|
|
39
|
+
</Callout>
|
|
40
|
+
</Box>
|
|
41
|
+
) : null);
|
|
42
|
+
};
|
|
37
43
|
|
|
38
44
|
export default InfoSection;
|
|
@@ -10,12 +10,22 @@
|
|
|
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 { Typography, TypographyVariantValue } from '@okta/odyssey-react-mui';
|
|
14
15
|
import { h } from 'preact';
|
|
15
16
|
|
|
16
17
|
import { useHtmlContentParser } from '../../hooks';
|
|
17
18
|
import { DescriptionElement, UISchemaElementComponent } from '../../types';
|
|
18
19
|
|
|
20
|
+
const odyTypographyVariantMapping: Record<
|
|
21
|
+
'body1' | 'subtitle1' | 'legend',
|
|
22
|
+
TypographyVariantValue
|
|
23
|
+
> = {
|
|
24
|
+
body1: 'body',
|
|
25
|
+
subtitle1: 'subordinate',
|
|
26
|
+
legend: 'legend',
|
|
27
|
+
};
|
|
28
|
+
|
|
19
29
|
const InformationalText: UISchemaElementComponent<{
|
|
20
30
|
uischema: DescriptionElement
|
|
21
31
|
}> = ({
|
|
@@ -34,11 +44,11 @@ const InformationalText: UISchemaElementComponent<{
|
|
|
34
44
|
justifyContent="flex-start"
|
|
35
45
|
>
|
|
36
46
|
<Typography
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
47
|
+
component="p"
|
|
48
|
+
variant={variant ? odyTypographyVariantMapping[variant]
|
|
49
|
+
: odyTypographyVariantMapping.body1}
|
|
50
|
+
testId={dataSe || 'o-form-explain'}
|
|
51
|
+
translate={uischema.noTranslate ? 'no' : undefined}
|
|
42
52
|
>
|
|
43
53
|
{parsedContent}
|
|
44
54
|
</Typography>
|
|
@@ -10,20 +10,9 @@
|
|
|
10
10
|
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
import {
|
|
14
|
-
Box,
|
|
15
|
-
EyeIcon,
|
|
16
|
-
EyeOffIcon,
|
|
17
|
-
FormHelperText,
|
|
18
|
-
IconButton,
|
|
19
|
-
InputAdornment,
|
|
20
|
-
InputBase,
|
|
21
|
-
InputLabel,
|
|
22
|
-
Tooltip,
|
|
23
|
-
Typography,
|
|
24
|
-
} from '@okta/odyssey-react-mui';
|
|
13
|
+
import { PasswordField } from '@okta/odyssey-react-mui';
|
|
25
14
|
import { h } from 'preact';
|
|
26
|
-
import {
|
|
15
|
+
import { buildFieldLevelErrorMessages } from 'src/util/buildFieldLevelErrorMessages';
|
|
27
16
|
|
|
28
17
|
import { useWidgetContext } from '../../contexts';
|
|
29
18
|
import {
|
|
@@ -32,14 +21,16 @@ import {
|
|
|
32
21
|
useValue,
|
|
33
22
|
} from '../../hooks';
|
|
34
23
|
import {
|
|
24
|
+
AutoCompleteValue,
|
|
35
25
|
ChangeEvent,
|
|
36
26
|
UISchemaElementComponent,
|
|
37
27
|
UISchemaElementComponentWithValidationProps,
|
|
38
28
|
} from '../../types';
|
|
39
29
|
import { getTranslation } from '../../util';
|
|
40
|
-
import FieldLevelMessageContainer from '../FieldLevelMessageContainer';
|
|
41
30
|
import { withFormValidationState } from '../hocs';
|
|
42
31
|
|
|
32
|
+
type PasswordAutoCompleteValue = Extract<AutoCompleteValue, 'current-password' | 'new-password'> | undefined;
|
|
33
|
+
|
|
43
34
|
const InputPassword: UISchemaElementComponent<UISchemaElementComponentWithValidationProps> = ({
|
|
44
35
|
uischema,
|
|
45
36
|
errors,
|
|
@@ -59,168 +50,44 @@ const InputPassword: UISchemaElementComponent<UISchemaElementComponentWithValida
|
|
|
59
50
|
focus,
|
|
60
51
|
parserOptions,
|
|
61
52
|
noTranslate,
|
|
62
|
-
showAsterisk,
|
|
63
|
-
dir,
|
|
64
53
|
} = uischema;
|
|
65
54
|
const {
|
|
66
55
|
attributes,
|
|
67
56
|
inputMeta: { name, required },
|
|
68
57
|
} = uischema.options;
|
|
58
|
+
const { autocomplete } = attributes || {};
|
|
69
59
|
const label = getTranslation(translations, 'label');
|
|
70
60
|
const hint = getTranslation(translations, 'hint');
|
|
71
61
|
const explain = getTranslation(translations, 'bottomExplain');
|
|
72
|
-
const optionalLabel = getTranslation(translations, 'optionalLabel');
|
|
73
62
|
const focusRef = useAutoFocus<HTMLInputElement>(focus);
|
|
74
63
|
const parsedExplainContent = useHtmlContentParser(explain, parserOptions);
|
|
75
|
-
const
|
|
76
|
-
// TODO: OKTA-569647 - refactor logic
|
|
77
|
-
const hintId = hint && `${name}-hint`;
|
|
78
|
-
const explainId = explain && `${name}-explain`;
|
|
79
|
-
const ariaDescribedByIds = [describedByIds, hintId, explainId].filter(Boolean).join(' ')
|
|
80
|
-
|| undefined;
|
|
81
|
-
const [showPassword, setShowPassword] = useState<boolean>(false);
|
|
82
|
-
const showPasswordTimeoutRef = useRef<number | undefined>();
|
|
83
|
-
|
|
84
|
-
const handleClickShowPassword = () => {
|
|
85
|
-
setShowPassword(!showPassword);
|
|
86
|
-
|
|
87
|
-
if (showPasswordTimeoutRef.current) {
|
|
88
|
-
window.clearTimeout(showPasswordTimeoutRef.current);
|
|
89
|
-
}
|
|
90
|
-
// If the new value of showPassword is being set to true, set a 30-second timeout to auto-hide the password
|
|
91
|
-
// See: https://github.com/okta/okta-signin-widget#featuresshowpasswordtoggleonsigninpage
|
|
92
|
-
if (!showPassword) {
|
|
93
|
-
showPasswordTimeoutRef.current = window.setTimeout(() => {
|
|
94
|
-
setShowPassword(false);
|
|
95
|
-
}, 30000);
|
|
96
|
-
}
|
|
97
|
-
};
|
|
64
|
+
const { errorMessage, errorMessageList } = buildFieldLevelErrorMessages(errors);
|
|
98
65
|
|
|
99
66
|
return (
|
|
100
|
-
<
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
>
|
|
125
|
-
{optionalLabel}
|
|
126
|
-
</Typography>
|
|
127
|
-
)}
|
|
128
|
-
</InputLabel>
|
|
129
|
-
{hint && (
|
|
130
|
-
<FormHelperText
|
|
131
|
-
id={hintId}
|
|
132
|
-
className="o-form-explain"
|
|
133
|
-
data-se={hintId}
|
|
134
|
-
// TODO: OKTA-577905 - Temporary fix until we can upgrade to the latest version of Odyssey
|
|
135
|
-
sx={{ textAlign: 'start' }}
|
|
136
|
-
>
|
|
137
|
-
{hint}
|
|
138
|
-
</FormHelperText>
|
|
139
|
-
)}
|
|
140
|
-
<InputBase
|
|
141
|
-
id={name}
|
|
142
|
-
name={name}
|
|
143
|
-
error={hasErrors}
|
|
144
|
-
inputRef={focusRef}
|
|
145
|
-
onChange={(e: ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => {
|
|
146
|
-
handleChange?.(e.currentTarget.value);
|
|
147
|
-
}}
|
|
148
|
-
onBlur={(e: ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => {
|
|
149
|
-
handleBlur?.(e?.currentTarget?.value);
|
|
150
|
-
}}
|
|
151
|
-
type={showPassword ? 'text' : 'password'}
|
|
152
|
-
value={value}
|
|
153
|
-
disabled={loading}
|
|
154
|
-
fullWidth
|
|
155
|
-
inputProps={{
|
|
156
|
-
'data-se': name,
|
|
157
|
-
'aria-describedby': ariaDescribedByIds,
|
|
158
|
-
...attributes,
|
|
159
|
-
}}
|
|
160
|
-
className={noTranslate ? 'no-translate' : undefined}
|
|
161
|
-
dir={dir}
|
|
162
|
-
endAdornment={(
|
|
163
|
-
showPasswordToggleOnSignInPage && (
|
|
164
|
-
<InputAdornment
|
|
165
|
-
position="end"
|
|
166
|
-
// switching on the passed `dir` attribute is needed because plugin does not yet
|
|
167
|
-
// handle nested [dir="ltr"] inside [dir="rtl"] well so explicitly set physical
|
|
168
|
-
// properties when 'ltr' is passed onto this element, else can use logical
|
|
169
|
-
sx={(theme) => (dir === 'ltr' ? {
|
|
170
|
-
marginLeft: '8px',
|
|
171
|
-
marginRight: theme.spacing(2),
|
|
172
|
-
} : {
|
|
173
|
-
marginInlineEnd: theme.spacing(2),
|
|
174
|
-
marginInlineStart: '8px',
|
|
175
|
-
})}
|
|
176
|
-
>
|
|
177
|
-
<Tooltip
|
|
178
|
-
title={showPassword ? getTranslation(translations, 'hide') : getTranslation(translations, 'show')}
|
|
179
|
-
PopperProps={{
|
|
180
|
-
// keep the added tooltip element inside the SIW container
|
|
181
|
-
disablePortal: true,
|
|
182
|
-
}}
|
|
183
|
-
>
|
|
184
|
-
<IconButton
|
|
185
|
-
aria-label={getTranslation(translations, 'visibilityToggleLabel')}
|
|
186
|
-
aria-pressed={showPassword}
|
|
187
|
-
aria-controls={name}
|
|
188
|
-
onClick={handleClickShowPassword}
|
|
189
|
-
sx={{
|
|
190
|
-
// instead of using IconButton `edge="end"` we use this sx prop
|
|
191
|
-
// because `edge="end"` does not use logical properties
|
|
192
|
-
...(dir === 'ltr' ? { marginRight: '-12px' } : { marginInlineEnd: '-12px' }),
|
|
193
|
-
'&.Mui-focusVisible': {
|
|
194
|
-
outlineStyle: 'solid',
|
|
195
|
-
outlineWidth: '1px',
|
|
196
|
-
},
|
|
197
|
-
}}
|
|
198
|
-
>
|
|
199
|
-
{showPassword ? <EyeOffIcon /> : <EyeIcon />}
|
|
200
|
-
</IconButton>
|
|
201
|
-
</Tooltip>
|
|
202
|
-
</InputAdornment>
|
|
203
|
-
)
|
|
204
|
-
)}
|
|
205
|
-
/>
|
|
206
|
-
{hasErrors && (
|
|
207
|
-
<FieldLevelMessageContainer
|
|
208
|
-
messages={errors}
|
|
209
|
-
fieldName={name}
|
|
210
|
-
/>
|
|
211
|
-
)}
|
|
212
|
-
{explain && (
|
|
213
|
-
<FormHelperText
|
|
214
|
-
id={explainId}
|
|
215
|
-
className="o-form-explain"
|
|
216
|
-
data-se={explainId}
|
|
217
|
-
// TODO: OKTA-577905 - Temporary fix until we can upgrade to the latest version of Odyssey
|
|
218
|
-
sx={{ textAlign: 'start' }}
|
|
219
|
-
>
|
|
220
|
-
{parsedExplainContent}
|
|
221
|
-
</FormHelperText>
|
|
222
|
-
)}
|
|
223
|
-
</Box>
|
|
67
|
+
<PasswordField
|
|
68
|
+
ariaDescribedBy={describedByIds}
|
|
69
|
+
autoCompleteType={autocomplete as PasswordAutoCompleteValue}
|
|
70
|
+
errorMessage={errorMessage}
|
|
71
|
+
errorMessageList={errorMessageList}
|
|
72
|
+
hasShowPassword={showPasswordToggleOnSignInPage}
|
|
73
|
+
hint={hint ?? parsedExplainContent as string}
|
|
74
|
+
id={name}
|
|
75
|
+
inputRef={focusRef}
|
|
76
|
+
isDisabled={loading}
|
|
77
|
+
isFullWidth
|
|
78
|
+
isOptional={required === false}
|
|
79
|
+
name={name}
|
|
80
|
+
label={label ?? ''}
|
|
81
|
+
onChange={(e: ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => {
|
|
82
|
+
handleChange?.(e.currentTarget.value);
|
|
83
|
+
}}
|
|
84
|
+
onBlur={(e: ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => {
|
|
85
|
+
handleBlur?.(e?.currentTarget?.value);
|
|
86
|
+
}}
|
|
87
|
+
testId={name}
|
|
88
|
+
translate={noTranslate ? 'no' : undefined}
|
|
89
|
+
value={value as string ?? ''}
|
|
90
|
+
/>
|
|
224
91
|
);
|
|
225
92
|
};
|
|
226
93
|
|
|
@@ -10,14 +10,9 @@
|
|
|
10
10
|
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
import {
|
|
14
|
-
Box,
|
|
15
|
-
FormHelperText,
|
|
16
|
-
InputBase,
|
|
17
|
-
InputLabel,
|
|
18
|
-
Typography,
|
|
19
|
-
} from '@okta/odyssey-react-mui';
|
|
13
|
+
import { TextField } from '@okta/odyssey-react-mui';
|
|
20
14
|
import { h } from 'preact';
|
|
15
|
+
import { buildFieldLevelErrorMessages } from 'src/util/buildFieldLevelErrorMessages';
|
|
21
16
|
|
|
22
17
|
import { useWidgetContext } from '../../contexts';
|
|
23
18
|
import {
|
|
@@ -30,16 +25,13 @@ import {
|
|
|
30
25
|
UISchemaElementComponent, UISchemaElementComponentWithValidationProps,
|
|
31
26
|
} from '../../types';
|
|
32
27
|
import { getTranslation } from '../../util';
|
|
33
|
-
import FieldLevelMessageContainer from '../FieldLevelMessageContainer';
|
|
34
28
|
import { withFormValidationState } from '../hocs';
|
|
35
29
|
|
|
36
30
|
const InputText: UISchemaElementComponent<UISchemaElementComponentWithValidationProps> = ({
|
|
37
|
-
type,
|
|
38
31
|
uischema,
|
|
39
32
|
errors,
|
|
40
33
|
handleChange,
|
|
41
34
|
handleBlur,
|
|
42
|
-
describedByIds,
|
|
43
35
|
}) => {
|
|
44
36
|
const value = useValue(uischema);
|
|
45
37
|
const { loading } = useWidgetContext();
|
|
@@ -47,112 +39,44 @@ const InputText: UISchemaElementComponent<UISchemaElementComponentWithValidation
|
|
|
47
39
|
translations = [],
|
|
48
40
|
focus,
|
|
49
41
|
parserOptions,
|
|
50
|
-
showAsterisk,
|
|
51
|
-
dir,
|
|
52
42
|
} = uischema;
|
|
53
43
|
const label = getTranslation(translations, 'label');
|
|
54
44
|
const hint = getTranslation(translations, 'hint');
|
|
55
45
|
const explain = getTranslation(translations, 'bottomExplain');
|
|
56
|
-
const optionalLabel = getTranslation(translations, 'optionalLabel');
|
|
57
46
|
const {
|
|
58
47
|
attributes,
|
|
59
48
|
inputMeta: { name, required },
|
|
60
49
|
dataSe,
|
|
61
50
|
} = uischema.options;
|
|
51
|
+
const { autocomplete, inputmode } = attributes || {};
|
|
62
52
|
const focusRef = useAutoFocus<HTMLInputElement>(focus);
|
|
63
53
|
const parsedExplainContent = useHtmlContentParser(explain, parserOptions);
|
|
64
|
-
const
|
|
65
|
-
// TODO: OKTA-569647 - refactor logic
|
|
66
|
-
const hintId = hint && `${name}-hint`;
|
|
67
|
-
const explainId = explain && `${name}-explain`;
|
|
68
|
-
const ariaDescribedByIds = [describedByIds, hintId, explainId].filter(Boolean).join(' ')
|
|
69
|
-
|| undefined;
|
|
54
|
+
const { errorMessage, errorMessageList } = buildFieldLevelErrorMessages(errors);
|
|
70
55
|
|
|
71
56
|
return (
|
|
72
|
-
<
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
sx={{ whiteSpace: 'nowrap' }}
|
|
96
|
-
>
|
|
97
|
-
{optionalLabel}
|
|
98
|
-
</Typography>
|
|
99
|
-
)}
|
|
100
|
-
</InputLabel>
|
|
101
|
-
{
|
|
102
|
-
hint && (
|
|
103
|
-
<FormHelperText
|
|
104
|
-
id={hintId}
|
|
105
|
-
className="o-form-explain"
|
|
106
|
-
data-se={hintId}
|
|
107
|
-
// TODO: OKTA-577905 - Temporary fix until we can upgrade to the latest version of Odyssey
|
|
108
|
-
sx={{ textAlign: 'start' }}
|
|
109
|
-
>
|
|
110
|
-
{hint}
|
|
111
|
-
</FormHelperText>
|
|
112
|
-
)
|
|
113
|
-
}
|
|
114
|
-
<InputBase
|
|
115
|
-
value={value}
|
|
116
|
-
type={type || 'text'}
|
|
117
|
-
id={name}
|
|
118
|
-
name={name}
|
|
119
|
-
error={hasErrors}
|
|
120
|
-
onChange={(e: ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => {
|
|
121
|
-
handleChange?.(e.currentTarget.value);
|
|
122
|
-
}}
|
|
123
|
-
onBlur={(e: ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => {
|
|
124
|
-
handleBlur?.(e?.currentTarget?.value);
|
|
125
|
-
}}
|
|
126
|
-
disabled={loading}
|
|
127
|
-
fullWidth
|
|
128
|
-
inputProps={{
|
|
129
|
-
'data-se': dataSe,
|
|
130
|
-
'aria-describedby': ariaDescribedByIds,
|
|
131
|
-
...attributes,
|
|
132
|
-
}}
|
|
133
|
-
inputRef={focusRef}
|
|
134
|
-
dir={dir}
|
|
135
|
-
/>
|
|
136
|
-
{hasErrors && (
|
|
137
|
-
<FieldLevelMessageContainer
|
|
138
|
-
messages={errors}
|
|
139
|
-
fieldName={name}
|
|
140
|
-
/>
|
|
141
|
-
)}
|
|
142
|
-
{
|
|
143
|
-
explain && (
|
|
144
|
-
<FormHelperText
|
|
145
|
-
id={explainId}
|
|
146
|
-
className="o-form-explain"
|
|
147
|
-
data-se={explainId}
|
|
148
|
-
// TODO: OKTA-577905 - Temporary fix until we can upgrade to the latest version of Odyssey
|
|
149
|
-
sx={{ textAlign: 'start' }}
|
|
150
|
-
>
|
|
151
|
-
{parsedExplainContent}
|
|
152
|
-
</FormHelperText>
|
|
153
|
-
)
|
|
154
|
-
}
|
|
155
|
-
</Box>
|
|
57
|
+
<TextField
|
|
58
|
+
autoCompleteType={autocomplete}
|
|
59
|
+
errorMessage={errorMessage}
|
|
60
|
+
errorMessageList={errorMessageList}
|
|
61
|
+
hint={hint ?? parsedExplainContent as string}
|
|
62
|
+
id={name}
|
|
63
|
+
inputRef={focusRef}
|
|
64
|
+
inputMode={inputmode}
|
|
65
|
+
isDisabled={loading}
|
|
66
|
+
isFullWidth
|
|
67
|
+
isOptional={required === false}
|
|
68
|
+
name={name}
|
|
69
|
+
label={label ?? ''}
|
|
70
|
+
onChange={(e: ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => {
|
|
71
|
+
handleChange?.(e.currentTarget.value);
|
|
72
|
+
}}
|
|
73
|
+
onBlur={(e: ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => {
|
|
74
|
+
handleBlur?.(e?.currentTarget?.value);
|
|
75
|
+
}}
|
|
76
|
+
testId={dataSe}
|
|
77
|
+
type="text"
|
|
78
|
+
value={value as string ?? ''}
|
|
79
|
+
/>
|
|
156
80
|
);
|
|
157
81
|
};
|
|
158
82
|
|