Update label demos of inputtext

pull/6439/head
Cagatay Civici 2024-09-18 13:38:28 +03:00
parent 53d35e3bb3
commit 973c8fdd95
4 changed files with 134 additions and 17 deletions

View File

@ -1,11 +1,21 @@
<template>
<DocSectionText v-bind="$attrs">
<p>A floating label appears on top of the input field when focused. Visit <PrimeVueNuxtLink to="/floatlabel">FloatLabel</PrimeVueNuxtLink> documentation for more information.</p>
<p>FloatLabel visually integrates a label with its form element. Visit <PrimeVueNuxtLink to="/floatlabel">FloatLabel</PrimeVueNuxtLink> documentation for more information.</p>
</DocSectionText>
<div class="card flex justify-center">
<div class="card flex justify-center items-end gap-4">
<FloatLabel>
<InputText id="username" v-model="value" />
<label for="username">Username</label>
<InputText id="over_label" v-model="value1" autocomplete="off" />
<label for="over_label">Over Label</label>
</FloatLabel>
<FloatLabel variant="in">
<InputText id="in_label" v-model="value2" autocomplete="off" />
<label for="in_label">In Label</label>
</FloatLabel>
<FloatLabel variant="on">
<InputText id="on_label" v-model="value3" autocomplete="off" />
<label for="on_label">On Label</label>
</FloatLabel>
</div>
<DocSectionCode :code="code" />
@ -15,20 +25,42 @@
export default {
data() {
return {
value: null,
value1: null,
value2: null,
value3: null,
code: {
basic: `
<FloatLabel>
<InputText id="username" v-model="value" />
<label for="username">Username</label>
<InputText id="over_label" v-model="value1" />
<label for="over_label">Over Label</label>
</FloatLabel>
<FloatLabel variant="in">
<InputText id="in_label" v-model="value2" />
<label for="in_label">In Label</label>
</FloatLabel>
<FloatLabel variant="on">
<InputText id="on_label" v-model="value3" />
<label for="on_label">On Label</label>
</FloatLabel>
`,
options: `
<template>
<div class="card flex justify-center">
<div class="card flex justify-center items-end gap-4">
<FloatLabel>
<InputText id="username" v-model="value" />
<label for="username">Username</label>
<InputText id="over_label" v-model="value1" />
<label for="over_label">Over Label</label>
</FloatLabel>
<FloatLabel variant="in">
<InputText id="in_label" v-model="value2" />
<label for="in_label">In Label</label>
</FloatLabel>
<FloatLabel variant="on">
<InputText id="on_label" v-model="value3" />
<label for="on_label">On Label</label>
</FloatLabel>
</div>
</template>
@ -37,19 +69,30 @@ export default {
export default {
data() {
return {
value: null
value1: null,
value2: null,
value3: null
}
}
}
<\/script>
`,
composition: `
<template>
<div class="card flex justify-center">
<div class="card flex justify-center items-end gap-4">
<FloatLabel>
<InputText id="username" v-model="value" />
<label for="username">Username</label>
<InputText id="over_label" v-model="value1" />
<label for="over_label">Over Label</label>
</FloatLabel>
<FloatLabel variant="in">
<InputText id="in_label" v-model="value2" />
<label for="in_label">In Label</label>
</FloatLabel>
<FloatLabel variant="on">
<InputText id="on_label" v-model="value3" />
<label for="on_label">On Label</label>
</FloatLabel>
</div>
</template>
@ -57,7 +100,9 @@ export default {
<script setup>
import { ref } from 'vue';
const value = ref(null);
const value1 = ref(null);
const value2 = ref(null);
const value3 = ref(null);
<\/script>
`
}

View File

@ -0,0 +1,66 @@
<template>
<DocSectionText v-bind="$attrs">
<p>IftaLabel is used to create infield top aligned labels. Visit <PrimeVueNuxtLink to="/iftalabel">IftaLabel</PrimeVueNuxtLink> documentation for more information.</p>
</DocSectionText>
<div class="card flex justify-center">
<IftaLabel>
<InputText id="username" v-model="value" autocomplete="off" />
<label for="username">Username</label>
</IftaLabel>
</div>
<DocSectionCode :code="code" />
</template>
<script>
export default {
data() {
return {
value: null,
code: {
basic: `
<IftaLabel>
<InputText id="username" v-model="value" />
<label for="username">Username</label>
</IftaLabel>
`,
options: `
<template>
<div class="card flex justify-center">
<IftaLabel>
<InputText id="username" v-model="value" />
<label for="username">Username</label>
</IftaLabel>
</div>
</template>
<script setup>
export default {
data() {
return {
value: null
}
}
}
<\/script>
`,
composition: `
<template>
<div class="card flex justify-center">
<IftaLabel>
<InputText id="username" v-model="value" />
<label for="username">Username</label>
</IftaLabel>
</div>
</template>
<script setup>
import { ref } from 'vue';
const value = ref(null);
<\/script>
`
}
};
}
};
</script>

View File

@ -1,5 +1,5 @@
<template>
<DocComponent title="Vue Ifta Label" header="IftaLabel" description="IftaLabel visually integrates a label within its form element." :componentDocs="docs" :ptTabComponent="ptComponent" :apiDocs="['IftaLabel']" :themingDocs="themingDoc" />
<DocComponent title="Vue Ifta Label" header="IftaLabel" description="IftaLabel is used to create infield top aligned labels" :componentDocs="docs" :ptTabComponent="ptComponent" :apiDocs="['IftaLabel']" :themingDocs="themingDoc" />
</template>
<script>

View File

@ -8,6 +8,7 @@ import BasicDoc from '@/doc/inputtext/BasicDoc.vue';
import DisabledDoc from '@/doc/inputtext/DisabledDoc.vue';
import FilledDoc from '@/doc/inputtext/FilledDoc.vue';
import FloatLabelDoc from '@/doc/inputtext/FloatLabelDoc.vue';
import IftaLabelDoc from '@/doc/inputtext/IftaLabelDoc.vue';
import HelpTextDoc from '@/doc/inputtext/HelpTextDoc.vue';
import ImportDoc from '@/doc/inputtext/ImportDoc.vue';
import InvalidDoc from '@/doc/inputtext/InvalidDoc.vue';
@ -34,6 +35,11 @@ export default {
label: 'Float Label',
component: FloatLabelDoc
},
{
id: 'iftalabel',
label: 'Ifta Label',
component: IftaLabelDoc
},
{
id: 'sizes',
label: 'Sizes',