@xaui/native 0.0.38 → 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 +9 -6
- package/dist/alert/index.d.cts +1 -1
- package/dist/alert/index.d.ts +1 -1
- package/dist/alert/index.js +7 -4
- package/dist/app-bar/index.cjs +3 -3
- package/dist/app-bar/index.js +1 -1
- package/dist/autocomplete/index.cjs +17 -17
- package/dist/autocomplete/index.js +5 -5
- package/dist/avatar/index.cjs +5 -5
- package/dist/avatar/index.js +1 -1
- package/dist/badge/index.cjs +4 -4
- package/dist/badge/index.js +1 -1
- package/dist/bottom-sheet/index.cjs +3 -3
- package/dist/bottom-sheet/index.js +2 -2
- package/dist/bottom-tab-bar/index.cjs +2 -2
- package/dist/bottom-tab-bar/index.js +1 -1
- package/dist/button/index.cjs +18 -18
- package/dist/button/index.js +10 -10
- package/dist/card/index.cjs +6 -6
- package/dist/card/index.js +1 -1
- package/dist/carousel/index.cjs +2 -2
- package/dist/carousel/index.js +1 -1
- package/dist/checkbox/index.cjs +6 -6
- package/dist/checkbox/index.js +1 -1
- package/dist/chip/index.cjs +3 -3
- package/dist/chip/index.js +1 -1
- package/dist/{chunk-LUBWRVI2.js → chunk-2JKWVIPB.js} +1 -1
- package/dist/{chunk-RVR42THG.cjs → chunk-3XWF77Y3.cjs} +3 -3
- package/dist/{chunk-2ANGPYCP.cjs → chunk-43I45LX7.cjs} +37 -32
- package/dist/{chunk-QMYWIWSX.cjs → chunk-FBTBWI3P.cjs} +4 -4
- package/dist/{chunk-F7WH4DMG.js → chunk-J3BOFXIH.js} +1 -1
- package/dist/{chunk-ED22WCCI.js → chunk-K24VDBNN.js} +1 -1
- package/dist/{chunk-LTKYHG5V.js → chunk-LVNBYERF.js} +4 -0
- package/dist/{chunk-E4DOPNVW.js → chunk-M6A23KUM.js} +35 -30
- package/dist/{chunk-OQ2BLOOG.cjs → chunk-RZJFCDFS.cjs} +4 -0
- package/dist/{chunk-JEGEPGVU.js → chunk-UVI56OO5.js} +2 -2
- package/dist/{chunk-BD72HIPR.cjs → chunk-X5KNZ6YJ.cjs} +2 -2
- package/dist/{chunk-KTLGDLCB.cjs → chunk-XQED3KRW.cjs} +7 -7
- package/dist/color-picker/index.cjs +6 -6
- package/dist/color-picker/index.js +3 -3
- package/dist/core/index.cjs +2 -2
- package/dist/core/index.js +1 -1
- package/dist/datepicker/index.cjs +17 -17
- package/dist/datepicker/index.js +5 -5
- package/dist/dialog/index.cjs +5 -5
- package/dist/dialog/index.js +1 -1
- package/dist/divider/index.cjs +3 -3
- package/dist/divider/index.js +2 -2
- package/dist/drawer/index.cjs +2 -2
- package/dist/drawer/index.js +1 -1
- package/dist/expansion-panel/index.cjs +11 -11
- package/dist/expansion-panel/index.js +2 -2
- package/dist/fab/index.cjs +4 -4
- package/dist/fab/index.js +3 -3
- package/dist/fab-menu/index.cjs +7 -7
- package/dist/fab-menu/index.js +3 -3
- package/dist/feature-discovery/index.cjs +2 -2
- package/dist/feature-discovery/index.js +1 -1
- package/dist/indicator/index.cjs +3 -3
- package/dist/indicator/index.js +2 -2
- package/dist/input/index.cjs +37 -34
- package/dist/input/index.js +34 -31
- package/dist/input-trigger/index.cjs +3 -3
- package/dist/input-trigger/index.js +2 -2
- package/dist/list/index.cjs +5 -5
- package/dist/list/index.js +1 -1
- package/dist/menu/index.cjs +3 -3
- package/dist/menu/index.js +1 -1
- package/dist/menubox/index.cjs +5 -5
- package/dist/menubox/index.js +1 -1
- package/dist/picker/index.cjs +6 -6
- package/dist/picker/index.js +3 -3
- package/dist/progress/index.cjs +2 -2
- package/dist/progress/index.js +1 -1
- package/dist/radio/index.cjs +7 -7
- package/dist/radio/index.js +1 -1
- package/dist/segment-button/index.cjs +8 -8
- package/dist/segment-button/index.js +5 -5
- package/dist/select/index.cjs +16 -16
- package/dist/select/index.js +5 -5
- package/dist/skeleton/index.cjs +2 -2
- package/dist/skeleton/index.js +1 -1
- package/dist/slider/index.cjs +5 -5
- package/dist/slider/index.js +1 -1
- package/dist/snackbar/index.cjs +3 -3
- package/dist/snackbar/index.js +1 -1
- package/dist/snippet/index.cjs +3 -3
- package/dist/snippet/index.js +1 -1
- package/dist/stepper/index.cjs +2 -2
- package/dist/stepper/index.js +1 -1
- package/dist/switch/index.cjs +7 -7
- package/dist/switch/index.js +1 -1
- package/dist/tabs/index.cjs +8 -8
- package/dist/tabs/index.js +5 -5
- package/dist/timepicker/index.cjs +5 -5
- package/dist/timepicker/index.js +2 -2
- package/dist/toolbar/index.cjs +2 -2
- package/dist/toolbar/index.js +1 -1
- package/dist/typography/index.cjs +3 -3
- package/dist/typography/index.js +1 -1
- package/dist/view/index.cjs +3 -3
- package/dist/view/index.js +1 -1
- package/package.json +3 -3
package/dist/alert/index.cjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunkRZJFCDFScjs = require('../chunk-RZJFCDFS.cjs');
|
|
6
6
|
|
|
7
7
|
// src/components/alert/alert.tsx
|
|
8
8
|
|
|
@@ -64,7 +64,7 @@ var styles = _reactnative.StyleSheet.create({
|
|
|
64
64
|
|
|
65
65
|
var _core = require('@xaui/core');
|
|
66
66
|
var useAlertColorScheme = (themeColor) => {
|
|
67
|
-
const theme =
|
|
67
|
+
const theme = _chunkRZJFCDFScjs.useXUITheme.call(void 0, );
|
|
68
68
|
const safeThemeColor = _core.getSafeThemeColor.call(void 0, themeColor);
|
|
69
69
|
return {
|
|
70
70
|
theme,
|
|
@@ -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,
|
|
@@ -237,7 +240,7 @@ var Alert = ({
|
|
|
237
240
|
const visible = isControlled ? isVisible : internalVisible;
|
|
238
241
|
const opacity = _reactnativereanimated.useSharedValue.call(void 0, 1);
|
|
239
242
|
const scale = _reactnativereanimated.useSharedValue.call(void 0, 1);
|
|
240
|
-
const radiusStyles =
|
|
243
|
+
const radiusStyles = _chunkRZJFCDFScjs.useBorderRadiusStyles.call(void 0, radius);
|
|
241
244
|
const containerStyles = useAlertContainerStyles(themeColor, variant);
|
|
242
245
|
const iconWrapperStyles = useAlertIconWrapperStyles(themeColor, variant);
|
|
243
246
|
const { titleStyles, descriptionStyles, iconColor, closeButtonColor } = useAlertTextStyles(themeColor, variant);
|
package/dist/alert/index.d.cts
CHANGED
package/dist/alert/index.d.ts
CHANGED
package/dist/alert/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import "../chunk-SHBDANQN.js";
|
|
|
2
2
|
import {
|
|
3
3
|
useBorderRadiusStyles,
|
|
4
4
|
useXUITheme
|
|
5
|
-
} from "../chunk-
|
|
5
|
+
} from "../chunk-LVNBYERF.js";
|
|
6
6
|
|
|
7
7
|
// src/components/alert/alert.tsx
|
|
8
8
|
import React2, {
|
|
@@ -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,
|
package/dist/app-bar/index.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }require('../chunk-56RPWZD2.cjs');
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkRZJFCDFScjs = require('../chunk-RZJFCDFS.cjs');
|
|
5
5
|
|
|
6
6
|
// src/components/app-bar/app-bar.tsx
|
|
7
7
|
var _react = require('react'); var _react2 = _interopRequireDefault(_react);
|
|
@@ -23,7 +23,7 @@ var resolveShadowStyle = (elevation, shadows) => {
|
|
|
23
23
|
return shadows.xl;
|
|
24
24
|
};
|
|
25
25
|
var useAppBarElevationStyles = (elevation = 0) => {
|
|
26
|
-
const theme =
|
|
26
|
+
const theme = _chunkRZJFCDFScjs.useXUITheme.call(void 0, );
|
|
27
27
|
return _react.useMemo.call(void 0, () => {
|
|
28
28
|
if (elevation <= 0) {
|
|
29
29
|
return {};
|
|
@@ -94,7 +94,7 @@ var AppBar = ({
|
|
|
94
94
|
children,
|
|
95
95
|
style
|
|
96
96
|
}) => {
|
|
97
|
-
const theme =
|
|
97
|
+
const theme = _chunkRZJFCDFScjs.useXUITheme.call(void 0, );
|
|
98
98
|
const elevationStyles = useAppBarElevationStyles(elevation);
|
|
99
99
|
const isFloating = variant === "floating";
|
|
100
100
|
const safeThemeColor = _core.getSafeThemeColor.call(void 0, themeColor);
|
package/dist/app-bar/index.js
CHANGED
|
@@ -5,7 +5,7 @@ require('../chunk-56RPWZD2.cjs');
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _chunkRZJFCDFScjs = require('../chunk-RZJFCDFS.cjs');
|
|
9
9
|
|
|
10
10
|
// src/components/autocomplete/autocomplete.tsx
|
|
11
11
|
var _react = require('react'); var _react2 = _interopRequireDefault(_react);
|
|
@@ -24,38 +24,38 @@ var AutocompleteContext = _react.createContext.call(void 0, {
|
|
|
24
24
|
var _core = require('@xaui/core');
|
|
25
25
|
var _palette = require('@xaui/core/palette');
|
|
26
26
|
var useAutocompleteColorScheme = (themeColor) => {
|
|
27
|
-
const theme =
|
|
27
|
+
const theme = _chunkRZJFCDFScjs.useXUITheme.call(void 0, );
|
|
28
28
|
const safeThemeColor = _core.getSafeThemeColor.call(void 0, themeColor);
|
|
29
29
|
const colorScheme = theme.colors[safeThemeColor];
|
|
30
30
|
return { theme, colorScheme };
|
|
31
31
|
};
|
|
32
32
|
var useAutocompleteSizeStyles = (size) => {
|
|
33
|
-
const theme =
|
|
33
|
+
const theme = _chunkRZJFCDFScjs.useXUITheme.call(void 0, );
|
|
34
34
|
return _react.useMemo.call(void 0, () => {
|
|
35
35
|
const sizes = {
|
|
36
36
|
xs: {
|
|
37
|
-
minHeight:
|
|
37
|
+
minHeight: theme.componentSizes.xs,
|
|
38
38
|
paddingHorizontal: theme.spacing.sm,
|
|
39
39
|
paddingVertical: theme.spacing.xs,
|
|
40
40
|
fontSize: theme.fontSizes.xs,
|
|
41
41
|
labelSize: theme.fontSizes.xs
|
|
42
42
|
},
|
|
43
43
|
sm: {
|
|
44
|
-
minHeight:
|
|
44
|
+
minHeight: theme.componentSizes.sm,
|
|
45
45
|
paddingHorizontal: theme.spacing.md,
|
|
46
46
|
paddingVertical: theme.spacing.xs,
|
|
47
47
|
fontSize: theme.fontSizes.sm,
|
|
48
48
|
labelSize: theme.fontSizes.xs
|
|
49
49
|
},
|
|
50
50
|
md: {
|
|
51
|
-
minHeight:
|
|
51
|
+
minHeight: theme.componentSizes.md,
|
|
52
52
|
paddingHorizontal: theme.spacing.md,
|
|
53
53
|
paddingVertical: theme.spacing.sm,
|
|
54
54
|
fontSize: theme.fontSizes.md,
|
|
55
55
|
labelSize: theme.fontSizes.sm
|
|
56
56
|
},
|
|
57
57
|
lg: {
|
|
58
|
-
minHeight:
|
|
58
|
+
minHeight: theme.componentSizes.lg,
|
|
59
59
|
paddingHorizontal: theme.spacing.lg,
|
|
60
60
|
paddingVertical: theme.spacing.md,
|
|
61
61
|
fontSize: theme.fontSizes.lg,
|
|
@@ -66,7 +66,7 @@ var useAutocompleteSizeStyles = (size) => {
|
|
|
66
66
|
}, [size, theme]);
|
|
67
67
|
};
|
|
68
68
|
var useAutocompleteRadiusStyles = (radius) => {
|
|
69
|
-
const theme =
|
|
69
|
+
const theme = _chunkRZJFCDFScjs.useXUITheme.call(void 0, );
|
|
70
70
|
const radiusStyles = _react.useMemo.call(void 0, () => {
|
|
71
71
|
const radii = {
|
|
72
72
|
none: theme.borderRadius.none,
|
|
@@ -140,7 +140,7 @@ var useAutocompleteLabelStyle = (themeColor, isInvalid, labelSize) => {
|
|
|
140
140
|
}, [isInvalid, labelSize, theme, themeColor, colorScheme]);
|
|
141
141
|
};
|
|
142
142
|
var useAutocompleteHelperColor = (isInvalid) => {
|
|
143
|
-
const theme =
|
|
143
|
+
const theme = _chunkRZJFCDFScjs.useXUITheme.call(void 0, );
|
|
144
144
|
return _react.useMemo.call(void 0, () => {
|
|
145
145
|
if (isInvalid) {
|
|
146
146
|
return theme.colors.danger.main;
|
|
@@ -434,7 +434,7 @@ var AutocompleteDialogHeader = ({
|
|
|
434
434
|
onFocus,
|
|
435
435
|
onBlur
|
|
436
436
|
}) => {
|
|
437
|
-
const theme =
|
|
437
|
+
const theme = _chunkRZJFCDFScjs.useXUITheme.call(void 0, );
|
|
438
438
|
return /* @__PURE__ */ _react2.default.createElement(_reactnative.View, { style: styles2.header }, title ? /* @__PURE__ */ _react2.default.createElement(_reactnative.View, { style: styles2.titleRow }, /* @__PURE__ */ _react2.default.createElement(
|
|
439
439
|
_reactnative.Pressable,
|
|
440
440
|
{
|
|
@@ -534,7 +534,7 @@ var AutocompleteDialog = ({
|
|
|
534
534
|
onFocus,
|
|
535
535
|
onBlur
|
|
536
536
|
}) => {
|
|
537
|
-
const theme =
|
|
537
|
+
const theme = _chunkRZJFCDFScjs.useXUITheme.call(void 0, );
|
|
538
538
|
const { width: screenWidth, height: screenHeight } = _reactnative.useWindowDimensions.call(void 0, );
|
|
539
539
|
const fadeAnim = _react.useRef.call(void 0, new _reactnative.Animated.Value(0)).current;
|
|
540
540
|
const slideAnim = _react.useRef.call(void 0, new _reactnative.Animated.Value(0)).current;
|
|
@@ -632,7 +632,7 @@ var AutocompleteDialog = ({
|
|
|
632
632
|
onBlur
|
|
633
633
|
}
|
|
634
634
|
);
|
|
635
|
-
return /* @__PURE__ */ _react2.default.createElement(
|
|
635
|
+
return /* @__PURE__ */ _react2.default.createElement(_chunkRZJFCDFScjs.Portal, null, /* @__PURE__ */ _react2.default.createElement(_reactnative.View, { style: [overlayStyle, style] }, /* @__PURE__ */ _react2.default.createElement(_reactnative.Animated.View, { style: [styles2.backdrop, { opacity: fadeAnim }] }), /* @__PURE__ */ _react2.default.createElement(_reactnative.Animated.View, { style: [styles2.dialogContainer, containerAnimatedStyle] }, /* @__PURE__ */ _react2.default.createElement(
|
|
636
636
|
_reactnative.View,
|
|
637
637
|
{
|
|
638
638
|
style: [styles2.container, { backgroundColor: theme.colors.background }]
|
|
@@ -820,7 +820,7 @@ var Autocomplete = ({
|
|
|
820
820
|
(item) => defaultFilterFunction(item.labelText, currentInputValue)
|
|
821
821
|
);
|
|
822
822
|
}, [disableLocalFilter, items, currentInputValue]);
|
|
823
|
-
const theme =
|
|
823
|
+
const theme = _chunkRZJFCDFScjs.useXUITheme.call(void 0, );
|
|
824
824
|
const sizeStyles = useAutocompleteSizeStyles(size);
|
|
825
825
|
const { radiusStyles } = useAutocompleteRadiusStyles(radius);
|
|
826
826
|
const variantStyles = useAutocompleteVariantStyles(themeColor, variant, isInvalid);
|
|
@@ -981,7 +981,7 @@ var styles3 = _reactnative.StyleSheet.create({
|
|
|
981
981
|
|
|
982
982
|
|
|
983
983
|
var useAutocompleteItemSizeStyles = (size) => {
|
|
984
|
-
const theme =
|
|
984
|
+
const theme = _chunkRZJFCDFScjs.useXUITheme.call(void 0, );
|
|
985
985
|
return _react.useMemo.call(void 0, () => {
|
|
986
986
|
const sizes = {
|
|
987
987
|
xs: {
|
|
@@ -1013,7 +1013,7 @@ var useAutocompleteItemSizeStyles = (size) => {
|
|
|
1013
1013
|
}, [size, theme]);
|
|
1014
1014
|
};
|
|
1015
1015
|
var useAutocompleteItemBackgroundColor = (themeColor, isSelected) => {
|
|
1016
|
-
const theme =
|
|
1016
|
+
const theme = _chunkRZJFCDFScjs.useXUITheme.call(void 0, );
|
|
1017
1017
|
const safeThemeColor = _core.getSafeThemeColor.call(void 0, themeColor);
|
|
1018
1018
|
const colorScheme = theme.colors[safeThemeColor];
|
|
1019
1019
|
return _react.useMemo.call(void 0, () => {
|
|
@@ -1021,7 +1021,7 @@ var useAutocompleteItemBackgroundColor = (themeColor, isSelected) => {
|
|
|
1021
1021
|
}, [isSelected, colorScheme]);
|
|
1022
1022
|
};
|
|
1023
1023
|
var useAutocompleteItemTextColors = () => {
|
|
1024
|
-
const theme =
|
|
1024
|
+
const theme = _chunkRZJFCDFScjs.useXUITheme.call(void 0, );
|
|
1025
1025
|
return _react.useMemo.call(void 0, () => {
|
|
1026
1026
|
return {
|
|
1027
1027
|
textColor: theme.colors.foreground,
|
|
@@ -1030,7 +1030,7 @@ var useAutocompleteItemTextColors = () => {
|
|
|
1030
1030
|
}, [theme]);
|
|
1031
1031
|
};
|
|
1032
1032
|
var useAutocompleteItemCheckmarkColor = (themeColor) => {
|
|
1033
|
-
const theme =
|
|
1033
|
+
const theme = _chunkRZJFCDFScjs.useXUITheme.call(void 0, );
|
|
1034
1034
|
const safeThemeColor = _core.getSafeThemeColor.call(void 0, themeColor);
|
|
1035
1035
|
const colorScheme = theme.colors[safeThemeColor];
|
|
1036
1036
|
return _react.useMemo.call(void 0, () => {
|
|
@@ -5,7 +5,7 @@ import "../chunk-SHBDANQN.js";
|
|
|
5
5
|
import {
|
|
6
6
|
Portal,
|
|
7
7
|
useXUITheme
|
|
8
|
-
} from "../chunk-
|
|
8
|
+
} from "../chunk-LVNBYERF.js";
|
|
9
9
|
|
|
10
10
|
// src/components/autocomplete/autocomplete.tsx
|
|
11
11
|
import React4, { useCallback as useCallback3, useMemo as useMemo3, useRef as useRef3, useState as useState3 } from "react";
|
|
@@ -34,28 +34,28 @@ var useAutocompleteSizeStyles = (size) => {
|
|
|
34
34
|
return useMemo(() => {
|
|
35
35
|
const sizes = {
|
|
36
36
|
xs: {
|
|
37
|
-
minHeight:
|
|
37
|
+
minHeight: theme.componentSizes.xs,
|
|
38
38
|
paddingHorizontal: theme.spacing.sm,
|
|
39
39
|
paddingVertical: theme.spacing.xs,
|
|
40
40
|
fontSize: theme.fontSizes.xs,
|
|
41
41
|
labelSize: theme.fontSizes.xs
|
|
42
42
|
},
|
|
43
43
|
sm: {
|
|
44
|
-
minHeight:
|
|
44
|
+
minHeight: theme.componentSizes.sm,
|
|
45
45
|
paddingHorizontal: theme.spacing.md,
|
|
46
46
|
paddingVertical: theme.spacing.xs,
|
|
47
47
|
fontSize: theme.fontSizes.sm,
|
|
48
48
|
labelSize: theme.fontSizes.xs
|
|
49
49
|
},
|
|
50
50
|
md: {
|
|
51
|
-
minHeight:
|
|
51
|
+
minHeight: theme.componentSizes.md,
|
|
52
52
|
paddingHorizontal: theme.spacing.md,
|
|
53
53
|
paddingVertical: theme.spacing.sm,
|
|
54
54
|
fontSize: theme.fontSizes.md,
|
|
55
55
|
labelSize: theme.fontSizes.sm
|
|
56
56
|
},
|
|
57
57
|
lg: {
|
|
58
|
-
minHeight:
|
|
58
|
+
minHeight: theme.componentSizes.lg,
|
|
59
59
|
paddingHorizontal: theme.spacing.lg,
|
|
60
60
|
paddingVertical: theme.spacing.md,
|
|
61
61
|
fontSize: theme.fontSizes.lg,
|
package/dist/avatar/index.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }require('../chunk-56RPWZD2.cjs');
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkRZJFCDFScjs = require('../chunk-RZJFCDFS.cjs');
|
|
5
5
|
|
|
6
6
|
// src/components/avatar/avatar.tsx
|
|
7
7
|
var _react = require('react'); var _react2 = _interopRequireDefault(_react);
|
|
@@ -50,7 +50,7 @@ function resolveAvatarSize(size) {
|
|
|
50
50
|
return sizeMap[size];
|
|
51
51
|
}
|
|
52
52
|
function useAvatarSizeStyles(size) {
|
|
53
|
-
const theme =
|
|
53
|
+
const theme = _chunkRZJFCDFScjs.useXUITheme.call(void 0, );
|
|
54
54
|
const resolvedSize = _react.useMemo.call(void 0, () => resolveAvatarSize(size), [size]);
|
|
55
55
|
const fontSize = _react.useMemo.call(void 0, () => {
|
|
56
56
|
if (typeof size === "number") {
|
|
@@ -64,7 +64,7 @@ function useAvatarSizeStyles(size) {
|
|
|
64
64
|
};
|
|
65
65
|
}
|
|
66
66
|
function useAvatarRadiusStyles(radius, size) {
|
|
67
|
-
const theme =
|
|
67
|
+
const theme = _chunkRZJFCDFScjs.useXUITheme.call(void 0, );
|
|
68
68
|
return _react.useMemo.call(void 0, () => {
|
|
69
69
|
if (radius === "full") {
|
|
70
70
|
return { borderRadius: size / 2 };
|
|
@@ -80,7 +80,7 @@ function useAvatarRadiusStyles(radius, size) {
|
|
|
80
80
|
}, [radius, size, theme]);
|
|
81
81
|
}
|
|
82
82
|
function useAvatarColors(themeColor, isDisabled) {
|
|
83
|
-
const theme =
|
|
83
|
+
const theme = _chunkRZJFCDFScjs.useXUITheme.call(void 0, );
|
|
84
84
|
const safeThemeColor = _core.getSafeThemeColor.call(void 0, themeColor);
|
|
85
85
|
const colorScheme = theme.colors[safeThemeColor];
|
|
86
86
|
const backgroundColor = _react.useMemo.call(void 0, () => {
|
|
@@ -199,7 +199,7 @@ var AvatarGroup = ({
|
|
|
199
199
|
renderCount,
|
|
200
200
|
customAppearance
|
|
201
201
|
}) => {
|
|
202
|
-
const theme =
|
|
202
|
+
const theme = _chunkRZJFCDFScjs.useXUITheme.call(void 0, );
|
|
203
203
|
const resolvedSize = resolveAvatarSize(size);
|
|
204
204
|
const spacing = theme.spacing.xs;
|
|
205
205
|
const overlap = Math.round(resolvedSize * 0.28);
|
package/dist/avatar/index.js
CHANGED
package/dist/badge/index.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }require('../chunk-56RPWZD2.cjs');
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkRZJFCDFScjs = require('../chunk-RZJFCDFS.cjs');
|
|
5
5
|
|
|
6
6
|
// src/components/badge/badge.tsx
|
|
7
7
|
var _react = require('react'); var _react2 = _interopRequireDefault(_react);
|
|
@@ -41,7 +41,7 @@ var fontSizeMap = {
|
|
|
41
41
|
lg: 12
|
|
42
42
|
};
|
|
43
43
|
function useBadgeSizeStyles(size, isDot, isOneChar) {
|
|
44
|
-
const theme =
|
|
44
|
+
const theme = _chunkRZJFCDFScjs.useXUITheme.call(void 0, );
|
|
45
45
|
return _react.useMemo.call(void 0, () => {
|
|
46
46
|
const { height, minWidth, dot } = sizeMap[size];
|
|
47
47
|
const fontSize = fontSizeMap[size];
|
|
@@ -71,7 +71,7 @@ function useBadgeSizeStyles(size, isDot, isOneChar) {
|
|
|
71
71
|
}, [isDot, isOneChar, size, theme]);
|
|
72
72
|
}
|
|
73
73
|
function useBadgeVariantStyles(themeColor, variant) {
|
|
74
|
-
const theme =
|
|
74
|
+
const theme = _chunkRZJFCDFScjs.useXUITheme.call(void 0, );
|
|
75
75
|
const safeThemeColor = _core.getSafeThemeColor.call(void 0, themeColor);
|
|
76
76
|
const colorScheme = theme.colors[safeThemeColor];
|
|
77
77
|
return _react.useMemo.call(void 0, () => {
|
|
@@ -101,7 +101,7 @@ function useBadgeVariantStyles(themeColor, variant) {
|
|
|
101
101
|
}, [colorScheme, theme, variant]);
|
|
102
102
|
}
|
|
103
103
|
function useBadgeRadiusStyles(radius, height) {
|
|
104
|
-
const theme =
|
|
104
|
+
const theme = _chunkRZJFCDFScjs.useXUITheme.call(void 0, );
|
|
105
105
|
return _react.useMemo.call(void 0, () => {
|
|
106
106
|
if (radius === "full") {
|
|
107
107
|
return { borderRadius: height / 2 };
|
package/dist/badge/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../chunk-EUQDGTST.cjs');
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunk3XWF77Y3cjs = require('../chunk-3XWF77Y3.cjs');
|
|
5
5
|
require('../chunk-56RPWZD2.cjs');
|
|
6
|
-
require('../chunk-
|
|
6
|
+
require('../chunk-RZJFCDFS.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
exports.BottomSheet =
|
|
9
|
+
exports.BottomSheet = _chunk3XWF77Y3cjs.BottomSheet;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }require('../chunk-56RPWZD2.cjs');
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkRZJFCDFScjs = require('../chunk-RZJFCDFS.cjs');
|
|
5
5
|
|
|
6
6
|
// src/components/bottom-tab-bar/bottom-tab-bar.tsx
|
|
7
7
|
var _react = require('react'); var _react2 = _interopRequireDefault(_react);
|
|
@@ -49,7 +49,7 @@ var useBottomTabBarSizeStyles = (size) => {
|
|
|
49
49
|
return _react.useMemo.call(void 0, () => sizeMap[size], [size]);
|
|
50
50
|
};
|
|
51
51
|
var useBottomTabBarColors = (themeColor, activeColor, inactiveColor, indicatorColor) => {
|
|
52
|
-
const theme =
|
|
52
|
+
const theme = _chunkRZJFCDFScjs.useXUITheme.call(void 0, );
|
|
53
53
|
const colorScheme = theme.colors[_core.getSafeThemeColor.call(void 0, themeColor)];
|
|
54
54
|
return _react.useMemo.call(void 0, () => {
|
|
55
55
|
return {
|
package/dist/button/index.cjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkFBTBWI3Pcjs = require('../chunk-FBTBWI3P.cjs');
|
|
4
4
|
require('../chunk-56RPWZD2.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _chunkRZJFCDFScjs = require('../chunk-RZJFCDFS.cjs');
|
|
9
9
|
|
|
10
10
|
// src/components/button/button.tsx
|
|
11
11
|
var _react = require('react'); var _react2 = _interopRequireDefault(_react);
|
|
@@ -56,7 +56,7 @@ var styles = _reactnative.StyleSheet.create({
|
|
|
56
56
|
|
|
57
57
|
var _core = require('@xaui/core');
|
|
58
58
|
var useTextStyles = (themeColor, variant) => {
|
|
59
|
-
const theme =
|
|
59
|
+
const theme = _chunkRZJFCDFScjs.useXUITheme.call(void 0, );
|
|
60
60
|
const safeThemeColor = _core.getSafeThemeColor.call(void 0, themeColor);
|
|
61
61
|
const colorScheme = theme.colors[safeThemeColor];
|
|
62
62
|
const textColor = _react.useMemo.call(void 0, () => {
|
|
@@ -70,31 +70,31 @@ var useTextStyles = (themeColor, variant) => {
|
|
|
70
70
|
};
|
|
71
71
|
};
|
|
72
72
|
function useSizesStyles(size) {
|
|
73
|
-
const theme =
|
|
73
|
+
const theme = _chunkRZJFCDFScjs.useXUITheme.call(void 0, );
|
|
74
74
|
const sizeStyles = _react.useMemo.call(void 0, () => {
|
|
75
75
|
const sizes = {
|
|
76
76
|
xs: {
|
|
77
77
|
paddingHorizontal: theme.spacing.sm,
|
|
78
78
|
paddingVertical: theme.spacing.xs,
|
|
79
|
-
minHeight:
|
|
79
|
+
minHeight: theme.componentSizes.xs,
|
|
80
80
|
fontSize: theme.fontSizes.xs
|
|
81
81
|
},
|
|
82
82
|
sm: {
|
|
83
83
|
paddingHorizontal: theme.spacing.md,
|
|
84
84
|
paddingVertical: theme.spacing.xs,
|
|
85
|
-
minHeight:
|
|
85
|
+
minHeight: theme.componentSizes.sm,
|
|
86
86
|
fontSize: theme.fontSizes.sm
|
|
87
87
|
},
|
|
88
88
|
md: {
|
|
89
89
|
paddingHorizontal: theme.spacing.md,
|
|
90
90
|
paddingVertical: theme.spacing.sm,
|
|
91
|
-
minHeight:
|
|
91
|
+
minHeight: theme.componentSizes.md,
|
|
92
92
|
fontSize: theme.fontSizes.md
|
|
93
93
|
},
|
|
94
94
|
lg: {
|
|
95
95
|
paddingHorizontal: theme.spacing.lg,
|
|
96
96
|
paddingVertical: theme.spacing.md,
|
|
97
|
-
minHeight:
|
|
97
|
+
minHeight: theme.componentSizes.lg,
|
|
98
98
|
fontSize: theme.fontSizes.lg
|
|
99
99
|
}
|
|
100
100
|
};
|
|
@@ -112,7 +112,7 @@ function useSizesStyles(size) {
|
|
|
112
112
|
return { sizeStyles, spinnerSize };
|
|
113
113
|
}
|
|
114
114
|
function useVariantSizesStyles(themeColor, variant, elevation = 0) {
|
|
115
|
-
const theme =
|
|
115
|
+
const theme = _chunkRZJFCDFScjs.useXUITheme.call(void 0, );
|
|
116
116
|
const safeThemeColor = _core.getSafeThemeColor.call(void 0, themeColor);
|
|
117
117
|
const colorScheme = theme.colors[safeThemeColor];
|
|
118
118
|
const variantStyles = _react.useMemo.call(void 0, () => {
|
|
@@ -208,7 +208,7 @@ var Button = ({
|
|
|
208
208
|
const animatedScale = _react2.default.useRef(new _reactnative.Animated.Value(1)).current;
|
|
209
209
|
const animatedOpacity = _react2.default.useRef(new _reactnative.Animated.Value(1)).current;
|
|
210
210
|
const { sizeStyles, spinnerSize } = useSizesStyles(size);
|
|
211
|
-
const radiusStyles =
|
|
211
|
+
const radiusStyles = _chunkRZJFCDFScjs.useBorderRadiusStyles.call(void 0, radius);
|
|
212
212
|
const variantStyles = useVariantSizesStyles(themeColor, variant, elevation);
|
|
213
213
|
const { textColor } = useTextStyles(themeColor, variant);
|
|
214
214
|
const handlePressIn = (event) => {
|
|
@@ -224,7 +224,7 @@ var Button = ({
|
|
|
224
224
|
_optionalChain([onPressOut, 'optionalCall', _2 => _2(event)]);
|
|
225
225
|
};
|
|
226
226
|
const spinner = /* @__PURE__ */ _react2.default.createElement(
|
|
227
|
-
|
|
227
|
+
_chunkFBTBWI3Pcjs.ActivityIndicator,
|
|
228
228
|
{
|
|
229
229
|
variant: "circular",
|
|
230
230
|
themeColor: variant === "solid" ? void 0 : themeColor,
|
|
@@ -298,13 +298,13 @@ var iconButtonStyles = _reactnative.StyleSheet.create({
|
|
|
298
298
|
// src/components/button/icon-button.hook.ts
|
|
299
299
|
|
|
300
300
|
var useIconButtonSizeStyles = (size) => {
|
|
301
|
-
const theme =
|
|
301
|
+
const theme = _chunkRZJFCDFScjs.useXUITheme.call(void 0, );
|
|
302
302
|
return _react.useMemo.call(void 0, () => {
|
|
303
303
|
const sizeMap = {
|
|
304
|
-
xs: { width:
|
|
305
|
-
sm: { width:
|
|
306
|
-
md: { width:
|
|
307
|
-
lg: { width:
|
|
304
|
+
xs: { width: theme.componentSizes.xs, height: theme.componentSizes.xs },
|
|
305
|
+
sm: { width: theme.componentSizes.sm, height: theme.componentSizes.sm },
|
|
306
|
+
md: { width: theme.componentSizes.md, height: theme.componentSizes.md },
|
|
307
|
+
lg: { width: theme.componentSizes.lg, height: theme.componentSizes.md }
|
|
308
308
|
};
|
|
309
309
|
return sizeMap[size];
|
|
310
310
|
}, [size, theme]);
|
|
@@ -329,7 +329,7 @@ var IconButton = ({
|
|
|
329
329
|
const animatedScale = _react2.default.useRef(new _reactnative.Animated.Value(1)).current;
|
|
330
330
|
const animatedOpacity = _react2.default.useRef(new _reactnative.Animated.Value(1)).current;
|
|
331
331
|
const sizeStyles = useIconButtonSizeStyles(size);
|
|
332
|
-
const radiusStyles =
|
|
332
|
+
const radiusStyles = _chunkRZJFCDFScjs.useBorderRadiusStyles.call(void 0, radius);
|
|
333
333
|
const variantStyles = useVariantSizesStyles(themeColor, variant, elevation);
|
|
334
334
|
const { textColor } = useTextStyles(themeColor, variant);
|
|
335
335
|
const handlePressIn = (event) => {
|
|
@@ -376,7 +376,7 @@ var IconButton = ({
|
|
|
376
376
|
]
|
|
377
377
|
},
|
|
378
378
|
isLoading ? /* @__PURE__ */ _react2.default.createElement(
|
|
379
|
-
|
|
379
|
+
_chunkFBTBWI3Pcjs.ActivityIndicator,
|
|
380
380
|
{
|
|
381
381
|
variant: "circular",
|
|
382
382
|
themeColor: variant === "solid" ? void 0 : themeColor,
|