coveragebook_components 0.8.0.beta.3 → 0.8.0

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: fd091a2e16041e7c228e055e43093de5a7b7fefb7747872059c313681993c774
4
- data.tar.gz: 9161c4c85b14f3b1bcee2b57472fc0596d74b2543a36ddb714d9582abf897699
3
+ metadata.gz: ae77cd8872af17a8cd219cb7a618bd31ad7b91ab25b1c852d5b64f24e2d737d9
4
+ data.tar.gz: 9b81c6df5c45518c68cf232ee7ffa91e4624cd7a9ccb9313d27a216d2daf8630
5
5
  SHA512:
6
- metadata.gz: cb9820183b0356270f175fa9b55a4627053b00c495caf31c7e9b1e3cd220f56d7ddbfa0e50486031eab376c373760102964d37d2d494d346377a45dd3ffda617
7
- data.tar.gz: a799d7ed6d316ec0fad9d46d94b09c513833d80ab8e77777fa6d2664814d4a97f2511b865374a685c0162af51c2993a9d103a7dd9ab298c343cf26b4b438b17b
6
+ metadata.gz: 675ca27e722a47f807018e81c069396b7f6476f8ac04a2cb63676442de5f2fbbe307354f6d693eea04318c81f205671627d5b50dcd978a1d848749b2853d971d
7
+ data.tar.gz: 20280d160c4ea2c53bd8fe600bb04180e42815091a60530c962ccabe0021fb8fedfaae6a8cc6c15dac2abfa6759fc2b2e45f5d6f74f8dbab6aff64fdea22df08
@@ -14038,7 +14038,7 @@
14038
14038
  var package_default = {
14039
14039
  name: "coveragebook-components",
14040
14040
  type: "module",
14041
- version: "0.8.0-beta.3",
14041
+ version: "0.8.0",
14042
14042
  main: "index.js",
14043
14043
  repository: "git@github.com:coveragebook/coco.git",
14044
14044
  author: "Mark Perkins <mark@coveragebook.com>",
@@ -20,7 +20,7 @@
20
20
  <% end %>
21
21
 
22
22
  <p class="alert-message"<% if single_line? %> x-dimensions="checkSingleLineWrap(dimensions)"<% end %>>
23
- <%= content %>
23
+ <%= message? ? message : content %>
24
24
  </p>
25
25
 
26
26
  <% if link? %>
@@ -26,6 +26,7 @@ module Coco
26
26
  accepts_option :condensed, from: [true, false], default: false
27
27
 
28
28
  renders_one :title
29
+ renders_one :message
29
30
 
30
31
  renders_one :action, ->(*args, **kwargs, &block) do
31
32
  theme = vivid? ? "neutral-dark" : get_option_value(:theme)
@@ -1,5 +1,4 @@
1
- <%= render component_tag(
2
- x: { data: x_data("appSystemBanner", alpine_data), bind: "root"}) do %>
1
+ <%= render component_tag(x: { data: x_data("appSystemBanner", alpine_data), bind: "root"}) do %>
3
2
  <%= render alert do %>
4
3
  <%= content %>
5
4
  <% end %>
@@ -20,12 +20,20 @@ module Coco
20
20
  )
21
21
  end
22
22
 
23
- %i[title action secondary_action link].each do |slot_name|
23
+ %i[action secondary_action link].each do |slot_name|
24
24
  renders_one slot_name, ->(*args, **kwargs, &block) do
25
25
  alert.send("with_#{slot_name}".to_sym, *args, **kwargs, &block)
26
26
  end
27
27
  end
28
28
 
29
+ renders_one :title, ->(text = nil, **kwargs, &block) do
30
+ alert.public_send(:with_title, **kwargs) { text.presence || block.call }
31
+ end
32
+
33
+ renders_one :message, ->(text = nil, **kwargs, &block) do
34
+ alert.public_send(:with_message, **kwargs) { text.presence || block.call }
35
+ end
36
+
29
37
  before_render do
30
38
  if dismissable? && id.blank?
31
39
  raise ArgumentError, "Dismissable banners must be given an ID"
data/lib/coco.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Coco
2
- VERSION = "0.8.0.beta.3"
2
+ VERSION = "0.8.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: coveragebook_components
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0.beta.3
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mark Perkins
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-10-23 00:00:00.000000000 Z
11
+ date: 2023-10-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -1605,9 +1605,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
1605
1605
  version: 3.2.0
1606
1606
  required_rubygems_version: !ruby/object:Gem::Requirement
1607
1607
  requirements:
1608
- - - ">"
1608
+ - - ">="
1609
1609
  - !ruby/object:Gem::Version
1610
- version: 1.3.1
1610
+ version: '0'
1611
1611
  requirements: []
1612
1612
  rubygems_version: 3.4.19
1613
1613
  signing_key: