northants-design-system 0.3.10 → 0.3.12

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.
Files changed (150) hide show
  1. package/build/index.esm.js +17 -9
  2. package/build/index.esm.js.map +1 -1
  3. package/build/index.js +17 -9
  4. package/build/index.js.map +1 -1
  5. package/build/library/components/Button/Button.types.d.ts +5 -0
  6. package/build/library/components/Column/Column.types.d.ts +5 -0
  7. package/build/library/components/DropDownSelect/DropDownSelect.types.d.ts +5 -6
  8. package/build/library/components/FormButton/FormButton.types.d.ts +1 -1
  9. package/build/library/components/FormWithLine/FormWithLine.types.d.ts +6 -2
  10. package/build/library/components/Map/Map.types.d.ts +5 -0
  11. package/build/library/components/Row/Row.types.d.ts +5 -0
  12. package/build/library/directory/DirectoryServiceList/DirectoryServiceList.types.d.ts +31 -6
  13. package/build/library/pages/Home/HomePage.types.d.ts +2 -2
  14. package/build/library/pages/MemorialPage/MemorialPage.types.d.ts +2 -2
  15. package/build/library/slices/WarningText/WarningText.types.d.ts +5 -0
  16. package/build/library/structure/FullWidthContainer/FullWidthContainer.types.d.ts +5 -0
  17. package/build/library/structure/Header/Header.types.d.ts +5 -0
  18. package/build/library/structure/MaxWidthContainer/MaxWidthContainer.types.d.ts +5 -0
  19. package/build/library/structure/PageMain/PageMain.types.d.ts +5 -0
  20. package/build/library/structure/PageTitle/PageTitle.types.d.ts +5 -0
  21. package/build/library/structure/Summary/Summary.types.d.ts +5 -0
  22. package/package.json +23 -22
  23. package/build/icons/flytip.svg +0 -24
  24. package/build/index.css +0 -36
  25. package/build/library/components/CheckboxesInput/CheckboxesInput.d.ts +0 -4
  26. package/build/library/components/CheckboxesInput/CheckboxesInput.storydata.d.ts +0 -3
  27. package/build/library/components/CheckboxesInput/CheckboxesInput.types.d.ts +0 -37
  28. package/build/library/components/CouncilTaxAlphabeticalDirectory/CouncilTaxAlphabeticalDirectory.d.ts +0 -4
  29. package/build/library/components/GoogleMap/GoogleMap.d.ts +0 -4
  30. package/build/library/components/GoogleMap/GoogleMap.types.d.ts +0 -11
  31. package/build/library/components/GoogleMapMarker/GoogleMapMarker.d.ts +0 -4
  32. package/build/library/components/MapMarker/MapMarker.types.d.ts +0 -6
  33. package/build/library/components/PostCodeSearchApollo/PostCodeSearchApollo.d.ts +0 -4
  34. package/build/library/components/PostCodeSearchApollo/PostCodeSearchApollo.types.d.ts +0 -6
  35. package/build/library/components/icons/services/AccessibleParkingHover/Icon.d.ts +0 -4
  36. package/build/library/components/icons/services/AddressChangeIcon/Icon.d.ts +0 -4
  37. package/build/library/components/icons/services/AddressChangeIconHover/Icon.d.ts +0 -4
  38. package/build/library/components/icons/services/AddressIcon/Icon.d.ts +0 -4
  39. package/build/library/components/icons/services/AddressIconHover/Icon.d.ts +0 -4
  40. package/build/library/components/icons/services/AdultsIcon/Icon.d.ts +0 -4
  41. package/build/library/components/icons/services/AdultsIcon/IconHover.d.ts +0 -4
  42. package/build/library/components/icons/services/AdultsIconHover/Icon.d.ts +0 -4
  43. package/build/library/components/icons/services/BenefitsIcon/Icon.d.ts +0 -4
  44. package/build/library/components/icons/services/BenefitsIconHover/Icon.d.ts +0 -4
  45. package/build/library/components/icons/services/BinDayHover/Icon.d.ts +0 -4
  46. package/build/library/components/icons/services/BinsIcon/Icon.d.ts +0 -4
  47. package/build/library/components/icons/services/BinsIconHover/Icon.d.ts +0 -4
  48. package/build/library/components/icons/services/BirthsIcon/Icon.d.ts +0 -4
  49. package/build/library/components/icons/services/BirthsIconHover/Icon.d.ts +0 -4
  50. package/build/library/components/icons/services/BollardHover/Icon.d.ts +0 -4
  51. package/build/library/components/icons/services/BusIcon/Icon.d.ts +0 -4
  52. package/build/library/components/icons/services/BusIconHover/Icon.d.ts +0 -4
  53. package/build/library/components/icons/services/BusPassHover/Icon.d.ts +0 -4
  54. package/build/library/components/icons/services/BusinessIcon/Icon.d.ts +0 -4
  55. package/build/library/components/icons/services/BusinessIconHover/Icon.d.ts +0 -4
  56. package/build/library/components/icons/services/CareersIcon/Icon.d.ts +0 -4
  57. package/build/library/components/icons/services/CareersIconHover/Icon.d.ts +0 -4
  58. package/build/library/components/icons/services/CashIcon/Icon.d.ts +0 -4
  59. package/build/library/components/icons/services/CashIconHover/Icon.d.ts +0 -4
  60. package/build/library/components/icons/services/CharityHover/Icon.d.ts +0 -4
  61. package/build/library/components/icons/services/ChildrenIcon/Icon.d.ts +0 -4
  62. package/build/library/components/icons/services/ChildrenIconHover/Icon.d.ts +0 -4
  63. package/build/library/components/icons/services/CondolenceBookIcon/Icon.d.ts +0 -4
  64. package/build/library/components/icons/services/CondolenceBookIconHover/Icon.d.ts +0 -4
  65. package/build/library/components/icons/services/CookingIcon/Icon.d.ts +0 -4
  66. package/build/library/components/icons/services/CookingIconHover/Icon.d.ts +0 -4
  67. package/build/library/components/icons/services/CouncilIcon/Icon.d.ts +0 -4
  68. package/build/library/components/icons/services/CouncilIconHover/Icon.d.ts +0 -4
  69. package/build/library/components/icons/services/CouncilTaxIcon/Icon.d.ts +0 -4
  70. package/build/library/components/icons/services/CouncilTaxIconHover/Icon.d.ts +0 -4
  71. package/build/library/components/icons/services/CovidIcon/Icon.d.ts +0 -4
  72. package/build/library/components/icons/services/CovidIconHover/Icon.d.ts +0 -4
  73. package/build/library/components/icons/services/CultureIcon/Icon.d.ts +0 -4
  74. package/build/library/components/icons/services/CultureIconHover/Icon.d.ts +0 -4
  75. package/build/library/components/icons/services/CultureNorthIcon/Icon.d.ts +0 -4
  76. package/build/library/components/icons/services/CultureNorthIconHover/Icon.d.ts +0 -4
  77. package/build/library/components/icons/services/CultureWestIcon/Icon.d.ts +0 -4
  78. package/build/library/components/icons/services/CultureWestIconHover/Icon.d.ts +0 -4
  79. package/build/library/components/icons/services/DOLSIcon/Icon.d.ts +0 -4
  80. package/build/library/components/icons/services/DOLSIconHover/Icon.d.ts +0 -4
  81. package/build/library/components/icons/services/DemocracyIcon/Icon.d.ts +0 -4
  82. package/build/library/components/icons/services/DemocracyIconHover/Icon.d.ts +0 -4
  83. package/build/library/components/icons/services/EditIcon/Icon.d.ts +0 -4
  84. package/build/library/components/icons/services/EditIconHover/Icon.d.ts +0 -4
  85. package/build/library/components/icons/services/EnvironmentIcon/Icon.d.ts +0 -4
  86. package/build/library/components/icons/services/EnvironmentIconHover/Icon.d.ts +0 -4
  87. package/build/library/components/icons/services/FinanceIcon/Icon.d.ts +0 -4
  88. package/build/library/components/icons/services/FinanceIconHover/Icon.d.ts +0 -4
  89. package/build/library/components/icons/services/FlowerHover/Icon.d.ts +0 -4
  90. package/build/library/components/icons/services/FlyTipHover/Icon.d.ts +0 -4
  91. package/build/library/components/icons/services/FoodWasteHover/Icon.d.ts +0 -4
  92. package/build/library/components/icons/services/GovUKIcon/Icon.d.ts +0 -4
  93. package/build/library/components/icons/services/GovUKIconHover/Icon.d.ts +0 -4
  94. package/build/library/components/icons/services/HighwayHover/Icon.d.ts +0 -4
  95. package/build/library/components/icons/services/HouseMoneyIcon/Icon.d.ts +0 -4
  96. package/build/library/components/icons/services/HouseMoneyIconHover/Icon.d.ts +0 -4
  97. package/build/library/components/icons/services/HousingIcon/Icon.d.ts +0 -4
  98. package/build/library/components/icons/services/HousingIconHover/Icon.d.ts +0 -4
  99. package/build/library/components/icons/services/IndependenceIcon/Icon.d.ts +0 -4
  100. package/build/library/components/icons/services/IndependenceIconHover/Icon.d.ts +0 -4
  101. package/build/library/components/icons/services/LibrariesIcon/Icon.d.ts +0 -4
  102. package/build/library/components/icons/services/LibrariesIconHover/Icon.d.ts +0 -4
  103. package/build/library/components/icons/services/MapPinHover/Icon.d.ts +0 -4
  104. package/build/library/components/icons/services/MissedBinHover/Icon.d.ts +0 -4
  105. package/build/library/components/icons/services/NewIcon/Icon.d.ts +0 -4
  106. package/build/library/components/icons/services/NewIconHover/Icon.d.ts +0 -4
  107. package/build/library/components/icons/services/OccupationalTherapyIcon/Icon.d.ts +0 -4
  108. package/build/library/components/icons/services/OccupationalTherapyIconHover/Icon.d.ts +0 -4
  109. package/build/library/components/icons/services/ParkEventHover/Icon.d.ts +0 -4
  110. package/build/library/components/icons/services/ParkingHover/Icon.d.ts +0 -4
  111. package/build/library/components/icons/services/ParkingTicketHover/Icon.d.ts +0 -4
  112. package/build/library/components/icons/services/PayIcon/Icon.d.ts +0 -4
  113. package/build/library/components/icons/services/PayIconHover/Icon.d.ts +0 -4
  114. package/build/library/components/icons/services/PhonePayIcon/Icon.d.ts +0 -4
  115. package/build/library/components/icons/services/PhonePayIconHover/Icon.d.ts +0 -4
  116. package/build/library/components/icons/services/PlanningIcon/Icon.d.ts +0 -4
  117. package/build/library/components/icons/services/PlanningIconHover/Icon.d.ts +0 -4
  118. package/build/library/components/icons/services/PotholeHover/Icon.d.ts +0 -4
  119. package/build/library/components/icons/services/ProtectIcon/Icon.d.ts +0 -4
  120. package/build/library/components/icons/services/ProtectIconHover/Icon.d.ts +0 -4
  121. package/build/library/components/icons/services/RatePayIcon/Icon.d.ts +0 -4
  122. package/build/library/components/icons/services/RatePayIconHover/Icon.d.ts +0 -4
  123. package/build/library/components/icons/services/ReportHover/Icon.d.ts +0 -4
  124. package/build/library/components/icons/services/RestrictIcon/Icon.d.ts +0 -4
  125. package/build/library/components/icons/services/RestrictIconHover/Icon.d.ts +0 -4
  126. package/build/library/components/icons/services/RoadWorksHover/Icon.d.ts +0 -4
  127. package/build/library/components/icons/services/RoadsIcon/Icon.d.ts +0 -4
  128. package/build/library/components/icons/services/RoadsIconHover/Icon.d.ts +0 -4
  129. package/build/library/components/icons/services/RoyalWebsiteIcon/Icon.d.ts +0 -4
  130. package/build/library/components/icons/services/RoyalWebsiteIconHover/Icon.d.ts +0 -4
  131. package/build/library/components/icons/services/SafetyIcon/Icon.d.ts +0 -4
  132. package/build/library/components/icons/services/SafetyIconHover/Icon.d.ts +0 -4
  133. package/build/library/components/icons/services/SchoolsIcon/Icon.d.ts +0 -4
  134. package/build/library/components/icons/services/SchoolsIconHover/Icon.d.ts +0 -4
  135. package/build/library/components/icons/services/SinglePersonIcon/Icon.d.ts +0 -4
  136. package/build/library/components/icons/services/SinglePersonIconHover/Icon.d.ts +0 -4
  137. package/build/library/components/icons/services/SportsIcon/Icon.d.ts +0 -4
  138. package/build/library/components/icons/services/SportsIconHover/Icon.d.ts +0 -4
  139. package/build/library/components/icons/services/ValuationIcon/Icon.d.ts +0 -4
  140. package/build/library/components/icons/services/ValuationIconHover/Icon.d.ts +0 -4
  141. package/build/library/components/icons/services/WasteChecklistHover/Icon.d.ts +0 -4
  142. package/build/library/components/icons/services/WasteSortingHover/Icon.d.ts +0 -4
  143. package/build/library/contexts/DirectoryFavouritesProvider/DirectoryFavouritesProvider.d.ts +0 -4
  144. package/build/library/contexts/DirectoryFavouritesProvider/DirectoryFavouritesProvider.types.d.ts +0 -14
  145. package/build/library/pages/PromotionPage/PromotionPageExample.d.ts +0 -3
  146. package/build/library/pages/PromotionPage/PromotionPageExample.storydata.d.ts +0 -20
  147. package/build/library/pages/PromotionPage/PromotionPageExample.types.d.ts +0 -42
  148. package/build/library/structure/HomeUnitarySection/HomeUnitarySection.d.ts +0 -4
  149. package/build/library/structure/HomeUnitarySection/HomeUnitarySection.types.d.ts +0 -22
  150. package/build/library/structure/HomeUnitarySection/assets/map.d.ts +0 -3
