@dropi/react-native-design-system 0.1.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.
@@ -0,0 +1,296 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.colors = void 0;
7
+ const colors = exports.colors = {
8
+ "Primary-50": {
9
+ light: "#FEF8F1",
10
+ dark: "#1A1006"
11
+ },
12
+ "Primary-100": {
13
+ light: "#FFECD4",
14
+ dark: "#26180A"
15
+ },
16
+ "Primary-200": {
17
+ light: "#FCDDBD",
18
+ dark: "#4D3013"
19
+ },
20
+ "Primary-300": {
21
+ light: "#FAC289",
22
+ dark: "#805020"
23
+ },
24
+ "Primary-400": {
25
+ light: "#F7B46F",
26
+ dark: "#82712D"
27
+ },
28
+ "Primary-500": {
29
+ light: "#F49A3D",
30
+ dark: "#D9842B"
31
+ },
32
+ "Primary-600": {
33
+ light: "#CC8133",
34
+ dark: "#E5A767"
35
+ },
36
+ "Primary-700": {
37
+ light: "#996027",
38
+ dark: "#EBB681"
39
+ },
40
+ "Primary-800": {
41
+ light: "#66401A",
42
+ dark: "#F0CEAD"
43
+ },
44
+ "Primary-900": {
45
+ light: "#33200D",
46
+ dark: "#F0DAC5"
47
+ },
48
+ "Secondary-50": {
49
+ light: "#F0FAFC",
50
+ dark: "#01161F"
51
+ },
52
+ "Secondary-100": {
53
+ light: "#CEE8F2",
54
+ dark: "#003042"
55
+ },
56
+ "Secondary-200": {
57
+ light: "#95D0E5",
58
+ dark: "#00455E"
59
+ },
60
+ "Secondary-300": {
61
+ light: "#62BAD9",
62
+ dark: "#005A7A"
63
+ },
64
+ "Secondary-400": {
65
+ light: "#33A4CC",
66
+ dark: "#00759E"
67
+ },
68
+ "Secondary-500": {
69
+ light: "#008BDF",
70
+ dark: "#2D8FB2"
71
+ },
72
+ "Secondary-600": {
73
+ light: "#007199",
74
+ dark: "#5BADC9"
75
+ },
76
+ "Secondary-700": {
77
+ light: "#005573",
78
+ dark: "#7CB9CF"
79
+ },
80
+ "Secondary-800": {
81
+ light: "#00384D",
82
+ dark: "#ABD2E0"
83
+ },
84
+ "Secondary-900": {
85
+ light: "#001C26",
86
+ dark: "#DAF1F7"
87
+ },
88
+ "Gray-50": {
89
+ light: "#F7F8FA",
90
+ dark: "#151A26"
91
+ },
92
+ "Gray-100": {
93
+ light: "#E6EAF2",
94
+ dark: "#222B40"
95
+ },
96
+ "Gray-200": {
97
+ light: "#C3C9D9",
98
+ dark: "#364059"
99
+ },
100
+ "Gray-300": {
101
+ light: "#A3ABBF",
102
+ dark: "#3E4966"
103
+ },
104
+ "Gray-400": {
105
+ light: "#858EA6",
106
+ dark: "#505A73"
107
+ },
108
+ "Gray-500": {
109
+ light: "#69738C",
110
+ dark: "#69738C"
111
+ },
112
+ "Gray-600": {
113
+ light: "#475066",
114
+ dark: "#858EA6"
115
+ },
116
+ "Gray-700": {
117
+ light: "#32394D",
118
+ dark: "#A3ABBF"
119
+ },
120
+ "Gray-800": {
121
+ light: "#1F2433",
122
+ dark: "#C3C9D9"
123
+ },
124
+ "Gray-900": {
125
+ light: "#0E111A",
126
+ dark: "#E6EAF2"
127
+ },
128
+ "White": {
129
+ light: "#FFFFFF",
130
+ dark: "#0E111A"
131
+ },
132
+ "Black": {
133
+ light: "#000000",
134
+ dark: "#FFFFFF"
135
+ },
136
+ "Success-50": {
137
+ light: "#E9FFFB",
138
+ dark: "#023524"
139
+ },
140
+ "Success-100": {
141
+ light: "#B7F3EA",
142
+ dark: "#064D39"
143
+ },
144
+ "Success-200": {
145
+ light: "#91E8DA",
146
+ dark: "#096B52"
147
+ },
148
+ "Success-300": {
149
+ light: "#66DDC8",
150
+ dark: "#0C8C6D"
151
+ },
152
+ "Success-400": {
153
+ light: "#3ADFB6",
154
+ dark: "#0FAF8B"
155
+ },
156
+ "Success-500": {
157
+ light: "#00D6A0",
158
+ dark: "#2AC5A7"
159
+ },
160
+ "Success-600": {
161
+ light: "#00B083",
162
+ dark: "#55D2BC"
163
+ },
164
+ "Success-700": {
165
+ light: "#008C68",
166
+ dark: "#7FE1D1"
167
+ },
168
+ "Success-800": {
169
+ light: "#00684E",
170
+ dark: "#B3F2E5"
171
+ },
172
+ "Success-900": {
173
+ light: "#004535",
174
+ dark: "#E0FBF6"
175
+ },
176
+ "Error-50": {
177
+ light: "#FFEFEF",
178
+ dark: "#472325"
179
+ },
180
+ "Error-100": {
181
+ light: "#FFCECE",
182
+ dark: "#662E30"
183
+ },
184
+ "Error-200": {
185
+ light: "#FFA3A3",
186
+ dark: "#8C3A3D"
187
+ },
188
+ "Error-300": {
189
+ light: "#FF7A7A",
190
+ dark: "#B34849"
191
+ },
192
+ "Error-400": {
193
+ light: "#FF5252",
194
+ dark: "#D25456"
195
+ },
196
+ "Error-500": {
197
+ light: "#FF3333",
198
+ dark: "#E17070"
199
+ },
200
+ "Error-600": {
201
+ light: "#CC2828",
202
+ dark: "#E89393"
203
+ },
204
+ "Error-700": {
205
+ light: "#991F1F",
206
+ dark: "#F0B7B7"
207
+ },
208
+ "Error-800": {
209
+ light: "#661515",
210
+ dark: "#F6DCDC"
211
+ },
212
+ "Error-900": {
213
+ light: "#330B0B",
214
+ dark: "#FBEFEF"
215
+ },
216
+ "Info-50": {
217
+ light: "#E6F0FE",
218
+ dark: "#1A3B73"
219
+ },
220
+ "Info-100": {
221
+ light: "#C2DAFC",
222
+ dark: "#224E92"
223
+ },
224
+ "Info-200": {
225
+ light: "#9CC4FB",
226
+ dark: "#2C64B3"
227
+ },
228
+ "Info-300": {
229
+ light: "#74AEFA",
230
+ dark: "#357BD6"
231
+ },
232
+ "Info-400": {
233
+ light: "#4B9AF8",
234
+ dark: "#4A92E8"
235
+ },
236
+ "Info-500": {
237
+ light: "#1E85F7",
238
+ dark: "#5AA2F0"
239
+ },
240
+ "Info-600": {
241
+ light: "#1867C5",
242
+ dark: "#7BB8F3"
243
+ },
244
+ "Info-700": {
245
+ light: "#124E96",
246
+ dark: "#9CCBF6"
247
+ },
248
+ "Info-800": {
249
+ light: "#0D3668",
250
+ dark: "#C2E0FA"
251
+ },
252
+ "Info-900": {
253
+ light: "#081C3A",
254
+ dark: "#E6F2FE"
255
+ },
256
+ "Warning-50": {
257
+ light: "#FFF8E0",
258
+ dark: "#7A5B00"
259
+ },
260
+ "Warning-100": {
261
+ light: "#FFEFC2",
262
+ dark: "#927300"
263
+ },
264
+ "Warning-200": {
265
+ light: "#FFE29C",
266
+ dark: "#AA8A00"
267
+ },
268
+ "Warning-300": {
269
+ light: "#FFD573",
270
+ dark: "#C2A100"
271
+ },
272
+ "Warning-400": {
273
+ light: "#FFC84C",
274
+ dark: "#DAB700"
275
+ },
276
+ "Warning-500": {
277
+ light: "#FFBA26",
278
+ dark: "#EAC432"
279
+ },
280
+ "Warning-600": {
281
+ light: "#D99A1F",
282
+ dark: "#F0D060"
283
+ },
284
+ "Warning-700": {
285
+ light: "#B37B19",
286
+ dark: "#F5DC8C"
287
+ },
288
+ "Warning-800": {
289
+ light: "#8C5D12",
290
+ dark: "#FAE8B9"
291
+ },
292
+ "Warning-900": {
293
+ light: "#663F0C",
294
+ dark: "#FEF5E0"
295
+ }
296
+ };
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ var _colors = require("./colors");
7
+ Object.keys(_colors).forEach(function (key) {
8
+ if (key === "default" || key === "__esModule") return;
9
+ if (key in exports && exports[key] === _colors[key]) return;
10
+ Object.defineProperty(exports, key, {
11
+ enumerable: true,
12
+ get: function () {
13
+ return _colors[key];
14
+ }
15
+ });
16
+ });
17
+ var _radius = require("./radius");
18
+ Object.keys(_radius).forEach(function (key) {
19
+ if (key === "default" || key === "__esModule") return;
20
+ if (key in exports && exports[key] === _radius[key]) return;
21
+ Object.defineProperty(exports, key, {
22
+ enumerable: true,
23
+ get: function () {
24
+ return _radius[key];
25
+ }
26
+ });
27
+ });
28
+ var _text = require("./text");
29
+ Object.keys(_text).forEach(function (key) {
30
+ if (key === "default" || key === "__esModule") return;
31
+ if (key in exports && exports[key] === _text[key]) return;
32
+ Object.defineProperty(exports, key, {
33
+ enumerable: true,
34
+ get: function () {
35
+ return _text[key];
36
+ }
37
+ });
38
+ });
39
+ var _spacing = require("./spacing");
40
+ Object.keys(_spacing).forEach(function (key) {
41
+ if (key === "default" || key === "__esModule") return;
42
+ if (key in exports && exports[key] === _spacing[key]) return;
43
+ Object.defineProperty(exports, key, {
44
+ enumerable: true,
45
+ get: function () {
46
+ return _spacing[key];
47
+ }
48
+ });
49
+ });
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.radius = void 0;
7
+ const radius = exports.radius = {
8
+ 'none': 0,
9
+ 'border-1': 4,
10
+ 'border-2': 8,
11
+ 'border-3': 12,
12
+ 'border-4': 24,
13
+ 'border-5': 32,
14
+ 'circle': 50
15
+ };
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.spacing = void 0;
7
+ var _utils = require("../utils");
8
+ const baseSpacing = {
9
+ 'size-1': 4,
10
+ 'size-2': 8,
11
+ 'size-3': 12,
12
+ 'size-4': 16,
13
+ 'size-5': 24,
14
+ 'size-6': 32,
15
+ 'size-7': 40,
16
+ 'size-8': 48,
17
+ 'size-9': 56,
18
+ 'size-10': 64
19
+ };
20
+ const spacing = exports.spacing = Object.fromEntries(Object.entries(baseSpacing).map(([key, value]) => [key, _utils.isTablet ? value + 8 : value]));
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.weights = exports.sizes = void 0;
7
+ var _reactNative = require("react-native");
8
+ const {
9
+ width
10
+ } = _reactNative.Dimensions.get("window");
11
+ const baseSizes = {
12
+ xxs: 10,
13
+ xs: 12,
14
+ s: 14,
15
+ m: 16,
16
+ l: 18,
17
+ xl: 20,
18
+ xxl: 24,
19
+ xxxl: 28,
20
+ xxxxl: 32
21
+ };
22
+ const BASE_WIDTH = 440;
23
+ const rawScaleFactor = width / BASE_WIDTH;
24
+ const multiplier = rawScaleFactor > 1 ? 1 + (rawScaleFactor - 1) * 0.3 : rawScaleFactor;
25
+ const fontScale = _reactNative.PixelRatio.getFontScale();
26
+ const sizes = exports.sizes = Object.fromEntries(Object.entries(baseSizes).map(([key, value]) => [key, Math.round(value * multiplier * fontScale)]));
27
+ const weights = exports.weights = {
28
+ light: '300',
29
+ regular: '400',
30
+ medium: '500',
31
+ semibold: '600',
32
+ bold: '700'
33
+ };
package/lib/index.js ADDED
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ var _constants = require("./constants/");
7
+ Object.keys(_constants).forEach(function (key) {
8
+ if (key === "default" || key === "__esModule") return;
9
+ if (key in exports && exports[key] === _constants[key]) return;
10
+ Object.defineProperty(exports, key, {
11
+ enumerable: true,
12
+ get: function () {
13
+ return _constants[key];
14
+ }
15
+ });
16
+ });
17
+ var _utils = require("./utils/");
18
+ Object.keys(_utils).forEach(function (key) {
19
+ if (key === "default" || key === "__esModule") return;
20
+ if (key in exports && exports[key] === _utils[key]) return;
21
+ Object.defineProperty(exports, key, {
22
+ enumerable: true,
23
+ get: function () {
24
+ return _utils[key];
25
+ }
26
+ });
27
+ });
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.isTablet = void 0;
7
+ var _reactNative = require("react-native");
8
+ const windowWidth = _reactNative.Dimensions.get("window").width;
9
+ const isTablet = exports.isTablet = windowWidth >= 768;
package/package.json ADDED
@@ -0,0 +1,33 @@
1
+ {
2
+ "name": "@dropi/react-native-design-system",
3
+ "version": "0.1.0",
4
+ "description": "A React Native package built from scratch",
5
+ "main": "lib/index.js",
6
+ "types": "lib/index.d.ts",
7
+ "files": [
8
+ "lib"
9
+ ],
10
+ "scripts": {
11
+ "build": "babel src --extensions '.ts,.tsx,' --out-dir lib",
12
+ "prepare": "npm run build"
13
+ },
14
+ "keywords": [
15
+ "react-native",
16
+ "react",
17
+ "component",
18
+ "library"
19
+ ],
20
+ "license": "MIT",
21
+ "peerDependencies": {
22
+ "react": ">=19.0.0",
23
+ "react-native": ">=0.79.5"
24
+ },
25
+ "devDependencies": {
26
+ "@babel/cli": "^7.28.3",
27
+ "@babel/core": "^7.28.5",
28
+ "@babel/preset-env": "^7.28.5",
29
+ "@babel/preset-react": "^7.28.5",
30
+ "@babel/preset-typescript": "^7.28.5",
31
+ "typescript": "^5.6.0"
32
+ }
33
+ }