@longline/aqua-ui 1.0.133 → 1.0.135

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.
@@ -36,7 +36,7 @@ var LinearChartBase = function (props) {
36
36
  var Label = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n width: 120px;\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n height: 18px;\n line-height: 18px; // If not, will chop accents of \u00C3 and \u00C7.\n font-weight: 700; // TODO: Needs to use theme font weight\n"], ["\n width: 120px;\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n height: 18px;\n line-height: 18px; // If not, will chop accents of \u00C3 and \u00C7.\n font-weight: 700; // TODO: Needs to use theme font weight\n"])));
37
37
  var Number = styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n width: 40px;\n text-align: right;\n height: 18px; // If not, will chop accents of \u00C3 and \u00C7.\n line-height: 18px;\n"], ["\n width: 40px;\n text-align: right;\n height: 18px; // If not, will chop accents of \u00C3 and \u00C7.\n line-height: 18px;\n"])));
38
38
  var Bar = styled.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n position: relative; \n box-sizing: border-box;\n flex: 1;\n height: 14px;\n\n background-color: ", ";\n border-radius: 7px;\n\n &:before {\n content: '';\n position: absolute;\n top: 0;\n left: 0;\n height: 100%;\n box-sizing: border-box;\n transition: width ", "ms ease;\n border-radius: 7px;\n } \n"], ["\n position: relative; \n box-sizing: border-box;\n flex: 1;\n height: 14px;\n\n background-color: ", ";\n border-radius: 7px;\n\n &:before {\n content: '';\n position: absolute;\n top: 0;\n left: 0;\n height: 100%;\n box-sizing: border-box;\n transition: width ", "ms ease;\n border-radius: 7px;\n } \n"])), function (p) { return p.theme.colors.primary[4]; }, function (p) { return p.theme.animation.duration * 2; });
39
- var LinearChartStyled = styled(LinearChartBase)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n display: flex;\n flex-direction: row;\n flex-wrap: nowrap;\n align-items: center;\n justify-content: space-between;\n height: 18px;\n gap: 8px;\n margin: 8px 0 8px 0;\n min-width: 200px;\n\n font: ", ";\n color: ", ";\n line-height: 0;\n text-transform: uppercase;\n\n ", " {\n &:before {\n width: ", "%;\n background-color: ", ";\n }\n }\n"], ["\n display: flex;\n flex-direction: row;\n flex-wrap: nowrap;\n align-items: center;\n justify-content: space-between;\n height: 18px;\n gap: 8px;\n margin: 8px 0 8px 0;\n min-width: 200px;\n\n font: ", ";\n color: ", ";\n line-height: 0;\n text-transform: uppercase;\n\n ", " {\n &:before {\n width: ", "%;\n background-color: ", ";\n }\n }\n"
39
+ var LinearChartStyled = styled(LinearChartBase)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n display: flex;\n flex-direction: row;\n flex-wrap: nowrap;\n align-items: center;\n justify-content: space-between;\n height: 18px;\n gap: 8px;\n min-width: 200px;\n\n font: ", ";\n color: ", ";\n line-height: 0;\n text-transform: uppercase;\n\n ", " {\n &:before {\n width: ", "%;\n background-color: ", ";\n }\n }\n"], ["\n display: flex;\n flex-direction: row;\n flex-wrap: nowrap;\n align-items: center;\n justify-content: space-between;\n height: 18px;\n gap: 8px;\n min-width: 200px;\n\n font: ", ";\n color: ", ";\n line-height: 0;\n text-transform: uppercase;\n\n ", " {\n &:before {\n width: ", "%;\n background-color: ", ";\n }\n }\n"
40
40
  /**
41
41
  * Data visualization element.
42
42
  *
@@ -1,9 +1,10 @@
1
1
  import * as React from 'react';
2
2
  import { Selector } from '../../inputs/Selector';
3
3
  var Body = React.forwardRef(function (props, ref) {
4
- return (React.createElement("tbody", null, Array.isArray(props.data) && props.data.map(function (row, index) {
5
- return React.createElement(React.Fragment, null,
6
- React.createElement("tr", { key: index,
4
+ var getRows = function () {
5
+ var trs = [];
6
+ props.data.forEach(function (row, index) {
7
+ trs.push(React.createElement("tr", { key: index,
7
8
  // Set classnames for tr; styles are in Table.
8
9
  className: [
9
10
  props.active == row ? 'active' : null,
@@ -22,10 +23,14 @@ var Body = React.forwardRef(function (props, ref) {
22
23
  index == props.columns.length - 1 &&
23
24
  React.createElement("div", { style: { position: 'absolute', top: 0, right: 0 }, ref: (props.active == row ? ref : null) }));
24
25
  }),
25
- props.columnsEditable && React.createElement("td", null)),
26
- props.expanded && props.active == row &&
27
- React.createElement("tr", { key: "".concat(index, "_expand") },
26
+ props.columnsEditable && React.createElement("td", null)));
27
+ if (props.expanded && props.active == row) {
28
+ trs.push(React.createElement("tr", { key: "".concat(index, "_expand") },
28
29
  React.createElement("td", { style: { gridColumnStart: 0, gridColumnEnd: "span ".concat(props.columns.length + (props.onCheck ? 1 : 0) + (props.columnsEditable ? 1 : 0)) } }, props.expansion)));
29
- })));
30
+ }
31
+ });
32
+ return trs;
33
+ };
34
+ return (React.createElement("tbody", null, Array.isArray(props.data) && getRows()));
30
35
  });
31
36
  export { Body };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@longline/aqua-ui",
3
- "version": "1.0.133",
3
+ "version": "1.0.135",
4
4
  "description": "AquaUI",
5
5
  "author": "Alexander van Oostenrijk / Longline Environment",
6
6
  "license": "Commercial",