arara 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (154) hide show
  1. checksums.yaml +7 -0
  2. data/README.md +38 -0
  3. data/Rakefile +32 -0
  4. data/app/assets/config/arara_manifest.js +1 -0
  5. data/app/assets/javascripts/arara.js +603 -0
  6. data/app/assets/stylesheets/arara/application.css +15 -0
  7. data/app/components/arara.rb +2 -0
  8. data/app/components/arara/base_component.rb +62 -0
  9. data/app/components/arara/button_component.html.erb +7 -0
  10. data/app/components/arara/button_component.rb +50 -0
  11. data/app/components/arara/card_action_buttons_component.html.erb +3 -0
  12. data/app/components/arara/card_action_buttons_component.rb +15 -0
  13. data/app/components/arara/card_action_icons_component.html.erb +3 -0
  14. data/app/components/arara/card_action_icons_component.rb +15 -0
  15. data/app/components/arara/card_actions_component.html.erb +3 -0
  16. data/app/components/arara/card_actions_component.rb +15 -0
  17. data/app/components/arara/card_component.html.erb +3 -0
  18. data/app/components/arara/card_component.rb +15 -0
  19. data/app/components/arara/card_media_component.html.erb +3 -0
  20. data/app/components/arara/card_media_component.rb +20 -0
  21. data/app/components/arara/card_media_content_component.html.erb +3 -0
  22. data/app/components/arara/card_media_content_component.rb +15 -0
  23. data/app/components/arara/card_primary_content_component.html.erb +3 -0
  24. data/app/components/arara/card_primary_content_component.rb +18 -0
  25. data/app/components/arara/checkbox_component.html.erb +22 -0
  26. data/app/components/arara/checkbox_component.rb +25 -0
  27. data/app/components/arara/chip_component.html.erb +13 -0
  28. data/app/components/arara/chip_component.rb +22 -0
  29. data/app/components/arara/chipset_component.html.erb +6 -0
  30. data/app/components/arara/chipset_component.rb +23 -0
  31. data/app/components/arara/data_table_body_cell_component.html.erb +3 -0
  32. data/app/components/arara/data_table_body_cell_component.rb +18 -0
  33. data/app/components/arara/data_table_body_checkbox_component.html.erb +11 -0
  34. data/app/components/arara/data_table_body_checkbox_component.rb +25 -0
  35. data/app/components/arara/data_table_body_component.html.erb +3 -0
  36. data/app/components/arara/data_table_body_component.rb +15 -0
  37. data/app/components/arara/data_table_body_row_component.html.erb +3 -0
  38. data/app/components/arara/data_table_body_row_component.rb +27 -0
  39. data/app/components/arara/data_table_component.html.erb +5 -0
  40. data/app/components/arara/data_table_component.rb +36 -0
  41. data/app/components/arara/data_table_header_cell_component.html.erb +3 -0
  42. data/app/components/arara/data_table_header_cell_component.rb +24 -0
  43. data/app/components/arara/data_table_header_checkbox_component.html.erb +11 -0
  44. data/app/components/arara/data_table_header_checkbox_component.rb +25 -0
  45. data/app/components/arara/data_table_header_component.html.erb +3 -0
  46. data/app/components/arara/data_table_header_component.rb +11 -0
  47. data/app/components/arara/data_table_header_row_component.html.erb +3 -0
  48. data/app/components/arara/data_table_header_row_component.rb +15 -0
  49. data/app/components/arara/dialog_button_component.html.erb +4 -0
  50. data/app/components/arara/dialog_button_component.rb +31 -0
  51. data/app/components/arara/dialog_component.html.erb +8 -0
  52. data/app/components/arara/dialog_component.rb +34 -0
  53. data/app/components/arara/dialog_content_component.html.erb +3 -0
  54. data/app/components/arara/dialog_content_component.rb +15 -0
  55. data/app/components/arara/dialog_footer_component.html.erb +3 -0
  56. data/app/components/arara/dialog_footer_component.rb +15 -0
  57. data/app/components/arara/dialog_title_component.html.erb +3 -0
  58. data/app/components/arara/dialog_title_component.rb +16 -0
  59. data/app/components/arara/elevation_component.html.erb +3 -0
  60. data/app/components/arara/elevation_component.rb +19 -0
  61. data/app/components/arara/fab_component.html.erb +13 -0
  62. data/app/components/arara/fab_component.rb +42 -0
  63. data/app/components/arara/fab_icon_component.html.erb +3 -0
  64. data/app/components/arara/fab_icon_component.rb +15 -0
  65. data/app/components/arara/form_builder.rb +142 -0
  66. data/app/components/arara/form_field_component.html.erb +3 -0
  67. data/app/components/arara/form_field_component.rb +15 -0
  68. data/app/components/arara/google_calendar/menu_item_component.html.erb +11 -0
  69. data/app/components/arara/google_calendar/menu_item_component.rb +34 -0
  70. data/app/components/arara/google_calendar/nav_bar_component.html.erb +176 -0
  71. data/app/components/arara/google_calendar/nav_bar_component.rb +6 -0
  72. data/app/components/arara/icon_button_component.html.erb +3 -0
  73. data/app/components/arara/icon_button_component.rb +42 -0
  74. data/app/components/arara/icon_toggle_component.html.erb +3 -0
  75. data/app/components/arara/icon_toggle_component.rb +18 -0
  76. data/app/components/arara/material_icon_component.html.erb +3 -0
  77. data/app/components/arara/material_icon_component.rb +18 -0
  78. data/app/components/arara/menu_component.html.erb +5 -0
  79. data/app/components/arara/menu_component.rb +19 -0
  80. data/app/components/arara/menu_divider_component.html.erb +1 -0
  81. data/app/components/arara/menu_divider_component.rb +19 -0
  82. data/app/components/arara/menu_item_component.html.erb +3 -0
  83. data/app/components/arara/menu_item_component.rb +22 -0
  84. data/app/components/arara/nav_bar_component.html.erb +293 -0
  85. data/app/components/arara/nav_bar_component.rb +7 -0
  86. data/app/components/arara/radio_button_component.html.erb +8 -0
  87. data/app/components/arara/radio_button_component.rb +35 -0
  88. data/app/components/arara/select_component.html.erb +22 -0
  89. data/app/components/arara/select_component.rb +27 -0
  90. data/app/components/arara/select_item_component.html.erb +3 -0
  91. data/app/components/arara/select_item_component.rb +45 -0
  92. data/app/components/arara/step_component.html.erb +27 -0
  93. data/app/components/arara/step_component.rb +100 -0
  94. data/app/components/arara/step_connector_component.html.erb +4 -0
  95. data/app/components/arara/step_connector_component.rb +31 -0
  96. data/app/components/arara/stepper_component.html.erb +3 -0
  97. data/app/components/arara/stepper_component.rb +20 -0
  98. data/app/components/arara/switch_component.html.erb +8 -0
  99. data/app/components/arara/switch_component.rb +35 -0
  100. data/app/components/arara/tags.rb +2 -0
  101. data/app/components/arara/tags/check_box.rb +63 -0
  102. data/app/components/arara/tags/chip_choice.rb +81 -0
  103. data/app/components/arara/tags/chipset.rb +39 -0
  104. data/app/components/arara/tags/country_select.rb +110 -0
  105. data/app/components/arara/tags/label.rb +78 -0
  106. data/app/components/arara/tags/password_field.rb +16 -0
  107. data/app/components/arara/tags/radio_button.rb +31 -0
  108. data/app/components/arara/tags/select.rb +120 -0
  109. data/app/components/arara/tags/text_area.rb +25 -0
  110. data/app/components/arara/tags/text_field.rb +31 -0
  111. data/app/components/arara/text_field_component.html.erb +47 -0
  112. data/app/components/arara/text_field_component.rb +101 -0
  113. data/app/components/arara/typography_component.html.erb +1 -0
  114. data/app/components/arara/typography_component.rb +51 -0
  115. data/app/controllers/arara/application_controller.rb +5 -0
  116. data/app/helpers/arara/application_helper.rb +4 -0
  117. data/app/javascript/arara/controllers/body_class_toggler_controller.js +20 -0
  118. data/app/javascript/arara/controllers/counter_controller.js +22 -0
  119. data/app/javascript/arara/controllers/demo_dialog_controller.js +24 -0
  120. data/app/javascript/arara/controllers/mdc_chip_set_controller.js +18 -0
  121. data/app/javascript/arara/controllers/mdc_data_table_controller.js +18 -0
  122. data/app/javascript/arara/controllers/mdc_form_field_controller.js +40 -0
  123. data/app/javascript/arara/controllers/mdc_icon_toggle_controller.js +18 -0
  124. data/app/javascript/arara/controllers/mdc_linear_progress_controller.js +18 -0
  125. data/app/javascript/arara/controllers/mdc_list_controller.js +23 -0
  126. data/app/javascript/arara/controllers/mdc_menu_controller.js +25 -0
  127. data/app/javascript/arara/controllers/mdc_ripple_controller.js +18 -0
  128. data/app/javascript/arara/controllers/mdc_select_controller.js +27 -0
  129. data/app/javascript/arara/controllers/mdc_slider_controller.js +21 -0
  130. data/app/javascript/arara/controllers/mdc_snackbar_controller.js +38 -0
  131. data/app/javascript/arara/controllers/mdc_switch_controller.js +18 -0
  132. data/app/javascript/arara/controllers/mdc_tab_bar_controller.js +18 -0
  133. data/app/javascript/arara/controllers/mdc_text_field_controller.js +35 -0
  134. data/app/javascript/arara/controllers/mdc_top_app_bar_controller.js +18 -0
  135. data/app/javascript/arara/controllers/rails_chip_set_choice_controller.js +31 -0
  136. data/app/javascript/arara/controllers/rails_chip_set_filter_controller.js +39 -0
  137. data/app/javascript/arara/controllers/remote_form_controller.js +79 -0
  138. data/app/javascript/arara/helpers/sum.js +5 -0
  139. data/app/javascript/arara/index.js +65 -0
  140. data/app/javascript/arara/scss/_material_design.scss +34 -0
  141. data/app/javascript/arara/scss/_tailwind.scss +4 -0
  142. data/app/javascript/arara/scss/arara.scss +5 -0
  143. data/app/javascript/arara/scss/material_design/_custom.scss +61 -0
  144. data/app/javascript/arara/scss/tailwind/_ripple_workaround.scss +22 -0
  145. data/app/jobs/arara/application_job.rb +4 -0
  146. data/app/mailers/arara/application_mailer.rb +6 -0
  147. data/app/models/arara/application_record.rb +5 -0
  148. data/app/views/layouts/arara/application.html.erb +15 -0
  149. data/config/routes.rb +2 -0
  150. data/lib/arara.rb +5 -0
  151. data/lib/arara/engine.rb +7 -0
  152. data/lib/arara/version.rb +3 -0
  153. data/lib/tasks/arara_tasks.rake +4 -0
  154. metadata +238 -0
