@hero-design/rn 8.109.2 → 8.110.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.
Files changed (50) hide show
  1. package/.turbo/turbo-build.log +5 -5
  2. package/CHANGELOG.md +12 -0
  3. package/es/index.js +2142 -1959
  4. package/lib/index.js +2142 -1959
  5. package/package.json +8 -8
  6. package/src/components/Accordion/__tests__/__snapshots__/AccordionItem.spec.tsx.snap +40 -24
  7. package/src/components/Accordion/__tests__/__snapshots__/index.spec.tsx.snap +60 -36
  8. package/src/components/Accordion/index.tsx +6 -1
  9. package/src/components/AppCue/__tests__/__snapshots__/StyledAppCue.tsx.snap +121 -97
  10. package/src/components/BottomSheet/__tests__/__snapshots__/index.spec.tsx.snap +6 -3
  11. package/src/components/Button/__tests__/__snapshots__/Button.spec.tsx.snap +18 -18
  12. package/src/components/Chip/index.tsx +6 -0
  13. package/src/components/Collapse/__tests__/__snapshots__/StyledCollapse.spec.tsx.snap +8 -5
  14. package/src/components/Collapse/__tests__/__snapshots__/index.spec.tsx.snap +20 -12
  15. package/src/components/Drawer/__tests__/__snapshots__/index.spec.tsx.snap +13 -9
  16. package/src/components/PinInput/index.tsx +6 -1
  17. package/src/components/Radio/RadioGroup.tsx +6 -1
  18. package/src/components/Rate/__tests__/__snapshots__/index.spec.tsx.snap +84 -48
  19. package/src/components/RichTextEditor/BaseRichTextEditor.tsx +17 -0
  20. package/src/components/RichTextEditor/EditorToolbar.tsx +18 -59
  21. package/src/components/RichTextEditor/__tests__/EditorToolbar.spec.tsx +31 -10
  22. package/src/components/RichTextEditor/__tests__/RichTextEditor.spec.tsx +22 -0
  23. package/src/components/RichTextEditor/__tests__/__snapshots__/RichTextEditor.spec.tsx.snap +8 -0
  24. package/src/components/RichTextEditor/constants.ts +4 -0
  25. package/src/components/RichTextEditor/hooks/useRichTextEditorEvents.ts +22 -3
  26. package/src/components/Search/SearchOneLine.tsx +6 -0
  27. package/src/components/Search/SearchTwoLine.tsx +6 -1
  28. package/src/components/Select/MultiSelect/__tests__/__snapshots__/index.spec.tsx.snap +6 -3
  29. package/src/components/Select/SingleSelect/__tests__/__snapshots__/index.spec.tsx.snap +6 -3
  30. package/src/components/Switch/__tests__/__snapshots__/StyledSwitch.spec.tsx.snap +9 -6
  31. package/src/components/Tabs/__tests__/__snapshots__/ScrollableTabs.spec.tsx.snap +210 -138
  32. package/src/components/Tabs/__tests__/__snapshots__/ScrollableTabsHeader.spec.tsx.snap +98 -62
  33. package/src/components/Toolbar/ToolbarGroup.tsx +10 -2
  34. package/src/components/Toolbar/__tests__/ToolbarGroup.spec.tsx +34 -1
  35. package/src/components/Toolbar/__tests__/__snapshots__/ToolbarGroup.spec.tsx.snap +3 -0
  36. package/stats/8.109.2/rn-stats.html +1 -3
  37. package/stats/8.110.0/rn-stats.html +4844 -0
  38. package/stats/8.110.1/rn-stats.html +4844 -0
  39. package/types/components/Accordion/index.d.ts +5 -1
  40. package/types/components/Chip/index.d.ts +5 -1
  41. package/types/components/PinInput/index.d.ts +4 -0
  42. package/types/components/Radio/RadioGroup.d.ts +5 -1
  43. package/types/components/Radio/index.d.ts +1 -1
  44. package/types/components/RichTextEditor/constants.d.ts +6 -2
  45. package/types/components/RichTextEditor/hooks/useRichTextEditorEvents.d.ts +17 -2
  46. package/types/components/RichTextEditor/index.d.ts +54 -2
  47. package/types/components/Search/SearchOneLine.d.ts +4 -0
  48. package/types/components/Search/SearchTwoLine.d.ts +4 -0
  49. package/types/components/Toolbar/ToolbarGroup.d.ts +5 -1
  50. package/types/components/Toolbar/index.d.ts +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hero-design/rn",
