@equisoft/design-elements-react 3.5.1-snapshot.20210930184209 → 3.5.1-snapshot.20211006023909
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/bundle.js +347 -181
- package/dist/components/avatar/avatar.d.ts +1 -2
- package/dist/components/bento-menu-button/bento-menu-button.d.ts +8 -0
- package/dist/components/buttons/icon-button.d.ts +4 -2
- package/dist/components/chooser-button/chooser-button.d.ts +2 -2
- package/dist/components/dropdown-menu/dropdown-menu.d.ts +10 -0
- package/dist/components/dropdown-menu/list-items/external-item.d.ts +14 -0
- package/dist/components/dropdown-menu/list-items/group-item.d.ts +11 -0
- package/dist/components/dropdown-menu/list-items/index.d.ts +5 -0
- package/dist/components/dropdown-menu/list-items/item-content.d.ts +12 -0
- package/dist/components/dropdown-menu/list-items/label-item.d.ts +14 -0
- package/dist/components/dropdown-menu/list-items/nav-item.d.ts +23 -0
- package/dist/components/dropdown-menu-button/dropdown-menu-button.d.ts +32 -0
- package/dist/components/external-link/external-link.d.ts +1 -2
- package/dist/components/heading/heading.d.ts +1 -2
- package/dist/components/text-input/text-input.d.ts +1 -1
- package/dist/components/user-profile/user-profile.d.ts +4 -5
- package/dist/hooks/use-data-attributes.d.ts +5 -0
- package/dist/i18n/translations.d.ts +8 -0
- package/dist/index.d.ts +2 -0
- package/package.json +8 -8
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ReactElement } from 'react';
|
|
2
2
|
export declare type AvatarSize = 'xsmall' | 'small' | 'medium' | 'large';
|
|
3
|
-
interface AvatarProps {
|
|
3
|
+
export interface AvatarProps {
|
|
4
4
|
className?: string;
|
|
5
5
|
username?: string;
|
|
6
6
|
bgColor?: string;
|
|
@@ -8,4 +8,3 @@ interface AvatarProps {
|
|
|
8
8
|
size?: AvatarSize;
|
|
9
9
|
}
|
|
10
10
|
export declare function Avatar({ className, username, bgColor, imgSrc, size, }: AvatarProps): ReactElement;
|
|
11
|
-
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { FunctionComponent } from 'react';
|
|
2
|
+
import { ExternalItemProps, NavItemProps } from '../dropdown-menu/list-items';
|
|
3
|
+
interface BentoMenuButtonProps {
|
|
4
|
+
productLinks: NavItemProps[];
|
|
5
|
+
externalLinks: ExternalItemProps[];
|
|
6
|
+
}
|
|
7
|
+
export declare const BentoMenuButton: FunctionComponent<BentoMenuButtonProps>;
|
|
8
|
+
export {};
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import React, { MouseEvent } from 'react';
|
|
2
|
-
import { IconName } from '../icon/icon';
|
|
1
|
+
import React, { MouseEvent, ReactElement } from 'react';
|
|
2
|
+
import { IconName, IconProps } from '../icon/icon';
|
|
3
|
+
import { AvatarProps } from '../avatar/avatar';
|
|
3
4
|
declare type ButtonType = 'primary' | 'secondary' | 'tertiary' | 'destructive';
|
|
4
5
|
declare type Type = 'submit' | 'button' | 'reset';
|
|
5
6
|
export interface IconButtonProps {
|
|
7
|
+
children?: ReactElement<IconProps | AvatarProps>;
|
|
6
8
|
/**
|
|
7
9
|
* Visual style
|
|
8
10
|
* @default primary
|
|
@@ -8,5 +8,5 @@ interface ChooserButtonProps {
|
|
|
8
8
|
value?: string;
|
|
9
9
|
onChange(event: ChangeEvent<HTMLInputElement>): void;
|
|
10
10
|
}
|
|
11
|
-
declare const ChooserButton: React.ForwardRefExoticComponent<ChooserButtonProps & React.RefAttributes<HTMLInputElement>>;
|
|
12
|
-
export {
|
|
11
|
+
export declare const ChooserButton: React.ForwardRefExoticComponent<ChooserButtonProps & React.RefAttributes<HTMLInputElement>>;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React, { KeyboardEvent, ReactElement } from 'react';
|
|
2
|
+
import { GroupItemProps } from './list-items';
|
|
3
|
+
export interface DropdownMenuProps {
|
|
4
|
+
children?: ReactElement<GroupItemProps> | ReactElement<GroupItemProps>[];
|
|
5
|
+
id?: string;
|
|
6
|
+
className?: string;
|
|
7
|
+
hidden?: boolean;
|
|
8
|
+
onKeyDown?(event: KeyboardEvent): void;
|
|
9
|
+
}
|
|
10
|
+
export declare const DropdownMenu: React.ForwardRefExoticComponent<DropdownMenuProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
import { DeviceContextProps } from '../../device-context-provider/device-context-provider';
|
|
3
|
+
import { ExternalLink, ExternalLinkProps } from '../../external-link/external-link';
|
|
4
|
+
export interface ExternalItemProps extends ExternalLinkProps {
|
|
5
|
+
label: string;
|
|
6
|
+
href: string;
|
|
7
|
+
onClick?(): void;
|
|
8
|
+
}
|
|
9
|
+
interface ExternalItemsStyledProps extends ExternalItemProps {
|
|
10
|
+
$device: DeviceContextProps;
|
|
11
|
+
}
|
|
12
|
+
export declare const StyledExternalLink: import("styled-components").StyledComponent<typeof ExternalLink, import("styled-components").DefaultTheme, ExternalItemsStyledProps, never>;
|
|
13
|
+
export declare const ExternalItem: ({ href, label, onClick, }: ExternalItemProps) => ReactElement;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React, { ReactElement, VoidFunctionComponent } from 'react';
|
|
2
|
+
import { NavItemProps } from './nav-item';
|
|
3
|
+
import { HeadingProps } from '../../heading/heading';
|
|
4
|
+
export interface GroupItemProps {
|
|
5
|
+
id?: string;
|
|
6
|
+
children: ReactElement<NavItemProps> | ReactElement<NavItemProps>[];
|
|
7
|
+
ordered?: boolean;
|
|
8
|
+
label?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare const StyledHeading: import("styled-components").StyledComponent<React.ForwardRefExoticComponent<HeadingProps & React.RefAttributes<HTMLHeadingElement>>, import("styled-components").DefaultTheme, HeadingProps, never>;
|
|
11
|
+
export declare const GroupItem: VoidFunctionComponent<GroupItemProps>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { ExternalItem, ExternalItemProps } from './external-item';
|
|
2
|
+
export { GroupItem, GroupItemProps } from './group-item';
|
|
3
|
+
export { ItemContent } from './item-content';
|
|
4
|
+
export { LabelItem } from './label-item';
|
|
5
|
+
export { NavItem, NavItemProps } from './nav-item';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { VoidFunctionComponent } from 'react';
|
|
2
|
+
import { DeviceContextProps } from '../../device-context-provider/device-context-provider';
|
|
3
|
+
import { IconName } from '../../icon/icon';
|
|
4
|
+
export interface ItemContentProps {
|
|
5
|
+
device: DeviceContextProps;
|
|
6
|
+
smallLabel?: boolean;
|
|
7
|
+
description?: string;
|
|
8
|
+
iconName?: IconName;
|
|
9
|
+
label: string;
|
|
10
|
+
lozenge?: string;
|
|
11
|
+
}
|
|
12
|
+
export declare const ItemContent: VoidFunctionComponent<ItemContentProps>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
import { DeviceContextProps } from '../../device-context-provider/device-context-provider';
|
|
3
|
+
import { IconName } from '../../icon/icon';
|
|
4
|
+
interface LabelItemProps {
|
|
5
|
+
description?: string;
|
|
6
|
+
iconName?: IconName;
|
|
7
|
+
label: string;
|
|
8
|
+
}
|
|
9
|
+
interface LabelContainerStyledProps {
|
|
10
|
+
$device: DeviceContextProps;
|
|
11
|
+
}
|
|
12
|
+
export declare const StyledLabelItem: import("styled-components").StyledComponent<"label", import("styled-components").DefaultTheme, LabelContainerStyledProps, never>;
|
|
13
|
+
export declare const LabelItem: ({ description, iconName, label, }: LabelItemProps) => ReactElement;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React, { MouseEvent } from 'react';
|
|
2
|
+
import { NavLink, NavLinkProps } from 'react-router-dom';
|
|
3
|
+
import { DeviceContextProps } from '../../device-context-provider/device-context-provider';
|
|
4
|
+
import { IconName } from '../../icon/icon';
|
|
5
|
+
export interface NavItemProps {
|
|
6
|
+
value: string;
|
|
7
|
+
href: string;
|
|
8
|
+
description?: string;
|
|
9
|
+
iconName?: IconName;
|
|
10
|
+
label?: string;
|
|
11
|
+
lozenge?: string;
|
|
12
|
+
exact?: boolean;
|
|
13
|
+
isHtmlLink?: boolean;
|
|
14
|
+
onClick?(event: MouseEvent<HTMLLIElement>): void;
|
|
15
|
+
}
|
|
16
|
+
interface LinkProps {
|
|
17
|
+
$hasIcon?: boolean;
|
|
18
|
+
$device: DeviceContextProps;
|
|
19
|
+
}
|
|
20
|
+
export declare const StyledNavItem: import("styled-components").StyledComponent<typeof NavLink, import("styled-components").DefaultTheme, LinkProps & NavLinkProps<unknown>, never>;
|
|
21
|
+
export declare const HtmlLink: import("styled-components").StyledComponent<"a", import("styled-components").DefaultTheme, LinkProps, never>;
|
|
22
|
+
export declare const NavItem: React.ForwardRefExoticComponent<NavItemProps & React.RefAttributes<HTMLAnchorElement>>;
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import React, { ReactElement, RefObject, VoidFunctionComponent } from 'react';
|
|
2
|
+
import { IconProps } from '../icon/icon';
|
|
3
|
+
import { GroupItemProps } from '../dropdown-menu/list-items';
|
|
4
|
+
import { AvatarProps } from '../avatar/avatar';
|
|
5
|
+
export declare const StyledDropdownMenu: import("styled-components").StyledComponent<React.ForwardRefExoticComponent<import("../dropdown-menu/dropdown-menu").DropdownMenuProps & React.RefAttributes<HTMLDivElement>>, import("styled-components").DefaultTheme, {}, never>;
|
|
6
|
+
interface MenuButtonProps {
|
|
7
|
+
label?: string;
|
|
8
|
+
title?: string;
|
|
9
|
+
/**
|
|
10
|
+
* Sets nav's description
|
|
11
|
+
* @default 'Menu'
|
|
12
|
+
* */
|
|
13
|
+
ariaLabel?: string;
|
|
14
|
+
render?(close: () => void): ReactElement<GroupItemProps> | ReactElement<GroupItemProps>[];
|
|
15
|
+
className?: string;
|
|
16
|
+
/**
|
|
17
|
+
* Sets menu open by default
|
|
18
|
+
* @default false
|
|
19
|
+
* */
|
|
20
|
+
defaultOpen?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Sets chevron icon
|
|
23
|
+
* @default true
|
|
24
|
+
* */
|
|
25
|
+
hasCaret?: boolean;
|
|
26
|
+
icon?: ReactElement<IconProps | AvatarProps>;
|
|
27
|
+
id?: string;
|
|
28
|
+
firstItemRef?: RefObject<HTMLAnchorElement>;
|
|
29
|
+
onMenuVisibilityChanged?(isOpen: boolean): void;
|
|
30
|
+
}
|
|
31
|
+
export declare const DropdownMenuButton: VoidFunctionComponent<MenuButtonProps>;
|
|
32
|
+
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ReactElement } from 'react';
|
|
2
2
|
import { IconName } from '../icon/icon';
|
|
3
|
-
interface ExternalLinkProps {
|
|
3
|
+
export interface ExternalLinkProps {
|
|
4
4
|
className?: string;
|
|
5
5
|
disabled?: boolean;
|
|
6
6
|
href?: string;
|
|
@@ -10,4 +10,3 @@ interface ExternalLinkProps {
|
|
|
10
10
|
onClick?(): void;
|
|
11
11
|
}
|
|
12
12
|
export declare function ExternalLink({ className, disabled, href, iconName, label, onClick, target, }: ExternalLinkProps): ReactElement;
|
|
13
|
-
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { ReactNode } from 'react';
|
|
2
2
|
export declare type Type = 'xlarge' | 'large' | 'medium' | 'small' | 'subtitle';
|
|
3
3
|
export declare type Tag = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
|
|
4
|
-
interface HeadingProps {
|
|
4
|
+
export interface HeadingProps {
|
|
5
5
|
bold?: boolean;
|
|
6
6
|
children?: ReactNode;
|
|
7
7
|
className?: string;
|
|
@@ -11,4 +11,3 @@ interface HeadingProps {
|
|
|
11
11
|
type: Type;
|
|
12
12
|
}
|
|
13
13
|
export declare const Heading: React.ForwardRefExoticComponent<HeadingProps & React.RefAttributes<HTMLHeadingElement>>;
|
|
14
|
-
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { ChangeEvent, DetailedHTMLProps, FocusEvent,
|
|
1
|
+
import React, { ChangeEvent, DetailedHTMLProps, FocusEvent, InputHTMLAttributes, KeyboardEvent, MouseEvent } from 'react';
|
|
2
2
|
declare type PartialInputProps = Pick<DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, 'inputMode' | 'name' | 'value' | 'autoComplete'>;
|
|
3
3
|
interface TextInputProps extends PartialInputProps {
|
|
4
4
|
className?: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ReactElement } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { NavItemProps } from '../dropdown-menu/list-items';
|
|
3
3
|
interface UserProfileProps {
|
|
4
4
|
/**
|
|
5
5
|
* Sets nav's description
|
|
@@ -13,11 +13,10 @@ interface UserProfileProps {
|
|
|
13
13
|
* */
|
|
14
14
|
defaultOpen?: boolean;
|
|
15
15
|
id?: string;
|
|
16
|
+
options: NavItemProps[];
|
|
16
17
|
username: string;
|
|
17
|
-
|
|
18
|
-
options: NavMenuOption[];
|
|
18
|
+
userEmail?: string;
|
|
19
19
|
onMenuVisibilityChanged?(isOpen: boolean): void;
|
|
20
|
-
onMenuOptionSelected?(option: NavMenuOption): void;
|
|
21
20
|
}
|
|
22
|
-
export declare function UserProfile({ ariaLabel, className, defaultOpen, id, options, username,
|
|
21
|
+
export declare function UserProfile({ ariaLabel, className, defaultOpen, id, options, username, userEmail, onMenuVisibilityChanged, }: UserProfileProps): ReactElement;
|
|
23
22
|
export {};
|
|
@@ -3,6 +3,10 @@ export declare const Translations: {
|
|
|
3
3
|
avatar: {
|
|
4
4
|
ariaLabel: string;
|
|
5
5
|
};
|
|
6
|
+
bento: {
|
|
7
|
+
productsLabel: string;
|
|
8
|
+
externalsLabel: string;
|
|
9
|
+
};
|
|
6
10
|
datepicker: {
|
|
7
11
|
calendarButtonLabel: string;
|
|
8
12
|
calendarButtonSelectedLabel: string;
|
|
@@ -80,6 +84,10 @@ export declare const Translations: {
|
|
|
80
84
|
avatar: {
|
|
81
85
|
ariaLabel: string;
|
|
82
86
|
};
|
|
87
|
+
bento: {
|
|
88
|
+
productsLabel: string;
|
|
89
|
+
externalsLabel: string;
|
|
90
|
+
};
|
|
83
91
|
datepicker: {
|
|
84
92
|
calendarButtonLabel: string;
|
|
85
93
|
calendarButtonSelectedLabel: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ export { Button } from './components/buttons/button';
|
|
|
3
3
|
export { IconButton } from './components/buttons/icon-button';
|
|
4
4
|
export { NavMenuOption } from './components/nav-menu/nav-menu';
|
|
5
5
|
export { NavMenuButton } from './components/nav-menu-button/nav-menu-button';
|
|
6
|
+
export { BentoMenuButton } from './components/bento-menu-button/bento-menu-button';
|
|
6
7
|
export { ToggleButtonGroup } from './components/toggle-button-group/toggle-button-group';
|
|
7
8
|
export { Checkbox } from './components/checkbox/checkbox';
|
|
8
9
|
export { CheckboxGroup } from './components/checkbox-group/checkbox-group';
|
|
@@ -33,6 +34,7 @@ export { EnsoSpinner } from './components/enso-spinner/enso-spinner';
|
|
|
33
34
|
export { ExternalLink } from './components/external-link/external-link';
|
|
34
35
|
export { Heading } from './components/heading/heading';
|
|
35
36
|
export { ApplicationMenu } from './components/application-menu/application-menu';
|
|
37
|
+
export { DropdownMenu } from './components/dropdown-menu/dropdown-menu';
|
|
36
38
|
export { Icon } from './components/icon/icon';
|
|
37
39
|
export { SectionalBanner } from './components/sectional-banner/sectional-banner';
|
|
38
40
|
export * from './components/progress/progress';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@equisoft/design-elements-react",
|
|
3
|
-
"version": "3.5.1-snapshot.
|
|
3
|
+
"version": "3.5.1-snapshot.20211006023909",
|
|
4
4
|
"description": "React implementation of the Equisoft design system.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/bundle.js",
|
|
@@ -68,19 +68,19 @@
|
|
|
68
68
|
"@types/react-test-renderer": "^17.0.1",
|
|
69
69
|
"@types/styled-components": "^5.1.11",
|
|
70
70
|
"@types/testing-library__react-hooks": "^4.0.0",
|
|
71
|
-
"@typescript-eslint/eslint-plugin": "^4.
|
|
72
|
-
"@typescript-eslint/parser": "^4.
|
|
71
|
+
"@typescript-eslint/eslint-plugin": "^4.33.0",
|
|
72
|
+
"@typescript-eslint/parser": "^4.33.0",
|
|
73
73
|
"@wojtekmaj/enzyme-adapter-react-17": "^0.6.3",
|
|
74
74
|
"cross-env": "^7.0.3",
|
|
75
75
|
"css-loader": "^6.2.0",
|
|
76
76
|
"enzyme": "^3.11.0",
|
|
77
77
|
"enzyme-to-json": "~3.6.2",
|
|
78
78
|
"eslint": "^7.31.0",
|
|
79
|
-
"eslint-import-resolver-node": "^0.3.
|
|
80
|
-
"eslint-import-resolver-typescript": "^2.
|
|
81
|
-
"eslint-plugin-import": "^2.
|
|
79
|
+
"eslint-import-resolver-node": "^0.3.6",
|
|
80
|
+
"eslint-import-resolver-typescript": "^2.5.0",
|
|
81
|
+
"eslint-plugin-import": "^2.24.2",
|
|
82
82
|
"eslint-plugin-jsx-a11y": "^6.4.1",
|
|
83
|
-
"eslint-plugin-react": "^7.
|
|
83
|
+
"eslint-plugin-react": "^7.26.1",
|
|
84
84
|
"eslint-plugin-react-hooks": "^4.2.0",
|
|
85
85
|
"expect": "^27.0.6",
|
|
86
86
|
"full-icu": "^1.3.4",
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
"ts-jest": "^27.0.3",
|
|
102
102
|
"ts-loader": "^9.2.3",
|
|
103
103
|
"ts-mockito": "^2.6.1",
|
|
104
|
-
"typescript": "~4.3
|
|
104
|
+
"typescript": "~4.4.3",
|
|
105
105
|
"webpack": "^5.45.1",
|
|
106
106
|
"webpack-cli": "^4.7.2",
|
|
107
107
|
"webpack-merge": "^5.8.0"
|