Skip to content
This repository was archived by the owner on Jan 9, 2023. It is now read-only.

Commit 4d31700

Browse files
authored
Merge branch 'master' into bug/calloutSCSS
2 parents 1f1da5c + 628efeb commit 4d31700

11 files changed

Lines changed: 126 additions & 107 deletions

File tree

.storybook/addons.js

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

.storybook/config.js

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

.storybook/main.js

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
var path = require('path');
2+
module.exports = {
3+
"stories": [
4+
"../stories/**/*.stories.mdx",
5+
"../stories/**/*.stories.@(js|jsx|ts|tsx)"
6+
],
7+
"addons": [
8+
"@storybook/addon-links",
9+
"@storybook/addon-essentials"
10+
],
11+
"typescript": {
12+
check: true,
13+
checkOptions: {
14+
tsconfig: path.resolve(__dirname, '../stories/tsconfig.json'),//We want to change this when https://github.com/storybookjs/storybook/issues/11804 is merged.
15+
compilerOptions : {
16+
17+
}
18+
},
19+
reactDocgen: 'react-docgen-typescript',
20+
reactDocgenTypescriptOptions: {
21+
shouldExtractLiteralValuesFromEnum: true,
22+
propFilter: (prop) => (prop.parent ? !/node_modules/.test(prop.parent.fileName) : true),
23+
},
24+
},
25+
"webpackFinal": async (config, { configType }) => {
26+
// `configType` has a value of 'DEVELOPMENT' or 'PRODUCTION'
27+
// You can change the configuration based on that.
28+
// 'PRODUCTION' is used when building the static version of storybook.
29+
30+
// Make whatever fine-grained changes you need
31+
config.module.rules.push({
32+
test: /\.s[ac]ss$/i,
33+
use: [
34+
// Creates `style` nodes from JS strings
35+
'style-loader',
36+
// Translates CSS into CommonJS
37+
'css-loader',
38+
// Compiles Sass to CSS
39+
'sass-loader',
40+
],
41+
});
42+
43+
// Return the altered config
44+
return config;
45+
},
46+
}

.storybook/manager.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import { addons } from '@storybook/addons';
2+
import theme from './theme';
3+
4+
addons.setConfig({
5+
theme: theme,
6+
showPanel: false,
7+
isFullscreen: false,
8+
isToolshown: true,
9+
});

.storybook/preview.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import theme from './theme';
2+
import { addDecorator } from '@storybook/react';
3+
4+
export const parameters = {
5+
actions: { argTypesRegex: "^on[A-Z].*" },
6+
docs: {
7+
theme: theme
8+
},
9+
options: {
10+
storySort: {
11+
order: ['Welcome'],
12+
},
13+
}
14+
}

.storybook/theme.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import { create } from '@storybook/theming'
2+
export default create({
3+
base: 'light',
4+
brandTitle: `HospitalRun Components`,
5+
brandUrl: 'https://github.com/HospitalRun/components',
6+
brandImage:
7+
'https://raw.githubusercontent.com/HospitalRun/design/master/logo/horizontal/logo-on-transparent.png',
8+
fontBase: '"Open Sans", sans-serif',
9+
fontCode: 'monospace',
10+
})

.storybook/webpack.config.js

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

CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
# [2.0.0](https://github.com/HospitalRun/components/compare/v1.16.1...v2.0.0) (2020-09-07)
2+
3+
4+
### Features
5+
6+
* 🎸 Adds addon-docs ([1bbf623](https://github.com/HospitalRun/components/commit/1bbf623597d74cfb80598d476be81b3418e47836))
7+
8+
9+
### BREAKING CHANGES
10+
11+
* 🧨 addon-info is replaced by addon-docs.
12+
13+
✅ Closes: 531
14+
115
## [1.16.1](https://github.com/HospitalRun/components/compare/v1.16.0...v1.16.1) (2020-08-02)
216

317

package.json

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@hospitalrun/components",
3-
"version": "1.16.1",
3+
"version": "2.0.0",
44
"license": "MIT",
55
"funding": {
66
"type": "opencollective",
@@ -28,11 +28,11 @@
2828
"lint": "eslint \"src/**/*.{js,jsx,ts,tsx}\" \"test/**/*.{js,jsx,ts,tsx}\" \"stories/**/*.{js,jsx,ts,tsx}\"",
2929
"lint:fix": "eslint \"src/**/*.{js,jsx,ts,tsx}\" \"test/**/*.{js,jsx,ts,tsx}\" \"stories/**/*.{js,jsx,ts,tsx}\" --fix",
3030
"coveralls": "cross-env CI=true tsdx test --coverage --coverageReporters=text-lcov > lcov.info",
31-
"storybook": "start-storybook -p 6006",
32-
"build-storybook": "build-storybook -c .storybook",
3331
"semantic-release": "semantic-release",
3432
"lint-staged": "lint-staged",
35-
"commitlint": "commitlint"
33+
"commitlint": "commitlint",
34+
"storybook": "start-storybook -p 6006",
35+
"build-storybook": "build-storybook -c .storybook"
3636
},
3737
"peerDependencies": {
3838
"bootstrap": "~4.5.0",
@@ -69,15 +69,13 @@
6969
"@semantic-release/changelog": "~5.0.0",
7070
"@semantic-release/commit-analyzer": "~8.0.1",
7171
"@semantic-release/git": "~9.0.0",
72-
"@semantic-release/github": "~7.0.3",
72+
"@semantic-release/github": "~7.1.1",
7373
"@semantic-release/npm": "~7.0.3",
7474
"@semantic-release/release-notes-generator": "~9.0.0",
75-
"@storybook/addon-actions": "~6.0.2",
76-
"@storybook/addon-info": "~5.3.0",
77-
"@storybook/addon-links": "~6.0.2",
78-
"@storybook/addons": "~6.0.2",
79-
"@storybook/react": "~5.3.0",
80-
"@storybook/theming": "~6.0.2",
75+
"@storybook/addon-actions": "~6.0.21",
76+
"@storybook/addon-essentials": "~6.0.21",
77+
"@storybook/addon-links": "~6.0.21",
78+
"@storybook/react": "~6.0.21",
8179
"@types/chart.js": "~2.9.7",
8280
"@types/enzyme": "~3.10.3",
8381
"@types/jest": "~26.0.0",
@@ -87,9 +85,8 @@
8785
"@types/react-dom": "~16.9.1",
8886
"@types/react-table": "~7.0.4",
8987
"@types/sinon": "~9.0.0",
90-
"@types/storybook__addon-info": "~5.2.0",
9188
"@types/tinymce": "~4.5.23",
92-
"@typescript-eslint/eslint-plugin": "~3.10.0",
89+
"@typescript-eslint/eslint-plugin": "~4.0.0",
9390
"@typescript-eslint/parser": "~3.10.0",
9491
"autoprefixer": "~9.8.0",
9592
"awesome-typescript-loader": "~5.2.1",
@@ -103,25 +100,26 @@
103100
"cz-conventional-changelog": "~3.3.0",
104101
"enzyme": "~3.11.0",
105102
"enzyme-adapter-react-16": "~1.15.2",
106-
"eslint": "~7.7.0",
103+
"eslint": "~7.8.0",
107104
"eslint-config-airbnb": "~18.2.0",
108105
"eslint-config-prettier": "~6.11.0",
109106
"eslint-plugin-import": "~2.22.0",
110-
"eslint-plugin-jest": "~23.20.0",
107+
"eslint-plugin-jest": "~24.0.0",
111108
"eslint-plugin-jsx-a11y": "~6.3.0",
112109
"eslint-plugin-prettier": "~3.1.1",
113110
"eslint-plugin-react": "~7.20.0",
114-
"eslint-plugin-react-hooks": "~4.0.1",
115-
"husky": "~4.2.0",
111+
"eslint-plugin-react-hooks": "~4.1.0",
112+
"husky": "~4.3.0",
116113
"jest-canvas-mock": "~2.2.0",
117-
"lint-staged": "~10.2.0",
114+
"lint-staged": "~10.3.0",
118115
"node-sass": "~4.14.1",
119116
"prettier": "~2.1.0",
120117
"react": "~16.13.0",
121118
"react-bootstrap": "~1.0.0-beta.16",
122119
"react-docgen": "~5.3.0",
123120
"react-docgen-typescript-loader": "~3.7.0",
124121
"react-dom": "~16.13.0",
122+
"react-is": "~16.13.1",
125123
"rollup-plugin-postcss": "~3.1.1",
126124
"sass-loader": "~10.0.0",
127125
"semantic-release": "~17.1.0",
@@ -154,7 +152,7 @@
154152
"react-bootstrap-typeahead": "^4.2.3",
155153
"react-datepicker": "~3.1.3",
156154
"react-spinners": "~0.9.0",
157-
"react-table": "~7.3.0",
155+
"react-table": "~7.5.0",
158156
"react-toastify": "~5.5.0",
159157
"tinymce": "~5.4.0",
160158
"video-react": "~0.14.1"

stories/welcome.stories.mdx

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import { Meta } from '@storybook/addon-docs/blocks';
2+
3+
<Meta title="Welcome" />
4+
5+
<img src="https://raw.githubusercontent.com/HospitalRun/design/master/logo/horizontal/logo-on-transparent.png" alt="HospitalRun logo"/>
6+
7+
<div align="center">
8+
9+
[![NPM Version](https://badgen.net/npm/v/@hospitalrun/components)](https://www.npmjs.com/package/@hospitalrun/components) [![GitHub CI](https://github.com/HospitalRun/components/workflows/GitHub%20CI/badge.svg)](https://github.com/HospitalRun/components/actions) [![Coverage Status](https://coveralls.io/repos/github/HospitalRun/components/badge.svg?branch=master)](https://coveralls.io/github/HospitalRun/components?branch=master) [![Language grade: JavaScript](https://img.shields.io/lgtm/grade/javascript/g/HospitalRun/components.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/HospitalRun/components/context:javascript)
10+
[![Bundlephobia](https://badgen.net/bundlephobia/min/@hospitalrun/components)](https://bundlephobia.com/result?p=@hospitalrun/components)
11+
12+
</div>
13+
14+
This Storybook show reusable React components made for the HospitalRun frontend. It's a place for designers and developers alike to collaborate quickly. This library makes up the text inputs, labels, etc of HospitalRun Frontend.
15+
16+
<strong>For more information and instructions on how to use these React components <a href="https://github.com/HospitalRun/components/blob/master/README.md">see the Readme</a></strong>

0 commit comments

Comments
 (0)