voom-presenters 0.1.9 → 0.1.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/voom/presenters/dsl/components/card.rb +2 -0
- data/lib/voom/presenters/dsl/components/chip.rb +5 -0
- data/lib/voom/presenters/dsl/components/list.rb +1 -2
- data/lib/voom/presenters/dsl/components/lists/line.rb +3 -2
- data/lib/voom/presenters/version.rb +1 -1
- data/views/mdc/components/chip.erb +10 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b1cba629f3ca42c67268345b97a5c5a93447473300cede17cda729a2565a25bf
|
4
|
+
data.tar.gz: aed08fed12db7811ae1d239032cdaa101d9601b70ff2a2861c7348c2b36f6963
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0060b02767176114ded06799007c342e87d566ae0738b92626518967ef7387e786f37fb810dcb71ac71603d32ba7a14e105ae9dd60db987aec66281b7fc0e4da
|
7
|
+
data.tar.gz: 518270151dec58e2bd46c6ccac7c6f8c635f8b723488e19a0dbeead79103f3b25bd6696e6b0a84411f9518bf56ec169b2a53aa344edc7d9d6f6a937ece907151
|
data/Gemfile.lock
CHANGED
@@ -8,6 +8,7 @@ require_relative 'mixins/text_fields'
|
|
8
8
|
require_relative 'mixins/icons'
|
9
9
|
require_relative 'mixins/snackbars'
|
10
10
|
require_relative 'mixins/date_time_fields'
|
11
|
+
require_relative 'mixins/chips'
|
11
12
|
|
12
13
|
module Voom
|
13
14
|
module Presenters
|
@@ -20,6 +21,7 @@ module Voom
|
|
20
21
|
include Mixins::DateTimeFields
|
21
22
|
include Mixins::Icons
|
22
23
|
include Mixins::Snackbars
|
24
|
+
include Mixins::Chips
|
23
25
|
|
24
26
|
attr_reader :height, :width, :selected, :components, :shows_errors
|
25
27
|
|
@@ -32,6 +32,11 @@ module Voom
|
|
32
32
|
**attribs, &block)
|
33
33
|
end
|
34
34
|
|
35
|
+
def menu(**attributes, &block)
|
36
|
+
return @menu if locked?
|
37
|
+
@menu = Components::Menu.new(parent: self, context: context, **attributes, &block)
|
38
|
+
end
|
39
|
+
|
35
40
|
class Icon < Components::IconBase
|
36
41
|
|
37
42
|
def initialize(**attribs_, &block)
|
@@ -18,8 +18,7 @@ module Voom
|
|
18
18
|
attr_accessor :components
|
19
19
|
|
20
20
|
def initialize(**attribs_, &block)
|
21
|
-
super(type: :list,
|
22
|
-
**attribs_, &block)
|
21
|
+
super(type: :list, **attribs_, &block)
|
23
22
|
@lines_only = attribs.delete(:lines_only) { false }
|
24
23
|
@selectable = attribs.delete(:selectable) { false }
|
25
24
|
@lines = []
|
@@ -12,8 +12,8 @@ module Voom
|
|
12
12
|
class Line < EventBase
|
13
13
|
attr_accessor :selected, :selectable
|
14
14
|
|
15
|
-
def initialize(
|
16
|
-
super(type: :line,
|
15
|
+
def initialize(**attribs_, &block)
|
16
|
+
super(type: :line, **attribs_, &block)
|
17
17
|
@selected = attribs.delete(:selected) { false }
|
18
18
|
@selectable = attribs.delete(:selectable) { false }
|
19
19
|
self.text(attribs.delete(:text)) if attribs.key?(:text)
|
@@ -81,6 +81,7 @@ module Voom
|
|
81
81
|
def actions(**attribs, &block)
|
82
82
|
return @actions if locked?
|
83
83
|
@actions << Lists::Action.new(parent: self,
|
84
|
+
context: context,
|
84
85
|
**attribs, &block)
|
85
86
|
end
|
86
87
|
alias action actions
|
@@ -9,9 +9,14 @@
|
|
9
9
|
<% if first_chip %>
|
10
10
|
<div class="mdc-chip-set">
|
11
11
|
<% end %>
|
12
|
+
<% if comp.menu %>
|
13
|
+
<div class="mdc-menu-anchor">
|
14
|
+
<% end %>
|
15
|
+
|
12
16
|
<div id="<%= comp.id %>"
|
13
17
|
class="mdc-chip
|
14
|
-
<%= color_classname(comp) %>
|
18
|
+
<%= color_classname(comp) %>
|
19
|
+
v-menu-click"
|
15
20
|
style = "<%= color_style(comp, 'background-') %>"
|
16
21
|
tabindex="0"
|
17
22
|
<%= erb(:"components/event", locals: {events: comp.events,
|
@@ -24,6 +29,10 @@
|
|
24
29
|
class_name: 'mdc-chip__icon mdc-chip__icon--trailing',
|
25
30
|
events: trailing_icon&.events || comp.events }) %>
|
26
31
|
</div>
|
32
|
+
<% if comp.menu %>
|
33
|
+
<%= erb :"components/list/menu", :locals => {:comp => comp.menu} %>
|
34
|
+
</div>
|
35
|
+
<%end%>
|
27
36
|
<% if last_chip %>
|
28
37
|
</div>
|
29
38
|
<% end %>
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: voom-presenters
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Russell Edens
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-07-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ice_nine
|