@okta/odyssey-react-mui 1.22.0 → 1.24.0

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 (271) hide show
  1. package/CHANGELOG.md +40 -0
  2. package/dist/@types/i18next.d.js.map +1 -1
  3. package/dist/Autocomplete.js +32 -0
  4. package/dist/Autocomplete.js.map +1 -1
  5. package/dist/Banner.js +6 -2
  6. package/dist/Banner.js.map +1 -1
  7. package/dist/Callout.js +18 -26
  8. package/dist/Callout.js.map +1 -1
  9. package/dist/ContrastModeProvider.js +86 -0
  10. package/dist/ContrastModeProvider.js.map +1 -0
  11. package/dist/DataTable/useScrollIndication.js +7 -3
  12. package/dist/DataTable/useScrollIndication.js.map +1 -1
  13. package/dist/FieldHint.js +20 -6
  14. package/dist/FieldHint.js.map +1 -1
  15. package/dist/FileUploader/FileUploadIllustration.js.map +1 -0
  16. package/dist/FileUploader/FileUploadPreview.js.map +1 -0
  17. package/dist/{labs/FileUpload.js → FileUploader/FileUploader.js} +6 -5
  18. package/dist/FileUploader/FileUploader.js.map +1 -0
  19. package/dist/FileUploader/index.js +13 -0
  20. package/dist/FileUploader/index.js.map +1 -0
  21. package/dist/Link.js.map +1 -1
  22. package/dist/OdysseyProvider.js +43 -19
  23. package/dist/OdysseyProvider.js.map +1 -1
  24. package/dist/Radio.js +2 -2
  25. package/dist/Radio.js.map +1 -1
  26. package/dist/Select.js +36 -0
  27. package/dist/Select.js.map +1 -1
  28. package/dist/Stack.js +32 -0
  29. package/dist/Stack.js.map +1 -0
  30. package/dist/{labs/Switch.js → Switch.js} +7 -7
  31. package/dist/Switch.js.map +1 -0
  32. package/dist/Tabs.js +7 -9
  33. package/dist/Tabs.js.map +1 -1
  34. package/dist/Tag.js +144 -4
  35. package/dist/Tag.js.map +1 -1
  36. package/dist/TextField.js +16 -39
  37. package/dist/TextField.js.map +1 -1
  38. package/dist/Toast.js +2 -2
  39. package/dist/Toast.js.map +1 -1
  40. package/dist/Typography.js +27 -6
  41. package/dist/Typography.js.map +1 -1
  42. package/dist/createShadowDomElements.js +1 -0
  43. package/dist/createShadowDomElements.js.map +1 -1
  44. package/dist/i18n.js +1 -1
  45. package/dist/i18n.js.map +1 -1
  46. package/dist/index.js +4 -1
  47. package/dist/index.js.map +1 -1
  48. package/dist/index.scss +96 -4
  49. package/dist/labs/DataView/DataView.js +64 -25
  50. package/dist/labs/DataView/DataView.js.map +1 -1
  51. package/dist/labs/DataView/TableLayoutContent.js +17 -3
  52. package/dist/labs/DataView/TableLayoutContent.js.map +1 -1
  53. package/dist/labs/DataView/componentTypes.js.map +1 -1
  54. package/dist/labs/DateField.js +2 -0
  55. package/dist/labs/DateField.js.map +1 -1
  56. package/dist/labs/DatePicker.js +5 -1
  57. package/dist/labs/DatePicker.js.map +1 -1
  58. package/dist/labs/SideNav/OktaLogo.js +36 -0
  59. package/dist/labs/SideNav/OktaLogo.js.map +1 -0
  60. package/dist/labs/SideNav/SideNav.js +125 -36
  61. package/dist/labs/SideNav/SideNav.js.map +1 -1
  62. package/dist/labs/SideNav/SideNavHeader.js +33 -10
  63. package/dist/labs/SideNav/SideNavHeader.js.map +1 -1
  64. package/dist/labs/SideNav/types.js.map +1 -1
  65. package/dist/labs/TopNav.js +2 -1
  66. package/dist/labs/TopNav.js.map +1 -1
  67. package/dist/labs/datePickerTheme.js +3 -6
  68. package/dist/labs/datePickerTheme.js.map +1 -1
  69. package/dist/labs/index.js +0 -2
  70. package/dist/labs/index.js.map +1 -1
  71. package/dist/labs/useDateFieldsTranslations.js +1 -1
  72. package/dist/labs/useDateFieldsTranslations.js.map +1 -1
  73. package/dist/properties/ts/odyssey-react-mui.js +3 -1
  74. package/dist/properties/ts/odyssey-react-mui.js.map +1 -1
  75. package/dist/src/Autocomplete.d.ts +37 -1
  76. package/dist/src/Autocomplete.d.ts.map +1 -1
  77. package/dist/src/Banner.d.ts +16 -12
  78. package/dist/src/Banner.d.ts.map +1 -1
  79. package/dist/src/Callout.d.ts +20 -32
  80. package/dist/src/Callout.d.ts.map +1 -1
  81. package/dist/src/ContrastModeProvider.d.ts +34 -0
  82. package/dist/src/ContrastModeProvider.d.ts.map +1 -0
  83. package/dist/src/DataTable/useScrollIndication.d.ts.map +1 -1
  84. package/dist/src/FieldHint.d.ts.map +1 -1
  85. package/dist/src/FileUploader/FileUploadIllustration.d.ts.map +1 -0
  86. package/dist/src/{labs → FileUploader}/FileUploadPreview.d.ts +2 -2
  87. package/dist/src/FileUploader/FileUploadPreview.d.ts.map +1 -0
  88. package/dist/src/{labs/FileUpload.d.ts → FileUploader/FileUploader.d.ts} +5 -4
  89. package/dist/src/FileUploader/FileUploader.d.ts.map +1 -0
  90. package/dist/src/FileUploader/index.d.ts +13 -0
  91. package/dist/src/FileUploader/index.d.ts.map +1 -0
  92. package/dist/src/Link.d.ts +3 -1
  93. package/dist/src/Link.d.ts.map +1 -1
  94. package/dist/src/NativeSelect.d.ts +1 -1
  95. package/dist/src/OdysseyProvider.d.ts +5 -3
  96. package/dist/src/OdysseyProvider.d.ts.map +1 -1
  97. package/dist/src/OdysseyTranslationProvider.d.ts +1 -1
  98. package/dist/src/OdysseyTranslationProvider.d.ts.map +1 -1
  99. package/dist/src/PasswordField.d.ts +1 -1
  100. package/dist/src/SearchField.d.ts +1 -1
  101. package/dist/src/Select.d.ts +36 -0
  102. package/dist/src/Select.d.ts.map +1 -1
  103. package/dist/src/Stack.d.ts +33 -0
  104. package/dist/src/Stack.d.ts.map +1 -0
  105. package/dist/src/{labs/Switch.d.ts → Switch.d.ts} +3 -3
  106. package/dist/src/Switch.d.ts.map +1 -0
  107. package/dist/src/Tabs.d.ts +6 -8
  108. package/dist/src/Tabs.d.ts.map +1 -1
  109. package/dist/src/Tag.d.ts +7 -1
  110. package/dist/src/Tag.d.ts.map +1 -1
  111. package/dist/src/TextField.d.ts +17 -40
  112. package/dist/src/TextField.d.ts.map +1 -1
  113. package/dist/src/Typography.d.ts +3 -2
  114. package/dist/src/Typography.d.ts.map +1 -1
  115. package/dist/src/createShadowDomElements.d.ts.map +1 -1
  116. package/dist/src/i18n.d.ts +2 -2
  117. package/dist/src/i18n.d.ts.map +1 -1
  118. package/dist/src/index.d.ts +8 -3
  119. package/dist/src/index.d.ts.map +1 -1
  120. package/dist/src/labs/DataView/DataView.d.ts +1 -1
  121. package/dist/src/labs/DataView/DataView.d.ts.map +1 -1
  122. package/dist/src/labs/DataView/TableLayoutContent.d.ts +2 -1
  123. package/dist/src/labs/DataView/TableLayoutContent.d.ts.map +1 -1
  124. package/dist/src/labs/DataView/componentTypes.d.ts +10 -0
  125. package/dist/src/labs/DataView/componentTypes.d.ts.map +1 -1
  126. package/dist/src/labs/DateField.d.ts +2 -2
  127. package/dist/src/labs/DateField.d.ts.map +1 -1
  128. package/dist/src/labs/DatePicker.d.ts +2 -2
  129. package/dist/src/labs/DatePicker.d.ts.map +1 -1
  130. package/dist/{test-selectors/odysseyTestSelectors.js → src/labs/SideNav/OktaLogo.d.ts} +3 -9
  131. package/dist/src/labs/SideNav/OktaLogo.d.ts.map +1 -0
  132. package/dist/src/labs/SideNav/SideNav.d.ts +2 -1
  133. package/dist/src/labs/SideNav/SideNav.d.ts.map +1 -1
  134. package/dist/src/labs/SideNav/SideNavHeader.d.ts +1 -1
  135. package/dist/src/labs/SideNav/SideNavHeader.d.ts.map +1 -1
  136. package/dist/src/labs/SideNav/types.d.ts +28 -5
  137. package/dist/src/labs/SideNav/types.d.ts.map +1 -1
  138. package/dist/src/labs/TopNav.d.ts +1 -0
  139. package/dist/src/labs/TopNav.d.ts.map +1 -1
  140. package/dist/src/labs/datePickerTheme.d.ts.map +1 -1
  141. package/dist/src/labs/index.d.ts +0 -2
  142. package/dist/src/labs/index.d.ts.map +1 -1
  143. package/dist/src/properties/ts/odyssey-react-mui.d.ts +2 -0
  144. package/dist/src/properties/ts/odyssey-react-mui.d.ts.map +1 -1
  145. package/dist/src/test-selectors/getByQuerySelector.d.ts +148 -0
  146. package/dist/src/test-selectors/getByQuerySelector.d.ts.map +1 -0
  147. package/dist/src/test-selectors/getComputedAccessibleErrorMessageText.d.ts +14 -0
  148. package/dist/src/test-selectors/getComputedAccessibleErrorMessageText.d.ts.map +1 -0
  149. package/dist/src/test-selectors/{featureTestSelector.d.ts → getComputedAccessibleText.d.ts} +11 -19
  150. package/dist/src/test-selectors/getComputedAccessibleText.d.ts.map +1 -0
  151. package/dist/src/test-selectors/index.d.ts +2 -2
  152. package/dist/src/test-selectors/index.d.ts.map +1 -1
  153. package/dist/src/test-selectors/interpolateString.d.ts +15 -0
  154. package/dist/src/test-selectors/interpolateString.d.ts.map +1 -0
  155. package/dist/src/test-selectors/linkedHtmlSelectors.d.ts +24 -0
  156. package/dist/src/test-selectors/linkedHtmlSelectors.d.ts.map +1 -0
  157. package/dist/src/test-selectors/queryOdysseySelector.d.ts +5755 -0
  158. package/dist/src/test-selectors/queryOdysseySelector.d.ts.map +1 -0
  159. package/dist/src/test-selectors/querySelector.d.ts +59 -3613
  160. package/dist/src/test-selectors/querySelector.d.ts.map +1 -1
  161. package/dist/src/test-selectors/sanityChecks.d.ts +18 -0
  162. package/dist/src/test-selectors/sanityChecks.d.ts.map +1 -0
  163. package/dist/src/test-selectors/testSelector.d.ts +46 -0
  164. package/dist/src/test-selectors/testSelector.d.ts.map +1 -0
  165. package/dist/src/theme/palette.d.ts.map +1 -1
  166. package/dist/src/theme/palette.types.d.ts +2 -0
  167. package/dist/src/theme/palette.types.d.ts.map +1 -1
  168. package/dist/test-selectors/getByQuerySelector.js +64 -0
  169. package/dist/test-selectors/getByQuerySelector.js.map +1 -0
  170. package/dist/test-selectors/getComputedAccessibleErrorMessageText.js +25 -0
  171. package/dist/test-selectors/getComputedAccessibleErrorMessageText.js.map +1 -0
  172. package/dist/test-selectors/getComputedAccessibleText.js +24 -0
  173. package/dist/test-selectors/getComputedAccessibleText.js.map +1 -0
  174. package/dist/test-selectors/index.js +2 -2
  175. package/dist/test-selectors/index.js.map +1 -1
  176. package/{src/test-selectors/featureTestSelector.ts → dist/test-selectors/interpolateString.js} +11 -27
  177. package/dist/test-selectors/interpolateString.js.map +1 -0
  178. package/dist/test-selectors/linkedHtmlSelectors.js +34 -0
  179. package/dist/test-selectors/linkedHtmlSelectors.js.map +1 -0
  180. package/dist/test-selectors/queryOdysseySelector.js +26 -0
  181. package/dist/test-selectors/queryOdysseySelector.js.map +1 -0
  182. package/dist/test-selectors/querySelector.js +82 -58
  183. package/dist/test-selectors/querySelector.js.map +1 -1
  184. package/dist/test-selectors/sanityChecks.js +33 -0
  185. package/dist/test-selectors/sanityChecks.js.map +1 -0
  186. package/dist/test-selectors/testSelector.js +2 -0
  187. package/dist/test-selectors/testSelector.js.map +1 -0
  188. package/dist/test-selectors/testSelectors.json +1 -1
  189. package/dist/theme/components.js +276 -274
  190. package/dist/theme/components.js.map +1 -1
  191. package/dist/theme/palette.js +2 -1
  192. package/dist/theme/palette.js.map +1 -1
  193. package/dist/theme/palette.types.js.map +1 -1
  194. package/dist/tsconfig.production.tsbuildinfo +1 -1
  195. package/dist/tsconfig.tsbuildinfo +1 -1
  196. package/jest.setup.js +3 -0
  197. package/package.json +5 -4
  198. package/scripts/generateTestSelectorsJson.ts +1 -1
  199. package/src/@types/i18next.d.ts +1 -1
  200. package/src/Autocomplete.tsx +45 -0
  201. package/src/Banner.tsx +29 -14
  202. package/src/Callout.tsx +31 -36
  203. package/src/ContrastModeProvider.tsx +131 -0
  204. package/src/DataTable/useScrollIndication.tsx +9 -2
  205. package/src/FieldHint.tsx +28 -4
  206. package/src/{labs → FileUploader}/FileUploadPreview.tsx +3 -3
  207. package/src/{labs/FileUpload.tsx → FileUploader/FileUploader.tsx} +7 -6
  208. package/src/FileUploader/index.ts +13 -0
  209. package/src/Link.tsx +3 -1
  210. package/src/OdysseyCacheProvider.test.tsx +1 -0
  211. package/src/OdysseyProvider.tsx +58 -26
  212. package/src/Radio.tsx +2 -2
  213. package/src/Select.tsx +38 -0
  214. package/src/Stack.tsx +56 -0
  215. package/src/{labs/Switch.tsx → Switch.tsx} +10 -10
  216. package/src/Tabs.tsx +8 -10
  217. package/src/Tag.tsx +178 -3
  218. package/src/TextField.tsx +18 -41
  219. package/src/Toast.tsx +1 -1
  220. package/src/{test-selectors/odysseyTestSelectors.ts → Typography.test.tsx} +13 -9
  221. package/src/Typography.tsx +38 -6
  222. package/src/createShadowDomElements.ts +3 -0
  223. package/src/i18n.ts +3 -3
  224. package/src/index.ts +10 -1
  225. package/src/labs/DataView/DataView.test.tsx +158 -0
  226. package/src/labs/DataView/DataView.tsx +98 -50
  227. package/src/labs/DataView/TableLayoutContent.tsx +28 -1
  228. package/src/labs/DataView/componentTypes.ts +13 -0
  229. package/src/labs/DateField.tsx +3 -0
  230. package/src/labs/DatePicker.tsx +12 -1
  231. package/src/labs/SideNav/OktaLogo.tsx +39 -0
  232. package/src/labs/SideNav/SideNav.tsx +187 -51
  233. package/src/labs/SideNav/SideNavHeader.tsx +30 -7
  234. package/src/labs/SideNav/types.ts +32 -5
  235. package/src/labs/TopNav.tsx +3 -1
  236. package/src/labs/datePickerTheme.tsx +2 -6
  237. package/src/labs/index.ts +0 -3
  238. package/src/labs/useDateFieldsTranslations.ts +1 -1
  239. package/src/properties/odyssey-react-mui.properties +2 -1
  240. package/src/properties/ts/odyssey-react-mui.ts +1 -1
  241. package/src/test-selectors/getByQuerySelector.ts +176 -0
  242. package/src/test-selectors/getComputedAccessibleErrorMessageText.ts +52 -0
  243. package/src/test-selectors/getComputedAccessibleText.ts +36 -0
  244. package/src/test-selectors/index.ts +2 -2
  245. package/src/test-selectors/interpolateString.ts +41 -0
  246. package/src/test-selectors/linkedHtmlSelectors.ts +73 -0
  247. package/src/test-selectors/queryOdysseySelector.ts +36 -0
  248. package/src/test-selectors/querySelector.ts +221 -170
  249. package/src/test-selectors/sanityChecks.ts +53 -0
  250. package/src/test-selectors/testSelector.ts +143 -0
  251. package/src/theme/components.tsx +284 -284
  252. package/src/theme/palette.ts +2 -1
  253. package/src/theme/palette.types.ts +2 -0
  254. package/dist/labs/FileUpload.js.map +0 -1
  255. package/dist/labs/FileUploadIllustration.js.map +0 -1
  256. package/dist/labs/FileUploadPreview.js.map +0 -1
  257. package/dist/labs/Switch.js.map +0 -1
  258. package/dist/src/labs/FileUpload.d.ts.map +0 -1
  259. package/dist/src/labs/FileUploadIllustration.d.ts.map +0 -1
  260. package/dist/src/labs/FileUploadPreview.d.ts.map +0 -1
  261. package/dist/src/labs/Switch.d.ts.map +0 -1
  262. package/dist/src/test-selectors/featureTestSelector.d.ts.map +0 -1
  263. package/dist/src/test-selectors/odysseyTestSelectors.d.ts +0 -120
  264. package/dist/src/test-selectors/odysseyTestSelectors.d.ts.map +0 -1
  265. package/dist/test-selectors/featureTestSelector.js +0 -2
  266. package/dist/test-selectors/featureTestSelector.js.map +0 -1
  267. package/dist/test-selectors/odysseyTestSelectors.js.map +0 -1
  268. /package/dist/{labs → FileUploader}/FileUploadIllustration.js +0 -0
  269. /package/dist/{labs → FileUploader}/FileUploadPreview.js +0 -0
  270. /package/dist/src/{labs → FileUploader}/FileUploadIllustration.d.ts +0 -0
  271. /package/src/{labs → FileUploader}/FileUploadIllustration.tsx +0 -0
