@occmundial/occ-atomic 3.0.0-beta.24 → 3.0.0-beta.26
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/CHANGELOG.md +15 -0
- package/build/Avatar/Avatar.js +1 -1
- package/build/Avatar/AvatarContent/AvatarContent.js +1 -1
- package/build/Tip/Tip.js +8 -1
- package/build/Tip/__snapshots__/Tip.test.js.snap +46 -0
- package/build/Tip/styles.js +47 -1
- package/build/Toaster/Toast/Toast.js +1 -1
- package/build/Toaster/__snapshots__/Toaster.test.js.snap +1 -1
- package/build/tokens/colors.json +6 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
# [3.0.0-beta.26](https://github.com/occmundial/occ-atomic/compare/v3.0.0-beta.25...v3.0.0-beta.26) (2024-07-05)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* Align title if not description ([ef6a12a](https://github.com/occmundial/occ-atomic/commit/ef6a12a1dba3d5440220cfe2798801d7d08c441c))
|
|
7
|
+
|
|
8
|
+
# [3.0.0-beta.25](https://github.com/occmundial/occ-atomic/compare/v3.0.0-beta.24...v3.0.0-beta.25) (2024-07-03)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* Add hover styles to alert link action ([1e7efde](https://github.com/occmundial/occ-atomic/commit/1e7efde311085677f43c5057769d406c88d13c33))
|
|
14
|
+
* Move hover styles to cta classname ([b457e9b](https://github.com/occmundial/occ-atomic/commit/b457e9b639627361ee4b272dc64663457d67a60f))
|
|
15
|
+
|
|
1
16
|
# [3.0.0-beta.24](https://github.com/occmundial/occ-atomic/compare/v3.0.0-beta.23...v3.0.0-beta.24) (2024-06-28)
|
|
2
17
|
|
|
3
18
|
|
package/build/Avatar/Avatar.js
CHANGED
|
@@ -97,7 +97,7 @@ var Avatar = /*#__PURE__*/function (_React$Component) {
|
|
|
97
97
|
var isEditable = onEdit || onClick;
|
|
98
98
|
var handleClick = isEditable ? onClick || onEdit : undefined;
|
|
99
99
|
var tabIndexValue = isEditable && !disabled ? 0 : undefined;
|
|
100
|
-
var combinedClasses = "".concat(classes.circle
|
|
100
|
+
var combinedClasses = "".concat(classes.circle).concat(isEditable ? " ".concat(classes.editable) : '').concat(disabled ? " ".concat(classes.disabled) : '').concat(className ? " ".concat(className) : '');
|
|
101
101
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
102
102
|
id: id,
|
|
103
103
|
className: combinedClasses,
|
|
@@ -52,7 +52,7 @@ var AvatarContent = function AvatarContent(_ref) {
|
|
|
52
52
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
53
53
|
className: classes.wrap
|
|
54
54
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
55
|
-
className: "".concat(classes.cont
|
|
55
|
+
className: "".concat(classes.cont).concat(onClick ? " ".concat(classes.clickable) : '').concat(onEdit ? " ".concat(classes.editable) : '').concat(disabled ? " ".concat(classes.disabled) : '').concat(photo ? " ".concat(classes.photo) : '').concat(photo && (onClick || onEdit) ? " ".concat(classes.hoverPhoto) : ''),
|
|
56
56
|
style: photo ? {
|
|
57
57
|
background: "url('".concat(photo, "') no-repeat center center / cover")
|
|
58
58
|
} : null
|
package/build/Tip/Tip.js
CHANGED
|
@@ -38,6 +38,13 @@ var colorTextClasses = {
|
|
|
38
38
|
success: 'textSuccess',
|
|
39
39
|
error: 'textError'
|
|
40
40
|
};
|
|
41
|
+
var colorLinkClasses = {
|
|
42
|
+
info: 'linkInfo',
|
|
43
|
+
promote: 'linkPromote',
|
|
44
|
+
warning: 'linkWarning',
|
|
45
|
+
success: 'linkSuccess',
|
|
46
|
+
error: 'linkError'
|
|
47
|
+
};
|
|
41
48
|
/** Tip component with different themes (info, warning, success & error). You can pass a string or a react element as the children prop, but the bold regex will only work with strings. */
|
|
42
49
|
|
|
43
50
|
var Tip = function Tip(_ref) {
|
|
@@ -79,7 +86,7 @@ var Tip = function Tip(_ref) {
|
|
|
79
86
|
classes: "".concat(classes.normalText, " ").concat(classes[colorTextClasses[theme]]).concat(!banner ? " ".concat(classes.growText) : ''),
|
|
80
87
|
text: children
|
|
81
88
|
}), cta && /*#__PURE__*/_react["default"].createElement("a", _extends({
|
|
82
|
-
className: "".concat(classes.cta, " ").concat(classes[
|
|
89
|
+
className: "".concat(classes.cta, " ").concat(classes[colorLinkClasses[theme]]).concat(size === 'large' && banner ? " ".concat(classes.ctaBanner) : size === 'large' ? " ".concat(classes.ctaAlert) : ''),
|
|
83
90
|
href: cta.href,
|
|
84
91
|
target: cta.target,
|
|
85
92
|
onClick: cta.onClick
|
|
@@ -24,7 +24,12 @@ Object {
|
|
|
24
24
|
"padding": "12px",
|
|
25
25
|
},
|
|
26
26
|
"cta": Object {
|
|
27
|
+
"&:hover": Object {
|
|
28
|
+
"backgroundSize": "100%",
|
|
29
|
+
"cursor": "pointer",
|
|
30
|
+
},
|
|
27
31
|
"alignSelf": "start",
|
|
32
|
+
"backgroundSize": "0%",
|
|
28
33
|
"cursor": "pointer",
|
|
29
34
|
"font": "400 14px/1.5 'OccText', sans-serif",
|
|
30
35
|
"margin": Array [
|
|
@@ -34,6 +39,7 @@ Object {
|
|
|
34
39
|
],
|
|
35
40
|
"textDecoration": "underline",
|
|
36
41
|
"textWrap": "nowrap",
|
|
42
|
+
"transition": "all ease-out 150ms",
|
|
37
43
|
},
|
|
38
44
|
"ctaAlert": Object {
|
|
39
45
|
"alignSelf": "center",
|
|
@@ -68,6 +74,46 @@ Object {
|
|
|
68
74
|
"backgroundColor": "#e3efff",
|
|
69
75
|
"outline": "1px solid #b9d7ff",
|
|
70
76
|
},
|
|
77
|
+
"linkError": Object {
|
|
78
|
+
"&:active": Object {
|
|
79
|
+
"background": "linear-gradient(hsl(0 81.3% 51.8% / 0.2), hsl(0 81.3% 51.8% / 0.2))",
|
|
80
|
+
},
|
|
81
|
+
"background": "linear-gradient(hsl(0 81.3% 51.8% / 0.1), hsl(0 81.3% 51.8% / 0.1))",
|
|
82
|
+
"backgroundRepeat": "no-repeat",
|
|
83
|
+
"color": "#8b1313",
|
|
84
|
+
},
|
|
85
|
+
"linkInfo": Object {
|
|
86
|
+
"&:active": Object {
|
|
87
|
+
"background": "linear-gradient(hsl(221 91.2% 35.7% / 0.2), hsl(221 91.2% 35.7% / 0.2))",
|
|
88
|
+
},
|
|
89
|
+
"background": "linear-gradient(hsl(221 91.2% 35.7% / 0.1), hsl(221 91.2% 35.7% / 0.1))",
|
|
90
|
+
"backgroundRepeat": "no-repeat",
|
|
91
|
+
"color": "#083CAE",
|
|
92
|
+
},
|
|
93
|
+
"linkPromote": Object {
|
|
94
|
+
"&:active": Object {
|
|
95
|
+
"background": "linear-gradient(rgba(255,255,255,0.3), rgba(255,255,255,0.3))",
|
|
96
|
+
},
|
|
97
|
+
"background": "linear-gradient(rgba(255,255,255,0.2), rgba(255,255,255,0.2))",
|
|
98
|
+
"backgroundRepeat": "no-repeat",
|
|
99
|
+
"color": "#fff",
|
|
100
|
+
},
|
|
101
|
+
"linkSuccess": Object {
|
|
102
|
+
"&:active": Object {
|
|
103
|
+
"background": "linear-gradient(hsl(143 63.8% 52.4% / 0.2), hsl(143 63.8% 52.4% / 0.2))",
|
|
104
|
+
},
|
|
105
|
+
"background": "linear-gradient(hsl(143 63.8% 52.4% / 0.1), hsl(143 63.8% 52.4% / 0.1))",
|
|
106
|
+
"backgroundRepeat": "no-repeat",
|
|
107
|
+
"color": "#16542e",
|
|
108
|
+
},
|
|
109
|
+
"linkWarning": Object {
|
|
110
|
+
"&:active": Object {
|
|
111
|
+
"background": "linear-gradient(hsl(41.1 100% 57.1% / 0.2), hsl(41.1 100% 57.1% / 0.2))",
|
|
112
|
+
},
|
|
113
|
+
"background": "linear-gradient(hsl(41.1 100% 57.1% / 0.1), hsl(41.1 100% 57.1% / 0.1))",
|
|
114
|
+
"backgroundRepeat": "no-repeat",
|
|
115
|
+
"color": "#664a0e",
|
|
116
|
+
},
|
|
71
117
|
"maxWidth": Object {
|
|
72
118
|
"margin": Array [
|
|
73
119
|
0,
|
package/build/Tip/styles.js
CHANGED
|
@@ -69,6 +69,46 @@ var _default = {
|
|
|
69
69
|
textPromote: {
|
|
70
70
|
color: _colors["default"].text.white.primary
|
|
71
71
|
},
|
|
72
|
+
linkInfo: {
|
|
73
|
+
color: _colors["default"].text.indigo.primary,
|
|
74
|
+
backgroundRepeat: 'no-repeat',
|
|
75
|
+
background: "linear-gradient(".concat(_colors["default"].link.brand.bg.hover, ", ").concat(_colors["default"].link.brand.bg.hover, ")"),
|
|
76
|
+
'&:active': {
|
|
77
|
+
background: "linear-gradient(".concat(_colors["default"].link.brand.bg.active, ", ").concat(_colors["default"].link.brand.bg.active, ")")
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
linkWarning: {
|
|
81
|
+
color: _colors["default"].text.warning,
|
|
82
|
+
backgroundRepeat: 'no-repeat',
|
|
83
|
+
background: "linear-gradient(".concat(_colors["default"].link.warning.bg.hover, ", ").concat(_colors["default"].link.warning.bg.hover, ")"),
|
|
84
|
+
'&:active': {
|
|
85
|
+
background: "linear-gradient(".concat(_colors["default"].link.warning.bg.active, ", ").concat(_colors["default"].link.warning.bg.active, ")")
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
linkSuccess: {
|
|
89
|
+
color: _colors["default"].text.success,
|
|
90
|
+
backgroundRepeat: 'no-repeat',
|
|
91
|
+
background: "linear-gradient(".concat(_colors["default"].link.success.bg.hover, ", ").concat(_colors["default"].link.success.bg.hover, ")"),
|
|
92
|
+
'&:active': {
|
|
93
|
+
background: "linear-gradient(".concat(_colors["default"].link.success.bg.active, ", ").concat(_colors["default"].link.success.bg.active, ")")
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
linkError: {
|
|
97
|
+
color: _colors["default"].text.error,
|
|
98
|
+
backgroundRepeat: 'no-repeat',
|
|
99
|
+
background: "linear-gradient(".concat(_colors["default"].link.error.bg.hover, ", ").concat(_colors["default"].link.error.bg.hover, ")"),
|
|
100
|
+
'&:active': {
|
|
101
|
+
background: "linear-gradient(".concat(_colors["default"].link.error.bg.active, ", ").concat(_colors["default"].link.error.bg.active, ")")
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
linkPromote: {
|
|
105
|
+
color: _colors["default"].text.white.primary,
|
|
106
|
+
backgroundRepeat: 'no-repeat',
|
|
107
|
+
background: "linear-gradient(".concat(_colors["default"].link.white.bg.hover, ", ").concat(_colors["default"].link.white.bg.hover, ")"),
|
|
108
|
+
'&:active': {
|
|
109
|
+
background: "linear-gradient(".concat(_colors["default"].link.white.bg.active, ", ").concat(_colors["default"].link.white.bg.active, ")")
|
|
110
|
+
}
|
|
111
|
+
},
|
|
72
112
|
icon: {
|
|
73
113
|
marginRight: _spacing["default"]['size-2'],
|
|
74
114
|
flexShrink: 0
|
|
@@ -85,7 +125,13 @@ var _default = {
|
|
|
85
125
|
cursor: 'pointer',
|
|
86
126
|
textWrap: 'nowrap',
|
|
87
127
|
margin: [_spacing["default"]['size-2'], 0, 0],
|
|
88
|
-
alignSelf: 'start'
|
|
128
|
+
alignSelf: 'start',
|
|
129
|
+
transition: 'all ease-out 150ms',
|
|
130
|
+
backgroundSize: '0%',
|
|
131
|
+
'&:hover': {
|
|
132
|
+
backgroundSize: '100%',
|
|
133
|
+
cursor: 'pointer'
|
|
134
|
+
}
|
|
89
135
|
},
|
|
90
136
|
ctaAlert: {
|
|
91
137
|
margin: [0, 0, 0, _spacing["default"]['size-4']],
|
|
@@ -76,7 +76,7 @@ var Toast = function Toast(_ref) {
|
|
|
76
76
|
display: "flex",
|
|
77
77
|
flex: "1",
|
|
78
78
|
className: classes.content,
|
|
79
|
-
alignSelf:
|
|
79
|
+
alignSelf: description ? 'start' : 'center',
|
|
80
80
|
justifyContent: "between"
|
|
81
81
|
}, /*#__PURE__*/_react["default"].createElement(_Flexbox["default"], {
|
|
82
82
|
display: "flex",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
|
-
exports[`Toaster launches a toast 1`] = `"<div class=\\"container\\"><div class=\\"Toast-toast-0-1-1 Toast-success-0-1-3\\"><div class=\\"Flexbox-flex-0-1-20 Flexbox-jbetween-0-1-32\\"><div class=\\"Flexbox-flex-0-1-20 Flexbox-acenter-0-1-37 Flexbox-scenter-0-1-49\\" style=\\"flex: 1;\\"><svg class=\\"Icon-icon-0-1-55 Icon-icon-0-1-52 undefined__check-circle Toast-icon-0-1-16\\" width=\\"24\\" height=\\"24\\" fill=\\"#38d373\\" style=\\"transition: 0.3s all;\\"><use xlink:href=\\"undefined#undefined__check-circle\\"></use></svg><div class=\\"Flexbox-flex-0-1-20 Flexbox-jbetween-0-1-32 Flexbox-
|
|
3
|
+
exports[`Toaster launches a toast 1`] = `"<div class=\\"container\\"><div class=\\"Toast-toast-0-1-1 Toast-success-0-1-3\\"><div class=\\"Flexbox-flex-0-1-20 Flexbox-jbetween-0-1-32\\"><div class=\\"Flexbox-flex-0-1-20 Flexbox-acenter-0-1-37 Flexbox-scenter-0-1-49\\" style=\\"flex: 1;\\"><svg class=\\"Icon-icon-0-1-55 Icon-icon-0-1-52 undefined__check-circle Toast-icon-0-1-16\\" width=\\"24\\" height=\\"24\\" fill=\\"#38d373\\" style=\\"transition: 0.3s all;\\"><use xlink:href=\\"undefined#undefined__check-circle\\"></use></svg><div class=\\"Flexbox-flex-0-1-20 Flexbox-jbetween-0-1-32 Flexbox-scenter-0-1-49 Toast-content-0-1-15\\" style=\\"flex: 1;\\"><div class=\\"Flexbox-flex-0-1-20 Flexbox-col-0-1-24\\"><p class=\\"Toast-title-0-1-13 Toast-textSuccess-0-1-10\\">Title</p></div></div></div></div></div></div>"`;
|
|
4
4
|
|
|
5
5
|
exports[`Toaster matches the snapshot 1`] = `"<div class=\\"container\\"></div>"`;
|
package/build/tokens/colors.json
CHANGED
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.26",
|
|
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",
|