@nnc-digital/nnc-design-system 0.4.24 → 0.4.26

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/build/index.js CHANGED
@@ -4522,11 +4522,13 @@ var BinCollection = function (_a) {
4522
4522
  }
4523
4523
  return sortedTitles.map(function (title, index) {
4524
4524
  var apiTitlesForThisType = Object.keys(calendarEvents).filter(function (apiTitle) { return formatTitle(apiTitle) === title; });
4525
+ var dates = apiTitlesForThisType.flatMap(function (apiTitle) { return calendarEvents[apiTitle]; })
4526
+ .map(function (date) { return new Date(date).toISOString().split('T')[0]; })
4527
+ .filter(function (date, index, array) { return array.indexOf(date) === index; })
4528
+ .sort(function (a, b) { return new Date(a).getTime() - new Date(b).getTime(); });
4525
4529
  return (React__default["default"].createElement(React__default["default"].Fragment, { key: "".concat(title, "-").concat(index) },
4526
4530
  React__default["default"].createElement(Heading, { level: 3, text: title }),
4527
- apiTitlesForThisType.flatMap(function (apiTitle) { return calendarEvents[apiTitle]; })
4528
- .sort(function (a, b) { return new Date(a).getTime() - new Date(b).getTime(); })
4529
- .map(function (date) { return (React__default["default"].createElement("p", null, date.toLocaleDateString('en-GB', { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric' }))); })));
4531
+ dates.map(function (date, index) { return (React__default["default"].createElement("p", { key: index }, new Date(date).toLocaleDateString('en-GB', { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric' }))); })));
4530
4532
  });
4531
4533
  })()),
4532
4534
  Object.keys(calendarEvents).length > 0 && (React__default["default"].createElement(FormButton, { size: "small", type: "button", "aria-label": "Reset", text: "Find a different address", onClick: resetForm }))));
@@ -23209,6 +23211,8 @@ var WarningTextDisclaimer = function () {
23209
23211
  const AccessibleList = styled__default["default"].ul`
23210
23212
  list-style-type: none;
23211
23213
  padding-left: 0;
23214
+ margin: 0;
23215
+ margin-top: -1rem;
23212
23216
  `;
23213
23217
 
23214
23218
  // Styling for the li