@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,54 +10,24 @@
10
10
  * See the License for the specific language governing permissions and limitations under the License.
11
11
  */
12
12
 
13
+ import { useOdysseyDesignTokens } from '@okta/odyssey-react-mui';
14
+ import { AppsIcon } from '@okta/odyssey-react-mui/icons';
13
15
  import { FunctionComponent, h } from 'preact';
14
16
 
15
17
  import { loc } from '../../util';
16
18
 
17
- export const AppIcon: FunctionComponent = () => (
18
- <svg
19
- width="16"
20
- height="16"
21
- viewBox="0 0 16 16"
22
- fill="none"
23
- xmlns="http://www.w3.org/2000/svg"
24
- role="img"
25
- aria-hidden="true"
26
- >
27
- <title>
28
- {loc('icon.title.application', 'login')}
29
- </title>
30
- <rect
31
- x="1.5"
32
- y="1.5"
33
- width="5"
34
- height="5"
35
- stroke="#1662DD"
36
- class="siwIconStrokePrimary"
37
- />
38
- <rect
39
- x="1.5"
40
- y="9.5"
41
- width="5"
42
- height="5"
43
- stroke="#1662DD"
44
- class="siwIconStrokePrimary"
45
- />
46
- <rect
47
- x="9.5"
48
- y="9.5"
49
- width="5"
50
- height="5"
51
- stroke="#1662DD"
52
- class="siwIconStrokePrimary"
53
- />
54
- <rect
55
- x="9.5"
56
- y="1.5"
57
- width="5"
58
- height="5"
59
- stroke="#1662DD"
60
- class="siwIconStrokePrimary"
19
+ export const AppIcon: FunctionComponent = () => {
20
+ const tokens = useOdysseyDesignTokens();
21
+
22
+ return (
23
+ <AppsIcon
24
+ sx={{
25
+ color: tokens.PalettePrimaryMain,
26
+ width: tokens.Spacing4,
27
+ height: tokens.Spacing4,
28
+ }}
29
+ titleAccess={loc('icon.title.application', 'login')}
30
+ aria-hidden
61
31
  />
62
- </svg>
63
- );
32
+ );
33
+ };
@@ -10,40 +10,24 @@
10
10
  * See the License for the specific language governing permissions and limitations under the License.
11
11
  */
12
12
 
13
+ import { useOdysseyDesignTokens } from '@okta/odyssey-react-mui';
14
+ import { DevicesIcon } from '@okta/odyssey-react-mui/icons';
13
15
  import { FunctionComponent, h } from 'preact';
14
16
 
15
17
  import { loc } from '../../util';
16
18
 
17
- export const DeviceIcon: FunctionComponent = () => (
18
- <svg
19
- width="16"
20
- height="16"
21
- viewBox="0 0 16 16"
22
- fill="none"
23
- xmlns="http://www.w3.org/2000/svg"
24
- role="img"
25
- aria-hidden="true"
26
- >
27
- <title>
28
- {loc('icon.title.browser', 'login')}
29
- </title>
30
- <path
31
- d="M4.5 14.5H8M11.5 14.5H8M8 14.5V13"
32
- stroke="#1662DD"
33
- class="siwIconStrokePrimary"
34
- />
35
- <path
36
- d="M3 1.5H13C13.8284 1.5 14.5 2.17157 14.5 3V10C14.5 10.8284 13.8284 11.5 13 11.5H3C2.17157 11.5 1.5 10.8284 1.5 10V3C1.5 2.17157 2.17157 1.5 3 1.5Z"
37
- stroke="#1662DD"
38
- class="siwIconStrokePrimary"
39
- />
40
- <rect
41
- x="2"
42
- y="9"
43
- width="12"
44
- height="1"
45
- fill="#1662DD"
46
- class="siwIconFillPrimary"
19
+ export const DeviceIcon: FunctionComponent = () => {
20
+ const tokens = useOdysseyDesignTokens();
21
+
22
+ return (
23
+ <DevicesIcon
24
+ sx={{
25
+ color: tokens.PalettePrimaryMain,
26
+ width: tokens.Spacing4,
27
+ height: tokens.Spacing4,
28
+ }}
29
+ titleAccess={loc('icon.title.browser', 'login')}
30
+ aria-hidden
47
31
  />
48
- </svg>
49
- );
32
+ );
33
+ };
@@ -10,34 +10,24 @@
10
10
  * See the License for the specific language governing permissions and limitations under the License.