@@ -20031,6 +20031,9 @@ function sanitizeHtml(html, options, _recursing) {
20031
20031
  if (html == null) {
20032
20032
  return '';
20033
20033
  }
20034
+ if (typeof html === 'number') {
20035
+ html = html.toString();
20036
+ }
20034
20037
 
20035
20038
  let result = '';
20036
20039
  // Used for hot swapping the result variable with an empty string in order to "capture" the text written to it.
@@ -20787,6 +20790,8 @@ sanitizeHtml.simpleTransform = function(newTagName, newAttribs, merge) {
20787
20790
  };
20788
20791
  };
20789
20792
 
20793
+ var sanitizeHtml$1 = sanitizeHtml_1;
20794
+
20790
20795
  /**
20791
20796
  * A card component with header, footer and content
20792
20797
  */
@@ -20799,7 +20804,7 @@ var Card = function (_a) {
20799
20804
  showContent && (React.createElement(Content$4, null,
20800
20805
  header && (React.createElement(Header$1, null,
20801
20806
  React.createElement(Heading, { text: header, level: 3 }))),
20802
- React.createElement("div", { dangerouslySetInnerHTML: { __html: sanitizeHtml_1(content) } }))),
20807
+ React.createElement("div", { dangerouslySetInnerHTML: { __html: sanitizeHtml$1(content) } }))),
20803
20808
  footerLink && (React.createElement(Footer$1, null,
20804
20809
  React.createElement(FooterLink$1, { href: footerLink.url }, footerLink.title)))));
