@volverjs/ui-vue 0.0.1-beta.6 → 0.0.1-beta.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +61 -2
- package/dist/components/VvButton/vv-button.es.js +56 -58
- package/dist/components/VvButton/vv-button.umd.js +1 -1
- package/dist/components/VvCheckGroup/vv-check-group.es.js +221 -203
- package/dist/components/VvCheckGroup/vv-check-group.umd.js +2 -2
- package/dist/components/VvInputText/VvInputText.d.ts +14 -0
- package/dist/components/VvInputText/VvInputText.vue.d.ts +36 -1
- package/dist/components/VvInputText/VvInputTextActions.d.ts +3 -0
- package/dist/components/VvInputText/vv-input-text.es.js +509 -380
- package/dist/components/VvInputText/vv-input-text.umd.js +2 -2
- package/dist/components/VvNativeSelect/vv-native-select.es.js +180 -161
- package/dist/components/VvNativeSelect/vv-native-select.umd.js +2 -2
- package/dist/components/VvRadioGroup/vv-radio-group.es.js +211 -193
- package/dist/components/VvRadioGroup/vv-radio-group.umd.js +2 -2
- package/dist/components/VvSelect/vv-select.es.js +189 -171
- package/dist/components/VvSelect/vv-select.umd.js +2 -2
- package/dist/components/VvTextarea/VvTextarea.d.ts +43 -22
- package/dist/components/VvTextarea/VvTextarea.vue.d.ts +140 -85
- package/dist/components/VvTextarea/vv-textarea.es.js +364 -288
- package/dist/components/VvTextarea/vv-textarea.umd.js +2 -2
- package/dist/composables/debouncedInput/useDebouncedInput.d.ts +2 -0
- package/dist/composables/icons/useComponentIcons.d.ts +6 -0
- package/dist/composables/textLimit/useTextLimit.d.ts +14 -0
- package/dist/composables/useModifiers.d.ts +3 -2
- package/dist/icons.es.js +3 -3
- package/dist/icons.umd.js +1 -1
- package/dist/props/index.d.ts +42 -0
- package/dist/stories/utils.d.ts +5 -0
- package/dist/ui-vue.es.js +417 -401
- package/dist/ui-vue.umd.js +2 -2
- package/package.json +3 -1
- package/src/assets/icons/detailed.json +1 -1
- package/src/assets/icons/normal.json +1 -1
- package/src/assets/icons/simple.json +1 -1
- package/src/components/VvButton/VvButton.vue +1 -2
- package/src/components/VvInputText/VvInputText.ts +19 -2
- package/src/components/VvInputText/VvInputText.vue +123 -149
- package/src/components/VvInputText/VvInputTextActions.ts +151 -0
- package/src/components/VvTextarea/VvTextarea.ts +25 -16
- package/src/components/VvTextarea/VvTextarea.vue +89 -93
- package/src/components/common/HintSlot.ts +31 -13
- package/src/composables/debouncedInput/useDebouncedInput.ts +19 -0
- package/src/composables/icons/useComponentIcons.ts +35 -0
- package/src/composables/textLimit/useTextLimit.ts +44 -0
- package/src/composables/useModifiers.ts +47 -1
- package/src/props/index.ts +39 -0
- package/src/stories/InputText/InputTextMaxLength.stories.mdx +21 -0
- package/src/stories/Textarea/Textarea.stories.mdx +33 -51
- package/src/stories/Textarea/TextareaAutoclear.stories.mdx +23 -0
- package/src/stories/Textarea/TextareaAutocomplete.stories.mdx +10 -2
- package/src/stories/Textarea/TextareaAutofocus.stories.mdx +5 -1
- package/src/stories/Textarea/TextareaDebounce.stories.mdx +23 -0
- package/src/stories/Textarea/TextareaDisabled.stories.mdx +5 -1
- package/src/stories/Textarea/TextareaError.stories.mdx +6 -3
- package/src/stories/Textarea/TextareaErrorLabel.stories.mdx +37 -0
- package/src/stories/Textarea/TextareaFloating.stories.mdx +7 -2
- package/src/stories/Textarea/TextareaHintLabel.stories.mdx +5 -1
- package/src/stories/Textarea/TextareaIcon.stories.mdx +5 -1
- package/src/stories/Textarea/TextareaIconPosition.stories.mdx +9 -1
- package/src/stories/Textarea/TextareaId.stories.mdx +19 -0
- package/src/stories/Textarea/TextareaLabel.stories.mdx +5 -1
- package/src/stories/Textarea/TextareaLimit.stories.mdx +50 -0
- package/src/stories/Textarea/TextareaLoading.stories.mdx +6 -3
- package/src/stories/Textarea/TextareaLoadingLabel.stories.mdx +23 -0
- package/src/stories/Textarea/TextareaMaxLength.stories.mdx +6 -2
- package/src/stories/Textarea/TextareaMinLength.stories.mdx +5 -1
- package/src/stories/Textarea/TextareaModifiers.stories.mdx +24 -0
- package/src/stories/Textarea/TextareaName.stories.mdx +23 -0
- package/src/stories/Textarea/TextareaPlaceholder.stories.mdx +5 -1
- package/src/stories/Textarea/TextareaReadonly.stories.mdx +5 -1
- package/src/stories/Textarea/TextareaRequired.stories.mdx +22 -0
- package/src/stories/Textarea/TextareaResizable.stories.mdx +22 -0
- package/src/stories/Textarea/TextareaRowsCols.stories.mdx +9 -1
- package/src/stories/Textarea/TextareaValid.stories.mdx +7 -4
- package/src/stories/Textarea/TextareaValidLabel.stories.mdx +35 -0
- package/src/stories/stories.scss +11 -0
- package/src/stories/utils.ts +12 -0
- package/src/stories/volver-ui-vue.stories.mdx +7 -1
- package/dist/components/VvInputText/useInputNumber.d.ts +0 -16
- package/dist/components/VvInputText/useInputPassword.d.ts +0 -16
- package/src/components/VvInputText/useInputNumber.ts +0 -40
- package/src/components/VvInputText/useInputPassword.ts +0 -38
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Canvas, Meta, Story, Source, ArgsTable } from '@storybook/addon-docs'
|
|
2
|
+
import { action } from '@storybook/addon-actions'
|
|
3
|
+
|
|
4
|
+
import VvTextarea from '../../components/VvTextarea/VvTextarea.vue'
|
|
5
|
+
import { Template } from './Textarea.stories.mdx'
|
|
6
|
+
|
|
7
|
+
<Meta title="Components/Textarea/Props/Autoclear" component={VvTextarea} />
|
|
8
|
+
|
|
9
|
+
# Autoclear - Experimental
|
|
10
|
+
|
|
11
|
+
`Autoclear` permette all'utente di cancellare il contenuto l'intero contenuto della textarea
|
|
12
|
+
|
|
13
|
+
<Canvas>
|
|
14
|
+
<Story
|
|
15
|
+
name="Autoclear"
|
|
16
|
+
args={{
|
|
17
|
+
name: 'textarea-autoclear',
|
|
18
|
+
label: 'Autoclear',
|
|
19
|
+
autoclear: true
|
|
20
|
+
}}>
|
|
21
|
+
{Template.bind({})}
|
|
22
|
+
</Story>
|
|
23
|
+
</Canvas>
|
|
@@ -4,12 +4,20 @@ import { action } from '@storybook/addon-actions'
|
|
|
4
4
|
import VvTextarea from '../../components/VvTextarea/VvTextarea.vue'
|
|
5
5
|
import { Template } from './Textarea.stories.mdx'
|
|
6
6
|
|
|
7
|
-
<Meta title="Components/Textarea/Autocomplete" component={VvTextarea} />
|
|
7
|
+
<Meta title="Components/Textarea/Props/Autocomplete" component={VvTextarea} />
|
|
8
|
+
|
|
9
|
+
# Autocomplete
|
|
10
|
+
|
|
11
|
+
`Autocomplete` abilita (`ON`) o disabilita (`OFF`) l'autocomplete della singola textarea.
|
|
8
12
|
|
|
9
13
|
<Canvas>
|
|
10
14
|
<Story
|
|
11
15
|
name="Autocomplete"
|
|
12
|
-
args={{
|
|
16
|
+
args={{
|
|
17
|
+
name: 'textarea-autocomplete-on',
|
|
18
|
+
label: 'Nome',
|
|
19
|
+
autocomplete: 'on'
|
|
20
|
+
}}>
|
|
13
21
|
{Template.bind({})}
|
|
14
22
|
</Story>
|
|
15
23
|
</Canvas>
|
|
@@ -4,7 +4,11 @@ import { action } from '@storybook/addon-actions'
|
|
|
4
4
|
import VvTextarea from '../../components/VvTextarea/VvTextarea.vue'
|
|
5
5
|
import { Template } from './Textarea.stories.mdx'
|
|
6
6
|
|
|
7
|
-
<Meta title="Components/Textarea/Autofocus" component={VvTextarea} />
|
|
7
|
+
<Meta title="Components/Textarea/Props/Autofocus" component={VvTextarea} />
|
|
8
|
+
|
|
9
|
+
# Autofocus
|
|
10
|
+
|
|
11
|
+
`Autofocus` abilita il focus al caricamento della pagina sull'elemento corrente.
|
|
8
12
|
|
|
9
13
|
<Canvas>
|
|
10
14
|
<Story
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Canvas, Meta, Story, Source, ArgsTable } from '@storybook/addon-docs'
|
|
2
|
+
import { action } from '@storybook/addon-actions'
|
|
3
|
+
|
|
4
|
+
import VvTextarea from '../../components/VvTextarea/VvTextarea.vue'
|
|
5
|
+
import { Template } from './Textarea.stories.mdx'
|
|
6
|
+
|
|
7
|
+
<Meta title="Components/Textarea/Props/Debounce" component={VvTextarea} />
|
|
8
|
+
|
|
9
|
+
# Debounce
|
|
10
|
+
|
|
11
|
+
`Debounce` definisce l'intervallo di tempo in millisecondi che deve passare dall'ultima battuta prima che il testo venga sincronizzato.
|
|
12
|
+
|
|
13
|
+
<Canvas>
|
|
14
|
+
<Story
|
|
15
|
+
name="Disabled"
|
|
16
|
+
args={{
|
|
17
|
+
name: 'textarea-disabled',
|
|
18
|
+
disabled: true,
|
|
19
|
+
modelValue: 'Prova'
|
|
20
|
+
}}>
|
|
21
|
+
{Template.bind({})}
|
|
22
|
+
</Story>
|
|
23
|
+
</Canvas>
|
|
@@ -4,7 +4,11 @@ import { action } from '@storybook/addon-actions'
|
|
|
4
4
|
import VvTextarea from '../../components/VvTextarea/VvTextarea.vue'
|
|
5
5
|
import { Template } from './Textarea.stories.mdx'
|
|
6
6
|
|
|
7
|
-
<Meta title="Components/Textarea/Disabled" component={VvTextarea} />
|
|
7
|
+
<Meta title="Components/Textarea/Props/Disabled" component={VvTextarea} />
|
|
8
|
+
|
|
9
|
+
# Disabled
|
|
10
|
+
|
|
11
|
+
`Disabled` disablita la text area.
|
|
8
12
|
|
|
9
13
|
<Canvas>
|
|
10
14
|
<Story
|
|
@@ -4,15 +4,18 @@ import { action } from '@storybook/addon-actions'
|
|
|
4
4
|
import VvTextarea from '../../components/VvTextarea/VvTextarea.vue'
|
|
5
5
|
import { Template } from './Textarea.stories.mdx'
|
|
6
6
|
|
|
7
|
-
<Meta title="Components/Textarea/Error" component={VvTextarea} />
|
|
7
|
+
<Meta title="Components/Textarea/Props/Error" component={VvTextarea} />
|
|
8
|
+
|
|
9
|
+
# Error
|
|
10
|
+
|
|
11
|
+
`Error` attiva lo stato errore della textarea.
|
|
8
12
|
|
|
9
13
|
<Canvas>
|
|
10
14
|
<Story
|
|
11
15
|
name="Error"
|
|
12
16
|
args={{
|
|
13
17
|
name: 'textarea-error',
|
|
14
|
-
error: true
|
|
15
|
-
errorLabel: 'Error message!'
|
|
18
|
+
error: true
|
|
16
19
|
}}>
|
|
17
20
|
{Template.bind({})}
|
|
18
21
|
</Story>
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { Canvas, Meta, Story, Source, ArgsTable } from '@storybook/addon-docs'
|
|
2
|
+
import { action } from '@storybook/addon-actions'
|
|
3
|
+
|
|
4
|
+
import VvTextarea from '../../components/VvTextarea/VvTextarea.vue'
|
|
5
|
+
import { Template } from './Textarea.stories.mdx'
|
|
6
|
+
|
|
7
|
+
<Meta title="Components/Textarea/Props/ErrorLabel" component={VvTextarea} />
|
|
8
|
+
|
|
9
|
+
# ErrorLabel
|
|
10
|
+
|
|
11
|
+
`ErrorLabel` messaggio/messaggi di errore.
|
|
12
|
+
|
|
13
|
+
<Canvas>
|
|
14
|
+
<Story
|
|
15
|
+
name="Error"
|
|
16
|
+
args={{
|
|
17
|
+
name: 'textarea-error',
|
|
18
|
+
label: 'Single error message',
|
|
19
|
+
error: true,
|
|
20
|
+
errorLabel: 'Error message!'
|
|
21
|
+
}}>
|
|
22
|
+
{Template.bind({})}
|
|
23
|
+
</Story>
|
|
24
|
+
</Canvas>
|
|
25
|
+
|
|
26
|
+
<Canvas>
|
|
27
|
+
<Story
|
|
28
|
+
name="Errors"
|
|
29
|
+
args={{
|
|
30
|
+
name: 'textarea-error',
|
|
31
|
+
label: 'Multiple error messages',
|
|
32
|
+
error: true,
|
|
33
|
+
errorLabel: ['Error message 1!', 'Error message 2!']
|
|
34
|
+
}}>
|
|
35
|
+
{Template.bind({})}
|
|
36
|
+
</Story>
|
|
37
|
+
</Canvas>
|
|
@@ -4,7 +4,11 @@ import { action } from '@storybook/addon-actions'
|
|
|
4
4
|
import VvTextarea from '../../components/VvTextarea/VvTextarea.vue'
|
|
5
5
|
import { Template } from './Textarea.stories.mdx'
|
|
6
6
|
|
|
7
|
-
<Meta title="Components/Textarea/Floating" component={VvTextarea} />
|
|
7
|
+
<Meta title="Components/Textarea/Props/Floating" component={VvTextarea} />
|
|
8
|
+
|
|
9
|
+
# Floating
|
|
10
|
+
|
|
11
|
+
`Floating` enable floating label
|
|
8
12
|
|
|
9
13
|
<Canvas>
|
|
10
14
|
<Story
|
|
@@ -13,7 +17,8 @@ import { Template } from './Textarea.stories.mdx'
|
|
|
13
17
|
name: 'textarea-floating',
|
|
14
18
|
label: 'Label di prova',
|
|
15
19
|
floating: true,
|
|
16
|
-
type: 'text'
|
|
20
|
+
type: 'text',
|
|
21
|
+
placeholder: 'asdasd'
|
|
17
22
|
}}>
|
|
18
23
|
{Template.bind({})}
|
|
19
24
|
</Story>
|
|
@@ -4,7 +4,11 @@ import { action } from '@storybook/addon-actions'
|
|
|
4
4
|
import VvTextarea from '../../components/VvTextarea/VvTextarea.vue'
|
|
5
5
|
import { Template } from './Textarea.stories.mdx'
|
|
6
6
|
|
|
7
|
-
<Meta title="Components/Textarea/HintLabel" component={VvTextarea} />
|
|
7
|
+
<Meta title="Components/Textarea/Props/HintLabel" component={VvTextarea} />
|
|
8
|
+
|
|
9
|
+
# HintLabel
|
|
10
|
+
|
|
11
|
+
`HintLabel` contiene un testo di aiuto visualizzato sotto la textarea.
|
|
8
12
|
|
|
9
13
|
<Canvas>
|
|
10
14
|
<Story
|
|
@@ -4,7 +4,11 @@ import { action } from '@storybook/addon-actions'
|
|
|
4
4
|
import VvTextarea from '../../components/VvTextarea/VvTextarea.vue'
|
|
5
5
|
import { Template } from './Textarea.stories.mdx'
|
|
6
6
|
|
|
7
|
-
<Meta title="Components/Textarea/Icon" component={VvTextarea} />
|
|
7
|
+
<Meta title="Components/Textarea/Props/Icon" component={VvTextarea} />
|
|
8
|
+
|
|
9
|
+
# Icon
|
|
10
|
+
|
|
11
|
+
`Icon` nome dell'icona da utilizzare
|
|
8
12
|
|
|
9
13
|
<Canvas>
|
|
10
14
|
<Story
|
|
@@ -4,7 +4,13 @@ import { action } from '@storybook/addon-actions'
|
|
|
4
4
|
import VvTextarea from '../../components/VvTextarea/VvTextarea.vue'
|
|
5
5
|
import { Template } from './Textarea.stories.mdx'
|
|
6
6
|
|
|
7
|
-
<Meta title="Components/Textarea/IconPosition" component={VvTextarea} />
|
|
7
|
+
<Meta title="Components/Textarea/Props/IconPosition" component={VvTextarea} />
|
|
8
|
+
|
|
9
|
+
# IconPosition
|
|
10
|
+
|
|
11
|
+
`iconPosition` posizione dell'icona
|
|
12
|
+
|
|
13
|
+
`iconPosition='right'` posiziona l'icona a dx
|
|
8
14
|
|
|
9
15
|
<Canvas>
|
|
10
16
|
<Story
|
|
@@ -18,6 +24,8 @@ import { Template } from './Textarea.stories.mdx'
|
|
|
18
24
|
</Story>
|
|
19
25
|
</Canvas>
|
|
20
26
|
|
|
27
|
+
`iconPosition='left'` posiziona l'icona a sx
|
|
28
|
+
|
|
21
29
|
<Canvas>
|
|
22
30
|
<Story
|
|
23
31
|
name="Right"
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Canvas, Meta, Story, Source, ArgsTable } from '@storybook/addon-docs'
|
|
2
|
+
import { action } from '@storybook/addon-actions'
|
|
3
|
+
|
|
4
|
+
import VvTextarea from '../../components/VvTextarea/VvTextarea.vue'
|
|
5
|
+
import { Template } from './Textarea.stories.mdx'
|
|
6
|
+
|
|
7
|
+
<Meta title="Components/Textarea/Props/Id" component={VvTextarea} />
|
|
8
|
+
|
|
9
|
+
# Id
|
|
10
|
+
|
|
11
|
+
`Id` definisce l'id della Textarea
|
|
12
|
+
|
|
13
|
+
<Canvas>
|
|
14
|
+
<Story
|
|
15
|
+
name="Id"
|
|
16
|
+
args={{ name: 'textarea-id', id: 'ID_11_11', label: 'Label di prova' }}>
|
|
17
|
+
{Template.bind({})}
|
|
18
|
+
</Story>
|
|
19
|
+
</Canvas>
|
|
@@ -4,7 +4,11 @@ import { action } from '@storybook/addon-actions'
|
|
|
4
4
|
import VvTextarea from '../../components/VvTextarea/VvTextarea.vue'
|
|
5
5
|
import { Template } from './Textarea.stories.mdx'
|
|
6
6
|
|
|
7
|
-
<Meta title="Components/Textarea/Label" component={VvTextarea} />
|
|
7
|
+
<Meta title="Components/Textarea/Props/Label" component={VvTextarea} />
|
|
8
|
+
|
|
9
|
+
# Label
|
|
10
|
+
|
|
11
|
+
`Label` definisce il testo della label della Textarea
|
|
8
12
|
|
|
9
13
|
<Canvas>
|
|
10
14
|
<Story
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { Canvas, Meta, Story, Source, ArgsTable } from '@storybook/addon-docs'
|
|
2
|
+
import { action } from '@storybook/addon-actions'
|
|
3
|
+
|
|
4
|
+
import VvTextarea from '../../components/VvTextarea/VvTextarea.vue'
|
|
5
|
+
import { Template } from './Textarea.stories.mdx'
|
|
6
|
+
|
|
7
|
+
<Meta title="Components/Textarea/Props/Limit" component={VvTextarea} />
|
|
8
|
+
|
|
9
|
+
# Limit
|
|
10
|
+
|
|
11
|
+
`Limit` mostra il contatore dei caratteri digitati.
|
|
12
|
+
|
|
13
|
+
<Canvas>
|
|
14
|
+
<Story
|
|
15
|
+
name="Limit"
|
|
16
|
+
args={{
|
|
17
|
+
name: 'textarea-show-limit',
|
|
18
|
+
limit: true
|
|
19
|
+
}}>
|
|
20
|
+
{Template.bind({})}
|
|
21
|
+
</Story>
|
|
22
|
+
</Canvas>
|
|
23
|
+
|
|
24
|
+
Se imposto anche il maxlength, visualizza anche il numero massimo di caratteri che posso digitare
|
|
25
|
+
|
|
26
|
+
<Canvas>
|
|
27
|
+
<Story
|
|
28
|
+
name="Limit with Max"
|
|
29
|
+
args={{
|
|
30
|
+
name: 'textarea-show-limit',
|
|
31
|
+
limit: true,
|
|
32
|
+
maxlength: 25
|
|
33
|
+
}}>
|
|
34
|
+
{Template.bind({})}
|
|
35
|
+
</Story>
|
|
36
|
+
</Canvas>
|
|
37
|
+
|
|
38
|
+
`limit='countdown'` conteggia quanti caratteri posso ancora inserire.
|
|
39
|
+
|
|
40
|
+
<Canvas>
|
|
41
|
+
<Story
|
|
42
|
+
name="Limit countdown"
|
|
43
|
+
args={{
|
|
44
|
+
name: 'textarea-show-countdown',
|
|
45
|
+
limit: 'countdown',
|
|
46
|
+
maxlength: 25
|
|
47
|
+
}}>
|
|
48
|
+
{Template.bind({})}
|
|
49
|
+
</Story>
|
|
50
|
+
</Canvas>
|
|
@@ -4,15 +4,18 @@ import { action } from '@storybook/addon-actions'
|
|
|
4
4
|
import VvTextarea from '../../components/VvTextarea/VvTextarea.vue'
|
|
5
5
|
import { Template } from './Textarea.stories.mdx'
|
|
6
6
|
|
|
7
|
-
<Meta title="Components/Textarea/Loading" component={VvTextarea} />
|
|
7
|
+
<Meta title="Components/Textarea/Props/Loading" component={VvTextarea} />
|
|
8
|
+
|
|
9
|
+
# Loading
|
|
10
|
+
|
|
11
|
+
`Loading` se true, applica lo stato loading alla textarea
|
|
8
12
|
|
|
9
13
|
<Canvas>
|
|
10
14
|
<Story
|
|
11
15
|
name="Loading"
|
|
12
16
|
args={{
|
|
13
17
|
name: 'textarea-loading',
|
|
14
|
-
loading: true
|
|
15
|
-
loadingLabel: 'Loading label!'
|
|
18
|
+
loading: true
|
|
16
19
|
}}>
|
|
17
20
|
{Template.bind({})}
|
|
18
21
|
</Story>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Canvas, Meta, Story, Source, ArgsTable } from '@storybook/addon-docs'
|
|
2
|
+
import { action } from '@storybook/addon-actions'
|
|
3
|
+
|
|
4
|
+
import VvTextarea from '../../components/VvTextarea/VvTextarea.vue'
|
|
5
|
+
import { Template } from './Textarea.stories.mdx'
|
|
6
|
+
|
|
7
|
+
<Meta title="Components/Textarea/Props/LoadingLabel" component={VvTextarea} />
|
|
8
|
+
|
|
9
|
+
# LoadingLabel
|
|
10
|
+
|
|
11
|
+
`LoadingLabel` visualizza un messaggio in fase di loading.
|
|
12
|
+
|
|
13
|
+
<Canvas>
|
|
14
|
+
<Story
|
|
15
|
+
name="Loading"
|
|
16
|
+
args={{
|
|
17
|
+
name: 'textarea-loading',
|
|
18
|
+
loading: true,
|
|
19
|
+
loadingLabel: 'Loading label!'
|
|
20
|
+
}}>
|
|
21
|
+
{Template.bind({})}
|
|
22
|
+
</Story>
|
|
23
|
+
</Canvas>
|
|
@@ -4,12 +4,16 @@ import { action } from '@storybook/addon-actions'
|
|
|
4
4
|
import VvTextarea from '../../components/VvTextarea/VvTextarea.vue'
|
|
5
5
|
import { Template } from './Textarea.stories.mdx'
|
|
6
6
|
|
|
7
|
-
<Meta title="Components/Textarea/MaxLength" component={VvTextarea} />
|
|
7
|
+
<Meta title="Components/Textarea/Props/MaxLength" component={VvTextarea} />
|
|
8
|
+
|
|
9
|
+
# maxLength
|
|
10
|
+
|
|
11
|
+
`maxlength` numero massimo di caratteri che posso digitare
|
|
8
12
|
|
|
9
13
|
<Canvas>
|
|
10
14
|
<Story
|
|
11
15
|
name="MaxLength"
|
|
12
|
-
args={{ name: 'textarea-
|
|
16
|
+
args={{ name: 'textarea-max-length', maxlength: 5 }}>
|
|
13
17
|
{Template.bind({})}
|
|
14
18
|
</Story>
|
|
15
19
|
</Canvas>
|
|
@@ -4,7 +4,11 @@ import { action } from '@storybook/addon-actions'
|
|
|
4
4
|
import VvTextarea from '../../components/VvTextarea/VvTextarea.vue'
|
|
5
5
|
import { Template } from './Textarea.stories.mdx'
|
|
6
6
|
|
|
7
|
-
<Meta title="Components/Textarea/MinLength" component={VvTextarea} />
|
|
7
|
+
<Meta title="Components/Textarea/Props/MinLength" component={VvTextarea} />
|
|
8
|
+
|
|
9
|
+
# minlength
|
|
10
|
+
|
|
11
|
+
`minlength` numero minimo di caratteri che posso digitare
|
|
8
12
|
|
|
9
13
|
<Canvas>
|
|
10
14
|
<Story
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Canvas, Meta, Story, Source, ArgsTable } from '@storybook/addon-docs'
|
|
2
|
+
import { action } from '@storybook/addon-actions'
|
|
3
|
+
|
|
4
|
+
import VvTextarea from '../../components/VvTextarea/VvTextarea.vue'
|
|
5
|
+
import { Template } from './Textarea.stories.mdx'
|
|
6
|
+
|
|
7
|
+
<Meta title="Components/Textarea/Props/Modifiers" component={VvTextarea} />
|
|
8
|
+
|
|
9
|
+
# Modifiers
|
|
10
|
+
|
|
11
|
+
`Modifiers` mi permette di aggiungere uno o più modificatori alla textarea.
|
|
12
|
+
|
|
13
|
+
Ogni modificatore verrà convertito in una classe `vv-textarea--${#modifier#}`
|
|
14
|
+
|
|
15
|
+
<Canvas>
|
|
16
|
+
<Story
|
|
17
|
+
name="Modifiers"
|
|
18
|
+
args={{
|
|
19
|
+
name: 'textarea-modifiers',
|
|
20
|
+
modifiers: ['variante-1', 'variante-2']
|
|
21
|
+
}}>
|
|
22
|
+
{Template.bind({})}
|
|
23
|
+
</Story>
|
|
24
|
+
</Canvas>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Canvas, Meta, Story, Source, ArgsTable } from '@storybook/addon-docs'
|
|
2
|
+
import { action } from '@storybook/addon-actions'
|
|
3
|
+
|
|
4
|
+
import VvTextarea from '../../components/VvTextarea/VvTextarea.vue'
|
|
5
|
+
import { Template } from './Textarea.stories.mdx'
|
|
6
|
+
|
|
7
|
+
<Meta title="Components/Textarea/Props/Name" component={VvTextarea} />
|
|
8
|
+
|
|
9
|
+
# Name
|
|
10
|
+
|
|
11
|
+
`Name` definisce il name della Textarea
|
|
12
|
+
|
|
13
|
+
<Canvas>
|
|
14
|
+
<Story
|
|
15
|
+
name="Name"
|
|
16
|
+
args={{
|
|
17
|
+
name: 'textarea-name',
|
|
18
|
+
name: 'my-name',
|
|
19
|
+
label: 'Label di prova'
|
|
20
|
+
}}>
|
|
21
|
+
{Template.bind({})}
|
|
22
|
+
</Story>
|
|
23
|
+
</Canvas>
|
|
@@ -4,7 +4,11 @@ import { action } from '@storybook/addon-actions'
|
|
|
4
4
|
import VvTextarea from '../../components/VvTextarea/VvTextarea.vue'
|
|
5
5
|
import { Template } from './Textarea.stories.mdx'
|
|
6
6
|
|
|
7
|
-
<Meta title="Components/Textarea/Placeholder" component={VvTextarea} />
|
|
7
|
+
<Meta title="Components/Textarea/Props/Placeholder" component={VvTextarea} />
|
|
8
|
+
|
|
9
|
+
# Placeholder
|
|
10
|
+
|
|
11
|
+
`Placeholder` testo da utilizzare come placeholder della textarea
|
|
8
12
|
|
|
9
13
|
<Canvas>
|
|
10
14
|
<Story
|
|
@@ -4,7 +4,11 @@ import { action } from '@storybook/addon-actions'
|
|
|
4
4
|
import VvTextarea from '../../components/VvTextarea/VvTextarea.vue'
|
|
5
5
|
import { Template } from './Textarea.stories.mdx'
|
|
6
6
|
|
|
7
|
-
<Meta title="Components/Textarea/Readonly" component={VvTextarea} />
|
|
7
|
+
<Meta title="Components/Textarea/Props/Readonly" component={VvTextarea} />
|
|
8
|
+
|
|
9
|
+
# Redonly
|
|
10
|
+
|
|
11
|
+
`Redonly` attiva la modalità readonly sulla textarea
|
|
8
12
|
|
|
9
13
|
<Canvas>
|
|
10
14
|
<Story
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Canvas, Meta, Story, Source, ArgsTable } from '@storybook/addon-docs'
|
|
2
|
+
import { action } from '@storybook/addon-actions'
|
|
3
|
+
|
|
4
|
+
import VvTextarea from '../../components/VvTextarea/VvTextarea.vue'
|
|
5
|
+
import { Template } from './Textarea.stories.mdx'
|
|
6
|
+
|
|
7
|
+
<Meta title="Components/Textarea/Props/Required" component={VvTextarea} />
|
|
8
|
+
|
|
9
|
+
# Required
|
|
10
|
+
|
|
11
|
+
`Required` identifica la textarea come un campo required
|
|
12
|
+
|
|
13
|
+
<Canvas>
|
|
14
|
+
<Story
|
|
15
|
+
name="Required"
|
|
16
|
+
args={{
|
|
17
|
+
name: 'textarea-required',
|
|
18
|
+
required: true
|
|
19
|
+
}}>
|
|
20
|
+
{Template.bind({})}
|
|
21
|
+
</Story>
|
|
22
|
+
</Canvas>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Canvas, Meta, Story, Source, ArgsTable } from '@storybook/addon-docs'
|
|
2
|
+
import { action } from '@storybook/addon-actions'
|
|
3
|
+
|
|
4
|
+
import VvTextarea from '../../components/VvTextarea/VvTextarea.vue'
|
|
5
|
+
import { Template } from './Textarea.stories.mdx'
|
|
6
|
+
|
|
7
|
+
<Meta title="Components/Textarea/Props/Resizable" component={VvTextarea} />
|
|
8
|
+
|
|
9
|
+
# Resizable
|
|
10
|
+
|
|
11
|
+
`Resizable` abilita il ridimensionamento verticale della textarea
|
|
12
|
+
|
|
13
|
+
<Canvas>
|
|
14
|
+
<Story
|
|
15
|
+
name="Resizable"
|
|
16
|
+
args={{
|
|
17
|
+
name: 'textarea-resizable',
|
|
18
|
+
resizable: true
|
|
19
|
+
}}>
|
|
20
|
+
{Template.bind({})}
|
|
21
|
+
</Story>
|
|
22
|
+
</Canvas>
|
|
@@ -4,7 +4,11 @@ import { action } from '@storybook/addon-actions'
|
|
|
4
4
|
import VvTextarea from '../../components/VvTextarea/VvTextarea.vue'
|
|
5
5
|
import { Template } from './Textarea.stories.mdx'
|
|
6
6
|
|
|
7
|
-
<Meta title="Components/Textarea/RowsCols" component={VvTextarea} />
|
|
7
|
+
<Meta title="Components/Textarea/Props/RowsCols" component={VvTextarea} />
|
|
8
|
+
|
|
9
|
+
# Rows
|
|
10
|
+
|
|
11
|
+
`Rows` numero di righe textarea
|
|
8
12
|
|
|
9
13
|
<Canvas>
|
|
10
14
|
<Story
|
|
@@ -18,6 +22,10 @@ import { Template } from './Textarea.stories.mdx'
|
|
|
18
22
|
</Story>
|
|
19
23
|
</Canvas>
|
|
20
24
|
|
|
25
|
+
# Cols
|
|
26
|
+
|
|
27
|
+
`Cols` numero di colonne textarea
|
|
28
|
+
|
|
21
29
|
<Canvas>
|
|
22
30
|
<Story
|
|
23
31
|
name="Cols"
|
|
@@ -4,15 +4,18 @@ import { action } from '@storybook/addon-actions'
|
|
|
4
4
|
import VvTextarea from '../../components/VvTextarea/VvTextarea.vue'
|
|
5
5
|
import { Template } from './Textarea.stories.mdx'
|
|
6
6
|
|
|
7
|
-
<Meta title="Components/
|
|
7
|
+
<Meta title="Components/Textarea/Props/Valid" component={VvTextarea} />
|
|
8
|
+
|
|
9
|
+
# Valid
|
|
10
|
+
|
|
11
|
+
`Valid` imposta lo stato valid per la textarea.
|
|
8
12
|
|
|
9
13
|
<Canvas>
|
|
10
14
|
<Story
|
|
11
15
|
name="Valid"
|
|
12
16
|
args={{
|
|
13
|
-
name: '
|
|
14
|
-
valid: true
|
|
15
|
-
validLabel: 'Valid label!'
|
|
17
|
+
name: 'textarea-valid',
|
|
18
|
+
valid: true
|
|
16
19
|
}}>
|
|
17
20
|
{Template.bind({})}
|
|
18
21
|
</Story>
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { Canvas, Meta, Story, Source, ArgsTable } from '@storybook/addon-docs'
|
|
2
|
+
import { action } from '@storybook/addon-actions'
|
|
3
|
+
|
|
4
|
+
import VvTextarea from '../../components/VvTextarea/VvTextarea.vue'
|
|
5
|
+
import { Template } from './Textarea.stories.mdx'
|
|
6
|
+
|
|
7
|
+
<Meta title="Components/Textarea/Props/ValidLabel" component={VvTextarea} />
|
|
8
|
+
|
|
9
|
+
# ValidLabel
|
|
10
|
+
|
|
11
|
+
`ValidLabel` messaggio associato allo stato valid.
|
|
12
|
+
|
|
13
|
+
<Canvas>
|
|
14
|
+
<Story
|
|
15
|
+
name="ValidLabel"
|
|
16
|
+
args={{
|
|
17
|
+
name: 'textarea-validlabel',
|
|
18
|
+
valid: true,
|
|
19
|
+
validLabel: 'Il dato è corretto!'
|
|
20
|
+
}}>
|
|
21
|
+
{Template.bind({})}
|
|
22
|
+
</Story>
|
|
23
|
+
</Canvas>
|
|
24
|
+
|
|
25
|
+
<Canvas>
|
|
26
|
+
<Story
|
|
27
|
+
name="ValidLabels"
|
|
28
|
+
args={{
|
|
29
|
+
name: 'textarea-validlabels',
|
|
30
|
+
valid: true,
|
|
31
|
+
validLabel: ['Il dato è corretto!', 'Ottimo!']
|
|
32
|
+
}}>
|
|
33
|
+
{Template.bind({})}
|
|
34
|
+
</Story>
|
|
35
|
+
</Canvas>
|
package/src/stories/stories.scss
CHANGED
|
@@ -22,3 +22,14 @@ $zero-specificity-for-utilities: false;
|
|
|
22
22
|
@import '@volverjs/style/scss/components/vv-card';
|
|
23
23
|
@import '@volverjs/style/scss/components/vv-textarea';
|
|
24
24
|
@import '@volverjs/style/scss/components/vv-breadcrumb';
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
//Custom classes for stories
|
|
28
|
+
.vv-textarea {
|
|
29
|
+
&--variante-1{
|
|
30
|
+
--vv-textarea-element-input-color: red;
|
|
31
|
+
}
|
|
32
|
+
&--variante-2{
|
|
33
|
+
--vv-textarea-element-wrapper-background-color: green;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -11,7 +11,13 @@ import { Canvas, Meta, Story } from '@storybook/addon-docs'
|
|
|
11
11
|
|
|
12
12
|
Volver ui-vue extend Vue type definition and will be available in `$ds` vue property [doc](https://vuejs.org/guide/typescript/options-api.html#augmenting-global-properties)
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
## Style
|
|
15
|
+
|
|
16
|
+
#### @volverjs/ui-vue is closely linked to [@volverjs/style](https://volverjs.github.io/style/) and is neeeded to style components
|
|
17
|
+
|
|
18
|
+
<br />
|
|
19
|
+
|
|
20
|
+
## Import and usage:
|
|
15
21
|
|
|
16
22
|
```typescript
|
|
17
23
|
import { iconsSimple, iconsNormal, iconsDetailed } from '@volverjs/ui-vue/icons'
|