lostcoords-ui 0.14.7 → 0.14.8
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: 9447bf582316b0fe793871dafe7d039b6fdd7b583a11fa15593716326bb7043c
|
|
4
|
+
data.tar.gz: 7d60e53c68a6a3c892b0791115476dbbfba1fe0923403e0e4dc3a536bd5c0528
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 961df87717626401a16edc329d5e07feff638359a0767a1592a1c422f234a96db7e1c8a0b35a67798c200ad47e470e1a3564e73fe1a5b5473c0c052707e97043
|
|
7
|
+
data.tar.gz: 893dc15f1e35de2578647d50b7640827124eeb44d7f6fcffb55892a10f417f00f621972419b96bc2469353860d5e3273c8bd57443d3d8537b61a7a3a37026862
|
data/README.md
CHANGED
|
@@ -170,6 +170,19 @@ Omit `only` to register every library controller. Unknown identifiers raise befo
|
|
|
170
170
|
registered, and repeated calls on the same application keep later overrides, so register defaults
|
|
171
171
|
before application overrides.
|
|
172
172
|
|
|
173
|
+
## Changes in 0.14.8
|
|
174
|
+
|
|
175
|
+
Nothing needs an edit. Changed:
|
|
176
|
+
|
|
177
|
+
- **An `lc_list_field` row rings while its plain input has focus.** It showed the accent fill alone, so
|
|
178
|
+
these rows were the one place a focused field had no ring. The fill stays.
|
|
179
|
+
|
|
180
|
+
Fixed:
|
|
181
|
+
|
|
182
|
+
- **A lifted panel moves in the frame it grows in.** A panel that outgrew the viewport as its content
|
|
183
|
+
loaded, such as the emoji picker when its catalog arrives, was painted once at the old spot before
|
|
184
|
+
flipping to the other side of its trigger.
|
|
185
|
+
|
|
173
186
|
## Changes in 0.14.7
|
|
174
187
|
|
|
175
188
|
Nothing needs an edit. Fixed:
|
|
@@ -732,7 +745,7 @@ narrow row the label folds to its `icon:`, and the text stays the accessible nam
|
|
|
732
745
|
a `<label>` for that control; `as: :fieldset` names a group of controls, such as chips, with a legend.
|
|
733
746
|
`as: :span, surface: false` draws the row inside another element, such as a collapsible's summary.
|
|
734
747
|
`lc_input(plain: true)` drops the field's fill, border, padding and height so the text sits in the row,
|
|
735
|
-
which tints while that input has focus. Toggles take `--lc-field-bg` like fields, so on a card or list
|
|
748
|
+
which tints and shows the focus ring while that input has focus. Toggles take `--lc-field-bg` like fields, so on a card or list
|
|
736
749
|
row they use `--card-input`.
|
|
737
750
|
|
|
738
751
|
```erb
|
|
@@ -40,7 +40,7 @@ module Lostcoords::Ui
|
|
|
40
40
|
"transition-[border-color,box-shadow] duration-(--lc-motion-quick) ease-(--lc-ease-out) " \
|
|
41
41
|
"aria-invalid:border-destructive aria-invalid:shadow-[0_0_0_3px_color-mix(in_oklab,var(--destructive)_16%,transparent)]"
|
|
42
42
|
|
|
43
|
-
# Text and nothing else: for a control inside a row that
|
|
43
|
+
# Text and nothing else: for a control inside a row that draws the focus ring itself, such as lc_list_field.
|
|
44
44
|
INPUT_PLAIN =
|
|
45
45
|
"w-full max-w-full min-w-0 min-h-9 p-0 border-0 bg-transparent font-sans text-base text-foreground " \
|
|
46
46
|
"placeholder:text-muted-foreground aria-invalid:placeholder:text-destructive outline-none"
|
|
@@ -25,7 +25,7 @@ module Lostcoords::Ui
|
|
|
25
25
|
"hover:bg-accent has-checked:bg-primary-soft has-checked:font-semibold has-lc-disabled:cursor-not-allowed has-lc-pending:cursor-progress has-lc-disabled:opacity-45"
|
|
26
26
|
LIST_ROW_CHOICE_CHECK = "ms-auto size-4 shrink-0 text-primary invisible group-has-checked/choice:visible"
|
|
27
27
|
LIST_FIELD_ELEMENTS = %i[div fieldset span].freeze
|
|
28
|
-
LIST_FIELD = "@container px-content py-2.5 transition-colors duration-(--lc-motion-quick) has-[[data-plain]:focus]:bg-accent"
|
|
28
|
+
LIST_FIELD = "@container px-content py-2.5 transition-colors duration-(--lc-motion-quick) has-[[data-plain]:focus]:bg-accent has-[[data-plain]:focus-visible]:lc-focus-ring"
|
|
29
29
|
LIST_FIELD_GRID = "grid min-h-9 grid-cols-[1.25rem_minmax(0,1fr)] items-center gap-x-heading gap-y-related @md:grid-cols-[8rem_minmax(0,1fr)]"
|
|
30
30
|
LIST_FIELD_LABEL =
|
|
31
31
|
"flex items-center gap-related text-label font-semibold text-muted-foreground " \
|
|
@@ -96,7 +96,9 @@ export function liftToTopLayer(panel, trigger) {
|
|
|
96
96
|
const schedule = () => (frame ??= requestAnimationFrame(place))
|
|
97
97
|
|
|
98
98
|
place()
|
|
99
|
-
|
|
99
|
+
// A resize is delivered before the frame paints, so the panel moves in the frame it grows in:
|
|
100
|
+
// one that outgrows the viewport as its content loads is never painted at the old spot.
|
|
101
|
+
const resizes = new ResizeObserver(place)
|
|
100
102
|
resizes.observe(panel)
|
|
101
103
|
window.addEventListener("scroll", schedule, { capture: true, passive: true })
|
|
102
104
|
window.addEventListener("resize", schedule, { passive: true })
|