@citygross/components 0.12.0 → 0.12.3

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 (67) hide show
  1. package/build/@types/components/CartSummary/CartSummary.d.ts +2 -5
  2. package/build/@types/components/CartSummary/CartSummary.styles.d.ts +2 -5
  3. package/build/@types/components/CgButton/CgButton.d.ts +1 -4
  4. package/build/@types/components/CgButton/CgButton.styles.d.ts +0 -1
  5. package/build/@types/components/CgButton/CgButton.types.d.ts +3 -5
  6. package/build/@types/components/ListItem/ListItem.d.ts +0 -9
  7. package/build/@types/components/ListItem/ListItem.styles.d.ts +0 -1
  8. package/build/@types/components/Pagination/Pagination.d.ts +6 -5
  9. package/build/@types/components/Pagination/Pagination.styles.d.ts +7 -5
  10. package/build/@types/components/ProductHeader/ProductHeader.d.ts +1 -1
  11. package/build/cjs/components/src/components/AddressBlock/AddressBlock.js +2 -2
  12. package/build/cjs/components/src/components/CartCard/assets/fallback_grocery.svg.js +1 -1
  13. package/build/cjs/components/src/components/CartItemSummary/CartItemSummary.js +1 -1
  14. package/build/cjs/components/src/components/CartSummary/CartSummary.js +34 -43
  15. package/build/cjs/components/src/components/CartSummary/CartSummary.js.map +1 -1
  16. package/build/cjs/components/src/components/CartSummary/CartSummary.styles.js +9 -15
  17. package/build/cjs/components/src/components/CartSummary/CartSummary.styles.js.map +1 -1
  18. package/build/cjs/components/src/components/CgButton/CgButton.js +3 -4
  19. package/build/cjs/components/src/components/CgButton/CgButton.js.map +1 -1
  20. package/build/cjs/components/src/components/CgButton/CgButton.styles.js +6 -44
  21. package/build/cjs/components/src/components/CgButton/CgButton.styles.js.map +1 -1
  22. package/build/cjs/components/src/components/FormElements/Checkbox/Checkbox.styles.js +4 -6
  23. package/build/cjs/components/src/components/FormElements/Checkbox/Checkbox.styles.js.map +1 -1
  24. package/build/cjs/components/src/components/ListItem/ListItem.js +4 -11
  25. package/build/cjs/components/src/components/ListItem/ListItem.js.map +1 -1
  26. package/build/cjs/components/src/components/ListItem/ListItem.styles.js +1 -3
  27. package/build/cjs/components/src/components/ListItem/ListItem.styles.js.map +1 -1
  28. package/build/cjs/components/src/components/ListItem/assets/fallback_grocery.svg.js +1 -1
  29. package/build/cjs/components/src/components/Pagination/Pagination.js +40 -38
  30. package/build/cjs/components/src/components/Pagination/Pagination.js.map +1 -1
  31. package/build/cjs/components/src/components/Pagination/Pagination.styles.js +6 -6
  32. package/build/cjs/components/src/components/ProductHeader/ProductHeader.js +5 -4
  33. package/build/cjs/components/src/components/ProductHeader/ProductHeader.js.map +1 -1
  34. package/build/cjs/components/src/components/WarningLabel/WarningLabel.js +2 -2
  35. package/build/cjs/design-tokens/build/index.js +268 -267
  36. package/build/cjs/design-tokens/build/index.js.map +1 -1
  37. package/build/cjs/utils/build/index.js +476 -476
  38. package/build/cjs/utils/build/index.js.map +1 -1
  39. package/build/es/components/src/components/AddressBlock/AddressBlock.js +2 -2
  40. package/build/es/components/src/components/CartCard/assets/fallback_grocery.svg.js +1 -1
  41. package/build/es/components/src/components/CartItemSummary/CartItemSummary.js +1 -1
  42. package/build/es/components/src/components/CartSummary/CartSummary.js +37 -46
  43. package/build/es/components/src/components/CartSummary/CartSummary.js.map +1 -1
  44. package/build/es/components/src/components/CartSummary/CartSummary.styles.js +8 -11
  45. package/build/es/components/src/components/CartSummary/CartSummary.styles.js.map +1 -1
  46. package/build/es/components/src/components/CgButton/CgButton.js +4 -5
  47. package/build/es/components/src/components/CgButton/CgButton.js.map +1 -1
  48. package/build/es/components/src/components/CgButton/CgButton.styles.js +7 -44
  49. package/build/es/components/src/components/CgButton/CgButton.styles.js.map +1 -1
  50. package/build/es/components/src/components/FormElements/Checkbox/Checkbox.styles.js +5 -7
  51. package/build/es/components/src/components/FormElements/Checkbox/Checkbox.styles.js.map +1 -1
  52. package/build/es/components/src/components/ListItem/ListItem.js +6 -13
  53. package/build/es/components/src/components/ListItem/ListItem.js.map +1 -1
  54. package/build/es/components/src/components/ListItem/ListItem.styles.js +2 -3
  55. package/build/es/components/src/components/ListItem/ListItem.styles.js.map +1 -1
  56. package/build/es/components/src/components/ListItem/assets/fallback_grocery.svg.js +1 -1
  57. package/build/es/components/src/components/Pagination/Pagination.js +42 -40
  58. package/build/es/components/src/components/Pagination/Pagination.js.map +1 -1
  59. package/build/es/components/src/components/Pagination/Pagination.styles.js +4 -4
  60. package/build/es/components/src/components/ProductHeader/ProductHeader.js +5 -4
  61. package/build/es/components/src/components/ProductHeader/ProductHeader.js.map +1 -1
  62. package/build/es/components/src/components/WarningLabel/WarningLabel.js +2 -2
  63. package/build/es/design-tokens/build/index.js +268 -267
  64. package/build/es/design-tokens/build/index.js.map +1 -1
  65. package/build/es/utils/build/index.js +476 -476
  66. package/build/es/utils/build/index.js.map +1 -1
  67. package/package.json +2 -2
