@orion-ds/react 1.2.7 → 2.0.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.
- package/AI_COMPONENTS.md +37 -26
- package/AI_GUIDE.md +547 -0
- package/AI_QUICKREF.md +14 -2
- package/dist/components/Accordion/index.d.ts +16 -1
- package/dist/components/Accordion/index.d.ts.map +1 -1
- package/dist/components/Alert/index.d.ts +11 -1
- package/dist/components/Alert/index.d.ts.map +1 -1
- package/dist/components/Avatar/index.d.ts +10 -1
- package/dist/components/Avatar/index.d.ts.map +1 -1
- package/dist/components/Badge/index.d.ts +11 -1
- package/dist/components/Badge/index.d.ts.map +1 -1
- package/dist/components/Breadcrumb/index.d.ts +15 -1
- package/dist/components/Breadcrumb/index.d.ts.map +1 -1
- package/dist/components/Button/index.d.ts +11 -1
- package/dist/components/Button/index.d.ts.map +1 -1
- package/dist/components/Card/index.d.ts +14 -1
- package/dist/components/Card/index.d.ts.map +1 -1
- package/dist/components/Carousel/index.d.ts +16 -1
- package/dist/components/Carousel/index.d.ts.map +1 -1
- package/dist/components/Checkbox/index.d.ts +10 -1
- package/dist/components/Checkbox/index.d.ts.map +1 -1
- package/dist/components/Chip/index.d.ts +11 -1
- package/dist/components/Chip/index.d.ts.map +1 -1
- package/dist/components/Combobox/index.d.ts +17 -1
- package/dist/components/Combobox/index.d.ts.map +1 -1
- package/dist/components/Divider/index.d.ts +11 -1
- package/dist/components/Divider/index.d.ts.map +1 -1
- package/dist/components/Drawer/index.d.ts +16 -1
- package/dist/components/Drawer/index.d.ts.map +1 -1
- package/dist/components/Dropdown/index.d.ts +17 -1
- package/dist/components/Dropdown/index.d.ts.map +1 -1
- package/dist/components/EmptyState/index.d.ts +14 -1
- package/dist/components/EmptyState/index.d.ts.map +1 -1
- package/dist/components/Field/index.d.ts +11 -1
- package/dist/components/Field/index.d.ts.map +1 -1
- package/dist/components/FontLoader/index.d.ts +15 -2
- package/dist/components/FontLoader/index.d.ts.map +1 -1
- package/dist/components/Icon/index.d.ts +16 -1
- package/dist/components/Icon/index.d.ts.map +1 -1
- package/dist/components/IconGallery/index.d.ts +14 -1
- package/dist/components/IconGallery/index.d.ts.map +1 -1
- package/dist/components/Link/index.d.ts +11 -1
- package/dist/components/Link/index.d.ts.map +1 -1
- package/dist/components/List/index.d.ts +15 -1
- package/dist/components/List/index.d.ts.map +1 -1
- package/dist/components/Modal/index.d.ts +15 -1
- package/dist/components/Modal/index.d.ts.map +1 -1
- package/dist/components/Navbar/index.d.ts +20 -1
- package/dist/components/Navbar/index.d.ts.map +1 -1
- package/dist/components/Pagination/index.d.ts +13 -1
- package/dist/components/Pagination/index.d.ts.map +1 -1
- package/dist/components/Popover/index.d.ts +17 -1
- package/dist/components/Popover/index.d.ts.map +1 -1
- package/dist/components/ProgressBar/index.d.ts +10 -1
- package/dist/components/ProgressBar/index.d.ts.map +1 -1
- package/dist/components/Radio/index.d.ts +10 -1
- package/dist/components/Radio/index.d.ts.map +1 -1
- package/dist/components/SearchInput/index.d.ts +10 -1
- package/dist/components/SearchInput/index.d.ts.map +1 -1
- package/dist/components/Select/index.d.ts +17 -1
- package/dist/components/Select/index.d.ts.map +1 -1
- package/dist/components/Skeleton/index.d.ts +10 -1
- package/dist/components/Skeleton/index.d.ts.map +1 -1
- package/dist/components/Slider/index.d.ts +10 -1
- package/dist/components/Slider/index.d.ts.map +1 -1
- package/dist/components/Spinner/index.d.ts +10 -1
- package/dist/components/Spinner/index.d.ts.map +1 -1
- package/dist/components/Stepper/index.d.ts +15 -1
- package/dist/components/Stepper/index.d.ts.map +1 -1
- package/dist/components/Switch/index.d.ts +10 -1
- package/dist/components/Switch/index.d.ts.map +1 -1
- package/dist/components/Table/index.d.ts +18 -1
- package/dist/components/Table/index.d.ts.map +1 -1
- package/dist/components/Tabs/index.d.ts +15 -1
- package/dist/components/Tabs/index.d.ts.map +1 -1
- package/dist/components/Textarea/index.d.ts +10 -1
- package/dist/components/Textarea/index.d.ts.map +1 -1
- package/dist/components/ThemeController/index.d.ts +15 -1
- package/dist/components/ThemeController/index.d.ts.map +1 -1
- package/dist/components/Toast/index.d.ts +22 -1
- package/dist/components/Toast/index.d.ts.map +1 -1
- package/dist/components/Tooltip/index.d.ts +14 -1
- package/dist/components/Tooltip/index.d.ts.map +1 -1
- package/dist/contexts/ThemeContext.d.ts +12 -1
- package/dist/contexts/ThemeContext.d.ts.map +1 -1
- package/dist/index.cjs +14 -14
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +1519 -1494
- package/dist/index.mjs.map +1 -1
- package/dist/sections/CTA/CTA.d.ts +1 -1
- package/dist/sections/CTA/CTA.d.ts.map +1 -1
- package/dist/sections/CTA/CTA.types.d.ts +8 -4
- package/dist/sections/CTA/CTA.types.d.ts.map +1 -1
- package/dist/sections/DetailPanel/DetailPanel.d.ts +1 -0
- package/dist/sections/DetailPanel/DetailPanel.d.ts.map +1 -1
- package/dist/sections/DetailPanel/DetailPanel.types.d.ts +7 -2
- package/dist/sections/DetailPanel/DetailPanel.types.d.ts.map +1 -1
- package/dist/sections/Hero/Hero.d.ts +3 -3
- package/dist/sections/Hero/Hero.d.ts.map +1 -1
- package/dist/sections/Hero/Hero.types.d.ts +9 -5
- package/dist/sections/Hero/Hero.types.d.ts.map +1 -1
- package/dist/templates/marketing/LandingPageTemplate/LandingPageTemplate.d.ts +1 -1
- package/package.json +11 -3
package/AI_COMPONENTS.md
CHANGED
|
@@ -9,23 +9,25 @@ This document is the authoritative reference for AI agents building UIs with @or
|
|
|
9
9
|
## Quick Start (Required Setup)
|
|
10
10
|
|
|
11
11
|
```tsx
|
|
12
|
-
// 1. REQUIRED: Import
|
|
13
|
-
import '@orion/
|
|
14
|
-
|
|
12
|
+
// 1. REQUIRED: Import styles
|
|
13
|
+
import '@orion-ds/react/styles.css'; // Single import (recommended)
|
|
14
|
+
// OR separate imports:
|
|
15
|
+
// import '@orion-ds/core/theme.css';
|
|
16
|
+
// import '@orion-ds/react/dist/react.css';
|
|
15
17
|
|
|
16
18
|
// 2. REQUIRED: Wrap app with ThemeProvider
|
|
17
|
-
import { ThemeProvider } from '@orion/react';
|
|
19
|
+
import { ThemeProvider } from '@orion-ds/react';
|
|
18
20
|
|
|
19
21
|
function App() {
|
|
20
22
|
return (
|
|
21
|
-
<ThemeProvider>
|
|
23
|
+
<ThemeProvider defaultBrand="orion" defaultTheme="light">
|
|
22
24
|
<YourComponents />
|
|
23
25
|
</ThemeProvider>
|
|
24
26
|
);
|
|
25
27
|
}
|
|
26
28
|
```
|
|
27
29
|
|
|
28
|
-
**Missing CSS = Unstyled Components.**
|
|
30
|
+
**Missing CSS = Unstyled Components.** Import styles.css is mandatory.
|
|
29
31
|
|
|
30
32
|
---
|
|
31
33
|
|
|
@@ -147,9 +149,9 @@ Use these for landing pages, marketing sites, and product pages. **DO NOT create
|
|
|
147
149
|
|
|
148
150
|
| Section | Use When | Required Props |
|
|
149
151
|
|---------|----------|----------------|
|
|
150
|
-
| `Hero` | Landing page header | `
|
|
152
|
+
| `Hero` | Landing page header | `title` |
|
|
151
153
|
| `Features` | Feature showcase | `items` |
|
|
152
|
-
| `CTA` | Call-to-action block | `
|
|
154
|
+
| `CTA` | Call-to-action block | `title` |
|
|
153
155
|
| `Footer` | Page footer | `brand`, `linkGroups` |
|
|
154
156
|
|
|
155
157
|
### Engagement Sections
|
|
@@ -207,12 +209,11 @@ import {
|
|
|
207
209
|
FAQ,
|
|
208
210
|
CTA,
|
|
209
211
|
Footer,
|
|
210
|
-
} from '@orion/react';
|
|
212
|
+
} from '@orion-ds/react';
|
|
211
213
|
import { Zap, Shield, Rocket, Star } from 'lucide-react';
|
|
212
214
|
|
|
213
215
|
// REQUIRED CSS
|
|
214
|
-
import '@orion/
|
|
215
|
-
import '@orion/react/dist/react.css';
|
|
216
|
+
import '@orion-ds/react/styles.css';
|
|
216
217
|
|
|
217
218
|
function LandingPage() {
|
|
218
219
|
return (
|
|
@@ -236,7 +237,7 @@ function LandingPage() {
|
|
|
236
237
|
{/* Hero Section */}
|
|
237
238
|
<Hero
|
|
238
239
|
badge={<Badge variant="brand">New Release</Badge>}
|
|
239
|
-
|
|
240
|
+
title="Build Products Faster Than Ever"
|
|
240
241
|
description="The AI-first design system that eliminates guesswork and accelerates development."
|
|
241
242
|
primaryAction={<Button size="lg">Start Free Trial</Button>}
|
|
242
243
|
secondaryAction={<Button variant="ghost" size="lg">Watch Demo</Button>}
|
|
@@ -365,7 +366,7 @@ function LandingPage() {
|
|
|
365
366
|
|
|
366
367
|
{/* CTA Section */}
|
|
367
368
|
<CTA
|
|
368
|
-
|
|
369
|
+
title="Ready to get started?"
|
|
369
370
|
description="Join thousands of teams building with Orion."
|
|
370
371
|
actions={
|
|
371
372
|
<>
|
|
@@ -507,13 +508,16 @@ import { Search, Settings, User, ChevronDown } from 'lucide-react';
|
|
|
507
508
|
Theme and brand are **always global**. Set them on ThemeProvider, not on individual components.
|
|
508
509
|
|
|
509
510
|
```tsx
|
|
510
|
-
// Set default brand and theme
|
|
511
|
-
<ThemeProvider
|
|
511
|
+
// Set default brand and theme (new flat props - preferred)
|
|
512
|
+
<ThemeProvider defaultBrand="red" defaultTheme="dark">
|
|
512
513
|
<App />
|
|
513
514
|
</ThemeProvider>
|
|
514
515
|
|
|
516
|
+
// Legacy API (still works)
|
|
517
|
+
// <ThemeProvider options={{ defaultBrand: 'red', defaultTheme: 'dark' }}>
|
|
518
|
+
|
|
515
519
|
// Access/change theme in any component
|
|
516
|
-
import { useThemeContext } from '@orion/react';
|
|
520
|
+
import { useThemeContext } from '@orion-ds/react';
|
|
517
521
|
|
|
518
522
|
function ThemeSwitcher() {
|
|
519
523
|
const { theme, brand, setTheme, setBrand } = useThemeContext();
|
|
@@ -564,10 +568,9 @@ Or via ThemeProvider:
|
|
|
564
568
|
|
|
565
569
|
**Problem:** Components render but look unstyled.
|
|
566
570
|
|
|
567
|
-
**Fix:**
|
|
571
|
+
**Fix:** Import the styles CSS:
|
|
568
572
|
```tsx
|
|
569
|
-
import '@orion/
|
|
570
|
-
import '@orion/react/dist/react.css';
|
|
573
|
+
import '@orion-ds/react/styles.css';
|
|
571
574
|
```
|
|
572
575
|
|
|
573
576
|
### Brand Prop on Components
|
|
@@ -576,7 +579,7 @@ import '@orion/react/dist/react.css';
|
|
|
576
579
|
|
|
577
580
|
**Fix:** Brand is global. Use ThemeProvider:
|
|
578
581
|
```tsx
|
|
579
|
-
<ThemeProvider
|
|
582
|
+
<ThemeProvider defaultBrand="red">
|
|
580
583
|
```
|
|
581
584
|
|
|
582
585
|
### Custom Section Components
|
|
@@ -609,13 +612,12 @@ import '@orion/react/dist/react.css';
|
|
|
609
612
|
|
|
610
613
|
```
|
|
611
614
|
IMPORTS (Required):
|
|
612
|
-
import '@orion/
|
|
613
|
-
import '@orion/react
|
|
614
|
-
import { ThemeProvider, Button, ... } from '@orion/react';
|
|
615
|
+
import '@orion-ds/react/styles.css';
|
|
616
|
+
import { ThemeProvider, Button, ... } from '@orion-ds/react';
|
|
615
617
|
|
|
616
618
|
LANDING PAGE SECTIONS (In Order):
|
|
617
619
|
<Navbar> - Navigation header
|
|
618
|
-
<Hero> - Main
|
|
620
|
+
<Hero> - Main title + CTA
|
|
619
621
|
<LogoCloud> - Trust logos (optional)
|
|
620
622
|
<Features> - Feature showcase
|
|
621
623
|
<Stats> - Key metrics (optional)
|
|
@@ -625,6 +627,10 @@ LANDING PAGE SECTIONS (In Order):
|
|
|
625
627
|
<CTA> - Final call-to-action
|
|
626
628
|
<Footer> - Links + copyright
|
|
627
629
|
|
|
630
|
+
TEMPLATES (Full Pages):
|
|
631
|
+
Marketing: LandingPageTemplate, PricingPageTemplate, AboutPageTemplate, ContactPageTemplate
|
|
632
|
+
App: DashboardTemplate, SettingsTemplate, ProfilePageTemplate, KanbanPageTemplate, LoginTemplate
|
|
633
|
+
|
|
628
634
|
BUTTON VARIANTS:
|
|
629
635
|
primary - Main CTA (Submit, Save)
|
|
630
636
|
secondary - Supporting action (Cancel)
|
|
@@ -643,9 +649,14 @@ ALERT VARIANTS:
|
|
|
643
649
|
|
|
644
650
|
THEME CONTROL:
|
|
645
651
|
const { theme, brand, setTheme, setBrand } = useThemeContext();
|
|
652
|
+
|
|
653
|
+
DEPRECATED PROPS (v2.0):
|
|
654
|
+
Hero/CTA: headline → title
|
|
655
|
+
DetailPanel: subtitle → description
|
|
656
|
+
ThemeProvider: options → flat props (defaultTheme, defaultBrand)
|
|
646
657
|
```
|
|
647
658
|
|
|
648
659
|
---
|
|
649
660
|
|
|
650
|
-
**Last Updated:**
|
|
651
|
-
**Version:**
|
|
661
|
+
**Last Updated:** 2026-02
|
|
662
|
+
**Version:** 2.0.0
|
package/AI_GUIDE.md
ADDED
|
@@ -0,0 +1,547 @@
|
|
|
1
|
+
# @orion-ds/react AI Integration Guide
|
|
2
|
+
|
|
3
|
+
> The definitive reference for AI/LLM agents building UIs with Orion Design System.
|
|
4
|
+
|
|
5
|
+
**Version:** 2.0.0
|
|
6
|
+
**Last Updated:** 2026-02
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## Quick Decision Tree
|
|
11
|
+
|
|
12
|
+
```
|
|
13
|
+
Need a UI element?
|
|
14
|
+
│
|
|
15
|
+
├─ Full page layout?
|
|
16
|
+
│ └─ Use a TEMPLATE (see Templates section)
|
|
17
|
+
│ ├─ Marketing page → LandingPageTemplate, PricingPageTemplate, etc.
|
|
18
|
+
│ └─ App page → DashboardTemplate, SettingsTemplate, LoginTemplate, etc.
|
|
19
|
+
│
|
|
20
|
+
├─ Page section?
|
|
21
|
+
│ └─ Use a SECTION (see Sections section)
|
|
22
|
+
│ ├─ Marketing → Hero, Features, Pricing, CTA, Footer, etc.
|
|
23
|
+
│ └─ App/SaaS → Sidebar, DataTable, MetricCards, etc.
|
|
24
|
+
│
|
|
25
|
+
└─ Single UI element?
|
|
26
|
+
└─ Use a COMPONENT
|
|
27
|
+
├─ Action → Button, Link
|
|
28
|
+
├─ Form → Field, Select, Checkbox, Radio, Switch, Textarea
|
|
29
|
+
├─ Feedback → Alert, Badge, Spinner, Toast, Tooltip
|
|
30
|
+
├─ Layout → Card, Modal, Drawer, Accordion
|
|
31
|
+
├─ Navigation → Navbar, Tabs, Breadcrumb, Pagination
|
|
32
|
+
└─ Data → Table, Avatar, List, Chip
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## Setup (Required)
|
|
38
|
+
|
|
39
|
+
```tsx
|
|
40
|
+
// 1. Import styles (choose ONE method)
|
|
41
|
+
import '@orion-ds/react/styles.css'; // Recommended: single import
|
|
42
|
+
// OR
|
|
43
|
+
// import '@orion-ds/core/theme.css';
|
|
44
|
+
// import '@orion-ds/react/dist/react.css';
|
|
45
|
+
|
|
46
|
+
// 2. Wrap app with ThemeProvider
|
|
47
|
+
import { ThemeProvider } from '@orion-ds/react';
|
|
48
|
+
|
|
49
|
+
function App() {
|
|
50
|
+
return (
|
|
51
|
+
<ThemeProvider defaultBrand="orion" defaultTheme="light">
|
|
52
|
+
<YourApp />
|
|
53
|
+
</ThemeProvider>
|
|
54
|
+
);
|
|
55
|
+
}
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
## Complete Export Reference
|
|
61
|
+
|
|
62
|
+
### Components (40)
|
|
63
|
+
|
|
64
|
+
| Component | Import | Primary Props |
|
|
65
|
+
|-----------|--------|---------------|
|
|
66
|
+
| `Accordion` | `import { Accordion } from '@orion-ds/react'` | `items`, `variant` |
|
|
67
|
+
| `Alert` | `import { Alert } from '@orion-ds/react'` | `variant`, `title`, `onClose` |
|
|
68
|
+
| `Avatar` | `import { Avatar } from '@orion-ds/react'` | `src`, `name`, `size` |
|
|
69
|
+
| `Badge` | `import { Badge } from '@orion-ds/react'` | `variant`, `size` |
|
|
70
|
+
| `Breadcrumb` | `import { Breadcrumb } from '@orion-ds/react'` | `items`, `separator` |
|
|
71
|
+
| `Button` | `import { Button } from '@orion-ds/react'` | `variant`, `size`, `icon`, `iconOnly` |
|
|
72
|
+
| `Card` | `import { Card } from '@orion-ds/react'` | `variant` + `Card.Header`, `Card.Body`, `Card.Footer` |
|
|
73
|
+
| `Carousel` | `import { Carousel } from '@orion-ds/react'` | `items`, `autoPlay` |
|
|
74
|
+
| `Checkbox` | `import { Checkbox } from '@orion-ds/react'` | `label`, `checked`, `indeterminate` |
|
|
75
|
+
| `Chip` | `import { Chip } from '@orion-ds/react'` | `variant`, `onRemove` |
|
|
76
|
+
| `Combobox` | `import { Combobox } from '@orion-ds/react'` | `options`, `onSelect`, `placeholder` |
|
|
77
|
+
| `Divider` | `import { Divider } from '@orion-ds/react'` | `orientation`, `variant` |
|
|
78
|
+
| `Drawer` | `import { Drawer } from '@orion-ds/react'` | `isOpen`, `onClose`, `placement`, `size` |
|
|
79
|
+
| `Dropdown` | `import { Dropdown } from '@orion-ds/react'` | `items`, `trigger` |
|
|
80
|
+
| `EmptyState` | `import { EmptyState } from '@orion-ds/react'` | `title`, `description`, `action` |
|
|
81
|
+
| `Field` | `import { Field } from '@orion-ds/react'` | `label`, `type`, `error`, `icon` |
|
|
82
|
+
| `FontLoader` | `import { FontLoader } from '@orion-ds/react'` | (auto-loaded by ThemeProvider) |
|
|
83
|
+
| `Icon` | `import { Icon } from '@orion-ds/react'` | `name`, `size`, `color` |
|
|
84
|
+
| `Link` | `import { Link } from '@orion-ds/react'` | `href`, `variant` |
|
|
85
|
+
| `List` | `import { List } from '@orion-ds/react'` | `items`, `variant` |
|
|
86
|
+
| `Modal` | `import { Modal } from '@orion-ds/react'` | `isOpen`, `onClose`, `size` |
|
|
87
|
+
| `Navbar` | `import { Navbar } from '@orion-ds/react'` | `variant`, `sticky` |
|
|
88
|
+
| `Pagination` | `import { Pagination } from '@orion-ds/react'` | `total`, `current`, `onPageChange` |
|
|
89
|
+
| `Popover` | `import { Popover } from '@orion-ds/react'` | `trigger`, `content`, `placement` |
|
|
90
|
+
| `ProgressBar` | `import { ProgressBar } from '@orion-ds/react'` | `value`, `max`, `variant` |
|
|
91
|
+
| `Radio` | `import { Radio } from '@orion-ds/react'` | `label`, `name`, `value` |
|
|
92
|
+
| `SearchInput` | `import { SearchInput } from '@orion-ds/react'` | `placeholder`, `onSearch` |
|
|
93
|
+
| `Select` | `import { Select } from '@orion-ds/react'` | `options`, `label`, `placeholder` |
|
|
94
|
+
| `Skeleton` | `import { Skeleton } from '@orion-ds/react'` | `variant`, `width`, `height` |
|
|
95
|
+
| `Slider` | `import { Slider } from '@orion-ds/react'` | `min`, `max`, `value`, `onChange` |
|
|
96
|
+
| `Spinner` | `import { Spinner } from '@orion-ds/react'` | `size`, `variant` |
|
|
97
|
+
| `Stepper` | `import { Stepper } from '@orion-ds/react'` | `steps`, `current` |
|
|
98
|
+
| `Switch` | `import { Switch } from '@orion-ds/react'` | `label`, `checked`, `onChange` |
|
|
99
|
+
| `Table` | `import { Table } from '@orion-ds/react'` | `columns`, `data`, `sortable` |
|
|
100
|
+
| `Tabs` | `import { Tabs } from '@orion-ds/react'` | `items`, `activeTab` |
|
|
101
|
+
| `Textarea` | `import { Textarea } from '@orion-ds/react'` | `label`, `rows`, `resize` |
|
|
102
|
+
| `ThemeController` | `import { ThemeController } from '@orion-ds/react'` | (theme/brand switcher UI) |
|
|
103
|
+
| `Toast` | `import { ToastProvider, useToast } from '@orion-ds/react'` | `variant`, `position` |
|
|
104
|
+
| `Tooltip` | `import { Tooltip } from '@orion-ds/react'` | `content`, `placement` |
|
|
105
|
+
|
|
106
|
+
### Sections (30+)
|
|
107
|
+
|
|
108
|
+
**Marketing Sections:**
|
|
109
|
+
| Section | Primary Props | Use For |
|
|
110
|
+
|---------|---------------|---------|
|
|
111
|
+
| `Hero` | `title`, `description`, `primaryAction` | Landing page headers |
|
|
112
|
+
| `Features` | `items`, `columns` | Feature showcases |
|
|
113
|
+
| `Pricing` | `plans` | Pricing tables |
|
|
114
|
+
| `CTA` | `title`, `description`, `actions` | Call-to-action blocks |
|
|
115
|
+
| `Footer` | `brand`, `linkGroups`, `socialLinks` | Page footers |
|
|
116
|
+
| `Testimonials` | `testimonials` | Customer quotes |
|
|
117
|
+
| `Stats` | `stats` | Key metrics display |
|
|
118
|
+
| `FAQ` | `items` | Q&A sections |
|
|
119
|
+
| `Team` | `members` | Team member grids |
|
|
120
|
+
| `Contact` | `onSubmit` | Contact forms |
|
|
121
|
+
| `Newsletter` | `onSubmit` | Email signup |
|
|
122
|
+
| `LogoCloud` | `logos` | Partner/client logos |
|
|
123
|
+
| `Blog` | `articles` | Article previews |
|
|
124
|
+
| `Gallery` | `images` | Image galleries |
|
|
125
|
+
| `Timeline` | `events` | Chronological events |
|
|
126
|
+
| `Comparison` | `features`, `columns` | Feature comparisons |
|
|
127
|
+
| `Banner` | `children` | Announcements |
|
|
128
|
+
| `SocialProof` | `logos`, `testimonials`, `stats` | Trust indicators |
|
|
129
|
+
| `AppDownload` | `badges` | App store links |
|
|
130
|
+
|
|
131
|
+
**App/SaaS Sections:**
|
|
132
|
+
| Section | Primary Props | Use For |
|
|
133
|
+
|---------|---------------|---------|
|
|
134
|
+
| `Sidebar` | `items`, `sections` | App navigation |
|
|
135
|
+
| `DataTable` | `columns`, `data`, `filters` | Data grids |
|
|
136
|
+
| `MetricCards` | `items` | Dashboard metrics |
|
|
137
|
+
| `PageHeader` | `title`, `breadcrumbs`, `actions` | Page headers |
|
|
138
|
+
| `FormSection` | `title`, `children` | Form layouts |
|
|
139
|
+
| `CommandBar` | `items`, `onSelect` | Command palettes |
|
|
140
|
+
| `ActivityFeed` | `items` | Activity logs |
|
|
141
|
+
| `DetailPanel` | `title`, `description`, `open`, `onClose` | Slide-over panels |
|
|
142
|
+
| `FilterBar` | `filters`, `activeFilters` | Filter UIs |
|
|
143
|
+
| `SettingsLayout` | `navItems`, `children` | Settings pages |
|
|
144
|
+
| `QuickActions` | `actions` | FAB menus |
|
|
145
|
+
| `KanbanBoard` | `columns`, `cards` | Kanban boards |
|
|
146
|
+
| `NotificationCenter` | `notifications` | Notification panels |
|
|
147
|
+
| `UserMenu` | `user`, `items` | User dropdowns |
|
|
148
|
+
| `FileUploader` | `onUpload`, `accept` | File uploads |
|
|
149
|
+
|
|
150
|
+
### Templates (9)
|
|
151
|
+
|
|
152
|
+
**Marketing Templates:**
|
|
153
|
+
```tsx
|
|
154
|
+
import {
|
|
155
|
+
LandingPageTemplate,
|
|
156
|
+
PricingPageTemplate,
|
|
157
|
+
AboutPageTemplate,
|
|
158
|
+
ContactPageTemplate,
|
|
159
|
+
} from '@orion-ds/react';
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
**App Templates:**
|
|
163
|
+
```tsx
|
|
164
|
+
import {
|
|
165
|
+
DashboardTemplate,
|
|
166
|
+
SettingsTemplate,
|
|
167
|
+
ProfilePageTemplate,
|
|
168
|
+
KanbanPageTemplate,
|
|
169
|
+
LoginTemplate,
|
|
170
|
+
} from '@orion-ds/react';
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
### Hooks
|
|
174
|
+
|
|
175
|
+
```tsx
|
|
176
|
+
import {
|
|
177
|
+
// Theme
|
|
178
|
+
useTheme,
|
|
179
|
+
useThemeContext,
|
|
180
|
+
|
|
181
|
+
// Media queries
|
|
182
|
+
useMediaQuery,
|
|
183
|
+
useIsMobile,
|
|
184
|
+
useIsTablet,
|
|
185
|
+
useIsDesktop,
|
|
186
|
+
usePrefersDarkMode,
|
|
187
|
+
usePrefersReducedMotion,
|
|
188
|
+
|
|
189
|
+
// UI utilities
|
|
190
|
+
useDisclosure,
|
|
191
|
+
useClickOutside,
|
|
192
|
+
useDebounce,
|
|
193
|
+
useDebouncedCallback,
|
|
194
|
+
useLocalStorage,
|
|
195
|
+
useSessionStorage,
|
|
196
|
+
useCopyToClipboard,
|
|
197
|
+
useKeyboard,
|
|
198
|
+
useKeyboardShortcuts,
|
|
199
|
+
} from '@orion-ds/react';
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
### Context Providers
|
|
203
|
+
|
|
204
|
+
```tsx
|
|
205
|
+
import { ThemeProvider, ToastProvider } from '@orion-ds/react';
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
---
|
|
209
|
+
|
|
210
|
+
## Common AI Mistakes (Anti-Patterns)
|
|
211
|
+
|
|
212
|
+
### 1. Passing Brand/Theme to Components
|
|
213
|
+
|
|
214
|
+
```tsx
|
|
215
|
+
// WRONG - brand is global, not a component prop
|
|
216
|
+
<Button brand="red">Click me</Button>
|
|
217
|
+
<Card theme="dark">Content</Card>
|
|
218
|
+
|
|
219
|
+
// CORRECT - set on ThemeProvider
|
|
220
|
+
<ThemeProvider defaultBrand="red" defaultTheme="dark">
|
|
221
|
+
<Button>Click me</Button>
|
|
222
|
+
<Card>Content</Card>
|
|
223
|
+
</ThemeProvider>
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
### 2. Using Deprecated Props
|
|
227
|
+
|
|
228
|
+
```tsx
|
|
229
|
+
// DEPRECATED (still works, shows warning)
|
|
230
|
+
<Hero headline="Welcome" />
|
|
231
|
+
<CTA headline="Get Started" />
|
|
232
|
+
<DetailPanel subtitle="User info" />
|
|
233
|
+
|
|
234
|
+
// CORRECT - use new prop names
|
|
235
|
+
<Hero title="Welcome" />
|
|
236
|
+
<CTA title="Get Started" />
|
|
237
|
+
<DetailPanel description="User info" />
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
### 3. Using options Object Instead of Flat Props
|
|
241
|
+
|
|
242
|
+
```tsx
|
|
243
|
+
// OLD API (still works)
|
|
244
|
+
<ThemeProvider options={{ defaultBrand: 'red', defaultTheme: 'dark' }}>
|
|
245
|
+
|
|
246
|
+
// NEW API (preferred)
|
|
247
|
+
<ThemeProvider defaultBrand="red" defaultTheme="dark">
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
### 4. Missing CSS Import
|
|
251
|
+
|
|
252
|
+
```tsx
|
|
253
|
+
// WRONG - components will be unstyled
|
|
254
|
+
import { Button } from '@orion-ds/react';
|
|
255
|
+
|
|
256
|
+
// CORRECT - always import styles
|
|
257
|
+
import '@orion-ds/react/styles.css';
|
|
258
|
+
import { Button } from '@orion-ds/react';
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
### 5. Icon-Only Button Without aria-label
|
|
262
|
+
|
|
263
|
+
```tsx
|
|
264
|
+
// WRONG - not accessible
|
|
265
|
+
<Button iconOnly icon={<Settings size={20} />} />
|
|
266
|
+
|
|
267
|
+
// CORRECT - always include aria-label
|
|
268
|
+
<Button iconOnly icon={<Settings size={20} />} aria-label="Settings" />
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
### 6. Using Field as a Wrapper
|
|
272
|
+
|
|
273
|
+
```tsx
|
|
274
|
+
// WRONG - Field is not a wrapper component
|
|
275
|
+
<Field label="Email">
|
|
276
|
+
<input type="email" />
|
|
277
|
+
</Field>
|
|
278
|
+
|
|
279
|
+
// CORRECT - Field is self-contained
|
|
280
|
+
<Field label="Email" type="email" placeholder="you@example.com" />
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
### 7. Hardcoding Colors/Spacing
|
|
284
|
+
|
|
285
|
+
```tsx
|
|
286
|
+
// WRONG - hardcoded values
|
|
287
|
+
<div style={{ color: '#1B5BFF', padding: '16px' }}>
|
|
288
|
+
|
|
289
|
+
// CORRECT - use CSS variables
|
|
290
|
+
<div style={{ color: 'var(--text-brand)', padding: 'var(--spacing-4)' }}>
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
### 8. Creating Custom Sections
|
|
294
|
+
|
|
295
|
+
```tsx
|
|
296
|
+
// WRONG - don't create custom versions
|
|
297
|
+
function MyHeroSection() { ... }
|
|
298
|
+
function CustomPricingTable() { ... }
|
|
299
|
+
|
|
300
|
+
// CORRECT - use pre-built sections
|
|
301
|
+
<Hero title="Welcome" />
|
|
302
|
+
<Pricing plans={[...]} />
|
|
303
|
+
```
|
|
304
|
+
|
|
305
|
+
---
|
|
306
|
+
|
|
307
|
+
## Template Reference
|
|
308
|
+
|
|
309
|
+
### LoginTemplate
|
|
310
|
+
|
|
311
|
+
Authentication page with optional editorial panel.
|
|
312
|
+
|
|
313
|
+
```tsx
|
|
314
|
+
import { LoginTemplate } from '@orion-ds/react';
|
|
315
|
+
|
|
316
|
+
<LoginTemplate
|
|
317
|
+
logo={<img src="/logo.svg" alt="Company" />}
|
|
318
|
+
title="Welcome back"
|
|
319
|
+
subtitle="Sign in to your account"
|
|
320
|
+
formConfig={{
|
|
321
|
+
emailLabel: 'Email',
|
|
322
|
+
passwordLabel: 'Password',
|
|
323
|
+
submitLabel: 'Sign in',
|
|
324
|
+
showRememberMe: true,
|
|
325
|
+
showForgotPassword: true,
|
|
326
|
+
}}
|
|
327
|
+
socialProviders={[
|
|
328
|
+
{ name: 'Google', icon: <GoogleIcon />, onClick: handleGoogleAuth },
|
|
329
|
+
{ name: 'GitHub', icon: <GithubIcon />, onClick: handleGithubAuth },
|
|
330
|
+
]}
|
|
331
|
+
editorial={{
|
|
332
|
+
headline: 'Ship faster with Orion',
|
|
333
|
+
description: 'Join thousands of developers building amazing products.',
|
|
334
|
+
quote: 'This platform changed how we build.',
|
|
335
|
+
author: 'Sarah Chen',
|
|
336
|
+
authorRole: 'CTO, TechCorp',
|
|
337
|
+
}}
|
|
338
|
+
onSubmit={({ email, password, rememberMe }) => {
|
|
339
|
+
// Handle login
|
|
340
|
+
}}
|
|
341
|
+
isLoading={isLoading}
|
|
342
|
+
error={error}
|
|
343
|
+
/>
|
|
344
|
+
```
|
|
345
|
+
|
|
346
|
+
### DashboardTemplate
|
|
347
|
+
|
|
348
|
+
App dashboard with sidebar, metrics, and data tables.
|
|
349
|
+
|
|
350
|
+
```tsx
|
|
351
|
+
import { DashboardTemplate } from '@orion-ds/react';
|
|
352
|
+
|
|
353
|
+
<DashboardTemplate
|
|
354
|
+
sidebar={{
|
|
355
|
+
items: [
|
|
356
|
+
{ label: 'Dashboard', icon: <Home />, href: '/' },
|
|
357
|
+
{ label: 'Analytics', icon: <BarChart />, href: '/analytics' },
|
|
358
|
+
],
|
|
359
|
+
}}
|
|
360
|
+
header={{
|
|
361
|
+
title: 'Dashboard',
|
|
362
|
+
actions: <Button>New Report</Button>,
|
|
363
|
+
}}
|
|
364
|
+
metrics={[
|
|
365
|
+
{ label: 'Total Users', value: '10,234', trend: { value: 12, direction: 'up' } },
|
|
366
|
+
{ label: 'Revenue', value: '$54,321', trend: { value: 8, direction: 'up' } },
|
|
367
|
+
]}
|
|
368
|
+
>
|
|
369
|
+
<DataTable columns={columns} data={data} />
|
|
370
|
+
</DashboardTemplate>
|
|
371
|
+
```
|
|
372
|
+
|
|
373
|
+
### LandingPageTemplate
|
|
374
|
+
|
|
375
|
+
Marketing landing page with all sections.
|
|
376
|
+
|
|
377
|
+
```tsx
|
|
378
|
+
import { LandingPageTemplate } from '@orion-ds/react';
|
|
379
|
+
|
|
380
|
+
<LandingPageTemplate
|
|
381
|
+
navbar={{ variant: 'solid', sticky: true }}
|
|
382
|
+
hero={{
|
|
383
|
+
title: 'Build faster with Orion',
|
|
384
|
+
description: 'The AI-first design system',
|
|
385
|
+
primaryAction: <Button>Get Started</Button>,
|
|
386
|
+
}}
|
|
387
|
+
features={{
|
|
388
|
+
items: featureItems,
|
|
389
|
+
columns: 3,
|
|
390
|
+
}}
|
|
391
|
+
pricing={{
|
|
392
|
+
plans: pricingPlans,
|
|
393
|
+
}}
|
|
394
|
+
testimonials={{
|
|
395
|
+
testimonials: testimonialItems,
|
|
396
|
+
}}
|
|
397
|
+
faq={{
|
|
398
|
+
items: faqItems,
|
|
399
|
+
}}
|
|
400
|
+
cta={{
|
|
401
|
+
title: 'Ready to start?',
|
|
402
|
+
actions: <Button size="lg">Start Free Trial</Button>,
|
|
403
|
+
}}
|
|
404
|
+
footer={{
|
|
405
|
+
brand: { name: 'Acme Inc' },
|
|
406
|
+
linkGroups: footerLinks,
|
|
407
|
+
}}
|
|
408
|
+
/>
|
|
409
|
+
```
|
|
410
|
+
|
|
411
|
+
---
|
|
412
|
+
|
|
413
|
+
## API Conventions
|
|
414
|
+
|
|
415
|
+
### Prop Naming Patterns
|
|
416
|
+
|
|
417
|
+
| Pattern | Meaning | Example |
|
|
418
|
+
|---------|---------|---------|
|
|
419
|
+
| `title` | Main heading text | `<Hero title="Welcome" />` |
|
|
420
|
+
| `description` | Supporting/secondary text | `<Hero description="..." />` |
|
|
421
|
+
| `items` | Array of child data | `<Features items={[...]} />` |
|
|
422
|
+
| `variant` | Visual style variant | `<Button variant="primary" />` |
|
|
423
|
+
| `size` | Size variant | `<Button size="lg" />` |
|
|
424
|
+
| `onX` | Event callback | `<Button onClick={...} />` |
|
|
425
|
+
| `isX` / `showX` | Boolean state | `<Modal isOpen={true} />` |
|
|
426
|
+
|
|
427
|
+
### Variant Conventions
|
|
428
|
+
|
|
429
|
+
**Button:** `primary` | `secondary` | `ghost` | `danger`
|
|
430
|
+
**Card:** `base` | `glass` | `elevated` | `outlined` | `image`
|
|
431
|
+
**Alert:** `info` | `success` | `warning` | `error`
|
|
432
|
+
**Badge:** `default` | `success` | `warning` | `error` | `brand`
|
|
433
|
+
|
|
434
|
+
---
|
|
435
|
+
|
|
436
|
+
## Naming Aliases (Migration)
|
|
437
|
+
|
|
438
|
+
These props are deprecated but still work (with console warnings in development):
|
|
439
|
+
|
|
440
|
+
| Old Prop | New Prop | Component | Migration |
|
|
441
|
+
|----------|----------|-----------|-----------|
|
|
442
|
+
| `headline` | `title` | Hero | `<Hero title="..." />` |
|
|
443
|
+
| `headline` | `title` | CTA | `<CTA title="..." />` |
|
|
444
|
+
| `subtitle` | `description` | DetailPanel | `<DetailPanel description="..." />` |
|
|
445
|
+
| `options` | flat props | ThemeProvider | `<ThemeProvider defaultBrand="..." />` |
|
|
446
|
+
|
|
447
|
+
---
|
|
448
|
+
|
|
449
|
+
## Quick Examples
|
|
450
|
+
|
|
451
|
+
### Landing Page
|
|
452
|
+
|
|
453
|
+
```tsx
|
|
454
|
+
import '@orion-ds/react/styles.css';
|
|
455
|
+
import { ThemeProvider, Hero, Features, CTA, Footer, Button } from '@orion-ds/react';
|
|
456
|
+
|
|
457
|
+
function LandingPage() {
|
|
458
|
+
return (
|
|
459
|
+
<ThemeProvider>
|
|
460
|
+
<Hero
|
|
461
|
+
title="Build Products Faster"
|
|
462
|
+
description="The AI-first design system for modern teams."
|
|
463
|
+
primaryAction={<Button size="lg">Get Started</Button>}
|
|
464
|
+
align="center"
|
|
465
|
+
/>
|
|
466
|
+
<Features
|
|
467
|
+
title="Everything you need"
|
|
468
|
+
items={[
|
|
469
|
+
{ icon: <Zap />, title: 'Fast', description: 'Lightning quick' },
|
|
470
|
+
{ icon: <Shield />, title: 'Secure', description: 'Enterprise-grade' },
|
|
471
|
+
]}
|
|
472
|
+
/>
|
|
473
|
+
<CTA
|
|
474
|
+
title="Ready to start?"
|
|
475
|
+
actions={<Button>Start Free Trial</Button>}
|
|
476
|
+
/>
|
|
477
|
+
<Footer
|
|
478
|
+
brand={{ name: 'Acme' }}
|
|
479
|
+
linkGroups={[{ title: 'Product', links: [...] }]}
|
|
480
|
+
/>
|
|
481
|
+
</ThemeProvider>
|
|
482
|
+
);
|
|
483
|
+
}
|
|
484
|
+
```
|
|
485
|
+
|
|
486
|
+
### Dashboard
|
|
487
|
+
|
|
488
|
+
```tsx
|
|
489
|
+
import '@orion-ds/react/styles.css';
|
|
490
|
+
import { ThemeProvider, Sidebar, PageHeader, MetricCards, DataTable } from '@orion-ds/react';
|
|
491
|
+
|
|
492
|
+
function Dashboard() {
|
|
493
|
+
return (
|
|
494
|
+
<ThemeProvider defaultTheme="light">
|
|
495
|
+
<div style={{ display: 'flex' }}>
|
|
496
|
+
<Sidebar items={navItems} />
|
|
497
|
+
<main style={{ flex: 1, padding: 'var(--spacing-6)' }}>
|
|
498
|
+
<PageHeader title="Dashboard" actions={<Button>Export</Button>} />
|
|
499
|
+
<MetricCards items={metrics} />
|
|
500
|
+
<DataTable columns={columns} data={data} />
|
|
501
|
+
</main>
|
|
502
|
+
</div>
|
|
503
|
+
</ThemeProvider>
|
|
504
|
+
);
|
|
505
|
+
}
|
|
506
|
+
```
|
|
507
|
+
|
|
508
|
+
### Login Page
|
|
509
|
+
|
|
510
|
+
```tsx
|
|
511
|
+
import '@orion-ds/react/styles.css';
|
|
512
|
+
import { ThemeProvider, LoginTemplate } from '@orion-ds/react';
|
|
513
|
+
|
|
514
|
+
function LoginPage() {
|
|
515
|
+
return (
|
|
516
|
+
<ThemeProvider>
|
|
517
|
+
<LoginTemplate
|
|
518
|
+
logo={<img src="/logo.svg" alt="Company" />}
|
|
519
|
+
title="Welcome back"
|
|
520
|
+
onSubmit={handleLogin}
|
|
521
|
+
socialProviders={[
|
|
522
|
+
{ name: 'Google', icon: <GoogleIcon />, onClick: handleGoogle },
|
|
523
|
+
]}
|
|
524
|
+
/>
|
|
525
|
+
</ThemeProvider>
|
|
526
|
+
);
|
|
527
|
+
}
|
|
528
|
+
```
|
|
529
|
+
|
|
530
|
+
---
|
|
531
|
+
|
|
532
|
+
## Verification Checklist
|
|
533
|
+
|
|
534
|
+
Before submitting generated code, verify:
|
|
535
|
+
|
|
536
|
+
- [ ] `@orion-ds/react/styles.css` is imported
|
|
537
|
+
- [ ] App is wrapped with `<ThemeProvider>`
|
|
538
|
+
- [ ] No `brand` or `theme` props on individual components
|
|
539
|
+
- [ ] Using `title` not `headline` for Hero/CTA
|
|
540
|
+
- [ ] Using `description` not `subtitle` for DetailPanel
|
|
541
|
+
- [ ] All icon-only buttons have `aria-label`
|
|
542
|
+
- [ ] No hardcoded colors or pixel values
|
|
543
|
+
- [ ] Using pre-built sections, not custom equivalents
|
|
544
|
+
|
|
545
|
+
---
|
|
546
|
+
|
|
547
|
+
**Full documentation:** See `AI_COMPONENTS.md` for detailed component reference.
|