@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/cjs/Select.js CHANGED
@@ -21,6 +21,7 @@ __export(Select_exports, {
21
21
  Select: () => Select
22
22
  });
23
23
  module.exports = __toCommonJS(Select_exports);
24
+ var import_jsx_runtime = require("react/jsx-runtime");
24
25
  var import_base = require("@akanjs/base");
25
26
  var import_client = require("@akanjs/client");
26
27
  var import_next = require("@akanjs/next");
@@ -116,147 +117,167 @@ const Select = ({
116
117
  else
117
118
  setSelectedValues([value]);
118
119
  }, [value]);
119
- return /* @__PURE__ */ React.createElement("div", { className: (0, import_client.clsx)("relative min-w-[150px]", className), ref: dropdownRef }, /* @__PURE__ */ React.createElement(
120
- "div",
121
- {
122
- "data-open": isOpen,
123
- className: (0, import_client.clsx)(
124
- "btn flex h-auto min-h-[40px] w-full cursor-pointer items-center px-0 py-1 pr-5 pl-1 focus:outline-hidden",
125
- "bg-base-100 data-[open=true]:border-primary",
126
- disabled && "cursor-not-allowed opacity-50",
127
- selectClassName,
128
- { "border-base-300": isOpen }
129
- ),
130
- onClick: () => {
131
- setIsOpen(!isOpen);
132
- }
133
- },
134
- /* @__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) => {
135
- const optionValue = labeledOptions.find((option) => option.value === v);
136
- if (!optionValue)
137
- return null;
138
- return /* @__PURE__ */ React.createElement(
139
- "div",
140
- {
141
- key: index,
142
- className: "bg-success/70 text-success-content flex items-center gap-2 rounded-lg px-2 py-1 text-xs"
143
- },
144
- renderSelected ? renderSelected(optionValue.value) : optionValue.label,
145
- /* @__PURE__ */ React.createElement(
146
- "button",
147
- {
148
- onClick: (e) => {
149
- e.stopPropagation();
150
- e.preventDefault();
151
- onSelect(optionValue.value, index);
152
- },
153
- className: "opacity-50 duration-300 hover:opacity-100"
154
- },
155
- /* @__PURE__ */ React.createElement(import_bi.BiX, { className: "text-base" })
156
- )
157
- );
158
- })) : /* @__PURE__ */ React.createElement("div", { className: "px-2 py-1" }, value ? /* @__PURE__ */ React.createElement(React.Fragment, null, (() => {
159
- const optionValue = searchOptions.find((option) => selected(option.value));
160
- if (!optionValue)
161
- return null;
162
- return renderSelected ? renderSelected(optionValue.value) : optionValue.label;
163
- })()) : ""), searchable && /* @__PURE__ */ React.createElement(
164
- "input",
165
- {
166
- type: "text",
167
- className: "input w-full flex-1 border-none bg-transparent shadow-none outline-none focus:border-none focus:shadow-none focus:outline-none",
168
- placeholder: selectedValues.length > 0 ? "" : placeholder,
169
- value: searchText,
170
- onChange: (e) => {
171
- if (!isOpen)
172
- setIsOpen(true);
173
- if (!onSearch)
174
- setSearchOptions(
175
- labeledOptions.filter(
176
- (option) => option.label.toString().toLowerCase().includes(e.target.value.toLowerCase())
177
- )
178
- );
179
- setSearchText(e.target.value);
180
- debouncedOnSearch(e.target.value);
181
- },
182
- onClick: (e) => {
183
- e.stopPropagation();
184
- e.preventDefault();
185
- setIsOpen(!isOpen);
186
- }
187
- }
188
- )),
189
- multiple && selectedValues.length || !multiple && selectedValues[0] !== void 0 && selectedValues[0] !== null ? /* @__PURE__ */ React.createElement(
190
- import_ti.TiDelete,
191
- {
192
- className: "absolute right-8 z-[2] h-full text-lg duration-300 hover:cursor-pointer hover:opacity-50",
193
- onClick: (e) => {
194
- e.stopPropagation();
195
- e.preventDefault();
196
- setSearchText("");
197
- setSelectedValues([]);
198
- if (multiple)
199
- onChange([], selectedValues);
200
- else
201
- onChange(null, selectedValues[0]);
202
- setIsOpen(false);
203
- }
204
- }
205
- ) : null,
206
- /* @__PURE__ */ React.createElement(
207
- import_bi.BiChevronDown,
208
- {
209
- className: (0, import_client.clsx)("absolute top-1/2 right-2 -translate-y-1/2 text-lg duration-100", { "rotate-180": isOpen })
210
- }
211
- )
212
- ), /* @__PURE__ */ React.createElement(
213
- "div",
214
- {
215
- "data-open": isOpen,
216
- className: (0, import_client.clsx)(
217
- "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",
218
- "origin-center duration-200 data-[open=false]:h-0 data-[open=false]:border-none data-[open=true]:h-[270px] data-[open=true]:border",
219
- selectorClassName
220
- )
221
- },
222
- nullable && /* @__PURE__ */ React.createElement(
120
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: (0, import_client.clsx)("relative min-w-[150px]", className), ref: dropdownRef, children: [
121
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
223
122
  "div",
224
123
  {
225
- className: "cursor-pointer p-2",
124
+ "data-open": isOpen,
125
+ className: (0, import_client.clsx)(
126
+ "btn flex h-auto min-h-[40px] w-full cursor-pointer items-center px-0 py-1 pr-5 pl-1 focus:outline-hidden",
127
+ "bg-base-100 data-[open=true]:border-primary",
128
+ disabled && "cursor-not-allowed opacity-50",
129
+ selectClassName,
130
+ { "border-base-300": isOpen }
131
+ ),
226
132
  onClick: () => {
227
- setIsOpen(false);
228
- }
133
+ setIsOpen(!isOpen);
134
+ },
135
+ children: [
136
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: "flex w-full flex-wrap items-center gap-1", children: [
137
+ multiple ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children: value.map((v, index) => {
138
+ const optionValue = labeledOptions.find((option) => option.value === v);
139
+ if (!optionValue)
140
+ return null;
141
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
142
+ "div",
143
+ {
144
+ className: "bg-success/70 text-success-content flex items-center gap-2 rounded-lg px-2 py-1 text-xs",
145
+ children: [
146
+ renderSelected ? renderSelected(optionValue.value) : optionValue.label,
147
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
148
+ "button",
149
+ {
150
+ onClick: (e) => {
151
+ e.stopPropagation();
152
+ e.preventDefault();
153
+ onSelect(optionValue.value, index);
154
+ },
155
+ className: "opacity-50 duration-300 hover:opacity-100",
156
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_bi.BiX, { className: "text-base" })
157
+ }
158
+ )
159
+ ]
160
+ },
161
+ index
162
+ );
163
+ }) }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "px-2 py-1", children: value ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children: (() => {
164
+ const optionValue = searchOptions.find((option) => selected(option.value));
165
+ if (!optionValue)
166
+ return null;
167
+ return renderSelected ? renderSelected(optionValue.value) : optionValue.label;
168
+ })() }) : "" }),
169
+ searchable && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
170
+ "input",
171
+ {
172
+ type: "text",
173
+ className: "input w-full flex-1 border-none bg-transparent shadow-none outline-none focus:border-none focus:shadow-none focus:outline-none",
174
+ placeholder: selectedValues.length > 0 ? "" : placeholder,
175
+ value: searchText,
176
+ onChange: (e) => {
177
+ if (!isOpen)
178
+ setIsOpen(true);
179
+ if (!onSearch)
180
+ setSearchOptions(
181
+ labeledOptions.filter(
182
+ (option) => option.label.toString().toLowerCase().includes(e.target.value.toLowerCase())
183
+ )
184
+ );
185
+ setSearchText(e.target.value);
186
+ debouncedOnSearch(e.target.value);
187
+ },
188
+ onClick: (e) => {
189
+ e.stopPropagation();
190
+ e.preventDefault();
191
+ setIsOpen(!isOpen);
192
+ }
193
+ }
194
+ )
195
+ ] }),
196
+ multiple && selectedValues.length || !multiple && selectedValues[0] !== void 0 && selectedValues[0] !== null ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
197
+ import_ti.TiDelete,
198
+ {
199
+ className: "absolute right-8 z-[2] h-full text-lg duration-300 hover:cursor-pointer hover:opacity-50",
200
+ onClick: (e) => {
201
+ e.stopPropagation();
202
+ e.preventDefault();
203
+ setSearchText("");
204
+ setSelectedValues([]);
205
+ if (multiple)
206
+ onChange([], selectedValues);
207
+ else
208
+ onChange(null, selectedValues[0]);
209
+ setIsOpen(false);
210
+ }
211
+ }
212
+ ) : null,
213
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
214
+ import_bi.BiChevronDown,
215
+ {
216
+ className: (0, import_client.clsx)("absolute top-1/2 right-2 -translate-y-1/2 text-lg duration-100", { "rotate-180": isOpen })
217
+ }
218
+ )
219
+ ]
229
220
  }
