@tactics/toddle-styleguide 1.0.2 → 1.0.4

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 (50) hide show
  1. package/App.tsx +11 -1
  2. package/assets/lottie/wave-for-daycares.json +1197 -0
  3. package/assets/lottie/wave-for-parents.json +1 -0
  4. package/index.d.ts +2 -1
  5. package/index.tsx +2 -0
  6. package/package.json +3 -1
  7. package/src/components/atoms/animated-wave/animated-wave.component.d.ts +1 -0
  8. package/src/components/atoms/animated-wave/animated-wave.component.tsx +28 -0
  9. package/src/components/atoms/animated-wave/animated-wave.preview.tsx +20 -0
  10. package/src/components/atoms/animated-wave/animated-wave.styles.d.ts +21 -0
  11. package/src/components/atoms/animated-wave/animated-wave.styles.js +25 -0
  12. package/src/components/atoms/calendar/__snapshots__/calendar.test.js.snap +173 -179
  13. package/src/components/atoms/heading-components/all-caps-heading/__snapshots__/all-caps-heading.test.js.snap +4 -0
  14. package/src/components/atoms/heading-components/all-caps-heading/all-caps-heading.component.d.ts +1 -1
  15. package/src/components/atoms/heading-components/all-caps-heading/all-caps-heading.component.tsx +12 -1
  16. package/src/components/atoms/heading-components/heading1/heading1.component.d.ts +1 -1
  17. package/src/components/atoms/heading-components/heading1/heading1.component.tsx +9 -1
  18. package/src/components/atoms/heading-components/heading3/heading3.component.d.ts +1 -1
  19. package/src/components/atoms/heading-components/heading3/heading3.component.tsx +9 -1
  20. package/src/components/atoms/heading-components/heading4/heading4.component.d.ts +1 -1
  21. package/src/components/atoms/heading-components/heading4/heading4.component.tsx +9 -1
  22. package/src/components/atoms/static-wave/static-wave.component.d.ts +8 -0
  23. package/src/components/atoms/static-wave/static-wave.component.tsx +46 -0
  24. package/src/components/atoms/static-wave/static-wave.styles.d.ts +14 -0
  25. package/src/components/atoms/static-wave/static-wave.styles.js +14 -0
  26. package/src/components/molecules/select-list-item/__snapshots__/select-list-item.test.js.snap +6 -0
  27. package/src/components/molecules/select-list-item/select-list-item-preview.tsx +1 -1
  28. package/src/components/molecules/select-list-item/select-list-item.component.tsx +6 -1
  29. package/src/components/molecules/wave-background/__snapshots__/wave.test.js.snap +177 -0
  30. package/src/components/molecules/wave-background/wave.component.d.ts +2 -0
  31. package/src/components/molecules/wave-background/wave.component.tsx +35 -0
  32. package/src/components/molecules/wave-background/wave.preview.d.ts +1 -0
  33. package/src/components/molecules/wave-background/wave.preview.tsx +78 -0
  34. package/src/components/molecules/wave-background/wave.styles.d.ts +13 -0
  35. package/src/components/molecules/wave-background/wave.styles.js +13 -0
  36. package/src/components/molecules/wave-background/wave.test.js +25 -0
  37. package/src/components/organisms/loading-indicator/loading-indicator.test.js +1 -0
  38. package/src/components/organisms/my-child-list-item/__snapshots__/my-child-list-item.test.js.snap +2 -0
  39. package/src/components/organisms/my-child-list-item/my-child-list-item.component.tsx +6 -1
  40. package/src/components/organisms/my-child-list-item/my-child-list-item.preview.tsx +1 -1
  41. package/src/components/templates/modal/modal.preview.tsx +1 -1
  42. package/src/components/templates/popover/components/modal/heading/heading.component.tsx +7 -1
  43. package/src/components/templates/popover/components/modal/heading/heading.styles.d.ts +4 -0
  44. package/src/components/templates/popover/components/modal/heading/heading.styles.js +4 -0
  45. package/src/context/theme.context.d.ts +5 -0
  46. package/src/context/theme.context.ts +3 -0
  47. package/src/theme/provider/parent.theme.d.ts +3 -0
  48. package/src/theme/provider/parent.theme.ts +3 -0
  49. package/src/theme/provider/staff-member.theme.d.ts +3 -0
  50. package/src/theme/provider/staff-member.theme.ts +3 -0
@@ -20,6 +20,7 @@ exports[`Test for the all caps heading component should render an all caps headi
20
20
  "textAlign": undefined,
21
21
  "width": "100%",
22
22
  },
23
+ undefined,
23
24
  ]
24
25
  }
25
26
  >
@@ -47,6 +48,7 @@ exports[`Test for the all caps heading component should render an all caps headi
47
48
  "textAlign": undefined,
48
49
  "width": "100%",
49
50
  },
51
+ undefined,
50
52
  ]
51
53
  }
52
54
  >
@@ -74,6 +76,7 @@ exports[`Test for the all caps heading component should render an all caps headi
74
76
  "textAlign": undefined,
75
77
  "width": "100%",
76
78
  },
79
+ undefined,
77
80
  ]
78
81
  }
79
82
  >
@@ -101,6 +104,7 @@ exports[`Test for the all caps heading component should render an all caps headi
101
104
  "textAlign": undefined,
102
105
  "width": "100%",
103
106
  },
107
+ undefined,
104
108
  ]
105
109
  }
106
110
  >
@@ -1,2 +1,2 @@
1
1
  import { TextProperties } from '../../../../types/text-properties.type';
