@nok-integration/storefront-react 0.19.32 → 0.19.33

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/index.mjs CHANGED
@@ -7502,20 +7502,22 @@ function ReturnFlowContent({ orderRef, returnRef, onDone, locale }) {
7502
7502
  busy
7503
7503
  });
7504
7504
  }
7505
- const page$3 = "_page_1v9my_8";
7506
- const widget = "_widget_1v9my_18";
7507
- const titleRow = "_titleRow_1v9my_26";
7508
- const headline$1 = "_headline_1v9my_42";
7509
- const track$5 = "_track_1v9my_74";
7510
- const rule$1 = "_rule_1v9my_99";
7511
- const help = "_help_1v9my_109";
7512
- const helpTitle = "_helpTitle_1v9my_115";
7513
- const helpRows = "_helpRows_1v9my_122";
7514
- const helpRow = "_helpRow_1v9my_122";
7515
- const cancel = "_cancel_1v9my_180";
7516
- const cancelledHead = "_cancelledHead_1v9my_204";
7517
- const cancelledTitle = "_cancelledTitle_1v9my_210";
7518
- const cancelledMeta = "_cancelledMeta_1v9my_219";
7505
+ const page$3 = "_page_1qh0r_8";
7506
+ const widget = "_widget_1qh0r_18";
7507
+ const titleRow = "_titleRow_1qh0r_26";
7508
+ const headline$1 = "_headline_1qh0r_42";
7509
+ const track$5 = "_track_1qh0r_74";
7510
+ const rule$1 = "_rule_1qh0r_99";
7511
+ const help = "_help_1qh0r_109";
7512
+ const helpTitle = "_helpTitle_1qh0r_115";
7513
+ const helpRows = "_helpRows_1qh0r_122";
7514
+ const helpRowEnd = "_helpRowEnd_1qh0r_131";
7515
+ const helpStatus = "_helpStatus_1qh0r_139";
7516
+ const helpRow = "_helpRow_1qh0r_122";
7517
+ const cancel = "_cancel_1qh0r_197";
7518
+ const cancelledHead = "_cancelledHead_1qh0r_221";
7519
+ const cancelledTitle = "_cancelledTitle_1qh0r_227";
7520
+ const cancelledMeta = "_cancelledMeta_1qh0r_236";
7519
7521
  const styles$y = {
7520
7522
  page: page$3,
7521
7523
  widget,
@@ -7526,6 +7528,8 @@ const styles$y = {
7526
7528
  help,
7527
7529
  helpTitle,
7528
7530
  helpRows,
7531
+ helpRowEnd,
7532
+ helpStatus,
7529
7533
  helpRow,
7530
7534
  cancel,
7531
7535
  cancelledHead,
@@ -7816,6 +7820,7 @@ function NeedHelp({ order, onStartReturn, onOpenReturn, onContactSupport }) {
7816
7820
  className: styles$y.helpRows,
7817
7821
  children: [returns.map((ret) => jsx(HelpRow, {
7818
7822
  label: returns.length > 1 ? `Track return ${ret.return_ref}` : "Track your return",
7823
+ status: RETURN_STATUS[ret.status] ?? ret.status.replace(/_/g, " "),
7819
7824
  onClick: () => onOpenReturn?.(ret.return_ref)
7820
7825
  }, ret.return_ref)), order.can_return && onStartReturn && jsx(HelpRow, {
7821
7826
  label: "Start a return",
@@ -7833,14 +7838,26 @@ function NeedHelp({ order, onStartReturn, onOpenReturn, onContactSupport }) {
7833
7838
  })]
7834
7839
  });
7835
7840
  }
7836
- function HelpRow({ label: label2, onClick }) {
7841
+ const RETURN_STATUS = {
7842
+ reported: "Return requested",
7843
+ package_received: "Package received",
7844
+ completed: "Return complete"
7845
+ };
7846
+ function HelpRow({ label: label2, status, onClick }) {
7847
+ const t = useT();
7837
7848
  return jsxs("button", {
7838
7849
  type: "button",
7839
7850
  className: styles$y.helpRow,
7840
7851
  onClick,
7841
7852
  children: [jsx("span", {
7842
7853
  children: label2
7843
- }), jsx(ChevronRight$1, {})]
7854
+ }), jsxs("span", {
7855
+ className: styles$y.helpRowEnd,
7856
+ children: [status && jsx("span", {
7857
+ className: styles$y.helpStatus,
7858
+ children: t(status)
7859
+ }), jsx(ChevronRight$1, {})]
7860
+ })]
7844
7861
  });
