@trafilea/afrodita-components 5.0.0 → 6.0.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.
@@ -1,5 +1,11 @@
1
1
  import { CSSProperties } from 'react';
2
- import { ComponentSize } from 'src/types/enums';
2
+
3
+ declare enum ComponentSize {
4
+ Large = "large",
5
+ Medium = "medium",
6
+ Small = "small",
7
+ XSmall = "xsmall"
8
+ }
3
9
 
4
10
  declare type Theme = {
5
11
  name: string;
@@ -22,6 +28,7 @@ declare type Theme = {
22
28
  };
23
29
  declare type ThemeBreakpoints = {
24
30
  mobile: number;
31
+ tablet?: number;
25
32
  desktop: number;
26
33
  };
27
34
  declare type ThemeBasicPallete = {
@@ -29,7 +36,7 @@ declare type ThemeBasicPallete = {
29
36
  contrast: string;
30
37
  };
31
38
  declare type ThemeColorPallete = ThemeBasicPallete & {
32
- soft: ThemeBasicPallete;
39
+ soft?: ThemeBasicPallete;
33
40
  };
34
41
  declare type ThemeColorPrimaryPallete = ThemeColorPallete & {
35
42
  20: ThemeColorPallete;
@@ -41,6 +48,7 @@ declare type ThemeColors = {
41
48
  pallete: {
42
49
  primary: ThemeColorPrimaryPallete;
43
50
  secondary: ThemeColorPrimaryPallete;
51
+ tertiary?: ThemeColorPrimaryPallete;
44
52
  } & Partial<Record<string, ThemeColorPallete>>;
45
53
  shades: {
46
54
  black: ThemeBasicPallete;
@@ -50,6 +58,7 @@ declare type ThemeColors = {
50
58
  50: ThemeBasicPallete;
51
59
  100: ThemeBasicPallete;
52
60
  150: ThemeBasicPallete;
61
+ 175: ThemeBasicPallete;
53
62
  200: ThemeBasicPallete;
54
63
  250: ThemeBasicPallete;
55
64
  300: ThemeBasicPallete;
@@ -78,6 +87,8 @@ declare type ThemeColors = {
78
87
  color: string;
79
88
  disabled: string;
80
89
  highlight: string;
90
+ shadow?: string;
91
+ isChecked?: string;
81
92
  };
82
93
  background: {
83
94
  color: string;
@@ -384,12 +395,20 @@ declare type ThemeComponent = {
384
395
  fontWeight: number;
385
396
  lineHeight: string;
386
397
  padding: string;
398
+ optionPadding: string;
387
399
  color: string;
388
400
  fill: string;
401
+ borderWidth?: string;
389
402
  options: {
390
403
  borderColor: string;
391
404
  color: string;
392
405
  borderRadius: string;
406
+ borderRadiusV2?: string;
407
+ backgroundColor?: string;
408
+ };
409
+ optionsWrapper: {
410
+ borderRadius: string;
411
+ overflow: string;
393
412
  };
394
413
  };
395
414
  modal: {
@@ -496,11 +515,7 @@ declare type ThemeComponent = {
496
515
  alignSelf?: string;
497
516
  };
498
517
  savings: {
499
- textFontSize: string;
500
- textLineHeight: string;
501
- amountFontSize: string;
502
518
  amountFontWeight: number;
503
- amountLineHeight: string;
504
519
  color?: string;
505
520
  };
506
521
  };
@@ -520,15 +535,35 @@ declare type ThemeComponent = {
520
535
  size: ComponentSize.Small | ComponentSize.Medium | ComponentSize.Large;
521
536
  originalPriceColor: string;
522
537
  actualPriceColor: string;
538
+ defaultFontSize?: {
539
+ large: string;
540
+ medium: string;
541
+ small: string;
542
+ };
543
+ smallFontSize?: {
544
+ large: string;
545
+ medium: string;
546
+ small: string;
547
+ };
548
+ largeFontSize?: {
549
+ large: string;
550
+ medium: string;
551
+ small: string;
552
+ };
553
+ discountFontSize?: {
554
+ large: string;
555
+ medium: string;
556
+ small: string;
557
+ };
523
558
  };
524
559
  };
525
560
  };
526
561
  orderSummary: {
527
562
  headingTextAlign: string;
528
- backgroundColor: string;
529
- maxWidth?: string;
563
+ backgroundColor?: string;
530
564
  padding?: string;
531
565
  borderRadius?: string;
566
+ maxWidth?: string;
532
567
  onMobile: {
533
568
  maxWidth?: string;
534
569
  padding?: string;
@@ -536,9 +571,9 @@ declare type ThemeComponent = {
536
571
  };
537
572
  };
538
573
  expressCheckout: {
539
- fontFamily: string;
540
- fontWeight: number;
541
- lineHeight: string;
574
+ button: {
575
+ borderRadius: string;
576
+ };
542
577
  };
543
578
  copyrightText: {
544
579
  fontSize: string;
@@ -546,24 +581,126 @@ declare type ThemeComponent = {
546
581
  lineHeight: string;
547
582
  color: string;
548
583
  };
584
+ thankyouFooterText: {
585
+ fontSize: string;
586
+ fontWeight: string;
587
+ lineHeight: string;
588
+ };
549
589
  textButton: {
550
590
  fontWeight: number;
551
591
  lineHeight: string;
552
592
  };
553
593
  deliveryDetails: {
594
+ title: {
595
+ fontSize: string;
596
+ lineHeight: string;
597
+ fontWeight: number;
598
+ };
554
599
  note: {
555
600
  accentColor: string;
556
601
  color: string;
557
602
  backgroundColor: string;
558
603
  };
559
- SectionDetails?: {
560
- marginLeft: string;
604
+ sectionTitle: {
605
+ fontSize: string;
606
+ lineHeight: string;
607
+ fontWeight: number;
608
+ };
609
+ sectionDetails: {
610
+ fontSize: string;
611
+ lineHeight: string;
612
+ fontWeight: number;
613
+ marginLeft?: string;
561
614
  };
562
615
  };
563
616
  text: {
564
617
  orderHeader: {
565
618
  color: string;
566
619
  };
620
+ fitGuarantee: {
621
+ titleFontSize?: string;
622
+ titleFontWeight?: number | string;
623
+ fontWeight: number | string;
624
+ };
625
+ offerBanner: {
626
+ borderRadius: string;
627
+ };
628
+ };
629
+ orderBar: {
630
+ backgroundColor: string;
631
+ fontColor: string;
632
+ };
633
+ banner: {
634
+ outlineColor: string;
635
+ filledColor: string;
636
+ fontColor: string;
637
+ };
638
+ offerTitleText: {
639
+ size: string;
640
+ weight: number;
641
+ lineHeight: string;
642
+ };
643
+ linePrice: {
644
+ color: string;
645
+ badge: {
646
+ color: string;
647
+ borderRadius: string;
648
+ };
649
+ };
650
+ divider: {
651
+ color: string;
652
+ };
653
+ checkout: {
654
+ paymentInformation: {
655
+ borderRadius?: string;
656
+ };
657
+ creditCardSection: {
658
+ borderRadius?: string;
659
+ };
660
+ };
661
+ upsell: {
662
+ banner: {
663
+ outlined: {
664
+ color?: string;
665
+ };
666
+ };
667
+ price: {
668
+ colors: {
669
+ regular: string;
670
+ deal: string;
671
+ each: string;
672
+ badgeBG: string;
673
+ badgeColor: string;
674
+ };
675
+ };
676
+ hurryTimeCard: {
677
+ backgroundColor: string;
678
+ };
679
+ guaranteedFit?: {
680
+ backgroundColor: string;
681
+ };
682
+ };
683
+ thankyou: {
684
+ orderBanner?: {
685
+ text: {
686
+ left: string;
687
+ };
688
+ };
689
+ emailSection: {
690
+ backgroundColor?: string;
691
+ };
692
+ socialIcon: {
693
+ color?: string;
694
+ };
695
+ orderId: {
696
+ color: string;
697
+ };
698
+ };
699
+ hurryUp: {
700
+ borderRadius?: string;
701
+ };
702
+ qtyPicker: {
703
+ borderRadius: string;
567
704
  };
568
705
  };
569
706
  declare type ThemeTypography = {
@@ -588,6 +725,7 @@ declare type ThemeFonts = {
588
725
  }>;
589
726
  };
590
727
  declare type ThemeAssets = {
728
+ cdn: string;
591
729
  images: {
592
730
  favicon: string;
593
731
  logo: string;
@@ -596,6 +734,21 @@ declare type ThemeAssets = {
596
734
  height: string;
597
735
  };
598
736
  logoMobile?: string;
737
+ checkoutLogo?: {
738
+ url: string;
739
+ width: string;
740
+ height: string;
741
+ };
742
+ upsellLogo?: {
743
+ url: string;
744
+ width: string;
745
+ height: string;
746
+ };
747
+ tyLogo?: {
748
+ url: string;
749
+ width: string;
750
+ height: string;
751
+ };
599
752
  };
600
753
  [key: string]: any;
601
754
  };
@@ -129,6 +129,7 @@ var truekind = {
129
129
  50: { color: '#efefef', contrast: '--colors-shades-700-color' },
130
130
  100: { color: '#e5e5e5', contrast: '--colors-shades-700-color' },
131
131
  150: { color: '#d1d1d1', contrast: '--colors-shades-700-color' },
132
+ 175: { color: '#c4c4c4', contrast: '--colors-shades-700-color' },
132
133
  200: { color: '#bbbbbb', contrast: '--colors-shades-700-color' },
133
134
  250: { color: '#a6a6a6', contrast: '--colors-shades-700-color' },
134
135
  300: { color: '#9e9e9e', contrast: '--colors-shades-700-color' },
@@ -148,10 +149,10 @@ var truekind = {
148
149
  990: { color: '#0b0b0b', contrast: '--colors-shades-white-color' },
149
150
  },
150
151
  semantic: {
151
- positive: { color: '#2579C8', contrast: '--colors-shades-white-color' },
152
- urgent: { color: '#D82A2D', contrast: '--colors-shades-white-color' },
153
- attention: { color: '#FFA877', contrast: '--colors-shades-700-color' },
154
- informative: { color: '#686872', contrast: '--colors-shades-white-color' },
152
+ positive: { color: '#2f806a', contrast: '--colors-shades-white-color' },
153
+ urgent: { color: '#c64844', contrast: '--colors-shades-white-color' },
154
+ attention: { color: '#f2d96f', contrast: '--colors-shades-700-color' },
155
+ informative: { color: '#0a609b', contrast: '--colors-shades-700-color' },
155
156
  },
156
157
  border: {
157
158
  color: '',
@@ -221,6 +222,14 @@ var truekind = {
221
222
  fontSize: 18,
222
223
  lineHeight: '28px',
223
224
  },
225
+ heading7: {
226
+ fontSize: 20,
227
+ lineHeight: '28px',
228
+ },
229
+ heading8: {
230
+ fontSize: 18,
231
+ lineHeight: '28px',
232
+ },
224
233
  'body-regular': {
225
234
  fontSize: 16,
226
235
  lineHeight: '24px',
@@ -301,16 +310,16 @@ var truekind = {
301
310
  minHeight: 'unset',
302
311
  size: {
303
312
  small: {
304
- fontSize: '1rem',
305
- padding: '0.75rem 3rem',
313
+ fontSize: '0.75rem',
314
+ padding: '0.25rem 2rem',
306
315
  },
307
316
  medium: {
308
317
  fontSize: '0.875rem',
309
- padding: '0.5rem 2.5rem',
318
+ padding: '0.688rem 2rem',
310
319
  },
311
320
  large: {
312
- fontSize: '0.75rem',
313
- padding: '0.25rem 2rem',
321
+ fontSize: '1rem',
322
+ padding: '0.75rem 3rem',
314
323
  },
315
324
  },
316
325
  primary: {
@@ -519,14 +528,14 @@ var truekind = {
519
528
  },
520
529
  },
521
530
  small: {
522
- width: '1.5rem',
523
- height: '1.5rem',
531
+ width: '0.875rem',
532
+ height: '0.875rem',
524
533
  borderRadius: '0.25rem',
525
534
  borderWidth: '0.094rem',
526
535
  margin: '0.375rem',
527
536
  icon: {
528
- width: '0.875rem',
529
- height: '0.625rem',
537
+ width: '0.5rem',
538
+ height: '0.375rem',
530
539
  },
531
540
  },
532
541
  },
@@ -586,12 +595,18 @@ var truekind = {
586
595
  fontWeight: 600,
587
596
  lineHeight: '1.125rem',
588
597
  padding: '0.5rem 0.75rem 0.5rem 1rem',
598
+ optionPadding: '0.75rem 1rem 0.625rem 0.75rem',
589
599
  color: '#292929',
590
600
  fill: '#292929',
591
601
  options: {
592
602
  borderColor: '#8BBEEA',
593
603
  color: '#292929',
594
- borderRadius: '0.5rem',
604
+ borderRadius: '1.25rem',
605
+ borderRadiusV2: 'unset',
606
+ },
607
+ optionsWrapper: {
608
+ borderRadius: '1.25rem',
609
+ overflow: 'hidden',
595
610
  },
596
611
  },
597
612
  modal: {
@@ -698,11 +713,7 @@ var truekind = {
698
713
  alignSelf: 'flex-end',
699
714
  },
700
715
  savings: {
701
- textFontSize: '16px',
702
- textLineHeight: '24px',
703
- amountFontSize: '16px',
704
716
  amountFontWeight: 600,
705
- amountLineHeight: '24px',
706
717
  color: '--colors-semantic-positive-color',
707
718
  },
708
719
  },
@@ -726,20 +737,20 @@ var truekind = {
726
737
  },
727
738
  },
728
739
  orderSummary: {
729
- headingTextAlign: 'left',
730
- backgroundColor: '--colors-shades-5-color',
731
- padding: '',
732
- borderRadius: '',
733
- maxWidth: '460px',
740
+ headingTextAlign: 'center',
741
+ backgroundColor: '--colors-shades-10-color',
742
+ padding: '20px',
743
+ borderRadius: '--radius-regular',
744
+ maxWidth: '100%',
734
745
  onMobile: {
735
746
  maxWidth: '100%',
736
747
  padding: '15px',
737
748
  },
738
749
  },
739
750
  expressCheckout: {
740
- fontFamily: '-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica,Arial, sans-serif',
741
- fontWeight: 500,
742
- lineHeight: '16px',
751
+ button: {
752
+ borderRadius: '24px',
753
+ },
743
754
  },
744
755
  copyrightText: {
745
756
  fontSize: '16px',
@@ -747,21 +758,123 @@ var truekind = {
747
758
  lineHeight: '24px',
748
759
  color: '--colors-pallete-secondary-color',
749
760
  },
761
+ thankyouFooterText: {
762
+ fontSize: '14px',
763
+ fontWeight: '700',
764
+ lineHeight: '20px',
765
+ },
750
766
  textButton: {
751
767
  fontWeight: 500,
752
768
  lineHeight: 'normal',
753
769
  },
754
770
  deliveryDetails: {
771
+ title: {
772
+ fontSize: '1.25rem',
773
+ lineHeight: '1.75rem',
774
+ fontWeight: 600,
775
+ },
776
+ sectionTitle: {
777
+ fontSize: '1.125rem',
778
+ lineHeight: '1.25rem',
779
+ fontWeight: 700,
780
+ },
755
781
  note: {
756
782
  accentColor: '--colors-semantic-urgent-color',
757
783
  color: '--colors-text-color',
758
784
  backgroundColor: '--colors-pallete-primary-20-color',
759
785
  },
786
+ sectionDetails: {
787
+ fontSize: '1rem',
788
+ lineHeight: '1.25rem',
789
+ fontWeight: 400,
790
+ },
760
791
  },
761
792
  text: {
762
793
  orderHeader: {
763
794
  color: '--colors-pallete-primary-color',
764
795
  },
796
+ fitGuarantee: {
797
+ fontWeight: 200,
798
+ },
799
+ offerBanner: {
800
+ borderRadius: '1.25rem',
801
+ },
802
+ },
803
+ orderBar: {
804
+ backgroundColor: '#F7F4F2',
805
+ fontColor: '--colors-shades-700-color',
806
+ },
807
+ banner: {
808
+ outlineColor: '--colors-semantic-urgent-color',
809
+ filledColor: '--colors-semantic-urgent-color',
810
+ fontColor: '--colors-shades-white-color',
811
+ },
812
+ offerTitleText: {
813
+ size: '18px',
814
+ weight: 700,
815
+ lineHeight: '1.7rem',
816
+ },
817
+ linePrice: {
818
+ color: '--colors-semantic-urgent-color',
819
+ badge: {
820
+ color: '--colors-semantic-urgent-color',
821
+ borderRadius: '8px',
822
+ },
823
+ },
824
+ divider: {
825
+ color: '--colors-pallete-secondary-soft-color',
826
+ },
827
+ checkout: {
828
+ paymentInformation: {
829
+ borderRadius: '24px',
830
+ },
831
+ creditCardSection: {
832
+ borderRadius: '24px',
833
+ },
834
+ },
835
+ upsell: {
836
+ banner: {
837
+ outlined: {
838
+ color: '--colors-semantic-positive-color',
839
+ },
840
+ },
841
+ price: {
842
+ colors: {
843
+ regular: '--colors-shades-400-color',
844
+ deal: '--colors-pallete-primary-color',
845
+ each: '--colors-shades-700-color',
846
+ badgeBG: '--colors-pallete-primary-color',
847
+ badgeColor: '--colors-shades-white-color',
848
+ },
849
+ },
850
+ hurryTimeCard: {
851
+ backgroundColor: '#FCD7B8',
852
+ },
853
+ guaranteedFit: {
854
+ backgroundColor: '#FFF5E9',
855
+ },
856
+ },
857
+ thankyou: {
858
+ orderBanner: {
859
+ text: {
860
+ left: '53%',
861
+ },
862
+ },
863
+ emailSection: {
864
+ backgroundColor: '--colors-pallete-champagne-color',
865
+ },
866
+ socialIcon: {
867
+ color: '--colors-pallete-primary-color',
868
+ },
869
+ orderId: {
870
+ color: '--colors-shades-700-color',
871
+ },
872
+ },
873
+ hurryUp: {
874
+ borderRadius: '1.5rem',
875
+ },
876
+ qtyPicker: {
877
+ borderRadius: '1.125rem',
765
878
  },
766
879
  },
767
880
  fonts: {
@@ -886,12 +999,28 @@ var truekind = {
886
999
  ],
887
1000
  },
888
1001
  assets: {
1002
+ cdn: 'https://cdn.jsdelivr.net/gh/trafilea/storefront-static@1.3.1/common',
889
1003
  images: {
890
- favicon: 'https://cdn.shopify.com/s/files/1/2679/8624/files/shapermint_favicon-128x128.png',
891
- logo: 'https://cdn.jsdelivr.net/gh/trafilea/storefront-static@main/images/shapermint/shapermint_logo_black.svg',
1004
+ favicon: 'https://cdn.shopify.com/s/files/1/0450/0901/0853/files/1_32x.png',
1005
+ logo: 'https://cdn.jsdelivr.net/gh/trafilea/storefront-static@main/images/truekind/tkd_logo_checkout.svg',
892
1006
  logoSize: {
893
- width: '230',
894
- height: '46',
1007
+ width: '204',
1008
+ height: '35',
1009
+ },
1010
+ checkoutLogo: {
1011
+ url: 'https://cdn.jsdelivr.net/gh/trafilea/storefront-static@main/images/truekind/tkd_logo_checkout.svg',
1012
+ width: '204',
1013
+ height: '35',
1014
+ },
1015
+ upsellLogo: {
1016
+ url: 'https://cdn.jsdelivr.net/gh/trafilea/storefront-static@main/images/truekind/tkd_logo_checkout.svg',
1017
+ width: '210',
1018
+ height: '40',
1019
+ },
1020
+ tyLogo: {
1021
+ url: 'https://cdn.jsdelivr.net/gh/trafilea/storefront-static@main/images/truekind/tkd_logo_checkout.svg',
1022
+ width: '276',
1023
+ height: '50',
895
1024
  },
896
1025
  },
897
1026
  },
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",
6
+ "version": "6.0.0",
7
7
  "private": false,
8
8
  "main": "build/index.js",
9
9
  "style": "build/index.css",
@@ -35,7 +35,8 @@
35
35
  "build-storybook": "build-storybook",
36
36
  "chromatic": "npx chromatic --storybook-build-dir .\\\\storybook-static\\",
37
37
  "version:beta": "npm version prerelease --preid=beta",
38
- "ts-check": "tsc -p ."
38
+ "ts-check": "tsc -p .",
39
+ "lint": "npx lint-staged"
39
40
  },
40
41
  "eslintConfig": {
41
42
  "extends": [