venice-ui 1.0.24 → 1.0.25

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.
@@ -10,6 +10,6 @@ const ElementHeader_1 = require("../ElementHeader");
10
10
  const Card = ({ children, title, actionLabel, moreIcon = false, backIcon = false, handleClick, handleBack, height, options, }) => {
11
11
  return (react_1.default.createElement(Card_styles_1.CardElement, { height: height },
12
12
  (title || actionLabel) && (react_1.default.createElement(ElementHeader_1.ElementHeader, { title: title, actionLabel: actionLabel, handleClick: handleClick, handleBack: handleBack, closeIcon: false, backIcon: backIcon, actionButton: true, moreIcon: moreIcon, options: options })),
13
- react_1.default.createElement(Card_styles_1.CardContent, null, children)));
13
+ react_1.default.createElement(Card_styles_1.CardContent, { soloMode: !title && !actionLabel }, children)));
14
14
  };
15
15
  exports.Card = Card;
@@ -14,12 +14,15 @@ exports.CardElement = styled_components_1.default.div `
14
14
  background-color: ${Theme_1.Theme.colors.white};
15
15
  border-radius: ${Theme_1.Theme.borderRadius.m};
16
16
  height: ${p => p.height ? p.height : '100%'};
17
- box-shadow: ${Theme_1.Theme.shadow.s}
17
+ box-shadow: ${Theme_1.Theme.shadow.s};
18
18
  `;
19
19
  exports.CardContent = styled_components_1.default.div `
20
20
  box-sizing: border-box;
21
21
  display: flex;
22
+ backgorund-color:#ff0000;
22
23
  padding: ${Theme_1.Theme.padding.l};
23
24
  width: 100%;
24
25
  flex-direction: row;
25
- `;
26
+ ${p => !p.soloMode && `
27
+ padding-top:0px;`}
28
+ `;
@@ -7,8 +7,9 @@ exports.Section = void 0;
7
7
  const Typography_1 = require("../Typography");
8
8
  const react_1 = __importDefault(require("react"));
9
9
  const Section_styles_1 = require("./Section.styles");
10
- const Section = ({ title, children, titlePosition = "left", noPadding = false }) => {
11
- return (react_1.default.createElement(Section_styles_1.SectionElement, null,
10
+ const Theme_1 = require("../../Theme");
11
+ const Section = ({ title, children, titlePosition = "left", noPadding = false, backgroundColor = Theme_1.Theme.colors.white, }) => {
12
+ return (react_1.default.createElement(Section_styles_1.SectionElement, { backgroundColor: backgroundColor },
12
13
  title && (react_1.default.createElement(Section_styles_1.SectionTitle, { titlePosition: titlePosition },
13
14
  react_1.default.createElement(Typography_1.TextSubHeader, null, title))),
14
15
  react_1.default.createElement(Section_styles_1.SectionContent, { noPadding: noPadding }, children)));
@@ -9,8 +9,9 @@ const Theme_1 = require("../../Theme");
9
9
  exports.SectionElement = styled_components_1.default.div `
10
10
  width:100%;
11
11
  box-sizing:border-box;
12
+ overflow:auto;
12
13
  padding: ${Theme_1.Theme.padding.l} 0;
13
- background-color:${Theme_1.Theme.colors.white};
14
+ background-color: ${(p) => p.backgroundColor};
14
15
  `;
15
16
  exports.SectionTitle = styled_components_1.default.div `
16
17
  width:100%;
@@ -19,6 +20,7 @@ exports.SectionTitle = styled_components_1.default.div `
19
20
  box-sizing:border-box;
20
21
  `;
