@up42/up-components 0.2.3 → 0.3.0
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 +1 -1
- package/dist/cjs/types/components/Box/Box.stories.d.ts +2 -2
- package/dist/cjs/types/components/Button/Button.stories.d.ts +1 -0
- package/dist/cjs/types/components/Checkbox/Checkbox.stories.d.ts +1 -1
- package/dist/cjs/types/components/Chip/Chip.stories.d.ts +1 -1
- package/dist/cjs/types/components/EmptyState/EmptyState.d.ts +3 -3
- package/dist/cjs/types/components/EmptyState/EmptyState.stories.d.ts +3 -3
- package/dist/cjs/types/components/Form/Form.stories.d.ts +5 -0
- package/dist/cjs/types/components/FormCheckbox/FormCheckbox.d.ts +5 -8
- package/dist/cjs/types/components/FormCheckbox/FormCheckbox.stories.d.ts +3 -3
- package/dist/cjs/types/components/FormControl/FormControl.overrides.d.ts +3 -0
- package/dist/cjs/types/components/FormInput/FormInput.d.ts +4 -8
- package/dist/cjs/types/components/FormInput/FormInput.stories.d.ts +6 -3
- package/dist/cjs/types/components/FormLabel/FormLabel.d.ts +8 -0
- package/dist/cjs/types/components/FormLabel/FormLabel.test.d.ts +1 -0
- package/dist/cjs/types/components/FormRadio/FormRadio.d.ts +6 -9
- package/dist/cjs/types/components/FormRadio/FormRadio.stories.d.ts +4 -3
- package/dist/cjs/types/components/FormSelect/FormSelect.d.ts +5 -8
- package/dist/cjs/types/components/FormSelect/FormSelect.stories.d.ts +4 -3
- package/dist/cjs/types/components/FormSwitch/FormSwitch.d.ts +4 -7
- package/dist/cjs/types/components/FormSwitch/FormSwitch.stories.d.ts +1 -1
- package/dist/cjs/types/components/Input/Input.d.ts +3 -6
- package/dist/cjs/types/components/Input/Input.overrides.d.ts +1 -0
- package/dist/cjs/types/components/Radio/Radio.stories.d.ts +1 -1
- package/dist/cjs/types/components/Select/Select.stories.d.ts +3 -3
- package/dist/cjs/types/components/Switch/Switch.d.ts +2 -4
- package/dist/cjs/types/components/Switch/Switch.stories.d.ts +1 -2
- package/dist/cjs/types/components/Table/Table.d.ts +29 -0
- package/dist/cjs/types/components/Table/Table.overrides.d.ts +6 -0
- package/dist/cjs/types/components/Table/Table.stories.d.ts +6 -0
- package/dist/cjs/types/components/Table/Table.test.d.ts +1 -0
- package/dist/cjs/types/components/Tabs/Tabs.stories.d.ts +1 -1
- package/dist/cjs/types/components/Typography/Typography.d.ts +3 -4
- package/dist/cjs/types/components/Typography/Typography.stories.d.ts +1 -1
- package/dist/cjs/types/global/utils/types.d.ts +4 -6
- package/dist/cjs/types/index.d.ts +21 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/types/components/Box/Box.stories.d.ts +2 -2
- package/dist/esm/types/components/Button/Button.stories.d.ts +1 -0
- package/dist/esm/types/components/Checkbox/Checkbox.stories.d.ts +1 -1
- package/dist/esm/types/components/Chip/Chip.stories.d.ts +1 -1
- package/dist/esm/types/components/EmptyState/EmptyState.d.ts +3 -3
- package/dist/esm/types/components/EmptyState/EmptyState.stories.d.ts +3 -3
- package/dist/esm/types/components/Form/Form.stories.d.ts +5 -0
- package/dist/esm/types/components/FormCheckbox/FormCheckbox.d.ts +5 -8
- package/dist/esm/types/components/FormCheckbox/FormCheckbox.stories.d.ts +3 -3
- package/dist/esm/types/components/FormControl/FormControl.overrides.d.ts +3 -0
- package/dist/esm/types/components/FormInput/FormInput.d.ts +4 -8
- package/dist/esm/types/components/FormInput/FormInput.stories.d.ts +6 -3
- package/dist/esm/types/components/FormLabel/FormLabel.d.ts +8 -0
- package/dist/esm/types/components/FormLabel/FormLabel.test.d.ts +1 -0
- package/dist/esm/types/components/FormRadio/FormRadio.d.ts +6 -9
- package/dist/esm/types/components/FormRadio/FormRadio.stories.d.ts +4 -3
- package/dist/esm/types/components/FormSelect/FormSelect.d.ts +5 -8
- package/dist/esm/types/components/FormSelect/FormSelect.stories.d.ts +4 -3
- package/dist/esm/types/components/FormSwitch/FormSwitch.d.ts +4 -7
- package/dist/esm/types/components/FormSwitch/FormSwitch.stories.d.ts +1 -1
- package/dist/esm/types/components/Input/Input.d.ts +3 -6
- package/dist/esm/types/components/Input/Input.overrides.d.ts +1 -0
- package/dist/esm/types/components/Radio/Radio.stories.d.ts +1 -1
- package/dist/esm/types/components/Select/Select.stories.d.ts +3 -3
- package/dist/esm/types/components/Switch/Switch.d.ts +2 -4
- package/dist/esm/types/components/Switch/Switch.stories.d.ts +1 -2
- package/dist/esm/types/components/Table/Table.d.ts +29 -0
- package/dist/esm/types/components/Table/Table.overrides.d.ts +6 -0
- package/dist/esm/types/components/Table/Table.stories.d.ts +6 -0
- package/dist/esm/types/components/Table/Table.test.d.ts +1 -0
- package/dist/esm/types/components/Tabs/Tabs.stories.d.ts +1 -1
- package/dist/esm/types/components/Typography/Typography.d.ts +3 -4
- package/dist/esm/types/components/Typography/Typography.stories.d.ts +1 -1
- package/dist/esm/types/global/utils/types.d.ts +4 -6
- package/dist/esm/types/index.d.ts +21 -1
- package/dist/index.d.ts +61 -51
- package/package.json +1 -1
- package/dist/cjs/types/components/Select/Select.overrides.d.ts +0 -2
- package/dist/cjs/types/components/index.d.ts +0 -20
- package/dist/esm/types/components/Select/Select.overrides.d.ts +0 -2
- package/dist/esm/types/components/index.d.ts +0 -20
package/dist/index.d.ts
CHANGED
|
@@ -1,12 +1,21 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
export { default as tokens } from '@up42/design-system-tokens/dist/json/tokens.json';
|
|
3
3
|
import * as _mui_material from '@mui/material';
|
|
4
|
-
import {
|
|
4
|
+
import { BoxProps as BoxProps$1, TextFieldProps, ChipProps as ChipProps$1, AvatarProps as AvatarProps$1, ContainerProps as ContainerProps$1, CheckboxProps as CheckboxProps$1, RadioProps as RadioProps$1, RadioGroupProps, SwitchProps as SwitchProps$1, SelectProps as SelectProps$1, LinkProps as LinkProps$1, TabsProps as TabsProps$1, TabProps as TabProps$1 } from '@mui/material';
|
|
5
5
|
export * from '@mui/material';
|
|
6
6
|
import { ThemeProviderProps } from '@mui/material/styles/ThemeProvider';
|
|
7
7
|
import { ButtonProps as ButtonProps$1 } from '@mui/material/Button';
|
|
8
|
-
import React, {
|
|
8
|
+
import React, { ReactNode, ElementType } from 'react';
|
|
9
9
|
import { TypographyProps as TypographyProps$1 } from '@mui/material/Typography';
|
|
10
|
+
import { TableProps as TableProps$1 } from '@mui/material/Table';
|
|
11
|
+
import { TableBodyProps as TableBodyProps$1 } from '@mui/material/TableBody';
|
|
12
|
+
import { TableCellProps as TableCellProps$1 } from '@mui/material/TableCell';
|
|
13
|
+
import { TableContainerProps as TableContainerProps$1 } from '@mui/material/TableContainer';
|
|
14
|
+
import { TableHeadProps as TableHeadProps$1 } from '@mui/material/TableHead';
|
|
15
|
+
import { TableRowProps as TableRowProps$1 } from '@mui/material/TableRow';
|
|
16
|
+
import { TablePaginationProps as TablePaginationProps$1 } from '@mui/material/TablePagination';
|
|
17
|
+
import { TableSortLabelProps as TableSortLabelProps$1 } from '@mui/material/TableSortLabel';
|
|
18
|
+
import { TableFooterProps as TableFooterProps$1 } from '@mui/material/TableFooter';
|
|
10
19
|
|
|
11
20
|
declare const UpComponentsProvider: (props: Omit<ThemeProviderProps, 'theme'>) => JSX.Element;
|
|
12
21
|
|
|
@@ -27,22 +36,25 @@ type MUIGlobalOmit<MuiProps, ComponentProps = unknown> = ComponentProps &
|
|
|
27
36
|
| 'focusVisibleClassName'
|
|
28
37
|
| 'LinkComponent'
|
|
29
38
|
| 'TouchRippleProps'
|
|
39
|
+
| 'touchRippleRef'
|
|
30
40
|
>
|
|
31
41
|
|
|
32
|
-
type BaseProps<
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
42
|
+
type BaseProps<D extends React.ElementType = 'div', P = Record<string, unknown>> = BoxProps$1<D, P>
|
|
43
|
+
|
|
44
|
+
type FormBaseProps<C extends React.ElementType> = BaseProps<
|
|
45
|
+
C,
|
|
46
|
+
Pick<TextFieldProps, 'id' | 'label' | 'required' | 'error' | 'disabled' | 'focused' | 'helperText'>
|
|
47
|
+
>
|
|
36
48
|
|
|
37
49
|
declare type ButtonProps = MUIGlobalOmit<ButtonProps$1, {
|
|
38
50
|
loading?: boolean;
|
|
39
51
|
}>;
|
|
40
52
|
declare const Button: ({ color, variant, size, loading, children, ...props }: ButtonProps) => JSX.Element;
|
|
41
53
|
|
|
42
|
-
declare type TypographyProps =
|
|
43
|
-
component?:
|
|
54
|
+
declare type TypographyProps<C extends React.ElementType = 'p'> = TypographyProps$1<C, {
|
|
55
|
+
component?: C;
|
|
44
56
|
}>;
|
|
45
|
-
declare const Typography: ({ children, ...props }: TypographyProps) => JSX.Element;
|
|
57
|
+
declare const Typography: <C extends React.ElementType<any>>({ children, ...props }: TypographyProps<C>) => JSX.Element;
|
|
46
58
|
|
|
47
59
|
declare type ChipProps = MUIGlobalOmit<Omit<ChipProps$1, 'size'>>;
|
|
48
60
|
declare const Chip: ({ label, ...props }: ChipProps) => JSX.Element;
|
|
@@ -85,69 +97,48 @@ declare const Box: ({ children, ...props }: BoxProps) => JSX.Element;
|
|
|
85
97
|
declare type CheckboxProps = MUIGlobalOmit<CheckboxProps$1>;
|
|
86
98
|
declare const Checkbox: ({ ...props }: CheckboxProps) => JSX.Element;
|
|
87
99
|
|
|
88
|
-
declare type FormCheckboxProps =
|
|
100
|
+
declare type FormCheckboxProps<C extends React.ElementType = 'div'> = CheckboxProps & FormBaseProps<C> & {
|
|
89
101
|
data: {
|
|
90
102
|
value: string | number;
|
|
91
103
|
label?: string;
|
|
92
104
|
}[];
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
helperText?: string;
|
|
96
|
-
}>;
|
|
97
|
-
declare const FormCheckbox: ({ id, required, data, label, error, helperText }: FormCheckboxProps) => JSX.Element;
|
|
105
|
+
};
|
|
106
|
+
declare const FormCheckbox: <C extends React.ElementType<any>>({ id, label, required, component, disabled, data, error, helperText, sx, ...props }: FormCheckboxProps<C>) => JSX.Element;
|
|
98
107
|
|
|
99
108
|
declare type RadioProps = MUIGlobalOmit<RadioProps$1>;
|
|
100
109
|
declare const Radio: (props: RadioProps) => JSX.Element;
|
|
101
110
|
|
|
102
|
-
declare type FormRadioProps =
|
|
111
|
+
declare type FormRadioProps<C extends React.ElementType = 'div'> = RadioGroupProps & FormBaseProps<C> & {
|
|
103
112
|
data: {
|
|
104
113
|
value: string | number;
|
|
105
114
|
label?: string;
|
|
115
|
+
message?: string;
|
|
106
116
|
}[];
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
error?: boolean;
|
|
110
|
-
required?: boolean;
|
|
111
|
-
}>;
|
|
112
|
-
declare const FormRadio: ({ id, helperText, label, error, required, name, data }: FormRadioProps) => JSX.Element;
|
|
117
|
+
};
|
|
118
|
+
declare const FormRadio: ({ id, required, component, disabled, data, label, error, helperText, sx, ...props }: FormRadioProps) => JSX.Element;
|
|
113
119
|
|
|
114
|
-
declare type SwitchProps = MUIGlobalOmit<SwitchProps$1
|
|
115
|
-
onChange?: (event: React.ChangeEvent<HTMLInputElement>, checked: boolean) => void;
|
|
116
|
-
}>;
|
|
120
|
+
declare type SwitchProps = MUIGlobalOmit<SwitchProps$1>;
|
|
117
121
|
declare const Switch: (props: SwitchProps) => JSX.Element;
|
|
118
122
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
id?: string;
|
|
122
|
-
checked?: boolean;
|
|
123
|
-
}
|
|
124
|
-
declare const FormSwitch: ({ id, label, checked }: FormSwitchProps) => JSX.Element;
|
|
123
|
+
declare type FormSwitchProps<C extends React.ElementType = 'div'> = SwitchProps & FormBaseProps<C>;
|
|
124
|
+
declare const FormSwitch: <C extends React.ElementType<any>>({ component, disabled, label, error, sx, ...props }: FormSwitchProps<C>) => JSX.Element;
|
|
125
125
|
|
|
126
126
|
declare type SelectProps = MUIGlobalOmit<Omit<SelectProps$1, 'variant' | 'label'>>;
|
|
127
127
|
declare const Select: (props: SelectProps) => JSX.Element;
|
|
128
128
|
|
|
129
|
-
declare type FormSelectProps =
|
|
129
|
+
declare type FormSelectProps<C extends React.ElementType = 'div'> = SelectProps & FormBaseProps<C> & {
|
|
130
130
|
options: {
|
|
131
131
|
value: string | number;
|
|
132
132
|
text: string;
|
|
133
133
|
}[];
|
|
134
|
-
label?: string;
|
|
135
|
-
error?: boolean;
|
|
136
|
-
helperText?: string;
|
|
137
|
-
}>;
|
|
138
|
-
declare const FormSelect: ({ id, required, options, label, error, placeholder, helperText, value, }: FormSelectProps) => JSX.Element;
|
|
139
|
-
|
|
140
|
-
declare type InputProps = MUIGlobalOmit<TextFieldProps> & {
|
|
141
|
-
type?: HTMLInputTypeAttribute;
|
|
142
134
|
};
|
|
143
|
-
declare const
|
|
135
|
+
declare const FormSelect: ({ id, required, component, disabled, label, error, helperText, sx, options, ...props }: FormSelectProps) => JSX.Element;
|
|
144
136
|
|
|
145
|
-
declare type
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
}
|
|
150
|
-
declare const FormInput: ({ id, required, label, error, helperText, ...props }: FormInputProps) => JSX.Element;
|
|
137
|
+
declare type InputProps = Omit<TextFieldProps, 'maxRows' | 'minRows' | 'multiline' | 'rows' | 'size' | 'variant'>;
|
|
138
|
+
declare const Input: ({ type, ...props }: InputProps) => JSX.Element;
|
|
139
|
+
|
|
140
|
+
declare type FormInputProps<C extends React.ElementType = 'div'> = InputProps & FormBaseProps<C>;
|
|
141
|
+
declare const FormInput: <C extends React.ElementType<any>>({ id, component, required, disabled, label, error, helperText, sx, ...props }: FormInputProps<C>) => JSX.Element;
|
|
151
142
|
|
|
152
143
|
declare type LinkProps<C extends React.ElementType> = LinkProps$1<C, {
|
|
153
144
|
component?: C;
|
|
@@ -200,7 +191,7 @@ declare type TabGroupProps = {
|
|
|
200
191
|
};
|
|
201
192
|
declare const TabGroup: ({ tabs, nameSpace: _nameSpace, tabContentProps, tabsProps }: TabGroupProps) => JSX.Element;
|
|
202
193
|
|
|
203
|
-
declare type EmptyStateProps = BaseProps<{
|
|
194
|
+
declare type EmptyStateProps<C extends React.ElementType = 'div'> = BaseProps<C, {
|
|
204
195
|
/**
|
|
205
196
|
* Helpful message that conveys the purpose of the screen and the next action to populate the space
|
|
206
197
|
*/
|
|
@@ -218,6 +209,25 @@ declare type EmptyStateProps = BaseProps<{
|
|
|
218
209
|
*/
|
|
219
210
|
action?: ReactNode;
|
|
220
211
|
}>;
|
|
221
|
-
declare const EmptyState: ({ icon: Icon, title, subTitle, action, ...props }: EmptyStateProps
|
|
222
|
-
|
|
223
|
-
|
|
212
|
+
declare const EmptyState: <C extends React.ElementType<any>>({ icon: Icon, title, subTitle, action, ...props }: EmptyStateProps<C>) => JSX.Element;
|
|
213
|
+
|
|
214
|
+
declare type TableProps = MUIGlobalOmit<TableProps$1>;
|
|
215
|
+
declare const Table: ({ children, ...props }: TableProps) => JSX.Element;
|
|
216
|
+
declare type TableBodyProps = MUIGlobalOmit<TableBodyProps$1>;
|
|
217
|
+
declare const TableBody: ({ children, ...props }: TableBodyProps) => JSX.Element;
|
|
218
|
+
declare type TableCellProps = MUIGlobalOmit<TableCellProps$1>;
|
|
219
|
+
declare const TableCell: ({ children, ...props }: TableCellProps) => JSX.Element;
|
|
220
|
+
declare type TableContainerProps = MUIGlobalOmit<TableContainerProps$1>;
|
|
221
|
+
declare const TableContainer: ({ children, ...props }: TableContainerProps) => JSX.Element;
|
|
222
|
+
declare type TableHeadProps = MUIGlobalOmit<TableHeadProps$1>;
|
|
223
|
+
declare const TableHead: ({ children, ...props }: TableHeadProps) => JSX.Element;
|
|
224
|
+
declare type TableRowProps = MUIGlobalOmit<TableRowProps$1>;
|
|
225
|
+
declare const TableRow: ({ children, ...props }: TableRowProps) => JSX.Element;
|
|
226
|
+
declare type TablePaginationProps = MUIGlobalOmit<TablePaginationProps$1>;
|
|
227
|
+
declare const TablePagination: ({ ...props }: TablePaginationProps) => JSX.Element;
|
|
228
|
+
declare type TableSortLabelProps = MUIGlobalOmit<TableSortLabelProps$1>;
|
|
229
|
+
declare const TableSortLabel: ({ children, ...props }: TableSortLabelProps) => JSX.Element;
|
|
230
|
+
declare type TableFooterProps = MUIGlobalOmit<TableFooterProps$1>;
|
|
231
|
+
declare const TableFooter: ({ children, ...props }: TableFooterProps) => JSX.Element;
|
|
232
|
+
|
|
233
|
+
export { Avatar, AvatarProps, Box, BoxProps, Button, ButtonProps, Checkbox, CheckboxProps, Chip, ChipProps, Container, ContainerProps, EmptyState, EmptyStateProps, FormCheckbox, FormCheckboxProps, FormInput, FormInputProps, FormRadio, FormRadioProps, FormSelect, FormSelectProps, FormSwitch, FormSwitchProps, Input, InputProps, Link, LinkProps, Radio, RadioProps, Select, SelectProps, Switch, SwitchProps, Tab, TabGroup, TabGroupProps, TabProps, Table, TableBody, TableBodyProps, TableCell, TableCellProps, TableContainer, TableContainerProps, TableFooter, TableFooterProps, TableHead, TableHeadProps, TablePagination, TablePaginationProps, TableProps, TableRow, TableRowProps, TableSortLabel, TableSortLabelProps, Tabs, TabsProps, Typography, TypographyProps, UpComponentsProvider, theme };
|
package/package.json
CHANGED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
export { Button } from './Button/Button';
|
|
2
|
-
export { Typography } from './Typography/Typography';
|
|
3
|
-
export { Chip } from './Chip/Chip';
|
|
4
|
-
export { Avatar } from './Avatar/Avatar';
|
|
5
|
-
export { Container } from './Container/Container';
|
|
6
|
-
export { Box } from './Box/Box';
|
|
7
|
-
export { Checkbox } from './Checkbox/Checkbox';
|
|
8
|
-
export { FormCheckbox } from './FormCheckbox/FormCheckbox';
|
|
9
|
-
export { Radio } from './Radio/Radio';
|
|
10
|
-
export { FormRadio } from './FormRadio/FormRadio';
|
|
11
|
-
export { Switch } from './Switch/Switch';
|
|
12
|
-
export { FormSwitch } from './FormSwitch/FormSwitch';
|
|
13
|
-
export { Select } from './Select/Select';
|
|
14
|
-
export { FormSelect } from './FormSelect/FormSelect';
|
|
15
|
-
export { Input } from './Input/Input';
|
|
16
|
-
export { FormInput } from './FormInput/FormInput';
|
|
17
|
-
export { Link } from './Link/Link';
|
|
18
|
-
export { Tabs, Tab } from './Tabs/Tabs';
|
|
19
|
-
export { TabGroup } from './TabGroup/TabGroup';
|
|
20
|
-
export { EmptyState } from './EmptyState/EmptyState';
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
export { Button } from './Button/Button';
|
|
2
|
-
export { Typography } from './Typography/Typography';
|
|
3
|
-
export { Chip } from './Chip/Chip';
|
|
4
|
-
export { Avatar } from './Avatar/Avatar';
|
|
5
|
-
export { Container } from './Container/Container';
|
|
6
|
-
export { Box } from './Box/Box';
|
|
7
|
-
export { Checkbox } from './Checkbox/Checkbox';
|
|
8
|
-
export { FormCheckbox } from './FormCheckbox/FormCheckbox';
|
|
9
|
-
export { Radio } from './Radio/Radio';
|
|
10
|
-
export { FormRadio } from './FormRadio/FormRadio';
|
|
11
|
-
export { Switch } from './Switch/Switch';
|
|
12
|
-
export { FormSwitch } from './FormSwitch/FormSwitch';
|
|
13
|
-
export { Select } from './Select/Select';
|
|
14
|
-
export { FormSelect } from './FormSelect/FormSelect';
|
|
15
|
-
export { Input } from './Input/Input';
|
|
16
|
-
export { FormInput } from './FormInput/FormInput';
|
|
17
|
-
export { Link } from './Link/Link';
|
|
18
|
-
export { Tabs, Tab } from './Tabs/Tabs';
|
|
19
|
-
export { TabGroup } from './TabGroup/TabGroup';
|
|
20
|
-
export { EmptyState } from './EmptyState/EmptyState';
|