@popmenu/common-ui 0.121.0 → 0.121.1
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/build/components/Button/Button.d.ts +2 -2
- package/build/components/Button/ButtonProps.d.ts +5 -4
- package/build/components/Chip/Chip.d.ts +2 -2
- package/build/components/Chip/ChipProps.d.ts +7 -3
- package/build/components/Chip/ChipStyles.d.ts +1 -1
- package/build/components/Link/Link.d.ts +9 -1
- package/build/components/Typography/Typography.d.ts +2 -2
- package/build/components/Typography/TypographyProps.d.ts +7 -5
- package/build/index.es.js +3 -0
- package/build/index.es.js.map +1 -1
- package/build/index.js +3 -0
- package/build/index.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { ButtonProps } from './ButtonProps';
|
|
3
3
|
export declare const Button: {
|
|
4
|
-
(props: ButtonProps): JSX.Element;
|
|
4
|
+
<C extends React.ElementType<any> = "button">(props: ButtonProps<C>): JSX.Element;
|
|
5
5
|
displayName: string;
|
|
6
6
|
};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { ButtonProps as MuiButtonProps } from '@material-ui/core/Button';
|
|
2
|
-
import { RefObject } from 'react';
|
|
3
|
-
export
|
|
2
|
+
import React, { RefObject } from 'react';
|
|
3
|
+
export declare type ButtonProps<C extends React.ElementType = 'button'> = MuiButtonProps<C, {
|
|
4
|
+
component?: C;
|
|
5
|
+
}> & {
|
|
4
6
|
ButtonRef?: RefObject<HTMLButtonElement>;
|
|
5
|
-
component?: keyof JSX.IntrinsicElements | React.ComponentType<any>;
|
|
6
7
|
/** Sets loading state for Button. */
|
|
7
8
|
loading?: boolean;
|
|
8
9
|
/** Sets the text transformation property of a button. */
|
|
9
10
|
textTransform?: 'uppercase' | 'lowercase' | 'capitalize' | 'none';
|
|
10
|
-
}
|
|
11
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { ChipProps } from './ChipProps';
|
|
3
3
|
export declare const Chip: {
|
|
4
|
-
(props: ChipProps): JSX.Element;
|
|
4
|
+
<C extends React.ElementType<any> = "div">(props: ChipProps<C>): JSX.Element;
|
|
5
5
|
displayName: string;
|
|
6
6
|
};
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ChipProps as MuiChipProps, ChipTypeMap } from '@material-ui/core/Chip';
|
|
3
|
+
export declare type DefaultChipComponent = ChipTypeMap['defaultComponent'];
|
|
4
|
+
export declare type ChipProps<C extends React.ElementType = DefaultChipComponent> = MuiChipProps<C, {
|
|
5
|
+
component?: C;
|
|
6
|
+
}> & {
|
|
3
7
|
severity?: 'success' | 'info' | 'warning' | 'error';
|
|
4
|
-
}
|
|
8
|
+
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { ChipProps } from './ChipProps';
|
|
2
|
-
export declare const useChipStyles: (props: ChipProps) => import("@material-ui/styles").ClassNameMap<string>;
|
|
2
|
+
export declare const useChipStyles: (props: ChipProps<any>) => import("@material-ui/styles").ClassNameMap<string>;
|
|
@@ -1,3 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { LinkProps } from '@material-ui/core';
|
|
3
|
-
|
|
3
|
+
interface LinkType {
|
|
4
|
+
<C extends React.ElementType = 'a'>(props: LinkProps<C> & {
|
|
5
|
+
component?: C;
|
|
6
|
+
}): React.ReactElement;
|
|
7
|
+
defaultProps?: Partial<LinkProps>;
|
|
8
|
+
displayName?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare const Link: LinkType;
|
|
11
|
+
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { TypographyProps } from './TypographyProps';
|
|
3
3
|
export declare const Typography: {
|
|
4
|
-
(props: TypographyProps): JSX.Element;
|
|
4
|
+
<C extends React.ElementType<any> = "span">(props: TypographyProps<C>): JSX.Element;
|
|
5
5
|
displayName: string;
|
|
6
6
|
defaultProps: {
|
|
7
7
|
variant: import("@material-ui/core").TypographyVariant;
|
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
import { TypographyProps as MuiTypographyProps } from '@material-ui/core';
|
|
1
|
+
import { TypographyProps as MuiTypographyProps, TypographyTypeMap } from '@material-ui/core';
|
|
2
2
|
import { Variant } from '@material-ui/core/styles/createTypography';
|
|
3
|
-
import { RefObject } from 'react';
|
|
3
|
+
import React, { RefObject } from 'react';
|
|
4
4
|
export declare type ThemeColors = 'primary.light' | 'primary' | 'primary.dark' | 'secondary.light' | 'secondary' | 'secondary.dark' | 'info.light' | 'info' | 'info.dark' | 'success.light' | 'success' | 'success.dark' | 'error.light' | 'error' | 'error.dark' | 'warning.light' | 'warning' | 'warning.dark' | 'white' | 'black' | 'grey.100' | 'grey.200' | 'grey.300' | 'grey.400' | 'grey.500' | 'grey.600' | 'grey.700' | 'grey.800' | 'grey.900' | 'textPrimary' | 'textSecondary';
|
|
5
5
|
export declare const defaultTypographyProps: {
|
|
6
6
|
variant: Variant;
|
|
7
7
|
};
|
|
8
|
-
export
|
|
8
|
+
export declare type DefaultTypographyComponent = TypographyTypeMap['defaultComponent'];
|
|
9
|
+
export declare type TypographyProps<C extends React.ElementType = DefaultTypographyComponent> = Omit<MuiTypographyProps<C, {
|
|
10
|
+
component?: C;
|
|
11
|
+
}>, 'color' | 'ref'> & {
|
|
9
12
|
TypographyRef?: RefObject<HTMLParagraphElement | HTMLHeadingElement | HTMLSpanElement>;
|
|
10
13
|
color?: ThemeColors;
|
|
11
|
-
component?: keyof JSX.IntrinsicElements | React.ComponentType<any>;
|
|
12
14
|
weight?: 'regular' | 'medium' | 'semi-bold' | 'bold';
|
|
13
|
-
}
|
|
15
|
+
};
|
package/build/index.es.js
CHANGED
|
@@ -615,6 +615,8 @@ var getBorder = function (theme) { return function (props) {
|
|
|
615
615
|
}
|
|
616
616
|
return borderColor;
|
|
617
617
|
}; };
|
|
618
|
+
// using `any` here is a bit of cheating but it doesn't matter since this doesn't depend on
|
|
619
|
+
// any component-specific props
|
|
618
620
|
var useChipStyles = makeStyles$1(function (theme) { return ({
|
|
619
621
|
root: {
|
|
620
622
|
background: getBackground(theme),
|
|
@@ -862,6 +864,7 @@ var useLinkStyles = makeStyles$1(function (theme) { return ({
|
|
|
862
864
|
},
|
|
863
865
|
}); });
|
|
864
866
|
|
|
867
|
+
// eslint-disable-next-line react/display-name -- false positive
|
|
865
868
|
var Link = forwardRef(function (props, ref) {
|
|
866
869
|
var children = props.children, muiProps = __rest(props, ["children"]);
|
|
867
870
|
var classes = useLinkStyles(props);
|