@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.
Files changed (352) hide show
  1. package/Button.d.ts +1 -1
  2. package/ClientSide.d.ts +1 -1
  3. package/Copy.d.ts +1 -1
  4. package/CsrImage.d.ts +1 -1
  5. package/Data/CardList.d.ts +1 -1
  6. package/Data/Dashboard.d.ts +1 -1
  7. package/Data/Insight.d.ts +1 -1
  8. package/Data/Item.d.ts +6 -6
  9. package/Data/ListContainer.d.ts +2 -2
  10. package/Data/Pagination.d.ts +1 -1
  11. package/Data/QueryMaker.d.ts +1 -1
  12. package/Data/TableList.d.ts +2 -2
  13. package/DatePicker.d.ts +3 -4
  14. package/Dialog/Close.d.ts +1 -1
  15. package/Dialog/Content.d.ts +1 -1
  16. package/Dialog/Modal.d.ts +1 -1
  17. package/Dialog/Provider.d.ts +1 -1
  18. package/Dialog/Trigger.d.ts +1 -1
  19. package/Dialog/index.d.ts +4 -4
  20. package/DragAction.d.ts +4 -4
  21. package/DraggableList.d.ts +2 -2
  22. package/Dropdown.d.ts +1 -1
  23. package/Empty.d.ts +2 -2
  24. package/Field.d.ts +22 -22
  25. package/Image.d.ts +1 -1
  26. package/InfiniteScroll.d.ts +1 -1
  27. package/Input.d.ts +6 -6
  28. package/KeyboardAvoiding.d.ts +1 -1
  29. package/Layout/BottomAction.d.ts +1 -1
  30. package/Layout/BottomInset.d.ts +1 -1
  31. package/Layout/BottomTab.d.ts +1 -1
  32. package/Layout/Header.d.ts +1 -1
  33. package/Layout/LeftSider.d.ts +1 -1
  34. package/Layout/Navbar.d.ts +2 -2
  35. package/Layout/RightSider.d.ts +1 -1
  36. package/Layout/Sider.d.ts +1 -1
  37. package/Layout/Template.d.ts +1 -1
  38. package/Layout/TopLeftAction.d.ts +1 -1
  39. package/Layout/Unit.d.ts +1 -1
  40. package/Layout/View.d.ts +1 -1
  41. package/Layout/Zone.d.ts +1 -1
  42. package/Layout/index.d.ts +12 -12
  43. package/Link/Back.d.ts +1 -1
  44. package/Link/Close.d.ts +1 -1
  45. package/Link/CsrLink.d.ts +1 -1
  46. package/Link/NextLink.d.ts +1 -1
  47. package/Link/index.d.ts +1 -1
  48. package/Load/Edit.d.ts +1 -1
  49. package/Load/Edit_Client.d.ts +1 -1
  50. package/Load/Page.d.ts +1 -1
  51. package/Load/PageCSR.d.ts +1 -1
  52. package/Load/Pagination.d.ts +1 -1
  53. package/Load/Units.d.ts +1 -1
  54. package/Load/View.d.ts +1 -1
  55. package/Load/index.d.ts +1 -1
  56. package/Loading/Area.d.ts +1 -1
  57. package/Loading/Button.d.ts +1 -1
  58. package/Loading/Input.d.ts +1 -1
  59. package/Loading/ProgressBar.d.ts +1 -1
  60. package/Loading/Skeleton.d.ts +1 -1
  61. package/Loading/Spin.d.ts +1 -1
  62. package/Loading/index.d.ts +6 -6
  63. package/Menu.d.ts +1 -1
  64. package/Modal.d.ts +3 -3
  65. package/Model/Edit.d.ts +1 -1
  66. package/Model/EditModal.d.ts +2 -2
  67. package/Model/EditWrapper.d.ts +1 -1
  68. package/Model/LoadInit.d.ts +1 -1
  69. package/Model/New.d.ts +1 -1
  70. package/Model/NewWrapper.d.ts +1 -1
  71. package/Model/NewWrapper_Client.d.ts +1 -1
  72. package/Model/Remove.d.ts +1 -1
  73. package/Model/RemoveWrapper.d.ts +1 -1
  74. package/Model/SureToRemove.d.ts +1 -1
  75. package/Model/View.d.ts +1 -1
  76. package/Model/ViewEditModal.d.ts +1 -1
  77. package/Model/ViewModal.d.ts +1 -1
  78. package/Model/ViewWrapper.d.ts +1 -1
  79. package/More.d.ts +1 -1
  80. package/ObjectId.d.ts +1 -1
  81. package/Popconfirm.d.ts +2 -2
  82. package/Radio.d.ts +2 -2
  83. package/RecentTime.d.ts +1 -1
  84. package/Refresh.d.ts +1 -1
  85. package/ScreenNavigator.d.ts +3 -3
  86. package/Select.d.ts +1 -1
  87. package/Signal/Arg.d.ts +13 -13
  88. package/Signal/Doc.d.ts +6 -6
  89. package/Signal/GraphQL.d.ts +5 -6
  90. package/Signal/Listener.d.ts +2 -2
  91. package/Signal/Message.d.ts +4 -5
  92. package/Signal/Object.d.ts +4 -4
  93. package/Signal/PubSub.d.ts +4 -4
  94. package/Signal/Request.d.ts +2 -2
  95. package/Signal/Response.d.ts +3 -3
  96. package/Signal/RestApi.d.ts +5 -6
  97. package/Signal/WebSocket.d.ts +2 -2
  98. package/System/CSR.d.ts +5 -5
  99. package/System/Client.d.ts +8 -8
  100. package/System/Common.d.ts +2 -2
  101. package/System/DevModeToggle.d.ts +1 -1
  102. package/System/Gtag.d.ts +1 -1
  103. package/System/HealthCheck.d.ts +1 -1
  104. package/System/Messages.d.ts +1 -1
  105. package/System/Reconnect.d.ts +1 -1
  106. package/System/Root.d.ts +1 -1
  107. package/System/SSR.d.ts +4 -4
  108. package/System/SelectLanguage.d.ts +1 -1
  109. package/System/ThemeToggle.d.ts +1 -1
  110. package/System/index.d.ts +7 -7
  111. package/Tab/Menu.d.ts +1 -1
  112. package/Tab/Menus.d.ts +1 -1
  113. package/Tab/Panel.d.ts +1 -1
  114. package/Tab/Provider.d.ts +1 -1
  115. package/Tab/index.d.ts +4 -4
  116. package/Table.d.ts +1 -1
  117. package/ToggleSelect.d.ts +2 -2
  118. package/Unauthorized.d.ts +2 -2
  119. package/cjs/BottomSheet.js +38 -42
  120. package/cjs/Button.js +36 -34
  121. package/cjs/ClientSide.js +2 -1
  122. package/cjs/Copy.js +5 -4
  123. package/cjs/CsrImage.js +2 -1
  124. package/cjs/Data/CardList.js +41 -33
  125. package/cjs/Data/Dashboard.js +22 -12
  126. package/cjs/Data/Insight.js +7 -3
  127. package/cjs/Data/Item.js +54 -39
  128. package/cjs/Data/ListContainer.js +104 -70
  129. package/cjs/Data/Pagination.js +3 -2
  130. package/cjs/Data/QueryMaker.js +104 -82
  131. package/cjs/Data/TableList.js +45 -34
  132. package/cjs/DatePicker.js +38 -33
  133. package/cjs/Dialog/Close.js +5 -4
  134. package/cjs/Dialog/Content.js +2 -1
  135. package/cjs/Dialog/Modal.js +60 -49
  136. package/cjs/Dialog/Provider.js +2 -1
  137. package/cjs/Dialog/Trigger.js +5 -4
  138. package/cjs/Dialog/index.js +2 -1
  139. package/cjs/DragAction.js +11 -10
  140. package/cjs/DraggableList.js +10 -9
  141. package/cjs/Dropdown.js +32 -29
  142. package/cjs/Empty.js +17 -22
  143. package/cjs/Field.js +695 -573
  144. package/cjs/Image.js +2 -1
  145. package/cjs/InfiniteScroll.js +6 -1
  146. package/cjs/Input.js +171 -154
  147. package/cjs/KeyboardAvoiding.js +2 -1
  148. package/cjs/Layout/BottomAction.js +2 -1
  149. package/cjs/Layout/BottomInset.js +6 -5
  150. package/cjs/Layout/BottomTab.js +23 -17
  151. package/cjs/Layout/Header.js +14 -10
  152. package/cjs/Layout/LeftSider.js +17 -14
  153. package/cjs/Layout/Navbar.js +6 -12
  154. package/cjs/Layout/RightSider.js +24 -18
  155. package/cjs/Layout/Sider.js +24 -11
  156. package/cjs/Layout/Template.js +2 -1
  157. package/cjs/Layout/TopLeftAction.js +2 -1
  158. package/cjs/Layout/Unit.js +2 -1
  159. package/cjs/Layout/View.js +2 -1
  160. package/cjs/Layout/Zone.js +2 -1
  161. package/cjs/Link/Back.js +2 -1
  162. package/cjs/Link/Close.js +5 -4
  163. package/cjs/Link/CsrLink.js +5 -4
  164. package/cjs/Link/NextLink.js +5 -4
  165. package/cjs/Link/index.js +4 -3
  166. package/cjs/Load/Edit.js +2 -1
  167. package/cjs/Load/Edit_Client.js +6 -5
  168. package/cjs/Load/PageCSR.js +2 -1
  169. package/cjs/Load/Pagination.js +4 -3
  170. package/cjs/Load/Units.js +34 -27
  171. package/cjs/Load/View.js +3 -2
  172. package/cjs/Loading/Area.js +5 -1
  173. package/cjs/Loading/Button.js +2 -1
  174. package/cjs/Loading/Input.js +2 -1
  175. package/cjs/Loading/ProgressBar.js +2 -1
  176. package/cjs/Loading/Skeleton.js +7 -1
  177. package/cjs/Loading/Spin.js +2 -1
  178. package/cjs/Menu.js +105 -89
  179. package/cjs/Modal.js +33 -20
  180. package/cjs/Model/Edit.js +18 -12
  181. package/cjs/Model/EditModal.js +43 -45
  182. package/cjs/Model/EditWrapper.js +5 -4
  183. package/cjs/Model/LoadInit.js +2 -1
  184. package/cjs/Model/New.js +18 -12
  185. package/cjs/Model/NewWrapper.js +2 -1
  186. package/cjs/Model/NewWrapper_Client.js +5 -4
  187. package/cjs/Model/Remove.js +45 -39
  188. package/cjs/Model/RemoveWrapper.js +6 -5
  189. package/cjs/Model/SureToRemove.js +70 -54
  190. package/cjs/Model/View.js +13 -3
  191. package/cjs/Model/ViewEditModal.js +30 -19
  192. package/cjs/Model/ViewModal.js +9 -8
  193. package/cjs/Model/ViewWrapper.js +5 -4
  194. package/cjs/More.js +10 -6
  195. package/cjs/ObjectId.js +5 -1
  196. package/cjs/Pagination.js +45 -40
  197. package/cjs/Popconfirm.js +53 -45
  198. package/cjs/Radio.js +26 -22
  199. package/cjs/RecentTime.js +16 -15
  200. package/cjs/Refresh.js +5 -4
  201. package/cjs/ScreenNavigator.js +7 -6
  202. package/cjs/Select.js +156 -135
  203. package/cjs/Signal/Arg.js +94 -54
  204. package/cjs/Signal/Doc.js +175 -98
  205. package/cjs/Signal/GraphQL.js +143 -59
  206. package/cjs/Signal/Listener.js +28 -21
  207. package/cjs/Signal/Message.js +166 -80
  208. package/cjs/Signal/Object.js +75 -39
  209. package/cjs/Signal/PubSub.js +161 -79
  210. package/cjs/Signal/Request.js +16 -9
  211. package/cjs/Signal/Response.js +30 -17
  212. package/cjs/Signal/RestApi.js +186 -84
  213. package/cjs/Signal/WebSocket.js +6 -5
  214. package/cjs/System/CSR.js +184 -165
  215. package/cjs/System/Client.js +24 -20
  216. package/cjs/System/Common.js +29 -25
  217. package/cjs/System/DevModeToggle.js +14 -10
  218. package/cjs/System/Gtag.js +11 -7
  219. package/cjs/System/HealthCheck.js +2 -1
  220. package/cjs/System/Messages.js +39 -36
  221. package/cjs/System/Reconnect.js +25 -3
  222. package/cjs/System/Root.js +2 -1
  223. package/cjs/System/SSR.js +72 -54
  224. package/cjs/System/SelectLanguage.js +25 -21
  225. package/cjs/System/ThemeToggle.js +5 -1
  226. package/cjs/System/index.js +3 -2
  227. package/cjs/Tab/Menu.js +5 -4
  228. package/cjs/Tab/Menus.js +2 -1
  229. package/cjs/Tab/Panel.js +3 -2
  230. package/cjs/Tab/Provider.js +2 -1
  231. package/cjs/Tab/index.js +2 -1
  232. package/cjs/Table.js +25 -26
  233. package/cjs/ToggleSelect.js +59 -54
  234. package/cjs/Unauthorized.js +17 -22
  235. package/esm/BottomSheet.js +38 -32
  236. package/esm/Button.js +36 -24
  237. package/esm/ClientSide.js +2 -1
  238. package/esm/Copy.js +5 -4
  239. package/esm/CsrImage.js +2 -1
  240. package/esm/Data/CardList.js +41 -33
  241. package/esm/Data/Dashboard.js +22 -12
  242. package/esm/Data/Insight.js +7 -3
  243. package/esm/Data/Item.js +54 -29
  244. package/esm/Data/ListContainer.js +104 -70
  245. package/esm/Data/Pagination.js +3 -2
  246. package/esm/Data/QueryMaker.js +104 -82
  247. package/esm/Data/TableList.js +45 -34
  248. package/esm/DatePicker.js +38 -33
  249. package/esm/Dialog/Close.js +5 -4
  250. package/esm/Dialog/Content.js +2 -1
  251. package/esm/Dialog/Modal.js +60 -49
  252. package/esm/Dialog/Provider.js +2 -1
  253. package/esm/Dialog/Trigger.js +5 -4
  254. package/esm/Dialog/index.js +2 -1
  255. package/esm/DragAction.js +11 -10
  256. package/esm/DraggableList.js +10 -9
  257. package/esm/Dropdown.js +32 -29
  258. package/esm/Empty.js +17 -12
  259. package/esm/Field.js +695 -573
  260. package/esm/Image.js +2 -1
  261. package/esm/InfiniteScroll.js +6 -1
  262. package/esm/Input.js +171 -144
  263. package/esm/KeyboardAvoiding.js +2 -1
  264. package/esm/Layout/BottomAction.js +2 -1
  265. package/esm/Layout/BottomInset.js +6 -5
  266. package/esm/Layout/BottomTab.js +23 -17
  267. package/esm/Layout/Header.js +14 -10
  268. package/esm/Layout/LeftSider.js +17 -14
  269. package/esm/Layout/Navbar.js +6 -2
  270. package/esm/Layout/RightSider.js +24 -18
  271. package/esm/Layout/Sider.js +24 -11
  272. package/esm/Layout/Template.js +2 -1
  273. package/esm/Layout/TopLeftAction.js +2 -1
  274. package/esm/Layout/Unit.js +2 -1
  275. package/esm/Layout/View.js +2 -1
  276. package/esm/Layout/Zone.js +2 -1
  277. package/esm/Link/Back.js +2 -1
  278. package/esm/Link/Close.js +5 -4
  279. package/esm/Link/CsrLink.js +5 -4
  280. package/esm/Link/NextLink.js +5 -4
  281. package/esm/Link/index.js +4 -3
  282. package/esm/Load/Edit.js +2 -1
  283. package/esm/Load/Edit_Client.js +6 -5
  284. package/esm/Load/PageCSR.js +2 -1
  285. package/esm/Load/Pagination.js +4 -3
  286. package/esm/Load/Units.js +34 -27
  287. package/esm/Load/View.js +3 -2
  288. package/esm/Loading/Area.js +5 -1
  289. package/esm/Loading/Button.js +2 -1
  290. package/esm/Loading/Input.js +2 -1
  291. package/esm/Loading/ProgressBar.js +2 -1
  292. package/esm/Loading/Skeleton.js +7 -1
  293. package/esm/Loading/Spin.js +2 -1
  294. package/esm/Menu.js +105 -89
  295. package/esm/Modal.js +33 -20
  296. package/esm/Model/Edit.js +18 -12
  297. package/esm/Model/EditModal.js +43 -35
  298. package/esm/Model/EditWrapper.js +5 -4
  299. package/esm/Model/LoadInit.js +2 -1
  300. package/esm/Model/New.js +18 -12
  301. package/esm/Model/NewWrapper.js +2 -1
  302. package/esm/Model/NewWrapper_Client.js +5 -4
  303. package/esm/Model/Remove.js +45 -39
  304. package/esm/Model/RemoveWrapper.js +6 -5
  305. package/esm/Model/SureToRemove.js +70 -54
  306. package/esm/Model/View.js +13 -3
  307. package/esm/Model/ViewEditModal.js +30 -19
  308. package/esm/Model/ViewModal.js +9 -8
  309. package/esm/Model/ViewWrapper.js +5 -4
  310. package/esm/More.js +10 -6
  311. package/esm/ObjectId.js +5 -1
  312. package/esm/Pagination.js +45 -40
  313. package/esm/Popconfirm.js +53 -35
  314. package/esm/Radio.js +26 -22
  315. package/esm/RecentTime.js +16 -15
  316. package/esm/Refresh.js +5 -4
  317. package/esm/ScreenNavigator.js +7 -6
  318. package/esm/Select.js +156 -135
  319. package/esm/Signal/Arg.js +94 -54
  320. package/esm/Signal/Doc.js +175 -98
  321. package/esm/Signal/GraphQL.js +143 -59
  322. package/esm/Signal/Listener.js +28 -21
  323. package/esm/Signal/Message.js +166 -80
  324. package/esm/Signal/Object.js +75 -39
  325. package/esm/Signal/PubSub.js +161 -79
  326. package/esm/Signal/Request.js +16 -9
  327. package/esm/Signal/Response.js +30 -17
  328. package/esm/Signal/RestApi.js +186 -84
  329. package/esm/Signal/WebSocket.js +6 -5
  330. package/esm/System/CSR.js +184 -165
  331. package/esm/System/Client.js +24 -20
  332. package/esm/System/Common.js +29 -25
  333. package/esm/System/DevModeToggle.js +14 -10
  334. package/esm/System/Gtag.js +11 -7
  335. package/esm/System/HealthCheck.js +2 -1
  336. package/esm/System/Messages.js +39 -36
  337. package/esm/System/Reconnect.js +25 -3
  338. package/esm/System/Root.js +2 -1
  339. package/esm/System/SSR.js +72 -54
  340. package/esm/System/SelectLanguage.js +25 -21
  341. package/esm/System/ThemeToggle.js +5 -1
  342. package/esm/System/index.js +3 -2
  343. package/esm/Tab/Menu.js +5 -4
  344. package/esm/Tab/Menus.js +2 -1
  345. package/esm/Tab/Panel.js +3 -2
  346. package/esm/Tab/Provider.js +2 -1
  347. package/esm/Tab/index.js +2 -1
  348. package/esm/Table.js +25 -16
  349. package/esm/ToggleSelect.js +59 -54
  350. package/esm/Unauthorized.js +17 -12
  351. package/package.json +4 -1
  352. package/styles.css +624 -0