7845
7862
  }
7846
7863
  function shortRef$1(orderRef) {
@@ -7502,20 +7502,22 @@ function ReturnFlowContent({ orderRef, returnRef, onDone, locale }) {
7502
7502
  busy
7503
7503
  });
7504
7504
  }
7505
- const page$3 = "_page_1v9my_8";
7506
- const widget = "_widget_1v9my_18";
7507
- const titleRow = "_titleRow_1v9my_26";
7508
- const headline$1 = "_headline_1v9my_42";
7509
- const track$5 = "_track_1v9my_74";
7510
- const rule$1 = "_rule_1v9my_99";
7511
- const help = "_help_1v9my_109";
7512
- const helpTitle = "_helpTitle_1v9my_115";
7513
- const helpRows = "_helpRows_1v9my_122";
7514
- const helpRow = "_helpRow_1v9my_122";
7515
- const cancel = "_cancel_1v9my_180";
7516
- const cancelledHead = "_cancelledHead_1v9my_204";
7517
- const cancelledTitle = "_cancelledTitle_1v9my_210";
7518
- const cancelledMeta = "_cancelledMeta_1v9my_219";
7505
+ const page$3 = "_page_1qh0r_8";
7506
+ const widget = "_widget_1qh0r_18";
7507
+ const titleRow = "_titleRow_1qh0r_26";
7508
+ const headline$1 = "_headline_1qh0r_42";
7509
+ const track$5 = "_track_1qh0r_74";
7510
+ const rule$1 = "_rule_1qh0r_99";
7511
+ const help = "_help_1qh0r_109";
7512
+ const helpTitle = "_helpTitle_1qh0r_115";
7513
+ const helpRows = "_helpRows_1qh0r_122";
7514
+ const helpRowEnd = "_helpRowEnd_1qh0r_131";
7515
+ const helpStatus = "_helpStatus_1qh0r_139";
7516
+ const helpRow = "_helpRow_1qh0r_122";
7517
+ const cancel = "_cancel_1qh0r_197";
7518
+ const cancelledHead = "_cancelledHead_1qh0r_221";
7519
+ const cancelledTitle = "_cancelledTitle_1qh0r_227";
7520
+ const cancelledMeta = "_cancelledMeta_1qh0r_236";
7519
7521
  const styles$y = {
7520
7522
  page: page$3,
7521
7523
  widget,
@@ -7526,6 +7528,8 @@ const styles$y = {
7526
7528
  help,
7527
7529
  helpTitle,
7528
7530
  helpRows,
7531
+ helpRowEnd,
7532
+ helpStatus,
7529
7533
  helpRow,
7530
7534
  cancel,
7531
7535
  cancelledHead,
@@ -7816,6 +7820,7 @@ function NeedHelp({ order, onStartReturn, onOpenReturn, onContactSupport }) {
7816
7820
  className: styles$y.helpRows,
7817
7821
  children: [returns.map((ret) => jsx(HelpRow, {
7818
7822
  label: returns.length > 1 ? `Track return ${ret.return_ref}` : "Track your return",
7823
+ status: RETURN_STATUS[ret.status] ?? ret.status.replace(/_/g, " "),
7819
7824
  onClick: () => onOpenReturn?.(ret.return_ref)
7820
7825
  }, ret.return_ref)), order.can_return && onStartReturn && jsx(HelpRow, {
7821
7826
  label: "Start a return",
@@ -7833,14 +7838,26 @@ function NeedHelp({ order, onStartReturn, onOpenReturn, onContactSupport }) {
7833
7838
  })]
7834
7839
  });
7835
7840
  }
7836
- function HelpRow({ label: label2, onClick }) {
7841
+ const RETURN_STATUS = {
7842
+ reported: "Return requested",
7843
+ package_received: "Package received",
7844
+ completed: "Return complete"
7845
+ };
7846
+ function HelpRow({ label: label2, status, onClick }) {
7847
+ const t = useT();
7837
7848
  return jsxs("button", {
7838
7849
  type: "button",
7839
7850
  className: styles$y.helpRow,
7840
7851
  onClick,
7841
7852
  children: [jsx("span", {
7842
7853
  children: label2
7843
- }), jsx(ChevronRight$1, {})]
7854
+ }), jsxs("span", {
7855
+ className: styles$y.helpRowEnd,
7856
+ children: [status && jsx("span", {
7857
+ className: styles$y.helpStatus,
7858
+ children: t(status)
7859
+ }), jsx(ChevronRight$1, {})]
7860
+ })]
7844
7861
  });
