-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
128 additions
and
104 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,27 @@ | ||
<template> | ||
<div class="container-examples"> | ||
<input-field type = "single-checkbox" name = "check" label = "Test" /> | ||
<input-field type = "single-checkbox" name = "check-with-values" label = "Values" :values = "['A', 'R']" /> | ||
<input-field type = "text" name = "test" label = "Test" prefix = "V89" required/> | ||
<input-field type = "text" name = "test" label = "Test" prefix = "V89" disabled/> | ||
<div> | ||
<form-field name = "mainAddress" type = "address" /> | ||
<form-field name = "mainAddress.city" label = "Just city" /> | ||
</div> | ||
{{values}} | ||
</div> | ||
</template> | ||
|
||
<script setup lang='ts'> | ||
import {Form, useFormValues, InputField} from "../../../src"; | ||
import FormField from "./../../../src/widgets/form-field.vue"; | ||
const form = new Form(); | ||
const values = useFormValues(form); | ||
form.validate() | ||
window.form = form; | ||
form.validate(); | ||
</script> | ||
|
||
<style> | ||
.container-examples { | ||
display: grid; | ||
gap: 10px; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<template> | ||
<div class = "input-address"> | ||
<form-field name = "country" label = "Address country"/> | ||
<form-field name = "city" label = "Address city"/> | ||
</div> | ||
</template> | ||
|
||
<script setup lang = "ts"> | ||
import {Form, FormField} from "./../../../src/index"; | ||
const props = defineProps<{ | ||
name: string, | ||
}>() | ||
const form = new Form({ | ||
name: props.name | ||
}) | ||
</script> | ||
|
||
<style scoped> | ||
.input-address { | ||
display: grid; | ||
gap: 10px; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,12 @@ | ||
import { createApp } from 'vue' | ||
import App from './App.vue' | ||
import {config} from "./../../../src/index"; | ||
import InputAddress from "./input-address.vue"; | ||
|
||
config({ | ||
inputTypes: { | ||
address: InputAddress | ||
} | ||
}) | ||
|
||
createApp(App).mount('#app') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Try not to use icons in this library. She's still aiming | ||
for functional use. If an icon is needed, it | ||
must be described in Figma and added via a component. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<template> | ||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> | ||
<g clip-path="url(#clip0_208_97)"> | ||
<path d="M5.5 6.5L18.5 17.5" stroke-linecap="round" v-if = "crossed"/> | ||
<circle cx="12" cy="12" r="3" /> | ||
<path d="M21.4977 11.9958C21.4982 11.9976 21.4987 11.999 21.499 12C21.4987 12.001 21.4982 12.0024 21.4977 12.0042C21.4909 12.0278 21.4641 12.12 21.363 12.2963C21.2482 12.4967 21.0701 12.7501 20.8295 13.0399C20.3492 13.6183 19.645 14.311 18.7686 14.9769C17.0095 16.3135 14.6139 17.5 12 17.5C9.38615 17.5 6.99054 16.3135 5.23143 14.9769C4.35501 14.311 3.65076 13.6183 3.17051 13.0399C2.92986 12.7501 2.75184 12.4967 2.63697 12.2963C2.53594 12.12 2.50914 12.0278 2.50228 12.0042C2.50175 12.0024 2.50135 12.001 2.50103 12C2.50135 11.999 2.50175 11.9976 2.50228 11.9958C2.50914 11.9722 2.53594 11.88 2.63697 11.7037C2.75184 11.5033 2.92986 11.2499 3.17051 10.9601C3.65076 10.3817 4.35501 9.68904 5.23143 9.02312C6.99054 7.68651 9.38615 6.5 12 6.5C14.6139 6.5 17.0095 7.68651 18.7686 9.02312C19.645 9.68904 20.3492 10.3817 20.8295 10.9601C21.0701 11.2499 21.2482 11.5033 21.363 11.7037C21.4641 11.88 21.4909 11.9722 21.4977 11.9958Z" /> | ||
</g> | ||
</svg> | ||
</template> | ||
|
||
<script setup lang = "ts"> | ||
defineProps<{ | ||
crossed: boolean | ||
}>() | ||
</script> | ||
|
||
<style scoped> | ||
</style> |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters