coveragebook_components 0.15.0 → 0.17.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (108) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/build/coco/{book.css → coco.css} +1158 -1796
  3. data/app/assets/build/coco/coco.js +11206 -10950
  4. data/app/assets/build/coco/tailwind.preset.js +2760 -0
  5. data/app/assets/css/base/setup.css +0 -43
  6. data/app/assets/css/base/tippy.css +40 -43
  7. data/app/assets/css/base/utils/text.css +0 -210
  8. data/app/assets/css/coco.css +34 -0
  9. data/app/assets/css/plugins/aspect.js +27 -0
  10. data/app/assets/css/plugins/colors.js +30 -0
  11. data/app/assets/css/plugins/icons.js +17 -0
  12. data/app/assets/css/plugins/layout.js +15 -0
  13. data/app/assets/css/plugins/text.js +183 -0
  14. data/app/assets/js/base/tippy/plugins/hide_on_esc.js +3 -1
  15. data/app/assets/js/coco/coco.js +0 -9
  16. data/app/assets/js/coco.js +5 -0
  17. data/app/assets/js/helpers/index.js +10 -2
  18. data/app/components/coco/buttons/button/button.css +5 -5
  19. data/app/components/coco/buttons/button_group/button_group.css +1 -1
  20. data/app/components/coco/buttons/color_picker_button/color_picker_button.css +1 -1
  21. data/app/components/coco/buttons/layout_picker_button/layout_picker_button.html.erb +5 -1
  22. data/app/components/coco/buttons/layout_picker_button/layout_picker_button.rb +2 -2
  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/component.rb +1 -1
  26. data/app/components/coco/concerns/acts_as_field_with_options.rb +0 -1
  27. data/app/components/coco/fields/button_component.rb +1 -1
  28. data/app/components/coco/fields/submit_component.rb +1 -1
  29. data/app/components/coco/indicators/badge/badge.css +1 -1
  30. data/app/components/coco/layout/panel/panel.css +1 -1
  31. data/app/components/coco/modals/modal/modal.css +1 -1
  32. data/app/components/coco/modals/modal_dialog/modal_dialog.css +1 -1
  33. data/app/components/coco/utilities/placeholder/placeholder.css +1 -1
  34. data/app/helpers/coco/components_helper.rb +253 -3
  35. data/app/helpers/coco/integration_helper.rb +26 -4
  36. data/config/exports.js +0 -0
  37. data/config/locales/coco.en.yml +0 -18
  38. data/config/tailwind.config.js +1 -83
  39. data/config/tailwind.preset.js +67 -0
  40. data/config/tokens.js +25 -21
  41. data/lib/coco/engine.rb +0 -4
  42. data/lib/coco.rb +1 -1
  43. metadata +12 -68
  44. data/app/assets/build/coco/app.css +0 -9711
  45. data/app/assets/build/coco/app.js +0 -25142
  46. data/app/assets/build/coco/book.js +0 -16548
  47. data/app/assets/css/app.css +0 -3
  48. data/app/assets/css/base/utils/colors.css +0 -30
  49. data/app/assets/css/base/utils/icons.css +0 -16
  50. data/app/assets/css/base/utils/layout.css +0 -13
  51. data/app/assets/css/book.css +0 -3
  52. data/app/assets/js/app.js +0 -11
  53. data/app/assets/js/book.js +0 -9
  54. data/app/assets/js/helpers/screenshot.js +0 -42
  55. data/app/assets/js/helpers/turbo_events.js +0 -13
  56. data/app/components/coco/app/application_layout/application_layout.css +0 -122
  57. data/app/components/coco/app/application_layout/application_layout.html.erb +0 -32
  58. data/app/components/coco/app/application_layout/application_layout.js +0 -36
  59. data/app/components/coco/app/application_layout/application_layout.rb +0 -16
  60. data/app/components/coco/app/contact_callout/contact_callout.css +0 -119
  61. data/app/components/coco/app/contact_callout/contact_callout.html.erb +0 -28
  62. data/app/components/coco/app/contact_callout/contact_callout.rb +0 -21
  63. data/app/components/coco/app/faqs/faqs.css +0 -38
  64. data/app/components/coco/app/faqs/faqs.html.erb +0 -12
  65. data/app/components/coco/app/faqs/faqs.rb +0 -14
  66. data/app/components/coco/app/header/header.css +0 -47
  67. data/app/components/coco/app/header/header.html.erb +0 -30
  68. data/app/components/coco/app/header/header.js +0 -11
  69. data/app/components/coco/app/header/header.rb +0 -33
  70. data/app/components/coco/app/nav_drawer/nav_drawer.css +0 -58
  71. data/app/components/coco/app/nav_drawer/nav_drawer.html.erb +0 -16
  72. data/app/components/coco/app/nav_drawer/nav_drawer.js +0 -24
  73. data/app/components/coco/app/nav_drawer/nav_drawer.rb +0 -32
  74. data/app/components/coco/app/plan_card/plan_card.css +0 -132
  75. data/app/components/coco/app/plan_card/plan_card.html.erb +0 -36
  76. data/app/components/coco/app/plan_card/plan_card.rb +0 -66
  77. data/app/components/coco/app/plan_confirmation/plan_confirmation.css +0 -53
  78. data/app/components/coco/app/plan_confirmation/plan_confirmation.html.erb +0 -16
  79. data/app/components/coco/app/plan_confirmation/plan_confirmation.rb +0 -18
  80. data/app/components/coco/app/plan_picker/plan_picker.css +0 -128
  81. data/app/components/coco/app/plan_picker/plan_picker.html.erb +0 -69
  82. data/app/components/coco/app/plan_picker/plan_picker.js +0 -56
  83. data/app/components/coco/app/plan_picker/plan_picker.rb +0 -25
  84. data/app/components/coco/app/sidebar_nav/item/item.css +0 -121
  85. data/app/components/coco/app/sidebar_nav/item/item.html.erb +0 -9
  86. data/app/components/coco/app/sidebar_nav/item/item.js +0 -80
  87. data/app/components/coco/app/sidebar_nav/item/item.rb +0 -48
  88. data/app/components/coco/app/sidebar_nav/menu/menu.css +0 -138
  89. data/app/components/coco/app/sidebar_nav/menu/menu.html.erb +0 -24
  90. data/app/components/coco/app/sidebar_nav/menu/menu.js +0 -12
  91. data/app/components/coco/app/sidebar_nav/menu/menu.rb +0 -46
  92. data/app/components/coco/app/sidebar_nav/navbar/navbar.css +0 -75
  93. data/app/components/coco/app/sidebar_nav/navbar/navbar.html.erb +0 -29
  94. data/app/components/coco/app/sidebar_nav/navbar/navbar.js +0 -28
  95. data/app/components/coco/app/sidebar_nav/navbar/navbar.rb +0 -50
  96. data/app/components/coco/app/slide_editor/slide_editor.css +0 -149
  97. data/app/components/coco/app/slide_editor/slide_editor.html.erb +0 -302
  98. data/app/components/coco/app/slide_editor/slide_editor.js +0 -269
  99. data/app/components/coco/app/slide_editor/slide_editor.rb +0 -114
  100. data/app/components/coco/book/editable_slide/editable_slide.css +0 -332
  101. data/app/components/coco/book/editable_slide/editable_slide.html.erb +0 -48
  102. data/app/components/coco/book/editable_slide/editable_slide.rb +0 -72
  103. data/app/components/coco/book/media_slide/media_slide.css +0 -7
  104. data/app/components/coco/book/media_slide/media_slide.html.erb +0 -3
  105. data/app/components/coco/book/media_slide/media_slide.rb +0 -12
  106. data/app/helpers/coco/app_components_helper.rb +0 -39
  107. data/app/helpers/coco/book_components_helper.rb +0 -11
  108. data/app/helpers/coco/core_components_helper.rb +0 -257
