@akanjs/ui 0.0.151 → 0.0.152

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 (351) 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 +1 -1
package/esm/Popconfirm.js CHANGED
@@ -1,9 +1,10 @@
1
1
  "use client";
2
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
2
3
  //! 디자인 수정, 테마 적용 안됨
3
4
  import { clsx } from "@akanjs/client";
4
5
  import { usePage } from "@akanjs/next";
5
6
  import { animated, useSpring } from "@react-spring/web";
6
- import React, { useEffect, useState } from "react";
7
+ import { useEffect, useState } from "react";
7
8
  import { BiMessageRoundedError } from "react-icons/bi";
8
9
  const Popconfirm = ({
9
10
  title,
@@ -44,43 +45,60 @@ const Popconfirm = ({
44
45
  const handleCancel = () => {
45
46
  setIsConfirming(false);
46
47
  };
47
- return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("div", { className: "relative inline-block" }, /* @__PURE__ */ React.createElement(
48
- "div",
49
- {
50
- className: clsx("trigger", triggerClassName),
51
- onClick: (e) => {
52
- e.stopPropagation();
53
- setIsConfirming(true);
54
- }
55
- },
56
- children
57
- ), isConfirming && /* @__PURE__ */ React.createElement(
58
- animated.div,
59
- {
60
- 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",
61
- style: popconfirmProps
62
- },
63
- /* @__PURE__ */ React.createElement(
48
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
49
+ /* @__PURE__ */ jsxs("div", { className: "relative inline-block", children: [
50
+ /* @__PURE__ */ jsx(
51
+ "div",
52
+ {
53
+ className: clsx("trigger", triggerClassName),
54
+ onClick: (e) => {
55
+ e.stopPropagation();
56
+ setIsConfirming(true);
57
+ },
58
+ children
59
+ }
60
+ ),
61
+ isConfirming && /* @__PURE__ */ jsxs(
62
+ animated.div,
63
+ {
64
+ 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",
65
+ style: popconfirmProps,
66
+ children: [
67
+ /* @__PURE__ */ jsx(
68
+ "div",
69
+ {
70
+ className: clsx(
71
+ "bg-base-100 border-base-300 popconfirm-deco absolute -top-2 size-4 rotate-45 rounded-sm border-t border-l",
72
+ { "right-10": !decoClassName },
73
+ decoClassName
74
+ )
75
+ }
76
+ ),
77
+ /* @__PURE__ */ jsxs("div", { className: "flex gap-1", children: [
78
+ /* @__PURE__ */ jsx(BiMessageRoundedError, { className: "text-orange-500" }),
79
+ /* @__PURE__ */ jsxs("div", { children: [
80
+ /* @__PURE__ */ jsx("p", { className: "mb-2 font-bold whitespace-nowrap", children: title }),
81
+ /* @__PURE__ */ jsx("div", { className: "mb-2 whitespace-nowrap", children: description })
82
+ ] })
83
+ ] }),
84
+ /* @__PURE__ */ jsxs("div", { className: "flex justify-end gap-2", children: [
85
+ /* @__PURE__ */ jsx("button", { className: "btn btn-xs btn-outline", onClick: handleCancel, ...cancelButtonProps, children: cancelText ?? l("util.cancel") }),
86
+ /* @__PURE__ */ jsx("button", { className: "btn btn-xs", onClick: handleConfirm, ...okButtonProps, children: okText ?? l("util.ok") })
87
+ ] })
88
+ ]
89
+ }
90
+ )
91
+ ] }),
92
+ isConfirming && /* @__PURE__ */ jsx(
64
93
  "div",
65
94
  {
66
- className: clsx(
67
- "bg-base-100 border-base-300 popconfirm-deco absolute -top-2 size-4 rotate-45 rounded-sm border-t border-l",
68
- { "right-10": !decoClassName },
69
- decoClassName
70
- )
71
- }
72
- ),
73
- /* @__PURE__ */ React.createElement("div", { className: "flex gap-1" }, /* @__PURE__ */ React.createElement(BiMessageRoundedError, { className: "text-orange-500" }), /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("p", { className: "mb-2 font-bold whitespace-nowrap" }, title), /* @__PURE__ */ React.createElement("div", { className: "mb-2 whitespace-nowrap" }, description))),
74
- /* @__PURE__ */ React.createElement("div", { className: "flex justify-end gap-2" }, /* @__PURE__ */ React.createElement("button", { className: "btn btn-xs btn-outline", onClick: handleCancel, ...cancelButtonProps }, cancelText ?? l("util.cancel")), /* @__PURE__ */ React.createElement("button", { className: "btn btn-xs", onClick: handleConfirm, ...okButtonProps }, okText ?? l("util.ok")))
75
- )), isConfirming && /* @__PURE__ */ React.createElement(
76
- "div",
77
- {
78
- className: "absolute top-0 left-0 h-screen w-full",
79
- onClick: () => {
80
- setIsConfirming(false);
95
+ className: "absolute top-0 left-0 h-screen w-full",
96
+ onClick: () => {
97
+ setIsConfirming(false);
98
+ }
81
99
  }
82
- }
83
- ));
100
+ )
101
+ ] });
84
102
  };
