beyond_canvas 0.19.2.pre → 0.20.0.pre

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7e521c2269619436efc6e760472ab605213b315b3f14462661a65db7a615a93c
4
- data.tar.gz: 146a2408feda96383da8def8d2647abd8b003e5dcef55a7b439325c4b1f38832
3
+ metadata.gz: 546dcb0ade52cea03999f68b2f8866e0d5c34cd714ccda4818f231db0e6996ea
4
+ data.tar.gz: bb27504cda97798e8b9e47ce98ec7efc73e664d3c727b3685ab5e4d77338b5ff
5
5
  SHA512:
6
- metadata.gz: 34478929f6d039be913f94e7f9ce74544d0481534a8f3e25649ed4daed4f9f677e4b028835263f65e97066f76104b13aa92d8dd7d5ed520425de88d08f6e0df2
7
- data.tar.gz: e434787b9ff264aa0a661b5c2d35fcb311ba199bdfec9408965a57e32118941ab0fb3d1564b2de5c02d297b7711695091a432663a4aad1d5f9f65e0d0931ce6b
6
+ metadata.gz: a76c13a79e053ff43dddb6d0bbf4d6c87fec754d2cf710b19cd375b89864b09e178665dcda6b9bbad5d6f60ae9abb492d2187eea98ac3a02b2d561ae7fc229ef
7
+ data.tar.gz: e6ecbdff28acf32f5414998b62f810379cc2d8a8796ad8b501480eca9ef2d93587fe94ef3c44c4baaa9b5da82bf76ff40995b75a30c43143434eaa1c3920be87
@@ -8,6 +8,7 @@
8
8
  @import "utilities/functions";
9
9
  @import "utilities/mixins";
10
10
 
11
+ @import "components/action_bar";
11
12
  @import "components/actions";
12
13
  @import "components/breadcrumbs";
13
14
  @import "components/buttons";
@@ -24,14 +25,14 @@
24
25
  @import "components/main";
25
26
  @import "components/margins";
26
27
  @import "components/markdown";
27
- @import "components/action_bar";
28
+ @import "components/menu";
28
29
  @import "components/modals";
29
30
  @import "components/notices";
30
31
  @import "components/relative";
31
32
  @import "components/scrollbox";
32
33
  @import "components/sidebar";
33
34
  @import "components/spinner";
34
- @import "components/menu";
35
+ @import "components/statuses";
35
36
  @import "components/tables";
36
- @import "components/titles";
37
37
  @import "components/texts";
38
+ @import "components/titles";
@@ -0,0 +1,27 @@
1
+ .status {
2
+ @include padding(4px 6px);
3
+ font-size: 12px;
4
+ border-radius: 3px;
5
+ line-height: 1.2;
6
+ font-weight: 500;
7
+
8
+ &--good {
9
+ background-color: $status-good-background;
10
+ color: $status-good-color;
11
+ }
12
+
13
+ &--warning {
14
+ background-color: $status-warning-background;
15
+ color: $status-warning-color;
16
+ }
17
+
18
+ &--danger {
19
+ background-color: $status-danger-background;
20
+ color: $status-danger-color;
21
+ }
22
+
23
+ &--neutral {
24
+ border: 1px solid $status-neutral-background;
25
+ color: $status-neutral-color;
26
+ }
27
+ }
@@ -161,6 +161,19 @@ $notice-error-background: rgb(218, 60, 60) !default;
161
161
  $notice-border-radius: 4px !default;
162
162
  $notice-color: rgb(153, 153, 153) !default;
163
163
 
164
+ // ************************************************************
165
+ // Status
166
+ // ************************************************************
167
+
168
+ $status-good-background: rgb(205,225,165) !default;
169
+ $status-good-color: rgb(85,110,41) !default;
170
+ $status-warning-background: rgb(249,220,166) !default;
171
+ $status-warning-color: rgb(178,120,18) !default;
172
+ $status-danger-background: rgb(247,174,163) !default;
173
+ $status-danger-color: rgb(164,35,34) !default;
174
+ $status-neutral-background: rgb(224,223,205) !default;
175
+ $status-neutral-color: rgb(155,151,100) !default;
176
+
164
177
  // ************************************************************
165
178
  // Breadcrums
166
179
  // ************************************************************
@@ -0,0 +1,26 @@
1
+ # frozen_string_literal: true
2
+
3
+ module BeyondCanvas
4
+ module StatusesHelper # :nodoc:
5
+ %i[good warning danger neutral].each do |method|
6
+ define_method :"status_#{method}" do |name = nil, html_options = nil, &block|
7
+ status_render(method, name, html_options, &block)
8
+ end
9
+ end
10
+
11
+ private
12
+
13
+ def status_render(method, name = nil, html_options = nil, &block)
14
+ if block_given?
15
+ html_options = name
16
+ name = block
17
+ end
18
+
19
+ html_options ||= {}
20
+
21
+ html_options.merge!(class: "status status--#{method}") { |_key, old_val, new_val| [new_val, old_val].join(' ') }
22
+
23
+ content_tag('span', block_given? ? capture(&name) : name, html_options)
24
+ end
25
+ end
26
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module BeyondCanvas
4
- VERSION = '0.19.2.pre'
4
+ VERSION = '0.20.0.pre'
5
5
  end
@@ -148,6 +148,19 @@
148
148
  // $notice-border-radius: 4px;
149
149
  // $notice-color: rgb(153, 153, 153);
150
150
 
151
+ // ************************************************************
152
+ // Status
153
+ // ************************************************************
154
+
155
+ // $status-good-background: rgb(205,225,165);
156
+ // $status-good-color: rgb(85,110,41);
157
+ // $status-warning-background: rgb(249,220,166);
158
+ // $status-warning-color: rgb(178,120,18);
159
+ // $status-danger-background: rgb(247,174,163);
160
+ // $status-danger-color: rgb(164,35,34);
161
+ // $status-neutral-background: rgb(224,223,205);
162
+ // $status-neutral-color: rgb(155,151,100);
163
+
151
164
  // ************************************************************
152
165
  // Breadcrums
153
166
  // ************************************************************
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: beyond_canvas
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.19.2.pre
4
+ version: 0.20.0.pre
5
5
  platform: ruby
6
6
  authors:
7
7
  - Unai Abrisketa
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2020-11-02 00:00:00.000000000 Z
13
+ date: 2020-11-04 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: attr_encrypted
@@ -254,6 +254,7 @@ files:
254
254
  - app/assets/stylesheets/beyond_canvas/components/_scrollbox.scss
255
255
  - app/assets/stylesheets/beyond_canvas/components/_sidebar.scss
256
256
  - app/assets/stylesheets/beyond_canvas/components/_spinner.scss
257
+ - app/assets/stylesheets/beyond_canvas/components/_statuses.scss
257
258
  - app/assets/stylesheets/beyond_canvas/components/_tables.scss
258
259
  - app/assets/stylesheets/beyond_canvas/components/_texts.scss
259
260
  - app/assets/stylesheets/beyond_canvas/components/_titles.scss
@@ -278,6 +279,7 @@ files:
278
279
  - app/helpers/beyond_canvas/controller_helper.rb
279
280
  - app/helpers/beyond_canvas/debug_helper.rb
280
281
  - app/helpers/beyond_canvas/locale_switch_helper.rb
282
+ - app/helpers/beyond_canvas/statuses_helper.rb
281
283
  - app/javascript/beyond_canvas/base.js
282
284
  - app/javascript/beyond_canvas/initializers/buttons.js
283
285
  - app/javascript/beyond_canvas/initializers/flash.js