@xaui/native 0.2.7 → 0.9.1-alpha.0
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/chunk-JDS6KGCM.cjs +791 -0
- package/dist/chunk-T3ZI2PZ6.js +791 -0
- package/dist/index.cjs +32 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +32 -0
- package/dist/theme/index.cjs +32 -0
- package/dist/theme/index.d.cts +669 -0
- package/dist/theme/index.d.ts +669 -0
- package/dist/theme/index.js +32 -0
- package/package.json +26 -249
- package/README.md +0 -178
- package/dist/alert/index.cjs +0 -356
- package/dist/alert/index.d.cts +0 -90
- package/dist/alert/index.d.ts +0 -90
- package/dist/alert/index.js +0 -356
- package/dist/app-bar/index.cjs +0 -148
- package/dist/app-bar/index.d.cts +0 -59
- package/dist/app-bar/index.d.ts +0 -59
- package/dist/app-bar/index.js +0 -148
- package/dist/autocomplete/index.cjs +0 -1122
- package/dist/autocomplete/index.d.cts +0 -88
- package/dist/autocomplete/index.d.ts +0 -88
- package/dist/autocomplete/index.js +0 -1122
- package/dist/avatar/index.cjs +0 -281
- package/dist/avatar/index.d.cts +0 -123
- package/dist/avatar/index.d.ts +0 -123
- package/dist/avatar/index.js +0 -281
- package/dist/badge/index.cjs +0 -197
- package/dist/badge/index.d.cts +0 -94
- package/dist/badge/index.d.ts +0 -94
- package/dist/badge/index.js +0 -197
- package/dist/bottom-sheet/index.cjs +0 -9
- package/dist/bottom-sheet/index.d.cts +0 -84
- package/dist/bottom-sheet/index.d.ts +0 -84
- package/dist/bottom-sheet/index.js +0 -9
- package/dist/bottom-tab-bar/index.cjs +0 -497
- package/dist/bottom-tab-bar/index.d.cts +0 -211
- package/dist/bottom-tab-bar/index.d.ts +0 -211
- package/dist/bottom-tab-bar/index.js +0 -497
- package/dist/button/index.cjs +0 -392
- package/dist/button/index.d.cts +0 -174
- package/dist/button/index.d.ts +0 -174
- package/dist/button/index.js +0 -392
- package/dist/button.type-j1ZdkkSl.d.cts +0 -4
- package/dist/button.type-j1ZdkkSl.d.ts +0 -4
- package/dist/card/index.cjs +0 -338
- package/dist/card/index.d.cts +0 -191
- package/dist/card/index.d.ts +0 -191
- package/dist/card/index.js +0 -338
- package/dist/carousel/index.cjs +0 -381
- package/dist/carousel/index.d.cts +0 -147
- package/dist/carousel/index.d.ts +0 -147
- package/dist/carousel/index.js +0 -381
- package/dist/chart/index.cjs +0 -1026
- package/dist/chart/index.d.cts +0 -218
- package/dist/chart/index.d.ts +0 -218
- package/dist/chart/index.js +0 -1026
- package/dist/checkbox/index.cjs +0 -443
- package/dist/checkbox/index.d.cts +0 -73
- package/dist/checkbox/index.d.ts +0 -73
- package/dist/checkbox/index.js +0 -443
- package/dist/chip/index.cjs +0 -503
- package/dist/chip/index.d.cts +0 -195
- package/dist/chip/index.d.ts +0 -195
- package/dist/chip/index.js +0 -503
- package/dist/chunk-4JFWQ5XT.js +0 -368
- package/dist/chunk-56RPWZD2.cjs +0 -9
- package/dist/chunk-7UFBLUMV.cjs +0 -136
- package/dist/chunk-A45TVXU5.js +0 -337
- package/dist/chunk-BYWUAPC4.cjs +0 -368
- package/dist/chunk-DECMUMCI.js +0 -0
- package/dist/chunk-DHSTKO3K.cjs +0 -19
- package/dist/chunk-DJ4Q37UT.cjs +0 -75
- package/dist/chunk-EUQDGTST.cjs +0 -1
- package/dist/chunk-GBHQCAKW.js +0 -19
- package/dist/chunk-RBSA4NH4.js +0 -136
- package/dist/chunk-SHBDANQN.js +0 -9
- package/dist/chunk-UGEINZM7.cjs +0 -290
- package/dist/chunk-UU4HHBDN.js +0 -290
- package/dist/chunk-VSZEXOUN.js +0 -384
- package/dist/chunk-YIEUN3G5.cjs +0 -384
- package/dist/chunk-ZH6ZSV2Q.cjs +0 -337
- package/dist/chunk-ZY7IUTAT.js +0 -75
- package/dist/color-picker/index.cjs +0 -457
- package/dist/color-picker/index.d.cts +0 -124
- package/dist/color-picker/index.d.ts +0 -124
- package/dist/color-picker/index.js +0 -457
- package/dist/core/index.cjs +0 -24
- package/dist/core/index.d.cts +0 -28
- package/dist/core/index.d.ts +0 -28
- package/dist/core/index.js +0 -24
- package/dist/datepicker/index.cjs +0 -1625
- package/dist/datepicker/index.d.cts +0 -45
- package/dist/datepicker/index.d.ts +0 -45
- package/dist/datepicker/index.js +0 -1625
- package/dist/dialog/index.cjs +0 -372
- package/dist/dialog/index.d.cts +0 -151
- package/dist/dialog/index.d.ts +0 -151
- package/dist/dialog/index.js +0 -372
- package/dist/divider/index.cjs +0 -8
- package/dist/divider/index.d.cts +0 -30
- package/dist/divider/index.d.ts +0 -30
- package/dist/divider/index.js +0 -8
- package/dist/drawer/index.cjs +0 -237
- package/dist/drawer/index.d.cts +0 -58
- package/dist/drawer/index.d.ts +0 -58
- package/dist/drawer/index.js +0 -237
- package/dist/expansion-panel/index.cjs +0 -441
- package/dist/expansion-panel/index.d.cts +0 -153
- package/dist/expansion-panel/index.d.ts +0 -153
- package/dist/expansion-panel/index.js +0 -441
- package/dist/fab/index.cjs +0 -9
- package/dist/fab/index.d.cts +0 -10
- package/dist/fab/index.d.ts +0 -10
- package/dist/fab/index.js +0 -9
- package/dist/fab-menu/index.cjs +0 -330
- package/dist/fab-menu/index.d.cts +0 -125
- package/dist/fab-menu/index.d.ts +0 -125
- package/dist/fab-menu/index.js +0 -330
- package/dist/fab.type-CkUHmXU_.d.ts +0 -86
- package/dist/fab.type-DN0vtAh6.d.cts +0 -86
- package/dist/feature-discovery/index.cjs +0 -464
- package/dist/feature-discovery/index.d.cts +0 -82
- package/dist/feature-discovery/index.d.ts +0 -82
- package/dist/feature-discovery/index.js +0 -464
- package/dist/indicator/index.cjs +0 -8
- package/dist/indicator/index.d.cts +0 -47
- package/dist/indicator/index.d.ts +0 -47
- package/dist/indicator/index.js +0 -8
- package/dist/input/index.cjs +0 -1462
- package/dist/input/index.d.cts +0 -522
- package/dist/input/index.d.ts +0 -522
- package/dist/input/index.js +0 -1462
- package/dist/input-trigger/index.cjs +0 -197
- package/dist/input-trigger/index.d.cts +0 -11
- package/dist/input-trigger/index.d.ts +0 -11
- package/dist/input-trigger/index.js +0 -197
- package/dist/input-trigger.type-Ba4bM3Qp.d.cts +0 -180
- package/dist/input-trigger.type-Ba4bM3Qp.d.ts +0 -180
- package/dist/list/index.cjs +0 -395
- package/dist/list/index.d.cts +0 -188
- package/dist/list/index.d.ts +0 -188
- package/dist/list/index.js +0 -395
- package/dist/menu/index.cjs +0 -316
- package/dist/menu/index.d.cts +0 -115
- package/dist/menu/index.d.ts +0 -115
- package/dist/menu/index.js +0 -316
- package/dist/menubox/index.cjs +0 -297
- package/dist/menubox/index.d.cts +0 -98
- package/dist/menubox/index.d.ts +0 -98
- package/dist/menubox/index.js +0 -297
- package/dist/pager/index.cjs +0 -205
- package/dist/pager/index.d.cts +0 -93
- package/dist/pager/index.d.ts +0 -93
- package/dist/pager/index.js +0 -205
- package/dist/picker/index.cjs +0 -244
- package/dist/picker/index.d.cts +0 -121
- package/dist/picker/index.d.ts +0 -121
- package/dist/picker/index.js +0 -244
- package/dist/progress/index.cjs +0 -219
- package/dist/progress/index.d.cts +0 -47
- package/dist/progress/index.d.ts +0 -47
- package/dist/progress/index.js +0 -219
- package/dist/radio/index.cjs +0 -465
- package/dist/radio/index.d.cts +0 -145
- package/dist/radio/index.d.ts +0 -145
- package/dist/radio/index.js +0 -465
- package/dist/refresh-control/index.cjs +0 -45
- package/dist/refresh-control/index.d.cts +0 -55
- package/dist/refresh-control/index.d.ts +0 -55
- package/dist/refresh-control/index.js +0 -45
- package/dist/segment-button/index.cjs +0 -405
- package/dist/segment-button/index.d.cts +0 -141
- package/dist/segment-button/index.d.ts +0 -141
- package/dist/segment-button/index.js +0 -405
- package/dist/select/index.cjs +0 -878
- package/dist/select/index.d.cts +0 -192
- package/dist/select/index.d.ts +0 -192
- package/dist/select/index.js +0 -878
- package/dist/skeleton/index.cjs +0 -89
- package/dist/skeleton/index.d.cts +0 -45
- package/dist/skeleton/index.d.ts +0 -45
- package/dist/skeleton/index.js +0 -89
- package/dist/slider/index.cjs +0 -576
- package/dist/slider/index.d.cts +0 -171
- package/dist/slider/index.d.ts +0 -171
- package/dist/slider/index.js +0 -576
- package/dist/snackbar/index.cjs +0 -436
- package/dist/snackbar/index.d.cts +0 -174
- package/dist/snackbar/index.d.ts +0 -174
- package/dist/snackbar/index.js +0 -436
- package/dist/snippet/index.cjs +0 -314
- package/dist/snippet/index.d.cts +0 -95
- package/dist/snippet/index.d.ts +0 -95
- package/dist/snippet/index.js +0 -314
- package/dist/stepper/index.cjs +0 -550
- package/dist/stepper/index.d.cts +0 -137
- package/dist/stepper/index.d.ts +0 -137
- package/dist/stepper/index.js +0 -550
- package/dist/switch/index.cjs +0 -358
- package/dist/switch/index.d.cts +0 -28
- package/dist/switch/index.d.ts +0 -28
- package/dist/switch/index.js +0 -358
- package/dist/tabs/index.cjs +0 -440
- package/dist/tabs/index.d.cts +0 -180
- package/dist/tabs/index.d.ts +0 -180
- package/dist/tabs/index.js +0 -440
- package/dist/timepicker/index.cjs +0 -823
- package/dist/timepicker/index.d.cts +0 -215
- package/dist/timepicker/index.d.ts +0 -215
- package/dist/timepicker/index.js +0 -823
- package/dist/toolbar/index.cjs +0 -333
- package/dist/toolbar/index.d.cts +0 -100
- package/dist/toolbar/index.d.ts +0 -100
- package/dist/toolbar/index.js +0 -333
- package/dist/typography/index.cjs +0 -238
- package/dist/typography/index.d.cts +0 -113
- package/dist/typography/index.d.ts +0 -113
- package/dist/typography/index.js +0 -238
- package/dist/view/index.cjs +0 -1361
- package/dist/view/index.d.cts +0 -833
- package/dist/view/index.d.ts +0 -833
- package/dist/view/index.js +0 -1361
package/dist/app-bar/index.js
DELETED
|
@@ -1,148 +0,0 @@
|
|
|
1
|
-
import "../chunk-SHBDANQN.js";
|
|
2
|
-
import {
|
|
3
|
-
useXUITheme
|
|
4
|
-
} from "../chunk-RBSA4NH4.js";
|
|
5
|
-
|
|
6
|
-
// src/components/app-bar/app-bar.tsx
|
|
7
|
-
import React from "react";
|
|
8
|
-
import { View } from "react-native";
|
|
9
|
-
import { getSafeThemeColor } from "@xaui/core";
|
|
10
|
-
|
|
11
|
-
// src/components/app-bar/app-bar.hook.ts
|
|
12
|
-
import { useMemo } from "react";
|
|
13
|
-
var resolveShadowStyle = (elevation, shadows) => {
|
|
14
|
-
if (elevation <= 1) {
|
|
15
|
-
return shadows.sm;
|
|
16
|
-
}
|
|
17
|
-
if (elevation <= 2) {
|
|
18
|
-
return shadows.md;
|
|
19
|
-
}
|
|
20
|
-
if (elevation <= 3) {
|
|
21
|
-
return shadows.lg;
|
|
22
|
-
}
|
|
23
|
-
return shadows.xl;
|
|
24
|
-
};
|
|
25
|
-
var useAppBarElevationStyles = (elevation = 0) => {
|
|
26
|
-
const theme = useXUITheme();
|
|
27
|
-
return useMemo(() => {
|
|
28
|
-
if (elevation <= 0) {
|
|
29
|
-
return {};
|
|
30
|
-
}
|
|
31
|
-
return {
|
|
32
|
-
...resolveShadowStyle(elevation, theme.shadows),
|
|
33
|
-
elevation
|
|
34
|
-
};
|
|
35
|
-
}, [elevation, theme.shadows]);
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
// src/components/app-bar/app-bar.style.ts
|
|
39
|
-
import { StyleSheet } from "react-native";
|
|
40
|
-
var styles = StyleSheet.create({
|
|
41
|
-
container: {
|
|
42
|
-
flexShrink: 1,
|
|
43
|
-
flexBasis: "auto",
|
|
44
|
-
width: "100%"
|
|
45
|
-
},
|
|
46
|
-
floatingContainer: {
|
|
47
|
-
paddingVertical: 8
|
|
48
|
-
},
|
|
49
|
-
appBar: {
|
|
50
|
-
minHeight: 64,
|
|
51
|
-
flexDirection: "row",
|
|
52
|
-
alignItems: "center",
|
|
53
|
-
paddingHorizontal: 16
|
|
54
|
-
},
|
|
55
|
-
docked: {
|
|
56
|
-
width: "100%",
|
|
57
|
-
borderRadius: 0
|
|
58
|
-
},
|
|
59
|
-
floating: {
|
|
60
|
-
flexShrink: 1,
|
|
61
|
-
flexBasis: "auto",
|
|
62
|
-
maxWidth: "97%",
|
|
63
|
-
borderRadius: 9999,
|
|
64
|
-
alignSelf: "center"
|
|
65
|
-
},
|
|
66
|
-
startContent: {
|
|
67
|
-
flexShrink: 0,
|
|
68
|
-
flexDirection: "row",
|
|
69
|
-
alignItems: "center",
|
|
70
|
-
gap: 8,
|
|
71
|
-
minWidth: 40
|
|
72
|
-
},
|
|
73
|
-
content: {
|
|
74
|
-
flex: 1,
|
|
75
|
-
alignItems: "center",
|
|
76
|
-
justifyContent: "center",
|
|
77
|
-
paddingHorizontal: 10
|
|
78
|
-
},
|
|
79
|
-
endContent: {
|
|
80
|
-
flexShrink: 0,
|
|
81
|
-
flexDirection: "row",
|
|
82
|
-
alignItems: "center",
|
|
83
|
-
justifyContent: "flex-end",
|
|
84
|
-
gap: 8,
|
|
85
|
-
minWidth: 40
|
|
86
|
-
}
|
|
87
|
-
});
|
|
88
|
-
|
|
89
|
-
// src/components/app-bar/app-bar.tsx
|
|
90
|
-
var AppBar = ({
|
|
91
|
-
variant = "docked",
|
|
92
|
-
elevation = 0,
|
|
93
|
-
themeColor = "default",
|
|
94
|
-
children,
|
|
95
|
-
style
|
|
96
|
-
}) => {
|
|
97
|
-
const theme = useXUITheme();
|
|
98
|
-
const elevationStyles = useAppBarElevationStyles(elevation);
|
|
99
|
-
const isFloating = variant === "floating";
|
|
100
|
-
const safeThemeColor = getSafeThemeColor(themeColor);
|
|
101
|
-
const colorScheme = theme.colors[safeThemeColor];
|
|
102
|
-
const isDefaultThemeColor = safeThemeColor === "default";
|
|
103
|
-
const backgroundColor = isDefaultThemeColor ? theme.mode === "dark" ? theme.colors.default.container : isFloating ? theme.palette.gray[200] : "#FFFFFF" : colorScheme.container;
|
|
104
|
-
const borderBottomColor = isDefaultThemeColor ? theme.mode === "dark" ? "rgba(255, 255, 255, 0.06)" : "rgba(0, 0, 0, 0.08)" : colorScheme.main;
|
|
105
|
-
return /* @__PURE__ */ React.createElement(View, { style: [styles.container, isFloating && styles.floatingContainer] }, /* @__PURE__ */ React.createElement(
|
|
106
|
-
View,
|
|
107
|
-
{
|
|
108
|
-
style: [
|
|
109
|
-
styles.appBar,
|
|
110
|
-
isFloating ? styles.floating : styles.docked,
|
|
111
|
-
{
|
|
112
|
-
backgroundColor,
|
|
113
|
-
borderBottomWidth: isFloating ? 0 : 1,
|
|
114
|
-
borderBottomColor
|
|
115
|
-
},
|
|
116
|
-
elevationStyles,
|
|
117
|
-
style
|
|
118
|
-
]
|
|
119
|
-
},
|
|
120
|
-
children
|
|
121
|
-
));
|
|
122
|
-
};
|
|
123
|
-
var AppBarStartContent = ({
|
|
124
|
-
children,
|
|
125
|
-
style
|
|
126
|
-
}) => {
|
|
127
|
-
return /* @__PURE__ */ React.createElement(View, { style: [styles.startContent, style] }, children);
|
|
128
|
-
};
|
|
129
|
-
var AppBarContent = ({
|
|
130
|
-
children,
|
|
131
|
-
alignment = "center",
|
|
132
|
-
style
|
|
133
|
-
}) => {
|
|
134
|
-
const alignItems = alignment === "start" ? "flex-start" : alignment === "center" ? "center" : "flex-end";
|
|
135
|
-
return /* @__PURE__ */ React.createElement(View, { style: [styles.content, { alignItems }, style] }, children);
|
|
136
|
-
};
|
|
137
|
-
var AppBarEndContent = ({
|
|
138
|
-
children,
|
|
139
|
-
style
|
|
140
|
-
}) => {
|
|
141
|
-
return /* @__PURE__ */ React.createElement(View, { style: [styles.endContent, style] }, children);
|
|
142
|
-
};
|
|
143
|
-
export {
|
|
144
|
-
AppBar,
|
|
145
|
-
AppBarContent,
|
|
146
|
-
AppBarEndContent,
|
|
147
|
-
AppBarStartContent
|
|
148
|
-
};
|