@trafilea/afrodita-components 5.0.0-beta.25 → 5.0.0-beta.250

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.
@@ -1,4 +1,5 @@
1
1
  import { CSSProperties } from 'react';
2
+ import { ComponentSize } from 'src/types/enums';
2
3
 
3
4
  declare type Theme = {
4
5
  name: string;
@@ -21,6 +22,7 @@ declare type Theme = {
21
22
  };
22
23
  declare type ThemeBreakpoints = {
23
24
  mobile: number;
25
+ tablet?: number;
24
26
  desktop: number;
25
27
  };
26
28
  declare type ThemeBasicPallete = {
@@ -28,7 +30,7 @@ declare type ThemeBasicPallete = {
28
30
  contrast: string;
29
31
  };
30
32
  declare type ThemeColorPallete = ThemeBasicPallete & {
31
- soft: ThemeBasicPallete;
33
+ soft?: ThemeBasicPallete;
32
34
  };
33
35
  declare type ThemeColorPrimaryPallete = ThemeColorPallete & {
34
36
  20: ThemeColorPallete;
@@ -40,6 +42,7 @@ declare type ThemeColors = {
40
42
  pallete: {
41
43
  primary: ThemeColorPrimaryPallete;
42
44
  secondary: ThemeColorPrimaryPallete;
45
+ tertiary?: ThemeColorPrimaryPallete;
43
46
  } & Partial<Record<string, ThemeColorPallete>>;
44
47
  shades: {
45
48
  black: ThemeBasicPallete;
@@ -49,6 +52,7 @@ declare type ThemeColors = {
49
52
  50: ThemeBasicPallete;
50
53
  100: ThemeBasicPallete;
51
54
  150: ThemeBasicPallete;
55
+ 175: ThemeBasicPallete;
52
56
  200: ThemeBasicPallete;
53
57
  250: ThemeBasicPallete;
54
58
  300: ThemeBasicPallete;
@@ -77,6 +81,8 @@ declare type ThemeColors = {
77
81
  color: string;
78
82
  disabled: string;
79
83
  highlight: string;
84
+ shadow?: string;
85
+ isChecked?: string;
80
86
  };
81
87
  background: {
82
88
  color: string;
@@ -92,6 +98,10 @@ declare type ThemeComponent = {
92
98
  border: string;
93
99
  borderRadius: string;
94
100
  fontWeight: number;
101
+ lineHeight: string;
102
+ letterSpacing: string;
103
+ minWidth: string;
104
+ minHeight: string;
95
105
  size: {
96
106
  small: {
97
107
  fontSize: string;
@@ -138,6 +148,12 @@ declare type ThemeComponent = {
138
148
  lineHeight: string;
139
149
  border: string;
140
150
  boxShadow: string;
151
+ errorBorder: string;
152
+ };
153
+ inputPlaceholder: {
154
+ fontSize: string;
155
+ padding: string;
156
+ focusBorder: string;
141
157
  };
142
158
  inputCustom: {
143
159
  button: {
@@ -170,6 +186,12 @@ declare type ThemeComponent = {
170
186
  border: string;
171
187
  color: string;
172
188
  };
189
+ noStock: {
190
+ fontWeight: number;
191
+ background: string;
192
+ border: string;
193
+ color: string;
194
+ };
173
195
  disabled: {
174
196
  border: string;
175
197
  };
@@ -223,10 +245,13 @@ declare type ThemeComponent = {
223
245
  };
224
246
  card: {
225
247
  borderRadius: string;
248
+ backgroundColor: string;
226
249
  };
227
250
  radio: {
228
251
  borderColor: string;
229
252
  background: string;
253
+ textSize: string;
254
+ lineHeight: string;
230
255
  size: {
231
256
  small: {
232
257
  borderWidth: string;
@@ -255,6 +280,7 @@ declare type ThemeComponent = {
255
280
  };
256
281
  };
257
282
  label: {
283
+ color: string;
258
284
  fontSize: {
259
285
  small: string;
260
286
  medium: string;
@@ -363,11 +389,13 @@ declare type ThemeComponent = {
363
389
  fontWeight: number;
364
390
  lineHeight: string;
365
391
  padding: string;
392
+ optionPadding: string;
366
393
  color: string;
367
394
  fill: string;
368
395
  options: {
369
396
  borderColor: string;
370
397
  color: string;
398
+ borderRadius: string;
371
399
  };
372
400
  };
373
401
  modal: {
@@ -381,6 +409,180 @@ declare type ThemeComponent = {
381
409
  selectedContrast: string;
382
410
  tagColor: string;
383
411
  };
412
+ slideNavigation: {
413
+ slideDots: {
414
+ unselectedDotColor: string;
415
+ selectedDotColor: string;
416
+ dotsOpacity: number;
417
+ };
418
+ };
419
+ beforeAfter: {
420
+ size: {
421
+ small: {
422
+ image: {
423
+ minHeight: string;
424
+ minWidth: string;
425
+ mobile: {
426
+ minHeight: string;
427
+ minWidth: string;
428
+ };
429
+ };
430
+ imageContainer: {
431
+ maxWidth: string;
432
+ padding: string;
433
+ mobile: {
434
+ maxWidth: string;
435
+ };
436
+ };
437
+ userInfoText: {
438
+ fontSize: string;
439
+ mobile: {
440
+ fontSize: string;
441
+ };
442
+ };
443
+ };
444
+ medium: {
445
+ image: {
446
+ minHeight: string;
447
+ minWidth: string;
448
+ mobile: {
449
+ minHeight: string;
450
+ minWidth: string;
451
+ };
452
+ };
453
+ imageContainer: {
454
+ maxWidth: string;
455
+ padding: string;
456
+ mobile: {
457
+ maxWidth: string;
458
+ };
459
+ };
460
+ userInfoText: {
461
+ fontSize: string;
462
+ mobile: {
463
+ fontSize: string;
464
+ };
465
+ };
466
+ };
467
+ large: {
468
+ image: {
469
+ minHeight: string;
470
+ minWidth: string;
471
+ mobile: {
472
+ minHeight: string;
473
+ minWidth: string;
474
+ };
475
+ };
476
+ imageContainer: {
477
+ maxWidth: string;
478
+ padding: string;
479
+ mobile: {
480
+ maxWidth: string;
481
+ };
482
+ };
483
+ userInfoText: {
484
+ fontSize: string;
485
+ mobile: {
486
+ fontSize: string;
487
+ };
488
+ };
489
+ };
490
+ };
491
+ };
492
+ total: {
493
+ basicTotal: {
494
+ amount: {
495
+ color: string;
496
+ fontSize: string;
497
+ };
498
+ currency: {
499
+ color: string;
500
+ fontSize: string;
501
+ lineHeight: string;
502
+ alignSelf?: string;
503
+ };
504
+ savings: {
505
+ textFontSize: string;
506
+ textLineHeight: string;
507
+ amountFontSize: string;
508
+ amountFontWeight: number;
509
+ amountLineHeight: string;
510
+ color?: string;
511
+ };
512
+ };
513
+ };
514
+ subTotal: {
515
+ basicSubTotal: {
516
+ family: string;
517
+ size: string;
518
+ weight: number;
519
+ lineHeight: string;
520
+ color: string;
521
+ };
522
+ };
523
+ pricing: {
524
+ priceLabel: {
525
+ price: {
526
+ size: ComponentSize.Small | ComponentSize.Medium | ComponentSize.Large;
527
+ originalPriceColor: string;
528
+ actualPriceColor: string;
529
+ };
530
+ };
531
+ };
532
+ orderSummary: {
533
+ headingTextAlign: string;
534
+ backgroundColor: string;
535
+ maxWidth?: string;
536
+ padding?: string;
537
+ borderRadius?: string;
538
+ onMobile: {
539
+ maxWidth?: string;
540
+ padding?: string;
541
+ backgroundColor?: string;
542
+ };
543
+ };
544
+ expressCheckout: {
545
+ fontFamily: string;
546
+ fontWeight: number;
547
+ lineHeight: string;
548
+ button: {
549
+ borderRadius: string;
550
+ };
551
+ };
552
+ copyrightText: {
553
+ fontSize: string;
554
+ fontWeight: number;
555
+ lineHeight: string;
556
+ color: string;
557
+ };
558
+ textButton: {
559
+ fontWeight: number;
560
+ lineHeight: string;
561
+ };
562
+ deliveryDetails: {
563
+ title: {
564
+ fontSize: string;
565
+ lineHeight: string;
566
+ weight: number;
567
+ };
568
+ note: {
569
+ accentColor: string;
570
+ color: string;
571
+ backgroundColor: string;
572
+ };
573
+ SectionDetails?: {
574
+ marginLeft: string;
575
+ };
576
+ };
577
+ text: {
578
+ orderHeader: {
579
+ color: string;
580
+ };
581
+ };
582
+ orderBar: {
583
+ backgroundColor: string;
584
+ fontColor: string;
585
+ };
384
586
  };
385
587
  declare type ThemeTypography = {
386
588
  config: {
@@ -407,6 +609,26 @@ declare type ThemeAssets = {
407
609
  images: {
408
610
  favicon: string;
409
611
  logo: string;
612
+ logoSize?: {
613
+ width: string;
614
+ height: string;
615
+ };
616
+ logoMobile?: string;
617
+ checkoutLogo?: {
618
+ url: string;
619
+ width: string;
620
+ height: string;
621
+ };
622
+ upsellLogo?: {
623
+ url: string;
624
+ width: string;
625
+ height: string;
626
+ };
627
+ tyLogo?: {
628
+ url: string;
629
+ width: string;
630
+ height: string;
631
+ };
410
632
  };
411
633
  [key: string]: any;
412
634
  };
@@ -26,6 +26,32 @@ var __assign = function() {
26
26
  return __assign.apply(this, arguments);
27
27
  };
28
28
 
29
+ var CardSectionType;
30
+ (function (CardSectionType) {
31
+ CardSectionType[CardSectionType["Header"] = 0] = "Header";
32
+ CardSectionType[CardSectionType["Footer"] = 1] = "Footer";
33
+ })(CardSectionType || (CardSectionType = {}));
34
+ var ComponentSize;
35
+ (function (ComponentSize) {
36
+ ComponentSize["Large"] = "large";
37
+ ComponentSize["Medium"] = "medium";
38
+ ComponentSize["Small"] = "small";
39
+ ComponentSize["XSmall"] = "xsmall";
40
+ })(ComponentSize || (ComponentSize = {}));
41
+ var ComponentPosition;
42
+ (function (ComponentPosition) {
43
+ ComponentPosition[ComponentPosition["Top"] = 0] = "Top";
44
+ ComponentPosition[ComponentPosition["Bottom"] = 1] = "Bottom";
45
+ ComponentPosition[ComponentPosition["Left"] = 2] = "Left";
46
+ ComponentPosition[ComponentPosition["Right"] = 3] = "Right";
47
+ })(ComponentPosition || (ComponentPosition = {}));
48
+ var InputValidationType;
49
+ (function (InputValidationType) {
50
+ InputValidationType[InputValidationType["Error"] = 0] = "Error";
51
+ InputValidationType[InputValidationType["Valid"] = 1] = "Valid";
52
+ InputValidationType[InputValidationType["Empty"] = 2] = "Empty";
53
+ })(InputValidationType || (InputValidationType = {}));
54
+
29
55
  var truekind = {
30
56
  name: 'Truekind',
31
57
  fontSizes: [10, 12, 14, 16, 18, 20, 24, 30, 36, 42, 52, 60, 68, 72, 76],
@@ -103,6 +129,7 @@ var truekind = {
103
129
  50: { color: '#efefef', contrast: '--colors-shades-700-color' },
104
130
  100: { color: '#e5e5e5', contrast: '--colors-shades-700-color' },
105
131
  150: { color: '#d1d1d1', contrast: '--colors-shades-700-color' },
132
+ 175: { color: '#c4c4c4', contrast: '--colors-shades-700-color' },
106
133
  200: { color: '#bbbbbb', contrast: '--colors-shades-700-color' },
107
134
  250: { color: '#a6a6a6', contrast: '--colors-shades-700-color' },
108
135
  300: { color: '#9e9e9e', contrast: '--colors-shades-700-color' },
@@ -195,6 +222,14 @@ var truekind = {
195
222
  fontSize: 18,
196
223
  lineHeight: '28px',
197
224
  },
225
+ heading7: {
226
+ fontSize: 20,
227
+ lineHeight: '28px',
228
+ },
229
+ heading8: {
230
+ fontSize: 18,
231
+ lineHeight: '28px',
232
+ },
198
233
  'body-regular': {
199
234
  fontSize: 16,
200
235
  lineHeight: '24px',
@@ -269,6 +304,10 @@ var truekind = {
269
304
  border: 'none',
270
305
  borderRadius: '1.5rem',
271
306
  fontWeight: 700,
307
+ lineHeight: 'normal',
308
+ letterSpacing: 'normal',
309
+ minWidth: 'unset',
310
+ minHeight: 'unset',
272
311
  size: {
273
312
  small: {
274
313
  fontSize: '1rem',
@@ -315,6 +354,12 @@ var truekind = {
315
354
  lineHeight: '1.5rem',
316
355
  border: '0.063rem solid #BBBBBB',
317
356
  boxShadow: '0 0 0 0.25rem #D9EEFF',
357
+ errorBorder: '0.09375rem solid #d3373c',
358
+ },
359
+ inputPlaceholder: {
360
+ fontSize: '0.875rem',
361
+ padding: '1.125rem 0.9375rem 0 0.9375rem',
362
+ focusBorder: '0.09375rem solid #1990c6',
318
363
  },
319
364
  inputCustom: {
320
365
  button: {
@@ -347,6 +392,12 @@ var truekind = {
347
392
  border: 'none',
348
393
  color: '#FFFFFF',
349
394
  },
395
+ noStock: {
396
+ fontWeight: 600,
397
+ background: 'transparent',
398
+ border: '1px solid #3a3a3a4d',
399
+ color: '#3a3a3a4d',
400
+ },
350
401
  disabled: {
351
402
  border: '0.063rem solid #E5E5E5',
352
403
  },
@@ -400,10 +451,13 @@ var truekind = {
400
451
  },
401
452
  card: {
402
453
  borderRadius: '1.5rem',
454
+ backgroundColor: '#f7ece4',
403
455
  },
404
456
  radio: {
405
457
  borderColor: '#686872',
406
458
  background: '#FFFFFF',
459
+ textSize: '16px',
460
+ lineHeight: 'normal',
407
461
  size: {
408
462
  large: {
409
463
  borderWidth: '0.094rem',
@@ -432,6 +486,7 @@ var truekind = {
432
486
  },
433
487
  },
434
488
  label: {
489
+ color: '--colors-pallete-secondary-color',
435
490
  fontSize: {
436
491
  small: '0.625rem',
437
492
  medium: '0.75rem',
@@ -540,11 +595,13 @@ var truekind = {
540
595
  fontWeight: 600,
541
596
  lineHeight: '1.125rem',
542
597
  padding: '0.5rem 0.75rem 0.5rem 1rem',
598
+ optionPadding: '0.75rem 1rem 0.625rem 0.75rem',
543
599
  color: '#292929',
544
600
  fill: '#292929',
545
601
  options: {
546
602
  borderColor: '#8BBEEA',
547
603
  color: '#292929',
604
+ borderRadius: '0.5rem',
548
605
  },
549
606
  },
550
607
  modal: {
@@ -558,6 +615,176 @@ var truekind = {
558
615
  selectedContrast: '--colors-semantic-positive-contrast',
559
616
  tagColor: '--colors-semantic-attention-color',
560
617
  },
618
+ slideNavigation: {
619
+ slideDots: {
620
+ unselectedDotColor: '--colors-shades-700-color:',
621
+ selectedDotColor: '--colors-shades-white-color',
622
+ dotsOpacity: 0.6,
623
+ },
624
+ },
625
+ beforeAfter: {
626
+ size: {
627
+ small: {
628
+ image: {
629
+ minHeight: 'auto',
630
+ minWidth: '92px',
631
+ mobile: {
632
+ minHeight: '138px',
633
+ minWidth: '128px',
634
+ },
635
+ },
636
+ imageContainer: {
637
+ maxWidth: '214px',
638
+ padding: '12px',
639
+ mobile: {
640
+ maxWidth: '286px',
641
+ },
642
+ },
643
+ userInfoText: {
644
+ fontSize: '12px',
645
+ mobile: {
646
+ fontSize: '12px',
647
+ },
648
+ },
649
+ },
650
+ medium: {
651
+ image: {
652
+ minHeight: '200px',
653
+ minWidth: '187px',
654
+ mobile: {
655
+ minHeight: '157px',
656
+ minWidth: '150px',
657
+ },
658
+ },
659
+ imageContainer: {
660
+ maxWidth: '427px',
661
+ padding: '18px',
662
+ mobile: {
663
+ maxWidth: '342px',
664
+ },
665
+ },
666
+ userInfoText: {
667
+ fontSize: '18px',
668
+ mobile: {
669
+ fontSize: '14px',
670
+ },
671
+ },
672
+ },
673
+ large: {
674
+ image: {
675
+ minHeight: '200px',
676
+ minWidth: '187px',
677
+ mobile: {
678
+ minHeight: '157px',
679
+ minWidth: '150px',
680
+ },
681
+ },
682
+ imageContainer: {
683
+ maxWidth: '427px',
684
+ padding: '18px',
685
+ mobile: {
686
+ maxWidth: '342px',
687
+ },
688
+ },
689
+ userInfoText: {
690
+ fontSize: '18px',
691
+ mobile: {
692
+ fontSize: '14px',
693
+ },
694
+ },
695
+ },
696
+ },
697
+ },
698
+ total: {
699
+ basicTotal: {
700
+ amount: {
701
+ color: '--colors-shades-550-color',
702
+ fontSize: '24px',
703
+ },
704
+ currency: {
705
+ color: '--colors-shades-550-color',
706
+ fontSize: '14px',
707
+ lineHeight: '22px',
708
+ alignSelf: 'flex-end',
709
+ },
710
+ savings: {
711
+ textFontSize: '16px',
712
+ textLineHeight: '24px',
713
+ amountFontSize: '16px',
714
+ amountFontWeight: 600,
715
+ amountLineHeight: '24px',
716
+ color: '--colors-semantic-positive-color',
717
+ },
718
+ },
719
+ },
720
+ subTotal: {
721
+ basicSubTotal: {
722
+ family: 'Jost',
723
+ size: '14px',
724
+ weight: 600,
725
+ lineHeight: '22px',
726
+ color: '--colors-shades-550-color',
727
+ },
728
+ },
729
+ pricing: {
730
+ priceLabel: {
731
+ price: {
732
+ size: ComponentSize.Small,
733
+ originalPriceColor: '--colors-shades-300-color',
734
+ actualPriceColor: '--colors-semantic-urgent-color',
735
+ },
736
+ },
737
+ },
738
+ orderSummary: {
739
+ headingTextAlign: 'left',
740
+ backgroundColor: '--colors-shades-5-color',
741
+ padding: '',
742
+ borderRadius: '',
743
+ maxWidth: '460px',
744
+ onMobile: {
745
+ maxWidth: '100%',
746
+ padding: '15px',
747
+ },
748
+ },
749
+ expressCheckout: {
750
+ fontFamily: '-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica,Arial, sans-serif',
751
+ fontWeight: 500,
752
+ lineHeight: '16px',
753
+ button: {
754
+ borderRadius: '4px',
755
+ },
756
+ },
757
+ copyrightText: {
758
+ fontSize: '16px',
759
+ fontWeight: 400,
760
+ lineHeight: '24px',
761
+ color: '--colors-pallete-secondary-color',
762
+ },
763
+ textButton: {
764
+ fontWeight: 500,
765
+ lineHeight: 'normal',
766
+ },
767
+ deliveryDetails: {
768
+ title: {
769
+ fontSize: '1.125rem',
770
+ lineHeight: '1.75rem',
771
+ weight: 700,
772
+ },
773
+ note: {
774
+ accentColor: '--colors-semantic-urgent-color',
775
+ color: '--colors-text-color',
776
+ backgroundColor: '--colors-pallete-primary-20-color',
777
+ },
778
+ },
779
+ text: {
780
+ orderHeader: {
781
+ color: '--colors-pallete-primary-color',
782
+ },
783
+ },
784
+ orderBar: {
785
+ backgroundColor: '#dfefeb',
786
+ fontColor: '--colors-shades-700-color',
787
+ },
561
788
  },
562
789
  fonts: {
563
790
  url: 'https://cdn.jsdelivr.net/gh/trafilea/storefront-static@main/fonts/truekind',
@@ -684,6 +911,15 @@ var truekind = {
684
911
  images: {
685
912
  favicon: 'https://cdn.shopify.com/s/files/1/2679/8624/files/shapermint_favicon-128x128.png',
686
913
  logo: 'https://cdn.jsdelivr.net/gh/trafilea/storefront-static@main/images/shapermint/shapermint_logo_black.svg',
914
+ logoSize: {
915
+ width: '230',
916
+ height: '46',
917
+ },
918
+ upsellLogo: {
919
+ url: 'https://cdn.jsdelivr.net/gh/trafilea/storefront-static@main/images/shapermint/shapermint_logo_black.svg',
920
+ width: '210',
921
+ height: '40',
922
+ },
687
923
  },
688
924
  },
689
925
  };
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "Trafilea's Design System",
4
4
  "author": "Trafilea",
5
5
  "repository": "https://github.com/trafilea/afrodita-components",
6
- "version": "5.0.0-beta.25",
6
+ "version": "5.0.0-beta.250",
7
7
  "private": false,
8
8
  "main": "build/index.js",
9
9
  "style": "build/index.css",
@@ -13,13 +13,14 @@
13
13
  "build"
14
14
  ],
15
15
  "dependencies": {
16
- "@ant-design/react-slick": "^0.28.4",
16
+ "@ant-design/react-slick": "^0.29.2",
17
17
  "@emotion/react": "^11.4.0",
18
18
  "@emotion/styled": "^11.3.0",
19
19
  "@headlessui/react": "^1.4.0",
20
20
  "@ribeirolabs/events": "3.0.0",
21
21
  "facepaint": "^1.2.1",
22
22
  "html-react-parser": "1.4.8",
23
+ "react-inner-image-zoom": "^3.0.2",
23
24
  "react-swipeable": "6.2.0",
24
25
  "typescript": "^4.3.5"
25
26
  },
@@ -85,6 +86,7 @@
85
86
  "@types/node": "^12.20.17",
86
87
  "@types/react": "^17.0.15",
87
88
  "@types/react-dom": "^17.0.9",
89
+ "@types/react-inner-image-zoom": "^3.0.0",
88
90
  "@types/react-slick": "^0.23.7",
89
91
  "chromatic": "^5.9.2",
90
92
  "eslint": "^7.31.0",