coveragebook_components 0.9.1 → 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 +4433 -3098
- data/app/assets/build/coco/app.js +125 -109
- data/app/assets/build/coco/book.css +1492 -99
- data/app/assets/build/coco/book.js +279 -18
- 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 -6
- 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 +18 -50
- data/app/components/coco/app/elements/alert/alert.html.erb +2 -2
- data/app/components/coco/app/elements/alert/alert.js +1 -1
- data/app/components/coco/app/elements/alert/alert.rb +11 -16
- 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/stamp/stamp.css +103 -0
- data/app/components/coco/app/elements/stamp/stamp.html.erb +3 -0
- data/app/components/coco/app/elements/stamp/stamp.rb +29 -0
- 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.css +1 -1
- data/app/components/coco/app/layouts/application/application.js +1 -1
- data/app/components/coco/app/layouts/page/page.css +4 -0
- data/app/components/coco/app/layouts/page/page.html.erb +5 -0
- data/app/components/coco/app/layouts/page/page.js +1 -1
- data/app/components/coco/app/layouts/page/page.rb +4 -0
- 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.html.erb +2 -2
- data/app/components/coco/{base → shared}/modal/modal.js +3 -3
- data/app/components/coco/{base → shared}/modal/modal.rb +6 -4
- 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}/placeholder/placeholder.html.erb +1 -1
- data/app/components/coco/{base → shared}/placeholder/placeholder.rb +6 -0
- data/app/components/coco/{base → shared}/poll_controller/poll_controller.js +1 -1
- data/app/helpers/coco/app_helper.rb +17 -23
- data/app/helpers/coco/component_helper.rb +1 -1
- data/app/helpers/coco/{base_helper.rb → shared_helper.rb} +26 -3
- data/app/helpers/coco/url_helper.rb +1 -1
- data/config/tailwind.app.config.cjs +1 -1
- data/config/tailwind.book.config.cjs +1 -0
- data/config/tokens.cjs +9 -4
- data/lib/coco/engine.rb +6 -4
- data/lib/coco.rb +1 -1
- data/lib/generators/coco/coco_generator.rb +1 -1
- metadata +77 -80
- data/app/assets/css/base/components/coco.css +0 -14
- data/app/assets/css/base/components/dropdown.css +0 -7
- data/app/assets/css/base/components/tooltip.css +0 -19
- data/app/assets/js/base/components.js +0 -4
- data/app/components/coco/app/blocks/slat/slat.css +0 -9
- data/app/components/coco/app/blocks/slat/slat.rb +0 -13
- 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_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}/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
data/lib/coco/engine.rb
CHANGED
@@ -6,7 +6,7 @@ module Coco
|
|
6
6
|
class Engine < ::Rails::Engine
|
7
7
|
isolate_namespace Coco
|
8
8
|
|
9
|
-
COLLAPSE_DIRS = %w[
|
9
|
+
COLLAPSE_DIRS = %w[shared]
|
10
10
|
|
11
11
|
config.autoload_paths += %W[
|
12
12
|
#{root}/app/components
|
@@ -21,7 +21,7 @@ module Coco
|
|
21
21
|
autoloader.collapse("#{coco_dir}/#{path}")
|
22
22
|
end
|
23
23
|
|
24
|
-
Dir.glob("#{coco_dir}/
|
24
|
+
Dir.glob("#{coco_dir}/shared/**/*.rb").each do |path|
|
25
25
|
autoloader.collapse(File.dirname(path))
|
26
26
|
end
|
27
27
|
|
@@ -30,8 +30,10 @@ module Coco
|
|
30
30
|
end
|
31
31
|
end
|
32
32
|
|
33
|
-
Rails.
|
34
|
-
Rails.
|
33
|
+
if Rails.env.production?
|
34
|
+
Rails.application.config.to_prepare do
|
35
|
+
Rails.autoloaders.main.eager_load_dir(coco_dir)
|
36
|
+
end
|
35
37
|
end
|
36
38
|
end
|
37
39
|
|
data/lib/coco.rb
CHANGED
@@ -83,7 +83,7 @@ class CocoGenerator < Rails::Generators::NamedBase
|
|
83
83
|
end
|
84
84
|
|
85
85
|
def component_ref
|
86
|
-
parts = class_name.delete_prefix("
|
86
|
+
parts = class_name.delete_prefix("Shared::").underscore.dasherize.downcase.split("/")
|
87
87
|
parts.many? ? [parts.first, parts.last].join("-") : parts.first
|
88
88
|
end
|
89
89
|
|
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.10.1.beta.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: 2023-11-
|
11
|
+
date: 2023-11-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -1416,16 +1416,14 @@ files:
|
|
1416
1416
|
- app/assets/css/app.css
|
1417
1417
|
- app/assets/css/app/config.css
|
1418
1418
|
- app/assets/css/app/tippy.css
|
1419
|
-
- app/assets/css/app/
|
1420
|
-
- app/assets/css/base
|
1421
|
-
- app/assets/css/base/components/coco.css
|
1422
|
-
- app/assets/css/base/components/dropdown.css
|
1423
|
-
- app/assets/css/base/components/tooltip.css
|
1424
|
-
- app/assets/css/base/utils/colors.css
|
1425
|
-
- app/assets/css/base/utils/icons.css
|
1419
|
+
- app/assets/css/app/utils.css
|
1420
|
+
- app/assets/css/base.css
|
1426
1421
|
- app/assets/css/book.css
|
1427
1422
|
- app/assets/css/book/config.css
|
1428
|
-
- app/assets/css/
|
1423
|
+
- app/assets/css/shared/tippy.css
|
1424
|
+
- app/assets/css/shared/utils/colors.css
|
1425
|
+
- app/assets/css/shared/utils/icons.css
|
1426
|
+
- app/assets/css/shared/utils/text.css
|
1429
1427
|
- app/assets/custom_icons/other/eye-off-red.svg
|
1430
1428
|
- app/assets/custom_icons/other/google-sso.svg
|
1431
1429
|
- app/assets/custom_icons/other/layout-overlay.svg
|
@@ -1448,10 +1446,8 @@ files:
|
|
1448
1446
|
- app/assets/js/app.js
|
1449
1447
|
- app/assets/js/app/components.js
|
1450
1448
|
- app/assets/js/app/setup.js
|
1451
|
-
- app/assets/js/base/components.js
|
1452
1449
|
- app/assets/js/book.js
|
1453
1450
|
- app/assets/js/book/components.js
|
1454
|
-
- app/assets/js/coco.js
|
1455
1451
|
- app/assets/js/helpers/alpine.js
|
1456
1452
|
- app/assets/js/helpers/color.js
|
1457
1453
|
- app/assets/js/helpers/dom.js
|
@@ -1472,6 +1468,8 @@ files:
|
|
1472
1468
|
- app/assets/js/libs/alpine/utils/tippy_modifiers.js
|
1473
1469
|
- app/assets/js/libs/tippy/index.js
|
1474
1470
|
- app/assets/js/libs/tippy/plugins/hide_on_esc.js
|
1471
|
+
- app/assets/js/shared/coco.js
|
1472
|
+
- app/assets/js/shared/components.js
|
1475
1473
|
- app/components/coco/app/blocks/header/header.css
|
1476
1474
|
- app/components/coco/app/blocks/header/header.html.erb
|
1477
1475
|
- app/components/coco/app/blocks/header/header.js
|
@@ -1492,8 +1490,6 @@ files:
|
|
1492
1490
|
- app/components/coco/app/blocks/sidebar_nav/navbar/navbar.html.erb
|
1493
1491
|
- app/components/coco/app/blocks/sidebar_nav/navbar/navbar.js
|
1494
1492
|
- app/components/coco/app/blocks/sidebar_nav/navbar/navbar.rb
|
1495
|
-
- app/components/coco/app/blocks/slat/slat.css
|
1496
|
-
- app/components/coco/app/blocks/slat/slat.rb
|
1497
1493
|
- app/components/coco/app/blocks/slide_editor/slide_editor.css
|
1498
1494
|
- app/components/coco/app/blocks/slide_editor/slide_editor.html.erb
|
1499
1495
|
- app/components/coco/app/blocks/slide_editor/slide_editor.js
|
@@ -1502,15 +1498,6 @@ files:
|
|
1502
1498
|
- app/components/coco/app/elements/alert/alert.html.erb
|
1503
1499
|
- app/components/coco/app/elements/alert/alert.js
|
1504
1500
|
- app/components/coco/app/elements/alert/alert.rb
|
1505
|
-
- app/components/coco/app/elements/button/button.css
|
1506
|
-
- app/components/coco/app/elements/button/button.rb
|
1507
|
-
- app/components/coco/app/elements/button_group/button_group.css
|
1508
|
-
- app/components/coco/app/elements/button_group/button_group.html.erb
|
1509
|
-
- app/components/coco/app/elements/button_group/button_group.js
|
1510
|
-
- app/components/coco/app/elements/button_group/button_group.rb
|
1511
|
-
- app/components/coco/app/elements/button_to/button_to.css
|
1512
|
-
- app/components/coco/app/elements/button_to/button_to.html.erb
|
1513
|
-
- app/components/coco/app/elements/button_to/button_to.rb
|
1514
1501
|
- app/components/coco/app/elements/color_picker/color_picker.css
|
1515
1502
|
- app/components/coco/app/elements/color_picker/color_picker.html.erb
|
1516
1503
|
- app/components/coco/app/elements/color_picker/color_picker.js
|
@@ -1559,6 +1546,9 @@ files:
|
|
1559
1546
|
- app/components/coco/app/elements/snackbar/snackbar.html.erb
|
1560
1547
|
- app/components/coco/app/elements/snackbar/snackbar.js
|
1561
1548
|
- app/components/coco/app/elements/snackbar/snackbar.rb
|
1549
|
+
- app/components/coco/app/elements/stamp/stamp.css
|
1550
|
+
- app/components/coco/app/elements/stamp/stamp.html.erb
|
1551
|
+
- app/components/coco/app/elements/stamp/stamp.rb
|
1562
1552
|
- app/components/coco/app/elements/system_banner/system_banner.css
|
1563
1553
|
- app/components/coco/app/elements/system_banner/system_banner.html.erb
|
1564
1554
|
- app/components/coco/app/elements/system_banner/system_banner.js
|
@@ -1612,60 +1602,6 @@ files:
|
|
1612
1602
|
- app/components/coco/app/layouts/page/page.html.erb
|
1613
1603
|
- app/components/coco/app/layouts/page/page.js
|
1614
1604
|
- app/components/coco/app/layouts/page/page.rb
|
1615
|
-
- app/components/coco/base/avatar/avatar.css
|
1616
|
-
- app/components/coco/base/avatar/avatar.rb
|
1617
|
-
- app/components/coco/base/button/button.css
|
1618
|
-
- app/components/coco/base/button/button.html.erb
|
1619
|
-
- app/components/coco/base/button/button.js
|
1620
|
-
- app/components/coco/base/button/button.rb
|
1621
|
-
- app/components/coco/base/button/button_dropdown.js
|
1622
|
-
- app/components/coco/base/content/content.rb
|
1623
|
-
- app/components/coco/base/dropdown/dropdown.css
|
1624
|
-
- app/components/coco/base/dropdown/dropdown.html.erb
|
1625
|
-
- app/components/coco/base/dropdown/dropdown.js
|
1626
|
-
- app/components/coco/base/dropdown/dropdown.rb
|
1627
|
-
- app/components/coco/base/embeds/youtube/youtube.css
|
1628
|
-
- app/components/coco/base/embeds/youtube/youtube.html.erb
|
1629
|
-
- app/components/coco/base/embeds/youtube/youtube.rb
|
1630
|
-
- app/components/coco/base/icon/icon.css
|
1631
|
-
- app/components/coco/base/icon/icon.html.erb
|
1632
|
-
- app/components/coco/base/icon/icon.js
|
1633
|
-
- app/components/coco/base/icon/icon.rb
|
1634
|
-
- app/components/coco/base/image/image.css
|
1635
|
-
- app/components/coco/base/image/image.rb
|
1636
|
-
- app/components/coco/base/image_uploader/image_uploader.css
|
1637
|
-
- app/components/coco/base/image_uploader/image_uploader.html.erb
|
1638
|
-
- app/components/coco/base/image_uploader/image_uploader.js
|
1639
|
-
- app/components/coco/base/image_uploader/image_uploader.rb
|
1640
|
-
- app/components/coco/base/link/link.css
|
1641
|
-
- app/components/coco/base/link/link.rb
|
1642
|
-
- app/components/coco/base/modal/modal.css
|
1643
|
-
- app/components/coco/base/modal/modal.html.erb
|
1644
|
-
- app/components/coco/base/modal/modal.js
|
1645
|
-
- app/components/coco/base/modal/modal.rb
|
1646
|
-
- app/components/coco/base/modal_dialog/modal_dialog.css
|
1647
|
-
- app/components/coco/base/modal_dialog/modal_dialog.html.erb
|
1648
|
-
- app/components/coco/base/modal_dialog/modal_dialog.js
|
1649
|
-
- app/components/coco/base/modal_dialog/modal_dialog.rb
|
1650
|
-
- app/components/coco/base/modal_lightbox/modal_lightbox.css
|
1651
|
-
- app/components/coco/base/modal_lightbox/modal_lightbox.html.erb
|
1652
|
-
- app/components/coco/base/modal_lightbox/modal_lightbox.js
|
1653
|
-
- app/components/coco/base/modal_lightbox/modal_lightbox.rb
|
1654
|
-
- app/components/coco/base/pager_link/pager_link.css
|
1655
|
-
- app/components/coco/base/pager_link/pager_link.html.erb
|
1656
|
-
- app/components/coco/base/pager_link/pager_link.rb
|
1657
|
-
- app/components/coco/base/panel/panel.css
|
1658
|
-
- app/components/coco/base/panel/panel.html.erb
|
1659
|
-
- app/components/coco/base/panel/panel.rb
|
1660
|
-
- app/components/coco/base/placeholder/placeholder.css
|
1661
|
-
- app/components/coco/base/placeholder/placeholder.html.erb
|
1662
|
-
- app/components/coco/base/placeholder/placeholder.rb
|
1663
|
-
- app/components/coco/base/poll_controller/poll_controller.css
|
1664
|
-
- app/components/coco/base/poll_controller/poll_controller.html.erb
|
1665
|
-
- app/components/coco/base/poll_controller/poll_controller.js
|
1666
|
-
- app/components/coco/base/poll_controller/poll_controller.rb
|
1667
|
-
- app/components/coco/base/svg/svg.html.erb
|
1668
|
-
- app/components/coco/base/svg/svg.rb
|
1669
1605
|
- app/components/coco/book/blocks/slides/editable_slide/editable_slide.css
|
1670
1606
|
- app/components/coco/book/blocks/slides/editable_slide/editable_slide.html.erb
|
1671
1607
|
- app/components/coco/book/blocks/slides/editable_slide/editable_slide.rb
|
@@ -1690,15 +1626,76 @@ files:
|
|
1690
1626
|
- app/components/coco/concerns/with_tooltip.rb
|
1691
1627
|
- app/components/coco/concerns/wraps_component.rb
|
1692
1628
|
- app/components/coco/presented_component.rb
|
1629
|
+
- app/components/coco/shared/avatar/avatar.css
|
1630
|
+
- app/components/coco/shared/avatar/avatar.rb
|
1631
|
+
- app/components/coco/shared/button/button.css
|
1632
|
+
- app/components/coco/shared/button/button.html.erb
|
1633
|
+
- app/components/coco/shared/button/button.js
|
1634
|
+
- app/components/coco/shared/button/button.rb
|
1635
|
+
- app/components/coco/shared/button/button_dropdown.js
|
1636
|
+
- app/components/coco/shared/button_group/button_group.css
|
1637
|
+
- app/components/coco/shared/button_group/button_group.html.erb
|
1638
|
+
- app/components/coco/shared/button_group/button_group.js
|
1639
|
+
- app/components/coco/shared/button_group/button_group.rb
|
1640
|
+
- app/components/coco/shared/button_to/button_to.css
|
1641
|
+
- app/components/coco/shared/button_to/button_to.html.erb
|
1642
|
+
- app/components/coco/shared/button_to/button_to.rb
|
1643
|
+
- app/components/coco/shared/content/content.rb
|
1644
|
+
- app/components/coco/shared/dropdown/dropdown.css
|
1645
|
+
- app/components/coco/shared/dropdown/dropdown.html.erb
|
1646
|
+
- app/components/coco/shared/dropdown/dropdown.js
|
1647
|
+
- app/components/coco/shared/dropdown/dropdown.rb
|
1648
|
+
- app/components/coco/shared/embeds/youtube/youtube.css
|
1649
|
+
- app/components/coco/shared/embeds/youtube/youtube.html.erb
|
1650
|
+
- app/components/coco/shared/embeds/youtube/youtube.rb
|
1651
|
+
- app/components/coco/shared/icon/icon.css
|
1652
|
+
- app/components/coco/shared/icon/icon.html.erb
|
1653
|
+
- app/components/coco/shared/icon/icon.js
|
1654
|
+
- app/components/coco/shared/icon/icon.rb
|
1655
|
+
- app/components/coco/shared/image/image.css
|
1656
|
+
- app/components/coco/shared/image/image.rb
|
1657
|
+
- app/components/coco/shared/image_uploader/image_uploader.css
|
1658
|
+
- app/components/coco/shared/image_uploader/image_uploader.html.erb
|
1659
|
+
- app/components/coco/shared/image_uploader/image_uploader.js
|
1660
|
+
- app/components/coco/shared/image_uploader/image_uploader.rb
|
1661
|
+
- app/components/coco/shared/link/link.css
|
1662
|
+
- app/components/coco/shared/link/link.rb
|
1663
|
+
- app/components/coco/shared/modal/modal.css
|
1664
|
+
- app/components/coco/shared/modal/modal.html.erb
|
1665
|
+
- app/components/coco/shared/modal/modal.js
|
1666
|
+
- app/components/coco/shared/modal/modal.rb
|
1667
|
+
- app/components/coco/shared/modal_dialog/modal_dialog.css
|
1668
|
+
- app/components/coco/shared/modal_dialog/modal_dialog.html.erb
|
1669
|
+
- app/components/coco/shared/modal_dialog/modal_dialog.js
|
1670
|
+
- app/components/coco/shared/modal_dialog/modal_dialog.rb
|
1671
|
+
- app/components/coco/shared/modal_lightbox/modal_lightbox.css
|
1672
|
+
- app/components/coco/shared/modal_lightbox/modal_lightbox.html.erb
|
1673
|
+
- app/components/coco/shared/modal_lightbox/modal_lightbox.js
|
1674
|
+
- app/components/coco/shared/modal_lightbox/modal_lightbox.rb
|
1675
|
+
- app/components/coco/shared/pager_link/pager_link.css
|
1676
|
+
- app/components/coco/shared/pager_link/pager_link.html.erb
|
1677
|
+
- app/components/coco/shared/pager_link/pager_link.rb
|
1678
|
+
- app/components/coco/shared/panel/panel.css
|
1679
|
+
- app/components/coco/shared/panel/panel.html.erb
|
1680
|
+
- app/components/coco/shared/panel/panel.rb
|
1681
|
+
- app/components/coco/shared/placeholder/placeholder.css
|
1682
|
+
- app/components/coco/shared/placeholder/placeholder.html.erb
|
1683
|
+
- app/components/coco/shared/placeholder/placeholder.rb
|
1684
|
+
- app/components/coco/shared/poll_controller/poll_controller.css
|
1685
|
+
- app/components/coco/shared/poll_controller/poll_controller.html.erb
|
1686
|
+
- app/components/coco/shared/poll_controller/poll_controller.js
|
1687
|
+
- app/components/coco/shared/poll_controller/poll_controller.rb
|
1688
|
+
- app/components/coco/shared/svg/svg.html.erb
|
1689
|
+
- app/components/coco/shared/svg/svg.rb
|
1693
1690
|
- app/components/coco/tag.rb
|
1694
1691
|
- app/helpers/coco/alpine_helper.rb
|
1695
1692
|
- app/helpers/coco/app_helper.rb
|
1696
|
-
- app/helpers/coco/base_helper.rb
|
1697
1693
|
- app/helpers/coco/book_helper.rb
|
1698
1694
|
- app/helpers/coco/component_helper.rb
|
1699
1695
|
- app/helpers/coco/format_helper.rb
|
1700
1696
|
- app/helpers/coco/helpers.rb
|
1701
1697
|
- app/helpers/coco/integration_helper.rb
|
1698
|
+
- app/helpers/coco/shared_helper.rb
|
1702
1699
|
- app/helpers/coco/tag_helper.rb
|
1703
1700
|
- app/helpers/coco/url_helper.rb
|
1704
1701
|
- config/icons.json
|
@@ -1748,9 +1745,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
1748
1745
|
version: 3.2.0
|
1749
1746
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
1750
1747
|
requirements:
|
1751
|
-
- - "
|
1748
|
+
- - ">"
|
1752
1749
|
- !ruby/object:Gem::Version
|
1753
|
-
version:
|
1750
|
+
version: 1.3.1
|
1754
1751
|
requirements: []
|
1755
1752
|
rubygems_version: 3.4.19
|
1756
1753
|
signing_key:
|
@@ -1,19 +0,0 @@
|
|
1
|
-
@layer components {
|
2
|
-
/* Tooltip theme */
|
3
|
-
.tippy-box[data-theme~="coco-tooltip"] {
|
4
|
-
@apply bg-background-dark-2 text-white text-label-sm rounded-lg shadow-xl;
|
5
|
-
|
6
|
-
.tippy-content {
|
7
|
-
@apply px-3 py-2 truncate max-w-[240px];
|
8
|
-
}
|
9
|
-
|
10
|
-
/* arrow background */
|
11
|
-
.tippy-svg-arrow > svg:first-child {
|
12
|
-
@apply hidden;
|
13
|
-
}
|
14
|
-
|
15
|
-
.tippy-svg-arrow > svg:last-child {
|
16
|
-
@apply fill-gray-900;
|
17
|
-
}
|
18
|
-
}
|
19
|
-
}
|
@@ -1,87 +0,0 @@
|
|
1
|
-
module Coco
|
2
|
-
module App
|
3
|
-
module Elements
|
4
|
-
class Button < Coco::Button
|
5
|
-
SIZES = [:xs, :sm, :md, :lg, nil]
|
6
|
-
|
7
|
-
SIZE_ALIASES = {
|
8
|
-
default: [:sm, {xl: :md}]
|
9
|
-
}
|
10
|
-
|
11
|
-
THEMES = [
|
12
|
-
"primary",
|
13
|
-
"text-primary",
|
14
|
-
"secondary",
|
15
|
-
"text-secondary",
|
16
|
-
"positive",
|
17
|
-
"text-positive",
|
18
|
-
"negative",
|
19
|
-
"text-negative",
|
20
|
-
"warning",
|
21
|
-
"text-warning",
|
22
|
-
"info",
|
23
|
-
"text-info",
|
24
|
-
"toolbar",
|
25
|
-
"toolbar-floating",
|
26
|
-
"text-toolbar",
|
27
|
-
"neutral-dark",
|
28
|
-
"neutral-light",
|
29
|
-
"text-neutral-light",
|
30
|
-
"text-neutral-dark",
|
31
|
-
"blank",
|
32
|
-
nil
|
33
|
-
]
|
34
|
-
|
35
|
-
DEFAULT_THEME = "primary"
|
36
|
-
|
37
|
-
accepts_option :size, from: SIZES, default: :md
|
38
|
-
accepts_option :theme, from: THEMES, default: DEFAULT_THEME
|
39
|
-
accepts_option :variant
|
40
|
-
|
41
|
-
renders_one :dropdown, types: {
|
42
|
-
content: ->(&block) { block.call },
|
43
|
-
|
44
|
-
confirmation: ->(**kwargs) do
|
45
|
-
set_option_value(:confirm, true)
|
46
|
-
Coco::App::Elements::ConfirmPanel.new(**kwargs)
|
47
|
-
end
|
48
|
-
}
|
49
|
-
|
50
|
-
before_initialize do |kwargs|
|
51
|
-
if kwargs.key?(:modal)
|
52
|
-
modal_name = (kwargs[:modal] == true) ? "default" : kwargs[:modal]
|
53
|
-
kwargs[:data] = kwargs.fetch(:data, {}).merge(coco_modal_data_attributes(modal_name))
|
54
|
-
kwargs.delete(:modal)
|
55
|
-
end
|
56
|
-
if kwargs.key?(:frame)
|
57
|
-
turbo_data = {turbo: true, turbo_frame: kwargs[:frame]}
|
58
|
-
kwargs[:data] = kwargs.fetch(:data, {}).merge(turbo_data)
|
59
|
-
kwargs.delete(:frame)
|
60
|
-
end
|
61
|
-
kwargs
|
62
|
-
end
|
63
|
-
|
64
|
-
before_render do
|
65
|
-
if confirm? && !dropdown?
|
66
|
-
with_confirmation do |confirm|
|
67
|
-
confirm.with_text { "Are you sure?" }
|
68
|
-
confirm.with_button { "Yes, continue" }
|
69
|
-
end
|
70
|
-
end
|
71
|
-
end
|
72
|
-
|
73
|
-
def with_dropdown(...)
|
74
|
-
with_dropdown_content(...)
|
75
|
-
end
|
76
|
-
|
77
|
-
def with_confirmation(...)
|
78
|
-
with_dropdown_confirmation(...)
|
79
|
-
end
|
80
|
-
|
81
|
-
class << self
|
82
|
-
include Coco::BaseHelper
|
83
|
-
end
|
84
|
-
end
|
85
|
-
end
|
86
|
-
end
|
87
|
-
end
|
@@ -1,42 +0,0 @@
|
|
1
|
-
module Coco
|
2
|
-
module App
|
3
|
-
module Elements
|
4
|
-
class ButtonGroup < Coco::Component
|
5
|
-
include Concerns::ActsAsButtonGroup
|
6
|
-
include Concerns::AcceptsOptions
|
7
|
-
|
8
|
-
accepts_option :size, default: :default, private: true
|
9
|
-
accepts_option :theme, default: :primary, private: true
|
10
|
-
accepts_option :segmented, from: [true, false], default: false
|
11
|
-
accepts_option :floating, from: [true, false], default: false
|
12
|
-
accepts_option :collapsible, from: [true, false, nil]
|
13
|
-
|
14
|
-
before_initialize do |kwargs|
|
15
|
-
if kwargs[:floating] == true
|
16
|
-
kwargs[:segmented] = true
|
17
|
-
kwargs[:theme] = :toolbar_floating
|
18
|
-
end
|
19
|
-
kwargs
|
20
|
-
end
|
21
|
-
|
22
|
-
def button_kwargs(kwargs, type = nil)
|
23
|
-
args = {
|
24
|
-
theme: get_option_value(:theme),
|
25
|
-
size: get_option_value(:size),
|
26
|
-
**kwargs
|
27
|
-
}
|
28
|
-
|
29
|
-
if component_args.key?(:resize)
|
30
|
-
args[:resize] = component_args[:resize]
|
31
|
-
end
|
32
|
-
|
33
|
-
if get_option_value(:collapsible) == false
|
34
|
-
args[:collapsible] = false
|
35
|
-
end
|
36
|
-
|
37
|
-
args
|
38
|
-
end
|
39
|
-
end
|
40
|
-
end
|
41
|
-
end
|
42
|
-
end
|
@@ -1,54 +0,0 @@
|
|
1
|
-
module Coco
|
2
|
-
module App
|
3
|
-
module Elements
|
4
|
-
class ButtonTo < Coco::Component
|
5
|
-
include Concerns::WrapsComponent
|
6
|
-
include Concerns::AcceptsOptions
|
7
|
-
|
8
|
-
accepts_option :fit, from: [:auto, :full]
|
9
|
-
|
10
|
-
wraps_component :button do |args|
|
11
|
-
Coco::App::Elements::Button.new(
|
12
|
-
type: :submit,
|
13
|
-
fit: get_option_value(:fit) || :auto,
|
14
|
-
**args
|
15
|
-
)
|
16
|
-
end
|
17
|
-
|
18
|
-
%i[confirmation].each do |slot_name|
|
19
|
-
renders_one slot_name, ->(**kwargs, &block) do
|
20
|
-
button.send("with_#{slot_name}".to_sym, **kwargs, &block)
|
21
|
-
end
|
22
|
-
end
|
23
|
-
|
24
|
-
attr_reader :method, :turbo
|
25
|
-
|
26
|
-
def initialize(form: nil, params: nil, method: :post, action: nil, href: nil, turbo: false, **kwargs)
|
27
|
-
@form_args = form.to_h
|
28
|
-
@action = action || href
|
29
|
-
@method = method
|
30
|
-
@params = params.to_h
|
31
|
-
@turbo = turbo
|
32
|
-
end
|
33
|
-
|
34
|
-
def params
|
35
|
-
to_form_params(@params)
|
36
|
-
end
|
37
|
-
|
38
|
-
def form_args
|
39
|
-
{
|
40
|
-
url: action,
|
41
|
-
method: method,
|
42
|
-
data: {
|
43
|
-
turbo: ("false" if !turbo)
|
44
|
-
}
|
45
|
-
}.deep_merge(@form_args)
|
46
|
-
end
|
47
|
-
|
48
|
-
def action
|
49
|
-
@action.is_a?(String) ? @action : helpers.url_for(@action)
|
50
|
-
end
|
51
|
-
end
|
52
|
-
end
|
53
|
-
end
|
54
|
-
end
|
@@ -1,75 +0,0 @@
|
|
1
|
-
@layer components {
|
2
|
-
.coco-button-wrapper {
|
3
|
-
@apply !contents;
|
4
|
-
}
|
5
|
-
|
6
|
-
[data-coco].coco-button {
|
7
|
-
@apply flex transition-colors w-auto bg-transparent text-current border border-transparent select-none flex-none no-underline outline-none focus-visible:outline-0;
|
8
|
-
width: min-content;
|
9
|
-
|
10
|
-
.button-inner {
|
11
|
-
@apply inline-flex items-center text-center mx-auto gap-2;
|
12
|
-
width: fit-content;
|
13
|
-
}
|
14
|
-
|
15
|
-
.button-content {
|
16
|
-
@apply whitespace-nowrap relative leading-none inline-flex items-center order-2;
|
17
|
-
}
|
18
|
-
|
19
|
-
.button-state-content {
|
20
|
-
@apply contents;
|
21
|
-
}
|
22
|
-
|
23
|
-
.button-icon {
|
24
|
-
@apply inline-flex items-center order-1;
|
25
|
-
}
|
26
|
-
|
27
|
-
.button-dropdown {
|
28
|
-
@apply contents rounded-md;
|
29
|
-
}
|
30
|
-
|
31
|
-
.button-toggle {
|
32
|
-
@apply order-3;
|
33
|
-
}
|
34
|
-
|
35
|
-
/* disabled */
|
36
|
-
|
37
|
-
&[data-disabled="true"] {
|
38
|
-
@apply cursor-not-allowed pointer-events-none;
|
39
|
-
}
|
40
|
-
|
41
|
-
/* loading */
|
42
|
-
|
43
|
-
&[data-state="loading"] .button-icon {
|
44
|
-
@apply animate-spin;
|
45
|
-
}
|
46
|
-
|
47
|
-
/* Fit */
|
48
|
-
|
49
|
-
&[data-fit="full"] {
|
50
|
-
@apply w-full;
|
51
|
-
}
|
52
|
-
|
53
|
-
/* Icons */
|
54
|
-
|
55
|
-
&[data-icon-position="end"] {
|
56
|
-
.button-content {
|
57
|
-
@apply order-1;
|
58
|
-
}
|
59
|
-
|
60
|
-
.button-icon {
|
61
|
-
@apply order-2;
|
62
|
-
}
|
63
|
-
|
64
|
-
.button-toggle {
|
65
|
-
@apply order-3;
|
66
|
-
}
|
67
|
-
}
|
68
|
-
|
69
|
-
&.with-icon[data-collapsed="true"] {
|
70
|
-
.button-content {
|
71
|
-
display: none;
|
72
|
-
}
|
73
|
-
}
|
74
|
-
}
|
75
|
-
}
|