@dynamicforms/vuetify-inputs 0.1.0

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/package.json ADDED
@@ -0,0 +1,82 @@
1
+ {
2
+ "name": "@dynamicforms/vuetify-inputs",
3
+ "private": false,
4
+ "version": "0.1.0",
5
+ "type": "module",
6
+ "description": "Visual components for data entry using @dynamicforms/vue-forms",
7
+ "author": "Jure Erznožnik",
8
+ "files": [
9
+ "dist/*"
10
+ ],
11
+ "main": "dist/dynamicforms-vuetify-inputs.umd.cjs",
12
+ "types": "./dist/index.d.ts",
13
+ "exports": {
14
+ ".": {
15
+ "require": "./dist/dynamicforms-vuetify-inputs.umd.cjs",
16
+ "import": "./dist/dynamicforms-vuetify-inputs.js"
17
+ }
18
+ },
19
+ "workspaces": [
20
+ "docs"
21
+ ],
22
+ "scripts": {
23
+ "build": "vite build",
24
+ "test": "vitest run --coverage",
25
+ "lint": "eslint src && vue-tsc --noEmit",
26
+ "docs:dev": "npm run docs:dev -w docs",
27
+ "docs:build": "npm run docs:build -w docs",
28
+ "docs:preview": "npm run docs:preview -w docs"
29
+ },
30
+ "keywords": [
31
+ "vue",
32
+ "dynamicforms",
33
+ "velis",
34
+ "forms",
35
+ "data entry"
36
+ ],
37
+ "license": "MIT",
38
+ "repository": {
39
+ "type": "git",
40
+ "url": "git@github.com:velis74/dynamicforms-vuetify-inputs.git"
41
+ },
42
+ "issues": "https://github.com/velis74/dynamicforms-vuetify-inputs/issues",
43
+ "peerDependencies": {
44
+ "@ckeditor/ckeditor5-vue": "^7.0.0",
45
+ "@dynamicforms/vue-forms": "^0.2.3",
46
+ "ckeditor5": "^43.0.0",
47
+ "date-fns": "^4.1.0",
48
+ "lodash-es": "^4.17.12",
49
+ "vue": "^3.4",
50
+ "vue-ionicon": "^2.1.1",
51
+ "vue-markdown-render": "^2.2.1",
52
+ "vuetify": "^3.8.2"
53
+ },
54
+ "devDependencies": {
55
+ "@types/lodash-es": "^4.17.12",
56
+ "@vitejs/plugin-vue": "^5",
57
+ "@vitest/coverage-v8": "^3",
58
+ "@vue/test-utils": "^2.2.4",
59
+ "@vue/tsconfig": "^0.7.0",
60
+ "eslint-config-velis": "^1.1.16",
61
+ "jsdom": "^26.0.0",
62
+ "rollup-plugin-visualizer": "^5.14.0",
63
+ "typescript": "^5",
64
+ "vite": "^5",
65
+ "vite-plugin-dts": "^4",
66
+ "vite-plugin-eslint": "^1.8.1",
67
+ "vitest": "^3",
68
+ "vue-tsc": "^2"
69
+ },
70
+ "eslintConfig": {
71
+ "extends": [
72
+ "velis"
73
+ ],
74
+ "ignorePatterns": [
75
+ "dist/*",
76
+ "coverage/*",
77
+ "node_modules/*",
78
+ "docs/*",
79
+ "vite.config.ts"
80
+ ]
81
+ }
82
+ }
package/readme.md ADDED
@@ -0,0 +1,108 @@
1
+ # @dynamicforms/vuetify-inputs
2
+
3
+ Visual components based on Vuetify library to support @dynamicforms/vue-forms.
4
+
5
+ ## Introduction
6
+
7
+ `@dynamicforms/vuetify-inputs` provides input components for data entry that will be stored in form data. It is the
8
+ visual implementation of logical concepts from
9
+ [@dynamicforms/vue-forms](https://github.com/velis74/dynamicforms-vue-forms).
10
+
11
+ ## Features
12
+
13
+ - **DynamicForms Integration**: Seamlessly works with `@dynamicforms/vue-forms` for state management and validation
14
+ - **Vuetify Based**: Built on top of Vuetify components for beautiful Material Design styling
15
+ - **Reactive**: Full Vue reactivity support with both v-model and DynamicForms Field controls
16
+ - **TypeScript Support**: Comprehensive type definitions for excellent developer experience
17
+ - **Highly opinionated**: Opinionated to ensure uniform look throughout the application.
18
+
19
+ ## Installation
20
+
21
+ ```bash
22
+ npm install @dynamicforms/vuetify-inputs
23
+ ```
24
+
25
+ ## Basic Usage Example
26
+
27
+ The library offers various components, including:
28
+
29
+ ```vue
30
+ <template>
31
+ <div>
32
+ <df-select
33
+ :control="form.fields.country"
34
+ :choices="countries"
35
+ label="Select Country"
36
+ />
37
+
38
+ <df-text-area
39
+ :control="form.fields.description"
40
+ label="Description"
41
+ :rows="5"
42
+ :max-rows="10"
43
+ />
44
+
45
+ <df-file
46
+ :control="form.fields.document"
47
+ :comms="fileComms"
48
+ label="Upload Document"
49
+ />
50
+ </div>
51
+ </template>
52
+
53
+ <script setup>
54
+ import { Group, Field } from '@dynamicforms/vue-forms';
55
+ import { DfSelect, DfTextArea, DfFile } from '@dynamicforms/vuetify-inputs';
56
+
57
+ // Create a form with fields
58
+ const form = new Group({
59
+ country: Field.create({ value: null }),
60
+ description: Field.create({ value: '' }),
61
+ document: Field.create({ value: null })
62
+ });
63
+
64
+ // Define options for the select field
65
+ const countries = [
66
+ { id: 'us', text: 'United States' },
67
+ { id: 'ca', text: 'Canada' },
68
+ { id: 'uk', text: 'United Kingdom' },
69
+ // more countries...
70
+ ];
71
+
72
+ // Communication for file field
73
+ const fileComms = {
74
+ upload: async (file, progressCallback) => {
75
+ // Upload implementation
76
+ },
77
+ delete: async (fileId) => {
78
+ // Delete implementation
79
+ },
80
+ touch: async (fileId) => {
81
+ // Touch implementation
82
+ }
83
+ };
84
+ </script>
85
+ ```
86
+
87
+ ## Documentation
88
+
89
+ Detailed documentation is available as a VitePress site in the `/docs` folder. To view the documentation locally:
90
+
91
+ ```bash
92
+ npm run docs:dev
93
+ ```
94
+
95
+ ## Available Components
96
+
97
+ - **df-select**: A selection component supporting static or dynamic options, multiple selection, and tagging
98
+ - **df-textarea**: A textarea component with configurable rows and validation
99
+ - **df-file**: A file upload component with progress indication
100
+ - **InputBase**: The base component for all input elements
101
+
102
+ ## TypeScript Support
103
+
104
+ The library is written in TypeScript and provides full type definitions for all components and interfaces.
105
+
106
+ ## License
107
+
108
+ MIT