@vadimcomanescu/nadicode-design-system 4.0.0 → 4.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/.agents/skills/seed/SKILL.md +38 -166
  2. package/.agents/skills/seed/references/animation.md +2 -2
  3. package/.agents/skills/seed/references/responsive.md +1 -1
  4. package/README.md +2 -2
  5. package/dist/catalog/components.js +4 -4
  6. package/dist/{chunk-7A2RXKGH.js → chunk-GJ557DGH.js} +1 -1
  7. package/dist/{chunk-7XLZCXUL.js → chunk-K4U67BVG.js} +1 -1
  8. package/dist/{chunk-TUJZMJXW.js → chunk-LK2L3C7D.js} +1 -1
  9. package/dist/{chunk-DSMGCFMJ.js → chunk-POFFOUQW.js} +2 -5
  10. package/dist/components/blocks/HeroBlock.js +2 -2
  11. package/dist/components/page-kits/LandingPageKit.js +3 -3
  12. package/dist/components/page-kits/ServiceSuitePageKit.js +3 -3
  13. package/dist/components/ui/AvatarUpload.js +1 -1
  14. package/dist/components/ui/MouseEffect.js +1 -1
  15. package/eslint-rules/nadicode/config.js +1 -0
  16. package/eslint-rules/nadicode/index.js +2 -0
  17. package/eslint-rules/nadicode/rules/__tests__/require-catalog-import.test.js +111 -0
  18. package/eslint-rules/nadicode/rules/no-has-svg-selector.js +1 -1
  19. package/eslint-rules/nadicode/rules/require-catalog-import.js +59 -0
  20. package/package.json +1 -338
  21. package/scripts/ds-check.mjs +0 -10
  22. package/scripts/sync-seed-skill.mjs +0 -3
  23. package/.agents/skills/seed/contract.md +0 -104
  24. package/.agents/skills/seed/intent-map.md +0 -320
  25. package/.agents/skills/seed/recipes/agency-home.md +0 -311
  26. package/.agents/skills/seed/recipes/agents-chat.md +0 -305
  27. package/.agents/skills/seed/recipes/analytics.md +0 -253
  28. package/.agents/skills/seed/recipes/auth.md +0 -254
  29. package/.agents/skills/seed/recipes/blog-content.md +0 -307
  30. package/.agents/skills/seed/recipes/checkout.md +0 -311
  31. package/.agents/skills/seed/recipes/company-about.md +0 -276
  32. package/.agents/skills/seed/recipes/company-contact.md +0 -234
  33. package/.agents/skills/seed/recipes/crud-form.md +0 -233
  34. package/.agents/skills/seed/recipes/crud-list-detail.md +0 -230
  35. package/.agents/skills/seed/recipes/dashboard.md +0 -354
  36. package/.agents/skills/seed/recipes/digital-workers.md +0 -314
  37. package/.agents/skills/seed/recipes/error-pages.md +0 -199
  38. package/.agents/skills/seed/recipes/marketing-landing.md +0 -293
  39. package/.agents/skills/seed/recipes/marketing-shell.md +0 -156
  40. package/.agents/skills/seed/recipes/navigation-shell.md +0 -786
  41. package/.agents/skills/seed/recipes/onboarding.md +0 -258
  42. package/.agents/skills/seed/recipes/pricing.md +0 -271
  43. package/.agents/skills/seed/recipes/service-detail.md +0 -302
  44. package/.agents/skills/seed/recipes/settings.md +0 -252
  45. package/.agents/skills/seed/references/blocks.md +0 -128
  46. package/.agents/skills/seed/references/components.md +0 -287
  47. package/.agents/skills/seed/references/icons.md +0 -169
  48. package/.agents/skills/seed/references/nextjs.md +0 -49
  49. package/.agents/skills/seed/references/tokens.md +0 -88
