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
@@ -0,0 +1,58 @@
1
+ .notice {
2
+ border-radius: $notice-border-radius;
3
+ border: 1px solid;
4
+ box-sizing: border-box;
5
+ display: flex;
6
+
7
+ &--success {
8
+ border-color: $notice-success-background;
9
+
10
+ .notice__icon {
11
+ background-color: $notice-success-background;
12
+ }
13
+ }
14
+
15
+ &--info {
16
+ border-color: $notice-info-background;
17
+
18
+ .notice__icon {
19
+ background-color: $notice-info-background;
20
+ }
21
+ }
22
+
23
+ &--warning {
24
+ border-color: $notice-warning-background;
25
+
26
+ .notice__icon {
27
+ background-color: $notice-warning-background;
28
+ }
29
+ }
30
+
31
+ &--error {
32
+ border-color: $notice-error-background;
33
+
34
+ .notice__icon {
35
+ background-color: $notice-error-background;
36
+ }
37
+ }
38
+
39
+ &__icon {
40
+ @include padding(10px 8px);
41
+
42
+ display: flex;
43
+
44
+ > svg {
45
+ @include size(18px);
46
+
47
+ fill: $white;
48
+ }
49
+ }
50
+
51
+ &__content {
52
+ @include padding(8px 14px);
53
+
54
+ color: $notice-color;
55
+ display: flex;
56
+ align-items: center;
57
+ }
58
+ }
@@ -0,0 +1,3 @@
1
+ .relative {
2
+ position: relative;
3
+ }
@@ -0,0 +1,48 @@
1
+ .spinner {
2
+ display: flex;
3
+ margin-right: 12px;
4
+ width: 24px;
5
+ text-align: center;
6
+
7
+ > div {
8
+ margin: 0 !important;
9
+ width: 8px;
10
+ height: 8px;
11
+ border-radius: 100%;
12
+ display: inline-block;
13
+ -webkit-animation: sk-bouncedelay 1.4s infinite ease-in-out both;
14
+ animation: sk-bouncedelay 1.4s infinite ease-in-out both;
15
+ }
16
+
17
+ .bounce1 {
18
+ -webkit-animation-delay: -0.32s;
19
+ animation-delay: -0.32s;
20
+ }
21
+
22
+ .bounce2 {
23
+ -webkit-animation-delay: -0.16s;
24
+ animation-delay: -0.16s;
25
+ }
26
+ }
27
+
28
+ @-webkit-keyframes sk-bouncedelay {
29
+ 0%, 80%, 100% {
30
+ -webkit-transform: scale(0);
31
+ }
32
+
33
+ 40% {
34
+ -webkit-transform: scale(1);
35
+ }
36
+ }
37
+
38
+ @keyframes sk-bouncedelay {
39
+ 0%, 80%, 100% {
40
+ -webkit-transform: scale(0);
41
+ transform: scale(0);
42
+ }
43
+
44
+ 40% {
45
+ -webkit-transform: scale(1);
46
+ transform: scale(1);
47
+ }
48
+ }
@@ -0,0 +1,31 @@
1
+ .table {
2
+ width: 100%;
3
+ border-collapse: collapse;
4
+
5
+ th, td {
6
+ padding: 15px;
7
+ text-align: left;
8
+ }
9
+
10
+ thead {
11
+ tr {
12
+ font-weight: 700;
13
+
14
+ &:first-child {
15
+ background-color: $table-header-background;
16
+ }
17
+
18
+ &:nth-child(2) {
19
+ border-bottom: 2px solid $table-border-color;
20
+ }
21
+ }
22
+ }
23
+
24
+ tbody {
25
+ tr {
26
+ &:not(:last-child) {
27
+ border-bottom: 1px solid $table-border-color;
28
+ }
29
+ }
30
+ }
31
+ }
@@ -0,0 +1,7 @@
1
+ .text {
2
+ &__align {
3
+ &--center {
4
+ text-align: center;
5
+ }
6
+ }
7
+ }
@@ -0,0 +1,5 @@
1
+ @import "bourbon";
2
+
3
+ @import "settings/variables";
4
+
5
+ @import "components/markdown";
@@ -0,0 +1,6 @@
1
+ $mobile-s: 321px !global;
2
+ $mobile-m: 376px !global;
3
+ $mobile-l: 426px !global;
4
+ $tablet: 769px !global;
5
+ $laptop: 1025px !global;
6
+ $laptop-l: 1441px !global;
@@ -6,39 +6,47 @@ a, abbr, acronym, address, big, cite, code,
6
6
  del, dfn, em, img, ins, kbd, q, s, samp,
7
7
  small, strike, strong, sub, sup, tt, var,
8
8
  b, u, i, center,
9
- dl, dt, dd, // ol, ul, li,
9
+ dl, dt, dd,
10
10
  fieldset, form, label, legend,
11
11
  table, caption, tbody, tfoot, thead, tr, th, td,
12
12
  article, aside, canvas, details, embed,
