@spscommerce/ds-react-charts 0.1.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/README.md +48 -0
- package/lib/bar/SpsBarChart.d.ts +23 -0
- package/lib/bar/SpsBarChart.examples.d.ts +2 -0
- package/lib/bar/SpsHorizontalBarChart.d.ts +24 -0
- package/lib/index.cjs.js +236 -0
- package/lib/index.d.ts +8 -0
- package/lib/index.es.js +20068 -0
- package/lib/lineChart/SpsLineChart.d.ts +35 -0
- package/lib/lineChart/SpsLineChart.examples.d.ts +2 -0
- package/lib/manifest.d.ts +2 -0
- package/lib/prop-types.d.ts +23 -0
- package/lib/setup-jest.d.ts +1 -0
- package/lib/stackedHorizontalBarChart/SpsStackedHorizontalBarChart.d.ts +29 -0
- package/lib/stackedHorizontalBarChart/SpsStackedHorizontalBarChart.examples.d.ts +2 -0
- package/package.json +58 -0
- package/vite.config.js +20 -0
package/README.md
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
[//]: # "START_AUTOGENERATED"
|
|
2
|
+
|
|
3
|
+
## [@spscommerce/ds-react-charts](https://github.com/spscommerce/ui-angular/tree/master/packages/@spscommerce/ds-react-charts#readme)
|
|
4
|
+
|
|
5
|
+

|
|
6
|
+

|
|
7
|
+

|
|
8
|
+
|
|
9
|
+
SPS Design System React components
|
|
10
|
+
|
|
11
|
+
### Installation
|
|
12
|
+
|
|
13
|
+
```shell
|
|
14
|
+
npm install --save @spscommerce/ds-react-charts
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
#### Peer Dependencies
|
|
18
|
+
|
|
19
|
+
<div class="row">
|
|
20
|
+
<div class="col-5">
|
|
21
|
+
<table class="sps-table">
|
|
22
|
+
<thead class="sps-table__head">
|
|
23
|
+
<tr class="sps-table__row">
|
|
24
|
+
<th class="sps-table__header">
|
|
25
|
+
<span class="sps-table__header-cell-body">
|
|
26
|
+
Package
|
|
27
|
+
</span>
|
|
28
|
+
</th>
|
|
29
|
+
<th class="sps-table__header text-right">
|
|
30
|
+
<span class="sps-table__header-cell-body">
|
|
31
|
+
Version
|
|
32
|
+
</span>
|
|
33
|
+
</th>
|
|
34
|
+
</tr>
|
|
35
|
+
</thead>
|
|
36
|
+
<tbody class="sps-table__body">
|
|
37
|
+
<tr class="sps-table__row"><td class="sps-table__cell"><a href="https://github.com/spscommerce/design-system/tree/main/packages/@spscommerce/ds-colors#readme">@spscommerce/ds-colors</a></td><td class="sps-table__cell text-right">^1.1.0</td></tr>
|
|
38
|
+
<tr class="sps-table__row"><td class="sps-table__cell"><a href="https://github.com/spscommerce/design-system/tree/main/packages/@spscommerce/utils#readme">@spscommerce/utils</a></td><td class="sps-table__cell text-right">^1.1.0</td></tr>
|
|
39
|
+
<tr class="sps-table__row"><td class="sps-table__cell"><a href="https://reactjs.org/">react</a></td><td class="sps-table__cell text-right">^16.9.0</td></tr>
|
|
40
|
+
</tbody>
|
|
41
|
+
</table>
|
|
42
|
+
</div>
|
|
43
|
+
<div class="col-7">
|
|
44
|
+
|
|
45
|
+
</div>
|
|
46
|
+
</div>
|
|
47
|
+
|
|
48
|
+
[//]: # "END_AUTOGENERATED"
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { ChartDataObject, ChartAxis } from "@spscommerce/ds-shared";
|
|
3
|
+
import * as PropTypes from "../prop-types";
|
|
4
|
+
declare const propTypes: {
|
|
5
|
+
barFillColor1: PropTypes.Requireable<string>;
|
|
6
|
+
barFillColor2: PropTypes.Requireable<string>;
|
|
7
|
+
barFillColorHover: PropTypes.Requireable<string>;
|
|
8
|
+
chartData: PropTypes.Requireable<ChartDataObject[]>;
|
|
9
|
+
chartHeight: PropTypes.Requireable<number>;
|
|
10
|
+
chartWidth: PropTypes.Requireable<number>;
|
|
11
|
+
barSize: PropTypes.Requireable<number>;
|
|
12
|
+
yAxis: PropTypes.Requireable<ChartAxis>;
|
|
13
|
+
xAxis: PropTypes.Requireable<ChartAxis>;
|
|
14
|
+
yMaxValue: PropTypes.Requireable<number>;
|
|
15
|
+
yTickFormat: PropTypes.Requireable<(i: number) => string>;
|
|
16
|
+
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
17
|
+
className: PropTypes.Requireable<string>;
|
|
18
|
+
"data-testid": PropTypes.Requireable<string>;
|
|
19
|
+
unsafelyReplaceClassName: PropTypes.Requireable<string>;
|
|
20
|
+
};
|
|
21
|
+
export declare type SpsBarChartProps = PropTypes.InferTS<typeof propTypes, HTMLDivElement>;
|
|
22
|
+
export declare function SpsBarChart(props: SpsBarChartProps): JSX.Element;
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { ChartDataObject, ChartAxis } from "@spscommerce/ds-shared";
|
|
3
|
+
import * as PropTypes from "../prop-types";
|
|
4
|
+
declare const propTypes: {
|
|
5
|
+
barFillColor1: PropTypes.Requireable<string>;
|
|
6
|
+
barFillColor2: PropTypes.Requireable<string>;
|
|
7
|
+
barFillColorHover: PropTypes.Requireable<string>;
|
|
8
|
+
chartData: PropTypes.Requireable<ChartDataObject[]>;
|
|
9
|
+
chartHeight: PropTypes.Requireable<number>;
|
|
10
|
+
chartWidth: PropTypes.Requireable<number>;
|
|
11
|
+
barSize: PropTypes.Requireable<number>;
|
|
12
|
+
yAxis: PropTypes.Requireable<ChartAxis>;
|
|
13
|
+
xAxis: PropTypes.Requireable<ChartAxis>;
|
|
14
|
+
marginLeft: PropTypes.Requireable<number>;
|
|
15
|
+
xMaxValue: PropTypes.Requireable<number>;
|
|
16
|
+
xTickFormat: PropTypes.Requireable<(i: number) => string>;
|
|
17
|
+
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
18
|
+
className: PropTypes.Requireable<string>;
|
|
19
|
+
"data-testid": PropTypes.Requireable<string>;
|
|
20
|
+
unsafelyReplaceClassName: PropTypes.Requireable<string>;
|
|
21
|
+
};
|
|
22
|
+
export declare type SpsHorizontalBarChartProps = PropTypes.InferTS<typeof propTypes, HTMLDivElement>;
|
|
23
|
+
export declare function SpsHorizontalBarChart(props: SpsHorizontalBarChartProps): JSX.Element;
|
|
24
|
+
export {};
|