venice-ui 3.0.12 → 3.0.14
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.
- package/dist/cjs/components/Card/Card.js +2 -2
- package/dist/cjs/components/Card/Card.styles.js +1 -1
- package/dist/cjs/components/Table/Table.styles.js +1 -1
- package/dist/esm/components/Card/Card.js +2 -2
- package/dist/esm/components/Card/Card.styles.js +1 -1
- package/dist/esm/components/Table/Table.styles.js +1 -1
- package/dist/types/components/Card/Card.d.ts +1 -1
- package/dist/types/components/Card/Card.styles.d.ts +1 -1
- package/package.json +1 -1
|
@@ -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,
|
|
12
|
+
const Card = ({ theme, themeVariant = 'default', title, actionLabel, children, customHeader, headerDivader, actionDisabled, handleClick, handleBack, componentHeight, options, shadow, noVerticalPadding, }) => {
|
|
13
13
|
const resolvedThemeData = (0, config_1.resolveThemeWithComponentsConfig)({
|
|
14
14
|
theme,
|
|
15
15
|
themeVariant,
|
|
@@ -18,7 +18,7 @@ const Card = ({ theme, themeVariant = 'default', title, actionLabel, children, c
|
|
|
18
18
|
const { componentsConfig } = resolvedThemeData;
|
|
19
19
|
const headerConfig = componentsConfig.card;
|
|
20
20
|
return (react_1.default.createElement(styled_components_1.ThemeProvider, { theme: resolvedTheme },
|
|
21
|
-
react_1.default.createElement(Card_styles_1.CardRoot, {
|
|
21
|
+
react_1.default.createElement(Card_styles_1.CardRoot, { componentHeight: componentHeight, 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
23
|
react_1.default.createElement(Card_styles_1.CardContent, { theme: resolvedTheme, config: headerConfig, noVerticalPadding: noVerticalPadding }, children))));
|
|
24
24
|
};
|
|
@@ -12,7 +12,7 @@ exports.CardRoot = styled_components_1.default.div `
|
|
|
12
12
|
width: 100%;
|
|
13
13
|
background-color: ${({ config }) => config.color.background};
|
|
14
14
|
border-radius: ${({ config }) => config.size.borderRadius};
|
|
15
|
-
height: ${(p) => (p.
|
|
15
|
+
height: ${(p) => (p.componentHeight ? p.componentHeight : '100%')};
|
|
16
16
|
${(p) => p.shadow && `box-shadow: ${p.config.color.shadow};`}
|
|
17
17
|
|
|
18
18
|
`;
|
|
@@ -14,6 +14,7 @@ exports.TableRoot = styled_components_1.default.div `
|
|
|
14
14
|
exports.TableHeader = styled_components_1.default.div `
|
|
15
15
|
display: flex;
|
|
16
16
|
align-items: center;
|
|
17
|
+
flex-shrink: 0;
|
|
17
18
|
justify-content: ${({ right }) => (right ? 'flex-end' : 'flex-start')};
|
|
18
19
|
height: ${({ theme, config }) => config.size.header.height}px;
|
|
19
20
|
`;
|
|
@@ -39,7 +40,6 @@ exports.TableContent = styled_components_1.default.table `
|
|
|
39
40
|
box-sizing: border-box;
|
|
40
41
|
display: block;
|
|
41
42
|
width: 100%;
|
|
42
|
-
min-width: max-content;
|
|
43
43
|
overflow-x: auto;
|
|
44
44
|
overflow-y: auto;
|
|
45
45
|
height: 100%;
|
|
@@ -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,
|
|
6
|
+
export const Card = ({ theme, themeVariant = 'default', title, actionLabel, children, customHeader, headerDivader, actionDisabled, handleClick, handleBack, componentHeight, options, shadow, noVerticalPadding, }) => {
|
|
7
7
|
const resolvedThemeData = resolveThemeWithComponentsConfig({
|
|
8
8
|
theme,
|
|
9
9
|
themeVariant,
|
|
@@ -12,7 +12,7 @@ export const Card = ({ theme, themeVariant = 'default', title, actionLabel, chil
|
|
|
12
12
|
const { componentsConfig } = resolvedThemeData;
|
|
13
13
|
const headerConfig = componentsConfig.card;
|
|
14
14
|
return (React.createElement(ThemeProvider, { theme: resolvedTheme },
|
|
15
|
-
React.createElement(CardRoot, {
|
|
15
|
+
React.createElement(CardRoot, { componentHeight: componentHeight, 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
17
|
React.createElement(CardContent, { theme: resolvedTheme, config: headerConfig, noVerticalPadding: noVerticalPadding }, children))));
|
|
18
18
|
};
|
|
@@ -6,7 +6,7 @@ export const CardRoot = styled.div `
|
|
|
6
6
|
width: 100%;
|
|
7
7
|
background-color: ${({ config }) => config.color.background};
|
|
8
8
|
border-radius: ${({ config }) => config.size.borderRadius};
|
|
9
|
-
height: ${(p) => (p.
|
|
9
|
+
height: ${(p) => (p.componentHeight ? p.componentHeight : '100%')};
|
|
10
10
|
${(p) => p.shadow && `box-shadow: ${p.config.color.shadow};`}
|
|
11
11
|
|
|
12
12
|
`;
|
|
@@ -8,6 +8,7 @@ export const TableRoot = styled.div `
|
|
|
8
8
|
export const TableHeader = styled.div `
|
|
9
9
|
display: flex;
|
|
10
10
|
align-items: center;
|
|
11
|
+
flex-shrink: 0;
|
|
11
12
|
justify-content: ${({ right }) => (right ? 'flex-end' : 'flex-start')};
|
|
12
13
|
height: ${({ theme, config }) => config.size.header.height}px;
|
|
13
14
|
`;
|
|
@@ -33,7 +34,6 @@ export const TableContent = styled.table `
|
|
|
33
34
|
box-sizing: border-box;
|
|
34
35
|
display: block;
|
|
35
36
|
width: 100%;
|
|
36
|
-
min-width: max-content;
|
|
37
37
|
overflow-x: auto;
|
|
38
38
|
overflow-y: auto;
|
|
39
39
|
height: 100%;
|