pallote-react 0.3.2 → 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.
- package/dist/components/Button.js +6 -6
- package/dist/components/Divider.js +2 -2
- package/dist/components/List.js +1 -1
- package/dist/components/ListItem.js +8 -12
- package/dist/components/Status.js +3 -3
- package/dist/components/Switch.js +6 -6
- package/dist/components/Tag.js +2 -2
- package/package.json +2 -2
|
@@ -49,11 +49,11 @@ const Button = _ref => {
|
|
|
49
49
|
};
|
|
50
50
|
exports.Button = Button;
|
|
51
51
|
Button.propTypes = {
|
|
52
|
-
|
|
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
|
-
|
|
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
|
-
|
|
66
|
-
size: 'md',
|
|
65
|
+
component: 'button',
|
|
67
66
|
kind: 'text',
|
|
68
67
|
variant: 'fill',
|
|
69
|
-
|
|
68
|
+
size: 'md',
|
|
69
|
+
color: 'primary',
|
|
70
70
|
fullWidth: false,
|
|
71
71
|
disabled: false,
|
|
72
72
|
isTransparent: false,
|
|
@@ -22,8 +22,8 @@ const Divider = _ref => {
|
|
|
22
22
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
23
23
|
return /*#__PURE__*/_react.default.createElement("div", _extends({
|
|
24
24
|
className: (0, _classnames.default)(['divider', {
|
|
25
|
-
["divider
|
|
26
|
-
["divider
|
|
25
|
+
["divider-".concat(direction)]: direction,
|
|
26
|
+
["divider-".concat(size)]: size
|
|
27
27
|
}, className])
|
|
28
28
|
}, props));
|
|
29
29
|
};
|
package/dist/components/List.js
CHANGED
|
@@ -22,7 +22,7 @@ const List = _ref => {
|
|
|
22
22
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
23
23
|
return /*#__PURE__*/_react.default.createElement("div", _extends({
|
|
24
24
|
className: (0, _classnames.default)(['list', {
|
|
25
|
-
'list
|
|
25
|
+
'list-dense': dense
|
|
26
26
|
}, className])
|
|
27
27
|
}, props), children);
|
|
28
28
|
};
|
|
@@ -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", "
|
|
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(
|
|
27
|
-
className: (0, _classnames.default)(['
|
|
28
|
-
'
|
|
29
|
-
'list__item--bold': bold
|
|
26
|
+
return /*#__PURE__*/_react.default.createElement(_Text.Text, _extends({
|
|
27
|
+
className: (0, _classnames.default)(['list_item', {
|
|
28
|
+
'list_item-bold': bold
|
|
30
29
|
}, className])
|
|
31
|
-
}, props), icon ? /*#__PURE__*/_react.default.
|
|
32
|
-
className: '
|
|
33
|
-
}
|
|
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
|
|
@@ -24,14 +24,14 @@ const Status = _ref => {
|
|
|
24
24
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
25
25
|
return /*#__PURE__*/_react.default.createElement(_Text.Text, _extends({
|
|
26
26
|
className: (0, _classnames.default)(['status', {
|
|
27
|
-
["status
|
|
28
|
-
'status
|
|
27
|
+
["status-".concat(color)]: color,
|
|
28
|
+
'status-dense': dense
|
|
29
29
|
}, className])
|
|
30
30
|
}, props), children);
|
|
31
31
|
};
|
|
32
32
|
exports.Status = Status;
|
|
33
33
|
Status.propTypes = {
|
|
34
|
-
color: _propTypes.default.oneOf(['success', 'info', 'warning', 'error'
|
|
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
|
|
@@ -25,24 +25,24 @@ const Switch = _ref => {
|
|
|
25
25
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
26
26
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
27
27
|
className: (0, _classnames.default)(['switch', {
|
|
28
|
-
'switch
|
|
28
|
+
'switch-disabled': disabled
|
|
29
29
|
}, className])
|
|
30
30
|
}, startLabel ? /*#__PURE__*/_react.default.createElement(_Text.Text, {
|
|
31
|
-
className: (0, _classnames.default)('
|
|
31
|
+
className: (0, _classnames.default)('switch_label'),
|
|
32
32
|
variant: "body"
|
|
33
33
|
}, startLabel) : null, /*#__PURE__*/_react.default.createElement("input", _extends({
|
|
34
|
-
className: (0, _classnames.default)('
|
|
34
|
+
className: (0, _classnames.default)('switch_input'),
|
|
35
35
|
type: "checkbox",
|
|
36
36
|
name: id,
|
|
37
37
|
id: id,
|
|
38
38
|
disabled: disabled
|
|
39
39
|
}, props)), /*#__PURE__*/_react.default.createElement("label", {
|
|
40
|
-
className: (0, _classnames.default)('
|
|
40
|
+
className: (0, _classnames.default)('switch_switch'),
|
|
41
41
|
htmlFor: id
|
|
42
42
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
43
|
-
className: (0, _classnames.default)('
|
|
43
|
+
className: (0, _classnames.default)('switch_toggle')
|
|
44
44
|
})), endLabel ? /*#__PURE__*/_react.default.createElement(_Text.Text, {
|
|
45
|
-
className: (0, _classnames.default)('
|
|
45
|
+
className: (0, _classnames.default)('switch_label'),
|
|
46
46
|
variant: "body"
|
|
47
47
|
}, endLabel) : null);
|
|
48
48
|
};
|
package/dist/components/Tag.js
CHANGED
|
@@ -24,8 +24,8 @@ const Tag = _ref => {
|
|
|
24
24
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
25
25
|
return /*#__PURE__*/_react.default.createElement(_Text.Text, _extends({
|
|
26
26
|
className: (0, _classnames.default)(['tag', {
|
|
27
|
-
["tag
|
|
28
|
-
'tag
|
|
27
|
+
["tag-".concat(color)]: color,
|
|
28
|
+
'tag-dense': dense
|
|
29
29
|
}, className])
|
|
30
30
|
}, props), children);
|
|
31
31
|
};
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"author": {
|
|
5
5
|
"name": "arnymax"
|
|
6
6
|
},
|
|
7
|
-
"version": "0.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.
|
|
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",
|