@occmundial/occ-atomic 3.0.0-beta.24 → 3.0.0-beta.25

Sign up to get free protection for your applications and to get access to all the features.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ # [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)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * Add hover styles to alert link action ([1e7efde](https://github.com/occmundial/occ-atomic/commit/1e7efde311085677f43c5057769d406c88d13c33))
7
+ * Move hover styles to cta classname ([b457e9b](https://github.com/occmundial/occ-atomic/commit/b457e9b639627361ee4b272dc64663457d67a60f))
8
+
1
9
  # [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
10
 
3
11
 
@@ -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, " ").concat(isEditable ? "".concat(classes.editable, " ") : '').concat(disabled ? "".concat(classes.disabled, " ") : '', " ").concat(className);
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, " ").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) : '', "\n "),
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[colorTextClasses[theme]]).concat(size === 'large' && banner ? " ".concat(classes.ctaBanner) : size === 'large' ? " ".concat(classes.ctaAlert) : ''),
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,
@@ -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']],
@@ -437,6 +437,12 @@
437
437
  "hover": "hsl(221 91.2% 35.7% / 0.1)",
438
438
  "active": "hsl(221 91.2% 35.7% / 0.2)"
439
439
  }
440
+ },
441
+ "white": {
442
+ "bg": {
443
+ "hover": "rgba(255,255,255,0.2)",
444
+ "active": "rgba(255,255,255,0.3)"
445
+ }
440
446
  }
441
447
  },
442
448
  "nav": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@occmundial/occ-atomic",
3
- "version": "3.0.0-beta.24",
3
+ "version": "3.0.0-beta.25",
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",