aeros 0.0.1 → 0.0.2

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 (151) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +1 -1
  3. data/app/assets/stylesheets/aeros/application.css +1 -15
  4. data/app/assets/stylesheets/aeros/base.css +43 -0
  5. data/app/assets/stylesheets/aeros/reset.css +397 -0
  6. data/app/assets/stylesheets/aeros/source.css +15 -0
  7. data/app/assets/stylesheets/aeros/theme.css +6 -0
  8. data/app/assets/stylesheets/aeros/themes/slate.css +163 -0
  9. data/app/assets/stylesheets/aeros/themes/zinc.css +163 -0
  10. data/app/assets/stylesheets/aeros/utilities.css +23 -0
  11. data/app/components/aeros/application_view_component.rb +149 -5
  12. data/app/components/aeros/blocks/component_preview/component.html.erb +7 -0
  13. data/app/components/aeros/blocks/component_preview/component.rb +10 -0
  14. data/app/components/aeros/blocks/component_preview/styles.css +10 -0
  15. data/app/components/aeros/form_builder.rb +24 -8
  16. data/app/components/aeros/pages/showcase/index/component.html.erb +53 -0
  17. data/app/components/aeros/pages/showcase/index/component.rb +7 -0
  18. data/app/components/aeros/pages/showcase/index/styles.css +27 -0
  19. data/app/components/aeros/pages/showcase/placeholder/component.html.erb +7 -0
  20. data/app/components/aeros/pages/showcase/placeholder/component.rb +10 -0
  21. data/app/components/aeros/pages/showcase/show/component.html.erb +38 -0
  22. data/app/components/aeros/pages/showcase/show/component.rb +48 -0
  23. data/app/components/aeros/primitives/button/component.rb +66 -0
  24. data/app/components/aeros/primitives/button/styles.css +153 -0
  25. data/app/components/aeros/primitives/card/component.html.erb +3 -0
  26. data/app/components/aeros/primitives/card/component.rb +42 -0
  27. data/app/components/aeros/primitives/card/styles.css +28 -0
  28. data/app/components/aeros/primitives/conversation/component.html.erb +28 -0
  29. data/app/components/aeros/primitives/conversation/component.rb +15 -0
  30. data/app/components/aeros/primitives/conversation/controller.js +18 -0
  31. data/app/components/aeros/primitives/conversation/message/component.html.erb +24 -0
  32. data/app/components/aeros/primitives/conversation/message/component.rb +35 -0
  33. data/app/components/aeros/primitives/conversation/streaming_indicator/component.html.erb +21 -0
  34. data/app/components/aeros/primitives/conversation/streaming_indicator/component.rb +18 -0
  35. data/app/components/aeros/primitives/conversation/styles.css +221 -0
  36. data/app/components/aeros/primitives/conversation/user_message_box/component.html.erb +1 -0
  37. data/app/components/aeros/{empty → primitives/conversation/user_message_box}/component.rb +1 -2
  38. data/app/components/aeros/primitives/drawer/component.html.erb +43 -0
  39. data/app/components/aeros/primitives/drawer/component.rb +33 -0
  40. data/app/components/aeros/primitives/drawer/controller.js +104 -0
  41. data/app/components/aeros/primitives/drawer/styles.css +90 -0
  42. data/app/components/aeros/primitives/dropdown/checkbox.rb +22 -0
  43. data/app/components/aeros/primitives/dropdown/component.html.erb +38 -0
  44. data/app/components/aeros/primitives/dropdown/component.rb +53 -0
  45. data/app/components/aeros/primitives/dropdown/controller.js +153 -0
  46. data/app/components/aeros/primitives/dropdown/item.rb +29 -0
  47. data/app/components/aeros/primitives/dropdown/label.rb +7 -0
  48. data/app/components/aeros/primitives/dropdown/radio_group.rb +16 -0
  49. data/app/components/aeros/primitives/dropdown/radio_item.rb +24 -0
  50. data/app/components/aeros/primitives/dropdown/separator.rb +7 -0
  51. data/app/components/aeros/primitives/dropdown/styles.css +155 -0
  52. data/app/components/aeros/primitives/empty/component.html.erb +15 -0
  53. data/app/components/aeros/primitives/empty/component.rb +18 -0
  54. data/app/components/aeros/primitives/empty/styles.css +40 -0
  55. data/app/components/aeros/primitives/input_attachments/component.html.erb +60 -0
  56. data/app/components/aeros/primitives/input_attachments/component.rb +52 -0
  57. data/app/components/aeros/primitives/input_attachments/controller.js +357 -0
  58. data/app/components/aeros/primitives/input_attachments/styles.css +102 -0
  59. data/app/components/aeros/primitives/input_color/component.html.erb +24 -0
  60. data/app/components/aeros/primitives/input_color/component.rb +42 -0
  61. data/app/components/aeros/primitives/input_color/styles.css +64 -0
  62. data/app/components/aeros/primitives/input_password/component.html.erb +43 -0
  63. data/app/components/aeros/primitives/input_password/component.rb +20 -0
  64. data/app/components/aeros/primitives/input_password/styles.css +61 -0
  65. data/app/components/aeros/{input_select → primitives/input_select}/component.html.erb +19 -19
  66. data/app/components/aeros/primitives/input_select/component.rb +21 -0
  67. data/app/components/aeros/primitives/input_select/option.rb +14 -0
  68. data/app/components/aeros/primitives/input_select/styles.css +30 -0
  69. data/app/components/aeros/primitives/input_slider/component.html.erb +33 -0
  70. data/app/components/aeros/primitives/input_slider/component.rb +35 -0
  71. data/app/components/aeros/primitives/input_slider/styles.css +74 -0
  72. data/app/components/aeros/primitives/input_tagging/component.html.erb +73 -0
  73. data/app/components/aeros/primitives/input_tagging/component.rb +40 -0
  74. data/app/components/aeros/primitives/input_tagging/controller.js +326 -0
  75. data/app/components/aeros/primitives/input_tagging/styles.css +148 -0
  76. data/app/components/aeros/primitives/input_text/component.html.erb +25 -0
  77. data/app/components/aeros/primitives/input_text/component.rb +20 -0
  78. data/app/components/aeros/primitives/input_text/styles.css +38 -0
  79. data/app/components/aeros/primitives/input_text_area/component.html.erb +23 -0
  80. data/app/components/aeros/primitives/input_text_area/component.rb +19 -0
  81. data/app/components/aeros/primitives/input_text_area/styles.css +30 -0
  82. data/app/components/aeros/primitives/input_text_area_ai/component.html.erb +51 -0
  83. data/app/components/aeros/primitives/input_text_area_ai/component.rb +47 -0
  84. data/app/components/aeros/primitives/input_text_area_ai/controller.js +198 -0
  85. data/app/components/aeros/primitives/input_text_area_ai/styles.css +91 -0
  86. data/app/components/aeros/primitives/input_wrapper/component.html.erb +20 -0
  87. data/app/components/aeros/primitives/input_wrapper/component.rb +31 -0
  88. data/app/components/aeros/primitives/input_wrapper/styles.css +72 -0
  89. data/app/components/aeros/primitives/layouts/agentic/component.html.erb +4 -0
  90. data/app/components/aeros/primitives/layouts/agentic/component.rb +23 -0
  91. data/app/components/aeros/primitives/layouts/app/aside.rb +9 -0
  92. data/app/components/aeros/primitives/layouts/app/component.html.erb +14 -0
  93. data/app/components/aeros/primitives/layouts/app/component.rb +11 -0
  94. data/app/components/aeros/primitives/layouts/app/sidebar.rb +9 -0
  95. data/app/components/aeros/primitives/layouts/app/styles.css +46 -0
  96. data/app/components/aeros/primitives/page/component.html.erb +24 -0
  97. data/app/components/aeros/primitives/page/component.rb +23 -0
  98. data/app/components/aeros/primitives/page/styles.css +55 -0
  99. data/app/components/aeros/primitives/sidebar/component.html.erb +25 -0
  100. data/app/components/aeros/primitives/sidebar/component.rb +14 -0
  101. data/app/components/aeros/primitives/sidebar/footer.rb +7 -0
  102. data/app/components/aeros/primitives/sidebar/group.rb +18 -0
  103. data/app/components/aeros/primitives/sidebar/header.rb +7 -0
  104. data/app/components/aeros/primitives/sidebar/item.rb +19 -0
  105. data/app/components/aeros/primitives/sidebar/styles.css +95 -0
  106. data/app/components/aeros/primitives/spinner/component.rb +36 -0
  107. data/app/components/aeros/primitives/spinner/styles.css +81 -0
  108. data/app/components/aeros/primitives/table/cell.rb +7 -0
  109. data/app/components/aeros/primitives/table/column.rb +7 -0
  110. data/app/components/aeros/primitives/table/component.html.erb +8 -0
  111. data/app/components/aeros/primitives/table/component.rb +14 -0
  112. data/app/components/aeros/primitives/table/header.rb +13 -0
  113. data/app/components/aeros/primitives/table/row.rb +11 -0
  114. data/app/components/aeros/primitives/table/styles.css +39 -0
  115. data/app/controllers/aeros/application_controller.rb +11 -0
  116. data/app/controllers/aeros/showcase_controller.rb +37 -1
  117. data/app/controllers/aeros/theme_controller.rb +10 -0
  118. data/app/helpers/aeros/application_helper.rb +19 -7
  119. data/app/views/layouts/aeros/application.html.erb +49 -14
  120. data/config/importmap.rb +6 -1
  121. data/config/routes.rb +2 -0
  122. data/lib/aeros/configuration.rb +56 -0
  123. data/lib/aeros/engine.rb +7 -1
  124. data/lib/aeros/theme.rb +326 -0
  125. data/lib/aeros/version.rb +1 -1
  126. data/lib/aeros.rb +2 -0
  127. data/lib/tasks/aeros_tasks.rake +25 -7
  128. metadata +127 -38
  129. data/app/assets/stylesheets/aeros/application.tailwind.css +0 -7
  130. data/app/assets/stylesheets/aeros/tailwind.css +0 -1100
  131. data/app/components/aeros/button/component.rb +0 -128
  132. data/app/components/aeros/card/component.html.erb +0 -3
  133. data/app/components/aeros/card/component.rb +0 -7
  134. data/app/components/aeros/dropdown/component.html.erb +0 -26
  135. data/app/components/aeros/dropdown/component.rb +0 -66
  136. data/app/components/aeros/empty/component.html.erb +0 -12
  137. data/app/components/aeros/input_password/component.html.erb +0 -43
  138. data/app/components/aeros/input_password/component.rb +0 -6
  139. data/app/components/aeros/input_select/component.rb +0 -24
  140. data/app/components/aeros/input_text/component.html.erb +0 -25
  141. data/app/components/aeros/input_text/component.rb +0 -5
  142. data/app/components/aeros/input_wrapper/component.html.erb +0 -20
  143. data/app/components/aeros/input_wrapper/component.rb +0 -12
  144. data/app/components/aeros/page/component.html.erb +0 -24
  145. data/app/components/aeros/page/component.rb +0 -9
  146. data/app/components/aeros/spinner/component.rb +0 -55
  147. data/app/components/aeros/table/component.html.erb +0 -10
  148. data/app/components/aeros/table/component.rb +0 -64
  149. data/app/views/aeros/showcase/index.html.erb +0 -1
  150. /data/app/components/aeros/{button → primitives/button}/controller.js +0 -0
  151. /data/app/components/aeros/{input_password → primitives/input_password}/controller.js +0 -0
