@faststore/ui 2.0.61-alpha.0 → 2.0.63-alpha.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.
Files changed (38) hide show
  1. package/dist/index.d.ts +0 -4
  2. package/dist/index.js +0 -2
  3. package/dist/index.js.map +1 -1
  4. package/package.json +2 -2
  5. package/src/components/atoms/Button/styles.scss +8 -6
  6. package/src/components/molecules/ProductCard/styles.scss +209 -0
  7. package/src/components/molecules/Rating/styles.scss +8 -2
  8. package/src/components/organisms/PaymentMethods/styles.scss +63 -0
  9. package/src/index.ts +0 -16
  10. package/src/styles/components.scss +2 -0
  11. package/dist/components/molecules/PaymentMethods/PaymentMethods.d.ts +0 -26
  12. package/dist/components/molecules/PaymentMethods/PaymentMethods.js +0 -8
  13. package/dist/components/molecules/PaymentMethods/PaymentMethods.js.map +0 -1
  14. package/dist/components/molecules/PaymentMethods/index.d.ts +0 -2
  15. package/dist/components/molecules/PaymentMethods/index.js +0 -2
  16. package/dist/components/molecules/PaymentMethods/index.js.map +0 -1
  17. package/dist/components/molecules/ProductCard/ProductCard.d.ts +0 -11
  18. package/dist/components/molecules/ProductCard/ProductCard.js +0 -6
  19. package/dist/components/molecules/ProductCard/ProductCard.js.map +0 -1
  20. package/dist/components/molecules/ProductCard/ProductCardActions.d.ts +0 -10
  21. package/dist/components/molecules/ProductCard/ProductCardActions.js +0 -6
  22. package/dist/components/molecules/ProductCard/ProductCardActions.js.map +0 -1
  23. package/dist/components/molecules/ProductCard/ProductCardContent.d.ts +0 -10
  24. package/dist/components/molecules/ProductCard/ProductCardContent.js +0 -6
  25. package/dist/components/molecules/ProductCard/ProductCardContent.js.map +0 -1
  26. package/dist/components/molecules/ProductCard/ProductCardImage.d.ts +0 -10
  27. package/dist/components/molecules/ProductCard/ProductCardImage.js +0 -6
  28. package/dist/components/molecules/ProductCard/ProductCardImage.js.map +0 -1
  29. package/dist/components/molecules/ProductCard/index.d.ts +0 -8
  30. package/dist/components/molecules/ProductCard/index.js +0 -5
  31. package/dist/components/molecules/ProductCard/index.js.map +0 -1
  32. package/src/components/molecules/PaymentMethods/PaymentMethods.tsx +0 -57
  33. package/src/components/molecules/PaymentMethods/index.tsx +0 -2
  34. package/src/components/molecules/ProductCard/ProductCard.tsx +0 -28
  35. package/src/components/molecules/ProductCard/ProductCardActions.tsx +0 -30
  36. package/src/components/molecules/ProductCard/ProductCardContent.tsx +0 -29
  37. package/src/components/molecules/ProductCard/ProductCardImage.tsx +0 -29
  38. package/src/components/molecules/ProductCard/index.tsx +0 -11
package/dist/index.d.ts CHANGED
@@ -9,8 +9,6 @@ export { default as SkuSelector } from './components/molecules/SkuSelector';
9
9
  export type { SkuSelectorProps } from './components/molecules/SkuSelector';
10
10
  export { default as OrderSummary } from './components/molecules/OrderSummary';
11
11
  export type { OrderSummaryProps } from './components/molecules/OrderSummary';
12
- export { default as ProductCard, ProductCardImage, ProductCardContent, ProductCardActions, } from './components/molecules/ProductCard';
13
- export type { ProductCardProps, ProductCardImageProps, ProductCardContentProps, ProductCardActionsProps, } from './components/molecules/ProductCard';
14
12
  export { default as Card, CardImage, CardContent, CardActions, } from './components/molecules/Card';
15
13
  export type { CardProps, CardImageProps, CardContentProps, CardActionsProps, } from './components/molecules/Card';
16
14
  export { default as Bullets } from './components/molecules/Bullets';
@@ -21,8 +19,6 @@ export { default as Carousel } from './components/molecules/Carousel';
21
19
  export type { CarouselProps } from './components/molecules/Carousel';
22
20
  export { default as Banner, BannerContent, BannerImage, BannerLink, } from './components/molecules/Banner';
23
21
  export type { BannerProps, BannerContentProps, BannerImageProps, BannerLinkProps, } from './components/molecules/Banner';
24
- export { default as PaymentMethods } from './components/molecules/PaymentMethods';
25
- export type { PaymentMethodsProps } from './components/molecules/PaymentMethods';
26
22
  export { default as Breadcrumb } from './components/molecules/Breadcrumb';
27
23
  export type { BreadcrumbProps } from './components/molecules/Breadcrumb';
28
24
  export { default as Form } from './components/molecules/Form';
package/dist/index.js CHANGED
@@ -6,13 +6,11 @@ export { default as Incentive } from './components/atoms/Incentive';
6
6
  // Molecules
7
7
  export { default as SkuSelector } from './components/molecules/SkuSelector';
8
8
  export { default as OrderSummary } from './components/molecules/OrderSummary';
