@donotdev/cli 0.0.3 → 0.0.5
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/dependencies-matrix.json +194 -110
- package/dist/bin/commands/bump.d.ts +1 -1
- package/dist/bin/commands/bump.js +103 -96
- package/dist/bin/commands/create-app.js +40 -28
- package/dist/bin/commands/create-project.js +40 -28
- package/dist/bin/commands/format.d.ts +1 -1
- package/dist/bin/commands/lint.d.ts +1 -1
- package/dist/index.js +40 -28
- package/package.json +1 -9
- package/templates/app-demo/src/pages/components/DemoLayout.tsx.example +5 -5
- package/templates/app-demo/src/themes.css.example +108 -156
- package/templates/app-next/src/app/ClientLayout.tsx.example +1 -1
- package/templates/app-next/src/locales/home_en.json.example +6 -0
- package/templates/app-next/src/pages/HomePage.tsx.example +152 -8
- package/templates/app-next/src/themes.css.example +92 -140
- package/templates/app-vite/src/App.tsx.example +3 -3
- package/templates/app-vite/src/locales/home_en.json.example +6 -0
- package/templates/app-vite/src/pages/HomePage.tsx.example +149 -8
- package/templates/app-vite/src/themes.css.example +90 -138
- package/templates/root-consumer/guides/AGENT_START_HERE.md.example +297 -53
- package/templates/root-consumer/guides/COMPONENTS_ADV.md.example +360 -0
- package/templates/root-consumer/guides/COMPONENTS_ATOMIC.md.example +134 -0
- package/templates/root-consumer/guides/COMPONENTS_CRUD.md.example +70 -0
- package/templates/root-consumer/guides/COMPONENTS_UI.md.example +141 -0
- package/templates/root-consumer/guides/ENV_SETUP.md.example +14 -0
- package/templates/root-consumer/guides/INDEX.md.example +17 -25
- package/templates/root-consumer/guides/SETUP_AUTH.md.example +77 -0
- package/templates/root-consumer/guides/SETUP_BILLING.md.example +78 -0
- package/templates/root-consumer/guides/SETUP_FUNCTIONS.md.example +62 -0
- package/templates/root-consumer/guides/SETUP_I18N.md.example +187 -0
- package/templates/root-consumer/guides/SETUP_LAYOUTS.md.example +126 -0
- package/templates/root-consumer/guides/SETUP_OAUTH.md.example +53 -0
- package/templates/root-consumer/guides/SETUP_PAGES.md.example +120 -0
- package/templates/root-consumer/guides/SETUP_THEMES.md.example +107 -0
- package/templates/root-consumer/guides/advanced/COOKIE_REFERENCE.md.example +252 -0
- package/templates/root-consumer/guides/{EMULATOR_SETUP.md.example → advanced/EMULATORS.md.example} +1 -1
- package/templates/root-consumer/guides/{VERSION_CONTROL.md.example → advanced/VERSION_CONTROL.md.example} +0 -7
- package/templates/root-consumer/guides/AUTH_SETUP.md.example +0 -92
- package/templates/root-consumer/guides/BILLING_SETUP.md.example +0 -120
- package/templates/root-consumer/guides/CLI.md.example +0 -293
- package/templates/root-consumer/guides/COMPONENTS.md.example +0 -875
- package/templates/root-consumer/guides/FEATURES.md.example +0 -286
- package/templates/root-consumer/guides/FRAMEWORK_OVERVIEW.md.example +0 -97
- package/templates/root-consumer/guides/FUNCTIONS.md.example +0 -177
- package/templates/root-consumer/guides/GETTING_STARTED.md.example +0 -451
- package/templates/root-consumer/guides/HOW_TO_USE.md.example +0 -296
- package/templates/root-consumer/guides/I18N_SETUP.md.example +0 -204
- package/templates/root-consumer/guides/IMPORT_PATTERNS.md.example +0 -79
- package/templates/root-consumer/guides/INSTALLATION.md.example +0 -296
- package/templates/root-consumer/guides/LAYOUTS.md.example +0 -310
- package/templates/root-consumer/guides/PAGES_SETUP.md.example +0 -123
- package/templates/root-consumer/guides/STYLING.md.example +0 -273
- package/templates/root-consumer/guides/THEMING_SETUP.md.example +0 -119
- /package/templates/root-consumer/guides/{CONFIG_SETUP.md.example → SETUP_APP_CONFIG.md.example} +0 -0
- /package/templates/root-consumer/guides/{APP_CHECK_SETUP.md.example → advanced/APP_CHECK.md.example} +0 -0
|
@@ -0,0 +1,360 @@
|
|
|
1
|
+
# Advanced Components (@donotdev/adv-comps)
|
|
2
|
+
|
|
3
|
+
High-level, opinionated, and marketing-focused UI components for DoNotDev framework.
|
|
4
|
+
|
|
5
|
+
## Setup
|
|
6
|
+
|
|
7
|
+
**IMPORTANT:** You must import the styles in your `globals.css` file:
|
|
8
|
+
|
|
9
|
+
```css
|
|
10
|
+
@import '@donotdev/adv-comps/styles';
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Without this import, components will not have their required CSS styles.
|
|
14
|
+
|
|
15
|
+
## Components
|
|
16
|
+
|
|
17
|
+
### Crawl
|
|
18
|
+
|
|
19
|
+
Cinematic 3D text crawl component with lazy loading.
|
|
20
|
+
|
|
21
|
+
```tsx
|
|
22
|
+
import { Crawl } from '@donotdev/adv-comps';
|
|
23
|
+
|
|
24
|
+
<Crawl
|
|
25
|
+
intro?: ReactNode | string
|
|
26
|
+
title?: ReactNode | string
|
|
27
|
+
content: ReactNode | string | string[]
|
|
28
|
+
duration?: number // @default 26
|
|
29
|
+
contentHeight?: string // @default "150vh"
|
|
30
|
+
tiltAngle?: number
|
|
31
|
+
className?: string
|
|
32
|
+
style?: CSSProperties
|
|
33
|
+
aria-label?: string
|
|
34
|
+
/>
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### Marquee
|
|
38
|
+
|
|
39
|
+
Production-grade marquee with accessibility, reduced motion support, and smart behavior detection.
|
|
40
|
+
|
|
41
|
+
```tsx
|
|
42
|
+
import { Marquee } from '@donotdev/adv-comps';
|
|
43
|
+
|
|
44
|
+
<Marquee<T>
|
|
45
|
+
items: T[]
|
|
46
|
+
renderItem: (item: T, index: number) => ReactNode
|
|
47
|
+
className?: string
|
|
48
|
+
itemClassName?: string
|
|
49
|
+
gap?: 'none' | 'tight' | 'medium' | 'large' // @default 'medium'
|
|
50
|
+
speed?: number // px per second
|
|
51
|
+
direction?: 'left' | 'right' | 'up' | 'down' | 'auto' // @default 'auto'
|
|
52
|
+
pauseOnHover?: boolean
|
|
53
|
+
ariaLabel?: string
|
|
54
|
+
reducedMotion?: 'respect' | 'ignore'
|
|
55
|
+
behavior?: 'bounce' | 'infinite' | 'auto'
|
|
56
|
+
pauseOnFocusWithin?: boolean
|
|
57
|
+
easing?: 'linear' | 'ease-in-out' | 'ease-out'
|
|
58
|
+
/>
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### Roadmap
|
|
62
|
+
|
|
63
|
+
Timeline component with horizontal (desktop) / vertical (mobile) layout. Features animated progress line, glowing nodes, and lift-on-hover cards.
|
|
64
|
+
|
|
65
|
+
```tsx
|
|
66
|
+
import { Roadmap } from '@donotdev/adv-comps';
|
|
67
|
+
import type { RoadmapStep } from '@donotdev/adv-comps';
|
|
68
|
+
|
|
69
|
+
<Roadmap
|
|
70
|
+
steps: RoadmapStep[]
|
|
71
|
+
className?: string
|
|
72
|
+
variant?: CardVariant // @default 'default'
|
|
73
|
+
/>
|
|
74
|
+
|
|
75
|
+
// RoadmapStep interface:
|
|
76
|
+
interface RoadmapStep {
|
|
77
|
+
phase: string // e.g., "Week 1", "Days 1-2"
|
|
78
|
+
icon: LucideIcon
|
|
79
|
+
title: string
|
|
80
|
+
subtitle: string
|
|
81
|
+
description?: string
|
|
82
|
+
content?: CardContent // Optional content shown in popover on click
|
|
83
|
+
}
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
### StackedCards
|
|
87
|
+
|
|
88
|
+
Simple scroll-reveal stacked cards. Active card shows full content, stacked cards show only bottom edge with number.
|
|
89
|
+
|
|
90
|
+
```tsx
|
|
91
|
+
import { StackedCards } from '@donotdev/adv-comps';
|
|
92
|
+
import type { StackedCardData } from '@donotdev/adv-comps';
|
|
93
|
+
|
|
94
|
+
<StackedCards
|
|
95
|
+
items: StackedCardData[]
|
|
96
|
+
variant?: SurfaceVariantProps['variant']
|
|
97
|
+
ariaLabel?: string
|
|
98
|
+
threshold?: number // Intersection threshold (0.0 - 1.0) @default 0.3
|
|
99
|
+
className?: string
|
|
100
|
+
style?: CSSProperties
|
|
101
|
+
/>
|
|
102
|
+
|
|
103
|
+
// StackedCardData extends ComponentData with:
|
|
104
|
+
interface StackedCardData extends ComponentData {
|
|
105
|
+
number?: string | number // Custom number/label (e.g. "01", "Week 1"). Defaults to index.
|
|
106
|
+
}
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
### Reveal
|
|
110
|
+
|
|
111
|
+
Reveal component for staggered animations. Features viewport-based visibility detection, directional animations, and customizable stagger delays.
|
|
112
|
+
|
|
113
|
+
```tsx
|
|
114
|
+
import { Reveal } from '@donotdev/adv-comps';
|
|
115
|
+
|
|
116
|
+
<Reveal
|
|
117
|
+
items: string[] | ReactNode[]
|
|
118
|
+
direction?: 'left' | 'right' | 'top' | 'bottom' | 'fade-in' | 'alternate-h' | 'alternate-v'
|
|
119
|
+
stagger?: number // milliseconds between items
|
|
120
|
+
threshold?: number
|
|
121
|
+
distance?: number // animation distance in pixels
|
|
122
|
+
duration?: number // animation duration in milliseconds
|
|
123
|
+
once?: boolean // if true, only animate once
|
|
124
|
+
viewport?: boolean // if true, only animate items in viewport
|
|
125
|
+
overrides?: Array<{
|
|
126
|
+
index: number
|
|
127
|
+
direction: 'left' | 'right' | 'top' | 'bottom' | 'fade-in'
|
|
128
|
+
}>
|
|
129
|
+
className?: string
|
|
130
|
+
children?: ReactNode
|
|
131
|
+
/>
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
### InspectorGadget
|
|
135
|
+
|
|
136
|
+
Floating code inspector component. Displays a floating eye icon button that opens a dialog showing the page's source code.
|
|
137
|
+
|
|
138
|
+
```tsx
|
|
139
|
+
import { InspectorGadget } from '@donotdev/adv-comps';
|
|
140
|
+
|
|
141
|
+
<InspectorGadget
|
|
142
|
+
data?: string // Source code string
|
|
143
|
+
sourcePath?: string // Path to source file (import with ?raw) - overrides data if provided
|
|
144
|
+
sourceCode?: string // Source code loaded from file
|
|
145
|
+
language?: string // Code language for syntax highlighting @default 'tsx'
|
|
146
|
+
title?: string // Dialog title @default 'Page Source'
|
|
147
|
+
className?: string
|
|
148
|
+
/>
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
### Breathing Components
|
|
152
|
+
|
|
153
|
+
Breathing exercise components for meditation and wellness apps.
|
|
154
|
+
|
|
155
|
+
```tsx
|
|
156
|
+
import { LungsAnimation, BreathingExerciseLayout } from '@donotdev/adv-comps';
|
|
157
|
+
import type { BreathingExerciseDnDevLayoutProps } from '@donotdev/adv-comps';
|
|
158
|
+
|
|
159
|
+
<BreathingExerciseLayout
|
|
160
|
+
status?: ReactNode
|
|
161
|
+
animation: ReactNode
|
|
162
|
+
instructions: ReactNode
|
|
163
|
+
debug?: boolean
|
|
164
|
+
onSkip?: () => void
|
|
165
|
+
statusValue?: string
|
|
166
|
+
onRestart?: () => void
|
|
167
|
+
isPaused?: boolean
|
|
168
|
+
isComplete?: boolean
|
|
169
|
+
/>
|
|
170
|
+
|
|
171
|
+
<LungsAnimation ... />
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
### Carousel
|
|
175
|
+
|
|
176
|
+
Premium carousel component with lazy loading built-in. Features true infinite circular loop, hardware-accelerated animations, swipe/touch gestures, and autoplay with pause-on-hover.
|
|
177
|
+
|
|
178
|
+
```tsx
|
|
179
|
+
import { Carousel } from '@donotdev/adv-comps';
|
|
180
|
+
import type { CarouselProps, CarouselRef } from '@donotdev/adv-comps';
|
|
181
|
+
|
|
182
|
+
<Carousel<T>
|
|
183
|
+
items: T[]
|
|
184
|
+
renderItem: (item: T, index: number, isActive: boolean) => ReactNode
|
|
185
|
+
className?: string
|
|
186
|
+
slideClassName?: string
|
|
187
|
+
showArrows?: boolean
|
|
188
|
+
showDots?: boolean
|
|
189
|
+
showProgress?: boolean
|
|
190
|
+
autoplay?: boolean
|
|
191
|
+
autoplayInterval?: number // milliseconds
|
|
192
|
+
transitionDuration?: number // milliseconds
|
|
193
|
+
loop?: boolean
|
|
194
|
+
// ... and more props
|
|
195
|
+
/>
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
### ComparisonGrid
|
|
199
|
+
|
|
200
|
+
Comparison grid component for displaying feature comparisons. Provides lazy-loaded content with skeleton loading states.
|
|
201
|
+
|
|
202
|
+
```tsx
|
|
203
|
+
import { ComparisonGrid } from '@donotdev/adv-comps';
|
|
204
|
+
import type { ComparisonItem } from '@donotdev/adv-comps';
|
|
205
|
+
|
|
206
|
+
<ComparisonGrid
|
|
207
|
+
title?: string
|
|
208
|
+
items: ComparisonItem[]
|
|
209
|
+
gridCols?: 1 | 2 | 3 | 4 // @default 2
|
|
210
|
+
className?: string
|
|
211
|
+
ariaLabel?: string
|
|
212
|
+
/>
|
|
213
|
+
|
|
214
|
+
// ComparisonItem interface:
|
|
215
|
+
interface ComparisonItem {
|
|
216
|
+
useCase: string
|
|
217
|
+
bestFit: string
|
|
218
|
+
dndev: string
|
|
219
|
+
reason: string
|
|
220
|
+
}
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
### CongratulationsCard
|
|
224
|
+
|
|
225
|
+
Card component for displaying congratulatory messages. Features customizable icon and text with centered layout.
|
|
226
|
+
|
|
227
|
+
```tsx
|
|
228
|
+
import { CongratulationsCard } from '@donotdev/adv-comps';
|
|
229
|
+
|
|
230
|
+
<CongratulationsCard
|
|
231
|
+
text: string
|
|
232
|
+
icon?: ReactNode // @default '🎉'
|
|
233
|
+
className?: string
|
|
234
|
+
/>
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
### GuideModal
|
|
238
|
+
|
|
239
|
+
Modal component for displaying guides and tutorials. Provides step-by-step guide display with navigation, progress tracking, and completion handling.
|
|
240
|
+
|
|
241
|
+
```tsx
|
|
242
|
+
import { GuideModal } from '@donotdev/adv-comps';
|
|
243
|
+
import type { GuideModalProps, GuideTemplate } from '@donotdev/adv-comps';
|
|
244
|
+
|
|
245
|
+
<GuideModal
|
|
246
|
+
open: boolean
|
|
247
|
+
onOpenChange: (open: boolean) => void
|
|
248
|
+
guide: GuideTemplate
|
|
249
|
+
icon?: LucideIcon
|
|
250
|
+
/>
|
|
251
|
+
|
|
252
|
+
// GuideTemplate interface:
|
|
253
|
+
interface GuideTemplate {
|
|
254
|
+
title: string
|
|
255
|
+
subtitle: string
|
|
256
|
+
quickStart?: {
|
|
257
|
+
title: string
|
|
258
|
+
code: string
|
|
259
|
+
description: string
|
|
260
|
+
}
|
|
261
|
+
steps?: GuideStep[]
|
|
262
|
+
features?: string[]
|
|
263
|
+
templates?: Array<{
|
|
264
|
+
name: string
|
|
265
|
+
description: string
|
|
266
|
+
}>
|
|
267
|
+
actions?: Array<{
|
|
268
|
+
label: string
|
|
269
|
+
href: string
|
|
270
|
+
variant?: 'default' | 'outline'
|
|
271
|
+
icon?: LucideIcon
|
|
272
|
+
}>
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
// GuideStep interface:
|
|
276
|
+
interface GuideStep {
|
|
277
|
+
icon: LucideIcon
|
|
278
|
+
title: string
|
|
279
|
+
description: string
|
|
280
|
+
code?: string
|
|
281
|
+
details?: string
|
|
282
|
+
}
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
### SplitReveal
|
|
286
|
+
|
|
287
|
+
Split reveal component for displaying content in two columns. Features left column content and right column stat cards or custom content with reveal animations.
|
|
288
|
+
|
|
289
|
+
```tsx
|
|
290
|
+
import { SplitReveal } from '@donotdev/adv-comps';
|
|
291
|
+
import type { StatCardData } from '@donotdev/adv-comps';
|
|
292
|
+
|
|
293
|
+
<SplitReveal
|
|
294
|
+
left: ReactNode
|
|
295
|
+
right: ReactNode | StatCardData[]
|
|
296
|
+
leftDirection?: 'left' | 'right' | 'top' | 'bottom' | 'fade-in' // @default 'left'
|
|
297
|
+
rightDirection?: 'left' | 'right' | 'top' | 'bottom' | 'fade-in' // @default 'right'
|
|
298
|
+
threshold?: number // @default 0.3
|
|
299
|
+
className?: string
|
|
300
|
+
/>
|
|
301
|
+
|
|
302
|
+
// StatCardData interface:
|
|
303
|
+
interface StatCardData {
|
|
304
|
+
title: string
|
|
305
|
+
description: string
|
|
306
|
+
}
|
|
307
|
+
```
|
|
308
|
+
|
|
309
|
+
### StartChallengeForm
|
|
310
|
+
|
|
311
|
+
Generic form layout component for input + CTA button patterns.
|
|
312
|
+
|
|
313
|
+
```tsx
|
|
314
|
+
import { StartChallengeForm } from '@donotdev/adv-comps';
|
|
315
|
+
|
|
316
|
+
<StartChallengeForm
|
|
317
|
+
input={{
|
|
318
|
+
value: string
|
|
319
|
+
onChange: (value: string) => void
|
|
320
|
+
placeholder?: string
|
|
321
|
+
label?: string
|
|
322
|
+
maxLength?: number
|
|
323
|
+
className?: string
|
|
324
|
+
}}
|
|
325
|
+
button={{
|
|
326
|
+
label: string
|
|
327
|
+
onClick: () => void
|
|
328
|
+
icon?: ComponentType<{ className?: string }>
|
|
329
|
+
variant?: ButtonVariant
|
|
330
|
+
className?: string
|
|
331
|
+
}}
|
|
332
|
+
size?: 'sm' | 'md' | 'lg'
|
|
333
|
+
className?: string
|
|
334
|
+
/>
|
|
335
|
+
```
|
|
336
|
+
|
|
337
|
+
### Waterfall
|
|
338
|
+
|
|
339
|
+
Waterfall component with lazy loading built-in. Features clean cascade layout with diagonal staircase effect, perfect for step-by-step processes or feature showcases.
|
|
340
|
+
|
|
341
|
+
```tsx
|
|
342
|
+
import { Waterfall } from '@donotdev/adv-comps';
|
|
343
|
+
import type { WaterfallProps } from '@donotdev/adv-comps';
|
|
344
|
+
|
|
345
|
+
<Waterfall
|
|
346
|
+
items: ComponentData[]
|
|
347
|
+
className?: string
|
|
348
|
+
connectorClassName?: string
|
|
349
|
+
density?: 'compact' | 'comfortable'
|
|
350
|
+
ariaLabel?: string
|
|
351
|
+
direction?: 'horizontal' | 'descending'
|
|
352
|
+
/>
|
|
353
|
+
```
|
|
354
|
+
|
|
355
|
+
## Notes
|
|
356
|
+
|
|
357
|
+
- All components are lazy-loaded by default for optimal performance
|
|
358
|
+
- Components use framework theme variables for consistent styling
|
|
359
|
+
- Most components support reduced motion preferences
|
|
360
|
+
- All components are SSR-safe and work with both Vite and Next.js
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
# Component Reference
|
|
2
|
+
|
|
3
|
+
**Check JSDoc in your IDE** - Hover over any component import to see props, types, and examples.
|
|
4
|
+
|
|
5
|
+
**Import from:** `@donotdev/components` (atomic UI)
|
|
6
|
+
|
|
7
|
+
**This is your GOTO Semantic React package**
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## Layout Components
|
|
12
|
+
|
|
13
|
+
These are the only ways one should handle layout to get to quick results functionality wide.
|
|
14
|
+
- **Section** - Layout section with title, grid, and tone system for organizing content.
|
|
15
|
+
- **Grid** - CSS Grid layout primitive with responsive column control.
|
|
16
|
+
- **Stack** - Flexbox layout for arranging items in rows or columns.
|
|
17
|
+
- **HeroSection** - Hero banner section with title, subtitle, and gradient backgrounds.
|
|
18
|
+
- **CallToAction** - Conversion-focused section with primary and secondary actions.
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## Content Components
|
|
23
|
+
|
|
24
|
+
- **Card** - Premium card component with title, content, footer, and elevation variants.
|
|
25
|
+
- **DualCard** - Side-by-side card layout for comparison or feature showcases.
|
|
26
|
+
- **Text** - Typography component with semantic text variants.
|
|
27
|
+
- **Blockquote** - Styled blockquote for citations and testimonials.
|
|
28
|
+
- **List** - Bullet points, numbered lists, and feature lists with zero CSS. Use `icon` prop for custom icons, `icon={null}` for plain bullets.
|
|
29
|
+
- **DescriptionList** - Key-value pairs and metadata using semantic HTML (dl, dt, dd).
|
|
30
|
+
- **Separator** - Visual separator with semantic styling variants.
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## Action Components
|
|
35
|
+
|
|
36
|
+
- **Button** - Accessible button with variants, icons, tooltips, and render prop composition.
|
|
37
|
+
- **ActionButton** - Button with async action handling and loading states.
|
|
38
|
+
- **FileButton** - Button that triggers file input selection.
|
|
39
|
+
- **PortalButton** - Button that opens content in a portal overlay.
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## Form Components
|
|
44
|
+
|
|
45
|
+
- **Input** - Accessible input with mobile-friendly touch targets and key state styling.
|
|
46
|
+
- **PasswordInput** - Password field with show/hide toggle functionality.
|
|
47
|
+
- **Textarea** - Multi-line text input component.
|
|
48
|
+
- **Label** - Accessible label with icon support and various positions.
|
|
49
|
+
- **Checkbox** - Accessible checkbox with custom styling.
|
|
50
|
+
- **RadioGroup** - Accessible radio group with multiple visual variants.
|
|
51
|
+
- **Select** - Accessible select dropdown with search and multi-select support.
|
|
52
|
+
- **Combobox** - Searchable combobox with autocomplete functionality.
|
|
53
|
+
- **Switch** - Toggle switch component.
|
|
54
|
+
- **Slider** - Range slider for numeric input.
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## Feedback Components
|
|
59
|
+
|
|
60
|
+
- **Alert** - Attention-grabbing alert with semantic variants and icons.
|
|
61
|
+
- **AlertDialog** - Modal dialog that interrupts with important content expecting a response.
|
|
62
|
+
- **Dialog** - Accessible modal dialog with custom content sizes and actions.
|
|
63
|
+
- **Toast** - Toast notifications via Toaster component with ToastProvider.
|
|
64
|
+
- **Skeleton** - Loading state skeleton with multiple animation variants.
|
|
65
|
+
- **Spinner** - Loading spinner with multiple sizes and theme-aware colors.
|
|
66
|
+
- **Progress** - Progress bar component for task completion.
|
|
67
|
+
|
|
68
|
+
---
|
|
69
|
+
|
|
70
|
+
## Navigation Components
|
|
71
|
+
|
|
72
|
+
- **Tabs** - Tabbed interface with props-based API and full keyboard navigation.
|
|
73
|
+
- **Accordion** - Vertically stacked headings that reveal content sections.
|
|
74
|
+
- **NavigationMenu** - Props-based navigation menu with nested menus and rich content.
|
|
75
|
+
- **Pagination** - Accessible pagination with page number generation and ellipsis.
|
|
76
|
+
- **Command** - Command palette component for keyboard navigation and search.
|
|
77
|
+
- **CommandDialog** - Command palette dialog optimized for Cmd+K navigation.
|
|
78
|
+
|
|
79
|
+
---
|
|
80
|
+
|
|
81
|
+
## Overlay Components
|
|
82
|
+
|
|
83
|
+
- **Popover** - Accessible popover displaying rich content in a portal.
|
|
84
|
+
- **Tooltip** - Tooltip component with positioning and delay controls.
|
|
85
|
+
- **HoverCard** - Card that appears on hover with rich content.
|
|
86
|
+
- **Sheet** - Slide-out panel for sidebars, mobile navigation, or editing panels.
|
|
87
|
+
- **ContextMenu** - Right-click context menu with nested submenus.
|
|
88
|
+
- **DropdownMenu** - Professional dropdown menu with props-based API.
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
## Data Display Components
|
|
93
|
+
|
|
94
|
+
- **Table** - Accessible table component with sorting and selection.
|
|
95
|
+
- **DataTable** - High-level table with built-in sorting, filtering, search, and pagination.
|
|
96
|
+
- **Avatar** - Accessible avatar with image and fallback support.
|
|
97
|
+
- **Badge** - Status indicator with semantic variants (polymorphic: div, span, mark).
|
|
98
|
+
- **Tag** - Tag component for labels and categories.
|
|
99
|
+
- **Calendar** - Accessible date picker built on react-day-picker.
|
|
100
|
+
|
|
101
|
+
---
|
|
102
|
+
|
|
103
|
+
## Utility Components
|
|
104
|
+
|
|
105
|
+
- **Collapsible** - Collapsible content component.
|
|
106
|
+
- **Toggle** - Toggle button component.
|
|
107
|
+
- **ToggleGroup** - Group of toggle buttons.
|
|
108
|
+
- **ScrollArea** - Scrollable area with custom scrollbars.
|
|
109
|
+
- **Portal** - Portal component for rendering outside DOM hierarchy.
|
|
110
|
+
- **VisuallyHidden** - Screen reader-only content component.
|
|
111
|
+
- **Slot** - Slot component for composition patterns.
|
|
112
|
+
|
|
113
|
+
---
|
|
114
|
+
|
|
115
|
+
## Advanced Components
|
|
116
|
+
|
|
117
|
+
- **InfiniteScroll** - Infinite scroll component with load more functionality.
|
|
118
|
+
- **Stepper** - Step-by-step workflow component with navigation controls.
|
|
119
|
+
- **CopyToClipboard** - Copy to clipboard with visual feedback.
|
|
120
|
+
- **VideoPlayer** - Video player component with controls.
|
|
121
|
+
- **FeatureFallback** - Fallback UI when features are unavailable.
|
|
122
|
+
|
|
123
|
+
---
|
|
124
|
+
|
|
125
|
+
## Icons
|
|
126
|
+
|
|
127
|
+
- **Icons** - Icon components from lucide-react and custom partner icons.
|
|
128
|
+
|
|
129
|
+
---
|
|
130
|
+
|
|
131
|
+
**See also:** [COMPONENTS_UI.md](./COMPONENTS_UI.md) for layout/composition components | [COMPONENTS_CRUD.md](./COMPONENTS_CRUD.md) for CRUD operations and entity forms
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
**All props documented in JSDoc** - Hover in IDE for complete reference.
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# CRUD Package Reference
|
|
2
|
+
|
|
3
|
+
**Check JSDoc in your IDE** - Hover over any component import to see props, types, and examples.
|
|
4
|
+
|
|
5
|
+
**Import from:** `@donotdev/crud` (CRUD operations and forms)
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Core Hook
|
|
10
|
+
|
|
11
|
+
- **useCrud** - React hook for CRUD operations (create, read, update, delete, query) with automatic validation and backend abstraction.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Service
|
|
16
|
+
|
|
17
|
+
- **getCrudService** - Get CrudService singleton instance for direct service access.
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## Form Components
|
|
22
|
+
|
|
23
|
+
- **EntityFormRenderer** - Renders complete entity forms with automatic field mapping.
|
|
24
|
+
- **FormFieldRenderer** - Renders individual form fields based on schema.
|
|
25
|
+
- **FormLayout** - Form layout component with spacing and structure.
|
|
26
|
+
- **CrudButton** - Button component integrated with CRUD operations.
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## Form Field Components
|
|
31
|
+
|
|
32
|
+
- **TextFieldComponent** - Text input field component.
|
|
33
|
+
- **NumberFieldComponent** - Number input field component.
|
|
34
|
+
- **TextAreaComponent** - Textarea input field component.
|
|
35
|
+
- **PasswordFieldComponent** - Password input field component.
|
|
36
|
+
- **DateFieldComponent** - Date picker field component.
|
|
37
|
+
- **CheckboxFieldComponent** - Checkbox field component.
|
|
38
|
+
- **RadioFieldComponent** - Radio button field component.
|
|
39
|
+
- **DropdownComponent** - Single-select dropdown field component.
|
|
40
|
+
- **MultiDropdownComponent** - Multi-select dropdown field component.
|
|
41
|
+
- **FileFieldComponent** - File upload field component.
|
|
42
|
+
- **ImageFieldComponent** - Image upload field component.
|
|
43
|
+
- **AvatarFieldComponent** - Avatar upload field component.
|
|
44
|
+
- **BadgeFieldComponent** - Badge display/input field component.
|
|
45
|
+
- **PhoneNumberComponent** - Phone number input field component.
|
|
46
|
+
- **GeoPointFieldComponent** - Geographic point input field component.
|
|
47
|
+
- **MapFieldComponent** - Map picker field component.
|
|
48
|
+
- **TimestampFieldComponent** - Timestamp input field component.
|
|
49
|
+
- **ReferenceFieldComponent** - Reference/link field component.
|
|
50
|
+
- **MultiInputTextFieldComponent** - Multiple text inputs field component.
|
|
51
|
+
- **ButtonFieldComponent** - Button field component.
|
|
52
|
+
- **HiddenFieldComponent** - Hidden field component.
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## Controlled Fields
|
|
57
|
+
|
|
58
|
+
- **ControlledFields** - Controlled form field components with validation.
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
## Utilities
|
|
63
|
+
|
|
64
|
+
- **loadDeterministicRange** - Load deterministic range from collections.
|
|
65
|
+
- **upsertDeterministic** - Upsert with deterministic ID.
|
|
66
|
+
- **appendToCollection** - Append item to collection.
|
|
67
|
+
|
|
68
|
+
---
|
|
69
|
+
|
|
70
|
+
**All props documented in JSDoc** - Hover in IDE for complete reference.
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
# UI Package Reference
|
|
2
|
+
|
|
3
|
+
**Check JSDoc in your IDE** - Hover over any component import to see props, types, and examples.
|
|
4
|
+
|
|
5
|
+
**Import from:** `@donotdev/ui` (layout/composition components)
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Layout Components
|
|
10
|
+
|
|
11
|
+
- **PageContainer** - Page wrapper with width constraints, spacing, and density system.
|
|
12
|
+
- **GameContainer** - Game preset container with fixed header/footer layout.
|
|
13
|
+
- **GameFlow** - Game flow component for step-by-step game interfaces.
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Layout Sub-Components
|
|
18
|
+
|
|
19
|
+
- **AppBranding** - App branding display with logo and name.
|
|
20
|
+
- **AppIcon** - App icon component.
|
|
21
|
+
- **AppTitle** - App title display component.
|
|
22
|
+
- **GameTitle** - Game title component for game preset.
|
|
23
|
+
- **Breadcrumbs** - Breadcrumb navigation component.
|
|
24
|
+
- **HeaderNavigation** - Header navigation menu component.
|
|
25
|
+
- **DropdownNavigation** - Dropdown navigation menu.
|
|
26
|
+
- **HeaderMenu** - Header menu component.
|
|
27
|
+
- **SettingsMenu** - Settings menu component.
|
|
28
|
+
- **ThemeToggle** - Theme toggle button component.
|
|
29
|
+
- **CacheSettings** - Cache settings component.
|
|
30
|
+
- **Notifications** - Notifications component.
|
|
31
|
+
- **FloatingLanguageSwitcher** - Floating language selector component.
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## Auth Components
|
|
36
|
+
|
|
37
|
+
- **AuthHeader** - Header component with authentication UI (sign in/out, user menu).
|
|
38
|
+
- **AuthMenu** - Authentication menu component.
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## Helpers
|
|
43
|
+
|
|
44
|
+
- **tList(t, key, count, icon?, size?)** - Translated array as List. Default: CheckCircle icon. Pass `null` for no icon (use with emoji labels).
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
## Common Components
|
|
49
|
+
|
|
50
|
+
- **AppLoading** - App-level loading component.
|
|
51
|
+
- **FeatureDisabled** - Component shown when features are disabled.
|
|
52
|
+
- **Icon** - Icon component wrapper.
|
|
53
|
+
- **Loader** - Loading spinner component.
|
|
54
|
+
- **LoadingMessage** - Loading message with variants (processing, saving, uploading, etc.).
|
|
55
|
+
- **LoadingOverlay** - Overlay component for loading states.
|
|
56
|
+
- **LoadingScreen** - Full-screen loading component.
|
|
57
|
+
- **ProgressBar** - Progress bar component.
|
|
58
|
+
- **Skeleton** - Skeleton loading component.
|
|
59
|
+
- **FeatureCard** - Feature showcase card component.
|
|
60
|
+
- **TechBento** - Tech stack showcase component.
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## Routing Components
|
|
65
|
+
|
|
66
|
+
- **Link** - Platform-agnostic link component (works in Vite + Next.js).
|
|
67
|
+
- **AuthGuard** - Route guard component for protected routes.
|
|
68
|
+
- **AuthGuardFallback** - Fallback component for auth-guarded routes.
|
|
69
|
+
- **GoTo** - Programmatic navigation component.
|
|
70
|
+
- **GoToWrapper** - Wrapper for GoTo navigation.
|
|
71
|
+
- **GoToInput** - Input component for GoTo navigation.
|
|
72
|
+
- **GoToDialog** - Dialog for GoTo navigation.
|
|
73
|
+
- **DnDevNavigationMenu** - Framework navigation menu component.
|
|
74
|
+
- **NotFoundPage** - 404 page component.
|
|
75
|
+
|
|
76
|
+
---
|
|
77
|
+
|
|
78
|
+
## Routing Hooks
|
|
79
|
+
|
|
80
|
+
- **useNavigate** - Navigate to routes programmatically.
|
|
81
|
+
- **useBack** - Navigate back in history.
|
|
82
|
+
- **useRefresh** - Refresh current route.
|
|
83
|
+
- **usePrefetch** - Prefetch route data.
|
|
84
|
+
- **useLocation** - Get current location.
|
|
85
|
+
- **useParams** - Get route parameters.
|
|
86
|
+
- **useSearchParams** - Get URL search parameters.
|
|
87
|
+
- **useMatch** - Match current route pattern.
|
|
88
|
+
- **useQueryParams** - Get and set query parameters.
|
|
89
|
+
- **useRedirectGuard** - Guard against redirects.
|
|
90
|
+
- **useNavigation** - Navigation state and methods.
|
|
91
|
+
- **useGoTo** - GoTo navigation hook.
|
|
92
|
+
- **useRouteDiscovery** - Route discovery hook.
|
|
93
|
+
|
|
94
|
+
---
|
|
95
|
+
|
|
96
|
+
## Cookie Consent
|
|
97
|
+
|
|
98
|
+
- **CookieConsent** - Cookie consent management component.
|
|
99
|
+
- **ConsentBanner** - Cookie consent banner component.
|
|
100
|
+
|
|
101
|
+
---
|
|
102
|
+
|
|
103
|
+
## Platform-Specific Providers
|
|
104
|
+
|
|
105
|
+
- **ViteAppProviders** - App providers for Vite (import from `@donotdev/ui/vite`).
|
|
106
|
+
- **NextJsAppProviders** - App providers for Next.js (import from `@donotdev/ui/next`).
|
|
107
|
+
|
|
108
|
+
---
|
|
109
|
+
|
|
110
|
+
## CRUD Display Components (from @donotdev/ui)
|
|
111
|
+
|
|
112
|
+
- **DisplayFieldRenderer** - Renders read-only field displays.
|
|
113
|
+
- **EntityDisplayRenderer** - Renders complete entity displays.
|
|
114
|
+
- **TextFieldDisplay** - Text field display component.
|
|
115
|
+
- **BadgeFieldDisplay** - Badge field display component.
|
|
116
|
+
- **AvatarFieldDisplay** - Avatar field display component.
|
|
117
|
+
- **LinkFieldDisplay** - Link field display component.
|
|
118
|
+
- **DateFieldDisplay** - Date field display component.
|
|
119
|
+
- **NumberFieldDisplay** - Number field display component.
|
|
120
|
+
- **PhoneNumberDisplay** - Phone number display component.
|
|
121
|
+
- **TextAreaDisplay** - Textarea display component.
|
|
122
|
+
- **CheckboxFieldDisplay** - Checkbox display component.
|
|
123
|
+
- **DropdownDisplay** - Dropdown display component.
|
|
124
|
+
- **MultiDropdownDisplay** - Multi-select dropdown display component.
|
|
125
|
+
- **MultiInputTextFieldDisplay** - Multi-input text field display component.
|
|
126
|
+
- **RadioFieldDisplay** - Radio field display component.
|
|
127
|
+
- **RangeFieldDisplay** - Range field display component.
|
|
128
|
+
- **FileFieldDisplay** - File field display component.
|
|
129
|
+
- **ImageFieldDisplay** - Image field display component.
|
|
130
|
+
- **GeoPointFieldDisplay** - GeoPoint field display component.
|
|
131
|
+
- **MapFieldDisplay** - Map field display component.
|
|
132
|
+
- **ReferenceFieldDisplay** - Reference field display component.
|
|
133
|
+
- **TimestampFieldDisplay** - Timestamp field display component.
|
|
134
|
+
- **HiddenFieldDisplay** - Hidden field display component.
|
|
135
|
+
- **ButtonFieldDisplay** - Button field display component.
|
|
136
|
+
|
|
137
|
+
---
|
|
138
|
+
|
|
139
|
+
**For MVP:** Only `PageContainer` is needed. All other components are optional.
|
|
140
|
+
|
|
141
|
+
**All props documented in JSDoc** - Hover in IDE for complete reference.
|