beyond_canvas 0.13.1.pre → 0.15.3.pre

Sign up to get free protection for your applications and to get access to all the features.
Files changed (111) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/images/icons/checkbox_checked.svg +1 -0
  3. data/app/assets/images/icons/checkbox_unchecked.svg +1 -0
  4. data/app/assets/images/icons/file.svg +1 -0
  5. data/app/assets/images/icons/flash_checkbox.svg +1 -0
  6. data/app/assets/images/icons/flash_close.svg +1 -0
  7. data/app/assets/images/icons/flash_error.svg +1 -0
  8. data/app/assets/images/icons/flash_info.svg +1 -0
  9. data/app/assets/images/icons/flash_warning.svg +1 -0
  10. data/app/assets/images/icons/radiobutton_checked.svg +1 -0
  11. data/app/assets/images/icons/radiobutton_unchecked.svg +1 -0
  12. data/app/assets/javascripts/beyond_canvas/base.js +255 -0
  13. data/app/assets/stylesheets/beyond_canvas/base.scss +28 -0
  14. data/app/assets/stylesheets/beyond_canvas/components/_actions.scss +6 -0
  15. data/app/assets/stylesheets/beyond_canvas/components/_buttons.scss +112 -0
  16. data/app/assets/stylesheets/beyond_canvas/components/_cards.scss +34 -0
  17. data/app/assets/stylesheets/beyond_canvas/components/_comments.scss +6 -0
  18. data/app/assets/stylesheets/beyond_canvas/components/_containers.scss +37 -0
  19. data/app/assets/stylesheets/beyond_canvas/components/_flash.scss +66 -0
  20. data/app/assets/stylesheets/beyond_canvas/components/_forms.scss +43 -0
  21. data/app/assets/stylesheets/beyond_canvas/components/_inputs.scss +143 -0
  22. data/app/assets/stylesheets/beyond_canvas/components/_layouts.scss +7 -0
  23. data/app/assets/stylesheets/beyond_canvas/components/_links.scss +17 -0
  24. data/app/assets/stylesheets/beyond_canvas/components/_main.scss +39 -0
  25. data/app/assets/stylesheets/beyond_canvas/components/_margins.scss +9 -0
  26. data/app/assets/stylesheets/beyond_canvas/components/_markdown.scss +74 -0
  27. data/app/assets/stylesheets/beyond_canvas/components/_notices.scss +58 -0
  28. data/app/assets/stylesheets/beyond_canvas/components/_relative.scss +3 -0
  29. data/app/assets/stylesheets/beyond_canvas/components/_spinner.scss +48 -0
  30. data/app/assets/stylesheets/beyond_canvas/components/_tables.scss +31 -0
  31. data/app/assets/stylesheets/beyond_canvas/components/_texts.scss +7 -0
  32. data/app/assets/stylesheets/beyond_canvas/mailer.scss +5 -0
  33. data/app/assets/stylesheets/beyond_canvas/settings/_breakpoints.scss +6 -0
  34. data/app/assets/stylesheets/beyond_canvas/settings/{_reset_css.sass → _reset_css.scss} +29 -21
  35. data/app/assets/stylesheets/beyond_canvas/settings/_typography.scss +67 -0
  36. data/app/assets/stylesheets/beyond_canvas/settings/_variables.scss +171 -0
  37. data/app/assets/stylesheets/beyond_canvas/utilities/_functions.scss +15 -0
  38. data/app/assets/stylesheets/beyond_canvas/utilities/_mixins.scss +24 -0
  39. data/app/controllers/beyond_canvas/application_controller.rb +1 -1
  40. data/app/controllers/beyond_canvas/system_controller.rb +1 -1
  41. data/app/controllers/concerns/beyond_canvas/locale_management.rb +4 -4
  42. data/app/controllers/concerns/beyond_canvas/request_validation.rb +8 -6
  43. data/app/controllers/concerns/beyond_canvas/status_codes.rb +5 -3
  44. data/app/form_builders/beyond_canvas/form_builder.rb +74 -13
  45. data/app/helpers/beyond_canvas/application_helper.rb +17 -18
  46. data/app/helpers/beyond_canvas/locale_switch_helper.rb +1 -1
  47. data/app/javascript/beyond_canvas/base.js +3 -0
  48. data/app/javascript/beyond_canvas/initializers/buttons.js +54 -0
  49. data/app/javascript/beyond_canvas/initializers/flash.js +19 -0
  50. data/app/javascript/beyond_canvas/initializers/functions.js +41 -0
  51. data/app/javascript/beyond_canvas/initializers/inputs.js +34 -0
  52. data/app/views/beyond_canvas/custom/_public_head.html.erb +1 -0
  53. data/app/views/beyond_canvas/locales/_edit.html.erb +8 -0
  54. data/app/views/beyond_canvas/mailer/_header.html.erb +2 -2
  55. data/app/views/beyond_canvas/shared/_flash.html.erb +13 -0
  56. data/app/views/beyond_canvas/shared/_head.html.erb +29 -0
  57. data/app/views/beyond_canvas/shared/_logo.html.erb +2 -0
  58. data/app/views/layouts/beyond_canvas/public.html.erb +16 -0
  59. data/config/initializers/beyond_canvas/filter_parameter_logging.rb +5 -5
  60. data/lib/beyond_canvas.rb +12 -17
  61. data/lib/beyond_canvas/asset_registration.rb +29 -0
  62. data/lib/beyond_canvas/configuration.rb +27 -0
  63. data/lib/beyond_canvas/engine.rb +10 -1
  64. data/lib/beyond_canvas/version.rb +1 -1
  65. data/lib/generators/beyond_canvas/assets/assets_generator.rb +14 -0
  66. data/lib/generators/beyond_canvas/assets/templates/beyond_canvas.js +1 -0
  67. data/lib/generators/beyond_canvas/assets/templates/beyond_canvas.scss +1 -0
  68. data/lib/generators/beyond_canvas/{install_generator.rb → beyond_api/beyond_api_generator.rb} +1 -7
  69. data/lib/generators/beyond_canvas/{custom_styles_generator.rb → custom_styles/custom_styles_generator.rb} +2 -2
  70. data/lib/generators/{templates → beyond_canvas/custom_styles/templates}/beyond_canvas_custom_styles.sass +0 -0
  71. data/lib/generators/beyond_canvas/install/install_generator.rb +35 -0
  72. data/lib/generators/beyond_canvas/install/templates/beyond_canvas.rb.erb +40 -0
  73. data/lib/generators/beyond_canvas/webpacker/plugins/jquery.js +7 -0
  74. data/lib/generators/beyond_canvas/webpacker/templates/beyond_canvas.js +3 -0
  75. data/lib/generators/beyond_canvas/webpacker/templates/beyond_canvas.scss +1 -0
  76. data/lib/generators/beyond_canvas/webpacker/webpacker_generator.rb +26 -0
  77. metadata +93 -69
  78. data/app/assets/javascripts/beyond_canvas.js +0 -3
  79. data/app/assets/javascripts/beyond_canvas/buttons.js +0 -67
  80. data/app/assets/javascripts/beyond_canvas/flash.js +0 -24
  81. data/app/assets/javascripts/beyond_canvas/inputs.js +0 -28
  82. data/app/assets/stylesheets/beyond_canvas.sass +0 -25
  83. data/app/assets/stylesheets/beyond_canvas/components/_actions.sass +0 -5
  84. data/app/assets/stylesheets/beyond_canvas/components/_buttons.sass +0 -86
  85. data/app/assets/stylesheets/beyond_canvas/components/_cards.sass +0 -26
  86. data/app/assets/stylesheets/beyond_canvas/components/_comments.sass +0 -5
  87. data/app/assets/stylesheets/beyond_canvas/components/_flash.sass +0 -51
  88. data/app/assets/stylesheets/beyond_canvas/components/_forms.sass +0 -32
  89. data/app/assets/stylesheets/beyond_canvas/components/_inputs.sass +0 -79
  90. data/app/assets/stylesheets/beyond_canvas/components/_layouts.sass +0 -5
  91. data/app/assets/stylesheets/beyond_canvas/components/_links.sass +0 -13
  92. data/app/assets/stylesheets/beyond_canvas/components/_main.sass +0 -28
  93. data/app/assets/stylesheets/beyond_canvas/components/_margins.sass +0 -7
  94. data/app/assets/stylesheets/beyond_canvas/components/_markdown.sass +0 -60
  95. data/app/assets/stylesheets/beyond_canvas/components/_notices.sass +0 -41
  96. data/app/assets/stylesheets/beyond_canvas/components/_relative.sass +0 -2
  97. data/app/assets/stylesheets/beyond_canvas/components/_spinner.sass +0 -38
  98. data/app/assets/stylesheets/beyond_canvas/components/_tables.sass +0 -25
  99. data/app/assets/stylesheets/beyond_canvas/components/_texts.sass +0 -6
  100. data/app/assets/stylesheets/beyond_canvas/mailer.sass +0 -5
  101. data/app/assets/stylesheets/beyond_canvas/settings/_typography.sass +0 -53
  102. data/app/assets/stylesheets/beyond_canvas/settings/_variables.sass +0 -145
  103. data/app/assets/stylesheets/beyond_canvas/utilities/_mixins.sass +0 -19
  104. data/app/views/beyond_canvas/custom/_public_head.html.slim +0 -0
  105. data/app/views/beyond_canvas/locales/_edit.html.slim +0 -6
  106. data/app/views/beyond_canvas/shared/_flash.html.slim +0 -6
  107. data/app/views/beyond_canvas/shared/_head.html.slim +0 -20
  108. data/app/views/beyond_canvas/shared/_logo.html.slim +0 -2
  109. data/app/views/layouts/beyond_canvas/public.html.slim +0 -12
  110. data/config/initializers/beyond_canvas/assets.rb +0 -5
  111. data/lib/generators/templates/beyond_canvas.rb +0 -20
