@mmb-digital/ds-lilly 0.8.4 → 0.8.5

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/ds-lilly.js CHANGED
@@ -111829,17 +111829,17 @@ var numberWithSpaces = function (num) {
111829
111829
  };
111830
111830
  var ChartLegendRow = function (_a) {
111831
111831
  var _b;
111832
- var color = _a.color, emptySummaryColor = _a.emptySummaryColor, hasSeparationLine = _a.hasSeparationLine, label = _a.label, percentage = _a.percentage, _c = _a.unitAfter, unitAfter = _c === void 0 ? 'CZK' : _c, value = _a.value;
111832
+ var color = _a.color, emptySummaryColor = _a.emptySummaryColor, hasSeparationLine = _a.hasSeparationLine, label = _a.label, percentage = _a.percentage, showValue = _a.showValue, _c = _a.unitAfter, unitAfter = _c === void 0 ? 'CZK' : _c, value = _a.value;
111833
111833
  return (external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement("div", { className: classBinder_cx('c-chartLegend__row', hasSeparationLine && 'c-chartLegend__row--separator') },
111834
111834
  external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement("div", { className: classBinder_cx('c-chartLegend__row__label') },
111835
111835
  !emptySummaryColor && (external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement("span", { className: classBinder_cx('c-chartLegend__row__color', (_b = {}, _b["c-chartLegend__row__bg--" + color + "Color"] = color, _b)) })),
111836
111836
  label),
111837
111837
  percentage && external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement("div", { className: classBinder_cx('c-chartLegend__row__percentage') }, percentage),
111838
- external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement("div", { className: classBinder_cx('c-chartLegend__row__value') },
111838
+ showValue && (external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement("div", { className: classBinder_cx('c-chartLegend__row__value') },
111839
111839
  numberWithSpaces(value),
111840
111840
  external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement("span", { className: classBinder_cx('c-chartLegend__row__currency') },
111841
111841
  "\u00A0",
111842
- unitAfter))));
111842
+ unitAfter)))));
111843
111843
  };
111844
111844
 
111845
111845
  // CONCATENATED MODULE: ./src/components/Graphs/ChartLegend/ChartLegend.tsx
@@ -111847,11 +111847,11 @@ var ChartLegendRow = function (_a) {
111847
111847
 
111848
111848
 
111849
111849
  var ChartLegend = function (_a) {
111850
- var data = _a.data, emptySummaryColor = _a.emptySummaryColor, hasSummaryRow = _a.hasSummaryRow, summaryLabel = _a.summaryLabel, theme = _a.theme;
111850
+ var data = _a.data, emptySummaryColor = _a.emptySummaryColor, hasSummaryRow = _a.hasSummaryRow, _b = _a.showValue, showValue = _b === void 0 ? true : _b, summaryLabel = _a.summaryLabel, theme = _a.theme;
111851
111851
  var sum = data.map(function (item) { return item.value; }).reduce(function (prev, curr) { return prev + curr; }, 0);
111852
111852
  return (external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement("div", { className: classBinder_cx('c-chartLegend', theme) },
111853
- data.map(function (entry, i) { return (external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement(ChartLegendRow, { key: i, color: entry.color, label: entry.label, percentage: entry.percentage, value: entry.value })); }),
111854
- hasSummaryRow && (external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement(ChartLegendRow, { hasSeparationLine: true, emptySummaryColor: emptySummaryColor, label: summaryLabel, value: sum }))));
111853
+ data.map(function (entry, i) { return (external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement(ChartLegendRow, { key: i, color: entry.color, label: entry.label, percentage: entry.percentage, showValue: showValue, unitAfter: entry.unitAfter, value: entry.value })); }),
111854
+ hasSummaryRow && (external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement(ChartLegendRow, { hasSeparationLine: true, emptySummaryColor: emptySummaryColor, label: summaryLabel, showValue: showValue, value: sum }))));
111855
111855
  };
111856
111856
 
111857
111857
  // CONCATENATED MODULE: ./src/components/Graphs/ChartLegend/index.ts
@@ -9,13 +9,16 @@ export interface ChartLegendPropsType extends ComponentPropsType {
9
9
  hasSummaryRow?: boolean;
10
10
  /** The label of the summary row (default is 'Celkem') */
11
11
  summaryLabel?: string;
12
+ /** Show value from data for every row (default is 'true') */
13
+ showValue?: boolean;
12
14
  }
13
15
  interface Data {
14
16
  label: string;
15
17
  value: number;
16
18
  color: ColorType;
17
19
  percentage?: string;
20
+ unitAfter?: string;
18
21
  }
19
- export declare const ChartLegend: ({ data, emptySummaryColor, hasSummaryRow, summaryLabel, theme }: ChartLegendPropsType) => JSX.Element;
22
+ export declare const ChartLegend: ({ data, emptySummaryColor, hasSummaryRow, showValue, summaryLabel, theme }: ChartLegendPropsType) => JSX.Element;
20
23
  export {};
21
24
  //# sourceMappingURL=ChartLegend.d.ts.map
@@ -5,8 +5,9 @@ export interface ChartLegendRowPropsType extends ComponentPropsType {
5
5
  label?: string;
6
6
  percentage?: string;
7
7
  hasSeparationLine?: boolean;
8
+ showValue: boolean;
8
9
  unitAfter?: string;
9
10
  value: number;
10
11
  }
11
- export declare const ChartLegendRow: ({ color, emptySummaryColor, hasSeparationLine, label, percentage, unitAfter, value }: ChartLegendRowPropsType) => JSX.Element;
12
+ export declare const ChartLegendRow: ({ color, emptySummaryColor, hasSeparationLine, label, percentage, showValue, unitAfter, value }: ChartLegendRowPropsType) => JSX.Element;
12
13
  //# sourceMappingURL=ChartLegendRow.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mmb-digital/ds-lilly",
3
- "version": "0.8.4",
3
+ "version": "0.8.5",
4
4
  "description": "MMB LILLY design system",
5
5
  "license": "UNLICENSED",
6
6
  "sideEffects": false,
package/dist/.DS_Store DELETED
Binary file