@delacour/react-native-ui 0.1.0-alpha.20260927112827 → 0.1.0-alpha.20260927215017

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@delacour/react-native-ui",
3
- "version": "0.1.0-alpha.20260927112827",
3
+ "version": "0.1.0-alpha.20260927215017",
4
4
  "description": "React Native UI components — Uniwind, Reanimated, Gesture Handler",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -98,7 +98,7 @@
98
98
  },
99
99
  "peerDependencies": {
100
100
  "@central-icons-react-native/round-outlined-radius-1-stroke-1.5": "^1.1",
101
- "@delacour/react-native-charts": "0.1.0-alpha.20260927112827",
101
+ "@delacour/react-native-charts": "0.1.0-alpha.20260927215017",
102
102
  "@gorhom/bottom-sheet": "^5.2.8",
103
103
  "@legendapp/list": ">=3.3",
104
104
  "expo-linear-gradient": ">=15",
@@ -87,6 +87,11 @@ plus `Alert.Indicator`, `Alert.Content`, `Alert.Title`, `Alert.Description`,
87
87
  alert rather than part of what it says, and a red cross beside a red title
88
88
  reads as a second warning. It presses with `fade` — a spring on a glyph that
89
89
  small is a jitter — and carries `hitSlop={10}` to reach the 44-point target.
90
+ - **`closeTestID` reaches the composed close control.** The root's own `testID`
91
+ names the alert's surface; the close part is a separate pressable with no id of its own
92
+ unless the root forwards one, so a flow or test could only find it by its label.
93
+ `closeTestID` is named like `closeAccessibilityLabel`, the other prop the root
94
+ passes through to it.
90
95
  - **Actions are the caller's.** `Alert.Action` is a wrapping row and styles
91
96
  nothing in it; a `Button` in there is sized and painted however the caller
92
97
  says. It wraps rather than overflowing, because two buttons and a long label
@@ -41,6 +41,8 @@ export type AlertProps = Omit<SurfaceProps, "variant" | "padding"> & {
41
41
  onOpenChange?: (isOpen: boolean) => void;
42
42
  /** Name a screen reader gives the dismiss control. Defaults to `Dismiss`. */
43
43
  closeAccessibilityLabel?: string;
44
+ /** `testID` for the dismiss control, so a test or automation can press it. */
45
+ closeTestID?: string;
44
46
  children?: ReactNode;
45
47
  };
46
48
 
@@ -53,6 +55,7 @@ function AlertRoot({
53
55
  defaultOpen = true,
54
56
  onOpenChange,
55
57
  closeAccessibilityLabel,
58
+ closeTestID,
56
59
  className,
57
60
  children,
58
61
  ...props
@@ -90,7 +93,9 @@ function AlertRoot({
90
93
  >
91
94
  <IconDefaultsProvider value={iconDefaults}>
92
95
  {children}
93
- {isDismissible ? <AlertCloseButton accessibilityLabel={closeAccessibilityLabel} /> : null}
96
+ {isDismissible ? (
97
+ <AlertCloseButton accessibilityLabel={closeAccessibilityLabel} testID={closeTestID} />
98
+ ) : null}
94
99
  </IconDefaultsProvider>
95
100
  </Surface>
96
101
  </Animated.View>
@@ -46,6 +46,11 @@ A compact label for status, category or count. Compound root plus `Badge.Label`,
46
46
  with `fade` rather than the root's `scale` — a spring on a glyph that small
47
47
  reads as a jitter. Reach for the part by hand only to place it somewhere other
48
48
  than last.
49
+ - **`closeTestID` reaches the composed close control.** The root's own `testID`
50
+ names the badge; the close part is a separate pressable with no id of its own
51
+ unless the root forwards one, so a flow or test could only find it by its label.
52
+ `closeTestID` is named like `closeAccessibilityLabel`, the other prop the root
53
+ passes through to it.
49
54
  - **A size is padding, never a height.** `Text` respects OS font scaling, so a
50
55
  fixed height clips the label at a large accessibility step instead of growing
51
56
  with it — and unlike `h-button-*` or `h-navbar-row`, a badge lines up against
@@ -28,6 +28,8 @@ export type BadgeProps = Omit<PressableProps, "asChild" | "busy" | "children" |
28
28
  onClose?: () => void;
29
29
  /** Name a screen reader gives the dismiss control. Defaults to `Remove`. */
30
30
  closeAccessibilityLabel?: string;
31
+ /** `testID` for the dismiss control, so a test or automation can press it. */
32
+ closeTestID?: string;
31
33
  children?: ReactNode;
32
34
  };
33
35
 
@@ -38,6 +40,7 @@ function BadgeRoot({
38
40
  isDisabled = false,
39
41
  onClose,
40
42
  closeAccessibilityLabel,
43
+ closeTestID,
41
44
  onPress,
42
45
  onLongPress,
43
46
  haptic,
@@ -70,7 +73,9 @@ function BadgeRoot({
70
73
  <IconDefaultsProvider value={iconDefaults}>
71
74
  <TextClassProvider value={slots.label()}>
72
75
  {content}
73
- {onClose ? <BadgeCloseButton accessibilityLabel={closeAccessibilityLabel} onPress={onClose} /> : null}
76
+ {onClose ? (
77
+ <BadgeCloseButton accessibilityLabel={closeAccessibilityLabel} onPress={onClose} testID={closeTestID} />
78
+ ) : null}
74
79
  </TextClassProvider>
75
80
  </IconDefaultsProvider>
76
81
  );
@@ -91,6 +91,11 @@ and `Chip.CloseButton`.
91
91
  action, labelled by `closeAccessibilityLabel`, that calls `onClose` —
92
92
  VoiceOver's Actions rotor, TalkBack's actions menu. A caller's own
93
93
  `accessibilityActions` are kept beside it.
94
+ - **`closeTestID` reaches the composed close control.** The root's own `testID`
95
+ names the chip; the close part is a separate pressable with no id of its own
96
+ unless the root forwards one, so a flow or test could only find it by its label.
97
+ `closeTestID` is named like `closeAccessibilityLabel`, the other prop the root
98
+ passes through to it.
94
99
  - **`self-start` is Badge's, and beside a taller sibling in a row it top-aligns
95
100
  the chip.** It is what keeps a chip content-sized in a column, which is the
96
101
  common case; in a `flex-row items-center` holding something taller — a
@@ -40,6 +40,8 @@ export type ChipProps = Omit<PressableProps, "asChild" | "busy" | "children" | "
40
40
  onClose?: () => void;
41
41
  /** Name a screen reader gives the remove control. Defaults to `Remove`. */
42
42
  closeAccessibilityLabel?: string;
43
+ /** `testID` for the remove control, so a test or automation can press it. */
44
+ closeTestID?: string;
43
45
  children?: ReactNode;
44
46
  };
45
47
 
@@ -53,6 +55,7 @@ function ChipRoot({
53
55
  isDisabled = false,
54
56
  onClose,
55
57
  closeAccessibilityLabel,
58
+ closeTestID,
56
59
  onPress,
57
60
  onLongPress,
58
61
  haptic,
@@ -115,6 +118,7 @@ function ChipRoot({
115
118
  accessibilityLabel={closeAccessibilityLabel}
116
119
  importantForAccessibility={closeHidden ? "no-hide-descendants" : "auto"}
117
120
  onPress={onClose}
121
+ testID={closeTestID}
118
122
  />
119
123
  ) : null}
120
124
  </TextClassProvider>