metadata CHANGED
@@ -1,29 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: beyond_canvas
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.13.1.pre
4
+ version: 0.15.3.pre
5
5
  platform: ruby
6
6
  authors:
7
7
  - Unai Abrisketa
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-05-07 00:00:00.000000000 Z
11
+ date: 2020-06-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: beyond_api
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0'
19
+ version: '0.8'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ">="
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '0'
26
+ version: '0.8'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: bourbon
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -81,81 +81,81 @@ dependencies:
81
81
  - !ruby/object:Gem::Version
82
82
  version: '1.5'
83
83
  - !ruby/object:Gem::Dependency
84
- name: rails
84
+ name: jquery-rails
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: 6.0.2
90
- - - ">="
91
- - !ruby/object:Gem::Version
92
- version: 6.0.2.1
89
+ version: '4.4'
93
90
  type: :runtime
94
91
  prerelease: false
95
92
  version_requirements: !ruby/object:Gem::Requirement
96
93
  requirements:
97
94
  - - "~>"
98
95
  - !ruby/object:Gem::Version
99
- version: 6.0.2
100
- - - ">="
101
- - !ruby/object:Gem::Version
102
- version: 6.0.2.1
96
+ version: '4.4'
103
97
  - !ruby/object:Gem::Dependency
104
- name: sassc-rails
98
+ name: premailer-rails
105
99
  requirement: !ruby/object:Gem::Requirement
