@onesy/ui-react 1.0.16 → 1.0.18

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/Avatar/Avatar.js CHANGED
@@ -40,7 +40,9 @@ const useStyle = (0, style_react_1.style)(theme => ({
40
40
  justifyContent: 'center'
41
41
  },
42
42
  image: {
43
- objectFit: 'cover'
43
+ objectFit: 'cover',
44
+ width: '100%',
45
+ height: '100%'
44
46
  }
45
47
  }), { name: 'onesy-Avatar' });
46
48
  const Avatar = react_1.default.forwardRef((props_, ref) => {
@@ -25,7 +25,8 @@ const useStyle = (0, style_react_1.style)(theme => ({
25
25
  backgroundRepeat: 'no-repeat',
26
26
  backgroundPosition: 'center',
27
27
  objectFit: 'cover',
28
- width: '100%'
28
+ width: '100%',
29
+ height: '100%'
29
30
  },
30
31
  shape_top: {
31
32
  borderRadius: `${theme.shape.radius.unit * 3}px ${theme.shape.radius.unit * 3}px 0 0`
@@ -203,7 +203,7 @@ const Tooltip = react_1.default.forwardRef((props_, ref) => {
203
203
  if (refs.longPress.current) {
204
204
  setLongPress(false);
205
205
  if (refs.props.current.open === undefined) {
206
- if (!inProp)
206
+ if (!refs.inProp.current)
207
207
  onClose();
208
208
  else
209
209
  setInProp(false);
@@ -236,7 +236,7 @@ const Tooltip = react_1.default.forwardRef((props_, ref) => {
236
236
  if (refs.longPress.current) {
237
237
  setLongPress(false);
238
238
  if (refs.props.current.open === undefined) {
239
- if (!inProp)
239
+ if (!refs.inProp.current)
240
240
  onClose();
241
241
  else
242
242
  setInProp(false);
@@ -262,7 +262,7 @@ const Tooltip = react_1.default.forwardRef((props_, ref) => {
262
262
  const onOpen = () => {
263
263
  if (!open)
264
264
  setOpen(true);
265
- if (!inProp)
265
+ if (!refs.inProp.current)
266
266
  setInProp(true);
267
267
  if ((0, utils_1.is)('function', onOpen_) && !open)
268
268
  onOpen_();
@@ -304,7 +304,7 @@ const Tooltip = react_1.default.forwardRef((props_, ref) => {
304
304
  if (refs.open.current)
305
305
  onOpen();
306
306
  else {
307
- if (!inProp)
307
+ if (!refs.inProp.current)
308
308
  onClose();
309
309
  else
310
310
  setInProp(false);
@@ -317,7 +317,7 @@ const Tooltip = react_1.default.forwardRef((props_, ref) => {
317
317
  if (refs.open.current)
318
318
  onOpen();
319
319
  else {
320
- if (!inProp)
320
+ if (!refs.inProp.current)
321
321
  onClose();
322
322
  else
323
323
  setInProp(false);
@@ -422,6 +422,7 @@ const Tooltip = react_1.default.forwardRef((props_, ref) => {
422
422
  } }, { children: children && (react_1.default.cloneElement(children, Object.assign(Object.assign({ onMouseMove }, (click && {
423
423
  onClick: (event) => {
424
424
  var _a, _b;
425
+ event.stopPropagation();
425
426
  if ((0, utils_1.is)('function', (_a = children === null || children === void 0 ? void 0 : children.props) === null || _a === void 0 ? void 0 : _a.onClick))
426
427
  (_b = children === null || children === void 0 ? void 0 : children.props) === null || _b === void 0 ? void 0 : _b.onClick(event);
427
428
  onClick(event);
@@ -29,7 +29,9 @@ const useStyle = styleMethod(theme => ({
29
29
  justifyContent: 'center'
30
30
  },
31
31
  image: {
32
- objectFit: 'cover'
32
+ objectFit: 'cover',
33
+ width: '100%',
34
+ height: '100%'
33
35
  }
34
36
  }), {
35
37
  name: 'onesy-Avatar'
@@ -14,7 +14,8 @@ const useStyle = styleMethod(theme => ({
14
14
  backgroundRepeat: 'no-repeat',
15
15
  backgroundPosition: 'center',
16
16
  objectFit: 'cover',
17
- width: '100%'
17
+ width: '100%',
18
+ height: '100%'
18
19
  },
19
20
  shape_top: {
20
21
  borderRadius: `${theme.shape.radius.unit * 3}px ${theme.shape.radius.unit * 3}px 0 0`
@@ -267,7 +267,7 @@ const Tooltip = /*#__PURE__*/React.forwardRef((props_, ref) => {
267
267
  if (refs.longPress.current) {
268
268
  setLongPress(false);
269
269
  if (refs.props.current.open === undefined) {
270
- if (!inProp) onClose();else setInProp(false);
270
+ if (!refs.inProp.current) onClose();else setInProp(false);
271
271
  }
272
272
  }
273
273
  if (hover_) setHover(false);
@@ -289,7 +289,7 @@ const Tooltip = /*#__PURE__*/React.forwardRef((props_, ref) => {
289
289
  if (refs.longPress.current) {
290
290
  setLongPress(false);
291
291
  if (refs.props.current.open === undefined) {
292
- if (!inProp) onClose();else setInProp(false);
292
+ if (!refs.inProp.current) onClose();else setInProp(false);
293
293
  }
294
294
  }
295
295
  if (focus_) setFocus(false);
@@ -308,7 +308,7 @@ const Tooltip = /*#__PURE__*/React.forwardRef((props_, ref) => {
308
308
  }, []);
309
309
  const onOpen = () => {
310
310
  if (!open) setOpen(true);
311
- if (!inProp) setInProp(true);
311
+ if (!refs.inProp.current) setInProp(true);
312
312
  if (is('function', onOpen_) && !open) onOpen_();
313
313
  };
314
314
  const onClose = () => {
@@ -338,7 +338,7 @@ const Tooltip = /*#__PURE__*/React.forwardRef((props_, ref) => {
338
338
  if (init && refs.props.current.open === undefined) {
339
339
  refs.open.current = touch || hover || longPress;
340
340
  if (refs.open.current) onOpen();else {
341
- if (!inProp) onClose();else setInProp(false);
341
+ if (!refs.inProp.current) onClose();else setInProp(false);
342
342
  }
343
343
  }
344
344
  }, [touch, hover, longPress]);
@@ -346,7 +346,7 @@ const Tooltip = /*#__PURE__*/React.forwardRef((props_, ref) => {
346
346
  if (init && refs.props.current.open === undefined) {
347
347
  refs.open.current = focus;
348
348
  if (refs.open.current) onOpen();else {
349
- if (!inProp) onClose();else setInProp(false);
349
+ if (!refs.inProp.current) onClose();else setInProp(false);
350
350
  }
351
351
  }
352
352
  }, [focus]);
@@ -435,6 +435,7 @@ const Tooltip = /*#__PURE__*/React.forwardRef((props_, ref) => {
435
435
  onMouseMove
436
436
  }, click && {
437
437
  onClick: event => {
438
+ event.stopPropagation();
438
439
  if (is('function', children?.props?.onClick)) children?.props?.onClick(event);
439
440
  onClick(event);
440
441
  }
package/esm/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license UiReact v1.0.16
1
+ /** @license UiReact v1.0.18
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,8 +1,8 @@
1
1
  {
2
2
  "name": "@onesy/ui-react",
3
- "version": "1.0.16",
3
+ "version": "1.0.18",
4
4
  "description": "UI for React",
5
- "repository": "https://github.com/onesy-org/onesy.git",
5
+ "repository": "https://github.com/onesy-me/onesy.git",
6
6
  "author": "Lazar <lazareric2@gmail.com>",
7
7
  "license": "MIT",
8
8
  "private": false,