@citygross/components 0.8.87 → 0.8.89
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 +14 -14
- package/build/cjs/components/src/components/Links/Link.js +3 -11
- package/build/cjs/components/src/components/Links/Link.js.map +1 -1
- package/build/es/components/src/components/Links/Link.js +3 -11
- package/build/es/components/src/components/Links/Link.js.map +1 -1
- package/package.json +2 -2
|
@@ -8,25 +8,25 @@ export declare enum LinkColors {
|
|
|
8
8
|
'link' = 0,
|
|
9
9
|
'black' = 1
|
|
10
10
|
}
|
|
11
|
+
export declare enum ELinkVariant {
|
|
12
|
+
PRIMARY = "primary",
|
|
13
|
+
SECONDARY = "secondary",
|
|
14
|
+
TERTIARY = "tertiary"
|
|
15
|
+
}
|
|
11
16
|
export declare type TLink = {
|
|
12
|
-
|
|
17
|
+
asButton?: boolean;
|
|
18
|
+
borderRadius?: number;
|
|
13
19
|
center?: boolean;
|
|
14
|
-
isDisabled?: boolean;
|
|
15
|
-
noWrap?: boolean;
|
|
16
|
-
hrefPath?: string;
|
|
17
|
-
onClick?: () => void;
|
|
18
20
|
children: React.ReactNode;
|
|
21
|
+
hrefPath?: string;
|
|
19
22
|
icon?: JSX.Element;
|
|
23
|
+
inverted?: boolean;
|
|
24
|
+
isDisabled?: boolean;
|
|
25
|
+
noWrap?: boolean;
|
|
26
|
+
onClick?: (event: React.MouseEvent | React.KeyboardEvent) => void;
|
|
27
|
+
size?: TextTypes.TextSize;
|
|
20
28
|
target?: '_self' | '_blank';
|
|
21
|
-
borderRadius?: number;
|
|
22
29
|
tabIndex?: number;
|
|
23
|
-
inverted?: boolean;
|
|
24
|
-
asButton?: boolean;
|
|
25
30
|
variant?: ELinkVariant;
|
|
26
31
|
};
|
|
27
|
-
export declare
|
|
28
|
-
PRIMARY = "primary",
|
|
29
|
-
SECONDARY = "secondary",
|
|
30
|
-
TERTIARY = "tertiary"
|
|
31
|
-
}
|
|
32
|
-
export declare function Link({ isDisabled, noWrap, onClick, hrefPath, icon, size, target, borderRadius, tabIndex, inverted, children, asButton, variant, ...props }: TLink): JSX.Element;
|
|
32
|
+
export declare function Link({ asButton, borderRadius, children, hrefPath, icon, inverted, isDisabled, noWrap, onClick, size, target, tabIndex, variant, ...props }: TLink): JSX.Element;
|
|
@@ -28,18 +28,10 @@ exports.ELinkVariant = void 0;
|
|
|
28
28
|
ELinkVariant["TERTIARY"] = "tertiary";
|
|
29
29
|
})(exports.ELinkVariant || (exports.ELinkVariant = {}));
|
|
30
30
|
function Link(_a) {
|
|
31
|
-
var
|
|
32
|
-
return asButton ? (React__default["default"].createElement(Link_styles.LinkAsButton, _tslib.__assign({
|
|
33
|
-
if (event.key === 'Enter') {
|
|
34
|
-
onClick && onClick();
|
|
35
|
-
}
|
|
36
|
-
}, size: size, icon: icon, borderRadius: borderRadius, inverted: inverted }, props),
|
|
31
|
+
var asButton = _a.asButton, borderRadius = _a.borderRadius, children = _a.children, hrefPath = _a.hrefPath, icon = _a.icon, _b = _a.inverted, inverted = _b === void 0 ? false : _b, isDisabled = _a.isDisabled, noWrap = _a.noWrap, onClick = _a.onClick, _c = _a.size, size = _c === void 0 ? typography.TextTypes.TextSize.REGULAR : _c, _d = _a.target, target = _d === void 0 ? '_self' : _d, _e = _a.tabIndex, tabIndex = _e === void 0 ? 0 : _e, _f = _a.variant, variant = _f === void 0 ? exports.ELinkVariant.PRIMARY : _f, props = _tslib.__rest(_a, ["asButton", "borderRadius", "children", "hrefPath", "icon", "inverted", "isDisabled", "noWrap", "onClick", "size", "target", "tabIndex", "variant"]);
|
|
32
|
+
return asButton ? (React__default["default"].createElement(Link_styles.LinkAsButton, _tslib.__assign({ borderRadius: borderRadius, icon: icon, inverted: inverted, isDisabled: isDisabled, noWrap: noWrap, onClick: onClick, size: size, tabIndex: isDisabled ? -1 : tabIndex, variant: variant }, props),
|
|
37
33
|
React__default["default"].createElement(typography.LinkText, { size: size }, children),
|
|
38
|
-
icon && React__default["default"].createElement(Link_styles.IconWrapper, null, icon))) : (React__default["default"].createElement(Link_styles.BaseLink, _tslib.__assign({
|
|
39
|
-
if (event.key === 'Enter') {
|
|
40
|
-
onClick && onClick();
|
|
41
|
-
}
|
|
42
|
-
}, size: size, icon: icon, borderRadius: borderRadius, inverted: inverted, target: target }, props),
|
|
34
|
+
icon && React__default["default"].createElement(Link_styles.IconWrapper, null, icon))) : (React__default["default"].createElement(Link_styles.BaseLink, _tslib.__assign({ borderRadius: borderRadius, href: hrefPath, isDisabled: isDisabled, icon: icon, inverted: inverted, noWrap: noWrap, onClick: onClick, size: size, tabIndex: isDisabled ? -1 : tabIndex, target: target, variant: variant }, props),
|
|
43
35
|
React__default["default"].createElement(typography.LinkText, { size: size }, children),
|
|
44
36
|
icon && React__default["default"].createElement(Link_styles.IconWrapper, null, icon)));
|
|
45
37
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Link.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Link.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -20,18 +20,10 @@ var ELinkVariant;
|
|
|
20
20
|
ELinkVariant["TERTIARY"] = "tertiary";
|
|
21
21
|
})(ELinkVariant || (ELinkVariant = {}));
|
|
22
22
|
function Link(_a) {
|
|
23
|
-
var
|
|
24
|
-
return asButton ? (React.createElement(LinkAsButton, __assign({
|
|
25
|
-
if (event.key === 'Enter') {
|
|
26
|
-
onClick && onClick();
|
|
27
|
-
}
|
|
28
|
-
}, size: size, icon: icon, borderRadius: borderRadius, inverted: inverted }, props),
|
|
23
|
+
var asButton = _a.asButton, borderRadius = _a.borderRadius, children = _a.children, hrefPath = _a.hrefPath, icon = _a.icon, _b = _a.inverted, inverted = _b === void 0 ? false : _b, isDisabled = _a.isDisabled, noWrap = _a.noWrap, onClick = _a.onClick, _c = _a.size, size = _c === void 0 ? TextTypes.TextSize.REGULAR : _c, _d = _a.target, target = _d === void 0 ? '_self' : _d, _e = _a.tabIndex, tabIndex = _e === void 0 ? 0 : _e, _f = _a.variant, variant = _f === void 0 ? ELinkVariant.PRIMARY : _f, props = __rest(_a, ["asButton", "borderRadius", "children", "hrefPath", "icon", "inverted", "isDisabled", "noWrap", "onClick", "size", "target", "tabIndex", "variant"]);
|
|
24
|
+
return asButton ? (React.createElement(LinkAsButton, __assign({ borderRadius: borderRadius, icon: icon, inverted: inverted, isDisabled: isDisabled, noWrap: noWrap, onClick: onClick, size: size, tabIndex: isDisabled ? -1 : tabIndex, variant: variant }, props),
|
|
29
25
|
React.createElement(LinkText, { size: size }, children),
|
|
30
|
-
icon && React.createElement(IconWrapper, null, icon))) : (React.createElement(BaseLink, __assign({
|
|
31
|
-
if (event.key === 'Enter') {
|
|
32
|
-
onClick && onClick();
|
|
33
|
-
}
|
|
34
|
-
}, size: size, icon: icon, borderRadius: borderRadius, inverted: inverted, target: target }, props),
|
|
26
|
+
icon && React.createElement(IconWrapper, null, icon))) : (React.createElement(BaseLink, __assign({ borderRadius: borderRadius, href: hrefPath, isDisabled: isDisabled, icon: icon, inverted: inverted, noWrap: noWrap, onClick: onClick, size: size, tabIndex: isDisabled ? -1 : tabIndex, target: target, variant: variant }, props),
|
|
35
27
|
React.createElement(LinkText, { size: size }, children),
|
|
36
28
|
icon && React.createElement(IconWrapper, null, icon)));
|
|
37
29
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Link.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Link.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@citygross/components",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.89",
|
|
4
4
|
"license": "ISC",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "./build/cjs/components/src/index.js",
|
|
@@ -76,5 +76,5 @@
|
|
|
76
76
|
"react-slick": "^0.30.1",
|
|
77
77
|
"slick-carousel": "^1.8.1"
|
|
78
78
|
},
|
|
79
|
-
"gitHead": "
|
|
79
|
+
"gitHead": "b9b523b06e682cc98fca0c36c068a72c99486ed7"
|
|
80
80
|
}
|