@@ -1 +1 @@
1
- {"version":3,"file":"ListItem.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"ListItem.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -42,10 +42,8 @@ var ListImage = styled__default["default"].img(templateObject_6 || (templateObje
42
42
  ? (_a = props.theme.constants) === null || _a === void 0 ? void 0 : _a.listImageMaxHeightSmall
43
43
  : (_b = props.theme.constants) === null || _b === void 0 ? void 0 : _b.listImageMaxHeight, "px");
44
44
  });
45
- var CheckboxContainer = styled__default["default"].div(templateObject_7 || (templateObject_7 = _tslib.__makeTemplateObject(["\n display: flex;\n flex-direction: column;\n gap: ", "px;\n margin-top: ", "px;\n\n @media (min-width: ", "px) {\n flex-direction: row;\n gap: ", "px;\n }\n"], ["\n display: flex;\n flex-direction: column;\n gap: ", "px;\n margin-top: ", "px;\n\n @media (min-width: ", "px) {\n flex-direction: row;\n gap: ", "px;\n }\n"])), function (props) { var _a; return (_a = props.theme.spacings) === null || _a === void 0 ? void 0 : _a.xs; }, function (props) { var _a; return (_a = props.theme.spacings) === null || _a === void 0 ? void 0 : _a.sm; }, function (props) { var _a; return (_a = props.theme.breakpoints) === null || _a === void 0 ? void 0 : _a.xs; }, function (props) { var _a; return (_a = props.theme.spacings) === null || _a === void 0 ? void 0 : _a.md; });
46
- var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7;
45
+ var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6;
47
46
 
48
- exports.CheckboxContainer = CheckboxContainer;
49
47
  exports.ItemInformationContainer = ItemInformationContainer;
