@mirai/ui 1.0.118 → 1.0.120

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.
Files changed (61) hide show
  1. package/README.md +23 -2
  2. package/build/components/Calendar/Calendar.Month.js +6 -3
  3. package/build/components/Calendar/Calendar.Month.js.map +1 -1
  4. package/build/components/Calendar/Calendar.Week.js +1 -1
  5. package/build/components/Calendar/Calendar.Week.js.map +1 -1
  6. package/build/components/Calendar/Calendar.Weekdays.js +5 -1
  7. package/build/components/Calendar/Calendar.Weekdays.js.map +1 -1
  8. package/build/components/Calendar/Calendar.module.css +1 -0
  9. package/build/components/Calendar/__tests__/__snapshots__/Calendar.test.jsx.snap +528 -528
  10. package/build/components/Form/Form.stories.js +11 -2
  11. package/build/components/Form/Form.stories.js.map +1 -1
  12. package/build/components/Form/__tests__/__snapshots__/Form.test.jsx.snap +14 -10
  13. package/build/components/InputDate/InputDate.js +21 -16
  14. package/build/components/InputDate/InputDate.js.map +1 -1
  15. package/build/components/InputDate/InputDate.module.css +8 -6
  16. package/build/components/InputDate/__tests__/__snapshots__/InputDate.test.js.snap +597 -512
  17. package/build/components/InputOption/InputOption.js +2 -4
  18. package/build/components/InputOption/InputOption.js.map +1 -1
  19. package/build/components/InputOption/InputOption.module.css +2 -16
  20. package/build/components/InputOption/__tests__/__snapshots__/InputOption.test.js.snap +1 -1
  21. package/build/components/InputSelect/InputSelect.js +23 -22
  22. package/build/components/InputSelect/InputSelect.js.map +1 -1
  23. package/build/components/InputSelect/__tests__/__snapshots__/InputSelect.test.js.snap +503 -495
  24. package/build/components/InputText/InputText.js +24 -21
  25. package/build/components/InputText/InputText.js.map +1 -1
  26. package/build/components/InputText/InputText.module.css +14 -35
  27. package/build/components/InputText/__tests__/__snapshots__/InputText.test.js.snap +223 -191
  28. package/build/components/InputText/partials/InputText.Hint.js +33 -0
  29. package/build/components/InputText/partials/InputText.Hint.js.map +1 -0
  30. package/build/components/InputText/partials/InputText.IconState.js +33 -0
  31. package/build/components/InputText/partials/InputText.IconState.js.map +1 -0
  32. package/build/components/InputText/partials/InputText.Label.js +39 -0
  33. package/build/components/InputText/partials/InputText.Label.js.map +1 -0
  34. package/build/components/InputText/partials/index.js +39 -0
  35. package/build/components/InputText/partials/index.js.map +1 -0
  36. package/build/components/Menu/Menu.Option.js +6 -2
  37. package/build/components/Menu/Menu.Option.js.map +1 -1
  38. package/build/components/Menu/Menu.module.css +6 -3
  39. package/build/components/Menu/__tests__/__snapshots__/Menu.test.jsx.snap +93 -69
  40. package/build/components/Modal/Modal.js +1 -1
  41. package/build/components/Modal/Modal.js.map +1 -1
  42. package/build/components/Modal/__tests__/__snapshots__/Modal.test.js.snap +4 -4
  43. package/build/components/Table/Table.Row.js +5 -2
  44. package/build/components/Table/Table.Row.js.map +1 -1
  45. package/build/components/Table/Table.module.css +7 -2
  46. package/build/components/Table/__tests__/__snapshots__/Table.test.js.snap +1829 -669
  47. package/build/primitives/Text/Text.module.css +4 -4
  48. package/build/primitives/View/View.js +5 -2
  49. package/build/primitives/View/View.js.map +1 -1
  50. package/build/primitives/View/View.module.css +11 -3
  51. package/build/primitives/View/View.stories.js +1 -0
  52. package/build/primitives/View/View.stories.js.map +1 -1
  53. package/build/primitives/View/__tests__/__snapshots__/View.test.js.snap +8 -0
  54. package/build/theme/default.theme.css +1 -1
  55. package/build/theme/index.js +11 -0
  56. package/build/theme/index.js.map +1 -1
  57. package/build/theme/theme.constants.js +21 -1
  58. package/build/theme/theme.constants.js.map +1 -1
  59. package/build/theme/theme.js +23 -1
  60. package/build/theme/theme.js.map +1 -1
  61. package/package.json +1 -1