2
- export declare const AllCapsHeading: ({ bold, children, textColor, textAlign, }: TextProperties) => JSX.Element;
2
+ export declare const AllCapsHeading: ({ bold, children, textColor, textAlign, numberOfLines, ellipsizeMode, addStyle, }: TextProperties) => JSX.Element;
@@ -9,9 +9,20 @@ export const AllCapsHeading = ({
9
9
  children,
10
10
  textColor,
11
11
  textAlign,
12
+ numberOfLines,
13
+ ellipsizeMode,
14
+ addStyle,
12
15
  }: TextProperties) => {
13
16
  const Context = useContext(ThemeCtx);
14
17
  const styles = Stylesheet(Context, bold, textColor, textAlign);
15
18
 
16
- return <Text style={[styles.allCaps, styles.main]}>{children}</Text>;
19
+ return (
20
+ <Text
21
+ numberOfLines={numberOfLines}
22
+ ellipsizeMode={ellipsizeMode}
23
+ style={[styles.allCaps, styles.main, addStyle]}
24
+ >
25
+ {children}
26
+ </Text>
27
+ );
17
28
  };
@@ -1,2 +1,2 @@
1
1
  import { TextProperties } from '../../../../types/text-properties.type';
2
- export declare const Heading1: ({ bold, children, textColor, textAlign, addStyle, }: TextProperties) => JSX.Element;
2
+ export declare const Heading1: ({ bold, children, textColor, textAlign, addStyle, ellipsizeMode, numberOfLines, }: TextProperties) => JSX.Element;
@@ -10,11 +10,19 @@ export const Heading1 = ({
10
10
  textColor,
11
11
  textAlign,
12
12
  addStyle,
13
+ ellipsizeMode,
14
+ numberOfLines,
13
15
  }: TextProperties) => {
14
16
  const Context = useContext(ThemeCtx);
15
17
  const styles = Stylesheet(Context, bold, textColor, textAlign);
16
18
 
17
19
  return (
18
- <Text style={[styles.heading1, styles.main, addStyle]}>{children}</Text>
20
+ <Text
21
+ numberOfLines={numberOfLines}
22
+ ellipsizeMode={ellipsizeMode}
23
+ style={[styles.heading1, styles.main, addStyle]}
24
+ >
25
+ {children}
26
+ </Text>
19
27
  );
20
28
  };
@@ -1,2 +1,2 @@
1
1
  import { TextProperties } from '../../../../types/text-properties.type';
2
- export declare const Heading3: ({ bold, children, textColor, textAlign, addStyle, }: TextProperties) => JSX.Element;
2
+ export declare const Heading3: ({ bold, children, textColor, textAlign, addStyle, numberOfLines, ellipsizeMode, }: TextProperties) => JSX.Element;
@@ -10,11 +10,19 @@ export const Heading3 = ({
10
10
  textColor,
11
11
  textAlign,
12
12
  addStyle,
13
+ numberOfLines,
14
+ ellipsizeMode,
13
15
  }: TextProperties) => {
14
16
  const Context = useContext(ThemeCtx);
15
17
  const styles = Stylesheet(Context, bold, textColor, textAlign);
16
18
 
17
19
  return (
18
- <Text style={[styles.heading3, styles.main, addStyle]}>{children}</Text>
20
+ <Text
21
+ numberOfLines={numberOfLines}
22
+ ellipsizeMode={ellipsizeMode}
23
+ style={[styles.heading3, styles.main, addStyle]}
24
+ >
25
+ {children}
26
+ </Text>
19
27
  );
20
28
  };
@@ -1,2 +1,2 @@
1
1
  import { TextProperties } from '../../../../types/text-properties.type';
2
- export declare const Heading4: ({ bold, children, textColor, textAlign, addStyle, }: TextProperties) => JSX.Element;
2
+ export declare const Heading4: ({ bold, children, textColor, textAlign, addStyle, numberOfLines, ellipsizeMode, }: TextProperties) => JSX.Element;
@@ -10,11 +10,19 @@ export const Heading4 = ({
10
10
  textColor,
11
11
  textAlign,
12
12
  addStyle,
13
+ numberOfLines,
14
+ ellipsizeMode,
13
15
  }: TextProperties) => {
14
16
  const Context = useContext(ThemeCtx);
15
17
  const styles = Stylesheet(Context, bold, textColor, textAlign);
16
18
 
17
19
  return (
18
- <Text style={[styles.heading4, styles.main, addStyle]}>{children}</Text>
20
+ <Text
21
+ numberOfLines={numberOfLines}
22
+ ellipsizeMode={ellipsizeMode}
23
+ style={[styles.heading4, styles.main, addStyle]}
24
+ >
25
+ {children}
26
+ </Text>
19
27
  );
20
28
  };
