@grupalia/rn-ui-kit 0.10.0 → 0.12.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 (103) hide show
  1. package/lib/commonjs/components/BaseAlert.js +65 -72
  2. package/lib/commonjs/components/BaseAlert.js.map +1 -1
  3. package/lib/commonjs/components/BaseBadge.js +2 -1
  4. package/lib/commonjs/components/BaseBadge.js.map +1 -1
  5. package/lib/commonjs/components/BaseButton.js +9 -15
  6. package/lib/commonjs/components/BaseButton.js.map +1 -1
  7. package/lib/commonjs/components/BaseDateInput.js +5 -4
  8. package/lib/commonjs/components/BaseDateInput.js.map +1 -1
  9. package/lib/commonjs/components/BaseHorizontalTabs.js +2 -1
  10. package/lib/commonjs/components/BaseHorizontalTabs.js.map +1 -1
  11. package/lib/commonjs/components/BaseRadioGroup.js +3 -2
  12. package/lib/commonjs/components/BaseRadioGroup.js.map +1 -1
  13. package/lib/commonjs/components/BaseSelect.js +7 -6
  14. package/lib/commonjs/components/BaseSelect.js.map +1 -1
  15. package/lib/commonjs/components/BaseSelectionItem.js +2 -1
  16. package/lib/commonjs/components/BaseSelectionItem.js.map +1 -1
  17. package/lib/commonjs/components/BaseStackedList.js +4 -3
  18. package/lib/commonjs/components/BaseStackedList.js.map +1 -1
  19. package/lib/commonjs/index.js +9 -1
  20. package/lib/commonjs/index.js.map +1 -1
  21. package/lib/commonjs/styles/text-colors.js +0 -16
  22. package/lib/commonjs/styles/text-colors.js.map +1 -1
  23. package/lib/commonjs/utils/clabe.js +30 -0
  24. package/lib/commonjs/utils/clabe.js.map +1 -0
  25. package/lib/commonjs/utils/mx-banks.js +10 -0
  26. package/lib/commonjs/utils/mx-banks.js.map +1 -0
  27. package/lib/commonjs/utils/mx-banks.json +492 -0
  28. package/lib/module/components/BaseAlert.js +67 -74
  29. package/lib/module/components/BaseAlert.js.map +1 -1
  30. package/lib/module/components/BaseBadge.js +3 -2
  31. package/lib/module/components/BaseBadge.js.map +1 -1
  32. package/lib/module/components/BaseButton.js +10 -16
  33. package/lib/module/components/BaseButton.js.map +1 -1
  34. package/lib/module/components/BaseDateInput.js +6 -5
  35. package/lib/module/components/BaseDateInput.js.map +1 -1
  36. package/lib/module/components/BaseHorizontalTabs.js +3 -2
  37. package/lib/module/components/BaseHorizontalTabs.js.map +1 -1
  38. package/lib/module/components/BaseRadioGroup.js +4 -3
  39. package/lib/module/components/BaseRadioGroup.js.map +1 -1
  40. package/lib/module/components/BaseSelect.js +8 -7
  41. package/lib/module/components/BaseSelect.js.map +1 -1
  42. package/lib/module/components/BaseSelectionItem.js +3 -2
  43. package/lib/module/components/BaseSelectionItem.js.map +1 -1
  44. package/lib/module/components/BaseStackedList.js +5 -4
  45. package/lib/module/components/BaseStackedList.js.map +1 -1
  46. package/lib/module/index.js +1 -0
  47. package/lib/module/index.js.map +1 -1
  48. package/lib/module/styles/text-colors.js +0 -16
  49. package/lib/module/styles/text-colors.js.map +1 -1
  50. package/lib/module/utils/clabe.js +24 -0
  51. package/lib/module/utils/clabe.js.map +1 -0
  52. package/lib/module/utils/mx-banks.js +5 -0
  53. package/lib/module/utils/mx-banks.js.map +1 -0
  54. package/lib/module/utils/mx-banks.json +492 -0
  55. package/lib/typescript/commonjs/components/BaseAlert.d.ts +1 -1
  56. package/lib/typescript/commonjs/components/BaseAlert.d.ts.map +1 -1
  57. package/lib/typescript/commonjs/components/BaseBadge.d.ts.map +1 -1
  58. package/lib/typescript/commonjs/components/BaseButton.d.ts.map +1 -1
  59. package/lib/typescript/commonjs/components/BaseDateInput.d.ts.map +1 -1
  60. package/lib/typescript/commonjs/components/BaseHorizontalTabs.d.ts.map +1 -1
  61. package/lib/typescript/commonjs/components/BaseRadioGroup.d.ts.map +1 -1
  62. package/lib/typescript/commonjs/components/BaseSelect.d.ts.map +1 -1
  63. package/lib/typescript/commonjs/components/BaseSelectionItem.d.ts.map +1 -1
  64. package/lib/typescript/commonjs/components/BaseStackedList.d.ts.map +1 -1
  65. package/lib/typescript/commonjs/hoc-components.d.ts +2 -2
  66. package/lib/typescript/commonjs/hoc-components.d.ts.map +1 -1
  67. package/lib/typescript/commonjs/index.d.ts +1 -0
  68. package/lib/typescript/commonjs/index.d.ts.map +1 -1
  69. package/lib/typescript/commonjs/styles/text-colors.d.ts.map +1 -1
  70. package/lib/typescript/commonjs/utils/clabe.d.ts +5 -0
  71. package/lib/typescript/commonjs/utils/clabe.d.ts.map +1 -0
  72. package/lib/typescript/commonjs/utils/mx-banks.d.ts +7 -0
  73. package/lib/typescript/commonjs/utils/mx-banks.d.ts.map +1 -0
  74. package/lib/typescript/module/components/BaseAlert.d.ts +1 -1
  75. package/lib/typescript/module/components/BaseAlert.d.ts.map +1 -1
  76. package/lib/typescript/module/components/BaseBadge.d.ts.map +1 -1
  77. package/lib/typescript/module/components/BaseButton.d.ts.map +1 -1
  78. package/lib/typescript/module/components/BaseDateInput.d.ts.map +1 -1
  79. package/lib/typescript/module/components/BaseHorizontalTabs.d.ts.map +1 -1
  80. package/lib/typescript/module/components/BaseRadioGroup.d.ts.map +1 -1
  81. package/lib/typescript/module/components/BaseSelect.d.ts.map +1 -1
  82. package/lib/typescript/module/components/BaseSelectionItem.d.ts.map +1 -1
  83. package/lib/typescript/module/components/BaseStackedList.d.ts.map +1 -1
  84. package/lib/typescript/module/hoc-components.d.ts +2 -2
  85. package/lib/typescript/module/hoc-components.d.ts.map +1 -1
  86. package/lib/typescript/module/index.d.ts +1 -0
  87. package/lib/typescript/module/index.d.ts.map +1 -1
  88. package/lib/typescript/module/styles/text-colors.d.ts.map +1 -1
  89. package/lib/typescript/module/utils/clabe.d.ts +5 -0
  90. package/lib/typescript/module/utils/clabe.d.ts.map +1 -0
  91. package/lib/typescript/module/utils/mx-banks.d.ts +7 -0
  92. package/lib/typescript/module/utils/mx-banks.d.ts.map +1 -0
  93. package/package.json +3 -3
  94. package/src/components/BaseAlert.tsx +79 -76
  95. package/src/components/BaseBadge.tsx +3 -2
  96. package/src/components/BaseButton.tsx +11 -20
  97. package/src/components/BaseDateInput.tsx +7 -6
  98. package/src/components/BaseHorizontalTabs.tsx +4 -8
  99. package/src/components/BaseRadioGroup.tsx +4 -3
  100. package/src/components/BaseSelect.tsx +11 -14
  101. package/src/components/BaseSelectionItem.tsx +3 -2
  102. package/src/components/BaseStackedList.tsx +6 -5
  103. package/src/styles/text-colors.ts +0 -16
