ui-beyable 1.0.35-beta.3 → 1.0.35-beta.4

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.
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
2
  import { IKpiList, IKpiItem } from './types';
3
3
  declare function KpiList({ children }: IKpiList): JSX.Element;
4
- declare function KpiItem({ name, value, unit, variation, variationNbDecimal }: IKpiItem): JSX.Element;
4
+ declare function KpiItem({ name, value, unit, variation, variationNbDecimal, size }: IKpiItem): JSX.Element;
5
5
  export { KpiList, KpiItem };
@@ -8,5 +8,6 @@ interface IKpiItem {
8
8
  unit?: string;
9
9
  variation?: number;
10
10
  variationNbDecimal?: number;
11
+ size?: 'm' | 's';
11
12
  }
12
13
  export { IKpiList, IKpiItem };
package/lib/esm/index.js CHANGED
@@ -3015,8 +3015,16 @@ function KpiList(_a) {
3015
3015
  return (React.createElement("div", { className: styles$6.list }, children));
3016
3016
  }
3017
3017
  function KpiItem(_a) {
3018
- var name = _a.name, value = _a.value, unit = _a.unit, variation = _a.variation, _b = _a.variationNbDecimal, variationNbDecimal = _b === void 0 ? 1 : _b;
3019
- return (React.createElement("div", { className: styles$6.item },
3018
+ var name = _a.name, value = _a.value, unit = _a.unit, variation = _a.variation, _b = _a.variationNbDecimal, variationNbDecimal = _b === void 0 ? 1 : _b, _c = _a.size, size = _c === void 0 ? 'm' : _c;
3019
+ var className = [];
3020
+ var sizeClass = {
3021
+ m: styles$6.item_m,
3022
+ s: styles$6.item_s
3023
+ };
3024
+ if (size in sizeClass) {
3025
+ className.push(sizeClass[size]);
3026
+ }
3027
+ return (React.createElement("div", { className: className.join(' ') },
3020
3028
  React.createElement("div", { className: styles$6.item_title }, name),
3021
3029
  React.createElement("div", { className: styles$6.item_value },
3022
3030
  getFormattedNumber(value),