@dryanovski/react-native-components 1.0.7 → 1.0.8

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 (55) hide show
  1. package/lib/module/components/Button/Button.js.map +1 -1
  2. package/lib/module/components/Button/DangerButton.js.map +1 -1
  3. package/lib/module/components/Button/GhostButton.js.map +1 -1
  4. package/lib/module/components/Button/PrimaryButton.js.map +1 -1
  5. package/lib/module/components/Button/SecondaryButton.js.map +1 -1
  6. package/lib/module/components/Divider/Divider.js +33 -0
  7. package/lib/module/components/Divider/Divider.js.map +1 -0
  8. package/lib/module/components/Divider/styles.js +2 -0
  9. package/lib/module/components/Divider/styles.js.map +1 -0
  10. package/lib/module/components/Divider/types.js +4 -0
  11. package/lib/module/components/Divider/types.js.map +1 -0
  12. package/lib/module/components/Layout/HStack.js +24 -0
  13. package/lib/module/components/Layout/HStack.js.map +1 -0
  14. package/lib/module/components/Layout/VStack.js +24 -0
  15. package/lib/module/components/Layout/VStack.js.map +1 -0
  16. package/lib/module/components/Layout/layout.types.js +4 -0
  17. package/lib/module/components/Layout/layout.types.js.map +1 -0
  18. package/lib/module/index.js +17 -0
  19. package/lib/module/index.js.map +1 -1
  20. package/lib/typescript/src/components/Button/Button.d.ts +0 -2
  21. package/lib/typescript/src/components/Button/Button.d.ts.map +1 -1
  22. package/lib/typescript/src/components/Button/DangerButton.d.ts.map +1 -1
  23. package/lib/typescript/src/components/Button/GhostButton.d.ts.map +1 -1
  24. package/lib/typescript/src/components/Button/PrimaryButton.d.ts.map +1 -1
  25. package/lib/typescript/src/components/Button/SecondaryButton.d.ts.map +1 -1
  26. package/lib/typescript/src/components/Button/types.d.ts +11 -0
  27. package/lib/typescript/src/components/Button/types.d.ts.map +1 -1
  28. package/lib/typescript/src/components/Divider/Divider.d.ts +5 -0
  29. package/lib/typescript/src/components/Divider/Divider.d.ts.map +1 -0
  30. package/lib/typescript/src/components/Divider/styles.d.ts +1 -0
  31. package/lib/typescript/src/components/Divider/styles.d.ts.map +1 -0
  32. package/lib/typescript/src/components/Divider/types.d.ts +31 -0
  33. package/lib/typescript/src/components/Divider/types.d.ts.map +1 -0
  34. package/lib/typescript/src/components/Layout/HStack.d.ts +4 -0
  35. package/lib/typescript/src/components/Layout/HStack.d.ts.map +1 -0
  36. package/lib/typescript/src/components/Layout/VStack.d.ts +4 -0
  37. package/lib/typescript/src/components/Layout/VStack.d.ts.map +1 -0
  38. package/lib/typescript/src/components/Layout/layout.types.d.ts +8 -0
  39. package/lib/typescript/src/components/Layout/layout.types.d.ts.map +1 -0
  40. package/lib/typescript/src/index.d.ts +15 -0
  41. package/lib/typescript/src/index.d.ts.map +1 -1
  42. package/package.json +1 -1
  43. package/src/components/Button/Button.tsx +1 -3
  44. package/src/components/Button/DangerButton.tsx +2 -2
  45. package/src/components/Button/GhostButton.tsx +2 -2
  46. package/src/components/Button/PrimaryButton.tsx +2 -2
  47. package/src/components/Button/SecondaryButton.tsx +2 -2
  48. package/src/components/Button/types.ts +12 -0
  49. package/src/components/Divider/Divider.tsx +28 -0
  50. package/src/components/Divider/styles.ts +0 -0
  51. package/src/components/Divider/types.ts +36 -0
  52. package/src/components/Layout/HStack.tsx +19 -0
  53. package/src/components/Layout/VStack.tsx +19 -0
  54. package/src/components/Layout/layout.types.ts +9 -0
  55. package/src/index.tsx +17 -0
