coveragebook_components 0.18.7 → 0.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/assets/build/coco/coco.css +42 -0
- data/app/assets/build/coco/coco.js +14767 -282
- 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
@@ -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
|