85
103
  export {
86
104
  Popconfirm
package/esm/Radio.js CHANGED
@@ -1,32 +1,36 @@
1
1
  "use client";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
2
3
  import { clsx } from "@akanjs/client";
3
4
  const Radio = ({ value, children, disabled, className, onChange }) => {
4
- return /* @__PURE__ */ React.createElement("div", { className: clsx(`flex gap-2`, className) }, children.map((child, idx) => {
5
- return /* @__PURE__ */ React.createElement("div", { className: "flex items-center justify-center gap-1", key: idx }, /* @__PURE__ */ React.createElement(
6
- "input",
7
- {
8
- type: "radio",
9
- disabled,
10
- className: "radio radio-primary radio-sm",
11
- checked: value === child.props.value || value === idx,
12
- onChange: () => {
13
- onChange(child.props.value, idx);
5
+ return /* @__PURE__ */ jsx("div", { className: clsx(`flex gap-2`, className), children: children.map((child, idx) => {
6
+ return /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-center gap-1", children: [
7
+ /* @__PURE__ */ jsx(
8
+ "input",
9
+ {
10
+ type: "radio",
11
+ disabled,
12
+ className: "radio radio-primary radio-sm",
13
+ checked: value === child.props.value || value === idx,
14
+ onChange: () => {
15
+ onChange(child.props.value, idx);
16
+ }
14
17
  }
15
- }
16
- ), /* @__PURE__ */ React.createElement(
17
- "button",
18
- {
19
- className: "bg-transparent",
20
- onClick: () => {
21
- onChange(child.props.value, idx);
18
+ ),
19
+ /* @__PURE__ */ jsx(
20
+ "button",
21
+ {
22
+ className: "bg-transparent",
23
+ onClick: () => {
24
+ onChange(child.props.value, idx);
25
+ },
26
+ children: child
22
27
  }
23
- },
24
- child
25
- ));
26
- }));
28
+ )
29
+ ] }, idx);
30
+ }) });
27
31
  };
28
32
  const Item = ({ value, className, children }) => {
29
- return /* @__PURE__ */ React.createElement("div", { className: clsx("", className) }, children);
33
+ return /* @__PURE__ */ jsx("div", { className: clsx("", className), children });
30
34
  };
31
35
  Radio.Item = Item;