@@ -8,12 +8,16 @@ exports[`component:<InputText> inherit:className 1`] = `
8
8
  <div
9
9
  class="view row inputBorder"
10
10
  >
11
- <input
12
- class="input input"
13
- name="name"
14
- type="text"
15
- value=""
16
- />
11
+ <div
12
+ class="view wide content"
13
+ >
14
+ <input
15
+ class="input input"
16
+ name="name"
17
+ type="text"
18
+ value=""
19
+ />
20
+ </div>
17
21
  </div>
18
22
  </div>
19
23
  </DocumentFragment>
@@ -27,13 +31,17 @@ exports[`component:<InputText> prop:disabled 1`] = `
27
31
  <div
28
32
  class="view row inputBorder disabled"
29
33
  >
30
- <input
31
- class="input input"
32
- disabled=""
33
- name="name"
34
- type="text"
35
- value=""
36
- />
34
+ <div
35
+ class="view wide content"
36
+ >
37
+ <input
38
+ class="input input"
39
+ disabled=""
40
+ name="name"
41
+ type="text"
42
+ value=""
43
+ />
44
+ </div>
37
45
  </div>
38
46
  </div>
39
47
  </DocumentFragment>
@@ -47,37 +55,37 @@ exports[`component:<InputText> prop:error 1`] = `
47
55
  <div
48
56
  class="view row inputBorder error"
49
57
  >
50
- <input
51
- class="input input"
52
- name="name"
53
- type="text"
54
- value=""
55
- />
56
58
  <div
57
- class="view row icons"
59
+ class="view wide content"
58
60
  >
59
- <span
60
- class="icon headline-3 icon error"
61
- >
62
- <svg
63
- fill="currentColor"
64
- height="1em"
65
- stroke="currentColor"
66
- stroke-width="0"
67
- viewBox="0 0 24 24"
68
- width="1em"
69
- xmlns="http://www.w3.org/2000/svg"
70
- >
71
- <path
72
- d="M0 0h24v24H0V0z"
73
- fill="none"
74
- />
75
- <path
76
- d="M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"
77
- />
78
- </svg>
79
- </span>
61
+ <input
62
+ class="input input"
63
+ name="name"
64
+ type="text"
65
+ value=""
66
+ />
80
67
  </div>
68
+ <span
69
+ class="icon headline-3 icon error"
70
+ >
71
+ <svg
72
+ fill="currentColor"
73
+ height="1em"
74
+ stroke="currentColor"
75
+ stroke-width="0"
76
+ viewBox="0 0 24 24"
77
+ width="1em"
78
+ xmlns="http://www.w3.org/2000/svg"
79
+ >
80
+ <path
81
+ d="M0 0h24v24H0V0z"
82
+ fill="none"
83
+ />
84
+ <path
85
+ d="M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"
86
+ />
87
+ </svg>
88
+ </span>
81
89
  </div>
82
90
  </div>
83
91
  </DocumentFragment>
@@ -91,12 +99,16 @@ exports[`component:<InputText> prop:hint 1`] = `
91
99
  <div
92
100
  class="view row inputBorder"
93
101
  >
94
- <input
95
- class="input input"
96
- name="name"
97
- type="text"
98
- value=""
99
- />
102
+ <div
103
+ class="view wide content"
104
+ >
105
+ <input
106
+ class="input input"
107
+ name="name"
108
+ type="text"
109
+ value=""
110
+ />
111
+ </div>
100
112
  </div>
101
113
  <span
102
114
  class="text small text hint"
@@ -136,12 +148,16 @@ exports[`component:<InputText> prop:icon 1`] = `
136
148
  />
137
149
  </svg>
138
150
  </span>
139
- <input
140
- class="input input iconLeft"
141
- name="name"
142
- type="text"
143
- value=""
144
- />
151
+ <div
152
+ class="view wide content"
153
+ >
154
+ <input
155
+ class="input input"
156
+ name="name"
157
+ type="text"
158
+ value=""
159
+ />
160
+ </div>
145
161
  </div>
146
162
  </div>
147
163
  </DocumentFragment>
@@ -155,17 +171,21 @@ exports[`component:<InputText> prop:label 1`] = `
155
171
  <div