@@ -0,0 +1,163 @@
1
+ /* =============================================================================
2
+ Theme: Slate
3
+ ============================================================================= */
4
+
5
+ [data-theme="slate"] {
6
+ /* Background & Foreground */
7
+ --ui-background: #ffffff;
8
+ --ui-foreground: #0f172a;
9
+
10
+ /* Generic */
11
+ --ui-border: #e2e8f0;
12
+ --ui-destructive: #dc2626;
13
+ --ui-primary: #0f172a;
14
+ --ui-accent: #f1f5f9;
15
+ --ui-accent-foreground: #0f172a;
16
+ --ui-popover: #ffffff;
17
+ --ui-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
18
+ --ui-shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);
19
+
20
+ /* Muted */
21
+ --ui-muted: #f1f5f9;
22
+ --ui-muted-foreground: #64748b;
23
+
24
+ /* Card */
25
+ --ui-card-bg: #ffffff;
26
+ --ui-card-fg: #0f172a;
27
+ --ui-card-border: #e2e8f0;
28
+ --ui-card-radius: 0.75rem;
29
+ --ui-card-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
30
+
31
+ /* Area */
32
+ --ui-area-bg: #f8fafc;
33
+ --ui-area-fg: #0f172a;
34
+ --ui-area-border: #e2e8f0;
35
+
36
+ /* Sidebar */
37
+ --ui-sidebar-bg: #f8fafc;
38
+ --ui-sidebar-fg: #0f172a;
39
+ --ui-sidebar-border: #e2e8f0;
40
+ --ui-sidebar-hover: #f1f5f9;
41
+ --ui-sidebar-active: #e2e8f0;
42
+
43
+ /* Button */
44
+ --ui-button-bg: #0f172a;
45
+ --ui-button-bg-hover: #1e293b;
46
+ --ui-button-fg: #ffffff;
47
+ --ui-button-border: #0f172a;
48
+ --ui-button-secondary-bg: #f1f5f9;
49
+ --ui-button-secondary-bg-hover: #e2e8f0;
50
+ --ui-button-secondary-fg: #0f172a;
51
+ --ui-button-destructive-bg: #dc2626;
52
+ --ui-button-destructive-bg-hover: #b91c1c;
53
+ --ui-button-destructive-fg: #ffffff;
54
+ --ui-button-ghost-bg-hover: #f1f5f9;
55
+ --ui-button-ghost-fg: #0f172a;
56
+ --ui-button-outline-bg-hover: #f1f5f9;
57
+ --ui-button-outline-fg: #0f172a;
58
+
59
+ /* Input */
60
+ --ui-input-bg: #ffffff;
61
+ --ui-input-fg: #0f172a;
62
+ --ui-input-border: #e2e8f0;
63
+ --ui-input-border-focus: #94a3b8;
64
+ --ui-input-ring: #3b82f6;
65
+ --ui-input-placeholder: #94a3b8;
66
+
67
+ /* Typography */
68
+ --ui-heading-color: #0f172a;
69
+ --ui-body-color: #334155;
70
+ --ui-muted-color: #64748b;
71
+ --ui-link-color: #2563eb;
72
+ --ui-link-hover: #1d4ed8;
73
+ --ui-ring: #3b82f6;
74
+
75
+ /* Menu */
76
+ --ui-menu-bg: #ffffff;
77
+ --ui-menu-fg: #0f172a;
78
+ --ui-menu-border: #e2e8f0;
79
+ --ui-menu-radius: 0.375rem;
80
+ --ui-menu-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
81
+ --ui-menu-padding: 0.25rem;
82
+ --ui-menu-item-radius: 0.25rem;
83
+ }
84
+
85
+ /* Dark mode */
86
+ [data-theme="slate"][data-mode="dark"] {
87
+ /* Background & Foreground */
88
+ --ui-background: #0f172a;
89
+ --ui-foreground: #f8fafc;
90
+
91
+ /* Generic */
92
+ --ui-border: #334155;
93
+ --ui-destructive: #dc2626;
94
+ --ui-primary: #f8fafc;
95
+ --ui-accent: #1e293b;
96
+ --ui-accent-foreground: #f8fafc;
97
+ --ui-popover: #1e293b;
98
+ --ui-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.3);
99
+ --ui-shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.3);
100
+
101
+ /* Muted */
102
+ --ui-muted: #1e293b;
103
+ --ui-muted-foreground: #94a3b8;
104
+
105
+ /* Card */
106
+ --ui-card-bg: #1e293b;
107
+ --ui-card-fg: #f8fafc;
108
+ --ui-card-border: #334155;
109
+ --ui-card-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.3);
110
+
111
+ /* Area */
112
+ --ui-area-bg: #1e293b;
113
+ --ui-area-fg: #f8fafc;
114
+ --ui-area-border: #334155;
115
+
116
+ /* Sidebar */
117
+ --ui-sidebar-bg: #1e293b;
118
+ --ui-sidebar-fg: #f8fafc;
119
+ --ui-sidebar-border: #334155;
120
+ --ui-sidebar-hover: #334155;
121
+ --ui-sidebar-active: #475569;
122
+
123
+ /* Button */
124
+ --ui-button-bg: #f8fafc;
125
+ --ui-button-bg-hover: #e2e8f0;
126
+ --ui-button-fg: #0f172a;
127
+ --ui-button-border: #f8fafc;
128
+ --ui-button-secondary-bg: #334155;
129
+ --ui-button-secondary-bg-hover: #475569;
130
+ --ui-button-secondary-fg: #f8fafc;
131
+ --ui-button-destructive-bg: #dc2626;
132
+ --ui-button-destructive-bg-hover: #ef4444;
133
+ --ui-button-destructive-fg: #ffffff;
134
+ --ui-button-ghost-bg-hover: #334155;
135
+ --ui-button-ghost-fg: #f8fafc;
136
+ --ui-button-outline-bg-hover: #334155;
137
+ --ui-button-outline-fg: #f8fafc;
138
+
139
+ /* Input */
140
+ --ui-input-bg: #1e293b;
141
+ --ui-input-fg: #f8fafc;
142
+ --ui-input-border: #334155;
143
+ --ui-input-border-focus: #64748b;
144
+ --ui-input-ring: #3b82f6;
145
+ --ui-input-placeholder: #64748b;
146
+
147
+ /* Typography */
148
+ --ui-heading-color: #f8fafc;
149
+ --ui-body-color: #cbd5e1;
150
+ --ui-muted-color: #94a3b8;
151
+ --ui-link-color: #60a5fa;
152
+ --ui-link-hover: #93c5fd;
153
+ --ui-ring: #3b82f6;
154
+
155
+ /* Menu */
156
+ --ui-menu-bg: #1e293b;
157
+ --ui-menu-fg: #f8fafc;
158
+ --ui-menu-border: #334155;
159
+ --ui-menu-radius: 0.375rem;
160
+ --ui-menu-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.3);
161
+ --ui-menu-padding: 0.25rem;
162
+ --ui-menu-item-radius: 0.25rem;
163
+ }
@@ -0,0 +1,163 @@
1
+ /* =============================================================================
2
+ Theme: Zinc
3
+ ============================================================================= */
4
+
5
+ [data-theme="zinc"] {
6
+ /* Background & Foreground */
7
+ --ui-background: #ffffff;
8
+ --ui-foreground: #18181b;
9
+
10
+ /* Generic */
11
+ --ui-border: #e4e4e7;
12
+ --ui-destructive: #dc2626;
13
+ --ui-primary: #18181b;
14
+ --ui-accent: #f4f4f5;
15
+ --ui-accent-foreground: #18181b;
16
+ --ui-popover: #ffffff;
17
+ --ui-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
18
+ --ui-shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);
19
+
20
+ /* Muted */
21
+ --ui-muted: #f4f4f5;
22
+ --ui-muted-foreground: #71717a;
23
+
24
+ /* Card */
25
+ --ui-card-bg: #ffffff;
26
+ --ui-card-fg: #18181b;
27
+ --ui-card-border: #e4e4e7;
28
+ --ui-card-radius: 0.75rem;
29
+ --ui-card-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
30
+
31
+ /* Area */
32
+ --ui-area-bg: #fafafa;
33
+ --ui-area-fg: #18181b;
34
+ --ui-area-border: #e4e4e7;
35
+
36
+ /* Sidebar */
37
+ --ui-sidebar-bg: #fafafa;
38
+ --ui-sidebar-fg: #18181b;
39
+ --ui-sidebar-border: #e4e4e7;
40
+ --ui-sidebar-hover: #f4f4f5;
41
+ --ui-sidebar-active: #e4e4e7;
42
+
43
+ /* Button */
44
+ --ui-button-bg: #18181b;
45
+ --ui-button-bg-hover: #27272a;
46
+ --ui-button-fg: #ffffff;
47
+ --ui-button-border: #18181b;
48
+ --ui-button-secondary-bg: #f4f4f5;
49
+ --ui-button-secondary-bg-hover: #e4e4e7;
50
+ --ui-button-secondary-fg: #18181b;
51
+ --ui-button-destructive-bg: #dc2626;
52
+ --ui-button-destructive-bg-hover: #b91c1c;
53
+ --ui-button-destructive-fg: #ffffff;
54
+ --ui-button-ghost-bg-hover: #f4f4f5;
55
+ --ui-button-ghost-fg: #18181b;
56
+ --ui-button-outline-bg-hover: #f4f4f5;
57
+ --ui-button-outline-fg: #18181b;
58
+
59
+ /* Input */
60
+ --ui-input-bg: #ffffff;
61
+ --ui-input-fg: #18181b;
62
+ --ui-input-border: #e4e4e7;
63
+ --ui-input-border-focus: #a1a1aa;
64
+ --ui-input-ring: #3b82f6;
65
+ --ui-input-placeholder: #a1a1aa;
66
+
67
+ /* Typography */
68
+ --ui-heading-color: #18181b;
69
+ --ui-body-color: #3f3f46;
70
+ --ui-muted-color: #71717a;
71
+ --ui-link-color: #2563eb;
72
+ --ui-link-hover: #1d4ed8;
73
+ --ui-ring: #3b82f6;
74
+
75
+ /* Menu */
76
+ --ui-menu-bg: #ffffff;
77
+ --ui-menu-fg: #18181b;
78
+ --ui-menu-border: #e4e4e7;
79
+ --ui-menu-radius: 0.375rem;
80
+ --ui-menu-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
81
+ --ui-menu-padding: 0.25rem;
82
+ --ui-menu-item-radius: 0.25rem;
83
+ }
84
+
85
+ /* Dark mode */
86
+ [data-theme="zinc"][data-mode="dark"] {
87
+ /* Background & Foreground */
88
+ --ui-background: #09090b;
89
+ --ui-foreground: #fafafa;
90
+
91
+ /* Generic */
92
+ --ui-border: #27272a;
93
+ --ui-destructive: #dc2626;
94
+ --ui-primary: #fafafa;
95
+ --ui-accent: #27272a;
96
+ --ui-accent-foreground: #fafafa;
97
+ --ui-popover: #18181b;
98
+ --ui-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.3);
99
+ --ui-shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.3);
100
+
101
+ /* Muted */
102
+ --ui-muted: #27272a;
103
+ --ui-muted-foreground: #a1a1aa;
104
+
105
+ /* Card */
106
+ --ui-card-bg: #18181b;
107
+ --ui-card-fg: #fafafa;
108
+ --ui-card-border: #27272a;
109
+ --ui-card-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.3);
110
+
111
+ /* Area */
112
+ --ui-area-bg: #18181b;
113
+ --ui-area-fg: #fafafa;
114
+ --ui-area-border: #27272a;
115
+
116
+ /* Sidebar */
117
+ --ui-sidebar-bg: #18181b;
118
+ --ui-sidebar-fg: #fafafa;
119
+ --ui-sidebar-border: #27272a;
120
+ --ui-sidebar-hover: #27272a;
121
+ --ui-sidebar-active: #3f3f46;
122
+
123
+ /* Button */
124
+ --ui-button-bg: #fafafa;
125
+ --ui-button-bg-hover: #e4e4e7;
126
+ --ui-button-fg: #18181b;
127
+ --ui-button-border: #fafafa;
128
+ --ui-button-secondary-bg: #27272a;
129
+ --ui-button-secondary-bg-hover: #3f3f46;
130
+ --ui-button-secondary-fg: #fafafa;
131
+ --ui-button-destructive-bg: #dc2626;
132
+ --ui-button-destructive-bg-hover: #ef4444;
133
+ --ui-button-destructive-fg: #ffffff;
134
+ --ui-button-ghost-bg-hover: #27272a;
135
+ --ui-button-ghost-fg: #fafafa;
136
+ --ui-button-outline-bg-hover: #27272a;
137
+ --ui-button-outline-fg: #fafafa;
138
+
139
+ /* Input */
140
+ --ui-input-bg: #18181b;
141
+ --ui-input-fg: #fafafa;
142
+ --ui-input-border: #27272a;
143
+ --ui-input-border-focus: #52525b;
144
+ --ui-input-ring: #3b82f6;
145
+ --ui-input-placeholder: #52525b;
146
+
147
+ /* Typography */
148
+ --ui-heading-color: #fafafa;
149
+ --ui-body-color: #d4d4d8;
150
+ --ui-muted-color: #a1a1aa;
151
+ --ui-link-color: #60a5fa;
152
+ --ui-link-hover: #93c5fd;
153
+ --ui-ring: #3b82f6;
154
+
155
+ /* Menu */
156
+ --ui-menu-bg: #18181b;
157
+ --ui-menu-fg: #fafafa;
158
+ --ui-menu-border: #27272a;
159
+ --ui-menu-radius: 0.375rem;
160
+ --ui-menu-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.3);
161
+ --ui-menu-padding: 0.25rem;
162
+ --ui-menu-item-radius: 0.25rem;
163
+ }
@@ -0,0 +1,23 @@
1
+ /* Padding */
2
+ .pad-1 { padding: var(--ui-spacing); }
3
+ .pad-2 { padding: calc(var(--ui-spacing) * 2); }
4
+ .pad-3 { padding: calc(var(--ui-spacing) * 3); }
5
+ .pad-4 { padding: calc(var(--ui-spacing) * 4); }
6
+
7
+ /* Text size */
8
+ .text-xs { font-size: 0.75rem; }
9
+ .text-sm { font-size: 0.875rem; }
10
+ .text-base { font-size: 1rem; }
11
+ .text-lg { font-size: 1.125rem; }
12
+ .text-xl { font-size: 1.25rem; }
13
+
14
+ /* Text color */
15
+ .text-muted { color: var(--ui-muted-color); }
16
+
17
+ /* Fixed positioning */
18
+ .cg-theme-toggle {
19
+ position: fixed;
20
+ bottom: 1.5rem;
21
+ right: 1.5rem;
22
+ z-index: 50;
23
+ }
@@ -1,22 +1,152 @@
1
1
  module Aeros
