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
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b251444a9c8422914b644276a9092df58d0678f2b26afacf1460b2a9505ad833
4
- data.tar.gz: c7fe8d4689dca6b5c23a967619e59f72a615e1a42f908b5fda345a7e0b8d4c72
3
+ metadata.gz: 3c99bc0b145e7d7bf5e4bfa4c34bc419905684a3042c6c271c9c18841a154f95
4
+ data.tar.gz: 881dcf747b8a6c24abc2412286b127dfd92f538bbd59fe190877cc7ffb384b31
5
5
  SHA512:
6
- metadata.gz: 31ed5d0a6dbce63e91ccfbc240e4bbb2a3b835bebe2f1735b9a3e4491b7e87cec02e7bbd03809838494a2dcdf66879f1ca17f60a4feb05431e695475e0b9776b
7
- data.tar.gz: 2a9e47666a44a7d4c8782c9a6f9bca1b15d68a271302ef765155106d8039c95d855e4cff7095584f4c1dc827c2424dddd7fae7deec4befb28ba3be7950c1d937
6
+ metadata.gz: 26a751147067f809f2a9b7cb52835a0125cf1426eb9873b5e67534d515f1c05080640dcbeb6ec4cf099e026dd3d8d207c2a7714aab26d7d33d6c2b9954b6b233
7
+ data.tar.gz: c070ae8eee82ea3679ed8e1703fc6151b3404dfe8f8cd4e35b89a7bb004d58e17706e5aff7553533a82c10f5dad5d180737c5022b544a78d169f7e75397f2a1f
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" style="background: #ffffff;" width="16" height="16" viewBox="0 0 24 24"><path fill="#97C344" d="M0 0v24h24V0H0zm9.6 18.4l-5.8-5.6 2-2.1 3.7 3.6L18 5.6l2.1 2.1L9.6 18.4z"></path></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" style="background: #ffff;" width="16" height="16" viewBox="0 0 24 24"><path fill="#c2bf9d" d="M0 0v24h24V0H0zm21.5 21.5h-19v-19h19v19z"></path></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M15 2v5h5v15h-16v-20h11zm1-2h-14v24h20v-18l-6-6z"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm-1.959 17l-4.5-4.319 1.395-1.435 3.08 2.937 7.021-7.183 1.422 1.409-8.418 8.591z"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M24 20.188l-8.315-8.209 8.2-8.282-3.697-3.697-8.212 8.318-8.31-8.203-3.666 3.666 8.321 8.24-8.206 8.313 3.666 3.666 8.237-8.318 8.285 8.203z"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm6 16.538l-4.592-4.548 4.546-4.587-1.416-1.403-4.545 4.589-4.588-4.543-1.405 1.405 4.593 4.552-4.547 4.592 1.405 1.405 4.555-4.596 4.591 4.55 1.403-1.416z"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M13.25 7c0 .69-.56 1.25-1.25 1.25s-1.25-.56-1.25-1.25.56-1.25 1.25-1.25 1.25.56 1.25 1.25zm10.75 5c0 6.627-5.373 12-12 12s-12-5.373-12-12 5.373-12 12-12 12 5.373 12 12zm-2 0c0-5.514-4.486-10-10-10s-10 4.486-10 10 4.486 10 10 10 10-4.486 10-10zm-13-2v2h2v6h2v-8h-4z"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm-1 6h2v8h-2v-8zm1 12.25c-.69 0-1.25-.56-1.25-1.25s.56-1.25 1.25-1.25 1.25.56 1.25 1.25-.56 1.25-1.25 1.25z"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" style="background: #ffffff;" width="18" height="18" viewBox="0 0 24 24"><path fill="#97C344" d="M12 0C5.4 0 0 5.4 0 12s5.4 12 12 12 12-5.4 12-12S18.6 0 12 0zm0 21.6c-5.3 0-9.6-4.3-9.6-9.6S6.7 2.4 12 2.4s9.6 4.3 9.6 9.6-4.3 9.6-9.6 9.6zm0-15.9c-3.4 0-6.3 2.8-6.3 6.3s2.8 6.2 6.3 6.2 6.2-2.8 6.2-6.2-2.8-6.3-6.2-6.3z"></path></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" style="background: #ffffff;" width="18" height="18" viewBox="0 0 24 24"><path fill="#c2bf9d" d="M12 0C5.4 0 0 5.4 0 12s5.4 12 12 12 12-5.4 12-12S18.6 0 12 0zm0 21.6c-5.3 0-9.6-4.3-9.6-9.6S6.7 2.4 12 2.4s9.6 4.3 9.6 9.6-4.3 9.6-9.6 9.6z"></path></svg>
@@ -0,0 +1,255 @@
1
+ /*!
2
+ *
3
+ * Warning: This file is auto-generated, do not modify. Instead, make your changes in 'app/javascript/beyond_canvas/' and run `yarn build`
4
+ *
5
+ * //= require jquery3
6
+ * //= require_self
7
+ *
8
+ */
9
+ (function(e, a) { for(var i in a) e[i] = a[i]; }(window, /******/ (function(modules) { // webpackBootstrap
10
+ /******/ // The module cache
11
+ /******/ var installedModules = {};
12
+ /******/
13
+ /******/ // The require function
14
+ /******/ function __webpack_require__(moduleId) {
15
+ /******/
16
+ /******/ // Check if module is in cache
17
+ /******/ if(installedModules[moduleId]) {
18
+ /******/ return installedModules[moduleId].exports;
19
+ /******/ }
20
+ /******/ // Create a new module (and put it into the cache)
21
+ /******/ var module = installedModules[moduleId] = {
22
+ /******/ i: moduleId,
23
+ /******/ l: false,
24
+ /******/ exports: {}
25
+ /******/ };
26
+ /******/
27
+ /******/ // Execute the module function
28
+ /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
29
+ /******/
30
+ /******/ // Flag the module as loaded
31
+ /******/ module.l = true;
32
+ /******/
33
+ /******/ // Return the exports of the module
34
+ /******/ return module.exports;
35
+ /******/ }
36
+ /******/
37
+ /******/
38
+ /******/ // expose the modules object (__webpack_modules__)
39
+ /******/ __webpack_require__.m = modules;
40
+ /******/
41
+ /******/ // expose the module cache
42
+ /******/ __webpack_require__.c = installedModules;
43
+ /******/
44
+ /******/ // define getter function for harmony exports
45
+ /******/ __webpack_require__.d = function(exports, name, getter) {
46
+ /******/ if(!__webpack_require__.o(exports, name)) {
47
+ /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
48
+ /******/ }
49
+ /******/ };
50
+ /******/
51
+ /******/ // define __esModule on exports
52
+ /******/ __webpack_require__.r = function(exports) {
53
+ /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
54
+ /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
55
+ /******/ }
56
+ /******/ Object.defineProperty(exports, '__esModule', { value: true });
57
+ /******/ };
58
+ /******/
59
+ /******/ // create a fake namespace object
60
+ /******/ // mode & 1: value is a module id, require it
61
+ /******/ // mode & 2: merge all properties of value into the ns
62
+ /******/ // mode & 4: return value when already ns object
63
+ /******/ // mode & 8|1: behave like require
64
+ /******/ __webpack_require__.t = function(value, mode) {
65
+ /******/ if(mode & 1) value = __webpack_require__(value);
66
+ /******/ if(mode & 8) return value;
67
+ /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
68
+ /******/ var ns = Object.create(null);
69
+ /******/ __webpack_require__.r(ns);
70
+ /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
71
+ /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
72
+ /******/ return ns;
73
+ /******/ };
74
+ /******/
75
+ /******/ // getDefaultExport function for compatibility with non-harmony modules
76
+ /******/ __webpack_require__.n = function(module) {
77
+ /******/ var getter = module && module.__esModule ?
78
+ /******/ function getDefault() { return module['default']; } :
79
+ /******/ function getModuleExports() { return module; };
80
+ /******/ __webpack_require__.d(getter, 'a', getter);
81
+ /******/ return getter;
82
+ /******/ };
83
+ /******/
84
+ /******/ // Object.prototype.hasOwnProperty.call
85
+ /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
86
+ /******/
87
+ /******/ // __webpack_public_path__
88
+ /******/ __webpack_require__.p = "";
89
+ /******/
90
+ /******/
91
+ /******/ // Load entry module and return exports
92
+ /******/ return __webpack_require__(__webpack_require__.s = 1);
93
+ /******/ })
94
+ /************************************************************************/
95
+ /******/ ([
96
+ /* 0 */
97
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
98
+
99
+ "use strict";
100
+ __webpack_require__.r(__webpack_exports__);
101
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "showSpinner", function() { return showSpinner; });
102
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hideSpinner", function() { return hideSpinner; });
103
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "disableActionElements", function() { return disableActionElements; });
104
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "enableActionElements", function() { return enableActionElements; });
105
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "closeAlert", function() { return closeAlert; });
106
+ var SPINNER_ANIMATION_TIMEOUT = 125;
107
+ function showSpinner(button) {
108
+ // Adjust the width of the button
109
+ button.width(button.width() + $('.spinner').outerWidth(true)); // Show the spinner
110
+
111
+ setTimeout(function () {
112
+ button.find('.spinner').css('display', 'flex');
113
+ }, SPINNER_ANIMATION_TIMEOUT);
114
+ }
115
+ function hideSpinner() {
116
+ $('button[class^="button"]').each(function (_, button) {
117
+ setTimeout(function () {
118
+ // Hide the spinner
119
+ $(button).find('.spinner').hide(); // Adjust the width of the button
120
+
121
+ $(button).width($(button).data('oldWidth'));
122
+ }, SPINNER_ANIMATION_TIMEOUT);
123
+ });
124
+ }
125
+ function disableActionElements() {
126
+ $('a, input[type="submit"], input[type="button"], input[type="reset"], button').each(function (_, button) {
127
+ $(button).addClass('actions--disabled');
128
+ });
129
+ }
130
+ function enableActionElements() {
131
+ $('a, input[type="submit"], input[type="button"], input[type="reset"], button').each(function (_, button) {
132
+ $(button).removeClass('actions--disabled');
133
+ });
134
+ }
135
+ function closeAlert() {
136
+ $('.flash').removeClass('flash--shown').delay(700).queue(function () {
137
+ $(this).remove();
138
+ });
139
+ }
140
+
141
+ /***/ }),
142
+ /* 1 */
143
+ /***/ (function(module, exports, __webpack_require__) {
144
+
145
+ __webpack_require__(3);
146
+ module.exports = __webpack_require__(0);
147
+
148
+
149
+ /***/ }),
150
+ /* 2 */
151
+ /***/ (function(module, exports) {
152
+
153
+ (function ($) {
154
+ var onDOMReady = function onDOMReady() {
155
+ $('input[type="file"]').each(function () {
156
+ var $input = $(this),
157
+ $label = $(".input__file__text." + $input.attr('id')),
158
+ labelVal = $label.html();
159
+ $input.on('change', function (e) {
160
+ var fileName = '';
161
+ if (this.files && this.files.length > 1) fileName = (this.getAttribute('data-multiple-caption') || '').replace('{count}', this.files.length);else if (e.target.value) fileName = e.target.value.split('\\').pop();
162
+ if (fileName) $label.html("<svg class=\"input__file__icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path d=\"M15 2v5h5v15h-16v-20h11zm1-2h-14v24h20v-18l-6-6z\"/></svg>" + fileName);else $label.html(labelVal);
163
+ }); // Firefox bug fix
164
+
165
+ $input.on('focus', function () {
166
+ $input.addClass('has-focus');
167
+ }).on('blur', function () {
168
+ $input.removeClass('has-focus');
169
+ });
170
+ });
171
+ };
172
+
173
+ $(document).on('ready page:load turbolinks:load', onDOMReady);
174
+ })(jQuery);
175
+
176
+ /***/ }),
177
+ /* 3 */
178
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
179
+
180
+ "use strict";
181
+ // ESM COMPAT FLAG
182
+ __webpack_require__.r(__webpack_exports__);
183
+
184
+ // EXTERNAL MODULE: ./app/javascript/beyond_canvas/initializers/functions.js
185
+ var functions = __webpack_require__(0);
186
+
187
+ // CONCATENATED MODULE: ./app/javascript/beyond_canvas/initializers/buttons.js
188
+
189
+
190
+ (function ($) {
191
+ var onDOMReady = function onDOMReady() {
192
+ var inputs = $('input, textarea, select').not(':input[type=button], :input[type=submit], :input[type=reset]');
193
+ inputs.each(function () {
194
+ var input = $(this);
195
+ input.bind('invalid', function (e) {
196
+ if ($(input).is(':hidden')) {
197
+ e.preventDefault();
198
+ }
199
+
200
+ Object(functions["hideSpinner"])();
201
+ Object(functions["enableActionElements"])();
202
+ });
203
+ });
204
+ $('button[class^="button"]').each(function () {
205
+ var button = $(this); // Add width attribute and save old width
206
+
207
+ button.width(button.width());
208
+ button.data('oldWidth', button.width()); // Add the spinner
209
+
210
+ button.prepend("\n <div class=\"spinner\">\n <div class=\"bounce1\"></div>\n <div class=\"bounce2\"></div>\n <div class=\"bounce3\"></div>\n </div>"); // Bind ajax:success and ajax:error to the form the button belongs to
211
+
212
+ button.closest('form').on('ajax:success', function () {
213
+ Object(functions["hideSpinner"])();
214
+ Object(functions["enableActionElements"])();
215
+ }).on('ajax:error', function () {
216
+ Object(functions["hideSpinner"])();
217
+ Object(functions["enableActionElements"])();
218
+ });
219
+ });
220
+ };
221
+
222
+ $(document).on('click', '[class^="button"]', function () {
223
+ Object(functions["disableActionElements"])();
224
+ Object(functions["showSpinner"])($(this));
225
+ });
226
+ $(document).on('ready page:load turbolinks:load', onDOMReady);
227
+ })(jQuery);
228
+ // CONCATENATED MODULE: ./app/javascript/beyond_canvas/initializers/flash.js
229
+
230
+
231
+ (function ($) {
232
+ var onDOMReady = function onDOMReady() {
233
+ $('.flash').each(function () {
234
+ $(this).css('right', -$(this).width() + 'px');
235
+ });
236
+ setTimeout(function () {
237
+ $('.flash').addClass('flash--shown');
238
+ }, 100);
239
+ };
240
+
241
+ $(document).on('click', '.flash', function () {
242
+ Object(functions["closeAlert"])();
243
+ });
244
+ $(document).on('ready page:load turbolinks:load', onDOMReady);
245
+ })(jQuery);
246
+ // EXTERNAL MODULE: ./app/javascript/beyond_canvas/initializers/inputs.js
247
+ var initializers_inputs = __webpack_require__(2);
248
+
249
+ // CONCATENATED MODULE: ./app/javascript/beyond_canvas/base.js
250
+
251
+
252
+
253
+
254
+ /***/ })
255
+ /******/ ])));
@@ -0,0 +1,28 @@
1
+ @import "bourbon";
2
+
3
+ @import "settings/breakpoints";
4
+ @import "settings/variables";
5
+ @import "settings/reset_css";
6
+ @import "settings/typography";
7
+
8
+ @import "utilities/functions";
9
+ @import "utilities/mixins";
10
+
11
+ @import "components/actions";
12
+ @import "components/buttons";
13
+ @import "components/cards";
14
+ @import "components/comments";
15
+ @import "components/containers";
16
+ @import "components/flash";
17
+ @import "components/forms";
18
+ @import "components/inputs";
19
+ @import "components/layouts";
20
+ @import "components/links";
21
+ @import "components/main";
22
+ @import "components/margins";
23
+ @import "components/markdown";
24
+ @import "components/notices";
25
+ @import "components/relative";
26
+ @import "components/tables";
27
+ @import "components/spinner";
28
+ @import "components/texts";
@@ -0,0 +1,6 @@
1
+ .actions {
2
+ &--disabled {
3
+ cursor: not-allowed;
4
+ pointer-events: none;
5
+ }
6
+ }
@@ -0,0 +1,112 @@
1
+ %button {
2
+ @include padding($button-padding);
3
+
4
+ @if $button-box-shadow != true {
5
+ padding-top: 7px;
6
+ }
7
+
8
+ align-items: center;
9
+ border-radius: $button-border-radius;
10
+ border-width: 1px;
11
+ border-style: solid;
12
+ cursor: pointer;
13
+ display: flex;
14
+ font-weight: $button-font-weight;
15
+ justify-content: flex-end;
16
+ line-height: 1;
17
+ outline: none;
18
+ transition: $main-transition;
19
+ }
20
+
21
+ @mixin button-solid($background, $color) {
22
+ @include background-color-darken($background, 10%);
23
+
24
+ color: $color;
25
+
26
+ .spinner {
27
+ display: none;
28
+
29
+ > div {
30
+ background-color: $color;
31
+ }
32
+ }
33
+
34
+ &:hover {
35
+ border-color: darken($background, 10%);
36
+ }
37
+ }
38
+
39
+ @mixin button-transparent($background) {
40
+ background-color: transparent;
41
+ border-color: $background;
42
+ color: $background;
43
+
44
+ .spinner {
45
+ display: none;
46
+
47
+ > div {
48
+ background-color: $background;
49
+ }
50
+ }
51
+
52
+ &:hover {
53
+ background-color: lighten($background, 40%);
54
+ }
55
+ }
56
+
57
+ @mixin button-border($background) {
58
+ border-color: $background;
59
+
60
+ @if $button-box-shadow == true {
61
+ border-bottom-width: 2px;
62
+ border-bottom-color: darken($background, 10%);
63
+ }
64
+ }
65
+
66
+ .button {
67
+ &__solid {
68
+ &--primary {
69
+ @extend %button;
70
+
71
+ @include button-solid($button-primary-background, $button-primary-color);
72
+ @include button-border($button-primary-background);
73
+ }
74
+
75
+ &--secondary {
76
+ @extend %button;
77
+
78
+ @include button-solid($button-secondary-background, $button-secondary-color);
79
+ @include button-border($button-secondary-background);
80
+ }
81
+
82
+ &--danger {
83
+ @extend %button;
84
+
85
+ @include button-solid($button-danger-background, $button-danger-color);
86
+ @include button-border($button-danger-background);
87
+ }
88
+ }
89
+
90
+ &__transparent {
91
+ &--primary {
92
+ @extend %button;
93
+
94
+ @include button-transparent($button-primary-background);
95
+ @include button-border($button-primary-background);
96
+ }
97
+
98
+ &--secondary {
99
+ @extend %button;
100
+
101
+ @include button-transparent($button-secondary-background);
102
+ @include button-border($button-secondary-background);
103
+ }
104
+
105
+ &--danger {
106
+ @extend %button;
107
+
108
+ @include button-transparent($button-danger-background);
109
+ @include button-border($button-danger-background);
110
+ }
111
+ }
112
+ }
@@ -0,0 +1,34 @@
1
+ .card {
2
+ background: $white;
3
+ border-radius: $card-border-radius;
4
+ box-shadow: $card-box-shadow;
5
+
6
+ &:not(:last-child) {
7
+ margin-bottom: $card-margin;
8
+ }
9
+
10
+ &--relative {
11
+ position: relative;
12
+ }
13
+
14
+ &--padding {
15
+ @include padding($card-padding);
16
+
17
+ box-sizing: border-box;
18
+ }
19
+
20
+ &__separator {
21
+ @include margin($card-separator-spacing null);
22
+
23
+ border-bottom: 1px solid $card-separator-color;
24
+ left: -#{$card-padding};
25
+ position: relative;
26
+ width: calc(100% + 2 * #{$card-padding});
27
+ }
28
+
29
+ &__headline {
30
+ color: $card-title-color;
31
+ font-size: 20px;
32
+ margin-bottom: 20px;
33
+ }
34
+ }