beyond_canvas 0.19.2.pre → 0.23.0.pre

Sign up to get free protection for your applications and to get access to all the features.
Files changed (83) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +3 -45
  3. data/app/assets/images/icons/adblocker.svg +5 -0
  4. data/app/assets/images/icons/checkbox_checked.svg +1 -1
  5. data/app/assets/images/icons/checkbox_unchecked.svg +1 -1
  6. data/app/assets/images/icons/external_link.svg +1 -0
  7. data/app/assets/images/icons/toggle.svg +1 -0
  8. data/app/assets/images/icons/toggle_checked.svg +3 -0
  9. data/app/assets/images/icons/toggle_unchecked.svg +3 -0
  10. data/app/assets/javascripts/beyond_canvas/base.js +107 -44
  11. data/app/assets/stylesheets/beyond_canvas/base.scss +21 -18
  12. data/app/assets/stylesheets/beyond_canvas/components/_action_bar.scss +11 -6
  13. data/app/assets/stylesheets/beyond_canvas/components/_breadcrumbs.scss +8 -4
  14. data/app/assets/stylesheets/beyond_canvas/components/_buttons.scss +50 -56
  15. data/app/assets/stylesheets/beyond_canvas/components/_cards.scss +20 -12
  16. data/app/assets/stylesheets/beyond_canvas/components/_collapse.scss +33 -0
  17. data/app/assets/stylesheets/beyond_canvas/components/_flash.scss +13 -12
  18. data/app/assets/stylesheets/beyond_canvas/components/_forms.scss +2 -2
  19. data/app/assets/stylesheets/beyond_canvas/components/_inputs.scss +186 -38
  20. data/app/assets/stylesheets/beyond_canvas/components/_links.scss +80 -4
  21. data/app/assets/stylesheets/beyond_canvas/components/_main.scss +3 -3
  22. data/app/assets/stylesheets/beyond_canvas/components/_menu.scss +13 -0
  23. data/app/assets/stylesheets/beyond_canvas/components/_modals.scss +48 -18
  24. data/app/assets/stylesheets/beyond_canvas/components/_notices.scss +12 -13
  25. data/app/assets/stylesheets/beyond_canvas/components/_scrollbox.scss +5 -4
  26. data/app/assets/stylesheets/beyond_canvas/components/_select2.scss +70 -0
  27. data/app/assets/stylesheets/beyond_canvas/components/_statuses.scss +28 -0
  28. data/app/assets/stylesheets/beyond_canvas/components/_step_list.scss +67 -0
  29. data/app/assets/stylesheets/beyond_canvas/components/_tables.scss +10 -5
  30. data/app/assets/stylesheets/beyond_canvas/components/_titles.scss +1 -1
  31. data/app/assets/stylesheets/beyond_canvas/mailer.scss +2 -1
  32. data/app/assets/stylesheets/beyond_canvas/settings/_base_variables.scss +241 -0
  33. data/app/assets/stylesheets/beyond_canvas/settings/{_variables.scss → _constant_variables.scss} +60 -53
  34. data/app/assets/stylesheets/beyond_canvas/settings/_custom_variables.scss +233 -0
  35. data/app/assets/stylesheets/beyond_canvas/settings/_typography.scss +7 -3
  36. data/app/assets/stylesheets/beyond_canvas/utilities/_mixins.scss +39 -3
  37. data/app/controllers/beyond_canvas/authentications_controller.rb +18 -2
  38. data/app/controllers/beyond_canvas/system_controller.rb +3 -1
  39. data/app/controllers/beyond_canvas/webhooks_controller.rb +49 -0
  40. data/app/controllers/concerns/beyond_canvas/add_blocker_check.rb +17 -0
  41. data/app/controllers/concerns/beyond_canvas/custom_styles.rb +54 -0
  42. data/app/controllers/concerns/beyond_canvas/locale_management.rb +31 -8
  43. data/app/controllers/concerns/beyond_canvas/request_validation.rb +6 -0
  44. data/app/form_builders/beyond_canvas/form_builder.rb +62 -49
  45. data/app/helpers/beyond_canvas/application_helper.rb +48 -4
  46. data/app/helpers/beyond_canvas/form_tag_helper.rb +130 -0
  47. data/app/helpers/beyond_canvas/statuses_helper.rb +26 -0
  48. data/app/javascript/beyond_canvas/base.js +1 -1
  49. data/app/javascript/beyond_canvas/initializers/buttons.js +49 -29
  50. data/app/javascript/beyond_canvas/initializers/collapse.js +8 -0
  51. data/app/javascript/beyond_canvas/initializers/flash.js +33 -11
  52. data/app/javascript/beyond_canvas/initializers/inputs.js +9 -4
  53. data/app/javascript/beyond_canvas/initializers/modals.js +46 -10
  54. data/app/views/beyond_canvas/mailer/_header.html.erb +2 -2
  55. data/app/views/beyond_canvas/shared/_breadcrumbs.html.erb +5 -2
  56. data/app/views/beyond_canvas/shared/_flash.html.erb +14 -10
  57. data/app/views/beyond_canvas/shared/_head.html.erb +4 -0
  58. data/app/views/beyond_canvas/shared/_locales.html.erb +1 -1
  59. data/app/views/layouts/beyond_canvas/application.html.erb +1 -2
  60. data/app/views/layouts/beyond_canvas/public.html.erb +1 -1
  61. data/config/initializers/beyond_canvas/constants.rb +13 -0
  62. data/config/initializers/beyond_canvas/session_store.rb +8 -0
  63. data/lib/beyond_canvas/configuration.rb +9 -1
  64. data/lib/beyond_canvas/engine.rb +7 -0
  65. data/lib/beyond_canvas/rails/routes.rb +27 -7
  66. data/lib/beyond_canvas/version.rb +1 -1
  67. data/lib/beyond_canvas/webhook_event_registration.rb +19 -0
  68. data/lib/beyond_canvas.rb +6 -4
  69. data/lib/generators/beyond_canvas/custom_styles/templates/beyond_canvas_custom_styles.scss +33 -0
  70. data/lib/generators/beyond_canvas/install/install_generator.rb +6 -0
  71. data/lib/generators/beyond_canvas/install/templates/beyond_canvas.rb.erb +38 -1
  72. data/lib/generators/beyond_canvas/model/model_generator.rb +3 -0
  73. data/lib/generators/beyond_canvas/webhook/templates/webhooks_controller.rb +22 -0
  74. data/lib/generators/beyond_canvas/webhook/webhook_generator.rb +15 -0
  75. data/lib/models/concerns/authentication.rb +10 -3
  76. data/lib/models/concerns/utils.rb +6 -5
  77. data/lib/models/concerns/webhook.rb +123 -0
  78. data/lib/models/shop.rb +1 -0
  79. metadata +73 -40
  80. data/app/assets/stylesheets/beyond_canvas/components/_comments.scss +0 -6
  81. data/app/assets/stylesheets/beyond_canvas/components/_containers.scss +0 -37
  82. data/app/views/beyond_canvas/shared/_modal.html.erb +0 -6
  83. data/config/routes.rb +0 -12
