coveragebook_components 0.18.8 → 0.19.0
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 +42 -0
- data/app/assets/build/coco/coco.js +1 -1
- data/app/components/coco/navigation/tabs/tabs.css +37 -0
- data/app/components/coco/navigation/tabs/tabs.html.erb +5 -0
- data/app/components/coco/navigation/tabs/tabs.rb +13 -0
- data/app/helpers/coco/components_helper.rb +4 -0
- data/lib/coco.rb +1 -1
- metadata +5 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eb5049eeec9c70081fd0cc9fec4723e35da58b39e02597077cc1a20625370b8f
|
4
|
+
data.tar.gz: c99db45370f570dd98fb3c67016925f7a1d6c950bbe1b446b3be253a6023ebe2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '09a1eb6b7ec6f403018617a0f2a9ae3a6a3947673756714a314a3372e20443ce1bea81eb9f8dd755b91fb401fdc3ee034a74280639d9fe15cfb8d0101e6f41a3'
|
7
|
+
data.tar.gz: 805735413da217fedda4b939504d1b0f627effce246aea20fee7aa13ee65870b581060e5513c0a8f19938b089a064a08a83b58bf037a5037092628928a1cd497
|
@@ -5032,6 +5032,48 @@ select{
|
|
5032
5032
|
margin-right: -0.25rem
|
5033
5033
|
}
|
5034
5034
|
|
5035
|
+
[data-coco][data-component="tabs"]{
|
5036
|
+
border-bottom-width: 1px;
|
5037
|
+
border-color: rgba(0, 12, 39, 0.18)
|
5038
|
+
}
|
5039
|
+
|
5040
|
+
[data-coco][data-component="tabs"] [role="tablist"] {
|
5041
|
+
display: flex;
|
5042
|
+
position: relative;
|
5043
|
+
width: 100%;
|
5044
|
+
}
|
5045
|
+
|
5046
|
+
[data-coco][data-component="tabs"] [role="tab"]{
|
5047
|
+
border-bottom-width: 2px;
|
5048
|
+
border-color: transparent;
|
5049
|
+
position: relative;
|
5050
|
+
bottom: -1px
|
5051
|
+
}
|
5052
|
+
|
5053
|
+
[data-coco][data-component="tabs"] [role="tab"] .coco-button{
|
5054
|
+
--tw-text-opacity: 1;
|
5055
|
+
color: rgb(156 163 175 / var(--tw-text-opacity))
|
5056
|
+
}
|
5057
|
+
|
5058
|
+
[data-coco][data-component="tabs"] [role="tab"] .coco-button:hover{
|
5059
|
+
--tw-text-opacity: 1;
|
5060
|
+
color: rgb(31 41 55 / var(--tw-text-opacity))
|
5061
|
+
}
|
5062
|
+
|
5063
|
+
[data-coco][data-component="tabs"] [role="tab"].active{
|
5064
|
+
--tw-border-opacity: 1;
|
5065
|
+
border-color: rgb(17 24 39 / var(--tw-border-opacity))
|
5066
|
+
}
|
5067
|
+
|
5068
|
+
[data-coco][data-component="tabs"] [role="tab"].active .coco-button{
|
5069
|
+
--tw-text-opacity: 1;
|
5070
|
+
color: rgb(17 24 39 / var(--tw-text-opacity))
|
5071
|
+
}
|
5072
|
+
|
5073
|
+
[data-coco][data-component="tabs"][data-fit="full"] [role="tab"] {
|
5074
|
+
width: 100%;
|
5075
|
+
}
|
5076
|
+
|
5035
5077
|
[data-coco][data-component="color-picker"]{
|
5036
5078
|
--tw-bg-opacity: 1;
|
5037
5079
|
background-color: rgb(249 250 251 / var(--tw-bg-opacity))
|
@@ -15296,7 +15296,7 @@ var alpine_default = import_alpinejs.default;
|
|
15296
15296
|
// ../../../package.json
|
15297
15297
|
var package_default = {
|
15298
15298
|
name: "coveragebook-components",
|
15299
|
-
version: "0.
|
15299
|
+
version: "0.19.0",
|
15300
15300
|
repository: "git@github.com:coveragebook/coco.git",
|
15301
15301
|
license: "NO LICENSE",
|
15302
15302
|
author: "Mark Perkins <mark@coveragebook.com>",
|
@@ -0,0 +1,37 @@
|
|
1
|
+
@layer components {
|
2
|
+
[data-coco][data-component="tabs"] {
|
3
|
+
@apply border-b border-gray-transparent-200;
|
4
|
+
|
5
|
+
[role="tablist"] {
|
6
|
+
display: flex;
|
7
|
+
position: relative;
|
8
|
+
width: 100%;
|
9
|
+
}
|
10
|
+
|
11
|
+
[role="tab"] {
|
12
|
+
@apply border-b-2 border-transparent;
|
13
|
+
position: relative;
|
14
|
+
bottom: -1px;
|
15
|
+
|
16
|
+
.coco-button {
|
17
|
+
@apply text-content-dark-muted;
|
18
|
+
|
19
|
+
&:hover {
|
20
|
+
@apply text-content-dark-2;
|
21
|
+
}
|
22
|
+
}
|
23
|
+
|
24
|
+
&.active {
|
25
|
+
@apply border-background-dark-1;
|
26
|
+
|
27
|
+
.coco-button {
|
28
|
+
@apply text-content-dark-1;
|
29
|
+
}
|
30
|
+
}
|
31
|
+
}
|
32
|
+
|
33
|
+
&[data-fit="full"] [role="tab"] {
|
34
|
+
width: 100%;
|
35
|
+
}
|
36
|
+
}
|
37
|
+
}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
module Coco
|
2
|
+
class Tabs < Coco::Component
|
3
|
+
include Concerns::AcceptsOptions
|
4
|
+
|
5
|
+
accepts_option :fit, from: [:auto, :full], default: :auto
|
6
|
+
|
7
|
+
renders_many :tabs, ->(*args, active: false, **kwargs, &block) do
|
8
|
+
tag.li(class: {active:}, role: "tab") do
|
9
|
+
coco_button(*args, **kwargs, theme: :blank, fit: get_option_value(:fit), &block)
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
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.
|
4
|
+
version: 0.19.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: 2024-07-
|
11
|
+
date: 2024-07-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -1685,6 +1685,9 @@ files:
|
|
1685
1685
|
- app/components/coco/navigation/pager_button/pager_button.css
|
1686
1686
|
- app/components/coco/navigation/pager_button/pager_button.html.erb
|
1687
1687
|
- app/components/coco/navigation/pager_button/pager_button.rb
|
1688
|
+
- app/components/coco/navigation/tabs/tabs.css
|
1689
|
+
- app/components/coco/navigation/tabs/tabs.html.erb
|
1690
|
+
- app/components/coco/navigation/tabs/tabs.rb
|
1688
1691
|
- app/components/coco/pickers/color_picker/color_picker.css
|
1689
1692
|
- app/components/coco/pickers/color_picker/color_picker.html.erb
|
1690
1693
|
- app/components/coco/pickers/color_picker/color_picker.js
|