@vuetify/v0 0.0.2-beta.4 → 0.0.3

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 (52) hide show
  1. package/README.md +251 -0
  2. package/dist/browser/index.js +3199 -0
  3. package/dist/components/index.d.ts +7 -0
  4. package/dist/components/index.js +8 -0
  5. package/dist/{components-B5iiovK7.mjs → components-DVuB4lnH.js} +16 -217
  6. package/dist/composables/index.d.ts +7 -0
  7. package/dist/composables/index.js +8 -0
  8. package/dist/composables-yeVk-ULz.js +1270 -0
  9. package/dist/constants/index.d.ts +2 -0
  10. package/dist/constants/index.js +5 -0
  11. package/dist/constants-DiTCgvMU.js +1 -0
  12. package/dist/factories/index.d.ts +2 -0
  13. package/dist/factories/index.js +3 -0
  14. package/dist/{createTrinity-CwGvQ2ng.mjs → factories-BEpawPUw.js} +32 -15
  15. package/dist/globals-DZvNEOB4.js +12 -0
  16. package/dist/htmlElements-SjqYu0am.js +78 -0
  17. package/dist/{index-D4Grk5x1.d.mts → index-BozA2pze.d.ts} +1 -1
  18. package/dist/index-Ckt12ON6.d.ts +75 -0
  19. package/dist/index-D0L_ydyW.d.ts +1396 -0
  20. package/dist/index-DVKeyWc5.d.ts +79 -0
  21. package/dist/index.d.ts +7 -0
  22. package/dist/index.js +11 -0
  23. package/dist/transformers/index.d.ts +2 -0
  24. package/dist/transformers/index.js +4 -0
  25. package/dist/{transformers-BTjuwbOV.mjs → transformers-CWrxLIkw.js} +2 -2
  26. package/dist/types/{index.d.mts → index.d.ts} +1 -1
  27. package/dist/types/index.js +1 -0
  28. package/dist/{useTheme-tY7MoBKr.mjs → useTheme-DCXkw_kv.js} +214 -204
  29. package/dist/utilities/{index.d.mts → index.d.ts} +2 -2
  30. package/dist/utilities/{index.mjs → index.js} +1 -1
  31. package/package.json +20 -35
  32. package/dist/components/index.d.mts +0 -5
  33. package/dist/components/index.mjs +0 -7
  34. package/dist/composables/index.d.mts +0 -5
  35. package/dist/composables/index.mjs +0 -7
  36. package/dist/composables-C6dl5kjP.mjs +0 -614
  37. package/dist/factories/index.d.mts +0 -3
  38. package/dist/factories/index.mjs +0 -4
  39. package/dist/factories-DOLmqhVS.mjs +0 -0
  40. package/dist/index-ChaaTPKp.d.mts +0 -421
  41. package/dist/index-Cya5Y9pB.d.mts +0 -412
  42. package/dist/index-DfahEz6s.d.mts +0 -18
  43. package/dist/index-jG0yrC1F.d.mts +0 -467
  44. package/dist/index-oCBJwhpG.d.mts +0 -43
  45. package/dist/index.d.mts +0 -9
  46. package/dist/index.mjs +0 -9
  47. package/dist/transformers/index.d.mts +0 -2
  48. package/dist/transformers/index.mjs +0 -4
  49. package/dist/types/index.mjs +0 -0
  50. /package/dist/{index-BA3ZFBnL.d.mts → index-LBy5OPMu.d.ts} +0 -0
  51. /package/dist/{index-CZRh0I2w.d.mts → index-tUyghL98.d.ts} +0 -0
  52. /package/dist/{utilities-lZSfrXgw.mjs → utilities-D9rWEgQK.js} +0 -0
