brainzlab-ui 0.1.0 → 0.1.1
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 +4 -4
- data/LICENSE +7 -17
- data/README.md +92 -14
- data/app/assets/stylesheets/brainzlab_ui/animations.css +11 -2
- data/app/assets/stylesheets/brainzlab_ui/base.css +3 -0
- data/app/assets/stylesheets/brainzlab_ui/components.css +504 -11
- data/app/assets/stylesheets/brainzlab_ui/dark-mode.css +317 -0
- data/app/assets/stylesheets/brainzlab_ui/tokens.css +170 -19
- data/app/assets/stylesheets/brainzlab_ui/utilities.css +319 -4
- data/lib/brainzlab/components/alert.rb +6 -6
- data/lib/brainzlab/components/avatar.rb +10 -9
- data/lib/brainzlab/components/badge.rb +7 -7
- data/lib/brainzlab/components/base.rb +2 -2
- data/lib/brainzlab/components/button.rb +8 -8
- data/lib/brainzlab/components/card.rb +6 -6
- data/lib/brainzlab/components/empty_state.rb +5 -11
- data/lib/brainzlab/components/input.rb +8 -8
- data/lib/brainzlab/components/modal.rb +10 -10
- data/lib/brainzlab/components/nav_item.rb +3 -3
- data/lib/brainzlab/components/stat_card.rb +7 -9
- data/lib/brainzlab/components/table.rb +2 -2
- data/lib/brainzlab/ui/engine.rb +4 -4
- data/lib/brainzlab/ui/version.rb +1 -1
- data/lib/brainzlab/ui.rb +15 -15
- data/lib/brainzlab-ui.rb +1 -1
- data/lib/brainzlab_ui.rb +1 -1
- metadata +3 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ced860d47f714cff879f54a05c2a6112355dd19a869c5617a5745a6854b9ac51
|
|
4
|
+
data.tar.gz: 3adfd42c848fbad199823d3fcaf0dfc921351a1207269e71e3448d591de99a34
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 893d62a6ab85948cfa57ad750ad2500cbed699b8475c0323a3fd1560d7e81fb17da95a4d812a1af638e50e7378bad4003e8871e6401c2230adac66fbbe124700
|
|
7
|
+
data.tar.gz: bc731eec65e86c209bf4ac4558e409be3535610b391609b2bb242422070c5cca366ea2ca7960ccdcfb722887398823529c55672229e1040bc265e6f14661d4f0
|
data/LICENSE
CHANGED
|
@@ -1,21 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
OSAaSy License
|
|
2
2
|
|
|
3
|
-
Copyright
|
|
3
|
+
Copyright © 2025, Brainz Lab.
|
|
4
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:
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
11
6
|
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
7
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
14
8
|
|
|
15
|
-
|
|
16
|
-
|
|
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.
|
|
9
|
+
No licensee or downstream recipient may use the Software (including any modified or derivative versions) to directly compete with the original Licensor by offering it to third parties as a hosted, managed, or Software-as-a-Service (SaaS) product or cloud service where the primary value of the service is the functionality of the Software itself.
|
|
10
|
+
|
|
11
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
CHANGED
|
@@ -1,6 +1,22 @@
|
|
|
1
|
-
#
|
|
1
|
+
# BrainzLab UI
|
|
2
2
|
|
|
3
|
-
Unified design system for
|
|
3
|
+
Unified design system for BrainzLab products with Phlex components and Tailwind CSS.
|
|
4
|
+
|
|
5
|
+
[](https://github.com/brainz-lab/brainzlab-ui/actions/workflows/ci.yml)
|
|
6
|
+
[](https://github.com/brainz-lab/brainzlab-ui/actions/workflows/codeql.yml)
|
|
7
|
+
[](https://codecov.io/gh/brainz-lab/brainzlab-ui)
|
|
8
|
+
[](https://rubygems.org/gems/brainzlab-ui)
|
|
9
|
+
[](LICENSE)
|
|
10
|
+
|
|
11
|
+
## Quick Start
|
|
12
|
+
|
|
13
|
+
```ruby
|
|
14
|
+
# Gemfile
|
|
15
|
+
gem "brainzlab-ui"
|
|
16
|
+
|
|
17
|
+
# In your view
|
|
18
|
+
<%= render Brainzlab::Components::Button.new(variant: :primary) { "Save" } %>
|
|
19
|
+
```
|
|
4
20
|
|
|
5
21
|
## Installation
|
|
6
22
|
|
|
@@ -15,7 +31,7 @@ else
|
|
|
15
31
|
end
|
|
16
32
|
```
|
|
17
33
|
|
|
18
|
-
|
|
34
|
+
### CSS Setup
|
|
19
35
|
|
|
20
36
|
Import the design system in your Tailwind CSS file:
|
|
21
37
|
|
|
@@ -26,12 +42,35 @@ Import the design system in your Tailwind CSS file:
|
|
|
26
42
|
/* Your project-specific overrides below */
|
|
27
43
|
```
|
|
28
44
|
|
|
45
|
+
## Configuration
|
|
46
|
+
|
|
47
|
+
The design system follows Anthropic/Claude-inspired aesthetics with warm earth tones.
|
|
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
|
+
| Font | Stack | Usage |
|
|
62
|
+
|------|-------|-------|
|
|
63
|
+
| Sans | Inter, system-ui | Body text |
|
|
64
|
+
| Serif | Source Serif 4, Georgia | Headlines |
|
|
65
|
+
| Mono | JetBrains Mono, ui-monospace | Code |
|
|
66
|
+
|
|
29
67
|
## Usage
|
|
30
68
|
|
|
31
69
|
### Phlex Components
|
|
32
70
|
|
|
33
71
|
```erb
|
|
34
72
|
<%= render Brainzlab::Components::Button.new(variant: :primary) { "Save" } %>
|
|
73
|
+
<%= render Brainzlab::Components::Button.new(variant: :secondary) { "Cancel" } %>
|
|
35
74
|
<%= render Brainzlab::Components::Card.new { "Content" } %>
|
|
36
75
|
<%= render Brainzlab::Components::Badge.new(variant: :success) { "Active" } %>
|
|
37
76
|
<%= render Brainzlab::Components::Alert.new(type: :info) { "Note..." } %>
|
|
@@ -46,21 +85,60 @@ Import the design system in your Tailwind CSS file:
|
|
|
46
85
|
<span class="badge badge-success">Active</span>
|
|
47
86
|
```
|
|
48
87
|
|
|
49
|
-
|
|
88
|
+
### Available Components
|
|
50
89
|
|
|
51
|
-
|
|
90
|
+
| Component | Variants |
|
|
91
|
+
|-----------|----------|
|
|
92
|
+
| **Button** | primary, secondary, ghost, danger |
|
|
93
|
+
| **Card** | default, bordered, elevated |
|
|
94
|
+
| **Badge** | default, success, warning, error, info |
|
|
95
|
+
| **Alert** | info, success, warning, error |
|
|
96
|
+
| **Input** | text, email, password, number |
|
|
97
|
+
| **Select** | default, multi |
|
|
98
|
+
| **Modal** | default, large, fullscreen |
|
|
99
|
+
| **Table** | default, striped, compact |
|
|
100
|
+
| **Tabs** | default, pills |
|
|
52
101
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
102
|
+
## API Reference
|
|
103
|
+
|
|
104
|
+
### Button
|
|
105
|
+
|
|
106
|
+
```ruby
|
|
107
|
+
Brainzlab::Components::Button.new(
|
|
108
|
+
variant: :primary, # :primary, :secondary, :ghost, :danger
|
|
109
|
+
size: :md, # :sm, :md, :lg
|
|
110
|
+
disabled: false,
|
|
111
|
+
type: :button # :button, :submit, :reset
|
|
112
|
+
)
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
### Card
|
|
116
|
+
|
|
117
|
+
```ruby
|
|
118
|
+
Brainzlab::Components::Card.new(
|
|
119
|
+
variant: :default, # :default, :bordered, :elevated
|
|
120
|
+
padding: :md # :none, :sm, :md, :lg
|
|
121
|
+
)
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
### Badge
|
|
125
|
+
|
|
126
|
+
```ruby
|
|
127
|
+
Brainzlab::Components::Badge.new(
|
|
128
|
+
variant: :default, # :default, :success, :warning, :error, :info
|
|
129
|
+
size: :md # :sm, :md, :lg
|
|
130
|
+
)
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
Full documentation: [docs.brainzlab.ai/ui](https://docs.brainzlab.ai/ui/overview)
|
|
134
|
+
|
|
135
|
+
## Self-Hosting
|
|
136
|
+
|
|
137
|
+
When self-hosting BrainzLab products, the UI gem is automatically included as a dependency.
|
|
58
138
|
|
|
59
|
-
|
|
139
|
+
## Contributing
|
|
60
140
|
|
|
61
|
-
|
|
62
|
-
- **Serif**: Source Serif 4, Georgia
|
|
63
|
-
- **Mono**: JetBrains Mono, ui-monospace
|
|
141
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md) for development setup and contribution guidelines.
|
|
64
142
|
|
|
65
143
|
## License
|
|
66
144
|
|
|
@@ -44,8 +44,17 @@
|
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
@keyframes shimmer {
|
|
47
|
-
0% { background-position:
|
|
48
|
-
100% { background-position: 200% 0; }
|
|
47
|
+
0% { background-position: 200% 0; }
|
|
48
|
+
100% { background-position: -200% 0; }
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
@keyframes pulse {
|
|
52
|
+
0%, 100% { opacity: 1; }
|
|
53
|
+
50% { opacity: 0.5; }
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
@keyframes spin {
|
|
57
|
+
to { transform: rotate(360deg); }
|
|
49
58
|
}
|
|
50
59
|
|
|
51
60
|
@keyframes ping-slow {
|