Skip to content

Commit

Permalink
Merge branch 'master' into tmeasday/add-options-to-story-store
Browse files Browse the repository at this point in the history
  • Loading branch information
Hypnosphi authored Mar 20, 2018
2 parents f654b4b + c8373ff commit 5a81b74
Show file tree
Hide file tree
Showing 236 changed files with 2,941 additions and 1,027 deletions.
21 changes: 21 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,21 @@ jobs:
- addons
- app
- lib
danger:
<<: *defaults
environment:
- TOKEN_HEAD: 49aa9a6549007391dfcef9c76fca32a73560fd8
steps:
- checkout
- restore_cache:
name: "Restore core dependencies cache"
keys:
- core-dependencies-{{ checksum "yarn.lock" }}
- run:
name: "Danger"
command: |
echo $DANGER_GITHUB_API_TOKEN
DANGER_GITHUB_API_TOKEN=${TOKEN_HEAD}3 yarn danger ci
example-kitchen-sinks:
<<: *defaults
steps:
Expand All @@ -57,6 +72,9 @@ jobs:
name: "Restore core dist cache"
keys:
- core-dist-{{ .Revision }}
- run:
name: Workaround for https://github.com/GoogleChrome/puppeteer/issues/290
command: sh ./scripts/workaround-puppeteer-issue-290.sh
- run:
name: "Build react kitchen-sink"
command: |
Expand Down Expand Up @@ -273,6 +291,9 @@ workflows:
build_accept_deploy:
jobs:
- build
- danger:
requires:
- build
- example-kitchen-sinks:
requires:
- build
Expand Down
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ module.exports = {
'no-underscore-dangle': [
error,
{
allow: ['__STORYBOOK_CLIENT_API__'],
allow: ['__STORYBOOK_CLIENT_API__', '__STORYBOOK_ADDONS_CHANNEL__'],
},
],
},
Expand Down
2 changes: 1 addition & 1 deletion .mailmap
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Aaron Mc Adam <aaron@aaronmcadam.com>
Aruna Herath <aruna@kadira.io> <arunabherath@gmail.com>
Arunoda Susiripala <arunoda.susiripala@gmail.com> Arunoda Susiripala <arunoda.susiripala@gmail.com>
Benedikt D Valdez <benediktvaldez@users.noreply.github.com> Benedikt D Valdez <benediktvaldez@users.noreply.github.com>
Daniel Duan <dduan@squarespace.com> <dduan@yahoo.com>
Daniel Duan <dduan@squarespace.com> <dduan@yahoo.com> # github:danielduan, npm:danielduan, twitter:danduan
Daniel James <daniel@thzinc.com> <djames@syncromatics.com>
Danny Andrews <danny-andrews@users.noreply.github.com> danny@ownlocal.com>
Dustin Kane <dkane@athenahealth.com> <dustinpkane@gmail.com>
Expand Down
465 changes: 455 additions & 10 deletions CHANGELOG.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[![Build Status on CircleCI](https://circleci.com/gh/storybooks/storybook.svg?style=shield)](https://circleci.com/gh/storybooks/storybook)
[![CodeFactor](https://www.codefactor.io/repository/github/storybooks/storybook/badge)](https://www.codefactor.io/repository/github/storybooks/storybook)
[![Known Vulnerabilities](https://snyk.io/test/github/storybooks/storybook/8f36abfd6697e58cd76df3526b52e4b9dc894847/badge.svg)](https://snyk.io/test/github/storybooks/storybook/8f36abfd6697e58cd76df3526b52e4b9dc894847)
[![Known Vulnerabilities](https://snyk.io/test/github/storybooks/storybook/badge.svg)](https://snyk.io/test/github/storybooks/storybook)
[![BCH compliance](https://bettercodehub.com/edge/badge/storybooks/storybook)](https://bettercodehub.com/results/storybooks/storybook) [![codecov](https://codecov.io/gh/storybooks/storybook/branch/master/graph/badge.svg)](https://codecov.io/gh/storybooks/storybook)
[![Storybook Slack](https://now-examples-slackin-rrirkqohko.now.sh/badge.svg)](https://now-examples-slackin-rrirkqohko.now.sh/)
[![Backers on Open Collective](https://opencollective.com/storybook/backers/badge.svg)](#backers) [![Sponsors on Open Collective](https://opencollective.com/storybook/sponsors/badge.svg)](#sponsors)
Expand Down
8 changes: 4 additions & 4 deletions addons/a11y/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/addon-a11y",
"version": "3.4.0-alpha.9",
"version": "3.4.0-rc.3",
"description": "a11y addon for storybook",
"keywords": [
"a11y",
Expand All @@ -25,15 +25,15 @@
"prepare": "node ../../scripts/prepare.js"
},
"dependencies": {
"@storybook/components": "^3.4.0-alpha.9",
"@storybook/components": "3.4.0-rc.3",
"axe-core": "^2.6.1",
"babel-runtime": "^6.26.0",
"glamor": "^2.20.40",
"glamorous": "^4.11.6",
"glamorous": "^4.12.1",
"prop-types": "^15.6.1"
},
"devDependencies": {
"@storybook/react": "^3.4.0-alpha.9",
"@storybook/react": "3.4.0-rc.3",
"faker": "^4.1.0"
},
"peerDependencies": {
Expand Down
6 changes: 3 additions & 3 deletions addons/actions/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/addon-actions",
"version": "3.4.0-alpha.9",
"version": "3.4.0-rc.3",
"description": "Action Logger addon for storybook",
"keywords": [
"storybook"
Expand All @@ -20,11 +20,11 @@
"prepare": "node ../../scripts/prepare.js"
},
"dependencies": {
"@storybook/components": "^3.4.0-alpha.9",
"@storybook/components": "3.4.0-rc.3",
"babel-runtime": "^6.26.0",
"deep-equal": "^1.0.1",
"glamor": "^2.20.40",
"glamorous": "^4.11.6",
"glamorous": "^4.12.1",
"global": "^4.3.2",
"make-error": "^1.3.4",
"prop-types": "^15.6.1",
Expand Down
1 change: 1 addition & 0 deletions addons/actions/src/lib/retrocycle.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import reviver from './reviver';
import { muteProperty } from './util';
import { CYCLIC_KEY } from './';

// eslint-disable-next-line no-control-regex
const pathReg = /^\$(?:\[(?:\d+|"(?:[^\\"\u0000-\u001f]|\\([\\"/bfnrt]|u[0-9a-zA-Z]{4}))*")])*$/;

export default function retrocycle(json) {
Expand Down
2 changes: 1 addition & 1 deletion addons/background/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/addon-backgrounds",
"version": "3.4.0-alpha.9",
"version": "3.4.0-rc.3",
"description": "A storybook addon to show different backgrounds for your preview",
"keywords": [
"addon",
Expand Down
1 change: 1 addition & 0 deletions addons/background/src/BackgroundPanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ export default class BackgroundPanel extends Component {
this.channel.on('background-unset', () => {
this.setState({ backgrounds: [] });
api.setQueryParams({ background: null });
this.updateIframe('none');
});
}

Expand Down
2 changes: 1 addition & 1 deletion addons/centered/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/addon-centered",
"version": "3.4.0-alpha.9",
"version": "3.4.0-rc.3",
"description": "Storybook decorator to center components",
"license": "MIT",
"author": "Muhammed Thanish <mnmtanish@gmail.com>",
Expand Down
2 changes: 1 addition & 1 deletion addons/events/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/addon-events",
"version": "3.4.0-alpha.9",
"version": "3.4.0-rc.3",
"description": "Add events to your Storybook stories.",
"keywords": [
"addon",
Expand Down
6 changes: 3 additions & 3 deletions addons/graphql/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/addon-graphql",
"version": "3.4.0-alpha.9",
"version": "3.4.0-rc.3",
"description": "Storybook addon to display the GraphiQL IDE",
"keywords": [
"storybook"
Expand All @@ -25,11 +25,11 @@
"babel-runtime": "^6.26.0",
"global": "^4.3.2",
"graphiql": "^0.11.11",
"graphql": "^0.13.1",
"graphql": "^0.13.2",
"prop-types": "^15.6.1"
},
"devDependencies": {
"@storybook/react": "^3.4.0-alpha.9"
"@storybook/react": "3.4.0-rc.3"
},
"peerDependencies": {
"react": "*"
Expand Down
12 changes: 6 additions & 6 deletions addons/info/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/addon-info",
"version": "3.4.0-alpha.9",
"version": "3.4.0-rc.3",
"description": "A Storybook addon to show additional information for your stories.",
"license": "MIT",
"main": "dist/index.js",
Expand All @@ -15,11 +15,11 @@
"storybook": "start-storybook -p 9010"
},
"dependencies": {
"@storybook/client-logger": "^3.4.0-alpha.9",
"@storybook/components": "^3.4.0-alpha.9",
"@storybook/client-logger": "3.4.0-rc.3",
"@storybook/components": "3.4.0-rc.3",
"babel-runtime": "^6.26.0",
"glamor": "^2.20.40",
"glamorous": "^4.11.6",
"glamorous": "^4.12.1",
"global": "^4.3.2",
"marksy": "^6.0.3",
"nested-object-assign": "^1.0.1",
Expand All @@ -28,8 +28,8 @@
"util-deprecate": "^1.0.2"
},
"devDependencies": {
"@storybook/addon-actions": "^3.4.0-alpha.9",
"@storybook/react": "^3.4.0-alpha.9",
"@storybook/addon-actions": "3.4.0-rc.3",
"@storybook/react": "3.4.0-rc.3",
"react-test-renderer": "^16.1.0"
},
"peerDependencies": {
Expand Down
6 changes: 3 additions & 3 deletions addons/jest/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/addon-jest",
"version": "3.4.0-alpha.9",
"version": "3.4.0-rc.3",
"description": "React storybook addon that show component jest report",
"keywords": [
"addon",
Expand All @@ -25,10 +25,10 @@
"prepare": "node ../../scripts/prepare.js"
},
"dependencies": {
"@storybook/components": "^3.4.0-alpha.9",
"@storybook/components": "3.4.0-rc.3",
"babel-runtime": "^6.26.0",
"glamor": "^2.20.40",
"glamorous": "^4.11.6",
"glamorous": "^4.12.1",
"global": "^4.3.2",
"prop-types": "^15.6.1"
},
Expand Down
14 changes: 7 additions & 7 deletions addons/knobs/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/addon-knobs",
"version": "3.4.0-alpha.9",
"version": "3.4.0-rc.3",
"description": "Storybook Addon Prop Editor Component",
"license": "MIT",
"main": "dist/index.js",
Expand All @@ -15,24 +15,24 @@
"storybook": "start-storybook -p 9010"
},
"dependencies": {
"@storybook/components": "^3.4.0-alpha.9",
"@storybook/components": "3.4.0-rc.3",
"babel-runtime": "^6.26.0",
"deep-equal": "^1.0.1",
"global": "^4.3.2",
"insert-css": "^2.0.0",
"lodash.debounce": "^4.0.8",
"moment": "^2.20.1",
"moment": "^2.21.0",
"prop-types": "^15.6.1",
"react-color": "^2.11.4",
"react-color": "^2.14.0",
"react-datetime": "^2.14.0",
"react-textarea-autosize": "^5.2.1",
"util-deprecate": "^1.0.2"
},
"devDependencies": {
"@storybook/react": "^3.4.0-alpha.9",
"@storybook/react": "3.4.0-rc.3",
"raw-loader": "^0.5.1",
"style-loader": "^0.20.2",
"vue": "^2.5.13"
"style-loader": "^0.20.3",
"vue": "^2.5.16"
},
"peerDependencies": {
"@storybook/addons": "^3.3.0",
Expand Down
70 changes: 45 additions & 25 deletions addons/knobs/src/components/types/Number.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,33 @@ import PropTypes from 'prop-types';
import React from 'react';

const styles = {
display: 'table-cell',
boxSizing: 'border-box',
verticalAlign: 'middle',
height: '25px',
width: '100%',
outline: 'none',
border: '1px solid #f7f4f4',
borderRadius: 2,
fontSize: 11,
padding: '5px',
color: '#444',
common: {
boxSizing: 'border-box',
height: '25px',
outline: 'none',
border: '1px solid #f7f4f4',
borderRadius: 2,
fontSize: 11,
padding: '5px',
color: '#444',
},
normal: {
display: 'table-cell',
width: '100%',
verticalAlign: 'middle',
},
range: {
flexGrow: 1,
},
rangeLabel: {
paddingLeft: 5,
paddingRight: 5,
},
rangeWrapper: {
display: 'flex',
alignItems: 'center',
width: '100%',
},
};

class NumberType extends React.Component {
Expand All @@ -31,7 +47,7 @@ class NumberType extends React.Component {
ref={c => {
this.input = c;
}}
style={styles}
style={{ ...styles.common, ...styles.normal }}
value={knob.value}
type="number"
min={knob.min}
Expand All @@ -46,19 +62,23 @@ class NumberType extends React.Component {
const { knob, onChange } = this.props;

return (
<input
id={knob.name}
ref={c => {
this.input = c;
}}
style={styles}
value={knob.value}
type="range"
min={knob.min}
max={knob.max}
step={knob.step}
onChange={() => onChange(parseFloat(this.input.value))}
/>
<div style={styles.rangeWrapper}>
<span style={styles.rangeLabel}>{knob.min}</span>
<input
id={knob.name}
ref={c => {
this.input = c;
}}
style={{ ...styles.common, ...styles.range }}
value={knob.value}
type="range"
min={knob.min}
max={knob.max}
step={knob.step}
onChange={() => onChange(parseFloat(this.input.value))}
/>
<span style={styles.rangeLabel}>{`${knob.value} / ${knob.max}`}</span>
</div>
);
}

Expand Down
6 changes: 3 additions & 3 deletions addons/links/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/addon-links",
"version": "3.4.0-alpha.9",
"version": "3.4.0-rc.3",
"description": "Story Links addon for storybook",
"keywords": [
"storybook"
Expand All @@ -22,13 +22,13 @@
"storybook": "start-storybook -p 9001"
},
"dependencies": {
"@storybook/components": "^3.4.0-alpha.9",
"@storybook/components": "3.4.0-rc.3",
"babel-runtime": "^6.26.0",
"global": "^4.3.2",
"prop-types": "^15.6.1"
},
"devDependencies": {
"@storybook/react": "^3.4.0-alpha.9",
"@storybook/react": "3.4.0-rc.3",
"enzyme": "^3.3.0",
"react": "^16.1.0",
"react-dom": "^16.1.0"
Expand Down
Loading

0 comments on commit 5a81b74

Please sign in to comment.