Skip to content

Commit afe7f4d

Browse files
authored
Merge pull request #65 from rcpch/gradient-labels
Fixes gradient labels
2 parents eac54e2 + fd6c7be commit afe7f4d

File tree

160 files changed

+94076
-346272
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

160 files changed

+94076
-346272
lines changed

.DS_Store

-6 KB
Binary file not shown.

.babelrc.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"sourceType": "unambiguous",
3+
"presets": [
4+
[
5+
"@babel/preset-env",
6+
{
7+
"targets": {
8+
"chrome": 100
9+
}
10+
}
11+
],
12+
"@babel/preset-typescript",
13+
"@babel/preset-react"
14+
],
15+
"plugins": []
16+
}

.eslintrc.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,12 @@ module.exports = {
1717
}
1818
},
1919
extends: [
20-
"plugin:react/recommended", // Uses the recommended rules from @eslint-plugin-react
21-
'airbnb-typescript',
22-
"plugin:@typescript-eslint/recommended", // Uses the recommended rules from the @typescript-eslint/eslint-plugin
23-
"prettier/@typescript-eslint", // Uses eslint-config-prettier to disable ESLint rules from @typescript-eslint/eslint-plugin that would conflict with prettier
24-
"plugin:prettier/recommended" // Enables eslint-plugin-prettier and eslint-config-prettier. This will display prettier errors as ESLint errors. Make sure this is always the last configuration in the extends array.
20+
"plugin:react/recommended",
21+
"airbnb-typescript",
22+
"plugin:@typescript-eslint/recommended",
23+
"prettier/@typescript-eslint",
24+
"plugin:prettier/recommended",
25+
"plugin:storybook/recommended"
2526
],
2627
rules: {
2728
// Place to specify ESLint rules. Can be used to overwrite rules specified from the extended configs

.github/workflows/main.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ jobs:
1212
runs-on: ubuntu-latest
1313
steps:
1414
# Checkout the code
15-
- uses: actions/checkout@v3
16-
# Setup node with version 16.x and NPM registry url
17-
- uses: actions/setup-node@v3
15+
- uses: actions/checkout@v4
16+
# Setup node with version 20.x and NPM registry url
17+
- uses: actions/setup-node@v4
1818
with:
19-
node-version: "16.x"
19+
node-version: "20.x"
2020
registry-url: "https://registry.npmjs.org"
2121
# Run npm install to install project packages
2222
- run: npm install

.storybook/main.ts

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
import type { StorybookConfig } from '@storybook/react-webpack5';
2+
3+
const config: StorybookConfig = {
4+
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
5+
staticDirs: ['../src/images', '../src/fonts'],
6+
addons: [
7+
'@storybook/addon-links',
8+
'@storybook/addon-essentials',
9+
'@storybook/addon-onboarding',
10+
'@storybook/addon-interactions',
11+
'@storybook/addon-mdx-gfm',
12+
'@storybook/addon-webpack5-compiler-babel',
13+
{
14+
name: '@storybook/addon-styling-webpack',
15+
options: {
16+
rules: [
17+
// Replaces existing CSS rules with given rule
18+
{
19+
test: /\.css$/,
20+
use: [
21+
'style-loader',
22+
'css-loader',
23+
{
24+
loader: "sass-loader",
25+
options: { implementation: require.resolve("sass") }
26+
},
27+
],
28+
}
29+
]
30+
}
31+
}
32+
],
33+
framework: {
34+
name: '@storybook/react-webpack5',
35+
options: {},
36+
},
37+
docs: {
38+
autodocs: 'tag',
39+
}
40+
};
41+
export default config;

.storybook/preview.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import type { Preview } from '@storybook/react';
2+
3+
const preview: Preview = {
4+
parameters: {
5+
actions: { argTypesRegex: '^on[A-Z].*' },
6+
controls: {
7+
matchers: {
8+
color: /(background|color)$/i,
9+
date: /Date$/,
10+
},
11+
},
12+
},
13+
};
14+
15+
export default preview;

.vscode/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"editor.codeActionsOnSave": {
3-
"source.fixAll": true
3+
"source.fixAll": "explicit"
44
},
55
"git.enableCommitSigning": true
66
}

CSSStub.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = {};

deploy.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,5 @@ If this is a release
99
2. npm publish --access public
1010

1111
note npm version patch | npm version minor | npm version major from the command line can bump the version
12-
DON'T forget to update the version in RCPCChart.tsx
12+
13+
So long as the version has been bumped, publishing should happen on creation of a new release on Github

fileTransformer.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
const path = require("path");
2+
3+
module.exports = {
4+
process(sourceText, sourcePath, options) {
5+
return {
6+
code: `module.exports = ${JSON.stringify(path.basename(sourcePath))};`,
7+
};
8+
},
9+
};

jest.config.js

Lines changed: 0 additions & 16 deletions
This file was deleted.

jest.config.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import type {Config} from 'jest';
2+
3+
const config: Config = {
4+
preset: 'ts-jest',
5+
verbose: true,
6+
moduleFileExtensions: ["js", "jsx", "ts", "tsx"],
7+
moduleDirectories: ["node_modules", "src"],
8+
transform: {
9+
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$':
10+
'<rootDir>/fileTransformer.js',
11+
},
12+
moduleNameMapper:{
13+
"\\.(css|less|sass|scss)$": '<rootDir>/CSSStub.js'
14+
}
15+
};
16+
17+
export default config;

jest.setup.ts

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)