coveragebook_components 0.19.5 → 0.19.6

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: a1d2704c6cd4936c7c4ab5d7b662753d96e9b5339bbcc616de4426810513c4ca
4
- data.tar.gz: 7e30ef8812a9348343ed83f5afeb2fa3a46b5c2cf2594ba7eb100a1d817b0104
3
+ metadata.gz: 5a6fb593342b6d0d763f42c38489d2e8d8099cf829d40723fca1dfa0436c729b
4
+ data.tar.gz: d47179da3e25b9c8ccccac86046b3520049db717a08f4f4a5127a82a1441bdc3
5
5
  SHA512:
6
- metadata.gz: 6b6c0c6e7877e033a90380df797fb3627ef05fb5d7ff45b0d8c986f9f587afd6e8804eaa23a935598b2c626337c32a4bc4ccfe5adc34caf5e9c8bfd9840d463f
7
- data.tar.gz: e4ae100660db97da842376df34f758df39a4df72c0b2fda46d891c5a26fd57c8c9e7c25b3cb870a58c6deef2f0ff37910da8bd8b0335df65dee1d402596546e5
6
+ metadata.gz: 8623cb1e2a5f3f8ed328d6a83eec049e62729a4b2f829d534a5a8c2e35415d72a2f595d08418455bef5c515391e4e372cfce95f700a3247668faa6538fedee4d
7
+ data.tar.gz: 5345ffa5480a34a6fd15684411f4f9a2760c20e809c630cedcbf2324e665dd8d99f252aede51a09b5769eabbf3d0dcdad181b00e7a62dbb8e7b764c6a754cfc6
@@ -3824,20 +3824,14 @@ select{
3824
3824
  padding-bottom: 0.5rem
3825
3825
  }
3826
3826
 
3827
- /*
3828
- .alert-icon {
3829
- @apply flex items-center p-2 rounded-full;
3830
-
3831
- .coco-icon {
3832
- @apply w-5 h-5;
3833
- }
3834
- } */
3835
-
3836
3827
  [data-coco][data-component="alert"] .alert-body{
3837
- padding-left: 1rem;
3838
3828
  padding-right: 0.5rem
3839
3829
  }
3840
3830
 