11
11
  */
12
12
 
13
+ import { useOdysseyDesignTokens } from '@okta/odyssey-react-mui';
14
+ import { GlobeIcon } from '@okta/odyssey-react-mui/icons';
13
15
  import { FunctionComponent, h } from 'preact';
14
16
 
15
17
  import { loc } from '../../util';
16
18
 
17
- export const LocationIcon: FunctionComponent = () => (
18
- <svg
19
- width="16"
20
- height="16"
21
- viewBox="0 0 16 16"
22
- fill="none"
23
- xmlns="http://www.w3.org/2000/svg"
24
- role="img"
25
- aria-hidden="true"
26
- >
27
- <title>
28
- {loc('icon.title.location', 'login')}
29
- </title>
30
- <path
31
- d="M2.5 6C2.5 2.88969 4.95673 0.5 8 0.5C11.0433 0.5 13.5 2.88969 13.5 6C13.5 8.17828 12.3122 10.408 10.9484 12.2145C9.81608 13.7144 8.61136 14.859 8.0028 15.3649C7.39633 14.8508 6.1897 13.6812 5.05432 12.1652C3.68717 10.3398 2.5 8.11236 2.5 6Z"
32
- stroke="#1662DD"
33
- class="siwIconStrokePrimary"
34
- />
35
- <circle
36
- cx="8"
37
- cy="6"
38
- r="2.5"
39
- stroke="#1662DD"
40
- class="siwIconStrokePrimary"
19
+ export const LocationIcon: FunctionComponent = () => {
20
+ const tokens = useOdysseyDesignTokens();
21
+
22
+ return (
23
+ <GlobeIcon
24
+ sx={{
25
+ color: tokens.PalettePrimaryMain,
26
+ width: tokens.Spacing4,
27
+ height: tokens.Spacing4,
28
+ }}
29
+ titleAccess={loc('icon.title.location', 'login')}
30
+ aria-hidden
41
31
  />
42
- </svg>
43
- );
32
+ );
33
+ };
@@ -10,36 +10,41 @@
10
10
  * See the License for the specific language governing permissions and limitations under the License.
11
11
  */
12
12
 
13
+ import { useOdysseyDesignTokens } from '@okta/odyssey-react-mui';
13
14
  import { FunctionComponent, h } from 'preact';
14
15
 
15
16
  import { loc } from '../../util';
16
17
 