13
13
  figure, figcaption, footer, header, hgroup,
14
14
  menu, nav, output, ruby, section, summary,
15
- time, mark, audio, video
16
- border: 0
17
- font: inherit
18
- margin: 0
19
- padding: 0
20
- vertical-align: baseline
15
+ time, mark, audio, video {
16
+ border: 0;
17
+ font: inherit;
18
+ margin: 0;
19
+ padding: 0;
20
+ vertical-align: baseline;
21
+ }
21
22
 
22
23
  article, aside, details, figcaption, figure,
23
- footer, header, hgroup, menu, nav, section
24
- display: block
24
+ footer, header, hgroup, menu, nav, section {
25
+ display: block;
26
+ }
25
27
 
26
- body
27
- line-height: 1
28
+ body {
29
+ line-height: 1;
30
+ }
31
+
32
+ ol, ul {
33
+ margin: 0;
28
34
 
29
- ol, ul
30
- margin: 0
31
35
  // list-style: none
36
+ }
32
37
 
33
- blockquote, q
34
- quotes: none
38
+ blockquote, q {
39
+ quotes: none;
40
+ }
35
41
 
36
42
  blockquote::before, blockquote::after,
37
- q::before, q::after
38
- content: none
39
-
40
- table
41
- border-collapse: collapse
42
- border-spacing: 0
43
+ q::before, q::after {
44
+ content: none;
45
+ }
46
+
47
+ table {
48
+ border-collapse: collapse;
49
+ border-spacing: 0;
50
+ }
43
51
 
44
52
  // sass-lint:enable single-line-per-selector, force-pseudo-nesting
