@devopness/ui-react 2.153.1 → 2.153.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/dist/src/components/Buttons/Button/Button.d.ts +24 -30
- package/dist/src/components/Buttons/Button/Button.styled.d.ts +4 -22
- package/dist/ui-react.cjs +109 -116
- package/dist/ui-react.js +1263 -1263
- package/package.json +3 -3
|
@@ -2,20 +2,10 @@ import { ButtonHTMLAttributes } from 'react';
|
|
|
2
2
|
import { getColor } from '../../../colors';
|
|
3
3
|
import { Icon } from '../../../icons';
|
|
4
4
|
type ButtonProps = ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
5
|
-
/**
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
typeSize?: 'default' | 'medium' | 'auto';
|
|
10
|
-
/** Icon name */
|
|
11
|
-
icon?: Icon;
|
|
12
|
-
/** Enable button loading animation */
|
|
13
|
-
loading?: boolean;
|
|
14
|
-
/**
|
|
15
|
-
* With the property "revertOrientation" it is possible to change the positioning of
|
|
16
|
-
* the elements inside the button as "icon" or "loading"
|
|
17
|
-
*/
|
|
18
|
-
revertOrientation?: boolean;
|
|
5
|
+
/** Customize background color */
|
|
6
|
+
backgroundColor?: string;
|
|
7
|
+
/** Customize border color */
|
|
8
|
+
borderColor?: string;
|
|
19
9
|
/** Predefined style variations for the button */
|
|
20
10
|
buttonType?: 'borderless' | 'outlinedSecondary' | 'outlinedAuxiliary' | 'Default';
|
|
21
11
|
/** `Warning`: This property overrides the style defined by the `buttonType` property!
|
|
@@ -23,42 +13,46 @@ type ButtonProps = ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
|
23
13
|
* Customize elements color
|
|
24
14
|
*/
|
|
25
15
|
color?: string;
|
|
26
|
-
/**
|
|
27
|
-
|
|
28
|
-
|
|
16
|
+
/** Icon name */
|
|
17
|
+
icon?: Icon;
|
|
18
|
+
/**
|
|
19
|
+
* By default the icon color is primary, use this prop to customize "iconColor"
|
|
29
20
|
*/
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
*
|
|
33
|
-
* Customize border color
|
|
21
|
+
iconColor?: ReturnType<typeof getColor>;
|
|
22
|
+
/**
|
|
23
|
+
* By default the icon component is 16px high, use this prop to customize "iconSize"
|
|
34
24
|
*/
|
|
35
|
-
|
|
25
|
+
iconSize?: number;
|
|
26
|
+
/** Enable button loading animation */
|
|
27
|
+
loading?: boolean;
|
|
36
28
|
/**
|
|
37
29
|
* The button component has a 15px margin on its sides, to remove activate the "noMargin" property
|
|
38
30
|
*/
|
|
39
|
-
|
|
31
|
+
noMargin?: boolean;
|
|
40
32
|
/**
|
|
41
33
|
* The button component has a 10px margin on its sides, to remove activate the "noIconMargin" property
|
|
42
34
|
*/
|
|
43
|
-
|
|
35
|
+
noIconMargin?: boolean;
|
|
44
36
|
/**
|
|
45
37
|
* The button component has a 15px padding on its sides, to remove activate the "noPadding" property
|
|
46
38
|
*/
|
|
47
|
-
|
|
39
|
+
noPadding?: boolean;
|
|
48
40
|
/**
|
|
49
41
|
* It should be true if the button is wrapped in a tooltip
|
|
50
42
|
*/
|
|
51
43
|
noPointerEvents?: boolean;
|
|
52
44
|
/**
|
|
53
|
-
*
|
|
45
|
+
* With the property "revertOrientation" it is possible to change the positioning of
|
|
46
|
+
* the elements inside the button as "icon" or "loading"
|
|
54
47
|
*/
|
|
55
|
-
|
|
48
|
+
revertOrientation?: boolean;
|
|
56
49
|
/**
|
|
57
|
-
* By default the
|
|
50
|
+
* By default the button component is 34px high, the "typeSize" property contains
|
|
51
|
+
* the "medium" variation that changes to 27px
|
|
58
52
|
*/
|
|
59
|
-
|
|
53
|
+
typeSize?: 'default' | 'medium' | 'auto';
|
|
60
54
|
};
|
|
61
55
|
/** Primary UI component for user interaction */
|
|
62
|
-
declare const Button: ({
|
|
56
|
+
declare const Button: ({ backgroundColor, borderColor, buttonType, children, color, disabled, icon, iconColor, iconSize, loading: isLoading, noIconMargin, noMargin, noPadding, noPointerEvents, revertOrientation, tabIndex, type, typeSize, ...props }: ButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
63
57
|
export type { ButtonProps };
|
|
64
58
|
export { Button };
|
|
@@ -1,26 +1,8 @@
|
|
|
1
1
|
import { ButtonProps } from '.';
|
|
2
|
-
type CustomButton = {
|
|
3
|
-
backgroundColor?: string;
|
|
4
|
-
color?: string;
|
|
5
|
-
borderColor?: string;
|
|
6
|
-
};
|
|
7
2
|
type StyledProps = {
|
|
8
|
-
|
|
9
|
-
$noPadding?: boolean;
|
|
10
|
-
$size: NonNullable<ButtonProps['typeSize']>;
|
|
11
|
-
$variant?: string;
|
|
12
|
-
$custom?: CustomButton;
|
|
13
|
-
icon?: boolean;
|
|
14
|
-
alignEnd?: boolean;
|
|
15
|
-
reversed: boolean;
|
|
16
|
-
noPointerEvents?: boolean;
|
|
3
|
+
[Key in keyof Pick<ButtonProps, 'backgroundColor' | 'borderColor' | 'buttonType' | 'color' | 'iconSize' | 'noIconMargin' | 'noMargin' | 'noPadding' | 'noPointerEvents' | 'revertOrientation' | 'typeSize'> as `$${Key}`]: ButtonProps[Key];
|
|
17
4
|
};
|
|
18
|
-
declare const ContentIcon: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, Pick<
|
|
19
|
-
reversed: ButtonProps["revertOrientation"];
|
|
20
|
-
size: Required<ButtonProps["iconSize"]>;
|
|
21
|
-
}>> & string;
|
|
5
|
+
declare const ContentIcon: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, Pick<StyledProps, "$iconSize">>> & string;
|
|
22
6
|
declare const Label: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>> & string;
|
|
23
|
-
declare const
|
|
24
|
-
|
|
25
|
-
declare const SmallWrapper: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, StyledProps>> & string;
|
|
26
|
-
export { ContentIcon, Label, WrapperButtons, BaseButton, SmallWrapper };
|
|
7
|
+
declare const BaseButton: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, Pick<StyledProps, "$buttonType" | "$backgroundColor" | "$borderColor" | "$color" | "$noIconMargin" | "$noMargin" | "$noPadding" | "$noPointerEvents" | "$revertOrientation" | "$typeSize">>> & string;
|
|
8
|
+
export { BaseButton, ContentIcon, Label };
|