avo 2.14.3.pre.1.branding → 2.14.3.pre.2.tailwindcss

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of avo might be problematic. Click here for more details.

Files changed (65) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -1
  3. data/app/assets/stylesheets/{avo.css → avo.base.css} +34 -1
  4. data/app/assets/stylesheets/css/fields/progress.css +3 -3
  5. data/app/assets/stylesheets/css/pagination.css +4 -0
  6. data/app/assets/stylesheets/css/search.css +1 -1
  7. data/app/assets/stylesheets/css/sidebar.css +1 -1
  8. data/app/assets/stylesheets/css/tags.css +0 -7
  9. data/app/assets/svgs/failed_to_load.svg +5 -4
  10. data/app/assets/svgs/grid-empty-state.svg +11 -10
  11. data/app/assets/svgs/table-empty-state.svg +12 -11
  12. data/app/components/avo/actions_component.html.erb +2 -2
  13. data/app/components/avo/actions_component.rb +1 -1
  14. data/app/components/avo/button_component.html.erb +1 -0
  15. data/app/components/avo/button_component.rb +2 -2
  16. data/app/components/avo/fields/boolean_field/edit_component.html.erb +1 -1
  17. data/app/components/avo/fields/common/progress_bar_component.html.erb +1 -1
  18. data/app/components/avo/fields/common/progress_bar_component.rb +1 -11
  19. data/app/components/avo/fields/common/single_file_viewer_component.html.erb +1 -1
  20. data/app/components/avo/fields/progress_bar_field/index_component.html.erb +1 -1
  21. data/app/components/avo/fields/progress_bar_field/show_component.html.erb +1 -1
  22. data/app/components/avo/fields/tags_field/edit_component.html.erb +1 -1
  23. data/app/components/avo/index/resource_grid_component.html.erb +1 -2
  24. data/app/components/avo/index/resource_table_component.html.erb +1 -2
  25. data/app/components/avo/profile_item_component.html.erb +1 -1
  26. data/app/components/avo/sidebar_component.html.erb +1 -1
  27. data/app/components/avo/sidebar_profile_component.html.erb +1 -1
  28. data/app/helpers/avo/actions_helper.rb +4 -0
  29. data/app/helpers/avo/attachments_helper.rb +4 -0
  30. data/app/helpers/avo/resources_helper.rb +16 -20
  31. data/app/javascript/{avo.js → avo.base.js} +1 -0
  32. data/app/javascript/js/controllers/fields/trix_field_controller.js +3 -4
  33. data/app/javascript/js/controllers/item_select_all_controller.js +9 -16
  34. data/app/javascript/js/controllers/item_selector_controller.js +1 -1
  35. data/app/views/avo/actions/show.html.erb +2 -2
  36. data/app/views/avo/associations/new.html.erb +2 -2
  37. data/app/views/avo/base/_multiple_select_filter.html.erb +1 -1
  38. data/app/views/avo/base/_text_filter.html.erb +1 -1
  39. data/app/views/avo/partials/_header.html.erb +1 -1
  40. data/app/views/avo/partials/_logo.html.erb +2 -2
  41. data/app/views/avo/private/_links_and_buttons.html.erb +1 -1
  42. data/app/views/avo/private/design.html.erb +3 -3
  43. data/app/views/kaminari/_first_page.html.erb +3 -0
  44. data/app/views/kaminari/_last_page.html.erb +3 -0
  45. data/app/views/kaminari/_next_page.html.erb +9 -0
  46. data/app/views/kaminari/_page.html.erb +12 -0
  47. data/app/views/kaminari/_prev_page.html.erb +9 -0
  48. data/app/views/layouts/avo/application.html.erb +4 -5
  49. data/lib/avo/configuration.rb +0 -5
  50. data/lib/avo/dashboards/chartkick_card.rb +1 -1
  51. data/lib/avo/licensing/pro_license.rb +0 -1
  52. data/lib/avo/version.rb +1 -1
  53. data/lib/generators/avo/base_generator.rb +5 -1
  54. data/lib/generators/avo/tailwindcss/install_generator.rb +54 -0
  55. data/lib/generators/avo/templates/initializer/avo.tt +0 -15
  56. data/lib/generators/avo/templates/tailwindcss/Procfile.dev +2 -0
  57. data/lib/generators/avo/templates/tailwindcss/avo.tailwind.css +13 -0
  58. data/lib/tasks/avo_tasks.rake +8 -8
  59. data/lib/tasks/tailwindcss_rails.rake +24 -0
  60. data/public/avo-assets/{avo.css → avo.base.css} +284 -298
  61. data/public/avo-assets/{avo.js → avo.base.js} +3 -3
  62. data/public/avo-assets/{avo.js.map → avo.base.js.map} +3 -3
  63. metadata +19 -9
  64. data/app/views/avo/partials/_branding.html.erb +0 -5
  65. data/lib/avo/configuration/branding.rb +0 -70
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: avo
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.14.3.pre.1.branding
4
+ version: 2.14.3.pre.2.tailwindcss
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adrian Marin
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2022-08-30 00:00:00.000000000 Z
12
+ date: 2022-08-31 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -263,7 +263,7 @@ files:
263
263
  - README.md
