react-luminus-components 1.1.20 → 1.1.21
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 +2 -0
- package/dist/.vite/manifest.json +43 -43
- package/dist/{DataKey-Chc9JWBN.js → DataKey-B7CWQXvv.js} +1 -1
- package/dist/{DataKey-dhQX8cMa.cjs → DataKey-DVMbPWFY.cjs} +1 -1
- package/dist/{SimpleTooltip-Cs6KsWMk.js → SimpleTooltip-BDudpqqO.js} +2 -2
- package/dist/{SimpleTooltip-CfoOF2bC.cjs → SimpleTooltip-CrOBQ9qh.cjs} +1 -1
- package/dist/components/Buttons/ContextButton/FileUploadContextButton.d.ts +11 -0
- package/dist/components/Buttons/index.d.ts +1 -0
- package/dist/components/Dropdown/comps/DropdownDivider/DropdownDivider.d.ts +6 -0
- package/dist/components/Dropdown/comps/DropdownItem/FileUploadDropdownItem.d.ts +11 -0
- package/dist/components/Dropdown/comps/index.d.ts +2 -0
- package/dist/components/Dropdown/index.d.ts +1 -1
- package/dist/components/Form/TextInput/TextInput.d.ts +2 -1
- package/dist/components/common/PromptDialog/PromptDialog.d.ts +3 -0
- package/dist/contexts/prompt/PromptContext.d.ts +10 -0
- package/dist/contexts/prompt/PromptProvider.d.ts +6 -0
- package/dist/contexts.cjs.js +1 -1
- package/dist/contexts.es.js +405 -368
- package/dist/{hasClass-Dg19NteG.cjs → hasClass-6qFx2Lwl.cjs} +1 -1
- package/dist/{hasClass-D2q3Otcv.js → hasClass-Hw6fOz0J.js} +1 -1
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/usePrompt/usePrompt.d.ts +7 -0
- package/dist/hooks.cjs.js +1 -1
- package/dist/hooks.es.js +6 -5
- package/dist/layout.cjs.js +1 -1
- package/dist/layout.es.js +3 -3
- package/dist/main.cjs.js +1 -1
- package/dist/main.d.ts +2 -2
- package/dist/main.es.js +1179 -1145
- package/dist/models/texts/ConfirmTexts.d.ts +2 -0
- package/dist/style.css +1 -1
- package/dist/{useAxios-Ce32mjz9.cjs → useAxios-B4X7zKtj.cjs} +36 -36
- package/dist/{useAxios-D-fCu46c.js → useAxios-CHbKHRpj.js} +195 -181
- package/dist/useConfirm-CrTJszXF.cjs +1 -0
- package/dist/useConfirm-CyietOP-.js +27 -0
- package/package.json +1 -1
- package/dist/useConfirm-BM62r8mq.cjs +0 -1
- package/dist/useConfirm-CTpbtdnu.js +0 -18
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const s=require("react"),C=require("./useAxios-B4X7zKtj.cjs"),f=()=>{const{isShown:r,text:c,showPrompt:e,hidePrompt:t,resolveRef:o}=s.useContext(C.PromptContext),m=s.useCallback(n=>{t(),o.current(n)},[t,o]),l=s.useCallback(async n=>(console.log(n),e(n),console.log("t"),new Promise(i=>{o.current=i})),[o,e]);return{isShown:r,text:c,prompt:l,onFinish:m}};let u;const h=()=>{const{show:r,text:c,showConfirm:e,hideConfirm:t}=s.useContext(C.ConfirmContext),o=()=>{t()};return{confirm:async i=>(e(i),new Promise(a=>{u=a})),onConfirm:()=>{o(),u(!0)},onCancel:()=>{o(),u(!1)},show:r,text:c}};exports.useConfirm=h;exports.usePrompt=f;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { useContext as a, useCallback as C } from "react";
|
|
2
|
+
import { P as u, C as p } from "./useAxios-CHbKHRpj.js";
|
|
3
|
+
const w = () => {
|
|
4
|
+
const { isShown: e, text: s, showPrompt: r, hidePrompt: t, resolveRef: o } = a(u), i = C((n) => {
|
|
5
|
+
t(), o.current(n);
|
|
6
|
+
}, [t, o]), l = C(async (n) => (console.log(n), r(n), console.log("t"), new Promise((c) => {
|
|
7
|
+
o.current = c;
|
|
8
|
+
})), [o, r]);
|
|
9
|
+
return { isShown: e, text: s, prompt: l, onFinish: i };
|
|
10
|
+
};
|
|
11
|
+
let m;
|
|
12
|
+
const x = () => {
|
|
13
|
+
const { show: e, text: s, showConfirm: r, hideConfirm: t } = a(p), o = () => {
|
|
14
|
+
t();
|
|
15
|
+
};
|
|
16
|
+
return { confirm: async (c) => (r(c), new Promise((f) => {
|
|
17
|
+
m = f;
|
|
18
|
+
})), onConfirm: () => {
|
|
19
|
+
o(), m(!0);
|
|
20
|
+
}, onCancel: () => {
|
|
21
|
+
o(), m(!1);
|
|
22
|
+
}, show: e, text: s };
|
|
23
|
+
};
|
|
24
|
+
export {
|
|
25
|
+
w as a,
|
|
26
|
+
x as u
|
|
27
|
+
};
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const C=require("./useAxios-Ce32mjz9.cjs"),f=require("react");let n;const m=()=>{const{show:e,text:r,showConfirm:s,hideConfirm:t}=f.useContext(C.ConfirmContext),o=()=>{t()};return{confirm:async c=>(s(c),new Promise(i=>{n=i})),onConfirm:()=>{o(),n(!0)},onCancel:()=>{o(),n(!1)},show:e,text:r}};exports.useConfirm=m;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { C as i } from "./useAxios-D-fCu46c.js";
|
|
2
|
-
import { useContext as C } from "react";
|
|
3
|
-
let o;
|
|
4
|
-
const h = () => {
|
|
5
|
-
const { show: r, text: e, showConfirm: t, hideConfirm: s } = C(i), n = () => {
|
|
6
|
-
s();
|
|
7
|
-
};
|
|
8
|
-
return { confirm: async (m) => (t(m), new Promise((c) => {
|
|
9
|
-
o = c;
|
|
10
|
-
})), onConfirm: () => {
|
|
11
|
-
n(), o(!0);
|
|
12
|
-
}, onCancel: () => {
|
|
13
|
-
n(), o(!1);
|
|
14
|
-
}, show: r, text: e };
|
|
15
|
-
};
|
|
16
|
-
export {
|
|
17
|
-
h as u
|
|
18
|
-
};
|