@deweb.id/ui-kit 0.0.0-stage → 0.1.0

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 (408) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +90 -2
  3. package/css/ui-kit.css +901 -0
  4. package/dist/chunk-028rzptn.js +253 -0
  5. package/dist/chunk-028rzptn.js.map +10 -0
  6. package/dist/chunk-0x0et52k.js +82 -0
  7. package/dist/chunk-0x0et52k.js.map +10 -0
  8. package/dist/chunk-17gmkyd1.js +195 -0
  9. package/dist/chunk-17gmkyd1.js.map +10 -0
  10. package/dist/chunk-19jsevr8.js +17 -0
  11. package/dist/chunk-19jsevr8.js.map +10 -0
  12. package/dist/chunk-1t1fbbme.js +171 -0
  13. package/dist/chunk-1t1fbbme.js.map +10 -0
  14. package/dist/chunk-26ban96z.js +151 -0
  15. package/dist/chunk-26ban96z.js.map +10 -0
  16. package/dist/chunk-39hey5ns.js +2034 -0
  17. package/dist/chunk-39hey5ns.js.map +19 -0
  18. package/dist/chunk-3f0bjycv.js +481 -0
  19. package/dist/chunk-3f0bjycv.js.map +10 -0
  20. package/dist/chunk-3zpf64v4.js +108 -0
  21. package/dist/chunk-3zpf64v4.js.map +10 -0
  22. package/dist/chunk-4jrq15v9.js +919 -0
  23. package/dist/chunk-4jrq15v9.js.map +10 -0
  24. package/dist/chunk-8dacesjp.js +289 -0
  25. package/dist/chunk-8dacesjp.js.map +10 -0
  26. package/dist/chunk-8een770x.js +2546 -0
  27. package/dist/chunk-8een770x.js.map +29 -0
  28. package/dist/chunk-8jv2g2ne.js +371 -0
  29. package/dist/chunk-8jv2g2ne.js.map +10 -0
  30. package/dist/chunk-abdqb4e5.js +156 -0
  31. package/dist/chunk-abdqb4e5.js.map +10 -0
  32. package/dist/chunk-af27xdf2.js +891 -0
  33. package/dist/chunk-af27xdf2.js.map +11 -0
  34. package/dist/chunk-amsyqyh9.js +23 -0
  35. package/dist/chunk-amsyqyh9.js.map +9 -0
  36. package/dist/chunk-czbcw9e1.js +503 -0
  37. package/dist/chunk-czbcw9e1.js.map +11 -0
  38. package/dist/chunk-dar8mz91.js +73 -0
  39. package/dist/chunk-dar8mz91.js.map +10 -0
  40. package/dist/chunk-dsddmmdk.js +136 -0
  41. package/dist/chunk-dsddmmdk.js.map +10 -0
  42. package/dist/chunk-edx7tas6.js +89 -0
  43. package/dist/chunk-edx7tas6.js.map +10 -0
  44. package/dist/chunk-es4tgmvr.js +1686 -0
  45. package/dist/chunk-es4tgmvr.js.map +12 -0
  46. package/dist/chunk-f2aqj672.js +240 -0
  47. package/dist/chunk-f2aqj672.js.map +11 -0
  48. package/dist/chunk-h6k57hyd.js +146 -0
  49. package/dist/chunk-h6k57hyd.js.map +10 -0
  50. package/dist/chunk-hkx78qgj.js +1548 -0
  51. package/dist/chunk-hkx78qgj.js.map +12 -0
  52. package/dist/chunk-hq57r97c.js +770 -0
  53. package/dist/chunk-hq57r97c.js.map +11 -0
  54. package/dist/chunk-jct2e2h1.js +139 -0
  55. package/dist/chunk-jct2e2h1.js.map +10 -0
  56. package/dist/chunk-je0j5sn4.js +246 -0
  57. package/dist/chunk-je0j5sn4.js.map +10 -0
  58. package/dist/chunk-k2b698v5.js +754 -0
  59. package/dist/chunk-k2b698v5.js.map +12 -0
  60. package/dist/chunk-kv58555q.js +267 -0
  61. package/dist/chunk-kv58555q.js.map +11 -0
  62. package/dist/chunk-m0msvrte.js +15 -0
  63. package/dist/chunk-m0msvrte.js.map +10 -0
  64. package/dist/chunk-m3t14v77.js +30 -0
  65. package/dist/chunk-m3t14v77.js.map +10 -0
  66. package/dist/chunk-mctp30cp.js +1466 -0
  67. package/dist/chunk-mctp30cp.js.map +10 -0
  68. package/dist/chunk-n37qb5m5.js +1408 -0
  69. package/dist/chunk-n37qb5m5.js.map +10 -0
  70. package/dist/chunk-nhhgsdt3.js +570 -0
  71. package/dist/chunk-nhhgsdt3.js.map +11 -0
  72. package/dist/chunk-pxydj130.js +28 -0
  73. package/dist/chunk-pxydj130.js.map +10 -0
  74. package/dist/chunk-qmbwp4k7.js +3275 -0
  75. package/dist/chunk-qmbwp4k7.js.map +13 -0
  76. package/dist/chunk-qzxf0aa2.js +149 -0
  77. package/dist/chunk-qzxf0aa2.js.map +10 -0
  78. package/dist/chunk-rbjyp9ff.js +47 -0
  79. package/dist/chunk-rbjyp9ff.js.map +10 -0
  80. package/dist/chunk-rbkc50xg.js +103 -0
  81. package/dist/chunk-rbkc50xg.js.map +10 -0
  82. package/dist/chunk-rn6f0s6x.js +66 -0
  83. package/dist/chunk-rn6f0s6x.js.map +9 -0
  84. package/dist/chunk-rswzbfa2.js +422 -0
  85. package/dist/chunk-rswzbfa2.js.map +10 -0
  86. package/dist/chunk-rzns0reg.js +157 -0
  87. package/dist/chunk-rzns0reg.js.map +10 -0
  88. package/dist/chunk-s851vtje.js +90 -0
  89. package/dist/chunk-s851vtje.js.map +10 -0
  90. package/dist/chunk-vak164kx.js +15 -0
  91. package/dist/chunk-vak164kx.js.map +9 -0
  92. package/dist/chunk-vpvnvegz.js +480 -0
  93. package/dist/chunk-vpvnvegz.js.map +10 -0
  94. package/dist/chunk-x4pk7vxm.js +10 -0
  95. package/dist/chunk-x4pk7vxm.js.map +10 -0
  96. package/dist/chunk-xd2fwgek.js +53 -0
  97. package/dist/chunk-xd2fwgek.js.map +10 -0
  98. package/dist/chunk-y71rd8qf.js +499 -0
  99. package/dist/chunk-y71rd8qf.js.map +10 -0
  100. package/dist/chunk-zjmt193s.js +34 -0
  101. package/dist/chunk-zjmt193s.js.map +9 -0
  102. package/dist/components/blocks/CustomHtmlBlock.d.ts +14 -0
  103. package/dist/components/blocks/LoginFormBlock.d.ts +16 -0
  104. package/dist/components/blocks/SidebarMenuBlock.d.ts +11 -0
  105. package/dist/components/blocks/SliderBlock.d.ts +13 -0
  106. package/dist/components/code/code-editor.d.ts +58 -0
  107. package/dist/components/code/code-preview.d.ts +18 -0
  108. package/dist/components/code/index.d.ts +4 -0
  109. package/dist/components/code/validator.d.ts +10 -0
  110. package/dist/components/code/vsc-themes.d.ts +6 -0
  111. package/dist/components/dashboard/compound/context.d.ts +14 -0
  112. package/dist/components/dashboard/compound/dashboard.d.ts +14 -0
  113. package/dist/components/dashboard/compound/index.d.ts +18 -0
  114. package/dist/components/dashboard/compound/main.d.ts +25 -0
  115. package/dist/components/dashboard/compound/sidebar.d.ts +5 -0
  116. package/dist/components/dashboard/dashboard-head-info.d.ts +38 -0
  117. package/dist/components/dashboard/dashboard-head.d.ts +19 -0
  118. package/dist/components/dashboard/dataview.d.ts +19 -0
  119. package/dist/components/dashboard/detailview.d.ts +1 -0
  120. package/dist/components/dashboard/formview.d.ts +265 -0
  121. package/dist/components/dashboard/pageformview.d.ts +79 -0
  122. package/dist/components/dashboard/styling/background-color-control.d.ts +34 -0
  123. package/dist/components/dashboard/styling/background-control.d.ts +45 -0
  124. package/dist/components/dashboard/styling/border-control.d.ts +14 -0
  125. package/dist/components/dashboard/styling/color-control.d.ts +22 -0
  126. package/dist/components/dashboard/styling/index.d.ts +7 -0
  127. package/dist/components/dashboard/styling/radius-control.d.ts +15 -0
  128. package/dist/components/dashboard/styling/spacing-control.d.ts +17 -0
  129. package/dist/components/dashboard/styling/types.d.ts +50 -0
  130. package/dist/components/document/index.d.ts +25 -0
  131. package/dist/components/ecommerce/commerce-cards.d.ts +37 -0
  132. package/dist/components/effect/action-animation.d.ts +14 -0
  133. package/dist/components/effect/element-animation.d.ts +41 -0
  134. package/dist/components/effect/page-transition.d.ts +10 -0
  135. package/dist/components/layout/BlockPalette.d.ts +14 -0
  136. package/dist/components/layout/DynamicLayout.d.ts +56 -0
  137. package/dist/components/layout/GridRow.d.ts +37 -0
  138. package/dist/components/layout/LayoutBuilder.d.ts +52 -0
  139. package/dist/components/layout/WidgetFieldsForm.d.ts +15 -0
  140. package/dist/components/ui/accordion.d.ts +36 -0
  141. package/dist/components/ui/action-bar.d.ts +46 -0
  142. package/dist/components/ui/alert.d.ts +25 -0
  143. package/dist/components/ui/animated.d.ts +41 -0
  144. package/dist/components/ui/app-shell.d.ts +53 -0
  145. package/dist/components/ui/avatar.d.ts +18 -0
  146. package/dist/components/ui/badge.d.ts +15 -0
  147. package/dist/components/ui/breadcrumb.d.ts +20 -0
  148. package/dist/components/ui/button-icon.d.ts +9 -0
  149. package/dist/components/ui/button.d.ts +37 -0
  150. package/dist/components/ui/calendar.d.ts +14 -0
  151. package/dist/components/ui/card-skeleton-aware.d.ts +2 -0
  152. package/dist/components/ui/card.d.ts +36 -0
  153. package/dist/components/ui/chart.d.ts +75 -0
  154. package/dist/components/ui/chat-bubble.d.ts +74 -0
  155. package/dist/components/ui/code.d.ts +85 -0
  156. package/dist/components/ui/code.js +21 -0
  157. package/dist/components/ui/code.js.map +9 -0
  158. package/dist/components/ui/collapsible.d.ts +25 -0
  159. package/dist/components/ui/control-group.d.ts +39 -0
  160. package/dist/components/ui/dashboard-grid/DashboardDropSlot.d.ts +10 -0
  161. package/dist/components/ui/dashboard-grid/DashboardGrid.d.ts +5 -0
  162. package/dist/components/ui/dashboard-grid/DashboardWidgetCard.d.ts +43 -0
  163. package/dist/components/ui/dashboard-grid/useDashboardDnd.d.ts +36 -0
  164. package/dist/components/ui/data-empty.d.ts +24 -0
  165. package/dist/components/ui/data-list.d.ts +16 -0
  166. package/dist/components/ui/data-table.d.ts +48 -0
  167. package/dist/components/ui/data-view/DataView.d.ts +46 -0
  168. package/dist/components/ui/data-view/DataViewCalendar.d.ts +18 -0
  169. package/dist/components/ui/data-view/DataViewContent.d.ts +5 -0
  170. package/dist/components/ui/data-view/DataViewFilter.d.ts +8 -0
  171. package/dist/components/ui/data-view/DataViewGrid.d.ts +32 -0
  172. package/dist/components/ui/data-view/DataViewHeader.d.ts +22 -0
  173. package/dist/components/ui/data-view/DataViewKanban.d.ts +16 -0
  174. package/dist/components/ui/data-view/DataViewPivot.d.ts +15 -0
  175. package/dist/components/ui/data-view/DataViewTable.d.ts +33 -0
  176. package/dist/components/ui/data-view/index.d.ts +9 -0
  177. package/dist/components/ui/date-time-picker.d.ts +205 -0
  178. package/dist/components/ui/drawer.d.ts +71 -0
  179. package/dist/components/ui/dropdown-animation.d.ts +7 -0
  180. package/dist/components/ui/dropdown.d.ts +71 -0
  181. package/dist/components/ui/error-state.d.ts +15 -0
  182. package/dist/components/ui/filter-bar.d.ts +50 -0
  183. package/dist/components/ui/filter-bar.js +19 -0
  184. package/dist/components/ui/filter-bar.js.map +9 -0
  185. package/dist/components/ui/font.d.ts +24 -0
  186. package/dist/components/ui/form-advanced.d.ts +198 -0
  187. package/dist/components/ui/form-compound.d.ts +58 -0
  188. package/dist/components/ui/form-context.d.ts +19 -0
  189. package/dist/components/ui/form.d.ts +451 -0
  190. package/dist/components/ui/format-currency.d.ts +10 -0
  191. package/dist/components/ui/format-date.d.ts +28 -0
  192. package/dist/components/ui/format-number.d.ts +22 -0
  193. package/dist/components/ui/format-time.d.ts +5 -0
  194. package/dist/components/ui/grid.d.ts +30 -0
  195. package/dist/components/ui/heading.d.ts +9 -0
  196. package/dist/components/ui/indicator.d.ts +17 -0
  197. package/dist/components/ui/initial-icon.d.ts +11 -0
  198. package/dist/components/ui/input-code.d.ts +27 -0
  199. package/dist/components/ui/input-grid.d.ts +54 -0
  200. package/dist/components/ui/input.d.ts +37 -0
  201. package/dist/components/ui/invoice-blocks.d.ts +124 -0
  202. package/dist/components/ui/invoice-document.d.ts +63 -0
  203. package/dist/components/ui/kanban.d.ts +16 -0
  204. package/dist/components/ui/label.d.ts +4 -0
  205. package/dist/components/ui/lazy-load.d.ts +13 -0
  206. package/dist/components/ui/lightbox.d.ts +15 -0
  207. package/dist/components/ui/list.d.ts +33 -0
  208. package/dist/components/ui/loading.d.ts +79 -0
  209. package/dist/components/ui/media-card.d.ts +50 -0
  210. package/dist/components/ui/media-player.d.ts +47 -0
  211. package/dist/components/ui/menu.d.ts +24 -0
  212. package/dist/components/ui/modal.d.ts +233 -0
  213. package/dist/components/ui/page.d.ts +51 -0
  214. package/dist/components/ui/pagination.d.ts +16 -0
  215. package/dist/components/ui/print.d.ts +173 -0
  216. package/dist/components/ui/project-card.d.ts +43 -0
  217. package/dist/components/ui/radius-control.d.ts +36 -0
  218. package/dist/components/ui/rich-text-editor.d.ts +32 -0
  219. package/dist/components/ui/select-card.d.ts +56 -0
  220. package/dist/components/ui/sidebar-logo.d.ts +11 -0
  221. package/dist/components/ui/sidebar-menu.d.ts +82 -0
  222. package/dist/components/ui/sidebar-search.d.ts +7 -0
  223. package/dist/components/ui/skeletons.d.ts +46 -0
  224. package/dist/components/ui/surface.d.ts +13 -0
  225. package/dist/components/ui/table-pivot.d.ts +10 -0
  226. package/dist/components/ui/table.d.ts +258 -0
  227. package/dist/components/ui/tabs.d.ts +79 -0
  228. package/dist/components/ui/task-board.d.ts +29 -0
  229. package/dist/components/ui/terminal.d.ts +51 -0
  230. package/dist/components/ui/text-sensor.d.ts +9 -0
  231. package/dist/components/ui/theme-styler.d.ts +3 -0
  232. package/dist/components/ui/theme-toggle.d.ts +23 -0
  233. package/dist/components/ui/tooltip.d.ts +11 -0
  234. package/dist/components/website/account-banner.d.ts +11 -0
  235. package/dist/components/website/account-layout.d.ts +20 -0
  236. package/dist/components/website/account.d.ts +46 -0
  237. package/dist/components/website/ambient.d.ts +19 -0
  238. package/dist/components/website/auth.d.ts +35 -0
  239. package/dist/components/website/blog/blog-list-custom.d.ts +3 -0
  240. package/dist/components/website/blog/blog-list-gallery.d.ts +2 -0
  241. package/dist/components/website/blog/blog-list-grid.d.ts +2 -0
  242. package/dist/components/website/blog/blog-list-list.d.ts +2 -0
  243. package/dist/components/website/blog.d.ts +50 -0
  244. package/dist/components/website/carousel.d.ts +58 -0
  245. package/dist/components/website/cart.d.ts +31 -0
  246. package/dist/components/website/catalogue-view.d.ts +81 -0
  247. package/dist/components/website/catalogue.d.ts +96 -0
  248. package/dist/components/website/comment.d.ts +52 -0
  249. package/dist/components/website/eclipse.d.ts +15 -0
  250. package/dist/components/website/feature-grid.d.ts +58 -0
  251. package/dist/components/website/filter.d.ts +109 -0
  252. package/dist/components/website/hero.d.ts +89 -0
  253. package/dist/components/website/localize.d.ts +36 -0
  254. package/dist/components/website/logo.d.ts +24 -0
  255. package/dist/components/website/megamenu.d.ts +10 -0
  256. package/dist/components/website/navbar.d.ts +42 -0
  257. package/dist/components/website/notification.d.ts +58 -0
  258. package/dist/components/website/price.d.ts +26 -0
  259. package/dist/components/website/pricing.d.ts +21 -0
  260. package/dist/components/website/product.d.ts +32 -0
  261. package/dist/components/website/rating.d.ts +36 -0
  262. package/dist/components/website/review-form.d.ts +54 -0
  263. package/dist/components/website/reviews.d.ts +119 -0
  264. package/dist/components/website/search.d.ts +30 -0
  265. package/dist/entries/accordion.d.ts +1 -0
  266. package/dist/entries/accordion.js +9 -0
  267. package/dist/entries/accordion.js.map +9 -0
  268. package/dist/entries/alert.d.ts +1 -0
  269. package/dist/entries/alert.js +10 -0
  270. package/dist/entries/alert.js.map +9 -0
  271. package/dist/entries/badge.d.ts +1 -0
  272. package/dist/entries/badge.js +11 -0
  273. package/dist/entries/badge.js.map +9 -0
  274. package/dist/entries/breadcrumb.d.ts +1 -0
  275. package/dist/entries/breadcrumb.js +10 -0
  276. package/dist/entries/breadcrumb.js.map +9 -0
  277. package/dist/entries/button.d.ts +1 -0
  278. package/dist/entries/button.js +12 -0
  279. package/dist/entries/button.js.map +9 -0
  280. package/dist/entries/card.d.ts +1 -0
  281. package/dist/entries/card.js +25 -0
  282. package/dist/entries/card.js.map +9 -0
  283. package/dist/entries/chart.d.ts +1 -0
  284. package/dist/entries/chart.js +130 -0
  285. package/dist/entries/chart.js.map +10 -0
  286. package/dist/entries/components.d.ts +53 -0
  287. package/dist/entries/components.js +643 -0
  288. package/dist/entries/components.js.map +9 -0
  289. package/dist/entries/dashboard/dataview.d.ts +1 -0
  290. package/dist/entries/dashboard/dataview.js +82 -0
  291. package/dist/entries/dashboard/dataview.js.map +10 -0
  292. package/dist/entries/dashboard/pageformview.d.ts +1 -0
  293. package/dist/entries/dashboard/pageformview.js +34 -0
  294. package/dist/entries/dashboard/pageformview.js.map +9 -0
  295. package/dist/entries/data-table.d.ts +1 -0
  296. package/dist/entries/data-table.js +22 -0
  297. package/dist/entries/data-table.js.map +9 -0
  298. package/dist/entries/date-time-picker.d.ts +1 -0
  299. package/dist/entries/date-time-picker.js +28 -0
  300. package/dist/entries/date-time-picker.js.map +9 -0
  301. package/dist/entries/document.d.ts +1 -0
  302. package/dist/entries/document.js +69 -0
  303. package/dist/entries/document.js.map +10 -0
  304. package/dist/entries/drawer.d.ts +1 -0
  305. package/dist/entries/drawer.js +20 -0
  306. package/dist/entries/drawer.js.map +9 -0
  307. package/dist/entries/dropdown.d.ts +1 -0
  308. package/dist/entries/dropdown.js +29 -0
  309. package/dist/entries/dropdown.js.map +9 -0
  310. package/dist/entries/error-state.d.ts +1 -0
  311. package/dist/entries/error-state.js +14 -0
  312. package/dist/entries/error-state.js.map +9 -0
  313. package/dist/entries/favorite-button.d.ts +1 -0
  314. package/dist/entries/favorite-button.js +7 -0
  315. package/dist/entries/favorite-button.js.map +10 -0
  316. package/dist/entries/font.d.ts +1 -0
  317. package/dist/entries/font.js +10 -0
  318. package/dist/entries/font.js.map +9 -0
  319. package/dist/entries/form-advanced.d.ts +1 -0
  320. package/dist/entries/form-advanced.js +39 -0
  321. package/dist/entries/form-advanced.js.map +9 -0
  322. package/dist/entries/form.d.ts +1 -0
  323. package/dist/entries/form.js +74 -0
  324. package/dist/entries/form.js.map +9 -0
  325. package/dist/entries/heading.d.ts +1 -0
  326. package/dist/entries/heading.js +8 -0
  327. package/dist/entries/heading.js.map +9 -0
  328. package/dist/entries/input.d.ts +1 -0
  329. package/dist/entries/input.js +11 -0
  330. package/dist/entries/input.js.map +9 -0
  331. package/dist/entries/layout.d.ts +4 -0
  332. package/dist/entries/layout.js +101 -0
  333. package/dist/entries/layout.js.map +9 -0
  334. package/dist/entries/lazy-load.d.ts +1 -0
  335. package/dist/entries/lazy-load.js +9 -0
  336. package/dist/entries/lazy-load.js.map +9 -0
  337. package/dist/entries/list.d.ts +1 -0
  338. package/dist/entries/list.js +13 -0
  339. package/dist/entries/list.js.map +9 -0
  340. package/dist/entries/loading.d.ts +1 -0
  341. package/dist/entries/loading.js +18 -0
  342. package/dist/entries/loading.js.map +9 -0
  343. package/dist/entries/menu.d.ts +1 -0
  344. package/dist/entries/menu.js +17 -0
  345. package/dist/entries/menu.js.map +9 -0
  346. package/dist/entries/modal.d.ts +1 -0
  347. package/dist/entries/modal.js +33 -0
  348. package/dist/entries/modal.js.map +9 -0
  349. package/dist/entries/product.d.ts +2 -0
  350. package/dist/entries/product.js +10 -0
  351. package/dist/entries/product.js.map +9 -0
  352. package/dist/entries/select-card.d.ts +1 -0
  353. package/dist/entries/select-card.js +13 -0
  354. package/dist/entries/select-card.js.map +9 -0
  355. package/dist/entries/skeletons.d.ts +1 -0
  356. package/dist/entries/skeletons.js +35 -0
  357. package/dist/entries/skeletons.js.map +9 -0
  358. package/dist/entries/surface.d.ts +1 -0
  359. package/dist/entries/surface.js +10 -0
  360. package/dist/entries/surface.js.map +9 -0
  361. package/dist/entries/table.d.ts +1 -0
  362. package/dist/entries/table.js +65 -0
  363. package/dist/entries/table.js.map +9 -0
  364. package/dist/entries/tabs.d.ts +1 -0
  365. package/dist/entries/tabs.js +20 -0
  366. package/dist/entries/tabs.js.map +9 -0
  367. package/dist/entries/theme-styler.d.ts +1 -0
  368. package/dist/entries/theme-styler.js +26 -0
  369. package/dist/entries/theme-styler.js.map +9 -0
  370. package/dist/entries/toast.d.ts +1 -0
  371. package/dist/entries/toast.js +13 -0
  372. package/dist/entries/toast.js.map +9 -0
  373. package/dist/index.d.ts +163 -0
  374. package/dist/index.js +19864 -0
  375. package/dist/index.js.map +92 -0
  376. package/dist/lib/color/className.d.ts +14 -0
  377. package/dist/lib/color/config.d.ts +82 -0
  378. package/dist/lib/color/engine.d.ts +221 -0
  379. package/dist/lib/color/generator.d.ts +45 -0
  380. package/dist/lib/color/index.d.ts +5 -0
  381. package/dist/lib/color/safelist.d.ts +1 -0
  382. package/dist/lib/color/types.d.ts +12 -0
  383. package/dist/lib/font/config.d.ts +13 -0
  384. package/dist/lib/font/engine.d.ts +77 -0
  385. package/dist/lib/font/index.d.ts +3 -0
  386. package/dist/lib/font/types.d.ts +27 -0
  387. package/dist/lib/icon/config.d.ts +37 -0
  388. package/dist/lib/icon/engine.d.ts +84 -0
  389. package/dist/lib/icon/index.d.ts +3 -0
  390. package/dist/lib/icon/presets.d.ts +71 -0
  391. package/dist/lib/layout/config.d.ts +7 -0
  392. package/dist/lib/layout/engine.d.ts +224 -0
  393. package/dist/lib/layout/types.d.ts +151 -0
  394. package/dist/lib/layout/useActiveBreakpoint.d.ts +14 -0
  395. package/dist/lib/layout/useBlockDrag.d.ts +47 -0
  396. package/dist/lib/layout/useSectionDrag.d.ts +30 -0
  397. package/dist/lib/layout/useSpanResize.d.ts +31 -0
  398. package/dist/lib/localize/data.d.ts +9 -0
  399. package/dist/lib/product-utils.d.ts +7 -0
  400. package/dist/lib/sanitize/sanitizeHtml.d.ts +52 -0
  401. package/dist/lib/theme/motion.d.ts +27 -0
  402. package/dist/lib/theme/motion.js +12 -0
  403. package/dist/lib/theme/motion.js.map +9 -0
  404. package/dist/lib/theme/types.d.ts +133 -0
  405. package/dist/lib/useUndoRedo.d.ts +21 -0
  406. package/dist/lib/utils.d.ts +2 -0
  407. package/dist/types/product.d.ts +27 -0
  408. package/package.json +442 -4
