@hero-design/rn-work-uikit 1.8.1 → 1.9.1
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/.cursor/rules/performance-optimization.mdc +64 -0
- package/.cursor/rules/rn-work-uikit-rules.mdc +202 -0
- package/.cursor/rules/testing-rules.mdc +114 -0
- package/CHANGELOG.md +23 -0
- package/assets/fonts/BeVietnamPro-BoldItalic.ttf +0 -0
- package/assets/fonts/BeVietnamPro-LightItalic.ttf +0 -0
- package/assets/fonts/BeVietnamPro-RegularItalic.ttf +0 -0
- package/assets/fonts/BeVietnamPro-SemiBoldItalic.ttf +0 -0
- package/assets/fonts/Saiga-LightItalic.otf +0 -0
- package/assets/fonts/Saiga-MediumItalic.otf +0 -0
- package/assets/fonts/Saiga-RegularItalic.otf +0 -0
- package/assets/fonts/hero-icons-mobile.ttf +0 -0
- package/lib/index.js +460 -389
- package/package.json +6 -7
- package/src/components/DatePicker/__tests__/__snapshots__/index.spec.tsx.snap +15 -5
- package/src/components/FormGroup/__tests__/__snapshots__/index.spec.tsx.snap +5 -0
- package/src/components/Select/__tests__/__snapshots__/index.spec.tsx.snap +11 -4
- package/src/components/TextInput/__tests__/__snapshots__/StyledTextInput.spec.tsx.snap +12 -0
- package/src/components/TextInput/__tests__/__snapshots__/index.spec.tsx.snap +56 -20
- package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +24 -10
- package/.cursorrules +0 -57
- package/src/utils/hooks.ts +0 -10
- package/stats/1.8.1/rn-work-uikit-stats.html +0 -4844
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hero-design/rn-work-uikit",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.9.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "es/index.js",
|
|
7
7
|
"types": "types/index.d.ts",
|
|
8
8
|
"description": "EH Work specific UI components built on top of @hero-design/rn",
|
|
9
9
|
"scripts": {
|
|
10
|
-
"lint": "eslint src",
|
|
10
|
+
"lint": "eslint src --quiet",
|
|
11
11
|
"type-check": "tsc --noEmit",
|
|
12
12
|
"test": "jest --runInBand",
|
|
13
13
|
"test:watch": "jest --runInBand --watch",
|
|
@@ -21,13 +21,12 @@
|
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@emotion/native": "^11.9.3",
|
|
24
|
-
"@emotion/primitives-core": "11.0.0",
|
|
25
24
|
"@emotion/react": "^11.9.3",
|
|
26
|
-
"@hero-design/rn": "^8.
|
|
25
|
+
"@hero-design/rn": "^8.112.0",
|
|
27
26
|
"hero-editor": "^1.17.0"
|
|
28
27
|
},
|
|
29
28
|
"peerDependencies": {
|
|
30
|
-
"@hero-design/react-native-month-year-picker": "^8.43.
|
|
29
|
+
"@hero-design/react-native-month-year-picker": "^8.43.2",
|
|
31
30
|
"@ptomasroos/react-native-multi-slider": "^2.2.2",
|
|
32
31
|
"@react-native-community/datetimepicker": "^3.5.2 || ^7.6.1",
|
|
33
32
|
"@react-native-community/slider": "^4.5.1",
|
|
@@ -53,8 +52,8 @@
|
|
|
53
52
|
"@eslint/compat": "^1.1.1",
|
|
54
53
|
"@eslint/eslintrc": "^3.1.0",
|
|
55
54
|
"@eslint/js": "^9.8.0",
|
|
56
|
-
"@hero-design/eslint-plugin": "9.2.
|
|
57
|
-
"@hero-design/react-native-month-year-picker": "^8.43.
|
|
55
|
+
"@hero-design/eslint-plugin": "9.2.1",
|
|
56
|
+
"@hero-design/react-native-month-year-picker": "^8.43.2",
|
|
58
57
|
"@ptomasroos/react-native-multi-slider": "^2.2.2",
|
|
59
58
|
"@react-native-community/cli": "15.0.1",
|
|
60
59
|
"@react-native-community/cli-platform-android": "15.0.1",
|
|
@@ -161,6 +161,7 @@ exports[`DatePicker renders correctly (snapshot) 1`] = `
|
|
|
161
161
|
testID="input-label-text"
|
|
162
162
|
themeFontWeight="regular"
|
|
163
163
|
themeIntent="body"
|
|
164
|
+
themeIsItalic={false}
|
|
164
165
|
themeState="filled"
|
|
165
166
|
>
|
|
166
167
|
Start date
|
|
@@ -190,6 +191,7 @@ exports[`DatePicker renders correctly (snapshot) 1`] = `
|
|
|
190
191
|
}
|
|
191
192
|
themeFontWeight="regular"
|
|
192
193
|
themeIntent="body"
|
|
194
|
+
themeIsItalic={false}
|
|
193
195
|
themeState="filled"
|
|
194
196
|
>
|
|
195
197
|
(Optional)
|
|
@@ -326,7 +328,7 @@ exports[`DatePicker renders correctly (snapshot) 1`] = `
|
|
|
326
328
|
themeIntent="text"
|
|
327
329
|
themeSize="medium"
|
|
328
330
|
>
|
|
329
|
-
|
|
331
|
+
|
|
330
332
|
</Text>
|
|
331
333
|
</View>
|
|
332
334
|
</Pressable>
|
|
@@ -464,6 +466,7 @@ exports[`DatePicker renders correctly (snapshot) 1`] = `
|
|
|
464
466
|
]
|
|
465
467
|
}
|
|
466
468
|
themeIntent="body"
|
|
469
|
+
themeIsItalic={false}
|
|
467
470
|
themeTypeface="neutral"
|
|
468
471
|
themeVariant="regular-bold"
|
|
469
472
|
>
|
|
@@ -519,7 +522,7 @@ exports[`DatePicker renders correctly (snapshot) 1`] = `
|
|
|
519
522
|
themeIntent="text"
|
|
520
523
|
themeSize="xsmall"
|
|
521
524
|
>
|
|
522
|
-
|
|
525
|
+
|
|
523
526
|
</Text>
|
|
524
527
|
</TouchableOpacity>
|
|
525
528
|
</View>
|
|
@@ -636,6 +639,7 @@ exports[`DatePicker renders correctly (snapshot) 1`] = `
|
|
|
636
639
|
themeButtonVariant="text-primary"
|
|
637
640
|
themeIntent="body"
|
|
638
641
|
themeIsCompact={false}
|
|
642
|
+
themeIsItalic={false}
|
|
639
643
|
themeIsPressed={false}
|
|
640
644
|
themeTypeface="neutral"
|
|
641
645
|
themeVariant="regular-bold"
|
|
@@ -813,6 +817,7 @@ exports[`Dialog renders DatePickerAndroid when OS is android 1`] = `
|
|
|
813
817
|
testID="input-label-text"
|
|
814
818
|
themeFontWeight="regular"
|
|
815
819
|
themeIntent="body"
|
|
820
|
+
themeIsItalic={false}
|
|
816
821
|
themeState="filled"
|
|
817
822
|
>
|
|
818
823
|
Start date
|
|
@@ -842,6 +847,7 @@ exports[`Dialog renders DatePickerAndroid when OS is android 1`] = `
|
|
|
842
847
|
}
|
|
843
848
|
themeFontWeight="regular"
|
|
844
849
|
themeIntent="body"
|
|
850
|
+
themeIsItalic={false}
|
|
845
851
|
themeState="filled"
|
|
846
852
|
>
|
|
847
853
|
(Optional)
|
|
@@ -978,7 +984,7 @@ exports[`Dialog renders DatePickerAndroid when OS is android 1`] = `
|
|
|
978
984
|
themeIntent="text"
|
|
979
985
|
themeSize="medium"
|
|
980
986
|
>
|
|
981
|
-
|
|
987
|
+
|
|
982
988
|
</Text>
|
|
983
989
|
</View>
|
|
984
990
|
</Pressable>
|
|
@@ -1147,6 +1153,7 @@ exports[`Dialog renders DatePickerIOS when OS is iOS 1`] = `
|
|
|
1147
1153
|
testID="input-label-text"
|
|
1148
1154
|
themeFontWeight="regular"
|
|
1149
1155
|
themeIntent="body"
|
|
1156
|
+
themeIsItalic={false}
|
|
1150
1157
|
themeState="filled"
|
|
1151
1158
|
>
|
|
1152
1159
|
Start date
|
|
@@ -1176,6 +1183,7 @@ exports[`Dialog renders DatePickerIOS when OS is iOS 1`] = `
|
|
|
1176
1183
|
}
|
|
1177
1184
|
themeFontWeight="regular"
|
|
1178
1185
|
themeIntent="body"
|
|
1186
|
+
themeIsItalic={false}
|
|
1179
1187
|
themeState="filled"
|
|
1180
1188
|
>
|
|
1181
1189
|
(Optional)
|
|
@@ -1312,7 +1320,7 @@ exports[`Dialog renders DatePickerIOS when OS is iOS 1`] = `
|
|
|
1312
1320
|
themeIntent="text"
|
|
1313
1321
|
themeSize="medium"
|
|
1314
1322
|
>
|
|
1315
|
-
|
|
1323
|
+
|
|
1316
1324
|
</Text>
|
|
1317
1325
|
</View>
|
|
1318
1326
|
</Pressable>
|
|
@@ -1450,6 +1458,7 @@ exports[`Dialog renders DatePickerIOS when OS is iOS 1`] = `
|
|
|
1450
1458
|
]
|
|
1451
1459
|
}
|
|
1452
1460
|
themeIntent="body"
|
|
1461
|
+
themeIsItalic={false}
|
|
1453
1462
|
themeTypeface="neutral"
|
|
1454
1463
|
themeVariant="regular-bold"
|
|
1455
1464
|
>
|
|
@@ -1505,7 +1514,7 @@ exports[`Dialog renders DatePickerIOS when OS is iOS 1`] = `
|
|
|
1505
1514
|
themeIntent="text"
|
|
1506
1515
|
themeSize="xsmall"
|
|
1507
1516
|
>
|
|
1508
|
-
|
|
1517
|
+
|
|
1509
1518
|
</Text>
|
|
1510
1519
|
</TouchableOpacity>
|
|
1511
1520
|
</View>
|
|
@@ -1622,6 +1631,7 @@ exports[`Dialog renders DatePickerIOS when OS is iOS 1`] = `
|
|
|
1622
1631
|
themeButtonVariant="text-primary"
|
|
1623
1632
|
themeIntent="body"
|
|
1624
1633
|
themeIsCompact={false}
|
|
1634
|
+
themeIsItalic={false}
|
|
1625
1635
|
themeIsPressed={false}
|
|
1626
1636
|
themeTypeface="neutral"
|
|
1627
1637
|
themeVariant="regular-bold"
|
|
@@ -158,6 +158,7 @@ exports[`FormGroup should render: xxx 1`] = `
|
|
|
158
158
|
testID="input-label-text"
|
|
159
159
|
themeFontWeight="regular"
|
|
160
160
|
themeIntent="body"
|
|
161
|
+
themeIsItalic={false}
|
|
161
162
|
themeState="filled"
|
|
162
163
|
>
|
|
163
164
|
Text Input 1
|
|
@@ -418,6 +419,7 @@ exports[`FormGroup should render: xxx 1`] = `
|
|
|
418
419
|
testID="input-label-text-text-input-2"
|
|
419
420
|
themeFontWeight="regular"
|
|
420
421
|
themeIntent="body"
|
|
422
|
+
themeIsItalic={false}
|
|
421
423
|
themeState="error"
|
|
422
424
|
>
|
|
423
425
|
Text Input 2
|
|
@@ -447,6 +449,7 @@ exports[`FormGroup should render: xxx 1`] = `
|
|
|
447
449
|
}
|
|
448
450
|
themeFontWeight="regular"
|
|
449
451
|
themeIntent="body"
|
|
452
|
+
themeIsItalic={false}
|
|
450
453
|
themeState="error"
|
|
451
454
|
>
|
|
452
455
|
(Optional)
|
|
@@ -618,6 +621,7 @@ exports[`FormGroup should render: xxx 1`] = `
|
|
|
618
621
|
testID="input-error-message"
|
|
619
622
|
themeFontWeight="regular"
|
|
620
623
|
themeIntent="body"
|
|
624
|
+
themeIsItalic={false}
|
|
621
625
|
>
|
|
622
626
|
This is an error
|
|
623
627
|
</Text>
|
|
@@ -786,6 +790,7 @@ exports[`FormGroup should render: xxx 1`] = `
|
|
|
786
790
|
testID="input-label-text"
|
|
787
791
|
themeFontWeight="regular"
|
|
788
792
|
themeIntent="body"
|
|
793
|
+
themeIsItalic={false}
|
|
789
794
|
themeState="filled"
|
|
790
795
|
>
|
|
791
796
|
Text Input 3
|
|
@@ -163,6 +163,7 @@ exports[`MultiSelect renders correctly (snapshot) 1`] = `
|
|
|
163
163
|
testID="input-label-text"
|
|
164
164
|
themeFontWeight="regular"
|
|
165
165
|
themeIntent="body"
|
|
166
|
+
themeIsItalic={false}
|
|
166
167
|
themeState="filled"
|
|
167
168
|
>
|
|
168
169
|
Select Label
|
|
@@ -192,6 +193,7 @@ exports[`MultiSelect renders correctly (snapshot) 1`] = `
|
|
|
192
193
|
}
|
|
193
194
|
themeFontWeight="regular"
|
|
194
195
|
themeIntent="body"
|
|
196
|
+
themeIsItalic={false}
|
|
195
197
|
themeState="filled"
|
|
196
198
|
>
|
|
197
199
|
(Optional)
|
|
@@ -330,7 +332,7 @@ exports[`MultiSelect renders correctly (snapshot) 1`] = `
|
|
|
330
332
|
themeIntent="text"
|
|
331
333
|
themeSize="medium"
|
|
332
334
|
>
|
|
333
|
-
|
|
335
|
+
|
|
334
336
|
</Text>
|
|
335
337
|
</View>
|
|
336
338
|
</Pressable>
|
|
@@ -472,6 +474,7 @@ exports[`MultiSelect renders correctly (snapshot) 1`] = `
|
|
|
472
474
|
]
|
|
473
475
|
}
|
|
474
476
|
themeIntent="body"
|
|
477
|
+
themeIsItalic={false}
|
|
475
478
|
themeTypeface="neutral"
|
|
476
479
|
themeVariant="regular-bold"
|
|
477
480
|
>
|
|
@@ -527,7 +530,7 @@ exports[`MultiSelect renders correctly (snapshot) 1`] = `
|
|
|
527
530
|
themeIntent="text"
|
|
528
531
|
themeSize="xsmall"
|
|
529
532
|
>
|
|
530
|
-
|
|
533
|
+
|
|
531
534
|
</Text>
|
|
532
535
|
</TouchableOpacity>
|
|
533
536
|
</View>
|
|
@@ -683,6 +686,7 @@ exports[`MultiSelect renders correctly (snapshot) 1`] = `
|
|
|
683
686
|
themeButtonVariant="text-primary"
|
|
684
687
|
themeIntent="body"
|
|
685
688
|
themeIsCompact={false}
|
|
689
|
+
themeIsItalic={false}
|
|
686
690
|
themeIsPressed={false}
|
|
687
691
|
themeTypeface="neutral"
|
|
688
692
|
themeVariant="regular-bold"
|
|
@@ -862,6 +866,7 @@ exports[`Select renders correctly (snapshot) 1`] = `
|
|
|
862
866
|
testID="input-label-text"
|
|
863
867
|
themeFontWeight="regular"
|
|
864
868
|
themeIntent="body"
|
|
869
|
+
themeIsItalic={false}
|
|
865
870
|
themeState="filled"
|
|
866
871
|
>
|
|
867
872
|
Select Label
|
|
@@ -891,6 +896,7 @@ exports[`Select renders correctly (snapshot) 1`] = `
|
|
|
891
896
|
}
|
|
892
897
|
themeFontWeight="regular"
|
|
893
898
|
themeIntent="body"
|
|
899
|
+
themeIsItalic={false}
|
|
894
900
|
themeState="filled"
|
|
895
901
|
>
|
|
896
902
|
(Optional)
|
|
@@ -1029,7 +1035,7 @@ exports[`Select renders correctly (snapshot) 1`] = `
|
|
|
1029
1035
|
themeIntent="text"
|
|
1030
1036
|
themeSize="medium"
|
|
1031
1037
|
>
|
|
1032
|
-
|
|
1038
|
+
|
|
1033
1039
|
</Text>
|
|
1034
1040
|
</View>
|
|
1035
1041
|
</Pressable>
|
|
@@ -1171,6 +1177,7 @@ exports[`Select renders correctly (snapshot) 1`] = `
|
|
|
1171
1177
|
]
|
|
1172
1178
|
}
|
|
1173
1179
|
themeIntent="body"
|
|
1180
|
+
themeIsItalic={false}
|
|
1174
1181
|
themeTypeface="neutral"
|
|
1175
1182
|
themeVariant="regular-bold"
|
|
1176
1183
|
>
|
|
@@ -1226,7 +1233,7 @@ exports[`Select renders correctly (snapshot) 1`] = `
|
|
|
1226
1233
|
themeIntent="text"
|
|
1227
1234
|
themeSize="xsmall"
|
|
1228
1235
|
>
|
|
1229
|
-
|
|
1236
|
+
|
|
1230
1237
|
</Text>
|
|
1231
1238
|
</TouchableOpacity>
|
|
1232
1239
|
</View>
|
|
@@ -143,6 +143,7 @@ exports[`StyledCharacterCount renders correctly with themeState default 1`] = `
|
|
|
143
143
|
}
|
|
144
144
|
themeFontWeight="regular"
|
|
145
145
|
themeIntent="body"
|
|
146
|
+
themeIsItalic={false}
|
|
146
147
|
themeState="default"
|
|
147
148
|
>
|
|
148
149
|
100/255
|
|
@@ -178,6 +179,7 @@ exports[`StyledCharacterCount renders correctly with themeState disabled 1`] = `
|
|
|
178
179
|
}
|
|
179
180
|
themeFontWeight="regular"
|
|
180
181
|
themeIntent="body"
|
|
182
|
+
themeIsItalic={false}
|
|
181
183
|
themeState="disabled"
|
|
182
184
|
>
|
|
183
185
|
100/255
|
|
@@ -213,6 +215,7 @@ exports[`StyledCharacterCount renders correctly with themeState error 1`] = `
|
|
|
213
215
|
}
|
|
214
216
|
themeFontWeight="regular"
|
|
215
217
|
themeIntent="body"
|
|
218
|
+
themeIsItalic={false}
|
|
216
219
|
themeState="error"
|
|
217
220
|
>
|
|
218
221
|
100/255
|
|
@@ -248,6 +251,7 @@ exports[`StyledCharacterCount renders correctly with themeState filled 1`] = `
|
|
|
248
251
|
}
|
|
249
252
|
themeFontWeight="regular"
|
|
250
253
|
themeIntent="body"
|
|
254
|
+
themeIsItalic={false}
|
|
251
255
|
themeState="filled"
|
|
252
256
|
>
|
|
253
257
|
100/255
|
|
@@ -283,6 +287,7 @@ exports[`StyledCharacterCount renders correctly with themeState readonly 1`] = `
|
|
|
283
287
|
}
|
|
284
288
|
themeFontWeight="regular"
|
|
285
289
|
themeIntent="body"
|
|
290
|
+
themeIsItalic={false}
|
|
286
291
|
themeState="readonly"
|
|
287
292
|
>
|
|
288
293
|
100/255
|
|
@@ -316,6 +321,7 @@ exports[`StyledError renders correctly 1`] = `
|
|
|
316
321
|
}
|
|
317
322
|
themeFontWeight="regular"
|
|
318
323
|
themeIntent="body"
|
|
324
|
+
themeIsItalic={false}
|
|
319
325
|
>
|
|
320
326
|
must not exceed character limit
|
|
321
327
|
</Text>
|
|
@@ -359,6 +365,7 @@ exports[`StyledHelperText renders correctly 1`] = `
|
|
|
359
365
|
}
|
|
360
366
|
themeFontWeight="regular"
|
|
361
367
|
themeIntent="body"
|
|
368
|
+
themeIsItalic={false}
|
|
362
369
|
>
|
|
363
370
|
helper text
|
|
364
371
|
</Text>
|
|
@@ -390,6 +397,7 @@ exports[`StyledLabel renders correctly with themeState default 1`] = `
|
|
|
390
397
|
}
|
|
391
398
|
themeFontWeight="regular"
|
|
392
399
|
themeIntent="body"
|
|
400
|
+
themeIsItalic={false}
|
|
393
401
|
themeState="default"
|
|
394
402
|
>
|
|
395
403
|
Label
|
|
@@ -422,6 +430,7 @@ exports[`StyledLabel renders correctly with themeState disabled 1`] = `
|
|
|
422
430
|
}
|
|
423
431
|
themeFontWeight="regular"
|
|
424
432
|
themeIntent="body"
|
|
433
|
+
themeIsItalic={false}
|
|
425
434
|
themeState="disabled"
|
|
426
435
|
>
|
|
427
436
|
Label
|
|
@@ -454,6 +463,7 @@ exports[`StyledLabel renders correctly with themeState error 1`] = `
|
|
|
454
463
|
}
|
|
455
464
|
themeFontWeight="regular"
|
|
456
465
|
themeIntent="body"
|
|
466
|
+
themeIsItalic={false}
|
|
457
467
|
themeState="error"
|
|
458
468
|
>
|
|
459
469
|
Label
|
|
@@ -486,6 +496,7 @@ exports[`StyledLabel renders correctly with themeState filled 1`] = `
|
|
|
486
496
|
}
|
|
487
497
|
themeFontWeight="regular"
|
|
488
498
|
themeIntent="body"
|
|
499
|
+
themeIsItalic={false}
|
|
489
500
|
themeState="filled"
|
|
490
501
|
>
|
|
491
502
|
Label
|
|
@@ -518,6 +529,7 @@ exports[`StyledLabel renders correctly with themeState readonly 1`] = `
|
|
|
518
529
|
}
|
|
519
530
|
themeFontWeight="regular"
|
|
520
531
|
themeIntent="body"
|
|
532
|
+
themeIsItalic={false}
|
|
521
533
|
themeState="readonly"
|
|
522
534
|
>
|
|
523
535
|
Label
|