@okta/odyssey-react-mui 0.14.2 → 0.14.5

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 (247) hide show
  1. package/.svgrrc.cjs +13 -0
  2. package/CHANGELOG.md +37 -0
  3. package/README.md +29 -0
  4. package/dist/components/Icon/Add.d.ts +16 -0
  5. package/dist/components/Icon/Add.d.ts.map +1 -0
  6. package/dist/components/Icon/Add.js +34 -0
  7. package/dist/components/Icon/Add.js.map +1 -0
  8. package/dist/components/Icon/AddCircle.d.ts +16 -0
  9. package/dist/components/Icon/AddCircle.d.ts.map +1 -0
  10. package/dist/components/Icon/AddCircle.js +34 -0
  11. package/dist/components/Icon/AddCircle.js.map +1 -0
  12. package/dist/components/Icon/AlertCircle.d.ts +16 -0
  13. package/dist/components/Icon/AlertCircle.d.ts.map +1 -0
  14. package/dist/components/Icon/AlertCircle.js +34 -0
  15. package/dist/components/Icon/AlertCircle.js.map +1 -0
  16. package/dist/components/Icon/AlertCircleFilled.d.ts +16 -0
  17. package/dist/components/Icon/AlertCircleFilled.d.ts.map +1 -0
  18. package/dist/components/Icon/AlertCircleFilled.js +34 -0
  19. package/dist/components/Icon/AlertCircleFilled.js.map +1 -0
  20. package/dist/components/Icon/AlertTriangleFilled.d.ts +16 -0
  21. package/dist/components/Icon/AlertTriangleFilled.d.ts.map +1 -0
  22. package/dist/components/Icon/AlertTriangleFilled.js +34 -0
  23. package/dist/components/Icon/AlertTriangleFilled.js.map +1 -0
  24. package/dist/components/Icon/Anchor.d.ts +16 -0
  25. package/dist/components/Icon/Anchor.d.ts.map +1 -0
  26. package/dist/components/Icon/Anchor.js +36 -0
  27. package/dist/components/Icon/Anchor.js.map +1 -0
  28. package/dist/components/Icon/ArrowDown.d.ts +16 -0
  29. package/dist/components/Icon/ArrowDown.d.ts.map +1 -0
  30. package/dist/components/Icon/ArrowDown.js +34 -0
  31. package/dist/components/Icon/ArrowDown.js.map +1 -0
  32. package/dist/components/Icon/ArrowLeft.d.ts +16 -0
  33. package/dist/components/Icon/ArrowLeft.d.ts.map +1 -0
  34. package/dist/components/Icon/ArrowLeft.js +34 -0
  35. package/dist/components/Icon/ArrowLeft.js.map +1 -0
  36. package/dist/components/Icon/ArrowRight.d.ts +16 -0
  37. package/dist/components/Icon/ArrowRight.d.ts.map +1 -0
  38. package/dist/components/Icon/ArrowRight.js +34 -0
  39. package/dist/components/Icon/ArrowRight.js.map +1 -0
  40. package/dist/components/Icon/ArrowUp.d.ts +16 -0
  41. package/dist/components/Icon/ArrowUp.d.ts.map +1 -0
  42. package/dist/components/Icon/ArrowUp.js +34 -0
  43. package/dist/components/Icon/ArrowUp.js.map +1 -0
  44. package/dist/components/Icon/Calendar.d.ts +16 -0
  45. package/dist/components/Icon/Calendar.d.ts.map +1 -0
  46. package/dist/components/Icon/Calendar.js +34 -0
  47. package/dist/components/Icon/Calendar.js.map +1 -0
  48. package/dist/components/Icon/Check.d.ts +16 -0
  49. package/dist/components/Icon/Check.d.ts.map +1 -0
  50. package/dist/components/Icon/Check.js +34 -0
  51. package/dist/components/Icon/Check.js.map +1 -0
  52. package/dist/components/Icon/CheckCircleFilled.d.ts +16 -0
  53. package/dist/components/Icon/CheckCircleFilled.d.ts.map +1 -0
  54. package/dist/components/Icon/CheckCircleFilled.js +34 -0
  55. package/dist/components/Icon/CheckCircleFilled.js.map +1 -0
  56. package/dist/components/Icon/ChevronDown.d.ts +16 -0
  57. package/dist/components/Icon/ChevronDown.d.ts.map +1 -0
  58. package/dist/components/Icon/ChevronDown.js +34 -0
  59. package/dist/components/Icon/ChevronDown.js.map +1 -0
  60. package/dist/components/Icon/ChevronUp.d.ts +16 -0
  61. package/dist/components/Icon/ChevronUp.d.ts.map +1 -0
  62. package/dist/components/Icon/ChevronUp.js +34 -0
  63. package/dist/components/Icon/ChevronUp.js.map +1 -0
  64. package/dist/components/Icon/Close.d.ts +16 -0
  65. package/dist/components/Icon/Close.d.ts.map +1 -0
  66. package/dist/components/Icon/Close.js +34 -0
  67. package/dist/components/Icon/Close.js.map +1 -0
  68. package/dist/components/Icon/CloseCircleFilled.d.ts +16 -0
  69. package/dist/components/Icon/CloseCircleFilled.d.ts.map +1 -0
  70. package/dist/components/Icon/CloseCircleFilled.js +34 -0
  71. package/dist/components/Icon/CloseCircleFilled.js.map +1 -0
  72. package/dist/components/Icon/Copy.d.ts +16 -0
  73. package/dist/components/Icon/Copy.d.ts.map +1 -0
  74. package/dist/components/Icon/Copy.js +34 -0
  75. package/dist/components/Icon/Copy.js.map +1 -0
  76. package/dist/components/Icon/Delete.d.ts +16 -0
  77. package/dist/components/Icon/Delete.d.ts.map +1 -0
  78. package/dist/components/Icon/Delete.js +34 -0
  79. package/dist/components/Icon/Delete.js.map +1 -0
  80. package/dist/components/Icon/Download.d.ts +16 -0
  81. package/dist/components/Icon/Download.d.ts.map +1 -0
  82. package/dist/components/Icon/Download.js +34 -0
  83. package/dist/components/Icon/Download.js.map +1 -0
  84. package/dist/components/Icon/DragHandle.d.ts +16 -0
  85. package/dist/components/Icon/DragHandle.d.ts.map +1 -0
  86. package/dist/components/Icon/DragHandle.js +34 -0
  87. package/dist/components/Icon/DragHandle.js.map +1 -0
  88. package/dist/components/Icon/Edit.d.ts +16 -0
  89. package/dist/components/Icon/Edit.d.ts.map +1 -0
  90. package/dist/components/Icon/Edit.js +34 -0
  91. package/dist/components/Icon/Edit.js.map +1 -0
  92. package/dist/components/Icon/ExternalLink.d.ts +16 -0
  93. package/dist/components/Icon/ExternalLink.d.ts.map +1 -0
  94. package/dist/components/Icon/ExternalLink.js +34 -0
  95. package/dist/components/Icon/ExternalLink.js.map +1 -0
  96. package/dist/components/Icon/Eye.d.ts +16 -0
  97. package/dist/components/Icon/Eye.d.ts.map +1 -0
  98. package/dist/components/Icon/Eye.js +34 -0
  99. package/dist/components/Icon/Eye.js.map +1 -0
  100. package/dist/components/Icon/EyeOff.d.ts +16 -0
  101. package/dist/components/Icon/EyeOff.d.ts.map +1 -0
  102. package/dist/components/Icon/EyeOff.js +34 -0
  103. package/dist/components/Icon/EyeOff.js.map +1 -0
  104. package/dist/components/Icon/Filter.d.ts +16 -0
  105. package/dist/components/Icon/Filter.d.ts.map +1 -0
  106. package/dist/components/Icon/Filter.js +34 -0
  107. package/dist/components/Icon/Filter.js.map +1 -0
  108. package/dist/components/Icon/Globe.d.ts +16 -0
  109. package/dist/components/Icon/Globe.d.ts.map +1 -0
  110. package/dist/components/Icon/Globe.js +34 -0
  111. package/dist/components/Icon/Globe.js.map +1 -0
  112. package/dist/components/Icon/Home.d.ts +16 -0
  113. package/dist/components/Icon/Home.d.ts.map +1 -0
  114. package/dist/components/Icon/Home.js +34 -0
  115. package/dist/components/Icon/Home.js.map +1 -0
  116. package/dist/components/Icon/Icon.d.ts +28 -0
  117. package/dist/components/Icon/Icon.d.ts.map +1 -0
  118. package/dist/components/Icon/Icon.js +29 -0
  119. package/dist/components/Icon/Icon.js.map +1 -0
  120. package/dist/components/Icon/InformationCircle.d.ts +16 -0
  121. package/dist/components/Icon/InformationCircle.d.ts.map +1 -0
  122. package/dist/components/Icon/InformationCircle.js +34 -0
  123. package/dist/components/Icon/InformationCircle.js.map +1 -0
  124. package/dist/components/Icon/InformationCircleFilled.d.ts +16 -0
  125. package/dist/components/Icon/InformationCircleFilled.d.ts.map +1 -0
  126. package/dist/components/Icon/InformationCircleFilled.js +34 -0
  127. package/dist/components/Icon/InformationCircleFilled.js.map +1 -0
  128. package/dist/components/Icon/Notification.d.ts +16 -0
  129. package/dist/components/Icon/Notification.d.ts.map +1 -0
  130. package/dist/components/Icon/Notification.js +34 -0
  131. package/dist/components/Icon/Notification.js.map +1 -0
  132. package/dist/components/Icon/OverflowVertical.d.ts +16 -0
  133. package/dist/components/Icon/OverflowVertical.d.ts.map +1 -0
  134. package/dist/components/Icon/OverflowVertical.js +34 -0
  135. package/dist/components/Icon/OverflowVertical.js.map +1 -0
  136. package/dist/components/Icon/QuestionCircle.d.ts +16 -0
  137. package/dist/components/Icon/QuestionCircle.d.ts.map +1 -0
  138. package/dist/components/Icon/QuestionCircle.js +34 -0
  139. package/dist/components/Icon/QuestionCircle.js.map +1 -0
  140. package/dist/components/Icon/QuestionCircleFilled.d.ts +16 -0
  141. package/dist/components/Icon/QuestionCircleFilled.d.ts.map +1 -0
  142. package/dist/components/Icon/QuestionCircleFilled.js +34 -0
  143. package/dist/components/Icon/QuestionCircleFilled.js.map +1 -0
  144. package/dist/components/Icon/Search.d.ts +16 -0
  145. package/dist/components/Icon/Search.d.ts.map +1 -0
  146. package/dist/components/Icon/Search.js +34 -0
  147. package/dist/components/Icon/Search.js.map +1 -0
  148. package/dist/components/Icon/Settings.d.ts +16 -0
  149. package/dist/components/Icon/Settings.d.ts.map +1 -0
  150. package/dist/components/Icon/Settings.js +32 -0
  151. package/dist/components/Icon/Settings.js.map +1 -0
  152. package/dist/components/Icon/Subtract.d.ts +16 -0
  153. package/dist/components/Icon/Subtract.d.ts.map +1 -0
  154. package/dist/components/Icon/Subtract.js +34 -0
  155. package/dist/components/Icon/Subtract.js.map +1 -0
  156. package/dist/components/Icon/SvgIcon.d.ts +14 -0
  157. package/dist/components/Icon/SvgIcon.d.ts.map +1 -0
  158. package/dist/components/Icon/SvgIcon.js +14 -0
  159. package/dist/components/Icon/SvgIcon.js.map +1 -0
  160. package/dist/components/Icon/User.d.ts +16 -0
  161. package/dist/components/Icon/User.d.ts.map +1 -0
  162. package/dist/components/Icon/User.js +34 -0
  163. package/dist/components/Icon/User.js.map +1 -0
  164. package/dist/components/Icon/index.d.ts +91 -0
  165. package/dist/components/Icon/index.d.ts.map +1 -0
  166. package/dist/components/Icon/index.js +129 -0
  167. package/dist/components/Icon/index.js.map +1 -0
  168. package/dist/components/Icon/types.d.ts +19 -0
  169. package/dist/components/Icon/types.d.ts.map +1 -0
  170. package/dist/components/Icon/types.js +2 -0
  171. package/dist/components/Icon/types.js.map +1 -0
  172. package/dist/components/index.d.ts +1 -0
  173. package/dist/components/index.d.ts.map +1 -1
  174. package/dist/components/index.js +1 -0
  175. package/dist/components/index.js.map +1 -1
  176. package/dist/themes/odyssey/components.d.ts.map +1 -1
  177. package/dist/themes/odyssey/components.js +310 -102
  178. package/dist/themes/odyssey/components.js.map +1 -1
  179. package/dist/themes/odyssey/components.types.d.ts +1 -0
  180. package/dist/themes/odyssey/components.types.d.ts.map +1 -1
  181. package/dist/themes/odyssey/components.types.js.map +1 -1
  182. package/dist/themes/odyssey/mixins.d.ts +14 -0
  183. package/dist/themes/odyssey/mixins.d.ts.map +1 -0
  184. package/dist/themes/odyssey/mixins.js +17 -0
  185. package/dist/themes/odyssey/mixins.js.map +1 -0
  186. package/dist/themes/odyssey/mixins.types.d.ts +23 -0
  187. package/dist/themes/odyssey/mixins.types.d.ts.map +1 -0
  188. package/dist/themes/odyssey/mixins.types.js +13 -0
  189. package/dist/themes/odyssey/mixins.types.js.map +1 -0
  190. package/dist/themes/odyssey/palette.js +9 -9
  191. package/dist/themes/odyssey/palette.js.map +1 -1
  192. package/dist/themes/odyssey/theme.d.ts +1 -0
  193. package/dist/themes/odyssey/theme.d.ts.map +1 -1
  194. package/dist/themes/odyssey/theme.js +3 -0
  195. package/dist/themes/odyssey/theme.js.map +1 -1
  196. package/package.json +5 -4
  197. package/scripts/resolveIconSrcPath.cjs +20 -0
  198. package/src/components/Icon/Add.tsx +42 -0
  199. package/src/components/Icon/AddCircle.tsx +44 -0
  200. package/src/components/Icon/AlertCircle.tsx +44 -0
  201. package/src/components/Icon/AlertCircleFilled.tsx +45 -0
  202. package/src/components/Icon/AlertTriangleFilled.tsx +45 -0
  203. package/src/components/Icon/Anchor.tsx +46 -0
  204. package/src/components/Icon/ArrowDown.tsx +44 -0
  205. package/src/components/Icon/ArrowLeft.tsx +44 -0
  206. package/src/components/Icon/ArrowRight.tsx +44 -0
  207. package/src/components/Icon/ArrowUp.tsx +44 -0
  208. package/src/components/Icon/Calendar.tsx +44 -0
  209. package/src/components/Icon/Check.tsx +44 -0
  210. package/src/components/Icon/CheckCircleFilled.tsx +45 -0
  211. package/src/components/Icon/ChevronDown.tsx +44 -0
  212. package/src/components/Icon/ChevronUp.tsx +44 -0
  213. package/src/components/Icon/Close.tsx +44 -0
  214. package/src/components/Icon/CloseCircleFilled.tsx +45 -0
  215. package/src/components/Icon/Copy.tsx +44 -0
  216. package/src/components/Icon/Delete.tsx +44 -0
  217. package/src/components/Icon/Download.tsx +44 -0
  218. package/src/components/Icon/DragHandle.tsx +44 -0
  219. package/src/components/Icon/Edit.tsx +44 -0
  220. package/src/components/Icon/ExternalLink.tsx +45 -0
  221. package/src/components/Icon/Eye.tsx +42 -0
  222. package/src/components/Icon/EyeOff.tsx +44 -0
  223. package/src/components/Icon/Filter.tsx +44 -0
  224. package/src/components/Icon/Globe.tsx +44 -0
  225. package/src/components/Icon/Home.tsx +44 -0
  226. package/src/components/Icon/Icon.test.tsx +51 -0
  227. package/src/components/Icon/Icon.tsx +40 -0
  228. package/src/components/Icon/InformationCircle.tsx +45 -0
  229. package/src/components/Icon/InformationCircleFilled.tsx +45 -0
  230. package/src/components/Icon/Notification.tsx +45 -0
  231. package/src/components/Icon/OverflowVertical.tsx +45 -0
  232. package/src/components/Icon/QuestionCircle.tsx +45 -0
  233. package/src/components/Icon/QuestionCircleFilled.tsx +45 -0
  234. package/src/components/Icon/Search.tsx +44 -0
  235. package/src/components/Icon/Settings.tsx +42 -0
  236. package/src/components/Icon/Subtract.tsx +44 -0
  237. package/src/components/Icon/SvgIcon.ts +14 -0
  238. package/src/components/Icon/User.tsx +44 -0
  239. package/src/components/Icon/index.tsx +170 -0
  240. package/src/components/Icon/types.ts +20 -0
  241. package/src/components/index.ts +1 -0
  242. package/src/themes/odyssey/components.ts +270 -105
  243. package/src/themes/odyssey/components.types.ts +1 -0
  244. package/src/themes/odyssey/mixins.ts +19 -0
  245. package/src/themes/odyssey/mixins.types.ts +25 -0
  246. package/src/themes/odyssey/palette.ts +9 -9
  247. package/src/themes/odyssey/theme.ts +3 -0