17
- export const PhoneIcon: FunctionComponent = () => (
18
- <svg
19
- width="51"
20
- height="63"
21
- viewBox="0 0 51 63"
22
- fill="none"
23
- xmlns="http://www.w3.org/2000/svg"
24
- role="img"
25
- aria-hidden="true"
26
- >
27
- <title>
28
- {loc('icon.title.mobileDevice', 'login')}
29
- </title>
30
- <path
31
- fillRule="evenodd"
32
- clipRule="evenodd"
33
- d="M21.7496 62.7498H44.2496C45.957 62.6872 47.5708 61.9538 48.7409 60.7089C49.9109 59.4639 50.5429 57.8078 50.4996 56.0998V6.99981C50.5564 5.28333 49.9304 3.61435 48.7589 2.35851C47.5874 1.10268 45.9659 0.362378 44.2496 0.299805H21.7496C20.0334 0.362378 18.4119 1.10268 17.2404 2.35851C16.0689 3.61435 15.4429 5.28333 15.4996 6.99981V28.1311H17.9996V6.99981C17.9658 6.47429 18.036 5.94727 18.2063 5.44896C18.3766 4.95065 18.6436 4.49087 18.992 4.09601C19.3404 3.70114 19.7634 3.37896 20.2366 3.14794C20.7098 2.91693 21.224 2.78163 21.7496 2.74981L44.2496 2.7998C45.3021 2.86429 46.2865 3.34172 46.9888 4.12826C47.691 4.91479 48.0543 5.9468 47.9996 6.99981V56.0498C48.0335 56.5753 47.9633 57.1023 47.793 57.6007C47.6227 58.099 47.3557 58.5587 47.0073 58.9536C46.6589 59.3485 46.2359 59.6707 45.7627 59.9017C45.2895 60.1327 44.7753 60.268 44.2496 60.2998H21.7496C20.6972 60.2353 19.7128 59.7579 19.0105 58.9714C18.3082 58.1848 17.9449 57.1528 17.9996 56.0998V34.6311H15.4996V56.0498C15.4429 57.7663 16.0689 59.4353 17.2404 60.6911C18.4119 61.9469 20.0334 62.6872 21.7496 62.7498ZM38 55.25H28V57.75H38V55.25ZM33 5.25C34.3807 5.25 35.5 6.36929 35.5 7.75C35.5 9.13071 34.3807 10.25 33 10.25C31.6193 10.25 30.5 9.13071 30.5 7.75C30.5 6.36929 31.6193 5.25 33 5.25Z"
34
- fill="#00297A"
35
- class="siwIconFillPrimaryDark"
36
- />
37
- <path
38
- fillRule="evenodd"
39
- clipRule="evenodd"
40
- d="M26.2191 32.6309L20.85 38L22.62 39.76L31 31.38L22.62 23L20.85 24.76L26.2209 30.1309H2.98047V32.6309H26.2191Z"
41
- fill="#A7B5EC"
42
- class="siwIconFillSecondary"
43
- />
44
- </svg>
45
- );
18
+ export const PhoneIcon: FunctionComponent = () => {
19
+ const tokens = useOdysseyDesignTokens();
20
+
21
+ return (
22
+ <svg
23
+ width={tokens.Spacing9}
24
+ height={tokens.Spacing9}
25
+ viewBox="0 0 64 64"
26
+ fill="none"
27
+ xmlns="http://www.w3.org/2000/svg"
28
+ role="img"
29
+ aria-hidden="true"
30
+ >
31
+ <title>
32
+ {loc('icon.title.mobileDevice', 'login')}
33
+ </title>
34
+ <path
35
+ fillRule="evenodd"
36
+ clipRule="evenodd"
37
+ d="M21.7496 62.7498H44.2496C45.957 62.6872 47.5708 61.9538 48.7409 60.7089C49.9109 59.4639 50.5429 57.8078 50.4996 56.0998V6.99981C50.5564 5.28333 49.9304 3.61435 48.7589 2.35851C47.5874 1.10268 45.9659 0.362378 44.2496 0.299805H21.7496C20.0334 0.362378 18.4119 1.10268 17.2404 2.35851C16.0689 3.61435 15.4429 5.28333 15.4996 6.99981V28.1311H17.9996V6.99981C17.9658 6.47429 18.036 5.94727 18.2063 5.44896C18.3766 4.95065 18.6436 4.49087 18.992 4.09601C19.3404 3.70114 19.7634 3.37896 20.2366 3.14794C20.7098 2.91693 21.224 2.78163 21.7496 2.74981L44.2496 2.7998C45.3021 2.86429 46.2865 3.34172 46.9888 4.12826C47.691 4.91479 48.0543 5.9468 47.9996 6.99981V56.0498C48.0335 56.5753 47.9633 57.1023 47.793 57.6007C47.6227 58.099 47.3557 58.5587 47.0073 58.9536C46.6589 59.3485 46.2359 59.6707 45.7627 59.9017C45.2895 60.1327 44.7753 60.268 44.2496 60.2998H21.7496C20.6972 60.2353 19.7128 59.7579 19.0105 58.9714C18.3082 58.1848 17.9449 57.1528 17.9996 56.0998V34.6311H15.4996V56.0498C15.4429 57.7663 16.0689 59.4353 17.2404 60.6911C18.4119 61.9469 20.0334 62.6872 21.7496 62.7498ZM38 55.25H28V57.75H38V55.25ZM33 5.25C34.3807 5.25 35.5 6.36929 35.5 7.75C35.5 9.13071 34.3807 10.25 33 10.25C31.6193 10.25 30.5 9.13071 30.5 7.75C30.5 6.36929 31.6193 5.25 33 5.25Z"
38
+ fill="#00297A"
39
+ class="siwIconFillPrimaryDark"
40
+ />
41
+ <path
42
+ fillRule="evenodd"
43
+ clipRule="evenodd"
44
+ d="M26.2191 32.6309L20.85 38L22.62 39.76L31 31.38L22.62 23L20.85 24.76L26.2209 30.1309H2.98047V32.6309H26.2191Z"
45
+ fill="#A7B5EC"
46
+ class="siwIconFillSecondary"
47
+ />
48
+ </svg>
49
+ );
50
+ };
@@ -10,34 +10,39 @@
10
10
  * See the License for the specific language governing permissions and limitations under the License.
