@cruk/cruk-react-components 1.2.1 → 1.2.2

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/README.md CHANGED
@@ -137,3 +137,27 @@ To test specific component , go to .percy.yml and add the regex to match story t
137
137
  storybook:
138
138
  include: [UserBlock]
139
139
  ```
140
+
141
+ ### Maintaining
142
+
143
+ ## Releases
144
+
145
+ Please update the version number in the package.json and follow the semver standards for version numbers.
146
+
147
+ Make sure that your current node version is Node 16.
148
+ Run `npm i` to make sure that the correct version in the lockfile.
149
+ Update the CHANGELOG.md which should list the changes for the release, instructions are at the bottom of the file.
150
+ Make sure that you have the correct permissions for the @cruk on NPM
151
+ Run the release script with `npm run release` this should make and push the tag, build the lib and release it on NPM.
152
+
153
+ ## Dependencies
154
+
155
+ If you update cypress version make sure you update it in the package.json and in the in docker compose file.
156
+
157
+ It is also advices that if you make change to storybook you try and run it before merging and if you make changes to roll up and it's plug ins you try and run
158
+
159
+ ```bash
160
+ npm run rollup:build-lib
161
+ ```
162
+
163
+ and see if it can successfully build the library before running the release script
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../node_modules/tslib/tslib.es6.js"),t=require("react"),a=require("styled-components"),r=require("../../themes/cruk.js"),n=require("./styles.js");function c(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l=c(t);exports.default=function(t){var c=t.current,i=t.items,s=t.hideLast,u=t.pagerCallback,o=t.perPage,d=t.searchParam,f=void 0===d?"page":d,m=t.children,g=a.useTheme(),p=e.__assign(e.__assign({},r.default),g),P=o>0?o:1,v=Math.ceil(i/P)||1,E=function(e){return{href:"".concat("undefined"!=typeof window?window.location.pathname:"","?").concat(f?"".concat(f,"=").concat(e):""),onClick:function(t){t.preventDefault(),u(e)}}};return l.default.createElement(a.ThemeProvider,{theme:p},i>o&&l.default.createElement(n.PagerWrapper,null,l.default.createElement(n.PagerList,null,l.default.createElement(n.PagerItem,{key:"Prev"},l.default.createElement(n.PagerLink,e.__assign({name:"Prev",disabled:1===c},1!==c&&E(c-1)),"Prev")),function(t,a){for(var r=[],c=[],i=1;i<=a;i+=1)r.push(l.default.createElement(n.PagerItem,{key:i},l.default.createElement(n.PagerLink,e.__assign({active:i===t},E(i),{"aria-label":"page ".concat(i," of ").concat(a)}),i)));var u=r.slice(0,1).concat(l.default.createElement(n.PagerItem,{key:"first"},l.default.createElement("span",null,"..."))),o=r.slice(r.length-1).concat(l.default.createElement(n.PagerItem,{key:"last"},l.default.createElement("span",null,"..."))).reverse();return c=r.slice(0,a),a>7&&(c=t<=4?s?r.slice(0,7):r.slice(0,5).concat(o):t>a-4?u.concat(r.slice(-5)):s?u.concat(r.slice(t-3,t+2)):u.concat(r.slice(t-2,t+1)).concat(o)),c}(c,v),l.default.createElement(n.PagerItem,{key:"Next"},l.default.createElement(n.PagerLink,e.__assign({name:"Next",disabled:c===v},c!==v&&E(c+1)),"Next"))),m))};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../node_modules/tslib/tslib.es6.js"),t=require("react"),a=require("styled-components"),r=require("../../themes/cruk.js"),n=require("./styles.js");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var c=l(t);exports.default=function(t){var l=t.current,i=t.items,s=t.hideLast,u=t.pagerCallback,d=t.perPage,o=t.searchParam,f=void 0===o?"page":o,m=t.children,g=a.useTheme(),p=e.__assign(e.__assign({},r.default),g),P=d>0?d:1,v=Math.ceil(i/P)||1,E=function(e){return{href:"".concat("undefined"!=typeof window?window.location.pathname:"","?").concat(f?"".concat(f,"=").concat(e):""),onClick:function(t){t.preventDefault(),u(e)}}};return c.default.createElement(a.ThemeProvider,{theme:p},i>d&&c.default.createElement(n.PagerWrapper,null,c.default.createElement(n.PagerList,null,c.default.createElement(n.PagerItem,{key:"Prev"},c.default.createElement(n.PagerLink,e.__assign({name:"Prev",disabled:1===l,"aria-disabled":1===l},1===l&&{tabIndex:-1},1!==l&&E(l-1)),"Prev")),function(t,a){for(var r=[],l=[],i=1;i<=a;i+=1)r.push(c.default.createElement(n.PagerItem,{key:i},c.default.createElement(n.PagerLink,e.__assign({active:i===t},E(i),{"aria-label":"page ".concat(i," of ").concat(a)}),i)));var u=r.slice(0,1).concat(c.default.createElement(n.PagerItem,{key:"first"},c.default.createElement("span",null,"..."))),d=r.slice(r.length-1).concat(c.default.createElement(n.PagerItem,{key:"last"},c.default.createElement("span",null,"..."))).reverse();return l=r.slice(0,a),a>7&&(l=t<=4?s?r.slice(0,7):r.slice(0,5).concat(d):t>a-4?u.concat(r.slice(-5)):s?u.concat(r.slice(t-3,t+2)):u.concat(r.slice(t-2,t+1)).concat(d)),l}(l,v),c.default.createElement(n.PagerItem,{key:"Next"},c.default.createElement(n.PagerLink,e.__assign({name:"Next",disabled:l===v,"aria-disabled":l===v},l===v&&{tabIndex:-1},l!==v&&E(l+1)),"Next"))),m))};
2
2
  //# sourceMappingURL=index.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n=require("../../../node_modules/tslib/tslib.es6.js"),e=require("styled-components");function o(n){return n&&"object"==typeof n&&"default"in n?n:{default:n}}var t,r,i,a,c,d,l,s=o(e),u=s.default.div(t||(t=n.__makeTemplateObject(["\n display: table;\n width: 100%;\n clear: both;\n text-align: center;\n"],["\n display: table;\n width: 100%;\n clear: both;\n text-align: center;\n"]))),p=s.default.ul(r||(r=n.__makeTemplateObject(["\n display: inline-block;\n padding-left: 0;\n margin: 20px 0;\n"],["\n display: inline-block;\n padding-left: 0;\n margin: 20px 0;\n"]))),f=s.default.a(d||(d=n.__makeTemplateObject(["\n font-weight: normal;\n font-family: ",";\n font-size: ",";\n color: ",";\n background-color: ",";\n cursor: pointer;\n border-radius: 0;\n margin: ",";\n padding: 7px 11px;\n text-decoration: none;\n &:hover {\n opacity: 0.88;\n text-decoration: underline;\n }\n &:focus,\n &:active,\n &:visited {\n text-decoration: none;\n }\n\n &:focus-visible {\n outline: auto;\n }\n\n ","\n\n ","\n\n ","\n"],["\n font-weight: normal;\n font-family: ",";\n font-size: ",";\n color: ",";\n background-color: ",";\n cursor: pointer;\n border-radius: 0;\n margin: ",";\n padding: 7px 11px;\n text-decoration: none;\n &:hover {\n opacity: 0.88;\n text-decoration: underline;\n }\n &:focus,\n &:active,\n &:visited {\n text-decoration: none;\n }\n\n &:focus-visible {\n outline: auto;\n }\n\n ","\n\n ","\n\n ","\n"])),(function(n){return n.theme.typography.fontFamilyBase}),(function(n){return n.theme.fontSizes.s}),(function(n){return n.theme.colors.textLight}),(function(n){return n.theme.colors.paginationBackground}),(function(n){return n.theme.spacing.xxs}),(function(o){return o.active&&e.css(i||(i=n.__makeTemplateObject(["\n color: ",";\n background-color: ",";\n cursor: default;\n &:hover {\n background-color: ",";\n text-decoration: none;\n }\n "],["\n color: ",";\n background-color: ",";\n cursor: default;\n &:hover {\n background-color: ",";\n text-decoration: none;\n }\n "])),(function(n){return n.theme.colors.textDark}),(function(n){return n.theme.colors.paginationActive}),(function(n){return n.theme.colors.paginationActive}))}),(function(o){return("Prev"===o.name||"Next"===o.name)&&e.css(a||(a=n.__makeTemplateObject(["\n color: ",";\n background-color: transparent;\n font-weight: bold;\n padding: 8px 6px;\n background-color: transparent;\n &:hover {\n background-color: transparent;\n text-decoration: underline;\n }\n &:focus,\n &:active,\n &:visited {\n text-decoration: none;\n }\n "],["\n color: ",";\n background-color: transparent;\n font-weight: bold;\n padding: 8px 6px;\n background-color: transparent;\n &:hover {\n background-color: transparent;\n text-decoration: underline;\n }\n &:focus,\n &:active,\n &:visited {\n text-decoration: none;\n }\n "])),(function(n){var e=n.theme;return n.disabled?e.colors.disabled:e.colors.paginationText}))}),(function(o){return o.disabled&&e.css(c||(c=n.__makeTemplateObject(["\n color: $ ",";\n cursor: not-allowed;\n text-decoration: none;\n &:hover,\n &:focus,\n &:active,\n &:visited {\n color: ",";\n text-decoration: none;\n }\n "],["\n color: $ ",";\n cursor: not-allowed;\n text-decoration: none;\n &:hover,\n &:focus,\n &:active,\n &:visited {\n color: ",";\n text-decoration: none;\n }\n "])),(function(n){return n.theme.colors.disabled}),(function(n){return n.theme.colors.disabled}))})),m=s.default.li(l||(l=n.__makeTemplateObject(["\n display: none;\n &:first-child,\n &:last-child {\n display: inline;\n }\n @media (min-width: ",") {\n display: inline;\n }\n span {\n border: none;\n min-width: 30px;\n padding: 5px;\n margin: 1px;\n border-radius: 0;\n }\n"],["\n display: none;\n &:first-child,\n &:last-child {\n display: inline;\n }\n @media (min-width: ",") {\n display: inline;\n }\n span {\n border: none;\n min-width: 30px;\n padding: 5px;\n margin: 1px;\n border-radius: 0;\n }\n"])),(function(n){return n.theme.breakpoint.mobile}));exports.PagerItem=m,exports.PagerLink=f,exports.PagerList=p,exports.PagerWrapper=u;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n=require("../../../node_modules/tslib/tslib.es6.js"),e=require("styled-components");function o(n){return n&&"object"==typeof n&&"default"in n?n:{default:n}}var t,r,i,a,c,d,l,s=o(e),u=s.default.div(t||(t=n.__makeTemplateObject(["\n display: table;\n width: 100%;\n clear: both;\n text-align: center;\n"],["\n display: table;\n width: 100%;\n clear: both;\n text-align: center;\n"]))),p=s.default.ul(r||(r=n.__makeTemplateObject(["\n display: inline-block;\n padding-left: 0;\n margin: 20px 0;\n"],["\n display: inline-block;\n padding-left: 0;\n margin: 20px 0;\n"]))),f=s.default.a(d||(d=n.__makeTemplateObject(["\n font-weight: normal;\n font-family: ",";\n font-size: ",";\n color: ",";\n background-color: ",";\n cursor: pointer;\n border-radius: 0;\n margin: ",";\n padding: 7px 11px;\n text-decoration: none;\n &:hover {\n opacity: 0.88;\n text-decoration: underline;\n }\n &:focus,\n &:active,\n &:visited {\n text-decoration: none;\n }\n\n &:focus-visible {\n outline: auto;\n }\n\n ","\n\n ","\n\n ","\n"],["\n font-weight: normal;\n font-family: ",";\n font-size: ",";\n color: ",";\n background-color: ",";\n cursor: pointer;\n border-radius: 0;\n margin: ",";\n padding: 7px 11px;\n text-decoration: none;\n &:hover {\n opacity: 0.88;\n text-decoration: underline;\n }\n &:focus,\n &:active,\n &:visited {\n text-decoration: none;\n }\n\n &:focus-visible {\n outline: auto;\n }\n\n ","\n\n ","\n\n ","\n"])),(function(n){return n.theme.typography.fontFamilyBase}),(function(n){return n.theme.fontSizes.s}),(function(n){return n.theme.colors.textLight}),(function(n){return n.theme.colors.paginationBackground}),(function(n){return n.theme.spacing.xxs}),(function(o){return o.active&&e.css(i||(i=n.__makeTemplateObject(["\n color: ",";\n background-color: ",";\n cursor: default;\n &:hover {\n background-color: ",";\n text-decoration: none;\n }\n "],["\n color: ",";\n background-color: ",";\n cursor: default;\n &:hover {\n background-color: ",";\n text-decoration: none;\n }\n "])),(function(n){return n.theme.colors.textDark}),(function(n){return n.theme.colors.paginationActive}),(function(n){return n.theme.colors.paginationActive}))}),(function(o){return("Prev"===o.name||"Next"===o.name)&&e.css(a||(a=n.__makeTemplateObject(["\n color: ",";\n background-color: transparent;\n font-weight: bold;\n padding: 8px 6px;\n background-color: transparent;\n &:hover {\n background-color: transparent;\n text-decoration: underline;\n }\n &:focus,\n &:active,\n &:visited {\n text-decoration: none;\n }\n "],["\n color: ",";\n background-color: transparent;\n font-weight: bold;\n padding: 8px 6px;\n background-color: transparent;\n &:hover {\n background-color: transparent;\n text-decoration: underline;\n }\n &:focus,\n &:active,\n &:visited {\n text-decoration: none;\n }\n "])),(function(n){var e=n.theme;return n.disabled?e.colors.disabled:e.colors.paginationText}))}),(function(o){return o.disabled&&e.css(c||(c=n.__makeTemplateObject(["\n color: $ ",";\n cursor: not-allowed;\n pointer-events:none\n text-decoration: none;\n &:hover,\n &:focus,\n &:active,\n &:visited {\n color: ",";\n text-decoration: none;\n }\n "],["\n color: $ ",";\n cursor: not-allowed;\n pointer-events:none\n text-decoration: none;\n &:hover,\n &:focus,\n &:active,\n &:visited {\n color: ",";\n text-decoration: none;\n }\n "])),(function(n){return n.theme.colors.disabled}),(function(n){return n.theme.colors.disabled}))})),m=s.default.li(l||(l=n.__makeTemplateObject(["\n display: none;\n &:first-child,\n &:last-child {\n display: inline;\n }\n @media (min-width: ",") {\n display: inline;\n }\n span {\n border: none;\n min-width: 30px;\n padding: 5px;\n margin: 1px;\n border-radius: 0;\n }\n"],["\n display: none;\n &:first-child,\n &:last-child {\n display: inline;\n }\n @media (min-width: ",") {\n display: inline;\n }\n span {\n border: none;\n min-width: 30px;\n padding: 5px;\n margin: 1px;\n border-radius: 0;\n }\n"])),(function(n){return n.theme.breakpoint.mobile}));exports.PagerItem=m,exports.PagerLink=f,exports.PagerList=p,exports.PagerWrapper=u;
2
2
  //# sourceMappingURL=styles.js.map
@@ -3,4 +3,5 @@ import { PaginationProps } from ".";
3
3
  declare const _default: Meta<PaginationProps>;
4
4
  export default _default;
5
5
  export declare const PaginationDefault: Story<PaginationProps>;
6
+ export declare const PaginationFirstPage: Story<PaginationProps>;
6
7
  export declare const SU2CPagination: Story<PaginationProps>;
@@ -1,4 +1,4 @@
1
- import { FunctionComponent, ReactNode } from "react";
1
+ import { ReactNode } from "react";
2
2
  export declare type PaginationProps = {
3
3
  /** set current page number */
4
4
  current: number;
@@ -20,5 +20,5 @@ export declare type PaginationProps = {
20
20
  Data is split into multiple pages and pagination is used to
21
21
  easily navigate through these pages.
22
22
  */
23
- declare const Pagination: FunctionComponent<PaginationProps>;
23
+ declare const Pagination: ({ current, items, hideLast, pagerCallback, perPage, searchParam, children, }: PaginationProps) => JSX.Element;
24
24
  export default Pagination;
@@ -1,2 +1,2 @@
1
- import{__assign as e}from"../../../node_modules/tslib/tslib.es6.js";import t from"react";import{useTheme as c,ThemeProvider as a}from"styled-components";import n from"../../themes/cruk.js";import{PagerWrapper as r,PagerList as l,PagerItem as o,PagerLink as i}from"./styles.js";var m=function(m){var s=m.current,u=m.items,f=m.hideLast,p=m.pagerCallback,d=m.perPage,E=m.searchParam,v=void 0===E?"page":E,h=m.children,k=c(),y=e(e({},n),k),b=d>0?d:1,g=Math.ceil(u/b)||1,P=function(e){return{href:"".concat("undefined"!=typeof window?window.location.pathname:"","?").concat(v?"".concat(v,"=").concat(e):""),onClick:function(t){t.preventDefault(),p(e)}}};return t.createElement(a,{theme:y},u>d&&t.createElement(r,null,t.createElement(l,null,t.createElement(o,{key:"Prev"},t.createElement(i,e({name:"Prev",disabled:1===s},1!==s&&P(s-1)),"Prev")),function(c,a){for(var n=[],r=[],l=1;l<=a;l+=1)n.push(t.createElement(o,{key:l},t.createElement(i,e({active:l===c},P(l),{"aria-label":"page ".concat(l," of ").concat(a)}),l)));var m=n.slice(0,1).concat(t.createElement(o,{key:"first"},t.createElement("span",null,"..."))),s=n.slice(n.length-1).concat(t.createElement(o,{key:"last"},t.createElement("span",null,"..."))).reverse();return r=n.slice(0,a),a>7&&(r=c<=4?f?n.slice(0,7):n.slice(0,5).concat(s):c>a-4?m.concat(n.slice(-5)):f?m.concat(n.slice(c-3,c+2)):m.concat(n.slice(c-2,c+1)).concat(s)),r}(s,g),t.createElement(o,{key:"Next"},t.createElement(i,e({name:"Next",disabled:s===g},s!==g&&P(s+1)),"Next"))),h))};export{m as default};
1
+ import{__assign as e}from"../../../node_modules/tslib/tslib.es6.js";import t from"react";import{useTheme as a,ThemeProvider as c}from"styled-components";import n from"../../themes/cruk.js";import{PagerWrapper as r,PagerList as l,PagerItem as o,PagerLink as i}from"./styles.js";var s=function(s){var m=s.current,d=s.items,u=s.hideLast,f=s.pagerCallback,p=s.perPage,E=s.searchParam,v=void 0===E?"page":E,b=s.children,h=a(),k=e(e({},n),h),y=p>0?p:1,x=Math.ceil(d/y)||1,g=function(e){return{href:"".concat("undefined"!=typeof window?window.location.pathname:"","?").concat(v?"".concat(v,"=").concat(e):""),onClick:function(t){t.preventDefault(),f(e)}}};return t.createElement(c,{theme:k},d>p&&t.createElement(r,null,t.createElement(l,null,t.createElement(o,{key:"Prev"},t.createElement(i,e({name:"Prev",disabled:1===m,"aria-disabled":1===m},1===m&&{tabIndex:-1},1!==m&&g(m-1)),"Prev")),function(a,c){for(var n=[],r=[],l=1;l<=c;l+=1)n.push(t.createElement(o,{key:l},t.createElement(i,e({active:l===a},g(l),{"aria-label":"page ".concat(l," of ").concat(c)}),l)));var s=n.slice(0,1).concat(t.createElement(o,{key:"first"},t.createElement("span",null,"..."))),m=n.slice(n.length-1).concat(t.createElement(o,{key:"last"},t.createElement("span",null,"..."))).reverse();return r=n.slice(0,c),c>7&&(r=a<=4?u?n.slice(0,7):n.slice(0,5).concat(m):a>c-4?s.concat(n.slice(-5)):u?s.concat(n.slice(a-3,a+2)):s.concat(n.slice(a-2,a+1)).concat(m)),r}(m,x),t.createElement(o,{key:"Next"},t.createElement(i,e({name:"Next",disabled:m===x,"aria-disabled":m===x},m===x&&{tabIndex:-1},m!==x&&g(m+1)),"Next"))),b))};export{s as default};
2
2
  //# sourceMappingURL=index.js.map
@@ -1,2 +1,2 @@
1
- import{__makeTemplateObject as n}from"../../../node_modules/tslib/tslib.es6.js";import o,{css as e}from"styled-components";var t,r,i,a,c,d,l,s=o.div(t||(t=n(["\n display: table;\n width: 100%;\n clear: both;\n text-align: center;\n"],["\n display: table;\n width: 100%;\n clear: both;\n text-align: center;\n"]))),u=o.ul(r||(r=n(["\n display: inline-block;\n padding-left: 0;\n margin: 20px 0;\n"],["\n display: inline-block;\n padding-left: 0;\n margin: 20px 0;\n"]))),p=o.a(d||(d=n(["\n font-weight: normal;\n font-family: ",";\n font-size: ",";\n color: ",";\n background-color: ",";\n cursor: pointer;\n border-radius: 0;\n margin: ",";\n padding: 7px 11px;\n text-decoration: none;\n &:hover {\n opacity: 0.88;\n text-decoration: underline;\n }\n &:focus,\n &:active,\n &:visited {\n text-decoration: none;\n }\n\n &:focus-visible {\n outline: auto;\n }\n\n ","\n\n ","\n\n ","\n"],["\n font-weight: normal;\n font-family: ",";\n font-size: ",";\n color: ",";\n background-color: ",";\n cursor: pointer;\n border-radius: 0;\n margin: ",";\n padding: 7px 11px;\n text-decoration: none;\n &:hover {\n opacity: 0.88;\n text-decoration: underline;\n }\n &:focus,\n &:active,\n &:visited {\n text-decoration: none;\n }\n\n &:focus-visible {\n outline: auto;\n }\n\n ","\n\n ","\n\n ","\n"])),(function(n){return n.theme.typography.fontFamilyBase}),(function(n){return n.theme.fontSizes.s}),(function(n){return n.theme.colors.textLight}),(function(n){return n.theme.colors.paginationBackground}),(function(n){return n.theme.spacing.xxs}),(function(o){return o.active&&e(i||(i=n(["\n color: ",";\n background-color: ",";\n cursor: default;\n &:hover {\n background-color: ",";\n text-decoration: none;\n }\n "],["\n color: ",";\n background-color: ",";\n cursor: default;\n &:hover {\n background-color: ",";\n text-decoration: none;\n }\n "])),(function(n){return n.theme.colors.textDark}),(function(n){return n.theme.colors.paginationActive}),(function(n){return n.theme.colors.paginationActive}))}),(function(o){return("Prev"===o.name||"Next"===o.name)&&e(a||(a=n(["\n color: ",";\n background-color: transparent;\n font-weight: bold;\n padding: 8px 6px;\n background-color: transparent;\n &:hover {\n background-color: transparent;\n text-decoration: underline;\n }\n &:focus,\n &:active,\n &:visited {\n text-decoration: none;\n }\n "],["\n color: ",";\n background-color: transparent;\n font-weight: bold;\n padding: 8px 6px;\n background-color: transparent;\n &:hover {\n background-color: transparent;\n text-decoration: underline;\n }\n &:focus,\n &:active,\n &:visited {\n text-decoration: none;\n }\n "])),(function(n){var o=n.theme;return n.disabled?o.colors.disabled:o.colors.paginationText}))}),(function(o){return o.disabled&&e(c||(c=n(["\n color: $ ",";\n cursor: not-allowed;\n text-decoration: none;\n &:hover,\n &:focus,\n &:active,\n &:visited {\n color: ",";\n text-decoration: none;\n }\n "],["\n color: $ ",";\n cursor: not-allowed;\n text-decoration: none;\n &:hover,\n &:focus,\n &:active,\n &:visited {\n color: ",";\n text-decoration: none;\n }\n "])),(function(n){return n.theme.colors.disabled}),(function(n){return n.theme.colors.disabled}))})),f=o.li(l||(l=n(["\n display: none;\n &:first-child,\n &:last-child {\n display: inline;\n }\n @media (min-width: ",") {\n display: inline;\n }\n span {\n border: none;\n min-width: 30px;\n padding: 5px;\n margin: 1px;\n border-radius: 0;\n }\n"],["\n display: none;\n &:first-child,\n &:last-child {\n display: inline;\n }\n @media (min-width: ",") {\n display: inline;\n }\n span {\n border: none;\n min-width: 30px;\n padding: 5px;\n margin: 1px;\n border-radius: 0;\n }\n"])),(function(n){return n.theme.breakpoint.mobile}));export{f as PagerItem,p as PagerLink,u as PagerList,s as PagerWrapper};
1
+ import{__makeTemplateObject as n}from"../../../node_modules/tslib/tslib.es6.js";import o,{css as e}from"styled-components";var t,r,i,a,c,d,l,s=o.div(t||(t=n(["\n display: table;\n width: 100%;\n clear: both;\n text-align: center;\n"],["\n display: table;\n width: 100%;\n clear: both;\n text-align: center;\n"]))),u=o.ul(r||(r=n(["\n display: inline-block;\n padding-left: 0;\n margin: 20px 0;\n"],["\n display: inline-block;\n padding-left: 0;\n margin: 20px 0;\n"]))),p=o.a(d||(d=n(["\n font-weight: normal;\n font-family: ",";\n font-size: ",";\n color: ",";\n background-color: ",";\n cursor: pointer;\n border-radius: 0;\n margin: ",";\n padding: 7px 11px;\n text-decoration: none;\n &:hover {\n opacity: 0.88;\n text-decoration: underline;\n }\n &:focus,\n &:active,\n &:visited {\n text-decoration: none;\n }\n\n &:focus-visible {\n outline: auto;\n }\n\n ","\n\n ","\n\n ","\n"],["\n font-weight: normal;\n font-family: ",";\n font-size: ",";\n color: ",";\n background-color: ",";\n cursor: pointer;\n border-radius: 0;\n margin: ",";\n padding: 7px 11px;\n text-decoration: none;\n &:hover {\n opacity: 0.88;\n text-decoration: underline;\n }\n &:focus,\n &:active,\n &:visited {\n text-decoration: none;\n }\n\n &:focus-visible {\n outline: auto;\n }\n\n ","\n\n ","\n\n ","\n"])),(function(n){return n.theme.typography.fontFamilyBase}),(function(n){return n.theme.fontSizes.s}),(function(n){return n.theme.colors.textLight}),(function(n){return n.theme.colors.paginationBackground}),(function(n){return n.theme.spacing.xxs}),(function(o){return o.active&&e(i||(i=n(["\n color: ",";\n background-color: ",";\n cursor: default;\n &:hover {\n background-color: ",";\n text-decoration: none;\n }\n "],["\n color: ",";\n background-color: ",";\n cursor: default;\n &:hover {\n background-color: ",";\n text-decoration: none;\n }\n "])),(function(n){return n.theme.colors.textDark}),(function(n){return n.theme.colors.paginationActive}),(function(n){return n.theme.colors.paginationActive}))}),(function(o){return("Prev"===o.name||"Next"===o.name)&&e(a||(a=n(["\n color: ",";\n background-color: transparent;\n font-weight: bold;\n padding: 8px 6px;\n background-color: transparent;\n &:hover {\n background-color: transparent;\n text-decoration: underline;\n }\n &:focus,\n &:active,\n &:visited {\n text-decoration: none;\n }\n "],["\n color: ",";\n background-color: transparent;\n font-weight: bold;\n padding: 8px 6px;\n background-color: transparent;\n &:hover {\n background-color: transparent;\n text-decoration: underline;\n }\n &:focus,\n &:active,\n &:visited {\n text-decoration: none;\n }\n "])),(function(n){var o=n.theme;return n.disabled?o.colors.disabled:o.colors.paginationText}))}),(function(o){return o.disabled&&e(c||(c=n(["\n color: $ ",";\n cursor: not-allowed;\n pointer-events:none\n text-decoration: none;\n &:hover,\n &:focus,\n &:active,\n &:visited {\n color: ",";\n text-decoration: none;\n }\n "],["\n color: $ ",";\n cursor: not-allowed;\n pointer-events:none\n text-decoration: none;\n &:hover,\n &:focus,\n &:active,\n &:visited {\n color: ",";\n text-decoration: none;\n }\n "])),(function(n){return n.theme.colors.disabled}),(function(n){return n.theme.colors.disabled}))})),f=o.li(l||(l=n(["\n display: none;\n &:first-child,\n &:last-child {\n display: inline;\n }\n @media (min-width: ",") {\n display: inline;\n }\n span {\n border: none;\n min-width: 30px;\n padding: 5px;\n margin: 1px;\n border-radius: 0;\n }\n"],["\n display: none;\n &:first-child,\n &:last-child {\n display: inline;\n }\n @media (min-width: ",") {\n display: inline;\n }\n span {\n border: none;\n min-width: 30px;\n padding: 5px;\n margin: 1px;\n border-radius: 0;\n }\n"])),(function(n){return n.theme.breakpoint.mobile}));export{f as PagerItem,p as PagerLink,u as PagerList,s as PagerWrapper};
2
2
  //# sourceMappingURL=styles.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cruk/cruk-react-components",
3
- "version": "1.2.1",
3
+ "version": "1.2.2",
4
4
  "description": "React components implementing CRUK and SU2C designs",
5
5
  "license": "UNLICENSED",
6
6
  "publishConfig": {
@@ -85,17 +85,17 @@
85
85
  "@reach/router": "^1.3.4",
86
86
  "@react-theming/storybook-addon": "^1.1.6",
87
87
  "@rollup/plugin-babel": "^5.0.0",
88
- "@rollup/plugin-commonjs": "^22.0.2",
88
+ "@rollup/plugin-commonjs": "^23.0.2",
89
89
  "@rollup/plugin-node-resolve": "^13.0.5",
90
90
  "@simonsmith/cypress-image-snapshot": "^5.0.4",
91
- "@storybook/addon-a11y": "6.5.9",
92
- "@storybook/addon-actions": "^6.5.9",
93
- "@storybook/addon-docs": "^6.5.9",
94
- "@storybook/addon-essentials": "^6.5.9",
95
- "@storybook/addon-links": "^6.5.9",
96
- "@storybook/builder-webpack5": "^6.5.9",
97
- "@storybook/manager-webpack5": "^6.5.9",
98
- "@storybook/react": "^6.5.9",
91
+ "@storybook/addon-a11y": "6.5.13",
92
+ "@storybook/addon-actions": "^6.5.13",
93
+ "@storybook/addon-docs": "^6.5.13",
94
+ "@storybook/addon-essentials": "^6.5.13",
95
+ "@storybook/addon-links": "^6.5.13",
96
+ "@storybook/builder-webpack5": "^6.5.13",
97
+ "@storybook/manager-webpack5": "^6.5.13",
98
+ "@storybook/react": "^6.5.13",
99
99
  "@types/assert": "^1.5.1",
100
100
  "@types/cypress-image-snapshot": "^3.1.6",
101
101
  "@types/jest": "^29.1.2",