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
@@ -0,0 +1,7 @@
1
+ .body--public {
2
+ .select--locale {
3
+ @include position(absolute, 40px 40px null null);
4
+
5
+ width: 200px;
6
+ }
7
+ }
@@ -0,0 +1,17 @@
1
+ .link {
2
+ &__icon {
3
+ margin-right: 10px;
4
+ }
5
+
6
+ &--primary {
7
+ @include color-darken($link-primary-color, 10%);
8
+ }
9
+
10
+ &--secondary {
11
+ @include color-darken($link-secondary-color, 10%);
12
+ }
13
+
14
+ &--danger {
15
+ @include color-darken($link-danger-color, 10%);
16
+ }
17
+ }
@@ -0,0 +1,39 @@
1
+ %body {
2
+ background-color: $main-background;
3
+ }
4
+
5
+ .body--public {
6
+ @extend %body;
7
+
8
+ .main-wrapper {
9
+ @include margin(32px auto);
10
+
11
+ max-width: 531px;
12
+ width: 94%;
13
+
14
+ .logo {
15
+ @include margin($logo-margin-top-public auto $logo-margin-bottom-public);
16
+
17
+ display: block;
18
+ width: 238px;
19
+ }
20
+ }
21
+ }
22
+
23
+ .body--single-page {
24
+ @extend %body;
25
+
26
+ .main-wrapper {
27
+ @include margin(32px auto);
28
+
29
+ max-width: 876px;
30
+ width: 94%;
31
+
32
+ .logo {
33
+ @include margin($logo-margin-top-public auto $logo-margin-bottom-public);
34
+
35
+ display: block;
36
+ width: 238px;
37
+ }
38
+ }
39
+ }
@@ -0,0 +1,9 @@
1
+ .margin {
2
+ &--top {
3
+ margin-top: 30px;
4
+ }
5
+
6
+ &--bottom {
7
+ margin-bottom: 30px;
8
+ }
9
+ }
@@ -0,0 +1,74 @@
1
+ .markdown {
2
+ > :first-child {
3
+ margin-top: 0 !important;
4
+ }
5
+
6
+ > :last-child {
7
+ margin-bottom: 0;
8
+ }
9
+
10
+ > *:not(:last-child) {
11
+ margin-bottom: 16px;
12
+ }
13
+
14
+ h1, h2, h3, h4 {
15
+ margin-top: 24px;
16
+ }
17
+
18
+ h1 {
19
+ font-size: 2em;
20
+ }
21
+
22
+ h2 {
23
+ font-size: 1.5em;
24
+ }
25
+
26
+ h3 {
27
+ font-size: 1.25em;
28
+ }
29
+
30
+ h4 {
31
+ font-size: 1em;
32
+ }
33
+
34
+ ul,
35
+ ol {
36
+ padding-left: 2em;
37
+
38
+ ul {
39
+ margin-bottom: 0;
40
+ }
41
+ }
42
+
43
+ table {
44
+ thead {
45
+ background-color: $markdown-table-head-background;
46
+ font-weight: 700;
47
+ }
48
+
49
+ thead,
50
+ tbody {
51
+ tr {
52
+ th,
53
+ td {
54
+ border: 1px solid $markdown-table-border-color;
55
+ padding: 0.4em 0.8em;
56
+ }
57
+ }
58
+ }
59
+ }
60
+
61
+ blockquote {
62
+ border-left: 0.25em solid $markdown-blockquote-border-color;
63
+ color: $markdown-blockquote-font-color;
64
+ padding: 0 1em;
65
+ }
66
+
67
+ hr {
68
+ background-color: $markdown-hr-background;
69
+ border: 0;
70
+ height: 4px;
71
+ margin: 24px 0 !important;
72
+ padding: 0;
73
+ }
74
+ }
@@ -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";
@@ -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