@sfxcode/nuxt-ui-formkit 0.8.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 (116) hide show
  1. package/LICENSE +22 -0
  2. package/README.md +430 -0
  3. package/dist/module.d.mts +7 -0
  4. package/dist/module.d.ts +7 -0
  5. package/dist/module.json +12 -0
  6. package/dist/module.mjs +29 -0
  7. package/dist/runtime/components/FUDataDebug.d.vue.ts +43 -0
  8. package/dist/runtime/components/FUDataDebug.vue +32 -0
  9. package/dist/runtime/components/FUDataDebug.vue.d.ts +43 -0
  10. package/dist/runtime/components/FUDataEdit.d.vue.ts +180 -0
  11. package/dist/runtime/components/FUDataEdit.vue +143 -0
  12. package/dist/runtime/components/FUDataEdit.vue.d.ts +180 -0
  13. package/dist/runtime/components/FUDataView.d.vue.ts +73 -0
  14. package/dist/runtime/components/FUDataView.vue +59 -0
  15. package/dist/runtime/components/FUDataView.vue.d.ts +73 -0
  16. package/dist/runtime/components/inputs/FUCheckbox.d.vue.ts +27 -0
  17. package/dist/runtime/components/inputs/FUCheckbox.vue +44 -0
  18. package/dist/runtime/components/inputs/FUCheckbox.vue.d.ts +27 -0
  19. package/dist/runtime/components/inputs/FUCheckboxGroup.d.vue.ts +38 -0
  20. package/dist/runtime/components/inputs/FUCheckboxGroup.vue +45 -0
  21. package/dist/runtime/components/inputs/FUCheckboxGroup.vue.d.ts +38 -0
  22. package/dist/runtime/components/inputs/FUColorPicker.d.vue.ts +22 -0
  23. package/dist/runtime/components/inputs/FUColorPicker.vue +27 -0
  24. package/dist/runtime/components/inputs/FUColorPicker.vue.d.ts +22 -0
  25. package/dist/runtime/components/inputs/FUInput.d.vue.ts +44 -0
  26. package/dist/runtime/components/inputs/FUInput.vue +61 -0
  27. package/dist/runtime/components/inputs/FUInput.vue.d.ts +44 -0
  28. package/dist/runtime/components/inputs/FUInputDate.d.vue.ts +51 -0
  29. package/dist/runtime/components/inputs/FUInputDate.vue +63 -0
  30. package/dist/runtime/components/inputs/FUInputDate.vue.d.ts +51 -0
  31. package/dist/runtime/components/inputs/FUInputMenu.d.vue.ts +73 -0
  32. package/dist/runtime/components/inputs/FUInputMenu.vue +76 -0
  33. package/dist/runtime/components/inputs/FUInputMenu.vue.d.ts +73 -0
  34. package/dist/runtime/components/inputs/FUInputNumber.d.vue.ts +43 -0
  35. package/dist/runtime/components/inputs/FUInputNumber.vue +60 -0
  36. package/dist/runtime/components/inputs/FUInputNumber.vue.d.ts +43 -0
  37. package/dist/runtime/components/inputs/FUInputTags.d.vue.ts +47 -0
  38. package/dist/runtime/components/inputs/FUInputTags.vue +64 -0
  39. package/dist/runtime/components/inputs/FUInputTags.vue.d.ts +47 -0
  40. package/dist/runtime/components/inputs/FUInputTime.d.vue.ts +50 -0
  41. package/dist/runtime/components/inputs/FUInputTime.vue +61 -0
  42. package/dist/runtime/components/inputs/FUInputTime.vue.d.ts +50 -0
  43. package/dist/runtime/components/inputs/FUPinInput.d.vue.ts +30 -0
  44. package/dist/runtime/components/inputs/FUPinInput.vue +37 -0
  45. package/dist/runtime/components/inputs/FUPinInput.vue.d.ts +30 -0
  46. package/dist/runtime/components/inputs/FURadioGroup.d.vue.ts +37 -0
  47. package/dist/runtime/components/inputs/FURadioGroup.vue +46 -0
  48. package/dist/runtime/components/inputs/FURadioGroup.vue.d.ts +37 -0
  49. package/dist/runtime/components/inputs/FUSelect.d.vue.ts +48 -0
  50. package/dist/runtime/components/inputs/FUSelect.vue +62 -0
  51. package/dist/runtime/components/inputs/FUSelect.vue.d.ts +48 -0
  52. package/dist/runtime/components/inputs/FUSelectMenu.d.vue.ts +73 -0
  53. package/dist/runtime/components/inputs/FUSelectMenu.vue +73 -0
  54. package/dist/runtime/components/inputs/FUSelectMenu.vue.d.ts +73 -0
  55. package/dist/runtime/components/inputs/FUSlider.d.vue.ts +29 -0
  56. package/dist/runtime/components/inputs/FUSlider.vue +36 -0
  57. package/dist/runtime/components/inputs/FUSlider.vue.d.ts +29 -0
  58. package/dist/runtime/components/inputs/FUSwitch.d.vue.ts +28 -0
  59. package/dist/runtime/components/inputs/FUSwitch.vue +45 -0
  60. package/dist/runtime/components/inputs/FUSwitch.vue.d.ts +28 -0
  61. package/dist/runtime/components/inputs/FUTextarea.d.vue.ts +44 -0
  62. package/dist/runtime/components/inputs/FUTextarea.vue +61 -0
  63. package/dist/runtime/components/inputs/FUTextarea.vue.d.ts +44 -0
  64. package/dist/runtime/components/output/FUIcon.d.vue.ts +38 -0
  65. package/dist/runtime/components/output/FUIcon.vue +20 -0
  66. package/dist/runtime/components/output/FUIcon.vue.d.ts +38 -0
  67. package/dist/runtime/components/output/FUOutputBoolean.d.vue.ts +30 -0
  68. package/dist/runtime/components/output/FUOutputBoolean.vue +56 -0
  69. package/dist/runtime/components/output/FUOutputBoolean.vue.d.ts +30 -0
  70. package/dist/runtime/components/output/FUOutputDate.d.vue.ts +30 -0
  71. package/dist/runtime/components/output/FUOutputDate.vue +52 -0
  72. package/dist/runtime/components/output/FUOutputDate.vue.d.ts +30 -0
  73. package/dist/runtime/components/output/FUOutputLink.d.vue.ts +28 -0
  74. package/dist/runtime/components/output/FUOutputLink.vue +78 -0
  75. package/dist/runtime/components/output/FUOutputLink.vue.d.ts +28 -0
  76. package/dist/runtime/components/output/FUOutputList.d.vue.ts +29 -0
  77. package/dist/runtime/components/output/FUOutputList.vue +143 -0
  78. package/dist/runtime/components/output/FUOutputList.vue.d.ts +29 -0
  79. package/dist/runtime/components/output/FUOutputNumber.d.vue.ts +28 -0
  80. package/dist/runtime/components/output/FUOutputNumber.vue +52 -0
  81. package/dist/runtime/components/output/FUOutputNumber.vue.d.ts +28 -0
  82. package/dist/runtime/components/output/FUOutputText.d.vue.ts +27 -0
  83. package/dist/runtime/components/output/FUOutputText.vue +90 -0
  84. package/dist/runtime/components/output/FUOutputText.vue.d.ts +27 -0
  85. package/dist/runtime/composables/useFormKitRepeater.d.ts +5 -0
  86. package/dist/runtime/composables/useFormKitRepeater.js +53 -0
  87. package/dist/runtime/composables/useFormKitSchema.d.ts +26 -0
  88. package/dist/runtime/composables/useFormKitSchema.js +58 -0
  89. package/dist/runtime/formkit/definitions/index.d.ts +28 -0
  90. package/dist/runtime/formkit/definitions/index.js +30 -0
  91. package/dist/runtime/formkit/definitions/index.mjs +30 -0
  92. package/dist/runtime/formkit/definitions/input.d.ts +17 -0
  93. package/dist/runtime/formkit/definitions/input.js +81 -0
  94. package/dist/runtime/formkit/definitions/input.mjs +81 -0
  95. package/dist/runtime/formkit/definitions/output.d.ts +7 -0
  96. package/dist/runtime/formkit/definitions/output.js +31 -0
  97. package/dist/runtime/formkit/definitions/output.mjs +31 -0
  98. package/dist/runtime/formkit/index.d.ts +93 -0
  99. package/dist/runtime/formkit/index.js +2 -0
  100. package/dist/runtime/formkit/index.mjs +2 -0
  101. package/dist/runtime/formkit/plugins/index.d.ts +3 -0
  102. package/dist/runtime/formkit/plugins/index.js +55 -0
  103. package/dist/runtime/formkit/plugins/index.mjs +55 -0
  104. package/dist/runtime/plugin.d.ts +2 -0
  105. package/dist/runtime/plugin.js +3 -0
  106. package/dist/runtime/server/tsconfig.json +3 -0
  107. package/dist/runtime/utils/colorConverter.d.ts +5 -0
  108. package/dist/runtime/utils/colorConverter.js +134 -0
  109. package/dist/runtime/utils/durationConverter.d.ts +2 -0
  110. package/dist/runtime/utils/durationConverter.js +32 -0
  111. package/dist/runtime/utils/useFormKitInput.d.ts +13 -0
  112. package/dist/runtime/utils/useFormKitInput.js +42 -0
  113. package/dist/runtime/utils/useFormKitOutput.d.ts +10 -0
  114. package/dist/runtime/utils/useFormKitOutput.js +73 -0
  115. package/dist/types.d.mts +3 -0
  116. package/package.json +114 -0
