@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.
Files changed (246) hide show
  1. package/README.md +5 -5
  2. package/dist/css/fonts.css +172 -0
  3. package/dist/css/okta-sign-in.next.css +1 -240
  4. package/dist/css/okta-sign-in.next.css.map +1 -1
  5. package/dist/esm/src/config/config.json.js +1 -1
  6. package/dist/js/okta-sign-in.classic.js +1 -1
  7. package/dist/js/okta-sign-in.classic.min.js +1 -1
  8. package/dist/js/okta-sign-in.js +1 -1
  9. package/dist/js/okta-sign-in.min.js +1 -1
  10. package/dist/js/okta-sign-in.next.js +61 -19
  11. package/dist/js/okta-sign-in.next.js.map +1 -1
  12. package/dist/js/okta-sign-in.next.no-polyfill.js +60 -18
  13. package/dist/js/okta-sign-in.next.no-polyfill.js.map +1 -1
  14. package/dist/js/okta-sign-in.no-polyfill.min.js +1 -1
  15. package/dist/js/okta-sign-in.oie.js +1 -1
  16. package/dist/js/okta-sign-in.oie.min.js +1 -1
  17. package/package.json +10 -5
  18. package/src/config/config.json +1 -1
  19. package/src/v3/components/AuthCoin/AuthCoin.tsx +15 -17
  20. package/src/v3/components/AuthContainer/AuthContainer.tsx +11 -17
  21. package/src/v3/components/AuthContent/AuthContent.tsx +21 -16
  22. package/src/v3/components/AuthHeader/AuthHeader.tsx +18 -19
  23. package/src/v3/components/AuthenticatorButton/AuthenticatorButton.tsx +116 -77
  24. package/src/v3/components/AuthenticatorButton/AuthenticatorButtonList.tsx +9 -3
  25. package/src/v3/components/Button/Button.tsx +16 -20
  26. package/src/v3/components/CaptchaContainer/CaptchaContainer.tsx +1 -1
  27. package/src/v3/components/Checkbox/Checkbox.tsx +33 -82
  28. package/src/v3/components/ConsentHeader/ConsentHeader.tsx +23 -23
  29. package/src/v3/components/Divider/Divider.tsx +2 -2
  30. package/src/v3/components/Form/Accordion.tsx +15 -36
  31. package/src/v3/components/Form/ElementContainer.tsx +6 -3
  32. package/src/v3/components/Form/Form.tsx +2 -4
  33. package/src/v3/components/Form/Layout.tsx +1 -1
  34. package/src/v3/components/Form/LayoutContainer.tsx +4 -2
  35. package/src/v3/components/Heading/Heading.tsx +7 -5
  36. package/src/v3/components/Icon/CustomAppIcon.tsx +13 -15
  37. package/src/v3/components/Icon/CustomOTPIcon.tsx +5 -10
  38. package/src/v3/components/Icon/DuoIcon.tsx +5 -10
  39. package/src/v3/components/Icon/EmailIcon.tsx +5 -10
  40. package/src/v3/components/Icon/GoogleOTPIcon.tsx +5 -10
  41. package/src/v3/components/Icon/IDPIcon.tsx +5 -10
  42. package/src/v3/components/Icon/OktaVerifyIcon.tsx +0 -7
  43. package/src/v3/components/Icon/OnPremMFAIcon.tsx +5 -10
  44. package/src/v3/components/Icon/PasswordIcon.tsx +5 -10
  45. package/src/v3/components/Icon/PhoneIcon.tsx +5 -10
  46. package/src/v3/components/Icon/RSAIcon.tsx +6 -11
  47. package/src/v3/components/Icon/SecurityKeyOrBiometricsIcon.tsx +5 -10
  48. package/src/v3/components/Icon/SecurityQuestionIcon.tsx +5 -10
  49. package/src/v3/components/Icon/SmartCardIcon.tsx +5 -10
  50. package/src/v3/components/Icon/SymantecIcon.tsx +5 -10
  51. package/src/v3/components/Icon/YubiKeyIcon.tsx +5 -10
  52. package/src/v3/components/Icon/index.tsx +0 -2
  53. package/src/v3/components/IdentifierContainer/IdentifierContainer.tsx +31 -47
  54. package/src/v3/components/Image/Image.tsx +42 -0
  55. package/src/v3/{src/components/CustomPluginsOdysseyCacheProvider → components/Image}/index.tsx +2 -2
  56. package/src/v3/components/ImageWithText/ImageWithText.tsx +7 -4
  57. package/src/v3/components/Images/AppIcon.tsx +16 -46
  58. package/src/v3/components/Images/DeviceIcon.tsx +16 -32
  59. package/src/v3/components/Images/LocationIcon.tsx +16 -26
  60. package/src/v3/components/Images/PhoneIcon.tsx +34 -29
  61. package/src/v3/components/Images/YubikeyDemoImage.tsx +32 -27
  62. package/src/v3/components/Images/index.tsx +0 -1
  63. package/src/v3/components/InfoBox/InfoBox.tsx +12 -12
  64. package/src/v3/components/InfoSection/InfoSection.tsx +20 -14
  65. package/src/v3/components/InformationalText/InformationalText.tsx +16 -6
  66. package/src/v3/components/InputPassword/InputPassword.tsx +31 -164
  67. package/src/v3/components/InputText/InputText.tsx +27 -103
  68. package/src/v3/components/LaunchAuthenticatorButton/LaunchAuthenticatorButton.tsx +14 -26
  69. package/src/v3/components/Link/Link.tsx +8 -20
  70. package/src/v3/components/List/List.tsx +16 -12
  71. package/src/v3/components/PIVButton/PIVButton.tsx +10 -8
  72. package/src/v3/components/PasswordRequirements/Icon.tsx +17 -23
  73. package/src/v3/components/PasswordRequirements/PasswordMatches.tsx +9 -2
  74. package/src/v3/components/PasswordRequirements/PasswordRequirementListItem.tsx +6 -5
  75. package/src/v3/components/PasswordRequirements/PasswordRequirements.tsx +5 -3
  76. package/src/v3/components/PhoneAuthenticator/PhoneAuthenticator.tsx +53 -137
  77. package/src/v3/components/QRCode/QRCode.tsx +27 -20
  78. package/src/v3/components/Radio/Radio.tsx +31 -93
  79. package/src/v3/components/ReminderPrompt/ReminderPrompt.tsx +9 -12
  80. package/src/v3/components/Select/Select.tsx +45 -92
  81. package/src/v3/components/Spinner/Spinner.tsx +6 -8
  82. package/src/v3/components/StepperButton/StepperButton.tsx +6 -10
  83. package/src/v3/components/StepperLink/StepperLink.tsx +1 -1
  84. package/src/v3/components/StepperRadio/StepperRadio.tsx +22 -43
  85. package/src/v3/components/TextWithActionLink/TextWithActionLink.tsx +1 -1
  86. package/src/v3/components/Title/Title.tsx +5 -9
  87. package/src/v3/components/WebAuthNSubmitButton/WebAuthNSubmitButton.tsx +10 -9
  88. package/src/v3/components/Widget/GlobalStyles.tsx +16 -21
  89. package/src/v3/components/Widget/index.tsx +51 -36
  90. package/src/v3/components/Widget/style.scss +295 -0
  91. package/src/v3/components/WidgetMessageContainer/WidgetMessageContainer.tsx +11 -8
  92. package/src/v3/components/hocs/withFormValidationState.tsx +2 -5
  93. package/src/v3/jest.config.js +1 -0
  94. package/src/v3/jest.setup.js +1 -0
  95. package/src/v3/package.json +11 -7
  96. package/src/v3/screenshots/base/UI_demo/UI_demo_RTL_VRT.png +0 -0
  97. package/src/v3/screenshots/base/UI_demo/UI_demo_VRT.png +0 -0
  98. package/src/v3/src/components/AuthCoin/AuthCoin.tsx +15 -17
  99. package/src/v3/src/components/AuthCoin/__snapshots__/AuthCoin.test.tsx.snap +20 -47
  100. package/src/v3/src/components/AuthContainer/AuthContainer.tsx +11 -17
  101. package/src/v3/src/components/AuthContent/AuthContent.tsx +21 -16
  102. package/src/v3/src/components/AuthHeader/AuthHeader.tsx +18 -19
  103. package/src/v3/src/components/AuthenticatorButton/AuthenticatorButton.tsx +116 -77
  104. package/src/v3/src/components/AuthenticatorButton/AuthenticatorButtonList.tsx +9 -3
  105. package/src/v3/src/components/Button/Button.tsx +16 -20
  106. package/src/v3/src/components/CaptchaContainer/CaptchaContainer.tsx +1 -1
  107. package/src/v3/src/components/Checkbox/Checkbox.tsx +33 -82
  108. package/src/v3/src/components/ConsentHeader/ConsentHeader.tsx +23 -23
  109. package/src/v3/src/components/Divider/Divider.tsx +2 -2
  110. package/src/v3/src/components/Form/Accordion.tsx +15 -36
  111. package/src/v3/src/components/Form/ElementContainer.tsx +6 -3
  112. package/src/v3/src/components/Form/Form.tsx +2 -4
  113. package/src/v3/src/components/Form/Layout.tsx +1 -1
  114. package/src/v3/src/components/Form/LayoutContainer.tsx +4 -2
  115. package/src/v3/src/components/Heading/Heading.tsx +7 -5
  116. package/src/v3/src/components/Icon/CustomAppIcon.tsx +13 -15
  117. package/src/v3/src/components/Icon/CustomOTPIcon.tsx +5 -10
  118. package/src/v3/src/components/Icon/DuoIcon.tsx +5 -10
  119. package/src/v3/src/components/Icon/EmailIcon.tsx +5 -10
  120. package/src/v3/src/components/Icon/GoogleOTPIcon.tsx +5 -10
  121. package/src/v3/src/components/Icon/IDPIcon.tsx +5 -10
  122. package/src/v3/src/components/Icon/OktaVerifyIcon.tsx +0 -7
  123. package/src/v3/src/components/Icon/OnPremMFAIcon.tsx +5 -10
  124. package/src/v3/src/components/Icon/PasswordIcon.tsx +5 -10
  125. package/src/v3/src/components/Icon/PhoneIcon.tsx +5 -10
  126. package/src/v3/src/components/Icon/RSAIcon.tsx +6 -11
  127. package/src/v3/src/components/Icon/SecurityKeyOrBiometricsIcon.tsx +5 -10
  128. package/src/v3/src/components/Icon/SecurityQuestionIcon.tsx +5 -10
  129. package/src/v3/src/components/Icon/SmartCardIcon.tsx +5 -10
  130. package/src/v3/src/components/Icon/SymantecIcon.tsx +5 -10
  131. package/src/v3/src/components/Icon/YubiKeyIcon.tsx +5 -10
  132. package/src/v3/src/components/Icon/index.tsx +0 -2
  133. package/src/v3/src/components/IdentifierContainer/IdentifierContainer.tsx +31 -47
  134. package/src/v3/src/components/Image/Image.tsx +42 -0
  135. package/src/v3/{components/CustomPluginsOdysseyCacheProvider → src/components/Image}/index.tsx +2 -2
  136. package/src/v3/src/components/ImageWithText/ImageWithText.tsx +7 -4
  137. package/src/v3/src/components/Images/AppIcon.tsx +16 -46
  138. package/src/v3/src/components/Images/DeviceIcon.tsx +16 -32
  139. package/src/v3/src/components/Images/LocationIcon.tsx +16 -26
  140. package/src/v3/src/components/Images/PhoneIcon.tsx +34 -29
  141. package/src/v3/src/components/Images/YubikeyDemoImage.tsx +32 -27
  142. package/src/v3/src/components/Images/index.tsx +0 -1
  143. package/src/v3/src/components/InfoBox/InfoBox.tsx +12 -12
  144. package/src/v3/src/components/InfoSection/InfoSection.tsx +20 -14
  145. package/src/v3/src/components/InformationalText/InformationalText.tsx +16 -6
  146. package/src/v3/src/components/InputPassword/InputPassword.tsx +31 -164
  147. package/src/v3/src/components/InputText/InputText.tsx +27 -103
  148. package/src/v3/src/components/LaunchAuthenticatorButton/LaunchAuthenticatorButton.tsx +14 -26
  149. package/src/v3/src/components/Link/Link.tsx +8 -20
  150. package/src/v3/src/components/List/List.tsx +16 -12
  151. package/src/v3/src/components/PIVButton/PIVButton.tsx +10 -8
  152. package/src/v3/src/components/PasswordRequirements/Icon.tsx +17 -23
  153. package/src/v3/src/components/PasswordRequirements/PasswordMatches.tsx +9 -2
  154. package/src/v3/src/components/PasswordRequirements/PasswordRequirementListItem.tsx +6 -5
  155. package/src/v3/src/components/PasswordRequirements/PasswordRequirements.tsx +5 -3
  156. package/src/v3/src/components/PhoneAuthenticator/PhoneAuthenticator.tsx +53 -137
  157. package/src/v3/src/components/QRCode/QRCode.tsx +27 -20
  158. package/src/v3/src/components/Radio/Radio.tsx +31 -93
  159. package/src/v3/src/components/ReminderPrompt/ReminderPrompt.tsx +9 -12
  160. package/src/v3/src/components/ReminderPrompt/__snapshots__/ReminderPrompt.test.tsx.snap +37 -17
  161. package/src/v3/src/components/Select/Select.tsx +45 -92
  162. package/src/v3/src/components/Spinner/Spinner.tsx +6 -8
  163. package/src/v3/src/components/StepperButton/StepperButton.tsx +6 -10
  164. package/src/v3/src/components/StepperLink/StepperLink.tsx +1 -1
  165. package/src/v3/src/components/StepperRadio/StepperRadio.tsx +22 -43
  166. package/src/v3/src/components/TextWithActionLink/TextWithActionLink.tsx +1 -1
  167. package/src/v3/src/components/Title/Title.tsx +5 -9
  168. package/src/v3/src/components/WebAuthNSubmitButton/WebAuthNSubmitButton.tsx +10 -9
  169. package/src/v3/src/components/Widget/GlobalStyles.tsx +16 -21
  170. package/src/v3/src/components/Widget/index.tsx +51 -36
  171. package/src/v3/src/components/Widget/style.scss +295 -0
  172. package/src/v3/src/components/WidgetMessageContainer/WidgetMessageContainer.tsx +11 -8
  173. package/src/v3/src/components/hocs/withFormValidationState.tsx +2 -5
  174. package/src/v3/src/transformer/button/__snapshots__/transformIDPButtons.test.ts.snap +0 -2
  175. package/src/v3/src/transformer/i18n/__snapshots__/transformAuthenticatorButton.test.ts.snap +4 -4
  176. package/src/v3/src/transformer/i18n/transformAuthenticatorButton.test.ts +3 -3
  177. package/src/v3/src/transformer/i18n/transformAuthenticatorButton.ts +18 -2
  178. package/src/v3/src/transformer/layout/development/transformEnumerateComponents.ts +72 -5
  179. package/src/v3/src/transformer/layout/idp/__snapshots__/transformIdpRedirect.test.ts.snap +4 -4
  180. package/src/v3/src/transformer/selectAuthenticator/__snapshots__/transformSelectAuthenticatorVerify.test.ts.snap +0 -3
  181. package/src/v3/src/transformer/selectAuthenticator/__snapshots__/transformSelectOVCustomAppMethodVerify.test.ts.snap +0 -1
  182. package/src/v3/src/transformer/selectAuthenticator/__snapshots__/utils.test.ts.snap +163 -42
  183. package/src/v3/src/transformer/selectAuthenticator/transformSelectAuthenticatorEnroll.ts +7 -1
  184. package/src/v3/src/transformer/selectAuthenticator/transformSelectAuthenticatorVerify.ts +0 -1
  185. package/src/v3/src/transformer/selectAuthenticator/transformSelectOVCustomAppMethodVerify.ts +0 -1
  186. package/src/v3/src/transformer/selectAuthenticator/utils.test.ts +117 -39
  187. package/src/v3/src/transformer/selectAuthenticator/utils.ts +102 -58
  188. package/src/v3/src/transformer/terminal/transformEmailMagicLinkOTPOnlyElements.ts +1 -3
  189. package/src/v3/src/transformer/uischema/transform.test.ts +0 -6
  190. package/src/v3/src/transformer/uischema/transform.ts +0 -2
  191. package/src/v3/src/{components/FieldLevelMessageContainer/index.tsx → types/image.ts} +10 -3
  192. package/src/v3/src/types/index.ts +1 -0
  193. package/src/v3/src/types/schema.ts +2 -1
  194. package/src/v3/src/types/widget.ts +3 -3
  195. package/src/v3/src/util/buildFieldLevelErrorMessages.ts +48 -0
  196. package/src/v3/src/util/formUtils.ts +5 -17
  197. package/src/v3/src/util/htmlContentParserUtils.tsx +3 -1
  198. package/src/v3/src/util/index.ts +2 -0
  199. package/src/v3/src/util/isLtrField.ts +22 -0
  200. package/src/v3/src/util/languageUtils.ts +14 -0
  201. package/src/v3/src/util/leonardo.d.ts +571 -0
  202. package/src/v3/src/util/mergeThemes.test.tsx +20 -7
  203. package/src/v3/src/util/mergeThemes.ts +32 -1
  204. package/src/v3/src/util/stylisPlugins.ts +21 -0
  205. package/src/v3/src/util/theme.test.ts +63 -187
  206. package/src/v3/src/util/theme.ts +274 -247
  207. package/src/v3/svgo.config.js +0 -6
  208. package/src/v3/transformer/i18n/transformAuthenticatorButton.ts +18 -2
  209. package/src/v3/transformer/layout/development/transformEnumerateComponents.ts +72 -5
  210. package/src/v3/transformer/selectAuthenticator/transformSelectAuthenticatorEnroll.ts +7 -1
  211. package/src/v3/transformer/selectAuthenticator/transformSelectAuthenticatorVerify.ts +0 -1
  212. package/src/v3/transformer/selectAuthenticator/transformSelectOVCustomAppMethodVerify.ts +0 -1
  213. package/src/v3/transformer/selectAuthenticator/utils.ts +102 -58
  214. package/src/v3/transformer/terminal/transformEmailMagicLinkOTPOnlyElements.ts +1 -3
  215. package/src/v3/transformer/uischema/transform.ts +0 -2
  216. package/src/v3/tsconfig.base.json +3 -0
  217. package/src/v3/{components/FieldLevelMessageContainer/index.tsx → types/image.ts} +10 -3
  218. package/src/v3/types/index.ts +1 -0
  219. package/src/v3/types/schema.ts +2 -1
  220. package/src/v3/types/widget.ts +3 -3
  221. package/src/v3/util/buildFieldLevelErrorMessages.ts +48 -0
  222. package/src/v3/util/formUtils.ts +5 -17
  223. package/src/v3/util/htmlContentParserUtils.tsx +3 -1
  224. package/src/v3/util/index.ts +2 -0
  225. package/src/v3/util/isLtrField.ts +22 -0
  226. package/src/v3/util/languageUtils.ts +14 -0
  227. package/src/v3/util/leonardo.d.ts +571 -0
  228. package/src/v3/util/mergeThemes.ts +32 -1
  229. package/src/v3/util/stylisPlugins.ts +21 -0
  230. package/src/v3/util/theme.ts +274 -247
  231. package/src/v3/components/CustomPluginsOdysseyCacheProvider/CustomPluginsOdysseyCacheProvider.tsx +0 -66
  232. package/src/v3/components/FieldLevelMessageContainer/FieldLevelMessageContainer.tsx +0 -55
  233. package/src/v3/components/Icon/CheckCircle.tsx +0 -30
  234. package/src/v3/components/Icon/RightArrowIcon.tsx +0 -30
  235. package/src/v3/components/Images/MobileDeviceIcon.tsx +0 -38
  236. package/src/v3/components/Widget/style.css +0 -181
  237. package/src/v3/src/components/CustomPluginsOdysseyCacheProvider/CustomPluginsOdysseyCacheProvider.tsx +0 -66
  238. package/src/v3/src/components/FieldLevelMessageContainer/FieldLevelMessageContainer.tsx +0 -55
  239. package/src/v3/src/components/Icon/CheckCircle.tsx +0 -30
  240. package/src/v3/src/components/Icon/RightArrowIcon.tsx +0 -30
  241. package/src/v3/src/components/Images/MobileDeviceIcon.tsx +0 -38
  242. package/src/v3/src/components/Widget/style.css +0 -181
  243. package/src/v3/src/transformer/uischema/setLtrFields.ts +0 -41
  244. package/src/v3/src/util/designTokens.ts +0 -249
  245. package/src/v3/transformer/uischema/setLtrFields.ts +0 -41
  246. package/src/v3/util/designTokens.ts +0 -249
