@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.
Files changed (80) hide show
  1. package/avatar/avatar.js +2 -3
  2. package/button/button.d.ts +4 -4
  3. package/button/button.js +4 -5
  4. package/button/button.module.css +6 -6
  5. package/card/card.d.ts +1 -1
  6. package/card/card.js +2 -2
  7. package/chip/chip.d.ts +2 -2
  8. package/chip/chip.js +2 -3
  9. package/circular-progress/circular-progress.js +2 -3
  10. package/clamp-text/clamp-text.d.ts +1 -1
  11. package/clamp-text/clamp-text.js +2 -3
  12. package/container/container.js +2 -3
  13. package/disclosure/disclosure.js +2 -3
  14. package/dropdown/dropdown-item.d.ts +1 -1
  15. package/dropdown/dropdown-item.js +3 -5
  16. package/dropdown/dropdown-menu.d.ts +5 -5
  17. package/dropdown/dropdown-menu.js +3 -5
  18. package/dropdown/dropdown.js +0 -1
  19. package/elevator/elevator.d.ts +2 -2
  20. package/grid/grid-item.js +2 -2
  21. package/grid/grid.js +2 -3
  22. package/icon/icon.js +2 -2
  23. package/icon-button/icon-button.d.ts +1 -1
  24. package/icon-button/icon-button.js +1 -2
  25. package/index.d.ts +1 -1
  26. package/index.js +1 -1
  27. package/info-state/info-state.d.ts +8 -1
  28. package/info-state/info-state.js +2 -3
  29. package/input-group/input-group.js +3 -4
  30. package/input-group/input-group.module.css +0 -3
  31. package/linear-progress/linear-progress.d.ts +4 -4
  32. package/linear-progress/linear-progress.js +3 -4
  33. package/list/list.d.ts +1 -1
  34. package/list/list.js +2 -3
  35. package/masonry/masonry.d.ts +2 -2
  36. package/masonry/masonry.js +2 -2
  37. package/modal/modal-content.js +2 -3
  38. package/modal/modal.d.ts +2 -2
  39. package/modal/modal.js +6 -8
  40. package/package.json +4 -4
  41. package/pagination/pagination.d.ts +2 -4
  42. package/pagination/pagination.js +2 -2
  43. package/prose/prose.js +2 -3
  44. package/select/select.js +2 -3
  45. package/selection-controls/checkbox.js +2 -3
  46. package/selection-controls/radio.js +2 -3
  47. package/selection-controls/toggle.js +2 -3
  48. package/separator/index.d.ts +2 -1
  49. package/separator/index.js +1 -1
  50. package/separator/separator.d.ts +3 -3
  51. package/separator/separator.js +2 -4
  52. package/skeleton-block/skeleton-block.d.ts +1 -1
  53. package/skeleton-block/skeleton-block.js +2 -2
  54. package/slider/slider.js +2 -3
  55. package/snackbar/snackbar.js +2 -3
  56. package/spinner/spinner.d.ts +5 -2
  57. package/spinner/spinner.js +4 -4
  58. package/split-button/split-button.js +2 -3
  59. package/stack/stack.js +2 -3
  60. package/star-meter/star-meter.d.ts +1 -1
  61. package/star-meter/star-meter.js +2 -3
  62. package/tab/tab-item.js +2 -3
  63. package/tab/tab-list.js +1 -2
  64. package/tab/tab-panel.js +2 -2
  65. package/tab/tab.js +2 -2
  66. package/table/table.d.ts +3 -3
  67. package/table/table.js +8 -9
  68. package/table/table.module.css +0 -4
  69. package/text/text.js +2 -3
  70. package/textfield/base-field/base-field.d.ts +1 -0
  71. package/textfield/base-field/base-field.js +2 -2
  72. package/textfield/base-field/index.d.ts +1 -1
  73. package/textfield/textfield.d.ts +4 -4
  74. package/textfield/textfield.js +3 -4
  75. package/themes/dark.css +1 -1
  76. package/themes/light.css +1 -1
  77. package/themes.css +3 -3
  78. package/title/title.js +2 -3
  79. package/toggle-button/toggle-button.js +2 -3
  80. package/tooltip/tooltip.d.ts +2 -2
@@ -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, ...props }, forwardedRef) => {
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, ...props }))
35
- : (React.createElement(BaseField, { className: InputField, id: uid('field'), ref: forwardedRef, type: passwordVisible ? 'text' : type, ...commonProps, ...props })),
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
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Fri, 10 Dec 2021 15:14:10 GMT
3
+ * Generated on Mon, 13 Dec 2021 12:59:36 GMT
4
4
  */
5
5
 
6
6
  :root {
package/themes/light.css CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Fri, 10 Dec 2021 15:14:10 GMT
3
+ * Generated on Mon, 13 Dec 2021 12:59:36 GMT
4
4
  */
5
5
 
6
6
  :root {
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 Fri, 10 Dec 2021 15:14:10 GMT
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 Fri, 10 Dec 2021 15:14:10 GMT
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 Fri, 10 Dec 2021 15:14:10 GMT
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, ...props }, forwardedRef) => {
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 }, ...props }, children));
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, ...props }, forwardedRef) => {
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), ...props }, isPressed && pressedIcon
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';
@@ -1,4 +1,4 @@
1
- import React, { ReactNode } from 'react';
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: React.FC<TooltipProps>;
12
+ export declare const Tooltip: FC<TooltipProps>;