106
100
  requirements:
107
101
  - - "~>"
108
102
  - !ruby/object:Gem::Version
109
- version: '2.1'
103
+ version: '1.11'
110
104
  type: :runtime
111
105
  prerelease: false
112
106
  version_requirements: !ruby/object:Gem::Requirement
113
107
  requirements:
114
108
  - - "~>"
115
109
  - !ruby/object:Gem::Version
116
- version: '2.1'
110
+ version: '1.11'
117
111
  - !ruby/object:Gem::Dependency
118
- name: slim-rails
112
+ name: sassc-rails
119
113
  requirement: !ruby/object:Gem::Requirement
120
114
  requirements:
121
115
  - - "~>"
122
116
  - !ruby/object:Gem::Version
123
- version: '3.2'
117
+ version: '2.1'
124
118
  type: :runtime
125
119
  prerelease: false
126
120
  version_requirements: !ruby/object:Gem::Requirement
127
121
  requirements:
128
122
  - - "~>"
129
123
  - !ruby/object:Gem::Version
130
- version: '3.2'
124
+ version: '2.1'
131
125
  - !ruby/object:Gem::Dependency
132
- name: premailer-rails
126
+ name: sprockets
133
127
  requirement: !ruby/object:Gem::Requirement
134
128
  requirements:
