@up42/up-components 0.8.4 → 0.9.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/dist/cjs/index.js +1 -1
- package/dist/cjs/types/components/Badge/Badge.d.ts +8 -0
- package/dist/cjs/types/components/Badge/Badge.overrides.d.ts +2 -0
- package/dist/cjs/types/components/Badge/Badge.test.d.ts +1 -0
- package/dist/cjs/types/components/Chip/Chip.d.ts +2 -2
- package/dist/cjs/types/components/Chip/Chip.overrides.d.ts +72 -2
- package/dist/cjs/types/components/TabGroup/TabGroup.d.ts +5 -1
- package/dist/cjs/types/components/Tag/Tag.d.ts +9 -0
- package/dist/cjs/types/components/Tag/Tag.overrides.d.ts +2 -0
- package/dist/cjs/types/components/Tag/Tag.test.d.ts +1 -0
- package/dist/cjs/types/index.d.ts +2 -0
- package/dist/esm/index.js +1 -1
- package/dist/esm/types/components/Badge/Badge.d.ts +8 -0
- package/dist/esm/types/components/Badge/Badge.overrides.d.ts +2 -0
- package/dist/esm/types/components/Badge/Badge.test.d.ts +1 -0
- package/dist/esm/types/components/Chip/Chip.d.ts +2 -2
- package/dist/esm/types/components/Chip/Chip.overrides.d.ts +72 -2
- package/dist/esm/types/components/TabGroup/TabGroup.d.ts +5 -1
- package/dist/esm/types/components/Tag/Tag.d.ts +9 -0
- package/dist/esm/types/components/Tag/Tag.overrides.d.ts +2 -0
- package/dist/esm/types/components/Tag/Tag.test.d.ts +1 -0
- package/dist/esm/types/index.d.ts +2 -0
- package/dist/index.d.ts +22 -5
- package/package.json +1 -1
|
@@ -3,6 +3,6 @@ import { ChipProps as MUIChipProps } from '@mui/material';
|
|
|
3
3
|
import { MUIGlobalOmit } from '@global/utils/types';
|
|
4
4
|
export declare type ChipProps = MUIGlobalOmit<Omit<MUIChipProps, 'size'>>;
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
6
|
+
* @deprecated Please use [Tags](https://up-components.up42.dev/?path=/docs/data-display-tag) instead
|
|
7
7
|
*/
|
|
8
|
-
export declare const Chip: ({ label, ...props }: ChipProps) => JSX.Element;
|
|
8
|
+
export declare const Chip: ({ label, sx, ...props }: ChipProps) => JSX.Element;
|
|
@@ -1,2 +1,72 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
export declare const MuiChip: {
|
|
2
|
+
styleOverrides: {
|
|
3
|
+
fontSize: string;
|
|
4
|
+
fontWeight: number;
|
|
5
|
+
borderRadius: number;
|
|
6
|
+
fontFamily: string;
|
|
7
|
+
'& .MuiChip-icon': {
|
|
8
|
+
width: string;
|
|
9
|
+
height: string;
|
|
10
|
+
marginLeft: string;
|
|
11
|
+
};
|
|
12
|
+
'&.MuiChip-colorDefault': {
|
|
13
|
+
backgroundColor: string;
|
|
14
|
+
color: string;
|
|
15
|
+
'&.MuiChip-clickable:hover': {
|
|
16
|
+
backgroundColor: string;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
'&.MuiChip-colorPrimary': {
|
|
20
|
+
backgroundColor: string;
|
|
21
|
+
color: string;
|
|
22
|
+
'&.MuiChip-clickable:hover': {
|
|
23
|
+
backgroundColor: string;
|
|
24
|
+
};
|
|
25
|
+
'& .MuiChip-deleteIcon': {
|
|
26
|
+
color: string;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
'&.MuiChip-colorSecondary': {
|
|
30
|
+
backgroundColor: string;
|
|
31
|
+
color: string;
|
|
32
|
+
'& .MuiChip-deleteIcon': {
|
|
33
|
+
color: string;
|
|
34
|
+
};
|
|
35
|
+
'&.MuiChip-clickable:hover': {
|
|
36
|
+
backgroundColor: string;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
'&.MuiChip-colorError': {
|
|
40
|
+
backgroundColor: string;
|
|
41
|
+
color: string;
|
|
42
|
+
'& .MuiChip-deleteIcon': {
|
|
43
|
+
color: string;
|
|
44
|
+
};
|
|
45
|
+
'&.MuiChip-clickable:hover': {
|
|
46
|
+
backgroundColor: string;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
'&.MuiChip-colorInfo': {
|
|
50
|
+
backgroundColor: string;
|
|
51
|
+
color: string;
|
|
52
|
+
'& .MuiChip-deleteIcon': {
|
|
53
|
+
color: string;
|
|
54
|
+
};
|
|
55
|
+
'&.MuiChip-clickable:hover': {
|
|
56
|
+
backgroundColor: string;
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
'&.MuiChip-colorSuccess': {
|
|
60
|
+
backgroundColor: string;
|
|
61
|
+
color: string;
|
|
62
|
+
'&.MuiChip-clickable:hover': {
|
|
63
|
+
backgroundColor: string;
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
'&.MuiChip-colorWarning': {
|
|
67
|
+
'&.MuiChip-clickable:hover': {
|
|
68
|
+
backgroundColor: string;
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
};
|
|
@@ -13,9 +13,13 @@ export declare type TabGroupProps = {
|
|
|
13
13
|
* A unique value should be provided when multiple tabGroup components are used on the same page.
|
|
14
14
|
*/
|
|
15
15
|
nameSpace?: string;
|
|
16
|
+
/**
|
|
17
|
+
* Set defaultValue for routing to a specific tab using useQueryParam('tab') in parent component
|
|
18
|
+
*/
|
|
19
|
+
defaultValue?: string | number;
|
|
16
20
|
};
|
|
17
21
|
/**
|
|
18
22
|
* Documentation: https://up-components.up42.dev/?path=/docs/patterns-tabgroup
|
|
19
23
|
*/
|
|
20
|
-
export declare const TabGroup: ({ tabs, nameSpace: _nameSpace, tabContentProps, tabsProps }: TabGroupProps) => JSX.Element;
|
|
24
|
+
export declare const TabGroup: ({ tabs, nameSpace: _nameSpace, tabContentProps, tabsProps, defaultValue }: TabGroupProps) => JSX.Element;
|
|
21
25
|
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ChipProps as MUIChipProps } from '@mui/material';
|
|
3
|
+
import { MUIGlobalOmit } from '@global/utils/types';
|
|
4
|
+
export declare type TagProps = MUIGlobalOmit<Omit<MUIChipProps, 'size'>>;
|
|
5
|
+
/**
|
|
6
|
+
* Documentation: https://up-components.up42.dev/?path=/docs/data-display-tag
|
|
7
|
+
* @beta this component is still in development
|
|
8
|
+
*/
|
|
9
|
+
export declare const Tag: ({ color, ...props }: TagProps) => JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -37,6 +37,8 @@ export { PageHeader, type PageHeaderProps } from './components/PageHeader/PageHe
|
|
|
37
37
|
export { NotFound } from './components/NotFound/NotFound';
|
|
38
38
|
export { Loading, type LoadingProps } from './components/Loading/Loading';
|
|
39
39
|
export { Icon, type IconProps } from './components/Icon/Icon';
|
|
40
|
+
export { Badge, type BadgeProps } from './components/Badge/Badge';
|
|
41
|
+
export { Tag, type TagProps } from './components/Tag/Tag';
|
|
40
42
|
export { DocumentationPopover, type DocumentationPopoverProps, } from './components/DocumentationPopover/DocumentationPopover';
|
|
41
43
|
export { CodeBox, type CodeBoxProps } from './components/CodeBox/CodeBox';
|
|
42
44
|
export { Table, TableBody, TableCell, TableHead, TableContainer, TableRow, TableFooter, TablePagination, TableSortLabel, type TableProps, type TableBodyProps, type TableCellProps, type TableHeadProps, type TableContainerProps, type TableRowProps, type TableFooterProps, type TablePaginationProps, type TableSortLabelProps, } from './components/Table/Table';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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 { 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, ModalProps as ModalProps$1, CardProps, AlertProps as AlertProps$1, TooltipProps as TooltipProps$1, MenuProps as MenuProps$1, MenuItemProps as MenuItemProps$1, IconButtonProps, PopoverProps as PopoverProps$1, SvgIconProps } from '@mui/material';
|
|
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, ModalProps as ModalProps$1, CardProps, AlertProps as AlertProps$1, TooltipProps as TooltipProps$1, MenuProps as MenuProps$1, MenuItemProps as MenuItemProps$1, IconButtonProps, PopoverProps as PopoverProps$1, SvgIconProps, BadgeProps as BadgeProps$1 } from '@mui/material';
|
|
5
5
|
export * from '@mui/material';
|
|
6
6
|
import { ThemeProviderProps } from '@mui/material/styles/ThemeProvider';
|
|
7
7
|
import * as React from 'react';
|
|
@@ -115,9 +115,9 @@ declare const Typography: React__default.ForwardRefExoticComponent<Pick<{
|
|
|
115
115
|
|
|
116
116
|
declare type ChipProps = MUIGlobalOmit<Omit<ChipProps$1, 'size'>>;
|
|
117
117
|
/**
|
|
118
|
-
*
|
|
118
|
+
* @deprecated Please use [Tags](https://up-components.up42.dev/?path=/docs/data-display-tag) instead
|
|
119
119
|
*/
|
|
120
|
-
declare const Chip: ({ label, ...props }: ChipProps) => JSX.Element;
|
|
120
|
+
declare const Chip: ({ label, sx, ...props }: ChipProps) => JSX.Element;
|
|
121
121
|
|
|
122
122
|
declare type AvatarProps = MUIGlobalOmit<Omit<AvatarProps$1, 'children' | 'alt' | 'imgProps' | 'sizes' | 'src' | 'srcSet' | 'variant'>, {
|
|
123
123
|
firstName?: string;
|
|
@@ -338,11 +338,15 @@ declare type TabGroupProps = {
|
|
|
338
338
|
* A unique value should be provided when multiple tabGroup components are used on the same page.
|
|
339
339
|
*/
|
|
340
340
|
nameSpace?: string;
|
|
341
|
+
/**
|
|
342
|
+
* Set defaultValue for routing to a specific tab using useQueryParam('tab') in parent component
|
|
343
|
+
*/
|
|
344
|
+
defaultValue?: string | number;
|
|
341
345
|
};
|
|
342
346
|
/**
|
|
343
347
|
* Documentation: https://up-components.up42.dev/?path=/docs/patterns-tabgroup
|
|
344
348
|
*/
|
|
345
|
-
declare const TabGroup: ({ tabs, nameSpace: _nameSpace, tabContentProps, tabsProps }: TabGroupProps) => JSX.Element;
|
|
349
|
+
declare const TabGroup: ({ tabs, nameSpace: _nameSpace, tabContentProps, tabsProps, defaultValue }: TabGroupProps) => JSX.Element;
|
|
346
350
|
|
|
347
351
|
declare type EmptyStateProps<C extends React__default.ElementType = 'div'> = BaseProps<C, {
|
|
348
352
|
/**
|
|
@@ -1727,6 +1731,19 @@ declare type IconProps = {
|
|
|
1727
1731
|
*/
|
|
1728
1732
|
declare const Icon: ({ name, ...props }: IconProps) => JSX.Element;
|
|
1729
1733
|
|
|
1734
|
+
declare type BadgeProps = MUIGlobalOmit<BadgeProps$1>;
|
|
1735
|
+
/**
|
|
1736
|
+
* Documentation: https://up-components.up42.dev/?path=/docs/data-display-badge
|
|
1737
|
+
*/
|
|
1738
|
+
declare const Badge: ({ children, color, ...props }: BadgeProps) => JSX.Element;
|
|
1739
|
+
|
|
1740
|
+
declare type TagProps = MUIGlobalOmit<Omit<ChipProps$1, 'size'>>;
|
|
1741
|
+
/**
|
|
1742
|
+
* Documentation: https://up-components.up42.dev/?path=/docs/data-display-tag
|
|
1743
|
+
* @beta this component is still in development
|
|
1744
|
+
*/
|
|
1745
|
+
declare const Tag: ({ color, ...props }: TagProps) => JSX.Element;
|
|
1746
|
+
|
|
1730
1747
|
declare type DocumentationPopoverProps = {
|
|
1731
1748
|
heading: string;
|
|
1732
1749
|
/**
|
|
@@ -1861,4 +1878,4 @@ declare type ContextState = {
|
|
|
1861
1878
|
*/
|
|
1862
1879
|
declare const useAlert: () => ContextState;
|
|
1863
1880
|
|
|
1864
|
-
export { Alert, AlertProps, Avatar, AvatarProps, Banner, BannerProps, Box, BoxProps, Button, ButtonProps, Checkbox, CheckboxProps, Chip, ChipProps, CodeBox, CodeBoxProps, Container, ContainerProps, ControlButton, ControlButtonProps, CreateAlertProps, DataGrid, DataGridProps, DocumentationPopover, DocumentationPopoverProps, EmptyState, EmptyStateProps, FormCheckbox, FormCheckboxProps, FormInput, FormInputProps, FormRadio, FormRadioProps, FormSelect, FormSelectProps, FormSwitch, FormSwitchProps, Icon, IconProps, InfoCard, InfoCardProps, InfoModal, InfoModalProps, InfoPopover, InfoPopoverProps, Input, InputProps, Link, LinkProps, Loading, LoadingProps, Menu, MenuItem, MenuItemProps, MenuProps, Modal, ModalProps, NotFound, PageHeader, PageHeaderProps, PaginatedResponse, Popover, PopoverProps, 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, Tooltip, TooltipProps, Typography, TypographyProps, UpComponentsProvider, capitalize, copyToClipboard, theme, useAlert, useQueryParams, useRemotePagination };
|
|
1881
|
+
export { Alert, AlertProps, Avatar, AvatarProps, Badge, BadgeProps, Banner, BannerProps, Box, BoxProps, Button, ButtonProps, Checkbox, CheckboxProps, Chip, ChipProps, CodeBox, CodeBoxProps, Container, ContainerProps, ControlButton, ControlButtonProps, CreateAlertProps, DataGrid, DataGridProps, DocumentationPopover, DocumentationPopoverProps, EmptyState, EmptyStateProps, FormCheckbox, FormCheckboxProps, FormInput, FormInputProps, FormRadio, FormRadioProps, FormSelect, FormSelectProps, FormSwitch, FormSwitchProps, Icon, IconProps, InfoCard, InfoCardProps, InfoModal, InfoModalProps, InfoPopover, InfoPopoverProps, Input, InputProps, Link, LinkProps, Loading, LoadingProps, Menu, MenuItem, MenuItemProps, MenuProps, Modal, ModalProps, NotFound, PageHeader, PageHeaderProps, PaginatedResponse, Popover, PopoverProps, 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, Tag, TagProps, Tooltip, TooltipProps, Typography, TypographyProps, UpComponentsProvider, capitalize, copyToClipboard, theme, useAlert, useQueryParams, useRemotePagination };
|