northants-design-system 0.4.2 → 0.4.4
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.esm.js +28 -38
- package/build/index.esm.js.map +1 -1
- package/build/index.js +28 -38
- package/build/index.js.map +1 -1
- package/build/library/components/icons/TwitterIcon/Icon.d.ts +3 -3
- package/build/library/structure/BackLink/BackLink.d.ts +6 -3
- package/build/library/structure/BackLink/BackLink.types.d.ts +6 -2
- package/build/library/structure/SearchResultsList/SearchResultsList.d.ts +3 -3
- package/package.json +1 -1
package/build/index.esm.js
CHANGED
|
@@ -23162,31 +23162,29 @@ var AlertBanner = function (_a) {
|
|
|
23162
23162
|
};
|
|
23163
23163
|
|
|
23164
23164
|
const Container$E = styled.a`
|
|
23165
|
-
|
|
23166
|
-
|
|
23167
|
-
|
|
23168
23165
|
display: inline-block;
|
|
23169
23166
|
position: relative;
|
|
23170
23167
|
margin-top: 15px;
|
|
23171
23168
|
margin-bottom: 15px;
|
|
23172
23169
|
padding-left: 14px;
|
|
23170
|
+
border: none;
|
|
23171
|
+
background: transparent;
|
|
23173
23172
|
|
|
23173
|
+
${(props) => props.theme.fontStyles}
|
|
23174
23174
|
|
|
23175
|
-
|
|
23176
|
-
|
|
23177
|
-
|
|
23178
|
-
${props => props.theme.linkStylesHover}
|
|
23175
|
+
&:hover {
|
|
23176
|
+
${(props) => props.theme.linkStylesHover}
|
|
23177
|
+
cursor: pointer;
|
|
23179
23178
|
}
|
|
23180
|
-
&:focus{
|
|
23181
|
-
|
|
23179
|
+
&:focus {
|
|
23180
|
+
${(props) => props.theme.linkStylesFocus}
|
|
23182
23181
|
}
|
|
23183
|
-
&:active{
|
|
23184
|
-
|
|
23182
|
+
&:active {
|
|
23183
|
+
${(props) => props.theme.linkStylesActive}
|
|
23185
23184
|
}
|
|
23186
23185
|
|
|
23187
|
-
|
|
23188
23186
|
&:before {
|
|
23189
|
-
content:
|
|
23187
|
+
content: '';
|
|
23190
23188
|
display: block;
|
|
23191
23189
|
position: absolute;
|
|
23192
23190
|
top: 0;
|
|
@@ -23208,7 +23206,7 @@ const Container$E = styled.a`
|
|
|
23208
23206
|
}
|
|
23209
23207
|
|
|
23210
23208
|
&:after {
|
|
23211
|
-
content:
|
|
23209
|
+
content: '';
|
|
23212
23210
|
position: absolute;
|
|
23213
23211
|
top: -14px;
|
|
23214
23212
|
right: 0;
|
|
@@ -23217,9 +23215,12 @@ const Container$E = styled.a`
|
|
|
23217
23215
|
}
|
|
23218
23216
|
`;
|
|
23219
23217
|
|
|
23218
|
+
/**
|
|
23219
|
+
* A back link or a back button when using history
|
|
23220
|
+
*/
|
|
23220
23221
|
var BackLink = function (_a) {
|
|
23221
|
-
var link = _a.link;
|
|
23222
|
-
return (React.createElement(Container$E, { href: link, "data-testid": "BackLink" }, "Back"));
|
|
23222
|
+
var link = _a.link, _b = _a.useHistory, useHistory = _b === void 0 ? false : _b;
|
|
23223
|
+
return (React.createElement(React.Fragment, null, useHistory ? (React.createElement(Container$E, { onClick: function () { return history.back(); }, "data-testid": "BackLink", as: "button" }, "Back")) : (React.createElement(Container$E, { href: link, "data-testid": "BackLink" }, "Back"))));
|
|
23223
23224
|
};
|
|
23224
23225
|
|
|
23225
23226
|
const Container$D = styled.div`
|
|
@@ -23920,8 +23921,8 @@ var ServiceIcon$3 = function (_a) {
|
|
|
23920
23921
|
|
|
23921
23922
|
var ServiceIcon$2 = function (_a) {
|
|
23922
23923
|
var colourFill = _a.colourFill;
|
|
23923
|
-
return (React.createElement("svg", { width: "36", height: "36",
|
|
23924
|
-
React.createElement("path", { d: "
|
|
23924
|
+
return (React.createElement("svg", { width: "36", height: "36", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 36 36" },
|
|
23925
|
+
React.createElement("path", { d: "m0,5.14v25.72c0,2.84,2.31,5.14,5.14,5.14h25.72c2.84,0,5.14-2.31,5.14-5.14V5.14c0-2.83-2.31-5.14-5.14-5.14H5.14C2.31,0,0,2.31,0,5.14Zm29.01,1.61l-8.34,9.53,9.81,12.97h-7.68l-6.01-7.86-6.88,7.86h-3.81l8.92-10.19L5.59,6.75h7.87l5.45,7.19,6.29-7.19s3.81,0,3.81,0Zm-3.03,20.17L12.31,8.84h-2.27l13.83,18.08h2.13Z", fill: colourFill })));
|
|
23925
23926
|
};
|
|
23926
23927
|
|
|
23927
23928
|
var ServiceIcon$1 = function (_a) {
|
|
@@ -26113,6 +26114,7 @@ var SignpostLinksList = function (_a) {
|
|
|
26113
26114
|
|
|
26114
26115
|
var SearchResultsList = function (_a) {
|
|
26115
26116
|
var searchTerm = _a.searchTerm, results = _a.results, _b = _a.totalResults, totalResults = _b === void 0 ? 0 : _b, _c = _a.pageNumber, pageNumber = _c === void 0 ? 0 : _c;
|
|
26117
|
+
var themeContext = useContext(ThemeContext);
|
|
26116
26118
|
if (totalResults === 0) {
|
|
26117
26119
|
return (React.createElement(Container$h, { "data-testid": "SearchResultsList" },
|
|
26118
26120
|
React.createElement(ResultInfo$2, null, "No results found")));
|
|
@@ -26120,30 +26122,18 @@ var SearchResultsList = function (_a) {
|
|
|
26120
26122
|
else {
|
|
26121
26123
|
return (React.createElement(Container$h, { "data-testid": "SearchResultsList" },
|
|
26122
26124
|
React.createElement(ResultInfo$2, null,
|
|
26123
|
-
|
|
26125
|
+
pageNumber > 1 && 'Page ' + pageNumber + ' of ',
|
|
26124
26126
|
totalResults,
|
|
26125
26127
|
" total results for '",
|
|
26126
26128
|
searchTerm,
|
|
26127
26129
|
"'"),
|
|
26128
|
-
results.map(function (result, i) {
|
|
26129
|
-
|
|
26130
|
-
|
|
26131
|
-
|
|
26132
|
-
|
|
26133
|
-
result.signpostLinksArray
|
|
26134
|
-
|
|
26135
|
-
result.signpostLinksArray.length > 1 ?
|
|
26136
|
-
React.createElement(React.Fragment, null, result.TopLineText ?
|
|
26137
|
-
React.createElement("p", null, result.TopLineText)
|
|
26138
|
-
:
|
|
26139
|
-
React.createElement("p", null, "Select your local area for information:"))
|
|
26140
|
-
:
|
|
26141
|
-
React.createElement(React.Fragment, null, result.TopLineText ?
|
|
26142
|
-
React.createElement("p", null, result.TopLineText)
|
|
26143
|
-
:
|
|
26144
|
-
React.createElement("p", null, "Go straight to the information:")),
|
|
26145
|
-
React.createElement(SignpostLinksList, { signpostLinksArray: result.signpostLinksArray })));
|
|
26146
|
-
})));
|
|
26130
|
+
results.map(function (result, i) { return (React.createElement(Result, { key: i },
|
|
26131
|
+
result.service && React.createElement(ServiceArea, null, result.service),
|
|
26132
|
+
React.createElement(Title$3, { href: result.link }, result.title),
|
|
26133
|
+
React.createElement(Summary$2, null, result.summary),
|
|
26134
|
+
result.signpostLinksArray && themeContext.cardinal_name === 'north' && (React.createElement(SignpostContainer, null,
|
|
26135
|
+
result.signpostLinksArray.length > 1 ? (React.createElement(React.Fragment, null, result.TopLineText ? React.createElement("p", null, result.TopLineText) : React.createElement("p", null, "Select your local area for information:"))) : (React.createElement(React.Fragment, null, result.TopLineText ? React.createElement("p", null, result.TopLineText) : React.createElement("p", null, "Go straight to the information:"))),
|
|
26136
|
+
React.createElement(SignpostLinksList, { signpostLinksArray: result.signpostLinksArray }))))); })));
|
|
26147
26137
|
}
|
|
26148
26138
|
};
|
|
26149
26139
|
|