20805
20810
  };
@@ -21149,7 +21154,7 @@ var GoogleMap = function (_a) {
21149
21154
  React.createElement(ProtectiveContainer, null,
21150
21155
  title && React.createElement(Heading, { level: 3, text: title }),
21151
21156
  description && (React.createElement(MapDescription, { dangerouslySetInnerHTML: {
21152
- __html: sanitizeHtml_1(description),
21157
+ __html: sanitizeHtml$1(description),
21153
21158
  } })),
21154
21159
  (!link_url || !embed_url) && (React.createElement(AlertBannerService, { alertType: 'warning', title: 'Invalid map' },
21155
21160
  "Embedded map contains invalid ",
@@ -21848,8 +21853,8 @@ var ImageAndText = function (_a) {
21848
21853
  React.createElement(Column, { small: "full", medium: "one-third", large: "one-third" },
21849
21854
  React.createElement(Image$2, __assign$2({}, image))),
21850
21855
  React.createElement(Column, { small: "full", medium: "two-thirds", large: "two-thirds" },
21851
- React.createElement(Content$3, { dangerouslySetInnerHTML: { __html: sanitizeHtml_1(textContent) } })))) : (React.createElement(Column, { small: "full", medium: "full", large: "full" },
21852
- React.createElement(Content$3, { dangerouslySetInnerHTML: { __html: sanitizeHtml_1(textContent) } }))))));
21856
+ React.createElement(Content$3, { dangerouslySetInnerHTML: { __html: sanitizeHtml$1(textContent) } })))) : (React.createElement(Column, { small: "full", medium: "full", large: "full" },
21857
+ React.createElement(Content$3, { dangerouslySetInnerHTML: { __html: sanitizeHtml$1(textContent) } }))))));
21853
21858
  };