135
- - - "~>"
129
+ - - ">="
136
130
  - !ruby/object:Gem::Version
137
- version: '1.11'
131
+ version: '3.0'
132
+ - - "<"
133
+ - !ruby/object:Gem::Version
134
+ version: '4.1'
138
135
  type: :runtime
139
136
  prerelease: false
140
137
  version_requirements: !ruby/object:Gem::Requirement
141
138
  requirements:
142
- - - "~>"
139
+ - - ">="
143
140
  - !ruby/object:Gem::Version
144
- version: '1.11'
141
+ version: '3.0'
142
+ - - "<"
143
+ - !ruby/object:Gem::Version
144
+ version: '4.1'
145
145
  - !ruby/object:Gem::Dependency
146
- name: rubocop
146
+ name: rubocop-rails
147
147
  requirement: !ruby/object:Gem::Requirement
148
148
  requirements:
149
149
  - - "~>"
150
150
  - !ruby/object:Gem::Version
151
- version: 0.80.0
151
+ version: '2.5'
152
152
  type: :development
153
153
  prerelease: false
154
154
  version_requirements: !ruby/object:Gem::Requirement
155
155
  requirements:
156
156
  - - "~>"
157
157
  - !ruby/object:Gem::Version
158
- version: 0.80.0
158
+ version: '2.5'
159
159
  description: |2
160
160
  Beyond Canvas is an open-source framework that provides CSS styles for apps
161
161
  designed and developed for the online shop software Beyond
@@ -169,33 +169,43 @@ files:
169
169
  - README.md
170
170
  - Rakefile
171
171
  - app/assets/config/beyond_canvas_manifest.js