@@ -0,0 +1,8 @@
1
+ import { ViewStyle } from 'react-native';
2
+ export declare type WaveProps = {
3
+ customStyle?: ViewStyle;
4
+ customWavePath?: string;
5
+ heightSvgContainer?: number;
6
+ positionTop?: number;
7
+ };
8
+ export declare const StaticWave: ({ customStyle, customWavePath, heightSvgContainer, positionTop, }: WaveProps) => JSX.Element;
@@ -0,0 +1,46 @@
1
+ import React, {useContext} from 'react';
2
+ import {Dimensions, View, ViewStyle} from 'react-native';
3
+ import Svg, {Path} from 'react-native-svg';
4
+ import {ThemeCtx} from '../../../context/theme.context';
5
+ import {Stylesheet} from './static-wave.styles';
6
+
7
+ // https://getwaves.io/ -> create custom waves
8
+
9
+ export type WaveProps = {
10
+ customStyle?: ViewStyle;
11
+ customWavePath?: string;
12
+ heightSvgContainer?: number;
13
+ positionTop?: number;
14
+ };
15
+
16
+ export const StaticWave = ({
17
+ customStyle,
18
+ customWavePath,
19
+ heightSvgContainer,
20
+ positionTop,
21
+ }: WaveProps) => {
22
+ const {width} = Dimensions.get('window');
23
+ const Context = useContext(ThemeCtx);
24
+ const styles = Stylesheet(Context, heightSvgContainer, width);
25
+ return (
26
+ <View style={!customStyle ? styles.rootContainer : customStyle}>
27
+ <View style={styles.svgContainer}>
28
+ <Svg
29
+ height="60%"
30
+ width="100%"
31
+ viewBox="0 0 1440 320"
32
+ style={{position: 'absolute', top: !positionTop ? 210 : positionTop}}
33
+ >
34
+ <Path
35
+ fill={Context.colors.main['5']}
36
+ d={
37
+ !customWavePath
38
+ ? 'M0,160L60,133.3C120,107,240,53,360,58.7C480,64,600,128,720,181.3C840,235,960,277,1080,282.7C1200,288,1320,256,1380,240L1440,224L1440,0L1380,0C1320,0,1200,0,1080,0C960,0,840,0,720,0C600,0,480,0,360,0C240,0,120,0,60,0L0,0Z'
39
+ : customWavePath
40
+ }
41
+ />
42
+ </Svg>
43
+ </View>
44
+ </View>
45
+ );
46
+ };
@@ -0,0 +1,14 @@
1
+ export function Stylesheet(
2
+ Context: any,
3
+ height: any,
4
+ width: any
5
+ ): {
6
+ rootContainer: {
7
+ position: 'absolute';
8
+ width: any;
9
+ };
10
+ svgContainer: {
11
+ backgroundColor: any;
12
+ height: any;
13
+ };
14
+ };
@@ -0,0 +1,14 @@
1
+ import React from 'react';
2
+ import {StyleSheet} from 'react-native';
3
+
4
+ export const Stylesheet = (Context, height, width) =>
5
+ StyleSheet.create({
6
+ rootContainer: {
7
+ position: 'absolute',
8
+ width: width,
9
+ },
10
+ svgContainer: {
11
+ backgroundColor: Context.colors.main['5'],
12
+ height: !height ? 250 : height,
13
+ },
14
+ });
@@ -103,6 +103,8 @@ exports[`test button component should render a select-list-item component with 1
103
103
  >
104
104
  <View>
105
105
  <Text
106
+ ellipsizeMode="tail"
107
+ numberOfLines={2}
106
108
  style={
107
109
  [
108
110
  [
@@ -315,6 +317,8 @@ exports[`test button component should render a select-list-item component with 1
315
317
  >
316
318
  <View>
317
319
  <Text
320
+ ellipsizeMode="tail"
321
+ numberOfLines={2}
318
322
  style={
319
323
  [
320
324
  [
@@ -527,6 +531,8 @@ exports[`test button component should render a select-list-item component with 2
527
531
  >
528
532
  <View>
529
533
  <Text
534
+ ellipsizeMode="tail"
535
+ numberOfLines={2}
530
536
  style={
531
537
  [
532
538
  [
@@ -15,7 +15,7 @@ export const SelectListItemPreview = ({}: {}) => {
15
15
  }}
16
16
  >
17
17
  <SelectListItem
18
- title="Vlindertjes"
18
+ title="Vlindertjes VlindertjesVlindertjesVlindertjesVlindertjes"
19
19
  subtitle={'Leeftijd 2 tot 4 jaar'}
20
20
  icon={<Icon style={'regular'} name={'user-group'} size={27} />}
21
21
  onPress={() => console.log('clicked')}
@@ -39,7 +39,12 @@ const SelectListItem = ({
39
39
  </View>
40
40
  <View style={styles.textContainer}>
41
41
  <View>
42
- <Heading2 bold={true} textColor={context.colors.ui.white}>
42
+ <Heading2
43
+ bold={true}
44
+ textColor={context.colors.ui.white}
45
+ numberOfLines={2}
46
+ ellipsizeMode={'tail'}
47
+ >
43
48
  {title}
44
49
  </Heading2>
45
50
  </View>
@@ -0,0 +1,177 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`test wave background should render a wave background 1`] = `
4
+ <View
5
+ style={
6
+ {
7
+ "backgroundColor": "#4055A8",
8
+ "height": 1334,
9
+ "position": "absolute",
10
+ "width": 750,
11
+ "zIndex": -1,
12
+ }
13
+ }
14
+ >
15
+ <View
16
+ style={
17
+ {
18
+ "alignItems": "center",
19
+ "flex": 1,
20
+ "justifyContent": "flex-start",
21
+ }
22
+ }
23
+ >
24
+ <View
25
+ style={
26
+ {
27
+ "alignItems": "center",
28
+ "position": "absolute",
29
+ "top": "-1%",
30
+ "width": "100%",
31
+ "zIndex": -1,
32
+ }
33
+ }
34
+ >
35
+ <View
36
+ style={
37
+ [
38
+ {
39
+ "aspectRatio": 1,
40
+ },
41
+ undefined,
42
+ {
43
+ "backgroundColor": "#647ACB",
44
+ "width": 814,
45
+ },
46
+ ]
47
+ }
48
+ >
49
+ <View
50
+ autoPlay={true}
51
+ cacheComposition={true}
52
+ collapsable={false}
53
+ colorFilters={[]}
54
+ enableMergePathsAndroidForKitKatAndAbove={false}
55
+ forwardedRef={[Function]}
56
+ loop={true}
57
+ onAnimationFinish={[Function]}
58
+ onLayout={[Function]}
59
+ progress={0}
60
+ resizeMode="contain"
61
+ sourceJson="{"nm":"circle_blue","mn":"","layers":[{"ty":0,"nm":"Shape Layer 1","mn":"","sr":1,"st":0,"op":60.0000024438501,"ip":0,"hd":false,"cl":"","ln":"","ddd":0,"bm":0,"hasMask":true,"td":1,"ao":0,"ks":{"a":{"a":0,"k":[89,89,0],"ix":1},"s":{"a":0,"k":[561.7977528089888,561.7977528089888,100],"ix":6},"sk":{"a":0,"k":0},"p":{"a":0,"k":[500.00000000000006,500.00000000000006,0],"ix":2},"r":{"a":0,"k":0,"ix":10},"sa":{"a":0,"k":0},"o":{"a":0,"k":100,"ix":11}},"ef":[],"masksProperties":[{"nm":"Mask 1","mn":"","inv":false,"mode":"a","x":{"a":0,"k":0,"ix":4},"o":{"a":0,"k":100,"ix":3},"pt":{"a":0,"k":{"c":true,"i":[[49.153,0],[0,-49.153],[-49.153,0],[0,49.153]],"o":[[-49.153,0],[0,49.153],[49.153,0],[0,-49.153]],"v":[[89,0],[0,89],[89,178],[178,89]]},"ix":1}}],"w":178,"h":178,"refId":"comp_0","ind":1},{"ty":4,"nm":"Shape Layer 1","mn":"","sr":1,"st":0,"op":60.0000024438501,"ip":0,"hd":false,"cl":"","ln":"","ddd":0,"bm":0,"tt":1,"hasMask":false,"ao":0,"ks":{"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[561.7977528089888,561.7977528089888,100],"ix":6},"sk":{"a":0,"k":0},"p":{"a":0,"k":[494.8314606741573,233.8876404494382,0],"ix":2},"r":{"a":0,"k":0,"ix":10},"sa":{"a":0,"k":0},"o":{"a":0,"k":100,"ix":11}},"ef":[],"shapes":[{"ty":"gr","bm":0,"cl":"","ln":"","hd":false,"mn":"ADBE Vector Group","nm":"Rectangle 1","ix":1,"cix":2,"np":2,"it":[{"ty":"rc","bm":0,"cl":"","ln":"","hd":false,"mn":"ADBE Vector Shape - Rect","nm":"Rectangle Path 1","d":1,"p":{"a":0,"k":[0,0],"ix":3},"r":{"a":0,"k":0,"ix":4},"s":{"a":0,"k":[178,178],"ix":2}},{"ty":"tr","a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"sk":{"a":0,"k":0,"ix":4},"p":{"a":0,"k":[0.92,47.368],"ix":2},"r":{"a":0,"k":0,"ix":6},"sa":{"a":0,"k":0,"ix":5},"o":{"a":0,"k":100,"ix":7}}]},{"ty":"gf","bm":0,"cl":"","ln":"","hd":false,"mn":"ADBE Vector Graphic - G-Fill","nm":"Gradient Fill 2","e":{"a":0,"k":[0,45],"ix":6},"g":{"p":3,"k":{"a":0,"k":[0,0.25098039215686274,0.3333333333333333,0.6588235294117647,0.5,0.25098039215686274,0.3333333333333333,0.6588235294117647,1,0.25098039215686274,0.3333333333333333,0.6588235294117647],"ix":9}},"t":1,"a":{"a":0,"k":0},"h":{"a":0,"k":0},"s":{"a":0,"k":[0,360],"ix":5},"r":1,"o":{"a":0,"k":89,"ix":10}},{"ty":"gf","bm":0,"cl":"","ln":"","hd":false,"mn":"ADBE Vector Graphic - G-Fill","nm":"Gradient Fill 1","e":{"a":0,"k":[75,0],"ix":6},"g":{"p":3,"k":{"a":0,"k":[0,0.25098039215686274,0.3333333333333333,0.6588235294117647,0.5,0.25098039215686274,0.3333333333333333,0.6588235294117647,1,0.25098039215686274,0.3333333333333333,0.6588235294117647],"ix":9}},"t":1,"a":{"a":0,"k":0},"h":{"a":0,"k":0},"s":{"a":0,"k":[-54,0],"ix":5},"r":1,"o":{"a":0,"k":100,"ix":10}}],"ind":2}],"ddd":0,"h":1000,"w":1000,"meta":{"a":"","k":"","d":"","g":"LottieFiles AE 0.1.21","tc":"#000000"},"v":"3.4.1","fr":8,"op":60.0000024438501,"ip":0,"assets":[{"nm":"","mn":"","layers":[{"ty":4,"nm":"wave_2 Outlines","mn":"","sr":1,"st":0,"op":60.0000024438501,"ip":0,"hd":false,"cl":"","ln":"","ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":0,"k":[178,89,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6},"sk":{"a":0,"k":0},"p":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0,89,0],"t":0,"ti":[-29.667,0,0],"to":[29.667,0,0]},{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[178,89,0],"t":59.0000024031193}],"ix":2},"r":{"a":0,"k":0,"ix":10},"sa":{"a":0,"k":0},"o":{"a":0,"k":100,"ix":11}},"ef":[],"shapes":[{"ty":"gr","bm":0,"cl":"","ln":"","hd":false,"mn":"ADBE Vector Group","nm":"Group 1","ix":1,"cix":2,"np":2,"it":[{"ty":"sh","bm":0,"cl":"","ln":"","hd":false,"mn":"ADBE Vector Shape - Group","nm":"Path 2","ix":1,"d":1,"ks":{"a":0,"k":{"c":true,"i":[[0,0],[0,0],[0,0],[45.858,9.977],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[45.859,9.977],[13.272,-0.001]],"o":[[0,0],[-0.03,0.007],[0,0],[-45.859,-9.977],[0,0],[0,0],[0,0],[0,0],[-0.031,0.007],[0,0],[-15.288,-3.326],[-26.538,0]],"v":[[0,-22.84],[0,-22.852],[-0.052,-22.84],[-88.423,-22.84],[-178,-22.84],[-178,32.816],[0,32.816],[178,32.816],[178,-22.852],[177.948,-22.84],[89.576,-22.84],[45.971,-27.273]]},"ix":2}},{"ty":"mm","bm":0,"cl":"","ln":"","hd":false,"mn":"ADBE Vector Filter - Merge","nm":"Merge Paths 1","mm":4},{"ty":"tr","a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"sk":{"a":0,"k":0,"ix":4},"p":{"a":0,"k":[178,145.184],"ix":2},"r":{"a":0,"k":0,"ix":6},"sa":{"a":0,"k":0,"ix":5},"o":{"a":0,"k":100,"ix":7}}]},{"ty":"fl","bm":0,"cl":"","ln":"","hd":false,"mn":"ADBE Vector Graphic - Fill","nm":"Fill 1","c":{"a":0,"k":[0.251,0.3333,0.6588],"ix":4},"r":1,"o":{"a":0,"k":100,"ix":5}}],"ind":1},{"ty":4,"nm":"wave_1 Outlines","mn":"","sr":1,"st":0,"op":60.0000024438501,"ip":0,"hd":false,"cl":"","ln":"","ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":0,"k":[178,89,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6},"sk":{"a":0,"k":0},"p":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[178,91,0],"t":0,"ti":[29.667,0,0],"to":[-29.667,0,0]},{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0,91,0],"t":59.0000024031193}],"ix":2},"r":{"a":0,"k":0,"ix":10},"sa":{"a":0,"k":0},"o":{"a":0,"k":50,"ix":11}},"ef":[],"shapes":[{"ty":"gr","bm":0,"cl":"","ln":"","hd":false,"mn":"ADBE Vector Group","nm":"Group 1","ix":1,"cix":2,"np":2,"it":[{"ty":"sh","bm":0,"cl":"","ln":"","hd":false,"mn":"ADBE Vector Shape - Group","nm":"Path 2","ix":1,"d":1,"ks":{"a":0,"k":{"c":true,"i":[[15.288,-3.326],[0,0],[0.031,0.007],[0,0],[45.858,-9.977],[0,0],[0.031,0.007],[0,0],[0,0],[0,0],[0,0],[26.539,0]],"o":[[-45.857,9.977],[0,0],[0,0],[0,0],[-45.858,9.977],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[-13.272,-0.001]],"v":[[88.423,-22.84],[0.051,-22.84],[0,-22.852],[0,-22.84],[-89.576,-22.84],[-177.948,-22.84],[-178,-22.852],[-178,32.816],[0,32.816],[178,32.816],[178,-22.84],[132.029,-27.273]]},"ix":2}},{"ty":"mm","bm":0,"cl":"","ln":"","hd":false,"mn":"ADBE Vector Filter - Merge","nm":"Merge Paths 1","mm":4},{"ty":"tr","a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"sk":{"a":0,"k":0,"ix":4},"p":{"a":0,"k":[178,145.184],"ix":2},"r":{"a":0,"k":0,"ix":6},"sa":{"a":0,"k":0,"ix":5},"o":{"a":0,"k":100,"ix":7}}]},{"ty":"fl","bm":0,"cl":"","ln":"","hd":false,"mn":"ADBE Vector Graphic - Fill","nm":"Fill 1","c":{"a":0,"k":[0.251,0.3333,0.6588],"ix":4},"r":1,"o":{"a":0,"k":100,"ix":5}}],"ind":2}],"id":"comp_0"}]}"
62
+ speed={1}
63
+ style={
64
+ {
65
+ "aspectRatio": 1,
66
+ "backgroundColor": "#647ACB",
67
+ "height": "100%",
68
+ "width": 814,
69
+ }
70
+ }
71
+ textFiltersAndroid={[]}
72
+ textFiltersIOS={[]}
73
+ />
74
+ </View>
75
+ </View>
76
+ <View
77
+ style={
78
+ {
79
+ "backgroundColor": "#4055A8",
80
+ "height": "30%",
81
+ "position": "absolute",
82
+ "top": "38%",
83
+ "width": "100%",
84
+ }
85
+ }
86
+ />
87
+ </View>
88
+ </View>
89
+ `;
90
+
91
+ exports[`test wave background should render a wave background for android specific we will give some props that it should render 1`] = `
92
+ <View
93
+ style={
94
+ {
95
+ "backgroundColor": "#4055A8",
96
+ "height": 1334,
97
+ "position": "absolute",
98
+ "width": 750,
99
+ "zIndex": -1,
100
+ }
101
+ }
102
+ >
103
+ <View
104
+ style={
105
+ {
106
+ "alignItems": "center",
107
+ "flex": 1,
108
+ "justifyContent": "flex-start",
109
+ }
110
+ }
111
+ >
112
+ <View
113
+ style={
114
+ {
115
+ "alignItems": "center",
116
+ "position": "absolute",
117
+ "top": "-1%",
118
+ "width": "100%",
119
+ "zIndex": -1,
120
+ }
121
+ }
122
+ >
123
+ <View
124
+ style={
125
+ [
126
+ {
127
+ "aspectRatio": 1,
128
+ },
129
+ undefined,
130
+ {
131
+ "backgroundColor": "#647ACB",
132
+ "width": 814,
133
+ },
134
+ ]
135
+ }
136
+ >
137
+ <View
138
+ autoPlay={true}
139
+ cacheComposition={true}
140
+ collapsable={false}
141
+ colorFilters={[]}
142
+ enableMergePathsAndroidForKitKatAndAbove={false}
143
+ forwardedRef={[Function]}
144
+ loop={true}
145
+ onAnimationFinish={[Function]}
146
+ onLayout={[Function]}
147
+ progress={0}
148
+ resizeMode="contain"
149
+ sourceJson="{"nm":"circle_blue","mn":"","layers":[{"ty":0,"nm":"Shape Layer 1","mn":"","sr":1,"st":0,"op":60.0000024438501,"ip":0,"hd":false,"cl":"","ln":"","ddd":0,"bm":0,"hasMask":true,"td":1,"ao":0,"ks":{"a":{"a":0,"k":[89,89,0],"ix":1},"s":{"a":0,"k":[561.7977528089888,561.7977528089888,100],"ix":6},"sk":{"a":0,"k":0},"p":{"a":0,"k":[500.00000000000006,500.00000000000006,0],"ix":2},"r":{"a":0,"k":0,"ix":10},"sa":{"a":0,"k":0},"o":{"a":0,"k":100,"ix":11}},"ef":[],"masksProperties":[{"nm":"Mask 1","mn":"","inv":false,"mode":"a","x":{"a":0,"k":0,"ix":4},"o":{"a":0,"k":100,"ix":3},"pt":{"a":0,"k":{"c":true,"i":[[49.153,0],[0,-49.153],[-49.153,0],[0,49.153]],"o":[[-49.153,0],[0,49.153],[49.153,0],[0,-49.153]],"v":[[89,0],[0,89],[89,178],[178,89]]},"ix":1}}],"w":178,"h":178,"refId":"comp_0","ind":1},{"ty":4,"nm":"Shape Layer 1","mn":"","sr":1,"st":0,"op":60.0000024438501,"ip":0,"hd":false,"cl":"","ln":"","ddd":0,"bm":0,"tt":1,"hasMask":false,"ao":0,"ks":{"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[561.7977528089888,561.7977528089888,100],"ix":6},"sk":{"a":0,"k":0},"p":{"a":0,"k":[494.8314606741573,233.8876404494382,0],"ix":2},"r":{"a":0,"k":0,"ix":10},"sa":{"a":0,"k":0},"o":{"a":0,"k":100,"ix":11}},"ef":[],"shapes":[{"ty":"gr","bm":0,"cl":"","ln":"","hd":false,"mn":"ADBE Vector Group","nm":"Rectangle 1","ix":1,"cix":2,"np":2,"it":[{"ty":"rc","bm":0,"cl":"","ln":"","hd":false,"mn":"ADBE Vector Shape - Rect","nm":"Rectangle Path 1","d":1,"p":{"a":0,"k":[0,0],"ix":3},"r":{"a":0,"k":0,"ix":4},"s":{"a":0,"k":[178,178],"ix":2}},{"ty":"tr","a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"sk":{"a":0,"k":0,"ix":4},"p":{"a":0,"k":[0.92,47.368],"ix":2},"r":{"a":0,"k":0,"ix":6},"sa":{"a":0,"k":0,"ix":5},"o":{"a":0,"k":100,"ix":7}}]},{"ty":"gf","bm":0,"cl":"","ln":"","hd":false,"mn":"ADBE Vector Graphic - G-Fill","nm":"Gradient Fill 2","e":{"a":0,"k":[0,45],"ix":6},"g":{"p":3,"k":{"a":0,"k":[0,0.25098039215686274,0.3333333333333333,0.6588235294117647,0.5,0.25098039215686274,0.3333333333333333,0.6588235294117647,1,0.25098039215686274,0.3333333333333333,0.6588235294117647],"ix":9}},"t":1,"a":{"a":0,"k":0},"h":{"a":0,"k":0},"s":{"a":0,"k":[0,360],"ix":5},"r":1,"o":{"a":0,"k":89,"ix":10}},{"ty":"gf","bm":0,"cl":"","ln":"","hd":false,"mn":"ADBE Vector Graphic - G-Fill","nm":"Gradient Fill 1","e":{"a":0,"k":[75,0],"ix":6},"g":{"p":3,"k":{"a":0,"k":[0,0.25098039215686274,0.3333333333333333,0.6588235294117647,0.5,0.25098039215686274,0.3333333333333333,0.6588235294117647,1,0.25098039215686274,0.3333333333333333,0.6588235294117647],"ix":9}},"t":1,"a":{"a":0,"k":0},"h":{"a":0,"k":0},"s":{"a":0,"k":[-54,0],"ix":5},"r":1,"o":{"a":0,"k":100,"ix":10}}],"ind":2}],"ddd":0,"h":1000,"w":1000,"meta":{"a":"","k":"","d":"","g":"LottieFiles AE 0.1.21","tc":"#000000"},"v":"3.4.1","fr":8,"op":60.0000024438501,"ip":0,"assets":[{"nm":"","mn":"","layers":[{"ty":4,"nm":"wave_2 Outlines","mn":"","sr":1,"st":0,"op":60.0000024438501,"ip":0,"hd":false,"cl":"","ln":"","ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":0,"k":[178,89,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6},"sk":{"a":0,"k":0},"p":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0,89,0],"t":0,"ti":[-29.667,0,0],"to":[29.667,0,0]},{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[178,89,0],"t":59.0000024031193}],"ix":2},"r":{"a":0,"k":0,"ix":10},"sa":{"a":0,"k":0},"o":{"a":0,"k":100,"ix":11}},"ef":[],"shapes":[{"ty":"gr","bm":0,"cl":"","ln":"","hd":false,"mn":"ADBE Vector Group","nm":"Group 1","ix":1,"cix":2,"np":2,"it":[{"ty":"sh","bm":0,"cl":"","ln":"","hd":false,"mn":"ADBE Vector Shape - Group","nm":"Path 2","ix":1,"d":1,"ks":{"a":0,"k":{"c":true,"i":[[0,0],[0,0],[0,0],[45.858,9.977],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[45.859,9.977],[13.272,-0.001]],"o":[[0,0],[-0.03,0.007],[0,0],[-45.859,-9.977],[0,0],[0,0],[0,0],[0,0],[-0.031,0.007],[0,0],[-15.288,-3.326],[-26.538,0]],"v":[[0,-22.84],[0,-22.852],[-0.052,-22.84],[-88.423,-22.84],[-178,-22.84],[-178,32.816],[0,32.816],[178,32.816],[178,-22.852],[177.948,-22.84],[89.576,-22.84],[45.971,-27.273]]},"ix":2}},{"ty":"mm","bm":0,"cl":"","ln":"","hd":false,"mn":"ADBE Vector Filter - Merge","nm":"Merge Paths 1","mm":4},{"ty":"tr","a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"sk":{"a":0,"k":0,"ix":4},"p":{"a":0,"k":[178,145.184],"ix":2},"r":{"a":0,"k":0,"ix":6},"sa":{"a":0,"k":0,"ix":5},"o":{"a":0,"k":100,"ix":7}}]},{"ty":"fl","bm":0,"cl":"","ln":"","hd":false,"mn":"ADBE Vector Graphic - Fill","nm":"Fill 1","c":{"a":0,"k":[0.251,0.3333,0.6588],"ix":4},"r":1,"o":{"a":0,"k":100,"ix":5}}],"ind":1},{"ty":4,"nm":"wave_1 Outlines","mn":"","sr":1,"st":0,"op":60.0000024438501,"ip":0,"hd":false,"cl":"","ln":"","ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":0,"k":[178,89,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6},"sk":{"a":0,"k":0},"p":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[178,91,0],"t":0,"ti":[29.667,0,0],"to":[-29.667,0,0]},{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0,91,0],"t":59.0000024031193}],"ix":2},"r":{"a":0,"k":0,"ix":10},"sa":{"a":0,"k":0},"o":{"a":0,"k":50,"ix":11}},"ef":[],"shapes":[{"ty":"gr","bm":0,"cl":"","ln":"","hd":false,"mn":"ADBE Vector Group","nm":"Group 1","ix":1,"cix":2,"np":2,"it":[{"ty":"sh","bm":0,"cl":"","ln":"","hd":false,"mn":"ADBE Vector Shape - Group","nm":"Path 2","ix":1,"d":1,"ks":{"a":0,"k":{"c":true,"i":[[15.288,-3.326],[0,0],[0.031,0.007],[0,0],[45.858,-9.977],[0,0],[0.031,0.007],[0,0],[0,0],[0,0],[0,0],[26.539,0]],"o":[[-45.857,9.977],[0,0],[0,0],[0,0],[-45.858,9.977],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[-13.272,-0.001]],"v":[[88.423,-22.84],[0.051,-22.84],[0,-22.852],[0,-22.84],[-89.576,-22.84],[-177.948,-22.84],[-178,-22.852],[-178,32.816],[0,32.816],[178,32.816],[178,-22.84],[132.029,-27.273]]},"ix":2}},{"ty":"mm","bm":0,"cl":"","ln":"","hd":false,"mn":"ADBE Vector Filter - Merge","nm":"Merge Paths 1","mm":4},{"ty":"tr","a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"sk":{"a":0,"k":0,"ix":4},"p":{"a":0,"k":[178,145.184],"ix":2},"r":{"a":0,"k":0,"ix":6},"sa":{"a":0,"k":0,"ix":5},"o":{"a":0,"k":100,"ix":7}}]},{"ty":"fl","bm":0,"cl":"","ln":"","hd":false,"mn":"ADBE Vector Graphic - Fill","nm":"Fill 1","c":{"a":0,"k":[0.251,0.3333,0.6588],"ix":4},"r":1,"o":{"a":0,"k":100,"ix":5}}],"ind":2}],"id":"comp_0"}]}"
150
+ speed={1}
151
+ style={
152
+ {
153
+ "aspectRatio": 1,
154
+ "backgroundColor": "#647ACB",
155
+ "height": "100%",
156
+ "width": 814,
157
+ }
158
+ }
159
+ textFiltersAndroid={[]}
160
+ textFiltersIOS={[]}
161
+ />
162
+ </View>
163
+ </View>
164
+ <View
165
+ style={
166
+ {
167
+ "backgroundColor": "#4055A8",
168
+ "height": "30%",
169
+ "position": "absolute",
170
+ "top": "38%",
171
+ "width": "100%",
172
+ }
173
+ }
174
+ />
175
+ </View>
176
+ </View>
177
+ `;
@@ -0,0 +1,2 @@
1
+ import { WaveProps } from '../../atoms/static-wave/static-wave.component';
2
+ export declare const WaveBackground: ({ customWavePath, customStyle, heightSvgContainer, positionTop, }: WaveProps) => JSX.Element;
@@ -0,0 +1,35 @@
1
+ import React, {useContext} from 'react';
2
+ import {Dimensions, Platform, View} from 'react-native';
3
+ import {
4
+ StaticWave,
5
+ WaveProps,
6
+ } from '../../atoms/static-wave/static-wave.component';
7
+ import {Stylesheet} from './wave.styles';
8
+ import {ThemeCtx} from '../../../context/theme.context';
9
+ import {AnimatedWave} from '../../atoms/animated-wave/animated-wave.component';
10
+
11
+ export const WaveBackground = ({
12
+ customWavePath,
13
+ customStyle,
14
+ heightSvgContainer,
15
+ positionTop,
16
+ }: WaveProps) => {
17
+ const {width, height} = Dimensions.get('window');
18
+ const context = useContext(ThemeCtx);
19
+ const styles = Stylesheet(context, width, height);
20
+
21
+ return (
22
+ <View style={styles.container}>
23
+ {Platform.OS === 'ios' ? (
24
+ <AnimatedWave />
25
+ ) : (
26
+ <StaticWave
27
+ customStyle={customStyle}
28
+ customWavePath={customWavePath}
29
+ heightSvgContainer={heightSvgContainer}
30
+ positionTop={positionTop}
31
+ />
32
+ )}
33
+ </View>
34
+ );
35
+ };
@@ -0,0 +1 @@
1
+ export declare const WaveBackgroundPreview: ({}: {}) => JSX.Element;
@@ -0,0 +1,78 @@
1
+ import React, {useContext, useState} from 'react';
2
+ import {SafeAreaView, View, Platform, StatusBar} from 'react-native';
3
+ import {WaveBackground} from './wave.component';
4
+ import {Logo} from '../../atoms/logo/logo.component';
5
+ import {ThemeCtx} from '../../../context/theme.context';
6
+ import {Heading1, Heading4} from '../../atoms/heading-components';
7
+ import {Paragraph} from '../../atoms/paragraph-components';
8
+ import {SelectPicker} from '../select-picker/select-picker.component';
9
+
10
+ export const WaveBackgroundPreview = ({}: {}) => {
11
+ const regions = [
12
+ {value: 'Leuven', label: 'Leuven'},
13
+ {value: 'Brussel', label: 'Brussel'},
14
+ {value: 'Antwerpen', label: 'Antwerpen'},
15
+ ];
16
+ const [selectedRegion, setSelectedRegion] = useState('');
17
+ const Context = useContext(ThemeCtx);
18
+ return (
19
+ <SafeAreaView
20
+ style={{
21
+ flex: 1,
22
+ backgroundColor: Context.colors.main['5'],
23
+ }}
24
+ >
25
+ <WaveBackground />
26
+ <View
27
+ style={{
28
+ width: '100%',
29
+ height: '100%',
30
+ paddingTop: Platform.OS === 'android' ? StatusBar.currentHeight : 0,
31
+ paddingLeft: 16,
32
+ paddingRight: 16,
33
+ }}
34
+ >
35
+ <View
36
+ style={{
37
+ marginTop: 16 * 3.5,
38
+ marginBottom: 16 * 5.5,
39
+ alignItems: 'center',
40
+ }}
41
+ >
42
+ <Logo big={true} colorIsWhite={true} />
43
+ </View>
44
+
45
+ <View>
46
+ <Heading1
47
+ bold={true}
48
+ textColor={Context.colors.ui.white}
49
+ textAlign={'left'}
50
+ addStyle={{marginBottom: 64}}
51
+ >
52
+ Welkom,
53
+ </Heading1>
54
+ <Heading4
55
+ bold={true}
56
+ textColor={Context.colors.ui.white}
57
+ addStyle={{marginBottom: 8}}
58
+ >
59
+ Regio
60
+ </Heading4>
61
+ <Paragraph
62
+ textColor={Context.colors.ui.white}
63
+ addStyle={{marginBottom: 16}}
64
+ >
65
+ Deze krijgt u toegestuurd van het kinderdagverblijf bij de start van
66
+ uw opvangtraject.
67
+ </Paragraph>
68
+ <SelectPicker
69
+ placeholder={'Choose your region'}
70
+ data={regions}
71
+ onChange={setSelectedRegion}
72
+ defaultValue={selectedRegion}
73
+ />
74
+ </View>
75
+ </View>
76
+ </SafeAreaView>
77
+ );
78
+ };
@@ -0,0 +1,13 @@
1
+ export function Stylesheet(
2
+ Context: any,
3
+ width: any,
4
+ height: any
5
+ ): {
6
+ container: {
7
+ width: any;
8
+ height: any;
9
+ backgroundColor: any;
10
+ position: 'absolute';
11
+ zIndex: number;
12
+ };
13
+ };
@@ -0,0 +1,13 @@
1
+ import React from 'react';
2
+ import {StyleSheet} from 'react-native';
3
+
4
+ export const Stylesheet = (Context, width, height) =>
5
+ StyleSheet.create({
6
+ container: {
7
+ width: width,
8
+ height: height,
9
+ backgroundColor: Context.colors.main['3'],
10
+ position: 'absolute',
11
+ zIndex: -1,
12
+ },
13
+ });