11
11
  */
12
12
 
13
+ import { useOdysseyDesignTokens } from '@okta/odyssey-react-mui';
13
14
  import { FunctionComponent, h } from 'preact';
14
15
 
15
16
  import { loc } from '../../util';
16
17
 
17
- export const YubikeyDemoImage: FunctionComponent = () => (
18
- <svg
19
- xmlns="http://www.w3.org/2000/svg"
20
- width="43"
21
- height="58"
22
- fill="none"
23
- role="img"
24
- viewBox="0 0 43 58"
25
- aria-hidden="true"
26
- >
27
- <title>{loc('factor.totpHard.yubikey', 'login')}</title>
28
- <path
29
- fill="#00297A"
30
- fillRule="evenodd"
31
- d="M10.61 0a9 9 0 0 0-9 9v.5a8.5 8.5 0 0 0 8.5 8.5v-2a6.5 6.5 0 0 1-6.5-6.5V9a7 7 0 0 1 7-7h13v14h-5.75v2h7.75v-3h8V3h-8V0h-15Zm15 5v8h6V5h-6Z"
32
- class="siwIconFillPrimaryDark"
33
- clipRule="evenodd"
34
- />
35
- <path
36
- fill="#A7B5EC"
37
- fillRule="evenodd"
38
- d="M25.61 6.5h4v2h-4v-2Zm0 3h4v2h-4v-2Zm-15.356 2.486a2.986 2.986 0 0 1 5.973 0V32.86a1 1 0 1 0 2 0v-4.892a2 2 0 0 1 2-2h2.13a2 2 0 0 1 2 2v7.475a1 1 0 1 0 2 0v-1.047c0-1.633 1.352-2.975 3.005-2.975 1.619 0 2.944 1.315 2.944 2.914v5.764a1 1 0 1 0 2 0v-.614a3.042 3.042 0 1 1 6.084 0v4.683h2v-4.683a5.042 5.042 0 0 0-8.084-4.022v-1.128c0-2.724-2.24-4.914-4.944-4.914a5.003 5.003 0 0 0-3.006 1.002v-2.455a4 4 0 0 0-4-4h-2.13c-.728 0-1.411.195-2 .535V11.986a4.986 4.986 0 0 0-9.972 0v19.607c-1.398.5-2.847 1.495-4.072 2.492A29.391 29.391 0 0 0 .935 37.18l-.155.175-.062.226c-.146.542-.128 1.168-.044 1.783.086.633.254 1.345.478 2.1.447 1.509 1.139 3.276 1.93 5.082 1.581 3.616 3.6 7.483 4.977 9.943l.489.872 1.745-.977-.489-.873c-1.356-2.421-3.342-6.227-4.89-9.767-.776-1.772-1.431-3.453-1.845-4.849a12.468 12.468 0 0 1-.414-1.8 3.726 3.726 0 0 1-.038-.795 27.872 27.872 0 0 1 2.828-2.664c.943-.768 1.918-1.44 2.81-1.874v8.552a1 1 0 1 0 2 0V11.986Z"
39
- class="siwIconFillSecondary"
40
- clipRule="evenodd"
41
- />
42
- </svg>
43
- );
18
+ export const YubikeyDemoImage: FunctionComponent = () => {
19
+ const tokens = useOdysseyDesignTokens();
20
+
21
+ return (
22
+ <svg
23
+ xmlns="http://www.w3.org/2000/svg"
24
+ width={tokens.Spacing9}
25
+ height={tokens.Spacing9}
26
+ fill="none"
27
+ role="img"
28
+ viewBox="0 0 43 58"
29
+ aria-hidden="true"
30
+ >
31
+ <title>{loc('factor.totpHard.yubikey', 'login')}</title>
32
+ <path
33
+ fill="#00297A"
34
+ fillRule="evenodd"
35
+ d="M10.61 0a9 9 0 0 0-9 9v.5a8.5 8.5 0 0 0 8.5 8.5v-2a6.5 6.5 0 0 1-6.5-6.5V9a7 7 0 0 1 7-7h13v14h-5.75v2h7.75v-3h8V3h-8V0h-15Zm15 5v8h6V5h-6Z"
36
+ class="siwIconFillPrimaryDark"
37
+ clipRule="evenodd"
38
+ />
39
+ <path
40
+ fill="#A7B5EC"
41
+ fillRule="evenodd"
42
+ d="M25.61 6.5h4v2h-4v-2Zm0 3h4v2h-4v-2Zm-15.356 2.486a2.986 2.986 0 0 1 5.973 0V32.86a1 1 0 1 0 2 0v-4.892a2 2 0 0 1 2-2h2.13a2 2 0 0 1 2 2v7.475a1 1 0 1 0 2 0v-1.047c0-1.633 1.352-2.975 3.005-2.975 1.619 0 2.944 1.315 2.944 2.914v5.764a1 1 0 1 0 2 0v-.614a3.042 3.042 0 1 1 6.084 0v4.683h2v-4.683a5.042 5.042 0 0 0-8.084-4.022v-1.128c0-2.724-2.24-4.914-4.944-4.914a5.003 5.003 0 0 0-3.006 1.002v-2.455a4 4 0 0 0-4-4h-2.13c-.728 0-1.411.195-2 .535V11.986a4.986 4.986 0 0 0-9.972 0v19.607c-1.398.5-2.847 1.495-4.072 2.492A29.391 29.391 0 0 0 .935 37.18l-.155.175-.062.226c-.146.542-.128 1.168-.044 1.783.086.633.254 1.345.478 2.1.447 1.509 1.139 3.276 1.93 5.082 1.581 3.616 3.6 7.483 4.977 9.943l.489.872 1.745-.977-.489-.873c-1.356-2.421-3.342-6.227-4.89-9.767-.776-1.772-1.431-3.453-1.845-4.849a12.468 12.468 0 0 1-.414-1.8 3.726 3.726 0 0 1-.038-.795 27.872 27.872 0 0 1 2.828-2.664c.943-.768 1.918-1.44 2.81-1.874v8.552a1 1 0 1 0 2 0V11.986Z"
43
+ class="siwIconFillSecondary"
44
+ clipRule="evenodd"
45
+ />
46
+ </svg>
47
+ );
48
+ };
@@ -13,6 +13,5 @@
13
13
  export * from './AppIcon';
