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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2f32fb05b632e935c29d9f6a9a62fafa1d29ee13f80b9edf28040067a2a4fa54
|
4
|
+
data.tar.gz: 59eda6515de3eba70480afc5cea58687eaddaa453f8db7949ab5ae2f67288862
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1e00a5308ab23bc68e6946fb6c068f01e91773c6dc3b37454fb5057d9b35268303001ba6135a4c77d746006dea9ebafa8962e34dab14e8ff9b511533272bbd3a
|
7
|
+
data.tar.gz: 2626ad66e9db0b6f910b0ea879464216da51a21cc6c31b5218746fdd84fd5fccbd3c350f60a0224cbdc833ee47cd4f64b5624b9e63aee18a73e3dda389ab0400
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -1,11 +1,11 @@
|
|
1
|
-
# Flowbite
|
1
|
+
# Flowbite Components
|
2
2
|
|
3
|
-
[](https://rubygems.org/gems/flowbite-components)
|
4
|
+
[](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
|
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-
|
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/
|
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-
|
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
|
4
|
+
module Components
|
5
5
|
class Engine < ::Rails::Engine
|
6
|
-
isolate_namespace Flowbite::
|
6
|
+
isolate_namespace Flowbite::Components
|
7
7
|
|
8
8
|
config.autoload_paths = [
|
9
9
|
"#{root}/app/components"
|
@@ -1,12 +1,12 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require_relative "
|
4
|
-
require_relative "
|
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
|
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.
|
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
|
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/
|
37
|
-
- lib/flowbite/
|
38
|
-
- lib/flowbite/
|
39
|
-
homepage: https://github.com/substancelab/flowbite-
|
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-
|
44
|
-
source_code_uri: https://github.com/substancelab/flowbite-
|
45
|
-
changelog_uri: https://github.com/substancelab/flowbite-
|
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:
|
63
|
+
summary: ViewComponents using the Flowbite design system
|
63
64
|
test_files: []
|