InputText & InputNumber pt demos added

pull/3938/head
Tuğçe Küçükoğlu 2023-05-05 15:57:15 +03:00
parent 87b6859398
commit d1f4dee460
8 changed files with 266 additions and 6 deletions

View File

@ -0,0 +1,101 @@
<template>
<DocSectionText v-bind="$attrs"></DocSectionText>
<div class="card flex justify-content-center">
<InputNumber
v-model="value"
showButtons
buttonLayout="horizontal"
:step="0.25"
incrementButtonIcon="pi pi-plus"
decrementButtonIcon="pi pi-minus"
mode="currency"
currency="EUR"
:pt="{
incrementButton: { class: 'bg-teal-500 border-teal-500' },
decrementButton: { class: 'bg-orange-500 border-orange-500' }
}"
/>
</div>
<DocSectionCode :code="code" />
</template>
<script>
export default {
data() {
return {
value: 20,
code: {
basic: `
<InputNumber
v-model="value"
showButtons
buttonLayout="horizontal"
:step="0.25"
incrementButtonIcon="pi pi-plus"
decrementButtonIcon="pi pi-minus"
mode="currency"
currency="EUR"
:pt="{
incrementButton: { class: 'bg-teal-500 border-teal-500' },
decrementButton: { class: 'bg-orange-500 border-orange-500' }
}"
/>`,
options: `
<template>
<div class="card flex justify-content-center">
<InputNumber
v-model="value"
showButtons
buttonLayout="horizontal"
:step="0.25"
incrementButtonIcon="pi pi-plus"
decrementButtonIcon="pi pi-minus"
mode="currency"
currency="EUR"
:pt="{
incrementButton: { class: 'bg-teal-500 border-teal-500' },
decrementButton: { class: 'bg-orange-500 border-orange-500' }
}"
/>
</div>
</template>
<script>
export default {
data() {
return {
value: 20
};
}
};
<\/script>`,
composition: `
<template>
<div class="card flex justify-content-center">
<InputNumber
v-model="value"
showButtons
buttonLayout="horizontal"
:step="0.25"
incrementButtonIcon="pi pi-plus"
decrementButtonIcon="pi pi-minus"
mode="currency"
currency="EUR"
:pt="{
incrementButton: { class: 'bg-teal-500 border-teal-500' },
decrementButton: { class: 'bg-orange-500 border-orange-500' }
}"
/>
</div>
</template>
<script setup>
import { ref } from "vue";
const value = ref(20);
<\/script>`
}
};
}
};
</script>

View File

@ -0,0 +1,8 @@
<template>
<DocSectionText v-bind="$attrs">
<p>{{ $attrs.description }}</p>
</DocSectionText>
<div class="card">
<img class="w-full" src="https://primefaces.org/cdn/primevue/images/pt/wireframe-placeholder.jpg" />
</div>
</template>

View File

@ -0,0 +1,41 @@
<template>
<div class="doc-main">
<div class="doc-intro">
<h1>InputNumber Pass Through</h1>
</div>
<DocSections :docs="docs" />
</div>
<DocSectionNav :docs="docs" />
</template>
<script>
import DocApiTable from '@/components/doc/DocApiTable.vue';
import { getPTOption } from '@/components/doc/helpers/PTHelper.js';
import PtDoc from './PTDoc.vue';
import PTImage from './PTImage.vue';
export default {
data() {
return {
docs: [
{
id: 'pt.image',
label: 'Wireframe',
component: PTImage
},
{
id: 'pt.doc.inputnumber',
label: 'InputNumber PT Options',
component: DocApiTable,
data: getPTOption('InputNumber')
},
{
id: 'pt.demo',
label: 'Demo',
component: PtDoc
}
]
};
}
};
</script>

View File

@ -0,0 +1,57 @@
<template>
<DocSectionText v-bind="$attrs"></DocSectionText>
<div class="card flex justify-content-center">
<InputText
v-model="value"
type="text"
:pt="{
root: { class: 'border-teal-400' }
}"
/>
</div>
<DocSectionCode :code="code" />
</template>
<script>
export default {
data() {
return {
value: null,
code: {
basic: `
<InputText type="text" v-model="value" />`,
options: `
<template>
<div class="card flex justify-content-center">
<InputText type="text" v-model="value" />
</div>
</template>
<script>
export default {
data() {
return {
value: null
}
}
}
<\/script>
`,
composition: `
<template>
<div class="card flex justify-content-center">
<InputText type="text" v-model="value" />
</div>
</template>
<script setup>
import { ref } from 'vue';
const value = ref(null);
<\/script>
`
}
};
}
};
</script>

View File