@@ -1,4 +1,5 @@
1
1
  "use client";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
2
3
  import { clsx } from "@akanjs/client";
3
4
  import { msg } from "@akanjs/dictionary";
4
5
  import { usePage } from "@akanjs/next";
@@ -49,39 +50,41 @@ const Message = ({ content, type = "info", duration, keyForMessage }) => {
49
50
  const iconClassName = type === "loading" ? "text-info" : `text-${type}`;
50
51
  const getIcon = (type2) => {
51
52
  const icons = {
52
- info: /* @__PURE__ */ React.createElement(AiOutlineInfoCircle, { className: clsx("text-2xl", iconClassName) }),
53
- success: /* @__PURE__ */ React.createElement(AiOutlineCheckCircle, { className: clsx("text-2xl", iconClassName) }),
54
- error: /* @__PURE__ */ React.createElement(BsExclamationCircleFill, { className: clsx("text-2xl", iconClassName) }),
55
- warning: /* @__PURE__ */ React.createElement(AiOutlineQuestionCircle, { className: clsx("text-2xl", iconClassName) }),
56
- loading: /* @__PURE__ */ React.createElement(AiOutlineLoading3Quarters, { className: clsx("animate-spin text-2xl", iconClassName) })
53
+ info: /* @__PURE__ */ jsx(AiOutlineInfoCircle, { className: clsx("text-2xl", iconClassName) }),
54
+ success: /* @__PURE__ */ jsx(AiOutlineCheckCircle, { className: clsx("text-2xl", iconClassName) }),
55
+ error: /* @__PURE__ */ jsx(BsExclamationCircleFill, { className: clsx("text-2xl", iconClassName) }),
56
+ warning: /* @__PURE__ */ jsx(AiOutlineQuestionCircle, { className: clsx("text-2xl", iconClassName) }),
57
+ loading: /* @__PURE__ */ jsx(AiOutlineLoading3Quarters, { className: clsx("animate-spin text-2xl", iconClassName) })
57
58
  };
58
59
  return icons[type2];
59
60
  };
60
- return /* @__PURE__ */ React.createElement(
61
+ return /* @__PURE__ */ jsx(
61
62
  "div",
62
63
  {
63
64
  "data-state": preBlind,
64
65
  className: "animate-zoomIn data-[state=true]:animate-smaller group w-screen px-6 duration-300 md:max-w-[60%]",
65
66
  style: {
66
67
  paddingTop: pageState.topSafeArea
67
- }
68
- },
69
- /* @__PURE__ */ React.createElement(
70
- "div",
71
- {
72
- className: clsx(
73
- "typo-body1 text-base-content flex w-full items-center gap-2 rounded-[4px] border px-4 py-2 drop-shadow-lg",
74
- {
75
- "stroke-base-content bg-primary-content border-[#EEEEEE]": type === "loading" || type === "info",
76
- "stroke-success bg-success/80 border-success-border": type === "success",
77
- "stroke-error bg-error/80 border-error-border": type === "error",
78
- "stroke-warning bg-warning/80 border-warning-border": type === "warning"
79
- }
80
- )
81
68
  },
82
- /* @__PURE__ */ React.createElement("div", { className: "bg-base-100 flex size-6 items-center justify-center rounded-full" }, getIcon(type)),
83
- /* @__PURE__ */ React.createElement("span", { className: "text-base-100 truncate whitespace-nowrap" }, content)
84
- )
69
+ children: /* @__PURE__ */ jsxs(
70
+ "div",
71
+ {
72
+ className: clsx(
73
+ "typo-body1 text-base-content flex w-full items-center gap-2 rounded-[4px] border px-4 py-2 drop-shadow-lg",
74
+ {
75
+ "stroke-base-content bg-primary-content border-[#EEEEEE]": type === "loading" || type === "info",
76
+ "stroke-success bg-success/80 border-success-border": type === "success",
77
+ "stroke-error bg-error/80 border-error-border": type === "error",
78
+ "stroke-warning bg-warning/80 border-warning-border": type === "warning"
79
+ }
80
+ ),
81
+ children: [
82
+ /* @__PURE__ */ jsx("div", { className: "bg-base-100 flex size-6 items-center justify-center rounded-full", children: getIcon(type) }),
83
+ /* @__PURE__ */ jsx("span", { className: "text-base-100 truncate whitespace-nowrap", children: content })
84
+ ]
85
+ }
86
+ )
87
+ }
85
88
  );
86
89
  };
