northants-design-system 0.3.8 → 0.3.9

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.d.ts CHANGED
@@ -20,10 +20,11 @@ import GoogleMap from './library/slices/GoogleMap/GoogleMap';
20
20
  import Image from './library/slices/Image/Image';
21
21
  import ImageAndText from './library/slices/ImageAndText/ImageAndText';
22
22
  import Promotions from './library/slices/Promotions/Promotions';
23
+ import SearchBox from './library/slices/SearchBox/SearchBox';
23
24
  import Video from './library/slices/Video/Video';
24
25
  import WarningText from './library/slices/WarningText/WarningText';
25
26
  import WarningTextDisclaimer from './library/slices/WarningTextDisclaimer/WarningTextDisclaimer';
26
- export { Accordion, BlockQuote, CallToAction, Cards, CouncilTaxAlphabeticalDirectory, Divider, DownloadableFiles, GoogleMap, Image, ImageAndText, Promotions, Video, WarningText, WarningTextDisclaimer, };
27
+ export { Accordion, BlockQuote, CallToAction, Cards, CouncilTaxAlphabeticalDirectory, Divider, DownloadableFiles, GoogleMap, Image, ImageAndText, Promotions, SearchBox, Video, WarningText, WarningTextDisclaimer, };
27
28
  export * from './library/structure/PageStructures';
28
29
  export { GDS_theme, north_theme, west_theme, lb_theme_north, lb_theme_west } from './themes/theme_generator';
29
30
  export { GlobalStyleReset } from './themes/GlobalStyleReset.jsx';
@@ -5809,7 +5809,7 @@ var HeadingWithIcon = function (_a) {
5809
5809
  React.createElement(Heading, { text: text, level: level })));
5810
5810
  };
5811
5811
 
5812
- const Container$U = styled.div`
5812
+ const Container$W = styled.div`
5813
5813
  ${(props) => props.theme.fontStyles};
5814
5814
  display: block;
5815
5815
  border-top: 1px solid ${(props) => props.theme.theme_vars.colours.grey};
@@ -6581,7 +6581,7 @@ var Pagination = function (_a) {
6581
6581
  handleParams(postTo, [{ key: 'page', value: pageNo }]);
6582
6582
  };