2
2
  class ApplicationViewComponent < ViewComponentContrib::Base
3
3
  extend(Dry::Initializer)
4
+ include(Turbo::StreamsHelper)
5
+ include(Turbo::FramesHelper)
4
6
  include(Aeros::ApplicationHelper)
5
- include(ViewComponentContrib::StyleVariants)
7
+ include(LucideRails::RailsHelper)
6
8
 
7
- style_config.postprocess_with do |classes|
8
- TailwindMerge::Merger.new.merge(classes.join(" "))
9
+ # ═══════════════════════════════════════════════════════════════════════════
10
+ # PROPS DSL
11
+ # ═══════════════════════════════════════════════════════════════════════════
12
+
13
+ def self.prop_definitions
14
+ @prop_definitions ||= {}
15
+ end
16
+
17
+ def self.prop(name, description:, values: nil, **opts)
18
+ prop_definitions[name] = { description:, values: }.compact
19
+ option(name, **opts)
20
+ end
21
+
22
+ def self.props
23
+ ancestors
24
+ .select { |a| a.respond_to?(:prop_definitions) }
25
+ .reverse
26
+ .reduce({}) { |h, a| h.merge(a.prop_definitions) }
27
+ end
28
+
29
+ # ═══════════════════════════════════════════════════════════════════════════
30
+ # EXAMPLES DSL
31
+ # ═══════════════════════════════════════════════════════════════════════════
32
+
33
+ class ExamplePreview
34
+ attr_reader :props
35
+
36
+ def initialize(props)
37
+ @props = props
38
+ end
39
+ end
40
+
41
+ class Example
42
+ attr_reader :key, :title, :description, :previews
43
+
44
+ def initialize(key, title:, description: nil)
45
+ @key = key
46
+ @title = title
47
+ @description = description
48
+ @previews = []
49
+ end
50
+
51
+ def preview(**props)
52
+ @previews << ExamplePreview.new(props)
53
+ end
54
+ end
55
+
56
+ class ExamplesBuilder
57
+ attr_reader :examples
58
+
59
+ def initialize
60
+ @examples = []
61
+ end
62
+
63
+ def example(key, title:, description: nil, &block)
64
+ ex = Example.new(key, title: title, description: description)
65
+ block.call(ex) if block
66
+ @examples << ex
67
+ end
68
+ end
69
+
70
+ def self.examples_config
71
+ @examples_config ||= { title: nil, description: nil, examples: [] }
72
+ end
73
+
74
+ def self.examples(title, description: nil, &block)
75
+ @examples_config = { title: title, description: description, examples: [] }
76
+ builder = ExamplesBuilder.new
77
+ block.call(builder) if block
78
+ @examples_config[:examples] = builder.examples
79
+ end
80
+
81
+ def self.examples_title
82
+ examples_config[:title]
83
+ end
84
+
85
+ def self.examples_description
86
+ examples_config[:description]
87
+ end
88
+
89
+ def self.examples_list
90
+ examples_config[:examples]
9
91
  end
