@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
package/cjs/Pagination.js CHANGED
@@ -21,6 +21,7 @@ __export(Pagination_exports, {
21
21
  Pagination: () => Pagination
22
22
  });
23
23
  module.exports = __toCommonJS(Pagination_exports);
24
+ var import_jsx_runtime = require("react/jsx-runtime");
24
25
  var import_client = require("@akanjs/client");
25
26
  var import_bi = require("react-icons/bi");
26
27
  const Pagination = ({
@@ -61,50 +62,54 @@ const Pagination = ({
61
62
  displayNumbers = ["1", "...", ...pageNumbers.slice(-5)];
62
63
  }
63
64
  }
64
- return /* @__PURE__ */ React.createElement("div", { className: "flex items-center justify-center" }, total > 0 && /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
65
- "button",
66
- {
67
- className: (0, import_client.clsx)(
68
- "btn btn-ghost btn-square duration-200",
69
- currentPage > 1 ? "opacity-100" : "opacity-0 hover:cursor-default hover:opacity-0"
70
- ),
71
- onClick: handleLeftClick
72
- },
73
- /* @__PURE__ */ React.createElement(import_bi.BiChevronLeft, null)
74
- ), displayNumbers.map((pageNum, index) => {
75
- if (pageNum === "...") {
76
- return /* @__PURE__ */ React.createElement("button", { key: index, className: "btn btn-ghost btn-square text-primary/40" }, /* @__PURE__ */ React.createElement(import_bi.BiDotsHorizontalRounded, null));
77
- }
78
- if (Number(pageNum) === currentPage) {
79
- return /* @__PURE__ */ React.createElement(
65
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "flex items-center justify-center", children: total > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
66
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
67
+ "button",
68
+ {
69
+ className: (0, import_client.clsx)(
70
+ "btn btn-ghost btn-square duration-200",
71
+ currentPage > 1 ? "opacity-100" : "opacity-0 hover:cursor-default hover:opacity-0"
72
+ ),
73
+ onClick: handleLeftClick,
74
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_bi.BiChevronLeft, {})
75
+ }
76
+ ),
77
+ displayNumbers.map((pageNum, index) => {
78
+ if (pageNum === "...") {
79
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { className: "btn btn-ghost btn-square text-primary/40", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_bi.BiDotsHorizontalRounded, {}) }, index);
80
+ }
81
+ if (Number(pageNum) === currentPage) {
82
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
83
+ "button",
84
+ {
85
+ className: (0, import_client.clsx)("btn btn-ghost btn-square text-primary", classNames?.activePageNumClassName),
86
+ children: pageNum
87
+ },
88
+ index
89
+ );
90
+ }
91
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
80
92
  "button",
81
93
  {
82
- key: index,
83
- className: (0, import_client.clsx)("btn btn-ghost btn-square text-primary", classNames?.activePageNumClassName)
94
+ className: (0, import_client.clsx)("btn btn-ghost btn-square text-primary/40", classNames?.pageNumClassName),
95
+ onClick: () => {
96
+ onPageSelect(Number(pageNum));
97
+ },
98
+ children: pageNum
84
99
  },
85
- pageNum
100
+ index
86
101
  );
87
- }
88
- return /* @__PURE__ */ React.createElement(
102
+ }),
103
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
89
104
  "button",
90
105
  {
91
- key: index,
92
- className: (0, import_client.clsx)("btn btn-ghost btn-square text-primary/40", classNames?.pageNumClassName),
93
- onClick: () => {
94
- onPageSelect(Number(pageNum));
95
- }
96
- },
97
- pageNum
98
- );
99
- }), /* @__PURE__ */ React.createElement(
100
- "button",
101
- {
102
- className: (0, import_client.clsx)(
103
- "btn btn-ghost btn-square duration-200",
104
- currentPage < totalPages ? "opacity-100" : "opacity-0 hover:cursor-default hover:opacity-0"
105
- ),
106
- onClick: handleRightClick
107
- },
108
- /* @__PURE__ */ React.createElement(import_bi.BiChevronRight, null)
109
- )));
106
+ className: (0, import_client.clsx)(
107
+ "btn btn-ghost btn-square duration-200",
108
+ currentPage < totalPages ? "opacity-100" : "opacity-0 hover:cursor-default hover:opacity-0"
109
+ ),
110
+ onClick: handleRightClick,
111
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_bi.BiChevronRight, {})
112
+ }
113
+ )
114
+ ] }) });
110
115
  };
