Skip to content

Commit

Permalink
docs(): update templates and layouts
Browse files Browse the repository at this point in the history
  • Loading branch information
hirsch committed Dec 14, 2021
1 parent ee91663 commit 320e088
Show file tree
Hide file tree
Showing 33 changed files with 222 additions and 295 deletions.
2 changes: 1 addition & 1 deletion packages/components/.storybook/preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export const parameters = {
'Getting-Started',
['Overview', 'How to use Storybook', 'HTML5', 'Angular', 'Vue', 'React'],
'Design',
['Overview', 'Colors', 'Typography', 'Breakpoints', 'Spacing', 'Icons', 'Grid', 'Page Layout', 'Form'],
['Overview', 'Figma', 'Colors', 'Typography', 'Icons', 'Spacing', 'Breakpoints', 'Grid', 'Page Layout', 'Templates', 'Form'],
'Components',
'Templates',
'Contributing',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ import IconAccount from '../../../../../../icons/svg/icon-account.svg'
Documentation how to build forms and how to use the components.
</span>
</a>
<a className="link-item" href="?path=/docs/templates-contact-form--page">
<a className="link-item" href="?path=/story/design-common-templates--contact-form">
<img src={IconAccount} alt="template" />
<span>
<strong>Template Contact Form</strong>A template with to illustrate the structure of a form.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ import IconAccount from '../../../../../../icons/svg/icon-account.svg'
Documentation how to build forms and how to use the components.
</span>
</a>
<a className="link-item" href="?path=/docs/templates-contact-form--page">
<a className="link-item" href="?path=/story/design-common-templates--contact-form">
<img src={IconAccount} alt="template" />
<span>
<strong>Template Contact Form</strong>A template with to illustrate the structure of a form.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ import IconAccount from '../../../../../../icons/svg/icon-account.svg'
Documentation how to build forms and how to use the components.
</span>
</a>
<a className="link-item" href="?path=/docs/templates-contact-form--page">
<a className="link-item" href="?path=/story/design-common-templates--contact-form">
<img src={IconAccount} alt="template" />
<span>
<strong>Template Contact Form</strong>A template with to illustrate the structure of a form.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import IconAccount from '../../../../../../icons/svg/icon-account.svg'
Documentation how to build forms and how to use the components.
</span>
</a>
<a className="link-item" href="?path=/docs/templates-contact-form--page">
<a className="link-item" href="?path=/story/design-common-templates--contact-form">
<img src={IconAccount} alt="template" />
<span>
<strong>Template Contact Form</strong>A template with to illustrate the structure of a form.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ import IconAccount from '../../../../../../icons/svg/icon-account.svg'
Documentation how to build forms and how to use the components.
</span>
</a>
<a className="link-item" href="?path=/docs/templates-contact-form--page">
<a className="link-item" href="?path=/story/design-common-templates--contact-form">
<img src={IconAccount} alt="template" />
<span>
<strong>Template Contact Form</strong>A template with to illustrate the structure of a form.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ import IconAccount from '../../../../../../icons/svg/icon-account.svg'
Documentation how to build forms and how to use the components.
</span>
</a>
<a className="link-item" href="?path=/docs/templates-contact-form--page">
<a className="link-item" href="?path=/story/design-common-templates--contact-form">
<img src={IconAccount} alt="template" />
<span>
<strong>Template Contact Form</strong>A template with to illustrate the structure of a form.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ import IconAccount from '../../../../../../icons/svg/icon-account.svg'
Documentation how to build forms and how to use the components.
</span>
</a>
<a className="link-item" href="?path=/docs/templates-contact-form--page">
<a className="link-item" href="?path=/story/design-common-templates--contact-form">
<img src={IconAccount} alt="template" />
<span>
<strong>Template Contact Form</strong>A template with to illustrate the structure of a form.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import IconAccount from '../../../../../../icons/svg/icon-account.svg'
Documentation how to build forms and how to use the components.
</span>
</a>
<a className="link-item" href="?path=/docs/templates-contact-form--page">
<a className="link-item" href="?path=/story/design-common-templates--contact-form">
<img src={IconAccount} alt="template" />
<span>
<strong>Template Contact Form</strong>A template with to illustrate the structure of a form.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import IconAccount from '../../../../../../icons/svg/icon-account.svg'
Documentation how to build forms and how to use the components.
</span>
</a>
<a className="link-item" href="?path=/docs/templates-contact-form--page">
<a className="link-item" href="?path=/story/design-common-templates--contact-form">
<img src={IconAccount} alt="template" />
<span>
<strong>Template Contact Form</strong>A template with to illustrate the structure of a form.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import IconAccount from '../../../../../../icons/svg/icon-account.svg'
Documentation how to build forms and how to use the components.
</span>
</a>
<a className="link-item" href="?path=/docs/templates-contact-form--page">
<a className="link-item" href="?path=/story/design-common-templates--contact-form">
<img src={IconAccount} alt="template" />
<span>
<strong>Template Contact Form</strong>A template with to illustrate the structure of a form.
Expand Down
46 changes: 46 additions & 0 deletions packages/components/src/stories/assets/images/documentation.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
116 changes: 116 additions & 0 deletions packages/components/src/stories/assets/images/library.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import docs from './03-spacing.docs.mdx'
import docs from './04-spacing.docs.mdx'

export default {
title: 'Design/Spacing',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import docs from './04-breakpoints.docs.mdx'
import docs from './05-breakpoints.docs.mdx'

export default {
title: 'Design/Breakpoints',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
import { Meta, Canvas } from '@storybook/addon-docs'

<Meta
title="Design/Page Layout"
parameters={{
previewTabs: {
canvas: { hidden: true },
},
}}
/>

# Page Layout

This is the page layout we recommand to use. The `bal-app` class enables the Baloise Design System styles underneath it.
Expand Down Expand Up @@ -30,26 +39,26 @@ Select the template that matches your case the best and start with that.
import EyeLogo from '../../../../icons/svg/icon-read-only.svg'

<div className="link-list">
<a className="link-item" href="?path=/story/design-page-layout--external-calculator">
<a className="link-item" href="?path=/story/design-page-templates--external-calculator">
<img src={EyeLogo} alt="Customize" />
<span>
<strong>External Calculator Application</strong>A narrow template created for our calculators. Optimized for mobile usage.
</span>
</a>
<a className="link-item" href="?path=/story/design-page-layout--external-calculator">
<a className="link-item" href="?path=/story/design-page-templates--external-calculator">
<img src={EyeLogo} alt="Customize" />
<span>
<strong>External Portal Application</strong>
The classical template with a main tab navigation on top.
</span>
</a>
<a className="link-item" href="?path=/story/design-page-layout--external-calculator">
<a className="link-item" href="?path=/story/design-page-templates--external-calculator">
<img src={EyeLogo} alt="Customize" />
<span>
<strong>Internal Form Application</strong>A basic form template for internal applications.
</span>
</a>
<a className="link-item" href="?path=/story/design-page-layout--external-calculator">
<a className="link-item" href="?path=/story/design-page-templates--external-calculator">
<img src={EyeLogo} alt="Customize" />
<span>
<strong>Internal Wide Application</strong>A wide template without the .container element to use the whole width of the screen.
Expand Down
10 changes: 5 additions & 5 deletions packages/components/src/stories/design/08-form.stories.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ A basic form field has his container element `bal-field` and 3 child elements:
- `bal-field-message` to show validation message or helper messages.

<Canvas withSource="none">
<div-doc-app>
<bal-doc-app>
<form className="columns is-multiline mt-0 has-background-white">
<bal-field class="column is-full py-0" expanded>
<bal-field-label>Firstname</bal-field-label>
Expand All @@ -33,7 +33,7 @@ A basic form field has his container element `bal-field` and 3 child elements:
<bal-field-message color="danger">Required Field</bal-field-message>
</bal-field>
</form>
</div-doc-app>
</bal-doc-app>
</Canvas>

```html
Expand All @@ -58,7 +58,7 @@ With the help of our [CSS Grid](?path=/docs/design-grid--page) we can assemble t
- `py-0` removes the padding on top and bottom

<Canvas withSource="none">
<div-doc-app>
<bal-doc-app>
<form className="columns is-multiline mt-0 has-background-white">
<bal-field class="column is-full py-0" expanded>
<bal-field-control>
Expand All @@ -85,7 +85,7 @@ With the help of our [CSS Grid](?path=/docs/design-grid--page) we can assemble t
</bal-field-control>
</bal-field>
</form>
</div-doc-app>
</bal-doc-app>
</Canvas>

```html
Expand Down Expand Up @@ -115,5 +115,5 @@ With the help of our [CSS Grid](?path=/docs/design-grid--page) we can assemble t

### More examples

- [Form Template with a contact form](?path=/docs/templates-contact-form--page)
- [Form Template with a contact form](?path=/story/design-common-templates--contact-form)
- [Stepper Template with some basic form](?path=/docs/templates-stepper--page)
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
import { withSoureCode } from '../utils'
import docs from './06-page-layout.docs.mdx'
import { ExternalCaluclatorTemplate } from './layouts/external-caluclator.template'
import { ExternalPortalTemplate } from './layouts/external-portal.template'
import { InternalFormAppTemplate } from './layouts/internal-form'
import { InternalWideAppTemplate } from './layouts/internal-wide'
import { ExternalCaluclatorTemplate } from './templates/external-caluclator.template'
import { ExternalPortalTemplate } from './templates/external-portal.template'
import { InternalFormAppTemplate } from './templates/internal-form.template'
import { InternalWideAppTemplate } from './templates/internal-wide.template'
import * as Components from '../../../.storybook/vue/components'

export default {
title: 'Design/Page Layout',
title: 'Design/Page Templates',
parameters: {
docs: {
page: docs,
page: null,
},
layout: 'fullscreen',
},
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { withSoureCode } from '../utils'
import { ContactFormTemplate } from './templates/contact-form.template'
import * as Components from '../../../.storybook/vue/components'

export default {
title: 'Design/Common Templates',
parameters: {
docs: {
page: null,
},
layout: 'fullscreen',
},
}

export const ContactForm = args => ({
components: { ...Components },
setup: () => ({ args }),
template: ContactFormTemplate,
})
ContactForm.parameters = {
...withSoureCode(ContactFormTemplate),
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export const contactFormTemplate = `
export const ContactFormTemplate = `
<bal-card>
<bal-card-content>
<form class="columns is-multiline mt-0">
Expand Down
28 changes: 0 additions & 28 deletions packages/components/src/stories/templates/contact-form.stories.mdx

This file was deleted.

28 changes: 0 additions & 28 deletions packages/components/src/stories/templates/portal.stories.mdx

This file was deleted.

44 changes: 0 additions & 44 deletions packages/components/src/stories/templates/portal.template.ts

This file was deleted.

28 changes: 0 additions & 28 deletions packages/components/src/stories/templates/stepper.stories.mdx

This file was deleted.

Loading

0 comments on commit 320e088

Please sign in to comment.