@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
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "private": false,
3
3
  "name": "@okta/okta-signin-widget",
4
4
  "description": "The Okta Sign-In Widget",
5
- "version": "7.16.0",
5
+ "version": "7.16.1",
6
6
  "homepage": "https://github.com/okta/okta-signin-widget",
7
7
  "license": "Apache-2.0",
8
8
  "repository": {
@@ -190,8 +190,12 @@
190
190
  "nodemon": "^2.0.7",
191
191
  "npm-check": "^6.0.1",
192
192
  "npm-run-all": "^4.1.5",
193
+ "patch-package": "^8.0.0",
194
+ "pixelmatch": "^5.3.0",
195
+ "pngjs": "^7.0.0",
193
196
  "postcss": "^8.4.21",
194
197
  "postcss-loader": "^7.2.1",
198
+ "postinstall-postinstall": "^2.1.0",
195
199
  "regenerator-runtime": "^0.13.7",
196
200
  "replace-in-file": "^6.2.0",
197
201
  "retire": "^2.0.3",
@@ -214,8 +218,8 @@
214
218
  "tsd": "^0.20.0",
215
219
  "ttypescript": "^1.5.15",
216
220
  "typescript": "~4.2.2",
217
- "wait-on": "^6.0.1",
218
221
  "wait-for-expect": "^3.0.2",
222
+ "wait-on": "^6.0.1",
219
223
  "webdriver-manager": "^12.1.8",
220
224
  "webpack": "^5.51.1",
221
225
  "webpack-bundle-analyzer": "^4.5.0",
@@ -272,7 +276,8 @@
272
276
  "playground",
273
277
  "playground/mocks",
274
278
  "packages/@okta/courage-dist",
275
- "src/v3"
279
+ "src/v3",
280
+ "test/vrt"
276
281
  ],
277
282
  "nohoist": [
278
283
  "**/@wdio/**",
@@ -291,7 +296,7 @@
291
296
  "workerDirectory": "playground"
292
297
  },
293
298
  "okta": {
294
- "commitSha": "fa1b8e998c54eda6ec8753ac359d24bd18849e09",
295
- "fullVersion": "7.16.0-gfa1b8e9"
299
+ "commitSha": "96b50ca86007679c3d8a0d7686bf433c66eaf965",
300
+ "fullVersion": "7.16.1-g96b50ca"
296
301
  }
