Textarea, ToggleButton, TreeSelect, TriStateCheckbox unstyled demo updates

pull/4224/head
Tuğçe Küçükoğlu 2023-07-26 20:30:11 +03:00
parent 6d4ca0247e
commit 54252e463f
16 changed files with 326 additions and 32 deletions

View File

@ -0,0 +1,30 @@
<template>
<DocSectionText v-bind="$attrs">
<p>Theming is implemented with the pass through properties in unstyled mode. Example below demonstrates the built-in Tailwind theme.</p>
</DocSectionText>
<DocSectionCode :code="code" embedded />
</template>
<script>
export default {
data() {
return {
value: '',
code: {
composition: `
<template>
<div class="card flex justify-center">
<Textarea v-model="value" rows="5" cols="30" />
</div>
</template>
<script setup>
import { ref } from 'vue';
const value = ref('');
<\/script>`
}
};
}
};
</script>

View File

@ -0,0 +1,33 @@
<template>
<div class="doc-main">
<div class="doc-intro">
<h1>Textarea Theming</h1>
</div>
<DocSections :docs="docs" />
</div>
<DocSectionNav :docs="docs" />
</template>
<script>
import StyledDoc from './StyledDoc.vue';
import UnstyledDoc from './UnstyledDoc.vue';
export default {
data() {
return {
docs: [
{
id: 'styled',
label: 'Styled',
component: StyledDoc
},
{
id: 'unstyled',
label: 'Unstyled',
component: UnstyledDoc
}
]
};
}
};
</script>

View File

@ -0,0 +1,30 @@
<template>
<DocSectionText v-bind="$attrs">
<p>Theming is implemented with the pass through properties in unstyled mode. Example below demonstrates the built-in Tailwind theme.</p>
</DocSectionText>
<DocSectionCode :code="code" embedded />
</template>
<script>
export default {
data() {
return {
checked: false,
code: {
composition: `
<template>
<div class="card flex justify-center">
<ToggleButton v-model="checked" class="w-8rem" />
</div>
</template>
<script setup>
import { ref } from 'vue';
const checked = ref(false);
<\/script>`
}
};
}
};
</script>

View File

@ -0,0 +1,33 @@
<template>
<div class="doc-main">
<div class="doc-intro">
<h1>ToggleButton Theming</h1>
</div>
<DocSections :docs="docs" />
</div>
<DocSectionNav :docs="docs" />
</template>
<script>
import StyledDoc from './StyledDoc.vue';
import UnstyledDoc from './UnstyledDoc.vue';
export default {
data() {
return {
docs: [
{
id: 'styled',
label: 'Styled',
component: StyledDoc
},
{
id: 'unstyled',
label: 'Unstyled',
component: UnstyledDoc
}
]
};
}
};
</script>

View File

@ -0,0 +1,69 @@
<template>
<DocSectionText v-bind="$attrs">
<p>Theming is implemented with the pass through properties in unstyled mode. Example below demonstrates the built-in Tailwind theme.</p>
</DocSectionText>
<DocSectionCode :code="code" :service="['NodeService']" embedded />
</template>
<script>
import { NodeService } from '/service/NodeService';
export default {
data() {
return {
nodes: null,
selectedValue: null,
code: {
composition: `
<template>
<div class="card flex justify-center">
<TreeSelect v-model="selectedValue" :options="nodes" placeholder="Select Item" class="md:w-20rem w-full" />
</div>
</template>
<script setup>
import { ref, onMounted } from 'vue';
import { NodeService } from './service/NodeService';
const nodes = ref(null);
const selectedValue = ref(null);
onMounted(() => {
NodeService.getTreeNodes().then((data) => (nodes.value = data));
});
<\/script>`,
data: `
{
key: '0',
label: 'Documents',
data: 'Documents Folder',
icon: 'pi pi-fw pi-inbox',
children: [
{
key: '0-0',
label: 'Work',
data: 'Work Folder',
icon: 'pi pi-fw pi-cog',
children: [
{ key: '0-0-0', label: 'Expenses.doc', icon: 'pi pi-fw pi-file', data: 'Expenses Document' },
{ key: '0-0-1', label: 'Resume.doc', icon: 'pi pi-fw pi-file', data: 'Resume Document' }
]
},
{
key: '0-1',
label: 'Home',
data: 'Home Folder',
icon: 'pi pi-fw pi-home',
children: [{ key: '0-1-0', label: 'Invoices.txt', icon: 'pi pi-fw pi-file', data: 'Invoices for this month' }]
}
]
},
...`
}
};
},
mounted() {
NodeService.getTreeNodes().then((data) => (this.nodes = data));
}
};
</script>

View File

@ -0,0 +1,33 @@
<template>
<div class="doc-main">
<div class="doc-intro">
<h1>TreeSelect Theming</h1>
</div>
<DocSections :docs="docs" />
</div>
<DocSectionNav :docs="docs" />
</template>
<script>
import StyledDoc from './StyledDoc.vue';
import UnstyledDoc from './UnstyledDoc.vue';
export default {
data() {
return {
docs: [
{
id: 'styled',
label: 'Styled',
component: StyledDoc
},
{
id: 'unstyled',
label: 'Unstyled',
component: UnstyledDoc
}
]
};
}
};
</script>