9
- export { default as ProductCard, ProductCardImage, ProductCardContent, ProductCardActions, } from './components/molecules/ProductCard';
10
9
  export { default as Card, CardImage, CardContent, CardActions, } from './components/molecules/Card';
11
10
  export { default as Bullets } from './components/molecules/Bullets';
12
11
  export { default as SearchInput } from './components/molecules/SearchInput';
13
12
  export { default as Carousel } from './components/molecules/Carousel';
14
13
  export { default as Banner, BannerContent, BannerImage, BannerLink, } from './components/molecules/Banner';
15
- export { default as PaymentMethods } from './components/molecules/PaymentMethods';
16
14
  export { default as Breadcrumb } from './components/molecules/Breadcrumb';
17
15
  export { default as Form } from './components/molecules/Form';
18
16
  // Organisms
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAA;AAErC,QAAQ;AACR,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAG/D,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,6BAA6B,CAAA;AAGjE,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,8BAA8B,CAAA;AAGnE,YAAY;AACZ,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,oCAAoC,CAAA;AAG3E,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,qCAAqC,CAAA;AAG7E,OAAO,EACL,OAAO,IAAI,WAAW,EACtB,gBAAgB,EAChB,kBAAkB,EAClB,kBAAkB,GACnB,MAAM,oCAAoC,CAAA;AAQ3C,OAAO,EACL,OAAO,IAAI,IAAI,EACf,SAAS,EACT,WAAW,EACX,WAAW,GACZ,MAAM,6BAA6B,CAAA;AAQpC,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,gCAAgC,CAAA;AAGnE,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,oCAAoC,CAAA;AAM3E,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,iCAAiC,CAAA;AAGrE,OAAO,EACL,OAAO,IAAI,MAAM,EACjB,aAAa,EACb,WAAW,EACX,UAAU,GACX,MAAM,+BAA+B,CAAA;AAQtC,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,uCAAuC,CAAA;AAGjF,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,mCAAmC,CAAA;AAGzE,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,6BAA6B,CAAA;AAG7D,YAAY;AACZ,OAAO,EACL,OAAO,IAAI,UAAU,EACrB,eAAe,EACf,iBAAiB,GAClB,MAAM,mCAAmC,CAAA;AAO1C,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,8BAA8B,CAAA;AAG1D,QAAQ;AACR,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,mBAAmB,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAA;AAErC,QAAQ;AACR,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAG/D,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,6BAA6B,CAAA;AAGjE,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,8BAA8B,CAAA;AAGnE,YAAY;AACZ,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,oCAAoC,CAAA;AAG3E,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,qCAAqC,CAAA;AAG7E,OAAO,EACL,OAAO,IAAI,IAAI,EACf,SAAS,EACT,WAAW,EACX,WAAW,GACZ,MAAM,6BAA6B,CAAA;AAQpC,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,gCAAgC,CAAA;AAGnE,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,oCAAoC,CAAA;AAM3E,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,iCAAiC,CAAA;AAGrE,OAAO,EACL,OAAO,IAAI,MAAM,EACjB,aAAa,EACb,WAAW,EACX,UAAU,GACX,MAAM,+BAA+B,CAAA;AAQtC,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,mCAAmC,CAAA;AAGzE,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,6BAA6B,CAAA;AAG7D,YAAY;AACZ,OAAO,EACL,OAAO,IAAI,UAAU,EACrB,eAAe,EACf,iBAAiB,GAClB,MAAM,mCAAmC,CAAA;AAO1C,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,8BAA8B,CAAA;AAG1D,QAAQ;AACR,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,mBAAmB,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@faststore/ui",
3
- "version": "2.0.61-alpha.0",
3
+ "version": "2.0.63-alpha.0",
4
4
  "description": "A lightweight, framework agnostic component library for React",
5
5
  "author": "emersonlaurentino",
6
6
  "license": "MIT",
@@ -59,5 +59,5 @@
59
59
  "node": "16.18.0",
60
60
  "yarn": "1.19.1"
61
61
  },
62
- "gitHead": "7cb1ceba4bdfd0495b1f9226fa640d476ba15810"
62
+ "gitHead": "2f3645ace573036dfa23787a46992432389e242c"
63
63
  }
@@ -102,6 +102,8 @@
102
102
  --fs-button-small-padding : var(--fs-spacing-0) var(--fs-spacing-1);
103
103
  --fs-button-small-min-height : var(--fs-spacing-5);
104
104
  --fs-button-small-gap : var(--fs-spacing-1);
105
+ --fs-button-small-icon-width : var(--fs-spacing-3);
106
+ --fs-button-small-icon-height : var(--fs-button-small-icon-width);
105
107
 
106
108
  // Icon
107
109
  --fs-button-icon-padding : 0 var(--fs-spacing-1);
@@ -127,12 +129,6 @@
127
129
  box-shadow: var(--fs-button-shadow);
128
130
  transition: var(--fs-button-transition-property) var(--fs-button-transition-timing) var(--fs-button-transition-function);
129
131
 
130
- [data-fs-icon] {
131
- display: flex;
132
- align-items: center;
133
- justify-content: center;
134
- }
135
-
136
132
  // --------------------------------------------------------
137
133
  // Variants Styles
138
134
  // --------------------------------------------------------
@@ -160,6 +156,12 @@
160
156
 
161
157
  column-gap: var(--fs-button-small-gap);
