diff --git a/.storybook/config.js b/.storybook/config.js deleted file mode 100644 index b98cb4736..000000000 --- a/.storybook/config.js +++ /dev/null @@ -1,9 +0,0 @@ -import { configure } from '@storybook/react'; - -// automatically import all files ending in *.stories.js -const req = require.context('../stories', true, /.stories.js$/); -function loadStories() { - req.keys().forEach(filename => req(filename)); -} - -configure(loadStories, module); diff --git a/.storybook/webpack.config.js b/.storybook/webpack.config.js deleted file mode 100644 index 2447c2a7a..000000000 --- a/.storybook/webpack.config.js +++ /dev/null @@ -1,71 +0,0 @@ -const path = require('path'); - -module.exports = { - output: { - publicPath: '/' - }, - module: { - rules: [ - { - test: /\.js$/, - include: [ - path.resolve(__dirname, '../src'), - path.resolve(__dirname, '../node_modules/stremio-icons/dom') - ], - use: { - loader: 'babel-loader', - options: { - presets: ['@babel/preset-env', '@babel/preset-react'], - plugins: ['@babel/plugin-proposal-class-properties', '@babel/plugin-proposal-object-rest-spread'] - } - } - }, - { - test: /\.less$/, - exclude: /node_modules/, - use: [ - { - loader: 'style-loader' - }, - { - loader: 'css-loader', - options: { - modules: true, - localIdentName: '[local]_[hash:base64:5]', - importLoaders: 2 - } - }, - { - loader: 'postcss-loader', - options: { - ident: 'postcss-id', - plugins: () => [ - require('autoprefixer')() - ] - } - }, - { - loader: 'less-loader', - options: { - strictMath: true, - noIeCompat: true, - compress: true, - paths: [ - path.resolve(__dirname, '../node_modules/stremio-colors'), - path.resolve(__dirname, '../src/common') - ] - } - } - ] - } - ] - }, - resolve: { - extensions: ['.js', '.json', '.less'], - alias: { - 'stremio-common': path.resolve(__dirname, '../src/common'), - 'stremio-routes': path.resolve(__dirname, '../src/routes'), - 'stremio-services': path.resolve(__dirname, '../src/services') - } - } -}; \ No newline at end of file diff --git a/stories/index.stories.js b/stories/index.stories.js deleted file mode 100644 index 9e55f0244..000000000 --- a/stories/index.stories.js +++ /dev/null @@ -1,438 +0,0 @@ -import React from 'react'; -import { storiesOf } from '@storybook/react'; -import { Checkbox, LibraryItemList, MetaItem, ShareModal, UserPanel } from 'stremio-common'; -import Addon from '../src/routes/Addons/Addon'; -import Video from '../src/routes/Detail/VideosList/Video'; -import VideosList from '../src/routes/Detail/VideosList'; -import Stream from '../src/routes/Detail/StreamsList/Stream'; -import StreamsList from '../src/routes/Detail/StreamsList'; -import ModalsContainerProvider from '../src/common/Router/Route/ModalsContainerProvider'; -import colors from 'stremio-colors'; -import appStyles from '../src/App/styles'; -import styles from './styles'; - -const storyStyle = { - padding: '10px', - overflow: 'auto', - minHeight: 'initial' -}; - -const streamsListStyle = { - position: 'absolute', - height: '100%', - padding: '10px', - minHeight: 'initial', - background: colors.backgroundlighter -} - -const CONTINUE_WATCHING_MENU = [ - { - label: 'Play', - type: 'play' - }, - { - label: 'Dismiss', - type: 'dismiss' - } -]; - -const onModalsContainerDomTreeChange = ({ modalsContainerElement }) => { - return modalsContainerElement.childElementCount === 0; -}; - -storiesOf('Addon', module) - .add('not-installed', () => ( -
- -
- )) - .add('installed', () => ( -
- -
- )) - .add('long-text', () => ( -
- -
- )); - -storiesOf('Checkbox', module) - .add('checked-disabled', () => ( -
- -
- -
- )) - .add('not-checked-disabled', () => ( -
- -
- -
- )) - .add('not-checked', () => ( -
- -
- -
- )) - .add('checked', () => ( -
- -
- -
- )); - -storiesOf('MetaItem', module) - .add('continue-watching-poster', () => ( - - -
- -
-
-
- )) - .add('continue-watching-square', () => ( - - -
- -
-
-
- )) - .add('addon-catalog-poster-movie', () => ( -
- -
- )) - .add('addon-catalog-square-channel', () => ( -
- -
- )) - .add('addon-catalog-landscape-series', () => ( -
- -
- )); - - -storiesOf('ShareModal', module) - .add('share modal', () => ( -
- -
- )); - -storiesOf('UserPanel', module) - .add('anonymous', () => ( -
- -
- )) - .add('without avatar', () => ( -
- -
- )) - .add('with avatar', () => ( -
- -
- )); - -storiesOf('Video', module) - .add('poster-upcoming-watched-long-title', () => ( -
-
- )) - .add('empty-poster-progress', () => ( -
-
- )) - .add('no-poster-upcoming', () => ( -
-
- )) - .add('no-poster-upcoming-watched', () => ( -
-
- )) - .add('no-poster-long-title-progress', () => ( -
-
- )); - -storiesOf('VideosList', module) - .add('list of videos', () => ( - - -
- -
-
-
- )); - -storiesOf('Stream', module) - .add('no-logo-title', () => ( -
- -
- )) - .add('no-logo-subtitle', () => ( -
- -
- )) - .add('logo-progress', () => ( -
- -
- )) - .add('long-source-name', () => ( -
- -
- )) - .add('long-title-subtitle', () => ( -
- -
- )); - -storiesOf('StreamsList', module) - .add('short list of streams', () => ( -
- -
- )) - .add('long list of streams', () => ( -
- -
- )); \ No newline at end of file diff --git a/stories/styles.less b/stories/styles.less deleted file mode 100644 index 8ad56cdf4..000000000 --- a/stories/styles.less +++ /dev/null @@ -1,32 +0,0 @@ -.addon { - --addon-width: 960px; - --button-border-width: 2px; - font-size: 14px; -} - -.checkbox-size { - --icon-size: 1.2em; - --icon-color: var(--color-surfacelighter); -} - -.meta-item-continue-watching { - --play-icon-visibility: visible; -} - -.video { - --video-width: 360px; - --spacing: 8px; - font-size: 12px; -} - -.videos-list, :global(.detail-popup-container) { - --spacing: 8px; - --video-width: 360px; - font-size: 12px; - - position: absolute; - z-index: 1; - top: 0; - bottom: 0; - padding: calc(3 * var(--spacing)) 0; -} \ No newline at end of file