@synerise/ds-progress-bar 1.1.7 → 1.1.8

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/README.md CHANGED
@@ -27,23 +27,22 @@ Progress-Bar UI Component
27
27
  ### ProgressTiles
28
28
 
29
29
  | Property | Description | Type | Default |
30
- |-----------|---------------------------------------------------------|-----------|---------|
30
+ | --------- | ------------------------------------------------------- | --------- | ------- |
31
31
  | tileWidth | width of each tile (with unit) | string | - |
32
32
  | colors | Array of colors for each tile - defines number of tiles | string[] | - |
33
33
  | percent | Value of progress to display colored | number | - |
34
34
  | label | Optional label above progress bar | ReactNode | - |
35
35
 
36
-
37
36
  ### Multivalue
38
37
 
39
38
  | Property | Description | Type | Default |
40
- |-------------|-----------------------------------------------------------------------------|-----------------|---------|
39
+ | ----------- | --------------------------------------------------------------------------- | --------------- | ------- |
41
40
  | values | Values for each bar | ProgressValue[] | - |
42
41
  | stackedBars | Drives how bars are rendered - side by side or stacked on top of each other | boolean | true |
43
42
 
44
-
45
43
  ### ProgressValue
44
+
46
45
  | Property | Description | Type | Default |
47
- |----------|----------------------------------|--------|---------|
46
+ | -------- | -------------------------------- | ------ | ------- |
48
47
  | percent | Value to display (length of bar) | number | - |
49
48
  | color | Bar color | string | - |
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
- import { MultivalueProps } from './Multivalue.types';
2
+ import { type MultivalueProps } from './Multivalue.types';
3
3
  declare const Multivalue: ({ values, stackedBars, ...htmlAttributes }: MultivalueProps) => React.JSX.Element;
4
4
  export default Multivalue;
@@ -4,8 +4,12 @@ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t =
4
4
  import React, { useMemo } from 'react';
5
5
  import * as S from './MultiValue.styles';
6
6
  var normalizePercent = function normalizePercent(value) {
7
- if (value < 0) return 0;
8
- if (value > 100) return 100;
7
+ if (value < 0) {
8
+ return 0;
9
+ }
10
+ if (value > 100) {
11
+ return 100;
12
+ }
9
13
  return value;
10
14
  };
11
15
  var Multivalue = function Multivalue(_ref) {
@@ -22,7 +26,6 @@ var Multivalue = function Multivalue(_ref) {
22
26
  stackedBars: stackedBars
23
27
  }, htmlAttributes), finalValues.map(function (val, index) {
24
28
  return /*#__PURE__*/React.createElement(S.Multivalue, {
25
- // eslint-disable-next-line react/no-array-index-key
26
29
  key: val.color + "-" + val.percent + "-" + index,
27
30
  color: val.color,
28
31
  percent: normalizePercent(val.percent)
@@ -1,4 +1,4 @@
1
- import { WithHTMLAttributes } from '@synerise/ds-utils';
1
+ import { type WithHTMLAttributes } from '@synerise/ds-utils';
2
2
  export type MultivalueProps = WithHTMLAttributes<HTMLDivElement, {
3
3
  values: ProgressValue[];
4
4
  stackedBars?: boolean;
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
- import { ProgressProps } from './ProgressBar.types';
2
+ import { type ProgressProps } from './ProgressBar.types';
3
3
  declare const ProgressBar: ({ showLabel, description, amount, percent, type, status, strokeColor, strokeLinecap, className, thick, thin, labelFormatter, containerStyles, style, maxPercent, ...rest }: ProgressProps) => React.JSX.Element;
4
4
  export default ProgressBar;
@@ -1,5 +1,5 @@
1
- import styled from 'styled-components';
2
1
  import Progress from 'antd/lib/progress';
2
+ import styled from 'styled-components';
3
3
  export var Container = styled.div.withConfig({
4
4
  displayName: "ProgressBarstyles__Container",
5
5
  componentId: "sc-1gqovic-0"
@@ -1,6 +1,6 @@
1
- import type { ReactNode, CSSProperties } from 'react';
2
1
  import type { ProgressProps as AntProgressProps } from 'antd/lib/progress/progress';
3
- import { ExactlyOne, WithHTMLAttributes } from '@synerise/ds-utils';
2
+ import type { CSSProperties, ReactNode } from 'react';
3
+ import { type ExactlyOne, type WithHTMLAttributes } from '@synerise/ds-utils';
4
4
  export type ProgressProps = WithHTMLAttributes<HTMLDivElement, Pick<AntProgressProps, 'percent' | 'type' | 'status' | 'strokeColor' | 'strokeLinecap'> & {
5
5
  amount?: number;
6
6
  showLabel?: boolean;
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
- import { ProgressTilesProps } from './ProgressTiles.types';
2
+ import { type ProgressTilesProps } from './ProgressTiles.types';
3
3
  export declare const ProgressTiles: ({ colors, label, tileWidth, percent, ...rest }: ProgressTilesProps) => React.JSX.Element;
4
4
  export default ProgressTiles;
@@ -1,5 +1,5 @@
1
- import { WithHTMLAttributes } from '@synerise/ds-utils';
2
1
  import type { ReactNode } from 'react';
2
+ import { type WithHTMLAttributes } from '@synerise/ds-utils';
3
3
  export type ProgressTilesProps = WithHTMLAttributes<HTMLDivElement, {
4
4
  tileWidth: string;
5
5
  colors: string[];
package/dist/index.d.ts CHANGED
@@ -2,5 +2,5 @@ export { default } from './ProgressBar';
2
2
  export { default as Multivalue } from './Multivalue/Multivalue';
3
3
  export { default as ProgressTiles } from './ProgressTiles/ProgressTiles';
4
4
  export type { ProgressProps } from './ProgressBar.types';
5
- export type { MultivalueProps, ProgressValue } from './Multivalue/Multivalue.types';
5
+ export type { MultivalueProps, ProgressValue, } from './Multivalue/Multivalue.types';
6
6
  export type { ProgressTilesProps } from './ProgressTiles/ProgressTiles.types';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synerise/ds-progress-bar",
3
- "version": "1.1.7",
3
+ "version": "1.1.8",
4
4
  "description": "Progress-Bar UI Component for the Synerise Design System",
5
5
  "license": "ISC",
6
6
  "repository": "Synerise/synerise-design",
@@ -34,8 +34,8 @@
34
34
  ],
35
35
  "types": "dist/index.d.ts",
36
36
  "dependencies": {
37
- "@synerise/ds-form-field": "^1.1.7",
38
- "@synerise/ds-utils": "^1.3.0"
37
+ "@synerise/ds-form-field": "^1.1.8",
38
+ "@synerise/ds-utils": "^1.3.1"
39
39
  },
40
40
  "peerDependencies": {
41
41
  "@synerise/ds-core": "*",
@@ -43,5 +43,5 @@
43
43
  "react": ">=16.9.0 <= 18.3.1",
44
44
  "styled-components": "^5.3.3"
45
45
  },
46
- "gitHead": "11fe1d29b2ac23e70c3d5e6ce8ae20201a619a34"
46
+ "gitHead": "4512641033ba3581a3df208143c547fcfed45895"
47
47
  }