View File

@ -0,0 +1,31 @@
<template>
<DocSectionText v-bind="$attrs">
<p>Theming is implemented with the pass through properties in unstyled mode. Example below demonstrates the built-in Tailwind theme.</p>
</DocSectionText>
<DocSectionCode :code="code" embedded />
</template>
<script>
export default {
data() {
return {
value: null,
code: {
composition: `
<template>
<div class="card flex flex-column align-center">
<TriStateCheckbox v-model="value" />
<label for="checkbox">{{ value == null ? 'null' : value }}</label>
</div>
</template>
<script setup>
import { ref } from 'vue';
const value = ref(null);
<\/script>`
}
};
}
};
</script>

View File

@ -0,0 +1,33 @@
<template>
<div class="doc-main">
<div class="doc-intro">
<h1>TriStateCheckbox Theming</h1>
</div>
<DocSections :docs="docs" />
</div>
<DocSectionNav :docs="docs" />
</template>
<script>
import StyledDoc from './StyledDoc.vue';
import UnstyledDoc from './UnstyledDoc.vue';
export default {
data() {
return {
docs: [
{
id: 'styled',
label: 'Styled',
component: StyledDoc
},
{
id: 'unstyled',
label: 'Unstyled',
component: UnstyledDoc
}
]
};
}
};
</script>

View File

@ -6,6 +6,7 @@
:componentDocs="docs" :componentDocs="docs"
:apiDocs="['Textarea']" :apiDocs="['Textarea']"
:ptTabComponent="ptComponent" :ptTabComponent="ptComponent"
:themingDocs="themingDoc"
/> />
</template> </template>
@ -17,9 +18,9 @@ import DisabledDoc from '@/doc/textarea/DisabledDoc';
import FloatLabelDoc from '@/doc/textarea/FloatLabelDoc'; import FloatLabelDoc from '@/doc/textarea/FloatLabelDoc';
import ImportDoc from '@/doc/textarea/ImportDoc'; import ImportDoc from '@/doc/textarea/ImportDoc';
import InvalidDoc from '@/doc/textarea/InvalidDoc'; import InvalidDoc from '@/doc/textarea/InvalidDoc';
import StyleDoc from '@/doc/textarea/StyleDoc';
import VeeValidateDoc from '@/doc/textarea/form/VeeValidateDoc.vue'; import VeeValidateDoc from '@/doc/textarea/form/VeeValidateDoc.vue';
import PTComponent from '@/doc/textarea/pt/index.vue'; import PTComponent from '@/doc/textarea/pt/index.vue';
import ThemingDoc from '@/doc/textarea/theming/index.vue';
export default { export default {
data() { data() {
@ -67,18 +68,14 @@ export default {
} }
] ]
}, },
{
id: 'style',
label: 'Style',
component: StyleDoc
},
{ {
id: 'accessibility', id: 'accessibility',
label: 'Accessibility', label: 'Accessibility',
component: AccessibilityDoc component: AccessibilityDoc
} }
], ],
ptComponent: PTComponent ptComponent: PTComponent,
themingDoc: ThemingDoc
}; };
} }
}; };

View File

@ -1,5 +1,13 @@
<template> <template>
<DocComponent title="Vue ToggleButton Component" header="ToggleButton" description="ToggleButton is used to select a boolean value using a button." :componentDocs="docs" :apiDocs="['ToggleButton']" :ptTabComponent="ptComponent" /> <DocComponent
title="Vue ToggleButton Component"
header="ToggleButton"
description="ToggleButton is used to select a boolean value using a button."
:componentDocs="docs"
:apiDocs="['ToggleButton']"
:ptTabComponent="ptComponent"
:themingDocs="themingDoc"
/>
</template> </template>
<script> <script>
@ -7,10 +15,10 @@ import AccessibilityDoc from '@/doc/togglebutton/AccessibilityDoc.vue';
import BasicDoc from '@/doc/togglebutton/BasicDoc.vue'; import BasicDoc from '@/doc/togglebutton/BasicDoc.vue';
import CustomizedDoc from '@/doc/togglebutton/CustomizedDoc.vue'; import CustomizedDoc from '@/doc/togglebutton/CustomizedDoc.vue';
import DisabledDoc from '@/doc/togglebutton/DisabledDoc.vue'; import DisabledDoc from '@/doc/togglebutton/DisabledDoc.vue';
import VeeValidateDoc from '@/doc/togglebutton/form/VeeValidateDoc.vue';
import ImportDoc from '@/doc/togglebutton/ImportDoc.vue'; import ImportDoc from '@/doc/togglebutton/ImportDoc.vue';
import StyleDoc from '@/doc/togglebutton/StyleDoc.vue'; import VeeValidateDoc from '@/doc/togglebutton/form/VeeValidateDoc.vue';
import PTComponent from '@/doc/togglebutton/pt/index.vue'; import PTComponent from '@/doc/togglebutton/pt/index.vue';
import ThemingDoc from '@/doc/togglebutton/theming/index.vue';
export default { export default {
data() { data() {
@ -48,18 +56,14 @@ export default {
} }
] ]
}, },
{
id: 'style',
label: 'Style',
component: StyleDoc
},
{ {
id: 'accessibility', id: 'accessibility',
label: 'Accessibility', label: 'Accessibility',
component: AccessibilityDoc component: AccessibilityDoc
} }
], ],
ptComponent: PTComponent ptComponent: PTComponent,
themingDoc: ThemingDoc
}; };
} }
}; };