3
- "version": "8.109.2",
3
+ "version": "8.110.1",
4
4
  "license": "MIT",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",
@@ -25,7 +25,7 @@
25
25
  "@hero-design/colors": "8.46.2",
26
26
  "d3": "^7.8.5",
27
27
  "date-fns": "^2.30.0",
28
- "hero-editor": "^1.16.0",
28
+ "hero-editor": "^1.17.0",
29
29
  "nanoid": "^5.0.9"
30
30
  },
31
31
  "peerDependencies": {
@@ -34,7 +34,7 @@
34
34
  "@react-native-community/datetimepicker": "^3.5.2 || ^7.6.1",
35
35
  "@react-native-community/slider": "^4.5.1",
36
36
  "react": "18.3.1",
37
- "react-native": "0.76.9",
37
+ "react-native": "0.77.3 || 0.76.9",
38
38
  "react-native-gesture-handler": "~2.20.2",
39
39
  "react-native-linear-gradient": "^2.8.3",
40
40
  "react-native-pager-view": "^6.7.0",
@@ -64,10 +64,10 @@
64
64
  "@react-native-community/cli-platform-ios": "15.0.1",
65
65
  "@react-native-community/datetimepicker": "8.2.0",
66
66
  "@react-native-community/slider": "^4.5.1",
67
- "@react-native/babel-preset": "0.76.9",
68
- "@react-native/eslint-config": "0.76.9",
69
- "@react-native/metro-config": "0.76.9",
70
- "@react-native/typescript-config": "0.76.9",
67
+ "@react-native/babel-preset": "0.77.3",
68
+ "@react-native/eslint-config": "0.77.3",
69
+ "@react-native/metro-config": "0.77.3",
70
+ "@react-native/typescript-config": "0.77.3",
71
71
  "@rollup/plugin-babel": "^6.0.4",
72
72
  "@rollup/plugin-commonjs": "^28.0.1",
73
73
  "@rollup/plugin-json": "^6.1.0",
@@ -104,7 +104,7 @@
104
104
  "prettier-config-hd": "8.42.4",
105
105
  "react": "18.3.1",
106
106
  "react-dom": "^18.2.0",
107
- "react-native": "0.76.9",
107
+ "react-native": "0.77.3",
108
108
  "react-native-gesture-handler": "~2.20.2",
109
109
  "react-native-linear-gradient": "2.8.3",
110
110
  "react-native-pager-view": "6.5.1",
@@ -96,12 +96,16 @@ exports[`AccordionItem renders correctly when header is an element 1`] = `
96
96
  collapsable={false}
97
97
  onLayout={[Function]}
98
98
  style={
99
- {
100
- "height": 0,
101
- "margin": 0,
102
- "overflow": "hidden",
103
- "padding": 0,
104
- }
99
+ [
100
+ {
101
+ "margin": 0,
102
+ "overflow": "hidden",
103
+ "padding": 0,
104
+ },
105
+ {
106
+ "height": 0,
107
+ },
108
+ ]
105
109
  }
106
110
  >
107
111
  <View
@@ -274,12 +278,16 @@ exports[`AccordionItem renders correctly when header is string 1`] = `
274
278
  collapsable={false}
275
279
  onLayout={[Function]}
276
280
  style={
277
- {
278
- "height": 0,
279
- "margin": 0,
280
- "overflow": "hidden",
281
- "padding": 0,
282
- }
281
+ [
282
+ {
283
+ "margin": 0,
284
+ "overflow": "hidden",
285
+ "padding": 0,
286
+ },
287
+ {
288
+ "height": 0,
289
+ },
290
+ ]
283
291
  }
284
292
  >
285
293
  <View
@@ -452,12 +460,16 @@ exports[`AccordionItem renders correctly when open 1`] = `
452
460
  collapsable={false}
453
461
  onLayout={[Function]}
454
462
  style={
455
- {
456
- "height": 0,
457
- "margin": 0,
458
- "overflow": "hidden",
459
- "padding": 0,
460
- }
463
+ [
464
+ {
465
+ "margin": 0,
466
+ "overflow": "hidden",
467
+ "padding": 0,
468
+ },
469
+ {
470
+ "height": 0,
471
+ },
472
+ ]
461
473
  }
462
474
  >
463
475
  <View
@@ -630,12 +642,16 @@ exports[`AccordionItem renders correctly when variant is card 1`] = `
630
642
  collapsable={false}
631
643
  onLayout={[Function]}
632
644
  style={
633
- {
634
- "height": 0,
635
- "margin": 0,
636
- "overflow": "hidden",
637
- "padding": 0,
638
- }
645
+ [
646
+ {
647
+ "margin": 0,
648
+ "overflow": "hidden",
649
+ "padding": 0,
650
+ },
651
+ {
652
+ "height": 0,
653
+ },
654
+ ]
639
655
  }
640
656
  >
641
657
  <View
@@ -104,12 +104,16 @@ exports[`Accordion allows fully controlled 1`] = `
104
104
  collapsable={false}
105
105
  onLayout={[Function]}
106
106
  style={
107
- {
108
- "height": 0,
109
- "margin": 0,
110
- "overflow": "hidden",
111
- "padding": 0,
112
- }
107
+ [
108
+ {
109
+ "margin": 0,
110
+ "overflow": "hidden",
111
+ "padding": 0,
112
+ },
113
+ {
114
+ "height": 0,
115
+ },
116
+ ]
113
117
  }
114
118
  >
115
119
  <View
@@ -251,12 +255,16 @@ exports[`Accordion allows fully controlled 1`] = `
251
255
  collapsable={false}
252
256
  onLayout={[Function]}
253
257
  style={
254
- {
255
- "height": 0,
256
- "margin": 0,
257
- "overflow": "hidden",
258
- "padding": 0,
259
- }
258
+ [
259
+ {
260
+ "margin": 0,
261
+ "overflow": "hidden",
262
+ "padding": 0,
263
+ },
264
+ {
265
+ "height": 0,
266
+ },
267
+ ]
260
268
  }
261
269
  >
262
270
  <View
@@ -438,12 +446,16 @@ exports[`Accordion renders correctly 1`] = `
438
446
  collapsable={false}
439
447
  onLayout={[Function]}
440
448
  style={
441
- {
442
- "height": 0,
443
- "margin": 0,
444
- "overflow": "hidden",
445
- "padding": 0,
446
- }
449
+ [
450
+ {
451
+ "margin": 0,
452
+ "overflow": "hidden",
453
+ "padding": 0,
454
+ },
455
+ {
456
+ "height": 0,
457
+ },
458
+ ]
447
459
  }
448
460
  >
449
461
  <View
@@ -585,12 +597,16 @@ exports[`Accordion renders correctly 1`] = `
585
597
  collapsable={false}
586
598
  onLayout={[Function]}
587
599
  style={
588
- {
589
- "height": 0,
590
- "margin": 0,
591
- "overflow": "hidden",
592
- "padding": 0,
593
- }
600
+ [
601
+ {
602
+ "margin": 0,
603
+ "overflow": "hidden",
604
+ "padding": 0,
605
+ },
606
+ {
607
+ "height": 0,
608
+ },
609
+ ]
594
610
  }
595
611
  >
596
612
  <View
@@ -772,12 +788,16 @@ exports[`Accordion renders correctly when variant is card 1`] = `
772
788
  collapsable={false}
773
789
  onLayout={[Function]}
774
790
  style={
775
- {
776
- "height": 0,
777
- "margin": 0,
778
- "overflow": "hidden",
779
- "padding": 0,
780
- }
791
+ [
792
+ {
793
+ "margin": 0,
794
+ "overflow": "hidden",
795
+ "padding": 0,
796
+ },
797
+ {
798
+ "height": 0,
799
+ },
800
+ ]
781
801
  }
782
802
  >
783
803
  <View
@@ -930,12 +950,16 @@ exports[`Accordion renders correctly when variant is card 1`] = `
930
950
  collapsable={false}
931
951
  onLayout={[Function]}
932
952
  style={
933
- {
934
- "height": 0,
935
- "margin": 0,
936
- "overflow": "hidden",
937
- "padding": 0,
938
- }
953
+ [
954
+ {
955
+ "margin": 0,
956
+ "overflow": "hidden",
957
+ "padding": 0,
958
+ },
959
+ {
960
+ "height": 0,
961
+ },
962
+ ]
939
963
  }
940
964
  >
941
965
  <View
@@ -38,6 +38,10 @@ export interface AccordionProps<K extends Key> {
38
38
  * Testing id of the component.
39
39
  */
40
40
  testID?: string;
41
+ /**
42
+ * If true, indicates that the Accordion is accessible to screen readers.
43
+ */
44
+ accessible?: boolean;
41
45
  }
42
46
 
43
47
  const Accordion = <K extends Key>({
@@ -47,6 +51,7 @@ const Accordion = <K extends Key>({
47
51
  variant = 'default',
48
52
  style,
49
53
  testID,
54
+ accessible,
50
55
  }: AccordionProps<K>) => {
51
56
  const defaultValue = useMemo(
52
57
  () => (typeof activeItemKey === 'number' ? NaN : '') as K,
@@ -59,7 +64,7 @@ const Accordion = <K extends Key>({
59
64
  );
60
65
 
61
66
  return (
62
- <StyledWrapper style={style} testID={testID}>
67
+ <StyledWrapper style={style} testID={testID} accessible={accessible}>
63
68
  {items.map(({ key, ...props }, index) => {
64
69
  const open = _activeItemKey === key;
65
70
  return (
@@ -11,20 +11,23 @@ exports[`AppCue renders icon bottom correctly 1`] = `
11
11
  <View
12
12
  collapsable={false}
13
13
  style={
14
- {
15
- "alignItems": "center",
16
- "color": "#001f23",
17
- "display": "flex",
18
- "justifyContent": "center",
19
- "position": "absolute",
20
- "top": -12,
21
- "transform": [
22
- {
23
- "rotate": "180deg",
24
- },
25
- ],
26
- "width": "100%",
27
- }
14
+ [
15
+ {
16
+ "alignItems": "center",
17
+ "color": "#001f23",
18
+ "display": "flex",
19
+ "justifyContent": "center",
20
+ "position": "absolute",
21
+ "top": -12,
22
+ "transform": [
23
+ {
24
+ "rotate": "180deg",
25
+ },
26
+ ],
27
+ "width": "100%",
28
+ },
29
+ undefined,
30
+ ]
28
31
  }
29
32
  themePlacement="bottom"
30
33
  />
@@ -62,20 +65,23 @@ exports[`AppCue renders icon bottom-left correctly 1`] = `
62
65
  <View
63
66
  collapsable={false}
64
67
  style={
65
- {
66
- "alignItems": "center",
67
- "color": "#001f23",
68
- "display": "flex",
69
- "justifyContent": "center",
70
- "position": "absolute",
71
- "right": 12,
72
- "top": -12,
73
- "transform": [
74
- {
75
- "rotate": "180deg",
76
- },
77
- ],
78
- }
68
+ [
69
+ {
70
+ "alignItems": "center",
71
+ "color": "#001f23",
72
+ "display": "flex",
73
+ "justifyContent": "center",
74
+ "position": "absolute",
75
+ "right": 12,
76
+ "top": -12,
77
+ "transform": [
78
+ {
79
+ "rotate": "180deg",
80
+ },
81
+ ],
82
+ },
83
+ undefined,
84
+ ]
79
85
  }
80
86
  themePlacement="bottom-left"
81
87
  />
@@ -113,20 +119,23 @@ exports[`AppCue renders icon bottom-right correctly 1`] = `
113
119
  <View
114
120
  collapsable={false}
115
121
  style={
116
- {
117
- "alignItems": "center",
118
- "color": "#001f23",
119
- "display": "flex",
120
- "justifyContent": "center",
121
- "left": 12,
122
- "position": "absolute",
123
- "top": -12,
124
- "transform": [
125
- {
126
- "rotate": "180deg",
127
- },
128
- ],
129
- }
122
+ [
123
+ {
124
+ "alignItems": "center",
125
+ "color": "#001f23",
126
+ "display": "flex",
127
+ "justifyContent": "center",
128
+ "left": 12,
129
+ "position": "absolute",
130
+ "top": -12,
131
+ "transform": [
132
+ {
133
+ "rotate": "180deg",
134
+ },
135
+ ],
136
+ },
137
+ undefined,
138
+ ]
130
139
  }
131
140
  themePlacement="bottom-right"
132
141
  />
@@ -164,20 +173,23 @@ exports[`AppCue renders icon left correctly 1`] = `
164
173
  <View
165
174
  collapsable={false}
166
175
  style={
167
- {
168
- "alignItems": "center",
169
- "color": "#001f23",
170
- "display": "flex",
171
- "height": "100%",
172
- "justifyContent": "center",
173
- "position": "absolute",
174
- "right": -12,
175
- "transform": [
176
- {
177
- "rotate": "-90deg",
178
- },
179
- ],
180
- }
176
+ [
177
+ {
178
+ "alignItems": "center",
179
+ "color": "#001f23",
180
+ "display": "flex",
181
+ "height": "100%",
182
+ "justifyContent": "center",
183
+ "position": "absolute",
184
+ "right": -12,
185
+ "transform": [
186
+ {
187
+ "rotate": "-90deg",
188
+ },
189
+ ],
190
+ },
191
+ undefined,
192
+ ]
181
193
  }
182
194
  themePlacement="left"
183
195
  />
@@ -215,20 +227,23 @@ exports[`AppCue renders icon right correctly 1`] = `
215
227
  <View
216
228
  collapsable={false}
217
229
  style={
218
- {
219
- "alignItems": "center",
220
- "color": "#001f23",
221
- "display": "flex",
222
- "height": "100%",
223
- "justifyContent": "center",
224
- "left": -12,
225
- "position": "absolute",
226
- "transform": [
227
- {
228
- "rotate": "90deg",
229
- },
230
- ],
231
- }
230
+ [
231
+ {
232
+ "alignItems": "center",
233
+ "color": "#001f23",
234
+ "display": "flex",
235
+ "height": "100%",
236
+ "justifyContent": "center",
237
+ "left": -12,
238
+ "position": "absolute",
239
+ "transform": [
240
+ {
241
+ "rotate": "90deg",
242
+ },
243
+ ],
244
+ },
245
+ undefined,
246
+ ]
232
247
  }
233
248
  themePlacement="right"
234
249
  />
@@ -266,15 +281,18 @@ exports[`AppCue renders icon top correctly 1`] = `
266
281
  <View
267
282
  collapsable={false}
268
283
  style={
269
- {
270
- "alignItems": "center",
271
- "bottom": -12,
272
- "color": "#001f23",
273
- "display": "flex",
274
- "justifyContent": "center",
275
- "position": "absolute",
276
- "width": "100%",
277
- }
284
+ [
285
+ {
286
+ "alignItems": "center",
287
+ "bottom": -12,
288
+ "color": "#001f23",
289
+ "display": "flex",
290
+ "justifyContent": "center",
291
+ "position": "absolute",
292
+ "width": "100%",
293
+ },
294
+ undefined,
295
+ ]
278
296
  }
279
297
  themePlacement="top"
280
298
  />
@@ -312,15 +330,18 @@ exports[`AppCue renders icon top-left correctly 1`] = `
312
330
  <View
313
331
  collapsable={false}
314
332
  style={
315
- {
316
- "alignItems": "center",
317
- "bottom": -12,
318
- "color": "#001f23",
319
- "display": "flex",
320
- "justifyContent": "center",
321
- "position": "absolute",
322
- "right": 12,
323
- }
333
+ [
334
+ {
335
+ "alignItems": "center",
336
+ "bottom": -12,
337
+ "color": "#001f23",
338
+ "display": "flex",
339
+ "justifyContent": "center",
340
+ "position": "absolute",
341
+ "right": 12,
342
+ },
343
+ undefined,
344
+ ]
324
345
  }
325
346
  themePlacement="top-left"
326
347
  />
@@ -358,15 +379,18 @@ exports[`AppCue renders icon top-right correctly 1`] = `
358
379
  <View
359
380
  collapsable={false}
360
381
  style={
361
- {
362
- "alignItems": "center",
363
- "bottom": -12,
364
- "color": "#001f23",
365
- "display": "flex",
366
- "justifyContent": "center",
367
- "left": 12,
368
- "position": "absolute",
369
- }
382
+ [
383
+ {
384
+ "alignItems": "center",
385
+ "bottom": -12,
386
+ "color": "#001f23",
387
+ "display": "flex",
388
+ "justifyContent": "center",
389
+ "left": 12,
390
+ "position": "absolute",
391
+ },
392
+ undefined,
393
+ ]
370
394
  }
371
395
  themePlacement="top-right"
372
396
  />
@@ -488,9 +488,12 @@ exports[`BottomSheet renders floating BottomSheet correctly 1`] = `
488
488
  <RCTSafeAreaView
489
489
  collapsable={false}
490
490
  style={
491
- {
492
- "margin": 16,
493
- }
491
+ [
492
+ {
493
+ "margin": 16,
494
+ },
495
+ undefined,
496
+ ]
494
497
  }
495
498
  >
496
499
  <View