@@ -0,0 +1,67 @@
1
+ /** @type {import('tailwindcss').Config} */
2
+
3
+ const defaultTheme = require("tailwindcss/defaultTheme");
4
+ const { fontSize, fontFamily, colors, screens } = require("./tokens.js");
5
+
6
+ module.exports = {
7
+ theme: {
8
+ colors,
9
+ screens,
10
+ fontFamily: {
11
+ display: [fontFamily.displaySans, ...defaultTheme.fontFamily.sans],
12
+ body: [fontFamily.bodySans, ...defaultTheme.fontFamily.sans],
13
+ branded: [fontFamily.displaySerif, ...defaultTheme.fontFamily.serif],
14
+ },
15
+ extend: {
16
+ fontSize,
17
+ animation: {
18
+ spin: "spin 1.5s linear infinite",
19
+ "spin-reverse": "spin 1.5s linear infinite reverse",
20
+ },
21
+ spacing: {
22
+ 4.5: "1.125rem",
23
+ 5.5: "1.375rem",
24
+ 6.5: "1.675rem",
25
+ 7.5: "1.875rem",
26
+ 13: "3.25rem",
27
+ 15: "3.75rem",
28
+ 17: "4.25rem",
29
+ 18: "4.5rem",
30
+ },
31
+ aspectRatio: {
32
+ "4/3": "4 / 3",
33
+ "3/2": "3 / 2",
34
+ "3/2": "3 / 2",
35
+ "2/1": "2 / 1",
36
+ a4: "7 / 5",
37
+ },
38
+ customForms: () => ({
39
+ DEFAULT: {
40
+ checkbox: {
41
+ "&:indeterminate": {
42
+ background:
43
+ "url(\"data:image/svg+xml,%3Csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='8' height='2' x='4' y='7' rx='1'/%3E%3C/svg%3E\");",
44
+ borderColor: "transparent",
45
+ backgroundColor: "currentColor",
46
+ backgroundSize: "100% 100%",
47
+ backgroundPosition: "center",
48
+ backgroundRepeat: "no-repeat",
49
+ },
50
+ },
51
+ },
52
+ }),
53
+ },
54
+ },
55
+ corePlugins: {
56
+ aspectRatio: false,
57
+ },
58
+ plugins: [
59
+ require("@tailwindcss/forms"),
60
+ require("@tailwindcss/container-queries"),
61
+ require("../app/assets/css/plugins/colors.js"),
62
+ require("../app/assets/css/plugins/icons.js"),
63
+ require("../app/assets/css/plugins/layout.js"),
64
+ require("../app/assets/css/plugins/text.js"),
65
+ require("../app/assets/css/plugins/aspect.js"),
66
+ ],
67
+ };
data/config/tokens.js CHANGED
@@ -3,17 +3,21 @@ const colors = {
3
3
  current: "currentColor",
4
4
  black: "#000000",
5
5
  white: "#FFFFFF",
6
+ coco: {
7
+ gray: {
8
+ 50: "#F9FAFB",
9
+ 100: "#F3F4F6",
10
+ 200: "#E5E7EB",
11
+ 300: "#D1D5DB",
12
+ 400: "#9CA3AF",
13
+ 500: "#6B7280",
14
+ 600: "#4B5563",
15
+ 700: "#374151",
16
+ 800: "#1F2937",
17
+ 900: "#111827",
18
+ },
19
+ },
6
20
  gray: {
7
- 50: "#F9FAFB",
8
- 100: "#F3F4F6",
9
- 200: "#E5E7EB",
10
- 300: "#D1D5DB",
11
- 400: "#9CA3AF",
12
- 500: "#6B7280",
13
- 600: "#4B5563",
14
- 700: "#374151",
15
- 800: "#1F2937",
16
- 900: "#111827",
17
21
  transparent: {
18
22
  50: "rgba(0, 12, 39, 0.06)",
19
23
  100: "rgba(0, 12, 39, 0.1)",
@@ -104,13 +108,13 @@ const colorAliases = {
104
108
  },
105
109
  light: {
106
110
  1: colors.white,
107
- 2: colors.gray[50],
108
- 3: colors.gray[100],
111
+ 2: colors.coco.gray[50],
112
+ 3: colors.coco.gray[100],
109
113
  },
110
114
  dark: {
111
- 1: colors.gray[900],
112
- 2: colors.gray[800],
113
- 3: colors.gray[700],
115
+ 1: colors.coco.gray[900],
116
+ 2: colors.coco.gray[800],
117
+ 3: colors.coco.gray[700],
114
118
  },
115
119
  primary: {
116
120
  DEFAULT: colors.green[500],
@@ -135,15 +139,15 @@ const colorAliases = {
135
139
  },
136
140
  content: {
137
141
  dark: {
138
- 1: colors.gray[900],
139
- 2: colors.gray[800],
140
- 3: colors.gray[600],
141
- muted: colors.gray[400],
142
+ 1: colors.coco.gray[900],
143
+ 2: colors.coco.gray[800],
144
+ 3: colors.coco.gray[600],
145
+ muted: colors.coco.gray[400],
142
146
  },
143
147
  light: {
144
148
  1: colors.white,
145
- 2: colors.gray[200],
146
- muted: colors.gray[400],
149
+ 2: colors.coco.gray[200],
150
+ muted: colors.coco.gray[400],
147
151
  },
148
152
  primary: {
149
153
  DEFAULT: colors.green[500],
data/lib/coco/engine.rb CHANGED
@@ -25,10 +25,6 @@ module Coco
25
25
  Dir.glob("#{coco_dir}/{#{COLLAPSE_DIRS.join(",")}}/**/*.rb").each do |path|
26
26
  autoloader.collapse(File.dirname(path))
27
27
  end
28
-
29
- Dir.glob("#{coco_dir}/{app,book}/**/*.rb").each do |path|
30
- autoloader.collapse(File.dirname(path))
31
- end
32
28
  end
33
29
 
34
30
  if Rails.env.production?
data/lib/coco.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Coco
2
- VERSION = "0.15.0"
2
+ VERSION = "0.17.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: coveragebook_components
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.15.0
4
+ version: 0.17.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mark Perkins
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-01-18 00:00:00.000000000 Z
11
+ date: 2024-01-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -59,10 +59,7 @@ executables: []
59
59
  extensions: []
60
60
  extra_rdoc_files: []
61
61
  files:
62
- - app/assets/build/coco/app.css
63
- - app/assets/build/coco/app.js
64
- - app/assets/build/coco/book.css
65
- - app/assets/build/coco/book.js
62
+ - app/assets/build/coco/coco.css
66
63
  - app/assets/build/coco/coco.js
67
64
  - app/assets/build/coco/icons/a-arrow-down.svg
68
65
  - app/assets/build/coco/icons/a-arrow-up.svg
@@ -1451,16 +1448,18 @@ files:
1451
1448
  - app/assets/build/coco/img/test/slides/slide-bg.jpg
1452
1449
  - app/assets/build/coco/img/test/slides/slide-foreground-landscape.jpg
1453
1450
  - app/assets/build/coco/img/test/slides/slide-foreground-portrait.jpg
1451
+ - app/assets/build/coco/tailwind.preset.js
1454
1452
  - app/assets/config/coco/manifest.js
1455
- - app/assets/css/app.css
1456
1453
  - app/assets/css/base/config.css
1457
1454
  - app/assets/css/base/setup.css
1458
1455
  - app/assets/css/base/tippy.css
1459
- - app/assets/css/base/utils/colors.css
1460
- - app/assets/css/base/utils/icons.css
1461
- - app/assets/css/base/utils/layout.css
1462
1456
  - app/assets/css/base/utils/text.css
1463
- - app/assets/css/book.css
1457
+ - app/assets/css/coco.css
1458
+ - app/assets/css/plugins/aspect.js
1459
+ - app/assets/css/plugins/colors.js
1460
+ - app/assets/css/plugins/icons.js
1461
+ - app/assets/css/plugins/layout.js
1462
+ - app/assets/css/plugins/text.js
1464
1463
  - app/assets/custom_icons/other/eye-off-red.svg
1465
1464
  - app/assets/custom_icons/other/google-sso.svg
1466
1465
  - app/assets/custom_icons/other/layout-overlay.svg
@@ -1480,7 +1479,6 @@ files:
1480
1479
  - app/assets/img/test/slides/slide-bg.jpg
1481
1480
  - app/assets/img/test/slides/slide-foreground-landscape.jpg
1482
1481
  - app/assets/img/test/slides/slide-foreground-portrait.jpg
1483
- - app/assets/js/app.js
1484
1482
  - app/assets/js/base/alpine/directives/destroy.js
1485
1483
  - app/assets/js/base/alpine/directives/dimensions.js
1486
1484
  - app/assets/js/base/alpine/directives/dropdown.js
@@ -1494,7 +1492,6 @@ files:
1494
1492
  - app/assets/js/base/polyfills.js
1495
1493
  - app/assets/js/base/tippy/index.js
1496
1494
  - app/assets/js/base/tippy/plugins/hide_on_esc.js
1497
- - app/assets/js/book.js
1498
1495
  - app/assets/js/coco.js
1499
1496
  - app/assets/js/coco/coco.js
1500
1497
  - app/assets/js/coco/component.js
@@ -1506,58 +1503,6 @@ files:
1506
1503
  - app/assets/js/helpers/lang.js
1507
1504
  - app/assets/js/helpers/location.js
1508
1505
  - app/assets/js/helpers/path.js
1509
- - app/assets/js/helpers/screenshot.js
1510
- - app/assets/js/helpers/turbo_events.js
1511
- - app/components/coco/app/application_layout/application_layout.css
1512
- - app/components/coco/app/application_layout/application_layout.html.erb
1513
- - app/components/coco/app/application_layout/application_layout.js
1514
- - app/components/coco/app/application_layout/application_layout.rb
1515
- - app/components/coco/app/contact_callout/contact_callout.css
1516
- - app/components/coco/app/contact_callout/contact_callout.html.erb
1517
- - app/components/coco/app/contact_callout/contact_callout.rb
1518
- - app/components/coco/app/faqs/faqs.css
1519
- - app/components/coco/app/faqs/faqs.html.erb
1520
- - app/components/coco/app/faqs/faqs.rb
1521
- - app/components/coco/app/header/header.css
1522
- - app/components/coco/app/header/header.html.erb
1523
- - app/components/coco/app/header/header.js
1524
- - app/components/coco/app/header/header.rb
1525
- - app/components/coco/app/nav_drawer/nav_drawer.css
1526
- - app/components/coco/app/nav_drawer/nav_drawer.html.erb
1527
- - app/components/coco/app/nav_drawer/nav_drawer.js
1528
- - app/components/coco/app/nav_drawer/nav_drawer.rb
1529
- - app/components/coco/app/plan_card/plan_card.css
1530
- - app/components/coco/app/plan_card/plan_card.html.erb
1531
- - app/components/coco/app/plan_card/plan_card.rb
1532
- - app/components/coco/app/plan_confirmation/plan_confirmation.css
1533
- - app/components/coco/app/plan_confirmation/plan_confirmation.html.erb
1534
- - app/components/coco/app/plan_confirmation/plan_confirmation.rb
1535
- - app/components/coco/app/plan_picker/plan_picker.css
1536
- - app/components/coco/app/plan_picker/plan_picker.html.erb
1537
- - app/components/coco/app/plan_picker/plan_picker.js
1538
- - app/components/coco/app/plan_picker/plan_picker.rb
1539
- - app/components/coco/app/sidebar_nav/item/item.css
1540
- - app/components/coco/app/sidebar_nav/item/item.html.erb
1541
- - app/components/coco/app/sidebar_nav/item/item.js
1542
- - app/components/coco/app/sidebar_nav/item/item.rb
1543
- - app/components/coco/app/sidebar_nav/menu/menu.css
1544
- - app/components/coco/app/sidebar_nav/menu/menu.html.erb
1545
- - app/components/coco/app/sidebar_nav/menu/menu.js
1546
- - app/components/coco/app/sidebar_nav/menu/menu.rb
1547
- - app/components/coco/app/sidebar_nav/navbar/navbar.css
1548
- - app/components/coco/app/sidebar_nav/navbar/navbar.html.erb
1549
- - app/components/coco/app/sidebar_nav/navbar/navbar.js
1550
- - app/components/coco/app/sidebar_nav/navbar/navbar.rb
1551
- - app/components/coco/app/slide_editor/slide_editor.css
1552
- - app/components/coco/app/slide_editor/slide_editor.html.erb
1553
- - app/components/coco/app/slide_editor/slide_editor.js
1554
- - app/components/coco/app/slide_editor/slide_editor.rb
1555
- - app/components/coco/book/editable_slide/editable_slide.css
1556
- - app/components/coco/book/editable_slide/editable_slide.html.erb
1557
- - app/components/coco/book/editable_slide/editable_slide.rb
1558
- - app/components/coco/book/media_slide/media_slide.css
1559
- - app/components/coco/book/media_slide/media_slide.html.erb
1560
- - app/components/coco/book/media_slide/media_slide.rb
1561
1506
  - app/components/coco/buttons/button/button.css
1562
1507
  - app/components/coco/buttons/button/button.html.erb
1563
1508
  - app/components/coco/buttons/button/button.js
@@ -1754,18 +1699,17 @@ files:
1754
1699
  - app/components/coco/utilities/seamless_textarea/seamless_textarea.js
1755
1700
  - app/components/coco/utilities/seamless_textarea/seamless_textarea.rb
1756
1701
  - app/helpers/coco/alpine_helper.rb
1757
- - app/helpers/coco/app_components_helper.rb
1758
- - app/helpers/coco/book_components_helper.rb
1759
1702
  - app/helpers/coco/components_helper.rb
1760
- - app/helpers/coco/core_components_helper.rb
1761
1703
  - app/helpers/coco/format_helper.rb
1762
1704
  - app/helpers/coco/helpers.rb
1763
1705
  - app/helpers/coco/integration_helper.rb
1764
1706
  - app/helpers/coco/modal_helper.rb
1765
1707
  - app/helpers/coco/tag_helper.rb
1708
+ - config/exports.js
1766
1709
  - config/icons.json
1767
1710
  - config/locales/coco.en.yml
1768
1711
  - config/tailwind.config.js
1712
+ - config/tailwind.preset.js
1769
1713
  - config/tokens.js
1770
1714
  - config/utils.js
1771
1715
  - lib/coco.rb