Skip to content

Commit 490b761

Browse files
committedSep 11, 2021
feat(polar-axes): init package
1 parent 6144dbb commit 490b761

17 files changed

+78
-4
lines changed
 

‎packages/polar-axes/LICENSE.md

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
Copyright (c) Raphaël Benitte
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy of
4+
this software and associated documentation files (the "Software"), to deal in
5+
the Software without restriction, including without limitation the rights to
6+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
7+
of the Software, and to permit persons to whom the Software is furnished to do
8+
so, subject to the following conditions:
9+
10+
The above copyright notice and this permission notice shall be included in all
11+
copies or substantial portions of the Software.
12+
13+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19+
SOFTWARE.

‎packages/polar-axes/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# `@nivo/polar-axes`

‎packages/polar-axes/package.json

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
{
2+
"name": "@nivo/polar-axes",
3+
"version": "0.73.0",
4+
"license": "MIT",
5+
"author": {
6+
"name": "Raphaël Benitte",
7+
"url": "https://github.com/plouc"
8+
},
9+
"repository": {
10+
"type": "git",
11+
"url": "https://github.com/plouc/nivo.git",
12+
"directory": "packages/polar-axes"
13+
},
14+
"keywords": [
15+
"nivo",
16+
"dataviz",
17+
"react",
18+
"axes",
19+
"polar"
20+
],
21+
"main": "./dist/nivo-polar-axes.cjs.js",
22+
"module": "./dist/nivo-polar-axes.es.js",
23+
"typings": "./dist/types/index.d.ts",
24+
"files": [
25+
"README.md",
26+
"LICENSE.md",
27+
"dist/",
28+
"!dist/tsconfig.tsbuildinfo"
29+
],
30+
"dependencies": {
31+
"@nivo/arcs": "0.73.0",
32+
"@react-spring/web": "9.2.4",
33+
"d3-scale": "^3.2.3"
34+
},
35+
"devDependencies": {
36+
"@nivo/core": "0.73.0"
37+
},
38+
"peerDependencies": {
39+
"@nivo/core": "0.73.0",
40+
"react": ">= 16.14.0 < 18.0.0"
41+
},
42+
"publishConfig": {
43+
"access": "public"
44+
}
45+
}
File renamed without changes.
File renamed without changes.

‎packages/polar-axes/tsconfig.json

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"extends": "../../tsconfig.types.json",
3+
"compilerOptions": {
4+
"outDir": "./dist/types",
5+
"rootDir": "./src"
6+
},
7+
"include": ["src/**/*"]
8+
}

‎packages/radial-bar/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
"@nivo/arcs": "0.73.0",
3333
"@nivo/colors": "0.73.0",
3434
"@nivo/legends": "0.73.0",
35+
"@nivo/polar-axes": "0.73.0",
3536
"@nivo/tooltip": "0.73.0",
3637
"@react-spring/web": "9.2.4",
3738
"d3-scale": "^3.2.3",

‎packages/radial-bar/src/RadialBar.tsx

+2-3
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,12 @@ import { createElement, Fragment, ReactNode } from 'react'
22
import { Container, useDimensions, SvgWrapper, clampArc } from '@nivo/core'
33
import { ArcLabelsLayer } from '@nivo/arcs'
44
import { BoxLegendSvg } from '@nivo/legends'
5+
import { PolarGrid, RadialAxis, CircularAxis } from '@nivo/polar-axes'
56
import { RadialBarLayerId, RadialBarSvgProps, ComputedBar, RadialBarDatum } from './types'
67
import { svgDefaultProps } from './props'
78
import { useRadialBar } from './hooks'
89
import { RadialBarArcs } from './RadialBarArcs'
9-
import { PolarGrid, RadialAxis, CircularAxis } from './polar-axes'
1010
import { RadialBarTracks } from './RadialBarTracks'
11-
import { defaultProps } from '@nivo/pie'
1211

1312
type InnerRadialBarProps<D extends RadialBarDatum = RadialBarDatum> = Omit<
1413
RadialBarSvgProps<D>,
@@ -21,7 +20,7 @@ const InnerRadialBar = <D extends RadialBarDatum>({
2120
valueFormat,
2221
startAngle: originalStartAngle = svgDefaultProps.startAngle,
2322
endAngle: originalEndAngle = svgDefaultProps.endAngle,
24-
innerRadius: innerRadiusRatio = defaultProps.innerRadius,
23+
innerRadius: innerRadiusRatio = svgDefaultProps.innerRadius,
2524
padding = svgDefaultProps.padding,
2625
padAngle = svgDefaultProps.padAngle,
2726
cornerRadius = svgDefaultProps.cornerRadius,

‎packages/radial-bar/src/types.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import {
1111
import { Arc, ArcGenerator, ArcLabelsProps, ArcTransitionMode } from '@nivo/arcs'
1212
import { InheritedColorConfig, OrdinalColorScaleConfig } from '@nivo/colors'
1313
import { LegendProps } from '@nivo/legends'
14-
import { RadialAxisConfig, CircularAxisConfig } from './polar-axes'
14+
import { RadialAxisConfig, CircularAxisConfig } from '@nivo/polar-axes'
1515

1616
export interface RadialBarDatum {
1717
x: string

‎tsconfig.monorepo.json

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
{ "path": "./packages/annotations" },
99
{ "path": "./packages/scales" },
1010
{ "path": "./packages/axes" },
11+
{ "path": "./packages/polar-axes" },
1112
{ "path": "./packages/colors" },
1213
{ "path": "./packages/legends" },
1314
{ "path": "./packages/tooltip" },

0 commit comments

Comments
 (0)
Please sign in to comment.