@@ -253,7 +253,8 @@ export const components = ({
253
253
  justifyContent: "center",
254
254
  alignItems: "center",
255
255
  borderRadius: 0,
256
- border: 0,
256
+ borderWidth: 0,
257
+ borderBottomWidth: "1px",
257
258
 
258
259
  ...(ownerState.onClose !== undefined && {
259
260
  paddingInline: odysseyTokens.Spacing6,
@@ -576,207 +577,164 @@ export const components = ({
576
577
  disableElevation: true,
577
578
  },
578
579
  styleOverrides: {
579
- root: ({ ownerState }) => ({
580
- minWidth: "unset",
581
- paddingBlock: odysseyTokens.Spacing3,
582
- paddingInline: odysseyTokens.Spacing4,
583
- display: "inline-flex",
584
- height: odysseyTokens.Spacing7,
585
- position: "relative",
586
- marginBlock: "0",
587
- marginInline: "0",
588
- transitionProperty:
589
- "color, background-color, border-color, box-shadow",
590
- transitionDuration: "100ms",
591
- transitionTimingFunction: "linear",
592
- borderWidth: odysseyTokens.BorderWidthMain,
593
- borderStyle: odysseyTokens.BorderStyleMain,
594
- borderRadius: odysseyTokens.BorderRadiusMain,
595
- borderColor: "transparent",
596
- fontSize: odysseyTokens.TypographySizeBody,
597
- fontWeight: odysseyTokens.TypographyWeightHeading,
598
- fontFamily: odysseyTokens.TypographyFamilyButton,
599
- lineHeight: odysseyTokens.TypographyLineHeightUi,
600
- whiteSpace: "nowrap",
601
-
602
- [`.${buttonClasses.root} + &`]: {
603
- marginInlineStart: odysseyTokens.Spacing2,
604
- },
605
-
606
- "&:focus-visible": {
607
- boxShadow: `0 0 0 2px ${odysseyTokens.HueNeutralWhite}, 0 0 0 4px ${odysseyTokens.PalettePrimaryMain}`,
608
- outline: "2px solid transparent",
609
- outlineOffset: "1px",
610
- },
611
-
612
- "&:disabled": {
613
- pointerEvents: "none",
614
- },
615
-
616
- [`.${buttonClasses.startIcon}, .${buttonClasses.endIcon}`]: {
617
- "& > *:nth-of-type(1)": {
618
- fontSize: `${odysseyTokens.TypographyLineHeightUi}em`,
619
- },
620
- },
580
+ root: ({ ownerState, theme }) => {
581
+ const contrastMode = theme.odysseyContrastMode;
621
582
 
622
- ...(ownerState.variant === "primary" && {
623
- color: odysseyTokens.HueNeutralWhite,
624
- backgroundColor: odysseyTokens.PalettePrimaryMain,
583
+ return {
584
+ minWidth: "unset",
585
+ paddingBlock: odysseyTokens.Spacing3,
586
+ paddingInline: odysseyTokens.Spacing4,
587
+ display: "inline-flex",
588
+ height: odysseyTokens.Spacing7,
589
+ position: "relative",
590
+ marginBlock: "0",
591
+ marginInline: "0",
592
+ transitionProperty:
593
+ "color, background-color, border-color, box-shadow",
594
+ transitionDuration: "100ms",
595
+ transitionTimingFunction: "linear",
596
+ borderWidth: odysseyTokens.BorderWidthMain,
597
+ borderStyle: odysseyTokens.BorderStyleMain,
598
+ borderRadius: odysseyTokens.BorderRadiusMain,
599
+ borderColor: "transparent",
600
+ fontSize: odysseyTokens.TypographySizeBody,
601
+ fontWeight: odysseyTokens.TypographyWeightHeading,
602
+ fontFamily: odysseyTokens.TypographyFamilyButton,
603
+ lineHeight: odysseyTokens.TypographyLineHeightUi,
604
+ whiteSpace: "nowrap",
625
605
 
626
- "&:hover": {
627
- backgroundColor: odysseyTokens.PalettePrimaryDark,
606
+ [`.${buttonClasses.root} + &`]: {
607
+ marginInlineStart: odysseyTokens.Spacing2,
628
608
  },
629
609
 
630
- "&:active": {
631
- backgroundColor: odysseyTokens.PalettePrimaryDarker,
610
+ "&:focus-visible": {
611
+ boxShadow: `0 0 0 2px ${odysseyTokens.HueNeutralWhite}, 0 0 0 4px ${odysseyTokens.PalettePrimaryMain}`,
612
+ outline: "2px solid transparent",
613
+ outlineOffset: "1px",
632
614
  },
633
615
 
634
616
  "&:disabled": {
635
- color: odysseyTokens.PalettePrimaryLight,
636
- backgroundColor: odysseyTokens.HueBlue100,
637
- },
638
- }),
639
-
640
- ...(ownerState.variant === "secondary" && {
641
- backgroundColor: "transparent",
642
- borderColor: odysseyTokens.HueNeutral300,
643
- color: odysseyTokens.TypographyColorBody,
644
-
645
- "&:hover": {
646
- backgroundColor: odysseyTokens.HueNeutral100,
617
+ pointerEvents: "none",
647
618
  },
648
619
 
649
- "&:active": {
650
- backgroundColor: "transparent",
651
- borderColor: odysseyTokens.BorderColorPrimaryControl,
652
- color: odysseyTokens.TypographyColorAction,
620
+ [`.${buttonClasses.startIcon}, .${buttonClasses.endIcon}`]: {
621
+ "& > *:nth-of-type(1)": {
622
+ fontSize: `${odysseyTokens.TypographyLineHeightUi}em`,
623
+ },
653
624
  },
654
625
 
655
- "&:disabled": {
656
- backgroundColor: odysseyTokens.HueNeutral100,
657
- borderColor: "transparent",
658
- color: odysseyTokens.TypographyColorDisabled,
659
- },
660
- }),
626
+ ...(ownerState.variant === "primary" && {
627
+ color: odysseyTokens.HueNeutralWhite,
628
+ backgroundColor: odysseyTokens.PalettePrimaryMain,
661
629
 
662
- ...(ownerState.variant === "danger" && {
663
- backgroundColor: odysseyTokens.PaletteDangerMain,
664
- color: odysseyTokens.HueNeutralWhite,
630
+ "&:hover": {
631
+ backgroundColor: odysseyTokens.PalettePrimaryDark,
632
+ },
665
633
 
666
- "&:hover": {
667
- backgroundColor: odysseyTokens.PaletteDangerDark,
668
- },
634
+ "&:active": {
635
+ backgroundColor: odysseyTokens.PalettePrimaryDarker,
636
+ },
669
637
 
670
- "&:focus-visible": {
671
- boxShadow: `0 0 0 2px ${odysseyTokens.HueNeutralWhite}, 0 0 0 4px ${odysseyTokens.PaletteDangerMain}`,
672
- },
638
+ "&:disabled": {
639
+ color: odysseyTokens.PalettePrimaryLight,
640
+ backgroundColor: odysseyTokens.HueBlue100,
641
+ },
642
+ }),
673
643
 
674
- "&:active": {
675
- backgroundColor: odysseyTokens.PaletteDangerDarker,
676
- },
644
+ ...(ownerState.variant === "secondary" && {
645
+ backgroundColor: "transparent",
646
+ borderColor: odysseyTokens.HueNeutral300,
647
+ color: odysseyTokens.TypographyColorBody,
677
648
 
678
- "&:disabled": {
679
- color: odysseyTokens.PaletteDangerLight,
680
- backgroundColor: odysseyTokens.HueRed100,
681
- },
682
- }),
683
- ...(ownerState.variant === "dangerSecondary" && {
684
- backgroundColor: "transparent",
685
- borderColor: odysseyTokens.HueNeutral300,
686
- color: odysseyTokens.PaletteDangerMain,
649
+ "&:hover": {
650
+ backgroundColor: odysseyTokens.HueNeutral100,
651
+ },
687
652
 
688
- "&:hover": {
689
- backgroundColor: odysseyTokens.HueNeutral100,
690
- color: odysseyTokens.PaletteDangerMain,
691
- },
653
+ "&:active": {
654
+ backgroundColor: "transparent",
655
+ borderColor: odysseyTokens.BorderColorPrimaryControl,
656
+ color: odysseyTokens.TypographyColorAction,
657
+ },
692
658
 
693
- "&:active": {
694
- backgroundColor: "transparent",
695
- borderColor: odysseyTokens.PaletteDangerMain,
696
- color: odysseyTokens.PaletteDangerMain,
697
- },
659
+ "&:disabled": {
660
+ ...(contrastMode === "lowContrast" && {
661
+ backgroundColor: odysseyTokens.HueNeutral200,
662
+ borderColor: "transparent",
663
+ color: odysseyTokens.TypographyColorDisabled,
664
+ }),
698
665
 
699
- "&:disabled": {
700
- backgroundColor: "transparent",
701
- borderColor: odysseyTokens.PaletteDangerLight,
702
- color: odysseyTokens.PaletteDangerLight,
703
- },
704
- }),
705
- ...(ownerState.variant === "floating" && {
706
- backgroundColor: "transparent",
707
- color: odysseyTokens.TypographyColorBody,
666
+ ...(contrastMode === "highContrast" && {
667
+ backgroundColor: odysseyTokens.HueNeutral100,
668
+ borderColor: "transparent",
669
+ color: odysseyTokens.TypographyColorDisabled,
670
+ }),
671
+ },
672
+ }),
708
673
 
709
- "&:hover": {
710
- backgroundColor: odysseyTokens.HueNeutral100,
711
- },
674
+ ...(ownerState.variant === "danger" && {
675
+ backgroundColor: odysseyTokens.PaletteDangerMain,
676
+ color: odysseyTokens.HueNeutralWhite,
712
677
 
713
- "&:active": {
714
- backgroundColor: odysseyTokens.HueNeutral200,
715
- },
678
+ "&:hover": {
679
+ backgroundColor: odysseyTokens.PaletteDangerDark,
680
+ },
716
681
 
717
- "&:disabled": {
718
- backgroundColor: "transparent",
719
- color: odysseyTokens.TypographyColorDisabled,
720
- },
721
- }),
722
- ...(ownerState.variant === "floatingAction" && {
723
- backgroundColor: "transparent",
724
- color: odysseyTokens.TypographyColorAction,
682
+ "&:focus-visible": {
683
+ boxShadow: `0 0 0 2px ${odysseyTokens.HueNeutralWhite}, 0 0 0 4px ${odysseyTokens.PaletteDangerMain}`,
684
+ },
725
685
 
726
- "&:hover": {
727
- backgroundColor: odysseyTokens.HueNeutral100,
728
- },
686
+ "&:active": {
687
+ backgroundColor: odysseyTokens.PaletteDangerDarker,
688
+ },
729
689
 
730
- "&:active": {
731
- backgroundColor: odysseyTokens.HueNeutral200,
732
- },
690
+ "&:disabled": {
691
+ color: odysseyTokens.PaletteDangerLight,
692
+ backgroundColor: odysseyTokens.HueRed100,
693
+ },
694
+ }),
733
695
 
734
- "&:disabled": {
696
+ ...(ownerState.variant === "dangerSecondary" && {
735
697
  backgroundColor: "transparent",
736
- color: odysseyTokens.TypographyColorDisabled,
737
- },
738
- }),
739
- ...(ownerState.size === "small" && {
740
- height: odysseyTokens.Spacing6,
741
- paddingBlock: odysseyTokens.Spacing2,
742
- paddingInline: odysseyTokens.Spacing3,
743
- fontSize: odysseyTokens.TypographySizeBody,
744
- }),
745
- ...(ownerState.size === "large" && {
746
- height: odysseyTokens.Spacing8,
747
- paddingBlock: odysseyTokens.Spacing4,
748
- paddingInline: odysseyTokens.Spacing4,
749
- }),
750
- ...(ownerState.fullWidth === true && {
751
- width: "100%",
752
- marginBlock: "0",
753
- marginInline: "0",
698
+ borderColor: odysseyTokens.HueNeutral300,
699
+ color: odysseyTokens.PaletteDangerMain,
754
700
 
755
- "&:not(:last-child)": {
756
- marginBlockEnd: odysseyTokens.Spacing4,
757
- },
758
- }),
759
- ...(ownerState.children === "" && {
760
- minWidth: "auto",
761
- padding: odysseyTokens.Spacing3,
701
+ "&:hover": {
702
+ backgroundColor: odysseyTokens.HueNeutral100,
703
+ color: odysseyTokens.PaletteDangerMain,
704
+ },
762
705
 
763
- [`.${buttonClasses.endIcon}, .${buttonClasses.startIcon}`]: {
764
- margin: "0",
765
- },
706
+ "&:active": {
707
+ backgroundColor: "transparent",
708
+ borderColor: odysseyTokens.PaletteDangerMain,
709
+ color: odysseyTokens.PaletteDangerMain,
710
+ },
766
711
 
767
- ...(ownerState.size === "large" && {
768
- padding: odysseyTokens.Spacing4,
712
+ "&:disabled": {
713
+ backgroundColor: "transparent",
714
+ borderColor: odysseyTokens.PaletteDangerLight,
715
+ color: odysseyTokens.PaletteDangerLight,
716
+ },
769
717
  }),
770
718
 
771
- ...(ownerState.size === "small" && {
772
- padding: odysseyTokens.Spacing2,
773
- }),
719
+ ...(ownerState.variant === "floating" && {
720
+ backgroundColor: "transparent",
721
+ color: odysseyTokens.TypographyColorBody,
722
+
723
+ "&:hover": {
724
+ backgroundColor: odysseyTokens.HueNeutral100,
725
+ },
726
+
727
+ "&:active": {
728
+ backgroundColor: odysseyTokens.HueNeutral200,
729
+ },
774
730
 
775
- ...(ownerState.size === "large" && {
776
- padding: odysseyTokens.Spacing4,
731
+ "&:disabled": {
732
+ backgroundColor: "transparent",
733
+ color: odysseyTokens.TypographyColorDisabled,
734
+ },
777
735
  }),
778
- }),
779
- }),
736
+ };
737
+ },
780
738
 
781
739
  endIcon: ({ ownerState }) => ({
782
740
  display: "inline-flex",
@@ -995,131 +953,166 @@ export const components = ({
995
953
  deleteIcon: <CloseCircleFilledIcon />,
996
954
  },
997
955
  styleOverrides: {
998
- root: ({ ownerState }) => ({
999
- height: "auto",
1000
- paddingBlock: `calc(${odysseyTokens.Spacing2} - ${odysseyTokens.BorderWidthMain})`,
1001
- paddingInline: odysseyTokens.Spacing3,
1002
- fontSize: odysseyTokens.TypographySizeBody,
1003
- lineHeight: odysseyTokens.TypographyLineHeightUi,
1004
- borderRadius: odysseyTokens.BorderRadiusRound,
1005
- backgroundColor: odysseyTokens.HueNeutral100,
1006
- borderWidth: odysseyTokens.BorderWidthMain,
1007
- borderColor: odysseyTokens.HueNeutral200,
1008
- borderStyle: odysseyTokens.BorderStyleMain,
1009
- color: odysseyTokens.HueNeutral700,
956
+ root: ({ ownerState, theme }) => {
957
+ const contrastMode = theme.odysseyContrastMode;
958
+ return {
959
+ height: "auto",
960
+ paddingBlock: `calc(${odysseyTokens.Spacing2} - ${odysseyTokens.BorderWidthMain})`,
961
+ paddingInline: odysseyTokens.Spacing3,
962
+ fontSize: odysseyTokens.TypographySizeBody,
963
+ lineHeight: odysseyTokens.TypographyLineHeightUi,
964
+ borderRadius: odysseyTokens.BorderRadiusRound,
965
+ backgroundColor: odysseyTokens.HueNeutral100,
966
+ borderWidth: odysseyTokens.BorderWidthMain,
967
+ borderColor: odysseyTokens.HueNeutral200,
968
+ borderStyle: odysseyTokens.BorderStyleMain,
969
+ color: odysseyTokens.HueNeutral700,
1010
970
 
1011
- ...(ownerState.onDelete && {
1012
- paddingInlineEnd: odysseyTokens.Spacing2,
1013
- }),
971
+ ...(ownerState.onDelete && {
972
+ paddingInlineEnd: odysseyTokens.Spacing2,
973
+ }),
1014
974
 
1015
- [`&.${chipClasses.disabled}`]: {
1016
- opacity: 1,
1017
- pointerEvents: "none",
1018
- borderColor: odysseyTokens.BorderColorDisabled,
1019
- color: odysseyTokens.TypographyColorDisabled,
975
+ [`&.${chipClasses.disabled}`]: {
976
+ opacity: 1,
977
+ pointerEvents: "none",
978
+ borderColor: odysseyTokens.BorderColorDisabled,
979
+ color: odysseyTokens.TypographyColorDisabled,
1020
980
 
1021
- [`& .${chipClasses.deleteIcon}`]: {
1022
- color: odysseyTokens.HueNeutral300,
981
+ [`& .${chipClasses.deleteIcon}`]: {
982
+ color: odysseyTokens.HueNeutral300,
983
+ },
1023
984
  },
1024
- },
1025
985
 
1026
- ...(ownerState.clickable && {
1027
- "&:hover": {
1028
- backgroundColor: odysseyTokens.HueNeutral200,
1029
- },
1030
- [`&.${chipClasses.focusVisible}`]: {
1031
- backgroundColor: odysseyTokens.HueNeutral200,
1032
- outlineColor: odysseyTokens.FocusOutlineColorPrimary,
1033
- outlineOffset: odysseyTokens.FocusOutlineOffsetTight,
1034
- outlineStyle: odysseyTokens.FocusOutlineStyle,
1035
- outlineWidth: odysseyTokens.FocusOutlineWidthMain,
1036
- },
1037
- "&:active": {
1038
- boxShadow: "none",
1039
- backgroundColor: odysseyTokens.HueNeutral300,
986
+ ...(ownerState.clickable && {
987
+ "&:hover": {
988
+ backgroundColor: odysseyTokens.HueNeutral200,
989
+ },
990
+ [`&.${chipClasses.focusVisible}`]: {
991
+ backgroundColor: odysseyTokens.HueNeutral200,
992
+ outlineColor: odysseyTokens.FocusOutlineColorPrimary,
993
+ outlineOffset: odysseyTokens.FocusOutlineOffsetTight,
994
+ outlineStyle: odysseyTokens.FocusOutlineStyle,
995
+ outlineWidth: odysseyTokens.FocusOutlineWidthMain,
996
+ },
997
+ "&:active": {
998
+ boxShadow: "none",
999
+ backgroundColor: odysseyTokens.HueNeutral300,
1000
+ },
1001
+ }),
1002
+
1003
+ [`& .${chipClasses.icon}`]: {
1004
+ margin: 0,
1005
+ marginInlineEnd: odysseyTokens.Spacing1,
1040
1006
  },
1041
- }),
1042
1007
 
1043
- [`& .${chipClasses.icon}`]: {
1044
- margin: 0,
1045
- marginInlineEnd: odysseyTokens.Spacing1,
1046
- },
1008
+ ...(ownerState.variant === "lamp" && {
1009
+ paddingBlock: 0,
1010
+ paddingInline: 0,
1011
+ borderRadius: 0,
1012
+ border: 0,
1013
+ backgroundColor: "transparent",
1014
+ color: odysseyTokens.TypographyColorBody,
1047
1015
 
1048
- ...(ownerState.variant === "lamp" && {
1049
- paddingBlock: 0,
1050
- paddingInline: 0,
1051
- borderRadius: 0,
1052
- border: 0,
1053
- backgroundColor: "transparent",
1054
- color: odysseyTokens.TypographyColorBody,
1016
+ "&::before": {
1017
+ content: "''",
1018
+ width: odysseyTokens.Spacing2,
1019
+ height: odysseyTokens.Spacing2,
1020
+ marginInlineEnd: odysseyTokens.Spacing2,
1021
+ borderRadius: "100%",
1022
+ backgroundColor: odysseyTokens.HueNeutral600,
1023
+ },
1055
1024
 
1056
- "&::before": {
1057
- content: "''",
1058
- width: odysseyTokens.Spacing2,
1059
- height: odysseyTokens.Spacing2,
1060
- marginInlineEnd: odysseyTokens.Spacing2,
1061
- borderRadius: "100%",
1062
- backgroundColor: odysseyTokens.HueNeutral600,
1063
- },
1025
+ [`&.${chipClasses.colorError}`]: {
1026
+ "&::before": {
1027
+ border: 0,
1028
+ backgroundColor: odysseyTokens.PaletteDangerMain,
1029
+ },
1030
+ },
1064
1031
 
1065
- [`&.${chipClasses.colorError}`]: {
1066
- "&::before": {
1067
- border: 0,
1068
- backgroundColor: odysseyTokens.PaletteDangerMain,
1032
+ [`&.${chipClasses.colorSuccess}`]: {
1033
+ "&::before": {
1034
+ border: 0,
1035
+ backgroundColor: odysseyTokens.PaletteSuccessMain,
1036
+ },
1069
1037
  },
1070
- },
1071
1038
 
1072
- [`&.${chipClasses.colorSuccess}`]: {
1073
- "&::before": {
1074
- border: 0,
1075
- backgroundColor: odysseyTokens.PaletteSuccessMain,
1039
+ [`&.${chipClasses.colorWarning}`]: {
1040
+ "&::before": {
1041
+ border: 0,
1042
+ backgroundColor: odysseyTokens.HueYellow200,
1043
+ },
1076
1044
  },
1077
- },
1045
+ }),
1078
1046
 
1079
- [`&.${chipClasses.colorWarning}`]: {
1080
- "&::before": {
1081
- border: 0,
1082
- backgroundColor: odysseyTokens.HueYellow200,
1047
+ ...(ownerState.variant === "pill" && {
1048
+ paddingBlock: odysseyTokens.Spacing1,
1049
+ paddingInline: odysseyTokens.Spacing2,
1050
+ borderRadius: odysseyTokens.BorderRadiusMain,
1051
+ border: 0,
1052
+ fontWeight: odysseyTokens.TypographyWeightHeadingBold,
1053
+ lineHeight: odysseyTokens.TypographyLineHeightOverline,
1054
+ fontSize: "0.71428571rem",
1055
+ textTransform: "uppercase",
1056
+
1057
+ ...(contrastMode === "lowContrast" && {
1058
+ backgroundColor: odysseyTokens.HueNeutral200,
1059
+ color: odysseyTokens.HueNeutral700,
1060
+ }),
1061
+ ...(contrastMode === "highContrast" && {
1062
+ backgroundColor: odysseyTokens.HueNeutral50,
1063
+ color: odysseyTokens.TypographyColorSubordinate,
1064
+ }),
1065
+
1066
+ [`&.${chipClasses.colorError}`]: {
1067
+ ...(contrastMode === "lowContrast" && {
1068
+ backgroundColor: odysseyTokens.HueRed100,
1069
+ color: odysseyTokens.HueRed700,
1070
+ }),
1071
+ ...(contrastMode === "highContrast" && {
1072
+ backgroundColor: odysseyTokens.PaletteDangerLighter,
1073
+ color: odysseyTokens.TypographyColorDanger,
1074
+ }),
1083
1075
  },
1084
- },
1085
- }),
1086
- ...(ownerState.variant === "pill" && {
1087
- paddingBlock: odysseyTokens.Spacing1,
1088
- paddingInline: odysseyTokens.Spacing2,
1089
- borderRadius: odysseyTokens.BorderRadiusMain,
1090
- border: 0,
1091
- fontWeight: odysseyTokens.TypographyWeightHeadingBold,
1092
- lineHeight: odysseyTokens.TypographyLineHeightOverline,
1093
- backgroundColor: odysseyTokens.HueNeutral50,
1094
- color: odysseyTokens.TypographyColorSubordinate,
1095
- fontSize: "0.71428571rem",
1096
- textTransform: "uppercase",
1097
1076
 
1098
- [`&.${chipClasses.colorError}`]: {
1099
- backgroundColor: odysseyTokens.PaletteDangerLighter,
1100
- color: odysseyTokens.TypographyColorDanger,
1101
- },
1077
+ [`&.${chipClasses.colorInfo}`]: {
1078
+ ...(contrastMode === "lowContrast" && {
1079
+ backgroundColor: odysseyTokens.HueBlue100,
1080
+ color: odysseyTokens.HueBlue700,
1081
+ }),
1082
+ ...(contrastMode === "highContrast" && {
1083
+ backgroundColor: odysseyTokens.PalettePrimaryLighter,
1084
+ color: odysseyTokens.PalettePrimaryText,
1085
+ }),
1086
+ },
1102
1087
 
1103
- [`&.${chipClasses.colorInfo}`]: {
1104
- backgroundColor: odysseyTokens.PalettePrimaryLighter,
1105
- color: odysseyTokens.PalettePrimaryText,
1106
- },
1088
+ [`&.${chipClasses.colorSuccess}`]: {
1089
+ ...(contrastMode === "lowContrast" && {
1090
+ backgroundColor: odysseyTokens.HueGreen200,
1091
+ color: odysseyTokens.HueGreen700,
1092
+ }),
1093
+ ...(contrastMode === "highContrast" && {
1094
+ backgroundColor: odysseyTokens.PaletteSuccessLighter,
1095
+ color: odysseyTokens.TypographyColorSuccess,
1096
+ }),
1097
+ },
1107
1098
 
1108
- [`&.${chipClasses.colorSuccess}`]: {
1109
- backgroundColor: odysseyTokens.PaletteSuccessLighter,
1110
- color: odysseyTokens.TypographyColorSuccess,
1111
- },
1099
+ [`&.${chipClasses.colorWarning}`]: {
1100
+ ...(contrastMode === "lowContrast" && {
1101
+ backgroundColor: odysseyTokens.HueYellow100,
1102
+ color: odysseyTokens.HueYellow700,
1103
+ }),
1104
+ ...(contrastMode === "highContrast" && {
1105
+ backgroundColor: odysseyTokens.PaletteWarningLighter,
1106
+ color: odysseyTokens.TypographyColorWarning,
1107
+ }),
1108
+ },
1109
+ }),
1112
1110
 
1113
- [`&.${chipClasses.colorWarning}`]: {
1114
- backgroundColor: odysseyTokens.PaletteWarningLighter,
1115
- color: odysseyTokens.TypographyColorWarning,
1111
+ [`.${inputBaseClasses.root}.${inputBaseClasses.disabled} &`]: {
1112
+ backgroundColor: odysseyTokens.HueNeutral200,
1116
1113
  },
1117
- }),
1118
-
1119
- [`.${inputBaseClasses.root}.${inputBaseClasses.disabled} &`]: {
1120
- backgroundColor: odysseyTokens.HueNeutral200,
1121
- },
1122
- }),
1114
+ };
1115
+ },
1123
1116
 
1124
1117
  label: {
1125
1118
  padding: 0,
@@ -1127,7 +1120,7 @@ export const components = ({
1127
1120
  [`.${inputBaseClasses.root}.${inputBaseClasses.disabled} &`]: {
1128
1121
  color: odysseyTokens.TypographyColorDisabled,
1129
1122
  WebkitTextFillColor: odysseyTokens.TypographyColorDisabled,
1130
- } satisfies CSSProperties,
1123
+ } as CSSProperties,
1131
1124
  },
1132
1125
 
1133
1126
  deleteIcon: {
@@ -1748,25 +1741,20 @@ export const components = ({
1748
1741
  },
1749
1742
  styleOverrides: {
1750
1743
  root: {
1751
- display: "flex",
1752
- justifyContent: "flex-start",
1753
- alignItems: "center",
1754
1744
  fontSize: odysseyTokens.TypographySizeSubordinate,
1755
1745
  lineHeight: odysseyTokens.TypographyLineHeightBody,
1746
+ marginBlockEnd: odysseyTokens.Spacing2,
1756
1747
  marginBlockStart: odysseyTokens.Spacing1,
1748
+ textAlign: "start",
1749
+
1757
1750
  [`.${formLabelClasses.root} + &`]: {
1758
1751
  marginBlockStart: `-${odysseyTokens.Spacing1}`,
1759
1752
  color: odysseyTokens.TypographyColorSubordinate,
1760
1753
  },
1761
- marginBlockEnd: odysseyTokens.Spacing2,
1754
+
1762
1755
  "&:last-child": {
1763
1756
  marginBlockEnd: 0,
1764
1757
  },
1765
- textAlign: "start",
1766
-
1767
- ".field-hint-link-component": {
1768
- marginInlineStart: odysseyTokens.Spacing1,
1769
- },
1770
1758
 
1771
1759
  ".Mui-disabled &": {
1772
1760
  color: odysseyTokens.TypographyColorDisabled,
@@ -3111,6 +3099,7 @@ export const components = ({
3111
3099
  body1: "p",
3112
3100
  inherit: "p",
3113
3101
  legend: "legend",
3102
+ overline: "p",
3114
3103
  },
3115
3104
  },
3116
3105
  styleOverrides: {
@@ -3121,6 +3110,17 @@ export const components = ({
3121
3110
  marginBlockEnd: 0,
3122
3111
  },
3123
3112
  },
3113
+ overline: {
3114
+ fontSize: odysseyTokens.TypographySizeOverline,
3115
+ fontWeight: odysseyTokens.TypographyWeightBodyBold,
3116
+ lineHeight: odysseyTokens.TypographyLineHeightOverline,
3117
+ letterSpacing: odysseyTokens.TypographyLetterSpacingOverline,
3118
+ textTransform: "none",
3119
+
3120
+ ":is(:lang(en-*), :lang(en))": {
3121
+ textTransform: "uppercase",
3122
+ },
3123
+ },
3124
3124
  },
3125
3125
  },
3126
3126
  };