21
22
  exports.SectionContent = styled_components_1.default.div `
23
+ box-sizing:border-box;
22
24
  width:100%;
23
25
  display:flex;
24
26
  padding: 0 ${p => p.noPadding ? 0 : Theme_1.Theme.padding.l};
@@ -8,8 +8,8 @@ const ElementHeader_1 = require("../ElementHeader");
8
8
  const react_1 = __importDefault(require("react"));
9
9
  const Tile_styles_1 = require("./Tile.styles");
10
10
  const Theme_1 = require("../../Theme");
11
- const Tile = ({ size = 'small', shadow = true, title, children, backgroundColor = Theme_1.Theme.colors.white, }) => {
12
- return (react_1.default.createElement(Tile_styles_1.TileElement, { size: size, shadow: shadow, backgroundColor: backgroundColor },
11
+ const Tile = ({ size = 'small', shadow = true, title, children, backgroundColor = Theme_1.Theme.colors.white, height = 'auto', }) => {
12
+ return (react_1.default.createElement(Tile_styles_1.TileElement, { size: size, shadow: shadow, backgroundColor: backgroundColor, height: height },
13
13
  title && react_1.default.createElement(ElementHeader_1.ElementHeader, { title: title, bgColor: backgroundColor }),
14
14
  children));
15
15
  };
@@ -16,6 +16,7 @@ exports.TileElement = styled_components_1.default.div `
16
16
  overflow: hidden;
17
17
  flex-direction: column;
18
18
  position: relative;