21854
21859
 
21855
21860
  const Container$A = styled.div`
@@ -22123,7 +22128,7 @@ var PromoBlock = function (_a) {
22123
22128
  React.createElement(PromoText, null,
22124
22129
  React.createElement(PromoHeadline, { level: 3, text: promo.title }),
22125
22130
  React.createElement(PromoContent, { dangerouslySetInnerHTML: {
22126
- __html: sanitizeHtml_1(promo.content),
22131
+ __html: sanitizeHtml$1(promo.content),
22127
22132
  } }),
22128
22133
  React.createElement(PromoCallToAction, null, promo.callToActionText))))); }),
22129
22134
  promos.length === 1 && React.createElement(Column, { small: "full", medium: "one-half", large: "one-half" }))))));
@@ -22138,7 +22143,7 @@ var Promotions = function (_a) {
22138
22143
  return (React.createElement(React.Fragment, null,
22139
22144
  numberOfPromos > 0 && (React.createElement(PromoBanner, { title: promos[0].title, ctaUrl: promos[0].callToActionURL, ctaText: promos[0].callToActionText, image1440x810: promos[0].imageMedium, image144x81: promos[0].imageMedium },
22140
22145
  React.createElement(PromoContent, { dangerouslySetInnerHTML: {
22141
- __html: sanitizeHtml_1(promos[0].content),
22146
+ __html: sanitizeHtml$1(promos[0].content),
22142
22147
  } }))),
22143
22148
  numberOfPromos > 1 && React.createElement(PromoBlock, { promos: promos.slice(1, numberOfPromos) })));
22144
22149
  };
@@ -22673,10 +22678,15 @@ var AlertBanner = function (_a) {
22673
22678
  var themeContext = useContext(ThemeContext);
22674
22679
  var elementRef = useRef(null);
22675
22680
  var _c = useLocalStorage$1('alert_' + uid, true), showAlert = _c[0], setShowAlert = _c[1];
22681
+ var _d = useState(false), notServer = _d[0], setNotServer = _d[1];
22676
22682
  useEffect(function () {
22677
22683
  var _a;
22678
22684
  (_a = elementRef === null || elementRef === void 0 ? void 0 : elementRef.current) === null || _a === void 0 ? void 0 : _a.addEventListener('click', embeddedLinkCLickHandler);
22679
22685
  }, [elementRef]);
22686
+ /* Stop flash of banner on page load when previously dismissed */
22687
+ useEffect(function () {
22688
+ setNotServer(true);
22689
+ }, []);
22680
22690
  /* A click on any link within the alert text dismisses the banner too */
22681
22691
  var embeddedLinkCLickHandler = function (event) {
22682
22692
  var _a;
@@ -22687,8 +22697,6 @@ var AlertBanner = function (_a) {
22687
22697
  var hideClickHandler = function () {
22688
22698
  setShowAlert(false);
22689
22699
  };
22690
- /* Stop flash of banner on page load when previously dismissed */
22691
- var notServer = typeof window !== 'undefined';
22692
22700
  return (showAlert &&
22693
22701
  notServer && (React.createElement(Container$x, { alertType: alertType, "data-testid": "AlertBanner" },
22694
22702
  React.createElement(MaxWidthContainer, { noBackground: true },
@@ -24099,7 +24107,7 @@ var HeroImage = function (_a) {
24099
24107
  React.createElement(Overlay, { backgroundBox: backgroundBox, "data-testid": "HeroImageOverlay" },
24100
24108
  breadcrumb && (React.createElement(BreadcrumbLink, { href: breadcrumb.url, backgroundBox: backgroundBox }, breadcrumb.title)),
24101
24109
  headline && React.createElement(Headline, { level: 1, text: headline, backgroundBox: backgroundBox }),
24102
- content && React.createElement(Content, { dangerouslySetInnerHTML: { __html: sanitizeHtml_1(content) } }),
24110
+ content && React.createElement(Content, { dangerouslySetInnerHTML: { __html: sanitizeHtml$1(content) } }),
24103
24111
  customSearch && (React.createElement(Search, null,
24104
24112
  React.createElement(CustomSearch, __assign$2({}, customSearch)))),
24105
24113
  callToActionURL && backgroundBox && (React.createElement(CallToAction, { url: callToActionURL, text: callToActionText, primary: callToActionIsPrimary })),