flowbite-components 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: 8801080d6b51d7c4fef754dcd189ebaea34c8dd17a496c7dda80eb31e37f9737
4
- data.tar.gz: a50284e6b62c7713edbaadec851d34ec87ad698986431ca407539c9282033928
3
+ metadata.gz: 2f32fb05b632e935c29d9f6a9a62fafa1d29ee13f80b9edf28040067a2a4fa54
4
+ data.tar.gz: 59eda6515de3eba70480afc5cea58687eaddaa453f8db7949ab5ae2f67288862
5
5
  SHA512:
6
- metadata.gz: 894c82db7d448e8a444e4fb3df781e0ccea35df068ae5711d358e83d3651dfc30e2b086e55dcfd8afabd5d84db5f777b1dd0fc497382cab1531f0dcf6623ab3f
7
- data.tar.gz: cd0bb587980b19ff4d4b6ec9f6cfad3d3ec42a624a87f2a88f28eafd77608956a3cd2d3de6135c1b118ab0f85505a8c390dc0e6be53a548ef794e0aeb3bb228e
6
+ metadata.gz: 1e00a5308ab23bc68e6946fb6c068f01e91773c6dc3b37454fb5057d9b35268303001ba6135a4c77d746006dea9ebafa8962e34dab14e8ff9b511533272bbd3a
7
+ data.tar.gz: 2626ad66e9db0b6f910b0ea879464216da51a21cc6c31b5218746fdd84fd5fccbd3c350f60a0224cbdc833ee47cd4f64b5624b9e63aee18a73e3dda389ab0400
data/CHANGELOG.md CHANGED
@@ -10,6 +10,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
10
10
  * Button component (first component, wee!)
11
11
  * Input components
12
12
  * InputField components
13
+ * Basic Card component
13
14
 
14
15
  ### Changes
15
16
 
data/README.md CHANGED
@@ -1,11 +1,11 @@
1
- # Flowbite ViewComponents
1
+ # Flowbite Components
2
2
 
