@up42/up-components 0.1.6 → 0.1.7
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 +0 -7
- package/dist/cjs/types/components/Avatar/Avatar.d.ts +1 -1
- package/dist/cjs/types/components/Box/Box.d.ts +1 -1
- package/dist/cjs/types/components/Button/Button.d.ts +1 -1
- package/dist/cjs/types/components/Checkbox/Checkbox.d.ts +1 -1
- package/dist/cjs/types/components/Chip/Chip.d.ts +1 -1
- package/dist/cjs/types/components/Container/Container.d.ts +1 -1
- package/dist/cjs/types/components/FormCheckbox/FormCheckbox.d.ts +1 -1
- package/dist/cjs/types/components/FormInput/FormInput.d.ts +1 -1
- package/dist/cjs/types/components/FormRadio/FormRadio.d.ts +1 -1
- package/dist/cjs/types/components/FormSelect/FormSelect.d.ts +1 -1
- package/dist/cjs/types/components/Input/Input.d.ts +1 -1
- package/dist/cjs/types/components/Link/Link.d.ts +1 -1
- package/dist/cjs/types/components/Radio/Radio.d.ts +1 -1
- package/dist/cjs/types/components/Select/Select.d.ts +1 -1
- package/dist/cjs/types/components/Switch/Switch.d.ts +1 -1
- package/dist/cjs/types/components/Typography/Typography.d.ts +1 -1
- package/dist/esm/types/components/Avatar/Avatar.d.ts +1 -1
- package/dist/esm/types/components/Box/Box.d.ts +1 -1
- package/dist/esm/types/components/Button/Button.d.ts +1 -1
- package/dist/esm/types/components/Checkbox/Checkbox.d.ts +1 -1
- package/dist/esm/types/components/Chip/Chip.d.ts +1 -1
- package/dist/esm/types/components/Container/Container.d.ts +1 -1
- package/dist/esm/types/components/FormCheckbox/FormCheckbox.d.ts +1 -1
- package/dist/esm/types/components/FormInput/FormInput.d.ts +1 -1
- package/dist/esm/types/components/FormRadio/FormRadio.d.ts +1 -1
- package/dist/esm/types/components/FormSelect/FormSelect.d.ts +1 -1
- package/dist/esm/types/components/Input/Input.d.ts +1 -1
- package/dist/esm/types/components/Link/Link.d.ts +1 -1
- package/dist/esm/types/components/Radio/Radio.d.ts +1 -1
- package/dist/esm/types/components/Select/Select.d.ts +1 -1
- package/dist/esm/types/components/Switch/Switch.d.ts +1 -1
- package/dist/esm/types/components/Typography/Typography.d.ts +1 -1
- package/dist/index.d.ts +16 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -81,13 +81,6 @@ src
|
|
|
81
81
|
|
|
82
82
|
Components and filenames must use the `UpperCamelCase` pattern. For components that already exist on MUI, using the exact same name is preferred so that they override the MUI export.
|
|
83
83
|
|
|
84
|
-
Import paths to internal modules always have to be relative:
|
|
85
|
-
|
|
86
|
-
```diff
|
|
87
|
-
- import { MyUtil } from 'global/utils'
|
|
88
|
-
+ import { MyUtil } from '../../global/utils'
|
|
89
|
-
```
|
|
90
|
-
|
|
91
84
|
### Testing @up42/up-components locally
|
|
92
85
|
|
|
93
86
|
In order to test the components without publishing a new version, you can use [Yalc](https://github.com/wclr/yalc) to publish the package locally and install it on your app.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { AvatarProps as MUIAvatarProps } from '@mui/material';
|
|
3
|
-
import { MUIGlobalOmit } from '
|
|
3
|
+
import { MUIGlobalOmit } from '@global/utils/types';
|
|
4
4
|
export declare type AvatarProps = MUIGlobalOmit<Omit<MUIAvatarProps, 'children' | 'alt' | 'imgProps' | 'sizes' | 'src' | 'srcSet' | 'variant'>, {
|
|
5
5
|
firstName?: string;
|
|
6
6
|
lastName?: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { BoxProps as MUIBoxProps } from '@mui/material';
|
|
3
|
-
import { MUIGlobalOmit } from '
|
|
3
|
+
import { MUIGlobalOmit } from '@global/utils/types';
|
|
4
4
|
export declare type BoxProps = MUIGlobalOmit<MUIBoxProps>;
|
|
5
5
|
export declare const Box: ({ children, ...props }: BoxProps) => JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { ButtonProps as MUIButtonProps } from '@mui/material/Button';
|
|
3
|
-
import { MUIGlobalOmit } from '
|
|
3
|
+
import { MUIGlobalOmit } from '@global/utils/types';
|
|
4
4
|
export declare type ButtonProps = MUIGlobalOmit<MUIButtonProps, {
|
|
5
5
|
loading?: boolean;
|
|
6
6
|
}>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { CheckboxProps as MUICheckboxProps } from '@mui/material';
|
|
3
|
-
import { MUIGlobalOmit } from '
|
|
3
|
+
import { MUIGlobalOmit } from '@global/utils/types';
|
|
4
4
|
export declare type CheckboxProps = MUIGlobalOmit<MUICheckboxProps>;
|
|
5
5
|
export declare const Checkbox: ({ ...props }: CheckboxProps) => JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { ChipProps as MUIChipProps } from '@mui/material';
|
|
3
|
-
import { MUIGlobalOmit } from '
|
|
3
|
+
import { MUIGlobalOmit } from '@global/utils/types';
|
|
4
4
|
export declare type ChipProps = MUIGlobalOmit<Omit<MUIChipProps, 'size'>>;
|
|
5
5
|
export declare const Chip: ({ label, ...props }: ChipProps) => JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ContainerProps as MUIContainerProps } from '@mui/material';
|
|
3
|
-
import { MUIGlobalOmit } from '
|
|
3
|
+
import { MUIGlobalOmit } from '@global/utils/types';
|
|
4
4
|
export declare type ContainerProps = MUIGlobalOmit<Omit<MUIContainerProps, 'maxWidth'>, {
|
|
5
5
|
/**
|
|
6
6
|
* Determine the max-width of the container.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { MUIGlobalOmit } from '
|
|
2
|
+
import { MUIGlobalOmit } from '@global/utils/types';
|
|
3
3
|
import { CheckboxProps } from '../Checkbox/Checkbox';
|
|
4
4
|
export declare type FormCheckboxProps = MUIGlobalOmit<CheckboxProps, {
|
|
5
5
|
data: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
import { MUIGlobalOmit } from '@global/utils/types';
|
|
2
3
|
import { InputProps } from '../Input/Input';
|
|
3
|
-
import { MUIGlobalOmit } from '../../global/utils/types';
|
|
4
4
|
export declare type FormInputProps = MUIGlobalOmit<InputProps, {
|
|
5
5
|
label?: string;
|
|
6
6
|
error?: boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { RadioGroupProps } from '@mui/material';
|
|
3
|
-
import { MUIGlobalOmit } from '
|
|
3
|
+
import { MUIGlobalOmit } from '@global/utils/types';
|
|
4
4
|
export declare type FormRadioProps = MUIGlobalOmit<RadioGroupProps, {
|
|
5
5
|
data: {
|
|
6
6
|
value: string | number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { MUIGlobalOmit } from '
|
|
2
|
+
import { MUIGlobalOmit } from '@global/utils/types';
|
|
3
3
|
import { SelectProps } from '../Select/Select';
|
|
4
4
|
export declare type FormSelectProps = MUIGlobalOmit<SelectProps, {
|
|
5
5
|
options: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HTMLInputTypeAttribute } from 'react';
|
|
2
2
|
import { TextFieldProps } from '@mui/material';
|
|
3
|
-
import { MUIGlobalOmit } from '
|
|
3
|
+
import { MUIGlobalOmit } from '@global/utils/types';
|
|
4
4
|
export declare type InputProps = MUIGlobalOmit<TextFieldProps> & {
|
|
5
5
|
type?: HTMLInputTypeAttribute;
|
|
6
6
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { LinkProps as MuiLinkProps } from '@mui/material';
|
|
3
|
-
import { MUIGlobalOmit } from '
|
|
3
|
+
import { MUIGlobalOmit } from '@global/utils/types';
|
|
4
4
|
export declare type LinkProps = MUIGlobalOmit<Omit<MuiLinkProps, 'underline' | 'variant' | 'component'>>;
|
|
5
5
|
export declare const Link: ({ children, ...props }: LinkProps) => JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { RadioProps as MUIRadioProps } from '@mui/material';
|
|
3
|
-
import { MUIGlobalOmit } from '
|
|
3
|
+
import { MUIGlobalOmit } from '@global/utils/types';
|
|
4
4
|
export declare type RadioProps = MUIGlobalOmit<MUIRadioProps>;
|
|
5
5
|
export declare const Radio: (props: RadioProps) => JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { SelectProps as MUISelectProps } from '@mui/material';
|
|
3
|
-
import { MUIGlobalOmit } from '
|
|
3
|
+
import { MUIGlobalOmit } from '@global/utils/types';
|
|
4
4
|
export declare type SelectProps = MUIGlobalOmit<Omit<MUISelectProps, 'variant' | 'label'>>;
|
|
5
5
|
export declare const Select: (props: SelectProps) => JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { SwitchProps as MUISwitchProps } from '@mui/material';
|
|
3
|
-
import { MUIGlobalOmit } from '
|
|
3
|
+
import { MUIGlobalOmit } from '@global/utils/types';
|
|
4
4
|
export declare type SwitchProps = MUIGlobalOmit<MUISwitchProps, {
|
|
5
5
|
onChange?: (event: React.ChangeEvent<HTMLInputElement>, checked: boolean) => void;
|
|
6
6
|
}>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { TypographyProps as MUITypographyProps } from '@mui/material/Typography';
|
|
3
|
-
import { MUIGlobalOmit } from '
|
|
3
|
+
import { MUIGlobalOmit } from '@global/utils/types';
|
|
4
4
|
export declare type TypographyProps = MUIGlobalOmit<MUITypographyProps, {
|
|
5
5
|
component?: React.ElementType;
|
|
6
6
|
}>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { AvatarProps as MUIAvatarProps } from '@mui/material';
|
|
3
|
-
import { MUIGlobalOmit } from '
|
|
3
|
+
import { MUIGlobalOmit } from '@global/utils/types';
|
|
4
4
|
export declare type AvatarProps = MUIGlobalOmit<Omit<MUIAvatarProps, 'children' | 'alt' | 'imgProps' | 'sizes' | 'src' | 'srcSet' | 'variant'>, {
|
|
5
5
|
firstName?: string;
|
|
6
6
|
lastName?: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { BoxProps as MUIBoxProps } from '@mui/material';
|
|
3
|
-
import { MUIGlobalOmit } from '
|
|
3
|
+
import { MUIGlobalOmit } from '@global/utils/types';
|
|
4
4
|
export declare type BoxProps = MUIGlobalOmit<MUIBoxProps>;
|
|
5
5
|
export declare const Box: ({ children, ...props }: BoxProps) => JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { ButtonProps as MUIButtonProps } from '@mui/material/Button';
|
|
3
|
-
import { MUIGlobalOmit } from '
|
|
3
|
+
import { MUIGlobalOmit } from '@global/utils/types';
|
|
4
4
|
export declare type ButtonProps = MUIGlobalOmit<MUIButtonProps, {
|
|
5
5
|
loading?: boolean;
|
|
6
6
|
}>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { CheckboxProps as MUICheckboxProps } from '@mui/material';
|
|
3
|
-
import { MUIGlobalOmit } from '
|
|
3
|
+
import { MUIGlobalOmit } from '@global/utils/types';
|
|
4
4
|
export declare type CheckboxProps = MUIGlobalOmit<MUICheckboxProps>;
|
|
5
5
|
export declare const Checkbox: ({ ...props }: CheckboxProps) => JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { ChipProps as MUIChipProps } from '@mui/material';
|
|
3
|
-
import { MUIGlobalOmit } from '
|
|
3
|
+
import { MUIGlobalOmit } from '@global/utils/types';
|
|
4
4
|
export declare type ChipProps = MUIGlobalOmit<Omit<MUIChipProps, 'size'>>;
|
|
5
5
|
export declare const Chip: ({ label, ...props }: ChipProps) => JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ContainerProps as MUIContainerProps } from '@mui/material';
|
|
3
|
-
import { MUIGlobalOmit } from '
|
|
3
|
+
import { MUIGlobalOmit } from '@global/utils/types';
|
|
4
4
|
export declare type ContainerProps = MUIGlobalOmit<Omit<MUIContainerProps, 'maxWidth'>, {
|
|
5
5
|
/**
|
|
6
6
|
* Determine the max-width of the container.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { MUIGlobalOmit } from '
|
|
2
|
+
import { MUIGlobalOmit } from '@global/utils/types';
|
|
3
3
|
import { CheckboxProps } from '../Checkbox/Checkbox';
|
|
4
4
|
export declare type FormCheckboxProps = MUIGlobalOmit<CheckboxProps, {
|
|
5
5
|
data: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
import { MUIGlobalOmit } from '@global/utils/types';
|
|
2
3
|
import { InputProps } from '../Input/Input';
|
|
3
|
-
import { MUIGlobalOmit } from '../../global/utils/types';
|
|
4
4
|
export declare type FormInputProps = MUIGlobalOmit<InputProps, {
|
|
5
5
|
label?: string;
|
|
6
6
|
error?: boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { RadioGroupProps } from '@mui/material';
|
|
3
|
-
import { MUIGlobalOmit } from '
|
|
3
|
+
import { MUIGlobalOmit } from '@global/utils/types';
|
|
4
4
|
export declare type FormRadioProps = MUIGlobalOmit<RadioGroupProps, {
|
|
5
5
|
data: {
|
|
6
6
|
value: string | number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { MUIGlobalOmit } from '
|
|
2
|
+
import { MUIGlobalOmit } from '@global/utils/types';
|
|
3
3
|
import { SelectProps } from '../Select/Select';
|
|
4
4
|
export declare type FormSelectProps = MUIGlobalOmit<SelectProps, {
|
|
5
5
|
options: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HTMLInputTypeAttribute } from 'react';
|
|
2
2
|
import { TextFieldProps } from '@mui/material';
|
|
3
|
-
import { MUIGlobalOmit } from '
|
|
3
|
+
import { MUIGlobalOmit } from '@global/utils/types';
|
|
4
4
|
export declare type InputProps = MUIGlobalOmit<TextFieldProps> & {
|
|
5
5
|
type?: HTMLInputTypeAttribute;
|
|
6
6
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { LinkProps as MuiLinkProps } from '@mui/material';
|
|
3
|
-
import { MUIGlobalOmit } from '
|
|
3
|
+
import { MUIGlobalOmit } from '@global/utils/types';
|
|
4
4
|
export declare type LinkProps = MUIGlobalOmit<Omit<MuiLinkProps, 'underline' | 'variant' | 'component'>>;
|
|
5
5
|
export declare const Link: ({ children, ...props }: LinkProps) => JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { RadioProps as MUIRadioProps } from '@mui/material';
|
|
3
|
-
import { MUIGlobalOmit } from '
|
|
3
|
+
import { MUIGlobalOmit } from '@global/utils/types';
|
|
4
4
|
export declare type RadioProps = MUIGlobalOmit<MUIRadioProps>;
|
|
5
5
|
export declare const Radio: (props: RadioProps) => JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { SelectProps as MUISelectProps } from '@mui/material';
|
|
3
|
-
import { MUIGlobalOmit } from '
|
|
3
|
+
import { MUIGlobalOmit } from '@global/utils/types';
|
|
4
4
|
export declare type SelectProps = MUIGlobalOmit<Omit<MUISelectProps, 'variant' | 'label'>>;
|
|
5
5
|
export declare const Select: (props: SelectProps) => JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { SwitchProps as MUISwitchProps } from '@mui/material';
|
|
3
|
-
import { MUIGlobalOmit } from '
|
|
3
|
+
import { MUIGlobalOmit } from '@global/utils/types';
|
|
4
4
|
export declare type SwitchProps = MUIGlobalOmit<MUISwitchProps, {
|
|
5
5
|
onChange?: (event: React.ChangeEvent<HTMLInputElement>, checked: boolean) => void;
|
|
6
6
|
}>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { TypographyProps as MUITypographyProps } from '@mui/material/Typography';
|
|
3
|
-
import { MUIGlobalOmit } from '
|
|
3
|
+
import { MUIGlobalOmit } from '@global/utils/types';
|
|
4
4
|
export declare type TypographyProps = MUIGlobalOmit<MUITypographyProps, {
|
|
5
5
|
component?: React.ElementType;
|
|
6
6
|
}>;
|
package/dist/index.d.ts
CHANGED
|
@@ -12,7 +12,22 @@ declare const UpComponentsProvider: (props: Omit<ThemeProviderProps, 'theme'>) =
|
|
|
12
12
|
|
|
13
13
|
declare const theme: _mui_material.Theme;
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
type MUIGlobalOmit<MuiProps, ComponentProps = unknown> = ComponentProps &
|
|
16
|
+
Omit<
|
|
17
|
+
MuiProps,
|
|
18
|
+
| 'classes'
|
|
19
|
+
| 'disableElevation'
|
|
20
|
+
| 'disableFocusRipple'
|
|
21
|
+
| 'disableRipple'
|
|
22
|
+
| 'focusRipple'
|
|
23
|
+
| 'tabIndex'
|
|
24
|
+
| 'action'
|
|
25
|
+
| 'centerRipple'
|
|
26
|
+
| 'disableTouchRipple'
|
|
27
|
+
| 'focusVisibleClassName'
|
|
28
|
+
| 'LinkComponent'
|
|
29
|
+
| 'TouchRippleProps'
|
|
30
|
+
>
|
|
16
31
|
|
|
17
32
|
declare type ButtonProps = MUIGlobalOmit<ButtonProps$1, {
|
|
18
33
|
loading?: boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@up42/up-components",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.7",
|
|
4
4
|
"description": "UP42 Component Library",
|
|
5
5
|
"author": "Axel Fuhrmann axel.fuhrmann@up42.com",
|
|
6
6
|
"license": "ISC",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
],
|
|
12
12
|
"types": "dist/index.d.ts",
|
|
13
13
|
"scripts": {
|
|
14
|
-
"build": "rollup -c",
|
|
14
|
+
"build": "rollup -c --failAfterWarnings",
|
|
15
15
|
"build:watch": "rollup -c -w",
|
|
16
16
|
"test": "jest --testPathIgnorePatterns=smoke",
|
|
17
17
|
"test:watch": "jest --watch",
|