@occmundial/occ-atomic 3.0.0-beta.21 → 3.0.0-beta.23
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +14 -0
- package/build/Tag/Tag.js +2 -2
- package/build/Tag/__snapshots__/Tag.test.js.snap +40 -42
- package/build/Tag/styles.js +76 -79
- package/build/Tip/__snapshots__/Tip.test.js.snap +1 -0
- package/build/Tip/styles.js +2 -1
- package/build/tokens/colors.json +12 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
@@ -1,3 +1,17 @@
|
|
1
|
+
# [3.0.0-beta.23](https://github.com/occmundial/occ-atomic/compare/v3.0.0-beta.22...v3.0.0-beta.23) (2024-06-27)
|
2
|
+
|
3
|
+
|
4
|
+
### Bug Fixes
|
5
|
+
|
6
|
+
* Align vertical centered tip and banner text ([032a704](https://github.com/occmundial/occ-atomic/commit/032a704707562dab93707a3c31aa1b26dc6be0dd))
|
7
|
+
|
8
|
+
# [3.0.0-beta.22](https://github.com/occmundial/occ-atomic/compare/v3.0.0-beta.21...v3.0.0-beta.22) (2024-06-26)
|
9
|
+
|
10
|
+
|
11
|
+
### Features
|
12
|
+
|
13
|
+
* Tag compnent and documentation updated ([718378f](https://github.com/occmundial/occ-atomic/commit/718378ffd916c98673a3b10f7b9ba827d806aa1c))
|
14
|
+
|
1
15
|
# [3.0.0-beta.21](https://github.com/occmundial/occ-atomic/compare/v3.0.0-beta.20...v3.0.0-beta.21) (2024-06-25)
|
2
16
|
|
3
17
|
|
package/build/Tag/Tag.js
CHANGED
@@ -36,9 +36,9 @@ var Tag = function Tag(_ref) {
|
|
36
36
|
alignItems: "center",
|
37
37
|
wrap: "noWrap"
|
38
38
|
}, iconName && /*#__PURE__*/_react["default"].createElement("span", {
|
39
|
-
className: "".concat(classes.icon, " ").concat(size ? classes
|
39
|
+
className: "".concat(classes.icon, " ").concat(size === 'big' ? classes.bigIcon : classes.standardIcon, " ").concat(theme ? classes["".concat(theme, "Icon")] : classes.defaultIcon)
|
40
40
|
}), /*#__PURE__*/_react["default"].createElement("span", {
|
41
|
-
className:
|
41
|
+
className: classes.tagText
|
42
42
|
}, children)));
|
43
43
|
};
|
44
44
|
|
@@ -12,19 +12,15 @@ Object {
|
|
12
12
|
"background": [Function],
|
13
13
|
},
|
14
14
|
"big": Object {
|
15
|
-
"
|
16
|
-
"height": 40,
|
15
|
+
"minHeight": "32px",
|
17
16
|
"padding": Array [
|
18
|
-
|
19
|
-
|
17
|
+
"8px",
|
18
|
+
"16px",
|
20
19
|
],
|
21
20
|
},
|
22
21
|
"bigIcon": Object {
|
23
|
-
"height":
|
24
|
-
"width":
|
25
|
-
},
|
26
|
-
"bigTagText": Object {
|
27
|
-
"fontSize": 16,
|
22
|
+
"height": "16px",
|
23
|
+
"width": "16px",
|
28
24
|
},
|
29
25
|
"default": Object {
|
30
26
|
"background": "#f5f5f5",
|
@@ -34,23 +30,33 @@ Object {
|
|
34
30
|
"background": [Function],
|
35
31
|
},
|
36
32
|
"error": Object {
|
37
|
-
"background": "#
|
38
|
-
"
|
33
|
+
"background": "#fce8e8",
|
34
|
+
"border": "1px solid #FBDFDF",
|
35
|
+
"color": "#8b1313",
|
39
36
|
},
|
40
37
|
"errorIcon": Object {
|
41
38
|
"background": [Function],
|
42
39
|
},
|
40
|
+
"featured": Object {
|
41
|
+
"background": "#0059CD",
|
42
|
+
"border": "1px solid rgba(255,255,255,0.2)",
|
43
|
+
"color": "#fff",
|
44
|
+
},
|
45
|
+
"featuredIcon": Object {
|
46
|
+
"background": [Function],
|
47
|
+
},
|
43
48
|
"icon": Object {
|
44
49
|
"backgroundRepeat": "no-repeat",
|
45
50
|
"content": "\\"\\"",
|
46
51
|
"display": "inline-block",
|
47
52
|
"left": 0,
|
48
|
-
"marginRight":
|
53
|
+
"marginRight": "4px",
|
49
54
|
"paddingBottom": 0,
|
50
55
|
},
|
51
56
|
"info": Object {
|
52
|
-
"
|
53
|
-
"
|
57
|
+
"background": "#e3efff",
|
58
|
+
"border": "1px solid #b9d7ff",
|
59
|
+
"color": "#083CAE",
|
54
60
|
},
|
55
61
|
"infoIcon": Object {
|
56
62
|
"background": [Function],
|
@@ -63,46 +69,39 @@ Object {
|
|
63
69
|
"background": [Function],
|
64
70
|
},
|
65
71
|
"medium": Object {
|
66
|
-
"height": 32,
|
67
72
|
"padding": Array [
|
68
|
-
|
69
|
-
|
70
|
-
7,
|
71
|
-
12,
|
73
|
+
"8px",
|
74
|
+
"12px",
|
72
75
|
],
|
73
76
|
},
|
74
|
-
"
|
75
|
-
"
|
76
|
-
"
|
77
|
+
"promo": Object {
|
78
|
+
"background": "#080D39",
|
79
|
+
"border": "1px solid rgba(255,255,255,0.2)",
|
80
|
+
"color": "#fff",
|
77
81
|
},
|
78
|
-
"
|
79
|
-
"
|
82
|
+
"promoIcon": Object {
|
83
|
+
"background": [Function],
|
80
84
|
},
|
81
85
|
"standard": Object {
|
82
|
-
"height": 16,
|
83
86
|
"padding": Array [
|
84
|
-
|
85
|
-
|
86
|
-
3,
|
87
|
-
8,
|
87
|
+
"2px",
|
88
|
+
"8px",
|
88
89
|
],
|
89
90
|
},
|
90
91
|
"standardIcon": Object {
|
91
|
-
"height":
|
92
|
-
"width":
|
93
|
-
},
|
94
|
-
"standardTagText": Object {
|
95
|
-
"fontSize": 10,
|
92
|
+
"height": "12px",
|
93
|
+
"width": "12px",
|
96
94
|
},
|
97
95
|
"success": Object {
|
98
|
-
"background": "#
|
99
|
-
"
|
96
|
+
"background": "#ebfbf1",
|
97
|
+
"border": "1px solid #d7f6e3",
|
98
|
+
"color": "#16542e",
|
100
99
|
},
|
101
100
|
"successIcon": Object {
|
102
101
|
"background": [Function],
|
103
102
|
},
|
104
103
|
"tag": Object {
|
105
|
-
"borderRadius":
|
104
|
+
"borderRadius": "9999px",
|
106
105
|
"boxSizing": "border-box",
|
107
106
|
"display": "inline-block",
|
108
107
|
"lineHeight": "12px",
|
@@ -113,20 +112,19 @@ Object {
|
|
113
112
|
"tagText": Object {
|
114
113
|
"boxSizing": "border-box",
|
115
114
|
"display": "inline-block",
|
116
|
-
"
|
115
|
+
"font": "400 10px/1.5 'OccText', sans-serif",
|
117
116
|
"fontStretch": "normal",
|
118
117
|
"fontStyle": "normal",
|
119
|
-
"fontWeight": "400",
|
120
118
|
"letterSpacing": "normal",
|
121
|
-
"lineHeight": 1.5,
|
122
119
|
"overflow": "hidden",
|
123
120
|
"paddingRight": [Function],
|
124
121
|
"position": "relative",
|
125
122
|
"textAlign": "center",
|
126
123
|
},
|
127
124
|
"warning": Object {
|
128
|
-
"background": "#
|
129
|
-
"
|
125
|
+
"background": "#fff8e9",
|
126
|
+
"border": "1px solid #fff1d3",
|
127
|
+
"color": "#664a0e",
|
130
128
|
},
|
131
129
|
"warningIcon": Object {
|
132
130
|
"background": [Function],
|
package/build/Tag/styles.js
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
-
exports["default"] = void 0;
|
6
|
+
exports["default"] = exports.objectToFontValue = void 0;
|
7
7
|
|
8
8
|
var _colors = _interopRequireDefault(require("../subatomic/colors"));
|
9
9
|
|
@@ -11,67 +11,54 @@ var _fonts = _interopRequireDefault(require("../subatomic/fonts"));
|
|
11
11
|
|
12
12
|
var _icons = _interopRequireDefault(require("../subatomic/icons"));
|
13
13
|
|
14
|
-
var
|
14
|
+
var _hexRgba = _interopRequireDefault(require("hex-rgba"));
|
15
15
|
|
16
|
-
var
|
16
|
+
var _borderRadius = _interopRequireDefault(require("../tokens/borderRadius.json"));
|
17
17
|
|
18
|
-
var
|
18
|
+
var _spacing = _interopRequireDefault(require("../tokens/spacing.json"));
|
19
|
+
|
20
|
+
var _fonts2 = _interopRequireDefault(require("../tokens/fonts.json"));
|
21
|
+
|
22
|
+
var _colors2 = _interopRequireDefault(require("../tokens/colors.json"));
|
19
23
|
|
20
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
21
25
|
|
22
|
-
var
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
26
|
+
var tag = _colors2["default"].tag,
|
27
|
+
text = _colors2["default"].text,
|
28
|
+
icon = _colors2["default"].icon;
|
29
|
+
|
30
|
+
var objectToFontValue = function objectToFontValue(font) {
|
31
|
+
return "".concat(font.fontWeight, " ").concat(font.fontSize, "/").concat(font.lineHeight, " ").concat(_fonts["default"].body);
|
32
|
+
};
|
33
|
+
|
34
|
+
exports.objectToFontValue = objectToFontValue;
|
35
|
+
var grey900 = _colors["default"].grey900,
|
31
36
|
grey100 = _colors["default"].grey100,
|
32
37
|
textLink = _colors["default"].textLink,
|
33
38
|
bgWhite = _colors["default"].bgWhite;
|
34
|
-
var xTiny = _spacing["default"].xTiny,
|
35
|
-
tiny = _spacing["default"].tiny,
|
36
|
-
small = _spacing["default"].small,
|
37
|
-
gutter = _spacing["default"].gutter,
|
38
|
-
medium = _spacing["default"].medium;
|
39
|
-
var smallIcon = _iconSizes["default"].small;
|
40
|
-
var paddingStandardTag = [1, tiny, 3, tiny],
|
41
|
-
paddingMediumTag = [5, gutter, 7, gutter],
|
42
|
-
paddingBigTag = [tiny, small],
|
43
|
-
tagTextLineHeight = 1.5,
|
44
|
-
tagTextStandardSize = 10,
|
45
|
-
tagTextMediumSize = 16,
|
46
|
-
tagTextBigSize = 16,
|
47
|
-
bigTagHeight = 40;
|
48
39
|
var _default = {
|
49
40
|
tag: {
|
50
41
|
boxSizing: 'border-box',
|
51
42
|
lineHeight: '12px',
|
52
43
|
textAlign: 'center',
|
53
|
-
borderRadius:
|
44
|
+
borderRadius: _borderRadius["default"]['br-full'],
|
54
45
|
position: 'relative',
|
55
46
|
overflow: 'hidden',
|
56
47
|
display: 'inline-block'
|
57
48
|
},
|
58
49
|
standard: {
|
59
|
-
padding:
|
60
|
-
height: small
|
50
|
+
padding: [_spacing["default"]['size-0'], _spacing["default"]['size-2']]
|
61
51
|
},
|
62
52
|
medium: {
|
63
|
-
padding:
|
64
|
-
height: medium
|
53
|
+
padding: [_spacing["default"]['size-2'], _spacing["default"]['size-3']]
|
65
54
|
},
|
66
55
|
big: {
|
67
|
-
|
68
|
-
|
69
|
-
borderRadius: medium
|
56
|
+
minHeight: _spacing["default"]['size-6'],
|
57
|
+
padding: [_spacing["default"]['size-2'], _spacing["default"]['size-4']]
|
70
58
|
},
|
71
59
|
tagText: {
|
72
60
|
boxSizing: 'border-box',
|
73
|
-
|
74
|
-
fontWeight: '400',
|
61
|
+
font: objectToFontValue(_fonts2["default"]['heading-tag']),
|
75
62
|
fontStyle: 'normal',
|
76
63
|
fontStretch: 'normal',
|
77
64
|
letterSpacing: 'normal',
|
@@ -79,20 +66,10 @@ var _default = {
|
|
79
66
|
position: 'relative',
|
80
67
|
overflow: 'hidden',
|
81
68
|
display: 'inline-block',
|
82
|
-
lineHeight: tagTextLineHeight,
|
83
69
|
paddingRight: function paddingRight(props) {
|
84
|
-
return props.iconName ?
|
70
|
+
return props.iconName ? _spacing["default"]['size-1'] : 0;
|
85
71
|
}
|
86
72
|
},
|
87
|
-
standardTagText: {
|
88
|
-
fontSize: tagTextStandardSize
|
89
|
-
},
|
90
|
-
mediumTagText: {
|
91
|
-
fontSize: tagTextMediumSize
|
92
|
-
},
|
93
|
-
bigTagText: {
|
94
|
-
fontSize: tagTextBigSize
|
95
|
-
},
|
96
73
|
"default": {
|
97
74
|
color: grey900,
|
98
75
|
background: grey100
|
@@ -101,47 +78,57 @@ var _default = {
|
|
101
78
|
color: grey900,
|
102
79
|
background: bgWhite
|
103
80
|
},
|
104
|
-
|
105
|
-
color:
|
106
|
-
|
81
|
+
link: {
|
82
|
+
color: textLink,
|
83
|
+
background: (0, _hexRgba["default"])(textLink, 10)
|
84
|
+
},
|
85
|
+
featured: {
|
86
|
+
color: text.white.primary,
|
87
|
+
background: tag.featured.bg,
|
88
|
+
border: "1px solid ".concat(tag.featured.border)
|
89
|
+
},
|
90
|
+
promo: {
|
91
|
+
color: text.white.primary,
|
92
|
+
background: tag.promo.bg,
|
93
|
+
border: "1px solid ".concat(tag.promo.border)
|
107
94
|
},
|
108
95
|
success: {
|
109
|
-
color:
|
110
|
-
background:
|
96
|
+
color: text.success,
|
97
|
+
background: tag.success.bg,
|
98
|
+
border: "1px solid ".concat(tag.success.border)
|
99
|
+
},
|
100
|
+
info: {
|
101
|
+
color: text.indigo.primary,
|
102
|
+
background: tag.info.bg,
|
103
|
+
border: "1px solid ".concat(tag.info.border)
|
111
104
|
},
|
112
105
|
warning: {
|
113
|
-
color:
|
114
|
-
background:
|
106
|
+
color: text.warning,
|
107
|
+
background: tag.warning.bg,
|
108
|
+
border: "1px solid ".concat(tag.warning.border)
|
115
109
|
},
|
116
110
|
error: {
|
117
|
-
color:
|
118
|
-
background:
|
119
|
-
|
120
|
-
link: {
|
121
|
-
color: textLink,
|
122
|
-
background: (0, _hexRgba["default"])(textLink, 10)
|
111
|
+
color: text.error,
|
112
|
+
background: tag.error.bg,
|
113
|
+
border: "1px solid ".concat(tag.error.border)
|
123
114
|
},
|
124
115
|
|
125
116
|
/* Icon with themes */
|
126
117
|
icon: {
|
127
118
|
display: 'inline-block',
|
128
|
-
marginRight:
|
119
|
+
marginRight: _spacing["default"]['size-1'],
|
129
120
|
content: '""',
|
130
121
|
paddingBottom: 0,
|
131
122
|
left: 0,
|
132
123
|
backgroundRepeat: 'no-repeat'
|
133
124
|
},
|
134
125
|
standardIcon: {
|
135
|
-
width:
|
136
|
-
height:
|
137
|
-
},
|
138
|
-
mediumIcon: {
|
139
|
-
width: smallIcon,
|
140
|
-
height: smallIcon
|
126
|
+
width: _spacing["default"]['size-3'],
|
127
|
+
height: _spacing["default"]['size-3']
|
141
128
|
},
|
142
129
|
bigIcon: {
|
143
|
-
width:
|
144
|
-
height:
|
130
|
+
width: _spacing["default"]['size-4'],
|
131
|
+
height: _spacing["default"]['size-4']
|
145
132
|
},
|
146
133
|
defaultIcon: {
|
147
134
|
background: function background(props) {
|
@@ -153,29 +140,39 @@ var _default = {
|
|
153
140
|
return props.iconName ? _icons["default"].base(_icons["default"][props.iconName].icon([grey900])) : '';
|
154
141
|
}
|
155
142
|
},
|
156
|
-
|
143
|
+
linkIcon: {
|
157
144
|
background: function background(props) {
|
158
|
-
return props.iconName ? _icons["default"].base(_icons["default"][props.iconName].icon([
|
145
|
+
return props.iconName ? _icons["default"].base(_icons["default"][props.iconName].icon([textLink])) : '';
|
146
|
+
}
|
147
|
+
},
|
148
|
+
featuredIcon: {
|
149
|
+
background: function background(props) {
|
150
|
+
return props.iconName ? _icons["default"].base(_icons["default"][props.iconName].icon([icon.inverse["default"]])) : '';
|
151
|
+
}
|
152
|
+
},
|
153
|
+
promoIcon: {
|
154
|
+
background: function background(props) {
|
155
|
+
return props.iconName ? _icons["default"].base(_icons["default"][props.iconName].icon([icon.inverse["default"]])) : '';
|
159
156
|
}
|
160
157
|
},
|
161
158
|
successIcon: {
|
162
159
|
background: function background(props) {
|
163
|
-
return props.iconName ? _icons["default"].base(_icons["default"][props.iconName].icon([
|
160
|
+
return props.iconName ? _icons["default"].base(_icons["default"][props.iconName].icon([icon.success])) : '';
|
164
161
|
}
|
165
162
|
},
|
166
|
-
|
163
|
+
infoIcon: {
|
167
164
|
background: function background(props) {
|
168
|
-
return props.iconName ? _icons["default"].base(_icons["default"][props.iconName].icon([
|
165
|
+
return props.iconName ? _icons["default"].base(_icons["default"][props.iconName].icon([icon.brand.bold])) : '';
|
169
166
|
}
|
170
167
|
},
|
171
|
-
|
168
|
+
warningIcon: {
|
172
169
|
background: function background(props) {
|
173
|
-
return props.iconName ? _icons["default"].base(_icons["default"][props.iconName].icon([
|
170
|
+
return props.iconName ? _icons["default"].base(_icons["default"][props.iconName].icon([icon.warning])) : '';
|
174
171
|
}
|
175
172
|
},
|
176
|
-
|
173
|
+
errorIcon: {
|
177
174
|
background: function background(props) {
|
178
|
-
return props.iconName ? _icons["default"].base(_icons["default"][props.iconName].icon([
|
175
|
+
return props.iconName ? _icons["default"].base(_icons["default"][props.iconName].icon([icon.error])) : '';
|
179
176
|
}
|
180
177
|
}
|
181
178
|
};
|
package/build/Tip/styles.js
CHANGED
package/build/tokens/colors.json
CHANGED
@@ -463,6 +463,18 @@
|
|
463
463
|
}
|
464
464
|
}
|
465
465
|
},
|
466
|
+
"avatar": {
|
467
|
+
"bg": {
|
468
|
+
"default": "#E9EEF8",
|
469
|
+
"hover": "#CAD5EE",
|
470
|
+
"active": "#ABBDE4",
|
471
|
+
"disabled": "#EDEDF1",
|
472
|
+
"overlay": {
|
473
|
+
"hover": "hsl(234 75.4% 12.7% / 0.3)",
|
474
|
+
"active": "hsl(234 75.4% 12.7% / 0.4)"
|
475
|
+
}
|
476
|
+
}
|
477
|
+
},
|
466
478
|
"bg": {
|
467
479
|
"action": {
|
468
480
|
"primary": {
|
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.23",
|
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",
|