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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 13d80bf67037932fc8c3745319d2f23d7d5a510ae7775cd6276b303a52fec8e4
4
- data.tar.gz: 8b1606fd13965a96ae121fd2e973d6c8d67a6f158f1eefc6eeecded170b432bb
3
+ metadata.gz: ced860d47f714cff879f54a05c2a6112355dd19a869c5617a5745a6854b9ac51
4
+ data.tar.gz: 3adfd42c848fbad199823d3fcaf0dfc921351a1207269e71e3448d591de99a34
5
5
  SHA512:
6
- metadata.gz: aecbb45750388fd87c6c4704f84357f339f3919c878dec39f98c004d2fa0b8ec1826199e93a7c54ffc78cc46dcf21a6174b1f7e3976d4e1fa1569103111011ce
7
- data.tar.gz: d7be25d5b9c9115441dd47297e014f64ea468177baa3088155a0b0ad9e6581b578b0e6b68e4dd1ce0291fea53b0589d780d92f6c28fe1ae6f01a1f7aa75a47b4
6
+ metadata.gz: 893d62a6ab85948cfa57ad750ad2500cbed699b8475c0323a3fd1560d7e81fb17da95a4d812a1af638e50e7378bad4003e8871e6401c2230adac66fbbe124700
7
+ data.tar.gz: bc731eec65e86c209bf4ac4558e409be3535610b391609b2bb242422070c5cca366ea2ca7960ccdcfb722887398823529c55672229e1040bc265e6f14661d4f0
data/LICENSE CHANGED
@@ -1,21 +1,11 @@
1
- MIT License
1
+ OSAaSy License
2
2
 
3
- Copyright (c) 2024 Brainz Lab
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
- 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.
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
- # Brainzlab UI
1
+ # BrainzLab UI
2
2
 
3
- Unified design system for Brainz Lab products. Anthropic/Claude-inspired design with Phlex components and Tailwind CSS.
3
+ Unified design system for BrainzLab products with Phlex components and Tailwind CSS.
4
+
5
+ [![CI](https://github.com/brainz-lab/brainzlab-ui/actions/workflows/ci.yml/badge.svg)](https://github.com/brainz-lab/brainzlab-ui/actions/workflows/ci.yml)
6
+ [![CodeQL](https://github.com/brainz-lab/brainzlab-ui/actions/workflows/codeql.yml/badge.svg)](https://github.com/brainz-lab/brainzlab-ui/actions/workflows/codeql.yml)
7
+ [![codecov](https://codecov.io/gh/brainz-lab/brainzlab-ui/graph/badge.svg)](https://codecov.io/gh/brainz-lab/brainzlab-ui)
8
+ [![Gem Version](https://badge.fury.io/rb/brainzlab-ui.svg)](https://rubygems.org/gems/brainzlab-ui)
9
+ [![License: OSAaSy](https://img.shields.io/badge/License-OSAaSy-blue.svg)](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
- ## CSS Setup
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
- ## Design Tokens
88
+ ### Available Components
50
89
 
51
- ### Colors
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
- | Token | Value | Usage |
54
- |-------|-------|-------|
55
- | `--color-primary-500` | #D97706 | Anthropic orange |
56
- | `--color-cream-50` | #FAFAF9 | Background |
57
- | `--color-ink-900` | #1C1917 | Text |
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
- ### Typography
139
+ ## Contributing
60
140
 
61
- - **Sans**: Inter, system-ui
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: -200% 0; }
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 {
@@ -21,3 +21,6 @@
21
21
 
22
22
  /* Utilities */
23
23
  @import "./utilities.css";
24
+
25
+ /* Dark Mode */
26
+ @import "./dark-mode.css";