beyond_canvas 0.13.1.pre → 0.14.0.pre

Sign up to get free protection for your applications and to get access to all the features.
Files changed (101) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/images/icons/file.svg +1 -0
  3. data/app/assets/images/icons/flash_checkbox.svg +1 -0
  4. data/app/assets/images/icons/flash_close.svg +1 -0
  5. data/app/assets/images/icons/flash_error.svg +1 -0
  6. data/app/assets/images/icons/flash_info.svg +1 -0
  7. data/app/assets/images/icons/flash_warning.svg +1 -0
  8. data/app/assets/javascripts/beyond_canvas/base.js +94 -0
  9. data/app/assets/stylesheets/beyond_canvas/base.scss +25 -0
  10. data/app/assets/stylesheets/beyond_canvas/components/_actions.scss +6 -0
  11. data/app/assets/stylesheets/beyond_canvas/components/_buttons.scss +112 -0
  12. data/app/assets/stylesheets/beyond_canvas/components/_cards.scss +34 -0
  13. data/app/assets/stylesheets/beyond_canvas/components/_comments.scss +6 -0
  14. data/app/assets/stylesheets/beyond_canvas/components/_flash.scss +66 -0
  15. data/app/assets/stylesheets/beyond_canvas/components/_forms.scss +43 -0
  16. data/app/assets/stylesheets/beyond_canvas/components/_inputs.scss +97 -0
  17. data/app/assets/stylesheets/beyond_canvas/components/_layouts.scss +7 -0
  18. data/app/assets/stylesheets/beyond_canvas/components/_links.scss +17 -0
  19. data/app/assets/stylesheets/beyond_canvas/components/_main.scss +39 -0
  20. data/app/assets/stylesheets/beyond_canvas/components/_margins.scss +9 -0
  21. data/app/assets/stylesheets/beyond_canvas/components/_markdown.scss +74 -0
  22. data/app/assets/stylesheets/beyond_canvas/components/_notices.scss +58 -0
  23. data/app/assets/stylesheets/beyond_canvas/components/_relative.scss +3 -0
  24. data/app/assets/stylesheets/beyond_canvas/components/_spinner.scss +48 -0
  25. data/app/assets/stylesheets/beyond_canvas/components/_tables.scss +31 -0
  26. data/app/assets/stylesheets/beyond_canvas/components/_texts.scss +7 -0
  27. data/app/assets/stylesheets/beyond_canvas/mailer.scss +5 -0
  28. data/app/assets/stylesheets/beyond_canvas/settings/{_reset_css.sass → _reset_css.scss} +29 -21
  29. data/app/assets/stylesheets/beyond_canvas/settings/_typography.scss +67 -0
  30. data/app/assets/stylesheets/beyond_canvas/settings/_variables.scss +147 -0
  31. data/app/assets/stylesheets/beyond_canvas/utilities/_mixins.scss +24 -0
  32. data/app/controllers/beyond_canvas/application_controller.rb +1 -1
  33. data/app/controllers/beyond_canvas/system_controller.rb +1 -1
  34. data/app/controllers/concerns/beyond_canvas/locale_management.rb +4 -4
  35. data/app/controllers/concerns/beyond_canvas/request_validation.rb +7 -5
  36. data/app/controllers/concerns/beyond_canvas/status_codes.rb +5 -3
  37. data/app/form_builders/beyond_canvas/form_builder.rb +13 -9
  38. data/app/helpers/beyond_canvas/application_helper.rb +17 -18
  39. data/app/helpers/beyond_canvas/locale_switch_helper.rb +1 -1
  40. data/app/javascript/beyond_canvas/base.js +6 -0
  41. data/app/{assets/javascripts/beyond_canvas → javascript/beyond_canvas/initializers}/buttons.js +19 -14
  42. data/app/{assets/javascripts/beyond_canvas → javascript/beyond_canvas/initializers}/flash.js +11 -7
  43. data/app/javascript/beyond_canvas/initializers/inputs.js +39 -0
  44. data/app/views/beyond_canvas/custom/_public_head.html.erb +1 -0
  45. data/app/views/beyond_canvas/locales/_edit.html.erb +8 -0
  46. data/app/views/beyond_canvas/mailer/_header.html.erb +2 -2
  47. data/app/views/beyond_canvas/shared/_flash.html.erb +13 -0
  48. data/app/views/beyond_canvas/shared/_head.html.erb +29 -0
  49. data/app/views/beyond_canvas/shared/_logo.html.erb +2 -0
  50. data/app/views/layouts/beyond_canvas/public.html.erb +16 -0
  51. data/config/initializers/beyond_canvas/filter_parameter_logging.rb +5 -5
  52. data/lib/beyond_canvas.rb +12 -17
  53. data/lib/beyond_canvas/asset_registration.rb +29 -0
  54. data/lib/beyond_canvas/configuration.rb +27 -0
  55. data/lib/beyond_canvas/engine.rb +10 -1
  56. data/lib/beyond_canvas/version.rb +1 -1
  57. data/lib/generators/beyond_canvas/assets/assets_generator.rb +14 -0
  58. data/lib/generators/beyond_canvas/assets/templates/beyond_canvas.js +1 -0
  59. data/lib/generators/beyond_canvas/assets/templates/beyond_canvas.scss +1 -0
  60. data/lib/generators/beyond_canvas/{install_generator.rb → beyond_api/beyond_api_generator.rb} +1 -7
  61. data/lib/generators/beyond_canvas/{custom_styles_generator.rb → custom_styles/custom_styles_generator.rb} +2 -2
  62. data/lib/generators/{templates → beyond_canvas/custom_styles/templates}/beyond_canvas_custom_styles.sass +0 -0
  63. data/lib/generators/beyond_canvas/install/install_generator.rb +35 -0
  64. data/lib/generators/beyond_canvas/install/templates/beyond_canvas.rb.erb +40 -0
  65. data/lib/generators/beyond_canvas/webpacker/plugins/jquery.js +7 -0
  66. data/lib/generators/beyond_canvas/webpacker/templates/beyond_canvas.js +3 -0
  67. data/lib/generators/beyond_canvas/webpacker/templates/beyond_canvas.scss +1 -0
  68. data/lib/generators/beyond_canvas/webpacker/webpacker_generator.rb +26 -0
  69. metadata +86 -70
  70. data/app/assets/javascripts/beyond_canvas.js +0 -3
  71. data/app/assets/javascripts/beyond_canvas/inputs.js +0 -28
  72. data/app/assets/stylesheets/beyond_canvas.sass +0 -25
  73. data/app/assets/stylesheets/beyond_canvas/components/_actions.sass +0 -5
  74. data/app/assets/stylesheets/beyond_canvas/components/_buttons.sass +0 -86
  75. data/app/assets/stylesheets/beyond_canvas/components/_cards.sass +0 -26
  76. data/app/assets/stylesheets/beyond_canvas/components/_comments.sass +0 -5
  77. data/app/assets/stylesheets/beyond_canvas/components/_flash.sass +0 -51
  78. data/app/assets/stylesheets/beyond_canvas/components/_forms.sass +0 -32
  79. data/app/assets/stylesheets/beyond_canvas/components/_inputs.sass +0 -79
  80. data/app/assets/stylesheets/beyond_canvas/components/_layouts.sass +0 -5
  81. data/app/assets/stylesheets/beyond_canvas/components/_links.sass +0 -13
  82. data/app/assets/stylesheets/beyond_canvas/components/_main.sass +0 -28
  83. data/app/assets/stylesheets/beyond_canvas/components/_margins.sass +0 -7
  84. data/app/assets/stylesheets/beyond_canvas/components/_markdown.sass +0 -60
  85. data/app/assets/stylesheets/beyond_canvas/components/_notices.sass +0 -41
  86. data/app/assets/stylesheets/beyond_canvas/components/_relative.sass +0 -2
  87. data/app/assets/stylesheets/beyond_canvas/components/_spinner.sass +0 -38
  88. data/app/assets/stylesheets/beyond_canvas/components/_tables.sass +0 -25
  89. data/app/assets/stylesheets/beyond_canvas/components/_texts.sass +0 -6
  90. data/app/assets/stylesheets/beyond_canvas/mailer.sass +0 -5
  91. data/app/assets/stylesheets/beyond_canvas/settings/_typography.sass +0 -53
  92. data/app/assets/stylesheets/beyond_canvas/settings/_variables.sass +0 -145
  93. data/app/assets/stylesheets/beyond_canvas/utilities/_mixins.sass +0 -19
  94. data/app/views/beyond_canvas/custom/_public_head.html.slim +0 -0
  95. data/app/views/beyond_canvas/locales/_edit.html.slim +0 -6
  96. data/app/views/beyond_canvas/shared/_flash.html.slim +0 -6
  97. data/app/views/beyond_canvas/shared/_head.html.slim +0 -20
  98. data/app/views/beyond_canvas/shared/_logo.html.slim +0 -2
  99. data/app/views/layouts/beyond_canvas/public.html.slim +0 -12
  100. data/config/initializers/beyond_canvas/assets.rb +0 -5
  101. 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: 413213c4a08e89d845c81df70145ba9199b3a7fcd0852b91a964062443be9a6f
