@dryanovski/react-native-components 1.0.2 → 1.0.5
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/lib/module/components/Card/Card.js +14 -9
- package/lib/module/components/Card/Card.js.map +1 -1
- package/lib/module/components/Card/styles.js +15 -17
- package/lib/module/components/Card/styles.js.map +1 -1
- package/lib/module/components/Surface/Surface.js +34 -0
- package/lib/module/components/Surface/Surface.js.map +1 -0
- package/lib/module/components/Surface/styles.js +25 -0
- package/lib/module/components/Surface/styles.js.map +1 -0
- package/lib/module/components/Surface/types.js +4 -0
- package/lib/module/components/Surface/types.js.map +1 -0
- package/lib/module/themes/colors.js +122 -0
- package/lib/module/themes/colors.js.map +1 -0
- package/lib/module/themes/light.js +34 -0
- package/lib/module/themes/light.js.map +1 -0
- package/lib/module/themes/radius.js +11 -0
- package/lib/module/themes/radius.js.map +1 -0
- package/lib/module/themes/size.js +11 -0
- package/lib/module/themes/size.js.map +1 -0
- package/lib/module/themes/spacing.js +13 -0
- package/lib/module/themes/spacing.js.map +1 -0
- package/lib/module/themes/types.js +4 -0
- package/lib/module/themes/types.js.map +1 -0
- package/lib/module/themes/typography.js +31 -0
- package/lib/module/themes/typography.js.map +1 -0
- package/lib/module/types/general.types.js +4 -0
- package/lib/module/types/general.types.js.map +1 -0
- package/lib/typescript/src/components/Card/Card.d.ts +1 -1
- package/lib/typescript/src/components/Card/Card.d.ts.map +1 -1
- package/lib/typescript/src/components/Card/styles.d.ts +13 -1
- package/lib/typescript/src/components/Card/styles.d.ts.map +1 -1
- package/lib/typescript/src/components/Card/types.d.ts +11 -3
- package/lib/typescript/src/components/Card/types.d.ts.map +1 -1
- package/lib/typescript/src/components/Surface/Surface.d.ts +16 -0
- package/lib/typescript/src/components/Surface/Surface.d.ts.map +1 -0
- package/lib/typescript/src/components/Surface/styles.d.ts +22 -0
- package/lib/typescript/src/components/Surface/styles.d.ts.map +1 -0
- package/lib/typescript/src/components/Surface/types.d.ts +12 -0
- package/lib/typescript/src/components/Surface/types.d.ts.map +1 -0
- package/lib/typescript/src/themes/colors.d.ts +108 -0
- package/lib/typescript/src/themes/colors.d.ts.map +1 -0
- package/lib/typescript/src/themes/light.d.ts +3 -0
- package/lib/typescript/src/themes/light.d.ts.map +1 -0
- package/lib/typescript/src/themes/radius.d.ts +10 -0
- package/lib/typescript/src/themes/radius.d.ts.map +1 -0
- package/lib/typescript/src/themes/size.d.ts +10 -0
- package/lib/typescript/src/themes/size.d.ts.map +1 -0
- package/lib/typescript/src/themes/spacing.d.ts +12 -0
- package/lib/typescript/src/themes/spacing.d.ts.map +1 -0
- package/lib/typescript/src/themes/types.d.ts +19 -0
- package/lib/typescript/src/themes/types.d.ts.map +1 -0
- package/lib/typescript/src/themes/typography.d.ts +30 -0
- package/lib/typescript/src/themes/typography.d.ts.map +1 -0
- package/lib/typescript/src/types/general.types.d.ts +4 -0
- package/lib/typescript/src/types/general.types.d.ts.map +1 -0
- package/package.json +3 -3
- package/src/components/Card/Card.tsx +13 -5
- package/src/components/Card/styles.ts +17 -17
- package/src/components/Card/types.ts +12 -3
- package/src/components/Surface/Surface.tsx +29 -0
- package/src/components/Surface/styles.ts +28 -0
- package/src/components/Surface/types.ts +14 -0
- package/src/themes/colors.ts +125 -0
- package/src/themes/light.ts +30 -0
- package/src/themes/radius.ts +10 -0
- package/src/themes/size.ts +10 -0
- package/src/themes/spacing.ts +12 -0
- package/src/themes/types.ts +19 -0
- package/src/themes/typography.ts +33 -0
- package/src/types/general.types.ts +4 -0
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { forwardRef } from 'react';
|
|
4
|
+
import Surface from "../Surface/Surface.js";
|
|
4
5
|
import Styles from "./styles.js";
|
|
5
6
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
7
|
/**
|
|
@@ -13,17 +14,21 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
13
14
|
* <Text>This is a card</Text>
|
|
14
15
|
* </Card>
|
|
15
16
|
*/
|
|
16
|
-
export const Card = ({
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
17
|
+
export const Card = /*#__PURE__*/forwardRef((props, ref) => {
|
|
18
|
+
const {
|
|
19
|
+
children,
|
|
20
|
+
variant = 'default',
|
|
21
|
+
style = {},
|
|
22
|
+
...rest
|
|
23
|
+
} = props;
|
|
24
|
+
return /*#__PURE__*/_jsx(Surface, {
|
|
25
|
+
ref: ref,
|
|
26
|
+
variant: variant,
|
|
22
27
|
style: [Styles.container, style],
|
|
23
|
-
...
|
|
28
|
+
...rest,
|
|
24
29
|
children: children
|
|
25
30
|
});
|
|
26
|
-
};
|
|
31
|
+
});
|
|
27
32
|
Card.displayName = 'Card';
|
|
28
33
|
export default Card;
|
|
29
34
|
//# sourceMappingURL=Card.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["forwardRef","Surface","Styles","jsx","_jsx","Card","props","ref","children","variant","style","rest","container","displayName"],"sourceRoot":"../../../../src","sources":["components/Card/Card.tsx"],"mappings":";;AAAA,SAASA,UAAU,QAAQ,OAAO;AAElC,OAAOC,OAAO,MAAM,uBAAoB;AACxC,OAAOC,MAAM,MAAM,aAAU;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAG9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,IAAI,gBAAGL,UAAU,CAAqB,CAACM,KAAK,EAAEC,GAAG,KAAK;EACjE,MAAM;IAAEC,QAAQ;IAAEC,OAAO,GAAG,SAAS;IAAEC,KAAK,GAAG,CAAC,CAAC;IAAE,GAAGC;EAAK,CAAC,GAAGL,KAAK;EACpE,oBACEF,IAAA,CAACH,OAAO;IACNM,GAAG,EAAEA,GAAI;IACTE,OAAO,EAAEA,OAAQ;IACjBC,KAAK,EAAE,CAACR,MAAM,CAACU,SAAS,EAAEF,KAAK,CAAE;IAAA,GAC7BC,IAAI;IAAAH,QAAA,EAEPA;EAAQ,CACF,CAAC;AAEd,CAAC,CAAC;AAEFH,IAAI,CAACQ,WAAW,GAAG,MAAM;AAEzB,eAAeR,IAAI","ignoreList":[]}
|
|
@@ -1,29 +1,27 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
import Style from "../../utils/Style.js";
|
|
4
|
-
const DEFAULT_CARD = {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
card_shadow_offset: {
|
|
4
|
+
export const DEFAULT_CARD = {
|
|
5
|
+
border_radius: 8,
|
|
6
|
+
padding: 16,
|
|
7
|
+
shadow_color: '#000',
|
|
8
|
+
shadow_offset: {
|
|
10
9
|
width: 0,
|
|
11
10
|
height: 2
|
|
12
11
|
},
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
shadow_opacity: 0.1,
|
|
13
|
+
shadow_radius: 4,
|
|
14
|
+
elevation: 3
|
|
16
15
|
};
|
|
17
16
|
export const Styles = Style.create({
|
|
18
17
|
container: {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
elevation: DEFAULT_CARD.card_elevation
|
|
18
|
+
borderRadius: DEFAULT_CARD.border_radius,
|
|
19
|
+
padding: DEFAULT_CARD.padding,
|
|
20
|
+
shadowColor: DEFAULT_CARD.shadow_color,
|
|
21
|
+
shadowOffset: DEFAULT_CARD.shadow_offset,
|
|
22
|
+
shadowOpacity: DEFAULT_CARD.shadow_opacity,
|
|
23
|
+
shadowRadius: DEFAULT_CARD.shadow_radius,
|
|
24
|
+
elevation: DEFAULT_CARD.elevation
|
|
27
25
|
}
|
|
28
26
|
});
|
|
29
27
|
export default Styles;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Style","DEFAULT_CARD","
|
|
1
|
+
{"version":3,"names":["Style","DEFAULT_CARD","border_radius","padding","shadow_color","shadow_offset","width","height","shadow_opacity","shadow_radius","elevation","Styles","create","container","borderRadius","shadowColor","shadowOffset","shadowOpacity","shadowRadius"],"sourceRoot":"../../../../src","sources":["components/Card/styles.ts"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,sBAAmB;AAErC,OAAO,MAAMC,YAAY,GAAG;EAC1BC,aAAa,EAAE,CAAC;EAChBC,OAAO,EAAE,EAAE;EACXC,YAAY,EAAE,MAAM;EACpBC,aAAa,EAAE;IAAEC,KAAK,EAAE,CAAC;IAAEC,MAAM,EAAE;EAAE,CAAC;EACtCC,cAAc,EAAE,GAAG;EACnBC,aAAa,EAAE,CAAC;EAChBC,SAAS,EAAE;AACb,CAAC;AAID,OAAO,MAAMC,MAAM,GAAGX,KAAK,CAACY,MAAM,CAAC;EACjCC,SAAS,EAAE;IACTC,YAAY,EAAEb,YAAY,CAACC,aAAa;IACxCC,OAAO,EAAEF,YAAY,CAACE,OAAO;IAC7BY,WAAW,EAAEd,YAAY,CAACG,YAAY;IACtCY,YAAY,EAAEf,YAAY,CAACI,aAAa;IACxCY,aAAa,EAAEhB,YAAY,CAACO,cAAc;IAC1CU,YAAY,EAAEjB,YAAY,CAACQ,aAAa;IACxCC,SAAS,EAAET,YAAY,CAACS;EAC1B;AACF,CAAC,CAAC;AAEF,eAAeC,MAAM","ignoreList":[]}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { forwardRef } from 'react';
|
|
4
|
+
import { View } from 'react-native';
|
|
5
|
+
import { Styles } from "./styles.js";
|
|
6
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
+
/**
|
|
8
|
+
* Surface component to provide a styled container
|
|
9
|
+
* @param {React.ReactNode} children - The content to be displayed inside the surface
|
|
10
|
+
* @param {ViewStyle} style - Additional styles for the surface container
|
|
11
|
+
* @param {SurfaceVariants} variant - The variant of the surface styling
|
|
12
|
+
* @returns {JSX.Element} The Surface component
|
|
13
|
+
* @example
|
|
14
|
+
* <Surface variant="secondary" style={{ margin: 10 }}>
|
|
15
|
+
* <Text>This is a surface</Text>
|
|
16
|
+
* </Surface>
|
|
17
|
+
*/
|
|
18
|
+
export const Surface = /*#__PURE__*/forwardRef((props, ref) => {
|
|
19
|
+
const {
|
|
20
|
+
children,
|
|
21
|
+
variant = 'default',
|
|
22
|
+
style,
|
|
23
|
+
...rest
|
|
24
|
+
} = props;
|
|
25
|
+
return /*#__PURE__*/_jsx(View, {
|
|
26
|
+
ref: ref,
|
|
27
|
+
style: [Styles.base, Styles[variant], style],
|
|
28
|
+
...rest,
|
|
29
|
+
children: children
|
|
30
|
+
});
|
|
31
|
+
});
|
|
32
|
+
Surface.displayName = 'Surface';
|
|
33
|
+
export default Surface;
|
|
34
|
+
//# sourceMappingURL=Surface.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["forwardRef","View","Styles","jsx","_jsx","Surface","props","ref","children","variant","style","rest","base","displayName"],"sourceRoot":"../../../../src","sources":["components/Surface/Surface.tsx"],"mappings":";;AAAA,SAASA,UAAU,QAAQ,OAAO;AAClC,SAASC,IAAI,QAAQ,cAAc;AAEnC,SAASC,MAAM,QAAQ,aAAU;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAGlC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,OAAO,gBAAGL,UAAU,CAAwB,CAACM,KAAK,EAAEC,GAAG,KAAK;EACvE,MAAM;IAAEC,QAAQ;IAAEC,OAAO,GAAG,SAAS;IAAEC,KAAK;IAAE,GAAGC;EAAK,CAAC,GAAGL,KAAK;EAC/D,oBACEF,IAAA,CAACH,IAAI;IAACM,GAAG,EAAEA,GAAI;IAACG,KAAK,EAAE,CAACR,MAAM,CAACU,IAAI,EAAEV,MAAM,CAACO,OAAO,CAAC,EAAEC,KAAK,CAAE;IAAA,GAAKC,IAAI;IAAAH,QAAA,EACnEA;EAAQ,CACL,CAAC;AAEX,CAAC,CAAC;AAEFH,OAAO,CAACQ,WAAW,GAAG,SAAS;AAE/B,eAAeR,OAAO","ignoreList":[]}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import Style from "../../utils/Style.js";
|
|
4
|
+
export const DEFAULT_SURFACE = {
|
|
5
|
+
default_background_color: '#fff',
|
|
6
|
+
secondary_background_color: '#f0f0f0',
|
|
7
|
+
transparent_background_color: 'transparent'
|
|
8
|
+
};
|
|
9
|
+
export const Styles = Style.create({
|
|
10
|
+
base: {},
|
|
11
|
+
/**
|
|
12
|
+
* Variants
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
default: {
|
|
16
|
+
backgroundColor: DEFAULT_SURFACE.default_background_color
|
|
17
|
+
},
|
|
18
|
+
secondary: {
|
|
19
|
+
backgroundColor: DEFAULT_SURFACE.secondary_background_color
|
|
20
|
+
},
|
|
21
|
+
transparent: {
|
|
22
|
+
backgroundColor: DEFAULT_SURFACE.transparent_background_color
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["Style","DEFAULT_SURFACE","default_background_color","secondary_background_color","transparent_background_color","Styles","create","base","default","backgroundColor","secondary","transparent"],"sourceRoot":"../../../../src","sources":["components/Surface/styles.ts"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,sBAAmB;AAErC,OAAO,MAAMC,eAAe,GAAG;EAC7BC,wBAAwB,EAAE,MAAM;EAChCC,0BAA0B,EAAE,SAAS;EACrCC,4BAA4B,EAAE;AAChC,CAAC;AAID,OAAO,MAAMC,MAAM,GAAGL,KAAK,CAACM,MAAM,CAAC;EACjCC,IAAI,EAAE,CAAC,CAAC;EAER;AACF;AACA;;EAEEC,OAAO,EAAE;IACPC,eAAe,EAAER,eAAe,CAACC;EACnC,CAAC;EACDQ,SAAS,EAAE;IACTD,eAAe,EAAER,eAAe,CAACE;EACnC,CAAC;EAEDQ,WAAW,EAAE;IACXF,eAAe,EAAER,eAAe,CAACG;EACnC;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../src","sources":["components/Surface/types.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
export const colors = {
|
|
4
|
+
// ----- BRAND COLORS -----
|
|
5
|
+
primary: {
|
|
6
|
+
50: '#F0F7FF',
|
|
7
|
+
100: '#D9E9FF',
|
|
8
|
+
200: '#B3D3FF',
|
|
9
|
+
300: '#8DBDFF',
|
|
10
|
+
400: '#66A7FF',
|
|
11
|
+
500: '#3F91FF',
|
|
12
|
+
// main brand color
|
|
13
|
+
600: '#2376E6',
|
|
14
|
+
700: '#1658B3',
|
|
15
|
+
800: '#0A3A80',
|
|
16
|
+
900: '#001D4D'
|
|
17
|
+
},
|
|
18
|
+
secondary: {
|
|
19
|
+
50: '#F5F5FF',
|
|
20
|
+
100: '#E6E4FF',
|
|
21
|
+
200: '#C8C4FF',
|
|
22
|
+
300: '#AAA3FF',
|
|
23
|
+
400: '#8C82FF',
|
|
24
|
+
500: '#6E61FF',
|
|
25
|
+
// accent / complementary
|
|
26
|
+
600: '#554ACC',
|
|
27
|
+
700: '#3D3499',
|
|
28
|
+
800: '#251E66',
|
|
29
|
+
900: '#100A33'
|
|
30
|
+
},
|
|
31
|
+
// ----- STATUS COLORS -----
|
|
32
|
+
success: {
|
|
33
|
+
50: '#EBFDF3',
|
|
34
|
+
100: '#C8F9DF',
|
|
35
|
+
200: '#A3F3C6',
|
|
36
|
+
300: '#7DEDAE',
|
|
37
|
+
400: '#57E796',
|
|
38
|
+
500: '#32D880',
|
|
39
|
+
// success default
|
|
40
|
+
600: '#28B56A',
|
|
41
|
+
700: '#1E9254',
|
|
42
|
+
800: '#146F3E',
|
|
43
|
+
900: '#0A4C28'
|
|
44
|
+
},
|
|
45
|
+
warning: {
|
|
46
|
+
50: '#FFFAEA',
|
|
47
|
+
100: '#FFF2C2',
|
|
48
|
+
200: '#FFE08A',
|
|
49
|
+
300: '#FFCE52',
|
|
50
|
+
400: '#FFBC1A',
|
|
51
|
+
500: '#F5A000',
|
|
52
|
+
// warning default
|
|
53
|
+
600: '#CC8300',
|
|
54
|
+
700: '#A36600',
|
|
55
|
+
800: '#7A4A00',
|
|
56
|
+
900: '#523000'
|
|
57
|
+
},
|
|
58
|
+
danger: {
|
|
59
|
+
50: '#FFF5F5',
|
|
60
|
+
100: '#FFE0E0',
|
|
61
|
+
200: '#FFB8B8',
|
|
62
|
+
300: '#FF8A8A',
|
|
63
|
+
400: '#FF5C5C',
|
|
64
|
+
500: '#FF2E2E',
|
|
65
|
+
// danger default
|
|
66
|
+
600: '#CC2323',
|
|
67
|
+
700: '#991A1A',
|
|
68
|
+
800: '#661212',
|
|
69
|
+
900: '#330909'
|
|
70
|
+
},
|
|
71
|
+
error: {
|
|
72
|
+
50: '#FFF4F2',
|
|
73
|
+
100: '#FFE3DE',
|
|
74
|
+
200: '#FFC0B8',
|
|
75
|
+
300: '#FF9A8E',
|
|
76
|
+
400: '#FF6B5C',
|
|
77
|
+
500: '#F04438',
|
|
78
|
+
// common red error
|
|
79
|
+
600: '#D92D20',
|
|
80
|
+
700: '#B42318',
|
|
81
|
+
800: '#912018',
|
|
82
|
+
900: '#7A271A'
|
|
83
|
+
},
|
|
84
|
+
// ----- DISABLED -----
|
|
85
|
+
disabled: {
|
|
86
|
+
bg: '#E5E7EB',
|
|
87
|
+
text: '#9CA3AF',
|
|
88
|
+
border: '#D1D5DB'
|
|
89
|
+
},
|
|
90
|
+
// ----- NEUTRALS -----
|
|
91
|
+
gray: {
|
|
92
|
+
50: '#F9FAFB',
|
|
93
|
+
100: '#F3F4F6',
|
|
94
|
+
200: '#E5E7EB',
|
|
95
|
+
300: '#D1D5DB',
|
|
96
|
+
400: '#9CA3AF',
|
|
97
|
+
500: '#6B7280',
|
|
98
|
+
600: '#4B5563',
|
|
99
|
+
700: '#374151',
|
|
100
|
+
800: '#1F2937',
|
|
101
|
+
900: '#111827'
|
|
102
|
+
},
|
|
103
|
+
// ----- BACKGROUND -----
|
|
104
|
+
background: {
|
|
105
|
+
primary: '#FFFFFF',
|
|
106
|
+
secondary: '#F7F7F8',
|
|
107
|
+
tertiary: '#EFEFF1',
|
|
108
|
+
disabled: '#E5E7EB'
|
|
109
|
+
},
|
|
110
|
+
// ----- TEXT -----
|
|
111
|
+
text: {
|
|
112
|
+
primary: '#111827',
|
|
113
|
+
secondary: '#4B5563',
|
|
114
|
+
muted: '#6B7280',
|
|
115
|
+
inverted: '#FFFFFF'
|
|
116
|
+
},
|
|
117
|
+
// ----- BLACK & WHITE -----
|
|
118
|
+
white: '#FFFFFF',
|
|
119
|
+
black: '#000000',
|
|
120
|
+
transparent: 'transparent'
|
|
121
|
+
};
|
|
122
|
+
//# sourceMappingURL=colors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["colors","primary","secondary","success","warning","danger","error","disabled","bg","text","border","gray","background","tertiary","muted","inverted","white","black","transparent"],"sourceRoot":"../../../src","sources":["themes/colors.ts"],"mappings":"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","ignoreList":[]}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { colors } from "./colors.js";
|
|
4
|
+
import { radii } from "./radius.js";
|
|
5
|
+
import { sizes } from "./size.js";
|
|
6
|
+
import { spacing } from "./spacing.js";
|
|
7
|
+
import { typography } from "./typography.js";
|
|
8
|
+
export const LightTheme = {
|
|
9
|
+
color: colors,
|
|
10
|
+
size: sizes,
|
|
11
|
+
spacing: spacing,
|
|
12
|
+
typography: typography,
|
|
13
|
+
radius: radii,
|
|
14
|
+
components: {
|
|
15
|
+
card: {
|
|
16
|
+
border_radius: radii.md,
|
|
17
|
+
padding: spacing.lg,
|
|
18
|
+
shadow_color: colors.black,
|
|
19
|
+
shadow_offset: {
|
|
20
|
+
width: 0,
|
|
21
|
+
height: 2
|
|
22
|
+
},
|
|
23
|
+
shadow_opacity: 0.1,
|
|
24
|
+
shadow_radius: radii.sm,
|
|
25
|
+
elevation: 3
|
|
26
|
+
},
|
|
27
|
+
surface: {
|
|
28
|
+
default_background_color: colors.primary[50],
|
|
29
|
+
secondary_background_color: colors.primary[100],
|
|
30
|
+
transparent_background_color: colors.transparent
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
//# sourceMappingURL=light.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["colors","radii","sizes","spacing","typography","LightTheme","color","size","radius","components","card","border_radius","md","padding","lg","shadow_color","black","shadow_offset","width","height","shadow_opacity","shadow_radius","sm","elevation","surface","default_background_color","primary","secondary_background_color","transparent_background_color","transparent"],"sourceRoot":"../../../src","sources":["themes/light.ts"],"mappings":";;AAAA,SAASA,MAAM,QAAQ,aAAU;AACjC,SAASC,KAAK,QAAQ,aAAU;AAChC,SAASC,KAAK,QAAQ,WAAQ;AAC9B,SAASC,OAAO,QAAQ,cAAW;AAEnC,SAASC,UAAU,QAAQ,iBAAc;AAEzC,OAAO,MAAMC,UAA2B,GAAG;EACzCC,KAAK,EAAEN,MAAM;EACbO,IAAI,EAAEL,KAAK;EACXC,OAAO,EAAEA,OAAO;EAChBC,UAAU,EAAEA,UAAU;EACtBI,MAAM,EAAEP,KAAK;EACbQ,UAAU,EAAE;IACVC,IAAI,EAAE;MACJC,aAAa,EAAEV,KAAK,CAACW,EAAE;MACvBC,OAAO,EAAEV,OAAO,CAACW,EAAE;MACnBC,YAAY,EAAEf,MAAM,CAACgB,KAAK;MAC1BC,aAAa,EAAE;QAAEC,KAAK,EAAE,CAAC;QAAEC,MAAM,EAAE;MAAE,CAAC;MACtCC,cAAc,EAAE,GAAG;MACnBC,aAAa,EAAEpB,KAAK,CAACqB,EAAE;MACvBC,SAAS,EAAE;IACb,CAAC;IACDC,OAAO,EAAE;MACPC,wBAAwB,EAAEzB,MAAM,CAAC0B,OAAO,CAAC,EAAE,CAAC;MAC5CC,0BAA0B,EAAE3B,MAAM,CAAC0B,OAAO,CAAC,GAAG,CAAC;MAC/CE,4BAA4B,EAAE5B,MAAM,CAAC6B;IACvC;EACF;AACF,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["radii","none","sm","md","lg","xl","full"],"sourceRoot":"../../../src","sources":["themes/radius.ts"],"mappings":";;AAAA,OAAO,MAAMA,KAAK,GAAG;EACnBC,IAAI,EAAE,CAAC;EACPC,EAAE,EAAE,CAAC;EACLC,EAAE,EAAE,CAAC;EACLC,EAAE,EAAE,EAAE;EACNC,EAAE,EAAE,EAAE;EACNC,IAAI,EAAE;AACR,CAAU","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["sizes"],"sourceRoot":"../../../src","sources":["themes/size.ts"],"mappings":";;AAAA,OAAO,MAAMA,KAAK,GAAG;EACnB,IAAI,EAAE,EAAE;EACR,IAAI,EAAE,EAAE;EACR,IAAI,EAAE,EAAE;EACR,IAAI,EAAE,EAAE;EACR,IAAI,EAAE,EAAE;EACR,KAAK,EAAE;AACT,CAAU","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["spacing"],"sourceRoot":"../../../src","sources":["themes/spacing.ts"],"mappings":";;AAAA,OAAO,MAAMA,OAAO,GAAG;EACrB,MAAM,EAAE,CAAC;EACT,IAAI,EAAE,CAAC;EACP,IAAI,EAAE,CAAC;EACP,IAAI,EAAE,EAAE;EACR,IAAI,EAAE,EAAE;EACR,IAAI,EAAE,EAAE;EACR,KAAK,EAAE,EAAE;EACT,KAAK,EAAE;AACT,CAAU","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["themes/types.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
export const typography = {
|
|
4
|
+
fonts: {
|
|
5
|
+
regular: 'System',
|
|
6
|
+
medium: 'System',
|
|
7
|
+
bold: 'System'
|
|
8
|
+
},
|
|
9
|
+
fontSizes: {
|
|
10
|
+
'xs': 12,
|
|
11
|
+
'sm': 14,
|
|
12
|
+
'md': 16,
|
|
13
|
+
'lg': 20,
|
|
14
|
+
'xl': 24,
|
|
15
|
+
'2xl': 32
|
|
16
|
+
},
|
|
17
|
+
lineHeights: {
|
|
18
|
+
'xs': 16,
|
|
19
|
+
'sm': 18,
|
|
20
|
+
'md': 20,
|
|
21
|
+
'lg': 28,
|
|
22
|
+
'xl': 32,
|
|
23
|
+
'2xl': 40
|
|
24
|
+
},
|
|
25
|
+
fontWeights: {
|
|
26
|
+
regular: '400',
|
|
27
|
+
medium: '500',
|
|
28
|
+
bold: '700'
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=typography.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["typography","fonts","regular","medium","bold","fontSizes","lineHeights","fontWeights"],"sourceRoot":"../../../src","sources":["themes/typography.ts"],"mappings":";;AAAA,OAAO,MAAMA,UAAU,GAAG;EACxBC,KAAK,EAAE;IACLC,OAAO,EAAE,QAAQ;IACjBC,MAAM,EAAE,QAAQ;IAChBC,IAAI,EAAE;EACR,CAAC;EAEDC,SAAS,EAAE;IACT,IAAI,EAAE,EAAE;IACR,IAAI,EAAE,EAAE;IACR,IAAI,EAAE,EAAE;IACR,IAAI,EAAE,EAAE;IACR,IAAI,EAAE,EAAE;IACR,KAAK,EAAE;EACT,CAAC;EAEDC,WAAW,EAAE;IACX,IAAI,EAAE,EAAE;IACR,IAAI,EAAE,EAAE;IACR,IAAI,EAAE,EAAE;IACR,IAAI,EAAE,EAAE;IACR,IAAI,EAAE,EAAE;IACR,KAAK,EAAE;EACT,CAAC;EAEDC,WAAW,EAAE;IACXL,OAAO,EAAE,KAAc;IACvBC,MAAM,EAAE,KAAc;IACtBC,IAAI,EAAE;EACR;AACF,CAAU","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["types/general.types.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -9,6 +9,6 @@ import type { CardProps } from './types';
|
|
|
9
9
|
* <Text>This is a card</Text>
|
|
10
10
|
* </Card>
|
|
11
11
|
*/
|
|
12
|
-
export declare const Card:
|
|
12
|
+
export declare const Card: import("react").ForwardRefExoticComponent<CardProps & import("react").RefAttributes<import("react-native").View>>;
|
|
13
13
|
export default Card;
|
|
14
14
|
//# sourceMappingURL=Card.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../../../../../src/components/Card/Card.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../../../../../src/components/Card/Card.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEzC;;;;;;;;;GASG;AACH,eAAO,MAAM,IAAI,mHAYf,CAAC;AAIH,eAAe,IAAI,CAAC"}
|
|
@@ -1,6 +1,18 @@
|
|
|
1
|
+
export declare const DEFAULT_CARD: {
|
|
2
|
+
border_radius: number;
|
|
3
|
+
padding: number;
|
|
4
|
+
shadow_color: string;
|
|
5
|
+
shadow_offset: {
|
|
6
|
+
width: number;
|
|
7
|
+
height: number;
|
|
8
|
+
};
|
|
9
|
+
shadow_opacity: number;
|
|
10
|
+
shadow_radius: number;
|
|
11
|
+
elevation: number;
|
|
12
|
+
};
|
|
13
|
+
export type CardStyleVariables = typeof DEFAULT_CARD;
|
|
1
14
|
export declare const Styles: {
|
|
2
15
|
container: {
|
|
3
|
-
backgroundColor: string;
|
|
4
16
|
borderRadius: number;
|
|
5
17
|
padding: number;
|
|
6
18
|
shadowColor: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../../src/components/Card/styles.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../../src/components/Card/styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,YAAY;;;;;;;;;;;CAQxB,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG,OAAO,YAAY,CAAC;AAErD,eAAO,MAAM,MAAM;;;;;;;;;;;;;CAUjB,CAAC;AAEH,eAAe,MAAM,CAAC"}
|
|
@@ -1,9 +1,17 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ViewProps, ViewStyle } from 'react-native';
|
|
2
|
+
import type { SurfaceVariants } from '../Surface/types';
|
|
2
3
|
/**
|
|
3
4
|
* Props for the Card component
|
|
4
5
|
*/
|
|
5
|
-
export
|
|
6
|
+
export interface CardProps extends ViewProps {
|
|
7
|
+
/**
|
|
8
|
+
* Children elements to be rendered inside the Card
|
|
9
|
+
*/
|
|
6
10
|
children?: React.ReactNode;
|
|
11
|
+
/**
|
|
12
|
+
* Custom styles for the Card container
|
|
13
|
+
*/
|
|
7
14
|
style?: ViewStyle;
|
|
8
|
-
|
|
15
|
+
variant?: SurfaceVariants;
|
|
16
|
+
}
|
|
9
17
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/components/Card/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/components/Card/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAExD;;GAEG;AACH,MAAM,WAAW,SAAU,SAAQ,SAAS;IAC1C;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAElB,OAAO,CAAC,EAAE,eAAe,CAAC;CAC3B"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { View } from 'react-native';
|
|
2
|
+
import type { SurfaceProps } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Surface component to provide a styled container
|
|
5
|
+
* @param {React.ReactNode} children - The content to be displayed inside the surface
|
|
6
|
+
* @param {ViewStyle} style - Additional styles for the surface container
|
|
7
|
+
* @param {SurfaceVariants} variant - The variant of the surface styling
|
|
8
|
+
* @returns {JSX.Element} The Surface component
|
|
9
|
+
* @example
|
|
10
|
+
* <Surface variant="secondary" style={{ margin: 10 }}>
|
|
11
|
+
* <Text>This is a surface</Text>
|
|
12
|
+
* </Surface>
|
|
13
|
+
*/
|
|
14
|
+
export declare const Surface: import("react").ForwardRefExoticComponent<SurfaceProps & import("react").RefAttributes<View>>;
|
|
15
|
+
export default Surface;
|
|
16
|
+
//# sourceMappingURL=Surface.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Surface.d.ts","sourceRoot":"","sources":["../../../../../src/components/Surface/Surface.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAGpC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE5C;;;;;;;;;;GAUG;AACH,eAAO,MAAM,OAAO,+FAOlB,CAAC;AAIH,eAAe,OAAO,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export declare const DEFAULT_SURFACE: {
|
|
2
|
+
default_background_color: string;
|
|
3
|
+
secondary_background_color: string;
|
|
4
|
+
transparent_background_color: string;
|
|
5
|
+
};
|
|
6
|
+
export type SurfaceStyleVariables = typeof DEFAULT_SURFACE;
|
|
7
|
+
export declare const Styles: {
|
|
8
|
+
base: {};
|
|
9
|
+
/**
|
|
10
|
+
* Variants
|
|
11
|
+
*/
|
|
12
|
+
default: {
|
|
13
|
+
backgroundColor: string;
|
|
14
|
+
};
|
|
15
|
+
secondary: {
|
|
16
|
+
backgroundColor: string;
|
|
17
|
+
};
|
|
18
|
+
transparent: {
|
|
19
|
+
backgroundColor: string;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../../src/components/Surface/styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,eAAe;;;;CAI3B,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG,OAAO,eAAe,CAAC;AAE3D,eAAO,MAAM,MAAM;;IAGjB;;OAEG;;;;;;;;;;CAYH,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ViewProps, ViewStyle } from 'react-native';
|
|
2
|
+
export type SurfaceVariants = 'default' | 'secondary' | 'transparent';
|
|
3
|
+
export interface SurfaceProps extends ViewProps {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
style?: ViewStyle | ViewStyle[];
|
|
6
|
+
/**
|
|
7
|
+
* The variant of the Surface component.
|
|
8
|
+
* @default 'default'
|
|
9
|
+
*/
|
|
10
|
+
variant?: SurfaceVariants;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/components/Surface/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzD,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG,WAAW,GAAG,aAAa,CAAC;AAEtE,MAAM,WAAW,YAAa,SAAQ,SAAS;IAC7C,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,KAAK,CAAC,EAAE,SAAS,GAAG,SAAS,EAAE,CAAC;IAEhC;;;OAGG;IACH,OAAO,CAAC,EAAE,eAAe,CAAC;CAC3B"}
|