secullum-react-native-ui 4.3.13 → 4.4.0-beta.0

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 (61) hide show
  1. package/lib/components/AppShell.d.ts +29 -3
  2. package/lib/components/AppShell.js +2 -1
  3. package/lib/components/Button.js +5 -4
  4. package/lib/components/Card.d.ts +5 -5
  5. package/lib/components/Card.js +13 -8
  6. package/lib/components/CheckBox.js +3 -2
  7. package/lib/components/DatePicker.js +8 -8
  8. package/lib/components/DatePicker.web.js +7 -6
  9. package/lib/components/Delay.d.ts +1 -1
  10. package/lib/components/Delay.js +1 -0
  11. package/lib/components/Details.js +4 -3
  12. package/lib/components/DetailsHeader.d.ts +1 -1
  13. package/lib/components/DetailsHeader.js +8 -7
  14. package/lib/components/DimensionsMonitor.d.ts +1 -1
  15. package/lib/components/DimensionsMonitor.js +1 -0
  16. package/lib/components/DropDown.js +10 -9
  17. package/lib/components/ErrorMessage.js +2 -1
  18. package/lib/components/FilePicker.d.ts +1 -0
  19. package/lib/components/FilePicker.js +7 -6
  20. package/lib/components/Header.d.ts +2 -2
  21. package/lib/components/Header.js +14 -11
  22. package/lib/components/HeaderDesktop.js +11 -8
  23. package/lib/components/ImageButton.js +2 -1
  24. package/lib/components/KeyboardAvoidingView.d.ts +1 -1
  25. package/lib/components/KeyboardAvoidingView.js +7 -4
  26. package/lib/components/Link.js +2 -1
  27. package/lib/components/Loading.js +1 -0
  28. package/lib/components/Menu.d.ts +1 -1
  29. package/lib/components/Menu.js +5 -4
  30. package/lib/components/MenuDesktop.js +3 -2
  31. package/lib/components/MenuMobile.js +4 -3
  32. package/lib/components/Message.js +10 -9
  33. package/lib/components/Modal.js +1 -0
  34. package/lib/components/MultiSelect.d.ts +1 -1
  35. package/lib/components/MultiSelect.js +10 -9
  36. package/lib/components/NoRecordMessage.js +3 -2
  37. package/lib/components/Question.js +10 -9
  38. package/lib/components/RadioButton.js +2 -1
  39. package/lib/components/RadioGroup.js +5 -4
  40. package/lib/components/RangeDatePicker.js +7 -7
  41. package/lib/components/RangeDatePicker.web.js +7 -6
  42. package/lib/components/Space.js +2 -1
  43. package/lib/components/StatusBar.js +3 -2
  44. package/lib/components/Switch.js +3 -2
  45. package/lib/components/Table.js +5 -2
  46. package/lib/components/Table.web.d.ts +1 -1
  47. package/lib/components/Table.web.js +7 -4
  48. package/lib/components/Text.d.ts +1 -1
  49. package/lib/components/Text.js +4 -3
  50. package/lib/components/TextBox.d.ts +3 -35
  51. package/lib/components/TextBox.js +6 -5
  52. package/lib/components/TextBoxMask.js +8 -3
  53. package/lib/components/TimePicker.js +8 -8
  54. package/lib/components/TimePicker.web.js +7 -6
  55. package/lib/index.js +53 -42
  56. package/lib/modules/browser.js +1 -0
  57. package/lib/modules/format.js +14 -8
  58. package/lib/modules/layout.js +3 -1
  59. package/lib/modules/theme.js +7 -4
  60. package/lib/modules/validation.js +7 -3
  61. package/package.json +3 -4
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.formatDate = exports.getDateFnsLocale = exports.parseDate = exports.getLocale = exports.setLocale = void 0;
3
4
  const date_fns_1 = require("date-fns");
