@tactics/toddle-styleguide 1.2.3 → 1.2.5

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 (77) hide show
  1. package/App.tsx +202 -191
  2. package/index.d.ts +2 -1
  3. package/index.tsx +2 -0
  4. package/package.json +2 -2
  5. package/src/components/atoms/backdrop/backdrop.component.d.ts +2 -1
  6. package/src/components/atoms/backdrop/backdrop.component.tsx +8 -2
  7. package/src/components/atoms/calendar/__snapshots__/calendar.test.js.snap +1821 -641
  8. package/src/components/atoms/text-input/text-input.component.d.ts +4 -5
  9. package/src/components/atoms/text-input/text-input.component.tsx +9 -13
  10. package/src/components/atoms/text-input/text-input.preview.tsx +5 -5
  11. package/src/components/atoms/text-input/text-input.test.js +4 -4
  12. package/src/components/molecules/avatar/__snapshots__/avatar.test.js.snap +70 -62
  13. package/src/components/molecules/avatar/avatar.component.d.ts +2 -1
  14. package/src/components/molecules/avatar/avatar.component.tsx +22 -11
  15. package/src/components/molecules/avatar/avatar.preview.tsx +58 -44
  16. package/src/components/molecules/avatar/avatar.styles.d.ts +54 -15
  17. package/src/components/molecules/avatar/avatar.styles.js +33 -5
  18. package/src/components/molecules/button/__snapshots__/button.test.js.snap +144 -0
  19. package/src/components/molecules/button/button.component.d.ts +6 -4
  20. package/src/components/molecules/button/button.component.tsx +30 -9
  21. package/src/components/molecules/button/button.preview.tsx +16 -1
  22. package/src/components/molecules/button/button.styles.d.ts +13 -16
  23. package/src/components/molecules/button/button.styles.js +2 -4
  24. package/src/components/molecules/button/button.test.js +12 -0
  25. package/src/components/molecules/date-input/date-input.preview.tsx +25 -23
  26. package/src/components/molecules/message-input/__snapshots__/message-input.test.js.snap +4 -0
  27. package/src/components/molecules/message-input/message-input.component.d.ts +4 -6
  28. package/src/components/molecules/message-input/message-input.component.tsx +10 -12
  29. package/src/components/molecules/message-input/message-input.preview.tsx +28 -15
  30. package/src/components/molecules/password-input/password-input.component.d.ts +4 -6
  31. package/src/components/molecules/password-input/password-input.component.tsx +11 -15
  32. package/src/components/molecules/swipe/__snapshots__/swipe.test.js.snap +263 -420
  33. package/src/components/molecules/swipe/swipe.component.d.ts +4 -4
  34. package/src/components/molecules/swipe/swipe.component.tsx +47 -20
  35. package/src/components/molecules/swipe/swipe.preview.tsx +111 -51
  36. package/src/components/molecules/swipe/swipe.styles.d.ts +28 -0
  37. package/src/components/molecules/swipe/swipe.styles.js +32 -0
  38. package/src/components/molecules/swipe/swipe.test.js +1 -1
  39. package/src/components/molecules/tag/__snapshots__/tag.test.js.snap +10 -10
  40. package/src/components/molecules/tag/tag.component.d.ts +3 -8
  41. package/src/components/molecules/tag/tag.component.tsx +7 -13
  42. package/src/components/molecules/tag/tag.preview.tsx +22 -19
  43. package/src/components/molecules/tag/tag.styles.js +4 -2
  44. package/src/components/molecules/tag/tag.test.js +10 -2
  45. package/src/components/molecules/time-picker/__snapshots__/time-picker.test.js.snap +1868 -1776
  46. package/src/components/molecules/time-picker/time-picker.component.tsx +49 -23
  47. package/src/components/molecules/time-picker/time-picker.preview.tsx +5 -4
  48. package/src/components/molecules/time-picker/time-picker.styles.d.ts +16 -4
  49. package/src/components/molecules/time-picker/time-picker.styles.js +18 -6
  50. package/src/components/molecules/timestamp/__snapshots__/timestamp.test.js.snap +1 -1
  51. package/src/components/molecules/timestamp/timestamp.component.tsx +0 -2
  52. package/src/components/organisms/child-list-item/__snapshots__/child-list-item.test.js.snap +174 -162
  53. package/src/components/organisms/contact-item/__snapshots__/contact-item.test.js.snap +70 -127
  54. package/src/components/organisms/contact-item/contact-item.component.tsx +10 -9
  55. package/src/components/organisms/my-child-list-item/__snapshots__/my-child-list-item.test.js.snap +97 -89
  56. package/src/components/organisms/person-info-card/__snapshots__/person-info-card.test.js.snap +233 -209
  57. package/src/components/organisms/text-bubble/__snapshots__/text-bubble.test.js.snap +7 -7
  58. package/src/components/templates/modal/modal.component.tsx +0 -1
  59. package/src/components/templates/popover/components/modal/modal.component.tsx +0 -1
  60. package/src/components/templates/popover/components/modal/modal.styles.d.ts +2 -1
  61. package/src/components/templates/popover/components/modal/modal.styles.js +2 -2
  62. package/src/components/templates/popover/popover.component.tsx +27 -14
  63. package/src/components/templates/popover/popover.preview.tsx +63 -97
  64. package/src/components/templates/popover/popover.styles.d.ts +1 -1
  65. package/src/components/templates/popover/popover.styles.js +3 -1
  66. package/src/components/templates/popover-action/popover-action.component.d.ts +8 -0
  67. package/src/components/templates/popover-action/popover-action.component.tsx +119 -0
  68. package/src/components/templates/popover-action/popover-action.preview.d.ts +1 -0
  69. package/src/components/templates/popover-action/popover-action.preview.tsx +142 -0
  70. package/src/components/templates/popover-action/popover-action.styles.d.ts +26 -0
  71. package/src/components/templates/popover-action/popover-action.styles.js +31 -0
  72. package/src/utilities/toddle-datetime/toddle-datetime.class.d.ts +5 -0
  73. package/src/utilities/toddle-datetime/toddle-datetime.class.tsx +23 -0
  74. package/src/utilities/toddle-datetime/toddle-datetime.preview.tsx +15 -1
  75. package/src/utilities/toddle-datetime/toddle-datetime.test.js +10 -0
  76. package/src/components/molecules/swipe/Swipe.styles.d.ts +0 -7
  77. package/src/components/molecules/swipe/Swipe.styles.js +0 -10
@@ -7,9 +7,10 @@ import {Stylesheet} from './backdrop.styles';
7
7
 
8
8
  type PopoverBackdropProps = {
9
9
  isVisible: boolean;
10
+ touchBackDrop?: (value: boolean) => void;
10
11
  };
11
12
 
12
- const Backdrop = ({isVisible}: PopoverBackdropProps) => {
13
+ const Backdrop = ({isVisible, touchBackDrop}: PopoverBackdropProps) => {
13
14
  const context = useContext(ThemeCtx);
14
15
  const opacity = useMemo(() => new Animated.Value(0), []);
15
16
 
@@ -37,6 +38,11 @@ const Backdrop = ({isVisible}: PopoverBackdropProps) => {
37
38
  close();
38
39
  }
39
40
 
40
- return <Animated.View style={[styles.element, {opacity: opacity}]} />;
41
+ return (
42
+ <Animated.View
43
+ onTouchStart={() => (touchBackDrop ? touchBackDrop(false) : null)}
44
+ style={[styles.element, {opacity: opacity}]}
45
+ />
46
+ );
41
47
  };
42
48
  export {Backdrop as Backdrop};