@okta/odyssey-react-mui 0.16.1 → 0.18.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 (170) hide show
  1. package/CHANGELOG.md +121 -0
  2. package/README.md +7 -19
  3. package/dist/Banner.d.ts +47 -0
  4. package/dist/Banner.d.ts.map +1 -0
  5. package/dist/Banner.js +41 -0
  6. package/dist/Banner.js.map +1 -0
  7. package/dist/Link.d.ts +1 -1
  8. package/dist/Link.d.ts.map +1 -1
  9. package/dist/Link.js +2 -1
  10. package/dist/Link.js.map +1 -1
  11. package/dist/OdysseyCacheProvider.d.ts +23 -0
  12. package/dist/OdysseyCacheProvider.d.ts.map +1 -0
  13. package/dist/OdysseyCacheProvider.js +36 -0
  14. package/dist/OdysseyCacheProvider.js.map +1 -0
  15. package/dist/OdysseyThemeProvider.d.ts +19 -0
  16. package/dist/OdysseyThemeProvider.d.ts.map +1 -0
  17. package/dist/OdysseyThemeProvider.js +32 -0
  18. package/dist/OdysseyThemeProvider.js.map +1 -0
  19. package/dist/PasswordInput.d.ts +1 -1
  20. package/dist/PasswordInput.d.ts.map +1 -1
  21. package/dist/Radio.d.ts +19 -0
  22. package/dist/Radio.d.ts.map +1 -0
  23. package/dist/Radio.js +32 -0
  24. package/dist/Radio.js.map +1 -0
  25. package/dist/RadioGroup.d.ts +47 -0
  26. package/dist/RadioGroup.d.ts.map +1 -0
  27. package/dist/RadioGroup.js +59 -0
  28. package/dist/RadioGroup.js.map +1 -0
  29. package/dist/Status.d.ts +23 -0
  30. package/dist/Status.d.ts.map +1 -0
  31. package/dist/Status.js +25 -0
  32. package/dist/Status.js.map +1 -0
  33. package/dist/TextField.d.ts +87 -0
  34. package/dist/TextField.d.ts.map +1 -0
  35. package/dist/TextField.js +100 -0
  36. package/dist/TextField.js.map +1 -0
  37. package/dist/ThemeProvider.d.ts +3 -2
  38. package/dist/ThemeProvider.d.ts.map +1 -1
  39. package/dist/ThemeProvider.js +12 -6
  40. package/dist/ThemeProvider.js.map +1 -1
  41. package/dist/createUniqueAlphabeticalId.d.ts +14 -0
  42. package/dist/createUniqueAlphabeticalId.d.ts.map +1 -0
  43. package/dist/createUniqueAlphabeticalId.js +14 -0
  44. package/dist/createUniqueAlphabeticalId.js.map +1 -0
  45. package/dist/createUniqueId.d.ts.map +1 -1
  46. package/dist/createUniqueId.js.map +1 -1
  47. package/dist/iconDictionary/Add.d.ts +1 -1
  48. package/dist/iconDictionary/Add.d.ts.map +1 -1
  49. package/dist/iconDictionary/AddCircle.d.ts +1 -1
  50. package/dist/iconDictionary/AddCircle.d.ts.map +1 -1
  51. package/dist/iconDictionary/AlertCircle.d.ts +1 -1
  52. package/dist/iconDictionary/AlertCircle.d.ts.map +1 -1
  53. package/dist/iconDictionary/AlertCircleFilled.d.ts +1 -1
  54. package/dist/iconDictionary/AlertCircleFilled.d.ts.map +1 -1
  55. package/dist/iconDictionary/AlertTriangleFilled.d.ts +1 -1
  56. package/dist/iconDictionary/AlertTriangleFilled.d.ts.map +1 -1
  57. package/dist/iconDictionary/Anchor.d.ts +1 -1
  58. package/dist/iconDictionary/Anchor.d.ts.map +1 -1
  59. package/dist/iconDictionary/ArrowDown.d.ts +1 -1
  60. package/dist/iconDictionary/ArrowDown.d.ts.map +1 -1
  61. package/dist/iconDictionary/ArrowLeft.d.ts +1 -1
  62. package/dist/iconDictionary/ArrowLeft.d.ts.map +1 -1
  63. package/dist/iconDictionary/ArrowRight.d.ts +1 -1
  64. package/dist/iconDictionary/ArrowRight.d.ts.map +1 -1
  65. package/dist/iconDictionary/ArrowUp.d.ts +1 -1
  66. package/dist/iconDictionary/ArrowUp.d.ts.map +1 -1
  67. package/dist/iconDictionary/ArrowUpDown.d.ts +1 -1
  68. package/dist/iconDictionary/ArrowUpDown.d.ts.map +1 -1
  69. package/dist/iconDictionary/Calendar.d.ts +1 -1
  70. package/dist/iconDictionary/Calendar.d.ts.map +1 -1
  71. package/dist/iconDictionary/Check.d.ts +1 -1
  72. package/dist/iconDictionary/Check.d.ts.map +1 -1
  73. package/dist/iconDictionary/CheckCircleFilled.d.ts +1 -1
  74. package/dist/iconDictionary/CheckCircleFilled.d.ts.map +1 -1
  75. package/dist/iconDictionary/ChevronDown.d.ts +1 -1
  76. package/dist/iconDictionary/ChevronDown.d.ts.map +1 -1
  77. package/dist/iconDictionary/ChevronUp.d.ts +1 -1
  78. package/dist/iconDictionary/ChevronUp.d.ts.map +1 -1
  79. package/dist/iconDictionary/Close.d.ts +1 -1
  80. package/dist/iconDictionary/Close.d.ts.map +1 -1
  81. package/dist/iconDictionary/CloseCircleFilled.d.ts +1 -1
  82. package/dist/iconDictionary/CloseCircleFilled.d.ts.map +1 -1
  83. package/dist/iconDictionary/Copy.d.ts +1 -1
  84. package/dist/iconDictionary/Copy.d.ts.map +1 -1
  85. package/dist/iconDictionary/Delete.d.ts +1 -1
  86. package/dist/iconDictionary/Delete.d.ts.map +1 -1
  87. package/dist/iconDictionary/Download.d.ts +1 -1
  88. package/dist/iconDictionary/Download.d.ts.map +1 -1
  89. package/dist/iconDictionary/DragHandle.d.ts +1 -1
  90. package/dist/iconDictionary/DragHandle.d.ts.map +1 -1
  91. package/dist/iconDictionary/Edit.d.ts +1 -1
  92. package/dist/iconDictionary/Edit.d.ts.map +1 -1
  93. package/dist/iconDictionary/ExternalLink.d.ts +1 -1
  94. package/dist/iconDictionary/ExternalLink.d.ts.map +1 -1
  95. package/dist/iconDictionary/Eye.d.ts +1 -1
  96. package/dist/iconDictionary/Eye.d.ts.map +1 -1
  97. package/dist/iconDictionary/EyeOff.d.ts +1 -1
  98. package/dist/iconDictionary/EyeOff.d.ts.map +1 -1
  99. package/dist/iconDictionary/Filter.d.ts +1 -1
  100. package/dist/iconDictionary/Filter.d.ts.map +1 -1
  101. package/dist/iconDictionary/Globe.d.ts +1 -1
  102. package/dist/iconDictionary/Globe.d.ts.map +1 -1
  103. package/dist/iconDictionary/Home.d.ts +1 -1
  104. package/dist/iconDictionary/Home.d.ts.map +1 -1
  105. package/dist/iconDictionary/InformationCircle.d.ts +1 -1
  106. package/dist/iconDictionary/InformationCircle.d.ts.map +1 -1
  107. package/dist/iconDictionary/InformationCircleFilled.d.ts +1 -1
  108. package/dist/iconDictionary/InformationCircleFilled.d.ts.map +1 -1
  109. package/dist/iconDictionary/Notification.d.ts +1 -1
  110. package/dist/iconDictionary/Notification.d.ts.map +1 -1
  111. package/dist/iconDictionary/OverflowVertical.d.ts +1 -1
  112. package/dist/iconDictionary/OverflowVertical.d.ts.map +1 -1
  113. package/dist/iconDictionary/QuestionCircle.d.ts +1 -1
  114. package/dist/iconDictionary/QuestionCircle.d.ts.map +1 -1
  115. package/dist/iconDictionary/QuestionCircleFilled.d.ts +1 -1
  116. package/dist/iconDictionary/QuestionCircleFilled.d.ts.map +1 -1
  117. package/dist/iconDictionary/Search.d.ts +1 -1
  118. package/dist/iconDictionary/Search.d.ts.map +1 -1
  119. package/dist/iconDictionary/Settings.d.ts +1 -1
  120. package/dist/iconDictionary/Settings.d.ts.map +1 -1
  121. package/dist/iconDictionary/Subtract.d.ts +1 -1
  122. package/dist/iconDictionary/Subtract.d.ts.map +1 -1
  123. package/dist/iconDictionary/User.d.ts +1 -1
  124. package/dist/iconDictionary/User.d.ts.map +1 -1
  125. package/dist/iconDictionary/UserGroup.d.ts +1 -1
  126. package/dist/iconDictionary/UserGroup.d.ts.map +1 -1
  127. package/dist/index.d.ts +13 -6
  128. package/dist/index.d.ts.map +1 -1
  129. package/dist/index.js +11 -4
  130. package/dist/index.js.map +1 -1
  131. package/dist/theme/components.d.ts.map +1 -1
  132. package/dist/theme/components.js +645 -174
  133. package/dist/theme/components.js.map +1 -1
  134. package/dist/theme/components.types.d.ts +5 -0
  135. package/dist/theme/components.types.d.ts.map +1 -1
  136. package/dist/theme/components.types.js.map +1 -1
  137. package/dist/theme/typography.d.ts.map +1 -1
  138. package/dist/theme/typography.js +6 -0
  139. package/dist/theme/typography.js.map +1 -1
  140. package/dist/theme/typography.types.d.ts +3 -3
  141. package/dist/theme/typography.types.d.ts.map +1 -1
  142. package/dist/theme/typography.types.js.map +1 -1
  143. package/dist/useUniqueAlphabeticalId.d.ts +13 -0
  144. package/dist/useUniqueAlphabeticalId.d.ts.map +1 -0
  145. package/dist/useUniqueAlphabeticalId.js +18 -0
  146. package/dist/useUniqueAlphabeticalId.js.map +1 -0
  147. package/dist/useUniqueId.d.ts.map +1 -1
  148. package/dist/useUniqueId.js +1 -1
  149. package/dist/useUniqueId.js.map +1 -1
  150. package/package.json +8 -7
  151. package/src/Banner.tsx +69 -0
  152. package/src/Link.tsx +21 -23
  153. package/src/OdysseyCacheProvider.test.tsx +38 -0
  154. package/src/OdysseyCacheProvider.tsx +48 -0
  155. package/src/OdysseyThemeProvider.tsx +44 -0
  156. package/src/Radio.tsx +28 -0
  157. package/src/RadioGroup.tsx +105 -0
  158. package/src/Status.tsx +29 -0
  159. package/src/TextField.tsx +220 -0
  160. package/src/ThemeProvider.tsx +11 -5
  161. package/src/createUniqueAlphabeticalId.test.ts +22 -0
  162. package/src/createUniqueAlphabeticalId.ts +19 -0
  163. package/src/createUniqueId.ts +1 -1
  164. package/src/index.ts +35 -14
  165. package/src/theme/components.tsx +585 -85
  166. package/src/theme/components.types.ts +7 -0
  167. package/src/theme/typography.ts +6 -0
  168. package/src/theme/typography.types.ts +3 -3
  169. package/src/useUniqueAlphabeticalId.ts +21 -0
  170. package/src/useUniqueId.ts +2 -2
