@jobber/components-native 0.36.0 → 0.37.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.
@@ -0,0 +1,488 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`renders a Disclosure with a header and a content when open is true 1`] = `
4
+ <View
5
+ style={
6
+ {
7
+ "width": "100%",
8
+ }
9
+ }
10
+ >
11
+ <View
12
+ accessibilityState={
13
+ {
14
+ "busy": undefined,
15
+ "checked": undefined,
16
+ "disabled": false,
17
+ "expanded": undefined,
18
+ "selected": undefined,
19
+ }
20
+ }
21
+ accessibilityValue={
22
+ {
23
+ "max": undefined,
24
+ "min": undefined,
25
+ "now": undefined,
26
+ "text": undefined,
27
+ }
28
+ }
29
+ accessible={true}
30
+ collapsable={false}
31
+ focusable={true}
32
+ onClick={[Function]}
33
+ onResponderGrant={[Function]}
34
+ onResponderMove={[Function]}
35
+ onResponderRelease={[Function]}
36
+ onResponderTerminate={[Function]}
37
+ onResponderTerminationRequest={[Function]}
38
+ onStartShouldSetResponder={[Function]}
39
+ style={
40
+ {
41
+ "opacity": 1,
42
+ }
43
+ }
44
+ >
45
+ <View
46
+ style={
47
+ {
48
+ "alignItems": "flex-start",
49
+ "flexDirection": "row",
50
+ "justifyContent": "space-between",
51
+ }
52
+ }
53
+ >
54
+ <Text
55
+ accessibilityRole="text"
56
+ adjustsFontSizeToFit={false}
57
+ allowFontScaling={true}
58
+ collapsable={false}
59
+ maxFontSizeMultiplier={3.125}
60
+ selectable={true}
61
+ selectionColor="rgb(132, 234, 0)"
62
+ style={
63
+ [
64
+ {
65
+ "fontFamily": "inter-regular",
66
+ },
67
+ {
68
+ "color": "rgb(66, 78, 86)",
69
+ },
70
+ {
71
+ "textAlign": "left",
72
+ },
73
+ {
74
+ "fontSize": 16,
75
+ "lineHeight": 20,
76
+ },
77
+ {
78
+ "letterSpacing": 0,
79
+ },
80
+ ]
81
+ }
82
+ >
83
+ This is the header
84
+ </Text>
85
+ <View
86
+ style={
87
+ [
88
+ {
89
+ "transform": [
90
+ {
91
+ "rotateZ": "0deg",
92
+ },
93
+ ],
94
+ },
95
+ ]
96
+ }
97
+ >
98
+ <SVGMock
99
+ style={
100
+ {
101
+ "display": "flex",
102
+ "fill": "rgb(181, 181, 181)",
103
+ "height": 24,
104
+ "verticalAlign": "middle",
105
+ "width": 24,
106
+ }
107
+ }
108
+ testID="arrowUp"
109
+ viewBox="0 0 24 24"
110
+ >
111
+ <Path
112
+ d="M16.297 14.709a.996.996 0 0 0 1.41-.001.994.994 0 0 0 0-1.41l-5-5.005a.998.998 0 0 0-1.415 0l-5 5a.994.994 0 0 0 0 1.41.996.996 0 0 0 1.411.001L12 10.416l4.297 4.293Z"
113
+ fill="rgb(181, 181, 181)"
114
+ />
115
+ </SVGMock>
116
+ </View>
117
+ </View>
118
+ </View>
119
+ <RCTScrollView
120
+ scrollEnabled={false}
121
+ showsHorizontalScrollIndicator={false}
122
+ showsVerticalScrollIndicator={false}
123
+ style={
124
+ [
125
+ {
126
+ "paddingTop": 8,
127
+ },
128
+ {
129
+ "height": 100,
130
+ },
131
+ ]
132
+ }
133
+ >
134
+ <View>
135
+ <View
136
+ onLayout={[Function]}
137
+ testID="content"
138
+ >
139
+ <Text
140
+ accessibilityRole="text"
141
+ adjustsFontSizeToFit={false}
142
+ allowFontScaling={true}
143
+ collapsable={false}
144
+ maxFontSizeMultiplier={3.125}
145
+ selectable={true}
146
+ selectionColor="rgb(132, 234, 0)"
147
+ style={
148
+ [
149
+ {
150
+ "fontFamily": "inter-regular",
151
+ },
152
+ {
153
+ "color": "rgb(66, 78, 86)",
154
+ },
155
+ {
156
+ "textAlign": "left",
157
+ },
158
+ {
159
+ "fontSize": 16,
160
+ "lineHeight": 20,
161
+ },
162
+ {
163
+ "letterSpacing": 0,
164
+ },
165
+ ]
166
+ }
167
+ >
168
+ This is the content
169
+ </Text>
170
+ </View>
171
+ </View>
172
+ </RCTScrollView>
173
+ </View>
174
+ `;
175
+
176
+ exports[`renders a Disclosure with a header and with a content of size 0 when closed is false 1`] = `
177
+ <View
178
+ style={
179
+ {
180
+ "width": "100%",
181
+ }
182
+ }
183
+ >
184
+ <View
185
+ accessibilityState={
186
+ {
187
+ "busy": undefined,
188
+ "checked": undefined,
189
+ "disabled": false,
190
+ "expanded": undefined,
191
+ "selected": undefined,
192
+ }
193
+ }
194
+ accessibilityValue={
195
+ {
196
+ "max": undefined,
197
+ "min": undefined,
198
+ "now": undefined,
199
+ "text": undefined,
200
+ }
201
+ }
202
+ accessible={true}
203
+ collapsable={false}
204
+ focusable={true}
205
+ onClick={[Function]}
206
+ onResponderGrant={[Function]}
207
+ onResponderMove={[Function]}
208
+ onResponderRelease={[Function]}
209
+ onResponderTerminate={[Function]}
210
+ onResponderTerminationRequest={[Function]}
211
+ onStartShouldSetResponder={[Function]}
212
+ style={
213
+ {
214
+ "opacity": 1,
215
+ }
216
+ }
217
+ >
218
+ <View
219
+ style={
220
+ {
221
+ "alignItems": "flex-start",
222
+ "flexDirection": "row",
223
+ "justifyContent": "space-between",
224
+ }
225
+ }
226
+ >
227
+ <Text
228
+ accessibilityRole="text"
229
+ adjustsFontSizeToFit={false}
230
+ allowFontScaling={true}
231
+ collapsable={false}
232
+ maxFontSizeMultiplier={3.125}
233
+ selectable={true}
234
+ selectionColor="rgb(132, 234, 0)"
235
+ style={
236
+ [
237
+ {
238
+ "fontFamily": "inter-regular",
239
+ },
240
+ {
241
+ "color": "rgb(66, 78, 86)",
242
+ },
243
+ {
244
+ "textAlign": "left",
245
+ },
246
+ {
247
+ "fontSize": 16,
248
+ "lineHeight": 20,
249
+ },
250
+ {
251
+ "letterSpacing": 0,
252
+ },
253
+ ]
254
+ }
255
+ >
256
+ This is the header
257
+ </Text>
258
+ <View
259
+ style={
260
+ [
261
+ {
262
+ "transform": [
263
+ {
264
+ "rotateZ": "-180deg",
265
+ },
266
+ ],
267
+ },
268
+ ]
269
+ }
270
+ >
271
+ <SVGMock
272
+ style={
273
+ {
274
+ "display": "flex",
275
+ "fill": "rgb(181, 181, 181)",
276
+ "height": 24,
277
+ "verticalAlign": "middle",
278
+ "width": 24,
279
+ }
280
+ }
281
+ testID="arrowUp"
282
+ viewBox="0 0 24 24"
283
+ >
284
+ <Path
285
+ d="M16.297 14.709a.996.996 0 0 0 1.41-.001.994.994 0 0 0 0-1.41l-5-5.005a.998.998 0 0 0-1.415 0l-5 5a.994.994 0 0 0 0 1.41.996.996 0 0 0 1.411.001L12 10.416l4.297 4.293Z"
286
+ fill="rgb(181, 181, 181)"
287
+ />
288
+ </SVGMock>
289
+ </View>
290
+ </View>
291
+ </View>
292
+ <RCTScrollView
293
+ scrollEnabled={false}
294
+ showsHorizontalScrollIndicator={false}
295
+ showsVerticalScrollIndicator={false}
296
+ style={
297
+ [
298
+ {
299
+ "paddingTop": 8,
300
+ },
301
+ {
302
+ "height": 0,
303
+ },
304
+ ]
305
+ }
306
+ >
307
+ <View>
308
+ <View
309
+ onLayout={[Function]}
310
+ testID="content"
311
+ >
312
+ <Text
313
+ accessibilityRole="text"
314
+ adjustsFontSizeToFit={false}
315
+ allowFontScaling={true}
316
+ collapsable={false}
317
+ maxFontSizeMultiplier={3.125}
318
+ selectable={true}
319
+ selectionColor="rgb(132, 234, 0)"
320
+ style={
321
+ [
322
+ {
323
+ "fontFamily": "inter-regular",
324
+ },
325
+ {
326
+ "color": "rgb(66, 78, 86)",
327
+ },
328
+ {
329
+ "textAlign": "left",
330
+ },
331
+ {
332
+ "fontSize": 16,
333
+ "lineHeight": 20,
334
+ },
335
+ {
336
+ "letterSpacing": 0,
337
+ },
338
+ ]
339
+ }
340
+ >
341
+ This is the content
342
+ </Text>
343
+ </View>
344
+ </View>
345
+ </RCTScrollView>
346
+ </View>
347
+ `;
348
+
349
+ exports[`should not render the caret when the Disclosure is empty 1`] = `
350
+ <View
351
+ style={
352
+ {
353
+ "width": "100%",
354
+ }
355
+ }
356
+ >
357
+ <View
358
+ accessibilityState={
359
+ {
360
+ "busy": undefined,
361
+ "checked": undefined,
362
+ "disabled": true,
363
+ "expanded": undefined,
364
+ "selected": undefined,
365
+ }
366
+ }
367
+ accessibilityValue={
368
+ {
369
+ "max": undefined,
370
+ "min": undefined,
371
+ "now": undefined,
372
+ "text": undefined,
373
+ }
374
+ }
375
+ accessible={true}
376
+ collapsable={false}
377
+ focusable={true}
378
+ onClick={[Function]}
379
+ onResponderGrant={[Function]}
380
+ onResponderMove={[Function]}
381
+ onResponderRelease={[Function]}
382
+ onResponderTerminate={[Function]}
383
+ onResponderTerminationRequest={[Function]}
384
+ onStartShouldSetResponder={[Function]}
385
+ style={
386
+ {
387
+ "opacity": 1,
388
+ }
389
+ }
390
+ >
391
+ <View
392
+ style={
393
+ {
394
+ "alignItems": "flex-start",
395
+ "flexDirection": "row",
396
+ "justifyContent": "space-between",
397
+ }
398
+ }
399
+ >
400
+ <Text
401
+ accessibilityRole="text"
402
+ adjustsFontSizeToFit={false}
403
+ allowFontScaling={true}
404
+ collapsable={false}
405
+ maxFontSizeMultiplier={3.125}
406
+ selectable={true}
407
+ selectionColor="rgb(132, 234, 0)"
408
+ style={
409
+ [
410
+ {
411
+ "fontFamily": "inter-regular",
412
+ },
413
+ {
414
+ "color": "rgb(66, 78, 86)",
415
+ },
416
+ {
417
+ "textAlign": "left",
418
+ },
419
+ {
420
+ "fontSize": 16,
421
+ "lineHeight": 20,
422
+ },
423
+ {
424
+ "letterSpacing": 0,
425
+ },
426
+ ]
427
+ }
428
+ >
429
+ This is the header
430
+ </Text>
431
+ </View>
432
+ </View>
433
+ <RCTScrollView
434
+ scrollEnabled={false}
435
+ showsHorizontalScrollIndicator={false}
436
+ showsVerticalScrollIndicator={false}
437
+ style={
438
+ [
439
+ {
440
+ "paddingTop": 8,
441
+ },
442
+ {
443
+ "height": 0,
444
+ },
445
+ ]
446
+ }
447
+ >
448
+ <View>
449
+ <View
450
+ onLayout={[Function]}
451
+ testID="content"
452
+ >
453
+ <Text
454
+ accessibilityRole="text"
455
+ adjustsFontSizeToFit={false}
456
+ allowFontScaling={true}
457
+ collapsable={false}
458
+ maxFontSizeMultiplier={3.125}
459
+ selectable={true}
460
+ selectionColor="rgb(132, 234, 0)"
461
+ style={
462
+ [
463
+ {
464
+ "fontFamily": "inter-regular",
465
+ },
466
+ {
467
+ "color": "rgb(66, 78, 86)",
468
+ },
469
+ {
470
+ "textAlign": "left",
471
+ },
472
+ {
473
+ "fontSize": 16,
474
+ "lineHeight": 20,
475
+ },
476
+ {
477
+ "letterSpacing": 0,
478
+ },
479
+ ]
480
+ }
481
+ >
482
+ This is the content
483
+ </Text>
484
+ </View>
485
+ </View>
486
+ </RCTScrollView>
487
+ </View>
488
+ `;
@@ -0,0 +1 @@
1
+ export const EASE_CUBIC_IN_OUT = [0.645, 0.045, 0.355, 1.0] as const;
@@ -0,0 +1 @@
1
+ export { Disclosure } from "./Disclosure";
package/src/index.ts CHANGED
@@ -10,6 +10,7 @@ export * from "./Card";
10
10
  export * from "./Checkbox";
11
11
  export * from "./Chip";
12
12
  export * from "./Content";
13
+ export * from "./Disclosure";
13
14
  export * from "./Divider";
14
15
  export * from "./EmptyState";
15
16
  export * from "./ErrorMessageWrapper";