@okta/odyssey-react-mui 0.21.2 → 0.21.3

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@okta/odyssey-react-mui",
3
- "version": "0.21.2",
3
+ "version": "0.21.3",
4
4
  "description": "React MUI components for Odyssey, Okta's design system",
5
5
  "author": "Okta, Inc.",
6
6
  "license": "Apache-2.0",
@@ -10,8 +10,8 @@
10
10
  "types": "dist/src/index.d.ts",
11
11
  "exports": {
12
12
  ".": {
13
- "default": "./dist/index.js",
14
- "types": "./dist/src/index.d.ts"
13
+ "types": "./dist/src/index.d.ts",
14
+ "default": "./dist/index.js"
15
15
  }
16
16
  },
17
17
  "repository": {
@@ -25,7 +25,7 @@
25
25
  "@mui/lab": "^5.0.0-alpha.117",
26
26
  "@mui/material": "^5.11.6",
27
27
  "@mui/utils": "^5.11.2",
28
- "@okta/odyssey-design-tokens": "0.21.2"
28
+ "@okta/odyssey-design-tokens": "0.21.3"
29
29
  },
30
30
  "peerDependencies": {
31
31
  "@emotion/react": "^11",
@@ -33,5 +33,5 @@
33
33
  "react": ">=17 <19",
34
34
  "react-dom": ">=17 <19"
35
35
  },
36
- "gitHead": "294f5141125cf05fe9fc7cbda318bd85a1adafad"
36
+ "gitHead": "06e016c9b7228f30babae07b3b23be04ceaa2f77"
37
37
  }
@@ -32,10 +32,12 @@ import { tooltipClasses } from "@mui/material/Tooltip";
32
32
  import {
33
33
  AlertTriangleFilledIcon,
34
34
  ArrowDownIcon,
35
+ CheckIcon,
35
36
  CheckCircleFilledIcon,
36
37
  ChevronDownIcon,
37
38
  CloseCircleFilledIcon,
38
39
  InformationCircleFilledIcon,
40
+ SubtractIcon,
39
41
  } from "../iconDictionary";
40
42
 
