venice-ui 2.0.3 → 2.0.5

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.
@@ -11,6 +11,6 @@ const Theme_1 = require("../../Theme");
11
11
  const Card = ({ children, title, actionLabel, theme = Theme_1.mainTheme, iconColor = theme.textColor, iconHoverColor = theme.action, handleClick, handleBack, height, options, shadow = true, headerDivader = false }) => {
12
12
  return (react_1.default.createElement(Card_styles_1.CardElement, { height: height, shadow: shadow },
13
13
  (title || actionLabel) && (react_1.default.createElement(ElementHeader_1.ElementHeader, { title: title, actionLabel: actionLabel, handleClick: handleClick, handleBack: handleBack, options: options, theme: theme, iconColor: iconColor, iconHoverColor: iconHoverColor, bottomDivader: headerDivader })),
14
- react_1.default.createElement(Card_styles_1.CardContent, null, children)));
14
+ react_1.default.createElement(Card_styles_1.CardContent, { soloMode: !title && !actionLabel }, children)));
15
15
  };
16
16
  exports.Card = Card;
@@ -22,5 +22,7 @@ exports.CardContent = styled_components_1.default.div `
22
22
  padding: ${Theme_1.Theme.padding.l};
23
23
  width: 100%;
24
24
  flex-direction: row;
25
-
25
+ ${(p) => !p.soloMode &&
26
+ `
27
+ padding-top:0px;`}
26
28
  `;
@@ -6,8 +6,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.ElementHeaderWrapper = void 0;
7
7
  const styled_components_1 = __importDefault(require("styled-components"));
8
8
  const Aligment_1 = require("../Aligment");
9
+ const Theme_1 = require("../../Theme/Theme");
9
10
  exports.ElementHeaderWrapper = (0, styled_components_1.default)(Aligment_1.Aligment) `
10
11
  width: 100%;
12
+ border-top-left-radius:${Theme_1.Theme.borderRadius.m};
13
+ border-top-right-radius:${Theme_1.Theme.borderRadius.m};
11
14
  ${(p) => p.bottomDivader &&
12
15
  `
13
16
  border-bottom: 2px solid rgba(0, 0, 0, 0.14);
@@ -60,7 +60,9 @@ const Input = ({ label, labelPosition = 'top', value, type = 'text', name, disab
60
60
  }
61
61
  };
62
62
  const onKeyDown = (e) => {
63
+ console.log(e.key, handleSubmit);
63
64
  if (handleSubmit && e.key === 'Enter') {
65
+ console.log('sss');
64
66
  handleSubmit();
65
67
  }
66
68
  };
@@ -5,5 +5,5 @@ import { mainTheme } from '../../Theme';
5
5
  export const Card = ({ children, title, actionLabel, theme = mainTheme, iconColor = theme.textColor, iconHoverColor = theme.action, handleClick, handleBack, height, options, shadow = true, headerDivader = false }) => {
6
6
  return (React.createElement(CardElement, { height: height, shadow: shadow },
7
7
  (title || actionLabel) && (React.createElement(ElementHeader, { title: title, actionLabel: actionLabel, handleClick: handleClick, handleBack: handleBack, options: options, theme: theme, iconColor: iconColor, iconHoverColor: iconHoverColor, bottomDivader: headerDivader })),
8
- React.createElement(CardContent, null, children)));
8
+ React.createElement(CardContent, { soloMode: !title && !actionLabel }, children)));
9
9
  };
@@ -16,5 +16,7 @@ export const CardContent = styled.div `
16
16
  padding: ${Theme.padding.l};
17
17
  width: 100%;
18
18
  flex-direction: row;
19
-
19
+ ${(p) => !p.soloMode &&
20
+ `
21
+ padding-top:0px;`}
20
22
  `;
@@ -1,7 +1,10 @@
1
1
  import styled from 'styled-components';
2
2
  import { Aligment } from '../Aligment';
3
+ import { Theme } from '../../Theme/Theme';
3
4
  export const ElementHeaderWrapper = styled(Aligment) `
4
5
  width: 100%;
6
+ border-top-left-radius:${Theme.borderRadius.m};
7
+ border-top-right-radius:${Theme.borderRadius.m};
5
8
  ${(p) => p.bottomDivader &&
6
9
  `
7
10
  border-bottom: 2px solid rgba(0, 0, 0, 0.14);
@@ -34,7 +34,9 @@ export const Input = ({ label, labelPosition = 'top', value, type = 'text', name
34
34
  }
35
35
  };
36
36
  const onKeyDown = (e) => {
37
+ console.log(e.key, handleSubmit);
37
38
  if (handleSubmit && e.key === 'Enter') {
39
+ console.log('sss');
38
40
  handleSubmit();
39
41
  }
40
42
  };
@@ -3,5 +3,8 @@ interface ICardElementProps {
3
3
  height?: string;
4
4
  }
5
5
  export declare const CardElement: import("styled-components").StyledComponent<"div", any, ICardElementProps, never>;
6
- export declare const CardContent: import("styled-components").StyledComponent<"div", any, {}, never>;
6
+ interface ICardContentStyles {
7
+ soloMode: boolean;
8
+ }
9
+ export declare const CardContent: import("styled-components").StyledComponent<"div", any, ICardContentStyles, never>;
7
10
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "venice-ui",
3
- "version": "2.0.3",
3
+ "version": "2.0.5",
4
4
  "description": "Component library",
5
5
  "main": "index.js",
6
6
  "module": "./dist/esm/index.js",