@fundamental-styles/mcp 0.41.7-rc.8 → 0.41.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/data/AI_USAGE.md +425 -0
- package/data/CHANGELOG.md +53 -3
- package/data/component-catalog.json +62 -209
- package/data/components/README.md +281 -0
- package/data/components/action-bar.md +443 -0
- package/data/components/ai-busy-indicator.md +79 -0
- package/data/components/ai-loading-bar.md +66 -0
- package/data/components/avatar-btp.md +198 -0
- package/data/components/avatar-group.md +2660 -0
- package/data/components/avatar-product-switch.md +476 -0
- package/data/components/avatar.md +993 -0
- package/data/components/bar.md +574 -0
- package/data/components/border-radius.md +148 -0
- package/data/components/border.md +412 -0
- package/data/components/breadcrumb.md +546 -0
- package/data/components/button-2.md +440 -0
- package/data/components/button-action-sheet.md +292 -0
- package/data/components/button-ai.md +730 -0
- package/data/components/button-btp.md +223 -0
- package/data/components/button-button.md +233 -0
- package/data/components/button-counter.md +176 -0
- package/data/components/button-patterns.md +731 -0
- package/data/components/button-split.md +459 -0
- package/data/components/button.md +469 -0
- package/data/components/calendar.md +5784 -0
- package/data/components/card-card-media.md +707 -0
- package/data/components/card-card.md +2426 -0
- package/data/components/card-layouts.md +1201 -0
- package/data/components/card.md +2404 -0
- package/data/components/carousel.md +1506 -0
- package/data/components/code.md +139 -0
- package/data/components/component-reset.md +272 -0
- package/data/components/components-icons-businesssuiteinappsymbol-icons.md +85 -0
- package/data/components/components-icons-sap-icons.md +147 -0
- package/data/components/components-icons-tnt-icons.md +85 -0
- package/data/components/container-queries.md +221 -0
- package/data/components/container.md +227 -0
- package/data/components/dialog-docs-static-busy-indicator.md +165 -0
- package/data/components/dialog-docs-static-dialog.md +949 -0
- package/data/components/dialog-docs-static-patterns.md +147 -0
- package/data/components/dialog-docs-static-settings.md +528 -0
- package/data/components/dialog-docs-static.md +982 -0
- package/data/components/dialog.md +606 -0
- package/data/components/dynamic-page-dynamic-page.md +1914 -0
- package/data/components/dynamic-page.md +973 -0
- package/data/components/dynamic-side.md +197 -0
- package/data/components/elevation.md +110 -0
- package/data/components/feed-input.md +346 -0
- package/data/components/feed-list.md +580 -0
- package/data/components/fieldset-2.md +292 -0
- package/data/components/fieldset-forms.md +169 -0
- package/data/components/fieldset.md +381 -0
- package/data/components/flexible-column-layout.md +205 -0
- package/data/components/form-group.md +287 -0
- package/data/components/form-header.md +71 -0
- package/data/components/form-item-2.md +98 -0
- package/data/components/form-item-3.md +134 -0
- package/data/components/form-item-4.md +556 -0
- package/data/components/form-item-5.md +182 -0
- package/data/components/form-item-6.md +539 -0
- package/data/components/form-item-7.md +239 -0
- package/data/components/form-item-ai.md +158 -0
- package/data/components/form-item-file-uploader.md +445 -0
- package/data/components/form-item-forms.md +234 -0
- package/data/components/form-item-patterns.md +426 -0
- package/data/components/form-item.md +464 -0
- package/data/components/form-label-ai.md +126 -0
- package/data/components/form-label-layouts.md +306 -0
- package/data/components/form-label-patterns.md +1175 -0
- package/data/components/form-label-status-indicator.md +1083 -0
- package/data/components/form-label-step-input.md +620 -0
- package/data/components/form-label.md +2876 -0
- package/data/components/generic-tag.md +747 -0
- package/data/components/grid-list-grid-list.md +1185 -0
- package/data/components/grid-list.md +1449 -0
- package/data/components/heading.md +66 -0
- package/data/components/horizontal-navigation.md +568 -0
- package/data/components/icon-tab-bar-dev.md +190 -0
- package/data/components/icon-tab-bar.md +2620 -0
- package/data/components/icon.md +171 -0
- package/data/components/iconBusinessSuite.md +92 -0
- package/data/components/iconTnt.md +92 -0
- package/data/components/illustrated-message.md +439 -0
- package/data/components/info-label.md +348 -0
- package/data/components/input-group.md +2068 -0
- package/data/components/label.md +66 -0
- package/data/components/layout-grid.md +447 -0
- package/data/components/layout-panel.md +261 -0
- package/data/components/layouts-layout-grid.md +608 -0
- package/data/components/layouts-paddings.md +133 -0
- package/data/components/layouts-section.md +287 -0
- package/data/components/list-2.md +148 -0
- package/data/components/list-3.md +735 -0
- package/data/components/list-list.md +790 -0
- package/data/components/list-object-list.md +1225 -0
- package/data/components/list.md +1286 -0
- package/data/components/media-queries.md +168 -0
- package/data/components/menu.md +946 -0
- package/data/components/message-box-docs-static-ai.md +149 -0
- package/data/components/message-box-docs-static.md +527 -0
- package/data/components/message-page-upload-collection.md +678 -0
- package/data/components/message-page.md +256 -0
- package/data/components/message-strip.md +977 -0
- package/data/components/message-toast.md +119 -0
- package/data/components/micro-process-flow.md +991 -0
- package/data/components/navigation-menu.md +366 -0
- package/data/components/navigation-navigation.md +1245 -0
- package/data/components/navigation.md +2604 -0
- package/data/components/numeric-content.md +317 -0
- package/data/components/object-attribute.md +96 -0
- package/data/components/object-identifier.md +227 -0
- package/data/components/object-marker.md +202 -0
- package/data/components/object-number.md +327 -0
- package/data/components/object-status.md +1538 -0
- package/data/components/off-screen.md +87 -0
- package/data/components/overflow.md +97 -0
- package/data/components/padding.md +122 -0
- package/data/components/paddings.md +130 -0
- package/data/components/page.md +300 -0
- package/data/components/pagination.md +672 -0
- package/data/components/panel-layouts.md +345 -0
- package/data/components/panel.md +514 -0
- package/data/components/patterns-label.md +74 -0
- package/data/components/popover-2.md +906 -0
- package/data/components/popover-ai.md +466 -0
- package/data/components/popover-btp.md +886 -0
- package/data/components/popover-deprecated.md +308 -0
- package/data/components/popover-message-popover.md +683 -0
- package/data/components/popover-notification.md +1511 -0
- package/data/components/popover-patterns.md +1100 -0
- package/data/components/popover-popover.md +1862 -0
- package/data/components/popover-quick-view.md +385 -0
- package/data/components/popover-timepicker.md +1836 -0
- package/data/components/popover-user-menu.md +1303 -0
- package/data/components/popover.md +1938 -0
- package/data/components/progress-indicator.md +351 -0
- package/data/components/prompt-input-ai.md +226 -0
- package/data/components/prompt-input.md +226 -0
- package/data/components/rating-indicator.md +1469 -0
- package/data/components/resizable-card-layout.md +951 -0
- package/data/components/scrollbar.md +86 -0
- package/data/components/search-field.md +287 -0
- package/data/components/section.md +250 -0
- package/data/components/segmented-button.md +324 -0
- package/data/components/shellbar.md +2183 -0
- package/data/components/side-nav.md +1562 -0
- package/data/components/skeleton.md +243 -0
- package/data/components/slider.md +395 -0
- package/data/components/splitter.md +353 -0
- package/data/components/table.md +2749 -0
- package/data/components/tabs.md +658 -0
- package/data/components/text-text.md +380 -0
- package/data/components/text.md +253 -0
- package/data/components/tile.md +1132 -0
- package/data/components/time.md +818 -0
- package/data/components/title.md +153 -0
- package/data/components/titles.md +83 -0
- package/data/components/token.md +311 -0
- package/data/components/tokenizer.md +398 -0
- package/data/components/tool-header.md +1352 -0
- package/data/components/tool-layout.md +199 -0
- package/data/components/toolbar-ai.md +174 -0
- package/data/components/toolbar-btp.md +526 -0
- package/data/components/toolbar-title-bar.md +473 -0
- package/data/components/toolbar.md +432 -0
- package/data/components/tree.md +1031 -0
- package/data/components/typography.md +435 -0
- package/data/components/variant-management.md +360 -0
- package/data/components/vertical-nav.md +589 -0
- package/data/components/wizard.md +1429 -0
- package/data/examples/Components/dialog/device-specifications.example.html +39 -30
- package/data/examples/Components/shellbar/optional-items.example.html +210 -157
- package/data/examples/Components/shellbar/overflow-toolbar.example.html +202 -177
- package/data/examples/Components/shellbar/responsive-paddings.example.html +217 -146
- package/data/examples/Components/shellbar/responsiveness.example.html +825 -613
- package/data/examples/Components/user-menu/default.example.html +241 -83
- package/data/schemas/badge.schema.json +1 -1
- package/data/schemas/button-split.schema.json +1 -1
- package/data/schemas/component-frontmatter.schema.json +123 -0
- package/data/schemas/component-markdown.schema.json +81 -0
- package/data/schemas/counter.schema.json +1 -1
- package/data/schemas/dynamic-page.schema.json +1 -1
- package/data/schemas/dynamic-side-content.schema.json +1 -1
- package/data/schemas/facet.schema.json +1 -1
- package/data/schemas/fieldset.schema.json +1 -1
- package/data/schemas/flexible-column-layout.schema.json +1 -1
- package/data/schemas/form-group.schema.json +3 -2
- package/data/schemas/form-header.schema.json +1 -1
- package/data/schemas/form-label.schema.json +1 -0
- package/data/schemas/form-message.schema.json +1 -1
- package/data/schemas/grid-list.schema.json +1 -1
- package/data/schemas/input-group.schema.json +1 -1
- package/data/schemas/layout-panel.schema.json +1 -1
- package/data/schemas/page.schema.json +1 -1
- package/data/schemas/quick-view.schema.json +2 -1
- package/data/schemas/section.schema.json +1 -1
- package/data/schemas/side-nav.schema.json +1 -1
- package/data/schemas/splitter.schema.json +1 -1
- package/data/schemas/tabs.schema.json +1 -1
- package/data/schemas/tile.schema.json +1 -1
- package/data/schemas/tool-layout.schema.json +1 -1
- package/data/schemas/user-menu.schema.json +10 -0
- package/data/schemas/wizard.schema.json +1 -1
- package/package.json +1 -1
- package/src/data/load-catalog.d.ts +2 -0
- package/src/data/load-catalog.js +5 -1
- package/src/data/load-catalog.js.map +1 -1
- package/src/data/load-markdown-docs.d.ts +44 -0
- package/src/data/load-markdown-docs.js +179 -0
- package/src/data/load-markdown-docs.js.map +1 -0
- package/src/data/markdown-cache.d.ts +60 -0
- package/src/data/markdown-cache.js +218 -0
- package/src/data/markdown-cache.js.map +1 -0
- package/src/server.js +72 -1
- package/src/server.js.map +1 -1
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
---
|
|
2
|
+
component: fd-form-item
|
|
3
|
+
title: Components/Forms/Textarea
|
|
4
|
+
category: Components
|
|
5
|
+
selector: fd-form-item
|
|
6
|
+
cssFile: form-item.css
|
|
7
|
+
sourcePath: packages/styles/stories/Components/Forms/textarea/textarea.stories.js
|
|
8
|
+
generatedAt: 2026-05-28T16:01:41.676Z
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Components/Forms/Textarea
|
|
12
|
+
|
|
13
|
+
The text area is an input component that allows the user to enter several lines of text.
|
|
14
|
+
Use the text area if you want users to enter multiple lines of unformatted text.
|
|
15
|
+
|
|
16
|
+
Do not use the text area if
|
|
17
|
+
|
|
18
|
+
- You only want them to enter a single line of text, use the input component instead.
|
|
19
|
+
- Users need to enter formatted text. Use the rich text editor instead.
|
|
20
|
+
|
|
21
|
+
## Installation
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
npm install fundamental-styles
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
```html
|
|
28
|
+
<!-- Include theme -->
|
|
29
|
+
<link href="node_modules/fundamental-styles/dist/theming/sap_horizon.css" rel="stylesheet">
|
|
30
|
+
|
|
31
|
+
<!-- Include component CSS -->
|
|
32
|
+
<link href="node_modules/fundamental-styles/dist/form-item.css" rel="stylesheet">
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Basic Usage
|
|
36
|
+
|
|
37
|
+
```html
|
|
38
|
+
<div class="fd-form-item">
|
|
39
|
+
<label class="fd-form-label" for="textarea-1">Message:</label>
|
|
40
|
+
<textarea class="fd-textarea" id="textarea-1" placeholder="Write something here" rows="4" aria-required="false"></textarea>
|
|
41
|
+
</div>
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## States
|
|
45
|
+
|
|
46
|
+
| Class | Description |
|
|
47
|
+
|-------|-------------|
|
|
48
|
+
| `is-error` | Error state |
|
|
49
|
+
| `is-focus` | Focus state |
|
|
50
|
+
| `is-information` | Information state |
|
|
51
|
+
| `is-success` | Success state |
|
|
52
|
+
| `is-warning` | Warning state |
|
|
53
|
+
|
|
54
|
+
## Examples
|
|
55
|
+
|
|
56
|
+
### Primary
|
|
57
|
+
|
|
58
|
+
```html
|
|
59
|
+
<div class="fd-form-item">
|
|
60
|
+
<label class="fd-form-label" for="textarea-1">Message:</label>
|
|
61
|
+
<textarea class="fd-textarea" id="textarea-1" placeholder="Write something here" rows="4" aria-required="false"></textarea>
|
|
62
|
+
</div>
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### Counter
|
|
66
|
+
|
|
67
|
+
Textarea can have a counter to display the number of characters entered or left to type. The counter is displayed below the textarea.
|
|
68
|
+
|
|
69
|
+
```html
|
|
70
|
+
<div class="fd-form-item">
|
|
71
|
+
<label class="fd-form-label" for="textarea-2">Message</label>
|
|
72
|
+
|
|
73
|
+
<textarea
|
|
74
|
+
class="fd-textarea"
|
|
75
|
+
id="textarea-2"
|
|
76
|
+
name="message"
|
|
77
|
+
rows="4"
|
|
78
|
+
maxlength="200"
|
|
79
|
+
aria-required="false"
|
|
80
|
+
placeholder="Write something here"
|
|
81
|
+
aria-labelledby="textarea-2-counter"
|
|
82
|
+
></textarea>
|
|
83
|
+
|
|
84
|
+
<div class="fd-textarea-counter" id="textarea-2-counter">
|
|
85
|
+
200 characters left
|
|
86
|
+
</div>
|
|
87
|
+
</div>
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### DisabledAndReadOnly
|
|
91
|
+
|
|
92
|
+
```html
|
|
93
|
+
<div class="fd-form-item">
|
|
94
|
+
<label class="fd-form-label" for="textarea-7" aria-disabled="true">Message (Disabled)</label>
|
|
95
|
+
<textarea
|
|
96
|
+
class="fd-textarea"
|
|
97
|
+
rows="2"
|
|
98
|
+
id="textarea-7"
|
|
99
|
+
name="message-disabled"
|
|
100
|
+
aria-required="false"
|
|
101
|
+
disabled
|
|
102
|
+
aria-disabled="true">Disabled textarea
|
|
103
|
+
</textarea>
|
|
104
|
+
</div>
|
|
105
|
+
|
|
106
|
+
<br><br>
|
|
107
|
+
|
|
108
|
+
<div class="fd-form-item">
|
|
109
|
+
<label class="fd-form-label" for="textarea-8">Message (Read-Only)</label>
|
|
110
|
+
<textarea
|
|
111
|
+
class="fd-textarea"
|
|
112
|
+
rows="2"
|
|
113
|
+
id="textarea-8"
|
|
114
|
+
name="message-readonly"
|
|
115
|
+
aria-required="false"
|
|
116
|
+
readonly
|
|
117
|
+
aria-readonly="true">Read Only textarea
|
|
118
|
+
</textarea>
|
|
119
|
+
</div>
|
|
120
|
+
|
|
121
|
+
<br><br>
|
|
122
|
+
|
|
123
|
+
<div class="fd-form-item">
|
|
124
|
+
<label class="fd-form-label" for="textarea-9">Message (Read-Only & Focused)</label>
|
|
125
|
+
<textarea
|
|
126
|
+
class="fd-textarea is-focus"
|
|
127
|
+
rows="2"
|
|
128
|
+
id="textarea-9"
|
|
129
|
+
name="message-readonly-focus"
|
|
130
|
+
aria-required="false"
|
|
131
|
+
readonly
|
|
132
|
+
aria-readonly="true"
|
|
133
|
+
>Focused Read Only textarea</textarea>
|
|
134
|
+
</div>
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
### States
|
|
138
|
+
|
|
139
|
+
As with any other input component, you can validate the fields and show the result as a value state of the component. Possible value states are error, warning, success, information, or neutral (none).
|
|
140
|
+
|
|
141
|
+
```html
|
|
142
|
+
<div class="fd-form-item">
|
|
143
|
+
<label class="fd-form-label" for="textarea-3">Success message:</label>
|
|
144
|
+
<div class="fd-popover">
|
|
145
|
+
<div class="fd-popover__control" aria-controls="popoverT51" aria-expanded="true" aria-haspopup="true">
|
|
146
|
+
<textarea
|
|
147
|
+
class="fd-textarea is-success"
|
|
148
|
+
rows="2"
|
|
149
|
+
id="textarea-3"
|
|
150
|
+
placeholder="Enter your message here"
|
|
151
|
+
aria-required="false"
|
|
152
|
+
aria-labelledby="textarea-3-count"
|
|
153
|
+
aria-describedby="textarea-3-message popoverT51"></textarea>
|
|
154
|
+
<div class="fd-textarea__sr-only" id="textarea-3-message">Value State Success</div>
|
|
155
|
+
</div>
|
|
156
|
+
<div class="fd-popover__body fd-popover__body--input-message-group fd-popover__body--no-arrow" aria-hidden="false" id="popoverT51">
|
|
157
|
+
<div class="fd-form-message fd-form-message--success">Your input was successfully saved.</div>
|
|
158
|
+
</div>
|
|
159
|
+
</div>
|
|
160
|
+
<div class="fd-textarea-counter" id="textarea-3-count">150 characters remaining</div>
|
|
161
|
+
</div>
|
|
162
|
+
|
|
163
|
+
<br><br>
|
|
164
|
+
|
|
165
|
+
<div class="fd-form-item">
|
|
166
|
+
<label class="fd-form-label" for="textarea-4">Error message:</label>
|
|
167
|
+
<div class="fd-popover">
|
|
168
|
+
<div class="fd-popover__control" aria-controls="popoverT52" aria-expanded="true" aria-haspopup="true">
|
|
169
|
+
<textarea
|
|
170
|
+
class="fd-textarea is-error"
|
|
171
|
+
rows="2"
|
|
172
|
+
id="textarea-4"
|
|
173
|
+
placeholder="Enter your message here"
|
|
174
|
+
aria-required="false"
|
|
175
|
+
aria-invalid="true"
|
|
176
|
+
aria-describedby="textarea-4-message popoverT52"></textarea>
|
|
177
|
+
<div class="fd-textarea__sr-only" id="textarea-4-message">Value State Error</div>
|
|
178
|
+
</div>
|
|
179
|
+
<div class="fd-popover__body fd-popover__body--input-message-group fd-popover__body--no-arrow" aria-hidden="false" id="popoverT52">
|
|
180
|
+
<div class="fd-form-message fd-form-message--error">Please correct the highlighted error.</div>
|
|
181
|
+
</div>
|
|
182
|
+
</div>
|
|
183
|
+
</div>
|
|
184
|
+
|
|
185
|
+
<br><br><br><br>
|
|
186
|
+
|
|
187
|
+
<div class="fd-form-item">
|
|
188
|
+
<label class="fd-form-label" for="textarea-5">Warning message:</label>
|
|
189
|
+
<div class="fd-popover">
|
|
190
|
+
<div class="fd-popover__control" aria-controls="popoverT53" aria-expanded="true" aria-haspopup="true">
|
|
191
|
+
<textarea
|
|
192
|
+
class="fd-textarea is-warning"
|
|
193
|
+
rows="2"
|
|
194
|
+
id="textarea-5"
|
|
195
|
+
placeholder="Enter your message here"
|
|
196
|
+
aria-required="false"
|
|
197
|
+
aria-describedby="textarea-5-message popoverT53"></textarea>
|
|
198
|
+
<div class="fd-textarea__sr-only" id="textarea-5-message">Value State Warning</div>
|
|
199
|
+
</div>
|
|
200
|
+
<div class="fd-popover__body fd-popover__body--input-message-group fd-popover__body--no-arrow" aria-hidden="false" id="popoverT53">
|
|
201
|
+
<div class="fd-form-message fd-form-message--warning">Please review your input for potential issues.</div>
|
|
202
|
+
</div>
|
|
203
|
+
</div>
|
|
204
|
+
</div>
|
|
205
|
+
|
|
206
|
+
<br><br><br><br>
|
|
207
|
+
|
|
208
|
+
<div class="fd-form-item">
|
|
209
|
+
<label class="fd-form-label" for="textarea-6">Information message:</label>
|
|
210
|
+
<div class="fd-popover">
|
|
211
|
+
<div class="fd-popover__control" aria-controls="popoverT54" aria-expanded="true" aria-haspopup="true">
|
|
212
|
+
<textarea
|
|
213
|
+
class="fd-textarea is-information"
|
|
214
|
+
rows="2"
|
|
215
|
+
id="textarea-6"
|
|
216
|
+
placeholder="Enter your message here"
|
|
217
|
+
aria-required="false"
|
|
218
|
+
aria-describedby="textarea-6-message popoverT54"></textarea>
|
|
219
|
+
<div class="fd-textarea__sr-only" id="textarea-6-message">Value State Information</div>
|
|
220
|
+
</div>
|
|
221
|
+
<div class="fd-popover__body fd-popover__body--input-message-group fd-popover__body--no-arrow" aria-hidden="false" id="popoverT54">
|
|
222
|
+
<div class="fd-form-message fd-form-message--information">This is additional information about your input.</div>
|
|
223
|
+
</div>
|
|
224
|
+
</div>
|
|
225
|
+
</div>
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
## Accessibility
|
|
229
|
+
|
|
230
|
+
- Use semantic HTML elements where appropriate
|
|
231
|
+
- Include proper ARIA attributes for interactive elements
|
|
232
|
+
- Ensure keyboard navigation support
|
|
233
|
+
- Provide adequate color contrast
|
|
234
|
+
|
|
235
|
+
## Source
|
|
236
|
+
|
|
237
|
+
This documentation was automatically generated from: `packages/styles/stories/Components/Forms/textarea/textarea.stories.js`
|
|
238
|
+
|
|
239
|
+
For the latest updates and interactive examples, see [Storybook](https://sap.github.io/fundamental-styles/).
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
---
|
|
2
|
+
component: fd-form-item
|
|
3
|
+
title: AI/Patterns/Progress Indicator
|
|
4
|
+
category: AI
|
|
5
|
+
selector: fd-form-item
|
|
6
|
+
cssFile: form-item.css
|
|
7
|
+
sourcePath: packages/styles/stories/AI/Patterns/ai-progress-indicator/ai-progress-indicator.stories.js
|
|
8
|
+
tags: ["ai","experimental"]
|
|
9
|
+
dependencies: []
|
|
10
|
+
relatedComponents: []
|
|
11
|
+
stability: experimental
|
|
12
|
+
generatedAt: 2026-06-09T18:29:01.791Z
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
# AI/Patterns/Progress Indicator
|
|
16
|
+
|
|
17
|
+
> **🧪 EXPERIMENTAL**: This component is experimental and its API may change.
|
|
18
|
+
|
|
19
|
+
AI Progress Indicator provides information about the status of a user's request while they wait for the content to be generated. The main goal of this pattern is to keep the user engaged and informed, manage their expectations and show that the system is actively working.
|
|
20
|
+
<br><br>
|
|
21
|
+
<b>Use Progress Indicator: </b>
|
|
22
|
+
<ul>
|
|
23
|
+
<li>when the duration of the AI generation process is uncertain</li>
|
|
24
|
+
<li>to show users that the system is actively working</li>
|
|
25
|
+
<li>when you need to keep users informed about the status of their request</li>
|
|
26
|
+
<li>to provide real-time updates on the progress of the AI task</li>
|
|
27
|
+
</ul><br>
|
|
28
|
+
<b>Do not use Progress Indicator: </b>
|
|
29
|
+
<ul>
|
|
30
|
+
<li>for operations that take less than one second</li>
|
|
31
|
+
<li>when providing a time estimate for the process</li>
|
|
32
|
+
<li>in non-AI scenarios</li>
|
|
33
|
+
</ul>
|
|
34
|
+
<b>Note: The component is in an experimental state.</b>
|
|
35
|
+
|
|
36
|
+
## Installation
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
npm install fundamental-styles
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
```html
|
|
43
|
+
<!-- Include theme -->
|
|
44
|
+
<link href="node_modules/fundamental-styles/dist/theming/sap_horizon.css" rel="stylesheet">
|
|
45
|
+
|
|
46
|
+
<!-- Include component CSS -->
|
|
47
|
+
<link href="node_modules/fundamental-styles/dist/form-item.css" rel="stylesheet">
|
|
48
|
+
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Basic Usage
|
|
52
|
+
|
|
53
|
+
```html
|
|
54
|
+
<h4>First loading time (while analyzing the request)</h4>
|
|
55
|
+
<div class="fd-form-item">
|
|
56
|
+
<div class="fd-form-item__label-container">
|
|
57
|
+
<button class="fd-button">
|
|
58
|
+
<i class="sap-icon--stop"></i>
|
|
59
|
+
<span class="fd-button__text">Stop Generating</span>
|
|
60
|
+
</button>
|
|
61
|
+
</div>
|
|
62
|
+
<div class="fd-popover__control" aria-controls="popoverAI1" aria-expanded="false" aria-haspopup="true">
|
|
63
|
+
<div role="textbox" class="fd-textarea fd-textarea--ai is-information" id="textarea-ai-1" placeholder="Write something here" rows="5"><div role="progressbar" aria-valuetext="busy" aria-labelledby="ai-busy-indicator-text" class="fd-ai-busy-indicator">
|
|
64
|
+
<span class="sap-icon sap-icon--ai"></span>
|
|
65
|
+
<span id="ai-busy-indicator-text" class="fd-ai-busy-indicator__text">Analyzing request...</span>
|
|
66
|
+
</div>
|
|
67
|
+
|
|
68
|
+
</div>
|
|
69
|
+
</div>
|
|
70
|
+
</div>
|
|
71
|
+
<h4>Second loading time (while generating the results)</h4>
|
|
72
|
+
<div class="fd-form-item">
|
|
73
|
+
<div class="fd-form-item__label-container">
|
|
74
|
+
<button class="fd-button">
|
|
75
|
+
<i class="sap-icon--stop"></i>
|
|
76
|
+
<span class="fd-button__text">Stop Generating</span>
|
|
77
|
+
</button>
|
|
78
|
+
</div>
|
|
79
|
+
<div class="fd-popover__control" aria-controls="popoverAI1" aria-expanded="false" aria-haspopup="true">
|
|
80
|
+
<div role="textbox" class="fd-textarea fd-textarea--ai is-information" id="textarea-ai-1" placeholder="Write something here" rows="5"><p class="fd-ai-text fd-ai-text--loading">This is a text being generated inside a textarea lorem ipsum dolor sit amet, consectetur adipisicing elit. Voluptatum eligendi quae recusandae rem illum...</p>
|
|
81
|
+
|
|
82
|
+
</div>
|
|
83
|
+
</div>
|
|
84
|
+
</div>
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
## States
|
|
88
|
+
|
|
89
|
+
| Class | Description |
|
|
90
|
+
|-------|-------------|
|
|
91
|
+
| `is-information` | Information state |
|
|
92
|
+
|
|
93
|
+
## BEM Elements
|
|
94
|
+
|
|
95
|
+
This component uses the following BEM elements:
|
|
96
|
+
|
|
97
|
+
- `fd-form-item__label-container`
|
|
98
|
+
|
|
99
|
+
## Examples
|
|
100
|
+
|
|
101
|
+
### AIProgressIndicator
|
|
102
|
+
|
|
103
|
+
AI Progress Indicator pattern extends the following components to enable new AI-specific interactions:
|
|
104
|
+
<ul>
|
|
105
|
+
<li><b>AI button</b> (Stop generating Button): provides user the option to stop the generation at any given time. For more information see AI button.</li>
|
|
106
|
+
<li><b>AI Icon</b>: AI icon with looped animation conveys to users that AI processes are actively underway. Text string keeps users updated on the status of their request. We advise the usage of the standard UI text ”Analyzing request...". For more information see AI busy indicator.</li>
|
|
107
|
+
<li><b>AI Busy Indicator</b>: informs the user about an ongoing operation powered by AI</li>
|
|
108
|
+
<li><b>AI Loading bar</b>: an animated gradient bar visually reinforces that the system is actively processing tasks. For more information see AI loading bar.</li>
|
|
109
|
+
<li><b>Text area</b></li>
|
|
110
|
+
<li><b>Rich text editor</b></li>
|
|
111
|
+
</ul>
|
|
112
|
+
|
|
113
|
+
```html
|
|
114
|
+
<h4>First loading time (while analyzing the request)</h4>
|
|
115
|
+
<div class="fd-form-item">
|
|
116
|
+
<div class="fd-form-item__label-container">
|
|
117
|
+
<button class="fd-button">
|
|
118
|
+
<i class="sap-icon--stop"></i>
|
|
119
|
+
<span class="fd-button__text">Stop Generating</span>
|
|
120
|
+
</button>
|
|
121
|
+
</div>
|
|
122
|
+
<div class="fd-popover__control" aria-controls="popoverAI1" aria-expanded="false" aria-haspopup="true">
|
|
123
|
+
<div role="textbox" class="fd-textarea fd-textarea--ai is-information" id="textarea-ai-1" placeholder="Write something here" rows="5"><div role="progressbar" aria-valuetext="busy" aria-labelledby="ai-busy-indicator-text" class="fd-ai-busy-indicator">
|
|
124
|
+
<span class="sap-icon sap-icon--ai"></span>
|
|
125
|
+
<span id="ai-busy-indicator-text" class="fd-ai-busy-indicator__text">Analyzing request...</span>
|
|
126
|
+
</div>
|
|
127
|
+
|
|
128
|
+
</div>
|
|
129
|
+
</div>
|
|
130
|
+
</div>
|
|
131
|
+
<h4>Second loading time (while generating the results)</h4>
|
|
132
|
+
<div class="fd-form-item">
|
|
133
|
+
<div class="fd-form-item__label-container">
|
|
134
|
+
<button class="fd-button">
|
|
135
|
+
<i class="sap-icon--stop"></i>
|
|
136
|
+
<span class="fd-button__text">Stop Generating</span>
|
|
137
|
+
</button>
|
|
138
|
+
</div>
|
|
139
|
+
<div class="fd-popover__control" aria-controls="popoverAI1" aria-expanded="false" aria-haspopup="true">
|
|
140
|
+
<div role="textbox" class="fd-textarea fd-textarea--ai is-information" id="textarea-ai-1" placeholder="Write something here" rows="5"><p class="fd-ai-text fd-ai-text--loading">This is a text being generated inside a textarea lorem ipsum dolor sit amet, consectetur adipisicing elit. Voluptatum eligendi quae recusandae rem illum...</p>
|
|
141
|
+
|
|
142
|
+
</div>
|
|
143
|
+
</div>
|
|
144
|
+
</div>
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
## Accessibility
|
|
148
|
+
|
|
149
|
+
- Use semantic HTML elements where appropriate
|
|
150
|
+
- Include proper ARIA attributes for interactive elements
|
|
151
|
+
- Ensure keyboard navigation support
|
|
152
|
+
- Provide adequate color contrast
|
|
153
|
+
|
|
154
|
+
## Source
|
|
155
|
+
|
|
156
|
+
This documentation was automatically generated from: `packages/styles/stories/AI/Patterns/ai-progress-indicator/ai-progress-indicator.stories.js`
|
|
157
|
+
|
|
158
|
+
For the latest updates and interactive examples, see [Storybook](https://sap.github.io/fundamental-styles/).
|