@digital-ai/dot-components 2.0.1 → 2.0.2
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/CHANGE_LOG.md +36 -6
- package/index.esm.js +303 -241
- package/index.umd.js +382 -318
- package/lib/components/avatar/Avatar.d.ts +2 -2
- package/lib/components/button-toggle/ButtonToggle.d.ts +3 -1
- package/lib/components/index.d.ts +2 -0
- package/lib/components/linear-progress/LinearProgress.d.ts +14 -0
- package/lib/components/linear-progress/LinearProgress.styles.d.ts +3 -0
- package/lib/components/linear-progress/index.d.ts +2 -0
- package/lib/components/menu/utils/constants.d.ts +2 -2
- package/lib/components/menu/utils/helpers.d.ts +1 -1
- package/lib/components/table/TablePagination.styles.d.ts +1 -0
- package/lib/theme-provider/ThemeProvider.d.ts +14 -1
- package/package.json +2 -2
|
@@ -3,11 +3,11 @@ import { CommonProps } from '../CommonProps';
|
|
|
3
3
|
export declare type AvatarSize = 'small' | 'medium' | 'large';
|
|
4
4
|
export declare type AvatarType = 'image' | 'text' | 'icon';
|
|
5
5
|
export declare type AvatarVariant = 'circular' | 'square';
|
|
6
|
-
export declare type AvatarColor = 'default' | 'green' | 'blue' | 'orange' | 'purple' | 'yellow' | 'red' | 'darkGrey' | 'lightGrey';
|
|
6
|
+
export declare type AvatarColor = 'default' | 'green' | 'blue' | 'orange' | 'purple' | 'yellow' | 'red' | 'darkGrey' | 'lightGrey' | 'transparent';
|
|
7
7
|
export interface AvatarProps extends CommonProps {
|
|
8
8
|
/** Text displayed on hover */
|
|
9
9
|
alt: string;
|
|
10
|
-
/** Color for avatar
|
|
10
|
+
/** Color for avatar */
|
|
11
11
|
color?: AvatarColor;
|
|
12
12
|
/** Used for the root node; button is used when onClick is passed. */
|
|
13
13
|
component?: string;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { MouseEvent } from 'react';
|
|
2
2
|
import { CommonProps } from '../CommonProps';
|
|
3
3
|
import { ButtonToggleOption, ButtonToggleOrientation, ButtonToggleSize, ButtonToggleValue } from './utils/models';
|
|
4
|
+
export declare type ButtonToggleColor = 'standard' | 'primary';
|
|
4
5
|
export interface ButtonToggleProps extends CommonProps {
|
|
5
6
|
/** button props for each toggle button options*/
|
|
6
7
|
buttonOptions: ButtonToggleOption[];
|
|
8
|
+
color?: ButtonToggleColor;
|
|
7
9
|
/** If true, the keyboard focus ripple will be disabled */
|
|
8
10
|
disableFocusRipple?: boolean;
|
|
9
11
|
/** If true, the ripple effect will be disabled. */
|
|
@@ -19,4 +21,4 @@ export interface ButtonToggleProps extends CommonProps {
|
|
|
19
21
|
/** The value to associate with the button when selected in a ToggleButtonGroup */
|
|
20
22
|
value?: ButtonToggleValue;
|
|
21
23
|
}
|
|
22
|
-
export declare const DotButtonToggle: ({ ariaLabel, buttonOptions, className, "data-testid": dataTestId, disableFocusRipple, disableRipple, exclusive, onChange, orientation, size, value, }: ButtonToggleProps) => JSX.Element;
|
|
24
|
+
export declare const DotButtonToggle: ({ ariaLabel, buttonOptions, className, color, "data-testid": dataTestId, disableFocusRipple, disableRipple, exclusive, onChange, orientation, size, value, }: ButtonToggleProps) => JSX.Element;
|
|
@@ -32,6 +32,7 @@ export type { SnackbarProps, SnackbarSeverity, SnackbarOrigin, } from './snackba
|
|
|
32
32
|
export type { CharactersLimit, InlineEditProps } from './inline-edit';
|
|
33
33
|
export type { progressColorOptions, progressVariantOptions, ProgressProps, } from './progress';
|
|
34
34
|
export type { FileItemProps, FileUploadError, FileUploadProps, ListItemFile, MappedFile, MappedListItemFile, } from './file-upload';
|
|
35
|
+
export type { LinearProgressColor, LinearProgressProps, LinearProgressVariant, } from './linear-progress';
|
|
35
36
|
export { DotAccordion } from './accordion/Accordion';
|
|
36
37
|
export { DotActionToolbar } from './action-toolbar/ActionToolbar';
|
|
37
38
|
export { DotAlertBanner } from './alert-banner/AlertBanner';
|
|
@@ -88,4 +89,5 @@ export { DotDivider } from './divider';
|
|
|
88
89
|
export { DotPopper } from './popper';
|
|
89
90
|
export { DotTruncateWithTooltip } from './truncate-with-tooltip';
|
|
90
91
|
export { DotDraggableList } from './draggable-list';
|
|
92
|
+
export { DotLinearProgress } from './linear-progress';
|
|
91
93
|
export { CreateUUID } from './createUUID';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { CommonProps } from '../CommonProps';
|
|
2
|
+
export declare type LinearProgressColor = 'primary' | 'secondary' | 'error' | 'warning' | 'purple';
|
|
3
|
+
export declare type LinearProgressVariant = 'buffer' | 'determinate' | 'indeterminate' | 'query';
|
|
4
|
+
export interface LinearProgressProps extends CommonProps {
|
|
5
|
+
/** The color of the component. */
|
|
6
|
+
color?: LinearProgressColor;
|
|
7
|
+
/** The value of the progress indicator for the determinate and buffer variants. Value between 0 and 100. */
|
|
8
|
+
value?: number;
|
|
9
|
+
/** The value for the buffer variant. Value between 0 and 100. **/
|
|
10
|
+
valueBuffer?: number;
|
|
11
|
+
/** The variant to use. Use indeterminate or query when there is no progress value. */
|
|
12
|
+
variant?: LinearProgressVariant;
|
|
13
|
+
}
|
|
14
|
+
export declare const DotLinearProgress: ({ ariaLabel, color, className, "data-testid": dataTestId, value, valueBuffer, variant, }: LinearProgressProps) => JSX.Element;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare const MENU_ITEM_HEIGHT_NORMAL =
|
|
2
|
-
export declare const MENU_ITEM_HEIGHT_DENSE =
|
|
1
|
+
export declare const MENU_ITEM_HEIGHT_NORMAL = 48;
|
|
2
|
+
export declare const MENU_ITEM_HEIGHT_DENSE = 36;
|
|
3
3
|
export declare const DEFAULT_MAX_VISIBLE_ITEMS = 7;
|
|
@@ -5,7 +5,7 @@ interface MaxHeightCalculationArgs {
|
|
|
5
5
|
menuItemHeight?: number | string;
|
|
6
6
|
menuItems: MenuItemProps[];
|
|
7
7
|
}
|
|
8
|
-
export declare const getDefaultItemHeight: (isDense: boolean) =>
|
|
8
|
+
export declare const getDefaultItemHeight: (isDense: boolean) => 36 | 48;
|
|
9
9
|
export declare const calculateItemHeight: (isDense: boolean, customItemHeight?: number, menuItemHeight?: number | string) => number | string;
|
|
10
10
|
export declare const getNumberOfVisibleItems: (numberOfItems: number, maxVisibleItems?: number) => number;
|
|
11
11
|
export declare const calculateMaxHeight: ({ isDense, maxVisibleItems, menuItems, menuItemHeight, }: MaxHeightCalculationArgs) => number | string;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { TypographyVariant } from '../typography/Typography';
|
|
2
2
|
export declare const rootClassName = "dot-table-pagination";
|
|
3
|
+
export declare const paginationItemClassName = "dot-pagination-menu-item";
|
|
3
4
|
export interface StyledTablePaginationProps {
|
|
4
5
|
typography: TypographyVariant;
|
|
5
6
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { Theme } from '@mui/material';
|
|
3
3
|
import { TypographyOptions } from '@mui/material/styles/createTypography';
|
|
4
|
-
import { AvatarPaletteColorOptions } from '../../../../../typings/material
|
|
4
|
+
import { AvatarPaletteColorOptions } from '../../../../../typings/material';
|
|
5
5
|
export declare type ThemeOptions = 'light' | 'dark';
|
|
6
6
|
export declare const typographyOptions: TypographyOptions;
|
|
7
7
|
export declare const avatarColors: AvatarPaletteColorOptions;
|
|
@@ -12,3 +12,16 @@ export interface ThemeProviderProps {
|
|
|
12
12
|
theme?: Theme | ThemeOptions;
|
|
13
13
|
}
|
|
14
14
|
export declare function DotThemeProvider({ children, theme, }: ThemeProviderProps): JSX.Element;
|
|
15
|
+
declare module '@mui/material/LinearProgress' {
|
|
16
|
+
interface LinearProgressPropsColorOverrides {
|
|
17
|
+
purple: true;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
declare module '@mui/material/styles/createPalette' {
|
|
21
|
+
interface Palette {
|
|
22
|
+
purple?: PaletteColorOptions;
|
|
23
|
+
}
|
|
24
|
+
interface PaletteOptions {
|
|
25
|
+
purple?: PaletteColorOptions;
|
|
26
|
+
}
|
|
27
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@digital-ai/dot-components",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"license": "SEE LICENSE IN <LICENSE.md>",
|
|
6
6
|
"contributors": [
|
|
@@ -34,6 +34,6 @@
|
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
36
|
"react": "^17.0.2 || ^18.0.0",
|
|
37
|
-
"react-router-dom": "6.
|
|
37
|
+
"react-router-dom": "6.4.4"
|
|
38
38
|
}
|
|
39
39
|
}
|