@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,149 @@
|
|
|
1
|
+
---
|
|
2
|
+
component: fd-message-box-docs-static
|
|
3
|
+
title: AI/Patterns/Acknowledgment
|
|
4
|
+
category: AI
|
|
5
|
+
selector: fd-message-box-docs-static
|
|
6
|
+
cssFile: message-box-docs-static.css
|
|
7
|
+
sourcePath: packages/styles/stories/AI/Patterns/ai-acknowledgment/ai-acknowledgment.stories.js
|
|
8
|
+
tags: ["ai","experimental"]
|
|
9
|
+
dependencies: []
|
|
10
|
+
relatedComponents: []
|
|
11
|
+
stability: experimental
|
|
12
|
+
generatedAt: 2026-06-09T18:29:01.766Z
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
# AI/Patterns/Acknowledgment
|
|
16
|
+
|
|
17
|
+
> **🧪 EXPERIMENTAL**: This component is experimental and its API may change.
|
|
18
|
+
|
|
19
|
+
AI Acknowledgment provides users with important information and updates about an AI service in a standardized format. Its main goal is to educate users on the key aspects of AI-enabled applications, including potential risks, opportunities, and limitations. This helps set user expectations and fosters trust.
|
|
20
|
+
|
|
21
|
+
<b>Anatomy</b>
|
|
22
|
+
<ul>
|
|
23
|
+
<li>Container: could be a Dialog or Message Box</li>
|
|
24
|
+
<li>Illustrated Messages (optional): an image representing the AI service.
|
|
25
|
+
Note: No specific AI illustrations are currently available. Please request new images if needed.
|
|
26
|
+
</li>
|
|
27
|
+
<li>Intro / Primary Message: The main message</li>
|
|
28
|
+
<li>Headlines (optional): Descriptive headline for the paragraph.</li>
|
|
29
|
+
<li>Reason / Key Aspects: The reason for this message</li>
|
|
30
|
+
<li>Details / Link: Additional information and resources</li>
|
|
31
|
+
<li>Checkbox Option: “Don't show this message again”</li>
|
|
32
|
+
</ul>
|
|
33
|
+
For more information see utilised/reused components in this pattern: Dialog, Message Box, and Illustrated Messages.
|
|
34
|
+
|
|
35
|
+
<br><b>Note: The component is in an experimental state.</b>
|
|
36
|
+
|
|
37
|
+
## Installation
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
npm install fundamental-styles
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
```html
|
|
44
|
+
<!-- Include theme -->
|
|
45
|
+
<link href="node_modules/fundamental-styles/dist/theming/sap_horizon.css" rel="stylesheet">
|
|
46
|
+
|
|
47
|
+
<!-- Include component CSS -->
|
|
48
|
+
<link href="node_modules/fundamental-styles/dist/message-box-docs-static.css" rel="stylesheet">
|
|
49
|
+
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Basic Usage
|
|
53
|
+
|
|
54
|
+
```html
|
|
55
|
+
<div class="fd-message-box-docs-static fd-message-box fd-message-box--information fd-message-box--active">
|
|
56
|
+
<section class="fd-message-box__content">
|
|
57
|
+
<header class="fd-bar fd-bar--header fd-message-box__header">
|
|
58
|
+
<div class="fd-bar__left">
|
|
59
|
+
<div class="fd-bar__element">
|
|
60
|
+
<i class="sap-icon--information"></i>
|
|
61
|
+
<h5 class="fd-title fd-title--h5">Information</h5>
|
|
62
|
+
</div>
|
|
63
|
+
</div>
|
|
64
|
+
</header>
|
|
65
|
+
<div class="fd-message-box__body">
|
|
66
|
+
SAP CX AI Toolkit now provides embedded AI services. For more information, see the <a href="#" class="fd-link" tabindex="0"><span class="fd-link__content">SAP Help Portal</span></a>
|
|
67
|
+
<h6 class="fd-title fd-title--h6">Disclaimer</h6>
|
|
68
|
+
Artificial Intelligence (AI) generates results based on multiple sources. Outputs may contain errors and inaccuracies. Consider reviewing all generated results and adjust as necessary.
|
|
69
|
+
<div class="fd-form-group">
|
|
70
|
+
<div class="fd-form-item">
|
|
71
|
+
<input type="checkbox" class="fd-checkbox" id="ai-ack">
|
|
72
|
+
<label class="fd-checkbox__label" for="ai-ack">
|
|
73
|
+
<span class="fd-checkbox__checkmark" aria-hidden="true"></span>
|
|
74
|
+
<div class="fd-checkbox__label-container">
|
|
75
|
+
<span class="fd-checkbox__text">Don't show this message again</span>
|
|
76
|
+
</div>
|
|
77
|
+
</label>
|
|
78
|
+
</div>
|
|
79
|
+
</div>
|
|
80
|
+
</div>
|
|
81
|
+
<footer class="fd-bar fd-bar--footer fd-message-box__footer">
|
|
82
|
+
<div class="fd-bar__right">
|
|
83
|
+
<div class="fd-bar__element">
|
|
84
|
+
<button class="fd-button fd-button--emphasized fd-message-box__decisive-button">
|
|
85
|
+
OK
|
|
86
|
+
</button>
|
|
87
|
+
</div>
|
|
88
|
+
</div>
|
|
89
|
+
</footer>
|
|
90
|
+
</section>
|
|
91
|
+
</div>
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
## Examples
|
|
95
|
+
|
|
96
|
+
### AIAcknowledgment
|
|
97
|
+
|
|
98
|
+
```html
|
|
99
|
+
<div class="fd-message-box-docs-static fd-message-box fd-message-box--information fd-message-box--active">
|
|
100
|
+
<section class="fd-message-box__content">
|
|
101
|
+
<header class="fd-bar fd-bar--header fd-message-box__header">
|
|
102
|
+
<div class="fd-bar__left">
|
|
103
|
+
<div class="fd-bar__element">
|
|
104
|
+
<i class="sap-icon--information"></i>
|
|
105
|
+
<h5 class="fd-title fd-title--h5">Information</h5>
|
|
106
|
+
</div>
|
|
107
|
+
</div>
|
|
108
|
+
</header>
|
|
109
|
+
<div class="fd-message-box__body">
|
|
110
|
+
SAP CX AI Toolkit now provides embedded AI services. For more information, see the <a href="#" class="fd-link" tabindex="0"><span class="fd-link__content">SAP Help Portal</span></a>
|
|
111
|
+
<h6 class="fd-title fd-title--h6">Disclaimer</h6>
|
|
112
|
+
Artificial Intelligence (AI) generates results based on multiple sources. Outputs may contain errors and inaccuracies. Consider reviewing all generated results and adjust as necessary.
|
|
113
|
+
<div class="fd-form-group">
|
|
114
|
+
<div class="fd-form-item">
|
|
115
|
+
<input type="checkbox" class="fd-checkbox" id="ai-ack">
|
|
116
|
+
<label class="fd-checkbox__label" for="ai-ack">
|
|
117
|
+
<span class="fd-checkbox__checkmark" aria-hidden="true"></span>
|
|
118
|
+
<div class="fd-checkbox__label-container">
|
|
119
|
+
<span class="fd-checkbox__text">Don't show this message again</span>
|
|
120
|
+
</div>
|
|
121
|
+
</label>
|
|
122
|
+
</div>
|
|
123
|
+
</div>
|
|
124
|
+
</div>
|
|
125
|
+
<footer class="fd-bar fd-bar--footer fd-message-box__footer">
|
|
126
|
+
<div class="fd-bar__right">
|
|
127
|
+
<div class="fd-bar__element">
|
|
128
|
+
<button class="fd-button fd-button--emphasized fd-message-box__decisive-button">
|
|
129
|
+
OK
|
|
130
|
+
</button>
|
|
131
|
+
</div>
|
|
132
|
+
</div>
|
|
133
|
+
</footer>
|
|
134
|
+
</section>
|
|
135
|
+
</div>
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
## Accessibility
|
|
139
|
+
|
|
140
|
+
- Use semantic HTML elements where appropriate
|
|
141
|
+
- Include proper ARIA attributes for interactive elements
|
|
142
|
+
- Ensure keyboard navigation support
|
|
143
|
+
- Provide adequate color contrast
|
|
144
|
+
|
|
145
|
+
## Source
|
|
146
|
+
|
|
147
|
+
This documentation was automatically generated from: `packages/styles/stories/AI/Patterns/ai-acknowledgment/ai-acknowledgment.stories.js`
|
|
148
|
+
|
|
149
|
+
For the latest updates and interactive examples, see [Storybook](https://sap.github.io/fundamental-styles/).
|
|
@@ -0,0 +1,527 @@
|
|
|
1
|
+
---
|
|
2
|
+
component: fd-message-box-docs-static
|
|
3
|
+
title: Components/Message Box
|
|
4
|
+
category: Components
|
|
5
|
+
selector: fd-message-box-docs-static
|
|
6
|
+
cssFile: message-box-docs-static.css
|
|
7
|
+
sourcePath: packages/styles/stories/Components/message-box/message-box.stories.js
|
|
8
|
+
tags: []
|
|
9
|
+
dependencies: ["bar","button","icon","link","message-box","title"]
|
|
10
|
+
relatedComponents: ["bar","button","icon","link","message-box","title"]
|
|
11
|
+
stability: stable
|
|
12
|
+
generatedAt: 2026-06-09T18:29:01.519Z
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
# Components/Message Box
|
|
16
|
+
|
|
17
|
+
The message box displays a dialog with a simple message to the user. Contrary to the **Popover**, message box can relay messages unrelated to the UI, such as technical errors. This component inherits the look and behavior of the **Dialog** (excluding dragging/resizing).
|
|
18
|
+
|
|
19
|
+
Note: Include two action buttons in the message box when the user's decision is required before continuing. The primary action button should always explicitly display the action they're performing (in text), while the secondary buttons provides them with an option to cancel.
|
|
20
|
+
|
|
21
|
+
**The messages can be displayed with semantic colors and icons to indicate:**
|
|
22
|
+
|
|
23
|
+
- Error
|
|
24
|
+
- Warning
|
|
25
|
+
- Success
|
|
26
|
+
- Information
|
|
27
|
+
- Confirmation
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
##Usage
|
|
31
|
+
|
|
32
|
+
**Use the message box if:**
|
|
33
|
+
|
|
34
|
+
- You want to display non-field-related messages.
|
|
35
|
+
- You want to interrupt the user while he or she performs an action.
|
|
36
|
+
- You want to display error, warning, success, confirmation, or information messages.
|
|
37
|
+
- You need to interrupt the user for some other reason.
|
|
38
|
+
- You need the user to acknowledge the message.
|
|
39
|
+
- You need the user to make a decision.
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
**Do not use the message box if:**
|
|
43
|
+
|
|
44
|
+
- You want to display a short success message. Instead, use **Message Toast**.
|
|
45
|
+
- You can show the message directly in a form field.
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
##Structure
|
|
49
|
+
**Message box follows the structure of a dialog, consisting of following elements:**
|
|
50
|
+
|
|
51
|
+
- \
|
|
52
|
+
|
|
53
|
+
## Usage Guidelines
|
|
54
|
+
|
|
55
|
+
**Use the message box if:**
|
|
56
|
+
|
|
57
|
+
- You want to display non-field-related messages.
|
|
58
|
+
- You want to interrupt the user while he or she performs an action.
|
|
59
|
+
- You want to display error, warning, success, confirmation, or information messages.
|
|
60
|
+
- You need to interrupt the user for some other reason.
|
|
61
|
+
- You need the user to acknowledge the message.
|
|
62
|
+
- You need the user to make a decision.
|
|
63
|
+
|
|
64
|
+
## When Not To Use
|
|
65
|
+
|
|
66
|
+
- You want to display a short success message. Instead, use **Message Toast**.
|
|
67
|
+
- You can show the message directly in a form field.
|
|
68
|
+
|
|
69
|
+
## Dependencies
|
|
70
|
+
|
|
71
|
+
This component depends on the following CSS files:
|
|
72
|
+
|
|
73
|
+
- `bar.css`
|
|
74
|
+
- `button.css`
|
|
75
|
+
- `icon.css`
|
|
76
|
+
- `link.css`
|
|
77
|
+
- `message-box.css`
|
|
78
|
+
- `title.css`
|
|
79
|
+
|
|
80
|
+
## Installation
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
npm install fundamental-styles
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
```html
|
|
87
|
+
<!-- Include theme -->
|
|
88
|
+
<link href="node_modules/fundamental-styles/dist/theming/sap_horizon.css" rel="stylesheet">
|
|
89
|
+
|
|
90
|
+
<!-- Include component CSS -->
|
|
91
|
+
<link href="node_modules/fundamental-styles/dist/message-box-docs-static.css" rel="stylesheet">
|
|
92
|
+
|
|
93
|
+
<!-- Include dependencies -->
|
|
94
|
+
<link href="node_modules/fundamental-styles/dist/bar.css" rel="stylesheet">
|
|
95
|
+
<link href="node_modules/fundamental-styles/dist/button.css" rel="stylesheet">
|
|
96
|
+
<link href="node_modules/fundamental-styles/dist/icon.css" rel="stylesheet">
|
|
97
|
+
<link href="node_modules/fundamental-styles/dist/link.css" rel="stylesheet">
|
|
98
|
+
<link href="node_modules/fundamental-styles/dist/message-box.css" rel="stylesheet">
|
|
99
|
+
<link href="node_modules/fundamental-styles/dist/title.css" rel="stylesheet">
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
## Basic Usage
|
|
103
|
+
|
|
104
|
+
```html
|
|
105
|
+
<div
|
|
106
|
+
class="fd-message-box-docs-static fd-message-box fd-message-box--active"
|
|
107
|
+
role="alertdialog"
|
|
108
|
+
aria-modal="true"
|
|
109
|
+
aria-labelledby="fd-message-box-title-1"
|
|
110
|
+
aria-describedby="fd-message-box-text-1"
|
|
111
|
+
tabindex="-1">
|
|
112
|
+
<div class="fd-message-box__content">
|
|
113
|
+
<header class="fd-bar fd-bar--header fd-message-box__header">
|
|
114
|
+
<div class="fd-bar__left">
|
|
115
|
+
<div class="fd-bar__element">
|
|
116
|
+
<h1 class="fd-title fd-title--h5" id="fd-message-box-title-1">Title</h1>
|
|
117
|
+
</div>
|
|
118
|
+
</div>
|
|
119
|
+
</header>
|
|
120
|
+
|
|
121
|
+
<section class="fd-message-box__body" id="fd-message-box-text-1">
|
|
122
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
|
|
123
|
+
</section>
|
|
124
|
+
|
|
125
|
+
<footer class="fd-bar fd-bar--footer fd-message-box__footer">
|
|
126
|
+
<div class="fd-bar__right">
|
|
127
|
+
<div class="fd-bar__element">
|
|
128
|
+
<button class="fd-button fd-button--emphasized fd-message-box__decisive-button">
|
|
129
|
+
Begin button
|
|
130
|
+
</button>
|
|
131
|
+
</div>
|
|
132
|
+
<div class="fd-bar__element">
|
|
133
|
+
<button class="fd-button fd-button--transparent fd-message-box__decisive-button">
|
|
134
|
+
End button
|
|
135
|
+
</button>
|
|
136
|
+
</div>
|
|
137
|
+
</div>
|
|
138
|
+
</footer>
|
|
139
|
+
</div>
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
## Component Structure
|
|
143
|
+
|
|
144
|
+
**Message box follows the structure of a dialog, consisting of following elements:**
|
|
145
|
+
|
|
146
|
+
- \
|
|
147
|
+
|
|
148
|
+
## Related Components
|
|
149
|
+
|
|
150
|
+
This component works with or depends on:
|
|
151
|
+
|
|
152
|
+
- `bar`
|
|
153
|
+
- `button`
|
|
154
|
+
- `icon`
|
|
155
|
+
- `link`
|
|
156
|
+
- `message-box`
|
|
157
|
+
- `title`
|
|
158
|
+
|
|
159
|
+
## Examples
|
|
160
|
+
|
|
161
|
+
### Default
|
|
162
|
+
|
|
163
|
+
The default message box displays a small dialog with a title, message text and action buttons. Use the default if the message does not fit with one of the semantic types.
|
|
164
|
+
|
|
165
|
+
```html
|
|
166
|
+
<div
|
|
167
|
+
class="fd-message-box-docs-static fd-message-box fd-message-box--active"
|
|
168
|
+
role="alertdialog"
|
|
169
|
+
aria-modal="true"
|
|
170
|
+
aria-labelledby="fd-message-box-title-1"
|
|
171
|
+
aria-describedby="fd-message-box-text-1"
|
|
172
|
+
tabindex="-1">
|
|
173
|
+
<div class="fd-message-box__content">
|
|
174
|
+
<header class="fd-bar fd-bar--header fd-message-box__header">
|
|
175
|
+
<div class="fd-bar__left">
|
|
176
|
+
<div class="fd-bar__element">
|
|
177
|
+
<h1 class="fd-title fd-title--h5" id="fd-message-box-title-1">Title</h1>
|
|
178
|
+
</div>
|
|
179
|
+
</div>
|
|
180
|
+
</header>
|
|
181
|
+
|
|
182
|
+
<section class="fd-message-box__body" id="fd-message-box-text-1">
|
|
183
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
|
|
184
|
+
</section>
|
|
185
|
+
|
|
186
|
+
<footer class="fd-bar fd-bar--footer fd-message-box__footer">
|
|
187
|
+
<div class="fd-bar__right">
|
|
188
|
+
<div class="fd-bar__element">
|
|
189
|
+
<button class="fd-button fd-button--emphasized fd-message-box__decisive-button">
|
|
190
|
+
Begin button
|
|
191
|
+
</button>
|
|
192
|
+
</div>
|
|
193
|
+
<div class="fd-bar__element">
|
|
194
|
+
<button class="fd-button fd-button--transparent fd-message-box__decisive-button">
|
|
195
|
+
End button
|
|
196
|
+
</button>
|
|
197
|
+
</div>
|
|
198
|
+
</div>
|
|
199
|
+
</footer>
|
|
200
|
+
</div>
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
### Semantic types
|
|
204
|
+
|
|
205
|
+
The message box can be displayed with various semantic colors and icons, indicating the type of message being relayed.
|
|
206
|
+
|
|
207
|
+
|Semantic type | Modifier class | Description
|
|
208
|
+
:------------------ | :------------------- | :---------------
|
|
209
|
+
Confirmation | \
|
|
210
|
+
|
|
211
|
+
```html
|
|
212
|
+
<div
|
|
213
|
+
class="fd-message-box-docs-static fd-message-box fd-message-box--confirmation fd-message-box--active"
|
|
214
|
+
role="alertdialog"
|
|
215
|
+
aria-modal="true"
|
|
216
|
+
aria-labelledby="fd-message-box-title-2"
|
|
217
|
+
aria-describedby="fd-message-box-text-2"
|
|
218
|
+
tabindex="-1">
|
|
219
|
+
<div class="fd-message-box__content">
|
|
220
|
+
<header class="fd-bar fd-bar--header fd-message-box__header">
|
|
221
|
+
<div class="fd-bar__left">
|
|
222
|
+
<div class="fd-bar__element">
|
|
223
|
+
<i class="sap-icon--sys-help-2" role="presentation" aria-hidden="true"></i>
|
|
224
|
+
<h1 class="fd-title fd-title--h5" id="fd-message-box-title-2">Confirmation</h1>
|
|
225
|
+
</div>
|
|
226
|
+
</div>
|
|
227
|
+
</header>
|
|
228
|
+
|
|
229
|
+
<section class="fd-message-box__body" id="fd-message-box-text-2">
|
|
230
|
+
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
|
|
231
|
+
</section>
|
|
232
|
+
|
|
233
|
+
<footer class="fd-bar fd-bar--footer fd-message-box__footer">
|
|
234
|
+
<div class="fd-bar__right">
|
|
235
|
+
<div class="fd-bar__element">
|
|
236
|
+
<button class="fd-button fd-button--emphasized fd-message-box__decisive-button">
|
|
237
|
+
OK
|
|
238
|
+
</button>
|
|
239
|
+
</div>
|
|
240
|
+
<div class="fd-bar__element">
|
|
241
|
+
<button class="fd-button fd-button--transparent fd-message-box__decisive-button">
|
|
242
|
+
Cancel
|
|
243
|
+
</button>
|
|
244
|
+
</div>
|
|
245
|
+
</div>
|
|
246
|
+
</footer>
|
|
247
|
+
</div>
|
|
248
|
+
|
|
249
|
+
<div
|
|
250
|
+
class="fd-message-box-docs-static fd-message-box fd-message-box--error fd-message-box--active" role="alertdialog"
|
|
251
|
+
aria-modal="true"
|
|
252
|
+
aria-labelledby="fd-message-box-title-3"
|
|
253
|
+
aria-describedby="fd-message-box-text-3"
|
|
254
|
+
tabindex="-1">
|
|
255
|
+
<div class="fd-message-box__content">
|
|
256
|
+
<header class="fd-bar fd-bar--header fd-message-box__header">
|
|
257
|
+
<div class="fd-bar__left">
|
|
258
|
+
<div class="fd-bar__element">
|
|
259
|
+
<i class="sap-icon--error" role="presentation" aria-hidden="true"></i>
|
|
260
|
+
<h1 class="fd-title fd-title--h5" id="fd-message-box-title-3">Error</h1>
|
|
261
|
+
</div>
|
|
262
|
+
</div>
|
|
263
|
+
</header>
|
|
264
|
+
|
|
265
|
+
<section class="fd-message-box__body" id="fd-message-box-text-3">
|
|
266
|
+
Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
|
267
|
+
</section>
|
|
268
|
+
|
|
269
|
+
<footer class="fd-bar fd-bar--footer fd-message-box__footer">
|
|
270
|
+
<div class="fd-bar__right">
|
|
271
|
+
<div class="fd-bar__element">
|
|
272
|
+
<button class="fd-button fd-button--emphasized fd-message-box__decisive-button">
|
|
273
|
+
Close
|
|
274
|
+
</button>
|
|
275
|
+
</div>
|
|
276
|
+
</div>
|
|
277
|
+
</footer>
|
|
278
|
+
</div>
|
|
279
|
+
|
|
280
|
+
<div
|
|
281
|
+
class="fd-message-box-docs-static fd-message-box fd-message-box--success fd-message-box--active"
|
|
282
|
+
role="alertdialog"
|
|
283
|
+
aria-modal="true"
|
|
284
|
+
aria-labelledby="fd-message-box-title-4"
|
|
285
|
+
aria-describedby="fd-message-box-text-4"
|
|
286
|
+
tabindex="-1">
|
|
287
|
+
<div class="fd-message-box__content">
|
|
288
|
+
<header class="fd-bar fd-bar--header fd-message-box__header">
|
|
289
|
+
<div class="fd-bar__left">
|
|
290
|
+
<div class="fd-bar__element">
|
|
291
|
+
<i class="sap-icon--sys-enter-2" role="presentation" aria-hidden="true"></i>
|
|
292
|
+
<h1 class="fd-title fd-title--h5" id="fd-message-box-title-4">Success</h1>
|
|
293
|
+
</div>
|
|
294
|
+
</div>
|
|
295
|
+
</header>
|
|
296
|
+
|
|
297
|
+
<section class="fd-message-box__body" id="fd-message-box-text-4">
|
|
298
|
+
Vivamus sagittis diam in vehicula lobortis sapien arcu mattis erat vel aliquet sem urna et mattis erat vel aliquet in sem urna et sagittis diam in vehicula.
|
|
299
|
+
</section>
|
|
300
|
+
|
|
301
|
+
<footer class="fd-bar fd-bar--footer fd-message-box__footer">
|
|
302
|
+
<div class="fd-bar__right">
|
|
303
|
+
<div class="fd-bar__element">
|
|
304
|
+
<button class="fd-button fd-button--emphasized fd-message-box__decisive-button">
|
|
305
|
+
Close
|
|
306
|
+
</button>
|
|
307
|
+
</div>
|
|
308
|
+
</div>
|
|
309
|
+
</footer>
|
|
310
|
+
</div>
|
|
311
|
+
|
|
312
|
+
<div
|
|
313
|
+
class="fd-message-box-docs-static fd-message-box fd-message-box--warning fd-message-box--active"
|
|
314
|
+
role="alertdialog"
|
|
315
|
+
aria-modal="true"
|
|
316
|
+
aria-labelledby="fd-message-box-title-5"
|
|
317
|
+
aria-describedby="fd-message-box-text-5"
|
|
318
|
+
tabindex="-1">
|
|
319
|
+
<div class="fd-message-box__content">
|
|
320
|
+
<header class="fd-bar fd-bar--header fd-message-box__header">
|
|
321
|
+
<div class="fd-bar__left">
|
|
322
|
+
<div class="fd-bar__element">
|
|
323
|
+
<i class="sap-icon--alert" role="presentation" aria-hidden="true"></i>
|
|
324
|
+
<h1 class="fd-title fd-title--h5" id="fd-message-box-title-5">Warning</h1>
|
|
325
|
+
</div>
|
|
326
|
+
</div>
|
|
327
|
+
</header>
|
|
328
|
+
|
|
329
|
+
<section class="fd-message-box__body" id="fd-message-box-text-5">
|
|
330
|
+
Vivamus sagittis diam in vehicula lobortis sapien arcu mattis erat vel aliquet sem urna et.
|
|
331
|
+
</section>
|
|
332
|
+
|
|
333
|
+
<footer class="fd-bar fd-bar--footer fd-message-box__footer">
|
|
334
|
+
<div class="fd-bar__right">
|
|
335
|
+
<div class="fd-bar__element">
|
|
336
|
+
<button class="fd-button fd-button--emphasized fd-message-box__decisive-button">
|
|
337
|
+
Close
|
|
338
|
+
</button>
|
|
339
|
+
</div>
|
|
340
|
+
</div>
|
|
341
|
+
</footer>
|
|
342
|
+
</div>
|
|
343
|
+
|
|
344
|
+
<div
|
|
345
|
+
class="fd-message-box-docs-static fd-message-box fd-message-box--information fd-message-box--active"
|
|
346
|
+
role="alertdialog"
|
|
347
|
+
aria-modal="true"
|
|
348
|
+
aria-labelledby="fd-message-box-title-6"
|
|
349
|
+
aria-describedby="fd-message-box-text-6"
|
|
350
|
+
tabindex="-1">
|
|
351
|
+
<div class="fd-message-box__content">
|
|
352
|
+
<header class="fd-bar fd-bar--header fd-message-box__header">
|
|
353
|
+
<div class="fd-bar__left">
|
|
354
|
+
<div class="fd-bar__element">
|
|
355
|
+
<i class="sap-icon--information" role="presentation" aria-hidden="true"></i>
|
|
356
|
+
<h1 class="fd-title fd-title--h5" id="fd-message-box-title-6">Information</h1>
|
|
357
|
+
</div>
|
|
358
|
+
</div>
|
|
359
|
+
</header>
|
|
360
|
+
|
|
361
|
+
<section class="fd-message-box__body" id="fd-message-box-text-6">
|
|
362
|
+
Vivamus sagittis diam in vehicula lobortis.
|
|
363
|
+
</section>
|
|
364
|
+
|
|
365
|
+
<footer class="fd-bar fd-bar--footer fd-message-box__footer">
|
|
366
|
+
<div class="fd-bar__right">
|
|
367
|
+
<div class="fd-bar__element">
|
|
368
|
+
<button class="fd-button fd-button--emphasized fd-message-box__decisive-button">
|
|
369
|
+
Close
|
|
370
|
+
</button>
|
|
371
|
+
</div>
|
|
372
|
+
</div>
|
|
373
|
+
</footer>
|
|
374
|
+
</div>
|
|
375
|
+
```
|
|
376
|
+
|
|
377
|
+
### Responsive
|
|
378
|
+
|
|
379
|
+
The message box has 1rem padding all around the body, and the header and footer both inherit their padding from the **Bar** component. Responsive horizontal padding can be applied to the header, body and footer of the message box; however, the amount depends on the screen width.
|
|
380
|
+
|
|
381
|
+
**To display responsive padding, add the following modifier classes to the content container:**
|
|
382
|
+
|
|
383
|
+
|Modifier class | rem | Screen width
|
|
384
|
+
------------------ | ---- | ---------------------
|
|
385
|
+
\
|
|
386
|
+
|
|
387
|
+
```html
|
|
388
|
+
<div
|
|
389
|
+
class="fd-message-box-docs-static fd-message-box fd-message-box--information fd-message-box--active"
|
|
390
|
+
role="alertdialog"
|
|
391
|
+
aria-modal="true"
|
|
392
|
+
aria-labelledby="fd-message-box-title-7"
|
|
393
|
+
aria-describedby="fd-message-box-text-7"
|
|
394
|
+
tabindex="-1">
|
|
395
|
+
<div class="fd-message-box__content fd-message-box__content--s">
|
|
396
|
+
<header class="fd-bar fd-bar--header fd-message-box__header">
|
|
397
|
+
<div class="fd-bar__left">
|
|
398
|
+
<div class="fd-bar__element">
|
|
399
|
+
<h1 class="fd-title fd-title--h5" id="fd-message-box-title-7">Information</h1>
|
|
400
|
+
</div>
|
|
401
|
+
</div>
|
|
402
|
+
</header>
|
|
403
|
+
|
|
404
|
+
<section class="fd-message-box__body" id="fd-message-box-text-7">
|
|
405
|
+
Informative message box for a small screen in cozy mode (mobile) and a "Show more" link in the body.
|
|
406
|
+
<div class="fd-message-box__more">
|
|
407
|
+
<a href="#" class="fd-link" tabindex="0"><span class="fd-link__content">Show more</span></a>
|
|
408
|
+
</div>
|
|
409
|
+
</section>
|
|
410
|
+
|
|
411
|
+
<footer class="fd-bar fd-bar--footer fd-message-box__footer">
|
|
412
|
+
<div class="fd-bar__right">
|
|
413
|
+
<div class="fd-bar__element">
|
|
414
|
+
<button class="fd-button fd-button--emphasized fd-message-box__decisive-button">
|
|
415
|
+
Close
|
|
416
|
+
</button>
|
|
417
|
+
</div>
|
|
418
|
+
</div>
|
|
419
|
+
</footer>
|
|
420
|
+
</div>
|
|
421
|
+
|
|
422
|
+
<div
|
|
423
|
+
class="fd-message-box-docs-static fd-message-box fd-message-box--error fd-message-box--active"
|
|
424
|
+
role="alertdialog"
|
|
425
|
+
aria-modal="true"
|
|
426
|
+
aria-labelledby="fd-message-box-title-8"
|
|
427
|
+
aria-describedby="fd-message-box-text-8"
|
|
428
|
+
tabindex="-1">
|
|
429
|
+
<div class="fd-message-box__content fd-message-box__content--m">
|
|
430
|
+
<header class="fd-bar fd-bar--header fd-message-box__header">
|
|
431
|
+
<div class="fd-bar__left">
|
|
432
|
+
<div class="fd-bar__element">
|
|
433
|
+
<h1 class="fd-title fd-title--h5" id="fd-message-box-title-8">Error</h1>
|
|
434
|
+
</div>
|
|
435
|
+
</div>
|
|
436
|
+
</header>
|
|
437
|
+
|
|
438
|
+
<section class="fd-message-box__body" id="fd-message-box-text-8">
|
|
439
|
+
Error message box for a medium-sized screen in cozy mode (mobile).
|
|
440
|
+
</section>
|
|
441
|
+
|
|
442
|
+
<footer class="fd-bar fd-bar--footer fd-message-box__footer">
|
|
443
|
+
<div class="fd-bar__right">
|
|
444
|
+
<div class="fd-bar__element">
|
|
445
|
+
<button class="fd-button fd-button--emphasized fd-message-box__decisive-button">
|
|
446
|
+
Close
|
|
447
|
+
</button>
|
|
448
|
+
</div>
|
|
449
|
+
</div>
|
|
450
|
+
</footer>
|
|
451
|
+
</div>
|
|
452
|
+
|
|
453
|
+
<div
|
|
454
|
+
class="fd-message-box-docs-static fd-message-box fd-message-box--success fd-message-box--active"
|
|
455
|
+
role="alertdialog"
|
|
456
|
+
aria-modal="true"
|
|
457
|
+
aria-labelledby="fd-message-box-title-9"
|
|
458
|
+
aria-describedby="fd-message-box-text-9"
|
|
459
|
+
tabindex="-1">
|
|
460
|
+
<div class="fd-message-box__content fd-message-box__content--l">
|
|
461
|
+
<header class="fd-bar fd-bar--header fd-message-box__header">
|
|
462
|
+
<div class="fd-bar__left">
|
|
463
|
+
<div class="fd-bar__element">
|
|
464
|
+
<h1 class="fd-title fd-title--h5" id="fd-message-box-title-9">Success</h1>
|
|
465
|
+
</div>
|
|
466
|
+
</div>
|
|
467
|
+
</header>
|
|
468
|
+
|
|
469
|
+
<section class="fd-message-box__body" id="fd-message-box-text-9">
|
|
470
|
+
Success message box for a large screen in compact mode (desktop).
|
|
471
|
+
</section>
|
|
472
|
+
|
|
473
|
+
<footer class="fd-bar fd-bar--footer fd-message-box__footer">
|
|
474
|
+
<div class="fd-bar__right">
|
|
475
|
+
<div class="fd-bar__element">
|
|
476
|
+
<button class="fd-button fd-button--emphasized fd-message-box__decisive-button">
|
|
477
|
+
Close
|
|
478
|
+
</button>
|
|
479
|
+
</div>
|
|
480
|
+
</div>
|
|
481
|
+
</footer>
|
|
482
|
+
</div>
|
|
483
|
+
|
|
484
|
+
<div
|
|
485
|
+
class="fd-message-box-docs-static fd-message-box fd-message-box--warning fd-message-box--active"
|
|
486
|
+
role="alertdialog"
|
|
487
|
+
aria-modal="true"
|
|
488
|
+
aria-labelledby="fd-message-box-title-10"
|
|
489
|
+
aria-describedby="fd-message-box-text-10"
|
|
490
|
+
tabindex="-1">
|
|
491
|
+
<div class="fd-message-box__content fd-message-box__content--xl">
|
|
492
|
+
<header class="fd-bar fd-bar--header fd-message-box__header">
|
|
493
|
+
<div class="fd-bar__left">
|
|
494
|
+
<div class="fd-bar__element">
|
|
495
|
+
<h1 class="fd-title fd-title--h5" id="fd-message-box-title-10">Warning</h1>
|
|
496
|
+
</div>
|
|
497
|
+
</div>
|
|
498
|
+
</header>
|
|
499
|
+
|
|
500
|
+
<section class="fd-message-box__body" id="fd-message-box-text-10">
|
|
501
|
+
Warning message box for an extra large screen in compact mode (desktop).
|
|
502
|
+
</section>
|
|
503
|
+
|
|
504
|
+
<footer class="fd-bar fd-bar--footer fd-message-box__footer">
|
|
505
|
+
<div class="fd-bar__right">
|
|
506
|
+
<div class="fd-bar__element">
|
|
507
|
+
<button class="fd-button fd-button--emphasized fd-message-box__decisive-button">
|
|
508
|
+
Close
|
|
509
|
+
</button>
|
|
510
|
+
</div>
|
|
511
|
+
</div>
|
|
512
|
+
</footer>
|
|
513
|
+
</div>
|
|
514
|
+
```
|
|
515
|
+
|
|
516
|
+
## Accessibility
|
|
517
|
+
|
|
518
|
+
- Use semantic HTML elements where appropriate
|
|
519
|
+
- Include proper ARIA attributes for interactive elements
|
|
520
|
+
- Ensure keyboard navigation support
|
|
521
|
+
- Provide adequate color contrast
|
|
522
|
+
|
|
523
|
+
## Source
|
|
524
|
+
|
|
525
|
+
This documentation was automatically generated from: `packages/styles/stories/Components/message-box/message-box.stories.js`
|
|
526
|
+
|
|
527
|
+
For the latest updates and interactive examples, see [Storybook](https://sap.github.io/fundamental-styles/).
|