@occmundial/occ-atomic 3.0.0-beta.63 → 3.0.0-beta.64
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 +7 -0
- package/build/NavAvatarButton/NavAvatarButton.js +18 -27
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
# [3.0.0-beta.64](https://github.com/occmundial/occ-atomic/compare/v3.0.0-beta.63...v3.0.0-beta.64) (2024-10-03)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* Added NavAvatarButton documetation and made some small adjustments ([24abd49](https://github.com/occmundial/occ-atomic/commit/24abd49f6c64a963f44a16f9b9a0f69bdd7d381d))
|
|
7
|
+
|
|
1
8
|
# [3.0.0-beta.63](https://github.com/occmundial/occ-atomic/compare/v3.0.0-beta.62...v3.0.0-beta.63) (2024-09-30)
|
|
2
9
|
|
|
3
10
|
|
|
@@ -13,35 +13,35 @@ var _Avatar = _interopRequireDefault(require("../Avatar"));
|
|
|
13
13
|
|
|
14
14
|
var _Button = _interopRequireDefault(require("../Button"));
|
|
15
15
|
|
|
16
|
-
var _excluded = ["classes", "name", "disabled", "
|
|
16
|
+
var _excluded = ["classes", "name", "disabled", "darkMode", "noCompact", "theme", "photo", "className"];
|
|
17
17
|
|
|
18
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
19
19
|
|
|
20
|
-
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; }
|
|
21
|
-
|
|
22
20
|
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); }
|
|
23
21
|
|
|
24
22
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
25
23
|
|
|
26
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; }
|
|
27
25
|
|
|
28
|
-
|
|
26
|
+
/** Button with avatar designed to be used with the NavTab component */
|
|
27
|
+
function NavAvatarButton(_ref) {
|
|
29
28
|
var classes = _ref.classes,
|
|
30
29
|
name = _ref.name,
|
|
31
30
|
disabled = _ref.disabled,
|
|
32
|
-
_ref$
|
|
33
|
-
|
|
34
|
-
|
|
31
|
+
_ref$darkMode = _ref.darkMode,
|
|
32
|
+
darkMode = _ref$darkMode === void 0 ? false : _ref$darkMode,
|
|
33
|
+
noCompact = _ref.noCompact,
|
|
34
|
+
theme = _ref.theme,
|
|
35
35
|
photo = _ref.photo,
|
|
36
36
|
className = _ref.className,
|
|
37
37
|
buttonProps = _objectWithoutProperties(_ref, _excluded);
|
|
38
38
|
|
|
39
39
|
var buttonClasses = classes.avatarButton;
|
|
40
|
-
buttonClasses +=
|
|
40
|
+
buttonClasses += !noCompact ? " ".concat(classes.mini) : '';
|
|
41
41
|
buttonClasses += className ? " ".concat(className) : '';
|
|
42
42
|
return /*#__PURE__*/_react["default"].createElement(_Button["default"], _extends({
|
|
43
43
|
iconRight: "chevron-down",
|
|
44
|
-
theme: theme,
|
|
44
|
+
theme: theme ? theme : darkMode ? 'ghostWhite' : 'ghostGrey',
|
|
45
45
|
disabled: disabled
|
|
46
46
|
}, buttonProps, {
|
|
47
47
|
className: buttonClasses
|
|
@@ -52,7 +52,7 @@ function NavButton(_ref) {
|
|
|
52
52
|
}));
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
-
|
|
55
|
+
NavAvatarButton.propTypes = {
|
|
56
56
|
classes: _propTypes["default"].object.isRequired,
|
|
57
57
|
|
|
58
58
|
/** Button`s container ids */
|
|
@@ -64,11 +64,11 @@ NavButton.propTypes = _defineProperty({
|
|
|
64
64
|
/** Button`s container style */
|
|
65
65
|
style: _propTypes["default"].object,
|
|
66
66
|
|
|
67
|
-
/**
|
|
68
|
-
|
|
67
|
+
/** If true sets button ghostGrey theme otherwise sets ghostWhite theme. This props is ignored is theme is set. */
|
|
68
|
+
darkMode: _propTypes["default"].bool,
|
|
69
69
|
|
|
70
|
-
/**
|
|
71
|
-
|
|
70
|
+
/** Restores button default paddings */
|
|
71
|
+
noCompact: _propTypes["default"].bool,
|
|
72
72
|
|
|
73
73
|
/** There are four themes available: main, secondary, white, blue, flat. */
|
|
74
74
|
theme: _propTypes["default"].oneOf(['primary', 'secondary', 'tertiary', 'tertiaryWhite', 'ghostPink', 'ghostGrey', 'ghostWhite']),
|
|
@@ -76,21 +76,12 @@ NavButton.propTypes = _defineProperty({
|
|
|
76
76
|
/** The button has three different sizes: sm, md, lg. */
|
|
77
77
|
size: _propTypes["default"].oneOf(['sm', 'md', 'lg']),
|
|
78
78
|
|
|
79
|
-
/** The
|
|
80
|
-
|
|
79
|
+
/** The content of the component. */
|
|
80
|
+
children: _propTypes["default"].node,
|
|
81
81
|
|
|
82
82
|
/** It disables the button and shows it with the proper theme. */
|
|
83
83
|
disabled: _propTypes["default"].bool,
|
|
84
84
|
|
|
85
|
-
/** Use the name of any of the icons available in the library. */
|
|
86
|
-
icon: _propTypes["default"].string,
|
|
87
|
-
|
|
88
|
-
/** Use the name of any of the icons available in the library. The icon will be rendered on the right side of the button. */
|
|
89
|
-
iconRight: _propTypes["default"].string,
|
|
90
|
-
|
|
91
|
-
/** Property to make the button round when it only has an icon. */
|
|
92
|
-
round: _propTypes["default"].bool,
|
|
93
|
-
|
|
94
85
|
/** The loading property disables the button and shows a loading icon spinning. */
|
|
95
86
|
loading: _propTypes["default"].bool,
|
|
96
87
|
|
|
@@ -123,6 +114,6 @@ NavButton.propTypes = _defineProperty({
|
|
|
123
114
|
|
|
124
115
|
/** Pass a name to show two initials. */
|
|
125
116
|
name: _propTypes["default"].string
|
|
126
|
-
}
|
|
127
|
-
var _default =
|
|
117
|
+
};
|
|
118
|
+
var _default = NavAvatarButton;
|
|
128
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.64",
|
|
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",
|