@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/button/index.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ActivityIndicator
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-F7WH4DMG.js";
|
|
4
|
+
import "../chunk-DXXNBF5P.js";
|
|
4
5
|
import {
|
|
5
6
|
useBorderRadiusStyles,
|
|
6
7
|
useXUITheme
|
|
7
|
-
} from "../chunk-
|
|
8
|
+
} from "../chunk-LTKYHG5V.js";
|
|
8
9
|
|
|
9
10
|
// src/components/button/button.tsx
|
|
10
11
|
import React from "react";
|
package/dist/card/index.cjs
CHANGED
|
@@ -1,103 +1,16 @@
|
|
|
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);
|
|
29
|
-
|
|
30
|
-
// src/components/card/index.ts
|
|
31
|
-
var card_exports = {};
|
|
32
|
-
__export(card_exports, {
|
|
33
|
-
Card: () => Card,
|
|
34
|
-
CardBody: () => CardBody,
|
|
35
|
-
CardDescription: () => CardDescription,
|
|
36
|
-
CardFooter: () => CardFooter,
|
|
37
|
-
CardHeader: () => CardHeader,
|
|
38
|
-
CardTitle: () => CardTitle
|
|
39
|
-
});
|
|
40
|
-
module.exports = __toCommonJS(card_exports);
|
|
41
|
-
|
|
42
|
-
// src/components/card/card.tsx
|
|
43
|
-
var import_react7 = __toESM(require("react"), 1);
|
|
44
|
-
var import_react_native5 = require("react-native");
|
|
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-HSPTLUFA.cjs');
|
|
45
2
|
|
|
46
|
-
// src/core/theme-hooks.ts
|
|
47
|
-
var import_react5 = require("react");
|
|
48
|
-
var import_react_native3 = require("react-native");
|
|
49
3
|
|
|
50
|
-
// src/core/theme-context.tsx
|
|
51
|
-
var import_react4 = __toESM(require("react"), 1);
|
|
52
|
-
var import_react_native2 = require("react-native");
|
|
53
|
-
var import_theme = require("@xaui/core/theme");
|
|
54
|
-
var import_palette = require("@xaui/core/palette");
|
|
55
4
|
|
|
56
|
-
|
|
57
|
-
var import_react2 = require("react");
|
|
5
|
+
var _chunkOQ2BLOOGcjs = require('../chunk-OQ2BLOOG.cjs');
|
|
58
6
|
|
|
59
|
-
// src/
|
|
60
|
-
var
|
|
61
|
-
var
|
|
62
|
-
|
|
63
|
-
// src/core/portal/portal-host.tsx
|
|
64
|
-
var import_react3 = __toESM(require("react"), 1);
|
|
65
|
-
var import_react_native = require("react-native");
|
|
66
|
-
var hostStyles = import_react_native.StyleSheet.create({
|
|
67
|
-
container: {
|
|
68
|
-
flex: 1
|
|
69
|
-
}
|
|
70
|
-
});
|
|
71
|
-
|
|
72
|
-
// src/core/theme-context.tsx
|
|
73
|
-
var XUIThemeContext = (0, import_react4.createContext)(null);
|
|
74
|
-
|
|
75
|
-
// src/core/theme-hooks.ts
|
|
76
|
-
function useXUITheme() {
|
|
77
|
-
const theme = (0, import_react5.useContext)(XUIThemeContext);
|
|
78
|
-
if (!theme) {
|
|
79
|
-
throw new Error("useXUITheme must be used within XUIProvider");
|
|
80
|
-
}
|
|
81
|
-
return theme;
|
|
82
|
-
}
|
|
83
|
-
function useBorderRadiusStyles(radius) {
|
|
84
|
-
const theme = useXUITheme();
|
|
85
|
-
const borderRadius = (0, import_react5.useMemo)(() => {
|
|
86
|
-
const radiusMap = {
|
|
87
|
-
none: theme.borderRadius.none,
|
|
88
|
-
sm: theme.borderRadius.sm,
|
|
89
|
-
md: theme.borderRadius.md,
|
|
90
|
-
lg: theme.borderRadius.lg,
|
|
91
|
-
full: theme.borderRadius.full
|
|
92
|
-
};
|
|
93
|
-
return { borderRadius: radiusMap[radius] };
|
|
94
|
-
}, [radius, theme]);
|
|
95
|
-
return borderRadius;
|
|
96
|
-
}
|
|
7
|
+
// src/components/card/card.tsx
|
|
8
|
+
var _react = require('react'); var _react2 = _interopRequireDefault(_react);
|
|
9
|
+
var _reactnative = require('react-native');
|
|
97
10
|
|
|
98
11
|
// src/components/card/card.style.ts
|
|
99
|
-
|
|
100
|
-
var styles =
|
|
12
|
+
|
|
13
|
+
var styles = _reactnative.StyleSheet.create({
|
|
101
14
|
card: {
|
|
102
15
|
overflow: "hidden",
|
|
103
16
|
borderWidth: 1
|
|
@@ -143,29 +56,24 @@ var styles = import_react_native4.StyleSheet.create({
|
|
|
143
56
|
});
|
|
144
57
|
|
|
145
58
|
// src/components/card/card.hook.ts
|
|
146
|
-
var import_react6 = require("react");
|
|
147
|
-
var import_core = require("@xaui/core");
|
|
148
|
-
|
|
149
|
-
// src/core/index.ts
|
|
150
|
-
var import_theme2 = require("@xaui/core/theme");
|
|
151
59
|
|
|
152
|
-
|
|
60
|
+
var _core = require('@xaui/core');
|
|
153
61
|
var useCardContainerStyles = (themeColor, isBlurred) => {
|
|
154
|
-
const theme = useXUITheme();
|
|
155
|
-
return (0,
|
|
156
|
-
const safeThemeColor = (0,
|
|
62
|
+
const theme = _chunkOQ2BLOOGcjs.useXUITheme.call(void 0, );
|
|
63
|
+
return _react.useMemo.call(void 0, () => {
|
|
64
|
+
const safeThemeColor = _core.getSafeThemeColor.call(void 0, themeColor);
|
|
157
65
|
const colorScheme = theme.colors[safeThemeColor];
|
|
158
66
|
const isDefaultThemeColor = safeThemeColor === "default";
|
|
159
67
|
const defaultBackgroundColor = theme.mode === "dark" ? theme.colors.default.background : "#FFFFFF";
|
|
160
68
|
return {
|
|
161
69
|
backgroundColor: isBlurred ? theme.mode === "dark" ? "rgba(24, 24, 27, 0.82)" : "rgba(255, 255, 255, 0.82)" : isDefaultThemeColor ? defaultBackgroundColor : colorScheme.background,
|
|
162
|
-
borderColor: (0,
|
|
70
|
+
borderColor: _core.withOpacity.call(void 0, colorScheme.main, 0.05)
|
|
163
71
|
};
|
|
164
72
|
}, [isBlurred, theme, themeColor]);
|
|
165
73
|
};
|
|
166
74
|
var useCardElevationStyles = (elevation = 0) => {
|
|
167
|
-
const theme = useXUITheme();
|
|
168
|
-
return (0,
|
|
75
|
+
const theme = _chunkOQ2BLOOGcjs.useXUITheme.call(void 0, );
|
|
76
|
+
return _react.useMemo.call(void 0, () => {
|
|
169
77
|
const shadowStyles = elevation === 0 ? {} : elevation === 1 ? theme.shadows.sm : elevation === 2 ? theme.shadows.md : elevation === 3 ? theme.shadows.lg : theme.shadows.xl;
|
|
170
78
|
return {
|
|
171
79
|
...shadowStyles,
|
|
@@ -174,20 +82,20 @@ var useCardElevationStyles = (elevation = 0) => {
|
|
|
174
82
|
}, [elevation, theme]);
|
|
175
83
|
};
|
|
176
84
|
var useCardTextStyles = (themeColor) => {
|
|
177
|
-
const theme = useXUITheme();
|
|
178
|
-
return (0,
|
|
179
|
-
const safeThemeColor = (0,
|
|
85
|
+
const theme = _chunkOQ2BLOOGcjs.useXUITheme.call(void 0, );
|
|
86
|
+
return _react.useMemo.call(void 0, () => {
|
|
87
|
+
const safeThemeColor = _core.getSafeThemeColor.call(void 0, themeColor);
|
|
180
88
|
const colorScheme = theme.colors[safeThemeColor];
|
|
181
89
|
return {
|
|
182
90
|
titleColor: colorScheme.main,
|
|
183
|
-
descriptionColor: theme.mode === "dark" ? (0,
|
|
91
|
+
descriptionColor: theme.mode === "dark" ? _core.withOpacity.call(void 0, theme.colors.foreground, 0.8) : _core.withOpacity.call(void 0, theme.colors.foreground, 0.72)
|
|
184
92
|
};
|
|
185
93
|
}, [theme, themeColor]);
|
|
186
94
|
};
|
|
187
95
|
var useCardFooterStyles = (themeColor, isFooterBlurred) => {
|
|
188
|
-
const theme = useXUITheme();
|
|
189
|
-
return (0,
|
|
190
|
-
const safeThemeColor = (0,
|
|
96
|
+
const theme = _chunkOQ2BLOOGcjs.useXUITheme.call(void 0, );
|
|
97
|
+
return _react.useMemo.call(void 0, () => {
|
|
98
|
+
const safeThemeColor = _core.getSafeThemeColor.call(void 0, themeColor);
|
|
191
99
|
const colorScheme = theme.colors[safeThemeColor];
|
|
192
100
|
if (!isFooterBlurred) {
|
|
193
101
|
return {};
|
|
@@ -195,13 +103,13 @@ var useCardFooterStyles = (themeColor, isFooterBlurred) => {
|
|
|
195
103
|
return {
|
|
196
104
|
backgroundColor: theme.mode === "dark" ? "rgba(24, 24, 27, 0.68)" : "rgba(255, 255, 255, 0.72)",
|
|
197
105
|
borderTopWidth: theme.borderWidth.sm,
|
|
198
|
-
borderTopColor: theme.mode === "dark" ? (0,
|
|
106
|
+
borderTopColor: theme.mode === "dark" ? _core.withOpacity.call(void 0, colorScheme.main, 0.4) : _core.withOpacity.call(void 0, colorScheme.main, 0.18)
|
|
199
107
|
};
|
|
200
108
|
}, [isFooterBlurred, theme, themeColor]);
|
|
201
109
|
};
|
|
202
110
|
|
|
203
111
|
// src/components/card/card.tsx
|
|
204
|
-
var CardContext =
|
|
112
|
+
var CardContext = _react2.default.createContext({
|
|
205
113
|
themeColor: "default",
|
|
206
114
|
isFooterBlurred: false
|
|
207
115
|
});
|
|
@@ -226,12 +134,12 @@ var Card = ({
|
|
|
226
134
|
onPressIn,
|
|
227
135
|
onPressOut
|
|
228
136
|
}) => {
|
|
229
|
-
const animatedScale =
|
|
230
|
-
const animatedOpacity =
|
|
231
|
-
const radiusStyles = useBorderRadiusStyles(radius);
|
|
137
|
+
const animatedScale = _react2.default.useRef(new _reactnative.Animated.Value(1)).current;
|
|
138
|
+
const animatedOpacity = _react2.default.useRef(new _reactnative.Animated.Value(1)).current;
|
|
139
|
+
const radiusStyles = _chunkOQ2BLOOGcjs.useBorderRadiusStyles.call(void 0, radius);
|
|
232
140
|
const containerStyles = useCardContainerStyles(themeColor, isBlurred);
|
|
233
141
|
const elevationStyles = useCardElevationStyles(elevation);
|
|
234
|
-
const contextValue =
|
|
142
|
+
const contextValue = _react2.default.useMemo(
|
|
235
143
|
() => ({
|
|
236
144
|
themeColor,
|
|
237
145
|
isFooterBlurred,
|
|
@@ -239,20 +147,20 @@ var Card = ({
|
|
|
239
147
|
}),
|
|
240
148
|
[customAppearance, isFooterBlurred, themeColor]
|
|
241
149
|
);
|
|
242
|
-
const animateTo =
|
|
150
|
+
const animateTo = _react2.default.useCallback(
|
|
243
151
|
(scale, opacity, duration) => {
|
|
244
152
|
if (disableAnimation) {
|
|
245
153
|
animatedScale.setValue(scale);
|
|
246
154
|
animatedOpacity.setValue(opacity);
|
|
247
155
|
return;
|
|
248
156
|
}
|
|
249
|
-
|
|
250
|
-
|
|
157
|
+
_reactnative.Animated.parallel([
|
|
158
|
+
_reactnative.Animated.timing(animatedScale, {
|
|
251
159
|
toValue: scale,
|
|
252
160
|
duration,
|
|
253
161
|
useNativeDriver: true
|
|
254
162
|
}),
|
|
255
|
-
|
|
163
|
+
_reactnative.Animated.timing(animatedOpacity, {
|
|
256
164
|
toValue: opacity,
|
|
257
165
|
duration,
|
|
258
166
|
useNativeDriver: true
|
|
@@ -261,36 +169,36 @@ var Card = ({
|
|
|
261
169
|
},
|
|
262
170
|
[animatedOpacity, animatedScale, disableAnimation]
|
|
263
171
|
);
|
|
264
|
-
const handlePressIn =
|
|
172
|
+
const handlePressIn = _react2.default.useCallback(
|
|
265
173
|
(event) => {
|
|
266
174
|
if (!isDisabled && isPressable) {
|
|
267
175
|
animateTo(0.985, 0.95, 110);
|
|
268
176
|
}
|
|
269
|
-
onPressIn
|
|
177
|
+
_optionalChain([onPressIn, 'optionalCall', _ => _(event)]);
|
|
270
178
|
},
|
|
271
179
|
[animateTo, isDisabled, isPressable, onPressIn]
|
|
272
180
|
);
|
|
273
|
-
const handlePressOut =
|
|
181
|
+
const handlePressOut = _react2.default.useCallback(
|
|
274
182
|
(event) => {
|
|
275
183
|
if (!isDisabled && isPressable) {
|
|
276
184
|
animateTo(1, 1, 140);
|
|
277
185
|
}
|
|
278
|
-
onPressOut
|
|
186
|
+
_optionalChain([onPressOut, 'optionalCall', _2 => _2(event)]);
|
|
279
187
|
},
|
|
280
188
|
[animateTo, isDisabled, isPressable, onPressOut]
|
|
281
189
|
);
|
|
282
|
-
const handleHoverIn =
|
|
190
|
+
const handleHoverIn = _react2.default.useCallback(() => {
|
|
283
191
|
if (!isDisabled && isHoverable && !isPressable) {
|
|
284
192
|
animateTo(1.01, 1, 130);
|
|
285
193
|
}
|
|
286
194
|
}, [animateTo, isDisabled, isHoverable, isPressable]);
|
|
287
|
-
const handleHoverOut =
|
|
195
|
+
const handleHoverOut = _react2.default.useCallback(() => {
|
|
288
196
|
if (!isDisabled && isHoverable && !isPressable) {
|
|
289
197
|
animateTo(1, 1, 130);
|
|
290
198
|
}
|
|
291
199
|
}, [animateTo, isDisabled, isHoverable, isPressable]);
|
|
292
|
-
const cardContent = /* @__PURE__ */
|
|
293
|
-
|
|
200
|
+
const cardContent = /* @__PURE__ */ _react2.default.createElement(
|
|
201
|
+
_reactnative.Animated.View,
|
|
294
202
|
{
|
|
295
203
|
style: [
|
|
296
204
|
styles.card,
|
|
@@ -304,16 +212,16 @@ var Card = ({
|
|
|
304
212
|
transform: [{ scale: animatedScale }],
|
|
305
213
|
opacity: animatedOpacity
|
|
306
214
|
},
|
|
307
|
-
customAppearance
|
|
215
|
+
_optionalChain([customAppearance, 'optionalAccess', _3 => _3.container])
|
|
308
216
|
]
|
|
309
217
|
},
|
|
310
|
-
/* @__PURE__ */
|
|
218
|
+
/* @__PURE__ */ _react2.default.createElement(CardContext.Provider, { value: contextValue }, children)
|
|
311
219
|
);
|
|
312
220
|
if (!isPressable) {
|
|
313
221
|
return cardContent;
|
|
314
222
|
}
|
|
315
|
-
return /* @__PURE__ */
|
|
316
|
-
|
|
223
|
+
return /* @__PURE__ */ _react2.default.createElement(
|
|
224
|
+
_reactnative.Pressable,
|
|
317
225
|
{
|
|
318
226
|
onPress: isDisabled ? void 0 : onPress,
|
|
319
227
|
onLongPress: isDisabled ? void 0 : onLongPress,
|
|
@@ -330,14 +238,14 @@ var CardHeader = ({
|
|
|
330
238
|
children,
|
|
331
239
|
customAppearance
|
|
332
240
|
}) => {
|
|
333
|
-
const cardContext =
|
|
334
|
-
return /* @__PURE__ */
|
|
335
|
-
|
|
241
|
+
const cardContext = _react2.default.useContext(CardContext);
|
|
242
|
+
return /* @__PURE__ */ _react2.default.createElement(
|
|
243
|
+
_reactnative.View,
|
|
336
244
|
{
|
|
337
245
|
style: [
|
|
338
246
|
styles.header,
|
|
339
|
-
cardContext.customAppearance
|
|
340
|
-
customAppearance
|
|
247
|
+
_optionalChain([cardContext, 'access', _4 => _4.customAppearance, 'optionalAccess', _5 => _5.header]),
|
|
248
|
+
_optionalChain([customAppearance, 'optionalAccess', _6 => _6.container])
|
|
341
249
|
]
|
|
342
250
|
},
|
|
343
251
|
children
|
|
@@ -347,14 +255,14 @@ var CardBody = ({
|
|
|
347
255
|
children,
|
|
348
256
|
customAppearance
|
|
349
257
|
}) => {
|
|
350
|
-
const cardContext =
|
|
351
|
-
return /* @__PURE__ */
|
|
352
|
-
|
|
258
|
+
const cardContext = _react2.default.useContext(CardContext);
|
|
259
|
+
return /* @__PURE__ */ _react2.default.createElement(
|
|
260
|
+
_reactnative.View,
|
|
353
261
|
{
|
|
354
262
|
style: [
|
|
355
263
|
styles.body,
|
|
356
|
-
cardContext.customAppearance
|
|
357
|
-
customAppearance
|
|
264
|
+
_optionalChain([cardContext, 'access', _7 => _7.customAppearance, 'optionalAccess', _8 => _8.body]),
|
|
265
|
+
_optionalChain([customAppearance, 'optionalAccess', _9 => _9.container])
|
|
358
266
|
]
|
|
359
267
|
},
|
|
360
268
|
children
|
|
@@ -364,19 +272,19 @@ var CardFooter = ({
|
|
|
364
272
|
children,
|
|
365
273
|
customAppearance
|
|
366
274
|
}) => {
|
|
367
|
-
const cardContext =
|
|
275
|
+
const cardContext = _react2.default.useContext(CardContext);
|
|
368
276
|
const footerStyles = useCardFooterStyles(
|
|
369
277
|
cardContext.themeColor,
|
|
370
278
|
cardContext.isFooterBlurred
|
|
371
279
|
);
|
|
372
|
-
return /* @__PURE__ */
|
|
373
|
-
|
|
280
|
+
return /* @__PURE__ */ _react2.default.createElement(
|
|
281
|
+
_reactnative.View,
|
|
374
282
|
{
|
|
375
283
|
style: [
|
|
376
284
|
styles.footer,
|
|
377
285
|
footerStyles,
|
|
378
|
-
cardContext.customAppearance
|
|
379
|
-
customAppearance
|
|
286
|
+
_optionalChain([cardContext, 'access', _10 => _10.customAppearance, 'optionalAccess', _11 => _11.footer]),
|
|
287
|
+
_optionalChain([customAppearance, 'optionalAccess', _12 => _12.container])
|
|
380
288
|
]
|
|
381
289
|
},
|
|
382
290
|
children
|
|
@@ -386,16 +294,16 @@ var CardTitle = ({
|
|
|
386
294
|
children,
|
|
387
295
|
customAppearance
|
|
388
296
|
}) => {
|
|
389
|
-
const cardContext =
|
|
297
|
+
const cardContext = _react2.default.useContext(CardContext);
|
|
390
298
|
const { titleColor } = useCardTextStyles(cardContext.themeColor);
|
|
391
|
-
return /* @__PURE__ */
|
|
392
|
-
|
|
299
|
+
return /* @__PURE__ */ _react2.default.createElement(
|
|
300
|
+
_reactnative.Text,
|
|
393
301
|
{
|
|
394
302
|
style: [
|
|
395
303
|
styles.title,
|
|
396
304
|
{ color: titleColor },
|
|
397
|
-
cardContext.customAppearance
|
|
398
|
-
customAppearance
|
|
305
|
+
_optionalChain([cardContext, 'access', _13 => _13.customAppearance, 'optionalAccess', _14 => _14.title]),
|
|
306
|
+
_optionalChain([customAppearance, 'optionalAccess', _15 => _15.text])
|
|
399
307
|
]
|
|
400
308
|
},
|
|
401
309
|
children
|
|
@@ -405,27 +313,26 @@ var CardDescription = ({
|
|
|
405
313
|
children,
|
|
406
314
|
customAppearance
|
|
407
315
|
}) => {
|
|
408
|
-
const cardContext =
|
|
316
|
+
const cardContext = _react2.default.useContext(CardContext);
|
|
409
317
|
const { descriptionColor } = useCardTextStyles(cardContext.themeColor);
|
|
410
|
-
return /* @__PURE__ */
|
|
411
|
-
|
|
318
|
+
return /* @__PURE__ */ _react2.default.createElement(
|
|
319
|
+
_reactnative.Text,
|
|
412
320
|
{
|
|
413
321
|
style: [
|
|
414
322
|
styles.description,
|
|
415
323
|
{ color: descriptionColor },
|
|
416
|
-
cardContext.customAppearance
|
|
417
|
-
customAppearance
|
|
324
|
+
_optionalChain([cardContext, 'access', _16 => _16.customAppearance, 'optionalAccess', _17 => _17.description]),
|
|
325
|
+
_optionalChain([customAppearance, 'optionalAccess', _18 => _18.text])
|
|
418
326
|
]
|
|
419
327
|
},
|
|
420
328
|
children
|
|
421
329
|
);
|
|
422
330
|
};
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
});
|
|
331
|
+
|
|
332
|
+
|
|
333
|
+
|
|
334
|
+
|
|
335
|
+
|
|
336
|
+
|
|
337
|
+
|
|
338
|
+
exports.Card = Card; exports.CardBody = CardBody; exports.CardDescription = CardDescription; exports.CardFooter = CardFooter; exports.CardHeader = CardHeader; exports.CardTitle = CardTitle;
|
package/dist/card/index.js
CHANGED