162
158
  padding: var(--fs-button-small-padding);
159
+
160
+ [data-fs-icon] {
161
+ width: var(--fs-button-small-icon-width);
162
+ height: var(--fs-button-small-icon-height);
163
+ }
164
+
163
165
  }
164
166
 
165
167
  &[data-fs-button-variant="primary"] {
@@ -0,0 +1,209 @@
1
+ [data-fs-product-card] {
2
+ // --------------------------------------------------------
3
+ // Design Tokens for Product Card
4
+ // --------------------------------------------------------
5
+
6
+ // Default properties
7
+ --fs-product-card-padding : var(--fs-spacing-1) var(--fs-spacing-1) var(--fs-spacing-2) var(--fs-spacing-1);
8
+ --fs-product-card-min-width : 10rem;
9
+ --fs-product-card-gap : var(--fs-spacing-2);
10
+
11
+ --fs-product-card-shadow : var(--fs-shadow);
12
+ --fs-product-card-shadow-hover : var(--fs-shadow-hover);
13
+
14
+ --fs-product-card-bkg-color : var(--fs-color-body-bkg);
15
+ --fs-product-card-bkg-color-hover : var(--fs-product-card-bkg-color);
16
+ --fs-product-card-bkg-color-focus : var(--fs-product-card-bkg-color-hover);
17
+
18
+ --fs-product-card-border-radius : var(--fs-border-radius);
19
+ --fs-product-card-border-width : var(--fs-border-width);
20
+ --fs-product-card-border-color : var(--fs-border-color-light);
21
+ --fs-product-card-border-color-hover : var(--fs-border-color-hover);
22
+
23
+ --fs-product-card-transition-function : var(--fs-transition-function);
24
+ --fs-product-card-transition-property : var(--fs-transition-property);
25
+ --fs-product-card-transition-timing : var(--fs-transition-timing);
26
+
27
+ // Image
28
+ --fs-product-card-img-radius : var(--fs-product-card-border-radius);
29
+ --fs-product-card-img-scale-hover : 1;
30
+
31
+ // Title
32
+ --fs-product-card-title-color : var(--fs-color-text);
33
+ --fs-product-card-title-size : var(--fs-text-size-base);
34
+ --fs-product-card-title-weight : var(--fs-text-weight-regular);
35
+ --fs-product-card-title-max-lines : var(--fs-text-max-lines);
36
+
37
+ // Price
38
+ --fs-product-card-price-gap : var(--fs-spacing-1);
39
+ --fs-product-card-price-color : var(--fs-color-text);
40
+ --fs-product-card-price-size : var(--fs-text-size-base);
41
+ --fs-product-card-price-listing-color : var(--fs-color-text-light);
42
+ --fs-product-card-price-listing-size : var(--fs-text-size-legend);
43
+
44
+ // Out Of Stock
45
+ --fs-product-card-out-of-stock-bkg-color : var(--fs-color-disabled-bkg);
46
+ --fs-product-card-out-of-stock-img-opacity : .5;
47
+
48
+ // Wide
49
+ --fs-product-card-wide-padding : 0;
50
+ --fs-product-card-wide-content-padding : var(--fs-spacing-2);
51
+ --fs-product-card-wide-bkg-color : var(--fs-color-neutral-bkg);
52
+ --fs-product-card-wide-min-width : 9rem;
53
+
54
+ // --------------------------------------------------------
55
+ // Structural Styles
56
+ // --------------------------------------------------------
57
+
58
+ position: relative;
59
+ min-width: var(--fs-product-card-min-width);
60
+ height: 100%;
61
+ display: flex;
62
+ flex-direction: column;
63
+ row-gap: var(--fs-product-card-gap);
64
+ padding: var(--fs-product-card-padding);
65
+ background-color: var(--fs-product-card-bkg-color);
66
+ border: var(--fs-product-card-border-width) solid transparent;
67
+ border-radius: var(--fs-product-card-border-radius);
68
+ overflow: hidden;
69
+ box-shadow: var(--fs-product-card-shadow);
70
+ transition: var(--fs-product-card-transition-property) var(--fs-product-card-transition-timing) var(--fs-product-card-transition-function);
71
+
72
+ &:focus-within {
73
+ @include focus-ring;
74
+ background-color: var(--fs-product-card-bkg-color-focus);
75
+ }
76
+
77
+ @media (hover: hover) {
78
+ &:hover {
79
+ background-color: var(--fs-product-card-bkg-color-hover);
80
+ border-color: var(--fs-product-card-border-color-hover);
81
+ box-shadow: var(--fs-product-card-shadow-hover);
82
+ [data-fs-product-card-image] img { transform: scale(var(--fs-product-card-img-scale-hover)); }
83
+ }
84
+ }
85
+
86
+ [data-fs-product-card-heading] [data-fs-rating] {
87
+ margin-top: var(--fs-spacing-0);
88
+ }
89
+
90
+ [data-fs-product-card-image] {
91
+ position: relative;
92
+ display: flex;
93
+ justify-content: center;
94
+ overflow: hidden;
95
+ width: 100%;
96
+ aspect-ratio: var(--fs-product-card-image-aspect-ratio);
97
+
98
+ img {
99
+ width: 100%;
100
+ height: 100%;
101
+ object-fit: cover;
102
+ transition: var(--fs-product-card-transition-property) var(--fs-product-card-transition-timing) var(--fs-product-card-transition-function);
103
+ }
104
+ }
105
+
106
+ [data-fs-product-card-content] {
107
+ display: flex;
108
+ flex-direction: column;
109
+ row-gap: var(--fs-product-card-gap);
110
+
111
+ [data-fs-link] {
112
+ min-height: 100%;
113
+ padding: 0;
114
+ color: var(--fs-product-card-title-color);
115
+ text-decoration: none;
116
+ outline: none;
117
+
118
+ &::after {
119
+ position: absolute;
120
+ top: 0;
121
+ right: 0;
122
+ bottom: 0;
123
+ left: 0;
124
+ display: block;
125
+ content: "";
126
+ }
127
+ }
128
+ }
129
+
130
+ [data-fs-product-card-title] {
131
+ font-size: var(--fs-product-card-title-size);
132
+ font-weight: var(--fs-product-card-title-weight);
133
+ line-height: 1.25;
134
+ color: var(--fs-product-card-title-color);
135
+ > a { line-height: 1.25; }
136
+
137
+ @include truncate-title(var(--fs-product-card-title-max-lines));
138
+ }
139
+
140
+ [data-fs-product-card-prices] {
141
+ display: flex;
142
+ align-items: center;
143
+ column-gap: var(--fs-product-card-price-gap);
144
+
145
+ [data-fs-price-variant="spot"] {
146
+ font-size: var(--fs-product-card-price-size);
147
+ color: var(--fs-product-card-price-color);
148
+ }
149
+
150
+ [data-fs-price-variant="listing"] {
151
+ font-size: var(--fs-product-card-price-listing-size);
152
+ color: var(--fs-product-card-price-listing-color);
153
+ }
154
+ }
155
+
156
+ [data-fs-product-card-actions] {
157
+ z-index: var(--fs-z-index-top);
158
+ width: fit-content;
159
+ height: fit-content;
160
+ }
161
+
162
+ // --------------------------------------------------------
163
+ // Variants Styles
164
+ // --------------------------------------------------------
165
+
166
+ &[data-fs-product-card="out-of-stock"] {
167
+ --fs-product-card-bkg-color : var(--fs-product-card-out-of-stock-bkg-color);
168
+
169
+ [data-fs-product-card-image] { opacity: var(--fs-product-card-out-of-stock-img-opacity); }
170
+
171
+ }
172
+
173
+ &[data-fs-product-card-bordered="true"] {
174
+ border: var(--fs-product-card-border-width) solid var(--fs-product-card-border-color);
175
+
176
+ @media (hover: hover) {
177
+ &:hover {
178
+ border-color: var(--fs-product-card-border-color-hover);
179
+ }
180
+ }
181
+ }
182
+
183
+ &[data-fs-product-card-variant="default"] {
184
+ [data-fs-product-card-image] {
185
+ border-radius: var(--fs-product-card-img-radius);
186
+ }
187
+ }
188
+
189
+ &[data-fs-product-card-variant="wide"] {
190
+ --fs-product-card-padding : var(--fs-product-card-wide-padding);
191
+ --fs-product-card-bkg-color : var(--fs-product-card-wide-bkg-color);
192
+ --fs-product-card-min-width : var(--fs-product-card-wide-min-width);
193
+
194
+ padding-bottom: var(--fs-product-card-wide-content-padding);
195
+
196
+ [data-fs-product-card-content] {
197
+ padding-left: var(--fs-product-card-wide-content-padding);
198
+ padding-right: var(--fs-product-card-wide-content-padding);
199
+ @include media(">=notebook") {
200
+ flex-direction: row;
201
+ justify-content: space-between;
202
+ }
203
+ }
204
+
205
+ [data-fs-product-card-actions], [data-fs-badge-variant] {
206
+ margin-top: var(--fs-spacing-0);
207
+ }
208
+ }
209
+ }
@@ -4,7 +4,7 @@
4
4
  // --------------------------------------------------------
5
5
 
6
6
  // Default properties
7
- --fs-rating-gap : var(--fs-spacing-3);
7
+ --fs-rating-gap : var(--fs-spacing-0);
8
8
  --fs-rating-color : var(--fs-color-text);
9
9
 
10
10
  // Icon
@@ -13,6 +13,8 @@
13
13
 
14
14
  // Actionable
15
15
  --fs-rating-actionable-gap : 0;
16
+ --fs-rating-actionable-icon-width : var(--fs-rating-icon-width);
17
+ --fs-rating-actionable-icon-height : var(--fs-rating-actionable-icon-width);
16
18
 
17
19
  // --------------------------------------------------------
18
20
  // Structural Styles
@@ -62,8 +64,12 @@
62
64
  column-gap: var(--fs-rating-gap);
63
65
  }
