coveragebook_components 0.10.0 → 0.10.1.beta.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/app.css +4339 -3025
- data/app/assets/build/coco/app.js +116 -104
- data/app/assets/build/coco/book.css +1492 -92
- data/app/assets/build/coco/book.js +278 -17
- data/app/assets/css/app/tippy.css +1 -1
- data/app/assets/css/app.css +3 -3
- data/app/assets/css/{base/base.css → base.css} +14 -7
- data/app/assets/css/book.css +2 -2
- data/app/assets/css/{libs → shared}/tippy.css +20 -1
- data/app/assets/css/shared/utils/text.css +143 -0
- data/app/assets/js/app.js +2 -2
- data/app/assets/js/book.js +2 -2
- data/app/assets/js/libs/alpine/directives/dropdown.js +1 -1
- data/app/assets/js/libs/alpine/directives/tooltip.js +1 -1
- data/app/assets/js/shared/components.js +4 -0
- data/app/components/coco/app/blocks/header/header.js +1 -1
- data/app/components/coco/app/blocks/header/header.rb +2 -2
- data/app/components/coco/app/blocks/nav_drawer/nav_drawer.css +4 -0
- data/app/components/coco/app/blocks/nav_drawer/nav_drawer.js +1 -1
- data/app/components/coco/app/blocks/sidebar_nav/item/item.css +3 -3
- data/app/components/coco/app/blocks/sidebar_nav/item/item.js +2 -2
- data/app/components/coco/app/blocks/sidebar_nav/menu/menu.css +3 -3
- data/app/components/coco/app/blocks/sidebar_nav/menu/menu.js +1 -1
- data/app/components/coco/app/blocks/sidebar_nav/navbar/navbar.js +1 -1
- data/app/components/coco/app/blocks/slide_editor/slide_editor.js +1 -1
- data/app/components/coco/app/elements/alert/alert.css +4 -4
- data/app/components/coco/app/elements/alert/alert.js +1 -1
- data/app/components/coco/app/elements/color_picker/color_picker.css +2 -2
- data/app/components/coco/app/elements/color_picker/color_picker.js +1 -1
- data/app/components/coco/app/elements/color_picker_button/color_picker_button.js +1 -1
- data/app/components/coco/app/elements/color_picker_button/color_picker_button.rb +3 -3
- data/app/components/coco/app/elements/confirm_panel/confirm_panel.css +1 -1
- data/app/components/coco/app/elements/confirm_panel/confirm_panel.js +1 -1
- data/app/components/coco/app/elements/image_picker/image_picker.css +4 -4
- data/app/components/coco/app/elements/image_picker/image_picker.js +1 -1
- data/app/components/coco/app/elements/image_picker_button/image_picker_button.js +1 -1
- data/app/components/coco/app/elements/image_picker_button/image_picker_button.rb +3 -3
- data/app/components/coco/app/elements/layout_picker_button/layout_picker_button.js +1 -1
- data/app/components/coco/app/elements/layout_picker_button/layout_picker_button.rb +3 -3
- data/app/components/coco/app/elements/link/link.rb +1 -1
- data/app/components/coco/app/elements/menu/menu.css +5 -5
- data/app/components/coco/app/elements/menu_button/menu_button.js +1 -1
- data/app/components/coco/app/elements/menu_button/menu_button.rb +3 -3
- data/app/components/coco/app/elements/menu_items/user_profile/user_profile.css +1 -1
- data/app/components/coco/app/elements/notice/notice.js +1 -1
- data/app/components/coco/app/elements/seamless_textarea/seamless_textarea.js +1 -1
- data/app/components/coco/app/elements/snackbar/snackbar.css +1 -1
- data/app/components/coco/app/elements/snackbar/snackbar.js +1 -1
- data/app/components/coco/app/elements/system_banner/system_banner.js +1 -1
- data/app/components/coco/app/elements/toast/toast.js +1 -1
- data/app/components/coco/app/elements/toolbar/toolbar.js +1 -1
- data/app/components/coco/app/elements/toolbar/toolbar.rb +1 -1
- data/app/components/coco/app/fields/button_component.rb +1 -1
- data/app/components/coco/app/fields/submit_component.rb +1 -0
- data/app/components/coco/app/layouts/application/application.js +1 -1
- data/app/components/coco/app/layouts/page/page.js +1 -1
- data/app/components/coco/{app/elements → shared}/button/button.css +104 -32
- data/app/components/coco/shared/button/button.html.erb +83 -0
- data/app/components/coco/{base → shared}/button/button.js +2 -1
- data/app/components/coco/{base → shared}/button/button.rb +107 -42
- data/app/components/coco/{base → shared}/button/button_dropdown.js +11 -2
- data/app/components/coco/{app/elements → shared}/button_group/button_group.css +1 -1
- data/app/components/coco/{app/elements → shared}/button_group/button_group.js +12 -4
- data/app/components/coco/shared/button_group/button_group.rb +40 -0
- data/app/components/coco/{app/elements → shared}/button_to/button_to.css +1 -1
- data/app/components/coco/shared/button_to/button_to.rb +50 -0
- data/app/components/coco/{base → shared}/dropdown/dropdown.js +1 -1
- data/app/components/coco/{base → shared}/icon/icon.js +1 -1
- data/app/components/coco/{base → shared}/image_uploader/image_uploader.js +1 -1
- data/app/components/coco/{base → shared}/modal/modal.js +2 -2
- data/app/components/coco/{base → shared}/modal_dialog/modal_dialog.js +1 -1
- data/app/components/coco/{base → shared}/modal_lightbox/modal_lightbox.js +1 -1
- data/app/components/coco/{base → shared}/poll_controller/poll_controller.js +1 -1
- data/app/helpers/coco/app_helper.rb +0 -23
- data/app/helpers/coco/component_helper.rb +1 -1
- data/app/helpers/coco/{base_helper.rb → shared_helper.rb} +24 -1
- data/app/helpers/coco/url_helper.rb +1 -1
- data/lib/coco/engine.rb +2 -2
- data/lib/coco.rb +1 -1
- data/lib/generators/coco/coco_generator.rb +1 -1
- metadata +74 -79
- data/app/assets/css/base/components/coco.css +0 -5
- data/app/assets/css/base/components/dropdown.css +0 -7
- data/app/assets/css/base/components/tooltip.css +0 -19
- data/app/assets/css/base/utils/text.css +0 -79
- data/app/assets/js/base/components.js +0 -4
- data/app/components/coco/app/elements/button/button.rb +0 -87
- data/app/components/coco/app/elements/button_group/button_group.rb +0 -42
- data/app/components/coco/app/elements/button_to/button_to.rb +0 -54
- data/app/components/coco/base/button/button.css +0 -75
- data/app/components/coco/base/button/button.html.erb +0 -71
- /data/app/assets/css/app/{utilities.css → utils.css} +0 -0
- /data/app/assets/css/{base → shared}/utils/colors.css +0 -0
- /data/app/assets/css/{base → shared}/utils/icons.css +0 -0
- /data/app/assets/js/{coco.js → shared/coco.js} +0 -0
- /data/app/components/coco/{base → shared}/avatar/avatar.css +0 -0
- /data/app/components/coco/{base → shared}/avatar/avatar.rb +0 -0
- /data/app/components/coco/{app/elements → shared}/button_group/button_group.html.erb +0 -0
- /data/app/components/coco/{app/elements → shared}/button_to/button_to.html.erb +0 -0
- /data/app/components/coco/{base → shared}/content/content.rb +0 -0
- /data/app/components/coco/{base → shared}/dropdown/dropdown.css +0 -0
- /data/app/components/coco/{base → shared}/dropdown/dropdown.html.erb +0 -0
- /data/app/components/coco/{base → shared}/dropdown/dropdown.rb +0 -0
- /data/app/components/coco/{base → shared}/embeds/youtube/youtube.css +0 -0
- /data/app/components/coco/{base → shared}/embeds/youtube/youtube.html.erb +0 -0
- /data/app/components/coco/{base → shared}/embeds/youtube/youtube.rb +0 -0
- /data/app/components/coco/{base → shared}/icon/icon.css +0 -0
- /data/app/components/coco/{base → shared}/icon/icon.html.erb +0 -0
- /data/app/components/coco/{base → shared}/icon/icon.rb +0 -0
- /data/app/components/coco/{base → shared}/image/image.css +0 -0
- /data/app/components/coco/{base → shared}/image/image.rb +0 -0
- /data/app/components/coco/{base → shared}/image_uploader/image_uploader.css +0 -0
- /data/app/components/coco/{base → shared}/image_uploader/image_uploader.html.erb +0 -0
- /data/app/components/coco/{base → shared}/image_uploader/image_uploader.rb +0 -0
- /data/app/components/coco/{base → shared}/link/link.css +0 -0
- /data/app/components/coco/{base → shared}/link/link.rb +0 -0
- /data/app/components/coco/{base → shared}/modal/modal.css +0 -0
- /data/app/components/coco/{base → shared}/modal/modal.html.erb +0 -0
- /data/app/components/coco/{base → shared}/modal/modal.rb +0 -0
- /data/app/components/coco/{base → shared}/modal_dialog/modal_dialog.css +0 -0
- /data/app/components/coco/{base → shared}/modal_dialog/modal_dialog.html.erb +0 -0
- /data/app/components/coco/{base → shared}/modal_dialog/modal_dialog.rb +0 -0
- /data/app/components/coco/{base → shared}/modal_lightbox/modal_lightbox.css +0 -0
- /data/app/components/coco/{base → shared}/modal_lightbox/modal_lightbox.html.erb +0 -0
- /data/app/components/coco/{base → shared}/modal_lightbox/modal_lightbox.rb +0 -0
- /data/app/components/coco/{base → shared}/pager_link/pager_link.css +0 -0
- /data/app/components/coco/{base → shared}/pager_link/pager_link.html.erb +0 -0
- /data/app/components/coco/{base → shared}/pager_link/pager_link.rb +0 -0
- /data/app/components/coco/{base → shared}/panel/panel.css +0 -0
- /data/app/components/coco/{base → shared}/panel/panel.html.erb +0 -0
- /data/app/components/coco/{base → shared}/panel/panel.rb +0 -0
- /data/app/components/coco/{base → shared}/placeholder/placeholder.css +0 -0
- /data/app/components/coco/{base → shared}/placeholder/placeholder.html.erb +0 -0
- /data/app/components/coco/{base → shared}/placeholder/placeholder.rb +0 -0
- /data/app/components/coco/{base → shared}/poll_controller/poll_controller.css +0 -0
- /data/app/components/coco/{base → shared}/poll_controller/poll_controller.html.erb +0 -0
- /data/app/components/coco/{base → shared}/poll_controller/poll_controller.rb +0 -0
- /data/app/components/coco/{base → shared}/svg/svg.html.erb +0 -0
- /data/app/components/coco/{base → shared}/svg/svg.rb +0 -0
@@ -3,7 +3,7 @@ module Coco
|
|
3
3
|
module Blocks
|
4
4
|
class Header < Coco::Component
|
5
5
|
renders_one :primary_nav, ->(**kwargs) do
|
6
|
-
Coco::
|
6
|
+
Coco::ButtonGroup.new(
|
7
7
|
theme: :text_neutral_light,
|
8
8
|
collapsible: false,
|
9
9
|
size: :xs,
|
@@ -12,7 +12,7 @@ module Coco
|
|
12
12
|
end
|
13
13
|
|
14
14
|
renders_one :secondary_nav, ->(**kwargs) do
|
15
|
-
Coco::
|
15
|
+
Coco::ButtonGroup.new(
|
16
16
|
theme: :text_neutral_light,
|
17
17
|
collapsible: false,
|
18
18
|
size: :xs,
|
@@ -42,7 +42,7 @@
|
|
42
42
|
@layer utilities {
|
43
43
|
.app-sidebar-nav-horizontal-item {
|
44
44
|
.nav-item-label {
|
45
|
-
@apply
|
45
|
+
@apply coco-label-xxs mt-0.5;
|
46
46
|
}
|
47
47
|
|
48
48
|
.nav-item-icon .coco-icon {
|
@@ -81,7 +81,7 @@
|
|
81
81
|
@apply py-4;
|
82
82
|
|
83
83
|
.nav-item-label {
|
84
|
-
@apply
|
84
|
+
@apply coco-label-xxs mt-1;
|
85
85
|
}
|
86
86
|
|
87
87
|
.nav-item-icon .coco-icon {
|
@@ -102,7 +102,7 @@
|
|
102
102
|
@apply py-5;
|
103
103
|
|
104
104
|
.nav-item-label {
|
105
|
-
@apply
|
105
|
+
@apply coco-label-xs mt-1.5;
|
106
106
|
}
|
107
107
|
|
108
108
|
.nav-item-icon .coco-icon {
|
@@ -22,7 +22,7 @@
|
|
22
22
|
}
|
23
23
|
|
24
24
|
.menu-item-qualifier {
|
25
|
-
@apply ml-auto
|
25
|
+
@apply ml-auto coco-label-sm flex-none pl-4;
|
26
26
|
}
|
27
27
|
|
28
28
|
.menu-item-select {
|
@@ -47,12 +47,12 @@
|
|
47
47
|
}
|
48
48
|
|
49
49
|
h4 {
|
50
|
-
@apply text-content-light-1 font-bold
|
50
|
+
@apply text-content-light-1 font-bold coco-heading-6;
|
51
51
|
grid-area: title;
|
52
52
|
}
|
53
53
|
|
54
54
|
div {
|
55
|
-
@apply
|
55
|
+
@apply coco-para-sm;
|
56
56
|
grid-area: text;
|
57
57
|
}
|
58
58
|
}
|
@@ -23,11 +23,11 @@
|
|
23
23
|
}
|
24
24
|
|
25
25
|
.alert-title {
|
26
|
-
@apply
|
26
|
+
@apply coco-heading-6 font-bold;
|
27
27
|
}
|
28
28
|
|
29
29
|
.alert-message {
|
30
|
-
@apply
|
30
|
+
@apply coco-para-md;
|
31
31
|
|
32
32
|
a {
|
33
33
|
@apply text-current;
|
@@ -93,11 +93,11 @@
|
|
93
93
|
}
|
94
94
|
|
95
95
|
.alert-title {
|
96
|
-
@apply
|
96
|
+
@apply coco-para-md sm:coco-para-sm xl:coco-para-md;
|
97
97
|
}
|
98
98
|
|
99
99
|
.alert-message {
|
100
|
-
@apply
|
100
|
+
@apply coco-para-md sm:coco-para-sm xl:coco-para-md;
|
101
101
|
}
|
102
102
|
}
|
103
103
|
|
@@ -110,7 +110,7 @@
|
|
110
110
|
}
|
111
111
|
|
112
112
|
.picker-display-input {
|
113
|
-
@apply
|
113
|
+
@apply coco-para-sm h-9;
|
114
114
|
}
|
115
115
|
|
116
116
|
.picker-display-color {
|
@@ -143,7 +143,7 @@
|
|
143
143
|
}
|
144
144
|
|
145
145
|
.picker-display-input {
|
146
|
-
@apply
|
146
|
+
@apply coco-para-md h-11;
|
147
147
|
}
|
148
148
|
|
149
149
|
.picker-display-color {
|
@@ -7,7 +7,7 @@ module Coco
|
|
7
7
|
include Coco::AppHelper
|
8
8
|
|
9
9
|
wraps_component :button do |args|
|
10
|
-
Coco::
|
10
|
+
Coco::Button.new(**args)
|
11
11
|
end
|
12
12
|
|
13
13
|
renders_one :text, Coco::Content
|
@@ -44,8 +44,8 @@ module Coco
|
|
44
44
|
@selected = selected
|
45
45
|
|
46
46
|
@size = kwargs.fetch(:size, :default)&.to_sym
|
47
|
-
if @size.in?(Coco::
|
48
|
-
@size, @resize = Coco::
|
47
|
+
if @size.in?(Coco::Button::SIZE_ALIASES.keys) && !kwargs.key?(:resize)
|
48
|
+
@size, @resize = Coco::Button::SIZE_ALIASES.fetch(@size)
|
49
49
|
end
|
50
50
|
end
|
51
51
|
|
@@ -72,12 +72,12 @@
|
|
72
72
|
}
|
73
73
|
|
74
74
|
.picker-placeholder-text {
|
75
|
-
@apply
|
75
|
+
@apply coco-para-sm;
|
76
76
|
width: 148px;
|
77
77
|
}
|
78
78
|
|
79
79
|
.picker-file-name {
|
80
|
-
@apply
|
80
|
+
@apply coco-label-sm;
|
81
81
|
}
|
82
82
|
|
83
83
|
.picker-actions {
|
@@ -94,12 +94,12 @@
|
|
94
94
|
}
|
95
95
|
|
96
96
|
.picker-placeholder-text {
|
97
|
-
@apply
|
97
|
+
@apply coco-para-md;
|
98
98
|
width: 172px;
|
99
99
|
}
|
100
100
|
|
101
101
|
.picker-file-name {
|
102
|
-
@apply
|
102
|
+
@apply coco-label-md;
|
103
103
|
}
|
104
104
|
|
105
105
|
.picker-actions {
|
@@ -7,7 +7,7 @@ module Coco
|
|
7
7
|
include Coco::AppHelper
|
8
8
|
|
9
9
|
wraps_component :button do |args|
|
10
|
-
Coco::
|
10
|
+
Coco::Button.new(icon: :image_plus, **args)
|
11
11
|
end
|
12
12
|
|
13
13
|
renders_one :text, Coco::Content
|
@@ -35,8 +35,8 @@ module Coco
|
|
35
35
|
@src = src
|
36
36
|
|
37
37
|
@size = kwargs.fetch(:size, :default)&.to_sym
|
38
|
-
if @size.in?(Coco::
|
39
|
-
@size, @resize = Coco::
|
38
|
+
if @size.in?(Coco::Button::SIZE_ALIASES.keys) && !kwargs.key?(:resize)
|
39
|
+
@size, @resize = Coco::Button::SIZE_ALIASES.fetch(@size)
|
40
40
|
end
|
41
41
|
end
|
42
42
|
|
@@ -9,7 +9,7 @@ module Coco
|
|
9
9
|
|
10
10
|
wraps_component :button do |args|
|
11
11
|
args[:class] = [args[:class], "layout-picker-trigger"]
|
12
|
-
Coco::
|
12
|
+
Coco::Button.new(**args)
|
13
13
|
end
|
14
14
|
|
15
15
|
renders_many :layouts, ->(name:, thumbnail:, **layout_options) do
|
@@ -24,8 +24,8 @@ module Coco
|
|
24
24
|
@resize = {}
|
25
25
|
|
26
26
|
@size = kwargs.fetch(:size, :default)&.to_sym
|
27
|
-
if @size.in?(Coco::
|
28
|
-
@size, @resize = Coco::
|
27
|
+
if @size.in?(Coco::Button::SIZE_ALIASES.keys) && !kwargs.key?(:resize)
|
28
|
+
@size, @resize = Coco::Button::SIZE_ALIASES.fetch(@size)
|
29
29
|
end
|
30
30
|
end
|
31
31
|
|
@@ -9,7 +9,7 @@
|
|
9
9
|
}
|
10
10
|
|
11
11
|
> .coco-button-wrapper > .coco-button,
|
12
|
-
> [data-component="
|
12
|
+
> [data-component="button-to"] .coco-button,
|
13
13
|
> [data-component="app-menu-button"]
|
14
14
|
> .coco-button-wrapper
|
15
15
|
> .coco-button {
|
@@ -34,8 +34,8 @@
|
|
34
34
|
@apply py-1.5;
|
35
35
|
|
36
36
|
.menu-item {
|
37
|
-
[data-component="
|
38
|
-
@apply px-4 py-2
|
37
|
+
[data-component="button"] {
|
38
|
+
@apply px-4 py-2 coco-label-sm;
|
39
39
|
|
40
40
|
.button-inner {
|
41
41
|
@apply gap-2;
|
@@ -52,8 +52,8 @@
|
|
52
52
|
@apply py-2;
|
53
53
|
|
54
54
|
.menu-item {
|
55
|
-
[data-component="
|
56
|
-
@apply px-5 py-2.5
|
55
|
+
[data-component="button"] {
|
56
|
+
@apply px-5 py-2.5 coco-label-md;
|
57
57
|
|
58
58
|
.button-inner {
|
59
59
|
@apply gap-2;
|
@@ -9,11 +9,11 @@ module Coco
|
|
9
9
|
|
10
10
|
wraps_component :button do |kwargs|
|
11
11
|
@size = kwargs.fetch(:size, :default)&.to_sym
|
12
|
-
if @size.in?(Coco::
|
13
|
-
@size, @resize = Coco::
|
12
|
+
if @size.in?(Coco::Button::SIZE_ALIASES.keys) && !kwargs.key?(:resize)
|
13
|
+
@size, @resize = Coco::Button::SIZE_ALIASES.fetch(@size)
|
14
14
|
end
|
15
15
|
|
16
|
-
Coco::
|
16
|
+
Coco::Button.new(toggle: :vertical, fit: get_option_value(:fit) || :auto, **kwargs)
|
17
17
|
end
|
18
18
|
|
19
19
|
accepts_option :fit, from: [:auto, :full]
|
@@ -16,7 +16,7 @@ module Coco
|
|
16
16
|
raise "Toolbar already has a `#{alignment}` section defined"
|
17
17
|
end
|
18
18
|
|
19
|
-
component = Coco::
|
19
|
+
component = Coco::ButtonGroup.new(**kwargs, theme: :toolbar, collapsible: true)
|
20
20
|
@sections[alignment] = view_context.render(component, &block)
|
21
21
|
end
|
22
22
|
|