@lotics/ui 7.12.0 → 7.12.1

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/AGENTS.md CHANGED
@@ -115,7 +115,7 @@ Pick by capability, not by name. (→ the source file for the API.)
115
115
  `PageHeader` /
116
116
  `PageContent`, `Stack`, `Spacer`, `Divider`, `Accordion`, `Tabs`, `SegmentedControl`, `Stepper`,
117
117
  `DangerZone` (the destructive section — delete/archive — set apart at the bottom of a record/settings surface).
118
- - **Rows & registers** — `PressableRow` (THE register row), `ListItem`, `MenuButton`,
118
+ - **Rows & registers** — `PressableRow` (THE register row; forwards its `ref`, so wrapping it in a `PopoverTrigger` anchors a row-triggered peek Popover — without the ref the trigger is unmeasurable and the popover renders off-screen), `ListItem`, `MenuButton`,
119
119
  `MenuListItem`, `DetailRow` (label+value for drawers/peeks; optional `trailing` slot for a
120
120
  right-side action/badge/unit), `ActionMenu` (⋯), `FloatingActionBar` (bulk-select bar).
121
121
  - **Filters & view controls** — `SearchInput`, `ChipGroup`, `FilterChip` (+ `RangeSlider`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lotics/ui",
3
- "version": "7.12.0",
3
+ "version": "7.12.1",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  "./tokens": "./src/tokens.ts",
@@ -1,5 +1,5 @@
1
- import { ReactNode, useState } from "react";
2
- import { Pressable, StyleProp, StyleSheet, ViewStyle } from "react-native";
1
+ import { ReactNode, Ref, useState } from "react";
2
+ import { Pressable, StyleProp, StyleSheet, View, ViewStyle } from "react-native";
3
3
  import { colors } from "./colors";
4
4
 
5
5
  export interface PressableRowProps {
@@ -31,6 +31,11 @@ export interface PressableRowProps {
31
31
  /** Layout only (gap, minHeight overrides). The surface owns its press
32
32
  * states — never pass backgroundColor for hover/selected. */
33
33
  style?: StyleProp<ViewStyle>;
34
+ /** Forwarded to the underlying Pressable's DOM node so a `Popover`/`Tooltip`
35
+ * can anchor to (measure) the row — RN-Web forwards it to the rendered element.
36
+ * Without it, wrapping this row in a `PopoverTrigger` yields an unmeasurable
37
+ * trigger and the popover renders unpositioned. */
38
+ ref?: Ref<View>;
34
39
  }
35
40
 
36
41
  /**
@@ -45,7 +50,7 @@ export interface PressableRowProps {
45
50
  * `variant` picks bleed (registers) or inset (Accordion drill-down rows).
46
51
  */
47
52
  export function PressableRow(props: PressableRowProps) {
48
- const { onPress, selected = false, marked = false, variant = "register", children, style } = props;
53
+ const { onPress, selected = false, marked = false, variant = "register", children, style, ref } = props;
49
54
  const [hovered, setHovered] = useState(false);
50
55
 
51
56
  // RN's types don't declare mouse handlers; react-native-web forwards them
@@ -57,6 +62,7 @@ export function PressableRow(props: PressableRowProps) {
57
62
 
58
63
  return (
59
64
  <Pressable
65
+ ref={ref}
60
66
  onPress={onPress}
61
67
  // Non-focusable surface: tabIndex, NOT focusable — RN-Web's Pressable
62
68
  // ignores `focusable` and writes its own tabIndex (the keyboard target is