@okta/odyssey-react-mui 1.24.1 → 1.25.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 (41) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/dist/OdysseyProvider.js +20 -40
  3. package/dist/OdysseyProvider.js.map +1 -1
  4. package/dist/OdysseyThemeProvider.js +2 -1
  5. package/dist/OdysseyThemeProvider.js.map +1 -1
  6. package/dist/OdysseyTranslationProvider.types.js +1 -1
  7. package/dist/OdysseyTranslationProvider.types.js.map +1 -1
  8. package/dist/Select.js +10 -2
  9. package/dist/Select.js.map +1 -1
  10. package/dist/Tag.js +58 -23
  11. package/dist/Tag.js.map +1 -1
  12. package/dist/i18n.js +2 -0
  13. package/dist/i18n.js.map +1 -1
  14. package/dist/index.scss +1 -1
  15. package/dist/src/OdysseyProvider.d.ts +3 -5
  16. package/dist/src/OdysseyProvider.d.ts.map +1 -1
  17. package/dist/src/OdysseyThemeProvider.d.ts +8 -0
  18. package/dist/src/OdysseyThemeProvider.d.ts.map +1 -1
  19. package/dist/src/OdysseyTranslationProvider.types.d.ts +1 -1
  20. package/dist/src/OdysseyTranslationProvider.types.d.ts.map +1 -1
  21. package/dist/src/Select.d.ts.map +1 -1
  22. package/dist/src/Tag.d.ts.map +1 -1
  23. package/dist/src/i18n.d.ts.map +1 -1
  24. package/dist/src/theme/components.d.ts.map +1 -1
  25. package/dist/src/theme/createOdysseyMuiTheme.d.ts +2 -1
  26. package/dist/src/theme/createOdysseyMuiTheme.d.ts.map +1 -1
  27. package/dist/theme/components.js +7 -2
  28. package/dist/theme/components.js.map +1 -1
  29. package/dist/theme/createOdysseyMuiTheme.js +2 -0
  30. package/dist/theme/createOdysseyMuiTheme.js.map +1 -1
  31. package/dist/tsconfig.production.tsbuildinfo +1 -1
  32. package/jest.config.cjs +20 -1
  33. package/package.json +3 -3
  34. package/src/OdysseyProvider.tsx +27 -59
  35. package/src/OdysseyThemeProvider.tsx +10 -0
  36. package/src/OdysseyTranslationProvider.types.ts +1 -0
  37. package/src/Select.tsx +12 -3
  38. package/src/Tag.tsx +42 -6
  39. package/src/i18n.ts +2 -0
  40. package/src/theme/components.tsx +9 -2
  41. package/src/theme/createOdysseyMuiTheme.ts +3 -0
package/jest.config.cjs CHANGED
@@ -10,7 +10,26 @@
10
10
  * See the License for the specific language governing permissions and limitations under the License.
11
11
  */
12
12
 
13
- module.exports = {
13
+ /** @type { import("jest").Config } */
14
+ const jestConfig = {
15
+ collectCoverageFrom: ["src/**/*.{js,jsx,ts,tsx}"],
16
+ coveragePathIgnorePatterns: [
17
+ "/src/icons.generated/",
18
+ "/src/properties/",
19
+ "/node_modules/",
20
+ ],
21
+ coverageReporters: ["json", "html", "text", "text-summary"],
22
+ coverageThreshold: {
23
+ global: {
24
+ branches: 13.63,
25
+ functions: 17.41,
26
+ lines: 29.98,
27
+ statements: 29.91,
28
+ },
29
+ },
30
+ extensionsToTreatAsEsm: [".ts"],
14
31
  setupFilesAfterEnv: ["./jest.setup.js"],
15
32
  testEnvironment: "jsdom",
16
33
  };
34
+
35
+ module.exports = jestConfig;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@okta/odyssey-react-mui",
3
- "version": "1.24.1",
3
+ "version": "1.25.0",
4
4
  "description": "React MUI components for Odyssey, Okta's design system",
5
5
  "author": "Okta, Inc.",
6
6
  "license": "Apache-2.0",
@@ -58,7 +58,7 @@
58
58
  "@mui/system": "^5.15.9",
59
59
  "@mui/utils": "^5.15.9",
60
60
  "@mui/x-date-pickers": "^7.2.0",
61
- "@okta/odyssey-design-tokens": "^1.24.1",
61
+ "@okta/odyssey-design-tokens": "^1.25.0",
62
62
  "@types/luxon": "^3.4.2",
63
63
  "date-fns": "^2.30.0",
64
64
  "dom-accessibility-api": "^0.7.0",
@@ -73,5 +73,5 @@
73
73
  "react": "^18.2.0",
74
74
  "react-dom": "^18.2.0"
75
75
  },
