sag_components 2.0.0-beta142 → 2.0.0-beta143
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/index.esm.js +36 -0
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +36 -0
- package/dist/index.js.map +1 -1
- package/dist/types/components/Table/TableBody.d.ts +5 -1
- package/dist/types/components/Table/TableBody.styles.d.ts +2 -0
- package/dist/types/components/Table/data.d.ts +3 -16
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -38317,6 +38317,21 @@ const DisabledTrashIconWrapper = styled__default["default"].div`
|
|
|
38317
38317
|
color: #d9d9d9;
|
|
38318
38318
|
}
|
|
38319
38319
|
`;
|
|
38320
|
+
const StatusCell = styled__default["default"].div`
|
|
38321
|
+
font-size: 12px;
|
|
38322
|
+
font-weight: 500;
|
|
38323
|
+
display: flex;
|
|
38324
|
+
align-items: center;
|
|
38325
|
+
gap: 6px;
|
|
38326
|
+
color: ${props => props.color || "#000"};
|
|
38327
|
+
`;
|
|
38328
|
+
const StatusCellCircle = styled__default["default"].div`
|
|
38329
|
+
width: 8px;
|
|
38330
|
+
height: 8px;
|
|
38331
|
+
border-radius: 50%;
|
|
38332
|
+
border: 1px solid white;
|
|
38333
|
+
background-color: ${props => props.backgroundColor};
|
|
38334
|
+
`;
|
|
38320
38335
|
|
|
38321
38336
|
// CommentModal.styles.js
|
|
38322
38337
|
const ModalOverlay$1 = styled__default["default"].div`
|
|
@@ -38690,6 +38705,19 @@ const TableBody = ({
|
|
|
38690
38705
|
resetFocus = false,
|
|
38691
38706
|
onFocusChange,
|
|
38692
38707
|
indexToShimmer = 0,
|
|
38708
|
+
statuses = [{
|
|
38709
|
+
status: 'Pending',
|
|
38710
|
+
palette: ['#F5C9A7', '#8B4513']
|
|
38711
|
+
}, {
|
|
38712
|
+
status: 'Received',
|
|
38713
|
+
palette: ['#B9D5D5', '#2F4F4F']
|
|
38714
|
+
}, {
|
|
38715
|
+
status: 'Approved',
|
|
38716
|
+
palette: ['#BEDDC3', '#2D5016']
|
|
38717
|
+
}, {
|
|
38718
|
+
status: 'Cancelled',
|
|
38719
|
+
palette: ['#EBA6AF', '#8B1538']
|
|
38720
|
+
}],
|
|
38693
38721
|
onCommentSave = () => {},
|
|
38694
38722
|
ref = null
|
|
38695
38723
|
}) => {
|
|
@@ -38875,6 +38903,14 @@ const TableBody = ({
|
|
|
38875
38903
|
}), /*#__PURE__*/React__default["default"].createElement("span", null, "All Sent"));
|
|
38876
38904
|
}
|
|
38877
38905
|
return value;
|
|
38906
|
+
case 'status':
|
|
38907
|
+
const statusObj = statuses.find(status => status.status === value) || {};
|
|
38908
|
+
const [palette0, palette1] = statusObj.palette;
|
|
38909
|
+
return /*#__PURE__*/React__default["default"].createElement(StatusCell, {
|
|
38910
|
+
color: palette1
|
|
38911
|
+
}, /*#__PURE__*/React__default["default"].createElement(StatusCellCircle, {
|
|
38912
|
+
backgroundColor: palette0
|
|
38913
|
+
}), /*#__PURE__*/React__default["default"].createElement("span", null, value));
|
|
38878
38914
|
case 'comments':
|
|
38879
38915
|
const commentText = value || '';
|
|
38880
38916
|
const hasComments = commentText.trim().length > 0;
|