@@ -6,14 +6,11 @@ import { ViewStyle, Dimensions } from 'react-native';
6
6
  import { ChevronDownIcon, CheckIcon } from 'react-native-heroicons/outline';
7
7
 
8
8
  import {
9
- GestureScrollView,
10
- View,
11
- Text,
12
- Pressable,
13
- TouchableOpacity,
9
+ GestureScrollView, View, Pressable, TouchableOpacity,
14
10
  } from '../hoc-components';
15
11
  import BaseBottomSheetModal from './BaseBottomSheetModal';
16
12
  import BaseIcon from './BaseIcon';
13
+ import BaseText from './BaseText';
17
14
 
18
15
  export interface SelectOption {
19
16
  value: string;
@@ -89,7 +86,7 @@ function BaseSelect({
89
86
  return (
90
87
  <View style={style}>
91
88
  {label && (
92
- <Text className="mb-1.5 text-sm font-medium text-gray-700">{label}</Text>
89
+ <BaseText className="mb-1.5 text-sm font-medium text-gray-700">{label}</BaseText>
93
90
  )}
94
91
 
95
92
  <Pressable
@@ -97,12 +94,12 @@ function BaseSelect({
97
94
  disabled={disabled}
98
95
  className={selectClasses}
99
96
  >
100
- <Text
97
+ <BaseText
101
98
  className={textClasses}
102
99
  numberOfLines={1}
103
100
  >
104
101
  {selectedOption?.label || placeholder}
105
- </Text>
102
+ </BaseText>
106
103
  <BaseIcon
107
104
  icon={ChevronDownIcon}
108
105
  size={20}
@@ -112,11 +109,11 @@ function BaseSelect({
112
109
  </Pressable>
113
110
 
114
111
  {helpText && !hasError && (
115
- <Text className="mt-1.5 text-sm text-gray-500">{helpText}</Text>
112
+ <BaseText className="mt-1.5 text-sm text-gray-500">{helpText}</BaseText>
116
113
  )}
117
114
 
118
115
  {hasError && (
119
- <Text className="mt-1.5 text-sm text-red-600">{error}</Text>
116
+ <BaseText className="mt-1.5 text-sm text-red-600">{error}</BaseText>
120
117
  )}
121
118
 
122
119
  <BaseBottomSheetModal
@@ -131,9 +128,9 @@ function BaseSelect({
131
128
  paddingBottom: 16,
132
129
  }}
133
130
  >
134
- <Text className="mb-4 text-center text-lg font-semibold text-gray-900">
131
+ <BaseText className="mb-4 text-center text-lg font-semibold text-gray-900">
135
132
  {bottomSheetTitle || label || placeholder}
136
- </Text>
133
+ </BaseText>
137
134
  {options.map((option, index) => (
138
135
  <TouchableOpacity
139
136
  key={option.value}
@@ -147,7 +144,7 @@ function BaseSelect({
147
144
  },
148
145
  )}
149
146
  >
150
- <Text
147
+ <BaseText
151
148
  className={clsx('flex-1 text-base', {
152
149
  'text-gray-900': !option.disabled,
153
150
  'text-gray-400': option.disabled,
@@ -155,7 +152,7 @@ function BaseSelect({
155
152
  })}
156
153
  >
157
154
  {option.label}
158
- </Text>
155
+ </BaseText>
159
156
  {option.value === value && (
160
157
  <CheckIcon
161
158
  size={20}
@@ -4,7 +4,8 @@ import React from 'react';
4
4
  import { ViewProps } from 'react-native';
5
5
  import { CheckIcon } from 'react-native-heroicons/solid';
6
6
 
7
- import { View, Text, TouchableOpacity } from '../hoc-components';
7
+ import { View, TouchableOpacity } from '../hoc-components';
8
+ import BaseText from './BaseText';
8
9
 
9
10
  export interface BaseSelectionItemProps extends ViewProps {
10
11
  value: unknown;
@@ -75,7 +76,7 @@ function BaseSelectionItem({
75
76
  </View>
76
77
  </TouchableOpacity>
77
78
  {hasError && (
78
- <Text className="mt-1.5 text-sm text-error-primary">{error}</Text>
79
+ <BaseText className="mt-1.5 text-sm text-error-primary">{error}</BaseText>
79
80
  )}
80
81
  </View>
81
82
  );
@@ -4,9 +4,10 @@ import { ViewProps } from 'react-native';
4
4
  import { InboxIcon } from 'react-native-heroicons/outline';
5
5
  import { ArrowLeftIcon, ArrowRightIcon } from 'react-native-heroicons/solid';
6
6
 
7
- import { View, Text } from '../hoc-components';
7
+ import { View } from '../hoc-components';
8
8
  import BaseButton from './BaseButton';
9
9
  import BaseSpinner from './BaseSpinner';
10
+ import BaseText from './BaseText';
10
11
  import colors from '../styles/colors';
11
12
 
12
13
  export interface BaseStackedListProps<T> extends ViewProps {
@@ -37,9 +38,9 @@ function EmptyState({ description }: EmptyStateProps) {
37
38
  color={colors.gray_light[500]}
38
39
  />
39
40
  </View>
40
- <Text className="mt-4 text-base font-medium text-primary">No hay nada que mostrar</Text>
41
+ <BaseText className="mt-4 text-base font-medium text-primary">No hay nada que mostrar</BaseText>
41
42
  {description && (
42
- <Text className="mt-2 text-sm text-tertiary">{description}</Text>
43
+ <BaseText className="mt-2 text-sm text-tertiary">{description}</BaseText>
43
44
  )}
44
45
  </View>
45
46
  );
@@ -118,7 +119,7 @@ function BaseStackedList<T>({
118
119
  leftIcon={ArrowLeftIcon}
119
120
  />
120
121
 
121
- <Text className="text-sm font-medium text-secondary">
122
+ <BaseText className="text-sm font-medium text-secondary">
122
123
  Página
123
124
  {' '}
124
125
  {currentPage + 1}
@@ -126,7 +127,7 @@ function BaseStackedList<T>({
126
127
  de
127
128
  {' '}
128
129
  {totalPages}
129
- </Text>
130
+ </BaseText>
130
131
 
131
132
  <BaseButton
132
133
  variant="secondary"
@@ -87,22 +87,6 @@ const textColors: TextColorsType = {
87
87
  light: colors.success['600'],
88
88
  dark: colors.success['400'],
89
89
  },
90
- 'text-brand': {
91
- light: colors.brand['600'],
92
- dark: colors.brand['400'],
93
- },
94
- 'text-brand_alt': {
95
- light: colors.base.white,
96
- dark: colors.base.white,
97
- },
98
- 'text-error': {
99
- light: colors.error['500'],
100
- dark: colors.error['400'],
101
- },
102
- 'text-success': {
103
- light: colors.success['500'],
104
- dark: colors.success['400'],
105
- },
106
90
  };
107
91
 
108
92
  Object.entries(utilityColors).forEach(([key, value]) => {