View File

@ -1,5 +1,13 @@
<template> <template>
<DocComponent title="Vue TreeSelect Component" header="TreeSelect" description="TreeSelect is a form component to choose from hierarchical data." :componentDocs="docs" :apiDocs="['TreeSelect']" :ptTabComponent="ptComponent" /> <DocComponent
title="Vue TreeSelect Component"
header="TreeSelect"
description="TreeSelect is a form component to choose from hierarchical data."
:componentDocs="docs"
:apiDocs="['TreeSelect']"
:ptTabComponent="ptComponent"
:themingDocs="themingDoc"
/>
</template> </template>
<script> <script>
@ -11,9 +19,9 @@ import FloatLabelDoc from '@/doc/treeselect/FloatLabelDoc';
import ImportDoc from '@/doc/treeselect/ImportDoc'; import ImportDoc from '@/doc/treeselect/ImportDoc';
import InvalidDoc from '@/doc/treeselect/InvalidDoc'; import InvalidDoc from '@/doc/treeselect/InvalidDoc';
import MultipleDoc from '@/doc/treeselect/MultipleDoc'; import MultipleDoc from '@/doc/treeselect/MultipleDoc';
import StyleDoc from '@/doc/treeselect/StyleDoc';
import VeeValidateDoc from '@/doc/treeselect/form/VeeValidateDoc.vue'; import VeeValidateDoc from '@/doc/treeselect/form/VeeValidateDoc.vue';
import PTComponent from '@/doc/treeselect/pt/index.vue'; import PTComponent from '@/doc/treeselect/pt/index.vue';
import ThemingDoc from '@/doc/treeselect/theming/index.vue';
export default { export default {
data() { data() {
@ -66,18 +74,14 @@ export default {
} }
] ]
}, },
{
id: 'style',
label: 'Style',
component: StyleDoc
},
{ {
id: 'accessibility', id: 'accessibility',
label: 'Accessibility', label: 'Accessibility',
component: AccessibilityDoc component: AccessibilityDoc
} }
], ],
ptComponent: PTComponent ptComponent: PTComponent,
themingDoc: ThemingDoc
}; };
} }
}; };

View File

@ -6,6 +6,7 @@
:componentDocs="docs" :componentDocs="docs"
:apiDocs="['TriStateCheckbox']" :apiDocs="['TriStateCheckbox']"
:ptTabComponent="ptComponent" :ptTabComponent="ptComponent"
:themingDocs="themingDoc"
/> />
</template> </template>
@ -13,11 +14,11 @@
import AccessibilityDoc from '@/doc/tristatecheckbox/AccessibilityDoc'; import AccessibilityDoc from '@/doc/tristatecheckbox/AccessibilityDoc';
import BasicDoc from '@/doc/tristatecheckbox/BasicDoc'; import BasicDoc from '@/doc/tristatecheckbox/BasicDoc';
import DisabledDoc from '@/doc/tristatecheckbox/DisabledDoc'; import DisabledDoc from '@/doc/tristatecheckbox/DisabledDoc';
import VeeValidateDoc from '@/doc/tristatecheckbox/form/VeeValidateDoc.vue';
import ImportDoc from '@/doc/tristatecheckbox/ImportDoc'; import ImportDoc from '@/doc/tristatecheckbox/ImportDoc';
import InvalidDoc from '@/doc/tristatecheckbox/InvalidDoc'; import InvalidDoc from '@/doc/tristatecheckbox/InvalidDoc';
import StyleDoc from '@/doc/tristatecheckbox/StyleDoc'; import VeeValidateDoc from '@/doc/tristatecheckbox/form/VeeValidateDoc.vue';
import PTComponent from '@/doc/tristatecheckbox/pt/index.vue'; import PTComponent from '@/doc/tristatecheckbox/pt/index.vue';
import ThemingDoc from '@/doc/tristatecheckbox/theming/index.vue';
export default { export default {
data() { data() {
@ -55,18 +56,14 @@ export default {
} }
] ]
}, },
{
id: 'style',
label: 'Style',
component: StyleDoc
},
{ {
id: 'accessibility', id: 'accessibility',
label: 'Accessibility', label: 'Accessibility',
component: AccessibilityDoc component: AccessibilityDoc
} }
], ],
ptComponent: PTComponent ptComponent: PTComponent,
themingDoc: ThemingDoc
}; };
} }
}; };