@occmundial/occ-atomic 3.0.0-beta.66 → 3.0.0-beta.68

Sign up to get free protection for your applications and to get access to all the features.
@@ -13,7 +13,7 @@ var _Avatar = _interopRequireDefault(require("../Avatar"));
13
13
 
14
14
  var _Button = _interopRequireDefault(require("../Button"));
15
15
 
16
- var _excluded = ["classes", "style", "name", "disabled", "darkMode", "noCompact", "theme", "photo", "className"];
16
+ var _excluded = ["classes", "style", "name", "disabled", "darkMode", "noCompact", "theme", "photo", "className", "reference"];
17
17
 
18
18
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
19
19
 
@@ -24,23 +24,27 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
24
24
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
25
25
 
26
26
  /** Button with avatar designed to be used with the NavTab component */
27
- function NavAvatarButton(_ref) {
28
- var classes = _ref.classes,
29
- style = _ref.style,
30
- name = _ref.name,
31
- disabled = _ref.disabled,
32
- _ref$darkMode = _ref.darkMode,
33
- darkMode = _ref$darkMode === void 0 ? false : _ref$darkMode,
34
- noCompact = _ref.noCompact,
35
- theme = _ref.theme,
36
- photo = _ref.photo,
37
- className = _ref.className,
38
- buttonProps = _objectWithoutProperties(_ref, _excluded);
27
+ function NavAvatarButton(props) {
28
+ var classes = props.classes,
29
+ style = props.style,
30
+ name = props.name,
31
+ disabled = props.disabled,
32
+ _props$darkMode = props.darkMode,
33
+ darkMode = _props$darkMode === void 0 ? false : _props$darkMode,
34
+ noCompact = props.noCompact,
35
+ theme = props.theme,
36
+ photo = props.photo,
37
+ className = props.className,
38
+ reference = props.reference,
39
+ buttonProps = _objectWithoutProperties(props, _excluded);
39
40
 
40
41
  var buttonClasses = classes.avatarButton;
41
42
  buttonClasses += !noCompact ? " ".concat(classes.mini) : '';
42
43
  buttonClasses += className && className.button ? " ".concat(className.button) : '';
43
- return /*#__PURE__*/_react["default"].createElement(_Button["default"], _extends({
44
+ return /*#__PURE__*/_react["default"].createElement("div", {
45
+ ref: reference,
46
+ className: classes.container
47
+ }, /*#__PURE__*/_react["default"].createElement(_Button["default"], _extends({
44
48
  iconRight: "chevron-down",
45
49
  theme: theme ? theme : darkMode ? 'ghostWhite' : 'ghostGrey',
46
50
  disabled: disabled
@@ -53,7 +57,7 @@ function NavAvatarButton(_ref) {
53
57
  name: name,
54
58
  disabled: disabled,
55
59
  style: style && style.avatar
56
- }));
60
+ })));
57
61
  }
58
62
 
59
63
  NavAvatarButton.propTypes = {
@@ -123,7 +127,8 @@ NavAvatarButton.propTypes = {
123
127
  photo: _propTypes["default"].string,
124
128
 
125
129
  /** Pass a name to show two initials. */
126
- name: _propTypes["default"].string
130
+ name: _propTypes["default"].string,
131
+ reference: _propTypes["default"].func
127
132
  };
128
133
  var _default = NavAvatarButton;
129
134
  exports["default"] = _default;
@@ -25,6 +25,9 @@ var _default = {
25
25
  transform: 'translateY(2px)'
26
26
  }
27
27
  }
28
+ },
29
+ container: {
30
+ display: 'inline-block'
28
31
  }
29
32
  };
30
33
  exports["default"] = _default;
@@ -16,13 +16,13 @@ Object {
16
16
  },