3
- [![Gem Version](https://badge.fury.io/rb/flowbite-view_components.svg)](https://rubygems.org/gems/flowbite-view_components)
4
- [![Ruby Tests](https://github.com/substancelab/flowbite-view_components/workflows/Ruby/badge.svg)](https://github.com/substancelab/flowbite-view_components/actions)
3
+ [![Gem Version](https://badge.fury.io/rb/flowbite-components.svg)](https://rubygems.org/gems/flowbite-components)
4
+ [![Ruby Tests](https://github.com/substancelab/flowbite-components/workflows/Ruby/badge.svg)](https://github.com/substancelab/flowbite-components/actions)
5
5
 
6
6
  Unofficial, open source implementation of [Flowbite](https://flowbite.com/) components for Rails applications, built using [ViewComponent](https://viewcomponent.org/).
7
7
 
8
- Flowbite ViewComponents provides a comprehensive library of UI components following the Flowbite design system, implemented as Rails ViewComponents with full Tailwind CSS integration and dark mode support.
8
+ Flowbite Components provides a comprehensive library of UI components following the Flowbite design system, implemented as Rails ViewComponents with full Tailwind CSS integration and dark mode support.
9
9
 
10
10
  ## Features
11
11
 
@@ -22,7 +22,7 @@ Flowbite ViewComponents provides a comprehensive library of UI components follow
22
22
  Add the gem to your application's Gemfile:
23
23
 
24
24
  ```ruby
25
- gem 'flowbite-view_components'
25
+ gem 'flowbite-components'
26
26
  ```
27
27
 
28
28
  Then execute:
@@ -52,7 +52,7 @@ Add Flowbite to your Tailwind CSS configuration. In your `app/assets/tailwind/ap
52
52
  ```css
53
53
  @import "flowbite/src/themes/default";
54
54
  @plugin "flowbite/plugin";
55
- @import "../builds/tailwind/flowbite_view_components";
55
+ @import "../builds/tailwind/flowbite_components";
56
56
  ```
57
57
 
58
58
  ## Usage examples
@@ -147,6 +147,33 @@ Add Flowbite to your Tailwind CSS configuration. In your `app/assets/tailwind/ap
147
147
  ) %>
148
148
  ```
149
149
 
150
+ ## How to customize components
151
+
152
+ ### Add specific CSS classes
153
+
154
+ A common use case for customizing a component is to add more CSS classes when
155
+ rendering it, fx to change the size or spacing. flowbite-components is optimized
156
+ for this case and all you need to do is specify the extra classes:
157
+
158
+ ```erb
159
+ <%= render(Flowbite::Card.new(class: "w-full my-8")) { "Content" } %>
160
+ ```
161
+ renders
162
+ ```html
163
+ <div class="... all the usual classes... w-full my-8">
164
+ ```
165
+
166
+ If you want to fully replace the existing classes, you can pass an entirely new
167
+ `class` attribute via options:
168
+
169
+ ```erb
170
+ <%= render(Flowbite::Card.new(options: {class: "w-full my-8"})) { "Content" } %>
171
+ ```
172
+ renders
173
+ ```html
174
+ <div class="w-full my-8">
175
+ ```
176
+
150
177
  ## Available Components
151
178
 
152
179
  ### Form Components
@@ -223,7 +250,7 @@ This library includes Lookbook previews for all components. To view them:
223
250
 
224
251
  ## Contributing
225
252
 
226
- Bug reports and pull requests are welcome on GitHub at [https://github.com/substancelab/flowbite-view_components](https://github.com/substancelab/flowbite-view_components).
253
+ Bug reports and pull requests are welcome on GitHub at [https://github.com/substancelab/flowbite-components](https://github.com/substancelab/flowbite-components).
227
254
 
228
255
  ### Development Guidelines
229
256
 
@@ -1,9 +1,9 @@
1
1
  require "rails/engine"
2
2
 
3
3
  module Flowbite
4
- module ViewComponents
4
+ module Components
5
5
  class Engine < ::Rails::Engine
6
- isolate_namespace Flowbite::ViewComponents
6
+ isolate_namespace Flowbite::Components
7
7
 
8
8
  config.autoload_paths = [
9
9
  "#{root}/app/components"
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Flowbite
4
- module ViewComponents
5
- VERSION = "0.1.0"
4
+ module Components
5
+ VERSION = "0.1.1"
6
6
  end
7
7
  end
@@ -1,12 +1,12 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "view_components/engine"
4
- require_relative "view_components/version"
3
+ require_relative "components/engine"
4
+ require_relative "components/version"
5
5
 
6
6
  require "view_component"
7
7
 
8
8
  module Flowbite
9
- module ViewComponents
9
+ module Components
10
10
  class Error < StandardError; end
11
11
  # Your code goes here...
12
12
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flowbite-components
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
  - Jakob Skjerning
@@ -23,7 +23,8 @@ dependencies:
23
23
  - - ">="
24
24
  - !ruby/object:Gem::Version
25
25
  version: 4.0.0
26
- description: A library of Flowbite View Components to be used in Rails applications.
26
+ description: A library of View Components based on the Flowbite design system to be
27
+ used in Rails applications.
27
28
  email:
28
29
  - jakob@mentalized.net
29
30
  executables: []
@@ -33,16 +34,16 @@ files:
33
34
  - CHANGELOG.md
34
35
  - LICENSE
35
36
  - README.md
36
- - lib/flowbite/view_components.rb
37
- - lib/flowbite/view_components/engine.rb
38
- - lib/flowbite/view_components/version.rb
39
- homepage: https://github.com/substancelab/flowbite-view_components
37
+ - lib/flowbite/components.rb
38
+ - lib/flowbite/components/engine.rb
39
+ - lib/flowbite/components/version.rb
40
+ homepage: https://github.com/substancelab/flowbite-components
40
41
  licenses: []
41
42
  metadata:
42
43
  allowed_push_host: https://rubygems.org/
43
- homepage_uri: https://github.com/substancelab/flowbite-view_components
44
- source_code_uri: https://github.com/substancelab/flowbite-view_components
45
- changelog_uri: https://github.com/substancelab/flowbite-view_components/blob/main/CHANGELOG.md
44
+ homepage_uri: https://github.com/substancelab/flowbite-components
45
+ source_code_uri: https://github.com/substancelab/flowbite-components
46
+ changelog_uri: https://github.com/substancelab/flowbite-components/blob/main/CHANGELOG.md
46
47
  rdoc_options: []
47
48
  require_paths:
48
49
  - lib
@@ -59,5 +60,5 @@ required_rubygems_version: !ruby/object:Gem::Requirement
59
60
  requirements: []
60
61
  rubygems_version: 3.6.9
61
62
  specification_version: 4
62
- summary: Flowbite components for Rails applications
63
+ summary: ViewComponents using the Flowbite design system
63
64
  test_files: []