230
221
  ),
231
- searchOptions.length > 0 ? /* @__PURE__ */ React.createElement(React.Fragment, null, searchOptions.map((option, index) => {
232
- const isSelected = selected(option.value);
233
- return /* @__PURE__ */ React.createElement("div", { key: index, className: "group" }, /* @__PURE__ */ React.createElement(
234
- "div",
235
- {
236
- className: (0, import_client.clsx)(
237
- "hover:bg-base-300 relative m-2 cursor-pointer rounded-sm p-2 duration-100 last:border-b-0",
222
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
223
+ "div",
224
+ {
225
+ "data-open": isOpen,
226
+ className: (0, import_client.clsx)(
227
+ "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",
228
+ "origin-center duration-200 data-[open=false]:h-0 data-[open=false]:border-none data-[open=true]:h-[270px] data-[open=true]:border",
229
+ selectorClassName
230
+ ),
231
+ children: [
232
+ nullable && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
233
+ "div",
238
234
  {
239
- selectedClassName: !multiple && isSelected,
240
- "bg-success/70 text-success-content": isSelected
235
+ className: "cursor-pointer p-2",
236
+ onClick: () => {
237
+ setIsOpen(false);
238
+ }
241
239
  }
242
240
  ),
243
- onClick: () => {
244
- onSelect(option.value, index);
245
- setSearchText("");
246
- }
247
- },
248
- renderOption ? renderOption(option.value) : option.label,
249
- /* @__PURE__ */ React.createElement("div", { className: (0, import_client.clsx)("absolute top-1/2 right-2 -translate-y-1/2 flex-wrap duration-200", {}) }, /* @__PURE__ */ React.createElement(
250
- "div",
251
- {
252
- className: (0, import_client.clsx)("duration-200", {
253
- "translate-y-0 opacity-100": isSelected,
254
- "-translate-y-full opacity-0": !isSelected
255
- })
256
- },
257
- /* @__PURE__ */ React.createElement(import_bi.BiCheck, null)
258
- ))
259
- ), /* @__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" })));
260
- })) : /* @__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(import_bs.BsQuestionCircleFill, null), /* @__PURE__ */ React.createElement("div", { className: "text-sm" }, l("shared.noOptions")))
261
- ));
241
+ searchOptions.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children: searchOptions.map((option, index) => {
242
+ const isSelected = selected(option.value);
243
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "group", children: [
244
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
245
+ "div",
246
+ {
247
+ className: (0, import_client.clsx)(
248
+ "hover:bg-base-300 relative m-2 cursor-pointer rounded-sm p-2 duration-100 last:border-b-0",
249
+ {
250
+ selectedClassName: !multiple && isSelected,
251
+ "bg-success/70 text-success-content": isSelected
252
+ }
253
+ ),
254
+ onClick: () => {
255
+ onSelect(option.value, index);
256
+ setSearchText("");
257
+ },
258
+ children: [
259
+ renderOption ? renderOption(option.value) : option.label,
260
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: (0, import_client.clsx)("absolute top-1/2 right-2 -translate-y-1/2 flex-wrap duration-200", {}), children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
261
+ "div",
262
+ {
263
+ className: (0, import_client.clsx)("duration-200", {
264
+ "translate-y-0 opacity-100": isSelected,
265
+ "-translate-y-full opacity-0": !isSelected
266
+ }),
267
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_bi.BiCheck, {})
268
+ }
269
+ ) })
270
+ ]
271
+ }
272
+ ),
273
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "h-px w-full px-2 group-last:hidden", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "bg-base-content/10 size-full" }) })
274
+ ] }, index);
275
+ }) }) : /* @__PURE__ */ (0, import_jsx_runtime.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: [
276
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_bs.BsQuestionCircleFill, {}),
277
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "text-sm", children: l("shared.noOptions") })
278
+ ] })
279
+ ]
280
+ }
281
+ )
282
+ ] });
262
283
  };