264
264
  - Rakefile
265
265
  - app/assets/config/avo_manifest.js
266
- - app/assets/stylesheets/avo.css
266
+ - app/assets/stylesheets/avo.base.css
267
267
  - app/assets/stylesheets/css/active-storage.css
268
268
  - app/assets/stylesheets/css/breadcrumbs.css
269
269
  - app/assets/stylesheets/css/buttons.css
@@ -1384,6 +1384,7 @@ files:
1384
1384
  - app/components/avo/base_component.rb
1385
1385
  - app/components/avo/blank_field_component.html.erb
1386
1386
  - app/components/avo/blank_field_component.rb
1387
+ - app/components/avo/button_component.html.erb
1387
1388
  - app/components/avo/button_component.rb
1388
1389
  - app/components/avo/card_component.html.erb
1389
1390
  - app/components/avo/card_component.rb
@@ -1641,10 +1642,12 @@ files:
1641
1642
  - app/controllers/avo/reorder_controller.rb
1642
1643
  - app/controllers/avo/resources_controller.rb
1643
1644
  - app/controllers/avo/search_controller.rb
1645
+ - app/helpers/avo/actions_helper.rb
1644
1646
  - app/helpers/avo/application_helper.rb
1647
+ - app/helpers/avo/attachments_helper.rb
1645
1648
  - app/helpers/avo/resources_helper.rb
1646
1649
  - app/helpers/avo/url_helpers.rb
1647
- - app/javascript/avo.js
1650
+ - app/javascript/avo.base.js
1648
1651
  - app/javascript/js/active-storage.js
1649
1652
  - app/javascript/js/application.js
1650
1653
  - app/javascript/js/controllers.js
@@ -1709,7 +1712,6 @@ files:
1709
1712
  - app/views/avo/home/failed_to_load.html copy.erb
1710
1713
  - app/views/avo/home/failed_to_load.html.erb
1711
1714
  - app/views/avo/home/index.html.erb
1712
- - app/views/avo/partials/_branding.html.erb
1713
1715
  - app/views/avo/partials/_custom_tools_alert.html.erb
1714
1716
  - app/views/avo/partials/_footer.html.erb
1715
1717
  - app/views/avo/partials/_global_search.html.erb
@@ -1728,6 +1730,11 @@ files:
1728
1730
  - app/views/avo/private/design.html.erb
1729
1731
  - app/views/avo/sidebar/_license_warning.html.erb
1730
1732
  - app/views/avo/sidebar/_license_warnings.html.erb
1733
+ - app/views/kaminari/_first_page.html.erb
1734
+ - app/views/kaminari/_last_page.html.erb
1735
+ - app/views/kaminari/_next_page.html.erb
1736
+ - app/views/kaminari/_page.html.erb
1737
+ - app/views/kaminari/_prev_page.html.erb
1731
1738
  - app/views/layouts/avo/_filter_wrapper.html.erb
1732
1739
  - app/views/layouts/avo/application.html.erb
1733
1740
  - avo.gemspec
@@ -1761,7 +1768,6 @@ files:
1761
1768
  - lib/avo/concerns/is_resource_item.rb
1762
1769
  - lib/avo/concerns/model_class_constantized.rb
1763
1770
  - lib/avo/configuration.rb
1764
- - lib/avo/configuration/branding.rb
1765
1771
  - lib/avo/configuration/resource_configuration.rb
1766
1772
  - lib/avo/dashboards/base_dashboard.rb
1767
1773
  - lib/avo/dashboards/base_divider.rb
@@ -1885,6 +1891,7 @@ files:
1885
1891
  - lib/generators/avo/named_base_generator.rb