@@ -13,8 +13,11 @@
13
13
  import type { ThemeOptions } from "@mui/material";
14
14
  import type {} from "@mui/lab/themeAugmentation";
15
15
  //import radioClasses from "@mui/material";
16
+ import { chipClasses } from "@mui/material/Chip";
16
17
  import { dialogActionsClasses } from "@mui/material/DialogActions";
18
+ import { inputAdornmentClasses } from "@mui/material/InputAdornment";
17
19
  import { inputBaseClasses } from "@mui/material/InputBase";
20
+ import { svgIconClasses } from "@mui/material/SvgIcon";
18
21
  import { tableBodyClasses } from "@mui/material/TableBody";
19
22
  import { tableCellClasses } from "@mui/material/TableCell";
20
23
  import { tableHeadClasses } from "@mui/material/TableHead";
@@ -25,6 +28,8 @@ import {
25
28
  AlertTriangleFilledIcon,
26
29
  ArrowDownIcon,
27
30
  CheckCircleFilledIcon,
31
+ ChevronDownIcon,
32
+ CloseCircleFilledIcon,
28
33
  InformationCircleFilledIcon,
29
34
  } from "../iconDictionary";
30
35
 
@@ -68,35 +73,28 @@ export const components: ThemeOptions["components"] = {
68
73
  borderWidth: theme.mixins.borderWidth,
69
74
  borderRadius: theme.mixins.borderRadius,
70
75
  position: "relative",
71
- alignItems: "start",
76
+ alignItems: "center",
72
77
  }),
