@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,919 @@
1
+ import {
2
+ Icon2
3
+ } from "./chunk-k2b698v5.js";
4
+ import {
5
+ Button2
6
+ } from "./chunk-kv58555q.js";
7
+
8
+ // src/components/ui/modal.tsx
9
+ import * as React from "react";
10
+ import { useState as useState2, useRef, useEffect as useEffect2, useCallback, useId } from "react";
11
+ import { createPortal } from "react-dom";
12
+ import { jsxDEV, Fragment as Fragment2 } from "react/jsx-dev-runtime";
13
+ var MAX_WIDTH_CLASS = {
14
+ sm: "sm:max-w-sm",
15
+ md: "sm:max-w-md",
16
+ lg: "sm:max-w-lg",
17
+ xl: "sm:max-w-xl",
18
+ "2xl": "sm:max-w-2xl",
19
+ "4xl": "sm:max-w-4xl",
20
+ "5xl": "sm:max-w-5xl",
21
+ "6xl": "sm:max-w-6xl",
22
+ full: "sm:max-w-full"
23
+ };
24
+ var BACKDROP_CLASS = {
25
+ 0: "bg-transparent",
26
+ 10: "bg-black/10",
27
+ 20: "bg-black/20",
28
+ 30: "bg-black/30",
29
+ 40: "bg-black/40",
30
+ 50: "bg-black/50",
31
+ 60: "bg-black/60",
32
+ 70: "bg-black/70",
33
+ 75: "bg-black/75",
34
+ 80: "bg-black/80"
35
+ };
36
+ var BLUR_CLASS = {
37
+ 0: "",
38
+ 10: "",
39
+ 20: "",
40
+ 30: "",
41
+ 40: "",
42
+ 50: "",
43
+ 60: "",
44
+ 70: "",
45
+ 75: "",
46
+ 80: ""
47
+ };
48
+ var WRAPPER_ALIGN = {
49
+ center: "items-center justify-center",
50
+ bottom: "items-end justify-center",
51
+ top: "items-start justify-center",
52
+ left: "items-center justify-start",
53
+ right: "items-center justify-end"
54
+ };
55
+ var MODAL_DURATION_MS = {
56
+ fade: { enter: 200, leave: 200 },
57
+ zoom: { enter: 250, leave: 250 },
58
+ slide: { enter: 250, leave: 250 },
59
+ bounce: { enter: 350, leave: 350 },
60
+ none: { enter: 0, leave: 0 }
61
+ };
62
+ var MODAL_EASING = {
63
+ fade: { enter: "ease-out", leave: "ease-in" },
64
+ zoom: { enter: "ease-out", leave: "ease-in" },
65
+ slide: { enter: "ease-out", leave: "ease-in" },
66
+ bounce: { enter: "cubic-bezier(0.34, 1.35, 0.64, 1)", leave: "ease-in" },
67
+ none: { enter: "linear", leave: "linear" }
68
+ };
69
+ function getHiddenTransform(animation, position) {
70
+ if (animation === "zoom") {
71
+ if (position === "bottom")
72
+ return "scale(0.95) translateY(1rem)";
73
+ if (position === "top")
74
+ return "scale(0.95) translateY(-1rem)";
75
+ if (position === "left")
76
+ return "scale(0.95) translateX(-1rem)";
77
+ if (position === "right")
78
+ return "scale(0.95) translateX(1rem)";
79
+ return "scale(0.95)";
80
+ }
81
+ if (animation === "bounce") {
82
+ if (position === "bottom")
83
+ return "translateY(100%)";
84
+ if (position === "top")
85
+ return "translateY(-100%)";
86
+ if (position === "left")
87
+ return "translateX(-100%)";
88
+ if (position === "right")
89
+ return "translateX(100%)";
90
+ return "scale(0.9)";
91
+ }
92
+ if (animation === "slide") {
93
+ if (position === "bottom")
94
+ return "translateY(calc(100% + 2rem))";
95
+ if (position === "top")
96
+ return "translateY(calc(-100% - 2rem))";
97
+ if (position === "left")
98
+ return "translateX(calc(-100% - 1rem))";
99
+ if (position === "right")
100
+ return "translateX(calc(100% + 1rem))";
101
+ return "translateY(calc(100% + 2rem))";
102
+ }
103
+ return "none";
104
+ }
105
+ var FOCUSABLE_SELECTOR = 'a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])';
106
+ function useFocusTrap(panelRef, active) {
107
+ const previousFocusRef = useRef(null);
108
+ useEffect2(() => {
109
+ if (!active)
110
+ return;
111
+ previousFocusRef.current = document.activeElement;
112
+ const panel = panelRef.current;
113
+ const focusFirst = () => {
114
+ const focusable = panel?.querySelectorAll(FOCUSABLE_SELECTOR);
115
+ (focusable?.[0] ?? panel)?.focus({ preventScroll: true });
116
+ };
117
+ const raf = requestAnimationFrame(focusFirst);
118
+ function handleKeyDown(e) {
119
+ if (e.key !== "Tab" || !panel)
120
+ return;
121
+ const focusable = Array.from(panel.querySelectorAll(FOCUSABLE_SELECTOR));
122
+ if (focusable.length === 0)
123
+ return;
124
+ const first = focusable[0];
125
+ const last = focusable[focusable.length - 1];
126
+ if (e.shiftKey && document.activeElement === first) {
127
+ e.preventDefault();
128
+ last.focus();
129
+ } else if (!e.shiftKey && document.activeElement === last) {
130
+ e.preventDefault();
131
+ first.focus();
132
+ }
133
+ }
134
+ document.addEventListener("keydown", handleKeyDown);
135
+ return () => {
136
+ cancelAnimationFrame(raf);
137
+ document.removeEventListener("keydown", handleKeyDown);
138
+ previousFocusRef.current?.focus();
139
+ };
140
+ }, [active, panelRef]);
141
+ }
142
+ var scrollLockCount = 0;
143
+ function useBodyScrollLock(active, shouldLock) {
144
+ useEffect2(() => {
145
+ if (!active || !shouldLock)
146
+ return;
147
+ if (scrollLockCount === 0) {
148
+ document.documentElement.style.setProperty("overflow-y", "hidden", "important");
149
+ }
150
+ scrollLockCount++;
151
+ return () => {
152
+ scrollLockCount--;
153
+ if (scrollLockCount === 0) {
154
+ document.documentElement.style.removeProperty("overflow-y");
155
+ }
156
+ };
157
+ }, [active, shouldLock]);
158
+ }
159
+ function useEscapeClose(onClose, active) {
160
+ useEffect2(() => {
161
+ if (!active)
162
+ return;
163
+ function handleKeyDown(e) {
164
+ if (e.key === "Escape")
165
+ onClose();
166
+ }
167
+ document.addEventListener("keydown", handleKeyDown);
168
+ return () => document.removeEventListener("keydown", handleKeyDown);
169
+ }, [active, onClose]);
170
+ }
171
+ function Modal2({
172
+ isOpen: isOpenProp,
173
+ open: openProp,
174
+ onClose,
175
+ onOpen,
176
+ title,
177
+ children,
178
+ layout,
179
+ body,
180
+ footer,
181
+ cancelButton,
182
+ cancelText,
183
+ orientation = "horizontal",
184
+ maxWidth = "md",
185
+ position = "center",
186
+ animation = "zoom",
187
+ duration,
188
+ backdropOpacity = 40,
189
+ backdropBlur = true,
190
+ showCloseButton = true,
191
+ allowOverflow = false,
192
+ isSwipeable = false,
193
+ closeOnOutsideClick = true,
194
+ lockScroll = true,
195
+ hideBackdrop = false,
196
+ className = "",
197
+ stickyButton,
198
+ staticPreview = false
199
+ }) {
200
+ const isOpen = Boolean(isOpenProp ?? openProp);
201
+ const dragAxis = position === "left" || position === "right" ? "x" : "y";
202
+ const dragSign = position === "left" || position === "top" ? -1 : 1;
203
+ const [dragOffset, setDragOffset] = useState2(0);
204
+ const [isDragging, setIsDragging] = useState2(false);
205
+ const dragStartRef = useRef(0);
206
+ const wasDraggedRef = useRef(false);
207
+ const panelRef = useRef(null);
208
+ const titleId = useId();
209
+ const [mounted, setMounted] = useState2(isOpen || !!stickyButton);
210
+ const [visible, setVisible] = useState2(false);
211
+ const unmountTimerRef = useRef(null);
212
+ const mountRef = useRef(null);
213
+ const [isDarkScope, setIsDarkScope] = useState2(false);
214
+ useEffect2(() => {
215
+ if (mountRef.current) {
216
+ setIsDarkScope(mountRef.current.closest(".deweb-dark-scope") !== null);
217
+ }
218
+ }, [mounted]);
219
+ useEffect2(() => {
220
+ if (isOpen) {
221
+ if (unmountTimerRef.current)
222
+ clearTimeout(unmountTimerRef.current);
223
+ setMounted(true);
224
+ } else {
225
+ setVisible(false);
226
+ const { leave } = MODAL_DURATION_MS[animation];
227
+ if (leave === 0) {
228
+ setMounted(!!stickyButton);
229
+ } else {
230
+ unmountTimerRef.current = setTimeout(() => setMounted(!!stickyButton), leave + 50);
231
+ }
232
+ }
233
+ return () => {
234
+ if (unmountTimerRef.current)
235
+ clearTimeout(unmountTimerRef.current);
236
+ };
237
+ }, [isOpen, animation, stickyButton]);
238
+ const handleTransitionEnd = (e) => {
239
+ if (e.target === e.currentTarget && !isOpen) {
240
+ setMounted(!!stickyButton);
241
+ if (unmountTimerRef.current)
242
+ clearTimeout(unmountTimerRef.current);
243
+ }
244
+ };
245
+ useEffect2(() => {
246
+ if (!mounted || !isOpen)
247
+ return;
248
+ panelRef.current?.offsetHeight;
249
+ let raf2 = 0;
250
+ const raf1 = requestAnimationFrame(() => {
251
+ panelRef.current?.offsetHeight;
252
+ raf2 = requestAnimationFrame(() => setVisible(true));
253
+ });
254
+ return () => {
255
+ cancelAnimationFrame(raf1);
256
+ cancelAnimationFrame(raf2);
257
+ };
258
+ }, [mounted, isOpen]);
259
+ const handleDragStart = (clientPos) => {
260
+ if (!isSwipeable)
261
+ return;
262
+ setIsDragging(true);
263
+ dragStartRef.current = clientPos;
264
+ wasDraggedRef.current = false;
265
+ };
266
+ const handleDragMove = useCallback((clientPos) => {
267
+ if (!isDragging || !isSwipeable)
268
+ return;
269
+ const rawDelta = clientPos - dragStartRef.current;
270
+ if (Math.abs(rawDelta) > 5) {
271
+ wasDraggedRef.current = true;
272
+ }
273
+ const normalizedDelta = rawDelta * dragSign;
274
+ if (isOpen) {
275
+ if (normalizedDelta > 0)
276
+ setDragOffset(normalizedDelta);
277
+ } else {
278
+ if (normalizedDelta < 0)
279
+ setDragOffset(normalizedDelta);
280
+ }
281
+ }, [isDragging, isSwipeable, dragSign, isOpen]);
282
+ const handleDragEnd = useCallback(() => {
283
+ if (!isDragging || !isSwipeable)
284
+ return;
285
+ setIsDragging(false);
286
+ if (isOpen) {
287
+ if (dragOffset > 100)
288
+ onClose();
289
+ } else {
290
+ if (dragOffset < -100 && onOpen)
291
+ onOpen();
292
+ }
293
+ setDragOffset(0);
294
+ }, [isDragging, isSwipeable, dragOffset, onClose, isOpen, onOpen]);
295
+ useEffect2(() => {
296
+ if (!isDragging)
297
+ return;
298
+ const getPos = (e, touch) => dragAxis === "x" ? (touch ?? e).clientX : (touch ?? e).clientY;
299
+ const onMouseMove = (e) => handleDragMove(getPos(e));
300
+ const onMouseUp = () => handleDragEnd();
301
+ const onTouchMove = (e) => handleDragMove(getPos(e, e.touches[0]));
302
+ const onTouchEnd = () => handleDragEnd();
303
+ window.addEventListener("mousemove", onMouseMove);
304
+ window.addEventListener("mouseup", onMouseUp);
305
+ window.addEventListener("touchmove", onTouchMove);
306
+ window.addEventListener("touchend", onTouchEnd);
307
+ return () => {
308
+ window.removeEventListener("mousemove", onMouseMove);
309
+ window.removeEventListener("mouseup", onMouseUp);
310
+ window.removeEventListener("touchmove", onTouchMove);
311
+ window.removeEventListener("touchend", onTouchEnd);
312
+ };
313
+ }, [isDragging, dragAxis, handleDragMove, handleDragEnd]);
314
+ useFocusTrap(panelRef, isOpen && !staticPreview);
315
+ useBodyScrollLock(isOpen && !staticPreview, lockScroll);
316
+ useEscapeClose(onClose, isOpen && !staticPreview);
317
+ const mountAnchor = /* @__PURE__ */ jsxDEV("span", {
318
+ ref: mountRef,
319
+ style: { display: "none" }
320
+ }, undefined, false, undefined, this);
321
+ if (!mounted)
322
+ return mountAnchor;
323
+ const isVerticalLayout = orientation === "vertical" || orientation === "two-column" || layout === "two_column";
324
+ const resolvedMaxWidthKey = isVerticalLayout && maxWidth === "md" ? "4xl" : maxWidth;
325
+ const maxWidthClass = MAX_WIDTH_CLASS[resolvedMaxWidthKey];
326
+ const backdropClassKey = [0, 10, 20, 30, 40, 50, 60, 70, 75, 80].includes(backdropOpacity) ? backdropOpacity : 75;
327
+ const backdropClass = BACKDROP_CLASS[backdropClassKey];
328
+ const blurClass = backdropBlur ? BLUR_CLASS[backdropClassKey] : "";
329
+ const wrapperAlign = WRAPPER_ALIGN[position];
330
+ const isLayoutChild = (child) => {
331
+ if (!React.isValidElement(child))
332
+ return false;
333
+ if (child.type?.__isModalLayoutChild)
334
+ return true;
335
+ if (child.props && child.props.children) {
336
+ return React.Children.toArray(child.props.children).some(isLayoutChild);
337
+ }
338
+ return false;
339
+ };
340
+ const hasLayoutChildren = React.Children.toArray(children).some(isLayoutChild);
341
+ const renderChildren = () => {
342
+ if (layout === "custom") {
343
+ return hasLayoutChildren ? children : /* @__PURE__ */ jsxDEV("div", {
344
+ className: "p-5",
345
+ children
346
+ }, undefined, false, undefined, this);
347
+ }
348
+ const modalBodyNode = body ? /* @__PURE__ */ jsxDEV(ModalBody2, {
349
+ children: body
350
+ }, undefined, false, undefined, this) : children ? hasLayoutChildren ? children : /* @__PURE__ */ jsxDEV("div", {
351
+ className: "p-5",
352
+ children
353
+ }, undefined, false, undefined, this) : null;
354
+ const modalFooterNode = footer || cancelButton ? /* @__PURE__ */ jsxDEV(ModalFooter2, {
355
+ children: [
356
+ cancelButton && /* @__PURE__ */ jsxDEV(ModalCancelButton2, {
357
+ onClick: onClose,
358
+ children: cancelText || "Batal"
359
+ }, undefined, false, undefined, this),
360
+ footer
361
+ ]
362
+ }, undefined, true, undefined, this) : null;
363
+ switch (layout) {
364
+ case "header_body_footer":
365
+ return /* @__PURE__ */ jsxDEV(Fragment2, {
366
+ children: [
367
+ modalBodyNode,
368
+ modalFooterNode
369
+ ]
370
+ }, undefined, true, undefined, this);
371
+ case "header_body":
372
+ case "body_only":
373
+ return modalBodyNode;
374
+ case "body_footer":
375
+ return /* @__PURE__ */ jsxDEV(Fragment2, {
376
+ children: [
377
+ modalBodyNode,
378
+ modalFooterNode
379
+ ]
380
+ }, undefined, true, undefined, this);
381
+ default:
382
+ if (body || footer || cancelButton) {
383
+ return /* @__PURE__ */ jsxDEV(Fragment2, {
384
+ children: [
385
+ modalBodyNode,
386
+ modalFooterNode
387
+ ]
388
+ }, undefined, true, undefined, this);
389
+ }
390
+ return hasLayoutChildren ? children : /* @__PURE__ */ jsxDEV("div", {
391
+ className: "p-5",
392
+ children
393
+ }, undefined, false, undefined, this);
394
+ }
395
+ };
396
+ if (staticPreview) {
397
+ return /* @__PURE__ */ jsxDEV("div", {
398
+ className: `relative flex flex-col w-full rounded-xl bg-[var(--color-card)] text-left shadow-xl border border-[color:var(--color-border)] my-4 overflow-hidden ${maxWidthClass} ${className}`,
399
+ children: [
400
+ (title || showCloseButton) && /* @__PURE__ */ jsxDEV("div", {
401
+ className: `flex flex-none items-center justify-between border-b border-[color:var(--color-border)] px-5 pb-3 pt-2.5`,
402
+ children: [
403
+ title ? /* @__PURE__ */ jsxDEV("h3", {
404
+ className: "w-full text-[15.5px] font-bold text-[color:var(--color-background-foreground)]",
405
+ children: title
406
+ }, undefined, false, undefined, this) : /* @__PURE__ */ jsxDEV("div", {}, undefined, false, undefined, this),
407
+ showCloseButton && /* @__PURE__ */ jsxDEV(Button2, {
408
+ variant: "ghost",
409
+ size: "sm",
410
+ className: "!px-0 w-[30px] h-[30px] flex-none opacity-50",
411
+ children: /* @__PURE__ */ jsxDEV(Icon2, {
412
+ name: "close",
413
+ size: 14
414
+ }, undefined, false, undefined, this)
415
+ }, undefined, false, undefined, this)
416
+ ]
417
+ }, undefined, true, undefined, this),
418
+ renderChildren()
419
+ ]
420
+ }, undefined, true, undefined, this);
421
+ }
422
+ const resolvedDuration = duration ?? (visible ? MODAL_DURATION_MS[animation].enter : MODAL_DURATION_MS[animation].leave);
423
+ const easing = visible ? MODAL_EASING[animation].enter : MODAL_EASING[animation].leave;
424
+ const hiddenTransform = getHiddenTransform(animation, position);
425
+ const panelOpacity = animation === "slide" ? 1 : visible ? 1 : 0;
426
+ const panelTransform = visible ? "none" : hiddenTransform;
427
+ const isActuallyDragging = isDragging && Math.abs(dragOffset) > 2;
428
+ const panelTransitionCss = isActuallyDragging ? "none" : animation === "slide" ? `transform ${resolvedDuration}ms ${easing}` : `opacity ${resolvedDuration}ms ${easing}, transform ${resolvedDuration}ms ${easing}`;
429
+ const backdropTransitionCss = isActuallyDragging ? "none" : `opacity ${resolvedDuration}ms ${easing}`;
430
+ const handleBackdropClick = closeOnOutsideClick ? onClose : undefined;
431
+ const dragTransform = dragAxis === "x" ? `translateX(${dragOffset * dragSign}px)` : `translateY(${dragOffset * dragSign}px)`;
432
+ const currentTransform = isDragging ? isOpen ? dragTransform : `${hiddenTransform} ${dragTransform}` : panelTransform;
433
+ const currentOpacity = isDragging ? isOpen ? Math.max(0, 1 - Math.abs(dragOffset) / 150) : Math.min(1, Math.abs(dragOffset) / 150) : visible ? 1 : 0;
434
+ return /* @__PURE__ */ jsxDEV(Fragment2, {
435
+ children: [
436
+ mountAnchor,
437
+ createPortal(/* @__PURE__ */ jsxDEV("div", {
438
+ className: `relative z-[100] ${hideBackdrop ? "pointer-events-none" : ""} ${isDarkScope ? "deweb-dark-scope-portal" : ""}`,
439
+ role: "presentation",
440
+ children: [
441
+ !hideBackdrop && /* @__PURE__ */ jsxDEV("div", {
442
+ className: `fixed inset-0 ${backdropClass} ${blurClass} ${!isOpen && !isDragging ? "pointer-events-none" : ""}`,
443
+ onClick: handleBackdropClick,
444
+ style: {
445
+ willChange: "opacity, transform",
446
+ transform: "translateZ(0)",
447
+ backfaceVisibility: "hidden",
448
+ transition: backdropTransitionCss,
449
+ opacity: currentOpacity
450
+ }
451
+ }, undefined, false, undefined, this),
452
+ /* @__PURE__ */ jsxDEV("div", {
453
+ className: `fixed inset-0 z-10 w-screen ${hideBackdrop ? "pointer-events-none" : ""} ${isDragging || position === "bottom" && isSwipeable ? "overflow-y-hidden" : "overflow-y-auto"} ${!isOpen ? "pointer-events-none" : ""}`,
454
+ style: { overflowX: animation === "slide" && (position === "left" || position === "right") ? "clip" : "hidden" },
455
+ onClick: handleBackdropClick,
456
+ children: /* @__PURE__ */ jsxDEV("div", {
457
+ className: `flex min-h-full ${wrapperAlign} p-4 sm:p-0`,
458
+ children: /* @__PURE__ */ jsxDEV("div", {
459
+ ref: panelRef,
460
+ role: "dialog",
461
+ "aria-modal": "true",
462
+ "aria-labelledby": title ? titleId : undefined,
463
+ tabIndex: -1,
464
+ onClick: (e) => e.stopPropagation(),
465
+ onTransitionEnd: handleTransitionEnd,
466
+ className: `pointer-events-auto relative flex ${isVerticalLayout ? "flex-col md:flex-row h-[640px] max-h-[90vh]" : "flex-col max-h-[85vh]"} ${allowOverflow || !!stickyButton ? "overflow-visible" : "overflow-hidden"} w-full rounded-xl bg-[color:var(--color-card)] text-[color:var(--color-background-foreground)] text-left shadow-xl sm:my-8 ${maxWidthClass} ${position === "left" || position === "right" ? "mx-4" : ""} ${className}`,
467
+ style: {
468
+ willChange: "transform, opacity",
469
+ backfaceVisibility: "hidden",
470
+ transition: panelTransitionCss,
471
+ opacity: panelOpacity,
472
+ transform: currentTransform === "none" ? "translateZ(0)" : `${currentTransform} translateZ(0)`
473
+ },
474
+ children: [
475
+ stickyButton && /* @__PURE__ */ jsxDEV("div", {
476
+ className: `absolute pointer-events-auto top-1/2 -translate-y-1/2 ${position === "left" ? "left-full" : position === "bottom" ? "bottom-full left-1/2 -translate-x-1/2" : position === "top" ? "top-full left-1/2 -translate-x-1/2" : "right-full"} ${isSwipeable ? "cursor-grab active:cursor-grabbing touch-none" : ""}`,
477
+ onMouseDown: isSwipeable ? (e) => handleDragStart(dragAxis === "x" ? e.clientX : e.clientY) : undefined,
478
+ onTouchStart: isSwipeable ? (e) => handleDragStart(dragAxis === "x" ? e.touches[0].clientX : e.touches[0].clientY) : undefined,
479
+ onClickCapture: (e) => {
480
+ if (wasDraggedRef.current) {
481
+ e.stopPropagation();
482
+ e.preventDefault();
483
+ wasDraggedRef.current = false;
484
+ }
485
+ },
486
+ children: stickyButton
487
+ }, undefined, false, undefined, this),
488
+ isSwipeable && !stickyButton && /* @__PURE__ */ jsxDEV("div", {
489
+ className: `absolute flex cursor-grab touch-none active:cursor-grabbing z-50 ${dragAxis === "x" ? `h-16 w-4 items-center justify-center top-1/2 -translate-y-1/2 ${position === "right" ? "left-0" : "right-0"}` : `w-16 h-4 items-center justify-center left-1/2 -translate-x-1/2 ${position === "bottom" ? "top-0" : "bottom-0"}`}`,
490
+ onMouseDown: (e) => handleDragStart(dragAxis === "x" ? e.clientX : e.clientY),
491
+ onTouchStart: (e) => handleDragStart(dragAxis === "x" ? e.touches[0].clientX : e.touches[0].clientY),
492
+ children: /* @__PURE__ */ jsxDEV("div", {
493
+ className: `rounded-full bg-[color:var(--color-border)] opacity-60 hover:opacity-100 transition-opacity ${dragAxis === "x" ? "h-10 w-1" : "h-1 w-10"}`
494
+ }, undefined, false, undefined, this)
495
+ }, undefined, false, undefined, this),
496
+ (title || showCloseButton) && !isVerticalLayout && /* @__PURE__ */ jsxDEV("div", {
497
+ className: `flex items-center justify-between border-b border-[color:var(--color-border)] px-5 pb-3 pt-2.5 ${isSwipeable ? "pt-2" : ""}`,
498
+ children: [
499
+ title ? /* @__PURE__ */ jsxDEV("h3", {
500
+ id: titleId,
501
+ className: "w-full text-[15.5px] font-bold text-[color:var(--color-background-foreground)]",
502
+ children: title
503
+ }, undefined, false, undefined, this) : /* @__PURE__ */ jsxDEV("div", {}, undefined, false, undefined, this),
504
+ showCloseButton && /* @__PURE__ */ jsxDEV(Button2, {
505
+ variant: "ghost",
506
+ size: "sm",
507
+ onClick: onClose,
508
+ className: "!px-0 w-[30px] h-[30px] flex-none",
509
+ children: [
510
+ /* @__PURE__ */ jsxDEV("span", {
511
+ className: "sr-only",
512
+ children: "Close"
513
+ }, undefined, false, undefined, this),
514
+ /* @__PURE__ */ jsxDEV(Icon2, {
515
+ name: "close",
516
+ size: 14
517
+ }, undefined, false, undefined, this)
518
+ ]
519
+ }, undefined, true, undefined, this)
520
+ ]
521
+ }, undefined, true, undefined, this),
522
+ renderChildren()
523
+ ]
524
+ }, undefined, true, undefined, this)
525
+ }, undefined, false, undefined, this)
526
+ }, undefined, false, undefined, this)
527
+ ]
528
+ }, undefined, true, undefined, this), document.body)
529
+ ]
530
+ }, undefined, true, undefined, this);
531
+ }
532
+ function ModalCloseButton2({ onClose, className = "" }) {
533
+ return /* @__PURE__ */ jsxDEV("button", {
534
+ type: "button",
535
+ onClick: onClose,
536
+ className: `flex h-[26px] w-[26px] flex-none items-center justify-center rounded-md text-[color:var(--color-text-color)] hover:bg-[var(--color-secondary)] hover:text-[color:var(--color-secondary-foreground)] focus:outline-none focus:ring-2 focus:ring-[color:var(--color-primary)] focus:ring-offset-2 ${className}`,
537
+ children: [
538
+ /* @__PURE__ */ jsxDEV("span", {
539
+ className: "sr-only",
540
+ children: "Close"
541
+ }, undefined, false, undefined, this),
542
+ /* @__PURE__ */ jsxDEV(Icon2, {
543
+ name: "close",
544
+ size: 14
545
+ }, undefined, false, undefined, this)
546
+ ]
547
+ }, undefined, true, undefined, this);
548
+ }
549
+ function ModalCancelButton2({ children = "Batal", className = "", ...props }) {
550
+ return /* @__PURE__ */ jsxDEV("button", {
551
+ type: "button",
552
+ className: `text-center text-[13px] font-medium text-[color:var(--color-text-color)] hover:text-[color:var(--color-background-foreground)] disabled:opacity-50 ${className}`,
553
+ ...props,
554
+ children
555
+ }, undefined, false, undefined, this);
556
+ }
557
+ function ModalBody2({ children, className = "" }) {
558
+ return /* @__PURE__ */ jsxDEV("div", {
559
+ className: `flex-1 min-h-0 overflow-y-auto px-5 pb-6 pt-4 ${className}`,
560
+ children
561
+ }, undefined, false, undefined, this);
562
+ }
563
+ ModalBody2.__isModalLayoutChild = true;
564
+ function ModalFooter2({ children, className = "" }) {
565
+ return /* @__PURE__ */ jsxDEV("div", {
566
+ className: `flex flex-none flex-col-reverse gap-1.5 border-t border-[color:var(--color-border)] bg-[color:var(--color-card)] px-5 py-2.5 sm:flex-row sm:items-center sm:justify-between ${className}`,
567
+ children
568
+ }, undefined, false, undefined, this);
569
+ }
570
+ ModalFooter2.__isModalLayoutChild = true;
571
+ function ModalSidebar2({
572
+ children,
573
+ title,
574
+ icon,
575
+ footer,
576
+ className = "",
577
+ width = "w-full md:w-60 lg:w-64"
578
+ }) {
579
+ return /* @__PURE__ */ jsxDEV("div", {
580
+ className: `flex flex-col justify-between border-b md:border-b-0 md:border-r border-[color:var(--color-border)] bg-[color:var(--color-muted)]/20 p-4 shrink-0 ${width} ${className}`,
581
+ children: [
582
+ /* @__PURE__ */ jsxDEV("div", {
583
+ className: "space-y-4 min-w-0",
584
+ children: [
585
+ title && /* @__PURE__ */ jsxDEV("div", {
586
+ className: "flex items-center gap-2 px-2 py-1 select-none",
587
+ children: [
588
+ icon && /* @__PURE__ */ jsxDEV("div", {
589
+ className: "w-7 h-7 rounded-lg bg-[color:var(--color-primary)]/10 text-[color:var(--color-primary)] flex items-center justify-center font-bold shrink-0",
590
+ children: /* @__PURE__ */ jsxDEV(Icon2, {
591
+ name: icon,
592
+ size: 15
593
+ }, undefined, false, undefined, this)
594
+ }, undefined, false, undefined, this),
595
+ typeof title === "string" ? /* @__PURE__ */ jsxDEV("span", {
596
+ className: "font-bold text-sm tracking-tight text-[color:var(--color-background-foreground)] truncate",
597
+ children: title
598
+ }, undefined, false, undefined, this) : title
599
+ ]
600
+ }, undefined, true, undefined, this),
601
+ /* @__PURE__ */ jsxDEV("div", {
602
+ className: "space-y-1 overflow-y-auto",
603
+ children
604
+ }, undefined, false, undefined, this)
605
+ ]
606
+ }, undefined, true, undefined, this),
607
+ footer && /* @__PURE__ */ jsxDEV("div", {
608
+ className: "pt-3 border-t border-[color:var(--color-border)]/60 shrink-0 mt-4",
609
+ children: footer
610
+ }, undefined, false, undefined, this)
611
+ ]
612
+ }, undefined, true, undefined, this);
613
+ }
614
+ ModalSidebar2.__isModalLayoutChild = true;
615
+ function ModalContent2({ children, className = "" }) {
616
+ return /* @__PURE__ */ jsxDEV("div", {
617
+ className: `flex-1 flex flex-col min-w-0 overflow-hidden bg-[color:var(--color-card)] ${className}`,
618
+ children
619
+ }, undefined, false, undefined, this);
620
+ }
621
+ ModalContent2.__isModalLayoutChild = true;
622
+ function ModalHeader2({
623
+ title,
624
+ description,
625
+ actions,
626
+ onClose,
627
+ showCloseButton = true,
628
+ className = ""
629
+ }) {
630
+ return /* @__PURE__ */ jsxDEV("div", {
631
+ className: `flex items-center justify-between border-b border-[color:var(--color-border)] px-6 py-4 shrink-0 bg-[color:var(--color-card)] ${className}`,
632
+ children: [
633
+ /* @__PURE__ */ jsxDEV("div", {
634
+ className: "min-w-0 flex-1 pr-4",
635
+ children: [
636
+ title && (typeof title === "string" ? /* @__PURE__ */ jsxDEV("h3", {
637
+ className: "text-base font-bold text-[color:var(--color-background-foreground)] truncate",
638
+ children: title
639
+ }, undefined, false, undefined, this) : title),
640
+ description && /* @__PURE__ */ jsxDEV("p", {
641
+ className: "text-xs text-[color:var(--color-text-muted)] truncate mt-0.5",
642
+ children: description
643
+ }, undefined, false, undefined, this)
644
+ ]
645
+ }, undefined, true, undefined, this),
646
+ /* @__PURE__ */ jsxDEV("div", {
647
+ className: "flex items-center gap-2.5 shrink-0",
648
+ children: [
649
+ actions,
650
+ showCloseButton && onClose && /* @__PURE__ */ jsxDEV("button", {
651
+ type: "button",
652
+ onClick: onClose,
653
+ className: "flex h-8 w-8 items-center justify-center rounded-lg text-[color:var(--color-text-muted)] hover:bg-[color:var(--color-muted)] hover:text-[color:var(--color-background-foreground)] transition-colors cursor-pointer",
654
+ title: "Tutup",
655
+ "aria-label": "Tutup",
656
+ children: /* @__PURE__ */ jsxDEV(Icon2, {
657
+ name: "close",
658
+ size: 16
659
+ }, undefined, false, undefined, this)
660
+ }, undefined, false, undefined, this)
661
+ ]
662
+ }, undefined, true, undefined, this)
663
+ ]
664
+ }, undefined, true, undefined, this);
665
+ }
666
+ ModalHeader2.__isModalLayoutChild = true;
667
+ function SettingsModal2({
668
+ isOpen,
669
+ open,
670
+ onClose,
671
+ title = "Pengaturan",
672
+ icon = "settings",
673
+ tabs,
674
+ activeTab: controlledTab,
675
+ defaultTab,
676
+ onTabChange,
677
+ userProfile,
678
+ footerActions,
679
+ className = "",
680
+ sidebarWidth,
681
+ maxWidth = "4xl"
682
+ }) {
683
+ const effectiveOpen = Boolean(isOpen ?? open);
684
+ const [internalTab, setInternalTab] = useState2(defaultTab || tabs[0]?.id || "");
685
+ const currentTabId = controlledTab !== undefined ? controlledTab : internalTab;
686
+ const handleSelectTab = (id) => {
687
+ if (controlledTab === undefined) {
688
+ setInternalTab(id);
689
+ }
690
+ onTabChange?.(id);
691
+ };
692
+ const activeTabItem = tabs.find((t) => t.id === currentTabId) || tabs[0];
693
+ return /* @__PURE__ */ jsxDEV(Modal2, {
694
+ open: effectiveOpen,
695
+ onClose,
696
+ orientation: "vertical",
697
+ maxWidth,
698
+ className,
699
+ showCloseButton: false,
700
+ children: [
701
+ /* @__PURE__ */ jsxDEV(ModalSidebar2, {
702
+ title,
703
+ icon,
704
+ width: sidebarWidth,
705
+ footer: userProfile,
706
+ children: /* @__PURE__ */ jsxDEV("nav", {
707
+ className: "space-y-1",
708
+ children: tabs.map((tab) => {
709
+ const isActive = tab.id === activeTabItem?.id;
710
+ return /* @__PURE__ */ jsxDEV("button", {
711
+ type: "button",
712
+ onClick: () => handleSelectTab(tab.id),
713
+ className: `w-full flex items-center justify-between px-3 py-2 rounded-lg text-xs font-medium transition-colors text-left cursor-pointer ${isActive ? "bg-[color:var(--color-primary)] text-[color:var(--color-primary-foreground)] font-semibold shadow-xs" : "text-[color:var(--color-text-muted)] hover:text-[color:var(--color-background-foreground)] hover:bg-[color:var(--color-muted)]/60"}`,
714
+ children: [
715
+ /* @__PURE__ */ jsxDEV("div", {
716
+ className: "flex items-center gap-2.5 min-w-0",
717
+ children: [
718
+ tab.icon && /* @__PURE__ */ jsxDEV(Icon2, {
719
+ name: tab.icon,
720
+ size: 15,
721
+ className: "shrink-0"
722
+ }, undefined, false, undefined, this),
723
+ /* @__PURE__ */ jsxDEV("span", {
724
+ className: "truncate",
725
+ children: tab.label
726
+ }, undefined, false, undefined, this)
727
+ ]
728
+ }, undefined, true, undefined, this),
729
+ tab.badge && /* @__PURE__ */ jsxDEV("span", {
730
+ className: "shrink-0 ml-1.5",
731
+ children: tab.badge
732
+ }, undefined, false, undefined, this)
733
+ ]
734
+ }, tab.id, true, undefined, this);
735
+ })
736
+ }, undefined, false, undefined, this)
737
+ }, undefined, false, undefined, this),
738
+ /* @__PURE__ */ jsxDEV(ModalContent2, {
739
+ children: [
740
+ activeTabItem && /* @__PURE__ */ jsxDEV(Fragment2, {
741
+ children: [
742
+ /* @__PURE__ */ jsxDEV(ModalHeader2, {
743
+ title: activeTabItem.title || activeTabItem.label,
744
+ description: activeTabItem.description,
745
+ actions: activeTabItem.actions,
746
+ onClose
747
+ }, undefined, false, undefined, this),
748
+ /* @__PURE__ */ jsxDEV("div", {
749
+ className: "flex-1 overflow-y-auto p-6 space-y-6",
750
+ children: activeTabItem.content
751
+ }, undefined, false, undefined, this)
752
+ ]
753
+ }, undefined, true, undefined, this),
754
+ footerActions && /* @__PURE__ */ jsxDEV("div", {
755
+ className: "border-t border-[color:var(--color-border)] px-6 py-3.5 bg-[color:var(--color-card)] flex items-center justify-end gap-2 shrink-0",
756
+ children: footerActions
757
+ }, undefined, false, undefined, this)
758
+ ]
759
+ }, undefined, true, undefined, this)
760
+ ]
761
+ }, undefined, true, undefined, this);
762
+ }
763
+ SettingsModal2.__isModalLayoutChild = true;
764
+ function Tooltip2({ content, children, position = "top", className = "" }) {
765
+ const positionClasses = {
766
+ top: "bottom-full left-1/2 -translate-x-1/2 mb-2",
767
+ bottom: "top-full left-1/2 -translate-x-1/2 mt-2",
768
+ left: "right-full top-1/2 -translate-y-1/2 mr-2",
769
+ right: "left-full top-1/2 -translate-y-1/2 ml-2"
770
+ };
771
+ const arrowClasses = {
772
+ top: "top-full left-1/2 -translate-x-1/2 border-t-tooltip border-l-transparent border-r-transparent border-b-transparent",
773
+ bottom: "bottom-full left-1/2 -translate-x-1/2 border-b-tooltip border-l-transparent border-r-transparent border-t-transparent",
774
+ left: "left-full top-1/2 -translate-y-1/2 border-l-tooltip border-t-transparent border-b-transparent border-r-transparent",
775
+ right: "right-full top-1/2 -translate-y-1/2 border-r-tooltip border-t-transparent border-b-transparent border-l-transparent"
776
+ };
777
+ return /* @__PURE__ */ jsxDEV("div", {
778
+ className: `group relative inline-flex ${className}`,
779
+ tabIndex: 0,
780
+ role: "tooltip",
781
+ children: [
782
+ children,
783
+ /* @__PURE__ */ jsxDEV("div", {
784
+ className: `pointer-events-none absolute z-[110] whitespace-nowrap opacity-0 transition-opacity duration-200 group-hover:opacity-100 group-focus:opacity-100 group-active:opacity-100 focus-within:opacity-100 ${positionClasses[position]}`,
785
+ children: [
786
+ /* @__PURE__ */ jsxDEV("div", {
787
+ className: "rounded bg-tooltip px-2.5 py-1.5 text-xs font-medium text-tooltip-foreground shadow-lg",
788
+ children: content
789
+ }, undefined, false, undefined, this),
790
+ /* @__PURE__ */ jsxDEV("div", {
791
+ className: `absolute h-0 w-0 border-4 ${arrowClasses[position]}`
792
+ }, undefined, false, undefined, this)
793
+ ]
794
+ }, undefined, true, undefined, this)
795
+ ]
796
+ }, undefined, true, undefined, this);
797
+ }
798
+ function ModalSlide2({
799
+ isOpen,
800
+ onClose,
801
+ title,
802
+ steps,
803
+ currentStep,
804
+ onStepChange,
805
+ animation = "slide",
806
+ maxWidth = "md",
807
+ position = "center",
808
+ disableStepClick = false,
809
+ hideStepTracker = false,
810
+ showCloseButton = true
811
+ }) {
812
+ const [activeStepDisplay, setActiveStepDisplay] = React.useState(currentStep);
813
+ const [isAnimating, setIsAnimating] = React.useState(false);
814
+ const [slideDirection, setSlideDirection] = React.useState("none");
815
+ React.useEffect(() => {
816
+ if (currentStep !== activeStepDisplay) {
817
+ setSlideDirection(currentStep > activeStepDisplay ? "left" : "right");
818
+ setIsAnimating(true);
819
+ const timer = setTimeout(() => {
820
+ setActiveStepDisplay(currentStep);
821
+ setSlideDirection("none");
822
+ setIsAnimating(false);
823
+ }, 200);
824
+ return () => clearTimeout(timer);
825
+ }
826
+ }, [currentStep, activeStepDisplay]);
827
+ const handleStepClick = (idx) => {
828
+ if (disableStepClick || idx === currentStep || steps[idx].disabled)
829
+ return;
830
+ onStepChange?.(idx);
831
+ };
832
+ const getAnimationClasses = () => {
833
+ if (animation === "none")
834
+ return "";
835
+ if (animation === "fade") {
836
+ return `transition-opacity duration-200 ${isAnimating ? "opacity-0" : "opacity-100"}`;
837
+ }
838
+ if (isAnimating) {
839
+ return `absolute w-full opacity-0 transition-all duration-200 ${slideDirection === "left" ? "-translate-x-4" : "translate-x-4"}`;
840
+ }
841
+ return "translate-x-0 opacity-100 transition-all duration-200";
842
+ };
843
+ const modalAnimation = animation === "slide" ? "slide" : animation === "fade" ? "fade" : "fade";
844
+ return /* @__PURE__ */ jsxDEV(Modal2, {
845
+ isOpen,
846
+ onClose,
847
+ title,
848
+ maxWidth,
849
+ position,
850
+ showCloseButton,
851
+ animation: modalAnimation,
852
+ children: [
853
+ !hideStepTracker && /* @__PURE__ */ jsxDEV("div", {
854
+ className: "mb-6 flex-none flex w-full items-center justify-center px-4 pt-5",
855
+ children: steps.map((step, idx) => {
856
+ const isPast = idx < currentStep;
857
+ const isCurrent = idx === currentStep;
858
+ const isDisabled = step.disabled;
859
+ let circleClass = "bg-[var(--color-border)] text-[color:var(--color-muted-foreground)]";
860
+ if (isCurrent)
861
+ circleClass = "bg-[var(--color-primary)] text-[color:var(--color-primary-foreground)]";
862
+ else if (isPast)
863
+ circleClass = "bg-[var(--color-secondary)] text-[color:var(--color-secondary-foreground)]";
864
+ if (isDisabled)
865
+ circleClass += " opacity-50 cursor-not-allowed";
866
+ else if (disableStepClick)
867
+ circleClass += " cursor-default";
868
+ else
869
+ circleClass += " cursor-pointer hover:opacity-80 transition-opacity";
870
+ return /* @__PURE__ */ jsxDEV(React.Fragment, {
871
+ children: [
872
+ /* @__PURE__ */ jsxDEV("div", {
873
+ className: "flex flex-col items-center",
874
+ children: [
875
+ /* @__PURE__ */ jsxDEV("button", {
876
+ type: "button",
877
+ disabled: isDisabled || isAnimating || disableStepClick,
878
+ onClick: () => handleStepClick(idx),
879
+ className: `flex h-8 w-8 select-none items-center justify-center rounded-full text-sm font-bold ${circleClass}`,
880
+ children: idx + 1
881
+ }, undefined, false, undefined, this),
882
+ step.label && /* @__PURE__ */ jsxDEV("span", {
883
+ className: `absolute mt-1.5 translate-y-9 whitespace-nowrap text-xs font-medium ${isCurrent ? "text-[color:var(--color-background-foreground)]" : "text-[color:var(--color-text-color)]"}`,
884
+ children: step.label
885
+ }, undefined, false, undefined, this)
886
+ ]
887
+ }, undefined, true, undefined, this),
888
+ idx < steps.length - 1 && /* @__PURE__ */ jsxDEV("div", {
889
+ className: `mx-3 h-1 max-w-[120px] flex-1 rounded transition-colors duration-300 ${idx < currentStep ? "bg-[var(--color-secondary)]" : "bg-[var(--color-border)]"}`
890
+ }, undefined, false, undefined, this)
891
+ ]
892
+ }, step.id, true, undefined, this);
893
+ })
894
+ }, undefined, false, undefined, this),
895
+ /* @__PURE__ */ jsxDEV(ModalBody2, {
896
+ className: `relative ${!hideStepTracker && steps.some((s) => s.label) ? "pt-6" : "pt-4"}`,
897
+ children: /* @__PURE__ */ jsxDEV("div", {
898
+ className: getAnimationClasses(),
899
+ children: steps[activeStepDisplay]?.content
900
+ }, undefined, false, undefined, this)
901
+ }, undefined, false, undefined, this),
902
+ steps[activeStepDisplay]?.footer
903
+ ]
904
+ }, undefined, true, undefined, this);
905
+ }
906
+ function ModalButtonAlternate2({ children, className = "", onClick, ...props }) {
907
+ return /* @__PURE__ */ jsxDEV(Button2, {
908
+ variant: "outline",
909
+ color: "muted",
910
+ className,
911
+ onClick,
912
+ ...props,
913
+ children: children || "Batal"
914
+ }, undefined, false, undefined, this);
915
+ }
916
+
917
+ export { Modal2, ModalCloseButton2, ModalCancelButton2, ModalBody2, ModalFooter2, ModalSidebar2, ModalContent2, ModalHeader2, SettingsModal2, Tooltip2, ModalSlide2, ModalButtonAlternate2 };
918
+
919
+ //# debugId=AA597A37D9DF9C0264756E2164756E21