10
92
 
11
93
  option(:css, optional: true)
12
- def default_styles
13
- [style, css].join(" ")
94
+ option(:style, optional: true)
95
+
96
+ # Override in components: def default_style = { height: "300px" }
97
+ def default_style = {}
98
+
99
+ # Hash - for passing to child components
100
+ def style_hash
101
+ @style_hash ||= default_style.merge(style || {}).compact
102
+ end
103
+
104
+ # String - for HTML style attribute
105
+ def merged_style
106
+ @merged_style ||= style_hash
107
+ .map { |k, v| "#{k.to_s.dasherize}: #{v}" }
108
+ .join("; ")
109
+ .presence
14
110
  end
15
111
 
16
112
  class << self
17
113
  def named
18
114
  @named ||= self.name.sub(/::Component$/, "").underscore.split("/").join("--").gsub("_", "-")
19
115
  end
116
+
117
+ PREFIXES = {
118
+ "Primitives" => "cp",
119
+ "Blocks" => "cb",
120
+ "Pages" => "cg"
121
+ }.freeze
122
+
123
+ # Component identifier for CSS scoping (e.g., "cp-card", "cb-sidebar")
124
+ # Note: Can't use @identifier - ViewComponent uses it for file paths
125
+ def css_identifier
126
+ parts = self.name.to_s.sub(/::Component$/, "").split("::")
127
+ prefix = PREFIXES[parts[-2]] || "c"
128
+ component = parts.last.underscore.gsub("_", "-")
129
+ "#{prefix}-#{component}"
130
+ end
131
+ end
132
+
133
+ # Generate scoped CSS class name (e.g., "cp-card", "cp-card--centered")
134
+ def class_for(name = nil)
135
+ return self.class.css_identifier if name.nil? || name == "base"
136
+ "#{self.class.css_identifier}--#{name}"
137
+ end
138
+
139
+ # Build classes from modifiers
140
+ # Usage: classes(variant:, size:, disabled:, full:)
141
+ # - symbol values: class_for(value) e.g. variant: :default → cp-button--default
142
+ # - true: class_for(key) e.g. disabled: true → cp-button--disabled
143
+ # - false/nil: skipped
144
+ def classes(**mods)
145
+ [
146
+ class_for,
147
+ *mods.filter_map { |k, v| v && class_for(v == true ? k.to_s : v.to_s) },
148
+ css
149
+ ].join(" ")
20
150
  end