297
302
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "defaultLanguage": "en",
3
- "version": "7.16.0",
3
+ "version": "7.16.1",
4
4
  "supportedLanguages": [
5
5
  "en",
6
6
  "cs",
@@ -10,11 +10,12 @@
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';
14
- import classNames from 'classnames';
13
+ import { Box } from '@mui/material';
14
+ import { useOdysseyDesignTokens } from '@okta/odyssey-react-mui';
15
15
  import { FunctionComponent, h } from 'preact';
16
16
 
17
17
  import { AuthCoinProps } from '../../types';
18
+ import Image from '../Image';
18
19
  import { getAuthCoinConfiguration } from './authCoinConfigUtil';
19
20
 
20
21
  const AuthCoin: FunctionComponent<AuthCoinProps> = (props) => {
@@ -30,7 +31,8 @@ const AuthCoin: FunctionComponent<AuthCoinProps> = (props) => {
30
31
  const authCoinConfiguration = getAuthCoinConfiguration();
31
32
  const authCoinConfigByAuthKey = authCoinConfiguration[authenticatorKey];
32
33
 
33
- const containerClasses = classNames(authCoinConfigByAuthKey?.iconClassName, customClasses);
34
+ const containerTestIds = `factor-beacon ${authCoinConfigByAuthKey?.iconClassName} ${customClasses ? customClasses?.join(' ') : ''}`;
35
+ const tokens = useOdysseyDesignTokens();
34
36
 
35
37
  function createAuthCoinIcon() {
36
38
  // TODO: OKTA-467022 - Add warning when attempted to customize non-customizeable authenticator
@@ -38,15 +40,12 @@ const AuthCoin: FunctionComponent<AuthCoinProps> = (props) => {
38
40
  // key that can be customized or custom push app
39
41
  if (url && (authCoinConfigByAuthKey?.customizable || !authCoinConfigByAuthKey?.icon)) {
40
42
  return (
41
- <Box
42
- as="img"
43
+ <Image
43
44
  src={url}
44
45
  alt={authCoinConfigByAuthKey.description}
45
- className="custom-logo"
46
- sx={{
47
- width: (theme) => theme.spacing(6),
48
- height: (theme) => theme.spacing(6),
49
- }}
46
+ width={tokens.Spacing7}
47
+ height={tokens.Spacing7}
48
+ testId="custom-logo"
50
49
  />
51
50
  );
52
51
  }
@@ -57,22 +56,21 @@ const AuthCoin: FunctionComponent<AuthCoinProps> = (props) => {
57
56
  <AuthCoinIcon
58
57
  name={name}
59
58
  description={description}
59
+ width={tokens.Spacing7}
60
+ height={tokens.Spacing7}
60
61
  />
61
62
  );
62
63
  }
63
64
 
64
65
  return authCoinConfigByAuthKey && (
65
66
  <Box
66
- className={containerClasses}
67
- data-se="factor-beacon"
67
+ data-se={containerTestIds}
68
68
  aria-hidden
69
69
  sx={{
70
70
  position: 'relative',
71
- background: 'white',
72
- inlineSize: '54px',
73
- blockSize: '48px',
74
- paddingBlock: 0,
75
- paddingInline: '3px',
71
+ inlineSize: tokens.Spacing7,
72
+ blockSize: tokens.Spacing7,
73
+ paddingBlock: tokens.Spacing0,
76
74
  ...sx,
77
75
  }}
78
76
  >
@@ -10,23 +10,22 @@
10
10
  * See the License for the specific language governing permissions and limitations under the License.
11
11
  */
12
12
 
13
- import { ScopedCssBaseline } from '@mui/material';
14
- import * as Tokens from '@okta/odyssey-design-tokens';
15
- import { Box } from '@okta/odyssey-react-mui';
16
- import classNames from 'classnames';
13
+ import { Box, ScopedCssBaseline } from '@mui/material';
14
+ import { useOdysseyDesignTokens } from '@okta/odyssey-react-mui';
17
15
  import { FunctionComponent, h } from 'preact';
18
16
 
19
17
  import { useWidgetContext } from '../../contexts';
20
18
 
21
19
  const AuthContainer: FunctionComponent<{ hide: boolean }> = ({ children, hide }) => {
22
20
  const { languageDirection, languageCode } = useWidgetContext();
23
- const classes = classNames('auth-container', 'main-container');
21
+ const testIds = 'auth-container main-container';
22
+ const tokens = useOdysseyDesignTokens();
24
23
 
25
24
  return (
26
25
  <Box
27
26
  id="okta-sign-in"
28
27
  component="main"
29
- className={classes}
28
+ data-se={testIds}
30
29
  data-version={OKTA_SIW_VERSION}
31
30
  data-commit={OKTA_SIW_COMMIT_HASH}
32
31
  lang={languageCode}
@@ -54,29 +53,24 @@ const AuthContainer: FunctionComponent<{ hide: boolean }> = ({ children, hide })
54
53
  sx={{
55
54
  minInlineSize: '100%',
56
55
  marginBlockStart: '100px',
57
- marginBlockEnd: '8px',
58
56
  marginInline: 'auto',
59
- '@media only screen and (max-device-width: 750px)': {
60
- marginBlockStart: 0,
61
- },
62
57
  }}
63
58
  >
64
59
  <Box
65
60
  flex="auto"
66
61
  flexDirection="column"
67
62
  bgcolor="common.white"
68
- fontFamily="fontFamily"
69
- sx={(theme) => ({
63
+ sx={{
70
64
  maxInlineSize: '432px',
71
65
  minInlineSize: '320px',
72
- borderWidth: theme.mixins.borderWidth,
73
- borderStyle: theme.mixins.borderStyle,
74
- borderRadius: theme.mixins.borderRadius,
75
- borderColor: Tokens.ColorBorderDisplay,
66
+ borderWidth: tokens.BorderWidthMain,
67
+ borderStyle: tokens.BorderStyleMain,
68
+ borderRadius: tokens.Spacing3,
69
+ borderColor: tokens.BorderColorDisplay,
76
70
  '@media only screen and (max-width: 391px)': {
77
71
  borderWidth: 0,
78
72
  },
79
- })}
73
+ }}
80
74
  >
81
75
  {children}
82
76
  </Box>
@@ -10,23 +10,28 @@
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
- const AuthContent: FunctionComponent = ({ children }) => (
17
- <Box
18
- display="flex"
19
- flexDirection="column"
20
- justifyContent="flex-start"
21
- flexWrap="wrap"
22
- paddingX={7}
23
- paddingBlockStart={7}
24
- paddingBlockEnd={0}
25
- maxWidth={1}
26
- marginBlockEnd={3}
27
- >
28
- { children }
29
- </Box>
30
- );
17
+ const AuthContent: FunctionComponent = ({ children }) => {
18
+ const tokens = useOdysseyDesignTokens();
19
+
20
+ return (
21
+ <Box
22
+ display="flex"
23
+ flexDirection="column"
24
+ justifyContent="flex-start"
25
+ flexWrap="wrap"
26
+ paddingX={tokens.Spacing7}
27
+ paddingBlockStart={tokens.Spacing7}
28
+ paddingBlockEnd={tokens.Spacing0}
29
+ maxWidth={1}
30
+ marginBlockEnd={tokens.Spacing3}
31
+ >
32
+ { children }
33
+ </Box>
34
+ );
35
+ };
31
36
 
32
37
  export default AuthContent;
@@ -10,15 +10,15 @@
10
10
  * See the License for the specific language governing permissions and limitations under the License.
11
11
  */
12
12
 
13
- import * as Tokens from '@okta/odyssey-design-tokens';
14
- import { Box, Typography } from '@okta/odyssey-react-mui';
15
- import classNames from 'classnames';
13
+ import { Box } from '@mui/material';
14
+ import { Typography, useOdysseyDesignTokens } from '@okta/odyssey-react-mui';
16
15
  import { FunctionComponent, h } from 'preact';
17
16
  import { AuthCoinProps } from 'src/types';
18
17
 
19
18
  import { loc } from '../../util';
20
19
  import AuthCoin from '../AuthCoin/AuthCoin';
21
20
  import { getAuthCoinConfiguration } from '../AuthCoin/authCoinConfigUtil';
21
+ import Image from '../Image';
22
22
 
23
23
  // TODO: maybe extract to util class if used reused
24
24
  const shouldRenderAuthCoin = (props?: AuthCoinProps): boolean => {
@@ -43,8 +43,8 @@ const AuthHeader: FunctionComponent<AuthHeaderProps> = ({
43
43
  authCoinProps,
44
44
  }) => {
45
45
  const showAuthCoin = shouldRenderAuthCoin(authCoinProps);
46
- const containerClasses = classNames('okta-sign-in-header', 'auth-header', { authCoinSpacing: showAuthCoin });
47
- const imageClasses = classNames('auth-org-logo', 'siwOrgLogo');
46
+ const containerTestIds = `okta-sign-in-header auth-header ${showAuthCoin ? 'authCoinSpacing' : ''}`;
47
+ const tokens = useOdysseyDesignTokens();
48
48
 
49
49
  function renderAuthCoin() {
50
50
  return (showAuthCoin && authCoinProps) && (
@@ -54,7 +54,9 @@ const AuthHeader: FunctionComponent<AuthHeaderProps> = ({
54
54
  theme={authCoinProps.theme}
55
55
  sx={{
56
56
  margin: 'auto',
57
- insetBlockStart: '24px',
57
+ insetBlockStart: '26px',
58
+ borderRadius: '24px',
59
+ backgroundColor: tokens.HueNeutralWhite,
58
60
  }}
59
61
  />
60
62
  );
@@ -62,13 +64,13 @@ const AuthHeader: FunctionComponent<AuthHeaderProps> = ({
62
64
 
63
65
  return (
64
66
  <Box
65
- className={containerClasses}
67
+ data-se={containerTestIds}
66
68
  sx={{
67
- paddingBlockStart: (theme) => theme.spacing(4),
68
- paddingBlockEnd: (theme) => theme.spacing(showAuthCoin ? 0 : 4),
69
- paddingInlineStart: (theme) => theme.spacing(5),
70
- paddingInlineEnd: (theme) => theme.spacing(5),
71
- borderBlockEnd: () => `1px solid ${Tokens.ColorBorderDisplay}`,
69
+ paddingBlockStart: tokens.Spacing5,
70
+ paddingBlockEnd: showAuthCoin ? tokens.Spacing1 : tokens.Spacing5,
71
+ paddingInlineStart: tokens.Spacing6,
72
+ paddingInlineEnd: tokens.Spacing6,
73
+ borderBlockEnd: `1px solid ${tokens.BorderColorDisplay}`,
72
74
  '& h1': {
73
75
  lineHeight: 0,
74
76
  marginBlock: 0,
@@ -78,15 +80,12 @@ const AuthHeader: FunctionComponent<AuthHeaderProps> = ({
78
80
  >
79
81
  <Typography variant="h1">
80
82
  { logo && (
81
- <Box
82
- component="img"
83
+ <Image
83
84
  alt={logoText || brandName || loc('logo.default.alt.text', 'login')}
84
85
  src={logo}
85
- className={imageClasses}
86
- sx={{
87
- maxInlineSize: '200px',
88
- maxBlockSize: '40px',
89
- }}
86
+ testId="auth-org-logo"
87
+ maxWidth="200px"
88
+ maxHeight="40px"
90
89
  />
91
90
  )}
92
91
  </Typography>
@@ -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 * as Tokens from '@okta/odyssey-design-tokens';
14
- import {
15
- ArrowLeftIcon,
16
- ArrowRightIcon,
17
- Box,
18
- Typography,
19
- } from '@okta/odyssey-react-mui';
20
- import classNames from 'classnames';
13
+ import { Box, Typography } from '@mui/material';
14
+ import { useOdysseyDesignTokens } from '@okta/odyssey-react-mui';
15
+ import { AddIcon, ArrowLeftIcon, ArrowRightIcon } from '@okta/odyssey-react-mui/icons';
21
16
  import { h } from 'preact';
22
17
 
23
18
  import { useWidgetContext } from '../../contexts';
@@ -42,8 +37,9 @@ const AuthenticatorButton: UISchemaElementComponent<{
42
37
  options: {
43
38
  type,
44
39
  key: authenticationKey,
40
+ isEnroll,
41
+ isAdditionalEnroll,
45
42
  actionParams,
46
- description,
47
43
  nickname,
48
44
  usageDescription,
49
45
  logoUri,
@@ -57,7 +53,8 @@ const AuthenticatorButton: UISchemaElementComponent<{
57
53
  ariaLabel,
58
54
  },
59
55
  } = uischema;
60
- const label = getTranslation(translations, 'label');
56
+ const label = getTranslation(translations, 'label') ?? uischema.label;
57
+ const description = getTranslation(translations, 'description') ?? uischema.options.description;
61
58
  const {
62
59
  dataSchemaRef, data, loading, languageDirection,
63
60
  } = useWidgetContext();
@@ -69,8 +66,9 @@ const AuthenticatorButton: UISchemaElementComponent<{
69
66
  description && `${iconName}-description`,
70
67
  nickname && `${iconName}-nickname`,
71
68
  usageDescription && `${iconName}-usageDescription`,
72
- `${iconName}-ctaLabel`,
69
+ isEnroll && `${iconName}-ctaLabel`,
73
70
  ].filter(Boolean).join(' ');
71
+ const tokens = useOdysseyDesignTokens();
74
72
 
75
73
  const onClick: ClickHandler = async () => {
76
74
  const dataSchema = dataSchemaRef.current!;
@@ -92,33 +90,46 @@ const AuthenticatorButton: UISchemaElementComponent<{
92
90
  });
93
91
  };
94
92
 
93
+ function createCtaIcon() {
94
+ if (isAdditionalEnroll) {
95
+ return <AddIcon titleAccess={ctaLabel} />;
96
+ }
97
+ if (languageDirection === 'rtl') {
98
+ return <ArrowLeftIcon titleAccess={ctaLabel} />;
99
+ }
100
+ return <ArrowRightIcon titleAccess={ctaLabel} />;
101
+ }
102
+
95
103
  return (
96
104
  <Box
97
105
  component="button"
98
106
  type={type}
99
- sx={(theme) => ({
100
- '&:focus': {
101
- outlineColor: theme.palette.primary.main,
102
- outlineOffset: Tokens.FocusOutlineOffsetBase,
103
- outlineStyle: Tokens.FocusOutlineStyle,
104
- outlineWidth: Tokens.FocusOutlineWidthBase,
105
- },
107
+ sx={{
108
+ borderStyle: tokens.BorderStyleMain,
109
+ borderWidth: tokens.BorderWidthMain,
110
+ borderColor: tokens.BorderColorDisplay,
111
+ borderRadius: tokens.BorderRadiusMain,
106
112
  '&:hover': {
107
- color: theme.palette.primary.dark,
113
+ color: tokens.PalettePrimaryDark,
108
114
  cursor: 'pointer',
109
- borderColor: theme.palette.primary.main,
115
+ borderColor: tokens.PalettePrimaryMain,
116
+ },
117
+ '&:focus': {
118
+ outlineColor: tokens.PalettePrimaryMain,
119
+ outlineOffset: tokens.FocusOutlineOffsetMain,
120
+ outlineStyle: tokens.FocusOutlineStyle,
121
+ outlineWidth: tokens.FocusOutlineWidthMain,
122
+ borderColor: tokens.BorderColorDisplay,
110
123
  },
111
124
  width: 1,
112
- backgroundColor: theme.palette.background.paper,
113
- paddingBlock: theme.spacing(2),
114
- paddingInline: theme.spacing(2),
115
- })}
116
- display="flex"
117
- border={1}
118
- borderColor="grey.200"
119
- borderRadius={Tokens.BorderRadiusBase}
120
- boxShadow={Tokens.ShadowScale0}
121
- className="authenticator-row"
125
+ display: 'flex',
126
+ // Assuming we want to allow users to customize this color, we should try to map this to
127
+ // a more semantic token. We also don't want users to override white just for this
128
+ backgroundColor: tokens.HueNeutralWhite,
129
+ paddingBlock: tokens.Spacing3,
130
+ paddingInline: tokens.Spacing3,
131
+ alignItems: !isEnroll ? 'center' : '',
132
+ }}
122
133
  data-se="authenticator-button"
123
134
  tabIndex={0}
124
135
  onClick={onClick}
@@ -130,7 +141,6 @@ const AuthenticatorButton: UISchemaElementComponent<{
130
141
  >
131
142
  { authenticationKey && (
132
143
  <Box
133
- className="authenticator-icon-container"
134
144
  data-se="authenticator-icon"
135
145
  >
136
146
  <AuthCoin
@@ -138,18 +148,18 @@ const AuthenticatorButton: UISchemaElementComponent<{
138
148
  url={logoUri}
139
149
  name={iconName}
140
150
  description={iconDescr}
141
- customClasses={['authenticator-icon']}
142
151
  />
143
152
  </Box>
144
153
  )}
145
154
  <Box
146
- className="authenticator-description"
155
+ data-se="authenticator-button-content"
147
156
  sx={{
148
157
  display: 'flex',
149
158
  flexDirection: 'column',
150
159
  flexGrow: 1,
151
- paddingBlock: 0,
152
- paddingInline: '12px 0',
160
+ paddingBlock: tokens.Spacing0,
161
+ paddingInlineStart: tokens.Spacing3,
162
+ paddingInlineEnd: tokens.Spacing0,
153
163
  // needed to solve ie11 'flexbug' where nested flex element overflows container
154
164
  minInlineSize: '0%',
155
165
  }}
@@ -158,13 +168,14 @@ const AuthenticatorButton: UISchemaElementComponent<{
158
168
  variant="h3"
159
169
  id={`${iconName}-label`}
160
170
  sx={{
161
- fontSize: '1rem',
162
- margin: 0,
163
- marginBlockEnd: '6px',
171
+ fontSize: tokens.TypographySizeBody,
172
+ fontWeight: tokens.TypographyWeightBodyBold,
173
+ color: tokens.TypographyColorBody,
174
+ margin: tokens.Spacing0,
164
175
  textAlign: 'start',
165
176
  }}
166
177
  data-se="authenticator-button-label"
167
- className="authenticator-label no-translate"
178
+ translate="no"
168
179
  >
169
180
  {label}
170
181
  </Typography>
@@ -173,15 +184,17 @@ const AuthenticatorButton: UISchemaElementComponent<{
173
184
  paragraph
174
185
  id={`${iconName}-description`}
175
186
  sx={{
176
- fontSize: '.875rem',
177
- margin: 0,
178
- marginBlockEnd: '6px',
187
+ fontSize: tokens.TypographySizeSubordinate,
188
+ fontWeight: tokens.TypographyWeightBody,
189
+ color: tokens.TypographyColorSubordinate,
190
+ margin: tokens.Spacing0,
191
+ marginBlockStart: tokens.Spacing1,
179
192
  textAlign: 'start',
180
193
  }}
181
194
  data-se="authenticator-button-description"
182
- className={classNames('authenticator-description--text', { 'no-translate': noTranslate })}
183
195
  aria-label={punctuate(description)}
184
196
  dir={dir}
197
+ translate={noTranslate ? 'no' : undefined}
185
198
  >
186
199
  {description}
187
200
  </Typography>
@@ -191,9 +204,11 @@ const AuthenticatorButton: UISchemaElementComponent<{
191
204
  paragraph
192
205
  id={`${iconName}-nickname`}
193
206
  sx={{
194
- fontSize: '.875rem',
195
- margin: 0,
196
- marginBlockEnd: '6px',
207
+ fontSize: tokens.TypographySizeSubordinate,
208
+ fontWeight: tokens.TypographyWeightBody,
209
+ color: tokens.TypographyColorSubordinate,
210
+ margin: tokens.Spacing0,
211
+ marginBlockStart: tokens.Spacing1,
197
212
  textAlign: 'start',
198
213
  overflow: 'hidden',
199
214
  whiteSpace: 'nowrap',
@@ -201,8 +216,8 @@ const AuthenticatorButton: UISchemaElementComponent<{
201
216
  }}
202
217
  title={nickname}
203
218
  data-se="authenticator-button-nickname"
204
- className={classNames('authenticator-enrollment-nickname', 'no-translate')}
205
219
  aria-label={punctuate(nickname)}
220
+ translate="no"
206
221
  >
207
222
  {nickname}
208
223
  </Typography>
@@ -213,50 +228,74 @@ const AuthenticatorButton: UISchemaElementComponent<{
213
228
  id={`${iconName}-usageDescription`}
214
229
  textAlign="start"
215
230
  sx={{
216
- fontSize: '.875rem',
217
- margin: 0,
218
- marginBlockEnd: '6px',
219
- color: 'text.secondary',
231
+ fontSize: tokens.TypographySizeSubordinate,
232
+ fontWeight: tokens.TypographyWeightBody,
233
+ color: tokens.TypographyColorSubordinate,
234
+ margin: tokens.Spacing0,
235
+ marginBlockStart: tokens.Spacing1,
220
236
  }}
221
237
  data-se="authenticator-button-usage-text"
222
- className="authenticator-usage-text"
223
238
  aria-label={punctuate(usageDescription)}
224
239
  >
225
240
  {usageDescription}
226
241
  </Typography>
227
242
  )}
243
+ {isEnroll && (
244
+ <Box
245
+ data-se={dataSe}
246
+ sx={{
247
+ display: 'flex',
248
+ alignItems: 'center',
249
+ marginBlockStart: tokens.Spacing3,
250
+ marginInline: tokens.Spacing0,
251
+ color: tokens.TypographyColorAction,
252
+ '& svg': {
253
+ marginBlock: tokens.Spacing0,
254
+ marginInlineStart: isAdditionalEnroll ? tokens.Spacing0 : tokens.Spacing1,
255
+ marginInlineEnd: isAdditionalEnroll ? tokens.Spacing1 : tokens.Spacing0,
256
+ },
257
+ }}
258
+ >
259
+ <Box
260
+ component="span"
261
+ id={`${iconName}-ctaLabel`}
262
+ sx={{
263
+ fontWeight: tokens.TypographyWeightBodyBold,
264
+ fontSize: tokens.TypographySizeBody,
265
+ order: isAdditionalEnroll ? 1 : 0,
266
+ }}
267
+ data-se="cta-button-label"
268
+ >
269
+ {ctaLabel}
270
+ </Box>
271
+ <Box
272
+ data-se="cta-button-icon"
273
+ sx={{
274
+ display: 'flex',
275
+ }}
276
+ >
277
+ { createCtaIcon() }
278
+ </Box>
279
+ </Box>
280
+ )}
281
+ </Box>
282
+ {!isEnroll && (
228
283
  <Box
229
- className="cta-button authenticator-button"
230
284
  data-se={dataSe}
231
- sx={(theme) => ({
232
- display: 'flex',
233
- alignItems: 'center',
234
- marginBlock: '5px',
235
- marginInline: 0,
236
- fontWeight: 500,
237
- color: theme.palette.primary.main,
238
- '& svg': {
239
- marginBlock: 0,
240
- marginInline: '5px 0',
241
- },
242
- })}
285
+ sx={{
286
+ color: tokens.TypographyColorAction,
287
+ }}
243
288
  >
244
289
  <Box
245
- component="span"
246
- id={`${iconName}-ctaLabel`}
247
- sx={{ fontWeight: 700, fontSize: '.875rem' }}
248
- data-se="cta-button-label"
249
- className="button select-factor link-button"
290
+ data-se="cta-button-icon"
291
+ sx={{
292
+ display: 'flex',
293
+ }}
250
294
  >
251
- {ctaLabel}
295
+ { createCtaIcon() }
252
296
  </Box>
253
- {
254
- languageDirection === 'rtl'
255
- ? <ArrowLeftIcon titleAccess={ctaLabel} />
256
- : <ArrowRightIcon titleAccess={ctaLabel} />
257
- }
258
297
  </Box>
259
- </Box>
298
+ )}
260
299
  </Box>
261
300
  );
262
301
  };