jet_ui 0.2.4

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 (471) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG.md +106 -0
  3. data/LICENSE.md +21 -0
  4. data/README.md +114 -0
  5. data/app/assets/images/jet_ui/icons/academic-cap.svg +3 -0
  6. data/app/assets/images/jet_ui/icons/adjustments-horizontal.svg +3 -0
  7. data/app/assets/images/jet_ui/icons/adjustments-vertical.svg +3 -0
  8. data/app/assets/images/jet_ui/icons/archive-box-arrow-down.svg +3 -0
  9. data/app/assets/images/jet_ui/icons/archive-box-x-mark.svg +3 -0
  10. data/app/assets/images/jet_ui/icons/archive-box.svg +3 -0
  11. data/app/assets/images/jet_ui/icons/arrow-down-circle.svg +3 -0
  12. data/app/assets/images/jet_ui/icons/arrow-down-left.svg +3 -0
  13. data/app/assets/images/jet_ui/icons/arrow-down-on-square-stack.svg +3 -0
  14. data/app/assets/images/jet_ui/icons/arrow-down-on-square.svg +3 -0
  15. data/app/assets/images/jet_ui/icons/arrow-down-right.svg +3 -0
  16. data/app/assets/images/jet_ui/icons/arrow-down-tray.svg +3 -0
  17. data/app/assets/images/jet_ui/icons/arrow-down.svg +3 -0
  18. data/app/assets/images/jet_ui/icons/arrow-left-circle.svg +3 -0
  19. data/app/assets/images/jet_ui/icons/arrow-left-end-on-rectangle.svg +3 -0
  20. data/app/assets/images/jet_ui/icons/arrow-left-on-rectangle.svg +3 -0
  21. data/app/assets/images/jet_ui/icons/arrow-left-start-on-rectangle.svg +3 -0
  22. data/app/assets/images/jet_ui/icons/arrow-left.svg +3 -0
  23. data/app/assets/images/jet_ui/icons/arrow-long-down.svg +3 -0
  24. data/app/assets/images/jet_ui/icons/arrow-long-left.svg +3 -0
  25. data/app/assets/images/jet_ui/icons/arrow-long-right.svg +3 -0
  26. data/app/assets/images/jet_ui/icons/arrow-long-up.svg +3 -0
  27. data/app/assets/images/jet_ui/icons/arrow-path-rounded-square.svg +3 -0
  28. data/app/assets/images/jet_ui/icons/arrow-path.svg +3 -0
  29. data/app/assets/images/jet_ui/icons/arrow-right-circle.svg +3 -0
  30. data/app/assets/images/jet_ui/icons/arrow-right-end-on-rectangle.svg +3 -0
  31. data/app/assets/images/jet_ui/icons/arrow-right-on-rectangle.svg +3 -0
  32. data/app/assets/images/jet_ui/icons/arrow-right-start-on-rectangle.svg +3 -0
  33. data/app/assets/images/jet_ui/icons/arrow-right.svg +3 -0
  34. data/app/assets/images/jet_ui/icons/arrow-small-down.svg +3 -0
  35. data/app/assets/images/jet_ui/icons/arrow-small-left.svg +3 -0
  36. data/app/assets/images/jet_ui/icons/arrow-small-right.svg +3 -0
  37. data/app/assets/images/jet_ui/icons/arrow-small-up.svg +3 -0
  38. data/app/assets/images/jet_ui/icons/arrow-top-right-on-square.svg +3 -0
  39. data/app/assets/images/jet_ui/icons/arrow-trending-down.svg +3 -0
  40. data/app/assets/images/jet_ui/icons/arrow-trending-up.svg +3 -0
  41. data/app/assets/images/jet_ui/icons/arrow-turn-down-left.svg +3 -0
  42. data/app/assets/images/jet_ui/icons/arrow-turn-down-right.svg +3 -0
  43. data/app/assets/images/jet_ui/icons/arrow-turn-left-down.svg +3 -0
  44. data/app/assets/images/jet_ui/icons/arrow-turn-left-up.svg +3 -0
  45. data/app/assets/images/jet_ui/icons/arrow-turn-right-down.svg +3 -0
  46. data/app/assets/images/jet_ui/icons/arrow-turn-right-up.svg +3 -0
  47. data/app/assets/images/jet_ui/icons/arrow-turn-up-left.svg +3 -0
  48. data/app/assets/images/jet_ui/icons/arrow-turn-up-right.svg +3 -0
  49. data/app/assets/images/jet_ui/icons/arrow-up-circle.svg +3 -0
  50. data/app/assets/images/jet_ui/icons/arrow-up-left.svg +3 -0
  51. data/app/assets/images/jet_ui/icons/arrow-up-on-square-stack.svg +3 -0
  52. data/app/assets/images/jet_ui/icons/arrow-up-on-square.svg +3 -0
  53. data/app/assets/images/jet_ui/icons/arrow-up-right.svg +3 -0
  54. data/app/assets/images/jet_ui/icons/arrow-up-tray.svg +3 -0
  55. data/app/assets/images/jet_ui/icons/arrow-up.svg +3 -0
  56. data/app/assets/images/jet_ui/icons/arrow-uturn-down.svg +3 -0
  57. data/app/assets/images/jet_ui/icons/arrow-uturn-left.svg +3 -0
  58. data/app/assets/images/jet_ui/icons/arrow-uturn-right.svg +3 -0
  59. data/app/assets/images/jet_ui/icons/arrow-uturn-up.svg +3 -0
  60. data/app/assets/images/jet_ui/icons/arrows-pointing-in.svg +3 -0
  61. data/app/assets/images/jet_ui/icons/arrows-pointing-out.svg +3 -0
  62. data/app/assets/images/jet_ui/icons/arrows-right-left.svg +3 -0
  63. data/app/assets/images/jet_ui/icons/arrows-up-down.svg +3 -0
  64. data/app/assets/images/jet_ui/icons/at-symbol.svg +3 -0
  65. data/app/assets/images/jet_ui/icons/backspace.svg +3 -0
  66. data/app/assets/images/jet_ui/icons/backward.svg +4 -0
  67. data/app/assets/images/jet_ui/icons/banknotes.svg +3 -0
  68. data/app/assets/images/jet_ui/icons/bars-2.svg +3 -0
  69. data/app/assets/images/jet_ui/icons/bars-3-bottom-left.svg +3 -0
  70. data/app/assets/images/jet_ui/icons/bars-3-bottom-right.svg +3 -0
  71. data/app/assets/images/jet_ui/icons/bars-3-center-left.svg +3 -0
  72. data/app/assets/images/jet_ui/icons/bars-3.svg +3 -0
  73. data/app/assets/images/jet_ui/icons/bars-4.svg +3 -0
  74. data/app/assets/images/jet_ui/icons/bars-arrow-down.svg +3 -0
  75. data/app/assets/images/jet_ui/icons/bars-arrow-up.svg +3 -0
  76. data/app/assets/images/jet_ui/icons/battery-0.svg +3 -0
  77. data/app/assets/images/jet_ui/icons/battery-100.svg +3 -0
  78. data/app/assets/images/jet_ui/icons/battery-50.svg +3 -0
  79. data/app/assets/images/jet_ui/icons/beaker.svg +3 -0
  80. data/app/assets/images/jet_ui/icons/bell-alert.svg +3 -0
  81. data/app/assets/images/jet_ui/icons/bell-slash.svg +3 -0
  82. data/app/assets/images/jet_ui/icons/bell-snooze.svg +3 -0
  83. data/app/assets/images/jet_ui/icons/bell.svg +3 -0
  84. data/app/assets/images/jet_ui/icons/bold.svg +3 -0
  85. data/app/assets/images/jet_ui/icons/bolt-slash.svg +3 -0
  86. data/app/assets/images/jet_ui/icons/bolt.svg +3 -0
  87. data/app/assets/images/jet_ui/icons/book-open.svg +3 -0
  88. data/app/assets/images/jet_ui/icons/bookmark-slash.svg +3 -0
  89. data/app/assets/images/jet_ui/icons/bookmark-square.svg +3 -0
  90. data/app/assets/images/jet_ui/icons/bookmark.svg +3 -0
  91. data/app/assets/images/jet_ui/icons/briefcase.svg +3 -0
  92. data/app/assets/images/jet_ui/icons/bug-ant.svg +3 -0
  93. data/app/assets/images/jet_ui/icons/building-library.svg +3 -0
  94. data/app/assets/images/jet_ui/icons/building-office-2.svg +3 -0
  95. data/app/assets/images/jet_ui/icons/building-office.svg +3 -0
  96. data/app/assets/images/jet_ui/icons/building-storefront.svg +3 -0
  97. data/app/assets/images/jet_ui/icons/cake.svg +3 -0
  98. data/app/assets/images/jet_ui/icons/calculator.svg +3 -0
  99. data/app/assets/images/jet_ui/icons/calendar-date-range.svg +3 -0
  100. data/app/assets/images/jet_ui/icons/calendar-days.svg +3 -0
  101. data/app/assets/images/jet_ui/icons/calendar.svg +3 -0
  102. data/app/assets/images/jet_ui/icons/camera.svg +5 -0
  103. data/app/assets/images/jet_ui/icons/chart-bar-square.svg +3 -0
  104. data/app/assets/images/jet_ui/icons/chart-bar.svg +5 -0
  105. data/app/assets/images/jet_ui/icons/chart-pie.svg +4 -0
  106. data/app/assets/images/jet_ui/icons/chat-bubble-bottom-center-text.svg +3 -0
  107. data/app/assets/images/jet_ui/icons/chat-bubble-bottom-center.svg +3 -0
  108. data/app/assets/images/jet_ui/icons/chat-bubble-left-ellipsis.svg +3 -0
  109. data/app/assets/images/jet_ui/icons/chat-bubble-left-right.svg +3 -0
  110. data/app/assets/images/jet_ui/icons/chat-bubble-left.svg +3 -0
  111. data/app/assets/images/jet_ui/icons/chat-bubble-oval-left-ellipsis.svg +3 -0
  112. data/app/assets/images/jet_ui/icons/chat-bubble-oval-left.svg +3 -0
  113. data/app/assets/images/jet_ui/icons/check-badge.svg +3 -0
  114. data/app/assets/images/jet_ui/icons/check-circle.svg +3 -0
  115. data/app/assets/images/jet_ui/icons/check.svg +3 -0
  116. data/app/assets/images/jet_ui/icons/chevron-double-down.svg +3 -0
  117. data/app/assets/images/jet_ui/icons/chevron-double-left.svg +3 -0
  118. data/app/assets/images/jet_ui/icons/chevron-double-right.svg +3 -0
  119. data/app/assets/images/jet_ui/icons/chevron-double-up.svg +4 -0
  120. data/app/assets/images/jet_ui/icons/chevron-down.svg +3 -0
  121. data/app/assets/images/jet_ui/icons/chevron-left.svg +3 -0
  122. data/app/assets/images/jet_ui/icons/chevron-right.svg +3 -0
  123. data/app/assets/images/jet_ui/icons/chevron-up-down.svg +3 -0
  124. data/app/assets/images/jet_ui/icons/chevron-up.svg +3 -0
  125. data/app/assets/images/jet_ui/icons/circle-stack.svg +3 -0
  126. data/app/assets/images/jet_ui/icons/clipboard-document-check.svg +3 -0
  127. data/app/assets/images/jet_ui/icons/clipboard-document-list.svg +3 -0
  128. data/app/assets/images/jet_ui/icons/clipboard-document.svg +3 -0
  129. data/app/assets/images/jet_ui/icons/clipboard.svg +3 -0
  130. data/app/assets/images/jet_ui/icons/clock.svg +3 -0
  131. data/app/assets/images/jet_ui/icons/cloud-arrow-down.svg +3 -0
  132. data/app/assets/images/jet_ui/icons/cloud-arrow-up.svg +3 -0
  133. data/app/assets/images/jet_ui/icons/cloud.svg +3 -0
  134. data/app/assets/images/jet_ui/icons/code-bracket-square.svg +3 -0
  135. data/app/assets/images/jet_ui/icons/code-bracket.svg +3 -0
  136. data/app/assets/images/jet_ui/icons/cog-6-tooth.svg +4 -0
  137. data/app/assets/images/jet_ui/icons/cog-8-tooth.svg +4 -0
  138. data/app/assets/images/jet_ui/icons/cog.svg +3 -0
  139. data/app/assets/images/jet_ui/icons/command-line.svg +3 -0
  140. data/app/assets/images/jet_ui/icons/computer-desktop.svg +3 -0
  141. data/app/assets/images/jet_ui/icons/cpu-chip.svg +3 -0
  142. data/app/assets/images/jet_ui/icons/credit-card.svg +3 -0
  143. data/app/assets/images/jet_ui/icons/cube-transparent.svg +3 -0
  144. data/app/assets/images/jet_ui/icons/cube.svg +3 -0
  145. data/app/assets/images/jet_ui/icons/currency-bangladeshi.svg +3 -0
  146. data/app/assets/images/jet_ui/icons/currency-dollar.svg +3 -0
  147. data/app/assets/images/jet_ui/icons/currency-euro.svg +3 -0
  148. data/app/assets/images/jet_ui/icons/currency-pound.svg +3 -0
  149. data/app/assets/images/jet_ui/icons/currency-rupee.svg +3 -0
  150. data/app/assets/images/jet_ui/icons/currency-yen.svg +3 -0
  151. data/app/assets/images/jet_ui/icons/cursor-arrow-rays.svg +3 -0
  152. data/app/assets/images/jet_ui/icons/cursor-arrow-ripple.svg +3 -0
  153. data/app/assets/images/jet_ui/icons/device-phone-mobile.svg +3 -0
  154. data/app/assets/images/jet_ui/icons/device-tablet.svg +3 -0
  155. data/app/assets/images/jet_ui/icons/divide.svg +3 -0
  156. data/app/assets/images/jet_ui/icons/document-arrow-down.svg +3 -0
  157. data/app/assets/images/jet_ui/icons/document-arrow-up.svg +3 -0
  158. data/app/assets/images/jet_ui/icons/document-chart-bar.svg +3 -0
  159. data/app/assets/images/jet_ui/icons/document-check.svg +3 -0
  160. data/app/assets/images/jet_ui/icons/document-currency-bangladeshi.svg +3 -0
  161. data/app/assets/images/jet_ui/icons/document-currency-dollar.svg +3 -0
  162. data/app/assets/images/jet_ui/icons/document-currency-euro.svg +3 -0
  163. data/app/assets/images/jet_ui/icons/document-currency-pound.svg +3 -0
  164. data/app/assets/images/jet_ui/icons/document-currency-rupee.svg +3 -0
  165. data/app/assets/images/jet_ui/icons/document-currency-yen.svg +3 -0
  166. data/app/assets/images/jet_ui/icons/document-duplicate.svg +3 -0
  167. data/app/assets/images/jet_ui/icons/document-magnifying-glass.svg +3 -0
  168. data/app/assets/images/jet_ui/icons/document-minus.svg +3 -0
  169. data/app/assets/images/jet_ui/icons/document-plus.svg +3 -0
  170. data/app/assets/images/jet_ui/icons/document-text.svg +3 -0
  171. data/app/assets/images/jet_ui/icons/document.svg +3 -0
  172. data/app/assets/images/jet_ui/icons/ellipsis-horizontal-circle.svg +3 -0
  173. data/app/assets/images/jet_ui/icons/ellipsis-horizontal.svg +5 -0
  174. data/app/assets/images/jet_ui/icons/ellipsis-vertical.svg +5 -0
  175. data/app/assets/images/jet_ui/icons/envelope-open.svg +3 -0
  176. data/app/assets/images/jet_ui/icons/envelope.svg +3 -0
  177. data/app/assets/images/jet_ui/icons/equals.svg +3 -0
  178. data/app/assets/images/jet_ui/icons/exclamation-circle.svg +3 -0
  179. data/app/assets/images/jet_ui/icons/exclamation-triangle.svg +3 -0
  180. data/app/assets/images/jet_ui/icons/eye-dropper.svg +3 -0
  181. data/app/assets/images/jet_ui/icons/eye-slash.svg +3 -0
  182. data/app/assets/images/jet_ui/icons/eye.svg +4 -0
  183. data/app/assets/images/jet_ui/icons/face-frown.svg +3 -0
  184. data/app/assets/images/jet_ui/icons/face-smile.svg +3 -0
  185. data/app/assets/images/jet_ui/icons/film.svg +3 -0
  186. data/app/assets/images/jet_ui/icons/finger-print.svg +3 -0
  187. data/app/assets/images/jet_ui/icons/fire.svg +4 -0
  188. data/app/assets/images/jet_ui/icons/flag.svg +3 -0
  189. data/app/assets/images/jet_ui/icons/folder-arrow-down.svg +3 -0
  190. data/app/assets/images/jet_ui/icons/folder-minus.svg +3 -0
  191. data/app/assets/images/jet_ui/icons/folder-open.svg +3 -0
  192. data/app/assets/images/jet_ui/icons/folder-plus.svg +3 -0
  193. data/app/assets/images/jet_ui/icons/folder.svg +3 -0
  194. data/app/assets/images/jet_ui/icons/forward.svg +4 -0
  195. data/app/assets/images/jet_ui/icons/funnel.svg +3 -0
  196. data/app/assets/images/jet_ui/icons/gif.svg +3 -0
  197. data/app/assets/images/jet_ui/icons/gift-top.svg +3 -0
  198. data/app/assets/images/jet_ui/icons/gift.svg +3 -0
  199. data/app/assets/images/jet_ui/icons/github.svg +10 -0
  200. data/app/assets/images/jet_ui/icons/globe-alt.svg +3 -0
  201. data/app/assets/images/jet_ui/icons/globe-americas.svg +3 -0
  202. data/app/assets/images/jet_ui/icons/globe-asia-australia.svg +3 -0
  203. data/app/assets/images/jet_ui/icons/globe-europe-africa.svg +3 -0
  204. data/app/assets/images/jet_ui/icons/h1.svg +3 -0
  205. data/app/assets/images/jet_ui/icons/h2.svg +3 -0
  206. data/app/assets/images/jet_ui/icons/h3.svg +3 -0
  207. data/app/assets/images/jet_ui/icons/hand-raised.svg +3 -0
  208. data/app/assets/images/jet_ui/icons/hand-thumb-down.svg +3 -0
  209. data/app/assets/images/jet_ui/icons/hand-thumb-up.svg +3 -0
  210. data/app/assets/images/jet_ui/icons/hashtag.svg +3 -0
  211. data/app/assets/images/jet_ui/icons/heart.svg +3 -0
  212. data/app/assets/images/jet_ui/icons/home-modern.svg +3 -0
  213. data/app/assets/images/jet_ui/icons/home.svg +3 -0
  214. data/app/assets/images/jet_ui/icons/identification.svg +3 -0
  215. data/app/assets/images/jet_ui/icons/inbox-arrow-down.svg +3 -0
  216. data/app/assets/images/jet_ui/icons/inbox-stack.svg +3 -0
  217. data/app/assets/images/jet_ui/icons/inbox.svg +3 -0
  218. data/app/assets/images/jet_ui/icons/information-circle.svg +3 -0
  219. data/app/assets/images/jet_ui/icons/italic.svg +3 -0
  220. data/app/assets/images/jet_ui/icons/key.svg +3 -0
  221. data/app/assets/images/jet_ui/icons/language.svg +3 -0
  222. data/app/assets/images/jet_ui/icons/lifebuoy.svg +3 -0
  223. data/app/assets/images/jet_ui/icons/light-bulb.svg +3 -0
  224. data/app/assets/images/jet_ui/icons/link-slash.svg +3 -0
  225. data/app/assets/images/jet_ui/icons/link.svg +3 -0
  226. data/app/assets/images/jet_ui/icons/list-bullet.svg +3 -0
  227. data/app/assets/images/jet_ui/icons/lock-closed.svg +3 -0
  228. data/app/assets/images/jet_ui/icons/lock-open.svg +3 -0
  229. data/app/assets/images/jet_ui/icons/magnifying-glass-circle.svg +3 -0
  230. data/app/assets/images/jet_ui/icons/magnifying-glass-minus.svg +3 -0
  231. data/app/assets/images/jet_ui/icons/magnifying-glass-plus.svg +3 -0
  232. data/app/assets/images/jet_ui/icons/magnifying-glass.svg +3 -0
  233. data/app/assets/images/jet_ui/icons/map-pin.svg +4 -0
  234. data/app/assets/images/jet_ui/icons/map.svg +3 -0
  235. data/app/assets/images/jet_ui/icons/megaphone.svg +3 -0
  236. data/app/assets/images/jet_ui/icons/microphone.svg +3 -0
  237. data/app/assets/images/jet_ui/icons/minus-circle.svg +3 -0
  238. data/app/assets/images/jet_ui/icons/minus-small.svg +3 -0
  239. data/app/assets/images/jet_ui/icons/minus.svg +3 -0
  240. data/app/assets/images/jet_ui/icons/moon.svg +3 -0
  241. data/app/assets/images/jet_ui/icons/musical-note.svg +3 -0
  242. data/app/assets/images/jet_ui/icons/newspaper.svg +3 -0
  243. data/app/assets/images/jet_ui/icons/no-symbol.svg +3 -0
  244. data/app/assets/images/jet_ui/icons/numbered-list.svg +3 -0
  245. data/app/assets/images/jet_ui/icons/paint-brush.svg +3 -0
  246. data/app/assets/images/jet_ui/icons/paper-airplane.svg +3 -0
  247. data/app/assets/images/jet_ui/icons/paper-clip.svg +3 -0
  248. data/app/assets/images/jet_ui/icons/pause-circle.svg +3 -0
  249. data/app/assets/images/jet_ui/icons/pause.svg +3 -0
  250. data/app/assets/images/jet_ui/icons/pencil-square.svg +3 -0
  251. data/app/assets/images/jet_ui/icons/pencil.svg +3 -0
  252. data/app/assets/images/jet_ui/icons/percent-badge.svg +3 -0
  253. data/app/assets/images/jet_ui/icons/phone-arrow-down-left.svg +3 -0
  254. data/app/assets/images/jet_ui/icons/phone-arrow-up-right.svg +3 -0
  255. data/app/assets/images/jet_ui/icons/phone-x-mark.svg +3 -0
  256. data/app/assets/images/jet_ui/icons/phone.svg +3 -0
  257. data/app/assets/images/jet_ui/icons/photo.svg +3 -0
  258. data/app/assets/images/jet_ui/icons/play-circle.svg +4 -0
  259. data/app/assets/images/jet_ui/icons/play-pause.svg +3 -0
  260. data/app/assets/images/jet_ui/icons/play.svg +3 -0
  261. data/app/assets/images/jet_ui/icons/plus-circle.svg +3 -0
  262. data/app/assets/images/jet_ui/icons/plus-small.svg +3 -0
  263. data/app/assets/images/jet_ui/icons/plus.svg +3 -0
  264. data/app/assets/images/jet_ui/icons/power.svg +3 -0
  265. data/app/assets/images/jet_ui/icons/presentation-chart-bar.svg +3 -0
  266. data/app/assets/images/jet_ui/icons/presentation-chart-line.svg +3 -0
  267. data/app/assets/images/jet_ui/icons/printer.svg +3 -0
  268. data/app/assets/images/jet_ui/icons/puzzle-piece.svg +3 -0
  269. data/app/assets/images/jet_ui/icons/qr-code.svg +13 -0
  270. data/app/assets/images/jet_ui/icons/question-mark-circle.svg +3 -0
  271. data/app/assets/images/jet_ui/icons/queue-list.svg +3 -0
  272. data/app/assets/images/jet_ui/icons/radio.svg +3 -0
  273. data/app/assets/images/jet_ui/icons/receipt-percent.svg +3 -0
  274. data/app/assets/images/jet_ui/icons/receipt-refund.svg +3 -0
  275. data/app/assets/images/jet_ui/icons/rectangle-group.svg +5 -0
  276. data/app/assets/images/jet_ui/icons/rectangle-stack.svg +3 -0
  277. data/app/assets/images/jet_ui/icons/rocket-launch.svg +3 -0
  278. data/app/assets/images/jet_ui/icons/rss.svg +3 -0
  279. data/app/assets/images/jet_ui/icons/scale.svg +3 -0
  280. data/app/assets/images/jet_ui/icons/scissors.svg +3 -0
  281. data/app/assets/images/jet_ui/icons/server-stack.svg +3 -0
  282. data/app/assets/images/jet_ui/icons/server.svg +3 -0
  283. data/app/assets/images/jet_ui/icons/share.svg +3 -0
  284. data/app/assets/images/jet_ui/icons/shield-check.svg +3 -0
  285. data/app/assets/images/jet_ui/icons/shield-exclamation.svg +3 -0
  286. data/app/assets/images/jet_ui/icons/shopping-bag.svg +3 -0
  287. data/app/assets/images/jet_ui/icons/shopping-cart.svg +3 -0
  288. data/app/assets/images/jet_ui/icons/signal-slash.svg +3 -0
  289. data/app/assets/images/jet_ui/icons/signal.svg +3 -0
  290. data/app/assets/images/jet_ui/icons/slash.svg +3 -0
  291. data/app/assets/images/jet_ui/icons/sparkles.svg +5 -0
  292. data/app/assets/images/jet_ui/icons/speaker-wave.svg +3 -0
  293. data/app/assets/images/jet_ui/icons/speaker-x-mark.svg +3 -0
  294. data/app/assets/images/jet_ui/icons/spinner.svg +1 -0
  295. data/app/assets/images/jet_ui/icons/square-2-stack.svg +3 -0
  296. data/app/assets/images/jet_ui/icons/square-3-stack-3d.svg +3 -0
  297. data/app/assets/images/jet_ui/icons/squares-2x2.svg +6 -0
  298. data/app/assets/images/jet_ui/icons/squares-plus.svg +3 -0
  299. data/app/assets/images/jet_ui/icons/star.svg +3 -0
  300. data/app/assets/images/jet_ui/icons/stop-circle.svg +4 -0
  301. data/app/assets/images/jet_ui/icons/stop.svg +3 -0
  302. data/app/assets/images/jet_ui/icons/strikethrough.svg +3 -0
  303. data/app/assets/images/jet_ui/icons/sun.svg +3 -0
  304. data/app/assets/images/jet_ui/icons/swatch.svg +3 -0
  305. data/app/assets/images/jet_ui/icons/table-cells.svg +3 -0
  306. data/app/assets/images/jet_ui/icons/tag.svg +4 -0
  307. data/app/assets/images/jet_ui/icons/ticket.svg +3 -0
  308. data/app/assets/images/jet_ui/icons/trash.svg +3 -0
  309. data/app/assets/images/jet_ui/icons/trophy.svg +3 -0
  310. data/app/assets/images/jet_ui/icons/truck.svg +3 -0
  311. data/app/assets/images/jet_ui/icons/tv.svg +3 -0
  312. data/app/assets/images/jet_ui/icons/underline.svg +3 -0
  313. data/app/assets/images/jet_ui/icons/user-circle.svg +3 -0
  314. data/app/assets/images/jet_ui/icons/user-group.svg +3 -0
  315. data/app/assets/images/jet_ui/icons/user-minus.svg +3 -0
  316. data/app/assets/images/jet_ui/icons/user-plus.svg +3 -0
  317. data/app/assets/images/jet_ui/icons/user.svg +4 -0
  318. data/app/assets/images/jet_ui/icons/users.svg +3 -0
  319. data/app/assets/images/jet_ui/icons/variable.svg +3 -0
  320. data/app/assets/images/jet_ui/icons/video-camera-slash.svg +3 -0
  321. data/app/assets/images/jet_ui/icons/video-camera.svg +3 -0
  322. data/app/assets/images/jet_ui/icons/view-columns.svg +3 -0
  323. data/app/assets/images/jet_ui/icons/viewfinder-circle.svg +3 -0
  324. data/app/assets/images/jet_ui/icons/wallet.svg +3 -0
  325. data/app/assets/images/jet_ui/icons/wifi.svg +3 -0
  326. data/app/assets/images/jet_ui/icons/window.svg +3 -0
  327. data/app/assets/images/jet_ui/icons/wrench-screwdriver.svg +3 -0
  328. data/app/assets/images/jet_ui/icons/wrench.svg +4 -0
  329. data/app/assets/images/jet_ui/icons/x-circle.svg +3 -0
  330. data/app/assets/images/jet_ui/icons/x-mark.svg +3 -0
  331. data/app/assets/javascripts/jet_ui/clipboard_controller.js +46 -0
  332. data/app/assets/javascripts/jet_ui/drawer_controller.js +70 -0
  333. data/app/assets/javascripts/jet_ui/drawers_controller.js +83 -0
  334. data/app/assets/javascripts/jet_ui/dropdown_controller.js +95 -0
  335. data/app/assets/javascripts/jet_ui/flash_controller.js +34 -0
  336. data/app/assets/javascripts/jet_ui/modal_controller.js +35 -0
  337. data/app/assets/javascripts/jet_ui/modals_controller.js +30 -0
  338. data/app/assets/javascripts/jet_ui/popover_controller.js +95 -0
  339. data/app/assets/javascripts/jet_ui/tooltip_controller.js +107 -0
  340. data/app/assets/javascripts/jet_ui/turbo_confirm_controller.js +25 -0
  341. data/app/assets/stylesheets/jet_ui/accordion.css +24 -0
  342. data/app/assets/stylesheets/jet_ui/alert.css +27 -0
  343. data/app/assets/stylesheets/jet_ui/avatar.css +15 -0
  344. data/app/assets/stylesheets/jet_ui/badge.css +22 -0
  345. data/app/assets/stylesheets/jet_ui/breadcrumbs.css +28 -0
  346. data/app/assets/stylesheets/jet_ui/btn.css +88 -0
  347. data/app/assets/stylesheets/jet_ui/card.css +61 -0
  348. data/app/assets/stylesheets/jet_ui/divider.css +21 -0
  349. data/app/assets/stylesheets/jet_ui/drawer.css +46 -0
  350. data/app/assets/stylesheets/jet_ui/dropdown.css +33 -0
  351. data/app/assets/stylesheets/jet_ui/empty.css +25 -0
  352. data/app/assets/stylesheets/jet_ui/flash.css +50 -0
  353. data/app/assets/stylesheets/jet_ui/group.css +40 -0
  354. data/app/assets/stylesheets/jet_ui/header.css +65 -0
  355. data/app/assets/stylesheets/jet_ui/icon.css +11 -0
  356. data/app/assets/stylesheets/jet_ui/list.css +31 -0
  357. data/app/assets/stylesheets/jet_ui/modal.css +47 -0
  358. data/app/assets/stylesheets/jet_ui/navbar.css +36 -0
  359. data/app/assets/stylesheets/jet_ui/pagy.css +54 -0
  360. data/app/assets/stylesheets/jet_ui/popover.css +51 -0
  361. data/app/assets/stylesheets/jet_ui/sidebar.css +35 -0
  362. data/app/assets/stylesheets/jet_ui/stat.css +23 -0
  363. data/app/assets/stylesheets/jet_ui/stepper.css +82 -0
  364. data/app/assets/stylesheets/jet_ui/table.css +68 -0
  365. data/app/assets/stylesheets/jet_ui/tabs.css +32 -0
  366. data/app/assets/stylesheets/jet_ui/theme.css +174 -0
  367. data/app/assets/stylesheets/jet_ui/timeline.css +45 -0
  368. data/app/assets/stylesheets/jet_ui/tooltip.css +33 -0
  369. data/app/assets/stylesheets/jet_ui.css +28 -0
  370. data/app/components/jet_ui/accordion/body_component.rb +21 -0
  371. data/app/components/jet_ui/accordion/component.rb +24 -0
  372. data/app/components/jet_ui/accordion/summary_component.rb +29 -0
  373. data/app/components/jet_ui/alert/component.rb +29 -0
  374. data/app/components/jet_ui/alert/description_component.rb +21 -0
  375. data/app/components/jet_ui/alert/icon_component.rb +21 -0
  376. data/app/components/jet_ui/alert/title_component.rb +21 -0
  377. data/app/components/jet_ui/avatar/component.rb +54 -0
  378. data/app/components/jet_ui/badge/component.rb +35 -0
  379. data/app/components/jet_ui/base_component.rb +6 -0
  380. data/app/components/jet_ui/breadcrumbs/component.rb +18 -0
  381. data/app/components/jet_ui/breadcrumbs/item_component.rb +25 -0
  382. data/app/components/jet_ui/btn/component.rb +51 -0
  383. data/app/components/jet_ui/card/body_component.rb +24 -0
  384. data/app/components/jet_ui/card/component.rb +24 -0
  385. data/app/components/jet_ui/card/footer_component.rb +48 -0
  386. data/app/components/jet_ui/card/header_component.rb +48 -0
  387. data/app/components/jet_ui/card/subtitle_component.rb +24 -0
  388. data/app/components/jet_ui/card/title_component.rb +24 -0
  389. data/app/components/jet_ui/clipboard/component.rb +58 -0
  390. data/app/components/jet_ui/divider/component.rb +30 -0
  391. data/app/components/jet_ui/drawer/body_component.rb +21 -0
  392. data/app/components/jet_ui/drawer/component.rb +54 -0
  393. data/app/components/jet_ui/drawer/footer_component.rb +45 -0
  394. data/app/components/jet_ui/drawer/header_component.rb +46 -0
  395. data/app/components/jet_ui/dropdown/button_component.rb +24 -0
  396. data/app/components/jet_ui/dropdown/component.rb +28 -0
  397. data/app/components/jet_ui/dropdown/divider_component.rb +21 -0
  398. data/app/components/jet_ui/dropdown/link_component.rb +29 -0
  399. data/app/components/jet_ui/dropdown/menu_component.rb +25 -0
  400. data/app/components/jet_ui/dropdown/title_component.rb +21 -0
  401. data/app/components/jet_ui/dropdown/trigger_component.rb +28 -0
  402. data/app/components/jet_ui/empty/actions_component.rb +19 -0
  403. data/app/components/jet_ui/empty/component.rb +15 -0
  404. data/app/components/jet_ui/empty/description_component.rb +15 -0
  405. data/app/components/jet_ui/empty/icon_component.rb +18 -0
  406. data/app/components/jet_ui/empty/title_component.rb +15 -0
  407. data/app/components/jet_ui/flash/component.html.erb +14 -0
  408. data/app/components/jet_ui/flash/component.rb +44 -0
  409. data/app/components/jet_ui/group/component.rb +26 -0
  410. data/app/components/jet_ui/header/actions_component.rb +21 -0
  411. data/app/components/jet_ui/header/component.rb +35 -0
  412. data/app/components/jet_ui/header/heading_component.rb +21 -0
  413. data/app/components/jet_ui/header/subtitle_component.rb +21 -0
  414. data/app/components/jet_ui/header/title_component.rb +21 -0
  415. data/app/components/jet_ui/icon/component.rb +46 -0
  416. data/app/components/jet_ui/list/action_component.rb +21 -0
  417. data/app/components/jet_ui/list/component.rb +29 -0
  418. data/app/components/jet_ui/list/content_component.rb +21 -0
  419. data/app/components/jet_ui/list/icon_component.rb +25 -0
  420. data/app/components/jet_ui/list/item_component.rb +21 -0
  421. data/app/components/jet_ui/modal/body_component.rb +21 -0
  422. data/app/components/jet_ui/modal/component.rb +54 -0
  423. data/app/components/jet_ui/modal/footer_component.rb +45 -0
  424. data/app/components/jet_ui/modal/header_component.rb +46 -0
  425. data/app/components/jet_ui/navbar/actions_component.rb +21 -0
  426. data/app/components/jet_ui/navbar/brand_component.rb +21 -0
  427. data/app/components/jet_ui/navbar/component.rb +22 -0
  428. data/app/components/jet_ui/navbar/content_component.rb +21 -0
  429. data/app/components/jet_ui/navbar/main_component.rb +21 -0
  430. data/app/components/jet_ui/pagy/component.rb +38 -0
  431. data/app/components/jet_ui/popover/component.rb +29 -0
  432. data/app/components/jet_ui/popover/content_component.rb +23 -0
  433. data/app/components/jet_ui/popover/trigger_component.rb +20 -0
  434. data/app/components/jet_ui/sidebar/component.rb +27 -0
  435. data/app/components/jet_ui/sidebar/link_component.rb +44 -0
  436. data/app/components/jet_ui/sidebar/menu_component.rb +21 -0
  437. data/app/components/jet_ui/sidebar/section_component.rb +21 -0
  438. data/app/components/jet_ui/sidebar/title_component.rb +21 -0
  439. data/app/components/jet_ui/spinner/component.rb +16 -0
  440. data/app/components/jet_ui/stat/component.rb +21 -0
  441. data/app/components/jet_ui/stat/description_component.rb +57 -0
  442. data/app/components/jet_ui/stat/label_component.rb +21 -0
  443. data/app/components/jet_ui/stat/value_component.rb +21 -0
  444. data/app/components/jet_ui/stepper/component.rb +18 -0
  445. data/app/components/jet_ui/stepper/step_component.rb +69 -0
  446. data/app/components/jet_ui/table/component.rb +37 -0
  447. data/app/components/jet_ui/table/tbody_component.rb +15 -0
  448. data/app/components/jet_ui/table/td_component.rb +29 -0
  449. data/app/components/jet_ui/table/tfoot_component.rb +15 -0
  450. data/app/components/jet_ui/table/th_component.rb +27 -0
  451. data/app/components/jet_ui/table/thead_component.rb +15 -0
  452. data/app/components/jet_ui/table/tr_component.rb +15 -0
  453. data/app/components/jet_ui/tabs/component.rb +30 -0
  454. data/app/components/jet_ui/tabs/item_component.rb +34 -0
  455. data/app/components/jet_ui/timeline/component.rb +15 -0
  456. data/app/components/jet_ui/timeline/content_component.rb +15 -0
  457. data/app/components/jet_ui/timeline/dot_component.rb +37 -0
  458. data/app/components/jet_ui/timeline/item_component.rb +15 -0
  459. data/app/components/jet_ui/timeline/time_component.rb +15 -0
  460. data/app/components/jet_ui/tooltip/component.rb +34 -0
  461. data/app/components/jet_ui/turbo_confirm/component.html.erb +20 -0
  462. data/app/components/jet_ui/turbo_confirm/component.rb +8 -0
  463. data/app/helpers/jet_ui_helper.rb +37 -0
  464. data/lib/generators/jet_ui/eject/USAGE +20 -0
  465. data/lib/generators/jet_ui/eject/eject_generator.rb +376 -0
  466. data/lib/generators/jet_ui/install/USAGE +11 -0
  467. data/lib/generators/jet_ui/install/install_generator.rb +121 -0
  468. data/lib/jet_ui/engine.rb +32 -0
  469. data/lib/jet_ui/version.rb +5 -0
  470. data/lib/jet_ui.rb +5 -0
  471. metadata +667 -0
