veloria-ui 0.1.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.
- package/CHANGELOG.md +206 -0
- package/LICENSE +21 -0
- package/README.md +253 -0
- package/dist/cli/index.js +511 -0
- package/dist/index.d.mts +1317 -0
- package/dist/index.d.ts +1317 -0
- package/dist/index.js +5373 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +5130 -0
- package/dist/index.mjs.map +1 -0
- package/dist/provider.d.mts +15 -0
- package/dist/provider.d.ts +15 -0
- package/dist/provider.js +1197 -0
- package/dist/provider.js.map +1 -0
- package/dist/provider.mjs +1161 -0
- package/dist/provider.mjs.map +1 -0
- package/dist/tailwind.d.ts +25 -0
- package/dist/tailwind.js +129 -0
- package/package.json +138 -0
- package/src/cli/index.ts +303 -0
- package/src/cli/registry.ts +139 -0
- package/src/components/advanced-forms/index.tsx +975 -0
- package/src/components/basic/Button.tsx +135 -0
- package/src/components/basic/IconButton.tsx +69 -0
- package/src/components/basic/index.tsx +446 -0
- package/src/components/data-display/index.tsx +1158 -0
- package/src/components/feedback/index.tsx +1051 -0
- package/src/components/forms/index.tsx +476 -0
- package/src/components/layout/index.tsx +296 -0
- package/src/components/media/index.tsx +437 -0
- package/src/components/navigation/index.tsx +484 -0
- package/src/components/overlay/index.tsx +473 -0
- package/src/components/utility/index.tsx +566 -0
- package/src/hooks/index.ts +602 -0
- package/src/hooks/use-toast.tsx +74 -0
- package/src/index.ts +396 -0
- package/src/provider.tsx +54 -0
- package/src/styles/atlas.css +252 -0
- package/src/tailwind.ts +124 -0
- package/src/types/index.ts +95 -0
- package/src/utils/cn.ts +66 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to Veloria UI are documented here.
|
|
4
|
+
Project by [JohnDev19](https://github.com/JohnDev19) · [GitHub](https://github.com/JohnDev19/Veloria-UI) · [veloria-ui.vercel.app](https://veloria-ui.vercel.app/)
|
|
5
|
+
|
|
6
|
+
This project follows [Semantic Versioning](https://semver.org).
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## [0.1.0] — 2024-06-28
|
|
11
|
+
|
|
12
|
+
### Initial Release
|
|
13
|
+
|
|
14
|
+
First public release of Veloria UI. 102 components, a full CLI, 18 hooks, a Tailwind
|
|
15
|
+
plugin, and a complete CSS token system with light + dark mode.
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
#### veloria-ui
|
|
20
|
+
|
|
21
|
+
**Basic (10)**
|
|
22
|
+
- `Button` — solid, outline, ghost, soft, link, danger variants · sizes xs–xl · loading state · left/right icon slots
|
|
23
|
+
- `IconButton` — square or circular icon-only button with all button variants
|
|
24
|
+
- `Link` — anchor with external link indicator and underline control
|
|
25
|
+
- `Badge` — compact label with 5 color variants and optional dot
|
|
26
|
+
- `Avatar` — image with fallback initials, online/offline status ring, 6 sizes
|
|
27
|
+
- `AvatarGroup` — stacked avatar row with overflow count
|
|
28
|
+
- `Divider` — horizontal/vertical with optional center label
|
|
29
|
+
- `Tag` — closable colored tag with icon slot
|
|
30
|
+
- `Chip` — toggleable with avatar/icon support and remove button
|
|
31
|
+
- `Tooltip` — Radix-powered, all four sides, configurable delay
|
|
32
|
+
|
|
33
|
+
**Layout (10)**
|
|
34
|
+
- `Container` — responsive max-width wrapper with padding control
|
|
35
|
+
- `Stack` — flex column/row with gap, align, justify, and divider support
|
|
36
|
+
- `Grid` — CSS Grid with column/row/gap config
|
|
37
|
+
- `Flex` — inline flex with full directional control
|
|
38
|
+
- `Section` — semantic `<section>` with vertical padding presets
|
|
39
|
+
- `Spacer` — invisible spacer
|
|
40
|
+
- `AspectRatio` — Radix aspect-ratio wrapper
|
|
41
|
+
- `Center` — flex centering helper
|
|
42
|
+
- `ScrollArea` — custom scrollbar via Radix ScrollArea
|
|
43
|
+
- `Masonry` — CSS multi-column masonry grid
|
|
44
|
+
|
|
45
|
+
**Navigation (10)**
|
|
46
|
+
- `Navbar` — sticky + glass-blur top bar
|
|
47
|
+
- `Sidebar` — collapsible with width transition
|
|
48
|
+
- `Menu` / `MenuItem` — vertical nav with active/disabled states
|
|
49
|
+
- `DropdownMenu` — full Radix Dropdown with all sub-primitives
|
|
50
|
+
- `Breadcrumb` — accessible trail with custom separator
|
|
51
|
+
- `Pagination` — page numbers, ellipsis, prev/next
|
|
52
|
+
- `Tabs` — line, pills, enclosed variants · Radix powered
|
|
53
|
+
- `Stepper` — horizontal/vertical multi-step progress indicator
|
|
54
|
+
- `CommandDialog` — ⌘K command palette via cmdk
|
|
55
|
+
|
|
56
|
+
**Forms (10)**
|
|
57
|
+
- `Input` — left/right icon slots, sizes, error state
|
|
58
|
+
- `TextArea` — resize control, error state
|
|
59
|
+
- `Select` — full Radix Select with all sub-primitives
|
|
60
|
+
- `Checkbox` — with label, description, error state
|
|
61
|
+
- `RadioGroup` — per-option labels and descriptions
|
|
62
|
+
- `Switch` — three sizes, label, description
|
|
63
|
+
- `Slider` — range slider
|
|
64
|
+
- `RangeSlider` — dual-thumb slider
|
|
65
|
+
- `DatePicker` — native date input wrapper
|
|
66
|
+
- `TimePicker` — native time input wrapper
|
|
67
|
+
|
|
68
|
+
**Advanced Forms (10)**
|
|
69
|
+
- `FileUpload` — drag-and-drop zone with click-to-upload fallback
|
|
70
|
+
- `OTPInput` — PIN/OTP with auto-advance and paste support
|
|
71
|
+
- `ColorPicker` — swatches + hex input
|
|
72
|
+
- `SearchInput` — search with loading state and clear button
|
|
73
|
+
- `PasswordInput` — toggle show/hide
|
|
74
|
+
- `Combobox` — searchable single-value select
|
|
75
|
+
- `MultiSelect` — multi-value select with chips
|
|
76
|
+
- `FormField` / `FormLabel` / `FormError` — composable form primitives
|
|
77
|
+
|
|
78
|
+
**Data Display (10)**
|
|
79
|
+
- `Card` — surface with header/content/footer slots · 5 variants
|
|
80
|
+
- `Table` + sub-primitives — full HTML table system
|
|
81
|
+
- `DataTable` — sortable data table with loading and empty states
|
|
82
|
+
- `List` / `ListItem` — simple, bordered, and divided lists
|
|
83
|
+
- `Statistic` — key metric with trend indicator
|
|
84
|
+
- `Timeline` — vertical events with color-coded icons
|
|
85
|
+
- `Calendar` — month picker with highlighted dates
|
|
86
|
+
- `CodeBlock` — code display with copy button and line numbers
|
|
87
|
+
- `Chart` — chart wrapper (bring your own chart library)
|
|
88
|
+
|
|
89
|
+
**Feedback (10)**
|
|
90
|
+
- `Alert` — info/success/warning/danger with optional dismiss
|
|
91
|
+
- `Toast` — Radix Toast with all sub-primitives
|
|
92
|
+
- `Snackbar` — positioned message with action
|
|
93
|
+
- `Progress` — linear bar with color variants
|
|
94
|
+
- `CircularProgress` — SVG ring with indeterminate mode
|
|
95
|
+
- `Skeleton` — pulse placeholder for text, rect, circle
|
|
96
|
+
- `LoadingSpinner` — accessible SVG spinner
|
|
97
|
+
- `EmptyState` — icon + title + description + action slot
|
|
98
|
+
- `StatusIndicator` — online/offline/busy/away dot with pulse
|
|
99
|
+
- `Notification` — notification item with avatar, timestamp, unread dot
|
|
100
|
+
|
|
101
|
+
**Overlay (10)**
|
|
102
|
+
- `Modal` — preset dialog with size variants (sm → full)
|
|
103
|
+
- `Dialog` — full Radix Dialog primitive suite
|
|
104
|
+
- `Drawer` — slide-in from any edge (left/right/top/bottom)
|
|
105
|
+
- `Sheet` — Drawer alias
|
|
106
|
+
- `Popover` — floating panel
|
|
107
|
+
- `HoverCard` — rich hover preview
|
|
108
|
+
- `ContextMenu` — right-click menu
|
|
109
|
+
- `CommandDialog` — ⌘K palette
|
|
110
|
+
- `Lightbox` / `ImageViewer` — full-screen image overlay
|
|
111
|
+
|
|
112
|
+
**Media (5)**
|
|
113
|
+
- `Image` — fallback, aspect ratio, object-fit, rounded, caption
|
|
114
|
+
- `VideoPlayer` — HTML5 video with captions/subtitles track support
|
|
115
|
+
- `AudioPlayer` — custom UI with seek bar, cover art
|
|
116
|
+
- `Carousel` — autoplay, dots, arrows, loop, slidesPerView
|
|
117
|
+
- `Gallery` — responsive image grid with click handler
|
|
118
|
+
|
|
119
|
+
**Utility (5)**
|
|
120
|
+
- `ThemeSwitcher` — icon / toggle / select variants
|
|
121
|
+
- `CopyButton` — icon or labelled button with success feedback
|
|
122
|
+
- `KeyboardShortcut` — styled `<kbd>` shortcut display
|
|
123
|
+
- `ResizablePanel` — drag-to-resize with min/max constraints
|
|
124
|
+
- `DragDropArea` — accessible file drop zone
|
|
125
|
+
|
|
126
|
+
#### Hooks
|
|
127
|
+
- `useDisclosure` — open/close state management
|
|
128
|
+
- `useMediaQuery` — window media query subscription
|
|
129
|
+
- `useBreakpoint` — Tailwind breakpoint helper
|
|
130
|
+
- `useClipboard` — clipboard copy with timeout feedback
|
|
131
|
+
- `useLocalStorage` — persistent state
|
|
132
|
+
- `useTheme` — theme switching (persists to localStorage)
|
|
133
|
+
- `useDebounce` — debounced value
|
|
134
|
+
- `useOnClickOutside` — outside click detection
|
|
135
|
+
- `useKeydown` — keyboard shortcut listener with modifier support
|
|
136
|
+
- `useMounted` — SSR-safe mount check
|
|
137
|
+
- `useToast` — programmatic toast notifications
|
|
138
|
+
|
|
139
|
+
#### Infrastructure
|
|
140
|
+
- Tailwind CSS plugin + preset (`atlasPlugin`, `atlasPreset`)
|
|
141
|
+
- Full CSS design token system — light and dark themes
|
|
142
|
+
- `AtlasProvider` for Next.js App Router
|
|
143
|
+
- TypeScript strict throughout — full named type exports
|
|
144
|
+
- Tree-shakeable ESM + CJS dual build via tsup
|
|
145
|
+
- Turbo monorepo setup
|
|
146
|
+
|
|
147
|
+
#### veloria-ui CLI
|
|
148
|
+
- `init` — project setup wizard (detects Next.js, writes atlas.config.json)
|
|
149
|
+
- `add` — copies components + installs npm deps, resolves Veloria UI peer deps
|
|
150
|
+
- `list` — browse all 102 components filtered by category
|
|
151
|
+
- `diff` — compare local copy to latest (registry fetch, coming soon)
|
|
152
|
+
- Auto-detects npm / pnpm / yarn / bun
|
|
153
|
+
|
|
154
|
+
---
|
|
155
|
+
|
|
156
|
+
---
|
|
157
|
+
|
|
158
|
+
## [0.1.1] — 2026-03-13 (UPDATED)
|
|
159
|
+
|
|
160
|
+
### Build fixes
|
|
161
|
+
|
|
162
|
+
- Fixed `tailwindcss/plugin` resolve error — marked as external in tsup, switched to `require()` at runtime
|
|
163
|
+
- Fixed `"types"` export condition ordering in `package.json` — `types` now comes before `import`/`require`
|
|
164
|
+
- Fixed `use-toast.ts` renamed to `use-toast.tsx` — file contained JSX but had `.ts` extension
|
|
165
|
+
- Fixed `TS2320` / `TS2322` conflicts across all component interfaces — `HTMLAttributes` built-in props (`color`, `size`, `title`, `prefix`, `onChange`, `onDrop`, `onDragOver`) now properly `Omit`-ed before extending
|
|
166
|
+
- Renamed package from `veloria-ui-kit` to `veloria-ui`
|
|
167
|
+
- CLI `--version` flag now reads dynamically from `package.json` instead of being hardcoded
|
|
168
|
+
|
|
169
|
+
---
|
|
170
|
+
|
|
171
|
+
## [0.1.2] — 2026-03-15 (UPDATED)
|
|
172
|
+
|
|
173
|
+
### New Components (20)
|
|
174
|
+
|
|
175
|
+
**Advanced Forms**
|
|
176
|
+
- `PhoneInput` — international phone number with country dial-code selector
|
|
177
|
+
- `TagInput` — type and press Enter to add inline tags, supports max, duplicates control
|
|
178
|
+
- `CurrencyInput` — formatted number input with locale-aware currency symbol
|
|
179
|
+
- `RatingInput` — star rating picker with hover state, clear button, and read-only mode
|
|
180
|
+
|
|
181
|
+
**Data Display**
|
|
182
|
+
- `StatsCard` — metric card with icon, trend indicator, and loading skeleton
|
|
183
|
+
- `TreeView` — nested expandable tree with keyboard navigation and multi-depth support
|
|
184
|
+
- `JsonViewer` — collapsible syntax-highlighted JSON tree with configurable max depth
|
|
185
|
+
- `Heatmap` — GitHub-style activity grid with value intensity scale
|
|
186
|
+
- `KanbanBoard` — drag-and-drop column board with card tagging and assignee slot
|
|
187
|
+
|
|
188
|
+
**Feedback and Overlay**
|
|
189
|
+
- `BannerAlert` — full-width top-of-page announcement strip with 4 variants
|
|
190
|
+
- `ConfirmDialog` — opinionated confirmation modal with async confirm support and danger variant
|
|
191
|
+
- `FloatingActionButton` — FAB with expandable speed-dial actions and 3 position presets
|
|
192
|
+
- `RichTooltip` — tooltip with title, description, and action slot
|
|
193
|
+
- `Tour` — multi-step onboarding overlay with dot progress indicator
|
|
194
|
+
|
|
195
|
+
**Utility**
|
|
196
|
+
- `InfiniteScroll` — IntersectionObserver-based load-more trigger with loader slot
|
|
197
|
+
- `VirtualList` — windowed list renderer for large datasets with configurable overscan
|
|
198
|
+
|
|
199
|
+
### New Hooks (6)
|
|
200
|
+
|
|
201
|
+
- `useForm` — form state and validation with touched tracking, no extra dependencies
|
|
202
|
+
- `usePagination` — pagination logic decoupled from UI, with from/to helpers
|
|
203
|
+
- `useIntersection` — IntersectionObserver wrapper with optional `once` mode
|
|
204
|
+
- `useWindowSize` — reactive window width and height, SSR-safe
|
|
205
|
+
- `useStep` — multi-step wizard state with `isFirst`, `isLast`, and progress percentage
|
|
206
|
+
- `useCountdown` — countdown timer with `start`, `pause`, and `reset` controls
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 JohnDev19
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
3
|
+
<br/>
|
|
4
|
+
|
|
5
|
+
```
|
|
6
|
+
╦ ╦╔═╗╦ ╔═╗╦═╗╦╔═╗
|
|
7
|
+
╚╗╔╝║╣ ║ ║ ║╠╦╝║╠═╣
|
|
8
|
+
╚╝ ╚═╝╩═╝╚═╝╩╚═╩╩ ╩
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
### **Build anything. Ship faster.**
|
|
12
|
+
|
|
13
|
+
102 production-ready React components — accessible, composable, dark-mode ready.
|
|
14
|
+
Works with Tailwind CSS and Next.js out of the box.
|
|
15
|
+
|
|
16
|
+
[](https://www.npmjs.com/package/veloria-ui)
|
|
17
|
+
[](LICENSE)
|
|
18
|
+
[](https://www.typescriptlang.org)
|
|
19
|
+
[](https://github.com/JohnDev19/Veloria-UI)
|
|
20
|
+
|
|
21
|
+
**[Docs](https://veloria-ui.vercel.app/)** · **[Components](https://veloria-ui.vercel.app/components)** · **[Issues](https://github.com/JohnDev19/Veloria-UI/issues)** · **[Changelog](CHANGELOG.md)**
|
|
22
|
+
|
|
23
|
+
</div>
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## Install
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
npm install veloria-ui
|
|
31
|
+
# pnpm add veloria-ui
|
|
32
|
+
# bun add veloria-ui
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## Setup
|
|
38
|
+
|
|
39
|
+
### 1. Import the stylesheet
|
|
40
|
+
|
|
41
|
+
```tsx
|
|
42
|
+
// app/layout.tsx
|
|
43
|
+
import "veloria-ui/styles";
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### 2. Add the Tailwind plugin
|
|
47
|
+
|
|
48
|
+
```ts
|
|
49
|
+
// tailwind.config.ts
|
|
50
|
+
import { atlasPlugin } from "veloria-ui/tailwind";
|
|
51
|
+
|
|
52
|
+
export default {
|
|
53
|
+
darkMode: ["class"],
|
|
54
|
+
content: ["./app/**/*.{ts,tsx}", "./components/**/*.{ts,tsx}"],
|
|
55
|
+
plugins: [atlasPlugin],
|
|
56
|
+
};
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### 3. Wrap your app
|
|
60
|
+
|
|
61
|
+
```tsx
|
|
62
|
+
// app/layout.tsx
|
|
63
|
+
import { AtlasProvider } from "veloria-ui/provider";
|
|
64
|
+
|
|
65
|
+
export default function RootLayout({ children }) {
|
|
66
|
+
return (
|
|
67
|
+
<html lang="en">
|
|
68
|
+
<body>
|
|
69
|
+
<AtlasProvider>{children}</AtlasProvider>
|
|
70
|
+
</body>
|
|
71
|
+
</html>
|
|
72
|
+
);
|
|
73
|
+
}
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### 4. Start building
|
|
77
|
+
|
|
78
|
+
```tsx
|
|
79
|
+
import { Button, Card, CardContent, Input, Badge } from "veloria-ui";
|
|
80
|
+
|
|
81
|
+
export default function Page() {
|
|
82
|
+
return (
|
|
83
|
+
<Card>
|
|
84
|
+
<CardContent className="flex flex-col gap-4 p-6">
|
|
85
|
+
<Badge variant="soft" color="success">New</Badge>
|
|
86
|
+
<Input placeholder="Email address" type="email" />
|
|
87
|
+
<Button variant="solid" size="lg">Get started</Button>
|
|
88
|
+
</CardContent>
|
|
89
|
+
</Card>
|
|
90
|
+
);
|
|
91
|
+
}
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
---
|
|
95
|
+
|
|
96
|
+
## CLI
|
|
97
|
+
|
|
98
|
+
veloria-ui ships with a CLI that copies components straight into your project — shadcn-style. You own the code.
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
# Set up veloria-ui in your project (writes atlas.config.json)
|
|
102
|
+
npx veloria-ui init
|
|
103
|
+
|
|
104
|
+
# Add components
|
|
105
|
+
npx veloria-ui add button
|
|
106
|
+
npx veloria-ui add card modal drawer toast
|
|
107
|
+
|
|
108
|
+
# Browse all 102 components
|
|
109
|
+
npx veloria-ui list
|
|
110
|
+
npx veloria-ui list --category forms
|
|
111
|
+
|
|
112
|
+
# Compare your local copy to the latest version
|
|
113
|
+
npx veloria-ui diff button
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
After running `add`, a file like `components/ui/button/index.tsx` appears in your project. It re-exports from `veloria-ui` by default, or you can paste the full source in and go wild.
|
|
117
|
+
|
|
118
|
+
---
|
|
119
|
+
|
|
120
|
+
## Components (90)
|
|
121
|
+
|
|
122
|
+
### Basic (10)
|
|
123
|
+
`Button` `IconButton` `Link` `Badge` `Avatar` `AvatarGroup` `Divider` `Tag` `Chip` `Tooltip`
|
|
124
|
+
|
|
125
|
+
### Layout (10)
|
|
126
|
+
`Container` `Stack` `Grid` `Flex` `Section` `Spacer` `AspectRatio` `Center` `ScrollArea` `Masonry`
|
|
127
|
+
|
|
128
|
+
### Navigation (10)
|
|
129
|
+
`Navbar` `Sidebar` `Menu` `DropdownMenu` `Breadcrumb` `Pagination` `Tabs` `CommandPalette` `NavigationMenu` `Stepper`
|
|
130
|
+
|
|
131
|
+
### Forms (10)
|
|
132
|
+
`Input` `TextArea` `Select` `Checkbox` `RadioGroup` `Switch` `Slider` `RangeSlider` `DatePicker` `TimePicker`
|
|
133
|
+
|
|
134
|
+
### Advanced Forms (10)
|
|
135
|
+
`FileUpload` `OTPInput` `ColorPicker` `SearchInput` `PasswordInput` `Combobox` `MultiSelect` `FormField` `FormLabel` `FormError`
|
|
136
|
+
|
|
137
|
+
### Data Display (10)
|
|
138
|
+
`Card` `Table` `DataTable` `List` `ListItem` `Statistic` `Timeline` `Calendar` `Chart` `CodeBlock`
|
|
139
|
+
|
|
140
|
+
### Feedback (10)
|
|
141
|
+
`Alert` `Toast` `Snackbar` `Progress` `CircularProgress` `Skeleton` `LoadingSpinner` `EmptyState` `StatusIndicator` `Notification`
|
|
142
|
+
|
|
143
|
+
### Overlay (10)
|
|
144
|
+
`Modal` `Dialog` `Drawer` `Popover` `HoverCard` `ContextMenu` `CommandDialog` `Sheet` `Lightbox` `ImageViewer`
|
|
145
|
+
|
|
146
|
+
### Media (5)
|
|
147
|
+
`Image` `VideoPlayer` `AudioPlayer` `Carousel` `Gallery`
|
|
148
|
+
|
|
149
|
+
### Utility (5)
|
|
150
|
+
`ThemeSwitcher` `CopyButton` `KeyboardShortcut` `ResizablePanel` `DragDropArea`
|
|
151
|
+
|
|
152
|
+
---
|
|
153
|
+
|
|
154
|
+
## Hooks
|
|
155
|
+
|
|
156
|
+
```tsx
|
|
157
|
+
import {
|
|
158
|
+
useDisclosure, // open/close state for modals, drawers, anything toggle
|
|
159
|
+
useMediaQuery, // subscribe to any CSS media query
|
|
160
|
+
useBreakpoint, // Tailwind breakpoint detection (sm, md, lg, xl, 2xl)
|
|
161
|
+
useClipboard, // clipboard copy with "copied!" feedback
|
|
162
|
+
useLocalStorage, // useState that persists to localStorage
|
|
163
|
+
useTheme, // read/set light · dark · system theme
|
|
164
|
+
useDebounce, // debounce any value — perfect for search inputs
|
|
165
|
+
useOnClickOutside, // detect clicks outside a ref'd element
|
|
166
|
+
useKeydown, // keyboard shortcut listener with modifier support
|
|
167
|
+
useMounted, // SSR-safe mount check
|
|
168
|
+
useToast, // fire toasts programmatically
|
|
169
|
+
} from "veloria-ui";
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
---
|
|
173
|
+
|
|
174
|
+
## Theming
|
|
175
|
+
|
|
176
|
+
All colors are CSS custom properties. Override them in your global CSS:
|
|
177
|
+
|
|
178
|
+
```css
|
|
179
|
+
:root {
|
|
180
|
+
/* swap in your brand color */
|
|
181
|
+
--primary: 262 83% 58%;
|
|
182
|
+
--primary-foreground: 0 0% 100%;
|
|
183
|
+
|
|
184
|
+
/* rounder corners */
|
|
185
|
+
--radius: 0.75rem;
|
|
186
|
+
}
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
Full token list: `--background` `--foreground` `--primary` `--secondary` `--muted` `--accent` `--destructive` `--success` `--warning` `--info` `--border` `--input` `--ring` `--radius`.
|
|
190
|
+
|
|
191
|
+
---
|
|
192
|
+
|
|
193
|
+
## Dark Mode
|
|
194
|
+
|
|
195
|
+
Uses the `class` strategy — add `dark` to `<html>` and everything flips automatically.
|
|
196
|
+
|
|
197
|
+
```tsx
|
|
198
|
+
import { useTheme, ThemeSwitcher } from "veloria-ui";
|
|
199
|
+
|
|
200
|
+
function Header() {
|
|
201
|
+
const { theme, setTheme } = useTheme();
|
|
202
|
+
return <ThemeSwitcher value={theme} onChange={setTheme} variant="toggle" />;
|
|
203
|
+
}
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
---
|
|
207
|
+
|
|
208
|
+
## Package Structure
|
|
209
|
+
|
|
210
|
+
```
|
|
211
|
+
veloria-ui/
|
|
212
|
+
├── src/
|
|
213
|
+
│ ├── components/
|
|
214
|
+
│ │ ├── basic/ Button, IconButton, Badge, Avatar, Tooltip…
|
|
215
|
+
│ │ ├── layout/ Container, Stack, Grid, ScrollArea, Masonry…
|
|
216
|
+
│ │ ├── navigation/ Navbar, Tabs, DropdownMenu, Stepper…
|
|
217
|
+
│ │ ├── forms/ Input, Select, Checkbox, Slider, Switch…
|
|
218
|
+
│ │ ├── advanced-forms/ OTPInput, ColorPicker, Combobox, MultiSelect…
|
|
219
|
+
│ │ ├── data-display/ Card, DataTable, Timeline, Calendar, CodeBlock…
|
|
220
|
+
│ │ ├── feedback/ Alert, Toast, Skeleton, EmptyState, Progress…
|
|
221
|
+
│ │ ├── overlay/ Modal, Drawer, CommandDialog, Lightbox…
|
|
222
|
+
│ │ ├── media/ VideoPlayer, AudioPlayer, Carousel, Gallery…
|
|
223
|
+
│ │ └── utility/ ThemeSwitcher, CopyButton, ResizablePanel…
|
|
224
|
+
│ ├── hooks/ 18 utility hooks
|
|
225
|
+
│ ├── styles/ atlas.css — full design token system
|
|
226
|
+
│ ├── types/ shared TypeScript types
|
|
227
|
+
│ ├── utils/ cn() and helpers
|
|
228
|
+
│ ├── cli/ veloria-ui CLI (add, init, list, diff)
|
|
229
|
+
│ ├── provider.tsx AtlasProvider for Next.js
|
|
230
|
+
│ └── tailwind.ts atlasPlugin + atlasPreset
|
|
231
|
+
├── package.json
|
|
232
|
+
├── tsup.config.ts
|
|
233
|
+
└── tsconfig.json
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
---
|
|
237
|
+
|
|
238
|
+
## Contributing
|
|
239
|
+
|
|
240
|
+
Issues and PRs welcome.
|
|
241
|
+
→ [github.com/JohnDev19/Veloria-UI/issues](https://github.com/JohnDev19/Veloria-UI/issues)
|
|
242
|
+
|
|
243
|
+
---
|
|
244
|
+
|
|
245
|
+
## License
|
|
246
|
+
|
|
247
|
+
MIT © [JohnDev19](https://github.com/JohnDev19)
|
|
248
|
+
|
|
249
|
+
---
|
|
250
|
+
|
|
251
|
+
<div align="center">
|
|
252
|
+
<sub>Built by JohnDev19</sub>
|
|
253
|
+
</div>
|