@onesy/ui-react 1.0.161 → 1.0.162

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/Switch/Switch.js CHANGED
@@ -14,7 +14,7 @@ var _styleReact = require("@onesy/style-react");
14
14
  var _Keyframes = _interopRequireDefault(require("../Keyframes"));
15
15
  var _IconButton = _interopRequireDefault(require("../IconButton"));
16
16
  var _utils2 = require("../utils");
17
- const _excluded = ["size", "style", "children"],
17
+ const _excluded = ["style", "children"],
18
18
  _excluded2 = ["tonal", "color", "size", "inputRef", "valueDefault", "checkedDefault", "value", "checked", "onChange", "OnIcon", "OffIcon", "disabled", "Component", "className", "style", "children", "version", "colorUnchecked"];
19
19
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
20
20
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
@@ -194,13 +194,13 @@ const useStyle = (0, _styleReact.style)(theme => ({
194
194
  });
195
195
  const Icon = props => {
196
196
  const {
197
- size,
198
197
  style,
199
198
  children
200
199
  } = props,
201
200
  other = (0, _objectWithoutProperties2.default)(props, _excluded);
201
+ const size = ['very small', 'small', 'regular', 'medium', 'large', 'very large'].includes(props.size) ? props.size : 'small';
202
202
  let fontSize = 24;
203
- if (size === 'very small') fontSize = 12;else if (size === 'small') fontSize = 18;else if (size === 'regular') fontSize = 24;else if (size === 'medium') fontSize = 30;else if (size === 'large') fontSize = 38;else if (size === 'very large') fontSize = 42;else if (size !== undefined) fontSize = size;
203
+ if (size === 'very small') fontSize = 12;else if (size === 'small') fontSize = 18;else if (size === 'regular') fontSize = 24;else if (size === 'medium') fontSize = 30;else if (size === 'large') fontSize = 38;else if (size === 'very large') fontSize = 42;
204
204
  return /*#__PURE__*/_react.default.createElement("span", (0, _extends2.default)({
205
205
  style: _objectSpread(_objectSpread({}, style), {}, {
206
206
  fontSize
@@ -46,17 +46,17 @@ const useStyle = (0, _styleReact.style)(theme => ({
46
46
  name_size_small: _objectSpread(_objectSpread({}, theme.typography.values.b3), {}, {
47
47
  padding: `${theme.methods.space.value(0.5, 'px')} ${theme.methods.space.value(1, 'px')}`,
48
48
  borderRadius: `${(0, _utils.clamp)(theme.shape.radius.unit / 2, 0, 6)}px`,
49
- lineHeight: '1.4'
49
+ lineHeight: '1.3'
50
50
  }),
51
51
  name_size_regular: _objectSpread(_objectSpread({}, theme.typography.values.b2), {}, {
52
52
  padding: `${theme.methods.space.value(0.75, 'px')} ${theme.methods.space.value(1.25, 'px')}`,
53
53
  borderRadius: `${(0, _utils.clamp)(theme.shape.radius.unit / 2, 0, 8)}px`,
54
- lineHeight: '1.5'
54
+ lineHeight: '1.3'
55
55
  }),
56
56
  name_size_large: _objectSpread(_objectSpread({}, theme.typography.values.b1), {}, {
57
57
  padding: `${theme.methods.space.value(1, 'px')} ${theme.methods.space.value(1.5, 'px')}`,
58
58
  borderRadius: `${(0, _utils.clamp)(theme.shape.radius.unit / 2, 0, 12)}px`,
59
- lineHeight: '1.6'
59
+ lineHeight: '1.3'
60
60
  }),
61
61
  arrow: {
62
62
  '&::before': {
@@ -1,7 +1,7 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
3
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
4
- const _excluded = ["size", "style", "children"],
4
+ const _excluded = ["style", "children"],
5
5
  _excluded2 = ["tonal", "color", "size", "inputRef", "valueDefault", "checkedDefault", "value", "checked", "onChange", "OnIcon", "OffIcon", "disabled", "Component", "className", "style", "children", "version", "colorUnchecked"];
6
6
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
7
7
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
@@ -187,13 +187,13 @@ const useStyle = styleMethod(theme => ({
187
187
  });
188
188
  const Icon = props => {
189
189
  const {
190
- size,
191
190
  style,
192
191
  children
193
192
  } = props,
194
193
  other = _objectWithoutProperties(props, _excluded);
194
+ const size = ['very small', 'small', 'regular', 'medium', 'large', 'very large'].includes(props.size) ? props.size : 'small';
195
195
  let fontSize = 24;
196
- if (size === 'very small') fontSize = 12;else if (size === 'small') fontSize = 18;else if (size === 'regular') fontSize = 24;else if (size === 'medium') fontSize = 30;else if (size === 'large') fontSize = 38;else if (size === 'very large') fontSize = 42;else if (size !== undefined) fontSize = size;
196
+ if (size === 'very small') fontSize = 12;else if (size === 'small') fontSize = 18;else if (size === 'regular') fontSize = 24;else if (size === 'medium') fontSize = 30;else if (size === 'large') fontSize = 38;else if (size === 'very large') fontSize = 42;
197
197
  return /*#__PURE__*/React.createElement("span", _extends({
198
198
  style: _objectSpread(_objectSpread({}, style), {}, {
199
199
  fontSize
@@ -39,17 +39,17 @@ const useStyle = styleMethod(theme => ({
39
39
  name_size_small: _objectSpread(_objectSpread({}, theme.typography.values.b3), {}, {
40
40
  padding: `${theme.methods.space.value(0.5, 'px')} ${theme.methods.space.value(1, 'px')}`,
41
41
  borderRadius: `${clamp(theme.shape.radius.unit / 2, 0, 6)}px`,
42
- lineHeight: '1.4'
42
+ lineHeight: '1.3'
43
43
  }),
44
44
  name_size_regular: _objectSpread(_objectSpread({}, theme.typography.values.b2), {}, {
45
45
  padding: `${theme.methods.space.value(0.75, 'px')} ${theme.methods.space.value(1.25, 'px')}`,
46
46
  borderRadius: `${clamp(theme.shape.radius.unit / 2, 0, 8)}px`,
47
- lineHeight: '1.5'
47
+ lineHeight: '1.3'
48
48
  }),
49
49
  name_size_large: _objectSpread(_objectSpread({}, theme.typography.values.b1), {}, {
50
50
  padding: `${theme.methods.space.value(1, 'px')} ${theme.methods.space.value(1.5, 'px')}`,
51
51
  borderRadius: `${clamp(theme.shape.radius.unit / 2, 0, 12)}px`,
52
- lineHeight: '1.6'
52
+ lineHeight: '1.3'
53
53
  }),
54
54
  arrow: {
55
55
  '&::before': {
package/esm/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license UiReact v1.0.160
1
+ /** @license UiReact v1.0.161
2
2
  *
3
3
  * This source code is licensed under the MIT license found in the
4
4
  * LICENSE file in the root directory of this source tree.
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license UiReact v1.0.160
1
+ /** @license UiReact v1.0.161
2
2
  *
3
3
  * This source code is licensed under the MIT license found in the
4
4
  * LICENSE file in the root directory of this source tree.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onesy/ui-react",
3
- "version": "1.0.161",
3
+ "version": "1.0.162",
4
4
  "description": "UI for React",
5
5
  "repository": "https://github.com/onesy-me/onesy.git",
6
6
  "author": "Lazar Erić <lazareric1@proton.me>",