@@ -1,65 +1,73 @@
1
1
  %button {
2
- @include padding($button-padding);
3
-
4
- @if $button-box-shadow != true {
5
- padding-top: 7px;
6
- }
7
-
8
2
  align-items: center;
9
- border-radius: $button-border-radius;
10
- border-width: 1px;
11
- border-style: solid;
3
+ border-radius: var(--button-borderRadius);
4
+ border-width: 0;
12
5
  cursor: pointer;
13
6
  display: inline-flex;
14
- font-weight: $button-font-weight;
7
+ font-weight: 700;
15
8
  justify-content: flex-end;
16
9
  line-height: 1;
17
10
  outline: none;
11
+ padding: var(--button-horizontal-padding) 12px;
18
12
  transition: $main-transition;
13
+ white-space: nowrap;
19
14
  }
20
15
 
21
- @mixin button-solid($background, $color) {
22
- @include background-color-darken($background, 10%);
16
+ %button_disabled {
17
+ border-color: var(--button-disabled-background);
18
+ background-color: var(--button-disabled-background);
19
+ pointer-events: none;
20
+ color: var(--button-disabled-text);
21
+ text-shadow: var(--button-disabled-textShadow);
22
+ border-bottom-color: #aaaaaa;
23
+ }
23
24
 
24
- color: $color;
25
+ @mixin button-border-bottom($border-bottom-color) {
26
+ border-bottom: var(--button-borderBottom-width) solid var(#{$border-bottom-color});
27
+ }
25
28
 
26
- .spinner {
27
- display: none;
29
+ @mixin button-solid($background, $background-hover, $color) {
30
+ @include spinner($color);
28
31
 
29
- > div {
30
- background-color: $color;
31
- }
32
- }
32
+ background-color: var(#{$background});
33
+ color: var(#{$color});
33
34
 
34
35
  &:hover {
35
- border-color: darken($background, 10%);
36
+ background-color: var(#{$background-hover});
36
37
  }
37
38
  }
38
39
 
39
- @mixin button-transparent($background) {
40
- background-color: transparent;
41
- border-color: $background;
42
- color: $background;
40
+ @mixin button-transparent($background, $background-hover, $color) {
41
+ @include spinner($color);
42
+
43
+ background-color: var(#{$background});
44
+ color: var(#{$color});
45
+ padding: calc(var(--button-horizontal-padding) - var(--button-outline-border-width)) 12px var(--button-horizontal-padding);
46
+ border: var(--button-outline-border-width) solid var(--button-outline-border-color);
47
+
48
+ &:hover {
49
+ background-color: var(#{$background-hover});
50
+ }
51
+ }
43
52
 
53
+ @mixin spinner($background) {
44
54
  .spinner {
45
55
  display: none;
46
56
 
47
57
  > div {
48
- background-color: $background;
58
+ background-color: var(#{$background});
49
59
  }
50
60
  }
51
-
52
- &:hover {
53
- background-color: lighten($background, 40%);
54
- }
55
61
  }
56
62
 
57
- @mixin button-border($background) {
58
- border-color: $background;
63
+ input[type=file][disabled] ~ .button__transparent--primary {
64
+ @extend %button_disabled;
65
+ }
59
66
 
60
- @if $button-box-shadow == true {
61
- border-bottom-width: 2px;
62
- border-bottom-color: darken($background, 10%);
67
+ [class^='button__'] {
68
+ &:disabled,
69
+ &[disabled] {
70
+ @extend %button_disabled;
63
71
  }
64
72
  }
65
73
 
@@ -68,22 +76,22 @@
68
76
  &--primary {
69
77
  @extend %button;
70
78
 
71
- @include button-solid($button-primary-background, $button-primary-color);
72
- @include button-border($button-primary-background);
79
+ @include button-solid(--button-primary-background, --button-primary-background-hover, --button-text);
80
+ @include button-border-bottom(--button-primary-borderBottom-color);
73
81
  }
74
82
 
75
83
  &--secondary {
76
84
  @extend %button;
77
85
 
78
- @include button-solid($button-secondary-background, $button-secondary-color);
79
- @include button-border($button-secondary-background);
86
+ @include button-solid(--button-default-background, --button-default-background-hover, --button-text);
87
+ @include button-border-bottom(--button-default-borderBottom-color);
80
88
  }
81
89
 
82
90
  &--danger {
83
91
  @extend %button;
84
92
 
85
- @include button-solid($button-danger-background, $button-danger-color);
86
- @include button-border($button-danger-background);
93
+ @include button-solid(--button-danger-background, --button-danger-background-hover, --button-text);
94
+ @include button-border-bottom(--button-danger-borderBottom-color);
87
95
  }
88
96
  }
89
97
 
@@ -91,22 +99,8 @@
91
99
  &--primary {
92
100
  @extend %button;
93
101
 
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);
102
+ @include button-transparent(--button-outline-background, --button-outline-background-hover, --button-outline-text);
103
+ @include button-border-bottom(--button-primary-borderBottom-color);
110
104
  }
111
105
  }
112
106
  }
@@ -1,10 +1,20 @@
1
+ %card {
2
+ background: var(--card-background);
3
+ border-radius: var(--card-borderRadius);
4
+ box-shadow: var(--card-shadow);
5
+ }
6
+
7
+ %card_padding {
8
+ @include padding(var(--card-padding));
9
+
10
+ box-sizing: border-box;
11
+ }
12
+
1
13
  .card {
2
- background: $white;
3
- border-radius: $card-border-radius;
4
- box-shadow: $card-box-shadow;
14
+ @extend %card;
5
15
 
6
16
  &:not(:last-child) {
7
- margin-bottom: $card-margin;
17
+ margin-bottom: 30px;
8
18
  }
9
19
 
10
20
  &--relative {
@@ -12,22 +22,20 @@
12
22
  }
13
23
 
14
24
  &--padding {
15
- @include padding($card-padding);
16
-
17
- box-sizing: border-box;
25
+ @extend %card_padding;
18
26
  }
19
27
 
20
28
  &__separator {
21
- @include margin($card-separator-spacing null);
29
+ @include margin(35px null);
22
30
 
23
- border-bottom: 1px solid $card-separator-color;
24
- left: -#{$card-padding};
31
+ border-bottom: var(--card-divider-border);
32
+ left: calc(-1 * var(--card-padding));
25
33
  position: relative;
26
- width: calc(100% + 2 * #{$card-padding});
34
+ width: calc(100% + 2 * #{var(--card-padding)});
27
35
  }
28
36
 
29
37
  &__headline {
30
- color: $card-title-color;
38
+ color: var(--card-headline);
31
39
  font-size: 20px;
32
40
  margin-bottom: 20px;
33
41
  }
@@ -0,0 +1,33 @@
1
+ .collapse {
2
+
3
+ &:not(:last-child) {
4
+ margin-bottom: 24px;
5
+ }
6
+
7
+ &__content {
8
+ display: none;
9
+ }
10
+
11
+ &__button {
12
+ color: var(--primary-color);
13
+ font-weight: 700;
14
+ cursor: pointer;
15
+ display: block;
16
+ line-height: 1;
17
+ margin-bottom: 4px;
18
+ overflow: hidden;
19
+ text-overflow: ellipsis;
20
+ white-space: nowrap;
21
+ }
22
+
23
+ &__icon {
24
+ @include size(10px);
25
+
26
+ fill: var(--primary-color);
27
+ margin-right: 2px;
28
+
29
+ &--open {
30
+ transform: rotate(90deg);
31
+ }
32
+ }
33
+ }
@@ -1,13 +1,13 @@
1
1
  .flash {
2
2
  @include position(fixed, 70px null null null);
3
3
 
4
- background-color: $white;
5
- border-radius: $flash-border-radius;
6
- box-shadow: $flash-box-shadow;
4
+ background-color: var(--notification-background);
5
+ border-radius: var(--notification-borderRadius);
6
+ box-shadow: var(--notification-boxShadow);
7
7
  display: flex;
8
8
  overflow: hidden;
9
9
  transition: 0.7s linear;
10
- z-index: 9999;
10
+ z-index: 999999;
11
11
 
12
12
  &--shown {
13
13
  // sass-lint:disable no-important
@@ -24,24 +24,25 @@
24
24
  > svg {
25
25
  @include size(18px);
26
26
 
27
- fill: $white;
27
+ fill: var(--notification-background);
28
28
  }
29
29
 
30
30
  &--success,
31
31
  &--notice {
32
- background-color: $flash-success;
32
+ background-color: var(--notification-success);
33
33
  }
34
34
 
35
35
  &--info {
36
- background-color: $flash-info;
36
+ background-color: var(--notification-info);
37
37
  }
38
38
 
39
39
  &--warning {
40
- background-color: $flash-warning;
40
+ background-color: var(--notification-warning);
41
41
  }
42
42
 
43
- &--error {
44
- background-color: $flash-error;
43
+ &--error,
44
+ &--alert {
45
+ background-color: var(--notification-danger);
45
46
  }
46
47
  }
47
48
 
@@ -49,7 +50,7 @@
49
50
  @include padding(10px 15px);
50
51
 
51
52
  box-sizing: border-box;
52
- color: $flash-color;
53
+ color: var(--notification-text);
53
54
  }
54
55
 
55
56
  &__close {
@@ -60,7 +61,7 @@
60
61
  > svg {
61
62
  @include size(8px);
62
63
 
63
- fill: $flash-color;
64
+ fill: var(--notification-text);
64
65
  }
65
66
  }
66
67
  }
@@ -1,5 +1,5 @@
1
1
  %form__actions {
2
- overflow: auto;
2
+ overflow: hidden;
3
3
  }
4
4
 
5
5
  .form {
@@ -7,7 +7,7 @@
7
7
  &__actions {
8
8
  width: 100%;
9
9
 
10
- &:not(:last-child) {
10
+ &:not(:last-of-type) {
11
11
  margin-bottom: 30px;
12
12
  }
13
13
  }
@@ -2,13 +2,20 @@ $controls: checkbox, radio;
2
2
 
3
3
  #{$all-text-inputs},
4
4
  select {
5
- background-color: $white;
6
- border: 1px solid $input-border-color;
7
- border-radius: 3px;
5
+ background-color: var(--inputField-background);
6
+ border: 1px solid var(--inputField-border);
7
+ border-radius: var(--inputField-borderRadius);
8
8
  box-sizing: border-box;
9
+ order: 2;
9
10
  outline: none;
10
11
  padding: 6px 8px;
11
12
  width: 100%;
13
+
14
+ &:disabled {
15
+ background-color: var(--inputField-background-disabled) !important;
16
+ color: var(--inputField-text-disabled);
17
+ opacity: 1;
18
+ }
12
19
  }
13
20
 
14
21
  #{$all-text-inputs} {
@@ -17,7 +24,7 @@ select {
17
24
 
18
25
  #{$all-text-inputs-focus},
19
26
  select:focus {
20
- border-color: $input-border-color-focus;
27
+ border-color: var(--inputField-border-focus);
21
28
  }
22
29
 
23
30
  select {
@@ -37,70 +44,208 @@ textarea {
37
44
  #{$all-text-inputs},
38
45
  select {
39
46
  &.input__error {
40
- border-left: 2px solid $input-errors-color;
47
+ border-left: 2px solid var(--formGroup-validation-error);
41
48
 
42
49
  &:focus {
43
- border: 1px solid $input-border-color-focus;
50
+ border: 1px solid var(--inputField-border-focus);
44
51
  }
45
52
  }
46
53
  }
47
54
 
48
55
  .input {
49
56
  &__label {
50
- color: $label-color;
57
+ color: var(--formGroup-label);
51
58
  display: block;
52
59
  font-size: 13px;
53
60
  font-weight: bold;
61
+
62
+ &--disabled {
63
+ color: var(--check-disabled-text);
64
+ }
54
65
  }
55
66
 
56
67
  &__hint {
57
- color: $hint-color;
68
+ color: var(--inputField-hint-text);
58
69
  font-size: 13px;
59
70
  margin-top: 1px;
60
71
  }
61
72
 
73
+ &__pre,
74
+ &__post {
75
+ background-color: var(--inputField-background-disabled);
76
+ border: 1px solid var(--inputField-border);
77
+ box-sizing: border-box;
78
+ color: var(--inputField-text-disabled);
79
+ line-height: 1;
80
+ outline: none;
81
+ padding: 6px 8px;
82
+ }
83
+
84
+ &__pre {
85
+ border-bottom-left-radius: var(--inputField-borderRadius);
86
+ border-top-left-radius: var(--inputField-borderRadius);
87
+ border-right: 0;
88
+ order: 1;
89
+
90
+ ~ input,
91
+ ~ select {
92
+ @include border-left-radius(0);
93
+ }
94
+ }
95
+
96
+ &__post {
97
+ border-bottom-right-radius: var(--inputField-borderRadius);
98
+ border-top-right-radius: var(--inputField-borderRadius);
99
+ border-left: 0;
100
+ order: 10;
101
+
102
+ ~ input,
103
+ ~ select {
104
+ @include border-right-radius(0);
105
+ }
106
+ }
107
+
62
108
  @each $control in $controls {
63
109
 
64
110
  &__#{$control} {
65
- display: flex;
66
- align-items: center;
67
-
68
- .input__#{$control}__control {
69
- @if $control == checkbox {
70
- @include size(16px);
71
- } @else if $control == radio {
72
- @include size(18px);
73
- }
74
111
 
112
+ &__control {
75
113
  cursor: pointer;
76
- margin-right: 7px;
77
114
  }
78
115
 
79
- input[type=#{$control}] + .input__#{$control}__control {
80
- @if $control == checkbox {
81
- background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' style='background: #{str-replace('' + $checkbox-unchecked-background, '#', '%23')};' width='16' height='16' viewBox='0 0 24 24'%3E%3Cpath fill='#{str-replace('' + $checkbox-unchecked-color, '#', '%23')}' d='M0 0v24h24V0H0zm21.5 21.5h-19v-19h19v19z'%3E%3C/path%3E%3C/svg%3E%0A");
82
- } @else if $control == radio {
83
- background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' style='background: #{str-replace('' + $radio-unchecked-background, '#', '%23')};' width='18' height='18' viewBox='0 0 24 24'%3E%3Cpath fill='#{str-replace('' + $radio-unchecked-color, '#', '%23')}' 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'%3E%3C/path%3E%3C/svg%3E");
116
+ &--unchecked {
117
+ background: #fff;
118
+
119
+ path {
120
+ fill: var(--uncheck-color);
84
121
  }
85
122
  }
86
123
 
87
- input[type=#{$control}]:checked + .input__#{$control}__control {
88
- @if $control == checkbox {
89
- background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' style='background: #{str-replace('' + $checkbox-checked-background, '#', '%23')};' width='16' height='16' viewBox='0 0 24 24'%3E%3Cpath fill='#{str-replace('' + $checkbox-checked-color, '#', '%23')}' 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'%3E%3C/path%3E%3C/svg%3E%0A");
90
- } @else if $control == radio {
91
- background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' style='background: #{str-replace('' + $radio-checked-background, '#', '%23')};' width='18' height='18' viewBox='0 0 24 24'%3E%3Cpath fill='#{str-replace('' + $radio-checked-color, '#', '%23')}' 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'%3E%3C/path%3E%3C/svg%3E");
124
+ &--checked {
125
+ background: #fff;
126
+
127
+ path {
128
+ fill: var(--check-color);
92
129
  }
93
130
  }
94
131
 
95
- + div .input__label {
96
- line-height: 1;
132
+ &:not(:checked) + .input__#{$control}__control .input__#{$control}--unchecked,
133
+ &:checked + .input__#{$control}__control .input__#{$control}--checked {
134
+ display: block !important;
135
+ }
136
+
137
+ &:disabled {
138
+ ~ div .input__label,
139
+ ~ div .input__hint {
140
+ cursor: default;
141
+ color: var(--check-disabled-text);
142
+ }
143
+
144
+ + .input__#{$control}__control .input__#{$control}--unchecked,
145
+ + .input__#{$control}__control .input__#{$control}--checked {
146
+ cursor: default;
147
+
148
+ path {
149
+ fill: var(--check-disabled-icon);
150
+ }
151
+ }
152
+ }
153
+
154
+ ~ div .input__label {
155
+ padding-left: 7px;
97
156
  }
98
157
 
99
- + div .input__hint {
158
+ ~ div .input__hint {
159
+ padding-left: 7px;
160
+ padding-top: 4px;
161
+ }
162
+
163
+ ~ div .input__label,
164
+ ~ div .input__hint {
100
165
  line-height: 1;
101
- margin-top: 4px;
166
+ cursor: pointer;
167
+ }
168
+ }
169
+ }
170
+
171
+ &__toggle {
172
+
173
+ &:checked + .input__toggle__control svg path:nth-of-type(1),
174
+ &:not(:checked) + .input__toggle__control svg path:nth-of-type(2) {
175
+ opacity: 1;
176
+ }
177
+
178
+ &:checked + .input__toggle__control svg path {
179
+ transform: translateX(19.6px);
180
+ }
181
+
182
+ &:disabled {
183
+ + .input__toggle__control {
184
+ cursor: default;
185
+
186
+ svg {
187
+
188
+ rect {
189
+ fill: var(--inputField-background-disabled);
190
+ }
191
+
192
+ path {
193
+ fill: var(--check-disabled-icon);
194
+ }
195
+ }
196
+ }
197
+
198
+ ~ div .input__label,
199
+ ~ div .input__hint {
200
+ cursor: default;
201
+ color: var(--check-disabled-text);
202
+ }
203
+ }
204
+
205
+ &__control {
206
+ cursor: pointer;
207
+ width: 47px;
208
+ height: 26px;
209
+
210
+ svg {
211
+ width: 47px;
212
+ height: 26px;
213
+
214
+ rect {
215
+ stroke: var(--flipSwitch-border);
216
+ fill: transparent;
217
+ }
218
+
219
+ path {
220
+ transition: 0.3s;
221
+ opacity: 0;
222
+
223
+ &:nth-of-type(1) {
224
+ fill: var(--flipSwitch-checked-background);
225
+ }
226
+
227
+ &:nth-of-type(2) {
228
+ fill: var(--flipSwitch-unchecked-background);
229
+ }
230
+ }
102
231
  }
103
232
  }
233
+
234
+ ~ div .input__label {
235
+ color: var(--flipSwitch-label);
236
+ }
237
+
238
+ ~ div .input__hint {
239
+ color: var(--flipSwitch-text);
240
+ padding-top: 4px;
241
+ }
242
+
243
+ ~ div .input__label,
244
+ ~ div .input__hint {
245
+ padding-left: 10px;
246
+ line-height: 1;
247
+ cursor: pointer;
248
+ }
104
249
  }
105
250
 
106
251
  &__file {
@@ -133,16 +278,19 @@ label.input__error {
133
278
  @include padding(5px 7px);
134
279
  @include position(absolute, calc(100% + 8px) null null 0);
135
280
 
136
- background-color: $input-errors-color;
137
- border-radius: 3px;
138
- color: $white;
281
+ background-color: var(--formGroup-validation-error);
282
+ border-radius: var(--formGroup-validation-borderRadius);
283
+ color: var(--formGroup-validation-text);
139
284
  font-size: 13px;
140
285
  z-index: 1;
141
286
 
142
287
  &::before {
143
288
  @include position(absolute, null null 100% 8px);
144
- @include triangle("up", 12px, 6px, $input-errors-color);
145
-
146
- content: "";
289
+ border-style: solid;
290
+ height: 0;
291
+ width: 0;
292
+ border-color: transparent transparent var(--formGroup-validation-error);
293
+ border-width: 0 6px 6px;
294
+ content: '';
147
295
  }
148
296
  }