venice-ui 3.0.8 → 3.0.9

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.
@@ -9,7 +9,7 @@ const react_1 = __importDefault(require("react"));
9
9
  const Card_styles_1 = require("./Card.styles");
10
10
  const Header_1 = require("../Header");
11
11
  const styled_components_1 = require("styled-components");
12
- const Card = ({ theme, themeVariant = 'default', title, actionLabel, children, customHeader, headerDivader, actionDisabled, handleClick, handleBack, height, options, shadow, }) => {
12
+ const Card = ({ theme, themeVariant = 'default', title, actionLabel, children, customHeader, headerDivader, actionDisabled, handleClick, handleBack, height, options, shadow, noVerticalPadding, }) => {
13
13
  const resolvedThemeData = (0, config_1.resolveThemeWithComponentsConfig)({
14
14
  theme,
15
15
  themeVariant,
@@ -20,6 +20,6 @@ const Card = ({ theme, themeVariant = 'default', title, actionLabel, children, c
20
20
  return (react_1.default.createElement(styled_components_1.ThemeProvider, { theme: resolvedTheme },
21
21
  react_1.default.createElement(Card_styles_1.CardRoot, { height: height, shadow: shadow, theme: resolvedTheme, config: headerConfig },
22
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 })),
23
- react_1.default.createElement(Card_styles_1.CardContent, { theme: resolvedTheme, config: headerConfig }, children))));
23
+ react_1.default.createElement(Card_styles_1.CardContent, { theme: resolvedTheme, config: headerConfig, noVerticalPadding: noVerticalPadding }, children))));
24
24
  };
25
25
  exports.Card = Card;
@@ -19,7 +19,7 @@ exports.CardRoot = styled_components_1.default.div `
19
19
  exports.CardContent = styled_components_1.default.div `
20
20
  box-sizing: border-box;
21
21
  display: flex;
22
- padding: ${({ config }) => config.size.paddingY}px
22
+ padding: ${({ config, noVerticalPadding }) => (noVerticalPadding ? '0' : `${config.size.paddingY}px`)}
23
23
  ${({ config }) => config.size.paddingX}px;
24
24
  width: 100%;
25
25
  flex-direction: row;
@@ -33,6 +33,7 @@ exports.HeaderSection = styled_components_1.default.div `
33
33
  align-items: center;
34
34
  justify-content: ${({ right }) => (right ? 'flex-end' : 'flex-start')};
35
35
  width: 50%;
36
+ flex-shrink: 0;
36
37
  `;
37
38
  exports.TableContent = styled_components_1.default.table `
38
39
  box-sizing: border-box;
@@ -59,6 +60,7 @@ exports.TableHead = styled_components_1.default.thead `
59
60
  top: 0;
60
61
  z-index: 2;
61
62
  }
63
+ flex-shrink: 0;
62
64
  `;
63
65
  exports.TableBody = styled_components_1.default.tbody `
64
66
  box-sizing: border-box;
@@ -3,7 +3,7 @@ import React from 'react';
3
3
  import { CardContent, CardRoot } from './Card.styles';
4
4
  import { Header } from '../Header';
5
5
  import { ThemeProvider } from 'styled-components';
6
- export const Card = ({ theme, themeVariant = 'default', title, actionLabel, children, customHeader, headerDivader, actionDisabled, handleClick, handleBack, height, options, shadow, }) => {
6
+ export const Card = ({ theme, themeVariant = 'default', title, actionLabel, children, customHeader, headerDivader, actionDisabled, handleClick, handleBack, height, options, shadow, noVerticalPadding, }) => {
7
7
  const resolvedThemeData = resolveThemeWithComponentsConfig({
8
8
  theme,
9
9
  themeVariant,
@@ -14,5 +14,5 @@ export const Card = ({ theme, themeVariant = 'default', title, actionLabel, chil
14
14
  return (React.createElement(ThemeProvider, { theme: resolvedTheme },
15
15
  React.createElement(CardRoot, { height: height, shadow: shadow, theme: resolvedTheme, config: headerConfig },
16
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 })),
17
- React.createElement(CardContent, { theme: resolvedTheme, config: headerConfig }, children))));
17
+ React.createElement(CardContent, { theme: resolvedTheme, config: headerConfig, noVerticalPadding: noVerticalPadding }, children))));
18
18
  };
@@ -13,7 +13,7 @@ export const CardRoot = styled.div `
13
13
  export const CardContent = styled.div `
14
14
  box-sizing: border-box;
15
15
  display: flex;
16
- padding: ${({ config }) => config.size.paddingY}px
16
+ padding: ${({ config, noVerticalPadding }) => (noVerticalPadding ? '0' : `${config.size.paddingY}px`)}
17
17
  ${({ config }) => config.size.paddingX}px;
18
18
  width: 100%;
19
19
  flex-direction: row;
@@ -27,6 +27,7 @@ export const HeaderSection = styled.div `
27
27
  align-items: center;
28
28
  justify-content: ${({ right }) => (right ? 'flex-end' : 'flex-start')};
29
29
  width: 50%;
30
+ flex-shrink: 0;
30
31
  `;
31
32
  export const TableContent = styled.table `
32
33
  box-sizing: border-box;
@@ -53,6 +54,7 @@ export const TableHead = styled.thead `
53
54
  top: 0;
54
55
  z-index: 2;
55
56
  }
57
+ flex-shrink: 0;
56
58
  `;
57
59
  export const TableBody = styled.tbody `
58
60
  box-sizing: border-box;
@@ -15,6 +15,7 @@ interface ICardProps {
15
15
  height?: string;
16
16
  options?: IAction[];
17
17
  shadow?: boolean;
18
+ noVerticalPadding?: boolean;
18
19
  }
19
20
  export declare const Card: FC<ICardProps>;
20
21
  export {};
@@ -8,6 +8,7 @@ export declare const CardRoot: import("styled-components").StyledComponent<"div"
8
8
  interface ICardContentStyles {
9
9
  theme?: any;
10
10
  config: any;
11
+ noVerticalPadding?: boolean;
11
12
  }
12
13
  export declare const CardContent: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, ICardContentStyles, never>;
13
14
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "venice-ui",
3
- "version": "3.0.8",
3
+ "version": "3.0.9",
4
4
  "description": "Component library",
5
5
  "main": "index.js",
6
6
  "module": "./dist/esm/index.js",