@jobber/components-native 0.84.4-JOB-138679-b1552ab.68 → 0.84.4-match-mobi-accfa8a.9

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 (83) hide show
  1. package/dist/package.json +5 -3
  2. package/dist/src/BottomSheet/BottomSheet.js +58 -32
  3. package/dist/src/BottomSheet/BottomSheet.style.js +8 -9
  4. package/dist/src/BottomSheet/hooks/useBottomSheetBackHandler.js +26 -0
  5. package/dist/src/Chip/Chip.js +12 -1
  6. package/dist/src/Chip/Chip.style.js +1 -1
  7. package/dist/src/Content/ContentHorizontal.style.js +15 -0
  8. package/dist/src/Content/ContentSpaceAround.style.js +15 -0
  9. package/dist/src/Content/ContentVertical.style.js +15 -0
  10. package/dist/src/InputText/InputText.js +2 -2
  11. package/dist/src/ProgressBar/ProgressBar.js +10 -6
  12. package/dist/src/ProgressBar/ProgressBarInner.js +3 -12
  13. package/dist/src/ProgressBar/ProgressBarStepped.js +7 -2
  14. package/dist/src/StatusIndicator/StatusIndicator.js +11 -0
  15. package/dist/src/StatusIndicator/StatusIndicator.style.js +12 -0
  16. package/dist/src/StatusIndicator/StatusIndicator.type.js +1 -0
  17. package/dist/src/StatusIndicator/index.js +1 -0
  18. package/dist/src/StatusLabel/StatusLabel.js +6 -12
  19. package/dist/src/StatusLabel/StatusLabel.style.js +10 -13
  20. package/dist/src/hooks/useFormController.js +1 -1
  21. package/dist/src/index.js +1 -0
  22. package/dist/src/utils/meta/meta.json +1 -0
  23. package/dist/tsconfig.build.tsbuildinfo +1 -1
  24. package/dist/types/src/BottomSheet/BottomSheet.d.ts +7 -3
  25. package/dist/types/src/BottomSheet/BottomSheet.style.d.ts +7 -14
  26. package/dist/types/src/BottomSheet/hooks/useBottomSheetBackHandler.d.ts +8 -0
  27. package/dist/types/src/Content/Content.d.ts +1 -1
  28. package/dist/types/src/Content/ContentHorizontal.style.d.ts +15 -0
  29. package/dist/types/src/Content/ContentSpaceAround.style.d.ts +15 -0
  30. package/dist/types/src/Content/ContentVertical.style.d.ts +15 -0
  31. package/dist/types/src/Form/context/types.d.ts +2 -2
  32. package/dist/types/src/Form/hooks/useInternalForm.d.ts +2 -2
  33. package/dist/types/src/InputText/InputText.d.ts +1 -1
  34. package/dist/types/src/Menu/types.d.ts +1 -1
  35. package/dist/types/src/ProgressBar/ProgressBar.d.ts +1 -1
  36. package/dist/types/src/ProgressBar/ProgressBarInner.d.ts +4 -1
  37. package/dist/types/src/ProgressBar/ProgressBarStepped.d.ts +3 -1
  38. package/dist/types/src/ProgressBar/types.d.ts +20 -0
  39. package/dist/types/src/StatusIndicator/StatusIndicator.d.ts +6 -0
  40. package/dist/types/src/StatusIndicator/StatusIndicator.style.d.ts +8 -0
  41. package/dist/types/src/StatusIndicator/StatusIndicator.type.d.ts +1 -0
  42. package/dist/types/src/StatusIndicator/index.d.ts +2 -0
  43. package/dist/types/src/StatusLabel/StatusLabel.d.ts +3 -3
  44. package/dist/types/src/StatusLabel/StatusLabel.style.d.ts +10 -10
  45. package/dist/types/src/index.d.ts +1 -0
  46. package/package.json +5 -3
  47. package/src/BottomSheet/BottomSheet.stories.tsx +128 -0
  48. package/src/BottomSheet/BottomSheet.style.ts +7 -14
  49. package/src/BottomSheet/BottomSheet.test.tsx +19 -24
  50. package/src/BottomSheet/BottomSheet.tsx +112 -93
  51. package/src/BottomSheet/hooks/useBottomSheetBackHandler.test.ts +90 -0
  52. package/src/BottomSheet/hooks/useBottomSheetBackHandler.ts +41 -0
  53. package/src/Checkbox/Checkbox.test.tsx +118 -1
  54. package/src/Chip/Chip.style.ts +1 -1
  55. package/src/Chip/Chip.tsx +19 -1
  56. package/src/Content/Content.tsx +6 -1
  57. package/src/Content/ContentHorizontal.style.ts +20 -0
  58. package/src/Content/ContentSpaceAround.style.ts +20 -0
  59. package/src/Content/ContentVertical.style.ts +20 -0
  60. package/src/Form/context/types.ts +2 -2
  61. package/src/Form/hooks/useInternalForm.ts +2 -2
  62. package/src/InputText/InputText.test.tsx +115 -1
  63. package/src/InputText/InputText.tsx +3 -3
  64. package/src/Menu/types.ts +1 -1
  65. package/src/ProgressBar/ProgressBar.test.tsx +109 -0
  66. package/src/ProgressBar/ProgressBar.tsx +17 -1
  67. package/src/ProgressBar/ProgressBarInner.tsx +7 -10
  68. package/src/ProgressBar/ProgressBarStepped.tsx +12 -1
  69. package/src/ProgressBar/__snapshots__/ProgressBar.test.tsx.snap +14 -0
  70. package/src/ProgressBar/types.ts +22 -0
  71. package/src/StatusIndicator/StatusIndicator.style.ts +14 -0
  72. package/src/StatusIndicator/StatusIndicator.test.tsx +42 -0
  73. package/src/StatusIndicator/StatusIndicator.tsx +23 -0
  74. package/src/StatusIndicator/StatusIndicator.type.ts +6 -0
  75. package/src/StatusIndicator/__snapshots__/StatusIndicator.test.tsx.snap +96 -0
  76. package/src/StatusIndicator/index.ts +2 -0
  77. package/src/StatusLabel/StatusLabel.style.ts +10 -16
  78. package/src/StatusLabel/StatusLabel.tsx +15 -28
  79. package/src/StatusLabel/__snapshots__/StatusLabel.test.tsx.snap +133 -105
  80. package/src/ThumbnailList/__snapshots__/ThumbnailList.test.tsx.snap +199 -1
  81. package/src/hooks/useFormController.ts +1 -1
  82. package/src/index.ts +1 -0
  83. package/src/utils/meta/meta.json +1 -0
