jy-headless 0.2.4 → 0.2.5

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.
Files changed (70) hide show
  1. package/_virtual/_tslib.js +35 -0
  2. package/_virtual/index/index.js +5 -0
  3. package/_virtual/index/index2.js +3 -0
  4. package/_virtual/jsx-runtime/index.js +5 -0
  5. package/_virtual/jsx-runtime/index2.js +3 -0
  6. package/_virtual/jsx-runtime.js +5 -0
  7. package/_virtual/jsx-runtime2.js +3 -0
  8. package/_virtual/react-jsx-runtime.development/index.js +3 -0
  9. package/_virtual/react-jsx-runtime.development.js +3 -0
  10. package/_virtual/react-jsx-runtime.production/index.js +3 -0
  11. package/_virtual/react-jsx-runtime.production.js +3 -0
  12. package/_virtual/react.development/index.js +3 -0
  13. package/_virtual/react.production/index.js +3 -0
  14. package/buttons/Button/index.js +20 -0
  15. package/buttons/Button.d.ts +3 -0
  16. package/buttons/Button.js +22 -0
  17. package/buttons/index.d.ts +1 -0
  18. package/cjs/_virtual/_tslib.js +37 -0
  19. package/cjs/_virtual/index/index.js +7 -0
  20. package/cjs/_virtual/index/index2.js +5 -0
  21. package/cjs/_virtual/jsx-runtime/index.js +7 -0
  22. package/cjs/_virtual/jsx-runtime/index2.js +5 -0
  23. package/cjs/_virtual/jsx-runtime.js +7 -0
  24. package/cjs/_virtual/jsx-runtime2.js +5 -0
  25. package/cjs/_virtual/react-jsx-runtime.development/index.js +5 -0
  26. package/cjs/_virtual/react-jsx-runtime.development.js +5 -0
  27. package/cjs/_virtual/react-jsx-runtime.production/index.js +5 -0
  28. package/cjs/_virtual/react-jsx-runtime.production.js +5 -0
  29. package/cjs/_virtual/react.development/index.js +5 -0
  30. package/cjs/_virtual/react.production/index.js +5 -0
  31. package/cjs/buttons/Button/index.js +22 -0
  32. package/cjs/buttons/Button.d.ts +3 -0
  33. package/cjs/buttons/Button.js +24 -0
  34. package/cjs/buttons/index.d.ts +1 -0
  35. package/cjs/index/index.js +7 -0
  36. package/cjs/index.d.ts +1 -0
  37. package/cjs/index.js +7 -0
  38. package/cjs/node_modules/.pnpm/react@19.0.0/node_modules/react/cjs/react-jsx-runtime.development/index.js +668 -0
  39. package/cjs/node_modules/.pnpm/react@19.0.0/node_modules/react/cjs/react-jsx-runtime.development.js +668 -0
  40. package/cjs/node_modules/.pnpm/react@19.0.0/node_modules/react/cjs/react-jsx-runtime.production/index.js +46 -0
  41. package/cjs/node_modules/.pnpm/react@19.0.0/node_modules/react/cjs/react-jsx-runtime.production.js +46 -0
  42. package/cjs/node_modules/.pnpm/react@19.0.0/node_modules/react/cjs/react.development/index.js +1535 -0
  43. package/cjs/node_modules/.pnpm/react@19.0.0/node_modules/react/cjs/react.production/index.js +550 -0
  44. package/cjs/node_modules/.pnpm/react@19.0.0/node_modules/react/index/index.js +21 -0
  45. package/cjs/node_modules/.pnpm/react@19.0.0/node_modules/react/jsx-runtime/index.js +21 -0
  46. package/cjs/node_modules/.pnpm/react@19.0.0/node_modules/react/jsx-runtime.js +21 -0
  47. package/cjs/types/buttons/types.d.ts +6 -0
  48. package/cjs/types/index.d.ts +1 -0
  49. package/esm/_virtual/_tslib.js +35 -0
  50. package/esm/_virtual/jsx-runtime.js +5 -0
  51. package/esm/_virtual/jsx-runtime2.js +3 -0
  52. package/esm/_virtual/react-jsx-runtime.development.js +3 -0
  53. package/esm/_virtual/react-jsx-runtime.production.js +3 -0
  54. package/esm/buttons/Button.d.ts +3 -0
  55. package/esm/buttons/Button.js +22 -0
  56. package/esm/buttons/index.d.ts +1 -0
  57. package/esm/index.d.ts +1 -0
  58. package/esm/index.js +1 -0
  59. package/esm/node_modules/.pnpm/react@19.0.0/node_modules/react/cjs/react-jsx-runtime.development.js +666 -0
  60. package/esm/node_modules/.pnpm/react@19.0.0/node_modules/react/cjs/react-jsx-runtime.production.js +44 -0
  61. package/esm/node_modules/.pnpm/react@19.0.0/node_modules/react/jsx-runtime.js +19 -0
  62. package/esm/types/buttons/types.d.ts +6 -0
  63. package/esm/types/index.d.ts +1 -0
  64. package/index/index.js +1 -0
  65. package/index.d.ts +1 -0
  66. package/index.js +1 -0
  67. package/package.json +18 -17
  68. package/types/buttons/types.d.ts +6 -0
  69. package/types/index.d.ts +1 -0
  70. package/version.txt +1 -0
