jy-headless 0.2.5 → 0.2.6

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.
@@ -1,8 +1,8 @@
1
- import { j as jsxRuntimeExports } from '../../_virtual/jsx-runtime/index.js';
2
- import { r as reactExports } from '../../_virtual/index/index.js';
1
+ import { jsx } from 'react/jsx-runtime';
2
+ import { useRef } from 'react';
3
3
 
4
4
  const Button = ({ onClick, debounce = false, loading = false, readOnly = false, disabled = false, children, ...props }) => {
5
- const timer = reactExports.useRef(0);
5
+ const timer = useRef(0);
6
6
  const handleClick = (() => {
7
7
  if (!onClick)
8
8
  return;
@@ -14,7 +14,7 @@ const Button = ({ onClick, debounce = false, loading = false, readOnly = false,
14
14
  }
15
15
  return onClick;
16
16
  })();
17
- return (jsxRuntimeExports.jsx("button", { onClick: handleClick, disabled: disabled || loading || readOnly, ...props, children: children }));
17
+ return (jsx("button", { onClick: handleClick, disabled: disabled || loading || readOnly, ...props, children: children }));
18
18
  };
19
19
 
20
20
  export { Button as default };
@@ -1,10 +1,10 @@
1
1
  'use strict';
2
2
 
3
- var jsxRuntime = require('../../_virtual/jsx-runtime/index.js');
4
- var index = require('../../_virtual/index/index.js');
3
+ var jsxRuntime = require('react/jsx-runtime');
4
+ var react = require('react');
5
5
 
6
6
  const Button = ({ onClick, debounce = false, loading = false, readOnly = false, disabled = false, children, ...props }) => {
7
- const timer = index.reactExports.useRef(0);
7
+ const timer = react.useRef(0);
8
8
  const handleClick = (() => {
9
9
  if (!onClick)
10
10
  return;
@@ -16,7 +16,7 @@ const Button = ({ onClick, debounce = false, loading = false, readOnly = false,
16
16
  }
17
17
  return onClick;
18
18
  })();
19
- return (jsxRuntime.jsxRuntimeExports.jsx("button", { onClick: handleClick, disabled: disabled || loading || readOnly, ...props, children: children }));
19
+ return (jsxRuntime.jsx("button", { onClick: handleClick, disabled: disabled || loading || readOnly, ...props, children: children }));
20
20
  };
21
21
 
22
22
  module.exports = Button;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jy-headless",
3
- "version": "0.2.5",
3
+ "version": "0.2.6",
4
4
  "description": "A lightweight and customizable headless UI library for React components",
5
5
  "license": "MIT",
6
6
  "repository": "https://github.com/yCZwIqY/jy-headless",
package/version.txt CHANGED
@@ -1 +1 @@
1
- 0.2.5
1
+ 0.2.6