etendo-ui-library 1.0.67 → 1.0.69

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 (40) hide show
  1. package/components/button/Button.styles.tsx +5 -3
  2. package/components/button/Button.tsx +20 -27
  3. package/components/button/Button.types.tsx +42 -26
  4. package/components/button/__snapshots__/Button.test.tsx.snap +57 -61
  5. package/components/input/Input.style.ts +0 -3
  6. package/components/input/Input.tsx +2 -0
  7. package/components/input/Input.types.ts +2 -0
  8. package/components/input/__snapshots__/Input.test.tsx.snap +2 -2
  9. package/components/input/components/InputField.tsx +14 -4
  10. package/package.json +1 -1
  11. package/pipelines/Jenkinsfile +29 -1
  12. package/storybook-static/{0.e289c554.iframe.bundle.js → 0.0fea680f.iframe.bundle.js} +1 -1
  13. package/storybook-static/{4.83eb39f7.iframe.bundle.js → 4.04f6c2d5.iframe.bundle.js} +3 -3
  14. package/storybook-static/{4.83eb39f7.iframe.bundle.js.LICENSE.txt → 4.04f6c2d5.iframe.bundle.js.LICENSE.txt} +0 -0
  15. package/storybook-static/4.04f6c2d5.iframe.bundle.js.map +1 -0
  16. package/storybook-static/{5.3a86efb8.iframe.bundle.js → 5.798ed15a.iframe.bundle.js} +1 -1
  17. package/storybook-static/{6.82a64467.iframe.bundle.js → 6.7a493339.iframe.bundle.js} +3 -3
  18. package/storybook-static/{6.82a64467.iframe.bundle.js.LICENSE.txt → 6.7a493339.iframe.bundle.js.LICENSE.txt} +0 -0
  19. package/storybook-static/6.7a493339.iframe.bundle.js.map +1 -0
  20. package/storybook-static/iframe.html +1 -1
  21. package/storybook-static/main.f48c5f17.iframe.bundle.js +1 -0
  22. package/storybook-static/{runtime~main.4527f170.iframe.bundle.js → runtime~main.f3709849.iframe.bundle.js} +1 -1
  23. package/storybook-static/{vendors~main.44059935.iframe.bundle.js → vendors~main.eb2e4263.iframe.bundle.js} +3 -3
  24. package/storybook-static/{vendors~main.44059935.iframe.bundle.js.LICENSE.txt → vendors~main.eb2e4263.iframe.bundle.js.LICENSE.txt} +0 -0
  25. package/storybook-static/vendors~main.eb2e4263.iframe.bundle.js.map +1 -0
  26. package/pipelines/table/Table.json +0 -242
  27. package/pipelines/table/Table.stories.tsx +0 -68
  28. package/pipelines/table/Table.styles.ts +0 -95
  29. package/pipelines/table/Table.test.tsx +0 -373
  30. package/pipelines/table/Table.tsx +0 -80
  31. package/pipelines/table/Table.types.ts +0 -29
  32. package/pipelines/table/__snapshots__/Table.test.tsx.snap +0 -2416
  33. package/pipelines/table/components/TableCell.tsx +0 -14
  34. package/pipelines/table/components/TableCellEdit.tsx +0 -16
  35. package/pipelines/table/components/TableHeaders.tsx +0 -33
  36. package/pipelines/table/index.ts +0 -6
  37. package/storybook-static/4.83eb39f7.iframe.bundle.js.map +0 -1
  38. package/storybook-static/6.82a64467.iframe.bundle.js.map +0 -1
  39. package/storybook-static/main.6e6919a0.iframe.bundle.js +0 -1
  40. package/storybook-static/vendors~main.44059935.iframe.bundle.js.map +0 -1
@@ -15,14 +15,16 @@ export const ButtonStyleVariant: buttonStyleVariant = {
15
15
  backgroundColor: BLUE,
16
16
  borderRadius: 5,
17
17
  flexDirection: 'row',
18
+ justifyContent: 'center',
19
+ width: '100%',
20
+ height: '100%',
21
+ alignSelf: 'center',
18
22
  alignItems: 'center',
19
- alignSelf: 'flex-start',
20
- width: 150,
21
23
  },
