jy-headless 0.3.7 → 0.3.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/README.md +62 -0
- package/dist/Autocomplete/Autocomplete.d.ts +8 -0
- package/dist/Autocomplete/Autocomplete.js +297 -0
- package/dist/Autocomplete/Autocomplete.type.d.ts +37 -0
- package/dist/Autocomplete/index.d.ts +1 -0
- package/dist/Input/TextInput.d.ts +4 -0
- package/dist/Input/TextInput.js +77 -0
- package/{cjs → dist}/Input/TextInput.type.d.ts +2 -2
- package/dist/cjs/Autocomplete/Autocomplete.d.ts +8 -0
- package/dist/cjs/Autocomplete/Autocomplete.js +299 -0
- package/dist/cjs/Autocomplete/Autocomplete.type.d.ts +37 -0
- package/dist/cjs/Autocomplete/index.d.ts +1 -0
- package/dist/cjs/Input/TextInput.d.ts +4 -0
- package/dist/cjs/Input/TextInput.js +79 -0
- package/{Input → dist/cjs/Input}/TextInput.type.d.ts +2 -2
- package/{cjs → dist/cjs}/index.d.ts +1 -0
- package/{cjs → dist/cjs}/index.js +2 -0
- package/{index.d.ts → dist/index.d.ts} +1 -0
- package/{index.js → dist/index.js} +2 -0
- package/package.json +66 -50
- package/Input/TextInput.d.ts +0 -3
- package/Popover/Popover.d.ts +0 -2
- package/Popover/Popover.js +0 -28
- package/Popover/Popover.type.d.ts +0 -12
- package/Popover/index.d.ts +0 -2
- package/cjs/Input/TextInput.d.ts +0 -3
- package/cjs/Popover/Popover.d.ts +0 -2
- package/cjs/Popover/Popover.js +0 -30
- package/cjs/Popover/Popover.type.d.ts +0 -12
- package/cjs/Popover/index.d.ts +0 -2
- package/version.txt +0 -1
- /package/{Input → dist/Input}/NumberInput.d.ts +0 -0
- /package/{Input → dist/Input}/NumberInput.type.d.ts +0 -0
- /package/{Input → dist/Input}/index.d.ts +0 -0
- /package/{Select → dist/Select}/Select.d.ts +0 -0
- /package/{Select → dist/Select}/Select.js +0 -0
- /package/{Select → dist/Select}/Select.type.d.ts +0 -0
- /package/{Select → dist/Select}/index.d.ts +0 -0
- /package/{Tooltip → dist/Tooltip}/Tooltip.d.ts +0 -0
- /package/{Tooltip → dist/Tooltip}/Tooltip.js +0 -0
- /package/{Tooltip → dist/Tooltip}/Tooltip.type.d.ts +0 -0
- /package/{Tooltip → dist/Tooltip}/index.d.ts +0 -0
- /package/{cjs → dist/cjs}/Input/NumberInput.d.ts +0 -0
- /package/{cjs → dist/cjs}/Input/NumberInput.type.d.ts +0 -0
- /package/{cjs → dist/cjs}/Input/index.d.ts +0 -0
- /package/{cjs → dist/cjs}/Select/Select.d.ts +0 -0
- /package/{cjs → dist/cjs}/Select/Select.js +0 -0
- /package/{cjs → dist/cjs}/Select/Select.type.d.ts +0 -0
- /package/{cjs → dist/cjs}/Select/index.d.ts +0 -0
- /package/{cjs → dist/cjs}/Tooltip/Tooltip.d.ts +0 -0
- /package/{cjs → dist/cjs}/Tooltip/Tooltip.js +0 -0
- /package/{cjs → dist/cjs}/Tooltip/Tooltip.type.d.ts +0 -0
- /package/{cjs → dist/cjs}/Tooltip/index.d.ts +0 -0
- /package/{cjs → dist/cjs}/hooks/index.d.ts +0 -0
- /package/{cjs → dist/cjs}/hooks/useDebounce.d.ts +0 -0
- /package/{cjs → dist/cjs}/hooks/useDebounce.js +0 -0
- /package/{cjs → dist/cjs}/hooks/usePortal.d.ts +0 -0
- /package/{cjs → dist/cjs}/hooks/usePortal.js +0 -0
- /package/{cjs → dist/cjs}/hooks/useThrottle.d.ts +0 -0
- /package/{cjs → dist/cjs}/hooks/useThrottle.js +0 -0
- /package/{hooks → dist/hooks}/index.d.ts +0 -0
- /package/{hooks → dist/hooks}/useDebounce.d.ts +0 -0
- /package/{hooks → dist/hooks}/useDebounce.js +0 -0
- /package/{hooks → dist/hooks}/usePortal.d.ts +0 -0
- /package/{hooks → dist/hooks}/usePortal.js +0 -0
- /package/{hooks → dist/hooks}/useThrottle.d.ts +0 -0
- /package/{hooks → dist/hooks}/useThrottle.js +0 -0
package/cjs/Popover/Popover.js
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
-
var react = require('react');
|
|
5
|
-
var usePortal = require('../hooks/usePortal.js');
|
|
6
|
-
|
|
7
|
-
const Popover = ({ direction = 'top', popover, children, key, gap = 0, autoFlip = true }) => {
|
|
8
|
-
const [visible, setVisible] = react.useState(false);
|
|
9
|
-
const targetRef = react.useRef(null);
|
|
10
|
-
const popoverRef = react.useRef(null);
|
|
11
|
-
const { portal, rootDom } = usePortal({
|
|
12
|
-
content: popover,
|
|
13
|
-
key,
|
|
14
|
-
visible,
|
|
15
|
-
targetRef,
|
|
16
|
-
popoverRef,
|
|
17
|
-
direction,
|
|
18
|
-
gap,
|
|
19
|
-
autoFlip,
|
|
20
|
-
});
|
|
21
|
-
const handleMouseEnter = () => {
|
|
22
|
-
setVisible(true);
|
|
23
|
-
};
|
|
24
|
-
const handleMouseLeave = () => {
|
|
25
|
-
setVisible(false);
|
|
26
|
-
};
|
|
27
|
-
return (jsxRuntime.jsxs("span", { onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave, ref: targetRef, children: [children, rootDom && visible && portal] }));
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
exports.Popover = Popover;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
import { Direction } from '../hooks';
|
|
3
|
-
export interface PopoverProps {
|
|
4
|
-
children: ReactNode;
|
|
5
|
-
popover: ReactNode;
|
|
6
|
-
direction: Direction;
|
|
7
|
-
targetId?: string;
|
|
8
|
-
domNode?: Element;
|
|
9
|
-
key?: string;
|
|
10
|
-
gap?: number;
|
|
11
|
-
autoFlip?: boolean;
|
|
12
|
-
}
|
package/cjs/Popover/index.d.ts
DELETED
package/version.txt
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
0.3.7
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|