monobill-mintui 0.6.612 → 0.6.613

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 (623) hide show
  1. package/README.md +76 -302
  2. package/bin/component-dependencies.json +131 -0
  3. package/bin/mint-ui.js +446 -0
  4. package/dist/alert.css +3 -0
  5. package/dist/back-button.css +3 -0
  6. package/dist/bottom-navigation.css +3 -0
  7. package/dist/button.css +3 -0
  8. package/dist/card.css +3 -0
  9. package/dist/chart.css +3 -0
  10. package/dist/checkbox.css +3 -0
  11. package/dist/chip.css +3 -0
  12. package/dist/choice.css +3 -0
  13. package/dist/clickable.css +3 -0
  14. package/dist/collapsible.css +3 -0
  15. package/dist/components/alert/Alert.d.ts +1 -32
  16. package/dist/components/alert/Alert.d.ts.map +10 -1
  17. package/dist/components/alert/browser.js +167 -0
  18. package/dist/components/alert/index.cjs +1 -0
  19. package/dist/components/alert/index.d.ts +1 -3
  20. package/dist/components/alert/index.d.ts.map +10 -1
  21. package/dist/components/alert/index.js +155 -0
  22. package/dist/components/back-button/BackButton.d.ts +1 -18
  23. package/dist/components/back-button/BackButton.d.ts.map +10 -1
  24. package/dist/components/back-button/browser.js +241 -0
  25. package/dist/components/back-button/index.cjs +1 -0
  26. package/dist/components/back-button/index.d.ts +1 -3
  27. package/dist/components/back-button/index.d.ts.map +10 -1
  28. package/dist/components/back-button/index.js +229 -0
  29. package/dist/components/bottom-navigation/BottomNavigation.d.ts +1 -10
  30. package/dist/components/bottom-navigation/BottomNavigation.d.ts.map +10 -1
  31. package/dist/components/bottom-navigation/browser.js +97 -0
  32. package/dist/components/bottom-navigation/index.cjs +1 -0
  33. package/dist/components/bottom-navigation/index.d.ts +2 -5
  34. package/dist/components/bottom-navigation/index.d.ts.map +10 -1
  35. package/dist/components/bottom-navigation/index.js +85 -0
  36. package/dist/components/button/Button.d.ts +1 -57
  37. package/dist/components/button/Button.d.ts.map +10 -1
  38. package/dist/components/button/browser.js +18 -0
  39. package/dist/components/button/index.cjs +1 -0
  40. package/dist/components/button/index.d.ts +1 -3
  41. package/dist/components/button/index.d.ts.map +10 -1
  42. package/dist/components/button/index.js +6 -0
  43. package/dist/components/card/Card.d.ts +1 -17
  44. package/dist/components/card/Card.d.ts.map +10 -1
  45. package/dist/components/card/browser.js +25 -0
  46. package/dist/components/card/index.cjs +1 -0
  47. package/dist/components/card/index.d.ts +1 -3
  48. package/dist/components/card/index.d.ts.map +10 -1
  49. package/dist/components/card/index.js +13 -0
  50. package/dist/components/chart/Chart.d.ts +1 -291
  51. package/dist/components/chart/Chart.d.ts.map +10 -1
  52. package/dist/components/chart/browser.js +1331 -0
  53. package/dist/components/chart/index.cjs +37 -0
  54. package/dist/components/chart/index.d.ts +1 -3
  55. package/dist/components/chart/index.d.ts.map +10 -1
  56. package/dist/components/chart/index.js +1319 -0
  57. package/dist/components/checkbox/Checkbox.d.ts +1 -41
  58. package/dist/components/checkbox/Checkbox.d.ts.map +10 -1
  59. package/dist/components/checkbox/browser.js +162 -0
  60. package/dist/components/checkbox/index.cjs +1 -0
  61. package/dist/components/checkbox/index.d.ts +1 -3
  62. package/dist/components/checkbox/index.d.ts.map +10 -1
  63. package/dist/components/checkbox/index.js +150 -0
  64. package/dist/components/chip/Chip.d.ts +1 -16
  65. package/dist/components/chip/Chip.d.ts.map +10 -1
  66. package/dist/components/chip/browser.js +17 -0
  67. package/dist/components/chip/index.cjs +1 -0
  68. package/dist/components/chip/index.d.ts +1 -3
  69. package/dist/components/chip/index.d.ts.map +10 -1
  70. package/dist/components/chip/index.js +5 -0
  71. package/dist/components/choice/Choice.d.ts +1 -27
  72. package/dist/components/choice/Choice.d.ts.map +10 -1
  73. package/dist/components/choice/browser.js +272 -0
  74. package/dist/components/choice/index.cjs +1 -0
  75. package/dist/components/choice/index.d.ts +1 -5
  76. package/dist/components/choice/index.d.ts.map +10 -1
  77. package/dist/components/choice/index.js +260 -0
  78. package/dist/components/chunks/button-B0Yt0MX1.js +380 -0
  79. package/dist/components/chunks/button-BlbLHMts.js +1 -0
  80. package/dist/components/chunks/caret-down-BN9cl4o4.js +1 -0
  81. package/dist/components/chunks/caret-down-Ch6IfR7r.js +9 -0
  82. package/dist/components/chunks/caret-right-CDUwqoen.js +1 -0
  83. package/dist/components/chunks/caret-right-CVOgr4nk.js +9 -0
  84. package/dist/components/chunks/caret-up-3XCuTXSE.js +1 -0
  85. package/dist/components/chunks/caret-up-D_6oa7o1.js +9 -0
  86. package/dist/components/chunks/chip-B04bJM4r.js +1 -0
  87. package/dist/components/chunks/chip-B9whjEvW.js +54 -0
  88. package/dist/components/chunks/close-5tYlQdkk.js +1 -0
  89. package/dist/components/chunks/close-Dg6U0IjZ.js +10 -0
  90. package/dist/components/chunks/icon-C0OLmjDY.js +1 -0
  91. package/dist/components/chunks/icon-CyzR9aVl.js +1 -0
  92. package/dist/components/chunks/icon-dG8sLTBn.js +27 -0
  93. package/dist/components/chunks/icon-gQAtsERy.js +1324 -0
  94. package/dist/components/chunks/input-8bbXzpa5.js +334 -0
  95. package/dist/components/chunks/input-BoiREc6Y.js +1 -0
  96. package/dist/components/chunks/link-BxhPnVaz.js +1 -0
  97. package/dist/components/chunks/link-DKgtBYK6.js +38 -0
  98. package/dist/components/chunks/modal-B8gNdwEl.js +153 -0
  99. package/dist/components/chunks/modal-WYWvk2lZ.js +1 -0
  100. package/dist/components/chunks/popover-BeaGf_JC.js +1 -0
  101. package/dist/components/chunks/popover-gviDCspV.js +188 -0
  102. package/dist/components/chunks/register-element-BFYmIynH.js +53 -0
  103. package/dist/components/chunks/register-element-tCL_F1YI.js +1 -0
  104. package/dist/components/chunks/search-ANUKQi0r.js +9 -0
  105. package/dist/components/chunks/search-B3egXuw4.js +1 -0
  106. package/dist/components/chunks/spinner-BsaFHuS6.js +108 -0
  107. package/dist/components/chunks/spinner-DbTohC6i.js +63 -0
  108. package/dist/components/chunks/stack-D1uh4L79.js +1 -0
  109. package/dist/components/chunks/stack-DyQfjPDh.js +53 -0
  110. package/dist/components/chunks/table-BgboosRK.js +65 -0
  111. package/dist/components/chunks/table-DDUNUwGd.js +1 -0
  112. package/dist/components/chunks/text-BHkEs8U5.js +67 -0
  113. package/dist/components/chunks/text-BmHZbBMo.js +1 -0
  114. package/dist/components/clickable/Clickable.d.ts +1 -14
  115. package/dist/components/clickable/Clickable.d.ts.map +10 -1
  116. package/dist/components/clickable/browser.js +78 -0
  117. package/dist/components/clickable/index.cjs +1 -0
  118. package/dist/components/clickable/index.d.ts +1 -3
  119. package/dist/components/clickable/index.d.ts.map +10 -1
  120. package/dist/components/clickable/index.js +66 -0
  121. package/dist/components/collapsible/Collapsible.d.ts +1 -28
  122. package/dist/components/collapsible/Collapsible.d.ts.map +10 -1
  123. package/dist/components/collapsible/browser.js +170 -0
  124. package/dist/components/collapsible/index.cjs +1 -0
  125. package/dist/components/collapsible/index.d.ts +1 -3
  126. package/dist/components/collapsible/index.d.ts.map +10 -1
  127. package/dist/components/collapsible/index.js +158 -0
  128. package/dist/components/confirm-action/ConfirmAction.d.ts +1 -27
  129. package/dist/components/confirm-action/ConfirmAction.d.ts.map +10 -1
  130. package/dist/components/confirm-action/browser.js +130 -0
  131. package/dist/components/confirm-action/index.cjs +1 -0
  132. package/dist/components/confirm-action/index.d.ts +2 -3
  133. package/dist/components/confirm-action/index.d.ts.map +10 -1
  134. package/dist/components/confirm-action/index.js +118 -0
  135. package/dist/components/date-picker/DatePicker.d.ts +1 -130
  136. package/dist/components/date-picker/DatePicker.d.ts.map +10 -1
  137. package/dist/components/date-picker/browser.js +1288 -0
  138. package/dist/components/date-picker/index.cjs +1 -0
  139. package/dist/components/date-picker/index.d.ts +1 -3
  140. package/dist/components/date-picker/index.d.ts.map +10 -1
  141. package/dist/components/date-picker/index.js +1276 -0
  142. package/dist/components/dropzone/Dropzone.d.ts +1 -59
  143. package/dist/components/dropzone/Dropzone.d.ts.map +10 -1
  144. package/dist/components/dropzone/browser.js +355 -0
  145. package/dist/components/dropzone/index.cjs +1 -0
  146. package/dist/components/dropzone/index.d.ts +1 -3
  147. package/dist/components/dropzone/index.d.ts.map +10 -1
  148. package/dist/components/dropzone/index.js +343 -0
  149. package/dist/components/form/Form.d.ts +1 -133
  150. package/dist/components/form/Form.d.ts.map +10 -1
  151. package/dist/components/form/browser.js +1002 -0
  152. package/dist/components/form/index.cjs +1 -0
  153. package/dist/components/form/index.d.ts +1 -3
  154. package/dist/components/form/index.d.ts.map +10 -1
  155. package/dist/components/form/index.js +990 -0
  156. package/dist/components/grid/Grid.d.ts +1 -16
  157. package/dist/components/grid/Grid.d.ts.map +10 -1
  158. package/dist/components/grid/browser.js +24 -0
  159. package/dist/components/grid/index.cjs +1 -0
  160. package/dist/components/grid/index.d.ts +1 -3
  161. package/dist/components/grid/index.d.ts.map +10 -1
  162. package/dist/components/grid/index.js +12 -0
  163. package/dist/components/icon/Icon.d.ts +1 -16
  164. package/dist/components/icon/Icon.d.ts.map +10 -1
  165. package/dist/components/icon/browser.js +16 -0
  166. package/dist/components/icon/index.cjs +1 -0
  167. package/dist/components/icon/index.d.ts +2 -3
  168. package/dist/components/icon/index.d.ts.map +10 -1
  169. package/dist/components/icon/index.js +4 -0
  170. package/dist/components/input/Input.d.ts +1 -68
  171. package/dist/components/input/Input.d.ts.map +10 -1
  172. package/dist/components/input/browser.js +17 -0
  173. package/dist/components/input/index.cjs +1 -0
  174. package/dist/components/input/index.d.ts +1 -3
  175. package/dist/components/input/index.d.ts.map +10 -1
  176. package/dist/components/input/index.js +5 -0
  177. package/dist/components/link/Link.d.ts +1 -16
  178. package/dist/components/link/Link.d.ts.map +10 -1
  179. package/dist/components/link/browser.js +16 -0
  180. package/dist/components/link/index.cjs +1 -0
  181. package/dist/components/link/index.d.ts +1 -3
  182. package/dist/components/link/index.d.ts.map +10 -1
  183. package/dist/components/link/index.js +4 -0
  184. package/dist/components/modal/Modal.d.ts +1 -38
  185. package/dist/components/modal/Modal.d.ts.map +10 -1
  186. package/dist/components/modal/browser.js +21 -0
  187. package/dist/components/modal/index.cjs +1 -0
  188. package/dist/components/modal/index.d.ts +1 -3
  189. package/dist/components/modal/index.d.ts.map +10 -1
  190. package/dist/components/modal/index.js +9 -0
  191. package/dist/components/navigation/Navigation.d.ts +1 -0
  192. package/dist/components/navigation/Navigation.d.ts.map +10 -0
  193. package/dist/components/navigation/browser.js +198 -0
  194. package/dist/components/navigation/index.cjs +1 -0
  195. package/dist/components/navigation/index.d.ts +1 -0
  196. package/dist/components/navigation/index.d.ts.map +10 -0
  197. package/dist/components/navigation/index.js +186 -0
  198. package/dist/components/off-canvas/OffCanvas.d.ts +1 -46
  199. package/dist/components/off-canvas/OffCanvas.d.ts.map +10 -1
  200. package/dist/components/off-canvas/browser.js +192 -0
  201. package/dist/components/off-canvas/index.cjs +1 -0
  202. package/dist/components/off-canvas/index.d.ts +1 -3
  203. package/dist/components/off-canvas/index.d.ts.map +10 -1
  204. package/dist/components/off-canvas/index.js +180 -0
  205. package/dist/components/page/Page.d.ts +1 -37
  206. package/dist/components/page/Page.d.ts.map +10 -1
  207. package/dist/components/page/browser.js +74 -0
  208. package/dist/components/page/index.cjs +16 -0
  209. package/dist/components/page/index.d.ts +1 -3
  210. package/dist/components/page/index.d.ts.map +10 -1
  211. package/dist/components/page/index.js +62 -0
  212. package/dist/components/popover/Popover.d.ts +1 -64
  213. package/dist/components/popover/Popover.d.ts.map +10 -1
  214. package/dist/components/popover/browser.js +17 -0
  215. package/dist/components/popover/index.cjs +1 -0
  216. package/dist/components/popover/index.d.ts +1 -3
  217. package/dist/components/popover/index.d.ts.map +10 -1
  218. package/dist/components/popover/index.js +5 -0
  219. package/dist/components/resource-table/ResourceTable.d.ts +1 -327
  220. package/dist/components/resource-table/ResourceTable.d.ts.map +10 -1
  221. package/dist/components/resource-table/browser.js +1457 -0
  222. package/dist/components/resource-table/index.cjs +2 -0
  223. package/dist/components/resource-table/index.d.ts +1 -4
  224. package/dist/components/resource-table/index.d.ts.map +10 -1
  225. package/dist/components/resource-table/index.js +1445 -0
  226. package/dist/components/search/Search.d.ts +1 -151
  227. package/dist/components/search/Search.d.ts.map +10 -1
  228. package/dist/components/search/browser.js +681 -0
  229. package/dist/components/search/index.cjs +1 -0
  230. package/dist/components/search/index.d.ts +1 -3
  231. package/dist/components/search/index.d.ts.map +10 -1
  232. package/dist/components/search/index.js +669 -0
  233. package/dist/components/select/Select.d.ts +1 -37
  234. package/dist/components/select/Select.d.ts.map +10 -1
  235. package/dist/components/select/browser.js +285 -0
  236. package/dist/components/select/index.cjs +1 -0
  237. package/dist/components/select/index.d.ts +1 -3
  238. package/dist/components/select/index.d.ts.map +10 -1
  239. package/dist/components/select/index.js +273 -0
  240. package/dist/components/side-navigation/SideNavigation.d.ts +1 -52
  241. package/dist/components/side-navigation/SideNavigation.d.ts.map +10 -1
  242. package/dist/components/side-navigation/browser.js +466 -0
  243. package/dist/components/side-navigation/index.cjs +1 -0
  244. package/dist/components/side-navigation/index.d.ts +5 -8
  245. package/dist/components/side-navigation/index.d.ts.map +10 -1
  246. package/dist/components/side-navigation/index.js +454 -0
  247. package/dist/components/sortable/Sortable.d.ts +1 -62
  248. package/dist/components/sortable/Sortable.d.ts.map +10 -1
  249. package/dist/components/sortable/browser.js +340 -0
  250. package/dist/components/sortable/index.cjs +1 -0
  251. package/dist/components/sortable/index.d.ts +1 -3
  252. package/dist/components/sortable/index.d.ts.map +10 -1
  253. package/dist/components/sortable/index.js +328 -0
  254. package/dist/components/spinner/Spinner.d.ts +1 -13
  255. package/dist/components/spinner/Spinner.d.ts.map +10 -1
  256. package/dist/components/spinner/browser.js +16 -0
  257. package/dist/components/spinner/index.cjs +1 -0
  258. package/dist/components/spinner/index.d.ts +1 -3
  259. package/dist/components/spinner/index.d.ts.map +10 -1
  260. package/dist/components/spinner/index.js +4 -0
  261. package/dist/components/stack/Stack.d.ts +1 -23
  262. package/dist/components/stack/Stack.d.ts.map +10 -1
  263. package/dist/components/stack/browser.js +16 -0
  264. package/dist/components/stack/index.cjs +1 -0
  265. package/dist/components/stack/index.d.ts +1 -3
  266. package/dist/components/stack/index.d.ts.map +10 -1
  267. package/dist/components/stack/index.js +4 -0
  268. package/dist/components/switch/Switch.d.ts +1 -33
  269. package/dist/components/switch/Switch.d.ts.map +10 -1
  270. package/dist/components/switch/browser.js +203 -0
  271. package/dist/components/switch/index.cjs +1 -0
  272. package/dist/components/switch/index.d.ts +1 -3
  273. package/dist/components/switch/index.d.ts.map +10 -1
  274. package/dist/components/switch/index.js +191 -0
  275. package/dist/components/table/Table.d.ts +1 -11
  276. package/dist/components/table/Table.d.ts.map +10 -1
  277. package/dist/components/table/browser.js +16 -0
  278. package/dist/components/table/index.cjs +1 -0
  279. package/dist/components/table/index.d.ts +1 -3
  280. package/dist/components/table/index.d.ts.map +10 -1
  281. package/dist/components/table/index.js +4 -0
  282. package/dist/components/tabs/Tabs.d.ts +1 -20
  283. package/dist/components/tabs/Tabs.d.ts.map +10 -1
  284. package/dist/components/tabs/browser.js +251 -0
  285. package/dist/components/tabs/index.cjs +1 -0
  286. package/dist/components/tabs/index.d.ts +4 -9
  287. package/dist/components/tabs/index.d.ts.map +10 -1
  288. package/dist/components/tabs/index.js +239 -0
  289. package/dist/components/tags/Tags.d.ts +1 -82
  290. package/dist/components/tags/Tags.d.ts.map +10 -1
  291. package/dist/components/tags/browser.js +416 -0
  292. package/dist/components/tags/index.cjs +1 -0
  293. package/dist/components/tags/index.d.ts +1 -3
  294. package/dist/components/tags/index.d.ts.map +10 -1
  295. package/dist/components/tags/index.js +404 -0
  296. package/dist/components/text/Text.d.ts +1 -25
  297. package/dist/components/text/Text.d.ts.map +10 -1
  298. package/dist/components/text/browser.js +16 -0
  299. package/dist/components/text/index.cjs +1 -0
  300. package/dist/components/text/index.d.ts +1 -3
  301. package/dist/components/text/index.d.ts.map +10 -1
  302. package/dist/components/text/index.js +4 -0
  303. package/dist/components/time-picker/TimePicker.d.ts +1 -61
  304. package/dist/components/time-picker/TimePicker.d.ts.map +10 -1
  305. package/dist/components/time-picker/browser.js +366 -0
  306. package/dist/components/time-picker/index.cjs +1 -0
  307. package/dist/components/time-picker/index.d.ts +1 -3
  308. package/dist/components/time-picker/index.d.ts.map +10 -1
  309. package/dist/components/time-picker/index.js +354 -0
  310. package/dist/components/toast/Toast.d.ts +1 -21
  311. package/dist/components/toast/Toast.d.ts.map +10 -1
  312. package/dist/components/toast/browser.js +147 -0
  313. package/dist/components/toast/index.cjs +3 -0
  314. package/dist/components/toast/index.d.ts +3 -3
  315. package/dist/components/toast/index.d.ts.map +10 -1
  316. package/dist/components/toast/index.js +135 -0
  317. package/dist/confirm-action.css +3 -0
  318. package/dist/date-picker.css +3 -0
  319. package/dist/dropzone.css +3 -0
  320. package/dist/form.css +3 -0
  321. package/dist/grid.css +3 -0
  322. package/dist/icon.css +3 -0
  323. package/dist/icons/ai.svg +5 -6
  324. package/dist/icons/bank.svg +1 -1
  325. package/dist/icons/barcode.svg +1 -1
  326. package/dist/icons/basket.svg +1 -1
  327. package/dist/icons/building.svg +1 -1
  328. package/dist/icons/buildings.svg +1 -1
  329. package/dist/icons/calendar.svg +1 -1
  330. package/dist/icons/cash.svg +3 -0
  331. package/dist/icons/check.svg +1 -1
  332. package/dist/icons/close.svg +1 -1
  333. package/dist/icons/coupon.svg +3 -0
  334. package/dist/icons/delivery-location.svg +3 -0
  335. package/dist/icons/desktop.svg +3 -0
  336. package/dist/icons/dollar-sign.svg +1 -1
  337. package/dist/icons/edit.svg +1 -1
  338. package/dist/icons/gift.svg +3 -0
  339. package/dist/icons/grip-lines.svg +2 -2
  340. package/dist/icons/heart.svg +3 -0
  341. package/dist/icons/installments.svg +3 -0
  342. package/dist/icons/inventory.svg +3 -0
  343. package/dist/icons/invoice.svg +3 -0
  344. package/dist/icons/loyalty-points.svg +3 -0
  345. package/dist/icons/membership.svg +3 -0
  346. package/dist/icons/mobile.svg +3 -0
  347. package/dist/icons/order-tracking.svg +7 -0
  348. package/dist/icons/out-of-stock.svg +3 -0
  349. package/dist/icons/package.svg +3 -0
  350. package/dist/icons/percent-discount.svg +3 -0
  351. package/dist/icons/pickup.svg +3 -0
  352. package/dist/icons/plus.svg +1 -1
  353. package/dist/icons/price-label.svg +3 -0
  354. package/dist/icons/product-review.svg +3 -0
  355. package/dist/icons/receipt.svg +3 -0
  356. package/dist/icons/refund.svg +3 -0
  357. package/dist/icons/remove.svg +1 -1
  358. package/dist/icons/return.svg +3 -0
  359. package/dist/icons/sale-burst.svg +3 -0
  360. package/dist/icons/secure-checkout.svg +3 -0
  361. package/dist/icons/shopping-bag.svg +3 -0
  362. package/dist/icons/shopping-cart.svg +3 -0
  363. package/dist/icons/storefront.svg +3 -0
  364. package/dist/icons/support.svg +3 -0
  365. package/dist/icons/tablet.svg +3 -0
  366. package/dist/icons/wallet.svg +3 -0
  367. package/dist/icons/warehouse.svg +3 -0
  368. package/dist/index.cjs +83 -79
  369. package/dist/index.css +253 -0
  370. package/dist/index.d.ts +94 -91
  371. package/dist/index.d.ts.map +10 -1
  372. package/dist/index.js +10695 -10239
  373. package/dist/input.css +3 -0
  374. package/dist/link.css +3 -0
  375. package/dist/mintui-elements.d.ts +156 -0
  376. package/dist/mintui-elements.d.ts.map +10 -0
  377. package/dist/modal.css +3 -0
  378. package/dist/navigation.css +3 -0
  379. package/dist/off-canvas.css +3 -0
  380. package/dist/page.css +3 -0
  381. package/dist/popover.css +3 -0
  382. package/dist/resource-table.css +3 -0
  383. package/dist/search.css +3 -0
  384. package/dist/select.css +3 -0
  385. package/dist/side-navigation.css +3 -0
  386. package/dist/sortable.css +3 -0
  387. package/dist/spinner.css +3 -0
  388. package/dist/stack.css +3 -0
  389. package/dist/switch.css +3 -0
  390. package/dist/table.css +3 -0
  391. package/dist/tabs.css +3 -0
  392. package/dist/tags.css +3 -0
  393. package/dist/text.css +3 -0
  394. package/dist/theme.css +101 -0
  395. package/dist/time-picker.css +3 -0
  396. package/dist/toast.css +3 -0
  397. package/package.json +379 -30
  398. package/dist/components/bottom-navigation/BottomNavItem.d.ts +0 -14
  399. package/dist/components/bottom-navigation/BottomNavItem.d.ts.map +0 -1
  400. package/dist/components/choice/ChoiceOption.d.ts +0 -30
  401. package/dist/components/choice/ChoiceOption.d.ts.map +0 -1
  402. package/dist/components/confirm-action/ConfirmActionApi.d.ts +0 -17
  403. package/dist/components/confirm-action/ConfirmActionApi.d.ts.map +0 -1
  404. package/dist/components/icon/build-icons.d.ts +0 -2
  405. package/dist/components/icon/build-icons.d.ts.map +0 -1
  406. package/dist/components/icon/icons/ai.d.ts +0 -3
  407. package/dist/components/icon/icons/ai.d.ts.map +0 -1
  408. package/dist/components/icon/icons/archive.d.ts +0 -3
  409. package/dist/components/icon/icons/archive.d.ts.map +0 -1
  410. package/dist/components/icon/icons/arrow-down.d.ts +0 -3
  411. package/dist/components/icon/icons/arrow-down.d.ts.map +0 -1
  412. package/dist/components/icon/icons/arrow-left.d.ts +0 -3
  413. package/dist/components/icon/icons/arrow-left.d.ts.map +0 -1
  414. package/dist/components/icon/icons/arrow-right.d.ts +0 -3
  415. package/dist/components/icon/icons/arrow-right.d.ts.map +0 -1
  416. package/dist/components/icon/icons/arrow-up.d.ts +0 -3
  417. package/dist/components/icon/icons/arrow-up.d.ts.map +0 -1
  418. package/dist/components/icon/icons/attach.d.ts +0 -3
  419. package/dist/components/icon/icons/attach.d.ts.map +0 -1
  420. package/dist/components/icon/icons/bank.d.ts +0 -3
  421. package/dist/components/icon/icons/bank.d.ts.map +0 -1
  422. package/dist/components/icon/icons/barcode.d.ts +0 -3
  423. package/dist/components/icon/icons/barcode.d.ts.map +0 -1
  424. package/dist/components/icon/icons/basket.d.ts +0 -3
  425. package/dist/components/icon/icons/basket.d.ts.map +0 -1
  426. package/dist/components/icon/icons/bookmark.d.ts +0 -3
  427. package/dist/components/icon/icons/bookmark.d.ts.map +0 -1
  428. package/dist/components/icon/icons/building.d.ts +0 -3
  429. package/dist/components/icon/icons/building.d.ts.map +0 -1
  430. package/dist/components/icon/icons/buildings.d.ts +0 -3
  431. package/dist/components/icon/icons/buildings.d.ts.map +0 -1
  432. package/dist/components/icon/icons/bullhorn.d.ts +0 -3
  433. package/dist/components/icon/icons/bullhorn.d.ts.map +0 -1
  434. package/dist/components/icon/icons/calendar-day.d.ts +0 -3
  435. package/dist/components/icon/icons/calendar-day.d.ts.map +0 -1
  436. package/dist/components/icon/icons/calendar-empty.d.ts +0 -3
  437. package/dist/components/icon/icons/calendar-empty.d.ts.map +0 -1
  438. package/dist/components/icon/icons/calendar-week.d.ts +0 -3
  439. package/dist/components/icon/icons/calendar-week.d.ts.map +0 -1
  440. package/dist/components/icon/icons/calendar.d.ts +0 -3
  441. package/dist/components/icon/icons/calendar.d.ts.map +0 -1
  442. package/dist/components/icon/icons/caret-down.d.ts +0 -3
  443. package/dist/components/icon/icons/caret-down.d.ts.map +0 -1
  444. package/dist/components/icon/icons/caret-left.d.ts +0 -3
  445. package/dist/components/icon/icons/caret-left.d.ts.map +0 -1
  446. package/dist/components/icon/icons/caret-right.d.ts +0 -3
  447. package/dist/components/icon/icons/caret-right.d.ts.map +0 -1
  448. package/dist/components/icon/icons/caret-up.d.ts +0 -3
  449. package/dist/components/icon/icons/caret-up.d.ts.map +0 -1
  450. package/dist/components/icon/icons/chart-bar.d.ts +0 -3
  451. package/dist/components/icon/icons/chart-bar.d.ts.map +0 -1
  452. package/dist/components/icon/icons/chart-line.d.ts +0 -3
  453. package/dist/components/icon/icons/chart-line.d.ts.map +0 -1
  454. package/dist/components/icon/icons/chat.d.ts +0 -3
  455. package/dist/components/icon/icons/chat.d.ts.map +0 -1
  456. package/dist/components/icon/icons/check.d.ts +0 -3
  457. package/dist/components/icon/icons/check.d.ts.map +0 -1
  458. package/dist/components/icon/icons/clock.d.ts +0 -3
  459. package/dist/components/icon/icons/clock.d.ts.map +0 -1
  460. package/dist/components/icon/icons/close.d.ts +0 -3
  461. package/dist/components/icon/icons/close.d.ts.map +0 -1
  462. package/dist/components/icon/icons/copy.d.ts +0 -3
  463. package/dist/components/icon/icons/copy.d.ts.map +0 -1
  464. package/dist/components/icon/icons/credit-card.d.ts +0 -3
  465. package/dist/components/icon/icons/credit-card.d.ts.map +0 -1
  466. package/dist/components/icon/icons/delete.d.ts +0 -3
  467. package/dist/components/icon/icons/delete.d.ts.map +0 -1
  468. package/dist/components/icon/icons/desktop-screen.d.ts +0 -3
  469. package/dist/components/icon/icons/desktop-screen.d.ts.map +0 -1
  470. package/dist/components/icon/icons/documentation.d.ts +0 -3
  471. package/dist/components/icon/icons/documentation.d.ts.map +0 -1
  472. package/dist/components/icon/icons/dollar-sign.d.ts +0 -3
  473. package/dist/components/icon/icons/dollar-sign.d.ts.map +0 -1
  474. package/dist/components/icon/icons/download.d.ts +0 -3
  475. package/dist/components/icon/icons/download.d.ts.map +0 -1
  476. package/dist/components/icon/icons/duplicate.d.ts +0 -3
  477. package/dist/components/icon/icons/duplicate.d.ts.map +0 -1
  478. package/dist/components/icon/icons/edit.d.ts +0 -3
  479. package/dist/components/icon/icons/edit.d.ts.map +0 -1
  480. package/dist/components/icon/icons/ellipsis.d.ts +0 -3
  481. package/dist/components/icon/icons/ellipsis.d.ts.map +0 -1
  482. package/dist/components/icon/icons/error.d.ts +0 -3
  483. package/dist/components/icon/icons/error.d.ts.map +0 -1
  484. package/dist/components/icon/icons/external-link.d.ts +0 -3
  485. package/dist/components/icon/icons/external-link.d.ts.map +0 -1
  486. package/dist/components/icon/icons/eye.d.ts +0 -3
  487. package/dist/components/icon/icons/eye.d.ts.map +0 -1
  488. package/dist/components/icon/icons/file.d.ts +0 -3
  489. package/dist/components/icon/icons/file.d.ts.map +0 -1
  490. package/dist/components/icon/icons/filter.d.ts +0 -3
  491. package/dist/components/icon/icons/filter.d.ts.map +0 -1
  492. package/dist/components/icon/icons/folder.d.ts +0 -3
  493. package/dist/components/icon/icons/folder.d.ts.map +0 -1
  494. package/dist/components/icon/icons/gavel.d.ts +0 -3
  495. package/dist/components/icon/icons/gavel.d.ts.map +0 -1
  496. package/dist/components/icon/icons/globe.d.ts +0 -3
  497. package/dist/components/icon/icons/globe.d.ts.map +0 -1
  498. package/dist/components/icon/icons/grid.d.ts +0 -3
  499. package/dist/components/icon/icons/grid.d.ts.map +0 -1
  500. package/dist/components/icon/icons/grip-lines.d.ts +0 -3
  501. package/dist/components/icon/icons/grip-lines.d.ts.map +0 -1
  502. package/dist/components/icon/icons/help.d.ts +0 -3
  503. package/dist/components/icon/icons/help.d.ts.map +0 -1
  504. package/dist/components/icon/icons/home.d.ts +0 -3
  505. package/dist/components/icon/icons/home.d.ts.map +0 -1
  506. package/dist/components/icon/icons/image.d.ts +0 -3
  507. package/dist/components/icon/icons/image.d.ts.map +0 -1
  508. package/dist/components/icon/icons/index.cjs +0 -34
  509. package/dist/components/icon/icons/index.d.ts +0 -92
  510. package/dist/components/icon/icons/index.d.ts.map +0 -1
  511. package/dist/components/icon/icons/index.js +0 -752
  512. package/dist/components/icon/icons/info.d.ts +0 -3
  513. package/dist/components/icon/icons/info.d.ts.map +0 -1
  514. package/dist/components/icon/icons/language.d.ts +0 -3
  515. package/dist/components/icon/icons/language.d.ts.map +0 -1
  516. package/dist/components/icon/icons/line-chart.d.ts +0 -3
  517. package/dist/components/icon/icons/line-chart.d.ts.map +0 -1
  518. package/dist/components/icon/icons/link.d.ts +0 -3
  519. package/dist/components/icon/icons/link.d.ts.map +0 -1
  520. package/dist/components/icon/icons/list.d.ts +0 -3
  521. package/dist/components/icon/icons/list.d.ts.map +0 -1
  522. package/dist/components/icon/icons/location.d.ts +0 -3
  523. package/dist/components/icon/icons/location.d.ts.map +0 -1
  524. package/dist/components/icon/icons/lock.d.ts +0 -3
  525. package/dist/components/icon/icons/lock.d.ts.map +0 -1
  526. package/dist/components/icon/icons/login.d.ts +0 -3
  527. package/dist/components/icon/icons/login.d.ts.map +0 -1
  528. package/dist/components/icon/icons/logout.d.ts +0 -3
  529. package/dist/components/icon/icons/logout.d.ts.map +0 -1
  530. package/dist/components/icon/icons/mail.d.ts +0 -3
  531. package/dist/components/icon/icons/mail.d.ts.map +0 -1
  532. package/dist/components/icon/icons/map.d.ts +0 -3
  533. package/dist/components/icon/icons/map.d.ts.map +0 -1
  534. package/dist/components/icon/icons/menu.d.ts +0 -3
  535. package/dist/components/icon/icons/menu.d.ts.map +0 -1
  536. package/dist/components/icon/icons/moon.d.ts +0 -3
  537. package/dist/components/icon/icons/moon.d.ts.map +0 -1
  538. package/dist/components/icon/icons/notifications.d.ts +0 -3
  539. package/dist/components/icon/icons/notifications.d.ts.map +0 -1
  540. package/dist/components/icon/icons/paste.d.ts +0 -3
  541. package/dist/components/icon/icons/paste.d.ts.map +0 -1
  542. package/dist/components/icon/icons/pin.d.ts +0 -3
  543. package/dist/components/icon/icons/pin.d.ts.map +0 -1
  544. package/dist/components/icon/icons/plus.d.ts +0 -3
  545. package/dist/components/icon/icons/plus.d.ts.map +0 -1
  546. package/dist/components/icon/icons/print.d.ts +0 -3
  547. package/dist/components/icon/icons/print.d.ts.map +0 -1
  548. package/dist/components/icon/icons/refresh.d.ts +0 -3
  549. package/dist/components/icon/icons/refresh.d.ts.map +0 -1
  550. package/dist/components/icon/icons/remove.d.ts +0 -3
  551. package/dist/components/icon/icons/remove.d.ts.map +0 -1
  552. package/dist/components/icon/icons/save.d.ts +0 -3
  553. package/dist/components/icon/icons/save.d.ts.map +0 -1
  554. package/dist/components/icon/icons/search.d.ts +0 -3
  555. package/dist/components/icon/icons/search.d.ts.map +0 -1
  556. package/dist/components/icon/icons/settings.d.ts +0 -3
  557. package/dist/components/icon/icons/settings.d.ts.map +0 -1
  558. package/dist/components/icon/icons/share.d.ts +0 -3
  559. package/dist/components/icon/icons/share.d.ts.map +0 -1
  560. package/dist/components/icon/icons/sort-arrows.d.ts +0 -3
  561. package/dist/components/icon/icons/sort-arrows.d.ts.map +0 -1
  562. package/dist/components/icon/icons/sort.d.ts +0 -3
  563. package/dist/components/icon/icons/sort.d.ts.map +0 -1
  564. package/dist/components/icon/icons/star.d.ts +0 -3
  565. package/dist/components/icon/icons/star.d.ts.map +0 -1
  566. package/dist/components/icon/icons/success.d.ts +0 -3
  567. package/dist/components/icon/icons/success.d.ts.map +0 -1
  568. package/dist/components/icon/icons/sun.d.ts +0 -3
  569. package/dist/components/icon/icons/sun.d.ts.map +0 -1
  570. package/dist/components/icon/icons/table.d.ts +0 -3
  571. package/dist/components/icon/icons/table.d.ts.map +0 -1
  572. package/dist/components/icon/icons/tag.d.ts +0 -3
  573. package/dist/components/icon/icons/tag.d.ts.map +0 -1
  574. package/dist/components/icon/icons/trash.d.ts +0 -3
  575. package/dist/components/icon/icons/trash.d.ts.map +0 -1
  576. package/dist/components/icon/icons/truck.d.ts +0 -3
  577. package/dist/components/icon/icons/truck.d.ts.map +0 -1
  578. package/dist/components/icon/icons/unlock.d.ts +0 -3
  579. package/dist/components/icon/icons/unlock.d.ts.map +0 -1
  580. package/dist/components/icon/icons/upload.d.ts +0 -3
  581. package/dist/components/icon/icons/upload.d.ts.map +0 -1
  582. package/dist/components/icon/icons/user-add.d.ts +0 -3
  583. package/dist/components/icon/icons/user-add.d.ts.map +0 -1
  584. package/dist/components/icon/icons/user.d.ts +0 -3
  585. package/dist/components/icon/icons/user.d.ts.map +0 -1
  586. package/dist/components/icon/icons/users.d.ts +0 -3
  587. package/dist/components/icon/icons/users.d.ts.map +0 -1
  588. package/dist/components/icon/icons/video.d.ts +0 -3
  589. package/dist/components/icon/icons/video.d.ts.map +0 -1
  590. package/dist/components/icon/icons/warning.d.ts +0 -3
  591. package/dist/components/icon/icons/warning.d.ts.map +0 -1
  592. package/dist/components/icon/registry.d.ts +0 -15
  593. package/dist/components/icon/registry.d.ts.map +0 -1
  594. package/dist/components/resource-table/ResourceTableContextMenu.d.ts +0 -40
  595. package/dist/components/resource-table/ResourceTableContextMenu.d.ts.map +0 -1
  596. package/dist/components/side-navigation/SideNavigationActionHeader.d.ts +0 -2
  597. package/dist/components/side-navigation/SideNavigationActionHeader.d.ts.map +0 -1
  598. package/dist/components/side-navigation/SideNavigationActionLinks.d.ts +0 -9
  599. package/dist/components/side-navigation/SideNavigationActionLinks.d.ts.map +0 -1
  600. package/dist/components/side-navigation/SideNavigationActionMenu.d.ts +0 -26
  601. package/dist/components/side-navigation/SideNavigationActionMenu.d.ts.map +0 -1
  602. package/dist/components/side-navigation/SideNavigationLink.d.ts +0 -38
  603. package/dist/components/side-navigation/SideNavigationLink.d.ts.map +0 -1
  604. package/dist/components/side-navigation/SideNavigationLinks.d.ts +0 -38
  605. package/dist/components/side-navigation/SideNavigationLinks.d.ts.map +0 -1
  606. package/dist/components/tabs/Tab.d.ts +0 -19
  607. package/dist/components/tabs/Tab.d.ts.map +0 -1
  608. package/dist/components/tabs/TabContent.d.ts +0 -13
  609. package/dist/components/tabs/TabContent.d.ts.map +0 -1
  610. package/dist/components/tabs/TabList.d.ts +0 -12
  611. package/dist/components/tabs/TabList.d.ts.map +0 -1
  612. package/dist/components/toast/ToastApi.d.ts +0 -21
  613. package/dist/components/toast/ToastApi.d.ts.map +0 -1
  614. package/dist/components/top-navigation/TopNavigation.d.ts +0 -65
  615. package/dist/components/top-navigation/TopNavigation.d.ts.map +0 -1
  616. package/dist/components/top-navigation/index.d.ts +0 -4
  617. package/dist/components/top-navigation/index.d.ts.map +0 -1
  618. package/dist/icons/truck.svg +0 -13
  619. package/dist/search-CM-OgatF.js +0 -179
  620. package/dist/search-C_vLUsm7.cjs +0 -1
  621. package/dist/styles.css +0 -3
  622. package/tailwind.preset.cjs +0 -75
  623. package/tailwind.preset.js +0 -97
@@ -0,0 +1,343 @@
1
+ import '../../theme.css'
2
+ import '../../icon.css'
3
+ import '../../dropzone.css'
4
+ import { a as e } from "../chunks/icon-gQAtsERy.js";
5
+ import { t } from "../chunks/register-element-BFYmIynH.js";
6
+ import "../chunks/icon-C0OLmjDY.js";
7
+ import "../chunks/close-Dg6U0IjZ.js";
8
+ e({
9
+ name: "upload",
10
+ viewBox: "0 0 24 24",
11
+ path: "M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12",
12
+ strokeLinecap: "round",
13
+ strokeLinejoin: "round"
14
+ }), e({
15
+ name: "attach",
16
+ viewBox: "0 0 24 24",
17
+ path: "M15.172 7l-6.586 6.586a2 2 0 102.828 2.828l6.414-6.586a4 4 0 00-5.656-5.656l-6.415 6.585a6 6 0 108.486 8.486L20.5 13",
18
+ strokeLinecap: "round",
19
+ strokeLinejoin: "round"
20
+ });
21
+ //#endregion
22
+ //#region src/components/dropzone/Dropzone.ts
23
+ var n = class extends HTMLElement {
24
+ static get observedAttributes() {
25
+ return [
26
+ "label",
27
+ "accept",
28
+ "multiple",
29
+ "width",
30
+ "height",
31
+ "disabled",
32
+ "name",
33
+ "error",
34
+ "error-message",
35
+ "loading",
36
+ "aria-label",
37
+ "aria-describedby"
38
+ ];
39
+ }
40
+ constructor() {
41
+ super(), this._dropzone = null, this._fileInput = null, this._previewContainer = null, this._isDragging = !1, this._wasDragging = !1, this._isUpdatingFiles = !1, this._listenersInitialized = !1, this._selectedFiles = [], this._previewUrls = [], this._resetHandler = null, this._a11yId = `mint-dropzone-${Math.random().toString(36).slice(2, 10)}`;
42
+ }
43
+ connectedCallback() {
44
+ this.classList.add("mint-dropzone"), this.render(), this._attachFormResetListener();
45
+ }
46
+ disconnectedCallback() {
47
+ if (this.removeEventListeners(), this._cleanupPreviewUrls(), this._resetHandler) {
48
+ let e = this.closest("form");
49
+ e && e.removeEventListener("reset", this._resetHandler), this._resetHandler = null;
50
+ }
51
+ }
52
+ attributeChangedCallback(e, t, n) {
53
+ if (t !== n) {
54
+ if (e === "error" || e === "error-message") {
55
+ this._updateDragStateClass(), this._renderErrorState(this.hasError(), this.getErrorMessage());
56
+ return;
57
+ }
58
+ if (e === "loading") {
59
+ this.render();
60
+ return;
61
+ }
62
+ this.render();
63
+ }
64
+ }
65
+ getLabel() {
66
+ return this.getAttribute("label") || "";
67
+ }
68
+ getAccept() {
69
+ return this.getAttribute("accept") || "";
70
+ }
71
+ isMultiple() {
72
+ return this.getAttribute("multiple") === "true";
73
+ }
74
+ getWidth() {
75
+ return this.getAttribute("width") || "200px";
76
+ }
77
+ getHeight() {
78
+ return this.getAttribute("height") || "200px";
79
+ }
80
+ _renderSkeleton(e) {
81
+ let t = this.querySelector(".mint-dropzone-skeleton-container"), n = this._dropzone;
82
+ if (e) {
83
+ this.classList.add("is-loading"), t || (t = document.createElement("div"), t.className = "mint-dropzone-skeleton-container", n ? (n.classList.add("is-positioned"), n.appendChild(t)) : this.appendChild(t));
84
+ let e = t.querySelector(".mint-dropzone-skeleton");
85
+ e || (e = document.createElement("div"), e.className = "mint-dropzone-skeleton", t.appendChild(e)), t.classList.add("is-visible"), n?.classList.add("is-loading");
86
+ } else this.classList.remove("is-loading"), t && t.classList.remove("is-visible"), n?.classList.remove("is-loading");
87
+ }
88
+ getName() {
89
+ return this.getAttribute("name") || "";
90
+ }
91
+ hasError() {
92
+ return this.getAttribute("error") === "true";
93
+ }
94
+ getErrorMessage() {
95
+ return this.getAttribute("error-message") || "";
96
+ }
97
+ isDisabled() {
98
+ return this.getAttribute("disabled") === "true";
99
+ }
100
+ isLoading() {
101
+ return this.getAttribute("loading") === "true";
102
+ }
103
+ render() {
104
+ let e = this.isLoading(), t = this.getLabel(), n = this.getAccept(), r = this.isMultiple(), i = this.isDisabled(), a = this.getWidth(), o = this.getHeight(), s = this.getName(), c = this.hasError(), l = this.getErrorMessage();
105
+ if (this._dropzone || (this._dropzone = document.createElement("div"), this.appendChild(this._dropzone)), this._updateDragStateClass(), this._dropzone.setAttribute("aria-invalid", c ? "true" : "false"), i) this._dropzone.setAttribute("tabindex", "-1"), this._dropzone.removeAttribute("role");
106
+ else {
107
+ this._dropzone.setAttribute("tabindex", "0"), this._dropzone.setAttribute("role", "button"), this._dropzone.setAttribute("aria-label", this.getAttribute("aria-label") || t || "File upload dropzone");
108
+ let e = (this.getAttribute("aria-describedby") || "").split(/\s+/).filter(Boolean), n = this.querySelector(".mint-dropzone-error");
109
+ n && (n.id = `${this.id || this._a11yId}-error`, e.push(n.id)), e.length ? this._dropzone.setAttribute("aria-describedby", Array.from(new Set(e)).join(" ")) : this._dropzone.removeAttribute("aria-describedby");
110
+ }
111
+ this._dropzone.style.width = a, this._dropzone.style.height = o, this._dropzone.style.minWidth = a, this._dropzone.style.minHeight = o, this._fileInput || (this._fileInput = document.createElement("input"), this._fileInput.type = "file", this._fileInput.className = "mint-dropzone-file-input", this._fileInput.setAttribute("tabindex", "-1"), this._fileInput.setAttribute("aria-hidden", "true"), this._dropzone.appendChild(this._fileInput)), this._fileInput.accept = n, this._fileInput.multiple = r, this._fileInput.disabled = i, s ? this._fileInput.name = s : this._fileInput.removeAttribute("name"), this._fileInput.setAttribute("aria-invalid", c ? "true" : "false");
112
+ let u = this._dropzone.querySelector(".mint-dropzone-icon"), d = this._dropzone.querySelector(".mint-dropzone-label");
113
+ u && u.remove(), d && d.remove();
114
+ let f = document.createElement("div");
115
+ f.className = "mint-dropzone-icon";
116
+ let p = document.createElement("mint-icon");
117
+ if (p.setAttribute("name", "upload"), p.className = "mint-dropzone-upload-icon", f.appendChild(p), this._dropzone.appendChild(f), t) {
118
+ let e = document.createElement("div");
119
+ e.className = "mint-dropzone-label", e.textContent = t, this._dropzone.appendChild(e);
120
+ }
121
+ this.setupEventListeners(), this._renderErrorState(c, l), this._renderPreviews(), this._renderSkeleton(e);
122
+ }
123
+ _updateDragState() {
124
+ this._dropzone && this._updateDragStateClass();
125
+ }
126
+ _renderErrorState(e, t) {
127
+ let n = this.querySelector(".mint-dropzone-error");
128
+ if (e && t ? (n || (n = document.createElement("div"), n.className = "mint-dropzone-error", this.appendChild(n)), n.textContent = t) : n && n.remove(), this._dropzone) {
129
+ this._dropzone.setAttribute("aria-invalid", String(e)), n && (n.id = `${this.id || this._a11yId}-error`);
130
+ let t = (this.getAttribute("aria-describedby") || "").split(/\s+/).filter(Boolean);
131
+ n && t.push(n.id), t.length ? this._dropzone.setAttribute("aria-describedby", Array.from(new Set(t)).join(" ")) : this._dropzone.removeAttribute("aria-describedby");
132
+ }
133
+ }
134
+ _updateDragStateClass() {
135
+ if (!this._dropzone) return;
136
+ let e = this.isDisabled(), t = this.hasError();
137
+ this._dropzone.className = "mint-dropzone-target", this._dropzone.classList.toggle("has-files", this._selectedFiles.length > 0), this._dropzone.classList.toggle("is-dragging", this._isDragging), this._dropzone.classList.toggle("has-error", t), this._dropzone.classList.toggle("is-disabled", e);
138
+ }
139
+ setupEventListeners() {
140
+ this._listenersInitialized || (this._listenersInitialized = !0, this.removeEventListeners(), !(!this._dropzone || !this._fileInput || this.isDisabled()) && (this._onDropzoneClick ||= (e) => {
141
+ if (!(this.isDisabled() || !this._fileInput) && e.target !== this._fileInput && (e.stopPropagation(), e.preventDefault(), e.isTrusted)) try {
142
+ this._fileInput.click();
143
+ } catch (e) {
144
+ console.debug("File chooser blocked:", e);
145
+ }
146
+ }, this._onDragOver ||= (e) => {
147
+ e.preventDefault(), e.stopPropagation(), this.isDisabled() || this._isDragging || (this._isDragging = !0, this._wasDragging = !0, this._updateDragState());
148
+ }, this._onDragLeave ||= (e) => {
149
+ e.preventDefault(), e.stopPropagation();
150
+ let t = this._dropzone?.getBoundingClientRect();
151
+ t && (e.clientX < t.left || e.clientX > t.right || e.clientY < t.top || e.clientY > t.bottom) && this._isDragging && (this._isDragging = !1, this._wasDragging = !1, this._updateDragState());
152
+ }, this._onDrop ||= (e) => {
153
+ if (e.preventDefault(), e.stopPropagation(), this._isDragging && (this._isDragging = !1, this._wasDragging = !1, this._updateDragState()), this.isDisabled()) return;
154
+ let t = e.dataTransfer?.files;
155
+ t && t.length > 0 && this._handleFiles(t);
156
+ }, this._onFileInputInput ||= (e) => {
157
+ e.stopImmediatePropagation(), e.stopPropagation();
158
+ }, this._onKeyDown ||= (e) => {
159
+ if (!(this.isDisabled() || !this._fileInput) && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), e.stopPropagation(), e.isTrusted)) try {
160
+ this._fileInput.click();
161
+ } catch (e) {
162
+ console.debug("File chooser blocked:", e);
163
+ }
164
+ }, this._onFocus ||= (e) => {
165
+ this._dropzone && !this.isDisabled() && this._dropzone.classList.add("is-focused");
166
+ }, this._onBlur ||= (e) => {
167
+ this._dropzone;
168
+ }, this._onFileInputChange ||= (e) => {
169
+ if (e.stopImmediatePropagation(), e.stopPropagation(), this._isUpdatingFiles) return;
170
+ let t = e.target.files;
171
+ if (t && t.length > 0) {
172
+ let e = this.getAccept(), n = this.isMultiple(), r = [], i = [];
173
+ for (let n = 0; n < t.length; n++) {
174
+ let a = t[n];
175
+ this._isFileAccepted(a, e) ? r.push(a) : i.push(a);
176
+ }
177
+ if (!n && r.length > 1 && (i.push(...r.slice(1)), r.splice(1)), i.length > 0) {
178
+ let e = new CustomEvent("dropRejected", {
179
+ detail: {
180
+ files: i,
181
+ reason: "File type not accepted or multiple files not allowed"
182
+ },
183
+ bubbles: !0,
184
+ cancelable: !0
185
+ });
186
+ this.dispatchEvent(e);
187
+ }
188
+ r.length > 0 && this._applyValidFiles(r);
189
+ }
190
+ }, this._dropzone.addEventListener("click", this._onDropzoneClick), this._dropzone.addEventListener("dragover", this._onDragOver), this._dropzone.addEventListener("dragleave", this._onDragLeave), this._dropzone.addEventListener("drop", this._onDrop), this._dropzone.addEventListener("keydown", this._onKeyDown), this._dropzone.addEventListener("focus", this._onFocus), this._dropzone.addEventListener("blur", this._onBlur), this._fileInput.addEventListener("change", this._onFileInputChange), this._fileInput.addEventListener("input", this._onFileInputInput, !0)));
191
+ }
192
+ removeEventListeners() {
193
+ this._dropzone && (this._onDropzoneClick && this._dropzone.removeEventListener("click", this._onDropzoneClick), this._onDragOver && this._dropzone.removeEventListener("dragover", this._onDragOver), this._onDragLeave && this._dropzone.removeEventListener("dragleave", this._onDragLeave), this._onDrop && this._dropzone.removeEventListener("drop", this._onDrop), this._onKeyDown && this._dropzone.removeEventListener("keydown", this._onKeyDown), this._onFocus && this._dropzone.removeEventListener("focus", this._onFocus), this._onBlur && this._dropzone.removeEventListener("blur", this._onBlur)), this._fileInput && (this._onFileInputChange && this._fileInput.removeEventListener("change", this._onFileInputChange), this._onFileInputInput && this._fileInput.removeEventListener("input", this._onFileInputInput, !0)), this._isDragging = !1, this._listenersInitialized = !1;
194
+ }
195
+ _handleFiles(e) {
196
+ let t = this.getAccept(), n = this.isMultiple(), r = [], i = [];
197
+ for (let n = 0; n < e.length; n++) {
198
+ let a = e[n];
199
+ this._isFileAccepted(a, t) ? r.push(a) : i.push(a);
200
+ }
201
+ if (!n && r.length > 1 && (i.push(...r.slice(1)), r.splice(1)), i.length > 0) {
202
+ let e = new CustomEvent("dropRejected", {
203
+ detail: {
204
+ files: i,
205
+ reason: "File type not accepted or multiple files not allowed"
206
+ },
207
+ bubbles: !0,
208
+ cancelable: !0
209
+ });
210
+ this.dispatchEvent(e);
211
+ }
212
+ r.length > 0 && this._applyValidFiles(r);
213
+ }
214
+ _isFileAccepted(e, t) {
215
+ if (!t) return !0;
216
+ let n = t.split(",").map((e) => e.trim().toLowerCase());
217
+ for (let t of n) if (t.startsWith(".")) {
218
+ if ("." + e.name.split(".").pop()?.toLowerCase() === t) return !0;
219
+ } else if (t.includes("/*")) {
220
+ if (t.split("/")[0] === e.type.split("/")[0]) return !0;
221
+ } else if (e.type === t) return !0;
222
+ return !1;
223
+ }
224
+ _dispatchEvent(e, t) {
225
+ let n = t.target, r = new CustomEvent(e, {
226
+ detail: {
227
+ files: n.files ? Array.from(n.files) : [],
228
+ value: n.value || ""
229
+ },
230
+ bubbles: !0,
231
+ cancelable: !0
232
+ });
233
+ this.dispatchEvent(r);
234
+ }
235
+ _dispatchSelectionEvents() {
236
+ let e = {
237
+ files: [...this._selectedFiles],
238
+ value: ""
239
+ };
240
+ this.dispatchEvent(new CustomEvent("input", {
241
+ detail: e,
242
+ bubbles: !0,
243
+ cancelable: !0,
244
+ composed: !0
245
+ })), this.dispatchEvent(new CustomEvent("change", {
246
+ detail: e,
247
+ bubbles: !0,
248
+ cancelable: !0,
249
+ composed: !0
250
+ }));
251
+ }
252
+ _syncFileInputFromSelected() {
253
+ if (!this._fileInput) return;
254
+ let e = new DataTransfer();
255
+ this._selectedFiles.forEach((t) => {
256
+ try {
257
+ e.items.add(t);
258
+ } catch (e) {
259
+ console.warn("Failed to add file to DataTransfer:", e);
260
+ }
261
+ }), this._isUpdatingFiles = !0;
262
+ try {
263
+ this._fileInput.files = e.files;
264
+ } catch (e) {
265
+ console.warn("Failed to set files on input:", e);
266
+ }
267
+ setTimeout(() => {
268
+ this._isUpdatingFiles = !1;
269
+ }, 0);
270
+ }
271
+ get files() {
272
+ return this._syncFileInputFromSelected(), this._fileInput?.files || null;
273
+ }
274
+ syncFiles() {
275
+ this._syncFileInputFromSelected();
276
+ }
277
+ _renderPreviews() {
278
+ if (!this._dropzone) return;
279
+ if (this._previewContainer && (this._cleanupPreviewUrls(), this._previewContainer.remove()), this._selectedFiles.length === 0) {
280
+ this._previewContainer = null, this._updateDragStateClass();
281
+ return;
282
+ }
283
+ let e = document.createElement("div");
284
+ e.className = "mint-dropzone-previews-wrapper", e.classList.toggle("has-error", this.hasError()), e.classList.toggle("is-dragging", this._isDragging);
285
+ let t = document.createElement("div");
286
+ t.className = "mint-dropzone-previews", this._selectedFiles.forEach((e, n) => {
287
+ let r = document.createElement("div");
288
+ if (r.className = "mint-dropzone-file", e.type.startsWith("image/")) {
289
+ let t = document.createElement("img");
290
+ t.className = "mint-dropzone-file-image";
291
+ let n = URL.createObjectURL(e);
292
+ this._previewUrls.push(n), t.src = n, r.appendChild(t);
293
+ } else {
294
+ let e = document.createElement("mint-icon");
295
+ e.setAttribute("name", "attach"), e.className = "mint-dropzone-file-icon", r.appendChild(e);
296
+ }
297
+ let i = document.createElement("div");
298
+ i.className = "mint-dropzone-file-name", i.textContent = e.name, r.appendChild(i);
299
+ let a = document.createElement("button");
300
+ a.type = "button", a.className = "mint-dropzone-file-remove";
301
+ let o = document.createElement("mint-icon");
302
+ o.setAttribute("name", "close"), o.className = "mint-dropzone-file-remove-icon", a.appendChild(o), a.addEventListener("click", (e) => {
303
+ e.preventDefault(), e.stopPropagation(), this._removeFileAt(n);
304
+ }), r.appendChild(a), t.appendChild(r);
305
+ });
306
+ let n = document.createElement("div");
307
+ n.className = "mint-dropzone-preview-fade is-top", e.appendChild(n);
308
+ let r = document.createElement("div");
309
+ r.className = "mint-dropzone-preview-fade is-bottom is-visible", e.appendChild(r);
310
+ let i = () => {
311
+ let e = t.scrollTop, i = t.scrollHeight, a = t.clientHeight;
312
+ e > 0 ? n.classList.add("is-visible") : n.classList.remove("is-visible"), e + a < i - 1 ? r.classList.add("is-visible") : r.classList.remove("is-visible");
313
+ };
314
+ i(), t.addEventListener("scroll", i), e.appendChild(t), this._previewContainer = e, this._dropzone.appendChild(e), this._updateDragStateClass();
315
+ }
316
+ _removeFileAt(e) {
317
+ if (e < 0 || e >= this._selectedFiles.length) return;
318
+ let [t] = this._selectedFiles.splice(e, 1);
319
+ t && this._cleanupPreviewUrls(), this._syncFileInputFromSelected(), this._renderPreviews(), this._dispatchSelectionEvents();
320
+ }
321
+ _cleanupPreviewUrls() {
322
+ this._previewUrls.forEach((e) => URL.revokeObjectURL(e)), this._previewUrls = [];
323
+ }
324
+ _attachFormResetListener() {
325
+ let e = this.closest("form");
326
+ !e || this._resetHandler || (this._resetHandler = () => {
327
+ this._selectedFiles = [], this._syncFileInputFromSelected(), this._renderPreviews(), this._cleanupPreviewUrls();
328
+ }, e.addEventListener("reset", this._resetHandler));
329
+ }
330
+ _applyValidFiles(e) {
331
+ if (this.isMultiple()) {
332
+ let t = e.filter((e) => !this._isDuplicateFile(e));
333
+ this._selectedFiles.push(...t);
334
+ } else this._selectedFiles = [e[0]];
335
+ this._syncFileInputFromSelected(), this._selectedFiles.length > 0 && (this.removeAttribute("error"), this.removeAttribute("error-message"), this._fileInput && this._fileInput.removeAttribute("aria-invalid")), this._renderPreviews(), this._dispatchSelectionEvents();
336
+ }
337
+ _isDuplicateFile(e) {
338
+ return this._selectedFiles.some((t) => t.name === e.name && t.size === e.size && t.lastModified === e.lastModified);
339
+ }
340
+ };
341
+ customElements.get("mint-dropzone") || t("mint-dropzone", n);
342
+ //#endregion
343
+ export { n as default };
@@ -1,133 +1 @@
1
- declare class MintForm extends HTMLElement {
2
- static get observedAttributes(): string[];
3
- private _form;
4
- private _submitHandler;
5
- private _hostSubmitHandler;
6
- private _errors;
7
- private _fieldBlurHandlers;
8
- private _fieldChangeHandlers;
9
- private _observer;
10
- private _formData;
11
- private _headers;
12
- private _buttonStates;
13
- /** Snapshot for `submitting` attribute (separate from built-in fetch button state). */
14
- private _attrSubmittingMintFields;
15
- private _attrSubmittingNativeFields;
16
- private _attrSubmittingMintButtons;
17
- private _attrSubmittingNativeButtons;
18
- private _reactiveDataProxy;
19
- private _reactiveDataObserver;
20
- private _lastDataSnapshot;
21
- private _lastAppliedDataSnapshot;
22
- constructor();
23
- connectedCallback(): void;
24
- disconnectedCallback(): void;
25
- /**
26
- * Public reset helper to restore all fields to their original values from the data property.
27
- * This clears errors and re-applies the form data.
28
- */
29
- reset(): void;
30
- /**
31
- * Public clear helper to completely clear all form values and errors.
32
- * This resets all fields to empty/default values.
33
- */
34
- clear(): void;
35
- /**
36
- * Public submit helper to programmatically submit like an internal submit button.
37
- * Triggers the same validation + submit event flow handled by this component.
38
- */
39
- submit(): void;
40
- attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
41
- get data(): Record<string, any> | null;
42
- set data(value: Record<string, any> | null);
43
- get headers(): Record<string, string> | null;
44
- set headers(value: Record<string, string> | null);
45
- private _render;
46
- private _ensureSubmitHandler;
47
- private _applyFormAttributes;
48
- private _handleSubmit;
49
- private _submitData;
50
- private _applySuccessInterceptors;
51
- private _applyErrorInterceptors;
52
- private _formDataToValues;
53
- /** Whether this element (or an ancestor within the form) is disabled for submission semantics. */
54
- private _isControlDisabledForSubmit;
55
- /**
56
- * Snapshot current values from named fields using the same extraction logic as validation.
57
- * Wins over reactive / FormData merges so submit payloads match what the user sees.
58
- */
59
- private _collectLiveControlValues;
60
- private _collectValidationRules;
61
- private _parseRules;
62
- private _validate;
63
- private _validateField;
64
- private _validateRules;
65
- private _getFieldElements;
66
- private _extractFieldValue;
67
- private _flagFieldError;
68
- private _clearFieldError;
69
- private _clearErrors;
70
- /**
71
- * Public method to set form errors programmatically
72
- * Can be called from event handlers to set validation errors
73
- */
74
- setFormErrors(errors: Record<string, string | string[]>): void;
75
- private _applyServerErrors;
76
- private _parseFormData;
77
- private _parseHeaders;
78
- private _applyFormData;
79
- private _applyValueToField;
80
- private _resetCustomFields;
81
- private _resolveHost;
82
- private _setupBlurValidation;
83
- private _findFieldElement;
84
- private _getFieldName;
85
- private _syncFieldToReactiveData;
86
- private _normalizeReactiveValue;
87
- private _cleanupBlurValidation;
88
- private _syncDropzoneFiles;
89
- private _isSubmittingAttrActive;
90
- /**
91
- * When `submitting` is set on mint-form: disable all fields and non-submit controls,
92
- * set mint-button type=submit to loading (spinner) while preserving button dimensions.
93
- */
94
- private _applySubmittingAttributeState;
95
- private _restoreSubmittingAttributeState;
96
- private _propagateLoadingState;
97
- private _setButtonsSubmitting;
98
- private _restoreButtonsState;
99
- /**
100
- * Check if an object might be reactive (from Vue, React, or other frameworks)
101
- * Framework-agnostic detection based on common patterns
102
- */
103
- private _isReactiveObject;
104
- /**
105
- * Create a deep snapshot of the data object for comparison
106
- * Handles reactive objects by extracting their actual values
107
- */
108
- private _createDataSnapshot;
109
- /**
110
- * Extract actual values from reactive objects recursively
111
- */
112
- private _extractReactiveData;
113
- /**
114
- * Check if data has changed by comparing current state with snapshot
115
- */
116
- private _hasDataChanged;
117
- /**
118
- * Get the actual value from a potentially reactive object
119
- * Handles Vue 3 refs, reactive, Vue 2, React state, and other reactivity systems
120
- */
121
- private _getReactiveValue;
122
- /**
123
- * Set up observer for reactive data changes
124
- * Works with Vue 3 (ref, reactive), Vue 2, React, and other reactivity systems
125
- */
126
- private _setupReactiveDataObserver;
127
- /**
128
- * Stop observing reactive data changes
129
- */
130
- private _stopReactiveDataObserver;
131
- }
132
- export default MintForm;
133
- //# sourceMappingURL=Form.d.ts.map
1
+ export { MintForm as default, MintForm } from '../../mintui-elements'
@@ -1 +1,10 @@
1
- {"version":3,"file":"Form.d.ts","sourceRoot":"","sources":["../../../src/components/form/Form.ts"],"names":[],"mappings":"AAOA,cAAM,QAAS,SAAQ,WAAW;IAChC,MAAM,KAAK,kBAAkB,IAAI,MAAM,EAAE,CAExC;IAED,OAAO,CAAC,KAAK,CAA+B;IAC5C,OAAO,CAAC,cAAc,CAAoC;IAC1D,OAAO,CAAC,kBAAkB,CAAoC;IAC9D,OAAO,CAAC,OAAO,CAA6B;IAC5C,OAAO,CAAC,kBAAkB,CAAkD;IAC5E,OAAO,CAAC,oBAAoB,CAAkD;IAC9E,OAAO,CAAC,SAAS,CAAgC;IACjD,OAAO,CAAC,SAAS,CAAmC;IACpD,OAAO,CAAC,QAAQ,CAAsC;IACtD,OAAO,CAAC,aAAa,CAAuE;IAC5F,uFAAuF;IACvF,OAAO,CAAC,yBAAyB,CAAkC;IACnE,OAAO,CAAC,2BAA2B,CAGhC;IACH,OAAO,CAAC,0BAA0B,CAAkE;IACpG,OAAO,CAAC,4BAA4B,CAAwC;IAC5E,OAAO,CAAC,kBAAkB,CAAY;IACtC,OAAO,CAAC,qBAAqB,CAAsB;IACnD,OAAO,CAAC,iBAAiB,CAAmC;IAC5D,OAAO,CAAC,wBAAwB,CAAmC;;IAMnE,iBAAiB,IAAI,IAAI;IAyCzB,oBAAoB,IAAI,IAAI;IAY5B;;;OAGG;IACH,KAAK,IAAI,IAAI;IAWb;;;OAGG;IACH,KAAK,IAAI,IAAI;IAQb;;;OAGG;IACH,MAAM,IAAI,IAAI;IAad,wBAAwB,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI;IAqC9F,IAAI,IAAI,IAAI,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,CAErC;IAED,IAAI,IAAI,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,EAsCzC;IAGD,IAAI,OAAO,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,CAE3C;IAED,IAAI,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,EAgB/C;IAED,OAAO,CAAC,OAAO;IAkBf,OAAO,CAAC,oBAAoB;IAoB5B,OAAO,CAAC,oBAAoB;YAYd,aAAa;YA2Gb,WAAW;YAkJX,yBAAyB;YAiBzB,uBAAuB;IA2BrC,OAAO,CAAC,iBAAiB;IA+GzB,kGAAkG;IAClG,OAAO,CAAC,2BAA2B;IAkBnC;;;OAGG;IACH,OAAO,CAAC,yBAAyB;IAyBjC,OAAO,CAAC,uBAAuB;IAkB/B,OAAO,CAAC,WAAW;IAcnB,OAAO,CAAC,SAAS;IAuBjB,OAAO,CAAC,cAAc;IAoBtB,OAAO,CAAC,cAAc;IAqDtB,OAAO,CAAC,iBAAiB;IAgDzB,OAAO,CAAC,kBAAkB;IA2I1B,OAAO,CAAC,eAAe;IAgBvB,OAAO,CAAC,gBAAgB;IAgBxB,OAAO,CAAC,YAAY;IAoBpB;;;OAGG;IACH,aAAa,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC,GAAG,IAAI;IAI9D,OAAO,CAAC,kBAAkB;IAuB1B,OAAO,CAAC,cAAc;IAyBtB,OAAO,CAAC,aAAa;IAmBrB,OAAO,CAAC,cAAc;IA8DtB,OAAO,CAAC,kBAAkB;IAsI1B,OAAO,CAAC,kBAAkB;IAmD1B,OAAO,CAAC,YAAY;IAWpB,OAAO,CAAC,oBAAoB;IA0K5B,OAAO,CAAC,iBAAiB;IAoCzB,OAAO,CAAC,aAAa;IAqBrB,OAAO,CAAC,wBAAwB;IAchC,OAAO,CAAC,uBAAuB;IAyB/B,OAAO,CAAC,sBAAsB;IA6B9B,OAAO,CAAC,kBAAkB;IAa1B,OAAO,CAAC,uBAAuB;IAK/B;;;OAGG;IACH,OAAO,CAAC,8BAA8B;IA8EtC,OAAO,CAAC,gCAAgC;IAgCxC,OAAO,CAAC,sBAAsB;IAyB9B,OAAO,CAAC,qBAAqB;IAoD7B,OAAO,CAAC,oBAAoB;IAuD5B;;;OAGG;IACH,OAAO,CAAC,iBAAiB;IA0CzB;;;OAGG;IACH,OAAO,CAAC,mBAAmB;IAa3B;;OAEG;IACH,OAAO,CAAC,oBAAoB;IA2B5B;;OAEG;IACH,OAAO,CAAC,eAAe;IASvB;;;OAGG;IACH,OAAO,CAAC,iBAAiB;IAoCzB;;;OAGG;IACH,OAAO,CAAC,0BAA0B;IAyDlC;;OAEG;IACH,OAAO,CAAC,yBAAyB;CAUlC;AAsCD,eAAe,QAAQ,CAAA"}
1
+ {
2
+ "version": 3,
3
+ "file": "Form.d.ts",
4
+ "sourceRoot": "",
5
+ "sources": [
6
+ "Form.d.ts"
7
+ ],
8
+ "names": [],
9
+ "mappings": "AAAA"
10
+ }