coveragebook_components 0.14.0 → 0.16.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (94) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/build/coco/app.css +1538 -1603
  3. data/app/assets/build/coco/app.js +24316 -26709
  4. data/app/assets/build/coco/book.css +1237 -1301
  5. data/app/assets/build/coco/book.js +15630 -17590
  6. data/app/assets/build/coco/coco.css +6908 -0
  7. data/app/assets/build/coco/coco.js +16547 -0
  8. data/app/assets/build/coco/tailwind.preset.js +2759 -0
  9. data/app/assets/css/base/config.css +1 -1
  10. data/app/assets/css/base/setup.css +0 -11
  11. data/app/assets/css/base/tippy.css +40 -43
  12. data/app/assets/css/base/utils/text.css +0 -210
  13. data/app/assets/css/coco.css +3 -0
  14. data/app/assets/css/plugins/aspect.js +27 -0
  15. data/app/assets/css/plugins/colors.js +30 -0
  16. data/app/assets/css/plugins/icons.js +17 -0
  17. data/app/assets/css/plugins/layout.js +15 -0
  18. data/app/assets/css/plugins/text.js +183 -0
  19. data/app/assets/js/app.js +9 -28
  20. data/app/assets/js/base/alpine/directives/options.js +1 -1
  21. data/app/assets/js/base/alpine/index.js +0 -4
  22. data/app/assets/js/base/components.js +42 -0
  23. data/app/assets/js/base/polyfills.js +1 -0
  24. data/app/assets/js/book.js +7 -6
  25. data/app/assets/js/coco/coco.js +39 -0
  26. data/app/assets/js/{base/coco.js → coco/component.js} +1 -0
  27. data/app/assets/js/coco.js +7 -0
  28. data/app/assets/js/helpers/dom.js +1 -14
  29. data/app/assets/js/helpers/index.js +7 -0
  30. data/app/assets/js/helpers/lang.js +15 -1
  31. data/app/components/coco/app/application_layout/application_layout.html.erb +3 -1
  32. data/app/components/coco/app/application_layout/application_layout.js +21 -1
  33. data/app/components/coco/app/header/header.js +1 -1
  34. data/app/components/coco/app/nav_drawer/nav_drawer.css +2 -2
  35. data/app/components/coco/app/nav_drawer/nav_drawer.js +1 -1
  36. data/app/components/coco/app/plan_card/plan_card.css +1 -1
  37. data/app/components/coco/app/plan_picker/plan_picker.js +1 -1
  38. data/app/components/coco/app/sidebar_nav/item/item.js +1 -1
  39. data/app/components/coco/app/sidebar_nav/menu/menu.js +1 -1
  40. data/app/components/coco/app/sidebar_nav/navbar/navbar.js +2 -2
  41. data/app/components/coco/app/slide_editor/slide_editor.js +1 -1
  42. data/app/components/coco/buttons/button/button.css +5 -5
  43. data/app/components/coco/buttons/button/button.js +2 -2
  44. data/app/components/coco/buttons/button/button_dropdown.js +1 -1
  45. data/app/components/coco/buttons/button_group/button_group.css +1 -1
  46. data/app/components/coco/buttons/button_group/button_group.js +1 -1
  47. data/app/components/coco/buttons/color_picker_button/color_picker_button.css +1 -1
  48. data/app/components/coco/buttons/color_picker_button/color_picker_button.js +1 -1
  49. data/app/components/coco/buttons/confirm_panel/confirm_panel.js +1 -1
  50. data/app/components/coco/buttons/image_picker_button/image_picker_button.js +1 -1
  51. data/app/components/coco/buttons/layout_picker_button/layout_picker_button.js +1 -1
  52. data/app/components/coco/buttons/menu/menu.css +1 -1
  53. data/app/components/coco/buttons/menu_button/menu_button.js +1 -1
  54. data/app/components/coco/buttons/menu_items/user_profile/user_profile.css +1 -1
  55. data/app/components/coco/buttons/toolbar/toolbar.js +1 -1
  56. data/app/components/coco/images/icon/icon.js +1 -1
  57. data/app/components/coco/images/image_uploader/image_uploader.js +1 -1
  58. data/app/components/coco/indicators/badge/badge.css +1 -1
  59. data/app/components/coco/layout/page/page.js +1 -1
  60. data/app/components/coco/layout/panel/panel.css +1 -1
  61. data/app/components/coco/messaging/alert/alert.js +1 -1
  62. data/app/components/coco/messaging/notice/notice.js +1 -1
  63. data/app/components/coco/messaging/snackbar/snackbar.js +1 -1
  64. data/app/components/coco/messaging/system_banner/system_banner.js +1 -1
  65. data/app/components/coco/messaging/toast/toast.js +1 -1
  66. data/app/components/coco/modals/modal/modal.css +1 -1
  67. data/app/components/coco/modals/modal/modal.js +1 -1
  68. data/app/components/coco/modals/modal_dialog/modal_dialog.css +1 -1
  69. data/app/components/coco/modals/modal_dialog/modal_dialog.js +1 -1
  70. data/app/components/coco/modals/modal_lightbox/modal_lightbox.js +1 -1
  71. data/app/components/coco/pickers/color_picker/color_picker.js +1 -1
  72. data/app/components/coco/pickers/image_picker/image_picker.js +1 -1
  73. data/app/components/coco/utilities/dropdown/dropdown.js +1 -1
  74. data/app/components/coco/utilities/placeholder/placeholder.css +1 -1
  75. data/app/components/coco/utilities/poll_controller/poll_controller.js +1 -1
  76. data/app/components/coco/utilities/seamless_textarea/seamless_textarea.js +1 -1
  77. data/app/helpers/coco/integration_helper.rb +22 -8
  78. data/config/exports.js +0 -0
  79. data/config/tailwind.config.js +12 -0
  80. data/config/{tailwind.config.cjs → tailwind.preset.js} +11 -39
  81. data/config/{tokens.cjs → tokens.js} +39 -26
  82. data/lib/coco.rb +1 -1
  83. data/lib/scripts/{postcss-import-alias-glob.cjs → postcss-import-alias-glob.js} +1 -1
  84. data/lib/tasks/coco_tasks.rake +4 -1
  85. metadata +27 -15
  86. data/app/assets/css/base/utils/colors.css +0 -30
  87. data/app/assets/css/base/utils/icons.css +0 -16
  88. data/app/assets/css/base/utils/layout.css +0 -13
  89. data/app/assets/js/base/setup.js +0 -8
  90. /data/config/{utils.cjs → utils.js} +0 -0
  91. /data/lib/scripts/{esbuild-plugin-build-icons.js → esbuild-plugin-build-icons.mjs} +0 -0
  92. /data/lib/scripts/{esbuild-plugin-clean.js → esbuild-plugin-clean.mjs} +0 -0
  93. /data/lib/scripts/{esbuild-plugin-import-glob.js → esbuild-plugin-import-glob.mjs} +0 -0
  94. /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";
