@plexui/react-native 0.5.0 → 0.6.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.
@@ -46,7 +46,7 @@ export function BottomActions({ children, floating = false, background = "soft",
46
46
  return button;
47
47
  return (_jsx(View, { style: { borderRadius: height / 2, backgroundColor: props.disabled ? canvas : "transparent", alignSelf: (props.block ?? true) ? "stretch" : "flex-start" }, children: button }, child.key ?? index));
48
48
  });
49
- return (_jsxs(View, { testID: testID, pointerEvents: "box-none", style: [styles.bar, { paddingHorizontal: side, paddingTop, paddingBottom: bottom, gap: 8 }, floating ? styles.floating : null, style], children: [floating ? (android ? (_jsx(SoftBottomEdge, { fill: withAlpha(canvas, ANDROID_FADE_ALPHA), top: paddingTop - 13 + 60, tail: 60, blur: 0, stops: ANDROID_FADE_STOPS })) : background === "fade" ? (_jsx(TabBarFade, { fill: canvas, top: paddingTop })) : (_jsx(SoftBottomEdge, { fill: canvas, top: paddingTop, tail: 27, blur: theme.length("--toolbar-edge-blur-small", 3) }))) : null, actions] }));
49
+ return (_jsxs(View, { testID: testID, pointerEvents: "box-none", style: [styles.bar, { paddingHorizontal: side, paddingTop, paddingBottom: bottom, gap: 8 }, floating ? styles.floating : null, style], children: [floating && background !== "none" ? (android ? (_jsx(SoftBottomEdge, { fill: withAlpha(canvas, ANDROID_FADE_ALPHA), top: paddingTop - 13 + 60, tail: 60, blur: 0, stops: ANDROID_FADE_STOPS })) : background === "fade" ? (_jsx(TabBarFade, { fill: canvas, top: paddingTop })) : (_jsx(SoftBottomEdge, { fill: canvas, top: paddingTop, tail: 27, blur: theme.length("--toolbar-edge-blur-small", 3) }))) : null, actions] }));
50
50
  }
51
51
  const styles = StyleSheet.create({
52
52
  bar: { alignSelf: "stretch" },
@@ -413,7 +413,10 @@ const styles = StyleSheet.create({
413
413
  slot: { flexDirection: "row", alignItems: "center" },
414
414
  trailing: { justifyContent: "flex-end" },
415
415
  label: { justifyContent: "center" },
416
- content: { justifyContent: "center" },
416
+ // No wider than the middle it stands in: on the web a one-line text's min-content (nowrap) would otherwise push it
417
+ // under the bar's buttons; held to the middle, a child that shrinks cuts its line, as UIKit fits a title view
418
+ // between the bar items (Yoga's AT_MOST measuring does the same on a device)
419
+ content: { justifyContent: "center", maxWidth: "100%" },
417
420
  // A filling content stretches its control across (a search field, a block button), as a column would
418
421
  fill: { flex: 1, flexDirection: "column", alignItems: "stretch" },
419
422
  // A row's control fills it when it is a block control, and stands at the leading edge otherwise
@@ -1,7 +1,7 @@
1
1
  import { type ReactNode } from "react";
2
2
  import { type StyleProp, type ViewStyle } from "react-native";
3
3
  /** What stands between floating actions and the content under them */
4
- export type BottomActionsBackground = "soft" | "fade";
4
+ export type BottomActionsBackground = "soft" | "fade" | "none";
5
5
  export type BottomActionsProps = {
6
6
  /**
7
7
  * The screen's main action, a Button, and an optional second Button under it ("Not now", "Skip"). A second Button
@@ -19,7 +19,9 @@ export type BottomActionsProps = {
19
19
  * The edge under floating actions. `soft`: the screen's color in over 27pt above the actions, over a light blur.
20
20
  * `fade`: TabBar's fade, the content running on under the actions, crisp: from the top action's top the screen's
21
21
  * color comes in over 60pt to 85% and holds to the screen's edge; no blur. Android draws its soft edge for both, as
22
- * TabBar does. @default "soft"
22
+ * TabBar does. `none`: nothing under the actions, the content running on bare under them, as Apple's own screens
23
+ * float their actions; a disabled Button still stands on `canvasColor` on iOS, so the rows do not show through its
24
+ * gray. @default "soft"
23
25
  */
24
26
  background?: BottomActionsBackground;
25
27
  /** The color the floating edge fades into: the screen's (a grouped screen's gray). @default the theme's background */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plexui/react-native",
3
- "version": "0.5.0",
3
+ "version": "0.6.1",
4
4
  "description": "Plex UI components for React Native and Expo: iOS 26 and Material 3, on the shared @plexui/styles tokens",
5
5
  "license": "MIT",
6
6
  "homepage": "https://plexui.com",
@@ -7,7 +7,7 @@ import { useTheme } from "../../theme/ThemeProvider"
7
7
  import { Button, type ButtonProps } from "../Button/Button"
8
8
 
9
9
  /** What stands between floating actions and the content under them */
10
- export type BottomActionsBackground = "soft" | "fade"
10
+ export type BottomActionsBackground = "soft" | "fade" | "none"
11
11
 
12
12
  export type BottomActionsProps = {
13
13
  /**
@@ -26,7 +26,9 @@ export type BottomActionsProps = {
26
26
  * The edge under floating actions. `soft`: the screen's color in over 27pt above the actions, over a light blur.
27
27
  * `fade`: TabBar's fade, the content running on under the actions, crisp: from the top action's top the screen's
28
28
  * color comes in over 60pt to 85% and holds to the screen's edge; no blur. Android draws its soft edge for both, as
29
- * TabBar does. @default "soft"
29
+ * TabBar does. `none`: nothing under the actions, the content running on bare under them, as Apple's own screens
30
+ * float their actions; a disabled Button still stands on `canvasColor` on iOS, so the rows do not show through its
31
+ * gray. @default "soft"
30
32
  */
31
33
  background?: BottomActionsBackground
32
34
  /** The color the floating edge fades into: the screen's (a grouped screen's gray). @default the theme's background */
@@ -92,7 +94,7 @@ export function BottomActions({ children, floating = false, background = "soft",
92
94
  pointerEvents="box-none"
93
95
  style={[styles.bar, { paddingHorizontal: side, paddingTop, paddingBottom: bottom, gap: 8 }, floating ? styles.floating : null, style]}
94
96
  >
95
- {floating ? (
97
+ {floating && background !== "none" ? (
96
98
  android ? (
97
99
  <SoftBottomEdge fill={withAlpha(canvas, ANDROID_FADE_ALPHA)} top={paddingTop - 13 + 60} tail={60} blur={0} stops={ANDROID_FADE_STOPS} />
98
100
  ) : background === "fade" ? (
@@ -738,7 +738,10 @@ const styles = StyleSheet.create({
738
738
  slot: { flexDirection: "row", alignItems: "center" },
739
739
  trailing: { justifyContent: "flex-end" },
740
740
  label: { justifyContent: "center" },
741
- content: { justifyContent: "center" },
741
+ // No wider than the middle it stands in: on the web a one-line text's min-content (nowrap) would otherwise push it
742
+ // under the bar's buttons; held to the middle, a child that shrinks cuts its line, as UIKit fits a title view
743
+ // between the bar items (Yoga's AT_MOST measuring does the same on a device)
744
+ content: { justifyContent: "center", maxWidth: "100%" },
742
745
  // A filling content stretches its control across (a search field, a block button), as a column would
743
746
  fill: { flex: 1, flexDirection: "column", alignItems: "stretch" },
744
747
  // A row's control fills it when it is a block control, and stands at the leading edge otherwise