@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,20 +10,9 @@
|
|
|
10
10
|
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
import {
|
|
14
|
-
Box,
|
|
15
|
-
EyeIcon,
|
|
16
|
-
EyeOffIcon,
|
|
17
|
-
FormHelperText,
|
|
18
|
-
IconButton,
|
|
19
|
-
InputAdornment,
|
|
20
|
-
InputBase,
|
|
21
|
-
InputLabel,
|
|
22
|
-
Tooltip,
|
|
23
|
-
Typography,
|
|
24
|
-
} from '@okta/odyssey-react-mui';
|
|
13
|
+
import { PasswordField } from '@okta/odyssey-react-mui';
|
|
25
14
|
import { h } from 'preact';
|
|
26
|
-
import {
|
|
15
|
+
import { buildFieldLevelErrorMessages } from 'src/util/buildFieldLevelErrorMessages';
|
|
27
16
|
|
|
28
17
|
import { useWidgetContext } from '../../contexts';
|
|
29
18
|
import {
|
|
@@ -32,14 +21,16 @@ import {
|
|
|
32
21
|
useValue,
|
|
33
22
|
} from '../../hooks';
|
|
34
23
|
import {
|
|
24
|
+
AutoCompleteValue,
|
|
35
25
|
ChangeEvent,
|
|
36
26
|
UISchemaElementComponent,
|
|
37
27
|
UISchemaElementComponentWithValidationProps,
|
|
38
28
|
} from '../../types';
|
|
39
29
|
import { getTranslation } from '../../util';
|
|
40
|
-
import FieldLevelMessageContainer from '../FieldLevelMessageContainer';
|
|
41
30
|
import { withFormValidationState } from '../hocs';
|
|
42
31
|
|
|
32
|
+
type PasswordAutoCompleteValue = Extract<AutoCompleteValue, 'current-password' | 'new-password'> | undefined;
|
|
33
|
+
|
|
43
34
|
const InputPassword: UISchemaElementComponent<UISchemaElementComponentWithValidationProps> = ({
|
|
44
35
|
uischema,
|
|
45
36
|
errors,
|
|
@@ -59,168 +50,44 @@ const InputPassword: UISchemaElementComponent<UISchemaElementComponentWithValida
|
|
|
59
50
|
focus,
|
|
60
51
|
parserOptions,
|
|
61
52
|
noTranslate,
|
|
62
|
-
showAsterisk,
|
|
63
|
-
dir,
|
|
64
53
|
} = uischema;
|
|
65
54
|
const {
|
|
66
55
|
attributes,
|
|
67
56
|
inputMeta: { name, required },
|
|
68
57
|
} = uischema.options;
|
|
58
|
+
const { autocomplete } = attributes || {};
|
|
69
59
|
const label = getTranslation(translations, 'label');
|
|
70
60
|
const hint = getTranslation(translations, 'hint');
|
|
71
61
|
const explain = getTranslation(translations, 'bottomExplain');
|
|
72
|
-
const optionalLabel = getTranslation(translations, 'optionalLabel');
|
|
73
62
|
const focusRef = useAutoFocus<HTMLInputElement>(focus);
|
|
74
63
|
const parsedExplainContent = useHtmlContentParser(explain, parserOptions);
|
|
75
|
-
const
|
|
76
|
-
// TODO: OKTA-569647 - refactor logic
|
|
77
|
-
const hintId = hint && `${name}-hint`;
|
|
78
|
-
const explainId = explain && `${name}-explain`;
|
|
79
|
-
const ariaDescribedByIds = [describedByIds, hintId, explainId].filter(Boolean).join(' ')
|
|
80
|
-
|| undefined;
|
|
81
|
-
const [showPassword, setShowPassword] = useState<boolean>(false);
|
|
82
|
-
const showPasswordTimeoutRef = useRef<number | undefined>();
|
|
83
|
-
|
|
84
|
-
const handleClickShowPassword = () => {
|
|
85
|
-
setShowPassword(!showPassword);
|
|
86
|
-
|
|
87
|
-
if (showPasswordTimeoutRef.current) {
|
|
88
|
-
window.clearTimeout(showPasswordTimeoutRef.current);
|
|
89
|
-
}
|
|
90
|
-
// If the new value of showPassword is being set to true, set a 30-second timeout to auto-hide the password
|
|
91
|
-
// See: https://github.com/okta/okta-signin-widget#featuresshowpasswordtoggleonsigninpage
|
|
92
|
-
if (!showPassword) {
|
|
93
|
-
showPasswordTimeoutRef.current = window.setTimeout(() => {
|
|
94
|
-
setShowPassword(false);
|
|
95
|
-
}, 30000);
|
|
96
|
-
}
|
|
97
|
-
};
|
|
64
|
+
const { errorMessage, errorMessageList } = buildFieldLevelErrorMessages(errors);
|
|
98
65
|
|
|
99
66
|
return (
|
|
100
|
-
<
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
>
|
|
125
|
-
{optionalLabel}
|
|
126
|
-
</Typography>
|
|
127
|
-
)}
|
|
128
|
-
</InputLabel>
|
|
129
|
-
{hint && (
|
|
130
|
-
<FormHelperText
|
|
131
|
-
id={hintId}
|
|
132
|
-
className="o-form-explain"
|
|
133
|
-
data-se={hintId}
|
|
134
|
-
// TODO: OKTA-577905 - Temporary fix until we can upgrade to the latest version of Odyssey
|
|
135
|
-
sx={{ textAlign: 'start' }}
|
|
136
|
-
>
|
|
137
|
-
{hint}
|
|
138
|
-
</FormHelperText>
|
|
139
|
-
)}
|
|
140
|
-
<InputBase
|
|
141
|
-
id={name}
|
|
142
|
-
name={name}
|
|
143
|
-
error={hasErrors}
|
|
144
|
-
inputRef={focusRef}
|
|
145
|
-
onChange={(e: ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => {
|
|
146
|
-
handleChange?.(e.currentTarget.value);
|
|
147
|
-
}}
|
|
148
|
-
onBlur={(e: ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => {
|
|
149
|
-
handleBlur?.(e?.currentTarget?.value);
|
|
150
|
-
}}
|
|
151
|
-
type={showPassword ? 'text' : 'password'}
|
|
152
|
-
value={value}
|
|
153
|
-
disabled={loading}
|
|
154
|
-
fullWidth
|
|
155
|
-
inputProps={{
|
|
156
|
-
'data-se': name,
|
|
157
|
-
'aria-describedby': ariaDescribedByIds,
|
|
158
|
-
...attributes,
|
|
159
|
-
}}
|
|
160
|
-
className={noTranslate ? 'no-translate' : undefined}
|
|
161
|
-
dir={dir}
|
|
162
|
-
endAdornment={(
|
|
163
|
-
showPasswordToggleOnSignInPage && (
|
|
164
|
-
<InputAdornment
|
|
165
|
-
position="end"
|
|
166
|
-
// switching on the passed `dir` attribute is needed because plugin does not yet
|
|
167
|
-
// handle nested [dir="ltr"] inside [dir="rtl"] well so explicitly set physical
|
|
168
|
-
// properties when 'ltr' is passed onto this element, else can use logical
|
|
169
|
-
sx={(theme) => (dir === 'ltr' ? {
|
|
170
|
-
marginLeft: '8px',
|
|
171
|
-
marginRight: theme.spacing(2),
|
|
172
|
-
} : {
|
|
173
|
-
marginInlineEnd: theme.spacing(2),
|
|
174
|
-
marginInlineStart: '8px',
|
|
175
|
-
})}
|
|
176
|
-
>
|
|
177
|
-
<Tooltip
|
|
178
|
-
title={showPassword ? getTranslation(translations, 'hide') : getTranslation(translations, 'show')}
|
|
179
|
-
PopperProps={{
|
|
180
|
-
// keep the added tooltip element inside the SIW container
|
|
181
|
-
disablePortal: true,
|
|
182
|
-
}}
|
|
183
|
-
>
|
|
184
|
-
<IconButton
|
|
185
|
-
aria-label={getTranslation(translations, 'visibilityToggleLabel')}
|
|
186
|
-
aria-pressed={showPassword}
|
|
187
|
-
aria-controls={name}
|
|
188
|
-
onClick={handleClickShowPassword}
|
|
189
|
-
sx={{
|
|
190
|
-
// instead of using IconButton `edge="end"` we use this sx prop
|
|
191
|
-
// because `edge="end"` does not use logical properties
|
|
192
|
-
...(dir === 'ltr' ? { marginRight: '-12px' } : { marginInlineEnd: '-12px' }),
|
|
193
|
-
'&.Mui-focusVisible': {
|
|
194
|
-
outlineStyle: 'solid',
|
|
195
|
-
outlineWidth: '1px',
|
|
196
|
-
},
|
|
197
|
-
}}
|
|
198
|
-
>
|
|
199
|
-
{showPassword ? <EyeOffIcon /> : <EyeIcon />}
|
|
200
|
-
</IconButton>
|
|
201
|
-
</Tooltip>
|
|
202
|
-
</InputAdornment>
|
|
203
|
-
)
|
|
204
|
-
)}
|
|
205
|
-
/>
|
|
206
|
-
{hasErrors && (
|
|
207
|
-
<FieldLevelMessageContainer
|
|
208
|
-
messages={errors}
|
|
209
|
-
fieldName={name}
|
|
210
|
-
/>
|
|
211
|
-
)}
|
|
212
|
-
{explain && (
|
|
213
|
-
<FormHelperText
|
|
214
|
-
id={explainId}
|
|
215
|
-
className="o-form-explain"
|
|
216
|
-
data-se={explainId}
|
|
217
|
-
// TODO: OKTA-577905 - Temporary fix until we can upgrade to the latest version of Odyssey
|
|
218
|
-
sx={{ textAlign: 'start' }}
|
|
219
|
-
>
|
|
220
|
-
{parsedExplainContent}
|
|
221
|
-
</FormHelperText>
|
|
222
|
-
)}
|
|
223
|
-
</Box>
|
|
67
|
+
<PasswordField
|
|
68
|
+
ariaDescribedBy={describedByIds}
|
|
69
|
+
autoCompleteType={autocomplete as PasswordAutoCompleteValue}
|
|
70
|
+
errorMessage={errorMessage}
|
|
71
|
+
errorMessageList={errorMessageList}
|
|
72
|
+
hasShowPassword={showPasswordToggleOnSignInPage}
|
|
73
|
+
hint={hint ?? parsedExplainContent as string}
|
|
74
|
+
id={name}
|
|
75
|
+
inputRef={focusRef}
|
|
76
|
+
isDisabled={loading}
|
|
77
|
+
isFullWidth
|
|
78
|
+
isOptional={required === false}
|
|
79
|
+
name={name}
|
|
80
|
+
label={label ?? ''}
|
|
81
|
+
onChange={(e: ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => {
|
|
82
|
+
handleChange?.(e.currentTarget.value);
|
|
83
|
+
}}
|
|
84
|
+
onBlur={(e: ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => {
|
|
85
|
+
handleBlur?.(e?.currentTarget?.value);
|
|
86
|
+
}}
|
|
87
|
+
testId={name}
|
|
88
|
+
translate={noTranslate ? 'no' : undefined}
|
|
89
|
+
value={value as string ?? ''}
|
|
90
|
+
/>
|
|
224
91
|
);
|
|
225
92
|
};
|
|
226
93
|
|
|
@@ -10,14 +10,9 @@
|
|
|
10
10
|
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
import {
|
|
14
|
-
Box,
|
|
15
|
-
FormHelperText,
|
|
16
|
-
InputBase,
|
|
17
|
-
InputLabel,
|
|
18
|
-
Typography,
|
|
19
|
-
} from '@okta/odyssey-react-mui';
|
|
13
|
+
import { TextField } from '@okta/odyssey-react-mui';
|
|
20
14
|
import { h } from 'preact';
|
|
15
|
+
import { buildFieldLevelErrorMessages } from 'src/util/buildFieldLevelErrorMessages';
|
|
21
16
|
|
|
22
17
|
import { useWidgetContext } from '../../contexts';
|
|
23
18
|
import {
|
|
@@ -30,16 +25,13 @@ import {
|
|
|
30
25
|
UISchemaElementComponent, UISchemaElementComponentWithValidationProps,
|
|
31
26
|
} from '../../types';
|
|
32
27
|
import { getTranslation } from '../../util';
|
|
33
|
-
import FieldLevelMessageContainer from '../FieldLevelMessageContainer';
|
|
34
28
|
import { withFormValidationState } from '../hocs';
|
|
35
29
|
|
|
36
30
|
const InputText: UISchemaElementComponent<UISchemaElementComponentWithValidationProps> = ({
|
|
37
|
-
type,
|
|
38
31
|
uischema,
|
|
39
32
|
errors,
|
|
40
33
|
handleChange,
|
|
41
34
|
handleBlur,
|
|
42
|
-
describedByIds,
|
|
43
35
|
}) => {
|
|
44
36
|
const value = useValue(uischema);
|
|
45
37
|
const { loading } = useWidgetContext();
|
|
@@ -47,112 +39,44 @@ const InputText: UISchemaElementComponent<UISchemaElementComponentWithValidation
|
|
|
47
39
|
translations = [],
|
|
48
40
|
focus,
|
|
49
41
|
parserOptions,
|
|
50
|
-
showAsterisk,
|
|
51
|
-
dir,
|
|
52
42
|
} = uischema;
|
|
53
43
|
const label = getTranslation(translations, 'label');
|
|
54
44
|
const hint = getTranslation(translations, 'hint');
|
|
55
45
|
const explain = getTranslation(translations, 'bottomExplain');
|
|
56
|
-
const optionalLabel = getTranslation(translations, 'optionalLabel');
|
|
57
46
|
const {
|
|
58
47
|
attributes,
|
|
59
48
|
inputMeta: { name, required },
|
|
60
49
|
dataSe,
|
|
61
50
|
} = uischema.options;
|
|
51
|
+
const { autocomplete, inputmode } = attributes || {};
|
|
62
52
|
const focusRef = useAutoFocus<HTMLInputElement>(focus);
|
|
63
53
|
const parsedExplainContent = useHtmlContentParser(explain, parserOptions);
|
|
64
|
-
const
|
|
65
|
-
// TODO: OKTA-569647 - refactor logic
|
|
66
|
-
const hintId = hint && `${name}-hint`;
|
|
67
|
-
const explainId = explain && `${name}-explain`;
|
|
68
|
-
const ariaDescribedByIds = [describedByIds, hintId, explainId].filter(Boolean).join(' ')
|
|
69
|
-
|| undefined;
|
|
54
|
+
const { errorMessage, errorMessageList } = buildFieldLevelErrorMessages(errors);
|
|
70
55
|
|
|
71
56
|
return (
|
|
72
|
-
<
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
sx={{ whiteSpace: 'nowrap' }}
|
|
96
|
-
>
|
|
97
|
-
{optionalLabel}
|
|
98
|
-
</Typography>
|
|
99
|
-
)}
|
|
100
|
-
</InputLabel>
|
|
101
|
-
{
|
|
102
|
-
hint && (
|
|
103
|
-
<FormHelperText
|
|
104
|
-
id={hintId}
|
|
105
|
-
className="o-form-explain"
|
|
106
|
-
data-se={hintId}
|
|
107
|
-
// TODO: OKTA-577905 - Temporary fix until we can upgrade to the latest version of Odyssey
|
|
108
|
-
sx={{ textAlign: 'start' }}
|
|
109
|
-
>
|
|
110
|
-
{hint}
|
|
111
|
-
</FormHelperText>
|
|
112
|
-
)
|
|
113
|
-
}
|
|
114
|
-
<InputBase
|
|
115
|
-
value={value}
|
|
116
|
-
type={type || 'text'}
|
|
117
|
-
id={name}
|
|
118
|
-
name={name}
|
|
119
|
-
error={hasErrors}
|
|
120
|
-
onChange={(e: ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => {
|
|
121
|
-
handleChange?.(e.currentTarget.value);
|
|
122
|
-
}}
|
|
123
|
-
onBlur={(e: ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => {
|
|
124
|
-
handleBlur?.(e?.currentTarget?.value);
|
|
125
|
-
}}
|
|
126
|
-
disabled={loading}
|
|
127
|
-
fullWidth
|
|
128
|
-
inputProps={{
|
|
129
|
-
'data-se': dataSe,
|
|
130
|
-
'aria-describedby': ariaDescribedByIds,
|
|
131
|
-
...attributes,
|
|
132
|
-
}}
|
|
133
|
-
inputRef={focusRef}
|
|
134
|
-
dir={dir}
|
|
135
|
-
/>
|
|
136
|
-
{hasErrors && (
|
|
137
|
-
<FieldLevelMessageContainer
|
|
138
|
-
messages={errors}
|
|
139
|
-
fieldName={name}
|
|
140
|
-
/>
|
|
141
|
-
)}
|
|
142
|
-
{
|
|
143
|
-
explain && (
|
|
144
|
-
<FormHelperText
|
|
145
|
-
id={explainId}
|
|
146
|
-
className="o-form-explain"
|
|
147
|
-
data-se={explainId}
|
|
148
|
-
// TODO: OKTA-577905 - Temporary fix until we can upgrade to the latest version of Odyssey
|
|
149
|
-
sx={{ textAlign: 'start' }}
|
|
150
|
-
>
|
|
151
|
-
{parsedExplainContent}
|
|
152
|
-
</FormHelperText>
|
|
153
|
-
)
|
|
154
|
-
}
|
|
155
|
-
</Box>
|
|
57
|
+
<TextField
|
|
58
|
+
autoCompleteType={autocomplete}
|
|
59
|
+
errorMessage={errorMessage}
|
|
60
|
+
errorMessageList={errorMessageList}
|
|
61
|
+
hint={hint ?? parsedExplainContent as string}
|
|
62
|
+
id={name}
|
|
63
|
+
inputRef={focusRef}
|
|
64
|
+
inputMode={inputmode}
|
|
65
|
+
isDisabled={loading}
|
|
66
|
+
isFullWidth
|
|
67
|
+
isOptional={required === false}
|
|
68
|
+
name={name}
|
|
69
|
+
label={label ?? ''}
|
|
70
|
+
onChange={(e: ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => {
|
|
71
|
+
handleChange?.(e.currentTarget.value);
|
|
72
|
+
}}
|
|
73
|
+
onBlur={(e: ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => {
|
|
74
|
+
handleBlur?.(e?.currentTarget?.value);
|
|
75
|
+
}}
|
|
76
|
+
testId={dataSe}
|
|
77
|
+
type="text"
|
|
78
|
+
value={value as string ?? ''}
|
|
79
|
+
/>
|
|
156
80
|
);
|
|
157
81
|
};
|
|
158
82
|
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
import {
|
|
13
|
+
import { Button as OdyButton, useOdysseyDesignTokens } from '@okta/odyssey-react-mui';
|
|
14
14
|
import { h } from 'preact';
|
|
15
15
|
|
|
16
16
|
import Util from '../../../../util/Util';
|
|
@@ -30,6 +30,7 @@ import { OktaVerifyIcon } from '../Icon';
|
|
|
30
30
|
const LaunchAuthenticatorButton: UISchemaElementComponent<{
|
|
31
31
|
uischema: LaunchAuthenticatorButtonElement
|
|
32
32
|
}> = ({ uischema }) => {
|
|
33
|
+
const tokens = useOdysseyDesignTokens();
|
|
33
34
|
const onSubmitHandler = useOnSubmit();
|
|
34
35
|
const {
|
|
35
36
|
translations = [],
|
|
@@ -79,32 +80,19 @@ const LaunchAuthenticatorButton: UISchemaElementComponent<{
|
|
|
79
80
|
return (
|
|
80
81
|
<OdyButton
|
|
81
82
|
variant="secondary"
|
|
82
|
-
|
|
83
|
+
isFullWidth
|
|
83
84
|
onClick={handleClick}
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
marginBlockEnd: '-3px',
|
|
96
|
-
}}
|
|
97
|
-
>
|
|
98
|
-
<OktaVerifyIcon
|
|
99
|
-
name="mfa-okta-verify"
|
|
100
|
-
description={iconDescription}
|
|
101
|
-
width={24}
|
|
102
|
-
height={24}
|
|
103
|
-
/>
|
|
104
|
-
</Box>
|
|
105
|
-
{label}
|
|
106
|
-
</Box>
|
|
107
|
-
</OdyButton>
|
|
85
|
+
buttonRef={focusRef}
|
|
86
|
+
label={label || ''}
|
|
87
|
+
startIcon={(
|
|
88
|
+
<OktaVerifyIcon
|
|
89
|
+
name="mfa-okta-verify"
|
|
90
|
+
description={iconDescription}
|
|
91
|
+
width={tokens.Spacing5}
|
|
92
|
+
height={tokens.Spacing5}
|
|
93
|
+
/>
|
|
94
|
+
)}
|
|
95
|
+
/>
|
|
108
96
|
);
|
|
109
97
|
};
|
|
110
98
|
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
import { Link as
|
|
13
|
+
import { Link as MuiLink } from '@mui/material';
|
|
14
|
+
import { Link as OdyLink } from '@okta/odyssey-react-mui';
|
|
15
15
|
import { h } from 'preact';
|
|
16
16
|
|
|
17
17
|
import { useWidgetContext } from '../../contexts';
|
|
@@ -27,7 +27,6 @@ const Link: UISchemaElementComponent<{
|
|
|
27
27
|
} = widgetContext;
|
|
28
28
|
const {
|
|
29
29
|
focus,
|
|
30
|
-
ariaDescribedBy,
|
|
31
30
|
options: {
|
|
32
31
|
label,
|
|
33
32
|
href,
|
|
@@ -63,38 +62,27 @@ const Link: UISchemaElementComponent<{
|
|
|
63
62
|
|
|
64
63
|
return (
|
|
65
64
|
typeof href === 'undefined' ? (
|
|
66
|
-
<
|
|
65
|
+
<MuiLink
|
|
67
66
|
component="button"
|
|
68
|
-
// Fixes OKTA-653788 (see comments) - Currently we treat all links as buttons
|
|
69
|
-
type="button"
|
|
70
|
-
variant="body1"
|
|
71
67
|
role="link"
|
|
72
68
|
onClick={onClick}
|
|
73
|
-
aria-describedby={ariaDescribedBy}
|
|
74
69
|
ref={focusRef}
|
|
75
70
|
data-se={dataSe}
|
|
76
|
-
sx={{
|
|
77
|
-
'&:hover': {
|
|
78
|
-
cursor: 'pointer',
|
|
79
|
-
},
|
|
80
|
-
verticalAlign: 'baseline',
|
|
81
|
-
}}
|
|
82
71
|
>
|
|
83
72
|
{label}
|
|
84
|
-
</
|
|
73
|
+
</MuiLink>
|
|
85
74
|
)
|
|
86
75
|
: (
|
|
87
|
-
<
|
|
76
|
+
<OdyLink
|
|
88
77
|
href={href}
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
data-se={dataSe}
|
|
78
|
+
linkRef={focusRef}
|
|
79
|
+
testId={dataSe}
|
|
92
80
|
target={target}
|
|
93
81
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
94
82
|
{...(target === '_blank' && { rel: 'noopener noreferrer' })}
|
|
95
83
|
>
|
|
96
84
|
{label}
|
|
97
|
-
</
|
|
85
|
+
</OdyLink>
|
|
98
86
|
)
|
|
99
87
|
);
|
|
100
88
|
};
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
import { List as ListMui, ListItem } from '@mui/material';
|
|
14
|
-
import {
|
|
13
|
+
import { Box, List as ListMui, ListItem } from '@mui/material';
|
|
14
|
+
import { Typography, useOdysseyDesignTokens } from '@okta/odyssey-react-mui';
|
|
15
15
|
import { FunctionComponent, h } from 'preact';
|
|
16
16
|
|
|
17
17
|
import Logger from '../../../../util/Logger';
|
|
@@ -28,14 +28,17 @@ import Button from '../Button';
|
|
|
28
28
|
import InformationalText from '../InformationalText';
|
|
29
29
|
|
|
30
30
|
const renderElement = (item: UISchemaElement) => {
|
|
31
|
-
const Container: FunctionComponent = ({ children }) =>
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
31
|
+
const Container: FunctionComponent = ({ children }) => {
|
|
32
|
+
const tokens = useOdysseyDesignTokens();
|
|
33
|
+
return (
|
|
34
|
+
<Box
|
|
35
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
36
|
+
{...(!(item).noMargin && { marginBlockEnd: tokens.Spacing4 })}
|
|
37
|
+
>
|
|
38
|
+
{children}
|
|
39
|
+
</Box>
|
|
40
|
+
);
|
|
41
|
+
};
|
|
39
42
|
|
|
40
43
|
switch (item.type) {
|
|
41
44
|
case 'Button':
|
|
@@ -75,18 +78,19 @@ const List: UISchemaElementComponent<{
|
|
|
75
78
|
uischema: ListElement
|
|
76
79
|
}> = ({ uischema }) => {
|
|
77
80
|
const { options } = uischema;
|
|
81
|
+
const tokens = useOdysseyDesignTokens();
|
|
78
82
|
|
|
79
83
|
return options.items?.length ? (
|
|
80
84
|
<Box
|
|
81
85
|
display="flex"
|
|
82
86
|
flexDirection="column"
|
|
83
87
|
justifyContent="flex-start"
|
|
84
|
-
marginBlockEnd={
|
|
88
|
+
marginBlockEnd={tokens.Spacing4}
|
|
85
89
|
>
|
|
86
90
|
{ options.description && <Typography component="p">{options.description}</Typography> }
|
|
87
91
|
<ListMui
|
|
88
92
|
component={options.type}
|
|
89
|
-
sx={{ listStyleType: options.type === 'ol' ? 'decimal' : 'disc', pl:
|
|
93
|
+
sx={{ listStyleType: options.type === 'ol' ? 'decimal' : 'disc', pl: tokens.Spacing4 }}
|
|
90
94
|
>
|
|
91
95
|
{
|
|
92
96
|
options.items.map((item: string | UISchemaLayout, index: number) => (
|
|
@@ -10,7 +10,8 @@
|
|
|
10
10
|
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
import { Box
|
|
13
|
+
import { Box } from '@mui/material';
|
|
14
|
+
import { Button as OdyButton, useOdysseyDesignTokens } from '@okta/odyssey-react-mui';
|
|
14
15
|
import { h } from 'preact';
|
|
15
16
|
import { useEffect, useState } from 'preact/hooks';
|
|
16
17
|
|
|
@@ -37,6 +38,8 @@ const PIVButton: UISchemaElementComponent<{
|
|
|
37
38
|
|
|
38
39
|
const showLoading = waiting || loading;
|
|
39
40
|
|
|
41
|
+
const tokens = useOdysseyDesignTokens();
|
|
42
|
+
|
|
40
43
|
const initCertPrompt = () => {
|
|
41
44
|
setWaiting(true);
|
|
42
45
|
setMessage(undefined);
|
|
@@ -61,7 +64,7 @@ const PIVButton: UISchemaElementComponent<{
|
|
|
61
64
|
|
|
62
65
|
return (
|
|
63
66
|
<Box
|
|
64
|
-
marginBlockEnd={
|
|
67
|
+
marginBlockEnd={tokens.Spacing4}
|
|
65
68
|
display={showLoading ? 'flex' : undefined}
|
|
66
69
|
justifyContent={showLoading ? 'center' : undefined}
|
|
67
70
|
>
|
|
@@ -70,14 +73,13 @@ const PIVButton: UISchemaElementComponent<{
|
|
|
70
73
|
? <Spinner dataSe="okta-spinner" />
|
|
71
74
|
: (
|
|
72
75
|
<OdyButton
|
|
73
|
-
|
|
76
|
+
label={btnLabel || ''}
|
|
77
|
+
testId="button"
|
|
74
78
|
onClick={handleClick}
|
|
75
79
|
variant="primary"
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
{btnLabel}
|
|
80
|
-
</OdyButton>
|
|
80
|
+
ariaDescribedBy={ariaDescribedBy}
|
|
81
|
+
isFullWidth
|
|
82
|
+
/>
|
|
81
83
|
)
|
|
82
84
|
}
|
|
83
85
|
</Box>
|