@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.
- package/App.tsx +202 -191
- package/index.d.ts +2 -1
- package/index.tsx +2 -0
- package/package.json +2 -2
- package/src/components/atoms/backdrop/backdrop.component.d.ts +2 -1
- package/src/components/atoms/backdrop/backdrop.component.tsx +8 -2
- package/src/components/atoms/calendar/__snapshots__/calendar.test.js.snap +1821 -641
- package/src/components/atoms/text-input/text-input.component.d.ts +4 -5
- package/src/components/atoms/text-input/text-input.component.tsx +9 -13
- package/src/components/atoms/text-input/text-input.preview.tsx +5 -5
- package/src/components/atoms/text-input/text-input.test.js +4 -4
- package/src/components/molecules/avatar/__snapshots__/avatar.test.js.snap +70 -62
- package/src/components/molecules/avatar/avatar.component.d.ts +2 -1
- package/src/components/molecules/avatar/avatar.component.tsx +22 -11
- package/src/components/molecules/avatar/avatar.preview.tsx +58 -44
- package/src/components/molecules/avatar/avatar.styles.d.ts +54 -15
- package/src/components/molecules/avatar/avatar.styles.js +33 -5
- package/src/components/molecules/button/__snapshots__/button.test.js.snap +144 -0
- package/src/components/molecules/button/button.component.d.ts +6 -4
- package/src/components/molecules/button/button.component.tsx +30 -9
- package/src/components/molecules/button/button.preview.tsx +16 -1
- package/src/components/molecules/button/button.styles.d.ts +13 -16
- package/src/components/molecules/button/button.styles.js +2 -4
- package/src/components/molecules/button/button.test.js +12 -0
- package/src/components/molecules/date-input/date-input.preview.tsx +25 -23
- package/src/components/molecules/message-input/__snapshots__/message-input.test.js.snap +4 -0
- package/src/components/molecules/message-input/message-input.component.d.ts +4 -6
- package/src/components/molecules/message-input/message-input.component.tsx +10 -12
- package/src/components/molecules/message-input/message-input.preview.tsx +28 -15
- package/src/components/molecules/password-input/password-input.component.d.ts +4 -6
- package/src/components/molecules/password-input/password-input.component.tsx +11 -15
- package/src/components/molecules/swipe/__snapshots__/swipe.test.js.snap +263 -420
- package/src/components/molecules/swipe/swipe.component.d.ts +4 -4
- package/src/components/molecules/swipe/swipe.component.tsx +47 -20
- package/src/components/molecules/swipe/swipe.preview.tsx +111 -51
- package/src/components/molecules/swipe/swipe.styles.d.ts +28 -0
- package/src/components/molecules/swipe/swipe.styles.js +32 -0
- package/src/components/molecules/swipe/swipe.test.js +1 -1
- package/src/components/molecules/tag/__snapshots__/tag.test.js.snap +10 -10
- package/src/components/molecules/tag/tag.component.d.ts +3 -8
- package/src/components/molecules/tag/tag.component.tsx +7 -13
- package/src/components/molecules/tag/tag.preview.tsx +22 -19
- package/src/components/molecules/tag/tag.styles.js +4 -2
- package/src/components/molecules/tag/tag.test.js +10 -2
- package/src/components/molecules/time-picker/__snapshots__/time-picker.test.js.snap +1868 -1776
- package/src/components/molecules/time-picker/time-picker.component.tsx +49 -23
- package/src/components/molecules/time-picker/time-picker.preview.tsx +5 -4
- package/src/components/molecules/time-picker/time-picker.styles.d.ts +16 -4
- package/src/components/molecules/time-picker/time-picker.styles.js +18 -6
- package/src/components/molecules/timestamp/__snapshots__/timestamp.test.js.snap +1 -1
- package/src/components/molecules/timestamp/timestamp.component.tsx +0 -2
- package/src/components/organisms/child-list-item/__snapshots__/child-list-item.test.js.snap +174 -162
- package/src/components/organisms/contact-item/__snapshots__/contact-item.test.js.snap +70 -127
- package/src/components/organisms/contact-item/contact-item.component.tsx +10 -9
- package/src/components/organisms/my-child-list-item/__snapshots__/my-child-list-item.test.js.snap +97 -89
- package/src/components/organisms/person-info-card/__snapshots__/person-info-card.test.js.snap +233 -209
- package/src/components/organisms/text-bubble/__snapshots__/text-bubble.test.js.snap +7 -7
- package/src/components/templates/modal/modal.component.tsx +0 -1
- package/src/components/templates/popover/components/modal/modal.component.tsx +0 -1
- package/src/components/templates/popover/components/modal/modal.styles.d.ts +2 -1
- package/src/components/templates/popover/components/modal/modal.styles.js +2 -2
- package/src/components/templates/popover/popover.component.tsx +27 -14
- package/src/components/templates/popover/popover.preview.tsx +63 -97
- package/src/components/templates/popover/popover.styles.d.ts +1 -1
- package/src/components/templates/popover/popover.styles.js +3 -1
- package/src/components/templates/popover-action/popover-action.component.d.ts +8 -0
- package/src/components/templates/popover-action/popover-action.component.tsx +119 -0
- package/src/components/templates/popover-action/popover-action.preview.d.ts +1 -0
- package/src/components/templates/popover-action/popover-action.preview.tsx +142 -0
- package/src/components/templates/popover-action/popover-action.styles.d.ts +26 -0
- package/src/components/templates/popover-action/popover-action.styles.js +31 -0
- package/src/utilities/toddle-datetime/toddle-datetime.class.d.ts +5 -0
- package/src/utilities/toddle-datetime/toddle-datetime.class.tsx +23 -0
- package/src/utilities/toddle-datetime/toddle-datetime.preview.tsx +15 -1
- package/src/utilities/toddle-datetime/toddle-datetime.test.js +10 -0
- package/src/components/molecules/swipe/Swipe.styles.d.ts +0 -7
- 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
|
|
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};
|