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.
@@ -3,7 +3,7 @@
3
3
  module Brainzlab
4
4
  module Components
5
5
  class NavItem < Base
6
- def initialize(href: "#", active: false, **attrs)
6
+ def initialize(href: '#', active: false, **attrs)
7
7
  @href = href
8
8
  @active = active
9
9
  @attrs = attrs
@@ -22,8 +22,8 @@ module Brainzlab
22
22
 
23
23
  def nav_item_classes
24
24
  classes(
25
- "nav-item",
26
- @active ? "active" : nil,
25
+ 'nav-item',
26
+ @active ? 'active' : nil,
27
27
  @attrs[:class]
28
28
  )
29
29
  end
@@ -12,12 +12,10 @@ module Brainzlab
12
12
  end
13
13
 
14
14
  def view_template
15
- div(class: classes("stat-card", @attrs[:class]), **@attrs.except(:class)) do
16
- div(class: "stat-label") { @label }
17
- div(class: "stat-value") { @value }
18
- if @change
19
- span(class: change_classes) { @change }
20
- end
15
+ div(class: classes('stat-card', @attrs[:class]), **@attrs.except(:class)) do
16
+ div(class: 'stat-label') { @label }
17
+ div(class: 'stat-value') { @value }
18
+ span(class: change_classes) { @change } if @change
21
19
  end
22
20
  end
23
21
 
@@ -25,9 +23,9 @@ module Brainzlab
25
23
 
26
24
  def change_classes
27
25
  classes(
28
- "stat-change",
29
- @change_type == :positive ? "stat-change-positive" : nil,
30
- @change_type == :negative ? "stat-change-negative" : nil
26
+ 'stat-change',
27
+ @change_type == :positive ? 'stat-change-positive' : nil,
28
+ @change_type == :negative ? 'stat-change-negative' : nil
31
29
  )
32
30
  end
33
31
  end
@@ -8,8 +8,8 @@ module Brainzlab
8
8
  end
9
9
 
10
10
  def view_template(&)
11
- div(class: "table-wrapper") do
12
- table(class: classes("table", @attrs[:class]), **@attrs.except(:class), &)
11
+ div(class: 'table-wrapper') do
12
+ table(class: classes('table', @attrs[:class]), **@attrs.except(:class), &)
13
13
  end
14
14
  end
15
15
  end
@@ -5,12 +5,12 @@ module Brainzlab
5
5
  class Engine < ::Rails::Engine
6
6
  isolate_namespace Brainzlab::UI
7
7
 
8
- initializer "brainzlab_ui.assets" do |app|
8
+ initializer 'brainzlab_ui.assets' do |app|
9
9
  # Add stylesheets to the asset pipeline
10
- app.config.assets.paths << root.join("app/assets/stylesheets")
10
+ app.config.assets.paths << root.join('app/assets/stylesheets')
11
11
  end
12
12
 
13
- initializer "brainzlab_ui.phlex" do
13
+ initializer 'brainzlab_ui.phlex' do
14
14
  # Ensure Phlex components are available
15
15
  ActiveSupport.on_load(:action_view) do
16
16
  include Phlex::Rails::HelperMacros if defined?(Phlex::Rails::HelperMacros)
@@ -19,7 +19,7 @@ module Brainzlab
19
19
 
20
20
  config.to_prepare do
21
21
  # Eager load components in development
22
- Dir.glob(Brainzlab::UI.root.join("lib/brainzlab/components/*.rb")).each do |file|
22
+ Dir.glob(Brainzlab::UI.root.join('lib/brainzlab/components/*.rb')).each do |file|
23
23
  require file
24
24
  end
25
25
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Brainzlab
4
4
  module UI
5
- VERSION = "0.1.0"
5
+ VERSION = '0.1.1'
6
6
  end
7
7
  end
data/lib/brainzlab/ui.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "ui/version"
3
+ require_relative 'ui/version'
4
4
 
5
5
  module Brainzlab
6
6
  module UI
@@ -8,26 +8,26 @@ module Brainzlab
8
8
 
9
9
  class << self
10
10
  def root
11
- @root ||= Pathname.new(File.expand_path("../..", __dir__))
11
+ @root ||= Pathname.new(File.expand_path('../..', __dir__))
12
12
  end
13
13
  end
14
14
  end
15
15
 
16
16
  # Shorthand for components
17
17
  module Components
18
- autoload :Base, "brainzlab/components/base"
19
- autoload :Button, "brainzlab/components/button"
20
- autoload :Card, "brainzlab/components/card"
21
- autoload :Badge, "brainzlab/components/badge"
22
- autoload :Input, "brainzlab/components/input"
23
- autoload :Alert, "brainzlab/components/alert"
24
- autoload :Avatar, "brainzlab/components/avatar"
25
- autoload :Table, "brainzlab/components/table"
26
- autoload :NavItem, "brainzlab/components/nav_item"
27
- autoload :StatCard, "brainzlab/components/stat_card"
28
- autoload :EmptyState, "brainzlab/components/empty_state"
29
- autoload :Modal, "brainzlab/components/modal"
18
+ autoload :Base, 'brainzlab/components/base'
19
+ autoload :Button, 'brainzlab/components/button'
20
+ autoload :Card, 'brainzlab/components/card'
21
+ autoload :Badge, 'brainzlab/components/badge'
22
+ autoload :Input, 'brainzlab/components/input'
23
+ autoload :Alert, 'brainzlab/components/alert'
24
+ autoload :Avatar, 'brainzlab/components/avatar'
25
+ autoload :Table, 'brainzlab/components/table'
26
+ autoload :NavItem, 'brainzlab/components/nav_item'
27
+ autoload :StatCard, 'brainzlab/components/stat_card'
28
+ autoload :EmptyState, 'brainzlab/components/empty_state'
29
+ autoload :Modal, 'brainzlab/components/modal'
30
30
  end
31
31
  end
32
32
 
33
- require_relative "ui/engine" if defined?(Rails::Engine)
33
+ require_relative 'ui/engine' if defined?(Rails::Engine)
data/lib/brainzlab-ui.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "brainzlab/ui"
3
+ require_relative 'brainzlab/ui'
data/lib/brainzlab_ui.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "brainzlab/ui"
3
+ require_relative 'brainzlab/ui'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: brainzlab-ui
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brainz Lab
@@ -93,6 +93,7 @@ files:
93
93
  - app/assets/stylesheets/brainzlab_ui/animations.css
94
94
  - app/assets/stylesheets/brainzlab_ui/base.css
95
95
  - app/assets/stylesheets/brainzlab_ui/components.css
96
+ - app/assets/stylesheets/brainzlab_ui/dark-mode.css
96
97
  - app/assets/stylesheets/brainzlab_ui/tokens.css
97
98
  - app/assets/stylesheets/brainzlab_ui/utilities.css
98
99
  - lib/brainzlab-ui.rb
@@ -119,6 +120,7 @@ metadata:
119
120
  homepage_uri: https://github.com/brainzlab/brainzlab-ui
120
121
  source_code_uri: https://github.com/brainzlab/brainzlab-ui
121
122
  changelog_uri: https://github.com/brainzlab/brainzlab-ui/blob/main/CHANGELOG.md
123
+ rubygems_mfa_required: 'true'
122
124
  rdoc_options: []
123
125
  require_paths:
124
126
  - lib