Calendar pt demo added

pull/3925/head
Tuğçe Küçükoğlu 2023-05-04 17:51:43 +03:00
parent 244233aa2d
commit a1f6e57d43
4 changed files with 139 additions and 3 deletions

85
doc/calendar/pt/PTDoc.vue Normal file
View File

@ -0,0 +1,85 @@
<template>
<DocSectionText v-bind="$attrs"> </DocSectionText>
<div class="card flex justify-content-center">
<Calendar
v-model="date"
showIcon
:pt="{
input: { class: 'w-16rem' },
dropdownButton: {
root: { class: 'bg-teal-500 border-teal-500' }
}
}"
/>
</div>
<DocSectionCode :code="code" />
</template>
<script>
export default {
data() {
return {
date: null,
code: {
basic: `
<Calendar
v-model="date"
showIcon
:pt="{
input: { class: 'w-16rem' },
dropdownButton: {
root: { class: 'bg-teal-500 border-teal-500' }
}
}"
/>`,
options: `
<template>
<div class="card flex justify-content-center">
<Calendar
v-model="date"
showIcon
:pt="{
input: { class: 'w-16rem' },
dropdownButton: {
root: { class: 'bg-teal-500 border-teal-500' }
}
}"
/>
</div>
</template>
<script>
export default {
data() {
return {
date: null
};
}
};
<\/script>`,
composition: `
<template>
<div class="card flex justify-content-center">
<Calendar
v-model="date"
showIcon
:pt="{
input: { class: 'w-16rem' },
dropdownButton: {
root: { class: 'bg-teal-500 border-teal-500' }
}
}"
/>
</div>
</template>
<script setup>
import { ref } from "vue";
const date = ref();
<\/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>

41
doc/calendar/pt/index.vue Normal file
View File

@ -0,0 +1,41 @@
<template>
<div class="doc-main">
<div class="doc-intro">
<h1>Calendar 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.calendar',
label: 'Calendar PT Options',
component: DocApiTable,
data: getPTOption('Calendar')
},
{
id: 'pt.demo',
label: 'Demo',
component: PtDoc
}
]
};
}
};
</script>

View File

@ -1,5 +1,5 @@
<template> <template>
<DocComponent title="Vue Calendar Component" header="Calendar" description="Calendar, also known as DatePicker, is a form component to work with dates." :componentDocs="docs" :apiDocs="['Calendar']" /> <DocComponent title="Vue Calendar Component" header="Calendar" description="Calendar, also known as DatePicker, is a form component to work with dates." :componentDocs="docs" :apiDocs="['Calendar']" :ptTabComponent="ptComponent" />
</template> </template>
<script> <script>
@ -9,7 +9,6 @@ import ButtonBarDoc from '@/doc/calendar/ButtonBarDoc';
import DateTemplateDoc from '@/doc/calendar/DateTemplateDoc'; import DateTemplateDoc from '@/doc/calendar/DateTemplateDoc';
import DisabledDoc from '@/doc/calendar/DisabledDoc'; import DisabledDoc from '@/doc/calendar/DisabledDoc';
import FloatLabelDoc from '@/doc/calendar/FloatLabelDoc'; import FloatLabelDoc from '@/doc/calendar/FloatLabelDoc';
import VeeValidateDoc from '@/doc/calendar/form/VeeValidateDoc.vue';
import FormatDoc from '@/doc/calendar/FormatDoc'; import FormatDoc from '@/doc/calendar/FormatDoc';
import IconDoc from '@/doc/calendar/IconDoc'; import IconDoc from '@/doc/calendar/IconDoc';
import ImportDoc from '@/doc/calendar/ImportDoc'; import ImportDoc from '@/doc/calendar/ImportDoc';
@ -25,6 +24,8 @@ import StyleDoc from '@/doc/calendar/StyleDoc';
import TimeDoc from '@/doc/calendar/TimeDoc'; import TimeDoc from '@/doc/calendar/TimeDoc';
import TouchUIDoc from '@/doc/calendar/TouchUIDoc'; import TouchUIDoc from '@/doc/calendar/TouchUIDoc';
import YearPickerDoc from '@/doc/calendar/YearPickerDoc'; import YearPickerDoc from '@/doc/calendar/YearPickerDoc';
import VeeValidateDoc from '@/doc/calendar/form/VeeValidateDoc.vue';
import PTComponent from '@/doc/calendar/pt/index.vue';
export default { export default {
data() { data() {
@ -147,7 +148,8 @@ export default {
label: 'Accessibility', label: 'Accessibility',
component: AccessibilityDoc component: AccessibilityDoc
} }
] ],
ptComponent: PTComponent
}; };
} }
}; };