@citygross/components 0.7.221 → 0.7.223
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/Links/Link.d.ts +2 -1
- package/build/cjs/components/src/components/DeliveryTimeBlock/DeliveryTimeBlock.js +1 -1
- package/build/cjs/components/src/components/Links/Link.js +2 -2
- package/build/cjs/components/src/components/Links/Link.styles.js +8 -2
- package/build/cjs/components/src/components/Links/Link.styles.js.map +1 -1
- package/build/es/components/src/components/DeliveryTimeBlock/DeliveryTimeBlock.js +1 -1
- package/build/es/components/src/components/Links/Link.js +2 -2
- package/build/es/components/src/components/Links/Link.styles.js +8 -2
- package/build/es/components/src/components/Links/Link.styles.js.map +1 -1
- package/package.json +2 -2
|
@@ -20,5 +20,6 @@ export declare type TLink = {
|
|
|
20
20
|
icon?: JSX.Element;
|
|
21
21
|
textDecoration?: 'none' | 'underline';
|
|
22
22
|
target?: '_self' | '_blank';
|
|
23
|
+
tabIndex?: number;
|
|
23
24
|
};
|
|
24
|
-
export declare function Link({ center, color, isDisabled, noWrap, onClick, hrefPath, icon, textDecoration, size, target, children }: TLink): JSX.Element;
|
|
25
|
+
export declare function Link({ center, color, isDisabled, noWrap, onClick, hrefPath, icon, textDecoration, size, target, tabIndex, children }: TLink): JSX.Element;
|
|
@@ -18,7 +18,7 @@ function DeliveryTimeBlock(_a) {
|
|
|
18
18
|
React__default["default"].createElement(DeliveryTimeBlock_styles.DeliverOption, null,
|
|
19
19
|
icon && icon,
|
|
20
20
|
deliverOption && React__default["default"].createElement(typography.H3, null, deliverOption)),
|
|
21
|
-
React__default["default"].createElement(typography.BodyText, null, (_c = (_b = utils.moment(deliveryDate)) === null || _b === void 0 ? void 0 : _b.format('dddd D
|
|
21
|
+
React__default["default"].createElement(typography.BodyText, null, (_c = (_b = utils.moment(deliveryDate)) === null || _b === void 0 ? void 0 : _b.format('dddd D MMMM')) === null || _c === void 0 ? void 0 :
|
|
22
22
|
_c.toLocaleLowerCase(),
|
|
23
23
|
' ',
|
|
24
24
|
deliveryFromTime && deliveryToTime && (React__default["default"].createElement("span", { style: { whiteSpace: 'nowrap' } }, "".concat(localTimeVar, " ").concat(deliveryFromTime, " - ").concat(deliveryToTime)))),
|
|
@@ -22,8 +22,8 @@ exports.LinkColors = void 0;
|
|
|
22
22
|
LinkColors[LinkColors["black"] = 1] = "black";
|
|
23
23
|
})(exports.LinkColors || (exports.LinkColors = {}));
|
|
24
24
|
function Link(_a) {
|
|
25
|
-
var _b = _a.center, center = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? 'link' : _c, isDisabled = _a.isDisabled, noWrap = _a.noWrap, onClick = _a.onClick, hrefPath = _a.hrefPath, icon = _a.icon, _d = _a.textDecoration, textDecoration = _d === void 0 ? 'none' : _d, _e = _a.size, size = _e === void 0 ? typography.TextTypes.TextSize.REGULAR : _e, _f = _a.target, target = _f === void 0 ? '_self' : _f, children = _a.children;
|
|
26
|
-
return (React__default["default"].createElement(Link_styles.BaseLink, { center: center, color: designTokens.theme && designTokens.theme.palette ? designTokens.theme === null || designTokens.theme === void 0 ? void 0 : designTokens.theme.palette[color] : 'black', href: hrefPath, isDisabled: isDisabled, textDecoration: textDecoration, noWrap: noWrap, onClick: onClick, size: size, icon: icon, target: target },
|
|
25
|
+
var _b = _a.center, center = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? 'link' : _c, isDisabled = _a.isDisabled, noWrap = _a.noWrap, onClick = _a.onClick, hrefPath = _a.hrefPath, icon = _a.icon, _d = _a.textDecoration, textDecoration = _d === void 0 ? 'none' : _d, _e = _a.size, size = _e === void 0 ? typography.TextTypes.TextSize.REGULAR : _e, _f = _a.target, target = _f === void 0 ? '_self' : _f, _g = _a.tabIndex, tabIndex = _g === void 0 ? 0 : _g, children = _a.children;
|
|
26
|
+
return (React__default["default"].createElement(Link_styles.BaseLink, { center: center, tabIndex: isDisabled ? -1 : tabIndex, color: designTokens.theme && designTokens.theme.palette ? designTokens.theme === null || designTokens.theme === void 0 ? void 0 : designTokens.theme.palette[color] : 'black', href: hrefPath, isDisabled: isDisabled, textDecoration: textDecoration, noWrap: noWrap, onClick: onClick, size: size, icon: icon, target: target },
|
|
27
27
|
React__default["default"].createElement(typography.LinkText, { size: size }, children),
|
|
28
28
|
icon && React__default["default"].createElement(Link_styles.IconWrapper, null, icon)));
|
|
29
29
|
}
|
|
@@ -9,7 +9,7 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
9
9
|
|
|
10
10
|
var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
|
|
11
11
|
|
|
12
|
-
var BaseLink = styled__default["default"].a(templateObject_1 || (templateObject_1 = _tslib.__makeTemplateObject(["\n user-select: ", ";\n pointer-events: ", ";\n cursor: pointer;\n text-decoration: ", ";\n\n /* typography */\n color: ", ";\n line-height: ", ";\n white-space: ", ";\n ", "\n"], ["\n user-select: ", ";\n pointer-events: ", ";\n cursor: pointer;\n text-decoration: ", ";\n\n /* typography */\n color: ", ";\n line-height: ", ";\n white-space: ", ";\n ", "\n"])), function (props) { return props.isDisabled && 'none'; }, function (props) { return (props.isDisabled ? 'none' : 'all'); }, function (props) { return props.textDecoration; }, function (props) { var _a; return props.isDisabled ? (_a = props.theme.palette) === null || _a === void 0 ? void 0 : _a.medium : props.color; }, function (props) {
|
|
12
|
+
var BaseLink = styled__default["default"].a(templateObject_1 || (templateObject_1 = _tslib.__makeTemplateObject(["\n user-select: ", ";\n pointer-events: ", ";\n cursor: pointer;\n text-decoration: ", ";\n\n /* typography */\n color: ", ";\n line-height: ", ";\n white-space: ", ";\n ", "\n\n &:hover {\n text-decoration: ", ";\n }\n border-radius: ", "px;\n &:focus {\n outline: 3px solid ", ";\n }\n"], ["\n user-select: ", ";\n pointer-events: ", ";\n cursor: pointer;\n text-decoration: ", ";\n\n /* typography */\n color: ", ";\n line-height: ", ";\n white-space: ", ";\n ", "\n\n &:hover {\n text-decoration: ", ";\n }\n border-radius: ", "px;\n &:focus {\n outline: 3px solid ", ";\n }\n"])), function (props) { return props.isDisabled && 'none'; }, function (props) { return (props.isDisabled ? 'none' : 'all'); }, function (props) { return props.textDecoration; }, function (props) { var _a; return props.isDisabled ? (_a = props.theme.palette) === null || _a === void 0 ? void 0 : _a.medium : props.color; }, function (props) {
|
|
13
13
|
var _a, _b;
|
|
14
14
|
return props.size === 'small'
|
|
15
15
|
? ((_a = props.theme.typography) === null || _a === void 0 ? void 0 : _a.lineHeight.s2) + 'px'
|
|
@@ -17,7 +17,13 @@ var BaseLink = styled__default["default"].a(templateObject_1 || (templateObject_
|
|
|
17
17
|
}, function (props) { return (props.noWrap ? 'nowrap' : 'normal'); }, function (props) {
|
|
18
18
|
return props.icon &&
|
|
19
19
|
"\n display:flex;\n align-items: center;\n ";
|
|
20
|
-
})
|
|
20
|
+
}, function (props) {
|
|
21
|
+
return props.isDisabled
|
|
22
|
+
? 'none'
|
|
23
|
+
: props.textDecoration === 'underline'
|
|
24
|
+
? 'none'
|
|
25
|
+
: 'underline';
|
|
26
|
+
}, function (props) { var _a; return (_a = props.theme.attributes) === null || _a === void 0 ? void 0 : _a.borderRadius.small; }, function (props) { var _a; return (_a = props.theme.palette) === null || _a === void 0 ? void 0 : _a.blueMedium; });
|
|
21
27
|
var IconWrapper = styled__default["default"].span(templateObject_2 || (templateObject_2 = _tslib.__makeTemplateObject(["\n display: flex;\n flex: 1;\n justify-content: flex-end;\n"], ["\n display: flex;\n flex: 1;\n justify-content: flex-end;\n"])));
|
|
22
28
|
var templateObject_1, templateObject_2;
|
|
23
29
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Link.styles.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Link.styles.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -10,7 +10,7 @@ function DeliveryTimeBlock(_a) {
|
|
|
10
10
|
React.createElement(DeliverOption, null,
|
|
11
11
|
icon && icon,
|
|
12
12
|
deliverOption && React.createElement(H3, null, deliverOption)),
|
|
13
|
-
React.createElement(BodyText, null, (_c = (_b = moment(deliveryDate)) === null || _b === void 0 ? void 0 : _b.format('dddd D
|
|
13
|
+
React.createElement(BodyText, null, (_c = (_b = moment(deliveryDate)) === null || _b === void 0 ? void 0 : _b.format('dddd D MMMM')) === null || _c === void 0 ? void 0 :
|
|
14
14
|
_c.toLocaleLowerCase(),
|
|
15
15
|
' ',
|
|
16
16
|
deliveryFromTime && deliveryToTime && (React.createElement("span", { style: { whiteSpace: 'nowrap' } }, "".concat(localTimeVar, " ").concat(deliveryFromTime, " - ").concat(deliveryToTime)))),
|
|
@@ -14,8 +14,8 @@ var LinkColors;
|
|
|
14
14
|
LinkColors[LinkColors["black"] = 1] = "black";
|
|
15
15
|
})(LinkColors || (LinkColors = {}));
|
|
16
16
|
function Link(_a) {
|
|
17
|
-
var _b = _a.center, center = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? 'link' : _c, isDisabled = _a.isDisabled, noWrap = _a.noWrap, onClick = _a.onClick, hrefPath = _a.hrefPath, icon = _a.icon, _d = _a.textDecoration, textDecoration = _d === void 0 ? 'none' : _d, _e = _a.size, size = _e === void 0 ? TextTypes.TextSize.REGULAR : _e, _f = _a.target, target = _f === void 0 ? '_self' : _f, children = _a.children;
|
|
18
|
-
return (React.createElement(BaseLink, { center: center, color: theme && theme.palette ? theme === null || theme === void 0 ? void 0 : theme.palette[color] : 'black', href: hrefPath, isDisabled: isDisabled, textDecoration: textDecoration, noWrap: noWrap, onClick: onClick, size: size, icon: icon, target: target },
|
|
17
|
+
var _b = _a.center, center = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? 'link' : _c, isDisabled = _a.isDisabled, noWrap = _a.noWrap, onClick = _a.onClick, hrefPath = _a.hrefPath, icon = _a.icon, _d = _a.textDecoration, textDecoration = _d === void 0 ? 'none' : _d, _e = _a.size, size = _e === void 0 ? TextTypes.TextSize.REGULAR : _e, _f = _a.target, target = _f === void 0 ? '_self' : _f, _g = _a.tabIndex, tabIndex = _g === void 0 ? 0 : _g, children = _a.children;
|
|
18
|
+
return (React.createElement(BaseLink, { center: center, tabIndex: isDisabled ? -1 : tabIndex, color: theme && theme.palette ? theme === null || theme === void 0 ? void 0 : theme.palette[color] : 'black', href: hrefPath, isDisabled: isDisabled, textDecoration: textDecoration, noWrap: noWrap, onClick: onClick, size: size, icon: icon, target: target },
|
|
19
19
|
React.createElement(LinkText, { size: size }, children),
|
|
20
20
|
icon && React.createElement(IconWrapper, null, icon)));
|
|
21
21
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __makeTemplateObject } from '../../../../_virtual/_tslib.js';
|
|
2
2
|
import styled from 'styled-components';
|
|
3
3
|
|
|
4
|
-
var BaseLink = styled.a(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n user-select: ", ";\n pointer-events: ", ";\n cursor: pointer;\n text-decoration: ", ";\n\n /* typography */\n color: ", ";\n line-height: ", ";\n white-space: ", ";\n ", "\n"], ["\n user-select: ", ";\n pointer-events: ", ";\n cursor: pointer;\n text-decoration: ", ";\n\n /* typography */\n color: ", ";\n line-height: ", ";\n white-space: ", ";\n ", "\n"])), function (props) { return props.isDisabled && 'none'; }, function (props) { return (props.isDisabled ? 'none' : 'all'); }, function (props) { return props.textDecoration; }, function (props) { var _a; return props.isDisabled ? (_a = props.theme.palette) === null || _a === void 0 ? void 0 : _a.medium : props.color; }, function (props) {
|
|
4
|
+
var BaseLink = styled.a(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n user-select: ", ";\n pointer-events: ", ";\n cursor: pointer;\n text-decoration: ", ";\n\n /* typography */\n color: ", ";\n line-height: ", ";\n white-space: ", ";\n ", "\n\n &:hover {\n text-decoration: ", ";\n }\n border-radius: ", "px;\n &:focus {\n outline: 3px solid ", ";\n }\n"], ["\n user-select: ", ";\n pointer-events: ", ";\n cursor: pointer;\n text-decoration: ", ";\n\n /* typography */\n color: ", ";\n line-height: ", ";\n white-space: ", ";\n ", "\n\n &:hover {\n text-decoration: ", ";\n }\n border-radius: ", "px;\n &:focus {\n outline: 3px solid ", ";\n }\n"])), function (props) { return props.isDisabled && 'none'; }, function (props) { return (props.isDisabled ? 'none' : 'all'); }, function (props) { return props.textDecoration; }, function (props) { var _a; return props.isDisabled ? (_a = props.theme.palette) === null || _a === void 0 ? void 0 : _a.medium : props.color; }, function (props) {
|
|
5
5
|
var _a, _b;
|
|
6
6
|
return props.size === 'small'
|
|
7
7
|
? ((_a = props.theme.typography) === null || _a === void 0 ? void 0 : _a.lineHeight.s2) + 'px'
|
|
@@ -9,7 +9,13 @@ var BaseLink = styled.a(templateObject_1 || (templateObject_1 = __makeTemplateOb
|
|
|
9
9
|
}, function (props) { return (props.noWrap ? 'nowrap' : 'normal'); }, function (props) {
|
|
10
10
|
return props.icon &&
|
|
11
11
|
"\n display:flex;\n align-items: center;\n ";
|
|
12
|
-
})
|
|
12
|
+
}, function (props) {
|
|
13
|
+
return props.isDisabled
|
|
14
|
+
? 'none'
|
|
15
|
+
: props.textDecoration === 'underline'
|
|
16
|
+
? 'none'
|
|
17
|
+
: 'underline';
|
|
18
|
+
}, function (props) { var _a; return (_a = props.theme.attributes) === null || _a === void 0 ? void 0 : _a.borderRadius.small; }, function (props) { var _a; return (_a = props.theme.palette) === null || _a === void 0 ? void 0 : _a.blueMedium; });
|
|
13
19
|
var IconWrapper = styled.span(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: flex;\n flex: 1;\n justify-content: flex-end;\n"], ["\n display: flex;\n flex: 1;\n justify-content: flex-end;\n"])));
|
|
14
20
|
var templateObject_1, templateObject_2;
|
|
15
21
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Link.styles.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Link.styles.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@citygross/components",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.223",
|
|
4
4
|
"license": "ISC",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "./build/cjs/components/src/index.js",
|
|
@@ -74,5 +74,5 @@
|
|
|
74
74
|
"react-slick": "^0.30.1",
|
|
75
75
|
"slick-carousel": "^1.8.1"
|
|
76
76
|
},
|
|
77
|
-
"gitHead": "
|
|
77
|
+
"gitHead": "c2fb0669640e43f743e9a9d521d06aae8675d922"
|
|
78
78
|
}
|