22
24
  text: {
23
25
  color: WHITE,
24
- fontFamily: 'Poppins',
25
26
  fontWeight: '600',
27
+ fontSize: 16,
26
28
  },
27
29
  containerDisabled: {
28
30
  backgroundColor: GREY_BLUE_50,
@@ -10,7 +10,8 @@ const Button = ({
10
10
  typeStyle,
11
11
  image,
12
12
  disabled,
13
- typeSize,
13
+ width,
14
+ height,
14
15
  }: ButtonProps) => {
15
16
  const stateStyleContainer = () => {
16
17
  if (disabled) {
@@ -27,32 +28,24 @@ const Button = ({
27
28
  };
28
29
 
29
30
  return (
30
- <View>
31
- <TouchableOpacity
32
- style={[
33
- stateStyleContainer(),
34
- ButtonSizeVariant[typeSize].containerSize,
35
- ]}
36
- onPress={onPress}
37
- >
38
- {image?.imgRoute && (
39
- <Image
40
- source={image.imgRoute}
41
- style={[
42
- addImageStyle(image),
43
- {opacity: disabled ? 0.2 : 1},
44
- ButtonStyleVariant[typeStyle].imageColor,
45
- ]}
46
- ></Image>
47
- )}
48
- <Text
49
- style={[stateStyleText(), ButtonSizeVariant[typeSize].buttonSize]}
50
- >
51
- {' '}
52
- {text}{' '}
53
- </Text>
54
- </TouchableOpacity>
55
- </View>
31
+ <TouchableOpacity
32
+ style={[stateStyleContainer(), {width: width, height: height}]}
33
+ onPress={onPress}
34
+ >
35
+ {image?.imgRoute && (
36
+ <Image
37
+ source={image.imgRoute}
38
+ style={[
39
+ addImageStyle(image),
40
+ {opacity: disabled ? 0.2 : 1},
41
+ ButtonStyleVariant[typeStyle].imageColor,
42
+ ]}
43
+ />
44
+ )}
45
+ <Text style={[stateStyleText(), ButtonSizeVariant['medium'].buttonSize]}>
46
+ {text}
47
+ </Text>
48
+ </TouchableOpacity>
56
49
  );
57
50
  };
58
51
 
@@ -1,36 +1,52 @@
1
- import {ImageSourcePropType, ImageStyle, TextStyle, ViewStyle} from 'react-native'
1
+ import {
2
+ ImageSourcePropType,
3
+ ImageStyle,
4
+ TextStyle,
5
+ ViewStyle,
6
+ } from 'react-native';
2
7
 
3
- export type ButtonStyleType = 'primary' | 'secondary' |'terciary' |'whiteBorder' | 'white' ;
8
+ export type ButtonStyleType =
9
+ | 'primary'
10
+ | 'secondary'
11
+ | 'terciary'
12
+ | 'whiteBorder'
13
+ | 'white';
4
14
 
5
- export type ButtonSizeType = 'small' | 'medium' | 'large' ;
15
+ export type ButtonSizeType = 'small' | 'medium' | 'large';
6
16
 
7
- export type buttonStyleVariant= Record<
8
- ButtonStyleType, {
9
- container: ViewStyle,
10
- text: TextStyle,
11
- containerDisabled: ViewStyle,
12
- textDisabled: TextStyle,
13
- imageColor: ImageStyle,
14
- }>
17
+ export type buttonStyleVariant = Record<
18
+ ButtonStyleType,
19
+ {
20
+ container: ViewStyle;
21
+ text: TextStyle;
22
+ containerDisabled: ViewStyle;
23
+ textDisabled: TextStyle;
24
+ imageColor: ImageStyle;
25
+ }
26
+ >;
15
27
 
16
28
  export type buttonSizeVariant = Record<
17
- ButtonSizeType, {
18
- buttonSize: TextStyle,
19
- containerSize: ViewStyle,
20
- }>
29
+ ButtonSizeType,
30
+ {
31
+ buttonSize: TextStyle;
32
+ containerSize: ViewStyle;
33
+ }
34
+ >;
21
35
 
22
36
  export type ImageType = {
23
- imgRoute?: ImageSourcePropType;
24
- imgWidth?: string | number;
25
- imgHeight?: string | number;
26
- imgMarginRight?: string | number;
37
+ imgRoute?: ImageSourcePropType;
38
+ imgWidth?: string | number;
39
+ imgHeight?: string | number;
40
+ imgMarginRight?: string | number;
27
41
  };
28
42
 
29
43
  export interface ButtonProps {
30
- onPress: () => void;
31
- text: string;
32
- typeStyle: ButtonStyleType,
33
- image?: ImageType,
34
- disabled?: boolean,
35
- typeSize: ButtonSizeType,
36
- };
44
+ onPress: () => void;
45
+ text: string;
46
+ typeStyle: ButtonStyleType;
47
+ image?: ImageType;
48
+ disabled?: boolean;
49
+ typeSize: ButtonSizeType;
50
+ width?: number | string;
51
+ height?: number | string;
52
+ }
@@ -1,76 +1,72 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
3
  exports[`Running Test for Input Check Button disabled 1`] = `
4
- <View>
5
- <View
6
- accessible={true}
7
- collapsable={false}
8
- focusable={true}
9
- onClick={[Function]}
10
- onResponderGrant={[Function]}
11
- onResponderMove={[Function]}
12
- onResponderRelease={[Function]}
13
- onResponderTerminate={[Function]}
14
- onResponderTerminationRequest={[Function]}
15
- onStartShouldSetResponder={[Function]}
16
- style={
4
+ <View
5
+ accessible={true}
6
+ collapsable={false}
7
+ focusable={true}
8
+ onClick={[Function]}
9
+ onResponderGrant={[Function]}
10
+ onResponderMove={[Function]}
11
+ onResponderRelease={[Function]}
12
+ onResponderTerminate={[Function]}
13
+ onResponderTerminationRequest={[Function]}
14
+ onStartShouldSetResponder={[Function]}
15
+ style={
16
+ Object {
17
+ "alignItems": "center",
18
+ "alignSelf": "flex-start",
19
+ "backgroundColor": "#D3D6E1",
20
+ "borderRadius": 5,
21
+ "flexDirection": "row",
22
+ "height": undefined,
23
+ "opacity": 1,
24
+ "width": undefined,
25
+ }
26
+ }
27
+ >
28
+ <Image
29
+ source={
17
30
  Object {
18
- "alignItems": "center",
19
- "alignSelf": "flex-start",
20
- "backgroundColor": "#D3D6E1",
21
- "borderRadius": 5,
22
- "flexDirection": "row",
23
- "opacity": 1,
24
- "paddingHorizontal": 18,
25
- "paddingVertical": 14,
31
+ "testUri": "../../../assets/images/icons/check.png",
26
32
  }
27
33
  }
28
- >
29
- <Image
30
- source={
31
- Object {
32
- "testUri": "../../../assets/images/icons/check.png",
33
- }
34
- }
35
- style={
34
+ style={
35
+ Array [
36
36
  Array [
37
- Array [
38
- Object {
39
- "width": 16,
40
- },
41
- Object {
42
- "height": 12,
43
- },
44
- Object {
45
- "marginRight": 10,
46
- },
47
- ],
48
- Object {
49
- "opacity": 0.2,
50
- },
51
37
  Object {
52
- "tintColor": "#FFFFFF",
38
+ "width": 16,
53
39
  },
54
- ]
55
- }
56
- />
57
- <Text
58
- style={
59
- Array [
60
40
  Object {
61
- "color": "#FFFFFF",
62
- "fontWeight": "bold",
41
+ "height": 12,
63
42
  },
64
43
  Object {
65
- "fontSize": 20,
44
+ "marginRight": 10,
66
45
  },
67
- ]
68
- }
69
- >
70
-
71
- Button CTA
72
-
73
- </Text>
74
- </View>
46
+ ],
47
+ Object {
48
+ "opacity": 0.2,
49
+ },
50
+ Object {
51
+ "tintColor": "#FFFFFF",
52
+ },
53
+ ]
54
+ }
55
+ />
56
+ <Text
57
+ style={
58
+ Array [
59
+ Object {
60
+ "color": "#FFFFFF",
61
+ "fontWeight": "bold",
62
+ },
63
+ Object {
64
+ "fontSize": 16,
65
+ },
66
+ ]
67
+ }
68
+ >
69
+ Button CTA
70
+ </Text>
75
71
  </View>
76
72
  `;
@@ -76,7 +76,6 @@ export const inputVariants: InputVariantsType = {
76
76
  const defaultTitle: TextStyle = {
77
77
  color: BLUE,
78
78
  fontSize: 14,
79
- fontFamily: FONT_MEDIUM,
80
79
  marginTop: 10,
81
80
  };
82
81
 
@@ -96,7 +95,6 @@ const defaultText: TextStyle = {
96
95
  color: BLUE,
97
96
  fontSize: 14,
98
97
  fontWeight: '500',
99
- fontFamily: FONT_MEDIUM,
100
98
  };
101
99
 
102
100
  const defaultTextPlaceholder: TextStyle = {
@@ -105,7 +103,6 @@ const defaultTextPlaceholder: TextStyle = {
105
103
  padding: 10,
106
104
  color: GREY_BLUE,
107
105
  fontWeight: '500',
108
- fontFamily: FONT_MEDIUM,
109
106
  };
110
107
 
111
108
  const defaultHelperText: TextStyle = {
@@ -23,6 +23,7 @@ const Input: React.FC<InputProps> = ({
23
23
  typeField,
24
24
  isError,
25
25
  fontSize,
26
+ height,
26
27
  password,
27
28
  }) => {
28
29
  const stateStyle = () => {
@@ -61,6 +62,7 @@ const Input: React.FC<InputProps> = ({
61
62
  numberOfLines={numberOfLines}
62
63
  centerText={centerText}
63
64
  fontSize={fontSize}
65
+ height={height}
64
66
  password={password}
65
67
  />
66
68
  <InputHelperText
@@ -76,6 +76,7 @@ export interface InputProps {
76
76
  typeField: InputFieldVariants;
77
77
  keyboardType?: KeyboardTypes;
78
78
  fontSize?: number;
79
+ height?: number | string;
79
80
  password?: boolean;
80
81
  onPress?: (event: GestureResponderEvent) => void;
81
82
  onSubmit?: (event: GestureResponderEvent) => void;
@@ -112,6 +113,7 @@ export interface InputFieldProps {
112
113
  centerText?: boolean;
113
114
  numberOfLines?: number;
114
115
  fontSize?: number;
116
+ height?: number | string;
115
117
  password?: boolean;
116
118
  onPress?: (event: GestureResponderEvent) => void;
117
119
  onSubmit?: (event: GestureResponderEvent) => void;
@@ -20,7 +20,6 @@ exports[`Running Test for Input Check Input Error 1`] = `
20
20
  style={
21
21
  Object {
22
22
  "color": "#202452",
23
- "fontFamily": "Inter-Medium",
24
23
  "fontSize": 14,
25
24
  "marginTop": 10,
26
25
  }
@@ -79,14 +78,15 @@ exports[`Running Test for Input Check Input Error 1`] = `
79
78
  Array [
80
79
  Object {
81
80
  "color": "#202452",
82
- "fontFamily": "Inter-Medium",
83
81
  "fontSize": 14,
84
82
  "fontWeight": "500",
85
83
  "padding": 10,
86
84
  "width": "100%",
87
85
  },
88
86
  Object {
87
+ "color": "#000000",
89
88
  "fontSize": undefined,
89
+ "height": undefined,
90
90
  },
91
91
  Object {
92
92
  "paddingRight": 10,
@@ -16,6 +16,7 @@ import {
16
16
  activePasswordIcon,
17
17
  disabledPasswordIcon,
18
18
  } from '../../../assets/images/icons';
19
+ import {BLACK, GREY_BLUE_50} from '../../../styles/colors';
19
20
 
20
21
  const InputField = ({
21
22
  configField,
@@ -31,6 +32,7 @@ const InputField = ({
31
32
  onFocus,
32
33
  onBlur,
33
34
  fontSize,
35
+ height,
34
36
  password,
35
37
  }: InputFieldProps) => {
36
38
  const [showImg, setShowImg] = useState<boolean>(false);
@@ -41,9 +43,17 @@ const InputField = ({
41
43
  let style: Array<TextStyle | TextStyle[]> = [];
42
44
 
43
45
  if (text) {
44
- style.push(styleField.textDefault, {fontSize: fontSize});
46
+ style.push(styleField.textDefault, {
47
+ fontSize: fontSize,
48
+ height: height,
49
+ color: BLACK,
50
+ });
45
51
  } else {
46
- style.push(styleField.textPlaceholder, {fontSize: fontSize});
52
+ style.push(styleField.textPlaceholder, {
53
+ fontSize: fontSize,
54
+ height: height,
55
+ color: BLACK,
56
+ });
47
57
  }
48
58
 
49
59
  style.push({paddingRight: password ? 50 : 10});
@@ -129,8 +139,8 @@ const InputField = ({
129
139
  <Image
130
140
  source={
131
141
  !showPassword
132
- ? disabledPasswordIcon
133
- : activePasswordIcon
142
+ ? {uri: disabledPasswordIcon}
143
+ : {uri: activePasswordIcon}
134
144
  }
135
145
  style={styles.passwordImage}
136
146
  />
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "etendo-ui-library",
3
- "version": "1.0.67",
3
+ "version": "1.0.69",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "android": "react-native run-android",
@@ -5,7 +5,11 @@ pipeline {
5
5
  }
6
6
 
7
7
  environment {
8
- NPM_TOKEN = credentials('npmjs-access-token')
8
+ NPM_TOKEN = credentials('npmjs-access-token')
9
+ URL_REPO = 'https://bitbucket.org/koodu_software/etendo_ui_library'
10
+ COMMIT_AUTHOR_NAME = sh(returnStdout: true, script: "git log -1 --pretty=format:'%an'").trim()
11
+ COMMIT_AUTHOR_EMAIL = sh(returnStdout: true, script: "git log -1 --pretty=format:'%ae'").trim()
12
+
9
13
  }
10
14
 
11
15
  agent { label 'jenkins-jenkins-agent' }
@@ -125,6 +129,24 @@ pipeline {
125
129
  }
126
130
  cleanWs deleteDirs: true
127
131
  }
132
+ fixed {
133
+ mail to: 'builds@smfconsulting.es',
134
+ subject: "✅ FIXED - ${currentBuild.fullDisplayName}",
135
+ body: """
136
+ ${new Date()}
137
+ __________________________________________________________
138
+
139
+ ✅ ERRORS FIXED ✅
140
+
141
+ Commit: ${URL_REPO}/commits/${env.GIT_COMMIT}
142
+ Author: ${COMMIT_AUTHOR_NAME} <${COMMIT_AUTHOR_EMAIL}>
143
+
144
+ The problems found in the previous run/s have been fixed! 💪
145
+ Check out the output in the following link:
146
+ ${env.BUILD_URL}
147
+ __________________________________________________________
148
+ """
149
+ }
128
150
  unstable {
129
151
  withCredentials([usernamePassword(credentialsId: "koodu_credentials", passwordVariable: 'GIT_PASSWORD', usernameVariable: 'GIT_USERNAME')]) {
130
152
  script {
@@ -139,6 +161,9 @@ ${new Date()}
139
161
  __________________________________________________________
140
162
 
141
163
  🚨 BUILD UNSTABLE 🚨
164
+
165
+ Commit: ${URL_REPO}/commits/${env.GIT_COMMIT}
166
+ Author: ${COMMIT_AUTHOR_NAME} <${COMMIT_AUTHOR_EMAIL}>
142
167
 
143
168
  Some etendo-ui-library tests have failed!
144
169
  Check out the output in the following link:
@@ -161,6 +186,9 @@ __________________________________________________________
161
186
 
162
187
  🚫 ERROR 🚫
163
188
 
189
+ Commit: ${URL_REPO}/commits/${env.GIT_COMMIT}
190
+ Author: ${COMMIT_AUTHOR_NAME} <${COMMIT_AUTHOR_EMAIL}>
191
+
164
192
  The build or publication has failed unexpectedly.
165
193
  To more information on the failing run visit: ${env.BUILD_URL}
166
194
  __________________________________________________________