@@ -0,0 +1,3 @@
1
+ <%= content_tag(:i, class: html_class) do %>
2
+ <%= title %>
3
+ <% end %>
@@ -0,0 +1,18 @@
1
+ module Arara
2
+ class IconToggleComponent < ActionView::Component::Base
3
+
4
+ def initialize(title:, on: false)
5
+ @title = title
6
+ @on = on
7
+ end
8
+
9
+ private
10
+ attr_reader :title, :on
11
+
12
+ def html_class
13
+ classes = ['material-icons', 'mdc-icon-button__icon']
14
+ classes << 'mdc-icon-button__icon--on' if on
15
+ classes
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,3 @@
1
+ <%= content_tag(html_tag, html_options) do %>
2
+ <%= content %>
3
+ <% end %>
@@ -0,0 +1,18 @@
1
+ module Arara
2
+ class MaterialIconComponent < ActionView::Component::Base
3
+ include Arara::BaseComponent
4
+
5
+ def initialize(icon:, **kw)
6
+ super(tag: "i", **kw)
7
+ @icon = icon
8
+ end
9
+
10
+ def default_html_class
11
+ "material-icons"
12
+ end
13
+
14
+ def content
15
+ @icon
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,5 @@
1
+ <%= content_tag(html_tag, html_options) do %>
2
+ <ul class="mdc-list" role="menu" aria-hidden="true">
3
+ <%= content %>
4
+ </ul>
5
+ <% end %>
@@ -0,0 +1,19 @@
1
+ class Arara::MenuComponent < ActionView::Component::Base
2
+ include Arara::BaseComponent
3
+
4
+ validates :content, presence: true
5
+
6
+ def initialize(**kw)
7
+ super(tag: "div", **kw)
8
+ end
9
+
10
+ def default_html_class
11
+ "mdc-menu mdc-menu-surface"
12
+ end
13
+
14
+ def html_options
15
+ opts = super
16
+ opts[:tabindex] = "-1"
17
+ opts
18
+ end
19
+ end
@@ -0,0 +1 @@
1
+ <%= tag(html_tag, html_options) %>
@@ -0,0 +1,19 @@
1
+ module Arara
2
+ class MenuDividerComponent < ActionView::Component::Base
3
+ include Arara::BaseComponent
4
+
5
+ def initialize(**kw)
6
+ super(tag: "hr", **kw)
7
+ end
8
+
9
+ def default_html_class
10
+ "mdc-list-divider"
11
+ end
12
+
13
+ def html_options
14
+ opts = super
15
+ opts[:role] = "separator"
16
+ opts
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,3 @@
1
+ <%= content_tag(html_tag, html_options) do %>
2
+ <%= content %>
3
+ <% end %>
@@ -0,0 +1,22 @@
1
+ class Arara::MenuItemComponent < ActionView::Component::Base
2
+ include Arara::BaseComponent
3
+
4
+ def initialize(**kw)
5
+ super(tag: "li", **kw)
6
+ end
7
+
8
+ def default_html_class
9
+ "mdc-list-item"
10
+ end
11
+
12
+ def html_options
13
+ opts = super
14
+ opts[:role] = "menuitem"
15
+ opts[:tabindex] = "-1"
16
+ opts
17
+ end
18
+
19
+ def content
20
+ user_content
21
+ end
22
+ end
@@ -0,0 +1,293 @@
1
+ <style>
2
+ .nav_bar__top {
3
+ position: -webkit-sticky; /* Safari */
4
+ position: sticky;
5
+ top: 0;
6
+ }
7
+
8
+ .nav_bar__settings {
9
+ margin-left: 0px;
10
+ }
11
+
12
+ .nav_bar__utils_avatar {
13
+
14
+ }
15
+
16
+ .nav_bar__menu {
17
+ background-color: white;
18
+ padding-top: 15px;
19
+ position: absolute;
20
+ height: calc(100vh);
21
+ overflow-y: auto;
22
+ width: 280px;
23
+ }
24
+
25
+ .nav_bar__menu_item:not(.nav_bar__menu_item--active):hover {
26
+ background-color: #f1f3f4 !important;
27
+ }
28
+
29
+ /* closed on mobile */
30
+ body.menu--toggler #nav_bar .nav_bar__menu {
31
+ visibility: hidden;
32
+ -webkit-transform: translateX(-280px);
33
+ transform: translateX(-280px);
34
+ -webkit-transition: transform .25s cubic-bezier(0.4,0.0,0.2,1),visibility 0s linear .25s;
35
+ transition: transform .25s cubic-bezier(0.4,0.0,0.2,1),visibility 0s linear .25s;
36
+ }
37
+
38
+ /* open on mobile */
39
+ body:not(.menu--toggler) #nav_bar .nav_bar__menu {
40
+ visibility: visible;
41
+ -webkit-transform: translateX(0);
42
+ transform: translateX(0);
43
+ -webkit-transition: transform .25s cubic-bezier(0.4,0.0,0.2,1),visibility 0s linear 0s;
44
+ transition: transform .25s cubic-bezier(0.4,0.0,0.2,1),visibility 0s linear 0s;
45
+ }
46
+
47
+ .nav_bar__logo {
48
+ min-width: 150px;
49
+ width: 150px;
50
+ padding-right: 14px;
51
+ }
52
+
53
+ @media (max-width: 768px) {
54
+ body #nav_bar .nav_bar__menu {
55
+ box-shadow: 0 0 16px rgba(0,0,0,.28);
56
+ top: 0;
57
+ position: absolute;
58
+ }
59
+ }
60
+ @media (min-width: 640px) {
61
+ .nav_bar__logo {
62
+ min-width: 200px;
63
+ width: 200px;
64
+ padding-right: 14px;
65
+ }
66
+ }
67
+
68
+ @media (min-width: 768px) {
69
+ .nav_bar__logo {
70
+ min-width: 268px;
71
+ padding-right: 30px;
72
+ }
73
+ }
74
+
75
+ @media (min-width: 1024px) {
76
+ .nav_bar__settings {
77
+ margin-left: 50px;
78
+ }
79
+
80
+ .nav_bar__utils {
81
+ padding-left: 30px;
82
+ }
83
+
84
+ .nav_bar__menu {
85
+ padding-top: 15px;
86
+ position: absolute;
87
+ height: calc(100vh - 64px);
88
+ overflow-y: auto;
89
+ width: 280px;
90
+ }
91
+
92
+ body.menu--toggler #nav_bar .nav_bar__menu {
93
+ visibility: visible;
94
+ -webkit-transform: translateX(0);
95
+ transform: translateX(0);
96
+ -webkit-transition: transform .25s cubic-bezier(0.4,0.0,0.2,1),visibility 0s linear 0s;
97
+ transition: transform .25s cubic-bezier(0.4,0.0,0.2,1),visibility 0s linear 0s;
98
+ }
99
+
100
+ body:not(.menu--toggler) #nav_bar .nav_bar__menu {
101
+ visibility: hidden;
102
+ -webkit-transform: translateX(-280px);
103
+ transform: translateX(-280px);
104
+ -webkit-transition: transform .25s cubic-bezier(0.4,0.0,0.2,1),visibility 0s linear .25s;
105
+ transition: transform .25s cubic-bezier(0.4,0.0,0.2,1),visibility 0s linear .25s;
106
+ }
107
+ }
108
+
109
+ @media (min-width: 1280px) {
110
+ }
111
+
112
+ .nav_bar__menu::-webkit-scrollbar-track {
113
+ border: 0 solid transparent;
114
+ background-clip: padding-box;
115
+ background-color: transparent;
116
+ }
117
+
118
+ .nav_bar__menu::-webkit-scrollbar-thumb {
119
+ background-clip: padding-box;
120
+ background-color: transparent;
121
+ border: 0 solid transparent;
122
+ -webkit-box-shadow: none;
123
+ box-shadow: none;
124
+ min-height: 28px;
125
+ }
126
+
127
+ .nav_bar__menu::-webkit-scrollbar-corner {
128
+ background-color: transparent;
129
+ }
130
+
131
+ .nav_bar__menu::-webkit-scrollbar-button {
132
+ height: 0;
133
+ width: 0;
134
+ }
135
+
136
+ .nav_bar__menu::-webkit-scrollbar {
137
+ width: 10px;
138
+ height: 16px;
139
+ }
140
+
141
+ .nav_bar__menu::-webkit-scrollbar-button {
142
+ height: 0;
143
+ width: 0;
144
+ }
145
+ .nav_bar__menu::-webkit-scrollbar-corner {
146
+ background-color: transparent;
147
+ }
148
+ .nav_bar__menu:hover::-webkit-scrollbar-thumb {
149
+ background-color: rgba(0,0,0,.2);
150
+ box-shadow: inset 1px 1px 0 rgba(0,0,0,.1), inset 0 -1px 0 rgba(0,0,0,.0666);
151
+ }
152
+ .nav_bar__menu::-webkit-scrollbar-thumb {
153
+ background-clip: padding-box;
154
+ background-color: transparent;
155
+ border: 0 solid transparent;
156
+ -webkit-box-shadow: none;
157
+ box-shadow: none;
158
+ min-height: 28px;
159
+ }
160
+ .nav_bar__menu::-webkit-scrollbar-track {
161
+ border: 0 solid transparent;
162
+ background-clip: padding-box;
163
+ background-color: transparent;
164
+ }
165
+ </style>
166
+ <div id="nav_bar">
167
+ <div class="nav_bar__top flex items-center h-16" style="padding: 8px;">
168
+ <div class="nav_bar__logo flex" style="">
169
+ <div class="ml-1" style="color: #5f6368;" data-controller="body-class-toggler" data-action="click->body-class-toggler#toggle" data-body-class-toggler-class="menu--toggler">
170
+ <%= render(Arara::IconButtonComponent) do %>
171
+ <%= render(Arara::MaterialIconComponent, icon: 'menu') %>
172
+ <% end %>
173
+ </div>
174
+ <div class="flex items-center">
175
+ <%= image_tag "arara_logo.png", class: "ml-1 mr-2 hidden md:block", alt: "", 'aria-hidden': "true", style: "width:40px;height:40px", 'data-iml': "11962.05000000191", 'data-atf': "true" %>
176
+ <span style="font-size: 22px; color: #5f6368;">Arara</span>
177
+ </div>
178
+ </div>
179
+ <div class="nav_bar__search flex flex-grow justify-end" style="height: 46px;">
180
+ <%# search desk %>
181
+ <div class="flex-grow hidden md:block" style="padding-left: 10px; padding-right: 30px; width: 100%; max-width: 100%;">
182
+ <div class="flex flex-grow items-center rounded-lg" style="height: 46px; max-width: 720px; background: #f1f3f4; color: #5f6368;">
183
+ <%= render(Arara::IconButtonComponent) do %>
184
+ <%= render(Arara::MaterialIconComponent, icon: 'search') %>
185
+ <% end %>
186
+ <div>
187
+ Search
188
+ </div>
189
+ </div>
190
+ </div>
191
+ <div class="nav_bar__settings flex" style="">
192
+ <%# search mobile %>
193
+ <div class="flex-grow flex items-center block md:hidden" style="color: #5f6368;">
194
+ <%= render(Arara::IconButtonComponent) do %>
195
+ <%= render(Arara::MaterialIconComponent, icon: 'search') %>
196
+ <% end %>
197
+ </div>
198
+ <div class="flex items-center justify-center" style="height: 48px; min-width: 48px; vertical-align: middle;">
199
+ <svg width="20" height="20" viewBox="0 0 24 24" style="color: #5f6368; fill: currentColor;"><path fill="none" d="M0 0h24v24H0V0z"></path><path d="M11 18h2v-2h-2v2zm1-16C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm0-14c-2.21 0-4 1.79-4 4h2c0-1.1.9-2 2-2s2 .9 2 2c0 2-3 1.75-3 5h2c0-2.25 3-2.5 3-5 0-2.21-1.79-4-4-4z"></path></svg>
200
+ </div>
201
+ <div class="flex items-center justify-center" style="height: 48px; min-width: 48px; vertical-align: middle;">
202
+ <svg width="20" height="20" viewBox="0 0 24 24" style="color: #5f6368; fill: currentColor;"><path d="M13.85 22.25h-3.7c-.74 0-1.36-.54-1.45-1.27l-.27-1.89c-.27-.14-.53-.29-.79-.46l-1.8.72c-.7.26-1.47-.03-1.81-.65L2.2 15.53c-.35-.66-.2-1.44.36-1.88l1.53-1.19c-.01-.15-.02-.3-.02-.46 0-.15.01-.31.02-.46l-1.52-1.19c-.59-.45-.74-1.26-.37-1.88l1.85-3.19c.34-.62 1.11-.9 1.79-.63l1.81.73c.26-.17.52-.32.78-.46l.27-1.91c.09-.7.71-1.25 1.44-1.25h3.7c.74 0 1.36.54 1.45 1.27l.27 1.89c.27.14.53.29.79.46l1.8-.72c.71-.26 1.48.03 1.82.65l1.84 3.18c.36.66.2 1.44-.36 1.88l-1.52 1.19c.01.15.02.3.02.46s-.01.31-.02.46l1.52 1.19c.56.45.72 1.23.37 1.86l-1.86 3.22c-.34.62-1.11.9-1.8.63l-1.8-.72c-.26.17-.52.32-.78.46l-.27 1.91c-.1.68-.72 1.22-1.46 1.22zm-3.23-2h2.76l.37-2.55.53-.22c.44-.18.88-.44 1.34-.78l.45-.34 2.38.96 1.38-2.4-2.03-1.58.07-.56c.03-.26.06-.51.06-.78s-.03-.53-.06-.78l-.07-.56 2.03-1.58-1.39-2.4-2.39.96-.45-.35c-.42-.32-.87-.58-1.33-.77l-.52-.22-.37-2.55h-2.76l-.37 2.55-.53.21c-.44.19-.88.44-1.34.79l-.45.33-2.38-.95-1.39 2.39 2.03 1.58-.07.56a7 7 0 0 0-.06.79c0 .26.02.53.06.78l.07.56-2.03 1.58 1.38 2.4 2.39-.96.45.35c.43.33.86.58 1.33.77l.53.22.38 2.55z"></path><circle cx="12" cy="12" r="3.5"></circle></svg>
203
+ </div>
204
+ </div>
205
+ </div>
206
+ <div class="nav_bar__utils flex" style="padding-right: 4px;">
207
+ <div class="flex items-center">
208
+ <div class="flex items-center justify-center hidden lg:flex" style="height: 48px; min-width: 48px; vertical-align: middle;">
209
+ <svg width="24" height="24" focusable="false" viewBox="0 0 24 24" style="color: #5f6368; fill: currentColor;"><path d="M6,8c1.1,0 2,-0.9 2,-2s-0.9,-2 -2,-2 -2,0.9 -2,2 0.9,2 2,2zM12,20c1.1,0 2,-0.9 2,-2s-0.9,-2 -2,-2 -2,0.9 -2,2 0.9,2 2,2zM6,20c1.1,0 2,-0.9 2,-2s-0.9,-2 -2,-2 -2,0.9 -2,2 0.9,2 2,2zM6,14c1.1,0 2,-0.9 2,-2s-0.9,-2 -2,-2 -2,0.9 -2,2 0.9,2 2,2zM12,14c1.1,0 2,-0.9 2,-2s-0.9,-2 -2,-2 -2,0.9 -2,2 0.9,2 2,2zM16,6c0,1.1 0.9,2 2,2s2,-0.9 2,-2 -0.9,-2 -2,-2 -2,0.9 -2,2zM12,8c1.1,0 2,-0.9 2,-2s-0.9,-2 -2,-2 -2,0.9 -2,2 0.9,2 2,2zM18,14c1.1,0 2,-0.9 2,-2s-0.9,-2 -2,-2 -2,0.9 -2,2 0.9,2 2,2zM18,20c1.1,0 2,-0.9 2,-2s-0.9,-2 -2,-2 -2,0.9 -2,2 0.9,2 2,2z"></path></svg>
210
+ </div>
211
+ <div class="flex items-center justify-center" style="height: 40px; min-width: 40px; vertical-align: middle; padding: 4px;">
212
+ <img class="rounded-full overflow-hidden" style="height: 32px; width: 32px; vertical-align: middle;" src="https://www.gravatar.com/avatar/2df88e06bc946068934732ea24e3113e.jpg?s=32" alt="lovely avatar" class="object-cover object-center w-full h-full visible group-hover:hidden" />
213
+ </div>
214
+ </div>
215
+ </div>
216
+ </div>
217
+ <div class="nav_bar__menu">
218
+ <div style="width: 260px;">
219
+ <%= link_to pages_path("button") do %>
220
+ <%= render(Arara::GoogleCalendar::MenuItemComponent, icon: "crop_5_4", title: "Button") %>
221
+ <% end %>
222
+ <%= link_to pages_path("card") do %>
223
+ <%= render(Arara::GoogleCalendar::MenuItemComponent, icon: "insert_photo", title: "Card") %>
224
+ <% end %>
225
+ <%= link_to pages_path("checkbox") do %>
226
+ <%= render(Arara::GoogleCalendar::MenuItemComponent, icon: "check_box", title: "Checkbox") %>
227
+ <% end %>
228
+ <%= link_to pages_path("chips") do %>
229
+ <%= render(Arara::GoogleCalendar::MenuItemComponent, icon: "face", title: "Chips") %>
230
+ <% end %>
231
+ <%= link_to pages_path("data_table") do %>
232
+ <%= render(Arara::GoogleCalendar::MenuItemComponent, icon: "list", title: "Data Table") %>
233
+ <% end %>
234
+ <%= link_to pages_path("dialog") do %>
235
+ <%= render(Arara::GoogleCalendar::MenuItemComponent, icon: "chat_bubble_outline", title: "Dialog") %>
236
+ <% end %>
237
+ <%= link_to pages_path("elevation") do %>
238
+ <%= render(Arara::GoogleCalendar::MenuItemComponent, icon: "flip_to_front", title: "Elevation") %>
239
+ <% end %>
240
+ <%= link_to pages_path("fab") do %>
241
+ <%= render(Arara::GoogleCalendar::MenuItemComponent, icon: "add_circle_outline", title: "FAB") %>
242
+ <% end %>
243
+ <%= link_to pages_path("icon_button") do %>
244
+ <%= render(Arara::GoogleCalendar::MenuItemComponent, icon: "crop_5_4", title: "Icon Button") %>
245
+ <% end %>
246
+ <%= link_to pages_path("image_list") do %>
247
+ <%= render(Arara::GoogleCalendar::MenuItemComponent, icon: "collections", title: "Image List") %>
248
+ <% end %>
249
+ <%= link_to pages_path("layout_grid") do %>
250
+ <%= render(Arara::GoogleCalendar::MenuItemComponent, icon: "table_chart", title: "Layout Grid") %>
251
+ <% end %>
252
+ <%= link_to pages_path("linear_progress_indicator") do %>
253
+ <%= render(Arara::GoogleCalendar::MenuItemComponent, icon: "linear_scale", title: "Linear Progress Indicator") %>
254
+ <% end %>
255
+ <%= link_to pages_path("list") do %>
256
+ <%= render(Arara::GoogleCalendar::MenuItemComponent, icon: "format_list_bulleted", title: "List") %>
257
+ <% end %>
258
+ <%= link_to pages_path("menu") do %>
259
+ <%= render(Arara::GoogleCalendar::MenuItemComponent, icon: "menu", title: "Menu") %>
260
+ <% end %>
261
+ <%= link_to pages_path("radio_button") do %>
262
+ <%= render(Arara::GoogleCalendar::MenuItemComponent, icon: "radio_button_checked", title: "Radio Button") %>
263
+ <% end %>
264
+ <%= link_to pages_path("ripple") do %>
265
+ <%= render(Arara::GoogleCalendar::MenuItemComponent, icon: "dynamic_feed", title: "Ripple") %>
266
+ <% end %>
267
+ <%= link_to pages_path("select") do %>
268
+ <%= render(Arara::GoogleCalendar::MenuItemComponent, icon: "view_stream", title: "Select") %>
269
+ <% end %>
270
+ <%= link_to pages_path("slider") do %>
271
+ <%= render(Arara::GoogleCalendar::MenuItemComponent, icon: "remove", title: "Slider") %>
272
+ <% end %>
273
+ <%= link_to pages_path("snackbar") do %>
274
+ <%= render(Arara::GoogleCalendar::MenuItemComponent, icon: "mode_comment", title: "Snackbar") %>
275
+ <% end %>
276
+ <%= link_to pages_path("switch") do %>
277
+ <%= render(Arara::GoogleCalendar::MenuItemComponent, icon: "toggle_off", title: "Switch") %>
278
+ <% end %>
279
+ <%= link_to pages_path("tab_bar") do %>
280
+ <%= render(Arara::GoogleCalendar::MenuItemComponent, icon: "tab", title: "Tab Bar") %>
281
+ <% end %>
282
+ <%= link_to pages_path("text_field") do %>
283
+ <%= render(Arara::GoogleCalendar::MenuItemComponent, icon: "text_format", title: "Text Field") %>
284
+ <% end %>
285
+ <%= link_to pages_path("top_app_bar") do %>
286
+ <%= render(Arara::GoogleCalendar::MenuItemComponent, icon: "web_asset", title: "Top App Bar") %>
287
+ <% end %>
288
+ <%= link_to pages_path("typography") do %>
289
+ <%= render(Arara::GoogleCalendar::MenuItemComponent, icon: "text_fields", title: "Typography") %>
290
+ <% end %>
291
+ </div>
292
+ </div>
293
+ </div>
@@ -0,0 +1,7 @@
1
+ module Arara
2
+ class NavBarComponent < ActionView::Component::Base
3
+
4
+ def initialize(*)
5
+ end
6
+ end
7
+ end
@@ -0,0 +1,8 @@
1
+ <%= content_tag(html_tag, html_options) do %>
2
+ <%= tag("input", html_input_options) %>
3
+ <div class="mdc-radio__background">
4
+ <div class="mdc-radio__outer-circle"></div>
5
+ <div class="mdc-radio__inner-circle"></div>
6
+ </div>
7
+ <div class="mdc-radio__ripple"></div>
8
+ <% end %>
@@ -0,0 +1,35 @@
1
+ module Arara
2
+ class RadioButtonComponent < ActionView::Component::Base
3
+ include Arara::BaseComponent
4
+
5
+ attr_reader :id, :name, :checked, :value, :type
6
+
7
+ def initialize(id:, name:, value:, checked: false, type: "radio", **kw)
8
+ @id = id
9
+ @name = name
10
+ @checked = checked
11
+ @value = value
12
+ @type = type
13
+
14
+ super(tag: "div", **kw)
15
+ end
16
+
17
+ def html_input_options
18
+ opts = {
19
+ class: "mdc-radio__native-control",
20
+ type: type,
21
+ id: id,
22
+ name: name,
23
+ value: value
24
+ }
25
+
26
+ opts[:checked] = "" if checked
27
+
28
+ opts
29
+ end
30
+
31
+ def default_html_class
32
+ "mdc-radio"
33
+ end
34
+ end
35
+ end