package/LICENSE ADDED
@@ -0,0 +1,22 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024-present sfxcode (Tom)
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.
22
+
package/README.md ADDED
@@ -0,0 +1,430 @@
1
+ # FormKit Nuxt UI
2
+
3
+ [![npm version][npm-version-src]][npm-version-href]
4
+ [![npm downloads][npm-downloads-src]][npm-downloads-href]
5
+ [![License][license-src]][license-href]
6
+ [![Nuxt][nuxt-src]][nuxt-href]
7
+
8
+ > **⚠️ Work in Progress**: This project is under active development. APIs, components, and features may change without notice. While the core functionality is stable, expect breaking changes in minor versions until v1.0.0 is released. Use with caution in production environments.
9
+
10
+ > Seamless integration between FormKit form handling and Nuxt UI components for Nuxt 4
11
+
12
+ FormKit Nuxt UI bridges the gap between [FormKit](https://formkit.com/)'s powerful form management and [Nuxt UI](https://ui.nuxt.com/)'s beautiful component library, providing a complete solution for building forms in Nuxt applications.
13
+
14
+ - [✨  Release Notes](/CHANGELOG.md)
15
+ - [🏀  Live Playground](https://github.com/sfxcode/nuxt-ui-formkit/tree/main/playground)
16
+ - [📖  FormKit Documentation](https://formkit.com/)
17
+ - [🎨  Nuxt UI Documentation](https://ui.nuxt.com/)
18
+
19
+ <img src="nuxt-ui-formkit.png" alt="FormKit Nuxt UI Screenshot" width="70%" />
20
+
21
+ ## Features
22
+
23
+ ✨ **16 Input Components** - Complete set of FormKit-wrapped Nuxt UI input components
24
+ - `nuxtUICheckbox` - Single checkbox with label and description
25
+ - `nuxtUICheckboxGroup` - Multiple checkbox selection
26
+ - `nuxtUIColorPicker` - Color selection with multiple formats
27
+ - `nuxtUIInput` - Text input with various types (text, email, password, etc.)
28
+ - `nuxtUIInputDate` - Date and time picker with range support
29
+ - `nuxtUIInputMenu` - Dropdown menu with searchable options
30
+ - `nuxtUIInputNumber` - Number input with increment/decrement buttons
31
+ - `nuxtUIInputTags` - Tag input with custom delimiters
32
+ - `nuxtUIInputTime` - Time picker with 12/24-hour format
33
+ - `nuxtUIPinInput` - PIN/OTP entry component
34
+ - `nuxtUIRadioGroup` - Radio button group for single selection
35
+ - `nuxtUISelect` - Select dropdown with search
36
+ - `nuxtUISelectMenu` - Advanced select with grouping
37
+ - `nuxtUISlider` - Range slider for numeric values
38
+ - `nuxtUISwitch` - Toggle switch for boolean states
39
+ - `nuxtUITextarea` - Multi-line text input with autoresize
40
+
41
+ 📊 **6 Output Components** - Display-only components for read-only data
42
+ - `nuxtUIOutputBoolean` - Boolean display with custom icons
43
+ - `nuxtUIOutputDate` - Formatted date/time display
44
+ - `nuxtUIOutputLink` - URL display with navigation
45
+ - `nuxtUIOutputList` - List display with separators and badge styles
46
+ - `nuxtUIOutputNumber` - Formatted number display (currency, percentage)
47
+ - `nuxtUIOutputText` - Styled text display with icons
48
+
49
+ 🎯 **Form Management** - Powerful form utilities
50
+ - `FUDataEdit` - Edit forms with schema-based configuration
51
+ - `FUDataView` - Read-only data display with schema support
52
+ - `FUDataDebug` - Development tool for form debugging
53
+
54
+ 🔧 **Composables** - Reusable form logic
55
+ - `useFormKitInput` - Input component utilities
56
+ - `useFormKitOutput` - Output component utilities
57
+ - `useFormKitRepeater` - Repeatable form sections
58
+ - `useFormKitSchema` - Schema-based form generation
59
+
60
+ 🎨 **Full Nuxt UI Integration** - All components respect Nuxt UI theming
61
+ - Color modes (light/dark)
62
+ - Design tokens
63
+ - Accessibility features
64
+ - Responsive design
65
+
66
+ ✅ **TypeScript Support** - Full type safety with IntelliSense
67
+ ⚡ **SSR Compatible** - Works seamlessly with Nuxt's server-side rendering
68
+ 🔄 **Auto-imports** - Components and composables auto-imported
69
+ 📝 **Validation** - Built-in FormKit validation support
70
+
71
+ ## Quick Setup
72
+
73
+ Install the module to your Nuxt application:
74
+
75
+ ```bash
76
+ # Using pnpm (recommended)
77
+ pnpm add @sfxcode/nuxt-ui-formkit
78
+
79
+ # Using npm
80
+ npm install @sfxcode/nuxt-ui-formkit
81
+
82
+ # Using yarn
83
+ yarn add @sfxcode/nuxt-ui-formkit
84
+ ```
85
+
86
+ Add the module to your `nuxt.config.ts`:
87
+
88
+ ```typescript
89
+ export default defineNuxtConfig({
90
+ modules: [
91
+ '@nuxt/ui',
92
+ '@sfxcode/nuxt-ui-formkit'
93
+ ]
94
+ })
95
+ ```
96
+
97
+ That's it! You can now use FormKit Nuxt UI components in your Nuxt app ✨
98
+
99
+ ## Usage
100
+
101
+ ### Basic Form Example
102
+
103
+ ```vue
104
+ <template>
105
+ <FormKit
106
+ type="form"
107
+ @submit="handleSubmit"
108
+ >
109
+ <FormKit
110
+ type="nuxtUIInput"
111
+ name="email"
112
+ label="Email Address"
113
+ placeholder="your.email@example.com"
114
+ validation="required|email"
115
+ />
116
+
117
+ <FormKit
118
+ type="nuxtUIInput"
119
+ name="password"
120
+ input-type="password"
121
+ label="Password"
122
+ validation="required|length:8"
123
+ />
124
+
125
+ <FormKit
126
+ type="nuxtUICheckbox"
127
+ name="terms"
128
+ label="I agree to the terms and conditions"
129
+ validation="accepted"
130
+ />
131
+
132
+ <UButton type="submit">
133
+ Sign Up
134
+ </UButton>
135
+ </FormKit>
136
+ </template>
137
+
138
+ <script setup lang="ts">
139
+ const handleSubmit = (data: any) => {
140
+ console.log('Form submitted:', data)
141
+ }
142
+ </script>
143
+ ```
144
+
145
+ ### Schema-Based Form
146
+
147
+ ```vue
148
+ <template>
149
+ <FUDataEdit
150
+ :data="formData"
151
+ :schema="userSchema"
152
+ @submit="handleSubmit"
153
+ />
154
+ </template>
155
+
156
+ <script setup lang="ts">
157
+ const formData = ref({
158
+ name: '',
159
+ email: '',
160
+ age: 0,
161
+ subscribe: false
162
+ })
163
+
164
+ const userSchema = [
165
+ {
166
+ $formkit: 'nuxtUIInput',
167
+ name: 'name',
168
+ label: 'Full Name',
169
+ validation: 'required'
170
+ },
171
+ {
172
+ $formkit: 'nuxtUIInput',
173
+ name: 'email',
174
+ inputType: 'email',
175
+ label: 'Email',
176
+ validation: 'required|email'
177
+ },
178
+ {
179
+ $formkit: 'nuxtUIInputNumber',
180
+ name: 'age',
181
+ label: 'Age',
182
+ min: 0,
183
+ max: 120
184
+ },
185
+ {
186
+ $formkit: 'nuxtUISwitch',
187
+ name: 'subscribe',
188
+ label: 'Subscribe to newsletter'
189
+ }
190
+ ]
191
+
192
+ const handleSubmit = (data: any) => {
193
+ console.log('Form submitted:', data)
194
+ }
195
+ </script>
196
+ ```
197
+
198
+ ### Advanced Number Input with Formatting
199
+
200
+ ```vue
201
+ <FormKit
202
+ type="nuxtUIInputNumber"
203
+ name="price"
204
+ label="Product Price"
205
+ :min="0"
206
+ :step="0.01"
207
+ :format-options="{
208
+ style: 'currency',
209
+ currency: 'USD'
210
+ }"
211
+ validation="required|min:0"
212
+ />
213
+ ```
214
+
215
+ ### Output Components for Display
216
+
217
+ ```vue
218
+ <template>
219
+ <FUDataView
220
+ :data="userData"
221
+ :schema="displaySchema"
222
+ />
223
+ </template>
224
+
225
+ <script setup lang="ts">
226
+ const userData = ref({
227
+ name: 'John Doe',
228
+ email: 'john@example.com',
229
+ price: 1234.56,
230
+ tags: ['Vue', 'Nuxt', 'TypeScript'],
231
+ isActive: true
232
+ })
233
+
234
+ const displaySchema = [
235
+ {
236
+ $formkit: 'nuxtUIOutputText',
237
+ name: 'name',
238
+ label: 'Name',
239
+ leadingIcon: 'i-heroicons-user'
240
+ },
241
+ {
242
+ $formkit: 'nuxtUIOutputLink',
243
+ name: 'email',
244
+ label: 'Email',
245
+ leadingIcon: 'i-heroicons-envelope'
246
+ },
247
+ {
248
+ $formkit: 'nuxtUIOutputNumber',
249
+ name: 'price',
250
+ label: 'Price',
251
+ formatOptions: {
252
+ style: 'currency',
253
+ currency: 'USD'
254
+ }
255
+ },
256
+ {
257
+ $formkit: 'nuxtUIOutputList',
258
+ name: 'tags',
259
+ label: 'Technologies',
260
+ listType: 'badge',
261
+ color: 'primary'
262
+ },
263
+ {
264
+ $formkit: 'nuxtUIOutputBoolean',
265
+ name: 'isActive',
266
+ label: 'Status',
267
+ trueValue: 'Active',
268
+ falseValue: 'Inactive'
269
+ }
270
+ ]
271
+ </script>
272
+ ```
273
+
274
+ ## Component Props
275
+
276
+ All components support their respective Nuxt UI component props plus FormKit-specific props like `name`, `label`, `help`, `validation`, etc.
277
+
278
+ Refer to the [Nuxt UI documentation](https://ui.nuxt.com/) for component-specific props and the [FormKit documentation](https://formkit.com/) for validation and form handling.
279
+
280
+ ## Examples
281
+
282
+ The playground includes comprehensive examples for all components:
283
+
284
+ ### Input Components
285
+ - [Checkbox](./playground/app/pages/components/input/checkbox.vue)
286
+ - [CheckboxGroup](./playground/app/pages/components/input/checkbox-group.vue)
287
+ - [ColorPicker](./playground/app/pages/components/input/color-picker.vue)
288
+ - [Input](./playground/app/pages/components/input/input.vue)
289
+ - [InputDate](./playground/app/pages/components/input/input-date.vue)
290
+ - [InputMenu](./playground/app/pages/components/input/input-menu.vue)
291
+ - [InputNumber](./playground/app/pages/components/input/input-number.vue)
292
+ - [InputTags](./playground/app/pages/components/input/input-tags.vue)
293
+ - [InputTime](./playground/app/pages/components/input/input-time.vue)
294
+ - [PinInput](./playground/app/pages/components/input/pin-input.vue)
295
+ - [RadioGroup](./playground/app/pages/components/input/radio-group.vue)
296
+ - [Select](./playground/app/pages/components/input/select.vue)
297
+ - [SelectMenu](./playground/app/pages/components/input/select-menu.vue)
298
+ - [Slider](./playground/app/pages/components/input/slider.vue)
299
+ - [Switch](./playground/app/pages/components/input/switch.vue)
300
+ - [Textarea](./playground/app/pages/components/input/textarea.vue)
301
+
302
+ ### Output Components
303
+ - [OutputBoolean](./playground/app/pages/components/output/boolean.vue)
304
+ - [OutputDate](./playground/app/pages/components/output/date.vue)
305
+ - [OutputLink](./playground/app/pages/components/output/link.vue)
306
+ - [OutputList](./playground/app/pages/components/output/list.vue)
307
+ - [OutputNumber](./playground/app/pages/components/output/number.vue)
308
+ - [OutputText](./playground/app/pages/components/output/text.vue)
309
+
310
+ ## Development
311
+
312
+ <details>
313
+ <summary>Local development setup</summary>
314
+
315
+ ```bash
316
+ # Clone the repository
317
+ git clone https://github.com/sfxcode/nuxt-ui-formkit.git
318
+ cd nuxt-ui-formkit
319
+
320
+ # Install dependencies (using pnpm)
321
+ pnpm install
322
+
323
+ # Generate type stubs
324
+ pnpm dev:prepare
325
+
326
+ # Start development server with playground
327
+ pnpm dev
328
+
329
+ # Build the playground
330
+ pnpm dev:build
331
+
332
+ # Run ESLint
333
+ pnpm lint
334
+
335
+ # Run tests
336
+ pnpm test
337
+ pnpm test:watch
338
+
339
+ # Build the module
340
+ pnpm build
341
+
342
+ # Release new version
343
+ pnpm release
344
+ ```
345
+
346
+ </details>
347
+
348
+ ## Requirements
349
+
350
+ - Nuxt 4.x
351
+ - Vue 3.x
352
+ - @nuxt/ui 4.3.0+
353
+ - @formkit/vue 1.x
354
+ - @formkit/nuxt 1.x
355
+
356
+ ## External Module Usage
357
+
358
+ External Nuxt modules and applications can import FormKit definitions programmatically.
359
+
360
+ ### Import All Definitions
361
+
362
+ ```typescript
363
+ import { nuxtUIInputs, nuxtUIOutputs } from '@sfxcode/nuxt-ui-formkit/formkit'
364
+
365
+ // Use in FormKit config
366
+ export default defineFormKitConfig({
367
+ inputs: {
368
+ ...nuxtUIInputs,
369
+ ...nuxtUIOutputs,
370
+ },
371
+ })
372
+ ```
373
+
374
+ ### Import Individual Definitions
375
+
376
+ ```typescript
377
+ import {
378
+ nuxtUICheckboxDefinition,
379
+ nuxtUIInputDefinition,
380
+ nuxtUISelectDefinition
381
+ } from '@sfxcode/nuxt-ui-formkit/definitions'
382
+
383
+ export default defineFormKitConfig({
384
+ inputs: {
385
+ nuxtUICheckbox: nuxtUICheckboxDefinition,
386
+ nuxtUIInput: nuxtUIInputDefinition,
387
+ nuxtUISelect: nuxtUISelectDefinition,
388
+ },
389
+ })
390
+ ```
391
+
392
+ ### Available Import Paths
393
+
394
+ - `@sfxcode/nuxt-ui-formkit/formkit` - All definitions + type augmentation
395
+ - `@sfxcode/nuxt-ui-formkit/definitions` - Definition objects only
396
+
397
+ For detailed usage examples, see [EXTERNAL_USAGE.md](./EXTERNAL_USAGE.md).
398
+
399
+ ## Contributing
400
+
401
+ Contributions are welcome! Please feel free to submit a Pull Request.
402
+
403
+ 1. Fork the repository
404
+ 2. Create your feature branch (`git checkout -b feature/amazing-feature`)
405
+ 3. Commit your changes using [Conventional Commits](https://www.conventionalcommits.org/) (`git commit -m 'feat: add amazing feature'`)
406
+ 4. Push to the branch (`git push origin feature/amazing-feature`)
407
+ 5. Open a Pull Request
408
+
409
+ ## License
410
+
411
+ [MIT License](./LICENSE) © 2024-present [sfxcode](https://github.com/sfxcode)
412
+
413
+ ## Credits
414
+
415
+ - [FormKit](https://formkit.com/) - Form framework for Vue
416
+ - [Nuxt UI](https://ui.nuxt.com/) - UI library for Nuxt
417
+ - [Nuxt](https://nuxt.com/) - The Intuitive Vue Framework
418
+
419
+ <!-- Badges -->
420
+ [npm-version-src]: https://img.shields.io/npm/v/@sfxcode/nuxt-ui-formkit/latest.svg?style=flat&colorA=020420&colorB=00DC82
421
+ [npm-version-href]: https://npmjs.com/package/@sfxcode/nuxt-ui-formkit
422
+
423
+ [npm-downloads-src]: https://img.shields.io/npm/dm/@sfxcode/nuxt-ui-formkit.svg?style=flat&colorA=020420&colorB=00DC82
424
+ [npm-downloads-href]: https://npm.chart.dev/@sfxcode/nuxt-ui-formkit
425
+
426
+ [license-src]: https://img.shields.io/npm/l/@sfxcode/nuxt-ui-formkit.svg?style=flat&colorA=020420&colorB=00DC82
427
+ [license-href]: https://npmjs.com/package/@sfxcode/nuxt-ui-formkit
428
+
429
+ [nuxt-src]: https://img.shields.io/badge/Nuxt-020420?logo=nuxt
430
+ [nuxt-href]: https://nuxt.com
@@ -0,0 +1,7 @@
1
+ import * as _nuxt_schema from '@nuxt/schema';
2
+
3
+ type ModuleOptions = Record<string, never>;
4
+ declare const _default: _nuxt_schema.NuxtModule<ModuleOptions, ModuleOptions, false>;
5
+
6
+ export { _default as default };
7
+ export type { ModuleOptions };
@@ -0,0 +1,7 @@
1
+ import * as _nuxt_schema from '@nuxt/schema';
2
+
3
+ type ModuleOptions = Record<string, never>;
4
+ declare const _default: _nuxt_schema.NuxtModule<ModuleOptions, ModuleOptions, false>;
5
+
6
+ export { _default as default };
7
+ export type { ModuleOptions };
@@ -0,0 +1,12 @@
1
+ {
2
+ "name": "nuxt-ui-formkit",
3
+ "configKey": "nuxtUiFormkit",
4
+ "compatibility": {
5
+ "nuxt": ">=4.0.0"
6
+ },
7
+ "version": "0.8.2",
8
+ "builder": {
9
+ "@nuxt/module-builder": "1.0.2",
10
+ "unbuild": "3.6.1"
11
+ }
12
+ }
@@ -0,0 +1,29 @@
1
+ import { defineNuxtModule, createResolver, addPlugin, addImportsDir, addComponent } from '@nuxt/kit';
2
+
3
+ const module$1 = defineNuxtModule({
4
+ meta: {
5
+ name: "nuxt-ui-formkit",
6
+ configKey: "nuxtUiFormkit",
7
+ compatibility: {
8
+ nuxt: ">=4.0.0"
9
+ }
10
+ },
11
+ // Default configuration options of the Nuxt module
12
+ defaults: {},
13
+ setup(_options, _nuxt) {
14
+ const resolver = createResolver(import.meta.url);
15
+ addPlugin(resolver.resolve("./runtime/plugin"));
16
+ addImportsDir(resolver.resolve("./runtime/composables"));
17
+ const NPM_PCK_FORMKIT_NUXT_UI = "@sfxcode/nuxt-ui-formkit";
18
+ const componentNames = ["FUDataView", "FUDataEdit", "FUDataDebug"];
19
+ componentNames.forEach(
20
+ (name) => addComponent({
21
+ name,
22
+ filePath: resolver.resolve("./runtime/components/" + name + ".vue"),
23
+ chunkName: NPM_PCK_FORMKIT_NUXT_UI
24
+ })
25
+ );
26
+ }
27
+ });
28
+
29
+ export { module$1 as default };
@@ -0,0 +1,43 @@
1
+ declare var __VLS_7: {};
2
+ type __VLS_Slots = {} & {
3
+ default?: (props: typeof __VLS_7) => any;
4
+ };
5
+ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
6
+ data: {
7
+ type: ObjectConstructor;
8
+ default: null;
9
+ };
10
+ header: {
11
+ type: StringConstructor;
12
+ default: string;
13
+ };
14
+ textClass: {
15
+ type: StringConstructor;
16
+ default: string;
17
+ };
18
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
19
+ data: {
20
+ type: ObjectConstructor;
21
+ default: null;
22
+ };
23
+ header: {
24
+ type: StringConstructor;
25
+ default: string;
26
+ };
27
+ textClass: {
28
+ type: StringConstructor;
29
+ default: string;
30
+ };
31
+ }>> & Readonly<{}>, {
32
+ data: Record<string, any>;
33
+ header: string;
34
+ textClass: string;
35
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
36
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
37
+ declare const _default: typeof __VLS_export;
38
+ export default _default;
39
+ type __VLS_WithSlots<T, S> = T & {
40
+ new (): {
41
+ $slots: S;
42
+ };
43
+ };
@@ -0,0 +1,32 @@
1
+ <script setup>
2
+ defineProps({
3
+ data: {
4
+ type: Object,
5
+ default: null
6
+ },
7
+ header: {
8
+ type: String,
9
+ default: "Debug"
10
+ },
11
+ textClass: {
12
+ type: String,
13
+ default: "text-xs"
14
+ }
15
+ });
16
+ </script>
17
+
18
+ <template>
19
+ <div class="formkit-debug">
20
+ <client-only>
21
+ <h3 class="text-lg font-semibold mb-2">
22
+ {{ header }}
23
+ </h3>
24
+ <slot />
25
+ <pre
26
+ v-if="data"
27
+ :class="textClass"
28
+ >{{ data }}</pre>
29
+ <span v-else>No Data available</span>
30
+ </client-only>
31
+ </div>
32
+ </template>
@@ -0,0 +1,43 @@
1
+ declare var __VLS_7: {};
2
+ type __VLS_Slots = {} & {
3
+ default?: (props: typeof __VLS_7) => any;
4
+ };
5
+ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
6
+ data: {
7
+ type: ObjectConstructor;
8
+ default: null;
9
+ };
10
+ header: {
11
+ type: StringConstructor;
12
+ default: string;
13
+ };
14
+ textClass: {
15
+ type: StringConstructor;
16
+ default: string;
17
+ };
18
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
19
+ data: {
20
+ type: ObjectConstructor;
21
+ default: null;
22
+ };
23
+ header: {
24
+ type: StringConstructor;
25
+ default: string;
26
+ };
27
+ textClass: {
28
+ type: StringConstructor;
29
+ default: string;
30
+ };
31
+ }>> & Readonly<{}>, {
32
+ data: Record<string, any>;
33
+ header: string;
34
+ textClass: string;
35
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
36
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
37
+ declare const _default: typeof __VLS_export;
38
+ export default _default;
39
+ type __VLS_WithSlots<T, S> = T & {
40
+ new (): {
41
+ $slots: S;
42
+ };
43
+ };