pallote-react 0.3.3 → 0.3.4

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.
@@ -49,11 +49,11 @@ const Button = _ref => {
49
49
  };
50
50
  exports.Button = Button;
51
51
  Button.propTypes = {
52
- color: _propTypes.default.oneOf(['primary', 'secondary', 'grey', 'success', 'info', 'warning', 'error', 'main', 'contrast']),
53
- size: _propTypes.default.oneOf(['xs', 'sm', 'md', 'lg']),
52
+ component: _propTypes.default.oneOf(['button', 'a']),
54
53
  kind: _propTypes.default.oneOf(['text', 'icon']),
55
54
  variant: _propTypes.default.oneOf(['fill', 'stroke', 'transparent']),
56
- component: _propTypes.default.oneOf(['button', 'a']),
55
+ size: _propTypes.default.oneOf(['xs', 'sm', 'md', 'lg']),
56
+ color: _propTypes.default.oneOf(['primary', 'secondary', 'grey', 'success', 'info', 'warning', 'error', 'main', 'contrast']),
57
57
  fullWidth: _propTypes.default.bool,
58
58
  disabled: _propTypes.default.bool,
59
59
  iconLeft: _propTypes.default.node,
@@ -62,11 +62,11 @@ Button.propTypes = {
62
62
  children: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.object])
63
63
  };
64
64
  Button.defaultProps = {
65
- color: 'primary',
66
- size: 'md',
65
+ component: 'button',
67
66
  kind: 'text',
68
67
  variant: 'fill',
69
- component: 'button',
68
+ size: 'md',
69
+ color: 'primary',
70
70
  fullWidth: false,
71
71
  disabled: false,
72
72
  isTransparent: false,
@@ -9,35 +9,31 @@ var _react = _interopRequireDefault(require("react"));
9
9
  var _classnames = _interopRequireDefault(require("classnames"));
10
10
  var _propTypes = _interopRequireDefault(require("prop-types"));
11
11
  var _Text = require("../utilities/Text");
12
- const _excluded = ["icon", "dense", "bold", "className", "children"];
12
+ const _excluded = ["icon", "bold", "className", "children"];
13
13
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
14
14
  function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
15
15
  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; }
16
16
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } } return target; }
17
17
  const ListItem = _ref => {
18
+ var _icon$props$className;
18
19
  let {
19
20
  icon,
20
- dense,
21
21
  bold,
22
22
  className,
23
23
  children
24
24
  } = _ref,
25
25
  props = _objectWithoutProperties(_ref, _excluded);
26
- return /*#__PURE__*/_react.default.createElement("div", _extends({
26
+ return /*#__PURE__*/_react.default.createElement(_Text.Text, _extends({
27
27
  className: (0, _classnames.default)(['list_item', {
28
- 'list_item-dense': dense,
29
28
  'list_item-bold': bold
30
29
  }, className])
31
- }, props), icon ? /*#__PURE__*/_react.default.createElement("div", {
32
- className: 'list_itemIcon'
33
- }, icon) : null, /*#__PURE__*/_react.default.createElement(_Text.Text, {
34
- weight: bold === true ? 'bold' : ''
35
- }, children));
30
+ }, props), icon ? /*#__PURE__*/_react.default.cloneElement(icon, {
31
+ className: "".concat((_icon$props$className = icon.props.className) !== null && _icon$props$className !== void 0 ? _icon$props$className : '', " list_itemIcon")
32
+ }) : null, children);
36
33
  };
37
34
  exports.ListItem = ListItem;
38
35
  ListItem.propTypes = {
39
36
  icon: _propTypes.default.node,
40
- dense: _propTypes.default.bool,
41
37
  bold: _propTypes.default.bool,
42
38
  className: _propTypes.default.node,
43
39
  children: _propTypes.default.string
@@ -31,7 +31,7 @@ const Status = _ref => {
31
31
  };
32
32
  exports.Status = Status;
33
33
  Status.propTypes = {
34
- color: _propTypes.default.oneOf(['success', 'info', 'warning', 'error', 'inactive']),
34
+ color: _propTypes.default.oneOf(['inactive', 'success', 'info', 'warning', 'error']),
35
35
  dense: _propTypes.default.bool,
36
36
  className: _propTypes.default.node,
37
37
  children: _propTypes.default.string
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "author": {
5
5
  "name": "arnymax"
6
6
  },
7
- "version": "0.3.3",
7
+ "version": "0.3.4",
8
8
  "private": false,
9
9
  "keywords": [
10
10
  "react",
@@ -30,7 +30,7 @@
30
30
  "@testing-library/user-event": "^13.5.0",
31
31
  "classnames": "^2.3.2",
32
32
  "eslint": "^8.48.0",
33
- "pallote-css": "^0.3.5",
33
+ "pallote-css": "^0.3.6",
34
34
  "react": "^18.2.0",
35
35
  "react-dom": "^18.2.0",
36
36
  "react-router-dom": "^6.15.0",