@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.
- package/dist/alert/index.cjs +6 -3
- package/dist/alert/index.d.cts +1 -1
- package/dist/alert/index.d.ts +1 -1
- package/dist/alert/index.js +6 -3
- package/package.json +1 -1
package/dist/alert/index.cjs
CHANGED
|
@@ -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
|
|
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
|
|
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
|
|
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/dist/alert/index.d.cts
CHANGED
package/dist/alert/index.d.ts
CHANGED
package/dist/alert/index.js
CHANGED
|
@@ -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
|
|
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
|
|
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
|
|
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,
|