@@ -1 +1 @@
1
- {"version":3,"names":["forwardRef","Text","TouchableOpacity","Styles","jsx","_jsx","Button","props","ref","variant","title","size","onPress","undefined","style","disabled","textStyle","rest","textVariant","_base","_disabled","children","_text","displayName"],"sourceRoot":"../../../../src","sources":["components/Button/Button.tsx"],"mappings":";;AAAA,SAASA,UAAU,QAA2B,OAAO;AACrD,SAASC,IAAI,EAAEC,gBAAgB,QAAQ,cAAc;AACrD,OAAOC,MAAM,MAAM,YAAS;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAU7B;AACA;AACA;AACA;AACA,OAAO,MAAMC,MAAM,gBAAGN,UAAU,CAA6B,CAACO,KAAK,EAAEC,GAAG,KAAK;EAC3E,MAAM;IACJC,OAAO,GAAG,SAAS;IACnBC,KAAK;IACLC,IAAI,GAAG,QAAQ;IACfC,OAAO,GAAGA,CAAA,KAAMC,SAAS;IACzBC,KAAK;IACLC,QAAQ,GAAG,KAAK;IAChBC,SAAS;IACT,GAAGC;EACL,CAAC,GAAGV,KAAK;;EAET;AACF;AACA;EACE,MAAMW,WAAW,GAAI,OAAO,GAAGT,OAAmC;EAElE,oBACEJ,IAAA,CAACH,gBAAgB;IACfM,GAAG,EAAEA,GAAI;IACTI,OAAO,EAAEA,OAAQ;IACjBG,QAAQ,EAAEA,QAAS;IACnBD,KAAK,EAAE,CACLX,MAAM,CAACgB,KAAK,EACZhB,MAAM,CAACQ,IAAI,CAAe,EAC1BR,MAAM,CAACM,OAAO,CAAkB,EAChCM,QAAQ,IAAIZ,MAAM,CAACiB,SAAS,EAC5BN,KAAK,CACL;IAAA,GACEG,IAAI;IAAAI,QAAA,eAERhB,IAAA,CAACJ,IAAI;MAACa,KAAK,EAAE,CAACX,MAAM,CAACmB,KAAK,EAAEnB,MAAM,CAACe,WAAW,CAAC,EAAEF,SAAS,CAAE;MAAAK,QAAA,EACzDX;IAAK,CACF;EAAC,CACS,CAAC;AAEvB,CAAC,CAAC;AAEFJ,MAAM,CAACiB,WAAW,GAAG,YAAY;AAEjC,eAAejB,MAAM","ignoreList":[]}
1
+ {"version":3,"names":["forwardRef","Text","TouchableOpacity","Styles","jsx","_jsx","Button","props","ref","variant","title","size","onPress","undefined","style","disabled","textStyle","rest","textVariant","_base","_disabled","children","_text","displayName"],"sourceRoot":"../../../../src","sources":["components/Button/Button.tsx"],"mappings":";;AAAA,SAASA,UAAU,QAAQ,OAAO;AAClC,SAASC,IAAI,EAAEC,gBAAgB,QAAQ,cAAc;AACrD,OAAOC,MAAM,MAAM,YAAS;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAQ7B;AACA;AACA;AACA;AACA,OAAO,MAAMC,MAAM,gBAAGN,UAAU,CAA6B,CAACO,KAAK,EAAEC,GAAG,KAAK;EAC3E,MAAM;IACJC,OAAO,GAAG,SAAS;IACnBC,KAAK;IACLC,IAAI,GAAG,QAAQ;IACfC,OAAO,GAAGA,CAAA,KAAMC,SAAS;IACzBC,KAAK;IACLC,QAAQ,GAAG,KAAK;IAChBC,SAAS;IACT,GAAGC;EACL,CAAC,GAAGV,KAAK;;EAET;AACF;AACA;EACE,MAAMW,WAAW,GAAI,OAAO,GAAGT,OAAmC;EAElE,oBACEJ,IAAA,CAACH,gBAAgB;IACfM,GAAG,EAAEA,GAAI;IACTI,OAAO,EAAEA,OAAQ;IACjBG,QAAQ,EAAEA,QAAS;IACnBD,KAAK,EAAE,CACLX,MAAM,CAACgB,KAAK,EACZhB,MAAM,CAACQ,IAAI,CAAe,EAC1BR,MAAM,CAACM,OAAO,CAAkB,EAChCM,QAAQ,IAAIZ,MAAM,CAACiB,SAAS,EAC5BN,KAAK,CACL;IAAA,GACEG,IAAI;IAAAI,QAAA,eAERhB,IAAA,CAACJ,IAAI;MAACa,KAAK,EAAE,CAACX,MAAM,CAACmB,KAAK,EAAEnB,MAAM,CAACe,WAAW,CAAC,EAAEF,SAAS,CAAE;MAAAK,QAAA,EACzDX;IAAK,CACF;EAAC,CACS,CAAC;AAEvB,CAAC,CAAC;AAEFJ,MAAM,CAACiB,WAAW,GAAG,YAAY;AAEjC,eAAejB,MAAM","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["forwardRef","Button","jsx","_jsx","DangerButton","props","ref","variant","displayName"],"sourceRoot":"../../../../src","sources":["components/Button/DangerButton.tsx"],"mappings":";;AAAA,SAASA,UAAU,QAAQ,OAAO;AAClC,SAASC,MAAM,QAA4B,aAAU;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAGtD;AACA;AACA;AACA;AACA,OAAO,MAAMC,YAAY,gBAAGJ,UAAU,CACpC,CAACK,KAAK,EAAEC,GAAG,KAAK;EACd,oBAAOH,IAAA,CAACF,MAAM;IAACK,GAAG,EAAEA,GAAI;IAACC,OAAO,EAAC,QAAQ;IAAA,GAAKF;EAAK,CAAG,CAAC;AACzD,CACF,CAAC;AAEDD,YAAY,CAACI,WAAW,GAAG,cAAc;AAEzC,eAAeJ,YAAY","ignoreList":[]}
1
+ {"version":3,"names":["forwardRef","Button","jsx","_jsx","DangerButton","props","ref","variant","displayName"],"sourceRoot":"../../../../src","sources":["components/Button/DangerButton.tsx"],"mappings":";;AAAA,SAASA,UAAU,QAAQ,OAAO;AAClC,SAASC,MAAM,QAAQ,aAAU;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAGlC;AACA;AACA;AACA;AACA,OAAO,MAAMC,YAAY,gBAAGJ,UAAU,CACpC,CAACK,KAAK,EAAEC,GAAG,KAAK;EACd,oBAAOH,IAAA,CAACF,MAAM;IAACK,GAAG,EAAEA,GAAI;IAACC,OAAO,EAAC,QAAQ;IAAA,GAAKF;EAAK,CAAG,CAAC;AACzD,CACF,CAAC;AAEDD,YAAY,CAACI,WAAW,GAAG,cAAc;AAEzC,eAAeJ,YAAY","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["forwardRef","Button","jsx","_jsx","GhostButton","props","ref","variant","displayName"],"sourceRoot":"../../../../src","sources":["components/Button/GhostButton.tsx"],"mappings":";;AAAA,SAASA,UAAU,QAAQ,OAAO;AAClC,SAASC,MAAM,QAA4B,aAAU;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAGtD,OAAO,MAAMC,WAAW,gBAAGJ,UAAU,CACnC,CAACK,KAAK,EAAEC,GAAG,KAAK;EACd,oBAAOH,IAAA,CAACF,MAAM;IAACK,GAAG,EAAEA,GAAI;IAACC,OAAO,EAAC,OAAO;IAAA,GAAKF;EAAK,CAAG,CAAC;AACxD,CACF,CAAC;AAEDD,WAAW,CAACI,WAAW,GAAG,aAAa;AAEvC,eAAeJ,WAAW","ignoreList":[]}
1
+ {"version":3,"names":["forwardRef","Button","jsx","_jsx","GhostButton","props","ref","variant","displayName"],"sourceRoot":"../../../../src","sources":["components/Button/GhostButton.tsx"],"mappings":";;AAAA,SAASA,UAAU,QAAQ,OAAO;AAClC,SAASC,MAAM,QAAQ,aAAU;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAGlC,OAAO,MAAMC,WAAW,gBAAGJ,UAAU,CACnC,CAACK,KAAK,EAAEC,GAAG,KAAK;EACd,oBAAOH,IAAA,CAACF,MAAM;IAACK,GAAG,EAAEA,GAAI;IAACC,OAAO,EAAC,OAAO;IAAA,GAAKF;EAAK,CAAG,CAAC;AACxD,CACF,CAAC;AAEDD,WAAW,CAACI,WAAW,GAAG,aAAa;AAEvC,eAAeJ,WAAW","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["forwardRef","Button","jsx","_jsx","PrimaryButton","props","ref","variant","displayName"],"sourceRoot":"../../../../src","sources":["components/Button/PrimaryButton.tsx"],"mappings":";;AAAA,SAASA,UAAU,QAAQ,OAAO;AAClC,SAASC,MAAM,QAA4B,aAAU;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAGtD;AACA;AACA;AACA,OAAO,MAAMC,aAAa,gBAAGJ,UAAU,CACrC,CAACK,KAAK,EAAEC,GAAG,KAAK;EACd,oBAAOH,IAAA,CAACF,MAAM;IAACK,GAAG,EAAEA,GAAI;IAACC,OAAO,EAAC,SAAS;IAAA,GAAKF;EAAK,CAAG,CAAC;AAC1D,CACF,CAAC;AAEDD,aAAa,CAACI,WAAW,GAAG,eAAe;AAE3C,eAAeJ,aAAa","ignoreList":[]}
1
+ {"version":3,"names":["forwardRef","Button","jsx","_jsx","PrimaryButton","props","ref","variant","displayName"],"sourceRoot":"../../../../src","sources":["components/Button/PrimaryButton.tsx"],"mappings":";;AAAA,SAASA,UAAU,QAAQ,OAAO;AAClC,SAASC,MAAM,QAAQ,aAAU;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAGlC;AACA;AACA;AACA,OAAO,MAAMC,aAAa,gBAAGJ,UAAU,CACrC,CAACK,KAAK,EAAEC,GAAG,KAAK;EACd,oBAAOH,IAAA,CAACF,MAAM;IAACK,GAAG,EAAEA,GAAI;IAACC,OAAO,EAAC,SAAS;IAAA,GAAKF;EAAK,CAAG,CAAC;AAC1D,CACF,CAAC;AAEDD,aAAa,CAACI,WAAW,GAAG,eAAe;AAE3C,eAAeJ,aAAa","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["forwardRef","Button","jsx","_jsx","SecondaryButton","props","ref","variant","displayName"],"sourceRoot":"../../../../src","sources":["components/Button/SecondaryButton.tsx"],"mappings":";;AAAA,SAASA,UAAU,QAAQ,OAAO;AAClC,SAASC,MAAM,QAA4B,aAAU;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAGtD;AACA;AACA;AACA,OAAO,MAAMC,eAAe,gBAAGJ,UAAU,CACvC,CAACK,KAAK,EAAEC,GAAG,KAAK;EACd,oBAAOH,IAAA,CAACF,MAAM;IAACK,GAAG,EAAEA,GAAI;IAACC,OAAO,EAAC,WAAW;IAAA,GAAKF;EAAK,CAAG,CAAC;AAC5D,CACF,CAAC;AAEDD,eAAe,CAACI,WAAW,GAAG,iBAAiB;AAE/C,eAAeJ,eAAe","ignoreList":[]}
1
+ {"version":3,"names":["forwardRef","Button","jsx","_jsx","SecondaryButton","props","ref","variant","displayName"],"sourceRoot":"../../../../src","sources":["components/Button/SecondaryButton.tsx"],"mappings":";;AAAA,SAASA,UAAU,QAAQ,OAAO;AAClC,SAASC,MAAM,QAAQ,aAAU;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAGlC;AACA;AACA;AACA,OAAO,MAAMC,eAAe,gBAAGJ,UAAU,CACvC,CAACK,KAAK,EAAEC,GAAG,KAAK;EACd,oBAAOH,IAAA,CAACF,MAAM;IAACK,GAAG,EAAEA,GAAI;IAACC,OAAO,EAAC,WAAW;IAAA,GAAKF;EAAK,CAAG,CAAC;AAC5D,CACF,CAAC;AAEDD,eAAe,CAACI,WAAW,GAAG,iBAAiB;AAE/C,eAAeJ,eAAe","ignoreList":[]}
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+
3
+ import { forwardRef } from 'react';
4
+ import { View } from 'react-native';
5
+ import { jsx as _jsx } from "react/jsx-runtime";
6
+ export const Divider = /*#__PURE__*/forwardRef((props, ref) => {
7
+ const {
8
+ thickness = 1,
9
+ color = '#c4c4c4',
10
+ orientation = 'horizontal',
11
+ length = '100%',
12
+ style,
13
+ ...rest
14
+ } = props;
15
+ const dividerStyle = {
16
+ backgroundColor: color,
17
+ ...(orientation === 'vertical' ? {
18
+ width: thickness,
19
+ height: length
20
+ } : {
21
+ height: thickness,
22
+ width: length
23
+ })
24
+ };
25
+ return /*#__PURE__*/_jsx(View, {
26
+ ref: ref,
27
+ style: [dividerStyle, style],
28
+ ...rest
29
+ });
30
+ });
31
+ Divider.displayName = 'Divider';
32
+ export default Divider;
33
+ //# sourceMappingURL=Divider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["forwardRef","View","jsx","_jsx","Divider","props","ref","thickness","color","orientation","length","style","rest","dividerStyle","backgroundColor","width","height","displayName"],"sourceRoot":"../../../../src","sources":["components/Divider/Divider.tsx"],"mappings":";;AAAA,SAASA,UAAU,QAAQ,OAAO;AAClC,SAASC,IAAI,QAAwB,cAAc;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAIpD,OAAO,MAAMC,OAAO,gBAAGJ,UAAU,CAAwB,CAACK,KAAK,EAAEC,GAAG,KAAK;EACvE,MAAM;IACJC,SAAS,GAAG,CAAC;IACbC,KAAK,GAAG,SAAS;IACjBC,WAAW,GAAG,YAAY;IAC1BC,MAAM,GAAG,MAAM;IACfC,KAAK;IACL,GAAGC;EACL,CAAC,GAAGP,KAAK;EAET,MAAMQ,YAAY,GAAG;IACnBC,eAAe,EAAEN,KAAK;IACtB,IAAIC,WAAW,KAAK,UAAU,GAC1B;MAAEM,KAAK,EAAER,SAAS;MAAES,MAAM,EAAEN;IAAO,CAAC,GACpC;MAAEM,MAAM,EAAET,SAAS;MAAEQ,KAAK,EAAEL;IAAO,CAAC;EAC1C,CAAc;EAEd,oBAAOP,IAAA,CAACF,IAAI;IAACK,GAAG,EAAEA,GAAI;IAACK,KAAK,EAAE,CAACE,YAAY,EAAEF,KAAK,CAAE;IAAA,GAAKC;EAAI,CAAG,CAAC;AACnE,CAAC,CAAC;AAEFR,OAAO,CAACa,WAAW,GAAG,SAAS;AAE/B,eAAeb,OAAO","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ //# sourceMappingURL=styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../../../src","sources":["components/Divider/styles.ts"],"mappings":"","ignoreList":[]}
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+
3
+ export {};
4
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../../../src","sources":["components/Divider/types.ts"],"mappings":"","ignoreList":[]}
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+
3
+ import { forwardRef } from 'react';
4
+ import { View } from 'react-native';
5
+ import Style from "../../utils/Style.js";
6
+ import { jsx as _jsx } from "react/jsx-runtime";
7
+ export const HStack = /*#__PURE__*/forwardRef((props, ref) => {
8
+ const {
9
+ style,
10
+ ...rest
11
+ } = props;
12
+ return /*#__PURE__*/_jsx(View, {
13
+ ref: ref,
14
+ style: [elementStyle.base, style],
15
+ ...rest
16
+ });
17
+ });
18
+ HStack.displayName = 'HStack';
19
+ const elementStyle = Style.create({
20
+ base: {
21
+ flexDirection: 'row'
22
+ }
23
+ });
24
+ //# sourceMappingURL=HStack.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["forwardRef","View","Style","jsx","_jsx","HStack","props","ref","style","rest","elementStyle","base","displayName","create","flexDirection"],"sourceRoot":"../../../../src","sources":["components/Layout/HStack.tsx"],"mappings":";;AAAA,SAASA,UAAU,QAAQ,OAAO;AAClC,SAASC,IAAI,QAAQ,cAAc;AAEnC,OAAOC,KAAK,MAAM,sBAAmB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAGtC,OAAO,MAAMC,MAAM,gBAAGL,UAAU,CAAuB,CAACM,KAAK,EAAEC,GAAG,KAAK;EACrE,MAAM;IAAEC,KAAK;IAAE,GAAGC;EAAK,CAAC,GAAGH,KAAK;EAEhC,oBAAOF,IAAA,CAACH,IAAI;IAACM,GAAG,EAAEA,GAAI;IAACC,KAAK,EAAE,CAACE,YAAY,CAACC,IAAI,EAAEH,KAAK,CAAE;IAAA,GAAKC;EAAI,CAAG,CAAC;AACxE,CAAC,CAAC;AAEFJ,MAAM,CAACO,WAAW,GAAG,QAAQ;AAE7B,MAAMF,YAAY,GAAGR,KAAK,CAACW,MAAM,CAAC;EAChCF,IAAI,EAAE;IACJG,aAAa,EAAE;EACjB;AACF,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+
3
+ import { forwardRef } from 'react';
4
+ import { View } from 'react-native';
5
+ import Style from "../../utils/Style.js";
6
+ import { jsx as _jsx } from "react/jsx-runtime";
7
+ export const VStack = /*#__PURE__*/forwardRef((props, ref) => {
8
+ const {
9
+ style,
10
+ ...rest
11
+ } = props;
12
+ return /*#__PURE__*/_jsx(View, {
13
+ ref: ref,
14
+ style: [elementStyle.base, style],
15
+ ...rest
16
+ });
17
+ });
18
+ VStack.displayName = 'VStack';
19
+ const elementStyle = Style.create({
20
+ base: {
21
+ flexDirection: 'column'
22
+ }
23
+ });
24
+ //# sourceMappingURL=VStack.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["forwardRef","View","Style","jsx","_jsx","VStack","props","ref","style","rest","elementStyle","base","displayName","create","flexDirection"],"sourceRoot":"../../../../src","sources":["components/Layout/VStack.tsx"],"mappings":";;AAAA,SAASA,UAAU,QAAQ,OAAO;AAClC,SAASC,IAAI,QAAQ,cAAc;AAEnC,OAAOC,KAAK,MAAM,sBAAmB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAGtC,OAAO,MAAMC,MAAM,gBAAGL,UAAU,CAAuB,CAACM,KAAK,EAAEC,GAAG,KAAK;EACrE,MAAM;IAAEC,KAAK;IAAE,GAAGC;EAAK,CAAC,GAAGH,KAAK;EAEhC,oBAAOF,IAAA,CAACH,IAAI;IAACM,GAAG,EAAEA,GAAI;IAACC,KAAK,EAAE,CAACE,YAAY,CAACC,IAAI,EAAEH,KAAK,CAAE;IAAA,GAAKC;EAAI,CAAG,CAAC;AACxE,CAAC,CAAC;AAEFJ,MAAM,CAACO,WAAW,GAAG,QAAQ;AAE7B,MAAMF,YAAY,GAAGR,KAAK,CAACW,MAAM,CAAC;EAChCF,IAAI,EAAE;IACJG,aAAa,EAAE;EACjB;AACF,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+
3
+ export {};
4
+ //# sourceMappingURL=layout.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../../../src","sources":["components/Layout/layout.types.ts"],"mappings":"","ignoreList":[]}
@@ -1,7 +1,24 @@
1
1
  "use strict";
2
2
 
3
3
  // Export Components
4
+ export * from "./components/Button/Button.js";
5
+ export * from "./components/Button/DangerButton.js";
6
+ export * from "./components/Button/GhostButton.js";
7
+ export * from "./components/Button/PrimaryButton.js";
8
+ export * from "./components/Button/SecondaryButton.js";
4
9
  export * from "./components/Card/Card.js";
10
+ export * from "./components/Divider/Divider.js";
11
+ export * from "./components/Layout/HStack.js";
12
+ export * from "./components/Layout/VStack.js";
13
+ export * from "./components/Surface/Surface.js";
14
+
15
+ // types
16
+ export * from "./components/Button/types.js";
17
+ export * from "./components/Card/types.js";
18
+ export * from "./components/Divider/types.js";
19
+ export * from "./components/Layout/layout.types.js";
20
+ export * from "./components/Surface/types.js";
21
+ export * from "./types/general.types.js";
5
22
 
6
23
  // Provider
7
24
  export * from "./providers/ThemeProvider.js";
@@ -1 +1 @@
1
- {"version":3,"names":[],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;AAAA;AACA,cAAc,2BAAwB;;AAEtC;AACA,cAAc,8BAA2B","ignoreList":[]}
1
+ {"version":3,"names":[],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;AAAA;AACA,cAAc,+BAA4B;AAC1C,cAAc,qCAAkC;AAChD,cAAc,oCAAiC;AAC/C,cAAc,sCAAmC;AACjD,cAAc,wCAAqC;AACnD,cAAc,2BAAwB;AACtC,cAAc,iCAA8B;AAC5C,cAAc,+BAA4B;AAC1C,cAAc,+BAA4B;AAC1C,cAAc,iCAA8B;;AAE5C;AACA,cAAc,8BAA2B;AACzC,cAAc,4BAAyB;AACvC,cAAc,+BAA4B;AAC1C,cAAc,qCAAkC;AAChD,cAAc,+BAA4B;AAC1C,cAAc,0BAAuB;;AAErC;AACA,cAAc,8BAA2B","ignoreList":[]}
@@ -1,6 +1,4 @@
1
- import { type ComponentRef } from 'react';
2
1
  import type { ButtonBaseProps } from './types';
3
- export type ButtonBaseRef = ComponentRef<typeof Button>;
4
2
  /**
5
3
  * A customizable button component that supports different variants and sizes.
6
4
  * @return A TouchableOpacity button with text.
@@ -1 +1 @@
1
- {"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../../../src/components/Button/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,YAAY,EAAE,MAAM,OAAO,CAAC;AAGtD,OAAO,KAAK,EACV,eAAe,EAIhB,MAAM,SAAS,CAAC;AAEjB,MAAM,MAAM,aAAa,GAAG,YAAY,CAAC,OAAO,MAAM,CAAC,CAAC;AAExD;;;GAGG;AACH,eAAO,MAAM,MAAM,yHAoCjB,CAAC;AAIH,eAAe,MAAM,CAAC"}
1
+ {"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../../../src/components/Button/Button.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,eAAe,EAIhB,MAAM,SAAS,CAAC;AAEjB;;;GAGG;AACH,eAAO,MAAM,MAAM,yHAoCjB,CAAC;AAIH,eAAe,MAAM,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"DangerButton.d.ts","sourceRoot":"","sources":["../../../../../src/components/Button/DangerButton.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE/C;;;GAGG;AACH,eAAO,MAAM,YAAY,yHAIxB,CAAC;AAIF,eAAe,YAAY,CAAC"}
1
+ {"version":3,"file":"DangerButton.d.ts","sourceRoot":"","sources":["../../../../../src/components/Button/DangerButton.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAiB,MAAM,SAAS,CAAC;AAE9D;;;GAGG;AACH,eAAO,MAAM,YAAY,yHAIxB,CAAC;AAIF,eAAe,YAAY,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"GhostButton.d.ts","sourceRoot":"","sources":["../../../../../src/components/Button/GhostButton.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE/C,eAAO,MAAM,WAAW,yHAIvB,CAAC;AAIF,eAAe,WAAW,CAAC"}
1
+ {"version":3,"file":"GhostButton.d.ts","sourceRoot":"","sources":["../../../../../src/components/Button/GhostButton.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAiB,MAAM,SAAS,CAAC;AAE9D,eAAO,MAAM,WAAW,yHAIvB,CAAC;AAIF,eAAe,WAAW,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"PrimaryButton.d.ts","sourceRoot":"","sources":["../../../../../src/components/Button/PrimaryButton.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE/C;;GAEG;AACH,eAAO,MAAM,aAAa,yHAIzB,CAAC;AAIF,eAAe,aAAa,CAAC"}
1
+ {"version":3,"file":"PrimaryButton.d.ts","sourceRoot":"","sources":["../../../../../src/components/Button/PrimaryButton.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAiB,MAAM,SAAS,CAAC;AAE9D;;GAEG;AACH,eAAO,MAAM,aAAa,yHAIzB,CAAC;AAIF,eAAe,aAAa,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"SecondaryButton.d.ts","sourceRoot":"","sources":["../../../../../src/components/Button/SecondaryButton.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE/C;;GAEG;AACH,eAAO,MAAM,eAAe,yHAI3B,CAAC;AAIF,eAAe,eAAe,CAAC"}
1
+ {"version":3,"file":"SecondaryButton.d.ts","sourceRoot":"","sources":["../../../../../src/components/Button/SecondaryButton.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAiB,MAAM,SAAS,CAAC;AAE9D;;GAEG;AACH,eAAO,MAAM,eAAe,yHAI3B,CAAC;AAIF,eAAe,eAAe,CAAC"}
@@ -1,10 +1,21 @@
1
1
  import type { ComponentRef } from 'react';
2
2
  import type { StyleProp, TextStyle, TouchableOpacity, TouchableOpacityProps, ViewStyle } from 'react-native';
3
+ import type Button from './Button';
3
4
  /**
4
5
  * Ref type for the Button component
5
6
  */
6
7
  export type ButtonRef = ComponentRef<typeof TouchableOpacity>;
8
+ /**
9
+ * The root ref type for the Button component
10
+ */
11
+ export type ButtonBaseRef = ComponentRef<typeof Button>;
12
+ /**
13
+ * The variant types for the Button component
14
+ */
7
15
  export type ButtonVariant = 'primary' | 'secondary' | 'danger' | 'ghost';
16
+ /**
17
+ * Button size types
18
+ */
8
19
  export type ButtonSize = 'small' | 'medium' | 'large';
9
20
  export interface ButtonBaseProps extends Omit<TouchableOpacityProps, 'style'> {
10
21
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/components/Button/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,KAAK,EACV,SAAS,EACT,SAAS,EACT,gBAAgB,EAChB,qBAAqB,EACrB,SAAS,EACV,MAAM,cAAc,CAAC;AAEtB;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,YAAY,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE9D,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,WAAW,GAAG,QAAQ,GAAG,OAAO,CAAC;AAEzE,MAAM,MAAM,UAAU,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;AAEtD,MAAM,WAAW,eAAgB,SAAQ,IAAI,CAAC,qBAAqB,EAAE,OAAO,CAAC;IAC3E;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B;;;OAGG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACjC;;;OAGG;IACH,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB;;;OAGG;IACH,OAAO,CAAC,EAAE,aAAa,CAAC;IAExB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/components/Button/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,KAAK,EACV,SAAS,EACT,SAAS,EACT,gBAAgB,EAChB,qBAAqB,EACrB,SAAS,EACV,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AAEnC;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,YAAY,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE9D;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,YAAY,CAAC,OAAO,MAAM,CAAC,CAAC;AAExD;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,WAAW,GAAG,QAAQ,GAAG,OAAO,CAAC;AAEzE;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;AAEtD,MAAM,WAAW,eAAgB,SAAQ,IAAI,CAAC,qBAAqB,EAAE,OAAO,CAAC;IAC3E;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B;;;OAGG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACjC;;;OAGG;IACH,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB;;;OAGG;IACH,OAAO,CAAC,EAAE,aAAa,CAAC;IAExB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB"}
@@ -0,0 +1,5 @@
1
+ import { View } from 'react-native';
2
+ import type { DividerProps } from './types';
3
+ export declare const Divider: import("react").ForwardRefExoticComponent<DividerProps & import("react").RefAttributes<View>>;
4
+ export default Divider;
5
+ //# sourceMappingURL=Divider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Divider.d.ts","sourceRoot":"","sources":["../../../../../src/components/Divider/Divider.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAkB,MAAM,cAAc,CAAC;AAEpD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE5C,eAAO,MAAM,OAAO,+FAkBlB,CAAC;AAIH,eAAe,OAAO,CAAC"}
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../../src/components/Divider/styles.ts"],"names":[],"mappings":""}
@@ -0,0 +1,31 @@
1
+ import type { StyleProp, ViewProps, ViewStyle } from 'react-native';
2
+ export type DividerThickness = 1 | 5 | 10;
3
+ export type DividerOrientation = 'horizontal' | 'vertical';
4
+ export interface DividerProps extends ViewProps {
5
+ /**
6
+ * Style for the divider component.
7
+ * Optional.
8
+ */
9
+ style?: StyleProp<ViewStyle>;
10
+ /**
11
+ * The thickness of the divider.
12
+ * @default 1
13
+ */
14
+ thickness?: DividerThickness;
15
+ /**
16
+ * The color of the divider.
17
+ * @default '#000'
18
+ */
19
+ color?: string;
20
+ /**
21
+ * The orientation of the divider.
22
+ * @default 'horizontal'
23
+ */
24
+ orientation?: DividerOrientation;
25
+ /**
26
+ * The length of the divider.
27
+ * @default '100%'
28
+ */
29
+ length?: number | string;
30
+ }
31
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/components/Divider/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEpE,MAAM,MAAM,gBAAgB,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC;AAE1C,MAAM,MAAM,kBAAkB,GAAG,YAAY,GAAG,UAAU,CAAC;AAE3D,MAAM,WAAW,YAAa,SAAQ,SAAS;IAC7C;;;OAGG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B;;;OAGG;IACH,SAAS,CAAC,EAAE,gBAAgB,CAAC;IAE7B;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;;OAGG;IACH,WAAW,CAAC,EAAE,kBAAkB,CAAC;IAEjC;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CAC1B"}
@@ -0,0 +1,4 @@
1
+ import { View } from 'react-native';
2
+ import type { HStackProps } from './layout.types';
3
+ export declare const HStack: import("react").ForwardRefExoticComponent<HStackProps & import("react").RefAttributes<View>>;
4
+ //# sourceMappingURL=HStack.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HStack.d.ts","sourceRoot":"","sources":["../../../../../src/components/Layout/HStack.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAGpC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,eAAO,MAAM,MAAM,8FAIjB,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { View } from 'react-native';
2
+ import type { VStackProps } from './layout.types';
3
+ export declare const VStack: import("react").ForwardRefExoticComponent<VStackProps & import("react").RefAttributes<View>>;
4
+ //# sourceMappingURL=VStack.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VStack.d.ts","sourceRoot":"","sources":["../../../../../src/components/Layout/VStack.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAGpC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,eAAO,MAAM,MAAM,8FAIjB,CAAC"}
@@ -0,0 +1,8 @@
1
+ import type { StyleProp, ViewStyle } from 'react-native';
2
+ export type VStackProps = {
3
+ style?: StyleProp<ViewStyle>;
4
+ };
5
+ export type HStackProps = {
6
+ style?: StyleProp<ViewStyle>;
7
+ };
8
+ //# sourceMappingURL=layout.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"layout.types.d.ts","sourceRoot":"","sources":["../../../../../src/components/Layout/layout.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzD,MAAM,MAAM,WAAW,GAAG;IACxB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B,CAAC"}
@@ -1,3 +1,18 @@
1
+ export * from './components/Button/Button';
2
+ export * from './components/Button/DangerButton';
3
+ export * from './components/Button/GhostButton';
4
+ export * from './components/Button/PrimaryButton';
5
+ export * from './components/Button/SecondaryButton';
1
6
  export * from './components/Card/Card';
7
+ export * from './components/Divider/Divider';
8
+ export * from './components/Layout/HStack';
9
+ export * from './components/Layout/VStack';
10
+ export * from './components/Surface/Surface';
11
+ export * from './components/Button/types';
12
+ export * from './components/Card/types';
13
+ export * from './components/Divider/types';
14
+ export * from './components/Layout/layout.types';
15
+ export * from './components/Surface/types';
16
+ export * from './types/general.types';
2
17
  export * from './providers/ThemeProvider';
3
18
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AACA,cAAc,wBAAwB,CAAC;AAGvC,cAAc,2BAA2B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AACA,cAAc,4BAA4B,CAAC;AAC3C,cAAc,kCAAkC,CAAC;AACjD,cAAc,iCAAiC,CAAC;AAChD,cAAc,mCAAmC,CAAC;AAClD,cAAc,qCAAqC,CAAC;AACpD,cAAc,wBAAwB,CAAC;AACvC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,8BAA8B,CAAC;AAG7C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,yBAAyB,CAAC;AACxC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,kCAAkC,CAAC;AACjD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,uBAAuB,CAAC;AAGtC,cAAc,2BAA2B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dryanovski/react-native-components",
3
- "version": "1.0.7",
3
+ "version": "1.0.8",
4
4
  "description": "Collection of reusable React Native components for building mobile applications.",
5
5
  "main": "./lib/module/index.js",
6
6
  "types": "./lib/typescript/src/index.d.ts",
@@ -1,4 +1,4 @@
1
- import { forwardRef, type ComponentRef } from 'react';
1
+ import { forwardRef } from 'react';
2
2
  import { Text, TouchableOpacity } from 'react-native';
3
3
  import Styles from './style';
4
4
  import type {
@@ -8,8 +8,6 @@ import type {
8
8
  ButtonVariant,
9
9
  } from './types';
10
10
 
11
- export type ButtonBaseRef = ComponentRef<typeof Button>;
12
-
13
11
  /**
14
12
  * A customizable button component that supports different variants and sizes.
15
13
  * @return A TouchableOpacity button with text.
@@ -1,6 +1,6 @@
1
1
  import { forwardRef } from 'react';
2
- import { Button, type ButtonBaseRef } from './Button';
3
- import type { ButtonBaseProps } from './types';
2
+ import { Button } from './Button';
3
+ import type { ButtonBaseProps, ButtonBaseRef } from './types';
4
4
 
5
5
  /**
6
6
  * A button component styled for dangerous actions, such as deletions.
@@ -1,6 +1,6 @@
1
1
  import { forwardRef } from 'react';
2
- import { Button, type ButtonBaseRef } from './Button';
3
- import type { ButtonBaseProps } from './types';
2
+ import { Button } from './Button';
3
+ import type { ButtonBaseProps, ButtonBaseRef } from './types';
4
4
 
5
5
  export const GhostButton = forwardRef<ButtonBaseRef, ButtonBaseProps>(
6
6
  (props, ref) => {
@@ -1,6 +1,6 @@
1
1
  import { forwardRef } from 'react';
2
- import { Button, type ButtonBaseRef } from './Button';
3
- import type { ButtonBaseProps } from './types';
2
+ import { Button } from './Button';
3
+ import type { ButtonBaseProps, ButtonBaseRef } from './types';
4
4
 
5
5
  /**
6
6
  * A button component styled for primary actions.
@@ -1,6 +1,6 @@
1
1
  import { forwardRef } from 'react';
2
- import { Button, type ButtonBaseRef } from './Button';
3
- import type { ButtonBaseProps } from './types';
2
+ import { Button } from './Button';
3
+ import type { ButtonBaseProps, ButtonBaseRef } from './types';
4
4
 
5
5
  /**
6
6
  * A button component styled for secondary actions.
@@ -6,14 +6,26 @@ import type {
6
6
  TouchableOpacityProps,
7
7
  ViewStyle,
8
8
  } from 'react-native';
9
+ import type Button from './Button';
9
10
 
10
11
  /**
11
12
  * Ref type for the Button component
12
13
  */
13
14
  export type ButtonRef = ComponentRef<typeof TouchableOpacity>;
14
15
 
16
+ /**
17
+ * The root ref type for the Button component
18
+ */
19
+ export type ButtonBaseRef = ComponentRef<typeof Button>;
20
+
21
+ /**
22
+ * The variant types for the Button component
23
+ */
15
24
  export type ButtonVariant = 'primary' | 'secondary' | 'danger' | 'ghost';
16
25
 
26
+ /**
27
+ * Button size types
28
+ */
17
29
  export type ButtonSize = 'small' | 'medium' | 'large';
18
30
 
19
31
  export interface ButtonBaseProps extends Omit<TouchableOpacityProps, 'style'> {
@@ -0,0 +1,28 @@
1
+ import { forwardRef } from 'react';
2
+ import { View, type ViewStyle } from 'react-native';
3
+ import type { ViewRef } from '../../types/general.types';
4
+ import type { DividerProps } from './types';
5
+
6
+ export const Divider = forwardRef<ViewRef, DividerProps>((props, ref) => {
7
+ const {
8
+ thickness = 1,
9
+ color = '#c4c4c4',
10
+ orientation = 'horizontal',
11
+ length = '100%',
12
+ style,
13
+ ...rest
14
+ } = props;
15
+
16
+ const dividerStyle = {
17
+ backgroundColor: color,
18
+ ...(orientation === 'vertical'
19
+ ? { width: thickness, height: length }
20
+ : { height: thickness, width: length }),
21
+ } as ViewStyle;
22
+
23
+ return <View ref={ref} style={[dividerStyle, style]} {...rest} />;
24
+ });
25
+
26
+ Divider.displayName = 'Divider';
27
+
28
+ export default Divider;
File without changes
@@ -0,0 +1,36 @@
1
+ import type { StyleProp, ViewProps, ViewStyle } from 'react-native';
2
+
3
+ export type DividerThickness = 1 | 5 | 10;
4
+
5
+ export type DividerOrientation = 'horizontal' | 'vertical';
6
+
7
+ export interface DividerProps extends ViewProps {
8
+ /**
9
+ * Style for the divider component.
10
+ * Optional.
11
+ */
12
+ style?: StyleProp<ViewStyle>;
13
+ /**
14
+ * The thickness of the divider.
15
+ * @default 1
16
+ */
17
+ thickness?: DividerThickness;
18
+
19
+ /**
20
+ * The color of the divider.
21
+ * @default '#000'
22
+ */
23
+ color?: string;
24
+
25
+ /**
26
+ * The orientation of the divider.
27
+ * @default 'horizontal'
28
+ */
29
+ orientation?: DividerOrientation;
30
+
31
+ /**
32
+ * The length of the divider.
33
+ * @default '100%'
34
+ */
35
+ length?: number | string;
36
+ }
@@ -0,0 +1,19 @@
1
+ import { forwardRef } from 'react';
2
+ import { View } from 'react-native';
3
+ import type { ViewRef } from '../../types/general.types';
4
+ import Style from '../../utils/Style';
5
+ import type { HStackProps } from './layout.types';
6
+
7
+ export const HStack = forwardRef<ViewRef, HStackProps>((props, ref) => {
8
+ const { style, ...rest } = props;
9
+
10
+ return <View ref={ref} style={[elementStyle.base, style]} {...rest} />;
11
+ });
12
+
13
+ HStack.displayName = 'HStack';
14
+
15
+ const elementStyle = Style.create({
16
+ base: {
17
+ flexDirection: 'row',
18
+ },
19
+ });
@@ -0,0 +1,19 @@
1
+ import { forwardRef } from 'react';
2
+ import { View } from 'react-native';
3
+ import type { ViewRef } from '../../types/general.types';
4
+ import Style from '../../utils/Style';
5
+ import type { VStackProps } from './layout.types';
6
+
7
+ export const VStack = forwardRef<ViewRef, VStackProps>((props, ref) => {
8
+ const { style, ...rest } = props;
9
+
10
+ return <View ref={ref} style={[elementStyle.base, style]} {...rest} />;
11
+ });
12
+
13
+ VStack.displayName = 'VStack';
14
+
15
+ const elementStyle = Style.create({
16
+ base: {
17
+ flexDirection: 'column',
18
+ },
19
+ });
@@ -0,0 +1,9 @@
1
+ import type { StyleProp, ViewStyle } from 'react-native';
2
+
3
+ export type VStackProps = {
4
+ style?: StyleProp<ViewStyle>;
5
+ };
6
+
7
+ export type HStackProps = {
8
+ style?: StyleProp<ViewStyle>;
9
+ };
package/src/index.tsx CHANGED
@@ -1,5 +1,22 @@
1
1
  // Export Components
2
+ export * from './components/Button/Button';
3
+ export * from './components/Button/DangerButton';
4
+ export * from './components/Button/GhostButton';
5
+ export * from './components/Button/PrimaryButton';
6
+ export * from './components/Button/SecondaryButton';
2
7
  export * from './components/Card/Card';
8
+ export * from './components/Divider/Divider';
9
+ export * from './components/Layout/HStack';
10
+ export * from './components/Layout/VStack';
11
+ export * from './components/Surface/Surface';
12
+
13
+ // types
14
+ export * from './components/Button/types';
15
+ export * from './components/Card/types';
16
+ export * from './components/Divider/types';
17
+ export * from './components/Layout/layout.types';
18
+ export * from './components/Surface/types';
19
+ export * from './types/general.types';
3
20
 
4
21
  // Provider
5
22
  export * from './providers/ThemeProvider';