package/cjs/Popconfirm.js CHANGED
@@ -1,9 +1,7 @@
1
1
  "use client";
2
- var __create = Object.create;
3
2
  var __defProp = Object.defineProperty;
4
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
5
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
6
  var __export = (target, all) => {
9
7
  for (var name in all)
@@ -17,24 +15,17 @@ var __copyProps = (to, from, except, desc) => {
17
15
  }
18
16
  return to;
19
17
  };
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
- // If the importer is in node compatibility mode or this is not an ESM
22
- // file that has been converted to a CommonJS file using a Babel-
23
- // compatible transform (i.e. "__esModule" has not been set), then set
24
- // "default" to the CommonJS "module.exports" for node compatibility.
25
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
- mod
27
- ));
28
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
19
  var Popconfirm_exports = {};
30
20
  __export(Popconfirm_exports, {
31
21
  Popconfirm: () => Popconfirm
32
22
  });
33
23
  module.exports = __toCommonJS(Popconfirm_exports);
24
+ var import_jsx_runtime = require("react/jsx-runtime");
34
25
  var import_client = require("@akanjs/client");
35
26
  var import_next = require("@akanjs/next");
36
27
  var import_web = require("@react-spring/web");
37
- var import_react = __toESM(require("react"));
28
+ var import_react = require("react");
38
29
  var import_bi = require("react-icons/bi");
39
30
  //! 디자인 수정, 테마 적용 안됨
40
31
  const Popconfirm = ({
@@ -76,41 +67,58 @@ const Popconfirm = ({
76
67
  const handleCancel = () => {
77
68
  setIsConfirming(false);
78
69
  };
79
- return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement("div", { className: "relative inline-block" }, /* @__PURE__ */ import_react.default.createElement(
80
- "div",
81
- {
82
- className: (0, import_client.clsx)("trigger", triggerClassName),
83
- onClick: (e) => {
84
- e.stopPropagation();
85
- setIsConfirming(true);
86
- }
87
- },
88
- children
89
- ), isConfirming && /* @__PURE__ */ import_react.default.createElement(
90
- import_web.animated.div,
91
- {
92
- className: "popconfirm border-base-300 bg-base-100 absolute -right-2 bottom-0 z-10 translate-y-[106%] rounded-lg border p-4 shadow-xl",
93
- style: popconfirmProps
94
- },
95
- /* @__PURE__ */ import_react.default.createElement(
70
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
71
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "relative inline-block", children: [
72
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
73
+ "div",
74
+ {
75
+ className: (0, import_client.clsx)("trigger", triggerClassName),
76
+ onClick: (e) => {
77
+ e.stopPropagation();
78
+ setIsConfirming(true);
79
+ },
80
+ children
81
+ }
82
+ ),
83
+ isConfirming && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
84
+ import_web.animated.div,
85
+ {
86
+ className: "popconfirm border-base-300 bg-base-100 absolute -right-2 bottom-0 z-10 translate-y-[106%] rounded-lg border p-4 shadow-xl",
87
+ style: popconfirmProps,
88
+ children: [
89
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
90
+ "div",
91
+ {
92
+ className: (0, import_client.clsx)(
93
+ "bg-base-100 border-base-300 popconfirm-deco absolute -top-2 size-4 rotate-45 rounded-sm border-t border-l",
94
+ { "right-10": !decoClassName },
95
+ decoClassName
96
+ )
97
+ }
98
+ ),
99
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex gap-1", children: [
100
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_bi.BiMessageRoundedError, { className: "text-orange-500" }),
101
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [
102
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "mb-2 font-bold whitespace-nowrap", children: title }),
103
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "mb-2 whitespace-nowrap", children: description })
104
+ ] })
105
+ ] }),
106
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex justify-end gap-2", children: [
107
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { className: "btn btn-xs btn-outline", onClick: handleCancel, ...cancelButtonProps, children: cancelText ?? l("util.cancel") }),
108
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { className: "btn btn-xs", onClick: handleConfirm, ...okButtonProps, children: okText ?? l("util.ok") })
109
+ ] })
110
+ ]
111
+ }
112
+ )
113
+ ] }),
114
+ isConfirming && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
96
115
  "div",
