@xaui/native 0.0.30 → 0.0.31

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.
@@ -42,7 +42,6 @@ var styles = _reactnative.StyleSheet.create({
42
42
  width: "100%"
43
43
  },
44
44
  floatingContainer: {
45
- paddingHorizontal: 16,
46
45
  paddingVertical: 8
47
46
  },
48
47
  appBar: {
@@ -56,7 +55,8 @@ var styles = _reactnative.StyleSheet.create({
56
55
  borderRadius: 0
57
56
  },
58
57
  floating: {
59
- width: "92%",
58
+ width: "100%",
59
+ maxWidth: "97%",
60
60
  borderRadius: 9999,
61
61
  alignSelf: "center"
62
62
  },
@@ -71,7 +71,7 @@ var styles = _reactnative.StyleSheet.create({
71
71
  flex: 1,
72
72
  alignItems: "center",
73
73
  justifyContent: "center",
74
- paddingHorizontal: 12
74
+ paddingHorizontal: 10
75
75
  },
76
76
  endContent: {
77
77
  flexShrink: 0,
@@ -97,7 +97,7 @@ var AppBar = ({
97
97
  const safeThemeColor = _core.getSafeThemeColor.call(void 0, themeColor);
98
98
  const colorScheme = theme.colors[safeThemeColor];
99
99
  const isDefaultThemeColor = safeThemeColor === "default";
100
- const backgroundColor = isDefaultThemeColor ? theme.mode === "dark" ? theme.colors.default.background : "#FFFFFF" : colorScheme.background;
100
+ const backgroundColor = isDefaultThemeColor ? theme.mode === "dark" ? theme.colors.default.background : isFloating ? theme.palette.gray[200] : "#FFFFFF" : colorScheme.background;
101
101
  const borderBottomColor = isDefaultThemeColor ? theme.mode === "dark" ? "rgba(255, 255, 255, 0.06)" : "rgba(0, 0, 0, 0.08)" : colorScheme.main;
102
102
  return /* @__PURE__ */ _react2.default.createElement(_reactnative.View, { style: [styles.container, isFloating && styles.floatingContainer] }, /* @__PURE__ */ _react2.default.createElement(
103
103
  _reactnative.View,
@@ -125,9 +125,11 @@ var AppBarStartContent = ({
125
125
  };
126
126
  var AppBarContent = ({
127
127
  children,
128
+ alignment = "center",
128
129
  style
129
130
  }) => {
130
- return /* @__PURE__ */ _react2.default.createElement(_reactnative.View, { style: [styles.content, style] }, children);
131
+ const alignItems = alignment === "start" ? "flex-start" : alignment === "center" ? "center" : "flex-end";
132
+ return /* @__PURE__ */ _react2.default.createElement(_reactnative.View, { style: [styles.content, { alignItems }, style] }, children);
131
133
  };
132
134
  var AppBarEndContent = ({
133
135
  children,
@@ -40,8 +40,15 @@ type AppBarSlotProps = {
40
40
  */
41
41
  style?: StyleProp<ViewStyle>;
42
42
  };
43
+ type AppBarSlotContentAlignment = 'start' | 'center' | 'end';
43
44
  type AppBarStartContentProps = AppBarSlotProps;
44
- type AppBarContentProps = AppBarSlotProps;
45
+ type AppBarContentProps = AppBarSlotProps & {
46
+ /**
47
+ * Horizontal alignment for content slot content.
48
+ * @default 'center'
49
+ */
50
+ alignment?: AppBarSlotContentAlignment;
51
+ };
45
52
  type AppBarEndContentProps = AppBarSlotProps;
46
53
 
47
54
  declare const AppBar: React.FC<AppBarProps>;
@@ -40,8 +40,15 @@ type AppBarSlotProps = {
40
40
  */
41
41
  style?: StyleProp<ViewStyle>;
42
42
  };
43
+ type AppBarSlotContentAlignment = 'start' | 'center' | 'end';
43
44
  type AppBarStartContentProps = AppBarSlotProps;
44
- type AppBarContentProps = AppBarSlotProps;
45
+ type AppBarContentProps = AppBarSlotProps & {
46
+ /**
47
+ * Horizontal alignment for content slot content.
48
+ * @default 'center'
49
+ */
50
+ alignment?: AppBarSlotContentAlignment;
51
+ };
45
52
  type AppBarEndContentProps = AppBarSlotProps;
46
53
 
47
54
  declare const AppBar: React.FC<AppBarProps>;
@@ -42,7 +42,6 @@ var styles = StyleSheet.create({
42
42
  width: "100%"
43
43
  },
44
44
  floatingContainer: {
45
- paddingHorizontal: 16,
46
45
  paddingVertical: 8
47
46
  },
48
47
  appBar: {
@@ -56,7 +55,8 @@ var styles = StyleSheet.create({
56
55
  borderRadius: 0
57
56
  },
58
57
  floating: {
59
- width: "92%",
58
+ width: "100%",
59
+ maxWidth: "97%",
60
60
  borderRadius: 9999,
61
61
  alignSelf: "center"
62
62
  },
@@ -71,7 +71,7 @@ var styles = StyleSheet.create({
71
71
  flex: 1,
72
72
  alignItems: "center",
73
73
  justifyContent: "center",
74
- paddingHorizontal: 12
74
+ paddingHorizontal: 10
75
75
  },
76
76
  endContent: {
77
77
  flexShrink: 0,
@@ -97,7 +97,7 @@ var AppBar = ({
97
97
  const safeThemeColor = getSafeThemeColor(themeColor);
98
98
  const colorScheme = theme.colors[safeThemeColor];
99
99
  const isDefaultThemeColor = safeThemeColor === "default";
100
- const backgroundColor = isDefaultThemeColor ? theme.mode === "dark" ? theme.colors.default.background : "#FFFFFF" : colorScheme.background;
100
+ const backgroundColor = isDefaultThemeColor ? theme.mode === "dark" ? theme.colors.default.background : isFloating ? theme.palette.gray[200] : "#FFFFFF" : colorScheme.background;
101
101
  const borderBottomColor = isDefaultThemeColor ? theme.mode === "dark" ? "rgba(255, 255, 255, 0.06)" : "rgba(0, 0, 0, 0.08)" : colorScheme.main;
102
102
  return /* @__PURE__ */ React.createElement(View, { style: [styles.container, isFloating && styles.floatingContainer] }, /* @__PURE__ */ React.createElement(
103
103
  View,
@@ -125,9 +125,11 @@ var AppBarStartContent = ({
125
125
  };
126
126
  var AppBarContent = ({
127
127
  children,
128
+ alignment = "center",
128
129
  style
129
130
  }) => {
130
- return /* @__PURE__ */ React.createElement(View, { style: [styles.content, style] }, children);
131
+ const alignItems = alignment === "start" ? "flex-start" : alignment === "center" ? "center" : "flex-end";
132
+ return /* @__PURE__ */ React.createElement(View, { style: [styles.content, { alignItems }, style] }, children);
131
133
  };
132
134
  var AppBarEndContent = ({
133
135
  children,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xaui/native",
3
- "version": "0.0.30",
3
+ "version": "0.0.31",
4
4
  "description": "Flutter-inspired React Native UI components with native animations powered by React Native Reanimated",
5
5
  "keywords": [
6
6
  "react-native",
@@ -238,8 +238,8 @@
238
238
  "directory": "packages/native"
239
239
  },
240
240
  "dependencies": {
241
- "@xaui/core": "0.1.7",
242
- "@xaui/icons": "0.0.4"
241
+ "@xaui/core": "0.1.8",
242
+ "@xaui/icons": "0.0.5"
243
243
  },
244
244
  "peerDependencies": {
245
245
  "react": "^18.0.0 || ^19.0.0",