@grupalia/rn-ui-kit 0.9.2 → 0.10.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.
package/README.md CHANGED
@@ -3,6 +3,68 @@
3
3
  ## Overview
4
4
  This design system provides a scalable, maintainable, and consistent approach to building user interfaces across Grupalia products. It is inspired by best practices and the documentation in our Figma files:
5
5
 
6
+ ## Installation
7
+
8
+ ```bash
9
+ npm install @grupalia/rn-ui-kit
10
+ # or
11
+ yarn add @grupalia/rn-ui-kit
12
+ ```
13
+
14
+ ### Font Setup
15
+
16
+ This design system uses Inter fonts. To configure them in your project:
17
+
18
+ 1. Install the required dependencies:
19
+
20
+ ```bash
21
+ npx expo install @expo-google-fonts/inter expo-font
22
+ ```
23
+
24
+ 2. Add the `expo-font` plugin to your `app.json` or `app.config.js`:
25
+
26
+ ```json
27
+ {
28
+ "expo": {
29
+ "plugins": [
30
+ [
31
+ "expo-font",
32
+ {
33
+ "fonts": [
34
+ "node_modules/@expo-google-fonts/inter/100Thin/Inter_100Thin.ttf",
35
+ "node_modules/@expo-google-fonts/inter/200ExtraLight/Inter_200ExtraLight.ttf",
36
+ "node_modules/@expo-google-fonts/inter/300Light/Inter_300Light.ttf",
37
+ "node_modules/@expo-google-fonts/inter/400Regular/Inter_400Regular.ttf",
38
+ "node_modules/@expo-google-fonts/inter/500Medium/Inter_500Medium.ttf",
39
+ "node_modules/@expo-google-fonts/inter/600SemiBold/Inter_600SemiBold.ttf",
40
+ "node_modules/@expo-google-fonts/inter/700Bold/Inter_700Bold.ttf",
41
+ "node_modules/@expo-google-fonts/inter/800ExtraBold/Inter_800ExtraBold.ttf",
42
+ "node_modules/@expo-google-fonts/inter/900Black/Inter_900Black.ttf",
43
+ "node_modules/@expo-google-fonts/inter/100Thin_Italic/Inter_100Thin_Italic.ttf",
44
+ "node_modules/@expo-google-fonts/inter/200ExtraLight_Italic/Inter_200ExtraLight_Italic.ttf",
45
+ "node_modules/@expo-google-fonts/inter/300Light_Italic/Inter_300Light_Italic.ttf",
46
+ "node_modules/@expo-google-fonts/inter/400Regular_Italic/Inter_400Regular_Italic.ttf",
47
+ "node_modules/@expo-google-fonts/inter/500Medium_Italic/Inter_500Medium_Italic.ttf",
48
+ "node_modules/@expo-google-fonts/inter/600SemiBold_Italic/Inter_600SemiBold_Italic.ttf",
49
+ "node_modules/@expo-google-fonts/inter/700Bold_Italic/Inter_700Bold_Italic.ttf",
50
+ "node_modules/@expo-google-fonts/inter/800ExtraBold_Italic/Inter_800ExtraBold_Italic.ttf",
51
+ "node_modules/@expo-google-fonts/inter/900Black_Italic/Inter_900Black_Italic.ttf"
52
+ ]
53
+ }
54
+ ]
55
+ ]
56
+ }
57
+ }
58
+ ```
59
+
60
+ 3. Run prebuild to apply the font configuration:
61
+
62
+ ```bash
63
+ npx expo prebuild --clean
64
+ ```
65
+
66
+ This will copy all Inter font weights (100-900) and styles (regular and italic) to your native projects.
67
+
6
68
  ## Color System & Variables
7
69
 