7845
7862
  }
7846
7863
  function shortRef$1(orderRef) {
@@ -1397,24 +1397,24 @@
1397
1397
  text-decoration: line-through;
1398
1398
  font-variant-numeric: tabular-nums;
1399
1399
  }
1400
- ._page_1v9my_8 {
1400
+ ._page_1qh0r_8 {
1401
1401
  display: flex;
1402
1402
  flex-direction: column;
1403
1403
  gap: var(--space-32);
1404
1404
  padding: var(--space-20) var(--space-16) var(--space-24);
1405
1405
  }
1406
- ._widget_1v9my_18 {
1406
+ ._widget_1qh0r_18 {
1407
1407
  display: flex;
1408
1408
  flex-direction: column;
1409
1409
  gap: var(--space-32);
1410
1410
  }
1411
- ._titleRow_1v9my_26 {
1411
+ ._titleRow_1qh0r_26 {
1412
1412
  display: flex;
1413
1413
  align-items: center;
1414
1414
  justify-content: space-between;
1415
1415
  gap: var(--space-12);
1416
1416
  }
1417
- ._headline_1v9my_42 {
1417
+ ._headline_1qh0r_42 {
1418
1418
  margin: -9px 0;
1419
1419
  padding: 9px 0;
1420
1420
  min-width: 0;
@@ -1425,7 +1425,7 @@
1425
1425
  text-overflow: ellipsis;
1426
1426
  white-space: nowrap;
1427
1427
  }
1428
- ._track_1v9my_74 {
1428
+ ._track_1qh0r_74 {
1429
1429
  display: inline-flex;
1430
1430
  align-items: center;
1431
1431
  gap: var(--space-6);
@@ -1436,33 +1436,43 @@
1436
1436
  color: var(--color-text-default);
1437
1437
  text-decoration: none;
1438
1438
  }
1439
- ._track_1v9my_74:focus-visible {
1439
+ ._track_1qh0r_74:focus-visible {
1440
1440
  outline: none;
1441
1441
  box-shadow: var(--focus-ring);
1442
1442
  border-radius: var(--radius-4);
1443
1443
  }
1444
- ._rule_1v9my_99 {
1444
+ ._rule_1qh0r_99 {
1445
1445
  height: 1px;
1446
1446
  margin: 0 0 -1px;
1447
1447
  border: 0;
1448
1448
  background: var(--color-border-default);
1449
1449
  }
1450
- ._help_1v9my_109 {
1450
+ ._help_1qh0r_109 {
1451
1451
  display: flex;
1452
1452
  flex-direction: column;
1453
1453
  gap: var(--space-6);
1454
1454
  }
1455
- ._helpTitle_1v9my_115 {
1455
+ ._helpTitle_1qh0r_115 {
1456
1456
  margin: 0;
1457
1457
  font-size: var(--type-heading-md-size);
1458
1458
  line-height: 1.32;
1459
1459
  font-weight: var(--font-weight-bold);
1460
1460
  }
1461
- ._helpRows_1v9my_122 {
1461
+ ._helpRows_1qh0r_122 {
1462
1462
  display: flex;
1463
1463
  flex-direction: column;
1464
1464
  }
1465
- ._helpRow_1v9my_122 {
1465
+ ._helpRowEnd_1qh0r_131 {
1466
+ display: flex;
1467
+ align-items: center;
1468
+ gap: var(--space-8);
1469
+ min-width: 0;
1470
+ }
1471
+ ._helpStatus_1qh0r_139 {
1472
+ color: var(--color-text-subtle);
1473
+ white-space: nowrap;
1474
+ }
1475
+ ._helpRow_1qh0r_122 {
1466
1476
  display: flex;
1467
1477
  align-items: center;
1468
1478
  justify-content: space-between;
@@ -1480,14 +1490,14 @@
1480
1490
  text-align: left;
1481
1491
  cursor: pointer;
1482
1492
  }
1483
- ._helpRow_1v9my_122 + ._helpRow_1v9my_122 {
1493
+ ._helpRow_1qh0r_122 + ._helpRow_1qh0r_122 {
1484
1494
  border-top: 1px solid var(--color-border-subtle);
1485
1495
  }
1486
- ._helpRow_1v9my_122:focus-visible {
1496
+ ._helpRow_1qh0r_122:focus-visible {
1487
1497
  outline: none;
1488
1498
  box-shadow: var(--focus-ring);
1489
1499
  }
1490
- ._cancel_1v9my_180 {
1500
+ ._cancel_1qh0r_197 {
1491
1501
  display: inline-flex;
1492
1502
  align-items: center;
1493
1503
  justify-content: center;
@@ -1504,23 +1514,23 @@
1504
1514
  font-weight: var(--font-weight-bold);
1505
1515
  cursor: pointer;
1506
1516
  }
1507
- ._cancel_1v9my_180:focus-visible {
1517
+ ._cancel_1qh0r_197:focus-visible {
1508
1518
  outline: none;
1509
1519
  box-shadow: var(--focus-ring);
1510
1520
  }
1511
- ._cancelledHead_1v9my_204 {
1521
+ ._cancelledHead_1qh0r_221 {
1512
1522
  display: flex;
1513
1523
  flex-direction: column;
1514
1524
  gap: var(--space-8);
1515
1525
  }
1516
- ._cancelledTitle_1v9my_210 {
1526
+ ._cancelledTitle_1qh0r_227 {
1517
1527
  margin: 0;
1518
1528
  font-size: var(--type-heading-md-size);
1519
1529
  line-height: 1.32;
1520
1530
  font-weight: var(--font-weight-bold);
1521
1531
  color: var(--color-text-default);
1522
1532
  }
1523
- ._cancelledMeta_1v9my_219 {
1533
+ ._cancelledMeta_1qh0r_236 {
1524
1534
  font-size: var(--type-trimmed-sm-size);
1525
1535
  line-height: 10px;
1526
1536
  padding: 5px 0;
package/dist/styles.css CHANGED
@@ -1397,24 +1397,24 @@
1397
1397
  text-decoration: line-through;
1398
1398
  font-variant-numeric: tabular-nums;
1399
1399
  }
1400
- ._page_1v9my_8 {
1400
+ ._page_1qh0r_8 {
1401
1401
  display: flex;
1402
1402
  flex-direction: column;
1403
1403
  gap: var(--space-32);
1404
1404
  padding: var(--space-20) var(--space-16) var(--space-24);
1405
1405
  }
1406
- ._widget_1v9my_18 {
1406
+ ._widget_1qh0r_18 {
1407
1407
  display: flex;
1408
1408
  flex-direction: column;
1409
1409
  gap: var(--space-32);
1410
1410
  }
1411
- ._titleRow_1v9my_26 {
1411
+ ._titleRow_1qh0r_26 {
1412
1412
  display: flex;
1413
1413
  align-items: center;
1414
1414
  justify-content: space-between;
1415
1415
  gap: var(--space-12);
1416
1416
  }
1417
- ._headline_1v9my_42 {
1417
+ ._headline_1qh0r_42 {
1418
1418
  margin: -9px 0;
1419
1419
  padding: 9px 0;
1420
1420
  min-width: 0;
@@ -1425,7 +1425,7 @@
1425
1425
  text-overflow: ellipsis;
1426
1426
  white-space: nowrap;
1427
1427
  }
1428
- ._track_1v9my_74 {
1428
+ ._track_1qh0r_74 {
1429
1429
  display: inline-flex;
1430
1430
  align-items: center;
1431
1431
  gap: var(--space-6);
@@ -1436,33 +1436,43 @@
1436
1436
  color: var(--color-text-default);
1437
1437
  text-decoration: none;
1438
1438
  }
1439
- ._track_1v9my_74:focus-visible {
1439
+ ._track_1qh0r_74:focus-visible {
1440
1440
  outline: none;
1441
1441
  box-shadow: var(--focus-ring);
1442
1442
  border-radius: var(--radius-4);
1443
1443
  }
1444
- ._rule_1v9my_99 {
1444
+ ._rule_1qh0r_99 {
1445
1445
  height: 1px;
1446
1446
  margin: 0 0 -1px;
1447
1447
  border: 0;
1448
1448
  background: var(--color-border-default);
1449
1449
  }
1450
- ._help_1v9my_109 {
1450
+ ._help_1qh0r_109 {
1451
1451
  display: flex;
1452
1452
  flex-direction: column;
1453
1453
  gap: var(--space-6);
1454
1454
  }
1455
- ._helpTitle_1v9my_115 {
1455
+ ._helpTitle_1qh0r_115 {
1456
1456
  margin: 0;
1457
1457
  font-size: var(--type-heading-md-size);
1458
1458
  line-height: 1.32;
1459
1459
  font-weight: var(--font-weight-bold);
1460
1460
  }
1461
- ._helpRows_1v9my_122 {
1461
+ ._helpRows_1qh0r_122 {
1462
1462
  display: flex;
1463
1463
  flex-direction: column;
1464
1464
  }
1465
- ._helpRow_1v9my_122 {
1465
+ ._helpRowEnd_1qh0r_131 {
1466
+ display: flex;
1467
+ align-items: center;
1468
+ gap: var(--space-8);
1469
+ min-width: 0;
1470
+ }
1471
+ ._helpStatus_1qh0r_139 {
1472
+ color: var(--color-text-subtle);
1473
+ white-space: nowrap;
1474
+ }
1475
+ ._helpRow_1qh0r_122 {
1466
1476
  display: flex;
1467
1477
  align-items: center;
1468
1478
  justify-content: space-between;
@@ -1480,14 +1490,14 @@
1480
1490
  text-align: left;
1481
1491
  cursor: pointer;
1482
1492
  }
1483
- ._helpRow_1v9my_122 + ._helpRow_1v9my_122 {
1493
+ ._helpRow_1qh0r_122 + ._helpRow_1qh0r_122 {
1484
1494
  border-top: 1px solid var(--color-border-subtle);
1485
1495
  }
1486
- ._helpRow_1v9my_122:focus-visible {
1496
+ ._helpRow_1qh0r_122:focus-visible {
1487
1497
  outline: none;
1488
1498
  box-shadow: var(--focus-ring);
1489
1499
  }
1490
- ._cancel_1v9my_180 {
1500
+ ._cancel_1qh0r_197 {
1491
1501
  display: inline-flex;
1492
1502
  align-items: center;
1493
1503
  justify-content: center;
@@ -1504,23 +1514,23 @@
1504
1514
  font-weight: var(--font-weight-bold);
1505
1515
  cursor: pointer;
1506
1516
  }
1507
- ._cancel_1v9my_180:focus-visible {
1517
+ ._cancel_1qh0r_197:focus-visible {
1508
1518
  outline: none;
1509
1519
  box-shadow: var(--focus-ring);
1510
1520
  }
1511
- ._cancelledHead_1v9my_204 {
1521
+ ._cancelledHead_1qh0r_221 {
1512
1522
  display: flex;
1513
1523
  flex-direction: column;
1514
1524
  gap: var(--space-8);
1515
1525
  }
1516
- ._cancelledTitle_1v9my_210 {
1526
+ ._cancelledTitle_1qh0r_227 {
1517
1527
  margin: 0;
1518
1528
  font-size: var(--type-heading-md-size);
1519
1529
  line-height: 1.32;
1520
1530
  font-weight: var(--font-weight-bold);
1521
1531
  color: var(--color-text-default);
1522
1532
  }
1523
- ._cancelledMeta_1v9my_219 {
1533
+ ._cancelledMeta_1qh0r_236 {
1524
1534
  font-size: var(--type-trimmed-sm-size);
1525
1535
  line-height: 10px;
1526
1536
  padding: 5px 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nok-integration/storefront-react",
3
- "version": "0.19.32",
3
+ "version": "0.19.33",
4
4
  "description": "Mountable React storefront components: catalogue, product detail and cart, mounted directly into a host DOM tree. No iframe.",
5
5
  "license": "UNLICENSED",
6
6
  "publishConfig": {