@xaui/native 0.0.26 → 0.0.28
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/LICENSE +21 -0
- package/README.md +105 -228
- package/dist/alert/index.cjs +92 -166
- package/dist/alert/index.js +2 -1
- package/dist/app-bar/index.cjs +24 -98
- package/dist/app-bar/index.js +2 -1
- package/dist/autocomplete/index.cjs +192 -281
- package/dist/autocomplete/index.js +36 -48
- package/dist/avatar/index.cjs +59 -133
- package/dist/avatar/index.js +2 -1
- package/dist/badge/index.cjs +26 -99
- package/dist/badge/index.js +2 -1
- package/dist/bottom-sheet/index.cjs +5 -456
- package/dist/bottom-sheet/index.js +4 -363
- package/dist/bottom-tab-bar/index.cjs +93 -167
- package/dist/bottom-tab-bar/index.js +2 -2
- package/dist/button/index.cjs +73 -525
- package/dist/button/index.js +3 -2
- package/dist/card/index.cjs +76 -169
- package/dist/card/index.js +2 -2
- package/dist/carousel/index.cjs +68 -145
- package/dist/carousel/index.js +1 -1
- package/dist/chart/index.cjs +132 -173
- package/dist/checkbox/index.cjs +70 -143
- package/dist/checkbox/index.js +2 -1
- package/dist/chip/index.cjs +89 -164
- package/dist/chip/index.js +2 -1
- package/dist/chunk-BD72HIPR.cjs +75 -0
- package/dist/chunk-DHSTKO3K.cjs +19 -0
- package/dist/{chunk-CZFDZPAS.js → chunk-DXXNBF5P.js} +5 -0
- package/dist/{chunk-UI5L26KD.js → chunk-F7WH4DMG.js} +1 -1
- package/dist/chunk-GBHQCAKW.js +19 -0
- package/dist/chunk-HC2SSHNU.js +368 -0
- package/dist/chunk-HSPTLUFA.cjs +7 -0
- package/dist/chunk-JEGEPGVU.js +287 -0
- package/dist/chunk-KTLGDLCB.cjs +287 -0
- package/dist/{chunk-GHCVNQET.js → chunk-LTKYHG5V.js} +5 -12
- package/dist/{chunk-ULJSCNPE.js → chunk-LUBWRVI2.js} +1 -1
- package/dist/chunk-OQ2BLOOG.cjs +138 -0
- package/dist/chunk-QMYWIWSX.cjs +384 -0
- package/dist/chunk-XFPPR2VB.cjs +368 -0
- package/dist/core/index.cjs +22 -168
- package/dist/core/index.d.cts +1 -1
- package/dist/core/index.d.ts +1 -1
- package/dist/core/index.js +5 -3
- package/dist/datepicker/index.cjs +239 -320
- package/dist/datepicker/index.js +2 -1
- package/dist/divider/index.cjs +5 -145
- package/dist/divider/index.js +3 -2
- package/dist/drawer/index.cjs +39 -112
- package/dist/drawer/index.js +2 -1
- package/dist/expansion-panel/index.cjs +91 -230
- package/dist/expansion-panel/index.js +3 -2
- package/dist/fab/index.cjs +6 -722
- package/dist/fab/index.js +4 -3
- package/dist/fab-menu/index.cjs +81 -814
- package/dist/fab-menu/index.js +4 -3
- package/dist/feature-discovery/index.cjs +72 -139
- package/dist/feature-discovery/index.js +2 -2
- package/dist/index.cjs +1 -18
- package/dist/indicator/index.cjs +5 -445
- package/dist/indicator/index.js +3 -2
- package/dist/input/index.cjs +214 -282
- package/dist/input/index.js +2 -2
- package/dist/list/index.cjs +71 -146
- package/dist/list/index.js +2 -1
- package/dist/menu/index.cjs +59 -127
- package/dist/menu/index.js +2 -2
- package/dist/menubox/index.cjs +60 -132
- package/dist/menubox/index.js +2 -1
- package/dist/pager/index.cjs +42 -80
- package/dist/progress/index.cjs +43 -114
- package/dist/progress/index.js +2 -1
- package/dist/radio/index.cjs +82 -154
- package/dist/radio/index.js +2 -1
- package/dist/segment-button/index.cjs +60 -147
- package/dist/segment-button/index.js +2 -2
- package/dist/select/index.cjs +149 -224
- package/dist/select/index.js +10 -22
- package/dist/skeleton/index.cjs +23 -94
- package/dist/skeleton/index.js +2 -2
- package/dist/slider/index.cjs +77 -156
- package/dist/slider/index.js +2 -1
- package/dist/snackbar/index.cjs +420 -0
- package/dist/snackbar/index.d.cts +175 -0
- package/dist/snackbar/index.d.ts +175 -0
- package/dist/snackbar/index.js +420 -0
- package/dist/stepper/index.cjs +121 -195
- package/dist/stepper/index.js +2 -1
- package/dist/switch/index.cjs +48 -121
- package/dist/switch/index.js +2 -1
- package/dist/tabs/index.cjs +67 -151
- package/dist/tabs/index.js +2 -1
- package/dist/timepicker/index.cjs +135 -593
- package/dist/timepicker/index.js +24 -383
- package/dist/toolbar/index.cjs +59 -128
- package/dist/toolbar/index.js +2 -1
- package/dist/typography/index.cjs +37 -92
- package/dist/typography/index.d.cts +1 -1
- package/dist/typography/index.d.ts +1 -1
- package/dist/typography/index.js +20 -1
- package/dist/view/index.cjs +178 -223
- package/package.json +7 -1
- package/dist/chunk-3XSXTM3G.js +0 -661
- package/dist/chunk-4KSZLONZ.js +0 -79
- package/dist/chunk-I4V5Y5GD.js +0 -76
- package/dist/chunk-URBEEDFX.js +0 -79
package/dist/select/index.js
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
|
+
import {
|
|
2
|
+
CheckmarkIcon
|
|
3
|
+
} from "../chunk-GBHQCAKW.js";
|
|
4
|
+
import "../chunk-DXXNBF5P.js";
|
|
1
5
|
import {
|
|
2
6
|
useXUITheme
|
|
3
|
-
} from "../chunk-
|
|
7
|
+
} from "../chunk-LTKYHG5V.js";
|
|
4
8
|
|
|
5
9
|
// src/components/select/select.tsx
|
|
6
10
|
import React3, { useCallback as useCallback2, useMemo as useMemo2 } from "react";
|
|
@@ -713,25 +717,9 @@ var Select = ({
|
|
|
713
717
|
};
|
|
714
718
|
|
|
715
719
|
// src/components/select/select-item.tsx
|
|
716
|
-
import
|
|
720
|
+
import React4, { useContext } from "react";
|
|
717
721
|
import { Pressable as Pressable3, Text as Text3, View as View3 } from "react-native";
|
|
718
722
|
|
|
719
|
-
// src/components/select/checkmark-icon.tsx
|
|
720
|
-
import React4 from "react";
|
|
721
|
-
import Svg2, { Polyline } from "react-native-svg";
|
|
722
|
-
function CheckmarkIcon({ color, size }) {
|
|
723
|
-
return /* @__PURE__ */ React4.createElement(Svg2, { width: size, height: size, viewBox: "0 0 17 18", fill: "none" }, /* @__PURE__ */ React4.createElement(
|
|
724
|
-
Polyline,
|
|
725
|
-
{
|
|
726
|
-
points: "1 9 7 14 15 4",
|
|
727
|
-
stroke: color,
|
|
728
|
-
strokeWidth: 2,
|
|
729
|
-
strokeLinecap: "round",
|
|
730
|
-
strokeLinejoin: "round"
|
|
731
|
-
}
|
|
732
|
-
));
|
|
733
|
-
}
|
|
734
|
-
|
|
735
723
|
// src/components/select/select-item.hook.ts
|
|
736
724
|
import { useMemo as useMemo3 } from "react";
|
|
737
725
|
import { getSafeThemeColor as getSafeThemeColor2 } from "@xaui/core";
|
|
@@ -851,7 +839,7 @@ var SelectItem = ({
|
|
|
851
839
|
}
|
|
852
840
|
onSelected?.();
|
|
853
841
|
};
|
|
854
|
-
return /* @__PURE__ */
|
|
842
|
+
return /* @__PURE__ */ React4.createElement(
|
|
855
843
|
Pressable3,
|
|
856
844
|
{
|
|
857
845
|
onPress: handlePress,
|
|
@@ -868,7 +856,7 @@ var SelectItem = ({
|
|
|
868
856
|
]
|
|
869
857
|
},
|
|
870
858
|
startContent,
|
|
871
|
-
/* @__PURE__ */
|
|
859
|
+
/* @__PURE__ */ React4.createElement(View3, { style: styles2.content }, /* @__PURE__ */ React4.createElement(
|
|
872
860
|
Text3,
|
|
873
861
|
{
|
|
874
862
|
style: [
|
|
@@ -878,7 +866,7 @@ var SelectItem = ({
|
|
|
878
866
|
]
|
|
879
867
|
},
|
|
880
868
|
label
|
|
881
|
-
), description && /* @__PURE__ */
|
|
869
|
+
), description && /* @__PURE__ */ React4.createElement(
|
|
882
870
|
Text3,
|
|
883
871
|
{
|
|
884
872
|
style: [
|
|
@@ -888,7 +876,7 @@ var SelectItem = ({
|
|
|
888
876
|
},
|
|
889
877
|
description
|
|
890
878
|
)),
|
|
891
|
-
isSelected && (selectedIcon || /* @__PURE__ */
|
|
879
|
+
isSelected && (selectedIcon || /* @__PURE__ */ React4.createElement(CheckmarkIcon, { color: checkmarkColor, size: 16 })),
|
|
892
880
|
endContent
|
|
893
881
|
);
|
|
894
882
|
};
|
package/dist/skeleton/index.cjs
CHANGED
|
@@ -1,46 +1,15 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(from))
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
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(); } }require('../chunk-HSPTLUFA.cjs');
|
|
29
2
|
|
|
30
|
-
|
|
31
|
-
var
|
|
32
|
-
__export(skeleton_exports, {
|
|
33
|
-
Skeleton: () => Skeleton
|
|
34
|
-
});
|
|
35
|
-
module.exports = __toCommonJS(skeleton_exports);
|
|
3
|
+
|
|
4
|
+
var _chunkOQ2BLOOGcjs = require('../chunk-OQ2BLOOG.cjs');
|
|
36
5
|
|
|
37
6
|
// src/components/skeleton/skeleton.tsx
|
|
38
|
-
var
|
|
39
|
-
var
|
|
7
|
+
var _react = require('react'); var _react2 = _interopRequireDefault(_react);
|
|
8
|
+
var _reactnative = require('react-native');
|
|
40
9
|
|
|
41
10
|
// src/components/skeleton/skeleton.style.ts
|
|
42
|
-
|
|
43
|
-
var styles =
|
|
11
|
+
|
|
12
|
+
var styles = _reactnative.StyleSheet.create({
|
|
44
13
|
skeleton: {
|
|
45
14
|
width: "100%",
|
|
46
15
|
height: 16,
|
|
@@ -49,45 +18,6 @@ var styles = import_react_native.StyleSheet.create({
|
|
|
49
18
|
}
|
|
50
19
|
});
|
|
51
20
|
|
|
52
|
-
// src/core/theme-context.tsx
|
|
53
|
-
var import_react4 = __toESM(require("react"), 1);
|
|
54
|
-
var import_react_native3 = require("react-native");
|
|
55
|
-
var import_theme = require("@xaui/core/theme");
|
|
56
|
-
var import_palette = require("@xaui/core/palette");
|
|
57
|
-
|
|
58
|
-
// src/core/portal/portal.tsx
|
|
59
|
-
var import_react2 = require("react");
|
|
60
|
-
|
|
61
|
-
// src/core/portal/portal-context.ts
|
|
62
|
-
var import_react = require("react");
|
|
63
|
-
var PortalContext = (0, import_react.createContext)(null);
|
|
64
|
-
|
|
65
|
-
// src/core/portal/portal-host.tsx
|
|
66
|
-
var import_react3 = __toESM(require("react"), 1);
|
|
67
|
-
var import_react_native2 = require("react-native");
|
|
68
|
-
var hostStyles = import_react_native2.StyleSheet.create({
|
|
69
|
-
container: {
|
|
70
|
-
flex: 1
|
|
71
|
-
}
|
|
72
|
-
});
|
|
73
|
-
|
|
74
|
-
// src/core/theme-context.tsx
|
|
75
|
-
var XUIThemeContext = (0, import_react4.createContext)(null);
|
|
76
|
-
|
|
77
|
-
// src/core/theme-hooks.ts
|
|
78
|
-
var import_react5 = require("react");
|
|
79
|
-
var import_react_native4 = require("react-native");
|
|
80
|
-
function useXUITheme() {
|
|
81
|
-
const theme = (0, import_react5.useContext)(XUIThemeContext);
|
|
82
|
-
if (!theme) {
|
|
83
|
-
throw new Error("useXUITheme must be used within XUIProvider");
|
|
84
|
-
}
|
|
85
|
-
return theme;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
// src/core/index.ts
|
|
89
|
-
var import_theme2 = require("@xaui/core/theme");
|
|
90
|
-
|
|
91
21
|
// src/components/skeleton/skeleton.tsx
|
|
92
22
|
var Skeleton = ({
|
|
93
23
|
children,
|
|
@@ -99,29 +29,29 @@ var Skeleton = ({
|
|
|
99
29
|
radius = "md",
|
|
100
30
|
style
|
|
101
31
|
}) => {
|
|
102
|
-
const theme = useXUITheme();
|
|
103
|
-
const opacity = (0,
|
|
104
|
-
const resolvedColor = (0,
|
|
105
|
-
() => skeletonColor
|
|
32
|
+
const theme = _chunkOQ2BLOOGcjs.useXUITheme.call(void 0, );
|
|
33
|
+
const opacity = _react.useRef.call(void 0, new _reactnative.Animated.Value(0.6)).current;
|
|
34
|
+
const resolvedColor = _react.useMemo.call(void 0,
|
|
35
|
+
() => _nullishCoalesce(skeletonColor, () => ( theme.colors.default.background)),
|
|
106
36
|
[skeletonColor, theme.colors.default.background]
|
|
107
37
|
);
|
|
108
|
-
const resolvedRadius = (0,
|
|
38
|
+
const resolvedRadius = _react.useMemo.call(void 0,
|
|
109
39
|
() => theme.borderRadius[radius],
|
|
110
40
|
[radius, theme.borderRadius]
|
|
111
41
|
);
|
|
112
|
-
(0,
|
|
42
|
+
_react.useEffect.call(void 0, () => {
|
|
113
43
|
if (isLoaded || disableAnimation) {
|
|
114
44
|
opacity.setValue(1);
|
|
115
45
|
return;
|
|
116
46
|
}
|
|
117
|
-
const loop =
|
|
118
|
-
|
|
119
|
-
|
|
47
|
+
const loop = _reactnative.Animated.loop(
|
|
48
|
+
_reactnative.Animated.sequence([
|
|
49
|
+
_reactnative.Animated.timing(opacity, {
|
|
120
50
|
toValue: 0.35,
|
|
121
51
|
duration: 700,
|
|
122
52
|
useNativeDriver: true
|
|
123
53
|
}),
|
|
124
|
-
|
|
54
|
+
_reactnative.Animated.timing(opacity, {
|
|
125
55
|
toValue: 0.9,
|
|
126
56
|
duration: 700,
|
|
127
57
|
useNativeDriver: true
|
|
@@ -134,10 +64,10 @@ var Skeleton = ({
|
|
|
134
64
|
};
|
|
135
65
|
}, [disableAnimation, isLoaded, opacity]);
|
|
136
66
|
if (isLoaded) {
|
|
137
|
-
return /* @__PURE__ */
|
|
67
|
+
return /* @__PURE__ */ _react2.default.createElement(_react2.default.Fragment, null, children);
|
|
138
68
|
}
|
|
139
|
-
return /* @__PURE__ */
|
|
140
|
-
|
|
69
|
+
return /* @__PURE__ */ _react2.default.createElement(
|
|
70
|
+
_reactnative.Animated.View,
|
|
141
71
|
{
|
|
142
72
|
style: [
|
|
143
73
|
styles.skeleton,
|
|
@@ -154,7 +84,6 @@ var Skeleton = ({
|
|
|
154
84
|
);
|
|
155
85
|
};
|
|
156
86
|
Skeleton.displayName = "Skeleton";
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
});
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
exports.Skeleton = Skeleton;
|
package/dist/skeleton/index.js
CHANGED