@@ -4,9 +4,6 @@
4
4
  @import "tailwindcss/components";
5
5
  @import "tailwindcss/utilities";
6
6
 
7
- @import "./utils/layout";
8
- @import "./utils/colors";
9
- @import "./utils/icons";
10
7
  @import "./utils/text";
11
8
  @import "./tippy";
12
9
 
@@ -19,14 +16,6 @@
19
16
  @apply font-body scroll-smooth motion-safe:scroll-auto text-content-dark-1;
20
17
  }
21
18
 
22
- html.app-layout,
23
- html.app-layout body {
24
- width: 100vw;
25
- height: 100vh;
26
- height: var(—-app-height);
27
- overflow: hidden;
28
- }
29
-
30
19
  a {
31
20
  @apply text-current underline underline-offset-2;
32
21
  }
@@ -2,63 +2,60 @@
2
2
  @import "tippy.js/dist/svg-arrow";
3
3
  @import "tippy.js/dist/border.css";
4
4
 
5
- /* Tippy */
6
- @layer components {
7
- [data-tippy-root] {
8
- @apply !z-[10010];
5
+ @layer utilities {
6
+ .tippy-dropdown-box {
7
+ @apply bg-background-light-2 text-coco-gray-900 label-sm border border-solid border-gray-blend-100 shadow-xl rounded-lg;
9
8
  }
9
+ }
10
10
 
11
- .tippy-box[data-theme^="coco-"] {
12
- @apply bg-transparent text-gray-900 label-md whitespace-normal;
13
-
14
- .tippy-content {
15
- @apply p-0;
16
- }
11
+ [data-tippy-root] {
12
+ @apply !z-[10010];
13
+ }
17
14
 
18
- /* arrow border */
19
- .tippy-svg-arrow > svg:first-child {
20
- @apply fill-transparent;
21
- }
15
+ .tippy-box[data-theme^="coco-"] {
16
+ @apply bg-transparent text-coco-gray-900 label-md whitespace-normal;
22
17
 
23
- /* arrow background */
24
- .tippy-svg-arrow > svg:last-child {
25
- @apply fill-transparent;
26
- }
18
+ .tippy-content {
19
+ @apply p-0;
27
20
  }
28
21
 
29
- /* Tooltip theme */
30
- .tippy-box[data-theme~="coco-tooltip"] {
31
- @apply bg-background-dark-2 text-white label-sm rounded-lg shadow-xl;
22
+ /* arrow border */
23
+ .tippy-svg-arrow > svg:first-child {
24
+ @apply fill-transparent;
25
+ }
32
26
 
33
- .tippy-content {
34
- @apply px-3 py-2 truncate max-w-[240px];
35
- }
27
+ /* arrow background */
28
+ .tippy-svg-arrow > svg:last-child {
29
+ @apply fill-transparent;
30
+ }
31
+ }
36
32
 
37
- /* arrow background */
38
- .tippy-svg-arrow > svg:first-child {
39
- @apply hidden;
40
- }
33
+ /* Tooltip theme */
34
+ .tippy-box[data-theme~="coco-tooltip"] {
35
+ @apply bg-background-dark-2 text-white label-sm rounded-lg shadow-xl;
41
36
 
42
- .tippy-svg-arrow > svg:last-child {
43
- @apply fill-gray-900;
44
- }
37
+ .tippy-content {
38
+ @apply px-3 py-2 truncate max-w-[240px];
45
39
  }
46
40
 
47
- /*
48
- * Tippy dropdown theme
49
- */
50
- .tippy-box[data-theme~="coco-app-dropdown"],
51
- .tippy-box[data-theme~="coco-menu"] {
52
- @apply tippy-dropdown-box;
41
+ /* arrow background */
42
+ .tippy-svg-arrow > svg:first-child {
43
+ @apply hidden;
53
44
  }
54
45
 
55
- .tippy-box[data-theme~="coco-naked-dropdown"] {
56
- width: min-content;
46
+ .tippy-svg-arrow > svg:last-child {
47
+ @apply fill-coco-gray-900;
57
48
  }
58
49
  }
59
50
 
60
- @layer utilities {
61
- .tippy-dropdown-box {
62
- @apply bg-background-light-2 text-gray-900 label-sm border border-solid border-gray-blend-100 shadow-xl rounded-lg;
63
- }
51
+ /*
52
+ * Tippy dropdown theme
53
+ */
54
+ .tippy-box[data-theme~="coco-app-dropdown"],
55
+ .tippy-box[data-theme~="coco-menu"] {
56
+ @apply tippy-dropdown-box;
57
+ }
58
+
59
+ .tippy-box[data-theme~="coco-naked-dropdown"] {
60
+ width: min-content;
64
61
  }
@@ -1,213 +1,3 @@
1
- /*
2
- * Internal text utilities
3
- * These are *not* exported for use outside of components.
4
- */
5
- @layer utilities {
6
- /* paragraphs */
7
-
8
- .para-lg,
9
- .para-md,
10
- .para-sm,
11
- .para-xs {
12
- @apply font-body;
13
- }
14
-
15
- .para-lg {
16
- @apply text-para-lg;
17
- }
18
-
19
- .para-md {
20
- @apply text-para-md;
21
- }
22
-
23
- .para-sm {
24
- @apply text-para-sm;
25
- }
26
-
27
- .para-xs {
28
- @apply text-para-xs;
29
- }
30
-
31
- /* labels */
32
-
33
- .label-lg,
34
- .label-md,
35
- .label-sm,
36
- .label-xs,
37
- .label-xxs {
38
- @apply font-body font-semibold;
39
- }
40
-
41
- .label-lg {
42
- @apply text-label-lg;
43
- }
44
-
45
- .label-md {
46
- @apply text-label-md;
47
- }
48
-
49
- .label-sm {
50
- @apply text-label-sm;
51
- }
52
-
53
- .label-xs {
54
- @apply text-label-xs;
55
- }
56
-
57
- .label-xxs {
58
- @apply text-label-xxs;
59
- }
60
-
61
- /* standard subheadings */
62
-
63
- .subheading-1,
64
- .subheading-2,
65
- .subheading-3,
66
- .subheading-4 {
67
- @apply font-body font-[500];
68
- }
69
-
70
- .subheading-1 {
71
- @apply text-subheading-1;
72
- }
73
-
74
- .subheading-2 {
75
- @apply text-subheading-2;
76
- }
77
-
78
- .subheading-3 {
79
- @apply text-subheading-3;
80
- }
81
-
82
- .subheading-4 {
83
- @apply text-subheading-4;
84
- }
85
-
86
- /* standard headings */
87
-
88
- .heading-1,
89
- .heading-2,
90
- .heading-3,
91
- .heading-4,
92
- .heading-5,
93
- .heading-6 {
94
- @apply font-body font-bold;
95
- }
96
-
97
- .heading-1 {
98
- @apply text-heading-1;
99
- }
100
-
101
- .heading-2 {
102
- @apply text-heading-2;
103
- }
104
-
105
- .heading-3 {
106
- @apply text-heading-3;
107
- }
108
-
109
- .heading-4 {
110
- @apply text-heading-4;
111
- }
112
-
113
- .heading-5 {
114
- @apply text-heading-5;
115
- }
116
-
117
- .heading-6 {
118
- @apply text-heading-6;
119
- }
120
-
121
- /* display headings */
122
-
123
- .display-1,
124
- .display-2,
125
- .display-3,
126
- .display-4 {
127
- @apply font-display font-bold;
128
- }
129
-
130
- .display-1 {
131
- @apply text-display-1;
132
- }
133
-
134
- .display-2 {
135
- @apply text-display-2;
136
- }
137
-
138
- .display-3 {
139
- @apply text-display-3;
140
- }
141
-
142
- .display-4 {
143
- @apply text-display-4;
144
- }
145
-
146
- /* branded headings */
147
-
148
- .branded-heading-1,
149
- .branded-heading-2,
150
- .branded-heading-3,
151
- .branded-heading-4,
152
- .branded-heading-5,
153
- .branded-heading-6 {
154
- @apply font-branded font-bold;
155
- }
156
-
157
- .branded-heading-1 {
158
- @apply text-heading-1;
159
- }
160
-
161
- .branded-heading-2 {
162
- @apply text-heading-2;
163
- }
164
-
165
- .branded-heading-3 {
166
- @apply text-heading-3;
167
- }
168
-
169
- .branded-heading-4 {
170
- @apply text-heading-4;
171
- }
172
-
173
- .branded-heading-5 {
174
- @apply text-heading-5;
175
- }
176
-
177
- .branded-heading-6 {
178
- @apply text-heading-6;
179
- }
180
-
181
- .coco-branded-heading-6 {
182
- @apply font-branded text-heading-6 font-bold;
183
- }
184
-
185
- /* branded display headings */
186
-
187
- .branded-display-1,
188
- .branded-display-2,
189
- .branded-display-3,
190
- .branded-display-4 {
191
- @apply font-branded font-bold;
192
- }
193
-
194
- .branded-display-1 {
195
- @apply text-display-1;
196
- }
197
-
198
- .branded-display-2 {
199
- @apply text-display-2;
200
- }
201
-
202
- .branded-display-3 {
203
- @apply text-display-3;
204
- }
205
-
206
- .branded-display-4 {
207
- @apply text-display-4;
208
- }
209
- }
210
-
211
1
  /*
212
2
  * Public text utilities
213
3
  * These are exported as utility classes for use outside of components.
@@ -0,0 +1,3 @@
1
+ @import "./base/setup";
2
+
3
+ @import-glob "@components/!(app|book)/**/*.css";
@@ -0,0 +1,27 @@
1
+ const plugin = require("tailwindcss/plugin");
2
+
3
+ // Safari 14-compatible aspect ratio
4
+ module.exports = plugin(function ({ matchUtilities, theme }) {
5
+ matchUtilities(
6
+ {
7
+ aspect: (value) => ({
8
+ "@supports (aspect-ratio: 1 / 1)": {
9
+ aspectRatio: value,
10
+ },
11
+ "@supports not (aspect-ratio: 1 / 1)": {
12
+ "&::before": {
13
+ content: '""',
14
+ float: "left",
15
+ paddingTop: `calc(100% / (${value}))`,
16
+ },
17
+ "&::after": {
18
+ clear: "left",
19
+ content: '""',
20
+ display: "block",
21
+ },
22
+ },
23
+ }),
24
+ },
25
+ { values: theme("aspectRatio") }
26
+ );
27
+ });
@@ -0,0 +1,30 @@
1
+ const plugin = require("tailwindcss/plugin");
2
+
3
+ module.exports = plugin(function ({ addUtilities }) {
4
+ addUtilities({
5
+ ".bg-gray-blend-50": {
6
+ "@apply bg-gray-transparent-50": {},
7
+ "background-blend-mode": "hard-light",
8
+ },
9
+ ".bg-gray-blend-100": {
10
+ "@apply bg-gray-transparent-100": {},
11
+ "background-blend-mode": "hard-light",
12
+ },
13
+ ".bg-gray-blend-200": {
14
+ "@apply bg-gray-transparent-200": {},
15
+ "background-blend-mode": "hard-light",
16
+ },
17
+ ".border-gray-blend-50": {
18
+ "@apply border-gray-transparent-50": {},
19
+ "background-blend-mode": "hard-light",
20
+ },
21
+ ".border-gray-blend-100": {
22
+ "@apply border-gray-transparent-100": {},
23
+ "background-blend-mode": "hard-light",
24
+ },
25
+ ".border-gray-blend-200": {
26
+ "@apply border-gray-transparent-200": {},
27
+ "background-blend-mode": "hard-light",
28
+ },
29
+ });
30
+ });
@@ -0,0 +1,17 @@
1
+ const plugin = require("tailwindcss/plugin");
2
+
3
+ module.exports = plugin(function ({ addUtilities }) {
4
+ addUtilities({
5
+ ".icon": {},
6
+ ".icon-stroke": {
7
+ "@apply fill-none stroke-2 stroke-current text-current": {},
8
+ "stroke-linecap": "round",
9
+ "stroke-linejoin": "round",
10
+ },
11
+ ".icon-fill": {
12
+ "@apply fill-current text-current": {},
13
+ "stroke-linecap": "round",
14
+ "stroke-linejoin": "round",
15
+ },
16
+ });
17
+ });
@@ -0,0 +1,15 @@
1
+ const plugin = require("tailwindcss/plugin");
2
+
3
+ module.exports = plugin(function ({ addUtilities }) {
4
+ addUtilities({
5
+ ".pl-app": {
6
+ "@apply pl-3 sm:pl-6 md:pl-8 lg:pl-10 xl:pl-11": {},
7
+ },
8
+ ".pr-app": {
9
+ "@apply pr-3 sm:pr-6 md:pr-8 lg:pr-10 xl:pr-11": {},
10
+ },
11
+ ".px-app": {
12
+ "@apply pl-app pr-app": {},
13
+ },
14
+ });
15
+ });
@@ -0,0 +1,183 @@
1
+ const plugin = require("tailwindcss/plugin");
2
+
3
+ module.exports = plugin(function ({ addUtilities }) {
4
+ addUtilities({
5
+ ".para-lg, .para-md, .para-sm, .para-xs": {
6
+ "@apply font-body": {},
7
+ },
8
+
9
+ ".para-lg": {
10
+ "@apply text-para-lg": {},
11
+ },
12
+
13
+ ".para-md": {
14
+ "@apply text-para-md": {},
15
+ },
16
+
17
+ ".para-sm": {
18
+ "@apply text-para-sm": {},
19
+ },
20
+
21
+ ".para-xs": {
22
+ "@apply text-para-xs": {},
23
+ },
24
+
25
+ /* labels */
26
+
27
+ ".label-lg, .label-md, .label-sm, .label-xs, .label-xxs": {
28
+ "@apply font-body font-semibold": {},
29
+ },
30
+
31
+ ".label-lg": {
32
+ "@apply text-label-lg": {},
33
+ },
34
+
35
+ ".label-md": {
36
+ "@apply text-label-md": {},
37
+ },
38
+
39
+ ".label-sm": {
40
+ "@apply text-label-sm": {},
41
+ },
42
+
43
+ ".label-xs": {
44
+ "@apply text-label-xs": {},
45
+ },
46
+
47
+ ".label-xxs": {
48
+ "@apply text-label-xxs": {},
49
+ },
50
+
51
+ /* standard subheadings */
52
+
53
+ ".subheading-1, .subheading-2, .subheading-3, .subheading-4": {
54
+ "@apply font-body font-[500]": {},
55
+ },
56
+
57
+ ".subheading-1": {
58
+ "@apply text-subheading-1": {},
59
+ },
60
+
61
+ ".subheading-2": {
62
+ "@apply text-subheading-2": {},
63
+ },
64
+
65
+ ".subheading-3": {
66
+ "@apply text-subheading-3": {},
67
+ },
68
+
69
+ ".subheading-4": {
70
+ "@apply text-subheading-4": {},
71
+ },
72
+
73
+ /* standard headings */
74
+
75
+ ".heading-1, .heading-2, .heading-3, .heading-4, .heading-5, .heading-6": {
76
+ "@apply font-body font-bold": {},
77
+ },
78
+
79
+ ".heading-1": {
80
+ "@apply text-heading-1": {},
81
+ },
82
+
83
+ ".heading-2": {
84
+ "@apply text-heading-2": {},
85
+ },
86
+
87
+ ".heading-3": {
88
+ "@apply text-heading-3": {},
89
+ },
90
+
91
+ ".heading-4": {
92
+ "@apply text-heading-4": {},
93
+ },
94
+
95
+ ".heading-5": {
96
+ "@apply text-heading-5": {},
97
+ },
98
+
99
+ ".heading-6": {
100
+ "@apply text-heading-6": {},
101
+ },
102
+
103
+ /* display headings */
104
+
105
+ ".display-1, .display-2, .display-3, .display-4": {
106
+ "@apply font-display font-bold": {},
107
+ },
108
+
109
+ ".display-1": {
110
+ "@apply text-display-1": {},
111
+ },
112
+
113
+ ".display-2": {
114
+ "@apply text-display-2": {},
115
+ },
116
+
117
+ ".display-3": {
118
+ "@apply text-display-3": {},
119
+ },
120
+
121
+ ".display-4": {
122
+ "@apply text-display-4": {},
123
+ },
124
+
125
+ /* branded headings */
126
+
127
+ ".branded-heading-1, .branded-heading-2, .branded-heading-3, .branded-heading-4, .branded-heading-5, .branded-heading-6":
128
+ {
129
+ "@apply font-branded font-bold": {},
130
+ },
131
+
132
+ ".branded-heading-1": {
133
+ "@apply text-heading-1": {},
134
+ },
135
+
136
+ ".branded-heading-2": {
137
+ "@apply text-heading-2": {},
138
+ },
139
+
140
+ ".branded-heading-3": {
141
+ "@apply text-heading-3": {},
142
+ },
143
+
144
+ ".branded-heading-4": {
145
+ "@apply text-heading-4": {},
146
+ },
147
+
148
+ ".branded-heading-5": {
149
+ "@apply text-heading-5": {},
150
+ },
151
+
152
+ ".branded-heading-6": {
153
+ "@apply text-heading-6": {},
154
+ },
155
+
156
+ ".coco-branded-heading-6": {
157
+ "@apply font-branded text-heading-6 font-bold": {},
158
+ },
159
+
160
+ /* branded display headings */
161
+
162
+ ".branded-display-1, .branded-display-2, .branded-display-3, .branded-display-4":
163
+ {
164
+ "@apply font-branded font-bold": {},
165
+ },
166
+
167
+ ".branded-display-1": {
168
+ "@apply text-display-1": {},
169
+ },
170
+
171
+ ".branded-display-2": {
172
+ "@apply text-display-2": {},
173
+ },
174
+
175
+ ".branded-display-3": {
176
+ "@apply text-display-3": {},
177
+ },
178
+
179
+ ".branded-display-4": {
180
+ "@apply text-display-4": {},
181
+ },
182
+ });
183
+ });
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