@wonderflow/react-components 10.13.0 → 10.15.0
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.
|
@@ -18,4 +18,4 @@ import clsx from 'clsx';
|
|
|
18
18
|
import { forwardRef } from 'react';
|
|
19
19
|
import { Button } from '../..';
|
|
20
20
|
import * as styles from './icon-button.module.css';
|
|
21
|
-
export const IconButton = forwardRef(({ className, icon, dimension, kind, disabled, busy, squared, ...otherProps }, forwardedRef) => (_jsx(Button, { ref: forwardedRef, icon: icon, dimension: dimension, kind: kind, disabled: disabled, busy: busy, "data-icon-button-squared": squared, className: clsx(styles.IconButton, className), ...otherProps })));
|
|
21
|
+
export const IconButton = forwardRef(({ className, icon, dimension, kind, disabled, busy, squared = false, ...otherProps }, forwardedRef) => (_jsx(Button, { ref: forwardedRef, icon: icon, dimension: dimension, kind: kind, disabled: disabled, busy: busy, "data-icon-button-squared": squared, className: clsx(styles.IconButton, className), ...otherProps })));
|
|
@@ -15,11 +15,6 @@ export declare type ToggleButtonProps<T = Record<string, unknown>> = OmitIcon &
|
|
|
15
15
|
* the icon will be shown instead of the resting icon.
|
|
16
16
|
*/
|
|
17
17
|
pressed?: boolean;
|
|
18
|
-
/**
|
|
19
|
-
* Enable a squared shape for the button. Useful when the element is placed
|
|
20
|
-
* near another standard button.
|
|
21
|
-
*/
|
|
22
|
-
squared?: boolean;
|
|
23
18
|
}> & T;
|
|
24
19
|
declare type PolymorphicToggleButton = Polymorphic.ForwardRefComponent<Polymorphic.IntrinsicElement<typeof IconButton>, ToggleButtonProps<Polymorphic.OwnProps<typeof IconButton>>>;
|
|
25
20
|
export declare const ToggleButton: PolymorphicToggleButton;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toggle-button.d.ts","sourceRoot":"","sources":["../../../src/components/toggle-button/toggle-button.tsx"],"names":[],"mappings":"AAqBA,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAEnC,OA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C,mBAAmB,CAC9D,WAAW,CAAC,gBAAgB,CAAC,OAAO,UAAU,CAAC,EAC/C,iBAAiB,CAAC,WAAW,CAAC,QAAQ,CAAC,OAAO,UAAU,CAAC,CAAC,CACzD,CAAC;AAqBF,eAAO,MAAM,YAAY,yBAgFI,CAAC"}
|
|
@@ -37,7 +37,7 @@ const scaleAnimation = {
|
|
|
37
37
|
},
|
|
38
38
|
},
|
|
39
39
|
};
|
|
40
|
-
export const ToggleButton = forwardRef(({ className, restingIcon, pressedIcon, dimension, kind, disabled, iconColor, pressed = false, squared, onClick, ...otherProps }, forwardedRef) => {
|
|
40
|
+
export const ToggleButton = forwardRef(({ className, restingIcon, pressedIcon, dimension, kind, disabled, iconColor, pressed = false, squared = false, onClick, ...otherProps }, forwardedRef) => {
|
|
41
41
|
const [isPressed, setIsPressed] = useState(pressed);
|
|
42
42
|
const [isFirstRender, setIsFirstRender] = useState(true);
|
|
43
43
|
useEffect(() => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wonderflow/react-components",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.15.0",
|
|
4
4
|
"description": "UI components from Wonderflow's Wanda design system",
|
|
5
5
|
"author": "Wonderflow",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -73,8 +73,8 @@
|
|
|
73
73
|
"@types/react": "17.0.43",
|
|
74
74
|
"@types/react-dom": "17.0.14",
|
|
75
75
|
"@types/react-table": "7.7.12",
|
|
76
|
-
"@wonderflow/config": "10.
|
|
77
|
-
"@wonderflow/tokens": "10.
|
|
76
|
+
"@wonderflow/config": "10.15.0",
|
|
77
|
+
"@wonderflow/tokens": "10.15.0",
|
|
78
78
|
"babel-loader": "8.2.5",
|
|
79
79
|
"cpy-cli": "3.1.1",
|
|
80
80
|
"postcss": "8.4.17",
|