21
151
 
22
152
  def controller_name
@@ -71,5 +201,19 @@ module Aeros
71
201
  def default_data
72
202
  { controller: controller_name }
73
203
  end
204
+
205
+ # Shared helper for rendering clickable elements
206
+ # - button_to for non-GET methods (creates form)
207
+ # - link_to for GET links
208
+ # - button_tag for action buttons
209
+ def action_tag(href: nil, method: nil, data: {}, form_data: {}, **opts, &block)
210
+ if method && href
211
+ helpers.button_to(href, method: method, data: data, form: { data: form_data }, **opts, &block)
212
+ elsif href
213
+ helpers.link_to(href, data: data, **opts, &block)
214
+ else
215
+ helpers.button_tag(type: "button", data: data, **opts, &block)
216
+ end
217
+ end
74
218
  end
75
219
  end
@@ -0,0 +1,7 @@
1
+ <div class="cb-component-preview">
2
+ <% if title %><h2 class="cb-component-preview__title"><%= title %></h2><% end %>
3
+ <% if description %><p class="cb-component-preview__description text-muted"><%= description %></p><% end %>
4
+ <%= ui("card", style: style_hash, centered: true) do %>
5
+ <%= content %>
6
+ <% end %>
7
+ </div>
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Aeros::Blocks::ComponentPreview
4
+ class Component < ::Aeros::ApplicationViewComponent
5
+ option(:title, optional: true)
6
+ option(:description, optional: true)
7
+
8
+ def default_style = { height: "300px" }
9
+ end
10
+ end
@@ -0,0 +1,10 @@
1
+ .cb-component-preview {
2
+ &__title {
3
+ font-size: 0.875rem;
4
+ font-weight: 600;
5
+ color: var(--ui-muted-color);
6
+ margin-bottom: 0.75rem;
7
+ text-transform: uppercase;
8
+ letter-spacing: 0.05em;
9
+ }
10
+ }
@@ -5,19 +5,19 @@ class Aeros::FormBuilder < ActionView::Helpers::FormBuilder
5
5
  INPUT_BASE_CLASSES = %w[
6
6
  block
7
7
  w-full
8
- rounded-md
9
- bg-white
8
+ rounded-input
9
+ bg-input-bg
10
10
  px-3
11
11
  py-2
12
12
  text-sm
13
- text-gray-900
14
- placeholder:text-gray-400
13
+ text-input-text
14
+ placeholder:text-input-placeholder
15
15
  outline-none
16
16
  border
17
- border-gray-300
18
- focus:border-indigo-500
17
+ border-input-border
18
+ focus:border-input-border-focus
19
19
  focus:ring-1
20
- focus:ring-indigo-500
20
+ focus:ring-input-ring
21
21
  shadow-sm
22
22
  ].freeze
