@alixpartners/ui-components
Advanced tools
Comparing version 1.4.4 to 1.4.5
@@ -0,1 +1,9 @@ | ||
## 1.4.5 (May 16, 2019) | ||
### Feature | ||
- Deprecate `minWith` replace `tableMinWidth` (`ApSimpleTable`) | ||
- Add `tableWidth` (`ApSimpleTable`) | ||
- Add `cellWidth` (`ApSimpleTable`) | ||
## 1.4.4 (May 16, 2019) | ||
@@ -2,0 +10,0 @@ |
@@ -9,4 +9,4 @@ "use strict"; | ||
exports.ApSimpleTable = function (_a) { | ||
var children = _a.children, className = _a.className, tableHeight = _a.tableHeight, tableBorders = _a.tableBorders, bodyOffset = _a.bodyOffset, minWidth = _a.minWidth; | ||
return (React.createElement(styles_1.StyledTableSection, { className: "ap-simple-table-section " + (className ? className : ''), bodyOffset: bodyOffset, tableBorders: tableBorders, minWidth: minWidth }, | ||
var children = _a.children, className = _a.className, tableHeight = _a.tableHeight, tableBorders = _a.tableBorders, bodyOffset = _a.bodyOffset, tableMinWidth = _a.tableMinWidth, tableWidth = _a.tableWidth; | ||
return (React.createElement(styles_1.StyledTableSection, { className: "ap-simple-table-section " + (className ? className : ''), bodyOffset: bodyOffset, tableBorders: tableBorders, tableMinWidth: tableMinWidth, tableWidth: tableWidth }, | ||
React.createElement(styles_1.StyledTableContainer, { className: "ap-simple-table-container", tableHeight: tableHeight }, | ||
@@ -28,13 +28,12 @@ React.createElement(styles_1.StyledTable, { className: "ap-simple-table" }, children)))); | ||
exports.ApSimpleTableHeadCell = function (_a) { | ||
var className = _a.className, children = _a.children, cellMinWidth = _a.cellMinWidth, cellTextColor = _a.cellTextColor; | ||
return (React.createElement(styles_1.StyledTableHeadCell, { className: "ap-simple-table-head-cell" + (className ? className : ''), cellMinWidth: cellMinWidth, cellTextColor: cellTextColor }, | ||
React.createElement(styles_1.StyledTableHeadCellInner, { className: "ap-simple-table-head-cell-inner " + (className ? className : '') }, children))); | ||
var className = _a.className, children = _a.children, cellWidth = _a.cellWidth, cellMinWidth = _a.cellMinWidth, cellTextColor = _a.cellTextColor; | ||
return (React.createElement(styles_1.StyledTableHeadCell, { className: "ap-simple-table-head-cell" + (className ? className : ''), cellWidth: cellWidth, cellMinWidth: cellMinWidth, cellTextColor: cellTextColor }, | ||
React.createElement(styles_1.StyledTableHeadCellInner, { className: "ap-simple-table-head-cell-inner " + (className ? className : ''), cellWidth: cellWidth, cellMinWidth: cellMinWidth, cellTextColor: cellTextColor }, children))); | ||
}; | ||
exports.ApSimpleTableBodyCell = function (_a) { | ||
var className = _a.className, children = _a.children, cellBorders = _a.cellBorders, cellMinWidth = _a.cellMinWidth, cellTextColor = _a.cellTextColor; | ||
return (React.createElement(styles_1.StyledTableBodyCell, { className: "ap-simple-table-body-cell " + (className ? className : ''), cellBorders: cellBorders, cellMinWidth: cellMinWidth, cellTextColor: cellTextColor }, children)); | ||
var className = _a.className, children = _a.children, cellBorders = _a.cellBorders, cellWidth = _a.cellWidth, cellMinWidth = _a.cellMinWidth, cellTextColor = _a.cellTextColor; | ||
return (React.createElement(styles_1.StyledTableBodyCell, { className: "ap-simple-table-body-cell " + (className ? className : ''), cellBorders: cellBorders, cellWidth: cellWidth, cellMinWidth: cellMinWidth, cellTextColor: cellTextColor }, children)); | ||
}; | ||
exports.ApSimpleTable.defaultProps = { | ||
bodyOffset: theme_1.scaffolding.xl, | ||
minWidth: '280px', | ||
tableBorders: (_a = {}, | ||
@@ -46,3 +45,5 @@ _a[types_1.TOP] = false, | ||
_a), | ||
tableHeight: '297px' | ||
tableHeight: '297px', | ||
tableMinWidth: '280px', | ||
tableWidth: '100%' | ||
}; | ||
@@ -49,0 +50,0 @@ exports.ApSimpleTableHeadCell.defaultProps = { |
@@ -14,3 +14,2 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var _a; | ||
var styled_components_1 = require("styled-components"); | ||
@@ -22,6 +21,5 @@ var theme_1 = require("../../utils/theme"); | ||
overflowX: 'hidden', | ||
position: 'relative', | ||
width: '100%' | ||
position: 'relative' | ||
}, function (_a) { | ||
var bodyOffset = _a.bodyOffset, tableBorders = _a.tableBorders, minWidth = _a.minWidth; | ||
var bodyOffset = _a.bodyOffset, tableBorders = _a.tableBorders, tableMinWidth = _a.tableMinWidth, tableWidth = _a.tableWidth; | ||
return ({ | ||
@@ -37,3 +35,4 @@ /* tslint:disable */ | ||
paddingTop: bodyOffset, | ||
minWidth: minWidth | ||
minWidth: tableMinWidth, | ||
width: tableWidth | ||
/* tslint:enable */ | ||
@@ -56,3 +55,2 @@ }); | ||
exports.StyledTableHead = styled_components_1.default.thead({}); | ||
exports.StyledTableHeadCellInner = styled_components_1.default.div({}); | ||
exports.StyledTableBody = styled_components_1.default.tbody({}); | ||
@@ -64,5 +62,13 @@ exports.StyledTableRow = styled_components_1.default.tr({}); | ||
}; | ||
exports.StyledTableHeadCell = styled_components_1.default.th(__assign({}, commonStyles, (_a = { border: 'none', color: theme_1.colors.transparent, fontWeight: theme_1.fontWeights.regular, height: '0px', lineHeight: '0px', paddingBottom: '0px', paddingTop: '0px', whiteSpace: 'nowrap' }, _a["" + exports.StyledTableHeadCellInner] = { | ||
exports.StyledTableHeadCell = styled_components_1.default.th(__assign({}, commonStyles, { border: 'none', color: theme_1.colors.transparent, fontWeight: theme_1.fontWeights.regular, height: '0px', lineHeight: '0px', paddingBottom: '0px', paddingTop: '0px', whiteSpace: 'nowrap' }), function (_a) { | ||
var cellMinWidth = _a.cellMinWidth, cellWidth = _a.cellWidth, cellTextColor = _a.cellTextColor; | ||
return ({ | ||
color: cellTextColor, | ||
minWidth: cellMinWidth, | ||
width: cellWidth | ||
}); | ||
}); | ||
exports.StyledTableHeadCellInner = styled_components_1.default.div({ | ||
fontSize: '11px', | ||
lineHeight: 'normal', | ||
fontSize: '11px', | ||
marginLeft: "-" + theme_1.scaffolding.md, | ||
@@ -72,19 +78,14 @@ padding: theme_1.scaffolding.sm + " " + theme_1.scaffolding.md, | ||
top: '0px', | ||
width: 'auto', | ||
whiteSpace: 'pre-line' | ||
}, _a)), function (_a) { | ||
var cellMinWidth = _a.cellMinWidth, cellTextColor = _a.cellTextColor; | ||
var _b; | ||
return (_b = { | ||
color: cellTextColor, | ||
minWidth: cellMinWidth | ||
}, | ||
_b["" + exports.StyledTableHeadCellInner] = { | ||
color: cellTextColor, | ||
minWidth: cellMinWidth | ||
}, | ||
_b); | ||
whiteSpace: 'pre-line', | ||
width: 'auto' | ||
}, function (_a) { | ||
var cellMinWidth = _a.cellMinWidth, cellWidth = _a.cellWidth, cellTextColor = _a.cellTextColor; | ||
return ({ | ||
color: cellTextColor, | ||
minWidth: cellMinWidth, | ||
width: cellWidth | ||
}); | ||
}); | ||
exports.StyledTableBodyCell = styled_components_1.default.td(__assign({}, commonStyles, { boxSizing: 'border-box' }), function (_a) { | ||
var cellBorders = _a.cellBorders, cellMinWidth = _a.cellMinWidth, cellTextColor = _a.cellTextColor; | ||
var cellBorders = _a.cellBorders, cellMinWidth = _a.cellMinWidth, cellWidth = _a.cellWidth, cellTextColor = _a.cellTextColor; | ||
return ({ | ||
@@ -100,3 +101,4 @@ /* tslint:disable */ | ||
borderRightColor: cellBorders.right ? theme_1.colors.grey2 : theme_1.colors.white, | ||
minWidth: cellMinWidth | ||
minWidth: cellMinWidth, | ||
width: cellWidth | ||
/* tslint:enable */ | ||
@@ -103,0 +105,0 @@ }); |
@@ -15,7 +15,11 @@ import * as React from 'react'; | ||
bodyOffset?: string | number; | ||
/** Sets the min-width css value */ | ||
minWidth?: string | number; | ||
/** Sets the table min-width css value */ | ||
tableMinWidth?: string | number; | ||
/** Sets the table width css value */ | ||
tableWidth?: string | number; | ||
} | ||
interface ICommonCells { | ||
/** Sets the min-width css value for table and body cells */ | ||
/** Sets the width css value for head and body cells */ | ||
cellWidth?: string | number; | ||
/** Sets the min-width css value for head and body cells */ | ||
cellMinWidth?: string | number; | ||
@@ -22,0 +26,0 @@ /** The css color of the cell text */ |
@@ -6,6 +6,6 @@ import { ISimpleTableBodyCellStyles, ISimpleTableHeadCellStyles, ISimpleTableStyles } from './ApSimpleTable'; | ||
export declare const StyledTableHead: import("styled-components").StyledComponent<"thead", any, {}, never>; | ||
export declare const StyledTableHeadCellInner: import("styled-components").StyledComponent<"div", any, {}, never>; | ||
export declare const StyledTableBody: import("styled-components").StyledComponent<"tbody", any, {}, never>; | ||
export declare const StyledTableRow: import("styled-components").StyledComponent<"tr", any, {}, never>; | ||
export declare const StyledTableHeadCell: import("styled-components").StyledComponent<"th", any, ISimpleTableHeadCellStyles, never>; | ||
export declare const StyledTableHeadCellInner: import("styled-components").StyledComponent<"div", any, ISimpleTableHeadCellStyles, never>; | ||
export declare const StyledTableBodyCell: import("styled-components").StyledComponent<"td", any, ISimpleTableBodyCellStyles, never>; |
{ | ||
"name": "@alixpartners/ui-components", | ||
"version": "1.4.4", | ||
"version": "1.4.5", | ||
"license": "SEE LICENSE IN LICENSE.md", | ||
@@ -5,0 +5,0 @@ "repository": "https://alixpartners-dev.visualstudio.com/_git/AP.UIComponents", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
10677113
21487
2