coveragebook_components 0.14.0 → 0.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/build/coco/app.css +28 -1
  3. data/app/assets/build/coco/app.js +24299 -26700
  4. data/app/assets/build/coco/book.css +28 -1
  5. data/app/assets/build/coco/book.js +15626 -17590
  6. data/app/assets/build/coco/coco.js +16543 -0
  7. data/app/assets/css/base/config.css +1 -1
  8. data/app/assets/js/app.js +9 -28
  9. data/app/assets/js/base/alpine/directives/options.js +1 -1
  10. data/app/assets/js/base/alpine/index.js +0 -4
  11. data/app/assets/js/base/components.js +42 -0
  12. data/app/assets/js/base/polyfills.js +1 -0
  13. data/app/assets/js/book.js +7 -6
  14. data/app/assets/js/coco/coco.js +39 -0
  15. data/app/assets/js/{base/coco.js → coco/component.js} +1 -0
  16. data/app/assets/js/coco.js +7 -0
  17. data/app/assets/js/helpers/dom.js +1 -14
  18. data/app/assets/js/helpers/index.js +7 -0
  19. data/app/assets/js/helpers/lang.js +15 -1
  20. data/app/components/coco/app/application_layout/application_layout.html.erb +3 -1
  21. data/app/components/coco/app/application_layout/application_layout.js +21 -1
  22. data/app/components/coco/app/header/header.js +1 -1
  23. data/app/components/coco/app/nav_drawer/nav_drawer.js +1 -1
  24. data/app/components/coco/app/plan_picker/plan_picker.js +1 -1
  25. data/app/components/coco/app/sidebar_nav/item/item.js +1 -1
  26. data/app/components/coco/app/sidebar_nav/menu/menu.js +1 -1
  27. data/app/components/coco/app/sidebar_nav/navbar/navbar.js +2 -2
  28. data/app/components/coco/app/slide_editor/slide_editor.js +1 -1
  29. data/app/components/coco/buttons/button/button.js +2 -2
  30. data/app/components/coco/buttons/button/button_dropdown.js +1 -1
  31. data/app/components/coco/buttons/button_group/button_group.js +1 -1
  32. data/app/components/coco/buttons/color_picker_button/color_picker_button.js +1 -1
  33. data/app/components/coco/buttons/confirm_panel/confirm_panel.js +1 -1
  34. data/app/components/coco/buttons/image_picker_button/image_picker_button.js +1 -1
  35. data/app/components/coco/buttons/layout_picker_button/layout_picker_button.js +1 -1
  36. data/app/components/coco/buttons/menu_button/menu_button.js +1 -1
  37. data/app/components/coco/buttons/toolbar/toolbar.js +1 -1
  38. data/app/components/coco/images/icon/icon.js +1 -1
  39. data/app/components/coco/images/image_uploader/image_uploader.js +1 -1
  40. data/app/components/coco/layout/page/page.js +1 -1
  41. data/app/components/coco/messaging/alert/alert.js +1 -1
  42. data/app/components/coco/messaging/notice/notice.js +1 -1
  43. data/app/components/coco/messaging/snackbar/snackbar.js +1 -1
  44. data/app/components/coco/messaging/system_banner/system_banner.js +1 -1
  45. data/app/components/coco/messaging/toast/toast.js +1 -1
  46. data/app/components/coco/modals/modal/modal.js +1 -1
  47. data/app/components/coco/modals/modal_dialog/modal_dialog.js +1 -1
  48. data/app/components/coco/modals/modal_lightbox/modal_lightbox.js +1 -1
  49. data/app/components/coco/pickers/color_picker/color_picker.js +1 -1
  50. data/app/components/coco/pickers/image_picker/image_picker.js +1 -1
  51. data/app/components/coco/utilities/dropdown/dropdown.js +1 -1
  52. data/app/components/coco/utilities/poll_controller/poll_controller.js +1 -1
  53. data/app/components/coco/utilities/seamless_textarea/seamless_textarea.js +1 -1
  54. data/app/helpers/coco/integration_helper.rb +2 -10
  55. data/config/{tailwind.config.cjs → tailwind.config.js} +2 -2
  56. data/config/{tokens.cjs → tokens.js} +14 -5
  57. data/lib/coco.rb +1 -1
  58. data/lib/scripts/{postcss-import-alias-glob.cjs → postcss-import-alias-glob.js} +1 -1
  59. data/lib/tasks/coco_tasks.rake +4 -1
  60. metadata +17 -12
  61. data/app/assets/js/base/setup.js +0 -8
  62. /data/config/{utils.cjs → utils.js} +0 -0
  63. /data/lib/scripts/{esbuild-plugin-build-icons.js → esbuild-plugin-build-icons.mjs} +0 -0
  64. /data/lib/scripts/{esbuild-plugin-clean.js → esbuild-plugin-clean.mjs} +0 -0
  65. /data/lib/scripts/{esbuild-plugin-import-glob.js → esbuild-plugin-import-glob.mjs} +0 -0
  66. /data/lib/scripts/{map-aliased-path.js → map-aliased-path.mjs} +0 -0
