@faststore/ui 2.0.35-alpha.0 → 2.0.37-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/components/molecules/AggregateRating/AggregateRating.d.ts +3 -3
- package/dist/components/molecules/AggregateRating/AggregateRating.js.map +1 -1
- package/dist/components/molecules/OrderSummary/OrderSummary.d.ts +3 -3
- package/dist/components/molecules/OrderSummary/OrderSummary.js +1 -1
- package/dist/components/molecules/OrderSummary/OrderSummary.js.map +1 -1
- package/package.json +4 -12
- package/src/components/molecules/AggregateRating/AggregateRating.tsx +2 -3
- package/src/components/molecules/OrderSummary/OrderSummary.tsx +3 -3
- package/src/components/molecules/Table/styles.scss +10 -4
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.37-alpha.0 (2023-01-06)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Chores
|
|
10
|
+
|
|
11
|
+
* remove styles ([#1589](https://github.com/vtex/faststore/issues/1589)) ([7a21b1c](https://github.com/vtex/faststore/commit/7a21b1cfbbd7cee190299365087984c33cc8d4e2))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
## [2.0.36-alpha.0](https://github.com/vtex/faststore/compare/v2.0.35-alpha.0...v2.0.36-alpha.0) (2023-01-05)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Chores
|
|
19
|
+
|
|
20
|
+
* Updates `Table` Colored Variant ([#1587](https://github.com/vtex/faststore/issues/1587)) ([04050eb](https://github.com/vtex/faststore/commit/04050eb920fe08ca3b4fe30a3e17fbf9dbedff44))
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
6
24
|
## [2.0.35-alpha.0](https://github.com/vtex/faststore/compare/v2.0.34-alpha.0...v2.0.35-alpha.0) (2023-01-05)
|
|
7
25
|
|
|
8
26
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type {
|
|
3
|
-
export interface AggregateRatingProps extends
|
|
2
|
+
import type { HTMLAttributes } from 'react';
|
|
3
|
+
export interface AggregateRatingProps extends HTMLAttributes<HTMLUListElement> {
|
|
4
4
|
/**
|
|
5
5
|
* The current value of the rating, based on the quantity of child elements.
|
|
6
6
|
*/
|
|
@@ -14,5 +14,5 @@ export interface RatingItemProps {
|
|
|
14
14
|
'data-fs-aggregate-rating-item'?: 'full' | 'partial' | 'empty';
|
|
15
15
|
'data-testid'?: string;
|
|
16
16
|
}
|
|
17
|
-
declare const AggregateRating: React.ForwardRefExoticComponent<
|
|
17
|
+
declare const AggregateRating: React.ForwardRefExoticComponent<AggregateRatingProps & React.RefAttributes<HTMLUListElement>>;
|
|
18
18
|
export default AggregateRating;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AggregateRating.js","sourceRoot":"","sources":["../../../../src/components/molecules/AggregateRating/AggregateRating.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAGzC,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAA;
|
|
1
|
+
{"version":3,"file":"AggregateRating.js","sourceRoot":"","sources":["../../../../src/components/molecules/AggregateRating/AggregateRating.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAGzC,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAA;AAkB5C,MAAM,UAAU,GAA2C,CAAC,EAC1D,QAAQ,EACR,GAAG,UAAU,EACd,EAAE,EAAE;IACH,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE;QACnC,OAAO,+BAAQ,UAAU,IAAG,QAAQ,CAAM,CAAA;KAC3C;IAED,OAAO,gCAAK,KAAK,CAAC,YAAY,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAM,CAAA;AAC5D,CAAC,CAAA;AAED,MAAM,eAAe,GAAG,UAAU,CAChC,SAAS,eAAe,CACtB,EAAE,QAAQ,EAAE,MAAM,GAAG,wBAAwB,EAAE,KAAK,EAAE,GAAG,UAAU,EAAE,EACrE,GAAG;IAEH,MAAM,SAAS,GAAG,CAAC,SAAiB,EAAE,EAAE;QACtC,IAAI,SAAS,IAAI,CAAC,EAAE;YAClB,OAAO,MAAM,CAAA;SACd;QAED,IAAI,CAAC,GAAG,SAAS,IAAI,SAAS,GAAG,CAAC,EAAE;YAClC,OAAO,SAAS,CAAA;SACjB;QAED,OAAO,OAAO,CAAA;IAChB,CAAC,CAAA;IAED,OAAO,CACL,oBAAC,IAAI,sCAEH,GAAG,EAAE,GAAG,iBACK,MAAM,KACf,UAAU,IAEb,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAa,EAAE,EAAE;QACrD,MAAM,iBAAiB,GAAG,KAAK,CAAA;QAC/B,MAAM,IAAI,GAAG,SAAS,CAAC,KAAK,GAAG,iBAAiB,CAAC,CAAA;QAEjD,OAAO,CACL,oBAAC,UAAU,IACT,GAAG,EAAE,oBAAoB,KAAK,EAAE,mCACD,IAAI,iBACtB,GAAG,MAAM,OAAO,IAE5B,KAAK,CACK,CACd,CAAA;IACH,CAAC,CAAC,CACG,CACR,CAAA;AACH,CAAC,CACF,CAAA;AAED,eAAe,eAAe,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type {
|
|
3
|
-
export interface OrderSummaryProps extends
|
|
2
|
+
import type { HTMLAttributes } from 'react';
|
|
3
|
+
export interface OrderSummaryProps extends HTMLAttributes<HTMLUListElement> {
|
|
4
4
|
/**
|
|
5
5
|
* ID to find this component in testing tools (e.g.: cypress,
|
|
6
6
|
* testing-library, and jest).
|
|
@@ -31,5 +31,5 @@ export interface OrderSummaryProps extends ListProps<'ul'> {
|
|
|
31
31
|
*/
|
|
32
32
|
totalValue?: string;
|
|
33
33
|
}
|
|
34
|
-
declare const OrderSummary: React.ForwardRefExoticComponent<
|
|
34
|
+
declare const OrderSummary: React.ForwardRefExoticComponent<OrderSummaryProps & React.RefAttributes<HTMLUListElement>>;
|
|
35
35
|
export default OrderSummary;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { forwardRef } from 'react';
|
|
2
2
|
import { List } from '@faststore/components';
|
|
3
|
-
const OrderSummary = forwardRef(function OrderSummary({ testId = 'store-order-summary',
|
|
3
|
+
const OrderSummary = forwardRef(function OrderSummary({ testId = 'store-order-summary', subtotalLabel, subtotalValue, discountLabel, discountValue, totalLabel, totalValue, ...otherProps }, ref) {
|
|
4
4
|
return (React.createElement(List, { ref: ref, "data-fs-order-summary": true, "data-testid": testId, ...otherProps },
|
|
5
5
|
subtotalValue ? (React.createElement("li", { "data-fs-order-summary-subtotal": true },
|
|
6
6
|
React.createElement("span", { "data-fs-order-summary-subtotal-label": true, "data-testid": `${testId}-subtotal-label` }, subtotalLabel),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OrderSummary.js","sourceRoot":"","sources":["../../../../src/components/molecules/OrderSummary/OrderSummary.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"OrderSummary.js","sourceRoot":"","sources":["../../../../src/components/molecules/OrderSummary/OrderSummary.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAGzC,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAA;AAkC5C,MAAM,YAAY,GAAG,UAAU,CAC7B,SAAS,YAAY,CACnB,EACE,MAAM,GAAG,qBAAqB,EAC9B,aAAa,EACb,aAAa,EACb,aAAa,EACb,aAAa,EACb,UAAU,EACV,UAAU,EACV,GAAG,UAAU,EACd,EACD,GAAG;IAEH,OAAO,CACL,oBAAC,IAAI,IACH,GAAG,EAAE,GAAG,gDAEK,MAAM,KACf,UAAU;QAEb,aAAa,CAAC,CAAC,CAAC,CACf;YACE,2FAEe,GAAG,MAAM,iBAAiB,IAEtC,aAAa,CACT;YACP,2FAEe,GAAG,MAAM,iBAAiB,IAEtC,aAAa,CACT,CACJ,CACN,CAAC,CAAC,CAAC,IAAI;QACP,aAAa,CAAC,CAAC,CAAC,CACf;YACE,2FAEe,GAAG,MAAM,iBAAiB,IAEtC,aAAa,CACT;YACP,2FAEe,GAAG,MAAM,iBAAiB,IAEtC,aAAa,CACT,CACJ,CACN,CAAC,CAAC,CAAC,IAAI;QACR;YACE,wFAEe,GAAG,MAAM,cAAc,IAEnC,UAAU,CACN;YACP,wFAEe,GAAG,MAAM,cAAc,IAEnC,UAAU,CACN,CACJ,CACA,CACR,CAAA;AACH,CAAC,CACF,CAAA;AAED,eAAe,YAAY,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@faststore/ui",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.37-alpha.0",
|
|
4
4
|
"description": "A lightweight, framework agnostic component library for React",
|
|
5
5
|
"author": "emersonlaurentino",
|
|
6
6
|
"license": "MIT",
|
|
@@ -46,26 +46,18 @@
|
|
|
46
46
|
"react-dom": "^18.2.0"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"@
|
|
50
|
-
"@faststore/
|
|
51
|
-
"@faststore/shared": "^2.0.34-alpha.0",
|
|
52
|
-
"@faststore/styles": "^2.0.34-alpha.0",
|
|
49
|
+
"@faststore/eslint-config": "^2.0.37-alpha.0",
|
|
50
|
+
"@faststore/shared": "^2.0.37-alpha.0",
|
|
53
51
|
"@size-limit/preset-small-lib": "^7.0.8",
|
|
54
52
|
"@types/tabbable": "^3.1.1",
|
|
55
53
|
"babel-loader": "^8.2.5",
|
|
56
|
-
"css-loader": "^6.7.1",
|
|
57
54
|
"eslint": "7.32.0",
|
|
58
|
-
"react": "^18.2.0",
|
|
59
|
-
"react-dom": "^18.2.0",
|
|
60
|
-
"sass": "^1.55.0",
|
|
61
|
-
"sass-loader": "^13.1.0",
|
|
62
55
|
"size-limit": "^7.0.8",
|
|
63
|
-
"style-loader": "^3.3.1",
|
|
64
56
|
"typescript": "^4.2.4"
|
|
65
57
|
},
|
|
66
58
|
"volta": {
|
|
67
59
|
"node": "16.18.0",
|
|
68
60
|
"yarn": "1.19.1"
|
|
69
61
|
},
|
|
70
|
-
"gitHead": "
|
|
62
|
+
"gitHead": "dac60f1c06a9df8faf33752ec8f8c9737fed677d"
|
|
71
63
|
}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import React, { forwardRef } from 'react'
|
|
2
|
-
import type { FC, PropsWithChildren } from 'react'
|
|
2
|
+
import type { FC, PropsWithChildren, HTMLAttributes } from 'react'
|
|
3
3
|
|
|
4
4
|
import { List } from '@faststore/components'
|
|
5
|
-
import type { ListProps } from '@faststore/components'
|
|
6
5
|
|
|
7
|
-
export interface AggregateRatingProps extends
|
|
6
|
+
export interface AggregateRatingProps extends HTMLAttributes<HTMLUListElement> {
|
|
8
7
|
/**
|
|
9
8
|
* The current value of the rating, based on the quantity of child elements.
|
|
10
9
|
*/
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import React, { forwardRef } from 'react'
|
|
2
|
+
import type { HTMLAttributes } from 'react'
|
|
3
|
+
|
|
2
4
|
import { List } from '@faststore/components'
|
|
3
|
-
import type { ListProps } from '@faststore/components'
|
|
4
5
|
|
|
5
|
-
export interface OrderSummaryProps extends
|
|
6
|
+
export interface OrderSummaryProps extends HTMLAttributes<HTMLUListElement> {
|
|
6
7
|
/**
|
|
7
8
|
* ID to find this component in testing tools (e.g.: cypress,
|
|
8
9
|
* testing-library, and jest).
|
|
@@ -38,7 +39,6 @@ const OrderSummary = forwardRef<HTMLUListElement, OrderSummaryProps>(
|
|
|
38
39
|
function OrderSummary(
|
|
39
40
|
{
|
|
40
41
|
testId = 'store-order-summary',
|
|
41
|
-
children,
|
|
42
42
|
subtotalLabel,
|
|
43
43
|
subtotalValue,
|
|
44
44
|
discountLabel,
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
// Head
|
|
13
13
|
--fs-table-head-weight : var(--fs-text-weight-bold);
|
|
14
14
|
--fs-table-head-bkg-color : none;
|
|
15
|
+
--fs-table-head-padding-y : var(--fs-spacing-2);
|
|
15
16
|
|
|
16
17
|
// Footer
|
|
17
18
|
--fs-table-footer-weight : var(--fs-table-head-weight);
|
|
@@ -45,6 +46,11 @@
|
|
|
45
46
|
&[data-fs-table-cell-align="right"] { text-align: right; }
|
|
46
47
|
}
|
|
47
48
|
|
|
49
|
+
thead [data-fs-table-cell="header"] {
|
|
50
|
+
padding-top: var(--fs-table-head-padding-y);
|
|
51
|
+
padding-bottom: var(--fs-table-head-padding-y);
|
|
52
|
+
}
|
|
53
|
+
|
|
48
54
|
[data-fs-table-cell="header"] { white-space: nowrap; }
|
|
49
55
|
|
|
50
56
|
[data-fs-table-cell="data"] {
|
|
@@ -93,17 +99,17 @@
|
|
|
93
99
|
|
|
94
100
|
[data-fs-table-variant="colored"] {
|
|
95
101
|
[data-fs-table-body] [data-fs-table-row] {
|
|
96
|
-
&:nth-child(
|
|
97
|
-
&:nth-child(
|
|
102
|
+
&:nth-child(odd) [data-fs-table-cell="data"],
|
|
103
|
+
&:nth-child(odd) [data-fs-table-cell="header"] {
|
|
98
104
|
background-color: var(--fs-table-colored-bkg-color);
|
|
99
105
|
}
|
|
100
106
|
|
|
101
|
-
&:nth-child(
|
|
107
|
+
&:nth-child(odd) [data-fs-table-cell="data"] {
|
|
102
108
|
border-top-right-radius: var(--fs-table-colored-border-radius);
|
|
103
109
|
border-bottom-right-radius: var(--fs-table-colored-border-radius);
|
|
104
110
|
}
|
|
105
111
|
|
|
106
|
-
&:nth-child(
|
|
112
|
+
&:nth-child(odd) [data-fs-table-cell="header"] {
|
|
107
113
|
border-top-left-radius: var(--fs-table-colored-border-radius);
|
|
108
114
|
border-bottom-left-radius: var(--fs-table-colored-border-radius);
|
|
109
115
|
}
|