41
43
  export const components: ThemeOptions["components"] = {
@@ -362,23 +364,87 @@ export const components: ThemeOptions["components"] = {
362
364
  MuiCheckbox: {
363
365
  defaultProps: {
364
366
  size: "small",
367
+ icon: <></>,
368
+ checkedIcon: <CheckIcon />,
369
+ indeterminateIcon: <SubtractIcon />,
365
370
  },
366
371
  styleOverrides: {
367
372
  root: ({ theme }) => ({
368
- borderRadius: "4px",
369
- "&:hover": {
373
+ width: `${theme.typography.ui.lineHeight}em`,
374
+ height: `${theme.typography.ui.lineHeight}em`,
375
+ borderRadius: theme.mixins.borderRadius,
376
+ borderWidth: theme.mixins.borderWidth,
377
+ borderStyle: theme.mixins.borderStyle,
378
+ borderColor: theme.palette.grey[500],
379
+ padding: 0,
380
+ boxShadow: `0 0 0 0 transparent`,
381
+ transition: theme.transitions.create(
382
+ ["border-color", "background-color", "box-shadow"],
383
+ {
384
+ duration: theme.transitions.duration.short,
385
+ }
386
+ ),
387
+
388
+ ".MuiSvgIcon-root": {
389
+ color: theme.palette.common.white,
390
+ width: "0.5em",
391
+ height: "0.5em",
392
+ transition: theme.transitions.create(["color"], {
393
+ duration: theme.transitions.duration.short,
394
+ }),
395
+ },
396
+
397
+ "&.Mui-checked": {
398
+ backgroundColor: theme.palette.primary.main,
399
+ borderColor: theme.palette.primary.main,
400
+
401
+ ".MuiFormControlLabel-root:hover > &": {
402
+ backgroundColor: theme.palette.primary.dark,
403
+ borderColor: theme.palette.primary.dark,
404
+ },
405
+ },
406
+
407
+ ".MuiFormControlLabel-root:hover > &": {
370
408
  backgroundColor: "transparent",
409
+ borderColor: theme.palette.grey[900],
410
+ },
411
+ ".Mui-error:hover > &": {
412
+ borderColor: theme.palette.error.dark,
413
+
414
+ "&.Mui-checked": {
415
+ backgroundColor: theme.palette.error.dark,
416
+ borderColor: theme.palette.error.dark,
417
+ },
371
418
  },
372
- padding: 0,
373
419
  ".Mui-error > &": {
374
- color: theme.palette.error.main,
375
- "&:hover": {
376
- color: theme.palette.error.dark,
420
+ borderColor: theme.palette.error.main,
421
+
422
+ "&.Mui-checked": {
423
+ backgroundColor: theme.palette.error.main,
424
+ borderColor: theme.palette.error.main,
425
+ },
426
+
427
+ "&.Mui-focusVisible": {
428
+ boxShadow: `0 0 0 2px ${theme.palette.background.default}, 0 0 0 4px ${theme.palette.error.main}`,
377
429
  },
378
430
  },
379
- ".Mui-error > &.Mui-checked": {
380
- "&:hover": {
381
- color: theme.palette.error.dark,
431
+ "&.Mui-focusVisible": {
432
+ borderColor: theme.palette.grey[900],
433
+ boxShadow: `0 0 0 2px ${theme.palette.background.default}, 0 0 0 4px ${theme.palette.primary.main}`,
434
+ outline: "2px solid transparent",
435
+ outlineOffset: "1px",
436
+ },
437
+ "&.Mui-disabled": {
438
+ backgroundColor: theme.palette.grey[50],
439
+ borderColor: theme.palette.grey[300],
440
+
441
+ ".Mui-error > &": {
442
+ backgroundColor: theme.palette.grey[50],
443
+ borderColor: theme.palette.grey[300],
444
+ },
445
+
446
+ ".MuiSvgIcon-root": {
447
+ color: theme.palette.common.black,
382
448
  },
383
449
  },
384
450
  }),
@@ -1086,12 +1152,21 @@ export const components: ThemeOptions["components"] = {
1086
1152
  borderStyle: theme.mixins.borderStyle,
1087
1153
  borderRadius: theme.mixins.borderRadius,
1088
1154
  borderColor: theme.palette.grey[500],
1155
+ boxShadow: `0 0 0 0 transparent`,
1156
+ backgroundColor: theme.palette.common.white,
1157
+ transition: theme.transitions.create(
1158
+ ["border-color", "background-color", "box-shadow"],
1159
+ {
1160
+ duration: theme.transitions.duration.short,
1161
+ }
1162
+ ),
1089
1163
 
1090
1164
  ...(ownerState.fullWidth && {
1091
1165
  width: "100%",
1092
1166
  }),
1093
1167
 
1094
1168
  ...(ownerState.readOnly === true && {
1169
+ borderColor: "transparent",
1095
1170
  backgroundColor: theme.palette.grey[50],
1096
1171
  }),
1097
1172
 
@@ -1365,24 +1440,82 @@ export const components: ThemeOptions["components"] = {
1365
1440
  MuiRadio: {
1366
1441
  defaultProps: {
1367
1442
  size: "small",
1443
+ icon: <></>,
1444
+ checkedIcon: <></>,
1368
1445
  },
1369
1446
  styleOverrides: {
1370
1447
  root: ({ theme }) => ({
1371
- "&:hover": {
1448
+ width: `${theme.typography.ui.lineHeight}em`,
1449
+ height: `${theme.typography.ui.lineHeight}em`,
1450
+ borderRadius: `${theme.typography.ui.lineHeight}em`,
1451
+ borderWidth: theme.mixins.borderWidth,
1452
+ borderStyle: theme.mixins.borderStyle,
1453
+ borderColor: theme.palette.grey[500],
1454
+ padding: 0,
1455
+ boxShadow: `0 0 0 0 transparent`,
1456
+ transition: theme.transitions.create(
1457
+ ["border-color", "background-color", "box-shadow"],
1458
+ {
1459
+ duration: theme.transitions.duration.short,
1460
+ }
1461
+ ),
1462
+
1463
+ "&::before": {
1464
+ content: "''",
1465
+ position: "absolute",
1466
+ width: "0.5em",
1467
+ height: "0.5em",
1468
+ borderRadius: "50%",
1372
1469
  backgroundColor: "transparent",
1470
+ transition: theme.transitions.create(["background-color"], {
1471
+ duration: theme.transitions.duration.short,
1472
+ }),
1473
+ },
1474
+
1475
+ ".MuiFormControlLabel-root:hover > &": {
1476
+ backgroundColor: "transparent",
1477
+ borderColor: theme.palette.grey[900],
1478
+ },
1479
+ ".Mui-error:hover > &": {
1480
+ backgroundColor: "transparent",
1481
+ borderColor: theme.palette.error.dark,
1482
+ "&::before": {
1483
+ backgroundColor: theme.palette.error.dark,
1484
+ },
1373
1485
  },
1374
- padding: 0,
1375
1486
  ".Mui-error > &": {
1376
- color: theme.palette.error.main,
1377
- "&:hover": {
1378
- color: theme.palette.error.dark,
1487
+ borderColor: theme.palette.error.main,
1488
+ "&::before": {
1489
+ backgroundColor: theme.palette.error.main,
1490
+ },
1491
+
1492
+ "&.Mui-focusVisible": {
1493
+ boxShadow: `0 0 0 2px ${theme.palette.background.default}, 0 0 0 4px ${theme.palette.error.main}`,
1379
1494
  },
1380
1495
  },
1381
1496
  "&.Mui-focusVisible": {
1382
- outlineColor: theme.palette.primary.main,
1383
- outlineOffset: 0,
1384
- outlineStyle: "solid",
1385
- outlineWidth: "2px",
1497
+ borderColor: theme.palette.grey[900],
1498
+ boxShadow: `0 0 0 2px ${theme.palette.background.default}, 0 0 0 4px ${theme.palette.primary.main}`,
1499
+ outline: "2px solid transparent",
1500
+ outlineOffset: "1px",
1501
+ },
1502
+ "&.Mui-checked": {
1503
+ position: "relative",
1504
+
1505
+ "&::before": {
1506
+ backgroundColor: theme.palette.primary.main,
1507
+ },
1508
+ },
1509
+ ".Mui-error > &.Mui-checked::before": {
1510
+ backgroundColor: theme.palette.error.main,
1511
+ },
1512
+ "&.Mui-disabled": {
1513
+ backgroundColor: theme.palette.grey[50],
1514
+ borderColor: theme.palette.grey[300],
1515
+
1516
+ "&::before": {
1517
+ backgroundColor: theme.palette.grey[300],
1518
+ },
1386
1519
  },
1387
1520
  }),
1388
1521
  },
@@ -80,7 +80,7 @@ export const palette: ThemeOptions["palette"] = {
80
80
  text: {
81
81
  primary: Tokens.ColorPaletteNeutral900,
82
82
  secondary: Tokens.ColorPaletteNeutral600,
83
- disabled: Tokens.ColorPaletteNeutral500,
83
+ disabled: Tokens.ColorPaletteNeutral600,
84
84
  },
85
85
  divider: Tokens.ColorBorderDisplay,
86
86
  background: {