@hero-design/rn-work-uikit 1.9.4 → 1.9.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.
Files changed (41) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/assets/fonts/hero-icons-mobile.ttf +0 -0
  3. package/es/index.js +69810 -0
  4. package/lib/index.js +809 -440
  5. package/package.json +5 -5
  6. package/src/components/RichTextEditor/MentionList.tsx +2 -1
  7. package/testUtils/renderWithTheme.tsx +2 -2
  8. package/types/index.d.ts +525 -0
  9. package/src/__tests__/index-export.spec.ts +0 -64
  10. package/src/__tests__/index.spec.tsx +0 -14
  11. package/src/components/DatePicker/__tests__/__snapshots__/index.spec.tsx.snap +0 -1649
  12. package/src/components/DatePicker/__tests__/index.spec.tsx +0 -56
  13. package/src/components/FormGroup/__tests__/__snapshots__/index.spec.tsx.snap +0 -908
  14. package/src/components/FormGroup/__tests__/index.spec.tsx +0 -319
  15. package/src/components/FormGroup/__tests__/utils.spec.ts +0 -73
  16. package/src/components/RichTextEditor/__tests__/EditorToolbar.spec.tsx +0 -154
  17. package/src/components/RichTextEditor/__tests__/MentionList.spec.tsx +0 -105
  18. package/src/components/RichTextEditor/__tests__/RichTextEditor.spec.tsx +0 -81
  19. package/src/components/RichTextEditor/__tests__/RichTextEditorInput.spec.tsx +0 -174
  20. package/src/components/RichTextEditor/__tests__/__snapshots__/EditorToolbar.spec.tsx.snap +0 -407
  21. package/src/components/RichTextEditor/__tests__/__snapshots__/MentionList.spec.tsx.snap +0 -13
  22. package/src/components/Select/__tests__/__snapshots__/index.spec.tsx.snap +0 -1324
  23. package/src/components/Select/__tests__/index.spec.tsx +0 -43
  24. package/src/components/TextInput/__tests__/ErrorOrHelpText.spec.tsx +0 -20
  25. package/src/components/TextInput/__tests__/FloatingLabel.spec.tsx +0 -193
  26. package/src/components/TextInput/__tests__/InputComponent.spec.tsx +0 -41
  27. package/src/components/TextInput/__tests__/InputRow.spec.tsx +0 -233
  28. package/src/components/TextInput/__tests__/MaxLengthMessage.spec.tsx +0 -17
  29. package/src/components/TextInput/__tests__/PrefixComponent.spec.tsx +0 -14
  30. package/src/components/TextInput/__tests__/StyledTextInput.spec.tsx +0 -114
  31. package/src/components/TextInput/__tests__/SuffixComponent.spec.tsx +0 -20
  32. package/src/components/TextInput/__tests__/__snapshots__/StyledTextInput.spec.tsx.snap +0 -583
  33. package/src/components/TextInput/__tests__/__snapshots__/index.spec.tsx.snap +0 -5835
  34. package/src/components/TextInput/__tests__/getState.spec.tsx +0 -89
  35. package/src/components/TextInput/__tests__/index.spec.tsx +0 -679
  36. package/src/components/TimePicker/__tests__/index.spec.tsx +0 -34
  37. package/src/theme/__tests__/ThemeProvider.spec.tsx +0 -32
  38. package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +0 -2042
  39. package/src/theme/__tests__/index.spec.ts +0 -7
  40. package/src/utils/__tests__/helpers.spec.ts +0 -92
  41. package/stats/1.3.0/rn-work-uikit-stats.html +0 -4842
