@wonderflow/react-components 2.39.2 → 2.39.5-next.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/avatar/avatar.js +2 -3
- package/button/button.d.ts +4 -4
- package/button/button.js +4 -5
- package/button/button.module.css +6 -6
- package/card/card.d.ts +1 -1
- package/card/card.js +2 -2
- package/chip/chip.d.ts +2 -2
- package/chip/chip.js +2 -3
- package/circular-progress/circular-progress.js +2 -3
- package/clamp-text/clamp-text.d.ts +1 -1
- package/clamp-text/clamp-text.js +2 -3
- package/container/container.js +2 -3
- package/core/typography.css +1 -6
- package/core.css +5 -1
- package/disclosure/disclosure.js +3 -4
- package/dropdown/dropdown-item.d.ts +1 -1
- package/dropdown/dropdown-item.js +0 -2
- package/dropdown/dropdown-menu.d.ts +3 -3
- package/dropdown/dropdown-menu.js +11 -10
- package/dropdown/dropdown.js +2 -2
- package/elevator/elevator.d.ts +2 -2
- package/grid/grid-item.js +2 -2
- package/grid/grid.js +2 -3
- package/icon/icon.js +2 -2
- package/icon-button/icon-button.d.ts +1 -1
- package/icon-button/icon-button.js +1 -2
- package/index.d.ts +1 -1
- package/index.js +1 -1
- package/info-state/info-state.d.ts +2 -2
- package/info-state/info-state.js +2 -3
- package/input-group/input-group.js +3 -4
- package/input-group/input-group.module.css +0 -3
- package/linear-progress/linear-progress.d.ts +4 -4
- package/linear-progress/linear-progress.js +3 -4
- package/list/list.d.ts +1 -1
- package/list/list.js +2 -3
- package/masonry/masonry.d.ts +2 -2
- package/masonry/masonry.js +2 -2
- package/modal/modal-content.js +2 -3
- package/modal/modal.d.ts +2 -2
- package/modal/modal.js +6 -8
- package/package.json +19 -20
- package/pagination/pagination.d.ts +2 -4
- package/pagination/pagination.js +2 -2
- package/prose/prose.js +2 -3
- package/select/select.js +2 -3
- package/selection-controls/checkbox.js +2 -3
- package/selection-controls/radio.js +2 -3
- package/selection-controls/toggle.js +2 -3
- package/separator/index.d.ts +2 -1
- package/separator/index.js +1 -1
- package/separator/separator.d.ts +3 -3
- package/separator/separator.js +2 -4
- package/skeleton-block/skeleton-block.d.ts +1 -1
- package/skeleton-block/skeleton-block.js +2 -2
- package/slider/slider.js +2 -3
- package/snackbar/snackbar.js +2 -3
- package/spinner/spinner.d.ts +5 -2
- package/spinner/spinner.js +4 -4
- package/split-button/split-button.js +2 -3
- package/stack/stack.js +2 -3
- package/star-meter/star-meter.d.ts +1 -1
- package/star-meter/star-meter.js +2 -3
- package/tab/tab-item.js +2 -3
- package/tab/tab-list.js +1 -2
- package/tab/tab-panel.js +2 -2
- package/tab/tab.js +2 -2
- package/table/table.d.ts +3 -3
- package/table/table.js +8 -9
- package/table/table.module.css +0 -4
- package/text/text.d.ts +0 -1
- package/text/text.js +2 -3
- package/text/text.module.css +13 -20
- package/textfield/base-field/base-field.d.ts +1 -0
- package/textfield/base-field/base-field.js +2 -2
- package/textfield/base-field/index.d.ts +1 -1
- package/textfield/textfield.d.ts +4 -4
- package/textfield/textfield.js +3 -4
- package/themes/dark.css +1 -1
- package/themes/light.css +1 -1
- package/themes.css +3 -3
- package/title/title.d.ts +0 -1
- package/title/title.js +2 -3
- package/title/title.module.css +30 -33
- package/toggle-button/toggle-button.js +2 -3
- package/tooltip/tooltip.d.ts +2 -2
package/text/text.d.ts
CHANGED
package/text/text.js
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import React, { forwardRef } from 'react';
|
|
2
2
|
import { Text as TextClass } from './text.module.css';
|
|
3
3
|
import clsx from 'clsx';
|
|
4
|
-
export const Text = forwardRef(({ children, className, size, sentiment, dimmed, weight, maxWidth, textAlign = 'start', as: Wrapper = 'p',
|
|
4
|
+
export const Text = forwardRef(({ children, className, size, sentiment, dimmed, weight, maxWidth, textAlign = 'start', as: Wrapper = 'p', style, ...otherProps }, forwardedRef) => {
|
|
5
5
|
const dynamicStyle = {
|
|
6
6
|
'--maxW': maxWidth,
|
|
7
7
|
'--tAlign': textAlign
|
|
8
8
|
};
|
|
9
|
-
return (React.createElement(Wrapper, { ref: forwardedRef, "data-text-size": size, "data-text-weight": weight, "data-text-sentiment": sentiment, "data-text-dimmed": dimmed,
|
|
9
|
+
return (React.createElement(Wrapper, { ref: forwardedRef, "data-text-size": size, "data-text-weight": weight, "data-text-sentiment": sentiment, "data-text-dimmed": dimmed, className: clsx(TextClass, className), style: { ...dynamicStyle, ...style }, ...otherProps }, children));
|
|
10
10
|
});
|
|
11
|
-
Text.displayName = 'Text';
|
package/text/text.module.css
CHANGED
|
@@ -1,17 +1,14 @@
|
|
|
1
|
+
@import '../core/media.css';
|
|
2
|
+
|
|
1
3
|
.Text {
|
|
2
4
|
line-height: 1.5;
|
|
3
5
|
min-block-size: 0.01vh;
|
|
4
|
-
font-size: var(--
|
|
6
|
+
font-size: var(--fs-min);
|
|
5
7
|
max-inline-size: var(--maxW, initial);
|
|
6
8
|
text-align: var(--tAlign);
|
|
7
9
|
|
|
8
|
-
|
|
9
|
-
font-size:
|
|
10
|
-
clamp(
|
|
11
|
-
var(--fluid-type-min, env(--font-size-16)),
|
|
12
|
-
var(--fluid-type-factor, calc(0.6rem + 0.92vw)),
|
|
13
|
-
var(--fluid-type-max, 1rem)
|
|
14
|
-
);
|
|
10
|
+
@media (--from-small) {
|
|
11
|
+
font-size: var(--fs-max);
|
|
15
12
|
}
|
|
16
13
|
|
|
17
14
|
/* Colors */
|
|
@@ -52,29 +49,25 @@
|
|
|
52
49
|
}
|
|
53
50
|
|
|
54
51
|
&[data-text-size='16'] {
|
|
55
|
-
--
|
|
56
|
-
--
|
|
57
|
-
--fluid-type-max: env(--font-size-16);
|
|
52
|
+
--fs-min: env(--font-size-14);
|
|
53
|
+
--fs-max: env(--font-size-16);
|
|
58
54
|
|
|
59
55
|
line-height: 1.2;
|
|
60
56
|
}
|
|
61
57
|
|
|
62
58
|
&[data-text-size='18'] {
|
|
63
|
-
--
|
|
64
|
-
--
|
|
65
|
-
--fluid-type-max: env(--font-size-18);
|
|
59
|
+
--fs-min: env(--font-size-16);
|
|
60
|
+
--fs-max: env(--font-size-18);
|
|
66
61
|
}
|
|
67
62
|
|
|
68
63
|
&[data-text-size='22'] {
|
|
69
|
-
--
|
|
70
|
-
--
|
|
71
|
-
--fluid-type-max: env(--font-size-22);
|
|
64
|
+
--fs-min: env(--font-size-18);
|
|
65
|
+
--fs-max: env(--font-size-22);
|
|
72
66
|
}
|
|
73
67
|
|
|
74
68
|
&[data-text-size='28'] {
|
|
75
|
-
--
|
|
76
|
-
--
|
|
77
|
-
--fluid-type-max: env(--font-size-28);
|
|
69
|
+
--fs-min: env(--font-size-22);
|
|
70
|
+
--fs-max: env(--font-size-28);
|
|
78
71
|
}
|
|
79
72
|
|
|
80
73
|
/* Weights */
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { InputHTMLAttributes } from 'react';
|
|
2
2
|
import { Polymorphic } from '../../';
|
|
3
|
+
export declare type PrimitiveInputType = HTMLInputElement | HTMLTextAreaElement;
|
|
3
4
|
export declare type BaseFieldProps = InputHTMLAttributes<HTMLInputElement> & InputHTMLAttributes<HTMLTextAreaElement> & {
|
|
4
5
|
invalid?: boolean;
|
|
5
6
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { forwardRef } from 'react';
|
|
2
2
|
import { BaseField as BaseFieldClass } from './base-field.module.css';
|
|
3
3
|
import clsx from 'clsx';
|
|
4
|
-
export const BaseField = forwardRef(({ as: Wrapper = 'input', invalid, className, ...
|
|
5
|
-
return (React.createElement(Wrapper, { ref: forwardedRef, "data-basefield-invalid": invalid, className: clsx(BaseFieldClass, className), ...
|
|
4
|
+
export const BaseField = forwardRef(({ as: Wrapper = 'input', invalid, className, ...otherProps }, forwardedRef) => {
|
|
5
|
+
return (React.createElement(Wrapper, { ref: forwardedRef, "data-basefield-invalid": invalid, className: clsx(BaseFieldClass, className), ...otherProps }));
|
|
6
6
|
});
|
|
7
7
|
BaseField.displayName = 'BaseField';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { BaseField } from './base-field';
|
|
2
|
-
export type { BaseFieldProps } from './base-field';
|
|
2
|
+
export type { BaseFieldProps, PrimitiveInputType } from './base-field';
|
package/textfield/textfield.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { ChangeEvent } from 'react';
|
|
2
2
|
import { IconNames } from '../icons/types';
|
|
3
|
-
import { BaseFieldProps } from './base-field';
|
|
3
|
+
import { BaseFieldProps, PrimitiveInputType } from './base-field';
|
|
4
4
|
export declare type TextfieldProps = BaseFieldProps & {
|
|
5
5
|
icon?: IconNames;
|
|
6
6
|
label?: string;
|
|
@@ -10,7 +10,7 @@ export declare type TextfieldProps = BaseFieldProps & {
|
|
|
10
10
|
readOnly?: boolean;
|
|
11
11
|
iconPosition?: 'left' | 'right';
|
|
12
12
|
disabled?: boolean;
|
|
13
|
-
onChange?: (event: ChangeEvent<
|
|
13
|
+
onChange?: (event: ChangeEvent<PrimitiveInputType>) => void;
|
|
14
14
|
};
|
|
15
15
|
export declare const Textfield: React.ForwardRefExoticComponent<React.InputHTMLAttributes<HTMLInputElement> & React.InputHTMLAttributes<HTMLTextAreaElement> & {
|
|
16
16
|
invalid?: boolean | undefined;
|
|
@@ -23,5 +23,5 @@ export declare const Textfield: React.ForwardRefExoticComponent<React.InputHTMLA
|
|
|
23
23
|
readOnly?: boolean | undefined;
|
|
24
24
|
iconPosition?: "left" | "right" | undefined;
|
|
25
25
|
disabled?: boolean | undefined;
|
|
26
|
-
onChange?: ((event: ChangeEvent<
|
|
27
|
-
} & React.RefAttributes<
|
|
26
|
+
onChange?: ((event: ChangeEvent<PrimitiveInputType>) => void) | undefined;
|
|
27
|
+
} & React.RefAttributes<PrimitiveInputType>>;
|
package/textfield/textfield.js
CHANGED
|
@@ -4,7 +4,7 @@ import { BaseField } from './base-field';
|
|
|
4
4
|
import clsx from 'clsx';
|
|
5
5
|
import { useUIDSeed } from 'react-uid';
|
|
6
6
|
import { Textfield as TextfieldClass, FieldContainer, InputField, Icon as IconClass, IconButton as IconButtonClass } from './textfield.module.css';
|
|
7
|
-
export const Textfield = forwardRef(({ children, className, disabled = false, icon, label, textarea, readOnly, invalid, iconPosition = 'right', dimension = 'regular', type, onChange, ...
|
|
7
|
+
export const Textfield = forwardRef(({ children, className, disabled = false, icon, label, textarea, readOnly, invalid, iconPosition = 'right', dimension = 'regular', type, onChange, ...otherProps }, forwardedRef) => {
|
|
8
8
|
const [passwordVisible, setPasswordVisible] = useState(false);
|
|
9
9
|
const uid = useUIDSeed();
|
|
10
10
|
const isPassword = type === 'password';
|
|
@@ -31,9 +31,8 @@ export const Textfield = forwardRef(({ children, className, disabled = false, ic
|
|
|
31
31
|
label && React.createElement(Text, { as: "label", size: dimension === 'small' ? 14 : 16, htmlFor: uid('field') }, label),
|
|
32
32
|
React.createElement("div", { className: FieldContainer },
|
|
33
33
|
textarea
|
|
34
|
-
? (React.createElement(BaseField, { ref: forwardedRef, as: "textarea", id: uid('field'), ...commonProps, ...
|
|
35
|
-
: (React.createElement(BaseField, { className: InputField, id: uid('field'), ref: forwardedRef, type: passwordVisible ? 'text' : type, ...commonProps, ...
|
|
34
|
+
? (React.createElement(BaseField, { ref: forwardedRef, as: "textarea", id: uid('field'), ...commonProps, ...otherProps }))
|
|
35
|
+
: (React.createElement(BaseField, { className: InputField, id: uid('field'), ref: forwardedRef, type: passwordVisible ? 'text' : type, ...commonProps, ...otherProps })),
|
|
36
36
|
isPassword && (React.createElement(IconButton, { className: IconButtonClass, dimension: actionSizes[dimension], onClick: handlePasswordVisibility, kind: "flat", "aria-label": "Reveal password", icon: passwordVisible ? 'eye-slash' : 'eye' })),
|
|
37
37
|
!textarea && icon && type !== 'password' && (React.createElement(Icon, { className: IconClass, name: icon, dimension: iconSizes[dimension] })))));
|
|
38
38
|
});
|
|
39
|
-
Textfield.displayName = 'Textfield';
|
package/themes/dark.css
CHANGED
package/themes/light.css
CHANGED
package/themes.css
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
color: var(--global-foreground);
|
|
5
5
|
/**
|
|
6
6
|
* Do not edit directly
|
|
7
|
-
* Generated on
|
|
7
|
+
* Generated on Mon, 13 Dec 2021 15:49:05 GMT
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
color: var(--global-foreground);
|
|
52
52
|
/**
|
|
53
53
|
* Do not edit directly
|
|
54
|
-
* Generated on
|
|
54
|
+
* Generated on Mon, 13 Dec 2021 15:49:05 GMT
|
|
55
55
|
*/
|
|
56
56
|
|
|
57
57
|
|
|
@@ -99,7 +99,7 @@
|
|
|
99
99
|
color: var(--global-foreground);
|
|
100
100
|
/**
|
|
101
101
|
* Do not edit directly
|
|
102
|
-
* Generated on
|
|
102
|
+
* Generated on Mon, 13 Dec 2021 15:49:05 GMT
|
|
103
103
|
*/
|
|
104
104
|
|
|
105
105
|
|
package/title/title.d.ts
CHANGED
|
@@ -4,7 +4,6 @@ export declare type TitleProps = {
|
|
|
4
4
|
lineHeight?: 'none' | 'small' | 'large';
|
|
5
5
|
textAlign?: 'start' | 'center' | 'end';
|
|
6
6
|
maxWidth?: string;
|
|
7
|
-
fluid?: boolean;
|
|
8
7
|
};
|
|
9
8
|
declare type PolymorphicTitle = Polymorphic.ForwardRefComponent<'span', TitleProps>;
|
|
10
9
|
export declare const Title: PolymorphicTitle;
|
package/title/title.js
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import React, { forwardRef } from 'react';
|
|
2
2
|
import * as styles from './title.module.css';
|
|
3
3
|
import clsx from 'clsx';
|
|
4
|
-
export const Title = forwardRef(({ children, className, as: Wrapper = 'span', lineHeight = 'small', level = '1',
|
|
4
|
+
export const Title = forwardRef(({ children, className, as: Wrapper = 'span', lineHeight = 'small', level = '1', textAlign = 'start', maxWidth, style, ...otherProps }, forwardedRef) => {
|
|
5
5
|
const computedLevel = level.match(/\d/g) ? `H${level}` : level.charAt(0).toUpperCase() + level.slice(1);
|
|
6
6
|
const dynamicStyle = {
|
|
7
7
|
'--maxW': maxWidth,
|
|
8
8
|
'--tAlign': textAlign
|
|
9
9
|
};
|
|
10
|
-
return (React.createElement(Wrapper, { ref: forwardedRef, "data-title-line-height": lineHeight,
|
|
10
|
+
return (React.createElement(Wrapper, { ref: forwardedRef, "data-title-line-height": lineHeight, className: clsx(styles.Title, styles[computedLevel], className), style: { ...dynamicStyle, ...style }, ...otherProps }, children));
|
|
11
11
|
});
|
|
12
|
-
Title.displayName = 'Title';
|
package/title/title.module.css
CHANGED
|
@@ -1,84 +1,81 @@
|
|
|
1
|
+
@import '../core/media.css';
|
|
2
|
+
|
|
1
3
|
.Title {
|
|
2
4
|
&:is(.H1, .H2, .H3, .H4, .H5, .H6, .Display) {
|
|
5
|
+
--lh: 0.3;
|
|
6
|
+
|
|
3
7
|
display: block;
|
|
4
8
|
line-height: env(--font-lh-small);
|
|
5
9
|
color: var(--heading-foreground);
|
|
6
10
|
min-block-size: 0.01vh;
|
|
7
|
-
font-size: var(--
|
|
11
|
+
font-size: var(--fs-min);
|
|
8
12
|
max-inline-size: var(--maxW, initial);
|
|
9
13
|
text-align: var(--tAlign);
|
|
10
14
|
overflow-wrap: break-word;
|
|
11
15
|
|
|
12
|
-
|
|
13
|
-
font-size:
|
|
14
|
-
clamp(
|
|
15
|
-
var(--fluid-type-min, env(--font-size-16)),
|
|
16
|
-
var(--fluid-type-factor, calc(0.6rem + 0.92vw)),
|
|
17
|
-
var(--fluid-type-max, 1rem)
|
|
18
|
-
);
|
|
16
|
+
@media (--from-small) {
|
|
17
|
+
font-size: var(--fs-max);
|
|
19
18
|
}
|
|
20
19
|
|
|
21
|
-
&[data-title-line-height='none'] {
|
|
22
|
-
line-height: 0.3;
|
|
23
|
-
}
|
|
24
20
|
|
|
25
21
|
&[data-title-line-height='small'] {
|
|
26
|
-
|
|
22
|
+
--lh: 1.33;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
&::before {
|
|
26
|
+
content: '';
|
|
27
|
+
display: block;
|
|
28
|
+
height: 0;
|
|
29
|
+
width: 0;
|
|
30
|
+
margin-top: calc((1 - var(--lh)) * 1em);
|
|
27
31
|
}
|
|
28
32
|
}
|
|
29
33
|
|
|
30
34
|
&:is(.H6) {
|
|
31
|
-
--
|
|
32
|
-
--
|
|
33
|
-
--fluid-type-max: env(--font-size-18);
|
|
35
|
+
--fs-min: env(--font-size-14);
|
|
36
|
+
--fs-max: env(--font-size-18);
|
|
34
37
|
|
|
35
38
|
font-weight: 700;
|
|
36
39
|
}
|
|
37
40
|
|
|
38
41
|
&:is(.H5) {
|
|
39
|
-
--
|
|
40
|
-
--
|
|
41
|
-
--fluid-type-max: 1.33rem;
|
|
42
|
+
--fs-min: 1rem;
|
|
43
|
+
--fs-max: 1.33rem;
|
|
42
44
|
|
|
43
45
|
font-weight: 700;
|
|
44
46
|
}
|
|
45
47
|
|
|
46
48
|
&:is(.H4) {
|
|
47
|
-
--
|
|
48
|
-
--
|
|
49
|
-
--fluid-type-max: 1.77rem;
|
|
49
|
+
--fs-min: 1.33rem;
|
|
50
|
+
--fs-max: 1.77rem;
|
|
50
51
|
|
|
51
52
|
font-weight: 700;
|
|
52
53
|
}
|
|
53
54
|
|
|
54
55
|
&:is(.H3) {
|
|
55
|
-
--
|
|
56
|
-
--
|
|
57
|
-
--fluid-type-max: 2.37rem;
|
|
56
|
+
--fs-min: 1.77rem;
|
|
57
|
+
--fs-max: 2.37rem;
|
|
58
58
|
|
|
59
59
|
font-weight: 800;
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
&:is(.H2) {
|
|
63
|
-
--
|
|
64
|
-
--
|
|
65
|
-
--fluid-type-max: 3.16rem;
|
|
63
|
+
--fs-min: 2.37rem;
|
|
64
|
+
--fs-max: 3.16rem;
|
|
66
65
|
|
|
67
66
|
font-weight: 800;
|
|
68
67
|
}
|
|
69
68
|
|
|
70
69
|
&:is(.H1) {
|
|
71
|
-
--
|
|
72
|
-
--
|
|
73
|
-
--fluid-type-max: 4.2rem;
|
|
70
|
+
--fs-min: 3.16rem;
|
|
71
|
+
--fs-max: 4.2rem;
|
|
74
72
|
|
|
75
73
|
font-weight: 800;
|
|
76
74
|
}
|
|
77
75
|
|
|
78
76
|
&.Display {
|
|
79
|
-
--
|
|
80
|
-
--
|
|
81
|
-
--fluid-type-max: 5.6rem;
|
|
77
|
+
--fs-min: 4.2rem;
|
|
78
|
+
--fs-max: 5.6rem;
|
|
82
79
|
|
|
83
80
|
font-weight: 800;
|
|
84
81
|
}
|
|
@@ -21,7 +21,7 @@ const scaleAnimation = {
|
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
23
|
};
|
|
24
|
-
export const ToggleButton = forwardRef(({ className, restingIcon, pressedIcon, dimension, kind, disabled, iconColor, pressed = false, onClick, ...
|
|
24
|
+
export const ToggleButton = forwardRef(({ className, restingIcon, pressedIcon, dimension, kind, disabled, iconColor, pressed = false, onClick, ...otherProps }, forwardedRef) => {
|
|
25
25
|
const [isPressed, setIsPressed] = useState(pressed);
|
|
26
26
|
const [firstRender, setFirstRender] = useState(true);
|
|
27
27
|
useEffect(() => {
|
|
@@ -39,8 +39,7 @@ export const ToggleButton = forwardRef(({ className, restingIcon, pressedIcon, d
|
|
|
39
39
|
};
|
|
40
40
|
return (React.createElement(Icon, { name: icon, dimension: iconSize[dimension] }));
|
|
41
41
|
}, []);
|
|
42
|
-
return (React.createElement(IconButton, { as: "button", ref: forwardedRef, dimension: dimension, "aria-pressed": isPressed, kind: kind, disabled: disabled, onClick: handleClick, className: clsx(ToggleButtonClass, className), ...
|
|
42
|
+
return (React.createElement(IconButton, { as: "button", ref: forwardedRef, dimension: dimension, "aria-pressed": isPressed, kind: kind, disabled: disabled, onClick: handleClick, className: clsx(ToggleButtonClass, className), ...otherProps }, isPressed && pressedIcon
|
|
43
43
|
? (React.createElement(motion.span, { key: "pressedIcon", variants: scaleAnimation, initial: firstRender && isPressed ? false : 'scaleOut', animate: "scaleIn" }, renderIcon(pressedIcon, dimension)))
|
|
44
44
|
: restingIcon && (React.createElement(motion.span, { key: "restingIcon", variants: scaleAnimation, initial: firstRender && !isPressed ? false : 'scaleOut', animate: "scaleIn" }, renderIcon(restingIcon, dimension)))));
|
|
45
45
|
});
|
|
46
|
-
ToggleButton.displayName = 'ToggleButton';
|
package/tooltip/tooltip.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { FC, ReactNode } from 'react';
|
|
2
2
|
import { AutoPlacement, BasePlacement, VariationPlacement } from '@popperjs/core/lib';
|
|
3
3
|
export declare type TooltipProps = PropsWithClass & {
|
|
4
4
|
children: ReactNode;
|
|
@@ -9,4 +9,4 @@ export declare type TooltipProps = PropsWithClass & {
|
|
|
9
9
|
maxWidth?: string;
|
|
10
10
|
fill?: boolean;
|
|
11
11
|
};
|
|
12
|
-
export declare const Tooltip:
|
|
12
|
+
export declare const Tooltip: FC<TooltipProps>;
|