@sdaia-ds/mcp 0.0.0-stage → 3.1.1
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/README.md +212 -2
- package/dist/index.d.ts +2 -0
- package/dist/index.js +291 -0
- package/dist/index.js.map +1 -0
- package/knowledge/actions/breadcrumb.md +50 -0
- package/knowledge/actions/button-menu.md +82 -0
- package/knowledge/actions/button-split.md +69 -0
- package/knowledge/actions/button.md +101 -0
- package/knowledge/actions/content-switcher.md +66 -0
- package/knowledge/actions/date-picker.md +115 -0
- package/knowledge/actions/floating-button.md +100 -0
- package/knowledge/actions/horizontal-tabs.md +52 -0
- package/knowledge/actions/link.md +76 -0
- package/knowledge/actions/modal.md +103 -0
- package/knowledge/actions/pagination.md +69 -0
- package/knowledge/actions/radio-button.md +88 -0
- package/knowledge/actions/switch.md +87 -0
- package/knowledge/actions/tag.md +69 -0
- package/knowledge/ai/agent-activity.md +65 -0
- package/knowledge/ai/agent-card.md +65 -0
- package/knowledge/ai/agent-handoff.md +65 -0
- package/knowledge/ai/ai-citation.md +78 -0
- package/knowledge/ai/ai-code-block.md +86 -0
- package/knowledge/ai/ai-disclaimer.md +84 -0
- package/knowledge/ai/ai-message-bubble.md +81 -0
- package/knowledge/ai/ai-message.md +118 -0
- package/knowledge/ai/ai-prompt-input.md +93 -0
- package/knowledge/ai/ai-states.md +107 -0
- package/knowledge/ai/ai-status-indicator.md +81 -0
- package/knowledge/ai/ai-suggested-prompts.md +62 -0
- package/knowledge/ai/ai-thinking-indicator.md +94 -0
- package/knowledge/ai/artifact-viewer.md +105 -0
- package/knowledge/ai/citation.md +61 -0
- package/knowledge/ai/context-manager.md +111 -0
- package/knowledge/ai/prompt-context.md +72 -0
- package/knowledge/ai/prompt-suggestion.md +68 -0
- package/knowledge/ai/prompt-template.md +71 -0
- package/knowledge/ai/prompt-variable.md +61 -0
- package/knowledge/ai/reasoning-trace.md +106 -0
- package/knowledge/ai/source-explorer.md +117 -0
- package/knowledge/ai/source-group.md +59 -0
- package/knowledge/ai/source-reference.md +70 -0
- package/knowledge/ai/thinking-panel.md +77 -0
- package/knowledge/ai/tool-activity-feed.md +67 -0
- package/knowledge/ai/tool-call-card.md +66 -0
- package/knowledge/ai/tool-status-row.md +72 -0
- package/knowledge/ai/tool-timeline-item.md +71 -0
- package/knowledge/ai/voice-session.md +93 -0
- package/knowledge/feedback/alert.md +106 -0
- package/knowledge/feedback/badge.md +86 -0
- package/knowledge/feedback/card.md +54 -0
- package/knowledge/feedback/feedback-overview.md +37 -0
- package/knowledge/feedback/feedback.md +46 -0
- package/knowledge/feedback/help-icon.md +57 -0
- package/knowledge/feedback/loading-indicator.md +76 -0
- package/knowledge/feedback/notification-banner.md +73 -0
- package/knowledge/feedback/notification-popup.md +87 -0
- package/knowledge/feedback/notifications.md +158 -0
- package/knowledge/feedback/progress-bar.md +69 -0
- package/knowledge/feedback/rating-overview.md +58 -0
- package/knowledge/feedback/rating.md +64 -0
- package/knowledge/feedback/skeleton-avatar.md +48 -0
- package/knowledge/feedback/skeleton.md +53 -0
- package/knowledge/feedback/toast.md +74 -0
- package/knowledge/feedback/tooltip.md +72 -0
- package/knowledge/form/autocomplete.md +100 -0
- package/knowledge/form/checkbox.md +95 -0
- package/knowledge/form/date-time-field.md +63 -0
- package/knowledge/form/error-summary.md +56 -0
- package/knowledge/form/field-group.md +57 -0
- package/knowledge/form/file-uploader.md +60 -0
- package/knowledge/form/form-section.md +58 -0
- package/knowledge/form/number-input.md +92 -0
- package/knowledge/form/otp-input.md +83 -0
- package/knowledge/form/password-input.md +49 -0
- package/knowledge/form/range-slider.md +71 -0
- package/knowledge/form/rich-text-editor.md +106 -0
- package/knowledge/form/select.md +113 -0
- package/knowledge/form/signature.md +83 -0
- package/knowledge/form/slider.md +66 -0
- package/knowledge/form/text-area.md +90 -0
- package/knowledge/form/text-input.md +132 -0
- package/knowledge/form/time-input.md +44 -0
- package/knowledge/form/time-picker.md +73 -0
- package/knowledge/foundations/accessibility.md +97 -0
- package/knowledge/foundations/colors.md +1117 -0
- package/knowledge/foundations/figma.md +30 -0
- package/knowledge/foundations/icon-usage.md +114 -0
- package/knowledge/foundations/icons.md +16 -0
- package/knowledge/foundations/motion.md +39 -0
- package/knowledge/foundations/radius.md +17 -0
- package/knowledge/foundations/responsive.md +64 -0
- package/knowledge/foundations/rtl.md +106 -0
- package/knowledge/foundations/spacing.md +27 -0
- package/knowledge/foundations/theme.md +115 -0
- package/knowledge/foundations/tokens.json +12124 -0
- package/knowledge/foundations/typography.md +45 -0
- package/knowledge/general/accordion.md +79 -0
- package/knowledge/general/activity.md +44 -0
- package/knowledge/general/app-shell.md +64 -0
- package/knowledge/general/area-chart.md +89 -0
- package/knowledge/general/audio-player.md +85 -0
- package/knowledge/general/avatar-group.md +50 -0
- package/knowledge/general/avatar.md +61 -0
- package/knowledge/general/carousel-image.md +103 -0
- package/knowledge/general/chart.md +25 -0
- package/knowledge/general/chip.md +90 -0
- package/knowledge/general/code-snippet.md +80 -0
- package/knowledge/general/column-chart.md +84 -0
- package/knowledge/general/context-menu.md +55 -0
- package/knowledge/general/digital-stamp.md +77 -0
- package/knowledge/general/divider.md +65 -0
- package/knowledge/general/donut-chart.md +75 -0
- package/knowledge/general/draggable-list.md +43 -0
- package/knowledge/general/dropdown.md +90 -0
- package/knowledge/general/empty-state.md +60 -0
- package/knowledge/general/filtration.md +85 -0
- package/knowledge/general/footer.md +59 -0
- package/knowledge/general/line-chart.md +95 -0
- package/knowledge/general/list.md +91 -0
- package/knowledge/general/media-gallery.md +85 -0
- package/knowledge/general/media-viewer.md +78 -0
- package/knowledge/general/menu.md +66 -0
- package/knowledge/general/metric.md +92 -0
- package/knowledge/general/nav-bar.md +62 -0
- package/knowledge/general/nav-header.md +125 -0
- package/knowledge/general/number.md +72 -0
- package/knowledge/general/page-template.md +80 -0
- package/knowledge/general/pdf-viewer.md +91 -0
- package/knowledge/general/pie-chart-panel.md +86 -0
- package/knowledge/general/popover.md +115 -0
- package/knowledge/general/progress-circle.md +63 -0
- package/knowledge/general/quote.md +64 -0
- package/knowledge/general/radial-stepper.md +72 -0
- package/knowledge/general/scatter-chart.md +62 -0
- package/knowledge/general/second-nav-header.md +55 -0
- package/knowledge/general/slideout-menu.md +92 -0
- package/knowledge/general/stepper.md +42 -0
- package/knowledge/general/structured-list.md +52 -0
- package/knowledge/general/table-bulk-actions-bar.md +66 -0
- package/knowledge/general/table-of-content.md +49 -0
- package/knowledge/general/table.md +113 -0
- package/knowledge/general/tree-view.md +55 -0
- package/knowledge/general/vertical-tabs.md +48 -0
- package/knowledge/general/video-player.md +88 -0
- package/knowledge/manifest.json +919 -0
- package/knowledge/patterns/buttons-with-sdaia-touch.md +34 -0
- package/knowledge/patterns/sdaia-logo-animation.md +35 -0
- package/knowledge/patterns/switch-with-sdaia-touch.md +29 -0
- package/knowledge/setup.md +125 -0
- package/package.json +45 -4
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Sdaia Touch Buttons
|
|
2
|
+
|
|
3
|
+
## Metadata
|
|
4
|
+
- Component: Sdaia Touch Buttons
|
|
5
|
+
- Slug: `buttons-with-sdaia-touch`
|
|
6
|
+
- Category: Patterns
|
|
7
|
+
- Install: `npx sdaia-ui@latest add buttons-with-sdaia-touch`
|
|
8
|
+
- Import: `import { ButtonsWithSdaiaTouch } from '@/components/ui/ButtonsWithSdaiaTouch'`
|
|
9
|
+
- Installed files: `ButtonHoverPattern.tsx`, `ButtonsWithSdaiaTouch.tsx`, `ButtonsWithSdaiaTouch.types.ts`, `ButtonsWithSdaiaTouch.variants.ts`, `index.ts`
|
|
10
|
+
- Docs: https://ds.nacew.com/sdaia-touch/sdaia-touch-buttons
|
|
11
|
+
|
|
12
|
+
> **Hard rule:** `sdaia-ui` is a CLI, not a runtime package — NEVER run `npm install sdaia-ui` and NEVER `import … from 'sdaia-ui'`. Run `npx sdaia-ui@latest init` once per project (Tailwind CSS v4, tokens, the IBM Plex Sans Arabic font, the `@/` alias on Vite, `cn`), then `npx sdaia-ui@latest add buttons-with-sdaia-touch`. It copies the source into your components folder (`components/ui/ButtonsWithSdaiaTouch/`, under `src/` when the project has one); import it as `@/components/ui/ButtonsWithSdaiaTouch`. The files are yours: prefer props and composition over editing them. `npx sdaia-ui@latest update` never overwrites a file you changed: it keeps it and says it has updates; `diff` shows them and `update --force` takes them.
|
|
13
|
+
|
|
14
|
+
## Props
|
|
15
|
+
This component takes no documented props beyond standard HTML attributes.
|
|
16
|
+
|
|
17
|
+
## Accessibility
|
|
18
|
+
- Don't remove the focus ring or replace interactive elements with `div`s; keep the control keyboard-operable.
|
|
19
|
+
- For contrast, keyboard patterns and RTL rules, call `get_foundations` (`accessibility`, `rtl`).
|
|
20
|
+
|
|
21
|
+
## Design tokens used
|
|
22
|
+
Keep these consistent (resolve values with `get_tokens`):
|
|
23
|
+
- `var(--ds-color-button-bg-black-pressed)`
|
|
24
|
+
- `var(--ds-color-button-bg-danger-primary-pressed)`
|
|
25
|
+
- `var(--ds-color-button-bg-danger-secondary-hovered)`
|
|
26
|
+
- `var(--ds-color-button-bg-neutral-hovered)`
|
|
27
|
+
- `var(--ds-color-button-bg-neutral-pressed)`
|
|
28
|
+
- `var(--ds-color-button-bg-primary-pressed)`
|
|
29
|
+
|
|
30
|
+
## AI usage guidance
|
|
31
|
+
When generating UI:
|
|
32
|
+
- Install with `npx sdaia-ui@latest add buttons-with-sdaia-touch` (after `npx sdaia-ui@latest init`), then import `{ ButtonsWithSdaiaTouch }` from `@/components/ui/ButtonsWithSdaiaTouch`.
|
|
33
|
+
- NEVER run `npm install sdaia-ui` and NEVER `import` from the `sdaia-ui` package — it is a source-copying CLI, not a component library.
|
|
34
|
+
- Pick one theme per screen: dark is `.theme-dark` (or `.dark`) on `<html>`; style surrounding layout with DS tokens (`get_tokens`), never hardcoded colors.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Sdaia Logo Animation
|
|
2
|
+
|
|
3
|
+
## Metadata
|
|
4
|
+
- Component: Sdaia Logo Animation
|
|
5
|
+
- Slug: `sdaia-logo-animation`
|
|
6
|
+
- Category: Patterns
|
|
7
|
+
- Install: `npx sdaia-ui@latest add sdaia-logo-animation`
|
|
8
|
+
- Import: `import { SdaiaLogoAnimation } from '@/components/ui/SdaiaLogoAnimation'`
|
|
9
|
+
- Installed files: `BGSVG.tsx`, `SdaiaLogoAnimation.tsx`, `SdaiaLogoAnimation.types.ts`, `SdaiaLogoAnimation.variants.ts`, `index.ts`
|
|
10
|
+
- Docs: https://ds.nacew.com/sdaia-touch/logo-animation
|
|
11
|
+
|
|
12
|
+
> **Hard rule:** `sdaia-ui` is a CLI, not a runtime package — NEVER run `npm install sdaia-ui` and NEVER `import … from 'sdaia-ui'`. Run `npx sdaia-ui@latest init` once per project (Tailwind CSS v4, tokens, the IBM Plex Sans Arabic font, the `@/` alias on Vite, `cn`), then `npx sdaia-ui@latest add sdaia-logo-animation`. It copies the source into your components folder (`components/ui/SdaiaLogoAnimation/`, under `src/` when the project has one); import it as `@/components/ui/SdaiaLogoAnimation`. The files are yours: prefer props and composition over editing them. `npx sdaia-ui@latest update` never overwrites a file you changed: it keeps it and says it has updates; `diff` shows them and `update --force` takes them.
|
|
13
|
+
|
|
14
|
+
## Props
|
|
15
|
+
| Prop | Type | Default | Description |
|
|
16
|
+
| --- | --- | --- | --- |
|
|
17
|
+
| `dir?` | `'ltr' \| 'rtl'` | — | Optional text direction for the wrapper. |
|
|
18
|
+
| `width?` | `string \| number` | — | Number → px. String → any CSS length (`"70%"`, `"12rem"`, …). |
|
|
19
|
+
| `height?` | `string \| number` | — | Number → px. String → `%`, `px`, `vh`, etc. |
|
|
20
|
+
|
|
21
|
+
Also accepts standard `<div>` HTML attributes (`className`, `style`, `onClick`, `aria-*`, …) — except: `children`, `width`, `height`.
|
|
22
|
+
|
|
23
|
+
## Options (allowed values)
|
|
24
|
+
- `dir`: `'ltr'` \| `'rtl'` — Optional text direction for the wrapper.
|
|
25
|
+
|
|
26
|
+
## Accessibility
|
|
27
|
+
- Don't remove the focus ring or replace interactive elements with `div`s; keep the control keyboard-operable.
|
|
28
|
+
- For contrast, keyboard patterns and RTL rules, call `get_foundations` (`accessibility`, `rtl`).
|
|
29
|
+
|
|
30
|
+
## AI usage guidance
|
|
31
|
+
When generating UI:
|
|
32
|
+
- Install with `npx sdaia-ui@latest add sdaia-logo-animation` (after `npx sdaia-ui@latest init`), then import `{ SdaiaLogoAnimation }` from `@/components/ui/SdaiaLogoAnimation`.
|
|
33
|
+
- NEVER run `npm install sdaia-ui` and NEVER `import` from the `sdaia-ui` package — it is a source-copying CLI, not a component library.
|
|
34
|
+
- Use only the documented option values listed under "Options".
|
|
35
|
+
- Pick one theme per screen: dark is `.theme-dark` (or `.dark`) on `<html>`; style surrounding layout with DS tokens (`get_tokens`), never hardcoded colors.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Sdaia Touch Switch
|
|
2
|
+
|
|
3
|
+
## Metadata
|
|
4
|
+
- Component: Sdaia Touch Switch
|
|
5
|
+
- Slug: `switch-with-sdaia-touch`
|
|
6
|
+
- Category: Patterns
|
|
7
|
+
- Install: `npx sdaia-ui@latest add switch-with-sdaia-touch`
|
|
8
|
+
- Import: `import { SwitchWithSdaiaTouch } from '@/components/ui/SwitchWithSdaiaTouch'`
|
|
9
|
+
- Installed files: `SwitchWithSdaiaTouch.tsx`, `SwitchWithSdaiaTouch.types.ts`, `SwitchWithSdaiaTouch.variants.ts`, `index.ts`
|
|
10
|
+
- Docs: https://ds.nacew.com/sdaia-touch/sdaia-touch-switch
|
|
11
|
+
|
|
12
|
+
> **Hard rule:** `sdaia-ui` is a CLI, not a runtime package — NEVER run `npm install sdaia-ui` and NEVER `import … from 'sdaia-ui'`. Run `npx sdaia-ui@latest init` once per project (Tailwind CSS v4, tokens, the IBM Plex Sans Arabic font, the `@/` alias on Vite, `cn`), then `npx sdaia-ui@latest add switch-with-sdaia-touch`. It copies the source into your components folder (`components/ui/SwitchWithSdaiaTouch/`, under `src/` when the project has one); import it as `@/components/ui/SwitchWithSdaiaTouch`. The files are yours: prefer props and composition over editing them. `npx sdaia-ui@latest update` never overwrites a file you changed: it keeps it and says it has updates; `diff` shows them and `update --force` takes them.
|
|
13
|
+
|
|
14
|
+
## Props
|
|
15
|
+
This component takes no documented props beyond standard HTML attributes.
|
|
16
|
+
|
|
17
|
+
## Accessibility
|
|
18
|
+
- Don't remove the focus ring or replace interactive elements with `div`s; keep the control keyboard-operable.
|
|
19
|
+
- For contrast, keyboard patterns and RTL rules, call `get_foundations` (`accessibility`, `rtl`).
|
|
20
|
+
|
|
21
|
+
## Design tokens used
|
|
22
|
+
Keep these consistent (resolve values with `get_tokens`):
|
|
23
|
+
- `var(--ds-radius-full)`
|
|
24
|
+
|
|
25
|
+
## AI usage guidance
|
|
26
|
+
When generating UI:
|
|
27
|
+
- Install with `npx sdaia-ui@latest add switch-with-sdaia-touch` (after `npx sdaia-ui@latest init`), then import `{ SwitchWithSdaiaTouch }` from `@/components/ui/SwitchWithSdaiaTouch`.
|
|
28
|
+
- NEVER run `npm install sdaia-ui` and NEVER `import` from the `sdaia-ui` package — it is a source-copying CLI, not a component library.
|
|
29
|
+
- Pick one theme per screen: dark is `.theme-dark` (or `.dark`) on `<html>`; style surrounding layout with DS tokens (`get_tokens`), never hardcoded colors.
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
# SDAIA Design System — Project Setup Guide
|
|
2
|
+
|
|
3
|
+
This matches the Installation guide on the docs site (https://ds.nacew.com/docs/installation) and `sdaia-ui` 1.11.0.
|
|
4
|
+
|
|
5
|
+
> **HARD RULE — `sdaia-ui` is a CLI, not a runtime package.**
|
|
6
|
+
> NEVER run `npm install sdaia-ui` and NEVER write `import … from 'sdaia-ui'`.
|
|
7
|
+
> Run it with `npx sdaia-ui@latest …`: `init` once per project, then `add <name>` per component. The CLI copies each component's **source** into your project, and you import it from there.
|
|
8
|
+
|
|
9
|
+
> **The installed files are yours.** Prefer props and composition over editing them, but you may change them. New releases never change them on their own: `npx sdaia-ui@latest diff` shows what changed upstream, and `npx sdaia-ui@latest update` applies it while **keeping files you edited** (it reports them; `--force` replaces them).
|
|
10
|
+
|
|
11
|
+
## Supported setups
|
|
12
|
+
|
|
13
|
+
- **Next.js** with the App Router or the Pages Router, with or without a `src/` folder.
|
|
14
|
+
- **Vite + React** with TypeScript.
|
|
15
|
+
|
|
16
|
+
Other frameworks are not supported yet.
|
|
17
|
+
|
|
18
|
+
## Step 1 — Create a project (skip if you have one)
|
|
19
|
+
|
|
20
|
+
Next.js (Node.js 20.9 or later). Keep TypeScript and the default `@/*` import alias; the App Router, Tailwind CSS and `src/` can be yes or no:
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
npx create-next-app@latest my-app
|
|
24
|
+
cd my-app
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Vite + React:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
npm create vite@latest my-app -- --template react-ts
|
|
31
|
+
cd my-app
|
|
32
|
+
npm install
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
> Every later command runs in the **project root** (`my-app/`). Running `init` or `add` from a parent folder creates files in the wrong place.
|
|
36
|
+
|
|
37
|
+
## Step 2 — Run `init`
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
npx sdaia-ui@latest init
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
`init` detects the setup and asks four questions, each pre-filled for your project (press Enter to accept, or run `init --yes` to accept them all):
|
|
44
|
+
|
|
45
|
+
| Question | Default |
|
|
46
|
+
| --- | --- |
|
|
47
|
+
| Where should components be installed? | `src/components/ui` (or `components/ui` without `src/`) |
|
|
48
|
+
| Where should utilities (cn.ts) be installed? | `src/lib` (or `lib`) |
|
|
49
|
+
| Which CSS file is your global stylesheet? | Next.js App Router `app/globals.css` · Pages Router `styles/globals.css` · Vite `src/index.css` (under `src/` when the project has one) |
|
|
50
|
+
| Which brand? | `sdaia-dga` (default). Others: `spectrum`, `canvas`, `dessert`, `dune`, `carbon` (`init --brand <name>`) |
|
|
51
|
+
|
|
52
|
+
What `init` does:
|
|
53
|
+
|
|
54
|
+
- Checks for Tailwind CSS v4 and offers to install it (components need v4).
|
|
55
|
+
- Installs `@sdaia-ds/tokens` (pinned to the version the CLI was tested with), `@platformscode/icons`, `clsx`, `tailwind-merge`, `class-variance-authority` and the brand font (**IBM Plex Sans Arabic** for every brand, plus the brand's own font).
|
|
56
|
+
- Adds the core styles to your global CSS: the tokens import, the type scale (`text-display-*`, `text-text-*`), the class-based `dark:` variant, and the responsive rules that switch sizes at **768px** (tablet) and **1280px** (desktop).
|
|
57
|
+
- Imports the font files from the app entry: `app/layout.tsx` (App Router), `pages/_app.tsx` (Pages Router) or `src/main.tsx` (Vite).
|
|
58
|
+
- Sets up the `@/` import alias (in Vite too), creates `cn` and saves the answers in `sdaia.config.json`.
|
|
59
|
+
|
|
60
|
+
Do **not** add a Google Fonts `<link>` or a manual `@font-face`: `init` already installs and imports the font.
|
|
61
|
+
|
|
62
|
+
## Step 3 — Add components
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
npx sdaia-ui@latest add button
|
|
66
|
+
npx sdaia-ui@latest add button text-input card # several at once
|
|
67
|
+
npx sdaia-ui@latest add --all # every component
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Use the slugs from `list_components` (the CLI also accepts the docs page names, e.g. `alerts`, `file-upload`, `datepicker`). `add` also installs the internal parts a component needs, its utility files (`sdaia-assets`, hooks) and any extra CSS it uses (glass surface, AI motion).
|
|
71
|
+
|
|
72
|
+
## Step 4 — Import
|
|
73
|
+
|
|
74
|
+
```tsx
|
|
75
|
+
import { Button } from '@/components/ui/Button';
|
|
76
|
+
import { TextInput } from '@/components/ui/TextInput';
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
The folder is the PascalCase component name. Without the `@/` alias, use a relative path to the same folder.
|
|
80
|
+
|
|
81
|
+
## Step 5 — Arabic, dark mode and brands
|
|
82
|
+
|
|
83
|
+
Set these on `<html>` so they apply before React renders:
|
|
84
|
+
|
|
85
|
+
```html
|
|
86
|
+
<html lang="ar" dir="rtl" class="theme-dark brand-spectrum">
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
- **Direction:** `lang="ar" dir="rtl"` for Arabic. Components follow the document direction; each also accepts `dir="rtl" | "ltr"` for a single subtree. Where to set it: `app/layout.tsx` (App Router), `<Html>` in `pages/_document.tsx` (Pages Router), `index.html` (Vite).
|
|
90
|
+
- **Dark mode:** toggle the `theme-dark` class on `<html>`. It switches both the design tokens and Tailwind `dark:` styles. Use one theme per screen.
|
|
91
|
+
- **Brand:** `sdaia-dga` needs no class. For another brand add the class `init` printed (`brand-spectrum`, `brand-canvas`, `brand-dessert`, `brand-dune`, `brand-carbon`). See `get_foundations` topic `theme`.
|
|
92
|
+
|
|
93
|
+
## Step 6 — Icons
|
|
94
|
+
|
|
95
|
+
Use `DgaIcon` with icon data from `@platformscode/icons` (installed by `init`). `DgaIcon` arrives with any component that uses icons; to use it on its own, run `npx sdaia-ui@latest add dga-icon`. It lives at `@/components/ui/DgaIcon`:
|
|
96
|
+
|
|
97
|
+
```tsx
|
|
98
|
+
import { DgaIcon } from '@/components/ui/DgaIcon';
|
|
99
|
+
import { search01Stroke } from '@platformscode/icons';
|
|
100
|
+
|
|
101
|
+
<span className="size-icon-sm">
|
|
102
|
+
<DgaIcon data={search01Stroke} />
|
|
103
|
+
</span>
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
The SVG fills its parent; size it with a `size-icon-*` class: `xs` 12, `sm` 16, `lg` 20, `xl` 24, `2xl` 32, `3xl` 40 px (there is **no** `size-icon-md`). Directional icons flip in RTL with `<DgaIcon data={…} flipOnRtl />`. Rules and a name map: `get_foundations` topic `icon-usage`.
|
|
107
|
+
|
|
108
|
+
Brand marks and bespoke glyphs (logos, flag, feedback emojis) come from `sdaia-assets`, which `add` installs at `@/components/ui/sdaia-assets` when a component needs it.
|
|
109
|
+
|
|
110
|
+
## Step 7 — Keep components up to date
|
|
111
|
+
|
|
112
|
+
```bash
|
|
113
|
+
npx sdaia-ui@latest diff # what changed upstream for your components
|
|
114
|
+
npx sdaia-ui@latest update --all # apply it; files you edited are kept
|
|
115
|
+
npx sdaia-ui@latest update button --dry-run
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
Projects set up with `sdaia-ui` 1.6.6 or earlier kept no install record. Run once: `update --all --yes` (adds the font and core styles), review with `diff`, then `update --all --force` (replaces edited files — copy out changes you want to keep first).
|
|
119
|
+
|
|
120
|
+
## Next
|
|
121
|
+
|
|
122
|
+
- `list_components` / `search_components` — find a component slug.
|
|
123
|
+
- `get_component_docs` — props, defaults, allowed values and accessibility for one component.
|
|
124
|
+
- `get_foundations` — `theme`, `typography`, `responsive`, `rtl`, `accessibility`, `icon-usage`, token topics.
|
|
125
|
+
- `get_tokens` — exact token values for custom layout around components.
|
package/package.json
CHANGED
|
@@ -1,6 +1,47 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sdaia-ds/mcp",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "3.1.1",
|
|
4
|
+
"description": "MCP server for the SDAIA Design System — exposes accurate, source-derived component docs, design tokens, and setup guidance as tools for AI coding agents.",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"bin": {
|
|
7
|
+
"sdaia-ds-mcp": "dist/index.js"
|
|
8
|
+
},
|
|
9
|
+
"files": [
|
|
10
|
+
"dist/",
|
|
11
|
+
"knowledge/"
|
|
12
|
+
],
|
|
13
|
+
"scripts": {
|
|
14
|
+
"build": "tsc",
|
|
15
|
+
"prepublishOnly": "npm run build",
|
|
16
|
+
"start": "tsx index.ts",
|
|
17
|
+
"generate": "tsx scripts/generate.ts",
|
|
18
|
+
"test": "node --import tsx --test tests/*.test.ts"
|
|
19
|
+
},
|
|
20
|
+
"keywords": [
|
|
21
|
+
"mcp",
|
|
22
|
+
"sdaia",
|
|
23
|
+
"design-system",
|
|
24
|
+
"ai",
|
|
25
|
+
"copilot",
|
|
26
|
+
"tokens"
|
|
27
|
+
],
|
|
28
|
+
"author": "",
|
|
29
|
+
"license": "ISC",
|
|
30
|
+
"engines": {
|
|
31
|
+
"node": ">=18"
|
|
32
|
+
},
|
|
33
|
+
"type": "module",
|
|
34
|
+
"dependencies": {
|
|
35
|
+
"@modelcontextprotocol/sdk": "^1.32.1"
|
|
36
|
+
},
|
|
37
|
+
"devDependencies": {
|
|
38
|
+
"@platformscode/icons": "0.0.11",
|
|
39
|
+
"@sdaia-ds/tokens": "2.0.3",
|
|
40
|
+
"@types/node": "^25.9.1",
|
|
41
|
+
"tsx": "^4.22.3",
|
|
42
|
+
"typescript": "^6.0.3"
|
|
43
|
+
},
|
|
44
|
+
"publishConfig": {
|
|
45
|
+
"access": "public"
|
|
46
|
+
}
|
|
47
|
+
}
|