@citygross/components 0.8.42 → 0.8.44
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/Box/Box.d.ts +2 -1
- package/build/@types/components/Box/Box.styles.d.ts +1 -0
- package/build/cjs/components/src/components/Box/Box.js +2 -2
- package/build/cjs/components/src/components/Box/Box.styles.js +7 -1
- package/build/cjs/components/src/components/Box/Box.styles.js.map +1 -1
- package/build/cjs/utils/build/index.js +2 -2
- package/build/cjs/utils/build/index.js.map +1 -1
- package/build/es/components/src/components/Box/Box.js +2 -2
- package/build/es/components/src/components/Box/Box.styles.js +7 -1
- package/build/es/components/src/components/Box/Box.styles.js.map +1 -1
- package/build/es/utils/build/index.js +2 -2
- package/build/es/utils/build/index.js.map +1 -1
- package/package.json +3 -3
|
@@ -3,9 +3,10 @@ export declare type TBox = {
|
|
|
3
3
|
background?: string;
|
|
4
4
|
rounded?: boolean;
|
|
5
5
|
padding?: number;
|
|
6
|
+
paddingVertical?: number;
|
|
6
7
|
children: React.ReactNode;
|
|
7
8
|
withArrow?: boolean;
|
|
8
9
|
arrowSpacing?: number;
|
|
9
10
|
arrowPlacement?: 'left' | 'right';
|
|
10
11
|
};
|
|
11
|
-
export declare function Box({ background, rounded, padding, arrowSpacing, arrowPlacement, withArrow, children, ...props }: TBox): JSX.Element;
|
|
12
|
+
export declare function Box({ background, rounded, padding, arrowSpacing, arrowPlacement, withArrow, paddingVertical, children, ...props }: TBox): JSX.Element;
|
|
@@ -2,6 +2,7 @@ declare type TBoxContainer = {
|
|
|
2
2
|
background: string;
|
|
3
3
|
rounded?: boolean;
|
|
4
4
|
padding?: number;
|
|
5
|
+
paddingVertical?: number;
|
|
5
6
|
};
|
|
6
7
|
export declare const BoxContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, TBoxContainer, never>;
|
|
7
8
|
export {};
|
|
@@ -12,10 +12,10 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
12
12
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
13
13
|
|
|
14
14
|
function Box(_a) {
|
|
15
|
-
var background = _a.background, _b = _a.rounded, rounded = _b === void 0 ? true : _b, padding = _a.padding, arrowSpacing = _a.arrowSpacing, arrowPlacement = _a.arrowPlacement, withArrow = _a.withArrow, children = _a.children, props = _tslib.__rest(_a, ["background", "rounded", "padding", "arrowSpacing", "arrowPlacement", "withArrow", "children"]);
|
|
15
|
+
var background = _a.background, _b = _a.rounded, rounded = _b === void 0 ? true : _b, padding = _a.padding, arrowSpacing = _a.arrowSpacing, arrowPlacement = _a.arrowPlacement, withArrow = _a.withArrow, paddingVertical = _a.paddingVertical, children = _a.children, props = _tslib.__rest(_a, ["background", "rounded", "padding", "arrowSpacing", "arrowPlacement", "withArrow", "paddingVertical", "children"]);
|
|
16
16
|
return (React__default["default"].createElement("div", _tslib.__assign({}, props),
|
|
17
17
|
withArrow && (React__default["default"].createElement(BoxArrow, { arrowPlacement: arrowPlacement, arrowSpacing: arrowSpacing, background: background })),
|
|
18
|
-
React__default["default"].createElement(Box_styles.BoxContainer, { background: background || 'transparent', rounded: rounded, padding: padding }, children)));
|
|
18
|
+
React__default["default"].createElement(Box_styles.BoxContainer, { background: background || 'transparent', rounded: rounded, padding: padding, paddingVertical: paddingVertical }, children)));
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
exports.Box = Box;
|
|
@@ -9,7 +9,13 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
9
9
|
|
|
10
10
|
var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
|
|
11
11
|
|
|
12
|
-
var BoxContainer = styled__default["default"].div(templateObject_1 || (templateObject_1 = _tslib.__makeTemplateObject(["\n padding: ", "px;\n background: ", ";\n border-radius: ", ";\n @media (min-width: ", "px) {\n padding: ", "px;\n }\n\n ", ";\n"], ["\n padding: ", "px;\n background: ", ";\n border-radius: ", ";\n @media (min-width: ", "px) {\n padding: ", "px;\n }\n\n ", ";\n"])), function (props) { var _a, _b; return (_b = (_a = props === null || props === void 0 ? void 0 : props.theme) === null || _a === void 0 ? void 0 : _a.spacings) === null || _b === void 0 ? void 0 : _b.md; }, function (props) { return props.background; }, function (props) { return (props.rounded ? '5px' : '0'); }, function (props) { var _a, _b; return (_b = (_a = props === null || props === void 0 ? void 0 : props.theme) === null || _a === void 0 ? void 0 : _a.breakpoints) === null || _b === void 0 ? void 0 : _b.lg; }, function (props) { var _a, _b; return
|
|
12
|
+
var BoxContainer = styled__default["default"].div(templateObject_1 || (templateObject_1 = _tslib.__makeTemplateObject(["\n padding: ", "px;\n background: ", ";\n border-radius: ", ";\n @media (min-width: ", "px) {\n padding: ", "px;\n }\n\n ", ";\n"], ["\n padding: ", "px;\n background: ", ";\n border-radius: ", ";\n @media (min-width: ", "px) {\n padding: ", "px;\n }\n\n ", ";\n"])), function (props) { var _a, _b; return (_b = (_a = props === null || props === void 0 ? void 0 : props.theme) === null || _a === void 0 ? void 0 : _a.spacings) === null || _b === void 0 ? void 0 : _b.md; }, function (props) { return props.background; }, function (props) { return (props.rounded ? '5px' : '0'); }, function (props) { var _a, _b; return (_b = (_a = props === null || props === void 0 ? void 0 : props.theme) === null || _a === void 0 ? void 0 : _a.breakpoints) === null || _b === void 0 ? void 0 : _b.lg; }, function (props) { var _a, _b; return (_b = (_a = props === null || props === void 0 ? void 0 : props.theme) === null || _a === void 0 ? void 0 : _a.spacings) === null || _b === void 0 ? void 0 : _b.lg; }, function (props) {
|
|
13
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
14
|
+
return props.padding &&
|
|
15
|
+
"\n @media (min-width: ".concat((_b = (_a = props === null || props === void 0 ? void 0 : props.theme) === null || _a === void 0 ? void 0 : _a.breakpoints) === null || _b === void 0 ? void 0 : _b.lg, "px) {\n padding: ").concat(props.paddingVertical
|
|
16
|
+
? props.paddingVertical
|
|
17
|
+
: (_c = props.padding) !== null && _c !== void 0 ? _c : (_e = (_d = props === null || props === void 0 ? void 0 : props.theme) === null || _d === void 0 ? void 0 : _d.spacings) === null || _e === void 0 ? void 0 : _e.lg, "px ").concat(props.padding ? props.padding : (_g = (_f = props === null || props === void 0 ? void 0 : props.theme) === null || _f === void 0 ? void 0 : _f.spacings) === null || _g === void 0 ? void 0 : _g.lg, "px;\n \n }\n \n padding: ").concat(props.paddingVertical ? props.paddingVertical : props.padding, "px ").concat(props.padding, "px");
|
|
18
|
+
});
|
|
13
19
|
var templateObject_1;
|
|
14
20
|
|
|
15
21
|
exports.BoxContainer = BoxContainer;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Box.styles.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Box.styles.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -18827,12 +18827,12 @@ function getDateInfo(dateStr) {
|
|
|
18827
18827
|
return {
|
|
18828
18828
|
day: {
|
|
18829
18829
|
name: date.format('dddd'),
|
|
18830
|
-
number: date.format('
|
|
18830
|
+
number: date.format('D')
|
|
18831
18831
|
},
|
|
18832
18832
|
isTomorrow: date.isSame(moment().add(1, 'day'), 'day'),
|
|
18833
18833
|
month: {
|
|
18834
18834
|
name: date.format('MMMM'),
|
|
18835
|
-
number: date.format('
|
|
18835
|
+
number: date.format('M')
|
|
18836
18836
|
},
|
|
18837
18837
|
year: date.format('YYYY')
|
|
18838
18838
|
};
|