19
+ height:${p => p.height};
19
20
  ${(p) => p.shadow &&
20
21
  `
21
22
  box-shadow: ${Theme_1.Theme.shadow.s}
@@ -4,5 +4,5 @@ import { ElementHeader } from '../ElementHeader';
4
4
  export const Card = ({ children, title, actionLabel, moreIcon = false, backIcon = false, handleClick, handleBack, height, options, }) => {
5
5
  return (React.createElement(CardElement, { height: height },
6
6
  (title || actionLabel) && (React.createElement(ElementHeader, { title: title, actionLabel: actionLabel, handleClick: handleClick, handleBack: handleBack, closeIcon: false, backIcon: backIcon, actionButton: true, moreIcon: moreIcon, options: options })),
7
- React.createElement(CardContent, null, children)));
7
+ React.createElement(CardContent, { soloMode: !title && !actionLabel }, children)));
8
8
  };
@@ -8,12 +8,15 @@ export const CardElement = styled.div `
8
8
  background-color: ${Theme.colors.white};
9
9
  border-radius: ${Theme.borderRadius.m};
10
10
  height: ${p => p.height ? p.height : '100%'};
11
- box-shadow: ${Theme.shadow.s}
11
+ box-shadow: ${Theme.shadow.s};
12
12
  `;
13
13
  export const CardContent = styled.div `
14
14
  box-sizing: border-box;
15
15
  display: flex;
16
+ backgorund-color:#ff0000;
16
17
  padding: ${Theme.padding.l};
17
18
  width: 100%;
18
19
  flex-direction: row;
19
- `;
20
+ ${p => !p.soloMode && `
21
+ padding-top:0px;`}
22
+ `;
@@ -1,8 +1,9 @@
1
1
  import { TextSubHeader } from '../Typography';
2
2
  import React from 'react';
3
3
  import { SectionElement, SectionTitle, SectionContent } from './Section.styles';
4
- export const Section = ({ title, children, titlePosition = "left", noPadding = false }) => {
5
- return (React.createElement(SectionElement, null,
4
+ import { Theme } from '../../Theme';
5
+ export const Section = ({ title, children, titlePosition = "left", noPadding = false, backgroundColor = Theme.colors.white, }) => {
6
+ return (React.createElement(SectionElement, { backgroundColor: backgroundColor },
6
7
  title && (React.createElement(SectionTitle, { titlePosition: titlePosition },
7
8
  React.createElement(TextSubHeader, null, title))),
8
9
  React.createElement(SectionContent, { noPadding: noPadding }, children)));
@@ -3,8 +3,9 @@ import { Theme } from "../../Theme";
3
3
  export const SectionElement = styled.div `
4
4
  width:100%;
5
5
  box-sizing:border-box;
6
+ overflow:auto;
6
7
  padding: ${Theme.padding.l} 0;
7
- background-color:${Theme.colors.white};
8
+ background-color: ${(p) => p.backgroundColor};
8
9
  `;
9
10
  export const SectionTitle = styled.div `
10
11
  width:100%;
@@ -13,6 +14,7 @@ export const SectionTitle = styled.div `
13
14
  box-sizing:border-box;
14
15
  `;
15
16
  export const SectionContent = styled.div `
17
+ box-sizing:border-box;
16
18
  width:100%;
17
19
  display:flex;
18
20
  padding: 0 ${p => p.noPadding ? 0 : Theme.padding.l};
@@ -2,8 +2,8 @@ import { ElementHeader } from '../ElementHeader';
2
2
  import React from 'react';
3
3
  import { TileElement } from './Tile.styles';
4
4
  import { Theme } from '../../Theme';
5
- export const Tile = ({ size = 'small', shadow = true, title, children, backgroundColor = Theme.colors.white, }) => {
6
- return (React.createElement(TileElement, { size: size, shadow: shadow, backgroundColor: backgroundColor },
5
+ export const Tile = ({ size = 'small', shadow = true, title, children, backgroundColor = Theme.colors.white, height = 'auto', }) => {
6
+ return (React.createElement(TileElement, { size: size, shadow: shadow, backgroundColor: backgroundColor, height: height },
7
7
  title && React.createElement(ElementHeader, { title: title, bgColor: backgroundColor }),
8
8
  children));
9
9
  };
@@ -10,6 +10,7 @@ export const TileElement = styled.div `
10
10
  overflow: hidden;
11
11
  flex-direction: column;
12
12
  position: relative;
13
+ height:${p => p.height};
13
14
  ${(p) => p.shadow &&
14
15
  `
15
16
  box-shadow: ${Theme.shadow.s}
@@ -2,5 +2,8 @@ interface ICardElementProps {
2
2
  height?: string;
3
3
  }
4
4
  export declare const CardElement: import("styled-components").StyledComponent<"div", any, ICardElementProps, never>;
5
- export declare const CardContent: import("styled-components").StyledComponent<"div", any, {}, never>;
5
+ interface ICardContentStyles {
6
+ soloMode: boolean;
7
+ }
8
+ export declare const CardContent: import("styled-components").StyledComponent<"div", any, ICardContentStyles, never>;
6
9
  export {};
@@ -5,5 +5,6 @@ export interface ISectionProps {
5
5
  children: React.ReactNode;
6
6
  titlePosition?: TitlePosition;
7
7
  noPadding?: boolean;
8
+ backgroundColor?: string;
8
9
  }
9
10
  export declare const Section: FC<ISectionProps>;
@@ -1,5 +1,8 @@
1
1
  import { TitlePosition } from '../../types';
2
- export declare const SectionElement: import("styled-components").StyledComponent<"div", any, {}, never>;
2
+ interface ISectionStyles {
3
+ backgroundColor: string;
4
+ }
5
+ export declare const SectionElement: import("styled-components").StyledComponent<"div", any, ISectionStyles, never>;
3
6
  interface ISectionTitleStyle {
4
7
  titlePosition?: TitlePosition;
5
8
  }
@@ -5,5 +5,6 @@ export interface ITileProps {
5
5
  size?: string;
6
6
  shadow?: boolean;
7
7
  backgroundColor?: string;
8
+ height?: string;
8
9
  }
9
10
  export declare const Tile: FC<ITileProps>;
@@ -2,6 +2,7 @@ interface ITileElementStyle {
2
2
  size: string;
3
3
  shadow: boolean;
4
4
  backgroundColor: string;
5
+ height: string;
5
6
  }
6
7
  export declare const TileElement: import("styled-components").StyledComponent<"div", any, ITileElementStyle, never>;
7
8
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "venice-ui",
3
- "version": "1.0.24",
3
+ "version": "1.0.25",
4
4
  "description": "Component library",
5
5
  "main": "index.js",
6
6
  "module": "./dist/esm/index.js",