@citygross/components 0.7.64 → 0.7.67
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 -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/@types/components/ProgressBar/ProgressBar.d.ts +7 -0
- package/build/@types/components/ProgressBar/ProgressBar.stories.d.ts +28 -0
- package/build/@types/components/ProgressBar/ProgressBar.styled.d.ts +10 -0
- package/build/@types/index.d.ts +1 -0
- package/build/cjs/components/src/components/AddressBlock/AddressBlock.js +3 -6
- package/build/cjs/components/src/components/AddressBlock/AddressBlock.js.map +1 -1
- package/build/cjs/components/src/components/DeliverySlotItem/DeliverySlotItem.js +9 -2
- package/build/cjs/components/src/components/DeliverySlotItem/DeliverySlotItem.js.map +1 -1
- package/build/cjs/components/src/components/Links/Link.js +2 -2
- package/build/cjs/components/src/components/ProgressBar/ProgressBar.js +22 -0
- package/build/cjs/components/src/components/ProgressBar/ProgressBar.js.map +1 -0
- package/build/cjs/components/src/components/ProgressBar/ProgressBar.styled.js +18 -0
- package/build/cjs/components/src/components/ProgressBar/ProgressBar.styled.js.map +1 -0
- package/build/cjs/components/src/components/WarningLabel/WarningLabel.js +1 -0
- package/build/cjs/components/src/components/WarningLabel/WarningLabel.js.map +1 -1
- package/build/cjs/components/src/index.js +3 -1
- package/build/cjs/components/src/index.js.map +1 -1
- package/build/es/components/src/components/AddressBlock/AddressBlock.js +3 -6
- package/build/es/components/src/components/AddressBlock/AddressBlock.js.map +1 -1
- package/build/es/components/src/components/DeliverySlotItem/DeliverySlotItem.js +9 -2
- package/build/es/components/src/components/DeliverySlotItem/DeliverySlotItem.js.map +1 -1
- package/build/es/components/src/components/Links/Link.js +2 -2
- package/build/es/components/src/components/ProgressBar/ProgressBar.js +14 -0
- package/build/es/components/src/components/ProgressBar/ProgressBar.js.map +1 -0
- package/build/es/components/src/components/ProgressBar/ProgressBar.styled.js +9 -0
- package/build/es/components/src/components/ProgressBar/ProgressBar.styled.js.map +1 -0
- package/build/es/components/src/components/WarningLabel/WarningLabel.js +1 -0
- package/build/es/components/src/components/WarningLabel/WarningLabel.js.map +1 -1
- package/build/es/components/src/index.js +2 -1
- package/build/es/components/src/index.js.map +1 -1
- package/package.json +3 -3
|
@@ -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>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Story } from '@storybook/react';
|
|
2
|
+
import { ProgressBar, TProgressBar } from './ProgressBar';
|
|
3
|
+
declare const _default: {
|
|
4
|
+
component: typeof ProgressBar;
|
|
5
|
+
title: string;
|
|
6
|
+
argTypes: {
|
|
7
|
+
background: {
|
|
8
|
+
options: string[];
|
|
9
|
+
mapping: import("@citygross/design-tokens").Palette | never[];
|
|
10
|
+
control: {
|
|
11
|
+
type: string;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
color: {
|
|
15
|
+
options: string[];
|
|
16
|
+
mapping: import("@citygross/design-tokens").Palette | never[];
|
|
17
|
+
control: {
|
|
18
|
+
type: string;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
args: {
|
|
23
|
+
maxValue: number;
|
|
24
|
+
currentValue: number;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
export default _default;
|
|
28
|
+
export declare const Default: Story<TProgressBar>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare type TProgressContainer = {
|
|
2
|
+
color?: string;
|
|
3
|
+
};
|
|
4
|
+
export declare type TProgress = TProgressContainer & {
|
|
5
|
+
width: number;
|
|
6
|
+
};
|
|
7
|
+
export declare const BarContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, TProgressContainer, never>;
|
|
8
|
+
export declare const Progress: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, TProgressContainer & {
|
|
9
|
+
width: number;
|
|
10
|
+
}, never>;
|
package/build/@types/index.d.ts
CHANGED
|
@@ -41,6 +41,7 @@ export * from './components/Modal/Modal';
|
|
|
41
41
|
export * from './components/RadioBox';
|
|
42
42
|
export * from './components/RadioGroup';
|
|
43
43
|
export * from './components/RadioListItem/RadioListItem';
|
|
44
|
+
export * from './components/ProgressBar/ProgressBar';
|
|
44
45
|
export * from './components/RippleContainer/RippleContainer';
|
|
45
46
|
export * from './components/Select/Select';
|
|
46
47
|
export * from './components/Spacer/Spacer';
|
|
@@ -18,16 +18,13 @@ function AddressBlock(_a) {
|
|
|
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
|
-
floor))));
|
|
26
|
+
doorCode && (React__default['default'].createElement(typography.BodyText, null, doorCode)),
|
|
27
|
+
floor && (React__default['default'].createElement(typography.BodyText, null, floor))));
|
|
31
28
|
}
|
|
32
29
|
|
|
33
30
|
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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -60,16 +60,23 @@ function DeliverySlotItem(_a) {
|
|
|
60
60
|
var options = {
|
|
61
61
|
root: null,
|
|
62
62
|
rootMargin: '0px',
|
|
63
|
-
threshold: 0.
|
|
63
|
+
threshold: 0.9
|
|
64
64
|
};
|
|
65
65
|
React.useEffect(function () {
|
|
66
|
+
if (!('IntersectionObserver' in window) ||
|
|
67
|
+
!('IntersectionObserverEntry' in window) ||
|
|
68
|
+
!('intersectionRatio' in window.IntersectionObserverEntry.prototype)) {
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
66
71
|
var observer = new IntersectionObserver(callbackFn, options);
|
|
67
72
|
if (!observer)
|
|
68
73
|
return;
|
|
69
74
|
if (slotRef.current)
|
|
70
75
|
observer.observe(slotRef === null || slotRef === void 0 ? void 0 : slotRef.current);
|
|
71
76
|
return function () {
|
|
72
|
-
observer
|
|
77
|
+
if (observer) {
|
|
78
|
+
observer.disconnect();
|
|
79
|
+
}
|
|
73
80
|
};
|
|
74
81
|
}, [slotRef, options]);
|
|
75
82
|
var removeLeadingZero = function (day) { return day.replace(/^0+/, ''); };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DeliverySlotItem.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DeliverySlotItem.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
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var designTokens = require('@citygross/design-tokens');
|
|
6
|
+
var React = require('react');
|
|
7
|
+
var ProgressBar_styled = require('./ProgressBar.styled.js');
|
|
8
|
+
|
|
9
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
10
|
+
|
|
11
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
12
|
+
|
|
13
|
+
function ProgressBar(_a) {
|
|
14
|
+
var _b, _c;
|
|
15
|
+
var maxValue = _a.maxValue, currentValue = _a.currentValue, _d = _a.background, background = _d === void 0 ? (_b = designTokens.theme.palette) === null || _b === void 0 ? void 0 : _b.white : _d, _e = _a.color, color = _e === void 0 ? (_c = designTokens.theme.palette) === null || _c === void 0 ? void 0 : _c.alertBlue : _e;
|
|
16
|
+
var progress = (currentValue / maxValue) * 100;
|
|
17
|
+
return (React__default['default'].createElement(ProgressBar_styled.BarContainer, { color: background },
|
|
18
|
+
React__default['default'].createElement(ProgressBar_styled.Progress, { width: progress, color: color })));
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
exports.ProgressBar = ProgressBar;
|
|
22
|
+
//# sourceMappingURL=ProgressBar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProgressBar.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var _tslib = require('../../../../_virtual/_tslib.js');
|
|
6
|
+
var styled = require('styled-components');
|
|
7
|
+
|
|
8
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
9
|
+
|
|
10
|
+
var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
|
|
11
|
+
|
|
12
|
+
var BarContainer = styled__default['default'].div(templateObject_1 || (templateObject_1 = _tslib.__makeTemplateObject(["\n background: ", ";\n border-radius: ", "px;\n height: ", "px;\n overflow: hidden;\n"], ["\n background: ", ";\n border-radius: ", "px;\n height: ", "px;\n overflow: hidden;\n"])), function (props) { return props.color; }, function (props) { var _a; return (_a = props.theme.attributes) === null || _a === void 0 ? void 0 : _a.borderRadius.default; }, function (props) { var _a; return (_a = props.theme.spacings) === null || _a === void 0 ? void 0 : _a.xs; });
|
|
13
|
+
var Progress = styled__default['default'].div(templateObject_2 || (templateObject_2 = _tslib.__makeTemplateObject(["\n width: ", "%;\n background: ", ";\n height: 100%;\n"], ["\n width: ", "%;\n background: ", ";\n height: 100%;\n"])), function (props) { return props.width || 0; }, function (props) { return props.color; });
|
|
14
|
+
var templateObject_1, templateObject_2;
|
|
15
|
+
|
|
16
|
+
exports.BarContainer = BarContainer;
|
|
17
|
+
exports.Progress = Progress;
|
|
18
|
+
//# sourceMappingURL=ProgressBar.styled.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProgressBar.styled.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;"}
|
|
@@ -55,6 +55,7 @@ require('../RadioBox/RadioBoxItem.styles.js');
|
|
|
55
55
|
require('../RadioBox/RadioBoxList.styles.js');
|
|
56
56
|
require('../RadioGroup/RadioGroup.styles.js');
|
|
57
57
|
require('../RadioListItem/RadioListItem.styles.js');
|
|
58
|
+
require('../ProgressBar/ProgressBar.styled.js');
|
|
58
59
|
require('../RippleContainer/RippleContainer.styles.js');
|
|
59
60
|
require('../Select/Select.styles.js');
|
|
60
61
|
require('../Stepper/Stepper.styles.js');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WarningLabel.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"WarningLabel.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -45,6 +45,7 @@ var RadioBoxItem = require('./components/RadioBox/RadioBoxItem.js');
|
|
|
45
45
|
var RadioBoxList = require('./components/RadioBox/RadioBoxList.js');
|
|
46
46
|
var RadioGroup = require('./components/RadioGroup/RadioGroup.js');
|
|
47
47
|
var RadioListItem = require('./components/RadioListItem/RadioListItem.js');
|
|
48
|
+
var ProgressBar = require('./components/ProgressBar/ProgressBar.js');
|
|
48
49
|
var RippleContainer = require('./components/RippleContainer/RippleContainer.js');
|
|
49
50
|
var Select = require('./components/Select/Select.js');
|
|
50
51
|
var Spacer = require('./components/Spacer/Spacer.js');
|
|
@@ -120,7 +121,7 @@ exports.InfoWithButtonBlock = InfoTextBlock.InfoWithButtonBlock;
|
|
|
120
121
|
exports.LayoutBox = LayoutBox.LayoutBox;
|
|
121
122
|
exports.ListItem = ListItem.ListItem;
|
|
122
123
|
exports.ListItemWithRadio = ListItemWithRadio.ListItemWithRadio;
|
|
123
|
-
exports.
|
|
124
|
+
exports.Link = Link.Link;
|
|
124
125
|
Object.defineProperty(exports, 'LinkColors', {
|
|
125
126
|
enumerable: true,
|
|
126
127
|
get: function () {
|
|
@@ -138,6 +139,7 @@ exports.RadioBoxItem = RadioBoxItem.RadioBoxItem;
|
|
|
138
139
|
exports.RadioBoxList = RadioBoxList.RadioBoxList;
|
|
139
140
|
exports.RadioGroup = RadioGroup.RadioGroup;
|
|
140
141
|
exports.RadioListItem = RadioListItem.RadioListItem;
|
|
142
|
+
exports.ProgressBar = ProgressBar.ProgressBar;
|
|
141
143
|
exports.RippleContainer = RippleContainer.RippleContainer;
|
|
142
144
|
exports.Select = Select.Select;
|
|
143
145
|
exports.Spacer = Spacer.Spacer;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -10,16 +10,13 @@ function AddressBlock(_a) {
|
|
|
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
|
-
floor))));
|
|
18
|
+
doorCode && (React.createElement(BodyText, null, doorCode)),
|
|
19
|
+
floor && (React.createElement(BodyText, null, floor))));
|
|
23
20
|
}
|
|
24
21
|
|
|
25
22
|
export { AddressBlock };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AddressBlock.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AddressBlock.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -52,16 +52,23 @@ function DeliverySlotItem(_a) {
|
|
|
52
52
|
var options = {
|
|
53
53
|
root: null,
|
|
54
54
|
rootMargin: '0px',
|
|
55
|
-
threshold: 0.
|
|
55
|
+
threshold: 0.9
|
|
56
56
|
};
|
|
57
57
|
useEffect(function () {
|
|
58
|
+
if (!('IntersectionObserver' in window) ||
|
|
59
|
+
!('IntersectionObserverEntry' in window) ||
|
|
60
|
+
!('intersectionRatio' in window.IntersectionObserverEntry.prototype)) {
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
58
63
|
var observer = new IntersectionObserver(callbackFn, options);
|
|
59
64
|
if (!observer)
|
|
60
65
|
return;
|
|
61
66
|
if (slotRef.current)
|
|
62
67
|
observer.observe(slotRef === null || slotRef === void 0 ? void 0 : slotRef.current);
|
|
63
68
|
return function () {
|
|
64
|
-
observer
|
|
69
|
+
if (observer) {
|
|
70
|
+
observer.disconnect();
|
|
71
|
+
}
|
|
65
72
|
};
|
|
66
73
|
}, [slotRef, options]);
|
|
67
74
|
var removeLeadingZero = function (day) { return day.replace(/^0+/, ''); };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DeliverySlotItem.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DeliverySlotItem.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
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { theme } from '@citygross/design-tokens';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { BarContainer, Progress } from './ProgressBar.styled.js';
|
|
4
|
+
|
|
5
|
+
function ProgressBar(_a) {
|
|
6
|
+
var _b, _c;
|
|
7
|
+
var maxValue = _a.maxValue, currentValue = _a.currentValue, _d = _a.background, background = _d === void 0 ? (_b = theme.palette) === null || _b === void 0 ? void 0 : _b.white : _d, _e = _a.color, color = _e === void 0 ? (_c = theme.palette) === null || _c === void 0 ? void 0 : _c.alertBlue : _e;
|
|
8
|
+
var progress = (currentValue / maxValue) * 100;
|
|
9
|
+
return (React.createElement(BarContainer, { color: background },
|
|
10
|
+
React.createElement(Progress, { width: progress, color: color })));
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export { ProgressBar };
|
|
14
|
+
//# sourceMappingURL=ProgressBar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProgressBar.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { __makeTemplateObject } from '../../../../_virtual/_tslib.js';
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
|
|
4
|
+
var BarContainer = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n background: ", ";\n border-radius: ", "px;\n height: ", "px;\n overflow: hidden;\n"], ["\n background: ", ";\n border-radius: ", "px;\n height: ", "px;\n overflow: hidden;\n"])), function (props) { return props.color; }, function (props) { var _a; return (_a = props.theme.attributes) === null || _a === void 0 ? void 0 : _a.borderRadius.default; }, function (props) { var _a; return (_a = props.theme.spacings) === null || _a === void 0 ? void 0 : _a.xs; });
|
|
5
|
+
var Progress = styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n width: ", "%;\n background: ", ";\n height: 100%;\n"], ["\n width: ", "%;\n background: ", ";\n height: 100%;\n"])), function (props) { return props.width || 0; }, function (props) { return props.color; });
|
|
6
|
+
var templateObject_1, templateObject_2;
|
|
7
|
+
|
|
8
|
+
export { BarContainer, Progress };
|
|
9
|
+
//# sourceMappingURL=ProgressBar.styled.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProgressBar.styled.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;"}
|
|
@@ -51,6 +51,7 @@ import '../RadioBox/RadioBoxItem.styles.js';
|
|
|
51
51
|
import '../RadioBox/RadioBoxList.styles.js';
|
|
52
52
|
import '../RadioGroup/RadioGroup.styles.js';
|
|
53
53
|
import '../RadioListItem/RadioListItem.styles.js';
|
|
54
|
+
import '../ProgressBar/ProgressBar.styled.js';
|
|
54
55
|
import '../RippleContainer/RippleContainer.styles.js';
|
|
55
56
|
import '../Select/Select.styles.js';
|
|
56
57
|
import '../Stepper/Stepper.styles.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WarningLabel.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"WarningLabel.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -35,12 +35,13 @@ 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';
|
|
42
42
|
export { RadioGroup } from './components/RadioGroup/RadioGroup.js';
|
|
43
43
|
export { RadioListItem } from './components/RadioListItem/RadioListItem.js';
|
|
44
|
+
export { ProgressBar } from './components/ProgressBar/ProgressBar.js';
|
|
44
45
|
export { RippleContainer } from './components/RippleContainer/RippleContainer.js';
|
|
45
46
|
export { Select } from './components/Select/Select.js';
|
|
46
47
|
export { Spacer } from './components/Spacer/Spacer.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.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.67",
|
|
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": "d3e70d3ccf91ea2cbe3f2d67624f2755e780d365"
|
|
75
75
|
}
|