@okta/odyssey-react-mui 1.9.6 → 1.9.7

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": "1.9.6",
3
+ "version": "1.9.7",
4
4
  "description": "React MUI components for Odyssey, Okta's design system",
5
5
  "author": "Okta, Inc.",
6
6
  "license": "Apache-2.0",
@@ -51,7 +51,7 @@
51
51
  "@mui/system": "^5.14.9",
52
52
  "@mui/utils": "^5.11.2",
53
53
  "@mui/x-date-pickers": "^5.0.15",
54
- "@okta/odyssey-design-tokens": "1.9.6",
54
+ "@okta/odyssey-design-tokens": "1.9.7",
55
55
  "date-fns": "^2.30.0",
56
56
  "i18next": "^23.5.1",
57
57
  "material-react-table": "^2.0.2",
@@ -63,5 +63,5 @@
63
63
  "react": ">=17 <19",
64
64
  "react-dom": ">=17 <19"
65
65
  },
66
- "gitHead": "6dec6e9312bbcda85401a6f29304a22cfd1bdc88"
66
+ "gitHead": "b27f35a95290d8e55eada55587b2b26804d1520e"
67
67
  }
@@ -27,7 +27,7 @@ import {
27
27
  useState,
28
28
  } from "react";
29
29
  import { GroupIcon, HomeIcon, UserIcon } from "./icons.generated";
30
- import { Typography } from "./Typography";
30
+ import { Subordinate } from "./Typography";
31
31
  import { useTranslation } from "react-i18next";
32
32
 
33
33
  export type BreadcrumbType = "listItem" | "menuItem" | "currentPage";
@@ -71,7 +71,7 @@ export const Breadcrumb = ({ children, href, iconName }: BreadcrumbProps) => {
71
71
  }
72
72
 
73
73
  if (breadcrumbType === "currentPage") {
74
- return <Typography>{breadcrumbContent}</Typography>;
74
+ return <Subordinate color="textPrimary">{breadcrumbContent}</Subordinate>;
75
75
  }
76
76
 
77
77
  // breadcrumbType === "listItem" is the default