@@ -1 +1 @@
1
- @config "../../../../config/tailwind.config.cjs";
1
+ @config "../../../../config/tailwind.config.js";
data/app/assets/js/app.js CHANGED
@@ -1,30 +1,11 @@
1
- import { registerComponents } from "@helpers/alpine";
2
- import { navigateTo } from "@helpers/location";
3
- import { Alpine } from "./base/setup";
1
+ import "./base/polyfills";
2
+ import Coco from "./coco/coco";
3
+ import baseComponents from "./base/components";
4
+ import bookComponents from "@bookComponents/**/*.js";
5
+ import appComponents from "@appComponents/**/*.js";
4
6
 
5
- import components from "@components/**/*.js";
6
- registerComponents(components);
7
+ Coco.registerComponents(baseComponents);
8
+ Coco.registerComponents(bookComponents);
9
+ Coco.registerComponents(appComponents);
7
10
 
8
- // Global JS navigation handler.
9
- // Optionally uses Turbo for the page navigation.
10
- window.addEventListener("app:navigate", (event) => {
11
- const url = event.detail.url;
12
- if (url) {
13
- delete event.detail.url;
14
- navigateTo(url, event.detail);
15
- }
16
- });
17
-
18
- // Uodate the value of the `--app-height` css variable
19
- // when the viewport size changes. To help work around the
20
- // issues when using 100vh on mobile safari (https://medium.com/quick-code/100vh-problem-with-ios-safari-92ab23c852a8)
21
- function setAppHeightProperty() {
22
- document.documentElement.style.setProperty(
23
- "--app-height",
24
- `${window.innerHeight}px`
25
- );
26
- }
27
- window.addEventListener("resize", setAppHeightProperty);
28
- setAppHeightProperty();
29
-
30
- Alpine.start();
11
+ export default Coco;
@@ -1,4 +1,4 @@
1
- import { kebabCase, camelCase, mapValues, keyBy } from "lodash";
1
+ import { kebabCase, camelCase, mapValues, keyBy } from "@helpers/lang";
2
2
  import { castAttributeValue } from "@helpers/dom";
3
3
  import { setData } from "@helpers/alpine";
4
4
 
@@ -1,8 +1,6 @@
1
1
  import Alpine from "alpinejs";
2
2
 
3
3
  import morph from "@alpinejs/morph";
4
- import collapse from "@alpinejs/collapse";
5
- import intersect from "@alpinejs/intersect";
6
4
  import mask from "@alpinejs/mask";
7
5
  import focus from "@alpinejs/focus";
8
6
 
@@ -21,8 +19,6 @@ window.Alpine = Alpine;
21
19
  Alpine.plugin(mask);
22
20
  Alpine.plugin(focus);
23
21
  Alpine.plugin(morph);
24
- Alpine.plugin(collapse);
25
- Alpine.plugin(intersect);
26
22
 
27
23
  // Coco directives
28
24
 
