Skip to content

Commit

Permalink
chore: update dependencies (#66)
Browse files Browse the repository at this point in the history
  • Loading branch information
seankwarren authored Feb 28, 2024
1 parent a06c3dd commit 30a491e
Show file tree
Hide file tree
Showing 13 changed files with 481 additions and 144 deletions.
2 changes: 1 addition & 1 deletion dist/hooks/useCopyToClipboard.d.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export declare const useCopyToClipboard: (alertProps?: {}) => (textToCopy: string, content: string) => void;
export declare const useCopyToClipboard: () => (textToCopy: string, content: string) => void;
10 changes: 3 additions & 7 deletions dist/hooks/useCopyToClipboard.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
import { enqueueSnackbar } from "notistack";
import { useCallback } from "react";
import { useAlert } from "../mui/components/custom/alert/hooks/useAlert";
import { copyToClipboard } from "../utils/clipboard";
export const useCopyToClipboard = (alertProps = {}) => {
const alert = useAlert();
export const useCopyToClipboard = () => {
return useCallback((textToCopy, content) => {
copyToClipboard(textToCopy, () => {
alert === null || alert === void 0 ? void 0 : alert.show({
content,
...alertProps,
});
enqueueSnackbar(content, { variant: "success" });
});
}, []);
};
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
/// <reference types="react" />
import { Theme } from "@mui/material/styles";
export declare const InfoWidgetContainer: import("@mui/styles").StyledComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "classes" | "className"> & import("@mui/styles").StyledComponentProps<"root"> & Omit<{
export declare const InfoWidgetContainer: import("@mui/styles").StyledComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "className" | "classes"> & import("@mui/styles").StyledComponentProps<"root"> & Omit<{
theme: Theme;
}, "className" | "theme"> & {
className?: string | undefined;
theme?: Theme | undefined;
}>;
export declare const Header: import("@mui/styles").StyledComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "classes" | "className"> & import("@mui/styles").StyledComponentProps<"root"> & Omit<{
export declare const Header: import("@mui/styles").StyledComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "className" | "classes"> & import("@mui/styles").StyledComponentProps<"root"> & Omit<{
theme: Theme;
}, "className" | "theme"> & {
className?: string | undefined;
theme?: Theme | undefined;
}>;
export declare const Content: import("@mui/styles").StyledComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "classes" | "className"> & import("@mui/styles").StyledComponentProps<"root"> & Omit<{
export declare const Content: import("@mui/styles").StyledComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "className" | "classes"> & import("@mui/styles").StyledComponentProps<"root"> & Omit<{
theme: Theme;
}, "className" | "theme"> & {
className?: string | undefined;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
/// <reference types="react" />
import { Theme } from "@mui/material/styles";
export declare const TotalContainer: import("@mui/styles").StyledComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "classes" | "className"> & import("@mui/styles").StyledComponentProps<"root"> & Omit<{
export declare const TotalContainer: import("@mui/styles").StyledComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "className" | "classes"> & import("@mui/styles").StyledComponentProps<"root"> & Omit<{
theme: Theme;
isBorder: boolean;
}, "className" | "theme"> & {
className?: string | undefined;
theme?: Theme | undefined;
}>;
export declare const ColorBox: import("@mui/styles").StyledComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "classes" | "className"> & import("@mui/styles").StyledComponentProps<"root"> & Omit<{
export declare const ColorBox: import("@mui/styles").StyledComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "className" | "classes"> & import("@mui/styles").StyledComponentProps<"root"> & Omit<{
color: string;
isPointer: boolean;
}, "className" | "theme"> & {
Expand Down
10 changes: 5 additions & 5 deletions dist/mui/components/popover/info-popover/InfoPopover.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,31 @@ import { SxProps, Theme } from "@mui/material/styles";
import React from "react";
export declare const InfoIconButton: import("@mui/styles").StyledComponent<Omit<import("@mui/material/IconButton").IconButtonOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
ref?: ((instance: HTMLButtonElement | null) => void) | React.RefObject<HTMLButtonElement> | null | undefined;
}, "classes" | "className" | "style" | "tabIndex" | "color" | "children" | "sx" | "action" | "centerRipple" | "disabled" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "edge" | "size">, "classes" | "className"> & import("@mui/styles").StyledComponentProps<"root"> & Omit<Omit<import("@mui/material/IconButton").IconButtonOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
}, "className" | "style" | "classes" | "children" | "color" | "sx" | "tabIndex" | "action" | "disabled" | "size" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "edge">, "className" | "classes"> & import("@mui/styles").StyledComponentProps<"root"> & Omit<Omit<import("@mui/material/IconButton").IconButtonOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
ref?: ((instance: HTMLButtonElement | null) => void) | React.RefObject<HTMLButtonElement> | null | undefined;
}, "classes" | "className" | "style" | "tabIndex" | "color" | "children" | "sx" | "action" | "centerRipple" | "disabled" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "edge" | "size">, "ref">, "className" | "theme"> & {
}, "className" | "style" | "classes" | "children" | "color" | "sx" | "tabIndex" | "action" | "disabled" | "size" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "edge">, "ref">, "className" | "theme"> & {
className?: string | undefined;
theme?: import("@mui/styles").DefaultTheme | undefined;
}>;
export declare const PopoverTitle: import("@mui/styles").StyledComponent<Omit<import("@mui/material/Typography").TypographyOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
ref?: ((instance: HTMLSpanElement | null) => void) | React.RefObject<HTMLSpanElement> | null | undefined;
}, "classes" | "className" | "style" | "color" | "children" | "top" | "bottom" | "left" | "right" | "sx" | "variant" | "p" | "border" | "boxShadow" | "fontWeight" | "zIndex" | "alignContent" | "alignItems" | "alignSelf" | "boxSizing" | "columnGap" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontFamily" | "fontSize" | "fontStyle" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "height" | "justifyContent" | "justifyItems" | "justifySelf" | "letterSpacing" | "lineHeight" | "marginBlockEnd" | "marginBlockStart" | "marginBottom" | "marginInlineEnd" | "marginInlineStart" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "order" | "paddingBlockEnd" | "paddingBlockStart" | "paddingBottom" | "paddingInlineEnd" | "paddingInlineStart" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "visibility" | "whiteSpace" | "width" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "marginBlock" | "marginInline" | "overflow" | "padding" | "paddingBlock" | "paddingInline" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "typography" | "displayPrint" | "align" | "gutterBottom" | "noWrap" | "paragraph" | "variantMapping">, "classes" | "className"> & import("@mui/styles").StyledComponentProps<"root"> & Omit<{
}, "variant" | "pr" | "mt" | "m" | "pb" | "ml" | "className" | "style" | "classes" | "children" | "color" | "fontSize" | "sx" | "p" | "height" | "width" | "display" | "fontFamily" | "fontStyle" | "fontWeight" | "letterSpacing" | "order" | "overflow" | "visibility" | "border" | "boxShadow" | "zIndex" | "alignContent" | "alignItems" | "alignSelf" | "bottom" | "boxSizing" | "columnGap" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "justifyContent" | "justifyItems" | "justifySelf" | "left" | "lineHeight" | "marginBlockEnd" | "marginBlockStart" | "marginBottom" | "marginInlineEnd" | "marginInlineStart" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "paddingBlockEnd" | "paddingBlockStart" | "paddingBottom" | "paddingInlineEnd" | "paddingInlineStart" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "right" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "top" | "whiteSpace" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "marginBlock" | "marginInline" | "padding" | "paddingBlock" | "paddingInline" | "bgcolor" | "mr" | "mb" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "typography" | "displayPrint" | "align" | "gutterBottom" | "noWrap" | "paragraph" | "variantMapping">, "className" | "classes"> & import("@mui/styles").StyledComponentProps<"root"> & Omit<{
theme: Theme;
}, "className" | "theme"> & {
className?: string | undefined;
theme?: Theme | undefined;
}>;
export declare const PopoverText: import("@mui/styles").StyledComponent<Omit<import("@mui/material/Typography").TypographyOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
ref?: ((instance: HTMLSpanElement | null) => void) | React.RefObject<HTMLSpanElement> | null | undefined;
}, "classes" | "className" | "style" | "color" | "children" | "top" | "bottom" | "left" | "right" | "sx" | "variant" | "p" | "border" | "boxShadow" | "fontWeight" | "zIndex" | "alignContent" | "alignItems" | "alignSelf" | "boxSizing" | "columnGap" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontFamily" | "fontSize" | "fontStyle" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "height" | "justifyContent" | "justifyItems" | "justifySelf" | "letterSpacing" | "lineHeight" | "marginBlockEnd" | "marginBlockStart" | "marginBottom" | "marginInlineEnd" | "marginInlineStart" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "order" | "paddingBlockEnd" | "paddingBlockStart" | "paddingBottom" | "paddingInlineEnd" | "paddingInlineStart" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "visibility" | "whiteSpace" | "width" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "marginBlock" | "marginInline" | "overflow" | "padding" | "paddingBlock" | "paddingInline" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "typography" | "displayPrint" | "align" | "gutterBottom" | "noWrap" | "paragraph" | "variantMapping">, "classes" | "className"> & import("@mui/styles").StyledComponentProps<"root"> & Omit<{
}, "variant" | "pr" | "mt" | "m" | "pb" | "ml" | "className" | "style" | "classes" | "children" | "color" | "fontSize" | "sx" | "p" | "height" | "width" | "display" | "fontFamily" | "fontStyle" | "fontWeight" | "letterSpacing" | "order" | "overflow" | "visibility" | "border" | "boxShadow" | "zIndex" | "alignContent" | "alignItems" | "alignSelf" | "bottom" | "boxSizing" | "columnGap" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "justifyContent" | "justifyItems" | "justifySelf" | "left" | "lineHeight" | "marginBlockEnd" | "marginBlockStart" | "marginBottom" | "marginInlineEnd" | "marginInlineStart" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "paddingBlockEnd" | "paddingBlockStart" | "paddingBottom" | "paddingInlineEnd" | "paddingInlineStart" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "right" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "top" | "whiteSpace" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "marginBlock" | "marginInline" | "padding" | "paddingBlock" | "paddingInline" | "bgcolor" | "mr" | "mb" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "typography" | "displayPrint" | "align" | "gutterBottom" | "noWrap" | "paragraph" | "variantMapping">, "className" | "classes"> & import("@mui/styles").StyledComponentProps<"root"> & Omit<{
theme: Theme;
}, "className" | "theme"> & {
className?: string | undefined;
theme?: Theme | undefined;
}>;
export declare const PopoverButton: import("@mui/styles").StyledComponent<Omit<import("@mui/material/Button").ButtonOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
ref?: ((instance: HTMLButtonElement | null) => void) | React.RefObject<HTMLButtonElement> | null | undefined;
}, "classes" | "className" | "style" | "tabIndex" | "color" | "children" | "sx" | "variant" | "action" | "centerRipple" | "disabled" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "size" | "href" | "disableElevation" | "fullWidth" | "startIcon" | "endIcon">, "classes" | "className"> & import("@mui/styles").StyledComponentProps<"root"> & Omit<{
}, "variant" | "className" | "style" | "classes" | "children" | "color" | "sx" | "tabIndex" | "href" | "action" | "disabled" | "size" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableElevation" | "disableFocusRipple" | "fullWidth" | "startIcon" | "endIcon">, "className" | "classes"> & import("@mui/styles").StyledComponentProps<"root"> & Omit<{
theme: Theme;
}, "className" | "theme"> & {
className?: string | undefined;
Expand Down
4 changes: 2 additions & 2 deletions dist/other/text-editor/TextEditor.styled.d.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
/// <reference types="react" />
import { Theme } from "@mui/material/styles";
export declare const EditorContainer: import("@mui/styles").StyledComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "classes" | "className"> & import("@mui/styles").StyledComponentProps<"root"> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "className" | "theme"> & {
export declare const EditorContainer: import("@mui/styles").StyledComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "className" | "classes"> & import("@mui/styles").StyledComponentProps<"root"> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "className" | "theme"> & {
className?: string | undefined;
theme?: import("@mui/styles").DefaultTheme | undefined;
}>;
export declare const ViewerContainer: import("@mui/styles").StyledComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "classes" | "className"> & import("@mui/styles").StyledComponentProps<"root"> & Omit<{
export declare const ViewerContainer: import("@mui/styles").StyledComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "className" | "classes"> & import("@mui/styles").StyledComponentProps<"root"> & Omit<{
theme: Theme;
}, "className" | "theme"> & {
className?: string | undefined;
Expand Down
4 changes: 4 additions & 0 deletions dist/theme/provider/AlertProvider.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import React from "react";
export declare function AlertProvider({ children }: {
children: React.ReactNode;
}): React.JSX.Element;
26 changes: 26 additions & 0 deletions dist/theme/provider/AlertProvider.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/* eslint-disable react/jsx-props-no-spreading */
import Alert from "@mui/material/Alert";
import { makeStyles } from "@mui/styles";
import { SnackbarContent, SnackbarProvider, useSnackbar } from "notistack";
import React, { forwardRef } from "react";
const useStyles = makeStyles({
root: {
maxWidth: "500px",
},
});
const customBasicAlert = forwardRef(({ id, variant, ...props }, ref) => {
const { closeSnackbar } = useSnackbar();
const mappedVariant = variant === "default" ? "info" : variant;
return (React.createElement(SnackbarContent, { ref: ref },
React.createElement(Alert, { severity: mappedVariant, className: `alert alert-${mappedVariant}`, onClose: () => closeSnackbar(id), variant: "filled" }, props.message)));
});
export function AlertProvider({ children }) {
const classes = useStyles();
return (React.createElement(SnackbarProvider, { maxSnack: 3, autoHideDuration: 4000, Components: {
error: customBasicAlert,
warning: customBasicAlert,
info: customBasicAlert,
success: customBasicAlert,
default: customBasicAlert,
}, anchorOrigin: { vertical: "bottom", horizontal: "right" }, classes: { containerRoot: classes.root } }, children));
}
4 changes: 1 addition & 3 deletions dist/theme/provider/ThemeProvider.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import { StyledEngineProvider, ThemeProvider as BaseThemeProvider } from "@mui/material/styles";
import React from "react";
import { AlertContextProvider } from "../../mui/components/custom/alert/AlertContextProvider";
import { LightMaterialUITheme } from "../theme";
export default function ThemeProvider({ children, theme = LightMaterialUITheme, }) {
return (React.createElement(StyledEngineProvider, { injectFirst: true },
React.createElement(BaseThemeProvider, { theme: theme },
React.createElement(AlertContextProvider, null, children))));
React.createElement(BaseThemeProvider, { theme: theme }, children)));
}
1 change: 1 addition & 0 deletions dist/theme/provider/index.d.ts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export { default } from "./ThemeProvider";
export { AlertProvider } from "./AlertProvider";
Loading

0 comments on commit 30a491e

Please sign in to comment.