87
90
  const Messages = () => {
@@ -133,22 +136,22 @@ const Messages = () => {
133
136
  }, []);
134
137
  if (!messages.length)
135
138
  return null;
136
- return /* @__PURE__ */ React.createElement(
139
+ return /* @__PURE__ */ jsx(
137
140
  "div",
138
141
  {
139
142
  id: "toast",
140
- className: "fixed top-0 left-0 z-[100] mt-[var(--safe-area-top)] flex h-fit w-screen flex-col items-center justify-start gap-2 pt-2"
141
- },
142
- messages.map((message) => /* @__PURE__ */ React.createElement(
143
- Message,
144
- {
145
- content: message.content,
146
- type: message.type,
147
- duration: message.duration,
148
- key: message.key,
149
- keyForMessage: message.key
150
- }
151
- ))
143
+ className: "fixed top-0 left-0 z-[100] mt-[var(--safe-area-top)] flex h-fit w-screen flex-col items-center justify-start gap-2 pt-2",
144
+ children: messages.map((message) => /* @__PURE__ */ jsx(
145
+ Message,
146
+ {
147
+ content: message.content,
148
+ type: message.type,
149
+ duration: message.duration,
150
+ keyForMessage: message.key
151
+ },
152
+ message.key
153
+ ))
154
+ }
152
155
  );