@@ -0,0 +1,42 @@
1
+ import buttons from "@components/buttons/**/*.js";
2
+ import embeds from "@components/embeds/**/*.js";
3
+ import fields from "@components/fields/**/*.js";
4
+ import images from "@components/images/**/*.js";
5
+ import indicators from "@components/indicators/**/*.js";
6
+ import layout from "@components/layout/**/*.js";
7
+ import messaging from "@components/messaging/**/*.js";
8
+ import modals from "@components/modals/**/*.js";
9
+ import navigation from "@components/navigation/**/*.js";
10
+ import pickers from "@components/pickers/**/*.js";
11
+ import typography from "@components/typography/**/*.js";
12
+ import utilities from "@components/utilities/**/*.js";
13
+
14
+ export {
15
+ buttons,
16
+ embeds,
17
+ fields,
18
+ images,
19
+ indicators,
20
+ layout,
21
+ messaging,
22
+ modals,
23
+ navigation,
24
+ pickers,
25
+ typography,
26
+ utilities,
27
+ };
28
+
29
+ export default [
30
+ ...buttons,
31
+ ...embeds,
32
+ ...fields,
33
+ ...images,
34
+ ...indicators,
35
+ ...layout,
36
+ ...messaging,
37
+ ...modals,
38
+ ...navigation,
39
+ ...pickers,
40
+ ...typography,
41
+ ...utilities,
42
+ ];
@@ -0,0 +1 @@
1
+ import "container-query-polyfill";
@@ -1,8 +1,9 @@
1
- import { registerComponents } from "@helpers/alpine";
2
- import { Alpine } from "./base/setup";
1
+ import "./base/polyfills";
2
+ import Coco from "./coco/coco";
3
+ import baseComponents from "./base/components";
4
+ import bookComponents from "@bookComponents/**/*.js";
3
5
 
4
- import components from "@components/!(app)/**/*.js";
6
+ Coco.registerComponents(baseComponents);
7
+ Coco.registerComponents(bookComponents);
5
8
 
6
- registerComponents(components);
7
-
8
- Alpine.start();
9
+ export default Coco;
@@ -0,0 +1,39 @@
1
+ import Alpine from "../base/alpine";
2
+ import packageJSON from "@/package.json" assert { type: "json" };
3
+ import { registerComponents } from "@helpers/alpine.js";
4
+ import CocoComponent from "./component";
5
+ import * as helpers from "@helpers/index";
6
+
7
+ const Coco = {
8
+ version: packageJSON.version,
9
+
10
+ start() {
11
+ if (this._started) {
12
+ throw new Error("Coco has already been started!");
13
+ }
14
+
15
+ console.info("Initializing Coco JS", packageJSON.version);
16
+
17
+ registerComponents(this._components);
18
+
19
+ window.Alpine = Alpine;
20
+ Alpine.start();
21
+ },
22
+
23
+ registerComponents(components) {
24
+ this._components.push(...components);
25
+ },
26
+
27
+ component(...args) {
28
+ return CocoComponent(...args);
29
+ },
30
+
31
+ _components: [],
32
+
33
+ _started: false,
34
+ };
35
+
36
+ Coco.Component = CocoComponent;
37
+ Coco.helpers = helpers;
38
+
39
+ export default Coco;
@@ -22,4 +22,5 @@ function CocoComponent(name, fn) {
22
22
  return func;
23
23
  }
24
24
 
25
+ export default CocoComponent;
25
26
  export { CocoComponent };
@@ -0,0 +1,7 @@
1
+ import "./base/polyfills";
2
+ import Coco from "./coco/coco";
3
+ import components from "./base/components";
4
+
5
+ Coco.registerComponents(components);
6
+
7
+ export default Coco;
@@ -1,18 +1,5 @@
1
1
  import { isNumeric } from "@helpers/lang";
2
2
 
