Skip to content

Commit 02d3734

Browse files
authored
docs: update main docs (#205)
1 parent 2864114 commit 02d3734

File tree

101 files changed

+2154
-1172
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

101 files changed

+2154
-1172
lines changed

apps/documentation/src/app/stories/main/avatar.stories.ts

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,11 @@
11
import { Meta, StoryObj, moduleMetadata } from '@storybook/angular';
2-
import {
3-
Ui5WebcomponentsModule,
4-
AvatarComponent,
5-
} from '@ui5/webcomponents-ngx';
6-
import { extractArgTypes } from '../../arg-type-tools';
2+
import { Ui5WebcomponentsModule } from '@ui5/webcomponents-ngx';
3+
import { AvatarComponent,} from '@ui5/webcomponents-ngx/main/avatar';
4+
import { extractArgTypes, extractDescription } from '../../arg-type-tools';
75

8-
const description = `### Overview
6+
const description = `
97
10-
An image-like component that has different display options for representing images and icons in different shapes and sizes, depending on the use case.
11-
12-
The shape can be circular or square. There are several predefined sizes, as well as an option to set a custom size.
13-
14-
<br><br> <h3>Keyboard Handling</h3>
15-
16-
<ul> <li>[SPACE, ENTER, RETURN] - Fires the <code>click</code> event if the <code>interactive</code> property is set to true.</li> <li>[SHIFT] - If [SPACE] is pressed, pressing [SHIFT] releases the component without triggering the click event.</li> </ul> <br><br>
17-
18-
<h3>ES6 Module Import</h3>
8+
<h3>Module Import</h3>
199
2010
<code>import { AvatarComponent } from "@ui5/webcomponents-ngx/main/avatar";</code>`;
2111
export default {
@@ -30,7 +20,7 @@ export default {
3020
docs: {
3121
extractArgTypes,
3222
description: {
33-
component: description,
23+
component: extractDescription('AvatarComponent', AvatarComponent, description),
3424
},
3525
},
3626
},

apps/documentation/src/app/stories/main/avatargroup.stories.ts

Lines changed: 7 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,13 @@
11
import { Meta, StoryObj, moduleMetadata } from '@storybook/angular';
2-
import {
3-
Ui5WebcomponentsModule,
4-
AvatarGroupComponent,
5-
} from '@ui5/webcomponents-ngx';
6-
import { extractArgTypes } from '../../arg-type-tools';
2+
import { Ui5WebcomponentsModule } from '@ui5/webcomponents-ngx';
3+
import { AvatarGroupComponent } from '@ui5/webcomponents-ngx/main/avatar-group';
4+
import { extractArgTypes, extractDescription } from '../../arg-type-tools';
75

8-
const description = `### Overview
6+
const description = `
97
10-
Displays a group of avatars arranged horizontally. It is useful to visually showcase a group of related avatars, such as, project team members or employees.
8+
<h3>Module Import</h3>
119
12-
The component allows you to display the avatars in different sizes, depending on your use case.
13-
14-
The <code>AvatarGroup</code> component has two group types: <ul> <li><code>Group</code> type: The avatars are displayed as partially overlapped on top of each other and the entire group has one click/tap area.</li> <li><code>Individual</code> type: The avatars are displayed side-by-side and each avatar has its own click/tap area.</li> </ul>
15-
16-
<h3>Responsive Behavior</h3>
17-
18-
When the available space is less than the width required to display all avatars, an overflow visualization appears as a button placed at the end with the same shape and size as the avatars. The visualization displays the number of avatars that have overflowed and are not currently visible.
19-
20-
<h3>Usage</h3>
21-
22-
Use the <code>AvatarGroup</code> if: <ul> <li>You want to display a group of avatars.</li> <li>You want to display several avatars which have something in common.</li> </ul>
23-
24-
Do not use the <code>AvatarGroup</code> if: <ul> <li>You want to display a single avatar.</li> <li>You want to display a gallery for simple images.</li> <li>You want to use it for other visual content than avatars.</li> </ul>
25-
26-
<h3>Keyboard Handling</h3> The component provides advanced keyboard handling. When focused, the user can use the following keyboard shortcuts in order to perform a navigation: <br> - <code>type</code> Individual: <br> <ul> <li>[TAB] - Move focus to the overflow button</li> <li>[LEFT] - Navigate one avatar to the left</li> <li>[RIGHT] - Navigate one avatar to the right</li> <li>[HOME] - Navigate to the first avatar</li> <li>[END] - Navigate to the last avatar</li> <li>[SPACE],[ENTER],[RETURN] - Trigger <code>ui5-click</code> event</li> </ul> <br> - <code>type</code> Group: <br> <ul> <li>[TAB] - Move focus to the next interactive element after the component</li> <li>[SPACE],[ENTER],[RETURN] - Trigger <code>ui5-click</code> event</li> </ul> <br>`;
10+
<code>import { AvatarGroupComponent } from "@ui5/webcomponents-ngx/main/avatar-group";</code>`;
2711
export default {
2812
title: 'UI5 Web Components / Main / AvatarGroup',
2913
component: AvatarGroupComponent,
@@ -36,7 +20,7 @@ export default {
3620
docs: {
3721
extractArgTypes,
3822
description: {
39-
component: description,
23+
component: extractDescription('AvatarGroupComponent', AvatarGroupComponent, description),
4024
},
4125
},
4226
},

apps/documentation/src/app/stories/main/bar.stories.ts

Lines changed: 5 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,11 @@
11
import { Meta, StoryObj, moduleMetadata } from '@storybook/angular';
2-
import { Ui5WebcomponentsModule, BarComponent } from '@ui5/webcomponents-ngx';
3-
import { extractArgTypes } from '../../arg-type-tools';
2+
import { Ui5WebcomponentsModule } from '@ui5/webcomponents-ngx';
3+
import { BarComponent } from '@ui5/webcomponents-ngx/main/bar';
4+
import { extractArgTypes, extractDescription } from '../../arg-type-tools';
45

56
const description = `
6-
### Overview
7-
The Bar is a container which is primarily used to hold titles, buttons and input elements and its design and functionality is the basis for page headers and footers. The component consists of three areas to hold its content - startContent slot, default slot and endContent slot. It has the capability to center content, such as a title, while having other components on the left and right side.
87
9-
### Usage
10-
11-
With the use of the design property, you can set the style of the Bar to appear designed like a Header, Subheader, Footer and FloatingFooter. <br> <b>Note:</b> Do not place a Bar inside another Bar or inside any bar-like component. Doing so may cause unpredictable behavior.
12-
13-
### Responsive Behavior
14-
15-
The default slot will be centered in the available space between the startContent and the endContent areas, therefore it might not always be centered in the entire bar.
16-
17-
### CSS Shadow Parts
18-
19-
<ui5-link target="_blank" href="https://developer.mozilla.org/en-US/docs/Web/CSS/::part">CSS Shadow Parts</ui5-link> allow developers to style elements inside the Shadow DOM. <br> The <code>ui5-bar</code> exposes the following CSS Shadow Parts: <ul> <li>bar - Used to style the wrapper of the content of the component</li> </ul>
20-
21-
### Keyboard Handling
22-
23-
#### Fast Navigation
24-
25-
This component provides a build in fast navigation group which can be used via <code>F6 / Shift + F6</code> or <code> Ctrl + Alt(Option) + Down / Ctrl + Alt(Option) + Up</code>. In order to use this functionality, you need to import the following module: <code>import "@ui5/webcomponents-base/dist/features/F6Navigation.js"</code> <br><br>
26-
27-
### ES6 Module Import
8+
### Module Import
289
2910
<code>import { BarComponent } from "@ui5/webcomponents-ngx/main/bar";</code>`;
3011
export default {
@@ -39,7 +20,7 @@ export default {
3920
docs: {
4021
extractArgTypes,
4122
description: {
42-
component: description,
23+
component: extractDescription('BarComponent', BarComponent, description),
4324
},
4425
},
4526
},
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
import { Meta, StoryObj, moduleMetadata } from '@storybook/angular';
2+
import { Ui5WebcomponentsModule } from '@ui5/webcomponents-ngx';
3+
import { BreadcrumbsItemComponent } from '@ui5/webcomponents-ngx/main/breadcrumbs-item';
4+
import { extractArgTypes, extractDescription } from '../../arg-type-tools';
5+
6+
const description = `
7+
8+
### Module Import
9+
10+
<code>import { BreadcrumbsItemComponent } from "@ui5/webcomponents-ngx/main/breadcrumbs-item";</code>
11+
`;
12+
13+
export default {
14+
title: 'UI5 Web Components / Main / Breadcrumbs / BreadcrumbsItem',
15+
component: BreadcrumbsItemComponent,
16+
decorators: [
17+
moduleMetadata({
18+
imports: [
19+
Ui5WebcomponentsModule,
20+
BreadcrumbsItemComponent
21+
],
22+
}),
23+
],
24+
parameters: {
25+
docs: {
26+
extractArgTypes,
27+
description: {
28+
component: extractDescription( 'BreadcrumbsItemComponent', BreadcrumbsItemComponent, description),
29+
},
30+
},
31+
},
32+
} as Meta;
33+
34+
35+
export const BreadcrumbsItem: StoryObj<BreadcrumbsItemComponent> = {
36+
render: (args) => ({
37+
props: args,
38+
template: `
39+
`,
40+
}),
41+
};

apps/documentation/src/app/stories/main/breadcrumbs.stories.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import { Meta, StoryObj, moduleMetadata } from '@storybook/angular';
2-
import {
3-
Ui5WebcomponentsModule,
4-
BreadcrumbsComponent,
5-
} from '@ui5/webcomponents-ngx';
6-
import { extractArgTypes } from '../../arg-type-tools';
2+
import { Ui5WebcomponentsModule } from '@ui5/webcomponents-ngx';
3+
import { BreadcrumbsComponent } from '@ui5/webcomponents-ngx/main/breadcrumbs';
4+
import { extractArgTypes, extractDescription } from '../../arg-type-tools';
75

8-
const description = `### Overview Enables users to navigate between items by providing a list of links to previous steps in the user's navigation path. It helps the user to be aware of their location within the application and allows faster navigation. <br><br> The last three steps can be accessed as links directly, while the remaining links prior to them are available in a drop-down menu. <br><br> You can choose the type of separator to be used from a number of predefined options.
6+
const description = `
97
10-
<h3>Keyboard Handling</h3> The <code>ui5-breadcrumbs</code> provides advanced keyboard handling. <br> <ul> <li>[F4, ALT+UP, ALT+DOWN, SPACE, ENTER] - If the dropdown arrow is focused - opens/closes the drop-down.</li> <li>[SPACE, ENTER] - Activates the focused item and triggers the <code>item-click</code> event.</li> <li>[ESC] - Closes the drop-down.</li> <li>[LEFT] - If the drop-down is closed - navigates one item to the left.</li> <li>[RIGHT] - If the drop-down is closed - navigates one item to the right.</li> <li>[UP] - If the drop-down is open - moves focus to the next item.</li> <li>[DOWN] - If the drop-down is open - moves focus to the previous item.</li> <li>[HOME] - Navigates to the first item.</li> <li>[END] - Navigates to the last item.</li> </ul> <br>`;
8+
<h3>Module Import</h3>
9+
10+
<code>import { BreadcrumbsComponent } from "@ui5/webcomponents-ngx/main/breadcrumbs";</code>`;
1111
export default {
1212
title: 'UI5 Web Components / Main / Breadcrumbs',
1313
component: BreadcrumbsComponent,
@@ -20,7 +20,7 @@ export default {
2020
docs: {
2121
extractArgTypes,
2222
description: {
23-
component: description,
23+
component: extractDescription('BreadcrumbsComponent', BreadcrumbsComponent, description)
2424
},
2525
},
2626
},

apps/documentation/src/app/stories/main/busyindicator.stories.ts

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,11 @@
11
import { Meta, StoryObj, moduleMetadata } from '@storybook/angular';
2-
import {
3-
Ui5WebcomponentsModule,
4-
BusyIndicatorComponent,
5-
} from '@ui5/webcomponents-ngx';
6-
import { extractArgTypes } from '../../arg-type-tools';
2+
import { Ui5WebcomponentsModule } from '@ui5/webcomponents-ngx';
3+
import { BusyIndicatorComponent } from '@ui5/webcomponents-ngx/main/busy-indicator';
4+
import { extractArgTypes, extractDescription } from '../../arg-type-tools';
75

8-
const description = `### Overview
6+
const description = `
97
10-
The <code>ui5-busy-indicator</code> signals that some operation is going on and that the user must wait. It does not block the current UI screen so other operations could be triggered in parallel. It displays 3 dots and each dot expands and shrinks at a different rate, resulting in a cascading flow of animation.
11-
12-
<h3>Usage</h3> For the <code>ui5-busy-indicator</code> you can define the size, the text and whether it is shown or hidden. In order to hide it, use the "active" property. <br><br> In order to show busy state over an HTML element, simply nest the HTML element in a <code>ui5-busy-indicator</code> instance. <br> <b>Note:</b> Since <code>ui5-busy-indicator</code> has <code>display: inline-block;</code> by default and no width of its own, whenever you need to wrap a block-level element, you should set <code>display: block</code> to the busy indicator as well.
13-
14-
<h4>When to use:</h4> <ul> <li>The user needs to be able to cancel the operation.</li> <li>Only part of the application or a particular component is affected.</li> </ul>
15-
16-
<h4>When not to use:</h4> <ul> <li>The operation takes less than one second.</li> <li>You need to block the screen and prevent the user from starting another activity.</li> <li>Do not show multiple busy indicators at once.</li> </ul>
17-
18-
<h3>ES6 Module Import</h3>
8+
<h3>Module Import</h3>
199
2010
<code>import { BusyIndicatorComponent } from "@ui5/webcomponents-ngx/main/busy-indicator";</code>`;
2111
export default {
@@ -30,7 +20,7 @@ export default {
3020
docs: {
3121
extractArgTypes,
3222
description: {
33-
component: description,
23+
component: extractDescription('BusyIndicatorComponent', BusyIndicatorComponent, description),
3424
},
3525
},
3626
},
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
import { Meta, StoryObj, moduleMetadata } from '@storybook/angular';
2+
import { Ui5WebcomponentsModule } from '@ui5/webcomponents-ngx';
3+
import { ButtonBadgeComponent } from '@ui5/webcomponents-ngx/main/button-badge';
4+
import { extractArgTypes, extractDescription } from '../../arg-type-tools';
5+
6+
const description = `
7+
8+
### Module Import
9+
10+
<code>import { ButtonBadgeComponent } from "@ui5/webcomponents-ngx/main/button-badge";</code>
11+
`;
12+
13+
export default {
14+
title: 'UI5 Web Components / Main / Button / ButtonBadge',
15+
component: ButtonBadgeComponent,
16+
decorators: [
17+
moduleMetadata({
18+
imports: [
19+
Ui5WebcomponentsModule,
20+
ButtonBadgeComponent
21+
],
22+
}),
23+
],
24+
parameters: {
25+
docs: {
26+
extractArgTypes,
27+
description: {
28+
component: extractDescription( 'ButtonBadgeComponent', ButtonBadgeComponent, description),
29+
},
30+
},
31+
},
32+
} as Meta;
33+
34+
35+
export const ButtonBadge: StoryObj<ButtonBadgeComponent> = {
36+
render: (args) => ({
37+
props: args,
38+
template: `
39+
`,
40+
}),
41+
};

apps/documentation/src/app/stories/main/button.stories.ts

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,11 @@
11
import { Meta, StoryObj, moduleMetadata } from '@storybook/angular';
2-
import {
3-
Ui5WebcomponentsModule,
4-
ButtonComponent,
5-
} from '@ui5/webcomponents-ngx';
6-
import { extractArgTypes } from '../../arg-type-tools';
2+
import { Ui5WebcomponentsModule } from '@ui5/webcomponents-ngx';
3+
import { ButtonComponent } from '@ui5/webcomponents-ngx/main/button';
4+
import { extractArgTypes, extractDescription } from '../../arg-type-tools';
75

8-
const description = `### Overview
6+
const description = `
97
10-
The <code>ui5-button</code> component represents a simple push button. It enables users to trigger actions by clicking or tapping the <code>ui5-button</code>, or by pressing certain keyboard keys, such as Enter.
11-
12-
<h3>Usage</h3>
13-
14-
For the <code>ui5-button</code> UI, you can define text, icon, or both. You can also specify whether the text or the icon is displayed first. <br><br> You can choose from a set of predefined types that offer different styling to correspond to the triggered action. <br><br> You can set the <code>ui5-button</code> as enabled or disabled. An enabled <code>ui5-button</code> can be pressed by clicking or tapping it. The button changes its style to provide visual feedback to the user that it is pressed or hovered over with the mouse cursor. A disabled <code>ui5-button</code> appears inactive and cannot be pressed.
15-
16-
<h3>CSS Shadow Parts</h3>
17-
18-
<ui5-link target="_blank" href="https://developer.mozilla.org/en-US/docs/Web/CSS/::part">CSS Shadow Parts</ui5-link> allow developers to style elements inside the Shadow DOM. <br> The <code>ui5-button</code> exposes the following CSS Shadow Parts: <ul> <li>button - Used to style the native button element</li> </ul>
19-
20-
<h3>ES6 Module Import</h3>
8+
<h3>Module Import</h3>
219
2210
<code>import { ButtonComponent } from "@ui5/webcomponents-ngx/main/button";</code>`;
2311
export default {
@@ -32,7 +20,7 @@ export default {
3220
docs: {
3321
extractArgTypes,
3422
description: {
35-
component: description,
23+
component: extractDescription('ButtonComponent', ButtonComponent, description),
3624
},
3725
},
3826
},
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
import { Meta, StoryObj, moduleMetadata } from '@storybook/angular';
2+
import { Ui5WebcomponentsModule } from '@ui5/webcomponents-ngx';
3+
import { CalendarDateRangeComponent } from '@ui5/webcomponents-ngx/main/calendar-date-range';
4+
import { extractArgTypes, extractDescription } from '../../arg-type-tools';
5+
6+
const description = `
7+
8+
### Module Import
9+
10+
<code>import { CalendarDateRangeComponent } from "@ui5/webcomponents-ngx/main/calendar-date-range";</code>
11+
`;
12+
13+
export default {
14+
title: 'UI5 Web Components / Main / Calendar / CalendarDateRange',
15+
component: CalendarDateRangeComponent,
16+
decorators: [
17+
moduleMetadata({
18+
imports: [
19+
Ui5WebcomponentsModule,
20+
CalendarDateRangeComponent
21+
],
22+
}),
23+
],
24+
parameters: {
25+
docs: {
26+
extractArgTypes,
27+
description: {
28+
component: extractDescription( 'CalendarDateRangeComponent', CalendarDateRangeComponent, description),
29+
},
30+
},
31+
},
32+
} as Meta;
33+
34+
35+
export const CalendarDateRange: StoryObj<CalendarDateRangeComponent> = {
36+
render: (args) => ({
37+
props: args,
38+
template: `
39+
`,
40+
}),
41+
};

0 commit comments

Comments
 (0)