monobill-mintui 0.4.4 → 0.4.6

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 (381) hide show
  1. package/README.md +207 -175
  2. package/dist/components/alert/Alert.d.ts +32 -0
  3. package/dist/components/alert/Alert.d.ts.map +1 -0
  4. package/dist/components/alert/index.d.ts +3 -0
  5. package/dist/components/alert/index.d.ts.map +1 -0
  6. package/dist/components/back-button/BackButton.d.ts +18 -0
  7. package/dist/components/back-button/BackButton.d.ts.map +1 -0
  8. package/dist/components/back-button/index.d.ts +3 -0
  9. package/dist/components/back-button/index.d.ts.map +1 -0
  10. package/dist/components/button/Button.d.ts +46 -1
  11. package/dist/components/button/Button.d.ts.map +1 -10
  12. package/dist/components/button/index.d.ts +3 -1
  13. package/dist/components/button/index.d.ts.map +1 -10
  14. package/dist/components/card/Card.d.ts +17 -1
  15. package/dist/components/card/Card.d.ts.map +1 -10
  16. package/dist/components/card/index.d.ts +3 -1
  17. package/dist/components/card/index.d.ts.map +1 -10
  18. package/dist/components/chart/Chart.d.ts +277 -0
  19. package/dist/components/chart/Chart.d.ts.map +1 -0
  20. package/dist/components/chart/index.d.ts +3 -0
  21. package/dist/components/chart/index.d.ts.map +1 -0
  22. package/dist/components/checkbox/Checkbox.d.ts +41 -1
  23. package/dist/components/checkbox/Checkbox.d.ts.map +1 -10
  24. package/dist/components/checkbox/index.d.ts +3 -1
  25. package/dist/components/checkbox/index.d.ts.map +1 -10
  26. package/dist/components/chip/Chip.d.ts +15 -0
  27. package/dist/components/chip/Chip.d.ts.map +1 -0
  28. package/dist/components/chip/index.d.ts +3 -0
  29. package/dist/components/chip/index.d.ts.map +1 -0
  30. package/dist/components/choice/Choice.d.ts +27 -1
  31. package/dist/components/choice/Choice.d.ts.map +1 -10
  32. package/dist/components/choice/ChoiceOption.d.ts +30 -0
  33. package/dist/components/choice/ChoiceOption.d.ts.map +1 -0
  34. package/dist/components/choice/index.d.ts +5 -1
  35. package/dist/components/choice/index.d.ts.map +1 -10
  36. package/dist/components/clickable/Clickable.d.ts +14 -0
  37. package/dist/components/clickable/Clickable.d.ts.map +1 -0
  38. package/dist/components/clickable/index.d.ts +3 -0
  39. package/dist/components/clickable/index.d.ts.map +1 -0
  40. package/dist/components/date-picker/DatePicker.d.ts +130 -0
  41. package/dist/components/date-picker/DatePicker.d.ts.map +1 -0
  42. package/dist/components/date-picker/index.d.ts +3 -0
  43. package/dist/components/date-picker/index.d.ts.map +1 -0
  44. package/dist/components/dropzone/Dropzone.d.ts +59 -0
  45. package/dist/components/dropzone/Dropzone.d.ts.map +1 -0
  46. package/dist/components/dropzone/index.d.ts +3 -0
  47. package/dist/components/dropzone/index.d.ts.map +1 -0
  48. package/dist/components/form/Form.d.ts +106 -0
  49. package/dist/components/form/Form.d.ts.map +1 -0
  50. package/dist/components/form/index.d.ts +3 -0
  51. package/dist/components/form/index.d.ts.map +1 -0
  52. package/dist/components/grid/Grid.d.ts +16 -1
  53. package/dist/components/grid/Grid.d.ts.map +1 -10
  54. package/dist/components/grid/index.d.ts +3 -1
  55. package/dist/components/grid/index.d.ts.map +1 -10
  56. package/dist/components/icon/Icon.d.ts +15 -1
  57. package/dist/components/icon/Icon.d.ts.map +1 -10
  58. package/dist/components/icon/build-icons.d.ts +2 -0
  59. package/dist/components/icon/build-icons.d.ts.map +1 -0
  60. package/dist/components/icon/icons/archive.d.ts +3 -0
  61. package/dist/components/icon/icons/archive.d.ts.map +1 -0
  62. package/dist/components/icon/icons/arrow-down.d.ts +3 -0
  63. package/dist/components/icon/icons/arrow-down.d.ts.map +1 -0
  64. package/dist/components/icon/icons/arrow-left.d.ts +3 -0
  65. package/dist/components/icon/icons/arrow-left.d.ts.map +1 -0
  66. package/dist/components/icon/icons/arrow-right.d.ts +3 -0
  67. package/dist/components/icon/icons/arrow-right.d.ts.map +1 -0
  68. package/dist/components/icon/icons/arrow-up.d.ts +3 -0
  69. package/dist/components/icon/icons/arrow-up.d.ts.map +1 -0
  70. package/dist/components/icon/icons/attach.d.ts +3 -0
  71. package/dist/components/icon/icons/attach.d.ts.map +1 -0
  72. package/dist/components/icon/icons/barcode.d.ts +3 -0
  73. package/dist/components/icon/icons/barcode.d.ts.map +1 -0
  74. package/dist/components/icon/icons/bookmark.d.ts +3 -0
  75. package/dist/components/icon/icons/bookmark.d.ts.map +1 -0
  76. package/dist/components/icon/icons/building.d.ts +3 -0
  77. package/dist/components/icon/icons/building.d.ts.map +1 -0
  78. package/dist/components/icon/icons/buildings.d.ts +3 -0
  79. package/dist/components/icon/icons/buildings.d.ts.map +1 -0
  80. package/dist/components/icon/icons/calendar-day.d.ts +3 -0
  81. package/dist/components/icon/icons/calendar-day.d.ts.map +1 -0
  82. package/dist/components/icon/icons/calendar-empty.d.ts +3 -0
  83. package/dist/components/icon/icons/calendar-empty.d.ts.map +1 -0
  84. package/dist/components/icon/icons/calendar-week.d.ts +3 -0
  85. package/dist/components/icon/icons/calendar-week.d.ts.map +1 -0
  86. package/dist/components/icon/icons/calendar.d.ts +3 -0
  87. package/dist/components/icon/icons/calendar.d.ts.map +1 -0
  88. package/dist/components/icon/icons/caret-down.d.ts +3 -0
  89. package/dist/components/icon/icons/caret-down.d.ts.map +1 -0
  90. package/dist/components/icon/icons/caret-left.d.ts +3 -0
  91. package/dist/components/icon/icons/caret-left.d.ts.map +1 -0
  92. package/dist/components/icon/icons/caret-right.d.ts +3 -0
  93. package/dist/components/icon/icons/caret-right.d.ts.map +1 -0
  94. package/dist/components/icon/icons/caret-up.d.ts +3 -0
  95. package/dist/components/icon/icons/caret-up.d.ts.map +1 -0
  96. package/dist/components/icon/icons/chat.d.ts +3 -0
  97. package/dist/components/icon/icons/chat.d.ts.map +1 -0
  98. package/dist/components/icon/icons/check.d.ts +3 -0
  99. package/dist/components/icon/icons/check.d.ts.map +1 -0
  100. package/dist/components/icon/icons/clock.d.ts +3 -0
  101. package/dist/components/icon/icons/clock.d.ts.map +1 -0
  102. package/dist/components/icon/icons/close.d.ts +3 -0
  103. package/dist/components/icon/icons/close.d.ts.map +1 -0
  104. package/dist/components/icon/icons/copy.d.ts +3 -0
  105. package/dist/components/icon/icons/copy.d.ts.map +1 -0
  106. package/dist/components/icon/icons/credit-card.d.ts +3 -0
  107. package/dist/components/icon/icons/credit-card.d.ts.map +1 -0
  108. package/dist/components/icon/icons/delete.d.ts +3 -0
  109. package/dist/components/icon/icons/delete.d.ts.map +1 -0
  110. package/dist/components/icon/icons/documentation.d.ts +3 -0
  111. package/dist/components/icon/icons/documentation.d.ts.map +1 -0
  112. package/dist/components/icon/icons/dollar-sign.d.ts +3 -0
  113. package/dist/components/icon/icons/dollar-sign.d.ts.map +1 -0
  114. package/dist/components/icon/icons/download.d.ts +3 -0
  115. package/dist/components/icon/icons/download.d.ts.map +1 -0
  116. package/dist/components/icon/icons/duplicate.d.ts +3 -0
  117. package/dist/components/icon/icons/duplicate.d.ts.map +1 -0
  118. package/dist/components/icon/icons/edit.d.ts +3 -0
  119. package/dist/components/icon/icons/edit.d.ts.map +1 -0
  120. package/dist/components/icon/icons/ellipsis.d.ts +3 -0
  121. package/dist/components/icon/icons/ellipsis.d.ts.map +1 -0
  122. package/dist/components/icon/icons/error.d.ts +3 -0
  123. package/dist/components/icon/icons/error.d.ts.map +1 -0
  124. package/dist/components/icon/icons/external-link.d.ts +3 -0
  125. package/dist/components/icon/icons/external-link.d.ts.map +1 -0
  126. package/dist/components/icon/icons/file.d.ts +3 -0
  127. package/dist/components/icon/icons/file.d.ts.map +1 -0
  128. package/dist/components/icon/icons/filter.d.ts +3 -0
  129. package/dist/components/icon/icons/filter.d.ts.map +1 -0
  130. package/dist/components/icon/icons/folder.d.ts +3 -0
  131. package/dist/components/icon/icons/folder.d.ts.map +1 -0
  132. package/dist/components/icon/icons/grid.d.ts +3 -0
  133. package/dist/components/icon/icons/grid.d.ts.map +1 -0
  134. package/dist/components/icon/icons/help.d.ts +3 -0
  135. package/dist/components/icon/icons/help.d.ts.map +1 -0
  136. package/dist/components/icon/icons/home.d.ts +3 -0
  137. package/dist/components/icon/icons/home.d.ts.map +1 -0
  138. package/dist/components/icon/icons/image.d.ts +3 -0
  139. package/dist/components/icon/icons/image.d.ts.map +1 -0
  140. package/dist/components/icon/icons/index.cjs +4 -0
  141. package/dist/components/icon/icons/index.d.ts +79 -0
  142. package/dist/components/icon/icons/index.d.ts.map +1 -0
  143. package/dist/components/{chunks/icon-a2ABTJf-.js → icon/icons/index.js} +215 -260
  144. package/dist/components/icon/icons/info.d.ts +3 -0
  145. package/dist/components/icon/icons/info.d.ts.map +1 -0
  146. package/dist/components/icon/icons/language.d.ts +3 -0
  147. package/dist/components/icon/icons/language.d.ts.map +1 -0
  148. package/dist/components/icon/icons/link.d.ts +3 -0
  149. package/dist/components/icon/icons/link.d.ts.map +1 -0
  150. package/dist/components/icon/icons/list.d.ts +3 -0
  151. package/dist/components/icon/icons/list.d.ts.map +1 -0
  152. package/dist/components/icon/icons/location.d.ts +3 -0
  153. package/dist/components/icon/icons/location.d.ts.map +1 -0
  154. package/dist/components/icon/icons/lock.d.ts +3 -0
  155. package/dist/components/icon/icons/lock.d.ts.map +1 -0
  156. package/dist/components/icon/icons/login.d.ts +3 -0
  157. package/dist/components/icon/icons/login.d.ts.map +1 -0
  158. package/dist/components/icon/icons/logout.d.ts +3 -0
  159. package/dist/components/icon/icons/logout.d.ts.map +1 -0
  160. package/dist/components/icon/icons/mail.d.ts +3 -0
  161. package/dist/components/icon/icons/mail.d.ts.map +1 -0
  162. package/dist/components/icon/icons/map.d.ts +3 -0
  163. package/dist/components/icon/icons/map.d.ts.map +1 -0
  164. package/dist/components/icon/icons/menu.d.ts +3 -0
  165. package/dist/components/icon/icons/menu.d.ts.map +1 -0
  166. package/dist/components/icon/icons/moon.d.ts +3 -0
  167. package/dist/components/icon/icons/moon.d.ts.map +1 -0
  168. package/dist/components/icon/icons/notifications.d.ts +3 -0
  169. package/dist/components/icon/icons/notifications.d.ts.map +1 -0
  170. package/dist/components/icon/icons/paste.d.ts +3 -0
  171. package/dist/components/icon/icons/paste.d.ts.map +1 -0
  172. package/dist/components/icon/icons/pin.d.ts +3 -0
  173. package/dist/components/icon/icons/pin.d.ts.map +1 -0
  174. package/dist/components/icon/icons/plus.d.ts +3 -0
  175. package/dist/components/icon/icons/plus.d.ts.map +1 -0
  176. package/dist/components/icon/icons/print.d.ts +3 -0
  177. package/dist/components/icon/icons/print.d.ts.map +1 -0
  178. package/dist/components/icon/icons/refresh.d.ts +3 -0
  179. package/dist/components/icon/icons/refresh.d.ts.map +1 -0
  180. package/dist/components/icon/icons/remove.d.ts +3 -0
  181. package/dist/components/icon/icons/remove.d.ts.map +1 -0
  182. package/dist/components/icon/icons/save.d.ts +3 -0
  183. package/dist/components/icon/icons/save.d.ts.map +1 -0
  184. package/dist/components/icon/icons/search.d.ts +3 -0
  185. package/dist/components/icon/icons/search.d.ts.map +1 -0
  186. package/dist/components/icon/icons/settings.d.ts +3 -0
  187. package/dist/components/icon/icons/settings.d.ts.map +1 -0
  188. package/dist/components/icon/icons/share.d.ts +3 -0
  189. package/dist/components/icon/icons/share.d.ts.map +1 -0
  190. package/dist/components/icon/icons/sort-arrows.d.ts +3 -0
  191. package/dist/components/icon/icons/sort-arrows.d.ts.map +1 -0
  192. package/dist/components/icon/icons/sort.d.ts +3 -0
  193. package/dist/components/icon/icons/sort.d.ts.map +1 -0
  194. package/dist/components/icon/icons/star.d.ts +3 -0
  195. package/dist/components/icon/icons/star.d.ts.map +1 -0
  196. package/dist/components/icon/icons/success.d.ts +3 -0
  197. package/dist/components/icon/icons/success.d.ts.map +1 -0
  198. package/dist/components/icon/icons/sun.d.ts +3 -0
  199. package/dist/components/icon/icons/sun.d.ts.map +1 -0
  200. package/dist/components/icon/icons/table.d.ts +3 -0
  201. package/dist/components/icon/icons/table.d.ts.map +1 -0
  202. package/dist/components/icon/icons/tag.d.ts +3 -0
  203. package/dist/components/icon/icons/tag.d.ts.map +1 -0
  204. package/dist/components/icon/icons/trash.d.ts +3 -0
  205. package/dist/components/icon/icons/trash.d.ts.map +1 -0
  206. package/dist/components/icon/icons/unlock.d.ts +3 -0
  207. package/dist/components/icon/icons/unlock.d.ts.map +1 -0
  208. package/dist/components/icon/icons/upload.d.ts +3 -0
  209. package/dist/components/icon/icons/upload.d.ts.map +1 -0
  210. package/dist/components/icon/icons/user-add.d.ts +3 -0
  211. package/dist/components/icon/icons/user-add.d.ts.map +1 -0
  212. package/dist/components/icon/icons/user.d.ts +3 -0
  213. package/dist/components/icon/icons/user.d.ts.map +1 -0
  214. package/dist/components/icon/icons/users.d.ts +3 -0
  215. package/dist/components/icon/icons/users.d.ts.map +1 -0
  216. package/dist/components/icon/icons/video.d.ts +3 -0
  217. package/dist/components/icon/icons/video.d.ts.map +1 -0
  218. package/dist/components/icon/icons/warning.d.ts +3 -0
  219. package/dist/components/icon/icons/warning.d.ts.map +1 -0
  220. package/dist/components/icon/index.d.ts +3 -2
  221. package/dist/components/icon/index.d.ts.map +1 -10
  222. package/dist/components/icon/registry.d.ts +15 -0
  223. package/dist/components/icon/registry.d.ts.map +1 -0
  224. package/dist/components/input/Input.d.ts +56 -0
  225. package/dist/components/input/Input.d.ts.map +1 -0
  226. package/dist/components/input/index.d.ts +3 -0
  227. package/dist/components/input/index.d.ts.map +1 -0
  228. package/dist/components/link/Link.d.ts +16 -1
  229. package/dist/components/link/Link.d.ts.map +1 -10
  230. package/dist/components/link/index.d.ts +3 -1
  231. package/dist/components/link/index.d.ts.map +1 -10
  232. package/dist/components/modal/Modal.d.ts +32 -1
  233. package/dist/components/modal/Modal.d.ts.map +1 -10
  234. package/dist/components/modal/index.d.ts +3 -1
  235. package/dist/components/modal/index.d.ts.map +1 -10
  236. package/dist/components/off-canvas/OffCanvas.d.ts +42 -0
  237. package/dist/components/off-canvas/OffCanvas.d.ts.map +1 -0
  238. package/dist/components/off-canvas/index.d.ts +3 -0
  239. package/dist/components/off-canvas/index.d.ts.map +1 -0
  240. package/dist/components/page/Page.d.ts +29 -1
  241. package/dist/components/page/Page.d.ts.map +1 -10
  242. package/dist/components/page/index.d.ts +3 -1
  243. package/dist/components/page/index.d.ts.map +1 -10
  244. package/dist/components/popover/Popover.d.ts +48 -1
  245. package/dist/components/popover/Popover.d.ts.map +1 -10
  246. package/dist/components/popover/index.d.ts +3 -1
  247. package/dist/components/popover/index.d.ts.map +1 -10
  248. package/dist/components/resource-table/ResourceTable.d.ts +159 -0
  249. package/dist/components/resource-table/ResourceTable.d.ts.map +1 -0
  250. package/dist/components/resource-table/index.d.ts +3 -0
  251. package/dist/components/resource-table/index.d.ts.map +1 -0
  252. package/dist/components/select/Select.d.ts +34 -0
  253. package/dist/components/select/Select.d.ts.map +1 -0
  254. package/dist/components/select/index.d.ts +3 -0
  255. package/dist/components/select/index.d.ts.map +1 -0
  256. package/dist/components/side-navigation/SideNavigation.d.ts +22 -0
  257. package/dist/components/side-navigation/SideNavigation.d.ts.map +1 -0
  258. package/dist/components/side-navigation/SideNavigationActionHeader.d.ts +2 -0
  259. package/dist/components/side-navigation/SideNavigationActionHeader.d.ts.map +1 -0
  260. package/dist/components/side-navigation/SideNavigationActionLinks.d.ts +9 -0
  261. package/dist/components/side-navigation/SideNavigationActionLinks.d.ts.map +1 -0
  262. package/dist/components/side-navigation/SideNavigationActionMenu.d.ts +23 -0
  263. package/dist/components/side-navigation/SideNavigationActionMenu.d.ts.map +1 -0
  264. package/dist/components/side-navigation/SideNavigationLink.d.ts +28 -0
  265. package/dist/components/side-navigation/SideNavigationLink.d.ts.map +1 -0
  266. package/dist/components/side-navigation/SideNavigationLinks.d.ts +14 -0
  267. package/dist/components/side-navigation/SideNavigationLinks.d.ts.map +1 -0
  268. package/dist/components/side-navigation/index.d.ts +8 -0
  269. package/dist/components/side-navigation/index.d.ts.map +1 -0
  270. package/dist/components/spinner/Spinner.d.ts +13 -1
  271. package/dist/components/spinner/Spinner.d.ts.map +1 -10
  272. package/dist/components/spinner/index.d.ts +3 -1
  273. package/dist/components/spinner/index.d.ts.map +1 -10
  274. package/dist/components/stack/Stack.d.ts +20 -1
  275. package/dist/components/stack/Stack.d.ts.map +1 -10
  276. package/dist/components/stack/index.d.ts +3 -1
  277. package/dist/components/stack/index.d.ts.map +1 -10
  278. package/dist/components/switch/Switch.d.ts +32 -1
  279. package/dist/components/switch/Switch.d.ts.map +1 -10
  280. package/dist/components/switch/index.d.ts +3 -1
  281. package/dist/components/switch/index.d.ts.map +1 -10
  282. package/dist/components/table/Table.d.ts +15 -0
  283. package/dist/components/table/Table.d.ts.map +1 -0
  284. package/dist/components/table/index.d.ts +3 -0
  285. package/dist/components/table/index.d.ts.map +1 -0
  286. package/dist/components/tabs/Tab.d.ts +19 -0
  287. package/dist/components/tabs/Tab.d.ts.map +1 -0
  288. package/dist/components/tabs/TabContent.d.ts +13 -0
  289. package/dist/components/tabs/TabContent.d.ts.map +1 -0
  290. package/dist/components/tabs/TabList.d.ts +12 -0
  291. package/dist/components/tabs/TabList.d.ts.map +1 -0
  292. package/dist/components/tabs/Tabs.d.ts +20 -0
  293. package/dist/components/tabs/Tabs.d.ts.map +1 -0
  294. package/dist/components/tabs/index.d.ts +9 -0
  295. package/dist/components/tabs/index.d.ts.map +1 -0
  296. package/dist/components/tags/Tags.d.ts +57 -0
  297. package/dist/components/tags/Tags.d.ts.map +1 -0
  298. package/dist/components/tags/index.d.ts +3 -0
  299. package/dist/components/tags/index.d.ts.map +1 -0
  300. package/dist/components/text/Text.d.ts +25 -1
  301. package/dist/components/text/Text.d.ts.map +1 -10
  302. package/dist/components/text/index.d.ts +3 -1
  303. package/dist/components/text/index.d.ts.map +1 -10
  304. package/dist/icons/calendar-day.svg +3 -0
  305. package/dist/icons/calendar-empty.svg +3 -0
  306. package/dist/icons/calendar-week.svg +3 -0
  307. package/dist/icons/calendar.svg +1 -1
  308. package/dist/icons/credit-card.svg +3 -0
  309. package/dist/icons/dollar-sign.svg +3 -0
  310. package/dist/icons/edit.svg +1 -1
  311. package/dist/icons/sort-arrows.svg +3 -0
  312. package/dist/icons/table.svg +3 -0
  313. package/dist/index.cjs +209 -1
  314. package/dist/index.d.ts +69 -35
  315. package/dist/index.d.ts.map +1 -10
  316. package/dist/index.js +8697 -16
  317. package/dist/plus-C2ciGlkq.cjs +1 -0
  318. package/dist/plus-csC2ambK.js +136 -0
  319. package/package.json +37 -87
  320. package/tailwind.preset.cjs +24 -0
  321. package/tailwind.preset.js +24 -0
  322. package/dist/components/button/index.cjs +0 -1
  323. package/dist/components/button/index.js +0 -2
  324. package/dist/components/card/index.cjs +0 -1
  325. package/dist/components/card/index.js +0 -2
  326. package/dist/components/checkbox/index.cjs +0 -1
  327. package/dist/components/checkbox/index.js +0 -1
  328. package/dist/components/choice/index.cjs +0 -1
  329. package/dist/components/choice/index.js +0 -1
  330. package/dist/components/chunks/Icon-BTlX8dXa.js +0 -1
  331. package/dist/components/chunks/Icon-xNhleOos.js +0 -77
  332. package/dist/components/chunks/button-4_r-rdhN.js +0 -1
  333. package/dist/components/chunks/button-DFs4DmfC.js +0 -575
  334. package/dist/components/chunks/card-D8FpQZBD.js +0 -1
  335. package/dist/components/chunks/card-DhRHTSkL.js +0 -58
  336. package/dist/components/chunks/checkbox-Bakjptcp.js +0 -1
  337. package/dist/components/chunks/checkbox-D95xYxXV.js +0 -169
  338. package/dist/components/chunks/choice-BlAkXCQN.js +0 -204
  339. package/dist/components/chunks/choice-C0EYGPxa.js +0 -1
  340. package/dist/components/chunks/grid-DVHtippr.js +0 -1
  341. package/dist/components/chunks/grid-DqlQrFkp.js +0 -62
  342. package/dist/components/chunks/icon-BZolpoyx.js +0 -1
  343. package/dist/components/chunks/link-C49HKGxh.js +0 -75
  344. package/dist/components/chunks/link-S0yBi9n7.js +0 -1
  345. package/dist/components/chunks/modal-B2sNSV2Q.js +0 -1
  346. package/dist/components/chunks/modal-BQlup2Mw.js +0 -98
  347. package/dist/components/chunks/page-BiSPS1-l.js +0 -1
  348. package/dist/components/chunks/page-DFKYJekL.js +0 -112
  349. package/dist/components/chunks/popover-BkTNH5gb.js +0 -181
  350. package/dist/components/chunks/popover-DFCs6KnJ.js +0 -1
  351. package/dist/components/chunks/spinner-Ch8momJm.js +0 -63
  352. package/dist/components/chunks/spinner-zGnecx3W.js +0 -111
  353. package/dist/components/chunks/stack-BvgkqvMX.js +0 -1
  354. package/dist/components/chunks/stack-DzZy3iH1.js +0 -114
  355. package/dist/components/chunks/switch-C5FOAA64.js +0 -1
  356. package/dist/components/chunks/switch-CCyMw1-M.js +0 -138
  357. package/dist/components/chunks/text-B-qq-sZ2.js +0 -111
  358. package/dist/components/chunks/text-nTrVku3e.js +0 -1
  359. package/dist/components/grid/index.cjs +0 -1
  360. package/dist/components/grid/index.js +0 -2
  361. package/dist/components/icon/index.cjs +0 -1
  362. package/dist/components/icon/index.js +0 -3
  363. package/dist/components/link/index.cjs +0 -1
  364. package/dist/components/link/index.js +0 -2
  365. package/dist/components/modal/index.cjs +0 -1
  366. package/dist/components/modal/index.js +0 -1
  367. package/dist/components/page/index.cjs +0 -1
  368. package/dist/components/page/index.js +0 -2
  369. package/dist/components/popover/index.cjs +0 -1
  370. package/dist/components/popover/index.js +0 -1
  371. package/dist/components/spinner/index.cjs +0 -1
  372. package/dist/components/spinner/index.js +0 -2
  373. package/dist/components/stack/index.cjs +0 -1
  374. package/dist/components/stack/index.js +0 -2
  375. package/dist/components/switch/index.cjs +0 -1
  376. package/dist/components/switch/index.js +0 -2
  377. package/dist/components/text/index.cjs +0 -1
  378. package/dist/components/text/index.js +0 -2
  379. package/dist/mintui-elements.d.ts +0 -78
  380. package/dist/mintui-elements.d.ts.map +0 -10
  381. package/dist/styles.css +0 -1