172
- - app/assets/javascripts/beyond_canvas.js
173
- - app/assets/javascripts/beyond_canvas/buttons.js
174
- - app/assets/javascripts/beyond_canvas/flash.js
175
- - app/assets/javascripts/beyond_canvas/inputs.js
176
- - app/assets/stylesheets/beyond_canvas.sass
177
- - app/assets/stylesheets/beyond_canvas/components/_actions.sass
178
- - app/assets/stylesheets/beyond_canvas/components/_buttons.sass
179
- - app/assets/stylesheets/beyond_canvas/components/_cards.sass
180
- - app/assets/stylesheets/beyond_canvas/components/_comments.sass
181
- - app/assets/stylesheets/beyond_canvas/components/_flash.sass
182
- - app/assets/stylesheets/beyond_canvas/components/_forms.sass
183
- - app/assets/stylesheets/beyond_canvas/components/_inputs.sass
184
- - app/assets/stylesheets/beyond_canvas/components/_layouts.sass
185
- - app/assets/stylesheets/beyond_canvas/components/_links.sass
186
- - app/assets/stylesheets/beyond_canvas/components/_main.sass
187
- - app/assets/stylesheets/beyond_canvas/components/_margins.sass
188
- - app/assets/stylesheets/beyond_canvas/components/_markdown.sass
189
- - app/assets/stylesheets/beyond_canvas/components/_notices.sass
190
- - app/assets/stylesheets/beyond_canvas/components/_relative.sass
191
- - app/assets/stylesheets/beyond_canvas/components/_spinner.sass
192
- - app/assets/stylesheets/beyond_canvas/components/_tables.sass
193
- - app/assets/stylesheets/beyond_canvas/components/_texts.sass
194
- - app/assets/stylesheets/beyond_canvas/mailer.sass
195
- - app/assets/stylesheets/beyond_canvas/settings/_reset_css.sass
196
- - app/assets/stylesheets/beyond_canvas/settings/_typography.sass
197
- - app/assets/stylesheets/beyond_canvas/settings/_variables.sass
198
- - app/assets/stylesheets/beyond_canvas/utilities/_mixins.sass
172
+ - app/assets/images/icons/checkbox_checked.svg
173
+ - app/assets/images/icons/checkbox_unchecked.svg
174
+ - app/assets/images/icons/file.svg
175
+ - app/assets/images/icons/flash_checkbox.svg
176
+ - app/assets/images/icons/flash_close.svg
177
+ - app/assets/images/icons/flash_error.svg
178
+ - app/assets/images/icons/flash_info.svg
179
+ - app/assets/images/icons/flash_warning.svg
180
+ - app/assets/images/icons/radiobutton_checked.svg
181
+ - app/assets/images/icons/radiobutton_unchecked.svg
182
+ - app/assets/javascripts/beyond_canvas/base.js
183
+ - app/assets/stylesheets/beyond_canvas/base.scss
184
+ - app/assets/stylesheets/beyond_canvas/components/_actions.scss
185
+ - app/assets/stylesheets/beyond_canvas/components/_buttons.scss
186
+ - app/assets/stylesheets/beyond_canvas/components/_cards.scss
187
+ - app/assets/stylesheets/beyond_canvas/components/_comments.scss
188
+ - app/assets/stylesheets/beyond_canvas/components/_containers.scss
189
+ - app/assets/stylesheets/beyond_canvas/components/_flash.scss
190
+ - app/assets/stylesheets/beyond_canvas/components/_forms.scss
191
+ - app/assets/stylesheets/beyond_canvas/components/_inputs.scss
192
+ - app/assets/stylesheets/beyond_canvas/components/_layouts.scss
193
+ - app/assets/stylesheets/beyond_canvas/components/_links.scss
194
+ - app/assets/stylesheets/beyond_canvas/components/_main.scss
195
+ - app/assets/stylesheets/beyond_canvas/components/_margins.scss
196
+ - app/assets/stylesheets/beyond_canvas/components/_markdown.scss
197
+ - app/assets/stylesheets/beyond_canvas/components/_notices.scss
198
+ - app/assets/stylesheets/beyond_canvas/components/_relative.scss
199
+ - app/assets/stylesheets/beyond_canvas/components/_spinner.scss
200
+ - app/assets/stylesheets/beyond_canvas/components/_tables.scss
201
+ - app/assets/stylesheets/beyond_canvas/components/_texts.scss
202
+ - app/assets/stylesheets/beyond_canvas/mailer.scss
203
+ - app/assets/stylesheets/beyond_canvas/settings/_breakpoints.scss
204
+ - app/assets/stylesheets/beyond_canvas/settings/_reset_css.scss
205
+ - app/assets/stylesheets/beyond_canvas/settings/_typography.scss
206
+ - app/assets/stylesheets/beyond_canvas/settings/_variables.scss
207
+ - app/assets/stylesheets/beyond_canvas/utilities/_functions.scss
208
+ - app/assets/stylesheets/beyond_canvas/utilities/_mixins.scss
199
209
  - app/controllers/beyond_canvas/application_controller.rb
200
210
  - app/controllers/beyond_canvas/system_controller.rb
201
211
  - app/controllers/concerns/beyond_canvas/locale_management.rb
@@ -204,28 +214,42 @@ files:
204
214
  - app/form_builders/beyond_canvas/form_builder.rb
205
215
  - app/helpers/beyond_canvas/application_helper.rb
206
216
  - app/helpers/beyond_canvas/locale_switch_helper.rb