23
23
 
@@ -35,7 +35,7 @@ class Aeros::FormBuilder < ActionView::Helpers::FormBuilder
35
35
  end
36
36
 
37
37
  def field(field_type, name, options = {}, &block)
38
- klass = "Aeros::Input#{field_type.to_s.classify}::Component".constantize
38
+ klass = "::Aeros::Primitives::Input#{field_type.to_s.camelize}::Component".constantize
39
39
  resolved_name = resolve_name(name)
40
40
  error_text = @object&.errors&.[](name)&.first
41
41
 
@@ -63,6 +63,22 @@ class Aeros::FormBuilder < ActionView::Helpers::FormBuilder
63
63
  field(:select, name, options, &block)
64
64
  end
65
65
 
66
+ def text_area_field(name, options = {})
67
+ field(:text_area, name, options)
68
+ end
69
+
70
+ def tagging_field(name, options = {})
71
+ field(:tagging, name, options)
72
+ end
73
+
74
+ def attachments_field(name, options = {})
75
+ field(:attachments, name, options)
76
+ end
77
+
78
+ def text_area_ai_field(name, options = {})
79
+ field(:text_area_ai, name, options)
80
+ end
81
+
66
82
  private
67
83
 
68
84
  def resolve_name(name)
@@ -0,0 +1,53 @@
1
+ <div class="cg-showcase">
2
+ <h1>Button</h1>
3
+
4
+ <%= block("component_preview", title: "Preview") do %>
5
+ <%= ui("button", label: "Click me", variant: :default) %>
6
+ <% end %>
7
+
8
+ <%= block("component_preview", title: "Variants") do %>
9
+ <%= ui("button", label: "Default", variant: :default) %>
10
+ <%= ui("button", label: "Secondary", variant: :secondary) %>
11
+ <%= ui("button", label: "Destructive", variant: :destructive) %>
12
+ <%= ui("button", label: "Outline", variant: :outline) %>
13
+ <%= ui("button", label: "Ghost", variant: :ghost) %>
14
+ <%= ui("button", label: "Link", variant: :link) %>
15
+ <% end %>
16
+
17
+ <%= block("component_preview", title: "Sizes") do %>
18
+ <%= ui("button", label: "XSmall", size: :xsmall) %>
19
+ <%= ui("button", label: "Small", size: :small) %>
20
+ <%= ui("button", label: "Default") %>
21
+ <%= ui("button", label: "Large", size: :large) %>
22
+ <% end %>
23
+
24
+ <%= block("component_preview", title: "With Icons") do %>
25
+ <%= ui("button", label: "Settings", icon: "settings") %>
26
+ <%= ui("button", label: "Download", icon: "download", variant: :secondary) %>
27
+ <%= ui("button", label: "Delete", icon: "trash-2", variant: :destructive) %>
28
+ <% end %>
29
+
30
+ <%= ui("card") do %>
31
+ <h2>Props</h2>
32
+ <%= ui("card") do %>
33
+ <%= ui("table") do |t| %>
34
+ <% t.with_header do |h| %>
35
+ <% h.with_column do %>Name<% end %>
36
+ <% h.with_column do %>Description<% end %>
37
+ <% h.with_column do %>Values<% end %>
38
+ <% end %>
39
+ <% component_class(:button).props.each do |name, meta| %>
40
+ <% t.with_row do |r| %>
41
+ <% r.with_cell do %><code><%= name %></code><% end %>
42
+ <% r.with_cell do %><%= meta[:description] %><% end %>
43
+ <% r.with_cell do %>
44
+ <% if meta[:values] %>
45
+ <% meta[:values].each do |v| %><code><%= v %></code> <% end %>
46
+ <% end %>
47
+ <% end %>
48
+ <% end %>
49
+ <% end %>
50
+ <% end %>
51
+ <% end %>
52
+ <% end %>
53
+ </div>
@@ -0,0 +1,7 @@
1
+ module Aeros::Pages::Showcase::Index
2
+ class Component < ::Aeros::ApplicationViewComponent
3
+ def component_class(name)
4
+ "Aeros::Primitives::#{name.to_s.camelize}::Component".constantize
5
+ end
6
+ end
7
+ end