@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
package/data/AI_USAGE.md
ADDED
|
@@ -0,0 +1,425 @@
|
|
|
1
|
+
# AI Agent Usage Guide
|
|
2
|
+
|
|
3
|
+
This document explains how AI coding assistants (LLMs, coding agents, MCP servers) can discover and use fundamental-styles documentation.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
fundamental-styles provides **AI-consumable documentation** extracted from Storybook stories. This enables AI agents to generate correct HTML/CSS markup without needing to parse TypeScript or run build tools.
|
|
8
|
+
|
|
9
|
+
## Documentation Format
|
|
10
|
+
|
|
11
|
+
### Location
|
|
12
|
+
- **Component docs**: `docs/components/` (140+ markdown files)
|
|
13
|
+
- **Index**: `docs/components/README.md`
|
|
14
|
+
- **Schemas**: `docs/schemas/` (JSON schemas per component)
|
|
15
|
+
- **Examples**: `docs/html-examples.json` (complete HTML patterns)
|
|
16
|
+
- **Accessibility**: `docs/accessibility.json` (ARIA patterns for 72 components)
|
|
17
|
+
- **Design tokens**: `docs/design-tokens.json` (1,522 CSS variables)
|
|
18
|
+
|
|
19
|
+
### Markdown Structure
|
|
20
|
+
|
|
21
|
+
Each component has a markdown file with:
|
|
22
|
+
|
|
23
|
+
```markdown
|
|
24
|
+
---
|
|
25
|
+
component: fd-button
|
|
26
|
+
title: Components/Buttons/Button
|
|
27
|
+
category: Components
|
|
28
|
+
selector: fd-button
|
|
29
|
+
cssFile: button.css
|
|
30
|
+
sourcePath: packages/styles/stories/Components/button/button.stories.js
|
|
31
|
+
generatedAt: 2026-05-28T15:39:34.902Z
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
# Button
|
|
35
|
+
|
|
36
|
+
Description...
|
|
37
|
+
|
|
38
|
+
## Installation
|
|
39
|
+
npm install instructions + CSS imports
|
|
40
|
+
|
|
41
|
+
## Basic Usage
|
|
42
|
+
Simple HTML example
|
|
43
|
+
|
|
44
|
+
## Modifiers
|
|
45
|
+
Table of all fd-{component}--{modifier} classes
|
|
46
|
+
|
|
47
|
+
## States
|
|
48
|
+
Table of all is-{state} classes
|
|
49
|
+
|
|
50
|
+
## Examples
|
|
51
|
+
Multiple code snippets from Storybook stories
|
|
52
|
+
|
|
53
|
+
## Accessibility
|
|
54
|
+
ARIA requirements
|
|
55
|
+
|
|
56
|
+
## Source
|
|
57
|
+
Link back to source story file
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## Discovery Methods
|
|
61
|
+
|
|
62
|
+
### 1. Package.json Metadata (Recommended)
|
|
63
|
+
|
|
64
|
+
AI agents should read the `aiDocs` field in `package.json`:
|
|
65
|
+
|
|
66
|
+
```json
|
|
67
|
+
{
|
|
68
|
+
"name": "fundamental-styles",
|
|
69
|
+
"aiDocs": {
|
|
70
|
+
"format": "markdown",
|
|
71
|
+
"location": "./docs/components/",
|
|
72
|
+
"index": "./docs/components/README.md",
|
|
73
|
+
"schemas": "./docs/schemas/",
|
|
74
|
+
"usage": "See docs/AI_USAGE.md for integration guide"
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
**How to use:**
|
|
80
|
+
1. Parse `node_modules/fundamental-styles/package.json`
|
|
81
|
+
2. Check for `aiDocs` field
|
|
82
|
+
3. Read `docs/components/README.md` for component list
|
|
83
|
+
4. Fetch specific component markdown as needed
|
|
84
|
+
|
|
85
|
+
### 2. CLAUDE.md (Claude Code Specific)
|
|
86
|
+
|
|
87
|
+
For Claude Code users, the root `CLAUDE.md` file contains:
|
|
88
|
+
- Quick reference table (I need a... → component)
|
|
89
|
+
- Common patterns
|
|
90
|
+
- Direct links to `docs/components/`
|
|
91
|
+
|
|
92
|
+
**Usage**: Claude Code automatically loads `CLAUDE.md` as project instructions.
|
|
93
|
+
|
|
94
|
+
### 3. Direct File Access
|
|
95
|
+
|
|
96
|
+
Component docs are predictable and can be loaded directly:
|
|
97
|
+
|
|
98
|
+
```
|
|
99
|
+
docs/components/{component-name}.md
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
Examples:
|
|
103
|
+
- `docs/components/button.md`
|
|
104
|
+
- `docs/components/input.md`
|
|
105
|
+
- `docs/components/table.md`
|
|
106
|
+
|
|
107
|
+
**Naming convention**: Remove `fd-` prefix from selector.
|
|
108
|
+
- `fd-button` → `button.md`
|
|
109
|
+
- `fd-input-group` → `input-group.md`
|
|
110
|
+
|
|
111
|
+
## Integration Examples
|
|
112
|
+
|
|
113
|
+
### Example 1: Claude Code Agent
|
|
114
|
+
|
|
115
|
+
```markdown
|
|
116
|
+
<!-- In your project's CLAUDE.md -->
|
|
117
|
+
|
|
118
|
+
# Project Name
|
|
119
|
+
|
|
120
|
+
## Component Library
|
|
121
|
+
|
|
122
|
+
We use fundamental-styles for UI components.
|
|
123
|
+
Component docs: node_modules/fundamental-styles/docs/components/
|
|
124
|
+
|
|
125
|
+
Common components:
|
|
126
|
+
- Buttons: docs/components/button.md
|
|
127
|
+
- Forms: docs/components/input.md, docs/components/select.md
|
|
128
|
+
- Tables: docs/components/table.md
|
|
129
|
+
|
|
130
|
+
When generating UI, always reference the component markdown for correct class names.
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
### Example 2: GitHub Copilot
|
|
134
|
+
|
|
135
|
+
When Copilot encounters:
|
|
136
|
+
```html
|
|
137
|
+
<button class="fd-
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
It should:
|
|
141
|
+
1. Check if `fundamental-styles` is installed
|
|
142
|
+
2. Read `node_modules/fundamental-styles/package.json` → `aiDocs.location`
|
|
143
|
+
3. Load `docs/components/button.md`
|
|
144
|
+
4. Suggest completions from the "Modifiers" table
|
|
145
|
+
|
|
146
|
+
### Example 3: Cursor AI
|
|
147
|
+
|
|
148
|
+
User: "@fundamental-styles show me all button variants"
|
|
149
|
+
|
|
150
|
+
Cursor:
|
|
151
|
+
1. Searches workspace for `fundamental-styles`
|
|
152
|
+
2. Finds `node_modules/fundamental-styles/docs/components/button.md`
|
|
153
|
+
3. Parses markdown, extracts "Modifiers" section
|
|
154
|
+
4. Displays table with code snippets
|
|
155
|
+
|
|
156
|
+
### Example 4: MCP Server (Advanced)
|
|
157
|
+
|
|
158
|
+
A dedicated MCP server can expose fundamental-styles via tools:
|
|
159
|
+
|
|
160
|
+
```typescript
|
|
161
|
+
// fundamental-styles-mcp
|
|
162
|
+
{
|
|
163
|
+
"tools": [
|
|
164
|
+
{
|
|
165
|
+
"name": "search_component",
|
|
166
|
+
"description": "Search for components by keyword",
|
|
167
|
+
"inputSchema": {
|
|
168
|
+
"type": "object",
|
|
169
|
+
"properties": {
|
|
170
|
+
"query": { "type": "string" }
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
"name": "get_component_docs",
|
|
176
|
+
"description": "Get full markdown for a component",
|
|
177
|
+
"inputSchema": {
|
|
178
|
+
"type": "object",
|
|
179
|
+
"properties": {
|
|
180
|
+
"component": { "type": "string" }
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
]
|
|
185
|
+
}
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
**Implementation**: Parse `docs/components/*.md` files and serve via MCP protocol.
|
|
189
|
+
|
|
190
|
+
## Best Practices for AI Agents
|
|
191
|
+
|
|
192
|
+
### 1. Always Read Component Docs First
|
|
193
|
+
|
|
194
|
+
❌ **Don't guess class names from training data**
|
|
195
|
+
```html
|
|
196
|
+
<!-- AI guessing from outdated training data -->
|
|
197
|
+
<button class="fd-button fd-button--primary">
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
✅ **Read docs first, then generate**
|
|
201
|
+
```html
|
|
202
|
+
<!-- After reading docs/components/button.md -->
|
|
203
|
+
<button class="fd-button fd-button--emphasized">
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
### 2. Include Required CSS Imports
|
|
207
|
+
|
|
208
|
+
Always include theme + component CSS:
|
|
209
|
+
```html
|
|
210
|
+
<link href="fundamental-styles/dist/theming/sap_horizon.css" rel="stylesheet">
|
|
211
|
+
<link href="fundamental-styles/dist/button.css" rel="stylesheet">
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
### 3. Use Frontmatter Metadata
|
|
215
|
+
|
|
216
|
+
Each markdown file has frontmatter with:
|
|
217
|
+
- `selector`: Base CSS class (e.g., `fd-button`)
|
|
218
|
+
- `cssFile`: Required CSS file (e.g., `button.css`)
|
|
219
|
+
- `category`: Component category (Components, BTP, Patterns)
|
|
220
|
+
|
|
221
|
+
Use this to provide accurate suggestions.
|
|
222
|
+
|
|
223
|
+
### 4. Combine Multiple Sources
|
|
224
|
+
|
|
225
|
+
For complete context, combine:
|
|
226
|
+
1. **Component markdown** (`docs/components/button.md`) - Basic usage
|
|
227
|
+
2. **JSON schema** (`docs/schemas/button.json`) - Complete API
|
|
228
|
+
3. **HTML examples** (`docs/html-examples.json`) - Full patterns
|
|
229
|
+
4. **Accessibility** (`docs/accessibility.json`) - ARIA requirements
|
|
230
|
+
|
|
231
|
+
### 5. Stay Updated
|
|
232
|
+
|
|
233
|
+
Documentation is auto-generated from Storybook stories. To get latest:
|
|
234
|
+
|
|
235
|
+
```bash
|
|
236
|
+
# In the fundamental-styles repo
|
|
237
|
+
npm run docs:extract
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
This regenerates all `docs/components/*.md` files.
|
|
241
|
+
|
|
242
|
+
## Common Patterns
|
|
243
|
+
|
|
244
|
+
### Form with Validation
|
|
245
|
+
```html
|
|
246
|
+
<!-- Read: docs/components/input.md, form-item.md -->
|
|
247
|
+
<div class="fd-form-item">
|
|
248
|
+
<label class="fd-form-label fd-form-label--required" for="email">Email</label>
|
|
249
|
+
<input class="fd-input is-error" id="email" type="email" aria-describedby="email-error">
|
|
250
|
+
<span class="fd-form-message fd-form-message--error" id="email-error">Invalid email</span>
|
|
251
|
+
</div>
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
### Data Table with Selection
|
|
255
|
+
```html
|
|
256
|
+
<!-- Read: docs/components/table.md -->
|
|
257
|
+
<table class="fd-table">
|
|
258
|
+
<thead class="fd-table__header">
|
|
259
|
+
<tr class="fd-table__row">
|
|
260
|
+
<th class="fd-table__cell">Name</th>
|
|
261
|
+
<th class="fd-table__cell">Status</th>
|
|
262
|
+
</tr>
|
|
263
|
+
</thead>
|
|
264
|
+
<tbody class="fd-table__body">
|
|
265
|
+
<tr class="fd-table__row is-selected">
|
|
266
|
+
<td class="fd-table__cell">Selected Item</td>
|
|
267
|
+
<td class="fd-table__cell">Active</td>
|
|
268
|
+
</tr>
|
|
269
|
+
</tbody>
|
|
270
|
+
</table>
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
### Modal Dialog
|
|
274
|
+
```html
|
|
275
|
+
<!-- Read: docs/components/dialog.md, bar.md -->
|
|
276
|
+
<div class="fd-dialog fd-dialog--active">
|
|
277
|
+
<div class="fd-dialog__content">
|
|
278
|
+
<header class="fd-dialog__header fd-bar fd-bar--header">
|
|
279
|
+
<div class="fd-bar__left">
|
|
280
|
+
<h3 class="fd-title fd-title--h5">Dialog Title</h3>
|
|
281
|
+
</div>
|
|
282
|
+
</header>
|
|
283
|
+
<div class="fd-dialog__body">Content</div>
|
|
284
|
+
<footer class="fd-dialog__footer fd-bar fd-bar--footer">
|
|
285
|
+
<button class="fd-button fd-button--emphasized">Save</button>
|
|
286
|
+
</footer>
|
|
287
|
+
</div>
|
|
288
|
+
</div>
|
|
289
|
+
```
|
|
290
|
+
|
|
291
|
+
## Troubleshooting
|
|
292
|
+
|
|
293
|
+
### "Component not found"
|
|
294
|
+
|
|
295
|
+
**Problem**: AI can't find component docs
|
|
296
|
+
|
|
297
|
+
**Solutions**:
|
|
298
|
+
1. Check if `fundamental-styles` is installed: `ls node_modules/fundamental-styles`
|
|
299
|
+
2. Verify docs exist: `ls node_modules/fundamental-styles/docs/components/`
|
|
300
|
+
3. Check package.json has `aiDocs` field
|
|
301
|
+
|
|
302
|
+
### "Class names don't match CSS"
|
|
303
|
+
|
|
304
|
+
**Problem**: Generated HTML uses wrong classes
|
|
305
|
+
|
|
306
|
+
**Solutions**:
|
|
307
|
+
1. Ensure docs are up-to-date: `npm run docs:extract`
|
|
308
|
+
2. Cross-reference with `docs/schemas/{component}.json`
|
|
309
|
+
3. Check CSS file exists in `dist/` folder
|
|
310
|
+
|
|
311
|
+
### "Missing accessibility attributes"
|
|
312
|
+
|
|
313
|
+
**Problem**: Generated HTML lacks ARIA attributes
|
|
314
|
+
|
|
315
|
+
**Solutions**:
|
|
316
|
+
1. Read `docs/accessibility.json` for component
|
|
317
|
+
2. Check "Accessibility" section in component markdown
|
|
318
|
+
3. Refer to HTML examples in `docs/html-examples.json`
|
|
319
|
+
|
|
320
|
+
## Maintenance
|
|
321
|
+
|
|
322
|
+
### Regenerating Documentation
|
|
323
|
+
|
|
324
|
+
After updating Storybook stories:
|
|
325
|
+
|
|
326
|
+
```bash
|
|
327
|
+
npm run docs:extract
|
|
328
|
+
```
|
|
329
|
+
|
|
330
|
+
This:
|
|
331
|
+
1. Scans all `packages/*/stories/**/*.stories.js` files
|
|
332
|
+
2. Extracts HTML templates and descriptions
|
|
333
|
+
3. Generates `docs/components/*.md` for each component
|
|
334
|
+
4. Creates `docs/components/README.md` index
|
|
335
|
+
|
|
336
|
+
### Validation
|
|
337
|
+
|
|
338
|
+
Check generated docs are correct:
|
|
339
|
+
|
|
340
|
+
```bash
|
|
341
|
+
npm run test:ai-docs
|
|
342
|
+
```
|
|
343
|
+
|
|
344
|
+
This validates:
|
|
345
|
+
- Markdown files match actual CSS classes in `dist/`
|
|
346
|
+
- All components have documentation
|
|
347
|
+
- Frontmatter is valid
|
|
348
|
+
|
|
349
|
+
### CI/CD Integration
|
|
350
|
+
|
|
351
|
+
Add to your GitHub Actions workflow:
|
|
352
|
+
|
|
353
|
+
```yaml
|
|
354
|
+
- name: Generate AI docs
|
|
355
|
+
run: npm run docs:extract
|
|
356
|
+
|
|
357
|
+
- name: Commit updated docs
|
|
358
|
+
run: |
|
|
359
|
+
git add docs/components/
|
|
360
|
+
git commit -m "chore: update AI documentation [skip ci]" || true
|
|
361
|
+
```
|
|
362
|
+
|
|
363
|
+
## Contributing
|
|
364
|
+
|
|
365
|
+
### Adding New Components
|
|
366
|
+
|
|
367
|
+
When creating a new component story:
|
|
368
|
+
|
|
369
|
+
1. **Write the `.stories.js` file** with descriptive text
|
|
370
|
+
2. **Include HTML examples** in `.example.html` files
|
|
371
|
+
3. **Run extraction**: `npm run docs:extract`
|
|
372
|
+
4. **Verify output**: Check `docs/components/{component}.md`
|
|
373
|
+
|
|
374
|
+
### Improving Extraction
|
|
375
|
+
|
|
376
|
+
The extraction script is at `scripts/extract-docs.js`.
|
|
377
|
+
|
|
378
|
+
To improve it:
|
|
379
|
+
1. Parse additional metadata from stories
|
|
380
|
+
2. Better HTML cleanup (remove doc-specific wrappers)
|
|
381
|
+
3. Extract modifier descriptions from JSDoc comments
|
|
382
|
+
4. Add schema validation
|
|
383
|
+
|
|
384
|
+
### Testing with AI Agents
|
|
385
|
+
|
|
386
|
+
To test if AI can use the docs:
|
|
387
|
+
|
|
388
|
+
1. **Claude Code**: Add component to a test project, ask Claude to generate markup
|
|
389
|
+
2. **Copilot**: Type `<button class="fd-` and check suggestions
|
|
390
|
+
3. **Cursor**: Use `@fundamental-styles` and ask questions
|
|
391
|
+
|
|
392
|
+
## FAQ
|
|
393
|
+
|
|
394
|
+
**Q: Do I need to run Storybook to use these docs?**
|
|
395
|
+
A: No. The markdown files are static and can be read directly.
|
|
396
|
+
|
|
397
|
+
**Q: How often should I regenerate docs?**
|
|
398
|
+
A: After any changes to `.stories.js` files. Consider adding to pre-commit hook.
|
|
399
|
+
|
|
400
|
+
**Q: Can I use this with other AI tools?**
|
|
401
|
+
A: Yes! The markdown format is universal. Any tool that can read files can use it.
|
|
402
|
+
|
|
403
|
+
**Q: What if my AI agent doesn't support package.json `aiDocs`?**
|
|
404
|
+
A: Fall back to reading `CLAUDE.md` or directly accessing `docs/components/`.
|
|
405
|
+
|
|
406
|
+
**Q: Are there TypeScript types for components?**
|
|
407
|
+
A: fundamental-styles is CSS-only (no JS). Check `docs/schemas/*.json` for structure.
|
|
408
|
+
|
|
409
|
+
## Resources
|
|
410
|
+
|
|
411
|
+
- **Live examples**: https://sap.github.io/fundamental-styles/
|
|
412
|
+
- **GitHub**: https://github.com/SAP/fundamental-styles
|
|
413
|
+
- **NPM**: https://www.npmjs.com/package/fundamental-styles
|
|
414
|
+
- **Design Guidelines**: https://experience.sap.com/fiori-design-web/
|
|
415
|
+
|
|
416
|
+
## Support
|
|
417
|
+
|
|
418
|
+
For AI integration questions:
|
|
419
|
+
- Open an issue: https://github.com/SAP/fundamental-styles/issues
|
|
420
|
+
- Tag with: `ai-documentation`
|
|
421
|
+
|
|
422
|
+
For component usage questions:
|
|
423
|
+
- See Storybook examples
|
|
424
|
+
- Check component markdown files
|
|
425
|
+
- Read CLAUDE.md quick reference
|
package/data/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,56 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [0.41.7](https://github.com/SAP/fundamental-styles/compare/v0.41.7-rc.17...v0.41.7) (2026-06-09)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package fundamental-styles
|
|
9
|
+
|
|
10
|
+
## [0.41.7-rc.17](https://github.com/SAP/fundamental-styles/compare/v0.41.7-rc.16...v0.41.7-rc.17) (2026-06-08)
|
|
11
|
+
|
|
12
|
+
**Note:** Version bump only for package fundamental-styles
|
|
13
|
+
|
|
14
|
+
## [0.41.7-rc.16](https://github.com/SAP/fundamental-styles/compare/v0.41.7-rc.15...v0.41.7-rc.16) (2026-06-08)
|
|
15
|
+
|
|
16
|
+
### Bug Fixes
|
|
17
|
+
|
|
18
|
+
- **styles:** prevent overflow content from pushing siblings outside container [ci visual] ([#6323](https://github.com/SAP/fundamental-styles/issues/6323)) ([f279bbc](https://github.com/SAP/fundamental-styles/commit/f279bbcd6c9aa11dedff5590e0c4f590977e56c1))
|
|
19
|
+
|
|
20
|
+
## [0.41.7-rc.15](https://github.com/SAP/fundamental-styles/compare/v0.41.7-rc.14...v0.41.7-rc.15) (2026-06-08)
|
|
21
|
+
|
|
22
|
+
### Bug Fixes
|
|
23
|
+
|
|
24
|
+
- **styles:** address ShellBar review comments [ci visual] ([#6324](https://github.com/SAP/fundamental-styles/issues/6324)) ([e2c01dd](https://github.com/SAP/fundamental-styles/commit/e2c01dd8eda3210dfd2e6b63be529dd8d77befef))
|
|
25
|
+
|
|
26
|
+
## [0.41.7-rc.14](https://github.com/SAP/fundamental-styles/compare/v0.41.7-rc.13...v0.41.7-rc.14) (2026-06-05)
|
|
27
|
+
|
|
28
|
+
**Note:** Version bump only for package fundamental-styles
|
|
29
|
+
|
|
30
|
+
## [0.41.7-rc.13](https://github.com/SAP/fundamental-styles/compare/v0.41.7-rc.12...v0.41.7-rc.13) (2026-06-05)
|
|
31
|
+
|
|
32
|
+
### Bug Fixes
|
|
33
|
+
|
|
34
|
+
- expose component catalog ([#6316](https://github.com/SAP/fundamental-styles/issues/6316)) ([5e4043d](https://github.com/SAP/fundamental-styles/commit/5e4043d55392a3212753c21dc6838b5d36e54ed8))
|
|
35
|
+
|
|
36
|
+
## [0.41.7-rc.12](https://github.com/SAP/fundamental-styles/compare/v0.41.7-rc.11...v0.41.7-rc.12) (2026-06-04)
|
|
37
|
+
|
|
38
|
+
**Note:** Version bump only for package fundamental-styles
|
|
39
|
+
|
|
40
|
+
## [0.41.7-rc.11](https://github.com/SAP/fundamental-styles/compare/v0.41.7-rc.10...v0.41.7-rc.11) (2026-06-04)
|
|
41
|
+
|
|
42
|
+
**Note:** Version bump only for package fundamental-styles
|
|
43
|
+
|
|
44
|
+
## [0.41.7-rc.10](https://github.com/SAP/fundamental-styles/compare/v0.41.7-rc.9...v0.41.7-rc.10) (2026-06-02)
|
|
45
|
+
|
|
46
|
+
### Bug Fixes
|
|
47
|
+
|
|
48
|
+
- **styles:** remove font weight from Card title [ci visual] ([#6318](https://github.com/SAP/fundamental-styles/issues/6318)) ([ae6a8f8](https://github.com/SAP/fundamental-styles/commit/ae6a8f8e036486997c330c147b1e83d9aaee7e0d))
|
|
49
|
+
|
|
50
|
+
## [0.41.7-rc.9](https://github.com/SAP/fundamental-styles/compare/v0.41.7-rc.8...v0.41.7-rc.9) (2026-06-02)
|
|
51
|
+
|
|
52
|
+
### Features
|
|
53
|
+
|
|
54
|
+
- **styles:** add header content area to User Menu [ci visual] ([#6321](https://github.com/SAP/fundamental-styles/issues/6321)) ([38df315](https://github.com/SAP/fundamental-styles/commit/38df3159af475c470477eab1cd0d70b4f7cf59fa))
|
|
55
|
+
|
|
6
56
|
## [0.41.7-rc.8](https://github.com/SAP/fundamental-styles/compare/v0.41.7-rc.7...v0.41.7-rc.8) (2026-05-29)
|
|
7
57
|
|
|
8
58
|
**Note:** Version bump only for package fundamental-styles
|
|
@@ -6901,9 +6951,9 @@ Co-authored-by: droshev <mladen.droshev@sap.com>
|
|
|
6901
6951
|
|
|
6902
6952
|
- added a new modifier class to fd-row to achieve even alignment of its elements:fd-row--top in a form.
|
|
6903
6953
|
Before:
|
|
6904
|
-
|
|
6905
|
-
|
|
6906
|
-
|
|
6954
|
+
<div class="fd-row">
|
|
6955
|
+
After:
|
|
6956
|
+
<div class="fd-row fd-row--top">
|
|
6907
6957
|
|
|
6908
6958
|
### Bug Fixes
|
|
6909
6959
|
|