@xaui/native 0.0.39 → 0.0.40

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.
@@ -75,7 +75,8 @@ var useAlertColorScheme = (themeColor) => {
75
75
  var useAlertContainerStyles = (themeColor, variant) => {
76
76
  const { theme, colorScheme, isDefault } = useAlertColorScheme(themeColor);
77
77
  const containerStyles = _react.useMemo.call(void 0, () => {
78
- const backgroundColor = variant === "solid" ? colorScheme.main : variant === "flat" ? colorScheme.background : variant === "faded" ? _core.withOpacity.call(void 0, colorScheme.background, 0.75) : "transparent";
78
+ const isDark = theme.mode === "dark";
79
+ const backgroundColor = variant === "solid" ? isDark ? colorScheme.background : colorScheme.main : variant === "flat" ? isDark ? _core.withOpacity.call(void 0, colorScheme.background, 0.5) : colorScheme.background : variant === "faded" ? _core.withOpacity.call(void 0, colorScheme.background, 0.75) : "transparent";
79
80
  const borderWidth = variant === "bordered" || variant === "faded" ? theme.borderWidth.md : 0;
80
81
  const borderColor = variant === "bordered" ? _core.withOpacity.call(void 0, colorScheme.main, 0.75) : variant === "faded" ? _core.withOpacity.call(void 0, isDefault ? theme.colors.foreground : colorScheme.main, 0.25) : "transparent";
81
82
  return {
@@ -91,7 +92,8 @@ var useAlertContainerStyles = (themeColor, variant) => {
91
92
  var useAlertIconWrapperStyles = (themeColor, variant) => {
92
93
  const { theme, colorScheme, isDefault } = useAlertColorScheme(themeColor);
93
94
  const iconWrapperStyles = _react.useMemo.call(void 0, () => {
94
- const backgroundColor = variant === "solid" ? _core.withOpacity.call(void 0, colorScheme.foreground, 0.16) : _core.withOpacity.call(void 0, isDefault ? theme.colors.foreground : colorScheme.main, 0.12);
95
+ const isDark = theme.mode === "dark";
96
+ const backgroundColor = variant === "solid" ? _core.withOpacity.call(void 0, isDark ? colorScheme.main : colorScheme.foreground, 0.16) : _core.withOpacity.call(void 0, isDefault ? theme.colors.foreground : colorScheme.main, 0.12);
95
97
  const borderWidth = variant === "bordered" || variant === "faded" ? theme.borderWidth.xs : 0;
96
98
  const borderColor = _core.withOpacity.call(void 0,
97
99
  isDefault ? theme.colors.foreground : colorScheme.main,
@@ -108,7 +110,8 @@ var useAlertIconWrapperStyles = (themeColor, variant) => {
108
110
  var useAlertTextStyles = (themeColor, variant) => {
109
111
  const { theme, colorScheme, isDefault } = useAlertColorScheme(themeColor);
110
112
  const textStyles = _react.useMemo.call(void 0, () => {
111
- const baseTextColor = variant === "solid" ? colorScheme.foreground : isDefault ? theme.colors.foreground : colorScheme.main;
113
+ const isDark = theme.mode === "dark";
114
+ const baseTextColor = variant === "solid" ? isDark ? colorScheme.main : colorScheme.foreground : isDefault ? theme.colors.foreground : colorScheme.main;
112
115
  return {
113
116
  titleStyles: {
114
117
  color: baseTextColor,
@@ -87,4 +87,4 @@ type AlertProps = {
87
87
 
88
88
  declare const Alert: React.FC<AlertProps>;
89
89
 
90
- export { Alert, type AlertProps, type AlertVariant };
90
+ export { Alert, type AlertProps, type AlertRadius, type AlertVariant };
@@ -87,4 +87,4 @@ type AlertProps = {
87
87
 
88
88
  declare const Alert: React.FC<AlertProps>;
89
89
 
90
- export { Alert, type AlertProps, type AlertVariant };
90
+ export { Alert, type AlertProps, type AlertRadius, type AlertVariant };
@@ -75,7 +75,8 @@ var useAlertColorScheme = (themeColor) => {
75
75
  var useAlertContainerStyles = (themeColor, variant) => {
76
76
  const { theme, colorScheme, isDefault } = useAlertColorScheme(themeColor);
77
77
  const containerStyles = useMemo(() => {
78
- const backgroundColor = variant === "solid" ? colorScheme.main : variant === "flat" ? colorScheme.background : variant === "faded" ? withOpacity(colorScheme.background, 0.75) : "transparent";
78
+ const isDark = theme.mode === "dark";
79
+ const backgroundColor = variant === "solid" ? isDark ? colorScheme.background : colorScheme.main : variant === "flat" ? isDark ? withOpacity(colorScheme.background, 0.5) : colorScheme.background : variant === "faded" ? withOpacity(colorScheme.background, 0.75) : "transparent";
79
80
  const borderWidth = variant === "bordered" || variant === "faded" ? theme.borderWidth.md : 0;
80
81
  const borderColor = variant === "bordered" ? withOpacity(colorScheme.main, 0.75) : variant === "faded" ? withOpacity(isDefault ? theme.colors.foreground : colorScheme.main, 0.25) : "transparent";
81
82
  return {
@@ -91,7 +92,8 @@ var useAlertContainerStyles = (themeColor, variant) => {
91
92
  var useAlertIconWrapperStyles = (themeColor, variant) => {
92
93
  const { theme, colorScheme, isDefault } = useAlertColorScheme(themeColor);
93
94
  const iconWrapperStyles = useMemo(() => {
94
- const backgroundColor = variant === "solid" ? withOpacity(colorScheme.foreground, 0.16) : withOpacity(isDefault ? theme.colors.foreground : colorScheme.main, 0.12);
95
+ const isDark = theme.mode === "dark";
96
+ const backgroundColor = variant === "solid" ? withOpacity(isDark ? colorScheme.main : colorScheme.foreground, 0.16) : withOpacity(isDefault ? theme.colors.foreground : colorScheme.main, 0.12);
95
97
  const borderWidth = variant === "bordered" || variant === "faded" ? theme.borderWidth.xs : 0;
96
98
  const borderColor = withOpacity(
97
99
  isDefault ? theme.colors.foreground : colorScheme.main,
@@ -108,7 +110,8 @@ var useAlertIconWrapperStyles = (themeColor, variant) => {
108
110
  var useAlertTextStyles = (themeColor, variant) => {
109
111
  const { theme, colorScheme, isDefault } = useAlertColorScheme(themeColor);
110
112
  const textStyles = useMemo(() => {
111
- const baseTextColor = variant === "solid" ? colorScheme.foreground : isDefault ? theme.colors.foreground : colorScheme.main;
113
+ const isDark = theme.mode === "dark";
114
+ const baseTextColor = variant === "solid" ? isDark ? colorScheme.main : colorScheme.foreground : isDefault ? theme.colors.foreground : colorScheme.main;
112
115
  return {
113
116
  titleStyles: {
114
117
  color: baseTextColor,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xaui/native",
3
- "version": "0.0.39",
3
+ "version": "0.0.40",
4
4
  "description": "Flutter-inspired React Native UI components with native animations powered by React Native Reanimated",
5
5
  "keywords": [
6
6
  "react-native",