8
70
  ### 1. **Palette Variables**
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _nativewind = require("nativewind");
8
+ var _reactNative = require("react-native");
9
+ var _hocComponents = require("../hoc-components");
10
+ var _fonts = require("../utils/fonts");
11
+ var _jsxRuntime = require("react/jsx-runtime");
12
+ function BaseText({
13
+ children,
14
+ style,
15
+ ...props
16
+ }) {
17
+ const styleObj = _reactNative.StyleSheet.flatten(style) ?? {};
18
+ const fontWeight = (0, _fonts.convertFontWeight)(styleObj.fontWeight);
19
+ const italic = styleObj.fontStyle === 'italic';
20
+ const fontFamily = (0, _fonts.getFontFamily)(fontWeight, italic);
21
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_hocComponents.Text, {
22
+ allowFontScaling: false,
23
+ style: {
24
+ ...styleObj,
25
+ fontWeight: undefined,
26
+ fontStyle: undefined,
27
+ fontFamily
28
+ },
29
+ ...props,
30
+ children: children
31
+ });
32
+ }
33
+ var _default = exports.default = (0, _nativewind.styled)(BaseText);
34
+ //# sourceMappingURL=BaseText.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_nativewind","require","_reactNative","_hocComponents","_fonts","_jsxRuntime","BaseText","children","style","props","styleObj","StyleSheet","flatten","fontWeight","convertFontWeight","italic","fontStyle","fontFamily","getFontFamily","jsx","Text","allowFontScaling","undefined","_default","exports","default","styled"],"sourceRoot":"../../../src","sources":["components/BaseText.tsx"],"mappings":";;;;;;AAAA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAEA,IAAAE,cAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AAAkE,IAAAI,WAAA,GAAAJ,OAAA;AAElE,SAASK,QAAQA,CAAC;EAChBC,QAAQ;EACRC,KAAK;EACL,GAAGC;AACM,CAAC,EAAE;EACZ,MAAMC,QAAQ,GAAGC,uBAAU,CAACC,OAAO,CAACJ,KAAK,CAAC,IAAI,CAAC,CAAC;EAChD,MAAMK,UAAU,GAAG,IAAAC,wBAAiB,EAACJ,QAAQ,CAACG,UAAU,CAAC;EACzD,MAAME,MAAM,GAAGL,QAAQ,CAACM,SAAS,KAAK,QAAQ;EAE9C,MAAMC,UAAU,GAAG,IAAAC,oBAAa,EAACL,UAAU,EAAEE,MAAM,CAAC;EAEpD,oBACE,IAAAV,WAAA,CAAAc,GAAA,EAAChB,cAAA,CAAAiB,IAAI;IACHC,gBAAgB,EAAE,KAAM;IACxBb,KAAK,EAAE;MACL,GAAGE,QAAQ;MACXG,UAAU,EAAES,SAAS;MACrBN,SAAS,EAAEM,SAAS;MACpBL;IACF,CAAE;IAAA,GACER,KAAK;IAAAF,QAAA,EAERA;EAAQ,CACL,CAAC;AAEX;AAAC,IAAAgB,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEc,IAAAC,kBAAM,EAACpB,QAAQ,CAAC","ignoreList":[]}
@@ -75,6 +75,12 @@ Object.defineProperty(exports, "BaseSwitch", {
75
75
  return _BaseSwitch.default;
76
76
  }
77
77
  });
