norma-library 0.4.3 → 0.4.6
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/.babelrc.json +18 -0
- package/buildcache/front-end +1 -0
- package/dist/esm/components/Accordion.d.ts +3 -0
- package/dist/esm/components/Accordion.js +24 -0
- package/dist/esm/components/Accordion.js.map +1 -0
- package/dist/esm/components/Button.d.ts +3 -0
- package/dist/esm/components/Button.js +22 -0
- package/dist/esm/components/Button.js.map +1 -0
- package/dist/esm/components/Card.d.ts +7 -0
- package/dist/esm/components/Card.js +31 -0
- package/dist/esm/components/Card.js.map +1 -0
- package/dist/esm/components/CheckBox.d.ts +3 -0
- package/dist/esm/components/CheckBox.js +13 -0
- package/dist/esm/components/CheckBox.js.map +1 -0
- package/dist/esm/components/DropDown.d.ts +3 -0
- package/dist/esm/components/DropDown.js +17 -0
- package/dist/esm/components/DropDown.js.map +1 -0
- package/dist/esm/components/IconButton.d.ts +3 -0
- package/dist/esm/components/IconButton.js +31 -0
- package/dist/esm/components/IconButton.js.map +1 -0
- package/dist/esm/components/Icons.d.ts +7 -0
- package/dist/esm/components/Icons.js +49 -0
- package/dist/esm/components/Icons.js.map +1 -0
- package/dist/esm/components/Modal.d.ts +4 -0
- package/dist/esm/components/Modal.js +32 -0
- package/dist/esm/components/Modal.js.map +1 -0
- package/dist/esm/components/Paper.d.ts +3 -0
- package/dist/esm/components/Paper.js +14 -0
- package/dist/esm/components/Paper.js.map +1 -0
- package/dist/esm/components/ProgressBar.d.ts +6 -0
- package/dist/esm/components/ProgressBar.js +31 -0
- package/dist/esm/components/ProgressBar.js.map +1 -0
- package/dist/esm/components/RadioGroup.d.ts +3 -0
- package/dist/esm/components/RadioGroup.js +18 -0
- package/dist/esm/components/RadioGroup.js.map +1 -0
- package/dist/esm/components/RangerSlider.d.ts +3 -0
- package/dist/esm/components/RangerSlider.js +64 -0
- package/dist/esm/components/RangerSlider.js.map +1 -0
- package/dist/esm/components/Select.d.ts +3 -0
- package/dist/esm/components/Select.js +45 -0
- package/dist/esm/components/Select.js.map +1 -0
- package/dist/{components/icon/norma.d.ts → esm/components/Svgs.d.ts} +29 -30
- package/dist/esm/components/Svgs.js +102 -0
- package/dist/esm/components/Svgs.js.map +1 -0
- package/dist/esm/components/Tabs.d.ts +3 -0
- package/dist/esm/components/Tabs.js +78 -0
- package/dist/esm/components/Tabs.js.map +1 -0
- package/dist/esm/components/Tag.d.ts +3 -0
- package/dist/esm/components/Tag.js +27 -0
- package/dist/esm/components/Tag.js.map +1 -0
- package/dist/esm/components/TextField.d.ts +3 -0
- package/dist/esm/components/TextField.js +18 -0
- package/dist/esm/components/TextField.js.map +1 -0
- package/dist/esm/components/index.d.ts +16 -0
- package/dist/esm/components/index.js +17 -0
- package/dist/esm/components/index.js.map +1 -0
- package/dist/esm/helpers/alignments.d.ts +2 -0
- package/dist/esm/helpers/alignments.js +14 -0
- package/dist/esm/helpers/alignments.js.map +1 -0
- package/dist/esm/helpers/borders.d.ts +2 -0
- package/dist/esm/helpers/borders.js +18 -0
- package/dist/esm/helpers/borders.js.map +1 -0
- package/dist/{helpers → esm/helpers}/colors.d.ts +172 -174
- package/dist/esm/helpers/colors.js +156 -0
- package/dist/esm/helpers/colors.js.map +1 -0
- package/dist/esm/helpers/index.d.ts +5 -0
- package/dist/esm/helpers/index.js +6 -0
- package/dist/esm/helpers/index.js.map +1 -0
- package/dist/esm/helpers/radios.d.ts +2 -0
- package/dist/esm/helpers/radios.js +24 -0
- package/dist/esm/helpers/radios.js.map +1 -0
- package/dist/esm/helpers/sizes.d.ts +11 -0
- package/dist/esm/helpers/sizes.js +67 -0
- package/dist/esm/helpers/sizes.js.map +1 -0
- package/dist/esm/index.d.ts +17 -0
- package/dist/esm/index.js +18 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/interfaces/Accordion.d.ts +12 -0
- package/dist/esm/interfaces/Accordion.js +2 -0
- package/dist/esm/interfaces/Accordion.js.map +1 -0
- package/dist/esm/interfaces/Button.d.ts +14 -0
- package/dist/esm/interfaces/Button.js +2 -0
- package/dist/esm/interfaces/Button.js.map +1 -0
- package/dist/esm/interfaces/Card.d.ts +11 -0
- package/dist/esm/interfaces/Card.js +2 -0
- package/dist/esm/interfaces/Card.js.map +1 -0
- package/dist/esm/interfaces/CheckBox.d.ts +19 -0
- package/dist/esm/interfaces/CheckBox.js +2 -0
- package/dist/esm/interfaces/CheckBox.js.map +1 -0
- package/dist/esm/interfaces/DropDown.d.ts +11 -0
- package/dist/esm/interfaces/DropDown.js +2 -0
- package/dist/esm/interfaces/DropDown.js.map +1 -0
- package/dist/esm/interfaces/IconButton.d.ts +14 -0
- package/dist/esm/interfaces/IconButton.js +2 -0
- package/dist/esm/interfaces/IconButton.js.map +1 -0
- package/dist/esm/interfaces/Icons.d.ts +15 -0
- package/dist/esm/interfaces/Icons.js +2 -0
- package/dist/esm/interfaces/Icons.js.map +1 -0
- package/dist/esm/interfaces/Modal.d.ts +15 -0
- package/dist/esm/interfaces/Modal.js +2 -0
- package/dist/esm/interfaces/Modal.js.map +1 -0
- package/dist/esm/interfaces/Paper.d.ts +12 -0
- package/dist/esm/interfaces/Paper.js +2 -0
- package/dist/esm/interfaces/Paper.js.map +1 -0
- package/dist/esm/interfaces/ProgressBar.d.ts +17 -0
- package/dist/esm/interfaces/ProgressBar.js +2 -0
- package/dist/esm/interfaces/ProgressBar.js.map +1 -0
- package/dist/esm/interfaces/RadioGroup.d.ts +15 -0
- package/dist/esm/interfaces/RadioGroup.js +2 -0
- package/dist/esm/interfaces/RadioGroup.js.map +1 -0
- package/dist/esm/interfaces/RangerSlider.d.ts +18 -0
- package/dist/esm/interfaces/RangerSlider.js +2 -0
- package/dist/esm/interfaces/RangerSlider.js.map +1 -0
- package/dist/esm/interfaces/Select.d.ts +17 -0
- package/dist/esm/interfaces/Select.js +2 -0
- package/dist/esm/interfaces/Select.js.map +1 -0
- package/dist/esm/interfaces/Tabs.d.ts +18 -0
- package/dist/esm/interfaces/Tabs.js +2 -0
- package/dist/esm/interfaces/Tabs.js.map +1 -0
- package/dist/esm/interfaces/Tag.d.ts +18 -0
- package/dist/esm/interfaces/Tag.js +2 -0
- package/dist/esm/interfaces/Tag.js.map +1 -0
- package/dist/esm/interfaces/TextField.d.ts +40 -0
- package/dist/esm/interfaces/TextField.js +2 -0
- package/dist/esm/interfaces/TextField.js.map +1 -0
- package/dist/esm/interfaces/index.d.ts +17 -0
- package/dist/esm/interfaces/index.js +18 -0
- package/dist/esm/interfaces/index.js.map +1 -0
- package/dist/esm/types/index.d.ts +78 -0
- package/dist/esm/types/index.js +10 -0
- package/dist/esm/types/index.js.map +1 -0
- package/norma-library.tar +0 -0
- package/package.json +75 -90
- package/postcss.config.js +6 -0
- package/src/components/Accordion.tsx +64 -0
- package/src/components/Button.tsx +38 -0
- package/src/components/Card.tsx +47 -0
- package/src/components/CheckBox.tsx +35 -0
- package/src/components/DropDown.tsx +38 -0
- package/src/components/IconButton.tsx +58 -0
- package/src/components/Icons.tsx +87 -0
- package/src/components/Modal.tsx +123 -0
- package/src/components/Paper.tsx +22 -0
- package/src/components/ProgressBar.tsx +62 -0
- package/src/components/RadioGroup.tsx +55 -0
- package/src/components/RangerSlider.tsx +81 -0
- package/src/components/Select.tsx +98 -0
- package/src/components/{icon/norma.tsx → Svgs.tsx} +54 -55
- package/src/components/Tabs.tsx +140 -0
- package/src/components/Tag.tsx +45 -0
- package/src/components/TextField.tsx +35 -0
- package/src/components/index.ts +16 -8
- package/src/helpers/alignments.ts +14 -0
- package/src/helpers/borders.ts +18 -0
- package/src/helpers/colors.ts +173 -209
- package/src/helpers/index.ts +5 -3
- package/src/helpers/radios.ts +24 -0
- package/src/helpers/sizes.ts +79 -26
- package/src/index.css +2 -0
- package/src/index.ts +36 -0
- package/src/interfaces/Accordion.ts +12 -0
- package/src/interfaces/Button.ts +27 -0
- package/src/interfaces/Card.ts +11 -0
- package/src/interfaces/CheckBox.ts +33 -0
- package/src/interfaces/DropDown.ts +14 -0
- package/src/interfaces/IconButton.ts +27 -0
- package/src/interfaces/Icons.ts +17 -0
- package/src/interfaces/Modal.ts +15 -0
- package/src/interfaces/Paper.ts +12 -0
- package/src/interfaces/ProgressBar.ts +25 -0
- package/src/interfaces/RadioGroup.ts +28 -0
- package/src/interfaces/RangerSlider.ts +32 -0
- package/src/interfaces/Select.ts +17 -0
- package/src/interfaces/Tabs.ts +24 -0
- package/src/interfaces/Tag.ts +17 -0
- package/src/interfaces/TextField.ts +63 -0
- package/src/interfaces/index.ts +17 -0
- package/src/stories/Accordion.stories.tsx +65 -0
- package/src/stories/Button.stories.tsx +99 -0
- package/src/stories/Card.stories.tsx +55 -0
- package/src/stories/CheckBox.stories.tsx +94 -0
- package/src/stories/Colors.stories.mdx +127 -0
- package/src/stories/DropDown.stories.tsx +57 -0
- package/src/stories/IconButton.stories.tsx +114 -0
- package/src/stories/Icons.stories.mdx +27 -0
- package/src/stories/Modal.stories.tsx +190 -0
- package/src/stories/Paper.stories.tsx +53 -0
- package/src/stories/ProgressBar.stories.tsx +139 -0
- package/src/stories/RadioGroup.stories.tsx +94 -0
- package/src/stories/RangerSlider.stories.tsx +68 -0
- package/src/stories/Select.stories.tsx +128 -0
- package/src/stories/Tabs.stories.tsx +62 -0
- package/src/stories/Tag.stories.tsx +76 -0
- package/src/{components/textfield/textfield.stories.tsx → stories/TextField.stories.tsx} +445 -376
- package/src/styles/custom.css +5 -0
- package/src/styles/globals.css +21 -0
- package/src/types/index.ts +220 -0
- package/tailwind.config.js +58 -0
- package/tsconfig.json +32 -0
- package/README.md +0 -160
- package/dist/components/button/button.d.ts +0 -3
- package/dist/components/button/index.d.ts +0 -1
- package/dist/components/button/types.d.ts +0 -18
- package/dist/components/card/card-header.d.ts +0 -3
- package/dist/components/card/card.d.ts +0 -3
- package/dist/components/card/index.d.ts +0 -1
- package/dist/components/card/styles.d.ts +0 -811
- package/dist/components/card/types.d.ts +0 -12
- package/dist/components/checkbox/checkbox.d.ts +0 -3
- package/dist/components/checkbox/index.d.ts +0 -1
- package/dist/components/checkbox/types.d.ts +0 -23
- package/dist/components/icon/default.d.ts +0 -210
- package/dist/components/icon/defaultIcon.d.ts +0 -5
- package/dist/components/icon/icons-ia.d.ts +0 -71
- package/dist/components/icon/index.d.ts +0 -234
- package/dist/components/icon/normaIcon.d.ts +0 -13
- package/dist/components/icon/styles.d.ts +0 -481
- package/dist/components/icon/svg.d.ts +0 -6
- package/dist/components/icon/types.d.ts +0 -12
- package/dist/components/index.d.ts +0 -8
- package/dist/components/modal/index.d.ts +0 -1
- package/dist/components/modal/modal.d.ts +0 -3
- package/dist/components/modal/modalFooter.d.ts +0 -3
- package/dist/components/modal/modalHeader.d.ts +0 -3
- package/dist/components/modal/styles.d.ts +0 -540
- package/dist/components/modal/types.d.ts +0 -27
- package/dist/components/progress-bar/index.d.ts +0 -1
- package/dist/components/progress-bar/progress-bar.d.ts +0 -7
- package/dist/components/progress-bar/styles.d.ts +0 -272
- package/dist/components/progress-bar/types.d.ts +0 -22
- package/dist/components/radio/index.d.ts +0 -1
- package/dist/components/radio/radio.d.ts +0 -3
- package/dist/components/radio/types.d.ts +0 -16
- package/dist/components/tag/index.d.ts +0 -1
- package/dist/components/tag/tag.d.ts +0 -3
- package/dist/components/tag/types.d.ts +0 -25
- package/dist/components/textfield/index.d.ts +0 -1
- package/dist/components/textfield/textfield.d.ts +0 -3
- package/dist/components/textfield/types.d.ts +0 -42
- package/dist/helpers/clients.d.ts +0 -5
- package/dist/helpers/index.d.ts +0 -3
- package/dist/helpers/sizes.d.ts +0 -6
- package/dist/helpers/variants.d.ts +0 -2
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -8
- package/dist/norma-library.cjs.development.js +0 -1286
- package/dist/norma-library.cjs.development.js.map +0 -1
- package/dist/norma-library.cjs.production.min.js +0 -2
- package/dist/norma-library.cjs.production.min.js.map +0 -1
- package/dist/norma-library.esm.js +0 -1274
- package/dist/norma-library.esm.js.map +0 -1
- package/src/components/button/button.stories.tsx +0 -44
- package/src/components/button/button.tsx +0 -18
- package/src/components/button/index.ts +0 -1
- package/src/components/button/types.ts +0 -48
- package/src/components/card/card-header.tsx +0 -8
- package/src/components/card/card.stories.tsx +0 -28
- package/src/components/card/card.tsx +0 -13
- package/src/components/card/index.ts +0 -1
- package/src/components/card/styles.tsx +0 -29
- package/src/components/card/types.ts +0 -14
- package/src/components/checkbox/checkbox.stories.tsx +0 -66
- package/src/components/checkbox/checkbox.tsx +0 -13
- package/src/components/checkbox/index.ts +0 -1
- package/src/components/checkbox/types.ts +0 -30
- package/src/components/icon/default.tsx +0 -1459
- package/src/components/icon/defaultIcon.tsx +0 -82
- package/src/components/icon/icon.stories.tsx +0 -44
- package/src/components/icon/icons-ia.tsx +0 -107
- package/src/components/icon/index.ts +0 -11
- package/src/components/icon/normaIcon.tsx +0 -94
- package/src/components/icon/styles.ts +0 -11
- package/src/components/icon/svg.tsx +0 -24
- package/src/components/icon/types.ts +0 -14
- package/src/components/modal/index.ts +0 -1
- package/src/components/modal/modal.stories.tsx +0 -55
- package/src/components/modal/modal.tsx +0 -42
- package/src/components/modal/modalFooter.tsx +0 -32
- package/src/components/modal/modalHeader.tsx +0 -46
- package/src/components/modal/styles.tsx +0 -13
- package/src/components/modal/types.ts +0 -47
- package/src/components/progress-bar/index.ts +0 -1
- package/src/components/progress-bar/progress-bar.stories.tsx +0 -68
- package/src/components/progress-bar/progress-bar.tsx +0 -38
- package/src/components/progress-bar/styles.tsx +0 -27
- package/src/components/progress-bar/types.ts +0 -35
- package/src/components/radio/index.ts +0 -1
- package/src/components/radio/radio.stories.tsx +0 -150
- package/src/components/radio/radio.tsx +0 -13
- package/src/components/radio/types.ts +0 -27
- package/src/components/tag/index.ts +0 -1
- package/src/components/tag/tag.stories.tsx +0 -80
- package/src/components/tag/tag.tsx +0 -13
- package/src/components/tag/types.ts +0 -47
- package/src/components/textfield/index.ts +0 -1
- package/src/components/textfield/textfield.tsx +0 -23
- package/src/components/textfield/types.ts +0 -93
- package/src/helpers/clients.ts +0 -6
- package/src/helpers/variants.ts +0 -3
- package/src/index.tsx +0 -1
|
@@ -1,376 +1,445 @@
|
|
|
1
|
-
import React from "react"
|
|
2
|
-
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
variant="filled"
|
|
83
|
-
/>
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
defaultValue="
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
<
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
/>
|
|
298
|
-
<TextField
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
label="
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
<TextField
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
1
|
+
import React from "react";
|
|
2
|
+
|
|
3
|
+
import Box from "@mui/material/Box";
|
|
4
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
5
|
+
import { TextField } from "../components";
|
|
6
|
+
|
|
7
|
+
const meta = {
|
|
8
|
+
title: "Form/TextField",
|
|
9
|
+
component: TextField,
|
|
10
|
+
parameters: {
|
|
11
|
+
layout: "centered",
|
|
12
|
+
},
|
|
13
|
+
tags: ["autodocs"],
|
|
14
|
+
argTypes: {},
|
|
15
|
+
} satisfies Meta<typeof TextField>;
|
|
16
|
+
|
|
17
|
+
export default meta;
|
|
18
|
+
|
|
19
|
+
type Story = StoryObj<typeof meta>;
|
|
20
|
+
|
|
21
|
+
const defaultArgs = {
|
|
22
|
+
disabled: false,
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export const Playground: Story = {
|
|
26
|
+
args: {
|
|
27
|
+
label: "Nome",
|
|
28
|
+
id: "input-demo",
|
|
29
|
+
color: "primary",
|
|
30
|
+
variant: "standard",
|
|
31
|
+
},
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export const TextFieldVariant = () => (
|
|
35
|
+
<>
|
|
36
|
+
<TextField variant="standard" label="Variant text" />
|
|
37
|
+
<TextField variant="filled" label="Variant Contained" />
|
|
38
|
+
<TextField variant="outlined" label="Variant Outlined" />
|
|
39
|
+
</>
|
|
40
|
+
);
|
|
41
|
+
TextFieldVariant.storyName = "TextField Variants";
|
|
42
|
+
|
|
43
|
+
export const TextFieldValidation = () => (
|
|
44
|
+
<div style={{ display: "flex", gap: "1rem", margin: 15 }}>
|
|
45
|
+
<Box
|
|
46
|
+
component="form"
|
|
47
|
+
sx={{
|
|
48
|
+
"& .MuiTextField-root": { m: 1, width: "100%" },
|
|
49
|
+
}}
|
|
50
|
+
noValidate
|
|
51
|
+
autoComplete="off"
|
|
52
|
+
>
|
|
53
|
+
<div>
|
|
54
|
+
<TextField
|
|
55
|
+
error
|
|
56
|
+
id="outlined-error"
|
|
57
|
+
label="Error"
|
|
58
|
+
defaultValue="Hello World"
|
|
59
|
+
/>
|
|
60
|
+
<TextField
|
|
61
|
+
error
|
|
62
|
+
id="outlined-error-helper-text"
|
|
63
|
+
label="Error"
|
|
64
|
+
defaultValue="Hello World"
|
|
65
|
+
helperText="Incorrect entry."
|
|
66
|
+
/>
|
|
67
|
+
</div>
|
|
68
|
+
<div>
|
|
69
|
+
<TextField
|
|
70
|
+
error
|
|
71
|
+
id="filled-error"
|
|
72
|
+
label="Error"
|
|
73
|
+
defaultValue="Hello World"
|
|
74
|
+
variant="filled"
|
|
75
|
+
/>
|
|
76
|
+
<TextField
|
|
77
|
+
error
|
|
78
|
+
id="filled-error-helper-text"
|
|
79
|
+
label="Error"
|
|
80
|
+
defaultValue="Hello World"
|
|
81
|
+
helperText="Incorrect entry."
|
|
82
|
+
variant="filled"
|
|
83
|
+
/>
|
|
84
|
+
</div>
|
|
85
|
+
<div>
|
|
86
|
+
<TextField
|
|
87
|
+
error
|
|
88
|
+
id="standard-error"
|
|
89
|
+
label="Error"
|
|
90
|
+
defaultValue="Hello World"
|
|
91
|
+
variant="standard"
|
|
92
|
+
/>
|
|
93
|
+
<TextField
|
|
94
|
+
error
|
|
95
|
+
id="standard-error-helper-text"
|
|
96
|
+
label="Error"
|
|
97
|
+
defaultValue="Hello World"
|
|
98
|
+
helperText="Incorrect entry."
|
|
99
|
+
variant="standard"
|
|
100
|
+
/>
|
|
101
|
+
</div>
|
|
102
|
+
</Box>
|
|
103
|
+
</div>
|
|
104
|
+
);
|
|
105
|
+
TextFieldValidation.storyName = "TextField Validation";
|
|
106
|
+
|
|
107
|
+
export const TextFieldMultiline = () => (
|
|
108
|
+
<div style={{ display: "flex", gap: "1rem", margin: 15 }}>
|
|
109
|
+
<Box
|
|
110
|
+
component="form"
|
|
111
|
+
sx={{
|
|
112
|
+
"& .MuiTextField-root": { m: 1, width: "100%" },
|
|
113
|
+
}}
|
|
114
|
+
noValidate
|
|
115
|
+
autoComplete="off"
|
|
116
|
+
>
|
|
117
|
+
<div>
|
|
118
|
+
<TextField
|
|
119
|
+
id="outlined-multiline-flexible"
|
|
120
|
+
label="Multiline"
|
|
121
|
+
multiline
|
|
122
|
+
maxRows={4}
|
|
123
|
+
/>
|
|
124
|
+
<TextField
|
|
125
|
+
id="outlined-textarea"
|
|
126
|
+
label="Multiline Placeholder"
|
|
127
|
+
placeholder="Placeholder"
|
|
128
|
+
multiline
|
|
129
|
+
/>
|
|
130
|
+
<TextField
|
|
131
|
+
id="outlined-multiline-static"
|
|
132
|
+
label="Multiline"
|
|
133
|
+
multiline
|
|
134
|
+
rows={4}
|
|
135
|
+
defaultValue="Default Value"
|
|
136
|
+
/>
|
|
137
|
+
</div>
|
|
138
|
+
<div>
|
|
139
|
+
<TextField
|
|
140
|
+
id="filled-multiline-flexible"
|
|
141
|
+
label="Multiline"
|
|
142
|
+
multiline
|
|
143
|
+
maxRows={4}
|
|
144
|
+
variant="filled"
|
|
145
|
+
/>
|
|
146
|
+
<TextField
|
|
147
|
+
id="filled-textarea"
|
|
148
|
+
label="Multiline Placeholder"
|
|
149
|
+
placeholder="Placeholder"
|
|
150
|
+
multiline
|
|
151
|
+
variant="filled"
|
|
152
|
+
/>
|
|
153
|
+
<TextField
|
|
154
|
+
id="filled-multiline-static"
|
|
155
|
+
label="Multiline"
|
|
156
|
+
multiline
|
|
157
|
+
rows={4}
|
|
158
|
+
defaultValue="Default Value"
|
|
159
|
+
variant="filled"
|
|
160
|
+
/>
|
|
161
|
+
</div>
|
|
162
|
+
<div>
|
|
163
|
+
<TextField
|
|
164
|
+
id="standard-multiline-flexible"
|
|
165
|
+
label="Multiline"
|
|
166
|
+
multiline
|
|
167
|
+
maxRows={4}
|
|
168
|
+
variant="standard"
|
|
169
|
+
/>
|
|
170
|
+
<TextField
|
|
171
|
+
id="standard-textarea"
|
|
172
|
+
label="Multiline Placeholder"
|
|
173
|
+
placeholder="Placeholder"
|
|
174
|
+
multiline
|
|
175
|
+
variant="standard"
|
|
176
|
+
/>
|
|
177
|
+
<TextField
|
|
178
|
+
id="standard-multiline-static"
|
|
179
|
+
label="Multiline"
|
|
180
|
+
multiline
|
|
181
|
+
rows={4}
|
|
182
|
+
defaultValue="Default Value"
|
|
183
|
+
variant="standard"
|
|
184
|
+
/>
|
|
185
|
+
</div>
|
|
186
|
+
</Box>
|
|
187
|
+
</div>
|
|
188
|
+
);
|
|
189
|
+
TextFieldMultiline.storyName = "TextField Multiline";
|
|
190
|
+
|
|
191
|
+
export const TextFieldSizes = () => (
|
|
192
|
+
<div style={{ display: "flex", gap: "1rem", margin: 15 }}>
|
|
193
|
+
<Box
|
|
194
|
+
component="form"
|
|
195
|
+
sx={{
|
|
196
|
+
"& .MuiTextField-root": { m: 1, width: "100%" },
|
|
197
|
+
}}
|
|
198
|
+
noValidate
|
|
199
|
+
autoComplete="off"
|
|
200
|
+
>
|
|
201
|
+
<div>
|
|
202
|
+
<TextField
|
|
203
|
+
label="Size"
|
|
204
|
+
id="outlined-size-small"
|
|
205
|
+
defaultValue="Small"
|
|
206
|
+
size="small"
|
|
207
|
+
/>
|
|
208
|
+
<TextField
|
|
209
|
+
label="Size"
|
|
210
|
+
id="outlined-size-normal"
|
|
211
|
+
defaultValue="Normal"
|
|
212
|
+
/>
|
|
213
|
+
</div>
|
|
214
|
+
<div>
|
|
215
|
+
<TextField
|
|
216
|
+
label="Size"
|
|
217
|
+
id="filled-size-small"
|
|
218
|
+
defaultValue="Small"
|
|
219
|
+
variant="filled"
|
|
220
|
+
size="small"
|
|
221
|
+
/>
|
|
222
|
+
<TextField
|
|
223
|
+
label="Size"
|
|
224
|
+
id="filled-size-normal"
|
|
225
|
+
defaultValue="Normal"
|
|
226
|
+
variant="filled"
|
|
227
|
+
/>
|
|
228
|
+
</div>
|
|
229
|
+
<div>
|
|
230
|
+
<TextField
|
|
231
|
+
label="Size"
|
|
232
|
+
id="standard-size-small"
|
|
233
|
+
defaultValue="Small"
|
|
234
|
+
size="small"
|
|
235
|
+
variant="standard"
|
|
236
|
+
/>
|
|
237
|
+
<TextField
|
|
238
|
+
label="Size"
|
|
239
|
+
id="standard-size-normal"
|
|
240
|
+
defaultValue="Normal"
|
|
241
|
+
variant="standard"
|
|
242
|
+
/>
|
|
243
|
+
</div>
|
|
244
|
+
</Box>
|
|
245
|
+
</div>
|
|
246
|
+
);
|
|
247
|
+
TextFieldSizes.storyName = "TextField Sizes";
|
|
248
|
+
|
|
249
|
+
export const TextFieldColors = () => (
|
|
250
|
+
<div style={{ display: "flex", gap: "1rem", margin: 15 }}>
|
|
251
|
+
<Box
|
|
252
|
+
component="form"
|
|
253
|
+
sx={{
|
|
254
|
+
"& > :not(style)": { m: 1, width: "100%" },
|
|
255
|
+
}}
|
|
256
|
+
noValidate
|
|
257
|
+
autoComplete="off"
|
|
258
|
+
>
|
|
259
|
+
<TextField label="Outlined Primary" color="primary" focused />
|
|
260
|
+
<TextField label="Outlined secondary" color="secondary" focused />
|
|
261
|
+
<TextField
|
|
262
|
+
label="Filled success"
|
|
263
|
+
variant="filled"
|
|
264
|
+
color="success"
|
|
265
|
+
focused
|
|
266
|
+
/>
|
|
267
|
+
<TextField
|
|
268
|
+
label="Standard warning"
|
|
269
|
+
variant="standard"
|
|
270
|
+
color="warning"
|
|
271
|
+
focused
|
|
272
|
+
/>
|
|
273
|
+
</Box>
|
|
274
|
+
</div>
|
|
275
|
+
);
|
|
276
|
+
TextFieldColors.storyName = "TextField Colors";
|
|
277
|
+
|
|
278
|
+
export const TextFieldProps = () => (
|
|
279
|
+
<div style={{ display: "flex", gap: "1rem", margin: 15 }}>
|
|
280
|
+
<Box
|
|
281
|
+
component="form"
|
|
282
|
+
sx={{
|
|
283
|
+
"& .MuiTextField-root": { m: 1, width: "100%" },
|
|
284
|
+
display: "flex",
|
|
285
|
+
gap: "1rem",
|
|
286
|
+
margin: 15,
|
|
287
|
+
}}
|
|
288
|
+
noValidate
|
|
289
|
+
autoComplete="off"
|
|
290
|
+
>
|
|
291
|
+
<div>
|
|
292
|
+
<TextField
|
|
293
|
+
required
|
|
294
|
+
id="outlined-required"
|
|
295
|
+
label="Required"
|
|
296
|
+
defaultValue="Hello World"
|
|
297
|
+
/>
|
|
298
|
+
<TextField
|
|
299
|
+
disabled
|
|
300
|
+
id="outlined-disabled"
|
|
301
|
+
label="Disabled"
|
|
302
|
+
defaultValue="Hello World"
|
|
303
|
+
/>
|
|
304
|
+
<TextField
|
|
305
|
+
id="outlined-password-input"
|
|
306
|
+
label="Password"
|
|
307
|
+
type="password"
|
|
308
|
+
autoComplete="current-password"
|
|
309
|
+
/>
|
|
310
|
+
<TextField
|
|
311
|
+
id="outlined-read-only-input"
|
|
312
|
+
label="Read Only"
|
|
313
|
+
defaultValue="Hello World"
|
|
314
|
+
InputProps={{
|
|
315
|
+
readOnly: true,
|
|
316
|
+
}}
|
|
317
|
+
/>
|
|
318
|
+
<TextField
|
|
319
|
+
id="outlined-number"
|
|
320
|
+
label="Number"
|
|
321
|
+
type="number"
|
|
322
|
+
InputLabelProps={{
|
|
323
|
+
shrink: true,
|
|
324
|
+
}}
|
|
325
|
+
/>
|
|
326
|
+
<TextField id="outlined-search" label="Search field" type="search" />
|
|
327
|
+
<TextField
|
|
328
|
+
id="outlined-helperText"
|
|
329
|
+
label="Helper text"
|
|
330
|
+
defaultValue="Default Value"
|
|
331
|
+
helperText="Some important text"
|
|
332
|
+
/>
|
|
333
|
+
</div>
|
|
334
|
+
<div>
|
|
335
|
+
<TextField
|
|
336
|
+
required
|
|
337
|
+
id="filled-required"
|
|
338
|
+
label="Required"
|
|
339
|
+
defaultValue="Hello World"
|
|
340
|
+
variant="filled"
|
|
341
|
+
/>
|
|
342
|
+
<TextField
|
|
343
|
+
disabled
|
|
344
|
+
id="filled-disabled"
|
|
345
|
+
label="Disabled"
|
|
346
|
+
defaultValue="Hello World"
|
|
347
|
+
variant="filled"
|
|
348
|
+
/>
|
|
349
|
+
<TextField
|
|
350
|
+
id="filled-password-input"
|
|
351
|
+
label="Password"
|
|
352
|
+
type="password"
|
|
353
|
+
autoComplete="current-password"
|
|
354
|
+
variant="filled"
|
|
355
|
+
/>
|
|
356
|
+
<TextField
|
|
357
|
+
id="filled-read-only-input"
|
|
358
|
+
label="Read Only"
|
|
359
|
+
defaultValue="Hello World"
|
|
360
|
+
InputProps={{
|
|
361
|
+
readOnly: true,
|
|
362
|
+
}}
|
|
363
|
+
variant="filled"
|
|
364
|
+
/>
|
|
365
|
+
<TextField
|
|
366
|
+
id="filled-number"
|
|
367
|
+
label="Number"
|
|
368
|
+
type="number"
|
|
369
|
+
InputLabelProps={{
|
|
370
|
+
shrink: true,
|
|
371
|
+
}}
|
|
372
|
+
variant="filled"
|
|
373
|
+
/>
|
|
374
|
+
<TextField
|
|
375
|
+
id="filled-search"
|
|
376
|
+
label="Search field"
|
|
377
|
+
type="search"
|
|
378
|
+
variant="filled"
|
|
379
|
+
/>
|
|
380
|
+
<TextField
|
|
381
|
+
id="filled-helperText"
|
|
382
|
+
label="Helper text"
|
|
383
|
+
defaultValue="Default Value"
|
|
384
|
+
helperText="Some important text"
|
|
385
|
+
variant="filled"
|
|
386
|
+
/>
|
|
387
|
+
</div>
|
|
388
|
+
<div>
|
|
389
|
+
<TextField
|
|
390
|
+
required
|
|
391
|
+
id="standard-required"
|
|
392
|
+
label="Required"
|
|
393
|
+
defaultValue="Hello World"
|
|
394
|
+
variant="standard"
|
|
395
|
+
/>
|
|
396
|
+
<TextField
|
|
397
|
+
disabled
|
|
398
|
+
id="standard-disabled"
|
|
399
|
+
label="Disabled"
|
|
400
|
+
defaultValue="Hello World"
|
|
401
|
+
variant="standard"
|
|
402
|
+
/>
|
|
403
|
+
<TextField
|
|
404
|
+
id="standard-password-input"
|
|
405
|
+
label="Password"
|
|
406
|
+
type="password"
|
|
407
|
+
autoComplete="current-password"
|
|
408
|
+
variant="standard"
|
|
409
|
+
/>
|
|
410
|
+
<TextField
|
|
411
|
+
id="standard-read-only-input"
|
|
412
|
+
label="Read Only"
|
|
413
|
+
defaultValue="Hello World"
|
|
414
|
+
InputProps={{
|
|
415
|
+
readOnly: true,
|
|
416
|
+
}}
|
|
417
|
+
variant="standard"
|
|
418
|
+
/>
|
|
419
|
+
<TextField
|
|
420
|
+
id="standard-number"
|
|
421
|
+
label="Number"
|
|
422
|
+
type="number"
|
|
423
|
+
InputLabelProps={{
|
|
424
|
+
shrink: true,
|
|
425
|
+
}}
|
|
426
|
+
variant="standard"
|
|
427
|
+
/>
|
|
428
|
+
<TextField
|
|
429
|
+
id="standard-search"
|
|
430
|
+
label="Search field"
|
|
431
|
+
type="search"
|
|
432
|
+
variant="standard"
|
|
433
|
+
/>
|
|
434
|
+
<TextField
|
|
435
|
+
id="standard-helperText"
|
|
436
|
+
label="Helper text"
|
|
437
|
+
defaultValue="Default Value"
|
|
438
|
+
helperText="Some important text"
|
|
439
|
+
variant="standard"
|
|
440
|
+
/>
|
|
441
|
+
</div>
|
|
442
|
+
</Box>
|
|
443
|
+
</div>
|
|
444
|
+
);
|
|
445
|
+
TextFieldProps.storyName = "TextField Props";
|