package/README.md ADDED
@@ -0,0 +1,251 @@
1
+ <div align="center">
2
+ <picture>
3
+ <source media="(prefers-color-scheme: dark)" srcset="https://vuetifyjs.b-cdn.net/docs/images/logos/vzero-logo-dark.png">
4
+ <img alt="Vuetify One Logo" src="https://vuetifyjs.b-cdn.net/docs/images/logos/vzero-logo-light.png" height="150">
5
+ </picture>
6
+ </div>
7
+
8
+ # @vuetify/v0
9
+
10
+ Core foundational package from providing components and composables for building modern applications. `@vuetify/v0` is the foundational layer of the Vuetify ecosystem, offering lightweight, headless building blocks with TypeScript support and accessibility features built-in that serve as building blocks for higher-order UI libraries and custom design systems.
11
+
12
+ ## 🚀 Installation
13
+
14
+ ```bash
15
+ npm install @vuetify/v0
16
+ # or
17
+ pnpm add @vuetify/v0
18
+ # or
19
+ yarn add @vuetify/v0
20
+ ```
21
+
22
+ ## 📦 What's Included
23
+
24
+ ### Components
25
+
26
+ - **`Atom`** - Base element wrapper with renderless capabilities
27
+ - **`Breakpoints`** - Responsive breakpoint utilities
28
+ - **`Context`** - Context injection/provision system
29
+ - **`Group`** - Selection grouping with multiple/single modes
30
+ - **`Hydration`** - Client-side hydration utilities
31
+ - **`Popover`** - CSS anchor-positioned popup components
32
+ - **`Step`** - Step-based navigation system
33
+ - **`Theme`** - Theme management and CSS variable injection
34
+
35
+ ### Composables
36
+
37
+ - **`useBreakpoints`** - Responsive breakpoint detection
38
+ - **`createContext`** - Type-safe context management
39
+ - **`useEventListener`** - Event listener utilities
40
+ - **`useFilter`** - Collection filtering utilities
41
+ - **`useForm`** - Form validation and management
42
+ - **`useGroup`** - Selection group management
43
+ - **`useHydration`** - SSR hydration helpers
44
+ - **`useIntersectionObserver`** - Intersection observer utilities
45
+ - **`useKeydown`** - Keyboard event handling
46
+ - **`useLocale`** - Internationalization support
47
+ - **`useLogger`** - Development logging utilities
48
+ - **`useMutationObserver`** - DOM mutation observation
49
+ - **`useProxyModel`** - Model proxy utilities
50
+ - **`useRegistry`** - Component registration system
51
+ - **`useResizeObserver`** - Resize observer utilities
52
+ - **`useSelection`** - Selection management
53
+ - **`useSingle`** - Single selection utilities
54
+ - **`useStep`** - Step navigation logic
55
+ - **`useStorage`** - Local/session storage utilities
56
+ - **`useTheme`** - Theme switching and CSS variable management
57
+ - **`useTokens`** - Design token system
58
+
59
+ ### Factories
60
+
61
+ - **`createContext`** - Context factory with type safety
62
+ - **`createPlugin`** - Vue plugin factory
63
+ - **`createRootProvider`** - Root provider factory
64
+ - **`createTrinity`** - Trinity pattern factory
65
+
66
+ ### Transformers
67
+
68
+ - **`toArray`** - Array transformation utilities
69
+ - **`toReactive`** - Reactive object conversion
70
+
71
+ ### Utilities
72
+
73
+ - **Type guards** - `isString`, `isNumber`, `isObject`, etc.
74
+ - **Object utilities** - `mergeDeep`, `genId`
75
+ - **Performance utilities** - Benchmarking tools
76
+
77
+
78
+ ## 📖 Basic Usage
79
+
80
+ ### Theme Setup
81
+
82
+ ```vue
83
+ <script setup>
84
+ import { createThemePlugin } from '@vuetify/v0'
85
+
86
+ // Install theme plugin in your main.js
87
+ app.use(createThemePlugin({
88
+ default: 'light',
89
+ themes: {
90
+ light: {
91
+ colors: {
92
+ primary: '#1976d2',
93
+ secondary: '#424242',
94
+ background: '#ffffff'
95
+ }
96
+ },
97
+ dark: {
98
+ colors: {
99
+ primary: '#2196f3',
100
+ secondary: '#616161',
101
+ background: '#121212'
102
+ }
103
+ }
104
+ }
105
+ }))
106
+ </script>
107
+ ```
108
+
109
+ ### Using Components
110
+
111
+ ```vue
112
+ <script setup>
113
+ import { Atom, Group, Step } from '@vuetify/v0'
114
+ import { ref } from 'vue'
115
+
116
+ const selectedItems = ref([])
117
+ const currentStep = ref(0)
118
+ </script>
119
+
120
+ <template>
121
+ <!-- Base Atom component -->
122
+ <Atom as="section" class="container">
123
+ <h1>My Application</h1>
124
+ </Atom>
125
+
126
+ <!-- Group selection -->
127
+ <Group v-model="selectedItems" multiple>
128
+ <template #default="{ select, isSelected }">
129
+ <button
130
+ v-for="item in items"
131
+ :key="item.id"
132
+ @click="select(item.id)"
133
+ :class="{ active: isSelected(item.id) }"
134
+ >
135
+ {{ item.name }}
136
+ </button>
137
+ </template>
138
+ </Group>
139
+
140
+ <!-- Step navigation -->
141
+ <Step v-model="currentStep" :max="3">
142
+ <template #default="{ step, next, prev, canNext, canPrev }">
143
+ <div class="step-content">
144
+ Step {{ step + 1 }} content
145
+ </div>
146
+ <div class="step-actions">
147
+ <button @click="prev" :disabled="!canPrev">Previous</button>
148
+ <button @click="next" :disabled="!canNext">Next</button>
149
+ </div>
150
+ </template>
151
+ </Step>
152
+ </template>
153
+ ```
154
+
155
+ ### Using Composables
156
+
157
+ ```vue
158
+ <script setup>
159
+ import { useBreakpoints, useTheme, useForm } from '@vuetify/v0'
160
+ import { ref } from 'vue'
161
+
162
+ // Responsive breakpoints
163
+ const { isMobile, mdAndUp } = useBreakpoints()
164
+
165
+ // Theme management
166
+ const { theme, setTheme, colors } = useTheme()
167
+
168
+ // Form management
169
+ const { register, validate, errors } = useForm({
170
+ validateOn: 'change'
171
+ })
172
+
173
+ const email = ref('')
174
+ const password = ref('')
175
+
176
+ // Register form fields
177
+ register('email', email, [
178
+ (value) => !!value || 'Email is required',
179
+ (value) => /.+@.+\..+/.test(value) || 'Email must be valid'
180
+ ])
181
+
182
+ register('password', password, [
183
+ (value) => !!value || 'Password is required',
184
+ (value) => value.length >= 8 || 'Password must be at least 8 characters'
185
+ ])
186
+
187
+ const handleSubmit = async () => {
188
+ const isValid = await validate()
189
+ if (isValid) {
190
+ // Submit form
191
+ }
192
+ }
193
+ </script>
194
+
195
+ <template>
196
+ <div :class="{ mobile: isMobile, desktop: mdAndUp }">
197
+ <button @click="setTheme(theme === 'light' ? 'dark' : 'light')">
198
+ Toggle Theme ({{ theme }})
199
+ </button>
200
+
201
+ <form @submit.prevent="handleSubmit">
202
+ <input
203
+ v-model="email"
204
+ type="email"
205
+ placeholder="Email"
206
+ :style="{ borderColor: colors.primary }"
207
+ />
208
+ <div v-if="errors.email" class="error">{{ errors.email[0] }}</div>
209
+
210
+ <input
211
+ v-model="password"
212
+ type="password"
213
+ placeholder="Password"
214
+ />
215
+ <div v-if="errors.password" class="error">{{ errors.password[0] }}</div>
216
+
217
+ <button type="submit">Submit</button>
218
+ </form>
219
+ </div>
220
+ </template>
221
+ ```
222
+
223
+ ## 🏗️ Design Principles
224
+
225
+ - **Headless First**: Components provide logic and accessibility without imposed styling
226
+ - **Slot-Driven**: Maximum flexibility through comprehensive slot APIs
227
+ - **CSS Variables**: All styling configurable via CSS custom properties
228
+ - **TypeScript Native**: Full type safety with excellent developer experience
229
+ - **Minimal Dependencies**: Lightweight with only essential peer dependencies
230
+ - **Composable Architecture**: Reusable logic through Vue 3 composables
231
+
232
+ ## 📚 API Reference
233
+
234
+ For detailed API documentation, type definitions, and examples, visit our [documentation site](https://0.vuetifyjs.com) or explore the TypeScript definitions included in this package.
235
+
236
+ ## 🔗 Related Packages
237
+
238
+ - **[@vuetify/paper](https://npmjs.com/package/@vuetify/paper)** - Styling and layout primitives
239
+ - **[Vuetify 3](https://vuetifyjs.com)** - Full-featured Material Design component library
240
+
241
+ ## 🤝 Contributing
242
+
243
+ Contributions are welcome! Please read our contributing guidelines and ensure all tests pass before submitting a pull request.
244
+
245
+ ## 📄 License
246
+
247
+ MIT License
248
+
249
+ ---
250
+
251
+ Built with ❤️ for the Vue ecosystem. Part of the Vuetify family.