50
48
  exports.ListImage = ListImage;
51
49
  exports.ListImageContainer = ListImageContainer;
@@ -1 +1 @@
1
- {"version":3,"file":"ListItem.styles.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"ListItem.styles.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var FallbackIcon = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<svg width=\"128px\" height=\"124px\" viewBox=\"0 0 128 124\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n <!-- Generator: Sketch 52.4 (67378) - http://www.bohemiancoding.com/sketch -->\n <title>shopping_cart_loaded</title>\n <desc>Created with Sketch.</desc>\n <g id=\"Page-1\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n <g id=\"Artboard\" transform=\"translate(-100.000000, -53.000000)\">\n <g id=\"shopping_cart_loaded\" transform=\"translate(100.000000, 53.000000)\">\n <polygon id=\"Rectangle\" fill=\"#D8D8D8\" transform=\"translate(89.585472, 37.151291) rotate(45.000000) translate(-89.585472, -37.151291) \" points=\"69.9549199 17.5207389 109.199991 17.536771 109.216023 56.7818423 69.970952 56.7658102\"></polygon>\n <polygon id=\"Rectangle\" fill=\"#D1D1D1\" transform=\"translate(61.784256, 30.970598) rotate(45.000000) translate(-61.784256, -30.970598) \" points=\"39.9897062 9.17604823 83.5610058 9.19384764 83.5788052 52.7651473 40.0075056 52.7473478\"></polygon>\n <g id=\"Group\" transform=\"translate(6.000000, 12.000000)\" fill=\"#E8E8E8\">\n <path d=\"M40.2213256,80.6 C36.8179827,80.6 34.0334294,77.81 34.0334294,74.4 L34.0334294,43.4 L21.6576369,43.4 L21.6576369,74.4 C21.6576369,84.63 30.0112968,93 40.2213256,93 L99.0063401,93 L99.0063401,80.6 L40.2213256,80.6 Z\" id=\"Path\"></path>\n <path d=\"M24.1327954,12.4 L22.8952161,8.37 C21.0388473,3.41 16.3979251,0 11.1382133,0 L0,0 L0,12.4 L11.1382133,12.4 L28.154928,63.86 C29.0831124,66.34 31.2488761,68.2 34.0334294,68.2 L92.8184438,68.2 C95.2936023,68.2 97.459366,66.65 98.3875504,64.48 L121.901556,12.4 L24.1327954,12.4 Z\" id=\"Path\"></path>\n </g>\n <ellipse id=\"Oval\" fill=\"#D8D8D8\" cx=\"6\" cy=\"18.5\" rx=\"6\" ry=\"6.5\"></ellipse>\n <g id=\"Group\" transform=\"translate(40.000000, 105.000000)\" fill=\"#D8D8D8\">\n <ellipse id=\"Oval\" cx=\"55.7142857\" cy=\"9.5\" rx=\"9.28571429\" ry=\"9.5\"></ellipse>\n <ellipse id=\"Oval\" cx=\"9.28571429\" cy=\"9.5\" rx=\"9.28571429\" ry=\"9.5\"></ellipse>\n </g>\n <g id=\"Group\" transform=\"translate(46.000000, 112.000000)\" fill=\"#D1D1D1\">\n <ellipse id=\"Oval\" cx=\"49.8823529\" cy=\"3\" rx=\"3.11764706\" ry=\"3\"></ellipse>\n <ellipse id=\"Oval\" cx=\"3.11764706\" cy=\"3\" rx=\"3.11764706\" ry=\"3\"></ellipse>\n </g>\n </g>\n </g>\n </g>\n</svg>";
3
+ var FallbackIcon = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<svg width=\"128px\" height=\"124px\" viewBox=\"0 0 128 124\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\r\n <!-- Generator: Sketch 52.4 (67378) - http://www.bohemiancoding.com/sketch -->\r\n <title>shopping_cart_loaded</title>\r\n <desc>Created with Sketch.</desc>\r\n <g id=\"Page-1\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\r\n <g id=\"Artboard\" transform=\"translate(-100.000000, -53.000000)\">\r\n <g id=\"shopping_cart_loaded\" transform=\"translate(100.000000, 53.000000)\">\r\n <polygon id=\"Rectangle\" fill=\"#D8D8D8\" transform=\"translate(89.585472, 37.151291) rotate(45.000000) translate(-89.585472, -37.151291) \" points=\"69.9549199 17.5207389 109.199991 17.536771 109.216023 56.7818423 69.970952 56.7658102\"></polygon>\r\n <polygon id=\"Rectangle\" fill=\"#D1D1D1\" transform=\"translate(61.784256, 30.970598) rotate(45.000000) translate(-61.784256, -30.970598) \" points=\"39.9897062 9.17604823 83.5610058 9.19384764 83.5788052 52.7651473 40.0075056 52.7473478\"></polygon>\r\n <g id=\"Group\" transform=\"translate(6.000000, 12.000000)\" fill=\"#E8E8E8\">\r\n <path d=\"M40.2213256,80.6 C36.8179827,80.6 34.0334294,77.81 34.0334294,74.4 L34.0334294,43.4 L21.6576369,43.4 L21.6576369,74.4 C21.6576369,84.63 30.0112968,93 40.2213256,93 L99.0063401,93 L99.0063401,80.6 L40.2213256,80.6 Z\" id=\"Path\"></path>\r\n <path d=\"M24.1327954,12.4 L22.8952161,8.37 C21.0388473,3.41 16.3979251,0 11.1382133,0 L0,0 L0,12.4 L11.1382133,12.4 L28.154928,63.86 C29.0831124,66.34 31.2488761,68.2 34.0334294,68.2 L92.8184438,68.2 C95.2936023,68.2 97.459366,66.65 98.3875504,64.48 L121.901556,12.4 L24.1327954,12.4 Z\" id=\"Path\"></path>\r\n </g>\r\n <ellipse id=\"Oval\" fill=\"#D8D8D8\" cx=\"6\" cy=\"18.5\" rx=\"6\" ry=\"6.5\"></ellipse>\r\n <g id=\"Group\" transform=\"translate(40.000000, 105.000000)\" fill=\"#D8D8D8\">\r\n <ellipse id=\"Oval\" cx=\"55.7142857\" cy=\"9.5\" rx=\"9.28571429\" ry=\"9.5\"></ellipse>\r\n <ellipse id=\"Oval\" cx=\"9.28571429\" cy=\"9.5\" rx=\"9.28571429\" ry=\"9.5\"></ellipse>\r\n </g>\r\n <g id=\"Group\" transform=\"translate(46.000000, 112.000000)\" fill=\"#D1D1D1\">\r\n <ellipse id=\"Oval\" cx=\"49.8823529\" cy=\"3\" rx=\"3.11764706\" ry=\"3\"></ellipse>\r\n <ellipse id=\"Oval\" cx=\"3.11764706\" cy=\"3\" rx=\"3.11764706\" ry=\"3\"></ellipse>\r\n </g>\r\n </g>\r\n </g>\r\n </g>\r\n</svg>";
4
4
 
5
5
  module.exports = FallbackIcon;
6
6
  //# sourceMappingURL=fallback_grocery.svg.js.map
@@ -3,53 +3,55 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var React = require('react');
6
- var icons = require('@citygross/icons');
7
- var typography = require('@citygross/typography');
8
- var designTokens = require('@citygross/design-tokens');
6
+ var PaginationButton = require('../Button/PaginationButton.js');
7
+ var Box = require('../Box/Box.js');
9
8
  var Pagination_styles = require('./Pagination.styles.js');
10
9
 
11
10
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
12
11
 
13
12
  var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
14
13
 
15
- function Pagination(_a) {
16
- var _b, _c, _d, _e;
17
- var totalItems = _a.totalItems, currentPage = _a.currentPage, fetchItems = _a.fetchItems, _f = _a.itemsPerPage, itemsPerPage = _f === void 0 ? 10 : _f, setPage = _a.setPage, _g = _a.pageLabel, pageLabel = _g === void 0 ? 'Sida' : _g, onPageChange = _a.onPageChange;
18
- var totalPages = Math.ceil((totalItems || 0) / itemsPerPage);
19
- var hasNextPage = currentPage < totalPages;
20
- var hasPrevPage = currentPage > 1;
21
- var handlePrev = function () {
22
- if (hasPrevPage) {
23
- var newPage = currentPage - 1;
24
- setPage && setPage(newPage);
25
- fetchItems(newPage);
26
- onPageChange && onPageChange(newPage);
14
+ function createPagination(totalItems, itemsPerPage, numOfPaginationsToShow) {
15
+ var amountOfPages = Math.ceil((totalItems || 0) / (itemsPerPage !== null && itemsPerPage !== void 0 ? itemsPerPage : 6));
16
+ if (amountOfPages === 0 || itemsPerPage === 0) {
17
+ return [];
18
+ }
19
+ var pagination = [];
20
+ var block = [];
21
+ var counter = 0;
22
+ new Array(amountOfPages).fill(0).map(function (_, index) {
23
+ if (counter < (numOfPaginationsToShow !== null && numOfPaginationsToShow !== void 0 ? numOfPaginationsToShow : 4) - 1) {
24
+ counter++;
25
+ block.push(index);
26
+ if (index === amountOfPages - 1) {
27
+ pagination.push(block);
28
+ }
27
29
  }
28
- };
29
- var handleNext = function () {
30
- if (hasNextPage) {
31
- var newPage = currentPage + 1;
32
- setPage && setPage(newPage);
33
- fetchItems(newPage);
34
- onPageChange && onPageChange(newPage);
30
+ else {
31
+ counter = 0;
32
+ block.push(index);
33
+ pagination.push(block);
34
+ block = [];
35
35
  }
36
- };
37
- if (totalPages === 0) {
38
36
  return null;
39
- }
40
- return (React__default["default"].createElement("nav", { "aria-labelledby": "pagination_heading" },
41
- React__default["default"].createElement(Pagination_styles.PaginationContainer, null,
42
- React__default["default"].createElement(Pagination_styles.ArrowButton, { onClick: handlePrev, disabled: !hasPrevPage, "aria-disabled": !hasPrevPage, "aria-label": "F\u00F6reg\u00E5ende sida" },
43
- React__default["default"].createElement(icons.Icons.ChevronLeft, { width: 20, height: 20, color: !hasPrevPage ? (_b = designTokens.theme.palette) === null || _b === void 0 ? void 0 : _b.placeholder : (_c = designTokens.theme.palette) === null || _c === void 0 ? void 0 : _c.darkest })),
44
- React__default["default"].createElement(Pagination_styles.PageInfo, null,
45
- React__default["default"].createElement(typography.BodyText, { id: "pagination_heading", "aria-live": "polite" },
46
- pageLabel,
47
- " ",
48
- currentPage,
49
- " av ",
50
- totalPages)),
51
- React__default["default"].createElement(Pagination_styles.ArrowButton, { onClick: handleNext, disabled: !hasNextPage, "aria-disabled": !hasNextPage, "aria-label": "N\u00E4sta sida" },
52
- React__default["default"].createElement(icons.Icons.ChevronRight, { width: 20, height: 20, color: !hasNextPage ? (_d = designTokens.theme.palette) === null || _d === void 0 ? void 0 : _d.placeholder : (_e = designTokens.theme.palette) === null || _e === void 0 ? void 0 : _e.darkest })))));
37
+ });
38
+ return pagination;
39
+ }
40
+ function Pagination(_a) {
41
+ var _b;
42
+ var totalItems = _a.totalItems, currentPage = _a.currentPage, fetchItems = _a.fetchItems, itemsPerPage = _a.itemsPerPage, setPage = _a.setPage, _c = _a.numOfPaginationsToShow, numOfPaginationsToShow = _c === void 0 ? 4 : _c, rightIcon = _a.rightIcon, leftIcon = _a.leftIcon;
43
+ var _d = React.useState(Math.floor((currentPage - 1) / numOfPaginationsToShow)), currentIndex = _d[0], setIndex = _d[1];
44
+ var pagination = createPagination(totalItems, itemsPerPage, numOfPaginationsToShow);
45
+ return (React__default["default"].createElement(Box.Box, null, pagination && pagination.length > 0 && (React__default["default"].createElement(Pagination_styles.Flex, null,
46
+ currentIndex > 0 && (React__default["default"].createElement(Pagination_styles.LeftPaginationButtonWrapper, null,
47
+ React__default["default"].createElement(PaginationButton.PaginationButton, { color: 'white', onClick: function () {
48
+ setPage && setPage(currentPage - 1);
49
+ setIndex(currentIndex - 1);
50
+ }, width: 36, height: 36 }, leftIcon || '...'))), (_b = pagination === null || pagination === void 0 ? void 0 : pagination[currentIndex]) === null || _b === void 0 ? void 0 :
51
+ _b.map(function (page) { return (React__default["default"].createElement(Pagination_styles.PaginationButtonWrapper, { key: page },
52
+ React__default["default"].createElement(PaginationButton.PaginationButton, { color: currentPage === page + 1 ? 'primary' : 'white', width: 36, height: 36, onClick: function () { return fetchItems(page + 1); } }, page + 1))); }),
53
+ pagination.length > 1 && currentIndex < pagination.length - 1 && (React__default["default"].createElement(Pagination_styles.PaginationButtonWrapper, null,
54
+ React__default["default"].createElement(PaginationButton.PaginationButton, { color: 'white', onClick: function () { return setIndex(currentIndex + 1); }, width: 36, height: 36 }, rightIcon || '...')))))));
53
55
  }
54
56
 
55
57
  exports.Pagination = Pagination;
@@ -1 +1 @@
1
- {"version":3,"file":"Pagination.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"Pagination.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -9,12 +9,12 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
9
9
 
10
10
  var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
11
11
 
12
- var PaginationContainer = styled__default["default"].div(templateObject_1 || (templateObject_1 = _tslib.__makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: center;\n gap: ", "px;\n"], ["\n display: flex;\n align-items: center;\n justify-content: center;\n gap: ", "px;\n"])), function (props) { var _a; return (_a = props.theme.spacings) === null || _a === void 0 ? void 0 : _a.md; });
13
- var ArrowButton = styled__default["default"].button(templateObject_2 || (templateObject_2 = _tslib.__makeTemplateObject(["\n background: none;\n border: 1px solid transparent;\n border-radius: ", ";\n padding: 0;\n width: 36px;\n height: 36px;\n cursor: ", ";\n display: flex;\n align-items: center;\n justify-content: center;\n transition: border-color 0.2s ease;\n\n &:hover:not(:disabled):not([aria-disabled='true']) {\n border-color: ", ";\n }\n\n &:focus {\n outline: 2px solid ", ";\n outline-offset: 2px;\n border-radius: ", ";\n }\n\n &:focus:not(:focus-visible) {\n outline: none;\n }\n\n &:disabled,\n &[aria-disabled='true'] {\n cursor: not-allowed;\n }\n"], ["\n background: none;\n border: 1px solid transparent;\n border-radius: ", ";\n padding: 0;\n width: 36px;\n height: 36px;\n cursor: ", ";\n display: flex;\n align-items: center;\n justify-content: center;\n transition: border-color 0.2s ease;\n\n &:hover:not(:disabled):not([aria-disabled='true']) {\n border-color: ", ";\n }\n\n &:focus {\n outline: 2px solid ", ";\n outline-offset: 2px;\n border-radius: ", ";\n }\n\n &:focus:not(:focus-visible) {\n outline: none;\n }\n\n &:disabled,\n &[aria-disabled='true'] {\n cursor: not-allowed;\n }\n"])), function (props) { var _a; return (_a = props.theme.attributes) === null || _a === void 0 ? void 0 : _a.borderRadius.circle; }, function (props) { return (props.disabled ? 'not-allowed' : 'pointer'); }, function (props) { var _a; return (_a = props.theme.palette) === null || _a === void 0 ? void 0 : _a.placeholder; }, function (props) { var _a; return (_a = props.theme.palette) === null || _a === void 0 ? void 0 : _a.black; }, function (props) { var _a; return (_a = props.theme.attributes) === null || _a === void 0 ? void 0 : _a.borderRadius.circle; });
14
- var PageInfo = styled__default["default"].div(templateObject_3 || (templateObject_3 = _tslib.__makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: center;\n"], ["\n display: flex;\n align-items: center;\n justify-content: center;\n"])));
12
+ var PaginationButtonWrapper = styled__default["default"].div(templateObject_1 || (templateObject_1 = _tslib.__makeTemplateObject(["\n padding: 0 ", "px;\n"], ["\n padding: 0 ", "px;\n"])), function (props) { var _a; return (_a = props.theme.spacings) === null || _a === void 0 ? void 0 : _a.xxs; });
13
+ var LeftPaginationButtonWrapper = styled__default["default"](PaginationButtonWrapper)(templateObject_2 || (templateObject_2 = _tslib.__makeTemplateObject(["\n padding: 0 ", "px;\n width: ", "px;\n"], ["\n padding: 0 ", "px;\n width: ", "px;\n"])), function (props) { var _a; return (_a = props.theme.spacings) === null || _a === void 0 ? void 0 : _a.xxs; }, function (props) { var _a, _b; return (_b = (_a = props.theme) === null || _a === void 0 ? void 0 : _a.constants) === null || _b === void 0 ? void 0 : _b.paginationButtonWidth; });
14
+ var Flex = styled__default["default"].div(templateObject_3 || (templateObject_3 = _tslib.__makeTemplateObject(["\n display: flex;\n align-items: flex-start;\n justify-content: center;\n"], ["\n display: flex;\n align-items: flex-start;\n justify-content: center;\n"])));
15
15
  var templateObject_1, templateObject_2, templateObject_3;
16
16
 
17
- exports.ArrowButton = ArrowButton;
18
- exports.PageInfo = PageInfo;
19
- exports.PaginationContainer = PaginationContainer;
17
+ exports.Flex = Flex;
18
+ exports.LeftPaginationButtonWrapper = LeftPaginationButtonWrapper;
19
+ exports.PaginationButtonWrapper = PaginationButtonWrapper;
20
20
  //# sourceMappingURL=Pagination.styles.js.map
@@ -18,20 +18,21 @@ exports.EProductHeader = void 0;
18
18
  })(exports.EProductHeader || (exports.EProductHeader = {}));
19
19
  var ProductHeader = function (_a) {
20
20
  var _b, _c, _d, _e, _f, _g;
21
- var description = _a.description, location = _a.location, title = _a.title;
21
+ var location = _a.location, subTitle = _a.subTitle, title = _a.title;
22
+ var subTitleUpperCase = subTitle === null || subTitle === void 0 ? void 0 : subTitle.toUpperCase();
22
23
  switch (location) {
23
24
  case exports.EProductHeader.DETAIL_PAGE:
24
25
  return (React__default["default"].createElement("div", null,
25
26
  React__default["default"].createElement(typography.H1, { color: (_b = designTokens.theme.palette) === null || _b === void 0 ? void 0 : _b.darkest }, title),
26
- React__default["default"].createElement(typography.BodyText, { color: (_c = designTokens.theme.palette) === null || _c === void 0 ? void 0 : _c.darkest }, description)));
27
+ React__default["default"].createElement(typography.BodyText, { color: (_c = designTokens.theme.palette) === null || _c === void 0 ? void 0 : _c.darkest }, subTitleUpperCase)));
27
28
  case exports.EProductHeader.CARD:
28
29
  return (React__default["default"].createElement("div", null,
29
30
  React__default["default"].createElement(typography.H3, { color: (_d = designTokens.theme.palette) === null || _d === void 0 ? void 0 : _d.darkest }, title),
30
- React__default["default"].createElement(typography.BodyText, { color: (_e = designTokens.theme.palette) === null || _e === void 0 ? void 0 : _e.darkest, size: typography.TextTypes.TextSize.EXTRASMALL }, description)));
31
+ React__default["default"].createElement(typography.BodyText, { color: (_e = designTokens.theme.palette) === null || _e === void 0 ? void 0 : _e.darkest, size: typography.TextTypes.TextSize.EXTRASMALL }, subTitleUpperCase)));
31
32
  case exports.EProductHeader.LIST_ITEM:
32
33
  return (React__default["default"].createElement("div", null,
33
34
  React__default["default"].createElement(typography.BodyText, { color: (_f = designTokens.theme.palette) === null || _f === void 0 ? void 0 : _f.darkest, fontWeight: "medium", size: typography.TextTypes.TextSize.REGULAR }, title),
34
- React__default["default"].createElement(typography.BodyText, { color: (_g = designTokens.theme.palette) === null || _g === void 0 ? void 0 : _g.darkest, size: typography.TextTypes.TextSize.EXTRASMALL }, description)));
35
+ React__default["default"].createElement(typography.BodyText, { color: (_g = designTokens.theme.palette) === null || _g === void 0 ? void 0 : _g.darkest, size: typography.TextTypes.TextSize.EXTRASMALL }, subTitleUpperCase)));
35
36
  default:
36
37
  return null;
37
38
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ProductHeader.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"ProductHeader.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -25,7 +25,7 @@ require('@citygross/utils');
25
25
  require('react-loading-skeleton');
26
26
  require('../CartItemSummary/CartItemSummary.styles.js');
27
27
  require('../CartSubTotal/CartSubTotal.js');
28
- require('../ToolTipDialog/ToolTipDialog.styles.js');
28
+ require('../Divider/Divider.styles.js');
29
29
  require('../CartSummary/CartSummary.styles.js');
30
30
  require('../../../../design-tokens/build/index.js');
31
31
  require('../CgButton/ButtonAsLink/ButtonAsLink.styles.js');
@@ -38,7 +38,6 @@ require('../CustomerInfoBlock/CustomerInfoBlock.styles.js');
38
38
  require('../DateBox/DateBox.styles.js');
39
39
  require('../DeliverySlotItem/DeliverySlotItem.styles.js');
40
40
  require('../DeliveryTimeBlock/DeliveryTimeBlock.styles.js');
41
- require('../Divider/Divider.styles.js');
42
41
  require('../DotIndicator/DotIndicator.styles.js');
43
42
  require('../Flex/Flex.styles.js');
44
43
  require('../Form/Form.styles.js');
@@ -102,6 +101,7 @@ require('../StepperMobile/StepperMobile.styles.js');
102
101
  require('../Table/Table.styles.js');
103
102
  require('../Tag/Tag.styles.js');
104
103
  require('../Timeline/Timeline.styles.js');
104
+ require('../ToolTipDialog/ToolTipDialog.styles.js');
105
105
  require('../UnorderedList/UnorderedList.styles.js');
106
106
  var WarningLabel_styles = require('./WarningLabel.styles.js');
107
107
  require('../ZipCodeInput/ZipCodeInput.styles.js');