@faststore/ui 1.4.1 → 1.4.5
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/dist/ui.esm.js
CHANGED
|
@@ -214,7 +214,7 @@ const Slider = ({
|
|
|
214
214
|
className: className
|
|
215
215
|
}, React.createElement("div", {
|
|
216
216
|
ref: range,
|
|
217
|
-
"data-
|
|
217
|
+
"data-slider-range": true
|
|
218
218
|
}), React.createElement("input", {
|
|
219
219
|
type: "range",
|
|
220
220
|
min: min,
|
|
@@ -225,7 +225,7 @@ const Slider = ({
|
|
|
225
225
|
setMinVal(value);
|
|
226
226
|
minValRef.current = value;
|
|
227
227
|
},
|
|
228
|
-
"data-
|
|
228
|
+
"data-slider-thumb": "left",
|
|
229
229
|
"aria-valuemin": min,
|
|
230
230
|
"aria-valuemax": max,
|
|
231
231
|
"aria-valuenow": minVal,
|
|
@@ -241,7 +241,7 @@ const Slider = ({
|
|
|
241
241
|
setMaxVal(value);
|
|
242
242
|
maxValRef.current = value;
|
|
243
243
|
},
|
|
244
|
-
"data-
|
|
244
|
+
"data-slider-thumb": "right",
|
|
245
245
|
"aria-valuemin": min,
|
|
246
246
|
"aria-valuemax": max,
|
|
247
247
|
"aria-valuenow": maxVal,
|
|
@@ -265,8 +265,7 @@ const List = /*#__PURE__*/forwardRef(function List({
|
|
|
265
265
|
|
|
266
266
|
const dataAttributes = {
|
|
267
267
|
'data-testid': testId,
|
|
268
|
-
'data-store-list':
|
|
269
|
-
[`data-${variant}`]: true
|
|
268
|
+
'data-store-list': variant
|
|
270
269
|
};
|
|
271
270
|
const Component = (_ref = MaybeComponent != null ? MaybeComponent : variantToElement[variant]) != null ? _ref : 'ul';
|
|
272
271
|
return React.createElement(Component, Object.assign({
|
|
@@ -1039,7 +1038,7 @@ const BannerImage = /*#__PURE__*/forwardRef(function BannerImage({
|
|
|
1039
1038
|
}, ref) {
|
|
1040
1039
|
return React.createElement("div", Object.assign({
|
|
1041
1040
|
ref: ref,
|
|
1042
|
-
"data-
|
|
1041
|
+
"data-banner-image": true,
|
|
1043
1042
|
"data-testid": testId
|
|
1044
1043
|
}, otherProps), children);
|
|
1045
1044
|
});
|
|
@@ -1051,7 +1050,7 @@ const BannerContent = /*#__PURE__*/forwardRef(function BannerContent({
|
|
|
1051
1050
|
}, ref) {
|
|
1052
1051
|
return React.createElement("div", Object.assign({
|
|
1053
1052
|
ref: ref,
|
|
1054
|
-
"data-
|
|
1053
|
+
"data-banner-content": true,
|
|
1055
1054
|
"data-testid": testId
|
|
1056
1055
|
}, otherProps), children);
|
|
1057
1056
|
});
|
|
@@ -1063,7 +1062,7 @@ const BannerLink = /*#__PURE__*/forwardRef(function BannerLink({
|
|
|
1063
1062
|
}, ref) {
|
|
1064
1063
|
return React.createElement("div", Object.assign({
|
|
1065
1064
|
ref: ref,
|
|
1066
|
-
"data-
|
|
1065
|
+
"data-banner-link": true,
|
|
1067
1066
|
"data-testid": testId
|
|
1068
1067
|
}, otherProps), children);
|
|
1069
1068
|
});
|
|
@@ -1079,11 +1078,8 @@ const PaymentMethods = /*#__PURE__*/forwardRef(function PaymentMethods({
|
|
|
1079
1078
|
ref: ref,
|
|
1080
1079
|
"data-store-payment-methods": true,
|
|
1081
1080
|
"data-testid": testId
|
|
1082
|
-
}, otherProps), !!title && React.createElement("div", {
|
|
1083
|
-
id: "payment-methods"
|
|
1084
|
-
}, title), React.createElement("div", {
|
|
1081
|
+
}, otherProps), !!title && React.createElement("div", null, title), React.createElement("div", {
|
|
1085
1082
|
"data-payment-methods-flags": true,
|
|
1086
|
-
"aria-labelledby": title ? 'payment-methods' : undefined,
|
|
1087
1083
|
"aria-label": title ? undefined : ariaLabel
|
|
1088
1084
|
}, children));
|
|
1089
1085
|
});
|
|
@@ -1093,7 +1089,7 @@ const Divider = ({
|
|
|
1093
1089
|
testId
|
|
1094
1090
|
}) => {
|
|
1095
1091
|
const props = {
|
|
1096
|
-
'data-
|
|
1092
|
+
'data-breadcrumb-divider': true,
|
|
1097
1093
|
'aria-hidden': true,
|
|
1098
1094
|
'data-testid': `${testId}-divider`
|
|
1099
1095
|
};
|
|
@@ -1112,7 +1108,7 @@ const ListItem = ({
|
|
|
1112
1108
|
}) => {
|
|
1113
1109
|
const props = {
|
|
1114
1110
|
'data-testid': `${testId}-item`,
|
|
1115
|
-
'data-
|
|
1111
|
+
'data-breadcrumb-item': isLastItem ? 'current' : true,
|
|
1116
1112
|
'aria-current': isLastItem ? 'page' : undefined
|
|
1117
1113
|
};
|
|
1118
1114
|
|
|
@@ -1137,7 +1133,7 @@ const Breadcrumb = /*#__PURE__*/forwardRef(function Breadcrumb({
|
|
|
1137
1133
|
"data-store-breadcrumb": true,
|
|
1138
1134
|
"data-testid": testId
|
|
1139
1135
|
}, otherProps), React.createElement(List, {
|
|
1140
|
-
"data-
|
|
1136
|
+
"data-breadcrumb-list": true,
|
|
1141
1137
|
variant: "ordered"
|
|
1142
1138
|
}, React.Children.map(children, (child, index) => {
|
|
1143
1139
|
const isLastItem = index === lastIndex - 1;
|
|
@@ -1201,15 +1197,15 @@ const PriceRange = ({
|
|
|
1201
1197
|
onChange: handleChange,
|
|
1202
1198
|
"aria-label": ariaLabel
|
|
1203
1199
|
}), React.createElement("div", {
|
|
1204
|
-
"data-
|
|
1200
|
+
"data-price-range-values": true
|
|
1205
1201
|
}, React.createElement(Price, {
|
|
1206
1202
|
formatter: formatter,
|
|
1207
|
-
"data-
|
|
1203
|
+
"data-price-range-value": "min",
|
|
1208
1204
|
value: minVal,
|
|
1209
1205
|
variant: variant
|
|
1210
1206
|
}), React.createElement(Price, {
|
|
1211
1207
|
formatter: formatter,
|
|
1212
|
-
"data-
|
|
1208
|
+
"data-price-range-value": "max",
|
|
1213
1209
|
value: maxVal,
|
|
1214
1210
|
variant: variant
|
|
1215
1211
|
})));
|
|
@@ -1325,7 +1321,7 @@ const AccordionItem = /*#__PURE__*/forwardRef(function AccordionItem({
|
|
|
1325
1321
|
value: context
|
|
1326
1322
|
}, React.createElement("div", Object.assign({
|
|
1327
1323
|
ref: ref,
|
|
1328
|
-
"data-
|
|
1324
|
+
"data-accordion-item": true,
|
|
1329
1325
|
"data-testid": testId
|
|
1330
1326
|
}, otherProps), children));
|
|
1331
1327
|
});
|
|
@@ -1390,7 +1386,7 @@ const AccordionButton = /*#__PURE__*/forwardRef(function AccordionButton({
|
|
|
1390
1386
|
id: button,
|
|
1391
1387
|
"aria-expanded": indices.has(index),
|
|
1392
1388
|
"aria-controls": panel,
|
|
1393
|
-
"data-
|
|
1389
|
+
"data-accordion-button": true,
|
|
1394
1390
|
"data-testid": testId,
|
|
1395
1391
|
onKeyDown: onKeyDown,
|
|
1396
1392
|
onClick: () => {
|
|
@@ -1417,7 +1413,7 @@ const AccordionPanel = /*#__PURE__*/forwardRef(function AccordionPanel({
|
|
|
1417
1413
|
id: panel,
|
|
1418
1414
|
"aria-labelledby": button,
|
|
1419
1415
|
role: "region",
|
|
1420
|
-
"data-
|
|
1416
|
+
"data-accordion-panel": true,
|
|
1421
1417
|
"data-testid": testId,
|
|
1422
1418
|
hidden: !indices.has(index)
|
|
1423
1419
|
}, otherProps), children);
|
|
@@ -1442,7 +1438,7 @@ const TableRow = /*#__PURE__*/forwardRef(function TableRow({
|
|
|
1442
1438
|
}, ref) {
|
|
1443
1439
|
return React.createElement("tr", Object.assign({
|
|
1444
1440
|
ref: ref,
|
|
1445
|
-
"data-
|
|
1441
|
+
"data-table-row": true,
|
|
1446
1442
|
"data-testid": testId
|
|
1447
1443
|
}, otherProps), children);
|
|
1448
1444
|
});
|
|
@@ -1457,7 +1453,7 @@ const TableCell = /*#__PURE__*/forwardRef(function TableCell({
|
|
|
1457
1453
|
const Cell = variant === 'header' ? 'th' : 'td';
|
|
1458
1454
|
return React.createElement(Cell, Object.assign({
|
|
1459
1455
|
ref: ref,
|
|
1460
|
-
"data-
|
|
1456
|
+
"data-table-cell": variant,
|
|
1461
1457
|
"data-testid": testId,
|
|
1462
1458
|
scope: scope
|
|
1463
1459
|
}, otherProps), children);
|
|
@@ -1471,7 +1467,7 @@ const TableBody = /*#__PURE__*/forwardRef(function TableBody({
|
|
|
1471
1467
|
return React.createElement("tbody", Object.assign({
|
|
1472
1468
|
ref: ref,
|
|
1473
1469
|
"data-testid": testId,
|
|
1474
|
-
"data-
|
|
1470
|
+
"data-table-body": true
|
|
1475
1471
|
}, otherProps), children);
|
|
1476
1472
|
});
|
|
1477
1473
|
|
|
@@ -1483,7 +1479,7 @@ const TableHead = /*#__PURE__*/forwardRef(function TableHead({
|
|
|
1483
1479
|
return React.createElement("thead", Object.assign({
|
|
1484
1480
|
ref: ref,
|
|
1485
1481
|
"data-testid": testId,
|
|
1486
|
-
"data-
|
|
1482
|
+
"data-table-head": true
|
|
1487
1483
|
}, otherProps), children);
|
|
1488
1484
|
});
|
|
1489
1485
|
|
|
@@ -1495,7 +1491,7 @@ const TableFooter = /*#__PURE__*/forwardRef(function TableFooter({
|
|
|
1495
1491
|
return React.createElement("tfoot", Object.assign({
|
|
1496
1492
|
ref: ref,
|
|
1497
1493
|
"data-testid": testId,
|
|
1498
|
-
"data-
|
|
1494
|
+
"data-table-footer": true
|
|
1499
1495
|
}, otherProps), children);
|
|
1500
1496
|
});
|
|
1501
1497
|
|
|
@@ -1559,7 +1555,7 @@ const CardImage = /*#__PURE__*/forwardRef(function CardImage({
|
|
|
1559
1555
|
}, ref) {
|
|
1560
1556
|
return React.createElement("div", Object.assign({
|
|
1561
1557
|
ref: ref,
|
|
1562
|
-
"data-
|
|
1558
|
+
"data-card-image": true,
|
|
1563
1559
|
"data-testid": testId
|
|
1564
1560
|
}, otherProps), children);
|
|
1565
1561
|
});
|
|
@@ -1571,7 +1567,7 @@ const CardContent = /*#__PURE__*/forwardRef(function CardContent({
|
|
|
1571
1567
|
}, ref) {
|
|
1572
1568
|
return React.createElement("section", Object.assign({
|
|
1573
1569
|
ref: ref,
|
|
1574
|
-
"data-
|
|
1570
|
+
"data-card-content": true,
|
|
1575
1571
|
"data-testid": testId
|
|
1576
1572
|
}, otherProps), children);
|
|
1577
1573
|
});
|
|
@@ -1583,7 +1579,7 @@ const CardActions = /*#__PURE__*/forwardRef(function CardActions({
|
|
|
1583
1579
|
}, ref) {
|
|
1584
1580
|
return React.createElement("div", Object.assign({
|
|
1585
1581
|
ref: ref,
|
|
1586
|
-
"data-
|
|
1582
|
+
"data-card-actions": true,
|
|
1587
1583
|
"data-testid": testId
|
|
1588
1584
|
}, otherProps), children);
|
|
1589
1585
|
});
|