@sdaia-ds/mcp 0.0.0-stage → 3.1.0

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.
Files changed (151) hide show
  1. package/README.md +212 -2
  2. package/dist/index.d.ts +2 -0
  3. package/dist/index.js +291 -0
  4. package/dist/index.js.map +1 -0
  5. package/knowledge/actions/breadcrumb.md +50 -0
  6. package/knowledge/actions/button-menu.md +82 -0
  7. package/knowledge/actions/button-split.md +69 -0
  8. package/knowledge/actions/button.md +101 -0
  9. package/knowledge/actions/content-switcher.md +66 -0
  10. package/knowledge/actions/date-picker.md +115 -0
  11. package/knowledge/actions/floating-button.md +100 -0
  12. package/knowledge/actions/horizontal-tabs.md +52 -0
  13. package/knowledge/actions/link.md +76 -0
  14. package/knowledge/actions/modal.md +103 -0
  15. package/knowledge/actions/pagination.md +69 -0
  16. package/knowledge/actions/radio-button.md +88 -0
  17. package/knowledge/actions/switch.md +87 -0
  18. package/knowledge/actions/tag.md +69 -0
  19. package/knowledge/ai/agent-activity.md +65 -0
  20. package/knowledge/ai/agent-card.md +65 -0
  21. package/knowledge/ai/agent-handoff.md +65 -0
  22. package/knowledge/ai/ai-citation.md +78 -0
  23. package/knowledge/ai/ai-code-block.md +86 -0
  24. package/knowledge/ai/ai-disclaimer.md +84 -0
  25. package/knowledge/ai/ai-message-bubble.md +81 -0
  26. package/knowledge/ai/ai-message.md +118 -0
  27. package/knowledge/ai/ai-prompt-input.md +93 -0
  28. package/knowledge/ai/ai-states.md +107 -0
  29. package/knowledge/ai/ai-status-indicator.md +81 -0
  30. package/knowledge/ai/ai-suggested-prompts.md +62 -0
  31. package/knowledge/ai/ai-thinking-indicator.md +94 -0
  32. package/knowledge/ai/artifact-viewer.md +105 -0
  33. package/knowledge/ai/citation.md +61 -0
  34. package/knowledge/ai/context-manager.md +111 -0
  35. package/knowledge/ai/prompt-context.md +72 -0
  36. package/knowledge/ai/prompt-suggestion.md +68 -0
  37. package/knowledge/ai/prompt-template.md +71 -0
  38. package/knowledge/ai/prompt-variable.md +61 -0
  39. package/knowledge/ai/reasoning-trace.md +106 -0
  40. package/knowledge/ai/source-explorer.md +117 -0
  41. package/knowledge/ai/source-group.md +59 -0
  42. package/knowledge/ai/source-reference.md +70 -0
  43. package/knowledge/ai/thinking-panel.md +77 -0
  44. package/knowledge/ai/tool-activity-feed.md +67 -0
  45. package/knowledge/ai/tool-call-card.md +66 -0
  46. package/knowledge/ai/tool-status-row.md +72 -0
  47. package/knowledge/ai/tool-timeline-item.md +71 -0
  48. package/knowledge/ai/voice-session.md +93 -0
  49. package/knowledge/feedback/alert.md +106 -0
  50. package/knowledge/feedback/badge.md +86 -0
  51. package/knowledge/feedback/card.md +54 -0
  52. package/knowledge/feedback/feedback-overview.md +37 -0
  53. package/knowledge/feedback/feedback.md +46 -0
  54. package/knowledge/feedback/help-icon.md +57 -0
  55. package/knowledge/feedback/loading-indicator.md +76 -0
  56. package/knowledge/feedback/notification-banner.md +73 -0
  57. package/knowledge/feedback/notification-popup.md +87 -0
  58. package/knowledge/feedback/notifications.md +158 -0
  59. package/knowledge/feedback/progress-bar.md +69 -0
  60. package/knowledge/feedback/rating-overview.md +58 -0
  61. package/knowledge/feedback/rating.md +64 -0
  62. package/knowledge/feedback/skeleton-avatar.md +48 -0
  63. package/knowledge/feedback/skeleton.md +53 -0
  64. package/knowledge/feedback/toast.md +74 -0
  65. package/knowledge/feedback/tooltip.md +72 -0
  66. package/knowledge/form/autocomplete.md +100 -0
  67. package/knowledge/form/checkbox.md +95 -0
  68. package/knowledge/form/date-time-field.md +63 -0
  69. package/knowledge/form/error-summary.md +56 -0
  70. package/knowledge/form/field-group.md +57 -0
  71. package/knowledge/form/file-uploader.md +60 -0
  72. package/knowledge/form/form-section.md +58 -0
  73. package/knowledge/form/number-input.md +92 -0
  74. package/knowledge/form/otp-input.md +83 -0
  75. package/knowledge/form/password-input.md +49 -0
  76. package/knowledge/form/range-slider.md +71 -0
  77. package/knowledge/form/rich-text-editor.md +106 -0
  78. package/knowledge/form/select.md +113 -0
  79. package/knowledge/form/signature.md +83 -0
  80. package/knowledge/form/slider.md +66 -0
  81. package/knowledge/form/text-area.md +90 -0
  82. package/knowledge/form/text-input.md +132 -0
  83. package/knowledge/form/time-input.md +44 -0
  84. package/knowledge/form/time-picker.md +73 -0
  85. package/knowledge/foundations/accessibility.md +97 -0
  86. package/knowledge/foundations/colors.md +1113 -0
  87. package/knowledge/foundations/figma.md +30 -0
  88. package/knowledge/foundations/icon-usage.md +114 -0
  89. package/knowledge/foundations/icons.md +16 -0
  90. package/knowledge/foundations/motion.md +39 -0
  91. package/knowledge/foundations/radius.md +17 -0
  92. package/knowledge/foundations/responsive.md +64 -0
  93. package/knowledge/foundations/rtl.md +106 -0
  94. package/knowledge/foundations/spacing.md +27 -0
  95. package/knowledge/foundations/theme.md +115 -0
  96. package/knowledge/foundations/tokens.json +12080 -0
  97. package/knowledge/foundations/typography.md +45 -0
  98. package/knowledge/general/accordion.md +79 -0
  99. package/knowledge/general/activity.md +44 -0
  100. package/knowledge/general/app-shell.md +64 -0
  101. package/knowledge/general/area-chart.md +89 -0
  102. package/knowledge/general/audio-player.md +85 -0
  103. package/knowledge/general/avatar-group.md +50 -0
  104. package/knowledge/general/avatar.md +61 -0
  105. package/knowledge/general/carousel-image.md +103 -0
  106. package/knowledge/general/chart.md +25 -0
  107. package/knowledge/general/chip.md +90 -0
  108. package/knowledge/general/code-snippet.md +80 -0
  109. package/knowledge/general/column-chart.md +84 -0
  110. package/knowledge/general/context-menu.md +55 -0
  111. package/knowledge/general/digital-stamp.md +77 -0
  112. package/knowledge/general/divider.md +65 -0
  113. package/knowledge/general/donut-chart.md +75 -0
  114. package/knowledge/general/draggable-list.md +43 -0
  115. package/knowledge/general/dropdown.md +90 -0
  116. package/knowledge/general/empty-state.md +60 -0
  117. package/knowledge/general/filtration.md +85 -0
  118. package/knowledge/general/footer.md +59 -0
  119. package/knowledge/general/line-chart.md +95 -0
  120. package/knowledge/general/list.md +91 -0
  121. package/knowledge/general/media-gallery.md +85 -0
  122. package/knowledge/general/media-viewer.md +78 -0
  123. package/knowledge/general/menu.md +66 -0
  124. package/knowledge/general/metric.md +92 -0
  125. package/knowledge/general/nav-bar.md +62 -0
  126. package/knowledge/general/nav-header.md +125 -0
  127. package/knowledge/general/number.md +72 -0
  128. package/knowledge/general/page-template.md +80 -0
  129. package/knowledge/general/pdf-viewer.md +91 -0
  130. package/knowledge/general/pie-chart-panel.md +86 -0
  131. package/knowledge/general/popover.md +115 -0
  132. package/knowledge/general/progress-circle.md +63 -0
  133. package/knowledge/general/quote.md +64 -0
  134. package/knowledge/general/radial-stepper.md +72 -0
  135. package/knowledge/general/scatter-chart.md +62 -0
  136. package/knowledge/general/second-nav-header.md +55 -0
  137. package/knowledge/general/slideout-menu.md +92 -0
  138. package/knowledge/general/stepper.md +42 -0
  139. package/knowledge/general/structured-list.md +52 -0
  140. package/knowledge/general/table-bulk-actions-bar.md +66 -0
  141. package/knowledge/general/table-of-content.md +49 -0
  142. package/knowledge/general/table.md +113 -0
  143. package/knowledge/general/tree-view.md +55 -0
  144. package/knowledge/general/vertical-tabs.md +48 -0
  145. package/knowledge/general/video-player.md +88 -0
  146. package/knowledge/manifest.json +919 -0
  147. package/knowledge/patterns/buttons-with-sdaia-touch.md +34 -0
  148. package/knowledge/patterns/sdaia-logo-animation.md +35 -0
  149. package/knowledge/patterns/switch-with-sdaia-touch.md +29 -0
  150. package/knowledge/setup.md +125 -0
  151. package/package.json +45 -4