78
+ Object.defineProperty(exports, "BaseText", {
79
+ enumerable: true,
80
+ get: function () {
81
+ return _BaseText.default;
82
+ }
83
+ });
78
84
  Object.defineProperty(exports, "FormikDateInput", {
79
85
  enumerable: true,
80
86
  get: function () {
@@ -127,6 +133,7 @@ var _BaseDateInput = _interopRequireDefault(require("./BaseDateInput"));
127
133
  var _FormikDateInput = _interopRequireDefault(require("./FormikDateInput"));
128
134
  var _BaseSwitch = _interopRequireDefault(require("./BaseSwitch"));
129
135
  var _PressableOpacity = _interopRequireDefault(require("./PressableOpacity"));
136
+ var _BaseText = _interopRequireDefault(require("./BaseText"));
130
137
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
131
138
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
132
139
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_BaseButton","_interopRequireDefault","require","_BaseBadge","_BaseSpinner","_BaseStackedList","_BaseIcon","_BaseAlert","_BaseSelect","_interopRequireWildcard","_FormikSelect","_BaseHorizontalTabs","_BaseSelectionItem","_BaseRadioGroup","_FormikRadioGroup","_BaseDateInput","_FormikDateInput","_BaseSwitch","_PressableOpacity","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor"],"sourceRoot":"../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AA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,CAAA,EAAAC,CAAA,OAAAM,CAAA,CAAAK,GAAA,IAAAL,CAAA,CAAAM,GAAA,IAAAP,CAAA,CAAAE,CAAA,EAAAP,CAAA,EAAAM,CAAA,IAAAC,CAAA,CAAAP,CAAA,IAAAD,CAAA,CAAAC,CAAA,WAAAO,CAAA,KAAAR,CAAA,EAAAC,CAAA;AAAA,SAAAnB,uBAAAkB,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAK,UAAA,GAAAL,CAAA,KAAAU,OAAA,EAAAV,CAAA","ignoreList":[]}
1
+ {"version":3,"names":["_BaseButton","_interopRequireDefault","require","_BaseBadge","_BaseSpinner","_BaseStackedList","_BaseIcon","_BaseAlert","_BaseSelect","_interopRequireWildcard","_FormikSelect","_BaseHorizontalTabs","_BaseSelectionItem","_BaseRadioGroup","_FormikRadioGroup","_BaseDateInput","_FormikDateInput","_BaseSwitch","_PressableOpacity","_BaseText","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor"],"sourceRoot":"../../../src","sources":["components/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,CAAA,EAAAC,CAAA,OAAAM,CAAA,CAAAK,GAAA,IAAAL,CAAA,CAAAM,GAAA,IAAAP,CAAA,CAAAE,CAAA,EAAAP,CAAA,EAAAM,CAAA,IAAAC,CAAA,CAAAP,CAAA,IAAAD,CAAA,CAAAC,CAAA,WAAAO,CAAA,KAAAR,CAAA,EAAAC,CAAA;AAAA,SAAApB,uBAAAmB,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAK,UAAA,GAAAL,CAAA,KAAAU,OAAA,EAAAV,CAAA","ignoreList":[]}
@@ -0,0 +1,116 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.INTER_FONTS = void 0;
7
+ exports.convertFontWeight = convertFontWeight;
8
+ exports.getFontFamily = void 0;
9
+ var _reactNative = require("react-native");
10
+ const INTER_FONTS = exports.INTER_FONTS = {
11
+ weights: {
12
+ 100: _reactNative.Platform.select({
13
+ android: 'Inter_100Thin',
14
+ ios: 'Inter-Thin'
15
+ }),
16
+ 200: _reactNative.Platform.select({
17
+ android: 'Inter_200ExtraLight',
18
+ ios: 'Inter-ExtraLight'
19
+ }),
20
+ 300: _reactNative.Platform.select({
21
+ android: 'Inter_300Light',
22
+ ios: 'Inter-Light'
23
+ }),
24
+ 400: _reactNative.Platform.select({
25
+ android: 'Inter_400Regular',
26
+ ios: 'Inter-Regular'
27
+ }),
28
+ 500: _reactNative.Platform.select({
29
+ android: 'Inter_500Medium',
30
+ ios: 'Inter-Medium'
31
+ }),
32
+ 600: _reactNative.Platform.select({
33
+ android: 'Inter_600SemiBold',
34
+ ios: 'Inter-SemiBold'
35
+ }),
36
+ 700: _reactNative.Platform.select({
37
+ android: 'Inter_700Bold',
38
+ ios: 'Inter-Bold'
39
+ }),
40
+ 800: _reactNative.Platform.select({
41
+ android: 'Inter_800ExtraBold',
42
+ ios: 'Inter-ExtraBold'
43
+ }),
44
+ 900: _reactNative.Platform.select({
45
+ android: 'Inter_900Black',
46
+ ios: 'Inter-Black'
47
+ })
48
+ },
49
+ italics: {
50
+ 100: _reactNative.Platform.select({
51
+ android: 'Inter_100Thin_Italic',
52
+ ios: 'Inter-ThinItalic'
53
+ }),
54
+ 200: _reactNative.Platform.select({
55
+ android: 'Inter_200ExtraLight_Italic',
56
+ ios: 'Inter-ExtraLightItalic'
57
+ }),
58
+ 300: _reactNative.Platform.select({
59
+ android: 'Inter_300Light_Italic',
60
+ ios: 'Inter-LightItalic'
61
+ }),
62
+ 400: _reactNative.Platform.select({
63
+ android: 'Inter_400Regular_Italic',
64
+ ios: 'Inter-Italic'
65
+ }),
66
+ 500: _reactNative.Platform.select({
67
+ android: 'Inter_500Medium_Italic',
68
+ ios: 'Inter-MediumItalic'
69
+ }),
70
+ 600: _reactNative.Platform.select({
71
+ android: 'Inter_600SemiBold_Italic',
72
+ ios: 'Inter-SemiBoldItalic'
73
+ }),
74
+ 700: _reactNative.Platform.select({
75
+ android: 'Inter_700Bold_Italic',
76
+ ios: 'Inter-BoldItalic'
77
+ }),
78
+ 800: _reactNative.Platform.select({
79
+ android: 'Inter_800ExtraBold_Italic',
80
+ ios: 'Inter-ExtraBoldItalic'
81
+ }),
82
+ 900: _reactNative.Platform.select({
83
+ android: 'Inter_900Black_Italic',
84
+ ios: 'Inter-BlackItalic'
85
+ })
86
+ }
87
+ };
88
+ const getFontFamily = (weight = 400, italic = false) => italic ? INTER_FONTS.italics[weight] ?? INTER_FONTS.italics[400] : INTER_FONTS.weights[weight] ?? INTER_FONTS.weights[400];
89
+ exports.getFontFamily = getFontFamily;
90
+ function convertFontWeight(fontWeight) {
91
+ if (typeof fontWeight === 'number') {
92
+ return fontWeight;
93
+ }
94
+ if (typeof fontWeight === 'string') {
95
+ switch (fontWeight) {
96
+ case 'normal':
97
+ return 400;
98
+ case 'bold':
99
+ return 700;
100
+ case '100':
101
+ case '200':
102
+ case '300':
103
+ case '400':
104
+ case '500':
105
+ case '600':
106
+ case '700':
107
+ case '800':
108
+ case '900':
109
+ return parseInt(fontWeight, 10);
110
+ default:
111
+ return 400;
112
+ }
113
+ }
114
+ return 400;
115
+ }
116
+ //# sourceMappingURL=fonts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_reactNative","require","INTER_FONTS","exports","weights","Platform","select","android","ios","italics","getFontFamily","weight","italic","convertFontWeight","fontWeight","parseInt"],"sourceRoot":"../../../src","sources":["utils/fonts.ts"],"mappings":";;;;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAIO,MAAMC,WAAW,GAAAC,OAAA,CAAAD,WAAA,GAAG;EACzBE,OAAO,EAAE;IACP,GAAG,EAAEC,qBAAQ,CAACC,MAAM,CAAC;MACnBC,OAAO,EAAE,eAAe;MACxBC,GAAG,EAAE;IACP,CAAC,CAAC;IACF,GAAG,EAAEH,qBAAQ,CAACC,MAAM,CAAC;MACnBC,OAAO,EAAE,qBAAqB;MAC9BC,GAAG,EAAE;IACP,CAAC,CAAC;IACF,GAAG,EAAEH,qBAAQ,CAACC,MAAM,CAAC;MACnBC,OAAO,EAAE,gBAAgB;MACzBC,GAAG,EAAE;IACP,CAAC,CAAC;IACF,GAAG,EAAEH,qBAAQ,CAACC,MAAM,CAAC;MACnBC,OAAO,EAAE,kBAAkB;MAC3BC,GAAG,EAAE;IACP,CAAC,CAAC;IACF,GAAG,EAAEH,qBAAQ,CAACC,MAAM,CAAC;MACnBC,OAAO,EAAE,iBAAiB;MAC1BC,GAAG,EAAE;IACP,CAAC,CAAC;IACF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qBAAQ,CAACC,MAAM,CAAC;MACnBC,OAAO,EAAE,2BAA2B;MACpCC,GAAG,EAAE;IACP,CAAC,CAAC;IACF,GAAG,EAAEH,qBAAQ,CAACC,MAAM,CAAC;MACnBC,OAAO,EAAE,uBAAuB;MAChCC,GAAG,EAAE;IACP,CAAC;EACH;AACF,CAAU;AAEH,MAAME,aAAa,GAAGA,CAC3BC,MAAkB,GAAG,GAAG,EACxBC,MAAM,GAAG,KAAK,KACVA,MAAM,GACRV,WAAW,CAACO,OAAO,CAACE,MAAM,CAAC,IAAIT,WAAW,CAACO,OAAO,CAAC,GAAG,CAAC,GACvDP,WAAW,CAACE,OAAO,CAACO,MAAM,CAAC,IAAIT,WAAW,CAACE,OAAO,CAAC,GAAG,CAAE;AAACD,OAAA,CAAAO,aAAA,GAAAA,aAAA;AAEtD,SAASG,iBAAiBA,CAACC,UAAmC,EAAc;EACjF,IAAI,OAAOA,UAAU,KAAK,QAAQ,EAAE;IAClC,OAAOA,UAAU;EACnB;EAEA,IAAI,OAAOA,UAAU,KAAK,QAAQ,EAAE;IAClC,QAAQA,UAAU;MAChB,KAAK,QAAQ;QACX,OAAO,GAAG;MACZ,KAAK,MAAM;QACT,OAAO,GAAG;MACZ,KAAK,KAAK;MACV,KAAK,KAAK;MACV,KAAK,KAAK;MACV,KAAK,KAAK;MACV,KAAK,KAAK;MACV,KAAK,KAAK;MACV,KAAK,KAAK;MACV,KAAK,KAAK;MACV,KAAK,KAAK;QACR,OAAOC,QAAQ,CAACD,UAAU,EAAE,EAAE,CAAC;MACjC;QACE,OAAO,GAAG;IACd;EACF;EAEA,OAAO,GAAG;AACZ","ignoreList":[]}
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+
3
+ import { styled } from 'nativewind';
4
+ import { StyleSheet } from 'react-native';
5
+ import { Text } from "../hoc-components.js";
6
+ import { getFontFamily, convertFontWeight } from "../utils/fonts.js";
7
+ import { jsx as _jsx } from "react/jsx-runtime";
8
+ function BaseText({
9
+ children,
10
+ style,
11
+ ...props
12
+ }) {
13
+ const styleObj = StyleSheet.flatten(style) ?? {};
14
+ const fontWeight = convertFontWeight(styleObj.fontWeight);
15
+ const italic = styleObj.fontStyle === 'italic';
16
+ const fontFamily = getFontFamily(fontWeight, italic);
17
+ return /*#__PURE__*/_jsx(Text, {
18
+ allowFontScaling: false,
19
+ style: {
20
+ ...styleObj,
21
+ fontWeight: undefined,
22
+ fontStyle: undefined,
23
+ fontFamily
24
+ },
25
+ ...props,
26
+ children: children
27
+ });
28
+ }
29
+ export default styled(BaseText);
30
+ //# sourceMappingURL=BaseText.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["styled","StyleSheet","Text","getFontFamily","convertFontWeight","jsx","_jsx","BaseText","children","style","props","styleObj","flatten","fontWeight","italic","fontStyle","fontFamily","allowFontScaling","undefined"],"sourceRoot":"../../../src","sources":["components/BaseText.tsx"],"mappings":";;AAAA,SAASA,MAAM,QAAQ,YAAY;AACnC,SAAoBC,UAAU,QAAQ,cAAc;AAEpD,SAASC,IAAI,QAAQ,sBAAmB;AACxC,SAASC,aAAa,EAAEC,iBAAiB,QAAQ,mBAAgB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAElE,SAASC,QAAQA,CAAC;EAChBC,QAAQ;EACRC,KAAK;EACL,GAAGC;AACM,CAAC,EAAE;EACZ,MAAMC,QAAQ,GAAGV,UAAU,CAACW,OAAO,CAACH,KAAK,CAAC,IAAI,CAAC,CAAC;EAChD,MAAMI,UAAU,GAAGT,iBAAiB,CAACO,QAAQ,CAACE,UAAU,CAAC;EACzD,MAAMC,MAAM,GAAGH,QAAQ,CAACI,SAAS,KAAK,QAAQ;EAE9C,MAAMC,UAAU,GAAGb,aAAa,CAACU,UAAU,EAAEC,MAAM,CAAC;EAEpD,oBACER,IAAA,CAACJ,IAAI;IACHe,gBAAgB,EAAE,KAAM;IACxBR,KAAK,EAAE;MACL,GAAGE,QAAQ;MACXE,UAAU,EAAEK,SAAS;MACrBH,SAAS,EAAEG,SAAS;MACpBF;IACF,CAAE;IAAA,GACEN,KAAK;IAAAF,QAAA,EAERA;EAAQ,CACL,CAAC;AAEX;AAEA,eAAeR,MAAM,CAACO,QAAQ,CAAC","ignoreList":[]}
@@ -16,4 +16,5 @@ export { default as BaseDateInput } from "./BaseDateInput.js";
16
16
  export { default as FormikDateInput } from "./FormikDateInput.js";
17
17
  export { default as BaseSwitch } from "./BaseSwitch.js";
18
18
  export { default as PressableOpacity } from "./PressableOpacity.js";
19
+ export { default as BaseText } from "./BaseText.js";
19
20
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["default","BaseButton","BaseBadge","BaseSpinner","BaseStackedList","BaseIcon","BaseAlert","BaseSelect","SelectOption","FormikSelect","BaseHorizontalTabs","Tab","BaseSelectionItem","BaseRadioGroup","FormikRadioGroup","BaseDateInput","FormikDateInput","BaseSwitch","PressableOpacity"],"sourceRoot":"../../../src","sources":["components/index.ts"],"mappings":";;AAAA,SAASA,OAAO,IAAIC,UAAU,QAAQ,iBAAc;AACpD,SAASD,OAAO,IAAIE,SAAS,QAAQ,gBAAa;AAClD,SAASF,OAAO,IAAIG,WAAW,QAAQ,kBAAe;AACtD,SAASH,OAAO,IAAII,eAAe,QAAQ,sBAAmB;AAC9D,SAASJ,OAAO,IAAIK,QAAQ,QAAQ,eAAY;AAChD,SAASL,OAAO,IAAIM,SAAS,QAAQ,gBAAa;AAClD,SAASN,OAAO,IAAIO,UAAU,EAAEC,YAAY,QAAQ,iBAAc;AAClE,SAASR,OAAO,IAAIS,YAAY,QAAQ,mBAAgB;AACxD,SAAST,OAAO,IAAIU,kBAAkB,EAAEC,GAAG,QAAQ,yBAAsB;AACzE,SAASX,OAAO,IAAIY,iBAAiB,QAAQ,wBAAqB;AAClE,SAASZ,OAAO,IAAIa,cAAc,QAAQ,qBAAkB;AAC5D,SAASb,OAAO,IAAIc,gBAAgB,QAAQ,uBAAoB;AAChE,SAASd,OAAO,IAAIe,aAAa,QAAQ,oBAAiB;AAC1D,SAASf,OAAO,IAAIgB,eAAe,QAAQ,sBAAmB;AAC9D,SAAShB,OAAO,IAAIiB,UAAU,QAAQ,iBAAc;AACpD,SAASjB,OAAO,IAAIkB,gBAAgB,QAAQ,uBAAoB","ignoreList":[]}
1
+ {"version":3,"names":["default","BaseButton","BaseBadge","BaseSpinner","BaseStackedList","BaseIcon","BaseAlert","BaseSelect","SelectOption","FormikSelect","BaseHorizontalTabs","Tab","BaseSelectionItem","BaseRadioGroup","FormikRadioGroup","BaseDateInput","FormikDateInput","BaseSwitch","PressableOpacity","BaseText"],"sourceRoot":"../../../src","sources":["components/index.ts"],"mappings":";;AAAA,SAASA,OAAO,IAAIC,UAAU,QAAQ,iBAAc;AACpD,SAASD,OAAO,IAAIE,SAAS,QAAQ,gBAAa;AAClD,SAASF,OAAO,IAAIG,WAAW,QAAQ,kBAAe;AACtD,SAASH,OAAO,IAAII,eAAe,QAAQ,sBAAmB;AAC9D,SAASJ,OAAO,IAAIK,QAAQ,QAAQ,eAAY;AAChD,SAASL,OAAO,IAAIM,SAAS,QAAQ,gBAAa;AAClD,SAASN,OAAO,IAAIO,UAAU,EAAEC,YAAY,QAAQ,iBAAc;AAClE,SAASR,OAAO,IAAIS,YAAY,QAAQ,mBAAgB;AACxD,SAAST,OAAO,IAAIU,kBAAkB,EAAEC,GAAG,QAAQ,yBAAsB;AACzE,SAASX,OAAO,IAAIY,iBAAiB,QAAQ,wBAAqB;AAClE,SAASZ,OAAO,IAAIa,cAAc,QAAQ,qBAAkB;AAC5D,SAASb,OAAO,IAAIc,gBAAgB,QAAQ,uBAAoB;AAChE,SAASd,OAAO,IAAIe,aAAa,QAAQ,oBAAiB;AAC1D,SAASf,OAAO,IAAIgB,eAAe,QAAQ,sBAAmB;AAC9D,SAAShB,OAAO,IAAIiB,UAAU,QAAQ,iBAAc;AACpD,SAASjB,OAAO,IAAIkB,gBAAgB,QAAQ,uBAAoB;AAChE,SAASlB,OAAO,IAAImB,QAAQ,QAAQ,eAAY","ignoreList":[]}
@@ -0,0 +1,109 @@
1
+ "use strict";
2
+
3
+ import { Platform } from 'react-native';
4
+ export const INTER_FONTS = {
5
+ weights: {
6
+ 100: Platform.select({
7
+ android: 'Inter_100Thin',
8
+ ios: 'Inter-Thin'
9
+ }),
10
+ 200: Platform.select({
11
+ android: 'Inter_200ExtraLight',
12
+ ios: 'Inter-ExtraLight'
13
+ }),
14
+ 300: Platform.select({
15
+ android: 'Inter_300Light',
16
+ ios: 'Inter-Light'
17
+ }),
18
+ 400: Platform.select({
19
+ android: 'Inter_400Regular',
20
+ ios: 'Inter-Regular'
21
+ }),
22
+ 500: Platform.select({
23
+ android: 'Inter_500Medium',
24
+ ios: 'Inter-Medium'
25
+ }),
26
+ 600: Platform.select({
27
+ android: 'Inter_600SemiBold',
28
+ ios: 'Inter-SemiBold'
29
+ }),
30
+ 700: Platform.select({
31
+ android: 'Inter_700Bold',
32
+ ios: 'Inter-Bold'
33
+ }),
34
+ 800: Platform.select({
35
+ android: 'Inter_800ExtraBold',
36
+ ios: 'Inter-ExtraBold'
37
+ }),
38
+ 900: Platform.select({
39
+ android: 'Inter_900Black',
40
+ ios: 'Inter-Black'
41
+ })
42
+ },
43
+ italics: {
44
+ 100: Platform.select({
45
+ android: 'Inter_100Thin_Italic',
46
+ ios: 'Inter-ThinItalic'
47
+ }),
48
+ 200: Platform.select({
49
+ android: 'Inter_200ExtraLight_Italic',
50
+ ios: 'Inter-ExtraLightItalic'
51
+ }),
52
+ 300: Platform.select({
53
+ android: 'Inter_300Light_Italic',
54
+ ios: 'Inter-LightItalic'
55
+ }),
56
+ 400: Platform.select({
57
+ android: 'Inter_400Regular_Italic',
58
+ ios: 'Inter-Italic'
59
+ }),
60
+ 500: Platform.select({
61
+ android: 'Inter_500Medium_Italic',
62
+ ios: 'Inter-MediumItalic'
63
+ }),
64
+ 600: Platform.select({
65
+ android: 'Inter_600SemiBold_Italic',
66
+ ios: 'Inter-SemiBoldItalic'
67
+ }),
68
+ 700: Platform.select({
69
+ android: 'Inter_700Bold_Italic',
70
+ ios: 'Inter-BoldItalic'
71
+ }),
72
+ 800: Platform.select({
73
+ android: 'Inter_800ExtraBold_Italic',
74
+ ios: 'Inter-ExtraBoldItalic'
75
+ }),
76
+ 900: Platform.select({
77
+ android: 'Inter_900Black_Italic',
78
+ ios: 'Inter-BlackItalic'
79
+ })
80
+ }
81
+ };
82
+ export const getFontFamily = (weight = 400, italic = false) => italic ? INTER_FONTS.italics[weight] ?? INTER_FONTS.italics[400] : INTER_FONTS.weights[weight] ?? INTER_FONTS.weights[400];
83
+ export function convertFontWeight(fontWeight) {
84
+ if (typeof fontWeight === 'number') {
85
+ return fontWeight;
86
+ }
87
+ if (typeof fontWeight === 'string') {
88
+ switch (fontWeight) {
89
+ case 'normal':
90
+ return 400;
91
+ case 'bold':
92
+ return 700;
93
+ case '100':
94
+ case '200':
95
+ case '300':
96
+ case '400':
97
+ case '500':
98
+ case '600':
99
+ case '700':
100
+ case '800':
101
+ case '900':
102
+ return parseInt(fontWeight, 10);
103
+ default:
104
+ return 400;
105
+ }
106
+ }
107
+ return 400;
108
+ }
109
+ //# sourceMappingURL=fonts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["Platform","INTER_FONTS","weights","select","android","ios","italics","getFontFamily","weight","italic","convertFontWeight","fontWeight","parseInt"],"sourceRoot":"../../../src","sources":["utils/fonts.ts"],"mappings":";;AAAA,SAASA,QAAQ,QAAmB,cAAc;AAIlD,OAAO,MAAMC,WAAW,GAAG;EACzBC,OAAO,EAAE;IACP,GAAG,EAAEF,QAAQ,CAACG,MAAM,CAAC;MACnBC,OAAO,EAAE,eAAe;MACxBC,GAAG,EAAE;IACP,CAAC,CAAC;IACF,GAAG,EAAEL,QAAQ,CAACG,MAAM,CAAC;MACnBC,OAAO,EAAE,qBAAqB;MAC9BC,GAAG,EAAE;IACP,CAAC,CAAC;IACF,GAAG,EAAEL,QAAQ,CAACG,MAAM,CAAC;MACnBC,OAA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,GAAG;AACZ","ignoreList":[]}
@@ -0,0 +1,10 @@
1
+ /// <reference types="react" />
2
+ import { TextProps } from 'react-native';
3
+ declare const _default: import("react").ForwardRefExoticComponent<TextProps & {
4
+ className?: string | undefined;
5
+ tw?: string | undefined;
6
+ baseClassName?: string | undefined;
7
+ baseTw?: string | undefined;
8
+ } & import("react").RefAttributes<unknown>>;
9
+ export default _default;
10
+ //# sourceMappingURL=BaseText.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BaseText.d.ts","sourceRoot":"","sources":["../../../../src/components/BaseText.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,SAAS,EAAc,MAAM,cAAc,CAAC;;;;;;;AAgCrD,wBAAgC"}
@@ -14,4 +14,5 @@ export { default as BaseDateInput } from './BaseDateInput';
14
14
  export { default as FormikDateInput } from './FormikDateInput';
15
15
  export { default as BaseSwitch } from './BaseSwitch';
16
16
  export { default as PressableOpacity } from './PressableOpacity';
17
+ export { default as BaseText } from './BaseText';
17
18
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AACnE,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAA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AAqB,CAAC;AACnE,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC"}
@@ -0,0 +1,29 @@
1
+ import { TextStyle } from 'react-native';
2
+ export type FontWeight = 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900;
3
+ export declare const INTER_FONTS: {
4
+ readonly weights: {
5
+ readonly 100: string | undefined;
6
+ readonly 200: string | undefined;
7
+ readonly 300: string | undefined;
8
+ readonly 400: string | undefined;
9
+ readonly 500: string | undefined;
10
+ readonly 600: string | undefined;
11
+ readonly 700: string | undefined;
12
+ readonly 800: string | undefined;
13
+ readonly 900: string | undefined;
14
+ };
15
+ readonly italics: {
16
+ readonly 100: string | undefined;
17
+ readonly 200: string | undefined;
18
+ readonly 300: string | undefined;
19
+ readonly 400: string | undefined;
20
+ readonly 500: string | undefined;
21
+ readonly 600: string | undefined;
22
+ readonly 700: string | undefined;
23
+ readonly 800: string | undefined;
24
+ readonly 900: string | undefined;
25
+ };
26
+ };
27
+ export declare const getFontFamily: (weight?: FontWeight, italic?: boolean) => string | undefined;
28
+ export declare function convertFontWeight(fontWeight: TextStyle['fontWeight']): FontWeight;
29
+ //# sourceMappingURL=fonts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fonts.d.ts","sourceRoot":"","sources":["../../../../src/utils/fonts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,SAAS,EAAE,MAAM,cAAc,CAAC;AAEnD,MAAM,MAAM,UAAU,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;AAE7E,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;CA6Ed,CAAC;AAEX,eAAO,MAAM,aAAa,YAChB,UAAU,yCAIwC,CAAC;AAE7D,wBAAgB,iBAAiB,CAAC,UAAU,EAAE,SAAS,CAAC,YAAY,CAAC,GAAG,UAAU,CA2BjF"}
@@ -0,0 +1,10 @@
1
+ /// <reference types="react" />
2
+ import { TextProps } from 'react-native';
3
+ declare const _default: import("react").ForwardRefExoticComponent<TextProps & {
4
+ className?: string | undefined;
5
+ tw?: string | undefined;
6
+ baseClassName?: string | undefined;
7
+ baseTw?: string | undefined;
8
+ } & import("react").RefAttributes<unknown>>;
9
+ export default _default;
10
+ //# sourceMappingURL=BaseText.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BaseText.d.ts","sourceRoot":"","sources":["../../../../src/components/BaseText.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,SAAS,EAAc,MAAM,cAAc,CAAC;;;;;;;AAgCrD,wBAAgC"}
@@ -14,4 +14,5 @@ export { default as BaseDateInput } from './BaseDateInput';
14
14
  export { default as FormikDateInput } from './FormikDateInput';
15
15
  export { default as BaseSwitch } from './BaseSwitch';
16
16
  export { default as PressableOpacity } from './PressableOpacity';
17
+ export { default as BaseText } from './BaseText';
17
18
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAA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AAI,QAAQ,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AACnE,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAC;AAC1E,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACnE,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC"}
@@ -0,0 +1,29 @@
1
+ import { TextStyle } from 'react-native';
2
+ export type FontWeight = 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900;
3
+ export declare const INTER_FONTS: {
4
+ readonly weights: {
5
+ readonly 100: string | undefined;
6
+ readonly 200: string | undefined;
7
+ readonly 300: string | undefined;
8
+ readonly 400: string | undefined;
9
+ readonly 500: string | undefined;
10
+ readonly 600: string | undefined;
11
+ readonly 700: string | undefined;
12
+ readonly 800: string | undefined;
13
+ readonly 900: string | undefined;
14
+ };
15
+ readonly italics: {
16
+ readonly 100: string | undefined;
17
+ readonly 200: string | undefined;
18
+ readonly 300: string | undefined;
19
+ readonly 400: string | undefined;
20
+ readonly 500: string | undefined;
21
+ readonly 600: string | undefined;
22
+ readonly 700: string | undefined;
23
+ readonly 800: string | undefined;
24
+ readonly 900: string | undefined;
25
+ };
26
+ };
27
+ export declare const getFontFamily: (weight?: FontWeight, italic?: boolean) => string | undefined;
28
+ export declare function convertFontWeight(fontWeight: TextStyle['fontWeight']): FontWeight;
29
+ //# sourceMappingURL=fonts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fonts.d.ts","sourceRoot":"","sources":["../../../../src/utils/fonts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,SAAS,EAAE,MAAM,cAAc,CAAC;AAEnD,MAAM,MAAM,UAAU,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;AAE7E,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;CA6Ed,CAAC;AAEX,eAAO,MAAM,aAAa,YAChB,UAAU,yCAIwC,CAAC;AAE7D,wBAAgB,iBAAiB,CAAC,UAAU,EAAE,SAAS,CAAC,YAAY,CAAC,GAAG,UAAU,CA2BjF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@grupalia/rn-ui-kit",
3
- "version": "0.9.2",
3
+ "version": "0.10.0",
4
4
  "description": "Grupalia React Native UI Kit",
5
5
  "main": "./lib/module/index.js",
6
6
  "types": "./lib/typescript/module/index.d.ts",
@@ -0,0 +1,34 @@
1
+ import { styled } from 'nativewind';
2
+ import { TextProps, StyleSheet } from 'react-native';
3
+
4
+ import { Text } from '../hoc-components';
5
+ import { getFontFamily, convertFontWeight } from '../utils/fonts';
6
+
7
+ function BaseText({
8
+ children,
9
+ style,
10
+ ...props
11
+ }: TextProps) {
12
+ const styleObj = StyleSheet.flatten(style) ?? {};
13
+ const fontWeight = convertFontWeight(styleObj.fontWeight);
14
+ const italic = styleObj.fontStyle === 'italic';
15
+
16
+ const fontFamily = getFontFamily(fontWeight, italic);
17
+
18
+ return (
19
+ <Text
20
+ allowFontScaling={false}
21
+ style={{
22
+ ...styleObj,
23
+ fontWeight: undefined,
24
+ fontStyle: undefined,
25
+ fontFamily,
26
+ }}
27
+ {...props}
28
+ >
29
+ {children}
30
+ </Text>
31
+ );
32
+ }
33
+
34
+ export default styled(BaseText);
@@ -14,3 +14,4 @@ export { default as BaseDateInput } from './BaseDateInput';
14
14
  export { default as FormikDateInput } from './FormikDateInput';
15
15
  export { default as BaseSwitch } from './BaseSwitch';
16
16
  export { default as PressableOpacity } from './PressableOpacity';
17
+ export { default as BaseText } from './BaseText';