@wecareu/icons 1.0.6 → 1.0.7
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/dist/index.js +58 -43
- package/dist/index.mjs +58 -43
- package/package.json +1 -1
- package/src/Icon.tsx +17 -9
package/dist/index.js
CHANGED
|
@@ -323,13 +323,20 @@ var fontSizes = {
|
|
|
323
323
|
display: 32
|
|
324
324
|
};
|
|
325
325
|
var lineHeights = {
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
326
|
+
displayLarge: 38,
|
|
327
|
+
displayMedium: 29,
|
|
328
|
+
headingLarge: 28,
|
|
329
|
+
headingMedium: 25,
|
|
330
|
+
headingSmall: 22,
|
|
331
|
+
bodyLarge: 29,
|
|
332
|
+
bodyMedium: 22,
|
|
333
|
+
bodySmall: 20,
|
|
334
|
+
labelLarge: 22,
|
|
335
|
+
labelMedium: 20,
|
|
336
|
+
labelSmall: 17,
|
|
337
|
+
buttonLarge: 22,
|
|
338
|
+
buttonMedium: 20,
|
|
339
|
+
caption: 17
|
|
333
340
|
};
|
|
334
341
|
var fontWeights = {
|
|
335
342
|
regular: "400",
|
|
@@ -341,86 +348,86 @@ var textStyles = {
|
|
|
341
348
|
displayLarge: {
|
|
342
349
|
fontFamily: fontFamilies.bold,
|
|
343
350
|
fontSize: fontSizes.huge,
|
|
344
|
-
|
|
345
|
-
|
|
351
|
+
fontWeight: fontWeights.bold,
|
|
352
|
+
lineHeight: lineHeights.displayLarge
|
|
346
353
|
},
|
|
347
354
|
displayMedium: {
|
|
348
355
|
fontFamily: fontFamilies.bold,
|
|
349
356
|
fontSize: fontSizes.heading,
|
|
350
|
-
|
|
351
|
-
|
|
357
|
+
fontWeight: fontWeights.bold,
|
|
358
|
+
lineHeight: lineHeights.displayMedium
|
|
352
359
|
},
|
|
353
360
|
headingLarge: {
|
|
354
361
|
fontFamily: fontFamilies.bold,
|
|
355
362
|
fontSize: fontSizes.title,
|
|
356
|
-
|
|
357
|
-
|
|
363
|
+
fontWeight: fontWeights.bold,
|
|
364
|
+
lineHeight: lineHeights.headingLarge
|
|
358
365
|
},
|
|
359
366
|
headingMedium: {
|
|
360
367
|
fontFamily: fontFamilies.semibold,
|
|
361
368
|
fontSize: fontSizes.subtitle,
|
|
362
|
-
|
|
363
|
-
|
|
369
|
+
fontWeight: fontWeights.semibold,
|
|
370
|
+
lineHeight: lineHeights.headingMedium
|
|
364
371
|
},
|
|
365
372
|
headingSmall: {
|
|
366
373
|
fontFamily: fontFamilies.semibold,
|
|
367
374
|
fontSize: fontSizes.md,
|
|
368
|
-
|
|
369
|
-
|
|
375
|
+
fontWeight: fontWeights.semibold,
|
|
376
|
+
lineHeight: lineHeights.headingSmall
|
|
370
377
|
},
|
|
371
378
|
bodyLarge: {
|
|
372
379
|
fontFamily: fontFamilies.regular,
|
|
373
380
|
fontSize: fontSizes.lg,
|
|
374
|
-
|
|
375
|
-
|
|
381
|
+
fontWeight: fontWeights.regular,
|
|
382
|
+
lineHeight: lineHeights.bodyLarge
|
|
376
383
|
},
|
|
377
384
|
bodyMedium: {
|
|
378
385
|
fontFamily: fontFamilies.regular,
|
|
379
386
|
fontSize: fontSizes.body,
|
|
380
|
-
|
|
381
|
-
|
|
387
|
+
fontWeight: fontWeights.regular,
|
|
388
|
+
lineHeight: lineHeights.bodyMedium
|
|
382
389
|
},
|
|
383
390
|
bodySmall: {
|
|
384
391
|
fontFamily: fontFamilies.regular,
|
|
385
392
|
fontSize: fontSizes.sm,
|
|
386
|
-
|
|
387
|
-
|
|
393
|
+
fontWeight: fontWeights.regular,
|
|
394
|
+
lineHeight: lineHeights.bodySmall
|
|
388
395
|
},
|
|
389
396
|
labelLarge: {
|
|
390
397
|
fontFamily: fontFamilies.semibold,
|
|
391
398
|
fontSize: fontSizes.md,
|
|
392
|
-
|
|
393
|
-
|
|
399
|
+
fontWeight: fontWeights.semibold,
|
|
400
|
+
lineHeight: lineHeights.labelLarge
|
|
394
401
|
},
|
|
395
402
|
labelMedium: {
|
|
396
403
|
fontFamily: fontFamilies.semibold,
|
|
397
404
|
fontSize: fontSizes.sm,
|
|
398
|
-
|
|
399
|
-
|
|
405
|
+
fontWeight: fontWeights.semibold,
|
|
406
|
+
lineHeight: lineHeights.labelMedium
|
|
400
407
|
},
|
|
401
408
|
labelSmall: {
|
|
402
409
|
fontFamily: fontFamilies.regular,
|
|
403
410
|
fontSize: fontSizes.xs,
|
|
404
|
-
|
|
405
|
-
|
|
411
|
+
fontWeight: fontWeights.regular,
|
|
412
|
+
lineHeight: lineHeights.labelSmall
|
|
406
413
|
},
|
|
407
414
|
buttonLarge: {
|
|
408
415
|
fontFamily: fontFamilies.semibold,
|
|
409
416
|
fontSize: fontSizes.md,
|
|
410
|
-
|
|
411
|
-
|
|
417
|
+
fontWeight: fontWeights.semibold,
|
|
418
|
+
lineHeight: lineHeights.buttonLarge
|
|
412
419
|
},
|
|
413
420
|
buttonMedium: {
|
|
414
421
|
fontFamily: fontFamilies.semibold,
|
|
415
422
|
fontSize: fontSizes.sm,
|
|
416
|
-
|
|
417
|
-
|
|
423
|
+
fontWeight: fontWeights.semibold,
|
|
424
|
+
lineHeight: lineHeights.buttonMedium
|
|
418
425
|
},
|
|
419
426
|
caption: {
|
|
420
427
|
fontFamily: fontFamilies.regular,
|
|
421
428
|
fontSize: fontSizes.caption,
|
|
422
|
-
|
|
423
|
-
|
|
429
|
+
fontWeight: fontWeights.regular,
|
|
430
|
+
lineHeight: lineHeights.caption
|
|
424
431
|
}
|
|
425
432
|
};
|
|
426
433
|
var spacing = {
|
|
@@ -1238,16 +1245,24 @@ var import_jsx_runtime70 = require("react/jsx-runtime");
|
|
|
1238
1245
|
var Icon = ({ name, size, color, testID = "icon", ...rest }) => {
|
|
1239
1246
|
const theme = useTheme();
|
|
1240
1247
|
const Cmp = ICONS[name];
|
|
1241
|
-
const
|
|
1248
|
+
const { fill: fillProp, stroke: strokeProp, ...svgRest } = rest;
|
|
1249
|
+
const iconColor = color || strokeProp || theme.colors.text.primary || "#000000";
|
|
1250
|
+
const dimensions = {};
|
|
1242
1251
|
if (size != null) {
|
|
1243
|
-
|
|
1244
|
-
|
|
1252
|
+
dimensions.height = size;
|
|
1253
|
+
dimensions.width = size;
|
|
1245
1254
|
}
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1255
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
1256
|
+
Cmp,
|
|
1257
|
+
{
|
|
1258
|
+
...dimensions,
|
|
1259
|
+
color: iconColor,
|
|
1260
|
+
fill: fillProp ?? "none",
|
|
1261
|
+
stroke: strokeProp ?? iconColor,
|
|
1262
|
+
testID,
|
|
1263
|
+
...svgRest
|
|
1264
|
+
}
|
|
1265
|
+
);
|
|
1251
1266
|
};
|
|
1252
1267
|
|
|
1253
1268
|
// src/assets/lottie/dots.json
|
package/dist/index.mjs
CHANGED
|
@@ -287,13 +287,20 @@ var fontSizes = {
|
|
|
287
287
|
display: 32
|
|
288
288
|
};
|
|
289
289
|
var lineHeights = {
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
290
|
+
displayLarge: 38,
|
|
291
|
+
displayMedium: 29,
|
|
292
|
+
headingLarge: 28,
|
|
293
|
+
headingMedium: 25,
|
|
294
|
+
headingSmall: 22,
|
|
295
|
+
bodyLarge: 29,
|
|
296
|
+
bodyMedium: 22,
|
|
297
|
+
bodySmall: 20,
|
|
298
|
+
labelLarge: 22,
|
|
299
|
+
labelMedium: 20,
|
|
300
|
+
labelSmall: 17,
|
|
301
|
+
buttonLarge: 22,
|
|
302
|
+
buttonMedium: 20,
|
|
303
|
+
caption: 17
|
|
297
304
|
};
|
|
298
305
|
var fontWeights = {
|
|
299
306
|
regular: "400",
|
|
@@ -305,86 +312,86 @@ var textStyles = {
|
|
|
305
312
|
displayLarge: {
|
|
306
313
|
fontFamily: fontFamilies.bold,
|
|
307
314
|
fontSize: fontSizes.huge,
|
|
308
|
-
|
|
309
|
-
|
|
315
|
+
fontWeight: fontWeights.bold,
|
|
316
|
+
lineHeight: lineHeights.displayLarge
|
|
310
317
|
},
|
|
311
318
|
displayMedium: {
|
|
312
319
|
fontFamily: fontFamilies.bold,
|
|
313
320
|
fontSize: fontSizes.heading,
|
|
314
|
-
|
|
315
|
-
|
|
321
|
+
fontWeight: fontWeights.bold,
|
|
322
|
+
lineHeight: lineHeights.displayMedium
|
|
316
323
|
},
|
|
317
324
|
headingLarge: {
|
|
318
325
|
fontFamily: fontFamilies.bold,
|
|
319
326
|
fontSize: fontSizes.title,
|
|
320
|
-
|
|
321
|
-
|
|
327
|
+
fontWeight: fontWeights.bold,
|
|
328
|
+
lineHeight: lineHeights.headingLarge
|
|
322
329
|
},
|
|
323
330
|
headingMedium: {
|
|
324
331
|
fontFamily: fontFamilies.semibold,
|
|
325
332
|
fontSize: fontSizes.subtitle,
|
|
326
|
-
|
|
327
|
-
|
|
333
|
+
fontWeight: fontWeights.semibold,
|
|
334
|
+
lineHeight: lineHeights.headingMedium
|
|
328
335
|
},
|
|
329
336
|
headingSmall: {
|
|
330
337
|
fontFamily: fontFamilies.semibold,
|
|
331
338
|
fontSize: fontSizes.md,
|
|
332
|
-
|
|
333
|
-
|
|
339
|
+
fontWeight: fontWeights.semibold,
|
|
340
|
+
lineHeight: lineHeights.headingSmall
|
|
334
341
|
},
|
|
335
342
|
bodyLarge: {
|
|
336
343
|
fontFamily: fontFamilies.regular,
|
|
337
344
|
fontSize: fontSizes.lg,
|
|
338
|
-
|
|
339
|
-
|
|
345
|
+
fontWeight: fontWeights.regular,
|
|
346
|
+
lineHeight: lineHeights.bodyLarge
|
|
340
347
|
},
|
|
341
348
|
bodyMedium: {
|
|
342
349
|
fontFamily: fontFamilies.regular,
|
|
343
350
|
fontSize: fontSizes.body,
|
|
344
|
-
|
|
345
|
-
|
|
351
|
+
fontWeight: fontWeights.regular,
|
|
352
|
+
lineHeight: lineHeights.bodyMedium
|
|
346
353
|
},
|
|
347
354
|
bodySmall: {
|
|
348
355
|
fontFamily: fontFamilies.regular,
|
|
349
356
|
fontSize: fontSizes.sm,
|
|
350
|
-
|
|
351
|
-
|
|
357
|
+
fontWeight: fontWeights.regular,
|
|
358
|
+
lineHeight: lineHeights.bodySmall
|
|
352
359
|
},
|
|
353
360
|
labelLarge: {
|
|
354
361
|
fontFamily: fontFamilies.semibold,
|
|
355
362
|
fontSize: fontSizes.md,
|
|
356
|
-
|
|
357
|
-
|
|
363
|
+
fontWeight: fontWeights.semibold,
|
|
364
|
+
lineHeight: lineHeights.labelLarge
|
|
358
365
|
},
|
|
359
366
|
labelMedium: {
|
|
360
367
|
fontFamily: fontFamilies.semibold,
|
|
361
368
|
fontSize: fontSizes.sm,
|
|
362
|
-
|
|
363
|
-
|
|
369
|
+
fontWeight: fontWeights.semibold,
|
|
370
|
+
lineHeight: lineHeights.labelMedium
|
|
364
371
|
},
|
|
365
372
|
labelSmall: {
|
|
366
373
|
fontFamily: fontFamilies.regular,
|
|
367
374
|
fontSize: fontSizes.xs,
|
|
368
|
-
|
|
369
|
-
|
|
375
|
+
fontWeight: fontWeights.regular,
|
|
376
|
+
lineHeight: lineHeights.labelSmall
|
|
370
377
|
},
|
|
371
378
|
buttonLarge: {
|
|
372
379
|
fontFamily: fontFamilies.semibold,
|
|
373
380
|
fontSize: fontSizes.md,
|
|
374
|
-
|
|
375
|
-
|
|
381
|
+
fontWeight: fontWeights.semibold,
|
|
382
|
+
lineHeight: lineHeights.buttonLarge
|
|
376
383
|
},
|
|
377
384
|
buttonMedium: {
|
|
378
385
|
fontFamily: fontFamilies.semibold,
|
|
379
386
|
fontSize: fontSizes.sm,
|
|
380
|
-
|
|
381
|
-
|
|
387
|
+
fontWeight: fontWeights.semibold,
|
|
388
|
+
lineHeight: lineHeights.buttonMedium
|
|
382
389
|
},
|
|
383
390
|
caption: {
|
|
384
391
|
fontFamily: fontFamilies.regular,
|
|
385
392
|
fontSize: fontSizes.caption,
|
|
386
|
-
|
|
387
|
-
|
|
393
|
+
fontWeight: fontWeights.regular,
|
|
394
|
+
lineHeight: lineHeights.caption
|
|
388
395
|
}
|
|
389
396
|
};
|
|
390
397
|
var spacing = {
|
|
@@ -1202,16 +1209,24 @@ import { jsx as jsx70 } from "react/jsx-runtime";
|
|
|
1202
1209
|
var Icon = ({ name, size, color, testID = "icon", ...rest }) => {
|
|
1203
1210
|
const theme = useTheme();
|
|
1204
1211
|
const Cmp = ICONS[name];
|
|
1205
|
-
const
|
|
1212
|
+
const { fill: fillProp, stroke: strokeProp, ...svgRest } = rest;
|
|
1213
|
+
const iconColor = color || strokeProp || theme.colors.text.primary || "#000000";
|
|
1214
|
+
const dimensions = {};
|
|
1206
1215
|
if (size != null) {
|
|
1207
|
-
|
|
1208
|
-
|
|
1216
|
+
dimensions.height = size;
|
|
1217
|
+
dimensions.width = size;
|
|
1209
1218
|
}
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1219
|
+
return /* @__PURE__ */ jsx70(
|
|
1220
|
+
Cmp,
|
|
1221
|
+
{
|
|
1222
|
+
...dimensions,
|
|
1223
|
+
color: iconColor,
|
|
1224
|
+
fill: fillProp ?? "none",
|
|
1225
|
+
stroke: strokeProp ?? iconColor,
|
|
1226
|
+
testID,
|
|
1227
|
+
...svgRest
|
|
1228
|
+
}
|
|
1229
|
+
);
|
|
1215
1230
|
};
|
|
1216
1231
|
|
|
1217
1232
|
// src/index.tsx
|
package/package.json
CHANGED
package/src/Icon.tsx
CHANGED
|
@@ -13,18 +13,26 @@ export const Icon: React.FC<Props> = ({ name, size, color, testID = 'icon', ...r
|
|
|
13
13
|
const theme = useTheme();
|
|
14
14
|
const Cmp = ICONS[name];
|
|
15
15
|
|
|
16
|
-
const
|
|
16
|
+
const { fill: fillProp, stroke: strokeProp, ...svgRest } = rest;
|
|
17
|
+
|
|
18
|
+
const iconColor = color || strokeProp || theme.colors.text.primary || '#000000';
|
|
19
|
+
const dimensions: Pick<SvgProps, 'height' | 'width'> = {};
|
|
20
|
+
|
|
17
21
|
if (size != null) {
|
|
18
|
-
|
|
19
|
-
|
|
22
|
+
dimensions.height = size;
|
|
23
|
+
dimensions.width = size;
|
|
20
24
|
}
|
|
21
25
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
return (
|
|
27
|
+
<Cmp
|
|
28
|
+
{...dimensions}
|
|
29
|
+
color={iconColor}
|
|
30
|
+
fill={fillProp ?? 'none'}
|
|
31
|
+
stroke={strokeProp ?? iconColor}
|
|
32
|
+
testID={testID}
|
|
33
|
+
{...svgRest}
|
|
34
|
+
/>
|
|
35
|
+
);
|
|
28
36
|
};
|
|
29
37
|
|
|
30
38
|
export type { IconName };
|