brainzlab-ui 0.1.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.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 13d80bf67037932fc8c3745319d2f23d7d5a510ae7775cd6276b303a52fec8e4
4
+ data.tar.gz: 8b1606fd13965a96ae121fd2e973d6c8d67a6f158f1eefc6eeecded170b432bb
5
+ SHA512:
6
+ metadata.gz: aecbb45750388fd87c6c4704f84357f339f3919c878dec39f98c004d2fa0b8ec1826199e93a7c54ffc78cc46dcf21a6174b1f7e3976d4e1fa1569103111011ce
7
+ data.tar.gz: d7be25d5b9c9115441dd47297e014f64ea468177baa3088155a0b0ad9e6581b578b0e6b68e4dd1ce0291fea53b0589d780d92f6c28fe1ae6f01a1f7aa75a47b4
data/CHANGELOG.md ADDED
@@ -0,0 +1,13 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ ## [0.1.0] - 2024-12-27
6
+
7
+ ### Added
8
+ - Initial release
9
+ - Design tokens (colors, shadows, typography, animations)
10
+ - Component CSS classes (buttons, cards, badges, forms, etc.)
11
+ - Phlex components (Button, Card, Badge, Input, Alert, Avatar, Table, NavItem, StatCard, EmptyState, Modal)
12
+ - Rails Engine for asset integration
13
+ - Tailwind CSS integration
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 Brainz Lab
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,67 @@
1
+ # Brainzlab UI
2
+
3
+ Unified design system for Brainz Lab products. Anthropic/Claude-inspired design with Phlex components and Tailwind CSS.
4
+
5
+ ## Installation
6
+
7
+ Add to your Gemfile:
8
+
9
+ ```ruby
10
+ # Local development (Docker)
11
+ if File.exist?("/brainzlab-ui")
12
+ gem "brainzlab-ui", path: "/brainzlab-ui"
13
+ else
14
+ gem "brainzlab-ui", "~> 0.1.0"
15
+ end
16
+ ```
17
+
18
+ ## CSS Setup
19
+
20
+ Import the design system in your Tailwind CSS file:
21
+
22
+ ```css
23
+ /* app/assets/tailwind/application.css */
24
+ @import "brainzlab_ui/base";
25
+
26
+ /* Your project-specific overrides below */
27
+ ```
28
+
29
+ ## Usage
30
+
31
+ ### Phlex Components
32
+
33
+ ```erb
34
+ <%= render Brainzlab::Components::Button.new(variant: :primary) { "Save" } %>
35
+ <%= render Brainzlab::Components::Card.new { "Content" } %>
36
+ <%= render Brainzlab::Components::Badge.new(variant: :success) { "Active" } %>
37
+ <%= render Brainzlab::Components::Alert.new(type: :info) { "Note..." } %>
38
+ ```
39
+
40
+ ### CSS Classes
41
+
42
+ ```html
43
+ <button class="btn-primary">Primary Button</button>
44
+ <button class="btn-secondary">Secondary Button</button>
45
+ <div class="card">Card content</div>
46
+ <span class="badge badge-success">Active</span>
47
+ ```
48
+
49
+ ## Design Tokens
50
+
51
+ ### Colors
52
+
53
+ | Token | Value | Usage |
54
+ |-------|-------|-------|
55
+ | `--color-primary-500` | #D97706 | Anthropic orange |
56
+ | `--color-cream-50` | #FAFAF9 | Background |
57
+ | `--color-ink-900` | #1C1917 | Text |
58
+
59
+ ### Typography
60
+
61
+ - **Sans**: Inter, system-ui
62
+ - **Serif**: Source Serif 4, Georgia
63
+ - **Mono**: JetBrains Mono, ui-monospace
64
+
65
+ ## License
66
+
67
+ MIT License - see LICENSE file.
@@ -0,0 +1,171 @@
1
+ /* ============================================
2
+ BRAINZLAB UI - ANIMATIONS
3
+ ============================================ */
4
+
5
+ /* Keyframes */
6
+ @keyframes fade-in-up {
7
+ from { opacity: 0; transform: translateY(40px); }
8
+ to { opacity: 1; transform: translateY(0); }
9
+ }
10
+
11
+ @keyframes fade-in-down {
12
+ from { opacity: 0; transform: translateY(-40px); }
13
+ to { opacity: 1; transform: translateY(0); }
14
+ }
15
+
16
+ @keyframes fade-in-scale {
17
+ from { opacity: 0; transform: scale(0.9); }
18
+ to { opacity: 1; transform: scale(1); }
19
+ }
20
+
21
+ @keyframes slide-in-left {
22
+ from { opacity: 0; transform: translateX(-60px); }
23
+ to { opacity: 1; transform: translateX(0); }
24
+ }
25
+
26
+ @keyframes slide-in-right {
27
+ from { opacity: 0; transform: translateX(60px); }
28
+ to { opacity: 1; transform: translateX(0); }
29
+ }
30
+
31
+ @keyframes float {
32
+ 0%, 100% { transform: translateY(0) rotate(0deg); }
33
+ 50% { transform: translateY(-20px) rotate(2deg); }
34
+ }
35
+
36
+ @keyframes float-slow {
37
+ 0%, 100% { transform: translateY(0) scale(1); }
38
+ 50% { transform: translateY(-30px) scale(1.02); }
39
+ }
40
+
41
+ @keyframes pulse-glow {
42
+ 0%, 100% { opacity: 0.5; transform: scale(1); }
43
+ 50% { opacity: 0.8; transform: scale(1.05); }
44
+ }
45
+
46
+ @keyframes shimmer {
47
+ 0% { background-position: -200% 0; }
48
+ 100% { background-position: 200% 0; }
49
+ }
50
+
51
+ @keyframes ping-slow {
52
+ 0% { transform: scale(1); opacity: 1; }
53
+ 75%, 100% { transform: scale(2); opacity: 0; }
54
+ }
55
+
56
+ @keyframes blink {
57
+ 0%, 50% { opacity: 1; }
58
+ 51%, 100% { opacity: 0; }
59
+ }
60
+
61
+ @keyframes shake {
62
+ 0%, 100% { transform: translateX(0); }
63
+ 10%, 30%, 50%, 70%, 90% { transform: translateX(-4px); }
64
+ 20%, 40%, 60%, 80% { transform: translateX(4px); }
65
+ }
66
+
67
+ @keyframes heartbeat {
68
+ 0%, 100% { transform: scale(1); }
69
+ 14% { transform: scale(1.1); }
70
+ 28% { transform: scale(1); }
71
+ 42% { transform: scale(1.1); }
72
+ 70% { transform: scale(1); }
73
+ }
74
+
75
+ @keyframes bar-grow {
76
+ from { transform: scaleX(0); transform-origin: left; }
77
+ to { transform: scaleX(1); transform-origin: left; }
78
+ }
79
+
80
+ @keyframes log-slide-in {
81
+ from { opacity: 0; transform: translateY(-10px); }
82
+ to { opacity: 1; transform: translateY(0); }
83
+ }
84
+
85
+ /* Animation Utilities */
86
+ .animate-fade-in-up { animation: fade-in-up 0.8s var(--ease-out-expo) forwards; }
87
+ .animate-fade-in-down { animation: fade-in-down 0.8s var(--ease-out-expo) forwards; }
88
+ .animate-fade-in-scale { animation: fade-in-scale 0.6s var(--ease-out-expo) forwards; }
89
+ .animate-slide-in-left { animation: slide-in-left 0.8s var(--ease-out-expo) forwards; }
90
+ .animate-slide-in-right { animation: slide-in-right 0.8s var(--ease-out-expo) forwards; }
91
+ .animate-float { animation: float 6s ease-in-out infinite; }
92
+ .animate-float-slow { animation: float-slow 8s ease-in-out infinite; }
93
+ .animate-pulse-glow { animation: pulse-glow 3s ease-in-out infinite; }
94
+ .animate-shimmer {
95
+ background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.4) 50%, transparent 100%);
96
+ background-size: 200% 100%;
97
+ animation: shimmer 2s infinite;
98
+ }
99
+ .animate-ping-slow { animation: ping-slow 2s cubic-bezier(0, 0, 0.2, 1) infinite; }
100
+ .animate-blink { animation: blink 1s step-end infinite; }
101
+ .animate-shake { animation: shake 0.5s ease-in-out; }
102
+ .animate-heartbeat { animation: heartbeat 1.5s ease-in-out infinite; }
103
+ .animate-bar-grow { animation: bar-grow 1s var(--ease-out-expo) forwards; }
104
+
105
+ /* Scroll-Triggered Animations */
106
+ .scroll-animate {
107
+ opacity: 0;
108
+ transform: translateY(40px);
109
+ transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
110
+ }
111
+ .scroll-animate.is-visible { opacity: 1; transform: translateY(0); }
112
+
113
+ .scroll-animate-left {
114
+ opacity: 0;
115
+ transform: translateX(-60px);
116
+ transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
117
+ }
118
+ .scroll-animate-left.is-visible { opacity: 1; transform: translateX(0); }
119
+
120
+ .scroll-animate-right {
121
+ opacity: 0;
122
+ transform: translateX(60px);
123
+ transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
124
+ }
125
+ .scroll-animate-right.is-visible { opacity: 1; transform: translateX(0); }
126
+
127
+ .scroll-animate-scale {
128
+ opacity: 0;
129
+ transform: scale(0.9);
130
+ transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
131
+ }
132
+ .scroll-animate-scale.is-visible { opacity: 1; transform: scale(1); }
133
+
134
+ /* Stagger Delays */
135
+ .stagger > *:nth-child(1) { transition-delay: 0ms; }
136
+ .stagger > *:nth-child(2) { transition-delay: 100ms; }
137
+ .stagger > *:nth-child(3) { transition-delay: 200ms; }
138
+ .stagger > *:nth-child(4) { transition-delay: 300ms; }
139
+ .stagger > *:nth-child(5) { transition-delay: 400ms; }
140
+ .stagger > *:nth-child(6) { transition-delay: 500ms; }
141
+ .stagger > *:nth-child(7) { transition-delay: 600ms; }
142
+ .stagger > *:nth-child(8) { transition-delay: 700ms; }
143
+
144
+ /* Animation Delays */
145
+ .delay-100 { animation-delay: 100ms; }
146
+ .delay-200 { animation-delay: 200ms; }
147
+ .delay-300 { animation-delay: 300ms; }
148
+ .delay-400 { animation-delay: 400ms; }
149
+ .delay-500 { animation-delay: 500ms; }
150
+ .delay-600 { animation-delay: 600ms; }
151
+ .delay-700 { animation-delay: 700ms; }
152
+ .delay-800 { animation-delay: 800ms; }
153
+
154
+ /* Reduced Motion */
155
+ @media (prefers-reduced-motion: reduce) {
156
+ *,
157
+ *::before,
158
+ *::after {
159
+ animation-duration: 0.01ms !important;
160
+ animation-iteration-count: 1 !important;
161
+ transition-duration: 0.01ms !important;
162
+ }
163
+
164
+ .scroll-animate,
165
+ .scroll-animate-left,
166
+ .scroll-animate-right,
167
+ .scroll-animate-scale {
168
+ opacity: 1;
169
+ transform: none;
170
+ }
171
+ }
@@ -0,0 +1,23 @@
1
+ /* ============================================
2
+ BRAINZLAB UI - BASE
3
+ ============================================
4
+ Anthropic/Claude-inspired design system
5
+
6
+ Usage:
7
+ @import "tailwindcss";
8
+ @import "brainzlab_ui/base";
9
+
10
+ Note: Import tailwindcss BEFORE this file
11
+ */
12
+
13
+ /* Design Tokens */
14
+ @import "./tokens.css";
15
+
16
+ /* Component Styles */
17
+ @import "./components.css";
18
+
19
+ /* Animations */
20
+ @import "./animations.css";
21
+
22
+ /* Utilities */
23
+ @import "./utilities.css";