64
66
 
65
- [data-fs-rating-actionable="true"] {
67
+ &[data-fs-rating-actionable="true"] {
66
68
  column-gap: var(--fs-rating-actionable-gap);
69
+ [data-fs-icon] {
70
+ width: var(--fs-rating-actionable-icon-width);
71
+ height: var(--fs-rating-actionable-icon-height);
72
+ }
67
73
  }
68
74
 
69
75
  }
@@ -0,0 +1,63 @@
1
+ [data-fs-payment-methods] {
2
+ // --------------------------------------------------------
3
+ // Design Tokens for Payment Methods
4
+ // --------------------------------------------------------
5
+
6
+ // Default properties
7
+
8
+ // Title
9
+ --fs-payment-methods-title-size : var(--fs-text-size-body);
10
+ --fs-payment-methods-title-weight : var(--fs-text-weight-bold);
11
+ --fs-payment-methods-title-line-height : 1.25;
12
+
13
+ // Flag
14
+ --fs-payment-methods-flag-width : 2.125rem;
15
+ --fs-payment-methods-flag-border-width : var(--fs-border-width);
16
+ --fs-payment-methods-flag-border-color : var(--fs-color-neutral-3);
17
+ --fs-payment-methods-flag-border-radius : var(--fs-border-radius-small);
18
+
19
+ // Flags
20
+ --fs-payment-methods-flags-row-gap : var(--fs-spacing-1);
21
+ --fs-payment-methods-flags-margin-top : var(--fs-spacing-3);
22
+
23
+ // --------------------------------------------------------
24
+ // Structural Styles
25
+ // --------------------------------------------------------
26
+
27
+ [data-fs-payment-methods-title] {
28
+ & > *:first-child {
29
+ font-size: var(--fs-payment-methods-title-size);
30
+ font-weight: var(--fs-payment-methods-title-weight);
31
+ line-height: var(--fs-payment-methods-title-line-height);
32
+ }
33
+
34
+ @include media("<notebook") {
35
+ text-align: center;
36
+ }
37
+ }
38
+
39
+ [data-fs-payment-methods-flags] {
40
+ display: grid;
41
+ grid-template-columns: repeat(4, minmax(0, max-content));
42
+ row-gap: var(--fs-payment-methods-flags-row-gap);
43
+ justify-content: space-between;
44
+ margin-top: var(--fs-payment-methods-flags-margin-top);
45
+
46
+ li {
47
+ display: flex;
48
+ place-content: center;
49
+ }
50
+
51
+ @include media("<notebook") {
52
+ column-gap: var(--fs-grid-gap-2);
53
+ }
54
+ }
55
+
56
+ [data-fs-payment-methods-flag] {
57
+ width: var(--fs-payment-methods-flag-width);
58
+ height: var(--fs-payment-methods-flag-height);
59
+ overflow: hidden;
60
+ border: var(--fs-payment-methods-flag-border-width) solid var(--fs-payment-methods-flag-border-color);
61
+ border-radius: var(--fs-payment-methods-flag-border-radius);
62
+ }
63
+ }
package/src/index.ts CHANGED
@@ -17,19 +17,6 @@ export type { SkuSelectorProps } from './components/molecules/SkuSelector'
17
17
  export { default as OrderSummary } from './components/molecules/OrderSummary'