153
156
  };
154
157
  export {
@@ -1,4 +1,5 @@
1
1
  "use client";
2
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
2
3
  import { router } from "@akanjs/client";
3
4
  import { useInterval } from "@akanjs/next";
4
5
  import { fetch } from "@akanjs/signal";
@@ -36,9 +37,30 @@ const Reconnect = ({
36
37
  return;
37
38
  await reconnect();
38
39
  }, 5e3);
39
- return /* @__PURE__ */ React.createElement(React.Fragment, null, dev ? /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("div", { className: "flex h-screen flex-col items-center justify-center" }, /* @__PURE__ */ React.createElement("div", { className: "bg-base-300 flex w-4/5 flex-col items-center justify-center rounded-md p-5 md:w-1/3" }, /* @__PURE__ */ React.createElement("div", { className: "text-3xl font-bold" }, "Something's wrong!"), /* @__PURE__ */ React.createElement("div", { className: "flex flex-col items-center justify-center pt-5" }, /* @__PURE__ */ React.createElement("div", { className: "py-5" }, connectStatus === "disconnected" ? /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("div", { className: "text-[100px] text-gray-500" }, /* @__PURE__ */ React.createElement(TbPlugConnectedX, null))) : connectStatus === "connecting" ? /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("div", { className: "animate-pulse text-[100px] text-gray-500" }, /* @__PURE__ */ React.createElement(TbPlugConnectedX, null))) : /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("div", { className: "animate-pop text-[100px] text-white" }, /* @__PURE__ */ React.createElement(TbPlugConnected, null)))), connectStatus === "connected" ? /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("div", null, "Connected!"), /* @__PURE__ */ React.createElement("div", { className: "animate-pop" }), /* @__PURE__ */ React.createElement("span", null, /* @__PURE__ */ React.createElement("span", { className: "text-sm text-gray-500" }, "Redirecting to the previous page in some seconds."))) : connectStatus === "connecting" ? /* @__PURE__ */ React.createElement("div", { className: "flex items-center justify-center" }, /* @__PURE__ */ React.createElement("div", null, "Try reconnecting to the server"), /* @__PURE__ */ React.createElement("div", { className: "flex items-center" }, Array.from({ length: DOTS_LENGTH }).map(
40
- (_, index) => dots >= index ? /* @__PURE__ */ React.createElement("div", { key: index, className: "visible" }, ".") : /* @__PURE__ */ React.createElement("div", { key: index, className: "invisible" }, ".")
41
- ))) : /* @__PURE__ */ React.createElement("div", null, "Server disconnected."))), /* @__PURE__ */ React.createElement("span", { className: "text-center text-sm text-gray-500" }, "*Please check your server status."))) : /* @__PURE__ */ React.createElement("div", { className: "flex h-screen items-center justify-center" }, /* @__PURE__ */ React.createElement("div", { className: "bg-base-300 flex w-4/5 flex-col items-center justify-center rounded-md py-5 md:w-1/3" }, /* @__PURE__ */ React.createElement("div", { className: "text-3xl font-bold" }, "\uBB38\uC81C\uAC00 \uBC1C\uC0DD\uD588\uC5B4\uC694!"), /* @__PURE__ */ React.createElement(Image, { className: "mt-5", src: "/deadBot.svg", alt: "deadBot", color: "gray", width: 120, height: 120 }), /* @__PURE__ */ React.createElement("div", { className: "text-lg" }, "\uC11C\uBC84\uC5D0 \uBB38\uC81C\uAC00 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4."), /* @__PURE__ */ React.createElement("div", { className: "text-lg" }, "\uC11C\uBC84\uC5D0 \uC5F0\uACB0\uC744 \uC7AC\uC2DC\uB3C4\uD558\uACE0 \uC788\uC5B4\uC694..."))));
40
+ return /* @__PURE__ */ jsx(Fragment, { children: dev ? /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs("div", { className: "flex h-screen flex-col items-center justify-center", children: [
41
+ /* @__PURE__ */ jsxs("div", { className: "bg-base-300 flex w-4/5 flex-col items-center justify-center rounded-md p-5 md:w-1/3", children: [
42
+ /* @__PURE__ */ jsx("div", { className: "text-3xl font-bold", children: "Something's wrong!" }),
43
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center justify-center pt-5", children: [
44
+ /* @__PURE__ */ jsx("div", { className: "py-5", children: connectStatus === "disconnected" ? /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx("div", { className: "text-[100px] text-gray-500", children: /* @__PURE__ */ jsx(TbPlugConnectedX, {}) }) }) : connectStatus === "connecting" ? /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx("div", { className: "animate-pulse text-[100px] text-gray-500", children: /* @__PURE__ */ jsx(TbPlugConnectedX, {}) }) }) : /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx("div", { className: "animate-pop text-[100px] text-white", children: /* @__PURE__ */ jsx(TbPlugConnected, {}) }) }) }),
45
+ connectStatus === "connected" ? /* @__PURE__ */ jsxs(Fragment, { children: [
46
+ /* @__PURE__ */ jsx("div", { children: "Connected!" }),
47
+ /* @__PURE__ */ jsx("div", { className: "animate-pop" }),
48
+ /* @__PURE__ */ jsx("span", { children: /* @__PURE__ */ jsx("span", { className: "text-sm text-gray-500", children: "Redirecting to the previous page in some seconds." }) })
49
+ ] }) : connectStatus === "connecting" ? /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-center", children: [
50
+ /* @__PURE__ */ jsx("div", { children: "Try reconnecting to the server" }),
51
+ /* @__PURE__ */ jsx("div", { className: "flex items-center", children: Array.from({ length: DOTS_LENGTH }).map(
52
+ (_, index) => dots >= index ? /* @__PURE__ */ jsx("div", { className: "visible", children: "." }, index) : /* @__PURE__ */ jsx("div", { className: "invisible", children: "." }, index)
53
+ ) })
54
+ ] }) : /* @__PURE__ */ jsx("div", { children: "Server disconnected." })
55
+ ] })
56
+ ] }),
57
+ /* @__PURE__ */ jsx("span", { className: "text-center text-sm text-gray-500", children: "*Please check your server status." })
58
+ ] }) }) : /* @__PURE__ */ jsx("div", { className: "flex h-screen items-center justify-center", children: /* @__PURE__ */ jsxs("div", { className: "bg-base-300 flex w-4/5 flex-col items-center justify-center rounded-md py-5 md:w-1/3", children: [
59
+ /* @__PURE__ */ jsx("div", { className: "text-3xl font-bold", children: "\uBB38\uC81C\uAC00 \uBC1C\uC0DD\uD588\uC5B4\uC694!" }),
60
+ /* @__PURE__ */ jsx(Image, { className: "mt-5", src: "/deadBot.svg", alt: "deadBot", color: "gray", width: 120, height: 120 }),
61
+ /* @__PURE__ */ jsx("div", { className: "text-lg", children: "\uC11C\uBC84\uC5D0 \uBB38\uC81C\uAC00 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4." }),
62
+ /* @__PURE__ */ jsx("div", { className: "text-lg", children: "\uC11C\uBC84\uC5D0 \uC5F0\uACB0\uC744 \uC7AC\uC2DC\uB3C4\uD558\uACE0 \uC788\uC5B4\uC694..." })
63
+ ] }) }) });
42
64
  };