package/cjs/Signal/Arg.js CHANGED
@@ -31,6 +31,7 @@ __export(Arg_exports, {
31
31
  default: () => Arg
32
32
  });
33
33
  module.exports = __toCommonJS(Arg_exports);
34
+ var import_jsx_runtime = require("react/jsx-runtime");
34
35
  var import_base = require("@akanjs/base");
35
36
  var import_constant = require("@akanjs/constant");
36
37
  var import_next = require("@akanjs/next");
@@ -40,7 +41,7 @@ var import_DatePicker = require("../DatePicker");
40
41
  var import_Input = require("../Input");
41
42
  var import_Object = __toESM(require("./Object"));
42
43
  function Arg({ argType, value, onChange }) {
43
- return argType === "ID" ? /* @__PURE__ */ React.createElement(Arg.ID, { value, onChange }) : argType === "Int" ? /* @__PURE__ */ React.createElement(Arg.Int, { value, onChange }) : argType === "Float" ? /* @__PURE__ */ React.createElement(Arg.Float, { value, onChange }) : argType === "String" ? /* @__PURE__ */ React.createElement(Arg.String, { value, onChange }) : argType === "Boolean" ? /* @__PURE__ */ React.createElement(Arg.Boolean, { value, onChange }) : argType === "Date" ? /* @__PURE__ */ React.createElement(Arg.Date, { value, onChange }) : argType === "JSON" ? /* @__PURE__ */ React.createElement(Arg.Json, { value, onChange }) : argType === "Upload" ? /* @__PURE__ */ React.createElement(Arg.Upload, { value, onChange }) : /* @__PURE__ */ React.createElement(React.Fragment, null);
44
+ return argType === "ID" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Arg.ID, { value, onChange }) : argType === "Int" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Arg.Int, { value, onChange }) : argType === "Float" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Arg.Float, { value, onChange }) : argType === "String" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Arg.String, { value, onChange }) : argType === "Boolean" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Arg.Boolean, { value, onChange }) : argType === "Date" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Arg.Date, { value, onChange }) : argType === "JSON" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Arg.Json, { value, onChange }) : argType === "Upload" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Arg.Upload, { value, onChange }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, {});
44
45
  }
