@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,15 +10,7 @@
|
|
|
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
|
-
FormControl,
|
|
16
|
-
FormControlLabel,
|
|
17
|
-
FormLabel,
|
|
18
|
-
Radio as RadioMui,
|
|
19
|
-
RadioGroup,
|
|
20
|
-
Typography,
|
|
21
|
-
} from '@okta/odyssey-react-mui';
|
|
13
|
+
import { Radio as OdyRadio, RadioGroup } from '@okta/odyssey-react-mui';
|
|
22
14
|
import { IdxOption } from '@okta/okta-auth-js/types/lib/idx/types/idx-js';
|
|
23
15
|
import { h } from 'preact';
|
|
24
16
|
|
|
@@ -29,8 +21,7 @@ import {
|
|
|
29
21
|
UISchemaElementComponent,
|
|
30
22
|
UISchemaElementComponentWithValidationProps,
|
|
31
23
|
} from '../../types';
|
|
32
|
-
import { getTranslation } from '../../util';
|
|
33
|
-
import FieldLevelMessageContainer from '../FieldLevelMessageContainer';
|
|
24
|
+
import { buildFieldLevelErrorMessages, getTranslation } from '../../util';
|
|
34
25
|
import { withFormValidationState } from '../hocs';
|
|
35
26
|
|
|
36
27
|
const Radio: UISchemaElementComponent<UISchemaElementComponentWithValidationProps> = ({
|
|
@@ -38,7 +29,6 @@ const Radio: UISchemaElementComponent<UISchemaElementComponentWithValidationProp
|
|
|
38
29
|
errors,
|
|
39
30
|
handleChange,
|
|
40
31
|
handleBlur,
|
|
41
|
-
describedByIds,
|
|
42
32
|
}) => {
|
|
43
33
|
const value = useValue(uischema);
|
|
44
34
|
const { loading } = useWidgetContext();
|
|
@@ -53,94 +43,42 @@ const Radio: UISchemaElementComponent<UISchemaElementComponentWithValidationProp
|
|
|
53
43
|
customOptions,
|
|
54
44
|
},
|
|
55
45
|
focus,
|
|
56
|
-
showAsterisk,
|
|
57
46
|
} = uischema;
|
|
58
47
|
const label = getTranslation(translations, 'label');
|
|
59
|
-
const labelId = `${name}-label`;
|
|
60
48
|
const optionalLabel = getTranslation(translations, 'optionalLabel');
|
|
61
49
|
const focusRef = useAutoFocus<HTMLInputElement>(focus);
|
|
62
|
-
const
|
|
50
|
+
const { errorMessage, errorMessageList } = buildFieldLevelErrorMessages(errors);
|
|
63
51
|
|
|
64
52
|
return (
|
|
65
|
-
<
|
|
66
|
-
|
|
67
|
-
|
|
53
|
+
<RadioGroup
|
|
54
|
+
errorMessage={errorMessage}
|
|
55
|
+
errorMessageList={errorMessageList}
|
|
56
|
+
hint={!required ? optionalLabel : undefined}
|
|
57
|
+
id={name}
|
|
58
|
+
label={label ?? ''}
|
|
59
|
+
name={name}
|
|
60
|
+
onChange={(e: ChangeEvent<HTMLInputElement>) => {
|
|
61
|
+
handleChange?.(e.currentTarget.value);
|
|
62
|
+
}}
|
|
63
|
+
testId={name}
|
|
64
|
+
value={value as string ?? ''}
|
|
68
65
|
>
|
|
69
|
-
{
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
>
|
|
86
|
-
*
|
|
87
|
-
</Box>
|
|
88
|
-
)}
|
|
89
|
-
{required === false && (
|
|
90
|
-
<Typography
|
|
91
|
-
variant="subtitle1"
|
|
92
|
-
sx={{ whiteSpace: 'nowrap' }}
|
|
93
|
-
>
|
|
94
|
-
{optionalLabel}
|
|
95
|
-
</Typography>
|
|
96
|
-
)}
|
|
97
|
-
</FormLabel>
|
|
98
|
-
)}
|
|
99
|
-
<RadioGroup
|
|
100
|
-
name={name}
|
|
101
|
-
id={name}
|
|
102
|
-
data-se={name}
|
|
103
|
-
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
104
|
-
{...(label && { 'aria-labelledby': labelId })}
|
|
105
|
-
aria-describedby={describedByIds}
|
|
106
|
-
value={value as string ?? ''}
|
|
107
|
-
onChange={(e: ChangeEvent<HTMLInputElement>) => {
|
|
108
|
-
handleChange?.(e.currentTarget.value);
|
|
109
|
-
}}
|
|
110
|
-
>
|
|
111
|
-
{
|
|
112
|
-
(customOptions ?? options)?.map((item: IdxOption, index: number) => (
|
|
113
|
-
<FormControlLabel
|
|
114
|
-
control={(
|
|
115
|
-
<RadioMui
|
|
116
|
-
sx={(theme) => ({
|
|
117
|
-
marginInlineEnd: theme.spacing(2),
|
|
118
|
-
})}
|
|
119
|
-
/>
|
|
120
|
-
)}
|
|
121
|
-
key={item.value}
|
|
122
|
-
value={item.value}
|
|
123
|
-
label={item.label}
|
|
124
|
-
disabled={loading}
|
|
125
|
-
onBlur={(e: ChangeEvent<HTMLInputElement>) => {
|
|
126
|
-
handleBlur?.(e?.currentTarget?.value);
|
|
127
|
-
}}
|
|
128
|
-
sx={{
|
|
129
|
-
gap: 0,
|
|
130
|
-
}}
|
|
131
|
-
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
132
|
-
{...(index === 0 && { inputRef: focusRef })}
|
|
133
|
-
/>
|
|
134
|
-
))
|
|
135
|
-
}
|
|
136
|
-
</RadioGroup>
|
|
137
|
-
{hasErrors && (
|
|
138
|
-
<FieldLevelMessageContainer
|
|
139
|
-
messages={errors}
|
|
140
|
-
fieldName={name}
|
|
141
|
-
/>
|
|
142
|
-
)}
|
|
143
|
-
</FormControl>
|
|
66
|
+
{
|
|
67
|
+
(customOptions ?? options ?? []).map((item: IdxOption, index: number) => (
|
|
68
|
+
<OdyRadio
|
|
69
|
+
isDisabled={loading}
|
|
70
|
+
key={item.value}
|
|
71
|
+
label={item.label}
|
|
72
|
+
onBlur={(e: ChangeEvent<HTMLInputElement>) => {
|
|
73
|
+
handleBlur?.(e?.currentTarget?.value);
|
|
74
|
+
}}
|
|
75
|
+
value={typeof item.value === 'string' ? item.value : ''}
|
|
76
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
77
|
+
{...(index === 0 && { inputFocusRef: focusRef })}
|
|
78
|
+
/>
|
|
79
|
+
))
|
|
80
|
+
}
|
|
81
|
+
</RadioGroup>
|
|
144
82
|
);
|
|
145
83
|
};
|
|
146
84
|
|
|
@@ -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, Link, useOdysseyDesignTokens } from '@okta/odyssey-react-mui';
|
|
14
15
|
import { HTMLReactParserOptions } from 'html-react-parser';
|
|
15
16
|
import { h } from 'preact';
|
|
16
17
|
import { useEffect, useRef, useState } from 'preact/hooks';
|
|
@@ -41,6 +42,7 @@ const ReminderPrompt: UISchemaElementComponent<{
|
|
|
41
42
|
} = uischema.options;
|
|
42
43
|
const onSubmitHandler = useOnSubmit();
|
|
43
44
|
const parsedContent = useHtmlContentParser(content, uischema.parserOptions);
|
|
45
|
+
const tokens = useOdysseyDesignTokens();
|
|
44
46
|
|
|
45
47
|
const [show, setShow] = useState<boolean>(false);
|
|
46
48
|
const timerRef = useRef<number | undefined>();
|
|
@@ -125,25 +127,20 @@ const ReminderPrompt: UISchemaElementComponent<{
|
|
|
125
127
|
);
|
|
126
128
|
}
|
|
127
129
|
return (
|
|
128
|
-
<Box marginBlockEnd={
|
|
130
|
+
<Box marginBlockEnd={tokens.Spacing2}>{parsedContent}</Box>
|
|
129
131
|
);
|
|
130
132
|
};
|
|
131
133
|
|
|
132
134
|
return show ? (
|
|
133
|
-
<Box marginBlockEnd={
|
|
134
|
-
<
|
|
135
|
+
<Box marginBlockEnd={tokens.Spacing4}>
|
|
136
|
+
<Callout
|
|
135
137
|
severity="warning"
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
// TODO: OKTA-534606 - switch to ODS component which has this fix
|
|
139
|
-
'& .MuiAlert-message': {
|
|
140
|
-
overflow: 'visible',
|
|
141
|
-
},
|
|
142
|
-
}}
|
|
138
|
+
// visually-hidden severity text is not translated
|
|
139
|
+
translate="no"
|
|
143
140
|
>
|
|
144
141
|
{renderAlertContent()}
|
|
145
142
|
{renderActionLink()}
|
|
146
|
-
</
|
|
143
|
+
</Callout>
|
|
147
144
|
</Box>
|
|
148
145
|
) : null;
|
|
149
146
|
};
|
|
@@ -11,9 +11,7 @@
|
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
13
|
import { SelectChangeEvent } from '@mui/material';
|
|
14
|
-
import {
|
|
15
|
-
Box, FormControl, InputLabel, Select as MuiSelect, Typography,
|
|
16
|
-
} from '@okta/odyssey-react-mui';
|
|
14
|
+
import { NativeSelect } from '@okta/odyssey-react-mui';
|
|
17
15
|
import { IdxOption } from '@okta/okta-auth-js/types/lib/idx/types/idx-js';
|
|
18
16
|
import { h } from 'preact';
|
|
19
17
|
|
|
@@ -23,8 +21,7 @@ import {
|
|
|
23
21
|
UISchemaElementComponent,
|
|
24
22
|
UISchemaElementComponentWithValidationProps,
|
|
25
23
|
} from '../../types';
|
|
26
|
-
import { getTranslation } from '../../util';
|
|
27
|
-
import FieldLevelMessageContainer from '../FieldLevelMessageContainer';
|
|
24
|
+
import { buildFieldLevelErrorMessages, getTranslation } from '../../util';
|
|
28
25
|
import { withFormValidationState } from '../hocs';
|
|
29
26
|
|
|
30
27
|
const Select: UISchemaElementComponent<UISchemaElementComponentWithValidationProps> = ({
|
|
@@ -32,14 +29,13 @@ const Select: UISchemaElementComponent<UISchemaElementComponentWithValidationPro
|
|
|
32
29
|
errors,
|
|
33
30
|
handleChange,
|
|
34
31
|
handleBlur,
|
|
35
|
-
describedByIds,
|
|
36
32
|
}) => {
|
|
37
33
|
const value = useValue(uischema);
|
|
38
34
|
const { loading } = useWidgetContext();
|
|
39
|
-
const { focus, translations = []
|
|
35
|
+
const { focus, translations = [] } = uischema;
|
|
40
36
|
const label = getTranslation(translations, 'label');
|
|
41
37
|
const emptyOptionLabel = getTranslation(translations, 'empty-option-label');
|
|
42
|
-
const
|
|
38
|
+
const { errorMessage, errorMessageList } = buildFieldLevelErrorMessages(errors);
|
|
43
39
|
|
|
44
40
|
const {
|
|
45
41
|
attributes,
|
|
@@ -50,8 +46,8 @@ const Select: UISchemaElementComponent<UISchemaElementComponentWithValidationPro
|
|
|
50
46
|
},
|
|
51
47
|
customOptions,
|
|
52
48
|
} = uischema.options;
|
|
49
|
+
const { autocomplete } = attributes || {};
|
|
53
50
|
const focusRef = useAutoFocus<HTMLSelectElement>(focus);
|
|
54
|
-
const hasErrors = typeof errors !== 'undefined';
|
|
55
51
|
|
|
56
52
|
const getOptions = (): IdxOption[] | undefined => {
|
|
57
53
|
if (Array.isArray(customOptions) || Array.isArray(options)) {
|
|
@@ -67,93 +63,50 @@ const Select: UISchemaElementComponent<UISchemaElementComponentWithValidationPro
|
|
|
67
63
|
};
|
|
68
64
|
|
|
69
65
|
return (
|
|
70
|
-
<
|
|
71
|
-
|
|
72
|
-
|
|
66
|
+
<NativeSelect
|
|
67
|
+
autoCompleteType={autocomplete}
|
|
68
|
+
errorMessage={errorMessage}
|
|
69
|
+
errorMessageList={errorMessageList}
|
|
70
|
+
id={name}
|
|
71
|
+
inputRef={focusRef}
|
|
72
|
+
isDisabled={loading}
|
|
73
|
+
isOptional={required === false}
|
|
74
|
+
label={label}
|
|
75
|
+
onChange={(e: SelectChangeEvent<string>) => {
|
|
76
|
+
const selectTarget = (
|
|
77
|
+
e?.target as SelectChangeEvent['target'] & { value: string; name: string; }
|
|
78
|
+
);
|
|
79
|
+
handleChange?.(selectTarget.value);
|
|
80
|
+
}}
|
|
81
|
+
onBlur={(e: SelectChangeEvent<string>) => {
|
|
82
|
+
const selectTarget = (
|
|
83
|
+
e?.target as SelectChangeEvent['target'] & { value: string; name: string; }
|
|
84
|
+
);
|
|
85
|
+
handleBlur?.(selectTarget.value);
|
|
86
|
+
}}
|
|
87
|
+
testId={name}
|
|
88
|
+
value={value as string ?? ''}
|
|
73
89
|
>
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
position: 'static',
|
|
80
|
-
}}
|
|
81
|
-
>
|
|
82
|
-
{label}
|
|
83
|
-
{showAsterisk && (
|
|
84
|
-
<Box
|
|
85
|
-
component="span"
|
|
86
|
-
sx={(theme) => ({
|
|
87
|
-
marginInlineStart: theme.spacing(1),
|
|
88
|
-
marginInlineEnd: theme.spacing(1),
|
|
89
|
-
})}
|
|
90
|
-
className="no-translate"
|
|
91
|
-
aria-hidden
|
|
92
|
-
>
|
|
93
|
-
*
|
|
94
|
-
</Box>
|
|
95
|
-
)}
|
|
96
|
-
{required === false && (
|
|
97
|
-
<Typography
|
|
98
|
-
variant="subtitle1"
|
|
99
|
-
sx={{ whiteSpace: 'nowrap' }}
|
|
90
|
+
{
|
|
91
|
+
[
|
|
92
|
+
<option
|
|
93
|
+
value=""
|
|
94
|
+
key="empty"
|
|
100
95
|
>
|
|
101
|
-
{
|
|
102
|
-
</
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
<MuiSelect
|
|
106
|
-
native
|
|
107
|
-
variant="standard"
|
|
108
|
-
onChange={(e: SelectChangeEvent<string>) => {
|
|
109
|
-
const selectTarget = (
|
|
110
|
-
e?.target as SelectChangeEvent['target'] & { value: string; name: string; }
|
|
111
|
-
);
|
|
112
|
-
handleChange?.(selectTarget.value);
|
|
113
|
-
}}
|
|
114
|
-
onBlur={(e: SelectChangeEvent<string>) => {
|
|
115
|
-
const selectTarget = (
|
|
116
|
-
e?.target as SelectChangeEvent['target'] & { value: string; name: string; }
|
|
117
|
-
);
|
|
118
|
-
handleBlur?.(selectTarget.value);
|
|
119
|
-
}}
|
|
120
|
-
inputRef={focusRef}
|
|
121
|
-
value={value as string}
|
|
122
|
-
inputProps={{
|
|
123
|
-
'data-se': name,
|
|
124
|
-
'aria-describedby': describedByIds,
|
|
125
|
-
name,
|
|
126
|
-
id: name,
|
|
127
|
-
...attributes,
|
|
128
|
-
}}
|
|
129
|
-
>
|
|
130
|
-
{
|
|
131
|
-
[
|
|
96
|
+
{emptyOptionLabel}
|
|
97
|
+
</option>,
|
|
98
|
+
].concat(
|
|
99
|
+
getOptions()?.map((option: IdxOption) => (
|
|
132
100
|
<option
|
|
133
|
-
value
|
|
134
|
-
|
|
101
|
+
key={option.value}
|
|
102
|
+
value={option.value as string}
|
|
135
103
|
>
|
|
136
|
-
{
|
|
137
|
-
</option
|
|
138
|
-
]
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
value={option.value as string}
|
|
143
|
-
>
|
|
144
|
-
{option.label}
|
|
145
|
-
</option>
|
|
146
|
-
)) || [],
|
|
147
|
-
)
|
|
148
|
-
}
|
|
149
|
-
</MuiSelect>
|
|
150
|
-
{hasErrors && (
|
|
151
|
-
<FieldLevelMessageContainer
|
|
152
|
-
messages={errors}
|
|
153
|
-
fieldName={name}
|
|
154
|
-
/>
|
|
155
|
-
)}
|
|
156
|
-
</FormControl>
|
|
104
|
+
{option.label}
|
|
105
|
+
</option>
|
|
106
|
+
)) || [],
|
|
107
|
+
)
|
|
108
|
+
}
|
|
109
|
+
</NativeSelect>
|
|
157
110
|
);
|
|
158
111
|
};
|
|
159
112
|
|
|
@@ -10,17 +10,18 @@
|
|
|
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 { CircularProgress } from '@okta/odyssey-react-mui';
|
|
14
15
|
import { FunctionComponent, h } from 'preact';
|
|
15
16
|
|
|
16
17
|
import { SpinnerElement } from '../../types';
|
|
17
18
|
import { loc } from '../../util';
|
|
18
19
|
|
|
19
|
-
type SpinnerProps = { dataSe?: string;
|
|
20
|
+
type SpinnerProps = { dataSe?: string; };
|
|
20
21
|
const Spinner: FunctionComponent<SpinnerProps | SpinnerElement> = (
|
|
21
22
|
props,
|
|
22
23
|
) => {
|
|
23
|
-
const { dataSe = undefined
|
|
24
|
+
const { dataSe = undefined } = 'type' in props
|
|
24
25
|
? {}
|
|
25
26
|
: props as SpinnerProps;
|
|
26
27
|
return (
|
|
@@ -31,13 +32,10 @@ const Spinner: FunctionComponent<SpinnerProps | SpinnerElement> = (
|
|
|
31
32
|
alignItems="center"
|
|
32
33
|
>
|
|
33
34
|
<CircularProgress
|
|
34
|
-
|
|
35
|
-
data-se={dataSe}
|
|
35
|
+
testId={dataSe}
|
|
36
36
|
// Using loc here because this component is not only used by transformers
|
|
37
37
|
// but also directly in widget component
|
|
38
|
-
|
|
39
|
-
aria-valuetext={loc('processing.alt.text', 'login')}
|
|
40
|
-
sx={{ color }}
|
|
38
|
+
ariaLabel={loc('processing.alt.text', 'login')}
|
|
41
39
|
/>
|
|
42
40
|
</Box>
|
|
43
41
|
);
|
|
@@ -50,16 +50,12 @@ const StepperButton: UISchemaElementComponent<{
|
|
|
50
50
|
onClick={handleClick}
|
|
51
51
|
variant={variant ?? 'primary'}
|
|
52
52
|
type={type ?? 'button'}
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
aria-describedby={ariaDescribedBy}
|
|
60
|
-
>
|
|
61
|
-
{label}
|
|
62
|
-
</Button>
|
|
53
|
+
isFullWidth
|
|
54
|
+
buttonRef={focusRef}
|
|
55
|
+
startIcon={loading && <Spinner />}
|
|
56
|
+
ariaDescribedBy={ariaDescribedBy}
|
|
57
|
+
label={label}
|
|
58
|
+
/>
|
|
63
59
|
);
|
|
64
60
|
};
|
|
65
61
|
|
|
@@ -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 { Link as LinkMui } from '@
|
|
13
|
+
import { Link as LinkMui } from '@mui/material';
|
|
14
14
|
import { h } from 'preact';
|
|
15
15
|
|
|
16
16
|
import { useStepperContext, useWidgetContext } from '../../contexts';
|
|
@@ -10,13 +10,7 @@
|
|
|
10
10
|
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
import {
|
|
14
|
-
FormControl,
|
|
15
|
-
FormControlLabel,
|
|
16
|
-
FormLabel,
|
|
17
|
-
Radio,
|
|
18
|
-
RadioGroup,
|
|
19
|
-
} from '@okta/odyssey-react-mui';
|
|
13
|
+
import { Radio, RadioGroup } from '@okta/odyssey-react-mui';
|
|
20
14
|
import { IdxOption } from '@okta/okta-auth-js/types/lib/idx/types/idx-js';
|
|
21
15
|
import { h } from 'preact';
|
|
22
16
|
import { useState } from 'preact/hooks';
|
|
@@ -38,7 +32,6 @@ const StepperRadio: UISchemaElementComponent<{
|
|
|
38
32
|
const {
|
|
39
33
|
label = '',
|
|
40
34
|
focus,
|
|
41
|
-
ariaDescribedBy,
|
|
42
35
|
options: {
|
|
43
36
|
name,
|
|
44
37
|
customOptions,
|
|
@@ -52,7 +45,6 @@ const StepperRadio: UISchemaElementComponent<{
|
|
|
52
45
|
return defaultValue(widgetContext, stepIndex);
|
|
53
46
|
});
|
|
54
47
|
const focusRef = useAutoFocus<HTMLInputElement>(focus);
|
|
55
|
-
const labelId = `${name}-label`;
|
|
56
48
|
|
|
57
49
|
const handleChange = (e: ChangeEvent<HTMLInputElement>) => {
|
|
58
50
|
const stepIdx = customOptions.findIndex((opt) => opt.value === e.currentTarget.value);
|
|
@@ -71,40 +63,27 @@ const StepperRadio: UISchemaElementComponent<{
|
|
|
71
63
|
};
|
|
72
64
|
|
|
73
65
|
return (
|
|
74
|
-
<
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
value={item.value}
|
|
96
|
-
label={item.label}
|
|
97
|
-
disabled={loading}
|
|
98
|
-
sx={{
|
|
99
|
-
gap: 0,
|
|
100
|
-
}}
|
|
101
|
-
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
102
|
-
{...(index === 0 && { inputRef: focusRef } )}
|
|
103
|
-
/>
|
|
104
|
-
))
|
|
105
|
-
}
|
|
106
|
-
</RadioGroup>
|
|
107
|
-
</FormControl>
|
|
66
|
+
<RadioGroup
|
|
67
|
+
id={name}
|
|
68
|
+
label={label}
|
|
69
|
+
name={name}
|
|
70
|
+
onChange={handleChange}
|
|
71
|
+
testId={name}
|
|
72
|
+
value={value as string ?? ''}
|
|
73
|
+
>
|
|
74
|
+
{
|
|
75
|
+
customOptions?.map((item: IdxOption, index: number) => (
|
|
76
|
+
<Radio
|
|
77
|
+
isDisabled={loading}
|
|
78
|
+
key={item.value}
|
|
79
|
+
label={item.label}
|
|
80
|
+
value={typeof item.value === 'string' ? item.value : ''}
|
|
81
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
82
|
+
{...(index === 0 && { inputFocusRef: focusRef })}
|
|
83
|
+
/>
|
|
84
|
+
))
|
|
85
|
+
}
|
|
86
|
+
</RadioGroup>
|
|
108
87
|
);
|
|
109
88
|
};
|
|
110
89
|
|
|
@@ -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 { h } from 'preact';
|
|
15
15
|
|
|
16
16
|
import { useWidgetContext } 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
|
|
13
|
+
import { Box } from '@mui/material';
|
|
14
|
+
import { Typography } from '@okta/odyssey-react-mui';
|
|
14
15
|
import { h } from 'preact';
|
|
15
16
|
import { useEffect, useRef } from 'preact/hooks';
|
|
16
17
|
|
|
@@ -20,7 +21,7 @@ import { TitleElement, UISchemaElementComponent } from '../../types';
|
|
|
20
21
|
const Title: UISchemaElementComponent<{
|
|
21
22
|
uischema: TitleElement
|
|
22
23
|
}> = (
|
|
23
|
-
{ uischema: {
|
|
24
|
+
{ uischema: { options } },
|
|
24
25
|
) => {
|
|
25
26
|
const titleRef = useRef<HTMLTitleElement>(null);
|
|
26
27
|
const { widgetProps } = useWidgetContext();
|
|
@@ -39,15 +40,10 @@ const Title: UISchemaElementComponent<{
|
|
|
39
40
|
justifyContent="flex-start"
|
|
40
41
|
>
|
|
41
42
|
<Typography
|
|
42
|
-
id={id}
|
|
43
43
|
component="h2"
|
|
44
44
|
variant="h4"
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
tabIndex={-1}
|
|
48
|
-
sx={{
|
|
49
|
-
outline: 'none',
|
|
50
|
-
}}
|
|
45
|
+
testId="o-form-head"
|
|
46
|
+
typographyRef={titleRef}
|
|
51
47
|
>
|
|
52
48
|
{options.content}
|
|
53
49
|
</Typography>
|
|
@@ -10,7 +10,8 @@
|
|
|
10
10
|
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
import { Box
|
|
13
|
+
import { Box } from '@mui/material';
|
|
14
|
+
import { Button, useOdysseyDesignTokens } from '@okta/odyssey-react-mui';
|
|
14
15
|
import { IdxActionParams } from '@okta/okta-auth-js';
|
|
15
16
|
import { h } from 'preact';
|
|
16
17
|
import { useEffect, useState } from 'preact/hooks';
|
|
@@ -34,6 +35,7 @@ const WebAuthNSubmit: UISchemaElementComponent<{
|
|
|
34
35
|
const btnLabel = getTranslation(translations, 'label');
|
|
35
36
|
const btnRetryLabel = getTranslation(translations, 'retry-label');
|
|
36
37
|
|
|
38
|
+
const tokens = useOdysseyDesignTokens();
|
|
37
39
|
const { setMessage, loading } = useWidgetContext();
|
|
38
40
|
const onSubmitHandler = useOnSubmit();
|
|
39
41
|
const [waiting, setWaiting] = useState<boolean>(false);
|
|
@@ -84,20 +86,19 @@ const WebAuthNSubmit: UISchemaElementComponent<{
|
|
|
84
86
|
|
|
85
87
|
return (
|
|
86
88
|
<Box
|
|
87
|
-
marginBlockEnd={
|
|
89
|
+
marginBlockEnd={tokens.Spacing4}
|
|
88
90
|
display={showLoading ? 'flex' : undefined}
|
|
89
91
|
justifyContent={showLoading ? 'center' : undefined}
|
|
90
92
|
>
|
|
91
93
|
<Button
|
|
92
|
-
|
|
93
|
-
|
|
94
|
+
isDisabled={showLoading}
|
|
95
|
+
testId="button"
|
|
94
96
|
onClick={handleClick}
|
|
95
97
|
variant="primary"
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
</Button>
|
|
98
|
+
ariaDescribedBy={ariaDescribedBy}
|
|
99
|
+
isFullWidth
|
|
100
|
+
label={label}
|
|
101
|
+
/>
|
|
101
102
|
</Box>
|
|
102
103
|
);
|
|
103
104
|
};
|