@occmundial/occ-atomic 3.0.0-beta.19 → 3.0.0-beta.20
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +15 -0
- package/build/Banner/Banner.js +14 -14
- package/build/Banner/Banner.test.js +64 -17
- package/build/Banner/__snapshots__/Banner.test.js.snap +0 -28
- package/build/Banner/index.js +1 -6
- package/build/Tip/Tip.js +24 -22
- package/build/Tip/Tip.test.js +31 -2
- package/build/Tip/__snapshots__/Tip.test.js.snap +38 -30
- package/build/Tip/styles.js +25 -24
- package/package.json +1 -1
- package/build/Banner/styles.js +0 -41
package/CHANGELOG.md
CHANGED
@@ -1,3 +1,18 @@
|
|
1
|
+
# [3.0.0-beta.20](https://github.com/occmundial/occ-atomic/compare/v3.0.0-beta.19...v3.0.0-beta.20) (2024-06-25)
|
2
|
+
|
3
|
+
|
4
|
+
### Bug Fixes
|
5
|
+
|
6
|
+
* Add condition to set test id prop ([4e90cea](https://github.com/occmundial/occ-atomic/commit/4e90cea0a6f5c627c8b2a398a9aef449fa3e1b7c))
|
7
|
+
* Adjust tip styles and add banner prop ([04d17ff](https://github.com/occmundial/occ-atomic/commit/04d17ff0fe74186da32d15f91001406344867bb4))
|
8
|
+
* Merge beta changes ([218b68a](https://github.com/occmundial/occ-atomic/commit/218b68a7347b025dc2cdd8171f7d4c22bbd383f1))
|
9
|
+
* Resolve component data conflicts ([c390f1f](https://github.com/occmundial/occ-atomic/commit/c390f1f485415dc15251386527c0caaa70e9814f))
|
10
|
+
|
11
|
+
|
12
|
+
### Features
|
13
|
+
|
14
|
+
* Add test id prop and add new tests ([aba7d32](https://github.com/occmundial/occ-atomic/commit/aba7d3215e0b19e635b53546f66accd327ebed42))
|
15
|
+
|
1
16
|
# [3.0.0-beta.19](https://github.com/occmundial/occ-atomic/compare/v3.0.0-beta.18...v3.0.0-beta.19) (2024-06-21)
|
2
17
|
|
3
18
|
|
package/build/Banner/Banner.js
CHANGED
@@ -9,10 +9,6 @@ var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
|
10
10
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
11
11
|
|
12
|
-
var _WindowSize = _interopRequireDefault(require("../WindowSize"));
|
13
|
-
|
14
|
-
var _grid = _interopRequireDefault(require("../subatomic/grid"));
|
15
|
-
|
16
12
|
var _Tip = _interopRequireDefault(require("../Tip"));
|
17
13
|
|
18
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
@@ -23,21 +19,23 @@ var Banner = function Banner(_ref) {
|
|
23
19
|
className = _ref.className,
|
24
20
|
children = _ref.children,
|
25
21
|
onClose = _ref.onClose,
|
26
|
-
winWidth = _ref.winWidth,
|
27
22
|
cta = _ref.cta,
|
28
23
|
_ref$theme = _ref.theme,
|
29
|
-
theme = _ref$theme === void 0 ? 'promote' : _ref$theme
|
24
|
+
theme = _ref$theme === void 0 ? 'promote' : _ref$theme,
|
25
|
+
_ref$size = _ref.size,
|
26
|
+
size = _ref$size === void 0 ? 'large' : _ref$size,
|
27
|
+
testId = _ref.testId;
|
30
28
|
return /*#__PURE__*/_react["default"].createElement(_Tip["default"], {
|
31
29
|
id: id,
|
32
30
|
style: style,
|
33
31
|
className: className,
|
34
32
|
onClose: onClose,
|
35
|
-
|
36
|
-
center: true,
|
37
|
-
type: "banner",
|
33
|
+
banner: true,
|
38
34
|
cta: cta,
|
39
35
|
theme: theme,
|
40
|
-
icon: true
|
36
|
+
icon: true,
|
37
|
+
size: size,
|
38
|
+
testId: testId
|
41
39
|
}, children);
|
42
40
|
};
|
43
41
|
|
@@ -58,9 +56,11 @@ Banner.propTypes = {
|
|
58
56
|
target: _propTypes["default"].string,
|
59
57
|
onClick: _propTypes["default"].func
|
60
58
|
}),
|
61
|
-
theme: _propTypes["default"].oneOf(['info', 'warning', 'success', 'error', 'promote'])
|
62
|
-
|
63
|
-
|
64
|
-
var _default = (0, _WindowSize["default"])(Banner);
|
59
|
+
theme: _propTypes["default"].oneOf(['info', 'warning', 'success', 'error', 'promote']),
|
60
|
+
size: _propTypes["default"].oneOf(['large', 'small']),
|
65
61
|
|
62
|
+
/** The testId property adds the data attribute data-testid to the main element and should be used for testing only. */
|
63
|
+
testId: _propTypes["default"].string
|
64
|
+
};
|
65
|
+
var _default = Banner;
|
66
66
|
exports["default"] = _default;
|
@@ -6,35 +6,82 @@ var _enzyme = require("enzyme");
|
|
6
6
|
|
7
7
|
var _Banner = _interopRequireDefault(require("./Banner"));
|
8
8
|
|
9
|
-
var _styles = _interopRequireDefault(require("./styles"));
|
10
|
-
|
11
9
|
var _index = _interopRequireDefault(require("./index"));
|
12
10
|
|
13
11
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
14
12
|
|
15
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
16
|
-
|
17
|
-
var reduceClasses = function reduceClasses(prev, curr) {
|
18
|
-
return Object.assign({}, prev, _defineProperty({}, curr, curr));
|
19
|
-
};
|
20
|
-
|
21
|
-
var classes = Object.keys(_styles["default"]).reduce(reduceClasses, {});
|
22
13
|
describe("Banner", function () {
|
23
14
|
it('matches the snapshot', function () {
|
24
15
|
var wrapper = (0, _enzyme.shallow)( /*#__PURE__*/_react["default"].createElement(_Banner["default"], {
|
25
|
-
|
26
|
-
|
16
|
+
onClose: function onClose() {},
|
17
|
+
cta: {
|
18
|
+
text: 'Lorem ipsum.',
|
19
|
+
onClick: function onClick() {
|
20
|
+
return alert('CTA clicked!');
|
21
|
+
}
|
22
|
+
},
|
23
|
+
theme: "info"
|
24
|
+
}, "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat"));
|
27
25
|
expect(wrapper).toMatchSnapshot();
|
28
26
|
});
|
27
|
+
it('Has content centered', function () {
|
28
|
+
var wrapper = (0, _enzyme.shallow)( /*#__PURE__*/_react["default"].createElement(_Banner["default"], {
|
29
|
+
onClose: function onClose() {},
|
30
|
+
cta: {
|
31
|
+
text: 'Lorem ipsum.',
|
32
|
+
onClick: function onClick() {
|
33
|
+
return alert('CTA clicked!');
|
34
|
+
}
|
35
|
+
},
|
36
|
+
theme: "info"
|
37
|
+
}, "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat"));
|
38
|
+
expect(wrapper.prop('banner')).toEqual(true);
|
39
|
+
});
|
40
|
+
it('has a close icon button', function () {
|
41
|
+
var wrapper = (0, _enzyme.mount)( /*#__PURE__*/_react["default"].createElement(_Banner["default"], {
|
42
|
+
onClose: function onClose() {},
|
43
|
+
cta: {
|
44
|
+
text: 'Lorem ipsum.',
|
45
|
+
onClick: function onClick() {
|
46
|
+
return alert('CTA clicked!');
|
47
|
+
}
|
48
|
+
},
|
49
|
+
theme: "info",
|
50
|
+
testId: "banner-test"
|
51
|
+
}, "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat"));
|
52
|
+
expect(wrapper.find({
|
53
|
+
"data-testid": 'banner-test__close-icon'
|
54
|
+
}).length).toBe(1);
|
55
|
+
});
|
56
|
+
it('has a link', function () {
|
57
|
+
var wrapper = (0, _enzyme.mount)( /*#__PURE__*/_react["default"].createElement(_Banner["default"], {
|
58
|
+
onClose: function onClose() {},
|
59
|
+
cta: {
|
60
|
+
text: 'Lorem ipsum.',
|
61
|
+
onClick: function onClick() {
|
62
|
+
return alert('CTA clicked!');
|
63
|
+
}
|
64
|
+
},
|
65
|
+
theme: "info",
|
66
|
+
testId: "banner-test"
|
67
|
+
}, "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat"));
|
68
|
+
expect(wrapper.find({
|
69
|
+
"data-testid": 'banner-test__link'
|
70
|
+
}).length).toBe(1);
|
71
|
+
});
|
29
72
|
});
|
30
73
|
describe("BannerJSS", function () {
|
31
74
|
it('matches the snapshot', function () {
|
32
|
-
var wrapper = (0, _enzyme.shallow)( /*#__PURE__*/_react["default"].createElement(_index["default"],
|
75
|
+
var wrapper = (0, _enzyme.shallow)( /*#__PURE__*/_react["default"].createElement(_index["default"], {
|
76
|
+
onClose: function onClose() {},
|
77
|
+
cta: {
|
78
|
+
text: 'Lorem ipsum.',
|
79
|
+
onClick: function onClick() {
|
80
|
+
return alert('CTA clicked!');
|
81
|
+
}
|
82
|
+
},
|
83
|
+
theme: "info"
|
84
|
+
}, "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat"));
|
33
85
|
expect(wrapper).toMatchSnapshot();
|
34
86
|
});
|
35
|
-
});
|
36
|
-
describe("Banner styles", function () {
|
37
|
-
it('matches the snapshot', function () {
|
38
|
-
expect(_styles["default"]).toMatchSnapshot();
|
39
|
-
});
|
40
87
|
});
|
@@ -2,32 +2,4 @@
|
|
2
2
|
|
3
3
|
exports[`Banner matches the snapshot 1`] = `ShallowWrapper {}`;
|
4
4
|
|
5
|
-
exports[`Banner styles matches the snapshot 1`] = `
|
6
|
-
Object {
|
7
|
-
"container": Object {
|
8
|
-
"backgroundColor": "#222222",
|
9
|
-
"padding": 16,
|
10
|
-
},
|
11
|
-
"icon": Object {
|
12
|
-
"cursor": "pointer",
|
13
|
-
},
|
14
|
-
"iconFlex": Object {
|
15
|
-
"@media screen and (min-width:576px)": Object {
|
16
|
-
"padding": 0,
|
17
|
-
},
|
18
|
-
"paddingLeft": 16,
|
19
|
-
"paddingTop": 16,
|
20
|
-
},
|
21
|
-
"textBanner": Object {
|
22
|
-
"display": "inline-block",
|
23
|
-
},
|
24
|
-
"textFlex": Object {
|
25
|
-
"@media screen and (min-width:576px)": Object {
|
26
|
-
"textAlign": "center",
|
27
|
-
},
|
28
|
-
"textAlign": "start",
|
29
|
-
},
|
30
|
-
}
|
31
|
-
`;
|
32
|
-
|
33
5
|
exports[`BannerJSS matches the snapshot 1`] = `ShallowWrapper {}`;
|
package/build/Banner/index.js
CHANGED
@@ -5,14 +5,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
});
|
6
6
|
exports["default"] = void 0;
|
7
7
|
|
8
|
-
var _reactJss = _interopRequireDefault(require("react-jss"));
|
9
|
-
|
10
8
|
var _Banner = _interopRequireDefault(require("./Banner"));
|
11
9
|
|
12
|
-
var _styles = _interopRequireDefault(require("./styles"));
|
13
|
-
|
14
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
15
11
|
|
16
|
-
var _default =
|
17
|
-
|
12
|
+
var _default = _Banner["default"];
|
18
13
|
exports["default"] = _default;
|
package/build/Tip/Tip.js
CHANGED
@@ -21,6 +21,8 @@ var _colors = _interopRequireDefault(require("../tokens/colors.json"));
|
|
21
21
|
|
22
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
23
23
|
|
24
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
25
|
+
|
24
26
|
var icons = {
|
25
27
|
info: 'info-circle',
|
26
28
|
warning: 'alert',
|
@@ -45,15 +47,13 @@ var Tip = function Tip(_ref) {
|
|
45
47
|
classes = _ref.classes,
|
46
48
|
icon = _ref.icon,
|
47
49
|
theme = _ref.theme,
|
48
|
-
|
49
|
-
center = _ref.center,
|
50
|
+
banner = _ref.banner,
|
50
51
|
onClose = _ref.onClose,
|
51
52
|
children = _ref.children,
|
52
53
|
cta = _ref.cta,
|
53
54
|
_ref$size = _ref.size,
|
54
55
|
size = _ref$size === void 0 ? 'large' : _ref$size,
|
55
|
-
|
56
|
-
type = _ref$type === void 0 ? 'alert' : _ref$type;
|
56
|
+
testId = _ref.testId;
|
57
57
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
58
58
|
id: id,
|
59
59
|
className: className,
|
@@ -61,35 +61,38 @@ var Tip = function Tip(_ref) {
|
|
61
61
|
}, /*#__PURE__*/_react["default"].createElement(_Flexbox["default"], {
|
62
62
|
justifyContent: "start",
|
63
63
|
display: "flex",
|
64
|
-
className: "".concat(classes.container, " ").concat(classes[theme]).concat(
|
64
|
+
className: "".concat(classes.container, " ").concat(classes[theme]).concat(banner ? " ".concat(classes.noBorderRadius) : '')
|
65
65
|
}, /*#__PURE__*/_react["default"].createElement(_Flexbox["default"], {
|
66
66
|
display: "flex",
|
67
67
|
flex: "1",
|
68
|
-
|
69
|
-
alignItems: "stretch",
|
70
|
-
className: type === 'banner' ? classes.bannerContent : ''
|
68
|
+
alignItems: "stretch"
|
71
69
|
}, icon && theme !== PROMOTE && /*#__PURE__*/_react["default"].createElement(_Icon["default"], {
|
72
70
|
iconName: icons[theme],
|
73
71
|
className: classes.icon,
|
74
72
|
colors: [theme === 'info' ? _colors["default"].icon.brand["default"] : _colors["default"].icon[theme]]
|
75
73
|
}), /*#__PURE__*/_react["default"].createElement(_Flexbox["default"], {
|
76
74
|
display: "flex",
|
77
|
-
direction: size === 'small' ? 'col' : 'row'
|
75
|
+
direction: size === 'small' ? 'col' : 'row',
|
76
|
+
justifyContent: banner ? 'center' : 'start',
|
77
|
+
className: "".concat(classes.textContainer).concat(banner ? " ".concat(classes.maxWidth) : '')
|
78
78
|
}, /*#__PURE__*/_react["default"].createElement(_TipText["default"], {
|
79
|
-
classes: "".concat(classes.normalText, " ").concat(classes[colorTextClasses[theme]]),
|
79
|
+
classes: "".concat(classes.normalText, " ").concat(classes[colorTextClasses[theme]]).concat(!banner ? " ".concat(classes.growText) : ''),
|
80
80
|
text: children
|
81
|
-
}), cta && /*#__PURE__*/_react["default"].createElement("a", {
|
82
|
-
className: "".concat(classes.cta, " ").concat(size === '
|
81
|
+
}), cta && /*#__PURE__*/_react["default"].createElement("a", _extends({
|
82
|
+
className: "".concat(classes.cta, " ").concat(classes[colorTextClasses[theme]]).concat(size === 'large' && banner ? " ".concat(classes.ctaBanner) : size === 'large' ? " ".concat(classes.ctaAlert) : ''),
|
83
83
|
href: cta.href,
|
84
84
|
target: cta.target,
|
85
85
|
onClick: cta.onClick
|
86
|
-
},
|
86
|
+
}, testId && {
|
87
|
+
'data-testid': "".concat(testId, "__link")
|
88
|
+
}), cta.text))), onClose && /*#__PURE__*/_react["default"].createElement(_Button["default"], _extends({
|
87
89
|
onClick: onClose,
|
88
|
-
className: classes.
|
89
|
-
size: type === 'banner' ? 'lg' : 'md',
|
90
|
+
className: size === 'small' ? classes.closeIconSmallMargin : classes.closeIconMargin,
|
90
91
|
icon: "x",
|
91
92
|
theme: theme === PROMOTE ? 'ghostWhite' : 'ghostGrey'
|
92
|
-
}
|
93
|
+
}, testId && {
|
94
|
+
testId: "".concat(testId, "__close-icon")
|
95
|
+
}))));
|
93
96
|
};
|
94
97
|
|
95
98
|
Tip.defaultProps = {
|
@@ -116,11 +119,8 @@ Tip.propTypes = {
|
|
116
119
|
/** Boolean to show an icon. */
|
117
120
|
icon: _propTypes["default"].bool,
|
118
121
|
|
119
|
-
/**
|
120
|
-
|
121
|
-
|
122
|
-
/** Center Tip content. */
|
123
|
-
center: _propTypes["default"].bool,
|
122
|
+
/** Sets content centered and remove border radius. */
|
123
|
+
banner: _propTypes["default"].bool,
|
124
124
|
|
125
125
|
/** Function to call on click of the x icon. */
|
126
126
|
onClose: _propTypes["default"].func,
|
@@ -130,7 +130,9 @@ Tip.propTypes = {
|
|
130
130
|
id: _propTypes["default"].string,
|
131
131
|
className: _propTypes["default"].string,
|
132
132
|
style: _propTypes["default"].object,
|
133
|
-
|
133
|
+
|
134
|
+
/** The testId property adds the data attribute data-testid to the main element and should be used for testing only. */
|
135
|
+
testId: _propTypes["default"].string
|
134
136
|
};
|
135
137
|
var _default = Tip;
|
136
138
|
exports["default"] = _default;
|
package/build/Tip/Tip.test.js
CHANGED
@@ -43,13 +43,42 @@ describe("Tip", function () {
|
|
43
43
|
var wrapper = (0, _enzyme.shallow)( /*#__PURE__*/_react["default"].createElement(_Tip["default"], {
|
44
44
|
classes: classes,
|
45
45
|
icon: true
|
46
|
-
}));
|
46
|
+
}, "Alert text"));
|
47
47
|
expect(wrapper.find('.icon').length).toBe(1);
|
48
48
|
});
|
49
|
+
it('has a close icon button', function () {
|
50
|
+
var wrapper = (0, _enzyme.mount)( /*#__PURE__*/_react["default"].createElement(_Tip["default"], {
|
51
|
+
classes: classes,
|
52
|
+
icon: true,
|
53
|
+
onClose: function onClose() {
|
54
|
+
return console.log('Close');
|
55
|
+
},
|
56
|
+
testId: "alert-test"
|
57
|
+
}, "Tip text "));
|
58
|
+
expect(wrapper.find({
|
59
|
+
"data-testid": 'alert-test__close-icon'
|
60
|
+
}).length).toBe(1);
|
61
|
+
});
|
62
|
+
it('has a link', function () {
|
63
|
+
var wrapper = (0, _enzyme.mount)( /*#__PURE__*/_react["default"].createElement(_Tip["default"], {
|
64
|
+
classes: classes,
|
65
|
+
icon: true,
|
66
|
+
cta: {
|
67
|
+
text: 'Click here.',
|
68
|
+
onClick: function onClick() {
|
69
|
+
return alert('CTA clicked!');
|
70
|
+
}
|
71
|
+
},
|
72
|
+
testId: "alert-test"
|
73
|
+
}, "Tip text "));
|
74
|
+
expect(wrapper.find({
|
75
|
+
"data-testid": 'alert-test__link'
|
76
|
+
}).length).toBe(1);
|
77
|
+
});
|
49
78
|
});
|
50
79
|
describe("TipJSS", function () {
|
51
80
|
it('matches the snapshot', function () {
|
52
|
-
var wrapper = (0, _enzyme.shallow)( /*#__PURE__*/_react["default"].createElement(_index["default"], null));
|
81
|
+
var wrapper = (0, _enzyme.shallow)( /*#__PURE__*/_react["default"].createElement(_index["default"], null, "Tip text "));
|
53
82
|
expect(wrapper).toMatchSnapshot();
|
54
83
|
});
|
55
84
|
});
|
@@ -4,45 +4,62 @@ exports[`Tip matches the snapshot 1`] = `ShallowWrapper {}`;
|
|
4
4
|
|
5
5
|
exports[`Tip styles matches the snapshot 1`] = `
|
6
6
|
Object {
|
7
|
-
"
|
8
|
-
"margin": "auto",
|
9
|
-
"maxWidth": "1200px",
|
10
|
-
},
|
11
|
-
"closeIcon": Object {
|
7
|
+
"closeIconMargin": Object {
|
12
8
|
"marginLeft": "16px",
|
13
9
|
},
|
10
|
+
"closeIconSmallMargin": Object {
|
11
|
+
"marginLeft": "12px",
|
12
|
+
},
|
14
13
|
"container": Object {
|
14
|
+
"@media screen and (min-width:576px)": Object {
|
15
|
+
"padding": Array [
|
16
|
+
"8px",
|
17
|
+
"16px",
|
18
|
+
],
|
19
|
+
},
|
15
20
|
"alignItems": "center",
|
16
21
|
"borderRadius": "4px",
|
17
22
|
"minHeight": "56px",
|
18
23
|
"outlineOffset": "-1px",
|
19
|
-
"padding":
|
20
|
-
"8px",
|
21
|
-
"16px",
|
22
|
-
],
|
24
|
+
"padding": "12px",
|
23
25
|
},
|
24
26
|
"cta": Object {
|
27
|
+
"alignSelf": "start",
|
25
28
|
"cursor": "pointer",
|
26
29
|
"font": "400 14px/1.5 'OccText', sans-serif",
|
30
|
+
"margin": Array [
|
31
|
+
"8px",
|
32
|
+
0,
|
33
|
+
0,
|
34
|
+
],
|
27
35
|
"textDecoration": "underline",
|
28
36
|
"textWrap": "nowrap",
|
29
37
|
},
|
30
|
-
"
|
38
|
+
"ctaAlert": Object {
|
31
39
|
"alignSelf": "center",
|
32
|
-
"
|
40
|
+
"margin": Array [
|
41
|
+
0,
|
42
|
+
0,
|
43
|
+
0,
|
44
|
+
"16px",
|
45
|
+
],
|
33
46
|
},
|
34
|
-
"
|
35
|
-
"alignSelf": "
|
47
|
+
"ctaBanner": Object {
|
48
|
+
"alignSelf": "center",
|
36
49
|
"margin": Array [
|
37
|
-
"8px",
|
38
50
|
0,
|
39
51
|
0,
|
52
|
+
0,
|
53
|
+
"8px",
|
40
54
|
],
|
41
55
|
},
|
42
56
|
"error": Object {
|
43
57
|
"backgroundColor": "#fce8e8",
|
44
58
|
"outline": "1px solid #FBDFDF",
|
45
59
|
},
|
60
|
+
"growText": Object {
|
61
|
+
"flexGrow": 1,
|
62
|
+
},
|
46
63
|
"icon": Object {
|
47
64
|
"flexShrink": 0,
|
48
65
|
"marginRight": "8px",
|
@@ -51,8 +68,12 @@ Object {
|
|
51
68
|
"backgroundColor": "#e3efff",
|
52
69
|
"outline": "1px solid #b9d7ff",
|
53
70
|
},
|
54
|
-
"
|
55
|
-
"
|
71
|
+
"maxWidth": Object {
|
72
|
+
"margin": Array [
|
73
|
+
0,
|
74
|
+
"auto",
|
75
|
+
],
|
76
|
+
"maxWidth": "1200px",
|
56
77
|
},
|
57
78
|
"noBorderRadius": Object {
|
58
79
|
"borderRadius": 0,
|
@@ -66,25 +87,12 @@ Object {
|
|
66
87
|
"backgroundColor": "#000",
|
67
88
|
"outline": "1px solid rgba(255,255,255,0.2)",
|
68
89
|
},
|
69
|
-
"small": Object {
|
70
|
-
"maxWidth": 360,
|
71
|
-
"padding": "12px",
|
72
|
-
},
|
73
|
-
"smallPadding": Object {
|
74
|
-
"padding": "8px",
|
75
|
-
},
|
76
90
|
"success": Object {
|
77
91
|
"backgroundColor": "#ebfbf1",
|
78
92
|
"outline": "1px solid #d7f6e3",
|
79
93
|
},
|
80
|
-
"text": Object {
|
81
|
-
"maxWidth": "100%",
|
82
|
-
},
|
83
94
|
"textContainer": Object {
|
84
|
-
"
|
85
|
-
"12px",
|
86
|
-
0,
|
87
|
-
],
|
95
|
+
"flex": 1,
|
88
96
|
},
|
89
97
|
"textError": Object {
|
90
98
|
"color": "#8b1313",
|
package/build/Tip/styles.js
CHANGED
@@ -5,6 +5,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
});
|
6
6
|
exports["default"] = void 0;
|
7
7
|
|
8
|
+
var _grid = _interopRequireDefault(require("../subatomic/grid"));
|
9
|
+
|
8
10
|
var _colors = _interopRequireDefault(require("../tokens/colors.json"));
|
9
11
|
|
10
12
|
var _fonts = _interopRequireDefault(require("../tokens/fonts.json"));
|
@@ -17,14 +19,18 @@ var _styles = require("../Text/styles");
|
|
17
19
|
|
18
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
19
21
|
|
22
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
23
|
+
|
20
24
|
var _default = {
|
21
|
-
container: {
|
22
|
-
padding:
|
25
|
+
container: _defineProperty({
|
26
|
+
padding: _spacing["default"]['size-3'],
|
23
27
|
borderRadius: _borderRadius["default"]['br-xs'],
|
24
28
|
minHeight: '56px',
|
25
29
|
alignItems: 'center',
|
26
30
|
outlineOffset: '-1px'
|
27
|
-
},
|
31
|
+
}, "@media screen and (min-width:".concat(_grid["default"].xs, "px)"), {
|
32
|
+
padding: [_spacing["default"]['size-2'], _spacing["default"]['size-4']]
|
33
|
+
}),
|
28
34
|
noBorderRadius: {
|
29
35
|
borderRadius: 0
|
30
36
|
},
|
@@ -72,31 +78,27 @@ var _default = {
|
|
72
78
|
marginRight: _spacing["default"]['size-2'],
|
73
79
|
flexShrink: 0
|
74
80
|
},
|
75
|
-
|
76
|
-
maxWidth: '100%'
|
77
|
-
},
|
78
|
-
closeIcon: {
|
81
|
+
closeIconMargin: {
|
79
82
|
marginLeft: _spacing["default"]['size-4']
|
80
83
|
},
|
81
|
-
|
82
|
-
|
83
|
-
},
|
84
|
-
largePadding: {
|
85
|
-
padding: _spacing["default"]['size-3']
|
84
|
+
closeIconSmallMargin: {
|
85
|
+
marginLeft: _spacing["default"]['size-3']
|
86
86
|
},
|
87
87
|
cta: {
|
88
88
|
textDecoration: 'underline',
|
89
89
|
font: (0, _styles.parseFontValue)(_fonts["default"]['alert-default']),
|
90
90
|
cursor: 'pointer',
|
91
|
-
textWrap: 'nowrap'
|
91
|
+
textWrap: 'nowrap',
|
92
|
+
margin: [_spacing["default"]['size-2'], 0, 0],
|
93
|
+
alignSelf: 'start'
|
92
94
|
},
|
93
|
-
|
94
|
-
|
95
|
+
ctaAlert: {
|
96
|
+
margin: [0, 0, 0, _spacing["default"]['size-4']],
|
95
97
|
alignSelf: 'center'
|
96
98
|
},
|
97
|
-
|
98
|
-
margin: [_spacing["default"]['size-2']
|
99
|
-
alignSelf: '
|
99
|
+
ctaBanner: {
|
100
|
+
margin: [0, 0, 0, _spacing["default"]['size-2']],
|
101
|
+
alignSelf: 'center'
|
100
102
|
},
|
101
103
|
normalText: {
|
102
104
|
font: (0, _styles.parseFontValue)(_fonts["default"]['alert-default']),
|
@@ -104,15 +106,14 @@ var _default = {
|
|
104
106
|
margin: 0
|
105
107
|
},
|
106
108
|
textContainer: {
|
107
|
-
|
109
|
+
flex: 1
|
108
110
|
},
|
109
|
-
|
110
|
-
|
111
|
-
padding: _spacing["default"]['size-3']
|
111
|
+
growText: {
|
112
|
+
flexGrow: 1
|
112
113
|
},
|
113
|
-
|
114
|
+
maxWidth: {
|
114
115
|
maxWidth: '1200px',
|
115
|
-
margin: 'auto'
|
116
|
+
margin: [0, 'auto']
|
116
117
|
}
|
117
118
|
};
|
118
119
|
exports["default"] = _default;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@occmundial/occ-atomic",
|
3
|
-
"version": "3.0.0-beta.
|
3
|
+
"version": "3.0.0-beta.20",
|
4
4
|
"description": "Collection of shareable styled React components for OCC applications.",
|
5
5
|
"homepage": "http://occmundial.github.io/occ-atomic",
|
6
6
|
"main": "build/index.js",
|
package/build/Banner/styles.js
DELETED
@@ -1,41 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
4
|
-
value: true
|
5
|
-
});
|
6
|
-
exports["default"] = void 0;
|
7
|
-
|
8
|
-
var _spacing = _interopRequireDefault(require("../subatomic/spacing"));
|
9
|
-
|
10
|
-
var _colors = _interopRequireDefault(require("../subatomic/colors"));
|
11
|
-
|
12
|
-
var _grid = _interopRequireDefault(require("../subatomic/grid"));
|
13
|
-
|
14
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
15
|
-
|
16
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
17
|
-
|
18
|
-
var _default = {
|
19
|
-
container: {
|
20
|
-
padding: _spacing["default"].small,
|
21
|
-
backgroundColor: _colors["default"].ink
|
22
|
-
},
|
23
|
-
textBanner: {
|
24
|
-
display: 'inline-block'
|
25
|
-
},
|
26
|
-
textFlex: _defineProperty({
|
27
|
-
textAlign: 'start'
|
28
|
-
}, "@media screen and (min-width:".concat(_grid["default"].xs, "px)"), {
|
29
|
-
textAlign: 'center'
|
30
|
-
}),
|
31
|
-
iconFlex: _defineProperty({
|
32
|
-
paddingLeft: _spacing["default"].small,
|
33
|
-
paddingTop: _spacing["default"].small
|
34
|
-
}, "@media screen and (min-width:".concat(_grid["default"].xs, "px)"), {
|
35
|
-
padding: 0
|
36
|
-
}),
|
37
|
-
icon: {
|
38
|
-
cursor: 'pointer'
|
39
|
-
}
|
40
|
-
};
|
41
|
-
exports["default"] = _default;
|