@faststore/components 2.0.27-alpha.0 → 2.0.29-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.
- package/CHANGELOG.md +18 -0
- package/dist/assets/ArrowRight.js +1 -1
- package/dist/assets/ArrowRight.js.map +1 -1
- package/dist/assets/CaretDown.js +1 -1
- package/dist/assets/CaretDown.js.map +1 -1
- package/dist/assets/Checked.js +1 -1
- package/dist/assets/Checked.js.map +1 -1
- package/dist/assets/House.js +1 -1
- package/dist/assets/House.js.map +1 -1
- package/dist/assets/ShoppingCart.js +1 -1
- package/dist/assets/ShoppingCart.js.map +1 -1
- package/dist/assets/X.js +1 -1
- package/dist/assets/X.js.map +1 -1
- package/dist/assets/XCircle.js +1 -1
- package/dist/assets/XCircle.js.map +1 -1
- package/dist/molecules/DiscountBadge/DiscountBadge.d.ts +4 -3
- package/dist/molecules/DiscountBadge/DiscountBadge.js +2 -2
- package/dist/molecules/DiscountBadge/DiscountBadge.js.map +1 -1
- package/dist/molecules/SelectField/SelectField.js +2 -2
- package/dist/molecules/SelectField/SelectField.js.map +1 -1
- package/package.json +2 -2
- package/src/assets/ArrowRight.tsx +20 -4
- package/src/assets/CaretDown.tsx +8 -2
- package/src/assets/Checked.tsx +0 -1
- package/src/assets/House.tsx +8 -2
- package/src/assets/ShoppingCart.tsx +0 -1
- package/src/assets/X.tsx +0 -1
- package/src/assets/XCircle.tsx +0 -1
- package/src/molecules/DiscountBadge/DiscountBadge.tsx +5 -2
- package/src/molecules/SelectField/SelectField.tsx +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,24 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [2.0.29-alpha.0](https://github.com/vtex/faststore/compare/v2.0.28-alpha.0...v2.0.29-alpha.0) (2022-12-23)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* Adds Badge props to `DiscountBadge` + Fixes SelectField testId ([#1570](https://github.com/vtex/faststore/issues/1570)) ([b1513a5](https://github.com/vtex/faststore/commit/b1513a569235cb60bd3a1c6f16e24fd61d810017))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
## [2.0.28-alpha.0](https://github.com/vtex/faststore/compare/v2.0.27-alpha.0...v2.0.28-alpha.0) (2022-12-23)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Chores
|
|
19
|
+
|
|
20
|
+
* Removes icons id ([#1571](https://github.com/vtex/faststore/issues/1571)) ([2e790fa](https://github.com/vtex/faststore/commit/2e790faa2ca37fc4f6f9f7c7796f79ceaf6a3f02))
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
6
24
|
## [2.0.27-alpha.0](https://github.com/vtex/faststore/compare/v2.0.26-alpha.0...v2.0.27-alpha.0) (2022-12-23)
|
|
7
25
|
|
|
8
26
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
// Icon from Phosphor Icons
|
|
3
|
-
const ArrowRight = () => (React.createElement("svg", {
|
|
3
|
+
const ArrowRight = () => (React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "currentColor", viewBox: "0 0 256 256", strokeWidth: "16", width: 24, height: 24 },
|
|
4
4
|
React.createElement("rect", { width: "256", height: "256", fill: "none" }),
|
|
5
5
|
React.createElement("line", { x1: "40", y1: "128", x2: "216", y2: "128", fill: "none", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "24" }),
|
|
6
6
|
React.createElement("polyline", { points: "144 56 216 128 144 200", fill: "none", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "24" })));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ArrowRight.js","sourceRoot":"","sources":["../../src/assets/ArrowRight.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,2BAA2B;AAC3B,MAAM,UAAU,GAAO,GAAG,EAAE,CAAC,CAC3B,6BACE,
|
|
1
|
+
{"version":3,"file":"ArrowRight.js","sourceRoot":"","sources":["../../src/assets/ArrowRight.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,2BAA2B;AAC3B,MAAM,UAAU,GAAO,GAAG,EAAE,CAAC,CAC3B,6BACE,KAAK,EAAC,4BAA4B,EAClC,IAAI,EAAC,cAAc,EACnB,OAAO,EAAC,aAAa,EACrB,WAAW,EAAC,IAAI,EAChB,KAAK,EAAE,EAAE,EACT,MAAM,EAAE,EAAE;IAEV,8BAAM,KAAK,EAAC,KAAK,EAAC,MAAM,EAAC,KAAK,EAAC,IAAI,EAAC,MAAM,GAAQ;IAClD,8BACE,EAAE,EAAC,IAAI,EACP,EAAE,EAAC,KAAK,EACR,EAAE,EAAC,KAAK,EACR,EAAE,EAAC,KAAK,EACR,IAAI,EAAC,MAAM,EACX,MAAM,EAAC,cAAc,EACrB,aAAa,EAAC,OAAO,EACrB,cAAc,EAAC,OAAO,EACtB,WAAW,EAAC,IAAI,GACV;IACR,kCACE,MAAM,EAAC,wBAAwB,EAC/B,IAAI,EAAC,MAAM,EACX,MAAM,EAAC,cAAc,EACrB,aAAa,EAAC,OAAO,EACrB,cAAc,EAAC,OAAO,EACtB,WAAW,EAAC,IAAI,GACN,CACR,CACP,CAAA;AAED,eAAe,UAAU,CAAA"}
|
package/dist/assets/CaretDown.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
// Icon from Phosphor Icons
|
|
3
|
-
const CaretDown = () => (React.createElement("svg", {
|
|
3
|
+
const CaretDown = () => (React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "currentColor", viewBox: "0 0 256 256", strokeWidth: "16", width: 24, height: 24 },
|
|
4
4
|
React.createElement("rect", { width: "256", height: "256", fill: "none" }),
|
|
5
5
|
React.createElement("polyline", { points: "208 96 128 176 48 96", fill: "none", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "24" })));
|
|
6
6
|
export default CaretDown;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaretDown.js","sourceRoot":"","sources":["../../src/assets/CaretDown.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,2BAA2B;AAC3B,MAAM,SAAS,GAAO,GAAG,EAAE,CAAC,CAC1B,6BACE,
|
|
1
|
+
{"version":3,"file":"CaretDown.js","sourceRoot":"","sources":["../../src/assets/CaretDown.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,2BAA2B;AAC3B,MAAM,SAAS,GAAO,GAAG,EAAE,CAAC,CAC1B,6BACE,KAAK,EAAC,4BAA4B,EAClC,IAAI,EAAC,cAAc,EACnB,OAAO,EAAC,aAAa,EACrB,WAAW,EAAC,IAAI,EAChB,KAAK,EAAE,EAAE,EACT,MAAM,EAAE,EAAE;IAEV,8BAAM,KAAK,EAAC,KAAK,EAAC,MAAM,EAAC,KAAK,EAAC,IAAI,EAAC,MAAM,GAAQ;IAClD,kCACE,MAAM,EAAC,sBAAsB,EAC7B,IAAI,EAAC,MAAM,EACX,MAAM,EAAC,cAAc,EACrB,aAAa,EAAC,OAAO,EACrB,cAAc,EAAC,OAAO,EACtB,WAAW,EAAC,IAAI,GACN,CACR,CACP,CAAA;AAED,eAAe,SAAS,CAAA"}
|
package/dist/assets/Checked.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
// Icon from Phosphor Icons
|
|
3
|
-
const Checked = () => (React.createElement("svg", {
|
|
3
|
+
const Checked = () => (React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 19 18", strokeWidth: "16", width: 15, height: 15 },
|
|
4
4
|
React.createElement("path", { d: "M15.6875 5.0625L7.8125 12.9375L3.875 9", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })));
|
|
5
5
|
export default Checked;
|
|
6
6
|
//# sourceMappingURL=Checked.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Checked.js","sourceRoot":"","sources":["../../src/assets/Checked.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,2BAA2B;AAC3B,MAAM,OAAO,GAAO,GAAG,EAAE,CAAC,CACxB,6BACE,
|
|
1
|
+
{"version":3,"file":"Checked.js","sourceRoot":"","sources":["../../src/assets/Checked.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,2BAA2B;AAC3B,MAAM,OAAO,GAAO,GAAG,EAAE,CAAC,CACxB,6BACE,KAAK,EAAC,4BAA4B,EAClC,IAAI,EAAC,MAAM,EACX,OAAO,EAAC,WAAW,EACnB,WAAW,EAAC,IAAI,EAChB,KAAK,EAAE,EAAE,EACT,MAAM,EAAE,EAAE;IAEV,8BACE,CAAC,EAAC,wCAAwC,EAC1C,MAAM,EAAC,cAAc,EACrB,WAAW,EAAC,KAAK,EACjB,aAAa,EAAC,OAAO,EACrB,cAAc,EAAC,OAAO,GACtB,CACE,CACP,CAAA;AAED,eAAe,OAAO,CAAA"}
|
package/dist/assets/House.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
// Icon from Phosphor Icons
|
|
3
|
-
const House = () => (React.createElement("svg", {
|
|
3
|
+
const House = () => (React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "currentColor", viewBox: "0 0 256 256", strokeWidth: "16", width: 24, height: 24 },
|
|
4
4
|
React.createElement("rect", { width: "256", height: "256", fill: "none" }),
|
|
5
5
|
React.createElement("path", { d: "M152,208V160a8,8,0,0,0-8-8H112a8,8,0,0,0-8,8v48a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V115.5a8.3,8.3,0,0,1,2.6-5.9l80-72.7a8,8,0,0,1,10.8,0l80,72.7a8.3,8.3,0,0,1,2.6,5.9V208a8,8,0,0,1-8,8H160A8,8,0,0,1,152,208Z", fill: "none", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "24" })));
|
|
6
6
|
export default House;
|
package/dist/assets/House.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"House.js","sourceRoot":"","sources":["../../src/assets/House.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,2BAA2B;AAC3B,MAAM,KAAK,GAAO,GAAG,EAAE,CAAC,CACtB,6BACE,
|
|
1
|
+
{"version":3,"file":"House.js","sourceRoot":"","sources":["../../src/assets/House.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,2BAA2B;AAC3B,MAAM,KAAK,GAAO,GAAG,EAAE,CAAC,CACtB,6BACE,KAAK,EAAC,4BAA4B,EAClC,IAAI,EAAC,cAAc,EACnB,OAAO,EAAC,aAAa,EACrB,WAAW,EAAC,IAAI,EAChB,KAAK,EAAE,EAAE,EACT,MAAM,EAAE,EAAE;IAEV,8BAAM,KAAK,EAAC,KAAK,EAAC,MAAM,EAAC,KAAK,EAAC,IAAI,EAAC,MAAM,GAAQ;IAClD,8BACE,CAAC,EAAC,4MAA4M,EAC9M,IAAI,EAAC,MAAM,EACX,MAAM,EAAC,cAAc,EACrB,aAAa,EAAC,OAAO,EACrB,cAAc,EAAC,OAAO,EACtB,WAAW,EAAC,IAAI,GACV,CACJ,CACP,CAAA;AAED,eAAe,KAAK,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
// Icon from Phosphor Icons
|
|
3
|
-
const ShoppingCart = () => (React.createElement("svg", {
|
|
3
|
+
const ShoppingCart = () => (React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "currentColor", viewBox: "0 0 256 256", strokeWidth: "16", width: 24, height: 24 },
|
|
4
4
|
React.createElement("rect", { width: "256", height: "256", fill: "none" }),
|
|
5
5
|
React.createElement("path", { d: "M184,184H69.81818L41.92162,30.56892A8,8,0,0,0,34.05066,24H16", fill: "none", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round" }),
|
|
6
6
|
React.createElement("circle", { cx: "80", cy: "204", r: "20", fill: "none", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round" }),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ShoppingCart.js","sourceRoot":"","sources":["../../src/assets/ShoppingCart.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,2BAA2B;AAC3B,MAAM,YAAY,GAAO,GAAG,EAAE,CAAC,CAC7B,6BACE,
|
|
1
|
+
{"version":3,"file":"ShoppingCart.js","sourceRoot":"","sources":["../../src/assets/ShoppingCart.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,2BAA2B;AAC3B,MAAM,YAAY,GAAO,GAAG,EAAE,CAAC,CAC7B,6BACE,KAAK,EAAC,4BAA4B,EAClC,IAAI,EAAC,cAAc,EACnB,OAAO,EAAC,aAAa,EACrB,WAAW,EAAC,IAAI,EAChB,KAAK,EAAE,EAAE,EACT,MAAM,EAAE,EAAE;IAEV,8BAAM,KAAK,EAAC,KAAK,EAAC,MAAM,EAAC,KAAK,EAAC,IAAI,EAAC,MAAM,GAAQ;IAClD,8BACE,CAAC,EAAC,8DAA8D,EAChE,IAAI,EAAC,MAAM,EACX,MAAM,EAAC,cAAc,EACrB,aAAa,EAAC,OAAO,EACrB,cAAc,EAAC,OAAO,GAChB;IACR,gCACE,EAAE,EAAC,IAAI,EACP,EAAE,EAAC,KAAK,EACR,CAAC,EAAC,IAAI,EACN,IAAI,EAAC,MAAM,EACX,MAAM,EAAC,cAAc,EACrB,aAAa,EAAC,OAAO,EACrB,cAAc,EAAC,OAAO,GACd;IACV,gCACE,EAAE,EAAC,KAAK,EACR,EAAE,EAAC,KAAK,EACR,CAAC,EAAC,IAAI,EACN,IAAI,EAAC,MAAM,EACX,MAAM,EAAC,cAAc,EACrB,aAAa,EAAC,OAAO,EACrB,cAAc,EAAC,OAAO,GACd;IACV,8BACE,CAAC,EAAC,iEAAiE,EACnE,IAAI,EAAC,MAAM,EACX,MAAM,EAAC,cAAc,EACrB,aAAa,EAAC,OAAO,EACrB,cAAc,EAAC,OAAO,GAChB,CACJ,CACP,CAAA;AAED,eAAe,YAAY,CAAA"}
|
package/dist/assets/X.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
// Icon from Phosphor Icons
|
|
3
|
-
const X = () => (React.createElement("svg", {
|
|
3
|
+
const X = () => (React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "currentColor", viewBox: "0 0 256 256", strokeWidth: "16", width: 24, height: 24 },
|
|
4
4
|
React.createElement("rect", { width: "256", height: "256", fill: "none" }),
|
|
5
5
|
React.createElement("line", { x1: "200", y1: "56", x2: "56", y2: "200", fill: "none", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round" }),
|
|
6
6
|
React.createElement("line", { x1: "200", y1: "200", x2: "56", y2: "56", fill: "none", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round" })));
|
package/dist/assets/X.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"X.js","sourceRoot":"","sources":["../../src/assets/X.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,2BAA2B;AAC3B,MAAM,CAAC,GAAO,GAAG,EAAE,CAAC,CAClB,6BACE,
|
|
1
|
+
{"version":3,"file":"X.js","sourceRoot":"","sources":["../../src/assets/X.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,2BAA2B;AAC3B,MAAM,CAAC,GAAO,GAAG,EAAE,CAAC,CAClB,6BACE,KAAK,EAAC,4BAA4B,EAClC,IAAI,EAAC,cAAc,EACnB,OAAO,EAAC,aAAa,EACrB,WAAW,EAAC,IAAI,EAChB,KAAK,EAAE,EAAE,EACT,MAAM,EAAE,EAAE;IAEV,8BAAM,KAAK,EAAC,KAAK,EAAC,MAAM,EAAC,KAAK,EAAC,IAAI,EAAC,MAAM,GAAQ;IAClD,8BACE,EAAE,EAAC,KAAK,EACR,EAAE,EAAC,IAAI,EACP,EAAE,EAAC,IAAI,EACP,EAAE,EAAC,KAAK,EACR,IAAI,EAAC,MAAM,EACX,MAAM,EAAC,cAAc,EACrB,aAAa,EAAC,OAAO,EACrB,cAAc,EAAC,OAAO,GAChB;IACR,8BACE,EAAE,EAAC,KAAK,EACR,EAAE,EAAC,KAAK,EACR,EAAE,EAAC,IAAI,EACP,EAAE,EAAC,IAAI,EACP,IAAI,EAAC,MAAM,EACX,MAAM,EAAC,cAAc,EACrB,aAAa,EAAC,OAAO,EACrB,cAAc,EAAC,OAAO,GAChB,CACJ,CACP,CAAA;AAED,eAAe,CAAC,CAAA"}
|
package/dist/assets/XCircle.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
// Icon from Phosphor Icons
|
|
3
|
-
const XCircle = () => (React.createElement("svg", {
|
|
3
|
+
const XCircle = () => (React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "currentColor", viewBox: "0 0 256 256", strokeWidth: "16", width: 20, height: 20 },
|
|
4
4
|
React.createElement("rect", { width: "256", height: "256", fill: "none" }),
|
|
5
5
|
React.createElement("circle", { cx: "128", cy: "128", r: "96", fill: "none", stroke: "currentColor", strokeMiterlimit: "10" }),
|
|
6
6
|
React.createElement("line", { x1: "160", y1: "96", x2: "96", y2: "160", fill: "none", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round" }),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"XCircle.js","sourceRoot":"","sources":["../../src/assets/XCircle.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,2BAA2B;AAC3B,MAAM,OAAO,GAAO,GAAG,EAAE,CAAC,CACxB,6BACE,
|
|
1
|
+
{"version":3,"file":"XCircle.js","sourceRoot":"","sources":["../../src/assets/XCircle.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,2BAA2B;AAC3B,MAAM,OAAO,GAAO,GAAG,EAAE,CAAC,CACxB,6BACE,KAAK,EAAC,4BAA4B,EAClC,IAAI,EAAC,cAAc,EACnB,OAAO,EAAC,aAAa,EACrB,WAAW,EAAC,IAAI,EAChB,KAAK,EAAE,EAAE,EACT,MAAM,EAAE,EAAE;IAEV,8BAAM,KAAK,EAAC,KAAK,EAAC,MAAM,EAAC,KAAK,EAAC,IAAI,EAAC,MAAM,GAAQ;IAClD,gCACE,EAAE,EAAC,KAAK,EACR,EAAE,EAAC,KAAK,EACR,CAAC,EAAC,IAAI,EACN,IAAI,EAAC,MAAM,EACX,MAAM,EAAC,cAAc,EACrB,gBAAgB,EAAC,IAAI,GACb;IACV,8BACE,EAAE,EAAC,KAAK,EACR,EAAE,EAAC,IAAI,EACP,EAAE,EAAC,IAAI,EACP,EAAE,EAAC,KAAK,EACR,IAAI,EAAC,MAAM,EACX,MAAM,EAAC,cAAc,EACrB,aAAa,EAAC,OAAO,EACrB,cAAc,EAAC,OAAO,GAChB;IACR,8BACE,EAAE,EAAC,KAAK,EACR,EAAE,EAAC,KAAK,EACR,EAAE,EAAC,IAAI,EACP,EAAE,EAAC,IAAI,EACP,IAAI,EAAC,MAAM,EACX,MAAM,EAAC,cAAc,EACrB,aAAa,EAAC,OAAO,EACrB,cAAc,EAAC,OAAO,GAChB,CACJ,CACP,CAAA;AAED,eAAe,OAAO,CAAA"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
|
|
2
|
+
import { BadgeProps } from '../..';
|
|
3
|
+
export interface DiscountBadgeProps extends Omit<BadgeProps, 'variant' | 'counter' | 'aria-label'> {
|
|
3
4
|
/**
|
|
4
5
|
* ID to find this component in testing tools (e.g.: cypress, testing library, and jest).
|
|
5
6
|
*/
|
|
@@ -20,6 +21,6 @@ export declare type DiscountBadgeProps = {
|
|
|
20
21
|
* Sets the limit percentage value to consider a high discount.
|
|
21
22
|
*/
|
|
22
23
|
thresholdHigh?: number;
|
|
23
|
-
}
|
|
24
|
-
declare const DiscountBadge: ({ listPrice, spotPrice, thresholdLow, thresholdHigh, testId, }: DiscountBadgeProps) => JSX.Element;
|
|
24
|
+
}
|
|
25
|
+
declare const DiscountBadge: ({ listPrice, spotPrice, thresholdLow, thresholdHigh, size, testId, }: DiscountBadgeProps) => JSX.Element;
|
|
25
26
|
export default DiscountBadge;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Badge } from '../..';
|
|
3
3
|
import { useDiscountPercent } from '../DiscountBadge/useDiscountPercent';
|
|
4
|
-
const DiscountBadge = ({ listPrice, spotPrice, thresholdLow = 15, thresholdHigh = 40, testId = 'fs-discount-badge', }) => {
|
|
4
|
+
const DiscountBadge = ({ listPrice, spotPrice, thresholdLow = 15, thresholdHigh = 40, size, testId = 'fs-discount-badge', }) => {
|
|
5
5
|
const discountPercent = useDiscountPercent(listPrice, spotPrice);
|
|
6
6
|
if (discountPercent === 0) {
|
|
7
7
|
return React.createElement(React.Fragment, null);
|
|
@@ -11,7 +11,7 @@ const DiscountBadge = ({ listPrice, spotPrice, thresholdLow = 15, thresholdHigh
|
|
|
11
11
|
: discountPercent <= thresholdHigh
|
|
12
12
|
? 'medium'
|
|
13
13
|
: 'high';
|
|
14
|
-
return (React.createElement(Badge, { "data-fs-discount-badge": true, "data-fs-discount-badge-variant": discountVariant, "data-testid": testId },
|
|
14
|
+
return (React.createElement(Badge, { "data-fs-discount-badge": true, "data-fs-discount-badge-variant": discountVariant, size: size, "data-testid": testId },
|
|
15
15
|
discountPercent,
|
|
16
16
|
"% off"));
|
|
17
17
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DiscountBadge.js","sourceRoot":"","sources":["../../../src/molecules/DiscountBadge/DiscountBadge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"DiscountBadge.js","sourceRoot":"","sources":["../../../src/molecules/DiscountBadge/DiscountBadge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,KAAK,EAAc,MAAM,OAAO,CAAA;AAEzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAA;AA0BxE,MAAM,aAAa,GAAG,CAAC,EACrB,SAAS,EACT,SAAS,EACT,YAAY,GAAG,EAAE,EACjB,aAAa,GAAG,EAAE,EAClB,IAAI,EACJ,MAAM,GAAG,mBAAmB,GACT,EAAE,EAAE;IACvB,MAAM,eAAe,GAAG,kBAAkB,CAAC,SAAS,EAAE,SAAS,CAAC,CAAA;IAEhE,IAAI,eAAe,KAAK,CAAC,EAAE;QACzB,OAAO,yCAAK,CAAA;KACb;IAED,MAAM,eAAe,GACnB,eAAe,IAAI,YAAY;QAC7B,CAAC,CAAC,KAAK;QACP,CAAC,CAAC,eAAe,IAAI,aAAa;YAClC,CAAC,CAAC,QAAQ;YACV,CAAC,CAAC,MAAM,CAAA;IAEZ,OAAO,CACL,oBAAC,KAAK,sEAE4B,eAAe,EAC/C,IAAI,EAAE,IAAI,iBACG,MAAM;QAElB,eAAe;gBACV,CACT,CAAA;AACH,CAAC,CAAA;AAED,eAAe,aAAa,CAAA"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React, { forwardRef } from 'react';
|
|
2
2
|
import { Label, Select } from '../..';
|
|
3
3
|
const SelectField = forwardRef(function SelectField({ id, label, options, testId = 'fs-select-field', ...otherProps }, ref) {
|
|
4
|
-
return (React.createElement("div", { ref: ref, "data-fs-select-field": true
|
|
4
|
+
return (React.createElement("div", { ref: ref, "data-fs-select-field": true },
|
|
5
5
|
React.createElement(Label, { "data-fs-select-field-label": true, htmlFor: id }, label),
|
|
6
|
-
React.createElement(Select, { id: id, options: options, ...otherProps })));
|
|
6
|
+
React.createElement(Select, { id: id, options: options, "data-testid": testId, ...otherProps })));
|
|
7
7
|
});
|
|
8
8
|
export default SelectField;
|
|
9
9
|
//# sourceMappingURL=SelectField.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectField.js","sourceRoot":"","sources":["../../../src/molecules/SelectField/SelectField.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAGzC,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,OAAO,CAAA;AAUrC,MAAM,WAAW,GAAG,UAAU,CAG5B,SAAS,WAAW,CACpB,EAAE,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,GAAG,iBAAiB,EAAE,GAAG,UAAU,EAAE,EACjE,GAAG;IAEH,OAAO,CACL,6BAAK,GAAG,EAAE,GAAG
|
|
1
|
+
{"version":3,"file":"SelectField.js","sourceRoot":"","sources":["../../../src/molecules/SelectField/SelectField.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAGzC,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,OAAO,CAAA;AAUrC,MAAM,WAAW,GAAG,UAAU,CAG5B,SAAS,WAAW,CACpB,EAAE,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,GAAG,iBAAiB,EAAE,GAAG,UAAU,EAAE,EACjE,GAAG;IAEH,OAAO,CACL,6BAAK,GAAG,EAAE,GAAG;QACX,oBAAC,KAAK,wCAA4B,OAAO,EAAE,EAAE,IAC1C,KAAK,CACA;QACR,oBAAC,MAAM,IAAC,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE,OAAO,iBAAe,MAAM,KAAM,UAAU,GAAI,CACrE,CACP,CAAA;AACH,CAAC,CAAC,CAAA;AAEF,eAAe,WAAW,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@faststore/components",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.29-alpha.0",
|
|
4
4
|
"module": "dist/index.js",
|
|
5
5
|
"typings": "dist/index.d.ts",
|
|
6
6
|
"author": "Emerson Laurentino @emersonlaurentino",
|
|
@@ -28,5 +28,5 @@
|
|
|
28
28
|
"node": "16.18.0",
|
|
29
29
|
"yarn": "1.19.1"
|
|
30
30
|
},
|
|
31
|
-
"gitHead": "
|
|
31
|
+
"gitHead": "bbb814ece0e5ba067669003801e0741fe47e9e5e"
|
|
32
32
|
}
|
|
@@ -4,7 +4,6 @@ import type { FC } from 'react'
|
|
|
4
4
|
// Icon from Phosphor Icons
|
|
5
5
|
const ArrowRight: FC = () => (
|
|
6
6
|
<svg
|
|
7
|
-
id="ArrowRight"
|
|
8
7
|
xmlns="http://www.w3.org/2000/svg"
|
|
9
8
|
fill="currentColor"
|
|
10
9
|
viewBox="0 0 256 256"
|
|
@@ -12,9 +11,26 @@ const ArrowRight: FC = () => (
|
|
|
12
11
|
width={24}
|
|
13
12
|
height={24}
|
|
14
13
|
>
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
14
|
+
<rect width="256" height="256" fill="none"></rect>
|
|
15
|
+
<line
|
|
16
|
+
x1="40"
|
|
17
|
+
y1="128"
|
|
18
|
+
x2="216"
|
|
19
|
+
y2="128"
|
|
20
|
+
fill="none"
|
|
21
|
+
stroke="currentColor"
|
|
22
|
+
strokeLinecap="round"
|
|
23
|
+
strokeLinejoin="round"
|
|
24
|
+
strokeWidth="24"
|
|
25
|
+
></line>
|
|
26
|
+
<polyline
|
|
27
|
+
points="144 56 216 128 144 200"
|
|
28
|
+
fill="none"
|
|
29
|
+
stroke="currentColor"
|
|
30
|
+
strokeLinecap="round"
|
|
31
|
+
strokeLinejoin="round"
|
|
32
|
+
strokeWidth="24"
|
|
33
|
+
></polyline>
|
|
18
34
|
</svg>
|
|
19
35
|
)
|
|
20
36
|
|
package/src/assets/CaretDown.tsx
CHANGED
|
@@ -4,7 +4,6 @@ import type { FC } from 'react'
|
|
|
4
4
|
// Icon from Phosphor Icons
|
|
5
5
|
const CaretDown: FC = () => (
|
|
6
6
|
<svg
|
|
7
|
-
id="CaretDown"
|
|
8
7
|
xmlns="http://www.w3.org/2000/svg"
|
|
9
8
|
fill="currentColor"
|
|
10
9
|
viewBox="0 0 256 256"
|
|
@@ -13,7 +12,14 @@ const CaretDown: FC = () => (
|
|
|
13
12
|
height={24}
|
|
14
13
|
>
|
|
15
14
|
<rect width="256" height="256" fill="none"></rect>
|
|
16
|
-
<polyline
|
|
15
|
+
<polyline
|
|
16
|
+
points="208 96 128 176 48 96"
|
|
17
|
+
fill="none"
|
|
18
|
+
stroke="currentColor"
|
|
19
|
+
strokeLinecap="round"
|
|
20
|
+
strokeLinejoin="round"
|
|
21
|
+
strokeWidth="24"
|
|
22
|
+
></polyline>
|
|
17
23
|
</svg>
|
|
18
24
|
)
|
|
19
25
|
|
package/src/assets/Checked.tsx
CHANGED
package/src/assets/House.tsx
CHANGED
|
@@ -4,7 +4,6 @@ import type { FC } from 'react'
|
|
|
4
4
|
// Icon from Phosphor Icons
|
|
5
5
|
const House: FC = () => (
|
|
6
6
|
<svg
|
|
7
|
-
id="House"
|
|
8
7
|
xmlns="http://www.w3.org/2000/svg"
|
|
9
8
|
fill="currentColor"
|
|
10
9
|
viewBox="0 0 256 256"
|
|
@@ -13,7 +12,14 @@ const House: FC = () => (
|
|
|
13
12
|
height={24}
|
|
14
13
|
>
|
|
15
14
|
<rect width="256" height="256" fill="none"></rect>
|
|
16
|
-
<path
|
|
15
|
+
<path
|
|
16
|
+
d="M152,208V160a8,8,0,0,0-8-8H112a8,8,0,0,0-8,8v48a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V115.5a8.3,8.3,0,0,1,2.6-5.9l80-72.7a8,8,0,0,1,10.8,0l80,72.7a8.3,8.3,0,0,1,2.6,5.9V208a8,8,0,0,1-8,8H160A8,8,0,0,1,152,208Z"
|
|
17
|
+
fill="none"
|
|
18
|
+
stroke="currentColor"
|
|
19
|
+
strokeLinecap="round"
|
|
20
|
+
strokeLinejoin="round"
|
|
21
|
+
strokeWidth="24"
|
|
22
|
+
></path>
|
|
17
23
|
</svg>
|
|
18
24
|
)
|
|
19
25
|
|
package/src/assets/X.tsx
CHANGED
package/src/assets/XCircle.tsx
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
-
import { Badge } from '../..'
|
|
2
|
+
import { Badge, BadgeProps } from '../..'
|
|
3
3
|
|
|
4
4
|
import { useDiscountPercent } from '../DiscountBadge/useDiscountPercent'
|
|
5
5
|
|
|
6
|
-
export
|
|
6
|
+
export interface DiscountBadgeProps
|
|
7
|
+
extends Omit<BadgeProps, 'variant' | 'counter' | 'aria-label'> {
|
|
7
8
|
/**
|
|
8
9
|
* ID to find this component in testing tools (e.g.: cypress, testing library, and jest).
|
|
9
10
|
*/
|
|
@@ -31,6 +32,7 @@ const DiscountBadge = ({
|
|
|
31
32
|
spotPrice,
|
|
32
33
|
thresholdLow = 15,
|
|
33
34
|
thresholdHigh = 40,
|
|
35
|
+
size,
|
|
34
36
|
testId = 'fs-discount-badge',
|
|
35
37
|
}: DiscountBadgeProps) => {
|
|
36
38
|
const discountPercent = useDiscountPercent(listPrice, spotPrice)
|
|
@@ -50,6 +52,7 @@ const DiscountBadge = ({
|
|
|
50
52
|
<Badge
|
|
51
53
|
data-fs-discount-badge
|
|
52
54
|
data-fs-discount-badge-variant={discountVariant}
|
|
55
|
+
size={size}
|
|
53
56
|
data-testid={testId}
|
|
54
57
|
>
|
|
55
58
|
{discountPercent}% off
|
|
@@ -19,11 +19,11 @@ const SelectField = forwardRef<
|
|
|
19
19
|
ref
|
|
20
20
|
) {
|
|
21
21
|
return (
|
|
22
|
-
<div ref={ref} data-fs-select-field
|
|
22
|
+
<div ref={ref} data-fs-select-field>
|
|
23
23
|
<Label data-fs-select-field-label htmlFor={id}>
|
|
24
24
|
{label}
|
|
25
25
|
</Label>
|
|
26
|
-
<Select id={id} options={options} {...otherProps} />
|
|
26
|
+
<Select id={id} options={options} data-testid={testId} {...otherProps} />
|
|
27
27
|
</div>
|
|
28
28
|
)
|
|
29
29
|
})
|