@up42/up-components 0.0.2 → 0.0.21
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/dist/cjs/index.js +15 -15
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/components/Button/Button.d.ts +3 -2
- package/dist/cjs/types/components/Button/{overrides.d.ts → Button.overrides.d.ts} +0 -0
- package/dist/cjs/types/components/Typography/Typography.d.ts +8 -0
- package/dist/cjs/types/{global/overrides/typography.d.ts → components/Typography/Typography.overrides.d.ts} +0 -0
- package/dist/cjs/types/components/Typography/Typography.stories.d.ts +6 -0
- package/dist/cjs/types/components/Typography/Typography.test.d.ts +1 -0
- package/dist/cjs/types/components/index.d.ts +3 -0
- package/dist/cjs/types/global/overrides/index.d.ts +0 -2
- package/dist/cjs/types/global/utils/types.d.ts +1 -0
- package/dist/esm/index.js +15 -15
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/Button/Button.d.ts +3 -2
- package/dist/esm/types/components/Button/{overrides.d.ts → Button.overrides.d.ts} +0 -0
- package/dist/esm/types/components/Typography/Typography.d.ts +8 -0
- package/dist/esm/types/{global/overrides/typography.d.ts → components/Typography/Typography.overrides.d.ts} +0 -0
- package/dist/esm/types/components/Typography/Typography.stories.d.ts +6 -0
- package/dist/esm/types/components/Typography/Typography.test.d.ts +1 -0
- package/dist/esm/types/components/index.d.ts +3 -0
- package/dist/esm/types/global/overrides/index.d.ts +0 -2
- package/dist/esm/types/global/utils/types.d.ts +1 -0
- package/dist/index.d.ts +33 -3
- package/package.json +4 -2
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { ButtonProps as MUIButtonProps } from '@mui/material/Button';
|
|
3
|
-
|
|
3
|
+
import { MUIGlobalOmit } from 'global/utils/types';
|
|
4
|
+
export declare type ButtonProps = MUIGlobalOmit<MUIButtonProps, {
|
|
4
5
|
loading?: boolean;
|
|
5
|
-
}
|
|
6
|
+
}>;
|
|
6
7
|
declare const Button: ({ color, variant, size, loading, children, ...props }: ButtonProps) => JSX.Element;
|
|
7
8
|
export default Button;
|
|
File without changes
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { TypographyProps as MUITypographyProps } from '@mui/material/Typography';
|
|
3
|
+
import { MUIGlobalOmit } from 'global/utils/types';
|
|
4
|
+
export declare type TypographyProps = MUIGlobalOmit<MUITypographyProps, {
|
|
5
|
+
component?: React.ElementType;
|
|
6
|
+
}>;
|
|
7
|
+
declare const Typography: React.FC<TypographyProps>;
|
|
8
|
+
export default Typography;
|
|
File without changes
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Story, Meta } from '@storybook/react';
|
|
2
|
+
import { TypographyProps } from './Typography';
|
|
3
|
+
declare const _default: Meta<import("@storybook/react").Args>;
|
|
4
|
+
export default _default;
|
|
5
|
+
export declare const Default: Story<TypographyProps>;
|
|
6
|
+
export declare const AllVariants: Story;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -4,10 +4,8 @@ export * from './menuItem';
|
|
|
4
4
|
export * from './tab';
|
|
5
5
|
export * from './tablePagination';
|
|
6
6
|
export * from './tabs';
|
|
7
|
-
export * from './typography';
|
|
8
7
|
export * from './form/checkbox';
|
|
9
8
|
export * from './form/input';
|
|
10
9
|
export * from './form/label';
|
|
11
10
|
export * from './form/radio';
|
|
12
11
|
export * from './form/switch';
|
|
13
|
-
export * from '../../components/Button/overrides';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare type MUIGlobalOmit<MuiProps, ComponentProps = unknown> = ComponentProps & Omit<MuiProps, 'classes' | 'disableElevation' | 'disableFocusRipple' | 'disableRipple' | 'focusRipple' | 'tabIndex' | 'action' | 'centerRipple' | 'disableTouchRipple' | 'focusVisibleClassName' | 'LinkComponent' | 'TouchRippleProps'>;
|
package/dist/index.d.ts
CHANGED
|
@@ -2,14 +2,44 @@
|
|
|
2
2
|
import { ThemeProviderProps } from '@mui/material/styles/ThemeProvider';
|
|
3
3
|
import * as _mui_material from '@mui/material';
|
|
4
4
|
import { ButtonProps as ButtonProps$1 } from '@mui/material/Button';
|
|
5
|
+
import { MUIGlobalOmit } from 'global/utils/types';
|
|
6
|
+
import { OverridesStyleRules } from '@mui/material/styles/overrides';
|
|
7
|
+
import React from 'react';
|
|
8
|
+
import { TypographyProps as TypographyProps$1 } from '@mui/material/Typography';
|
|
5
9
|
|
|
6
10
|
declare const UpComponentsProvider: (props: ThemeProviderProps) => JSX.Element;
|
|
7
11
|
|
|
8
12
|
declare const theme: _mui_material.Theme;
|
|
9
13
|
|
|
10
|
-
declare type ButtonProps = {
|
|
14
|
+
declare type ButtonProps = MUIGlobalOmit<ButtonProps$1, {
|
|
11
15
|
loading?: boolean;
|
|
12
|
-
}
|
|
16
|
+
}>;
|
|
13
17
|
declare const Button: ({ color, variant, size, loading, children, ...props }: ButtonProps) => JSX.Element;
|
|
14
18
|
|
|
15
|
-
|
|
19
|
+
declare const MuiButton: OverridesStyleRules;
|
|
20
|
+
declare const MuiButtonBase: {
|
|
21
|
+
defaultProps: {
|
|
22
|
+
disableRipple: boolean;
|
|
23
|
+
disableTouchRipple: boolean;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
declare const MuiIconButton: {
|
|
27
|
+
styleOverrides: {
|
|
28
|
+
root: {
|
|
29
|
+
color: string;
|
|
30
|
+
backgroundColor: string;
|
|
31
|
+
};
|
|
32
|
+
sizeSmall: {
|
|
33
|
+
padding: string;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
declare type TypographyProps = MUIGlobalOmit<TypographyProps$1, {
|
|
39
|
+
component?: React.ElementType;
|
|
40
|
+
}>;
|
|
41
|
+
declare const Typography: React.FC<TypographyProps>;
|
|
42
|
+
|
|
43
|
+
declare const typographyOverrides: OverridesStyleRules;
|
|
44
|
+
|
|
45
|
+
export { Button, MuiButton, MuiButtonBase, MuiIconButton, Typography, UpComponentsProvider as default, theme, typographyOverrides };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@up42/up-components",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.21",
|
|
4
4
|
"description": "UP42 Component Library",
|
|
5
5
|
"author": "Axel Fuhrmann axel.fuhrmann@up42.com",
|
|
6
6
|
"license": "ISC",
|
|
@@ -13,7 +13,9 @@
|
|
|
13
13
|
"scripts": {
|
|
14
14
|
"build": "rollup -c",
|
|
15
15
|
"build:watch": "rollup -c -w",
|
|
16
|
-
"test": "jest
|
|
16
|
+
"test": "jest",
|
|
17
|
+
"test:watch": "jest --watch",
|
|
18
|
+
"test:cov": "jest --coverage",
|
|
17
19
|
"storybook": "start-storybook -p 6006",
|
|
18
20
|
"storybook:build": "build-storybook",
|
|
19
21
|
"lint": "eslint src/. --fix",
|