@citygross/components 0.7.65 → 0.7.68
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/AddressBlock/AddressBlock.d.ts +3 -1
- package/build/@types/components/Links/Link.d.ts +2 -2
- package/build/@types/components/Links/Link.stories.d.ts +5 -5
- package/build/@types/components/Links/Link.styles.d.ts +2 -2
- package/build/cjs/components/src/components/AddressBlock/AddressBlock.js +5 -8
- 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/index.js +1 -1
- package/build/es/components/src/components/AddressBlock/AddressBlock.js +5 -8
- 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/index.js +1 -1
- package/package.json +3 -3
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
export declare type TAddressBlock = {
|
|
2
3
|
deliverOption?: string;
|
|
3
4
|
icon?: JSX.Element;
|
|
@@ -8,5 +9,6 @@ export declare type TAddressBlock = {
|
|
|
8
9
|
city: string;
|
|
9
10
|
doorCode?: string;
|
|
10
11
|
floor?: string;
|
|
12
|
+
deliveryInstructions?: React.ReactNode;
|
|
11
13
|
};
|
|
12
|
-
export declare function AddressBlock({ deliverOption, icon, storeName, customerName, street, zipCode, city, doorCode, floor }: TAddressBlock): JSX.Element;
|
|
14
|
+
export declare function AddressBlock({ deliverOption, icon, storeName, customerName, street, zipCode, city, doorCode, floor, deliveryInstructions }: TAddressBlock): JSX.Element;
|
|
@@ -8,7 +8,7 @@ export declare enum LinkColors {
|
|
|
8
8
|
'link' = 0,
|
|
9
9
|
'black' = 1
|
|
10
10
|
}
|
|
11
|
-
export declare type
|
|
11
|
+
export declare type TLink = {
|
|
12
12
|
size?: TextTypes.TextSize;
|
|
13
13
|
center?: boolean;
|
|
14
14
|
color?: keyof typeof LinkColors;
|
|
@@ -20,4 +20,4 @@ export declare type TLinkButton = {
|
|
|
20
20
|
icon?: JSX.Element;
|
|
21
21
|
textDecoration?: 'none' | 'underline';
|
|
22
22
|
};
|
|
23
|
-
export declare function
|
|
23
|
+
export declare function Link({ center, color, isDisabled, noWrap, onClick, hrefPath, icon, textDecoration, size, children }: TLink): JSX.Element;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Story } from '@storybook/react';
|
|
2
|
-
import {
|
|
2
|
+
import { Link, TLink } from './Link';
|
|
3
3
|
import { TextTypes } from '@citygross/typography';
|
|
4
4
|
declare const _default: {
|
|
5
|
-
component: typeof
|
|
5
|
+
component: typeof Link;
|
|
6
6
|
title: string;
|
|
7
7
|
argsTypes: {
|
|
8
8
|
size: {
|
|
@@ -14,6 +14,6 @@ declare const _default: {
|
|
|
14
14
|
};
|
|
15
15
|
};
|
|
16
16
|
export default _default;
|
|
17
|
-
export declare const Default: Story<
|
|
18
|
-
export declare const SecondaryLink: Story<
|
|
19
|
-
export declare const WithIcon: Story<
|
|
17
|
+
export declare const Default: Story<TLink>;
|
|
18
|
+
export declare const SecondaryLink: Story<TLink>;
|
|
19
|
+
export declare const WithIcon: Story<TLink>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const BaseLink: import("styled-components").StyledComponent<"a", import("styled-components").DefaultTheme, Omit<
|
|
1
|
+
import { TLink } from './Link';
|
|
2
|
+
export declare const BaseLink: import("styled-components").StyledComponent<"a", import("styled-components").DefaultTheme, Omit<TLink, "color"> & {
|
|
3
3
|
color: string;
|
|
4
4
|
}, never>;
|
|
5
5
|
export declare const IconWrapper: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, {}, never>;
|
|
@@ -11,24 +11,21 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
11
11
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
12
12
|
|
|
13
13
|
function AddressBlock(_a) {
|
|
14
|
-
var _b = _a.deliverOption, deliverOption = _b === void 0 ? 'Address' : _b, icon = _a.icon, storeName = _a.storeName, customerName = _a.customerName, street = _a.street, zipCode = _a.zipCode, city = _a.city, doorCode = _a.doorCode, floor = _a.floor;
|
|
14
|
+
var _b = _a.deliverOption, deliverOption = _b === void 0 ? 'Address' : _b, icon = _a.icon, storeName = _a.storeName, customerName = _a.customerName, street = _a.street, zipCode = _a.zipCode, city = _a.city, doorCode = _a.doorCode, floor = _a.floor, deliveryInstructions = _a.deliveryInstructions;
|
|
15
15
|
return (React__default['default'].createElement(React__default['default'].Fragment, null,
|
|
16
16
|
React__default['default'].createElement(AddressBlock_styles.AddressOption, null,
|
|
17
17
|
icon && icon,
|
|
18
18
|
deliverOption && React__default['default'].createElement(typography.H3, null, deliverOption)),
|
|
19
19
|
storeName && React__default['default'].createElement(typography.H3, null, storeName),
|
|
20
20
|
customerName && React__default['default'].createElement(typography.BodyText, null, customerName),
|
|
21
|
+
React__default['default'].createElement(typography.BodyText, null, street),
|
|
21
22
|
React__default['default'].createElement(typography.BodyText, null,
|
|
22
|
-
street,
|
|
23
|
-
", ",
|
|
24
23
|
zipCode,
|
|
25
24
|
" ",
|
|
26
25
|
city),
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
" ",
|
|
31
|
-
floor))));
|
|
26
|
+
doorCode && (React__default['default'].createElement(typography.BodyText, null, doorCode)),
|
|
27
|
+
floor && (React__default['default'].createElement(typography.BodyText, null, floor)),
|
|
28
|
+
deliveryInstructions && (deliveryInstructions)));
|
|
32
29
|
}
|
|
33
30
|
|
|
34
31
|
exports.AddressBlock = AddressBlock;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AddressBlock.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AddressBlock.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -21,12 +21,12 @@ exports.LinkColors = void 0;
|
|
|
21
21
|
LinkColors[LinkColors["link"] = 0] = "link";
|
|
22
22
|
LinkColors[LinkColors["black"] = 1] = "black";
|
|
23
23
|
})(exports.LinkColors || (exports.LinkColors = {}));
|
|
24
|
-
function
|
|
24
|
+
function Link(_a) {
|
|
25
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, children = _a.children;
|
|
26
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 },
|
|
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
|
}
|
|
30
30
|
|
|
31
|
-
exports.
|
|
31
|
+
exports.Link = Link;
|
|
32
32
|
//# sourceMappingURL=Link.js.map
|
|
@@ -121,7 +121,7 @@ exports.InfoWithButtonBlock = InfoTextBlock.InfoWithButtonBlock;
|
|
|
121
121
|
exports.LayoutBox = LayoutBox.LayoutBox;
|
|
122
122
|
exports.ListItem = ListItem.ListItem;
|
|
123
123
|
exports.ListItemWithRadio = ListItemWithRadio.ListItemWithRadio;
|
|
124
|
-
exports.
|
|
124
|
+
exports.Link = Link.Link;
|
|
125
125
|
Object.defineProperty(exports, 'LinkColors', {
|
|
126
126
|
enumerable: true,
|
|
127
127
|
get: function () {
|
|
@@ -3,24 +3,21 @@ import { H3, BodyText } from '@citygross/typography';
|
|
|
3
3
|
import { AddressOption } from './AddressBlock.styles.js';
|
|
4
4
|
|
|
5
5
|
function AddressBlock(_a) {
|
|
6
|
-
var _b = _a.deliverOption, deliverOption = _b === void 0 ? 'Address' : _b, icon = _a.icon, storeName = _a.storeName, customerName = _a.customerName, street = _a.street, zipCode = _a.zipCode, city = _a.city, doorCode = _a.doorCode, floor = _a.floor;
|
|
6
|
+
var _b = _a.deliverOption, deliverOption = _b === void 0 ? 'Address' : _b, icon = _a.icon, storeName = _a.storeName, customerName = _a.customerName, street = _a.street, zipCode = _a.zipCode, city = _a.city, doorCode = _a.doorCode, floor = _a.floor, deliveryInstructions = _a.deliveryInstructions;
|
|
7
7
|
return (React.createElement(React.Fragment, null,
|
|
8
8
|
React.createElement(AddressOption, null,
|
|
9
9
|
icon && icon,
|
|
10
10
|
deliverOption && React.createElement(H3, null, deliverOption)),
|
|
11
11
|
storeName && React.createElement(H3, null, storeName),
|
|
12
12
|
customerName && React.createElement(BodyText, null, customerName),
|
|
13
|
+
React.createElement(BodyText, null, street),
|
|
13
14
|
React.createElement(BodyText, null,
|
|
14
|
-
street,
|
|
15
|
-
", ",
|
|
16
15
|
zipCode,
|
|
17
16
|
" ",
|
|
18
17
|
city),
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
" ",
|
|
23
|
-
floor))));
|
|
18
|
+
doorCode && (React.createElement(BodyText, null, doorCode)),
|
|
19
|
+
floor && (React.createElement(BodyText, null, floor)),
|
|
20
|
+
deliveryInstructions && (deliveryInstructions)));
|
|
24
21
|
}
|
|
25
22
|
|
|
26
23
|
export { AddressBlock };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AddressBlock.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AddressBlock.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -13,12 +13,12 @@ var LinkColors;
|
|
|
13
13
|
LinkColors[LinkColors["link"] = 0] = "link";
|
|
14
14
|
LinkColors[LinkColors["black"] = 1] = "black";
|
|
15
15
|
})(LinkColors || (LinkColors = {}));
|
|
16
|
-
function
|
|
16
|
+
function Link(_a) {
|
|
17
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, children = _a.children;
|
|
18
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 },
|
|
19
19
|
React.createElement(LinkText, { size: size }, children),
|
|
20
20
|
icon && React.createElement(IconWrapper, null, icon)));
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
export {
|
|
23
|
+
export { Link, LinkColors, LinkSize };
|
|
24
24
|
//# sourceMappingURL=Link.js.map
|
|
@@ -35,7 +35,7 @@ export { InfoWithButtonBlock } from './components/InfoTextBlock/InfoTextBlock.js
|
|
|
35
35
|
export { LayoutBox } from './components/LayoutBox/LayoutBox.js';
|
|
36
36
|
export { ListItem } from './components/ListItem/ListItem.js';
|
|
37
37
|
export { ListItemWithRadio } from './components/ListItemWithRadio/ListItemWithRadio.js';
|
|
38
|
-
export {
|
|
38
|
+
export { Link, LinkColors, LinkSize } from './components/Links/Link.js';
|
|
39
39
|
export { Modal } from './components/Modal/Modal.js';
|
|
40
40
|
export { RadioBoxItem } from './components/RadioBox/RadioBoxItem.js';
|
|
41
41
|
export { RadioBoxList } from './components/RadioBox/RadioBoxList.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@citygross/components",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.68",
|
|
4
4
|
"license": "ISC",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "./build/cjs/components/src/index.js",
|
|
@@ -65,11 +65,11 @@
|
|
|
65
65
|
"@citygross/design-tokens": "^0.2.22",
|
|
66
66
|
"@citygross/icons": "^0.1.3",
|
|
67
67
|
"@citygross/react-use-bg-wizard": "^0.0.8",
|
|
68
|
-
"@citygross/typography": "^0.0.
|
|
68
|
+
"@citygross/typography": "^0.0.51",
|
|
69
69
|
"@citygross/utils": "^0.0.21",
|
|
70
70
|
"framer-motion": "^4.1.17",
|
|
71
71
|
"moment": "^2.29.1",
|
|
72
72
|
"react-loading-skeleton": "^2.2.0"
|
|
73
73
|
},
|
|
74
|
-
"gitHead": "
|
|
74
|
+
"gitHead": "be6c8b4f4b4c721787c6c9c3cac0117dbfa46e89"
|
|
75
75
|
}
|