jy-headless 0.2.10 → 0.2.12

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/buttons/Button.js CHANGED
@@ -1,9 +1,7 @@
1
- import { __rest } from '../_virtual/_tslib.js';
2
- import { j as jsxRuntimeExports } from '../_virtual/jsx-runtime.js';
1
+ import { jsx } from 'react/jsx-runtime';
3
2
  import { useRef } from 'react';
4
3
 
5
- const Button = (_a) => {
6
- var { onClick, debounce = false, loading = false, readOnly = false, disabled = false, children } = _a, props = __rest(_a, ["onClick", "debounce", "loading", "readOnly", "disabled", "children"]);
4
+ const Button = ({ onClick, debounce = false, loading = false, readOnly = false, disabled = false, children, ...props }) => {
7
5
  const timer = useRef(0);
8
6
  const handleClick = (() => {
9
7
  if (!onClick)
@@ -16,7 +14,7 @@ const Button = (_a) => {
16
14
  }
17
15
  return onClick;
18
16
  })();
19
- return (jsxRuntimeExports.jsx("button", Object.assign({ onClick: handleClick, disabled: disabled || loading || readOnly }, props, { children: children })));
17
+ return (jsx("button", { onClick: handleClick, disabled: disabled || loading || readOnly, ...props, children: children }));
20
18
  };
21
19
 
22
20
  export { Button as default };
@@ -1,7 +1,5 @@
1
1
  'use strict';
2
2
 
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
3
  var jsxRuntime = require('react/jsx-runtime');
6
4
  var react = require('react');
7
5
 
@@ -21,4 +19,4 @@ const Button = ({ onClick, debounce = false, loading = false, readOnly = false,
21
19
  return (jsxRuntime.jsx("button", { onClick: handleClick, disabled: disabled || loading || readOnly, ...props, children: children }));
22
20
  };
23
21
 
24
- exports.default = Button;
22
+ module.exports = Button;
package/cjs/index.js CHANGED
@@ -4,4 +4,4 @@ var Button = require('./buttons/Button.js');
4
4
 
5
5
 
6
6
 
7
- exports.Button = Button.default;
7
+ exports.Button = Button;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jy-headless",
3
- "version": "0.2.10",
3
+ "version": "0.2.12",
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.10
1
+ 0.2.12