@@ -152,7 +152,7 @@ const BreadcrumbList = ({
152
152
 
153
153
  {breadcrumbSections.insideMenu && (
154
154
  <>
155
- <ButtonBase onClick={onMenuButtonClick}>…</ButtonBase>
155
+ <ButtonBase onClick={onMenuButtonClick}>...</ButtonBase>
156
156
  <Menu
157
157
  open={Boolean(anchorEl)}
158
158
  onClose={onCloseMenu}
@@ -189,6 +189,12 @@ export type DataTableProps = {
189
189
  * firing on input change.
190
190
  */
191
191
  hasSearchSubmitButton?: boolean;
192
+ /**
193
+ * The debounce time, in milliseconds, for the search input firing
194
+ * `onChangeSearch` when changed. If `hasSearchSubmitButton` is true,
195
+ * this doesn't do anything.
196
+ */
197
+ searchDelayTime?: number;
192
198
  /**
193
199
  * Callback that fires when a row (or rows) is selected or unselected.
194
200
  */
@@ -259,6 +265,7 @@ const DataTable = ({
259
265
  reorderDataFn,
260
266
  totalRows,
261
267
  hasSearchSubmitButton,
268
+ searchDelayTime,
262
269
  paginationType = "paged",
263
270
  onRowSelectionChange,
264
271
  rowActionButtons,
@@ -644,6 +651,7 @@ const DataTable = ({
644
651
  onChangeSearch={hasSearch ? handleSearch : undefined}
645
652
  onChangeFilters={handleFilters}
646
653
  hasSearchSubmitButton={hasSearchSubmitButton}
654
+ searchDelayTime={searchDelayTime}
647
655
  additionalActions={tableSettings}
648
656
  filters={
649
657
  hasFilters
@@ -20,6 +20,7 @@ import { chipClasses } from "@mui/material/Chip";
20
20
  import { dividerClasses } from "@mui/material/Divider";
21
21
  import { formControlLabelClasses } from "@mui/material/FormControlLabel";
22
22
  import { formLabelClasses } from "@mui/material/FormLabel";
23
+ import { formGroupClasses } from "@mui/material/FormGroup";
23
24
  import { inputAdornmentClasses } from "@mui/material/InputAdornment";
24
25
  import { inputBaseClasses } from "@mui/material/InputBase";
25
26
  import { listItemIconClasses } from "@mui/material/ListItemIcon";
@@ -453,34 +454,46 @@ export const components = ({
453
454
  MuiBreadcrumbs: {
454
455
  styleOverrides: {
455
456
  li: {
456
- fontSize: odysseyTokens.TypographySizeBody,
457
- lineHeight: odysseyTokens.TypographyLineHeightUi,
457
+ fontSize: odysseyTokens.TypographySizeSubordinate,
458
+
459
+ "& svg": {
460
+ width: odysseyTokens.Spacing3,
461
+ },
462
+
463
+ "& > p": {
464
+ paddingInline: odysseyTokens.Spacing1,
465
+ },
458
466
 
459
467
  "& > a, & > button": {
460
468
  borderRadius: odysseyTokens.BorderRadiusTight,
461
469
  color: odysseyTokens.TypographyColorSubordinate,
462
470
  display: "flex",
463
471
  gap: odysseyTokens.Spacing1,
464
- padding: odysseyTokens.Spacing1,
472
+ paddingInline: odysseyTokens.Spacing1,
473
+ paddingBlock: 2,
465
474
  transitionProperty: "color, background-color",
466
475
  transitionDuration: "100ms",
467
476
  transitionTimingFunction: "linear",
468
477
 
469
478
  "&:hover": {
470
- backgroundColor: odysseyTokens.HueNeutral200,
479
+ backgroundColor: odysseyTokens.HueNeutral100,
471
480
  color: odysseyTokens.TypographyColorBody,
472
481
  },
473
482
 
474
483
  "&:focus-visible": {
475
- boxShadow: `0 0 0 2px ${odysseyTokens.HueNeutralWhite}, 0 0 0 4px ${odysseyTokens.PalettePrimaryMain}`,
476
- outline: "2px solid transparent",
477
- outlineOffset: "1px",
484
+ outlineWidth: 2,
485
+ outlineStyle: "solid",
486
+ outlineColor: odysseyTokens.PalettePrimaryMain,
487
+ outlineOffset: -2,
478
488
  },
479
489
  },
480
490
  },
481
491
  separator: {
482
492
  color: odysseyTokens.BorderColorDisplay,
483
- marginInline: odysseyTokens.Spacing1,
493
+ fontSize: odysseyTokens.TypographySizeSubordinate,
494
+ fontWeight: odysseyTokens.TypographyWeightBodyBold,
495
+ marginInlineStart: 6,
496
+ marginInlineEnd: 4,
484
497
  },
485
498
  },
486
499
  },
@@ -770,7 +783,7 @@ export const components = ({
770
783
  },
771
784
 
772
785
  [`.${svgIconClasses.root}`]: {
773
- color: odysseyTokens.HueNeutral900,
786
+ color: odysseyTokens.HueNeutral300,
774
787
  },
775
788
  },
776
789
  }),
@@ -948,8 +961,8 @@ export const components = ({
948
961
  },
949
962
  MuiCircularProgress: {
950
963
  defaultProps: {
951
- size: odysseyTokens.TypographyScale2,
952
- thickness: 8,
964
+ size: odysseyTokens.Spacing5,
965
+ thickness: 10,
953
966
  color: "primary",
954
967
  disableShrink: false,
955
968
  variant: "indeterminate",
@@ -957,7 +970,7 @@ export const components = ({
957
970
  styleOverrides: {
958
971
  root: ({ ownerState }) => ({
959
972
  ...(ownerState.color !== "inherit" && {
960
- color: odysseyTokens.PalettePrimaryDark,
973
+ color: odysseyTokens.PalettePrimaryMain,
961
974
  }),
962
975
  }),
963
976
  circle: ({ ownerState }) => ({
@@ -1449,6 +1462,9 @@ export const components = ({
1449
1462
  ...(ownerState.fullWidth && {
1450
1463
  maxWidth: "100%",
1451
1464
  }),
1465
+ [`& .${formGroupClasses.root}`]: {
1466
+ marginBlockStart: odysseyTokens.Spacing1,
1467
+ },
1452
1468
  }),
1453
1469
  },
1454
1470
  },
@@ -1474,6 +1490,9 @@ export const components = ({
1474
1490
  "&.Mui-disabled": {
1475
1491
  pointerEvents: "none",
1476
1492
  },
1493
+ [`& .${checkboxClasses.root}`]: {
1494
+ marginBlockStart: 0,
1495
+ },
1477
1496
  [`&:hover .${radioClasses.root}, &:hover .${checkboxClasses.root}`]: {
1478
1497
  color: odysseyTokens.TypographyColorBody,
1479
1498
  },
@@ -1492,6 +1511,7 @@ export const components = ({
1492
1511
  }),
1493
1512
  label: {
1494
1513
  gap: odysseyTokens.Spacing1,
1514
+ lineHeight: odysseyTokens.TypographyLineHeightUi,
1495
1515
  },
1496
1516
  asterisk: () => ({
1497
1517
  display: "none",
@@ -1994,8 +2014,8 @@ export const components = ({
1994
2014
  "&::before": {
1995
2015
  content: "''",
1996
2016
  position: "absolute",
1997
- width: "0.5em",
1998
- height: "0.5em",
2017
+ width: odysseyTokens.Spacing2,
2018
+ height: odysseyTokens.Spacing2,
1999
2019
  borderRadius: "50%",
2000
2020
  backgroundColor: "transparent",
2001
2021
  transition: theme.transitions.create(["background-color"], {
@@ -2039,10 +2059,10 @@ export const components = ({
2039
2059
  },
2040
2060
  "&.Mui-disabled": {
2041
2061
  backgroundColor: odysseyTokens.HueNeutral50,
2042
- borderColor: odysseyTokens.HueNeutral300,
2062
+ borderColor: odysseyTokens.BorderColorDisabled,
2043
2063
 
2044
2064
  "&.Mui-checked::before": {
2045
- backgroundColor: odysseyTokens.HueNeutral300,
2065
+ backgroundColor: odysseyTokens.BorderColorDisabled,
2046
2066
  },
2047
2067
  },
2048
2068
  }),