@faststore/components 2.0.91-alpha.0 → 2.0.94-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/dist/assets/ArrowSquareOut.d.ts +4 -0
- package/dist/assets/ArrowSquareOut.js +6 -0
- package/dist/assets/ArrowSquareOut.js.map +1 -0
- package/dist/assets/index.d.ts +1 -0
- package/dist/assets/index.js +1 -0
- package/dist/assets/index.js.map +1 -1
- package/dist/atoms/Price/index.d.ts +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/molecules/CartItem/CartItem.d.ts +7 -12
- package/dist/molecules/CartItem/CartItem.js.map +1 -1
- package/dist/molecules/Gift/GiftContent.d.ts +2 -8
- package/dist/molecules/Gift/GiftContent.js.map +1 -1
- package/dist/molecules/ProductCard/ProductCardContent.d.ts +7 -12
- package/dist/molecules/ProductCard/ProductCardContent.js.map +1 -1
- package/dist/molecules/SearchProducts/SearchProductItemContent.d.ts +2 -8
- package/dist/molecules/SearchProducts/SearchProductItemContent.js.map +1 -1
- package/dist/organisms/Filter/FilterSlider.d.ts +11 -11
- package/dist/organisms/Filter/FilterSlider.js +2 -2
- package/dist/organisms/Filter/FilterSlider.js.map +1 -1
- package/dist/organisms/ShippingSimulation/ShippingSimulation.d.ts +79 -0
- package/dist/organisms/ShippingSimulation/ShippingSimulation.js +24 -0
- package/dist/organisms/ShippingSimulation/ShippingSimulation.js.map +1 -0
- package/dist/organisms/ShippingSimulation/index.d.ts +2 -0
- package/dist/organisms/ShippingSimulation/index.js +2 -0
- package/dist/organisms/ShippingSimulation/index.js.map +1 -0
- package/dist/organisms/SlideOver/SlideOver.d.ts +3 -3
- package/dist/organisms/SlideOver/SlideOverHeader.d.ts +4 -1
- package/dist/organisms/SlideOver/SlideOverHeader.js +1 -1
- package/dist/organisms/SlideOver/SlideOverHeader.js.map +1 -1
- package/dist/typings/PriceDefinition.d.ts +6 -0
- package/dist/typings/PriceDefinition.js +2 -0
- package/dist/typings/PriceDefinition.js.map +1 -0
- package/dist/typings/index.d.ts +1 -0
- package/package.json +2 -2
- package/src/assets/ArrowSquareOut.tsx +19 -0
- package/src/assets/index.ts +1 -0
- package/src/atoms/Price/index.ts +1 -1
- package/src/index.ts +3 -0
- package/src/molecules/CartItem/CartItem.tsx +6 -12
- package/src/molecules/Gift/GiftContent.tsx +2 -8
- package/src/molecules/ProductCard/ProductCardContent.tsx +6 -12
- package/src/molecules/SearchProducts/SearchProductItemContent.tsx +2 -7
- package/src/organisms/Filter/FilterSlider.tsx +14 -14
- package/src/organisms/ShippingSimulation/ShippingSimulation.tsx +184 -0
- package/src/organisms/ShippingSimulation/index.tsx +2 -0
- package/src/organisms/SlideOver/SlideOver.tsx +2 -2
- package/src/organisms/SlideOver/SlideOverHeader.tsx +4 -2
- package/src/typings/PriceDefinition.ts +7 -0
- package/src/typings/index.ts +2 -0
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
// Icon from Phosphor Icons
|
|
3
|
+
const ArrowSquareOut = ({ size = 20 }) => (React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: size, height: size, fill: "currentColor", viewBox: "0 0 256 256" },
|
|
4
|
+
React.createElement("path", { d: "M224,104a8,8,0,0,1-16,0V59.32l-66.33,66.34a8,8,0,0,1-11.32-11.32L196.68,48H152a8,8,0,0,1,0-16h64a8,8,0,0,1,8,8Zm-40,24a8,8,0,0,0-8,8v72H48V80h72a8,8,0,0,0,0-16H48A16,16,0,0,0,32,80V208a16,16,0,0,0,16,16H176a16,16,0,0,0,16-16V136A8,8,0,0,0,184,128Z" })));
|
|
5
|
+
export default ArrowSquareOut;
|
|
6
|
+
//# sourceMappingURL=ArrowSquareOut.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ArrowSquareOut.js","sourceRoot":"","sources":["../../src/assets/ArrowSquareOut.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,2BAA2B;AAC3B,MAAM,cAAc,GAAG,CAAC,EAAE,IAAI,GAAG,EAAE,EAAa,EAAE,EAAE,CAAC,CACnD,6BACE,KAAK,EAAC,4BAA4B,EAClC,KAAK,EAAE,IAAI,EACX,MAAM,EAAE,IAAI,EACZ,IAAI,EAAC,cAAc,EACnB,OAAO,EAAC,aAAa;IAErB,8BACE,CAAC,EAAC,yPAAyP,GAC3P,CACE,CACP,CAAA;AAED,eAAe,cAAc,CAAA"}
|
package/dist/assets/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ export * from './PaymentFlags';
|
|
|
2
2
|
export { default as ArrowElbowDownRight } from './ArrowElbowDownRight';
|
|
3
3
|
export { default as ArrowRight } from './ArrowRight';
|
|
4
4
|
export { default as BellRinging } from './BellRinging';
|
|
5
|
+
export { default as ArrowSquareOut } from './ArrowSquareOut';
|
|
5
6
|
export { default as CaretDown } from './CaretDown';
|
|
6
7
|
export { default as Checked } from './Checked';
|
|
7
8
|
export { default as ClockClockwise } from './ClockClockwise';
|
package/dist/assets/index.js
CHANGED
|
@@ -3,6 +3,7 @@ export * from './PaymentFlags';
|
|
|
3
3
|
export { default as ArrowElbowDownRight } from './ArrowElbowDownRight';
|
|
4
4
|
export { default as ArrowRight } from './ArrowRight';
|
|
5
5
|
export { default as BellRinging } from './BellRinging';
|
|
6
|
+
export { default as ArrowSquareOut } from './ArrowSquareOut';
|
|
6
7
|
export { default as CaretDown } from './CaretDown';
|
|
7
8
|
export { default as Checked } from './Checked';
|
|
8
9
|
export { default as ClockClockwise } from './ClockClockwise';
|
package/dist/assets/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/assets/index.ts"],"names":[],"mappings":"AAAA,sBAAsB;AACtB,cAAc,gBAAgB,CAAA;AAE9B,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,uBAAuB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pD,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,SAAS,CAAA;AAC1C,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,aAAa,CAAA;AAClD,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,eAAe,CAAA;AACtD,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAA;AACxD,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,QAAQ,CAAA;AACxC,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,WAAW,CAAA;AAC9C,OAAO,EAAE,OAAO,IAAI,CAAC,EAAE,MAAM,KAAK,CAAA;AAClC,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,WAAW,CAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { default } from './Price';
|
|
2
|
-
export type { PriceProps } from './Price';
|
|
2
|
+
export type { PriceProps, PriceFormatter } from './Price';
|
package/dist/index.d.ts
CHANGED
|
@@ -106,5 +106,7 @@ export { default as PriceRange } from './organisms/PriceRange';
|
|
|
106
106
|
export type { PriceRangeProps } from './organisms/PriceRange';
|
|
107
107
|
export { default as SearchInput } from './organisms/SearchInput';
|
|
108
108
|
export type { SearchInputProps } from './organisms/SearchInput';
|
|
109
|
+
export { default as ShippingSimulation } from './organisms/ShippingSimulation';
|
|
110
|
+
export type { ShippingSimulationProps } from './organisms/ShippingSimulation';
|
|
109
111
|
export { default as SlideOver, SlideOverHeader } from './organisms/SlideOver';
|
|
110
112
|
export type { SlideOverProps, SlideOverHeaderProps, } from './organisms/SlideOver';
|
package/dist/index.js
CHANGED
|
@@ -60,5 +60,6 @@ export { default as OutOfStock } from './organisms/OutOfStock';
|
|
|
60
60
|
export { default as PaymentMethods } from './organisms/PaymentMethods';
|
|
61
61
|
export { default as PriceRange } from './organisms/PriceRange';
|
|
62
62
|
export { default as SearchInput } from './organisms/SearchInput';
|
|
63
|
+
export { default as ShippingSimulation } from './organisms/ShippingSimulation';
|
|
63
64
|
export { default as SlideOver, SlideOverHeader } from './organisms/SlideOver';
|
|
64
65
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,SAAS;AACT,cAAc,UAAU,CAAA;AAExB,QAAQ;AACR,cAAc,SAAS,CAAA;AAEvB,QAAQ;AACR,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,eAAe,CAAA;AAEhD,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,gBAAgB,CAAA;AAElD,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAEtD,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,cAAc,CAAA;AAE9C,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,eAAe,CAAA;AAEhD,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,eAAe,CAAA;AAEhD,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,cAAc,CAAA;AAE9C,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,gBAAgB,CAAA;AAElD,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,cAAc,CAAA;AAE9C,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,iBAAiB,CAAA;AAEpD,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,eAAe,CAAA;AAEhD,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,eAAe,CAAA;AAEhD,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAEtD,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,gBAAgB,CAAA;AAElD,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,gBAAgB,CAA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
value: number;
|
|
7
|
-
listPrice: number;
|
|
8
|
-
formatter: PriceFormatter;
|
|
9
|
-
}
|
|
3
|
+
import { IconButtonProps } from '../../';
|
|
4
|
+
import type { PriceDefinition } from '../../typings/PriceDefinition';
|
|
10
5
|
export interface CartItemProps extends HTMLAttributes<HTMLDivElement> {
|
|
11
6
|
/**
|
|
12
7
|
* ID to find this component in testing tools (e.g.: Cypress, Testing Library, and Jest).
|
|
@@ -15,7 +10,7 @@ export interface CartItemProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
15
10
|
/**
|
|
16
11
|
* Specifies product Price.
|
|
17
12
|
*/
|
|
18
|
-
price?:
|
|
13
|
+
price?: PriceDefinition;
|
|
19
14
|
/**
|
|
20
15
|
* Specifies the quantity of items of the same product.
|
|
21
16
|
*/
|
|
@@ -24,14 +19,14 @@ export interface CartItemProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
24
19
|
* Specifies that this product is unavailable.
|
|
25
20
|
*/
|
|
26
21
|
unavailable?: boolean;
|
|
27
|
-
/**
|
|
28
|
-
* Event emitted when product quantity value is changed.
|
|
29
|
-
*/
|
|
30
|
-
onQuantityChange?: (value: number) => void;
|
|
31
22
|
/**
|
|
32
23
|
* Props for the Remove from cart IconButton component.
|
|
33
24
|
*/
|
|
34
25
|
removeBtnProps?: Partial<IconButtonProps>;
|
|
26
|
+
/**
|
|
27
|
+
* Event emitted when product quantity value is changed.
|
|
28
|
+
*/
|
|
29
|
+
onQuantityChange?: (value: number) => void;
|
|
35
30
|
}
|
|
36
31
|
declare const CartItem: React.ForwardRefExoticComponent<CartItemProps & React.RefAttributes<HTMLDivElement>>;
|
|
37
32
|
export default CartItem;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CartItem.js","sourceRoot":"","sources":["../../../src/molecules/CartItem/CartItem.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAEzC,OAAO,EAAE,OAAO,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C,CAAC,CAAC,EACrC,SAAS,EAAE,KAAK,EAAE,SAAS,EAC3B,OAAO,EAAC,MAAM,EACd,MAAM,EAAC,QAAQ,GACf,CACG,CACH,CACE,CACX,CAAA;AACH,CAAC,CAAC,CAAA;AAEF,eAAe,QAAQ,CAAA"}
|
|
@@ -1,12 +1,6 @@
|
|
|
1
1
|
import type { HTMLAttributes } from 'react';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import type {
|
|
4
|
-
import { Price } from '../../';
|
|
5
|
-
interface Price {
|
|
6
|
-
value: number;
|
|
7
|
-
listPrice: number;
|
|
8
|
-
formatter: PriceFormatter;
|
|
9
|
-
}
|
|
3
|
+
import type { PriceDefinition } from '../../typings/PriceDefinition';
|
|
10
4
|
export interface GiftContentProps extends HTMLAttributes<HTMLElement> {
|
|
11
5
|
/**
|
|
12
6
|
* ID to find this component in testing tools (e.g.: cypress, testing library, and jest).
|
|
@@ -19,7 +13,7 @@ export interface GiftContentProps extends HTMLAttributes<HTMLElement> {
|
|
|
19
13
|
/**
|
|
20
14
|
* Specifies product's prices.
|
|
21
15
|
*/
|
|
22
|
-
price:
|
|
16
|
+
price: PriceDefinition;
|
|
23
17
|
/**
|
|
24
18
|
* Badge's label
|
|
25
19
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GiftContent.js","sourceRoot":"","sources":["../../../src/molecules/Gift/GiftContent.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"GiftContent.js","sourceRoot":"","sources":["../../../src/molecules/Gift/GiftContent.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAEzC,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAA;AA2BrC,MAAM,WAAW,GAAG,UAAU,CAC5B,SAAS,WAAW,CAClB,EACE,KAAK,EACL,WAAW,EACX,YAAY,GAAG,OAAO,EACtB,UAAU,GAAG,MAAM,EACnB,MAAM,GAAG,iBAAiB,EAC1B,GAAG,UAAU,EACd,EACD,GAAG;IAEH,OAAO,CACL,iCACE,GAAG,EAAE,GAAG,+CAEK,MAAM,KACf,UAAU;QAEd;YACG,YAAY;;YAAG,WAAW,CACxB;QACL;YACE,oBAAC,KAAK,IACJ,KAAK,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,EAC7C,SAAS,EAAE,KAAK,EAAE,SAAS,EAC3B,MAAM,EAAC,YAAY,gBACP,KAAK,EAAE,SAAS,EAC5B,OAAO,EAAC,SAAS,EACjB,MAAM,EAAC,iBAAiB,GACxB;YACF,oBAAC,KAAK,QAAE,UAAU,CAAS,CACtB,CACC,CACX,CAAA;AACH,CAAC,CACF,CAAA;AAED,eAAe,WAAW,CAAA"}
|
|
@@ -1,12 +1,7 @@
|
|
|
1
1
|
import type { HTMLAttributes } from 'react';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import type {
|
|
4
|
-
import {
|
|
5
|
-
interface Price {
|
|
6
|
-
value: number;
|
|
7
|
-
listPrice: number;
|
|
8
|
-
formatter: PriceFormatter;
|
|
9
|
-
}
|
|
3
|
+
import type { PriceDefinition } from '../../typings/PriceDefinition';
|
|
4
|
+
import { LinkProps, LinkElementType } from '../../';
|
|
10
5
|
export interface ProductCardContentProps extends HTMLAttributes<HTMLElement> {
|
|
11
6
|
/**
|
|
12
7
|
* ID to find this component in testing tools (e.g.: cypress, testing library, and jest).
|
|
@@ -23,7 +18,7 @@ export interface ProductCardContentProps extends HTMLAttributes<HTMLElement> {
|
|
|
23
18
|
/**
|
|
24
19
|
* Specifies product's prices.
|
|
25
20
|
*/
|
|
26
|
-
price?:
|
|
21
|
+
price?: PriceDefinition;
|
|
27
22
|
/**
|
|
28
23
|
* Enables a outOfStock status.
|
|
29
24
|
*/
|
|
@@ -36,10 +31,6 @@ export interface ProductCardContentProps extends HTMLAttributes<HTMLElement> {
|
|
|
36
31
|
* Specifies Rating Value of the product.
|
|
37
32
|
*/
|
|
38
33
|
ratingValue?: number;
|
|
39
|
-
/**
|
|
40
|
-
* Callback function when button is clicked.
|
|
41
|
-
*/
|
|
42
|
-
onButtonClick?: () => void;
|
|
43
34
|
/**
|
|
44
35
|
* Specifies the button's label.
|
|
45
36
|
*/
|
|
@@ -48,6 +39,10 @@ export interface ProductCardContentProps extends HTMLAttributes<HTMLElement> {
|
|
|
48
39
|
* Enables a DiscountBadge to the component.
|
|
49
40
|
*/
|
|
50
41
|
showDiscountBadge?: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Callback function when button is clicked.
|
|
44
|
+
*/
|
|
45
|
+
onButtonClick?: () => void;
|
|
51
46
|
}
|
|
52
47
|
declare const ProductCardContent: React.ForwardRefExoticComponent<ProductCardContentProps & React.RefAttributes<HTMLElement>>;
|
|
53
48
|
export default ProductCardContent;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProductCardContent.js","sourceRoot":"","sources":["../../../src/molecules/ProductCard/ProductCardContent.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAIzC,OAAO,EACL,IAAI,EACJ,KAAK,EACL,KAAK,EACL,MAAM,EACN,MAAM,EACN,aAAa,GAGd,MAAM,QAAQ,CAAA;AACf,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;
|
|
1
|
+
{"version":3,"file":"ProductCardContent.js","sourceRoot":"","sources":["../../../src/molecules/ProductCard/ProductCardContent.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAIzC,OAAO,EACL,IAAI,EACJ,KAAK,EACL,KAAK,EACL,MAAM,EACN,MAAM,EACN,aAAa,GAGd,MAAM,QAAQ,CAAA;AACf,OAAO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AS,CAAC,CAAC,CAAC,CAAC,EACjD,SAAS,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,GACzC,CACH;QACA,UAAU,IAAI,oBAAC,KAAK,QAAE,eAAe,CAAS;QAC9C,aAAa,IAAI,CAAC,UAAU,IAAI,CAC/B;YACE,oBAAC,MAAM,IACL,OAAO,EAAC,SAAS,EACjB,IAAI,EAAE,oBAAC,YAAY,OAAG,EACtB,YAAY,EAAC,MAAM,EACnB,IAAI,EAAC,OAAO,EACZ,OAAO,EAAE,aAAa,IAErB,WAAW,CACL,CACL,CACP,CACO,CACX,CAAA;AACH,CAAC,CACF,CAAA;AAED,eAAe,kBAAkB,CAAA"}
|
|
@@ -1,11 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import type { PriceFormatter } from '../../atoms/Price/Price';
|
|
4
|
-
interface Price {
|
|
5
|
-
value: number;
|
|
6
|
-
listPrice: number;
|
|
7
|
-
formatter: PriceFormatter;
|
|
8
|
-
}
|
|
2
|
+
import type { PriceDefinition } from '../../typings/PriceDefinition';
|
|
9
3
|
export interface SearchProductItemContentProps {
|
|
10
4
|
/**
|
|
11
5
|
* Specifies the product's title.
|
|
@@ -14,7 +8,7 @@ export interface SearchProductItemContentProps {
|
|
|
14
8
|
/**
|
|
15
9
|
* Specifies product's prices.
|
|
16
10
|
*/
|
|
17
|
-
price:
|
|
11
|
+
price: PriceDefinition;
|
|
18
12
|
}
|
|
19
13
|
declare const SearchProductItemContent: React.ForwardRefExoticComponent<SearchProductItemContentProps & React.RefAttributes<HTMLElement>>;
|
|
20
14
|
export default SearchProductItemContent;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchProductItemContent.js","sourceRoot":"","sources":["../../../src/molecules/SearchProducts/SearchProductItemContent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AACzC,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"SearchProductItemContent.js","sourceRoot":"","sources":["../../../src/molecules/SearchProducts/SearchProductItemContent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AACzC,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAA;AAe7B,MAAM,wBAAwB,GAAG,UAAU,CAGzC,SAAS,wBAAwB,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,UAAU,EAAE,EAAE,GAAG;IACtE,OAAO,CACL,iCAAS,GAAG,EAAE,GAAG,kDAA0C,UAAU;QACnE,wEAAsC,KAAK,CAAK;QAChD;YACE,oBAAC,KAAK,IACJ,KAAK,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,EAC7C,SAAS,EAAE,KAAK,EAAE,SAAS,EAC3B,MAAM,EAAC,YAAY,gBACP,KAAK,EAAE,SAAS,EAC5B,OAAO,EAAC,SAAS,EACjB,MAAM,EAAC,iBAAiB,GACxB;YACF,oBAAC,KAAK,IACJ,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EACrC,SAAS,EAAE,KAAK,EAAE,SAAS,EAC3B,MAAM,EAAC,OAAO,gBACF,KAAK,EAAE,KAAK,EACxB,OAAO,EAAC,MAAM,EACd,MAAM,EAAC,QAAQ,GACf,CACG,CACC,CACX,CAAA;AACH,CAAC,CAAC,CAAA;AAEF,eAAe,wBAAwB,CAAA"}
|
|
@@ -7,25 +7,25 @@ export interface FilterSliderProps {
|
|
|
7
7
|
*/
|
|
8
8
|
title?: string;
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
10
|
+
* Represents the side that the FilterSlider comes from.
|
|
11
11
|
*/
|
|
12
|
-
|
|
12
|
+
direction: SlideOverDirection;
|
|
13
13
|
/**
|
|
14
|
-
*
|
|
14
|
+
* Represents the size of the FilterSlider.
|
|
15
15
|
*/
|
|
16
|
-
|
|
16
|
+
size: SlideOverWidthSize;
|
|
17
17
|
/**
|
|
18
|
-
*
|
|
18
|
+
* Props for the Apply Button from FilterSlider component.
|
|
19
19
|
*/
|
|
20
|
-
|
|
20
|
+
applyBtnProps?: Partial<ButtonProps>;
|
|
21
21
|
/**
|
|
22
|
-
*
|
|
22
|
+
* Props for the Clear Button from FilterSlider component.
|
|
23
23
|
*/
|
|
24
|
-
|
|
24
|
+
clearBtnProps?: Partial<ButtonProps>;
|
|
25
25
|
/**
|
|
26
|
-
*
|
|
26
|
+
* Function called when Close Button is clicked.
|
|
27
27
|
*/
|
|
28
|
-
|
|
28
|
+
onClose: () => void;
|
|
29
29
|
}
|
|
30
|
-
declare function FilterSlider({ title,
|
|
30
|
+
declare function FilterSlider({ title, size, direction, children, applyBtnProps, clearBtnProps, onClose, }: PropsWithChildren<FilterSliderProps>): JSX.Element;
|
|
31
31
|
export default FilterSlider;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Button, SlideOver, SlideOverHeader, useFadeEffect, useUI, } from '../../';
|
|
3
|
-
function FilterSlider({ title,
|
|
4
|
-
const { closeFilter } = useUI();
|
|
3
|
+
function FilterSlider({ title, size, direction, children, applyBtnProps, clearBtnProps, onClose, }) {
|
|
5
4
|
const { fade, fadeOut } = useFadeEffect();
|
|
5
|
+
const { closeFilter } = useUI();
|
|
6
6
|
return (React.createElement(SlideOver, { "data-fs-filter-slider": true, isOpen: true, fade: fade, onDismiss: fadeOut, size: size, direction: direction, onTransitionEnd: () => fade === 'out' && closeFilter() },
|
|
7
7
|
React.createElement("div", { "data-fs-filter-slider-content": true },
|
|
8
8
|
React.createElement(SlideOverHeader, { onClose: () => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FilterSlider.js","sourceRoot":"","sources":["../../../src/organisms/Filter/FilterSlider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4B,MAAM,OAAO,CAAA;AAEhD,OAAO,EACL,MAAM,EAEN,SAAS,EACT,eAAe,EACf,aAAa,EACb,KAAK,GACN,MAAM,QAAQ,CAAA;AA+Bf,SAAS,YAAY,CAAC,EACpB,KAAK,EACL,
|
|
1
|
+
{"version":3,"file":"FilterSlider.js","sourceRoot":"","sources":["../../../src/organisms/Filter/FilterSlider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4B,MAAM,OAAO,CAAA;AAEhD,OAAO,EACL,MAAM,EAEN,SAAS,EACT,eAAe,EACf,aAAa,EACb,KAAK,GACN,MAAM,QAAQ,CAAA;AA+Bf,SAAS,YAAY,CAAC,EACpB,KAAK,EACL,IAAI,EACJ,SAAS,EACT,QAAQ,EACR,aAAa,EACb,aAAa,EACb,OAAO,GAC8B;IACrC,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,aAAa,EAAE,CAAA;IACzC,MAAM,EAAE,WAAW,EAAE,GAAG,KAAK,EAAE,CAAA;IAE/B,OAAO,CACL,oBAAC,SAAS,mCAER,MAAM,QACN,IAAI,EAAE,IAAI,EACV,SAAS,EAAE,OAAO,EAClB,IAAI,EAAE,IAAI,EACV,SAAS,EAAE,SAAS,EACpB,eAAe,EAAE,GAAG,EAAE,CAAC,IAAI,KAAK,KAAK,IAAI,WAAW,EAAE;QAEtD;YACE,oBAAC,eAAe,IACd,OAAO,EAAE,GAAG,EAAE;oBACZ,OAAO,EAAE,CAAA;oBACT,OAAO,EAAE,CAAA;gBACX,CAAC;gBAED,mEAAiC,KAAK,CAAM,CAC5B;YACjB,QAAQ,CACL;QACN;YACE,oBAAC,MAAM,0DAA+C,aAAa,GAAI;YACvE,oBAAC,MAAM,sEAEO,4BAA4B,KACpC,aAAa,EACjB,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE;oBACb,aAAa,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,CAAA;oBAC3B,OAAO,EAAE,CAAA;gBACX,CAAC,GACD,CACK,CACC,CACb,CAAA;AACH,CAAC;AAED,eAAe,YAAY,CAAA"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import type { HTMLAttributes } from 'react';
|
|
2
|
+
import type { PriceFormatter } from '../../atoms/Price/Price';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { LinkProps, LinkElementType } from '../..';
|
|
5
|
+
interface ShippingSLA {
|
|
6
|
+
/**
|
|
7
|
+
* ShippingSLA carrier.
|
|
8
|
+
*/
|
|
9
|
+
carrier: string;
|
|
10
|
+
/**
|
|
11
|
+
* ShippingSLA localized shipping estimate.
|
|
12
|
+
*/
|
|
13
|
+
localizedEstimates: string;
|
|
14
|
+
/**
|
|
15
|
+
* ShippingSLA price.
|
|
16
|
+
*/
|
|
17
|
+
price: number;
|
|
18
|
+
}
|
|
19
|
+
export interface ShippingSimulationProps extends HTMLAttributes<HTMLDivElement> {
|
|
20
|
+
/**
|
|
21
|
+
* ID to find this component in testing tools (e.g.: cypress,
|
|
22
|
+
* testing-library, and jest).
|
|
23
|
+
*/
|
|
24
|
+
testId?: string;
|
|
25
|
+
/**
|
|
26
|
+
* Formatter function that transforms the raw price value and render the result.
|
|
27
|
+
*/
|
|
28
|
+
formatter: PriceFormatter;
|
|
29
|
+
/**
|
|
30
|
+
* The Shipping Suggestions Section's title.
|
|
31
|
+
*/
|
|
32
|
+
title?: string;
|
|
33
|
+
/**
|
|
34
|
+
* The text displayed to Shipping Simulation input text.
|
|
35
|
+
*/
|
|
36
|
+
inputLabel?: string;
|
|
37
|
+
/**
|
|
38
|
+
* The text displayed in Shipping options table.
|
|
39
|
+
*/
|
|
40
|
+
optionsLabel?: string;
|
|
41
|
+
/**
|
|
42
|
+
* Props for the link for i don't know my postal code.
|
|
43
|
+
*/
|
|
44
|
+
idkPostalCodeLinkProps?: Partial<LinkProps<LinkElementType>>;
|
|
45
|
+
/**
|
|
46
|
+
* Callback function when input is typed.
|
|
47
|
+
*/
|
|
48
|
+
onInput?: (event: React.FormEvent<HTMLInputElement>) => void;
|
|
49
|
+
/**
|
|
50
|
+
* Callback function when form is submitted.
|
|
51
|
+
*/
|
|
52
|
+
onSubmit?: () => void;
|
|
53
|
+
/**
|
|
54
|
+
* Callback function when the clear button is clicked.
|
|
55
|
+
*/
|
|
56
|
+
onClear?: () => void;
|
|
57
|
+
/**
|
|
58
|
+
* Location for shipping.
|
|
59
|
+
*/
|
|
60
|
+
location?: string;
|
|
61
|
+
/**
|
|
62
|
+
* Options for shipping simulation.
|
|
63
|
+
*/
|
|
64
|
+
options?: ShippingSLA[];
|
|
65
|
+
/**
|
|
66
|
+
* Show clear button.
|
|
67
|
+
*/
|
|
68
|
+
displayClearButton?: boolean;
|
|
69
|
+
/**
|
|
70
|
+
* Message of error.
|
|
71
|
+
*/
|
|
72
|
+
errorMessage?: string;
|
|
73
|
+
/**
|
|
74
|
+
* Postal code.
|
|
75
|
+
*/
|
|
76
|
+
postalCode?: string;
|
|
77
|
+
}
|
|
78
|
+
declare function ShippingSimulation({ testId, formatter, title, inputLabel, optionsLabel, idkPostalCodeLinkProps, onInput, onSubmit, onClear, location, options, displayClearButton, errorMessage, postalCode, ...otherProps }: ShippingSimulationProps): JSX.Element;
|
|
79
|
+
export default ShippingSimulation;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ArrowSquareOut } from '../../assets';
|
|
3
|
+
import { Icon, Link, Table, TableBody, TableCell, TableRow, InputField, Price, } from '../..';
|
|
4
|
+
function ShippingSimulation({ testId = 'fs-shipping-simulation', formatter, title = "Shipping", inputLabel = "Postal Code", optionsLabel = "Shipping options", idkPostalCodeLinkProps, onInput, onSubmit, onClear, location, options = [], displayClearButton = false, errorMessage, postalCode, ...otherProps }) {
|
|
5
|
+
const hasShippingOptions = !!options && options.length > 0;
|
|
6
|
+
return (React.createElement("section", { "data-fs-shipping-simulation": true, "data-fs-shipping-simulation-empty": !hasShippingOptions ? "true" : "false", "data-testid": testId, ...otherProps },
|
|
7
|
+
React.createElement("h2", { "data-fs-shipping-simulation-title": true }, title),
|
|
8
|
+
React.createElement(InputField, { actionable: true, error: errorMessage, id: `${testId}-input-field`, label: inputLabel, value: postalCode, onInput: (event) => onInput?.(event), onSubmit: () => onSubmit?.(), onClear: () => onClear?.(), displayClearButton: displayClearButton }),
|
|
9
|
+
React.createElement(Link, { href: "/", "data-fs-shipping-simulation-link": true, size: "small", ...idkPostalCodeLinkProps }, idkPostalCodeLinkProps?.children ??
|
|
10
|
+
React.createElement(React.Fragment, null,
|
|
11
|
+
"I don't know my Postal Code",
|
|
12
|
+
React.createElement(Icon, { component: React.createElement(ArrowSquareOut, null) }))),
|
|
13
|
+
hasShippingOptions && (React.createElement(React.Fragment, null,
|
|
14
|
+
React.createElement("header", { "data-fs-shipping-simulation-header": true },
|
|
15
|
+
React.createElement("h3", { "data-fs-shipping-simulation-subtitle": true }, optionsLabel),
|
|
16
|
+
React.createElement("p", { "data-fs-shipping-simulation-location": true }, location)),
|
|
17
|
+
React.createElement(Table, null,
|
|
18
|
+
React.createElement(TableBody, null, options.map((option) => (React.createElement(TableRow, { key: option.carrier },
|
|
19
|
+
React.createElement(TableCell, { align: "left" }, option.carrier),
|
|
20
|
+
React.createElement(TableCell, null, option.localizedEstimates),
|
|
21
|
+
React.createElement(TableCell, { align: "right" }, option.price && (React.createElement(Price, { formatter: formatter, value: option.price, SRText: "price" }))))))))))));
|
|
22
|
+
}
|
|
23
|
+
export default ShippingSimulation;
|
|
24
|
+
//# sourceMappingURL=ShippingSimulation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ShippingSimulation.js","sourceRoot":"","sources":["../../../src/organisms/ShippingSimulation/ShippingSimulation.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,cAAc,EAAE,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,CACtC,CAEA;QAEN,kBAAkB,IAAI,CACrB;YACE;gBACE,4EAA0C,YAAY,CAAM;gBAC5D,2EACG,QAAQ,CACP,CACG;YAET,oBAAC,KAAK;gBACJ,oBAAC,SAAS,QACP,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CACvB,oBAAC,QAAQ,IAAC,GAAG,EAAE,MAAM,CAAC,OAAO;oBAC3B,oBAAC,SAAS,IAAC,KAAK,EAAC,MAAM,IAAE,MAAM,CAAC,OAAO,CAAa;oBACpD,oBAAC,SAAS,QAAE,MAAM,CAAC,kBAAkB,CAAa;oBAClD,oBAAC,SAAS,IAAC,KAAK,EAAC,OAAO,IACrB,MAAM,CAAC,KAAK,IAAI,CACf,oBAAC,KAAK,IACJ,SAAS,EAAE,SAAS,EACpB,KAAK,EAAE,MAAM,CAAC,KAAK,EACnB,MAAM,EAAC,OAAO,GACd,CACH,CACS,CACH,CACZ,CAAC,CACQ,CACN,CACP,CACJ,CACO,CACX,CAAA;AACH,CAAC;AAED,eAAe,kBAAkB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/organisms/ShippingSimulation/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA"}
|
|
@@ -2,7 +2,7 @@ import type { ReactNode } from 'react';
|
|
|
2
2
|
import type { ModalProps } from '../../';
|
|
3
3
|
export type Direction = 'leftSide' | 'rightSide';
|
|
4
4
|
export type WidthSize = 'full' | 'partial';
|
|
5
|
-
export
|
|
5
|
+
export interface SlideOverProps extends Omit<ModalProps, 'title'> {
|
|
6
6
|
/**
|
|
7
7
|
* ID to find this component in testing tools (e.g.: cypress, testing library, and jest).
|
|
8
8
|
*/
|
|
@@ -23,12 +23,12 @@ export type SlideOverProps = Omit<ModalProps, 'title'> & {
|
|
|
23
23
|
* Represents the fade effect of the SlideOver.
|
|
24
24
|
*/
|
|
25
25
|
fade: 'in' | 'out';
|
|
26
|
+
children: ReactNode;
|
|
26
27
|
/**
|
|
27
28
|
* This function is called whenever the user clicks outside.
|
|
28
29
|
* the modal content
|
|
29
30
|
*/
|
|
30
31
|
onDismiss?: () => void;
|
|
31
|
-
|
|
32
|
-
};
|
|
32
|
+
}
|
|
33
33
|
declare function SlideOver({ isOpen, direction, size, fade, children, onDismiss, testId, ...otherProps }: SlideOverProps): JSX.Element;
|
|
34
34
|
export default SlideOver;
|
|
@@ -10,7 +10,10 @@ export interface SlideOverHeaderProps extends Omit<HTMLAttributes<HTMLDivElement
|
|
|
10
10
|
* Props for the Close Button component.
|
|
11
11
|
*/
|
|
12
12
|
closeBtnProps?: Partial<Omit<IconButtonProps, 'onClick'>>;
|
|
13
|
+
/**
|
|
14
|
+
* Function called when Close Button is clicked.
|
|
15
|
+
*/
|
|
13
16
|
onClose: () => void;
|
|
14
17
|
}
|
|
15
|
-
declare const SlideOverHeader: ({
|
|
18
|
+
declare const SlideOverHeader: ({ children, closeBtnProps, onClose, }: SlideOverHeaderProps) => JSX.Element;
|
|
16
19
|
export default SlideOverHeader;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { X } from '../../assets';
|
|
3
3
|
import { IconButton } from '../../';
|
|
4
|
-
const SlideOverHeader = ({
|
|
4
|
+
const SlideOverHeader = ({ children, closeBtnProps = {}, onClose, }) => {
|
|
5
5
|
return (React.createElement("header", { "data-fs-slide-over-header": true },
|
|
6
6
|
children,
|
|
7
7
|
React.createElement(IconButton, { "data-fs-slide-over-header-icon": true, "aria-label": "Close", icon: React.createElement(X, null), onClick: onClose, ...closeBtnProps })));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SlideOverHeader.js","sourceRoot":"","sources":["../../../src/organisms/SlideOver/SlideOverHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAyB,MAAM,OAAO,CAAA;AAE7C,OAAO,EAAE,CAAC,EAAE,MAAM,cAAc,CAAA;AAChC,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAA;
|
|
1
|
+
{"version":3,"file":"SlideOverHeader.js","sourceRoot":"","sources":["../../../src/organisms/SlideOver/SlideOverHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAyB,MAAM,OAAO,CAAA;AAE7C,OAAO,EAAE,CAAC,EAAE,MAAM,cAAc,CAAA;AAChC,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAA;AAmBnC,MAAM,eAAe,GAAG,CAAC,EACvB,QAAQ,EACR,aAAa,GAAG,EAAE,EAClB,OAAO,GACc,EAAE,EAAE;IACzB,OAAO,CACL;QACG,QAAQ;QACT,oBAAC,UAAU,0DAEE,OAAO,EAClB,IAAI,EAAE,oBAAC,CAAC,OAAG,EACX,OAAO,EAAE,OAAO,KACZ,aAAa,GACjB,CACK,CACV,CAAA;AACH,CAAC,CAAA;AAED,eAAe,eAAe,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PriceDefinition.js","sourceRoot":"","sources":["../../src/typings/PriceDefinition.ts"],"names":[],"mappings":""}
|
package/dist/typings/index.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@faststore/components",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.94-alpha.0",
|
|
4
4
|
"module": "dist/index.js",
|
|
5
5
|
"typings": "dist/index.d.ts",
|
|
6
6
|
"author": "Emerson Laurentino @emersonlaurentino",
|
|
@@ -30,5 +30,5 @@
|
|
|
30
30
|
"node": "16.18.0",
|
|
31
31
|
"yarn": "1.19.1"
|
|
32
32
|
},
|
|
33
|
-
"gitHead": "
|
|
33
|
+
"gitHead": "8ca8da8718c287610dd6858b1e552f3af81c6c5a"
|
|
34
34
|
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import { IconProps } from './IconProps'
|
|
3
|
+
|
|
4
|
+
// Icon from Phosphor Icons
|
|
5
|
+
const ArrowSquareOut = ({ size = 20 }: IconProps) => (
|
|
6
|
+
<svg
|
|
7
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
8
|
+
width={size}
|
|
9
|
+
height={size}
|
|
10
|
+
fill="currentColor"
|
|
11
|
+
viewBox="0 0 256 256"
|
|
12
|
+
>
|
|
13
|
+
<path
|
|
14
|
+
d="M224,104a8,8,0,0,1-16,0V59.32l-66.33,66.34a8,8,0,0,1-11.32-11.32L196.68,48H152a8,8,0,0,1,0-16h64a8,8,0,0,1,8,8Zm-40,24a8,8,0,0,0-8,8v72H48V80h72a8,8,0,0,0,0-16H48A16,16,0,0,0,32,80V208a16,16,0,0,0,16,16H176a16,16,0,0,0,16-16V136A8,8,0,0,0,184,128Z"
|
|
15
|
+
/>
|
|
16
|
+
</svg>
|
|
17
|
+
)
|
|
18
|
+
|
|
19
|
+
export default ArrowSquareOut
|
package/src/assets/index.ts
CHANGED
|
@@ -4,6 +4,7 @@ export * from './PaymentFlags'
|
|
|
4
4
|
export { default as ArrowElbowDownRight } from './ArrowElbowDownRight'
|
|
5
5
|
export { default as ArrowRight } from './ArrowRight'
|
|
6
6
|
export { default as BellRinging } from './BellRinging'
|
|
7
|
+
export { default as ArrowSquareOut } from './ArrowSquareOut'
|
|
7
8
|
export { default as CaretDown } from './CaretDown'
|
|
8
9
|
export { default as Checked } from './Checked'
|
|
9
10
|
export { default as ClockClockwise } from './ClockClockwise'
|
package/src/atoms/Price/index.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { default } from './Price'
|
|
2
|
-
export type { PriceProps } from './Price'
|
|
2
|
+
export type { PriceProps, PriceFormatter } from './Price'
|
package/src/index.ts
CHANGED
|
@@ -227,6 +227,9 @@ export type { PriceRangeProps } from './organisms/PriceRange'
|
|
|
227
227
|
export { default as SearchInput } from './organisms/SearchInput'
|
|
228
228
|
export type { SearchInputProps } from './organisms/SearchInput'
|
|
229
229
|
|
|
230
|
+
export { default as ShippingSimulation } from './organisms/ShippingSimulation'
|
|
231
|
+
export type { ShippingSimulationProps } from './organisms/ShippingSimulation'
|
|
232
|
+
|
|
230
233
|
export { default as SlideOver, SlideOverHeader } from './organisms/SlideOver'
|
|
231
234
|
export type {
|
|
232
235
|
SlideOverProps,
|
|
@@ -4,13 +4,7 @@ import React, { forwardRef } from 'react'
|
|
|
4
4
|
import { XCircle } from '../../assets'
|
|
5
5
|
import { IconButton, IconButtonProps, Price, QuantitySelector } from '../../'
|
|
6
6
|
|
|
7
|
-
import type {
|
|
8
|
-
|
|
9
|
-
interface Price {
|
|
10
|
-
value: number
|
|
11
|
-
listPrice: number
|
|
12
|
-
formatter: PriceFormatter
|
|
13
|
-
}
|
|
7
|
+
import type { PriceDefinition } from '../../typings/PriceDefinition'
|
|
14
8
|
|
|
15
9
|
export interface CartItemProps extends HTMLAttributes<HTMLDivElement> {
|
|
16
10
|
/**
|
|
@@ -20,7 +14,7 @@ export interface CartItemProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
20
14
|
/**
|
|
21
15
|
* Specifies product Price.
|
|
22
16
|
*/
|
|
23
|
-
price?:
|
|
17
|
+
price?: PriceDefinition
|
|
24
18
|
/**
|
|
25
19
|
* Specifies the quantity of items of the same product.
|
|
26
20
|
*/
|
|
@@ -29,14 +23,14 @@ export interface CartItemProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
29
23
|
* Specifies that this product is unavailable.
|
|
30
24
|
*/
|
|
31
25
|
unavailable?: boolean
|
|
32
|
-
/**
|
|
33
|
-
* Event emitted when product quantity value is changed.
|
|
34
|
-
*/
|
|
35
|
-
onQuantityChange?: (value: number) => void
|
|
36
26
|
/**
|
|
37
27
|
* Props for the Remove from cart IconButton component.
|
|
38
28
|
*/
|
|
39
29
|
removeBtnProps?: Partial<IconButtonProps>
|
|
30
|
+
/**
|
|
31
|
+
* Event emitted when product quantity value is changed.
|
|
32
|
+
*/
|
|
33
|
+
onQuantityChange?: (value: number) => void
|
|
40
34
|
}
|
|
41
35
|
|
|
42
36
|
const CartItem = forwardRef<HTMLDivElement, CartItemProps>(function CartItem(
|
|
@@ -1,15 +1,9 @@
|
|
|
1
1
|
import type { HTMLAttributes } from 'react'
|
|
2
2
|
import React, { forwardRef } from 'react'
|
|
3
3
|
|
|
4
|
-
import type { PriceFormatter } from '../../atoms/Price/Price'
|
|
5
|
-
|
|
6
4
|
import { Price, Badge } from '../../'
|
|
7
5
|
|
|
8
|
-
|
|
9
|
-
value: number
|
|
10
|
-
listPrice: number
|
|
11
|
-
formatter: PriceFormatter
|
|
12
|
-
}
|
|
6
|
+
import type { PriceDefinition } from '../../typings/PriceDefinition'
|
|
13
7
|
|
|
14
8
|
export interface GiftContentProps extends HTMLAttributes<HTMLElement> {
|
|
15
9
|
/**
|
|
@@ -23,7 +17,7 @@ export interface GiftContentProps extends HTMLAttributes<HTMLElement> {
|
|
|
23
17
|
/**
|
|
24
18
|
* Specifies product's prices.
|
|
25
19
|
*/
|
|
26
|
-
price:
|
|
20
|
+
price: PriceDefinition
|
|
27
21
|
/**
|
|
28
22
|
* Badge's label
|
|
29
23
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { HTMLAttributes } from 'react'
|
|
2
2
|
import React, { forwardRef } from 'react'
|
|
3
3
|
|
|
4
|
-
import type {
|
|
4
|
+
import type { PriceDefinition } from '../../typings/PriceDefinition'
|
|
5
5
|
|
|
6
6
|
import {
|
|
7
7
|
Link,
|
|
@@ -15,12 +15,6 @@ import {
|
|
|
15
15
|
} from '../../'
|
|
16
16
|
import { Star, ShoppingCart } from '../../assets'
|
|
17
17
|
|
|
18
|
-
interface Price {
|
|
19
|
-
value: number
|
|
20
|
-
listPrice: number
|
|
21
|
-
formatter: PriceFormatter
|
|
22
|
-
}
|
|
23
|
-
|
|
24
18
|
export interface ProductCardContentProps extends HTMLAttributes<HTMLElement> {
|
|
25
19
|
/**
|
|
26
20
|
* ID to find this component in testing tools (e.g.: cypress, testing library, and jest).
|
|
@@ -37,7 +31,7 @@ export interface ProductCardContentProps extends HTMLAttributes<HTMLElement> {
|
|
|
37
31
|
/**
|
|
38
32
|
* Specifies product's prices.
|
|
39
33
|
*/
|
|
40
|
-
price?:
|
|
34
|
+
price?: PriceDefinition
|
|
41
35
|
/**
|
|
42
36
|
* Enables a outOfStock status.
|
|
43
37
|
*/
|
|
@@ -50,10 +44,6 @@ export interface ProductCardContentProps extends HTMLAttributes<HTMLElement> {
|
|
|
50
44
|
* Specifies Rating Value of the product.
|
|
51
45
|
*/
|
|
52
46
|
ratingValue?: number
|
|
53
|
-
/**
|
|
54
|
-
* Callback function when button is clicked.
|
|
55
|
-
*/
|
|
56
|
-
onButtonClick?: () => void
|
|
57
47
|
/**
|
|
58
48
|
* Specifies the button's label.
|
|
59
49
|
*/
|
|
@@ -62,6 +52,10 @@ export interface ProductCardContentProps extends HTMLAttributes<HTMLElement> {
|
|
|
62
52
|
* Enables a DiscountBadge to the component.
|
|
63
53
|
*/
|
|
64
54
|
showDiscountBadge?: boolean
|
|
55
|
+
/**
|
|
56
|
+
* Callback function when button is clicked.
|
|
57
|
+
*/
|
|
58
|
+
onButtonClick?: () => void
|
|
65
59
|
}
|
|
66
60
|
|
|
67
61
|
const ProductCardContent = forwardRef<HTMLElement, ProductCardContentProps>(
|
|
@@ -1,12 +1,7 @@
|
|
|
1
1
|
import React, { forwardRef } from 'react'
|
|
2
2
|
import { Price } from '../..'
|
|
3
|
-
import type { PriceFormatter } from '../../atoms/Price/Price'
|
|
4
3
|
|
|
5
|
-
|
|
6
|
-
value: number
|
|
7
|
-
listPrice: number
|
|
8
|
-
formatter: PriceFormatter
|
|
9
|
-
}
|
|
4
|
+
import type { PriceDefinition } from '../../typings/PriceDefinition'
|
|
10
5
|
|
|
11
6
|
export interface SearchProductItemContentProps {
|
|
12
7
|
/**
|
|
@@ -16,7 +11,7 @@ export interface SearchProductItemContentProps {
|
|
|
16
11
|
/**
|
|
17
12
|
* Specifies product's prices.
|
|
18
13
|
*/
|
|
19
|
-
price:
|
|
14
|
+
price: PriceDefinition
|
|
20
15
|
}
|
|
21
16
|
|
|
22
17
|
const SearchProductItemContent = forwardRef<
|
|
@@ -17,38 +17,38 @@ export interface FilterSliderProps {
|
|
|
17
17
|
*/
|
|
18
18
|
title?: string
|
|
19
19
|
/**
|
|
20
|
-
*
|
|
20
|
+
* Represents the side that the FilterSlider comes from.
|
|
21
21
|
*/
|
|
22
|
-
|
|
22
|
+
direction: SlideOverDirection
|
|
23
23
|
/**
|
|
24
|
-
*
|
|
24
|
+
* Represents the size of the FilterSlider.
|
|
25
25
|
*/
|
|
26
|
-
|
|
26
|
+
size: SlideOverWidthSize
|
|
27
27
|
/**
|
|
28
|
-
*
|
|
28
|
+
* Props for the Apply Button from FilterSlider component.
|
|
29
29
|
*/
|
|
30
|
-
|
|
30
|
+
applyBtnProps?: Partial<ButtonProps>
|
|
31
31
|
/**
|
|
32
|
-
*
|
|
32
|
+
* Props for the Clear Button from FilterSlider component.
|
|
33
33
|
*/
|
|
34
|
-
|
|
34
|
+
clearBtnProps?: Partial<ButtonProps>
|
|
35
35
|
/**
|
|
36
|
-
*
|
|
36
|
+
* Function called when Close Button is clicked.
|
|
37
37
|
*/
|
|
38
|
-
|
|
38
|
+
onClose: () => void
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
function FilterSlider({
|
|
42
42
|
title,
|
|
43
|
-
clearBtnProps,
|
|
44
|
-
applyBtnProps,
|
|
45
|
-
onClose,
|
|
46
43
|
size,
|
|
47
44
|
direction,
|
|
48
45
|
children,
|
|
46
|
+
applyBtnProps,
|
|
47
|
+
clearBtnProps,
|
|
48
|
+
onClose,
|
|
49
49
|
}: PropsWithChildren<FilterSliderProps>) {
|
|
50
|
-
const { closeFilter } = useUI()
|
|
51
50
|
const { fade, fadeOut } = useFadeEffect()
|
|
51
|
+
const { closeFilter } = useUI()
|
|
52
52
|
|
|
53
53
|
return (
|
|
54
54
|
<SlideOver
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
import type { HTMLAttributes } from 'react'
|
|
2
|
+
import type { PriceFormatter } from '../../atoms/Price/Price'
|
|
3
|
+
|
|
4
|
+
import React from 'react'
|
|
5
|
+
|
|
6
|
+
import { ArrowSquareOut } from '../../assets'
|
|
7
|
+
|
|
8
|
+
import {
|
|
9
|
+
Icon,
|
|
10
|
+
Link,
|
|
11
|
+
Table,
|
|
12
|
+
TableBody,
|
|
13
|
+
TableCell,
|
|
14
|
+
TableRow,
|
|
15
|
+
InputField,
|
|
16
|
+
Price,
|
|
17
|
+
LinkProps,
|
|
18
|
+
LinkElementType,
|
|
19
|
+
} from '../..'
|
|
20
|
+
|
|
21
|
+
interface ShippingSLA {
|
|
22
|
+
/**
|
|
23
|
+
* ShippingSLA carrier.
|
|
24
|
+
*/
|
|
25
|
+
carrier: string
|
|
26
|
+
/**
|
|
27
|
+
* ShippingSLA localized shipping estimate.
|
|
28
|
+
*/
|
|
29
|
+
localizedEstimates: string
|
|
30
|
+
/**
|
|
31
|
+
* ShippingSLA price.
|
|
32
|
+
*/
|
|
33
|
+
price: number
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export interface ShippingSimulationProps
|
|
37
|
+
extends HTMLAttributes<HTMLDivElement> {
|
|
38
|
+
/**
|
|
39
|
+
* ID to find this component in testing tools (e.g.: cypress,
|
|
40
|
+
* testing-library, and jest).
|
|
41
|
+
*/
|
|
42
|
+
testId?: string
|
|
43
|
+
/**
|
|
44
|
+
* Formatter function that transforms the raw price value and render the result.
|
|
45
|
+
*/
|
|
46
|
+
formatter: PriceFormatter
|
|
47
|
+
/**
|
|
48
|
+
* The Shipping Suggestions Section's title.
|
|
49
|
+
*/
|
|
50
|
+
title?: string
|
|
51
|
+
/**
|
|
52
|
+
* The text displayed to Shipping Simulation input text.
|
|
53
|
+
*/
|
|
54
|
+
inputLabel?: string
|
|
55
|
+
/**
|
|
56
|
+
* The text displayed in Shipping options table.
|
|
57
|
+
*/
|
|
58
|
+
optionsLabel?: string
|
|
59
|
+
/**
|
|
60
|
+
* Props for the link for i don't know my postal code.
|
|
61
|
+
*/
|
|
62
|
+
idkPostalCodeLinkProps?: Partial<LinkProps<LinkElementType>>
|
|
63
|
+
/**
|
|
64
|
+
* Callback function when input is typed.
|
|
65
|
+
*/
|
|
66
|
+
onInput?: (event: React.FormEvent<HTMLInputElement>) => void
|
|
67
|
+
/**
|
|
68
|
+
* Callback function when form is submitted.
|
|
69
|
+
*/
|
|
70
|
+
onSubmit?: () => void
|
|
71
|
+
/**
|
|
72
|
+
* Callback function when the clear button is clicked.
|
|
73
|
+
*/
|
|
74
|
+
onClear?: () => void
|
|
75
|
+
/**
|
|
76
|
+
* Location for shipping.
|
|
77
|
+
*/
|
|
78
|
+
location?: string
|
|
79
|
+
/**
|
|
80
|
+
* Options for shipping simulation.
|
|
81
|
+
*/
|
|
82
|
+
options?: ShippingSLA[]
|
|
83
|
+
/**
|
|
84
|
+
* Show clear button.
|
|
85
|
+
*/
|
|
86
|
+
displayClearButton?: boolean
|
|
87
|
+
/**
|
|
88
|
+
* Message of error.
|
|
89
|
+
*/
|
|
90
|
+
errorMessage?: string
|
|
91
|
+
/**
|
|
92
|
+
* Postal code.
|
|
93
|
+
*/
|
|
94
|
+
postalCode?: string
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
function ShippingSimulation({
|
|
98
|
+
testId = 'fs-shipping-simulation',
|
|
99
|
+
formatter,
|
|
100
|
+
title = "Shipping",
|
|
101
|
+
inputLabel = "Postal Code",
|
|
102
|
+
optionsLabel = "Shipping options",
|
|
103
|
+
idkPostalCodeLinkProps,
|
|
104
|
+
onInput,
|
|
105
|
+
onSubmit,
|
|
106
|
+
onClear,
|
|
107
|
+
location,
|
|
108
|
+
options = [],
|
|
109
|
+
displayClearButton = false,
|
|
110
|
+
errorMessage,
|
|
111
|
+
postalCode,
|
|
112
|
+
...otherProps
|
|
113
|
+
}: ShippingSimulationProps) {
|
|
114
|
+
|
|
115
|
+
const hasShippingOptions = !!options && options.length > 0
|
|
116
|
+
|
|
117
|
+
return (
|
|
118
|
+
<section
|
|
119
|
+
data-fs-shipping-simulation
|
|
120
|
+
data-fs-shipping-simulation-empty={!hasShippingOptions ? "true" : "false"}
|
|
121
|
+
data-testid={testId}
|
|
122
|
+
{...otherProps}
|
|
123
|
+
>
|
|
124
|
+
<h2 data-fs-shipping-simulation-title>
|
|
125
|
+
{title}
|
|
126
|
+
</h2>
|
|
127
|
+
|
|
128
|
+
<InputField
|
|
129
|
+
actionable
|
|
130
|
+
error={errorMessage}
|
|
131
|
+
id={`${testId}-input-field`}
|
|
132
|
+
label={inputLabel}
|
|
133
|
+
value={postalCode}
|
|
134
|
+
onInput={(event) => onInput?.(event)}
|
|
135
|
+
onSubmit={() => onSubmit?.()}
|
|
136
|
+
onClear={() => onClear?.()}
|
|
137
|
+
displayClearButton={displayClearButton}
|
|
138
|
+
/>
|
|
139
|
+
|
|
140
|
+
<Link href="/" data-fs-shipping-simulation-link size="small" {...idkPostalCodeLinkProps}>
|
|
141
|
+
{
|
|
142
|
+
idkPostalCodeLinkProps?.children ??
|
|
143
|
+
<>
|
|
144
|
+
{"I don't know my Postal Code"}
|
|
145
|
+
<Icon component={<ArrowSquareOut />} />
|
|
146
|
+
</>
|
|
147
|
+
}
|
|
148
|
+
</Link>
|
|
149
|
+
|
|
150
|
+
{hasShippingOptions && (
|
|
151
|
+
<>
|
|
152
|
+
<header data-fs-shipping-simulation-header>
|
|
153
|
+
<h3 data-fs-shipping-simulation-subtitle>{optionsLabel}</h3>
|
|
154
|
+
<p data-fs-shipping-simulation-location>
|
|
155
|
+
{location}
|
|
156
|
+
</p>
|
|
157
|
+
</header>
|
|
158
|
+
|
|
159
|
+
<Table>
|
|
160
|
+
<TableBody>
|
|
161
|
+
{options.map((option) => (
|
|
162
|
+
<TableRow key={option.carrier}>
|
|
163
|
+
<TableCell align="left">{option.carrier}</TableCell>
|
|
164
|
+
<TableCell>{option.localizedEstimates}</TableCell>
|
|
165
|
+
<TableCell align="right">
|
|
166
|
+
{option.price && (
|
|
167
|
+
<Price
|
|
168
|
+
formatter={formatter}
|
|
169
|
+
value={option.price}
|
|
170
|
+
SRText="price"
|
|
171
|
+
/>
|
|
172
|
+
)}
|
|
173
|
+
</TableCell>
|
|
174
|
+
</TableRow>
|
|
175
|
+
))}
|
|
176
|
+
</TableBody>
|
|
177
|
+
</Table>
|
|
178
|
+
</>
|
|
179
|
+
)}
|
|
180
|
+
</section>
|
|
181
|
+
)
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
export default ShippingSimulation
|
|
@@ -7,7 +7,7 @@ import { Modal } from '../../'
|
|
|
7
7
|
export type Direction = 'leftSide' | 'rightSide'
|
|
8
8
|
export type WidthSize = 'full' | 'partial'
|
|
9
9
|
|
|
10
|
-
export
|
|
10
|
+
export interface SlideOverProps extends Omit<ModalProps, 'title'> {
|
|
11
11
|
/**
|
|
12
12
|
* ID to find this component in testing tools (e.g.: cypress, testing library, and jest).
|
|
13
13
|
*/
|
|
@@ -28,12 +28,12 @@ export type SlideOverProps = Omit<ModalProps, 'title'> & {
|
|
|
28
28
|
* Represents the fade effect of the SlideOver.
|
|
29
29
|
*/
|
|
30
30
|
fade: 'in' | 'out'
|
|
31
|
+
children: ReactNode
|
|
31
32
|
/**
|
|
32
33
|
* This function is called whenever the user clicks outside.
|
|
33
34
|
* the modal content
|
|
34
35
|
*/
|
|
35
36
|
onDismiss?: () => void
|
|
36
|
-
children: ReactNode
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
function SlideOver({
|
|
@@ -14,14 +14,16 @@ export interface SlideOverHeaderProps
|
|
|
14
14
|
* Props for the Close Button component.
|
|
15
15
|
*/
|
|
16
16
|
closeBtnProps?: Partial<Omit<IconButtonProps, 'onClick'>>
|
|
17
|
-
|
|
17
|
+
/**
|
|
18
|
+
* Function called when Close Button is clicked.
|
|
19
|
+
*/
|
|
18
20
|
onClose: () => void
|
|
19
21
|
}
|
|
20
22
|
|
|
21
23
|
const SlideOverHeader = ({
|
|
22
|
-
onClose,
|
|
23
24
|
children,
|
|
24
25
|
closeBtnProps = {},
|
|
26
|
+
onClose,
|
|
25
27
|
}: SlideOverHeaderProps) => {
|
|
26
28
|
return (
|
|
27
29
|
<header data-fs-slide-over-header>
|