Skip to content

Commit 985b8d8

Browse files
Add append/prepend props. Add card props
1 parent 6d2bedd commit 985b8d8

File tree

1 file changed

+111
-1
lines changed

1 file changed

+111
-1
lines changed

src/stores/props.ts

Lines changed: 111 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const propsSupported = {
99
key: 'name',
1010
sortable: true,
1111
title: 'Name',
12-
width: '15%',
12+
width: '20%',
1313
},
1414
{
1515
align: 'start',
@@ -85,6 +85,30 @@ const sharedProps = [
8585
name: 'cancel-icon-color',
8686
type: 'string',
8787
},
88+
{
89+
default: 'false',
90+
desc: 'Displays the field as a card instead of inline. <code class="ic">card-field</code> overrides the <code class="ic">field-only</code> prop',
91+
name: 'card-field',
92+
type: 'boolean',
93+
},
94+
{
95+
default: '0',
96+
desc: 'Offsets the card field horizontally',
97+
name: 'card-offset-x',
98+
type: 'number',
99+
},
100+
{
101+
default: '0',
102+
desc: 'Offsets the card field vertically',
103+
name: 'card-offset-y',
104+
type: 'number',
105+
},
106+
{
107+
default: undefined,
108+
desc: 'Prop to pass to the card component',
109+
name: 'card-props',
110+
type: 'number',
111+
},
88112
{
89113
default: false,
90114
desc: 'If <code class="ic">true</code>, the field will close when the user opens another inline form element',
@@ -109,6 +133,7 @@ const sharedProps = [
109133
name: 'disabled',
110134
type: 'boolean',
111135
},
136+
112137
{
113138
default: 'empty',
114139
desc: 'Text to display when the field is empty',
@@ -139,6 +164,12 @@ const sharedProps = [
139164
name: 'label',
140165
type: 'string',
141166
},
167+
{
168+
default: 'true',
169+
desc: 'The loading state of the component. This is what is used to determine when to close the field. If the <code class="ic">loading-wait</code> prop is set to <code class="ic">true</code> the field will close without waiting for the loading process to complete',
170+
name: 'loading',
171+
type: 'boolean',
172+
},
142173
{
143174
default: 'true',
144175
desc: 'The cursor for unopened fields, with the same loading prop value, is set to "wait" and their selection is disabled until the loading process is completed. Additionally, the saving field will remain visible but disabled until the loading is finished',
@@ -264,6 +295,81 @@ const saveAndLoadingIconProps = [
264295
},
265296
];
266297

298+
const prependAppendIcons = [
299+
{
300+
default: undefined,
301+
desc: 'Creates a <code class="ic">v-icon</code> component after displayed value in the <a href="#slots-display-append"><code class="ic">display.append</code></a> slot',
302+
name: 'display-append-icon',
303+
type: 'string',
304+
},
305+
{
306+
default: undefined,
307+
desc: `${colorDesc} <code class="ic">display-append-icon</code>`,
308+
name: 'display-append-icon-color',
309+
type: 'string | undefined',
310+
},
311+
{
312+
default: 'x-small',
313+
desc: 'Sets the height and width of the <code class="ic">display-append-icon</code> component. Can use the following predefined sizes: x-small, small, default, large, and x-large.',
314+
name: 'display-append-icon-size',
315+
type: 'string',
316+
},
317+
{
318+
default: undefined,
319+
desc: 'Creates a <code class="ic">v-icon</code> component after displayed value in the <a href="#slots-display-append-inner"><code class="ic">display.appendInner</code></a> slot',
320+
name: 'display-append-inner-icon',
321+
type: 'string',
322+
},
323+
{
324+
default: undefined,
325+
desc: `${colorDesc} <code class="ic">display-append-inner-icon</code>`,
326+
name: 'display-append-inner-icon-color',
327+
type: 'string | undefined',
328+
},
329+
{
330+
default: 'x-small',
331+
desc: 'Sets the height and width of the <code class="ic">display-append-inner-icon</code> component. Can use the following predefined sizes: x-small, small, default, large, and x-large.',
332+
name: 'display-append-inner-icon-size',
333+
type: 'string',
334+
},
335+
{
336+
default: undefined,
337+
desc: 'Creates a <code class="ic">v-icon</code> component before displayed value in the <a href="#slots-display-prepend"><code class="ic">display.prepend</code></a> slot',
338+
name: 'display-prepend-icon',
339+
type: 'string',
340+
},
341+
{
342+
default: undefined,
343+
desc: `${colorDesc} <code class="ic">display-prepend-icon</code>`,
344+
name: 'display-prepend-icon-color',
345+
type: 'string | undefined',
346+
},
347+
{
348+
default: 'x-small',
349+
desc: 'Sets the height and width of the <code class="ic">display-prepend-icon</code> component. Can use the following predefined sizes: x-small, small, default, large, and x-large.',
350+
name: 'display-prepend-icon-size',
351+
type: 'string',
352+
},
353+
{
354+
default: undefined,
355+
desc: 'Creates a <code class="ic">v-icon</code> component before displayed value in the <a href="#slots-display-prepend-inner"><code class="ic">display.prependInner</code></a> slot',
356+
name: 'display-prepend-inner-icon',
357+
type: 'string',
358+
},
359+
{
360+
default: undefined,
361+
desc: `${colorDesc} <code class="ic">display-prepend-inner-icon</code>`,
362+
name: 'display-prepend-inner-icon-color',
363+
type: 'string | undefined',
364+
},
365+
{
366+
default: 'x-small',
367+
desc: 'Sets the height and width of the <code class="ic">display-prepend-inner-icon</code> component. Can use the following predefined sizes: x-small, small, default, large, and x-large.',
368+
name: 'display-prepend-inner-icon-size',
369+
type: 'string',
370+
},
371+
];
372+
267373
const trueFalseIconProps = [
268374
{
269375
default: false,
@@ -360,6 +466,7 @@ const vInlineSelectProps = [
360466
...sharedProps,
361467
...autofocusProp,
362468
...clearIconProp,
469+
...prependAppendIcons,
363470
...saveAndLoadingIconProps,
364471
...[
365472
{
@@ -418,6 +525,7 @@ const vInlineTextareaProps = [
418525
...sharedProps,
419526
...autofocusProp,
420527
...clearIconProp,
528+
...prependAppendIcons,
421529
...saveAndLoadingIconProps,
422530
...truncateProps,
423531
...[
@@ -446,6 +554,7 @@ const vInlineTextFieldProps = [
446554
...sharedProps,
447555
...autofocusProp,
448556
...clearIconProp,
557+
...prependAppendIcons,
449558
...saveAndLoadingIconProps,
450559
...truncateProps,
451560
...[
@@ -462,6 +571,7 @@ export const usePropsStore = defineStore('props', {
462571
state: () => {
463572
return {
464573
autofocusProp,
574+
prependAppendIcons,
465575
propsSupported,
466576
saveAndLoadingIconProps,
467577
sharedProps,

0 commit comments

Comments
 (0)