wenay-react2 1.0.9 → 1.0.11
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/lib/common/api.d.ts +1 -1
- package/lib/common/api.js +2 -2
- package/lib/common/src/components/Input.js +2 -2
- package/lib/common/src/hooks/useOutside.d.ts +2 -2
- package/lib/common/src/hooks/useOutside.js +10 -14
- package/package.json +1 -1
- package/lib/common/src/styles/index.d.ts +0 -1
- package/lib/common/src/styles/index.js +0 -1
package/lib/common/api.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "../style/menuRight.css";
|
|
2
2
|
import "../style/style.css";
|
|
3
|
+
export * from "./src/styles/styleGrid";
|
|
3
4
|
export * from "./updateBy";
|
|
4
5
|
export * from "./src/hooks";
|
|
5
|
-
export * from "./src/styles";
|
|
6
6
|
export * from "./src/components/Dnd";
|
|
7
7
|
export * from "./src/utils";
|
|
8
8
|
export * from "./src/components/Buttons";
|
package/lib/common/api.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
// ... existing code ...
|
|
2
2
|
import "../style/menuRight.css";
|
|
3
3
|
import "../style/style.css";
|
|
4
|
+
// 0. СТИЛИ - независимые
|
|
5
|
+
export * from "./src/styles/styleGrid";
|
|
4
6
|
// 1. БАЗОВЫЙ СЛОЙ - никаких зависимостей внутри проекта
|
|
5
7
|
export * from "./updateBy";
|
|
6
8
|
// 2. ХУКИ - зависят только от updateBy
|
|
7
9
|
export * from "./src/hooks";
|
|
8
|
-
// 3. СТИЛИ - независимые
|
|
9
|
-
export * from "./src/styles";
|
|
10
10
|
// 4. DND компоненты - зависят от updateBy
|
|
11
11
|
export * from "./src/components/Dnd";
|
|
12
12
|
// 5. UTILS - теперь зависят от Dnd (mapMemory импортирует ExRNDMap3, mapResiReact)
|
|
@@ -14,10 +14,10 @@ export function InputPage({ callback, name = "", txt = "" }) {
|
|
|
14
14
|
} }), _jsx("div", { style: { marginTop: 20 }, className: "msTradeAlt msTradeActive", onClick: () => { callback(txtName.current); }, children: "send" })] });
|
|
15
15
|
}
|
|
16
16
|
export function InputPageModal({ callback, name, outClick, keyForSave = "InputPage2", txt }) {
|
|
17
|
-
return _jsx(ModalWrapper, { outClick: outClick, keyForSave: keyForSave, size: { height: 150, width: 300 }, position: { y: -150, x: -250 }, children: InputPage
|
|
17
|
+
return _jsx(ModalWrapper, { outClick: outClick, keyForSave: keyForSave, size: { height: 150, width: 300 }, position: { y: -150, x: -250 }, children: _jsx(InputPage, { callback: callback, name: name, txt: txt }) });
|
|
18
18
|
}
|
|
19
19
|
export function InputFileModal({ callback, name, outClick, keyForSave = "InputFile2" }) {
|
|
20
|
-
return _jsx(ModalWrapper, { outClick: outClick, keyForSave: keyForSave, size: { height: 150, width: 300 }, position: { y: -150, x: -250 }, children: InputFile
|
|
20
|
+
return _jsx(ModalWrapper, { outClick: outClick, keyForSave: keyForSave, size: { height: 150, width: 300 }, position: { y: -150, x: -250 }, children: _jsx(InputFile, { callback: callback, name: name }) });
|
|
21
21
|
}
|
|
22
22
|
export function InputFile({ callback, name = "" }) {
|
|
23
23
|
let file = null;
|
|
@@ -33,8 +33,8 @@ export declare const DivOutsideClick2: React.ForwardRefExoticComponent<React.HTM
|
|
|
33
33
|
status?: boolean;
|
|
34
34
|
zIndex?: number;
|
|
35
35
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
36
|
-
export declare function Button({ keySave, statusDef, outClick, ...data }: tButton):
|
|
36
|
+
export declare function Button({ keySave, statusDef, outClick, ...data }: tButton): import("react/jsx-runtime").JSX.Element;
|
|
37
37
|
export declare function ButtonHover(props: tButtonBase): import("react/jsx-runtime").JSX.Element;
|
|
38
38
|
export declare const ButtonOutClick: typeof Button;
|
|
39
|
-
export declare function ButtonAbs(
|
|
39
|
+
export declare function ButtonAbs(props: Parameters<typeof Button>[0]): import("react/jsx-runtime").JSX.Element;
|
|
40
40
|
export {};
|
|
@@ -42,16 +42,12 @@ export function Button({ keySave, statusDef, outClick, ...data }) {
|
|
|
42
42
|
if (keySave && saveStatus[keySave])
|
|
43
43
|
statusDef = saveStatus[keySave];
|
|
44
44
|
const state = useState(statusDef ?? false);
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
outClick();
|
|
52
|
-
}
|
|
53
|
-
})
|
|
54
|
-
: ButtonBase({ ...data, state });
|
|
45
|
+
const handleOutsideClick = () => {
|
|
46
|
+
state[1](false);
|
|
47
|
+
if (typeof outClick == "function")
|
|
48
|
+
outClick();
|
|
49
|
+
};
|
|
50
|
+
return outClick ? (_jsx(DivOutsideClick, { status: state[0], outsideClick: handleOutsideClick, children: _jsx(ButtonBase, { ...data, state: state }) })) : (_jsx(ButtonBase, { ...data, state: state }));
|
|
55
51
|
}
|
|
56
52
|
export function ButtonHover(props) {
|
|
57
53
|
const [hover, setHover] = useState(false);
|
|
@@ -59,10 +55,10 @@ export function ButtonHover(props) {
|
|
|
59
55
|
_jsx("div", { style: { position: "absolute" }, children: typeof props.children == "function" ? props.children({ onClose: () => setHover(false) }) : props.children })] });
|
|
60
56
|
}
|
|
61
57
|
export const ButtonOutClick = ({ outClick = true, ...a }) => Button({ ...a, outClick });
|
|
62
|
-
export function ButtonAbs(
|
|
58
|
+
export function ButtonAbs(props) {
|
|
63
59
|
const children = (api) => _jsx("div", { style: { position: "relative" }, children: _jsx("div", { style: {
|
|
64
60
|
position: "absolute",
|
|
65
|
-
zIndex:
|
|
66
|
-
}, children: typeof
|
|
67
|
-
return Button
|
|
61
|
+
zIndex: props.zIndex ?? 9
|
|
62
|
+
}, children: typeof props.children == "function" ? props.children(api) : props.children }) });
|
|
63
|
+
return _jsx(Button, { ...props, children: children });
|
|
68
64
|
}
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './styleGrid';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './styleGrid';
|