@@ -1,98 +0,0 @@
1
- import "./icon-a2ABTJf-.js";
2
- import "./button-DFs4DmfC.js";
3
- import "./text-B-qq-sZ2.js";
4
- import "./stack-DzZy3iH1.js";
5
- //#region src/components/modal/Modal.js
6
- var e = class extends HTMLElement {
7
- static get observedAttributes() {
8
- return [
9
- "id",
10
- "heading",
11
- "open"
12
- ];
13
- }
14
- constructor() {
15
- super(), this._overlay = null, this._modal = null, this._header = null, this._headingSlot = null, this._bodySlot = null, this._actionsSlot = null, this._closeButton = null, this._darkModeObserver = null;
16
- }
17
- connectedCallback() {
18
- this.classList.add("box-border", "m-0", "p-0", "border-0", "align-baseline", "fixed", "inset-0", "z-50"), this.isOpen() || this.classList.add("hidden"), this.render(), this._observeDarkMode();
19
- }
20
- disconnectedCallback() {
21
- this._darkModeObserver &&= (this._darkModeObserver.disconnect(), null);
22
- }
23
- attributeChangedCallback(e, t, n) {
24
- t !== n && this.render();
25
- }
26
- getId() {
27
- return this.getAttribute("id") || "";
28
- }
29
- getHeading() {
30
- return this.getAttribute("heading") || "";
31
- }
32
- isOpen() {
33
- return this.hasAttribute("open");
34
- }
35
- open() {
36
- this.setAttribute("open", "");
37
- }
38
- close() {
39
- this.removeAttribute("open");
40
- }
41
- render() {
42
- let e = this.getId(), t = this.getHeading(), n = this.isOpen();
43
- if (e && (this.id = e), this._overlay || (this._overlay = document.createElement("div"), this._overlay.className = "fixed inset-0 bg-black bg-opacity-50 transition-opacity duration-200 z-40", this._overlay.addEventListener("click", () => this.close()), this.appendChild(this._overlay)), this._modal || (this._modal = document.createElement("div"), this._modal.className = "fixed inset-0 flex items-center justify-center p-2 pointer-events-none z-50", this.appendChild(this._modal)), n) {
44
- let e = this._modal.querySelector(".modal-content");
45
- e || (e = document.createElement("div"), e.className = "modal-content bg-white dark:bg-gray-800 rounded-lg shadow-xl max-w-2xl w-full max-h-[90vh] flex flex-col pointer-events-auto transition-all duration-200 ease-out transform", this._modal.appendChild(e)), this._animateEnter();
46
- } else this._animateExit();
47
- let r = this._modal.querySelector(".modal-content");
48
- r || (r = document.createElement("div"), r.className = "modal-content bg-white dark:bg-gray-800 rounded-lg shadow-xl max-w-2xl w-full max-h-[90vh] flex flex-col pointer-events-auto transition-all duration-200 ease-out transform", this._modal.appendChild(r)), this._header || (this._header = document.createElement("div"), this._header.className = "flex items-center justify-between p-4 border-b border-gray-200 dark:border-gray-700", r.appendChild(this._header)), this._headingSlot || (this._headingSlot = document.createElement("div"), this._headingSlot.className = "flex-1", this._headingSlot.setAttribute("slot", "heading"), this._header.appendChild(this._headingSlot));
49
- let i = this._headingSlot.querySelector("mint-text");
50
- t ? (i || (i = document.createElement("mint-text"), i.setAttribute("size", "sub-heading"), i.setAttribute("bold", ""), this._headingSlot.appendChild(i)), i.textContent = t) : i && i.remove(), Array.from(this.children).filter((e) => e !== this._overlay && e !== this._modal && e !== this._headingSlot && e.getAttribute("slot") === "heading").forEach((e) => {
51
- e.parentElement !== this._headingSlot && this._headingSlot.appendChild(e);
52
- }), this._closeButton || (this._closeButton = document.createElement("mint-button"), this._closeButton.setAttribute("variant", "ghost"), this._closeButton.setAttribute("icon", "close"), this._closeButton.addEventListener("click", () => this.close()), this._header.appendChild(this._closeButton)), this._bodySlot || (this._bodySlot = document.createElement("div"), this._bodySlot.className = "flex-1 overflow-y-auto p-4", this._bodySlot.setAttribute("slot", "body"), r.appendChild(this._bodySlot)), Array.from(this.children).filter((e) => e !== this._overlay && e !== this._modal && e !== this._bodySlot && e.getAttribute("slot") === "body").forEach((e) => {
53
- e.parentElement !== this._bodySlot && this._bodySlot.appendChild(e);
54
- }), this._actionsSlot || (this._actionsSlot = document.createElement("div"), this._actionsSlot.className = "p-4 border-t border-gray-200 dark:border-gray-700", this._actionsSlot.setAttribute("slot", "actions"), r.appendChild(this._actionsSlot));
55
- let a = this._actionsSlot.querySelector("mint-stack");
56
- a || (a = document.createElement("mint-stack"), a.setAttribute("direction", "horizontal"), a.className = "justify-end", this._actionsSlot.appendChild(a)), Array.from(this.children).filter((e) => e !== this._overlay && e !== this._modal && e !== this._actionsSlot && e.getAttribute("slot") === "actions").forEach((e) => {
57
- Array.from(e.children).forEach((e) => {
58
- e.parentElement !== a && a.appendChild(e);
59
- }), e.parentElement && e.remove();
60
- }), Array.from(this.children).forEach((e) => {
61
- e !== this._overlay && e !== this._modal && e.getAttribute("slot") !== "heading" && e.getAttribute("slot") !== "body" && e.getAttribute("slot") !== "actions" && e !== this._headingSlot && e !== this._bodySlot && e !== this._actionsSlot && e.parentElement !== this._bodySlot && this._bodySlot.appendChild(e);
62
- }), this._updateBackgroundColor();
63
- }
64
- _updateBackgroundColor() {
65
- if (!this._modal) return;
66
- let e = document.documentElement.classList.contains("dark"), t = this._modal.querySelector(".modal-content");
67
- t && (e ? (t.classList.remove("bg-white"), t.classList.add("bg-gray-800")) : (t.classList.remove("bg-gray-800"), t.classList.add("bg-white")));
68
- }
69
- _observeDarkMode() {
70
- this._darkModeObserver || (this._darkModeObserver = new MutationObserver(() => {
71
- this._updateBackgroundColor();
72
- }), this._darkModeObserver.observe(document.documentElement, {
73
- attributes: !0,
74
- attributeFilter: ["class"]
75
- }));
76
- }
77
- _animateEnter() {
78
- let e = this._modal?.querySelector(".modal-content");
79
- e && (e.style.transform = "scale(0.97) translateY(10px)", e.style.opacity = "0", e.style.transition = "all 200ms ease-out", this.classList.remove("hidden"), requestAnimationFrame(() => {
80
- requestAnimationFrame(() => {
81
- e.style.transform = "scale(1) translateY(0)", e.style.opacity = "1";
82
- });
83
- }));
84
- }
85
- _animateExit() {
86
- let e = this._modal?.querySelector(".modal-content");
87
- if (!e) {
88
- this.classList.add("hidden");
89
- return;
90
- }
91
- e.style.transition = "all 200ms ease-in", e.style.transform = "scale(0.97) translateY(10px)", e.style.opacity = "0", setTimeout(() => {
92
- this.classList.add("hidden"), e.style.transform = "", e.style.opacity = "", e.style.transition = "";
93
- }, 200);
94
- }
95
- };
96
- customElements.get("mint-modal") || customElements.define("mint-modal", e);
97
- //#endregion
98
- export { e as t };
@@ -1 +0,0 @@
1
- require(`./text-nTrVku3e.js`);var e=class extends HTMLElement{static get observedAttributes(){return[`href`,`fallback-href`]}constructor(){super(),this._historyDepth=0,this._maxBackAttempts=10,this._backAttempts=0}connectedCallback(){this.classList.add(`box-border`,`m-0`,`p-0`,`border-0`,`align-baseline`,`inline-block`,`flex`,`items-center`,`justify-center`),this.render(),this._setupHistoryTracking()}attributeChangedCallback(e,t,n){t!==n&&this.render()}_setupHistoryTracking(){window.addEventListener(`popstate`,()=>{this._backAttempts=0}),this._historyDepth=window.history.length}getFallbackHref(){return this.getAttribute(`fallback-href`)||this.getAttribute(`href`)||`/`}handleClick(e){if(e.preventDefault(),e.stopPropagation(),window.history.length>1&&this._backAttempts<this._maxBackAttempts&&this._backAttempts===0){this._backAttempts++;let e=window.location.href,t=Date.now();window.history.back(),setTimeout(()=>{Date.now()-t,window.location.href===e?this._navigateToFallback():setTimeout(()=>{this._backAttempts=0},500)},200)}else this._navigateToFallback()}_navigateToFallback(){let e=this.getFallbackHref();if(this._backAttempts=0,e.startsWith(`/`)&&!e.startsWith(`//`)){let t=document.querySelector(`#app`).__vue_app__;if(t&&t.config&&t.config.globalProperties&&t.config.globalProperties.$router)try{t.config.globalProperties.$router.push(e);return}catch{}try{window.history.pushState({},``,e),window.dispatchEvent(new PopStateEvent(`popstate`));return}catch{}}window.location.href=e}render(){this._button||(this._button=document.createElement(`mint-button`),this._button.setAttribute(`variant`,`neutral`),this._button.setAttribute(`icon`,`arrow-left`),this._button.addEventListener(`click`,e=>this.handleClick(e)),this.appendChild(this._button))}};customElements.get(`mint-back-button`)||customElements.define(`mint-back-button`,e);var t=class extends HTMLElement{static get observedAttributes(){return[`heading`,`fallback-href`,`show-back-button`]}constructor(){super(),this._pageContainer=null,this._header=null,this._titleElement=null,this._headingText=null,this._actionsSlot=null,this._bodySlot=null,this._darkModeObserver=null}connectedCallback(){this.classList.add(`box-border`,`m-0`,`p-0`,`border-0`,`align-baseline`,`block`),this.render(),this._observeDarkMode()}disconnectedCallback(){this._darkModeObserver&&=(this._darkModeObserver.disconnect(),null)}getHeading(){return this.getAttribute(`heading`)||``}getFallbackHref(){return this.getAttribute(`fallback-href`)||`/`}shouldShowBackButton(){return this.hasAttribute(`show-back-button`)}render(){let e=this.getHeading();this._pageContainer||(this._pageContainer=document.createElement(`div`),this._pageContainer.className=`min-h-screen p-8 transition-colors duration-200`,this.appendChild(this._pageContainer)),this._header||(this._header=document.createElement(`div`),this._header.className=`flex justify-between mb-8`,this._pageContainer.appendChild(this._header)),this._titleElement||(this._titleElement=document.createElement(`div`),this._titleElement.className=`flex gap-4 min-w-0 flex-1`,this._header.appendChild(this._titleElement));let t=this._titleElement.querySelector(`mint-back-button`);if(this.shouldShowBackButton()){t||(t=document.createElement(`mint-back-button`),this._titleElement.insertBefore(t,this._titleElement.firstChild));let e=this.getFallbackHref();t.setAttribute(`fallback-href`,e)}else t&&=(t.remove(),null);e?(this._headingText?(this._headingText.classList.add(`truncate`,`min-w-0`),t&&t.parentElement===this._titleElement?this._headingText.previousSibling!==t&&this._titleElement.insertBefore(this._headingText,t.nextSibling):this._headingText.previousSibling&&this._titleElement.insertBefore(this._headingText,this._titleElement.firstChild)):(this._headingText=document.createElement(`mint-text`),this._headingText.setAttribute(`size`,`heading`),this._headingText.setAttribute(`bold`,``),this._headingText.classList.add(`truncate`,`min-w-0`),t&&t.parentElement===this._titleElement?this._titleElement.insertBefore(this._headingText,t.nextSibling):this._titleElement.insertBefore(this._headingText,this._titleElement.firstChild)),this._headingText.textContent=e):this._headingText&&=(this._headingText.remove(),null),this._actionsSlot?this._actionsSlot.classList.contains(`ml-4`)||this._actionsSlot.classList.add(`ml-4`):(this._actionsSlot=document.createElement(`div`),this._actionsSlot.className=`flex gap-2 items-center ml-4`,this._actionsSlot.setAttribute(`slot`,`actions`),this._header.appendChild(this._actionsSlot)),Array.from(this.children).filter(e=>e!==this._pageContainer&&e!==this._actionsSlot&&e.getAttribute(`slot`)===`actions`).forEach(e=>{e.parentElement!==this._actionsSlot&&this._actionsSlot.appendChild(e)}),this._bodySlot||(this._bodySlot=document.createElement(`div`),this._pageContainer.appendChild(this._bodySlot)),Array.from(this.children).forEach(e=>{e!==this._pageContainer&&e.getAttribute(`slot`)!==`actions`&&e!==this._actionsSlot&&e!==this._header&&e!==this._bodySlot&&e!==this._headingText&&e.parentElement!==this._bodySlot&&e.parentElement!==this._pageContainer&&this._bodySlot.appendChild(e)}),this._updateBackgroundColor()}_updateBackgroundColor(){this._pageContainer&&(document.documentElement.classList.contains(`dark`)?(this._pageContainer.classList.remove(`bg-gray-50`),this._pageContainer.classList.add(`bg-gray-900`)):(this._pageContainer.classList.remove(`bg-gray-900`),this._pageContainer.classList.add(`bg-gray-50`)))}_observeDarkMode(){this._darkModeObserver||(this._darkModeObserver=new MutationObserver(()=>{this._updateBackgroundColor()}),this._darkModeObserver.observe(document.documentElement,{attributes:!0,attributeFilter:[`class`]}))}};customElements.get(`mint-page`)||customElements.define(`mint-page`,t),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return t}});
@@ -1,112 +0,0 @@
1
- import "./text-B-qq-sZ2.js";
2
- //#region src/components/back-button/BackButton.js
3
- var e = class extends HTMLElement {
4
- static get observedAttributes() {
5
- return ["href", "fallback-href"];
6
- }
7
- constructor() {
8
- super(), this._historyDepth = 0, this._maxBackAttempts = 10, this._backAttempts = 0;
9
- }
10
- connectedCallback() {
11
- this.classList.add("box-border", "m-0", "p-0", "border-0", "align-baseline", "inline-block", "flex", "items-center", "justify-center"), this.render(), this._setupHistoryTracking();
12
- }
13
- attributeChangedCallback(e, t, n) {
14
- t !== n && this.render();
15
- }
16
- _setupHistoryTracking() {
17
- window.addEventListener("popstate", () => {
18
- this._backAttempts = 0;
19
- }), this._historyDepth = window.history.length;
20
- }
21
- getFallbackHref() {
22
- return this.getAttribute("fallback-href") || this.getAttribute("href") || "/";
23
- }
24
- handleClick(e) {
25
- if (e.preventDefault(), e.stopPropagation(), window.history.length > 1 && this._backAttempts < this._maxBackAttempts && this._backAttempts === 0) {
26
- this._backAttempts++;
27
- let e = window.location.href, t = Date.now();
28
- window.history.back(), setTimeout(() => {
29
- Date.now() - t, window.location.href === e ? this._navigateToFallback() : setTimeout(() => {
30
- this._backAttempts = 0;
31
- }, 500);
32
- }, 200);
33
- } else this._navigateToFallback();
34
- }
35
- _navigateToFallback() {
36
- let e = this.getFallbackHref();
37
- if (this._backAttempts = 0, e.startsWith("/") && !e.startsWith("//")) {
38
- let t = document.querySelector("#app").__vue_app__;
39
- if (t && t.config && t.config.globalProperties && t.config.globalProperties.$router) try {
40
- t.config.globalProperties.$router.push(e);
41
- return;
42
- } catch {}
43
- try {
44
- window.history.pushState({}, "", e), window.dispatchEvent(new PopStateEvent("popstate"));
45
- return;
46
- } catch {}
47
- }
48
- window.location.href = e;
49
- }
50
- render() {
51
- this._button || (this._button = document.createElement("mint-button"), this._button.setAttribute("variant", "neutral"), this._button.setAttribute("icon", "arrow-left"), this._button.addEventListener("click", (e) => this.handleClick(e)), this.appendChild(this._button));
52
- }
53
- };
54
- customElements.get("mint-back-button") || customElements.define("mint-back-button", e);
55
- //#endregion
56
- //#region src/components/page/Page.js
57
- var t = class extends HTMLElement {
58
- static get observedAttributes() {
59
- return [
60
- "heading",
61
- "fallback-href",
62
- "show-back-button"
63
- ];
64
- }
65
- constructor() {
66
- super(), this._pageContainer = null, this._header = null, this._titleElement = null, this._headingText = null, this._actionsSlot = null, this._bodySlot = null, this._darkModeObserver = null;
67
- }
68
- connectedCallback() {
69
- this.classList.add("box-border", "m-0", "p-0", "border-0", "align-baseline", "block"), this.render(), this._observeDarkMode();
70
- }
71
- disconnectedCallback() {
72
- this._darkModeObserver &&= (this._darkModeObserver.disconnect(), null);
73
- }
74
- getHeading() {
75
- return this.getAttribute("heading") || "";
76
- }
77
- getFallbackHref() {
78
- return this.getAttribute("fallback-href") || "/";
79
- }
80
- shouldShowBackButton() {
81
- return this.hasAttribute("show-back-button");
82
- }
83
- render() {
84
- let e = this.getHeading();
85
- this._pageContainer || (this._pageContainer = document.createElement("div"), this._pageContainer.className = "min-h-screen p-8 transition-colors duration-200", this.appendChild(this._pageContainer)), this._header || (this._header = document.createElement("div"), this._header.className = "flex justify-between mb-8", this._pageContainer.appendChild(this._header)), this._titleElement || (this._titleElement = document.createElement("div"), this._titleElement.className = "flex gap-4 min-w-0 flex-1", this._header.appendChild(this._titleElement));
86
- let t = this._titleElement.querySelector("mint-back-button");
87
- if (this.shouldShowBackButton()) {
88
- t || (t = document.createElement("mint-back-button"), this._titleElement.insertBefore(t, this._titleElement.firstChild));
89
- let e = this.getFallbackHref();
90
- t.setAttribute("fallback-href", e);
91
- } else t &&= (t.remove(), null);
92
- e ? (this._headingText ? (this._headingText.classList.add("truncate", "min-w-0"), t && t.parentElement === this._titleElement ? this._headingText.previousSibling !== t && this._titleElement.insertBefore(this._headingText, t.nextSibling) : this._headingText.previousSibling && this._titleElement.insertBefore(this._headingText, this._titleElement.firstChild)) : (this._headingText = document.createElement("mint-text"), this._headingText.setAttribute("size", "heading"), this._headingText.setAttribute("bold", ""), this._headingText.classList.add("truncate", "min-w-0"), t && t.parentElement === this._titleElement ? this._titleElement.insertBefore(this._headingText, t.nextSibling) : this._titleElement.insertBefore(this._headingText, this._titleElement.firstChild)), this._headingText.textContent = e) : this._headingText &&= (this._headingText.remove(), null), this._actionsSlot ? this._actionsSlot.classList.contains("ml-4") || this._actionsSlot.classList.add("ml-4") : (this._actionsSlot = document.createElement("div"), this._actionsSlot.className = "flex gap-2 items-center ml-4", this._actionsSlot.setAttribute("slot", "actions"), this._header.appendChild(this._actionsSlot)), Array.from(this.children).filter((e) => e !== this._pageContainer && e !== this._actionsSlot && e.getAttribute("slot") === "actions").forEach((e) => {
93
- e.parentElement !== this._actionsSlot && this._actionsSlot.appendChild(e);
94
- }), this._bodySlot || (this._bodySlot = document.createElement("div"), this._pageContainer.appendChild(this._bodySlot)), Array.from(this.children).forEach((e) => {
95
- e !== this._pageContainer && e.getAttribute("slot") !== "actions" && e !== this._actionsSlot && e !== this._header && e !== this._bodySlot && e !== this._headingText && e.parentElement !== this._bodySlot && e.parentElement !== this._pageContainer && this._bodySlot.appendChild(e);
96
- }), this._updateBackgroundColor();
97
- }
98
- _updateBackgroundColor() {
99
- this._pageContainer && (document.documentElement.classList.contains("dark") ? (this._pageContainer.classList.remove("bg-gray-50"), this._pageContainer.classList.add("bg-gray-900")) : (this._pageContainer.classList.remove("bg-gray-900"), this._pageContainer.classList.add("bg-gray-50")));
100
- }
101
- _observeDarkMode() {
102
- this._darkModeObserver || (this._darkModeObserver = new MutationObserver(() => {
103
- this._updateBackgroundColor();
104
- }), this._darkModeObserver.observe(document.documentElement, {
105
- attributes: !0,
106
- attributeFilter: ["class"]
107
- }));
108
- }
109
- };
110
- customElements.get("mint-page") || customElements.define("mint-page", t);
111
- //#endregion
112
- export { t };
@@ -1,181 +0,0 @@
1
- import "./stack-DzZy3iH1.js";
2
- //#region src/components/popover/Popover.js
3
- var e = class extends HTMLElement {
4
- static get observedAttributes() {
5
- return [
6
- "id",
7
- "direction",
8
- "open",
9
- "trigger-id"
10
- ];
11
- }
12
- constructor() {
13
- super(), this._overlay = null, this._popover = null, this._triggerElement = null, this._darkModeObserver = null, this._clickOutsideHandler = null, this._triggerClickHandler = null, this._scrollHandler = null, this._resizeHandler = null;
14
- }
15
- connectedCallback() {
16
- this.classList.add("box-border", "m-0", "p-0", "border-0", "align-baseline", "fixed", "inset-0", "z-50"), this.isOpen() || this.classList.add("hidden"), this.render(), this._setupTrigger(), this._observeDarkMode();
17
- }
18
- disconnectedCallback() {
19
- this._darkModeObserver &&= (this._darkModeObserver.disconnect(), null), this._clickOutsideHandler &&= (document.removeEventListener("click", this._clickOutsideHandler), null), this._triggerClickHandler && this._triggerElement && (this._triggerElement.removeEventListener("click", this._triggerClickHandler), this._triggerClickHandler = null), this._scrollHandler &&= (window.removeEventListener("scroll", this._scrollHandler, !0), null), this._resizeHandler &&= (window.removeEventListener("resize", this._resizeHandler), null);
20
- }
21
- attributeChangedCallback(e, t, n) {
22
- t !== n && (this.render(), e === "trigger-id" && this._setupTrigger());
23
- }
24
- getId() {
25
- return this.getAttribute("id") || "";
26
- }
27
- getDirection() {
28
- return this.getAttribute("direction") || "down";
29
- }
30
- getTriggerId() {
31
- return this.getAttribute("trigger-id") || "";
32
- }
33
- isOpen() {
34
- return this.hasAttribute("open");
35
- }
36
- open() {
37
- this.setAttribute("open", "");
38
- }
39
- close() {
40
- this.removeAttribute("open");
41
- }
42
- _setupTrigger() {
43
- let e = this.getTriggerId();
44
- this._triggerClickHandler && this._triggerElement && (this._triggerElement.removeEventListener("click", this._triggerClickHandler), this._triggerClickHandler = null), e && (this._triggerElement = document.getElementById(e), this._triggerElement ? this._attachTriggerListener() : setTimeout(() => {
45
- this._triggerElement = document.getElementById(e), this._triggerElement && this._attachTriggerListener();
46
- }, 10));
47
- }
48
- _attachTriggerListener() {
49
- if (this._triggerElement && !this._triggerClickHandler) {
50
- let e = this;
51
- this._triggerClickHandler = function(t) {
52
- t.stopImmediatePropagation(), t.preventDefault(), e.hasAttribute("open") ? e.removeAttribute("open") : e.setAttribute("open", "");
53
- }, this._triggerElement.addEventListener("click", this._triggerClickHandler, !0);
54
- }
55
- }
56
- _calculatePosition() {
57
- if (!this._triggerElement || !this._popover) return {
58
- top: 0,
59
- left: 0,
60
- direction: "down"
61
- };
62
- let e = this._triggerElement.getBoundingClientRect(), t = this._popover.querySelector(".popover-content");
63
- if (!t) return {
64
- top: 0,
65
- left: 0,
66
- direction: "down"
67
- };
68
- this.classList.contains("hidden") && (this.classList.remove("hidden"), this._popover.style.visibility = "hidden");
69
- let n = t.getBoundingClientRect(), r = window.innerWidth, i = window.innerHeight, a = this.getDirection(), o = 0, s = 0;
70
- switch (a) {
71
- case "down":
72
- if (o = e.bottom + 8, s = e.left + e.width / 2 - n.width / 2, o + n.height > i) {
73
- let t = e.top - n.height - 8;
74
- t >= 0 ? (a = "up", o = t) : (o = Math.max(0, i - n.height - 8), o + n.height > i && (o = 0));
75
- }
76
- s < 0 && (s = 8), s + n.width > r && (s = Math.max(8, r - n.width - 8), s + n.width > r && (s = r - n.width));
77
- break;
78
- case "up":
79
- if (o = e.top - n.height - 8, s = e.left + e.width / 2 - n.width / 2, o < 0) {
80
- let t = e.bottom + 8;
81
- t + n.height <= i ? (a = "down", o = t) : (o = Math.min(i - n.height - 8, i - n.height), o < 0 && (o = i - n.height));
82
- }
83
- s < 0 && (s = 8), s + n.width > r && (s = Math.max(8, r - n.width - 8), s + n.width > r && (s = r - n.width));
84
- break;
85
- case "right":
86
- if (o = e.top + e.height / 2 - n.height / 2, s = e.right + 8, s + n.width > r) {
87
- let t = e.left - n.width - 8;
88
- t >= 0 ? (a = "left", s = t) : (s = Math.max(0, r - n.width - 8), s + n.width > r && (s = r - n.width));
89
- }
90
- o < 0 && (o = 8), o + n.height > i && (o = Math.max(8, i - n.height - 8), o + n.height > i && (o = i - n.height));
91
- break;
92
- case "left":
93
- if (o = e.top + e.height / 2 - n.height / 2, s = e.left - n.width - 8, s < 0) {
94
- let t = e.right + 8;
95
- t + n.width <= r ? (a = "right", s = t) : (s = Math.min(r - n.width - 8, r - n.width), s < 0 && (s = 0));
96
- }
97
- o < 0 && (o = 8), o + n.height > i && (o = Math.max(8, i - n.height - 8), o + n.height > i && (o = i - n.height));
98
- break;
99
- }
100
- return {
101
- top: o,
102
- left: s,
103
- direction: a
104
- };
105
- }
106
- render() {
107
- let e = this.getId(), t = this.isOpen();
108
- if (e && (this.id = e), t) {
109
- if (this.classList.remove("hidden"), this.style.pointerEvents = "auto", !this._clickOutsideHandler) {
110
- let e = this;
111
- this._clickOutsideHandler = function(t) {
112
- let n = t.target, r = e._popover?.querySelector(".popover-content"), i = r && (r.contains(n) || r === n), a = n.closest("button, a, [role=\"button\"], mint-button, mint-link") !== null;
113
- (!i || a) && e.close();
114
- }, setTimeout(() => {
115
- document.addEventListener("click", this._clickOutsideHandler, !1);
116
- }, 100);
117
- }
118
- } else this.classList.add("hidden"), this.style.pointerEvents = "none", this._clickOutsideHandler &&= (document.removeEventListener("click", this._clickOutsideHandler, !0), null);
119
- this._overlay || (this._overlay = document.createElement("div"), this._overlay.className = "fixed inset-0 pointer-events-none z-40", this.appendChild(this._overlay)), this._popover || (this._popover = document.createElement("div"), this._popover.className = "fixed z-50 pointer-events-auto", this.appendChild(this._popover));
120
- let n = this._popover.querySelector(".popover-content");
121
- n || (n = document.createElement("div"), n.className = "popover-content bg-white dark:bg-gray-800 rounded-lg shadow-xl p-4 transition-all duration-200 ease-out transform", this._popover.appendChild(n)), Array.from(this.children).forEach((e) => {
122
- e !== this._overlay && e !== this._popover && e.parentElement === this && n.appendChild(e);
123
- }), t ? (this._triggerElement || this._setupTrigger(), this._setupPositionListeners(), this.offsetHeight, this._triggerElement ? this._updatePosition(n) : (this._popover.style.top = "50%", this._popover.style.left = "50%", this._popover.style.transform = "translate(-50%, -50%)", this._popover.style.visibility = "visible", this._popover.style.display = "block", n.style.transform = "scale(0.97) translateY(10px)", n.style.opacity = "0", n.style.transition = "all 200ms ease-out", requestAnimationFrame(() => {
124
- requestAnimationFrame(() => {
125
- n.style.transform = "scale(1) translateY(0)", n.style.opacity = "1";
126
- });
127
- }))) : !t && n && (this._removePositionListeners(), n.style.opacity !== "0" && n.style.opacity !== "" && (n.style.transition = "all 200ms ease-in", n.style.transform = "scale(0.97) translateY(10px)", n.style.opacity = "0", setTimeout(() => {
128
- n.style.transform = "", n.style.opacity = "", n.style.transition = "", this._popover.style.visibility = "", this._popover.style.display = "";
129
- }, 200))), this._updateBackgroundColor();
130
- }
131
- _updateBackgroundColor() {
132
- if (!this._popover) return;
133
- let e = document.documentElement.classList.contains("dark"), t = this._popover.querySelector(".popover-content");
134
- t && (e ? (t.classList.remove("bg-white"), t.classList.add("bg-gray-800")) : (t.classList.remove("bg-gray-800"), t.classList.add("bg-white")));
135
- }
136
- _observeDarkMode() {
137
- this._darkModeObserver || (this._darkModeObserver = new MutationObserver(() => {
138
- this._updateBackgroundColor();
139
- }), this._darkModeObserver.observe(document.documentElement, {
140
- attributes: !0,
141
- attributeFilter: ["class"]
142
- }));
143
- }
144
- _updatePosition(e) {
145
- if (!this._triggerElement || !this._popover) return;
146
- let t = this._popover.style.visibility !== "hidden";
147
- t || (this._popover.style.visibility = "hidden", this._popover.style.display = "block", this._popover.style.top = "0", this._popover.style.left = "0"), this._popover.offsetHeight;
148
- let n = this._calculatePosition();
149
- this._popover.style.top = `${n.top}px`, this._popover.style.left = `${n.left}px`, t || (this._popover.style.visibility = "visible", e && (!e.style.opacity || e.style.opacity === "") && (e.style.transform = "scale(0.97) translateY(10px)", e.style.opacity = "0", e.style.transition = "all 200ms ease-out", requestAnimationFrame(() => {
150
- requestAnimationFrame(() => {
151
- e.style.transform = "scale(1) translateY(0)", e.style.opacity = "1";
152
- });
153
- })));
154
- }
155
- _setupPositionListeners() {
156
- if (!this._scrollHandler && this.isOpen()) {
157
- let e = this;
158
- this._scrollHandler = function() {
159
- if (e.isOpen() && e._popover) {
160
- let t = e._popover.querySelector(".popover-content");
161
- e._updatePosition(t);
162
- }
163
- }, window.addEventListener("scroll", this._scrollHandler, !0);
164
- }
165
- if (!this._resizeHandler && this.isOpen()) {
166
- let e = this;
167
- this._resizeHandler = function() {
168
- if (e.isOpen() && e._popover) {
169
- let t = e._popover.querySelector(".popover-content");
170
- e._updatePosition(t);
171
- }
172
- }, window.addEventListener("resize", this._resizeHandler);
173
- }
174
- }
175
- _removePositionListeners() {
176
- this._scrollHandler &&= (window.removeEventListener("scroll", this._scrollHandler, !0), null), this._resizeHandler &&= (window.removeEventListener("resize", this._resizeHandler), null);
177
- }
178
- };
179
- customElements.get("mint-popover") || customElements.define("mint-popover", e);
180
- //#endregion
181
- export { e as t };
@@ -1 +0,0 @@
1
- require(`./stack-BvgkqvMX.js`);var e=class extends HTMLElement{static get observedAttributes(){return[`id`,`direction`,`open`,`trigger-id`]}constructor(){super(),this._overlay=null,this._popover=null,this._triggerElement=null,this._darkModeObserver=null,this._clickOutsideHandler=null,this._triggerClickHandler=null,this._scrollHandler=null,this._resizeHandler=null}connectedCallback(){this.classList.add(`box-border`,`m-0`,`p-0`,`border-0`,`align-baseline`,`fixed`,`inset-0`,`z-50`),this.isOpen()||this.classList.add(`hidden`),this.render(),this._setupTrigger(),this._observeDarkMode()}disconnectedCallback(){this._darkModeObserver&&=(this._darkModeObserver.disconnect(),null),this._clickOutsideHandler&&=(document.removeEventListener(`click`,this._clickOutsideHandler),null),this._triggerClickHandler&&this._triggerElement&&(this._triggerElement.removeEventListener(`click`,this._triggerClickHandler),this._triggerClickHandler=null),this._scrollHandler&&=(window.removeEventListener(`scroll`,this._scrollHandler,!0),null),this._resizeHandler&&=(window.removeEventListener(`resize`,this._resizeHandler),null)}attributeChangedCallback(e,t,n){t!==n&&(this.render(),e===`trigger-id`&&this._setupTrigger())}getId(){return this.getAttribute(`id`)||``}getDirection(){return this.getAttribute(`direction`)||`down`}getTriggerId(){return this.getAttribute(`trigger-id`)||``}isOpen(){return this.hasAttribute(`open`)}open(){this.setAttribute(`open`,``)}close(){this.removeAttribute(`open`)}_setupTrigger(){let e=this.getTriggerId();this._triggerClickHandler&&this._triggerElement&&(this._triggerElement.removeEventListener(`click`,this._triggerClickHandler),this._triggerClickHandler=null),e&&(this._triggerElement=document.getElementById(e),this._triggerElement?this._attachTriggerListener():setTimeout(()=>{this._triggerElement=document.getElementById(e),this._triggerElement&&this._attachTriggerListener()},10))}_attachTriggerListener(){if(this._triggerElement&&!this._triggerClickHandler){let e=this;this._triggerClickHandler=function(t){t.stopImmediatePropagation(),t.preventDefault(),e.hasAttribute(`open`)?e.removeAttribute(`open`):e.setAttribute(`open`,``)},this._triggerElement.addEventListener(`click`,this._triggerClickHandler,!0)}}_calculatePosition(){if(!this._triggerElement||!this._popover)return{top:0,left:0,direction:`down`};let e=this._triggerElement.getBoundingClientRect(),t=this._popover.querySelector(`.popover-content`);if(!t)return{top:0,left:0,direction:`down`};this.classList.contains(`hidden`)&&(this.classList.remove(`hidden`),this._popover.style.visibility=`hidden`);let n=t.getBoundingClientRect(),r=window.innerWidth,i=window.innerHeight,a=this.getDirection(),o=0,s=0;switch(a){case`down`:if(o=e.bottom+8,s=e.left+e.width/2-n.width/2,o+n.height>i){let t=e.top-n.height-8;t>=0?(a=`up`,o=t):(o=Math.max(0,i-n.height-8),o+n.height>i&&(o=0))}s<0&&(s=8),s+n.width>r&&(s=Math.max(8,r-n.width-8),s+n.width>r&&(s=r-n.width));break;case`up`:if(o=e.top-n.height-8,s=e.left+e.width/2-n.width/2,o<0){let t=e.bottom+8;t+n.height<=i?(a=`down`,o=t):(o=Math.min(i-n.height-8,i-n.height),o<0&&(o=i-n.height))}s<0&&(s=8),s+n.width>r&&(s=Math.max(8,r-n.width-8),s+n.width>r&&(s=r-n.width));break;case`right`:if(o=e.top+e.height/2-n.height/2,s=e.right+8,s+n.width>r){let t=e.left-n.width-8;t>=0?(a=`left`,s=t):(s=Math.max(0,r-n.width-8),s+n.width>r&&(s=r-n.width))}o<0&&(o=8),o+n.height>i&&(o=Math.max(8,i-n.height-8),o+n.height>i&&(o=i-n.height));break;case`left`:if(o=e.top+e.height/2-n.height/2,s=e.left-n.width-8,s<0){let t=e.right+8;t+n.width<=r?(a=`right`,s=t):(s=Math.min(r-n.width-8,r-n.width),s<0&&(s=0))}o<0&&(o=8),o+n.height>i&&(o=Math.max(8,i-n.height-8),o+n.height>i&&(o=i-n.height));break}return{top:o,left:s,direction:a}}render(){let e=this.getId(),t=this.isOpen();if(e&&(this.id=e),t){if(this.classList.remove(`hidden`),this.style.pointerEvents=`auto`,!this._clickOutsideHandler){let e=this;this._clickOutsideHandler=function(t){let n=t.target,r=e._popover?.querySelector(`.popover-content`),i=r&&(r.contains(n)||r===n),a=n.closest(`button, a, [role="button"], mint-button, mint-link`)!==null;(!i||a)&&e.close()},setTimeout(()=>{document.addEventListener(`click`,this._clickOutsideHandler,!1)},100)}}else this.classList.add(`hidden`),this.style.pointerEvents=`none`,this._clickOutsideHandler&&=(document.removeEventListener(`click`,this._clickOutsideHandler,!0),null);this._overlay||(this._overlay=document.createElement(`div`),this._overlay.className=`fixed inset-0 pointer-events-none z-40`,this.appendChild(this._overlay)),this._popover||(this._popover=document.createElement(`div`),this._popover.className=`fixed z-50 pointer-events-auto`,this.appendChild(this._popover));let n=this._popover.querySelector(`.popover-content`);n||(n=document.createElement(`div`),n.className=`popover-content bg-white dark:bg-gray-800 rounded-lg shadow-xl p-4 transition-all duration-200 ease-out transform`,this._popover.appendChild(n)),Array.from(this.children).forEach(e=>{e!==this._overlay&&e!==this._popover&&e.parentElement===this&&n.appendChild(e)}),t?(this._triggerElement||this._setupTrigger(),this._setupPositionListeners(),this.offsetHeight,this._triggerElement?this._updatePosition(n):(this._popover.style.top=`50%`,this._popover.style.left=`50%`,this._popover.style.transform=`translate(-50%, -50%)`,this._popover.style.visibility=`visible`,this._popover.style.display=`block`,n.style.transform=`scale(0.97) translateY(10px)`,n.style.opacity=`0`,n.style.transition=`all 200ms ease-out`,requestAnimationFrame(()=>{requestAnimationFrame(()=>{n.style.transform=`scale(1) translateY(0)`,n.style.opacity=`1`})}))):!t&&n&&(this._removePositionListeners(),n.style.opacity!==`0`&&n.style.opacity!==``&&(n.style.transition=`all 200ms ease-in`,n.style.transform=`scale(0.97) translateY(10px)`,n.style.opacity=`0`,setTimeout(()=>{n.style.transform=``,n.style.opacity=``,n.style.transition=``,this._popover.style.visibility=``,this._popover.style.display=``},200))),this._updateBackgroundColor()}_updateBackgroundColor(){if(!this._popover)return;let e=document.documentElement.classList.contains(`dark`),t=this._popover.querySelector(`.popover-content`);t&&(e?(t.classList.remove(`bg-white`),t.classList.add(`bg-gray-800`)):(t.classList.remove(`bg-gray-800`),t.classList.add(`bg-white`)))}_observeDarkMode(){this._darkModeObserver||(this._darkModeObserver=new MutationObserver(()=>{this._updateBackgroundColor()}),this._darkModeObserver.observe(document.documentElement,{attributes:!0,attributeFilter:[`class`]}))}_updatePosition(e){if(!this._triggerElement||!this._popover)return;let t=this._popover.style.visibility!==`hidden`;t||(this._popover.style.visibility=`hidden`,this._popover.style.display=`block`,this._popover.style.top=`0`,this._popover.style.left=`0`),this._popover.offsetHeight;let n=this._calculatePosition();this._popover.style.top=`${n.top}px`,this._popover.style.left=`${n.left}px`,t||(this._popover.style.visibility=`visible`,e&&(!e.style.opacity||e.style.opacity===``)&&(e.style.transform=`scale(0.97) translateY(10px)`,e.style.opacity=`0`,e.style.transition=`all 200ms ease-out`,requestAnimationFrame(()=>{requestAnimationFrame(()=>{e.style.transform=`scale(1) translateY(0)`,e.style.opacity=`1`})})))}_setupPositionListeners(){if(!this._scrollHandler&&this.isOpen()){let e=this;this._scrollHandler=function(){if(e.isOpen()&&e._popover){let t=e._popover.querySelector(`.popover-content`);e._updatePosition(t)}},window.addEventListener(`scroll`,this._scrollHandler,!0)}if(!this._resizeHandler&&this.isOpen()){let e=this;this._resizeHandler=function(){if(e.isOpen()&&e._popover){let t=e._popover.querySelector(`.popover-content`);e._updatePosition(t)}},window.addEventListener(`resize`,this._resizeHandler)}}_removePositionListeners(){this._scrollHandler&&=(window.removeEventListener(`scroll`,this._scrollHandler,!0),null),this._resizeHandler&&=(window.removeEventListener(`resize`,this._resizeHandler),null)}};customElements.get(`mint-popover`)||customElements.define(`mint-popover`,e),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return e}});
@@ -1,63 +0,0 @@
1
- var e=class extends HTMLElement{static get observedAttributes(){return[`size`,`data-button-variant`,`data-button-tone`]}constructor(){super(),this._darkModeObserver=null}connectedCallback(){this.classList.add(`box-border`,`m-0`,`p-0`,`border-0`,`align-baseline`,`inline-block`),this.render(),this._observeDarkMode()}attributeChangedCallback(e,t,n){t!==n&&this.render()}disconnectedCallback(){this._darkModeObserver&&=(this._darkModeObserver.disconnect(),null)}_observeDarkMode(){this._darkModeObserver||(this._darkModeObserver=new MutationObserver(()=>{this.render()}),this._darkModeObserver.observe(document.documentElement,{attributes:!0,attributeFilter:[`class`]}))}getSize(){let e=this.getAttribute(`size`)||`default`,t={default:`w-4 h-4`,large:`w-16 h-16`};return t[e]||t.default}render(){let e=this.getSize(),t=this.getAttribute(`size`)||`default`,n=this.style.width&&this.style.height,r=this.getAttribute(`data-button-variant`),i=document.documentElement.classList.contains(`dark`),a;if(n){let e=this.getAttribute(`data-button-tone`)||`neutral`;a=r===`solid`?e===`neutral`?i?`#ffffff`:`#0f172a`:`#ffffff`:i?`#ffffff`:`#0f172a`}else a=i?`#e2e8f0`:`#0f172a`;let o=t===`large`?`2`:`4`,s=this.style.width&&this.style.height;this.innerHTML=`
2
- <svg
3
- xmlns="http://www.w3.org/2000/svg"
4
- fill="none"
5
- viewBox="0 0 24 24"
6
- class="mint-spinner-rotate ${s?``:e}"
7
- style="${s?`width: ${this.style.width}; height: ${this.style.height};`:``} --mint-spinner-rotate-duration: 0.8s; --mint-spinner-dash-duration: 1.2s;"
8
- >
9
- <style>
10
- @keyframes mint-spinner-rotate {
11
- to { transform: rotate(360deg); }
12
- }
13
-
14
- @keyframes mint-spinner-dash-array {
15
- 0% { stroke-dasharray: 0 62.83; }
16
- 25% { stroke-dasharray: 15.7 47.13; }
17
- 50% { stroke-dasharray: 31.4 31.4; }
18
- 75% { stroke-dasharray: 15.7 47.13; }
19
- 100% { stroke-dasharray: 0 62.83; }
20
- }
21
-
22
- @keyframes mint-spinner-dash-offset {
23
- 0% { stroke-dashoffset: 0; }
24
- 100% { stroke-dashoffset: -62.83; }
25
- }
26
-
27
- .mint-spinner-rotate {
28
- transform-origin: 50% 50%;
29
- transform-box: fill-box;
30
- animation: mint-spinner-rotate var(--mint-spinner-rotate-duration, 0.8s) linear infinite;
31
- }
32
-
33
- .mint-spinner-progress {
34
- animation:
35
- mint-spinner-dash-array var(--mint-spinner-dash-duration, 1.2s) ease-in-out infinite,
36
- mint-spinner-dash-offset var(--mint-spinner-dash-duration, 1.2s) linear infinite;
37
- }
38
- </style>
39
-
40
- <circle
41
- cx="12"
42
- cy="12"
43
- r="10"
44
- stroke="${a}"
45
- stroke-width="${o}"
46
- opacity="0.25"
47
- class="opacity-25"
48
- ></circle>
49
- <circle
50
- cx="12"
51
- cy="12"
52
- r="10"
53
- stroke="${a}"
54
- stroke-width="${o}"
55
- stroke-linecap="round"
56
- fill="none"
57
- opacity="0.75"
58
- stroke-dasharray="0 62.83"
59
- stroke-dashoffset="0"
60
- class="mint-spinner-progress"
61
- />
62
- </svg>
63
- `.trim()}};customElements.get(`mint-spinner`)||customElements.define(`mint-spinner`,e),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return e}});
@@ -1,111 +0,0 @@
1
- //#region src/components/spinner/Spinner.js
2
- var e = class extends HTMLElement {
3
- static get observedAttributes() {
4
- return [
5
- "size",
6
- "data-button-variant",
7
- "data-button-tone"
8
- ];
9
- }
10
- constructor() {
11
- super(), this._darkModeObserver = null;
12
- }
13
- connectedCallback() {
14
- this.classList.add("box-border", "m-0", "p-0", "border-0", "align-baseline", "inline-block"), this.render(), this._observeDarkMode();
15
- }
16
- attributeChangedCallback(e, t, n) {
17
- t !== n && this.render();
18
- }
19
- disconnectedCallback() {
20
- this._darkModeObserver &&= (this._darkModeObserver.disconnect(), null);
21
- }
22
- _observeDarkMode() {
23
- this._darkModeObserver || (this._darkModeObserver = new MutationObserver(() => {
24
- this.render();
25
- }), this._darkModeObserver.observe(document.documentElement, {
26
- attributes: !0,
27
- attributeFilter: ["class"]
28
- }));
29
- }
30
- getSize() {
31
- let e = this.getAttribute("size") || "default", t = {
32
- default: "w-4 h-4",
33
- large: "w-16 h-16"
34
- };
35
- return t[e] || t.default;
36
- }
37
- render() {
38
- let e = this.getSize(), t = this.getAttribute("size") || "default", n = this.style.width && this.style.height, r = this.getAttribute("data-button-variant"), i = document.documentElement.classList.contains("dark"), a;
39
- if (n) {
40
- let e = this.getAttribute("data-button-tone") || "neutral";
41
- a = r === "solid" ? e === "neutral" ? i ? "#ffffff" : "#0f172a" : "#ffffff" : i ? "#ffffff" : "#0f172a";
42
- } else a = i ? "#e2e8f0" : "#0f172a";
43
- let o = t === "large" ? "2" : "4", s = this.style.width && this.style.height;
44
- this.innerHTML = `
45
- <svg
46
- xmlns="http://www.w3.org/2000/svg"
47
- fill="none"
48
- viewBox="0 0 24 24"
49
- class="mint-spinner-rotate ${s ? "" : e}"
50
- style="${s ? `width: ${this.style.width}; height: ${this.style.height};` : ""} --mint-spinner-rotate-duration: 0.8s; --mint-spinner-dash-duration: 1.2s;"
51
- >
52
- <style>
53
- @keyframes mint-spinner-rotate {
54
- to { transform: rotate(360deg); }
55
- }
56
-
57
- @keyframes mint-spinner-dash-array {
58
- 0% { stroke-dasharray: 0 62.83; }
59
- 25% { stroke-dasharray: 15.7 47.13; }
60
- 50% { stroke-dasharray: 31.4 31.4; }
61
- 75% { stroke-dasharray: 15.7 47.13; }
62
- 100% { stroke-dasharray: 0 62.83; }
63
- }
64
-
65
- @keyframes mint-spinner-dash-offset {
66
- 0% { stroke-dashoffset: 0; }
67
- 100% { stroke-dashoffset: -62.83; }
68
- }
69
-
70
- .mint-spinner-rotate {
71
- transform-origin: 50% 50%;
72
- transform-box: fill-box;
73
- animation: mint-spinner-rotate var(--mint-spinner-rotate-duration, 0.8s) linear infinite;
74
- }
75
-
76
- .mint-spinner-progress {
77
- animation:
78
- mint-spinner-dash-array var(--mint-spinner-dash-duration, 1.2s) ease-in-out infinite,
79
- mint-spinner-dash-offset var(--mint-spinner-dash-duration, 1.2s) linear infinite;
80
- }
81
- </style>
82
-
83
- <circle
84
- cx="12"
85
- cy="12"
86
- r="10"
87
- stroke="${a}"
88
- stroke-width="${o}"
89
- opacity="0.25"
90
- class="opacity-25"
91
- ></circle>
92
- <circle
93
- cx="12"
94
- cy="12"
95
- r="10"
96
- stroke="${a}"
97
- stroke-width="${o}"
98
- stroke-linecap="round"
99
- fill="none"
100
- opacity="0.75"
101
- stroke-dasharray="0 62.83"
102
- stroke-dashoffset="0"
103
- class="mint-spinner-progress"
104
- />
105
- </svg>
106
- `.trim();
107
- }
108
- };
109
- customElements.get("mint-spinner") || customElements.define("mint-spinner", e);
110
- //#endregion
111
- export { e as t };
@@ -1 +0,0 @@
1
- var e=class extends HTMLElement{static get observedAttributes(){return[`direction`,`text-align`]}constructor(){super()}connectedCallback(){this.classList.add(`box-border`,`m-0`,`p-0`,`border-0`,`align-baseline`,`block`),this.render(),this.getTextAlign()&&this._observeChildren()}attributeChangedCallback(e,t,n){t!==n&&(this.render(),e===`text-align`&&this._observeChildren())}_observeChildren(){this._childObserver||(this._childObserver=new MutationObserver(()=>{let e=this.getTextAlign();e&&this._applyTextAlignToChildren(e)}),this._childObserver.observe(this,{childList:!0,subtree:!1}))}disconnectedCallback(){this._childObserver&&=(this._childObserver.disconnect(),null)}getDirection(){return(this.getAttribute(`direction`)||`vertical`)===`horizontal`?`horizontal`:`vertical`}getTextAlign(){let e=this.getAttribute(`text-align`)||``;return[`left`,`center`,`right`,`justify`].includes(e)?e:``}getStackClasses(){let e=this.getDirection(),t=this.getTextAlign(),n=[`flex`,e===`horizontal`?`flex-row`:`flex-col`,`gap-3`];return t&&(n.push(`text-${t}`),n.push(`[&>*]:text-${t}`),n.push(`[&>*_.mint-button-content]:text-${t}`),t===`left`?(n.push(`[&>mint-button]:!justify-start`),n.push(`[&>mint-button>button]:!justify-start`)):t===`right`?(n.push(`[&>mint-button]:!justify-end`),n.push(`[&>mint-button>button]:!justify-end`)):t===`center`&&(n.push(`[&>mint-button]:!justify-center`),n.push(`[&>mint-button>button]:!justify-center`))),n.join(` `)}render(){let e=this.getStackClasses(),t=this.getTextAlign();[`flex`,`flex-row`,`flex-col`,`gap-1`,`gap-2`,`gap-3`,`text-left`,`text-center`,`text-right`,`text-justify`,`[&>*]:text-left`,`[&>*]:text-center`,`[&>*]:text-right`,`[&>*]:text-justify`,`[&>*_.mint-button-content]:text-left`,`[&>*_.mint-button-content]:text-center`,`[&>*_.mint-button-content]:text-right`,`[&>*_.mint-button-content]:text-justify`,`[&>mint-button]:!justify-start`,`[&>mint-button]:!justify-center`,`[&>mint-button]:!justify-end`,`[&>mint-button>button]:!justify-start`,`[&>mint-button>button]:!justify-center`,`[&>mint-button>button]:!justify-end`].forEach(e=>this.classList.remove(e)),e.split(` `).forEach(e=>{e&&this.classList.add(e)}),[`box-border`,`m-0`,`p-0`,`border-0`,`align-baseline`,`block`].forEach(e=>{this.classList.contains(e)||this.classList.add(e)}),t?this._applyTextAlignToChildren(t):this._removeTextAlignFromChildren()}_applyTextAlignToChildren(e){Array.from(this.children).forEach(t=>{if(t.tagName===`MINT-BUTTON`){let n=t.querySelector(`button`);if(n){n.classList.remove(`justify-start`,`justify-center`,`justify-end`),e===`left`?n.classList.add(`justify-start`):e===`right`?n.classList.add(`justify-end`):e===`center`&&n.classList.add(`justify-center`);let t=n.querySelector(`.mint-button-content`);t&&(t.classList.remove(`text-left`,`text-center`,`text-right`,`text-justify`),t.classList.add(`text-${e}`))}}else t.classList.remove(`text-left`,`text-center`,`text-right`,`text-justify`),t.classList.add(`text-${e}`)})}_removeTextAlignFromChildren(){Array.from(this.children).forEach(e=>{if(e.tagName===`MINT-BUTTON`){let t=e.querySelector(`button`);if(t){t.classList.remove(`justify-start`,`justify-end`),t.classList.add(`justify-center`);let e=t.querySelector(`.mint-button-content`);e&&e.classList.remove(`text-left`,`text-center`,`text-right`,`text-justify`)}}else e.classList.remove(`text-left`,`text-center`,`text-right`,`text-justify`)})}};customElements.get(`mint-stack`)||customElements.define(`mint-stack`,e),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return e}});