156
172
  class="view row inputBorder"
157
173
  >
158
- <span
159
- class="text paragraph text label"
174
+ <div
175
+ class="view wide content"
160
176
  >
161
- label
162
- </span>
163
- <input
164
- class="input input withLabel"
165
- name="name"
166
- type="text"
167
- value=""
168
- />
177
+ <span
178
+ class="text paragraph text label"
179
+ >
180
+ label
181
+ </span>
182
+ <input
183
+ class="input input withLabel"
184
+ name="name"
185
+ type="text"
186
+ value=""
187
+ />
188
+ </div>
169
189
  </div>
170
190
  </div>
171
191
  </DocumentFragment>
@@ -179,11 +199,15 @@ exports[`component:<InputText> prop:multiLine 1`] = `
179
199
  <div
180
200
  class="view row inputBorder"
181
201
  >
182
- <textarea
183
- class="input input"
184
- name="name"
185
- type="text"
186
- />
202
+ <div
203
+ class="view wide content"
204
+ >
205
+ <textarea
206
+ class="input input"
207
+ name="name"
208
+ type="text"
209
+ />
210
+ </div>
187
211
  </div>
188
212
  </div>
189
213
  </DocumentFragment>
@@ -197,37 +221,37 @@ exports[`component:<InputText> prop:showState (false) 1`] = `
197
221
  <div
198
222
  class="view row inputBorder error"
199
223
  >
200
- <input
201
- class="input input"
202
- name="name"
203
- type="text"
204
- value=""
205
- />
206
224
  <div
207
- class="view row icons"
225
+ class="view wide content"
208
226
  >
209
- <span
210
- class="icon headline-3 icon error"
211
- >
212
- <svg
213
- fill="currentColor"
214
- height="1em"
215
- stroke="currentColor"
216
- stroke-width="0"
217
- viewBox="0 0 24 24"
218
- width="1em"
219
- xmlns="http://www.w3.org/2000/svg"
220
- >
221
- <path
222
- d="M0 0h24v24H0V0z"
223
- fill="none"
224
- />
225
- <path
226
- d="M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"
227
- />
228
- </svg>
229
- </span>
227
+ <input
228
+ class="input input"
229
+ name="name"
230
+ type="text"
231
+ value=""
232
+ />
230
233
  </div>
234
+ <span
235
+ class="icon headline-3 icon error"
236
+ >
237
+ <svg
238
+ fill="currentColor"
239
+ height="1em"
240
+ stroke="currentColor"
241
+ stroke-width="0"
242
+ viewBox="0 0 24 24"
243
+ width="1em"
244
+ xmlns="http://www.w3.org/2000/svg"
245
+ >
246
+ <path
247
+ d="M0 0h24v24H0V0z"
248
+ fill="none"
249
+ />
250
+ <path
251
+ d="M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"
252
+ />
253
+ </svg>
254
+ </span>
231
255
  </div>
232
256
  </div>
233
257
  </DocumentFragment>
@@ -241,17 +265,66 @@ exports[`component:<InputText> prop:success 1`] = `
241
265
  <div
242
266
  class="view row inputBorder"
243
267
  >
244
- <input
245
- class="input input"
246
- name="name"
247
- type="text"
248
- value=""
249
- />
250
268
  <div
251
- class="view row icons"
269
+ class="view wide content"
270
+ >
271
+ <input
272
+ class="input input"
273
+ name="name"
274
+ type="text"
275
+ value=""
276
+ />
277
+ </div>
278
+ <span
279
+ class="icon headline-3 icon success"
280
+ >
281
+ <svg
282
+ fill="currentColor"
283
+ height="1em"
284
+ stroke="currentColor"
285
+ stroke-width="0"
286
+ viewBox="0 0 24 24"
287
+ width="1em"
288
+ xmlns="http://www.w3.org/2000/svg"
289
+ >
290
+ <path
291
+ d="M0 0h24v24H0V0z"
292
+ fill="none"
293
+ />
294
+ <path
295
+ d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm4.59-12.42L10 14.17l-2.59-2.58L6 13l4 4 8-8z"
296
+ />
297
+ </svg>
298
+ </span>
299
+ </div>
300
+ </div>
301
+ </DocumentFragment>
302
+ `;
303
+
304
+ exports[`component:<InputText> prop:type 1`] = `
305
+ <DocumentFragment>
306
+ <div
307
+ class="view inputContainer"
308
+ >
309
+ <div
310
+ class="view row inputBorder"
311
+ >
312
+ <div
313
+ class="view wide content"
314
+ >
315
+ <input
316
+ class="input input"
317
+ name="name"
318
+ type="password"
319
+ value=""
320
+ />
321
+ </div>
322
+ <div
323
+ class="pressable"
324
+ tabindex="-1"
252
325
  >
253
326
  <span
254
- class="icon headline-3 icon success"
327
+ class="icon headline-3 icon"
255
328
  >
256
329
  <svg
257
330
  fill="currentColor"
@@ -263,11 +336,11 @@ exports[`component:<InputText> prop:success 1`] = `
263
336
  xmlns="http://www.w3.org/2000/svg"