@@ -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 { Link } from '@mui/material';
14
- import * as Tokens from '@okta/odyssey-design-tokens';
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
- <Box
47
- component="img"
47
+ <Image
48
48
  src={logoHref}
49
49
  width="32px"
50
50
  height="32px"
51
51
  alt={altText}
52
- className="client-logo custom-logo"
53
- aria-hidden="true"
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 component="div">
71
+ <Box>
72
72
  <Link
73
73
  href={href}
74
74
  target="_blank"
75
75
  rel="noopener noreferrer"
76
- aria-label={altText}
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
- className="title-text"
100
+ data-se="title-text"
101
101
  textAlign="center"
102
102
  >
103
103
  <Typography
104
104
  component="h2"
105
105
  variant="h6"
106
- className="no-translate"
106
+ translate="no"
107
107
  >
108
108
  {appName}
109
109
  </Typography>
110
- <Typography paragraph>{titleText}</Typography>
110
+ <Typography variant="body">{titleText}</Typography>
111
111
  {hasIssuer && (
112
112
  <Box
113
113
  display="flex"
114
114
  justifyContent="center"
115
115
  >
116
- <Typography
117
- sx={(theme) => ({
118
- marginBlockEnd: theme.spacing(4),
119
- backgroundColor: Tokens.ColorBackgroundPrimaryLight,
120
- color: Tokens.ColorBackgroundPrimaryDark,
121
- padding: '4px 2px',
122
- })}
123
- className="issuer no-translate"
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
- </Typography>
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
- component="div"
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 className="separation-line">{options.text}</MuiDivider>
23
- ) : <MuiDivider className="separation-line" />;
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
- AccordionDetails,
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
- <MuiAccordion
32
+ <Box
54
33
  key={element.key}
55
- disableGutters
56
- elevation={0}
34
+ // eslint-disable-next-line react/jsx-props-no-spreading
35
+ {...(!(element).noMargin && { marginBlockEnd: tokens.Spacing4 })}
57
36
  >
58
- <StyledAccordionSummary
59
- aria-controls={`${element.options.id}-content`}
60
- id={`${element.options.id}-header`}
37
+ <OdyAccordion
38
+ hasShadow={false}
39
+ label={element.options.summary}
40
+ id={element.options.id}
61
41
  >
62
- <Typography>{element.options.summary}</Typography>
63
- </StyledAccordionSummary>
64
- <AccordionDetails sx={{ padding: 0 }}>
65
- <LayoutContainer uischema={element.options.content} />
66
- </AccordionDetails>
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 '@okta/odyssey-react-mui';
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: 4 })}
44
+ {...(!(element).noMargin && { marginBlockEnd: tokens.Spacing4 })}
43
45
  // eslint-disable-next-line react/jsx-props-no-spreading
