@wonderflow/react-components 2.39.4 → 2.39.5-next.1
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/disclosure/disclosure.js +2 -3
- package/dropdown/dropdown-item.d.ts +1 -1
- package/dropdown/dropdown-item.js +3 -5
- package/dropdown/dropdown-menu.d.ts +5 -5
- package/dropdown/dropdown-menu.js +3 -5
- package/dropdown/dropdown.js +0 -1
- 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 +8 -1
- 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 +4 -4
- 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.js +2 -3
- 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.js +2 -3
- package/toggle-button/toggle-button.js +2 -3
- package/tooltip/tooltip.d.ts +2 -2
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 12:59:36 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 12:59:36 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 12:59:36 GMT
|
|
103
103
|
*/
|
|
104
104
|
|
|
105
105
|
|
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', fluid = true, textAlign = 'start', maxWidth, style, ...
|
|
4
|
+
export const Title = forwardRef(({ children, className, as: Wrapper = 'span', lineHeight = 'small', level = '1', fluid = true, 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, "data-title-is-fluid": fluid, className: clsx(styles.Title, styles[computedLevel], className), style: { ...dynamicStyle, ...style }, ...
|
|
10
|
+
return (React.createElement(Wrapper, { ref: forwardedRef, "data-title-line-height": lineHeight, "data-title-is-fluid": fluid, className: clsx(styles.Title, styles[computedLevel], className), style: { ...dynamicStyle, ...style }, ...otherProps }, children));
|
|
11
11
|
});
|
|
12
|
-
Title.displayName = 'Title';
|
|
@@ -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>;
|