@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,466 @@
|
|
|
1
|
+
---
|
|
2
|
+
component: fd-popover
|
|
3
|
+
title: AI/Patterns/Guided Prompt
|
|
4
|
+
category: AI
|
|
5
|
+
selector: fd-popover
|
|
6
|
+
cssFile: popover.css
|
|
7
|
+
sourcePath: packages/styles/stories/AI/Patterns/ai-guided-prompt/ai-guided-prompt.stories.js
|
|
8
|
+
tags: ["ai","experimental"]
|
|
9
|
+
dependencies: []
|
|
10
|
+
relatedComponents: []
|
|
11
|
+
stability: experimental
|
|
12
|
+
generatedAt: 2026-06-09T18:29:01.764Z
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
# AI/Patterns/Guided Prompt
|
|
16
|
+
|
|
17
|
+
> **🧪 EXPERIMENTAL**: This component is experimental and its API may change.
|
|
18
|
+
|
|
19
|
+
Guided prompts provide structured input-UIs to guide the user in instructing the generative Al model on the desired output. They are helpful when users want to specify certain attributes, styles, or parameters for the generated content.<br> Guided prompts offer control and precision in generating output that aligns with user preferences. All provided information is combined into a processable prompt in the back-end and the user only needs to select the desired option instead of verbalizing them in a custom prompt.<br><br>
|
|
20
|
+
<b>Use Guided prompt when: </b>
|
|
21
|
+
<ul>
|
|
22
|
+
<li>users are using the generative AI feature for specific, predefined use cases or queries</li>
|
|
23
|
+
<li>the system can assist with a limited number of defined actions</li>
|
|
24
|
+
<li>users lack expertise or experience in writing prompts</li>
|
|
25
|
+
<li>users need the ability to customize and personalize inputs for flexibility</li>
|
|
26
|
+
<li>consistency and predictability in the outcome are essential</li>
|
|
27
|
+
</ul><br>
|
|
28
|
+
<b>Do not use Guided prompt when: </b>
|
|
29
|
+
<ul>
|
|
30
|
+
<li>users require a high level of flexibility to define outcomes (opt for custom prompts)</li>
|
|
31
|
+
<li>the task involves only a few specific actions (consider using quick prompts)</li>
|
|
32
|
+
<li>user intents or desired outcomes are unpredictable or undefined (use custom prompts)</li>
|
|
33
|
+
</ul>
|
|
34
|
+
|
|
35
|
+
<b>Anatomy:</b>A guided prompt is structured around a <b>container</b>, which provides the framework for the input content. The container can be any existing component within the Design System, such as a Popover, Dialog, Sidecontent, or Card, with the choice depending on the application's use case. <br>
|
|
36
|
+
The <b>input content</b> within the container includes a variety of input controls, selected based on the use case. It's important to use a diverse range of controls and avoid relying solely on drop-down menus. All controls should adhere to the Design System's visual, behavioral, and interaction guidelines.<br>
|
|
37
|
+
The <b>action</b> for the guided prompt is defined according to the use case and aligned with User Assistance. The placement of the action follows the container's general guidelines, while the button's visual design adheres to the AI-specific guidance. <br><br>
|
|
38
|
+
|
|
39
|
+
<b>Variants:</b>
|
|
40
|
+
<b>Popover:</b> Ideal for guiding prompts tied to a specific input, such as text. It offers quick, limited options that directly affect the related content.<br>
|
|
41
|
+
<b>Dialog:</b> Suitable for more complex guided prompts. Avoid layering multiple dialogs.<br>
|
|
42
|
+
<b>Dynamic Side Content:</b> Useful for displaying dense information without losing connection to the main content. It's great for complex prompts without causing significant disruption.
|
|
43
|
+
<br><br><br><b>Note: The component is in an experimental state.</b>
|
|
44
|
+
|
|
45
|
+
## Installation
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
npm install fundamental-styles
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
```html
|
|
52
|
+
<!-- Include theme -->
|
|
53
|
+
<link href="node_modules/fundamental-styles/dist/theming/sap_horizon.css" rel="stylesheet">
|
|
54
|
+
|
|
55
|
+
<!-- Include component CSS -->
|
|
56
|
+
<link href="node_modules/fundamental-styles/dist/popover.css" rel="stylesheet">
|
|
57
|
+
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## Basic Usage
|
|
61
|
+
|
|
62
|
+
```html
|
|
63
|
+
<div class="fd-popover">
|
|
64
|
+
<div class="fd-popover__control">
|
|
65
|
+
<button
|
|
66
|
+
aria-controls="popoverHSF366"
|
|
67
|
+
aria-expanded="true"
|
|
68
|
+
aria-haspopup="dialog"
|
|
69
|
+
class="fd-button"
|
|
70
|
+
onclick="onPopoverClick('popoverHSF366');"
|
|
71
|
+
role="button">
|
|
72
|
+
Guided Prompt
|
|
73
|
+
</button>
|
|
74
|
+
</div>
|
|
75
|
+
<section
|
|
76
|
+
aria-hidden="false"
|
|
77
|
+
class="fd-popover__body"
|
|
78
|
+
id="popoverHSF366"
|
|
79
|
+
aria-label="Dialog Data 1"
|
|
80
|
+
role="dialog">
|
|
81
|
+
<header class="fd-popover__body-header">
|
|
82
|
+
<div class="fd-bar">
|
|
83
|
+
<div class="fd-bar__left">
|
|
84
|
+
<div id="popoverHeader" class="fd-bar__element">
|
|
85
|
+
<h5 class="fd-title fd-title--h5" aria-label="text">Improve Text</h5>
|
|
86
|
+
</div>
|
|
87
|
+
</div>
|
|
88
|
+
</div>
|
|
89
|
+
</header>
|
|
90
|
+
|
|
91
|
+
<div class="fd-form-group fd-form-group--with-spacing">
|
|
92
|
+
<div class="fd-form-item">
|
|
93
|
+
<label class="fd-form-label" id="structureLabel">Structure:</label>
|
|
94
|
+
<div class="fd-popover">
|
|
95
|
+
<div class="fd-popover__control" aria-expanded="true" aria-haspopup="true">
|
|
96
|
+
<div class="fd-select">
|
|
97
|
+
<button
|
|
98
|
+
aria-labelledby="structureLabel"
|
|
99
|
+
aria-expanded="true"
|
|
100
|
+
aria-haspopup="listbox"
|
|
101
|
+
class="fd-select__control"
|
|
102
|
+
id="structureSelect"
|
|
103
|
+
onclick="
|
|
104
|
+
toggleElAttrs('select001', ['aria-hidden']);
|
|
105
|
+
toggleElAttrs('structureSelect', ['aria-expanded']);
|
|
106
|
+
"
|
|
107
|
+
tabindex="0">
|
|
108
|
+
<span is="formSelectValue" class="fd-select__text-content">Paragraph</span>
|
|
109
|
+
<span class="fd-button fd-button--transparent fd-select__button">
|
|
110
|
+
<i class="sap-icon--slim-arrow-down"></i>
|
|
111
|
+
</span>
|
|
112
|
+
</button>
|
|
113
|
+
</div>
|
|
114
|
+
</div>
|
|
115
|
+
<div
|
|
116
|
+
aria-hidden="true"
|
|
117
|
+
class="fd-popover__body fd-popover__body--no-arrow fd-popover__body--dropdown"
|
|
118
|
+
id="select001">
|
|
119
|
+
<ul
|
|
120
|
+
aria-labelledby="formSelectLabel"
|
|
121
|
+
class="fd-list fd-list--dropdown"
|
|
122
|
+
role="listbox">
|
|
123
|
+
<li
|
|
124
|
+
id="asFormItemSelectCombobox-currentlyFocusedItem"
|
|
125
|
+
class="fd-list__item is-selected"
|
|
126
|
+
role="option"
|
|
127
|
+
tabindex="0">
|
|
128
|
+
<span class="fd-list__title">
|
|
129
|
+
Paragraph
|
|
130
|
+
</span>
|
|
131
|
+
</li>
|
|
132
|
+
<li class="fd-list__item"
|
|
133
|
+
role="option"
|
|
134
|
+
tabindex="-1">
|
|
135
|
+
<span class="fd-list__title">Paragraph</span>
|
|
136
|
+
</li>
|
|
137
|
+
<li class="fd-list__item"
|
|
138
|
+
role="option"
|
|
139
|
+
tabindex="-1">
|
|
140
|
+
<span class="fd-list__title">Paragraph</span>
|
|
141
|
+
</li>
|
|
142
|
+
<li class="fd-list__item"
|
|
143
|
+
role="option"
|
|
144
|
+
tabindex="-1">
|
|
145
|
+
<span class="fd-list__title">Paragraph</span>
|
|
146
|
+
</li>
|
|
147
|
+
</ul>
|
|
148
|
+
</div>
|
|
149
|
+
</div>
|
|
150
|
+
</div>
|
|
151
|
+
<div class="fd-form-item">
|
|
152
|
+
<label class="fd-form-label" id="lengthLabel">Length:</label>
|
|
153
|
+
<div class="fd-slider fd-slider--range">
|
|
154
|
+
<div class="fd-slider__inner">
|
|
155
|
+
<div class="fd-slider__track">
|
|
156
|
+
|
|
157
|
+
</div>
|
|
158
|
+
|
|
159
|
+
</div>
|
|
160
|
+
</div>
|
|
161
|
+
</div>
|
|
162
|
+
<div class="fd-form-item">
|
|
163
|
+
<label class="fd-form-label" id="languageLabel">Language:</label>
|
|
164
|
+
<div class="fd-popover">
|
|
165
|
+
<div class="fd-popover__control" aria-expanded="true" aria-haspopup="true">
|
|
166
|
+
<div class="fd-select">
|
|
167
|
+
<button
|
|
168
|
+
aria-labelledby="languageLabel"
|
|
169
|
+
aria-expanded="true"
|
|
170
|
+
aria-haspopup="listbox"
|
|
171
|
+
class="fd-select__control"
|
|
172
|
+
id="languageSelect"
|
|
173
|
+
onclick="
|
|
174
|
+
toggleElAttrs('select002', ['aria-hidden']);
|
|
175
|
+
toggleElAttrs('languageSelect', ['aria-expanded']);
|
|
176
|
+
"
|
|
177
|
+
tabindex="0">
|
|
178
|
+
<span is="formSelectValue" class="fd-select__text-content">English</span>
|
|
179
|
+
<span class="fd-button fd-button--transparent fd-select__button">
|
|
180
|
+
<i class="sap-icon--slim-arrow-down"></i>
|
|
181
|
+
</span>
|
|
182
|
+
</button>
|
|
183
|
+
</div>
|
|
184
|
+
</div>
|
|
185
|
+
<div
|
|
186
|
+
aria-hidden="true"
|
|
187
|
+
class="fd-popover__body fd-popover__body--no-arrow fd-popover__body--dropdown"
|
|
188
|
+
id="select002">
|
|
189
|
+
<ul
|
|
190
|
+
aria-labelledby="formSelectLabel"
|
|
191
|
+
class="fd-list fd-list--dropdown"
|
|
192
|
+
role="listbox">
|
|
193
|
+
<li
|
|
194
|
+
id="asFormItemSelectCombobox-currentlyFocusedItem"
|
|
195
|
+
class="fd-list__item is-selected"
|
|
196
|
+
role="option"
|
|
197
|
+
tabindex="0">
|
|
198
|
+
<span class="fd-list__title">
|
|
199
|
+
English
|
|
200
|
+
</span>
|
|
201
|
+
</li>
|
|
202
|
+
<li class="fd-list__item"
|
|
203
|
+
role="option"
|
|
204
|
+
tabindex="-1">
|
|
205
|
+
<span class="fd-list__title">French</span>
|
|
206
|
+
</li>
|
|
207
|
+
<li class="fd-list__item"
|
|
208
|
+
role="option"
|
|
209
|
+
tabindex="-1">
|
|
210
|
+
<span class="fd-list__title">Spanish</span>
|
|
211
|
+
</li>
|
|
212
|
+
<li class="fd-list__item"
|
|
213
|
+
role="option"
|
|
214
|
+
tabindex="-1">
|
|
215
|
+
<span class="fd-list__title">Bulgarian</span>
|
|
216
|
+
</li>
|
|
217
|
+
</ul>
|
|
218
|
+
</div>
|
|
219
|
+
</div>
|
|
220
|
+
</div>
|
|
221
|
+
<div class="fd-form-item">
|
|
222
|
+
<label class="fd-form-label" id="toneOfVoiceLabel">Tone Of Voice:</label>
|
|
223
|
+
<div class="fd-segmented-button" role="group" aria-label="Group label">
|
|
224
|
+
<button aria-label="Survey" class="fd-button"><span class="fd-button__text">Casual</span></button>
|
|
225
|
+
<button aria-label="Chart" class="fd-button fd-button--toggled" aria-pressed="true"><span class="fd-button__text">Neutral</span></button>
|
|
226
|
+
<button aria-label="Pool" class="fd-button"><span class="fd-button__text">Formal</span></button>
|
|
227
|
+
</div>
|
|
228
|
+
</div>
|
|
229
|
+
|
|
230
|
+
<footer class="fd-popover__body-footer">
|
|
231
|
+
<div class="fd-bar fd-bar--footer">
|
|
232
|
+
<div class="fd-bar__right">
|
|
233
|
+
<div class="fd-bar__element">
|
|
234
|
+
<button class="fd-button fd-button--emphasized">
|
|
235
|
+
<i class="sap-icon--ai"></i>
|
|
236
|
+
<span class="fd-button__text">Apply</span>
|
|
237
|
+
</button>
|
|
238
|
+
</div>
|
|
239
|
+
<div class="fd-bar__element">
|
|
240
|
+
<button class="fd-button fd-button--transparent"><span class="fd-button__text">Close</span></button>
|
|
241
|
+
</div>
|
|
242
|
+
</div>
|
|
243
|
+
</div>
|
|
244
|
+
</footer>
|
|
245
|
+
</section>
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
## States
|
|
249
|
+
|
|
250
|
+
| Class | Description |
|
|
251
|
+
|-------|-------------|
|
|
252
|
+
| `is-selected` | Selected state |
|
|
253
|
+
|
|
254
|
+
## BEM Elements
|
|
255
|
+
|
|
256
|
+
This component uses the following BEM elements:
|
|
257
|
+
|
|
258
|
+
- `fd-popover__body`
|
|
259
|
+
- `fd-popover__body--dropdown`
|
|
260
|
+
- `fd-popover__body--no-arrow`
|
|
261
|
+
- `fd-popover__body-footer`
|
|
262
|
+
- `fd-popover__body-header`
|
|
263
|
+
- `fd-popover__control`
|
|
264
|
+
|
|
265
|
+
## Examples
|
|
266
|
+
|
|
267
|
+
### AIGuidedPrompt
|
|
268
|
+
|
|
269
|
+
```html
|
|
270
|
+
<div class="fd-popover">
|
|
271
|
+
<div class="fd-popover__control">
|
|
272
|
+
<button
|
|
273
|
+
aria-controls="popoverHSF366"
|
|
274
|
+
aria-expanded="true"
|
|
275
|
+
aria-haspopup="dialog"
|
|
276
|
+
class="fd-button"
|
|
277
|
+
onclick="onPopoverClick('popoverHSF366');"
|
|
278
|
+
role="button">
|
|
279
|
+
Guided Prompt
|
|
280
|
+
</button>
|
|
281
|
+
</div>
|
|
282
|
+
<section
|
|
283
|
+
aria-hidden="false"
|
|
284
|
+
class="fd-popover__body"
|
|
285
|
+
id="popoverHSF366"
|
|
286
|
+
aria-label="Dialog Data 1"
|
|
287
|
+
role="dialog">
|
|
288
|
+
<header class="fd-popover__body-header">
|
|
289
|
+
<div class="fd-bar">
|
|
290
|
+
<div class="fd-bar__left">
|
|
291
|
+
<div id="popoverHeader" class="fd-bar__element">
|
|
292
|
+
<h5 class="fd-title fd-title--h5" aria-label="text">Improve Text</h5>
|
|
293
|
+
</div>
|
|
294
|
+
</div>
|
|
295
|
+
</div>
|
|
296
|
+
</header>
|
|
297
|
+
|
|
298
|
+
<div class="fd-form-group fd-form-group--with-spacing">
|
|
299
|
+
<div class="fd-form-item">
|
|
300
|
+
<label class="fd-form-label" id="structureLabel">Structure:</label>
|
|
301
|
+
<div class="fd-popover">
|
|
302
|
+
<div class="fd-popover__control" aria-expanded="true" aria-haspopup="true">
|
|
303
|
+
<div class="fd-select">
|
|
304
|
+
<button
|
|
305
|
+
aria-labelledby="structureLabel"
|
|
306
|
+
aria-expanded="true"
|
|
307
|
+
aria-haspopup="listbox"
|
|
308
|
+
class="fd-select__control"
|
|
309
|
+
id="structureSelect"
|
|
310
|
+
onclick="
|
|
311
|
+
toggleElAttrs('select001', ['aria-hidden']);
|
|
312
|
+
toggleElAttrs('structureSelect', ['aria-expanded']);
|
|
313
|
+
"
|
|
314
|
+
tabindex="0">
|
|
315
|
+
<span is="formSelectValue" class="fd-select__text-content">Paragraph</span>
|
|
316
|
+
<span class="fd-button fd-button--transparent fd-select__button">
|
|
317
|
+
<i class="sap-icon--slim-arrow-down"></i>
|
|
318
|
+
</span>
|
|
319
|
+
</button>
|
|
320
|
+
</div>
|
|
321
|
+
</div>
|
|
322
|
+
<div
|
|
323
|
+
aria-hidden="true"
|
|
324
|
+
class="fd-popover__body fd-popover__body--no-arrow fd-popover__body--dropdown"
|
|
325
|
+
id="select001">
|
|
326
|
+
<ul
|
|
327
|
+
aria-labelledby="formSelectLabel"
|
|
328
|
+
class="fd-list fd-list--dropdown"
|
|
329
|
+
role="listbox">
|
|
330
|
+
<li
|
|
331
|
+
id="asFormItemSelectCombobox-currentlyFocusedItem"
|
|
332
|
+
class="fd-list__item is-selected"
|
|
333
|
+
role="option"
|
|
334
|
+
tabindex="0">
|
|
335
|
+
<span class="fd-list__title">
|
|
336
|
+
Paragraph
|
|
337
|
+
</span>
|
|
338
|
+
</li>
|
|
339
|
+
<li class="fd-list__item"
|
|
340
|
+
role="option"
|
|
341
|
+
tabindex="-1">
|
|
342
|
+
<span class="fd-list__title">Paragraph</span>
|
|
343
|
+
</li>
|
|
344
|
+
<li class="fd-list__item"
|
|
345
|
+
role="option"
|
|
346
|
+
tabindex="-1">
|
|
347
|
+
<span class="fd-list__title">Paragraph</span>
|
|
348
|
+
</li>
|
|
349
|
+
<li class="fd-list__item"
|
|
350
|
+
role="option"
|
|
351
|
+
tabindex="-1">
|
|
352
|
+
<span class="fd-list__title">Paragraph</span>
|
|
353
|
+
</li>
|
|
354
|
+
</ul>
|
|
355
|
+
</div>
|
|
356
|
+
</div>
|
|
357
|
+
</div>
|
|
358
|
+
<div class="fd-form-item">
|
|
359
|
+
<label class="fd-form-label" id="lengthLabel">Length:</label>
|
|
360
|
+
<div class="fd-slider fd-slider--range">
|
|
361
|
+
<div class="fd-slider__inner">
|
|
362
|
+
<div class="fd-slider__track">
|
|
363
|
+
|
|
364
|
+
</div>
|
|
365
|
+
|
|
366
|
+
</div>
|
|
367
|
+
</div>
|
|
368
|
+
</div>
|
|
369
|
+
<div class="fd-form-item">
|
|
370
|
+
<label class="fd-form-label" id="languageLabel">Language:</label>
|
|
371
|
+
<div class="fd-popover">
|
|
372
|
+
<div class="fd-popover__control" aria-expanded="true" aria-haspopup="true">
|
|
373
|
+
<div class="fd-select">
|
|
374
|
+
<button
|
|
375
|
+
aria-labelledby="languageLabel"
|
|
376
|
+
aria-expanded="true"
|
|
377
|
+
aria-haspopup="listbox"
|
|
378
|
+
class="fd-select__control"
|
|
379
|
+
id="languageSelect"
|
|
380
|
+
onclick="
|
|
381
|
+
toggleElAttrs('select002', ['aria-hidden']);
|
|
382
|
+
toggleElAttrs('languageSelect', ['aria-expanded']);
|
|
383
|
+
"
|
|
384
|
+
tabindex="0">
|
|
385
|
+
<span is="formSelectValue" class="fd-select__text-content">English</span>
|
|
386
|
+
<span class="fd-button fd-button--transparent fd-select__button">
|
|
387
|
+
<i class="sap-icon--slim-arrow-down"></i>
|
|
388
|
+
</span>
|
|
389
|
+
</button>
|
|
390
|
+
</div>
|
|
391
|
+
</div>
|
|
392
|
+
<div
|
|
393
|
+
aria-hidden="true"
|
|
394
|
+
class="fd-popover__body fd-popover__body--no-arrow fd-popover__body--dropdown"
|
|
395
|
+
id="select002">
|
|
396
|
+
<ul
|
|
397
|
+
aria-labelledby="formSelectLabel"
|
|
398
|
+
class="fd-list fd-list--dropdown"
|
|
399
|
+
role="listbox">
|
|
400
|
+
<li
|
|
401
|
+
id="asFormItemSelectCombobox-currentlyFocusedItem"
|
|
402
|
+
class="fd-list__item is-selected"
|
|
403
|
+
role="option"
|
|
404
|
+
tabindex="0">
|
|
405
|
+
<span class="fd-list__title">
|
|
406
|
+
English
|
|
407
|
+
</span>
|
|
408
|
+
</li>
|
|
409
|
+
<li class="fd-list__item"
|
|
410
|
+
role="option"
|
|
411
|
+
tabindex="-1">
|
|
412
|
+
<span class="fd-list__title">French</span>
|
|
413
|
+
</li>
|
|
414
|
+
<li class="fd-list__item"
|
|
415
|
+
role="option"
|
|
416
|
+
tabindex="-1">
|
|
417
|
+
<span class="fd-list__title">Spanish</span>
|
|
418
|
+
</li>
|
|
419
|
+
<li class="fd-list__item"
|
|
420
|
+
role="option"
|
|
421
|
+
tabindex="-1">
|
|
422
|
+
<span class="fd-list__title">Bulgarian</span>
|
|
423
|
+
</li>
|
|
424
|
+
</ul>
|
|
425
|
+
</div>
|
|
426
|
+
</div>
|
|
427
|
+
</div>
|
|
428
|
+
<div class="fd-form-item">
|
|
429
|
+
<label class="fd-form-label" id="toneOfVoiceLabel">Tone Of Voice:</label>
|
|
430
|
+
<div class="fd-segmented-button" role="group" aria-label="Group label">
|
|
431
|
+
<button aria-label="Survey" class="fd-button"><span class="fd-button__text">Casual</span></button>
|
|
432
|
+
<button aria-label="Chart" class="fd-button fd-button--toggled" aria-pressed="true"><span class="fd-button__text">Neutral</span></button>
|
|
433
|
+
<button aria-label="Pool" class="fd-button"><span class="fd-button__text">Formal</span></button>
|
|
434
|
+
</div>
|
|
435
|
+
</div>
|
|
436
|
+
|
|
437
|
+
<footer class="fd-popover__body-footer">
|
|
438
|
+
<div class="fd-bar fd-bar--footer">
|
|
439
|
+
<div class="fd-bar__right">
|
|
440
|
+
<div class="fd-bar__element">
|
|
441
|
+
<button class="fd-button fd-button--emphasized">
|
|
442
|
+
<i class="sap-icon--ai"></i>
|
|
443
|
+
<span class="fd-button__text">Apply</span>
|
|
444
|
+
</button>
|
|
445
|
+
</div>
|
|
446
|
+
<div class="fd-bar__element">
|
|
447
|
+
<button class="fd-button fd-button--transparent"><span class="fd-button__text">Close</span></button>
|
|
448
|
+
</div>
|
|
449
|
+
</div>
|
|
450
|
+
</div>
|
|
451
|
+
</footer>
|
|
452
|
+
</section>
|
|
453
|
+
```
|
|
454
|
+
|
|
455
|
+
## Accessibility
|
|
456
|
+
|
|
457
|
+
- Use semantic HTML elements where appropriate
|
|
458
|
+
- Include proper ARIA attributes for interactive elements
|
|
459
|
+
- Ensure keyboard navigation support
|
|
460
|
+
- Provide adequate color contrast
|
|
461
|
+
|
|
462
|
+
## Source
|
|
463
|
+
|
|
464
|
+
This documentation was automatically generated from: `packages/styles/stories/AI/Patterns/ai-guided-prompt/ai-guided-prompt.stories.js`
|
|
465
|
+
|
|
466
|
+
For the latest updates and interactive examples, see [Storybook](https://sap.github.io/fundamental-styles/).
|