97
116
  {
98
- className: (0, import_client.clsx)(
99
- "bg-base-100 border-base-300 popconfirm-deco absolute -top-2 size-4 rotate-45 rounded-sm border-t border-l",
100
- { "right-10": !decoClassName },
101
- decoClassName
102
- )
103
- }
104
- ),
105
- /* @__PURE__ */ import_react.default.createElement("div", { className: "flex gap-1" }, /* @__PURE__ */ import_react.default.createElement(import_bi.BiMessageRoundedError, { className: "text-orange-500" }), /* @__PURE__ */ import_react.default.createElement("div", null, /* @__PURE__ */ import_react.default.createElement("p", { className: "mb-2 font-bold whitespace-nowrap" }, title), /* @__PURE__ */ import_react.default.createElement("div", { className: "mb-2 whitespace-nowrap" }, description))),
106
- /* @__PURE__ */ import_react.default.createElement("div", { className: "flex justify-end gap-2" }, /* @__PURE__ */ import_react.default.createElement("button", { className: "btn btn-xs btn-outline", onClick: handleCancel, ...cancelButtonProps }, cancelText ?? l("util.cancel")), /* @__PURE__ */ import_react.default.createElement("button", { className: "btn btn-xs", onClick: handleConfirm, ...okButtonProps }, okText ?? l("util.ok")))
107
- )), isConfirming && /* @__PURE__ */ import_react.default.createElement(
108
- "div",
109
- {
110
- className: "absolute top-0 left-0 h-screen w-full",
111
- onClick: () => {
112
- setIsConfirming(false);
117
+ className: "absolute top-0 left-0 h-screen w-full",
118
+ onClick: () => {
119
+ setIsConfirming(false);
120
+ }
113
121
  }
114
- }
115
- ));
122
+ )
123
+ ] });
116
124
  };
package/cjs/Radio.js CHANGED
@@ -21,33 +21,37 @@ __export(Radio_exports, {
21
21
  Radio: () => Radio
22
22
  });
23
23
  module.exports = __toCommonJS(Radio_exports);
24
+ var import_jsx_runtime = require("react/jsx-runtime");
24
25
  var import_client = require("@akanjs/client");
25
26
  const Radio = ({ value, children, disabled, className, onChange }) => {
26
- return /* @__PURE__ */ React.createElement("div", { className: (0, import_client.clsx)(`flex gap-2`, className) }, children.map((child, idx) => {
27
- return /* @__PURE__ */ React.createElement("div", { className: "flex items-center justify-center gap-1", key: idx }, /* @__PURE__ */ React.createElement(
28
- "input",
29
- {
30
- type: "radio",
31
- disabled,
32
- className: "radio radio-primary radio-sm",
33
- checked: value === child.props.value || value === idx,
34
- onChange: () => {
35
- onChange(child.props.value, idx);
27
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: (0, import_client.clsx)(`flex gap-2`, className), children: children.map((child, idx) => {
28
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center justify-center gap-1", children: [
29
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
30
+ "input",
31
+ {
32
+ type: "radio",
33
+ disabled,
34
+ className: "radio radio-primary radio-sm",
35
+ checked: value === child.props.value || value === idx,
36
+ onChange: () => {
37
+ onChange(child.props.value, idx);
38
+ }
36
39
  }
37
- }
38
- ), /* @__PURE__ */ React.createElement(
39
- "button",
40
- {
41
- className: "bg-transparent",
42
- onClick: () => {
43
- onChange(child.props.value, idx);
40
+ ),
41
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
42
+ "button",
43
+ {
44
+ className: "bg-transparent",
45
+ onClick: () => {
46
+ onChange(child.props.value, idx);
47
+ },
48
+ children: child
44
49
  }
45
- },
46
- child
47
- ));
48
- }));
50
+ )
51
+ ] }, idx);
52
+ }) });
49
53
  };
