@digital-ai/dot-components 1.10.1 → 1.11.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 +63 -9
- package/fonts/dot.woff +0 -0
- package/fonts/selection.json +1118 -442
- package/index.esm.js +67 -22
- package/index.umd.js +77 -33
- package/lib/components/auto-complete/index.d.ts +1 -1
- package/lib/components/badge/Badge.d.ts +7 -1
- package/lib/components/badge/index.d.ts +1 -0
- package/lib/components/chip/Chip.d.ts +4 -1
- package/lib/components/index.d.ts +2 -1
- package/lib/components/list/List.d.ts +1 -1
- package/lib/components/list/utils/models.d.ts +4 -0
- package/lib/components/menu/Menu.stories.data.d.ts +5 -1
- package/lib/components/menu/Menu.stories.styles.d.ts +2 -0
- package/lib/components/popper/index.d.ts +1 -1
- package/package.json +2 -3
|
@@ -1,14 +1,20 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { CommonProps } from '../CommonProps';
|
|
3
3
|
export declare type BadgeOverlap = 'circular' | 'rectangular';
|
|
4
|
+
export declare type BadgeVariant = 'standard' | 'dot';
|
|
4
5
|
export interface BadgeProps extends CommonProps {
|
|
5
6
|
/** custom color code for the badge */
|
|
6
7
|
badgeColor?: string;
|
|
8
|
+
/** the number rendered within the badge */
|
|
9
|
+
badgeContent?: number;
|
|
7
10
|
/** component which will be wrapped with the badge */
|
|
8
11
|
children: ReactNode;
|
|
9
12
|
/** if true, the badge will be completely hidden*/
|
|
10
13
|
invisible?: boolean;
|
|
14
|
+
/** max count to show */
|
|
15
|
+
max?: number;
|
|
11
16
|
/** outline shape of the child component */
|
|
12
17
|
overlap?: BadgeOverlap;
|
|
18
|
+
variant?: BadgeVariant;
|
|
13
19
|
}
|
|
14
|
-
export declare const DotBadge: ({ ariaLabel, badgeColor, children, className, "data-testid": dataTestId, invisible, overlap, }: BadgeProps) => JSX.Element;
|
|
20
|
+
export declare const DotBadge: ({ ariaLabel, badgeColor, badgeContent, children, className, "data-testid": dataTestId, invisible, max, overlap, variant, }: BadgeProps) => JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Badge';
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import { MouseEvent, ReactElement } from 'react';
|
|
2
2
|
import { CommonProps } from '../CommonProps';
|
|
3
3
|
export declare type ChipSize = 'medium' | 'small';
|
|
4
|
+
export declare const DEFAULT_CHARACTERS_LIMIT = 32;
|
|
4
5
|
export interface ChipProps extends CommonProps {
|
|
5
6
|
/** If provided, will display an avatar which takes precedence over icon */
|
|
6
7
|
avatar?: ReactElement;
|
|
8
|
+
/** Maximum number of characters until the label gets truncated. Default is 32. */
|
|
9
|
+
charactersLimit?: number;
|
|
7
10
|
/** The text for the chip. */
|
|
8
11
|
children: string;
|
|
9
12
|
/** If true, the chip is disabled */
|
|
@@ -23,4 +26,4 @@ export interface ChipProps extends CommonProps {
|
|
|
23
26
|
/** The icon to display on the chip */
|
|
24
27
|
startIcon?: ReactElement;
|
|
25
28
|
}
|
|
26
|
-
export declare const DotChip: ({ ariaLabel, avatar, children, className, "data-testid": dataTestId, disabled, error, isClickable, isDeletable, onClick, onDelete, size, startIcon, }: ChipProps) => JSX.Element;
|
|
29
|
+
export declare const DotChip: ({ ariaLabel, avatar, charactersLimit, children, className, "data-testid": dataTestId, disabled, error, isClickable, isDeletable, onClick, onDelete, size, startIcon, }: ChipProps) => JSX.Element;
|
|
@@ -26,6 +26,7 @@ export type { TypographyVariant } from './typography/Typography';
|
|
|
26
26
|
export type { ProgressButtonProps } from './progress-button/ProgressButton';
|
|
27
27
|
export type { PopperPlacementType } from './popper';
|
|
28
28
|
export type { DividerOrientation, DividerProps, DividerVariant, } from './divider';
|
|
29
|
+
export type { BadgeProps, BadgeOverlap, BadgeVariant } from './badge';
|
|
29
30
|
export { DotAccordion } from './accordion/Accordion';
|
|
30
31
|
export { DotActionToolbar } from './action-toolbar/ActionToolbar';
|
|
31
32
|
export { DotAlertBanner } from './alert-banner/AlertBanner';
|
|
@@ -34,7 +35,7 @@ export { DotAppToolbar } from './app-toolbar/AppToolbar';
|
|
|
34
35
|
export { DotAutoComplete, parseAutoCompleteValue } from './auto-complete';
|
|
35
36
|
export { DotAvatar } from './avatar/Avatar';
|
|
36
37
|
export { DotAvatarGroup } from './avatar-group/AvatarGroup';
|
|
37
|
-
export { DotBadge } from './badge
|
|
38
|
+
export { DotBadge } from './badge';
|
|
38
39
|
export { DotBreadcrumbs } from './breadcrumbs/Breadcrumbs';
|
|
39
40
|
export { DotButton } from './button/Button';
|
|
40
41
|
export { DotButtonToggle } from './button-toggle';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { ListItemProps, ListProps, NestedListProps } from './utils/models';
|
|
3
3
|
export declare const DotList: ({ ariaLabel, children, className, component, "data-testid": dataTestId, dense, disablePadding, items, menuPlacement, nestedDrawerLeftSpacing, nestedListType, width, }: ListProps) => JSX.Element;
|
|
4
|
-
export declare const DotListItem: ({ ariaLabel, className, component, "data-testid": dataTestId, divider, endIconId, href, isOpened, onClick, onMenuLeave, index, items, menuPlacement, nestedDrawerLeftSpacing, nestedListType, primaryText, secondaryText, selected, startIconId, target, text, title, tooltip, }: ListItemProps) => JSX.Element;
|
|
4
|
+
export declare const DotListItem: ({ ariaLabel, className, component, "data-testid": dataTestId, divider, endIcon, endIconId, href, isOpened, onClick, onMenuLeave, index, items, menuPlacement, nestedDrawerLeftSpacing, nestedListType, primaryText, secondaryText, selected, startIcon, startIconId, target, text, title, tooltip, }: ListItemProps) => JSX.Element;
|
|
5
5
|
export declare const NestedList: ({ ariaLabel, anchorEl, items, menuPlacement, nestedDrawerLeftSpacing, onMenuLeave, open, parentItemIndex, type, }: NestedListProps) => JSX.Element;
|
|
@@ -31,6 +31,8 @@ export interface ListItemProps extends CommonProps {
|
|
|
31
31
|
/** If true, a 1px light border is added to the bottom of the list item. */
|
|
32
32
|
divider?: boolean;
|
|
33
33
|
/** If provided, the icon ID which is displayed at the end of the list item */
|
|
34
|
+
endIcon?: ReactNode;
|
|
35
|
+
/** DEPRECATED, DO NOT USE */
|
|
34
36
|
endIconId?: string;
|
|
35
37
|
/** If provided, the list item will be rendered as a link */
|
|
36
38
|
href?: string;
|
|
@@ -56,6 +58,8 @@ export interface ListItemProps extends CommonProps {
|
|
|
56
58
|
/** Selected list item */
|
|
57
59
|
selected?: boolean;
|
|
58
60
|
/** If provided, the icon ID which is displayed on the front of the list item */
|
|
61
|
+
startIcon?: ReactNode;
|
|
62
|
+
/** DEPRECATED, DO NOT USE */
|
|
59
63
|
startIconId?: string;
|
|
60
64
|
/** where to open the link */
|
|
61
65
|
target?: LinkTarget;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import { MouseEvent } from 'react';
|
|
2
2
|
import { MenuItemProps } from '../menu/Menu';
|
|
3
3
|
export declare const defaultMenuItems: ({
|
|
4
4
|
children: JSX.Element;
|
|
@@ -22,3 +22,7 @@ export declare const tableMenuItems: ({
|
|
|
22
22
|
key: string;
|
|
23
23
|
})[];
|
|
24
24
|
export declare const customHeightMenuItems: MenuItemProps[];
|
|
25
|
+
export interface MenuTableArgs {
|
|
26
|
+
onIconButtonClick: (event: MouseEvent<HTMLButtonElement>, menuId: string) => void;
|
|
27
|
+
}
|
|
28
|
+
export declare const MenuTable: ({ onIconButtonClick }: MenuTableArgs) => JSX.Element;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export declare const rootClassName = "dot-menu-wrapper";
|
|
2
2
|
export declare const multiLevelClassName = "dot-multi-level-menu";
|
|
3
|
+
export declare const menuTableClassName = "dot-menu-table";
|
|
3
4
|
export declare const StyledMenuWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
4
5
|
export declare const StyledMultiLevelMenu: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
6
|
+
export declare const StyledMenuTable: import("styled-components").StyledComponent<"table", any, {}, never>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { PopperPlacementType } from '@material-ui/core';
|
|
1
|
+
export type { PopperPlacementType } from '@material-ui/core';
|
|
2
2
|
export * from './Popper';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@digital-ai/dot-components",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.11.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"license": "SEE LICENSE IN <LICENSE.md>",
|
|
6
6
|
"contributors": [
|
|
@@ -32,7 +32,6 @@
|
|
|
32
32
|
"styled-components": "^5.2.1"
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
|
35
|
-
"react": "^16.8.0 || ^17.0.0"
|
|
36
|
-
"react-router-dom": "5.3.0"
|
|
35
|
+
"react": "^16.8.0 || ^17.0.0"
|
|
37
36
|
}
|
|
38
37
|
}
|