@particle-network/ui-native 0.4.2-beta.13 → 0.4.2-beta.15

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.
@@ -1,16 +1,11 @@
1
1
  import React from 'react';
2
2
  import { type UXTabsProps } from '../UXTabs';
3
- interface UXTabSwitchProps {
4
- tabStyle?: UXTabsProps['tabStyle'];
5
- containerStyle?: UXTabsProps['containerStyle'];
6
- size?: UXTabsProps['size'];
7
- color?: UXTabsProps['color'];
3
+ interface UXTabSwitchProps extends Omit<UXTabsProps, 'variant' | 'selectedKey' | 'onSelectionChange'> {
8
4
  onTitle?: string;
9
5
  onIcon?: React.ReactNode;
10
6
  offTitle?: string;
11
7
  offIcon?: React.ReactNode;
12
8
  isSelected?: boolean;
13
- isDisabled?: boolean;
14
9
  onValueChange?: (isSelected: boolean) => void;
15
10
  }
16
11
  export declare const UXTabSwitch: React.FC<UXTabSwitchProps>;
@@ -3,19 +3,15 @@ import "react";
3
3
  import { useI18n } from "../../hooks/useI18n.js";
4
4
  import { UXTab, UXTabs } from "../UXTabs/index.js";
5
5
  const UXTabSwitch = (props)=>{
6
- const { tabStyle, containerStyle, size, color, onTitle, onIcon, offTitle, offIcon, isSelected = false, isDisabled = false, onValueChange } = props;
6
+ const { onTitle, onIcon, offTitle, offIcon, isSelected = false, onValueChange, ...restProps } = props;
7
7
  const i18n = useI18n();
8
8
  return /*#__PURE__*/ jsxs(UXTabs, {
9
- tabStyle: tabStyle,
10
- containerStyle: containerStyle,
11
- size: size,
12
9
  variant: "switch",
13
- color: color,
14
- isDisabled: isDisabled,
15
10
  selectedKey: isSelected.toString(),
16
11
  onSelectionChange: (key)=>{
17
12
  onValueChange?.('true' === key);
18
13
  },
14
+ ...restProps,
19
15
  children: [
20
16
  /*#__PURE__*/ jsx(UXTab, {
21
17
  title: offTitle || i18n.switch.off,
@@ -5,7 +5,7 @@ export declare const useStyles: (props: Partial<UXTabsProps> & {
5
5
  tabsWrapper: {
6
6
  backgroundColor: string | undefined;
7
7
  gap: import("@particle-network/ui-shared").SpacingType;
8
- flex: number | undefined;
8
+ flexGrow: number | undefined;
9
9
  justifyContent: "flex-start" | "space-between";
10
10
  borderRadius: number | undefined;
11
11
  height: number;
@@ -14,7 +14,7 @@ export declare const useStyles: (props: Partial<UXTabsProps> & {
14
14
  };
15
15
  tab: {
16
16
  flexDirection: "column";
17
- flex: number | undefined;
17
+ flexGrow: number | undefined;
18
18
  height: "100%";
19
19
  alignItems: "center";
20
20
  justifyContent: "center";
@@ -153,7 +153,7 @@ const useStyles = (props)=>{
153
153
  tabsWrapper: {
154
154
  backgroundColor: wrapperBackgroundColor,
155
155
  gap: gapValue,
156
- flex: fullWidth || w ? 1 : void 0,
156
+ flexGrow: fullWidth || w ? 1 : void 0,
157
157
  justifyContent: fullWidth || w ? 'space-between' : 'flex-start',
158
158
  borderRadius: wrapperBorderRadius,
159
159
  height,
@@ -162,7 +162,7 @@ const useStyles = (props)=>{
162
162
  },
163
163
  tab: {
164
164
  flexDirection: 'column',
165
- flex: [
165
+ flexGrow: [
166
166
  'text',
167
167
  'light',
168
168
  'underlined'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@particle-network/ui-native",
3
- "version": "0.4.2-beta.13",
3
+ "version": "0.4.2-beta.15",
4
4
  "main": "./entry.js",
5
5
  "react-native": "./dist/index.js",
6
6
  "module": "./dist/index.js",
@@ -45,8 +45,8 @@
45
45
  "react-native-size-matters": "^0.4.2",
46
46
  "react-native-toast-message": "^2.3.3",
47
47
  "react-native-worklets": "0.5.1",
48
- "@particle-network/icons": "0.4.2-beta.7",
49
- "@particle-network/ui-shared": "0.3.2-beta.3"
48
+ "@particle-network/ui-shared": "0.3.2-beta.3",
49
+ "@particle-network/icons": "0.4.2-beta.7"
50
50
  },
51
51
  "devDependencies": {
52
52
  "@babel/core": "^7.24.0",