50
54
  const Item = ({ value, className, children }) => {
51
- return /* @__PURE__ */ React.createElement("div", { className: (0, import_client.clsx)("", className) }, children);
55
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: (0, import_client.clsx)("", className), children });
52
56
  };
53
57
  Radio.Item = Item;
package/cjs/RecentTime.js CHANGED
@@ -30,6 +30,7 @@ __export(RecentTime_exports, {
30
30
  RecentTime: () => RecentTime
31
31
  });
32
32
  module.exports = __toCommonJS(RecentTime_exports);
33
+ var import_jsx_runtime = require("react/jsx-runtime");
33
34
  var import_base = require("@akanjs/base");
34
35
  var import_client = require("@akanjs/client");
35
36
  var import_next = require("@akanjs/next");
@@ -50,37 +51,37 @@ const RecentTime = ({
50
51
  if (!date)
51
52
  return null;
52
53
  if ((0, import_base.dayjs)(0).isSame(date) || (0, import_base.dayjs)(-1).isSame(date))
53
- return /* @__PURE__ */ React.createElement("span", null, "--:--");
54
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: "--:--" });
54
55
  if (breakUnit === "second")
55
- return /* @__PURE__ */ React.createElement("span", { className: (0, import_client.clsx)("tooltip", className), "data-tip": datejs.format("YYYY-MM-DD HH:mm:ss") }, datejs.format(dateFormat));
56
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: (0, import_client.clsx)("tooltip", className), "data-tip": datejs.format("YYYY-MM-DD HH:mm:ss"), children: datejs.format(dateFormat) });
56
57
  if (Math.abs(diffSecs) < 60)
57
- return /* @__PURE__ */ React.createElement("span", { className: (0, import_client.clsx)("tooltip", className), "data-tip": datejs.format("YYYY-MM-DD HH:mm") }, datejs.fromNow());
58
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: (0, import_client.clsx)("tooltip", className), "data-tip": datejs.format("YYYY-MM-DD HH:mm"), children: datejs.fromNow() });
58
59
  else if (breakUnit === "minute")
59
- return /* @__PURE__ */ React.createElement("span", { className: (0, import_client.clsx)("tooltip", className), "data-tip": datejs.format("YYYY-MM-DD HH:mm") }, datejs.format(dateFormat));
60
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: (0, import_client.clsx)("tooltip", className), "data-tip": datejs.format("YYYY-MM-DD HH:mm"), children: datejs.format(dateFormat) });
60
61
  const diffMins = Math.floor(diff / (1e3 * 60));
61
62
  if (Math.abs(diffMins) < 60)
62
- return /* @__PURE__ */ React.createElement("span", { className: (0, import_client.clsx)("tooltip", className), "data-tip": datejs.format("YYYY-MM-DD HH:mm") }, datejs.fromNow());
63
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: (0, import_client.clsx)("tooltip", className), "data-tip": datejs.format("YYYY-MM-DD HH:mm"), children: datejs.fromNow() });
63
64
  else if (breakUnit === "hour")
64
- return /* @__PURE__ */ React.createElement("span", { className: (0, import_client.clsx)("tooltip", className), "data-tip": datejs.format("YYYY-MM-DD HH:mm") }, datejs.format(dateFormat));
65
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: (0, import_client.clsx)("tooltip", className), "data-tip": datejs.format("YYYY-MM-DD HH:mm"), children: datejs.format(dateFormat) });
65
66
  const diffHours = Math.floor(diff / (1e3 * 3600));