207
- - app/views/beyond_canvas/custom/_public_head.html.slim
208
- - app/views/beyond_canvas/locales/_edit.html.slim
217
+ - app/javascript/beyond_canvas/base.js
218
+ - app/javascript/beyond_canvas/initializers/buttons.js
219
+ - app/javascript/beyond_canvas/initializers/flash.js
220
+ - app/javascript/beyond_canvas/initializers/functions.js
221
+ - app/javascript/beyond_canvas/initializers/inputs.js
222
+ - app/views/beyond_canvas/custom/_public_head.html.erb
223
+ - app/views/beyond_canvas/locales/_edit.html.erb
209
224
  - app/views/beyond_canvas/mailer/_button.html.erb
210
225
  - app/views/beyond_canvas/mailer/_footer.html.erb
211
226
  - app/views/beyond_canvas/mailer/_header.html.erb
212
227
  - app/views/beyond_canvas/mailer/_text.html.erb
213
- - app/views/beyond_canvas/shared/_flash.html.slim
214
- - app/views/beyond_canvas/shared/_head.html.slim
215
- - app/views/beyond_canvas/shared/_logo.html.slim
228
+ - app/views/beyond_canvas/shared/_flash.html.erb
229
+ - app/views/beyond_canvas/shared/_head.html.erb
230
+ - app/views/beyond_canvas/shared/_logo.html.erb
216
231
  - app/views/layouts/beyond_canvas/mailer.html.erb
217
- - app/views/layouts/beyond_canvas/public.html.slim
218
- - config/initializers/beyond_canvas/assets.rb
232
+ - app/views/layouts/beyond_canvas/public.html.erb
219
233
  - config/initializers/beyond_canvas/filter_parameter_logging.rb
220
234
  - config/initializers/beyond_canvas/form_utils.rb
221
235
  - config/routes.rb
222
236
  - lib/beyond_canvas.rb
237
+ - lib/beyond_canvas/asset_registration.rb
238
+ - lib/beyond_canvas/configuration.rb
223
239
  - lib/beyond_canvas/engine.rb
224
240
  - lib/beyond_canvas/version.rb
225
- - lib/generators/beyond_canvas/custom_styles_generator.rb
226
- - lib/generators/beyond_canvas/install_generator.rb
227
- - lib/generators/templates/beyond_canvas.rb
228
- - lib/generators/templates/beyond_canvas_custom_styles.sass
241
+ - lib/generators/beyond_canvas/assets/assets_generator.rb
242
+ - lib/generators/beyond_canvas/assets/templates/beyond_canvas.js
243
+ - lib/generators/beyond_canvas/assets/templates/beyond_canvas.scss
244
+ - lib/generators/beyond_canvas/beyond_api/beyond_api_generator.rb
245
+ - lib/generators/beyond_canvas/custom_styles/custom_styles_generator.rb
246
+ - lib/generators/beyond_canvas/custom_styles/templates/beyond_canvas_custom_styles.sass
247
+ - lib/generators/beyond_canvas/install/install_generator.rb
248
+ - lib/generators/beyond_canvas/install/templates/beyond_canvas.rb.erb
249
+ - lib/generators/beyond_canvas/webpacker/plugins/jquery.js
250
+ - lib/generators/beyond_canvas/webpacker/templates/beyond_canvas.js
251
+ - lib/generators/beyond_canvas/webpacker/templates/beyond_canvas.scss
252
+ - lib/generators/beyond_canvas/webpacker/webpacker_generator.rb
229
253
  homepage: https://github.com/ePages-de/beyond_canvas
230
254
  licenses:
231
255
  - MIT
@@ -238,14 +262,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
238
262
  requirements:
239
263
  - - ">="
240
264
  - !ruby/object:Gem::Version
241
- version: '0'
265
+ version: '2.5'
242
266
  required_rubygems_version: !ruby/object:Gem::Requirement
243
267
  requirements:
244
268
  - - ">"
245
269
  - !ruby/object:Gem::Version
246
270
  version: 1.3.1
247
271
  requirements: []
248
- rubygems_version: 3.0.3
272
+ rubygems_version: 3.0.1
249
273
  signing_key:
