@volverjs/ui-vue 0.0.9-beta.17 → 0.0.9-beta.18
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/dist/components/VvCombobox/VvCombobox.es.js +10 -7
- package/dist/components/VvCombobox/VvCombobox.umd.js +1 -1
- package/dist/components/VvInputText/VvInputText.es.js +141 -96
- package/dist/components/VvInputText/VvInputText.umd.js +1 -1
- package/dist/components/VvInputText/VvInputText.vue.d.ts +10 -37
- package/dist/components/VvInputText/index.d.ts +18 -35
- package/dist/components/VvTextarea/VvTextarea.es.js +8 -5
- package/dist/components/VvTextarea/VvTextarea.umd.js +1 -1
- package/dist/components/index.es.js +159 -108
- package/dist/components/index.umd.js +1 -1
- package/dist/icons.es.js +3 -3
- package/dist/icons.umd.js +1 -1
- package/dist/stories/InputText/InputText.settings.d.ts +4 -30
- package/dist/stories/InputText/InputText.stories.d.ts +0 -1
- package/dist/stories/InputText/InputTextMask.stories.d.ts +12 -0
- package/package.json +39 -38
- 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/VvCombobox/VvCombobox.vue +11 -7
- package/src/components/VvInputText/VvInputText.vue +124 -55
- package/src/components/VvInputText/index.ts +25 -34
- package/src/components/VvTextarea/VvTextarea.vue +8 -5
- package/src/stories/InputText/InputText.settings.ts +7 -33
- package/src/stories/InputText/InputText.stories.ts +4 -12
- package/src/stories/InputText/InputText.test.ts +31 -15
- package/src/stories/InputText/InputTextMask.stories.ts +122 -0
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/vue3'
|
|
2
|
+
import VvInputText from '@/components/VvInputText/VvInputText.vue'
|
|
3
|
+
import { Default } from './InputText.stories'
|
|
4
|
+
import { defaultArgs, argTypes } from './InputText.settings'
|
|
5
|
+
|
|
6
|
+
const meta: Meta<typeof VvInputText> = {
|
|
7
|
+
title: 'Components/InputText/Mask',
|
|
8
|
+
component: VvInputText,
|
|
9
|
+
args: defaultArgs,
|
|
10
|
+
argTypes,
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export default meta
|
|
14
|
+
|
|
15
|
+
type Story = StoryObj<typeof VvInputText>
|
|
16
|
+
|
|
17
|
+
export const RegExp: Story = {
|
|
18
|
+
...Default,
|
|
19
|
+
args: {
|
|
20
|
+
...defaultArgs,
|
|
21
|
+
id: 'regexp',
|
|
22
|
+
iMask: {
|
|
23
|
+
mask: /^\d+$/,
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export const PhoneNumber: Story = {
|
|
29
|
+
...Default,
|
|
30
|
+
args: {
|
|
31
|
+
...defaultArgs,
|
|
32
|
+
id: 'phone-number',
|
|
33
|
+
iMask: {
|
|
34
|
+
mask: '+{39}(000)000-00-00',
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export const Pattern: Story = {
|
|
40
|
+
...Default,
|
|
41
|
+
args: {
|
|
42
|
+
...defaultArgs,
|
|
43
|
+
id: 'pattern',
|
|
44
|
+
iMask: {
|
|
45
|
+
mask: 'XXX-XX-00000',
|
|
46
|
+
definitions: {
|
|
47
|
+
X: {
|
|
48
|
+
mask: '0',
|
|
49
|
+
displayChar: 'X',
|
|
50
|
+
placeholderChar: '#',
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
lazy: false,
|
|
54
|
+
overwrite: 'shift',
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export const IntlNumber: Story = {
|
|
60
|
+
...Default,
|
|
61
|
+
args: {
|
|
62
|
+
...defaultArgs,
|
|
63
|
+
id: 'intl-number',
|
|
64
|
+
type: 'number',
|
|
65
|
+
iMask: {
|
|
66
|
+
mask: Number,
|
|
67
|
+
thousandsSeparator: '.',
|
|
68
|
+
radix: ',',
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export const DatePlaceholder: Story = {
|
|
74
|
+
...Default,
|
|
75
|
+
args: {
|
|
76
|
+
...defaultArgs,
|
|
77
|
+
id: 'date-placeholder',
|
|
78
|
+
type: 'date',
|
|
79
|
+
iMask: {
|
|
80
|
+
mask: Date,
|
|
81
|
+
pattern: 'd.m.Y',
|
|
82
|
+
lazy: false,
|
|
83
|
+
},
|
|
84
|
+
},
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export const PhoneOrEmail: Story = {
|
|
88
|
+
...Default,
|
|
89
|
+
args: {
|
|
90
|
+
...defaultArgs,
|
|
91
|
+
id: 'phone-or-email',
|
|
92
|
+
iMask: {
|
|
93
|
+
mask: [
|
|
94
|
+
{
|
|
95
|
+
mask: '+{39}(000)000-00-00',
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
mask: /^\S*@?\S*$/,
|
|
99
|
+
},
|
|
100
|
+
],
|
|
101
|
+
},
|
|
102
|
+
},
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export const Currency: Story = {
|
|
106
|
+
...Default,
|
|
107
|
+
args: {
|
|
108
|
+
...defaultArgs,
|
|
109
|
+
id: 'currency',
|
|
110
|
+
type: 'number',
|
|
111
|
+
iMask: {
|
|
112
|
+
mask: '€ num',
|
|
113
|
+
blocks: {
|
|
114
|
+
num: {
|
|
115
|
+
mask: Number,
|
|
116
|
+
thousandsSeparator: '.',
|
|
117
|
+
radix: ',',
|
|
118
|
+
},
|
|
119
|
+
},
|
|
120
|
+
},
|
|
121
|
+
},
|
|
122
|
+
}
|