Updated on float label style
parent
8491496271
commit
cec3393457
|
@ -2,7 +2,7 @@
|
||||||
<DocSectionText v-bind="$attrs">
|
<DocSectionText v-bind="$attrs">
|
||||||
<p>The <i>variant</i> property defines the position of the label. Default value is <i>over</i>, whereas <i>in</i> and <i>on</i> are the alternatives.</p>
|
<p>The <i>variant</i> property defines the position of the label. Default value is <i>over</i>, whereas <i>in</i> and <i>on</i> are the alternatives.</p>
|
||||||
</DocSectionText>
|
</DocSectionText>
|
||||||
<div class="card flex flex-wrap justify-center gap-4">
|
<div class="card flex flex-wrap justify-center items-end gap-4">
|
||||||
<FloatLabel variant="in">
|
<FloatLabel variant="in">
|
||||||
<InputText id="in_label" v-model="value1" autocomplete="off" />
|
<InputText id="in_label" v-model="value1" autocomplete="off" />
|
||||||
<label for="in_label">In Label</label>
|
<label for="in_label">In Label</label>
|
||||||
|
@ -36,7 +36,7 @@ export default {
|
||||||
`,
|
`,
|
||||||
options: `
|
options: `
|
||||||
<template>
|
<template>
|
||||||
<div class="card flex flex-wrap justify-center gap-4">
|
<div class="card flex flex-wrap justify-center items-end gap-4">
|
||||||
<FloatLabel variant="in">
|
<FloatLabel variant="in">
|
||||||
<InputText id="in_label" v-model="value1" autocomplete="off" />
|
<InputText id="in_label" v-model="value1" autocomplete="off" />
|
||||||
<label for="in_label">In Label</label>
|
<label for="in_label">In Label</label>
|
||||||
|
@ -49,7 +49,7 @@ export default {
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
@ -59,10 +59,9 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
<\/script>
|
<\/script>
|
||||||
|
|
||||||
`,
|
`,
|
||||||
composition: `
|
composition: `
|
||||||
<template>
|
<div class="card flex flex-wrap justify-center items-end gap-4">
|
||||||
<div class="card flex flex-wrap justify-center gap-4">
|
<div class="card flex flex-wrap justify-center gap-4">
|
||||||
<FloatLabel variant="in">
|
<FloatLabel variant="in">
|
||||||
<InputText id="in_label" v-model="value1" autocomplete="off" />
|
<InputText id="in_label" v-model="value1" autocomplete="off" />
|
||||||
|
|
|
@ -90,15 +90,6 @@ const theme = ({ dt }) => `
|
||||||
top: ${dt('floatlabel.in.active.top')};
|
top: ${dt('floatlabel.in.active.top')};
|
||||||
}
|
}
|
||||||
|
|
||||||
.p-floatlabel-on .p-inputtext,
|
|
||||||
.p-floatlabel-on .p-select-label,
|
|
||||||
.p-floatlabel-on .p-multiselect-label-container,
|
|
||||||
.p-floatlabel-on .p-cascadeselect-label,
|
|
||||||
.p-floatlabel-on .p-treeselect-label {
|
|
||||||
padding-top: ${dt('floatlabel.on.input.padding.top')};
|
|
||||||
padding-bottom: ${dt('floatlabel.on.input.padding.bottom')};
|
|
||||||
}
|
|
||||||
|
|
||||||
.p-floatlabel-on:has(input:focus) label,
|
.p-floatlabel-on:has(input:focus) label,
|
||||||
.p-floatlabel-on:has(input.p-filled) label,
|
.p-floatlabel-on:has(input.p-filled) label,
|
||||||
.p-floatlabel-on:has(input:-webkit-autofill) label,
|
.p-floatlabel-on:has(input:-webkit-autofill) label,
|
||||||
|
@ -108,6 +99,7 @@ const theme = ({ dt }) => `
|
||||||
.p-floatlabel-on:has(.p-inputwrapper-filled) label {
|
.p-floatlabel-on:has(.p-inputwrapper-filled) label {
|
||||||
top: 0;
|
top: 0;
|
||||||
transform: translateY(-50%);
|
transform: translateY(-50%);
|
||||||
|
border-radius: ${dt('floatlabel.on.border.radius')};
|
||||||
background: ${dt('floatlabel.on.active.background')};
|
background: ${dt('floatlabel.on.active.background')};
|
||||||
padding: ${dt('floatlabel.on.active.padding')};
|
padding: ${dt('floatlabel.on.active.padding')};
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,10 +27,7 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
on: {
|
on: {
|
||||||
input: {
|
borderRadius: '{border.radius.xs}',
|
||||||
paddingTop: '1rem',
|
|
||||||
paddingBottom: '1rem'
|
|
||||||
},
|
|
||||||
active: {
|
active: {
|
||||||
background: '{form.field.background}',
|
background: '{form.field.background}',
|
||||||
padding: '0 0.125rem'
|
padding: '0 0.125rem'
|
||||||
|
|
|
@ -27,10 +27,7 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
on: {
|
on: {
|
||||||
input: {
|
borderRadius: '{border.radius.xs}',
|
||||||
paddingTop: '1.25rem',
|
|
||||||
paddingBottom: '1.25rem'
|
|
||||||
},
|
|
||||||
active: {
|
active: {
|
||||||
background: '{form.field.background}',
|
background: '{form.field.background}',
|
||||||
padding: '0 0.125rem'
|
padding: '0 0.125rem'
|
||||||
|
|
|
@ -27,10 +27,7 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
on: {
|
on: {
|
||||||
input: {
|
borderRadius: '{border.radius.xs}',
|
||||||
paddingTop: '1rem',
|
|
||||||
paddingBottom: '1rem'
|
|
||||||
},
|
|
||||||
active: {
|
active: {
|
||||||
background: '{form.field.background}',
|
background: '{form.field.background}',
|
||||||
padding: '0 0.125rem'
|
padding: '0 0.125rem'
|
||||||
|
|
Loading…
Reference in New Issue