44
- {...(layoutDirection === UISchemaLayoutType.HORIZONTAL && { marginInlineEnd: 1 })}
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={classes} // TODO: FIXME OKTA-578584 - update page objects using .o-form selectors
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 '@okta/odyssey-react-mui';
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 '@okta/odyssey-react-mui';
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: 1 })}
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, Typography } from '@okta/odyssey-react-mui';
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 : 2}
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
- className={noTranslate ? 'no-translate' : undefined}
43
- data-se={dataSe}
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> = ({ name, description }: IconProps) => (
17
+ export const CustomAppIcon: FunctionComponent<IconProps> = ({
18
+ name, description, width, height,
19
+ }: IconProps) => (
18
20
  <svg
19
- width="48"
20
- height="48"
21
- viewBox="0 0 140 140"
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
- <circle
29
- cx="70"
30
- cy="70"
31
- r="69"
30
+ <path
31
+ fillRule="evenodd"
32
+ clipRule="evenodd"
32
33
  fill="#00297A"
33
- stroke="#F5F5F6"
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
- fillRule="evenodd"
40
- clipRule="evenodd"
41
- d="M91.5625 105H49.0625C47.4023 105 43.75 105 43.75 99.6875V67.8125C43.75 66.1523 43.75 62.5 49.0625 62.5V51.875C49.0625 39.5898 58.0273 30.625 70.3125 30.625C82.5977 30.625 91.5625 39.5898 91.5625 51.875V62.5C96.875 62.5 96.875 66.1523 96.875 67.8125V99.6875C96.875 101.348 96.875 105 91.5625 105ZM80.9382 51.876C80.9382 45.5674 76.6218 41.251 70.3132 41.251C64.0046 41.251 59.6882 45.5674 59.6882 51.876V62.501H80.9382V51.876Z"
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
  );
@@ -14,24 +14,19 @@ import { FunctionComponent, h } from 'preact';
14
14
 
15
15
  import { IconProps } from '../../types';
16
16
 
17
- export const CustomOTPIcon: FunctionComponent<IconProps> = ({ name, description }) => (
17
+ export const CustomOTPIcon: FunctionComponent<IconProps> = ({
18
+ name, description, width, height,
19
+ }) => (
18
20
  <svg
19
21
  xmlns="http://www.w3.org/2000/svg"
20
- width="48"
21
- height="48"
22
+ width={width || 48}
23
+ height={height || 48}
22
24
  fill="none"
23
25
  aria-labelledby={name}
24
26
  role="img"
25
27
  viewBox="0 0 48 48"
26
28
  >
27
29
  <title id={name}>{description}</title>
28
- <path
29
- fill="#F5F5F6"
30
- fillRule="evenodd"
31
- d="M24 48c13.255 0 24-10.745 24-24S37.255 0 24 0 0 10.745 0 24s10.745 24 24 24Z"
32
- class="siwFillBg"
33
- clipRule="evenodd"
34
- />
35
30
  <path
36
31
  fill="#A7B5EC"
37
32
  d="M28 23h-6v-6h1v5h5v1Z"
@@ -14,24 +14,19 @@ import { FunctionComponent, h } from 'preact';
14
14
 
15
15
  import { IconProps } from '../../types';
16
16
 
17
- export const DuoIcon: FunctionComponent<IconProps> = ({ name, description }) => (
17
+ export const DuoIcon: FunctionComponent<IconProps> = ({
18
+ name, description, width, height,
19
+ }) => (
18
20
  <svg
19
21
  xmlns="http://www.w3.org/2000/svg"
20
- width="48"
21
- height="48"
22
+ width={width || 48}
23
+ height={height || 48}
22
24
  fill="none"
23
25
  aria-labelledby={name}
24
26
  role="img"
25
27
  viewBox="0 0 48 48"
26
28
  >
27
29
  <title id={name}>{description}</title>
28
- <path
29
- fill="#F5F5F6"
30
- fillRule="evenodd"
31
- d="M24 48c13.255 0 24-10.745 24-24S37.255 0 24 0 0 10.745 0 24s10.745 24 24 24Z"
32
- class="siwFillBg"
33
- clipRule="evenodd"
34
- />
35
30
  <path
36
31
  fill="#77AF54"
37
32
  fillRule="evenodd"
@@ -14,24 +14,19 @@ import { FunctionComponent, h } from 'preact';
14
14
 
15
15
  import { IconProps } from '../../types';
16
16
 
17
- export const EmailIcon: FunctionComponent<IconProps> = ({ name, description }) => (
17
+ export const EmailIcon: FunctionComponent<IconProps> = ({
18
+ name, description, width, height,
19
+ }) => (
18
20
  <svg
19
21
  xmlns="http://www.w3.org/2000/svg"
20
- width="48"
21
- height="48"
22
+ width={width || 48}
23
+ height={height || 48}
22
24
  fill="none"
23
25
  aria-labelledby={name}
24
26
  role="img"
25
27
  viewBox="0 0 48 48"
26
28
  >
27
29
  <title id={name}>{description}</title>
28
- <circle
29
- cx="24"
30
- cy="24"
31
- r="24"
32
- fill="#F5F5F6"
33
- class="siwFillBg"
34
- />
35
30
  <path
36
31
  fill="#A7B5EC"
37
32
  d="M32 18v1h5.3L32 24.29v1.42l6-6.01v12.8a1.5 1.5 0 0 1-1.5 1.5h-17a1.5 1.5 0 0 1-1.5-1.5V31h-1v1.5a2.5 2.5 0 0 0 2.5 2.5h17a2.5 2.5 0 0 0 2.5-2.5V18h-7Z"
@@ -14,24 +14,19 @@ import { FunctionComponent, h } from 'preact';
14
14
 
15
15
  import { IconProps } from '../../types';
16
16
 
17
- export const GoogleOTPIcon: FunctionComponent<IconProps> = ({ name, description }) => (
17
+ export const GoogleOTPIcon: FunctionComponent<IconProps> = ({
18
+ name, description, width, height,
19
+ }) => (
18
20
  <svg
19
21
  xmlns="http://www.w3.org/2000/svg"
20
- width="48"
21
- height="48"
22
+ width={width || 48}
23
+ height={height || 48}
22
24
  fill="none"
23
25
  aria-labelledby={name}
24
26
  role="img"
25
27
  viewBox="0 0 48 48"
26
28
  >
27
29
  <title id={name}>{description}</title>
28
- <path
29
- fillRule="evenodd"
30
- clipRule="evenodd"
31
- d="M24 48C37.2548 48 48 37.2548 48 24C48 10.7452 37.2548 0 24 0C10.7452 0 0 10.7452 0 24C0 37.2548 10.7452 48 24 48Z"
32
- fill="#F5F5F6"
33
- class="siwFillBg"
34
- />
35
30
  <path
36
31
  fillRule="evenodd"
37
32
  clipRule="evenodd"
@@ -14,24 +14,19 @@ import { FunctionComponent, h } from 'preact';
14
14
 
15
15
  import { IconProps } from '../../types';
16
16
 
17
- export const IDPIcon: FunctionComponent<IconProps> = ({ name, description }) => (
17
+ export const IDPIcon: FunctionComponent<IconProps> = ({
18
+ name, description, width, height,
19
+ }) => (
18
20
  <svg
19
21
  xmlns="http://www.w3.org/2000/svg"
20
- width="48"
21
- height="48"
22
+ width={width || 48}
23
+ height={height || 48}
22
24
  fill="none"
23
25
  aria-labelledby={name}
24
26
  role="img"
25
27
  viewBox="0 0 48 48"
26
28
  >
27
29
  <title id={name}>{description}</title>
28
- <path
29
- fill="#F5F5F6"
30
- fillRule="evenodd"
31
- d="M24 48c13.255 0 24-10.745 24-24S37.255 0 24 0 0 10.745 0 24s10.745 24 24 24Z"
32
- class="siwFillBg"
33
- clipRule="evenodd"
34
- />
35
30
  <path
36
31
  fill="#A7B5EC"
37
32
  d="M15 29.5a5 5 0 1 1 4.78-6.5h1.03a6 6 0 1 0 0 3h-1.03A5.013 5.013 0 0 1 15 29.5Z"
@@ -27,13 +27,6 @@ export const OktaVerifyIcon: FunctionComponent<IconProps> = ({
27
27
  viewBox="0 0 48 48"
28
28
  >
29
29
  <title id={name}>{description}</title>
30
- <circle
31
- cx="24"
32
- cy="24"
33
- r="24"
34
- fill="#F5F5F6"
35
- class="siwFillBg"
36
- />
37
30
  <path
38
31
  fill="#00297A"
39
32
  fillRule="evenodd"
@@ -14,24 +14,19 @@ import { FunctionComponent, h } from 'preact';
14
14
 
15
15
  import { IconProps } from '../../types';
16
16
 
17
- export const OnPremMFAIcon: FunctionComponent<IconProps> = ({ name, description }) => (
17
+ export const OnPremMFAIcon: FunctionComponent<IconProps> = ({
18
+ name, description, width, height,
19
+ }) => (
18
20
  <svg
19
21
  xmlns="http://www.w3.org/2000/svg"
20
- width="48"
21
- height="48"
22
+ width={width || 48}
23
+ height={height || 48}
22
24
  fill="none"
23
25
  aria-labelledby={name}
24
26
  role="img"
25
27
  viewBox="0 0 48 48"
26
28
  >
27
29
  <title id={name}>{description}</title>
28
- <path
29
- fill="#F5F5F6"
30
- fillRule="evenodd"
31
- d="M24 48c13.255 0 24-10.745 24-24S37.255 0 24 0 0 10.745 0 24s10.745 24 24 24Z"
32
- class="siwFillBg"
33
- clipRule="evenodd"
34
- />
35
30
  <path
36
31
  fill="#00297A"
37
32
  d="M39 20h-8v-3H16.5a7.5 7.5 0 0 0 0 15H31v-3h8v-9Zm-9 11H16.5a6.5 6.5 0 1 1 0-13H30v13Zm8-3h-7v-7h7v7Z"
@@ -14,24 +14,19 @@ import { FunctionComponent, h } from 'preact';
14
14
 
15
15
  import { IconProps } from '../../types';
16
16
 
17
- export const PasswordIcon: FunctionComponent<IconProps> = ({ name, description }) => (
17
+ export const PasswordIcon: FunctionComponent<IconProps> = ({
18
+ name, description, width, height,
19
+ }) => (
18
20
  <svg
19
21
  xmlns="http://www.w3.org/2000/svg"
20
- width="48"
21
- height="48"
22
+ width={width || 48}
23
+ height={height || 48}
22
24
  fill="none"
23
25
  aria-labelledby={name}
24
26
  role="img"
25
27
  viewBox="0 0 48 48"
26
28
  >
27
29
  <title id={name}>{description}</title>
28
- <circle
29
- cx="24"
30
- cy="24"
31
- r="24"
32
- fill="#F5F5F6"
33
- class="siwFillBg"
34
- />
35
30
  <path
36
31
  fill="#A7B5EC"
37
32
  d="M11 17h-1V9h8v1h-7v7Zm28 0h-1v-7h-7V9h8v8ZM18 39h-8v-8h1v7h7v1Zm21 0h-8v-1h7v-7h1v8Z"
@@ -14,24 +14,19 @@ import { FunctionComponent, h } from 'preact';
14
14
 
15
15
  import { IconProps } from '../../types';
16
16
 
17
- export const PhoneIcon: FunctionComponent<IconProps> = ({ name, description }) => (
17
+ export const PhoneIcon: FunctionComponent<IconProps> = ({
18
+ name, description, width, height,
19
+ }) => (
18
20
  <svg
19
21
  xmlns="http://www.w3.org/2000/svg"
20
- width="48"
21
- height="48"
22
+ width={width || 48}
23
+ height={height || 48}
22
24
  fill="none"
23
25
  aria-labelledby={name}
24
26
  role="img"
25
27
  viewBox="0 0 48 48"
26
28
  >
27
29
  <title id={name}>{description}</title>
28
- <circle
29
- cx="24"
30
- cy="24"
31
- r="24"
32
- fill="#F5F5F6"
33
- class="siwFillBg"
34
- />
35
30
  <path
36
31
  fill="#00297A"
37
32
  d="M21.5 37h-9a2.6 2.6 0 0 1-2.5-2.682V14.682A2.6 2.6 0 0 1 12.5 12h9a2.6 2.6 0 0 1 2.5 2.682v19.636A2.6 2.6 0 0 1 21.5 37Zm-9-24a1.6 1.6 0 0 0-1.5 1.682v19.636A1.6 1.6 0 0 0 12.5 36h9a1.6 1.6 0 0 0 1.5-1.682V14.682A1.6 1.6 0 0 0 21.5 13h-9Z"