@admin-layout/tailwind-ui 10.1.1-alpha.8 → 11.2.1-alpha.1

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 (373) hide show
  1. package/README.md +20 -0
  2. package/lib/components/Button/Button.d.ts +13 -0
  3. package/lib/components/Button/Button.d.ts.map +1 -0
  4. package/lib/components/Button/Button.js +49 -0
  5. package/lib/components/Button/Button.js.map +1 -0
  6. package/lib/components/DatePicker/DatePicker.d.ts +5 -0
  7. package/lib/components/DatePicker/DatePicker.d.ts.map +1 -0
  8. package/lib/components/DatePicker/DatePicker.js +200 -0
  9. package/lib/components/DatePicker/DatePicker.js.map +1 -0
  10. package/lib/components/DatePicker/index.d.ts +3 -0
  11. package/lib/components/DatePicker/index.d.ts.map +1 -0
  12. package/lib/components/DatePicker/machine.d.ts +3 -0
  13. package/lib/components/DatePicker/machine.d.ts.map +1 -0
  14. package/lib/components/DatePicker/machine.js +95 -0
  15. package/lib/components/DatePicker/machine.js.map +1 -0
  16. package/lib/components/DatePicker/types.d.ts +34 -0
  17. package/lib/components/DatePicker/types.d.ts.map +1 -0
  18. package/lib/components/DatePicker/utils.d.ts +25 -0
  19. package/lib/components/DatePicker/utils.d.ts.map +1 -0
  20. package/lib/components/DatePicker/utils.js +28 -0
  21. package/lib/components/DatePicker/utils.js.map +1 -0
  22. package/lib/components/ErrorHandlers/ApplicationErrorHandler.d.ts +2 -1
  23. package/lib/components/ErrorHandlers/ApplicationErrorHandler.d.ts.map +1 -1
  24. package/lib/components/ErrorHandlers/ApplicationErrorHandler.js +6 -10
  25. package/lib/components/ErrorHandlers/ApplicationErrorHandler.js.map +1 -1
  26. package/lib/components/ErrorHandlers/ErrorBoundary.d.ts +2 -1
  27. package/lib/components/ErrorHandlers/ErrorBoundary.d.ts.map +1 -1
  28. package/lib/components/ErrorHandlers/ErrorBoundary.js +28 -35
  29. package/lib/components/ErrorHandlers/ErrorBoundary.js.map +1 -1
  30. package/lib/components/ErrorHandlers/LayoutErrorBoundary.d.ts +2 -1
  31. package/lib/components/ErrorHandlers/LayoutErrorBoundary.d.ts.map +1 -1
  32. package/lib/components/ErrorHandlers/LayoutErrorBoundary.js +15 -20
  33. package/lib/components/ErrorHandlers/LayoutErrorBoundary.js.map +1 -1
  34. package/lib/components/ErrorPages/403.d.ts +2 -1
  35. package/lib/components/ErrorPages/403.d.ts.map +1 -1
  36. package/lib/components/ErrorPages/403.js +18 -26
  37. package/lib/components/ErrorPages/403.js.map +1 -1
  38. package/lib/components/ErrorPages/404.d.ts +2 -1
  39. package/lib/components/ErrorPages/404.d.ts.map +1 -1
  40. package/lib/components/ErrorPages/404.js +18 -26
  41. package/lib/components/ErrorPages/404.js.map +1 -1
  42. package/lib/components/ErrorPages/500.d.ts +2 -1
  43. package/lib/components/ErrorPages/500.d.ts.map +1 -1
  44. package/lib/components/ErrorPages/500.js +18 -26
  45. package/lib/components/ErrorPages/500.js.map +1 -1
  46. package/lib/components/LanguageMenuDropdown/LanguageMenuDropdown.d.ts +6 -0
  47. package/lib/components/LanguageMenuDropdown/LanguageMenuDropdown.d.ts.map +1 -0
  48. package/lib/components/LanguageMenuDropdown/LanguageMenuDropdown.js +56 -0
  49. package/lib/components/LanguageMenuDropdown/LanguageMenuDropdown.js.map +1 -0
  50. package/lib/components/LanguageMenuDropdown/index.d.ts +2 -0
  51. package/lib/components/LanguageMenuDropdown/index.d.ts.map +1 -0
  52. package/lib/components/OTP/OTPInput.js +30 -32
  53. package/lib/components/OTP/OTPInput.js.map +1 -1
  54. package/lib/components/OTP/OTPVerification.js +55 -75
  55. package/lib/components/OTP/OTPVerification.js.map +1 -1
  56. package/lib/components/OTP/SingleInput.js +2 -2
  57. package/lib/components/OTP/SingleInput.js.map +1 -1
  58. package/lib/components/OTP/utils.js.map +1 -1
  59. package/lib/components/PageContainer/PageContainer.d.ts.map +1 -1
  60. package/lib/components/PageContainer/PageContainer.js +27 -28
  61. package/lib/components/PageContainer/PageContainer.js.map +1 -1
  62. package/lib/components/PageLoading/index.js +7 -8
  63. package/lib/components/PageLoading/index.js.map +1 -1
  64. package/lib/components/RJSFPreview/PreviewAsyncDropdown.d.ts +12 -0
  65. package/lib/components/RJSFPreview/PreviewAsyncDropdown.d.ts.map +1 -0
  66. package/lib/components/RJSFPreview/PreviewCheckboxWidget.d.ts +8 -0
  67. package/lib/components/RJSFPreview/PreviewCheckboxWidget.d.ts.map +1 -0
  68. package/lib/components/RJSFPreview/PreviewCustomFieldTemplate.d.ts +4 -0
  69. package/lib/components/RJSFPreview/PreviewCustomFieldTemplate.d.ts.map +1 -0
  70. package/lib/components/RJSFPreview/PreviewDateWidget.d.ts +8 -0
  71. package/lib/components/RJSFPreview/PreviewDateWidget.d.ts.map +1 -0
  72. package/lib/components/RJSFPreview/PreviewDialog.d.ts +9 -0
  73. package/lib/components/RJSFPreview/PreviewDialog.d.ts.map +1 -0
  74. package/lib/components/RJSFPreview/PreviewDropdownWidget.d.ts +8 -0
  75. package/lib/components/RJSFPreview/PreviewDropdownWidget.d.ts.map +1 -0
  76. package/lib/components/RJSFPreview/PreviewFieldTemplate.d.ts +4 -0
  77. package/lib/components/RJSFPreview/PreviewFieldTemplate.d.ts.map +1 -0
  78. package/lib/components/RJSFPreview/PreviewFileUploadWidget.d.ts +4 -0
  79. package/lib/components/RJSFPreview/PreviewFileUploadWidget.d.ts.map +1 -0
  80. package/lib/components/RJSFPreview/PreviewFormRenderer.d.ts +16 -0
  81. package/lib/components/RJSFPreview/PreviewFormRenderer.d.ts.map +1 -0
  82. package/lib/components/RJSFPreview/PreviewImageUploadWidget.d.ts +4 -0
  83. package/lib/components/RJSFPreview/PreviewImageUploadWidget.d.ts.map +1 -0
  84. package/lib/components/RJSFPreview/PreviewInputWidget.d.ts +4 -0
  85. package/lib/components/RJSFPreview/PreviewInputWidget.d.ts.map +1 -0
  86. package/lib/components/RJSFPreview/PreviewObjectFieldTemplate.d.ts +4 -0
  87. package/lib/components/RJSFPreview/PreviewObjectFieldTemplate.d.ts.map +1 -0
  88. package/lib/components/RJSFPreview/PreviewRadioWidget.d.ts +8 -0
  89. package/lib/components/RJSFPreview/PreviewRadioWidget.d.ts.map +1 -0
  90. package/lib/components/RJSFPreview/PreviewStepper.d.ts +9 -0
  91. package/lib/components/RJSFPreview/PreviewStepper.d.ts.map +1 -0
  92. package/lib/components/RJSFPreview/PreviewSwitchWidget.d.ts +9 -0
  93. package/lib/components/RJSFPreview/PreviewSwitchWidget.d.ts.map +1 -0
  94. package/lib/components/RJSFPreview/PreviewTab.d.ts +17 -0
  95. package/lib/components/RJSFPreview/PreviewTab.d.ts.map +1 -0
  96. package/lib/components/RJSFPreview/PreviewTextareaWidget.d.ts +8 -0
  97. package/lib/components/RJSFPreview/PreviewTextareaWidget.d.ts.map +1 -0
  98. package/lib/components/RJSFPreview/generateSchemaWithInputs.d.ts +9 -0
  99. package/lib/components/RJSFPreview/generateSchemaWithInputs.d.ts.map +1 -0
  100. package/lib/components/RJSFPreview/index.d.ts +2 -0
  101. package/lib/components/RJSFPreview/index.d.ts.map +1 -0
  102. package/lib/components/ReactTable/Table.d.ts +2 -1
  103. package/lib/components/ReactTable/Table.d.ts.map +1 -1
  104. package/lib/components/ReactTable/Table.js +71 -92
  105. package/lib/components/ReactTable/Table.js.map +1 -1
  106. package/lib/components/ReactTable/TableFilters.d.ts +3 -2
  107. package/lib/components/ReactTable/TableFilters.d.ts.map +1 -1
  108. package/lib/components/ReactTable/TableFilters.js +34 -40
  109. package/lib/components/ReactTable/TableFilters.js.map +1 -1
  110. package/lib/components/Search/SearchInput.d.ts +12 -0
  111. package/lib/components/Search/SearchInput.d.ts.map +1 -0
  112. package/lib/components/Search/SearchInput.js +32 -0
  113. package/lib/components/Search/SearchInput.js.map +1 -0
  114. package/lib/components/Search/index.d.ts +2 -0
  115. package/lib/components/Search/index.d.ts.map +1 -0
  116. package/lib/components/Select/Select.d.ts +35 -0
  117. package/lib/components/Select/Select.d.ts.map +1 -0
  118. package/lib/components/Select/Select.js +242 -0
  119. package/lib/components/Select/Select.js.map +1 -0
  120. package/lib/components/Select/index.d.ts +2 -0
  121. package/lib/components/Select/index.d.ts.map +1 -0
  122. package/lib/components/Spin/index.js +11 -14
  123. package/lib/components/Spin/index.js.map +1 -1
  124. package/lib/components/ThemeProvider/ThemeProvider.d.ts +16 -0
  125. package/lib/components/ThemeProvider/ThemeProvider.d.ts.map +1 -0
  126. package/lib/components/ThemeProvider/ThemeProvider.js +124 -0
  127. package/lib/components/ThemeProvider/ThemeProvider.js.map +1 -0
  128. package/lib/components/ThemeProvider/ThemeToggle.d.ts +7 -0
  129. package/lib/components/ThemeProvider/ThemeToggle.d.ts.map +1 -0
  130. package/lib/components/ThemeProvider/ThemeToggle.js +47 -0
  131. package/lib/components/ThemeProvider/ThemeToggle.js.map +1 -0
  132. package/lib/components/ThemeProvider/index.d.ts +4 -0
  133. package/lib/components/ThemeProvider/index.d.ts.map +1 -0
  134. package/lib/components/ThemeProvider/types.d.ts +27 -0
  135. package/lib/components/ThemeProvider/types.d.ts.map +1 -0
  136. package/lib/components/index.d.ts +6 -0
  137. package/lib/components/index.d.ts.map +1 -1
  138. package/lib/hooks/index.d.ts +5 -0
  139. package/lib/hooks/index.d.ts.map +1 -0
  140. package/lib/hooks/useMediaQuery.d.ts +14 -0
  141. package/lib/hooks/useMediaQuery.d.ts.map +1 -0
  142. package/lib/hooks/useMediaQuery.js +48 -0
  143. package/lib/hooks/useMediaQuery.js.map +1 -0
  144. package/lib/hooks/useTheme.d.ts +2 -0
  145. package/lib/hooks/useTheme.d.ts.map +1 -0
  146. package/lib/hooks/useTheme.js +7 -0
  147. package/lib/hooks/useTheme.js.map +1 -0
  148. package/lib/hooks/useToast.d.ts +1 -1
  149. package/lib/hooks/useToast.d.ts.map +1 -1
  150. package/lib/hooks/useToast.js +37 -46
  151. package/lib/hooks/useToast.js.map +1 -1
  152. package/lib/hooks/useWindowSize.d.ts +5 -0
  153. package/lib/hooks/useWindowSize.d.ts.map +1 -0
  154. package/lib/hooks/useWindowSize.js +20 -0
  155. package/lib/hooks/useWindowSize.js.map +1 -0
  156. package/lib/index.d.ts +2 -1
  157. package/lib/index.d.ts.map +1 -1
  158. package/lib/index.js +1 -1
  159. package/lib/shardui/accordion.d.ts +8 -0
  160. package/lib/shardui/accordion.d.ts.map +1 -0
  161. package/lib/shardui/accordion.js +36 -0
  162. package/lib/shardui/accordion.js.map +1 -0
  163. package/lib/shardui/alert-dialog.d.ts +21 -0
  164. package/lib/shardui/alert-dialog.d.ts.map +1 -0
  165. package/lib/shardui/alert-dialog.js +75 -0
  166. package/lib/shardui/alert-dialog.js.map +1 -0
  167. package/lib/shardui/alert.d.ts +9 -0
  168. package/lib/shardui/alert.d.ts.map +1 -0
  169. package/lib/shardui/alert.js +42 -0
  170. package/lib/shardui/alert.js.map +1 -0
  171. package/lib/shardui/aspect-ratio.d.ts +4 -0
  172. package/lib/shardui/aspect-ratio.d.ts.map +1 -0
  173. package/lib/shardui/aspect-ratio.js +1 -0
  174. package/lib/shardui/aspect-ratio.js.map +1 -0
  175. package/lib/shardui/avatar.d.ts +7 -0
  176. package/lib/shardui/avatar.d.ts.map +1 -0
  177. package/lib/shardui/avatar.js +27 -0
  178. package/lib/shardui/avatar.js.map +1 -0
  179. package/lib/shardui/badge.d.ts +10 -0
  180. package/lib/shardui/badge.d.ts.map +1 -0
  181. package/lib/shardui/badge.js +25 -0
  182. package/lib/shardui/badge.js.map +1 -0
  183. package/lib/shardui/breadcrumb.d.ts +20 -0
  184. package/lib/shardui/breadcrumb.d.ts.map +1 -0
  185. package/lib/shardui/breadcrumb.js +76 -0
  186. package/lib/shardui/breadcrumb.js.map +1 -0
  187. package/lib/shardui/button.d.ts +12 -0
  188. package/lib/shardui/button.d.ts.map +1 -0
  189. package/lib/shardui/button.js +41 -0
  190. package/lib/shardui/button.js.map +1 -0
  191. package/lib/shardui/calendar.d.ts +9 -0
  192. package/lib/shardui/calendar.d.ts.map +1 -0
  193. package/lib/shardui/calendar.js +53 -0
  194. package/lib/shardui/calendar.js.map +1 -0
  195. package/lib/shardui/card.d.ts +9 -0
  196. package/lib/shardui/card.d.ts.map +1 -0
  197. package/lib/shardui/card.js +54 -0
  198. package/lib/shardui/card.js.map +1 -0
  199. package/lib/shardui/carousel.d.ts +19 -0
  200. package/lib/shardui/carousel.d.ts.map +1 -0
  201. package/lib/shardui/carousel.js +169 -0
  202. package/lib/shardui/carousel.js.map +1 -0
  203. package/lib/shardui/chart.d.ts +63 -0
  204. package/lib/shardui/chart.d.ts.map +1 -0
  205. package/lib/shardui/chart.js +182 -0
  206. package/lib/shardui/chart.js.map +1 -0
  207. package/lib/shardui/checkbox.d.ts +5 -0
  208. package/lib/shardui/checkbox.d.ts.map +1 -0
  209. package/lib/shardui/checkbox.js +13 -0
  210. package/lib/shardui/checkbox.js.map +1 -0
  211. package/lib/shardui/collapsible.d.ts +6 -0
  212. package/lib/shardui/collapsible.d.ts.map +1 -0
  213. package/lib/shardui/collapsible.js +3 -0
  214. package/lib/shardui/collapsible.js.map +1 -0
  215. package/lib/shardui/command.d.ts +83 -0
  216. package/lib/shardui/command.d.ts.map +1 -0
  217. package/lib/shardui/command.js +87 -0
  218. package/lib/shardui/command.js.map +1 -0
  219. package/lib/shardui/context-menu.d.ts +28 -0
  220. package/lib/shardui/context-menu.d.ts.map +1 -0
  221. package/lib/shardui/context-menu.js +106 -0
  222. package/lib/shardui/context-menu.js.map +1 -0
  223. package/lib/shardui/dialog.d.ts +20 -0
  224. package/lib/shardui/dialog.d.ts.map +1 -0
  225. package/lib/shardui/dialog.js +62 -0
  226. package/lib/shardui/dialog.js.map +1 -0
  227. package/lib/shardui/drawer.d.ts +23 -0
  228. package/lib/shardui/drawer.d.ts.map +1 -0
  229. package/lib/shardui/drawer.js +66 -0
  230. package/lib/shardui/drawer.js.map +1 -0
  231. package/lib/shardui/dropdown-menu.d.ts +28 -0
  232. package/lib/shardui/dropdown-menu.d.ts.map +1 -0
  233. package/lib/shardui/dropdown-menu.js +108 -0
  234. package/lib/shardui/dropdown-menu.js.map +1 -0
  235. package/lib/shardui/form.d.ts +24 -0
  236. package/lib/shardui/form.d.ts.map +1 -0
  237. package/lib/shardui/form.js +123 -0
  238. package/lib/shardui/form.js.map +1 -0
  239. package/lib/shardui/hover-card.d.ts +7 -0
  240. package/lib/shardui/hover-card.d.ts.map +1 -0
  241. package/lib/shardui/hover-card.js +15 -0
  242. package/lib/shardui/hover-card.js.map +1 -0
  243. package/lib/shardui/index.d.ts +50 -0
  244. package/lib/shardui/index.d.ts.map +1 -0
  245. package/lib/shardui/index.js +1 -0
  246. package/lib/shardui/index.js.map +1 -0
  247. package/lib/shardui/input-otp.d.ts +35 -0
  248. package/lib/shardui/input-otp.d.ts.map +1 -0
  249. package/lib/shardui/input-otp.js +50 -0
  250. package/lib/shardui/input-otp.js.map +1 -0
  251. package/lib/shardui/input.d.ts +4 -0
  252. package/lib/shardui/input.d.ts.map +1 -0
  253. package/lib/shardui/input.js +13 -0
  254. package/lib/shardui/input.js.map +1 -0
  255. package/lib/shardui/label.d.ts +6 -0
  256. package/lib/shardui/label.d.ts.map +1 -0
  257. package/lib/shardui/label.js +10 -0
  258. package/lib/shardui/label.js.map +1 -0
  259. package/lib/shardui/menubar.d.ts +34 -0
  260. package/lib/shardui/menubar.d.ts.map +1 -0
  261. package/lib/shardui/menubar.js +129 -0
  262. package/lib/shardui/menubar.js.map +1 -0
  263. package/lib/shardui/navigation-menu.d.ts +13 -0
  264. package/lib/shardui/navigation-menu.d.ts.map +1 -0
  265. package/lib/shardui/navigation-menu.js +66 -0
  266. package/lib/shardui/navigation-menu.js.map +1 -0
  267. package/lib/shardui/pagination.d.ts +29 -0
  268. package/lib/shardui/pagination.d.ts.map +1 -0
  269. package/lib/shardui/pagination.js +79 -0
  270. package/lib/shardui/pagination.js.map +1 -0
  271. package/lib/shardui/popover.d.ts +7 -0
  272. package/lib/shardui/popover.d.ts.map +1 -0
  273. package/lib/shardui/popover.js +15 -0
  274. package/lib/shardui/popover.js.map +1 -0
  275. package/lib/shardui/progress.d.ts +5 -0
  276. package/lib/shardui/progress.d.ts.map +1 -0
  277. package/lib/shardui/progress.js +15 -0
  278. package/lib/shardui/progress.js.map +1 -0
  279. package/lib/shardui/radio-group.d.ts +6 -0
  280. package/lib/shardui/radio-group.d.ts.map +1 -0
  281. package/lib/shardui/radio-group.js +26 -0
  282. package/lib/shardui/radio-group.js.map +1 -0
  283. package/lib/shardui/resizable.d.ts +25 -0
  284. package/lib/shardui/resizable.d.ts.map +1 -0
  285. package/lib/shardui/resizable.js +20 -0
  286. package/lib/shardui/resizable.js.map +1 -0
  287. package/lib/shardui/scroll-area.d.ts +6 -0
  288. package/lib/shardui/scroll-area.d.ts.map +1 -0
  289. package/lib/shardui/scroll-area.js +25 -0
  290. package/lib/shardui/scroll-area.js.map +1 -0
  291. package/lib/shardui/select.d.ts +14 -0
  292. package/lib/shardui/select.d.ts.map +1 -0
  293. package/lib/shardui/select.js +85 -0
  294. package/lib/shardui/select.js.map +1 -0
  295. package/lib/shardui/separator.d.ts +5 -0
  296. package/lib/shardui/separator.d.ts.map +1 -0
  297. package/lib/shardui/separator.js +13 -0
  298. package/lib/shardui/separator.js.map +1 -0
  299. package/lib/shardui/sheet.d.ts +26 -0
  300. package/lib/shardui/sheet.d.ts.map +1 -0
  301. package/lib/shardui/sheet.js +79 -0
  302. package/lib/shardui/sheet.js.map +1 -0
  303. package/lib/shardui/sidebar.d.ts +67 -0
  304. package/lib/shardui/sidebar.d.ts.map +1 -0
  305. package/lib/shardui/sidebar.js +474 -0
  306. package/lib/shardui/sidebar.js.map +1 -0
  307. package/lib/shardui/skeleton.d.ts +4 -0
  308. package/lib/shardui/skeleton.d.ts.map +1 -0
  309. package/lib/shardui/skeleton.js +9 -0
  310. package/lib/shardui/skeleton.js.map +1 -0
  311. package/lib/shardui/slider.d.ts +5 -0
  312. package/lib/shardui/slider.d.ts.map +1 -0
  313. package/lib/shardui/slider.js +15 -0
  314. package/lib/shardui/slider.js.map +1 -0
  315. package/lib/shardui/sonner.d.ts +6 -0
  316. package/lib/shardui/sonner.d.ts.map +1 -0
  317. package/lib/shardui/sonner.js +20 -0
  318. package/lib/shardui/sonner.js.map +1 -0
  319. package/lib/shardui/switch.d.ts +5 -0
  320. package/lib/shardui/switch.d.ts.map +1 -0
  321. package/lib/shardui/switch.js +11 -0
  322. package/lib/shardui/switch.js.map +1 -0
  323. package/lib/shardui/table.d.ts +11 -0
  324. package/lib/shardui/table.d.ts.map +1 -0
  325. package/lib/shardui/table.js +74 -0
  326. package/lib/shardui/table.js.map +1 -0
  327. package/lib/shardui/tabs.d.ts +8 -0
  328. package/lib/shardui/tabs.d.ts.map +1 -0
  329. package/lib/shardui/tabs.js +28 -0
  330. package/lib/shardui/tabs.js.map +1 -0
  331. package/lib/shardui/textarea.d.ts +6 -0
  332. package/lib/shardui/textarea.d.ts.map +1 -0
  333. package/lib/shardui/textarea.js +11 -0
  334. package/lib/shardui/textarea.js.map +1 -0
  335. package/lib/shardui/toast.d.ts +16 -0
  336. package/lib/shardui/toast.d.ts.map +1 -0
  337. package/lib/shardui/toast.js +74 -0
  338. package/lib/shardui/toast.js.map +1 -0
  339. package/lib/shardui/toaster.d.ts +3 -0
  340. package/lib/shardui/toaster.d.ts.map +1 -0
  341. package/lib/shardui/toaster.js +19 -0
  342. package/lib/shardui/toaster.js.map +1 -0
  343. package/lib/shardui/toggle-group.d.ts +13 -0
  344. package/lib/shardui/toggle-group.d.ts.map +1 -0
  345. package/lib/shardui/toggle-group.js +39 -0
  346. package/lib/shardui/toggle-group.js.map +1 -0
  347. package/lib/shardui/toggle.d.ts +13 -0
  348. package/lib/shardui/toggle.d.ts.map +1 -0
  349. package/lib/shardui/toggle.js +32 -0
  350. package/lib/shardui/toggle.js.map +1 -0
  351. package/lib/shardui/tooltip.d.ts +8 -0
  352. package/lib/shardui/tooltip.d.ts.map +1 -0
  353. package/lib/shardui/tooltip.js +14 -0
  354. package/lib/shardui/tooltip.js.map +1 -0
  355. package/lib/shardui/use-toast.d.ts +3 -0
  356. package/lib/shardui/use-toast.d.ts.map +1 -0
  357. package/lib/utils/hooks/use-mobile.d.ts +2 -0
  358. package/lib/utils/hooks/use-mobile.d.ts.map +1 -0
  359. package/lib/utils/hooks/use-mobile.js +14 -0
  360. package/lib/utils/hooks/use-mobile.js.map +1 -0
  361. package/lib/utils/hooks/use-toast.d.ts +45 -0
  362. package/lib/utils/hooks/use-toast.d.ts.map +1 -0
  363. package/lib/utils/hooks/use-toast.js +133 -0
  364. package/lib/utils/hooks/use-toast.js.map +1 -0
  365. package/lib/utils/index.d.ts +7 -1
  366. package/lib/utils/index.d.ts.map +1 -1
  367. package/lib/utils/isBrowser/index.js +1 -0
  368. package/lib/utils/isBrowser/index.js.map +1 -0
  369. package/lib/utils/util.d.ts +3 -0
  370. package/lib/utils/util.d.ts.map +1 -0
  371. package/lib/utils/util.js +3 -0
  372. package/lib/utils/util.js.map +1 -0
  373. package/package.json +58 -3