3
- function getHiddenElementDimensions(el, display = "block") {
4
- let size;
5
- if (el.style.display === "none") {
6
- el.style.display = display;
7
- size = el.getBoundingClientRect();
8
- el.style.display = "none";
9
- } else {
10
- size = el.getBoundingClientRect();
11
- }
12
-
13
- return size;
14
- }
15
-
16
3
  function castAttributeValue(value) {
17
4
  if (value === "false") {
18
5
  return false;
@@ -38,4 +25,4 @@ function isNode(o) {
38
25
  typeof o.nodeName === "string";
39
26
  }
40
27
 
41
- export { getHiddenElementDimensions, castAttributeValue, isNode };
28
+ export { castAttributeValue, isNode };
@@ -0,0 +1,7 @@
1
+ import * as color from "./color";
2
+ import * as dom from "./dom";
3
+ import * as lang from "./lang";
4
+ import * as location from "./location";
5
+ import * as turboEvents from "./turbo_events";
6
+
7
+ export { color, dom, lang, location, turboEvents };
@@ -1,3 +1,8 @@
1
+ import camelCase from "lodash.camelcase";
2
+ import kebabCase from "lodash.kebabcase";
3
+ import mapValues from "lodash.mapvalues";
4
+ import keyBy from "lodash.keyby";
5
+
1
6
  function nameFunction(name, body) {
2
7
  return {
3
8
  [name](...args) {
@@ -43,4 +48,13 @@ function roughSizeOfObject(object) {
43
48
  return bytes;
44
49
  }
45
50
 
46
- export { nameFunction, isObject, isNumeric, roughSizeOfObject };
51
+ export {
52
+ nameFunction,
53
+ isObject,
54
+ isNumeric,
55
+ roughSizeOfObject,
56
+ camelCase,
57
+ kebabCase,
58
+ keyBy,
59
+ mapValues,
60
+ };
@@ -1,7 +1,9 @@
1
1
  <%= render component_tag(
2
2
  x: {
3
3
  data: x_data("appLayout", banner: banner? && banner_content?),
4
- ":class": "{'with-banner': banner}"
4
+ ":class": "{'with-banner': banner}",
5
+ "@app:navigate.window": "handleNavigation",
6
+ "@resize.window": "setAppHeight"
5
7
  },
6
8
  class: {
7
9
  "with-sidebar-nav": sidebar_nav?,
@@ -1,4 +1,5 @@
1
- import { CocoComponent } from "@assets/js/base/coco";
1
+ import { CocoComponent } from "@assets/js/coco/component";
2
+ import { navigateTo } from "@helpers/location";
2
3
 
3
4
  export default CocoComponent("appLayout", (opts) => {
4
5
  return {
@@ -6,6 +7,25 @@ export default CocoComponent("appLayout", (opts) => {
6
7
 
7
8
  init() {
8
9
  this.banner = opts.banner;
10
+ this.setAppHeight();
11
+ },
12
+
13
+ handleNavigation(event) {
14
+ const url = event.detail.url;
15
+ if (url) {
16
+ delete event.detail.url;
17
+ navigateTo(url, event.detail);
18
+ }
19
+ },
20
+
21
+ // Update the value of the `--app-height` css variable
22
+ // when the viewport size changes. To help work around the
23
+ // issues when using 100vh on mobile safari (https://medium.com/quick-code/100vh-problem-with-ios-safari-92ab23c852a8)
24
+ setAppHeight() {
25
+ document.documentElement.style.setProperty(
26
+ "--app-height",
27
+ `${window.innerHeight}px`
28
+ );
9
29
  },
10
30
 
11
31
  hideBanner() {
@@ -1,4 +1,4 @@
1
- import { CocoComponent } from "@assets/js/base/coco";
1
+ import { CocoComponent } from "@assets/js/coco/component";
2
2
 
3
3
  export default CocoComponent("appHeader", () => {
4
4
  return {
@@ -1,4 +1,4 @@
1
- import { CocoComponent } from "@assets/js/base/coco";
1
+ import { CocoComponent } from "@assets/js/coco/component";
2
2
 
3
3
  export default CocoComponent("appNavDrawer", () => {
4
4
  return {
@@ -1,4 +1,4 @@
1
- import { CocoComponent } from "@assets/js/base/coco";
1
+ import { CocoComponent } from "@assets/js/coco/component";
2
2
 
3
3
  export default CocoComponent("appPlanPicker", () => {
4
4
  return {
@@ -1,5 +1,5 @@
1
1
  import tippy from "@assets/js/base/tippy";
2
- import { CocoComponent } from "@assets/js/base/coco";
2
+ import { CocoComponent } from "@assets/js/coco/component";
3
3
 
4
4
  export default CocoComponent("appSidebarNavItem", () => {
5
5
  return {
@@ -1,4 +1,4 @@
1
- import { CocoComponent } from "@assets/js/base/coco";
1
+ import { CocoComponent } from "@assets/js/coco/component";
2
2
  import { navigateTo } from "@helpers/location";
3
3
 
4
4
  export default CocoComponent("appSidebarNavMenu", () => {
@@ -1,5 +1,5 @@
1
- import tokens from "@config/tokens.cjs";
2
- import { CocoComponent } from "@assets/js/base/coco";
1
+ import tokens from "@config/tokens.js";
2
+ import { CocoComponent } from "@assets/js/coco/component";
3
3
 
4
4
  const mobileMaxWidth = parseInt(tokens.screens.sm, 10);
5
5
 
@@ -1,4 +1,4 @@
1
- import { CocoComponent } from "@assets/js/base/coco";
1
+ import { CocoComponent } from "@assets/js/coco/component";
2
2
  import { getData } from "@helpers/alpine";
3
3
  import { captureElementScreenshot } from "@helpers/screenshot";
4
4
  import { isDark } from "@helpers/color";
@@ -1,5 +1,5 @@
1
- import { CocoComponent } from "@assets/js/base/coco.js";
2
- import { camelCase } from "lodash";
1
+ import { CocoComponent } from "@assets/js/coco/component.js";
2
+ import { camelCase } from "@helpers/lang";
3
3
 
4
4
  export default CocoComponent("button", (data = {}) => {
5
5
  return {
@@ -1,4 +1,4 @@
1
- import { CocoComponent } from "@assets/js/base/coco.js";
1
+ import { CocoComponent } from "@assets/js/coco/component.js";
2
2
  import { getComponent } from "@helpers/alpine";
3
3
 
4
4
  export default CocoComponent("buttonDropdown", () => {
@@ -1,4 +1,4 @@
1
- import { CocoComponent } from "@assets/js/base/coco.js";
1
+ import { CocoComponent } from "@assets/js/coco/component.js";
2
2
  import { getComponent } from "@helpers/alpine";
3
3
  import { createSingleton } from "@assets/js/base/tippy";
4
4
 
@@ -1,4 +1,4 @@
1
- import { CocoComponent } from "@assets/js/base/coco";
1
+ import { CocoComponent } from "@assets/js/coco/component";
2
2
  import { getData } from "@helpers/alpine";
3
3
 
4
4
  export default CocoComponent("colorPickerButton", ({ selected }) => {
@@ -1,4 +1,4 @@
1
- import { CocoComponent } from "@assets/js/base/coco.js";
1
+ import { CocoComponent } from "@assets/js/coco/component.js";
2
2
 
3
3
  export default CocoComponent("confirmPanel", () => {
4
4
  return {
@@ -1,4 +1,4 @@
1
- import { CocoComponent } from "@assets/js/base/coco";
1
+ import { CocoComponent } from "@assets/js/coco/component";
2
2
  import { getData } from "@helpers/alpine";
3
3
  import { basename } from "@helpers/path";
4
4
 
@@ -1,4 +1,4 @@
1
- import { CocoComponent } from "@assets/js/base/coco";
1
+ import { CocoComponent } from "@assets/js/coco/component";
2
2
  import { getData } from "@helpers/alpine";
3
3
 
4
4
  export default CocoComponent("layoutPickerButton", ({ selected }) => {
@@ -1,4 +1,4 @@
1
- import { CocoComponent } from "@assets/js/base/coco";
1
+ import { CocoComponent } from "@assets/js/coco/component";
2
2
  import { getComponent } from "@helpers/alpine";
3
3
 
4
4
  export default CocoComponent("menuButton", () => {
@@ -1,4 +1,4 @@
1
- import { CocoComponent } from "@assets/js/base/coco";
1
+ import { CocoComponent } from "@assets/js/coco/component";
2
2
  import { getComponent } from "@helpers/alpine";
3
3
 
4
4
  export default CocoComponent("appToolbar", () => {
@@ -1,4 +1,4 @@
1
- import { CocoComponent } from "@assets/js/base/coco.js";
1
+ import { CocoComponent } from "@assets/js/coco/component.js";
2
2
 
3
3
  export default CocoComponent("icon", () => {
4
4
  return {
@@ -1,4 +1,4 @@
1
- import { CocoComponent } from "@assets/js/base/coco";
1
+ import { CocoComponent } from "@assets/js/coco/component";
2
2
 
3
3
  export default CocoComponent("imageUploader", ({ click, drop }) => {
4
4
  return {
@@ -1,4 +1,4 @@
1
- import { CocoComponent } from "@assets/js/base/coco";
1
+ import { CocoComponent } from "@assets/js/coco/component";
2
2
 
3
3
  export default CocoComponent("pageLayout", () => {
4
4
  return {};
@@ -1,4 +1,4 @@
1
- import { CocoComponent } from "@assets/js/base/coco";
1
+ import { CocoComponent } from "@assets/js/coco/component";
2
2
 
3
3
  export default CocoComponent("alertMessage", () => {
4
4
  return {
@@ -1,4 +1,4 @@
1
- import { CocoComponent } from "@assets/js/base/coco";
1
+ import { CocoComponent } from "@assets/js/coco/component";
2
2
 
3
3
  export default CocoComponent("notice", () => {
4
4
  return {};
@@ -1,4 +1,4 @@
1
- import { CocoComponent } from "@assets/js/base/coco";
1
+ import { CocoComponent } from "@assets/js/coco/component";
2
2
 
3
3
  export default CocoComponent("snackbar", () => {
4
4
  return {
@@ -1,4 +1,4 @@
1
- import { CocoComponent } from "@assets/js/base/coco";
1
+ import { CocoComponent } from "@assets/js/coco/component";
2
2
  import Cookies from "js-cookie";
3
3
 
4
4
  export default CocoComponent("systemBanner", (opts = {}) => {
@@ -1,4 +1,4 @@
1
- import { CocoComponent } from "@assets/js/base/coco";
1
+ import { CocoComponent } from "@assets/js/coco/component";
2
2
 
3
3
  export default CocoComponent("toast", () => {
4
4
  return {
@@ -1,4 +1,4 @@
1
- import { CocoComponent } from "@assets/js/base/coco";
1
+ import { CocoComponent } from "@assets/js/coco/component";
2
2
  import { hideAll } from "@assets/js/base/tippy";
3
3
  import { navigateTo } from "@helpers/location";
4
4
 
@@ -1,4 +1,4 @@
1
- import { CocoComponent } from "@assets/js/base/coco";
1
+ import { CocoComponent } from "@assets/js/coco/component";
2
2
 
3
3
  export default CocoComponent("modalDialog", () => {
4
4
  return {
@@ -1,4 +1,4 @@
1
- import { CocoComponent } from "@assets/js/base/coco";
1
+ import { CocoComponent } from "@assets/js/coco/component";
2
2
 
3
3
  export default CocoComponent("modalLightbox", () => {
4
4
  return {
@@ -1,5 +1,5 @@
1
1
  import iro from "@jaames/iro";
2
- import { CocoComponent } from "@assets/js/base/coco";
2
+ import { CocoComponent } from "@assets/js/coco/component";
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 "@assets/js/base/coco";
1
+ import { CocoComponent } from "@assets/js/coco/component";
2
2
  import { getComponent } from "@helpers/alpine";
3
3
  import { basename } from "@helpers/path";
4
4
 
@@ -1,4 +1,4 @@
1
- import { CocoComponent } from "@assets/js/base/coco";
1
+ import { CocoComponent } from "@assets/js/coco/component";
2
2
 
3
3
  export default CocoComponent("dropdown", () => {
4
4
  return {};
@@ -1,4 +1,4 @@
1
- import { CocoComponent } from "@assets/js/base/coco";
1
+ import { CocoComponent } from "@assets/js/coco/component";
2
2
 
3
3
  export default CocoComponent("pollController", () => {
4
4
  return {
@@ -1,4 +1,4 @@
1
- import { CocoComponent } from "@assets/js/base/coco";
1
+ import { CocoComponent } from "@assets/js/coco/component";
2
2
 
3
3
  export default CocoComponent("seamlessTextarea", () => {
4
4
  return {
@@ -1,19 +1,11 @@
1
1
  module Coco
2
2
  module IntegrationHelper
3
- def coco_javascript_tag(context, dev: ENV["COCO_PATH"], **)
4
- javascript_include_tag("coco/#{context}#{".dev" if dev}", **)
5
- end
6
-
7
- def coco_javascript_file_path(context, dev: ENV["COCO_PATH"])
8
- File.join(Coco::Engine.root, "app/assets/build/coco/#{context}#{".dev" if dev}.js")
9
- end
10
-
11
3
  def coco_stylesheet_tag(context, dev: ENV["COCO_PATH"], **)
12
- stylesheet_link_tag("coco/#{context}#{".dev" if dev}", **)
4
+ stylesheet_link_tag("coco#{"/dev" if dev}/#{context}", **)
13
5
  end
14
6
 
15
7
  def coco_stylesheet_file_path(context, dev: ENV["COCO_PATH"], **opts)
16
- File.join(Coco::Engine.root, "app/assets/build/coco/#{context}#{".dev" if dev}.css")
8
+ File.join(Coco::Engine.root, "app/assets/build/coco#{"/dev" if dev}/#{context}.css")
17
9
  end
18
10
  end
19
11
  end
@@ -1,8 +1,8 @@
1
1
  /** @type {import('tailwindcss').Config} */
2
2
 
3
3
  const defaultTheme = require("tailwindcss/defaultTheme");
4
- const { cocoPath } = require("./utils.cjs");
5
- const { fontSize, fontFamily, colors, screens } = require("./tokens.cjs");
4
+ const { cocoPath } = require("./utils.js");
5
+ const { fontSize, fontFamily, colors, screens } = require("./tokens.js");
6
6
 
7
7
  module.exports = {
8
8
  content: [
@@ -1,10 +1,8 @@
1
- const tailwindColors = require("tailwindcss/colors");
2
-
3
1
  const colors = {
4
2
  transparent: "transparent",
5
3
  current: "currentColor",
6
- black: tailwindColors.black,
7
- white: tailwindColors.white,
4
+ black: "#000000",
5
+ white: "#FFFFFF",
8
6
  gray: {
9
7
  50: "#F9FAFB",
10
8
  100: "#F3F4F6",
@@ -70,7 +68,18 @@ const colors = {
70
68
  800: "#075985",
71
69
  900: "#0C4A6E",
72
70
  },
73
- teal: tailwindColors.teal,
71
+ teal: {
72
+ 50: "#F0FDFA",
73
+ 100: "#CCFBF1",
74
+ 200: "#99F6E4",
75
+ 300: "#5EEAD4",
76
+ 400: "#2DD4BF",
77
+ 500: "#14B8A6",
78
+ 600: "#0D9488",
79
+ 700: "#0F766E",
80
+ 800: "#115E59",
81
+ 900: "#134E4A",
82
+ },
74
83
  };
75
84
 
76
85
  const colorAliases = {
data/lib/coco.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Coco
2
- VERSION = "0.14.0"
2
+ VERSION = "0.15.0"
3
3
  end
@@ -3,7 +3,7 @@ const valueParser = require("postcss-value-parser");
3
3
  const path = require("path");
4
4
  const fg = require("fast-glob");
5
5
  const { sort } = require("fast-sort");
6
- const { cocoPath } = require("../../config/utils.cjs");
6
+ const { cocoPath } = require("../../config/utils.js");
7
7
 
8
8
  const SORTERS = ["asc", "desc"];
9
9
  const DEFAULT_SORTER = "asc";