coveragebook_components 0.12.1 → 0.13.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (355) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/build/coco/app.css +6576 -5446
  3. data/app/assets/build/coco/app.js +3142 -3169
  4. data/app/assets/build/coco/book.css +5169 -2130
  5. data/app/assets/build/coco/book.js +3986 -1565
  6. data/app/assets/css/app.css +2 -8
  7. data/app/assets/css/base/config.css +1 -0
  8. data/app/assets/css/{base.css → base/setup.css} +7 -4
  9. data/app/assets/css/{shared → base}/tippy.css +18 -0
  10. data/app/assets/css/book.css +2 -4
  11. data/app/assets/js/app.js +25 -9
  12. data/app/assets/js/{libs → base}/alpine/directives/dropdown.js +1 -1
  13. data/app/assets/js/{libs → base}/alpine/directives/tooltip.js +1 -1
  14. data/app/assets/js/{libs → base}/alpine/index.js +7 -7
  15. data/app/assets/js/{libs → base}/alpine/utils/tippy_modifiers.js +1 -1
  16. data/app/assets/js/base/setup.js +8 -0
  17. data/app/assets/js/book.js +4 -4
  18. data/app/components/coco/app/{layouts/application/application.css → application_layout/application_layout.css} +2 -2
  19. data/app/components/coco/app/{layouts/application/application.js → application_layout/application_layout.js} +1 -1
  20. data/app/components/coco/app/application_layout/application_layout.rb +16 -0
  21. data/app/components/coco/app/contact_callout/contact_callout.rb +21 -0
  22. data/app/components/coco/app/faqs/faqs.rb +14 -0
  23. data/app/components/coco/app/{blocks/header → header}/header.js +1 -1
  24. data/app/components/coco/app/header/header.rb +33 -0
  25. data/app/components/coco/app/{blocks/nav_drawer → nav_drawer}/nav_drawer.css +1 -1
  26. data/app/components/coco/app/{blocks/nav_drawer → nav_drawer}/nav_drawer.js +1 -1
  27. data/app/components/coco/app/nav_drawer/nav_drawer.rb +32 -0
  28. data/app/components/coco/app/plan_card/plan_card.rb +39 -0
  29. data/app/components/coco/app/{blocks/plan_picker → plan_picker}/plan_picker.css +3 -3
  30. data/app/components/coco/app/{blocks/plan_picker → plan_picker}/plan_picker.js +1 -1
  31. data/app/components/coco/app/plan_picker/plan_picker.rb +25 -0
  32. data/app/components/coco/app/{blocks/sidebar_nav → sidebar_nav}/item/item.js +2 -2
  33. data/app/components/coco/app/sidebar_nav/item/item.rb +48 -0
  34. data/app/components/coco/app/{blocks/sidebar_nav → sidebar_nav}/menu/menu.js +1 -1
  35. data/app/components/coco/app/sidebar_nav/menu/menu.rb +46 -0
  36. data/app/components/coco/app/{blocks/sidebar_nav → sidebar_nav}/navbar/navbar.html.erb +1 -1
  37. data/app/components/coco/app/{blocks/sidebar_nav → sidebar_nav}/navbar/navbar.js +2 -2
  38. data/app/components/coco/app/sidebar_nav/navbar/navbar.rb +50 -0
  39. data/app/components/coco/app/{blocks/slide_editor → slide_editor}/slide_editor.js +2 -2
  40. data/app/components/coco/app/slide_editor/slide_editor.rb +114 -0
  41. data/app/components/coco/book/editable_slide/editable_slide.rb +72 -0
  42. data/app/components/coco/book/media_slide/media_slide.rb +12 -0
  43. data/app/components/coco/{shared → buttons}/button/button.js +1 -1
  44. data/app/components/coco/{shared → buttons}/button/button.rb +2 -2
  45. data/app/components/coco/{shared → buttons}/button/button_dropdown.js +1 -1
  46. data/app/components/coco/{shared → buttons}/button_group/button_group.js +2 -2
  47. data/app/components/coco/{shared → buttons}/button_to/button_to.rb +1 -1
  48. data/app/components/coco/{app/elements → buttons}/color_picker_button/color_picker_button.css +2 -2
  49. data/app/components/coco/{app/elements → buttons}/color_picker_button/color_picker_button.html.erb +1 -1
  50. data/app/components/coco/{app/elements → buttons}/color_picker_button/color_picker_button.js +2 -2
  51. data/app/components/coco/buttons/color_picker_button/color_picker_button.rb +53 -0
  52. data/app/components/coco/{app/elements → buttons}/confirm_panel/confirm_panel.css +1 -1
  53. data/app/components/coco/{app/elements → buttons}/confirm_panel/confirm_panel.html.erb +1 -1
  54. data/app/components/coco/{app/elements → buttons}/confirm_panel/confirm_panel.js +2 -2
  55. data/app/components/coco/buttons/confirm_panel/confirm_panel.rb +19 -0
  56. data/app/components/coco/{app/elements → buttons}/image_picker_button/image_picker_button.css +2 -2
  57. data/app/components/coco/{app/elements → buttons}/image_picker_button/image_picker_button.html.erb +1 -1
  58. data/app/components/coco/{app/elements → buttons}/image_picker_button/image_picker_button.js +2 -2
  59. data/app/components/coco/buttons/image_picker_button/image_picker_button.rb +44 -0
  60. data/app/components/coco/{app/elements → buttons}/layout_picker_button/layout_picker_button.css +11 -11
  61. data/app/components/coco/{app/elements → buttons}/layout_picker_button/layout_picker_button.html.erb +1 -1
  62. data/app/components/coco/{app/elements → buttons}/layout_picker_button/layout_picker_button.js +2 -2
  63. data/app/components/coco/buttons/layout_picker_button/layout_picker_button.rb +33 -0
  64. data/app/components/coco/{app/elements → buttons}/menu/menu.css +2 -4
  65. data/app/components/coco/buttons/menu/menu.rb +37 -0
  66. data/app/components/coco/{app/elements → buttons}/menu_button/menu_button.css +1 -1
  67. data/app/components/coco/{app/elements → buttons}/menu_button/menu_button.html.erb +1 -1
  68. data/app/components/coco/buttons/menu_button/menu_button.js +6 -0
  69. data/app/components/coco/buttons/menu_button/menu_button.rb +30 -0
  70. data/app/components/coco/{app/elements → buttons}/menu_items/user_profile/user_profile.css +1 -1
  71. data/app/components/coco/buttons/menu_items/user_profile/user_profile.rb +18 -0
  72. data/app/components/coco/{app/elements → buttons}/option_bar/option_bar.css +1 -1
  73. data/app/components/coco/buttons/option_bar/option_bar.rb +13 -0
  74. data/app/components/coco/{app/elements → buttons}/toolbar/toolbar.css +1 -1
  75. data/app/components/coco/{app/elements → buttons}/toolbar/toolbar.js +1 -1
  76. data/app/components/coco/buttons/toolbar/toolbar.rb +35 -0
  77. data/app/components/coco/component.rb +1 -1
  78. data/app/components/coco/concerns/acts_as_button_group.rb +4 -11
  79. data/app/components/coco/concerns/acts_as_field_with_html_options.rb +1 -1
  80. data/app/components/coco/concerns/acts_as_field_with_options.rb +2 -2
  81. data/app/components/coco/embeds/youtube_embed/youtube_embed.rb +16 -0
  82. data/app/components/coco/fields/button_component.rb +14 -0
  83. data/app/components/coco/fields/check_box_component.rb +7 -0
  84. data/app/components/coco/fields/collection_check_boxes_component.rb +7 -0
  85. data/app/components/coco/fields/collection_radio_buttons_component.rb +7 -0
  86. data/app/components/coco/fields/collection_select_component.rb +7 -0
  87. data/app/components/coco/fields/color_field_component.rb +7 -0
  88. data/app/components/coco/fields/date_field_component.rb +7 -0
  89. data/app/components/coco/fields/date_select_component.rb +7 -0
  90. data/app/components/coco/fields/datetime_local_field_component.rb +7 -0
  91. data/app/components/coco/fields/datetime_select_component.rb +7 -0
  92. data/app/components/coco/fields/email_field_component.rb +7 -0
  93. data/app/components/coco/fields/error_message_component.rb +7 -0
  94. data/app/components/coco/fields/file_field_component.rb +7 -0
  95. data/app/components/coco/fields/grouped_collection_select_component.rb +7 -0
  96. data/app/components/coco/fields/hint_component.rb +7 -0
  97. data/app/components/coco/fields/label_component.rb +7 -0
  98. data/app/components/coco/fields/month_field_component.rb +7 -0
  99. data/app/components/coco/fields/number_field_component.rb +7 -0
  100. data/app/components/coco/fields/password_field_component.rb +7 -0
  101. data/app/components/coco/fields/radio_button_component.rb +7 -0
  102. data/app/components/coco/fields/range_field_component.rb +7 -0
  103. data/app/components/coco/fields/search_field_component.rb +7 -0
  104. data/app/components/coco/fields/select_component.rb +7 -0
  105. data/app/components/coco/fields/submit_component.rb +14 -0
  106. data/app/components/coco/fields/telephone_field_component.rb +7 -0
  107. data/app/components/coco/fields/text_area_component.rb +7 -0
  108. data/app/components/coco/fields/text_field_component.rb +7 -0
  109. data/app/components/coco/fields/time_field_component.rb +7 -0
  110. data/app/components/coco/fields/time_select_component.rb +7 -0
  111. data/app/components/coco/fields/time_zone_select_component.rb +7 -0
  112. data/app/components/coco/fields/url_field_component.rb +7 -0
  113. data/app/components/coco/fields/week_field_component.rb +7 -0
  114. data/app/components/coco/fields/weekday_select_component.rb +7 -0
  115. data/app/components/coco/{shared → images}/icon/icon.js +1 -1
  116. data/app/components/coco/{shared → images}/image_uploader/image_uploader.js +1 -1
  117. data/app/components/coco/{app/elements → indicators}/stamp/stamp.css +1 -1
  118. data/app/components/coco/indicators/stamp/stamp.rb +25 -0
  119. data/app/components/coco/{app/layouts → layout}/page/page.css +5 -2
  120. data/app/components/coco/{app/layouts → layout}/page/page.js +1 -1
  121. data/app/components/coco/layout/page/page.rb +55 -0
  122. data/app/components/coco/{app/elements → messaging}/alert/alert.css +7 -7
  123. data/app/components/coco/{app/elements → messaging}/alert/alert.html.erb +1 -1
  124. data/app/components/coco/{app/elements → messaging}/alert/alert.js +2 -2
  125. data/app/components/coco/messaging/alert/alert.rb +75 -0
  126. data/app/components/coco/{app/elements → messaging}/notice/notice.css +1 -1
  127. data/app/components/coco/messaging/notice/notice.html.erb +5 -0
  128. data/app/components/coco/messaging/notice/notice.js +5 -0
  129. data/app/components/coco/messaging/notice/notice.rb +18 -0
  130. data/app/components/coco/{app/elements → messaging}/snackbar/snackbar.css +1 -1
  131. data/app/components/coco/{app/elements → messaging}/snackbar/snackbar.html.erb +1 -1
  132. data/app/components/coco/{app/elements → messaging}/snackbar/snackbar.js +2 -2
  133. data/app/components/coco/messaging/snackbar/snackbar.rb +34 -0
  134. data/app/components/coco/messaging/system_banner/system_banner.css +4 -0
  135. data/app/components/coco/messaging/system_banner/system_banner.html.erb +5 -0
  136. data/app/components/coco/{app/elements → messaging}/system_banner/system_banner.js +2 -2
  137. data/app/components/coco/messaging/system_banner/system_banner.rb +78 -0
  138. data/app/components/coco/{app/elements → messaging}/toast/toast.css +1 -1
  139. data/app/components/coco/{app/elements → messaging}/toast/toast.html.erb +1 -1
  140. data/app/components/coco/{app/elements → messaging}/toast/toast.js +2 -2
  141. data/app/components/coco/messaging/toast/toast.rb +19 -0
  142. data/app/components/coco/{shared → modals}/modal/modal.js +2 -2
  143. data/app/components/coco/{shared → modals}/modal/modal.rb +1 -0
  144. data/app/components/coco/{shared → modals}/modal_dialog/modal_dialog.js +1 -1
  145. data/app/components/coco/{shared → modals}/modal_lightbox/modal_lightbox.js +1 -1
  146. data/app/components/coco/{shared → navigation}/link/link.rb +1 -1
  147. data/app/components/coco/{shared/pager_link/pager_link.css → navigation/pager_button/pager_button.css} +1 -1
  148. data/app/components/coco/{shared/pager_link/pager_link.rb → navigation/pager_button/pager_button.rb} +1 -1
  149. data/app/components/coco/{app/elements → pickers}/color_picker/color_picker.css +11 -11
  150. data/app/components/coco/{app/elements → pickers}/color_picker/color_picker.html.erb +1 -1
  151. data/app/components/coco/{app/elements → pickers}/color_picker/color_picker.js +2 -2
  152. data/app/components/coco/pickers/color_picker/color_picker.rb +48 -0
  153. data/app/components/coco/{app/elements → pickers}/image_picker/image_picker.css +11 -11
  154. data/app/components/coco/{app/elements → pickers}/image_picker/image_picker.html.erb +1 -1
  155. data/app/components/coco/{app/elements → pickers}/image_picker/image_picker.js +2 -2
  156. data/app/components/coco/pickers/image_picker/image_picker.rb +20 -0
  157. data/app/components/coco/presented_component.rb +1 -1
  158. data/app/components/coco/{shared → utilities}/dropdown/dropdown.js +1 -1
  159. data/app/components/coco/{shared → utilities}/poll_controller/poll_controller.js +1 -1
  160. data/app/components/coco/{app/elements → utilities}/seamless_textarea/seamless_textarea.css +1 -1
  161. data/app/components/coco/{app/elements → utilities}/seamless_textarea/seamless_textarea.html.erb +1 -1
  162. data/app/components/coco/{app/elements → utilities}/seamless_textarea/seamless_textarea.js +2 -2
  163. data/app/components/coco/utilities/seamless_textarea/seamless_textarea.rb +25 -0
  164. data/app/helpers/coco/app_components_helper.rb +35 -0
  165. data/app/helpers/coco/book_components_helper.rb +11 -0
  166. data/app/helpers/coco/components_helper.rb +7 -0
  167. data/app/helpers/coco/core_components_helper.rb +257 -0
  168. data/app/helpers/coco/helpers.rb +2 -2
  169. data/app/helpers/coco/modal_helper.rb +22 -0
  170. data/config/locales/coco.en.yml +17 -18
  171. data/config/{tailwind.base.config.cjs → tailwind.config.cjs} +10 -0
  172. data/config/tokens.cjs +9 -23
  173. data/lib/coco/app_form_builder.rb +1 -1
  174. data/lib/coco/engine.rb +3 -3
  175. data/lib/coco.rb +1 -1
  176. metadata +251 -258
  177. data/app/assets/css/app/config.css +0 -1
  178. data/app/assets/css/app/tippy.css +0 -19
  179. data/app/assets/css/book/config.css +0 -1
  180. data/app/assets/js/app/components.js +0 -4
  181. data/app/assets/js/app/setup.js +0 -23
  182. data/app/assets/js/book/components.js +0 -4
  183. data/app/assets/js/shared/components.js +0 -4
  184. data/app/components/coco/app/blocks/contact_callout/contact_callout.rb +0 -23
  185. data/app/components/coco/app/blocks/faqs/faqs.rb +0 -16
  186. data/app/components/coco/app/blocks/header/header.rb +0 -35
  187. data/app/components/coco/app/blocks/nav_drawer/nav_drawer.rb +0 -34
  188. data/app/components/coco/app/blocks/plan_picker/plan_picker.rb +0 -27
  189. data/app/components/coco/app/blocks/sidebar_nav/item/item.rb +0 -50
  190. data/app/components/coco/app/blocks/sidebar_nav/menu/menu.rb +0 -48
  191. data/app/components/coco/app/blocks/sidebar_nav/navbar/navbar.rb +0 -50
  192. data/app/components/coco/app/blocks/slide_editor/slide_editor.rb +0 -116
  193. data/app/components/coco/app/elements/alert/alert.rb +0 -79
  194. data/app/components/coco/app/elements/color_picker/color_picker.rb +0 -53
  195. data/app/components/coco/app/elements/color_picker_button/color_picker_button.rb +0 -58
  196. data/app/components/coco/app/elements/confirm_panel/confirm_panel.rb +0 -23
  197. data/app/components/coco/app/elements/image_picker/image_picker.rb +0 -25
  198. data/app/components/coco/app/elements/image_picker_button/image_picker_button.rb +0 -49
  199. data/app/components/coco/app/elements/layout_picker_button/layout_picker_button.rb +0 -38
  200. data/app/components/coco/app/elements/menu/menu.rb +0 -41
  201. data/app/components/coco/app/elements/menu_button/menu_button.js +0 -6
  202. data/app/components/coco/app/elements/menu_button/menu_button.rb +0 -35
  203. data/app/components/coco/app/elements/menu_items/user_profile/user_profile.rb +0 -20
  204. data/app/components/coco/app/elements/notice/notice.html.erb +0 -5
  205. data/app/components/coco/app/elements/notice/notice.js +0 -5
  206. data/app/components/coco/app/elements/notice/notice.rb +0 -22
  207. data/app/components/coco/app/elements/option_bar/option_bar.rb +0 -17
  208. data/app/components/coco/app/elements/plan_card/plan_card.rb +0 -41
  209. data/app/components/coco/app/elements/seamless_textarea/seamless_textarea.rb +0 -29
  210. data/app/components/coco/app/elements/snackbar/snackbar.rb +0 -38
  211. data/app/components/coco/app/elements/stamp/stamp.rb +0 -29
  212. data/app/components/coco/app/elements/system_banner/system_banner.css +0 -4
  213. data/app/components/coco/app/elements/system_banner/system_banner.html.erb +0 -5
  214. data/app/components/coco/app/elements/system_banner/system_banner.rb +0 -82
  215. data/app/components/coco/app/elements/toast/toast.rb +0 -23
  216. data/app/components/coco/app/elements/toolbar/toolbar.rb +0 -41
  217. data/app/components/coco/app/fields/button_component.rb +0 -16
  218. data/app/components/coco/app/fields/check_box_component.rb +0 -9
  219. data/app/components/coco/app/fields/collection_check_boxes_component.rb +0 -9
  220. data/app/components/coco/app/fields/collection_radio_buttons_component.rb +0 -9
  221. data/app/components/coco/app/fields/collection_select_component.rb +0 -9
  222. data/app/components/coco/app/fields/color_field_component.rb +0 -9
  223. data/app/components/coco/app/fields/date_field_component.rb +0 -9
  224. data/app/components/coco/app/fields/date_select_component.rb +0 -9
  225. data/app/components/coco/app/fields/datetime_local_field_component.rb +0 -9
  226. data/app/components/coco/app/fields/datetime_select_component.rb +0 -9
  227. data/app/components/coco/app/fields/email_field_component.rb +0 -9
  228. data/app/components/coco/app/fields/error_message_component.rb +0 -9
  229. data/app/components/coco/app/fields/file_field_component.rb +0 -9
  230. data/app/components/coco/app/fields/grouped_collection_select_component.rb +0 -9
  231. data/app/components/coco/app/fields/hint_component.rb +0 -9
  232. data/app/components/coco/app/fields/label_component.rb +0 -9
  233. data/app/components/coco/app/fields/month_field_component.rb +0 -9
  234. data/app/components/coco/app/fields/number_field_component.rb +0 -9
  235. data/app/components/coco/app/fields/password_field_component.rb +0 -9
  236. data/app/components/coco/app/fields/radio_button_component.rb +0 -9
  237. data/app/components/coco/app/fields/range_field_component.rb +0 -9
  238. data/app/components/coco/app/fields/search_field_component.rb +0 -9
  239. data/app/components/coco/app/fields/select_component.rb +0 -9
  240. data/app/components/coco/app/fields/submit_component.rb +0 -16
  241. data/app/components/coco/app/fields/telephone_field_component.rb +0 -9
  242. data/app/components/coco/app/fields/text_area_component.rb +0 -9
  243. data/app/components/coco/app/fields/text_field_component.rb +0 -9
  244. data/app/components/coco/app/fields/time_field_component.rb +0 -9
  245. data/app/components/coco/app/fields/time_select_component.rb +0 -9
  246. data/app/components/coco/app/fields/time_zone_select_component.rb +0 -9
  247. data/app/components/coco/app/fields/url_field_component.rb +0 -9
  248. data/app/components/coco/app/fields/week_field_component.rb +0 -9
  249. data/app/components/coco/app/fields/weekday_select_component.rb +0 -9
  250. data/app/components/coco/app/layouts/application/application.rb +0 -18
  251. data/app/components/coco/app/layouts/page/page.rb +0 -59
  252. data/app/components/coco/book/blocks/slides/editable_slide/editable_slide.rb +0 -76
  253. data/app/components/coco/book/blocks/slides/media_slide/media_slide.rb +0 -16
  254. data/app/components/coco/shared/embeds/youtube/youtube.rb +0 -20
  255. data/app/helpers/coco/app_helper.rb +0 -141
  256. data/app/helpers/coco/book_helper.rb +0 -11
  257. data/app/helpers/coco/component_helper.rb +0 -15
  258. data/app/helpers/coco/shared_helper.rb +0 -111
  259. data/app/helpers/coco/url_helper.rb +0 -30
  260. data/config/tailwind.app.config.cjs +0 -21
  261. data/config/tailwind.book.config.cjs +0 -21
  262. /data/app/assets/css/{shared → base}/utils/colors.css +0 -0
  263. /data/app/assets/css/{shared → base}/utils/icons.css +0 -0
  264. /data/app/assets/css/{app/utils.css → base/utils/layout.css} +0 -0
  265. /data/app/assets/css/{shared → base}/utils/text.css +0 -0
  266. /data/app/assets/js/{libs → base}/alpine/directives/destroy.js +0 -0
  267. /data/app/assets/js/{libs → base}/alpine/directives/dimensions.js +0 -0
  268. /data/app/assets/js/{libs → base}/alpine/directives/notification.js +0 -0
  269. /data/app/assets/js/{libs → base}/alpine/directives/options.js +0 -0
  270. /data/app/assets/js/{libs → base}/alpine/directives/undo.js +0 -0
  271. /data/app/assets/js/{shared → base}/coco.js +0 -0
  272. /data/app/assets/js/{libs → base}/tippy/index.js +0 -0
  273. /data/app/assets/js/{libs → base}/tippy/plugins/hide_on_esc.js +0 -0
  274. /data/app/components/coco/app/{layouts/application/application.html.erb → application_layout/application_layout.html.erb} +0 -0
  275. /data/app/components/coco/app/{blocks/contact_callout → contact_callout}/contact_callout.css +0 -0
  276. /data/app/components/coco/app/{blocks/contact_callout → contact_callout}/contact_callout.html.erb +0 -0
  277. /data/app/components/coco/app/{blocks/faqs → faqs}/faqs.css +0 -0
  278. /data/app/components/coco/app/{blocks/faqs → faqs}/faqs.html.erb +0 -0
  279. /data/app/components/coco/app/{blocks/header → header}/header.css +0 -0
  280. /data/app/components/coco/app/{blocks/header → header}/header.html.erb +0 -0
  281. /data/app/components/coco/app/{blocks/nav_drawer → nav_drawer}/nav_drawer.html.erb +0 -0
  282. /data/app/components/coco/app/{elements/plan_card → plan_card}/plan_card.css +0 -0
  283. /data/app/components/coco/app/{elements/plan_card → plan_card}/plan_card.html.erb +0 -0
  284. /data/app/components/coco/app/{blocks/plan_picker → plan_picker}/plan_picker.html.erb +0 -0
  285. /data/app/components/coco/app/{blocks/sidebar_nav → sidebar_nav}/item/item.css +0 -0
  286. /data/app/components/coco/app/{blocks/sidebar_nav → sidebar_nav}/item/item.html.erb +0 -0
  287. /data/app/components/coco/app/{blocks/sidebar_nav → sidebar_nav}/menu/menu.css +0 -0
  288. /data/app/components/coco/app/{blocks/sidebar_nav → sidebar_nav}/menu/menu.html.erb +0 -0
  289. /data/app/components/coco/app/{blocks/sidebar_nav → sidebar_nav}/navbar/navbar.css +0 -0
  290. /data/app/components/coco/app/{blocks/slide_editor → slide_editor}/slide_editor.css +0 -0
  291. /data/app/components/coco/app/{blocks/slide_editor → slide_editor}/slide_editor.html.erb +0 -0
  292. /data/app/components/coco/book/{blocks/slides/editable_slide → editable_slide}/editable_slide.css +0 -0
  293. /data/app/components/coco/book/{blocks/slides/editable_slide → editable_slide}/editable_slide.html.erb +0 -0
  294. /data/app/components/coco/book/{blocks/slides/media_slide → media_slide}/media_slide.css +0 -0
  295. /data/app/components/coco/book/{blocks/slides/media_slide → media_slide}/media_slide.html.erb +0 -0
  296. /data/app/components/coco/{shared → buttons}/button/button.css +0 -0
  297. /data/app/components/coco/{shared → buttons}/button/button.html.erb +0 -0
  298. /data/app/components/coco/{shared → buttons}/button_group/button_group.css +0 -0
  299. /data/app/components/coco/{shared → buttons}/button_group/button_group.html.erb +0 -0
  300. /data/app/components/coco/{shared → buttons}/button_group/button_group.rb +0 -0
  301. /data/app/components/coco/{shared → buttons}/button_to/button_to.css +0 -0
  302. /data/app/components/coco/{shared → buttons}/button_to/button_to.html.erb +0 -0
  303. /data/app/components/coco/{app/elements → buttons}/menu/menu.html.erb +0 -0
  304. /data/app/components/coco/{app/elements → buttons}/menu_items/user_profile/user_profile.html.erb +0 -0
  305. /data/app/components/coco/{app/elements → buttons}/option_bar/option_bar.html.erb +0 -0
  306. /data/app/components/coco/{app/elements → buttons}/toolbar/toolbar.html.erb +0 -0
  307. /data/app/components/coco/{shared/embeds/youtube/youtube.css → embeds/youtube_embed/youtube_embed.css} +0 -0
  308. /data/app/components/coco/{shared/embeds/youtube/youtube.html.erb → embeds/youtube_embed/youtube_embed.html.erb} +0 -0
  309. /data/app/components/coco/{shared → images}/avatar/avatar.css +0 -0
  310. /data/app/components/coco/{shared → images}/avatar/avatar.rb +0 -0
  311. /data/app/components/coco/{shared → images}/icon/icon.css +0 -0
  312. /data/app/components/coco/{shared → images}/icon/icon.html.erb +0 -0
  313. /data/app/components/coco/{shared → images}/icon/icon.rb +0 -0
  314. /data/app/components/coco/{shared → images}/image/image.css +0 -0
  315. /data/app/components/coco/{shared → images}/image/image.rb +0 -0
  316. /data/app/components/coco/{shared → images}/image_uploader/image_uploader.css +0 -0
  317. /data/app/components/coco/{shared → images}/image_uploader/image_uploader.html.erb +0 -0
  318. /data/app/components/coco/{shared → images}/image_uploader/image_uploader.rb +0 -0
  319. /data/app/components/coco/{shared → images}/svg/svg.html.erb +0 -0
  320. /data/app/components/coco/{shared → images}/svg/svg.rb +0 -0
  321. /data/app/components/coco/{shared → indicators}/badge/badge.css +0 -0
  322. /data/app/components/coco/{shared → indicators}/badge/badge.html.erb +0 -0
  323. /data/app/components/coco/{shared → indicators}/badge/badge.rb +0 -0
  324. /data/app/components/coco/{app/elements → indicators}/stamp/stamp.html.erb +0 -0
  325. /data/app/components/coco/{app/layouts → layout}/page/page.html.erb +0 -0
  326. /data/app/components/coco/{shared → layout}/panel/panel.css +0 -0
  327. /data/app/components/coco/{shared → layout}/panel/panel.html.erb +0 -0
  328. /data/app/components/coco/{shared → layout}/panel/panel.rb +0 -0
  329. /data/app/components/coco/{shared → layout}/spacer/spacer.css +0 -0
  330. /data/app/components/coco/{shared → layout}/spacer/spacer.rb +0 -0
  331. /data/app/components/coco/{shared → layout}/stack/stack.css +0 -0
  332. /data/app/components/coco/{shared → layout}/stack/stack.html.erb +0 -0
  333. /data/app/components/coco/{shared → layout}/stack/stack.rb +0 -0
  334. /data/app/components/coco/{shared → modals}/modal/modal.css +0 -0
  335. /data/app/components/coco/{shared → modals}/modal/modal.html.erb +0 -0
  336. /data/app/components/coco/{shared → modals}/modal_dialog/modal_dialog.css +0 -0
  337. /data/app/components/coco/{shared → modals}/modal_dialog/modal_dialog.html.erb +0 -0
  338. /data/app/components/coco/{shared → modals}/modal_dialog/modal_dialog.rb +0 -0
  339. /data/app/components/coco/{shared → modals}/modal_lightbox/modal_lightbox.css +0 -0
  340. /data/app/components/coco/{shared → modals}/modal_lightbox/modal_lightbox.html.erb +0 -0
  341. /data/app/components/coco/{shared → modals}/modal_lightbox/modal_lightbox.rb +0 -0
  342. /data/app/components/coco/{shared → navigation}/link/link.css +0 -0
  343. /data/app/components/coco/{shared/pager_link/pager_link.html.erb → navigation/pager_button/pager_button.html.erb} +0 -0
  344. /data/app/components/coco/{shared → typography}/prose/prose.css +0 -0
  345. /data/app/components/coco/{shared → typography}/prose/prose.rb +0 -0
  346. /data/app/components/coco/{shared → utilities}/content/content.rb +0 -0
  347. /data/app/components/coco/{shared → utilities}/dropdown/dropdown.css +0 -0
  348. /data/app/components/coco/{shared → utilities}/dropdown/dropdown.html.erb +0 -0
  349. /data/app/components/coco/{shared → utilities}/dropdown/dropdown.rb +0 -0
  350. /data/app/components/coco/{shared → utilities}/placeholder/placeholder.css +0 -0
  351. /data/app/components/coco/{shared → utilities}/placeholder/placeholder.html.erb +0 -0
  352. /data/app/components/coco/{shared → utilities}/placeholder/placeholder.rb +0 -0
  353. /data/app/components/coco/{shared → utilities}/poll_controller/poll_controller.css +0 -0
  354. /data/app/components/coco/{shared → utilities}/poll_controller/poll_controller.html.erb +0 -0
  355. /data/app/components/coco/{shared → utilities}/poll_controller/poll_controller.rb +0 -0
