coveragebook_components 0.19.5 → 0.19.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/build/coco/coco.css +14 -12
- data/app/assets/build/coco/coco.js +1 -1
- data/app/assets/build/coco/icons/pin-filled.svg +4 -0
- data/app/assets/custom_icons/lucide/pin-filled.svg +4 -0
- data/app/components/coco/buttons/button/button.html.erb +5 -1
- data/app/components/coco/buttons/menu/menu.html.erb +1 -1
- data/app/components/coco/messaging/alert/alert.css +6 -10
- data/app/components/coco/messaging/alert/alert.html.erb +5 -3
- data/app/components/coco/messaging/alert/alert.rb +8 -2
- data/app/components/coco/messaging/system_banner/system_banner.css +4 -0
- data/lib/coco.rb +1 -1
- metadata +6 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eb938f79f2295a5296c3fb767558f9cb28fcb8d429616bcffe419b005e3c4d54
|
4
|
+
data.tar.gz: 685174da6af215912cbfb6e734c82d2858932bcb7e0f3c021d4d84b4883c1c07
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a0a804640f1eb756374f73f568970b922157c05ac9dd83bfc7c5d70261d52a03f56f0c0e510abbb50e8b0cf6404527e9bd2da6ac9b20e7269e783a1b4ae19b8e
|
7
|
+
data.tar.gz: 246fffd96347f7ac19d14b4789b868b303034dda56bc6d8f149679c3ea6b704efededcb8dae5af2b97a5d1e193ea4f23634673961ec0d617958978fea1165836
|
@@ -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.
|
15341
|
+
version: "0.19.7",
|
15342
15342
|
repository: "git@github.com:coveragebook/coco.git",
|
15343
15343
|
license: "NO LICENSE",
|
15344
15344
|
author: "Mark Perkins <mark@coveragebook.com>",
|
@@ -0,0 +1,4 @@
|
|
1
|
+
<svg width="17" height="16" viewBox="0 0 17 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
2
|
+
<path d="M8.29395 11.3333V14.6667" stroke="#111827" stroke-width="1.33333" stroke-linecap="round" stroke-linejoin="round"/>
|
3
|
+
<path d="M3.62729 11.3333H12.9606V10.16C12.9605 9.91194 12.8912 9.66884 12.7604 9.45802C12.6297 9.24721 12.4428 9.07705 12.2206 8.96666L11.034 8.36666C10.8118 8.25628 10.6249 8.08611 10.4941 7.8753C10.3634 7.66449 10.2941 7.42138 10.294 7.17333V3.99999H10.9606C11.3142 3.99999 11.6534 3.85952 11.9034 3.60947C12.1535 3.35942 12.294 3.02028 12.294 2.66666C12.294 2.31304 12.1535 1.9739 11.9034 1.72385C11.6534 1.4738 11.3142 1.33333 10.9606 1.33333H5.62729C5.27367 1.33333 4.93453 1.4738 4.68448 1.72385C4.43443 1.9739 4.29396 2.31304 4.29396 2.66666C4.29396 3.02028 4.43443 3.35942 4.68448 3.60947C4.93453 3.85952 5.27367 3.99999 5.62729 3.99999H6.29396V7.17333C6.29382 7.42138 6.2245 7.66449 6.09377 7.8753C5.96304 8.08611 5.7761 8.25628 5.55396 8.36666L4.36729 8.96666C4.14515 9.07705 3.9582 9.24721 3.82748 9.45802C3.69675 9.66884 3.62742 9.91194 3.62729 10.16V11.3333Z" fill="#111827" stroke="#111827" stroke-width="1.33333" stroke-linecap="round" stroke-linejoin="round"/>
|
4
|
+
</svg>
|
@@ -0,0 +1,4 @@
|
|
1
|
+
<svg width="17" height="16" viewBox="0 0 17 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
2
|
+
<path d="M8.29395 11.3333V14.6667" stroke="#111827" stroke-width="1.33333" stroke-linecap="round" stroke-linejoin="round"/>
|
3
|
+
<path d="M3.62729 11.3333H12.9606V10.16C12.9605 9.91194 12.8912 9.66884 12.7604 9.45802C12.6297 9.24721 12.4428 9.07705 12.2206 8.96666L11.034 8.36666C10.8118 8.25628 10.6249 8.08611 10.4941 7.8753C10.3634 7.66449 10.2941 7.42138 10.294 7.17333V3.99999H10.9606C11.3142 3.99999 11.6534 3.85952 11.9034 3.60947C12.1535 3.35942 12.294 3.02028 12.294 2.66666C12.294 2.31304 12.1535 1.9739 11.9034 1.72385C11.6534 1.4738 11.3142 1.33333 10.9606 1.33333H5.62729C5.27367 1.33333 4.93453 1.4738 4.68448 1.72385C4.43443 1.9739 4.29396 2.31304 4.29396 2.66666C4.29396 3.02028 4.43443 3.35942 4.68448 3.60947C4.93453 3.85952 5.27367 3.99999 5.62729 3.99999H6.29396V7.17333C6.29382 7.42138 6.2245 7.66449 6.09377 7.8753C5.96304 8.08611 5.7761 8.25628 5.55396 8.36666L4.36729 8.96666C4.14515 9.07705 3.9582 9.24721 3.82748 9.45802C3.69675 9.66884 3.62742 9.91194 3.62729 10.16V11.3333Z" fill="#111827" stroke="#111827" stroke-width="1.33333" stroke-linecap="round" stroke-linejoin="round"/>
|
4
|
+
</svg>
|
@@ -1,4 +1,8 @@
|
|
1
|
-
<%= coco_tag(:div,
|
1
|
+
<%= coco_tag(:div,
|
2
|
+
class: "coco-button-wrapper",
|
3
|
+
x: alpine_wrapper_attrs.to_h,
|
4
|
+
key: ("coco-bw-#{rand(100000)}" if dropdown?)
|
5
|
+
) do %>
|
2
6
|
<%= render component_tag(button_tag,
|
3
7
|
class: {
|
4
8
|
"coco-button": true,
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<%= render component_tag do %>
|
2
|
-
<ol class="menu-items">
|
2
|
+
<ol class="menu-items" @click="if ($event.target.closest('button') !== null || $event.target.closest('a') !== null) {button?.$el?.click()}">
|
3
3
|
<% items.compact.each do |item| %>
|
4
4
|
<li class="menu-item">
|
5
5
|
<%= item %>
|
@@ -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
|
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
|
-
|
13
|
-
|
14
|
-
|
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
|
-
|
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
|
data/lib/coco.rb
CHANGED
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.
|
4
|
+
version: 0.19.7
|
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-
|
11
|
+
date: 2024-11-19 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.
|
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.
|
46
|
+
version: '3.20'
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: turbo-rails
|
49
49
|
requirement: !ruby/object:Gem::Requirement
|
@@ -1137,6 +1137,7 @@ files:
|
|
1137
1137
|
- app/assets/build/coco/icons/pilcrow.svg
|
1138
1138
|
- app/assets/build/coco/icons/pill-bottle.svg
|
1139
1139
|
- app/assets/build/coco/icons/pill.svg
|
1140
|
+
- app/assets/build/coco/icons/pin-filled.svg
|
1140
1141
|
- app/assets/build/coco/icons/pin-off.svg
|
1141
1142
|
- app/assets/build/coco/icons/pin.svg
|
1142
1143
|
- app/assets/build/coco/icons/pipette.svg
|
@@ -1629,6 +1630,7 @@ files:
|
|
1629
1630
|
- app/assets/css/plugins/icons.js
|
1630
1631
|
- app/assets/css/plugins/layout.js
|
1631
1632
|
- app/assets/css/plugins/text.js
|
1633
|
+
- app/assets/custom_icons/lucide/pin-filled.svg
|
1632
1634
|
- app/assets/custom_icons/other/eye-off-red.svg
|
1633
1635
|
- app/assets/custom_icons/other/google-sso.svg
|
1634
1636
|
- app/assets/custom_icons/other/layout-overlay.svg
|