layered-ui-rails 0.10.0 → 0.12.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/.claude/skills/layered-ui-rails/references/CSS.md +7 -0
- data/.claude/skills/layered-ui-rails/references/HELPERS.md +1 -1
- data/CHANGELOG.md +24 -0
- data/app/assets/tailwind/layered/ui/styles.css +29 -12
- data/app/helpers/layered/ui/form_helper.rb +1 -1
- data/app/views/layouts/layered_ui/_header.html.erb +2 -2
- data/lib/layered/ui/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8bc7d9b4d6a4db2e8d1c172e0ab8d6cce9c7788318e17a601c8bb580c69ab44e
|
|
4
|
+
data.tar.gz: ac1fcd4473946402b0842173c42c06c9a6bac43befe32168bc9fd4977b5c25e2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c3312e94ff32e031ba9c2090d8429c18f211df5bcf518c01ec210b351617d7ef1404c327f0d45faa5d0bbe6c9d4aa60dab72fcaba5ed64de904fa47f8f963448
|
|
7
|
+
data.tar.gz: efb9d118bbbccab38a8c35a7af50420b9486bb4e7eabf5f1d976b52531ac2316d13b499face9c3969482a52528de1453ad0528dc5a7ae60e4a8c6f4f91cf370f
|
|
@@ -30,6 +30,7 @@ Modifiers (combine with a standalone variant above):
|
|
|
30
30
|
|
|
31
31
|
```
|
|
32
32
|
.l-ui-button--full Full-width (e.g. l-ui-button--primary l-ui-button--full)
|
|
33
|
+
.l-ui-button--small Compact 32px-tall variant (e.g. l-ui-button--primary l-ui-button--small)
|
|
33
34
|
```
|
|
34
35
|
|
|
35
36
|
Any button variant is automatically styled as disabled when the `disabled` HTML attribute is present - no extra class needed.
|
|
@@ -268,6 +269,11 @@ WCAG 2.2 AA table pattern:
|
|
|
268
269
|
.l-ui-message__body Message content
|
|
269
270
|
.l-ui-message__footer Metadata footer
|
|
270
271
|
.l-ui-message__timestamp Timestamp
|
|
272
|
+
|
|
273
|
+
.l-ui-stream-fade Fade-in for streamed chunks as they arrive (0.5s ease-out)
|
|
274
|
+
.l-ui-stream-fade-word Per-word staggered fade-in for completed responses
|
|
275
|
+
(0.5s ease-out; set --i to the word index for a 25ms
|
|
276
|
+
stagger, capped at 1s)
|
|
271
277
|
```
|
|
272
278
|
|
|
273
279
|
## Markdown
|
|
@@ -279,6 +285,7 @@ WCAG 2.2 AA table pattern:
|
|
|
279
285
|
## Icon sizes
|
|
280
286
|
|
|
281
287
|
```
|
|
288
|
+
.l-ui-icon--xs 16px (4x4)
|
|
282
289
|
.l-ui-icon--sm 20px (5x5)
|
|
283
290
|
.l-ui-icon--md 24px (6x6)
|
|
284
291
|
.l-ui-icon--lg 28px (7x7)
|
|
@@ -220,7 +220,7 @@ Renders a complete form with all fields, error summary, and submit button via th
|
|
|
220
220
|
|
|
221
221
|
Field options:
|
|
222
222
|
- `attribute` (Symbol) - model attribute
|
|
223
|
-
- `as` (Symbol, optional) - field type; auto-detected from column type. Supported: `:string`, `:text`, `:email`, `:number`, `:date`, `:datetime`, `:select`, `:checkbox`, `:hidden`
|
|
223
|
+
- `as` (Symbol, optional) - field type; auto-detected from column type. Supported: `:string`, `:text`, `:email`, `:password`, `:number`, `:date`, `:datetime`, `:select`, `:checkbox`, `:hidden`
|
|
224
224
|
- `label` (String, optional) - custom label text; defaults to humanised attribute
|
|
225
225
|
- `required` (Boolean, optional) - marks field as required; default false
|
|
226
226
|
- `hint` (String, optional) - help text below the field
|
data/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,30 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. This project follows [Semantic Versioning](https://semver.org/).
|
|
4
4
|
|
|
5
|
+
## [0.12.0] - 2026-05-08
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
- `l-ui-button--small` modifier for a compact 32px-tall button variant (combine with any button colour variant)
|
|
10
|
+
- `l-ui-icon--xs` icon size (16px) alongside existing `--sm`/`--md`/`--lg`
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
|
|
14
|
+
- Header navigation spacing tightened: `.l-ui-header__navigation` now uses `gap-4`, and the theme toggle absorbs the trailing `-mr-3`
|
|
15
|
+
- Default `Register`/`Login` header buttons use `l-ui-button--outline`/`--primary` with `l-ui-button--small`
|
|
16
|
+
- `l-ui-stream-fade` animation is now opacity-only (no Y-axis translation)
|
|
17
|
+
|
|
18
|
+
## [0.11.0] - 2026-05-07
|
|
19
|
+
|
|
20
|
+
### Added
|
|
21
|
+
|
|
22
|
+
- `l-ui-stream-fade` animation classes for fading in streamed chat output token-by-token
|
|
23
|
+
- `:password` form field type support in `l_ui_form` for `password_field` inputs via `as: :password`
|
|
24
|
+
|
|
25
|
+
### Changed
|
|
26
|
+
|
|
27
|
+
- Form fields now have an explicit background colour
|
|
28
|
+
|
|
5
29
|
## [0.10.0] - 2026-05-03
|
|
6
30
|
|
|
7
31
|
### Added
|
|
@@ -514,7 +514,7 @@
|
|
|
514
514
|
|
|
515
515
|
.l-ui-header__navigation {
|
|
516
516
|
@apply flex items-center
|
|
517
|
-
gap-
|
|
517
|
+
gap-4;
|
|
518
518
|
}
|
|
519
519
|
|
|
520
520
|
.l-ui-header__icon {
|
|
@@ -560,7 +560,7 @@
|
|
|
560
560
|
/* Theme */
|
|
561
561
|
|
|
562
562
|
.l-ui-theme-toggle {
|
|
563
|
-
@apply -mr-
|
|
563
|
+
@apply -mr-3;
|
|
564
564
|
}
|
|
565
565
|
|
|
566
566
|
.l-ui-theme-toggle__icon--light {
|
|
@@ -581,6 +581,11 @@
|
|
|
581
581
|
|
|
582
582
|
/* Icon */
|
|
583
583
|
|
|
584
|
+
.l-ui-icon--xs {
|
|
585
|
+
@apply w-4 h-4
|
|
586
|
+
dark:invert;
|
|
587
|
+
}
|
|
588
|
+
|
|
584
589
|
.l-ui-icon--sm {
|
|
585
590
|
@apply w-5 h-5
|
|
586
591
|
dark:invert;
|
|
@@ -884,6 +889,12 @@
|
|
|
884
889
|
transition-colors;
|
|
885
890
|
}
|
|
886
891
|
|
|
892
|
+
.l-ui-button--small {
|
|
893
|
+
@apply gap-1
|
|
894
|
+
px-3 min-h-[32px]
|
|
895
|
+
text-xs;
|
|
896
|
+
}
|
|
897
|
+
|
|
887
898
|
[class*="l-ui-button--"]:disabled,
|
|
888
899
|
.l-ui-button:disabled {
|
|
889
900
|
@apply opacity-50
|
|
@@ -934,8 +945,7 @@
|
|
|
934
945
|
/* Surface */
|
|
935
946
|
|
|
936
947
|
@utility surface {
|
|
937
|
-
@apply
|
|
938
|
-
p-4
|
|
948
|
+
@apply p-4
|
|
939
949
|
rounded-sm overflow-x-auto;
|
|
940
950
|
}
|
|
941
951
|
|
|
@@ -1061,7 +1071,7 @@ pre.l-ui-surface {
|
|
|
1061
1071
|
w-full px-3 py-2.5 min-h-[44px]
|
|
1062
1072
|
/* text-base at mobile; text-sm at md+ */
|
|
1063
1073
|
text-base font-inter
|
|
1064
|
-
text-foreground
|
|
1074
|
+
bg-background text-foreground
|
|
1065
1075
|
border border-border-control rounded-sm
|
|
1066
1076
|
focus-ring;
|
|
1067
1077
|
|
|
@@ -1792,19 +1802,26 @@ pre.l-ui-surface {
|
|
|
1792
1802
|
animation-delay: 0.3s;
|
|
1793
1803
|
}
|
|
1794
1804
|
|
|
1795
|
-
/*
|
|
1805
|
+
/* Stream fade-in */
|
|
1806
|
+
|
|
1807
|
+
@keyframes l-ui-stream-fade-in {
|
|
1808
|
+
from { opacity: 0; }
|
|
1809
|
+
to { opacity: 1; }
|
|
1810
|
+
}
|
|
1796
1811
|
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
to { opacity: 1; transform: translateY(0); }
|
|
1812
|
+
.l-ui-stream-fade {
|
|
1813
|
+
animation: l-ui-stream-fade-in 0.5s ease-out both;
|
|
1800
1814
|
}
|
|
1801
1815
|
|
|
1802
|
-
.l-ui-
|
|
1803
|
-
|
|
1816
|
+
.l-ui-stream-fade-word {
|
|
1817
|
+
display: inline-block;
|
|
1818
|
+
animation: l-ui-stream-fade-in 0.5s ease-out both;
|
|
1819
|
+
animation-delay: min(calc(var(--i, 0) * 25ms), 1s);
|
|
1804
1820
|
}
|
|
1805
1821
|
|
|
1806
1822
|
@media (prefers-reduced-motion: reduce) {
|
|
1807
|
-
.l-ui-
|
|
1823
|
+
.l-ui-stream-fade,
|
|
1824
|
+
.l-ui-stream-fade-word {
|
|
1808
1825
|
animation: none;
|
|
1809
1826
|
}
|
|
1810
1827
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
module Layered
|
|
2
2
|
module Ui
|
|
3
3
|
module FormHelper
|
|
4
|
-
FIELD_TYPES = %i[string text email number date datetime select checkbox hidden].freeze
|
|
4
|
+
FIELD_TYPES = %i[string text email password number date datetime select checkbox hidden].freeze
|
|
5
5
|
|
|
6
6
|
# Renders a complete form with all fields, error summary,
|
|
7
7
|
# and submit button.
|
|
@@ -23,11 +23,11 @@
|
|
|
23
23
|
|
|
24
24
|
<% unless l_ui_user_signed_in? %>
|
|
25
25
|
<% if respond_to?(:new_user_registration_path) %>
|
|
26
|
-
<%= link_to "Register", main_app.new_user_registration_path, class: "l-ui-button" %>
|
|
26
|
+
<%= link_to "Register", main_app.new_user_registration_path, class: "l-ui-button--outline l-ui-button--small" %>
|
|
27
27
|
<% end %>
|
|
28
28
|
|
|
29
29
|
<% if respond_to?(:new_user_session_path) %>
|
|
30
|
-
<%= link_to "Login", main_app.new_user_session_path, class: "l-ui-button" %>
|
|
30
|
+
<%= link_to "Login", main_app.new_user_session_path, class: "l-ui-button--primary l-ui-button--small" %>
|
|
31
31
|
<% end %>
|
|
32
32
|
<% end %>
|
|
33
33
|
|
data/lib/layered/ui/version.rb
CHANGED