@up42/up-components 0.0.2 → 0.0.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.
- package/README.md +107 -2
- package/dist/cjs/index.js +182 -28
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/components/Avatar/Avatar.d.ts +9 -0
- package/dist/cjs/types/{global/overrides/avatar.d.ts → components/Avatar/Avatar.overrides.d.ts} +0 -0
- package/dist/cjs/types/components/Avatar/Avatar.stories.d.ts +7 -0
- package/dist/cjs/types/components/Avatar/Avatar.test.d.ts +1 -0
- package/dist/cjs/types/components/Button/Button.d.ts +4 -4
- package/dist/cjs/types/components/Button/{overrides.d.ts → Button.overrides.d.ts} +0 -0
- package/dist/cjs/types/components/Chip/Chip.d.ts +5 -0
- package/dist/cjs/types/components/Chip/Chip.overrides.d.ts +2 -0
- package/dist/cjs/types/components/Chip/Chip.stories.d.ts +5 -0
- package/dist/cjs/types/components/Chip/Chip.test.d.ts +1 -0
- package/dist/cjs/types/components/Typography/Typography.d.ts +7 -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 +4 -1
- package/dist/cjs/types/global/UpComponentsProvider/UpComponentsProvider.d.ts +3 -0
- package/dist/cjs/types/global/overrides/index.d.ts +0 -3
- package/dist/cjs/types/global/theme.d.ts +1 -2
- package/dist/cjs/types/global/utils/types.d.ts +1 -0
- package/dist/cjs/types/index.d.ts +4 -4
- package/dist/esm/index.js +181 -28
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/Avatar/Avatar.d.ts +9 -0
- package/dist/esm/types/{global/overrides/avatar.d.ts → components/Avatar/Avatar.overrides.d.ts} +0 -0
- package/dist/esm/types/components/Avatar/Avatar.stories.d.ts +7 -0
- package/dist/esm/types/components/Avatar/Avatar.test.d.ts +1 -0
- package/dist/esm/types/components/Button/Button.d.ts +4 -4
- package/dist/esm/types/components/Button/{overrides.d.ts → Button.overrides.d.ts} +0 -0
- package/dist/esm/types/components/Chip/Chip.d.ts +5 -0
- package/dist/esm/types/components/Chip/Chip.overrides.d.ts +2 -0
- package/dist/esm/types/components/Chip/Chip.stories.d.ts +5 -0
- package/dist/esm/types/components/Chip/Chip.test.d.ts +1 -0
- package/dist/esm/types/components/Typography/Typography.d.ts +7 -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 +4 -1
- package/dist/esm/types/global/UpComponentsProvider/UpComponentsProvider.d.ts +3 -0
- package/dist/esm/types/global/overrides/index.d.ts +0 -3
- package/dist/esm/types/global/theme.d.ts +1 -2
- package/dist/esm/types/global/utils/types.d.ts +1 -0
- package/dist/esm/types/index.d.ts +4 -4
- package/dist/index.d.ts +25 -5
- package/package.json +4 -2
- package/dist/cjs/types/global/UpComponentsProvider/index.d.ts +0 -4
- package/dist/esm/types/global/UpComponentsProvider/index.d.ts +0 -4
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { AvatarProps as MUIAvatarProps } from '@mui/material';
|
|
3
|
+
import { MUIGlobalOmit } from 'global/utils/types';
|
|
4
|
+
export declare type AvatarProps = MUIGlobalOmit<Omit<MUIAvatarProps, 'children' | 'alt' | 'imgProps' | 'sizes' | 'src' | 'srcSet' | 'variant'>, {
|
|
5
|
+
firstName?: string;
|
|
6
|
+
lastName?: string;
|
|
7
|
+
icon?: React.ReactNode;
|
|
8
|
+
}>;
|
|
9
|
+
export declare const Avatar: ({ icon, firstName, lastName, ...props }: AvatarProps) => JSX.Element;
|
package/dist/esm/types/{global/overrides/avatar.d.ts → components/Avatar/Avatar.overrides.d.ts}
RENAMED
|
File without changes
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Story, Meta } from '@storybook/react';
|
|
2
|
+
import { AvatarProps } from './Avatar';
|
|
3
|
+
declare const _default: Meta<import("@storybook/react").Args>;
|
|
4
|
+
export default _default;
|
|
5
|
+
export declare const Default: Story<AvatarProps>;
|
|
6
|
+
export declare const WithName: Story;
|
|
7
|
+
export declare const WithIcon: Story;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
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
|
-
declare const Button: ({ color, variant, size, loading, children, ...props }: ButtonProps) => JSX.Element;
|
|
7
|
-
export default Button;
|
|
6
|
+
}>;
|
|
7
|
+
export declare const Button: ({ color, variant, size, loading, children, ...props }: ButtonProps) => JSX.Element;
|
|
File without changes
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ChipProps as MUIChipProps } from '@mui/material';
|
|
3
|
+
import { MUIGlobalOmit } from 'global/utils/types';
|
|
4
|
+
export declare type ChipProps = MUIGlobalOmit<Omit<MUIChipProps, 'size'>>;
|
|
5
|
+
export declare const Chip: ({ label, ...props }: ChipProps) => JSX.Element;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Meta, Story } from '@storybook/react';
|
|
2
|
+
declare const _default: Meta<import("@storybook/react").Args>;
|
|
3
|
+
export default _default;
|
|
4
|
+
export declare const Default: Story<Omit<Omit<import("@mui/material").ChipProps<"div", {}>, "size">, "disableFocusRipple" | "disableRipple" | "classes" | "tabIndex" | "action" | "centerRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "TouchRippleProps" | "disableElevation">>;
|
|
5
|
+
export declare const ColorVariants: Story;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
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
|
+
export declare const Typography: React.FC<TypographyProps>;
|
|
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 {};
|
|
@@ -1,13 +1,10 @@
|
|
|
1
|
-
export * from './avatar';
|
|
2
1
|
export * from './container';
|
|
3
2
|
export * from './menuItem';
|
|
4
3
|
export * from './tab';
|
|
5
4
|
export * from './tablePagination';
|
|
6
5
|
export * from './tabs';
|
|
7
|
-
export * from './typography';
|
|
8
6
|
export * from './form/checkbox';
|
|
9
7
|
export * from './form/input';
|
|
10
8
|
export * from './form/label';
|
|
11
9
|
export * from './form/radio';
|
|
12
10
|
export * from './form/switch';
|
|
13
|
-
export * from '../../components/Button/overrides';
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
declare const theme: import("@mui/material").Theme;
|
|
2
|
-
export default theme;
|
|
1
|
+
export declare const theme: import("@mui/material").Theme;
|
|
@@ -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'>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
export {
|
|
3
|
-
export
|
|
4
|
-
export
|
|
1
|
+
export * from '@mui/material';
|
|
2
|
+
export { UpComponentsProvider } from './global/UpComponentsProvider/UpComponentsProvider';
|
|
3
|
+
export { theme } from './global/theme';
|
|
4
|
+
export { Button, Typography, Chip, Avatar } from './components';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,15 +1,35 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { ThemeProviderProps } from '@mui/material/styles/ThemeProvider';
|
|
3
2
|
import * as _mui_material from '@mui/material';
|
|
3
|
+
import { ChipProps as ChipProps$1, AvatarProps as AvatarProps$1 } from '@mui/material';
|
|
4
|
+
export * from '@mui/material';
|
|
5
|
+
import { ThemeProviderProps } from '@mui/material/styles/ThemeProvider';
|
|
4
6
|
import { ButtonProps as ButtonProps$1 } from '@mui/material/Button';
|
|
7
|
+
import { MUIGlobalOmit } from 'global/utils/types';
|
|
8
|
+
import React from 'react';
|
|
9
|
+
import { TypographyProps as TypographyProps$1 } from '@mui/material/Typography';
|
|
5
10
|
|
|
6
|
-
declare const UpComponentsProvider: (props: ThemeProviderProps) => JSX.Element;
|
|
11
|
+
declare const UpComponentsProvider: (props: Omit<ThemeProviderProps, 'theme'>) => JSX.Element;
|
|
7
12
|
|
|
8
13
|
declare const theme: _mui_material.Theme;
|
|
9
14
|
|
|
10
|
-
declare type ButtonProps = {
|
|
15
|
+
declare type ButtonProps = MUIGlobalOmit<ButtonProps$1, {
|
|
11
16
|
loading?: boolean;
|
|
12
|
-
}
|
|
17
|
+
}>;
|
|
13
18
|
declare const Button: ({ color, variant, size, loading, children, ...props }: ButtonProps) => JSX.Element;
|
|
14
19
|
|
|
15
|
-
|
|
20
|
+
declare type TypographyProps = MUIGlobalOmit<TypographyProps$1, {
|
|
21
|
+
component?: React.ElementType;
|
|
22
|
+
}>;
|
|
23
|
+
declare const Typography: React.FC<TypographyProps>;
|
|
24
|
+
|
|
25
|
+
declare type ChipProps = MUIGlobalOmit<Omit<ChipProps$1, 'size'>>;
|
|
26
|
+
declare const Chip: ({ label, ...props }: ChipProps) => JSX.Element;
|
|
27
|
+
|
|
28
|
+
declare type AvatarProps = MUIGlobalOmit<Omit<AvatarProps$1, 'children' | 'alt' | 'imgProps' | 'sizes' | 'src' | 'srcSet' | 'variant'>, {
|
|
29
|
+
firstName?: string;
|
|
30
|
+
lastName?: string;
|
|
31
|
+
icon?: React.ReactNode;
|
|
32
|
+
}>;
|
|
33
|
+
declare const Avatar: ({ icon, firstName, lastName, ...props }: AvatarProps) => JSX.Element;
|
|
34
|
+
|
|
35
|
+
export { Avatar, Button, Chip, Typography, UpComponentsProvider, theme };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@up42/up-components",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
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",
|