irelia 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (248) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +32 -10
  3. data/Rakefile +18 -4
  4. data/app/assets/config/irelia_manifest.js +2 -2
  5. data/app/assets/dist/javascripts/irelia.js +1 -0
  6. data/app/assets/dist/stylesheets/irelia.css +1 -0
  7. data/app/assets/src/main.js +2 -0
  8. data/app/assets/src/main.pcss +245 -0
  9. data/app/components/index.js +7 -0
  10. data/app/components/index.pcss +38 -0
  11. data/app/components/irelia/app_shell/component.html.erb +18 -0
  12. data/app/components/irelia/app_shell/component.rb +14 -0
  13. data/app/components/irelia/app_shell/index.pcss +20 -0
  14. data/app/{frontend/components/page/header → components/irelia/app_shell}/preview.rb +1 -1
  15. data/app/components/irelia/app_shell/previews/default.html.erb +21 -0
  16. data/app/components/irelia/avatar/component.html.erb +3 -0
  17. data/app/components/irelia/avatar/component.rb +16 -0
  18. data/app/components/irelia/avatar/index.pcss +8 -0
  19. data/{lib/generators/view_component/templates/preview.rb.tt → app/components/irelia/avatar/preview.rb} +1 -1
  20. data/app/components/irelia/breadcrumbs/component.html.erb +12 -0
  21. data/app/components/irelia/breadcrumbs/component.rb +18 -0
  22. data/app/components/irelia/breadcrumbs/index.pcss +16 -0
  23. data/app/{frontend/components/page/container → components/irelia/breadcrumbs}/preview.rb +1 -1
  24. data/app/components/irelia/button/component.html.erb +27 -0
  25. data/app/components/irelia/button/component.rb +40 -0
  26. data/app/components/irelia/button/index.pcss +57 -0
  27. data/app/components/irelia/button/preview.rb +79 -0
  28. data/app/components/irelia/card/component.html.erb +5 -0
  29. data/app/components/irelia/card/component.rb +15 -0
  30. data/app/components/irelia/card/index.pcss +9 -0
  31. data/app/components/irelia/card/preview.rb +18 -0
  32. data/app/components/irelia/component.rb +55 -0
  33. data/app/components/irelia/component_preview.rb +7 -0
  34. data/app/components/irelia/container/component.rb +30 -0
  35. data/app/components/irelia/container/index.pcss +45 -0
  36. data/app/components/irelia/container/preview.rb +18 -0
  37. data/app/components/irelia/div/component.html.erb +3 -0
  38. data/app/components/irelia/div/component.rb +15 -0
  39. data/app/components/irelia/div/index.pcss +7 -0
  40. data/app/components/irelia/divider/component.html.erb +7 -0
  41. data/app/components/irelia/divider/component.rb +10 -0
  42. data/app/components/irelia/divider/index.pcss +15 -0
  43. data/app/components/irelia/dropdown/component.html.erb +17 -0
  44. data/app/components/irelia/dropdown/component.rb +52 -0
  45. data/app/components/irelia/dropdown/controller.js +14 -0
  46. data/app/components/irelia/dropdown/index.pcss +37 -0
  47. data/app/components/irelia/dropdown/preview.rb +42 -0
  48. data/app/components/irelia/dropdown/previews/direction_up.html.erb +10 -0
  49. data/app/components/irelia/empty_collection/component.html.erb +19 -0
  50. data/app/components/irelia/empty_collection/component.rb +15 -0
  51. data/app/components/irelia/empty_collection/index.pcss +23 -0
  52. data/app/components/irelia/empty_collection/preview.rb +9 -0
  53. data/app/components/irelia/flex/component.html.erb +3 -0
  54. data/app/components/irelia/flex/component.rb +21 -0
  55. data/app/components/irelia/flex/index.pcss +37 -0
  56. data/app/components/irelia/form/base/component.rb +51 -0
  57. data/app/components/irelia/form/base/index.pcss +7 -0
  58. data/app/components/irelia/form/email_field/component.html.erb +3 -0
  59. data/app/components/irelia/form/email_field/component.rb +10 -0
  60. data/app/components/irelia/form/email_field/index.pcss +7 -0
  61. data/app/{frontend/components/page/breadcrumbs → components/irelia/form/email_field}/preview.rb +1 -1
  62. data/app/components/irelia/form/email_field/previews/default.html.erb +3 -0
  63. data/app/components/irelia/form/group/component.html.erb +19 -0
  64. data/app/components/irelia/form/group/component.rb +26 -0
  65. data/app/components/irelia/form/group/index.pcss +32 -0
  66. data/app/components/irelia/form/password_field/component.html.erb +3 -0
  67. data/app/components/irelia/form/password_field/component.rb +10 -0
  68. data/app/components/irelia/form/password_field/index.pcss +7 -0
  69. data/app/components/irelia/form/password_field/preview.rb +9 -0
  70. data/app/components/irelia/form/password_field/previews/default.html.erb +3 -0
  71. data/app/components/irelia/form/select/component.html.erb +3 -0
  72. data/app/components/irelia/form/select/component.rb +18 -0
  73. data/app/components/irelia/form/select/index.pcss +7 -0
  74. data/app/components/irelia/form/select/preview.rb +9 -0
  75. data/app/components/irelia/form/select/previews/default.html.erb +3 -0
  76. data/app/components/irelia/form/text_field/component.html.erb +3 -0
  77. data/app/components/irelia/form/text_field/component.rb +10 -0
  78. data/app/components/irelia/form/text_field/index.pcss +7 -0
  79. data/app/components/irelia/form/text_field/preview.rb +9 -0
  80. data/app/components/irelia/form/text_field/previews/default.html.erb +3 -0
  81. data/app/components/irelia/html/component.html.erb +3 -0
  82. data/app/components/irelia/html/component.rb +10 -0
  83. data/app/components/irelia/html/index.pcss +16 -0
  84. data/app/components/irelia/html/preview.rb +9 -0
  85. data/app/components/irelia/icon/component.rb +18 -0
  86. data/app/components/irelia/icon/index.pcss +7 -0
  87. data/app/components/irelia/icon/preview.rb +10 -0
  88. data/app/components/irelia/icon/previews/font_awesome.html.erb +23 -0
  89. data/app/components/irelia/modal/component.html.erb +28 -0
  90. data/app/components/irelia/modal/component.rb +29 -0
  91. data/app/components/irelia/modal/controller.js +50 -0
  92. data/app/components/irelia/modal/index.pcss +41 -0
  93. data/app/{frontend/components/navbar/select_account → components/irelia/modal}/preview.rb +5 -2
  94. data/app/components/irelia/modal/previews/remote_content.html.erb +6 -0
  95. data/app/components/irelia/modal/previews/static_content.html.erb +4 -0
  96. data/app/components/irelia/navbar/brand/component.rb +25 -0
  97. data/app/components/irelia/navbar/brand/index.pcss +9 -0
  98. data/app/components/irelia/navbar/brand/preview.rb +10 -0
  99. data/app/components/irelia/navbar/component.html.erb +10 -0
  100. data/app/components/irelia/navbar/component.rb +20 -0
  101. data/app/components/irelia/navbar/index.pcss +13 -0
  102. data/app/components/irelia/navbar/navigation/component.html.erb +5 -0
  103. data/app/components/irelia/navbar/navigation/component.rb +15 -0
  104. data/app/components/irelia/navbar/navigation/index.pcss +9 -0
  105. data/app/components/irelia/navbar/navigation/link/component.html.erb +5 -0
  106. data/app/components/irelia/navbar/navigation/link/component.rb +18 -0
  107. data/app/components/irelia/navbar/navigation/link/index.pcss +13 -0
  108. data/app/components/irelia/navbar/navigation/link/preview.rb +10 -0
  109. data/app/components/irelia/navbar/navigation/preview.rb +15 -0
  110. data/app/components/irelia/navbar/preview.rb +17 -0
  111. data/app/components/irelia/navbar/previews/default.html.erb +19 -0
  112. data/app/components/irelia/navbar/previews/full_width.html.erb +19 -0
  113. data/app/components/irelia/navbar/previews/navigation_right.html.erb +19 -0
  114. data/app/components/irelia/navbar/section/component.html.erb +3 -0
  115. data/app/components/irelia/navbar/section/component.rb +13 -0
  116. data/app/components/irelia/navbar/section/index.pcss +8 -0
  117. data/app/components/irelia/navbar/separator/component.rb +14 -0
  118. data/app/components/irelia/navbar/separator/index.pcss +8 -0
  119. data/app/components/irelia/navigation/component.html.erb +7 -0
  120. data/app/components/irelia/navigation/component.rb +23 -0
  121. data/app/components/irelia/navigation/index.pcss +7 -0
  122. data/app/components/irelia/navigation/preview.rb +14 -0
  123. data/app/components/irelia/notification/component.html.erb +9 -0
  124. data/app/components/irelia/notification/component.rb +27 -0
  125. data/app/components/irelia/notification/index.pcss +41 -0
  126. data/app/components/irelia/notification/preview.rb +22 -0
  127. data/app/components/irelia/page_header/component.html.erb +15 -0
  128. data/app/components/irelia/page_header/component.rb +17 -0
  129. data/app/components/irelia/page_header/index.pcss +36 -0
  130. data/app/components/irelia/page_header/preview.rb +13 -0
  131. data/app/components/irelia/sidebar/brand/component.html.erb +6 -0
  132. data/app/components/irelia/sidebar/brand/component.rb +19 -0
  133. data/app/components/irelia/sidebar/brand/index.pcss +13 -0
  134. data/app/components/irelia/sidebar/brand/preview.rb +10 -0
  135. data/app/components/irelia/sidebar/component.html.erb +8 -0
  136. data/app/components/irelia/sidebar/component.rb +16 -0
  137. data/app/components/irelia/sidebar/index.pcss +12 -0
  138. data/app/components/irelia/sidebar/navigation/component.html.erb +5 -0
  139. data/app/components/irelia/sidebar/navigation/component.rb +12 -0
  140. data/app/components/irelia/sidebar/navigation/index.pcss +8 -0
  141. data/app/components/irelia/sidebar/navigation/link/component.html.erb +10 -0
  142. data/app/components/irelia/sidebar/navigation/link/component.rb +26 -0
  143. data/app/components/irelia/sidebar/navigation/link/index.pcss +20 -0
  144. data/app/components/irelia/sidebar/navigation/link/preview.rb +14 -0
  145. data/app/components/irelia/sidebar/navigation/preview.rb +16 -0
  146. data/app/components/irelia/sidebar/preview.rb +9 -0
  147. data/app/components/irelia/sidebar/previews/default.html.erb +12 -0
  148. data/app/components/irelia/sidebar/section/component.html.erb +3 -0
  149. data/app/components/irelia/sidebar/section/component.rb +16 -0
  150. data/app/components/irelia/sidebar/section/index.pcss +11 -0
  151. data/app/components/irelia/split_screen/component.html.erb +8 -0
  152. data/app/components/irelia/split_screen/component.rb +18 -0
  153. data/app/components/irelia/split_screen/index.pcss +35 -0
  154. data/app/components/irelia/split_screen/preview.rb +12 -0
  155. data/app/components/irelia/stack/component.html.erb +3 -0
  156. data/app/components/irelia/stack/component.rb +21 -0
  157. data/app/components/irelia/stack/index.pcss +25 -0
  158. data/app/components/irelia/stack/preview.rb +47 -0
  159. data/app/components/irelia/stack/previews/default.html.erb +5 -0
  160. data/app/components/irelia/stack/previews/horizontal.html.erb +5 -0
  161. data/app/components/irelia/stack/previews/vertical.html.erb +5 -0
  162. data/app/components/irelia/table/component.html.erb +23 -0
  163. data/app/components/irelia/table/component.rb +31 -0
  164. data/app/components/irelia/table/index.pcss +32 -0
  165. data/app/components/irelia/table/preview.rb +9 -0
  166. data/app/components/irelia/table/previews/default.html.erb +19 -0
  167. data/app/components/irelia/table/row/component.html.erb +5 -0
  168. data/app/components/irelia/table/row/component.rb +34 -0
  169. data/app/components/irelia/table/row/index.pcss +7 -0
  170. data/app/helpers/irelia/components_helper.rb +62 -0
  171. data/app/helpers/irelia/form_helper.rb +9 -0
  172. data/app/helpers/irelia/head_helper.rb +7 -0
  173. data/app/views/irelia/_head.html.erb +25 -0
  174. data/lib/irelia/config.rb +18 -0
  175. data/lib/irelia/engine.rb +13 -11
  176. data/lib/irelia/form_builder.rb +48 -0
  177. data/lib/irelia/options/fixed.rb +26 -0
  178. data/lib/irelia/options/flex/direction.rb +22 -0
  179. data/lib/irelia/options/flex/gap.rb +25 -0
  180. data/lib/irelia/options/flex/grow.rb +21 -0
  181. data/lib/irelia/options/flex/items.rb +25 -0
  182. data/lib/irelia/options/flex/justify.rb +27 -0
  183. data/lib/irelia/options/padding.rb +46 -0
  184. data/lib/irelia/options/text_formatting.rb +30 -0
  185. data/lib/irelia/options/width.rb +19 -0
  186. data/lib/irelia/version.rb +1 -1
  187. data/lib/irelia.rb +20 -24
  188. metadata +199 -168
  189. data/app/frontend/components/application_view_component.rb +0 -5
  190. data/app/frontend/components/application_view_component_preview.rb +0 -5
  191. data/app/frontend/components/navbar/button/component.html.erb +0 -8
  192. data/app/frontend/components/navbar/button/component.rb +0 -13
  193. data/app/frontend/components/navbar/button/preview.rb +0 -12
  194. data/app/frontend/components/navbar/container/component.html.erb +0 -5
  195. data/app/frontend/components/navbar/container/component.rb +0 -8
  196. data/app/frontend/components/navbar/container/preview.rb +0 -12
  197. data/app/frontend/components/navbar/dark_mode_switcher/component.html.erb +0 -4
  198. data/app/frontend/components/navbar/dark_mode_switcher/component.rb +0 -8
  199. data/app/frontend/components/navbar/dark_mode_switcher/preview.rb +0 -12
  200. data/app/frontend/components/navbar/menu_items/component.html.erb +0 -3
  201. data/app/frontend/components/navbar/menu_items/component.rb +0 -8
  202. data/app/frontend/components/navbar/menu_items/preview.rb +0 -12
  203. data/app/frontend/components/navbar/navlink/component.html.erb +0 -8
  204. data/app/frontend/components/navbar/navlink/component.rb +0 -13
  205. data/app/frontend/components/navbar/navlink/preview.rb +0 -12
  206. data/app/frontend/components/navbar/right_section/component.html.erb +0 -3
  207. data/app/frontend/components/navbar/right_section/component.rb +0 -8
  208. data/app/frontend/components/navbar/right_section/preview.rb +0 -12
  209. data/app/frontend/components/navbar/select_account/component.html.erb +0 -36
  210. data/app/frontend/components/navbar/select_account/component.rb +0 -6
  211. data/app/frontend/components/navbar/separator/component.html.erb +0 -1
  212. data/app/frontend/components/navbar/separator/component.rb +0 -7
  213. data/app/frontend/components/navbar/separator/preview.rb +0 -12
  214. data/app/frontend/components/page/breadcrumbs/component.html.erb +0 -16
  215. data/app/frontend/components/page/breadcrumbs/component.rb +0 -6
  216. data/app/frontend/components/page/container/component.html.erb +0 -3
  217. data/app/frontend/components/page/container/component.rb +0 -4
  218. data/app/frontend/components/page/header/component.html.erb +0 -12
  219. data/app/frontend/components/page/header/component.rb +0 -6
  220. data/app/helpers/navbar_helper.rb +0 -35
  221. data/app/helpers/page_helper.rb +0 -15
  222. data/app/javascript/controllers/dark_mode_switcher_controller.js +0 -20
  223. data/app/javascript/controllers/dropdown_controller.js +0 -3
  224. data/app/views/devise/registrations/new.html.erb +0 -21
  225. data/app/views/devise/sessions/new.html.erb +0 -18
  226. data/app/views/layouts/application.html.erb +0 -11
  227. data/app/views/layouts/devise.html.erb +0 -23
  228. data/app/views/layouts/mailer.html.erb +0 -13
  229. data/app/views/layouts/mailer.text.erb +0 -1
  230. data/app/views/layouts/teamable.html.erb +0 -31
  231. data/app/views/shared/_head.html.erb +0 -26
  232. data/app/views/shared/_navbar.html.erb +0 -30
  233. data/app/views/shared/_navbar_logo.html.erb +0 -3
  234. data/app/views/teamable/accounts/new.html.erb +0 -10
  235. data/app/views/teamable/setup/new.html.erb +0 -8
  236. data/app/views/teamable/shared/_form.html.erb +0 -4
  237. data/config/importmap.rb +0 -7
  238. data/config/initializers/devise.rb +0 -313
  239. data/config/initializers/simple_form.rb +0 -148
  240. data/config/initializers/view_component.rb +0 -18
  241. data/lib/generators/irelia/install_generator.rb +0 -19
  242. data/lib/generators/templates/irelia.rb +0 -14
  243. data/lib/generators/view_component/USAGE +0 -15
  244. data/lib/generators/view_component/templates/component.html.erb.tt +0 -1
  245. data/lib/generators/view_component/templates/component.rb.tt +0 -8
  246. data/lib/generators/view_component/templates/component_system_test.rb.tt +0 -13
  247. data/lib/generators/view_component/templates/component_test.rb.tt +0 -19
  248. data/lib/generators/view_component/view_component_generator.rb +0 -53