@@ -0,0 +1,67 @@
1
+ // sass-lint:disable single-line-per-selector, no-vendor-prefixes
2
+
3
+ html {
4
+ font-size: 62.5%;
5
+ }
6
+
7
+ body, #{$all-text-inputs}, #{$all-buttons}, select {
8
+ -moz-osx-font-smoothing: grayscale;
9
+ -webkit-font-smoothing: antialiased;
10
+ font-family: unquote($main-font-family);
11
+ font-size: $main-font-size;
12
+ font-weight: normal;
13
+ }
14
+
15
+ body, #{$all-text-inputs}, select {
16
+ color: $main-color;
17
+ }
18
+
19
+ body, #{$all-text-inputs} {
20
+ line-height: $main-line-height;
21
+ }
22
+
23
+ select {
24
+ line-height: initial;
25
+ }
26
+
27
+ h1, h2, h3, h4, h5, h6 {
28
+ color: $headline-color;
29
+ font-weight: bold;
30
+ line-height: $headline-line-height;
31
+ }
32
+
33
+ h1 {
34
+ font-size: 56px;
35
+ }
36
+
37
+ h2 {
38
+ font-size: 40px;
39
+ }
40
+
41
+ h3 {
42
+ font-size: 32px;
43
+ }
44
+
45
+ h4 {
46
+ font-size: 24px;
47
+ }
48
+
49
+ h5 {
50
+ font-size: 16px;
51
+ }
52
+
53
+ p {
54
+ font-size: $main-font-size;
55
+ }
56
+
57
+ a {
58
+ color: $main-color;
59
+ outline: none;
60
+ text-decoration: none;
61
+ }
62
+
63
+ strong {
64
+ font-weight: bold;
65
+ }
66
+
67
+ // sass-lint:enable single-line-per-selector, no-vendor-prefixes
@@ -0,0 +1,171 @@
1
+ // ************************************************************
2
+ // Colors
3
+ // ************************************************************
4
+
5
+ $white: rgb(255, 255, 255) !global;
6
+ $black: rgb(0, 0, 0) !global;
7
+ $palette-primary: rgb(78, 183, 168) !default;
8
+ $palette-secondary: rgb(28, 53, 69) !default;
9
+ $palette-cancel: rgb(153, 153, 153) !default;
10
+ $palette-danger: rgb(218, 60, 60) !default;
11
+
12
+ // ************************************************************
13
+ // General styles
14
+ // ************************************************************
15
+
16
+ $main-background: rgb(233, 232, 220) !default;
17
+ $main-transition: 0.125s ease-in !global;
18
+
19
+ // ************************************************************
20
+ // Typography
21
+ // ************************************************************
22
+
23
+ $main-font-family: '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif' !global;
24
+ $main-color: rgb(62, 62, 62) !default;
25
+ $main-line-height: 1.5 !global;
26
+ $main-font-size: 14px !global;
27
+
28
+ // ************************************************************
29
+ // Headlines
30
+ // ************************************************************
31
+
32
+ $headline-color: rgb(122, 118, 76) !default;
33
+ $headline-line-height: 1 !global;
34
+
35
+ // ************************************************************
36
+ // Links
37
+ // ************************************************************
38
+
39
+ $link-primary-color: darken($palette-primary, 10%) !default;
40
+ $link-secondary-color: darken($palette-cancel, 10%) !default;
41
+ $link-danger-color: darken($palette-danger, 10%) !default;
42
+
43
+ // ************************************************************
44
+ // Buttons
45
+ // ************************************************************
46
+
47
+ $button-primary-background: $palette-primary !default;
48
+ $button-primary-color: $white !default;
49
+
50
+ $button-secondary-background: $palette-cancel !default;
51
+ $button-secondary-color: $white !default;
52
+
53
+ $button-danger-background: $palette-danger !default;
54
+ $button-danger-color: $white !default;
55
+
56
+ $button-border-radius: 3px !default;
57
+ $button-box-shadow: true !default;
58
+ $button-font-weight: 700 !global;
59
+ $button-padding: 6px 12px 7px !global;
60
+
61
+ // ************************************************************
62
+ // Cards
63
+ // ************************************************************
64
+
65
+ $card-border-radius: 3px !default;
66
+ $card-box-shadow: 0 2px 7px rgba($black, 0.2) !default;
67
+ $card-padding: 40px !global;
68
+ $card-margin: 30px !global;
69
+ $card-separator-color: rgb(222, 222, 222) !default;
70
+ $card-separator-spacing: 50px !global;
71
+ $card-title-color: rgb(247, 133, 96) !default;
72
+
73
+ // ************************************************************
74
+ // Containers
75
+ // ************************************************************
76
+
77
+ $container-spacing: 30px !global;
78
+
79
+ // ************************************************************
80
+ // Labels
81
+ // ************************************************************
82
+
83
+ $label-color: rgb(128, 128, 128) !default;
84
+
85
+ // ************************************************************
86
+ // Inputs
87
+ // ************************************************************
88
+
89
+ $input-border-color: rgb(217, 216, 195) !default;
90
+ $input-border-color-focus: $palette-primary !default;
91
+ $input-errors-color: $palette-danger !default;
92
+
93
+ // ************************************************************
94
+ // Checkboxes
95
+ // ************************************************************
96
+
97
+ $checkbox-checked-color: #97C344 !default;
98
+ $checkbox-checked-background: #ffffff !default;
99
+ $checkbox-unchecked-color: #C2BF9D !default;
100
+ $checkbox-unchecked-background: #ffffff !default;
101
+
102
+ // ************************************************************
103
+ // Radiobuttons
104
+ // ************************************************************
105
+
106
+ $radio-checked-color: #97C344 !default;
107
+ $radio-checked-background: #ffffff !default;
108
+ $radio-unchecked-color: #C2BF9D !default;
109
+ $radio-unchecked-background: #ffffff !default;
110
+
111
+ // ************************************************************
112
+ // Hints
113
+ // ************************************************************
114
+
115
+ $hint-color: rgb(158, 158, 158) !default;
116
+
117
+ // ************************************************************
118
+ // Logo
119
+ // ************************************************************
120
+
121
+ $logo-margin-top-public: 0 !default;
122
+ $logo-margin-bottom-public: 34px !default;
123
+
124
+ // ************************************************************
125
+ // Flash
126
+ // ************************************************************
127
+
128
+ $flash-success: rgb(123, 170, 81) !default;
129
+ $flash-notice: rgb(123, 170, 81) !default;
130
+ $flash-info: rgb(153, 153, 153) !default;
131
+ $flash-warning: rgb(243, 181, 71) !default;
132
+ $flash-error: rgb(218, 60, 60) !default;
133
+ $flash-border-radius: 4px !default;
134
+ $flash-box-shadow: 0 1px 2px 0 rgba($black, 0.2) !default;
135
+ $flash-color: rgb(128, 128, 128) !default;
136
+
137
+ // ************************************************************
138
+ // Tables
139
+ // ************************************************************
140
+
141
+ $table-header-background: rgb(243, 242, 236) !default;
142
+ $table-border-color: rgb(233, 232, 220) !default;
143
+
144
+ // ************************************************************
145
+ // Comments
146
+ // ************************************************************
147
+
148
+ $comment-background: rgb(246, 246, 243) !default;
149
+ $comment-color: rgb(170, 169, 156) !default;
150
+
151
+ // ************************************************************
152
+ // Notices
153
+ // ************************************************************
154
+
155
+ $notice-success-background: rgb(123, 170, 81) !default;
156
+ $notice-notice-background: rgb(123, 170, 81) !default;
157
+ $notice-info-background: rgb(153, 153, 153) !default;
158
+ $notice-warning-background: rgb(243, 181, 71) !default;
159
+ $notice-error-background: rgb(218, 60, 60) !default;
160
+ $notice-border-radius: 4px !default;
161
+ $notice-color: rgb(153, 153, 153) !default;
162
+
163
+ // ************************************************************
164
+ // Markdown
165
+ // ************************************************************
166
+
167
+ $markdown-table-head-background: #f6f8fa;
168
+ $markdown-table-border-color: #dfe2e5;
169
+ $markdown-blockquote-font-color: #6a737d;
170
+ $markdown-blockquote-border-color: #dfe2e5;
171
+ $markdown-hr-background: #e1e4e8;