6583
6583
  if (numbers.length > 1) {
6584
- return (React.createElement(Container$U, { "data-testid": "Pagination", role: "navigation", "aria-label": "Pagination" },
6584
+ return (React.createElement(Container$W, { "data-testid": "Pagination", role: "navigation", "aria-label": "Pagination" },
6585
6585
  currentPage > 1 && (React.createElement(Previous, { onClick: function () { return buttonClick(currentPage - 1); }, title: "Go back a page" }, "Previous")),
6586
6586
  React.createElement(NumbersContainer, null, numbers.map(function (v, i) { return (React.createElement(NumberContainer, { key: i },
6587
6587
  v === '...' && (React.createElement(Ellipsis, null, "...")),
@@ -6593,7 +6593,7 @@ var Pagination = function (_a) {
6593
6593
  return null;
6594
6594
  };
6595
6595
 
6596
- const Container$T = styled.div`
6596
+ const Container$V = styled.div`
6597
6597
  ${(props) => props.theme.fontStyles};
6598
6598
  margin-bottom: 30px;
6599
6599
  `;
@@ -6764,7 +6764,7 @@ var CheckboxListFilter = function (_a) {
6764
6764
  handleParams('news', [{ key: NewsArticleFilterFields.articleType.queryParamKey, value: articleTypes }], ['page']);
6765
6765
  };
6766
6766
  var backupLabel = Math.random().toString(36).substring(7);
6767
- return (React.createElement(Container$T, { "data-testid": "CheckboxListFilter" },
6767
+ return (React.createElement(Container$V, { "data-testid": "CheckboxListFilter" },
6768
6768
  React.createElement(Fieldset, { "aria-describedby": hintId },
6769
6769
  React.createElement(Legend, { labelHidden: labelHidden, "data-testid": "CheckboxListFilterLegend" }, label),
6770
6770
  React.createElement(Hint, { id: hintId, hintHidden: hintHidden, "data-testid": "CheckboxListFilterHint" }, hint),
@@ -6773,7 +6773,7 @@ var CheckboxListFilter = function (_a) {
6773
6773
  React.createElement(CheckboxLabel, { isChecked: option.checked, htmlFor: option.value }, option.title))); })))));
6774
6774
  };
6775
6775
 
6776
- const Container$S = styled.div`
6776
+ const Container$U = styled.div`
6777
6777
  ${props => props.theme.fontStyles};
6778
6778
  `;
6779
6779
 
@@ -6784,7 +6784,7 @@ const hideLabel = props => {
6784
6784
  };
6785
6785
 
6786
6786
 
6787
- const Label$1 = styled.label`
6787
+ const Label$2 = styled.label`
6788
6788
  display: block;
6789
6789
  margin-bottom: 5px;
6790
6790
  ${hideLabel}
@@ -6818,8 +6818,8 @@ const Option = styled.option`
6818
6818
 
6819
6819
  var DropDownSelect = function (_a) {
6820
6820
  var id = _a.id, label = _a.label, options = _a.options, onChange = _a.onChange, selected = _a.selected, _b = _a.hideLabel, hideLabel = _b === void 0 ? false : _b;
6821
- return (React.createElement(Container$S, null,
6822
- React.createElement(Label$1, { htmlFor: id, hideLabel: hideLabel }, label),
6821
+ return (React.createElement(Container$U, null,
6822
+ React.createElement(Label$2, { htmlFor: id, hideLabel: hideLabel }, label),
6823
6823
  React.createElement(Select, { id: id, name: id, onChange: onChange && onChange, defaultValue: selected && selected }, options.map(function (option, i) {
6824
6824
  return React.createElement(Option, { key: i, value: option.value }, option.title);
6825
6825
  }))));
@@ -6935,7 +6935,7 @@ const PromotedLink$1 = styled.a`
6935
6935
  ${oneColStyles}
6936
6936
  `;
6937
6937
 
6938
- const Container$R = styled.div`
6938
+ const Container$T = styled.div`
6939
6939
  box-sizing: border-box;
6940
6940
  display: flex;
6941
6941
  flex-wrap: wrap;
@@ -6958,7 +6958,7 @@ const Container$R = styled.div`
6958
6958
 
6959
6959
  var Row$1 = function (_a) {
6960
6960
  var _b = _a.hasBorder, hasBorder = _b === void 0 ? false : _b, _c = _a.isList, isList = _c === void 0 ? false : _c, _d = _a.hasWrap, hasWrap = _d === void 0 ? true : _d, children = _a.children;
6961
- return (React.createElement(Container$R, { "data-testid": "Row", hasBorder: hasBorder, hasWrap: hasWrap, as: isList ? 'ul' : 'div' }, children));
6961
+ return (React.createElement(Container$T, { "data-testid": "Row", hasBorder: hasBorder, hasWrap: hasWrap, as: isList ? 'ul' : 'div' }, children));
6962
6962
  };
6963
6963
 
6964
6964
  const calculateWidth = (size) => {
@@ -7008,7 +7008,7 @@ const widths = (props) => {
7008
7008
  `;
7009
7009
  };
7010
7010
 
7011
- const Container$Q = styled.div`
7011
+ const Container$S = styled.div`
7012
7012
  box-sizing: border-box;
7013
7013
  display: block;
7014
7014
  padding: ${(props) => (props.hasPadding ? props.theme.theme_vars.spacingSizes.small : `0`)};
@@ -7019,7 +7019,7 @@ const Container$Q = styled.div`
7019
7019
 
7020
7020
  var Column = function (_a) {
7021
7021
  var _b = _a.small, small = _b === void 0 ? 'full' : _b, _c = _a.medium, medium = _c === void 0 ? 'one-half' : _c, _d = _a.large, large = _d === void 0 ? 'one-third' : _d, _e = _a.hasPadding, hasPadding = _e === void 0 ? true : _e, _f = _a.hasBorder, hasBorder = _f === void 0 ? false : _f, _g = _a.isList, isList = _g === void 0 ? false : _g, children = _a.children;
7022
- return (React.createElement(Container$Q, { "data-testid": "Column", small: small, medium: medium, large: large, hasPadding: hasPadding, hasBorder: hasBorder, as: isList ? 'li' : 'div' }, children));
7022
+ return (React.createElement(Container$S, { "data-testid": "Column", small: small, medium: medium, large: large, hasPadding: hasPadding, hasBorder: hasBorder, as: isList ? 'li' : 'div' }, children));
7023
7023
  };
7024
7024
 
7025
7025
  var PromotedLinks = function (_a) {
@@ -7047,7 +7047,7 @@ var TextInput = function (_a) {
7047
7047
 
7048
7048
  // Accordion
7049
7049
 
7050
- const Container$P = styled.div`
7050
+ const Container$R = styled.div`
7051
7051
  ${(props) => props.theme.fontStyles}
7052
7052
  margin-bottom: 20px;
7053
7053
  border-bottom: 1px solid ${(props) => props.theme.theme_vars.colours.grey};
@@ -7329,7 +7329,7 @@ var Accordion = function (_a) {
7329
7329
  setAccordionStates(newStatus);
7330
7330
  };
7331
7331
  var accordionId = "accordion".concat(uniqueID());
7332
- return (React.createElement(Container$P, { "data-testid": "Accordion", id: accordionId },
7332
+ return (React.createElement(Container$R, { "data-testid": "Accordion", id: accordionId },
7333
7333
  showControls && sections.length > 1 && (React.createElement(AccordionControls, null,
7334
7334
  React.createElement(OpenAllButton, { onClick: toggleAll, type: "button", "aria-expanded": !openAll },
7335
7335
  openAll ? 'Open all' : 'Close all',
@@ -7380,7 +7380,7 @@ var BlockQuote = function (_a) {
7380
7380
  citation && React.createElement(Citation, null, citation)));
7381
7381
  };
7382
7382
 
7383
- const Container$O = styled.div`
7383
+ const Container$Q = styled.div`
7384
7384
  margin-bottom: 30px;
7385
7385
  display: block;
7386
7386
 
@@ -7395,11 +7395,11 @@ const Container$O = styled.div`
7395
7395
  */
7396
7396
  var CallToAction = function (_a) {
7397
7397
  var primary = _a.primary; _a.size; var text = _a.text, url = _a.url, isExternal = _a.isExternal, isDisabled = _a.isDisabled; __rest(_a, ["primary", "size", "text", "url", "isExternal", "isDisabled"]);
7398
- return (React.createElement(Container$O, null,
7398
+ return (React.createElement(Container$Q, null,
7399
7399
  React.createElement(Button$2, { primary: primary, size: "large", text: text, url: url, isExternal: isExternal, isDisabled: isDisabled })));
7400
7400
  };
7401
7401
 
7402
- const Container$N = styled.div`
7402
+ const Container$P = styled.div`
7403
7403
  display: block;
7404
7404
  ${(props) => props.theme.fontStyles}
7405
7405
  `;
@@ -7575,7 +7575,7 @@ var CouncilTaxAlphabeticalDirectory = function (_a) {
7575
7575
  });
7576
7576
  return letterData;
7577
7577
  });
7578
- return (React.createElement(Container$N, { "data-testid": "AlphabeticalDirectory", ref: directoryRef },
7578
+ return (React.createElement(Container$P, { "data-testid": "AlphabeticalDirectory", ref: directoryRef },
7579
7579
  React.createElement(React.Fragment, null,
7580
7580
  parishes.length === 0 && (React.createElement(ErrorText, null, "There was an issue fetching the parish data. Please try again later.")),
7581
7581
  parish === null ? (React.createElement(React.Fragment, null, sortedData.map(function (letter, i) { return (React.createElement(Row, { key: i },
@@ -7601,9 +7601,9 @@ var CouncilTaxAlphabeticalDirectory = function (_a) {
7601
7601
  React.createElement("td", null, Number(parish.values[band]).toLocaleString('en-GB', { style: 'currency', currency: 'GBP' })))); })))))))));
7602
7602
  };
7603
7603
 
7604
- const Container$M = styled.div``;
7604
+ const Container$O = styled.div``;
7605
7605
 
7606
- const Container$L = styled.div`
7606
+ const Container$N = styled.div`
7607
7607
  display: flex;
7608
7608
  flex-direction: column;
7609
7609
  justify-content: flex-start;
@@ -17399,7 +17399,7 @@ function markDirtyUp(node) {
17399
17399
  }
17400
17400
  }
17401
17401
 
17402
- class Container$K extends Node$1 {
17402
+ class Container$M extends Node$1 {
17403
17403
  push(child) {
17404
17404
  child.parent = this;
17405
17405
  this.proxyOf.nodes.push(child);
@@ -17692,7 +17692,7 @@ class Container$K extends Node$1 {
17692
17692
 
17693
17693
  let processed = nodes.map(i => {
17694
17694
  /* c8 ignore next */
17695
- if (!i[my$1]) Container$K.rebuild(i);
17695
+ if (!i[my$1]) Container$M.rebuild(i);
17696
17696
  i = i.proxyOf;
17697
17697
  if (i.parent) i.parent.removeChild(i);
17698
17698
  if (i[isClean$1]) markDirtyUp(i);
@@ -17770,27 +17770,27 @@ class Container$K extends Node$1 {
17770
17770
  }
17771
17771
  }
17772
17772
 
17773
- Container$K.registerParse = dependant => {
17773
+ Container$M.registerParse = dependant => {
17774
17774
  parse$4 = dependant;
17775
17775
  };
17776
17776
 
17777
- Container$K.registerRule = dependant => {
17777
+ Container$M.registerRule = dependant => {
17778
17778
  Rule$4 = dependant;
17779
17779
  };
17780
17780
 
17781
- Container$K.registerAtRule = dependant => {
17781
+ Container$M.registerAtRule = dependant => {
17782
17782
  AtRule$4 = dependant;
17783
17783
  };
17784
17784
 
17785
- Container$K.registerRoot = dependant => {
17785
+ Container$M.registerRoot = dependant => {
17786
17786
  Root$6 = dependant;
17787
17787
  };
17788
17788
 
17789
- var container = Container$K;
17790
- Container$K.default = Container$K;
17789
+ var container = Container$M;
17790
+ Container$M.default = Container$M;
17791
17791
 
17792
17792
  /* c8 ignore start */
17793
- Container$K.rebuild = node => {
17793
+ Container$M.rebuild = node => {
17794
17794
  if (node.type === 'atrule') {
17795
17795
  Object.setPrototypeOf(node, AtRule$4.prototype);
17796
17796
  } else if (node.type === 'rule') {
@@ -17807,16 +17807,16 @@ Container$K.rebuild = node => {
17807
17807
 
17808
17808
  if (node.nodes) {
17809
17809
  node.nodes.forEach(child => {
17810
- Container$K.rebuild(child);
17810
+ Container$M.rebuild(child);
17811
17811
  });
17812
17812
  }
17813
17813
  };
17814
17814
 
17815
- let Container$J = container;
17815
+ let Container$L = container;
17816
17816
 
17817
17817
  let LazyResult$4, Processor$3;
17818
17818
 
17819
- class Document$3 extends Container$J {
17819
+ class Document$3 extends Container$L {
17820
17820
  constructor(defaults) {
17821
17821
  // type needs to be passed to super, otherwise child roots won't be normalized correctly
17822
17822
  super({ type: 'document', ...defaults });
@@ -17934,9 +17934,9 @@ class Result$4 {
17934
17934
  var result = Result$4;
17935
17935
  Result$4.default = Result$4;
17936
17936
 
17937
- let Container$I = container;
17937
+ let Container$K = container;
17938
17938
 
17939
- class AtRule$3 extends Container$I {
17939
+ class AtRule$3 extends Container$K {
17940
17940
  constructor(defaults) {
17941
17941
  super(defaults);
17942
17942
  this.type = 'atrule';
@@ -17956,13 +17956,13 @@ class AtRule$3 extends Container$I {
17956
17956
  var atRule = AtRule$3;
17957
17957
  AtRule$3.default = AtRule$3;
17958
17958
 
17959
- Container$I.registerAtRule(AtRule$3);
17959
+ Container$K.registerAtRule(AtRule$3);
17960
17960
 
17961
- let Container$H = container;
17961
+ let Container$J = container;
17962
17962
 
17963
17963
  let LazyResult$3, Processor$2;
17964
17964
 
17965
- class Root$5 extends Container$H {
17965
+ class Root$5 extends Container$J {
17966
17966
  constructor(defaults) {
17967
17967
  super(defaults);
17968
17968
  this.type = 'root';
@@ -18016,7 +18016,7 @@ Root$5.registerProcessor = dependant => {
18016
18016
  var root = Root$5;
18017
18017
  Root$5.default = Root$5;
18018
18018
 
18019
- Container$H.registerRoot(Root$5);
18019
+ Container$J.registerRoot(Root$5);
18020
18020
 
18021
18021
  let list$2 = {
18022
18022
  split(string, separators, last) {
@@ -18075,10 +18075,10 @@ let list$2 = {
18075
18075
  var list_1 = list$2;
18076
18076
  list$2.default = list$2;
18077
18077
 
18078
- let Container$G = container;
18078
+ let Container$I = container;
18079
18079
  let list$1 = list_1;
18080
18080
 
18081
- class Rule$3 extends Container$G {
18081
+ class Rule$3 extends Container$I {
18082
18082
  constructor(defaults) {
18083
18083
  super(defaults);
18084
18084
  this.type = 'rule';
@@ -18099,7 +18099,7 @@ class Rule$3 extends Container$G {
18099
18099
  var rule = Rule$3;
18100
18100
  Rule$3.default = Rule$3;
18101
18101
 
18102
- Container$G.registerRule(Rule$3);
18102
+ Container$I.registerRule(Rule$3);
18103
18103
 
18104
18104
  let Declaration$2 = declaration;
18105
18105
  let tokenizer = tokenize;
@@ -18703,7 +18703,7 @@ class Parser$1 {
18703
18703
 
18704
18704
  var parser = Parser$1;
18705
18705
 
18706
- let Container$F = container;
18706
+ let Container$H = container;
18707
18707
  let Parser = parser;
18708
18708
  let Input$3 = input;
18709
18709
 
@@ -18742,12 +18742,12 @@ function parse$3(css, opts) {
18742
18742
  var parse_1 = parse$3;
18743
18743
  parse$3.default = parse$3;
18744
18744
 
18745
- Container$F.registerParse(parse$3);
18745
+ Container$H.registerParse(parse$3);
18746
18746
 
18747
18747
  let { isClean, my } = symbols;
18748
18748
  let MapGenerator$1 = mapGenerator;
18749
18749
  let stringify$2 = stringify_1;
18750
- let Container$E = container;
18750
+ let Container$G = container;
18751
18751
  let Document$2 = document$1;
18752
18752
  let warnOnce$1 = warnOnce$2;
18753
18753
  let Result$3 = result;
@@ -18882,7 +18882,7 @@ class LazyResult$2 {
18882
18882
 
18883
18883
  if (root && !root[my]) {
18884
18884
  /* c8 ignore next 2 */
18885
- Container$E.rebuild(root);
18885
+ Container$G.rebuild(root);
18886
18886
  }
18887
18887
  }
18888
18888
 
@@ -19549,7 +19549,7 @@ fromJSON$1.default = fromJSON$1;
19549
19549
  let CssSyntaxError = cssSyntaxError;
19550
19550
  let Declaration = declaration;
19551
19551
  let LazyResult = lazyResult;
19552
- let Container$D = container;
19552
+ let Container$F = container;
19553
19553
  let Processor = processor;
19554
19554
  let stringify = stringify_1;
19555
19555
  let fromJSON = fromJSON_1;
@@ -19629,7 +19629,7 @@ postcss.document = defaults => new Document(defaults);
19629
19629
 
19630
19630
  postcss.CssSyntaxError = CssSyntaxError;
19631
19631
  postcss.Declaration = Declaration;
19632
- postcss.Container = Container$D;
19632
+ postcss.Container = Container$F;
19633
19633
  postcss.Processor = Processor;
19634
19634
  postcss.Document = Document;
19635
19635
  postcss.Comment = Comment;
@@ -20493,7 +20493,7 @@ sanitizeHtml.simpleTransform = function(newTagName, newAttribs, merge) {
20493
20493
  var Card = function (_a) {
20494
20494
  var header = _a.header, content = _a.content, footerLink = _a.footerLink, imageLarge = _a.imageLarge, imageSmall = _a.imageSmall, imageAltText = _a.imageAltText;
20495
20495
  var showContent = content || header;
20496
- return (React.createElement(Container$L, { "data-testid": "Card" },
20496
+ return (React.createElement(Container$N, { "data-testid": "Card" },
20497
20497
  imageLarge && imageSmall && (React.createElement(React.Fragment, null, footerLink ? (React.createElement(ImageLink$1, { href: footerLink.url },
20498
20498
  React.createElement(Image$4, { src: imageLarge, alt: imageAltText, srcSet: "".concat(imageSmall, " 400w, ").concat(imageLarge, " 800w"), sizes: "(max-width: 550px) 400px, 800px", loading: "lazy" }))) : (React.createElement(Image$4, { src: imageLarge, alt: imageAltText, srcSet: "".concat(imageSmall, " 400w, ").concat(imageLarge, " 800w"), sizes: "(max-width: 550px) 400px, 800px", loading: "lazy" })))),
20499
20499
  showContent && (React.createElement(Content$4, null,
@@ -20509,12 +20509,12 @@ var Card = function (_a) {
20509
20509
  */
20510
20510
  var Cards = function (_a) {
20511
20511
  var cards = _a.cards;
20512
- return (React.createElement(Container$M, { "data-testid": "Cards" },
20512
+ return (React.createElement(Container$O, { "data-testid": "Cards" },
20513
20513
  React.createElement(Row$1, null, cards.map(function (card, index) { return (React.createElement(Column, { small: "full", medium: "one-half", large: "one-third", key: index },
20514
20514
  React.createElement(Card, __assign$2({}, card)))); }))));
20515
20515
  };
20516
20516
 
20517
- const Container$C = styled.div`
20517
+ const Container$E = styled.div`
20518
20518
  margin: 25px 0;
20519
20519
  `;
20520
20520
 
@@ -20631,7 +20631,7 @@ var FileDownload = function (_a) {
20631
20631
 
20632
20632
  var DownloadableFiles = function (_a) {
20633
20633
  var files = _a.files;
20634
- return (React.createElement(Container$C, { "data-testid": "DownloadableFiles" }, files.length > 0 ?
20634
+ return (React.createElement(Container$E, { "data-testid": "DownloadableFiles" }, files.length > 0 ?
20635
20635
  files.map(function (file) { return React.createElement(FileDownload, __assign$2({ key: file.title }, file)); })
20636
20636
  :
20637
20637
  React.createElement("i", null, "No file to show")));
@@ -20767,7 +20767,7 @@ const wereCookiesAccepted = (cookiesAcceptedOverride) => {
20767
20767
  return false;
20768
20768
  };
20769
20769
 
20770
- const Container$B = styled.div`
20770
+ const Container$D = styled.div`
20771
20771
  border: solid 4px;
20772
20772
  border-radius: ${(props) => props.theme.theme_vars.border_radius};
20773
20773
  border-color: ${(props) =>
@@ -20821,7 +20821,7 @@ const InnerContainer$2 = styled.div`
20821
20821
  */
20822
20822
  var AlertBannerService = function (_a) {
20823
20823
  var title = _a.title, _b = _a.hasTopSpacing, hasTopSpacing = _b === void 0 ? false : _b, _c = _a.alertType, alertType = _c === void 0 ? 'alert' : _c, children = _a.children;
20824
- return (React.createElement(Container$B, { alertType: alertType, "data-testid": "AlertBannerService", hasTopSpacing: hasTopSpacing },
20824
+ return (React.createElement(Container$D, { alertType: alertType, "data-testid": "AlertBannerService", hasTopSpacing: hasTopSpacing },
20825
20825
  React.createElement(InnerContainer$2, { "data-testid": "AlertBannerServiceInner" },
20826
20826
  (title === null || title === void 0 ? void 0 : title.trim()) && React.createElement(Heading, { text: title }),
20827
20827
  children)));
@@ -20868,7 +20868,7 @@ var GoogleMap = function (_a) {
20868
20868
  React.createElement(MapLink, { href: link_url }, link_title ? link_title : 'Google Maps link')))));
20869
20869
  };
20870
20870
 
20871
- const Container$A = styled.figure`
20871
+ const Container$C = styled.figure`
20872
20872
  display: block;
20873
20873
  background: ${(props) =>
20874
20874
  props.theme.cardinal_name === 'north'
@@ -21510,7 +21510,7 @@ var LazyImage = /*@__PURE__*/getDefaultExportFromCjs(lib);
21510
21510
  */
21511
21511
  var Image$2 = function (_a) {
21512
21512
  var imageSmall = _a.imageSmall, imageLarge = _a.imageLarge, imageAltText = _a.imageAltText, _b = _a.ratio, ratio = _b === void 0 ? '4by3' : _b, caption = _a.caption, wrapText = _a.wrapText;
21513
- return (React.createElement(Container$A, { "data-testid": "Image", wrapText: wrapText },
21513
+ return (React.createElement(Container$C, { "data-testid": "Image", wrapText: wrapText },
21514
21514
  React.createElement(ImageContainer$4, { "data-testid": "ImageContainer", ratio: ratio },
21515
21515
  React.createElement(LazyImage, { placeholder: imageSmall, src: imageLarge, visibilitySensorProps: {
21516
21516
  partialVisibility: true,
@@ -21518,7 +21518,7 @@ var Image$2 = function (_a) {
21518
21518
  (caption === null || caption === void 0 ? void 0 : caption.trim()) && React.createElement(Caption, null, caption)));
21519
21519
  };
21520
21520
 
21521
- const Container$z = styled.div`
21521
+ const Container$B = styled.div`
21522
21522
  display: block;
21523
21523
  `;
21524
21524
 
@@ -21539,7 +21539,7 @@ const Content$3 = styled.div`
21539
21539
  */
21540
21540
  var ImageAndText = function (_a) {
21541
21541
  var heading = _a.heading, textContent = _a.textContent, image = _a.image;
21542
- return (React.createElement(Container$z, { "data-testid": "ImageAndText" },
21542
+ return (React.createElement(Container$B, { "data-testid": "ImageAndText" },
21543
21543
  React.createElement(Row$1, null,
21544
21544
  heading && (React.createElement(Column, { small: "full", medium: "full", large: "full" },
21545
21545
  React.createElement(HeadingContainer, null,
@@ -21552,7 +21552,7 @@ var ImageAndText = function (_a) {
21552
21552
  React.createElement(Content$3, { dangerouslySetInnerHTML: { __html: sanitizeHtml_1(textContent) } }))))));
21553
21553
  };
21554
21554
 
21555
- const Container$y = styled.div`
21555
+ const Container$A = styled.div`
21556
21556
  ${(props) => props.theme.fontStyles};
21557
21557
  overflow: hidden;
21558
21558
  margin: 40px auto 5px auto;
@@ -21632,7 +21632,7 @@ const CTA = styled.a`
21632
21632
  */
21633
21633
  var PromoBanner = function (_a) {
21634
21634
  var title = _a.title, image1440x810 = _a.image1440x810, image144x81 = _a.image144x81, ctaText = _a.ctaText, ctaUrl = _a.ctaUrl, children = _a.children;
21635
- return (React.createElement(Container$y, null,
21635
+ return (React.createElement(Container$A, null,
21636
21636
  React.createElement(LazyImage, { src: image1440x810, placeholder: image144x81, visibilitySensorProps: {
21637
21637
  partialVisibility: true,
21638
21638
  } }, function (src) { return React.createElement(ImageLink, { img: src, href: ctaUrl, title: ctaText }); }),
@@ -21843,6 +21843,166 @@ var Promotions = function (_a) {
21843
21843
  numberOfPromos > 1 && React.createElement(PromoBlock, { promos: promos.slice(1, numberOfPromos) })));
21844
21844
  };
21845
21845
 
21846
+ const Container$z = styled.div`
21847
+ padding: 0;
21848
+ margin: ${(props) => props.theme.theme_vars.spacingSizes.medium} 0;
21849
+ ${(props) => props.theme.fontStyles}
21850
+
21851
+ @media screen and (min-width: ${(props) => props.theme.theme_vars.breakpoints.m}) {
21852
+ background: url('${(props) => props.image}') no-repeat center center;
21853
+ background-size: cover;
21854
+ padding-top: ${(props) => (props.image ? '8rem' : 0)};
21855
+ padding-bottom: ${(props) => (props.image ? '8rem' : 0)};
21856
+ padding-left: ${(props) => (props.image ? props.theme.theme_vars.spacingSizes.x_large : 0)};
21857
+ padding-right: ${(props) => (props.image ? props.theme.theme_vars.spacingSizes.x_large : 0)};
21858
+ }
21859
+
21860
+ h2 {
21861
+ text-align: center;
21862
+ }
21863
+ `;
21864
+
21865
+ const LinkContainer = styled.div`
21866
+ height: 100%;
21867
+ display: flex;
21868
+ align-items: flex-end;
21869
+
21870
+ a {
21871
+ width: 100%;
21872
+ height: 2.28rem;
21873
+ padding: 12px !important;
21874
+ @media screen and (min-width: ${(props) => props.theme.theme_vars.breakpoints.m}) {
21875
+ height: 2.6rem;
21876
+ }
21877
+ }
21878
+ `;
21879
+
21880
+ const Inner = styled.div`
21881
+ background-color: ${(props) =>
21882
+ props.theme.cardinal_name === 'west'
21883
+ ? props.theme.theme_vars.colours.grey_light
21884
+ : props.theme.theme_vars.colours.white};
21885
+ padding: ${(props) => props.theme.theme_vars.spacingSizes.small};
21886
+ box-shadow: 1px 1px 5px 1px rgba(0, 0, 0, 0.2);
21887
+ border-radius: ${(props) => props.theme.theme_vars.border_radius};
21888
+
21889
+ @media screen and (min-width: ${(props) => props.theme.theme_vars.breakpoints.m}) {
21890
+ padding: ${(props) => props.theme.theme_vars.spacingSizes.large};
21891
+ max-width: ${(props) => props.theme.theme_vars.breakpoints.m};
21892
+ margin: 0 auto;
21893
+ }
21894
+ `;
21895
+
21896
+ const Container$y = styled.div`
21897
+ display: block;
21898
+
21899
+ input[type='text'] {
21900
+ border-top-right-radius: 0;
21901
+ border-bottom-right-radius: 0;
21902
+ flex-grow: 1;
21903
+ margin-bottom: 0;
21904
+ }
21905
+ `;
21906
+
21907
+ const Label$1 = styled.label`
21908
+ font-weight: bold;
21909
+ font-family: ${(props) => props.theme.theme_vars.fontstack};
21910
+ ${(props) =>
21911
+ props.hasHiddenLabel
21912
+ ? VisuallyHidden$2
21913
+ : `display: inline-block; padding-bottom: ${props.theme.theme_vars.spacingSizes.small}`}
21914
+ `;
21915
+
21916
+ const InputWrapper$1 = styled.div`
21917
+ position: relative;
21918
+ display: flex;
21919
+ flex-wrap: nowrap;
21920
+ width: 100%;
21921
+ `;
21922
+
21923
+ const SubmitButton = styled.input`
21924
+ flex-grow: 0;
21925
+ cursor: pointer;
21926
+ margin: 0;
21927
+ padding: ${(props) => props.theme.theme_vars.spacingSizes.small};
21928
+ background: ${(props) =>
21929
+ props.isLight ? props.theme.theme_vars.colours.action : props.theme.theme_vars.colours.grey_darkest};
21930
+ color: ${(props) => props.theme.theme_vars.colours.white};
21931
+ border: 1px solid transparent;
21932
+ border-top-right-radius: calc(${(props) => props.theme.theme_vars.border_radius} * 2);
21933
+ border-bottom-right-radius: calc(${(props) => props.theme.theme_vars.border_radius} * 2);
21934
+ text-align: center;
21935
+ height: 2.28rem;
21936
+ @media screen and (min-width: ${(props) => props.theme.theme_vars.breakpoints.m}) {
21937
+ height: 2.6rem;
21938
+ }
21939
+
21940
+ &:hover {
21941
+ background: ${(props) =>
21942
+ props.isLight ? props.theme.theme_vars.colours.action_dark : props.theme.theme_vars.colours.black};
21943
+ }
21944
+
21945
+ &:focus {
21946
+ outline: none;
21947
+ background: ${(props) => props.theme.theme_vars.colours.focus};
21948
+ svg {
21949
+ path {
21950
+ fill: ${(props) => props.theme.theme_vars.colours.black};
21951
+ }
21952
+ }
21953
+ }
21954
+
21955
+ &:active {
21956
+ transform: translateY(1px);
21957
+ background-color: ${(props) => props.theme.theme_vars.colours.focus};
21958
+ box-shadow: 0px -1px 0px 0px ${(props) => props.theme.theme_vars.colours.black};
21959
+ border-top-color: ${(props) => props.theme.theme_vars.colours.black};
21960
+ border-bottom-color: transparent;
21961
+ }
21962
+ `;
21963
+
21964
+ /**
21965
+ * Primary UI component for user interaction
21966
+ */
21967
+ var Input = function (_a) {
21968
+ var _b = _a.type, type = _b === void 0 ? 'text' : _b, _c = _a.placeholder, placeholder = _c === void 0 ? '' : _c, _d = _a.isErrored, isErrored = _d === void 0 ? false : _d, errorText = _a.errorText, name = _a.name, maxLength = _a.maxLength, id = _a.id;
21969
+ return (React.createElement(React.Fragment, null,
21970
+ errorText && React.createElement(ErrorText$1, null, errorText),
21971
+ React.createElement(StyledInput, { type: type, placeholder: placeholder, name: name, isErrored: isErrored, maxLength: maxLength, id: id })));
21972
+ };
21973
+
21974
+ var CustomSearch = function (_a) {
21975
+ var method = _a.method, path = _a.path, label = _a.label, _b = _a.hasHiddenLabel, hasHiddenLabel = _b === void 0 ? true : _b, fieldName = _a.fieldName, placeholder = _a.placeholder, searchText = _a.searchText, id = _a.id;
21976
+ if (id === null) {
21977
+ id = uniqueID();
21978
+ }
21979
+ return (React.createElement(Container$y, { "data-testid": "CustomSearch" },
21980
+ React.createElement("form", { method: method, action: path, "aria-label": label },
21981
+ React.createElement("div", { role: "search" },
21982
+ React.createElement(Label$1, { htmlFor: id, hasHiddenLabel: hasHiddenLabel }, label),
21983
+ React.createElement(InputWrapper$1, null,
21984
+ React.createElement(Input, { name: fieldName, placeholder: placeholder, id: id }),
21985
+ React.createElement(SubmitButton, { type: "submit", value: searchText }))))));
21986
+ };
21987
+
21988
+ var SearchBox = function (_a) {
21989
+ var customSearch = _a.customSearch, imageSmall = _a.imageSmall, imageLarge = _a.imageLarge, imageAltText = _a.imageAltText, searchBoxLink = _a.searchBoxLink, title = _a.title;
21990
+ var searchInner = (React.createElement(Inner, null,
21991
+ React.createElement(Row$1, null,
21992
+ title && (React.createElement(Column, { small: "full", medium: "full", large: "full" },
21993
+ React.createElement(Heading, { text: title, level: 2 }))),
21994
+ React.createElement(Column, { small: "full", medium: "full", large: searchBoxLink ? 'two-thirds' : 'full' },
21995
+ React.createElement(CustomSearch, __assign$2({}, customSearch))),
21996
+ searchBoxLink && (React.createElement(Column, { small: "full", medium: "full", large: "one-third" },
21997
+ React.createElement(LinkContainer, null,
21998
+ React.createElement(Button$2, { text: searchBoxLink.title, url: searchBoxLink.url })))))));
21999
+ return (React.createElement(React.Fragment, null, imageLarge && imageSmall ? (React.createElement(React.Fragment, null,
22000
+ React.createElement(LazyImage, { src: imageLarge, placeholder: imageSmall, visibilitySensorProps: {
22001
+ partialVisibility: true,
22002
+ } }, function (src) { return (React.createElement(Container$z, { image: src, "data-testid": "SearchBox" }, searchInner)); }),
22003
+ imageAltText && React.createElement("span", { role: "img", "aria-label": imageAltText }))) : (React.createElement(Container$z, { "data-testid": "SearchBox" }, searchInner))));
22004
+ };
22005
+
21846
22006
  var VideoProvider;
21847
22007
  (function (VideoProvider) {
21848
22008
  VideoProvider["YouTube"] = "YouTube";
@@ -23621,12 +23781,16 @@ const BreadcrumbLink = styled.a`
23621
23781
  }
23622
23782
  `;
23623
23783
 
23784
+ const Search = styled.div`
23785
+ margin: ${(props) => props.theme.theme_vars.spacingSizes.medium} 0;
23786
+ `;
23787
+
23624
23788
  /**
23625
23789
  * Hero image banner with optional text and call to action with varying presentation of text area.
23626
23790
  * For optional use at the top of a service landing page, if set in the CMS.
23627
23791
  */
23628
23792
  var HeroImage = function (_a) {
23629
- var headline = _a.headline, content = _a.content, callToActionText = _a.callToActionText, callToActionURL = _a.callToActionURL, _b = _a.backgroundBox, backgroundBox = _b === void 0 ? true : _b, imageLarge = _a.imageLarge, imageSmall = _a.imageSmall, imageAltText = _a.imageAltText, breadcrumb = _a.breadcrumb;
23793
+ var headline = _a.headline, content = _a.content, callToActionText = _a.callToActionText, callToActionURL = _a.callToActionURL, _b = _a.backgroundBox, backgroundBox = _b === void 0 ? true : _b, imageLarge = _a.imageLarge, imageSmall = _a.imageSmall, imageAltText = _a.imageAltText, breadcrumb = _a.breadcrumb, customSearch = _a.customSearch;
23630
23794
  return (React.createElement(React.Fragment, null,
23631
23795
  React.createElement(LazyImage, { src: imageLarge, placeholder: imageSmall, visibilitySensorProps: {
23632
23796
  partialVisibility: true,
@@ -23636,6 +23800,8 @@ var HeroImage = function (_a) {
23636
23800
  breadcrumb && (React.createElement(BreadcrumbLink, { href: breadcrumb.url, backgroundBox: backgroundBox }, breadcrumb.title)),
23637
23801
  headline && React.createElement(Headline, { level: 1, text: headline, backgroundBox: backgroundBox }),
23638
23802
  content && React.createElement(Content, { dangerouslySetInnerHTML: { __html: sanitizeHtml_1(content) } }),
23803
+ customSearch && (React.createElement(Search, null,
23804
+ React.createElement(CustomSearch, __assign$2({}, customSearch)))),
23639
23805
  callToActionURL && backgroundBox && React.createElement(CallToAction, { url: callToActionURL, text: callToActionText }),
23640
23806
  !callToActionURL && backgroundBox && React.createElement("br", null),
23641
23807
  callToActionURL && !backgroundBox && (React.createElement(CallToActionLink, { href: callToActionURL }, callToActionText ? callToActionText : 'Find out more')))))); }),
@@ -32531,16 +32697,6 @@ var FormWithLine = function (_a) {
32531
32697
  children)));
32532
32698
  };
32533
32699
 
32534
- /**
32535
- * Primary UI component for user interaction
32536
- */
32537
- var Input = function (_a) {
32538
- var _b = _a.type, type = _b === void 0 ? 'text' : _b, _c = _a.placeholder, placeholder = _c === void 0 ? '' : _c, _d = _a.isErrored, isErrored = _d === void 0 ? false : _d, errorText = _a.errorText, name = _a.name, maxLength = _a.maxLength;
32539
- return (React.createElement(React.Fragment, null,
32540
- errorText && React.createElement(ErrorText$1, null, errorText),
32541
- React.createElement(StyledInput, { type: type, placeholder: placeholder, name: name, isErrored: isErrored, maxLength: maxLength })));
32542
- };
32543
-
32544
32700
  const Spinner = styled.div`
32545
32701
  display: inline-block;
32546
32702
  width: 80px;
@@ -33692,5 +33848,5 @@ const GlobalStyleReset = createGlobalStyle`
33692
33848
  }
33693
33849
  `;
33694
33850
 
33695
- export { AccessibleLink as AccessibleLinks, Accordion, AlertBanner, AlertBannerService, Autocomplete, BlockQuote, Breadcrumbs, Button$2 as Button, CallToAction, Cards, CheckboxListFilter, Contents$1 as Contents, ContentsNavigation, CookieBanner, CouncilTaxAlphabeticalDirectory, DisplayDate, Divider, DownloadableFiles, DropDownFilter, DynamicIcon, Footer, FullWidthContainer, GDS_theme, GlobalStyleReset, GoogleMap, Header, Heading, HeadingWithIcon, HeroImage, HomeHero, Image$2 as Image, ImageAndText, MaxWidthContainer, MemorialHero, NewsArticleDate, NewsArticleFeaturedBlock, NewsArticleFilterAccordion, NewsArticleImage, NewsArticleList, NewsArticleListHeader, NewsArticleOldBanner, PageMain, PageSidebar, PageTitle, PageWithSidebarContainer, PageWrapper, Pagination, PhaseBanner, PromoBanner, PromoBlock, PromotedLinks, Promotions, SearchResultsList, Searchbar, SectionLinks, SectionLinksMobileContents, SectionLinksSidebar, ServiceLinksBoxed, ServicesLinksList, SignpostLinks, SkipToMainContent, Summary, TextInput, Video, WarningText, WarningTextDisclaimer, lb_theme_north, lb_theme_west, north_theme, west_theme };
33851
+ export { AccessibleLink as AccessibleLinks, Accordion, AlertBanner, AlertBannerService, Autocomplete, BlockQuote, Breadcrumbs, Button$2 as Button, CallToAction, Cards, CheckboxListFilter, Contents$1 as Contents, ContentsNavigation, CookieBanner, CouncilTaxAlphabeticalDirectory, DisplayDate, Divider, DownloadableFiles, DropDownFilter, DynamicIcon, Footer, FullWidthContainer, GDS_theme, GlobalStyleReset, GoogleMap, Header, Heading, HeadingWithIcon, HeroImage, HomeHero, Image$2 as Image, ImageAndText, MaxWidthContainer, MemorialHero, NewsArticleDate, NewsArticleFeaturedBlock, NewsArticleFilterAccordion, NewsArticleImage, NewsArticleList, NewsArticleListHeader, NewsArticleOldBanner, PageMain, PageSidebar, PageTitle, PageWithSidebarContainer, PageWrapper, Pagination, PhaseBanner, PromoBanner, PromoBlock, PromotedLinks, Promotions, SearchBox, SearchResultsList, Searchbar, SectionLinks, SectionLinksMobileContents, SectionLinksSidebar, ServiceLinksBoxed, ServicesLinksList, SignpostLinks, SkipToMainContent, Summary, TextInput, Video, WarningText, WarningTextDisclaimer, lb_theme_north, lb_theme_west, north_theme, west_theme };
33696
33852
  //# sourceMappingURL=index.esm.js.map