250
274
  specification_version: 4
251
275
  summary: Open-source framework that provides CSS styles
@@ -1,3 +0,0 @@
1
- //= require beyond_canvas/buttons
2
- //= require beyond_canvas/flash
3
- //= require beyond_canvas/inputs
@@ -1,67 +0,0 @@
1
- const SPINNER_ANIMATION_TIMEOUT = 125;
2
-
3
- (function($) {
4
- $(document).on('click', '[class^="button"]', function() {
5
- disableActionElements();
6
- showSpinner($(this));
7
- });
8
-
9
- $(document).on('ready page:load turbolinks:load', function() {
10
- $('button[class^="button"]').each(function() {
11
- var button = $(this);
12
-
13
- // Add width attribute and save old width
14
- button.width(button.width());
15
- button.data('oldWidth', button.width());
16
-
17
- // Add the spinner
18
- button.prepend(`
19
- <div class="spinner">
20
- <div class="bounce1"></div>
21
- <div class="bounce2"></div>
22
- <div class="bounce3"></div>
23
- </div>`);
24
-
25
- // Bind ajax:success and ajax:error to the form the button belongs to
26
- button
27
- .closest('form')
28
- .on('ajax:success', function() {
29
- hideSpinner(button);
30
- enableActionElements();
31
- })
32
- .on('ajax:error', function() {
33
- hideSpinner(button);
34
- enableActionElements();
35
- });
36
- });
37
- });
38
- })(jQuery);
39
-
40
- function showSpinner(button) {
41
- // Adjust the width of the button
42
- button.width(button.width() + $('.spinner').outerWidth(true));
43
- // Show the spinner
44
- setTimeout(function() {
45
- button.find('.spinner').css('display', 'flex');
46
- }, SPINNER_ANIMATION_TIMEOUT);
47
- }
48
-
49
- function hideSpinner(button) {
50
- setTimeout(function () {
51
- // Hide the spinner
52
- button.find('.spinner').hide();
53
- // Adjust the width of the button
54
- button.width(button.data('oldWidth'));
55
- }, SPINNER_ANIMATION_TIMEOUT);
56
- }
57
-
58
- function disableActionElements() {
59
- $('a, input[type="submit"], input[type="button"], input[type="reset"], button').each(function() {
60
- $(this).addClass('actions--disabled');
61
- });
62
- }
63
- function enableActionElements() {
64
- $('a, input[type="submit"], input[type="button"], input[type="reset"], button').each(function() {
65
- $(this).removeClass("actions--disabled");
66
- });
67
- }
@@ -1,24 +0,0 @@
1
- (function($) {
2
- $(document).on('click', '.flash', function() {
3
- closeAlert();
4
- });
5
-
6
- $(document).on('ready page:load turbolinks:load', function() {
7
- $('.flash').each(function() {
8
- $(this).css('right', -$(this).width() + 'px');
9
- });
10
-
11
- setTimeout(function() {
12
- $('.flash').addClass('flash--shown');
13
- }, 100);
14
- });
15
- })(jQuery);
16
-
17
- function closeAlert() {
18
- $('.flash')
19
- .removeClass('flash--shown')
20
- .delay(700)
21
- .queue(function() {
22
- $(this).remove();
23
- });
24
- }
@@ -1,28 +0,0 @@
1
- (function($) {
2
- $(document).on('ready page:load turbolinks:load', function() {
3
- $('input[type="file"]').each(function() {
4
- var $input = $(this),
5
- $label = $(`.input__file__text.${$input.attr('id')}`),
6
- labelVal = $label.html();
7
-
8
- $input.on('change', function(e) {
9
- var fileName = '';
10
-
11
- if (this.files && this.files.length > 1)
12
- fileName = (this.getAttribute('data-multiple-caption') || '').replace('{count}', this.files.length);
13
- else if (e.target.value)
14
- fileName = e.target.value.split('\\').pop();
15
-
16
- if (fileName)
17
- $label.html(`<i class="far fa-file input__file__icon"></i>${fileName}`);
18
- else
19
- $label.html(labelVal);
20
- });
21
-
22
- // Firefox bug fix
23
- $input
24
- .on('focus', function() { $input.addClass('has-focus'); })
25
- .on('blur', function() { $input.removeClass('has-focus'); });
26
- });
27
- });
28
- })(jQuery);
@@ -1,25 +0,0 @@
1
- @import 'bourbon'
2
-
3
- @import 'beyond_canvas/settings/variables'
4
- @import 'beyond_canvas/settings/reset_css'
5
- @import 'beyond_canvas/settings/typography'
6
-
7
- @import 'beyond_canvas/utilities/mixins'
8
-
9
- @import 'beyond_canvas/components/actions'
10
- @import 'beyond_canvas/components/buttons'
11
- @import 'beyond_canvas/components/cards'
12
- @import 'beyond_canvas/components/comments'
13
- @import 'beyond_canvas/components/flash'
14
- @import 'beyond_canvas/components/forms'
15
- @import 'beyond_canvas/components/inputs'
16
- @import 'beyond_canvas/components/layouts'
17
- @import 'beyond_canvas/components/links'
18
- @import 'beyond_canvas/components/main'
19
- @import 'beyond_canvas/components/margins'
20
- @import 'beyond_canvas/components/notices'
21
- @import 'beyond_canvas/components/relative'
22
- @import 'beyond_canvas/components/tables'
23
- @import 'beyond_canvas/components/spinner'
24
- @import 'beyond_canvas/components/texts'
25
- @import 'beyond_canvas/components/markdown'
@@ -1,5 +0,0 @@
1
- .actions
2
-
3
- &--disabled
4
- cursor: not-allowed
5
- pointer-events: none
@@ -1,86 +0,0 @@
1
- %button
2
- +padding($button-padding)
3
- @if $button-box-shadow != true
4
- padding-top: 7px
5
- align-items: center
6
- border-radius: $button-border-radius
7
- border-width: 1px
8
- border-style: solid
9
- cursor: pointer
10
- display: flex
11
- font-weight: $button-font-weight
12
- justify-content: flex-end
13
- line-height: 1
14
- outline: none
15
- transition: $main-transition
16
-
17
- @mixin button-solid($background, $color)
18
- +background-color-darken($background, 10%)
19
- color: $color
20
-
21
- .spinner
22
- display: none
23
-
24
- > div
25
- background-color: $color
26
-
27
- &:hover
28
- border-color: darken($background, 10%)
29
-
30
- @mixin button-transparent($background)
31
- background-color: transparent
32
- border-color: $background
33
- color: $background
34
-
35
- .spinner
36
- display: none
37
-
38
- > div
39
- background-color: $background
40
-
41
- &:hover
42
- background-color: lighten($background, 40%)
43
-
44
- @mixin button-border($background)
45
- border-color: $background
46
-
47
- @if $button-box-shadow == true
48
- border-bottom-width: 2px
49
- border-bottom-color: darken($background, 10%)
50
-
51
-
52
- .button
53
-
54
- &__solid
55
-
56
- &--primary
57
- @extend %button
58
- +button-solid($button-primary-background, $button-primary-color)
59
- +button-border($button-primary-background)
60
-
61
- &--secondary
62
- @extend %button
63
- +button-solid($button-secondary-background, $button-secondary-color)
64
- +button-border($button-secondary-background)
65
-
66
- &--danger
67
- @extend %button
68
- +button-solid($button-danger-background, $button-danger-color)
69
- +button-border($button-danger-background)
70
-
71
- &__transparent
72
-
73
- &--primary
74
- @extend %button
75
- +button-transparent($button-primary-background)
76
- +button-border($button-primary-background)
77
-
78
- &--secondary
79
- @extend %button
80
- +button-transparent($button-secondary-background)
81
- +button-border($button-secondary-background)
82
-
83
- &--danger
84
- @extend %button
85
- +button-transparent($button-danger-background)
86
- +button-border($button-danger-background)