43
65
  export {
44
66
  Reconnect
@@ -1,10 +1,11 @@
1
1
  "use client";
2
+ import { Fragment, jsx } from "react/jsx-runtime";
2
3
  import { baseEnv } from "@akanjs/base";
3
4
  import { checkDictCoverage } from "@akanjs/dictionary";
4
5
  const Root = ({ children, st }) => {
5
6
  if (baseEnv.operationMode === "local")
6
7
  checkDictCoverage();
7
- return /* @__PURE__ */ React.createElement(React.Fragment, null, children);
8
+ return /* @__PURE__ */ jsx(Fragment, { children });
8
9
  };
9
10
  export {
10
11
  Root
package/esm/System/SSR.js CHANGED
@@ -1,10 +1,11 @@
1
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
1
2
  import { clsx, router } from "@akanjs/client";
2
3
  import { Suspense } from "react";
3
4
  import { Load } from "../Load";
4
5
  import { ClientBridge, ClientInner, ClientNextBridge, ClientPathWrapper, ClientWrapper } from "./Client";
5
6
  import { Common } from "./Common";
6
7
  const SSR = () => {
7
- return /* @__PURE__ */ React.createElement(React.Fragment, null);
8
+ return /* @__PURE__ */ jsx(Fragment, {});
8
9
  };
9
10
  const SSRProvider = ({
10
11
  className,
@@ -24,7 +25,7 @@ const SSRProvider = ({
24
25
  fetchMe,
25
26
  fetchSelf
26
27
  }) => {
27
- return /* @__PURE__ */ React.createElement(
28
+ return /* @__PURE__ */ jsx(
28
29
  Load.Page,
29
30
  {
30
31
  of,
@@ -34,7 +35,7 @@ const SSRProvider = ({
34
35
  router.init({ type: "next", side: "server", lang, prefix });
35
36
  return { lang };
36
37
  },
37
- render: ({ lang }) => /* @__PURE__ */ React.createElement(
38
+ render: ({ lang }) => /* @__PURE__ */ jsx(
38
39
  Common.Wrapper,
39
40
  {
40
41
  fetch,
@@ -42,7 +43,7 @@ const SSRProvider = ({
42
43
  fetchPing,
43
44
  fetchMe,
44
45
  fetchSelf,
45
- render: ({ mePromise, selfPromise }) => /* @__PURE__ */ React.createElement(
46
+ render: ({ mePromise, selfPromise }) => /* @__PURE__ */ jsx(
46
47
  SSRWrapper,
47
48
  {
48
49
  className,
@@ -51,19 +52,26 @@ const SSRProvider = ({
51
52
  head,
52
53
  fonts,
53
54
  prefix,
54
- layoutStyle
55
- },
56
- /* @__PURE__ */ React.createElement(ClientWrapper, { theme }, children, /* @__PURE__ */ React.createElement(Suspense, { fallback: null }, /* @__PURE__ */ React.createElement(ClientInner, null)), /* @__PURE__ */ React.createElement(Suspense, { fallback: null }, /* @__PURE__ */ React.createElement(
57
- ClientBridge,
58
- {
59
- env,
60
- mePromise,
61
- selfPromise,
62
- theme,
63
- prefix,
64
- gaTrackingId
65
- }
66
- ), /* @__PURE__ */ React.createElement(ClientNextBridge, { lang, prefix })))
55
+ layoutStyle,
56
+ children: /* @__PURE__ */ jsxs(ClientWrapper, { theme, children: [
57
+ children,
58
+ /* @__PURE__ */ jsx(Suspense, { fallback: null, children: /* @__PURE__ */ jsx(ClientInner, {}) }),
59
+ /* @__PURE__ */ jsxs(Suspense, { fallback: null, children: [
60
+ /* @__PURE__ */ jsx(
61
+ ClientBridge,
62
+ {
63
+ env,
64
+ mePromise,
65
+ selfPromise,
66
+ theme,
67
+ prefix,
68
+ gaTrackingId
69
+ }
70
+ ),
71
+ /* @__PURE__ */ jsx(ClientNextBridge, { lang, prefix })
72
+ ] })
73
+ ] })
74
+ }
67
75
  )
68
76
  }
69
77
  )
@@ -80,43 +88,53 @@ const SSRWrapper = ({
80
88
  className,
81
89
  prefix,
82
90
  layoutStyle = "web"
83
- }) => /* @__PURE__ */ React.createElement("html", { lang, className: `${fonts.map((font) => font.variable).join(" ")} ${className}`, suppressHydrationWarning: true }, /* @__PURE__ */ React.createElement("head", null, head), /* @__PURE__ */ React.createElement("body", { className: "app" }, /* @__PURE__ */ React.createElement("div", { id: "frameRoot", className }, /* @__PURE__ */ React.createElement(ClientPathWrapper, { layoutStyle, prefix }, /* @__PURE__ */ React.createElement("div", { id: "topSafeArea", className: clsx("bg-base-100 fixed inset-x-0 top-0") }), /* @__PURE__ */ React.createElement("div", { id: "pageContainers", className: clsx("isolate") }, /* @__PURE__ */ React.createElement("div", { id: "pageContainer" }, /* @__PURE__ */ React.createElement(
84
- "div",
85
- {
86
- id: "pageContent",
87
- className: clsx("bg-base-100 relative isolate", {
88
- "w-screen": layoutStyle === "web",
89
- "left-1/2 h-screen w-[600px] -translate-x-1/2": layoutStyle === "mobile"
90
- })
91
- },
92
- children
93
- ))), /* @__PURE__ */ React.createElement(
94
- "div",
95
- {
96
- id: "topInsetContainer",
97
- className: clsx("bg-base-100 fixed inset-x-0 top-0 isolate", {
98
- "left-1/2 w-[600px] -translate-x-1/2": layoutStyle === "mobile",
99
- "w-screen": layoutStyle === "web"
100
- })
101
- },
102
- /* @__PURE__ */ React.createElement("div", { id: "topInsetContent", className: clsx("relative isolate size-full") })
103
- ), /* @__PURE__ */ React.createElement(
104
- "div",
105
- {
106
- id: "topLeftActionContainer",
107
- className: "aspect-1 absolute top-0 left-0 isolate flex items-center justify-center"
108
- }
109
- ), /* @__PURE__ */ React.createElement(
110
- "div",
111
- {
112
- id: "bottomInsetContainer",
113
- className: clsx("fixed inset-x-0 bottom-0 isolate", {
114
- "left-1/2 w-[600px] -translate-x-1/2": layoutStyle === "mobile",
115
- "w-screen": layoutStyle === "web"
116
- })
117
- },
118
- /* @__PURE__ */ React.createElement("div", { id: "bottomInsetContent", className: "isolate size-full" })
119
- ), /* @__PURE__ */ React.createElement("div", { id: "bottomSafeArea", className: "bg-base-100 fixed inset-x-0" })))));
91
+ }) => /* @__PURE__ */ jsxs("html", { lang, className: `${fonts.map((font) => font.variable).join(" ")} ${className}`, suppressHydrationWarning: true, children: [
92
+ /* @__PURE__ */ jsx("head", { children: head }),
93
+ /* @__PURE__ */ jsx("body", { className: "app", children: /* @__PURE__ */ jsx("div", { id: "frameRoot", className, children: /* @__PURE__ */ jsxs(ClientPathWrapper, { layoutStyle, prefix, children: [
94
+ /* @__PURE__ */ jsx("div", { id: "topSafeArea", className: clsx("bg-base-100 fixed inset-x-0 top-0") }),
95
+ /* @__PURE__ */ jsx("div", { id: "pageContainers", className: clsx("isolate"), children: /* @__PURE__ */ jsx("div", { id: "pageContainer", children: /* @__PURE__ */ jsx(
96
+ "div",
97
+ {
98
+ id: "pageContent",
99
+ className: clsx("bg-base-100 relative isolate", {
100
+ "w-screen": layoutStyle === "web",
101
+ "left-1/2 h-screen w-[600px] -translate-x-1/2": layoutStyle === "mobile"
102
+ }),
103
+ children
104
+ }
105
+ ) }) }),
106
+ /* @__PURE__ */ jsx(
107
+ "div",
108
+ {
109
+ id: "topInsetContainer",
110
+ className: clsx("bg-base-100 fixed inset-x-0 top-0 isolate", {
111
+ "left-1/2 w-[600px] -translate-x-1/2": layoutStyle === "mobile",
112
+ "w-screen": layoutStyle === "web"
113
+ }),
114
+ children: /* @__PURE__ */ jsx("div", { id: "topInsetContent", className: clsx("relative isolate size-full") })
115
+ }
116
+ ),
117
+ /* @__PURE__ */ jsx(
118
+ "div",
119
+ {
120
+ id: "topLeftActionContainer",
121
+ className: "aspect-1 absolute top-0 left-0 isolate flex items-center justify-center"
122
+ }
123
+ ),
124
+ /* @__PURE__ */ jsx(
125
+ "div",
126
+ {
127
+ id: "bottomInsetContainer",
128
+ className: clsx("fixed inset-x-0 bottom-0 isolate", {
129
+ "left-1/2 w-[600px] -translate-x-1/2": layoutStyle === "mobile",
130
+ "w-screen": layoutStyle === "web"
131
+ }),
132
+ children: /* @__PURE__ */ jsx("div", { id: "bottomInsetContent", className: "isolate size-full" })
133
+ }
134
+ ),
135
+ /* @__PURE__ */ jsx("div", { id: "bottomSafeArea", className: "bg-base-100 fixed inset-x-0" })
136
+ ] }) }) })
137
+ ] });
120
138
  SSR.Wrapper = SSRWrapper;
121
139
  var SSR_default = SSRProvider;
122
140
  export {
@@ -1,4 +1,5 @@
1
1
  "use client";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
2
3
  import { router } from "@akanjs/client";
3
4
  import { usePage } from "@akanjs/next";
4
5
  import { useState } from "react";
@@ -11,28 +12,31 @@ const languageNames = {
11
12
  const SelectLanguage = ({ className, languages = ["en", "ko"] }) => {
12
13
  const { l, lang } = usePage();
13
14
  const [open, setOpen] = useState(false);
14
- return /* @__PURE__ */ React.createElement("div", { className: "relative" }, /* @__PURE__ */ React.createElement(
15
- "div",
16
- {
17
- id: "select-language",
18
- onClick: () => {
19
- setOpen(!open);
15
+ return /* @__PURE__ */ jsxs("div", { className: "relative", children: [
16
+ /* @__PURE__ */ jsx(
17
+ "div",
18
+ {
19
+ id: "select-language",
20
+ onClick: () => {
21
+ setOpen(!open);
22
+ },
23
+ className: "mx-2 my-auto cursor-pointer rounded-3xl border bg-black/50 px-3 text-xs font-light text-white md:mx-4",
24
+ children: languageNames[lang]
25
+ }
26
+ ),
27
+ open ? /* @__PURE__ */ jsx("div", { className: "absolute top-6 -left-4 w-28 rounded-xl border bg-slate-900/90 py-2 text-center text-white", children: languages.filter((lang2) => !!languageNames[lang2]).map((lang2) => /* @__PURE__ */ jsx(
28
+ "div",
29
+ {
30
+ onClick: () => {
31
+ router.setLang(lang2);
32
+ setOpen(false);
33
+ },
34
+ className: "cursor-pointer py-1 hover:bg-white/20",
35
+ children: languageNames[lang2]
20
36
  },
21
- className: "mx-2 my-auto cursor-pointer rounded-3xl border bg-black/50 px-3 text-xs font-light text-white md:mx-4"
22
- },
23
- languageNames[lang]
24
- ), open ? /* @__PURE__ */ React.createElement("div", { className: "absolute top-6 -left-4 w-28 rounded-xl border bg-slate-900/90 py-2 text-center text-white" }, languages.filter((lang2) => !!languageNames[lang2]).map((lang2) => /* @__PURE__ */ React.createElement(
25
- "div",
26
- {
27
- key: lang2,
28
- onClick: () => {
29
- router.setLang(lang2);
30
- setOpen(false);
31
- },
32
- className: "cursor-pointer py-1 hover:bg-white/20"
33
- },
34
- languageNames[lang2]
35
- ))) : null);
37
+ lang2
38
+ )) }) : null
39
+ ] });
36
40
  };
37
41
  export {
38
42
  SelectLanguage
@@ -1,4 +1,5 @@
1
1
  "use client";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
2
3
  import { capitalize } from "@akanjs/common";
3
4
  import { useTheme } from "next-themes";
4
5
  import { useEffect, useState } from "react";
@@ -14,7 +15,10 @@ const ThemeToggle = () => {
14
15
  if (!mounted) {
15
16
  return null;
16
17
  }
17
- return /* @__PURE__ */ React.createElement("div", { className: "form-control" }, /* @__PURE__ */ React.createElement("label", { className: "label cursor-pointer" }, /* @__PURE__ */ React.createElement("span", { className: "label-text mr-2 text-sm whitespace-nowrap" }, capitalize(theme ?? "")), /* @__PURE__ */ React.createElement("input", { type: "checkbox", className: "toggle toggle-sm", checked: theme === "dark", onChange: handleTheme })));
18
+ return /* @__PURE__ */ jsx("div", { className: "form-control", children: /* @__PURE__ */ jsxs("label", { className: "label cursor-pointer", children: [
19
+ /* @__PURE__ */ jsx("span", { className: "label-text mr-2 text-sm whitespace-nowrap", children: capitalize(theme ?? "") }),
20
+ /* @__PURE__ */ jsx("input", { type: "checkbox", className: "toggle toggle-sm", checked: theme === "dark", onChange: handleTheme })
21
+ ] }) });
18
22
  };
19
23
  export {
20
24
  ThemeToggle
@@ -1,3 +1,4 @@
1
+ import { jsx } from "react/jsx-runtime";
1
2
  import { baseClientEnv } from "@akanjs/base";
2
3
  import { default as CSR } from "./CSR";
3
4
  import { DevModeToggle } from "./DevModeToggle";
@@ -8,9 +9,9 @@ import { default as SSR } from "./SSR";
8
9
  import { ThemeToggle } from "./ThemeToggle";
9
10
  const Provider = (props) => {
10
11
  if (baseClientEnv.renderMode === "csr")
11
- return /* @__PURE__ */ React.createElement(CSR, { ...props });
12
+ return /* @__PURE__ */ jsx(CSR, { ...props });
12
13
  else
13
- return /* @__PURE__ */ React.createElement(SSR, { ...props });
14
+ return /* @__PURE__ */ jsx(SSR, { ...props });
14
15
  };
15
16
  const System = {
16
17
  Provider,
package/esm/Tab/Menu.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 { useContext, useEffect } from "react";
4
5
  import { TabContext } from "./context";
@@ -24,7 +25,7 @@ const Menu = ({
24
25
  if (currentMenu === menu)
25
26
  setMenu([...menuSet.current.values()].find((m) => m !== menu) ?? null);
26
27
  }, [disabled]);
27
- return /* @__PURE__ */ React.createElement(
28
+ return /* @__PURE__ */ jsx(
28
29
  "div",
29
30
  {
30
31
  "data-tip": tooltip,
@@ -41,9 +42,9 @@ const Menu = ({
41
42
  setMenu(menu);
42
43
  if (scrollToTop)
43
44
  window.scrollTo({ top: 0, behavior: "smooth" });
44
- }
45
- },
46
- children
45
+ },
46
+ children
47
+ }
47
48
  );
48
49
  };
49
50
  export {
package/esm/Tab/Menus.js CHANGED
@@ -1,6 +1,7 @@
1
1
  "use client";
2
+ import { jsx } from "react/jsx-runtime";
2
3
  const Menus = ({ className, children }) => {
3
- return /* @__PURE__ */ React.createElement("div", { className }, children);
4
+ return /* @__PURE__ */ jsx("div", { className, children });
4
5
  };
5
6
  export {
6
7
  Menus
package/esm/Tab/Panel.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 { useContext, useEffect, useState } from "react";
4
5
  import { TabContext } from "./context";
@@ -14,9 +15,9 @@ const Panel = ({ className, menu, children, loading = "eager" }) => {
14
15
  setLoaded(currentMenu === menu);
15
16
  }, [currentMenu]);
16
17
  if (loading === "eager")
17
- return /* @__PURE__ */ React.createElement("div", { className: clsx(className, { hidden: currentMenu !== menu }) }, children);
18
+ return /* @__PURE__ */ jsx("div", { className: clsx(className, { hidden: currentMenu !== menu }), children });
18
19
  else
19
- return loaded ? /* @__PURE__ */ React.createElement("div", { className: clsx(className, { hidden: currentMenu !== menu }) }, children) : null;
20
+ return loaded ? /* @__PURE__ */ jsx("div", { className: clsx(className, { hidden: currentMenu !== menu }), children }) : null;
20
21
  };
21
22
  export {
22
23
  Panel
@@ -1,11 +1,12 @@
1
1
  "use client";
2
+ import { jsx } from "react/jsx-runtime";
2
3
  import { clsx } from "@akanjs/client";
3
4
  import { useRef, useState } from "react";
4
5
  import { TabContext } from "./context";
5
6
  const Provider = ({ className, defaultMenu = null, children }) => {
6
7
  const menuSet = useRef(/* @__PURE__ */ new Set());
7
8
  const [menu, setMenu] = useState(defaultMenu);
8
- return /* @__PURE__ */ React.createElement(TabContext.Provider, { value: { defaultMenu, menu, setMenu, menuSet } }, /* @__PURE__ */ React.createElement("div", { "data-menu": menu, className: clsx(className, "group/tab") }, children));
9
+ return /* @__PURE__ */ jsx(TabContext.Provider, { value: { defaultMenu, menu, setMenu, menuSet }, children: /* @__PURE__ */ jsx("div", { "data-menu": menu, className: clsx(className, "group/tab"), children }) });
9
10
  };
10
11
  export {
11
12
  Provider
package/esm/Tab/index.js CHANGED
@@ -1,9 +1,10 @@
1
+ import { jsx } from "react/jsx-runtime";
1
2
  import { Menu } from "./Menu";
2
3
  import { Menus } from "./Menus";
3
4
  import { Panel } from "./Panel";
4
5
  import { Provider } from "./Provider";
5
6
  const Tab = (props) => {
6
- return /* @__PURE__ */ React.createElement(Provider, { ...props });
7
+ return /* @__PURE__ */ jsx(Provider, { ...props });
7
8
  };
8
9
  Tab.Menu = Menu;
9
10
  Tab.Menus = Menus;
package/esm/Table.js CHANGED
@@ -1,7 +1,8 @@
1
1
  "use client";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
2
3
  import { clsx } from "@akanjs/client";
3
4
  import { st } from "@akanjs/store";
4
- import React, { useMemo } from "react";
5
+ import { useMemo } from "react";
5
6
  import { AiOutlineLoading3Quarters } from "react-icons/ai";
6
7
  import { Empty } from "./Empty";
7
8
  import { Pagination } from "./Pagination";
@@ -22,34 +23,42 @@ const Table = ({
22
23
  const borderedClassName = bordered ? "border border-gray-200 rounded-xl" : "";
23
24
  const responsive = st.use.responsive();
24
25
  const renderedColumns = useMemo(() => {
25
- return columns.filter((c) => !c.responsive || c.responsive.includes(responsive)).map((column, idx) => /* @__PURE__ */ React.createElement("th", { key: idx, className: "whitespace-nowrap" }, column.title));
26
+ return columns.filter((c) => !c.responsive || c.responsive.includes(responsive)).map((column, idx) => /* @__PURE__ */ jsx("th", { className: "whitespace-nowrap", children: column.title }, idx));
26
27
  }, [columns, responsive]);
27
28
  const renderedRows = useMemo(() => {
28
29
  return dataSource.map((rowData, rowIndex) => {
29
- const renderedCells = columns.filter((c) => !c.responsive || c.responsive.includes(responsive)).map((column, idx) => /* @__PURE__ */ React.createElement(
30
+ const renderedCells = columns.filter((c) => !c.responsive || c.responsive.includes(responsive)).map((column, idx) => /* @__PURE__ */ jsx(
30
31
  "td",
31
32
  {
32
- key: idx,
33
33
  className: clsx(
34
34
  "whitespace-nowrap",
35
35
  rowClassName ? typeof rowClassName === "string" ? rowClassName : rowClassName(rowData, rowIndex) : ""
36
36
  ),
37
- ...onRow?.(rowData, rowIndex)
37
+ ...onRow?.(rowData, rowIndex),
38
+ children: column.render ? column.render(rowData[column.dataIndex], rowData, rowIndex) : column.dataIndex ? rowData[column.dataIndex] : null
38
39
  },
39
- column.render ? column.render(rowData[column.dataIndex], rowData, rowIndex) : column.dataIndex ? rowData[column.dataIndex] : null
40
+ idx
40
41
  ));
41
- return /* @__PURE__ */ React.createElement("tr", { key: rowIndex }, renderedCells);
42
+ return /* @__PURE__ */ jsx("tr", { children: renderedCells }, rowIndex);
42
43
  });
43
44
  }, [columns, dataSource, responsive]);
44
- return /* @__PURE__ */ React.createElement("div", { className: clsx("relative w-full", loadingClassName, borderedClassName) }, loading && /* @__PURE__ */ React.createElement("div", { className: "absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2" }, /* @__PURE__ */ React.createElement(AiOutlineLoading3Quarters, { className: "animate-spin text-3xl" })), /* @__PURE__ */ React.createElement("table", { className: clsx("table w-full", sizeClassName) }, showHeader === true || Array.isArray(showHeader) && showHeader.includes(responsive) ? /* @__PURE__ */ React.createElement("thead", { className: "normal-case" }, /* @__PURE__ */ React.createElement("tr", null, renderedColumns)) : null, !!dataSource.length && /* @__PURE__ */ React.createElement("tbody", null, renderedRows)), !dataSource.length && /* @__PURE__ */ React.createElement("div", { className: "w-full" }, /* @__PURE__ */ React.createElement(Empty, null)), pagination && /* @__PURE__ */ React.createElement("div", { className: "mt-3 flex justify-center" }, /* @__PURE__ */ React.createElement(
45
- Pagination,
46
- {
47
- currentPage: pagination.currentPage,
48
- total: pagination.total,
49
- onPageSelect: pagination.onPageSelect,
50
- itemsPerPage: pagination.itemsPerPage
51
- }
52
- )));
45
+ return /* @__PURE__ */ jsxs("div", { className: clsx("relative w-full", loadingClassName, borderedClassName), children: [
46
+ loading && /* @__PURE__ */ jsx("div", { className: "absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2", children: /* @__PURE__ */ jsx(AiOutlineLoading3Quarters, { className: "animate-spin text-3xl" }) }),
47
+ /* @__PURE__ */ jsxs("table", { className: clsx("table w-full", sizeClassName), children: [
48
+ showHeader === true || Array.isArray(showHeader) && showHeader.includes(responsive) ? /* @__PURE__ */ jsx("thead", { className: "normal-case", children: /* @__PURE__ */ jsx("tr", { children: renderedColumns }) }) : null,
49
+ !!dataSource.length && /* @__PURE__ */ jsx("tbody", { children: renderedRows })
50
+ ] }),
51
+ !dataSource.length && /* @__PURE__ */ jsx("div", { className: "w-full", children: /* @__PURE__ */ jsx(Empty, {}) }),
52
+ pagination && /* @__PURE__ */ jsx("div", { className: "mt-3 flex justify-center", children: /* @__PURE__ */ jsx(
53
+ Pagination,
54
+ {
55
+ currentPage: pagination.currentPage,
56
+ total: pagination.total,
57
+ onPageSelect: pagination.onPageSelect,
58
+ itemsPerPage: pagination.itemsPerPage
59
+ }
60
+ ) })
61
+ ] });
53
62
  };
54
63
  export {
55
64
  Table