264
337
  >
265
338
  <path
266
- d="M0 0h24v24H0V0z"
339
+ d="M0 0h24v24H0V0zm0 0h24v24H0V0zm0 0h24v24H0V0zm0 0h24v24H0V0z"
267
340
  fill="none"
268
341
  />
269
342
  <path
270
- d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm4.59-12.42L10 14.17l-2.59-2.58L6 13l4 4 8-8z"
343
+ d="M12 6a9.77 9.77 0 018.82 5.5 9.647 9.647 0 01-2.41 3.12l1.41 1.41c1.39-1.23 2.49-2.77 3.18-4.53C21.27 7.11 17 4 12 4c-1.27 0-2.49.2-3.64.57l1.65 1.65C10.66 6.09 11.32 6 12 6zm-1.07 1.14L13 9.21c.57.25 1.03.71 1.28 1.28l2.07 2.07c.08-.34.14-.7.14-1.07C16.5 9.01 14.48 7 12 7c-.37 0-.72.05-1.07.14zM2.01 3.87l2.68 2.68A11.738 11.738 0 001 11.5C2.73 15.89 7 19 12 19c1.52 0 2.98-.29 4.32-.82l3.42 3.42 1.41-1.41L3.42 2.45 2.01 3.87zm7.5 7.5l2.61 2.61c-.04.01-.08.02-.12.02a2.5 2.5 0 01-2.5-2.5c0-.05.01-.08.01-.13zm-3.4-3.4l1.75 1.75a4.6 4.6 0 00-.36 1.78 4.507 4.507 0 006.27 4.14l.98.98c-.88.24-1.8.38-2.75.38a9.77 9.77 0 01-8.82-5.5c.7-1.43 1.72-2.61 2.93-3.53z"
271
344
  />
272
345
  </svg>
273
346
  </span>
@@ -277,7 +350,7 @@ exports[`component:<InputText> prop:success 1`] = `
277
350
  </DocumentFragment>
278
351
  `;
279
352
 
280
- exports[`component:<InputText> prop:type 1`] = `
353
+ exports[`component:<InputText> prop:warning 1`] = `
281
354
  <DocumentFragment>
282
355
  <div
283
356
  class="view inputContainer"