45
46
  const ArgTable = ({ sigMeta, gqlMeta, argMetas }) => {
46
47
  const { l } = (0, import_next.usePage)();
@@ -48,21 +49,36 @@ const ArgTable = ({ sigMeta, gqlMeta, argMetas }) => {
48
49
  void navigator.clipboard.writeText(text);
49
50
  import_store.st.do.showMessage({ content: "\uD074\uB9BD\uBCF4\uB4DC\uC5D0 \uBCF5\uC0AC\uB418\uC5C8\uC2B5\uB2C8\uB2E4.", type: "success", duration: 3 });
50
51
  };
51
- return /* @__PURE__ */ React.createElement("table", { className: "table" }, /* @__PURE__ */ React.createElement("thead", null, /* @__PURE__ */ React.createElement("tr", { className: "text-bold" }, /* @__PURE__ */ React.createElement("th", null, "Arg Key"), /* @__PURE__ */ React.createElement("th", { className: "text-center" }, "Type"), /* @__PURE__ */ React.createElement("th", { className: "text-center" }, "Enum"), /* @__PURE__ */ React.createElement("th", { className: "text-center" }, "Name"), /* @__PURE__ */ React.createElement("th", { className: "text-center" }, "Description"))), argMetas.map((argMeta, idx) => {
52
- const [argRef, argArrDepth] = (0, import_base.getNonArrayModel)(argMeta.returns());
53
- return /* @__PURE__ */ React.createElement("tbody", { className: "font-normal", key: idx }, /* @__PURE__ */ React.createElement("tr", null, /* @__PURE__ */ React.createElement("td", null, argMeta.name), /* @__PURE__ */ React.createElement("td", { className: "text-center" }, /* @__PURE__ */ React.createElement(import_Object.default.Type, { objRef: argRef, arrDepth: argArrDepth })), /* @__PURE__ */ React.createElement("td", { width: argMeta.argsOption.enum ? "20%" : "10%", className: "text-center" }, argMeta.argsOption.enum ? /* @__PURE__ */ React.createElement("div", { className: "flex flex-col gap-2" }, argMeta.argsOption.enum.map((opt, idx2) => /* @__PURE__ */ React.createElement("div", { key: idx2 }, /* @__PURE__ */ React.createElement(
54
- "button",
55
- {
56
- key: idx2,
57
- "data-tip": l.enum(sigMeta.refName, argMeta.name, opt),
58
- onClick: () => {
59
- onCopy(opt);
60
- },
61
- className: "tooltip tooltip-primary btn btn-secondary btn-xs"
62
- },
63
- opt
64
- )))) : "-"), /* @__PURE__ */ React.createElement("td", { className: "text-center" }, l.arg(sigMeta.refName, gqlMeta.key, argMeta.name)), /* @__PURE__ */ React.createElement("td", { className: "text-center" }, l.argdesc(sigMeta.refName, gqlMeta.key, argMeta.name))));
65
- }));
52
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("table", { className: "table", children: [
53
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("thead", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("tr", { className: "text-bold", children: [
54
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("th", { children: "Arg Key" }),
55
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("th", { className: "text-center", children: "Type" }),
56
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("th", { className: "text-center", children: "Enum" }),
57
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("th", { className: "text-center", children: "Name" }),
58
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("th", { className: "text-center", children: "Description" })
59
+ ] }) }),
60
+ argMetas.map((argMeta, idx) => {
61
+ const [argRef, argArrDepth] = (0, import_base.getNonArrayModel)(argMeta.returns());
62
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("tbody", { className: "font-normal", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("tr", { children: [
63
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("td", { children: argMeta.name }),
64
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("td", { className: "text-center", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Object.default.Type, { objRef: argRef, arrDepth: argArrDepth }) }),
65
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("td", { width: argMeta.argsOption.enum ? "20%" : "10%", className: "text-center", children: argMeta.argsOption.enum ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "flex flex-col gap-2", children: argMeta.argsOption.enum.map((opt, idx2) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
66
+ "button",
67
+ {
68
+ "data-tip": l.enum(sigMeta.refName, argMeta.name, opt),
69
+ onClick: () => {
70
+ onCopy(opt);
71
+ },
72
+ className: "tooltip tooltip-primary btn btn-secondary btn-xs",
73
+ children: opt
74
+ },
75
+ idx2
76
+ ) }, idx2)) }) : "-" }),
77
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("td", { className: "text-center", children: l.arg(sigMeta.refName, gqlMeta.key, argMeta.name) }),
78
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("td", { className: "text-center", children: l.argdesc(sigMeta.refName, gqlMeta.key, argMeta.name) })
79
+ ] }) }, idx);
80
+ })
81
+ ] });
66
82
  };
