@akanjs/ui 0.0.151 → 0.0.153
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/Button.d.ts +1 -1
- package/ClientSide.d.ts +1 -1
- package/Copy.d.ts +1 -1
- package/CsrImage.d.ts +1 -1
- package/Data/CardList.d.ts +1 -1
- package/Data/Dashboard.d.ts +1 -1
- package/Data/Insight.d.ts +1 -1
- package/Data/Item.d.ts +6 -6
- package/Data/ListContainer.d.ts +2 -2
- package/Data/Pagination.d.ts +1 -1
- package/Data/QueryMaker.d.ts +1 -1
- package/Data/TableList.d.ts +2 -2
- package/DatePicker.d.ts +3 -4
- package/Dialog/Close.d.ts +1 -1
- package/Dialog/Content.d.ts +1 -1
- package/Dialog/Modal.d.ts +1 -1
- package/Dialog/Provider.d.ts +1 -1
- package/Dialog/Trigger.d.ts +1 -1
- package/Dialog/index.d.ts +4 -4
- package/DragAction.d.ts +4 -4
- package/DraggableList.d.ts +2 -2
- package/Dropdown.d.ts +1 -1
- package/Empty.d.ts +2 -2
- package/Field.d.ts +22 -22
- package/Image.d.ts +1 -1
- package/InfiniteScroll.d.ts +1 -1
- package/Input.d.ts +6 -6
- package/KeyboardAvoiding.d.ts +1 -1
- package/Layout/BottomAction.d.ts +1 -1
- package/Layout/BottomInset.d.ts +1 -1
- package/Layout/BottomTab.d.ts +1 -1
- package/Layout/Header.d.ts +1 -1
- package/Layout/LeftSider.d.ts +1 -1
- package/Layout/Navbar.d.ts +2 -2
- package/Layout/RightSider.d.ts +1 -1
- package/Layout/Sider.d.ts +1 -1
- package/Layout/Template.d.ts +1 -1
- package/Layout/TopLeftAction.d.ts +1 -1
- package/Layout/Unit.d.ts +1 -1
- package/Layout/View.d.ts +1 -1
- package/Layout/Zone.d.ts +1 -1
- package/Layout/index.d.ts +12 -12
- package/Link/Back.d.ts +1 -1
- package/Link/Close.d.ts +1 -1
- package/Link/CsrLink.d.ts +1 -1
- package/Link/NextLink.d.ts +1 -1
- package/Link/index.d.ts +1 -1
- package/Load/Edit.d.ts +1 -1
- package/Load/Edit_Client.d.ts +1 -1
- package/Load/Page.d.ts +1 -1
- package/Load/PageCSR.d.ts +1 -1
- package/Load/Pagination.d.ts +1 -1
- package/Load/Units.d.ts +1 -1
- package/Load/View.d.ts +1 -1
- package/Load/index.d.ts +1 -1
- package/Loading/Area.d.ts +1 -1
- package/Loading/Button.d.ts +1 -1
- package/Loading/Input.d.ts +1 -1
- package/Loading/ProgressBar.d.ts +1 -1
- package/Loading/Skeleton.d.ts +1 -1
- package/Loading/Spin.d.ts +1 -1
- package/Loading/index.d.ts +6 -6
- package/Menu.d.ts +1 -1
- package/Modal.d.ts +3 -3
- package/Model/Edit.d.ts +1 -1
- package/Model/EditModal.d.ts +2 -2
- package/Model/EditWrapper.d.ts +1 -1
- package/Model/LoadInit.d.ts +1 -1
- package/Model/New.d.ts +1 -1
- package/Model/NewWrapper.d.ts +1 -1
- package/Model/NewWrapper_Client.d.ts +1 -1
- package/Model/Remove.d.ts +1 -1
- package/Model/RemoveWrapper.d.ts +1 -1
- package/Model/SureToRemove.d.ts +1 -1
- package/Model/View.d.ts +1 -1
- package/Model/ViewEditModal.d.ts +1 -1
- package/Model/ViewModal.d.ts +1 -1
- package/Model/ViewWrapper.d.ts +1 -1
- package/More.d.ts +1 -1
- package/ObjectId.d.ts +1 -1
- package/Popconfirm.d.ts +2 -2
- package/Radio.d.ts +2 -2
- package/RecentTime.d.ts +1 -1
- package/Refresh.d.ts +1 -1
- package/ScreenNavigator.d.ts +3 -3
- package/Select.d.ts +1 -1
- package/Signal/Arg.d.ts +13 -13
- package/Signal/Doc.d.ts +6 -6
- package/Signal/GraphQL.d.ts +5 -6
- package/Signal/Listener.d.ts +2 -2
- package/Signal/Message.d.ts +4 -5
- package/Signal/Object.d.ts +4 -4
- package/Signal/PubSub.d.ts +4 -4
- package/Signal/Request.d.ts +2 -2
- package/Signal/Response.d.ts +3 -3
- package/Signal/RestApi.d.ts +5 -6
- package/Signal/WebSocket.d.ts +2 -2
- package/System/CSR.d.ts +5 -5
- package/System/Client.d.ts +8 -8
- package/System/Common.d.ts +2 -2
- package/System/DevModeToggle.d.ts +1 -1
- package/System/Gtag.d.ts +1 -1
- package/System/HealthCheck.d.ts +1 -1
- package/System/Messages.d.ts +1 -1
- package/System/Reconnect.d.ts +1 -1
- package/System/Root.d.ts +1 -1
- package/System/SSR.d.ts +4 -4
- package/System/SelectLanguage.d.ts +1 -1
- package/System/ThemeToggle.d.ts +1 -1
- package/System/index.d.ts +7 -7
- package/Tab/Menu.d.ts +1 -1
- package/Tab/Menus.d.ts +1 -1
- package/Tab/Panel.d.ts +1 -1
- package/Tab/Provider.d.ts +1 -1
- package/Tab/index.d.ts +4 -4
- package/Table.d.ts +1 -1
- package/ToggleSelect.d.ts +2 -2
- package/Unauthorized.d.ts +2 -2
- package/cjs/BottomSheet.js +38 -42
- package/cjs/Button.js +36 -34
- package/cjs/ClientSide.js +2 -1
- package/cjs/Copy.js +5 -4
- package/cjs/CsrImage.js +2 -1
- package/cjs/Data/CardList.js +41 -33
- package/cjs/Data/Dashboard.js +22 -12
- package/cjs/Data/Insight.js +7 -3
- package/cjs/Data/Item.js +54 -39
- package/cjs/Data/ListContainer.js +104 -70
- package/cjs/Data/Pagination.js +3 -2
- package/cjs/Data/QueryMaker.js +104 -82
- package/cjs/Data/TableList.js +45 -34
- package/cjs/DatePicker.js +38 -33
- package/cjs/Dialog/Close.js +5 -4
- package/cjs/Dialog/Content.js +2 -1
- package/cjs/Dialog/Modal.js +60 -49
- package/cjs/Dialog/Provider.js +2 -1
- package/cjs/Dialog/Trigger.js +5 -4
- package/cjs/Dialog/index.js +2 -1
- package/cjs/DragAction.js +11 -10
- package/cjs/DraggableList.js +10 -9
- package/cjs/Dropdown.js +32 -29
- package/cjs/Empty.js +17 -22
- package/cjs/Field.js +695 -573
- package/cjs/Image.js +2 -1
- package/cjs/InfiniteScroll.js +6 -1
- package/cjs/Input.js +171 -154
- package/cjs/KeyboardAvoiding.js +2 -1
- package/cjs/Layout/BottomAction.js +2 -1
- package/cjs/Layout/BottomInset.js +6 -5
- package/cjs/Layout/BottomTab.js +23 -17
- package/cjs/Layout/Header.js +14 -10
- package/cjs/Layout/LeftSider.js +17 -14
- package/cjs/Layout/Navbar.js +6 -12
- package/cjs/Layout/RightSider.js +24 -18
- package/cjs/Layout/Sider.js +24 -11
- package/cjs/Layout/Template.js +2 -1
- package/cjs/Layout/TopLeftAction.js +2 -1
- package/cjs/Layout/Unit.js +2 -1
- package/cjs/Layout/View.js +2 -1
- package/cjs/Layout/Zone.js +2 -1
- package/cjs/Link/Back.js +2 -1
- package/cjs/Link/Close.js +5 -4
- package/cjs/Link/CsrLink.js +5 -4
- package/cjs/Link/NextLink.js +5 -4
- package/cjs/Link/index.js +4 -3
- package/cjs/Load/Edit.js +2 -1
- package/cjs/Load/Edit_Client.js +6 -5
- package/cjs/Load/PageCSR.js +2 -1
- package/cjs/Load/Pagination.js +4 -3
- package/cjs/Load/Units.js +34 -27
- package/cjs/Load/View.js +3 -2
- package/cjs/Loading/Area.js +5 -1
- package/cjs/Loading/Button.js +2 -1
- package/cjs/Loading/Input.js +2 -1
- package/cjs/Loading/ProgressBar.js +2 -1
- package/cjs/Loading/Skeleton.js +7 -1
- package/cjs/Loading/Spin.js +2 -1
- package/cjs/Menu.js +105 -89
- package/cjs/Modal.js +33 -20
- package/cjs/Model/Edit.js +18 -12
- package/cjs/Model/EditModal.js +43 -45
- package/cjs/Model/EditWrapper.js +5 -4
- package/cjs/Model/LoadInit.js +2 -1
- package/cjs/Model/New.js +18 -12
- package/cjs/Model/NewWrapper.js +2 -1
- package/cjs/Model/NewWrapper_Client.js +5 -4
- package/cjs/Model/Remove.js +45 -39
- package/cjs/Model/RemoveWrapper.js +6 -5
- package/cjs/Model/SureToRemove.js +70 -54
- package/cjs/Model/View.js +13 -3
- package/cjs/Model/ViewEditModal.js +30 -19
- package/cjs/Model/ViewModal.js +9 -8
- package/cjs/Model/ViewWrapper.js +5 -4
- package/cjs/More.js +10 -6
- package/cjs/ObjectId.js +5 -1
- package/cjs/Pagination.js +45 -40
- package/cjs/Popconfirm.js +53 -45
- package/cjs/Radio.js +26 -22
- package/cjs/RecentTime.js +16 -15
- package/cjs/Refresh.js +5 -4
- package/cjs/ScreenNavigator.js +7 -6
- package/cjs/Select.js +156 -135
- package/cjs/Signal/Arg.js +94 -54
- package/cjs/Signal/Doc.js +175 -98
- package/cjs/Signal/GraphQL.js +143 -59
- package/cjs/Signal/Listener.js +28 -21
- package/cjs/Signal/Message.js +166 -80
- package/cjs/Signal/Object.js +75 -39
- package/cjs/Signal/PubSub.js +161 -79
- package/cjs/Signal/Request.js +16 -9
- package/cjs/Signal/Response.js +30 -17
- package/cjs/Signal/RestApi.js +186 -84
- package/cjs/Signal/WebSocket.js +6 -5
- package/cjs/System/CSR.js +184 -165
- package/cjs/System/Client.js +24 -20
- package/cjs/System/Common.js +29 -25
- package/cjs/System/DevModeToggle.js +14 -10
- package/cjs/System/Gtag.js +11 -7
- package/cjs/System/HealthCheck.js +2 -1
- package/cjs/System/Messages.js +39 -36
- package/cjs/System/Reconnect.js +25 -3
- package/cjs/System/Root.js +2 -1
- package/cjs/System/SSR.js +72 -54
- package/cjs/System/SelectLanguage.js +25 -21
- package/cjs/System/ThemeToggle.js +5 -1
- package/cjs/System/index.js +3 -2
- package/cjs/Tab/Menu.js +5 -4
- package/cjs/Tab/Menus.js +2 -1
- package/cjs/Tab/Panel.js +3 -2
- package/cjs/Tab/Provider.js +2 -1
- package/cjs/Tab/index.js +2 -1
- package/cjs/Table.js +25 -26
- package/cjs/ToggleSelect.js +59 -54
- package/cjs/Unauthorized.js +17 -22
- package/esm/BottomSheet.js +38 -32
- package/esm/Button.js +36 -24
- package/esm/ClientSide.js +2 -1
- package/esm/Copy.js +5 -4
- package/esm/CsrImage.js +2 -1
- package/esm/Data/CardList.js +41 -33
- package/esm/Data/Dashboard.js +22 -12
- package/esm/Data/Insight.js +7 -3
- package/esm/Data/Item.js +54 -29
- package/esm/Data/ListContainer.js +104 -70
- package/esm/Data/Pagination.js +3 -2
- package/esm/Data/QueryMaker.js +104 -82
- package/esm/Data/TableList.js +45 -34
- package/esm/DatePicker.js +38 -33
- package/esm/Dialog/Close.js +5 -4
- package/esm/Dialog/Content.js +2 -1
- package/esm/Dialog/Modal.js +60 -49
- package/esm/Dialog/Provider.js +2 -1
- package/esm/Dialog/Trigger.js +5 -4
- package/esm/Dialog/index.js +2 -1
- package/esm/DragAction.js +11 -10
- package/esm/DraggableList.js +10 -9
- package/esm/Dropdown.js +32 -29
- package/esm/Empty.js +17 -12
- package/esm/Field.js +695 -573
- package/esm/Image.js +2 -1
- package/esm/InfiniteScroll.js +6 -1
- package/esm/Input.js +171 -144
- package/esm/KeyboardAvoiding.js +2 -1
- package/esm/Layout/BottomAction.js +2 -1
- package/esm/Layout/BottomInset.js +6 -5
- package/esm/Layout/BottomTab.js +23 -17
- package/esm/Layout/Header.js +14 -10
- package/esm/Layout/LeftSider.js +17 -14
- package/esm/Layout/Navbar.js +6 -2
- package/esm/Layout/RightSider.js +24 -18
- package/esm/Layout/Sider.js +24 -11
- package/esm/Layout/Template.js +2 -1
- package/esm/Layout/TopLeftAction.js +2 -1
- package/esm/Layout/Unit.js +2 -1
- package/esm/Layout/View.js +2 -1
- package/esm/Layout/Zone.js +2 -1
- package/esm/Link/Back.js +2 -1
- package/esm/Link/Close.js +5 -4
- package/esm/Link/CsrLink.js +5 -4
- package/esm/Link/NextLink.js +5 -4
- package/esm/Link/index.js +4 -3
- package/esm/Load/Edit.js +2 -1
- package/esm/Load/Edit_Client.js +6 -5
- package/esm/Load/PageCSR.js +2 -1
- package/esm/Load/Pagination.js +4 -3
- package/esm/Load/Units.js +34 -27
- package/esm/Load/View.js +3 -2
- package/esm/Loading/Area.js +5 -1
- package/esm/Loading/Button.js +2 -1
- package/esm/Loading/Input.js +2 -1
- package/esm/Loading/ProgressBar.js +2 -1
- package/esm/Loading/Skeleton.js +7 -1
- package/esm/Loading/Spin.js +2 -1
- package/esm/Menu.js +105 -89
- package/esm/Modal.js +33 -20
- package/esm/Model/Edit.js +18 -12
- package/esm/Model/EditModal.js +43 -35
- package/esm/Model/EditWrapper.js +5 -4
- package/esm/Model/LoadInit.js +2 -1
- package/esm/Model/New.js +18 -12
- package/esm/Model/NewWrapper.js +2 -1
- package/esm/Model/NewWrapper_Client.js +5 -4
- package/esm/Model/Remove.js +45 -39
- package/esm/Model/RemoveWrapper.js +6 -5
- package/esm/Model/SureToRemove.js +70 -54
- package/esm/Model/View.js +13 -3
- package/esm/Model/ViewEditModal.js +30 -19
- package/esm/Model/ViewModal.js +9 -8
- package/esm/Model/ViewWrapper.js +5 -4
- package/esm/More.js +10 -6
- package/esm/ObjectId.js +5 -1
- package/esm/Pagination.js +45 -40
- package/esm/Popconfirm.js +53 -35
- package/esm/Radio.js +26 -22
- package/esm/RecentTime.js +16 -15
- package/esm/Refresh.js +5 -4
- package/esm/ScreenNavigator.js +7 -6
- package/esm/Select.js +156 -135
- package/esm/Signal/Arg.js +94 -54
- package/esm/Signal/Doc.js +175 -98
- package/esm/Signal/GraphQL.js +143 -59
- package/esm/Signal/Listener.js +28 -21
- package/esm/Signal/Message.js +166 -80
- package/esm/Signal/Object.js +75 -39
- package/esm/Signal/PubSub.js +161 -79
- package/esm/Signal/Request.js +16 -9
- package/esm/Signal/Response.js +30 -17
- package/esm/Signal/RestApi.js +186 -84
- package/esm/Signal/WebSocket.js +6 -5
- package/esm/System/CSR.js +184 -165
- package/esm/System/Client.js +24 -20
- package/esm/System/Common.js +29 -25
- package/esm/System/DevModeToggle.js +14 -10
- package/esm/System/Gtag.js +11 -7
- package/esm/System/HealthCheck.js +2 -1
- package/esm/System/Messages.js +39 -36
- package/esm/System/Reconnect.js +25 -3
- package/esm/System/Root.js +2 -1
- package/esm/System/SSR.js +72 -54
- package/esm/System/SelectLanguage.js +25 -21
- package/esm/System/ThemeToggle.js +5 -1
- package/esm/System/index.js +3 -2
- package/esm/Tab/Menu.js +5 -4
- package/esm/Tab/Menus.js +2 -1
- package/esm/Tab/Panel.js +3 -2
- package/esm/Tab/Provider.js +2 -1
- package/esm/Tab/index.js +2 -1
- package/esm/Table.js +25 -16
- package/esm/ToggleSelect.js +59 -54
- package/esm/Unauthorized.js +17 -12
- package/package.json +4 -1
- package/styles.css +624 -0
package/esm/Dialog/Provider.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
3
|
import { clsx } from "@akanjs/client";
|
|
3
4
|
import * as Dialog from "@radix-ui/react-dialog";
|
|
4
5
|
import { useEffect, useState } from "react";
|
|
@@ -10,7 +11,7 @@ const Provider = ({ className, defaultOpen = false, open = defaultOpen, children
|
|
|
10
11
|
useEffect(() => {
|
|
11
12
|
setOpenState(open);
|
|
12
13
|
}, [open]);
|
|
13
|
-
return /* @__PURE__ */
|
|
14
|
+
return /* @__PURE__ */ jsx(DialogContext.Provider, { value: { open: openState, setOpen: setOpenState, title, setTitle, action, setAction }, children: /* @__PURE__ */ jsx(Dialog.Root, { open: openState, children: /* @__PURE__ */ jsx("div", { "data-open": openState, className: clsx("group/dialog", className), children }) }) });
|
|
14
15
|
};
|
|
15
16
|
export {
|
|
16
17
|
Provider
|
package/esm/Dialog/Trigger.js
CHANGED
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
3
|
import { useContext } from "react";
|
|
3
4
|
import { DialogContext } from "./context";
|
|
4
5
|
const Trigger = ({ className, children }) => {
|
|
5
6
|
const { setOpen } = useContext(DialogContext);
|
|
6
|
-
return /* @__PURE__ */
|
|
7
|
+
return /* @__PURE__ */ jsx(
|
|
7
8
|
"a",
|
|
8
9
|
{
|
|
9
10
|
className,
|
|
10
11
|
onClick: () => {
|
|
11
12
|
setOpen(true);
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
},
|
|
14
|
+
children
|
|
15
|
+
}
|
|
15
16
|
);
|
|
16
17
|
};
|
|
17
18
|
export {
|
package/esm/Dialog/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
1
2
|
import { Action } from "./Action";
|
|
2
3
|
import { Content } from "./Content";
|
|
3
4
|
import { Modal } from "./Modal";
|
|
@@ -5,7 +6,7 @@ import { Provider } from "./Provider";
|
|
|
5
6
|
import { Title } from "./Title";
|
|
6
7
|
import { Trigger } from "./Trigger";
|
|
7
8
|
const Dialog = ({ children, ...props }) => {
|
|
8
|
-
return /* @__PURE__ */
|
|
9
|
+
return /* @__PURE__ */ jsx(Provider, { ...props, children });
|
|
9
10
|
};
|
|
10
11
|
Dialog.Modal = Modal;
|
|
11
12
|
Dialog.Title = Title;
|
package/esm/DragAction.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
3
|
import { clsx } from "@akanjs/client";
|
|
3
4
|
import { useGesture } from "@use-gesture/react";
|
|
4
5
|
import { createContext, useContext, useRef } from "react";
|
|
@@ -54,36 +55,36 @@ const DragAction = ({ className, children, onClick, onLeft, onRight }) => {
|
|
|
54
55
|
},
|
|
55
56
|
{ drag: { axis: "x" } }
|
|
56
57
|
);
|
|
57
|
-
return /* @__PURE__ */
|
|
58
|
+
return /* @__PURE__ */ jsx(DragActionContext.Provider, { value: { bind, x, y, leftOpacity, leftWidth, rightOpacity, rightWidth, onClick }, children: /* @__PURE__ */ jsx("div", { ref, className: clsx("relative overflow-x-hidden", className), children }) });
|
|
58
59
|
};
|
|
59
60
|
const Body = ({ children }) => {
|
|
60
61
|
const { bind, x, onClick } = useContext(DragActionContext);
|
|
61
|
-
return /* @__PURE__ */
|
|
62
|
+
return /* @__PURE__ */ jsx(animated.div, { className: "cursor-pointer", ...bind(), style: { x, touchAction: "pan-y" }, children });
|
|
62
63
|
};
|
|
63
64
|
DragAction.Body = Body;
|
|
64
65
|
const Left = ({ children }) => {
|
|
65
66
|
const { bind, leftOpacity, leftWidth } = useContext(DragActionContext);
|
|
66
|
-
return /* @__PURE__ */
|
|
67
|
+
return /* @__PURE__ */ jsx(
|
|
67
68
|
animated.div,
|
|
68
69
|
{
|
|
69
70
|
...bind(),
|
|
70
71
|
style: { touchAction: "pan-y", opacity: leftOpacity, width: leftWidth },
|
|
71
|
-
className: "absolute inset-y-0 left-0 flex items-center justify-center"
|
|
72
|
-
|
|
73
|
-
|
|
72
|
+
className: "absolute inset-y-0 left-0 flex items-center justify-center",
|
|
73
|
+
children
|
|
74
|
+
}
|
|
74
75
|
);
|
|
75
76
|
};
|
|
76
77
|
DragAction.Left = Left;
|
|
77
78
|
const Right = ({ children }) => {
|
|
78
79
|
const { bind, rightOpacity, rightWidth } = useContext(DragActionContext);
|
|
79
|
-
return /* @__PURE__ */
|
|
80
|
+
return /* @__PURE__ */ jsx(
|
|
80
81
|
animated.div,
|
|
81
82
|
{
|
|
82
83
|
...bind(),
|
|
83
84
|
style: { opacity: rightOpacity, width: rightWidth },
|
|
84
|
-
className: "absolute inset-y-0 right-0 flex items-center justify-center"
|
|
85
|
-
|
|
86
|
-
|
|
85
|
+
className: "absolute inset-y-0 right-0 flex items-center justify-center",
|
|
86
|
+
children
|
|
87
|
+
}
|
|
87
88
|
);
|
|
88
89
|
};
|
|
89
90
|
DragAction.Right = Right;
|
package/esm/DraggableList.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
3
|
import { clsx } from "@akanjs/client";
|
|
3
4
|
import { animated, config, useSprings } from "@react-spring/web";
|
|
4
5
|
import { useGesture } from "@use-gesture/react";
|
|
@@ -57,33 +58,33 @@ const DragList = ({ className, mode = "vertical", children, onChange }) => {
|
|
|
57
58
|
}
|
|
58
59
|
}
|
|
59
60
|
});
|
|
60
|
-
return /* @__PURE__ */
|
|
61
|
+
return /* @__PURE__ */ jsx("div", { className: clsx(`flex gap-0`, { "flex-col": mode === "vertical" }, className), children: springs.map(({ zIndex, shadow, movement, scale }, i) => /* @__PURE__ */ jsx(
|
|
61
62
|
animated.div,
|
|
62
63
|
{
|
|
63
64
|
ref: (el) => {
|
|
64
65
|
refs.current[i] = el;
|
|
65
66
|
},
|
|
66
|
-
key: i,
|
|
67
67
|
style: {
|
|
68
68
|
zIndex,
|
|
69
69
|
boxShadow: shadow.to((s) => `rgba(0, 0, 0, 0.15) 0px ${s}px ${2 * s}px 0px`),
|
|
70
70
|
scale,
|
|
71
71
|
...mode === "vertical" ? { y: movement } : { x: movement }
|
|
72
72
|
// cursor: "grab",
|
|
73
|
-
}
|
|
73
|
+
},
|
|
74
|
+
children: /* @__PURE__ */ jsx(dragListContext.Provider, { value: { bind: () => bind(i) }, children: children[i] })
|
|
74
75
|
},
|
|
75
|
-
|
|
76
|
-
)));
|
|
76
|
+
i
|
|
77
|
+
)) });
|
|
77
78
|
};
|
|
78
79
|
DragList.Cursor = ({ className, children }) => {
|
|
79
80
|
const { bind } = useDragList();
|
|
80
|
-
return /* @__PURE__ */
|
|
81
|
+
return /* @__PURE__ */ jsx(
|
|
81
82
|
"div",
|
|
82
83
|
{
|
|
83
84
|
className: clsx("cursor-grab duration-200 hover:scale-[1.01] hover:opacity-70 hover:shadow-xl", className),
|
|
84
|
-
...bind()
|
|
85
|
-
|
|
86
|
-
|
|
85
|
+
...bind(),
|
|
86
|
+
children
|
|
87
|
+
}
|
|
87
88
|
);
|
|
88
89
|
};
|
|
89
90
|
const Item = ({ value, children }) => {
|
package/esm/Dropdown.js
CHANGED
|
@@ -1,43 +1,46 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
3
|
import { clsx } from "@akanjs/client";
|
|
3
4
|
import { useState } from "react";
|
|
4
5
|
const Dropdown = ({ value, content, className, buttonClassName, dropdownClassName }) => {
|
|
5
6
|
const [opened, setOpened] = useState(false);
|
|
6
|
-
return /* @__PURE__ */
|
|
7
|
+
return /* @__PURE__ */ jsxs(
|
|
7
8
|
"div",
|
|
8
9
|
{
|
|
9
10
|
onClick: () => {
|
|
10
11
|
setOpened(true);
|
|
11
12
|
},
|
|
12
|
-
className: clsx("dropdown dropdown-end", className)
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
13
|
+
className: clsx("dropdown dropdown-end", className),
|
|
14
|
+
children: [
|
|
15
|
+
/* @__PURE__ */ jsx(
|
|
16
|
+
"label",
|
|
17
|
+
{
|
|
18
|
+
tabIndex: 0,
|
|
19
|
+
className: clsx("btn flex", buttonClassName),
|
|
20
|
+
onClick: () => {
|
|
21
|
+
setOpened(true);
|
|
22
|
+
},
|
|
23
|
+
children: value
|
|
24
|
+
}
|
|
25
|
+
),
|
|
26
|
+
/* @__PURE__ */ jsx(
|
|
27
|
+
"ul",
|
|
28
|
+
{
|
|
29
|
+
tabIndex: 0,
|
|
30
|
+
onClick: () => {
|
|
31
|
+
if (opened)
|
|
32
|
+
setOpened(false);
|
|
33
|
+
},
|
|
34
|
+
className: clsx(
|
|
35
|
+
"md:scrollbar-thin md:scrollbar-thumb-rounded-md md:scrollbar-thumb-gray-300 md:scrollbar-track-transparent bg-base-100 z-[100] grid max-h-52 gap-2 overflow-auto rounded-md pr-3 whitespace-nowrap shadow-sm",
|
|
36
|
+
opened ? "dropdown-content size-fit p-1" : "size-0 overflow-hidden",
|
|
37
|
+
dropdownClassName
|
|
38
|
+
),
|
|
39
|
+
children: content
|
|
40
|
+
}
|
|
37
41
|
)
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
)
|
|
42
|
+
]
|
|
43
|
+
}
|
|
41
44
|
);
|
|
42
45
|
};
|
|
43
46
|
export {
|
package/esm/Empty.js
CHANGED
|
@@ -1,20 +1,25 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
1
2
|
import { clsx } from "@akanjs/client";
|
|
2
3
|
import { usePage } from "@akanjs/next";
|
|
3
|
-
import React from "react";
|
|
4
4
|
import { AiOutlineMeh } from "react-icons/ai";
|
|
5
5
|
const Empty = ({ className = "", description, children, minHeight = 300 }) => {
|
|
6
6
|
const { l } = usePage();
|
|
7
|
-
return /* @__PURE__ */
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
7
|
+
return /* @__PURE__ */ jsxs("div", { children: [
|
|
8
|
+
/* @__PURE__ */ jsxs(
|
|
9
|
+
"div",
|
|
10
|
+
{
|
|
11
|
+
className: clsx(
|
|
12
|
+
`min-h-[${minHeight}px] text-base-content/30 flex flex-col items-center justify-center gap-3 pt-6 pb-3`,
|
|
13
|
+
className
|
|
14
|
+
),
|
|
15
|
+
children: [
|
|
16
|
+
/* @__PURE__ */ jsx(AiOutlineMeh, { className: "scale-150 text-4xl" }),
|
|
17
|
+
/* @__PURE__ */ jsx("p", { children: description ?? l("util.noData") })
|
|
18
|
+
]
|
|
19
|
+
}
|
|
20
|
+
),
|
|
21
|
+
children
|
|
22
|
+
] });
|
|
18
23
|
};
|
|
19
24
|
export {
|
|
20
25
|
Empty
|