3831
+ [data-coco][data-component="alert"] .alert-stamp + .alert-body{
3832
+ padding-left: 1rem
3833
+ }
3834
+
3841
3835
  [data-coco][data-component="alert"] .alert-content{
3842
3836
  width: 100%;
3843
3837
  --tw-text-opacity: 1;
@@ -4004,7 +3998,7 @@ select{
4004
3998
  padding-bottom: 0.375rem;
4005
3999
  }
4006
4000
 
4007
- [data-coco][data-component="alert"][data-condensed="true"] .alert-body{
4001
+ [data-coco][data-component="alert"][data-condensed="true"] .alert-stamp + .alert-body{
4008
4002
  padding-left: 0.75rem
4009
4003
  }
4010
4004
 
@@ -4552,8 +4546,16 @@ select{
4552
4546
  opacity: 0
4553
4547
  }
4554
4548
 
4555
- [data-coco][data-component="system-banner"] {
4549
+ [data-coco][data-component="system-banner"] .alert-stamp{
4550
+ margin-top: 0.25rem !important
4551
+ }
4552
+
4553
+ @container (min-width: 550px){
4554
+
4555
+ [data-coco][data-component="system-banner"] .alert-stamp{
4556
+ margin-top: 0px !important
4556
4557
  }
4558
+ }
4557
4559
 
4558
4560
  [data-coco][data-component="toast"]{
4559
4561
  width: 100%;
@@ -15338,7 +15338,7 @@ var alpine_default = import_alpinejs.default;
15338
15338
  // ../../../package.json
15339
15339
  var package_default = {
15340
15340
  name: "coveragebook-components",
15341
- version: "0.19.5",
15341
+ version: "0.19.6",
15342
15342
  repository: "git@github.com:coveragebook/coco.git",
15343
15343
  license: "NO LICENSE",
15344
15344
  author: "Mark Perkins <mark@coveragebook.com>",
@@ -5,17 +5,13 @@
5
5
  .alert-container {
6
6
  @apply flex items-start px-4 py-2 relative;
7
7
  }
8
- /*
9
- .alert-icon {
10
- @apply flex items-center p-2 rounded-full;
11
-
12
- .coco-icon {
13
- @apply w-5 h-5;
14
- }
15
- } */
16
8
 
17
9
  .alert-body {
18
- @apply pl-4 pr-2;
10
+ @apply pr-2;
11
+ }
12
+
13
+ .alert-stamp + .alert-body {
14
+ @apply pl-4;
19
15
  }
20
16
 
21
17
  .alert-content {
@@ -88,7 +84,7 @@
88
84
  @apply py-1.5;
89
85
  }
90
86
 
91
- .alert-body {
87
+ .alert-stamp + .alert-body {
92
88
  @apply pl-3;
93
89
  }
94
90
 
@@ -9,9 +9,11 @@
9
9
  "vivid": vivid?
10
10
  }) do %>
11
11
  <div class="alert-container">
12
- <div class="alert-stamp" data-role="icon">
13
- <%= stamp %>
14
- </div>
12
+ <% if stamp.present? %>
13
+ <div class="alert-stamp" data-role="icon">
14
+ <%= stamp %>
15
+ </div>
16
+ <% end %>
15
17
 
16
18
  <div class="alert-body">
17
19
  <div class="alert-content" data-role="content">
@@ -12,6 +12,7 @@ module Coco
12
12
  accepts_option :single_line, from: [true, false]
13
13
  accepts_option :cloak, from: [true, false], default: true, private: true
14
14
  accepts_option :condensed, from: [true, false], default: false
15
+ accepts_option :icon, default: true
15
16
 
16
17
  renders_one :title
17
18
  renders_one :message
@@ -68,13 +69,18 @@ module Coco
68
69
  end
69
70
 
70
71
  def stamp
71
- type = unvividify(get_option_value(:theme))&.to_sym
72
72
  style = if get_option_value(:banner)
73
73
  :compact
74
74
  else
75
75
  vivid? ? :inverse : :subtle
76
76
  end
77
- coco_stamp(type, style:)
77
+
78
+ if get_option_value(:icon) == true
79
+ type = unvividify(get_option_value(:theme))&.to_sym
80
+ coco_stamp(type, style:)
81
+ elsif get_option_value(:icon).present?
82
+ coco_stamp(icon: get_option_value(:icon), style:)
83
+ end
78
84
  end
79
85
  end
80
86
  end
@@ -1,4 +1,8 @@
1
1
  @layer components {
2
2
  [data-coco][data-component="system-banner"] {
3
+ .alert-stamp {
4
+ @apply !mt-1;
5
+ @apply @[550px]:!mt-0;
6
+ }
3
7
  }
4
8
  }
data/lib/coco.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Coco
2
- VERSION = "0.19.5"
2
+ VERSION = "0.19.6"
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.19.5
4
+ version: 0.19.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mark Perkins
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-10-16 00:00:00.000000000 Z
11
+ date: 2024-10-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -33,7 +33,7 @@ dependencies:
33
33
  version: '3.9'
34
34
  - - "<"
35
35
  - !ruby/object:Gem::Version
36
- version: '3.13'
36
+ version: '3.20'
37
37
  type: :runtime
38
38
  prerelease: false
39
39
  version_requirements: !ruby/object:Gem::Requirement
@@ -43,7 +43,7 @@ dependencies:
43
43
  version: '3.9'
44
44
  - - "<"
45
45
  - !ruby/object:Gem::Version
46
- version: '3.13'
46
+ version: '3.20'
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: turbo-rails
49
49
  requirement: !ruby/object:Gem::Requirement