@@ -0,0 +1,3 @@
1
+ <svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M21 12C21 10.7574 19.9926 9.75 18.75 9.75H15C15 11.4069 13.6569 12.75 12 12.75C10.3431 12.75 9 11.4069 9 9.75H5.25C4.00736 9.75 3 10.7574 3 12M21 12V18C21 19.2426 19.9926 20.25 18.75 20.25H5.25C4.00736 20.25 3 19.2426 3 18V12M21 12V9M3 12V9M21 9C21 7.75736 19.9926 6.75 18.75 6.75H5.25C4.00736 6.75 3 7.75736 3 9M21 9V6C21 4.75736 19.9926 3.75 18.75 3.75H5.25C4.00736 3.75 3 4.75736 3 6V9" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M8.28767 15.0378C10.3379 12.9875 13.662 12.9875 15.7123 15.0378M5.10569 11.8558C8.9133 8.04815 15.0867 8.04815 18.8943 11.8558M1.92371 8.67373C7.48868 3.10876 16.5113 3.10876 22.0762 8.67373M12.5303 18.2197L12 18.7501L11.4696 18.2197C11.7625 17.9268 12.2374 17.9268 12.5303 18.2197Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M3 8.25V18C3 19.2426 4.00736 20.25 5.25 20.25H18.75C19.9926 20.25 21 19.2426 21 18V8.25M3 8.25V6C3 4.75736 4.00736 3.75 5.25 3.75H18.75C19.9926 3.75 21 4.75736 21 6V8.25M3 8.25H21M5.25 6H5.2575V6.0075H5.25V6ZM7.5 6H7.5075V6.0075H7.5V6ZM9.75 6H9.7575V6.0075H9.75V6Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M11.4194 15.1694L17.25 21C18.2855 22.0355 19.9645 22.0355 21 21C22.0355 19.9645 22.0355 18.2855 21 17.25L15.1233 11.3733M11.4194 15.1694L13.9155 12.1383C14.2315 11.7546 14.6542 11.5132 15.1233 11.3733M11.4194 15.1694L6.76432 20.8219C6.28037 21.4096 5.55897 21.75 4.79768 21.75C3.39064 21.75 2.25 20.6094 2.25 19.2023C2.25 18.441 2.59044 17.7196 3.1781 17.2357L10.0146 11.6056M15.1233 11.3733C15.6727 11.2094 16.2858 11.1848 16.8659 11.2338C16.9925 11.2445 17.1206 11.25 17.25 11.25C19.7353 11.25 21.75 9.23528 21.75 6.75C21.75 6.08973 21.6078 5.46268 21.3523 4.89779L18.0762 8.17397C16.9605 7.91785 16.0823 7.03963 15.8262 5.92397L19.1024 2.64774C18.5375 2.39223 17.9103 2.25 17.25 2.25C14.7647 2.25 12.75 4.26472 12.75 6.75C12.75 6.87938 12.7555 7.00749 12.7662 7.13411C12.8571 8.20956 12.6948 9.39841 11.8617 10.0845L11.7596 10.1686M10.0146 11.6056L5.90901 7.5H4.5L2.25 3.75L3.75 2.25L7.5 4.5V5.90901L11.7596 10.1686M10.0146 11.6056L11.7596 10.1686M18.375 18.375L15.75 15.75M4.86723 19.125H4.87473V19.1325H4.86723V19.125Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
3
+ </svg>
@@ -0,0 +1,4 @@
1
+ <svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M21.75 6.75C21.75 9.23528 19.7353 11.25 17.25 11.25C17.1206 11.25 16.9925 11.2445 16.8659 11.2338C15.7904 11.1429 14.6016 11.3052 13.9155 12.1383L6.76432 20.8219C6.28037 21.4096 5.55897 21.75 4.79769 21.75C3.39064 21.75 2.25 20.6094 2.25 19.2023C2.25 18.441 2.59044 17.7196 3.1781 17.2357L11.8617 10.0845C12.6948 9.39841 12.8571 8.20956 12.7662 7.13411C12.7555 7.00749 12.75 6.87938 12.75 6.75C12.75 4.26472 14.7647 2.25 17.25 2.25C17.9103 2.25 18.5375 2.39223 19.1024 2.64774L15.8262 5.92397C16.0823 7.03963 16.9605 7.91785 18.0762 8.17397L21.3524 4.89779C21.6078 5.46268 21.75 6.08973 21.75 6.75Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
3
+ <path d="M4.86723 19.125H4.87473V19.1325H4.86723V19.125Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
4
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M9.75 9.75L14.25 14.25M14.25 9.75L9.75 14.25M21 12C21 16.9706 16.9706 21 12 21C7.02944 21 3 16.9706 3 12C3 7.02944 7.02944 3 12 3C16.9706 3 21 7.02944 21 12Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M6 18L18 6M6 6L18 18" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
3
+ </svg>
@@ -0,0 +1,46 @@
1
+ import { Controller } from "@hotwired/stimulus"
2
+
3
+ export default class ClipboardController extends Controller {
4
+ static values = {
5
+ content: String,
6
+ sourceId: String,
7
+ successText: { type: String, default: "Copied!" },
8
+ timeout: { type: Number, default: 2000 }
9
+ }
10
+
11
+ connect() {
12
+ this.originalText = this.#hasTooltip
13
+ ? this.element.dataset.tooltipContentValue
14
+ : this.element.textContent
15
+ }
16
+
17
+ async copy() {
18
+ const text = this.#getContent()
19
+ await navigator.clipboard.writeText(text)
20
+
21
+ if (!this.#hasTooltip) {
22
+ this.element.textContent = this.successTextValue
23
+ }
24
+
25
+ this.dispatch("change", { detail: { content: this.successTextValue } })
26
+
27
+ setTimeout(() => {
28
+ if (!this.#hasTooltip) {
29
+ this.element.textContent = this.originalText
30
+ }
31
+ this.dispatch("change", { detail: { content: this.originalText } })
32
+ }, this.timeoutValue)
33
+ }
34
+
35
+ get #hasTooltip() {
36
+ return this.element.dataset.controller?.includes("tooltip")
37
+ }
38
+
39
+ #getContent() {
40
+ if (this.hasSourceIdValue) {
41
+ const el = document.getElementById(this.sourceIdValue)
42
+ return el?.value ?? el?.textContent ?? ""
43
+ }
44
+ return this.contentValue
45
+ }
46
+ }
@@ -0,0 +1,70 @@
1
+ import { Controller } from "@hotwired/stimulus"
2
+
3
+ export default class DrawerController extends Controller {
4
+ static values = {
5
+ swipeThreshold: { type: Number, default: 100 }
6
+ }
7
+
8
+ connect() {
9
+ this.element.addEventListener("click", this.#closeOnBackdropClick.bind(this))
10
+ this.element.addEventListener("touchstart", this.#onTouchStart.bind(this), { passive: true })
11
+ this.element.addEventListener("touchmove", this.#onTouchMove.bind(this), { passive: true })
12
+ this.element.addEventListener("touchend", this.#onTouchEnd.bind(this), { passive: true })
13
+ this.element.showModal()
14
+ }
15
+
16
+ disconnect() {
17
+ this.element.removeEventListener("click", this.#closeOnBackdropClick.bind(this))
18
+ this.element.removeEventListener("touchstart", this.#onTouchStart.bind(this))
19
+ this.element.removeEventListener("touchmove", this.#onTouchMove.bind(this))
20
+ this.element.removeEventListener("touchend", this.#onTouchEnd.bind(this))
21
+ this.close()
22
+ }
23
+
24
+ show() {
25
+ this.element.showModal()
26
+ }
27
+
28
+ close() {
29
+ try {
30
+ this.element.close()
31
+ DrawerController.turboFrame.src = null
32
+ this.element.remove()
33
+ } catch (e) {}
34
+ }
35
+
36
+ #closeOnBackdropClick(event) {
37
+ if (event.target === this.element) {
38
+ this.close()
39
+ }
40
+ }
41
+
42
+ #onTouchStart(event) {
43
+ this.touchStartX = event.touches[0].clientX
44
+ this.element.style.transition = "none"
45
+ }
46
+
47
+ #onTouchMove(event) {
48
+ const currentX = event.touches[0].clientX
49
+ const diff = Math.max(0, currentX - this.touchStartX)
50
+ this.element.style.transform = `translateX(${diff}px)`
51
+ }
52
+
53
+ #onTouchEnd(event) {
54
+ const touchEndX = event.changedTouches[0].clientX
55
+ const diff = touchEndX - this.touchStartX
56
+
57
+ this.element.style.transition = "transform 0.2s ease-out"
58
+
59
+ if (diff > this.swipeThresholdValue) {
60
+ this.element.style.transform = "translateX(100%)"
61
+ this.element.addEventListener("transitionend", () => this.close(), { once: true })
62
+ } else {
63
+ this.element.style.transform = "translateX(0)"
64
+ }
65
+ }
66
+
67
+ static get turboFrame() {
68
+ return document.querySelector("turbo-frame[id='drawer']")
69
+ }
70
+ }
@@ -0,0 +1,83 @@
1
+ import { Controller } from "@hotwired/stimulus"
2
+
3
+ export default class DrawersController extends Controller {
4
+ static targets = ["dialog"]
5
+ static values = {
6
+ swipeThreshold: { type: Number, default: 100 }
7
+ }
8
+
9
+ disconnect() {
10
+ this.#removeDialogListeners()
11
+ }
12
+
13
+ open(e) {
14
+ this.openedDialog = this.#getDialog(e)
15
+ this.#addDialogListeners()
16
+ this.openedDialog?.showModal()
17
+ }
18
+
19
+ close(e) {
20
+ this.#removeDialogListeners()
21
+ this.#getDialog(e)?.close()
22
+ }
23
+
24
+ #getDialog(e) {
25
+ const id = e.currentTarget.dataset.id
26
+ return this.dialogTargets.find(dialog => dialog.id === id)
27
+ }
28
+
29
+ #addDialogListeners() {
30
+ if (!this.openedDialog) return
31
+ this._backdropClick = this.#closeOnBackdropClick.bind(this)
32
+ this._touchStart = this.#onTouchStart.bind(this)
33
+ this._touchMove = this.#onTouchMove.bind(this)
34
+ this._touchEnd = this.#onTouchEnd.bind(this)
35
+ this.openedDialog.addEventListener("click", this._backdropClick)
36
+ this.openedDialog.addEventListener("touchstart", this._touchStart, { passive: true })
37
+ this.openedDialog.addEventListener("touchmove", this._touchMove, { passive: true })
38
+ this.openedDialog.addEventListener("touchend", this._touchEnd, { passive: true })
39
+ }
40
+
41
+ #removeDialogListeners() {
42
+ if (!this.openedDialog || !this._backdropClick) return
43
+ this.openedDialog.removeEventListener("click", this._backdropClick)
44
+ this.openedDialog.removeEventListener("touchstart", this._touchStart)
45
+ this.openedDialog.removeEventListener("touchmove", this._touchMove)
46
+ this.openedDialog.removeEventListener("touchend", this._touchEnd)
47
+ }
48
+
49
+ #closeOnBackdropClick(e) {
50
+ if (e.target === this.openedDialog) {
51
+ this.openedDialog.close()
52
+ }
53
+ }
54
+
55
+ #onTouchStart(event) {
56
+ this.touchStartX = event.touches[0].clientX
57
+ this.openedDialog.style.transition = "none"
58
+ }
59
+
60
+ #onTouchMove(event) {
61
+ const currentX = event.touches[0].clientX
62
+ const diff = Math.max(0, currentX - this.touchStartX)
63
+ this.openedDialog.style.transform = `translateX(${diff}px)`
64
+ }
65
+
66
+ #onTouchEnd(event) {
67
+ const touchEndX = event.changedTouches[0].clientX
68
+ const diff = touchEndX - this.touchStartX
69
+
70
+ this.openedDialog.style.transition = "transform 0.2s ease-out"
71
+
72
+ if (diff > this.swipeThresholdValue) {
73
+ this.openedDialog.style.transform = "translateX(100%)"
74
+ this.openedDialog.addEventListener("transitionend", () => {
75
+ this.openedDialog.close()
76
+ this.openedDialog.style.transform = ""
77
+ this.openedDialog.style.transition = ""
78
+ }, { once: true })
79
+ } else {
80
+ this.openedDialog.style.transform = "translateX(0)"
81
+ }
82
+ }
83
+ }
@@ -0,0 +1,95 @@
1
+ import { Controller } from "@hotwired/stimulus"
2
+
3
+ export default class DropdownController extends Controller {
4
+ static targets = ["menu", "autofocus"]
5
+ static values = { open: { type: Boolean, default: false } }
6
+
7
+ connect() {
8
+ this._handleClick = this.#handleClick.bind(this)
9
+ this._clickOutside = this.#clickOutside.bind(this)
10
+ this._handleKeydown = this.#handleKeydown.bind(this)
11
+ this._handleMorph = this.#handleMorph.bind(this)
12
+ this.element.addEventListener("click", this._handleClick)
13
+ document.addEventListener("turbo:morph", this._handleMorph)
14
+ }
15
+
16
+ disconnect() {
17
+ this.element.removeEventListener("click", this._handleClick)
18
+ document.removeEventListener("click", this._clickOutside)
19
+ document.removeEventListener("keydown", this._handleKeydown)
20
+ document.removeEventListener("turbo:morph", this._handleMorph)
21
+ }
22
+
23
+ toggle() { this.openValue = !this.openValue }
24
+ show() { this.openValue = true }
25
+ hide() { this.openValue = false }
26
+
27
+ openValueChanged(isOpen) {
28
+ isOpen ? this.#showMenu() : this.#hideMenu()
29
+ }
30
+
31
+ #handleClick(event) {
32
+ if (!this.menuTarget.contains(event.target)) {
33
+ this.toggle()
34
+ }
35
+ }
36
+
37
+ #showMenu() {
38
+ this.menuTarget.classList.remove("hidden")
39
+ this.menuTarget.classList.add("block")
40
+ this.#updatePosition()
41
+ if (this.hasAutofocusTarget) this.autofocusTarget.focus()
42
+ document.addEventListener("click", this._clickOutside)
43
+ document.addEventListener("keydown", this._handleKeydown)
44
+ }
45
+
46
+ #hideMenu() {
47
+ this.menuTarget.classList.remove("block")
48
+ this.menuTarget.classList.add("hidden")
49
+ document.removeEventListener("click", this._clickOutside)
50
+ document.removeEventListener("keydown", this._handleKeydown)
51
+ }
52
+
53
+ #handleKeydown(event) {
54
+ if (event.key === "Escape") this.hide()
55
+ }
56
+
57
+ #clickOutside(event) {
58
+ if (!this.element.contains(event.target)) this.hide()
59
+ }
60
+
61
+ #handleMorph() {
62
+ if (this.openValue) this.#showMenu()
63
+ }
64
+
65
+ #updatePosition() {
66
+ const ref = this.element
67
+ const floating = this.menuTarget
68
+ const refRect = ref.getBoundingClientRect()
69
+ const floatRect = floating.getBoundingClientRect()
70
+ const viewport = { w: window.innerWidth, h: window.innerHeight }
71
+ const gap = 5
72
+
73
+ // Coordinates relative to the .dropdown parent (position: relative)
74
+ let x = 0
75
+ let y = ref.offsetHeight + gap
76
+
77
+ // Flip up if overflows bottom viewport
78
+ if (refRect.bottom + gap + floatRect.height > viewport.h) {
79
+ y = -(floatRect.height + gap)
80
+ }
81
+
82
+ // Shift left if overflows right edge
83
+ if (refRect.left + floatRect.width > viewport.w - 8) {
84
+ x = ref.offsetWidth - floatRect.width
85
+ }
86
+
87
+ // Clamp so menu doesn't overflow left edge of viewport
88
+ x = Math.max(-refRect.left + 8, x)
89
+
90
+ Object.assign(floating.style, {
91
+ left: `${x}px`,
92
+ top: `${y}px`
93
+ })
94
+ }
95
+ }
@@ -0,0 +1,34 @@
1
+ import { Controller } from "@hotwired/stimulus"
2
+
3
+ export default class FlashController extends Controller {
4
+ static values = {
5
+ dismissAfter: Number,
6
+ showDelay: { type: Number, default: 0 }
7
+ }
8
+
9
+ connect() {
10
+ setTimeout(() => this.#show(), this.showDelayValue)
11
+
12
+ if (this.hasDismissAfterValue) {
13
+ setTimeout(() => this.close(), this.showDelayValue + this.dismissAfterValue)
14
+ }
15
+ }
16
+
17
+ close() {
18
+ this.element.classList.remove("flash-item--visible")
19
+ const fallback = setTimeout(() => this.element.remove(), 400)
20
+ this.element.addEventListener("transitionend", () => {
21
+ clearTimeout(fallback)
22
+ this.element.remove()
23
+ }, { once: true })
24
+ }
25
+
26
+ #show() {
27
+ this.element.classList.remove("flash-item--hidden")
28
+ requestAnimationFrame(() => {
29
+ requestAnimationFrame(() => {
30
+ this.element.classList.add("flash-item--visible")
31
+ })
32
+ })
33
+ }
34
+ }
@@ -0,0 +1,35 @@
1
+ import { Controller } from "@hotwired/stimulus"
2
+
3
+ export default class ModalController extends Controller {
4
+ connect() {
5
+ this.element.addEventListener("click", this.#closeOnBackdropClick.bind(this))
6
+ this.element.showModal()
7
+ }
8
+
9
+ disconnect() {
10
+ this.element.removeEventListener("click", this.#closeOnBackdropClick.bind(this))
11
+ this.close()
12
+ }
13
+
14
+ show() {
15
+ this.element.showModal()
16
+ }
17
+
18
+ close() {
19
+ try {
20
+ this.element.close()
21
+ ModalController.turboFrame.src = null
22
+ this.element.remove()
23
+ } catch (e) {}
24
+ }
25
+
26
+ #closeOnBackdropClick(event) {
27
+ if (event.target === this.element) {
28
+ this.close()
29
+ }
30
+ }
31
+
32
+ static get turboFrame() {
33
+ return document.querySelector("turbo-frame[id='modal']")
34
+ }
35
+ }
@@ -0,0 +1,30 @@
1
+ import { Controller } from "@hotwired/stimulus"
2
+
3
+ export default class ModalsController extends Controller {
4
+ static targets = ["dialog"]
5
+
6
+ disconnect() {
7
+ this.openedDialog?.removeEventListener("click", this.#closeOnBackdropClick.bind(this))
8
+ }
9
+
10
+ open(e) {
11
+ this.openedDialog = this.#getDialog(e)
12
+ this.openedDialog?.addEventListener("click", this.#closeOnBackdropClick.bind(this))
13
+ this.openedDialog?.showModal()
14
+ }
15
+
16
+ close(e) {
17
+ this.#getDialog(e)?.close()
18
+ }
19
+
20
+ #getDialog(e) {
21
+ const id = e.currentTarget.dataset.id
22
+ return this.dialogTargets.find(dialog => dialog.id === id)
23
+ }
24
+
25
+ #closeOnBackdropClick(e) {
26
+ if (e.target === this.openedDialog) {
27
+ this.openedDialog.close()
28
+ }
29
+ }
30
+ }
@@ -0,0 +1,95 @@
1
+ import { Controller } from "@hotwired/stimulus"
2
+
3
+ export default class PopoverController extends Controller {
4
+ static targets = ["content"]
5
+ static values = {
6
+ open: { type: Boolean, default: false },
7
+ placement: { type: String, default: "bottom" }
8
+ }
9
+
10
+ connect() {
11
+ this._mouseEnter = () => { this.openValue = true }
12
+ this._mouseLeave = () => { this.openValue = false }
13
+ this._handleMorph = this.#handleMorph.bind(this)
14
+ this.element.addEventListener("mouseenter", this._mouseEnter)
15
+ this.element.addEventListener("mouseleave", this._mouseLeave)
16
+ document.addEventListener("turbo:morph", this._handleMorph)
17
+ }
18
+
19
+ disconnect() {
20
+ this.element.removeEventListener("mouseenter", this._mouseEnter)
21
+ this.element.removeEventListener("mouseleave", this._mouseLeave)
22
+ document.removeEventListener("turbo:morph", this._handleMorph)
23
+ }
24
+
25
+ openValueChanged(isOpen) {
26
+ isOpen ? this.#showContent() : this.#hideContent()
27
+ }
28
+
29
+ #showContent() {
30
+ this.contentTarget.classList.add("popover--visible")
31
+ this.#updatePosition()
32
+ }
33
+
34
+ #hideContent() {
35
+ this.contentTarget.classList.remove("popover--visible")
36
+ }
37
+
38
+ #handleMorph() {
39
+ if (this.openValue) this.#showContent()
40
+ }
41
+
42
+ #updatePosition() {
43
+ const ref = this.element
44
+ const floating = this.contentTarget
45
+ const refRect = ref.getBoundingClientRect()
46
+ const floatRect = floating.getBoundingClientRect()
47
+ const viewport = { w: window.innerWidth, h: window.innerHeight }
48
+ const gap = 12
49
+ const placement = this.placementValue
50
+
51
+ let x, y, effectivePlacement = placement
52
+
53
+ switch (placement) {
54
+ case "bottom":
55
+ x = (refRect.width - floatRect.width) / 2
56
+ y = refRect.height + gap
57
+ if (refRect.bottom + gap + floatRect.height > viewport.h) {
58
+ y = -(floatRect.height + gap); effectivePlacement = "top"
59
+ }
60
+ break
61
+ case "top":
62
+ x = (refRect.width - floatRect.width) / 2
63
+ y = -(floatRect.height + gap)
64
+ if (refRect.top - gap - floatRect.height < 0) {
65
+ y = refRect.height + gap; effectivePlacement = "bottom"
66
+ }
67
+ break
68
+ case "right":
69
+ x = refRect.width + gap
70
+ y = (refRect.height - floatRect.height) / 2
71
+ if (refRect.right + gap + floatRect.width > viewport.w) {
72
+ x = -(floatRect.width + gap); effectivePlacement = "left"
73
+ }
74
+ break
75
+ case "left":
76
+ x = -(floatRect.width + gap)
77
+ y = (refRect.height - floatRect.height) / 2
78
+ if (refRect.left - gap - floatRect.width < 0) {
79
+ x = refRect.width + gap; effectivePlacement = "right"
80
+ }
81
+ break
82
+ default:
83
+ x = (refRect.width - floatRect.width) / 2
84
+ y = refRect.height + gap
85
+ }
86
+
87
+ // Shift horizontally to stay in viewport
88
+ const absoluteX = refRect.left + x
89
+ if (absoluteX < 8) x += (8 - absoluteX)
90
+ if (absoluteX + floatRect.width > viewport.w - 8) x -= (absoluteX + floatRect.width - viewport.w + 8)
91
+
92
+ Object.assign(floating.style, { left: `${x}px`, top: `${y}px` })
93
+ floating.dataset.placement = effectivePlacement
94
+ }
95
+ }
@@ -0,0 +1,107 @@
1
+ import { Controller } from "@hotwired/stimulus"
2
+
3
+ export default class TooltipController extends Controller {
4
+ static values = {
5
+ content: String,
6
+ placement: { type: String, default: "top" }
7
+ }
8
+
9
+ connect() {
10
+ this._mouseEnter = this.#mouseEnter.bind(this)
11
+ this._mouseLeave = this.#mouseLeave.bind(this)
12
+ this.element.addEventListener("mouseenter", this._mouseEnter)
13
+ this.element.addEventListener("mouseleave", this._mouseLeave)
14
+ }
15
+
16
+ disconnect() {
17
+ this.element.removeEventListener("mouseenter", this._mouseEnter)
18
+ this.element.removeEventListener("mouseleave", this._mouseLeave)
19
+ this.tooltip?.remove()
20
+ this.tooltip = null
21
+ }
22
+
23
+ updateContent(event) {
24
+ const text = event.detail?.content
25
+ if (text) this.contentValue = text
26
+ }
27
+
28
+ contentValueChanged(value) {
29
+ if (this.tooltip) {
30
+ this.tooltip.innerHTML = value
31
+ this.#updatePosition()
32
+ }
33
+ }
34
+
35
+ #mouseEnter() {
36
+ this.#createTooltip()
37
+ this.#updatePosition()
38
+ }
39
+
40
+ #mouseLeave() {
41
+ this.tooltip?.remove()
42
+ this.tooltip = null
43
+ }
44
+
45
+ #createTooltip() {
46
+ this.tooltip = document.createElement("div")
47
+ this.tooltip.className = "tooltip"
48
+ this.tooltip.role = "tooltip"
49
+ this.tooltip.innerHTML = this.contentValue
50
+ const container = this.element.closest("dialog") || document.body
51
+ container.appendChild(this.tooltip)
52
+ }
53
+
54
+ #updatePosition() {
55
+ if (!this.tooltip) return
56
+
57
+ // Measure tooltip dimensions
58
+ this.tooltip.style.visibility = "hidden"
59
+ this.tooltip.style.position = "fixed"
60
+ this.tooltip.style.left = "-9999px"
61
+ const floatRect = this.tooltip.getBoundingClientRect()
62
+ this.tooltip.style.visibility = ""
63
+ this.tooltip.style.position = ""
64
+ this.tooltip.style.left = ""
65
+
66
+ const ref = this.element
67
+ const refRect = ref.getBoundingClientRect()
68
+ const viewport = { w: window.innerWidth, h: window.innerHeight }
69
+ const gap = 8
70
+ const placement = this.placementValue
71
+
72
+ let x, y, effectivePlacement = placement
73
+
74
+ switch (placement) {
75
+ case "top":
76
+ x = refRect.left + (refRect.width - floatRect.width) / 2
77
+ y = refRect.top - floatRect.height - gap
78
+ if (y < 0) { y = refRect.bottom + gap; effectivePlacement = "bottom" }
79
+ break
80
+ case "bottom":
81
+ x = refRect.left + (refRect.width - floatRect.width) / 2
82
+ y = refRect.bottom + gap
83
+ if (y + floatRect.height > viewport.h) { y = refRect.top - floatRect.height - gap; effectivePlacement = "top" }
84
+ break
85
+ case "left":
86
+ x = refRect.left - floatRect.width - gap
87
+ y = refRect.top + (refRect.height - floatRect.height) / 2
88
+ if (x < 0) { x = refRect.right + gap; effectivePlacement = "right" }
89
+ break
90
+ case "right":
91
+ x = refRect.right + gap
92
+ y = refRect.top + (refRect.height - floatRect.height) / 2
93
+ if (x + floatRect.width > viewport.w) { x = refRect.left - floatRect.width - gap; effectivePlacement = "left" }
94
+ break
95
+ default:
96
+ x = refRect.left + (refRect.width - floatRect.width) / 2
97
+ y = refRect.top - floatRect.height - gap
98
+ }
99
+
100
+ // Shift to keep within viewport
101
+ x = Math.max(8, Math.min(x + window.scrollX, viewport.w + window.scrollX - floatRect.width - 8))
102
+ y = Math.max(8, Math.min(y + window.scrollY, viewport.h + window.scrollY - floatRect.height - 8))
103
+
104
+ Object.assign(this.tooltip.style, { left: `${x}px`, top: `${y}px` })
105
+ this.tooltip.dataset.placement = effectivePlacement
106
+ }
107
+ }
@@ -0,0 +1,25 @@
1
+ import { Controller } from "@hotwired/stimulus"
2
+
3
+ export default class TurboConfirmController extends Controller {
4
+ connect() {
5
+ window.Turbo.config.forms.confirm = (message) => {
6
+ const dialog = this.element
7
+ const messageEl = dialog.querySelector("p")
8
+ if (messageEl) messageEl.textContent = message
9
+ dialog.showModal()
10
+
11
+ return new Promise((resolve) => {
12
+ dialog.addEventListener("close", () => {
13
+ resolve(dialog.returnValue === "confirm")
14
+ }, { once: true })
15
+
16
+ dialog.addEventListener("click", (event) => {
17
+ if (event.target === dialog) {
18
+ dialog.returnValue = "cancel"
19
+ dialog.close()
20
+ }
21
+ })
22
+ })
23
+ }
24
+ }
25
+ }