@equisoft/design-elements-react 8.0.1-snapshot.20241022192525 → 8.0.1-snapshot.20241022201711
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 +158 -102
- package/dist/components/buttons/abstract/abstract-button.d.ts +4 -0
- package/dist/components/buttons/abstract/styled.d.ts +11 -0
- package/dist/components/buttons/abstract/types.d.ts +7 -0
- package/dist/components/buttons/button.d.ts +1 -40
- package/dist/components/buttons/icon-button.d.ts +2 -1
- package/dist/components/buttons/index.d.ts +8 -0
- package/dist/components/buttons/styled.d.ts +23 -0
- package/dist/components/buttons/types.d.ts +40 -0
- package/dist/components/disclosure/disclosure.d.ts +1 -1
- package/dist/components/dropdown-menu-button/dropdown-menu-button.d.ts +1 -1
- package/dist/components/dropdown-navigation/dropdown-navigation.d.ts +1 -1
- package/dist/components/external-link/external-link.d.ts +3 -0
- package/dist/components/link/index.d.ts +1 -0
- package/dist/components/link/link.d.ts +3 -0
- package/dist/components/link/styled.d.ts +6 -0
- package/dist/components/link/types.d.ts +22 -0
- package/dist/components/menu-button/menu-button.d.ts +1 -1
- package/dist/components/route-link/route-link.d.ts +3 -0
- package/dist/index.d.ts +3 -1
- package/dist/theme.js +1 -1
- package/dist/themes/tokens/component/link-tokens.d.ts +1 -1
- package/package.json +1 -1
- package/dist/components/buttons/abstract-button.d.ts +0 -26
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { FlattenInterpolation, ThemeProps } from 'styled-components';
|
|
2
|
+
import { ResolvedTheme } from '../../../themes/theme';
|
|
3
|
+
import { Size } from './types';
|
|
4
|
+
export interface BaseButtonStyles {
|
|
5
|
+
$size?: Size;
|
|
6
|
+
$isMobile: boolean;
|
|
7
|
+
$focusable?: boolean;
|
|
8
|
+
$inverted?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare const getBaseButtonStyles: ({ $size, $isMobile, $focusable, $inverted, }: BaseButtonStyles) => FlattenInterpolation<ThemeProps<ResolvedTheme>>;
|
|
11
|
+
export declare const StyledAbstractButton: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, BaseButtonStyles, never>;
|
|
@@ -1,43 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { IconName } from '../icon/icon';
|
|
3
|
-
import { ButtonType } from './abstract-button';
|
|
4
|
-
export type Size = 'small' | 'medium';
|
|
5
|
-
export type Type = 'submit' | 'button' | 'reset';
|
|
6
|
-
export interface ButtonProps {
|
|
7
|
-
id?: string;
|
|
8
|
-
autofocus?: boolean;
|
|
9
|
-
/**
|
|
10
|
-
* Visual style
|
|
11
|
-
* @default primary
|
|
12
|
-
*/
|
|
13
|
-
buttonType: ButtonType;
|
|
14
|
-
className?: string;
|
|
15
|
-
disabled?: boolean;
|
|
16
|
-
/**
|
|
17
|
-
* @default true
|
|
18
|
-
*/
|
|
19
|
-
focusable?: boolean;
|
|
20
|
-
inverted?: boolean;
|
|
21
|
-
label?: string;
|
|
22
|
-
loading?: boolean;
|
|
23
|
-
/**
|
|
24
|
-
* @default Loading...
|
|
25
|
-
*/
|
|
26
|
-
loadingLabel?: string;
|
|
27
|
-
/**
|
|
28
|
-
* Size variant
|
|
29
|
-
* @default medium
|
|
30
|
-
*/
|
|
31
|
-
size?: Size;
|
|
32
|
-
title?: string;
|
|
33
|
-
type?: Type;
|
|
34
|
-
leftIconName?: IconName;
|
|
35
|
-
rightIconName?: IconName;
|
|
36
|
-
onClick?(event: MouseEvent<HTMLButtonElement>): void;
|
|
37
|
-
onFocus?: FocusEventHandler<HTMLButtonElement>;
|
|
38
|
-
onBlur?: FocusEventHandler<HTMLButtonElement>;
|
|
39
|
-
onKeyDown?(event: KeyboardEvent<HTMLButtonElement>): void;
|
|
40
|
-
}
|
|
1
|
+
import { ButtonProps } from './types';
|
|
41
2
|
export declare const Button: import("react").ForwardRefExoticComponent<ButtonProps & {
|
|
42
3
|
children?: import("react").ReactNode | undefined;
|
|
43
4
|
} & import("react").RefAttributes<HTMLButtonElement>>;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { ReactElement } from 'react';
|
|
2
2
|
import { AvatarProps } from '../avatar/avatar';
|
|
3
3
|
import { IconName, IconProps } from '../icon/icon';
|
|
4
|
-
import {
|
|
4
|
+
import { Size } from './abstract/types';
|
|
5
|
+
import { ButtonProps } from './types';
|
|
5
6
|
export interface IconButtonProps extends ButtonProps {
|
|
6
7
|
children?: ReactElement<IconProps | AvatarProps>;
|
|
7
8
|
/**
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { Size } from './abstract/types';
|
|
2
|
+
export { ButtonProps, ButtonType, Type } from './types';
|
|
3
|
+
export { getBaseButtonStyles } from './abstract/styled';
|
|
4
|
+
export { getButtonTypeStyles, getButtonStyles } from './styled';
|
|
5
|
+
export { AbstractButton } from './abstract/abstract-button';
|
|
6
|
+
export { Button } from './button';
|
|
7
|
+
export { SearchButton } from './search-button';
|
|
8
|
+
export { IconButton } from './icon-button';
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { FlattenInterpolation, ThemeProps } from 'styled-components';
|
|
2
|
+
import { ResolvedTheme } from '../../themes/theme';
|
|
3
|
+
import { BaseButtonStyles } from './abstract/styled';
|
|
4
|
+
import { ButtonProps, ButtonType } from './types';
|
|
5
|
+
interface ButtonTypeStyles {
|
|
6
|
+
buttonType: ButtonType;
|
|
7
|
+
focusable?: boolean;
|
|
8
|
+
inverted?: boolean;
|
|
9
|
+
theme: ResolvedTheme;
|
|
10
|
+
}
|
|
11
|
+
export declare function getButtonTypeStyles({ focusable, inverted, buttonType, theme, }: ButtonTypeStyles): FlattenInterpolation<ThemeProps<ResolvedTheme>>;
|
|
12
|
+
interface ButtonStylesProps extends ButtonTypeStyles, BaseButtonStyles {
|
|
13
|
+
}
|
|
14
|
+
export declare const getButtonStyles: ({ buttonType, inverted, focusable, $size, $isMobile, theme, }: ButtonStylesProps) => FlattenInterpolation<ThemeProps<ResolvedTheme>>;
|
|
15
|
+
export declare const StyledButton: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("./abstract/types").AbstractButtonProps & {
|
|
16
|
+
children?: import("react").ReactNode | undefined;
|
|
17
|
+
} & import("react").RefAttributes<HTMLButtonElement>>, import("styled-components").DefaultTheme, {
|
|
18
|
+
theme: ResolvedTheme;
|
|
19
|
+
} & ButtonProps, never>;
|
|
20
|
+
export declare const StyledSpinner: import("styled-components").StyledComponent<any, import("styled-components").DefaultTheme, object, string | number | symbol>;
|
|
21
|
+
export declare const LeftIcon: import("styled-components").StyledComponent<import("react").VoidFunctionComponent<import("../icon/icon").IconProps>, import("styled-components").DefaultTheme, {}, never>;
|
|
22
|
+
export declare const RightIcon: import("styled-components").StyledComponent<import("react").VoidFunctionComponent<import("../icon/icon").IconProps>, import("styled-components").DefaultTheme, {}, never>;
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { FocusEventHandler, MouseEventHandler, KeyboardEventHandler } from 'react';
|
|
2
|
+
import { IconName } from '../icon/icon';
|
|
3
|
+
import { Size } from './abstract/types';
|
|
4
|
+
export type Type = 'submit' | 'button' | 'reset';
|
|
5
|
+
export type ButtonType = 'primary' | 'secondary' | 'tertiary' | 'destructive-primary' | 'destructive-secondary' | 'destructive-tertiary';
|
|
6
|
+
export interface ButtonProps {
|
|
7
|
+
id?: string;
|
|
8
|
+
autofocus?: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Visual style
|
|
11
|
+
* @default primary
|
|
12
|
+
*/
|
|
13
|
+
buttonType: ButtonType;
|
|
14
|
+
className?: string;
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* @default true
|
|
18
|
+
*/
|
|
19
|
+
focusable?: boolean;
|
|
20
|
+
inverted?: boolean;
|
|
21
|
+
label?: string;
|
|
22
|
+
loading?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* @default Loading...
|
|
25
|
+
*/
|
|
26
|
+
loadingLabel?: string;
|
|
27
|
+
/**
|
|
28
|
+
* Size variant
|
|
29
|
+
* @default medium
|
|
30
|
+
*/
|
|
31
|
+
size?: Size;
|
|
32
|
+
title?: string;
|
|
33
|
+
type?: Type;
|
|
34
|
+
leftIconName?: IconName;
|
|
35
|
+
rightIconName?: IconName;
|
|
36
|
+
onClick?: MouseEventHandler<HTMLButtonElement>;
|
|
37
|
+
onFocus?: FocusEventHandler<HTMLButtonElement>;
|
|
38
|
+
onBlur?: FocusEventHandler<HTMLButtonElement>;
|
|
39
|
+
onKeyDown?: KeyboardEventHandler<HTMLButtonElement>;
|
|
40
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FunctionComponent, PropsWithChildren } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { Size, ButtonProps } from '../buttons';
|
|
3
3
|
import { IconName } from '../icon/icon';
|
|
4
4
|
export type ButtonPropsWithoutOnClick = Omit<ButtonProps, 'onClick'> & {
|
|
5
5
|
iconName?: IconName;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ReactElement, RefObject, VoidFunctionComponent } from 'react';
|
|
2
2
|
import { AvatarProps } from '../avatar/avatar';
|
|
3
|
-
import { ButtonType } from '../buttons/
|
|
3
|
+
import { ButtonType } from '../buttons/types';
|
|
4
4
|
import { GroupItemProps } from '../dropdown-menu/list-items';
|
|
5
5
|
import { IconProps } from '../icon/icon';
|
|
6
6
|
export declare const StyledDropdownMenu: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("../dropdown-menu/dropdown-menu").DropdownMenuProps & import("react").RefAttributes<HTMLDivElement>>, import("styled-components").DefaultTheme, {}, never>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FunctionComponent, PropsWithChildren, ReactNode } from 'react';
|
|
2
|
-
import { ButtonType } from '../buttons/
|
|
2
|
+
import { ButtonType } from '../buttons/types';
|
|
3
3
|
import { IconName } from '../icon/icon';
|
|
4
4
|
import { NavListOption } from '../nav-list/nav-list-option';
|
|
5
5
|
interface NavButtonProps {
|
|
@@ -9,4 +9,7 @@ export interface ExternalLinkProps {
|
|
|
9
9
|
target?: string;
|
|
10
10
|
onClick?(event: MouseEvent<Element, globalThis.MouseEvent>): void;
|
|
11
11
|
}
|
|
12
|
+
/**
|
|
13
|
+
* @deprecated This component is deprecated and will be removed in future releases. Use Link instead.
|
|
14
|
+
*/
|
|
12
15
|
export declare const ExternalLink: VoidFunctionComponent<ExternalLinkProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Link } from './link';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { LinkProps } from './types';
|
|
2
|
+
export declare const StyledLink: import("styled-components").StyledComponent<"a", import("styled-components").DefaultTheme, {
|
|
3
|
+
$disabled: LinkProps["disabled"];
|
|
4
|
+
$buttonProps?: LinkProps["button"];
|
|
5
|
+
$isMobile: boolean;
|
|
6
|
+
}, never>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { AnchorHTMLAttributes } from 'react';
|
|
2
|
+
import { NavLink, Link as ReactRouterLink, NavLinkProps } from 'react-router-dom';
|
|
3
|
+
import { ButtonProps } from '../buttons';
|
|
4
|
+
import { IconName } from '../icon/icon';
|
|
5
|
+
type BaseLinkProps = Pick<AnchorHTMLAttributes<HTMLAnchorElement>, 'id' | 'className' | 'onClick' | 'aria-disabled' | 'aria-label' | 'target' | 'children' | 'href' | 'rel' | 'onFocus' | 'onBlur' | 'onKeyDown'> & Pick<NavLinkProps, 'end'>;
|
|
6
|
+
type LinkButtonProps = Pick<ButtonProps, 'autofocus' | 'buttonType' | 'disabled' | 'focusable' | 'inverted' | 'size' | 'title' | 'type'>;
|
|
7
|
+
export interface LinkProps extends BaseLinkProps {
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
/** Button Link Variant */
|
|
10
|
+
button?: LinkButtonProps;
|
|
11
|
+
/** External Link Variant */
|
|
12
|
+
external?: boolean;
|
|
13
|
+
/** Icon Only Variant (with a tooltip)
|
|
14
|
+
* Make sure to provide an icon name and a label (for the tooltip)
|
|
15
|
+
*/
|
|
16
|
+
icon?: {
|
|
17
|
+
name: IconName;
|
|
18
|
+
label: string;
|
|
19
|
+
};
|
|
20
|
+
routerLink?: typeof NavLink | typeof ReactRouterLink;
|
|
21
|
+
}
|
|
22
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FunctionComponent, PropsWithChildren } from 'react';
|
|
2
|
-
import { ButtonType } from '../buttons/
|
|
2
|
+
import { ButtonType } from '../buttons/types';
|
|
3
3
|
import { IconName } from '../icon/icon';
|
|
4
4
|
import { MenuItem } from '../menu/menu';
|
|
5
5
|
export type MenuPlacement = 'right' | 'left';
|
|
@@ -11,5 +11,8 @@ interface LinkProps extends RouterLinkProps {
|
|
|
11
11
|
routerLink: typeof NavLink | typeof ReactRouterLink;
|
|
12
12
|
onClick?(event: MouseEvent<HTMLAnchorElement>): void;
|
|
13
13
|
}
|
|
14
|
+
/**
|
|
15
|
+
* @deprecated This component is deprecated and will be removed in future releases. Use Link instead.
|
|
16
|
+
*/
|
|
14
17
|
export declare const RouteLink: VoidFunctionComponent<LinkProps>;
|
|
15
18
|
export {};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
declare global {
|
|
2
2
|
var __DS_DEV__: boolean;
|
|
3
3
|
}
|
|
4
|
-
export { Button
|
|
4
|
+
export { Button } from './components/buttons/button';
|
|
5
|
+
export { ButtonProps } from './components/buttons/types';
|
|
5
6
|
export { IconButton } from './components/buttons/icon-button';
|
|
6
7
|
export { NavListOption } from './components/nav-list/nav-list-option';
|
|
7
8
|
export { MenuButton, MenuButtonProps } from './components/menu-button/menu-button';
|
|
@@ -72,6 +73,7 @@ export { useToast } from './hooks/use-toast';
|
|
|
72
73
|
export { Breadcrumb, BreadcrumbElement } from './components/breadcrumb/breadcrumb';
|
|
73
74
|
export * from './components/global-navigation/global-navigation';
|
|
74
75
|
export { RouteLink } from './components/route-link/route-link';
|
|
76
|
+
export { Link } from './components/link';
|
|
75
77
|
export * from './components/legend/legend';
|
|
76
78
|
export { Fieldset } from './components/fieldset';
|
|
77
79
|
export { ProgressIndicator } from './components/progress-indicator/progress-indicator';
|