67
83
  Arg.Table = ArgTable;
68
84
  const ArgParam = ({ argMeta, value, onChange }) => {
@@ -72,7 +88,13 @@ const ArgParam = ({ argMeta, value, onChange }) => {
72
88
  else if (argArrDepth > 0)
73
89
  throw new Error(`Param arg - ${argMeta.key}/${argMeta.name} must not be array`);
74
90
  const argType = (0, import_constant.getGqlTypeStr)(argRef);
75
- return /* @__PURE__ */ React.createElement("div", { className: "flex w-full items-center gap-2" }, /* @__PURE__ */ React.createElement("div", { className: "w-36 pl-2" }, "- ", argMeta.name), /* @__PURE__ */ React.createElement("div", { className: "w-full" }, /* @__PURE__ */ React.createElement(Arg, { argType, value, onChange })));
91
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex w-full items-center gap-2", children: [
92
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "w-36 pl-2", children: [
93
+ "- ",
94
+ argMeta.name
95
+ ] }),
96
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "w-full", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Arg, { argType, value, onChange }) })
97
+ ] });
76
98
  };
77
99
  Arg.Param = ArgParam;
78
100
  const ArgQuery = ({ argMeta, value, onChange }) => {
@@ -82,34 +104,46 @@ const ArgQuery = ({ argMeta, value, onChange }) => {
82
104
  else if (argArrDepth > 1)
83
105
  throw new Error(`Query arg - ${argMeta.key}/${argMeta.name} must not be more than 2D array`);
84
106
  const argType = (0, import_constant.getGqlTypeStr)(argRef);
85
- return /* @__PURE__ */ React.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React.createElement("div", { className: "w-36 pl-2" }, "- ", argMeta.name), /* @__PURE__ */ React.createElement("div", { className: "w-full" }, argArrDepth && Array.isArray(value) ? /* @__PURE__ */ React.createElement("div", null, value.map((val, idx) => /* @__PURE__ */ React.createElement("div", { key: idx, className: "flex items-center gap-2" }, /* @__PURE__ */ React.createElement(
86
- Arg,
87
- {
88
- argType,
89
- value: val,
90
- onChange: (val2) => {
91
- onChange([...value.slice(0, idx), val2, ...value.slice(idx + 1)]);
92
- }
93
- }
94
- ), /* @__PURE__ */ React.createElement(
95
- "button",
96
- {
97
- className: "btn btn-sm btn-square",
98
- onClick: () => {
99
- onChange([...value.slice(0, idx), ...value.slice(idx + 1)]);
100
- }
101
- },
102
- /* @__PURE__ */ React.createElement(import_ai.AiOutlineDelete, null)
103
- ))), /* @__PURE__ */ React.createElement(
104
- "button",
105
- {
106
- className: "btn btn-sm",
107
- onClick: () => {
108
- onChange([...value, (0, import_constant.getScalarExample)(argRef)]);
109
- }
110
- },
111
- "+ Add"
112
- )) : /* @__PURE__ */ React.createElement(Arg, { argType, value, onChange })));
107
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center gap-2", children: [
108
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "w-36 pl-2", children: [
109
+ "- ",
110
+ argMeta.name
111
+ ] }),
112
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "w-full", children: argArrDepth && Array.isArray(value) ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [
113
+ value.map((val, idx) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center gap-2", children: [
114
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
115
+ Arg,
116
+ {
117
+ argType,
118
+ value: val,
119
+ onChange: (val2) => {
120
+ onChange([...value.slice(0, idx), val2, ...value.slice(idx + 1)]);
121
+ }
122
+ }
123
+ ),
124
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
125
+ "button",
126
+ {
127
+ className: "btn btn-sm btn-square",
128
+ onClick: () => {
129
+ onChange([...value.slice(0, idx), ...value.slice(idx + 1)]);
130
+ },
131
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ai.AiOutlineDelete, {})
132
+ }
133
+ )
134
+ ] }, idx)),
135
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
136
+ "button",
137
+ {
138
+ className: "btn btn-sm",
139
+ onClick: () => {
140
+ onChange([...value, (0, import_constant.getScalarExample)(argRef)]);
141
+ },
142
+ children: "+ Add"
143
+ }
144
+ )
145
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Arg, { argType, value, onChange }) })
146
+ ] });
113
147
  };