@@ -1,20 +0,0 @@
1
- import React from 'react';
2
- import renderWithTheme from '../../../../testUtils/renderWithTheme';
3
- import SuffixComponent from '../SuffixComponent';
4
-
5
- describe('SuffixComponent', () => {
6
- it('renders loading icon with loading', () => {
7
- const wrapper = renderWithTheme(
8
- <SuffixComponent loading suffix="dollar-sign" state="default" />
9
- );
10
-
11
- expect(wrapper.getByA11yLabel('Suffix icon: loading')).toBeDefined();
12
- });
13
-
14
- it('renders suffix icon', () => {
15
- const wrapper = renderWithTheme(
16
- <SuffixComponent loading={false} suffix="dollar-sign" state="default" />
17
- );
18
- expect(wrapper.getByA11yLabel('Suffix icon: dollar-sign')).toBeDefined();
19
- });
20
- });
@@ -1,583 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`StyledBorder renders correctly when focused 1`] = `
4
- <View
5
- style={
6
- [
7
- [
8
- {
9
- "borderColor": "#001f23",
10
- "borderRadius": 8,
11
- "borderWidth": 2,
12
- },
13
- ],
14
- undefined,
15
- ]
16
- }
17
- themeFocused={true}
18
- themeState="error"
19
- />
20
- `;
21
-
22
- exports[`StyledBorder renders correctly with themeState default 1`] = `
23
- <View
24
- style={
25
- [
26
- [
27
- {
28
- "borderColor": "#e8e9ea",
29
- "borderRadius": 8,
30
- "borderWidth": 2,
31
- },
32
- ],
33
- undefined,
34
- ]
35
- }
36
- themeFocused={false}
37
- themeState="default"
38
- />
39
- `;
40
-
41
- exports[`StyledBorder renders correctly with themeState disabled 1`] = `
42
- <View
43
- style={
44
- [
45
- [
46
- {
47
- "borderColor": "#bfc1c5",
48
- "borderRadius": 8,
49
- "borderWidth": 2,
50
- },
51
- ],
52
- undefined,
53
- ]
54
- }
55
- themeFocused={false}
56
- themeState="disabled"
57
- />
58
- `;
59
-
60
- exports[`StyledBorder renders correctly with themeState error 1`] = `
61
- <View
62
- style={
63
- [
64
- [
65
- {
66
- "borderColor": "#cb300a",
67
- "borderRadius": 8,
68
- "borderWidth": 2,
69
- },
70
- ],
71
- undefined,
72
- ]
73
- }
74
- themeFocused={false}
75
- themeState="error"
76
- />
77
- `;
78
-
79
- exports[`StyledBorder renders correctly with themeState filled 1`] = `
80
- <View
81
- style={
82
- [
83
- [
84
- {
85
- "borderColor": "#e8e9ea",
86
- "borderRadius": 8,
87
- "borderWidth": 2,
88
- },
89
- ],
90
- undefined,
91
- ]
92
- }
93
- themeFocused={false}
94
- themeState="filled"
95
- />
96
- `;
97
-
98
- exports[`StyledBorder renders correctly with themeState readonly 1`] = `
99
- <View
100
- style={
101
- [
102
- [
103
- {
104
- "borderColor": "#bfc1c5",
105
- "borderRadius": 8,
106
- "borderWidth": 2,
107
- },
108
- ],
109
- undefined,
110
- ]
111
- }
112
- themeFocused={false}
113
- themeState="readonly"
114
- />
115
- `;
116
-
117
- exports[`StyledCharacterCount renders correctly with themeState default 1`] = `
118
- <Text
119
- allowFontScaling={false}
120
- style={
121
- [
122
- [
123
- {
124
- "color": "#001f23",
125
- "fontFamily": "BeVietnamPro-Regular",
126
- "fontSize": 11.76923076923077,
127
- "letterSpacing": 0.36,
128
- "lineHeight": 15.76923076923077,
129
- },
130
- ],
131
- [
132
- [
133
- {
134
- "color": "#001f23",
135
- "flex": 1,
136
- "flexGrow": 1,
137
- "textAlign": "right",
138
- },
139
- ],
140
- undefined,
141
- ],
142
- ]
143
- }
144
- themeFontWeight="regular"
145
- themeIntent="body"
146
- themeIsItalic={false}
147
- themeState="default"
148
- >
149
- 100/255
150
- </Text>
151
- `;
152
-
153
- exports[`StyledCharacterCount renders correctly with themeState disabled 1`] = `
154
- <Text
155
- allowFontScaling={false}
156
- style={
157
- [
158
- [
159
- {
160
- "color": "#001f23",
161
- "fontFamily": "BeVietnamPro-Regular",
162
- "fontSize": 11.76923076923077,
163
- "letterSpacing": 0.36,
164
- "lineHeight": 15.76923076923077,
165
- },
166
- ],
167
- [
168
- [
169
- {
170
- "color": "#bfc1c5",
171
- "flex": 1,
172
- "flexGrow": 1,
173
- "textAlign": "right",
174
- },
175
- ],
176
- undefined,
177
- ],
178
- ]
179
- }
180
- themeFontWeight="regular"
181
- themeIntent="body"
182
- themeIsItalic={false}
183
- themeState="disabled"
184
- >
185
- 100/255
186
- </Text>
187
- `;
188
-
189
- exports[`StyledCharacterCount renders correctly with themeState error 1`] = `
190
- <Text
191
- allowFontScaling={false}
192
- style={
193
- [
194
- [
195
- {
196
- "color": "#001f23",
197
- "fontFamily": "BeVietnamPro-Regular",
198
- "fontSize": 11.76923076923077,
199
- "letterSpacing": 0.36,
200
- "lineHeight": 15.76923076923077,
201
- },
202
- ],
203
- [
204
- [
205
- {
206
- "color": "#cb300a",
207
- "flex": 1,
208
- "flexGrow": 1,
209
- "textAlign": "right",
210
- },
211
- ],
212
- undefined,
213
- ],
214
- ]
215
- }
216
- themeFontWeight="regular"
217
- themeIntent="body"
218
- themeIsItalic={false}
219
- themeState="error"
220
- >
221
- 100/255
222
- </Text>
223
- `;
224
-
225
- exports[`StyledCharacterCount renders correctly with themeState filled 1`] = `
226
- <Text
227
- allowFontScaling={false}
228
- style={
229
- [
230
- [
231
- {
232
- "color": "#001f23",
233
- "fontFamily": "BeVietnamPro-Regular",
234
- "fontSize": 11.76923076923077,
235
- "letterSpacing": 0.36,
236
- "lineHeight": 15.76923076923077,
237
- },
238
- ],
239
- [
240
- [
241
- {
242
- "color": "#001f23",
243
- "flex": 1,
244
- "flexGrow": 1,
245
- "textAlign": "right",
246
- },
247
- ],
248
- undefined,
249
- ],
250
- ]
251
- }
252
- themeFontWeight="regular"
253
- themeIntent="body"
254
- themeIsItalic={false}
255
- themeState="filled"
256
- >
257
- 100/255
258
- </Text>
259
- `;
260
-
261
- exports[`StyledCharacterCount renders correctly with themeState readonly 1`] = `
262
- <Text
263
- allowFontScaling={false}
264
- style={
265
- [
266
- [
267
- {
268
- "color": "#001f23",
269
- "fontFamily": "BeVietnamPro-Regular",
270
- "fontSize": 11.76923076923077,
271
- "letterSpacing": 0.36,
272
- "lineHeight": 15.76923076923077,
273
- },
274
- ],
275
- [
276
- [
277
- {
278
- "color": "#808f91",
279
- "flex": 1,
280
- "flexGrow": 1,
281
- "textAlign": "right",
282
- },
283
- ],
284
- undefined,
285
- ],
286
- ]
287
- }
288
- themeFontWeight="regular"
289
- themeIntent="body"
290
- themeIsItalic={false}
291
- themeState="readonly"
292
- >
293
- 100/255
294
- </Text>
295
- `;
296
-
297
- exports[`StyledError renders correctly 1`] = `
298
- <Text
299
- allowFontScaling={false}
300
- style={
301
- [
302
- [
303
- {
304
- "color": "#001f23",
305
- "fontFamily": "BeVietnamPro-Regular",
306
- "fontSize": 11.76923076923077,
307
- "letterSpacing": 0.36,
308
- "lineHeight": 15.76923076923077,
309
- },
310
- ],
311
- [
312
- [
313
- {
314
- "color": "#cb300a",
315
- "marginLeft": 3.9230769230769234,
316
- },
317
- ],
318
- undefined,
319
- ],
320
- ]
321
- }
322
- themeFontWeight="regular"
323
- themeIntent="body"
324
- themeIsItalic={false}
325
- >
326
- must not exceed character limit
327
- </Text>
328
- `;
329
-
330
- exports[`StyledErrorRow renders correctly 1`] = `
331
- <View
332
- style={
333
- [
334
- [
335
- {
336
- "alignItems": "center",
337
- "flex": 1,
338
- "flexDirection": "row",
339
- "flexGrow": 4,
340
- "marginRight": 3.9230769230769234,
341
- },
342
- ],
343
- undefined,
344
- ]
345
- }
346
- />
347
- `;
348
-
349
- exports[`StyledHelperText renders correctly 1`] = `
350
- <Text
351
- allowFontScaling={false}
352
- style={
353
- [
354
- [
355
- {
356
- "color": "#001f23",
357
- "fontFamily": "BeVietnamPro-Regular",
358
- "fontSize": 11.76923076923077,
359
- "letterSpacing": 0.36,
360
- "lineHeight": 15.76923076923077,
361
- },
362
- ],
363
- undefined,
364
- ]
365
- }
366
- themeFontWeight="regular"
367
- themeIntent="body"
368
- themeIsItalic={false}
369
- >
370
- helper text
371
- </Text>
372
- `;
373
-
374
- exports[`StyledLabel renders correctly with themeState default 1`] = `
375
- <Text
376
- allowFontScaling={false}
377
- style={
378
- [
379
- [
380
- {
381
- "color": "#001f23",
382
- "fontFamily": "BeVietnamPro-Regular",
383
- "fontSize": 11.76923076923077,
384
- "letterSpacing": 0.36,
385
- "lineHeight": 15.76923076923077,
386
- },
387
- ],
388
- [
389
- [
390
- {
391
- "color": "#808f91",
392
- },
393
- ],
394
- undefined,
395
- ],
396
- ]
397
- }
398
- themeFontWeight="regular"
399
- themeIntent="body"
400
- themeIsItalic={false}
401
- themeState="default"
402
- >
403
- Label
404
- </Text>
405
- `;
406
-
407
- exports[`StyledLabel renders correctly with themeState disabled 1`] = `
408
- <Text
409
- allowFontScaling={false}
410
- style={
411
- [
412
- [
413
- {
414
- "color": "#001f23",
415
- "fontFamily": "BeVietnamPro-Regular",
416
- "fontSize": 11.76923076923077,
417
- "letterSpacing": 0.36,
418
- "lineHeight": 15.76923076923077,
419
- },
420
- ],
421
- [
422
- [
423
- {
424
- "color": "#bfc1c5",
425
- },
426
- ],
427
- undefined,
428
- ],
429
- ]
430
- }
431
- themeFontWeight="regular"
432
- themeIntent="body"
433
- themeIsItalic={false}
434
- themeState="disabled"
435
- >
436
- Label
437
- </Text>
438
- `;
439
-
440
- exports[`StyledLabel renders correctly with themeState error 1`] = `
441
- <Text
442
- allowFontScaling={false}
443
- style={
444
- [
445
- [
446
- {
447
- "color": "#001f23",
448
- "fontFamily": "BeVietnamPro-Regular",
449
- "fontSize": 11.76923076923077,
450
- "letterSpacing": 0.36,
451
- "lineHeight": 15.76923076923077,
452
- },
453
- ],
454
- [
455
- [
456
- {
457
- "color": "#cb300a",
458
- },
459
- ],
460
- undefined,
461
- ],
462
- ]
463
- }
464
- themeFontWeight="regular"
465
- themeIntent="body"
466
- themeIsItalic={false}
467
- themeState="error"
468
- >
469
- Label
470
- </Text>
471
- `;
472
-
473
- exports[`StyledLabel renders correctly with themeState filled 1`] = `
474
- <Text
475
- allowFontScaling={false}
476
- style={
477
- [
478
- [
479
- {
480
- "color": "#001f23",
481
- "fontFamily": "BeVietnamPro-Regular",
482
- "fontSize": 11.76923076923077,
483
- "letterSpacing": 0.36,
484
- "lineHeight": 15.76923076923077,
485
- },
486
- ],
487
- [
488
- [
489
- {
490
- "color": "#808f91",
491
- },
492
- ],
493
- undefined,
494
- ],
495
- ]
496
- }
497
- themeFontWeight="regular"
498
- themeIntent="body"
499
- themeIsItalic={false}
500
- themeState="filled"
501
- >
502
- Label
503
- </Text>
504
- `;
505
-
506
- exports[`StyledLabel renders correctly with themeState readonly 1`] = `
507
- <Text
508
- allowFontScaling={false}
509
- style={
510
- [
511
- [
512
- {
513
- "color": "#001f23",
514
- "fontFamily": "BeVietnamPro-Regular",
515
- "fontSize": 11.76923076923077,
516
- "letterSpacing": 0.36,
517
- "lineHeight": 15.76923076923077,
518
- },
519
- ],
520
- [
521
- [
522
- {
523
- "color": "#808f91",
524
- },
525
- ],
526
- undefined,
527
- ],
528
- ]
529
- }
530
- themeFontWeight="regular"
531
- themeIntent="body"
532
- themeIsItalic={false}
533
- themeState="readonly"
534
- >
535
- Label
536
- </Text>
537
- `;
538
-
539
- exports[`StyledTextInput renders correctly with $themeState state 1`] = `
540
- <TextInput
541
- style={
542
- [
543
- [
544
- {
545
- "flexGrow": 2,
546
- "fontFamily": "BeVietnamPro-Regular",
547
- "fontSize": 15.692307692307693,
548
- "height": undefined,
549
- "maxHeight": 141.23076923076923,
550
- "minHeight": 23.53846153846154,
551
- "paddingVertical": 0,
552
- "textAlignVertical": "center",
553
- },
554
- ],
555
- undefined,
556
- ]
557
- }
558
- themeVariant="text"
559
- />
560
- `;
561
-
562
- exports[`StyledTextInput renders correctly with $themeState state 2`] = `
563
- <TextInput
564
- style={
565
- [
566
- [
567
- {
568
- "flexGrow": 2,
569
- "fontFamily": "BeVietnamPro-Regular",
570
- "fontSize": 15.692307692307693,
571
- "height": 141.23076923076923,
572
- "maxHeight": 141.23076923076923,
573
- "minHeight": 23.53846153846154,
574
- "paddingVertical": 0,
575
- "textAlignVertical": "top",
576
- },
577
- ],
578
- undefined,
579
- ]
580
- }
581
- themeVariant="textarea"
582
- />
583
- `;