New label demos for inputmask
parent
1d7f5bfdda
commit
a5bfe0526b
|
@ -2,10 +2,20 @@
|
|||
<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>
|
||||
</DocSectionText>
|
||||
<div class="card flex justify-center">
|
||||
<div class="card flex justify-center items-end gap-4">
|
||||
<FloatLabel>
|
||||
<InputMask id="ssn" v-model="value" mask="999-99-9999" placeholder="999-99-9999" />
|
||||
<label for="ssn">SSN</label>
|
||||
<InputMask id="over_label" v-model="value1" mask="999-99-9999" />
|
||||
<label for="over_label">Over Label</label>
|
||||
</FloatLabel>
|
||||
|
||||
<FloatLabel variant="in">
|
||||
<InputMask id="in_label" v-model="value2" mask="999-99-9999" />
|
||||
<label for="in_label">In Label</label>
|
||||
</FloatLabel>
|
||||
|
||||
<FloatLabel variant="on">
|
||||
<InputMask id="on_label" v-model="value3" mask="999-99-9999" />
|
||||
<label for="on_label">On Label</label>
|
||||
</FloatLabel>
|
||||
</div>
|
||||
<DocSectionCode :code="code" />
|
||||
|
@ -15,20 +25,42 @@
|
|||
export default {
|
||||
data() {
|
||||
return {
|
||||
value: '',
|
||||
value1: '',
|
||||
value2: '',
|
||||
value3: '',
|
||||
code: {
|
||||
basic: `
|
||||
<FloatLabel>
|
||||
<InputMask id="ssn" v-model="value" mask="999-99-9999" placeholder="999-99-9999" />
|
||||
<label for="ssn">SSN</label>
|
||||
<InputMask id="over_label" v-model="value1" mask="999-99-9999" />
|
||||
<label for="over_label">Over Label</label>
|
||||
</FloatLabel>
|
||||
|
||||
<FloatLabel variant="in">
|
||||
<InputMask id="in_label" v-model="value2" mask="999-99-9999" />
|
||||
<label for="in_label">In Label</label>
|
||||
</FloatLabel>
|
||||
|
||||
<FloatLabel variant="on">
|
||||
<InputMask id="on_label" v-model="value3" mask="999-99-9999" />
|
||||
<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>
|
||||
<InputMask id="ssn" v-model="value" mask="999-99-9999" placeholder="999-99-9999" />
|
||||
<label for="ssn">SSN</label>
|
||||
<InputMask id="over_label" v-model="value1" mask="999-99-9999" />
|
||||
<label for="over_label">Over Label</label>
|
||||
</FloatLabel>
|
||||
|
||||
<FloatLabel variant="in">
|
||||
<InputMask id="in_label" v-model="value2" mask="999-99-9999" />
|
||||
<label for="in_label">In Label</label>
|
||||
</FloatLabel>
|
||||
|
||||
<FloatLabel variant="on">
|
||||
<InputMask id="on_label" v-model="value3" mask="999-99-9999" />
|
||||
<label for="on_label">On Label</label>
|
||||
</FloatLabel>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -37,7 +69,9 @@ export default {
|
|||
export default {
|
||||
data() {
|
||||
return {
|
||||
value: ''
|
||||
value1: '',
|
||||
value2: '',
|
||||
value3: ''
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -46,10 +80,20 @@ export default {
|
|||
`,
|
||||
composition: `
|
||||
<template>
|
||||
<div class="card flex justify-center">
|
||||
<div class="card flex justify-center items-end gap-4">
|
||||
<FloatLabel>
|
||||
<InputMask id="ssn" v-model="val2" mask="999-99-9999" placeholder="999-99-9999" />
|
||||
<label for="ssn">SSN</label>
|
||||
<InputMask id="over_label" v-model="value1" mask="999-99-9999" />
|
||||
<label for="over_label">Over Label</label>
|
||||
</FloatLabel>
|
||||
|
||||
<FloatLabel variant="in">
|
||||
<InputMask id="in_label" v-model="value2" mask="999-99-9999" />
|
||||
<label for="in_label">In Label</label>
|
||||
</FloatLabel>
|
||||
|
||||
<FloatLabel variant="on">
|
||||
<InputMask id="on_label" v-model="value3" mask="999-99-9999" />
|
||||
<label for="on_label">On Label</label>
|
||||
</FloatLabel>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -57,7 +101,9 @@ export default {
|
|||
<script setup>
|
||||
import { ref } from 'vue';
|
||||
|
||||
const value = ref('');
|
||||
const value1 = ref('');
|
||||
const value2 = ref('');
|
||||
const value3 = ref('');
|
||||
<\/script>
|
||||
`
|
||||
}
|
||||
|
|
|
@ -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>
|
||||
<InputMask id="ssn" v-model="value" mask="999-99-9999" autocomplete="off" />
|
||||
<label for="ssn">SSN</label>
|
||||
</IftaLabel>
|
||||
</div>
|
||||
<DocSectionCode :code="code" />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
value: null,
|
||||
code: {
|
||||
basic: `
|
||||
<IftaLabel>
|
||||
<InputMask id="ssn" v-model="value" mask="999-99-9999" />
|
||||
<label for="ssn">SSN</label>
|
||||
</IftaLabel>
|
||||
`,
|
||||
options: `
|
||||
<template>
|
||||
<div class="card flex justify-center">
|
||||
<IftaLabel>
|
||||
<InputMask id="ssn" v-model="value" mask="999-99-9999" />
|
||||
<label for="ssn">SSN</label>
|
||||
</IftaLabel>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
value: null
|
||||
}
|
||||
}
|
||||
}
|
||||
<\/script>
|
||||
`,
|
||||
composition: `
|
||||
<template>
|
||||
<div class="card flex justify-center">
|
||||
<IftaLabel>
|
||||
<InputMask id="ssn" v-model="value" mask="999-99-9999" />
|
||||
<label for="ssn">SSN</label>
|
||||
</IftaLabel>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref } from 'vue';
|
||||
|
||||
const value = ref(null);
|
||||
<\/script>
|
||||
`
|
||||
}
|
||||
};
|
||||
}
|
||||
};
|
||||
</script>
|
|
@ -16,6 +16,7 @@ import BasicDoc from '@/doc/inputmask/BasicDoc.vue';
|
|||
import DisabledDoc from '@/doc/inputmask/DisabledDoc.vue';
|
||||
import FilledDoc from '@/doc/inputmask/FilledDoc.vue';
|
||||
import FloatLabelDoc from '@/doc/inputmask/FloatLabelDoc.vue';
|
||||
import IftaLabelDoc from '@/doc/inputmask/IftaLabelDoc.vue';
|
||||
import ImportDoc from '@/doc/inputmask/ImportDoc.vue';
|
||||
import InvalidDoc from '@/doc/inputmask/InvalidDoc.vue';
|
||||
import MaskDoc from '@/doc/inputmask/MaskDoc.vue';
|
||||
|
@ -58,6 +59,11 @@ export default {
|
|||
label: 'Float Label',
|
||||
component: FloatLabelDoc
|
||||
},
|
||||
{
|
||||
id: 'iftalabel',
|
||||
label: 'Ifta Label',
|
||||
component: IftaLabelDoc
|
||||
},
|
||||
{
|
||||
id: 'filled',
|
||||
label: 'Filled',
|
||||
|
|
Loading…
Reference in New Issue