@faststore/components 2.0.106-alpha.0 → 2.0.110-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/index.d.ts +4 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/molecules/ProductTitle/ProductTitle.d.ts +8 -8
- package/dist/organisms/CartSidebar/CartSidebar.d.ts +1 -2
- package/dist/organisms/CartSidebar/CartSidebar.js.map +1 -1
- package/dist/organisms/EmptyState/EmptyState.d.ts +27 -0
- package/dist/organisms/EmptyState/EmptyState.js +10 -0
- package/dist/organisms/EmptyState/EmptyState.js.map +1 -0
- package/dist/organisms/EmptyState/index.d.ts +2 -0
- package/dist/organisms/EmptyState/index.js +2 -0
- package/dist/organisms/EmptyState/index.js.map +1 -0
- package/dist/organisms/ProductShelf/ProductShelf.d.ts +10 -0
- package/dist/organisms/ProductShelf/ProductShelf.js +6 -0
- package/dist/organisms/ProductShelf/ProductShelf.js.map +1 -0
- package/dist/organisms/ProductShelf/ProductShelfItem.d.ts +10 -0
- package/dist/organisms/ProductShelf/ProductShelfItem.js +6 -0
- package/dist/organisms/ProductShelf/ProductShelfItem.js.map +1 -0
- package/dist/organisms/ProductShelf/ProductShelfItems.d.ts +10 -0
- package/dist/organisms/ProductShelf/ProductShelfItems.js +6 -0
- package/dist/organisms/ProductShelf/ProductShelfItems.js.map +1 -0
- package/dist/organisms/ProductShelf/index.d.ts +6 -0
- package/dist/organisms/ProductShelf/index.js +4 -0
- package/dist/organisms/ProductShelf/index.js.map +1 -0
- package/package.json +2 -2
- package/src/index.ts +6 -0
- package/src/molecules/ProductTitle/ProductTitle.tsx +4 -4
- package/src/organisms/CartSidebar/CartSidebar.tsx +2 -2
- package/src/organisms/EmptyState/EmptyState.tsx +58 -0
- package/src/organisms/EmptyState/index.ts +2 -0
- package/src/organisms/ProductShelf/ProductShelf.tsx +24 -0
- package/src/organisms/ProductShelf/ProductShelfItem.tsx +24 -0
- package/src/organisms/ProductShelf/ProductShelfItems.tsx +24 -0
- package/src/organisms/ProductShelf/index.ts +8 -0
package/dist/index.d.ts
CHANGED
|
@@ -99,6 +99,8 @@ export { default as QuantitySelector } from './molecules/QuantitySelector';
|
|
|
99
99
|
export type { QuantitySelectorProps } from './molecules/QuantitySelector';
|
|
100
100
|
export { default as CartSidebar, CartSidebarList, CartSidebarFooter, } from './organisms/CartSidebar';
|
|
101
101
|
export type { CartSidebarProps } from './organisms/CartSidebar';
|
|
102
|
+
export { default as EmptyState } from './organisms/EmptyState';
|
|
103
|
+
export type { EmptyStateProps } from './organisms/EmptyState';
|
|
102
104
|
export { default as Filter, FilterFacetBoolean, FilterFacetBooleanItem, FilterFacetRange, FilterFacets, FilterSlider, } from './organisms/Filter';
|
|
103
105
|
export type { FilterFacetBooleanItemProps, FilterFacetRangeProps, FilterFacetsProps, FilterProps, FilterSliderProps, } from './organisms/Filter';
|
|
104
106
|
export { default as Hero, HeroImage, HeroHeader } from './organisms/Hero';
|
|
@@ -111,6 +113,8 @@ export { default as PaymentMethods } from './organisms/PaymentMethods';
|
|
|
111
113
|
export type { PaymentMethodsProps } from './organisms/PaymentMethods';
|
|
112
114
|
export { default as PriceRange } from './organisms/PriceRange';
|
|
113
115
|
export type { PriceRangeProps } from './organisms/PriceRange';
|
|
116
|
+
export { default as ProductShelf, ProductShelfItems, ProductShelfItem } from './organisms/ProductShelf';
|
|
117
|
+
export type { ProductShelfProps, ProductShelfItemsProps, ProductShelfItemProps } from './organisms/ProductShelf';
|
|
114
118
|
export { default as RegionModal } from './organisms/RegionModal';
|
|
115
119
|
export type { RegionModalProps } from './organisms/RegionModal';
|
|
116
120
|
export { default as SearchInput } from './organisms/SearchInput';
|
package/dist/index.js
CHANGED
|
@@ -55,12 +55,14 @@ export { default as ToggleField } from './molecules/ToggleField';
|
|
|
55
55
|
export { default as QuantitySelector } from './molecules/QuantitySelector';
|
|
56
56
|
// Organisms
|
|
57
57
|
export { default as CartSidebar, CartSidebarList, CartSidebarFooter, } from './organisms/CartSidebar';
|
|
58
|
+
export { default as EmptyState } from './organisms/EmptyState';
|
|
58
59
|
export { default as Filter, FilterFacetBoolean, FilterFacetBooleanItem, FilterFacetRange, FilterFacets, FilterSlider, } from './organisms/Filter';
|
|
59
60
|
export { default as Hero, HeroImage, HeroHeader } from './organisms/Hero';
|
|
60
61
|
export { default as ImageGallery, ImageGallerySelector, ImageZoom, } from './organisms/ImageGallery';
|
|
61
62
|
export { default as OutOfStock } from './organisms/OutOfStock';
|
|
62
63
|
export { default as PaymentMethods } from './organisms/PaymentMethods';
|
|
63
64
|
export { default as PriceRange } from './organisms/PriceRange';
|
|
65
|
+
export { default as ProductShelf, ProductShelfItems, ProductShelfItem } from './organisms/ProductShelf';
|
|
64
66
|
export { default as RegionModal } from './organisms/RegionModal';
|
|
65
67
|
export { default as SearchInput } from './organisms/SearchInput';
|
|
66
68
|
export { default as ShippingSimulation } from './organisms/ShippingSimulation';
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,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,E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@@ -2,6 +2,10 @@ import React, { HTMLAttributes } from 'react';
|
|
|
2
2
|
import type { ReactNode } from 'react';
|
|
3
3
|
import type { RatingProps } from '../../';
|
|
4
4
|
export type ProductTitleProps = Omit<HTMLAttributes<HTMLElement>, 'title'> & {
|
|
5
|
+
/**
|
|
6
|
+
* ID to find this component in testing tools (e.g.: cypress, testing library, and jest).
|
|
7
|
+
*/
|
|
8
|
+
testId?: string;
|
|
5
9
|
/**
|
|
6
10
|
* A react component to be used as the product title, e.g. a `h1`
|
|
7
11
|
*/
|
|
@@ -18,16 +22,16 @@ export type ProductTitleProps = Omit<HTMLAttributes<HTMLElement>, 'title'> & {
|
|
|
18
22
|
* A text to be used below the title and the label, such as the product's reference number.
|
|
19
23
|
*/
|
|
20
24
|
refNumber?: string;
|
|
21
|
-
/**
|
|
22
|
-
* ID to find this component in testing tools (e.g.: cypress, testing library, and jest).
|
|
23
|
-
*/
|
|
24
|
-
testId?: string;
|
|
25
25
|
/**
|
|
26
26
|
* The current value of the rating, a number from 0 to 5.
|
|
27
27
|
*/
|
|
28
28
|
ratingValue?: number;
|
|
29
29
|
} & Omit<RatingProps, 'testId' | 'onChange' | 'value' | 'title'>;
|
|
30
30
|
declare const ProductTitle: React.ForwardRefExoticComponent<Omit<React.HTMLAttributes<HTMLElement>, "title"> & {
|
|
31
|
+
/**
|
|
32
|
+
* ID to find this component in testing tools (e.g.: cypress, testing library, and jest).
|
|
33
|
+
*/
|
|
34
|
+
testId?: string | undefined;
|
|
31
35
|
/**
|
|
32
36
|
* A react component to be used as the product title, e.g. a `h1`
|
|
33
37
|
*/
|
|
@@ -44,10 +48,6 @@ declare const ProductTitle: React.ForwardRefExoticComponent<Omit<React.HTMLAttri
|
|
|
44
48
|
* A text to be used below the title and the label, such as the product's reference number.
|
|
45
49
|
*/
|
|
46
50
|
refNumber?: string | undefined;
|
|
47
|
-
/**
|
|
48
|
-
* ID to find this component in testing tools (e.g.: cypress, testing library, and jest).
|
|
49
|
-
*/
|
|
50
|
-
testId?: string | undefined;
|
|
51
51
|
/**
|
|
52
52
|
* The current value of the rating, a number from 0 to 5.
|
|
53
53
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CartSidebar.js","sourceRoot":"","sources":["../../../src/organisms/CartSidebar/CartSidebar.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"CartSidebar.js","sourceRoot":"","sources":["../../../src/organisms/CartSidebar/CartSidebar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,EACL,KAAK,EACL,KAAK,EACL,SAAS,EACT,eAAe,EACf,aAAa,EACb,KAAK,GACN,MAAM,QAAQ,CAAA;AAwCf,SAAS,WAAW,CAAC,EACnB,MAAM,GAAG,iBAAiB,EAC1B,KAAK,GAAG,WAAW,EACnB,IAAI,GAAG,SAAS,EAChB,SAAS,GAAG,WAAW,EACvB,UAAU,EACV,QAAQ,EACR,SAAS,EACT,SAAS,EACT,OAAO,GAC6B;IACpC,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,aAAa,EAAE,CAAA;IACzC,MAAM,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,CAAA;IAE7B,OAAO,CACL,oBAAC,SAAS,kCAER,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,SAAS,EAAE,EACpD,MAAM,EAAE,MAAM;QAEd,oBAAC,eAAe,IACd,aAAa,EAAE,EAAE,MAAM,EAAE,8BAA8B,EAAE,EACzD,OAAO,EAAE,GAAG,EAAE;gBACZ,OAAO,EAAE,CAAA;gBACT,OAAO,EAAE,CAAA;YACX,CAAC;YAED;gBACG,KAAK;gBACN,oBAAC,KAAK,IAAC,OAAO,EAAC,MAAM,IAAE,UAAU,CAAS,CACvC,CACW;QAEjB,SAAS,IAAI,oBAAC,KAAK,IAAC,IAAI,EAAE,SAAS,IAAG,SAAS,CAAS;QACxD,QAAQ,CACC,CACb,CAAA;AACH,CAAC;AAED,eAAe,WAAW,CAAA"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { PropsWithChildren, ReactNode } from 'react';
|
|
2
|
+
type Variant = 'default' | 'rounded';
|
|
3
|
+
type BackgroundColor = 'default' | 'light';
|
|
4
|
+
export interface EmptyStateProps {
|
|
5
|
+
/**
|
|
6
|
+
* ID to find this component in testing tools (e.g.: cypress, testing library, and jest).
|
|
7
|
+
*/
|
|
8
|
+
testId?: string;
|
|
9
|
+
/**
|
|
10
|
+
* The EmptyState component's title.
|
|
11
|
+
*/
|
|
12
|
+
title?: string;
|
|
13
|
+
/**
|
|
14
|
+
* A React component that will be rendered as an icon on the Title.
|
|
15
|
+
*/
|
|
16
|
+
titleIcon?: ReactNode;
|
|
17
|
+
/**
|
|
18
|
+
* Specifies the component border variant.
|
|
19
|
+
*/
|
|
20
|
+
variant?: Variant;
|
|
21
|
+
/**
|
|
22
|
+
* Specifies the component background color.
|
|
23
|
+
*/
|
|
24
|
+
bkgColor?: BackgroundColor;
|
|
25
|
+
}
|
|
26
|
+
declare function EmptyState({ testId, title, titleIcon, variant, bkgColor, children, ...otherProps }: PropsWithChildren<EmptyStateProps>): JSX.Element;
|
|
27
|
+
export default EmptyState;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
function EmptyState({ testId = 'fs-empty-state', title, titleIcon, variant = 'default', bkgColor = 'default', children, ...otherProps }) {
|
|
3
|
+
return (React.createElement("section", { "data-fs-empty-state": true, "data-fs-empty-state-variant": variant, "data-fs-empty-state-bkg-color": bkgColor, "data-testid": testId, ...otherProps },
|
|
4
|
+
title && (React.createElement("header", { "data-fs-empty-state-title": true },
|
|
5
|
+
titleIcon && React.createElement(React.Fragment, null, titleIcon),
|
|
6
|
+
React.createElement("p", null, title))),
|
|
7
|
+
children));
|
|
8
|
+
}
|
|
9
|
+
export default EmptyState;
|
|
10
|
+
//# sourceMappingURL=EmptyState.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EmptyState.js","sourceRoot":"","sources":["../../../src/organisms/EmptyState/EmptyState.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AA6BzB,SAAS,UAAU,CAAC,EAClB,MAAM,GAAG,gBAAgB,EACzB,KAAK,EACL,SAAS,EACT,OAAO,GAAG,SAAS,EACnB,QAAQ,GAAG,SAAS,EACpB,QAAQ,EACR,GAAG,UAAU,EACsB;IACnC,OAAO,CACL,6FAE+B,OAAO,mCACL,QAAQ,iBAC1B,MAAM,KACf,UAAU;QAEb,KAAK,IAAI,CACR;YACG,SAAS,IAAI,0CAAG,SAAS,CAAI;YAC9B,+BAAI,KAAK,CAAK,CACP,CACV;QACA,QAAQ,CACD,CACX,CAAA;AACH,CAAC;AAED,eAAe,UAAU,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/organisms/EmptyState/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { HTMLAttributes } from 'react';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
export interface ProductShelfProps 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 ProductShelf: React.ForwardRefExoticComponent<ProductShelfProps & React.RefAttributes<HTMLDivElement>>;
|
|
10
|
+
export default ProductShelf;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import React, { forwardRef } from 'react';
|
|
2
|
+
const ProductShelf = forwardRef(function ProductShelf({ testId = 'fs-product-shelf', children, ...otherProps }, ref) {
|
|
3
|
+
return (React.createElement("div", { ref: ref, "data-fs-product-shelf": true, "data-testid": testId, ...otherProps }, children));
|
|
4
|
+
});
|
|
5
|
+
export default ProductShelf;
|
|
6
|
+
//# sourceMappingURL=ProductShelf.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProductShelf.js","sourceRoot":"","sources":["../../../src/organisms/ProductShelf/ProductShelf.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AASzC,MAAM,YAAY,GAAG,UAAU,CAC7B,SAAS,YAAY,CACnB,EAAE,MAAM,GAAG,kBAAkB,EAAE,QAAQ,EAAE,GAAG,UAAU,EAAE,EACxD,GAAG;IAEH,OAAO,CACL,6BAAK,GAAG,EAAE,GAAG,gDAAqC,MAAM,KAAM,UAAU,IACrE,QAAQ,CACL,CACP,CAAA;AACH,CAAC,CACF,CAAA;AAED,eAAe,YAAY,CAAA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { HTMLAttributes } from 'react';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
export interface ProductShelfItemProps extends HTMLAttributes<HTMLLIElement> {
|
|
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 ProductShelfItem: React.ForwardRefExoticComponent<ProductShelfItemProps & React.RefAttributes<HTMLLIElement>>;
|
|
10
|
+
export default ProductShelfItem;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import React, { forwardRef } from 'react';
|
|
2
|
+
const ProductShelfItem = forwardRef(function ProductShelfItem({ testId = 'fs-product-shelf-item', children, ...otherProps }, ref) {
|
|
3
|
+
return (React.createElement("li", { ref: ref, "data-fs-product-shelf-item": true, "data-testid": testId, ...otherProps }, children));
|
|
4
|
+
});
|
|
5
|
+
export default ProductShelfItem;
|
|
6
|
+
//# sourceMappingURL=ProductShelfItem.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProductShelfItem.js","sourceRoot":"","sources":["../../../src/organisms/ProductShelf/ProductShelfItem.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,uBAAuB,EAAE,QAAQ,EAAE,GAAG,UAAU,EAAE,EAC7D,GAAG;IAEH,OAAO,CACL,4BAAI,GAAG,EAAE,GAAG,qDAA0C,MAAM,KAAM,UAAU,IACzE,QAAQ,CACN,CACN,CAAA;AACH,CAAC,CACF,CAAA;AAED,eAAe,gBAAgB,CAAA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { HTMLAttributes } from 'react';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
export interface ProductShelfItemsProps extends HTMLAttributes<HTMLUListElement> {
|
|
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 ProductShelfItems: React.ForwardRefExoticComponent<ProductShelfItemsProps & React.RefAttributes<HTMLUListElement>>;
|
|
10
|
+
export default ProductShelfItems;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import React, { forwardRef } from 'react';
|
|
2
|
+
const ProductShelfItems = forwardRef(function ProductShelfItems({ testId = 'fs-product-shelf-items', children, ...otherProps }, ref) {
|
|
3
|
+
return (React.createElement("ul", { ref: ref, "data-fs-product-shelf-items": true, "data-testid": testId, ...otherProps }, children));
|
|
4
|
+
});
|
|
5
|
+
export default ProductShelfItems;
|
|
6
|
+
//# sourceMappingURL=ProductShelfItems.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProductShelfItems.js","sourceRoot":"","sources":["../../../src/organisms/ProductShelf/ProductShelfItems.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AASzC,MAAM,iBAAiB,GAAG,UAAU,CAClC,SAAS,iBAAiB,CACxB,EAAE,MAAM,GAAG,wBAAwB,EAAE,QAAQ,EAAE,GAAG,UAAU,EAAE,EAC9D,GAAG;IAEH,OAAO,CACL,4BAAI,GAAG,EAAE,GAAG,sDAA2C,MAAM,KAAM,UAAU,IAC1E,QAAQ,CACN,CACN,CAAA;AACH,CAAC,CACF,CAAA;AAED,eAAe,iBAAiB,CAAA"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { default } from './ProductShelf';
|
|
2
|
+
export type { ProductShelfProps } from './ProductShelf';
|
|
3
|
+
export { default as ProductShelfItems } from './ProductShelfItems';
|
|
4
|
+
export type { ProductShelfItemsProps } from './ProductShelfItems';
|
|
5
|
+
export { default as ProductShelfItem } from './ProductShelfItem';
|
|
6
|
+
export type { ProductShelfItemProps } from './ProductShelfItem';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/organisms/ProductShelf/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAA;AAGxC,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AAGlE,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,oBAAoB,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@faststore/components",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.110-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": "4d3127188c79beaa7f286bc8791f902742110c9b"
|
|
34
34
|
}
|
package/src/index.ts
CHANGED
|
@@ -198,6 +198,9 @@ export {
|
|
|
198
198
|
} from './organisms/CartSidebar'
|
|
199
199
|
export type { CartSidebarProps } from './organisms/CartSidebar'
|
|
200
200
|
|
|
201
|
+
export { default as EmptyState } from './organisms/EmptyState'
|
|
202
|
+
export type { EmptyStateProps } from './organisms/EmptyState'
|
|
203
|
+
|
|
201
204
|
export {
|
|
202
205
|
default as Filter,
|
|
203
206
|
FilterFacetBoolean,
|
|
@@ -242,6 +245,9 @@ export type { PaymentMethodsProps } from './organisms/PaymentMethods'
|
|
|
242
245
|
export { default as PriceRange } from './organisms/PriceRange'
|
|
243
246
|
export type { PriceRangeProps } from './organisms/PriceRange'
|
|
244
247
|
|
|
248
|
+
export { default as ProductShelf, ProductShelfItems, ProductShelfItem } from './organisms/ProductShelf'
|
|
249
|
+
export type { ProductShelfProps, ProductShelfItemsProps, ProductShelfItemProps } from './organisms/ProductShelf'
|
|
250
|
+
|
|
245
251
|
export { default as RegionModal } from './organisms/RegionModal'
|
|
246
252
|
export type { RegionModalProps } from './organisms/RegionModal'
|
|
247
253
|
|
|
@@ -5,6 +5,10 @@ import { Rating } from '../../'
|
|
|
5
5
|
import type { RatingProps } from '../../'
|
|
6
6
|
|
|
7
7
|
export type ProductTitleProps = Omit<HTMLAttributes<HTMLElement>, 'title'> & {
|
|
8
|
+
/**
|
|
9
|
+
* ID to find this component in testing tools (e.g.: cypress, testing library, and jest).
|
|
10
|
+
*/
|
|
11
|
+
testId?: string
|
|
8
12
|
/**
|
|
9
13
|
* A react component to be used as the product title, e.g. a `h1`
|
|
10
14
|
*/
|
|
@@ -21,10 +25,6 @@ export type ProductTitleProps = Omit<HTMLAttributes<HTMLElement>, 'title'> & {
|
|
|
21
25
|
* A text to be used below the title and the label, such as the product's reference number.
|
|
22
26
|
*/
|
|
23
27
|
refNumber?: string
|
|
24
|
-
/**
|
|
25
|
-
* ID to find this component in testing tools (e.g.: cypress, testing library, and jest).
|
|
26
|
-
*/
|
|
27
|
-
testId?: string
|
|
28
28
|
/**
|
|
29
29
|
* The current value of the rating, a number from 0 to 5.
|
|
30
30
|
*/
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import type { PropsWithChildren, ReactNode } from 'react'
|
|
3
|
+
|
|
4
|
+
type Variant = 'default' | 'rounded'
|
|
5
|
+
type BackgroundColor = 'default' | 'light'
|
|
6
|
+
|
|
7
|
+
export interface EmptyStateProps {
|
|
8
|
+
/**
|
|
9
|
+
* ID to find this component in testing tools (e.g.: cypress, testing library, and jest).
|
|
10
|
+
*/
|
|
11
|
+
testId?: string
|
|
12
|
+
/**
|
|
13
|
+
* The EmptyState component's title.
|
|
14
|
+
*/
|
|
15
|
+
title?: string
|
|
16
|
+
/**
|
|
17
|
+
* A React component that will be rendered as an icon on the Title.
|
|
18
|
+
*/
|
|
19
|
+
titleIcon?: ReactNode
|
|
20
|
+
/**
|
|
21
|
+
* Specifies the component border variant.
|
|
22
|
+
*/
|
|
23
|
+
variant?: Variant
|
|
24
|
+
/**
|
|
25
|
+
* Specifies the component background color.
|
|
26
|
+
*/
|
|
27
|
+
bkgColor?: BackgroundColor
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
function EmptyState({
|
|
31
|
+
testId = 'fs-empty-state',
|
|
32
|
+
title,
|
|
33
|
+
titleIcon,
|
|
34
|
+
variant = 'default',
|
|
35
|
+
bkgColor = 'default',
|
|
36
|
+
children,
|
|
37
|
+
...otherProps
|
|
38
|
+
}: PropsWithChildren<EmptyStateProps>) {
|
|
39
|
+
return (
|
|
40
|
+
<section
|
|
41
|
+
data-fs-empty-state
|
|
42
|
+
data-fs-empty-state-variant={variant}
|
|
43
|
+
data-fs-empty-state-bkg-color={bkgColor}
|
|
44
|
+
data-testid={testId}
|
|
45
|
+
{...otherProps}
|
|
46
|
+
>
|
|
47
|
+
{title && (
|
|
48
|
+
<header data-fs-empty-state-title>
|
|
49
|
+
{titleIcon && <>{titleIcon}</>}
|
|
50
|
+
<p>{title}</p>
|
|
51
|
+
</header>
|
|
52
|
+
)}
|
|
53
|
+
{children}
|
|
54
|
+
</section>
|
|
55
|
+
)
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export default EmptyState
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { HTMLAttributes } from 'react'
|
|
2
|
+
import React, { forwardRef } from 'react'
|
|
3
|
+
|
|
4
|
+
export interface ProductShelfProps 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 ProductShelf = forwardRef<HTMLDivElement, ProductShelfProps>(
|
|
12
|
+
function ProductShelf(
|
|
13
|
+
{ testId = 'fs-product-shelf', children, ...otherProps },
|
|
14
|
+
ref
|
|
15
|
+
) {
|
|
16
|
+
return (
|
|
17
|
+
<div ref={ref} data-fs-product-shelf data-testid={testId} {...otherProps}>
|
|
18
|
+
{children}
|
|
19
|
+
</div>
|
|
20
|
+
)
|
|
21
|
+
}
|
|
22
|
+
)
|
|
23
|
+
|
|
24
|
+
export default ProductShelf
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { HTMLAttributes } from 'react'
|
|
2
|
+
import React, { forwardRef } from 'react'
|
|
3
|
+
|
|
4
|
+
export interface ProductShelfItemProps extends HTMLAttributes<HTMLLIElement> {
|
|
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 ProductShelfItem = forwardRef<HTMLLIElement, ProductShelfItemProps>(
|
|
12
|
+
function ProductShelfItem(
|
|
13
|
+
{ testId = 'fs-product-shelf-item', children, ...otherProps },
|
|
14
|
+
ref
|
|
15
|
+
) {
|
|
16
|
+
return (
|
|
17
|
+
<li ref={ref} data-fs-product-shelf-item data-testid={testId} {...otherProps}>
|
|
18
|
+
{children}
|
|
19
|
+
</li>
|
|
20
|
+
)
|
|
21
|
+
}
|
|
22
|
+
)
|
|
23
|
+
|
|
24
|
+
export default ProductShelfItem
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { HTMLAttributes } from 'react'
|
|
2
|
+
import React, { forwardRef } from 'react'
|
|
3
|
+
|
|
4
|
+
export interface ProductShelfItemsProps extends HTMLAttributes<HTMLUListElement> {
|
|
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 ProductShelfItems = forwardRef<HTMLUListElement, ProductShelfItemsProps>(
|
|
12
|
+
function ProductShelfItems(
|
|
13
|
+
{ testId = 'fs-product-shelf-items', children, ...otherProps },
|
|
14
|
+
ref
|
|
15
|
+
) {
|
|
16
|
+
return (
|
|
17
|
+
<ul ref={ref} data-fs-product-shelf-items data-testid={testId} {...otherProps}>
|
|
18
|
+
{children}
|
|
19
|
+
</ul>
|
|
20
|
+
)
|
|
21
|
+
}
|
|
22
|
+
)
|
|
23
|
+
|
|
24
|
+
export default ProductShelfItems
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { default } from './ProductShelf'
|
|
2
|
+
export type { ProductShelfProps } from './ProductShelf'
|
|
3
|
+
|
|
4
|
+
export { default as ProductShelfItems } from './ProductShelfItems'
|
|
5
|
+
export type { ProductShelfItemsProps } from './ProductShelfItems'
|
|
6
|
+
|
|
7
|
+
export { default as ProductShelfItem } from './ProductShelfItem'
|
|
8
|
+
export type { ProductShelfItemProps } from './ProductShelfItem'
|