1886
1892
  - lib/generators/avo/resource_generator.rb
1887
1893
  - lib/generators/avo/resource_tool_generator.rb
1894
+ - lib/generators/avo/tailwindcss/install_generator.rb
1888
1895
  - lib/generators/avo/templates/action.tt
1889
1896
  - lib/generators/avo/templates/cards/chartkick_card.tt
1890
1897
  - lib/generators/avo/templates/cards/chartkick_card_sample.tt
@@ -1916,15 +1923,18 @@ files:
1916
1923
  - lib/generators/avo/templates/resource_tools/partial.tt
1917
1924
  - lib/generators/avo/templates/resource_tools/resource_tool.tt
1918
1925
  - lib/generators/avo/templates/standalone_action.tt
1926
+ - lib/generators/avo/templates/tailwindcss/Procfile.dev
1927
+ - lib/generators/avo/templates/tailwindcss/avo.tailwind.css
1919
1928
  - lib/generators/avo/templates/tool/controller.tt
1920
1929
  - lib/generators/avo/templates/tool/sidebar_item.tt
1921
1930
  - lib/generators/avo/templates/tool/view.tt
1922
1931
  - lib/generators/avo/tool_generator.rb
1923
1932
  - lib/generators/avo/version_generator.rb
1924
1933
  - lib/tasks/avo_tasks.rake
1925
- - public/avo-assets/avo.css
1926
- - public/avo-assets/avo.js
1927
- - public/avo-assets/avo.js.map
1934
+ - lib/tasks/tailwindcss_rails.rake
1935
+ - public/avo-assets/avo.base.css
1936
+ - public/avo-assets/avo.base.js
1937
+ - public/avo-assets/avo.base.js.map
1928
1938
  - public/avo-assets/fonts/inter-v7-latin-500.eot
1929
1939
  - public/avo-assets/fonts/inter-v7-latin-500.svg
1930
1940
  - public/avo-assets/fonts/inter-v7-latin-500.ttf
@@ -1,5 +0,0 @@
1
- <style>
2
- :root {
3
- <%= Avo.configuration.branding.css_colors %>
4
- }
5
- </style>
@@ -1,70 +0,0 @@
1
- class Avo::Configuration::Branding
2
- def initialize(colors: nil, chart_colors: nil, logo: nil, logomark: nil)
3
- @colors = colors
4
- @chart_colors = chart_colors
5
- @logo = logo
6
- @logomark = logomark
7
-
8
- @default_colors = {
9
- background: "#F6F6F7",
10
- 100 => "206 231 248",
11
- 400 => "57 158 229",
12
- 500 => "8 134 222",
13
- 600 => "6 107 178"
14
- }
15
- @default_chart_colors = ["#0B8AE2", "#34C683", "#2AB1EE", "#34C6A8"]
16
- @default_logo = "/avo-assets/logo.png"
17
- @default_logomark = "/avo-assets/logomark.png"
18
- end
19
-
20
- def css_colors
21
- rgb_colors.map do |color, value|
22
- if color == :background
23
- "--color-application-#{color}: #{value};"
24
- else
25
- "--color-primary-#{color}: #{value};"
26
- end
27
- end.join("\n")
28
- end
29
-
30
- def logo
31
- return @default_logo if Avo::App.license.lacks_with_trial(:branding)
32
-
33
- @logo || @default_logo
34
- end
35
-
36
- def logomark
37
- return @default_logomark if Avo::App.license.lacks_with_trial(:branding)
38
-
39
- @logomark || @default_logomark
40
- end
41
-
42
- def chart_colors
43
- return @default_chart_colors if Avo::App.license.lacks_with_trial(:branding)
44
-
45
- @chart_colors || @default_chart_colors
46
- end
47
-
48
- private
49
-
50
- def colors
51
- return @default_colors if Avo::App.license.lacks_with_trial(:branding)
52
-
53
- @default_colors.merge(@colors) || @default_colors
54
- end
55
-
56
- def rgb_colors
57
- colors.map do |key, value|
58
- rgb_value = is_hex?(value) ? hex_to_rgb(value) : value
59
- [key, rgb_value]
60
- end.to_h
61
- end
62
-
63
- def is_hex?(value)
64
- value.include? "#"
65
- end
66
-
67
- def hex_to_rgb(value)
68
- value.to_s.match(/^#(..)(..)(..)$/).captures.map(&:hex).join(" ")
69
- end
70
- end