@faststore/components 2.0.79-alpha.0 → 2.0.80-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.
@@ -1,6 +1,6 @@
1
- import React from 'react';
2
1
  import type { HTMLAttributes } from 'react';
3
- import { LinkProps, LinkElementType } from '../..';
2
+ import React from 'react';
3
+ import { LinkElementType, LinkProps } from '../..';
4
4
  export interface SearchProductItemProps extends HTMLAttributes<HTMLDivElement> {
5
5
  /**
6
6
  * ID to find this component in testing tools (e.g.: cypress,
@@ -12,5 +12,5 @@ export interface SearchProductItemProps extends HTMLAttributes<HTMLDivElement> {
12
12
  */
13
13
  linkProps?: Partial<LinkProps<LinkElementType>>;
14
14
  }
15
- declare const SearchProductItem: React.ForwardRefExoticComponent<SearchProductItemProps & React.RefAttributes<HTMLDivElement>>;
15
+ declare const SearchProductItem: React.ForwardRefExoticComponent<SearchProductItemProps & React.RefAttributes<HTMLLIElement>>;
16
16
  export default SearchProductItem;
@@ -1,7 +1,7 @@
1
1
  import React, { forwardRef } from 'react';
2
2
  import { Link } from '../..';
3
- const SearchProductItem = forwardRef(function ProductItem({ testId = 'fs-search-product-item', linkProps, children, }) {
4
- return (React.createElement("li", { "data-fs-search-product-item": true, "data-testid": testId },
3
+ const SearchProductItem = forwardRef(function ProductItem({ testId = 'fs-search-product-item', linkProps, children }, ref) {
4
+ return (React.createElement("li", { ref: ref, "data-fs-search-product-item": true, "data-testid": testId },
5
5
  React.createElement(Link, { ...linkProps, "data-fs-search-product-item-link": true, variant: "display" }, children)));
6
6
  });
7
7
  export default SearchProductItem;
@@ -1 +1 @@
1
- {"version":3,"file":"SearchProductItem.js","sourceRoot":"","sources":["../../../src/molecules/SearchProducts/SearchProductItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAGzC,OAAO,EAAE,IAAI,EAA8B,MAAM,OAAO,CAAA;AAcxD,MAAM,iBAAiB,GAAG,UAAU,CAClC,SAAS,WAAW,CAAC,EACnB,MAAM,GAAG,wBAAwB,EACjC,SAAS,EACT,QAAQ,GACT;IACC,OAAO,CACL,gFAA6C,MAAM;QACjD,oBAAC,IAAI,OAAK,SAAS,4CAAmC,OAAO,EAAC,SAAS,IACpE,QAAQ,CACJ,CACJ,CACN,CAAA;AACH,CAAC,CACF,CAAA;AAED,eAAe,iBAAiB,CAAA"}
1
+ {"version":3,"file":"SearchProductItem.js","sourceRoot":"","sources":["../../../src/molecules/SearchProducts/SearchProductItem.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAEzC,OAAO,EAAE,IAAI,EAA8B,MAAM,OAAO,CAAA;AAcxD,MAAM,iBAAiB,GAAG,UAAU,CAClC,SAAS,WAAW,CAClB,EAAE,MAAM,GAAG,wBAAwB,EAAE,SAAS,EAAE,QAAQ,EAAE,EAC1D,GAAG;IAEH,OAAO,CACL,4BAAI,GAAG,EAAE,GAAG,sDAA2C,MAAM;QAC3D,oBAAC,IAAI,OAAK,SAAS,4CAAmC,OAAO,EAAC,SAAS,IACpE,QAAQ,CACJ,CACJ,CACN,CAAA;AACH,CAAC,CACF,CAAA;AAED,eAAe,iBAAiB,CAAA"}
@@ -1,6 +1,6 @@
1
- import React from 'react';
2
1
  import type { HTMLAttributes } from 'react';
3
- import { LinkProps, LinkElementType } from '../../';
2
+ import React from 'react';
3
+ import { LinkElementType, LinkProps } from '../../';
4
4
  export interface SearchTopTermProps extends HTMLAttributes<HTMLDivElement> {
5
5
  /**
6
6
  * ID to find this component in testing tools (e.g.: cypress, testing library, and jest).
@@ -19,5 +19,5 @@ export interface SearchTopTermProps extends HTMLAttributes<HTMLDivElement> {
19
19
  */
20
20
  index: number;
21
21
  }
22
- declare const SearchTopTerm: React.ForwardRefExoticComponent<SearchTopTermProps & React.RefAttributes<HTMLDivElement>>;
22
+ declare const SearchTopTerm: React.ForwardRefExoticComponent<SearchTopTermProps & React.RefAttributes<HTMLLIElement>>;
23
23
  export default SearchTopTerm;
@@ -1,8 +1,7 @@
1
- import React from 'react';
2
- import { forwardRef } from 'react';
1
+ import React, { forwardRef } from 'react';
3
2
  import { Badge, Link } from '../../';
4
- const SearchTopTerm = forwardRef(function SearchTopTerm({ testId = 'fs-top-search-term', value, linkProps, index, }) {
5
- return (React.createElement("li", { "data-fs-search-top-item": true, "data-testid": testId },
3
+ const SearchTopTerm = forwardRef(function SearchTopTerm({ testId = 'fs-top-search-term', value, linkProps, index }, ref) {
4
+ return (React.createElement("li", { ref: ref, "data-fs-search-top-item": true, "data-testid": testId },
6
5
  React.createElement(Link, { ...linkProps, "data-fs-search-top-item-link": true, variant: "display" },
7
6
  React.createElement(Badge, { "data-fs-search-top-item-badge": true, variant: "info" }, index + 1),
8
7
  value)));
@@ -1 +1 @@
1
- {"version":3,"file":"SearchTopTerm.js","sourceRoot":"","sources":["../../../src/molecules/SearchTop/SearchTopTerm.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAGlC,OAAO,EAAE,KAAK,EAAE,IAAI,EAA8B,MAAM,QAAQ,CAAA;AAqBhE,MAAM,aAAa,GAAG,UAAU,CAC9B,SAAS,aAAa,CAAC,EACrB,MAAM,GAAG,oBAAoB,EAC7B,KAAK,EACL,SAAS,EACT,KAAK,GACN;IACC,OAAO,CACL,4EAAyC,MAAM;QAC7C,oBAAC,IAAI,OAAK,SAAS,wCAA+B,OAAO,EAAC,SAAS;YACjE,oBAAC,KAAK,2CAA+B,OAAO,EAAC,MAAM,IAChD,KAAK,GAAG,CAAC,CACJ;YACP,KAAK,CACD,CACJ,CACN,CAAA;AACH,CAAC,CACF,CAAA;AAED,eAAe,aAAa,CAAA"}
1
+ {"version":3,"file":"SearchTopTerm.js","sourceRoot":"","sources":["../../../src/molecules/SearchTop/SearchTopTerm.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAEzC,OAAO,EAAE,KAAK,EAAE,IAAI,EAA8B,MAAM,QAAQ,CAAA;AAqBhE,MAAM,aAAa,GAAG,UAAU,CAC9B,SAAS,aAAa,CACpB,EAAE,MAAM,GAAG,oBAAoB,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,EAC1D,GAAG;IAEH,OAAO,CACL,4BAAI,GAAG,EAAE,GAAG,kDAAuC,MAAM;QACvD,oBAAC,IAAI,OAAK,SAAS,wCAA+B,OAAO,EAAC,SAAS;YACjE,oBAAC,KAAK,2CAA+B,OAAO,EAAC,MAAM,IAChD,KAAK,GAAG,CAAC,CACJ;YACP,KAAK,CACD,CACJ,CACN,CAAA;AACH,CAAC,CACF,CAAA;AAED,eAAe,aAAa,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@faststore/components",
3
- "version": "2.0.79-alpha.0",
3
+ "version": "2.0.80-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": "ff8afd730d749b228243cc8b457211c6d9d7c776"
33
+ "gitHead": "f34f2ebca04e5c97d12a33ba41bcd7dac7105756"
34
34
  }
@@ -1,7 +1,7 @@
1
- import React, { forwardRef } from 'react'
2
1
  import type { HTMLAttributes } from 'react'
2
+ import React, { forwardRef } from 'react'
3
3
 
4
- import { Link, LinkProps, LinkElementType } from '../..'
4
+ import { Link, LinkElementType, LinkProps } from '../..'
5
5
 
6
6
  export interface SearchProductItemProps extends HTMLAttributes<HTMLDivElement> {
7
7
  /**
@@ -15,14 +15,13 @@ export interface SearchProductItemProps extends HTMLAttributes<HTMLDivElement> {
15
15
  linkProps?: Partial<LinkProps<LinkElementType>>
16
16
  }
17
17
 
18
- const SearchProductItem = forwardRef<HTMLDivElement, SearchProductItemProps>(
19
- function ProductItem({
20
- testId = 'fs-search-product-item',
21
- linkProps,
22
- children,
23
- }) {
18
+ const SearchProductItem = forwardRef<HTMLLIElement, SearchProductItemProps>(
19
+ function ProductItem(
20
+ { testId = 'fs-search-product-item', linkProps, children },
21
+ ref
22
+ ) {
24
23
  return (
25
- <li data-fs-search-product-item data-testid={testId}>
24
+ <li ref={ref} data-fs-search-product-item data-testid={testId}>
26
25
  <Link {...linkProps} data-fs-search-product-item-link variant="display">
27
26
  {children}
28
27
  </Link>
@@ -1,8 +1,7 @@
1
- import React from 'react'
2
- import { forwardRef } from 'react'
3
1
  import type { HTMLAttributes } from 'react'
2
+ import React, { forwardRef } from 'react'
4
3
 
5
- import { Badge, Link, LinkProps, LinkElementType } from '../../'
4
+ import { Badge, Link, LinkElementType, LinkProps } from '../../'
6
5
 
7
6
  export interface SearchTopTermProps extends HTMLAttributes<HTMLDivElement> {
8
7
  /**
@@ -23,15 +22,13 @@ export interface SearchTopTermProps extends HTMLAttributes<HTMLDivElement> {
23
22
  index: number
24
23
  }
25
24
 
26
- const SearchTopTerm = forwardRef<HTMLDivElement, SearchTopTermProps>(
27
- function SearchTopTerm({
28
- testId = 'fs-top-search-term',
29
- value,
30
- linkProps,
31
- index,
32
- }) {
25
+ const SearchTopTerm = forwardRef<HTMLLIElement, SearchTopTermProps>(
26
+ function SearchTopTerm(
27
+ { testId = 'fs-top-search-term', value, linkProps, index },
28
+ ref
29
+ ) {
33
30
  return (
34
- <li data-fs-search-top-item data-testid={testId}>
31
+ <li ref={ref} data-fs-search-top-item data-testid={testId}>
35
32
  <Link {...linkProps} data-fs-search-top-item-link variant="display">
36
33
  <Badge data-fs-search-top-item-badge variant="info">
37
34
  {index + 1}