@mantine-vue/form 1.1.1 → 1.1.4

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 (2) hide show
  1. package/README.md +47 -0
  2. package/package.json +2 -2
package/README.md ADDED
@@ -0,0 +1,47 @@
1
+ # @mantine-vue/form
2
+
3
+ Powerful form management and validation library for Vue, equivalent to `@mantine/form`.
4
+
5
+ > Mantine Vue is an independent community port of [Mantine](https://mantine.dev/) for Vue 3. It is not affiliated with or endorsed by the Mantine team.
6
+
7
+ ## Installation
8
+
9
+ ```bash
10
+ yarn add @mantine-vue/form
11
+
12
+ # or with npm
13
+ npm i @mantine-vue/form
14
+ ```
15
+
16
+ ## Usage
17
+
18
+ ```vue
19
+ <script setup>
20
+ import { useForm } from '@mantine-vue/form'
21
+
22
+ const form = useForm({
23
+ initialValues: { name: '' },
24
+ validate: {
25
+ name: (value) => (value.length < 2 ? 'Name is too short' : null),
26
+ },
27
+ })
28
+ </script>
29
+
30
+ <template>
31
+ <form @submit.prevent="form.onSubmit((values) => console.log(values))">
32
+ <input v-bind="form.getInputProps('name')" />
33
+ </form>
34
+ </template>
35
+ ```
36
+
37
+ ## Documentation
38
+
39
+ Full API and examples: [mantine-vue.dev/form/use-form](https://mantine-vue.dev/form/use-form)
40
+
41
+ ## Peer dependencies
42
+
43
+ - `vue` ^3.5.0
44
+
45
+ ## License
46
+
47
+ MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mantine-vue/form",
3
- "version": "1.1.1",
3
+ "version": "1.1.4",
4
4
  "description": "Vue form management package equivalent to @mantine/form",
5
5
  "license": "MIT",
6
6
  "files": [
@@ -28,7 +28,7 @@
28
28
  }
29
29
  },
30
30
  "dependencies": {
31
- "@mantine-vue/utils": "1.1.1"
31
+ "@mantine-vue/utils": "1.1.4"
32
32
  },
33
33
  "devDependencies": {
34
34
  "@mantine-vue/utils": "workspace:*",