32
36
  export {
package/esm/RecentTime.js CHANGED
@@ -1,3 +1,4 @@
1
+ import { jsx } from "react/jsx-runtime";
1
2
  import { dayjs } from "@akanjs/base";
2
3
  import { clsx } from "@akanjs/client";
3
4
  import { usePage } from "@akanjs/next";
@@ -18,39 +19,39 @@ const RecentTime = ({
18
19
  if (!date)
19
20
  return null;
20
21
  if (dayjs(0).isSame(date) || dayjs(-1).isSame(date))
21
- return /* @__PURE__ */ React.createElement("span", null, "--:--");
22
+ return /* @__PURE__ */ jsx("span", { children: "--:--" });
22
23
  if (breakUnit === "second")
23
- return /* @__PURE__ */ React.createElement("span", { className: clsx("tooltip", className), "data-tip": datejs.format("YYYY-MM-DD HH:mm:ss") }, datejs.format(dateFormat));
24
+ return /* @__PURE__ */ jsx("span", { className: clsx("tooltip", className), "data-tip": datejs.format("YYYY-MM-DD HH:mm:ss"), children: datejs.format(dateFormat) });
24
25
  if (Math.abs(diffSecs) < 60)
25
- return /* @__PURE__ */ React.createElement("span", { className: clsx("tooltip", className), "data-tip": datejs.format("YYYY-MM-DD HH:mm") }, datejs.fromNow());
26
+ return /* @__PURE__ */ jsx("span", { className: clsx("tooltip", className), "data-tip": datejs.format("YYYY-MM-DD HH:mm"), children: datejs.fromNow() });
26
27
  else if (breakUnit === "minute")
27
- return /* @__PURE__ */ React.createElement("span", { className: clsx("tooltip", className), "data-tip": datejs.format("YYYY-MM-DD HH:mm") }, datejs.format(dateFormat));
28
+ return /* @__PURE__ */ jsx("span", { className: clsx("tooltip", className), "data-tip": datejs.format("YYYY-MM-DD HH:mm"), children: datejs.format(dateFormat) });
28
29
  const diffMins = Math.floor(diff / (1e3 * 60));
29
30
  if (Math.abs(diffMins) < 60)
30
- return /* @__PURE__ */ React.createElement("span", { className: clsx("tooltip", className), "data-tip": datejs.format("YYYY-MM-DD HH:mm") }, datejs.fromNow());
31
+ return /* @__PURE__ */ jsx("span", { className: clsx("tooltip", className), "data-tip": datejs.format("YYYY-MM-DD HH:mm"), children: datejs.fromNow() });
31
32
  else if (breakUnit === "hour")
32
- return /* @__PURE__ */ React.createElement("span", { className: clsx("tooltip", className), "data-tip": datejs.format("YYYY-MM-DD HH:mm") }, datejs.format(dateFormat));
33
+ return /* @__PURE__ */ jsx("span", { className: clsx("tooltip", className), "data-tip": datejs.format("YYYY-MM-DD HH:mm"), children: datejs.format(dateFormat) });
33
34
  const diffHours = Math.floor(diff / (1e3 * 3600));
34
35
  if (Math.abs(diffHours) < 24)
35
- return /* @__PURE__ */ React.createElement("span", { className: clsx("tooltip", className), "data-tip": datejs.format("YYYY-MM-DD HH:mm") }, datejs.fromNow());
36
+ return /* @__PURE__ */ jsx("span", { className: clsx("tooltip", className), "data-tip": datejs.format("YYYY-MM-DD HH:mm"), children: datejs.fromNow() });
36
37
  else if (breakUnit === "day")
37
- return /* @__PURE__ */ React.createElement("span", { className: clsx("tooltip", className), "data-tip": datejs.format("YYYY-MM-DD HH:mm") }, datejs.format(dateFormat));
38
+ return /* @__PURE__ */ jsx("span", { className: clsx("tooltip", className), "data-tip": datejs.format("YYYY-MM-DD HH:mm"), children: datejs.format(dateFormat) });
38
39
  const diffDays = Math.floor(diff / (1e3 * 3600 * 24));
39
40
  if (Math.abs(diffDays) < 7)
40
- return /* @__PURE__ */ React.createElement("span", { className: clsx("tooltip", className), "data-tip": datejs.format("YYYY-MM-DD HH:mm") }, datejs.fromNow());
41
+ return /* @__PURE__ */ jsx("span", { className: clsx("tooltip", className), "data-tip": datejs.format("YYYY-MM-DD HH:mm"), children: datejs.fromNow() });
41
42
  else if (breakUnit === "week")
42
- return /* @__PURE__ */ React.createElement("span", { className: clsx("tooltip", className), "data-tip": datejs.format("YYYY-MM-DD HH:mm") }, datejs.format(dateFormat));
43
+ return /* @__PURE__ */ jsx("span", { className: clsx("tooltip", className), "data-tip": datejs.format("YYYY-MM-DD HH:mm"), children: datejs.format(dateFormat) });
43
44
  const diffWeeks = Math.floor(diff / (1e3 * 3600 * 24 * 7));
44
45
  if (Math.abs(diffWeeks) < 4)
45
- return /* @__PURE__ */ React.createElement("span", { className: clsx("tooltip", className), "data-tip": datejs.format("YYYY-MM-DD HH:mm") }, datejs.fromNow());
46
+ return /* @__PURE__ */ jsx("span", { className: clsx("tooltip", className), "data-tip": datejs.format("YYYY-MM-DD HH:mm"), children: datejs.fromNow() });
46
47
  else if (breakUnit === "month")
47
- return /* @__PURE__ */ React.createElement("span", { className: clsx("tooltip", className), "data-tip": datejs.format("YYYY-MM-DD HH:mm") }, datejs.format(dateFormat));
48
+ return /* @__PURE__ */ jsx("span", { className: clsx("tooltip", className), "data-tip": datejs.format("YYYY-MM-DD HH:mm"), children: datejs.format(dateFormat) });
48
49
  const diffMonths = Math.floor(diff / (1e3 * 3600 * 24 * 30));
49
50
  if (Math.abs(diffMonths) < 12)
50
- return /* @__PURE__ */ React.createElement("span", { className: clsx("tooltip", className), "data-tip": datejs.format("YYYY-MM-DD HH:mm") }, datejs.fromNow());
51
+ return /* @__PURE__ */ jsx("span", { className: clsx("tooltip", className), "data-tip": datejs.format("YYYY-MM-DD HH:mm"), children: datejs.fromNow() });
51
52
  else if (breakUnit === "year")
52
- return /* @__PURE__ */ React.createElement("span", { className: clsx("tooltip", className), "data-tip": datejs.format("YYYY-MM-DD HH:mm") }, datejs.format(dateFormat));
53
- return /* @__PURE__ */ React.createElement("span", { className: clsx("tooltip", className), "data-tip": datejs.format("YYYY-MM-DD HH:mm") }, datejs.fromNow());
53
+ return /* @__PURE__ */ jsx("span", { className: clsx("tooltip", className), "data-tip": datejs.format("YYYY-MM-DD HH:mm"), children: datejs.format(dateFormat) });
54
+ return /* @__PURE__ */ jsx("span", { className: clsx("tooltip", className), "data-tip": datejs.format("YYYY-MM-DD HH:mm"), children: datejs.fromNow() });
54
55
  };
55
56
  export {
56
57
  RecentTime
package/esm/Refresh.js CHANGED
@@ -1,14 +1,15 @@
1
1
  "use client";
2
+ import { jsx } from "react/jsx-runtime";
2
3
  import { BiLoaderAlt } from "react-icons/bi";
3
4
  import PullToRefresh from "react-simple-pull-to-refresh";
4
5
  const Refresh = ({ children, onRefresh }) => {
5
- return /* @__PURE__ */ React.createElement(
6
+ return /* @__PURE__ */ jsx(
6
7
  PullToRefresh,
7
8
  {
8
9
  onRefresh,
9
- 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(BiLoaderAlt, { className: "animate-spin text-2xl" }))
10
- },
11
- children
10
+ refreshingContent: /* @__PURE__ */ 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__ */ jsx(BiLoaderAlt, { className: "animate-spin text-2xl" }) }),
11
+ children
12
+ }
12
13
  );
13
14
  };
