Socket
Socket
Sign inDemoInstall

@storybook/components

Package Overview
Dependencies
Maintainers
12
Versions
1903
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@storybook/components - npm Package Compare versions

Comparing version 4.0.0-alpha.7 to 4.0.0-alpha.8

dist/addon_panel/index.js

8

dist/form/button.js

@@ -11,5 +11,5 @@ 'use strict';

var _glamorous = require('glamorous');
var _reactEmotion = require('react-emotion');
var _glamorous2 = _interopRequireDefault(_glamorous);
var _reactEmotion2 = _interopRequireDefault(_reactEmotion);

@@ -20,3 +20,3 @@ var _theme = require('../theme');

exports.default = _glamorous2.default.button((0, _extends3.default)({}, _theme.baseFonts, {
exports.default = (0, _reactEmotion2.default)('button')((0, _extends3.default)({}, _theme.baseFonts, {
border: 'none',

@@ -42,2 +42,2 @@ boxShadow: '0 0 0 1px rgba(0, 0, 0, 0.2)',

}
})).withProps({ type: 'button' });
}));

@@ -7,9 +7,9 @@ 'use strict';

var _glamorous = require('glamorous');
var _reactEmotion = require('react-emotion');
var _glamorous2 = _interopRequireDefault(_glamorous);
var _reactEmotion2 = _interopRequireDefault(_reactEmotion);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
exports.default = _glamorous2.default.button({
exports.default = (0, _reactEmotion2.default)('button')({
border: '1px solid rgba(0, 0, 0, 0)',

@@ -16,0 +16,0 @@ font: 'inherit',

@@ -6,28 +6,14 @@ 'use strict';

});
exports.Header = exports.Layout = exports.AddonPanel = exports.Placeholder = exports.Button = exports.Th = exports.Td = exports.Table = exports.HighlightButton = exports.MenuLink = exports.RoutedLink = exports.themes = exports.monoFonts = exports.baseFonts = undefined;
var _theme = require('./theme');
var _RoutedLink = require('./navigation/RoutedLink');
Object.defineProperty(exports, 'baseFonts', {
enumerable: true,
get: function get() {
return _theme.baseFonts;
}
});
Object.defineProperty(exports, 'monoFonts', {
enumerable: true,
get: function get() {
return _theme.monoFonts;
}
});
var _routed_link = require('./navigation/routed_link');
Object.defineProperty(exports, 'RoutedLink', {
enumerable: true,
get: function get() {
return _interopRequireDefault(_routed_link).default;
return _interopRequireDefault(_RoutedLink).default;
}
});
var _menu_link = require('./navigation/menu_link');
var _MenuLink = require('./navigation/MenuLink');

@@ -37,3 +23,3 @@ Object.defineProperty(exports, 'MenuLink', {

get: function get() {
return _interopRequireDefault(_menu_link).default;
return _interopRequireDefault(_MenuLink).default;
}

@@ -65,3 +51,3 @@ });

get: function get() {
return _cell.td;
return _cell.Td;
}

@@ -72,3 +58,3 @@ });

get: function get() {
return _cell.th;
return _cell.Th;
}

@@ -86,2 +72,44 @@ });

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var _placeholder = require('./placeholder/placeholder');
Object.defineProperty(exports, 'Placeholder', {
enumerable: true,
get: function get() {
return _interopRequireDefault(_placeholder).default;
}
});
var _index = require('./addon_panel/index');
Object.defineProperty(exports, 'AddonPanel', {
enumerable: true,
get: function get() {
return _interopRequireDefault(_index).default;
}
});
var _index2 = require('./layout/index');
Object.defineProperty(exports, 'Layout', {
enumerable: true,
get: function get() {
return _interopRequireDefault(_index2).default;
}
});
var _header = require('./header/header');
Object.defineProperty(exports, 'Header', {
enumerable: true,
get: function get() {
return _interopRequireDefault(_header).default;
}
});
var _theme = require('./theme');
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
exports.baseFonts = _theme.baseFonts;
exports.monoFonts = _theme.monoFonts;
var themes = exports.themes = { normal: _theme.normal };