@@ -285,82 +358,33 @@ exports[`component:<InputText> prop:type 1`] = `
285
358
  <div
286
359
  class="view row inputBorder"
287
360
  >
288
- <input
289
- class="input input"
290
- name="name"
291
- type="password"
292
- value=""
293
- />
294
361
  <div
295
- class="view row icons"
362
+ class="view wide content"
296
363
  >
297
- <div
298
- class="pressable"
299
- tabindex="-1"
300
- >
301
- <span
302
- class="icon headline-3 icon pressable"
303
- >
304
- <svg
305
- fill="currentColor"
306
- height="1em"
307
- stroke="currentColor"
308
- stroke-width="0"
309
- viewBox="0 0 24 24"
310
- width="1em"
311
- xmlns="http://www.w3.org/2000/svg"
312
- >
313
- <path
314
- d="M0 0h24v24H0V0zm0 0h24v24H0V0zm0 0h24v24H0V0zm0 0h24v24H0V0z"
315
- fill="none"
316
- />
317
- <path
318
- d="M12 6a9.77 9.77 0 018.82 5.5 9.647 9.647 0 01-2.41 3.12l1.41 1.41c1.39-1.23 2.49-2.77 3.18-4.53C21.27 7.11 17 4 12 4c-1.27 0-2.49.2-3.64.57l1.65 1.65C10.66 6.09 11.32 6 12 6zm-1.07 1.14L13 9.21c.57.25 1.03.71 1.28 1.28l2.07 2.07c.08-.34.14-.7.14-1.07C16.5 9.01 14.48 7 12 7c-.37 0-.72.05-1.07.14zM2.01 3.87l2.68 2.68A11.738 11.738 0 001 11.5C2.73 15.89 7 19 12 19c1.52 0 2.98-.29 4.32-.82l3.42 3.42 1.41-1.41L3.42 2.45 2.01 3.87zm7.5 7.5l2.61 2.61c-.04.01-.08.02-.12.02a2.5 2.5 0 01-2.5-2.5c0-.05.01-.08.01-.13zm-3.4-3.4l1.75 1.75a4.6 4.6 0 00-.36 1.78 4.507 4.507 0 006.27 4.14l.98.98c-.88.24-1.8.38-2.75.38a9.77 9.77 0 01-8.82-5.5c.7-1.43 1.72-2.61 2.93-3.53z"
319
- />
320
- </svg>
321
- </span>
322
- </div>
364
+ <input
365
+ class="input input"
366
+ name="name"
367
+ type="text"
368
+ value=""
369
+ />
323
370
  </div>
324
- </div>
325
- </div>
326
- </DocumentFragment>
327
- `;
328
-
329
- exports[`component:<InputText> prop:warning 1`] = `
330
- <DocumentFragment>
331
- <div
332
- class="view inputContainer"
333
- >
334
- <div
335
- class="view row inputBorder"
336
- >
337
- <input
338
- class="input input"
339
- name="name"
340
- type="text"
341
- value=""
342
- />
343
- <div
344
- class="view row icons"
371
+ <span
372
+ class="icon headline-3 icon warning"
345
373
  >
346
- <span
347
- class="icon headline-3 icon warning"
374
+ <svg
375
+ fill="currentColor"
376
+ height="1em"
377
+ stroke="currentColor"
378
+ stroke-width="0"
379
+ viewBox="0 0 24 24"
380
+ width="1em"
381
+ xmlns="http://www.w3.org/2000/svg"
348
382
  >
349
- <svg
350
- fill="currentColor"
351
- height="1em"
352
- stroke="currentColor"
353
- stroke-width="0"
354
- viewBox="0 0 24 24"
355
- width="1em"
356
- xmlns="http://www.w3.org/2000/svg"
357
- >
358
- <path
359
- d="M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z"
360
- />
361
- </svg>
362
- </span>
363
- </div>
383
+ <path
384
+ d="M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z"
385
+ />
386
+ </svg>
387
+ </span>
364
388
  </div>
365
389
  </div>
366
390
  </DocumentFragment>
@@ -374,12 +398,16 @@ exports[`component:<InputText> renders 1`] = `
374
398
  <div
375
399
  class="view row inputBorder"
376
400
  >
377
- <input
378
- class="input input"
379
- name="name"
380
- type="text"
381
- value=""
382
- />
401
+ <div
402
+ class="view wide content"
403
+ >
404
+ <input
405
+ class="input input"
406
+ name="name"
407
+ type="text"
408
+ value=""
409
+ />
410
+ </div>
383
411
  </div>
384
412
  </div>
385
413
  </DocumentFragment>
@@ -393,13 +421,17 @@ exports[`component:<InputText> testID 1`] = `
393
421
  <div
394
422
  class="view row inputBorder"
395
423
  >
396
- <input
397
- class="input input"
398
- data-testid="mirai"
399
- name="name"
400
- type="text"
401
- value=""
402
- />
424
+ <div
425
+ class="view wide content"
426
+ >
427
+ <input
428
+ class="input input"
429
+ data-testid="mirai"
430
+ name="name"
431
+ type="text"
432
+ value=""
433
+ />
434
+ </div>
403
435
  </div>
404
436
  </div>
405
437
  </DocumentFragment>
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.Hint = void 0;
7
+ var _propTypes = _interopRequireDefault(require("prop-types"));
8
+ var _react = _interopRequireDefault(require("react"));
9
+ var _helpers = require("../../../helpers");
10
+ var _primitives = require("../../../primitives");
11
+ var _InputTextModule = _interopRequireDefault(require("../InputText.module.css"));
12
+ var _excluded = ["disabled", "error", "hint"];
13
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
14
+ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
15
+ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
16
+ var Hint = function Hint(_ref) {
17
+ var disabled = _ref.disabled,
18
+ error = _ref.error,
19
+ hint = _ref.hint,
20
+ others = _objectWithoutProperties(_ref, _excluded);
21
+ return /*#__PURE__*/_react.default.createElement(_primitives.Text, {
22
+ small: true,
23
+ className: (0, _helpers.styles)(_InputTextModule.default.text, _InputTextModule.default.hint, disabled && _InputTextModule.default.disabled, error && _InputTextModule.default.error, others.className)
24
+ }, hint);
25
+ };
26
+ exports.Hint = Hint;
27
+ Hint.displayName = 'Component:InputText.Hint';
28
+ Hint.propTypes = {
29
+ disabled: _propTypes.default.bool,
30
+ error: _propTypes.default.bool,
31
+ hint: _propTypes.default.string
32
+ };
33
+ //# sourceMappingURL=InputText.Hint.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InputText.Hint.js","names":["Hint","disabled","error","hint","others","styles","style","text","className","displayName","propTypes","PropTypes","bool","string"],"sources":["../../../../src/components/InputText/partials/InputText.Hint.jsx"],"sourcesContent":["import PropTypes from 'prop-types';\nimport React from 'react';\n\nimport { styles } from '../../../helpers';\nimport { Text } from '../../../primitives';\nimport style from '../InputText.module.css';\n\nconst Hint = ({ disabled, error, hint, ...others }) => (\n <Text\n small\n className={styles(style.text, style.hint, disabled && style.disabled, error && style.error, others.className)}\n >\n {hint}\n </Text>\n);\n\nHint.displayName = 'Component:InputText.Hint';\n\nHint.propTypes = {\n disabled: PropTypes.bool,\n error: PropTypes.bool,\n hint: PropTypes.string,\n};\n\nexport { Hint };\n"],"mappings":";;;;;;AAAA;AACA;AAEA;AACA;AACA;AAA4C;AAAA;AAAA;AAAA;AAE5C,IAAMA,IAAI,GAAG,SAAPA,IAAI;EAAA,IAAMC,QAAQ,QAARA,QAAQ;IAAEC,KAAK,QAALA,KAAK;IAAEC,IAAI,QAAJA,IAAI;IAAKC,MAAM;EAAA,oBAC9C,6BAAC,gBAAI;IACH,KAAK;IACL,SAAS,EAAE,IAAAC,eAAM,EAACC,wBAAK,CAACC,IAAI,EAAED,wBAAK,CAACH,IAAI,EAAEF,QAAQ,IAAIK,wBAAK,CAACL,QAAQ,EAAEC,KAAK,IAAII,wBAAK,CAACJ,KAAK,EAAEE,MAAM,CAACI,SAAS;EAAE,GAE7GL,IAAI,CACA;AAAA,CACR;AAAC;AAEFH,IAAI,CAACS,WAAW,GAAG,0BAA0B;AAE7CT,IAAI,CAACU,SAAS,GAAG;EACfT,QAAQ,EAAEU,kBAAS,CAACC,IAAI;EACxBV,KAAK,EAAES,kBAAS,CAACC,IAAI;EACrBT,IAAI,EAAEQ,kBAAS,CAACE;AAClB,CAAC"}
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.IconState = void 0;
7
+ var _propTypes = _interopRequireDefault(require("prop-types"));
8
+ var _react = _interopRequireDefault(require("react"));
9
+ var _helpers = require("../../../helpers");
10
+ var _primitives = require("../../../primitives");
11
+ var _InputTextModule = _interopRequireDefault(require("../InputText.module.css"));
12
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
+ var IconState = function IconState(_ref) {
14
+ var error = _ref.error,
15
+ success = _ref.success,
16
+ warning = _ref.warning;
17
+ return /*#__PURE__*/_react.default.createElement(_primitives.Icon, {
18
+ value: (0, _helpers.getIconState)({
19
+ error: error,
20
+ success: success,
21
+ warning: warning
22
+ }),
23
+ className: (0, _helpers.styles)(_InputTextModule.default.icon, error ? _InputTextModule.default.error : warning ? _InputTextModule.default.warning : success ? _InputTextModule.default.success : undefined)
24
+ });
25
+ };
26
+ exports.IconState = IconState;
27
+ IconState.displayName = 'Component:InputText.IconState';
28
+ IconState.propTypes = {
29
+ error: _propTypes.default.bool,
30
+ success: _propTypes.default.bool,
31
+ warning: _propTypes.default.bool
32
+ };
33
+ //# sourceMappingURL=InputText.IconState.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InputText.IconState.js","names":["IconState","error","success","warning","getIconState","styles","style","icon","undefined","displayName","propTypes","PropTypes","bool"],"sources":["../../../../src/components/InputText/partials/InputText.IconState.jsx"],"sourcesContent":["import PropTypes from 'prop-types';\nimport React from 'react';\n\nimport { getIconState, styles } from '../../../helpers';\nimport { Icon } from '../../../primitives';\nimport style from '../InputText.module.css';\n\nconst IconState = ({ error, success, warning }) => (\n <Icon\n value={getIconState({ error, success, warning })}\n className={styles(style.icon, error ? style.error : warning ? style.warning : success ? style.success : undefined)}\n />\n);\n\nIconState.displayName = 'Component:InputText.IconState';\n\nIconState.propTypes = {\n error: PropTypes.bool,\n success: PropTypes.bool,\n warning: PropTypes.bool,\n};\n\nexport { IconState };\n"],"mappings":";;;;;;AAAA;AACA;AAEA;AACA;AACA;AAA4C;AAE5C,IAAMA,SAAS,GAAG,SAAZA,SAAS;EAAA,IAAMC,KAAK,QAALA,KAAK;IAAEC,OAAO,QAAPA,OAAO;IAAEC,OAAO,QAAPA,OAAO;EAAA,oBAC1C,6BAAC,gBAAI;IACH,KAAK,EAAE,IAAAC,qBAAY,EAAC;MAAEH,KAAK,EAALA,KAAK;MAAEC,OAAO,EAAPA,OAAO;MAAEC,OAAO,EAAPA;IAAQ,CAAC,CAAE;IACjD,SAAS,EAAE,IAAAE,eAAM,EAACC,wBAAK,CAACC,IAAI,EAAEN,KAAK,GAAGK,wBAAK,CAACL,KAAK,GAAGE,OAAO,GAAGG,wBAAK,CAACH,OAAO,GAAGD,OAAO,GAAGI,wBAAK,CAACJ,OAAO,GAAGM,SAAS;EAAE,EACnH;AAAA,CACH;AAAC;AAEFR,SAAS,CAACS,WAAW,GAAG,+BAA+B;AAEvDT,SAAS,CAACU,SAAS,GAAG;EACpBT,KAAK,EAAEU,kBAAS,CAACC,IAAI;EACrBV,OAAO,EAAES,kBAAS,CAACC,IAAI;EACvBT,OAAO,EAAEQ,kBAAS,CAACC;AACrB,CAAC"}
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.Label = void 0;
7
+ var _propTypes = _interopRequireDefault(require("prop-types"));
8
+ var _react = _interopRequireDefault(require("react"));
9
+ var _helpers = require("../../../helpers");
10
+ var _primitives = require("../../../primitives");
11
+ var _InputTextModule = _interopRequireDefault(require("../InputText.module.css"));
12
+ var _excluded = ["disabled", "error", "focus", "label", "required", "value"];
13
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
14
+ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
15
+ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
16
+ var Label = function Label(_ref) {
17
+ var disabled = _ref.disabled,
18
+ error = _ref.error,
19
+ focus = _ref.focus,
20
+ label = _ref.label,
21
+ _ref$required = _ref.required,
22
+ required = _ref$required === void 0 ? false : _ref$required,
23
+ value = _ref.value,
24
+ others = _objectWithoutProperties(_ref, _excluded);
25
+ return /*#__PURE__*/_react.default.createElement(_primitives.Text, {
26
+ className: (0, _helpers.styles)(_InputTextModule.default.text, others.className || _InputTextModule.default.label, disabled && _InputTextModule.default.disabled, focus && _InputTextModule.default.focus, error && _InputTextModule.default.error, (focus || error || value !== undefined && (value === null || value === void 0 ? void 0 : value.length) > 0) && _InputTextModule.default.withValue)
27
+ }, /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, label), required && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, "*"));
28
+ };
29
+ exports.Label = Label;
30
+ Label.displayName = 'Component:InputText.Label';
31
+ Label.propTypes = {
32
+ disabled: _propTypes.default.bool,
33
+ error: _propTypes.default.bool,
34
+ focus: _propTypes.default.text,
35
+ label: _propTypes.default.text,
36
+ required: _propTypes.default.bool,
37
+ value: _propTypes.default.text
38
+ };
39
+ //# sourceMappingURL=InputText.Label.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InputText.Label.js","names":["Label","disabled","error","focus","label","required","value","others","styles","style","text","className","undefined","length","withValue","displayName","propTypes","PropTypes","bool"],"sources":["../../../../src/components/InputText/partials/InputText.Label.jsx"],"sourcesContent":["import PropTypes from 'prop-types';\nimport React from 'react';\n\nimport { styles } from '../../../helpers';\nimport { Text } from '../../../primitives';\nimport style from '../InputText.module.css';\n\nconst Label = ({ disabled, error, focus, label, required = false, value, ...others }) => (\n <Text\n className={styles(\n style.text,\n others.className || style.label,\n disabled && style.disabled,\n focus && style.focus,\n error && style.error,\n (focus || error || (value !== undefined && value?.length > 0)) && style.withValue,\n )}\n >\n <>{label}</>\n {required && <>*</>}\n </Text>\n);\n\nLabel.displayName = 'Component:InputText.Label';\n\nLabel.propTypes = {\n disabled: PropTypes.bool,\n error: PropTypes.bool,\n focus: PropTypes.text,\n label: PropTypes.text,\n required: PropTypes.bool,\n value: PropTypes.text,\n};\n\nexport { Label };\n"],"mappings":";;;;;;AAAA;AACA;AAEA;AACA;AACA;AAA4C;AAAA;AAAA;AAAA;AAE5C,IAAMA,KAAK,GAAG,SAARA,KAAK;EAAA,IAAMC,QAAQ,QAARA,QAAQ;IAAEC,KAAK,QAALA,KAAK;IAAEC,KAAK,QAALA,KAAK;IAAEC,KAAK,QAALA,KAAK;IAAA,qBAAEC,QAAQ;IAARA,QAAQ,8BAAG,KAAK;IAAEC,KAAK,QAALA,KAAK;IAAKC,MAAM;EAAA,oBAChF,6BAAC,gBAAI;IACH,SAAS,EAAE,IAAAC,eAAM,EACfC,wBAAK,CAACC,IAAI,EACVH,MAAM,CAACI,SAAS,IAAIF,wBAAK,CAACL,KAAK,EAC/BH,QAAQ,IAAIQ,wBAAK,CAACR,QAAQ,EAC1BE,KAAK,IAAIM,wBAAK,CAACN,KAAK,EACpBD,KAAK,IAAIO,wBAAK,CAACP,KAAK,EACpB,CAACC,KAAK,IAAID,KAAK,IAAKI,KAAK,KAAKM,SAAS,IAAI,CAAAN,KAAK,aAALA,KAAK,uBAALA,KAAK,CAAEO,MAAM,IAAG,CAAE,KAAKJ,wBAAK,CAACK,SAAS;EACjF,gBAEF,4DAAGV,KAAK,CAAI,EACXC,QAAQ,iBAAI,gEAAM,CACd;AAAA,CACR;AAAC;AAEFL,KAAK,CAACe,WAAW,GAAG,2BAA2B;AAE/Cf,KAAK,CAACgB,SAAS,GAAG;EAChBf,QAAQ,EAAEgB,kBAAS,CAACC,IAAI;EACxBhB,KAAK,EAAEe,kBAAS,CAACC,IAAI;EACrBf,KAAK,EAAEc,kBAAS,CAACP,IAAI;EACrBN,KAAK,EAAEa,kBAAS,CAACP,IAAI;EACrBL,QAAQ,EAAEY,kBAAS,CAACC,IAAI;EACxBZ,KAAK,EAAEW,kBAAS,CAACP;AACnB,CAAC"}