@@ -1,233 +0,0 @@
1
- # Recipe: CRUD Form
2
-
3
- Create or edit entity pages with sectioned form groups and validation.
4
-
5
- ## Route Patterns
6
-
7
- - `/[entity]/new` (create)
8
- - `/[entity]/[id]/edit` (edit)
9
-
10
- ## Shell
11
-
12
- `app-shell` (Sidebar + top bar + SearchCommand)
13
-
14
- ---
15
-
16
- ## Layout Blueprint (Desktop)
17
-
18
- ```
19
- +--+---------------------------------------------+
20
- | | Breadcrumb: Home > [Entity] > New |
21
- |S | Page Title [Cancel] |
22
- |I | |
23
- |D | +------------------------------------------+ |
24
- |E | | Section 1: Basic Information glass-panel|
25
- |B | | +--------------------------------------+ | |
26
- |A | | | Label | | |
27
- |R | | | [Input] | | |
28
- | | | | Label | | |
29
- | | | | [Textarea] | | |
30
- | | | +--------------------------------------+ | |
31
- | | +------------------------------------------+ |
32
- | | |
33
- | | +------------------------------------------+ |
34
- | | | Section 2: Configuration glass-panel| |
35
- | | | [Select] [Switch] [Checkbox] | |
36
- | | +------------------------------------------+ |
37
- | | |
38
- | | +------------------------------------------+ |
39
- | | | Actions Row | |
40
- | | | [Delete] [Cancel] [Save] | |
41
- | | +------------------------------------------+ |
42
- +--+---------------------------------------------+
43
- ```
44
-
45
- ---
46
-
47
- ## Section Sequence
48
-
49
- ### 1. Page Header
50
-
51
- ```tsx
52
- <div className="flex items-center justify-between">
53
- <div>
54
- <Breadcrumb>...</Breadcrumb>
55
- <Heading level={2} size="section" >{isEdit ? `Edit ${name}` : `New ${entityType}`}</Heading>
56
- </div>
57
- <Button variant="ghost" onClick={handleCancel}>Cancel</Button>
58
- </div>
59
- ```
60
-
61
- ### 2. Form Sections (grouped in Cards)
62
-
63
- ```tsx
64
- <Form {...form}>
65
- <form onSubmit={form.handleSubmit(onSubmit)} className="space-y-6">
66
- {/* Section 1 */}
67
- <Card className="glass-panel p-6">
68
- <Heading level={4} size="title" className="mb-4">Basic Information</Heading>
69
- <div className="space-y-4">
70
- <FormField control={form.control} name="name" render={({ field }) => (
71
- <FormItem>
72
- <FormLabel>Name</FormLabel>
73
- <FormControl><Input {...field} /></FormControl>
74
- <FormMessage />
75
- </FormItem>
76
- )} />
77
- <FormField control={form.control} name="description" render={({ field }) => (
78
- <FormItem>
79
- <FormLabel>Description</FormLabel>
80
- <FormControl><Textarea {...field} /></FormControl>
81
- <FormMessage />
82
- </FormItem>
83
- )} />
84
- </div>
85
- </Card>
86
-
87
- {/* Section 2 */}
88
- <Card className="glass-panel p-6">
89
- <Heading level={4} size="title" className="mb-4">Configuration</Heading>
90
- <div className="space-y-4">
91
- {/* Select, Switch, Checkbox fields */}
92
- </div>
93
- </Card>
94
-
95
- {/* Actions */}
96
- <div className="flex items-center justify-between pt-4">
97
- {isEdit && (
98
- <AlertDialog>
99
- <AlertDialogTrigger asChild>
100
- <Button variant="destructive">Delete</Button>
101
- </AlertDialogTrigger>
102
- {/* Delete confirmation */}
103
- </AlertDialog>
104
- )}
105
- <div className="flex items-center gap-3 ml-auto">
106
- <Button variant="outline" onClick={handleCancel}>Cancel</Button>
107
- <Button type="submit" disabled={!isDirty || isSubmitting}>
108
- {isSubmitting ? <Spinner className="mr-2" /> : null}
109
- {isEdit ? "Save Changes" : "Create"}
110
- </Button>
111
- </div>
112
- </div>
113
- </form>
114
- </Form>
115
- ```
116
-
117
- ---
118
-
119
- ## Animation Storyboard
120
-
121
- ```
122
- ANIMATION STORYBOARD
123
- ====================
124
- BUDGET: 400ms | SPRING: snappy | REDUCED: opacity-only
125
-
126
- T+0ms [shell] Sidebar + top bar visible (instant)
127
- T+50ms [header] Title + breadcrumb {fadeInUp, snappy}
128
- T+130ms [section-1] First form section {fadeInUp, snappy}
129
- T+230ms [section-2] Second form section {fadeInUp, snappy}
130
- T+330ms [actions] Action buttons row {fadeIn, snappy}
131
-
132
- REDUCED MOTION: All items visible immediately
133
- ```
134
-
135
- ---
136
-
137
- ## Required Components
138
-
139
- | Component | Import Path | Purpose |
140
- |-----------|-------------|---------|
141
- | `Form` | `@vadimcomanescu/nadicode-design-system/form` | Form wrapper (react-hook-form) |
142
- | `FormField` | `@vadimcomanescu/nadicode-design-system/form` | Field binding |
143
- | `FormItem` | `@vadimcomanescu/nadicode-design-system/form` | Field container |
144
- | `FormLabel` | `@vadimcomanescu/nadicode-design-system/form` | Stacked label (above input) |
145
- | `FormControl` | `@vadimcomanescu/nadicode-design-system/form` | Control wrapper |
146
- | `FormMessage` | `@vadimcomanescu/nadicode-design-system/form` | Validation error message |
147
- | `Input` | `@vadimcomanescu/nadicode-design-system/input` | Text inputs |
148
- | `Textarea` | `@vadimcomanescu/nadicode-design-system/textarea` | Long text |
149
- | `Select` | `@vadimcomanescu/nadicode-design-system/select` | Dropdowns |
150
- | `Switch` | `@vadimcomanescu/nadicode-design-system/switch` | Toggles |
151
- | `Checkbox` | `@vadimcomanescu/nadicode-design-system/checkbox` | Boolean fields |
152
- | `Button` | `@vadimcomanescu/nadicode-design-system/button` | Submit, cancel, delete |
153
- | `Card` | `@vadimcomanescu/nadicode-design-system/card` | Section containers |
154
- | `Typography` | `@vadimcomanescu/nadicode-design-system/typography` | Section headings |
155
- | `Breadcrumb` | `@vadimcomanescu/nadicode-design-system/breadcrumb` | Navigation context |
156
- | `AlertDialog` | `@vadimcomanescu/nadicode-design-system/alert-dialog` | Delete confirmation |
157
- | `Alert` | `@vadimcomanescu/nadicode-design-system/alert` | Submission errors |
158
- | `Spinner` | `@vadimcomanescu/nadicode-design-system/spinner` | Submit loading |
159
- | `Skeleton` | `@vadimcomanescu/nadicode-design-system/skeleton` | Loading state (edit mode) |
160
-
161
- ### Allowed (optional)
162
-
163
- `Field`, `Label`, `DatePicker`, `Combobox`, `TagInput`, `RadioGroup`, `Slider`, `FileUpload`, `InputOTP`, `NativeSelect`, `InputGroup`, `Tooltip`
164
-
165
- ### Forbidden
166
-
167
- `DataTable`, `HeroBlock`, chart components, decorative effects, text effects, agentic components
168
-
169
- ---
170
-
171
- ## Required States
172
-
173
- | State | Trigger | Visual |
174
- |-------|---------|--------|
175
- | `loading` | Edit mode: fetching entity | Skeleton form sections |
176
- | `pristine` | Form loaded, no changes | Submit button disabled |
177
- | `dirty` | User modified a field | Submit button enabled, optional unsaved indicator |
178
- | `submitting` | Form submitted | Submit button shows Spinner, form disabled |
179
- | `validation-error` | Invalid fields | `FormMessage` below invalid fields (red text) |
180
- | `submission-error` | Server error on submit | `Alert` variant="destructive" at top of form |
181
- | `success` | Saved successfully | Toast "Saved" + redirect to list page |
182
-
183
- ---
184
-
185
- ## Responsive Contract
186
-
187
- | Breakpoint | Layout | Actions |
188
- |------------|--------|---------|
189
- | Mobile | Single column, cards full width | Stacked buttons, full width |
190
- | `sm:` | Single column, max-w-2xl centered | Inline buttons, right-aligned |
191
- | `lg:` | Single column within sidebar layout | Same as sm |
192
-
193
- ---
194
-
195
- ## Styling Rules
196
-
197
- - Form sections: `glass-panel p-6`
198
- - Labels: always stacked above inputs (never inline, never floating)
199
- - Field spacing: `space-y-4` within sections
200
- - Section spacing: `space-y-6`
201
- - Required fields: visual asterisk on label
202
- - Error text: `text-destructive text-sm`
203
- - Delete button: `variant="destructive"`, left-aligned, separated from save/cancel
204
- - Max form width: `max-w-2xl mx-auto` for readability
205
-
206
- ---
207
-
208
- ## Accessibility
209
-
210
- - All inputs have associated `<label>` via `FormLabel`
211
- - Error messages linked via `aria-describedby`
212
- - Required fields have `aria-required="true"`
213
- - Delete uses `AlertDialog` with confirmation
214
- - Tab order: fields top-to-bottom, then cancel, then save
215
- - Form has `noValidate` (custom validation via react-hook-form)
216
-
217
- ---
218
-
219
- ## Reference Implementations
220
-
221
- - `src/components/blocks/CreateBlock.tsx`
222
- - `src/components/ui/Form.tsx` (form primitives)
223
-
224
- ---
225
-
226
- ## Verification
227
-
228
- ```bash
229
- npx tsc --noEmit
230
- npm run lint
231
- npm run test
232
- npx vitest run src/test/css-variable-usage.test.ts
233
- ```
@@ -1,230 +0,0 @@
1
- # Recipe: CRUD List + Detail
2
-
3
- Entity management page with search, filter, sort, and record inspection.
4
-
5
- ## Route Patterns
6
-
7
- - `/[entity]` (list view)
8
- - `/[entity]/[id]` (detail view, optional -- can use Dialog/Sheet instead)
9
-
10
- ## Shell
11
-
12
- `app-shell` (Sidebar + top bar + SearchCommand)
13
-
14
- ---
15
-
16
- ## Layout Blueprint (Desktop)
17
-
18
- ```
19
- +--+---------------------------------------------+
20
- | | Breadcrumb: Home > [Entity] |
21
- |S | Page Title [Search] [Filter] [+ New] |
22
- |I | |
23
- |D | +------------------------------------------+ |
24
- |E | | DataTable | |
25
- |B | | [ ] Name Status Date Actions| |
26
- |A | | [ ] Record 1 Active Jan 1 ... | |
27
- |R | | [ ] Record 2 Pending Jan 2 ... | |
28
- | | | [ ] Record 3 Active Jan 3 ... | |
29
- | | | ... | |
30
- | | +------------------------------------------+ |
31
- | | |
32
- | | [< Prev] Page 1 of 10 [Next >] |
33
- +--+---------------------------------------------+
34
-
35
- Detail (Dialog/Sheet overlay):
36
- +--+---------------------------------------------+
37
- | | ...list in background... |
38
- | | +---------------------------+ |
39
- | | | Sheet/Dialog | |
40
- | | | Entity Name | |
41
- | | | Status: [Badge] | |
42
- | | | | |
43
- | | | Details section | |
44
- | | | Related records section | |
45
- | | | | |
46
- | | | [Edit] [Archive] [Delete] | |
47
- | | +---------------------------+ |
48
- +--+---------------------------------------------+
49
- ```
50
-
51
- ---
52
-
53
- ## Section Sequence
54
-
55
- ### 1. Page Header + Controls
56
-
57
- ```tsx
58
- <div className="flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between">
59
- <div>
60
- <Breadcrumb>...</Breadcrumb>
61
- <Heading level={2} size="section" >Entities</Heading>
62
- </div>
63
- <div className="flex items-center gap-3">
64
- <Input placeholder="Search..." startIcon={<SearchIcon size={16} />} className="w-64" />
65
- <Select>{/* Filter options */}</Select>
66
- <Button><PlusIcon size={16} /> New Entity</Button>
67
- </div>
68
- </div>
69
- ```
70
-
71
- ### 2. Data Table
72
-
73
- ```tsx
74
- <Card className="glass-panel">
75
- <DataTable
76
- columns={columns}
77
- data={entities}
78
- onRowClick={openDetail}
79
- selectable
80
- />
81
- </Card>
82
- ```
83
-
84
- ### 3. Pagination
85
-
86
- ```tsx
87
- <div className="flex items-center justify-between mt-4">
88
- <Typography variant="small" className="text-text-secondary">
89
- Showing {start}-{end} of {total}
90
- </Typography>
91
- <Pagination current={page} total={totalPages} onPageChange={setPage} />
92
- </div>
93
- ```
94
-
95
- ### 4. Detail Panel (Sheet or Dialog)
96
-
97
- ```tsx
98
- <Sheet open={!!selectedEntity} onOpenChange={closeDetail}>
99
- <SheetContent className="sm:max-w-lg">
100
- <SheetHeader>
101
- <SheetTitle>{entity.name}</SheetTitle>
102
- <Badge>{entity.status}</Badge>
103
- </SheetHeader>
104
- <div className="space-y-6 mt-6">
105
- {/* Detail fields */}
106
- {/* Related records */}
107
- </div>
108
- <SheetFooter>
109
- <Button variant="outline">Edit</Button>
110
- <AlertDialog>
111
- <AlertDialogTrigger asChild>
112
- <Button variant="destructive">Delete</Button>
113
- </AlertDialogTrigger>
114
- {/* Confirmation dialog */}
115
- </AlertDialog>
116
- </SheetFooter>
117
- </SheetContent>
118
- </Sheet>
119
- ```
120
-
121
- ---
122
-
123
- ## Animation Storyboard
124
-
125
- ```
126
- ANIMATION STORYBOARD
127
- ====================
128
- BUDGET: 400ms | SPRING: snappy | REDUCED: opacity-only
129
-
130
- T+0ms [shell] Sidebar + top bar visible (instant)
131
- T+50ms [header] Title + controls fade in {fadeInUp, snappy}
132
- T+130ms [table] Table container fades in {fadeIn, snappy}
133
- T+200ms [rows] Table rows stagger {blockStagger, 40ms, max 10}
134
- T+400ms [pagination] Pagination fades in {fadeIn, snappy}
135
-
136
- DETAIL PANEL:
137
- T+0ms [overlay] Backdrop appears {fadeIn, 150ms}
138
- T+0ms [sheet] Sheet slides in from right {slideInRight, gentle}
139
-
140
- REDUCED MOTION: All items visible immediately
141
- ```
142
-
143
- ---
144
-
145
- ## Required Components
146
-
147
- | Component | Import Path | Purpose |
148
- |-----------|-------------|---------|
149
- | `DataTable` | `@vadimcomanescu/nadicode-design-system/data-table` | Main data display |
150
- | `Pagination` | `@vadimcomanescu/nadicode-design-system/pagination` | Page navigation |
151
- | `Input` | `@vadimcomanescu/nadicode-design-system/input` | Search field |
152
- | `Select` | `@vadimcomanescu/nadicode-design-system/select` | Filter dropdown |
153
- | `Button` | `@vadimcomanescu/nadicode-design-system/button` | Actions (new, edit, delete) |
154
- | `Badge` | `@vadimcomanescu/nadicode-design-system/badge` | Status indicators |
155
- | `Card` | `@vadimcomanescu/nadicode-design-system/card` | Table container |
156
- | `Sheet` | `@vadimcomanescu/nadicode-design-system/sheet` | Detail side panel |
157
- | `AlertDialog` | `@vadimcomanescu/nadicode-design-system/alert-dialog` | Delete confirmation |
158
- | `Typography` | `@vadimcomanescu/nadicode-design-system/typography` | Titles |
159
- | `Breadcrumb` | `@vadimcomanescu/nadicode-design-system/breadcrumb` | Navigation context |
160
- | `Skeleton` | `@vadimcomanescu/nadicode-design-system/skeleton` | Loading state |
161
- | `Empty` | `@vadimcomanescu/nadicode-design-system/empty` | No-data state |
162
-
163
- ### Allowed (optional)
164
-
165
- `Dialog`, `Tabs`, `DropdownMenu`, `ContextMenu`, `Tooltip`, `Table`, `Checkbox`
166
-
167
- ### Forbidden
168
-
169
- `HeroBlock`, `PricingBlock`, decorative effects, text effects, `FormWizard`, chart components
170
-
171
- ---
172
-
173
- ## Required States
174
-
175
- | State | Trigger | Visual |
176
- |-------|---------|--------|
177
- | `loading` | Initial data fetch | Skeleton table rows (5 rows) |
178
- | `empty` | Zero records | `Empty` with entity icon, "No [entities] yet", "Create your first [entity]" CTA |
179
- | `has-data` | Data loaded | Full DataTable with records |
180
- | `filtering` | Active filter/search | Table with filtered results, active filter indicators |
181
- | `empty-filter` | Filter returns zero | `Empty` with "No results match", "Clear filters" CTA |
182
- | `error` | API failure | `Alert` variant="destructive" with retry |
183
-
184
- ---
185
-
186
- ## Responsive Contract
187
-
188
- | Breakpoint | Table | Filters | Detail Panel |
189
- |------------|-------|---------|--------------|
190
- | Mobile | Card list (hidden columns) | Filter button -> Sheet | Full-screen Sheet |
191
- | `sm:` | Table (key columns) | Inline search + filter button | Sheet side="right" |
192
- | `lg:` | Full table all columns | Persistent search + filter bar | Sheet max-w-lg |
193
-
194
- ---
195
-
196
- ## Styling Rules
197
-
198
- - Table container: `glass-panel`
199
- - Status badges: semantic variants (`success`, `warning`, `destructive`, `default`)
200
- - Row hover: `hover:bg-surface-hover`
201
- - Selected rows: `bg-surface-active`
202
- - No raw palette colors
203
-
204
- ---
205
-
206
- ## Accessibility
207
-
208
- - Table has proper `<thead>`, `<tbody>` structure
209
- - Sortable columns have `aria-sort` attribute
210
- - Row actions have `aria-label`
211
- - Delete uses `AlertDialog` for confirmation (keyboard trap)
212
- - Search input has `role="search"` wrapper
213
-
214
- ---
215
-
216
- ## Reference Implementations
217
-
218
- - `src/components/blocks/DataGridBlock.tsx`
219
- - `src/components/blocks/DirectoryBlock.tsx`
220
-
221
- ---
222
-
223
- ## Verification
224
-
225
- ```bash
226
- npx tsc --noEmit
227
- npm run lint
228
- npm run test
229
- npx vitest run src/test/css-variable-usage.test.ts
230
- ```