@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,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 { h } from 'preact';
|
|
15
16
|
|
|
16
17
|
import {
|
|
@@ -24,19 +25,24 @@ const AuthenticatorButtonList: UISchemaElementComponent<{
|
|
|
24
25
|
uischema: AuthenticatorButtonListElement
|
|
25
26
|
}> = ({ uischema }) => {
|
|
26
27
|
const { buttons, dataSe } = uischema.options;
|
|
28
|
+
const tokens = useOdysseyDesignTokens();
|
|
27
29
|
|
|
28
30
|
return (
|
|
29
31
|
<Box
|
|
30
32
|
component="ul"
|
|
31
33
|
data-se={dataSe}
|
|
32
|
-
sx={{
|
|
34
|
+
sx={{
|
|
35
|
+
listStyle: 'none',
|
|
36
|
+
padding: tokens.Spacing0,
|
|
37
|
+
marginBlockStart: tokens.Spacing0,
|
|
38
|
+
}}
|
|
33
39
|
>
|
|
34
40
|
{
|
|
35
41
|
buttons.map((button: AuthenticatorButtonElement, index: number) => (
|
|
36
42
|
<Box
|
|
37
43
|
key={button.id}
|
|
38
44
|
component="li"
|
|
39
|
-
sx={{ marginBlockEnd:
|
|
45
|
+
sx={{ marginBlockEnd: tokens.Spacing4 }}
|
|
40
46
|
>
|
|
41
47
|
<AuthenticatorButton
|
|
42
48
|
uischema={{
|
|
@@ -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 } from '@okta/odyssey-react-mui';
|
|
14
14
|
import { h } from 'preact';
|
|
15
15
|
|
|
16
16
|
import { useWidgetContext } from '../../contexts';
|
|
@@ -20,6 +20,7 @@ import {
|
|
|
20
20
|
ClickHandler,
|
|
21
21
|
UISchemaElementComponent,
|
|
22
22
|
} from '../../types';
|
|
23
|
+
import Image from '../Image';
|
|
23
24
|
import Spinner from '../Spinner';
|
|
24
25
|
|
|
25
26
|
const Button: UISchemaElementComponent<{
|
|
@@ -34,6 +35,7 @@ const Button: UISchemaElementComponent<{
|
|
|
34
35
|
label,
|
|
35
36
|
focus,
|
|
36
37
|
ariaDescribedBy,
|
|
38
|
+
noTranslate,
|
|
37
39
|
options: {
|
|
38
40
|
type,
|
|
39
41
|
ariaLabel,
|
|
@@ -48,18 +50,16 @@ const Button: UISchemaElementComponent<{
|
|
|
48
50
|
isActionStep,
|
|
49
51
|
step,
|
|
50
52
|
stepToRender,
|
|
51
|
-
classes,
|
|
52
53
|
disabled,
|
|
53
54
|
onClick,
|
|
54
55
|
},
|
|
55
56
|
} = uischema;
|
|
56
57
|
|
|
57
58
|
const ButtonImageIcon = typeof Icon === 'string' ? (
|
|
58
|
-
<
|
|
59
|
-
component="img"
|
|
59
|
+
<Image
|
|
60
60
|
src={Icon}
|
|
61
|
-
alt={iconAlt}
|
|
62
|
-
|
|
61
|
+
alt={iconAlt ?? ''}
|
|
62
|
+
ariaHidden
|
|
63
63
|
/>
|
|
64
64
|
) : Icon && (<Icon />);
|
|
65
65
|
|
|
@@ -79,24 +79,20 @@ const Button: UISchemaElementComponent<{
|
|
|
79
79
|
|
|
80
80
|
return (
|
|
81
81
|
<OdyButton
|
|
82
|
+
label={label ?? ''}
|
|
82
83
|
type={type}
|
|
83
84
|
variant={variant ?? 'primary'}
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
data-type={dataType}
|
|
93
|
-
data-se={dataSe}
|
|
94
|
-
aria-label={ariaLabel}
|
|
85
|
+
isFullWidth={wide ?? true}
|
|
86
|
+
buttonRef={focusRef}
|
|
87
|
+
isDisabled={loading || disabled}
|
|
88
|
+
startIcon={loading ? <Spinner /> : ButtonImageIcon}
|
|
89
|
+
ariaDescribedBy={ariaDescribedBy}
|
|
90
|
+
testId={dataSe ?? dataType}
|
|
91
|
+
ariaLabel={ariaLabel}
|
|
92
|
+
translate={noTranslate ? 'no' : undefined}
|
|
95
93
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
96
94
|
{...(type !== 'submit' && { onClick: typeof onClick === 'function' ? customClickHandler : handleClick })}
|
|
97
|
-
|
|
98
|
-
{label}
|
|
99
|
-
</OdyButton>
|
|
95
|
+
/>
|
|
100
96
|
);
|
|
101
97
|
};
|
|
102
98
|
|
|
@@ -10,24 +10,17 @@
|
|
|
10
10
|
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
import {
|
|
14
|
-
|
|
15
|
-
Checkbox as CheckboxMui,
|
|
16
|
-
FormControl,
|
|
17
|
-
FormControlLabel,
|
|
18
|
-
FormHelperText,
|
|
19
|
-
} from '@okta/odyssey-react-mui';
|
|
20
|
-
import { Fragment, h } from 'preact';
|
|
13
|
+
import { Checkbox as OdyCheckbox, CheckboxGroup } from '@okta/odyssey-react-mui';
|
|
14
|
+
import { h } from 'preact';
|
|
21
15
|
|
|
22
16
|
import { useWidgetContext } from '../../contexts';
|
|
23
|
-
import { useAutoFocus, useValue } from '../../hooks';
|
|
17
|
+
import { useAutoFocus, useHtmlContentParser, useValue } from '../../hooks';
|
|
24
18
|
import {
|
|
25
19
|
ChangeEvent,
|
|
26
20
|
UISchemaElementComponent,
|
|
27
21
|
UISchemaElementComponentWithValidationProps,
|
|
28
22
|
} from '../../types';
|
|
29
|
-
import { getTranslationInfo } from '../../util';
|
|
30
|
-
import FieldLevelMessageContainer from '../FieldLevelMessageContainer';
|
|
23
|
+
import { buildFieldLevelErrorMessages, getTranslationInfo, wrapInTranslateNo } from '../../util';
|
|
31
24
|
import { withFormValidationState } from '../hocs';
|
|
32
25
|
|
|
33
26
|
const Checkbox: UISchemaElementComponent<UISchemaElementComponentWithValidationProps> = ({
|
|
@@ -35,7 +28,6 @@ const Checkbox: UISchemaElementComponent<UISchemaElementComponentWithValidationP
|
|
|
35
28
|
errors,
|
|
36
29
|
handleChange,
|
|
37
30
|
handleBlur,
|
|
38
|
-
describedByIds,
|
|
39
31
|
}) => {
|
|
40
32
|
const value = useValue(uischema);
|
|
41
33
|
const { loading } = useWidgetContext();
|
|
@@ -43,86 +35,45 @@ const Checkbox: UISchemaElementComponent<UISchemaElementComponentWithValidationP
|
|
|
43
35
|
const {
|
|
44
36
|
options: { inputMeta: { name, mutable } },
|
|
45
37
|
focus,
|
|
46
|
-
noTranslate,
|
|
47
38
|
translations = [],
|
|
48
|
-
showAsterisk,
|
|
49
39
|
} = uischema;
|
|
50
40
|
const isReadOnly = mutable === false;
|
|
41
|
+
const checkboxId = `${name}-checkbox`;
|
|
51
42
|
const labelInfo = getTranslationInfo(translations, 'label');
|
|
43
|
+
const label = useHtmlContentParser(labelInfo?.noTranslate
|
|
44
|
+
? wrapInTranslateNo(labelInfo.value)
|
|
45
|
+
: labelInfo?.value) as string | undefined;
|
|
52
46
|
const descriptionInfo = getTranslationInfo(translations, 'description');
|
|
47
|
+
const description = useHtmlContentParser(descriptionInfo?.noTranslate
|
|
48
|
+
? wrapInTranslateNo(descriptionInfo.value)
|
|
49
|
+
: descriptionInfo?.value) as string | undefined;
|
|
53
50
|
const focusRef = useAutoFocus<HTMLInputElement>(focus);
|
|
54
|
-
const
|
|
51
|
+
const { errorMessage, errorMessageList } = buildFieldLevelErrorMessages(errors);
|
|
55
52
|
|
|
56
53
|
return (
|
|
57
|
-
<
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
54
|
+
<CheckboxGroup
|
|
55
|
+
errorMessage={errorMessage}
|
|
56
|
+
errorMessageList={errorMessageList}
|
|
57
|
+
id={name}
|
|
58
|
+
label=""
|
|
62
59
|
>
|
|
63
|
-
<
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
disabled={loading || isReadOnly}
|
|
79
|
-
inputProps={{
|
|
80
|
-
'data-se': name,
|
|
81
|
-
'data-se-for-name': name,
|
|
82
|
-
}}
|
|
83
|
-
sx={(theme) => ({
|
|
84
|
-
marginInlineEnd: theme.spacing(2),
|
|
85
|
-
})}
|
|
86
|
-
/>
|
|
87
|
-
)}
|
|
88
|
-
label={(
|
|
89
|
-
<Fragment>
|
|
90
|
-
{labelInfo?.noTranslate ? (
|
|
91
|
-
<Box
|
|
92
|
-
component="span"
|
|
93
|
-
className="no-translate"
|
|
94
|
-
>
|
|
95
|
-
{labelInfo?.value as string}
|
|
96
|
-
</Box>
|
|
97
|
-
) : labelInfo?.value as string}
|
|
98
|
-
{showAsterisk && (
|
|
99
|
-
<Box
|
|
100
|
-
component="span"
|
|
101
|
-
sx={(theme) => ({
|
|
102
|
-
marginInlineStart: theme.spacing(1),
|
|
103
|
-
marginInlineEnd: theme.spacing(1),
|
|
104
|
-
})}
|
|
105
|
-
className="no-translate"
|
|
106
|
-
aria-hidden
|
|
107
|
-
>
|
|
108
|
-
*
|
|
109
|
-
</Box>
|
|
110
|
-
)}
|
|
111
|
-
{descriptionInfo?.value && (
|
|
112
|
-
<FormHelperText className={descriptionInfo.noTranslate ? 'no-translate' : undefined}>
|
|
113
|
-
{descriptionInfo.value}
|
|
114
|
-
</FormHelperText>
|
|
115
|
-
)}
|
|
116
|
-
</Fragment>
|
|
117
|
-
)}
|
|
60
|
+
<OdyCheckbox
|
|
61
|
+
hint={description}
|
|
62
|
+
id={checkboxId}
|
|
63
|
+
inputRef={focusRef}
|
|
64
|
+
isChecked={value === true}
|
|
65
|
+
isDisabled={loading || isReadOnly}
|
|
66
|
+
label={label}
|
|
67
|
+
name={name}
|
|
68
|
+
onBlur={(e: ChangeEvent<HTMLInputElement>) => {
|
|
69
|
+
handleBlur?.(e?.currentTarget?.checked);
|
|
70
|
+
}}
|
|
71
|
+
onChange={(e: ChangeEvent<HTMLInputElement>) => {
|
|
72
|
+
handleChange?.(e.currentTarget.checked);
|
|
73
|
+
}}
|
|
74
|
+
testId={name}
|
|
118
75
|
/>
|
|
119
|
-
|
|
120
|
-
<FieldLevelMessageContainer
|
|
121
|
-
messages={errors}
|
|
122
|
-
fieldName={name}
|
|
123
|
-
/>
|
|
124
|
-
)}
|
|
125
|
-
</FormControl>
|
|
76
|
+
</CheckboxGroup>
|
|
126
77
|
);
|
|
127
78
|
};
|
|
128
79
|
|
|
@@ -10,9 +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
|
|
15
|
-
import { Box, Typography } from '@okta/odyssey-react-mui';
|
|
13
|
+
import { Box } from '@mui/material';
|
|
14
|
+
import { Link, Typography, useOdysseyDesignTokens } from '@okta/odyssey-react-mui';
|
|
16
15
|
import { escape } from 'lodash';
|
|
17
16
|
import { Fragment, FunctionComponent, h } from 'preact';
|
|
18
17
|
|
|
@@ -20,6 +19,7 @@ import { IDX_STEP } from '../../constants';
|
|
|
20
19
|
import { useWidgetContext } from '../../contexts';
|
|
21
20
|
import { useHtmlContentParser } from '../../hooks';
|
|
22
21
|
import { getAppInfo, getHeadingReplacerFn, loc } from '../../util';
|
|
22
|
+
import Image from '../Image';
|
|
23
23
|
|
|
24
24
|
const ConsentHeader: FunctionComponent = () => {
|
|
25
25
|
const { idxTransaction } = useWidgetContext();
|
|
@@ -40,17 +40,17 @@ const ConsentHeader: FunctionComponent = () => {
|
|
|
40
40
|
granularConsentTitle,
|
|
41
41
|
{ replace: getHeadingReplacerFn({}, 'h2', 2, 6) },
|
|
42
42
|
);
|
|
43
|
+
const tokens = useOdysseyDesignTokens();
|
|
43
44
|
|
|
44
45
|
const getAppLogo = (altText: string, logoHref?: string) => (
|
|
45
46
|
typeof logoHref !== 'undefined' && (
|
|
46
|
-
<
|
|
47
|
-
component="img"
|
|
47
|
+
<Image
|
|
48
48
|
src={logoHref}
|
|
49
49
|
width="32px"
|
|
50
50
|
height="32px"
|
|
51
51
|
alt={altText}
|
|
52
|
-
|
|
53
|
-
|
|
52
|
+
testId="client-logo"
|
|
53
|
+
ariaHidden
|
|
54
54
|
/>
|
|
55
55
|
)
|
|
56
56
|
);
|
|
@@ -68,12 +68,12 @@ const ConsentHeader: FunctionComponent = () => {
|
|
|
68
68
|
>
|
|
69
69
|
{typeof href !== 'undefined' && typeof logoHref !== 'undefined'
|
|
70
70
|
? (
|
|
71
|
-
<Box
|
|
71
|
+
<Box>
|
|
72
72
|
<Link
|
|
73
73
|
href={href}
|
|
74
74
|
target="_blank"
|
|
75
75
|
rel="noopener noreferrer"
|
|
76
|
-
|
|
76
|
+
ariaLabel={altText}
|
|
77
77
|
>
|
|
78
78
|
{getAppLogo(altText, logoHref)}
|
|
79
79
|
</Link>
|
|
@@ -97,33 +97,34 @@ const ConsentHeader: FunctionComponent = () => {
|
|
|
97
97
|
<Fragment>
|
|
98
98
|
<Box
|
|
99
99
|
component="span"
|
|
100
|
-
|
|
100
|
+
data-se="title-text"
|
|
101
101
|
textAlign="center"
|
|
102
102
|
>
|
|
103
103
|
<Typography
|
|
104
104
|
component="h2"
|
|
105
105
|
variant="h6"
|
|
106
|
-
|
|
106
|
+
translate="no"
|
|
107
107
|
>
|
|
108
108
|
{appName}
|
|
109
109
|
</Typography>
|
|
110
|
-
<Typography
|
|
110
|
+
<Typography variant="body">{titleText}</Typography>
|
|
111
111
|
{hasIssuer && (
|
|
112
112
|
<Box
|
|
113
113
|
display="flex"
|
|
114
114
|
justifyContent="center"
|
|
115
115
|
>
|
|
116
|
-
<
|
|
117
|
-
sx={
|
|
118
|
-
marginBlockEnd:
|
|
119
|
-
backgroundColor:
|
|
120
|
-
color:
|
|
121
|
-
padding:
|
|
122
|
-
}
|
|
123
|
-
|
|
116
|
+
<Box
|
|
117
|
+
sx={{
|
|
118
|
+
marginBlockEnd: tokens.Spacing5,
|
|
119
|
+
backgroundColor: tokens.PalettePrimaryLighter,
|
|
120
|
+
color: tokens.PalettePrimaryDarker,
|
|
121
|
+
padding: `${tokens.Spacing1} ${tokens.Spacing2}`,
|
|
122
|
+
}}
|
|
123
|
+
data-se="issuer"
|
|
124
|
+
translate="no"
|
|
124
125
|
>
|
|
125
126
|
{issuer.uri}
|
|
126
|
-
</
|
|
127
|
+
</Box>
|
|
127
128
|
</Box>
|
|
128
129
|
)}
|
|
129
130
|
</Box>
|
|
@@ -133,8 +134,7 @@ const ConsentHeader: FunctionComponent = () => {
|
|
|
133
134
|
|
|
134
135
|
return (
|
|
135
136
|
<Box
|
|
136
|
-
|
|
137
|
-
className="title-text"
|
|
137
|
+
data-se="title-text"
|
|
138
138
|
textAlign="center"
|
|
139
139
|
>
|
|
140
140
|
{parsedGranularConsentTitle}
|
|
@@ -19,8 +19,8 @@ const Divider: UISchemaElementComponent<{ uischema: DividerElement }> = ({ uisch
|
|
|
19
19
|
const { options } = uischema;
|
|
20
20
|
|
|
21
21
|
return typeof options?.text !== 'undefined' ? (
|
|
22
|
-
<MuiDivider
|
|
23
|
-
) : <MuiDivider
|
|
22
|
+
<MuiDivider data-se="separation-line">{options.text}</MuiDivider>
|
|
23
|
+
) : <MuiDivider data-se="separation-line" />;
|
|
24
24
|
};
|
|
25
25
|
|
|
26
26
|
export default Divider;
|
|
@@ -10,14 +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
|
-
AccordionSummary,
|
|
16
|
-
AccordionSummaryProps,
|
|
17
|
-
} from '@mui/material';
|
|
18
|
-
import MuiAccordion from '@mui/material/Accordion';
|
|
19
|
-
import { styled } from '@mui/material/styles';
|
|
20
|
-
import { Box, Typography } from '@okta/odyssey-react-mui';
|
|
13
|
+
import { Box } from '@mui/material';
|
|
14
|
+
import { Accordion as OdyAccordion, useOdysseyDesignTokens } from '@okta/odyssey-react-mui';
|
|
21
15
|
import { FunctionComponent, h } from 'preact';
|
|
22
16
|
|
|
23
17
|
import { AccordionLayout } from '../../types';
|
|
@@ -27,44 +21,29 @@ type AccordionProps = {
|
|
|
27
21
|
uischema: AccordionLayout;
|
|
28
22
|
};
|
|
29
23
|
|
|
30
|
-
const StyledAccordionSummary = styled((props: AccordionSummaryProps) => (
|
|
31
|
-
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
32
|
-
<AccordionSummary {...props} />
|
|
33
|
-
))(({ theme }) => ({
|
|
34
|
-
padding: 0,
|
|
35
|
-
width: 'fit-content',
|
|
36
|
-
'& .MuiAccordionSummary-content': {
|
|
37
|
-
margin: 0,
|
|
38
|
-
color: theme.palette.primary.main,
|
|
39
|
-
'&:hover': {
|
|
40
|
-
textDecoration: 'underline',
|
|
41
|
-
textDecorationColor: theme.palette.primary.main,
|
|
42
|
-
},
|
|
43
|
-
},
|
|
44
|
-
}));
|
|
45
|
-
|
|
46
24
|
const Accordion: FunctionComponent<AccordionProps> = ({ uischema }) => {
|
|
47
25
|
const { elements } = uischema;
|
|
26
|
+
const tokens = useOdysseyDesignTokens();
|
|
48
27
|
|
|
49
28
|
return (
|
|
50
29
|
<Box>
|
|
51
30
|
{
|
|
52
31
|
elements.map((element) => (
|
|
53
|
-
<
|
|
32
|
+
<Box
|
|
54
33
|
key={element.key}
|
|
55
|
-
|
|
56
|
-
|
|
34
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
35
|
+
{...(!(element).noMargin && { marginBlockEnd: tokens.Spacing4 })}
|
|
57
36
|
>
|
|
58
|
-
<
|
|
59
|
-
|
|
60
|
-
|
|
37
|
+
<OdyAccordion
|
|
38
|
+
hasShadow={false}
|
|
39
|
+
label={element.options.summary}
|
|
40
|
+
id={element.options.id}
|
|
61
41
|
>
|
|
62
|
-
<
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
</MuiAccordion>
|
|
42
|
+
<LayoutContainer
|
|
43
|
+
uischema={element.options.content}
|
|
44
|
+
/>
|
|
45
|
+
</OdyAccordion>
|
|
46
|
+
</Box>
|
|
68
47
|
))
|
|
69
48
|
}
|
|
70
49
|
</Box>
|
|
@@ -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 { FunctionComponent, h } from 'preact';
|
|
15
16
|
|
|
16
17
|
import { useLayoutContext } from '../../contexts';
|
|
@@ -24,6 +25,7 @@ import renderers from './renderers';
|
|
|
24
25
|
|
|
25
26
|
const ElementContainer: FunctionComponent<{ element: UISchemaElement }> = ({ element }) => {
|
|
26
27
|
const { layoutDirection } = useLayoutContext();
|
|
28
|
+
const tokens = useOdysseyDesignTokens();
|
|
27
29
|
const renderer = renderers.find((r) => r.tester(element));
|
|
28
30
|
if (!renderer) {
|
|
29
31
|
// TODO: for now do not render for unmatch render object
|
|
@@ -39,9 +41,10 @@ const ElementContainer: FunctionComponent<{ element: UISchemaElement }> = ({ ele
|
|
|
39
41
|
return (
|
|
40
42
|
<Box
|
|
41
43
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
42
|
-
{...(!(element).noMargin && { marginBlockEnd:
|
|
44
|
+
{...(!(element).noMargin && { marginBlockEnd: tokens.Spacing4 })}
|
|
43
45
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
44
|
-
{...(layoutDirection === UISchemaLayoutType.HORIZONTAL
|
|
46
|
+
{...(layoutDirection === UISchemaLayoutType.HORIZONTAL
|
|
47
|
+
&& { marginInlineEnd: tokens.Spacing1 })}
|
|
45
48
|
>
|
|
46
49
|
<Component uischema={element} />
|
|
47
50
|
</Box>
|
|
@@ -11,7 +11,6 @@
|
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
13
|
import { Box } from '@mui/material';
|
|
14
|
-
import classNames from 'classnames';
|
|
15
14
|
import { FunctionComponent, h } from 'preact';
|
|
16
15
|
import { useCallback, useEffect } from 'preact/hooks';
|
|
17
16
|
|
|
@@ -28,7 +27,6 @@ import Layout from './Layout';
|
|
|
28
27
|
const Form: FunctionComponent<{
|
|
29
28
|
uischema: UISchemaLayout;
|
|
30
29
|
}> = ({ uischema }) => {
|
|
31
|
-
const classes = classNames('o-form');
|
|
32
30
|
const {
|
|
33
31
|
data,
|
|
34
32
|
idxTransaction: currTransaction,
|
|
@@ -108,8 +106,8 @@ const Form: FunctionComponent<{
|
|
|
108
106
|
component="form"
|
|
109
107
|
noValidate
|
|
110
108
|
onSubmit={handleSubmit}
|
|
111
|
-
className=
|
|
112
|
-
data-se="o-form"
|
|
109
|
+
className="o-form"
|
|
110
|
+
data-se="o-form" // TODO: FIXME OKTA-578584 - update page objects using .o-form selectors
|
|
113
111
|
sx={{
|
|
114
112
|
maxInlineSize: '100%',
|
|
115
113
|
wordBreak: 'break-word',
|
|
@@ -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 { Box } from '@
|
|
13
|
+
import { Box } from '@mui/material';
|
|
14
14
|
import { FunctionComponent, h } from 'preact';
|
|
15
15
|
|
|
16
16
|
import { LayoutContext } from '../../contexts';
|
|
@@ -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 { FunctionComponent, h } from 'preact';
|
|
15
16
|
|
|
16
17
|
import {
|
|
@@ -30,6 +31,7 @@ import ElementContainer from './ElementContainer';
|
|
|
30
31
|
*/
|
|
31
32
|
const LayoutContainer: FunctionComponent<{ uischema: UISchemaLayout }> = ({ uischema }) => {
|
|
32
33
|
const { type, elements } = uischema;
|
|
34
|
+
const tokens = useOdysseyDesignTokens();
|
|
33
35
|
|
|
34
36
|
const isHorizontalLayout = type === UISchemaLayoutType.HORIZONTAL;
|
|
35
37
|
const flexDirection = isHorizontalLayout ? 'row' : 'column';
|
|
@@ -38,7 +40,7 @@ const LayoutContainer: FunctionComponent<{ uischema: UISchemaLayout }> = ({ uisc
|
|
|
38
40
|
display="flex"
|
|
39
41
|
flexDirection={flexDirection}
|
|
40
42
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
41
|
-
{...(isHorizontalLayout && { gap:
|
|
43
|
+
{...(isHorizontalLayout && { gap: tokens.Spacing1 })}
|
|
42
44
|
>
|
|
43
45
|
{
|
|
44
46
|
elements.map((element, index) => {
|
|
@@ -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 { Typography, useOdysseyDesignTokens } from '@okta/odyssey-react-mui';
|
|
14
15
|
import { h } from 'preact';
|
|
15
16
|
|
|
16
17
|
import { useHtmlContentParser } from '../../hooks';
|
|
@@ -20,6 +21,7 @@ const Heading: UISchemaElementComponent<{
|
|
|
20
21
|
uischema: HeadingElement
|
|
21
22
|
}> = ({ uischema }) => {
|
|
22
23
|
const {
|
|
24
|
+
id,
|
|
23
25
|
noTranslate,
|
|
24
26
|
parserOptions,
|
|
25
27
|
noMargin,
|
|
@@ -27,20 +29,20 @@ const Heading: UISchemaElementComponent<{
|
|
|
27
29
|
content, dataSe, level, visualLevel,
|
|
28
30
|
},
|
|
29
31
|
} = uischema;
|
|
32
|
+
const tokens = useOdysseyDesignTokens();
|
|
30
33
|
const parsedContent = useHtmlContentParser(content, parserOptions);
|
|
31
34
|
|
|
32
35
|
return (
|
|
33
36
|
<Box
|
|
34
37
|
display="flex"
|
|
35
38
|
justifyContent="flex-start"
|
|
36
|
-
marginBlockEnd={noMargin ? undefined :
|
|
39
|
+
marginBlockEnd={noMargin ? undefined : tokens.Spacing2}
|
|
37
40
|
>
|
|
38
41
|
<Typography
|
|
39
|
-
id={uischema.id}
|
|
40
42
|
variant={`h${visualLevel ?? 2}`}
|
|
41
43
|
component={`h${level ?? 3}`}
|
|
42
|
-
|
|
43
|
-
|
|
44
|
+
translate={noTranslate ? 'no' : undefined}
|
|
45
|
+
testId={dataSe ?? id}
|
|
44
46
|
>
|
|
45
47
|
{parsedContent}
|
|
46
48
|
</Typography>
|
|
@@ -14,32 +14,30 @@ import { FunctionComponent, h } from 'preact';
|
|
|
14
14
|
|
|
15
15
|
import { IconProps } from '../../types';
|
|
16
16
|
|
|
17
|
-
export const CustomAppIcon: FunctionComponent<IconProps> = ({
|
|
17
|
+
export const CustomAppIcon: FunctionComponent<IconProps> = ({
|
|
18
|
+
name, description, width, height,
|
|
19
|
+
}: IconProps) => (
|
|
18
20
|
<svg
|
|
19
|
-
width=
|
|
20
|
-
height=
|
|
21
|
-
viewBox="0 0
|
|
21
|
+
width={width || 48}
|
|
22
|
+
height={height || 48}
|
|
23
|
+
viewBox="0 0 48 48"
|
|
22
24
|
fill="none"
|
|
23
25
|
xmlns="http://www.w3.org/2000/svg"
|
|
24
26
|
aria-labelledby={name}
|
|
25
27
|
role="img"
|
|
26
28
|
>
|
|
27
29
|
<title id={name}>{description}</title>
|
|
28
|
-
<
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
r="69"
|
|
30
|
+
<path
|
|
31
|
+
fillRule="evenodd"
|
|
32
|
+
clipRule="evenodd"
|
|
32
33
|
fill="#00297A"
|
|
33
|
-
|
|
34
|
-
strokeLinecap="round"
|
|
35
|
-
strokeLinejoin="round"
|
|
34
|
+
d="M19.5 15A1 1 0 0128.5 15V20.7H33.5V35Q33.5 37.5 31 37.5H17Q14.5 37.5 14.5 35V20.7H19.5V15M27.2 15V20.7H20.8V15A1 1 0 0127.2 15M15.8 22V35Q15.8 36.2 17 36.2H31Q32.2 36.2 32.2 35V22H15.8Z"
|
|
36
35
|
class="siwFillPrimaryDark"
|
|
37
36
|
/>
|
|
38
37
|
<path
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
fill="white"
|
|
38
|
+
fill="#A7B5EC"
|
|
39
|
+
d="M21.35 29.1A2.65 2.65 0 1026.65 29.1 2.65 2.65 0 1021.35 29.1M22.65 29.1A1.35 1.35 0 1125.35 29.1 1.35 1.35 0 1122.65 29.1Z"
|
|
40
|
+
class="siwFillSecondary"
|
|
43
41
|
/>
|
|
44
42
|
</svg>
|
|
45
43
|
);
|