-
Notifications
You must be signed in to change notification settings - Fork 0
Add comprehensive UI component system (81 components) with mobile-first design #508
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
…ption Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
| import { | ||
| LabelPropsSchema, | ||
| BadgePropsSchema, | ||
| TagPropsSchema, | ||
| ImagePropsSchema, | ||
| AvatarPropsSchema, | ||
| ProgressBarPropsSchema, | ||
| SpinnerPropsSchema, | ||
| KpiCardPropsSchema, | ||
| TimelinePropsSchema, | ||
| } from './display.zod'; |
Check notice
Code scanning / CodeQL
Unused variable, import, function or class Note test
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI about 24 hours ago
In general, to fix an unused import in TypeScript, remove the unused symbol from the import list (or, if the entire import is unused, delete the import statement). This eliminates dead code and satisfies the static analysis rule without changing runtime behavior.
Here, the best minimal fix is to edit packages/spec/src/ui/display.test.ts at the top of the file and remove TagPropsSchema from the named import on lines 2–12. All other imported schemas remain untouched because they are used in the tests. No additional code, methods, or imports are needed.
| @@ -2,7 +2,6 @@ | ||
| import { | ||
| LabelPropsSchema, | ||
| BadgePropsSchema, | ||
| TagPropsSchema, | ||
| ImagePropsSchema, | ||
| AvatarPropsSchema, | ||
| ProgressBarPropsSchema, |
| import { | ||
| TextInputPropsSchema, | ||
| TextareaPropsSchema, | ||
| RichTextEditorPropsSchema, | ||
| NumberInputPropsSchema, | ||
| CurrencyInputPropsSchema, | ||
| SliderPropsSchema, | ||
| RatingInputPropsSchema, | ||
| DatePickerPropsSchema, | ||
| DateTimePickerPropsSchema, | ||
| TimePickerPropsSchema, | ||
| DateRangePickerPropsSchema, | ||
| SelectPropsSchema, | ||
| AutocompletePropsSchema, | ||
| TagInputPropsSchema, | ||
| CascaderPropsSchema, | ||
| CheckboxPropsSchema, | ||
| SwitchPropsSchema, | ||
| RadioGroupPropsSchema, | ||
| FileUploadPropsSchema, | ||
| ImageUploadPropsSchema, | ||
| ColorPickerPropsSchema, | ||
| SignaturePadPropsSchema, | ||
| CodeEditorPropsSchema, | ||
| } from './input.zod'; |
Check notice
Code scanning / CodeQL
Unused variable, import, function or class Note test
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI about 24 hours ago
In general, to fix unused imports, you either remove them or start using them. Since this is a test file and the shown tests don’t use the flagged schemas, the safest fix that doesn’t change existing functionality is to delete just the unused names from the import list, leaving the used imports intact.
Concretely, in packages/spec/src/ui/input.test.ts on the multi-line import from ./input.zod, remove the following identifiers from the named import list: TextareaPropsSchema, DateTimePickerPropsSchema, TimePickerPropsSchema, DateRangePickerPropsSchema, CascaderPropsSchema, CheckboxPropsSchema, SwitchPropsSchema, RadioGroupPropsSchema, and SignaturePadPropsSchema. Do not add any new imports or change the remaining ones. No other code changes, methods, or definitions are needed.
| @@ -1,27 +1,18 @@ | ||
| import { describe, it, expect } from 'vitest'; | ||
| import { | ||
| TextInputPropsSchema, | ||
| TextareaPropsSchema, | ||
| RichTextEditorPropsSchema, | ||
| NumberInputPropsSchema, | ||
| CurrencyInputPropsSchema, | ||
| SliderPropsSchema, | ||
| RatingInputPropsSchema, | ||
| DatePickerPropsSchema, | ||
| DateTimePickerPropsSchema, | ||
| TimePickerPropsSchema, | ||
| DateRangePickerPropsSchema, | ||
| SelectPropsSchema, | ||
| AutocompletePropsSchema, | ||
| TagInputPropsSchema, | ||
| CascaderPropsSchema, | ||
| CheckboxPropsSchema, | ||
| SwitchPropsSchema, | ||
| RadioGroupPropsSchema, | ||
| FileUploadPropsSchema, | ||
| ImageUploadPropsSchema, | ||
| ColorPickerPropsSchema, | ||
| SignaturePadPropsSchema, | ||
| CodeEditorPropsSchema, | ||
| } from './input.zod'; | ||
|
|
Adds production-ready UI component specifications for enterprise management software. Components are designed mobile-first with WCAG 2.1 AA compliance.
Components Added (81 total)
Input (28): Text (single/multi-line, rich), Number (numeric, currency, slider, rating), Date/Time (picker, range), Select (dropdown, autocomplete, tags, cascader), Boolean (checkbox, switch, radio, toggle), File (upload, image w/ crop), Advanced (color, signature, location, code editor)
Display (23): Text (label, badge, tag, pill), Rich Content (HTML, Markdown, code block), Media (image, avatar, icon, video), Progress (bar, circle, spinner, skeleton), Stats (KPI, trend, gauge), Info (timeline, divider)
Layout (22): Containers (card, panel, section, well), Grids (12-col responsive, masonry, flex, stack, split-pane), Navigation (tabs, accordion, stepper, breadcrumb, pagination), Overlays (modal, drawer, popover, tooltip, toast, dropdown)
Specialized (8): Data (table w/ virtual scroll, tree, kanban), Feedback (alert, empty state), Mobile (bottom nav, FAB, pull-to-refresh)
Architecture
All components follow Zod-first pattern:
z.infer<>Usage
Files
src/ui/input.zod.ts- Input components (700 LOC)src/ui/display.zod.ts- Display components (600 LOC)src/ui/layout.zod.ts- Layout components (600 LOC)src/ui/component.zod.ts- Master registry + specialized componentssrc/ui/*.test.ts- Test coverage (58 new tests, 3,290 total passing)src/ui/README.md- Component reference guideDesign Principles
Mobile-first (touch targets ≥44px), accessible (WCAG 2.1 AA), performant (virtual scroll, lazy load), type-safe (Zod + TypeScript).
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.