66
67
  if (Math.abs(diffHours) < 24)
67
- return /* @__PURE__ */ React.createElement("span", { className: (0, import_client.clsx)("tooltip", className), "data-tip": datejs.format("YYYY-MM-DD HH:mm") }, datejs.fromNow());
68
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: (0, import_client.clsx)("tooltip", className), "data-tip": datejs.format("YYYY-MM-DD HH:mm"), children: datejs.fromNow() });
68
69
  else if (breakUnit === "day")
69
- return /* @__PURE__ */ React.createElement("span", { className: (0, import_client.clsx)("tooltip", className), "data-tip": datejs.format("YYYY-MM-DD HH:mm") }, datejs.format(dateFormat));
70
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: (0, import_client.clsx)("tooltip", className), "data-tip": datejs.format("YYYY-MM-DD HH:mm"), children: datejs.format(dateFormat) });
70
71
  const diffDays = Math.floor(diff / (1e3 * 3600 * 24));
71
72
  if (Math.abs(diffDays) < 7)
72
- return /* @__PURE__ */ React.createElement("span", { className: (0, import_client.clsx)("tooltip", className), "data-tip": datejs.format("YYYY-MM-DD HH:mm") }, datejs.fromNow());
73
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: (0, import_client.clsx)("tooltip", className), "data-tip": datejs.format("YYYY-MM-DD HH:mm"), children: datejs.fromNow() });
73
74
  else if (breakUnit === "week")
74
- return /* @__PURE__ */ React.createElement("span", { className: (0, import_client.clsx)("tooltip", className), "data-tip": datejs.format("YYYY-MM-DD HH:mm") }, datejs.format(dateFormat));
75
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: (0, import_client.clsx)("tooltip", className), "data-tip": datejs.format("YYYY-MM-DD HH:mm"), children: datejs.format(dateFormat) });
75
76
  const diffWeeks = Math.floor(diff / (1e3 * 3600 * 24 * 7));
76
77
  if (Math.abs(diffWeeks) < 4)
77
- return /* @__PURE__ */ React.createElement("span", { className: (0, import_client.clsx)("tooltip", className), "data-tip": datejs.format("YYYY-MM-DD HH:mm") }, datejs.fromNow());
78
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: (0, import_client.clsx)("tooltip", className), "data-tip": datejs.format("YYYY-MM-DD HH:mm"), children: datejs.fromNow() });
78
79
  else if (breakUnit === "month")
79
- return /* @__PURE__ */ React.createElement("span", { className: (0, import_client.clsx)("tooltip", className), "data-tip": datejs.format("YYYY-MM-DD HH:mm") }, datejs.format(dateFormat));
80
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: (0, import_client.clsx)("tooltip", className), "data-tip": datejs.format("YYYY-MM-DD HH:mm"), children: datejs.format(dateFormat) });
80
81
  const diffMonths = Math.floor(diff / (1e3 * 3600 * 24 * 30));
81
82
  if (Math.abs(diffMonths) < 12)
82
- return /* @__PURE__ */ React.createElement("span", { className: (0, import_client.clsx)("tooltip", className), "data-tip": datejs.format("YYYY-MM-DD HH:mm") }, datejs.fromNow());
83
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: (0, import_client.clsx)("tooltip", className), "data-tip": datejs.format("YYYY-MM-DD HH:mm"), children: datejs.fromNow() });
83
84
  else if (breakUnit === "year")
84
- return /* @__PURE__ */ React.createElement("span", { className: (0, import_client.clsx)("tooltip", className), "data-tip": datejs.format("YYYY-MM-DD HH:mm") }, datejs.format(dateFormat));
85
- return /* @__PURE__ */ React.createElement("span", { className: (0, import_client.clsx)("tooltip", className), "data-tip": datejs.format("YYYY-MM-DD HH:mm") }, datejs.fromNow());
85
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: (0, import_client.clsx)("tooltip", className), "data-tip": datejs.format("YYYY-MM-DD HH:mm"), children: datejs.format(dateFormat) });
86
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: (0, import_client.clsx)("tooltip", className), "data-tip": datejs.format("YYYY-MM-DD HH:mm"), children: datejs.fromNow() });
86
87
  };
