@faststore/ui 1.3.46 → 1.4.4
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 +38 -0
- package/dist/ui.cjs.development.js +25 -29
- package/dist/ui.cjs.development.js.map +1 -1
- package/dist/ui.cjs.production.min.js +1 -1
- package/dist/ui.cjs.production.min.js.map +1 -1
- package/dist/ui.esm.js +25 -29
- package/dist/ui.esm.js.map +1 -1
- package/package.json +3 -3
- package/src/atoms/List/List.test.tsx +21 -2
- package/src/atoms/List/List.tsx +1 -2
- package/src/atoms/List/stories/List.mdx +2 -11
- package/src/atoms/Slider/Slider.tsx +3 -3
- package/src/atoms/Slider/stories/Slider.mdx +2 -2
- package/src/molecules/Accordion/Accordion.test.tsx +6 -6
- package/src/molecules/Accordion/AccordionButton.tsx +1 -1
- package/src/molecules/Accordion/AccordionItem.tsx +1 -6
- package/src/molecules/Accordion/AccordionPanel.tsx +1 -1
- package/src/molecules/Accordion/stories/Accordion.mdx +3 -3
- package/src/molecules/Banner/Banner.test.tsx +6 -6
- package/src/molecules/Banner/BannerContent.tsx +1 -6
- package/src/molecules/Banner/BannerImage.tsx +1 -6
- package/src/molecules/Banner/BannerLink.tsx +1 -6
- package/src/molecules/Banner/stories/Banner.mdx +4 -4
- package/src/molecules/Breadcrumb/Breadcrumb.test.tsx +12 -7
- package/src/molecules/Breadcrumb/Breadcrumb.tsx +3 -3
- package/src/molecules/Breadcrumb/stories/Breadcrumb.mdx +4 -2
- package/src/molecules/PaymentMethods/PaymentMethods.tsx +1 -2
- package/src/molecules/PriceRange/PriceRange.tsx +3 -3
- package/src/molecules/PriceRange/stories/PriceRange.mdx +2 -2
- package/src/molecules/Table/Table.test.tsx +7 -11
- package/src/molecules/Table/TableBody.tsx +1 -6
- package/src/molecules/Table/TableCell.tsx +1 -1
- package/src/molecules/Table/TableFooter.tsx +1 -6
- package/src/molecules/Table/TableHead.tsx +1 -6
- package/src/molecules/Table/TableRow.tsx +1 -1
- package/src/molecules/Table/stories/Table.mdx +5 -7
- package/src/organisms/Card/Card.test.tsx +6 -6
- package/src/organisms/Card/CardActions.tsx +1 -6
- package/src/organisms/Card/CardContent.tsx +1 -6
- package/src/organisms/Card/CardImage.tsx +1 -1
- package/src/organisms/Card/stories/Card.mdx +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,44 @@
|
|
|
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
|
+
## 1.4.4 (2022-01-04)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* adjust data attributes pattern on multiple components ([#1093](https://github.com/vtex/faststore/issues/1093)) ([ca9172f](https://github.com/vtex/faststore/commit/ca9172fb353cfce7011f9144c1e94ed7e6b73f5f))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## 1.4.3 (2022-01-03)
|
|
18
|
+
|
|
19
|
+
**Note:** Version bump only for package @faststore/ui
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
## 1.4.2 (2022-01-03)
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
### Bug Fixes
|
|
29
|
+
|
|
30
|
+
* **ui:** removing aria-labelledby from payment methods component ([#1092](https://github.com/vtex/faststore/issues/1092)) ([bf4c7a9](https://github.com/vtex/faststore/commit/bf4c7a981c379ffb1777a2fd8cae787f735f7d2d))
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
## 1.4.1 (2022-01-03)
|
|
37
|
+
|
|
38
|
+
**Note:** Version bump only for package @faststore/ui
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
6
44
|
## 1.3.46 (2021-12-23)
|
|
7
45
|
|
|
8
46
|
**Note:** Version bump only for package @faststore/ui
|
|
@@ -222,7 +222,7 @@ const Slider = ({
|
|
|
222
222
|
className: className
|
|
223
223
|
}, React__default.createElement("div", {
|
|
224
224
|
ref: range,
|
|
225
|
-
"data-
|
|
225
|
+
"data-slider-range": true
|
|
226
226
|
}), React__default.createElement("input", {
|
|
227
227
|
type: "range",
|
|
228
228
|
min: min,
|
|
@@ -233,7 +233,7 @@ const Slider = ({
|
|
|
233
233
|
setMinVal(value);
|
|
234
234
|
minValRef.current = value;
|
|
235
235
|
},
|
|
236
|
-
"data-
|
|
236
|
+
"data-slider-thumb": "left",
|
|
237
237
|
"aria-valuemin": min,
|
|
238
238
|
"aria-valuemax": max,
|
|
239
239
|
"aria-valuenow": minVal,
|
|
@@ -249,7 +249,7 @@ const Slider = ({
|
|
|
249
249
|
setMaxVal(value);
|
|
250
250
|
maxValRef.current = value;
|
|
251
251
|
},
|
|
252
|
-
"data-
|
|
252
|
+
"data-slider-thumb": "right",
|
|
253
253
|
"aria-valuemin": min,
|
|
254
254
|
"aria-valuemax": max,
|
|
255
255
|
"aria-valuenow": maxVal,
|
|
@@ -273,8 +273,7 @@ const List = /*#__PURE__*/React.forwardRef(function List({
|
|
|
273
273
|
|
|
274
274
|
const dataAttributes = {
|
|
275
275
|
'data-testid': testId,
|
|
276
|
-
'data-store-list':
|
|
277
|
-
[`data-${variant}`]: true
|
|
276
|
+
'data-store-list': variant
|
|
278
277
|
};
|
|
279
278
|
const Component = (_ref = MaybeComponent != null ? MaybeComponent : variantToElement[variant]) != null ? _ref : 'ul';
|
|
280
279
|
return React__default.createElement(Component, Object.assign({
|
|
@@ -1047,7 +1046,7 @@ const BannerImage = /*#__PURE__*/React.forwardRef(function BannerImage({
|
|
|
1047
1046
|
}, ref) {
|
|
1048
1047
|
return React__default.createElement("div", Object.assign({
|
|
1049
1048
|
ref: ref,
|
|
1050
|
-
"data-
|
|
1049
|
+
"data-banner-image": true,
|
|
1051
1050
|
"data-testid": testId
|
|
1052
1051
|
}, otherProps), children);
|
|
1053
1052
|
});
|
|
@@ -1059,7 +1058,7 @@ const BannerContent = /*#__PURE__*/React.forwardRef(function BannerContent({
|
|
|
1059
1058
|
}, ref) {
|
|
1060
1059
|
return React__default.createElement("div", Object.assign({
|
|
1061
1060
|
ref: ref,
|
|
1062
|
-
"data-
|
|
1061
|
+
"data-banner-content": true,
|
|
1063
1062
|
"data-testid": testId
|
|
1064
1063
|
}, otherProps), children);
|
|
1065
1064
|
});
|
|
@@ -1071,7 +1070,7 @@ const BannerLink = /*#__PURE__*/React.forwardRef(function BannerLink({
|
|
|
1071
1070
|
}, ref) {
|
|
1072
1071
|
return React__default.createElement("div", Object.assign({
|
|
1073
1072
|
ref: ref,
|
|
1074
|
-
"data-
|
|
1073
|
+
"data-banner-link": true,
|
|
1075
1074
|
"data-testid": testId
|
|
1076
1075
|
}, otherProps), children);
|
|
1077
1076
|
});
|
|
@@ -1087,11 +1086,8 @@ const PaymentMethods = /*#__PURE__*/React.forwardRef(function PaymentMethods({
|
|
|
1087
1086
|
ref: ref,
|
|
1088
1087
|
"data-store-payment-methods": true,
|
|
1089
1088
|
"data-testid": testId
|
|
1090
|
-
}, otherProps), !!title && React__default.createElement("div", {
|
|
1091
|
-
id: "payment-methods"
|
|
1092
|
-
}, title), React__default.createElement("div", {
|
|
1089
|
+
}, otherProps), !!title && React__default.createElement("div", null, title), React__default.createElement("div", {
|
|
1093
1090
|
"data-payment-methods-flags": true,
|
|
1094
|
-
"aria-labelledby": title ? 'payment-methods' : undefined,
|
|
1095
1091
|
"aria-label": title ? undefined : ariaLabel
|
|
1096
1092
|
}, children));
|
|
1097
1093
|
});
|
|
@@ -1101,7 +1097,7 @@ const Divider = ({
|
|
|
1101
1097
|
testId
|
|
1102
1098
|
}) => {
|
|
1103
1099
|
const props = {
|
|
1104
|
-
'data-
|
|
1100
|
+
'data-breadcrumb-divider': true,
|
|
1105
1101
|
'aria-hidden': true,
|
|
1106
1102
|
'data-testid': `${testId}-divider`
|
|
1107
1103
|
};
|
|
@@ -1120,7 +1116,7 @@ const ListItem = ({
|
|
|
1120
1116
|
}) => {
|
|
1121
1117
|
const props = {
|
|
1122
1118
|
'data-testid': `${testId}-item`,
|
|
1123
|
-
'data-
|
|
1119
|
+
'data-breadcrumb-item': isLastItem ? 'current' : true,
|
|
1124
1120
|
'aria-current': isLastItem ? 'page' : undefined
|
|
1125
1121
|
};
|
|
1126
1122
|
|
|
@@ -1145,7 +1141,7 @@ const Breadcrumb = /*#__PURE__*/React.forwardRef(function Breadcrumb({
|
|
|
1145
1141
|
"data-store-breadcrumb": true,
|
|
1146
1142
|
"data-testid": testId
|
|
1147
1143
|
}, otherProps), React__default.createElement(List, {
|
|
1148
|
-
"data-
|
|
1144
|
+
"data-breadcrumb-list": true,
|
|
1149
1145
|
variant: "ordered"
|
|
1150
1146
|
}, React__default.Children.map(children, (child, index) => {
|
|
1151
1147
|
const isLastItem = index === lastIndex - 1;
|
|
@@ -1209,15 +1205,15 @@ const PriceRange = ({
|
|
|
1209
1205
|
onChange: handleChange,
|
|
1210
1206
|
"aria-label": ariaLabel
|
|
1211
1207
|
}), React__default.createElement("div", {
|
|
1212
|
-
"data-
|
|
1208
|
+
"data-price-range-values": true
|
|
1213
1209
|
}, React__default.createElement(Price, {
|
|
1214
1210
|
formatter: formatter,
|
|
1215
|
-
"data-
|
|
1211
|
+
"data-price-range-value": "min",
|
|
1216
1212
|
value: minVal,
|
|
1217
1213
|
variant: variant
|
|
1218
1214
|
}), React__default.createElement(Price, {
|
|
1219
1215
|
formatter: formatter,
|
|
1220
|
-
"data-
|
|
1216
|
+
"data-price-range-value": "max",
|
|
1221
1217
|
value: maxVal,
|
|
1222
1218
|
variant: variant
|
|
1223
1219
|
})));
|
|
@@ -1333,7 +1329,7 @@ const AccordionItem = /*#__PURE__*/React.forwardRef(function AccordionItem({
|
|
|
1333
1329
|
value: context
|
|
1334
1330
|
}, React__default.createElement("div", Object.assign({
|
|
1335
1331
|
ref: ref,
|
|
1336
|
-
"data-
|
|
1332
|
+
"data-accordion-item": true,
|
|
1337
1333
|
"data-testid": testId
|
|
1338
1334
|
}, otherProps), children));
|
|
1339
1335
|
});
|
|
@@ -1398,7 +1394,7 @@ const AccordionButton = /*#__PURE__*/React.forwardRef(function AccordionButton({
|
|
|
1398
1394
|
id: button,
|
|
1399
1395
|
"aria-expanded": indices.has(index),
|
|
1400
1396
|
"aria-controls": panel,
|
|
1401
|
-
"data-
|
|
1397
|
+
"data-accordion-button": true,
|
|
1402
1398
|
"data-testid": testId,
|
|
1403
1399
|
onKeyDown: onKeyDown,
|
|
1404
1400
|
onClick: () => {
|
|
@@ -1425,7 +1421,7 @@ const AccordionPanel = /*#__PURE__*/React.forwardRef(function AccordionPanel({
|
|
|
1425
1421
|
id: panel,
|
|
1426
1422
|
"aria-labelledby": button,
|
|
1427
1423
|
role: "region",
|
|
1428
|
-
"data-
|
|
1424
|
+
"data-accordion-panel": true,
|
|
1429
1425
|
"data-testid": testId,
|
|
1430
1426
|
hidden: !indices.has(index)
|
|
1431
1427
|
}, otherProps), children);
|
|
@@ -1450,7 +1446,7 @@ const TableRow = /*#__PURE__*/React.forwardRef(function TableRow({
|
|
|
1450
1446
|
}, ref) {
|
|
1451
1447
|
return React__default.createElement("tr", Object.assign({
|
|
1452
1448
|
ref: ref,
|
|
1453
|
-
"data-
|
|
1449
|
+
"data-table-row": true,
|
|
1454
1450
|
"data-testid": testId
|
|
1455
1451
|
}, otherProps), children);
|
|
1456
1452
|
});
|
|
@@ -1465,7 +1461,7 @@ const TableCell = /*#__PURE__*/React.forwardRef(function TableCell({
|
|
|
1465
1461
|
const Cell = variant === 'header' ? 'th' : 'td';
|
|
1466
1462
|
return React__default.createElement(Cell, Object.assign({
|
|
1467
1463
|
ref: ref,
|
|
1468
|
-
"data-
|
|
1464
|
+
"data-table-cell": variant,
|
|
1469
1465
|
"data-testid": testId,
|
|
1470
1466
|
scope: scope
|
|
1471
1467
|
}, otherProps), children);
|
|
@@ -1479,7 +1475,7 @@ const TableBody = /*#__PURE__*/React.forwardRef(function TableBody({
|
|
|
1479
1475
|
return React__default.createElement("tbody", Object.assign({
|
|
1480
1476
|
ref: ref,
|
|
1481
1477
|
"data-testid": testId,
|
|
1482
|
-
"data-
|
|
1478
|
+
"data-table-body": true
|
|
1483
1479
|
}, otherProps), children);
|
|
1484
1480
|
});
|
|
1485
1481
|
|
|
@@ -1491,7 +1487,7 @@ const TableHead = /*#__PURE__*/React.forwardRef(function TableHead({
|
|
|
1491
1487
|
return React__default.createElement("thead", Object.assign({
|
|
1492
1488
|
ref: ref,
|
|
1493
1489
|
"data-testid": testId,
|
|
1494
|
-
"data-
|
|
1490
|
+
"data-table-head": true
|
|
1495
1491
|
}, otherProps), children);
|
|
1496
1492
|
});
|
|
1497
1493
|
|
|
@@ -1503,7 +1499,7 @@ const TableFooter = /*#__PURE__*/React.forwardRef(function TableFooter({
|
|
|
1503
1499
|
return React__default.createElement("tfoot", Object.assign({
|
|
1504
1500
|
ref: ref,
|
|
1505
1501
|
"data-testid": testId,
|
|
1506
|
-
"data-
|
|
1502
|
+
"data-table-footer": true
|
|
1507
1503
|
}, otherProps), children);
|
|
1508
1504
|
});
|
|
1509
1505
|
|
|
@@ -1567,7 +1563,7 @@ const CardImage = /*#__PURE__*/React.forwardRef(function CardImage({
|
|
|
1567
1563
|
}, ref) {
|
|
1568
1564
|
return React__default.createElement("div", Object.assign({
|
|
1569
1565
|
ref: ref,
|
|
1570
|
-
"data-
|
|
1566
|
+
"data-card-image": true,
|
|
1571
1567
|
"data-testid": testId
|
|
1572
1568
|
}, otherProps), children);
|
|
1573
1569
|
});
|
|
@@ -1579,7 +1575,7 @@ const CardContent = /*#__PURE__*/React.forwardRef(function CardContent({
|
|
|
1579
1575
|
}, ref) {
|
|
1580
1576
|
return React__default.createElement("section", Object.assign({
|
|
1581
1577
|
ref: ref,
|
|
1582
|
-
"data-
|
|
1578
|
+
"data-card-content": true,
|
|
1583
1579
|
"data-testid": testId
|
|
1584
1580
|
}, otherProps), children);
|
|
1585
1581
|
});
|
|
@@ -1591,7 +1587,7 @@ const CardActions = /*#__PURE__*/React.forwardRef(function CardActions({
|
|
|
1591
1587
|
}, ref) {
|
|
1592
1588
|
return React__default.createElement("div", Object.assign({
|
|
1593
1589
|
ref: ref,
|
|
1594
|
-
"data-
|
|
1590
|
+
"data-card-actions": true,
|
|
1595
1591
|
"data-testid": testId
|
|
1596
1592
|
}, otherProps), children);
|
|
1597
1593
|
});
|