14
15
  export {
@@ -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 { useDrag } from "@use-gesture/react";
4
5
  import { createContext, useContext, useEffect, useRef, useState } from "react";
@@ -77,24 +78,24 @@ const ScreenNavigator = ({
77
78
  setCurrentMenu(menus[1]);
78
79
  }
79
80
  };
80
- return /* @__PURE__ */ React.createElement(ScreenNavigatorContext.Provider, { value: { bind, xValue, onClickMenu, menus, currentMenu, setMenu } }, /* @__PURE__ */ React.createElement(a.div, { ...bind(), className: "flex h-full w-[200vw] overflow-x-scroll", style: { x: xValue }, ref }, children));
81
+ return /* @__PURE__ */ jsx(ScreenNavigatorContext.Provider, { value: { bind, xValue, onClickMenu, menus, currentMenu, setMenu }, children: /* @__PURE__ */ jsx(a.div, { ...bind(), className: "flex h-full w-[200vw] overflow-x-scroll", style: { x: xValue }, ref, children }) });
81
82
  };
82
83
  const NavbarItem = ({ menu, children, className }) => {
83
84
  const { onClickMenu, currentMenu } = useContext(ScreenNavigatorContext);
84
- return /* @__PURE__ */ React.createElement(
85
+ return /* @__PURE__ */ jsx(
85
86
  "div",
86
87
  {
87
88
  className: clsx(className, currentMenu === menu ? "opacity-100" : "opacity-40"),
88
89
  onClick: () => {
89
90
  onClickMenu(menu);
90
- }
91
- },
92
- children
91
+ },
92
+ children
93
+ }
93
94
  );
