venice-ui 3.0.21 → 3.0.23

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.
@@ -19,7 +19,9 @@ const Card = ({ theme, themeVariant = 'default', title, actionLabel, children, c
19
19
  const headerConfig = componentsConfig.card;
20
20
  return (react_1.default.createElement(styled_components_1.ThemeProvider, { theme: resolvedTheme },
21
21
  react_1.default.createElement(Card_styles_1.CardRoot, { componentHeight: componentHeight, shadow: shadow, theme: resolvedTheme, config: headerConfig },
22
- (title || actionLabel) && (react_1.default.createElement(Header_1.Header, { title: title, actionLabel: actionLabel, handleClick: handleClick, handleBack: handleBack, options: options, theme: theme, bottomDivader: headerDivader, actionDisabled: actionDisabled, themeVariant: themeVariant, header: customHeader })),
22
+ customHeader
23
+ ? customHeader
24
+ : (title || actionLabel) && (react_1.default.createElement(Header_1.Header, { title: title, actionLabel: actionLabel, handleClick: handleClick, handleBack: handleBack, options: options, theme: theme, bottomDivader: headerDivader, actionDisabled: actionDisabled, themeVariant: themeVariant, header: customHeader })),
23
25
  react_1.default.createElement(Card_styles_1.CardContent, { theme: resolvedTheme, config: headerConfig, noVerticalPadding: noVerticalPadding }, children))));
24
26
  };
25
27
  exports.Card = Card;
@@ -48,6 +48,9 @@ const Input = ({ theme, themeVariant = 'default', label, labelPosition = 'top',
48
48
  const { componentsConfig } = resolvedThemeData;
49
49
  const inputConfig = componentsConfig.input;
50
50
  const [inputValue, setInputValue] = (0, react_1.useState)(value || '');
51
+ (0, react_1.useEffect)(() => {
52
+ setInputValue(value || '');
53
+ }, [value]);
51
54
  const [inputType] = (0, react_1.useState)(type);
52
55
  const [showPassword, setShowPassword] = (0, react_1.useState)(false);
53
56
  const onChange = (e) => {
@@ -13,6 +13,8 @@ export const Card = ({ theme, themeVariant = 'default', title, actionLabel, chil
13
13
  const headerConfig = componentsConfig.card;
14
14
  return (React.createElement(ThemeProvider, { theme: resolvedTheme },
15
15
  React.createElement(CardRoot, { componentHeight: componentHeight, shadow: shadow, theme: resolvedTheme, config: headerConfig },
16
- (title || actionLabel) && (React.createElement(Header, { title: title, actionLabel: actionLabel, handleClick: handleClick, handleBack: handleBack, options: options, theme: theme, bottomDivader: headerDivader, actionDisabled: actionDisabled, themeVariant: themeVariant, header: customHeader })),
16
+ customHeader
17
+ ? customHeader
18
+ : (title || actionLabel) && (React.createElement(Header, { title: title, actionLabel: actionLabel, handleClick: handleClick, handleBack: handleBack, options: options, theme: theme, bottomDivader: headerDivader, actionDisabled: actionDisabled, themeVariant: themeVariant, header: customHeader })),
17
19
  React.createElement(CardContent, { theme: resolvedTheme, config: headerConfig, noVerticalPadding: noVerticalPadding }, children))));
18
20
  };
@@ -1,4 +1,4 @@
1
- import React, { useState } from 'react';
1
+ import React, { useEffect, useState } from 'react';
2
2
  import { resolveThemeWithComponentsConfig } from '../../config';
3
3
  import { InputElement, PrefixWrapper } from './Input.styles';
4
4
  import { Icon } from '../Icon';
@@ -12,6 +12,9 @@ export const Input = ({ theme, themeVariant = 'default', label, labelPosition =
12
12
  const { componentsConfig } = resolvedThemeData;
13
13
  const inputConfig = componentsConfig.input;
14
14
  const [inputValue, setInputValue] = useState(value || '');
15
+ useEffect(() => {
16
+ setInputValue(value || '');
17
+ }, [value]);
15
18
  const [inputType] = useState(type);
16
19
  const [showPassword, setShowPassword] = useState(false);
17
20
  const onChange = (e) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "venice-ui",
3
- "version": "3.0.21",
3
+ "version": "3.0.23",
4
4
  "description": "Component library",
5
5
  "main": "index.js",
6
6
  "module": "./dist/esm/index.js",