InputMask, InputNumber, InputSwitch, InputText unstyled demo updates

pull/4224/head
Tuğçe Küçükoğlu 2023-07-26 17:53:34 +03:00
parent a3f5a4fb6f
commit 6cfb10b024
16 changed files with 303 additions and 35 deletions

View File

@ -1,5 +1,5 @@
<template> <template>
<DocSectionText id="style" label="Style" v-bind="$attrs"> <DocSectionText v-bind="$attrs">
<p>List of class names used in the styled mode.</p> <p>List of class names used in the styled mode.</p>
</DocSectionText> </DocSectionText>
<div class="doc-tablewrapper"> <div class="doc-tablewrapper">

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: '',
code: {
composition: `
<template>
<div class="card flex justify-center">
<InputMask id="basic" v-model="value" mask="99-999999" placeholder="99-999999" />
</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>InputMask 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

@ -1,5 +1,5 @@
<template> <template>
<DocSectionText id="style" label="Style" v-bind="$attrs"> <DocSectionText v-bind="$attrs">
<p>List of class names used in the styled mode.</p> <p>List of class names used in the styled mode.</p>
</DocSectionText> </DocSectionText>
<div class="doc-tablewrapper"> <div class="doc-tablewrapper">

View File

@ -0,0 +1,51 @@
<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 {
value1: 42723,
value2: 58151,
value3: 2351.35,
value4: 50,
code: {
composition: `
<template>
<div class="card flex flex-wrap">
<div class="flex-auto">
<label for="integeronly" class="font-bold block mb-2"> Integer Only </label>
<InputNumber v-model="value1" inputId="integeronly" />
</div>
<div class="flex-auto">
<label for="withoutgrouping" class="font-bold block mb-2"> Without Grouping </label>
<InputNumber v-model="value2" inputId="withoutgrouping" :useGrouping="false" />
</div>
<div class="flex-auto">
<label for="minmaxfraction" class="font-bold block mb-2"> Min-Max Fraction Digits </label>
<InputNumber v-model="value3" inputId="minmaxfraction" :minFractionDigits="2" :maxFractionDigits="5" />
</div>
<div class="flex-auto">
<label for="minmax" class="font-bold block mb-2"> Min-Max Boundaries </label>
<InputNumber v-model="value4" inputId="minmax" :min="0" :max="100" />
</div>
</div>
</template>
<script setup>
import { ref } from "vue";
const value1 = ref(42723);
const value2 = ref(58151);
const value3 = ref(2351.35);
const value4 = ref(50);
<\/script>`
}
};
}
};
</script>

View File

@ -0,0 +1,33 @@
<template>
<div class="doc-main">
<div class="doc-intro">
<h1>InputNumber 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

@ -1,5 +1,5 @@
<template> <template>
<DocSectionText id="style" label="Style" v-bind="$attrs"> <DocSectionText v-bind="$attrs">
<p>List of class names used in the styled mode.</p> <p>List of class names used in the styled mode.</p>
</DocSectionText> </DocSectionText>
<div class="doc-tablewrapper"> <div class="doc-tablewrapper">

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">
<InputSwitch v-model="checked" />
</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>InputSwitch 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

@ -1,5 +1,5 @@
<template> <template>
<DocSectionText id="style" label="Style" v-bind="$attrs"> <DocSectionText v-bind="$attrs">
<p>List of class names used in the styled mode.</p> <p>List of class names used in the styled mode.</p>
</DocSectionText> </DocSectionText>
<div class="doc-tablewrapper"> <div class="doc-tablewrapper">

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 justify-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,33 @@
<template>
<div class="doc-main">
<div class="doc-intro">
<h1>InputText 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="['InputMask']" :apiDocs="['InputMask']"
:ptTabComponent="ptComponent" :ptTabComponent="ptComponent"
:themingDocs="themingDoc"
/> />
</template> </template>
@ -19,9 +20,9 @@ import InvalidDoc from '@/doc/inputmask/InvalidDoc.vue';
import MaskDoc from '@/doc/inputmask/MaskDoc.vue'; import MaskDoc from '@/doc/inputmask/MaskDoc.vue';
import OptionalDoc from '@/doc/inputmask/OptionalDoc.vue'; import OptionalDoc from '@/doc/inputmask/OptionalDoc.vue';
import SlotCharDoc from '@/doc/inputmask/SlotCharDoc.vue'; import SlotCharDoc from '@/doc/inputmask/SlotCharDoc.vue';
import StyleDoc from '@/doc/inputmask/StyleDoc.vue';
import VeeValidateDoc from '@/doc/inputmask/form/VeeValidateDoc.vue'; import VeeValidateDoc from '@/doc/inputmask/form/VeeValidateDoc.vue';
import PTComponent from '@/doc/inputmask/pt/index.vue'; import PTComponent from '@/doc/inputmask/pt/index.vue';
import ThemingDoc from '@/doc/inputmask/theming/index.vue';
export default { export default {
data() { data() {
@ -79,18 +80,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 InputNumber Component" header="InputNumber" description="InputNumber is an input component to provide numerical input." :componentDocs="docs" :apiDocs="['InputNumber']" :ptTabComponent="ptComponent" /> <DocComponent
title="Vue InputNumber Component"
header="InputNumber"
description="InputNumber is an input component to provide numerical input."
:componentDocs="docs"
:apiDocs="['InputNumber']"
:ptTabComponent="ptComponent"
:themingDocs="themingDoc"
/>
</template> </template>
<script> <script>
@ -13,10 +21,10 @@ import InvalidDoc from '@/doc/inputnumber/InvalidDoc';
import LocaleDoc from '@/doc/inputnumber/LocaleDoc'; import LocaleDoc from '@/doc/inputnumber/LocaleDoc';
import NumeralsDoc from '@/doc/inputnumber/NumeralsDoc'; import NumeralsDoc from '@/doc/inputnumber/NumeralsDoc';
import PrefixSuffixDoc from '@/doc/inputnumber/PrefixSuffixDoc'; import PrefixSuffixDoc from '@/doc/inputnumber/PrefixSuffixDoc';
import StyleDoc from '@/doc/inputnumber/StyleDoc';
import VerticalDoc from '@/doc/inputnumber/VerticalDoc'; import VerticalDoc from '@/doc/inputnumber/VerticalDoc';
import VeeValidateDoc from '@/doc/inputnumber/form/VeeValidateDoc'; import VeeValidateDoc from '@/doc/inputnumber/form/VeeValidateDoc';
import PTComponent from '@/doc/inputnumber/pt/index.vue'; import PTComponent from '@/doc/inputnumber/pt/index.vue';
import ThemingDoc from '@/doc/inputnumber/theming/index.vue';
export default { export default {
data() { data() {
@ -84,18 +92,14 @@ export default {
label: 'Disabled', label: 'Disabled',
component: DisabledDoc component: DisabledDoc
}, },
{
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,5 @@
<template> <template>
<DocComponent title="Vue InputSwitch Component" header="InputSwitch" description="InputSwitch is used to select a boolean value." :componentDocs="docs" :apiDocs="['InputSwitch']" :ptTabComponent="ptComponent" /> <DocComponent title="Vue InputSwitch Component" header="InputSwitch" description="InputSwitch is used to select a boolean value." :componentDocs="docs" :apiDocs="['InputSwitch']" :ptTabComponent="ptComponent" :themingDocs="themingDoc" />
</template> </template>
<script> <script>
@ -9,9 +9,9 @@ import DisabledDoc from '@/doc/inputswitch/DisabledDoc.vue';
import ImportDoc from '@/doc/inputswitch/ImportDoc.vue'; import ImportDoc from '@/doc/inputswitch/ImportDoc.vue';
import InvalidDoc from '@/doc/inputswitch/InvalidDoc.vue'; import InvalidDoc from '@/doc/inputswitch/InvalidDoc.vue';
import PreselectionDoc from '@/doc/inputswitch/PreselectionDoc.vue'; import PreselectionDoc from '@/doc/inputswitch/PreselectionDoc.vue';
import StyleDoc from '@/doc/inputswitch/StyleDoc.vue';
import VeeValidateDoc from '@/doc/inputswitch/form/VeeValidateDoc.vue'; import VeeValidateDoc from '@/doc/inputswitch/form/VeeValidateDoc.vue';
import PTComponent from '@/doc/inputswitch/pt/index.vue'; import PTComponent from '@/doc/inputswitch/pt/index.vue';
import ThemingDoc from '@/doc/inputswitch/theming/index.vue';
export default { export default {
data() { data() {
@ -54,18 +54,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,5 @@
<template> <template>
<DocComponent title="Vue Input Component" header="InputText" description="InputText is an extension to standard input element with theming." :componentDocs="docs" :apiDocs="['InputText']" :ptTabComponent="ptComponent" /> <DocComponent title="Vue Input Component" header="InputText" description="InputText is an extension to standard input element with theming." :componentDocs="docs" :apiDocs="['InputText']" :ptTabComponent="ptComponent" :themingDocs="themingDoc" />
</template> </template>
<script> <script>
@ -12,9 +12,9 @@ import IconsDoc from '@/doc/inputtext/IconsDoc.vue';
import ImportDoc from '@/doc/inputtext/ImportDoc.vue'; import ImportDoc from '@/doc/inputtext/ImportDoc.vue';
import InvalidDoc from '@/doc/inputtext/InvalidDoc.vue'; import InvalidDoc from '@/doc/inputtext/InvalidDoc.vue';
import SizesDoc from '@/doc/inputtext/SizesDoc.vue'; import SizesDoc from '@/doc/inputtext/SizesDoc.vue';
import StyleDoc from '@/doc/inputtext/StyleDoc.vue';
import VeeValidateDoc from '@/doc/inputtext/form/VeeValidateDoc.vue'; import VeeValidateDoc from '@/doc/inputtext/form/VeeValidateDoc.vue';
import PTComponent from '@/doc/inputtext/pt/index.vue'; import PTComponent from '@/doc/inputtext/pt/index.vue';
import ThemingDoc from '@/doc/inputtext/theming/index.vue';
export default { export default {
data() { data() {
@ -72,18 +72,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
}; };
} }
}; };