wilday_ui 0.1.0 → 0.2.0
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/README.md +3 -4
- data/app/assets/stylesheets/wilday_ui/button.css +15 -0
- data/app/helpers/wilday_ui/components/button_helper.rb +4 -0
- data/app/views/wilday_ui/_button.html.erb +7 -1
- data/lib/wilday_ui/version.rb +1 -1
- metadata +1 -2
- data/MIT-LICENSE +0 -20
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f7ffc8c90a797d359b3cc6d09b0361b7fa6ff5e46d3777e0234befc758054f6a
|
4
|
+
data.tar.gz: c978c1985d1e399dcec8b381ea03ba00a4dad6981787b0acdb4e19ca512fe648
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 475ef6c2763c0f9a9d08653dd6f614a60c0974b574d2ceccaecdb2195ec4f8f36823aa1d764c1438824a3bd1f614ef4c68a04f4448b5b5d4d065115fe73fd2a6
|
7
|
+
data.tar.gz: 8d504d1ce4999742555579a45436e8cced42808a305f615bd35532acc3800629c156e32e367525b1dbd38032fb2fef88ead1e2eb9368c25413baf094fa772bba
|
data/README.md
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
# Wilday UI
|
2
2
|
|
3
|
-
Wilday UI is a simple, customizable UI component library for Ruby on Rails projects. It includes ready-to-use components such as buttons with customizable styles, sizes, and
|
3
|
+
Wilday UI is a simple, customizable UI component library for Ruby on Rails projects. It includes ready-to-use components such as buttons with customizable styles, sizes, and radius, making it easy to create beautiful, consistent UI elements.
|
4
4
|
|
5
5
|
---
|
6
6
|
|
7
7
|
## Features
|
8
8
|
|
9
9
|
- Prebuilt, customizable button component
|
10
|
-
- Flexible variants, sizes, and border
|
10
|
+
- Flexible variants, sizes, and border radius
|
11
11
|
- Easy integration with Rails as an engine
|
12
12
|
|
13
13
|
---
|
@@ -17,6 +17,7 @@ Wilday UI is a simple, customizable UI component library for Ruby on Rails proje
|
|
17
17
|
1. **Flexibility**: Users can style component without being restricted to predefined classes.
|
18
18
|
2. **Extensibility**: Users can add attributes or integrate component with JavaScript, analytics, or accessibility tools.
|
19
19
|
3. **Framework Integration**: Supports utility classes from frameworks like Bootstrap or Tailwind.
|
20
|
+
4. **Library Integration**: Support to use with other libraries like Font Awesome, Bootstrap Icons, etc.
|
20
21
|
|
21
22
|
## Installation
|
22
23
|
|
@@ -99,5 +100,3 @@ Contributions are welcome! If you’d like to help improve Wilday UI, feel free
|
|
99
100
|
Wilday UI is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
100
101
|
|
101
102
|
---
|
102
|
-
|
103
|
-
This version makes the README user-friendly and focused on practical usage, while being concise for developers exploring the gem. Let me know if you’d like further tweaks! 🚀
|
@@ -75,3 +75,18 @@
|
|
75
75
|
.w-button-square {
|
76
76
|
border-radius: 0; /* No rounding */
|
77
77
|
}
|
78
|
+
|
79
|
+
/* Icon Button Styles */
|
80
|
+
.w-button-icon-left {
|
81
|
+
margin-right: 0.5rem;
|
82
|
+
}
|
83
|
+
|
84
|
+
.w-button-icon-right {
|
85
|
+
margin-left: 0.5rem;
|
86
|
+
}
|
87
|
+
|
88
|
+
.w-button-icon-left,
|
89
|
+
.w-button-icon-right {
|
90
|
+
display: inline-flex;
|
91
|
+
align-items: center;
|
92
|
+
}
|
@@ -6,6 +6,8 @@ module WildayUi
|
|
6
6
|
variant: :primary,
|
7
7
|
size: :medium,
|
8
8
|
radius: :rounded,
|
9
|
+
icon: nil,
|
10
|
+
icon_position: :left,
|
9
11
|
disabled: false,
|
10
12
|
additional_classes: "",
|
11
13
|
**options
|
@@ -35,6 +37,8 @@ module WildayUi
|
|
35
37
|
variant_class: variant_class,
|
36
38
|
size_class: size_class,
|
37
39
|
radius_class: radius_class,
|
40
|
+
icon: icon,
|
41
|
+
icon_position: icon_position,
|
38
42
|
additional_classes: additional_classes,
|
39
43
|
disabled: disabled,
|
40
44
|
attributes: options.map { |key, value| "#{key}='#{value}'" }.join(" ")
|
@@ -3,5 +3,11 @@
|
|
3
3
|
<%= attributes %>
|
4
4
|
<%= "disabled" if disabled %>
|
5
5
|
>
|
6
|
+
<% if icon_position == :left && icon.present? %>
|
7
|
+
<i class="w-button-icon-left <%= icon %>"></i>
|
8
|
+
<% end %>
|
6
9
|
<%= content %>
|
7
|
-
|
10
|
+
<% if icon_position == :right && icon.present? %>
|
11
|
+
<i class="w-button-icon-right <%= icon %>"></i>
|
12
|
+
<% end %>
|
13
|
+
</button>
|
data/lib/wilday_ui/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wilday_ui
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- davidwinalda
|
@@ -37,7 +37,6 @@ executables: []
|
|
37
37
|
extensions: []
|
38
38
|
extra_rdoc_files: []
|
39
39
|
files:
|
40
|
-
- MIT-LICENSE
|
41
40
|
- README.md
|
42
41
|
- Rakefile
|
43
42
|
- app/assets/builds/index.css
|
data/MIT-LICENSE
DELETED
@@ -1,20 +0,0 @@
|
|
1
|
-
Copyright davidwinalda
|
2
|
-
|
3
|
-
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
-
a copy of this software and associated documentation files (the
|
5
|
-
"Software"), to deal in the Software without restriction, including
|
6
|
-
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
-
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
-
permit persons to whom the Software is furnished to do so, subject to
|
9
|
-
the following conditions:
|
10
|
-
|
11
|
-
The above copyright notice and this permission notice shall be
|
12
|
-
included in all copies or substantial portions of the Software.
|
13
|
-
|
14
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
-
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
-
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
-
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
-
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|