keystone_ui 0.12.1 → 0.12.2
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: 702c1e314aec36dbb95ed4f5541c4bdab916eba0e92f19a85f74ff641ed183f0
|
|
4
|
+
data.tar.gz: 0252fa96678cb96ab89cae69ad368cc5139ef30ea3c2f8c4ffdfe880a1e511e9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9e8be46029fad363c665045bec462c689ceeec5c5b31a4cdec2de99e1a0f661506d8dcc09585d4a1457c201174de5f46ff9bd730524fba0506b0403b28bf4bff
|
|
7
|
+
data.tar.gz: 22301b268679a53f5c128a1ef20b921cddedf8532f279e3c8065379d72e4a5eaeb64a27f0702bd06593ee4bcd224ab57d468c6c12f6748294061ed9634991021
|
|
@@ -14,7 +14,5 @@
|
|
|
14
14
|
<p class="<%= value_classes %>">
|
|
15
15
|
<% if link? %><a href="<%= href %>" class="<%= value_link_classes %>"><%= value %></a><% else %><%= value %><% end %><% if suffix? %><span class="<%= suffix_classes %>"> <%= suffix %></span><% end %>
|
|
16
16
|
</p>
|
|
17
|
-
|
|
18
|
-
<p class="mt-1 text-sm font-medium <%= change_classes %>"><%= change_label %></p>
|
|
19
|
-
<% end %>
|
|
17
|
+
<p class="<%= change_row_classes %>"><%= change_label %></p>
|
|
20
18
|
</div>
|
|
@@ -8,6 +8,7 @@ module Keystone
|
|
|
8
8
|
VALUE_BASE_CLASSES = "mt-1 text-3xl font-bold"
|
|
9
9
|
SUFFIX_CLASSES = "text-lg text-gray-500 dark:text-gray-400"
|
|
10
10
|
DISCLOSURE_CLASSES = "hidden peer-hover:block peer-focus-visible:block absolute inset-x-0 top-full z-10 mt-2 space-y-1 rounded-lg border border-gray-200 bg-white p-3 text-sm text-gray-600 shadow-lg dark:border-zinc-700 dark:bg-zinc-800 dark:text-gray-400"
|
|
11
|
+
CHANGE_ROW_CLASSES = "mt-1 h-5 text-sm font-medium"
|
|
11
12
|
VALUE_LINK_CLASSES = "hover:underline focus:outline-none focus-visible:underline"
|
|
12
13
|
INFO_BUTTON_CLASSES = "peer shrink-0 text-gray-400 transition hover:text-accent-600 dark:hover:text-accent-400"
|
|
13
14
|
|
|
@@ -73,14 +74,20 @@ module Keystone
|
|
|
73
74
|
end
|
|
74
75
|
|
|
75
76
|
def change_label
|
|
77
|
+
return "" unless change?
|
|
78
|
+
|
|
76
79
|
formatted = "#{format("%.1f", @change.abs)}%"
|
|
77
80
|
return formatted if @change.zero?
|
|
78
81
|
|
|
79
82
|
"#{@change.negative? ? "▼" : "▲"} #{formatted}"
|
|
80
83
|
end
|
|
81
84
|
|
|
85
|
+
def change_row_classes
|
|
86
|
+
"#{CHANGE_ROW_CLASSES} #{change_classes}"
|
|
87
|
+
end
|
|
88
|
+
|
|
82
89
|
def change_classes
|
|
83
|
-
return "text-gray-500 dark:text-gray-400" if @change.zero?
|
|
90
|
+
return "text-gray-500 dark:text-gray-400" if !change? || @change.zero?
|
|
84
91
|
return "text-red-600 dark:text-red-400" if @change.negative?
|
|
85
92
|
|
|
86
93
|
"text-green-600 dark:text-green-400"
|
data/lib/keystone_ui/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: keystone_ui
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.12.
|
|
4
|
+
version: 0.12.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Tyler Schneider
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: bin
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
13
|
name: keystone_ui-styles
|
|
@@ -219,8 +218,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
219
218
|
- !ruby/object:Gem::Version
|
|
220
219
|
version: '0'
|
|
221
220
|
requirements: []
|
|
222
|
-
rubygems_version:
|
|
223
|
-
signing_key:
|
|
221
|
+
rubygems_version: 4.0.20
|
|
224
222
|
specification_version: 4
|
|
225
223
|
summary: Reusable UI component system for Rails applications.
|
|
226
224
|
test_files: []
|