@@ -1,4 +1,4 @@
1
- import {jsx,jsxs}from'react/jsx-runtime';import {ErrorBoundaryCommon}from'@admin-layout/client';import*as React from'react';import {useNavigate}from'@remix-run/react';import {logger}from'@cdm-logger/client';import {icons}from'../../icons/index.js';const Fallback = props => {
1
+ import {ErrorBoundaryCommon}from'@admin-layout/client';import*as React from'react';import {useNavigate}from'@remix-run/react';import {logger}from'@cdm-logger/client';import {icons}from'../../icons/index.js';const Fallback = props => {
2
2
  const {
3
3
  error
4
4
  } = props;
@@ -9,40 +9,33 @@ import {jsx,jsxs}from'react/jsx-runtime';import {ErrorBoundaryCommon}from'@admin
9
9
  React.useEffect(() => {
10
10
  logger.trace(error);
11
11
  }, [error]);
12
- return jsxs("div", {
13
- className: "flex items-start p-4 rounded-md bg-red-50 border border-red-200",
14
- children: [jsx("div", {
15
- className: "flex-shrink-0 mr-3 text-red-400",
16
- children: jsx(ExclamationCircleIcon, {
17
- className: "h-5 w-5"
18
- })
19
- }), jsxs("div", {
20
- className: "flex-1",
21
- children: [jsx("h3", {
22
- className: "text-lg font-medium text-red-800",
23
- children: "Error!"
24
- }), jsx("div", {
25
- className: "mt-2 text-sm text-red-700",
26
- children: error?.message
27
- })]
28
- }), jsx("button", {
29
- className: "ml-4 px-4 py-2 bg-red-600 text-white rounded hover:bg-red-700 transition-colors",
30
- onClick: () => {
31
- navigate('/');
32
- /**
33
- * Have to reload the window because the above dispatch will only change the router
34
- * but won't refresh due to which we have to call the reload on location
35
- * Reference: https://stackoverflow.com/questions/63060387/how-do-i-redirect-within-an-errorboundary
36
- */
37
- window.location.reload();
38
- },
39
- children: "Home"
40
- })]
41
- });
12
+ return React.createElement("div", {
13
+ className: "flex items-start p-4 rounded-md bg-red-50 border border-red-200"
14
+ }, React.createElement("div", {
15
+ className: "flex-shrink-0 mr-3 text-red-400"
16
+ }, React.createElement(ExclamationCircleIcon, {
17
+ className: "h-5 w-5"
18
+ })), React.createElement("div", {
19
+ className: "flex-1"
20
+ }, React.createElement("h3", {
21
+ className: "text-lg font-medium text-red-800"
22
+ }, "Error!"), React.createElement("div", {
23
+ className: "mt-2 text-sm text-red-700"
24
+ }, error?.message)), React.createElement("button", {
25
+ className: "ml-4 px-4 py-2 bg-red-600 text-white rounded hover:bg-red-700 transition-colors",
26
+ onClick: () => {
27
+ navigate('/');
28
+ /**
29
+ * Have to reload the window because the above dispatch will only change the router
30
+ * but won't refresh due to which we have to call the reload on location
31
+ * Reference: https://stackoverflow.com/questions/63060387/how-do-i-redirect-within-an-errorboundary
32
+ */
33
+ window.location.reload();
34
+ }
35
+ }, "Home"));
42
36
  };
43
37
  const ErrorBoundary = props => {
44
- return jsx(ErrorBoundaryCommon, {
45
- fallbackComponent: Fallback,
46
- children: props?.children
47
- });
38
+ return React.createElement(ErrorBoundaryCommon, {
39
+ fallbackComponent: Fallback
40
+ }, props?.children);
48
41
  };export{ErrorBoundary};//# sourceMappingURL=ErrorBoundary.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ErrorBoundary.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"ErrorBoundary.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,2 +1,3 @@
1
- export declare const LayoutErrorBoundary: (props: any) => import("react/jsx-runtime").JSX.Element;
1
+ import React from 'react';
2
+ export declare const LayoutErrorBoundary: (props: any) => React.JSX.Element;
2
3
  //# sourceMappingURL=LayoutErrorBoundary.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"LayoutErrorBoundary.d.ts","sourceRoot":"","sources":["../../../src/components/ErrorHandlers/LayoutErrorBoundary.tsx"],"names":[],"mappings":"AAoBA,eAAO,MAAM,mBAAmB,GAAI,UAAK,4CAOxC,CAAC"}
1
+ {"version":3,"file":"LayoutErrorBoundary.d.ts","sourceRoot":"","sources":["../../../src/components/ErrorHandlers/LayoutErrorBoundary.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAoB1B,eAAO,MAAM,mBAAmB,GAAI,UAAK,sBAOxC,CAAC"}
@@ -1,34 +1,29 @@
1
- import {jsx,jsxs}from'react/jsx-runtime';import {ErrorBoundaryCommon}from'@admin-layout/client';import {icons}from'../../icons/index.js';const Fallback = props => {
1
+ import React__default from'react';import {ErrorBoundaryCommon}from'@admin-layout/client';import {icons}from'../../icons/index.js';const Fallback = props => {
2
2
  const {
3
3
  error
4
4
  } = props;
5
5
  const {
6
6
  TimesIcon
7
7
  } = icons;
8
- return jsxs("div", {
9
- className: "flex flex-col items-center justify-center p-8 text-center",
10
- children: [jsx("div", {
11
- className: "mb-4 flex h-16 w-16 items-center justify-center rounded-full bg-red-100",
12
- children: jsx(TimesIcon, {
13
- className: "h-8 w-8 text-red-500"
14
- })
15
- }), jsx("h2", {
16
- className: "mb-2 text-2xl font-bold text-gray-800",
17
- children: "Something Went Wrong!"
18
- }), jsx("p", {
19
- className: "text-gray-600",
20
- children: error?.message || 'Unable to identify the cause of this error. Please try again later!'
21
- })]
22
- });
8
+ return React__default.createElement("div", {
9
+ className: "flex flex-col items-center justify-center p-8 text-center"
10
+ }, React__default.createElement("div", {
11
+ className: "mb-4 flex h-16 w-16 items-center justify-center rounded-full bg-red-100"
12
+ }, React__default.createElement(TimesIcon, {
13
+ className: "h-8 w-8 text-red-500"
14
+ })), React__default.createElement("h2", {
15
+ className: "mb-2 text-2xl font-bold text-gray-800"
16
+ }, "Something Went Wrong!"), React__default.createElement("p", {
17
+ className: "text-gray-600"
18
+ }, error?.message || 'Unable to identify the cause of this error. Please try again later!'));
23
19
  };
24
20
  const LayoutErrorBoundary = props => {
25
21
  const {
26
22
  children,
27
23
  pathname
28
24
  } = props;
29
- return jsx(ErrorBoundaryCommon, {
25
+ return React__default.createElement(ErrorBoundaryCommon, {
30
26
  fallbackComponent: Fallback,
31
- pathname: pathname,
32
- children: children
33
- });
27
+ pathname: pathname
28
+ }, children);
34
29
  };export{LayoutErrorBoundary};//# sourceMappingURL=LayoutErrorBoundary.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"LayoutErrorBoundary.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"LayoutErrorBoundary.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,2 +1,3 @@
1
- export declare const Error403: () => import("react/jsx-runtime").JSX.Element;
1
+ import * as React from 'react';
2
+ export declare const Error403: () => React.JSX.Element;
2
3
  //# sourceMappingURL=403.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"403.d.ts","sourceRoot":"","sources":["../../../src/components/ErrorPages/403.tsx"],"names":[],"mappings":"AAKA,eAAO,MAAM,QAAQ,+CAuBpB,CAAC"}
1
+ {"version":3,"file":"403.d.ts","sourceRoot":"","sources":["../../../src/components/ErrorPages/403.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,eAAO,MAAM,QAAQ,yBAuBpB,CAAC"}
@@ -1,29 +1,21 @@
1
- import {jsx,jsxs}from'react/jsx-runtime';import {useNavigate}from'@remix-run/react';import assets from'@admin-layout/assets';const Error403 = () => {
1
+ import*as React from'react';import {useNavigate}from'@remix-run/react';import assets from'@admin-layout/assets';const Error403 = () => {
2
2
  const navigate = useNavigate();
3
3
  const goBack = () => navigate(-1);
4
- return jsx("div", {
5
- className: "flex justify-center items-center",
6
- children: jsxs("div", {
7
- children: [jsx("div", {
8
- className: "text-center",
9
- children: jsx("h5", {
10
- className: "text-2xl font-bold",
11
- children: "Error: 403 Forbidden"
12
- })
13
- }), jsx("div", {
14
- className: "mt-10",
15
- children: jsx("img", {
16
- src: assets['error-403-540x432.png'],
17
- alt: "403 Error"
18
- })
19
- }), jsx("div", {
20
- className: "flex justify-center",
21
- children: jsx("button", {
22
- className: "mt-8 mb-8 w-64 h-20 bg-yellow-400 rounded-full text-white hover:bg-yellow-500 transition-colors",
23
- onClick: goBack,
24
- children: "Go Home"
25
- })
26
- })]
27
- })
28
- });
4
+ return React.createElement("div", {
5
+ className: "flex justify-center items-center"
6
+ }, React.createElement("div", null, React.createElement("div", {
7
+ className: "text-center"
8
+ }, React.createElement("h5", {
9
+ className: "text-2xl font-bold"
10
+ }, "Error: 403 Forbidden")), React.createElement("div", {
11
+ className: "mt-10"
12
+ }, React.createElement("img", {
13
+ src: assets['error-403-540x432.png'],
14
+ alt: "403 Error"
15
+ })), React.createElement("div", {
16
+ className: "flex justify-center"
17
+ }, React.createElement("button", {
18
+ className: "mt-8 mb-8 w-64 h-20 bg-yellow-400 rounded-full text-white hover:bg-yellow-500 transition-colors",
19
+ onClick: goBack
20
+ }, "Go Home"))));
29
21
  };export{Error403};//# sourceMappingURL=403.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"403.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"403.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;"}
@@ -1,2 +1,3 @@
1
- export declare const Error404: () => import("react/jsx-runtime").JSX.Element;
1
+ import * as React from 'react';
2
+ export declare const Error404: () => React.JSX.Element;
2
3
  //# sourceMappingURL=404.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"404.d.ts","sourceRoot":"","sources":["../../../src/components/ErrorPages/404.tsx"],"names":[],"mappings":"AAKA,eAAO,MAAM,QAAQ,+CAuBpB,CAAC"}
1
+ {"version":3,"file":"404.d.ts","sourceRoot":"","sources":["../../../src/components/ErrorPages/404.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,eAAO,MAAM,QAAQ,yBAuBpB,CAAC"}
@@ -1,29 +1,21 @@
1
- import {jsx,jsxs}from'react/jsx-runtime';import {useNavigate}from'@remix-run/react';import assets from'@admin-layout/assets';const Error404 = () => {
1
+ import*as React from'react';import {useNavigate}from'@remix-run/react';import assets from'@admin-layout/assets';const Error404 = () => {
2
2
  const navigate = useNavigate();
3
3
  const goBack = () => navigate(-1);
4
- return jsx("div", {
5
- className: "flex justify-center items-center",
6
- children: jsxs("div", {
7
- children: [jsx("div", {
8
- className: "text-center",
9
- children: jsx("h5", {
10
- className: "text-2xl font-bold",
11
- children: "Error: 404 Page Not Found"
12
- })
13
- }), jsx("div", {
14
- className: "mt-10",
15
- children: jsx("img", {
16
- src: assets['error-404-540x432.png'],
17
- alt: "404 Error"
18
- })
19
- }), jsx("div", {
20
- className: "flex justify-center",
21
- children: jsx("button", {
22
- className: "mt-8 mb-8 w-64 h-20 bg-yellow-400 rounded-full text-white hover:bg-yellow-500 transition-colors",
23
- onClick: goBack,
24
- children: "Go Home"
25
- })
26
- })]
27
- })
28
- });
4
+ return React.createElement("div", {
5
+ className: "flex justify-center items-center"
6
+ }, React.createElement("div", null, React.createElement("div", {
7
+ className: "text-center"
8
+ }, React.createElement("h5", {
9
+ className: "text-2xl font-bold"
10
+ }, "Error: 404 Page Not Found")), React.createElement("div", {
11
+ className: "mt-10"
12
+ }, React.createElement("img", {
13
+ src: assets['error-404-540x432.png'],
14
+ alt: "404 Error"
15
+ })), React.createElement("div", {
16
+ className: "flex justify-center"
17
+ }, React.createElement("button", {
18
+ className: "mt-8 mb-8 w-64 h-20 bg-yellow-400 rounded-full text-white hover:bg-yellow-500 transition-colors",
19
+ onClick: goBack
20
+ }, "Go Home"))));
29
21
  };export{Error404};//# sourceMappingURL=404.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"404.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"404.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;"}
@@ -1,2 +1,3 @@
1
- export declare const Error500: () => import("react/jsx-runtime").JSX.Element;
1
+ import * as React from 'react';
2
+ export declare const Error500: () => React.JSX.Element;
2
3
  //# sourceMappingURL=500.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"500.d.ts","sourceRoot":"","sources":["../../../src/components/ErrorPages/500.tsx"],"names":[],"mappings":"AAKA,eAAO,MAAM,QAAQ,+CAuBpB,CAAC"}
1
+ {"version":3,"file":"500.d.ts","sourceRoot":"","sources":["../../../src/components/ErrorPages/500.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,eAAO,MAAM,QAAQ,yBAuBpB,CAAC"}
@@ -1,29 +1,21 @@
1
- import {jsx,jsxs}from'react/jsx-runtime';import {useNavigate}from'@remix-run/react';import assets from'@admin-layout/assets';const Error500 = () => {
1
+ import*as React from'react';import {useNavigate}from'@remix-run/react';import assets from'@admin-layout/assets';const Error500 = () => {
2
2
  const navigate = useNavigate();
3
3
  const goBack = () => navigate(-1);
4
- return jsx("div", {
5
- className: "flex justify-center items-center",
6
- children: jsxs("div", {
7
- children: [jsx("div", {
8
- className: "text-center",
9
- children: jsx("h5", {
10
- className: "text-2xl font-bold",
11
- children: "Error: 500 Unexpected Error"
12
- })
13
- }), jsx("div", {
14
- className: "mt-10",
15
- children: jsx("img", {
16
- src: assets['error-500-252x475.png'],
17
- alt: "500 Error"
18
- })
19
- }), jsx("div", {
20
- className: "flex justify-center",
21
- children: jsx("button", {
22
- className: "mt-8 mb-8 w-64 h-20 bg-yellow-400 rounded-full text-white hover:bg-yellow-500 transition-colors",
23
- onClick: goBack,
24
- children: "Go Home"
25
- })
26
- })]
27
- })
28
- });
4
+ return React.createElement("div", {
5
+ className: "flex justify-center items-center"
6
+ }, React.createElement("div", null, React.createElement("div", {
7
+ className: "text-center"
8
+ }, React.createElement("h5", {
9
+ className: "text-2xl font-bold"
10
+ }, "Error: 500 Unexpected Error")), React.createElement("div", {
11
+ className: "mt-10"
12
+ }, React.createElement("img", {
13
+ src: assets['error-500-252x475.png'],
14
+ alt: "500 Error"
15
+ })), React.createElement("div", {
16
+ className: "flex justify-center"
17
+ }, React.createElement("button", {
18
+ className: "mt-8 mb-8 w-64 h-20 bg-yellow-400 rounded-full text-white hover:bg-yellow-500 transition-colors",
19
+ onClick: goBack
20
+ }, "Go Home"))));
29
21
  };export{Error500};//# sourceMappingURL=500.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"500.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"500.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ export declare const LanguageMenuDropdown: ({ className, i18nConfig }: {
3
+ className?: string;
4
+ i18nConfig?: any;
5
+ }) => React.JSX.Element;
6
+ //# sourceMappingURL=LanguageMenuDropdown.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LanguageMenuDropdown.d.ts","sourceRoot":"","sources":["../../../src/components/LanguageMenuDropdown/LanguageMenuDropdown.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAOnD,eAAO,MAAM,oBAAoB,GAAI,2BAA2B;IAAE,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE,GAAG,CAAA;CAAE,sBAmDvG,CAAC"}
@@ -0,0 +1,56 @@
1
+ import React__default,{useState,useEffect}from'react';import {useTranslation}from'react-i18next';import {useMediaQuery}from'../../hooks/useMediaQuery.js';import {languages,useLayoutSettings}from'@admin-layout/client';import'../../utils/isBrowser/index.js';import {cn}from'../../utils/util.js';import'fast-deep-equal/react.js';const LanguageMenuDropdown = ({
2
+ className,
3
+ i18nConfig
4
+ }) => {
5
+ const {
6
+ i18n
7
+ } = useTranslation();
8
+ const {
9
+ i18n: i18nextInstance
10
+ } = i18nConfig;
11
+ const filteredLanguages = languages.filter(language => i18nextInstance.supportedLngs.includes(language.key));
12
+ const {
13
+ isMobile
14
+ } = useMediaQuery();
15
+ const {
16
+ settings,
17
+ setSettings
18
+ } = useLayoutSettings();
19
+ const [currentLang, setCurrentLang] = useState(filteredLanguages.find(language => language.key === settings.language) || {
20
+ key: 'en',
21
+ label: 'English',
22
+ flag: '🇬🇧',
23
+ global: true
24
+ });
25
+ useEffect(() => {
26
+ i18n.changeLanguage(settings.language);
27
+ }, []);
28
+ const handleLanguageChange = value => {
29
+ const language = filteredLanguages.find(lang => lang.key === value);
30
+ if (language) {
31
+ setCurrentLang(language);
32
+ i18n.changeLanguage(language.key);
33
+ setSettings(settings, {
34
+ language: language.key
35
+ });
36
+ }
37
+ };
38
+ return React__default.createElement("div", {
39
+ className: "relative"
40
+ }, React__default.createElement("div", {
41
+ className: "custom-select-container w-[180px]"
42
+ }, React__default.createElement("select", {
43
+ className: cn('w-full h-10 rounded-md outline-none border border-input bg-background px-3 py-2 pl-10 text-sm ring-offset-background focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 appearance-none cursor-pointer', className),
44
+ value: currentLang.key,
45
+ onChange: e => handleLanguageChange(e.target.value),
46
+ "aria-label": "Select language"
47
+ }, filteredLanguages.map(language => React__default.createElement("option", {
48
+ key: language.key,
49
+ value: language.key,
50
+ className: "p-2"
51
+ }, React__default.createElement("div", {
52
+ className: "p-2"
53
+ }, React__default.createElement("span", {
54
+ className: "text-sm"
55
+ }, isMobile ? language.key : language.label)))))));
56
+ };export{LanguageMenuDropdown};//# sourceMappingURL=LanguageMenuDropdown.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LanguageMenuDropdown.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,2 @@
1
+ export * from './LanguageMenuDropdown';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/LanguageMenuDropdown/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC"}
@@ -1,4 +1,4 @@
1
- import {jsx,jsxs}from'react/jsx-runtime';import React__default from'react';import {useOTPInput}from'./hooks.js';import {SingleInput}from'./SingleInput.js';import {getPlaceholderValue,isInputNumeric}from'./utils.js';const OTPInput = ({
1
+ import React__default from'react';import {useOTPInput}from'./hooks.js';import {SingleInput}from'./SingleInput.js';import {getPlaceholderValue,isInputNumeric}from'./utils.js';const OTPInput = ({
2
2
  value = '',
3
3
  numInputs = 4,
4
4
  onChange,
@@ -23,7 +23,7 @@ import {jsx,jsxs}from'react/jsx-runtime';import React__default from'react';impor
23
23
  handlePaste
24
24
  }, inputRefs] = useOTPInput(value, numInputs, onChange, inputType, shouldAutoFocus);
25
25
  // Create default input renderer if not provided
26
- const defaultRenderInput = (props, index) => jsx(SingleInput, {
26
+ const defaultRenderInput = (props, index) => React__default.createElement(SingleInput, {
27
27
  ...props,
28
28
  focused: activeInput === index
29
29
  });
@@ -47,36 +47,34 @@ import {jsx,jsxs}from'react/jsx-runtime';import React__default from'react';impor
47
47
  // Let the hook handle the paste logic
48
48
  handlePaste(e);
49
49
  };
50
- return jsx("div", {
50
+ return React__default.createElement("div", {
51
51
  className: `flex items-center justify-center space-x-2 md:space-x-4 ${containerClassName || ''}`,
52
52
  onPaste: handleComponentPaste,
53
- "data-testid": "otp-input-container",
54
- children: Array.from({
55
- length: numInputs
56
- }, (_, index) => jsxs(React__default.Fragment, {
57
- children: [inputRenderer({
58
- value: otp[index] || '',
59
- placeholder: placeholderValue?.[index],
60
- ref: element => {
61
- if (inputRefs.current) {
62
- inputRefs.current[index] = element;
63
- }
64
- },
65
- onChange: handleChange,
66
- onFocus: event => handleFocus(event)(index),
67
- onBlur: handleBlur,
68
- onKeyDown: handleKeyDown,
69
- onPaste: handlePaste,
70
- autoComplete: 'off',
71
- 'aria-label': `Please enter OTP character ${index + 1}`,
72
- className: skipDefaultStyles ? inputClassName || '' : `${inputClassName || ''}`,
73
- type: inputType,
74
- inputMode: isInputNum ? 'numeric' : 'text',
75
- onInput: handleInputChange
76
- }, index), index < numInputs - 1 && (typeof renderSeparator === 'function' ? renderSeparator(index) : renderSeparator || jsx("span", {
77
- className: "text-gray-400",
78
- children: "-"
79
- }))]
80
- }, index))
81
- });
53
+ "data-testid": "otp-input-container"
54
+ }, Array.from({
55
+ length: numInputs
56
+ }, (_, index) => React__default.createElement(React__default.Fragment, {
57
+ key: index
58
+ }, inputRenderer({
59
+ value: otp[index] || '',
60
+ placeholder: placeholderValue?.[index],
61
+ ref: element => {
62
+ if (inputRefs.current) {
63
+ inputRefs.current[index] = element;
64
+ }
65
+ },
66
+ onChange: handleChange,
67
+ onFocus: event => handleFocus(event)(index),
68
+ onBlur: handleBlur,
69
+ onKeyDown: handleKeyDown,
70
+ onPaste: handlePaste,
71
+ autoComplete: 'off',
72
+ 'aria-label': `Please enter OTP character ${index + 1}`,
73
+ className: skipDefaultStyles ? inputClassName || '' : `${inputClassName || ''}`,
74
+ type: inputType,
75
+ inputMode: isInputNum ? 'numeric' : 'text',
76
+ onInput: handleInputChange
77
+ }, index), index < numInputs - 1 && (typeof renderSeparator === 'function' ? renderSeparator(index) : renderSeparator || React__default.createElement("span", {
78
+ className: "text-gray-400"
79
+ }, "-")))));
82
80
  };export{OTPInput};//# sourceMappingURL=OTPInput.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"OTPInput.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"OTPInput.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}