76
- "gitHead": "8706464f0aa2e07b37fb33c16d848758ea56dfdd"
76
+ "gitHead": "d184ad44c7dc3a87359aae0cbc2282e5d28bd48c"
77
77
  }
@@ -10,9 +10,8 @@
10
10
  * See the License for the specific language governing permissions and limitations under the License.
11
11
  */
12
12
 
13
- import { memo, ReactNode, useMemo } from "react";
13
+ import { memo, ReactNode } from "react";
14
14
  import { ScopedCssBaseline } from "@mui/material";
15
-
16
15
  import {
17
16
  OdysseyCacheProvider,
18
17
  OdysseyCacheProviderProps,
@@ -26,26 +25,18 @@ import {
26
25
  OdysseyTranslationProviderProps,
27
26
  } from "./OdysseyTranslationProvider";
28
27
  import { DefaultSupportedLanguages } from "./OdysseyTranslationProvider.types";
29
- import {
30
- ContrastMode,
31
- ContrastModeProvider,
32
- useContrastContext,
33
- } from "./ContrastModeProvider";
34
28
 
35
29
  const scopedCssBaselineStyles = {
36
30
  height: "inherit",
37
31
  };
38
-
39
32
  export type OdysseyProviderProps<
40
33
  SupportedLanguages extends string = DefaultSupportedLanguages,
41
34
  > = OdysseyCacheProviderProps &
42
35
  OdysseyThemeProviderProps &
43
36
  OdysseyTranslationProviderProps<SupportedLanguages> & {
44
37
  children: ReactNode;
45
- contrastMode?: ContrastMode;
46
38
  };
47
-
48
- const OdysseyProviderInner = <SupportedLanguages extends string>({
39
+ const OdysseyProvider = <SupportedLanguages extends string>({
49
40
  children,
50
41
  designTokensOverride,
51
42
  emotionRoot,
@@ -57,53 +48,30 @@ const OdysseyProviderInner = <SupportedLanguages extends string>({
57
48
  stylisPlugins,
58
49
  themeOverride,
59
50
  translationOverrides,
60
- }: OdysseyProviderProps<SupportedLanguages>) => {
61
- const { contrastMode } = useContrastContext();
62
-
63
- const memoizedThemeProps = useMemo(
64
- () => ({
65
- ...themeOverride,
66
- odysseyContrastMode: contrastMode,
67
- }),
68
- [themeOverride, contrastMode],
69
- );
70
-
71
- return (
72
- <OdysseyCacheProvider
73
- emotionRoot={emotionRoot}
74
- emotionRootElement={emotionRootElement}
75
- hasShadowDom={Boolean(shadowRootElement || shadowDomElement)}
76
- nonce={nonce}
77
- stylisPlugins={stylisPlugins}
78
- >
79
- <OdysseyThemeProvider
80
- designTokensOverride={designTokensOverride}
81
- shadowDomElement={shadowDomElement}
82
- shadowRootElement={shadowRootElement}
83
- themeOverride={memoizedThemeProps}
84
- >
85
- <ScopedCssBaseline sx={scopedCssBaselineStyles}>
86
- <OdysseyTranslationProvider<SupportedLanguages>
87
- languageCode={languageCode}
88
- translationOverrides={translationOverrides}
89
- >
90
- {children}
91
- </OdysseyTranslationProvider>
92
- </ScopedCssBaseline>
93
- </OdysseyThemeProvider>
94
- </OdysseyCacheProvider>
95
- );
96
- };
97
-
98
- const OdysseyProvider = <SupportedLanguages extends string>({
99
- contrastMode,
100
- ...providerProps
101
51
  }: OdysseyProviderProps<SupportedLanguages>) => (
102
- <ContrastModeProvider contrastMode={contrastMode}>
103
- <OdysseyProviderInner {...providerProps} />
104
- </ContrastModeProvider>
52
+ <OdysseyCacheProvider
53
+ emotionRoot={emotionRoot}
54
+ emotionRootElement={emotionRootElement}
55
+ hasShadowDom={Boolean(shadowRootElement || shadowDomElement)}
56
+ nonce={nonce}
57
+ stylisPlugins={stylisPlugins}
58
+ >
59
+ <OdysseyThemeProvider
60
+ designTokensOverride={designTokensOverride}
61
+ shadowRootElement={shadowRootElement || shadowDomElement}
62
+ themeOverride={themeOverride}
63
+ >
64
+ {/* This component creates a div; for flexibility of layout of children, make it inherit its parent's height */}
65
+ <ScopedCssBaseline sx={scopedCssBaselineStyles}>
66
+ <OdysseyTranslationProvider<SupportedLanguages>
67
+ languageCode={languageCode}
68
+ translationOverrides={translationOverrides}
69
+ >
70
+ {children}
71
+ </OdysseyTranslationProvider>
72
+ </ScopedCssBaseline>
73
+ </OdysseyThemeProvider>
74
+ </OdysseyCacheProvider>
105
75
  );
106
-
107
- const MemoizedOdysseyProvider = memo(OdysseyProvider) as typeof OdysseyProvider;
108
-
109
- export { MemoizedOdysseyProvider as OdysseyProvider };
76
+ const MemoizedThemeProvider = memo(OdysseyProvider) as typeof OdysseyProvider;
77
+ export { MemoizedThemeProvider as OdysseyProvider };
@@ -31,6 +31,15 @@ export type OdysseyThemeProviderProps = {
31
31
  themeOverride?: ThemeOptions;
32
32
  };
33
33
 
34
+ declare module "@mui/material/styles" {
35
+ interface Theme {
36
+ contrastMode: string;
37
+ }
38
+ interface ThemeOptions {
39
+ contrastMode?: string;
40
+ }
41
+ }
42
+
34
43
  /**
35
44
  * This function doesn't include the Emotion Cache or Translations. You should probably be using `OdysseyProvider`.
36
45
  *
@@ -53,6 +62,7 @@ const OdysseyThemeProvider = ({
53
62
  createOdysseyMuiTheme({
54
63
  odysseyTokens,
55
64
  shadowRootElement: shadowRootElement || shadowDomElement,
65
+ contrastMode: "highContrast",
56
66
  }),
57
67
  [odysseyTokens, shadowDomElement, shadowRootElement],
58
68
  );
@@ -19,6 +19,7 @@ export const defaultSupportedLanguages = [
19
19
  "es", // Spanish
20
20
  "fi", // Finnish
21
21
  "fr", // French
22
+ "ht", // Haitian Creole
22
23
  "hu", // Hungarian
23
24
  "id", // Indonesian
24
25
  "it", // Italian
package/src/Select.tsx CHANGED
@@ -19,6 +19,7 @@ import {
19
19
  useState,
20
20
  useImperativeHandle,
21
21
  } from "react";
22
+ import styled from "@emotion/styled";
22
23
  import {
23
24
  Box as MuiBox,
24
25
  Checkbox as MuiCheckbox,
@@ -27,9 +28,10 @@ import {
27
28
  ListSubheader,
28
29
  MenuItem as MuiMenuItem,
29
30
  Select as MuiSelect,
31
+ SelectProps as MuiSelectProps,
30
32
  SelectChangeEvent,
31
33
  } from "@mui/material";
32
- import { SelectProps as MuiSelectProps } from "@mui/material";
34
+
33
35
  import { Field } from "./Field";
34
36
  import {
35
37
  FieldComponentProps,
@@ -43,13 +45,12 @@ import {
43
45
  useInputValues,
44
46
  getControlState,
45
47
  } from "./inputUtils";
46
- import { normalizedKey } from "./useNormalizedKey";
47
- import styled from "@emotion/styled";
48
48
  import {
49
49
  useOdysseyDesignTokens,
50
50
  DesignTokens,
51
51
  } from "./OdysseyDesignTokensContext";
52
52
  import { TestSelector } from "./test-selectors";
53
+ import { normalizedKey } from "./useNormalizedKey";
53
54
 
54
55
  export const SelectTestSelector = {
55
56
  accessibleText: {
@@ -508,6 +509,14 @@ const Select = <
508
509
  selectRef.current = el;
509
510
  }}
510
511
  labelId={labelElementId}
512
+ MenuProps={{
513
+ sx: {
514
+ ".MuiPaper-root": {
515
+ maxHeight: "50vh",
516
+ minHeight: "200px",
517
+ },
518
+ },
519
+ }}
511
520
  multiple={hasMultipleChoices}
512
521
  name={nameOverride ?? id}
513
522
  onBlur={onBlur}
package/src/Tag.tsx CHANGED
@@ -65,91 +65,115 @@ const getChipColors = (
65
65
  ...(contrastMode === "lowContrast" && {
66
66
  background: odysseyDesignTokens.HueNeutral200,
67
67
  text: odysseyDesignTokens.HueNeutral700,
68
+ textDisabled: odysseyDesignTokens.HueNeutral400,
68
69
  }),
69
70
  ...(contrastMode === "highContrast" && {
70
71
  background: odysseyDesignTokens.HueNeutral100,
71
72
  text: odysseyDesignTokens.HueNeutral700,
73
+ textDisabled: odysseyDesignTokens.HueNeutral300,
72
74
  }),
73
75
  hover: odysseyDesignTokens.HueNeutral200,
74
76
  active: odysseyDesignTokens.HueNeutral300,
75
77
  border: odysseyDesignTokens.HueNeutral200,
76
78
  deleteIcon: odysseyDesignTokens.HueNeutral500,
77
79
  deleteIconHover: odysseyDesignTokens.HueNeutral700,
80
+ icon: odysseyDesignTokens.HueNeutral700,
81
+ iconDisabled: odysseyDesignTokens.HueNeutral300,
78
82
  },
79
83
  info: {
80
84
  ...(contrastMode === "lowContrast" && {
81
85
  background: odysseyDesignTokens.HueBlue200,
82
86
  text: odysseyDesignTokens.HueBlue700,
87
+ textDisabled: odysseyDesignTokens.HueBlue400,
83
88
  }),
84
89
  ...(contrastMode === "highContrast" && {
85
90
  background: odysseyDesignTokens.HueBlue100,
86
91
  text: odysseyDesignTokens.HueBlue700,
92
+ textDisabled: odysseyDesignTokens.HueBlue300,
87
93
  }),
88
94
  hover: odysseyDesignTokens.HueBlue200,
89
95
  active: odysseyDesignTokens.HueBlue300,
90
96
  border: odysseyDesignTokens.HueBlue200,
91
97
  deleteIcon: odysseyDesignTokens.HueBlue500,
92
98
  deleteIconHover: odysseyDesignTokens.HueBlue700,
99
+ icon: odysseyDesignTokens.HueBlue700,
100
+ iconDisabled: odysseyDesignTokens.HueBlue300,
93
101
  },
94
102
  accentOne: {
95
103
  ...(contrastMode === "lowContrast" && {
96
104
  background: odysseyDesignTokens.HueAccentOne200,
97
105
  text: odysseyDesignTokens.HueAccentOne700,
106
+ textDisabled: odysseyDesignTokens.HueAccentOne400,
98
107
  }),
99
108
  ...(contrastMode === "highContrast" && {
100
109
  background: odysseyDesignTokens.HueAccentOne100,
101
110
  text: odysseyDesignTokens.HueAccentOne700,
111
+ textDisabled: odysseyDesignTokens.HueAccentOne300,
102
112
  }),
103
113
  hover: odysseyDesignTokens.HueAccentOne200,
104
114
  active: odysseyDesignTokens.HueAccentOne300,
105
115
  border: odysseyDesignTokens.HueAccentOne200,
106
116
  deleteIcon: odysseyDesignTokens.HueAccentOne500,
107
117
  deleteIconHover: odysseyDesignTokens.HueAccentOne700,
118
+ icon: odysseyDesignTokens.HueAccentOne700,
119
+ iconDisabled: odysseyDesignTokens.HueAccentOne300,
108
120
  },
109
121
  accentTwo: {
110
122
  ...(contrastMode === "lowContrast" && {
111
123
  background: odysseyDesignTokens.HueAccentTwo200,
112
124
  text: odysseyDesignTokens.HueAccentTwo800,
125
+ textDisabled: odysseyDesignTokens.HueAccentTwo400,
113
126
  }),
114
127
  ...(contrastMode === "highContrast" && {
115
128
  background: odysseyDesignTokens.HueAccentTwo100,
116
129
  text: odysseyDesignTokens.HueAccentTwo700,
130
+ textDisabled: odysseyDesignTokens.HueAccentTwo300,
117
131
  }),
118
132
  hover: odysseyDesignTokens.HueAccentTwo200,
119
133
  active: odysseyDesignTokens.HueAccentTwo300,
120
134
  border: odysseyDesignTokens.HueAccentTwo200,
121
135
  deleteIcon: odysseyDesignTokens.HueAccentTwo500,
122
136
  deleteIconHover: odysseyDesignTokens.HueAccentTwo700,
137
+ icon: odysseyDesignTokens.HueAccentTwo700,
138
+ iconDisabled: odysseyDesignTokens.HueAccentTwo300,
123
139
  },
124
140
  accentThree: {
125
141
  ...(contrastMode === "lowContrast" && {
126
142
  background: odysseyDesignTokens.HueAccentThree200,
127
143
  text: odysseyDesignTokens.HueAccentThree700,
144
+ textDisabled: odysseyDesignTokens.HueAccentThree400,
128
145
  }),
129
146
  ...(contrastMode === "highContrast" && {
130
147
  background: odysseyDesignTokens.HueAccentThree100,
131
148
  text: odysseyDesignTokens.HueAccentThree700,
149
+ textDisabled: odysseyDesignTokens.HueAccentThree300,
132
150
  }),
133
151
  hover: odysseyDesignTokens.HueAccentThree200,
134
152
  active: odysseyDesignTokens.HueAccentThree300,
135
153
  border: odysseyDesignTokens.HueAccentThree200,
136
154
  deleteIcon: odysseyDesignTokens.HueAccentThree500,
137
155
  deleteIconHover: odysseyDesignTokens.HueAccentThree700,
156
+ icon: odysseyDesignTokens.HueAccentThree700,
157
+ iconDisabled: odysseyDesignTokens.HueAccentThree300,
138
158
  },
139
159
  accentFour: {
140
160
  ...(contrastMode === "lowContrast" && {
141
161
  background: odysseyDesignTokens.HueAccentFour200,
142
162
  text: odysseyDesignTokens.HueAccentFour700,
163
+ textDisabled: odysseyDesignTokens.HueAccentFour400,
143
164
  }),
144
165
  ...(contrastMode === "highContrast" && {
145
166
  background: odysseyDesignTokens.HueAccentFour100,
146
167
  text: odysseyDesignTokens.HueAccentFour700,
168
+ textDisabled: odysseyDesignTokens.HueAccentFour300,
147
169
  }),
148
170
  hover: odysseyDesignTokens.HueAccentFour200,
149
171
  active: odysseyDesignTokens.HueAccentFour300,
150
172
  border: odysseyDesignTokens.HueAccentFour200,
151
173
  deleteIcon: odysseyDesignTokens.HueAccentFour500,
152
174
  deleteIconHover: odysseyDesignTokens.HueAccentFour700,
175
+ icon: odysseyDesignTokens.HueAccentFour700,
176
+ iconDisabled: odysseyDesignTokens.HueAccentFour300,
153
177
  },
154
178
  };
155
179
 
@@ -166,13 +190,21 @@ const StyledTag = styled(MuiChip, {
166
190
  contrastMode: ContrastMode;
167
191
  odysseyDesignTokens: DesignTokens;
168
192
  as?: React.ElementType; // Allow the 'as' prop to be forwarded
169
- }>(({ colorVariant, contrastMode, odysseyDesignTokens }) => {
193
+ clickable?: boolean;
194
+ }>(({ colorVariant, contrastMode, odysseyDesignTokens, clickable }) => {
170
195
  const colors = getChipColors(colorVariant, odysseyDesignTokens, contrastMode);
171
196
 
172
197
  return {
173
198
  backgroundColor: colors.background,
174
199
  color: colors.text,
175
- borderColor: colors.border,
200
+
201
+ ...(clickable === true && {
202
+ borderColor: colors.border,
203
+ }),
204
+
205
+ ...(clickable === false && {
206
+ borderColor: "transparent",
207
+ }),
176
208
 
177
209
  "&.MuiChip-clickable:hover": {
178
210
  backgroundColor: colors.hover,
@@ -183,14 +215,18 @@ const StyledTag = styled(MuiChip, {
183
215
  },
184
216
 
185
217
  "&.Mui-disabled": {
186
- "& .MuiChip-deleteIcon": {
187
- color: odysseyDesignTokens.HueNeutral300,
218
+ color: colors.textDisabled,
219
+ borderColor: colors.border,
220
+ "& .MuiChip-icon, & .MuiChip-deleteIcon": {
221
+ color: colors.iconDisabled,
188
222
  },
189
223
  },
190
224
 
225
+ "& .MuiChip-icon": {
226
+ color: colors.icon,
227
+ },
191
228
  "& .MuiChip-deleteIcon": {
192
229
  color: colors.deleteIcon,
193
-
194
230
  "&:hover": {
195
231
  color: colors.deleteIconHover,
196
232
  },
@@ -222,7 +258,7 @@ const Tag = ({
222
258
  data-se={testId}
223
259
  colorVariant={colorVariant}
224
260
  odysseyDesignTokens={odysseyDesignTokens}
225
- contrastMode={contrastMode}
261
+ contrastMode="highContrast"
226
262
  disabled={isDisabled}
227
263
  icon={icon}
228
264
  label={label}
package/src/i18n.ts CHANGED
@@ -21,6 +21,7 @@ import { translation as en } from "./properties/ts/odyssey-react-mui";
21
21
  import { translation as es } from "./properties/ts/odyssey-react-mui_es";
22
22
  import { translation as fi } from "./properties/ts/odyssey-react-mui_fi";
23
23
  import { translation as fr } from "./properties/ts/odyssey-react-mui_fr";
24
+ import { translation as ht } from "./properties/ts/odyssey-react-mui_ht";
24
25
  import { translation as hu } from "./properties/ts/odyssey-react-mui_hu";
25
26
  import { translation as id } from "./properties/ts/odyssey-react-mui_id";
26
27
  import { translation as it } from "./properties/ts/odyssey-react-mui_it";
@@ -57,6 +58,7 @@ export const resources: I18nResources = {
57
58
  es,
58
59
  fi,
59
60
  fr,
61
+ ht,
60
62
  hu,
61
63
  id,
62
64
  it,
@@ -578,7 +578,7 @@ export const components = ({
578
578
  },
579
579
  styleOverrides: {
580
580
  root: ({ ownerState, theme }) => {
581
- const contrastMode = theme.odysseyContrastMode;
581
+ const contrastMode = theme.contrastMode;
582
582
 
583
583
  return {
584
584
  minWidth: "unset",
@@ -1030,7 +1030,8 @@ export const components = ({
1030
1030
  },
1031
1031
  styleOverrides: {
1032
1032
  root: ({ ownerState, theme }) => {
1033
- const contrastMode = theme.odysseyContrastMode;
1033
+ const contrastMode = theme.contrastMode;
1034
+
1034
1035
  return {
1035
1036
  height: "auto",
1036
1037
  paddingBlock: `calc(${odysseyTokens.Spacing2} - ${odysseyTokens.BorderWidthMain})`,
@@ -1057,6 +1058,10 @@ export const components = ({
1057
1058
  [`& .${chipClasses.deleteIcon}`]: {
1058
1059
  color: odysseyTokens.HueNeutral300,
1059
1060
  },
1061
+
1062
+ [`& .${chipClasses.icon}`]: {
1063
+ color: odysseyTokens.HueNeutral300,
1064
+ },
1060
1065
  },
1061
1066
 
1062
1067
  ...(ownerState.clickable && {
@@ -2191,9 +2196,11 @@ export const components = ({
2191
2196
  root: ({ ownerState }) => ({
2192
2197
  gap: odysseyTokens.Spacing2,
2193
2198
  minHeight: "unset",
2199
+ maxWidth: `calc(55ch - ${odysseyTokens.Spacing4})`,
2194
2200
  paddingBlock: odysseyTokens.Spacing3,
2195
2201
  paddingInline: odysseyTokens.Spacing4,
2196
2202
  borderRadius: odysseyTokens.BorderRadiusMain,
2203
+ whiteSpace: "normal",
2197
2204
 
2198
2205
  [`& .${formControlLabelClasses.root}`]: {
2199
2206
  gap: "unset",
@@ -28,10 +28,12 @@ export type DesignTokens = typeof Tokens;
28
28
  export type DesignTokensOverride = Partial<typeof Tokens>;
29
29
 
30
30
  export const createOdysseyMuiTheme = ({
31
+ contrastMode = "highContrast",
31
32
  odysseyTokens,
32
33
  shadowDomElement,
33
34
  shadowRootElement,
34
35
  }: {
36
+ contrastMode?: string;
35
37
  odysseyTokens: DesignTokens;
36
38
  /** @deprecated Use `shadowRootElement` */
37
39
  shadowDomElement?: HTMLElement;
@@ -42,6 +44,7 @@ export const createOdysseyMuiTheme = ({
42
44
  odysseyTokens,
43
45
  shadowRootElement: shadowRootElement || shadowDomElement,
44
46
  }),
47
+ contrastMode,
45
48
  mixins: mixins({ odysseyTokens }),
46
49
  palette: palette({ odysseyTokens }),
47
50
  shape: shape({ odysseyTokens }),