@terreno/ui 0.14.2 → 0.15.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 (67) hide show
  1. package/dist/Badge.js +1 -0
  2. package/dist/Badge.js.map +1 -1
  3. package/dist/Banner.d.ts +8 -0
  4. package/dist/Banner.js +2 -2
  5. package/dist/Banner.js.map +1 -1
  6. package/dist/Common.d.ts +1 -0
  7. package/dist/Common.js.map +1 -1
  8. package/dist/ConsentFormScreen.js +4 -2
  9. package/dist/ConsentFormScreen.js.map +1 -1
  10. package/dist/DismissButton.js +3 -2
  11. package/dist/DismissButton.js.map +1 -1
  12. package/dist/PickerSelect.js +6 -2
  13. package/dist/PickerSelect.js.map +1 -1
  14. package/dist/Signature.d.ts +9 -1
  15. package/dist/Signature.js +121 -18
  16. package/dist/Signature.js.map +1 -1
  17. package/dist/Signature.native.d.ts +16 -0
  18. package/dist/Signature.native.js +119 -23
  19. package/dist/Signature.native.js.map +1 -1
  20. package/dist/SignatureField.d.ts +1 -1
  21. package/dist/SignatureField.js +2 -2
  22. package/dist/SignatureField.js.map +1 -1
  23. package/dist/SignatureSizing.d.ts +3 -0
  24. package/dist/SignatureSizing.js +9 -0
  25. package/dist/SignatureSizing.js.map +1 -0
  26. package/dist/TapToEdit.js +1 -1
  27. package/dist/TapToEdit.js.map +1 -1
  28. package/dist/Toast.d.ts +4 -4
  29. package/dist/Toast.js.map +1 -1
  30. package/dist/index.d.ts +1 -1
  31. package/dist/index.js +1 -1
  32. package/dist/index.js.map +1 -1
  33. package/package.json +2 -4
  34. package/src/Badge.test.tsx +7 -0
  35. package/src/Badge.tsx +1 -0
  36. package/src/Banner.test.tsx +23 -3
  37. package/src/Banner.tsx +3 -3
  38. package/src/Common.ts +1 -0
  39. package/src/ConsentFormScreen.test.tsx +15 -0
  40. package/src/ConsentFormScreen.tsx +21 -4
  41. package/src/DateTimeField.test.tsx +226 -0
  42. package/src/DismissButton.tsx +4 -3
  43. package/src/Field.test.tsx +23 -0
  44. package/src/IconButton.tsx +2 -2
  45. package/src/PickerSelect.test.tsx +22 -0
  46. package/src/PickerSelect.tsx +24 -8
  47. package/src/Signature.native.test.tsx +9 -0
  48. package/src/Signature.native.tsx +152 -33
  49. package/src/Signature.test.tsx +324 -39
  50. package/src/Signature.tsx +171 -22
  51. package/src/SignatureField.test.tsx +0 -9
  52. package/src/SignatureField.tsx +2 -0
  53. package/src/SignatureSizing.ts +10 -0
  54. package/src/TapToEdit.test.tsx +33 -0
  55. package/src/TapToEdit.tsx +1 -1
  56. package/src/Toast.tsx +5 -3
  57. package/src/ToastNotifications.test.tsx +74 -1
  58. package/src/__snapshots__/CustomSelectField.test.tsx.snap +5 -4
  59. package/src/__snapshots__/DismissButton.test.tsx.snap +9 -3
  60. package/src/__snapshots__/Field.test.tsx.snap +379 -0
  61. package/src/__snapshots__/PickerSelect.test.tsx.snap +5 -4
  62. package/src/__snapshots__/SegmentedControl.test.tsx.snap +9 -0
  63. package/src/__snapshots__/SelectField.test.tsx.snap +5 -4
  64. package/src/__snapshots__/Signature.test.tsx.snap +15 -3
  65. package/src/__snapshots__/SignatureField.test.tsx.snap +12 -3
  66. package/src/bunSetup.ts +0 -15
  67. package/src/index.tsx +1 -1
@@ -11,12 +11,24 @@ exports[`Signature renders correctly 1`] = `
11
11
  "$$typeof": Symbol(react.test.json),
12
12
  "children": null,
13
13
  "props": {
14
+ "height": 180,
15
+ "onPointerDown": [Function],
16
+ "onPointerLeave": [Function],
17
+ "onPointerMove": [Function],
18
+ "onPointerUp": [Function],
19
+ "ref": {
20
+ "current": null,
21
+ },
14
22
  "style": {
15
- "backgroundColor": "#FFFFFF",
23
+ "display": "block",
24
+ "height": 180,
25
+ "maxWidth": "100%",
26
+ "touchAction": "none",
27
+ "width": "100%",
16
28
  },
17
- "testID": "signature-canvas",
29
+ "width": 300,
18
30
  },
19
- "type": "View",
31
+ "type": "canvas",
20
32
  },
21
33
  ],
22
34
  "props": {
@@ -33,15 +33,24 @@ exports[`SignatureField renders correctly with default props 1`] = `
33
33
  "$$typeof": Symbol(react.test.json),
34
34
  "children": null,
35
35
  "props": {
36
+ "height": 180,
37
+ "onPointerDown": [Function],
38
+ "onPointerLeave": [Function],
39
+ "onPointerMove": [Function],
40
+ "onPointerUp": [Function],
36
41
  "ref": {
37
42
  "current": null,
38
43
  },
39
44
  "style": {
40
- "backgroundColor": "#FFFFFF",
45
+ "display": "block",
46
+ "height": 180,
47
+ "maxWidth": "100%",
48
+ "touchAction": "none",
49
+ "width": "100%",
41
50
  },
42
- "testID": "signature-canvas",
51
+ "width": 300,
43
52
  },
44
- "type": "View",
53
+ "type": "canvas",
45
54
  },
46
55
  ],
47
56
  "props": {
package/src/bunSetup.ts CHANGED
@@ -548,21 +548,6 @@ mock.module("@react-native-async-storage/async-storage", () => ({
548
548
  setItem: mock(() => Promise.resolve()),
549
549
  }));
550
550
 
551
- // Mock react-native-signature-canvas
552
- mock.module("react-native-signature-canvas", () => ({
553
- Signature: mock(() => null),
554
- }));
555
-
556
- // Mock react-signature-canvas (web). The real module references `window` at
557
- // import time, which doesn't exist under bun test.
558
- mock.module("react-signature-canvas", () => {
559
- const SignatureCanvasMock = React.forwardRef(
560
- ({backgroundColor}: {backgroundColor?: string}, _ref) =>
561
- React.createElement("View", {style: {backgroundColor}, testID: "signature-canvas"})
562
- );
563
- return {__esModule: true, default: SignatureCanvasMock};
564
- });
565
-
566
551
  // Mock react-native-portalize. The real `Host` wraps children in an extra View
567
552
  // whose presence makes snapshots brittle, and individual tests already mock
568
553
  // this to render inline; hoisting the mock to setup keeps test ordering from
package/src/index.tsx CHANGED
@@ -8,7 +8,7 @@ export * from "./AiSuggestionBox";
8
8
  export * from "./AttachmentPreview";
9
9
  export * from "./Avatar";
10
10
  export * from "./Badge";
11
- export * from "./Banner";
11
+ export {Banner, hideBanner} from "./Banner";
12
12
  export * from "./Body";
13
13
  export * from "./BooleanField";
14
14
  export * from "./Box";