@docyrus/docyrus 0.0.16 → 0.0.18
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 +33 -2
- package/agent-loader.js +2640 -0
- package/agent-loader.js.map +7 -0
- package/main.js +833 -505
- package/main.js.map +4 -4
- package/package.json +5 -1
- package/resources/pi-agent/prompts/agent-system.md +25 -0
- package/resources/pi-agent/prompts/coder-append-system.md +19 -0
- package/resources/pi-agent/skills/docyrus-ai/SKILL.md +28 -0
- package/resources/pi-agent/skills/docyrus-api-dev/SKILL.md +161 -0
- package/resources/pi-agent/skills/docyrus-api-dev/references/api-client.md +349 -0
- package/resources/pi-agent/skills/docyrus-api-dev/references/authentication.md +238 -0
- package/resources/pi-agent/skills/docyrus-api-dev/references/data-source-query-guide.md +2059 -0
- package/resources/pi-agent/skills/docyrus-api-dev/references/formula-design-guide-llm.md +320 -0
- package/resources/pi-agent/skills/docyrus-api-dev/references/query-and-formulas.md +592 -0
- package/resources/pi-agent/skills/docyrus-api-doctor/SKILL.md +70 -0
- package/resources/pi-agent/skills/docyrus-api-doctor/references/checklist-details.md +588 -0
- package/resources/pi-agent/skills/docyrus-app-dev/SKILL.md +159 -0
- package/resources/pi-agent/skills/docyrus-app-dev/references/api-client-and-auth.md +275 -0
- package/resources/pi-agent/skills/docyrus-app-dev/references/collections-and-patterns.md +352 -0
- package/resources/pi-agent/skills/docyrus-app-dev/references/data-source-query-guide.md +2059 -0
- package/resources/pi-agent/skills/docyrus-app-dev/references/formula-design-guide-llm.md +320 -0
- package/resources/pi-agent/skills/docyrus-app-dev/references/query-guide.md +525 -0
- package/resources/pi-agent/skills/docyrus-app-ui-design/SKILL.md +466 -0
- package/resources/pi-agent/skills/docyrus-app-ui-design/references/component-selection-guide.md +602 -0
- package/resources/pi-agent/skills/docyrus-app-ui-design/references/icon-usage-guide.md +463 -0
- package/resources/pi-agent/skills/docyrus-app-ui-design/references/preferred-components-catalog.md +242 -0
- package/resources/pi-agent/skills/docyrus-apps/SKILL.md +54 -0
- package/resources/pi-agent/skills/docyrus-architect/SKILL.md +174 -0
- package/resources/pi-agent/skills/docyrus-architect/references/custom-query-guide.md +410 -0
- package/resources/pi-agent/skills/docyrus-architect/references/data-source-query-guide.md +2059 -0
- package/resources/pi-agent/skills/docyrus-architect/references/formula-design-guide-llm.md +320 -0
- package/resources/pi-agent/skills/docyrus-architect/references/formula-reference.md +145 -0
- package/resources/pi-agent/skills/docyrus-auth/SKILL.md +100 -0
- package/resources/pi-agent/skills/docyrus-cli-app/SKILL.md +279 -0
- package/resources/pi-agent/skills/docyrus-cli-app/references/cli-manifest.md +532 -0
- package/resources/pi-agent/skills/docyrus-cli-app/references/list-query-examples.md +248 -0
- package/resources/pi-agent/skills/docyrus-curl/SKILL.md +32 -0
- package/resources/pi-agent/skills/docyrus-discover/SKILL.md +63 -0
- package/resources/pi-agent/skills/docyrus-ds/SKILL.md +95 -0
- package/resources/pi-agent/skills/docyrus-env/SKILL.md +21 -0
- package/resources/pi-agent/skills/docyrus-studio/SKILL.md +369 -0
- package/resources/pi-agent/skills/docyrus-tui/SKILL.md +15 -0
package/resources/pi-agent/skills/docyrus-app-ui-design/references/component-selection-guide.md
ADDED
|
@@ -0,0 +1,602 @@
|
|
|
1
|
+
# Component Selection Guide
|
|
2
|
+
|
|
3
|
+
Decision trees and best practices for choosing the right component for each use case.
|
|
4
|
+
|
|
5
|
+
## Table of Contents
|
|
6
|
+
|
|
7
|
+
1. [UX Design Patterns](#ux-design-patterns)
|
|
8
|
+
2. [Selection Process](#selection-process)
|
|
9
|
+
3. [Common Use Case Decision Trees](#common-use-case-decision-trees)
|
|
10
|
+
4. [Library-Specific Strengths](#library-specific-strengths)
|
|
11
|
+
5. [Default Choices](#default-choices)
|
|
12
|
+
6. [When to Use Each Library](#when-to-use-each-library)
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## UX Design Patterns
|
|
17
|
+
|
|
18
|
+
These patterns are **mandatory** and must be followed in all Docyrus applications.
|
|
19
|
+
|
|
20
|
+
### Pattern 1: Item Create Forms → AwesomeDialog
|
|
21
|
+
|
|
22
|
+
All item creation and editing forms use the **AwesomeDialog** system. Choose the container type based on form complexity:
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
Form complexity → Container choice:
|
|
26
|
+
|
|
27
|
+
Small/simple form (3-6 fields) → container="sheet" side="right"
|
|
28
|
+
Long/complex form (7+ fields) → container="modal" size="lg"
|
|
29
|
+
Mobile-first form → container="drawer" side="bottom"
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
**AwesomeDialog** props reference:
|
|
33
|
+
- `container`: `'modal'` | `'sheet'` | `'drawer'` — determines the dialog presentation
|
|
34
|
+
- `side`: `'left'` | `'right'` | `'top'` | `'bottom'` — positioning for sheet/drawer
|
|
35
|
+
- `size`: `'sm'` | `'default'` | `'lg'` | `'xl'` | `'full'` — size preset
|
|
36
|
+
- `pattern`: boolean — show decorative pattern background (default: true)
|
|
37
|
+
- `patternStyle`: `'stripes'` | `'dots'` | `'grid'` | `'crosshatch'` | `'zigzag'`
|
|
38
|
+
- `fullscreenable`: boolean — allow fullscreen toggle
|
|
39
|
+
- `minimizable`: boolean — allow minimize (requires GlobalDialogProvider)
|
|
40
|
+
- `resizable`: boolean — allow resize handles
|
|
41
|
+
- `dialogId`: string — unique ID for global dialog tracking
|
|
42
|
+
|
|
43
|
+
**Sub-components**: `AwesomeDialogHeader`, `AwesomeDialogBody`, `AwesomeDialogFooter`, `AwesomeDialogToolbar`
|
|
44
|
+
|
|
45
|
+
**Example — Small create form (task):**
|
|
46
|
+
```tsx
|
|
47
|
+
<AwesomeDialog open={open} onOpenChange={setOpen} container="sheet" side="right">
|
|
48
|
+
<AwesomeDialogHeader title="Create Task" icon="far-plus" />
|
|
49
|
+
<AwesomeDialogBody>{/* TanStack Form fields */}</AwesomeDialogBody>
|
|
50
|
+
<AwesomeDialogFooter>
|
|
51
|
+
<Button variant="outline" onClick={() => setOpen(false)}>Cancel</Button>
|
|
52
|
+
<Button onClick={handleSubmit}>Create</Button>
|
|
53
|
+
</AwesomeDialogFooter>
|
|
54
|
+
</AwesomeDialog>
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
**Example — Large create form (project):**
|
|
58
|
+
```tsx
|
|
59
|
+
<AwesomeDialog open={open} onOpenChange={setOpen} container="modal" size="lg" fullscreenable>
|
|
60
|
+
<AwesomeDialogHeader title="Create Project" icon="far-folder-plus" />
|
|
61
|
+
<AwesomeDialogBody>{/* Many form fields — body scrolls */}</AwesomeDialogBody>
|
|
62
|
+
<AwesomeDialogFooter>
|
|
63
|
+
<Button variant="outline" onClick={() => setOpen(false)}>Cancel</Button>
|
|
64
|
+
<Button onClick={handleSubmit}>Create Project</Button>
|
|
65
|
+
</AwesomeDialogFooter>
|
|
66
|
+
</AwesomeDialog>
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### Pattern 2: Item Detail Pages → New Page vs AwesomeDialog
|
|
70
|
+
|
|
71
|
+
Choose the right container based on item complexity:
|
|
72
|
+
|
|
73
|
+
```
|
|
74
|
+
Item complexity → Detail view choice:
|
|
75
|
+
|
|
76
|
+
Large items (projects, workspaces, reports) → Dedicated new page (full route)
|
|
77
|
+
Small items (tasks, contacts, comments) → AwesomeDialog with container="sheet" side="right"
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
**Decision tree:**
|
|
81
|
+
```
|
|
82
|
+
Does the item have:
|
|
83
|
+
- Multiple tabs/sections?
|
|
84
|
+
- Sub-items or child lists?
|
|
85
|
+
- Complex layout with sidebar?
|
|
86
|
+
→ YES: Create a dedicated page route
|
|
87
|
+
|
|
88
|
+
- Simple field list?
|
|
89
|
+
- Quick view/edit pattern?
|
|
90
|
+
- Opened from a list or table?
|
|
91
|
+
→ YES: Use AwesomeDialog right drawer
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
**Example — Task detail in AwesomeDialog:**
|
|
95
|
+
```tsx
|
|
96
|
+
<AwesomeDialog open={open} onOpenChange={setOpen} container="sheet" side="right" size="lg" fullscreenable>
|
|
97
|
+
<AwesomeDialogHeader
|
|
98
|
+
title={task.title}
|
|
99
|
+
description={`${task.status} · ${task.assignee}`}
|
|
100
|
+
headerButtons={
|
|
101
|
+
<Button variant="outline" size="sm" onClick={switchToFullForm}>Edit All</Button>
|
|
102
|
+
}
|
|
103
|
+
/>
|
|
104
|
+
<AwesomeDialogBody>
|
|
105
|
+
<EditableRecordDetail fields={fields} record={record} onSave={handleSave}>
|
|
106
|
+
<EditableRecordDetailField slug="title" />
|
|
107
|
+
<EditableRecordDetailField slug="status" />
|
|
108
|
+
<EditableRecordDetailField slug="assignee" />
|
|
109
|
+
<EditableRecordDetailField slug="due_date" />
|
|
110
|
+
</EditableRecordDetail>
|
|
111
|
+
</AwesomeDialogBody>
|
|
112
|
+
</AwesomeDialog>
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
### Pattern 3: Form System → TanStack Form + Docyrus Form Fields
|
|
116
|
+
|
|
117
|
+
**All forms must use** TanStack Form with the Docyrus form field system. Never use plain HTML forms or React Hook Form directly.
|
|
118
|
+
|
|
119
|
+
**Key components:**
|
|
120
|
+
- `DynamicFormField` — Auto-dispatches to the correct field type based on `IField.type`
|
|
121
|
+
- 47+ field types: text, number, email, url, phone, date, dateTime, time, select, multiSelect, status, relation, file, image, code, docEditor, and more
|
|
122
|
+
- Each field type has a dedicated `*FormField` component (e.g., `TextFormField`, `SelectFormField`, `DateFormField`)
|
|
123
|
+
|
|
124
|
+
**Form field pattern:**
|
|
125
|
+
```tsx
|
|
126
|
+
import { useForm } from '@tanstack/react-form'
|
|
127
|
+
import { TextFormField, SelectFormField, DateFormField } from '@docyrus/ui/components/form-fields'
|
|
128
|
+
|
|
129
|
+
const form = useForm({ defaultValues: { title: '', status: '', dueDate: '' } })
|
|
130
|
+
|
|
131
|
+
<form.Field name="title">
|
|
132
|
+
{(field) => <TextFormField field={field} label="Title" />}
|
|
133
|
+
</form.Field>
|
|
134
|
+
<form.Field name="status">
|
|
135
|
+
{(field) => <SelectFormField field={field} label="Status" options={statusOptions} />}
|
|
136
|
+
</form.Field>
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
### Pattern 4: Inline Editing → EditableRecordDetail
|
|
140
|
+
|
|
141
|
+
Use `EditableRecordDetail` for detail views where users can edit individual fields inline without opening a full form page. **Always enable `trackChanges`** to highlight changed fields and show a floating ActionBar. Always include an **"Edit All"** button in the header to switch to a full form editing experience.
|
|
142
|
+
|
|
143
|
+
**Key components:**
|
|
144
|
+
- `EditableRecordDetail` — Provider/wrapper that manages field state, change tracking, and save/cancel
|
|
145
|
+
- `EditableRecordDetailField` — Individual field that reads config from context, renders label + inline-editable value
|
|
146
|
+
- `EditableValue` — Lower-level single-field inline editor (used internally by EditableRecordDetailField)
|
|
147
|
+
- `useEditableRecordDetail()` — Hook to access form, values, changes, and save/cancel from within the provider
|
|
148
|
+
|
|
149
|
+
**How it works (with `trackChanges` enabled):**
|
|
150
|
+
1. Fields render as read-only `DynamicValue` display
|
|
151
|
+
2. Click a field → switches to `DynamicFormField` editor inline
|
|
152
|
+
3. Changed fields get highlighted with amber background
|
|
153
|
+
4. Floating `ActionBar` appears showing "N fields changed" with Save/Cancel buttons
|
|
154
|
+
5. Save commits only changed fields; Cancel reverts all changes
|
|
155
|
+
|
|
156
|
+
**Important:** Always pass `trackChanges` prop when using `EditableRecordDetail` or `DataGrid` with cell editing. Without it, users have no visual feedback about which fields they've modified and no centralized Save/Cancel flow.
|
|
157
|
+
|
|
158
|
+
**Field change tracking types:**
|
|
159
|
+
```tsx
|
|
160
|
+
interface RecordDetailField {
|
|
161
|
+
field: IField // Field configuration (name, slug, type)
|
|
162
|
+
enumOptions?: EnumOption[] // Options for select-based fields
|
|
163
|
+
readOnly?: boolean // Per-field read-only override
|
|
164
|
+
appSlug?: string // For dynamic enum loading
|
|
165
|
+
dataSourceSlug?: string // For dynamic enum loading
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
interface FieldChange {
|
|
169
|
+
fieldSlug: string
|
|
170
|
+
fieldName: string
|
|
171
|
+
originalValue: unknown
|
|
172
|
+
newValue: unknown
|
|
173
|
+
}
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
**Example — Detail view with inline editing and "Edit All" button:**
|
|
177
|
+
```tsx
|
|
178
|
+
<AwesomeDialogHeader
|
|
179
|
+
title="Task Detail"
|
|
180
|
+
headerButtons={<Button variant="outline" size="sm" onClick={switchToFullForm}>Edit All</Button>}
|
|
181
|
+
/>
|
|
182
|
+
<AwesomeDialogBody>
|
|
183
|
+
<EditableRecordDetail fields={fields} record={record} onSave={handleSave} onCancel={handleCancel} trackChanges>
|
|
184
|
+
<div className="space-y-3">
|
|
185
|
+
<h4 className="border-b pb-1.5 text-xs font-semibold uppercase tracking-wider text-muted-foreground">
|
|
186
|
+
General Info
|
|
187
|
+
</h4>
|
|
188
|
+
<EditableRecordDetailField slug="title" />
|
|
189
|
+
<EditableRecordDetailField slug="status" />
|
|
190
|
+
<EditableRecordDetailField slug="priority" />
|
|
191
|
+
<EditableRecordDetailField slug="assignee" />
|
|
192
|
+
<EditableRecordDetailField slug="due_date" />
|
|
193
|
+
</div>
|
|
194
|
+
</EditableRecordDetail>
|
|
195
|
+
</AwesomeDialogBody>
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
---
|
|
199
|
+
|
|
200
|
+
## Selection Process
|
|
201
|
+
|
|
202
|
+
Follow this process when selecting a component:
|
|
203
|
+
|
|
204
|
+
```
|
|
205
|
+
1. Check if there's a default preference for the use case
|
|
206
|
+
↓
|
|
207
|
+
2. If no default, search for matching components by:
|
|
208
|
+
- Name match (exact or similar)
|
|
209
|
+
- Functionality match
|
|
210
|
+
- Category match (form, data, navigation, etc.)
|
|
211
|
+
↓
|
|
212
|
+
3. If multiple matches found, apply library priority:
|
|
213
|
+
- docyrus (if Docyrus-specific data handling needed)
|
|
214
|
+
- shadcn (for basic/common components)
|
|
215
|
+
- diceui (for advanced/specialized features)
|
|
216
|
+
- animate-ui (when animation/transitions are important)
|
|
217
|
+
- reui (for specific utility needs)
|
|
218
|
+
↓
|
|
219
|
+
4. Verify the component meets requirements by checking docs
|
|
220
|
+
↓
|
|
221
|
+
5. Install and implement
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
---
|
|
225
|
+
|
|
226
|
+
## Common Use Case Decision Trees
|
|
227
|
+
|
|
228
|
+
### Dashboard & Data Visualization
|
|
229
|
+
|
|
230
|
+
| Need | Component | Library | Rationale |
|
|
231
|
+
|------|-----------|---------|-----------|
|
|
232
|
+
| Stat/metric card | **AwesomeCard** | docyrus | Default choice - hatched header design, perfect for metrics |
|
|
233
|
+
| Stat dashboard (multi-card) | **AwesomeStats** | docyrus | Grid/flex/tabs layouts, mini-charts, comparisons, drag-reorder |
|
|
234
|
+
| Alternative card | Card | shadcn | Basic card for custom designs |
|
|
235
|
+
| Stat display | Stat | diceui | Dedicated stat display with formatting |
|
|
236
|
+
| Pivot table / analytics | **PivotGrid** | docyrus | 3-level hierarchies, subtotals, drilldown, export (CSV/Excel/PDF) |
|
|
237
|
+
| Chart/graph | Chart + Recharts | shadcn | Built-in Recharts integration |
|
|
238
|
+
| Gauge/dial | Gauge | diceui | Circular progress indicator |
|
|
239
|
+
| Progress bar | Progress | shadcn | Linear progress indicator |
|
|
240
|
+
| Circular progress | Circular Progress | diceui | Ring-style progress |
|
|
241
|
+
|
|
242
|
+
### Navigation & Layout
|
|
243
|
+
|
|
244
|
+
| Need | Component | Library | Rationale |
|
|
245
|
+
|------|-----------|---------|-----------|
|
|
246
|
+
| App sidebar | **Sidebar** | animate-ui | Default choice - smooth animations, composable |
|
|
247
|
+
| Alternative sidebar | Navigation Menu | shadcn | For mega menus and dropdowns |
|
|
248
|
+
| Breadcrumbs | Breadcrumb | shadcn | Path navigation |
|
|
249
|
+
| Menu bar | Menubar | shadcn | Desktop-style persistent menu |
|
|
250
|
+
| Dropdown menu | Dropdown Menu | animate-ui | Animated transitions |
|
|
251
|
+
| Context menu | Context Menu | shadcn | Right-click menus |
|
|
252
|
+
| Tabs | Tabs | animate-ui | Animated tab transitions |
|
|
253
|
+
|
|
254
|
+
### Data Display & Tables
|
|
255
|
+
|
|
256
|
+
| Need | Component | Library | Rationale |
|
|
257
|
+
|------|-----------|---------|-----------|
|
|
258
|
+
| Editable grid | Data Grid | docyrus | Virtualized, keyboard nav, cell editing — enable `trackChanges` for edit tracking |
|
|
259
|
+
| Grid saved views | **Data Grid View Select** | docyrus | Saved view management with sort/filter/columns |
|
|
260
|
+
| Read-only table | Table | shadcn | Simple, responsive tables |
|
|
261
|
+
| Advanced data table | Data Table | diceui | Filtering, sorting, pagination built-in |
|
|
262
|
+
| Table filters | Data Table Filter | docyrus | Multi-column filter bar |
|
|
263
|
+
| Value display | Value Renderers | docyrus | 44 renderer types for read-only display |
|
|
264
|
+
| Empty state | Empty | shadcn | No data placeholder |
|
|
265
|
+
|
|
266
|
+
### Forms & Inputs
|
|
267
|
+
|
|
268
|
+
**Always use TanStack Form + Docyrus form fields.** The `DynamicFormField` component auto-dispatches to the correct field type.
|
|
269
|
+
|
|
270
|
+
| Need | Component | Library | Rationale |
|
|
271
|
+
|------|-----------|---------|-----------|
|
|
272
|
+
| Dynamic forms (default) | **Form Fields + TanStack Form** | docyrus | 47 field types with auto-dispatch — **always use this** |
|
|
273
|
+
| Inline record editing | **EditableRecordDetail** | docyrus | Click-to-edit fields with change tracking + ActionBar |
|
|
274
|
+
| Single field inline edit | EditableValue | docyrus | Lower-level click-to-edit for individual values |
|
|
275
|
+
| Text input | Input | shadcn | Basic text input (use via TextFormField in forms) |
|
|
276
|
+
| Text area | Textarea | shadcn | Multi-line text (use via TextareaFormField in forms) |
|
|
277
|
+
| Select dropdown | Select | shadcn | Basic select (use via SelectFormField in forms) |
|
|
278
|
+
| Combobox/autocomplete | Combobox | diceui | Search + select |
|
|
279
|
+
| Date picker | Date Time Picker | docyrus | Date + time combined |
|
|
280
|
+
| Date range picker | **Date Time Range Picker** | docyrus | Start/end date+time pair with size variants |
|
|
281
|
+
| Date only | Calendar | shadcn | Date selection only |
|
|
282
|
+
| Time only | Time Picker | diceui | Time selection only |
|
|
283
|
+
| Phone number | Phone Input | diceui | International formatting |
|
|
284
|
+
| Color selection | Color Picker | diceui | Full spectrum + palette |
|
|
285
|
+
| File upload | File Upload | diceui | Drag-drop, preview, progress |
|
|
286
|
+
| Tags input | Tags Input | diceui | Multiple tag entry |
|
|
287
|
+
| Rating | Rating | diceui | Star/heart rating |
|
|
288
|
+
| Checkbox group | Checkbox Group | diceui | Multiple selections |
|
|
289
|
+
| Radio group (animated) | Radio Group | animate-ui | Single selection with animation |
|
|
290
|
+
| Radio group (card/grid) | **Radio Group** | docyrus | Card variant with icons, descriptions, grid columns |
|
|
291
|
+
| Switch | Switch | animate-ui | Toggle with animation |
|
|
292
|
+
| Slider | Slider | shadcn | Range selection |
|
|
293
|
+
| OTP input | Input OTP | shadcn | One-time password codes |
|
|
294
|
+
|
|
295
|
+
### Dialogs & Overlays
|
|
296
|
+
|
|
297
|
+
| Need | Component | Library | Rationale |
|
|
298
|
+
|------|-----------|---------|-----------|
|
|
299
|
+
| Item create form (small) | **AwesomeDialog** (sheet) | docyrus | Default — sheet right for quick forms |
|
|
300
|
+
| Item create form (large) | **AwesomeDialog** (modal) | docyrus | Default — modal for complex forms |
|
|
301
|
+
| Item detail (small item) | **AwesomeDialog** (sheet right) | docyrus | Default — right drawer for task/contact detail |
|
|
302
|
+
| Minimizable/global dialogs | **AwesomeDialog** + GlobalDialogProvider | docyrus | Taskbar-style dialog management |
|
|
303
|
+
| Responsive dialog | Responsive Dialog | diceui | Auto-switches to drawer on mobile |
|
|
304
|
+
| Alert/confirmation dialog | Alert Dialog | animate-ui | Confirmation prompts |
|
|
305
|
+
| Basic dialog | Dialog | animate-ui | Animated modal (non-form use cases) |
|
|
306
|
+
| Drawer | Drawer | shadcn | Simple side/bottom panel |
|
|
307
|
+
| Sheet | Sheet | animate-ui | Complementary content |
|
|
308
|
+
| Popover | Popover | animate-ui | Floating content |
|
|
309
|
+
| Tooltip | Tooltip | animate-ui | Hover hints |
|
|
310
|
+
| Hover card | Hover Card | animate-ui | Rich preview on hover |
|
|
311
|
+
|
|
312
|
+
### Specialized Components
|
|
313
|
+
|
|
314
|
+
| Need | Component | Library | Rationale |
|
|
315
|
+
|------|-----------|---------|-----------|
|
|
316
|
+
| Kanban board | **Kanban** | docyrus | Drag-drop columns with dnd-kit, keyboard nav |
|
|
317
|
+
| Gantt chart | **Gantt** | docyrus | Project timeline scheduling |
|
|
318
|
+
| Resource scheduling | **Resource Scheduler Panel** | docyrus | Horizontal timeline with drag-drop events |
|
|
319
|
+
| Appointment booking | **Time Slot Scheduler** | docyrus | Columns/month views, capacity, timezone |
|
|
320
|
+
| Timeline | Timeline | diceui | Event/step display |
|
|
321
|
+
| Stepper / wizard | **Stepper** | docyrus | 6 variants, horizontal/vertical, animated connectors |
|
|
322
|
+
| Tour/onboarding | Tour | diceui | Interactive tutorials |
|
|
323
|
+
| Query builder | Query Builder | docyrus | Docyrus query construction |
|
|
324
|
+
| Notifications | **NotificationStack** | docyrus | Stacked notification cards |
|
|
325
|
+
| Notification panel | **NotificationsPanel** | docyrus | Full notification management |
|
|
326
|
+
| Search input | **SearchInput** | docyrus | Dedicated search with clear |
|
|
327
|
+
| Location input | **PlaceAutocomplete** | docyrus | Address search + selection |
|
|
328
|
+
| Map display | **Map** | docyrus | Geographic data (Leaflet) |
|
|
329
|
+
| Tree hierarchy | **TreeView** | docyrus | Nested data display |
|
|
330
|
+
| Image editing | **ImageEditor** | docyrus | Crop, adjust, transform |
|
|
331
|
+
| Media player | Media Player | diceui | Video/audio playback |
|
|
332
|
+
| QR code | QR Code | diceui | QR generation |
|
|
333
|
+
| Cropper / Image cropping | **ImageEditor** | docyrus | Crop, adjust, transform |
|
|
334
|
+
| Mentions | Mention | diceui | @mention functionality |
|
|
335
|
+
| Command palette | Command | shadcn | Keyboard shortcuts |
|
|
336
|
+
| Confirmation action | **ConfirmationButton** | docyrus | Button with confirm dialog |
|
|
337
|
+
| Activity logging (CRM) | **Log Activity Form** | docyrus | Calls, emails, meetings, tasks, status updates with Plate editor |
|
|
338
|
+
| Dynamic repeating rows | **Schema Repeater** | docyrus | Structured data list with customizable input types per column |
|
|
339
|
+
| Rich item selector | **Mega Select** | docyrus | Grid picker with categories, search, detail panel |
|
|
340
|
+
| Quick record create | **Create Record Dialog** | docyrus | Popover dialog with subject, mentions, selectors |
|
|
341
|
+
| Email composing | **Email Composer** | docyrus | To/Cc/Bcc, formatting toolbar, attachments |
|
|
342
|
+
| Markdown editing | **Simple Markdown Editor** | docyrus | Lightweight MD editor with toolbar/stats |
|
|
343
|
+
| Team chat | **Team Chat Channel** | docyrus | Posts, threads, reactions, mentions, attachments |
|
|
344
|
+
| Contact activities | **Contact Activity Panel** | docyrus | Activity timeline with calls, emails, tasks, chat |
|
|
345
|
+
| AI agent chat | **Docyrus Agent** | docyrus | Chat/action-panel/trigger modes for AI agents |
|
|
346
|
+
| Pricing/quoting | **Pricing Engine Panel** | docyrus | Line items, VAT, discounts, currency, totals |
|
|
347
|
+
| Record sharing | **Record Sharing** | docyrus | Permission-based sharing with users/teams/roles |
|
|
348
|
+
|
|
349
|
+
---
|
|
350
|
+
|
|
351
|
+
## Library-Specific Strengths
|
|
352
|
+
|
|
353
|
+
### shadcn (43 components)
|
|
354
|
+
**Best for**: Core UI primitives, forms, basic layout
|
|
355
|
+
|
|
356
|
+
**Strengths**:
|
|
357
|
+
- Well-tested, accessible components
|
|
358
|
+
- Great documentation
|
|
359
|
+
- Broad browser support
|
|
360
|
+
- Foundation for other libraries
|
|
361
|
+
|
|
362
|
+
**Use when**: You need a standard, reliable component without special features
|
|
363
|
+
|
|
364
|
+
### diceui (42 components)
|
|
365
|
+
**Best for**: Advanced interactions, specialized data components
|
|
366
|
+
|
|
367
|
+
**Strengths**:
|
|
368
|
+
- Rich feature sets (filtering, sorting, virtualization)
|
|
369
|
+
- Advanced input types (phone, color, mask)
|
|
370
|
+
- Drag-drop capabilities
|
|
371
|
+
- Data visualization components
|
|
372
|
+
|
|
373
|
+
**Use when**: You need advanced functionality beyond basic components
|
|
374
|
+
|
|
375
|
+
### animate-ui (21 components)
|
|
376
|
+
**Best for**: Animated transitions, polished UX
|
|
377
|
+
|
|
378
|
+
**Strengths**:
|
|
379
|
+
- Smooth, professional animations
|
|
380
|
+
- Enhanced visual feedback
|
|
381
|
+
- Composable animated patterns
|
|
382
|
+
|
|
383
|
+
**Use when**: Animation/transitions are important to the UX
|
|
384
|
+
|
|
385
|
+
### docyrus (51 components)
|
|
386
|
+
**Best for**: Docyrus-specific data handling, forms, dialogs, inline editing, scheduling, chat, AI agents, and business logic
|
|
387
|
+
|
|
388
|
+
**Strengths**:
|
|
389
|
+
- Deep Docyrus platform integration
|
|
390
|
+
- AwesomeDialog system for item creation and detail views
|
|
391
|
+
- EditableRecordDetail for inline field editing with change tracking
|
|
392
|
+
- 47 form field types with TanStack Form integration
|
|
393
|
+
- 44 value renderer types
|
|
394
|
+
- Data source query builders
|
|
395
|
+
- Scheduling: Gantt, Resource Scheduler, Time Slot Scheduler, Calendar
|
|
396
|
+
- Communication: Team Chat Channel, Email Composer, Comments Panel
|
|
397
|
+
- AI integration: Docyrus Agent (chat, action panel, trigger modes)
|
|
398
|
+
- Business: Pricing Engine, Record Sharing, Contact Activity
|
|
399
|
+
- Selection: Mega Select, Create Record Dialog
|
|
400
|
+
- Kanban board, notifications, maps, markdown editor, and more
|
|
401
|
+
|
|
402
|
+
**Use when**: Working with Docyrus data sources, building item create/detail flows, forms, scheduling, chat, AI features, or queries
|
|
403
|
+
|
|
404
|
+
### reui (2 components)
|
|
405
|
+
**Best for**: Specific utility needs
|
|
406
|
+
|
|
407
|
+
**Strengths**:
|
|
408
|
+
- Focused implementations
|
|
409
|
+
- Lightweight alternatives
|
|
410
|
+
|
|
411
|
+
**Use when**: The specific component matches your exact need
|
|
412
|
+
|
|
413
|
+
---
|
|
414
|
+
|
|
415
|
+
## Default Choices
|
|
416
|
+
|
|
417
|
+
These are the **recommended defaults** unless the user specifies otherwise:
|
|
418
|
+
|
|
419
|
+
| Use Case | Default Component | Library |
|
|
420
|
+
|----------|------------------|---------|
|
|
421
|
+
| Item create form | **AwesomeDialog** (sheet/modal) | docyrus |
|
|
422
|
+
| Quick record create | **Create Record Dialog** | docyrus |
|
|
423
|
+
| Item detail (small) | **AwesomeDialog** (sheet right) | docyrus |
|
|
424
|
+
| Inline record editing | **EditableRecordDetail** | docyrus |
|
|
425
|
+
| Dashboard card | AwesomeCard | docyrus |
|
|
426
|
+
| App navigation | Sidebar | animate-ui |
|
|
427
|
+
| Charts | Chart + Recharts | shadcn |
|
|
428
|
+
| Data table | Data Table | diceui |
|
|
429
|
+
| Data grid saved views | **Data Grid View Select** | docyrus |
|
|
430
|
+
| Forms | **Form Fields + TanStack Form** | docyrus |
|
|
431
|
+
| File upload | File Upload | diceui |
|
|
432
|
+
| Confirmation dialogs | Alert Dialog | animate-ui |
|
|
433
|
+
| Gantt / project scheduling | Gantt | docyrus |
|
|
434
|
+
| Resource scheduling | **Resource Scheduler Panel** | docyrus |
|
|
435
|
+
| Appointment booking | **Time Slot Scheduler** | docyrus |
|
|
436
|
+
| Team chat | **Team Chat Channel** | docyrus |
|
|
437
|
+
| Email composing | **Email Composer** | docyrus |
|
|
438
|
+
| AI agent interface | **Docyrus Agent** | docyrus |
|
|
439
|
+
| Kanban board | **Kanban** | docyrus |
|
|
440
|
+
| Notifications | NotificationStack | docyrus |
|
|
441
|
+
| Pricing / quoting | **Pricing Engine Panel** | docyrus |
|
|
442
|
+
| Record sharing | **Record Sharing** | docyrus |
|
|
443
|
+
| Stat dashboards | **AwesomeStats** | docyrus |
|
|
444
|
+
| Pivot table / analytics | **PivotGrid** | docyrus |
|
|
445
|
+
| Activity logging (CRM) | **Log Activity Form** | docyrus |
|
|
446
|
+
| Multi-step wizard | **Stepper** | docyrus |
|
|
447
|
+
|
|
448
|
+
---
|
|
449
|
+
|
|
450
|
+
## When to Use Each Library
|
|
451
|
+
|
|
452
|
+
### Use shadcn when:
|
|
453
|
+
- Building basic forms with standard inputs
|
|
454
|
+
- Creating simple layouts with cards, buttons, badges
|
|
455
|
+
- Need reliable, accessible primitives
|
|
456
|
+
- No special animation or advanced features required
|
|
457
|
+
|
|
458
|
+
### Use diceui when:
|
|
459
|
+
- Building complex data tables with sorting/filtering
|
|
460
|
+
- Need advanced input types (phone, color, tags)
|
|
461
|
+
- Implementing drag-drop (kanban, sortable lists)
|
|
462
|
+
- Creating rich data visualizations (gauges, timelines)
|
|
463
|
+
|
|
464
|
+
### Use animate-ui when:
|
|
465
|
+
- Animation/transitions are important to the design
|
|
466
|
+
- Building navigation with smooth interactions
|
|
467
|
+
- Creating polished dialog/overlay experiences
|
|
468
|
+
- Need animated feedback for user actions
|
|
469
|
+
|
|
470
|
+
### Use docyrus when:
|
|
471
|
+
- Building item create forms (AwesomeDialog, Create Record Dialog)
|
|
472
|
+
- Building item detail views (AwesomeDialog + EditableRecordDetail)
|
|
473
|
+
- Working directly with Docyrus data sources
|
|
474
|
+
- Building forms that map to Docyrus fields (TanStack Form + DynamicFormField)
|
|
475
|
+
- Displaying Docyrus record data in tables/cards
|
|
476
|
+
- Need inline editing with change tracking
|
|
477
|
+
- Building scheduling UIs (Resource Scheduler, Time Slot Scheduler, Gantt, Calendar)
|
|
478
|
+
- Building communication features (Team Chat, Email Composer, Comments Panel)
|
|
479
|
+
- Integrating AI agents (Docyrus Agent with chat/action modes)
|
|
480
|
+
- Need pricing/quoting (Pricing Engine Panel)
|
|
481
|
+
- Need record sharing with permissions (Record Sharing)
|
|
482
|
+
- Need rich item selectors (Mega Select, Kanban)
|
|
483
|
+
- Need Docyrus-specific components (query builder, activity panel, notifications)
|
|
484
|
+
|
|
485
|
+
### Use reui when:
|
|
486
|
+
- The specific component (file upload or sortable) matches your exact need
|
|
487
|
+
- Want a lightweight alternative to diceui versions
|
|
488
|
+
|
|
489
|
+
---
|
|
490
|
+
|
|
491
|
+
## Icon Selection Guide
|
|
492
|
+
|
|
493
|
+
**Priority order for icons**:
|
|
494
|
+
|
|
495
|
+
1. **hugeicons** (first choice)
|
|
496
|
+
- Modern, consistent style
|
|
497
|
+
- Large icon set
|
|
498
|
+
- Use for: All general-purpose icons
|
|
499
|
+
|
|
500
|
+
2. **fontawesome light** (second choice)
|
|
501
|
+
- Professional appearance
|
|
502
|
+
- Familiar to users
|
|
503
|
+
- Use for: When hugeicons doesn't have the needed icon
|
|
504
|
+
|
|
505
|
+
3. **lucide-icons** (third choice)
|
|
506
|
+
- Clean, minimalist style
|
|
507
|
+
- Use for: Fallback when neither hugeicons nor fontawesome have the icon
|
|
508
|
+
|
|
509
|
+
**Example**:
|
|
510
|
+
```tsx
|
|
511
|
+
import { HugeIconDollarCircle } from '@/components/icons/hugeicons'
|
|
512
|
+
import { FaLightChartLine } from '@/components/icons/fontawesome'
|
|
513
|
+
import { LucideActivity } from 'lucide-react'
|
|
514
|
+
|
|
515
|
+
// Prefer hugeicons
|
|
516
|
+
<HugeIconDollarCircle className="h-5 w-5" />
|
|
517
|
+
|
|
518
|
+
// Use fontawesome if not in hugeicons
|
|
519
|
+
<FaLightChartLine className="h-5 w-5" />
|
|
520
|
+
|
|
521
|
+
// Use lucide as fallback
|
|
522
|
+
<LucideActivity className="h-5 w-5" />
|
|
523
|
+
```
|
|
524
|
+
|
|
525
|
+
---
|
|
526
|
+
|
|
527
|
+
## Quick Reference: Component Categories
|
|
528
|
+
|
|
529
|
+
### Dialogs & Item Flows
|
|
530
|
+
- Item create forms: **docyrus AwesomeDialog** (sheet for small, modal for large)
|
|
531
|
+
- Quick record create: **docyrus Create Record Dialog** (popover with subject/mentions)
|
|
532
|
+
- Item detail (small): **docyrus AwesomeDialog** (sheet right)
|
|
533
|
+
- Item detail (large): Dedicated page route
|
|
534
|
+
- Inline editing: **docyrus EditableRecordDetail**
|
|
535
|
+
- Confirmation: animate-ui Alert Dialog
|
|
536
|
+
- Responsive: diceui Responsive Dialog
|
|
537
|
+
|
|
538
|
+
### Data & Display
|
|
539
|
+
- Tables: docyrus Data Grid, diceui Data Table, shadcn Table
|
|
540
|
+
- Pivot table: docyrus PivotGrid (hierarchies, subtotals, drilldown, export)
|
|
541
|
+
- Grid saved views: docyrus Data Grid View Select
|
|
542
|
+
- Cards: docyrus AwesomeCard, shadcn Card
|
|
543
|
+
- Stat dashboards: docyrus AwesomeStats (grid/flex/tabs, mini-charts, comparisons)
|
|
544
|
+
- Charts: shadcn Chart + Recharts
|
|
545
|
+
- Stats: diceui Stat, diceui Gauge, shadcn Progress
|
|
546
|
+
- Gantt: docyrus Gantt
|
|
547
|
+
- Tree: docyrus TreeView
|
|
548
|
+
|
|
549
|
+
### Forms & Input
|
|
550
|
+
- Dynamic forms: **docyrus Form Fields + TanStack Form** (always use)
|
|
551
|
+
- Inline editing: docyrus EditableRecordDetail, EditableValue
|
|
552
|
+
- Text: shadcn Input, Textarea
|
|
553
|
+
- Markdown: docyrus Simple Markdown Editor
|
|
554
|
+
- Selection: shadcn Select, diceui Combobox
|
|
555
|
+
- Rich selection: docyrus Mega Select (grid picker with categories)
|
|
556
|
+
- Radio cards: docyrus Radio Group (card variant with icons/descriptions)
|
|
557
|
+
- Dates: docyrus Date Time Picker, docyrus Date Time Range Picker, shadcn Calendar
|
|
558
|
+
- Files: diceui File Upload
|
|
559
|
+
- Special: diceui Phone Input, Color Picker, Tags Input
|
|
560
|
+
|
|
561
|
+
### Navigation
|
|
562
|
+
- Sidebar: animate-ui Sidebar
|
|
563
|
+
- Menus: animate-ui Dropdown Menu, shadcn Menubar
|
|
564
|
+
- Breadcrumbs: shadcn Breadcrumb
|
|
565
|
+
- Tabs: animate-ui Tabs
|
|
566
|
+
|
|
567
|
+
### Overlays
|
|
568
|
+
- Item forms/details: **docyrus AwesomeDialog** (preferred)
|
|
569
|
+
- Popovers: animate-ui Popover, Tooltip, Hover Card
|
|
570
|
+
- Drawers: shadcn Drawer, animate-ui Sheet
|
|
571
|
+
|
|
572
|
+
### Communication
|
|
573
|
+
- Team chat: docyrus Team Chat Channel (threads, reactions, mentions)
|
|
574
|
+
- Email composing: docyrus Email Composer (To/Cc/Bcc, toolbar, attachments)
|
|
575
|
+
- Comments: docyrus Comments Panel (threaded conversations)
|
|
576
|
+
- Contact activities: docyrus Contact Activity Panel (calls, meetings, emails)
|
|
577
|
+
- Activity logging: docyrus Log Activity Form (calls, emails, meetings, tasks, statuses)
|
|
578
|
+
|
|
579
|
+
### Scheduling
|
|
580
|
+
- Project timelines: docyrus Gantt
|
|
581
|
+
- Resource scheduling: docyrus Resource Scheduler Panel (horizontal timeline)
|
|
582
|
+
- Appointment booking: docyrus Time Slot Scheduler (columns/month views)
|
|
583
|
+
- Calendar events: docyrus Calendar (month/week/day views)
|
|
584
|
+
|
|
585
|
+
### AI & Agents
|
|
586
|
+
- AI chat: docyrus Docyrus Agent (chat mode)
|
|
587
|
+
- AI actions: docyrus Docyrus Agent (action-panel mode)
|
|
588
|
+
- AI trigger: docyrus Docyrus Agent (floating trigger button)
|
|
589
|
+
|
|
590
|
+
### Business Logic
|
|
591
|
+
- Pricing/quoting: docyrus Pricing Engine Panel (line items, VAT, discounts)
|
|
592
|
+
- Record sharing: docyrus Record Sharing (permissions, users/teams/roles)
|
|
593
|
+
|
|
594
|
+
### Specialized
|
|
595
|
+
- Kanban: docyrus Kanban (drag-drop columns)
|
|
596
|
+
- Timeline: diceui Timeline
|
|
597
|
+
- Stepper / wizard: docyrus Stepper (6 variants, horizontal/vertical, animated)
|
|
598
|
+
- Query: docyrus Query Builder
|
|
599
|
+
- Notifications: docyrus NotificationStack
|
|
600
|
+
- Maps: docyrus Map
|
|
601
|
+
- Search: docyrus SearchInput
|
|
602
|
+
- Repeating rows: docyrus SchemaRepeater (dynamic structured data lists)
|