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.
Files changed (140) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/build/coco/app.css +4339 -3025
  3. data/app/assets/build/coco/app.js +116 -104
  4. data/app/assets/build/coco/book.css +1492 -92
  5. data/app/assets/build/coco/book.js +278 -17
  6. data/app/assets/css/app/tippy.css +1 -1
  7. data/app/assets/css/app.css +3 -3
  8. data/app/assets/css/{base/base.css → base.css} +14 -7
  9. data/app/assets/css/book.css +2 -2
  10. data/app/assets/css/{libs → shared}/tippy.css +20 -1
  11. data/app/assets/css/shared/utils/text.css +143 -0
  12. data/app/assets/js/app.js +2 -2
  13. data/app/assets/js/book.js +2 -2
  14. data/app/assets/js/libs/alpine/directives/dropdown.js +1 -1
  15. data/app/assets/js/libs/alpine/directives/tooltip.js +1 -1
  16. data/app/assets/js/shared/components.js +4 -0
  17. data/app/components/coco/app/blocks/header/header.js +1 -1
  18. data/app/components/coco/app/blocks/header/header.rb +2 -2
  19. data/app/components/coco/app/blocks/nav_drawer/nav_drawer.css +4 -0
  20. data/app/components/coco/app/blocks/nav_drawer/nav_drawer.js +1 -1
  21. data/app/components/coco/app/blocks/sidebar_nav/item/item.css +3 -3
  22. data/app/components/coco/app/blocks/sidebar_nav/item/item.js +2 -2
  23. data/app/components/coco/app/blocks/sidebar_nav/menu/menu.css +3 -3
  24. data/app/components/coco/app/blocks/sidebar_nav/menu/menu.js +1 -1
  25. data/app/components/coco/app/blocks/sidebar_nav/navbar/navbar.js +1 -1
  26. data/app/components/coco/app/blocks/slide_editor/slide_editor.js +1 -1
  27. data/app/components/coco/app/elements/alert/alert.css +4 -4
  28. data/app/components/coco/app/elements/alert/alert.js +1 -1
  29. data/app/components/coco/app/elements/color_picker/color_picker.css +2 -2
  30. data/app/components/coco/app/elements/color_picker/color_picker.js +1 -1
  31. data/app/components/coco/app/elements/color_picker_button/color_picker_button.js +1 -1
  32. data/app/components/coco/app/elements/color_picker_button/color_picker_button.rb +3 -3
  33. data/app/components/coco/app/elements/confirm_panel/confirm_panel.css +1 -1
  34. data/app/components/coco/app/elements/confirm_panel/confirm_panel.js +1 -1
  35. data/app/components/coco/app/elements/image_picker/image_picker.css +4 -4
  36. data/app/components/coco/app/elements/image_picker/image_picker.js +1 -1
  37. data/app/components/coco/app/elements/image_picker_button/image_picker_button.js +1 -1
  38. data/app/components/coco/app/elements/image_picker_button/image_picker_button.rb +3 -3
  39. data/app/components/coco/app/elements/layout_picker_button/layout_picker_button.js +1 -1
  40. data/app/components/coco/app/elements/layout_picker_button/layout_picker_button.rb +3 -3
  41. data/app/components/coco/app/elements/link/link.rb +1 -1
  42. data/app/components/coco/app/elements/menu/menu.css +5 -5
  43. data/app/components/coco/app/elements/menu_button/menu_button.js +1 -1
  44. data/app/components/coco/app/elements/menu_button/menu_button.rb +3 -3
  45. data/app/components/coco/app/elements/menu_items/user_profile/user_profile.css +1 -1
  46. data/app/components/coco/app/elements/notice/notice.js +1 -1
  47. data/app/components/coco/app/elements/seamless_textarea/seamless_textarea.js +1 -1
  48. data/app/components/coco/app/elements/snackbar/snackbar.css +1 -1
  49. data/app/components/coco/app/elements/snackbar/snackbar.js +1 -1
  50. data/app/components/coco/app/elements/system_banner/system_banner.js +1 -1
  51. data/app/components/coco/app/elements/toast/toast.js +1 -1
  52. data/app/components/coco/app/elements/toolbar/toolbar.js +1 -1
  53. data/app/components/coco/app/elements/toolbar/toolbar.rb +1 -1
  54. data/app/components/coco/app/fields/button_component.rb +1 -1
  55. data/app/components/coco/app/fields/submit_component.rb +1 -0
  56. data/app/components/coco/app/layouts/application/application.js +1 -1
  57. data/app/components/coco/app/layouts/page/page.js +1 -1
  58. data/app/components/coco/{app/elements → shared}/button/button.css +104 -32
  59. data/app/components/coco/shared/button/button.html.erb +83 -0
  60. data/app/components/coco/{base → shared}/button/button.js +2 -1
  61. data/app/components/coco/{base → shared}/button/button.rb +107 -42
  62. data/app/components/coco/{base → shared}/button/button_dropdown.js +11 -2
  63. data/app/components/coco/{app/elements → shared}/button_group/button_group.css +1 -1
  64. data/app/components/coco/{app/elements → shared}/button_group/button_group.js +12 -4
  65. data/app/components/coco/shared/button_group/button_group.rb +40 -0
  66. data/app/components/coco/{app/elements → shared}/button_to/button_to.css +1 -1
  67. data/app/components/coco/shared/button_to/button_to.rb +50 -0
  68. data/app/components/coco/{base → shared}/dropdown/dropdown.js +1 -1
  69. data/app/components/coco/{base → shared}/icon/icon.js +1 -1
  70. data/app/components/coco/{base → shared}/image_uploader/image_uploader.js +1 -1
  71. data/app/components/coco/{base → shared}/modal/modal.js +2 -2
  72. data/app/components/coco/{base → shared}/modal_dialog/modal_dialog.js +1 -1
  73. data/app/components/coco/{base → shared}/modal_lightbox/modal_lightbox.js +1 -1
  74. data/app/components/coco/{base → shared}/poll_controller/poll_controller.js +1 -1
  75. data/app/helpers/coco/app_helper.rb +0 -23
  76. data/app/helpers/coco/component_helper.rb +1 -1
  77. data/app/helpers/coco/{base_helper.rb → shared_helper.rb} +24 -1
  78. data/app/helpers/coco/url_helper.rb +1 -1
  79. data/lib/coco/engine.rb +2 -2
  80. data/lib/coco.rb +1 -1
  81. data/lib/generators/coco/coco_generator.rb +1 -1
  82. metadata +74 -79
  83. data/app/assets/css/base/components/coco.css +0 -5
  84. data/app/assets/css/base/components/dropdown.css +0 -7
  85. data/app/assets/css/base/components/tooltip.css +0 -19
  86. data/app/assets/css/base/utils/text.css +0 -79
  87. data/app/assets/js/base/components.js +0 -4
  88. data/app/components/coco/app/elements/button/button.rb +0 -87
  89. data/app/components/coco/app/elements/button_group/button_group.rb +0 -42
  90. data/app/components/coco/app/elements/button_to/button_to.rb +0 -54
  91. data/app/components/coco/base/button/button.css +0 -75
  92. data/app/components/coco/base/button/button.html.erb +0 -71
  93. /data/app/assets/css/app/{utilities.css → utils.css} +0 -0
  94. /data/app/assets/css/{base → shared}/utils/colors.css +0 -0
  95. /data/app/assets/css/{base → shared}/utils/icons.css +0 -0
  96. /data/app/assets/js/{coco.js → shared/coco.js} +0 -0
  97. /data/app/components/coco/{base → shared}/avatar/avatar.css +0 -0
  98. /data/app/components/coco/{base → shared}/avatar/avatar.rb +0 -0
  99. /data/app/components/coco/{app/elements → shared}/button_group/button_group.html.erb +0 -0
  100. /data/app/components/coco/{app/elements → shared}/button_to/button_to.html.erb +0 -0
  101. /data/app/components/coco/{base → shared}/content/content.rb +0 -0
  102. /data/app/components/coco/{base → shared}/dropdown/dropdown.css +0 -0
  103. /data/app/components/coco/{base → shared}/dropdown/dropdown.html.erb +0 -0
  104. /data/app/components/coco/{base → shared}/dropdown/dropdown.rb +0 -0
  105. /data/app/components/coco/{base → shared}/embeds/youtube/youtube.css +0 -0
  106. /data/app/components/coco/{base → shared}/embeds/youtube/youtube.html.erb +0 -0
  107. /data/app/components/coco/{base → shared}/embeds/youtube/youtube.rb +0 -0
  108. /data/app/components/coco/{base → shared}/icon/icon.css +0 -0
  109. /data/app/components/coco/{base → shared}/icon/icon.html.erb +0 -0
  110. /data/app/components/coco/{base → shared}/icon/icon.rb +0 -0
  111. /data/app/components/coco/{base → shared}/image/image.css +0 -0
  112. /data/app/components/coco/{base → shared}/image/image.rb +0 -0
  113. /data/app/components/coco/{base → shared}/image_uploader/image_uploader.css +0 -0
  114. /data/app/components/coco/{base → shared}/image_uploader/image_uploader.html.erb +0 -0
  115. /data/app/components/coco/{base → shared}/image_uploader/image_uploader.rb +0 -0
  116. /data/app/components/coco/{base → shared}/link/link.css +0 -0
  117. /data/app/components/coco/{base → shared}/link/link.rb +0 -0
  118. /data/app/components/coco/{base → shared}/modal/modal.css +0 -0
  119. /data/app/components/coco/{base → shared}/modal/modal.html.erb +0 -0
  120. /data/app/components/coco/{base → shared}/modal/modal.rb +0 -0
  121. /data/app/components/coco/{base → shared}/modal_dialog/modal_dialog.css +0 -0
  122. /data/app/components/coco/{base → shared}/modal_dialog/modal_dialog.html.erb +0 -0
  123. /data/app/components/coco/{base → shared}/modal_dialog/modal_dialog.rb +0 -0
  124. /data/app/components/coco/{base → shared}/modal_lightbox/modal_lightbox.css +0 -0
  125. /data/app/components/coco/{base → shared}/modal_lightbox/modal_lightbox.html.erb +0 -0
  126. /data/app/components/coco/{base → shared}/modal_lightbox/modal_lightbox.rb +0 -0
  127. /data/app/components/coco/{base → shared}/pager_link/pager_link.css +0 -0
  128. /data/app/components/coco/{base → shared}/pager_link/pager_link.html.erb +0 -0
  129. /data/app/components/coco/{base → shared}/pager_link/pager_link.rb +0 -0
  130. /data/app/components/coco/{base → shared}/panel/panel.css +0 -0
  131. /data/app/components/coco/{base → shared}/panel/panel.html.erb +0 -0
  132. /data/app/components/coco/{base → shared}/panel/panel.rb +0 -0
  133. /data/app/components/coco/{base → shared}/placeholder/placeholder.css +0 -0
  134. /data/app/components/coco/{base → shared}/placeholder/placeholder.html.erb +0 -0
  135. /data/app/components/coco/{base → shared}/placeholder/placeholder.rb +0 -0
  136. /data/app/components/coco/{base → shared}/poll_controller/poll_controller.css +0 -0
  137. /data/app/components/coco/{base → shared}/poll_controller/poll_controller.html.erb +0 -0
  138. /data/app/components/coco/{base → shared}/poll_controller/poll_controller.rb +0 -0
  139. /data/app/components/coco/{base → shared}/svg/svg.html.erb +0 -0
  140. /data/app/components/coco/{base → shared}/svg/svg.rb +0 -0