@@ -1,36 +0,0 @@
1
- <div data-controller="dropdown" class="relative block text-sm min-w-[20px]">
2
- <button class="flex w-full items-center text-left gap-x-4 cursor-pointer" data-action="dropdown#toggle click@window->dropdown#hide">
3
- <img class="w-9 h-9 rounded" src="https://picsum.photos/50">
4
- <div class="flex flex-col pr-4 gap-y-0.5">
5
- <strong class="text-primary-600"><%= current_account.name %></strong>
6
- <% if current_account.personal_account? %>
7
- <span class="flex text-neutral-500 dark:text-neutral-300 items-center gap-x-1 text-xs">
8
- <i class="fas fa-user"></i>
9
- Personal account
10
- </span>
11
- <% else %>
12
- <span class="flex text-neutral-500 dark:text-neutral-300 items-center gap-x-1 text-xs">
13
- <i class="fas fa-users"></i>
14
- Team account
15
- </span>
16
- <% end %>
17
- </div>
18
- <i class="fa-solid fa-caret-down mr-2 ml-auto"></i>
19
- </button>
20
- <div
21
- class="hidden w-full transition z-50 text-xs bg-white dark:bg-zinc-800 divide-y absolute mt-4 right-0 border dark:border-zinc-700 dark:divide-zinc-700 dark:text-neutral-200 border-t-0 rounded-b whitespace-nowrap"
22
- data-dropdown-target="menu"
23
- data-transition-enter-from="opacity-0 scale-95"
24
- data-transition-enter-to="opacity-100 scale-100"
25
- data-transition-leave-from="opacity-100 scale-100"
26
- data-transition-leave-to="opacity-0 scale-95">
27
-
28
- <% User.find(current_user.id).accounts.each do |account| %>
29
- <%= button_to switch_account_path(account), class: 'flex w-full p-3 px-4 gap-x-4 items-center hover:bg-neutral-100 hover:text-neutral-900 transition', method: :patch do %>
30
- <i class="fas w-4 text-center <%= account.personal_account? ? "fa-user" : "fa-users" %>"></i> <%= account.name %>
31
- <% end %>
32
- <% end %>
33
-
34
- <%= link_to 'Create a new team account' , new_account_path, class: 'flex w-full p-3 px-4 gap-x-4 items-center hover:bg-neutral-100 hover:text-neutral-900 transition', method: :delete %>
35
- </div>
36
- </div>
@@ -1,6 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- class Navbar::SelectAccount::Component < ApplicationViewComponent
4
- option :current_user, required: true
5
- option :current_account, required: true
6
- end
@@ -1 +0,0 @@
1
- <div class="w-[1px] h-10 bg-neutral-100 dark:bg-dark-700"></div>
@@ -1,7 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Navbar
4
- module Separator
5
- class Component < ApplicationViewComponent; end
6
- end
7
- end
@@ -1,12 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Navbar
4
- module Separator
5
- class Preview < ApplicationViewComponentPreview
6
- # You can specify the container class for the default template
7
- # self.container_class = "w-1/2 border border-gray-300"
8
-
9
- def default; end
10
- end
11
- end
12
- end
@@ -1,16 +0,0 @@
1
- <% if breadcrumbs.any? %>
2
- <nav aria-label="breadcrumb" class="bg-white dark:bg-dark-900 border-b dark:border-b-dark-700 text-sm">
3
- <div class="container max-w-[1200px] font-semibold mx-auto p-8 py-4">
4
- <ol class="flex gap-x-4 text-neutral-500 dark:text-neutral-400">
5
- <% breadcrumbs.each do |crumb| %>
6
- <% if crumb.current? %>
7
- <li class="font-bold text-black dark:text-white"><%= crumb.name %></li>
8
- <% else %>
9
- <li><%= link_to crumb.name, crumb.url, (crumb.current? ? {"aria-current" => "page"} : {}) %></li>
10
- <li><span class="text-neutral-300 dark:text-neutral-600"><i class="fa-solid fa-caret-right"></i></span></li>
11
- <% end %>
12
- <% end %>
13
- </ol>
14
- </div>
15
- </nav>
16
- <% end %>
@@ -1,6 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- class Page::Breadcrumbs::Component < ApplicationViewComponent
4
- # with_collection_parameter :breadcrumbs
5
- option :breadcrumbs
6
- end
@@ -1,3 +0,0 @@
1
- <div class="container max-w-[1200px] mx-auto p-8">
2
- <%= content %>
3
- </div>
@@ -1,4 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- class Page::Container::Component < ApplicationViewComponent
4
- end
@@ -1,12 +0,0 @@
1
- <header class="flex mb-8 border-b-2 dark:border-b-dark-700 pb-6">
2
- <div class="flex flex-1 flex-col gap-y-1">
3
- <h1 class="text-lg font-bold uppercase"><%= title %></h1>
4
- <% if subtitle.present? %>
5
- <p class="text-neutral-400"><%= subtitle %></p>
6
- <% end %>
7
- </div>
8
-
9
- <div class="flex items-center justify-center gap-x-3">
10
- <%= content %>
11
- </div>
12
- </header>
@@ -1,6 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- class Page::Header::Component < ApplicationViewComponent
4
- option :title
5
- option :subtitle, optional: true
6
- end
@@ -1,35 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module NavbarHelper
4
- def navbar(&block)
5
- render(Navbar::Container::Component.new, &block)
6
- end
7
-
8
- def navbar_items(&block)
9
- render(Navbar::MenuItems::Component.new, &block)
10
- end
11
-
12
- def navbar_right(&block)
13
- render(Navbar::RightSection::Component.new, &block)
14
- end
15
-
16
- def navigation_item(text, target, options = {})
17
- active = options[:active] || request.path == target
18
- icon = options[:icon] || nil
19
-
20
- render(Navbar::Navlink::Component.new(target:, text:, active:, icon:))
21
- end
22
-
23
- def navbar_button(text, target, options = {})
24
- active = options[:active] || request.path == target
25
- icon = options[:icon] || nil
26
- method = options[:method] || :get
27
- custom_class = options[:class] || nil
28
-
29
- render(Navbar::Button::Component.new(target:, text:, icon:, method:, custom_class:))
30
- end
31
-
32
- def navbar_separator
33
- render(Navbar::Separator::Component.new)
34
- end
35
- end
@@ -1,15 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module PageHelper
4
- def container(&block)
5
- render(Page::Container::Component.new, &block)
6
- end
7
-
8
- def page_header(**arguments)
9
- render(Page::Header::Component.new(**arguments))
10
- end
11
-
12
- def breadcrumbs
13
- render(Page::Breadcrumbs::Component.new(breadcrumbs: breadcrumb_trail))
14
- end
15
- end
@@ -1,20 +0,0 @@
1
- import { Controller } from "@hotwired/stimulus"
2
-
3
- export default class extends Controller {
4
- initialize() {
5
- if (localStorage.theme === 'dark' || (!('theme' in localStorage) && window.matchMedia('(prefers-color-scheme: dark)').matches)) {
6
- document.documentElement.classList.add('dark')
7
- } else {
8
- document.documentElement.classList.remove('dark')
9
- }
10
- }
11
-
12
- toggle() {
13
- if (localStorage.theme === 'dark') {
14
- localStorage.theme = 'light'
15
- } else {
16
- localStorage.theme = 'dark'
17
- }
18
- this.initialize()
19
- }
20
- }
@@ -1,3 +0,0 @@
1
- import Dropdown from 'stimulus-dropdown'
2
-
3
- export default class extends Dropdown { }
@@ -1,21 +0,0 @@
1
- <% title "Create a new account" %>
2
- <% content_for :header do %>
3
- <h1 class="font-bold font-headings text-neutral-600 dark:text-neutral-100 text-2xl">Create your <strong class="text-primary-600">Irelia</strong> account</h1>
4
- <p class="text-neutral-400">Enter your email address and a secure password.</p>
5
- <% end %>
6
-
7
- <main class="flex flex-col gap-4 w-full max-w-2xl">
8
- <%= simple_form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f| %>
9
- <%= f.input :email, placeholder: "Enter a valid email address", required: true, autofocus: true, input_html: { autocomplete: "email" }%>
10
-
11
- <div class="flex justify-between items-start gap-x-4">
12
- <%= f.input :password, placeholder: "Create a secure password", required: true, hint: ("#{@minimum_password_length} characters minimum" if @minimum_password_length), input_html: { autocomplete: "new-password" } %>
13
- <%= f.input :password_confirmation, placeholder: "Confirm your password", required: true, input_html: { autocomplete: "new-password" } %>
14
- </div>
15
-
16
- <div class="mt-4 flex justify-between items-center">
17
- <%= f.button :submit, "Create your account" %>
18
- <p class="dark:text-neutral-200">Already have an account? <%= link_to "Sign in!", new_user_session_path, class: "font-bold transition text-primary-600" %>
19
- </div>
20
- <% end %>
21
- </main>
@@ -1,18 +0,0 @@
1
- <% title "Sign in to your account" %>
2
- <% content_for :header do %>
3
- <h1 class="font-bold font-headings text-neutral-600 dark:text-neutral-100 text-2xl">Sign in to <strong class="text-primary-600">Irelia</strong></h1>
4
- <p class="text-neutral-400 dark:text-neutral-200">Sign in with your email address and password or select any of the other available options below.</p>
5
- <% end %>
6
-
7
- <main class="flex flex-col gap-4 w-full max-w-xl">
8
- <%= simple_form_for(resource, as: resource_name, url: session_path(resource_name)) do |f| %>
9
- <%= f.input :email, placeholder: "Enter your email", required: true, autofocus: true, input_html: { autocomplete: "email" } %>
10
- <%= f.input :password, placeholder: "Enter your password", required: true, input_html: { autocomplete: "current-password" } %>
11
- <%= f.input :remember_me, as: :boolean, wrapper: :inline_checkbox if devise_mapping.rememberable? %>
12
-
13
- <div class="flex justify-between items-center">
14
- <%= f.button :submit, "Sign in" %>
15
- <p class="dark:text-neutral-200">Don't have an account? <%= link_to "Sign up!", new_user_registration_path, class: "font-bold text-primary-600 transition" %></p>
16
- </div>
17
- <% end %>
18
- </main>
@@ -1,11 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <%= render "shared/head" %>
5
- </head>
6
- <body class="antialiased bg-neutral-50 text-neutral-700 dark:bg-dark-800 dark:text-neutral-100">
7
- <%= render "shared/navbar" %>
8
- <%= breadcrumbs %>
9
- <%= yield %>
10
- </body>
11
- </html>
@@ -1,23 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <%= render "shared/head" %>
5
- </head>
6
- <body class="h-screen relative flex justify-center items-center antialiased bg-neutral-50 text-neutral-700 dark:bg-dark-800 dark:text-neutral-100">
7
- <div class="fixed top-4 right-4">
8
- <%= render(Navbar::DarkModeSwitcher::Component.new) %>
9
- </div>
10
-
11
- <% flash.each do |key, value| %>
12
- <%= content_tag :div, value, class: "flash #{key} fixed top-0 left-0 right-0 bg-white py-2 px-4 inline-block text-center w-full shadow" %>
13
- <% end %>
14
-
15
- <section class="flex flex-col gap-8 items-center justify-center w-full">
16
- <header class="flex flex-col items-center gap-y-2 text-center max-w-lg">
17
- <%= yield :header %>
18
- </header>
19
-
20
- <%= yield %>
21
- </section>
22
- </body>
23
- </html>
@@ -1,13 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
5
- <style>
6
- /* Email styles need to be inline */
7
- </style>
8
- </head>
9
-
10
- <body>
11
- <%= yield %>
12
- </body>
13
- </html>
@@ -1 +0,0 @@
1
- <%= yield %>
@@ -1,31 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <%= render "shared/head" %>
5
- </head>
6
- <body class="h-screen relative bg-neutral-50 text-neutral-700 dark:bg-dark-800 dark:text-neutral-100">
7
- <%= render "shared/navbar" %>
8
-
9
- <% flash.each do |key, value| %>
10
- <%= content_tag :div, value, class: "flash #{key} fixed top-0 left-0 right-0 bg-white py-2 px-4 inline-block text-center w-full shadow" %>
11
- <% end %>
12
-
13
- <div class="h-screen -top-[60px] relative flex justify-center items-center antialiased">
14
- <section class="flex flex-1 flex-col">
15
- <div class="flex-1 flex items-center justify-center px-8">
16
- <section class="flex flex-col gap-8 items-center justify-center w-full max-w-xl">
17
- <header class="flex flex-col items-center">
18
- <div class="flex flex-col gap-y-2 text-center">
19
- <%= yield :header %>
20
- </div>
21
- </header>
22
-
23
- <main class="flex flex-col gap-4 w-full">
24
- <%= yield %>
25
- </main>
26
- </section>
27
- </div>
28
- </section>
29
- </div>
30
- </body>
31
- </html>
@@ -1,26 +0,0 @@
1
- <%= display_meta_tags site: Irelia.config.application_name, reverse: true, separator: "—" %>
2
- <meta name="viewport" content="width=device-width,initial-scale=1">
3
-
4
- <script>
5
- if (localStorage.theme === 'dark' || (!('theme' in localStorage) && window.matchMedia('(prefers-color-scheme: dark)').matches)) {
6
- document.documentElement.classList.add('dark')
7
- }
8
- </script>
9
-
10
- <%= csrf_meta_tags %>
11
- <%= csp_meta_tag %>
12
- <%= stylesheet_link_tag "tailwind", "data-turbo-track": "reload" %>
13
- <%= stylesheet_link_tag "application", "data-turbo-track": "reload" %>
14
- <%= javascript_importmap_tags %>
15
-
16
- <link rel="preconnect" href="https://fonts.googleapis.com" />
17
- <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin="true" />
18
- <link href="https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&amp;display=swap" rel="stylesheet" />
19
- <link href="https://fonts.googleapis.com/css2?family=Work+Sans:wght@300;400;500;600;700;800;900&amp;display=swap" rel="stylesheet" />
20
- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css" integrity="sha512-iecdLmaskl7CVkqkXNQ/ZH/XLlvWZOJyj7Yy7tcenmpD1ypASozpmT/E0iPtmFIB46ZmdtAc9eNBvH0H/ZpiBw==" crossorigin="anonymous" referrerpolicy="no-referrer" />
21
- <script src="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/js/all.min.js" integrity="sha512-fD9DI5bZwQxOi7MhYWnnNPlvXdp/2Pj3XSTRrFs5FQa4mizyGLnJcN6tuvUS6LbmgN1ut+XGSABKvjN0H6Aoow==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
22
-
23
- <style>
24
- .valid .input-box { border: 1px green solid; }
25
- .invalid .input-box { border: 1px red solid; }
26
- </style>
@@ -1,30 +0,0 @@
1
- <%= navbar do %>
2
- <%= render "shared/navbar_logo" %>
3
-
4
- <%= navbar_separator %>
5
-
6
- <% if account_selected? %>
7
- <%= navbar_items do %>
8
- <%= navigation_item "Dashboard", root_path %>
9
- <%= navigation_item "Reports", "#" %>
10
- <% end %>
11
- <% end %>
12
-
13
- <% unless account_selected? %>
14
- <%= navbar_items do %>
15
- <%= navigation_item "Onboarding", setup_personal_account_path %>
16
- <% end %>
17
- <% end %>
18
-
19
- <%= navbar_right do %>
20
- <%= navbar_button(nil, "#", { icon: "fa fa-bell" }) %>
21
- <% if current_user.personal_account? && account_selected? %>
22
- <%= navbar_separator %>
23
- <%= render(Navbar::SelectAccount::Component.new(current_user:, current_account:)) %>
24
- <%= navbar_separator %>
25
- <% end %>
26
- <%= render(Navbar::DarkModeSwitcher::Component.new) %>
27
- <%= navbar_button(nil, "#", { icon: "fa fa-gear" }) %>
28
- <%= navbar_button(nil, destroy_user_session_path, { method: :delete, icon: "fa fa-right-from-bracket" }) %>
29
- <% end %>
30
- <% end %>
@@ -1,3 +0,0 @@
1
- <%= link_to root_path, class: 'flex gap-x-2 items-center justify-between font-bold text-primary-600 transition' do %>
2
- <i class="fa fa-star text-xl"></i>
3
- <% end %>
@@ -1,10 +0,0 @@
1
- <% title "Create a new team account" %>
2
-
3
- <% content_for :header do %>
4
- <h1 class="font-bold font-headings text-neutral-600 dark:text-neutral-100 text-2xl">Create a new account</h1>
5
- <p class="text-neutral-400 dark:text-neutral-200">Create a new account for your team or organization</p>
6
- <% end %>
7
-
8
- <%= render "teamable/shared/flash_messages" %>
9
-
10
- <%= render "teamable/shared/form" %>
@@ -1,8 +0,0 @@
1
- <% title "Setup your account" %>
2
-
3
- <% content_for :header do %>
4
- <h1 class="font-bold font-headings text-neutral-600 dark:text-neutral-100 text-2xl">Setup your personal account</h1>
5
- <p class="text-neutral-400 dark:text-neutral-200">Finish the registration by setting up your user profile.</p>
6
- <% end %>
7
-
8
- <%= render "teamable/shared/form" %>
@@ -1,4 +0,0 @@
1
- <%= simple_form_for @account, url: @account.personal_account ? setup_personal_account_path : account_path, method: :post do |f| %>
2
- <%= f.input :name, placeholder: @account.personal_account ? "Your full name" : "Team / organization name" %>
3
- <%= f.button :submit, "Create account" %>
4
- <% end %>
data/config/importmap.rb DELETED
@@ -1,7 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- pin "stimulus-use", to: "https://ga.jspm.io/npm:stimulus-use@0.51.3/dist/index.js"
4
- pin "stimulus-dropdown", to: "https://ga.jspm.io/npm:stimulus-dropdown@2.1.0/dist/stimulus-dropdown.mjs"
5
- pin "hotkeys-js", to: "https://ga.jspm.io/npm:hotkeys-js@3.10.2/dist/hotkeys.esm.js"
6
-
7
- pin_all_from File.expand_path("../app/javascript", __dir__)