@citygross/components 0.12.8 → 0.13.0
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/@types/components/LayoutBox/LayoutBox.d.ts +1 -0
- package/build/@types/components/LayoutBox/LayoutBox.styles.d.ts +1 -0
- package/build/@types/components/ProductHeader/ProductHeader.styles.d.ts +1 -0
- package/build/cjs/components/src/components/LayoutBox/LayoutBox.js +2 -2
- package/build/cjs/components/src/components/LayoutBox/LayoutBox.styles.js +5 -3
- package/build/cjs/components/src/components/LayoutBox/LayoutBox.styles.js.map +1 -1
- package/build/cjs/components/src/components/ProductHeader/ProductHeader.js +4 -3
- package/build/cjs/components/src/components/ProductHeader/ProductHeader.js.map +1 -1
- package/build/cjs/components/src/components/ProductHeader/ProductHeader.styles.js +16 -0
- package/build/cjs/components/src/components/ProductHeader/ProductHeader.styles.js.map +1 -0
- package/build/es/components/src/components/LayoutBox/LayoutBox.js +2 -2
- package/build/es/components/src/components/LayoutBox/LayoutBox.styles.js +5 -3
- package/build/es/components/src/components/LayoutBox/LayoutBox.styles.js.map +1 -1
- package/build/es/components/src/components/ProductHeader/ProductHeader.js +4 -3
- package/build/es/components/src/components/ProductHeader/ProductHeader.js.map +1 -1
- package/build/es/components/src/components/ProductHeader/ProductHeader.styles.js +8 -0
- package/build/es/components/src/components/ProductHeader/ProductHeader.styles.js.map +1 -0
- package/package.json +2 -2
|
@@ -4,6 +4,7 @@ declare type TLayoutBoxContainer = {
|
|
|
4
4
|
borderRadius?: number;
|
|
5
5
|
shadowInset?: boolean;
|
|
6
6
|
showOverflow?: boolean;
|
|
7
|
+
noShadow?: boolean;
|
|
7
8
|
};
|
|
8
9
|
export declare const LayoutBoxContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, TLayoutBoxContainer, never>;
|
|
9
10
|
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const Container: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
@@ -10,8 +10,8 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
10
10
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
11
11
|
|
|
12
12
|
var LayoutBox = function (_a) {
|
|
13
|
-
var background = _a.background, borderRadius = _a.borderRadius, shadowInset = _a.shadowInset, showOverflow = _a.showOverflow, children = _a.children;
|
|
14
|
-
return (React__default["default"].createElement(LayoutBox_styles.LayoutBoxContainer, { borderRadius: borderRadius, shadowInset: shadowInset, background: background || '#fff', showOverflow: showOverflow }, children));
|
|
13
|
+
var background = _a.background, borderRadius = _a.borderRadius, shadowInset = _a.shadowInset, showOverflow = _a.showOverflow, noShadow = _a.noShadow, children = _a.children;
|
|
14
|
+
return (React__default["default"].createElement(LayoutBox_styles.LayoutBoxContainer, { borderRadius: borderRadius, shadowInset: shadowInset, background: background || '#fff', showOverflow: showOverflow, noShadow: noShadow }, children));
|
|
15
15
|
};
|
|
16
16
|
|
|
17
17
|
exports.LayoutBox = LayoutBox;
|
|
@@ -11,9 +11,11 @@ var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
|
|
|
11
11
|
|
|
12
12
|
var LayoutBoxContainer = styled__default["default"].div(templateObject_1 || (templateObject_1 = _tslib.__makeTemplateObject(["\n background: ", ";\n box-shadow: ", ";\n overflow: ", ";\n @media (min-width: ", "px) {\n border-radius: ", "px;\n }\n"], ["\n background: ", ";\n box-shadow: ", ";\n overflow: ", ";\n @media (min-width: ", "px) {\n border-radius: ", "px;\n }\n"])), function (props) { return props.background; }, function (props) {
|
|
13
13
|
var _a, _b, _c, _d;
|
|
14
|
-
return props.
|
|
15
|
-
?
|
|
16
|
-
:
|
|
14
|
+
return props.noShadow
|
|
15
|
+
? 'none'
|
|
16
|
+
: props.shadowInset
|
|
17
|
+
? (_b = (_a = props.theme.attributes) === null || _a === void 0 ? void 0 : _a.boxShadow) === null || _b === void 0 ? void 0 : _b.layoutShadowInset
|
|
18
|
+
: (_d = (_c = props.theme.attributes) === null || _c === void 0 ? void 0 : _c.boxShadow) === null || _d === void 0 ? void 0 : _d.layoutShadow;
|
|
17
19
|
}, function (props) { return (props.showOverflow ? 'visible' : 'hidden'); }, function (props) { var _a; return (_a = props.theme.breakpoints) === null || _a === void 0 ? void 0 : _a.lg; }, function (props) { var _a; return props.borderRadius || ((_a = props.theme.attributes) === null || _a === void 0 ? void 0 : _a.borderRadius.small); });
|
|
18
20
|
var templateObject_1;
|
|
19
21
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LayoutBox.styles.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"LayoutBox.styles.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var React = require('react');
|
|
6
6
|
var typography = require('@citygross/typography');
|
|
7
7
|
var designTokens = require('@citygross/design-tokens');
|
|
8
|
+
var ProductHeader_styles = require('./ProductHeader.styles.js');
|
|
8
9
|
|
|
9
10
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
10
11
|
|
|
@@ -21,15 +22,15 @@ var ProductHeader = function (_a) {
|
|
|
21
22
|
var location = _a.location, subtitle = _a.subtitle, title = _a.title;
|
|
22
23
|
switch (location) {
|
|
23
24
|
case exports.EProductHeader.DETAIL_PAGE:
|
|
24
|
-
return (React__default["default"].createElement(
|
|
25
|
+
return (React__default["default"].createElement(ProductHeader_styles.Container, null,
|
|
25
26
|
React__default["default"].createElement(typography.H1, { color: (_b = designTokens.theme.palette) === null || _b === void 0 ? void 0 : _b.darkest }, title),
|
|
26
27
|
React__default["default"].createElement(typography.BodyText, { color: (_c = designTokens.theme.palette) === null || _c === void 0 ? void 0 : _c.darkest }, subtitle)));
|
|
27
28
|
case exports.EProductHeader.CARD:
|
|
28
|
-
return (React__default["default"].createElement(
|
|
29
|
+
return (React__default["default"].createElement(ProductHeader_styles.Container, null,
|
|
29
30
|
React__default["default"].createElement(typography.H3, { color: (_d = designTokens.theme.palette) === null || _d === void 0 ? void 0 : _d.darkest }, title),
|
|
30
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 }, subtitle)));
|
|
31
32
|
case exports.EProductHeader.LIST_ITEM:
|
|
32
|
-
return (React__default["default"].createElement(
|
|
33
|
+
return (React__default["default"].createElement(ProductHeader_styles.Container, 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
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 }, subtitle)));
|
|
35
36
|
default:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProductHeader.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ProductHeader.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var _tslib = require('../../../../_virtual/_tslib.js');
|
|
6
|
+
var styled = require('styled-components');
|
|
7
|
+
|
|
8
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
9
|
+
|
|
10
|
+
var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
|
|
11
|
+
|
|
12
|
+
var Container = styled__default["default"].div(templateObject_1 || (templateObject_1 = _tslib.__makeTemplateObject(["\n overflow-wrap: break-word;\n white-space: normal;\n word-break: break-word;\n"], ["\n overflow-wrap: break-word;\n white-space: normal;\n word-break: break-word;\n"])));
|
|
13
|
+
var templateObject_1;
|
|
14
|
+
|
|
15
|
+
exports.Container = Container;
|
|
16
|
+
//# sourceMappingURL=ProductHeader.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProductHeader.styles.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;"}
|
|
@@ -2,8 +2,8 @@ import React from 'react';
|
|
|
2
2
|
import { LayoutBoxContainer } from './LayoutBox.styles.js';
|
|
3
3
|
|
|
4
4
|
var LayoutBox = function (_a) {
|
|
5
|
-
var background = _a.background, borderRadius = _a.borderRadius, shadowInset = _a.shadowInset, showOverflow = _a.showOverflow, children = _a.children;
|
|
6
|
-
return (React.createElement(LayoutBoxContainer, { borderRadius: borderRadius, shadowInset: shadowInset, background: background || '#fff', showOverflow: showOverflow }, children));
|
|
5
|
+
var background = _a.background, borderRadius = _a.borderRadius, shadowInset = _a.shadowInset, showOverflow = _a.showOverflow, noShadow = _a.noShadow, children = _a.children;
|
|
6
|
+
return (React.createElement(LayoutBoxContainer, { borderRadius: borderRadius, shadowInset: shadowInset, background: background || '#fff', showOverflow: showOverflow, noShadow: noShadow }, children));
|
|
7
7
|
};
|
|
8
8
|
|
|
9
9
|
export { LayoutBox };
|
|
@@ -3,9 +3,11 @@ import styled from 'styled-components';
|
|
|
3
3
|
|
|
4
4
|
var LayoutBoxContainer = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n background: ", ";\n box-shadow: ", ";\n overflow: ", ";\n @media (min-width: ", "px) {\n border-radius: ", "px;\n }\n"], ["\n background: ", ";\n box-shadow: ", ";\n overflow: ", ";\n @media (min-width: ", "px) {\n border-radius: ", "px;\n }\n"])), function (props) { return props.background; }, function (props) {
|
|
5
5
|
var _a, _b, _c, _d;
|
|
6
|
-
return props.
|
|
7
|
-
?
|
|
8
|
-
:
|
|
6
|
+
return props.noShadow
|
|
7
|
+
? 'none'
|
|
8
|
+
: props.shadowInset
|
|
9
|
+
? (_b = (_a = props.theme.attributes) === null || _a === void 0 ? void 0 : _a.boxShadow) === null || _b === void 0 ? void 0 : _b.layoutShadowInset
|
|
10
|
+
: (_d = (_c = props.theme.attributes) === null || _c === void 0 ? void 0 : _c.boxShadow) === null || _d === void 0 ? void 0 : _d.layoutShadow;
|
|
9
11
|
}, function (props) { return (props.showOverflow ? 'visible' : 'hidden'); }, function (props) { var _a; return (_a = props.theme.breakpoints) === null || _a === void 0 ? void 0 : _a.lg; }, function (props) { var _a; return props.borderRadius || ((_a = props.theme.attributes) === null || _a === void 0 ? void 0 : _a.borderRadius.small); });
|
|
10
12
|
var templateObject_1;
|
|
11
13
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LayoutBox.styles.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"LayoutBox.styles.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { BodyText, TextTypes, H3, H1 } from '@citygross/typography';
|
|
3
3
|
import { theme } from '@citygross/design-tokens';
|
|
4
|
+
import { Container } from './ProductHeader.styles.js';
|
|
4
5
|
|
|
5
6
|
var EProductHeader;
|
|
6
7
|
(function (EProductHeader) {
|
|
@@ -13,15 +14,15 @@ var ProductHeader = function (_a) {
|
|
|
13
14
|
var location = _a.location, subtitle = _a.subtitle, title = _a.title;
|
|
14
15
|
switch (location) {
|
|
15
16
|
case EProductHeader.DETAIL_PAGE:
|
|
16
|
-
return (React.createElement(
|
|
17
|
+
return (React.createElement(Container, null,
|
|
17
18
|
React.createElement(H1, { color: (_b = theme.palette) === null || _b === void 0 ? void 0 : _b.darkest }, title),
|
|
18
19
|
React.createElement(BodyText, { color: (_c = theme.palette) === null || _c === void 0 ? void 0 : _c.darkest }, subtitle)));
|
|
19
20
|
case EProductHeader.CARD:
|
|
20
|
-
return (React.createElement(
|
|
21
|
+
return (React.createElement(Container, null,
|
|
21
22
|
React.createElement(H3, { color: (_d = theme.palette) === null || _d === void 0 ? void 0 : _d.darkest }, title),
|
|
22
23
|
React.createElement(BodyText, { color: (_e = theme.palette) === null || _e === void 0 ? void 0 : _e.darkest, size: TextTypes.TextSize.EXTRASMALL }, subtitle)));
|
|
23
24
|
case EProductHeader.LIST_ITEM:
|
|
24
|
-
return (React.createElement(
|
|
25
|
+
return (React.createElement(Container, null,
|
|
25
26
|
React.createElement(BodyText, { color: (_f = theme.palette) === null || _f === void 0 ? void 0 : _f.darkest, fontWeight: "medium", size: TextTypes.TextSize.REGULAR }, title),
|
|
26
27
|
React.createElement(BodyText, { color: (_g = theme.palette) === null || _g === void 0 ? void 0 : _g.darkest, size: TextTypes.TextSize.EXTRASMALL }, subtitle)));
|
|
27
28
|
default:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProductHeader.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ProductHeader.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { __makeTemplateObject } from '../../../../_virtual/_tslib.js';
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
|
|
4
|
+
var Container = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n overflow-wrap: break-word;\n white-space: normal;\n word-break: break-word;\n"], ["\n overflow-wrap: break-word;\n white-space: normal;\n word-break: break-word;\n"])));
|
|
5
|
+
var templateObject_1;
|
|
6
|
+
|
|
7
|
+
export { Container };
|
|
8
|
+
//# sourceMappingURL=ProductHeader.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProductHeader.styles.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@citygross/components",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.0",
|
|
4
4
|
"license": "ISC",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "./build/cjs/components/src/index.js",
|
|
@@ -75,5 +75,5 @@
|
|
|
75
75
|
"react-slick": "^0.30.1",
|
|
76
76
|
"slick-carousel": "^1.8.1"
|
|
77
77
|
},
|
|
78
|
-
"gitHead": "
|
|
78
|
+
"gitHead": "0ddcceef79194e6a4441ae48b7b0d87f064aff73"
|
|
79
79
|
}
|