@lotics/ui 27.15.1 → 27.15.3
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.
- package/docs/catalog.md +4 -3
- package/docs/composition.md +13 -3
- package/docs/data_entry.md +7 -5
- package/package.json +1 -1
- package/src/animation_fade_in.tsx +18 -5
package/docs/catalog.md
CHANGED
|
@@ -615,9 +615,10 @@ source (`src/<module>.tsx`/`.ts`) is the API reference.
|
|
|
615
615
|
- **`dots_indicator`** — `DotsIndicator`: three looping bouncing dots (`size`/`color`); the
|
|
616
616
|
indeterminate "working/typing" pulse `Loading` composes; use bare beside a caption while
|
|
617
617
|
an agent thinks. Determinate work → `ProgressBar`.
|
|
618
|
-
- **`animation_fade_in`** — `AnimationFadeIn`: the mount transition — children fade
|
|
619
|
-
|
|
620
|
-
|
|
618
|
+
- **`animation_fade_in`** — `AnimationFadeIn`: the mount transition — children fade into
|
|
619
|
+
place on first render, once; the entrance polish Accordion/Timeline/Stepper/AgentRun
|
|
620
|
+
rows use. `translateY` adds the rise that reads as settling into place; `translateX`
|
|
621
|
+
the horizontal travel of a panel arriving from an edge (negative = from the left).
|
|
621
622
|
|
|
622
623
|
### Pickers & selection controls
|
|
623
624
|
|
package/docs/composition.md
CHANGED
|
@@ -471,9 +471,19 @@ All view controls are 40px tall (`CONTROL_HEIGHT`), `sm` labels, in ONE wrapping
|
|
|
471
471
|
|
|
472
472
|
## Commit & feedback surfaces
|
|
473
473
|
|
|
474
|
-
- **
|
|
475
|
-
|
|
476
|
-
|
|
474
|
+
- **A form's COMMIT sits with its fields, never in the footer.** The button submitting a set of
|
|
475
|
+
inputs goes directly beneath the last one it commits, `alignSelf="flex-start"` — the same left
|
|
476
|
+
edge the user just filled (data_entry.md's form-action alignment law, which holds inside an
|
|
477
|
+
overlay too). A footer commit is separated from what it commits by the width of the surface and
|
|
478
|
+
reads as belonging to the dialog rather than the fields. A **`Reset` travels with the `Save` it
|
|
479
|
+
undoes** — same draft, same row, secondary to the commit's left; splitting the pair across two
|
|
480
|
+
surfaces breaks one decision in half. A dialog whose only actions are a commit and its reset has
|
|
481
|
+
**no footer at all**.
|
|
482
|
+
- **The footer carries SURFACE actions**: `Cancel`/`Close`/`Done` (dismissal), `Back`
|
|
483
|
+
(navigation) — verbs about the overlay, with no field group to sit beside. `PopoverFooter`/
|
|
484
|
+
`DialogFooter` default `align="end"`; `DrawerFooter` is right-aligned by construction. Primary
|
|
485
|
+
at the right edge, secondary to its left. A confirm dialog (no fields) is all surface: its
|
|
486
|
+
buttons ARE the dialog, and they belong in the footer.
|
|
477
487
|
- **Empty result**: `<EmptyState message hint? icon? action?>` — never a bare muted Text.
|
|
478
488
|
- **Inline status**: `<Callout tone="info|success|warning|error|neutral">` — compound (like
|
|
479
489
|
Card): compose `CalloutTitle`/`CalloutText`/`CalloutActions` inside. `Callout` is INLINE;
|
package/docs/data_entry.md
CHANGED
|
@@ -36,11 +36,13 @@ shows in the resting row too; the `data` generic types option payloads). A DEPEN
|
|
|
36
36
|
renders only while its parent value makes it real — never a disabled ghost row. Worked rows:
|
|
37
37
|
`tpl_record`'s Classification group.
|
|
38
38
|
|
|
39
|
-
**The form-action alignment law.**
|
|
40
|
-
|
|
41
|
-
the
|
|
42
|
-
|
|
43
|
-
|
|
39
|
+
**The form-action alignment law.** A label-left form's action row rides the form's OWN GRID —
|
|
40
|
+
an empty-label `DetailRow` puts the CTA (and what it produces) exactly on the CONTROL COLUMN,
|
|
41
|
+
the same left edge the user just filled, and inherits stacked mode on narrow containers. A
|
|
42
|
+
right-floated button aligns to nothing. Worked: `tpl_record`'s Delivery receipt.
|
|
43
|
+
|
|
44
|
+
**This holds inside an overlay too.** A dialog's commit sits under the last field it commits,
|
|
45
|
+
not in the footer — see [composition.md §Commit & feedback surfaces](./composition.md).
|
|
44
46
|
|
|
45
47
|
### A dialog is a draft — use `FormField`, never an `Inline*` editor
|
|
46
48
|
|
package/package.json
CHANGED
|
@@ -7,10 +7,14 @@ interface AnimationFadeInProps {
|
|
|
7
7
|
/** Rise this many px while fading in — the "appearing into place" gesture.
|
|
8
8
|
* Default 0 (fade only). */
|
|
9
9
|
translateY?: number;
|
|
10
|
+
/** Travel this many px horizontally while fading in — negative enters from the
|
|
11
|
+
* left, positive from the right. The gesture for a panel arriving from an
|
|
12
|
+
* edge rather than settling into place. Default 0. */
|
|
13
|
+
translateX?: number;
|
|
10
14
|
}
|
|
11
15
|
|
|
12
16
|
export function AnimationFadeIn(props: AnimationFadeInProps) {
|
|
13
|
-
const { children, style, translateY = 0 } = props;
|
|
17
|
+
const { children, style, translateY = 0, translateX = 0 } = props;
|
|
14
18
|
const progress = useRef(new Animated.Value(0)).current;
|
|
15
19
|
|
|
16
20
|
useEffect(() => {
|
|
@@ -21,9 +25,18 @@ export function AnimationFadeIn(props: AnimationFadeInProps) {
|
|
|
21
25
|
}).start();
|
|
22
26
|
}, [progress]);
|
|
23
27
|
|
|
24
|
-
const
|
|
25
|
-
|
|
26
|
-
|
|
28
|
+
const offset = (from: number) =>
|
|
29
|
+
progress.interpolate({ inputRange: [0, 1], outputRange: [from, 0] });
|
|
30
|
+
const transform = [
|
|
31
|
+
...(translateX ? [{ translateX: offset(translateX) }] : []),
|
|
32
|
+
...(translateY ? [{ translateY: offset(translateY) }] : []),
|
|
33
|
+
];
|
|
27
34
|
|
|
28
|
-
return
|
|
35
|
+
return (
|
|
36
|
+
<Animated.View
|
|
37
|
+
style={[{ opacity: progress, transform: transform.length ? transform : undefined }, style]}
|
|
38
|
+
>
|
|
39
|
+
{children}
|
|
40
|
+
</Animated.View>
|
|
41
|
+
);
|
|
29
42
|
}
|