4
5
  const dfnslocales = {
5
6
  pt: require('date-fns/locale/pt'),
@@ -7,16 +8,19 @@ const dfnslocales = {
7
8
  es: require('date-fns/locale/es')
8
9
  };
9
10
  let currentLocale = 'pt';
10
- exports.setLocale = (locale) => {
11
+ const setLocale = (locale) => {
11
12
  currentLocale = locale;
12
13
  };
13
- exports.getLocale = () => {
14
+ exports.setLocale = setLocale;
15
+ const getLocale = () => {
14
16
  return currentLocale;
15
17
  };
16
- exports.parseDate = (date, format) => {
17
- return date_fns_1.parse(date, format, new Date());
18
+ exports.getLocale = getLocale;
19
+ const parseDate = (date, format) => {
20
+ return (0, date_fns_1.parse)(date, format, new Date());
18
21
  };
19
- exports.getDateFnsLocale = () => {
22
+ exports.parseDate = parseDate;
23
+ const getDateFnsLocale = () => {
20
24
  switch (currentLocale) {
21
25
  case 'pt':
22
26
  return dfnslocales.pt;
@@ -26,6 +30,7 @@ exports.getDateFnsLocale = () => {
26
30
  return dfnslocales.en;
27
31
  }
28
32
  };
33
+ exports.getDateFnsLocale = getDateFnsLocale;
29
34
  const fixPortugueseLowercase = (formattedDate) => {
30
35
  formattedDate = formattedDate.replace('segunda-feira', 'Segunda-Feira');
31
36
  formattedDate = formattedDate.replace('terça-feira', 'Terça-Feira');
@@ -84,9 +89,9 @@ const fixSpanishLowercase = (formattedDate) => {
84
89
  formattedDate = formattedDate.replace('diciembre', 'Diciembre');
85
90
  return formattedDate;
86
91
  };
87
- exports.formatDate = (date, format) => {
88
- const formattedDate = date_fns_1.format(date, format, {
89
- locale: exports.getDateFnsLocale()
92
+ const formatDate = (date, format) => {
93
+ const formattedDate = (0, date_fns_1.format)(date, format, {
94
+ locale: (0, exports.getDateFnsLocale)()
90
95
  });
91
96
  switch (currentLocale) {
92
97
  case 'pt':
@@ -97,3 +102,4 @@ exports.formatDate = (date, format) => {
97
102
  return formattedDate;
98
103
  }
99
104
  };
105
+ exports.formatDate = formatDate;
@@ -1,10 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isTablet = void 0;
3
4
  const react_native_1 = require("react-native");
4
- exports.isTablet = () => {
5
+ const isTablet = () => {
5
6
  if (react_native_1.Platform.OS === 'web') {
6
7
  return false;
7
8
  }
8
9
  return (react_native_1.Dimensions.get('window').height >= 800 &&
9
10
  react_native_1.Dimensions.get('window').width >= 500);
10
11
  };
12
+ exports.isTablet = isTablet;
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getTheme = exports.setTheme = exports.RED = exports.GREEN_LIGHT = exports.GREEN = exports.YELLOW = exports.BLUE_LIGHT_2 = exports.BLUE_LIGHT = exports.BLUE = exports.GRAY_4 = exports.GRAY_3 = exports.GRAY_2 = exports.GRAY_1 = exports.GRAY = exports.WHITE = exports.BLACK = void 0;
3
4
  const browser_1 = require("./browser");
4
5
  exports.BLACK = '#282c37';
5
6
  exports.WHITE = '#ffffff';
@@ -40,10 +41,12 @@ let theme = {
40
41
  fontFamily2: 'Roboto',
41
42
  fontFamily3: 'Roboto-Light'
42
43
  };
43
- exports.setTheme = (newTheme) => {
44
- theme = Object.assign({}, theme, newTheme);
45
- browser_1.setDatePickerColor(theme.datePickerColor);
44
+ const setTheme = (newTheme) => {
45
+ theme = Object.assign(Object.assign({}, theme), newTheme);
46
+ (0, browser_1.setDatePickerColor)(theme.datePickerColor);
46
47
  };
47
- exports.getTheme = () => {
48
+ exports.setTheme = setTheme;
49
+ const getTheme = () => {
48
50
  return theme;
49
51
  };
52
+ exports.getTheme = getTheme;
@@ -1,12 +1,16 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isHour = exports.validateCNPJ = exports.validateCPF = void 0;
3
4
  const react_native_masked_text_1 = require("react-native-masked-text");
4
- exports.validateCPF = (value) => {
5
+ const validateCPF = (value) => {
5
6
  return react_native_masked_text_1.MaskService.isValid('cpf', value, {});
6
7
  };
7
- exports.validateCNPJ = (value) => {
8
+ exports.validateCPF = validateCPF;
9
+ const validateCNPJ = (value) => {
8
10
  return react_native_masked_text_1.MaskService.isValid('cnpj', value, {});
9
11
  };
10
- exports.isHour = (value) => {
12
+ exports.validateCNPJ = validateCNPJ;
13
+ const isHour = (value) => {
11
14
  return /^(0[0-9]|1[0-9]|2[0-3]|[0-9]):[0-5][0-9]$/.test(value);
12
15
  };
16
+ exports.isHour = isHour;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "secullum-react-native-ui",
3
- "version": "4.3.13",
3
+ "version": "4.4.0-beta.0",
4
4
  "main": "lib/index.js",
5
5
  "types": "lib/index.d.ts",
6
6
  "files": [
@@ -22,7 +22,6 @@
22
22
  "@react-native-community/datetimepicker": "^3.0.9",
23
23
  "date-fns": "2.0.0-alpha.7",
24
24
  "react-date-range": "^1.0.0-beta",
25
- "react-native-appearance": "^0.3.4",
26
25
  "react-native-drawer-layout": "^2.0.0",
27
26
  "react-native-elevated-view": "^0.0.6",
28
27
  "react-native-masked-text": "^1.7.2",
@@ -33,7 +32,7 @@
33
32
  "devDependencies": {
34
33
  "@types/react": "^16.4.11",
35
34
  "@types/react-dom": "^16.0.11",
36
- "@types/react-native": "^0.57.47",
35
+ "@types/react-native": "^0.63.64",
37
36
  "@types/react-native-drawer-layout": "^1.3.3",
38
37
  "@types/react-native-elevated-view": "^0.0.2",
39
38
  "@types/react-native-vector-icons": "^6.4.6",
@@ -45,7 +44,7 @@
45
44
  "react": "^16.2.0",
46
45
  "react-native": "^0.52 || ^0.53 || ^0.54 || ^0.55 || ^0.63",
47
46
  "rimraf": "^2.6.2",
48
- "typescript": "^3.3.3333"
47
+ "typescript": "^4.8.3"
49
48
  },
50
49
  "peerDependencies": {
51
50
  "react": "^16.2.0",