73
78
  }),
74
79
  action: ({ ownerState, theme }) => ({
75
80
  ...(ownerState.variant === "banner" && {
76
81
  padding: 0,
77
- marginRight: 0,
82
+ marginInlineEnd: 0,
78
83
  top: "50%",
79
84
  right: theme.spacing(4),
80
85
  position: "absolute",
81
86
  transform: "translateY(-50%)",
82
87
  }),
83
88
  ...(ownerState.variant === "toast" && {
84
- position: "absolute",
85
- top: `calc(${theme.spacing(4)} - ${theme.spacing(1)} + ${
86
- theme.mixins.borderWidth
87
- })`,
88
- right: `calc(${theme.spacing(4)} - ${theme.spacing(1)} + ${
89
- theme.mixins.borderWidth
90
- })`,
91
89
  padding: 0,
92
- marginLeft: 0,
93
- marginRight: 0,
90
+ marginInlineStart: 0,
91
+ marginInlineEnd: 0,
94
92
  }),
95
93
  }),
96
94
  icon: ({ ownerState, theme }) => ({
97
- marginRight: 0,
95
+ marginInlineEnd: 0,
98
96
  padding: 0,
99
- fontSize: "1.429rem",
97
+ fontSize: "inherit",
100
98
  opacity: 1,
101
99
  ...(ownerState.severity && {
102
100
  color: theme.palette[ownerState.severity].main,
@@ -104,6 +102,10 @@ export const components: ThemeOptions["components"] = {
104
102
  ...(ownerState.severity === "warning" && {
105
103
  color: theme.palette[ownerState.severity].dark,
106
104
  }),
105
+
106
+ [`& .${svgIconClasses.root}`]: {
107
+ fontSize: "1.429rem",
108
+ },
107
109
  }),
108
110
  message: ({ ownerState, theme }) => ({
109
111
  padding: 0,
@@ -128,14 +130,22 @@ export const components: ThemeOptions["components"] = {
128
130
  lineHeight: theme.typography.h6.lineHeight,
129
131
  fontSize: theme.typography.h6.fontSize,
130
132
  fontWeight: theme.typography.fontWeightBold,
133
+
134
+ "&:last-child": {
135
+ marginBlockEnd: 0,
136
+ },
131
137
  }),
132
138
  },
133
139
  },
134
140
  MuiBackdrop: {
135
141
  styleOverrides: {
136
- root: {
142
+ root: ({ ownerState }) => ({
137
143
  backgroundColor: "rgba(29,29,33,0.75)",
138
- },
144
+
145
+ ...(ownerState.invisible === true && {
146
+ backgroundColor: "transparent",
147
+ }),
148
+ }),
139
149
  },
140
150
  },
141
151
  MuiButton: {
@@ -226,7 +236,7 @@ export const components: ThemeOptions["components"] = {
226
236
  {
227
237
  props: { variant: "floating" },
228
238
  style: ({ theme }) => ({
229
- backgroundColor: theme.palette.common.white,
239
+ backgroundColor: "transparent",
230
240
  color: theme.palette.text.primary,
231
241
  borderColor: "transparent",
232
242
 
@@ -252,7 +262,7 @@ export const components: ThemeOptions["components"] = {
252
262
  props: { size: "s" },
253
263
  style: ({ theme }) => ({
254
264
  paddingBlock: `calc(${theme.spacing(2)} - 1px)`,
255
- paddingInline: `calc(${theme.spacing(3)} - 1px)`,
265
+ paddingInline: `calc(${theme.spacing(2)} - 1px)`,
256
266
  fontSize: "1rem",
257
267
  }),
258
268
  },
@@ -293,7 +303,7 @@ export const components: ThemeOptions["components"] = {
293
303
  fontWeight: 600,
294
304
  minWidth: "unset",
295
305
  padding: `calc(${theme.spacing(3)} - 1px) ${theme.spacing(3)}`,
296
- display: "inline-block",
306
+ display: "inline-flex",
297
307
  position: "relative",
298
308
  marginBlock: "0",
299
309
  marginInline: "0",
@@ -307,7 +317,7 @@ export const components: ThemeOptions["components"] = {
307
317
  outlineColor: "transparent",
308
318
  outlineOffset: "0",
309
319
  fontSize: theme.typography.body1.fontSize,
310
- lineHeight: "1.14285714",
320
+ lineHeight: theme.typography.ui.lineHeight,
311
321
  whiteSpace: "nowrap",
312
322
 
313
323
  ".MuiButton-root + &": {
@@ -326,7 +336,16 @@ export const components: ThemeOptions["components"] = {
326
336
  },
327
337
 
328
338
  ".MuiButton-startIcon > *:nth-of-type(1)": {
329
- fontSize: "inherit",
339
+ fontSize: `${theme.typography.ui.lineHeight}em`,
340
+ },
341
+ }),
342
+ startIcon: ({ theme }) => ({
343
+ display: "inline-flex",
344
+ margin: 0,
345
+ marginInlineEnd: theme.spacing(2),
346
+
347
+ "&:only-child": {
348
+ margin: 0,
330
349
  },
331
350
  }),
332
351
  },
@@ -336,13 +355,6 @@ export const components: ThemeOptions["components"] = {
336
355
  disableRipple: true,
337
356
  },
338
357
  },
339
- MuiCssBaseline: {
340
- styleOverrides: {
341
- boxSizing: "border-box",
342
- fontFeatureSettings: "'lnum','pnum'",
343
- fontVariant: "normal",
344
- },
345
- },
346
358
  MuiCheckbox: {
347
359
  defaultProps: {
348
360
  size: "small",
@@ -374,9 +386,104 @@ export const components: ThemeOptions["components"] = {
374
386
  }),
375
387
  },
376
388
  },
389
+ MuiChip: {
390
+ defaultProps: {
391
+ deleteIcon: <CloseCircleFilledIcon />,
392
+ },
393
+ styleOverrides: {
394
+ root: ({ theme, ownerState }) => ({
395
+ height: "auto",
396
+ paddingBlock: theme.spacing(2),
397
+ paddingInline: theme.spacing(3),
398
+ fontSize: theme.typography.body1.fontSize,
399
+ lineHeight: theme.typography.ui.lineHeight,
400
+ borderRadius: "1.5em",
401
+ backgroundColor: theme.palette.grey[100],
402
+
403
+ ...(ownerState.onDelete && {
404
+ paddingInlineEnd: theme.spacing(2),
405
+ }),
406
+
407
+ [`& .${chipClasses.deleteIcon}`]: {
408
+ WebkitTapHighlightColor: "transparent",
409
+ color: theme.palette.text.secondary,
410
+ fontSize: "1em",
411
+ cursor: "pointer",
412
+ margin: "0",
413
+ marginInlineStart: theme.spacing(2),
414
+
415
+ "&:hover": {
416
+ color: theme.palette.text.primary,
417
+ },
418
+ },
419
+
420
+ [`&.${chipClasses.disabled}`]: {
421
+ opacity: 1,
422
+ pointerEvents: "none",
423
+ backgroundColor: theme.palette.grey[50],
424
+ color: theme.palette.text.secondary,
425
+ },
426
+
427
+ ...(ownerState.clickable && {
428
+ "&:hover": {
429
+ backgroundColor: theme.palette.grey[200],
430
+ },
431
+ [`&.${chipClasses.focusVisible}`]: {
432
+ backgroundColor: theme.palette.grey[200],
433
+ outlineColor: theme.palette.primary.main,
434
+ outlineOffset: "2px",
435
+ outlineStyle: "solid",
436
+ outlineWidth: "2px",
437
+ },
438
+ "&:active": {
439
+ boxShadow: "none",
440
+ backgroundColor: theme.palette.grey[300],
441
+ },
442
+ }),
443
+
444
+ ...(ownerState.variant === "status" && {
445
+ paddingBlock: 0,
446
+ paddingInline: 0,
447
+ borderRadius: 0,
448
+ backgroundColor: "transparent",
449
+ color: theme.palette.text.primary,
450
+
451
+ "&::before": {
452
+ content: "''",
453
+ width: ".57em",
454
+ height: ".57em",
455
+ marginInlineEnd: theme.spacing(2),
456
+ borderRadius: "100%",
457
+ backgroundColor: theme.palette.text.secondary,
458
+ },
459
+
460
+ [`&.${chipClasses.colorError}`]: {
461
+ "&::before": {
462
+ backgroundColor: theme.palette.error.main,
463
+ },
464
+ },
465
+
466
+ [`&.${chipClasses.colorSuccess}`]: {
467
+ "&::before": {
468
+ backgroundColor: theme.palette.success.main,
469
+ },
470
+ },
471
+
472
+ [`&.${chipClasses.colorWarning}`]: {
473
+ "&::before": {
474
+ backgroundColor: theme.palette.warning.main,
475
+ },
476
+ },
477
+ }),
478
+ }),
479
+ label: {
480
+ padding: 0,
481
+ },
482
+ },
483
+ },
377
484
  MuiCircularProgress: {
378
485
  defaultProps: {
379
- // TODO: defaultProps cannot take a theme object; needs workaround
486
+ // TODO: defaultProps cannot take a theme object; matches theme.typography.ui.lineHeight
380
487
  size: "1.14285714rem",
381
488
  thickness: 8,
382
489
  color: "primary",
@@ -396,6 +503,331 @@ export const components: ThemeOptions["components"] = {
396
503
  }),
397
504
  },
398
505
  },
506
+ MuiCssBaseline: {
507
+ styleOverrides: (themeParam) => `
508
+ html {
509
+ font-size: calc((${themeParam.typography.fontSize} / 16) * 100%);
510
+ }
511
+ `,
512
+ },
513
+ MuiScopedCssBaseline: {
514
+ styleOverrides: {
515
+ root: ({ theme }) => ({
516
+ abbr: {
517
+ borderBottomWidth: "1px",
518
+ borderBottomStyle: "dashed",
519
+ borderBottomColor: theme.palette.primary.dark,
520
+ textDecoration: "none",
521
+ },
522
+
523
+ address: {
524
+ maxWidth: theme.mixins.maxWidth,
525
+ marginBlockStart: 0,
526
+ marginBlockEnd: theme.spacing(4),
527
+ marginInline: 0,
528
+
529
+ "&:last-child": {
530
+ marginBlockEnd: 0,
531
+ },
532
+ },
533
+
534
+ blockquote: {
535
+ maxWidth: theme.mixins.maxWidth,
536
+ marginBlockStart: 0,
537
+ marginBlockEnd: theme.spacing(4),
538
+ marginInline: 0,
539
+ paddingBlock: 0,
540
+ paddingInlineStart: theme.spacing(2),
541
+ paddingInlineEnd: 0,
542
+ borderInlineStartWidth: "3px",
543
+ borderInlineStartStyle: "solid",
544
+ borderInlineStartColor: theme.palette.grey[200],
545
+
546
+ "&:last-child": {
547
+ marginBlockEnd: 0,
548
+ },
549
+ },
550
+
551
+ cite: {
552
+ fontStyle: "italic",
553
+ },
554
+
555
+ code: {
556
+ fontFamily:
557
+ "'Inconsolata', 'SFMono-Regular', 'Consolas', 'Liberation Mono', 'Menlo', 'Courier', monospace",
558
+ },
559
+
560
+ del: {
561
+ display: "inline-block",
562
+ backgroundColor: theme.palette.error.light,
563
+
564
+ "&::before, &::after": {
565
+ clip: "rect(0 0 0 0)",
566
+ clipPath: "inset(50%)",
567
+ height: "1px",
568
+ overflow: "hidden",
569
+ position: "absolute",
570
+ whiteSpace: "nowrap",
571
+ width: "1px",
572
+ },
573
+
574
+ "&::before": {
575
+ content: "attr(data-a11y-start)",
576
+ },
577
+
578
+ "&::after": {
579
+ content: "attr(data-a11y-end)",
580
+ },
581
+ },
582
+
583
+ details: {
584
+ fontSize: theme.typography.body1.fontSize,
585
+ },
586
+
587
+ dfn: {
588
+ fontStyle: "italic",
589
+ },
590
+
591
+ dl: {
592
+ display: "grid",
593
+ gridGap: `${theme.spacing(2)} ${theme.spacing(4)}`,
594
+ gridTemplateColumns: "repeat(2, minmax(min-content, max-content))",
595
+ maxWidth: theme.mixins.maxWidth,
596
+ marginBlockStart: 0,
597
+ marginBlockEnd: theme.spacing(4),
598
+ marginInline: 0,
599
+ padding: 0,
600
+
601
+ "&:last-child": {
602
+ marginBlockEnd: 0,
603
+ },
604
+
605
+ dt: {
606
+ gridColumn: 1,
607
+ fontWeight: 600,
608
+ },
609
+
610
+ dd: {
611
+ gridColumn: 2,
612
+ fontWeight: 400,
613
+ },
614
+ },
615
+
616
+ em: {
617
+ fontStyle: "italic",
618
+
619
+ "& > em": {
620
+ textDecoration: "underline",
621
+ },
622
+ },
623
+
624
+ figure: {
625
+ display: "grid",
626
+ gridGap: theme.spacing(2),
627
+ gridTemplateColumns: "minmax(min-content, max-content)",
628
+ justifyContent: "start",
629
+ justifyItems: "start",
630
+ marginBlockStart: 0,
631
+ marginBlockEnd: theme.spacing(4),
632
+ marginInline: 0,
633
+
634
+ "&:last-child": {
635
+ marginBlockEnd: 0,
636
+ },
637
+ },
638
+
639
+ "figcaption:not([class])": {
640
+ color: theme.palette.text.secondary,
641
+ fontSize: theme.typography.body1.fontSize,
642
+ },
643
+
644
+ hr: {
645
+ marginBlock: theme.spacing(2),
646
+ marginInline: 0,
647
+ borderWidth: "1px",
648
+ borderStyle: "solid",
649
+ borderColor: theme.palette.grey[200],
650
+ },
651
+
652
+ ins: {
653
+ display: "inline-block",
654
+ backgroundColor: theme.palette.success.light,
655
+
656
+ "&::before, &::after": {
657
+ clip: "rect(0 0 0 0)",
658
+ clipPath: "inset(50%)",
659
+ height: "1px",
660
+ overflow: "hidden",
661
+ position: "absolute",
662
+ whiteSpace: "nowrap",
663
+ width: "1px",
664
+ },
665
+
666
+ "&::before": {
667
+ content: "attr(data-a11y-start)",
668
+ },
669
+
670
+ "&::after": {
671
+ content: "attr(data-a11y-end)",
672
+ },
673
+ },
674
+
675
+ kbd: {
676
+ display: "inline-block",
677
+ minWidth: `calc(${theme.typography.subtitle1.fontSize} * ${theme.typography.h5.lineHeight})`,
678
+ borderStyle: theme.mixins.borderStyle,
679
+ borderWidth: theme.mixins.borderWidth,
680
+ borderRadius: theme.mixins.borderRadius,
681
+ borderColor: theme.palette.grey[200],
682
+ backgroundColor: theme.palette.grey[50],
683
+ padding: `calc(${theme.spacing(1)} / 2) ${theme.spacing(1)}`,
684
+ fontFamily:
685
+ "'Inconsolata', 'SFMono-Regular', 'Consolas', 'Liberation Mono', 'Menlo', 'Courier', monospace",
686
+ fontSize: theme.typography.subtitle1.fontSize,
687
+ fontWeight: theme.typography.fontWeightRegular,
688
+ lineHeight: theme.typography.h5.lineHeight,
689
+ boxShadow: `0 1px 1px 0 hsla(240, 6%, 12%, 0.05)`,
690
+ },
691
+
692
+ mark: {
693
+ backgroundColor: theme.palette.warning.light,
694
+
695
+ "&::before, &::after": {
696
+ clip: "rect(0 0 0 0)",
697
+ clipPath: "inset(50%)",
698
+ height: "1px",
699
+ overflow: "hidden",
700
+ position: "absolute",
701
+ whiteSpace: "nowrap",
702
+ width: "1px",
703
+ },
704
+
705
+ "&::before": {
706
+ content: "attr(data-a11y-start)",
707
+ },
708
+
709
+ "&::after": {
710
+ content: "attr(data-a11y-end)",
711
+ },
712
+ },
713
+
714
+ p: {
715
+ maxWidth: theme.mixins.maxWidth,
716
+ marginBlockStart: 0,
717
+ marginBlockEnd: theme.spacing(4),
718
+
719
+ "&:last-child": {
720
+ marginBlockEnd: 0,
721
+ },
722
+ },
723
+
724
+ pre: {
725
+ marginInline: 0,
726
+ marginBlockStart: 0,
727
+ marginBlockEnd: theme.spacing(4),
728
+ fontFamily:
729
+ "'Inconsolata', 'SFMono-Regular', 'Consolas', 'Liberation Mono', 'Menlo', 'Courier', monospace",
730
+ whiteSpace: "pre-wrap",
731
+ tabSize: 2,
732
+
733
+ "&:last-child": {
734
+ marginBlockEnd: 0,
735
+ },
736
+ },
737
+
738
+ "ul, ol": {
739
+ maxWidth: theme.mixins.maxWidth,
740
+ marginBlockStart: 0,
741
+ marginBlockEnd: theme.spacing(4),
742
+ // Unique padding to get desire appearance with "outside" position
743
+ paddingInlineStart: "2ch",
744
+
745
+ ol: {
746
+ listStyleType: "lower-alpha",
747
+
748
+ ol: {
749
+ listStyleType: "lower-roman",
750
+ },
751
+ },
752
+
753
+ "&:last-child": {
754
+ marginBlockEnd: 0,
755
+ },
756
+ },
757
+
758
+ li: {
759
+ marginBlockEnd: theme.spacing(2),
760
+ paddingInlineStart: theme.spacing(1),
761
+
762
+ "ul, ol": {
763
+ marginBlockStart: theme.spacing(2),
764
+ marginInlineStart: `calc(${theme.spacing(6)} - 2ch)`,
765
+ },
766
+ },
767
+
768
+ q: {
769
+ quotes: `'"' '"' "'" "'"`,
770
+
771
+ "&::before": {
772
+ content: "open-quote",
773
+ },
774
+
775
+ "&::after": {
776
+ content: "close-quote",
777
+ },
778
+ },
779
+
780
+ s: {
781
+ textDecoration: "line-through",
782
+ },
783
+
784
+ samp: {
785
+ padding: "0 0.5ch",
786
+ backgroundColor: theme.palette.grey[50],
787
+ boxShadow: `0 1px 0 ${theme.palette.grey[50]}`,
788
+ fontSize: theme.typography.body1.fontSize,
789
+
790
+ kbd: {
791
+ background: theme.palette.common.white,
792
+ },
793
+ },
794
+
795
+ small: {
796
+ fontSize: theme.typography.caption.fontSize,
797
+ },
798
+
799
+ sub: {
800
+ fontSize: theme.typography.caption.fontSize,
801
+ lineHeight: 1,
802
+ verticalAlign: "sub",
803
+ },
804
+
805
+ summary: {
806
+ fontSize: theme.typography.body1.fontSize,
807
+ fontWeight: theme.typography.fontWeightBold,
808
+ cursor: "default",
809
+
810
+ "&:focus-visible": {
811
+ outlineColor: theme.palette.primary.main,
812
+ outlineOffset: "2px",
813
+ outlineStyle: "solid",
814
+ outlineWidth: "2px",
815
+ },
816
+ },
817
+
818
+ sup: {
819
+ fontSize: theme.typography.caption.fontSize,
820
+ lineHeight: 1,
821
+ verticalAlign: "super",
822
+ },
823
+
824
+ var: {
825
+ fontStyle: "italic",
826
+ fontWeight: theme.typography.fontWeightBold,
827
+ },
828
+ }),
829
+ },
830
+ },
399
831
  MuiDialog: {
400
832
  defaultProps: {
401
833
  scroll: "paper",
@@ -497,17 +929,17 @@ export const components: ThemeOptions["components"] = {
497
929
  styleOverrides: {
498
930
  root: ({ theme, ownerState }) => ({
499
931
  gap: theme.spacing(2),
500
- marginLeft: 0,
501
- marginRight: 0, // used for row presentation of radio/checkbox
932
+ marginInlineStart: 0,
933
+ marginInlineEnd: 0, // used for row presentation of radio/checkbox
502
934
  ...(ownerState.labelPlacement === "start" && {
503
- marginLeft: 0, // used for row presentation of radio/checkbox
504
- marginRight: 0,
935
+ marginInlineStart: 0, // used for row presentation of radio/checkbox
936
+ marginInlineEnd: 0,
505
937
  }),
506
938
  ...(ownerState.labelPlacement === "top" && {
507
- marginLeft: 0,
939
+ marginInlineStart: 0,
508
940
  }),
509
941
  ...(ownerState.labelPlacement === "bottom" && {
510
- marginLeft: 0,
942
+ marginInlineStart: 0,
511
943
  }),
512
944
  "&:not(:last-child)": {
513
945
  marginBottom: theme.spacing(2),
@@ -553,6 +985,7 @@ export const components: ThemeOptions["components"] = {
553
985
  "&:last-child": {
554
986
  marginBottom: 0,
555
987
  },
988
+ textAlign: "start",
556
989
  }),
557
990
  },
558
991
  },
@@ -560,7 +993,7 @@ export const components: ThemeOptions["components"] = {
560
993
  styleOverrides: {
561
994
  root: ({ theme }) => ({
562
995
  color: theme.palette.text.primary,
563
- lineHeight: "1.14285714",
996
+ lineHeight: theme.typography.ui.lineHeight,
564
997
  fontSize: "1rem",
565
998
  fontWeight: 600,
566
999
  marginBottom: theme.spacing(2),
@@ -572,6 +1005,9 @@ export const components: ThemeOptions["components"] = {
572
1005
  },
573
1006
  MuiIconButton: {
574
1007
  styleOverrides: {
1008
+ edgeEnd: ({ theme }) => ({
1009
+ marginInlineEnd: theme.spacing(1),
1010
+ }),
575
1011
  root: ({ theme }) => ({
576
1012
  padding: theme.spacing(1),
577
1013
  fontSize: theme.typography.body1.fontSize,
@@ -618,16 +1054,17 @@ export const components: ThemeOptions["components"] = {
618
1054
  styleOverrides: {
619
1055
  root: ({ theme, ownerState }) => ({
620
1056
  display: "flex",
621
- minWidth: "1em",
1057
+ minWidth: "1.25em",
622
1058
  maxHeight: "unset",
1059
+ margin: 0,
623
1060
  alignItems: "center",
624
1061
  whiteSpace: "nowrap",
625
1062
  color: theme.palette.action.active,
626
1063
  ...(ownerState.position === "start" && {
627
- marginInlineEnd: theme.spacing(2),
1064
+ marginInlineStart: theme.spacing(2),
628
1065
  }),
629
1066
  ...(ownerState.position === "end" && {
630
- marginInlineStart: theme.spacing(2),
1067
+ marginInlineEnd: theme.spacing(2),
631
1068
  }),
632
1069
  ...(ownerState.disablePointerEvents === true && {
633
1070
  pointerEvents: "none",
@@ -646,22 +1083,11 @@ export const components: ThemeOptions["components"] = {
646
1083
  flex: "1",
647
1084
  width: "auto",
648
1085
  color: theme.palette.text.primary,
649
- lineHeight: "1.14285714",
1086
+ lineHeight: theme.typography.ui.lineHeight,
650
1087
  borderWidth: theme.mixins.borderWidth,
651
1088
  borderStyle: theme.mixins.borderStyle,
652
1089
  borderRadius: theme.mixins.borderRadius,
653
1090
  borderColor: theme.palette.grey[500],
654
- paddingBlock: `calc(${theme.spacing(3)} - ${theme.mixins.borderWidth})`,
655
- paddingInline: theme.spacing(3),
656
-
657
- ...(ownerState.multiline && {
658
- paddingBlock: theme.spacing(3),
659
- paddingInline: theme.spacing(3),
660
- ...(ownerState.size === "small" && {
661
- paddingBlock: theme.spacing(3),
662
- paddingInline: theme.spacing(3),
663
- }),
664
- }),
665
1091
 
666
1092
  ...(ownerState.fullWidth && {
667
1093
  width: "100%",
@@ -707,14 +1133,19 @@ export const components: ThemeOptions["components"] = {
707
1133
  input: ({ theme }) => ({
708
1134
  boxSizing: "border-box",
709
1135
  height: "auto",
710
- paddingBlock: 0,
711
- paddingInline: 0,
1136
+ paddingBlock: `calc(${theme.spacing(3)} - ${theme.mixins.borderWidth})`,
1137
+ paddingInline: theme.spacing(3),
1138
+ boxShadow: "none",
712
1139
 
713
1140
  [`.${inputBaseClasses.disabled} &`]: {
714
1141
  pointerEvents: "auto",
715
1142
  cursor: "not-allowed",
716
1143
  },
717
1144
 
1145
+ [`.${inputAdornmentClasses.root} + &`]: {
1146
+ paddingInlineStart: theme.spacing(2),
1147
+ },
1148
+
718
1149
  [`label[data-shrink=false] + .${inputBaseClasses.formControl} &`]: {
719
1150
  "&::placeholder": {
720
1151
  color: theme.palette.text.secondary,
@@ -753,10 +1184,10 @@ export const components: ThemeOptions["components"] = {
753
1184
  styleOverrides: {
754
1185
  root: ({ theme }) => ({
755
1186
  color: theme.palette.primary.main,
756
- textDecoration: "none",
1187
+ textDecoration: "underline",
757
1188
 
758
1189
  "&:hover": {
759
- color: theme.palette.primary.main,
1190
+ color: theme.palette.primary.dark,
760
1191
  textDecoration: "underline",
761
1192
  },
762
1193
 
@@ -819,16 +1250,65 @@ export const components: ThemeOptions["components"] = {
819
1250
  },
820
1251
  ],
821
1252
  },
1253
+ MuiListItem: {
1254
+ styleOverrides: {
1255
+ root: {
1256
+ textAlign: "start",
1257
+ },
1258
+ },
1259
+ },
1260
+ MuiListSubheader: {
1261
+ styleOverrides: {
1262
+ root: ({ theme }) => ({
1263
+ paddingBlock: theme.spacing(2),
1264
+ paddingInline: theme.spacing(4),
1265
+ fontSize: theme.typography.caption.fontSize,
1266
+ lineHeight: theme.typography.caption.lineHeight,
1267
+ color: theme.palette.text.secondary,
1268
+ textTransform: "uppercase",
1269
+ }),
1270
+ },
1271
+ },
1272
+ MuiMenuItem: {
1273
+ styleOverrides: {
1274
+ root: ({ theme }) => ({
1275
+ justifyContent: "space-between",
1276
+ gap: theme.spacing(2),
1277
+
1278
+ "&.Mui-selected": {
1279
+ backgroundColor: "transparent",
1280
+ color: theme.palette.primary.main,
1281
+
1282
+ "&:hover": {
1283
+ backgroundColor: theme.palette.primary.lighter,
1284
+ },
1285
+ },
1286
+ }),
1287
+ },
1288
+ },
822
1289
  MuiNativeSelect: {
823
1290
  defaultProps: {
824
1291
  variant: "standard",
825
1292
  },
826
1293
  styleOverrides: {
1294
+ select: {
1295
+ "&:focus": {
1296
+ backgroundColor: "transparent",
1297
+ },
1298
+ },
827
1299
  icon: ({ theme }) => ({
1300
+ insetInlineEnd: theme.spacing(3),
828
1301
  color: theme.palette.text.primary,
829
1302
  }),
830
1303
  },
831
1304
  },
1305
+ MuiPopover: {
1306
+ styleOverrides: {
1307
+ paper: ({ theme }) => ({
1308
+ marginBlockStart: theme.spacing(1),
1309
+ }),
1310
+ },
1311
+ },
832
1312
  MuiRadio: {
833
1313
  defaultProps: {
834
1314
  size: "small",
@@ -865,9 +1345,27 @@ export const components: ThemeOptions["components"] = {
865
1345
  MuiSelect: {
866
1346
  defaultProps: {
867
1347
  variant: "standard",
1348
+ IconComponent: ChevronDownIcon,
868
1349
  },
869
1350
  styleOverrides: {
1351
+ select: ({ theme }) => ({
1352
+ paddingBlock: `calc(${theme.spacing(3)} - ${theme.mixins.borderWidth})`,
1353
+ paddingInline: theme.spacing(3),
1354
+
1355
+ "&:focus": {
1356
+ backgroundColor: "transparent",
1357
+ },
1358
+
1359
+ ".MuiBox-root": {
1360
+ display: "flex",
1361
+ flexWrap: "wrap",
1362
+ gap: theme.spacing(1),
1363
+ marginBlock: `-${theme.spacing(2)}`,
1364
+ marginInline: `-${theme.spacing(2)}`,
1365
+ },
1366
+ }),
870
1367
  icon: ({ theme }) => ({
1368
+ insetInlineEnd: theme.spacing(3),
871
1369
  color: theme.palette.text.primary,
872
1370
  }),
873
1371
  },
@@ -877,6 +1375,11 @@ export const components: ThemeOptions["components"] = {
877
1375
  fontSize: "inherit",
878
1376
  color: "inherit",
879
1377
  },
1378
+ styleOverrides: {
1379
+ root: ({ theme }) => ({
1380
+ fontSize: `${theme.typography.ui.lineHeight}rem`,
1381
+ }),
1382
+ },
880
1383
  },
881
1384
  MuiTab: {
882
1385
  defaultProps: {
@@ -951,7 +1454,7 @@ export const components: ThemeOptions["components"] = {
951
1454
  borderRadius: theme.mixins.borderRadius,
952
1455
  marginBlock: theme.spacing(0),
953
1456
  marginInline: theme.spacing(0),
954
- lineHeight: "1.14285714",
1457
+ lineHeight: theme.typography.ui.lineHeight,
955
1458
 
956
1459
  "&:only-child": {
957
1460
  marginBlockEnd: 0,
@@ -960,6 +1463,16 @@ export const components: ThemeOptions["components"] = {
960
1463
  ...(ownerState.stickyHeader && {
961
1464
  borderCollapse: "separate",
962
1465
  }),
1466
+
1467
+ caption: {
1468
+ clip: "rect(0 0 0 0)",
1469
+ clipPath: "inset(50%)",
1470
+ height: "1px",
1471
+ overflow: "hidden",
1472
+ position: "absolute",
1473
+ whiteSpace: "nowrap",
1474
+ width: "1px",
1475
+ },
963
1476
  }),
964
1477
  },
965
1478
  },
@@ -1023,7 +1536,7 @@ export const components: ThemeOptions["components"] = {
1023
1536
  }),
1024
1537
 
1025
1538
  ...(ownerState.variant === "number" && {
1026
- textAlign: "right",
1539
+ textAlign: "end",
1027
1540
  fontFeatureSettings: '"lnum", "tnum"',
1028
1541
  }),
1029
1542
 
@@ -1037,7 +1550,7 @@ export const components: ThemeOptions["components"] = {
1037
1550
  }),
1038
1551
 
1039
1552
  ...(ownerState.align === "left" && {
1040
- textAlign: "left",
1553
+ textAlign: "start",
1041
1554
  }),
1042
1555
 
1043
1556
  ...(ownerState.align === "center" && {
@@ -1045,7 +1558,7 @@ export const components: ThemeOptions["components"] = {
1045
1558
  }),
1046
1559
 
1047
1560
  ...(ownerState.align === "right" && {
1048
- textAlign: "right",
1561
+ textAlign: "end",
1049
1562
  flexDirection: "row-reverse",
1050
1563
  }),
1051
1564
 
@@ -1056,6 +1569,10 @@ export const components: ThemeOptions["components"] = {
1056
1569
  },
1057
1570
  },
1058
1571
  MuiTableContainer: {
1572
+ defaultProps: {
1573
+ // @ts-expect-error valid prop and value; MUI TS bug
1574
+ component: "figure",
1575
+ },
1059
1576
  styleOverrides: {
1060
1577
  root: ({ theme }) => ({
1061
1578
  width: "unset",
@@ -1121,8 +1638,8 @@ export const components: ThemeOptions["components"] = {
1121
1638
  }),
1122
1639
  icon: ({ theme, ownerState }) => ({
1123
1640
  fontSize: "inherit",
1124
- marginRight: 0,
1125
- marginLeft: 0,
1641
+ marginInlineEnd: 0,
1642
+ marginInlineStart: 0,
1126
1643
  opacity: 0,
1127
1644
  color: "inherit",
1128
1645
  transition: theme.transitions.create(["opacity", "transform"], {
@@ -1186,15 +1703,15 @@ export const components: ThemeOptions["components"] = {
1186
1703
  transformOrigin: "right center",
1187
1704
  ...(ownerState.isRtl
1188
1705
  ? {
1189
- marginLeft: theme.spacing(3),
1706
+ marginInlineStart: theme.spacing(3),
1190
1707
  ...(ownerState.touch === true && {
1191
- marginLeft: theme.spacing(4),
1708
+ marginInlineStart: theme.spacing(4),
1192
1709
  }),
1193
1710
  }
1194
1711
  : {
1195
- marginRight: theme.spacing(3),
1712
+ marginInlineEnd: theme.spacing(3),
1196
1713
  ...(ownerState.touch === true && {
1197
- marginRight: theme.spacing(4),
1714
+ marginInlineEnd: theme.spacing(4),
1198
1715
  }),
1199
1716
  }),
1200
1717
  },
@@ -1202,15 +1719,15 @@ export const components: ThemeOptions["components"] = {
1202
1719
  transformOrigin: "left center",
1203
1720
  ...(ownerState.isRtl
1204
1721
  ? {
1205
- marginRight: theme.spacing(3),
1722
+ marginInlineEnd: theme.spacing(3),
1206
1723
  ...(ownerState.touch === true && {
1207
- marginRight: theme.spacing(4),
1724
+ marginInlineEnd: theme.spacing(4),
1208
1725
  }),
1209
1726
  }
1210
1727
  : {
1211
- marginLeft: theme.spacing(3),
1728
+ marginInlineStart: theme.spacing(3),
1212
1729
  ...(ownerState.touch === true && {
1213
- marginLeft: theme.spacing(4),
1730
+ marginInlineStart: theme.spacing(4),
1214
1731
  }),
1215
1732
  }),
1216
1733
  },
@@ -1270,7 +1787,6 @@ export const components: ThemeOptions["components"] = {
1270
1787
  subtitle1: "p",
1271
1788
  body1: "p",
1272
1789
  inherit: "p",
1273
- kbd: "kbd",
1274
1790
  legend: "legend",
1275
1791
  },
1276
1792
  },
@@ -1278,22 +1794,6 @@ export const components: ThemeOptions["components"] = {
1278
1794
  paragraph: ({ theme }) => ({
1279
1795
  marginBottom: theme.spacing(4),
1280
1796
  }),
1281
- root: ({ theme, ownerState }) => ({
1282
- ...(ownerState.variant === "kbd" && {
1283
- display: "inline-block",
1284
- minWidth: `calc(${theme.typography.subtitle1.fontSize} * ${theme.typography.h5.lineHeight})`,
1285
- borderStyle: theme.mixins.borderStyle,
1286
- borderWidth: theme.mixins.borderWidth,
1287
- borderRadius: theme.mixins.borderRadius,
1288
- borderColor: theme.palette.grey[200],
1289
- backgroundColor: theme.palette.grey[50],
1290
- padding: `calc(${theme.spacing(1)} / 2) ${theme.spacing(1)}`,
1291
- fontSize: theme.typography.subtitle1.fontSize,
1292
- fontWeight: theme.typography.fontWeightRegular,
1293
- lineHeight: theme.typography.h5.lineHeight,
1294
- boxShadow: `0 1px 1px 0 hsla(240, 6%, 12%, 0.05)`,
1295
- }),
1296
- }),
1297
1797
  },
1298
1798
  },
1299
1799
  };