@@ -0,0 +1,4 @@
1
+ import { registerComponents } from "@helpers/alpine";
2
+ import sharedComponents from "@sharedComponents/**/*.js";
3
+
4
+ export default registerComponents(sharedComponents);
@@ -1,4 +1,4 @@
1
- import { CocoComponent } from "@js/coco";
1
+ import { CocoComponent } from "@assets/js/shared/coco";
2
2
 
3
3
  export default CocoComponent("appHeader", () => {
4
4
  return {
@@ -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::App::Elements::ButtonGroup.new(
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::App::Elements::ButtonGroup.new(
15
+ Coco::ButtonGroup.new(
16
16
  theme: :text_neutral_light,
17
17
  collapsible: false,
18
18
  size: :xs,
@@ -24,6 +24,10 @@
24
24
  .button-inner {
25
25
  @apply mx-0 px-4 py-3;
26
26
  }
27
+
28
+ .button-label {
29
+ @apply font-normal;
30
+ }
27
31
  }
28
32
 
29
33
  .nav-drawer-heading {
@@ -1,4 +1,4 @@
1
- import { CocoComponent } from "@js/coco";
1
+ import { CocoComponent } from "@assets/js/shared/coco";
2
2
 
3
3
  export default CocoComponent("appNavDrawer", () => {
4
4
  return {
@@ -42,7 +42,7 @@
42
42
  @layer utilities {
43
43
  .app-sidebar-nav-horizontal-item {
44
44
  .nav-item-label {
45
- @apply text-label-xxs mt-0.5;
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 text-label-xxs mt-1;
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 text-label-xs mt-1.5;
105
+ @apply coco-label-xs mt-1.5;
106
106
  }
107
107
 
108
108
  .nav-item-icon .coco-icon {
@@ -1,5 +1,5 @@
1
- import tippy from "@libs/tippy";
2
- import { CocoComponent } from "@js/coco";
1
+ import tippy from "@assets/js/libs/tippy";
2
+ import { CocoComponent } from "@assets/js/shared/coco";
3
3
 
4
4
  export default CocoComponent("appSidebarNavItem", () => {
5
5
  return {
@@ -22,7 +22,7 @@
22
22
  }
23
23
 
24
24
  .menu-item-qualifier {
25
- @apply ml-auto text-label-sm flex-none pl-4;
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 text-heading-6;
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 text-para-sm;
55
+ @apply coco-para-sm;
56
56
  grid-area: text;
57
57
  }
58
58
  }
@@ -1,4 +1,4 @@
1
- import { CocoComponent } from "@js/coco";
1
+ import { CocoComponent } from "@assets/js/shared/coco";
2
2
  import { navigateTo } from "@helpers/location";
3
3
 
4
4
  export default CocoComponent("appSidebarNavMenu", () => {
@@ -1,5 +1,5 @@
1
1
  import tokens from "@config/tokens.cjs";
2
- import { CocoComponent } from "@js/coco";
2
+ import { CocoComponent } from "@assets/js/shared/coco";
3
3
 
4
4
  const mobileMaxWidth = parseInt(tokens.app.screens.sm, 10);
5
5
 
@@ -1,4 +1,4 @@
1
- import { CocoComponent } from "@js/coco";
1
+ import { CocoComponent } from "@assets/js/shared/coco";
2
2
  import { getData } from "@helpers/alpine";
3
3
  import { captureElementScreenshot } from "@helpers/screenshot";
4
4
  import { isDark } from "@helpers/color";
@@ -23,11 +23,11 @@
23
23
  }
24
24
 
25
25
  .alert-title {
26
- @apply text-heading-6 font-bold;
26
+ @apply coco-heading-6 font-bold;
27
27
  }
28
28
 
29
29
  .alert-message {
30
- @apply text-para-md;
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 text-para-md sm:text-para-sm xl:text-para-md;
96
+ @apply coco-para-md sm:coco-para-sm xl:coco-para-md;
97
97
  }
98
98
 
99
99
  .alert-message {
100
- @apply text-para-md sm:text-para-sm xl:text-para-md;
100
+ @apply coco-para-md sm:coco-para-sm xl:coco-para-md;
101
101
  }
102
102
  }
103
103
 
@@ -1,4 +1,4 @@
1
- import { CocoComponent } from "@js/coco";
1
+ import { CocoComponent } from "@assets/js/shared/coco";
2
2
 
3
3
  export default CocoComponent("appAlert", () => {
4
4
  return {
@@ -110,7 +110,7 @@
110
110
  }
111
111
 
112
112
  .picker-display-input {
113
- @apply text-para-sm h-9;
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 text-para-md h-11;
146
+ @apply coco-para-md h-11;
147
147
  }
148
148
 
149
149
  .picker-display-color {
@@ -1,5 +1,5 @@
1
1
  import iro from "@jaames/iro";
2
- import { CocoComponent } from "@js/coco";
2
+ import { CocoComponent } from "@assets/js/shared/coco";
3
3
  import { isValidHex, formatHex } from "@helpers/color";
4
4
  import { getComponent } from "@helpers/alpine";
5
5
 
@@ -1,4 +1,4 @@
1
- import { CocoComponent } from "@js/coco";
1
+ import { CocoComponent } from "@assets/js/shared/coco";
2
2
  import { getData } from "@helpers/alpine";
3
3
 
4
4
  export default CocoComponent("appColorPickerButton", ({ selected }) => {
@@ -7,7 +7,7 @@ module Coco
7
7
  include Coco::AppHelper
8
8
 
9
9
  wraps_component :button do |args|
10
- Coco::App::Elements::Button.new(**args)
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::App::Elements::Button::SIZE_ALIASES.keys) && !kwargs.key?(:resize)
48
- @size, @resize = Coco::App::Elements::Button::SIZE_ALIASES.fetch(@size)
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
 
@@ -4,7 +4,7 @@
4
4
  @apply px-5 py-4 text-center max-w-[200px] space-y-4;
5
5
 
6
6
  .confirm-text {
7
- @apply text-label-sm font-semibold;
7
+ @apply coco-label-sm font-semibold;
8
8
  }
9
9
  }
10
10
  }
@@ -1,4 +1,4 @@
1
- import { CocoComponent } from "@js/coco.js";
1
+ import { CocoComponent } from "@assets/js/shared/coco.js";
2
2
 
3
3
  export default CocoComponent("appConfirmPanel", () => {
4
4
  return {
@@ -72,12 +72,12 @@
72
72
  }
73
73
 
74
74
  .picker-placeholder-text {
75
- @apply text-para-sm;
75
+ @apply coco-para-sm;
76
76
  width: 148px;
77
77
  }
78
78
 
79
79
  .picker-file-name {
80
- @apply text-label-sm;
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 text-para-md;
97
+ @apply coco-para-md;
98
98
  width: 172px;
99
99
  }
100
100
 
101
101
  .picker-file-name {
102
- @apply text-label-md;
102
+ @apply coco-label-md;
103
103
  }
104
104
 
105
105
  .picker-actions {
@@ -1,4 +1,4 @@
1
- import { CocoComponent } from "@js/coco";
1
+ import { CocoComponent } from "@assets/js/shared/coco";
2
2
  import { getComponent } from "@helpers/alpine";
3
3
  import { basename } from "@helpers/path";
4
4
 
@@ -1,4 +1,4 @@
1
- import { CocoComponent } from "@js/coco";
1
+ import { CocoComponent } from "@assets/js/shared/coco";
2
2
  import { getData } from "@helpers/alpine";
3
3
  import { basename } from "@helpers/path";
4
4
 
@@ -7,7 +7,7 @@ module Coco
7
7
  include Coco::AppHelper
8
8
 
9
9
  wraps_component :button do |args|
10
- Coco::App::Elements::Button.new(icon: :image_plus, **args)
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::App::Elements::Button::SIZE_ALIASES.keys) && !kwargs.key?(:resize)
39
- @size, @resize = Coco::App::Elements::Button::SIZE_ALIASES.fetch(@size)
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
 
@@ -1,4 +1,4 @@
1
- import { CocoComponent } from "@js/coco";
1
+ import { CocoComponent } from "@assets/js/shared/coco";
2
2
  import { getData } from "@helpers/alpine";
3
3
 
4
4
  export default CocoComponent("appLayoutPickerButton", ({ selected }) => {
@@ -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::App::Elements::Button.new(**args)
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::App::Elements::Button::SIZE_ALIASES.keys) && !kwargs.key?(:resize)
28
- @size, @resize = Coco::App::Elements::Button::SIZE_ALIASES.fetch(@size)
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
 
@@ -25,7 +25,7 @@ module Coco
25
25
  end
26
26
 
27
27
  class << self
28
- include Coco::BaseHelper
28
+ include Coco::SharedHelper
29
29
  end
30
30
  end
31
31
  end
@@ -9,7 +9,7 @@
9
9
  }
10
10
 
11
11
  > .coco-button-wrapper > .coco-button,
12
- > [data-component="app-button-to"] .coco-button,
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="app-button"] {
38
- @apply px-4 py-2 text-label-sm;
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="app-button"] {
56
- @apply px-5 py-2.5 text-label-md;
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;
@@ -1,4 +1,4 @@
1
- import { CocoComponent } from "@js/coco";
1
+ import { CocoComponent } from "@assets/js/shared/coco";
2
2
  import { getComponent } from "@helpers/alpine";
3
3
 
4
4
  export default CocoComponent("appMenuButton", () => {
@@ -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::App::Elements::Button::SIZE_ALIASES.keys) && !kwargs.key?(:resize)
13
- @size, @resize = Coco::App::Elements::Button::SIZE_ALIASES.fetch(@size)
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::App::Elements::Button.new(toggle: :vertical, fit: get_option_value(:fit) || :auto, **kwargs)
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 @@
16
16
  }
17
17
 
18
18
  .user-profile-email {
19
- @apply text-gray-500 text-label-sm italic truncate;
19
+ @apply text-gray-500 coco-label-sm italic truncate;
20
20
  }
21
21
  }
22
22
  }
@@ -1,4 +1,4 @@
1
- import { CocoComponent } from "@js/coco";
1
+ import { CocoComponent } from "@assets/js/shared/coco";
2
2
 
3
3
  export default CocoComponent("appNotice", () => {
4
4
  return {};
@@ -1,4 +1,4 @@
1
- import { CocoComponent } from "@js/coco";
1
+ import { CocoComponent } from "@assets/js/shared/coco";
2
2
 
3
3
  export default CocoComponent("appSeamlessTextarea", () => {
4
4
  return {
@@ -22,7 +22,7 @@
22
22
  }
23
23
 
24
24
  .snackbar-content {
25
- @apply text-label-md text-content-light-1 font-semibold flex-grow mr-2 my-2;
25
+ @apply coco-label-md text-content-light-1 font-semibold flex-grow mr-2 my-2;
26
26
  }
27
27
 
28
28
  .coco-button {
@@ -1,4 +1,4 @@
1
- import { CocoComponent } from "@js/coco";
1
+ import { CocoComponent } from "@assets/js/shared/coco";
2
2
 
3
3
  export default CocoComponent("appSnackbar", () => {
4
4
  return {
@@ -1,4 +1,4 @@
1
- import { CocoComponent } from "@js/coco";
1
+ import { CocoComponent } from "@assets/js/shared/coco";
2
2
  import Cookies from "js-cookie";
3
3
 
4
4
  export default CocoComponent("appSystemBanner", (opts = {}) => {
@@ -1,4 +1,4 @@
1
- import { CocoComponent } from "@js/coco";
1
+ import { CocoComponent } from "@assets/js/shared/coco";
2
2
 
3
3
  export default CocoComponent("appToast", () => {
4
4
  return {
@@ -1,4 +1,4 @@
1
- import { CocoComponent } from "@js/coco";
1
+ import { CocoComponent } from "@assets/js/shared/coco";
2
2
  import { getComponent } from "@helpers/alpine";
3
3
 
4
4
  export default CocoComponent("appToolbar", () => {
@@ -16,7 +16,7 @@ module Coco
16
16
  raise "Toolbar already has a `#{alignment}` section defined"
17
17
  end
18
18
 
19
- component = Coco::App::Elements::ButtonGroup.new(**kwargs, theme: :toolbar, collapsible: true)
19
+ component = Coco::ButtonGroup.new(**kwargs, theme: :toolbar, collapsible: true)
20
20
  @sections[alignment] = view_context.render(component, &block)
21
21
  end
22
22
 
@@ -3,7 +3,7 @@ module Coco
3
3
  module Fields
4
4
  class ButtonComponent < ViewComponent::Form::ButtonComponent
5
5
  include Concerns::ActsAsFieldWithOptions
6
- include Coco::AppHelper
6
+ include Coco::SharedHelper
7
7
 
8
8
  def call
9
9
  coco_button(**options) do
@@ -3,6 +3,7 @@ module Coco
3
3
  module Fields
4
4
  class SubmitComponent < ViewComponent::Form::SubmitComponent
5
5
  include Concerns::ActsAsFieldWithOptions
6
+ include Coco::SharedHelper
6
7
 
7
8
  def call
8
9
  coco_button(**options, type: :submit) do
@@ -1,4 +1,4 @@
1
- import { CocoComponent } from "@js/coco";
1
+ import { CocoComponent } from "@assets/js/shared/coco";
2
2
 
3
3
  export default CocoComponent("appLayout", (opts) => {
4
4
  return {
@@ -1,4 +1,4 @@
1
- import { CocoComponent } from "@js/coco";
1
+ import { CocoComponent } from "@assets/js/shared/coco";
2
2
 
3
3
  export default CocoComponent("pageLayout", () => {
4
4
  return {};