@@ -0,0 +1,76 @@
1
+ # Link
2
+
3
+ ## Metadata
4
+ - Component: Link
5
+ - Slug: `link`
6
+ - Category: Actions
7
+ - Install: `npx sdaia-ui@latest add link`
8
+ - Import: `import { Link } from '@/components/ui/Link'`
9
+ - Installed files: `Link.tsx`, `Link.types.ts`, `Link.variants.ts`, `index.ts`
10
+ - Docs: https://ds.nacew.com/components/link
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 link`. It copies the source into your components folder (`components/ui/Link/`, under `src/` when the project has one); import it as `@/components/ui/Link`. 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?` | `AnchorHTMLAttributes<HTMLAnchorElement>['dir']` | — | Text direction applied to the root ('ltr' \| 'rtl'). Leave unset to inherit. Typed as the native `dir` attribute for backward compatibility. |
18
+ | `size?` | `'sm' \| 'md' \| 'lg'` | 'md' | Size of the link |
19
+ | `variant?` | `'primary' \| 'neutral' \| 'danger'` | 'primary' | Visual style |
20
+ | `inline?` | `boolean` | false | Show underline |
21
+ | `disabled?` | `boolean` | false | Disabled state |
22
+ | `visited?` | `boolean` | false | Visited state (controlled) |
23
+ | `leadingIcon?` | `ReactNode` | — | Leading icon element (e.g. `<DgaIcon data={…Stroke} />`), sized by a size-icon-* token |
24
+ | `trailingIcon?` | `ReactNode` | — | Trailing icon element |
25
+ | `as?` | `'a' \| 'button'` | 'a' | Renders a `<button type="button">` with the link styling instead of an `<a>`, for in-page actions that do not navigate (e.g. "Clear selection"). `href`, `target` and the other anchor-only attributes are ignored then. |
26
+ | `children?` | `ReactNode` | — | Link content |
27
+
28
+ Also accepts standard `<a>` HTML attributes (`className`, `style`, `onClick`, `aria-*`, …).
29
+
30
+ ## Options (allowed values)
31
+ - `size`: `'sm'` \| `'md'` \| `'lg'` — Size of the link
32
+ - `variant`: `'primary'` \| `'neutral'` \| `'danger'` — Visual style. `danger` uses the Link/link-danger tokens — for links that
33
+ point at a problem, such as the items of an `ErrorSummary`.
34
+ - `as`: `'a'` \| `'button'` — Element the link renders.
35
+
36
+ ## Deprecated props
37
+ Do not use in new code:
38
+ - `rtl`
39
+
40
+ ## Accessibility
41
+ - Don't remove the focus ring or replace interactive elements with `div`s; keep the control keyboard-operable.
42
+ - For contrast, keyboard patterns and RTL rules, call `get_foundations` (`accessibility`, `rtl`).
43
+
44
+ ## Design tokens used
45
+ Keep these consistent (resolve values with `get_tokens`):
46
+ - `var(--ds-color-bg-default)`
47
+ - `var(--ds-color-border-focus)`
48
+ - `var(--ds-color-link-)`
49
+ - `var(--ds-color-link-danger)`
50
+ - `var(--ds-color-link-danger-focused)`
51
+ - `var(--ds-color-link-danger-hovered)`
52
+ - `var(--ds-color-link-danger-pressed)`
53
+ - `var(--ds-color-link-danger-visited)`
54
+ - `var(--ds-color-link-neutral)`
55
+ - `var(--ds-color-link-neutral-focused)`
56
+ - `var(--ds-color-link-neutral-hovered)`
57
+ - `var(--ds-color-link-neutral-pressed)`
58
+ - `var(--ds-color-link-neutral-visited)`
59
+ - `var(--ds-color-link-primary)`
60
+ - `var(--ds-color-link-primary-focused)`
61
+ - `var(--ds-color-link-primary-hovered)`
62
+ - `var(--ds-color-link-primary-pressed)`
63
+ - `var(--ds-color-link-primary-visited)`
64
+ - `var(--ds-color-text-disabled)`
65
+ - `var(--ds-spacing-sm)`
66
+ - `var(--ds-spacing-xs)`
67
+ - `var(--ds-spacing-xxs)`
68
+
69
+ ## AI usage guidance
70
+ When generating UI:
71
+ - Install with `npx sdaia-ui@latest add link` (after `npx sdaia-ui@latest init`), then import `{ Link }` from `@/components/ui/Link`.
72
+ - NEVER run `npm install sdaia-ui` and NEVER `import` from the `sdaia-ui` package — it is a source-copying CLI, not a component library.
73
+ - Use only the documented option values listed under "Options".
74
+ - Pass icons via `<DgaIcon data={…} className="size-icon-sm" />` from `@platformscode/icons` only — see `get_foundations` (`icon-usage`). Never emoji, Lucide, or random icons (e.g. `pizza01Stroke` for dark mode).
75
+ - Express the disabled state with the `disabled` prop, not custom styling.
76
+ - 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,103 @@
1
+ # Modal
2
+
3
+ ## Metadata
4
+ - Component: Modal
5
+ - Slug: `modal`
6
+ - Category: Actions
7
+ - Install: `npx sdaia-ui@latest add modal`
8
+ - Import: `import { Modal } from '@/components/ui/Modal'`
9
+ - Installed files: `Modal.tsx`, `Modal.types.ts`, `Modal.variants.ts`, `index.ts`
10
+ - Docs: https://ds.nacew.com/components/modal
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 modal`. It copies the source into your components folder (`components/ui/Modal/`, under `src/` when the project has one); import it as `@/components/ui/Modal`. 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
+ | `open?` | `boolean` | — | Controlled visibility. When omitted the modal is open for as long as it is mounted, so the existing `{open && <Modal onClose={…} />}` pattern keeps working. Pass `open={false}` to keep it mounted but closed (plays the exit animation and returns focus to the opener). |
18
+ | `inline?` | `boolean` | false | Static showcase mode — renders only the card, in place, with no portal, overlay, focus trap, Escape handling or scroll lock. For documentation / design previews only. Real dialogs must leave this off so keyboard and screen-reader users get the modal behaviour. |
19
+ | `container?` | `Element \| null` | — | Element the dialog is portalled into. Defaults to `document.body`. Theme (`.theme-dark`), brand (`.brand-*`) and direction are copied from where the Modal is rendered, so a body portal still matches a locally themed section. |
20
+ | `closeOnEscape?` | `boolean` | true | Close (calls `onClose`) when Escape is pressed. Default `true`. |
21
+ | `closeOnOverlayClick?` | `boolean` | true | Close (calls `onClose`) when the overlay outside the card is clicked. Default `true`. |
22
+ | `lockScroll?` | `boolean` | true | Prevent the page behind the dialog from scrolling while open. Default `true`. |
23
+ | `initialFocusRef?` | `RefObject<HTMLElement \| null>` | — | Element that receives focus when the dialog opens. Defaults to the first `[autofocus]`/`[data-autofocus]` element, then the first focusable element inside the dialog, then the dialog itself. |
24
+ | `restoreFocus?` | `boolean` | true | Return focus to the element that opened the dialog when it closes. Default `true`. |
25
+ | `overlayClassName?` | `string` | — | Extra classes for the overlay (backdrop) element. |
26
+ | `showHeader?` | `boolean` | true | Show the ModalHeader section |
27
+ | `divider?` | `boolean` | true | Show the divider between the content and the actions (hidden when no action renders). |
28
+ | `showActions?` | `boolean` | true | Show the ModalActions section |
29
+ | `mobile?` | `boolean` | false | Mobile layout — narrower width + stacked actions |
30
+ | `surface?` | `'solid' \| 'glass'` | 'solid' | Surface treatment — `'solid'` (default) or `'glass'` (translucent liquid-glass material). |
31
+ | `title?` | `string` | — | Dialog title — also the dialog's accessible name (`aria-labelledby`). |
32
+ | `supportingText?` | `string` | — | Supporting text — also the dialog's description (`aria-describedby`). |
33
+ | `showSupportingText?` | `boolean` | true | Show supporting text |
34
+ | `headerPlacement?` | `ModalHeaderPlacement` | 'start' | Header placement layout |
35
+ | `featuredIcon?` | `ReactNode` | — | Featured icon in header |
36
+ | `showCloseButton?` | `boolean` | true | Show close button in header |
37
+ | `onClose?` | `() => void` | — | Called by the close button, Escape and overlay click. |
38
+ | `actionsType?` | `ModalActionsType` | 'hug-start' | Actions layout type (overridden to "stack" when mobile=true) |
39
+ | `primaryLabel?` | `string` | — | Primary button label — the button renders only when a label is set. |
40
+ | `secondaryLabel?` | `string` | — | Secondary button label — the button renders only when a label is set. |
41
+ | `showSecondary?` | `boolean` | true | Show secondary button (still requires `secondaryLabel`). Default `true`. |
42
+ | `tertiaryLabel?` | `string` | — | Tertiary button label — the button renders only when a label is set. |
43
+ | `showTertiary?` | `boolean` | false | Show tertiary button (also requires `tertiaryLabel`). Default `false`. |
44
+ | `onPrimaryClick?` | `() => void` | — | Primary button click handler |
45
+ | `onSecondaryClick?` | `() => void` | — | Secondary button click handler |
46
+ | `onTertiaryClick?` | `() => void` | — | Tertiary button click handler |
47
+ | `labels?` | `Partial<ModalLabels>` | — | Override built-in strings (English defaults) to localize the modal. |
48
+ | `dir?` | `'ltr' \| 'rtl'` | — | Text direction. Inherits from the document when omitted (the portalled dialog copies the direction of the place the Modal is rendered). |
49
+ | `children?` | `ReactNode` | — | Body content, rendered below the title / supporting text. |
50
+ | `className?` | `string` | — | Additional class name (applied to the dialog card). |
51
+
52
+ Also accepts standard `<div>` HTML attributes (`className`, `style`, `onClick`, `aria-*`, …) — except: `children`, `dir`, `title`.
53
+
54
+ ## Options (allowed values)
55
+ - `surface`: `'solid'` \| `'glass'` — Surface treatment of the modal card.
56
+ - `'solid'` (default) — opaque card with the standard surface background.
57
+ - `'glass'` — translucent liquid-glass material (blurred backdrop +
58
+ beveled edge highlight). Reads best placed over imagery or color.
59
+
60
+ The visual is provided by the shared `.glass-surface` utility, so it is
61
+ theme-aware (light / dark) and identical across every component that
62
+ exposes a `surface` prop.
63
+ - `dir`: `'ltr'` \| `'rtl'` — Text direction. Inherits from the document when omitted (the portalled
64
+ dialog copies the direction of the place the Modal is rendered).
65
+
66
+ ## Deprecated props
67
+ Do not use in new code:
68
+ - `closeLabel`
69
+
70
+ ## Accessibility
71
+ Built in (SDAIA review item A4) — verified by `tests/a11y/keyboard/modal.spec.ts` in the design system's test suite:
72
+ - Renders a `role="dialog"` with `aria-modal="true"`, named by its `title`.
73
+ - Opening moves focus into the dialog.
74
+ - `Tab` / `Shift+Tab` are trapped inside the dialog while it is open.
75
+ - `Escape` calls `onClose` (`closeOnEscape`, default `true`) and focus returns to the element that opened it.
76
+
77
+ You must:
78
+ - Pass a `title` (it is the dialog's accessible name) and an `onClose` handler.
79
+
80
+ - Built-in strings (button names, announcements) come from `labels`; pass translated strings for Arabic or other languages.
81
+ - Don't remove the focus ring or replace interactive elements with `div`s; keep the control keyboard-operable.
82
+ - For contrast, keyboard patterns and RTL rules, call `get_foundations` (`accessibility`, `rtl`).
83
+
84
+ ## Design tokens used
85
+ Keep these consistent (resolve values with `get_tokens`):
86
+ - `var(--ds-brand-alpha-black-70)`
87
+ - `var(--ds-color-alpha-black-50)`
88
+ - `var(--ds-color-bg-default)`
89
+ - `var(--ds-color-border-default)`
90
+ - `var(--ds-motion-enter-duration)`
91
+ - `var(--ds-motion-enter-easing)`
92
+ - `var(--ds-radius-m)`
93
+ - `var(--ds-spacing-2xl)`
94
+ - `var(--ds-spacing-lg)`
95
+ - `var(--ds-spacing-xl)`
96
+
97
+ ## AI usage guidance
98
+ When generating UI:
99
+ - Install with `npx sdaia-ui@latest add modal` (after `npx sdaia-ui@latest init`), then import `{ Modal }` from `@/components/ui/Modal`.
100
+ - NEVER run `npm install sdaia-ui` and NEVER `import` from the `sdaia-ui` package — it is a source-copying CLI, not a component library.
101
+ - Use only the documented option values listed under "Options".
102
+ - Pass icons via `<DgaIcon data={…} className="size-icon-sm" />` from `@platformscode/icons` only — see `get_foundations` (`icon-usage`). Never emoji, Lucide, or random icons (e.g. `pizza01Stroke` for dark mode).
103
+ - 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,69 @@
1
+ # Pagination
2
+
3
+ ## Metadata
4
+ - Component: Pagination
5
+ - Slug: `pagination`
6
+ - Category: Actions
7
+ - Install: `npx sdaia-ui@latest add pagination`
8
+ - Import: `import { Pagination } from '@/components/ui/Pagination'`
9
+ - Installed files: `Pagination.tsx`, `Pagination.types.ts`, `Pagination.variants.ts`, `index.ts`
10
+ - Docs: https://ds.nacew.com/components/pagination
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 pagination`. It copies the source into your components folder (`components/ui/Pagination/`, under `src/` when the project has one); import it as `@/components/ui/Pagination`. 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
+ | `type?` | `'numeric' \| 'text' \| 'button'` | "numeric" | Figma variant: Numeric / Text / Button |
18
+ | `placement?` | `'start' \| 'center' \| 'end'` | "start" | Figma variant: Start / Center / End |
19
+ | `mobile?` | `boolean` | false | Figma variant: Mobile |
20
+ | `dir?` | `'ltr' \| 'rtl'` | — | Layout direction applied to the root. When omitted the component follows the nearest `dir` ancestor. |
21
+ | `fullWidth?` | `boolean` | false | Stretch the pagination to fill its parent container instead of clamping to the desktop/mobile max widths. Use for layouts (e.g. MediaGallery) where the prev / "Page X of Y" / next row must span the device width. |
22
+ | `page?` | `number` | 1 | Current page (1-indexed). Used to render the selected cell and selector. Clamped to `1…totalPages`. |
23
+ | `totalPages?` | `number` | — | Total pages. Used to render the page cells and the "Page X of Y" text. When omitted no page cells or summary are rendered. |
24
+ | `onPageChange?` | `(page: number) => void` | — | Called when a user clicks prev/next or a page cell. Without it the pagination is read-only (prev/next disabled, cells not interactive). |
25
+ | `labels?` | `Partial<PaginationLabels>` | — | Translatable built-in strings (visible and accessible). |
26
+ | `liveSummary?` | `boolean` | false | Announces the "Page X of Y" summary of the text type politely (`aria-live="polite"`) when the page changes — for pagination that swaps the content above it, such as a `Table`'s footer. |
27
+
28
+ Also accepts standard `<div>` HTML attributes (`className`, `style`, `onClick`, `aria-*`, …) — except: `children`.
29
+
30
+ ## Options (allowed values)
31
+ - `type`: `'numeric'` \| `'text'` \| `'button'` — Figma variant: Numeric / Text / Button
32
+ - `placement`: `'start'` \| `'center'` \| `'end'` — Figma variant: Start / Center / End
33
+ - `dir`: `'ltr'` \| `'rtl'` — Layout direction applied to the root. When omitted the component follows
34
+ the nearest `dir` ancestor.
35
+
36
+ ## Deprecated props
37
+ Do not use in new code:
38
+ - `rtl`
39
+
40
+ ## Accessibility
41
+ - Built-in strings (button names, announcements) come from `labels`; pass translated strings for Arabic or other languages.
42
+ - Don't remove the focus ring or replace interactive elements with `div`s; keep the control keyboard-operable.
43
+ - For contrast, keyboard patterns and RTL rules, call `get_foundations` (`accessibility`, `rtl`).
44
+
45
+ ## Design tokens used
46
+ Keep these consistent (resolve values with `get_tokens`):
47
+ - `var(--ds-color-bg-brand)`
48
+ - `var(--ds-color-bg-brand-muted)`
49
+ - `var(--ds-color-bg-default)`
50
+ - `var(--ds-color-border-brand)`
51
+ - `var(--ds-color-border-default)`
52
+ - `var(--ds-color-border-focus)`
53
+ - `var(--ds-color-form-field-text-pressed)`
54
+ - `var(--ds-color-text-on-color)`
55
+ - `var(--ds-radius-full)`
56
+ - `var(--ds-radius-none)`
57
+ - `var(--ds-radius-xs)`
58
+ - `var(--ds-spacing-lg)`
59
+ - `var(--ds-spacing-md)`
60
+ - `var(--ds-spacing-sm)`
61
+ - `var(--ds-spacing-xs)`
62
+ - `var(--ds-spacing-xxs)`
63
+
64
+ ## AI usage guidance
65
+ When generating UI:
66
+ - Install with `npx sdaia-ui@latest add pagination` (after `npx sdaia-ui@latest init`), then import `{ Pagination }` from `@/components/ui/Pagination`.
67
+ - NEVER run `npm install sdaia-ui` and NEVER `import` from the `sdaia-ui` package — it is a source-copying CLI, not a component library.
68
+ - Use only the documented option values listed under "Options".
69
+ - 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,88 @@
1
+ # Radio Button
2
+
3
+ ## Metadata
4
+ - Component: Radio Button
5
+ - Slug: `radio-button`
6
+ - Category: Actions
7
+ - Install: `npx sdaia-ui@latest add radio-button`
8
+ - Import: `import { RadioButton } from '@/components/ui/RadioButton'`
9
+ - Installed files: `RadioButton.tsx`, `RadioButton.types.ts`, `RadioButton.variants.ts`, `index.ts`
10
+ - Docs: https://ds.nacew.com/components/radiobutton
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 radio-button`. It copies the source into your components folder (`components/ui/RadioButton/`, under `src/` when the project has one); import it as `@/components/ui/RadioButton`. 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
+ | `label?` | `ReactNode` | — | Label displayed next to the radio button |
18
+ | `placement?` | `'start' \| 'end' \| 'top' \| 'bottom'` | 'start' | Where the radio sits relative to the label (Figma Placement). |
19
+ | `size?` | `'sm' \| 'md' \| 'lg'` | 'md' | Size of the radio button |
20
+ | `variant?` | `'primary' \| 'neutral'` | 'primary' | Visual style variant |
21
+ | `error?` | `string` | — | Error message displayed below the radio button. Sets `aria-invalid` and is linked via `aria-describedby`. |
22
+ | `helperText?` | `string` | — | Helper text displayed under the label (or below the control when there is no label) |
23
+ | `checked?` | `boolean` | — | Whether the radio is selected (controlled). Omit for an uncontrolled radio. |
24
+ | `defaultChecked?` | `boolean` | — | Initial selected state for uncontrolled usage. Ignored when `checked` is supplied. |
25
+ | `onCheckedChange?` | `(checked: boolean) => void` | — | Called with the new checked state when the user selects this radio. Like the native `change` event, it fires on selection only (a radio is not notified when a sibling in its group is picked). Native `onChange` keeps working. |
26
+ | `validationBehavior?` | `'native' \| 'aria'` | 'native' | How `required` is enforced. `'native'` sets the native `required` attribute (browser validation bubble on submit); `'aria'` renders `aria-required="true"` instead and leaves validation to you. |
27
+ | `dir?` | `'ltr' \| 'rtl'` | — | Text direction of the radio and its label. Omit to inherit from the closest `dir` ancestor. |
28
+
29
+ Also accepts standard `<input>` HTML attributes (`className`, `style`, `onClick`, `aria-*`, …) — except: `size`, `type`, `readOnly`.
30
+
31
+ ## Options (allowed values)
32
+ - `placement`: `'start'` \| `'end'` \| `'top'` \| `'bottom'` — Position of the radio relative to the label block (Figma Placement).
33
+ - `size`: `'sm'` \| `'md'` \| `'lg'` — Size of the radio button
34
+ - `variant`: `'primary'` \| `'neutral'` — Visual style variant
35
+ - `validationBehavior`: `'native'` \| `'aria'` — How `required` is enforced. `'native'` sets the native `required` attribute (browser validation
36
+ bubble on submit); `'aria'` renders `aria-required="true"` instead and leaves validation to you.
37
+ - `dir`: `'ltr'` \| `'rtl'` — Text direction of the radio and its label. Omit to inherit from the closest `dir` ancestor.
38
+
39
+ ## Deprecated props
40
+ Do not use in new code:
41
+ - `rtl`
42
+
43
+ ## Accessibility
44
+ Built in (SDAIA review item A1) — verified by `tests/a11y/keyboard/mouse-toggles.spec.ts` in the design system's test suite:
45
+ - A click on the circle selects it, also when there is no visible label.
46
+
47
+ You must:
48
+ - Group radios that answer one question (one `name`) and give the group a label.
49
+
50
+ - Don't remove the focus ring or replace interactive elements with `div`s; keep the control keyboard-operable.
51
+ - For contrast, keyboard patterns and RTL rules, call `get_foundations` (`accessibility`, `rtl`).
52
+
53
+ ## Design tokens used
54
+ Keep these consistent (resolve values with `get_tokens`):
55
+ - `var(--ds-color-bg-default)`
56
+ - `var(--ds-color-bg-emphasis-high)`
57
+ - `var(--ds-color-border-brand)`
58
+ - `var(--ds-color-border-disabled)`
59
+ - `var(--ds-color-control-border)`
60
+ - `var(--ds-color-control-neutral-checked)`
61
+ - `var(--ds-color-control-neutral-hovered)`
62
+ - `var(--ds-color-control-neutral-pressed)`
63
+ - `var(--ds-color-control-pressed)`
64
+ - `var(--ds-color-control-primary-checked)`
65
+ - `var(--ds-color-control-primary-hovered)`
66
+ - `var(--ds-color-control-primary-pressed)`
67
+ - `var(--ds-color-form-field-border-danger)`
68
+ - `var(--ds-color-icon-danger)`
69
+ - `var(--ds-color-text-danger)`
70
+ - `var(--ds-color-text-disabled)`
71
+ - `var(--ds-color-text-display)`
72
+ - `var(--ds-color-text-paragraph)`
73
+ - `var(--ds-icon-lg)`
74
+ - `var(--ds-icon-sm)`
75
+ - `var(--ds-icon-xl)`
76
+ - `var(--ds-motion-feedback-duration)`
77
+ - `var(--ds-motion-feedback-easing)`
78
+ - `var(--ds-radius-full)`
79
+ - `var(--ds-spacing-md)`
80
+ - `var(--ds-spacing-xl)`
81
+ - `var(--ds-spacing-xs)`
82
+
83
+ ## AI usage guidance
84
+ When generating UI:
85
+ - Install with `npx sdaia-ui@latest add radio-button` (after `npx sdaia-ui@latest init`), then import `{ RadioButton }` from `@/components/ui/RadioButton`.
86
+ - NEVER run `npm install sdaia-ui` and NEVER `import` from the `sdaia-ui` package — it is a source-copying CLI, not a component library.
87
+ - Use only the documented option values listed under "Options".
88
+ - 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,87 @@
1
+ # Switch
2
+
3
+ ## Metadata
4
+ - Component: Switch
5
+ - Slug: `switch`
6
+ - Category: Actions
7
+ - Install: `npx sdaia-ui@latest add switch`
8
+ - Import: `import { Switch } from '@/components/ui/Switch'`
9
+ - Installed files: `Switch.tsx`, `Switch.types.ts`, `Switch.variants.ts`, `index.ts`
10
+ - Docs: https://ds.nacew.com/components/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`. It copies the source into your components folder (`components/ui/Switch/`, under `src/` when the project has one); import it as `@/components/ui/Switch`. 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
+ | `checked?` | `boolean` | — | Whether the switch is on (controlled). Omit (together with `on`) for an uncontrolled switch. |
18
+ | `defaultChecked?` | `boolean` | — | Initial state for uncontrolled usage. Ignored when `checked` (or `on`) is supplied. |
19
+ | `onCheckedChange?` | `(checked: boolean) => void` | — | Called with the new on/off state when the user toggles the switch. Native `onChange` keeps working. |
20
+ | `size?` | `'md' \| 'lg'` | 'md' | Size of the switch |
21
+ | `label?` | `ReactNode` | — | Label displayed next to the switch |
22
+ | `placement?` | `'start' \| 'end' \| 'top' \| 'bottom'` | 'start' | Where the switch sits relative to the label (Figma Placement). |
23
+ | `error?` | `string` | — | Error message. Sets `aria-invalid` and is linked via `aria-describedby`. |
24
+ | `helperText?` | `string` | — | Helper text |
25
+ | `dir?` | `'ltr' \| 'rtl'` | — | Text direction of the switch and its label. Omit to inherit from the closest `dir` ancestor. |
26
+
27
+ Also accepts standard `<input>` HTML attributes (`className`, `style`, `onClick`, `aria-*`, …) — except: `size`, `type`.
28
+
29
+ ## Options (allowed values)
30
+ - `size`: `'md'` \| `'lg'` — Size of the switch
31
+ - `placement`: `'start'` \| `'end'` \| `'top'` \| `'bottom'` — Position of the switch relative to the label block (Figma Placement).
32
+ - `dir`: `'ltr'` \| `'rtl'` — Text direction of the switch and its label. Omit to inherit from the closest `dir` ancestor.
33
+
34
+ ## Deprecated props
35
+ Do not use in new code:
36
+ - `on` — Whether the switch is on (controlled).
37
+ - `rtl`
38
+
39
+ ## Accessibility
40
+ Built in (SDAIA review item A6) — verified by `tests/a11y/keyboard/switch.spec.ts, tests/a11y/keyboard/mouse-toggles.spec.ts` in the design system's test suite:
41
+ - Exposes `role="switch"`, named by its visible label; `Space` toggles it.
42
+ - Error text is linked with `aria-describedby` and sets `aria-invalid`.
43
+ - The off track keeps ≥ 3:1 contrast against the page in light and dark.
44
+ - A click on the track or the thumb toggles it, also without a visible label.
45
+
46
+ You must:
47
+ - Without a visible label, pass `aria-label`.
48
+
49
+ - Don't remove the focus ring or replace interactive elements with `div`s; keep the control keyboard-operable.
50
+ - For contrast, keyboard patterns and RTL rules, call `get_foundations` (`accessibility`, `rtl`).
51
+
52
+ ## Design tokens used
53
+ Keep these consistent (resolve values with `get_tokens`):
54
+ - `var(--ds-color-bg-default)`
55
+ - `var(--ds-color-bg-disabled)`
56
+ - `var(--ds-color-bg-emphasis-low)`
57
+ - `var(--ds-color-border-brand)`
58
+ - `var(--ds-color-button-bg-primary-default)`
59
+ - `var(--ds-color-button-bg-primary-focused)`
60
+ - `var(--ds-color-button-bg-primary-hovered)`
61
+ - `var(--ds-color-button-bg-primary-pressed)`
62
+ - `var(--ds-color-form-field-border-)`
63
+ - `var(--ds-color-form-field-border-default)`
64
+ - `var(--ds-color-form-field-border-hovered)`
65
+ - `var(--ds-color-form-field-border-pressed)`
66
+ - `var(--ds-color-form-switch-track-off-)`
67
+ - `var(--ds-color-icon-danger)`
68
+ - `var(--ds-color-text-danger)`
69
+ - `var(--ds-color-text-disabled)`
70
+ - `var(--ds-color-text-display)`
71
+ - `var(--ds-color-text-on-color)`
72
+ - `var(--ds-color-text-paragraph)`
73
+ - `var(--ds-motion-feedback-duration)`
74
+ - `var(--ds-motion-feedback-easing)`
75
+ - `var(--ds-radius-full)`
76
+ - `var(--ds-spacing-6xl)`
77
+ - `var(--ds-spacing-md)`
78
+ - `var(--ds-spacing-xl)`
79
+ - `var(--ds-spacing-xs)`
80
+ - `var(--ds-spacing-xxs)`
81
+
82
+ ## AI usage guidance
83
+ When generating UI:
84
+ - Install with `npx sdaia-ui@latest add switch` (after `npx sdaia-ui@latest init`), then import `{ Switch }` from `@/components/ui/Switch`.
85
+ - NEVER run `npm install sdaia-ui` and NEVER `import` from the `sdaia-ui` package — it is a source-copying CLI, not a component library.
86
+ - Use only the documented option values listed under "Options".
87
+ - 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,69 @@
1
+ # Tag
2
+
3
+ ## Metadata
4
+ - Component: Tag
5
+ - Slug: `tag`
6
+ - Category: Actions
7
+ - Install: `npx sdaia-ui@latest add tag`
8
+ - Import: `import { Tag } from '@/components/ui/Tag'`
9
+ - Installed files: `Tag.tsx`, `Tag.types.ts`, `Tag.variants.ts`, `index.ts`
10
+ - Docs: https://ds.nacew.com/components/tag
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 tag`. It copies the source into your components folder (`components/ui/Tag/`, under `src/` when the project has one); import it as `@/components/ui/Tag`. 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
+ | `label?` | `string` | — | Label text. Unset (and no `children`) renders no label. |
18
+ | `children?` | `ReactNode` | — | Label content used when `label` is unset. |
19
+ | `size?` | `'sm' \| 'md' \| 'lg'` | 'lg' | Size of the tag. |
20
+ | `leading?` | `'default' \| 'icon' \| 'country' \| 'avatar' \| 'dot'` | 'default' | Leading element type. |
21
+ | `action?` | `'text-only' \| 'icon' \| 'count'` | 'text-only' | Action element type. |
22
+ | `leadingIcon?` | `ReactNode` | — | Custom leading icon (overrides default) |
23
+ | `trailing?` | `boolean` | true | Whether to show the trailing element. |
24
+ | `count?` | `number` | — | Count value (when action="count"). Unset renders no count badge. |
25
+ | `avatarSrc?` | `string` | — | Avatar image src (when leading="avatar"). Unset → no avatar is drawn (there is no bundled fallback). |
26
+ | `flagSrc?` | `string` | — | Flag image src (when leading="country"). Unset → no flag is drawn (there is no bundled fallback). |
27
+ | `dotColor?` | `string` | 'var(--ds-color-bg-brand)' | Dot color (when leading="dot"). |
28
+ | `onClose?` | `() => void` | — | Called when the close icon is clicked |
29
+ | `disabled?` | `boolean` | false | Disabled state |
30
+ | `dir?` | `'ltr' \| 'rtl'` | — | Text direction. Unset inherits from the document. |
31
+ | `labels?` | `Partial<TagLabels>` | — | Localised built-in strings. |
32
+
33
+ Also accepts standard `<div>` HTML attributes (`className`, `style`, `onClick`, `aria-*`, …) — except: `dir`.
34
+
35
+ ## Options (allowed values)
36
+ - `size`: `'sm'` \| `'md'` \| `'lg'` — Size of the tag.
37
+ - `leading`: `'default'` \| `'icon'` \| `'country'` \| `'avatar'` \| `'dot'` — Leading element type.
38
+ - `action`: `'text-only'` \| `'icon'` \| `'count'` — Action element type.
39
+ - `dir`: `'ltr'` \| `'rtl'` — Text direction. Unset inherits from the document.
40
+
41
+ ## Accessibility
42
+ - Built-in strings (button names, announcements) come from `labels`; pass translated strings for Arabic or other languages.
43
+ - Don't remove the focus ring or replace interactive elements with `div`s; keep the control keyboard-operable.
44
+ - For contrast, keyboard patterns and RTL rules, call `get_foundations` (`accessibility`, `rtl`).
45
+
46
+ ## Design tokens used
47
+ Keep these consistent (resolve values with `get_tokens`):
48
+ - `var(--ds-color-bg-default)`
49
+ - `var(--ds-color-border-brand)`
50
+ - `var(--ds-color-border-default-strong)`
51
+ - `var(--ds-color-icon-default)`
52
+ - `var(--ds-color-text-default)`
53
+ - `var(--ds-radius-full)`
54
+ - `var(--ds-radius-m)`
55
+ - `var(--ds-radius-xs)`
56
+ - `var(--ds-radius-xxs)`
57
+ - `var(--ds-spacing-md)`
58
+ - `var(--ds-spacing-sm)`
59
+ - `var(--ds-spacing-xs)`
60
+ - `var(--ds-spacing-xxs)`
61
+
62
+ ## AI usage guidance
63
+ When generating UI:
64
+ - Install with `npx sdaia-ui@latest add tag` (after `npx sdaia-ui@latest init`), then import `{ Tag }` from `@/components/ui/Tag`.
65
+ - NEVER run `npm install sdaia-ui` and NEVER `import` from the `sdaia-ui` package — it is a source-copying CLI, not a component library.
66
+ - Use only the documented option values listed under "Options".
67
+ - Pass icons via `<DgaIcon data={…} className="size-icon-sm" />` from `@platformscode/icons` only — see `get_foundations` (`icon-usage`). Never emoji, Lucide, or random icons (e.g. `pizza01Stroke` for dark mode).
68
+ - Express the disabled state with the `disabled` prop, not custom styling.
69
+ - 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,65 @@
1
+ # Agent Activity
2
+
3
+ ## Metadata
4
+ - Component: Agent Activity
5
+ - Slug: `agent-activity`
6
+ - Category: AI
7
+ - Install: `npx sdaia-ui@latest add agent-activity`
8
+ - Import: `import { AgentActivity } from '@/components/ui/AgentActivity'`
9
+ - Installed files: `AgentActivity.tsx`, `AgentActivity.types.ts`, `AgentActivity.variants.ts`, `index.ts`
10
+ - Docs: https://ds.nacew.com/components/agent-activity
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 agent-activity`. It copies the source into your components folder (`components/ui/AgentActivity/`, under `src/` when the project has one); import it as `@/components/ui/AgentActivity`. 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
+ | `variant?` | `'brand' \| 'neutral' \| 'outline'` | 'brand' | Visual style of the activity card. - `brand` — raised surface (default) - `neutral` — subtle surface - `outline` — transparent surface |
18
+ | `dir?` | `'ltr' \| 'rtl'` | — | Layout direction. `rtl` mirrors the layout. Inherits from the document when unset. |
19
+ | `label?` | `ReactNode` | — | Header label (e.g. `Live Operation Log`). |
20
+ | `date?` | `ReactNode` | — | Header date / scope shown on the trailing side (e.g. `June 2026`). |
21
+ | `headerIcon?` | `string` | timeHalfPassStroke | Header icon — a `@platformscode/icons` data URL. |
22
+ | `showHeader?` | `boolean` | true | Show the header row (label + date). |
23
+ | `action` | `ReactNode` | — | The activity description — the core log line. |
24
+ | `animated?` | `boolean` | true | Fade the action line in — and replay the fade whenever a string `action` changes (live log cycling). Collapses under `prefers-reduced-motion`. |
25
+ | `live?` | `boolean` | true | Announce a changed `action` to screen readers — the action line is a polite live region (`aria-live="polite"`). The timestamp is outside the region, so a ticking clock is never announced. Set to `false` for static/historic entries (e.g. a run-history list). |
26
+ | `actionIcon?` | `string` | wrench02Stroke | Leading action icon — a `@platformscode/icons` data URL. |
27
+ | `showActionIcon?` | `boolean` | true | Show the leading action icon. |
28
+ | `timestamp?` | `ReactNode` | — | Trailing timestamp (e.g. `14:20:34.120`). |
29
+ | `showTimestamp?` | `boolean` | true | Show the trailing timestamp. |
30
+ | `as?` | `ElementType` | 'div' | Override the rendered root element. |
31
+
32
+ Also accepts standard `<div>` HTML attributes (`className`, `style`, `onClick`, `aria-*`, …) — except: `children`.
33
+
34
+ ## Options (allowed values)
35
+ - `variant`: `'brand'` \| `'neutral'` \| `'outline'` — Visual style of the card — mirrors the Figma `Style` property.
36
+ - `dir`: `'ltr'` \| `'rtl'` — Layout direction. `rtl` mirrors the layout. Inherits from the document when unset.
37
+
38
+ ## Accessibility
39
+ - Don't remove the focus ring or replace interactive elements with `div`s; keep the control keyboard-operable.
40
+ - For contrast, keyboard patterns and RTL rules, call `get_foundations` (`accessibility`, `rtl`).
41
+
42
+ ## Design tokens used
43
+ Keep these consistent (resolve values with `get_tokens`):
44
+ - `var(--ds-color-bg-raised)`
45
+ - `var(--ds-color-bg-subtle)`
46
+ - `var(--ds-color-border-default)`
47
+ - `var(--ds-color-border-subtle)`
48
+ - `var(--ds-color-icon-brand)`
49
+ - `var(--ds-color-icon-neutral)`
50
+ - `var(--ds-color-text-default)`
51
+ - `var(--ds-color-text-paragraph-muted)`
52
+ - `var(--ds-radius-l)`
53
+ - `var(--ds-spacing-lg)`
54
+ - `var(--ds-spacing-md)`
55
+ - `var(--ds-spacing-sm)`
56
+ - `var(--ds-spacing-xs)`
57
+ - `var(--ds-text-leading-line-heights-text-2xs)`
58
+
59
+ ## AI usage guidance
60
+ When generating UI:
61
+ - Install with `npx sdaia-ui@latest add agent-activity` (after `npx sdaia-ui@latest init`), then import `{ AgentActivity }` from `@/components/ui/AgentActivity`.
62
+ - NEVER run `npm install sdaia-ui` and NEVER `import` from the `sdaia-ui` package — it is a source-copying CLI, not a component library.
63
+ - Use only the documented option values listed under "Options".
64
+ - Pass icons via `<DgaIcon data={…} className="size-icon-sm" />` from `@platformscode/icons` only — see `get_foundations` (`icon-usage`). Never emoji, Lucide, or random icons (e.g. `pizza01Stroke` for dark mode).
65
+ - 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,65 @@
1
+ # Agent Card
2
+
3
+ ## Metadata
4
+ - Component: Agent Card
5
+ - Slug: `agent-card`
6
+ - Category: AI
7
+ - Install: `npx sdaia-ui@latest add agent-card`
8
+ - Import: `import { AgentCard } from '@/components/ui/AgentCard'`
9
+ - Installed files: `AgentCard.tsx`, `AgentCard.types.ts`, `AgentCard.variants.ts`, `index.ts`
10
+ - Docs: https://ds.nacew.com/components/agent-card
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 agent-card`. It copies the source into your components folder (`components/ui/AgentCard/`, under `src/` when the project has one); import it as `@/components/ui/AgentCard`. 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
+ | `variant?` | `'brand' \| 'neutral' \| 'outline'` | 'brand' | Visual style of the agent card. - `brand` — raised surface + brand-tinted avatar tile (default) - `neutral` — subtle surface + muted avatar tile - `outline` — transparent surface + outlined avatar tile |
18
+ | `dir?` | `'ltr' \| 'rtl'` | — | Layout direction. `rtl` mirrors the layout. Inherits from the document when unset. |
19
+ | `icon?` | `string` | roboticStroke | Avatar icon — a `@platformscode/icons` data URL. |
20
+ | `name` | `ReactNode` | — | Agent name. |
21
+ | `role?` | `ReactNode` | — | Agent role / description. |
22
+ | `showRole?` | `boolean` | true | Show the role line. |
23
+ | `showStatus?` | `boolean` | true | Show the status — renders both the avatar presence dot and the status badge. |
24
+ | `status?` | `ReactNode` | labels.status ('Active') | Status badge label. Wins over `labels.status`; pass `null` to hide the badge while keeping the presence dot. |
25
+ | `statusColor?` | `BadgeColor` | 'primary' | Status badge colour. |
26
+ | `statusDot?` | `StatusDotStatus` | 'online' | Presence-dot status colour. |
27
+ | `labels?` | `Partial<AgentCardLabels>` | — | Translatable built-in strings (see ). |
28
+ | `as?` | `ElementType` | 'div' | Override the rendered root element. |
29
+
30
+ Also accepts standard `<div>` HTML attributes (`className`, `style`, `onClick`, `aria-*`, …) — except: `children`, `title`, `role`.
31
+
32
+ ## Options (allowed values)
33
+ - `variant`: `'brand'` \| `'neutral'` \| `'outline'` — Visual style of the card — mirrors the Figma `Style` property.
34
+ - `dir`: `'ltr'` \| `'rtl'` — Layout direction. `rtl` mirrors the layout. Inherits from the document when unset.
35
+
36
+ ## Accessibility
37
+ - Built-in strings (button names, announcements) come from `labels`; pass translated strings for Arabic or other languages.
38
+ - Don't remove the focus ring or replace interactive elements with `div`s; keep the control keyboard-operable.
39
+ - For contrast, keyboard patterns and RTL rules, call `get_foundations` (`accessibility`, `rtl`).
40
+
41
+ ## Design tokens used
42
+ Keep these consistent (resolve values with `get_tokens`):
43
+ - `var(--ds-color-bg-brand-subtle)`
44
+ - `var(--ds-color-bg-muted)`
45
+ - `var(--ds-color-bg-raised)`
46
+ - `var(--ds-color-bg-subtle)`
47
+ - `var(--ds-color-border-default)`
48
+ - `var(--ds-color-border-subtle)`
49
+ - `var(--ds-color-icon-brand)`
50
+ - `var(--ds-color-icon-default)`
51
+ - `var(--ds-color-icon-neutral)`
52
+ - `var(--ds-color-text-default)`
53
+ - `var(--ds-color-text-paragraph-muted)`
54
+ - `var(--ds-radius-l)`
55
+ - `var(--ds-spacing-lg)`
56
+ - `var(--ds-spacing-sm)`
57
+ - `var(--ds-spacing-xxs)`
58
+
59
+ ## AI usage guidance
60
+ When generating UI:
61
+ - Install with `npx sdaia-ui@latest add agent-card` (after `npx sdaia-ui@latest init`), then import `{ AgentCard }` from `@/components/ui/AgentCard`.
62
+ - NEVER run `npm install sdaia-ui` and NEVER `import` from the `sdaia-ui` package — it is a source-copying CLI, not a component library.
63
+ - Use only the documented option values listed under "Options".
64
+ - Pass icons via `<DgaIcon data={…} className="size-icon-sm" />` from `@platformscode/icons` only — see `get_foundations` (`icon-usage`). Never emoji, Lucide, or random icons (e.g. `pizza01Stroke` for dark mode).
65
+ - Pick one theme per screen: dark is `.theme-dark` (or `.dark`) on `<html>`; style surrounding layout with DS tokens (`get_tokens`), never hardcoded colors.