@@ -150,6 +150,204 @@ exports[`renders a thumbnail component with attachments 1`] = `
150
150
  "top": 0,
151
151
  }
152
152
  }
153
- />,
153
+ >
154
+ <View
155
+ backdropComponent={[Function]}
156
+ backgroundStyle={
157
+ {
158
+ "borderTopLeftRadius": 24,
159
+ "borderTopRightRadius": 24,
160
+ }
161
+ }
162
+ enablePanDownToClose={true}
163
+ handleStyle={
164
+ {
165
+ "display": "none",
166
+ }
167
+ }
168
+ keyboardBlurBehavior="restore"
169
+ style={
170
+ {
171
+ "display": "none",
172
+ }
173
+ }
174
+ testID="bottom-sheet-mock"
175
+ >
176
+ <View
177
+ style={
178
+ {
179
+ "paddingBottom": 8,
180
+ "paddingTop": 8,
181
+ }
182
+ }
183
+ testID="bottom-sheet-view"
184
+ >
185
+ <View
186
+ accessibilityLabel="Preview "
187
+ accessibilityState={
188
+ {
189
+ "busy": undefined,
190
+ "checked": undefined,
191
+ "disabled": undefined,
192
+ "expanded": undefined,
193
+ "selected": undefined,
194
+ }
195
+ }
196
+ accessibilityValue={
197
+ {
198
+ "max": undefined,
199
+ "min": undefined,
200
+ "now": undefined,
201
+ "text": undefined,
202
+ }
203
+ }
204
+ accessible={true}
205
+ collapsable={false}
206
+ focusable={true}
207
+ onClick={[Function]}
208
+ onResponderGrant={[Function]}
209
+ onResponderMove={[Function]}
210
+ onResponderRelease={[Function]}
211
+ onResponderTerminate={[Function]}
212
+ onResponderTerminationRequest={[Function]}
213
+ onStartShouldSetResponder={[Function]}
214
+ style={
215
+ {
216
+ "alignContent": "center",
217
+ "alignItems": "center",
218
+ "display": "flex",
219
+ "flexDirection": "row",
220
+ "opacity": 1,
221
+ "padding": 8,
222
+ }
223
+ }
224
+ >
225
+ <View
226
+ style={
227
+ {
228
+ "paddingHorizontal": 8,
229
+ }
230
+ }
231
+ >
232
+ <RNSVGSvgView
233
+ align="xMidYMid"
234
+ bbHeight={24}
235
+ bbWidth={24}
236
+ focusable={false}
237
+ meetOrSlice={0}
238
+ minX={0}
239
+ minY={0}
240
+ style={
241
+ [
242
+ {
243
+ "backgroundColor": "transparent",
244
+ "borderWidth": 0,
245
+ },
246
+ {
247
+ "display": "flex",
248
+ "fill": "hsl(198, 35%, 21%)",
249
+ "height": 24,
250
+ "verticalAlign": "middle",
251
+ "width": 24,
252
+ },
253
+ {
254
+ "flex": 0,
255
+ "height": 24,
256
+ "width": 24,
257
+ },
258
+ ]
259
+ }
260
+ testID="eye"
261
+ vbHeight={24}
262
+ vbWidth={24}
263
+ >
264
+ <RNSVGGroup
265
+ fill={
266
+ {
267
+ "payload": 4280499528,
268
+ "type": 0,
269
+ }
270
+ }
271
+ propList={
272
+ [
273
+ "fill",
274
+ ]
275
+ }
276
+ >
277
+ <RNSVGPath
278
+ d="M16 12a4 4 0 1 1-8 0 4 4 0 0 1 8 0Zm-2 0a2 2 0 1 0-4 0 2 2 0 0 0 4 0Z"
279
+ fill={
280
+ {
281
+ "payload": 4280499528,
282
+ "type": 0,
283
+ }
284
+ }
285
+ propList={
286
+ [
287
+ "fill",
288
+ ]
289
+ }
290
+ />
291
+ <RNSVGPath
292
+ d="M21.863 12.477C20.794 14.2 16.703 20 12 20c-4.702 0-8.795-5.8-9.863-7.523a.903.903 0 0 1 0-.954C3.205 9.8 7.297 4 12 4c4.703 0 8.794 5.8 9.863 7.523a.903.903 0 0 1 0 .954ZM20 12s-3.582-6-8-6-8 6-8 6 3.582 6 8 6 8-6 8-6Z"
293
+ fill={
294
+ {
295
+ "payload": 4280499528,
296
+ "type": 0,
297
+ }
298
+ }
299
+ propList={
300
+ [
301
+ "fill",
302
+ ]
303
+ }
304
+ />
305
+ </RNSVGGroup>
306
+ </RNSVGSvgView>
307
+ </View>
308
+ <View
309
+ style={
310
+ {
311
+ "flexShrink": 1,
312
+ "paddingHorizontal": 8,
313
+ }
314
+ }
315
+ >
316
+ <Text
317
+ accessibilityRole="text"
318
+ adjustsFontSizeToFit={false}
319
+ allowFontScaling={true}
320
+ collapsable={false}
321
+ maxFontSizeMultiplier={3.125}
322
+ selectable={true}
323
+ selectionColor="hsl(86, 100%, 46%)"
324
+ style={
325
+ [
326
+ {
327
+ "fontFamily": "inter-semibold",
328
+ },
329
+ {
330
+ "color": "hsl(197, 15%, 43%)",
331
+ },
332
+ {
333
+ "textAlign": "left",
334
+ },
335
+ {
336
+ "fontSize": 16,
337
+ "lineHeight": 20,
338
+ },
339
+ {
340
+ "letterSpacing": 0,
341
+ },
342
+ ]
343
+ }
344
+ >
345
+ Preview
346
+ </Text>
347
+ </View>
348
+ </View>
349
+ </View>
350
+ </View>
351
+ </View>,
154
352
  ]
155
353
  `;
@@ -40,7 +40,7 @@ export function useFormController<T>({
40
40
  name: fieldName,
41
41
  control,
42
42
  rules: validations,
43
- defaultValue: value || undefined,
43
+ defaultValue: typeof value === "boolean" ? value : value || undefined,
44
44
  });
45
45
 
46
46
  // The naming convention established by react-hook-form for arrays of fields is, for example, "emails.0.description".
package/src/index.ts CHANGED
@@ -39,6 +39,7 @@ export * from "./Menu";
39
39
  export * from "./ProgressBar";
40
40
  export * from "./Select";
41
41
  export * from "./StatusLabel";
42
+ export * from "./StatusIndicator";
42
43
  export * from "./Switch";
43
44
  export * from "./Text";
44
45
  export * from "./TextList";
@@ -57,6 +57,7 @@
57
57
  "Option",
58
58
  "ProgressBar",
59
59
  "Select",
60
+ "StatusIndicator",
60
61
  "StatusLabel",
61
62
  "Switch",
62
63
  "Text",