4
+ data.tar.gz: '0495d437686458f797a597da6716ea0cd9cc717ab54a412866cad47d297ea8e8'
5
5
  SHA512:
6
- metadata.gz: 31ed5d0a6dbce63e91ccfbc240e4bbb2a3b835bebe2f1735b9a3e4491b7e87cec02e7bbd03809838494a2dcdf66879f1ca17f60a4feb05431e695475e0b9776b
7
- data.tar.gz: 2a9e47666a44a7d4c8782c9a6f9bca1b15d68a271302ef765155106d8039c95d855e4cff7095584f4c1dc827c2424dddd7fae7deec4befb28ba3be7950c1d937
6
+ metadata.gz: 9613c59e575b54a73863f15c0c1ba3465a8eb66fd70285fb9f2d5a05c932e903168323352024578843ab4b4250f38fecce589e1b731a9f323d1b5c9e58a87a3f
7
+ data.tar.gz: a77e782a6c1876b45dda3d5baa0b2c992f57e6f299ec7994b5a9e1530cfba8730342646038cf3aa4876e1bfe568bf9fa68fd75d877035317bb23f31c693a0112
@@ -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,94 @@
1
+ /*
2
+ * Warning: This file is auto-generated, do not modify. Instead, make your changes in 'app/javascript/beyond_canvas/' and run `yarn build`
3
+ */
4
+ //= require jquery3
5
+ //= require jquery_ujs
6
+ //= require_self
7
+
8
+ (function(factory) {
9
+ typeof define === "function" && define.amd ? define([ "jquery", "jquery-ujs" ], factory) : factory();
10
+ })(function() {
11
+ "use strict";
12
+ var SPINNER_ANIMATION_TIMEOUT = 125;
13
+ (function($) {
14
+ var onDOMReady = function onDOMReady() {
15
+ $('button[class^="button"]').each(function() {
16
+ var button = $(this);
17
+ button.width(button.width());
18
+ button.data("oldWidth", button.width());
19
+ button.prepend('\n <div class="spinner">\n <div class="bounce1"></div>\n <div class="bounce2"></div>\n <div class="bounce3"></div>\n </div>');
20
+ button.closest("form").on("ajax:success", function() {
21
+ hideSpinner(button);
22
+ enableActionElements();
23
+ }).on("ajax:error", function() {
24
+ hideSpinner(button);
25
+ enableActionElements();
26
+ });
27
+ });
28
+ };
29
+ $(document).on("click", '[class^="button"]', function() {
30
+ disableActionElements();
31
+ showSpinner($(this));
32
+ });
33
+ $(document).ready(onDOMReady).on("ready page:load turbolinks:load", onDOMReady);
34
+ })(jQuery);
35
+ function showSpinner(button) {
36
+ button.width(button.width() + $(".spinner").outerWidth(true));
37
+ setTimeout(function() {
38
+ button.find(".spinner").css("display", "flex");
39
+ }, SPINNER_ANIMATION_TIMEOUT);
40
+ }
41
+ function hideSpinner(button) {
42
+ setTimeout(function() {
43
+ button.find(".spinner").hide();
44
+ button.width(button.data("oldWidth"));
45
+ }, SPINNER_ANIMATION_TIMEOUT);
46
+ }
47
+ function disableActionElements() {
48
+ $('a, input[type="submit"], input[type="button"], input[type="reset"], button').each(function() {
49
+ $(this).addClass("actions--disabled");
50
+ });
51
+ }
52
+ function enableActionElements() {
53
+ $('a, input[type="submit"], input[type="button"], input[type="reset"], button').each(function() {
54
+ $(this).removeClass("actions--disabled");
55
+ });
56
+ }
57
+ (function($) {
58
+ var onDOMReady = function onDOMReady() {
59
+ $(".flash").each(function() {
60
+ $(this).css("right", -$(this).width() + "px");
61
+ });
62
+ setTimeout(function() {
63
+ $(".flash").addClass("flash--shown");
64
+ }, 100);
65
+ };
66
+ $(document).on("click", ".flash", function() {
67
+ closeAlert();
68
+ });
69
+ $(document).ready(onDOMReady).on("ready page:load turbolinks:load", onDOMReady);
70
+ })(jQuery);
71
+ function closeAlert() {
72
+ $(".flash").removeClass("flash--shown").delay(700).queue(function() {
73
+ $(this).remove();
74
+ });
75
+ }
76
+ (function($) {
77
+ var onDOMReady = function onDOMReady() {
78
+ $('input[type="file"]').each(function() {
79
+ var $input = $(this), $label = $(".input__file__text." + $input.attr("id")), labelVal = $label.html();
80
+ $input.on("change", function(e) {
81
+ var fileName = "";
82
+ 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();
83
+ 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);
84
+ });
85
+ $input.on("focus", function() {
86
+ $input.addClass("has-focus");
87
+ }).on("blur", function() {
88
+ $input.removeClass("has-focus");
89
+ });
90
+ });
91
+ };
92
+ $(document).ready(onDOMReady).on("ready page:load turbolinks:load", onDOMReady);
93
+ })(jQuery);
94
+ });
@@ -0,0 +1,25 @@
1
+ @import "bourbon";
2
+
3
+ @import "settings/variables";
4
+ @import "settings/reset_css";
5
+ @import "settings/typography";
6
+
7
+ @import "utilities/mixins";
8
+
9
+ @import "components/actions";
10
+ @import "components/buttons";
11
+ @import "components/cards";
12
+ @import "components/comments";
13
+ @import "components/flash";
14
+ @import "components/forms";
15
+ @import "components/inputs";
16
+ @import "components/layouts";
17
+ @import "components/links";
18
+ @import "components/main";
19
+ @import "components/margins";
20
+ @import "components/markdown";
21
+ @import "components/notices";
22
+ @import "components/relative";
23
+ @import "components/tables";
24
+ @import "components/spinner";
25
+ @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
+ }
@@ -0,0 +1,6 @@
1
+ .comment {
2
+ padding: 20px;
3
+ box-sizing: border-box;
4
+ background: $comment-background;
5
+ color: $comment-color;
6
+ }
@@ -0,0 +1,66 @@
1
+ .flash {
2
+ @include position(fixed, 70px null null null);
3
+
4
+ background-color: $white;
5
+ border-radius: $flash-border-radius;
6
+ box-shadow: $flash-box-shadow;
7
+ display: flex;
8
+ overflow: hidden;
9
+ transition: 0.7s linear;
10
+ z-index: 9999;
11
+
12
+ &--shown {
13
+ // sass-lint:disable no-important
14
+ right: 25px !important;
15
+ // sass-lint:enable no-important
16
+ transition: 0.4s linear;
17
+ }
18
+
19
+ &__icon {
20
+ @include padding(11px 8px);
21
+
22
+ display: flex;
23
+
24
+ > svg {
25
+ @include size(18px);
26
+
27
+ fill: $white;
28
+ }
29
+
30
+ &--success,
31
+ &--notice {
32
+ background-color: $flash-success;
33
+ }
34
+
35
+ &--info {
36
+ background-color: $flash-info;
37
+ }
38
+
39
+ &--warning {
40
+ background-color: $flash-warning;
41
+ }
42
+
43
+ &--error {
44
+ background-color: $flash-error;
45
+ }
46
+ }
47
+
48
+ &__message {
49
+ @include padding(10px 15px);
50
+
51
+ box-sizing: border-box;
52
+ color: $flash-color;
53
+ }
54
+
55
+ &__close {
56
+ @include padding(10px 15px);
57
+
58
+ cursor: pointer;
59
+
60
+ > svg {
61
+ @include size(8px);
62
+
63
+ fill: $flash-color;
64
+ }
65
+ }
66
+ }
@@ -0,0 +1,43 @@
1
+ %form__actions {
2
+ align-items: center;
3
+ display: flex;
4
+ }
5
+
6
+ .form {
7
+ &__row,
8
+ &__actions {
9
+ width: 100%;
10
+
11
+ &:not(:last-child) {
12
+ margin-bottom: 30px;
13
+ }
14
+ }
15
+
16
+ &__actions {
17
+ &--spaced {
18
+ @extend %form__actions;
19
+
20
+ justify-content: space-between;
21
+ }
22
+
23
+ &--left {
24
+ @extend %form__actions;
25
+
26
+ justify-content: flex-start;
27
+
28
+ *:not(:last-child) {
29
+ margin-right: 30px;
30
+ }
31
+ }
32
+
33
+ &--right {
34
+ @extend %form__actions;
35
+
36
+ justify-content: flex-end;
37
+
38
+ *:not(:first-child) {
39
+ margin-left: 30px;
40
+ }
41
+ }
42
+ }
43
+ }
@@ -0,0 +1,97 @@
1
+ #{$all-text-inputs},
2
+ select {
3
+ background-color: $white;
4
+ border: 1px solid $input-border-color;
5
+ border-radius: 3px;
6
+ box-sizing: border-box;
7
+ outline: none;
8
+ padding: 6px 8px;
9
+ width: 100%;
10
+ }
11
+
12
+ #{$all-text-inputs} {
13
+ line-height: 1;
14
+ }
15
+
16
+ #{$all-text-inputs-focus},
17
+ select:focus {
18
+ border-color: $input-border-color-focus;
19
+ }
20
+
21
+ select {
22
+ @include prefixer(appearance, none, ("webkit", "moz"));
23
+
24
+ background-image: linear-gradient(45deg, transparent 50%, gray 50%), linear-gradient(135deg, gray 50%, transparent 50%), linear-gradient(to right, $input-border-color, $input-border-color);
25
+ background-position: calc(100% - 19px) calc(1em + -1px), calc(100% - 15px) calc(1em + -1px), calc(100% - 2.5em) 0.5em;
26
+ background-size: 4px 4px, 4px 4px, 0 0;
27
+ background-repeat: no-repeat;
28
+ }
29
+
30
+ #{$all-text-inputs},
31
+ select {
32
+ &.input__error {
33
+ border-left: 2px solid $input-errors-color;
34
+
35
+ &:focus {
36
+ border: 1px solid $input-border-color-focus;
37
+ }
38
+ }
39
+ }
40
+
41
+ .input {
42
+ &__label {
43
+ color: $label-color;
44
+ display: block;
45
+ font-size: 13px;
46
+ font-weight: bold;
47
+ }
48
+
49
+ &__hint {
50
+ color: $hint-color;
51
+ font-size: 13px;
52
+ margin-top: 1px;
53
+ }
54
+
55
+ &__file {
56
+ display: flex;
57
+ align-items: center;
58
+
59
+ &__label {
60
+ display: inline-block;
61
+ }
62
+
63
+ &__text {
64
+ display: flex;
65
+ margin-left: 20px;
66
+ font-weight: 500;
67
+ text-overflow: ellipsis;
68
+ overflow: hidden;
69
+ white-space: nowrap;
70
+ max-width: 200px;
71
+ }
72
+
73
+ &__icon {
74
+ color: $main-color;
75
+ width: 14px;
76
+ margin-right: 5px;
77
+ }
78
+ }
79
+ }
80
+
81
+ label.input__error {
82
+ @include padding(5px 7px);
83
+ @include position(absolute, calc(100% + 8px) null null 0);
84
+
85
+ background-color: $input-errors-color;
86
+ border-radius: 3px;
87
+ color: $white;
88
+ font-size: 13px;
89
+ z-index: 1;
90
+
91
+ &::before {
92
+ @include position(absolute, null null 100% 8px);
93
+ @include triangle("up", 12px, 6px, $input-errors-color);
94
+
95
+ content: "";
96
+ }
97
+ }