14
14
  export * from './DeviceIcon';
15
15
  export * from './LocationIcon';
16
- export * from './MobileDeviceIcon';
17
16
  export * from './PhoneIcon';
18
17
  export * from './YubikeyDemoImage';
@@ -10,10 +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
- Alert,
15
- Box,
16
- } from '@okta/odyssey-react-mui';
13
+ import { Box } from '@mui/material';
14
+ import { Callout, useOdysseyDesignTokens } from '@okta/odyssey-react-mui';
17
15
  import { h } from 'preact';
18
16
 
19
17
  import { useWidgetContext } from '../../contexts';
@@ -41,23 +39,25 @@ const InfoBox: UISchemaElementComponent<{
41
39
  },
42
40
  } = uischema;
43
41
 
42
+ const tokens = useOdysseyDesignTokens();
43
+
44
44
  return loading ? null : (
45
45
  <Box
46
- marginBlockEnd={4}
46
+ marginBlockEnd={tokens.Spacing4}
47
47
  width={1}
48
- data-se="message"
48
+ data-se={`infobox-${messageClass.toLowerCase()}`}
49
49
  >
50
- <Alert
50
+ <Callout
51
51
  severity={MessageTypeVariant[messageClass as MessageType] ?? MessageTypeVariant.INFO}
52
- variant="infobox"
53
- data-se={dataSe}
54
- className={`infobox-${messageClass.toLowerCase()}`}
52
+ testId={dataSe}
53
+ // visually-hidden severity text is not translated
54
+ translate="no"
55
55
  >
56
56
  {
57
57
  Array.isArray(message)
58
58
  ? message.map((msg) => (
59
59
  <Box
60
- marginBlockEnd={2}
60
+ marginBlockEnd={tokens.Spacing2}
61
61
  key={msg.message}
62
62
  >
63
63
  <WidgetMessageContainer
@@ -75,7 +75,7 @@ const InfoBox: UISchemaElementComponent<{
75
75
  />
76
76
  )
77
77
  }
78
- </Alert>
78
+ </Callout>
79
79
  </Box>
80
80
  );
81
81
  };
@@ -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 { Alert, Box } from '@okta/odyssey-react-mui';
13
+ import { Box } from '@mui/material';
14
+ import { Callout, useOdysseyDesignTokens } from '@okta/odyssey-react-mui';
14
15
  import { IdxMessage } from '@okta/okta-auth-js';
15
16
  import { FunctionComponent, h } from 'preact';
16
17
 
@@ -20,19 +21,24 @@ type Props = {
20
21
  message?: IdxMessage;
21
22
  };
22
23
 
23
- const InfoSection: FunctionComponent<Props> = ({ message }) => (message ? (
24
- <Box
25
- marginBlockEnd={4}
26
- width={1}
27
- >
28
- <Alert
29
- key={message.i18n?.key || message.message}
30
- severity={MessageTypeVariant[message.class as MessageType] ?? MessageTypeVariant.INFO}
31
- variant="infobox"
24
+ const InfoSection: FunctionComponent<Props> = ({ message }) => {
25
+ const tokens = useOdysseyDesignTokens();
26
+
27
+ return (message ? (
28
+ <Box
29
+ marginBlockEnd={tokens.Spacing4}
30
+ width={1}
32
31
  >
33
- {message.message}
34
- </Alert>
35
- </Box>
36
- ) : null);
32
+ <Callout
33
+ key={message.i18n?.key || message.message}
34
+ severity={MessageTypeVariant[message.class as MessageType] ?? MessageTypeVariant.INFO}
35
+ // visually-hidden severity text is not translated
36
+ translate="no"
37
+ >
38
+ {message.message}
39
+ </Callout>
40
+ </Box>
41
+ ) : null);
42
+ };
37
43
 
38
44
  export default InfoSection;
@@ -10,12 +10,22 @@
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, TypographyVariantValue } from '@okta/odyssey-react-mui';
14
15
  import { h } from 'preact';