114
148
  Arg.Query = ArgQuery;
115
149
  const ArgFormData = ({ argMeta, value, onChange }) => {
@@ -118,11 +152,17 @@ const ArgFormData = ({ argMeta, value, onChange }) => {
118
152
  throw new Error(`FormData arg - ${argMeta.key}/${argMeta.name} must be Upload`);
119
153
  else if (argArrDepth < 1)
120
154
  throw new Error(`FormData arg - ${argMeta.key}/${argMeta.name} must be array`);
121
- return /* @__PURE__ */ React.createElement("div", { className: "flex w-full items-center gap-2" }, /* @__PURE__ */ React.createElement("div", { className: "w-36 pl-2" }, "- ", argMeta.name), /* @__PURE__ */ React.createElement("div", { className: "w-full" }, /* @__PURE__ */ React.createElement(Arg, { argType: "Upload", value, onChange })));
155
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex w-full items-center gap-2", children: [
156
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "w-36 pl-2", children: [
157
+ "- ",
158
+ argMeta.name
159
+ ] }),
160
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "w-full", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Arg, { argType: "Upload", value, onChange }) })
161
+ ] });
122
162
  };
123
163
  Arg.FormData = ArgFormData;
124
164
  const ArgID = ({ value, onChange }) => {
125
- return /* @__PURE__ */ React.createElement(
165
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
126
166
  import_Input.Input,
127
167
  {
128
168
  inputClassName: "w-full",
@@ -136,7 +176,7 @@ const ArgID = ({ value, onChange }) => {
136
176
  };
137
177
  Arg.ID = ArgID;
138
178
  const ArgInt = ({ value, onChange }) => {
139
- return /* @__PURE__ */ React.createElement(
179
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
140
180
  import_Input.Input.Number,
141
181
  {
142
182
  inputClassName: "w-full",
@@ -150,7 +190,7 @@ const ArgInt = ({ value, onChange }) => {
150
190
  };
151
191
  Arg.Int = ArgInt;
152
192
  const ArgFloat = ({ value, onChange }) => {
153
- return /* @__PURE__ */ React.createElement(
193
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
154
194
  import_Input.Input.Number,
155
195
  {
156
196
  inputClassName: "w-full",
@@ -164,7 +204,7 @@ const ArgFloat = ({ value, onChange }) => {
164
204
  };
165
205
  Arg.Float = ArgFloat;
166
206
  const ArgString = ({ value, onChange }) => {
167
- return /* @__PURE__ */ React.createElement(
207
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
168
208
  import_Input.Input,
169
209
  {
170
210
  inputClassName: "w-full",
@@ -178,7 +218,7 @@ const ArgString = ({ value, onChange }) => {
178
218
  };
179
219
  Arg.String = ArgString;
180
220
  const ArgBoolean = ({ value, onChange }) => {
181
- return /* @__PURE__ */ React.createElement(
221
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
182
222
  import_Input.Input.Checkbox,
183
223
  {
184
224
  className: "w-full",
@@ -191,7 +231,7 @@ const ArgBoolean = ({ value, onChange }) => {
191
231
  };
192
232
  Arg.Boolean = ArgBoolean;
193
233
  const ArgDate = ({ value, onChange }) => {
194
- return /* @__PURE__ */ React.createElement(
234
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
195
235
  import_DatePicker.DatePicker,
196
236
  {
197
237
  className: "w-full",
@@ -204,7 +244,7 @@ const ArgDate = ({ value, onChange }) => {
204
244
  };
205
245
  Arg.Date = ArgDate;
206
246
  const ArgJson = ({ value, onChange }) => {
207
- return /* @__PURE__ */ React.createElement(
247
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
208
248
  import_Input.Input.TextArea,
209
249
  {
210
250
  validate: (e) => true,
@@ -222,7 +262,7 @@ const ArgJson = ({ value, onChange }) => {
222
262
  };
223
263
  Arg.Json = ArgJson;
224
264
  const ArgUpload = ({ value, onChange }) => {
225
- return /* @__PURE__ */ React.createElement(
265
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
226
266
  "input",
227
267
  {
228
268
  type: "file",