coveragebook_components 0.15.0 → 0.16.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (39) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/build/coco/app.css +1513 -1605
  3. data/app/assets/build/coco/app.js +35 -27
  4. data/app/assets/build/coco/book.css +1212 -1303
  5. data/app/assets/build/coco/book.js +10 -6
  6. data/app/assets/build/coco/coco.css +6908 -0
  7. data/app/assets/build/coco/coco.js +10 -6
  8. data/app/assets/build/coco/tailwind.preset.js +2759 -0
  9. data/app/assets/css/base/setup.css +0 -11
  10. data/app/assets/css/base/tippy.css +40 -43
  11. data/app/assets/css/base/utils/text.css +0 -210
  12. data/app/assets/css/coco.css +3 -0
  13. data/app/assets/css/plugins/aspect.js +27 -0
  14. data/app/assets/css/plugins/colors.js +30 -0
  15. data/app/assets/css/plugins/icons.js +17 -0
  16. data/app/assets/css/plugins/layout.js +15 -0
  17. data/app/assets/css/plugins/text.js +183 -0
  18. data/app/components/coco/app/nav_drawer/nav_drawer.css +2 -2
  19. data/app/components/coco/app/plan_card/plan_card.css +1 -1
  20. data/app/components/coco/buttons/button/button.css +5 -5
  21. data/app/components/coco/buttons/button_group/button_group.css +1 -1
  22. data/app/components/coco/buttons/color_picker_button/color_picker_button.css +1 -1
  23. data/app/components/coco/buttons/menu/menu.css +1 -1
  24. data/app/components/coco/buttons/menu_items/user_profile/user_profile.css +1 -1
  25. data/app/components/coco/indicators/badge/badge.css +1 -1
  26. data/app/components/coco/layout/panel/panel.css +1 -1
  27. data/app/components/coco/modals/modal/modal.css +1 -1
  28. data/app/components/coco/modals/modal_dialog/modal_dialog.css +1 -1
  29. data/app/components/coco/utilities/placeholder/placeholder.css +1 -1
  30. data/app/helpers/coco/integration_helper.rb +25 -3
  31. data/config/exports.js +0 -0
  32. data/config/tailwind.config.js +1 -83
  33. data/config/tailwind.preset.js +66 -0
  34. data/config/tokens.js +25 -21
  35. data/lib/coco.rb +1 -1
  36. metadata +12 -5
  37. data/app/assets/css/base/utils/colors.css +0 -30
  38. data/app/assets/css/base/utils/icons.css +0 -16
  39. data/app/assets/css/base/utils/layout.css +0 -13
@@ -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
+ });
@@ -31,11 +31,11 @@
31
31
  }
32
32
 
33
33
  .nav-drawer-heading {
34
- @apply mt-4 mb-2 mx-4 border-b text-content-dark-1/50 border-gray-300 pb-3;
34
+ @apply mt-4 mb-2 mx-4 border-b text-content-dark-1/50 border-coco-gray-300 pb-3;
35
35
  }
36
36
 
37
37
  .nav-drawer-divider {
38
- @apply h-0 border-t border-gray-300 my-3;
38
+ @apply h-0 border-t border-coco-gray-300 my-3;
39
39
  }
40
40
 
41
41
  [data-component="notice"] {
@@ -36,7 +36,7 @@
36
36
  }
37
37
 
38
38
  .plan-benefits {
39
- @apply space-y-4 py-5 border-t border-gray-300;
39
+ @apply space-y-4 py-5 border-t border-coco-gray-300;
40
40
  }
41
41
 
42
42
  .plan-benefit {
@@ -154,10 +154,10 @@
154
154
  }
155
155
 
156
156
  &[data-theme="toolbar-floating"] {
157
- @apply bg-white hover:bg-gray-100 active:bg-gray-200 border-gray-300;
157
+ @apply bg-white hover:bg-coco-gray-100 active:bg-coco-gray-200 border-coco-gray-300;
158
158
 
159
159
  &[data-state="active"] {
160
- @apply bg-gray-200;
160
+ @apply bg-coco-gray-200;
161
161
  }
162
162
  }
163
163
 
@@ -303,18 +303,18 @@
303
303
  }
304
304
 
305
305
  &[data-theme="neutral-dark"] {
306
- @apply bg-background-dark-1 text-content-light-1 hover:bg-gray-700 active:bg-gray-600 antialiased;
306
+ @apply bg-background-dark-1 text-content-light-1 hover:bg-coco-gray-700 active:bg-coco-gray-600 antialiased;
307
307
 
308
308
  &[data-state="loading"] {
309
309
  @apply bg-background-dark-1;
310
310
  }
311
311
 
312
312
  &[data-state="active"] {
313
- @apply bg-gray-600;
313
+ @apply bg-coco-gray-600;
314
314
  }
315
315
 
316
316
  &[data-disabled="true"] {
317
- @apply bg-gray-300;
317
+ @apply bg-coco-gray-300;
318
318
  }
319
319
  }
320
320
 
@@ -17,7 +17,7 @@
17
17
  }
18
18
 
19
19
  .divider {
20
- @apply w-0 border-l border-gray-300 self-stretch;
20
+ @apply w-0 border-l border-coco-gray-300 self-stretch;
21
21
  }
22
22
 
23
23
  &[data-align="end"] {
@@ -7,7 +7,7 @@
7
7
  }
8
8
 
9
9
  .picker-button-color {
10
- @apply w-full h-full block rounded-full bg-white border border-gray-900;
10
+ @apply w-full h-full block rounded-full bg-white border border-coco-gray-900;
11
11
  }
12
12
 
13
13
  [data-component="color-picker"] {