15
16
 
16
17
  import { useHtmlContentParser } from '../../hooks';
17
18
  import { DescriptionElement, UISchemaElementComponent } from '../../types';
18
19
 
20
+ const odyTypographyVariantMapping: Record<
21
+ 'body1' | 'subtitle1' | 'legend',
22
+ TypographyVariantValue
23
+ > = {
24
+ body1: 'body',
25
+ subtitle1: 'subordinate',
26
+ legend: 'legend',
27
+ };
28
+
19
29
  const InformationalText: UISchemaElementComponent<{
20
30
  uischema: DescriptionElement
21
31
  }> = ({
@@ -34,11 +44,11 @@ const InformationalText: UISchemaElementComponent<{
34
44
  justifyContent="flex-start"
35
45
  >
36
46
  <Typography
37
- id={uischema.id}
38
- paragraph
39
- data-se={dataSe || 'o-form-explain'}
40
- className={uischema.noTranslate ? 'no-translate' : undefined}
41
- variant={variant ?? 'body1'}
47
+ component="p"
48
+ variant={variant ? odyTypographyVariantMapping[variant]
49
+ : odyTypographyVariantMapping.body1}
50
+ testId={dataSe || 'o-form-explain'}
51
+ translate={uischema.noTranslate ? 'no' : undefined}
42
52
  >
43
53
  {parsedContent}
44
54
  </Typography>