@ -0,0 +1,8 @@
<template>
<DocSectionText v-bind="$attrs">
<p>{{ $attrs.description }}</p>
</DocSectionText>
<div class="card">
<img class="w-full" src="https://primefaces.org/cdn/primevue/images/pt/wireframe-placeholder.jpg" />
</div>
</template>

View File

@ -0,0 +1,41 @@
<template>
<div class="doc-main">
<div class="doc-intro">
<h1>InputText Pass Through</h1>
</div>
<DocSections :docs="docs" />
</div>
<DocSectionNav :docs="docs" />
</template>
<script>
import DocApiTable from '@/components/doc/DocApiTable.vue';
import { getPTOption } from '@/components/doc/helpers/PTHelper.js';
import PtDoc from './PTDoc.vue';
import PTImage from './PTImage.vue';
export default {
data() {
return {
docs: [
{
id: 'pt.image',
label: 'Wireframe',
component: PTImage
},
{
id: 'pt.doc.inputtext',
label: 'InputText PT Options',
component: DocApiTable,
data: getPTOption('InputText')
},
{
id: 'pt.demo',
label: 'Demo',
component: PtDoc
}
]
};
}
};
</script>

View File

@ -1,5 +1,5 @@
<template>
<DocComponent title="Vue InputNumber Component" header="InputNumber" description="InputNumber is an input component to provide numerical input." :componentDocs="docs" :apiDocs="['InputNumber']" />
<DocComponent title="Vue InputNumber Component" header="InputNumber" description="InputNumber is an input component to provide numerical input." :componentDocs="docs" :apiDocs="['InputNumber']" :ptTabComponent="ptComponent" />
</template>
<script>
@ -8,7 +8,6 @@ import ButtonsDoc from '@/doc/inputnumber/ButtonsDoc';
import CurrencyDoc from '@/doc/inputnumber/CurrencyDoc';
import DisabledDoc from '@/doc/inputnumber/DisabledDoc';
import FloatLabelDoc from '@/doc/inputnumber/FloatLabelDoc';
import VeeValidateDoc from '@/doc/inputnumber/form/VeeValidateDoc';
import ImportDoc from '@/doc/inputnumber/ImportDoc';
import InvalidDoc from '@/doc/inputnumber/InvalidDoc';
import LocaleDoc from '@/doc/inputnumber/LocaleDoc';
@ -16,6 +15,8 @@ import NumeralsDoc from '@/doc/inputnumber/NumeralsDoc';
import PrefixSuffixDoc from '@/doc/inputnumber/PrefixSuffixDoc';
import StyleDoc from '@/doc/inputnumber/StyleDoc';
import VerticalDoc from '@/doc/inputnumber/VerticalDoc';
import VeeValidateDoc from '@/doc/inputnumber/form/VeeValidateDoc';
import PTComponent from '@/doc/inputnumber/pt/index.vue';
export default {
data() {
@ -93,7 +94,8 @@ export default {
label: 'Accessibility',
component: AccessibilityDoc
}
]
],
ptComponent: PTComponent
};
}
};

View File

@ -1,5 +1,5 @@
<template>
<DocComponent title="Vue Input Component" header="InputText" description="InputText is an extension to standard input element with theming." :componentDocs="docs" :apiDocs="['InputText']" />
<DocComponent title="Vue Input Component" header="InputText" description="InputText is an extension to standard input element with theming." :componentDocs="docs" :apiDocs="['InputText']" :ptTabComponent="ptComponent" />
</template>
<script>
@ -7,13 +7,14 @@ import AccessibilityDoc from '@/doc/inputtext/AccessibilityDoc.vue';
import BasicDoc from '@/doc/inputtext/BasicDoc.vue';
import DisabledDoc from '@/doc/inputtext/DisabledDoc.vue';
import FloatLabelDoc from '@/doc/inputtext/FloatLabelDoc.vue';
import VeeValidateDoc from '@/doc/inputtext/form/VeeValidateDoc.vue';
import HelpTextDoc from '@/doc/inputtext/HelpTextDoc.vue';
import IconsDoc from '@/doc/inputtext/IconsDoc.vue';
import ImportDoc from '@/doc/inputtext/ImportDoc.vue';
import InvalidDoc from '@/doc/inputtext/InvalidDoc.vue';
import SizesDoc from '@/doc/inputtext/SizesDoc.vue';
import StyleDoc from '@/doc/inputtext/StyleDoc.vue';
import VeeValidateDoc from '@/doc/inputtext/form/VeeValidateDoc.vue';
import PTComponent from '@/doc/inputtext/pt/index.vue';
export default {
data() {
@ -81,7 +82,8 @@ export default {
label: 'Accessibility',
component: AccessibilityDoc
}
]
],
ptComponent: PTComponent
};
}
};