@@ -18,11 +18,18 @@ export const components: ThemeOptions["components"] = {
18
18
  styleOverrides: {
19
19
  root: ({ ownerState, theme }) => ({
20
20
  padding: theme.spacing(4),
21
+ gap: theme.spacing(4),
21
22
  color: theme.palette.text.primary,
22
23
  ...(ownerState.severity && {
23
24
  backgroundColor: theme.palette[ownerState.severity].lighter,
24
25
  borderColor: theme.palette[ownerState.severity].light,
25
26
  }),
27
+ ...(ownerState.variant === "banner" && {
28
+ position: "relative",
29
+ justifyContent: "center",
30
+ alignItems: "center",
31
+ borderWidth: 0,
32
+ }),
26
33
  ...(ownerState.variant === "infobox" && {
27
34
  borderStyle: "solid",
28
35
  borderWidth: 1,
@@ -30,12 +37,38 @@ export const components: ThemeOptions["components"] = {
30
37
  marginBottom: theme.spacing(4),
31
38
  },
32
39
  }),
40
+ ...(ownerState.variant === "toast" && {
41
+ maxWidth: theme.mixins.maxWidth,
42
+ borderStyle: "solid",
43
+ borderWidth: 1,
44
+ position: "relative",
45
+ alignItems: "start",
46
+ }),
47
+ }),
48
+ action: ({ ownerState, theme }) => ({
33
49
  ...(ownerState.variant === "banner" && {
34
- borderWidth: 0,
50
+ padding: 0,
51
+ marginRight: 0,
52
+ top: "50%",
53
+ right: theme.spacing(4),
54
+ position: "absolute",
55
+ transform: "translateY(-50%)",
56
+ }),
57
+ ...(ownerState.variant === "toast" && {
58
+ position: "absolute",
59
+ top: `calc(${theme.spacing(4)} - ${theme.spacing(1)} + ${
60
+ theme.mixins.borderWidth
61
+ })`,
62
+ right: `calc(${theme.spacing(4)} - ${theme.spacing(1)} + ${
63
+ theme.mixins.borderWidth
64
+ })`,
65
+ padding: 0,
66
+ marginLeft: 0,
67
+ marginRight: 0,
35
68
  }),
36
69
  }),
37
70
  icon: ({ ownerState, theme }) => ({
38
- marginRight: theme.spacing(4),
71
+ marginRight: 0,
39
72
  padding: 0,
40
73
  fontSize: "1.429rem",
41
74
  opacity: 1,
@@ -46,9 +79,20 @@ export const components: ThemeOptions["components"] = {
46
79
  color: theme.palette[ownerState.severity].dark,
47
80
  }),
48
81
  }),
49
- message: ({ theme }) => ({
82
+ message: ({ ownerState, theme }) => ({
50
83
  padding: 0,
51
84
  lineHeight: theme.typography.body.lineHeight,
85
+ ...(ownerState.variant === "banner" && {
86
+ display: "flex",
87
+ justifyContent: "space-between",
88
+ gap: theme.spacing(4),
89
+ }),
90
+ ...(ownerState.variant === "toast" && {
91
+ flexGrow: 1,
92
+ paddingRight: `calc((${theme.spacing(1)} * 2) + ${
93
+ theme.typography.body.fontSize
94
+ } + ${theme.spacing(4)})`,
95
+ }),
52
96
  }),
53
97
  },
54
98
  },
@@ -70,129 +114,135 @@ export const components: ThemeOptions["components"] = {
70
114
  variants: [
71
115
  {
72
116
  props: { variant: "primary" },
73
- style: {
117
+ style: ({ theme }) => ({
74
118
  fontWeight: 600,
75
- color: "#ffffff",
119
+ color: theme.palette.common.white,
76
120
  borderColor: "transparent",
77
- backgroundColor: "#1662dd",
121
+ backgroundColor: theme.palette.primary.main,
78
122
 
79
123
  "&:hover, &:focus-visible": {
80
- backgroundColor: "#00297a",
124
+ backgroundColor: theme.palette.primary.dark,
125
+ },
126
+
127
+ "&:focus-visible": {
128
+ outlineColor: theme.palette.primary.main,
81
129
  },
82
130
 
83
131
  "&:active": {
84
- backgroundColor: "#1662dd",
132
+ backgroundColor: theme.palette.primary.main,
85
133
  },
86
134
 
87
135
  "&:disabled": {
88
- color: "#ffffff",
89
- backgroundColor: "#a7b5ec",
136
+ color: theme.palette.common.white,
137
+ backgroundColor: theme.palette.primary.light,
90
138
  },
91
- },
139
+ }),
92
140
  },
93
141
  {
94
142
  props: { variant: "secondary" },
95
- style: {
96
- backgroundColor: "#f5f5f6",
97
- borderColor: "#d7d7dc",
98
- color: "#1d1d21",
99
- "&:hover": {
100
- background: "#f2f5ff",
101
- borderColor: "#a7b5ec",
102
- color: "#1662dd",
143
+ style: ({ theme }) => ({
144
+ backgroundColor: theme.palette.grey[50],
145
+ borderColor: theme.palette.grey[200],
146
+ color: theme.palette.text.primary,
147
+ "&:hover, &:focus-visible": {
148
+ backgroundColor: theme.palette.primary.lighter,
149
+ borderColor: theme.palette.primary.light,
150
+ color: theme.palette.primary.main,
103
151
  },
104
152
 
105
153
  "&:focus-visible": {
106
- backgroundColor: "#1662dd",
107
- color: "#1662dd",
154
+ outlineColor: theme.palette.primary.main,
108
155
  },
109
156
 
110
157
  "&:active": {
111
- borderColor: "#1662dd",
158
+ borderColor: theme.palette.primary.main,
112
159
  },
113
160
 
114
161
  "&:disabled": {
115
- borderColor: "#ebebed",
116
- backgroundColor: "#ebebed",
117
- color: "#8c8c96",
162
+ borderColor: theme.palette.grey[100],
163
+ backgroundColor: theme.palette.grey[100],
164
+ color: theme.palette.grey[500],
118
165
  },
119
- },
166
+ }),
120
167
  },
121
168
  {
122
169
  props: { variant: "danger" },
123
- style: {
124
- backgroundColor: "#da372c",
125
- color: "#ffffff",
170
+ style: ({ theme }) => ({
171
+ backgroundColor: theme.palette.error.main,
172
+ color: theme.palette.common.white,
126
173
  borderColor: "transparent",
127
174
 
128
175
  "&:hover": {
129
- backgroundColor: "#640019",
176
+ backgroundColor: theme.palette.error.dark,
130
177
  },
131
178
 
132
179
  "&:focus-visible": {
133
- outlineColor: "#f88c90",
134
- backgroundColor: "#640019",
180
+ outlineColor: theme.palette.error.main,
181
+ backgroundColor: theme.palette.error.dark,
135
182
  },
136
183
 
137
184
  "&:active": {
138
- backgroundColor: "#da372c",
185
+ backgroundColor: theme.palette.error.main,
139
186
  },
140
187
 
141
188
  "&:disabled": {
142
- color: "#ffffff",
143
- backgroundColor: "#f88c90",
189
+ color: theme.palette.common.white,
190
+ backgroundColor: theme.palette.error.light,
144
191
  },
145
- },
192
+ }),
146
193
  },
147
194
  {
148
195
  props: { variant: "floating" },
149
- style: {
150
- backgroundColor: "#ffffff",
151
- color: "#1d1d21",
196
+ style: ({ theme }) => ({
197
+ backgroundColor: theme.palette.common.white,
198
+ color: theme.palette.text.primary,
152
199
  borderColor: "transparent",
153
200
 
154
201
  "&:hover, &:focus-visible": {
155
202
  backgroundColor: "rgba(29, 29, 33, 0.1)",
156
203
  borderColor: "transparent",
157
204
  },
205
+ "&:focus-visible": {
206
+ outlineColor: theme.palette.primary.main,
207
+ },
158
208
  "&:active": {
159
209
  backgroundColor: "rgba(29, 29, 33, 0.2)",
160
210
  borderColor: "transparent",
161
211
  },
162
212
  "&:disabled": {
163
213
  backgroundColor: "rgba(235, 235, 237, 0.6)",
164
- color: "#6e6e78",
214
+ color: theme.palette.text.secondary,
165
215
  borderColor: "transparent",
166
216
  },
167
- },
217
+ }),
168
218
  },
169
219
  {
170
220
  props: { size: "s" },
171
- style: {
172
- paddingBlock: "calc(0.57142857rem - 1px)",
173
- paddingInline: "calc(0.85714286rem - - 1px)",
221
+ style: ({ theme }) => ({
222
+ paddingBlock: `calc(${theme.spacing(2)} - 1px)`,
223
+ paddingInline: `calc(${theme.spacing(3)} - 1px)`,
174
224
  fontSize: "1rem",
175
- },
225
+ }),
176
226
  },
177
227
  {
178
228
  props: { size: "l" },
179
- style: {
180
- paddingBlock: "calc(1.14285714rem - 1px)",
181
- paddingInline: "calc(1.14285714rem - 1px)",
182
- },
229
+ style: ({ theme }) => ({
230
+ paddingBlock: `calc(${theme.spacing(4)} - 1px)`,
231
+ paddingInline: `calc(${theme.spacing(4)} - 1px)`,
232
+ }),
183
233
  },
184
234
  {
185
235
  props: { fullWidth: true },
186
- style: {
236
+ style: ({ theme }) => ({
187
237
  display: "block",
188
238
  width: "100%",
189
239
  marginBlock: "0",
190
240
  marginInline: "0",
191
241
 
192
242
  "&:not(:last-child)": {
193
- marginBlockEnd: "1.14285714rem",
243
+ marginBlockEnd: theme.spacing(4),
194
244
  },
195
- },
245
+ }),
196
246
  },
197
247
  {
198
248
  // icon only
@@ -207,10 +257,9 @@ export const components: ThemeOptions["components"] = {
207
257
  },
208
258
  ],
209
259
  styleOverrides: {
210
- root: () => ({
260
+ root: ({ theme }) => ({
211
261
  fontWeight: 600,
212
- paddingBlock: "0.85714286rem",
213
- paddingInline: "0.85714286rem",
262
+ padding: `calc(${theme.spacing(3)} - 1px) ${theme.spacing(3)}`,
214
263
  display: "inline-block",
215
264
  position: "relative",
216
265
  marginBlock: "0",
@@ -228,7 +277,7 @@ export const components: ThemeOptions["components"] = {
228
277
  whiteSpace: "nowrap",
229
278
 
230
279
  "& + &": {
231
- marginInlineStart: "0.57142857rem",
280
+ marginInlineStart: theme.spacing(2),
232
281
  },
233
282
 
234
283
  "&:focus-visible": {
@@ -239,7 +288,7 @@ export const components: ThemeOptions["components"] = {
239
288
 
240
289
  "&:disabled": {
241
290
  cursor: "not-allowed",
242
- pointerEvents: "inherit", // in order to have cursor: not-allowed, must change pointer-events from 'none'
291
+ pointerEvents: "inherit", // in order to have cursor: not-allowed, must change pointer-events from "none"
243
292
  },
244
293
 
245
294
  ".MuiButton-startIcon > *:nth-of-type(1)": {
@@ -265,34 +314,35 @@ export const components: ThemeOptions["components"] = {
265
314
  size: "small",
266
315
  },
267
316
  styleOverrides: {
268
- root: {
317
+ root: ({ theme }) => ({
269
318
  borderRadius: "4px",
270
319
  "&:hover": {
271
320
  backgroundColor: "transparent",
272
321
  },
273
322
  padding: 0,
274
323
  ".Mui-error > &": {
275
- color: "#da372c",
324
+ color: theme.palette.error.main,
276
325
  "&:hover": {
277
- color: "#640019",
326
+ color: theme.palette.error.dark,
278
327
  },
279
328
  },
280
329
  ".Mui-error > &.Mui-checked": {
281
330
  "&:hover": {
282
- color: "#640019",
331
+ color: theme.palette.error.dark,
283
332
  },
284
333
  },
285
334
  "&.Mui-focusVisible": {
286
- outlineColor: "#1662dd",
335
+ outlineColor: theme.palette.primary.main,
287
336
  outlineOffset: 0,
288
337
  outlineStyle: "solid",
289
338
  outlineWidth: "2px",
290
339
  },
291
- },
340
+ }),
292
341
  },
293
342
  },
294
343
  MuiCircularProgress: {
295
344
  defaultProps: {
345
+ // TODO: defaultProps cannot take a theme object; needs workaround
296
346
  size: "1.14285714rem",
297
347
  thickness: 8,
298
348
  color: "primary",
@@ -300,9 +350,9 @@ export const components: ThemeOptions["components"] = {
300
350
  variant: "indeterminate",
301
351
  },
302
352
  styleOverrides: {
303
- root: ({ ownerState }) => ({
353
+ root: ({ theme, ownerState }) => ({
304
354
  ...(ownerState.color !== "inherit" && {
305
- color: "#00297a",
355
+ color: theme.palette.primary.dark,
306
356
  }),
307
357
  }),
308
358
  circle: ({ ownerState }) => ({
@@ -312,10 +362,29 @@ export const components: ThemeOptions["components"] = {
312
362
  }),
313
363
  },
314
364
  },
365
+ MuiFormControl: {
366
+ styleOverrides: {
367
+ root: ({ ownerState, theme }) => ({
368
+ width: "100%",
369
+ maxWidth: "32rem",
370
+ ...(ownerState.margin === "normal" && {
371
+ marginTop: 0,
372
+ marginBottom: theme.spacing(4),
373
+ }),
374
+ ...(ownerState.margin === "dense" && {
375
+ marginTop: 0,
376
+ marginBottom: theme.spacing(4),
377
+ }),
378
+ ...(ownerState.fullWidth && {
379
+ maxWidth: "100%",
380
+ }),
381
+ }),
382
+ },
383
+ },
315
384
  MuiFormControlLabel: {
316
385
  styleOverrides: {
317
- root: ({ ownerState }) => ({
318
- gap: "0.57142857rem",
386
+ root: ({ theme, ownerState }) => ({
387
+ gap: theme.spacing(2),
319
388
  marginLeft: 0,
320
389
  marginRight: 0, // used for row presentation of radio/checkbox
321
390
  ...(ownerState.labelPlacement === "start" && {
@@ -329,28 +398,28 @@ export const components: ThemeOptions["components"] = {
329
398
  marginLeft: 0,
330
399
  }),
331
400
  "&:not(:last-child)": {
332
- marginBottom: "0.57142857rem",
401
+ marginBottom: theme.spacing(2),
333
402
  },
334
403
  "&.Mui-disabled": {
335
404
  pointerEvents: "none",
336
405
  },
337
406
  //[`&:hover ${radioClasses.root}:not(${radioClasses.checked})`]: {
338
- //color: "#1d1d21",
407
+ //color: theme.palette.text.primary,
339
408
  //},
340
409
  "&:hover .MuiRadio-root, &:hover .MuiCheckbox-root": {
341
- color: "#1d1d21",
410
+ color: theme.palette.text.primary,
342
411
  },
343
412
  "&:hover .MuiRadio-root.Mui-checked, &:hover .MuiCheckbox-root.Mui-checked":
344
413
  {
345
- color: "#00297a",
414
+ color: theme.palette.primary.dark,
346
415
  },
347
416
  "&.Mui-error:hover .MuiRadio-root, &.Mui-error:hover .MuiCheckbox-root":
348
417
  {
349
- color: "#640019",
418
+ color: theme.palette.error.dark,
350
419
  },
351
420
  "&.Mui-error:hover .MuiRadio-root.Mui-checked, &.Mui-error:hover .MuiCheckbox-root.Mui-checked":
352
421
  {
353
- color: "#640019",
422
+ color: theme.palette.error.dark,
354
423
  },
355
424
  }),
356
425
  },
@@ -360,32 +429,56 @@ export const components: ThemeOptions["components"] = {
360
429
  variant: "standard",
361
430
  },
362
431
  styleOverrides: {
363
- root: {
432
+ root: ({ theme }) => ({
364
433
  lineHeight: "1.33333333",
365
- marginTop: "0.57142857rem",
434
+ marginTop: theme.spacing(2),
366
435
  ".MuiFormLabel-root + &": {
367
- marginTop: "-0.28571429rem",
368
- color: "#6e6e78",
436
+ marginTop: `-${theme.spacing(1)}`,
437
+ color: theme.palette.text.secondary,
369
438
  },
370
- marginBottom: "0.57142857rem",
439
+ marginBottom: theme.spacing(2),
371
440
  "&:last-child": {
372
441
  marginBottom: 0,
373
442
  },
374
- },
443
+ }),
375
444
  },
376
445
  },
377
446
  MuiFormLabel: {
378
447
  styleOverrides: {
379
- root: {
380
- color: "#1d1d21",
448
+ root: ({ theme }) => ({
449
+ color: theme.palette.text.primary,
381
450
  lineHeight: "1.14285714",
382
451
  fontSize: "1rem",
383
452
  fontWeight: 600,
384
- marginBottom: "0.57142857rem",
453
+ marginBottom: theme.spacing(2),
385
454
  "&.Mui-focused, &.Mui-error, &.Mui-disabled": {
386
- color: "#1d1d21",
455
+ color: theme.palette.text.primary,
387
456
  },
388
- },
457
+ }),
458
+ },
459
+ },
460
+ MuiIconButton: {
461
+ styleOverrides: {
462
+ root: ({ theme }) => ({
463
+ padding: theme.spacing(1),
464
+ fontSize: theme.typography.body.fontSize,
465
+ }),
466
+ },
467
+ },
468
+ MuiInputAdornment: {
469
+ defaultProps: {
470
+ variant: "outlined",
471
+ },
472
+ styleOverrides: {
473
+ root: ({ ownerState }) => ({
474
+ display: "flex",
475
+ ...(ownerState.position === "start" && {
476
+ marginRight: 0,
477
+ }),
478
+ ...(ownerState.position === "end" && {
479
+ marginLeft: 0,
480
+ }),
481
+ }),
389
482
  },
390
483
  },
391
484
  MuiInputBase: {
@@ -399,26 +492,49 @@ export const components: ThemeOptions["components"] = {
399
492
  },
400
493
  },
401
494
  },
495
+ MuiInputLabel: {
496
+ defaultProps: {
497
+ disableAnimation: true,
498
+ shrink: false,
499
+ },
500
+ styleOverrides: {
501
+ root: ({ ownerState }) => ({
502
+ // @ts-expect-error: Incorrect typing in MUI
503
+ ...(ownerState.formControl && {
504
+ position: "initial",
505
+ transform: "none",
506
+ }),
507
+ ...(ownerState.variant === "outlined" && {
508
+ pointerEvents: "initial",
509
+ transform: "none",
510
+ maxWidth: "100%",
511
+ ...(ownerState.size === "small" && {
512
+ transform: "none",
513
+ }),
514
+ }),
515
+ }),
516
+ },
517
+ },
402
518
  MuiLink: {
403
519
  styleOverrides: {
404
- root: {
405
- color: "#1662dd",
520
+ root: ({ theme }) => ({
521
+ color: theme.palette.primary.main,
406
522
  textDecoration: "none",
407
523
 
408
524
  "&:hover": {
409
- color: "#1662dd",
525
+ color: theme.palette.primary.main,
410
526
  textDecoration: "underline",
411
527
  },
412
528
 
413
529
  "&:focus-visible": {
414
- outlineColor: "#1662dd",
530
+ outlineColor: theme.palette.primary.main,
415
531
  outlineOffset: "2px",
416
532
  outlineStyle: "solid",
417
533
  outlineWidth: "1px",
418
534
  },
419
535
 
420
536
  "&:visited": {
421
- color: "#1662dd",
537
+ color: theme.palette.primary.main,
422
538
  },
423
539
 
424
540
  ".Link-indicator, .Link-icon": {
@@ -428,11 +544,11 @@ export const components: ThemeOptions["components"] = {
428
544
  },
429
545
 
430
546
  ".Link-indicator": {
431
- marginInlineStart: "0.57142857rem",
547
+ marginInlineStart: theme.spacing(2),
432
548
  },
433
549
 
434
550
  ".Link-icon": {
435
- marginInlineEnd: "0.57142857rem",
551
+ marginInlineEnd: theme.spacing(2),
436
552
  },
437
553
  svg: {
438
554
  fontSize: "1rem",
@@ -442,55 +558,104 @@ export const components: ThemeOptions["components"] = {
442
558
  verticalAlign: "middle",
443
559
  width: "1em",
444
560
  },
445
- },
561
+ }),
446
562
  },
447
563
  variants: [
448
564
  {
449
565
  props: { variant: "monochrome" },
450
- style: {
451
- color: "#1d1d21",
566
+ style: ({ theme }) => ({
567
+ color: theme.palette.text.primary,
452
568
  textDecoration: "underline",
453
569
 
454
570
  "&:hover": {
455
- color: "#6e6e78",
571
+ color: theme.palette.text.secondary,
456
572
  },
457
573
 
458
574
  "&:focus-visible": {
459
- outlineColor: "#1662dd",
575
+ outlineColor: theme.palette.primary.main,
460
576
  outlineOffset: "2px",
461
577
  outlineStyle: "solid",
462
578
  outlineWidth: "1px",
463
579
  },
464
580
 
465
581
  "&:visited": {
466
- color: "#1d1d21",
582
+ color: theme.palette.text.primary,
467
583
  },
468
- },
584
+ }),
469
585
  },
470
586
  ],
471
587
  },
588
+ MuiNativeSelect: {
589
+ defaultProps: {
590
+ variant: "outlined",
591
+ },
592
+ styleOverrides: {
593
+ icon: ({ theme }) => ({
594
+ color: theme.palette.text.primary,
595
+ }),
596
+ },
597
+ },
598
+ MuiOutlinedInput: {
599
+ defaultProps: {
600
+ notched: false,
601
+ },
602
+ styleOverrides: {
603
+ root: ({ ownerState, theme }) => ({
604
+ "&.Mui-disabled": {
605
+ pointerEvents: "none",
606
+ },
607
+ ...(ownerState.startAdornment && {
608
+ paddingLeft: theme.spacing(3),
609
+ }),
610
+ ...(ownerState.endAdornment && {
611
+ paddingRight: theme.spacing(3),
612
+ }),
613
+ }),
614
+ input: ({ theme }) => ({
615
+ padding: `calc(${theme.spacing(3)} - 1px) ${theme.spacing(3)}`,
616
+ border: "1px solid transparent",
617
+ }),
618
+ notchedOutline: ({ theme }) => ({
619
+ borderColor: theme.palette.grey[500],
620
+ ".MuiOutlinedInput-root:hover &": {
621
+ borderColor: theme.palette.primary.main,
622
+ },
623
+ ".MuiOutlinedInput-root.Mui-error:hover &": {
624
+ borderColor: theme.palette.error.dark,
625
+ },
626
+ }),
627
+ },
628
+ },
472
629
  MuiRadio: {
473
630
  defaultProps: {
474
631
  size: "small",
475
632
  },
476
633
  styleOverrides: {
477
- root: {
634
+ root: ({ theme }) => ({
478
635
  "&:hover": {
479
636
  backgroundColor: "transparent",
480
637
  },
481
638
  padding: 0,
482
639
  ".Mui-error > &": {
483
- color: "#da372c",
640
+ color: theme.palette.error.main,
484
641
  "&:hover": {
485
- color: "#640019",
642
+ color: theme.palette.error.dark,
486
643
  },
487
644
  },
488
645
  "&.Mui-focusVisible": {
489
- outlineColor: "#1662dd",
646
+ outlineColor: theme.palette.primary.main,
490
647
  outlineOffset: 0,
491
648
  outlineStyle: "solid",
492
649
  outlineWidth: "2px",
493
650
  },
651
+ }),
652
+ },
653
+ },
654
+ MuiSnackbar: {
655
+ defaultProps: {
656
+ anchorOrigin: {
657
+ vertical: "bottom",
658
+ horizontal: "right",
494
659
  },
495
660
  },
496
661
  },
@@ -500,9 +665,9 @@ export const components: ThemeOptions["components"] = {
500
665
  "'Public Sans', '-apple-system', 'BlinkMacSystemFont', 'Segoe UI', 'Roboto', 'Oxygen-Sans', 'Ubuntu', 'Cantarell', 'Helvetica Neue', 'Noto Sans Arabic', sans-serif",
501
666
  },
502
667
  styleOverrides: {
503
- paragraph: {
504
- marginBottom: "1.14285714rem",
505
- },
668
+ paragraph: ({ theme }) => ({
669
+ marginBottom: theme.spacing(4),
670
+ }),
506
671
  },
507
672
  },
508
673
  };
@@ -19,6 +19,7 @@ declare module "@mui/material/Alert" {
19
19
  // Enable Odyssey variants
20
20
  banner: true;
21
21
  infobox: true;
22
+ toast: true;
22
23
  }
23
24
  }
24
25