@okta/odyssey-react-mui 0.14.3 → 0.14.6

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.
@@ -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
 
@@ -0,0 +1,21 @@
1
+ /*!
2
+ * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved.
3
+ * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
4
+ *
5
+ * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
6
+ * Unless required by applicable law or agreed to in writing, software
7
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
8
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9
+ *
10
+ * See the License for the specific language governing permissions and limitations under the License.
11
+ */
12
+
13
+ import type { ThemeOptions } from "@mui/material";
14
+ import * as Tokens from "@okta/odyssey-design-tokens";
15
+
16
+ export const mixins: ThemeOptions["mixins"] = {
17
+ maxWidth: Tokens.FontLineLengthMax,
18
+ borderRadius: Tokens.BorderRadiusBase,
19
+ borderStyle: Tokens.BorderStyleBase,
20
+ borderWidth: Tokens.BorderWidthBase,
21
+ };
@@ -0,0 +1,29 @@
1
+ /*!
2
+ * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved.
3
+ * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
4
+ *
5
+ * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
6
+ * Unless required by applicable law or agreed to in writing, software
7
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
8
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9
+ *
10
+ * See the License for the specific language governing permissions and limitations under the License.
11
+ */
12
+
13
+ declare module "@mui/material/styles" {
14
+ interface Mixins {
15
+ borderRadius?: string;
16
+ borderStyle?: string;
17
+ borderWidth?: string;
18
+ maxWidth?: string;
19
+ }
20
+
21
+ interface MixinsOptions {
22
+ borderRadius?: string;
23
+ borderStyle?: string;
24
+ borderWidth?: string;
25
+ maxWidth?: string;
26
+ }
27
+ }
28
+
29
+ export {};
@@ -27,7 +27,7 @@ export const palette: ThemeOptions["palette"] = {
27
27
  contrastText: Tokens.ColorTextBodyInverse,
28
28
  },
29
29
  secondary: {
30
- light: "#80C7CA",
30
+ light: "#80c7ca",
31
31
  main: Tokens.ColorPaletteTurquoise500,
32
32
  dark: "#004650",
33
33
  contrastText: Tokens.ColorTextBodyInverse,
@@ -61,26 +61,26 @@ export const palette: ThemeOptions["palette"] = {
61
61
  contrastText: Tokens.ColorTextBodyInverse,
62
62
  },
63
63
  grey: {
64
- 50: "#f5f5f6",
65
- 100: "#ebebed",
66
- 200: "#d7d7dc",
64
+ 50: Tokens.ColorPaletteNeutral000,
65
+ 100: Tokens.ColorPaletteNeutral100,
66
+ 200: Tokens.ColorPaletteNeutral200,
67
67
  300: "#c1c1c8",
68
68
  400: "#aaaab4",
69
- 500: "#8c8c96",
70
- 600: "#6e6e78",
69
+ 500: Tokens.ColorPaletteNeutral500,
70
+ 600: Tokens.ColorPaletteNeutral600,
71
71
  700: "#585862",
72
72
  800: "#41414b",
73
- 900: "#1d1d21",
73
+ 900: Tokens.ColorPaletteNeutral900,
74
74
  // These are "Accent" colors. MUI's palette matches them to the standard greys.
75
- A100: "#ebebed",
76
- A200: "#d7d7dc",
75
+ A100: Tokens.ColorPaletteNeutral100,
76
+ A200: Tokens.ColorPaletteNeutral200,
77
77
  A400: "#aaaab4",
78
78
  A700: "#585862",
79
79
  },
80
80
  text: {
81
- primary: Tokens.ColorNeutralDark,
82
- secondary: Tokens.ColorNeutralBase,
83
- disabled: Tokens.ColorNeutralBase, // We do not currently have a unique disabled color.
81
+ primary: Tokens.ColorPaletteNeutral900,
82
+ secondary: Tokens.ColorPaletteNeutral600,
83
+ disabled: Tokens.ColorPaletteNeutral500,
84
84
  },
85
85
  divider: Tokens.ColorBorderDisplay,
86
86
  background: {
@@ -94,7 +94,7 @@ export const palette: ThemeOptions["palette"] = {
94
94
  hoverOpacity: 0.04,
95
95
  selected: "rgba(0, 0, 0, 0.08)",
96
96
  selectedOpacity: 0.08,
97
- disabled: "rgba(0, 0, 0, 0.26)",
97
+ disabled: Tokens.ColorPaletteNeutral200,
98
98
  disabledBackground: "rgba(0, 0, 0, 0.12)",
99
99
  disabledOpacity: 0.38,
100
100
  focus: "rgba(0, 0, 0, 0.12)",
@@ -15,6 +15,8 @@ import { createTheme } from "@mui/material/styles";
15
15
  import { palette } from "./palette";
16
16
  import "./palette.types";
17
17
  import { shape } from "./shape";
18
+ import { mixins } from "./mixins";
19
+ import "./mixins.types";
18
20
  import { spacing } from "./spacing";
19
21
  import { typography } from "./typography";
20
22
  import "./typography.types";
@@ -24,6 +26,7 @@ import "./components.types";
24
26
  export const theme = createTheme({
25
27
  palette,
26
28
  shape,
29
+ mixins,
27
30
  spacing,
28
31
  typography,
29
32
  components,