@donotdev/cli 0.0.3 → 0.0.4
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 +12 -24
- package/dist/bin/commands/bump.d.ts +1 -1
- package/dist/bin/commands/format.d.ts +1 -1
- package/dist/bin/commands/lint.d.ts +1 -1
- package/package.json +1 -9
- package/templates/app-demo/src/themes.css.example +108 -156
- 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 +2 -2
- 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 +83 -61
- 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 +135 -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 +48 -0
- package/templates/root-consumer/guides/SETUP_LAYOUTS.md.example +108 -0
- package/templates/root-consumer/guides/SETUP_OAUTH.md.example +53 -0
- package/templates/root-consumer/guides/SETUP_PAGES.md.example +112 -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
|
@@ -2,178 +2,130 @@
|
|
|
2
2
|
|
|
3
3
|
/* ===========================
|
|
4
4
|
APP-WIDE SETTINGS
|
|
5
|
-
|
|
5
|
+
Spacing, radius, shadows, animations - apply to all themes
|
|
6
6
|
=========================== */
|
|
7
7
|
:root {
|
|
8
|
-
/*
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
/*
|
|
15
|
-
/* --
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
/*
|
|
19
|
-
/* --
|
|
20
|
-
/* --
|
|
21
|
-
/* --routing-desktop-duration: var(--routing-default-duration); */
|
|
22
|
-
/* --routing-wide-duration: var(--routing-default-duration); */
|
|
23
|
-
|
|
24
|
-
/* Examples: */
|
|
25
|
-
/* --routing-animation: slide; */ /* Use slide animation */
|
|
26
|
-
/* --routing-animation: none; */ /* Disable animations */
|
|
27
|
-
/* --routing-default-duration: 200ms; */ /* Faster animations */
|
|
28
|
-
|
|
29
|
-
/* ===========================
|
|
30
|
-
SPACING OVERRIDES
|
|
31
|
-
Customize spacing scale
|
|
32
|
-
=========================== */
|
|
33
|
-
/* --gap-sm: 0.5rem; */ /* 8px - tight spacing */
|
|
34
|
-
/* --gap-md: 1rem; */ /* 16px - medium spacing (default) */
|
|
35
|
-
/* --gap-lg: 2rem; */ /* 32px - large spacing */
|
|
36
|
-
|
|
37
|
-
/* ===========================
|
|
38
|
-
BORDER RADIUS OVERRIDES
|
|
39
|
-
Customize component corners
|
|
40
|
-
=========================== */
|
|
41
|
-
/* --radius-interactive: var(--radius-none); */ /* Buttons, links (default: square) */
|
|
42
|
-
/* --radius-surface: var(--radius-md); */ /* Cards, dialogs (default: 8px round) */
|
|
43
|
-
/* --radius-floating: var(--radius-none); */ /* Dropdowns, popovers (default: square) */
|
|
44
|
-
|
|
45
|
-
/* ===========================
|
|
46
|
-
SHADOW OVERRIDES
|
|
47
|
-
Customize elevation
|
|
48
|
-
=========================== */
|
|
49
|
-
/* --shadow-sm: ...; */ /* Small shadows */
|
|
50
|
-
/* --shadow-md: ...; */ /* Medium shadows (default) */
|
|
51
|
-
/* --shadow-xl: ...; */ /* Large shadows */
|
|
8
|
+
/* Routing animations (fade | slide | none) */
|
|
9
|
+
/* --routing-animation: fade; */
|
|
10
|
+
/* --routing-default-duration: var(--dur-normal); */
|
|
11
|
+
|
|
12
|
+
/* Spacing scale */
|
|
13
|
+
/* --gap-sm: 0.5rem; */
|
|
14
|
+
/* --gap-md: 1rem; */
|
|
15
|
+
/* --gap-lg: 2rem; */
|
|
16
|
+
|
|
17
|
+
/* Border radius */
|
|
18
|
+
/* --radius-interactive: var(--radius-none); */
|
|
19
|
+
/* --radius-surface: var(--radius-md); */
|
|
20
|
+
/* --radius-floating: var(--radius-none); */
|
|
52
21
|
}
|
|
53
22
|
|
|
54
23
|
/* ===========================
|
|
55
|
-
LIGHT THEME
|
|
56
|
-
|
|
57
|
-
Foreground: Black
|
|
24
|
+
LIGHT THEME
|
|
25
|
+
Zinc-based neutral palette
|
|
58
26
|
=========================== */
|
|
59
27
|
:root.light {
|
|
60
28
|
--theme-icon: 'Sun';
|
|
61
29
|
--theme-label: 'Light';
|
|
62
30
|
--theme-is-dark: 0;
|
|
63
31
|
|
|
64
|
-
/*
|
|
65
|
-
1. USER SETS - 5 BRAND COLORS
|
|
66
|
-
=========================== */
|
|
67
|
-
--foreground: #000000;
|
|
32
|
+
/* Core colors */
|
|
68
33
|
--background: #ffffff;
|
|
69
|
-
--
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
=========================== */
|
|
77
|
-
--success: #047857; /* Emerald-700 - WCAG AA compliant (5.48:1 with white) */
|
|
78
|
-
--warning: #f59e0b;
|
|
79
|
-
--destructive: #dc2626;
|
|
34
|
+
--foreground: #09090b;
|
|
35
|
+
|
|
36
|
+
/* Surfaces */
|
|
37
|
+
--card: #ffffff;
|
|
38
|
+
--card-foreground: #09090b;
|
|
39
|
+
--popover: #ffffff;
|
|
40
|
+
--popover-foreground: #09090b;
|
|
80
41
|
|
|
81
|
-
/*
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
--
|
|
87
|
-
--
|
|
88
|
-
--input: var(--muted);
|
|
42
|
+
/* Muted (zinc-100 / zinc-500) */
|
|
43
|
+
--muted: #f4f4f5;
|
|
44
|
+
--muted-foreground: #71717a;
|
|
45
|
+
|
|
46
|
+
/* Border & input (zinc-200) */
|
|
47
|
+
--border: #e4e4e7;
|
|
48
|
+
--input: #e4e4e7;
|
|
89
49
|
--ring: var(--primary);
|
|
90
50
|
|
|
91
|
-
|
|
92
|
-
--
|
|
93
|
-
--
|
|
94
|
-
|
|
95
|
-
--
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
--
|
|
103
|
-
--
|
|
104
|
-
|
|
105
|
-
--success-foreground:
|
|
106
|
-
--warning
|
|
107
|
-
--
|
|
51
|
+
/* Brand colors - customize these */
|
|
52
|
+
--primary: #0284c7;
|
|
53
|
+
--primary-foreground: #ffffff;
|
|
54
|
+
|
|
55
|
+
--secondary: #f4f4f5;
|
|
56
|
+
--secondary-foreground: #18181b;
|
|
57
|
+
|
|
58
|
+
--accent: #ea580c;
|
|
59
|
+
--accent-foreground: #ffffff;
|
|
60
|
+
|
|
61
|
+
/* Status colors */
|
|
62
|
+
--destructive: #dc2626;
|
|
63
|
+
--destructive-foreground: #ffffff;
|
|
64
|
+
--success: #16a34a;
|
|
65
|
+
--success-foreground: #ffffff;
|
|
66
|
+
--warning: #f59e0b;
|
|
67
|
+
--warning-foreground: #09090b;
|
|
108
68
|
}
|
|
109
69
|
|
|
110
70
|
/* ===========================
|
|
111
|
-
DARK THEME
|
|
112
|
-
|
|
113
|
-
Foreground: White
|
|
71
|
+
DARK THEME
|
|
72
|
+
Zinc-based dark palette
|
|
114
73
|
=========================== */
|
|
115
74
|
:root.dark {
|
|
116
75
|
--theme-icon: 'Moon';
|
|
117
76
|
--theme-label: 'Dark';
|
|
118
77
|
--theme-is-dark: 1;
|
|
119
78
|
|
|
120
|
-
/*
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
--
|
|
126
|
-
--
|
|
127
|
-
--
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
--
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
3. AUTO-COMPUTED - SURFACES
|
|
138
|
-
=========================== */
|
|
139
|
-
--muted: color-mix(in oklab, var(--foreground) 10%, var(--background));
|
|
140
|
-
--muted-foreground: color-mix(in oklab, var(--foreground) 75%, transparent);
|
|
141
|
-
--border: color-mix(in oklab, var(--foreground) 15%, var(--background));
|
|
142
|
-
--input: var(--muted);
|
|
79
|
+
/* Core colors */
|
|
80
|
+
--background: #09090b;
|
|
81
|
+
--foreground: #fafafa;
|
|
82
|
+
|
|
83
|
+
/* Surfaces */
|
|
84
|
+
--card: #09090b;
|
|
85
|
+
--card-foreground: #fafafa;
|
|
86
|
+
--popover: #18181b;
|
|
87
|
+
--popover-foreground: #fafafa;
|
|
88
|
+
|
|
89
|
+
/* Muted (zinc-800 / zinc-400) */
|
|
90
|
+
--muted: #27272a;
|
|
91
|
+
--muted-foreground: #a1a1aa;
|
|
92
|
+
|
|
93
|
+
/* Border & input (zinc-800) */
|
|
94
|
+
--border: #27272a;
|
|
95
|
+
--input: #27272a;
|
|
143
96
|
--ring: var(--primary);
|
|
144
97
|
|
|
145
|
-
|
|
146
|
-
--
|
|
147
|
-
--
|
|
148
|
-
|
|
149
|
-
--
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
--
|
|
157
|
-
|
|
158
|
-
--success
|
|
159
|
-
--
|
|
160
|
-
--
|
|
98
|
+
/* Brand colors - customize these */
|
|
99
|
+
--primary: #0ea5e9;
|
|
100
|
+
--primary-foreground: #ffffff;
|
|
101
|
+
|
|
102
|
+
--secondary: #27272a;
|
|
103
|
+
--secondary-foreground: #fafafa;
|
|
104
|
+
|
|
105
|
+
--accent: #f97316;
|
|
106
|
+
--accent-foreground: #ffffff;
|
|
107
|
+
|
|
108
|
+
/* Status colors */
|
|
109
|
+
--destructive: #dc2626;
|
|
110
|
+
--destructive-foreground: #ffffff;
|
|
111
|
+
--success: #16a34a;
|
|
112
|
+
--success-foreground: #ffffff;
|
|
113
|
+
--warning: #f59e0b;
|
|
114
|
+
--warning-foreground: #09090b;
|
|
161
115
|
}
|
|
162
116
|
|
|
163
117
|
/* ===========================
|
|
164
118
|
CUSTOM THEMES
|
|
119
|
+
Add your brand themes below
|
|
165
120
|
=========================== */
|
|
166
121
|
|
|
167
|
-
/* Add your custom themes here */
|
|
168
122
|
/* Example:
|
|
169
|
-
.brand {
|
|
123
|
+
:root.brand {
|
|
170
124
|
--theme-icon: 'Zap';
|
|
171
125
|
--theme-label: 'Brand';
|
|
172
|
-
--
|
|
173
|
-
--
|
|
174
|
-
--
|
|
175
|
-
|
|
176
|
-
--accent: #your-brand-accent;
|
|
177
|
-
... other variables ...
|
|
126
|
+
--theme-is-dark: 0;
|
|
127
|
+
--background: #your-color;
|
|
128
|
+
--foreground: #your-color;
|
|
129
|
+
...
|
|
178
130
|
}
|
|
179
131
|
*/
|
|
@@ -1,98 +1,120 @@
|
|
|
1
1
|
# DoNotDev Framework - Agent Quick Start
|
|
2
2
|
|
|
3
|
-
**
|
|
3
|
+
**Persona:** Lead Developer (implementation, code quality) | UX/UI Designer (UX considerations) | Expert Adviser (strategic feedback, trade-offs). **Skills:** TypeScript, React, component composition, convention-over-configuration mindset. **Critical:** ALWAYS follow conventions and trust the framework. Framework handles 90% - discover before building custom.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
**When Stuck:**
|
|
6
|
+
1. Check JSDoc (hover in IDE)
|
|
7
|
+
2. Read relevant setup guide
|
|
8
|
+
3. Trust framework defaults
|
|
9
|
+
4. Ask user for clarification
|
|
6
10
|
|
|
7
|
-
|
|
11
|
+
**Never guess. Always verify.**
|
|
8
12
|
|
|
9
|
-
**Framework-first.** 90% of what you need already exists. Discover and use before building custom.
|
|
10
13
|
|
|
11
|
-
**
|
|
14
|
+
** dndev ** is our custom CLI, dndev --help for info.
|
|
12
15
|
|
|
13
|
-
**Zero CSS.** Component props only. No inline styles, no custom CSS (unless explicitly needed).
|
|
14
16
|
|
|
15
|
-
|
|
17
|
+
**🧠 PHILOSOPHY & MINDSET (READ THIS):**
|
|
18
|
+
* **Speed > Polish:** Your goal is to reach UAT (User Acceptance Testing) fast. The app should look "good enough" (80%) using standard components.
|
|
19
|
+
* **Composition > Customization:** Do not waste time writing CSS to make it "perfect" pixel-wise. Drop components, use props, move on.
|
|
20
|
+
* **Standardize:** If it looks like a standard DoNotDev app, you succeeded. If you are writing custom CSS to fight the framework, you failed.
|
|
21
|
+
* **Polishing:** Deep styling is for *after* the core functionality is approved and the User asks you to polish, with their preferred method.
|
|
16
22
|
|
|
17
23
|
---
|
|
18
24
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
**Core setup:**
|
|
22
|
-
- [PAGES_SETUP.md](./PAGES_SETUP.md) - Drop `*Page.tsx`, get routes
|
|
23
|
-
- [CONFIG_SETUP.md](./CONFIG_SETUP.md) - `app.ts` + `vite.config.ts`
|
|
24
|
-
- [EMULATOR_SETUP.md](./EMULATOR_SETUP.md) - Local secrets (.env.local)
|
|
25
|
-
- [I18N_SETUP.md](./I18N_SETUP.md) - Drop `*_en.json`, get languages
|
|
26
|
-
- [THEMING_SETUP.md](./THEMING_SETUP.md) - Override `themes.css`
|
|
27
|
-
|
|
28
|
-
**Features:**
|
|
29
|
-
- [AUTH_SETUP.md](./AUTH_SETUP.md) - Authentication
|
|
30
|
-
- [BILLING_SETUP.md](./BILLING_SETUP.md) - Stripe subscriptions
|
|
25
|
+
**✅ STYLING STANDARDS (ALWAYS FOLLOW):**
|
|
31
26
|
|
|
32
|
-
**
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
- [LAYOUTS.md](./LAYOUTS.md) - Layout presets
|
|
36
|
-
- [INDEX.md](./INDEX.md) - Full guide navigation
|
|
27
|
+
1. **Layout Strategy:** Use `<Stack>`, `<Grid>`, and `<Section>` components to organize content. These handle spacing and alignment automatically.
|
|
28
|
+
2. **Component Props:** Leverage component-specific props and trust their defaults, only add what you really need.
|
|
29
|
+
3. **Interactions:** Prefer native component interactions. E.g., Use `<Card onClick={...}>` instead of nesting a Button inside if the whole item is actionable.
|
|
37
30
|
|
|
38
31
|
---
|
|
39
32
|
|
|
40
33
|
## Import Rules
|
|
41
34
|
|
|
35
|
+
**Root imports only:**
|
|
42
36
|
```tsx
|
|
43
|
-
// ✅ Correct
|
|
44
37
|
import { Button } from '@donotdev/components';
|
|
38
|
+
import { PageContainer } from '@donotdev/ui';
|
|
45
39
|
import { useAuth } from '@donotdev/auth';
|
|
46
|
-
import type { PageMeta } from '@donotdev/core';
|
|
47
|
-
|
|
48
|
-
// ❌ Wrong
|
|
49
|
-
import { Button } from '@donotdev/components/src/atomic/Button';
|
|
50
|
-
import { PageMeta } from '@donotdev/core'; // Missing 'type'
|
|
51
40
|
```
|
|
52
41
|
|
|
53
|
-
|
|
42
|
+
**Type imports (strict TypeScript):**
|
|
43
|
+
```tsx
|
|
44
|
+
import type { ButtonProps } from '@donotdev/components';
|
|
45
|
+
import type { PageMeta } from '@donotdev/core';
|
|
46
|
+
```
|
|
54
47
|
|
|
55
48
|
---
|
|
56
49
|
|
|
57
|
-
##
|
|
50
|
+
## New App Setup
|
|
58
51
|
|
|
59
|
-
**Props, not CSS:**
|
|
60
52
|
|
|
61
|
-
|
|
62
|
-
// ✅ Correct
|
|
63
|
-
<Card title="Feature" subtitle="Description" icon={Rocket} elevated />
|
|
53
|
+
**If not scaffolded:** `dndev create-app`
|
|
64
54
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
```
|
|
55
|
+
**Configure:**
|
|
56
|
+
1. `config/app.ts` - Choose layout preset + footer links + auth behavior (if needed)
|
|
57
|
+
2. `config/legal.ts` - Set legal pages data
|
|
58
|
+
3. `public/logo.svg` - Drop logo (framework generates rest - optional)
|
|
70
59
|
|
|
71
|
-
|
|
60
|
+
---
|
|
72
61
|
|
|
73
|
-
|
|
74
|
-
// ✅ Correct
|
|
75
|
-
<Section gridCols={3} tone="muted">
|
|
76
|
-
<Card title="One" />
|
|
77
|
-
<Card title="Two" />
|
|
78
|
-
<Card title="Three" />
|
|
79
|
-
</Section>
|
|
80
|
-
|
|
81
|
-
// ❌ Wrong - writing custom CSS
|
|
82
|
-
<div className="my-custom-grid">...</div>
|
|
83
|
-
```
|
|
62
|
+
## Generic Conventions
|
|
84
63
|
|
|
85
|
-
|
|
64
|
+
**Routing:** Drop `*Page.tsx` files in `pages/**` → auto-discovered. Use `PageMeta` for routes, auth, icons.
|
|
86
65
|
|
|
87
|
-
|
|
66
|
+
**i18n:** Drop `<namespace>_<lng>.json` in `/locales` (eager) or `/pages/locales` (lazy). Framework auto-discovers languages.
|
|
88
67
|
|
|
89
|
-
|
|
90
|
-
2. Read relevant setup guide
|
|
91
|
-
3. Trust framework defaults
|
|
92
|
-
4. Ask user for clarification
|
|
68
|
+
**Themes:** Override CSS variables in `src/themes.css`. Framework auto-computes surfaces, borders, text colors.
|
|
93
69
|
|
|
94
|
-
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
## Landing Page Example
|
|
73
|
+
|
|
74
|
+
```tsx
|
|
75
|
+
import { PageContainer } from '@donotdev/ui';
|
|
76
|
+
import { HeroSection, Section, Card, CallToAction, Button, Grid, Stack } from '@donotdev/components';
|
|
77
|
+
|
|
78
|
+
export default function HomePage() {
|
|
79
|
+
return (
|
|
80
|
+
<PageContainer>
|
|
81
|
+
<HeroSection
|
|
82
|
+
title="Welcome"
|
|
83
|
+
subtitle="Build fast with DoNotDev"
|
|
84
|
+
variant="primary"
|
|
85
|
+
/>
|
|
86
|
+
|
|
87
|
+
<Section title="Features" gridCols={3}>
|
|
88
|
+
<Card title="Fast" content="Lightning fast development" />
|
|
89
|
+
<Card title="Simple" content="Zero configuration needed" />
|
|
90
|
+
<Card title="Powerful" content="Enterprise-grade features" />
|
|
91
|
+
</Section>
|
|
92
|
+
|
|
93
|
+
<Section title="Layout Examples">
|
|
94
|
+
<Grid cols={2} gap="medium">
|
|
95
|
+
<Card title="Left Column" />
|
|
96
|
+
<Card title="Right Column" />
|
|
97
|
+
</Grid>
|
|
98
|
+
|
|
99
|
+
<Stack direction="row" gap="medium">
|
|
100
|
+
<Button variant="primary">Primary</Button>
|
|
101
|
+
<Button variant="outline">Secondary</Button>
|
|
102
|
+
</Stack>
|
|
103
|
+
</Section>
|
|
104
|
+
|
|
105
|
+
<CallToAction
|
|
106
|
+
title="Get Started"
|
|
107
|
+
subtitle="Ready to build?"
|
|
108
|
+
primaryAction={<Button variant="primary">Sign Up</Button>}
|
|
109
|
+
secondaryAction={<Button variant="outline">Learn More</Button>}
|
|
110
|
+
/>
|
|
111
|
+
</PageContainer>
|
|
112
|
+
);
|
|
113
|
+
}
|
|
114
|
+
```
|
|
95
115
|
|
|
96
116
|
---
|
|
97
117
|
|
|
98
|
-
**
|
|
118
|
+
**Component references:** [COMPONENTS_ATOMIC.md](./COMPONENTS_ATOMIC.md) | [COMPONENTS_UI.md](./COMPONENTS_UI.md) | [COMPONENTS_CRUD.md](./COMPONENTS_CRUD.md)
|
|
119
|
+
|
|
120
|
+
**Full guides:** [INDEX.md](./INDEX.md) - 50-100 LOC per topic (SETUP_*.md, advanced/*.md)
|
|
@@ -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.
|
|
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.
|