senren-ui 0.1.1 → 0.1.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: 9b6cd2ac8863ce382b37a0f2e4d4efe3b109628d396be64186ecc3458b2afa22
|
|
4
|
+
data.tar.gz: a91a6fa5df442ae7c67c2a12dbe3b074f6ae7d2437edd9e3739eee1fd9d797ae
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: cf6dfdfda509f6bb568b50c0d5ea488d7c00c38537ee74621f2e05907dc2c5f78f7354ca21ccd04b055ba2f9df0b94d5da85606cdde91e271ea03526bb3018d9
|
|
7
|
+
data.tar.gz: a391a49b1f9152f7b2ccdab3c31276d34cc199929e5315bc10185c51ff6bf660101a42ea56a455df6def66fc215d66097b0610ea919d2531cda606a5076537a2
|
data/CHANGELOG.md
CHANGED
|
@@ -9,6 +9,16 @@ bug fixes only.
|
|
|
9
9
|
|
|
10
10
|
## [Unreleased]
|
|
11
11
|
|
|
12
|
+
## [0.1.2] — 2026-05-02
|
|
13
|
+
|
|
14
|
+
### Fixed
|
|
15
|
+
|
|
16
|
+
- Progress component no longer paints variant background on the full root
|
|
17
|
+
container. Variant color is now applied only to the indicator fill bar.
|
|
18
|
+
- Improved progress visuals by separating track/fill styling more clearly
|
|
19
|
+
(`h-2.5` track) and using smoother fill-width transition
|
|
20
|
+
(`transition-[width] duration-300 ease-out`).
|
|
21
|
+
|
|
12
22
|
## [0.1.1] — 2026-05-02
|
|
13
23
|
|
|
14
24
|
### Added
|
data/lib/senren/rails/version.rb
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<span class="text-[hsl(var(--senren-muted-foreground))]"><%= percent %>%</span>
|
|
6
6
|
</div>
|
|
7
7
|
<% end %>
|
|
8
|
-
<div role="progressbar" aria-valuemin="0" aria-valuemax="<%= max.to_i %>" aria-valuenow="<%= value.to_i %>" class="h-2 w-full overflow-hidden rounded-full bg-[hsl(var(--senren-muted))]">
|
|
9
|
-
<div class="h-full rounded-full transition-
|
|
8
|
+
<div role="progressbar" aria-valuemin="0" aria-valuemax="<%= max.to_i %>" aria-valuenow="<%= value.to_i %>" class="h-2.5 w-full overflow-hidden rounded-full bg-[hsl(var(--senren-muted))]">
|
|
9
|
+
<div class="h-full rounded-full transition-[width] duration-300 ease-out <%= indicator_class %>" style="width: <%= percent %>%"></div>
|
|
10
10
|
</div>
|
|
11
11
|
</div>
|
|
@@ -3,6 +3,12 @@
|
|
|
3
3
|
module Senren
|
|
4
4
|
class ProgressComponent < BaseComponent
|
|
5
5
|
VARIANTS = {
|
|
6
|
+
default: '',
|
|
7
|
+
success: '',
|
|
8
|
+
warning: '',
|
|
9
|
+
destructive: ''
|
|
10
|
+
}.freeze
|
|
11
|
+
INDICATOR_VARIANTS = {
|
|
6
12
|
default: 'bg-[hsl(var(--senren-primary))]',
|
|
7
13
|
success: 'bg-[hsl(var(--senren-success))]',
|
|
8
14
|
warning: 'bg-[hsl(var(--senren-warning))]',
|
|
@@ -22,5 +28,9 @@ module Senren
|
|
|
22
28
|
def percent
|
|
23
29
|
((value / max) * 100).clamp(0, 100).round
|
|
24
30
|
end
|
|
31
|
+
|
|
32
|
+
def indicator_class
|
|
33
|
+
INDICATOR_VARIANTS.fetch(variant)
|
|
34
|
+
end
|
|
25
35
|
end
|
|
26
36
|
end
|