@mailstep/design-system 0.7.5 → 0.7.6-beta.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mailstep/design-system",
3
- "version": "0.7.5",
3
+ "version": "0.7.6-beta.0",
4
4
  "license": "ISC",
5
5
  "type": "module",
6
6
  "main": "./ui/index.js",
@@ -3,6 +3,7 @@ export type BarChartSymbolProps = {
3
3
  selected?: number;
4
4
  total?: number;
5
5
  height?: number;
6
+ minHeight?: number;
6
7
  width?: number;
7
8
  gap?: number;
8
9
  color?: string;
@@ -2,6 +2,6 @@ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { x } from '@xstyled/styled-components';
3
3
  import { Bar } from './styles';
4
4
  export var BarChartSymbol = function (_a) {
5
- var _b = _a.total, total = _b === void 0 ? 3 : _b, _c = _a.height, height = _c === void 0 ? 14 : _c, _d = _a.selected, selected = _d === void 0 ? 3 : _d, _e = _a.gap, gap = _e === void 0 ? 2 : _e, _f = _a.width, width = _f === void 0 ? 3 : _f, color = _a.color;
6
- return (_jsx(x.div, { display: "flex", alignItems: "flex-end", gap: "".concat(gap, "px"), children: Array.from({ length: total }).map(function (_, index) { return (_jsx(Bar, { total: total, index: index + 1, height: height, selected: selected, color: color, width: width }, index)); }) }));
5
+ var _b = _a.total, total = _b === void 0 ? 3 : _b, _c = _a.height, height = _c === void 0 ? 14 : _c, _d = _a.minHeight, minHeight = _d === void 0 ? 7 : _d, _e = _a.selected, selected = _e === void 0 ? 3 : _e, _f = _a.gap, gap = _f === void 0 ? 2 : _f, _g = _a.width, width = _g === void 0 ? 3 : _g, color = _a.color;
6
+ return (_jsx(x.div, { display: "flex", alignItems: "flex-end", gap: "".concat(gap, "px"), children: Array.from({ length: total }).map(function (_, index) { return (_jsx(Bar, { total: total, index: index + 1, height: height, minHeight: minHeight, selected: selected, color: color, width: width }, index)); }) }));
7
7
  };
@@ -1,5 +1,6 @@
1
1
  export declare const Bar: import("styled-components").StyledComponent<"div", import("@xstyled/system").Theme, {
2
2
  height: number;
3
+ minHeight: number;
3
4
  index: number;
4
5
  total: number;
5
6
  selected: number;
@@ -3,12 +3,11 @@ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cook
3
3
  return cooked;
4
4
  };
5
5
  import { styled, th } from '@xstyled/styled-components';
6
- var minHeight = 7;
7
6
  export var Bar = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n width: ", "px;\n height: ", "px;\n background-color: ", ";\n border-radius: 7px;\n"], ["\n width: ", "px;\n height: ", "px;\n background-color: ", ";\n border-radius: 7px;\n"])), function (_a) {
8
7
  var width = _a.width;
9
8
  return width;
10
9
  }, function (_a) {
11
- var index = _a.index, height = _a.height, total = _a.total;
10
+ var index = _a.index, height = _a.height, total = _a.total, minHeight = _a.minHeight;
12
11
  return minHeight + (index - 1) * ((height - minHeight) / (total - 1));
13
12
  }, function (_a) {
14
13
  var selected = _a.selected, index = _a.index, color = _a.color;