@telia/teddy 0.4.0 → 0.4.1

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.
@@ -100,13 +100,13 @@ const Root = React.forwardRef(
100
100
  ...props,
101
101
  className: classes,
102
102
  style: customStyle,
103
- onPointerUp: utils_composeEventHandlers.composeEventHandlers(props.onPointerUp, (e) => {
103
+ onClick: utils_composeEventHandlers.composeEventHandlers(props.onClick, (e) => {
104
+ var _a;
104
105
  if (e.isDefaultPrevented())
105
106
  return;
106
- if (linkRef.current && e.target !== linkRef.current)
107
+ if (linkRef.current)
107
108
  return linkRef.current.click();
108
- if (buttonRef.current && e.target !== buttonRef.current)
109
- return buttonRef.current.click();
109
+ (_a = buttonRef.current) == null ? void 0 : _a.click();
110
110
  }),
111
111
  ref: forwardRef,
112
112
  children
@@ -98,13 +98,13 @@ const Root = React__default.forwardRef(
98
98
  ...props,
99
99
  className: classes,
100
100
  style: customStyle,
101
- onPointerUp: composeEventHandlers(props.onPointerUp, (e) => {
101
+ onClick: composeEventHandlers(props.onClick, (e) => {
102
+ var _a;
102
103
  if (e.isDefaultPrevented())
103
104
  return;
104
- if (linkRef.current && e.target !== linkRef.current)
105
+ if (linkRef.current)
105
106
  return linkRef.current.click();
106
- if (buttonRef.current && e.target !== buttonRef.current)
107
- return buttonRef.current.click();
107
+ (_a = buttonRef.current) == null ? void 0 : _a.click();
108
108
  }),
109
109
  ref: forwardRef,
110
110
  children
package/package.json CHANGED
@@ -20,7 +20,7 @@
20
20
  "pnpm": ">=9"
21
21
  },
22
22
  "private": false,
23
- "version": "0.4.0",
23
+ "version": "0.4.1",
24
24
  "sideEffects": [
25
25
  "**/*.css",
26
26
  "**/*.svg"