@hero-design/rn 8.99.4 → 8.100.0

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 (121) hide show
  1. package/.turbo/turbo-build.log +8 -3
  2. package/CHANGELOG.md +17 -0
  3. package/es/index.js +5621 -690
  4. package/jest.config.js +1 -1
  5. package/lib/index.js +5545 -613
  6. package/package.json +4 -2
  7. package/src/components/Avatar/AvatarStack/utils.ts +6 -4
  8. package/src/components/Badge/Status.tsx +1 -1
  9. package/src/components/Badge/__tests__/Status.spec.tsx +20 -0
  10. package/src/components/Badge/__tests__/__snapshots__/Status.spec.tsx.snap +2 -0
  11. package/src/components/Chart/ChartSelect/StyledChartSelect.tsx +9 -0
  12. package/src/components/Chart/ChartSelect/__tests__/StyledChartSelect.spec.tsx +15 -0
  13. package/src/components/Chart/ChartSelect/__tests__/__snapshots__/StyledChartSelect.spec.tsx.snap +20 -0
  14. package/src/components/Chart/ChartSelect/__tests__/index.spec.tsx +111 -0
  15. package/src/components/Chart/ChartSelect/index.tsx +137 -0
  16. package/src/components/Chart/ColumnChart/ColumnChartContent.tsx +84 -0
  17. package/src/components/Chart/ColumnChart/Segment.tsx +66 -0
  18. package/src/components/Chart/ColumnChart/StackedSegment.tsx +99 -0
  19. package/src/components/Chart/ColumnChart/StyledColumnChart.tsx +9 -0
  20. package/src/components/Chart/ColumnChart/__tests__/ColumnChartContent.spec.tsx +68 -0
  21. package/src/components/Chart/ColumnChart/__tests__/Segment.spec.tsx +99 -0
  22. package/src/components/Chart/ColumnChart/__tests__/StackedSegment.spec.tsx +115 -0
  23. package/src/components/Chart/ColumnChart/__tests__/__snapshots__/StackedSegment.spec.tsx.snap +120 -0
  24. package/src/components/Chart/ColumnChart/__tests__/__snapshots__/index.spec.tsx.snap +1405 -0
  25. package/src/components/Chart/ColumnChart/__tests__/index.spec.tsx +134 -0
  26. package/src/components/Chart/ColumnChart/index.tsx +216 -0
  27. package/src/components/Chart/Line/Line.tsx +81 -0
  28. package/src/components/Chart/Line/__tests__/Line.spec.tsx +148 -0
  29. package/src/components/Chart/Line/__tests__/__snapshots__/Line.spec.tsx.snap +56 -0
  30. package/src/components/Chart/Line/__tests__/__snapshots__/index.spec.tsx.snap +1461 -0
  31. package/src/components/Chart/Line/__tests__/index.spec.tsx +112 -0
  32. package/src/components/Chart/Line/index.tsx +143 -0
  33. package/src/components/Chart/StyledChart.tsx +16 -0
  34. package/src/components/Chart/index.tsx +13 -0
  35. package/src/components/Chart/shared/AxisLabel.tsx +25 -0
  36. package/src/components/Chart/shared/ChartFrame.tsx +131 -0
  37. package/src/components/Chart/shared/ChartHeader.tsx +19 -0
  38. package/src/components/Chart/shared/EmptyState.tsx +83 -0
  39. package/src/components/Chart/shared/XAxis.tsx +69 -0
  40. package/src/components/Chart/shared/XAxisGrid.tsx +42 -0
  41. package/src/components/Chart/shared/YAxis.tsx +104 -0
  42. package/src/components/Chart/shared/YAxisGrid.tsx +58 -0
  43. package/src/components/Chart/shared/__tests__/ChartFrame.spec.tsx +125 -0
  44. package/src/components/Chart/shared/__tests__/ChartHeader.spec.tsx +22 -0
  45. package/src/components/Chart/shared/__tests__/EmptyState.spec.tsx +29 -0
  46. package/src/components/Chart/shared/__tests__/XAXisGrid.spec.tsx +30 -0
  47. package/src/components/Chart/shared/__tests__/XAxis.spec.tsx +42 -0
  48. package/src/components/Chart/shared/__tests__/YAxis.spec.tsx +72 -0
  49. package/src/components/Chart/shared/__tests__/YAxisGrid.spec.tsx +35 -0
  50. package/src/components/Chart/shared/__tests__/__snapshots__/ChartFrame.spec.tsx.snap +3058 -0
  51. package/src/components/Chart/shared/__tests__/__snapshots__/ChartHeader.spec.tsx.snap +160 -0
  52. package/src/components/Chart/shared/__tests__/__snapshots__/EmptyState.spec.tsx.snap +155 -0
  53. package/src/components/Chart/shared/__tests__/__snapshots__/XAXisGrid.spec.tsx.snap +197 -0
  54. package/src/components/Chart/shared/__tests__/__snapshots__/XAxis.spec.tsx.snap +369 -0
  55. package/src/components/Chart/shared/__tests__/__snapshots__/YAxis.spec.tsx.snap +1013 -0
  56. package/src/components/Chart/shared/__tests__/__snapshots__/YAxisGrid.spec.tsx.snap +228 -0
  57. package/src/components/Chart/shared/__tests__/niceNumbers.spec.tsx +127 -0
  58. package/src/components/Chart/shared/constants.ts +2 -0
  59. package/src/components/Chart/shared/hooks/useColorScale.ts +25 -0
  60. package/src/components/Chart/shared/hooks/useGenerateTicks.ts +27 -0
  61. package/src/components/Chart/shared/hooks/useScaleBandX.ts +17 -0
  62. package/src/components/Chart/shared/hooks/useScaleLinearY.ts +30 -0
  63. package/src/components/Chart/shared/niceNumbers.ts +68 -0
  64. package/src/components/Chart/types.ts +100 -0
  65. package/src/components/Select/MultiSelect/OptionList.tsx +1 -1
  66. package/src/components/Select/MultiSelect/index.tsx +2 -6
  67. package/src/components/Select/MultiSelect/utils.ts +1 -1
  68. package/src/components/Select/SingleSelect/OptionList.tsx +1 -1
  69. package/src/components/Select/SingleSelect/index.tsx +2 -7
  70. package/src/components/Select/__tests__/helpers.spec.tsx +0 -36
  71. package/src/components/Select/helpers.tsx +0 -75
  72. package/src/components/Switch/SelectorSwitch/__tests__/__snapshots__/Option.spec.tsx.snap +3 -0
  73. package/src/components/Switch/SelectorSwitch/__tests__/__snapshots__/index.spec.tsx.snap +1 -0
  74. package/src/components/Tabs/__tests__/__snapshots__/ScrollableTabs.spec.tsx.snap +3 -0
  75. package/src/components/Tabs/__tests__/__snapshots__/ScrollableTabsHeader.spec.tsx.snap +2 -0
  76. package/src/components/Tabs/__tests__/__snapshots__/TabWithBadge.spec.tsx.snap +1 -0
  77. package/src/components/Tabs/__tests__/__snapshots__/index.spec.tsx.snap +3 -0
  78. package/src/index.ts +2 -0
  79. package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +28 -0
  80. package/src/theme/components/chart.ts +28 -0
  81. package/src/theme/components/columnChart.ts +15 -0
  82. package/src/theme/getTheme.ts +6 -0
  83. package/src/types.ts +4 -0
  84. package/src/utils/__tests__/helpers.spec.ts +36 -1
  85. package/src/utils/helpers.ts +76 -1
  86. package/stats/8.100.0/rn-stats.html +4842 -0
  87. package/stats/8.99.4/rn-stats.html +1 -1
  88. package/types/components/Badge/Status.d.ts +0 -1
  89. package/types/components/Chart/ChartSelect/StyledChartSelect.d.ts +8 -0
  90. package/types/components/Chart/ChartSelect/index.d.ts +63 -0
  91. package/types/components/Chart/ColumnChart/ColumnChartContent.d.ts +25 -0
  92. package/types/components/Chart/ColumnChart/Segment.d.ts +14 -0
  93. package/types/components/Chart/ColumnChart/StackedSegment.d.ts +28 -0
  94. package/types/components/Chart/ColumnChart/StyledColumnChart.d.ts +8 -0
  95. package/types/components/Chart/ColumnChart/index.d.ts +80 -0
  96. package/types/components/Chart/Line/Line.d.ts +21 -0
  97. package/types/components/Chart/Line/index.d.ts +35 -0
  98. package/types/components/Chart/StyledChart.d.ts +9 -0
  99. package/types/components/Chart/index.d.ts +9 -0
  100. package/types/components/Chart/shared/AxisLabel.d.ts +7 -0
  101. package/types/components/Chart/shared/ChartFrame.d.ts +30 -0
  102. package/types/components/Chart/shared/ChartHeader.d.ts +8 -0
  103. package/types/components/Chart/shared/EmptyState.d.ts +8 -0
  104. package/types/components/Chart/shared/XAxis.d.ts +8 -0
  105. package/types/components/Chart/shared/XAxisGrid.d.ts +8 -0
  106. package/types/components/Chart/shared/YAxis.d.ts +10 -0
  107. package/types/components/Chart/shared/YAxisGrid.d.ts +10 -0
  108. package/types/components/Chart/shared/constants.d.ts +2 -0
  109. package/types/components/Chart/shared/hooks/useColorScale.d.ts +7 -0
  110. package/types/components/Chart/shared/hooks/useGenerateTicks.d.ts +6 -0
  111. package/types/components/Chart/shared/hooks/useScaleBandX.d.ts +8 -0
  112. package/types/components/Chart/shared/hooks/useScaleLinearY.d.ts +9 -0
  113. package/types/components/Chart/shared/niceNumbers.d.ts +12 -0
  114. package/types/components/Chart/types.d.ts +84 -0
  115. package/types/components/Select/helpers.d.ts +0 -5
  116. package/types/index.d.ts +2 -1
  117. package/types/theme/components/chart.d.ts +22 -0
  118. package/types/theme/components/columnChart.d.ts +10 -0
  119. package/types/theme/getTheme.d.ts +4 -0
  120. package/types/types.d.ts +3 -1
  121. package/types/utils/helpers.d.ts +5 -0
