Skip to content

Commit

Permalink
bugfix(storybook): remove unnecessary components from storybook (#836)
Browse files Browse the repository at this point in the history
* remove wizard-page from stories

* simplify tabs

* remove tab from tsconfig

* simplify button toggle

* update demo
  • Loading branch information
dorsaffrigui authored Aug 22, 2022
1 parent ab1327f commit 83a131a
Show file tree
Hide file tree
Showing 65 changed files with 52 additions and 899 deletions.
39 changes: 0 additions & 39 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -1158,32 +1158,6 @@
},
"tags": ["web-components"]
},
"tab": {
"$schema": "../../../node_modules/nx/schemas/project-schema.json",
"root": "libs/web-components/tab",
"architect": {
"lint": {
"builder": "@nrwl/linter:eslint",
"options": {
"lintFilePatterns": ["libs/web-components/tab/src/**/*.ts"]
}
}
},
"tags": ["web-components"]
},
"tab-bar": {
"$schema": "../../../node_modules/nx/schemas/project-schema.json",
"root": "libs/web-components/tab-bar",
"architect": {
"lint": {
"builder": "@nrwl/linter:eslint",
"options": {
"lintFilePatterns": ["libs/web-components/tab-bar/src/**/*.ts"]
}
}
},
"tags": ["web-components"]
},
"table": {
"$schema": "../../../node_modules/nx/schemas/project-schema.json",
"projectType": "library",
Expand Down Expand Up @@ -1681,19 +1655,6 @@
}
},
"tags": []
},
"wizard-page": {
"$schema": "../../../node_modules/nx/schemas/project-schema.json",
"root": "libs/web-components/wizard-page",
"architect": {
"lint": {
"builder": "@nrwl/linter:eslint",
"options": {
"lintFilePatterns": ["libs/web-components/wizard-page/src/**/*.ts"]
}
}
},
"tags": ["web-components"]
}
}
}
4 changes: 1 addition & 3 deletions libs/web-components/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
| Name | Package | Version | Links |
| ----------------------- | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------- |
| **Button** | [`@finastra/button`](https://npmjs.com/package/@finastra/button) | [![latest](https://img.shields.io/npm/v/@finastra/button.svg)](https://npmjs.com/package/@finastra/button) | [![README](https://img.shields.io/badge/README--56C271.svg)](./button/README.md) |
| **Button Toggle** | [`@finastra/button-toggle`](https://npmjs.com/package/@finastra/button-toggle) | [![latest](https://img.shields.io/npm/v/@finastra/button-toggle.svg)](https://npmjs.com/package/@finastra/button-toggle) | [![README](https://img.shields.io/badge/README--56C271.svg)](./button-toggle/README.md) |
| **Button Toggle Group** | [`@finastra/button-toggle-group`](https://npmjs.com/package/@finastra/button-toggle-group) | [![latest](https://img.shields.io/npm/v/@finastra/button-toggle-group.svg)](https://npmjs.com/package/@finastra/button-toggle-group) | [![README](https://img.shields.io/badge/README--56C271.svg)](./button-toggle-group/README.md) |
| **Icon Button** | [`@finastra/icon-button`](https://npmjs.com/package/@finastra/icon-button) | [![latest](https://img.shields.io/npm/v/@finastra/icon-button.svg)](https://npmjs.com/package/@finastra/icon-button) | [![README](https://img.shields.io/badge/README--56C271.svg)](./icon-button/README.md) |
| **FAB** | [`@finastra/fab`](https://npmjs.com/package/@finastra/fab) | [![latest](https://img.shields.io/npm/v/@finastra/fab.svg)](https://npmjs.com/package/@finastra/fab) | [![README](https://img.shields.io/badge/README--56C271.svg)](./fab/README.md) |
Expand Down Expand Up @@ -82,8 +81,7 @@
| **Global Search** | [`@finastra/global-search`](https://npmjs.com/package/@finastra/global-search) | [![latest](https://img.shields.io/npm/v/@finastra/global-search.svg)](https://npmjs.com/package/@finastra/global-search) | [![README](https://img.shields.io/badge/README--56C271.svg)](./global-search/README.md) | |
| **Icon Bar** | [`@finastra/icon-bar`](https://npmjs.com/package/@finastra/icon-bar) | N/A | TBD |
| **Launchpad** | [`@finastra/launchpad`](https://npmjs.com/package/@finastra/launchpad) | [![latest](https://img.shields.io/npm/v/@finastra/launchpad.svg)](https://npmjs.com/package/@finastra/launchpad) | [![README](https://img.shields.io/badge/README--56C271.svg)](./launchpad/README.md) |
| **Sidenav** | [`@finastra/sidenav`](https://npmjs.com/package/@finastra/sidenav) | [![latest](https://img.shields.io/npm/v/@finastra/sidenav.svg)](https://npmjs.com/package/@finastra/sidenav) | [![README](https://img.shields.io/badge/README--56C271.svg)](./sidenav/README.md) |
| **Tab** | [`@finastra/tab`](https://npmjs.com/package/@finastra/tab) | [![latest](https://img.shields.io/npm/v/@finastra/tab.svg)](https://npmjs.com/package/@finastra/tab) | [![README](https://img.shields.io/badge/README--56C271.svg)](./tab/README.md) |
| **Sidenav** | [`@finastra/sidenav`](https://npmjs.com/package/@finastra/sidenav) | [![latest](https://img.shields.io/npm/v/@finastra/sidenav.svg)](https://npmjs.com/package/@finastra/sidenav) | [![README](https://img.shields.io/badge/README--56C271.svg)](./sidenav/README.md) | |
| **Tab bar** | [`@finastra/tab-bar`](https://npmjs.com/package/@finastra/tab-bar) | [![latest](https://img.shields.io/npm/v/@finastra/tab-bar.svg)](https://npmjs.com/package/@finastra/tab-bar) | [![README](https://img.shields.io/badge/README--56C271.svg)](./tab-bar/README.md) |
| **User Profile** | [`@finastra/user-profile`](https://npmjs.com/package/@finastra/user-profile) | [![latest](https://img.shields.io/npm/v/@finastra/user-profile.svg)](https://npmjs.com/package/@finastra/user-profile) | [![README](https://img.shields.io/badge/README--56C271.svg)](./user-profile/README.md) |

Expand Down
1 change: 0 additions & 1 deletion libs/web-components/button-toggle-group/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ import '@finastra/button-toggle-group';

```html
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons" />
<script src="https://cdn.jsdelivr.net/npm/@finastra/button-toggle/dist/fds-button-toggle.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@finastra/button-toggle-group/dist/fds-button-toggle-group.js"></script>

<fds-button-toggle-group style="padding-bottom: 16px">
Expand Down
24 changes: 14 additions & 10 deletions libs/web-components/button-toggle-group/demo/index.html
Original file line number Diff line number Diff line change
@@ -1,43 +1,47 @@
<script type="module" src="node_modules/@finastra/button-toggle-group/dist/src/button-toggle-group.js"></script>
<script type="module" src="node_modules/@finastra/button-toggle/dist/src/button-toggle-filter.js"></script>
<script type="module" src="node_modules/@finastra/button-toggle/dist/src/button-toggle.js"></script>

<script type="module" src="node_modules/@finastra/button-toggle-group/dist/src/button-toggle/button-toggle.js"></script>
<script type="module" src="node_modules/@finastra/button-toggle-group/dist/src/button-toggle/button-toggle-filter.js"></script>

<div style="display: flex; flex-direction: column;">
<fds-button-toggle-group style="padding-bottom: 16px">
<fds-button-toggle-group>
<fds-button-toggle icon="accessibility"></fds-button-toggle>
<fds-button-toggle icon="exit_to_app"></fds-button-toggle>
<fds-button-toggle icon="camera"></fds-button-toggle>
</fds-button-toggle-group>

<fds-button-toggle-group style="padding-bottom: 16px" dense>
<fds-button-toggle-group dense>
<fds-button-toggle label="Trend" icon="timeline">
</fds-button-toggle>
<fds-button-toggle label="List" icon="view_list"></fds-button-toggle>
</fds-button-toggle-group>

<fds-button-toggle-group style="padding-bottom: 16px">
<fds-button-toggle-group>
<fds-button-toggle label="Left"></fds-button-toggle>
<fds-button-toggle label="Middle" disabled></fds-button-toggle>
<fds-button-toggle label="Right"></fds-button-toggle>
</fds-button-toggle-group>

<fds-button-toggle-group style="padding-bottom: 16px" dense>
<fds-button-toggle-group dense>
<fds-button-toggle icon="accessibility"></fds-button-toggle>
<fds-button-toggle icon="exit_to_app"></fds-button-toggle>
<fds-button-toggle icon="camera"></fds-button-toggle>
</fds-button-toggle-group>

<fds-button-toggle-group style="padding-bottom: 16px">
<fds-button-toggle-group>
<fds-button-toggle icon="accessibility"></fds-button-toggle>
<fds-button-toggle icon="exit_to_app"></fds-button-toggle>
<fds-button-toggle icon="camera"></fds-button-toggle>
</fds-button-toggle-group>

<fds-button-toggle-group style="padding-bottom: 16px">
<fds-button-toggle-group>
<fds-button-toggle-filter label="Left" icon="accessibility"></fds-button-toggle-filter>
<fds-button-toggle-filter label="Middle" icon="exit_to_app" disabled></fds-button-toggle-filter>
<fds-button-toggle-filter label="Right" icon="camera"></fds-button-toggle-filter>
</fds-button-toggle-group>

</div>
</div>
<style>
fds-button-toggle-group {
padding-bottom: 16px;
}
</style>
7 changes: 4 additions & 3 deletions libs/web-components/button-toggle-group/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,15 @@
"ButtonToggleGroup"
],
"license": "MIT",
"main": "dist/src/button-toggle-group.js",
"module": "dist/src/button-toggle-group.js",
"main": "dist/src/index.js",
"module": "dist/src/index.js",
"scripts": {
"build": "webpack",
"build:style": "node ../../../scripts/sass-to-lit-css/index.js src/styles.scss"
"build:style": "node ../../../scripts/sass-to-lit-css/index.js src/styles.scss src/button-toggle/styles.scss src/button-toggle/filter-styles.scss"
},
"dependencies": {
"@material/mwc-tab-bar": "^0.26.1",
"@material/mwc-tab": "^0.26.1",
"lit": "^2.0.0",
"tslib": "^2.0.1"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { customElement } from 'lit/decorators.js';
import { TabBase } from '@material/mwc-tab/mwc-tab-base';

import { customElement } from 'lit/decorators.js';
import { styles } from './styles.css';


/**
* @attr [label=''] - Text label to display in button toggle.
* @attr [icon=''] - Material design icon name to display.
Expand Down
4 changes: 4 additions & 0 deletions libs/web-components/button-toggle-group/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export * from './button-toggle-group';
export * from './button-toggle/button-toggle';
export * from './button-toggle/button-toggle-filter';

Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
const README = require('../README.md');
import '@finastra/button-toggle';
import '@finastra/button-toggle-group';
import { Meta, Story } from '@storybook/web-components';
import { html } from 'lit-html';
import { argTypes, cssprops } from './sb-generated/fds-button-toggle-group.json';

export default {
title: 'ACTIONS/Toggle/Button Toggle Group',
title: 'ACTIONS/Toggle',
component: 'fds-button-toggle-group',
argTypes,
parameters: {
Expand Down
17 changes: 0 additions & 17 deletions libs/web-components/button-toggle/.eslintrc.json

This file was deleted.

8 changes: 0 additions & 8 deletions libs/web-components/button-toggle/.npmignore

This file was deleted.

34 changes: 0 additions & 34 deletions libs/web-components/button-toggle/README.md

This file was deleted.

7 changes: 0 additions & 7 deletions libs/web-components/button-toggle/demo/index.html

This file was deleted.

26 changes: 0 additions & 26 deletions libs/web-components/button-toggle/package.json

This file was deleted.

2 changes: 0 additions & 2 deletions libs/web-components/button-toggle/src/index.ts

This file was deleted.

44 changes: 0 additions & 44 deletions libs/web-components/button-toggle/stories/button-toggle.stories.ts

This file was deleted.

11 changes: 0 additions & 11 deletions libs/web-components/button-toggle/test/button-toggle.test.ts

This file was deleted.

10 changes: 0 additions & 10 deletions libs/web-components/button-toggle/tsconfig.json

This file was deleted.

10 changes: 0 additions & 10 deletions libs/web-components/button-toggle/webpack.config.cjs

This file was deleted.

17 changes: 0 additions & 17 deletions libs/web-components/tab-bar/.eslintrc.json

This file was deleted.

8 changes: 0 additions & 8 deletions libs/web-components/tab-bar/.npmignore

This file was deleted.

Loading

0 comments on commit 83a131a

Please sign in to comment.