jy-headless 0.2.12 → 0.2.14
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/package.json +1 -11
- package/version.txt +1 -1
- package/_virtual/_tslib.js +0 -35
- package/_virtual/index/index.js +0 -5
- package/_virtual/index/index2.js +0 -3
- package/_virtual/jsx-runtime/index.js +0 -5
- package/_virtual/jsx-runtime/index2.js +0 -3
- package/_virtual/jsx-runtime.js +0 -5
- package/_virtual/jsx-runtime2.js +0 -3
- package/_virtual/react-jsx-runtime.development/index.js +0 -3
- package/_virtual/react-jsx-runtime.development.js +0 -3
- package/_virtual/react-jsx-runtime.production/index.js +0 -3
- package/_virtual/react-jsx-runtime.production.js +0 -3
- package/_virtual/react.development/index.js +0 -3
- package/_virtual/react.production/index.js +0 -3
- package/buttons/Button/index.js +0 -20
- package/cjs/_virtual/_tslib.js +0 -37
- package/cjs/_virtual/index/index.js +0 -7
- package/cjs/_virtual/index/index2.js +0 -5
- package/cjs/_virtual/jsx-runtime/index.js +0 -7
- package/cjs/_virtual/jsx-runtime/index2.js +0 -5
- package/cjs/_virtual/jsx-runtime.js +0 -7
- package/cjs/_virtual/jsx-runtime2.js +0 -5
- package/cjs/_virtual/react-jsx-runtime.development/index.js +0 -5
- package/cjs/_virtual/react-jsx-runtime.development.js +0 -5
- package/cjs/_virtual/react-jsx-runtime.production/index.js +0 -5
- package/cjs/_virtual/react-jsx-runtime.production.js +0 -5
- package/cjs/_virtual/react.development/index.js +0 -5
- package/cjs/_virtual/react.production/index.js +0 -5
- package/cjs/buttons/Button/index.js +0 -22
- package/cjs/index/index.js +0 -7
- package/cjs/node_modules/.pnpm/react@19.0.0/node_modules/react/cjs/react-jsx-runtime.development/index.js +0 -668
- package/cjs/node_modules/.pnpm/react@19.0.0/node_modules/react/cjs/react-jsx-runtime.development.js +0 -668
- package/cjs/node_modules/.pnpm/react@19.0.0/node_modules/react/cjs/react-jsx-runtime.production/index.js +0 -46
- package/cjs/node_modules/.pnpm/react@19.0.0/node_modules/react/cjs/react-jsx-runtime.production.js +0 -46
- package/cjs/node_modules/.pnpm/react@19.0.0/node_modules/react/cjs/react.development/index.js +0 -1535
- package/cjs/node_modules/.pnpm/react@19.0.0/node_modules/react/cjs/react.production/index.js +0 -550
- package/cjs/node_modules/.pnpm/react@19.0.0/node_modules/react/index/index.js +0 -21
- package/cjs/node_modules/.pnpm/react@19.0.0/node_modules/react/jsx-runtime/index.js +0 -21
- package/cjs/node_modules/.pnpm/react@19.0.0/node_modules/react/jsx-runtime.js +0 -21
- package/esm/_virtual/_tslib.js +0 -35
- package/esm/_virtual/jsx-runtime.js +0 -5
- package/esm/_virtual/jsx-runtime2.js +0 -3
- package/esm/_virtual/react-jsx-runtime.development.js +0 -3
- package/esm/_virtual/react-jsx-runtime.production.js +0 -3
- package/esm/buttons/Button.d.ts +0 -3
- package/esm/buttons/Button.js +0 -20
- package/esm/buttons/index.d.ts +0 -1
- package/esm/index.d.ts +0 -1
- package/esm/index.js +0 -1
- package/esm/node_modules/.pnpm/react@19.0.0/node_modules/react/cjs/react-jsx-runtime.development.js +0 -666
- package/esm/node_modules/.pnpm/react@19.0.0/node_modules/react/cjs/react-jsx-runtime.production.js +0 -44
- package/esm/node_modules/.pnpm/react@19.0.0/node_modules/react/jsx-runtime.js +0 -19
- package/esm/types/buttons/types.d.ts +0 -6
- package/esm/types/index.d.ts +0 -1
- package/index/index.js +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jy-headless",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.14",
|
|
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",
|
|
@@ -17,16 +17,6 @@
|
|
|
17
17
|
"import": "./cjs/index.js",
|
|
18
18
|
"require": "./cjs/cjs/index.js",
|
|
19
19
|
"types": "./cjs/index.d.ts"
|
|
20
|
-
},
|
|
21
|
-
"./esm": {
|
|
22
|
-
"import": "./esm/index.js",
|
|
23
|
-
"require": "./cjs/esm/index.js",
|
|
24
|
-
"types": "./esm/index.d.ts"
|
|
25
|
-
},
|
|
26
|
-
"./index": {
|
|
27
|
-
"import": "./index/index.js",
|
|
28
|
-
"require": "./cjs/index/index.js",
|
|
29
|
-
"types": "./index/index.d.ts"
|
|
30
20
|
}
|
|
31
21
|
},
|
|
32
22
|
"keywords": [
|
package/version.txt
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.2.
|
|
1
|
+
0.2.14
|
package/_virtual/_tslib.js
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
/******************************************************************************
|
|
2
|
-
Copyright (c) Microsoft Corporation.
|
|
3
|
-
|
|
4
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
5
|
-
purpose with or without fee is hereby granted.
|
|
6
|
-
|
|
7
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
8
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
9
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
10
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
11
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
12
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
13
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
14
|
-
***************************************************************************** */
|
|
15
|
-
/* global Reflect, Promise, SuppressedError, Symbol, Iterator */
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
function __rest(s, e) {
|
|
19
|
-
var t = {};
|
|
20
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
21
|
-
t[p] = s[p];
|
|
22
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
23
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
24
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
25
|
-
t[p[i]] = s[p[i]];
|
|
26
|
-
}
|
|
27
|
-
return t;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
31
|
-
var e = new Error(message);
|
|
32
|
-
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
export { __rest };
|
package/_virtual/index/index.js
DELETED
package/_virtual/index/index2.js
DELETED
package/_virtual/jsx-runtime.js
DELETED
package/_virtual/jsx-runtime2.js
DELETED
package/buttons/Button/index.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { jsx } from 'react/jsx-runtime';
|
|
2
|
-
import { useRef } from 'react';
|
|
3
|
-
|
|
4
|
-
const Button = ({ onClick, debounce = false, loading = false, readOnly = false, disabled = false, children, ...props }) => {
|
|
5
|
-
const timer = useRef(0);
|
|
6
|
-
const handleClick = (() => {
|
|
7
|
-
if (!onClick)
|
|
8
|
-
return;
|
|
9
|
-
if (debounce) {
|
|
10
|
-
return () => {
|
|
11
|
-
clearTimeout(timer.current);
|
|
12
|
-
timer.current = setTimeout(onClick, 300);
|
|
13
|
-
};
|
|
14
|
-
}
|
|
15
|
-
return onClick;
|
|
16
|
-
})();
|
|
17
|
-
return (jsx("button", { onClick: handleClick, disabled: disabled || loading || readOnly, ...props, children: children }));
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
export { Button as default };
|
package/cjs/_virtual/_tslib.js
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
/******************************************************************************
|
|
4
|
-
Copyright (c) Microsoft Corporation.
|
|
5
|
-
|
|
6
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
7
|
-
purpose with or without fee is hereby granted.
|
|
8
|
-
|
|
9
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
10
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
11
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
12
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
13
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
14
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
15
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
16
|
-
***************************************************************************** */
|
|
17
|
-
/* global Reflect, Promise, SuppressedError, Symbol, Iterator */
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
function __rest(s, e) {
|
|
21
|
-
var t = {};
|
|
22
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
23
|
-
t[p] = s[p];
|
|
24
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
25
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
26
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
27
|
-
t[p[i]] = s[p[i]];
|
|
28
|
-
}
|
|
29
|
-
return t;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
33
|
-
var e = new Error(message);
|
|
34
|
-
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
exports.__rest = __rest;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
-
var react = require('react');
|
|
5
|
-
|
|
6
|
-
const Button = ({ onClick, debounce = false, loading = false, readOnly = false, disabled = false, children, ...props }) => {
|
|
7
|
-
const timer = react.useRef(0);
|
|
8
|
-
const handleClick = (() => {
|
|
9
|
-
if (!onClick)
|
|
10
|
-
return;
|
|
11
|
-
if (debounce) {
|
|
12
|
-
return () => {
|
|
13
|
-
clearTimeout(timer.current);
|
|
14
|
-
timer.current = setTimeout(onClick, 300);
|
|
15
|
-
};
|
|
16
|
-
}
|
|
17
|
-
return onClick;
|
|
18
|
-
})();
|
|
19
|
-
return (jsxRuntime.jsx("button", { onClick: handleClick, disabled: disabled || loading || readOnly, ...props, children: children }));
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
module.exports = Button;
|