@@ -0,0 +1,369 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`XAxis renders correctly on web 1`] = `
4
+ <View
5
+ style={
6
+ {
7
+ "flex": 1,
8
+ }
9
+ }
10
+ >
11
+ <RNSVGGroup
12
+ fill={
13
+ {
14
+ "payload": 4278190080,
15
+ "type": 0,
16
+ }
17
+ }
18
+ >
19
+ <RNSVGGroup
20
+ fill={
21
+ {
22
+ "payload": 4278190080,
23
+ "type": 0,
24
+ }
25
+ }
26
+ >
27
+ <RNSVGForeignObject
28
+ fill={
29
+ {
30
+ "payload": 4278190080,
31
+ "type": 0,
32
+ }
33
+ }
34
+ height={32}
35
+ width={25.000000000000004}
36
+ x={18.75}
37
+ y={112}
38
+ >
39
+ <Text
40
+ adjustsFontSizeToFit={true}
41
+ allowFontScaling={false}
42
+ ellipsizeMode="tail"
43
+ minimumFontScale={0.6}
44
+ numberOfLines={2}
45
+ style={
46
+ [
47
+ {
48
+ "color": "#4d6265",
49
+ "fontSize": 10,
50
+ "letterSpacing": 0,
51
+ "lineHeight": 14,
52
+ },
53
+ {
54
+ "textAlign": "center",
55
+ },
56
+ ]
57
+ }
58
+ themeIntent="subdued"
59
+ >
60
+ Label 1
61
+ </Text>
62
+ </RNSVGForeignObject>
63
+ </RNSVGGroup>
64
+ <RNSVGGroup
65
+ fill={
66
+ {
67
+ "payload": 4278190080,
68
+ "type": 0,
69
+ }
70
+ }
71
+ >
72
+ <RNSVGForeignObject
73
+ fill={
74
+ {
75
+ "payload": 4278190080,
76
+ "type": 0,
77
+ }
78
+ }
79
+ height={32}
80
+ width={25.000000000000004}
81
+ x={50}
82
+ y={112}
83
+ >
84
+ <Text
85
+ adjustsFontSizeToFit={true}
86
+ allowFontScaling={false}
87
+ ellipsizeMode="tail"
88
+ minimumFontScale={0.6}
89
+ numberOfLines={2}
90
+ style={
91
+ [
92
+ {
93
+ "color": "#4d6265",
94
+ "fontSize": 10,
95
+ "letterSpacing": 0,
96
+ "lineHeight": 14,
97
+ },
98
+ {
99
+ "textAlign": "center",
100
+ },
101
+ ]
102
+ }
103
+ themeIntent="subdued"
104
+ >
105
+ Label 2
106
+ </Text>
107
+ </RNSVGForeignObject>
108
+ </RNSVGGroup>
109
+ <RNSVGGroup
110
+ fill={
111
+ {
112
+ "payload": 4278190080,
113
+ "type": 0,
114
+ }
115
+ }
116
+ >
117
+ <RNSVGForeignObject
118
+ fill={
119
+ {
120
+ "payload": 4278190080,
121
+ "type": 0,
122
+ }
123
+ }
124
+ height={32}
125
+ width={25.000000000000004}
126
+ x={81.25}
127
+ y={112}
128
+ >
129
+ <Text
130
+ adjustsFontSizeToFit={true}
131
+ allowFontScaling={false}
132
+ ellipsizeMode="tail"
133
+ minimumFontScale={0.6}
134
+ numberOfLines={2}
135
+ style={
136
+ [
137
+ {
138
+ "color": "#4d6265",
139
+ "fontSize": 10,
140
+ "letterSpacing": 0,
141
+ "lineHeight": 14,
142
+ },
143
+ {
144
+ "textAlign": "center",
145
+ },
146
+ ]
147
+ }
148
+ themeIntent="subdued"
149
+ >
150
+ Label 3
151
+ </Text>
152
+ </RNSVGForeignObject>
153
+ </RNSVGGroup>
154
+ </RNSVGGroup>
155
+ <View
156
+ pointerEvents="box-none"
157
+ position="bottom"
158
+ style={
159
+ [
160
+ {
161
+ "bottom": 0,
162
+ "elevation": 9999,
163
+ "flexDirection": "column-reverse",
164
+ "left": 0,
165
+ "paddingHorizontal": 24,
166
+ "paddingVertical": 16,
167
+ "position": "absolute",
168
+ "right": 0,
169
+ "top": 0,
170
+ },
171
+ undefined,
172
+ ]
173
+ }
174
+ />
175
+ </View>
176
+ `;
177
+
178
+ exports[`XAxis should render correctly 1`] = `
179
+ <View
180
+ style={
181
+ {
182
+ "flex": 1,
183
+ }
184
+ }
185
+ >
186
+ <RNSVGGroup
187
+ fill={
188
+ {
189
+ "payload": 4278190080,
190
+ "type": 0,
191
+ }
192
+ }
193
+ >
194
+ <RNSVGGroup
195
+ fill={
196
+ {
197
+ "payload": 4278190080,
198
+ "type": 0,
199
+ }
200
+ }
201
+ >
202
+ <View
203
+ alignItems="center"
204
+ style={
205
+ [
206
+ {
207
+ "alignItems": "center",
208
+ },
209
+ {
210
+ "left": 6.25,
211
+ "maxHeight": 32,
212
+ "position": "absolute",
213
+ "top": 112,
214
+ "width": 25.000000000000004,
215
+ },
216
+ ]
217
+ }
218
+ testID="x-axis-label-Label 1-container"
219
+ >
220
+ <Text
221
+ adjustsFontSizeToFit={true}
222
+ allowFontScaling={false}
223
+ ellipsizeMode="tail"
224
+ minimumFontScale={0.6}
225
+ numberOfLines={2}
226
+ style={
227
+ [
228
+ {
229
+ "color": "#4d6265",
230
+ "fontSize": 10,
231
+ "letterSpacing": 0,
232
+ "lineHeight": 14,
233
+ },
234
+ {
235
+ "textAlign": "center",
236
+ },
237
+ ]
238
+ }
239
+ themeIntent="subdued"
240
+ >
241
+ Label 1
242
+ </Text>
243
+ </View>
244
+ </RNSVGGroup>
245
+ <RNSVGGroup
246
+ fill={
247
+ {
248
+ "payload": 4278190080,
249
+ "type": 0,
250
+ }
251
+ }
252
+ >
253
+ <View
254
+ alignItems="center"
255
+ style={
256
+ [
257
+ {
258
+ "alignItems": "center",
259
+ },
260
+ {
261
+ "left": 37.5,
262
+ "maxHeight": 32,
263
+ "position": "absolute",
264
+ "top": 112,
265
+ "width": 25.000000000000004,
266
+ },
267
+ ]
268
+ }
269
+ testID="x-axis-label-Label 2-container"
270
+ >
271
+ <Text
272
+ adjustsFontSizeToFit={true}
273
+ allowFontScaling={false}
274
+ ellipsizeMode="tail"
275
+ minimumFontScale={0.6}
276
+ numberOfLines={2}
277
+ style={
278
+ [
279
+ {
280
+ "color": "#4d6265",
281
+ "fontSize": 10,
282
+ "letterSpacing": 0,
283
+ "lineHeight": 14,
284
+ },
285
+ {
286
+ "textAlign": "center",
287
+ },
288
+ ]
289
+ }
290
+ themeIntent="subdued"
291
+ >
292
+ Label 2
293
+ </Text>
294
+ </View>
295
+ </RNSVGGroup>
296
+ <RNSVGGroup
297
+ fill={
298
+ {
299
+ "payload": 4278190080,
300
+ "type": 0,
301
+ }
302
+ }
303
+ >
304
+ <View
305
+ alignItems="center"
306
+ style={
307
+ [
308
+ {
309
+ "alignItems": "center",
310
+ },
311
+ {
312
+ "left": 68.75,
313
+ "maxHeight": 32,
314
+ "position": "absolute",
315
+ "top": 112,
316
+ "width": 25.000000000000004,
317
+ },
318
+ ]
319
+ }
320
+ testID="x-axis-label-Label 3-container"
321
+ >
322
+ <Text
323
+ adjustsFontSizeToFit={true}
324
+ allowFontScaling={false}
325
+ ellipsizeMode="tail"
326
+ minimumFontScale={0.6}
327
+ numberOfLines={2}
328
+ style={
329
+ [
330
+ {
331
+ "color": "#4d6265",
332
+ "fontSize": 10,
333
+ "letterSpacing": 0,
334
+ "lineHeight": 14,
335
+ },
336
+ {
337
+ "textAlign": "center",
338
+ },
339
+ ]
340
+ }
341
+ themeIntent="subdued"
342
+ >
343
+ Label 3
344
+ </Text>
345
+ </View>
346
+ </RNSVGGroup>
347
+ </RNSVGGroup>
348
+ <View
349
+ pointerEvents="box-none"
350
+ position="bottom"
351
+ style={
352
+ [
353
+ {
354
+ "bottom": 0,
355
+ "elevation": 9999,
356
+ "flexDirection": "column-reverse",
357
+ "left": 0,
358
+ "paddingHorizontal": 24,
359
+ "paddingVertical": 16,
360
+ "position": "absolute",
361
+ "right": 0,
362
+ "top": 0,
363
+ },
364
+ undefined,
365
+ ]
366
+ }
367
+ />
368
+ </View>
369
+ `;