@citygross/components 0.8.86 → 0.8.88
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 +1 -1
- package/build/@types/components/Modal/Modal.d.ts +9 -1
- package/build/cjs/components/src/components/AddressBlock/AddressBlock.js +1 -2
- package/build/cjs/components/src/components/AddressBlock/AddressBlock.js.map +1 -1
- package/build/cjs/components/src/components/Links/Link.js +2 -2
- package/build/cjs/components/src/components/Modal/Modal.js +4 -3
- package/build/cjs/components/src/components/Modal/Modal.js.map +1 -1
- package/build/cjs/components/src/components/WarningLabel/WarningLabel.js +1 -2
- package/build/cjs/components/src/components/WarningLabel/WarningLabel.js.map +1 -1
- package/build/es/components/src/components/AddressBlock/AddressBlock.js +1 -2
- package/build/es/components/src/components/AddressBlock/AddressBlock.js.map +1 -1
- package/build/es/components/src/components/Links/Link.js +2 -2
- package/build/es/components/src/components/Modal/Modal.js +5 -4
- package/build/es/components/src/components/Modal/Modal.js.map +1 -1
- package/build/es/components/src/components/WarningLabel/WarningLabel.js +1 -2
- package/build/es/components/src/components/WarningLabel/WarningLabel.js.map +1 -1
- package/package.json +2 -2
|
@@ -14,7 +14,7 @@ export declare type TLink = {
|
|
|
14
14
|
isDisabled?: boolean;
|
|
15
15
|
noWrap?: boolean;
|
|
16
16
|
hrefPath?: string;
|
|
17
|
-
onClick?: () => void;
|
|
17
|
+
onClick?: (event: React.MouseEvent | React.KeyboardEvent) => void;
|
|
18
18
|
children: React.ReactNode;
|
|
19
19
|
icon?: JSX.Element;
|
|
20
20
|
target?: '_self' | '_blank';
|
|
@@ -9,4 +9,12 @@ export declare type TModal = styles.TModalContainer & {
|
|
|
9
9
|
querySelector?: string;
|
|
10
10
|
footer?: JSX.Element;
|
|
11
11
|
};
|
|
12
|
-
export declare const Modal:
|
|
12
|
+
export declare const Modal: React.ForwardRefExoticComponent<styles.TModalContainer & {
|
|
13
|
+
onBackdropClick: () => void;
|
|
14
|
+
children?: React.ReactNode;
|
|
15
|
+
title?: string | undefined;
|
|
16
|
+
subTitle?: string | undefined;
|
|
17
|
+
hideCancel?: boolean | undefined;
|
|
18
|
+
querySelector?: string | undefined;
|
|
19
|
+
footer?: JSX.Element | undefined;
|
|
20
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -53,8 +53,7 @@ require('../LayoutBox/LayoutBox.styles.js');
|
|
|
53
53
|
require('../ListItem/ListItem.js');
|
|
54
54
|
require('../ListItemWithRadio/ListItemWithRadio.styles.js');
|
|
55
55
|
require('../Links/Link.js');
|
|
56
|
-
require('
|
|
57
|
-
require('../Modal/Modal.styles.js');
|
|
56
|
+
require('../Modal/Modal.js');
|
|
58
57
|
require('../RadioBox/RadioBoxItem.styles.js');
|
|
59
58
|
require('../RadioBox/RadioBoxList.styles.js');
|
|
60
59
|
require('../RadioGroup/RadioGroup.styles.js');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AddressBlock.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AddressBlock.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -31,13 +31,13 @@ function Link(_a) {
|
|
|
31
31
|
var isDisabled = _a.isDisabled, noWrap = _a.noWrap, onClick = _a.onClick, hrefPath = _a.hrefPath, icon = _a.icon, _b = _a.size, size = _b === void 0 ? typography.TextTypes.TextSize.REGULAR : _b, _c = _a.target, target = _c === void 0 ? '_self' : _c, borderRadius = _a.borderRadius, _d = _a.tabIndex, tabIndex = _d === void 0 ? 0 : _d, _e = _a.inverted, inverted = _e === void 0 ? false : _e, children = _a.children, asButton = _a.asButton, _f = _a.variant, variant = _f === void 0 ? exports.ELinkVariant.PRIMARY : _f, props = _tslib.__rest(_a, ["isDisabled", "noWrap", "onClick", "hrefPath", "icon", "size", "target", "borderRadius", "tabIndex", "inverted", "children", "asButton", "variant"]);
|
|
32
32
|
return asButton ? (React__default["default"].createElement(Link_styles.LinkAsButton, _tslib.__assign({ tabIndex: isDisabled ? -1 : tabIndex, isDisabled: isDisabled, noWrap: noWrap, variant: variant, onClick: onClick, onKeyDown: function (event) {
|
|
33
33
|
if (event.key === 'Enter') {
|
|
34
|
-
onClick && onClick();
|
|
34
|
+
onClick && onClick(event);
|
|
35
35
|
}
|
|
36
36
|
}, size: size, icon: icon, borderRadius: borderRadius, inverted: inverted }, props),
|
|
37
37
|
React__default["default"].createElement(typography.LinkText, { size: size }, children),
|
|
38
38
|
icon && React__default["default"].createElement(Link_styles.IconWrapper, null, icon))) : (React__default["default"].createElement(Link_styles.BaseLink, _tslib.__assign({ tabIndex: isDisabled ? -1 : tabIndex, href: hrefPath, isDisabled: isDisabled, variant: variant, noWrap: noWrap, onClick: onClick, onKeyDown: function (event) {
|
|
39
39
|
if (event.key === 'Enter') {
|
|
40
|
-
onClick && onClick();
|
|
40
|
+
onClick && onClick(event);
|
|
41
41
|
}
|
|
42
42
|
}, size: size, icon: icon, borderRadius: borderRadius, inverted: inverted, target: target }, props),
|
|
43
43
|
React__default["default"].createElement(typography.LinkText, { size: size }, children),
|
|
@@ -14,12 +14,12 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
14
14
|
|
|
15
15
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
16
16
|
|
|
17
|
-
var Modal = function (_a) {
|
|
17
|
+
var Modal = React.forwardRef(function (_a, ref) {
|
|
18
18
|
var _b;
|
|
19
19
|
var onBackdropClick = _a.onBackdropClick, children = _a.children, title = _a.title, subTitle = _a.subTitle, _c = _a.hideCancel, hideCancel = _c === void 0 ? true : _c, isConfirm = _a.isConfirm, maxWidth = _a.maxWidth, _d = _a.background, background = _d === void 0 ? (_b = designTokens.theme.palette) === null || _b === void 0 ? void 0 : _b.white : _d, _e = _a.querySelector, querySelector = _e === void 0 ? '#root' : _e, footer = _a.footer;
|
|
20
20
|
var domSafe = typeof document !== 'undefined';
|
|
21
21
|
return domSafe
|
|
22
|
-
? reactDom.createPortal(React__default["default"].createElement(Modal_styles.ModalOverlay, { onClick: onBackdropClick },
|
|
22
|
+
? reactDom.createPortal(React__default["default"].createElement(Modal_styles.ModalOverlay, { onClick: onBackdropClick, ref: ref },
|
|
23
23
|
React__default["default"].createElement(Modal_styles.ModalContainer, { isConfirm: isConfirm || false, maxWidth: maxWidth, onClick: function (e) { return e.stopPropagation(); }, background: background },
|
|
24
24
|
title && (React__default["default"].createElement(React__default["default"].Fragment, null,
|
|
25
25
|
React__default["default"].createElement(Modal_styles.ModalHeaderContainer, null,
|
|
@@ -34,7 +34,8 @@ var Modal = function (_a) {
|
|
|
34
34
|
React__default["default"].createElement(Spacer.Spacer, null),
|
|
35
35
|
React__default["default"].createElement(Modal_styles.FooterWrapper, null, footer))))), document.querySelector(querySelector) || document.body)
|
|
36
36
|
: null;
|
|
37
|
-
};
|
|
37
|
+
});
|
|
38
|
+
Modal.displayName = 'Modal';
|
|
38
39
|
|
|
39
40
|
exports.Modal = Modal;
|
|
40
41
|
//# sourceMappingURL=Modal.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Modal.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Modal.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -53,8 +53,7 @@ require('../LayoutBox/LayoutBox.styles.js');
|
|
|
53
53
|
require('../ListItem/ListItem.js');
|
|
54
54
|
require('../ListItemWithRadio/ListItemWithRadio.styles.js');
|
|
55
55
|
require('../Links/Link.js');
|
|
56
|
-
require('
|
|
57
|
-
require('../Modal/Modal.styles.js');
|
|
56
|
+
require('../Modal/Modal.js');
|
|
58
57
|
require('../RadioBox/RadioBoxItem.styles.js');
|
|
59
58
|
require('../RadioBox/RadioBoxList.styles.js');
|
|
60
59
|
require('../RadioGroup/RadioGroup.styles.js');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WarningLabel.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"WarningLabel.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -49,8 +49,7 @@ import '../LayoutBox/LayoutBox.styles.js';
|
|
|
49
49
|
import '../ListItem/ListItem.js';
|
|
50
50
|
import '../ListItemWithRadio/ListItemWithRadio.styles.js';
|
|
51
51
|
import '../Links/Link.js';
|
|
52
|
-
import '
|
|
53
|
-
import '../Modal/Modal.styles.js';
|
|
52
|
+
import '../Modal/Modal.js';
|
|
54
53
|
import '../RadioBox/RadioBoxItem.styles.js';
|
|
55
54
|
import '../RadioBox/RadioBoxList.styles.js';
|
|
56
55
|
import '../RadioGroup/RadioGroup.styles.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AddressBlock.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AddressBlock.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -23,13 +23,13 @@ function Link(_a) {
|
|
|
23
23
|
var isDisabled = _a.isDisabled, noWrap = _a.noWrap, onClick = _a.onClick, hrefPath = _a.hrefPath, icon = _a.icon, _b = _a.size, size = _b === void 0 ? TextTypes.TextSize.REGULAR : _b, _c = _a.target, target = _c === void 0 ? '_self' : _c, borderRadius = _a.borderRadius, _d = _a.tabIndex, tabIndex = _d === void 0 ? 0 : _d, _e = _a.inverted, inverted = _e === void 0 ? false : _e, children = _a.children, asButton = _a.asButton, _f = _a.variant, variant = _f === void 0 ? ELinkVariant.PRIMARY : _f, props = __rest(_a, ["isDisabled", "noWrap", "onClick", "hrefPath", "icon", "size", "target", "borderRadius", "tabIndex", "inverted", "children", "asButton", "variant"]);
|
|
24
24
|
return asButton ? (React.createElement(LinkAsButton, __assign({ tabIndex: isDisabled ? -1 : tabIndex, isDisabled: isDisabled, noWrap: noWrap, variant: variant, onClick: onClick, onKeyDown: function (event) {
|
|
25
25
|
if (event.key === 'Enter') {
|
|
26
|
-
onClick && onClick();
|
|
26
|
+
onClick && onClick(event);
|
|
27
27
|
}
|
|
28
28
|
}, size: size, icon: icon, borderRadius: borderRadius, inverted: inverted }, props),
|
|
29
29
|
React.createElement(LinkText, { size: size }, children),
|
|
30
30
|
icon && React.createElement(IconWrapper, null, icon))) : (React.createElement(BaseLink, __assign({ tabIndex: isDisabled ? -1 : tabIndex, href: hrefPath, isDisabled: isDisabled, variant: variant, noWrap: noWrap, onClick: onClick, onKeyDown: function (event) {
|
|
31
31
|
if (event.key === 'Enter') {
|
|
32
|
-
onClick && onClick();
|
|
32
|
+
onClick && onClick(event);
|
|
33
33
|
}
|
|
34
34
|
}, size: size, icon: icon, borderRadius: borderRadius, inverted: inverted, target: target }, props),
|
|
35
35
|
React.createElement(LinkText, { size: size }, children),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { forwardRef } from 'react';
|
|
2
2
|
import { createPortal } from 'react-dom';
|
|
3
3
|
import { H2, BodyText } from '@citygross/typography';
|
|
4
4
|
import { ModalOverlay, ModalContainer, ModalHeaderContainer, ModalHeader, CloseButtonWrapper, ChildrenWrapper, FooterWrapper } from './Modal.styles.js';
|
|
@@ -6,12 +6,12 @@ import { Icons } from '@citygross/icons';
|
|
|
6
6
|
import { theme } from '@citygross/design-tokens';
|
|
7
7
|
import { Spacer } from '../Spacer/Spacer.js';
|
|
8
8
|
|
|
9
|
-
var Modal = function (_a) {
|
|
9
|
+
var Modal = forwardRef(function (_a, ref) {
|
|
10
10
|
var _b;
|
|
11
11
|
var onBackdropClick = _a.onBackdropClick, children = _a.children, title = _a.title, subTitle = _a.subTitle, _c = _a.hideCancel, hideCancel = _c === void 0 ? true : _c, isConfirm = _a.isConfirm, maxWidth = _a.maxWidth, _d = _a.background, background = _d === void 0 ? (_b = theme.palette) === null || _b === void 0 ? void 0 : _b.white : _d, _e = _a.querySelector, querySelector = _e === void 0 ? '#root' : _e, footer = _a.footer;
|
|
12
12
|
var domSafe = typeof document !== 'undefined';
|
|
13
13
|
return domSafe
|
|
14
|
-
? createPortal(React.createElement(ModalOverlay, { onClick: onBackdropClick },
|
|
14
|
+
? createPortal(React.createElement(ModalOverlay, { onClick: onBackdropClick, ref: ref },
|
|
15
15
|
React.createElement(ModalContainer, { isConfirm: isConfirm || false, maxWidth: maxWidth, onClick: function (e) { return e.stopPropagation(); }, background: background },
|
|
16
16
|
title && (React.createElement(React.Fragment, null,
|
|
17
17
|
React.createElement(ModalHeaderContainer, null,
|
|
@@ -26,7 +26,8 @@ var Modal = function (_a) {
|
|
|
26
26
|
React.createElement(Spacer, null),
|
|
27
27
|
React.createElement(FooterWrapper, null, footer))))), document.querySelector(querySelector) || document.body)
|
|
28
28
|
: null;
|
|
29
|
-
};
|
|
29
|
+
});
|
|
30
|
+
Modal.displayName = 'Modal';
|
|
30
31
|
|
|
31
32
|
export { Modal };
|
|
32
33
|
//# sourceMappingURL=Modal.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Modal.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Modal.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -49,8 +49,7 @@ import '../LayoutBox/LayoutBox.styles.js';
|
|
|
49
49
|
import '../ListItem/ListItem.js';
|
|
50
50
|
import '../ListItemWithRadio/ListItemWithRadio.styles.js';
|
|
51
51
|
import '../Links/Link.js';
|
|
52
|
-
import '
|
|
53
|
-
import '../Modal/Modal.styles.js';
|
|
52
|
+
import '../Modal/Modal.js';
|
|
54
53
|
import '../RadioBox/RadioBoxItem.styles.js';
|
|
55
54
|
import '../RadioBox/RadioBoxList.styles.js';
|
|
56
55
|
import '../RadioGroup/RadioGroup.styles.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WarningLabel.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"WarningLabel.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.88",
|
|
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": "2a502f655401e04bc40a44339917ea0f9af84ac1"
|
|
80
80
|
}
|