@@ -6,27 +6,21 @@ 'use strict';

});
exports.th = exports.td = undefined;
exports.Th = exports.Td = undefined;
var _glamorous = require('glamorous');
var _extends2 = require('babel-runtime/helpers/extends');
var _glamorous2 = _interopRequireDefault(_glamorous);
var _extends3 = _interopRequireDefault(_extends2);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var _reactEmotion = require('react-emotion');
var dynamicStyles = function dynamicStyles(props) {
var styles = [];
var _reactEmotion2 = _interopRequireDefault(_reactEmotion);
if (props.bordered) {
styles.push({
border: '1px solid #ccc'
});
}
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
if (props.code) {
styles.push({
whiteSpace: 'nowrap',
fontFamily: 'Monaco, Consolas, "Courier New", monospace'
});
}
return styles;
var dynamicStyles = function dynamicStyles(_ref) {
var bordered = _ref.bordered,
code = _ref.code;
return (0, _extends3.default)({}, bordered ? { border: '1px solid #ccc' } : {}, code ? {
whiteSpace: 'nowrap',
fontFamily: 'Monaco, Consolas, "Courier New", monospace'
} : {});
};

@@ -38,3 +32,6 @@

var td = exports.td = _glamorous2.default.td(styles, dynamicStyles);
var th = exports.th = _glamorous2.default.th(styles, dynamicStyles);
var Td = exports.Td = (0, _reactEmotion2.default)('td')(styles, dynamicStyles);
var Th = exports.Th = (0, _reactEmotion2.default)('th')(styles, dynamicStyles);
Td.displayName = 'Td';
Th.displayName = 'Th';

@@ -7,10 +7,14 @@ 'use strict';

var _glamorous = require('glamorous');
var _reactEmotion = require('react-emotion');
var _glamorous2 = _interopRequireDefault(_glamorous);
var _reactEmotion2 = _interopRequireDefault(_reactEmotion);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
exports.default = _glamorous2.default.table({
var Table = (0, _reactEmotion2.default)('table')({
borderCollapse: 'collapse'
});
});
Table.displayName = 'Table';
exports.default = Table;

@@ -16,2 +16,14 @@ 'use strict';

WebkitFontSmoothing: 'antialiased'
};
var normal = exports.normal = {
mainBackground: '#F7F7F7',
mainBorder: '1px solid rgba(0,0,0,0.1)',
mainBorderRadius: 4,
mainFill: 'rgba(255,255,255,0.99)',
mainTextFace: baseFonts.fontFamily,
mainTextColor: baseFonts.color,
mainTextSize: 13,
monoTextFace: monoFonts.color,
layoutMargin: '10px'
};
{
"name": "@storybook/components",
"version": "4.0.0-alpha.7",
"version": "4.0.0-alpha.8",
"description": "Core Storybook Components",
"license": "MIT",
"main": "dist/index.js",
"jsnext:main": "src/index.js",
"repository": {

@@ -12,2 +9,5 @@ "type": "git",

},
"license": "MIT",
"main": "dist/index.js",
"jsnext:main": "src/index.js",
"scripts": {

@@ -19,15 +19,20 @@ "build-storybook": "build-storybook",

"dependencies": {
"glamor": "^2.20.40",
"glamorous": "^4.12.5",
"prop-types": "^15.6.1"
"emotion": "^9.1.3",
"emotion-theming": "^9.1.2",
"global": "^4.3.2",
"lodash.pick": "^4.4.0",
"lodash.throttle": "^4.1.1",
"prop-types": "^15.6.1",
"react-emotion": "^9.1.3",
"react-split-pane": "^0.1.77"
},
"devDependencies": {
"@storybook/addon-actions": "4.0.0-alpha.8",
"@storybook/addon-knobs": "4.0.0-alpha.8",
"@storybook/react": "4.0.0-alpha.8"
},
"peerDependencies": {
"react": "*",
"react-dom": "*"
},
"devDependencies": {
"@storybook/addon-actions": "4.0.0-alpha.7",
"@storybook/addon-knobs": "4.0.0-alpha.7",
"@storybook/react": "4.0.0-alpha.7"
}
}

@@ -14,2 +14,2 @@ # Storybook Components

All components use [`glamorous`](https://glamorous.rocks) for styling.
All components use [`emotion`](https://emotion.sh) for styling.

@@ -1,28 +0,26 @@

import glamorous from 'glamorous';
import styled from 'react-emotion';
import { baseFonts } from '../theme';
export default glamorous
.button({
...baseFonts,
border: 'none',
boxShadow: '0 0 0 1px rgba(0, 0, 0, 0.2)',
backgroundColor: 'rgb(255, 255, 255)',
padding: '4px 10px 7px',
borderRadius: 4,
cursor: 'pointer',
transition: 'box-shadow 0.15s ease-out',
':hover': {
transition: 'background-color 0.15s ease-out',
boxShadow: '0 0 0 1px rgba(0, 0, 0, 0.3)',
},
':focus': {
transition: 'background-color 0.15s ease-out',
outline: 'none',
boxShadow: '0 0 0 2px rgba(0, 0, 0, 0.3)',
},
':active': {
transition: 'none',
backgroundColor: 'rgb(247, 247, 247)',
},
})
.withProps({ type: 'button' });
export default styled('button')({
...baseFonts,
border: 'none',
boxShadow: '0 0 0 1px rgba(0, 0, 0, 0.2)',
backgroundColor: 'rgb(255, 255, 255)',
padding: '4px 10px 7px',
borderRadius: 4,
cursor: 'pointer',
transition: 'box-shadow 0.15s ease-out',
':hover': {
transition: 'background-color 0.15s ease-out',
boxShadow: '0 0 0 1px rgba(0, 0, 0, 0.3)',
},
':focus': {
transition: 'background-color 0.15s ease-out',
outline: 'none',
boxShadow: '0 0 0 2px rgba(0, 0, 0, 0.3)',
},
':active': {
transition: 'none',
backgroundColor: 'rgb(247, 247, 247)',
},
});

@@ -1,4 +0,4 @@

import glamorous from 'glamorous';
import styled from 'react-emotion';
export default glamorous.button(
export default styled('button')(
{

@@ -5,0 +5,0 @@ border: '1px solid rgba(0, 0, 0, 0)',

@@ -1,9 +0,16 @@

export { baseFonts, monoFonts } from './theme';
import { baseFonts, monoFonts, normal } from './theme';
export { default as RoutedLink } from './navigation/routed_link';
export { default as MenuLink } from './navigation/menu_link';
export { baseFonts, monoFonts };
export const themes = { normal };
export { default as RoutedLink } from './navigation/RoutedLink';
export { default as MenuLink } from './navigation/MenuLink';
export { default as HighlightButton } from './highlight_button';
export { default as Table } from './table/table';
export { td as Td, th as Th } from './table/cell';
export { Td, Th } from './table/cell';
export { default as Button } from './form/button';
export { default as Placeholder } from './placeholder/placeholder';
export { default as AddonPanel } from './addon_panel/index';
export { default as Layout } from './layout/index';
export { default as Header } from './header/header';

@@ -1,22 +0,13 @@

import glamorous from 'glamorous';
import styled from 'react-emotion';
const dynamicStyles = props => {
const styles = [];
const dynamicStyles = ({ bordered, code }) => ({
...(bordered ? { border: '1px solid #ccc' } : {}),
...(code
? {
whiteSpace: 'nowrap',
fontFamily: 'Monaco, Consolas, "Courier New", monospace',
}
: {}),
});
if (props.bordered) {
styles.push({
border: '1px solid #ccc',
});
}
if (props.code) {
styles.push({
whiteSpace: 'nowrap',
fontFamily: 'Monaco, Consolas, "Courier New", monospace',
});
}
return styles;
};
const styles = {

@@ -26,3 +17,6 @@ padding: '2px 6px',

export const td = glamorous.td(styles, dynamicStyles);
export const th = glamorous.th(styles, dynamicStyles);
export const Td = styled('td')(styles, dynamicStyles);
export const Th = styled('th')(styles, dynamicStyles);
Td.displayName = 'Td';
Th.displayName = 'Th';

@@ -1,5 +0,9 @@

import glamorous from 'glamorous';
import styled from 'react-emotion';
export default glamorous.table({
const Table = styled('table')({
borderCollapse: 'collapse',
});
Table.displayName = 'Table';
export default Table;

@@ -14,1 +14,13 @@ export const baseFonts = {

};
export const normal = {
mainBackground: '#F7F7F7',
mainBorder: '1px solid rgba(0,0,0,0.1)',
mainBorderRadius: 4,
mainFill: 'rgba(255,255,255,0.99)',
mainTextFace: baseFonts.fontFamily,
mainTextColor: baseFonts.color,
mainTextSize: 13,
monoTextFace: monoFonts.color,
layoutMargin: '10px',
};

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc