@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
|
@@ -13,42 +13,37 @@
|
|
|
13
13
|
import {
|
|
14
14
|
GlobalStyles as MuiGlobalStyles,
|
|
15
15
|
GlobalStylesProps,
|
|
16
|
-
Theme,
|
|
17
16
|
} from '@mui/material';
|
|
17
|
+
import { DesignTokens, useOdysseyDesignTokens } from '@okta/odyssey-react-mui';
|
|
18
18
|
import { FunctionComponent, h } from 'preact';
|
|
19
19
|
|
|
20
20
|
// TODO we could scope these to just widget container
|
|
21
|
-
const svgStyles = (
|
|
21
|
+
const svgStyles = (tokens: DesignTokens): GlobalStylesProps['styles'] => ({
|
|
22
22
|
'.siwFillPrimary': {
|
|
23
|
-
fill:
|
|
23
|
+
fill: tokens.PalettePrimaryMain,
|
|
24
24
|
},
|
|
25
25
|
'.siwFillPrimaryDark': {
|
|
26
|
-
fill:
|
|
26
|
+
fill: tokens.PalettePrimaryDark,
|
|
27
27
|
},
|
|
28
28
|
'.siwFillSecondary': {
|
|
29
|
-
fill:
|
|
30
|
-
},
|
|
31
|
-
'.siwFillBg': {
|
|
32
|
-
fill: theme.palette.grey[50],
|
|
33
|
-
},
|
|
34
|
-
'.siwIconFillPrimary': {
|
|
35
|
-
fill: theme.palette.primary.main,
|
|
36
|
-
},
|
|
37
|
-
'.siwIconStrokePrimary': {
|
|
38
|
-
stroke: theme.palette.primary.main,
|
|
29
|
+
fill: tokens.PalettePrimaryLight,
|
|
39
30
|
},
|
|
40
31
|
'.siwIconFillPrimaryDark': {
|
|
41
|
-
fill:
|
|
32
|
+
fill: tokens.PalettePrimaryDark,
|
|
42
33
|
},
|
|
43
34
|
'.siwIconFillSecondary': {
|
|
44
|
-
fill:
|
|
35
|
+
fill: tokens.PalettePrimaryLight,
|
|
45
36
|
},
|
|
46
37
|
});
|
|
47
38
|
|
|
48
|
-
const GlobalStyles: FunctionComponent = () =>
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
39
|
+
const GlobalStyles: FunctionComponent = () => {
|
|
40
|
+
const tokens = useOdysseyDesignTokens();
|
|
41
|
+
|
|
42
|
+
return (
|
|
43
|
+
<MuiGlobalStyles
|
|
44
|
+
styles={svgStyles(tokens)}
|
|
45
|
+
/>
|
|
46
|
+
);
|
|
47
|
+
};
|
|
53
48
|
|
|
54
49
|
export default GlobalStyles;
|
|
@@ -10,12 +10,11 @@
|
|
|
10
10
|
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
// NOTE: Do not remove this import of style.
|
|
13
|
+
// NOTE: Do not remove this import of style.scss!
|
|
14
14
|
// We need to emit a CSS file, even if it's empty, to prevent a 404 on the Okta-hosted login page.
|
|
15
|
-
import './style.
|
|
15
|
+
import './style.scss';
|
|
16
16
|
|
|
17
|
-
import {
|
|
18
|
-
import { MuiThemeProvider } from '@okta/odyssey-react-mui';
|
|
17
|
+
import { OdysseyProvider, TranslationOverrides } from '@okta/odyssey-react-mui';
|
|
19
18
|
import {
|
|
20
19
|
AuthApiError,
|
|
21
20
|
AuthenticatorKey,
|
|
@@ -63,6 +62,7 @@ import {
|
|
|
63
62
|
extractPageTitle,
|
|
64
63
|
getLanguageCode,
|
|
65
64
|
getLanguageDirection,
|
|
65
|
+
getOdysseyTranslationOverrides,
|
|
66
66
|
isAndroidOrIOS,
|
|
67
67
|
isAuthClientSet,
|
|
68
68
|
isConfigRegisterFlow,
|
|
@@ -73,12 +73,12 @@ import {
|
|
|
73
73
|
triggerEmailVerifyCallback,
|
|
74
74
|
} from '../../util';
|
|
75
75
|
import { getEventContext } from '../../util/getEventContext';
|
|
76
|
-
import {
|
|
76
|
+
import { stylisPlugins } from '../../util/stylisPlugins';
|
|
77
|
+
import { createThemeAndTokens } from '../../util/theme';
|
|
77
78
|
import AuthContainer from '../AuthContainer/AuthContainer';
|
|
78
79
|
import AuthContent from '../AuthContent/AuthContent';
|
|
79
80
|
import AuthHeader from '../AuthHeader/AuthHeader';
|
|
80
81
|
import ConsentHeader from '../ConsentHeader';
|
|
81
|
-
import CustomPluginsOdysseyCacheProvider from '../CustomPluginsOdysseyCacheProvider';
|
|
82
82
|
import Form from '../Form';
|
|
83
83
|
import Spinner from '../Spinner';
|
|
84
84
|
import GlobalStyles from './GlobalStyles';
|
|
@@ -132,12 +132,21 @@ export const Widget: FunctionComponent<WidgetProps> = (widgetProps) => {
|
|
|
132
132
|
const languageCode = getLanguageCode(widgetProps);
|
|
133
133
|
const languageDirection = getLanguageDirection(languageCode);
|
|
134
134
|
const { stateHandle, unsetStateHandle } = useStateHandle(widgetProps);
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
135
|
+
const [odyTranslationOverrides, setOdyTranslationOverrides] = useState<
|
|
136
|
+
TranslationOverrides<string> | undefined>();
|
|
137
|
+
// Odyssey language codes use '_' instead of '-' (e.g. zh-CN -> zh_CN)
|
|
138
|
+
const odyLanguageCode: string = languageCode.replace('-', '_');
|
|
139
|
+
|
|
140
|
+
const { theme, tokens } = useMemo(() => {
|
|
141
|
+
const { themeOverride, tokensOverride } = createThemeAndTokens(
|
|
142
|
+
brandColors,
|
|
143
|
+
customTheme?.tokens ?? {},
|
|
144
|
+
);
|
|
145
|
+
return {
|
|
146
|
+
theme: mergeThemes(themeOverride, { direction: languageDirection }),
|
|
147
|
+
tokens: tokensOverride,
|
|
148
|
+
};
|
|
149
|
+
}, [brandColors, customTheme, languageDirection]);
|
|
141
150
|
|
|
142
151
|
// on unmount, remove the language
|
|
143
152
|
useEffect(() => () => {
|
|
@@ -150,6 +159,9 @@ export const Widget: FunctionComponent<WidgetProps> = (widgetProps) => {
|
|
|
150
159
|
const initLanguage = useCallback(async () => {
|
|
151
160
|
if (!Bundles.isLoaded(languageCode)) {
|
|
152
161
|
await loadLanguage(widgetProps);
|
|
162
|
+
setOdyTranslationOverrides({
|
|
163
|
+
[odyLanguageCode]: getOdysseyTranslationOverrides(),
|
|
164
|
+
});
|
|
153
165
|
}
|
|
154
166
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
155
167
|
}, []);
|
|
@@ -493,30 +505,33 @@ export const Widget: FunctionComponent<WidgetProps> = (widgetProps) => {
|
|
|
493
505
|
languageDirection,
|
|
494
506
|
}}
|
|
495
507
|
>
|
|
496
|
-
<
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
508
|
+
<OdysseyProvider
|
|
509
|
+
themeOverride={theme}
|
|
510
|
+
designTokensOverride={tokens}
|
|
511
|
+
languageCode={odyLanguageCode}
|
|
512
|
+
translationOverrides={odyTranslationOverrides}
|
|
513
|
+
nonce={cspNonce}
|
|
514
|
+
stylisPlugins={stylisPlugins}
|
|
515
|
+
>
|
|
516
|
+
<GlobalStyles />
|
|
517
|
+
{/* the style is to allow the widget to inherit the parent's bg color */}
|
|
518
|
+
<AuthContainer hide={hide}>
|
|
519
|
+
<AuthHeader
|
|
520
|
+
logo={logo}
|
|
521
|
+
logoText={logoText}
|
|
522
|
+
brandName={brandName}
|
|
523
|
+
authCoinProps={buildAuthCoinProps(idxTransaction)}
|
|
524
|
+
/>
|
|
525
|
+
<AuthContent>
|
|
526
|
+
{isConsentStep(idxTransaction) && <ConsentHeader />}
|
|
527
|
+
{
|
|
528
|
+
uischema.elements.length > 0
|
|
529
|
+
? <Form uischema={uischema as UISchemaLayout} />
|
|
530
|
+
: <Spinner />
|
|
531
|
+
}
|
|
532
|
+
</AuthContent>
|
|
533
|
+
</AuthContainer>
|
|
534
|
+
</OdysseyProvider>
|
|
520
535
|
</WidgetContextProvider>
|
|
521
536
|
);
|
|
522
537
|
};
|
|
@@ -0,0 +1,295 @@
|
|
|
1
|
+
/* TODO: move loginpage styles out of SIW repo OKTA-602545 */
|
|
2
|
+
|
|
3
|
+
@use 'sass:map';
|
|
4
|
+
@import '@okta/odyssey-design-tokens/dist/index.scss';
|
|
5
|
+
|
|
6
|
+
/* loginpage utility styles */
|
|
7
|
+
.clearfix {
|
|
8
|
+
display: block;
|
|
9
|
+
}
|
|
10
|
+
.clearfix:after,
|
|
11
|
+
.clearfix:before {
|
|
12
|
+
display: block;
|
|
13
|
+
block-size: 0;
|
|
14
|
+
clear: both;
|
|
15
|
+
content: ".";
|
|
16
|
+
visibility: hidden;
|
|
17
|
+
}
|
|
18
|
+
.hide {
|
|
19
|
+
display: none;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.okta-container {
|
|
23
|
+
margin: 0;
|
|
24
|
+
block-size: inherit;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.auth .footer, .okta-container .applogin-banner {
|
|
28
|
+
font-family: map.get($ods-tokens, 'typography', 'family', 'body');
|
|
29
|
+
|
|
30
|
+
&:lang(el) {
|
|
31
|
+
font-family: 'Noto Sans', sans-serif;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
&:lang(ja) {
|
|
35
|
+
font-family: 'Noto Sans JP', sans-serif;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
&:lang(ko) {
|
|
39
|
+
font-family: 'Noto Sans KR', sans-serif;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
&:lang(th) {
|
|
43
|
+
font-family: 'Noto Sans Thai', sans-serif;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
&:lang(zh-CN) {
|
|
47
|
+
font-family: 'Noto Sans SC', sans-serif;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
&:lang(zh-TW) {
|
|
51
|
+
font-family: 'Noto Sans TC', sans-serif;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/* loginpage footer styles */
|
|
56
|
+
.auth .footer {
|
|
57
|
+
position: fixed;
|
|
58
|
+
inset-block-end: 0;
|
|
59
|
+
background-color: #fff;
|
|
60
|
+
min-inline-size: 300px;
|
|
61
|
+
font-size: map.get($ods-tokens, 'typography', 'size', 'subordinate');
|
|
62
|
+
color: map.get($ods-tokens, 'typography', 'color', 'subordinate');
|
|
63
|
+
inset-inline: 0;
|
|
64
|
+
inset-block-end: 0;
|
|
65
|
+
overflow: hidden;
|
|
66
|
+
margin-block-start: map.get($ods-tokens, spacing, '8');
|
|
67
|
+
background-color: map.get($ods-tokens, 'hue', 'neutral', '50');
|
|
68
|
+
border-block-start: map.get($ods-tokens, 'border', 'width', 'main') solid map.get($ods-tokens, 'border', 'color', 'display');
|
|
69
|
+
p {
|
|
70
|
+
margin-block: map.get($ods-tokens, 'spacing', '3');
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
.auth .footer .footer-container {
|
|
74
|
+
padding-inline: map.get($ods-tokens, spacing, '8');
|
|
75
|
+
margin-inline: auto;
|
|
76
|
+
box-sizing: border-box;
|
|
77
|
+
}
|
|
78
|
+
@media only screen and (max-width: 560px) {
|
|
79
|
+
.auth .footer .footer-container {
|
|
80
|
+
inline-size: 400px;
|
|
81
|
+
padding-inline: 20px;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
@media only screen and (max-width: 400px) {
|
|
85
|
+
.auth .footer .footer-container {
|
|
86
|
+
inline-size: 100%;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
.auth .footer a {
|
|
90
|
+
color: #6e6e78;
|
|
91
|
+
}
|
|
92
|
+
.auth .footer a:active,
|
|
93
|
+
.auth .footer a:link,
|
|
94
|
+
.auth .footer a:visited {
|
|
95
|
+
color: #6e6e78;
|
|
96
|
+
}
|
|
97
|
+
.auth .footer a:focus,
|
|
98
|
+
.auth .footer a:hover {
|
|
99
|
+
text-decoration: underline;
|
|
100
|
+
color: #6e6e78;
|
|
101
|
+
}
|
|
102
|
+
.auth .footer .copyright {
|
|
103
|
+
/* stylelint-disable-next-line liberty/use-logical-spec */
|
|
104
|
+
float: left;
|
|
105
|
+
/* TODO: OKTA-586564 replace hardcoded value */
|
|
106
|
+
color: #6e6e78;
|
|
107
|
+
}
|
|
108
|
+
.auth .footer .copyright a {
|
|
109
|
+
/* TODO: OKTA-586564 replace hardcoded value */
|
|
110
|
+
color: #6e6e78;
|
|
111
|
+
}
|
|
112
|
+
.auth .footer .privacy-policy {
|
|
113
|
+
/* stylelint-disable-next-line liberty/use-logical-spec */
|
|
114
|
+
float: right;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/* loginpage app banner styles */
|
|
118
|
+
.okta-container .applogin-banner {
|
|
119
|
+
font-size: map.get($ods-tokens, 'typography', 'size', 'body');
|
|
120
|
+
color: map.get($ods-tokens, 'typography', 'color', 'subordinate');
|
|
121
|
+
position: relative;
|
|
122
|
+
min-inline-size: 300px;
|
|
123
|
+
border-block-end: map.get($ods-tokens, 'border', 'width', 'main') solid map.get($ods-tokens, 'border', 'color', 'display');
|
|
124
|
+
}
|
|
125
|
+
.okta-container .applogin-banner .applogin-background {
|
|
126
|
+
background-color: #fff;
|
|
127
|
+
opacity: 0.9;
|
|
128
|
+
position: absolute;
|
|
129
|
+
inset: 0;
|
|
130
|
+
box-shadow: 0 0 2px 1px hsla(0, 0%, 68.6%, 0.3);
|
|
131
|
+
}
|
|
132
|
+
.okta-container .applogin-banner .applogin-container {
|
|
133
|
+
position: relative;
|
|
134
|
+
inline-size: 400px;
|
|
135
|
+
min-inline-size: 300px;
|
|
136
|
+
margin-block: 0;
|
|
137
|
+
margin-inline: auto;
|
|
138
|
+
padding-block: map.get($ods-tokens, spacing, '3') map.get($ods-tokens, spacing, '4');
|
|
139
|
+
padding-inline: 0;
|
|
140
|
+
box-sizing: border-box;
|
|
141
|
+
text-align: center;
|
|
142
|
+
}
|
|
143
|
+
.okta-container .applogin-banner .applogin-container p {
|
|
144
|
+
/* TODO: OKTA-586564 replace hardcoded value */
|
|
145
|
+
color: #6e6e78;
|
|
146
|
+
margin-block: 0;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
@media only screen and (max-width: 400px) {
|
|
150
|
+
.okta-container .applogin-banner .applogin-container {
|
|
151
|
+
inline-size: 100%;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
@media only screen and (max-height: 750px) {
|
|
155
|
+
.okta-container .applogin-banner .applogin-container {
|
|
156
|
+
padding-block: 10px;
|
|
157
|
+
padding-inline: 0;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
@media only screen and (max-height: 660px) {
|
|
161
|
+
.okta-container .applogin-banner .applogin-container {
|
|
162
|
+
padding-block: 5px;
|
|
163
|
+
padding-inline: 0;
|
|
164
|
+
}
|
|
165
|
+
.okta-container .applogin-banner .applogin-container p {
|
|
166
|
+
display: none;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
.okta-container .applogin-banner .applogin-container h1 {
|
|
170
|
+
margin-block: 0;
|
|
171
|
+
}
|
|
172
|
+
.okta-container .applogin-banner .applogin-app-title {
|
|
173
|
+
display: none;
|
|
174
|
+
}
|
|
175
|
+
.okta-container .applogin-banner .applogin-app-logo {
|
|
176
|
+
display: inline-block;
|
|
177
|
+
vertical-align: middle;
|
|
178
|
+
margin-block-end: map.get($ods-tokens, 'spacing', '2');
|
|
179
|
+
}
|
|
180
|
+
.okta-container .applogin-banner .applogin-app-logo img {
|
|
181
|
+
inline-size: map.get($ods-tokens, 'spacing', '8');
|
|
182
|
+
block-size: map.get($ods-tokens, 'spacing', '8');
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
/* loginpage container styles */
|
|
186
|
+
.auth .content {
|
|
187
|
+
min-block-size: 100%;
|
|
188
|
+
min-inline-size: 300px;
|
|
189
|
+
display: inline-block;
|
|
190
|
+
inline-size: 100%;
|
|
191
|
+
}
|
|
192
|
+
.auth .content:after {
|
|
193
|
+
content: "";
|
|
194
|
+
display: block;
|
|
195
|
+
block-size: 30px;
|
|
196
|
+
}
|
|
197
|
+
.login-bg-image {
|
|
198
|
+
background-repeat: no-repeat;
|
|
199
|
+
background-position: 50%;
|
|
200
|
+
background-size: cover;
|
|
201
|
+
position: fixed;
|
|
202
|
+
inset: 0;
|
|
203
|
+
z-index: -5;
|
|
204
|
+
}
|
|
205
|
+
@media only screen and (max-width: 600px) {
|
|
206
|
+
.login-bg-image {
|
|
207
|
+
background-image: none !important;
|
|
208
|
+
background-color: #fff !important;
|
|
209
|
+
-webkit-filter: unset !important;
|
|
210
|
+
filter: unset !important;
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
/* signin container styles */
|
|
215
|
+
#signin-container {
|
|
216
|
+
margin-block: map.get($ods-tokens, 'spacing', '8');
|
|
217
|
+
}
|
|
218
|
+
@media only screen and (max-width: 600px) {
|
|
219
|
+
#signin-container {
|
|
220
|
+
margin-block: map.get($ods-tokens, 'spacing', '2');
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
/* back to settings button style */
|
|
225
|
+
.back-to-settings {
|
|
226
|
+
margin: unset !important;
|
|
227
|
+
min-block-size: unset !important;
|
|
228
|
+
inline-size: unset !important;
|
|
229
|
+
min-inline-size: unset !important;
|
|
230
|
+
.back-to-settings-link {
|
|
231
|
+
position: unset !important;
|
|
232
|
+
inset-block-start: unset !important;
|
|
233
|
+
a {
|
|
234
|
+
font-family: map.get($ods-tokens, 'typography', 'family', 'button');
|
|
235
|
+
position: absolute;
|
|
236
|
+
padding-block: 10px;
|
|
237
|
+
padding-inline: 14px;
|
|
238
|
+
display: inline-block;
|
|
239
|
+
inset-block-start: map.get($ods-tokens, 'spacing', '8');
|
|
240
|
+
inset-inline-start: map.get($ods-tokens, 'spacing', '8');
|
|
241
|
+
block-size: unset;
|
|
242
|
+
line-height: unset;
|
|
243
|
+
text-decoration: none;
|
|
244
|
+
color: #000;
|
|
245
|
+
background-color: #fff;
|
|
246
|
+
border: solid map.get($ods-tokens, 'border', 'width', 'main') map.get($ods-tokens, 'border', 'color', 'display');
|
|
247
|
+
border-radius: map.get($ods-tokens, 'border', 'radius', 'main');
|
|
248
|
+
opacity: 1;
|
|
249
|
+
|
|
250
|
+
&:hover {
|
|
251
|
+
background-color: map.get($ods-tokens, 'hue', 'blue', '100');
|
|
252
|
+
border: solid map.get($ods-tokens, 'border', 'width', 'main') map.get($ods-tokens, 'border', 'color', 'control');
|
|
253
|
+
}
|
|
254
|
+
&:active {
|
|
255
|
+
background-color: map.get($ods-tokens, 'hue', 'blue', '300');
|
|
256
|
+
border: solid map.get($ods-tokens, 'border', 'width', 'main') map.get($ods-tokens, 'border', 'color', 'primary', 'dark');
|
|
257
|
+
}
|
|
258
|
+
&:focus-visible {
|
|
259
|
+
background-color: map.get($ods-tokens, 'hue', 'blue', '300');
|
|
260
|
+
border: solid map.get($ods-tokens, 'border', 'width', 'main') map.get($ods-tokens, 'border', 'color', 'control');
|
|
261
|
+
outline: map.get($ods-tokens, 'focus', 'outline', 'width', 'main') solid map.get($ods-tokens, 'focus', 'outline', 'color', 'primary');
|
|
262
|
+
outline-offset: 2px;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
img {
|
|
266
|
+
padding-inline-end: map.get($ods-tokens, 'spacing', '3');
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
@media only screen and (max-width: 600px) {
|
|
272
|
+
.back-to-settings .back-to-settings-link a {
|
|
273
|
+
position: relative;
|
|
274
|
+
display: inline-block;
|
|
275
|
+
inset-block-start: unset;
|
|
276
|
+
inset-inline-start: unset;
|
|
277
|
+
margin-inline: map.get($ods-tokens, 'spacing', '3');
|
|
278
|
+
margin-block-start: map.get($ods-tokens, 'spacing', '3');
|
|
279
|
+
margin-block-end: map.get($ods-tokens, 'spacing', '1');
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
/*
|
|
284
|
+
* NOTE: widget styles below, login page styles above. Take care when moving CSS
|
|
285
|
+
* from SIW to loginpage (okta-ui) in OKTA-602545
|
|
286
|
+
*
|
|
287
|
+
* TODO: OKTA-654405
|
|
288
|
+
*/
|
|
289
|
+
span.strong {
|
|
290
|
+
font-weight: 600;
|
|
291
|
+
word-break: break-all;
|
|
292
|
+
}
|
|
293
|
+
span.no-translate {
|
|
294
|
+
white-space: nowrap;
|
|
295
|
+
}
|
|
@@ -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, ListItem } from '@mui/material';
|
|
14
|
-
import {
|
|
13
|
+
import { Box, List, ListItem } from '@mui/material';
|
|
14
|
+
import { Link, Typography, useOdysseyDesignTokens } from '@okta/odyssey-react-mui';
|
|
15
15
|
import { HTMLReactParserOptions } from 'html-react-parser';
|
|
16
16
|
import { FunctionComponent, h } from 'preact';
|
|
17
17
|
import React from 'preact/compat';
|
|
@@ -22,9 +22,10 @@ import { ListStyleType, WidgetMessage, WidgetMessageLink } from '../../types';
|
|
|
22
22
|
const WidgetMessageContainer: FunctionComponent<{
|
|
23
23
|
message?: WidgetMessage,
|
|
24
24
|
parserOptions?: HTMLReactParserOptions,
|
|
25
|
-
linkVariant?: 'monochrome' | '
|
|
25
|
+
linkVariant?: 'monochrome' | 'default',
|
|
26
26
|
}> = (props) => {
|
|
27
27
|
const { message, parserOptions, linkVariant } = props;
|
|
28
|
+
const tokens = useOdysseyDesignTokens();
|
|
28
29
|
|
|
29
30
|
const renderTitle = (title?: string) => (title && (
|
|
30
31
|
<Typography
|
|
@@ -37,10 +38,13 @@ const WidgetMessageContainer: FunctionComponent<{
|
|
|
37
38
|
|
|
38
39
|
const renderLinks = (links?: WidgetMessageLink[], listStyleType?: ListStyleType) => (links && (
|
|
39
40
|
<List
|
|
40
|
-
|
|
41
|
+
data-se="custom-links"
|
|
41
42
|
disablePadding
|
|
42
43
|
dense
|
|
43
|
-
sx={{
|
|
44
|
+
sx={{
|
|
45
|
+
pl: listStyleType ? tokens.Spacing4 : tokens.Spacing0,
|
|
46
|
+
listStyle: listStyleType ?? 'none',
|
|
47
|
+
}}
|
|
44
48
|
>
|
|
45
49
|
{links.map((link) => (
|
|
46
50
|
<ListItem
|
|
@@ -64,12 +68,11 @@ const WidgetMessageContainer: FunctionComponent<{
|
|
|
64
68
|
));
|
|
65
69
|
|
|
66
70
|
const createListMessages = (widgetMsg: WidgetMessage) => (
|
|
67
|
-
<Box marginBlockStart={
|
|
71
|
+
<Box marginBlockStart={tokens.Spacing2}>
|
|
68
72
|
{
|
|
69
73
|
widgetMsg.description && (
|
|
70
74
|
<Typography
|
|
71
75
|
component="p"
|
|
72
|
-
fontSize="inherit"
|
|
73
76
|
>
|
|
74
77
|
{widgetMsg.description}
|
|
75
78
|
</Typography>
|
|
@@ -78,7 +81,7 @@ const WidgetMessageContainer: FunctionComponent<{
|
|
|
78
81
|
<List
|
|
79
82
|
dense
|
|
80
83
|
disablePadding
|
|
81
|
-
sx={{ listStyle: widgetMsg.listStyleType ?? 'disc', paddingInlineStart:
|
|
84
|
+
sx={{ listStyle: widgetMsg.listStyleType ?? 'disc', paddingInlineStart: tokens.Spacing4 }}
|
|
82
85
|
>
|
|
83
86
|
{
|
|
84
87
|
(widgetMsg.message as WidgetMessage[])?.map((wm: WidgetMessage) => {
|
|
@@ -15,7 +15,7 @@ import { useEffect, useState } from 'preact/hooks';
|
|
|
15
15
|
|
|
16
16
|
import { useFormFieldValidation, useOnChange } from '../../hooks';
|
|
17
17
|
import { FieldElement, UISchemaElementComponent, WidgetMessage } from '../../types';
|
|
18
|
-
import {
|
|
18
|
+
import { convertIdxMessageToWidgetMessage } from '../../util';
|
|
19
19
|
import { getDisplayName } from './getDisplayName';
|
|
20
20
|
|
|
21
21
|
export type RendererComponent<T> = {
|
|
@@ -46,7 +46,6 @@ export const withFormValidationState: WrappedFunctionComponent<
|
|
|
46
46
|
ariaDescribedBy,
|
|
47
47
|
options: {
|
|
48
48
|
inputMeta: {
|
|
49
|
-
name,
|
|
50
49
|
// @ts-ignore TODO: OKTA-539834 - messages missing from type
|
|
51
50
|
messages = {},
|
|
52
51
|
},
|
|
@@ -84,9 +83,7 @@ export const withFormValidationState: WrappedFunctionComponent<
|
|
|
84
83
|
onValidateHandler,
|
|
85
84
|
handleChange,
|
|
86
85
|
handleBlur,
|
|
87
|
-
describedByIds:
|
|
88
|
-
? ariaDescribedBy
|
|
89
|
-
: ` ${buildErrorMessageIds(fieldErrors, name)} ${ariaDescribedBy || ''} `,
|
|
86
|
+
describedByIds: ariaDescribedBy,
|
|
90
87
|
};
|
|
91
88
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
92
89
|
return <Component {...combinedProps} />;
|
package/src/v3/jest.config.js
CHANGED
|
@@ -67,6 +67,7 @@ module.exports = {
|
|
|
67
67
|
'^react/jsx-runtime$': 'preact/jsx-runtime',
|
|
68
68
|
'^create-react-class$': 'preact/compat/lib/create-react-class',
|
|
69
69
|
'^react-addons-css-transition-group$': 'preact-css-transition-group',
|
|
70
|
+
'^@okta/odyssey-react-mui/icons$': '<rootDir>/../../node_modules/@okta/odyssey-react-mui/dist/icons.generated/index.js',
|
|
70
71
|
},
|
|
71
72
|
|
|
72
73
|
modulePaths: [
|
package/src/v3/jest.setup.js
CHANGED
package/src/v3/package.json
CHANGED
|
@@ -24,19 +24,22 @@
|
|
|
24
24
|
"dev": "yarn codegen && webpack-dev-server --config webpack.dev.config.ts",
|
|
25
25
|
"lint": "yarn codegen && eslint .",
|
|
26
26
|
"lint:report": "scripts/buildtools/lint-report.sh",
|
|
27
|
-
"lint:styles": "stylelint **/*.css",
|
|
28
|
-
"lint:styles:report": "stylelint **/*.css --custom-formatter ../../node_modules/stylelint-checkstyle-formatter -o build2/reports/lint/OSW-stylelint-checkstyle-result.xml --quiet",
|
|
27
|
+
"lint:styles": "stylelint **/*.{scss,css}",
|
|
28
|
+
"lint:styles:report": "stylelint **/*.{scss,css} --custom-formatter ../../node_modules/stylelint-checkstyle-formatter -o build2/reports/lint/OSW-stylelint-checkstyle-result.xml --quiet",
|
|
29
29
|
"test": "yarn codegen && jest",
|
|
30
30
|
"test:dev": "NODE_ENV=development jest",
|
|
31
31
|
"test:e2e": "testcafe test/e2e/tests/**/*.js --config-file test/e2e/.testcaferc.js",
|
|
32
32
|
"test:e2e:screenshots": "yarn test:e2e -s path=test/e2e/screenshots,thumbnails=false",
|
|
33
|
-
"test:report": "PREACT_APP_USE_PKCE=false NODE_ENV=test jest --coverage"
|
|
33
|
+
"test:report": "PREACT_APP_USE_PKCE=false NODE_ENV=test jest --coverage",
|
|
34
|
+
"test:vrt": "testcafe \"chrome:headless --force-device-scale-factor=1\" --config-file test/vrt/.testcaferc.js",
|
|
35
|
+
"test:vrt-update-screenshots": "UPDATE_SCREENSHOTS=true yarn test:vrt"
|
|
34
36
|
},
|
|
35
37
|
"browserslist": [
|
|
36
38
|
"defaults",
|
|
37
39
|
"ie 11"
|
|
38
40
|
],
|
|
39
41
|
"dependencies": {
|
|
42
|
+
"@adobe/leonardo-contrast-colors": "1.0.0-alpha.13",
|
|
40
43
|
"@babel/runtime": "^7.18.6",
|
|
41
44
|
"@emotion/cache": "^11.9.3",
|
|
42
45
|
"@emotion/react": "^11.9.3",
|
|
@@ -44,11 +47,10 @@
|
|
|
44
47
|
"@hcaptcha/react-hcaptcha": "^1.8.1",
|
|
45
48
|
"@mui/icons-material": "^5.8.4",
|
|
46
49
|
"@mui/material": "^5.8.5",
|
|
47
|
-
"@okta/odyssey-design-tokens": "
|
|
48
|
-
"@okta/odyssey-react-mui": "
|
|
50
|
+
"@okta/odyssey-design-tokens": "1.13.0",
|
|
51
|
+
"@okta/odyssey-react-mui": "1.13.0",
|
|
49
52
|
"@okta/okta-auth-js": "^7.4.3",
|
|
50
53
|
"chroma-js": "^2.4.2",
|
|
51
|
-
"classnames": "^2.3.1",
|
|
52
54
|
"cross-fetch": "^3.1.5",
|
|
53
55
|
"dompurify": "^3.0.0",
|
|
54
56
|
"duo_web_sdk": "https://github.com/duosecurity/duo_web_sdk.git",
|
|
@@ -120,12 +122,14 @@
|
|
|
120
122
|
"postcss-preset-env": "^8.4.1",
|
|
121
123
|
"properties": "^1.2.1",
|
|
122
124
|
"rimraf": "^4.3.0",
|
|
125
|
+
"sass": "^1.69.5",
|
|
126
|
+
"sass-loader": "^13.3.2",
|
|
123
127
|
"style-loader": "^3.3.3",
|
|
124
128
|
"stylelint": "^14.16.1",
|
|
125
129
|
"stylelint-use-logical-spec": "^5.0.0",
|
|
126
130
|
"svgo": "^2.3.0",
|
|
127
131
|
"terser-webpack-plugin": "^5.2.4",
|
|
128
|
-
"testcafe": "^
|
|
132
|
+
"testcafe": "^2.6.2",
|
|
129
133
|
"ts-jest": "^26.5.6",
|
|
130
134
|
"ts-node": "^10.9.1",
|
|
131
135
|
"typescript": "^4.9.5",
|
|
Binary file
|
|
Binary file
|