@faststore/components 2.0.79-alpha.0 → 2.0.83-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/atoms/Badge/Badge.d.ts +1 -2
- package/dist/atoms/Badge/Badge.js.map +1 -1
- package/dist/molecules/SearchProducts/SearchProductItem.d.ts +3 -3
- package/dist/molecules/SearchProducts/SearchProductItem.js +2 -2
- package/dist/molecules/SearchProducts/SearchProductItem.js.map +1 -1
- package/dist/molecules/SearchTop/SearchTopTerm.d.ts +3 -3
- package/dist/molecules/SearchTop/SearchTopTerm.js +3 -4
- package/dist/molecules/SearchTop/SearchTopTerm.js.map +1 -1
- package/package.json +2 -2
- package/src/atoms/Badge/Badge.tsx +1 -2
- package/src/molecules/SearchProducts/SearchProductItem.tsx +8 -9
- package/src/molecules/SearchTop/SearchTopTerm.tsx +8 -11
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { HTMLAttributes, AriaAttributes } from 'react';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
export type BadgeVariants = 'info' | 'highlighted' | 'success' | 'neutral' | 'warning' | 'danger';
|
|
4
4
|
export interface BadgeProps extends HTMLAttributes<HTMLDivElement> {
|
|
@@ -22,7 +22,6 @@ export interface BadgeProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
22
22
|
* For accessibility purposes, adds an ARIA label to the element when `counter` is set to `true`.
|
|
23
23
|
*/
|
|
24
24
|
'aria-label'?: AriaAttributes['aria-label'];
|
|
25
|
-
children?: ReactNode;
|
|
26
25
|
}
|
|
27
26
|
declare const Badge: React.ForwardRefExoticComponent<BadgeProps & React.RefAttributes<HTMLDivElement>>;
|
|
28
27
|
export default Badge;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Badge.js","sourceRoot":"","sources":["../../../src/atoms/Badge/Badge.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"Badge.js","sourceRoot":"","sources":["../../../src/atoms/Badge/Badge.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAiCzC,MAAM,KAAK,GAAG,UAAU,CAA6B,SAAS,KAAK,CACjE,EACE,MAAM,GAAG,UAAU,EACnB,IAAI,GAAG,OAAO,EACd,OAAO,GAAG,SAAS,EACnB,OAAO,GAAG,KAAK,EACf,YAAY,EAAE,SAAS,EACvB,QAAQ,EACR,GAAG,UAAU,EACF,EACb,GAAG;IAEH,OAAO,CACL,6BACE,GAAG,EAAE,GAAG,uCAEI,SAAS,2BACE,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,wBAC3B,IAAI,2BACD,OAAO,iBACjB,MAAM,KACf,UAAU;QAEd,8DAA4B,QAAQ,CAAO,CACvC,CACP,CAAA;AACH,CAAC,CAAC,CAAA;AAEF,eAAe,KAAK,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import type { HTMLAttributes } from 'react';
|
|
3
|
-
import
|
|
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<
|
|
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":"
|
|
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
|
|
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<
|
|
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":"
|
|
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.
|
|
3
|
+
"version": "2.0.83-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": "018596959417f3e625287927598cd087fde5307e"
|
|
34
34
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { HTMLAttributes, AriaAttributes } from 'react'
|
|
2
2
|
import React, { forwardRef } from 'react'
|
|
3
3
|
|
|
4
4
|
export type BadgeVariants =
|
|
@@ -30,7 +30,6 @@ export interface BadgeProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
30
30
|
* For accessibility purposes, adds an ARIA label to the element when `counter` is set to `true`.
|
|
31
31
|
*/
|
|
32
32
|
'aria-label'?: AriaAttributes['aria-label']
|
|
33
|
-
children?: ReactNode
|
|
34
33
|
}
|
|
35
34
|
|
|
36
35
|
const Badge = forwardRef<HTMLDivElement, BadgeProps>(function Badge(
|
|
@@ -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,
|
|
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<
|
|
19
|
-
function ProductItem(
|
|
20
|
-
testId = 'fs-search-product-item',
|
|
21
|
-
|
|
22
|
-
|
|
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,
|
|
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<
|
|
27
|
-
function SearchTopTerm(
|
|
28
|
-
testId = 'fs-top-search-term',
|
|
29
|
-
|
|
30
|
-
|
|
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}
|