@@ -0,0 +1,30 @@
1
+ module Coco
2
+ class MenuButton < Coco::Component
3
+ include Concerns::AcceptsOptions
4
+ include Concerns::WithIcon
5
+ include Concerns::WrapsComponent
6
+
7
+ wraps_component :button do |kwargs|
8
+ @size = kwargs.fetch(:size, :default)&.to_sym
9
+ if @size.in?(Coco::Button::SIZE_ALIASES.keys) && !kwargs.key?(:resize)
10
+ @size, @resize = Coco::Button::SIZE_ALIASES.fetch(@size)
11
+ end
12
+
13
+ Coco::Button.new(toggle: :vertical, fit: get_option_value(:fit) || :auto, **kwargs)
14
+ end
15
+
16
+ accepts_option :fit, from: [:auto, :full]
17
+
18
+ renders_one :text, Coco::Content
19
+
20
+ renders_one :menu, ->(**kwargs) do
21
+ Coco::Menu.new(size: @size, resize: @resize, **kwargs)
22
+ end
23
+
24
+ attr_reader :size, :resize
25
+
26
+ def button_text
27
+ text || content
28
+ end
29
+ end
30
+ end
@@ -1,5 +1,5 @@
1
1
  @layer components {
2
- [data-coco][data-component="app-user-profile"] {
2
+ [data-coco][data-component="user-profile-menu-item"] {
3
3
  @apply px-4 py-1.5 grid grid-rows-1 gap-3;
4
4
  grid-template-columns: min-content 1fr;
5
5
 
@@ -0,0 +1,18 @@
1
+ module Coco
2
+ module MenuItems
3
+ class UserProfile < Coco::Component
4
+ component_name :user_profile_menu_item
5
+
6
+ renders_one :avatar, ->(**kwargs) do
7
+ Coco::Avatar.new(name: name, **kwargs, size: :lg)
8
+ end
9
+
10
+ attr_reader :name, :email
11
+
12
+ def initialize(name:, email:, **)
13
+ @name = name
14
+ @email = email
15
+ end
16
+ end
17
+ end
18
+ end
@@ -1,5 +1,5 @@
1
1
  @layer components {
2
- [data-coco][data-component="app-option-bar"] {
2
+ [data-coco][data-component="option-bar"] {
3
3
  @apply border border-gray-transparent-100 p-1 bg-gray-transparent-50;
4
4
 
5
5
  border-radius: 44px;
@@ -0,0 +1,13 @@
1
+ module Coco
2
+ class OptionBar < Coco::Component
3
+ include Concerns::AcceptsOptions
4
+
5
+ accepts_option :size, from: [:sm, :md], default: :sm
6
+
7
+ renders_many :options, ->(*args, selected: false, **kwargs, &block) do
8
+ theme = selected ? :neutral_light : :blank
9
+ size = get_option_value(:size)
10
+ coco_button(*args, **kwargs, theme:, size:, class: ("selected" if selected), &block)
11
+ end
12
+ end
13
+ end
@@ -1,5 +1,5 @@
1
1
  @layer components {
2
- [data-coco][data-component="app-toolbar"] {
2
+ [data-coco][data-component="toolbar"] {
3
3
  .toolbar-sections {
4
4
  @apply flex items-center gap-x-2;
5
5
  }
@@ -1,4 +1,4 @@
1
- import { CocoComponent } from "@assets/js/shared/coco";
1
+ import { CocoComponent } from "@assets/js/base/coco";
2
2
  import { getComponent } from "@helpers/alpine";
3
3
 
4
4
  export default CocoComponent("appToolbar", () => {
@@ -0,0 +1,35 @@
1
+ module Coco
2
+ class Toolbar < Coco::Component
3
+ renders_many :sections,
4
+ ->(*args, align: nil, **kwargs, &block) do
5
+ alignment = if align.nil?
6
+ @sections[:start].nil? ? :start : :end
7
+ else
8
+ align
9
+ end.to_sym
10
+
11
+ unless @sections[alignment].nil?
12
+ raise "Toolbar already has a `#{alignment}` section defined"
13
+ end
14
+
15
+ component = Coco::ButtonGroup.new(**kwargs, theme: :toolbar, collapsible: true)
16
+ @sections[alignment] = view_context.render(component, &block)
17
+ end
18
+
19
+ def initialize(**kwargs)
20
+ @sections = {
21
+ start: nil,
22
+ end: nil
23
+ }
24
+ super(**kwargs)
25
+ end
26
+
27
+ def start_section
28
+ @sections[:start]
29
+ end
30
+
31
+ def end_section
32
+ @sections[:end]
33
+ end
34
+ end
35
+ end
@@ -3,7 +3,7 @@ module Coco
3
3
  include Concerns::AcceptsTagAttributes
4
4
  include Concerns::HasName
5
5
  include Concerns::Translatable
6
- include Coco::ComponentHelper
6
+ include Coco::CoreComponentsHelper
7
7
  include Coco::AlpineHelper
8
8
 
9
9
  def accepts_options?
@@ -2,14 +2,12 @@ module Coco
2
2
  module Concerns
3
3
  module ActsAsButtonGroup
4
4
  extend ActiveSupport::Concern
5
- include Coco::AppHelper
6
5
 
7
6
  BUTTON_TYPES = {
8
- menu: "Coco::App::Elements::MenuButton",
9
- color_picker: "Coco::App::Elements::ColorPickerButton",
10
- layout_picker: "Coco::App::Elements::LayoutPickerButton",
11
- image_picker: "Coco::App::Elements::ImagePickerButton",
12
- dropdown: "Coco::App::Elements::DropdownButton"
7
+ menu: "Coco::MenuButton",
8
+ color_picker: "Coco::ColorPickerButton",
9
+ layout_picker: "Coco::LayoutPickerButton",
10
+ image_picker: "Coco::ImagePickerButton"
13
11
  }
14
12
 
15
13
  included do
@@ -18,7 +16,6 @@ module Coco
18
16
  divider: ->(**kwargs) { tag.div(class: "divider") },
19
17
  button: ->(*args, **kwargs, &block) { coco_button(*args, **button_kwargs(kwargs, :button), &block) },
20
18
  menu_button: ->(*args, **kwargs, &block) { instantiate_button(:menu, *args, **kwargs, &block) },
21
- dropdown_button: ->(*args, **kwargs, &block) { instantiate_button(:dropdown, *args, **kwargs, &block) },
22
19
  color_picker_button: ->(*args, **kwargs, &block) { instantiate_button(:color_picker, *args, **kwargs, &block) },
23
20
  image_picker_button: ->(*args, **kwargs, &block) { instantiate_button(:image_picker, *args, **kwargs, &block) },
24
21
  layout_picker_button: ->(*args, **kwargs, &block) { instantiate_button(:layout_picker, *args, **kwargs, &block) }
@@ -64,10 +61,6 @@ module Coco
64
61
  with_item_layout_picker_button(...)
65
62
  end
66
63
 
67
- def with_dropdown_button(...)
68
- with_item_dropdown_button(...)
69
- end
70
-
71
64
  private
72
65
 
73
66
  def button_kwargs(kwargs, type = nil)
@@ -7,7 +7,7 @@ module Coco
7
7
  def set_html_options!
8
8
  @html_options[:data] ||= {}
9
9
  @html_options[:data][:coco] = "✔"
10
- @html_options[:data][:component] = "app-form-#{component_name.delete_prefix("app-")}"
10
+ @html_options[:data][:component] = "form-#{component_name.delete_prefix("fields-")}"
11
11
  super
12
12
  end
13
13
  end
@@ -3,12 +3,12 @@ module Coco
3
3
  module ActsAsFieldWithOptions
4
4
  extend ActiveSupport::Concern
5
5
  include Concerns::HasName
6
- include AppHelper
6
+ include AppComponentsHelper
7
7
 
8
8
  def combine_options!
9
9
  @options[:data] ||= {}
10
10
  @options[:data][:coco] = "✔"
11
- @options[:data][:component] = "app-form-#{component_name.delete_prefix("app-")}"
11
+ @options[:data][:component] = "form-#{component_name.delete_prefix("fields-")}"
12
12
  super
13
13
  end
14
14
  end
@@ -0,0 +1,16 @@
1
+ module Coco
2
+ class YoutubeEmbed < Coco::Component
3
+ def initialize(url:, **kwargs)
4
+ @url = url
5
+ end
6
+
7
+ def video_id
8
+ youtube_url = /youtube.com\/(watch\?v=|v\/)([^&]+)/.match(@url)
9
+ youtube_url[2] if youtube_url
10
+ end
11
+
12
+ def src
13
+ "https://www.youtube.com/embed/#{video_id}"
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,14 @@
1
+ module Coco
2
+ module Fields
3
+ class ButtonComponent < ViewComponent::Form::ButtonComponent
4
+ include Concerns::ActsAsFieldWithOptions
5
+ include Coco::CoreComponentsHelper
6
+
7
+ def call
8
+ coco_button(**options) do
9
+ content || value
10
+ end
11
+ end
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,7 @@
1
+ module Coco
2
+ module Fields
3
+ class CheckBoxComponent < ViewComponent::Form::CheckBoxComponent
4
+ include Concerns::ActsAsFieldWithOptions
5
+ end
6
+ end
7
+ end
@@ -0,0 +1,7 @@
1
+ module Coco
2
+ module Fields
3
+ class CollectionCheckBoxesComponent < ViewComponent::Form::CollectionCheckBoxesComponent
4
+ include Concerns::ActsAsFieldWithHtmlOptions
5
+ end
6
+ end
7
+ end
@@ -0,0 +1,7 @@
1
+ module Coco
2
+ module Fields
3
+ class CollectionRadioButtonsComponent < ViewComponent::Form::CollectionRadioButtonsComponent
4
+ include Concerns::ActsAsFieldWithHtmlOptions
5
+ end
6
+ end
7
+ end
@@ -0,0 +1,7 @@
1
+ module Coco
2
+ module Fields
3
+ class CollectionSelectComponent < ViewComponent::Form::CollectionSelectComponent
4
+ include Concerns::ActsAsFieldWithHtmlOptions
5
+ end
6
+ end
7
+ end
@@ -0,0 +1,7 @@
1
+ module Coco
2
+ module Fields
3
+ class ColorFieldComponent < ViewComponent::Form::ColorFieldComponent
4
+ include Concerns::ActsAsFieldWithOptions
5
+ end
6
+ end
7
+ end
@@ -0,0 +1,7 @@
1
+ module Coco
2
+ module Fields
3
+ class DateFieldComponent < ViewComponent::Form::DateFieldComponent
4
+ include Concerns::ActsAsFieldWithOptions
5
+ end
6
+ end
7
+ end
@@ -0,0 +1,7 @@
1
+ module Coco
2
+ module Fields
3
+ class DateSelectComponent < ViewComponent::Form::DateSelectComponent
4
+ include Concerns::ActsAsFieldWithHtmlOptions
5
+ end
6
+ end
7
+ end
@@ -0,0 +1,7 @@
1
+ module Coco
2
+ module Fields
3
+ class DatetimeLocalFieldComponent < ViewComponent::Form::DatetimeLocalFieldComponent
4
+ include Concerns::ActsAsFieldWithOptions
5
+ end
6
+ end
7
+ end
@@ -0,0 +1,7 @@
1
+ module Coco
2
+ module Fields
3
+ class DatetimeSelectComponent < ViewComponent::Form::DatetimeSelectComponent
4
+ include Concerns::ActsAsFieldWithHtmlOptions
5
+ end
6
+ end
7
+ end
@@ -0,0 +1,7 @@
1
+ module Coco
2
+ module Fields
3
+ class EmailFieldComponent < ViewComponent::Form::EmailFieldComponent
4
+ include Concerns::ActsAsFieldWithOptions
5
+ end
6
+ end
7
+ end
@@ -0,0 +1,7 @@
1
+ module Coco
2
+ module Fields
3
+ class ErrorMessageComponent < ViewComponent::Form::ErrorMessageComponent
4
+ include Concerns::ActsAsFieldWithOptions
5
+ end
6
+ end
7
+ end
@@ -0,0 +1,7 @@
1
+ module Coco
2
+ module Fields
3
+ class FileFieldComponent < ViewComponent::Form::FileFieldComponent
4
+ include Concerns::ActsAsFieldWithOptions
5
+ end
6
+ end
7
+ end
@@ -0,0 +1,7 @@
1
+ module Coco
2
+ module Fields
3
+ class GroupedCollectionSelectComponent < ViewComponent::Form::GroupedCollectionSelectComponent
4
+ include Concerns::ActsAsFieldWithHtmlOptions
5
+ end
6
+ end
7
+ end
@@ -0,0 +1,7 @@
1
+ module Coco
2
+ module Fields
3
+ class HintComponent < ViewComponent::Form::HintComponent
4
+ include Concerns::ActsAsFieldWithOptions
5
+ end
6
+ end
7
+ end
@@ -0,0 +1,7 @@
1
+ module Coco
2
+ module Fields
3
+ class LabelComponent < ViewComponent::Form::LabelComponent
4
+ include Concerns::ActsAsFieldWithOptions
5
+ end
6
+ end
7
+ end
@@ -0,0 +1,7 @@
1
+ module Coco
2
+ module Fields
3
+ class MonthFieldComponent < ViewComponent::Form::MonthFieldComponent
4
+ include Concerns::ActsAsFieldWithOptions
5
+ end
6
+ end
7
+ end
@@ -0,0 +1,7 @@
1
+ module Coco
2
+ module Fields
3
+ class NumberFieldComponent < ViewComponent::Form::NumberFieldComponent
4
+ include Concerns::ActsAsFieldWithOptions
5
+ end
6
+ end
7
+ end
@@ -0,0 +1,7 @@
1
+ module Coco
2
+ module Fields
3
+ class PasswordFieldComponent < ViewComponent::Form::PasswordFieldComponent
4
+ include Concerns::ActsAsFieldWithOptions
5
+ end
6
+ end
7
+ end
@@ -0,0 +1,7 @@
1
+ module Coco
2
+ module Fields
3
+ class RadioButtonComponent < ViewComponent::Form::RadioButtonComponent
4
+ include Concerns::ActsAsFieldWithOptions
5
+ end
6
+ end
7
+ end
@@ -0,0 +1,7 @@
1
+ module Coco
2
+ module Fields
3
+ class RangeFieldComponent < ViewComponent::Form::RangeFieldComponent
4
+ include Concerns::ActsAsFieldWithOptions
5
+ end
6
+ end
7
+ end
@@ -0,0 +1,7 @@
1
+ module Coco
2
+ module Fields
3
+ class SearchFieldComponent < ViewComponent::Form::SearchFieldComponent
4
+ include Concerns::ActsAsFieldWithOptions
5
+ end
6
+ end
7
+ end
@@ -0,0 +1,7 @@
1
+ module Coco
2
+ module Fields
3
+ class SelectComponent < ViewComponent::Form::SelectComponent
4
+ include Concerns::ActsAsFieldWithHtmlOptions
5
+ end
6
+ end
7
+ end
@@ -0,0 +1,14 @@
1
+ module Coco
2
+ module Fields
3
+ class SubmitComponent < ViewComponent::Form::SubmitComponent
4
+ include Concerns::ActsAsFieldWithOptions
5
+ include Coco::CoreComponentsHelper
6
+
7
+ def call
8
+ coco_button(**options, type: :submit) do
9
+ content || value
10
+ end
11
+ end
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,7 @@
1
+ module Coco
2
+ module Fields
3
+ class TelephoneFieldComponent < ViewComponent::Form::TelephoneFieldComponent
4
+ include Concerns::ActsAsFieldWithOptions
5
+ end
6
+ end
7
+ end
@@ -0,0 +1,7 @@
1
+ module Coco
2
+ module Fields
3
+ class TextAreaComponent < ViewComponent::Form::TextAreaComponent
4
+ include Concerns::ActsAsFieldWithOptions
5
+ end
6
+ end
7
+ end
@@ -0,0 +1,7 @@
1
+ module Coco
2
+ module Fields
3
+ class TextFieldComponent < ViewComponent::Form::TextFieldComponent
4
+ include Concerns::ActsAsFieldWithOptions
5
+ end
6
+ end
7
+ end
@@ -0,0 +1,7 @@
1
+ module Coco
2
+ module Fields
3
+ class TimeFieldComponent < ViewComponent::Form::TimeFieldComponent
4
+ include Concerns::ActsAsFieldWithOptions
5
+ end
6
+ end
7
+ end
@@ -0,0 +1,7 @@
1
+ module Coco
2
+ module Fields
3
+ class TimeSelectComponent < ViewComponent::Form::TimeSelectComponent
4
+ include Concerns::ActsAsFieldWithHtmlOptions
5
+ end
6
+ end
7
+ end
@@ -0,0 +1,7 @@
1
+ module Coco
2
+ module Fields
3
+ class TimeZoneSelectComponent < ViewComponent::Form::TimeZoneSelectComponent
4
+ include Concerns::ActsAsFieldWithHtmlOptions
5
+ end
6
+ end
7
+ end
@@ -0,0 +1,7 @@
1
+ module Coco
2
+ module Fields
3
+ class UrlFieldComponent < ViewComponent::Form::UrlFieldComponent
4
+ include Concerns::ActsAsFieldWithOptions
5
+ end
6
+ end
7
+ end
@@ -0,0 +1,7 @@
1
+ module Coco
2
+ module Fields
3
+ class WeekFieldComponent < ViewComponent::Form::WeekFieldComponent
4
+ include Concerns::ActsAsFieldWithOptions
5
+ end
6
+ end
7
+ end
@@ -0,0 +1,7 @@
1
+ module Coco
2
+ module Fields
3
+ class WeekdaySelectComponent < ViewComponent::Form::WeekdaySelectComponent
4
+ include Concerns::ActsAsFieldWithHtmlOptions
5
+ end
6
+ end
7
+ end
@@ -1,4 +1,4 @@
1
- import { CocoComponent } from "@assets/js/shared/coco.js";
1
+ import { CocoComponent } from "@assets/js/base/coco.js";
2
2
 
3
3
  export default CocoComponent("icon", () => {
4
4
  return {
@@ -1,4 +1,4 @@
1
- import { CocoComponent } from "@assets/js/shared/coco";
1
+ import { CocoComponent } from "@assets/js/base/coco";
2
2
 
3
3
  export default CocoComponent("imageUploader", ({ click, drop }) => {
4
4
  return {
@@ -1,5 +1,5 @@
1
1
  @layer components {
2
- [data-coco][data-component="app-stamp"] {
2
+ [data-coco][data-component="stamp"] {
3
3
  &:not([data-style="compact"]) {
4
4
  @apply rounded-full relative;
5
5
 
@@ -0,0 +1,25 @@
1
+ module Coco
2
+ class Stamp < Coco::Component
3
+ include Concerns::AcceptsOptions
4
+ include Concerns::AcceptsTheme
5
+
6
+ THEMES = [
7
+ "positive",
8
+ "negative",
9
+ "warning",
10
+ "info"
11
+ ]
12
+
13
+ DEFAULT_THEME = "info"
14
+
15
+ accepts_option :size, from: %i[xs sm md lg], default: :md
16
+ accepts_option :style, from: %i[subtle vivid inverse compact], default: :subtle
17
+ accepts_option :theme, from: THEMES, default: DEFAULT_THEME
18
+
19
+ attr_reader :icon_name
20
+
21
+ def initialize(icon:, **kwargs)
22
+ @icon_name = icon
23
+ end
24
+ end
25
+ end
@@ -5,10 +5,13 @@
5
5
  }
6
6
 
7
7
  .page-controls {
8
- @apply fixed top-1/2 -translate-y-1/2 right-0 flex justify-between;
9
-
8
+ @apply fixed top-1/2 -translate-y-1/2 right-0 flex justify-between pointer-events-none;
10
9
  left: var(--sidebar-nav-width, 0);
11
10
 
11
+ > * {
12
+ @apply pointer-events-auto;
13
+ }
14
+
12
15
  .page-control-next {
13
16
  @apply ml-auto;
14
17
  }
@@ -1,4 +1,4 @@
1
- import { CocoComponent } from "@assets/js/shared/coco";
1
+ import { CocoComponent } from "@assets/js/base/coco";
2
2
 
3
3
  export default CocoComponent("pageLayout", () => {
4
4
  return {};