@zesty-io/material 0.12.2 → 0.12.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.
@@ -9,7 +9,7 @@ const SSOButtonGroup = ({ children, sx, authServiceUrl, onSuccess, onError, }) =
9
9
  onSuccess(message);
10
10
  }
11
11
  else if (ssoError && onError) {
12
- onError(ssoError);
12
+ onError(ssoError.message);
13
13
  }
14
14
  }, [isAuthenticated, ssoError]);
15
15
  return (_jsx(Box, { display: "flex", flexDirection: "column", gap: 2, sx: sx, children: React.Children.map(children, (child) => {
package/es/theme/index.js CHANGED
@@ -562,6 +562,14 @@ const components = {
562
562
  },
563
563
  },
564
564
  },
565
+ MuiListItemText: {
566
+ styleOverrides: {
567
+ dense: {
568
+ marginTop: "4px",
569
+ marginBottom: "4px",
570
+ },
571
+ },
572
+ },
565
573
  };
566
574
  export let theme = createTheme({
567
575
  typography,
@@ -1,2 +1,7 @@
1
1
  export declare type SSOService = "github" | "google" | "azure";
2
- export declare const useSSO: (authServiceUrl: string) => readonly [(service: SSOService) => void, boolean, string, {}];
2
+ interface Error {
3
+ message: string;
4
+ status: string;
5
+ }
6
+ export declare const useSSO: (authServiceUrl: string) => readonly [(service: SSOService) => void, boolean, Error | null, {}];
7
+ export {};
@@ -1,9 +1,10 @@
1
1
  import { useEffect, useState } from "react";
2
+ ;
2
3
  let tabWindow = null;
3
4
  export const useSSO = (authServiceUrl) => {
4
5
  const [message, setMessage] = useState({});
5
6
  const [isAuthenticated, setIsAuthenticated] = useState(false);
6
- const [error, setError] = useState("");
7
+ const [error, setError] = useState(null);
7
8
  const receiveMessage = (event) => {
8
9
  if (event.origin === authServiceUrl && event.data.source === "zesty") {
9
10
  setMessage(event.data);
@@ -11,7 +12,10 @@ export const useSSO = (authServiceUrl) => {
11
12
  setIsAuthenticated(true);
12
13
  }
13
14
  else {
14
- setError(event.data.error_message);
15
+ setError({
16
+ message: event.data.error_message,
17
+ status: event.data.status,
18
+ });
15
19
  }
16
20
  if (tabWindow) {
17
21
  tabWindow.close();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zesty-io/material",
3
- "version": "0.12.2",
3
+ "version": "0.12.3",
4
4
  "description": "Contains custom components which are in addition to the @mui design-system",
5
5
  "author": "Zesty.io",
6
6
  "license": "MIT",