18
18
  export type { OrderSummaryProps } from './components/molecules/OrderSummary'
19
19
 
20
- export {
21
- default as ProductCard,
22
- ProductCardImage,
23
- ProductCardContent,
24
- ProductCardActions,
25
- } from './components/molecules/ProductCard'
26
- export type {
27
- ProductCardProps,
28
- ProductCardImageProps,
29
- ProductCardContentProps,
30
- ProductCardActionsProps,
31
- } from './components/molecules/ProductCard'
32
-
33
20
  export {
34
21
  default as Card,
35
22
  CardImage,
@@ -68,9 +55,6 @@ export type {
68
55
  BannerLinkProps,
69
56
  } from './components/molecules/Banner'
70
57
 
71
- export { default as PaymentMethods } from './components/molecules/PaymentMethods'
72
- export type { PaymentMethodsProps } from './components/molecules/PaymentMethods'
73
-
74
58
  export { default as Breadcrumb } from './components/molecules/Breadcrumb'
75
59
  export type { BreadcrumbProps } from './components/molecules/Breadcrumb'
76
60
 
@@ -27,6 +27,7 @@
27
27
  @import "../components/molecules/InputField/styles";
28
28
  @import "../components/molecules/LinkButton/styles";
29
29
  @import "../components/molecules/Modal/styles";
30
+ @import "../components/molecules/ProductCard/styles";
30
31
  @import "../components/molecules/ProductTitle/styles";
31
32
  @import "../components/molecules/QuantitySelector/styles";
32
33
  @import "../components/molecules/RadioField/styles";
@@ -39,4 +40,5 @@
39
40
 
40
41
  // Organisms
41
42
  @import "../components/organisms/Hero/styles";
43
+ @import "../components/organisms/PaymentMethods/styles";
42
44
  @import "../components/organisms/PriceRange/styles";
@@ -1,26 +0,0 @@
1
- import type { ReactNode, AriaAttributes } from 'react';
2
- import React from 'react';
3
- export interface PaymentMethodsProps {
4
- /**
5
- * ID to find this component in testing tools (e.g.: cypress,
6
- * testing-library, and jest).
7
- */
8
- testId?: string;
9
- /**
10
- * Title of the payment methods section (e.g.: "Payment methods",
11
- * "Accepted Cards").
12
- */
13
- title?: ReactNode;
14
- /**
15
- * Defines a string value that labels the current element when
16
- * title is not used.
17
- */
18
- 'aria-label'?: AriaAttributes['aria-label'];
19
- /**
20
- * Children will receive the flags to be displayed in the payment
21
- * methods section (e.g.:, visa, mastercard, etc).
22
- */
23
- children: ReactNode;
24
- }
25
- declare const PaymentMethods: React.ForwardRefExoticComponent<PaymentMethodsProps & React.RefAttributes<HTMLDivElement>>;
26
- export default PaymentMethods;
@@ -1,8 +0,0 @@
1
- import React, { forwardRef } from 'react';
2
- const PaymentMethods = forwardRef(function PaymentMethods({ testId = 'store-payment-methods', title, 'aria-label': ariaLabel = 'Payment Methods', children, ...otherProps }, ref) {
3
- return (React.createElement("div", { ref: ref, "data-fs-payment-methods": true, "data-testid": testId, ...otherProps },
4
- !!title && React.createElement("div", null, title),
5
- React.createElement("div", { "data-payment-methods-flags": true, "aria-label": title ? undefined : ariaLabel }, children)));
6
- });
7
- export default PaymentMethods;
8
- //# sourceMappingURL=PaymentMethods.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"PaymentMethods.js","sourceRoot":"","sources":["../../../../src/components/molecules/PaymentMethods/PaymentMethods.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAyBzC,MAAM,cAAc,GAAG,UAAU,CAC/B,SAAS,cAAc,CACrB,EACE,MAAM,GAAG,uBAAuB,EAChC,KAAK,EACL,YAAY,EAAE,SAAS,GAAG,iBAAiB,EAC3C,QAAQ,EACR,GAAG,UAAU,EACd,EACD,GAAG;IAEH,OAAO,CACL,6BACE,GAAG,EAAE,GAAG,kDAEK,MAAM,KACf,UAAU;QAEb,CAAC,CAAC,KAAK,IAAI,iCAAM,KAAK,CAAO;QAC9B,+EAEc,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,IAExC,QAAQ,CACL,CACF,CACP,CAAA;AACH,CAAC,CACF,CAAA;AAED,eAAe,cAAc,CAAA"}
@@ -1,2 +0,0 @@
1
- export { default } from './PaymentMethods';
2
- export type { PaymentMethodsProps } from './PaymentMethods';
@@ -1,2 +0,0 @@
1
- export { default } from './PaymentMethods';
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/molecules/PaymentMethods/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA"}
@@ -1,11 +0,0 @@
1
- import React from 'react';
2
- import type { HTMLAttributes } from 'react';
3
- export interface ProductCardProps extends HTMLAttributes<HTMLDivElement> {
4
- /**
5
- * ID to find this component in testing tools (e.g.: cypress,
6
- * testing-library, and jest).
7
- */
8
- testId?: string;
9
- }
10
- declare const ProductCard: React.ForwardRefExoticComponent<ProductCardProps & React.RefAttributes<HTMLDivElement>>;
11
- export default ProductCard;
@@ -1,6 +0,0 @@
1
- import React, { forwardRef } from 'react';
2
- const ProductCard = forwardRef(function Card({ testId = 'store-product-card', children, ...otherProps }, ref) {
3
- return (React.createElement("article", { ref: ref, "data-fs-product-card": true, "data-testid": testId, ...otherProps }, children));
4
- });
5
- export default ProductCard;
6
- //# sourceMappingURL=ProductCard.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ProductCard.js","sourceRoot":"","sources":["../../../../src/components/molecules/ProductCard/ProductCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAWzC,MAAM,WAAW,GAAG,UAAU,CAAmC,SAAS,IAAI,CAC5E,EAAE,MAAM,GAAG,oBAAoB,EAAE,QAAQ,EAAE,GAAG,UAAU,EAAE,EAC1D,GAAG;IAEH,OAAO,CACL,iCACE,GAAG,EAAE,GAAG,+CAEK,MAAM,KACf,UAAU,IAEb,QAAQ,CACD,CACX,CAAA;AACH,CAAC,CAAC,CAAA;AAEF,eAAe,WAAW,CAAA"}
@@ -1,10 +0,0 @@
1
- import React from 'react';
2
- import type { HTMLAttributes } from 'react';
3
- export interface ProductCardActionsProps extends HTMLAttributes<HTMLDivElement> {
4
- /**
5
- * ID to find this component in testing tools (e.g.: cypress, testing library, and jest).
6
- */
7
- testId?: string;
8
- }
9
- declare const ProductCardActions: React.ForwardRefExoticComponent<ProductCardActionsProps & React.RefAttributes<HTMLDivElement>>;
10
- export default ProductCardActions;
@@ -1,6 +0,0 @@
1
- import React, { forwardRef } from 'react';
2
- const ProductCardActions = forwardRef(function CardActions({ testId = 'store-product-card-actions', children, ...otherProps }, ref) {
3
- return (React.createElement("div", { ref: ref, "data-product-card-actions": true, "data-testid": testId, ...otherProps }, children));
4
- });
5
- export default ProductCardActions;
6
- //# sourceMappingURL=ProductCardActions.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ProductCardActions.js","sourceRoot":"","sources":["../../../../src/components/molecules/ProductCard/ProductCardActions.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAWzC,MAAM,kBAAkB,GAAG,UAAU,CACnC,SAAS,WAAW,CAClB,EAAE,MAAM,GAAG,4BAA4B,EAAE,QAAQ,EAAE,GAAG,UAAU,EAAE,EAClE,GAAG;IAEH,OAAO,CACL,6BACE,GAAG,EAAE,GAAG,oDAEK,MAAM,KACf,UAAU,IAEb,QAAQ,CACL,CACP,CAAA;AACH,CAAC,CACF,CAAA;AAED,eAAe,kBAAkB,CAAA"}
@@ -1,10 +0,0 @@
1
- import type { HTMLAttributes } from 'react';
2
- import React from 'react';
3
- export interface ProductCardContentProps extends HTMLAttributes<HTMLElement> {
4
- /**
5
- * ID to find this component in testing tools (e.g.: cypress, testing library, and jest).
6
- */
7
- testId?: string;
8
- }
9
- declare const ProductCardContent: React.ForwardRefExoticComponent<ProductCardContentProps & React.RefAttributes<HTMLElement>>;
10
- export default ProductCardContent;
@@ -1,6 +0,0 @@
1
- import React, { forwardRef } from 'react';
2
- const ProductCardContent = forwardRef(function CardContent({ testId = 'store-product-card-content', children, ...otherProps }, ref) {
3
- return (React.createElement("section", { ref: ref, "data-product-card-content": true, "data-testid": testId, ...otherProps }, children));
4
- });
5
- export default ProductCardContent;
6
- //# sourceMappingURL=ProductCardContent.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ProductCardContent.js","sourceRoot":"","sources":["../../../../src/components/molecules/ProductCard/ProductCardContent.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AASzC,MAAM,kBAAkB,GAAG,UAAU,CACnC,SAAS,WAAW,CAClB,EAAE,MAAM,GAAG,4BAA4B,EAAE,QAAQ,EAAE,GAAG,UAAU,EAAE,EAClE,GAAG;IAEH,OAAO,CACL,iCACE,GAAG,EAAE,GAAG,oDAEK,MAAM,KACf,UAAU,IAEb,QAAQ,CACD,CACX,CAAA;AACH,CAAC,CACF,CAAA;AAED,eAAe,kBAAkB,CAAA"}
@@ -1,10 +0,0 @@
1
- import type { HTMLAttributes } from 'react';
2
- import React from 'react';
3
- export interface ProductCardImageProps extends HTMLAttributes<HTMLDivElement> {
4
- /**
5
- * ID to find this component in testing tools (e.g.: cypress, testing library, and jest).
6
- */
7
- testId?: string;
8
- }
9
- declare const ProductCardImage: React.ForwardRefExoticComponent<ProductCardImageProps & React.RefAttributes<HTMLDivElement>>;
10
- export default ProductCardImage;
@@ -1,6 +0,0 @@
1
- import React, { forwardRef } from 'react';
2
- const ProductCardImage = forwardRef(function ProductCardImage({ testId = 'store-product-card-image', children, ...otherProps }, ref) {
3
- return (React.createElement("div", { ref: ref, "data-product-card-image": true, "data-testid": testId, ...otherProps }, children));
4
- });
5
- export default ProductCardImage;
6
- //# sourceMappingURL=ProductCardImage.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ProductCardImage.js","sourceRoot":"","sources":["../../../../src/components/molecules/ProductCard/ProductCardImage.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AASzC,MAAM,gBAAgB,GAAG,UAAU,CACjC,SAAS,gBAAgB,CACvB,EAAE,MAAM,GAAG,0BAA0B,EAAE,QAAQ,EAAE,GAAG,UAAU,EAAE,EAChE,GAAG;IAEH,OAAO,CACL,6BACE,GAAG,EAAE,GAAG,kDAEK,MAAM,KACf,UAAU,IAEb,QAAQ,CACL,CACP,CAAA;AACH,CAAC,CACF,CAAA;AAED,eAAe,gBAAgB,CAAA"}
@@ -1,8 +0,0 @@
1
- export { default } from './ProductCard';
2
- export type { ProductCardProps } from './ProductCard';
3
- export { default as ProductCardImage } from './ProductCardImage';
4
- export type { ProductCardImageProps } from './ProductCardImage';
5
- export { default as ProductCardContent } from './ProductCardContent';
6
- export type { ProductCardContentProps } from './ProductCardContent';
7
- export { default as ProductCardActions } from './ProductCardActions';
8
- export type { ProductCardActionsProps } from './ProductCardActions';
@@ -1,5 +0,0 @@
1
- export { default } from './ProductCard';
2
- export { default as ProductCardImage } from './ProductCardImage';
3
- export { default as ProductCardContent } from './ProductCardContent';
4
- export { default as ProductCardActions } from './ProductCardActions';
5
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/molecules/ProductCard/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAGvC,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AAGhE,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AAGpE,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,sBAAsB,CAAA"}
@@ -1,57 +0,0 @@
1
- import type { ReactNode, AriaAttributes } from 'react'
2
- import React, { forwardRef } from 'react'
3
-
4
- export interface PaymentMethodsProps {
5
- /**
6
- * ID to find this component in testing tools (e.g.: cypress,
7
- * testing-library, and jest).
8
- */
9
- testId?: string
10
- /**
11
- * Title of the payment methods section (e.g.: "Payment methods",
12
- * "Accepted Cards").
13
- */
14
- title?: ReactNode
15
- /**
16
- * Defines a string value that labels the current element when
17
- * title is not used.
18
- */
19
- 'aria-label'?: AriaAttributes['aria-label']
20
- /**
21
- * Children will receive the flags to be displayed in the payment
22
- * methods section (e.g.:, visa, mastercard, etc).
23
- */
24
- children: ReactNode
25
- }
26
-
27
- const PaymentMethods = forwardRef<HTMLDivElement, PaymentMethodsProps>(
28
- function PaymentMethods(
29
- {
30
- testId = 'store-payment-methods',
31
- title,
32
- 'aria-label': ariaLabel = 'Payment Methods',
33
- children,
34
- ...otherProps
35
- },
36
- ref
37
- ) {
38
- return (
39
- <div
40
- ref={ref}
41
- data-fs-payment-methods
42
- data-testid={testId}
43
- {...otherProps}
44
- >
45
- {!!title && <div>{title}</div>}
46
- <div
47
- data-payment-methods-flags
48
- aria-label={title ? undefined : ariaLabel}
49
- >
50
- {children}
51
- </div>
52
- </div>
53
- )
54
- }
55
- )
56
-
57
- export default PaymentMethods
@@ -1,2 +0,0 @@
1
- export { default } from './PaymentMethods'
2
- export type { PaymentMethodsProps } from './PaymentMethods'
@@ -1,28 +0,0 @@
1
- import React, { forwardRef } from 'react'
2
- import type { HTMLAttributes } from 'react'
3
-
4
- export interface ProductCardProps extends HTMLAttributes<HTMLDivElement> {
5
- /**
6
- * ID to find this component in testing tools (e.g.: cypress,
7
- * testing-library, and jest).
8
- */
9
- testId?: string
10
- }
11
-
12
- const ProductCard = forwardRef<HTMLDivElement, ProductCardProps>(function Card(
13
- { testId = 'store-product-card', children, ...otherProps },
14
- ref
15
- ) {
16
- return (
17
- <article
18
- ref={ref}
19
- data-fs-product-card
20
- data-testid={testId}
21
- {...otherProps}
22
- >
23
- {children}
24
- </article>
25
- )
26
- })
27
-
28
- export default ProductCard
@@ -1,30 +0,0 @@
1
- import React, { forwardRef } from 'react'
2
- import type { HTMLAttributes } from 'react'
3
-
4
- export interface ProductCardActionsProps
5
- extends HTMLAttributes<HTMLDivElement> {
6
- /**
7
- * ID to find this component in testing tools (e.g.: cypress, testing library, and jest).
8
- */
9
- testId?: string
10
- }
11
-
12
- const ProductCardActions = forwardRef<HTMLDivElement, ProductCardActionsProps>(
13
- function CardActions(
14
- { testId = 'store-product-card-actions', children, ...otherProps },
15
- ref
16
- ) {
17
- return (
18
- <div
19
- ref={ref}
20
- data-product-card-actions
21
- data-testid={testId}
22
- {...otherProps}
23
- >
24
- {children}
25
- </div>
26
- )
27
- }
28
- )
29
-
30
- export default ProductCardActions
@@ -1,29 +0,0 @@
1
- import type { HTMLAttributes } from 'react'
2
- import React, { forwardRef } from 'react'
3
-
4
- export interface ProductCardContentProps extends HTMLAttributes<HTMLElement> {
5
- /**
6
- * ID to find this component in testing tools (e.g.: cypress, testing library, and jest).
7
- */
8
- testId?: string
9
- }
10
-
11
- const ProductCardContent = forwardRef<HTMLElement, ProductCardContentProps>(
12
- function CardContent(
13
- { testId = 'store-product-card-content', children, ...otherProps },
14
- ref
15
- ) {
16
- return (
17
- <section
18
- ref={ref}
19
- data-product-card-content
20
- data-testid={testId}
21
- {...otherProps}
22
- >
23
- {children}
24
- </section>
25
- )
26
- }
27
- )
28
-
29
- export default ProductCardContent
@@ -1,29 +0,0 @@
1
- import type { HTMLAttributes } from 'react'
2
- import React, { forwardRef } from 'react'
3
-
4
- export interface ProductCardImageProps extends HTMLAttributes<HTMLDivElement> {
5
- /**
6
- * ID to find this component in testing tools (e.g.: cypress, testing library, and jest).
7
- */
8
- testId?: string
9
- }
10
-
11
- const ProductCardImage = forwardRef<HTMLDivElement, ProductCardImageProps>(
12
- function ProductCardImage(
13
- { testId = 'store-product-card-image', children, ...otherProps },
14
- ref
15
- ) {
16
- return (
17
- <div
18
- ref={ref}
19
- data-product-card-image
20
- data-testid={testId}
21
- {...otherProps}
22
- >
23
- {children}
24
- </div>
25
- )
26
- }
27
- )
28
-
29
- export default ProductCardImage
@@ -1,11 +0,0 @@
1
- export { default } from './ProductCard'
2
- export type { ProductCardProps } from './ProductCard'
3
-
4
- export { default as ProductCardImage } from './ProductCardImage'
5
- export type { ProductCardImageProps } from './ProductCardImage'
6
-
7
- export { default as ProductCardContent } from './ProductCardContent'
8
- export type { ProductCardContentProps } from './ProductCardContent'
9
-
10
- export { default as ProductCardActions } from './ProductCardActions'
11
- export type { ProductCardActionsProps } from './ProductCardActions'