Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 22 additions & 16 deletions .storybook/preview-head.html
Original file line number Diff line number Diff line change
@@ -1,24 +1,30 @@
<style>
body {
font-family: var(--sapFontFamily);
background-color: var(--sapBackgroundColor);
}
body {
font-family: var(--sapFontFamily);
background-color: var(--sapBackgroundColor);
}

.pageWithPadding > section {
padding: 1rem;
}
.pageWithPadding > section {
padding: 1rem;
}

.sbdocs-title {
font-family: var(--sapFontFamily) !important;
@media (min-width: 1330px) and (max-width: 1520px) {
.sbdocs-wrapper {
justify-content: flex-start !important;
}
}

.sbdocs-content {
max-width: 1400px !important;
}
.sbdocs-title {
font-family: var(--sapFontFamily) !important;
}

.sbdocs-content {
max-width: 1100px !important;
}
</style>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/tocbot/4.11.1/tocbot.css" />
<script data-ui5-config type="application/json">
{
"theme": "sap_fiori_3"
}
{
"theme": "sap_fiori_3"
}
</script>

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@
"@ui5/webcomponents-icons": "1.0.0-rc.9",
"react": "17.0.1",
"react-dom": "17.0.1",
"react-syntax-highlighter": "^15.2.1"
"react-syntax-highlighter": "^15.2.1",
"tocbot": "^4.12.0"
},
"devDependencies": {
"@babel/core": "^7.12.3",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ import { DocsHeader } from '@shared/stories/DocsHeader';

<DocsHeader />

<br />

## Example

<Canvas>
<Story name="Default">
{(args) => (
Expand All @@ -52,6 +56,8 @@ import { DocsHeader } from '@shared/stories/DocsHeader';
</Story>
</Canvas>

## Properties

<ArgsTable story="." />

<Canvas>
Expand Down
8 changes: 7 additions & 1 deletion packages/main/scripts/create-web-components-wrapper.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -589,6 +589,10 @@ const createWebComponentDemo = (componentSpec, componentProps, description) => {
/>

<DocsHeader />

<br />

## Example

<Canvas>
<Story name="Default">
Expand All @@ -599,7 +603,9 @@ const createWebComponentDemo = (componentSpec, componentProps, description) => {
}}
</Story>
</Canvas>


## Properties

<ArgsTable story="." />

`,
Expand Down
13 changes: 9 additions & 4 deletions packages/main/src/components/ActionSheet/ActionSheet.stories.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { PopoverHorizontalAlign } from '@ui5/webcomponents-react/lib/PopoverHori
import { PopoverVerticalAlign } from '@ui5/webcomponents-react/lib/PopoverVerticalAlign';
import { useCallback, useRef } from 'react';
import { DocsHeader } from '@shared/stories/DocsHeader';
import { DocsCommonProps } from '@shared/stories/DocsCommonProps';

<Meta
title="Components / ActionSheet"
Expand All @@ -26,9 +27,7 @@ import { DocsHeader } from '@shared/stories/DocsHeader';
header: {
type: null
},
ref: {
type: null
}
...DocsCommonProps
}}
args={{
horizontalAlign: PopoverHorizontalAlign.Center,
Expand Down Expand Up @@ -64,6 +63,10 @@ const ActionSheetComponent = () => {
};
```

<br />

## Example

<Canvas>
<Story name="Default">
{(args) => {
Expand All @@ -88,9 +91,11 @@ const ActionSheetComponent = () => {
</Story>
</Canvas>

## Properties

<ArgsTable story="." />

### Using ActionSheets inside other components
## Using ActionSheets inside other components

`ActionSheets` are often used within other components, when opened this could sometimes have unwanted side effects.
In this case, we recommend using [createPortal](https://reactjs.org/docs/portals.html) to mount the `ActionSheet` outside of the DOM hierarchy of the parent component.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ import { DocsCommonProps } from '@shared/stories/DocsCommonProps';

**Note:** The `AnalyticalCard` was mainly made to display KPIs and complex data. If you want to implement a simple card, the `Card` component probably is more suitable.

<br />

## Example

<Canvas>
<Story name="Default">
{(args) => {
Expand Down Expand Up @@ -88,6 +92,8 @@ import { DocsCommonProps } from '@shared/stories/DocsCommonProps';
</Story>
</Canvas>

## Properties

<ArgsTable story="Default" />

<br />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,16 @@ import { useEffect, useRef, useState } from 'react';

<DocsHeader />

<br />

## Example

<Canvas>
<Story name="Default">{(args) => <AnalyticalTable {...args} />}</Story>
</Canvas>

## Properties

<ArgsTable story="." />

## Column Properties
Expand Down
6 changes: 6 additions & 0 deletions packages/main/src/components/Bar/Bar.stories.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ import { GitHubLogo } from '../../../../../shared/stories/GitHub-Mark';

<DocsHeader />

<br />

## Example

<Canvas>
<Story name="Default">
{(args) => {
Expand All @@ -39,6 +43,8 @@ import { GitHubLogo } from '../../../../../shared/stories/GitHub-Mark';
</Story>
</Canvas>

## Properties

<ArgsTable story="." />

<br />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ import { DocsCommonProps } from '@shared/stories/DocsCommonProps';

<DocsHeader />

<br />

## Example

<Canvas>
<Story name="Default">
{(args) => {
Expand All @@ -42,4 +46,6 @@ import { DocsCommonProps } from '@shared/stories/DocsCommonProps';
</Story>
</Canvas>

## Properties

<ArgsTable story="." />
12 changes: 9 additions & 3 deletions packages/main/src/components/DynamicPage/DynamicPage.stories.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ import { useState } from 'react';

<DocsHeader />

<br />

## Example

<Canvas>
<Story name="Default">
{(args) => (
Expand Down Expand Up @@ -108,11 +112,13 @@ import { useState } from 'react';
</Story>
</Canvas>

## Properties

<ArgsTable story="." />

## Stories
# Stories

### Always show Header Content
## Always show Header Content

<Canvas>
<Story name="Always show header content">
Expand Down Expand Up @@ -177,7 +183,7 @@ import { useState } from 'react';
</Story>
</Canvas>

### Variant Management as Title
## Variant Management as Title

<Canvas>
<Story name="With Variants">
Expand Down
6 changes: 6 additions & 0 deletions packages/main/src/components/FilterBar/FilterBar.stories.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ import { DocsCommonProps } from '@shared/stories/DocsCommonProps';

<DocsHeader />

<br />

## Example

<Canvas>
<Story name="Default">
{(args) => {
Expand Down Expand Up @@ -112,6 +116,8 @@ import { DocsCommonProps } from '@shared/stories/DocsCommonProps';
</Story>
</Canvas>

## Properties

<ArgsTable story="Default" />

<br />
Expand Down
6 changes: 6 additions & 0 deletions packages/main/src/components/FlexBox/FlexBox.stories.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ import '@ui5/webcomponents-icons/dist/icons/employee.js';

<DocsHeader />

<br />

## Example

<Canvas>
<Story name="Default">
{(args) => {
Expand All @@ -53,4 +57,6 @@ import '@ui5/webcomponents-icons/dist/icons/employee.js';
</Story>
</Canvas>

## Properties

<ArgsTable story="." />
6 changes: 6 additions & 0 deletions packages/main/src/components/Form/Form.stories.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ import { DocsHeader } from '@shared/stories/DocsHeader';

<DocsHeader />

<br />

## Example

<Canvas>
<Story name="Default">
{(args) => (
Expand Down Expand Up @@ -91,6 +95,8 @@ import { DocsHeader } from '@shared/stories/DocsHeader';
</Story>
</Canvas>

## Properties

<ArgsTable story="." />

### Usage Notes
Expand Down
6 changes: 6 additions & 0 deletions packages/main/src/components/Grid/Grid.stories.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ import { DocsCommonProps } from '@shared/stories/DocsCommonProps';

<DocsHeader />

<br />

## Example

<Canvas>
<Story name="Default">
{(args) => {
Expand All @@ -41,4 +45,6 @@ import { DocsCommonProps } from '@shared/stories/DocsCommonProps';
</Story>
</Canvas>

## Properties

<ArgsTable story="." />
6 changes: 6 additions & 0 deletions packages/main/src/components/Loader/Loader.stories.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ import { useEffect, useRef, useState } from 'react';

<DocsHeader />

<br />

## Example

<Canvas>
<Story name="Default">
{(args) => {
Expand All @@ -41,6 +45,8 @@ import { useEffect, useRef, useState } from 'react';
</Story>
</Canvas>

## Properties

<ArgsTable story="." />

<br />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ import { createSelectArgTypes } from '@shared/stories/createSelectArgTypes';

<br />

## Example

<Canvas>
<Story name="Default">
{(args) => {
Expand All @@ -46,9 +48,11 @@ import { createSelectArgTypes } from '@shared/stories/createSelectArgTypes';
</Story>
</Canvas>

## Properties

<ArgsTable story="." />

### Opening and Closing MessageBoxes
## Opening and Closing MessageBoxes

Unlike `Popovers` or `Dialogs`, `MessageBoxes` do not need to be provided with a `ref` to be opened or closed. Instead, the `open` prop can be used for this.

Expand All @@ -74,7 +78,7 @@ const MessageBoxComponent = () => {
};
```

### Using MessageBoxes inside other components
## Using MessageBoxes inside other components

`MessageBoxes` are often used within other components, when opened this could sometimes have unwanted side effects.
In this case, we recommend using [createPortal](https://reactjs.org/docs/portals.html) to mount the `MessageBox` outside of the DOM hierarchy of the parent component.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,10 @@ import '@ui5/webcomponents-icons/dist/icons/wrench.js';

<DocsHeader />

<br />

## Example

<Canvas>
<Story name="Default">
{(args) => {
Expand Down Expand Up @@ -228,4 +232,6 @@ import '@ui5/webcomponents-icons/dist/icons/wrench.js';
</Story>
</Canvas>

## Properties

<ArgsTable story="Default" />
Loading