package/cjs/Refresh.js CHANGED
@@ -31,15 +31,16 @@ __export(Refresh_exports, {
31
31
  Refresh: () => Refresh
32
32
  });
33
33
  module.exports = __toCommonJS(Refresh_exports);
34
+ var import_jsx_runtime = require("react/jsx-runtime");
34
35
  var import_bi = require("react-icons/bi");
35
36
  var import_react_simple_pull_to_refresh = __toESM(require("react-simple-pull-to-refresh"));
36
37
  const Refresh = ({ children, onRefresh }) => {
37
- return /* @__PURE__ */ React.createElement(
38
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
38
39
  import_react_simple_pull_to_refresh.default,
39
40
  {
40
41
  onRefresh,
41
- refreshingContent: /* @__PURE__ */ React.createElement("div", { className: "bg-base-100 fixed left-1/2 flex size-10 -translate-x-1/2 items-center justify-center rounded-full shadow-sm" }, /* @__PURE__ */ React.createElement(import_bi.BiLoaderAlt, { className: "animate-spin text-2xl" }))
42
- },
43
- children
42
+ refreshingContent: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "bg-base-100 fixed left-1/2 flex size-10 -translate-x-1/2 items-center justify-center rounded-full shadow-sm", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_bi.BiLoaderAlt, { className: "animate-spin text-2xl" }) }),
43
+ children
44
+ }
44
45
  );
45
46
  };
@@ -21,6 +21,7 @@ __export(ScreenNavigator_exports, {
21
21
  ScreenNavigator: () => ScreenNavigator
22
22
  });
23
23
  module.exports = __toCommonJS(ScreenNavigator_exports);
24
+ var import_jsx_runtime = require("react/jsx-runtime");
24
25
  var import_client = require("@akanjs/client");
25
26
  var import_react = require("@use-gesture/react");
26
27
  var import_react2 = require("react");
@@ -99,23 +100,23 @@ const ScreenNavigator = ({
99
100
  setCurrentMenu(menus[1]);
100
101
  }
101
102
  };
102
- return /* @__PURE__ */ React.createElement(ScreenNavigatorContext.Provider, { value: { bind, xValue, onClickMenu, menus, currentMenu, setMenu } }, /* @__PURE__ */ React.createElement(import_react_spring.a.div, { ...bind(), className: "flex h-full w-[200vw] overflow-x-scroll", style: { x: xValue }, ref }, children));
103
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ScreenNavigatorContext.Provider, { value: { bind, xValue, onClickMenu, menus, currentMenu, setMenu }, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_spring.a.div, { ...bind(), className: "flex h-full w-[200vw] overflow-x-scroll", style: { x: xValue }, ref, children }) });
103
104
  };
104
105
  const NavbarItem = ({ menu, children, className }) => {
105
106
  const { onClickMenu, currentMenu } = (0, import_react2.useContext)(ScreenNavigatorContext);
106
- return /* @__PURE__ */ React.createElement(
107
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
107
108
  "div",
108
109
  {
109
110
  className: (0, import_client.clsx)(className, currentMenu === menu ? "opacity-100" : "opacity-40"),
110
111
  onClick: () => {
111
112
  onClickMenu(menu);
112
- }
113
- },
114
- children
113
+ },
114
+ children
115
+ }
115
116
  );
116
117
  };
117
118
  ScreenNavigator.NavbarItem = NavbarItem;
118
119
  const Screen = ({ children }) => {
119
- return /* @__PURE__ */ React.createElement("div", { className: "h-full w-screen overflow-scroll", style: { touchAction: "pan-y" } }, children);
120
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "h-full w-screen overflow-scroll", style: { touchAction: "pan-y" }, children });
120
121
  };
121
122
  ScreenNavigator.Screen = Screen;