17
17
  "page": Object {
18
18
  "&:active": Object {
19
- "background": "hsl(234 75.4% 12.7% / 0.1)",
19
+ "background": "rgba(8, 13, 57, 0.1)",
20
20
  },
21
21
  "&:focus-visible": Object {
22
- "boxShadow": "0 0 0 8px hsl(234 75.4% 12.7% / 0.1)",
22
+ "boxShadow": "0 0 0 8px rgba(8, 13, 57, 0.1)",
23
23
  },
24
24
  "&:hover": Object {
25
- "background": "hsl(234 75.4% 12.7% / 0.05)",
25
+ "background": "rgba(8, 13, 57, 0.05)",
26
26
  },
27
27
  "alignItems": "center",
28
28
  "background": "transparent",
@@ -111,7 +111,8 @@ function SlideDown(_ref) {
111
111
  divider = _ref.divider,
112
112
  noPadding = _ref.noPadding,
113
113
  disabled = _ref.disabled,
114
- testId = _ref.testId;
114
+ testId = _ref.testId,
115
+ id = _ref.id;
115
116
 
116
117
  var _useState = (0, _react.useState)(!!expanded),
117
118
  _useState2 = _slicedToArray(_useState, 2),
@@ -144,7 +145,8 @@ function SlideDown(_ref) {
144
145
  }, !disabled && {
145
146
  onClick: toggleContent
146
147
  }, {
147
- "data-testid": testId
148
+ "data-testid": testId,
149
+ id: id
148
150
  }), /*#__PURE__*/_react["default"].createElement(_Flexbox["default"], {
149
151
  display: "flex",
150
152
  justifyContent: !noJustified ? 'between' : null,
@@ -234,7 +236,10 @@ SlideDown.propTypes = {
234
236
  disabled: _propTypes["default"].bool,
235
237
 
236
238
  /** The testId property adds the data attribute data-testid to the main element and should be used for testing only. */
237
- testId: _propTypes["default"].string
239
+ testId: _propTypes["default"].string,
240
+
241
+ /** Id of the component */
242
+ id: _propTypes["default"].string
238
243
  };
239
244
  var _default = SlideDown;
240
245
  exports["default"] = _default;
@@ -17,7 +17,7 @@ Object {
17
17
  "boxShadow": "inset 0 0 0 2px rgba(255,255,255,0.2)",
18
18
  },
19
19
  "&:focus-visible $switch": Object {
20
- "boxShadow": "0 0 0 8px hsl(221 91.2% 35.7% / 0.3)",
20
+ "boxShadow": "0 0 0 8px rgba(8, 60, 174, 0.3)",
21
21
  },
22
22
  "&:focus-visible $switch$checked": Object {
23
23
  "boxShadow": "0 0 0 8px rgba(0,110,255,0.3)",
@@ -84,9 +84,9 @@ Object {
84
84
  },
85
85
  "linkInfo": Object {
86
86
  "&:active": Object {
87
- "background": "linear-gradient(hsl(221 91.2% 35.7% / 0.2), hsl(221 91.2% 35.7% / 0.2))",
87
+ "background": "linear-gradient(rgba(8, 60, 174, 0.2), rgba(8, 60, 174, 0.2))",
88
88
  },
89
- "background": "linear-gradient(hsl(221 91.2% 35.7% / 0.1), hsl(221 91.2% 35.7% / 0.1))",
89
+ "background": "linear-gradient(rgba(8, 60, 174, 0.1), rgba(8, 60, 174, 0.1))",
90
90
  "backgroundRepeat": "no-repeat",
91
91
  "color": "#083CAE",
92
92
  },
package/build/index.js CHANGED
@@ -112,6 +112,8 @@ var _context = require("./Tabs/context");
112
112
 
113
113
  var _Menu = _interopRequireDefault(require("./Menu"));
114
114
 
115
+ var _Drawer = _interopRequireDefault(require("./Drawer"));
116
+
115
117
  var _Footer = _interopRequireDefault(require("./Footer"));
116
118
 
117
119
  var _SightLogo = _interopRequireDefault(require("./SightLogo"));
@@ -192,6 +194,7 @@ module.exports = (_module$exports = {
192
194
  toaster: _functions.toaster,
193
195
  Footer: _Footer["default"],
194
196
  Menu: _Menu["default"],
197
+ Drawer: _Drawer["default"],
195
198
  SightLogo: _SightLogo["default"],
196
199
  colors: _colors["default"],
197
200
  fonts: _fonts["default"],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@occmundial/occ-atomic",
3
- "version": "3.0.0-beta.66",
3
+ "version": "3.0.0-beta.68",
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",