@@ -0,0 +1,35 @@
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 };
@@ -0,0 +1,5 @@
1
+ import { __require as requireReact } from '../../node_modules/.pnpm/react@19.0.0/node_modules/react/index/index.js';
2
+
3
+ var reactExports = requireReact();
4
+
5
+ export { reactExports as r };
@@ -0,0 +1,3 @@
1
+ var react = {exports: {}};
2
+
3
+ export { react as __module };
@@ -0,0 +1,5 @@
1
+ import { __require as requireJsxRuntime } from '../../node_modules/.pnpm/react@19.0.0/node_modules/react/jsx-runtime/index.js';
2
+
3
+ var jsxRuntimeExports = requireJsxRuntime();
4
+
5
+ export { jsxRuntimeExports as j };
@@ -0,0 +1,3 @@
1
+ var jsxRuntime = {exports: {}};
2
+
3
+ export { jsxRuntime as __module };
@@ -0,0 +1,5 @@
1
+ import { __require as requireJsxRuntime } from '../node_modules/.pnpm/react@19.0.0/node_modules/react/jsx-runtime.js';
2
+
3
+ var jsxRuntimeExports = requireJsxRuntime();
4
+
5
+ export { jsxRuntimeExports as j };
@@ -0,0 +1,3 @@
1
+ var jsxRuntime = {exports: {}};
2
+
3
+ export { jsxRuntime as __module };
@@ -0,0 +1,3 @@
1
+ var reactJsxRuntime_development = {};
2
+
3
+ export { reactJsxRuntime_development as __exports };
@@ -0,0 +1,3 @@
1
+ var reactJsxRuntime_development = {};
2
+
3
+ export { reactJsxRuntime_development as __exports };
@@ -0,0 +1,3 @@
1
+ var reactJsxRuntime_production = {};
2
+
3
+ export { reactJsxRuntime_production as __exports };
@@ -0,0 +1,3 @@
1
+ var reactJsxRuntime_production = {};
2
+
3
+ export { reactJsxRuntime_production as __exports };
@@ -0,0 +1,3 @@
1
+ var react_development = {exports: {}};
2
+
3
+ export { react_development as __module };
@@ -0,0 +1,3 @@
1
+ var react_production = {};
2
+
3
+ export { react_production as __exports };
@@ -0,0 +1,20 @@
1
+ import { j as jsxRuntimeExports } from '../../_virtual/jsx-runtime/index.js';
2
+ import { r as reactExports } from '../../_virtual/index/index.js';
3
+
4
+ const Button = ({ onClick, debounce = false, loading = false, readOnly = false, disabled = false, children, ...props }) => {
5
+ const timer = reactExports.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 (jsxRuntimeExports.jsx("button", { onClick: handleClick, disabled: disabled || loading || readOnly, ...props, children: children }));
18
+ };
19
+
20
+ export { Button as default };
@@ -0,0 +1,3 @@
1
+ import type { ButtonProps } from '../types/buttons/types';
2
+ declare const Button: ({ onClick, debounce, loading, readOnly, disabled, children, ...props }: ButtonProps) => import("react/jsx-runtime").JSX.Element;
3
+ export default Button;
@@ -0,0 +1,22 @@
1
+ import { __rest } from '../_virtual/_tslib.js';
2
+ import { j as jsxRuntimeExports } from '../_virtual/jsx-runtime.js';
3
+ import { useRef } from 'react';
4
+
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"]);
7
+ const timer = 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 (jsxRuntimeExports.jsx("button", Object.assign({ onClick: handleClick, disabled: disabled || loading || readOnly }, props, { children: children })));
20
+ };
21
+
22
+ export { Button as default };
@@ -0,0 +1 @@
1
+ export { default } from './Button';
@@ -0,0 +1,37 @@
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;
@@ -0,0 +1,7 @@
1
+ 'use strict';
2
+
3
+ var index = require('../../node_modules/.pnpm/react@19.0.0/node_modules/react/index/index.js');
4
+
5
+ var reactExports = index.__require();
6
+
7
+ exports.reactExports = reactExports;
@@ -0,0 +1,5 @@
1
+ 'use strict';
2
+
3
+ var react = {exports: {}};
4
+
5
+ exports.__module = react;
@@ -0,0 +1,7 @@
1
+ 'use strict';
2
+
3
+ var jsxRuntime = require('../../node_modules/.pnpm/react@19.0.0/node_modules/react/jsx-runtime/index.js');
4
+
5
+ var jsxRuntimeExports = jsxRuntime.__require();
6
+
7
+ exports.jsxRuntimeExports = jsxRuntimeExports;
@@ -0,0 +1,5 @@
1
+ 'use strict';
2
+
3
+ var jsxRuntime = {exports: {}};
4
+
5
+ exports.__module = jsxRuntime;
@@ -0,0 +1,7 @@
1
+ 'use strict';
2
+
3
+ var jsxRuntime = require('../node_modules/.pnpm/react@19.0.0/node_modules/react/jsx-runtime.js');
4
+
5
+ var jsxRuntimeExports = jsxRuntime.__require();
6
+
7
+ exports.jsxRuntimeExports = jsxRuntimeExports;
@@ -0,0 +1,5 @@
1
+ 'use strict';
2
+
3
+ var jsxRuntime = {exports: {}};
4
+
5
+ exports.__module = jsxRuntime;
@@ -0,0 +1,5 @@
1
+ 'use strict';
2
+
3
+ var reactJsxRuntime_development = {};
4
+
5
+ exports.__exports = reactJsxRuntime_development;
@@ -0,0 +1,5 @@
1
+ 'use strict';
2
+
3
+ var reactJsxRuntime_development = {};
4
+
5
+ exports.__exports = reactJsxRuntime_development;
@@ -0,0 +1,5 @@
1
+ 'use strict';
2
+
3
+ var reactJsxRuntime_production = {};
4
+
5
+ exports.__exports = reactJsxRuntime_production;
@@ -0,0 +1,5 @@
1
+ 'use strict';
2
+
3
+ var reactJsxRuntime_production = {};
4
+
5
+ exports.__exports = reactJsxRuntime_production;
@@ -0,0 +1,5 @@
1
+ 'use strict';
2
+
3
+ var react_development = {exports: {}};
4
+
5
+ exports.__module = react_development;
@@ -0,0 +1,5 @@
1
+ 'use strict';
2
+
3
+ var react_production = {};
4
+
5
+ exports.__exports = react_production;
@@ -0,0 +1,22 @@
1
+ 'use strict';
2
+
3
+ var jsxRuntime = require('../../_virtual/jsx-runtime/index.js');
4
+ var index = require('../../_virtual/index/index.js');
5
+
6
+ const Button = ({ onClick, debounce = false, loading = false, readOnly = false, disabled = false, children, ...props }) => {
7
+ const timer = index.reactExports.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.jsxRuntimeExports.jsx("button", { onClick: handleClick, disabled: disabled || loading || readOnly, ...props, children: children }));
20
+ };
21
+
22
+ module.exports = Button;
@@ -0,0 +1,3 @@
1
+ import type { ButtonProps } from '../types/buttons/types';
2
+ declare const Button: ({ onClick, debounce, loading, readOnly, disabled, children, ...props }: ButtonProps) => import("react/jsx-runtime").JSX.Element;
3
+ export default Button;
@@ -0,0 +1,24 @@
1
+ 'use strict';
2
+
3
+ var _tslib = require('../_virtual/_tslib.js');
4
+ var jsxRuntime = require('../_virtual/jsx-runtime.js');
5
+ var require$$0 = require('react');
6
+
7
+ const Button = (_a) => {
8
+ var { onClick, debounce = false, loading = false, readOnly = false, disabled = false, children } = _a, props = _tslib.__rest(_a, ["onClick", "debounce", "loading", "readOnly", "disabled", "children"]);
9
+ const timer = require$$0.useRef(0);
10
+ const handleClick = (() => {
11
+ if (!onClick)
12
+ return;
13
+ if (debounce) {
14
+ return () => {
15
+ clearTimeout(timer.current);
16
+ timer.current = setTimeout(onClick, 300);
17
+ };
18
+ }
19
+ return onClick;
20
+ })();
21
+ return (jsxRuntime.jsxRuntimeExports.jsx("button", Object.assign({ onClick: handleClick, disabled: disabled || loading || readOnly }, props, { children: children })));
22
+ };
23
+
24
+ module.exports = Button;
@@ -0,0 +1 @@
1
+ export { default } from './Button';
@@ -0,0 +1,7 @@
1
+ 'use strict';
2
+
3
+ var Button = require('../buttons/Button/index.js');
4
+
5
+
6
+
7
+ exports.Button = Button;
package/cjs/index.d.ts ADDED
@@ -0,0 +1 @@
1
+ export { default as Button } from './buttons/Button';
package/cjs/index.js ADDED
@@ -0,0 +1,7 @@
1
+ 'use strict';
2
+
3
+ var Button = require('./buttons/Button.js');
4
+
5
+
6
+
7
+ exports.Button = Button;