94
95
  };
95
96
  ScreenNavigator.NavbarItem = NavbarItem;
96
97
  const Screen = ({ children }) => {
97
- return /* @__PURE__ */ React.createElement("div", { className: "h-full w-screen overflow-scroll", style: { touchAction: "pan-y" } }, children);
98
+ return /* @__PURE__ */ jsx("div", { className: "h-full w-screen overflow-scroll", style: { touchAction: "pan-y" }, children });
98
99
  };
99
100
  ScreenNavigator.Screen = Screen;
100
101
  export {
package/esm/Select.js CHANGED
@@ -1,4 +1,5 @@
1
1
  "use client";
2
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
2
3
  import { Enum } from "@akanjs/base";
3
4
  import { clsx } from "@akanjs/client";
4
5
  import { useDebounce, usePage } from "@akanjs/next";
@@ -94,149 +95,169 @@ const Select = ({
94
95
  else
95
96
  setSelectedValues([value]);
96
97
  }, [value]);
97
- return /* @__PURE__ */ React.createElement("div", { className: clsx("relative min-w-[150px]", className), ref: dropdownRef }, /* @__PURE__ */ React.createElement(
98
- "div",
99
- {
100
- "data-open": isOpen,
101
- className: clsx(
102
- "btn flex h-auto min-h-[40px] w-full cursor-pointer items-center px-0 py-1 pr-5 pl-1 focus:outline-hidden",
103
- "bg-base-100 data-[open=true]:border-primary",
104
- disabled && "cursor-not-allowed opacity-50",
105
- selectClassName,
106
- { "border-base-300": isOpen }
107
- ),
108
- onClick: () => {
109
- setIsOpen(!isOpen);
110
- }
111
- },
112
- /* @__PURE__ */ React.createElement("span", { className: "flex w-full flex-wrap items-center gap-1" }, multiple ? /* @__PURE__ */ React.createElement(React.Fragment, null, value.map((v, index) => {
113
- const optionValue = labeledOptions.find((option) => option.value === v);
114
- if (!optionValue)
115
- return null;
116
- return /* @__PURE__ */ React.createElement(
117
- "div",
118
- {
119
- key: index,
120
- className: "bg-success/70 text-success-content flex items-center gap-2 rounded-lg px-2 py-1 text-xs"
121
- },
122
- renderSelected ? renderSelected(optionValue.value) : optionValue.label,
123
- /* @__PURE__ */ React.createElement(
124
- "button",
125
- {
126
- onClick: (e) => {
127
- e.stopPropagation();
128
- e.preventDefault();
129
- onSelect(optionValue.value, index);
130
- },
131
- className: "opacity-50 duration-300 hover:opacity-100"
132
- },
133
- /* @__PURE__ */ React.createElement(BiX, { className: "text-base" })
134
- )
135
- );
136
- })) : /* @__PURE__ */ React.createElement("div", { className: "px-2 py-1" }, value ? /* @__PURE__ */ React.createElement(React.Fragment, null, (() => {
137
- const optionValue = searchOptions.find((option) => selected(option.value));
138
- if (!optionValue)
139
- return null;
140
- return renderSelected ? renderSelected(optionValue.value) : optionValue.label;
141
- })()) : ""), searchable && /* @__PURE__ */ React.createElement(
142
- "input",
143
- {
144
- type: "text",
145
- className: "input w-full flex-1 border-none bg-transparent shadow-none outline-none focus:border-none focus:shadow-none focus:outline-none",
146
- placeholder: selectedValues.length > 0 ? "" : placeholder,
147
- value: searchText,
148
- onChange: (e) => {
149
- if (!isOpen)
150
- setIsOpen(true);
151
- if (!onSearch)
152
- setSearchOptions(
153
- labeledOptions.filter(
154
- (option) => option.label.toString().toLowerCase().includes(e.target.value.toLowerCase())
155
- )
156
- );
157
- setSearchText(e.target.value);
158
- debouncedOnSearch(e.target.value);
159
- },
160
- onClick: (e) => {
161
- e.stopPropagation();
162
- e.preventDefault();
163
- setIsOpen(!isOpen);
164
- }
165
- }
166
- )),
167
- multiple && selectedValues.length || !multiple && selectedValues[0] !== void 0 && selectedValues[0] !== null ? /* @__PURE__ */ React.createElement(
168
- TiDelete,
169
- {
170
- className: "absolute right-8 z-[2] h-full text-lg duration-300 hover:cursor-pointer hover:opacity-50",
171
- onClick: (e) => {
172
- e.stopPropagation();
173
- e.preventDefault();
174
- setSearchText("");
175
- setSelectedValues([]);
176
- if (multiple)
177
- onChange([], selectedValues);
178
- else
179
- onChange(null, selectedValues[0]);
180
- setIsOpen(false);
181
- }
182
- }
183
- ) : null,
184
- /* @__PURE__ */ React.createElement(
185
- BiChevronDown,
186
- {
187
- className: clsx("absolute top-1/2 right-2 -translate-y-1/2 text-lg duration-100", { "rotate-180": isOpen })
188
- }
189
- )
190
- ), /* @__PURE__ */ React.createElement(
191
- "div",
192
- {
193
- "data-open": isOpen,
194
- className: clsx(
195
- "scrollbar-thin scrollbar-thumb-base-content/20 scrollbar-track scrollbar-track-base-content/40 bg-base-200 border-base-300 absolute z-20 mt-0.5 w-full overflow-y-scroll rounded-md shadow-lg transition-all",
196
- "origin-center duration-200 data-[open=false]:h-0 data-[open=false]:border-none data-[open=true]:h-[270px] data-[open=true]:border",
197
- selectorClassName
198
- )
199
- },
200
- nullable && /* @__PURE__ */ React.createElement(
98
+ return /* @__PURE__ */ jsxs("div", { className: clsx("relative min-w-[150px]", className), ref: dropdownRef, children: [
99
+ /* @__PURE__ */ jsxs(
201
100
  "div",
202
101
  {
203
- className: "cursor-pointer p-2",
102
+ "data-open": isOpen,
103
+ className: clsx(
104
+ "btn flex h-auto min-h-[40px] w-full cursor-pointer items-center px-0 py-1 pr-5 pl-1 focus:outline-hidden",
105
+ "bg-base-100 data-[open=true]:border-primary",
106
+ disabled && "cursor-not-allowed opacity-50",
107
+ selectClassName,
108
+ { "border-base-300": isOpen }
109
+ ),
204
110
  onClick: () => {
205
- setIsOpen(false);
206
- }
111
+ setIsOpen(!isOpen);
112
+ },
113
+ children: [
114
+ /* @__PURE__ */ jsxs("span", { className: "flex w-full flex-wrap items-center gap-1", children: [
115
+ multiple ? /* @__PURE__ */ jsx(Fragment, { children: value.map((v, index) => {
116
+ const optionValue = labeledOptions.find((option) => option.value === v);
117
+ if (!optionValue)
118
+ return null;
119
+ return /* @__PURE__ */ jsxs(
120
+ "div",
121
+ {
122
+ className: "bg-success/70 text-success-content flex items-center gap-2 rounded-lg px-2 py-1 text-xs",
123
+ children: [
124
+ renderSelected ? renderSelected(optionValue.value) : optionValue.label,
125
+ /* @__PURE__ */ jsx(
126
+ "button",
127
+ {
128
+ onClick: (e) => {
129
+ e.stopPropagation();
130
+ e.preventDefault();
131
+ onSelect(optionValue.value, index);
132
+ },
133
+ className: "opacity-50 duration-300 hover:opacity-100",
134
+ children: /* @__PURE__ */ jsx(BiX, { className: "text-base" })
135
+ }
136
+ )
137
+ ]
138
+ },
139
+ index
140
+ );
141
+ }) }) : /* @__PURE__ */ jsx("div", { className: "px-2 py-1", children: value ? /* @__PURE__ */ jsx(Fragment, { children: (() => {
142
+ const optionValue = searchOptions.find((option) => selected(option.value));
143
+ if (!optionValue)
144
+ return null;
145
+ return renderSelected ? renderSelected(optionValue.value) : optionValue.label;
146
+ })() }) : "" }),
147
+ searchable && /* @__PURE__ */ jsx(
148
+ "input",
149
+ {
150
+ type: "text",
151
+ className: "input w-full flex-1 border-none bg-transparent shadow-none outline-none focus:border-none focus:shadow-none focus:outline-none",
152
+ placeholder: selectedValues.length > 0 ? "" : placeholder,
153
+ value: searchText,
154
+ onChange: (e) => {
155
+ if (!isOpen)
156
+ setIsOpen(true);
157
+ if (!onSearch)
158
+ setSearchOptions(
159
+ labeledOptions.filter(
160
+ (option) => option.label.toString().toLowerCase().includes(e.target.value.toLowerCase())
161
+ )
162
+ );
163
+ setSearchText(e.target.value);
164
+ debouncedOnSearch(e.target.value);
165
+ },
166
+ onClick: (e) => {
167
+ e.stopPropagation();
168
+ e.preventDefault();
169
+ setIsOpen(!isOpen);
170
+ }
171
+ }
172
+ )
173
+ ] }),
174
+ multiple && selectedValues.length || !multiple && selectedValues[0] !== void 0 && selectedValues[0] !== null ? /* @__PURE__ */ jsx(
175
+ TiDelete,
176
+ {
177
+ className: "absolute right-8 z-[2] h-full text-lg duration-300 hover:cursor-pointer hover:opacity-50",
178
+ onClick: (e) => {
179
+ e.stopPropagation();
180
+ e.preventDefault();
181
+ setSearchText("");
182
+ setSelectedValues([]);
183
+ if (multiple)
184
+ onChange([], selectedValues);
185
+ else
186
+ onChange(null, selectedValues[0]);
187
+ setIsOpen(false);
188
+ }
189
+ }
190
+ ) : null,
191
+ /* @__PURE__ */ jsx(
192
+ BiChevronDown,
193
+ {
194
+ className: clsx("absolute top-1/2 right-2 -translate-y-1/2 text-lg duration-100", { "rotate-180": isOpen })
195
+ }
196
+ )
197
+ ]
207
198
  }
208
199
  ),
209
- searchOptions.length > 0 ? /* @__PURE__ */ React.createElement(React.Fragment, null, searchOptions.map((option, index) => {
210
- const isSelected = selected(option.value);
211
- return /* @__PURE__ */ React.createElement("div", { key: index, className: "group" }, /* @__PURE__ */ React.createElement(
212
- "div",
213
- {
214
- className: clsx(
215
- "hover:bg-base-300 relative m-2 cursor-pointer rounded-sm p-2 duration-100 last:border-b-0",
200
+ /* @__PURE__ */ jsxs(
201
+ "div",
202
+ {
203
+ "data-open": isOpen,
204
+ className: clsx(
205
+ "scrollbar-thin scrollbar-thumb-base-content/20 scrollbar-track scrollbar-track-base-content/40 bg-base-200 border-base-300 absolute z-20 mt-0.5 w-full overflow-y-scroll rounded-md shadow-lg transition-all",
206
+ "origin-center duration-200 data-[open=false]:h-0 data-[open=false]:border-none data-[open=true]:h-[270px] data-[open=true]:border",
207
+ selectorClassName
208
+ ),
209
+ children: [
210
+ nullable && /* @__PURE__ */ jsx(
211
+ "div",
216
212
  {
217
- selectedClassName: !multiple && isSelected,
218
- "bg-success/70 text-success-content": isSelected
213
+ className: "cursor-pointer p-2",
214
+ onClick: () => {
215
+ setIsOpen(false);
216
+ }
219
217
  }
220
218
  ),
221
- onClick: () => {
222
- onSelect(option.value, index);
223
- setSearchText("");
224
- }
225
- },
226
- renderOption ? renderOption(option.value) : option.label,
227
- /* @__PURE__ */ React.createElement("div", { className: clsx("absolute top-1/2 right-2 -translate-y-1/2 flex-wrap duration-200", {}) }, /* @__PURE__ */ React.createElement(
228
- "div",
229
- {
230
- className: clsx("duration-200", {
231
- "translate-y-0 opacity-100": isSelected,
232
- "-translate-y-full opacity-0": !isSelected
233
- })
234
- },
235
- /* @__PURE__ */ React.createElement(BiCheck, null)
236
- ))
237
- ), /* @__PURE__ */ React.createElement("div", { className: "h-px w-full px-2 group-last:hidden" }, /* @__PURE__ */ React.createElement("div", { className: "bg-base-content/10 size-full" })));
238
- })) : /* @__PURE__ */ React.createElement("div", { className: "text-base-content/50 flex size-full flex-col items-center justify-center gap-2 p-2 text-center text-5xl" }, /* @__PURE__ */ React.createElement(BsQuestionCircleFill, null), /* @__PURE__ */ React.createElement("div", { className: "text-sm" }, l("shared.noOptions")))
239
- ));
219
+ searchOptions.length > 0 ? /* @__PURE__ */ jsx(Fragment, { children: searchOptions.map((option, index) => {
220
+ const isSelected = selected(option.value);
221
+ return /* @__PURE__ */ jsxs("div", { className: "group", children: [
222
+ /* @__PURE__ */ jsxs(
223
+ "div",
224
+ {
225
+ className: clsx(
226
+ "hover:bg-base-300 relative m-2 cursor-pointer rounded-sm p-2 duration-100 last:border-b-0",
227
+ {
228
+ selectedClassName: !multiple && isSelected,
229
+ "bg-success/70 text-success-content": isSelected
230
+ }
231
+ ),
232
+ onClick: () => {
233
+ onSelect(option.value, index);
234
+ setSearchText("");
235
+ },
236
+ children: [
237
+ renderOption ? renderOption(option.value) : option.label,
238
+ /* @__PURE__ */ jsx("div", { className: clsx("absolute top-1/2 right-2 -translate-y-1/2 flex-wrap duration-200", {}), children: /* @__PURE__ */ jsx(
239
+ "div",
240
+ {
241
+ className: clsx("duration-200", {
242
+ "translate-y-0 opacity-100": isSelected,
243
+ "-translate-y-full opacity-0": !isSelected
244
+ }),
245
+ children: /* @__PURE__ */ jsx(BiCheck, {})
246
+ }
247
+ ) })
248
+ ]
249
+ }
250
+ ),
251
+ /* @__PURE__ */ jsx("div", { className: "h-px w-full px-2 group-last:hidden", children: /* @__PURE__ */ jsx("div", { className: "bg-base-content/10 size-full" }) })
252
+ ] }, index);
253
+ }) }) : /* @__PURE__ */ jsxs("div", { className: "text-base-content/50 flex size-full flex-col items-center justify-center gap-2 p-2 text-center text-5xl", children: [
254
+ /* @__PURE__ */ jsx(BsQuestionCircleFill, {}),
255
+ /* @__PURE__ */ jsx("div", { className: "text-sm", children: l("shared.noOptions") })
256
+ ] })
257
+ ]
258
+ }
259
+ )
260
+ ] });
240
261
  };
241
262
  export {
242
263
  Select