@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
@@ -208,7 +208,8 @@ export const components = ({
208
208
  justifyContent: "center",
209
209
  alignItems: "center",
210
210
  borderRadius: 0,
211
- border: 0,
211
+ borderWidth: 0,
212
+ borderBottomWidth: "1px",
212
213
  ...(ownerState.onClose !== undefined && {
213
214
  paddingInline: odysseyTokens.Spacing6
214
215
  })
@@ -519,176 +520,138 @@ export const components = ({
519
520
  },
520
521
  styleOverrides: {
521
522
  root: ({
522
- ownerState
523
- }) => ({
524
- minWidth: "unset",
525
- paddingBlock: odysseyTokens.Spacing3,
526
- paddingInline: odysseyTokens.Spacing4,
527
- display: "inline-flex",
528
- height: odysseyTokens.Spacing7,
529
- position: "relative",
530
- marginBlock: "0",
531
- marginInline: "0",
532
- transitionProperty: "color, background-color, border-color, box-shadow",
533
- transitionDuration: "100ms",
534
- transitionTimingFunction: "linear",
535
- borderWidth: odysseyTokens.BorderWidthMain,
536
- borderStyle: odysseyTokens.BorderStyleMain,
537
- borderRadius: odysseyTokens.BorderRadiusMain,
538
- borderColor: "transparent",
539
- fontSize: odysseyTokens.TypographySizeBody,
540
- fontWeight: odysseyTokens.TypographyWeightHeading,
541
- fontFamily: odysseyTokens.TypographyFamilyButton,
542
- lineHeight: odysseyTokens.TypographyLineHeightUi,
543
- whiteSpace: "nowrap",
544
- [`.${buttonClasses.root} + &`]: {
545
- marginInlineStart: odysseyTokens.Spacing2
546
- },
547
- "&:focus-visible": {
548
- boxShadow: `0 0 0 2px ${odysseyTokens.HueNeutralWhite}, 0 0 0 4px ${odysseyTokens.PalettePrimaryMain}`,
549
- outline: "2px solid transparent",
550
- outlineOffset: "1px"
551
- },
552
- "&:disabled": {
553
- pointerEvents: "none"
554
- },
555
- [`.${buttonClasses.startIcon}, .${buttonClasses.endIcon}`]: {
556
- "& > *:nth-of-type(1)": {
557
- fontSize: `${odysseyTokens.TypographyLineHeightUi}em`
558
- }
559
- },
560
- ...(ownerState.variant === "primary" && {
561
- color: odysseyTokens.HueNeutralWhite,
562
- backgroundColor: odysseyTokens.PalettePrimaryMain,
563
- "&:hover": {
564
- backgroundColor: odysseyTokens.PalettePrimaryDark
565
- },
566
- "&:active": {
567
- backgroundColor: odysseyTokens.PalettePrimaryDarker
568
- },
569
- "&:disabled": {
570
- color: odysseyTokens.PalettePrimaryLight,
571
- backgroundColor: odysseyTokens.HueBlue100
572
- }
573
- }),
574
- ...(ownerState.variant === "secondary" && {
575
- backgroundColor: "transparent",
576
- borderColor: odysseyTokens.HueNeutral300,
577
- color: odysseyTokens.TypographyColorBody,
578
- "&:hover": {
579
- backgroundColor: odysseyTokens.HueNeutral100
580
- },
581
- "&:active": {
582
- backgroundColor: "transparent",
583
- borderColor: odysseyTokens.BorderColorPrimaryControl,
584
- color: odysseyTokens.TypographyColorAction
585
- },
586
- "&:disabled": {
587
- backgroundColor: odysseyTokens.HueNeutral100,
588
- borderColor: "transparent",
589
- color: odysseyTokens.TypographyColorDisabled
590
- }
591
- }),
592
- ...(ownerState.variant === "danger" && {
593
- backgroundColor: odysseyTokens.PaletteDangerMain,
594
- color: odysseyTokens.HueNeutralWhite,
595
- "&:hover": {
596
- backgroundColor: odysseyTokens.PaletteDangerDark
523
+ ownerState,
524
+ theme
525
+ }) => {
526
+ const contrastMode = theme.odysseyContrastMode;
527
+ return {
528
+ minWidth: "unset",
529
+ paddingBlock: odysseyTokens.Spacing3,
530
+ paddingInline: odysseyTokens.Spacing4,
531
+ display: "inline-flex",
532
+ height: odysseyTokens.Spacing7,
533
+ position: "relative",
534
+ marginBlock: "0",
535
+ marginInline: "0",
536
+ transitionProperty: "color, background-color, border-color, box-shadow",
537
+ transitionDuration: "100ms",
538
+ transitionTimingFunction: "linear",
539
+ borderWidth: odysseyTokens.BorderWidthMain,
540
+ borderStyle: odysseyTokens.BorderStyleMain,
541
+ borderRadius: odysseyTokens.BorderRadiusMain,
542
+ borderColor: "transparent",
543
+ fontSize: odysseyTokens.TypographySizeBody,
544
+ fontWeight: odysseyTokens.TypographyWeightHeading,
545
+ fontFamily: odysseyTokens.TypographyFamilyButton,
546
+ lineHeight: odysseyTokens.TypographyLineHeightUi,
547
+ whiteSpace: "nowrap",
548
+ [`.${buttonClasses.root} + &`]: {
549
+ marginInlineStart: odysseyTokens.Spacing2
597
550
  },
598
551
  "&:focus-visible": {
599
- boxShadow: `0 0 0 2px ${odysseyTokens.HueNeutralWhite}, 0 0 0 4px ${odysseyTokens.PaletteDangerMain}`
600
- },
601
- "&:active": {
602
- backgroundColor: odysseyTokens.PaletteDangerDarker
603
- },
604
- "&:disabled": {
605
- color: odysseyTokens.PaletteDangerLight,
606
- backgroundColor: odysseyTokens.HueRed100
607
- }
608
- }),
609
- ...(ownerState.variant === "dangerSecondary" && {
610
- backgroundColor: "transparent",
611
- borderColor: odysseyTokens.HueNeutral300,
612
- color: odysseyTokens.PaletteDangerMain,
613
- "&:hover": {
614
- backgroundColor: odysseyTokens.HueNeutral100,
615
- color: odysseyTokens.PaletteDangerMain
616
- },
617
- "&:active": {
618
- backgroundColor: "transparent",
619
- borderColor: odysseyTokens.PaletteDangerMain,
620
- color: odysseyTokens.PaletteDangerMain
621
- },
622
- "&:disabled": {
623
- backgroundColor: "transparent",
624
- borderColor: odysseyTokens.PaletteDangerLight,
625
- color: odysseyTokens.PaletteDangerLight
626
- }
627
- }),
628
- ...(ownerState.variant === "floating" && {
629
- backgroundColor: "transparent",
630
- color: odysseyTokens.TypographyColorBody,
631
- "&:hover": {
632
- backgroundColor: odysseyTokens.HueNeutral100
633
- },
634
- "&:active": {
635
- backgroundColor: odysseyTokens.HueNeutral200
552
+ boxShadow: `0 0 0 2px ${odysseyTokens.HueNeutralWhite}, 0 0 0 4px ${odysseyTokens.PalettePrimaryMain}`,
553
+ outline: "2px solid transparent",
554
+ outlineOffset: "1px"
636
555
  },
637
556
  "&:disabled": {
638
- backgroundColor: "transparent",
639
- color: odysseyTokens.TypographyColorDisabled
640
- }
641
- }),
642
- ...(ownerState.variant === "floatingAction" && {
643
- backgroundColor: "transparent",
644
- color: odysseyTokens.TypographyColorAction,
645
- "&:hover": {
646
- backgroundColor: odysseyTokens.HueNeutral100
557
+ pointerEvents: "none"
647
558
  },
648
- "&:active": {
649
- backgroundColor: odysseyTokens.HueNeutral200
559
+ [`.${buttonClasses.startIcon}, .${buttonClasses.endIcon}`]: {
560
+ "& > *:nth-of-type(1)": {
561
+ fontSize: `${odysseyTokens.TypographyLineHeightUi}em`
562
+ }
650
563
  },
651
- "&:disabled": {
564
+ ...(ownerState.variant === "primary" && {
565
+ color: odysseyTokens.HueNeutralWhite,
566
+ backgroundColor: odysseyTokens.PalettePrimaryMain,
567
+ "&:hover": {
568
+ backgroundColor: odysseyTokens.PalettePrimaryDark
569
+ },
570
+ "&:active": {
571
+ backgroundColor: odysseyTokens.PalettePrimaryDarker
572
+ },
573
+ "&:disabled": {
574
+ color: odysseyTokens.PalettePrimaryLight,
575
+ backgroundColor: odysseyTokens.HueBlue100
576
+ }
577
+ }),
578
+ ...(ownerState.variant === "secondary" && {
652
579
  backgroundColor: "transparent",
653
- color: odysseyTokens.TypographyColorDisabled
654
- }
655
- }),
656
- ...(ownerState.size === "small" && {
657
- height: odysseyTokens.Spacing6,
658
- paddingBlock: odysseyTokens.Spacing2,
659
- paddingInline: odysseyTokens.Spacing3,
660
- fontSize: odysseyTokens.TypographySizeBody
661
- }),
662
- ...(ownerState.size === "large" && {
663
- height: odysseyTokens.Spacing8,
664
- paddingBlock: odysseyTokens.Spacing4,
665
- paddingInline: odysseyTokens.Spacing4
666
- }),
667
- ...(ownerState.fullWidth === true && {
668
- width: "100%",
669
- marginBlock: "0",
670
- marginInline: "0",
671
- "&:not(:last-child)": {
672
- marginBlockEnd: odysseyTokens.Spacing4
673
- }
674
- }),
675
- ...(ownerState.children === "" && {
676
- minWidth: "auto",
677
- padding: odysseyTokens.Spacing3,
678
- [`.${buttonClasses.endIcon}, .${buttonClasses.startIcon}`]: {
679
- margin: "0"
680
- },
681
- ...(ownerState.size === "large" && {
682
- padding: odysseyTokens.Spacing4
580
+ borderColor: odysseyTokens.HueNeutral300,
581
+ color: odysseyTokens.TypographyColorBody,
582
+ "&:hover": {
583
+ backgroundColor: odysseyTokens.HueNeutral100
584
+ },
585
+ "&:active": {
586
+ backgroundColor: "transparent",
587
+ borderColor: odysseyTokens.BorderColorPrimaryControl,
588
+ color: odysseyTokens.TypographyColorAction
589
+ },
590
+ "&:disabled": {
591
+ ...(contrastMode === "lowContrast" && {
592
+ backgroundColor: odysseyTokens.HueNeutral200,
593
+ borderColor: "transparent",
594
+ color: odysseyTokens.TypographyColorDisabled
595
+ }),
596
+ ...(contrastMode === "highContrast" && {
597
+ backgroundColor: odysseyTokens.HueNeutral100,
598
+ borderColor: "transparent",
599
+ color: odysseyTokens.TypographyColorDisabled
600
+ })
601
+ }
683
602
  }),
684
- ...(ownerState.size === "small" && {
685
- padding: odysseyTokens.Spacing2
603
+ ...(ownerState.variant === "danger" && {
604
+ backgroundColor: odysseyTokens.PaletteDangerMain,
605
+ color: odysseyTokens.HueNeutralWhite,
606
+ "&:hover": {
607
+ backgroundColor: odysseyTokens.PaletteDangerDark
608
+ },
609
+ "&:focus-visible": {
610
+ boxShadow: `0 0 0 2px ${odysseyTokens.HueNeutralWhite}, 0 0 0 4px ${odysseyTokens.PaletteDangerMain}`
611
+ },
612
+ "&:active": {
613
+ backgroundColor: odysseyTokens.PaletteDangerDarker
614
+ },
615
+ "&:disabled": {
616
+ color: odysseyTokens.PaletteDangerLight,
617
+ backgroundColor: odysseyTokens.HueRed100
618
+ }
686
619
  }),
687
- ...(ownerState.size === "large" && {
688
- padding: odysseyTokens.Spacing4
620
+ ...(ownerState.variant === "dangerSecondary" && {
621
+ backgroundColor: "transparent",
622
+ borderColor: odysseyTokens.HueNeutral300,
623
+ color: odysseyTokens.PaletteDangerMain,
624
+ "&:hover": {
625
+ backgroundColor: odysseyTokens.HueNeutral100,
626
+ color: odysseyTokens.PaletteDangerMain
627
+ },
628
+ "&:active": {
629
+ backgroundColor: "transparent",
630
+ borderColor: odysseyTokens.PaletteDangerMain,
631
+ color: odysseyTokens.PaletteDangerMain
632
+ },
633
+ "&:disabled": {
634
+ backgroundColor: "transparent",
635
+ borderColor: odysseyTokens.PaletteDangerLight,
636
+ color: odysseyTokens.PaletteDangerLight
637
+ }
638
+ }),
639
+ ...(ownerState.variant === "floating" && {
640
+ backgroundColor: "transparent",
641
+ color: odysseyTokens.TypographyColorBody,
642
+ "&:hover": {
643
+ backgroundColor: odysseyTokens.HueNeutral100
644
+ },
645
+ "&:active": {
646
+ backgroundColor: odysseyTokens.HueNeutral200
647
+ },
648
+ "&:disabled": {
649
+ backgroundColor: "transparent",
650
+ color: odysseyTokens.TypographyColorDisabled
651
+ }
689
652
  })
690
- })
691
- }),
653
+ };
654
+ },
692
655
  endIcon: ({
693
656
  ownerState
694
657
  }) => ({
@@ -883,117 +846,151 @@ export const components = ({
883
846
  },
884
847
  styleOverrides: {
885
848
  root: ({
886
- ownerState
887
- }) => ({
888
- height: "auto",
889
- paddingBlock: `calc(${odysseyTokens.Spacing2} - ${odysseyTokens.BorderWidthMain})`,
890
- paddingInline: odysseyTokens.Spacing3,
891
- fontSize: odysseyTokens.TypographySizeBody,
892
- lineHeight: odysseyTokens.TypographyLineHeightUi,
893
- borderRadius: odysseyTokens.BorderRadiusRound,
894
- backgroundColor: odysseyTokens.HueNeutral100,
895
- borderWidth: odysseyTokens.BorderWidthMain,
896
- borderColor: odysseyTokens.HueNeutral200,
897
- borderStyle: odysseyTokens.BorderStyleMain,
898
- color: odysseyTokens.HueNeutral700,
899
- ...(ownerState.onDelete && {
900
- paddingInlineEnd: odysseyTokens.Spacing2
901
- }),
902
- [`&.${chipClasses.disabled}`]: {
903
- opacity: 1,
904
- pointerEvents: "none",
905
- borderColor: odysseyTokens.BorderColorDisabled,
906
- color: odysseyTokens.TypographyColorDisabled,
907
- [`& .${chipClasses.deleteIcon}`]: {
908
- color: odysseyTokens.HueNeutral300
909
- }
910
- },
911
- ...(ownerState.clickable && {
912
- "&:hover": {
913
- backgroundColor: odysseyTokens.HueNeutral200
914
- },
915
- [`&.${chipClasses.focusVisible}`]: {
916
- backgroundColor: odysseyTokens.HueNeutral200,
917
- outlineColor: odysseyTokens.FocusOutlineColorPrimary,
918
- outlineOffset: odysseyTokens.FocusOutlineOffsetTight,
919
- outlineStyle: odysseyTokens.FocusOutlineStyle,
920
- outlineWidth: odysseyTokens.FocusOutlineWidthMain
921
- },
922
- "&:active": {
923
- boxShadow: "none",
924
- backgroundColor: odysseyTokens.HueNeutral300
925
- }
926
- }),
927
- [`& .${chipClasses.icon}`]: {
928
- margin: 0,
929
- marginInlineEnd: odysseyTokens.Spacing1
930
- },
931
- ...(ownerState.variant === "lamp" && {
932
- paddingBlock: 0,
933
- paddingInline: 0,
934
- borderRadius: 0,
935
- border: 0,
936
- backgroundColor: "transparent",
937
- color: odysseyTokens.TypographyColorBody,
938
- "&::before": {
939
- content: "''",
940
- width: odysseyTokens.Spacing2,
941
- height: odysseyTokens.Spacing2,
942
- marginInlineEnd: odysseyTokens.Spacing2,
943
- borderRadius: "100%",
944
- backgroundColor: odysseyTokens.HueNeutral600
945
- },
946
- [`&.${chipClasses.colorError}`]: {
947
- "&::before": {
948
- border: 0,
949
- backgroundColor: odysseyTokens.PaletteDangerMain
849
+ ownerState,
850
+ theme
851
+ }) => {
852
+ const contrastMode = theme.odysseyContrastMode;
853
+ return {
854
+ height: "auto",
855
+ paddingBlock: `calc(${odysseyTokens.Spacing2} - ${odysseyTokens.BorderWidthMain})`,
856
+ paddingInline: odysseyTokens.Spacing3,
857
+ fontSize: odysseyTokens.TypographySizeBody,
858
+ lineHeight: odysseyTokens.TypographyLineHeightUi,
859
+ borderRadius: odysseyTokens.BorderRadiusRound,
860
+ backgroundColor: odysseyTokens.HueNeutral100,
861
+ borderWidth: odysseyTokens.BorderWidthMain,
862
+ borderColor: odysseyTokens.HueNeutral200,
863
+ borderStyle: odysseyTokens.BorderStyleMain,
864
+ color: odysseyTokens.HueNeutral700,
865
+ ...(ownerState.onDelete && {
866
+ paddingInlineEnd: odysseyTokens.Spacing2
867
+ }),
868
+ [`&.${chipClasses.disabled}`]: {
869
+ opacity: 1,
870
+ pointerEvents: "none",
871
+ borderColor: odysseyTokens.BorderColorDisabled,
872
+ color: odysseyTokens.TypographyColorDisabled,
873
+ [`& .${chipClasses.deleteIcon}`]: {
874
+ color: odysseyTokens.HueNeutral300
950
875
  }
951
876
  },
952
- [`&.${chipClasses.colorSuccess}`]: {
953
- "&::before": {
954
- border: 0,
955
- backgroundColor: odysseyTokens.PaletteSuccessMain
877
+ ...(ownerState.clickable && {
878
+ "&:hover": {
879
+ backgroundColor: odysseyTokens.HueNeutral200
880
+ },
881
+ [`&.${chipClasses.focusVisible}`]: {
882
+ backgroundColor: odysseyTokens.HueNeutral200,
883
+ outlineColor: odysseyTokens.FocusOutlineColorPrimary,
884
+ outlineOffset: odysseyTokens.FocusOutlineOffsetTight,
885
+ outlineStyle: odysseyTokens.FocusOutlineStyle,
886
+ outlineWidth: odysseyTokens.FocusOutlineWidthMain
887
+ },
888
+ "&:active": {
889
+ boxShadow: "none",
890
+ backgroundColor: odysseyTokens.HueNeutral300
956
891
  }
892
+ }),
893
+ [`& .${chipClasses.icon}`]: {
894
+ margin: 0,
895
+ marginInlineEnd: odysseyTokens.Spacing1
957
896
  },
958
- [`&.${chipClasses.colorWarning}`]: {
897
+ ...(ownerState.variant === "lamp" && {
898
+ paddingBlock: 0,
899
+ paddingInline: 0,
900
+ borderRadius: 0,
901
+ border: 0,
902
+ backgroundColor: "transparent",
903
+ color: odysseyTokens.TypographyColorBody,
959
904
  "&::before": {
960
- border: 0,
961
- backgroundColor: odysseyTokens.HueYellow200
905
+ content: "''",
906
+ width: odysseyTokens.Spacing2,
907
+ height: odysseyTokens.Spacing2,
908
+ marginInlineEnd: odysseyTokens.Spacing2,
909
+ borderRadius: "100%",
910
+ backgroundColor: odysseyTokens.HueNeutral600
911
+ },
912
+ [`&.${chipClasses.colorError}`]: {
913
+ "&::before": {
914
+ border: 0,
915
+ backgroundColor: odysseyTokens.PaletteDangerMain
916
+ }
917
+ },
918
+ [`&.${chipClasses.colorSuccess}`]: {
919
+ "&::before": {
920
+ border: 0,
921
+ backgroundColor: odysseyTokens.PaletteSuccessMain
922
+ }
923
+ },
924
+ [`&.${chipClasses.colorWarning}`]: {
925
+ "&::before": {
926
+ border: 0,
927
+ backgroundColor: odysseyTokens.HueYellow200
928
+ }
962
929
  }
930
+ }),
931
+ ...(ownerState.variant === "pill" && {
932
+ paddingBlock: odysseyTokens.Spacing1,
933
+ paddingInline: odysseyTokens.Spacing2,
934
+ borderRadius: odysseyTokens.BorderRadiusMain,
935
+ border: 0,
936
+ fontWeight: odysseyTokens.TypographyWeightHeadingBold,
937
+ lineHeight: odysseyTokens.TypographyLineHeightOverline,
938
+ fontSize: "0.71428571rem",
939
+ textTransform: "uppercase",
940
+ ...(contrastMode === "lowContrast" && {
941
+ backgroundColor: odysseyTokens.HueNeutral200,
942
+ color: odysseyTokens.HueNeutral700
943
+ }),
944
+ ...(contrastMode === "highContrast" && {
945
+ backgroundColor: odysseyTokens.HueNeutral50,
946
+ color: odysseyTokens.TypographyColorSubordinate
947
+ }),
948
+ [`&.${chipClasses.colorError}`]: {
949
+ ...(contrastMode === "lowContrast" && {
950
+ backgroundColor: odysseyTokens.HueRed100,
951
+ color: odysseyTokens.HueRed700
952
+ }),
953
+ ...(contrastMode === "highContrast" && {
954
+ backgroundColor: odysseyTokens.PaletteDangerLighter,
955
+ color: odysseyTokens.TypographyColorDanger
956
+ })
957
+ },
958
+ [`&.${chipClasses.colorInfo}`]: {
959
+ ...(contrastMode === "lowContrast" && {
960
+ backgroundColor: odysseyTokens.HueBlue100,
961
+ color: odysseyTokens.HueBlue700
962
+ }),
963
+ ...(contrastMode === "highContrast" && {
964
+ backgroundColor: odysseyTokens.PalettePrimaryLighter,
965
+ color: odysseyTokens.PalettePrimaryText
966
+ })
967
+ },
968
+ [`&.${chipClasses.colorSuccess}`]: {
969
+ ...(contrastMode === "lowContrast" && {
970
+ backgroundColor: odysseyTokens.HueGreen200,
971
+ color: odysseyTokens.HueGreen700
972
+ }),
973
+ ...(contrastMode === "highContrast" && {
974
+ backgroundColor: odysseyTokens.PaletteSuccessLighter,
975
+ color: odysseyTokens.TypographyColorSuccess
976
+ })
977
+ },
978
+ [`&.${chipClasses.colorWarning}`]: {
979
+ ...(contrastMode === "lowContrast" && {
980
+ backgroundColor: odysseyTokens.HueYellow100,
981
+ color: odysseyTokens.HueYellow700
982
+ }),
983
+ ...(contrastMode === "highContrast" && {
984
+ backgroundColor: odysseyTokens.PaletteWarningLighter,
985
+ color: odysseyTokens.TypographyColorWarning
986
+ })
987
+ }
988
+ }),
989
+ [`.${inputBaseClasses.root}.${inputBaseClasses.disabled} &`]: {
990
+ backgroundColor: odysseyTokens.HueNeutral200
963
991
  }
964
- }),
965
- ...(ownerState.variant === "pill" && {
966
- paddingBlock: odysseyTokens.Spacing1,
967
- paddingInline: odysseyTokens.Spacing2,
968
- borderRadius: odysseyTokens.BorderRadiusMain,
969
- border: 0,
970
- fontWeight: odysseyTokens.TypographyWeightHeadingBold,
971
- lineHeight: odysseyTokens.TypographyLineHeightOverline,
972
- backgroundColor: odysseyTokens.HueNeutral50,
973
- color: odysseyTokens.TypographyColorSubordinate,
974
- fontSize: "0.71428571rem",
975
- textTransform: "uppercase",
976
- [`&.${chipClasses.colorError}`]: {
977
- backgroundColor: odysseyTokens.PaletteDangerLighter,
978
- color: odysseyTokens.TypographyColorDanger
979
- },
980
- [`&.${chipClasses.colorInfo}`]: {
981
- backgroundColor: odysseyTokens.PalettePrimaryLighter,
982
- color: odysseyTokens.PalettePrimaryText
983
- },
984
- [`&.${chipClasses.colorSuccess}`]: {
985
- backgroundColor: odysseyTokens.PaletteSuccessLighter,
986
- color: odysseyTokens.TypographyColorSuccess
987
- },
988
- [`&.${chipClasses.colorWarning}`]: {
989
- backgroundColor: odysseyTokens.PaletteWarningLighter,
990
- color: odysseyTokens.TypographyColorWarning
991
- }
992
- }),
993
- [`.${inputBaseClasses.root}.${inputBaseClasses.disabled} &`]: {
994
- backgroundColor: odysseyTokens.HueNeutral200
995
- }
996
- }),
992
+ };
993
+ },
997
994
  label: {
998
995
  padding: 0,
999
996
  [`.${inputBaseClasses.root}.${inputBaseClasses.disabled} &`]: {
@@ -1559,24 +1556,18 @@ export const components = ({
1559
1556
  },
1560
1557
  styleOverrides: {
1561
1558
  root: {
1562
- display: "flex",
1563
- justifyContent: "flex-start",
1564
- alignItems: "center",
1565
1559
  fontSize: odysseyTokens.TypographySizeSubordinate,
1566
1560
  lineHeight: odysseyTokens.TypographyLineHeightBody,
1561
+ marginBlockEnd: odysseyTokens.Spacing2,
1567
1562
  marginBlockStart: odysseyTokens.Spacing1,
1563
+ textAlign: "start",
1568
1564
  [`.${formLabelClasses.root} + &`]: {
1569
1565
  marginBlockStart: `-${odysseyTokens.Spacing1}`,
1570
1566
  color: odysseyTokens.TypographyColorSubordinate
1571
1567
  },
1572
- marginBlockEnd: odysseyTokens.Spacing2,
1573
1568
  "&:last-child": {
1574
1569
  marginBlockEnd: 0
1575
1570
  },
1576
- textAlign: "start",
1577
- ".field-hint-link-component": {
1578
- marginInlineStart: odysseyTokens.Spacing1
1579
- },
1580
1571
  ".Mui-disabled &": {
1581
1572
  color: odysseyTokens.TypographyColorDisabled,
1582
1573
  a: {
@@ -2778,7 +2769,8 @@ export const components = ({
2778
2769
  subtitle1: "p",
2779
2770
  body1: "p",
2780
2771
  inherit: "p",
2781
- legend: "legend"
2772
+ legend: "legend",
2773
+ overline: "p"
2782
2774
  }
2783
2775
  },
2784
2776
  styleOverrides: {
@@ -2787,6 +2779,16 @@ export const components = ({
2787
2779
  [`&:last-child`]: {
2788
2780
  marginBlockEnd: 0
2789
2781
  }
2782
+ },
2783
+ overline: {
2784
+ fontSize: odysseyTokens.TypographySizeOverline,
2785
+ fontWeight: odysseyTokens.TypographyWeightBodyBold,
2786
+ lineHeight: odysseyTokens.TypographyLineHeightOverline,
2787
+ letterSpacing: odysseyTokens.TypographyLetterSpacingOverline,
2788
+ textTransform: "none",
2789
+ ":is(:lang(en-*), :lang(en))": {
2790
+ textTransform: "uppercase"
2791
+ }
2790
2792
  }
2791
2793
  }
2792
2794
  }