@@ -0,0 +1,570 @@
1
+ import {
2
+ cn2
3
+ } from "./chunk-x4pk7vxm.js";
4
+ import {
5
+ getIconLibrary2
6
+ } from "./chunk-k2b698v5.js";
7
+ import {
8
+ Label2
9
+ } from "./chunk-19jsevr8.js";
10
+
11
+ // src/components/ui/input.tsx
12
+ import * as React2 from "react";
13
+
14
+ // src/components/ui/form-context.tsx
15
+ import { createContext, useContext, useState, useEffect, useCallback, useRef } from "react";
16
+ import { jsxDEV } from "react/jsx-dev-runtime";
17
+ var FormContext = createContext({
18
+ labelPosition: "top",
19
+ labelWidth: "140px",
20
+ isDirty: false,
21
+ setIsDirty: () => {}
22
+ });
23
+ var useFormContext2 = () => useContext(FormContext);
24
+ function FormRoot2({
25
+ labelPosition = "top",
26
+ labelWidth = "140px",
27
+ preventUnload = true,
28
+ isDirty: isDirtyProp,
29
+ children,
30
+ className,
31
+ onSubmit,
32
+ ...props
33
+ }) {
34
+ const [autoDirty, setAutoDirty] = useState(false);
35
+ const isSubmittingRef = useRef(false);
36
+ const effectiveIsDirty = isDirtyProp !== undefined ? isDirtyProp : autoDirty;
37
+ useEffect(() => {
38
+ if (!preventUnload || !effectiveIsDirty)
39
+ return;
40
+ const handleBeforeUnload = (e) => {
41
+ if (isSubmittingRef.current)
42
+ return;
43
+ e.preventDefault();
44
+ e.returnValue = "";
45
+ };
46
+ window.addEventListener("beforeunload", handleBeforeUnload);
47
+ return () => window.removeEventListener("beforeunload", handleBeforeUnload);
48
+ }, [preventUnload, effectiveIsDirty]);
49
+ const handleUserInteraction = useCallback((e) => {
50
+ if (!autoDirty) {
51
+ setAutoDirty(true);
52
+ }
53
+ }, [autoDirty]);
54
+ const handleSubmit = useCallback((e) => {
55
+ isSubmittingRef.current = true;
56
+ setAutoDirty(false);
57
+ if (onSubmit) {
58
+ onSubmit(e);
59
+ }
60
+ }, [onSubmit]);
61
+ return /* @__PURE__ */ jsxDEV(FormContext.Provider, {
62
+ value: { labelPosition, labelWidth, isDirty: effectiveIsDirty, setIsDirty: setAutoDirty },
63
+ children: /* @__PURE__ */ jsxDEV("form", {
64
+ className: `flex flex-col flex-1 min-h-0 ${className}`,
65
+ onInputCapture: handleUserInteraction,
66
+ onChangeCapture: handleUserInteraction,
67
+ onSubmit: handleSubmit,
68
+ ...props,
69
+ children
70
+ }, undefined, false, undefined, this)
71
+ }, undefined, false, undefined, this);
72
+ }
73
+ FormRoot2.__isModalLayoutChild = true;
74
+
75
+ // src/components/ui/input.tsx
76
+ import { jsxDEV as jsxDEV2 } from "react/jsx-dev-runtime";
77
+ var resolveStyles = (sizeProp, inputSizeProp, radiusProp, shadowProp) => {
78
+ let finalSize = sizeProp || inputSizeProp || "md";
79
+ if (finalSize === "default")
80
+ finalSize = "md";
81
+ const sizeMap = {
82
+ xs: { base: "px-2 text-[11px]", height: "h-[var(--ui-input-h-xs,24px)]", pl: "pl-5", pr: "pr-5", prAction: "pr-7", icon: 13 },
83
+ sm: { base: "px-2.5 text-xs", height: "h-[var(--ui-input-h-sm,30px)]", pl: "pl-8", pr: "pr-8", prAction: "pr-10", icon: 16 },
84
+ md: { base: "px-3 text-[13px]", height: "h-[var(--ui-input-h-md,36px)]", pl: "pl-9", pr: "pr-9", prAction: "pr-11", icon: 18 },
85
+ lg: { base: "px-4 text-sm", height: "h-[var(--ui-input-h-lg,42px)]", pl: "pl-10", pr: "pr-10", prAction: "pr-12", icon: 20 },
86
+ xl: { base: "px-5 text-base", height: "h-[var(--ui-input-h-xl,48px)]", pl: "pl-11", pr: "pr-11", prAction: "pr-14", icon: 22 },
87
+ "2xl": { base: "px-6 text-lg", height: "h-[var(--ui-input-h-2xl,56px)]", pl: "pl-12", pr: "pr-12", prAction: "pr-16", icon: 24 }
88
+ };
89
+ const s = sizeMap[finalSize] || sizeMap["md"];
90
+ const radiusMap = {
91
+ none: "rounded-none",
92
+ sm: "rounded-sm",
93
+ md: "rounded-[var(--ui-input-radius,var(--ui-radius-md,8px))]",
94
+ lg: "rounded-lg",
95
+ full: "rounded-full"
96
+ };
97
+ const radiusClass = radiusProp ? radiusMap[radiusProp] : "rounded-[var(--ui-input-radius,var(--ui-radius-md,8px))]";
98
+ const shadowMap = {
99
+ none: "shadow-none",
100
+ sm: "shadow-sm",
101
+ md: "shadow-md",
102
+ lg: "shadow-lg",
103
+ xl: "shadow-xl"
104
+ };
105
+ const shadowClass = shadowProp ? shadowMap[shadowProp] : "shadow-none";
106
+ return { s, radiusClass, shadowClass, finalSize };
107
+ };
108
+ var Input2 = React2.forwardRef(({
109
+ className,
110
+ type,
111
+ inputSize,
112
+ size,
113
+ radius,
114
+ shadow,
115
+ icon,
116
+ iconRight,
117
+ prefix,
118
+ suffix,
119
+ buttonInside,
120
+ buttonInsideLeft,
121
+ buttonInsideRight,
122
+ isLoading,
123
+ hasError,
124
+ isSuccess,
125
+ errorMessage,
126
+ inputClassName,
127
+ clearable,
128
+ onClear,
129
+ showPasswordToggle = true,
130
+ generatePassword = false,
131
+ onGeneratePassword,
132
+ borderless = false,
133
+ label,
134
+ helperText,
135
+ description,
136
+ ...props
137
+ }, ref) => {
138
+ const { labelPosition, labelWidth } = useFormContext2();
139
+ const { s, radiusClass, shadowClass, finalSize } = resolveStyles(size, inputSize, radius, shadow);
140
+ const lib = getIconLibrary2();
141
+ const isComponent = (val) => {
142
+ if (!val)
143
+ return false;
144
+ if (typeof val === "function")
145
+ return true;
146
+ if (typeof val === "object") {
147
+ const type = val.$$typeof;
148
+ return type === Symbol.for("react.forward_ref") || type === Symbol.for("react.memo") || type === Symbol.for("react.lazy") || typeof val.render === "function";
149
+ }
150
+ return false;
151
+ };
152
+ const resolveSide = (prop) => {
153
+ if (prop === undefined || prop === null || prop === false)
154
+ return { icon: null, text: null, node: null };
155
+ if (typeof prop === "string") {
156
+ if (lib[prop])
157
+ return { icon: lib[prop], text: null, node: null };
158
+ return { icon: null, text: prop, node: null };
159
+ }
160
+ if (typeof prop === "number")
161
+ return { icon: null, text: String(prop), node: null };
162
+ if (React2.isValidElement(prop))
163
+ return { icon: null, text: null, node: prop };
164
+ if (isComponent(prop))
165
+ return { icon: prop, text: null, node: null };
166
+ if (prop === true)
167
+ return { icon: lib.text, text: null, node: null };
168
+ return { icon: null, text: null, node: null };
169
+ };
170
+ const { icon: LeftIcon, text: leftText, node: leftNode } = resolveSide(prefix !== undefined ? prefix : icon);
171
+ const { icon: RightIcon, text: rightText, node: rightNode } = resolveSide(suffix !== undefined ? suffix : iconRight);
172
+ const hasLeftContent = Boolean(LeftIcon || leftText !== null || leftNode);
173
+ const hasRightContent = Boolean(RightIcon || rightText !== null || rightNode);
174
+ const containerClass = cn2("relative flex items-center w-full overflow-hidden transition-all duration-200", borderless ? "bg-muted/40 hover:bg-muted/60 focus-within:bg-background [border-width:1px] border-transparent focus-within:ring-[length:var(--ui-focus-ring-width,3px)] focus-within:ring-[color:var(--ui-focus-ring-color,var(--color-primary-dimmy))] focus-within:border-[color:var(--color-primary)]" : "bg-[var(--color-input)] [border-width:var(--ui-border-width,1px)] border-solid border-[color:var(--ui-border-input)] hover:border-[color:var(--color-primary)] focus-within:ring-[length:var(--ui-focus-ring-width,3px)] focus-within:ring-[color:var(--ui-focus-ring-color,var(--color-primary-dimmy))] focus-within:border-[color:var(--color-primary)]", "focus-within:outline-none text-[color:var(--color-foreground)]", s.height, props.disabled && "cursor-not-allowed opacity-50 bg-[var(--color-muted)]", radiusClass, shadowClass, hasError && "border-[color:var(--color-danger)] hover:border-[color:var(--color-danger)] focus-within:ring-[var(--color-danger-dimmy)] focus-within:border-[color:var(--color-danger)]", isSuccess && "border-[color:var(--color-success)] hover:border-[color:var(--color-success)] focus-within:ring-[var(--color-success-dimmy)] focus-within:border-[color:var(--color-success)]", className);
175
+ const baseInputClass = cn2("flex-1 h-full bg-transparent border-0 outline-none shadow-none min-w-0 placeholder:text-[color:var(--color-muted-foreground)] text-[color:var(--color-foreground)] disabled:cursor-not-allowed disabled:opacity-100 disabled:bg-transparent file:border-0 file:bg-transparent file:text-sm file:font-medium", "[&:-webkit-autofill]:[transition:background-color_9999999s_ease-in-out_0s]", "[&:-webkit-autofill]:[-webkit-text-fill-color:var(--color-foreground)]", "[&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none [appearance:textfield]", s.base, (hasLeftContent || buttonInsideLeft) && "pl-0", (hasRightContent || isLoading || buttonInside || buttonInsideRight) && "pr-0", inputClassName);
176
+ const processInsideButton = (btn) => {
177
+ if (!React2.isValidElement(btn))
178
+ return btn;
179
+ if (typeof btn.type === "string") {
180
+ if (btn.props.children) {
181
+ return React2.cloneElement(btn, {
182
+ children: React2.Children.map(btn.props.children, processInsideButton)
183
+ });
184
+ }
185
+ return btn;
186
+ }
187
+ const btnProps = btn.props;
188
+ const isButton = btn.type?.displayName === "Button" || btn.type?.name === "Button" || btnProps?.variant !== undefined;
189
+ if (!isButton) {
190
+ if (btnProps?.children) {
191
+ return React2.cloneElement(btn, {
192
+ children: React2.Children.map(btnProps.children, processInsideButton)
193
+ });
194
+ }
195
+ return btn;
196
+ }
197
+ let newSize = btnProps.size;
198
+ let newClassName = btnProps.className || "";
199
+ const hasOnlyIconChildren = () => {
200
+ if (!btnProps.children)
201
+ return false;
202
+ const count = React2.Children.count(btnProps.children);
203
+ if (count === 1) {
204
+ const onlyChild = React2.Children.toArray(btnProps.children)[0];
205
+ if (React2.isValidElement(onlyChild)) {
206
+ const type = onlyChild.type;
207
+ const isLucide = typeof type === "object" && type?.render !== undefined;
208
+ const isSvg = typeof type === "string" && type === "svg";
209
+ const isNamedIcon = type?.name === "Icon" || type?.displayName?.includes("Icon");
210
+ return isLucide || isSvg || isNamedIcon || Boolean(onlyChild.props?.size && !onlyChild.props?.children);
211
+ }
212
+ }
213
+ return false;
214
+ };
215
+ const isIconOnly = btnProps.size === "icon" || btnProps.size === "icon-sm" || btnProps.size === "icon-xs" || !btnProps.children && (btnProps.icon || btnProps.iconRight) || hasOnlyIconChildren();
216
+ if (isIconOnly) {
217
+ const iconSizeMap = {
218
+ xs: "icon-xs",
219
+ sm: "icon-xs",
220
+ md: "icon-sm",
221
+ lg: "icon-md",
222
+ xl: "icon-lg",
223
+ "2xl": "icon-xl"
224
+ };
225
+ newSize = iconSizeMap[finalSize] || "icon-sm";
226
+ const iconHeightMap = {
227
+ xs: "!h-[18px] !w-[18px] !p-0 rounded-sm",
228
+ sm: "!h-[24px] !w-[24px] !p-0 rounded-md",
229
+ md: "!h-[28px] !w-[28px] !p-0 rounded-md",
230
+ lg: "!h-[32px] !w-[32px] !p-0 rounded-md",
231
+ xl: "!h-[38px] !w-[38px] !p-0 rounded-md",
232
+ "2xl": "!h-[46px] !w-[46px] !p-0 rounded-lg"
233
+ };
234
+ if (iconHeightMap[finalSize]) {
235
+ newClassName = `${newClassName} ${iconHeightMap[finalSize]}`.trim();
236
+ }
237
+ } else {
238
+ const regSizeMap = {
239
+ xs: "xs",
240
+ sm: "xs",
241
+ md: "sm",
242
+ lg: "md",
243
+ xl: "lg",
244
+ "2xl": "xl"
245
+ };
246
+ newSize = regSizeMap[finalSize] || "sm";
247
+ const heightFitMap = {
248
+ xs: "!h-[18px] !text-[11px] !px-1.5 rounded-sm",
249
+ sm: "!h-[24px] !text-[12px] !px-2.5 rounded-md",
250
+ md: "!h-[28px] !text-[12.5px] !px-3 rounded-md",
251
+ lg: "!h-[32px] !text-[13px] !px-3.5 rounded-md",
252
+ xl: "!h-[38px] !text-sm !px-4 rounded-md",
253
+ "2xl": "!h-[46px] !text-base !px-4.5 rounded-lg"
254
+ };
255
+ if (heightFitMap[finalSize]) {
256
+ newClassName = `${newClassName} ${heightFitMap[finalSize]}`.trim();
257
+ }
258
+ }
259
+ if (newSize !== btnProps.size || newClassName !== btnProps.className) {
260
+ return React2.cloneElement(btn, {
261
+ size: newSize,
262
+ className: newClassName
263
+ });
264
+ }
265
+ return btn;
266
+ };
267
+ const isPasswordType = type === "password";
268
+ const [showPassword, setShowPassword] = React2.useState(false);
269
+ const effectiveType = isPasswordType && showPassword ? "text" : type;
270
+ const innerRef = React2.useRef(null);
271
+ const setRefs = React2.useCallback((node) => {
272
+ innerRef.current = node;
273
+ if (typeof ref === "function")
274
+ ref(node);
275
+ else if (ref)
276
+ ref.current = node;
277
+ }, [ref]);
278
+ const handleGeneratePassword = (e) => {
279
+ e.preventDefault();
280
+ e.stopPropagation();
281
+ const chars = "abcdefghjkmnpqrstuvwxyzABCDEFGHJKMNPQRSTUVWXYZ23456789!@#$%&*?";
282
+ let pwd = "";
283
+ for (let i = 0;i < 14; i++) {
284
+ pwd += chars.charAt(Math.floor(Math.random() * chars.length));
285
+ }
286
+ if (innerRef.current) {
287
+ innerRef.current.value = pwd;
288
+ }
289
+ const event = {
290
+ target: { value: pwd, name: props.name },
291
+ currentTarget: { value: pwd, name: props.name }
292
+ };
293
+ props.onChange?.(event);
294
+ onGeneratePassword?.(pwd);
295
+ setShowPassword(true);
296
+ };
297
+ const renderedInsideButtonLeft = processInsideButton(buttonInsideLeft);
298
+ const renderedInsideButtonRight = processInsideButton(buttonInsideRight || buttonInside);
299
+ const handleKeyDown = (e) => {
300
+ if (e.key.length === 1) {
301
+ if (type === "email" && !/[\w@.\-+]/.test(e.key)) {
302
+ e.preventDefault();
303
+ } else if (type === "url" && !/[\w:\/.\-?&#%=@]/.test(e.key)) {
304
+ e.preventDefault();
305
+ } else if (type === "tel" && !/[\d\s\+\-\(\)]/.test(e.key)) {
306
+ e.preventDefault();
307
+ } else if (type === "number" && !/[\d\.\-\+]/.test(e.key)) {
308
+ e.preventDefault();
309
+ }
310
+ }
311
+ props.onKeyDown?.(e);
312
+ };
313
+ const handleChange = (e) => {
314
+ const el = e.target;
315
+ let val = el.value;
316
+ if (type === "email") {
317
+ val = val.replace(/[^\w@.\-+]/g, "");
318
+ const parts = val.split("@");
319
+ if (parts.length > 2) {
320
+ val = parts[0] + "@" + parts.slice(1).join("").replace(/@/g, "");
321
+ }
322
+ } else if (type === "url") {
323
+ val = val.replace(/[^\w:\/.\-?&#%=@]/g, "");
324
+ } else if (type === "tel") {
325
+ val = val.replace(/[^\d\s\+\-\(\)]/g, "");
326
+ } else if (type === "number") {
327
+ val = val.replace(/[^\d\.\-\+]/g, "");
328
+ const numParts = val.split(".");
329
+ if (numParts.length > 2) {
330
+ val = numParts[0] + "." + numParts.slice(1).join("").replace(/\./g, "");
331
+ }
332
+ }
333
+ if (val !== el.value) {
334
+ el.value = val;
335
+ }
336
+ props.onChange?.(e);
337
+ };
338
+ const handleContainerClick = (e) => {
339
+ if (e.target.closest("button"))
340
+ return;
341
+ const inputEl = e.currentTarget.querySelector("input");
342
+ if (inputEl && e.target !== inputEl) {
343
+ inputEl.focus();
344
+ inputEl.click();
345
+ }
346
+ };
347
+ const inputElement = /* @__PURE__ */ jsxDEV2("div", {
348
+ className: containerClass,
349
+ onClick: handleContainerClick,
350
+ children: [
351
+ renderedInsideButtonLeft && /* @__PURE__ */ jsxDEV2("div", {
352
+ className: cn2("flex-none pr-1 flex items-center justify-center", finalSize === "md" ? "pl-1" : "pl-[3px]"),
353
+ children: renderedInsideButtonLeft
354
+ }, undefined, false, undefined, this),
355
+ hasLeftContent && /* @__PURE__ */ jsxDEV2("div", {
356
+ className: cn2("flex-none flex items-center justify-center select-none", renderedInsideButtonLeft ? "pl-1 pr-1.5" : "pl-2.5 pr-1.5", "text-[color:var(--color-muted-foreground)]"),
357
+ children: leftNode ? leftNode : leftText !== null ? /* @__PURE__ */ jsxDEV2("span", {
358
+ className: "text-xs font-mono whitespace-nowrap",
359
+ children: leftText
360
+ }, undefined, false, undefined, this) : LeftIcon ? /* @__PURE__ */ jsxDEV2(LeftIcon, {
361
+ size: s.icon,
362
+ className: cn2("text-[color:var(--color-muted-foreground)]", hasError && "!text-[color:var(--color-danger)]", isSuccess && "!text-[color:var(--color-success)]")
363
+ }, undefined, false, undefined, this) : null
364
+ }, undefined, false, undefined, this),
365
+ /* @__PURE__ */ jsxDEV2("input", {
366
+ type: effectiveType,
367
+ className: cn2(baseInputClass, isPasswordType && "[&::-ms-reveal]:hidden [&::-ms-clear]:hidden"),
368
+ ref: setRefs,
369
+ ...props,
370
+ "aria-label": props["aria-label"] || props.placeholder || props.name || undefined,
371
+ onKeyDown: handleKeyDown,
372
+ onChange: handleChange
373
+ }, undefined, false, undefined, this),
374
+ clearable && Boolean(props.value) && /* @__PURE__ */ jsxDEV2("button", {
375
+ type: "button",
376
+ tabIndex: -1,
377
+ onClick: (e) => {
378
+ e.preventDefault();
379
+ e.stopPropagation();
380
+ onClear?.();
381
+ const event = {
382
+ target: { value: "" },
383
+ currentTarget: { value: "" }
384
+ };
385
+ props.onChange?.(event);
386
+ },
387
+ className: "flex-none px-1.5 flex items-center justify-center text-[color:var(--ui-border-input,color-mix(in_srgb,var(--color-foreground)_20%,transparent))] hover:text-[color:var(--color-foreground)] transition-colors cursor-pointer",
388
+ "aria-label": "Clear input",
389
+ children: /* @__PURE__ */ jsxDEV2("svg", {
390
+ className: "w-3.5 h-3.5",
391
+ viewBox: "0 0 24 24",
392
+ fill: "none",
393
+ stroke: "currentColor",
394
+ strokeWidth: "2",
395
+ strokeLinecap: "round",
396
+ strokeLinejoin: "round",
397
+ children: [
398
+ /* @__PURE__ */ jsxDEV2("line", {
399
+ x1: "18",
400
+ y1: "6",
401
+ x2: "6",
402
+ y2: "18"
403
+ }, undefined, false, undefined, this),
404
+ /* @__PURE__ */ jsxDEV2("line", {
405
+ x1: "6",
406
+ y1: "6",
407
+ x2: "18",
408
+ y2: "18"
409
+ }, undefined, false, undefined, this)
410
+ ]
411
+ }, undefined, true, undefined, this)
412
+ }, undefined, false, undefined, this),
413
+ hasRightContent && /* @__PURE__ */ jsxDEV2("div", {
414
+ className: cn2("flex-none flex items-center justify-center select-none", renderedInsideButtonRight || isLoading ? "pr-1.5 pl-1" : "pr-2.5 pl-1", "text-[color:var(--color-muted-foreground)]"),
415
+ children: rightNode ? rightNode : rightText !== null ? /* @__PURE__ */ jsxDEV2("span", {
416
+ className: "text-xs font-mono whitespace-nowrap",
417
+ children: rightText
418
+ }, undefined, false, undefined, this) : RightIcon ? /* @__PURE__ */ jsxDEV2(RightIcon, {
419
+ size: s.icon,
420
+ className: cn2("text-[color:var(--color-muted-foreground)]", hasError && "!text-[color:var(--color-danger)]", isSuccess && "!text-[color:var(--color-success)]")
421
+ }, undefined, false, undefined, this) : null
422
+ }, undefined, false, undefined, this),
423
+ isLoading && /* @__PURE__ */ jsxDEV2("div", {
424
+ className: cn2("flex-none flex items-center justify-center", renderedInsideButtonRight ? "pr-1.5 pl-1" : "pr-3 pl-1"),
425
+ children: /* @__PURE__ */ jsxDEV2("svg", {
426
+ className: "animate-spin h-4 w-4 text-[color:var(--color-muted-foreground)]",
427
+ xmlns: "http://www.w3.org/2000/svg",
428
+ fill: "none",
429
+ viewBox: "0 0 24 24",
430
+ children: [
431
+ /* @__PURE__ */ jsxDEV2("circle", {
432
+ className: "opacity-25",
433
+ cx: "12",
434
+ cy: "12",
435
+ r: "10",
436
+ stroke: "currentColor",
437
+ strokeWidth: "4"
438
+ }, undefined, false, undefined, this),
439
+ /* @__PURE__ */ jsxDEV2("path", {
440
+ className: "opacity-75",
441
+ fill: "currentColor",
442
+ d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
443
+ }, undefined, false, undefined, this)
444
+ ]
445
+ }, undefined, true, undefined, this)
446
+ }, undefined, false, undefined, this),
447
+ isPasswordType && showPasswordToggle && !renderedInsideButtonRight && /* @__PURE__ */ jsxDEV2("button", {
448
+ type: "button",
449
+ tabIndex: -1,
450
+ onClick: (e) => {
451
+ e.preventDefault();
452
+ e.stopPropagation();
453
+ setShowPassword((prev) => !prev);
454
+ },
455
+ className: "flex-none px-1.5 flex items-center justify-center text-[color:var(--color-muted-foreground)] hover:text-[color:var(--color-foreground)] transition-colors cursor-pointer",
456
+ "aria-label": showPassword ? "Sembunyikan password" : "Lihat password",
457
+ title: showPassword ? "Sembunyikan password" : "Lihat password",
458
+ children: showPassword ? /* @__PURE__ */ jsxDEV2("svg", {
459
+ className: "w-4 h-4",
460
+ viewBox: "0 0 24 24",
461
+ fill: "none",
462
+ stroke: "currentColor",
463
+ strokeWidth: "2",
464
+ strokeLinecap: "round",
465
+ strokeLinejoin: "round",
466
+ children: [
467
+ /* @__PURE__ */ jsxDEV2("path", {
468
+ d: "M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94"
469
+ }, undefined, false, undefined, this),
470
+ /* @__PURE__ */ jsxDEV2("path", {
471
+ d: "M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19"
472
+ }, undefined, false, undefined, this),
473
+ /* @__PURE__ */ jsxDEV2("line", {
474
+ x1: "1",
475
+ y1: "1",
476
+ x2: "23",
477
+ y2: "23"
478
+ }, undefined, false, undefined, this)
479
+ ]
480
+ }, undefined, true, undefined, this) : /* @__PURE__ */ jsxDEV2("svg", {
481
+ className: "w-4 h-4",
482
+ viewBox: "0 0 24 24",
483
+ fill: "none",
484
+ stroke: "currentColor",
485
+ strokeWidth: "2",
486
+ strokeLinecap: "round",
487
+ strokeLinejoin: "round",
488
+ children: [
489
+ /* @__PURE__ */ jsxDEV2("path", {
490
+ d: "M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"
491
+ }, undefined, false, undefined, this),
492
+ /* @__PURE__ */ jsxDEV2("circle", {
493
+ cx: "12",
494
+ cy: "12",
495
+ r: "3"
496
+ }, undefined, false, undefined, this)
497
+ ]
498
+ }, undefined, true, undefined, this)
499
+ }, undefined, false, undefined, this),
500
+ isPasswordType && generatePassword && !renderedInsideButtonRight && /* @__PURE__ */ jsxDEV2("div", {
501
+ className: cn2("flex-none pl-1 flex items-center justify-center", finalSize === "lg" ? "pr-1.5" : "pr-1"),
502
+ children: /* @__PURE__ */ jsxDEV2("button", {
503
+ type: "button",
504
+ tabIndex: -1,
505
+ onClick: handleGeneratePassword,
506
+ className: "inline-flex items-center justify-center font-medium !h-[26px] !text-[11.5px] !px-2.5 rounded-md bg-[color-mix(in_srgb,var(--color-primary),transparent_88%)] text-[color:var(--color-primary)] hover:bg-[color-mix(in_srgb,var(--color-primary),transparent_80%)] transition-colors cursor-pointer",
507
+ title: "Generate password acak yang kuat",
508
+ children: "Generate"
509
+ }, undefined, false, undefined, this)
510
+ }, undefined, false, undefined, this),
511
+ renderedInsideButtonRight && /* @__PURE__ */ jsxDEV2("div", {
512
+ className: cn2("flex-none pl-1 flex items-center justify-center", finalSize === "lg" ? "pr-1.5" : "pr-1"),
513
+ children: renderedInsideButtonRight
514
+ }, undefined, false, undefined, this)
515
+ ]
516
+ }, undefined, true, undefined, this);
517
+ const helpContent = helperText || description;
518
+ const withFeedback = /* @__PURE__ */ jsxDEV2("div", {
519
+ className: "w-full flex flex-col gap-1.5",
520
+ children: [
521
+ inputElement,
522
+ errorMessage ? /* @__PURE__ */ jsxDEV2("span", {
523
+ className: "text-xs text-[color:var(--color-danger)] font-medium",
524
+ children: errorMessage
525
+ }, undefined, false, undefined, this) : helpContent ? /* @__PURE__ */ jsxDEV2("span", {
526
+ className: "text-xs text-[color:var(--color-muted-foreground)]",
527
+ children: helpContent
528
+ }, undefined, false, undefined, this) : null
529
+ ]
530
+ }, undefined, true, undefined, this);
531
+ const mainNode = errorMessage || helpContent ? withFeedback : inputElement;
532
+ if (label) {
533
+ if (labelPosition === "left") {
534
+ return /* @__PURE__ */ jsxDEV2("div", {
535
+ className: "flex items-start gap-4",
536
+ children: [
537
+ /* @__PURE__ */ jsxDEV2("div", {
538
+ style: { width: labelWidth },
539
+ className: "shrink-0 mt-1.5",
540
+ children: /* @__PURE__ */ jsxDEV2(Label2, {
541
+ className: "text-[13px] font-medium text-[color:var(--color-foreground)]",
542
+ children: label
543
+ }, undefined, false, undefined, this)
544
+ }, undefined, false, undefined, this),
545
+ /* @__PURE__ */ jsxDEV2("div", {
546
+ className: "flex-1 min-w-0",
547
+ children: mainNode
548
+ }, undefined, false, undefined, this)
549
+ ]
550
+ }, undefined, true, undefined, this);
551
+ } else {
552
+ return /* @__PURE__ */ jsxDEV2("div", {
553
+ className: "flex flex-col gap-1.5",
554
+ children: [
555
+ /* @__PURE__ */ jsxDEV2(Label2, {
556
+ className: "text-[13px] font-medium text-[color:var(--color-foreground)]",
557
+ children: label
558
+ }, undefined, false, undefined, this),
559
+ mainNode
560
+ ]
561
+ }, undefined, true, undefined, this);
562
+ }
563
+ }
564
+ return mainNode;
565
+ });
566
+ Input2.displayName = "Input";
567
+
568
+ export { useFormContext2, FormRoot2, Input2 };
569
+
570
+ //# debugId=59A51071110A505164756E2164756E21