@xaui/native 0.2.8 → 0.9.1-alpha.1

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.
Files changed (234) hide show
  1. package/dist/chunk-KFCORXWW.cjs +150 -0
  2. package/dist/chunk-M7P46XKI.cjs +100 -0
  3. package/dist/chunk-N357EQCZ.js +150 -0
  4. package/dist/chunk-NHPQQQ7P.cjs +734 -0
  5. package/dist/chunk-PBVPOX7D.js +734 -0
  6. package/dist/chunk-RBNCR5KB.js +100 -0
  7. package/dist/index.cjs +40 -1
  8. package/dist/index.d.cts +5 -2
  9. package/dist/index.d.ts +5 -2
  10. package/dist/index.js +40 -0
  11. package/dist/system/index.cjs +7 -0
  12. package/dist/system/index.d.cts +83 -0
  13. package/dist/system/index.d.ts +83 -0
  14. package/dist/system/index.js +7 -0
  15. package/dist/theme/index.cjs +36 -0
  16. package/dist/theme/index.d.cts +539 -0
  17. package/dist/theme/index.d.ts +539 -0
  18. package/dist/theme/index.js +36 -0
  19. package/dist/theme.type-B3ODSLbB.d.cts +153 -0
  20. package/dist/theme.type-B3ODSLbB.d.ts +153 -0
  21. package/package.json +30 -248
  22. package/README.md +0 -178
  23. package/dist/alert/index.cjs +0 -340
  24. package/dist/alert/index.d.cts +0 -46
  25. package/dist/alert/index.d.ts +0 -46
  26. package/dist/alert/index.js +0 -340
  27. package/dist/app-bar/index.cjs +0 -148
  28. package/dist/app-bar/index.d.cts +0 -59
  29. package/dist/app-bar/index.d.ts +0 -59
  30. package/dist/app-bar/index.js +0 -148
  31. package/dist/autocomplete/index.cjs +0 -1122
  32. package/dist/autocomplete/index.d.cts +0 -88
  33. package/dist/autocomplete/index.d.ts +0 -88
  34. package/dist/autocomplete/index.js +0 -1122
  35. package/dist/avatar/index.cjs +0 -281
  36. package/dist/avatar/index.d.cts +0 -123
  37. package/dist/avatar/index.d.ts +0 -123
  38. package/dist/avatar/index.js +0 -281
  39. package/dist/badge/index.cjs +0 -197
  40. package/dist/badge/index.d.cts +0 -94
  41. package/dist/badge/index.d.ts +0 -94
  42. package/dist/badge/index.js +0 -197
  43. package/dist/bottom-sheet/index.cjs +0 -9
  44. package/dist/bottom-sheet/index.d.cts +0 -84
  45. package/dist/bottom-sheet/index.d.ts +0 -84
  46. package/dist/bottom-sheet/index.js +0 -9
  47. package/dist/bottom-tab-bar/index.cjs +0 -497
  48. package/dist/bottom-tab-bar/index.d.cts +0 -211
  49. package/dist/bottom-tab-bar/index.d.ts +0 -211
  50. package/dist/bottom-tab-bar/index.js +0 -497
  51. package/dist/button/index.cjs +0 -392
  52. package/dist/button/index.d.cts +0 -174
  53. package/dist/button/index.d.ts +0 -174
  54. package/dist/button/index.js +0 -392
  55. package/dist/button.type-j1ZdkkSl.d.cts +0 -4
  56. package/dist/button.type-j1ZdkkSl.d.ts +0 -4
  57. package/dist/card/index.cjs +0 -338
  58. package/dist/card/index.d.cts +0 -191
  59. package/dist/card/index.d.ts +0 -191
  60. package/dist/card/index.js +0 -338
  61. package/dist/carousel/index.cjs +0 -381
  62. package/dist/carousel/index.d.cts +0 -147
  63. package/dist/carousel/index.d.ts +0 -147
  64. package/dist/carousel/index.js +0 -381
  65. package/dist/chart/index.cjs +0 -1026
  66. package/dist/chart/index.d.cts +0 -218
  67. package/dist/chart/index.d.ts +0 -218
  68. package/dist/chart/index.js +0 -1026
  69. package/dist/checkbox/index.cjs +0 -443
  70. package/dist/checkbox/index.d.cts +0 -73
  71. package/dist/checkbox/index.d.ts +0 -73
  72. package/dist/checkbox/index.js +0 -443
  73. package/dist/chip/index.cjs +0 -503
  74. package/dist/chip/index.d.cts +0 -195
  75. package/dist/chip/index.d.ts +0 -195
  76. package/dist/chip/index.js +0 -503
  77. package/dist/chunk-4JFWQ5XT.js +0 -368
  78. package/dist/chunk-56RPWZD2.cjs +0 -9
  79. package/dist/chunk-7UFBLUMV.cjs +0 -136
  80. package/dist/chunk-A45TVXU5.js +0 -337
  81. package/dist/chunk-BYWUAPC4.cjs +0 -368
  82. package/dist/chunk-DECMUMCI.js +0 -0
  83. package/dist/chunk-DHSTKO3K.cjs +0 -19
  84. package/dist/chunk-DJ4Q37UT.cjs +0 -75
  85. package/dist/chunk-EUQDGTST.cjs +0 -1
  86. package/dist/chunk-GBHQCAKW.js +0 -19
  87. package/dist/chunk-RBSA4NH4.js +0 -136
  88. package/dist/chunk-SHBDANQN.js +0 -9
  89. package/dist/chunk-UGEINZM7.cjs +0 -290
  90. package/dist/chunk-UU4HHBDN.js +0 -290
  91. package/dist/chunk-VSZEXOUN.js +0 -384
  92. package/dist/chunk-YIEUN3G5.cjs +0 -384
  93. package/dist/chunk-ZH6ZSV2Q.cjs +0 -337
  94. package/dist/chunk-ZY7IUTAT.js +0 -75
  95. package/dist/color-picker/index.cjs +0 -457
  96. package/dist/color-picker/index.d.cts +0 -124
  97. package/dist/color-picker/index.d.ts +0 -124
  98. package/dist/color-picker/index.js +0 -457
  99. package/dist/core/index.cjs +0 -24
  100. package/dist/core/index.d.cts +0 -28
  101. package/dist/core/index.d.ts +0 -28
  102. package/dist/core/index.js +0 -24
  103. package/dist/datepicker/index.cjs +0 -1625
  104. package/dist/datepicker/index.d.cts +0 -45
  105. package/dist/datepicker/index.d.ts +0 -45
  106. package/dist/datepicker/index.js +0 -1625
  107. package/dist/dialog/index.cjs +0 -372
  108. package/dist/dialog/index.d.cts +0 -151
  109. package/dist/dialog/index.d.ts +0 -151
  110. package/dist/dialog/index.js +0 -372
  111. package/dist/divider/index.cjs +0 -8
  112. package/dist/divider/index.d.cts +0 -30
  113. package/dist/divider/index.d.ts +0 -30
  114. package/dist/divider/index.js +0 -8
  115. package/dist/drawer/index.cjs +0 -237
  116. package/dist/drawer/index.d.cts +0 -58
  117. package/dist/drawer/index.d.ts +0 -58
  118. package/dist/drawer/index.js +0 -237
  119. package/dist/expansion-panel/index.cjs +0 -441
  120. package/dist/expansion-panel/index.d.cts +0 -153
  121. package/dist/expansion-panel/index.d.ts +0 -153
  122. package/dist/expansion-panel/index.js +0 -441
  123. package/dist/fab/index.cjs +0 -9
  124. package/dist/fab/index.d.cts +0 -10
  125. package/dist/fab/index.d.ts +0 -10
  126. package/dist/fab/index.js +0 -9
  127. package/dist/fab-menu/index.cjs +0 -330
  128. package/dist/fab-menu/index.d.cts +0 -125
  129. package/dist/fab-menu/index.d.ts +0 -125
  130. package/dist/fab-menu/index.js +0 -330
  131. package/dist/fab.type-CkUHmXU_.d.ts +0 -86
  132. package/dist/fab.type-DN0vtAh6.d.cts +0 -86
  133. package/dist/feature-discovery/index.cjs +0 -464
  134. package/dist/feature-discovery/index.d.cts +0 -82
  135. package/dist/feature-discovery/index.d.ts +0 -82
  136. package/dist/feature-discovery/index.js +0 -464
  137. package/dist/indicator/index.cjs +0 -8
  138. package/dist/indicator/index.d.cts +0 -47
  139. package/dist/indicator/index.d.ts +0 -47
  140. package/dist/indicator/index.js +0 -8
  141. package/dist/input/index.cjs +0 -1462
  142. package/dist/input/index.d.cts +0 -522
  143. package/dist/input/index.d.ts +0 -522
  144. package/dist/input/index.js +0 -1462
  145. package/dist/input-trigger/index.cjs +0 -197
  146. package/dist/input-trigger/index.d.cts +0 -11
  147. package/dist/input-trigger/index.d.ts +0 -11
  148. package/dist/input-trigger/index.js +0 -197
  149. package/dist/input-trigger.type-Ba4bM3Qp.d.cts +0 -180
  150. package/dist/input-trigger.type-Ba4bM3Qp.d.ts +0 -180
  151. package/dist/list/index.cjs +0 -395
  152. package/dist/list/index.d.cts +0 -188
  153. package/dist/list/index.d.ts +0 -188
  154. package/dist/list/index.js +0 -395
  155. package/dist/menu/index.cjs +0 -316
  156. package/dist/menu/index.d.cts +0 -115
  157. package/dist/menu/index.d.ts +0 -115
  158. package/dist/menu/index.js +0 -316
  159. package/dist/menubox/index.cjs +0 -297
  160. package/dist/menubox/index.d.cts +0 -98
  161. package/dist/menubox/index.d.ts +0 -98
  162. package/dist/menubox/index.js +0 -297
  163. package/dist/pager/index.cjs +0 -205
  164. package/dist/pager/index.d.cts +0 -93
  165. package/dist/pager/index.d.ts +0 -93
  166. package/dist/pager/index.js +0 -205
  167. package/dist/picker/index.cjs +0 -244
  168. package/dist/picker/index.d.cts +0 -121
  169. package/dist/picker/index.d.ts +0 -121
  170. package/dist/picker/index.js +0 -244
  171. package/dist/progress/index.cjs +0 -219
  172. package/dist/progress/index.d.cts +0 -47
  173. package/dist/progress/index.d.ts +0 -47
  174. package/dist/progress/index.js +0 -219
  175. package/dist/radio/index.cjs +0 -465
  176. package/dist/radio/index.d.cts +0 -145
  177. package/dist/radio/index.d.ts +0 -145
  178. package/dist/radio/index.js +0 -465
  179. package/dist/refresh-control/index.cjs +0 -45
  180. package/dist/refresh-control/index.d.cts +0 -55
  181. package/dist/refresh-control/index.d.ts +0 -55
  182. package/dist/refresh-control/index.js +0 -45
  183. package/dist/segment-button/index.cjs +0 -405
  184. package/dist/segment-button/index.d.cts +0 -141
  185. package/dist/segment-button/index.d.ts +0 -141
  186. package/dist/segment-button/index.js +0 -405
  187. package/dist/select/index.cjs +0 -878
  188. package/dist/select/index.d.cts +0 -192
  189. package/dist/select/index.d.ts +0 -192
  190. package/dist/select/index.js +0 -878
  191. package/dist/skeleton/index.cjs +0 -89
  192. package/dist/skeleton/index.d.cts +0 -45
  193. package/dist/skeleton/index.d.ts +0 -45
  194. package/dist/skeleton/index.js +0 -89
  195. package/dist/slider/index.cjs +0 -576
  196. package/dist/slider/index.d.cts +0 -171
  197. package/dist/slider/index.d.ts +0 -171
  198. package/dist/slider/index.js +0 -576
  199. package/dist/snackbar/index.cjs +0 -436
  200. package/dist/snackbar/index.d.cts +0 -174
  201. package/dist/snackbar/index.d.ts +0 -174
  202. package/dist/snackbar/index.js +0 -436
  203. package/dist/snippet/index.cjs +0 -314
  204. package/dist/snippet/index.d.cts +0 -95
  205. package/dist/snippet/index.d.ts +0 -95
  206. package/dist/snippet/index.js +0 -314
  207. package/dist/stepper/index.cjs +0 -550
  208. package/dist/stepper/index.d.cts +0 -137
  209. package/dist/stepper/index.d.ts +0 -137
  210. package/dist/stepper/index.js +0 -550
  211. package/dist/switch/index.cjs +0 -358
  212. package/dist/switch/index.d.cts +0 -28
  213. package/dist/switch/index.d.ts +0 -28
  214. package/dist/switch/index.js +0 -358
  215. package/dist/tabs/index.cjs +0 -440
  216. package/dist/tabs/index.d.cts +0 -180
  217. package/dist/tabs/index.d.ts +0 -180
  218. package/dist/tabs/index.js +0 -440
  219. package/dist/timepicker/index.cjs +0 -823
  220. package/dist/timepicker/index.d.cts +0 -215
  221. package/dist/timepicker/index.d.ts +0 -215
  222. package/dist/timepicker/index.js +0 -823
  223. package/dist/toolbar/index.cjs +0 -333
  224. package/dist/toolbar/index.d.cts +0 -100
  225. package/dist/toolbar/index.d.ts +0 -100
  226. package/dist/toolbar/index.js +0 -333
  227. package/dist/typography/index.cjs +0 -238
  228. package/dist/typography/index.d.cts +0 -113
  229. package/dist/typography/index.d.ts +0 -113
  230. package/dist/typography/index.js +0 -238
  231. package/dist/view/index.cjs +0 -1361
  232. package/dist/view/index.d.cts +0 -833
  233. package/dist/view/index.d.ts +0 -833
  234. package/dist/view/index.js +0 -1361
@@ -1,338 +0,0 @@
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
-
3
-
4
-
5
- var _chunk7UFBLUMVcjs = require('../chunk-7UFBLUMV.cjs');
6
-
7
- // src/components/card/card.tsx
8
- var _react = require('react'); var _react2 = _interopRequireDefault(_react);
9
- var _reactnative = require('react-native');
10
-
11
- // src/components/card/card.style.ts
12
-
13
- var styles = _reactnative.StyleSheet.create({
14
- card: {
15
- overflow: "hidden",
16
- borderWidth: 1
17
- },
18
- fullWidth: {
19
- flexShrink: 1,
20
- flexBasis: "auto",
21
- width: "100%"
22
- },
23
- disabled: {
24
- opacity: 0.55
25
- },
26
- header: {
27
- flexDirection: "row",
28
- alignItems: "center",
29
- gap: 12,
30
- paddingHorizontal: 16,
31
- paddingTop: 14,
32
- paddingBottom: 10
33
- },
34
- body: {
35
- paddingHorizontal: 16,
36
- paddingVertical: 12
37
- },
38
- footer: {
39
- flexDirection: "row",
40
- alignItems: "center",
41
- gap: 12,
42
- paddingHorizontal: 16,
43
- paddingTop: 10,
44
- paddingBottom: 14
45
- },
46
- title: {
47
- fontSize: 16,
48
- fontWeight: "600",
49
- includeFontPadding: false
50
- },
51
- description: {
52
- fontSize: 14,
53
- lineHeight: 20,
54
- includeFontPadding: false
55
- }
56
- });
57
-
58
- // src/components/card/card.hook.ts
59
-
60
- var _core = require('@xaui/core');
61
- var useCardContainerStyles = (themeColor, isBlurred) => {
62
- const theme = _chunk7UFBLUMVcjs.useXUITheme.call(void 0, );
63
- return _react.useMemo.call(void 0, () => {
64
- const safeThemeColor = _core.getSafeThemeColor.call(void 0, themeColor);
65
- const colorScheme = theme.colors[safeThemeColor];
66
- const isDefaultThemeColor = safeThemeColor === "default";
67
- const defaultBackgroundColor = theme.mode === "dark" ? theme.colors.default.container : "#FFFFFF";
68
- return {
69
- backgroundColor: isBlurred ? theme.mode === "dark" ? "rgba(24, 24, 27, 0.82)" : "rgba(255, 255, 255, 0.82)" : isDefaultThemeColor ? defaultBackgroundColor : colorScheme.container,
70
- borderColor: _core.withOpacity.call(void 0, colorScheme.main, 0.05)
71
- };
72
- }, [isBlurred, theme, themeColor]);
73
- };
74
- var useCardElevationStyles = (elevation = 0) => {
75
- const theme = _chunk7UFBLUMVcjs.useXUITheme.call(void 0, );
76
- return _react.useMemo.call(void 0, () => {
77
- const shadowStyles = elevation === 0 ? {} : elevation === 1 ? theme.shadows.sm : elevation === 2 ? theme.shadows.md : elevation === 3 ? theme.shadows.lg : theme.shadows.xl;
78
- return {
79
- ...shadowStyles,
80
- ...elevation > 0 ? { elevation } : {}
81
- };
82
- }, [elevation, theme]);
83
- };
84
- var useCardTextStyles = (themeColor) => {
85
- const theme = _chunk7UFBLUMVcjs.useXUITheme.call(void 0, );
86
- return _react.useMemo.call(void 0, () => {
87
- const safeThemeColor = _core.getSafeThemeColor.call(void 0, themeColor);
88
- const colorScheme = theme.colors[safeThemeColor];
89
- return {
90
- titleColor: colorScheme.main,
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)
92
- };
93
- }, [theme, themeColor]);
94
- };
95
- var useCardFooterStyles = (themeColor, isFooterBlurred) => {
96
- const theme = _chunk7UFBLUMVcjs.useXUITheme.call(void 0, );
97
- return _react.useMemo.call(void 0, () => {
98
- const safeThemeColor = _core.getSafeThemeColor.call(void 0, themeColor);
99
- const colorScheme = theme.colors[safeThemeColor];
100
- if (!isFooterBlurred) {
101
- return {};
102
- }
103
- return {
104
- backgroundColor: theme.mode === "dark" ? "rgba(24, 24, 27, 0.68)" : "rgba(255, 255, 255, 0.72)",
105
- borderTopWidth: theme.borderWidth.sm,
106
- borderTopColor: theme.mode === "dark" ? _core.withOpacity.call(void 0, colorScheme.main, 0.4) : _core.withOpacity.call(void 0, colorScheme.main, 0.18)
107
- };
108
- }, [isFooterBlurred, theme, themeColor]);
109
- };
110
-
111
- // src/components/card/card.tsx
112
- var CardContext = _react2.default.createContext({
113
- themeColor: "default",
114
- isFooterBlurred: false
115
- });
116
- var Card = ({
117
- children,
118
- themeColor = "default",
119
- radius = "lg",
120
- padding = 16,
121
- elevation = 0,
122
- fullWidth = false,
123
- isHoverable = false,
124
- isPressable = false,
125
- isBlurred = false,
126
- isFooterBlurred = false,
127
- isDisabled = false,
128
- disableAnimation = false,
129
- disableRipple: _disableRipple = false,
130
- allowTextSelectionOnPress: _allowTextSelectionOnPress = false,
131
- customAppearance,
132
- onPress,
133
- onLongPress,
134
- onPressIn,
135
- onPressOut
136
- }) => {
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 = _chunk7UFBLUMVcjs.useBorderRadiusStyles.call(void 0, radius);
140
- const containerStyles = useCardContainerStyles(themeColor, isBlurred);
141
- const elevationStyles = useCardElevationStyles(elevation);
142
- const contextValue = _react2.default.useMemo(
143
- () => ({
144
- themeColor,
145
- isFooterBlurred,
146
- customAppearance
147
- }),
148
- [customAppearance, isFooterBlurred, themeColor]
149
- );
150
- const animateTo = _react2.default.useCallback(
151
- (scale, opacity, duration) => {
152
- if (disableAnimation) {
153
- animatedScale.setValue(scale);
154
- animatedOpacity.setValue(opacity);
155
- return;
156
- }
157
- _reactnative.Animated.parallel([
158
- _reactnative.Animated.timing(animatedScale, {
159
- toValue: scale,
160
- duration,
161
- useNativeDriver: true
162
- }),
163
- _reactnative.Animated.timing(animatedOpacity, {
164
- toValue: opacity,
165
- duration,
166
- useNativeDriver: true
167
- })
168
- ]).start();
169
- },
170
- [animatedOpacity, animatedScale, disableAnimation]
171
- );
172
- const handlePressIn = _react2.default.useCallback(
173
- (event) => {
174
- if (!isDisabled && isPressable) {
175
- animateTo(0.985, 0.95, 110);
176
- }
177
- _optionalChain([onPressIn, 'optionalCall', _ => _(event)]);
178
- },
179
- [animateTo, isDisabled, isPressable, onPressIn]
180
- );
181
- const handlePressOut = _react2.default.useCallback(
182
- (event) => {
183
- if (!isDisabled && isPressable) {
184
- animateTo(1, 1, 140);
185
- }
186
- _optionalChain([onPressOut, 'optionalCall', _2 => _2(event)]);
187
- },
188
- [animateTo, isDisabled, isPressable, onPressOut]
189
- );
190
- const handleHoverIn = _react2.default.useCallback(() => {
191
- if (!isDisabled && isHoverable && !isPressable) {
192
- animateTo(1.01, 1, 130);
193
- }
194
- }, [animateTo, isDisabled, isHoverable, isPressable]);
195
- const handleHoverOut = _react2.default.useCallback(() => {
196
- if (!isDisabled && isHoverable && !isPressable) {
197
- animateTo(1, 1, 130);
198
- }
199
- }, [animateTo, isDisabled, isHoverable, isPressable]);
200
- const cardContent = /* @__PURE__ */ _react2.default.createElement(
201
- _reactnative.Animated.View,
202
- {
203
- style: [
204
- styles.card,
205
- radiusStyles,
206
- containerStyles,
207
- elevationStyles,
208
- fullWidth && styles.fullWidth,
209
- isDisabled && styles.disabled,
210
- {
211
- padding,
212
- transform: [{ scale: animatedScale }],
213
- opacity: animatedOpacity
214
- },
215
- _optionalChain([customAppearance, 'optionalAccess', _3 => _3.container])
216
- ]
217
- },
218
- /* @__PURE__ */ _react2.default.createElement(CardContext.Provider, { value: contextValue }, children)
219
- );
220
- if (!isPressable) {
221
- return cardContent;
222
- }
223
- return /* @__PURE__ */ _react2.default.createElement(
224
- _reactnative.Pressable,
225
- {
226
- onPress: isDisabled ? void 0 : onPress,
227
- onLongPress: isDisabled ? void 0 : onLongPress,
228
- onPressIn: handlePressIn,
229
- onPressOut: handlePressOut,
230
- onHoverIn: isHoverable ? handleHoverIn : void 0,
231
- onHoverOut: isHoverable ? handleHoverOut : void 0,
232
- disabled: isDisabled
233
- },
234
- cardContent
235
- );
236
- };
237
- var CardHeader = ({
238
- children,
239
- customAppearance
240
- }) => {
241
- const cardContext = _react2.default.useContext(CardContext);
242
- return /* @__PURE__ */ _react2.default.createElement(
243
- _reactnative.View,
244
- {
245
- style: [
246
- styles.header,
247
- _optionalChain([cardContext, 'access', _4 => _4.customAppearance, 'optionalAccess', _5 => _5.header]),
248
- _optionalChain([customAppearance, 'optionalAccess', _6 => _6.container])
249
- ]
250
- },
251
- children
252
- );
253
- };
254
- var CardBody = ({
255
- children,
256
- customAppearance
257
- }) => {
258
- const cardContext = _react2.default.useContext(CardContext);
259
- return /* @__PURE__ */ _react2.default.createElement(
260
- _reactnative.View,
261
- {
262
- style: [
263
- styles.body,
264
- _optionalChain([cardContext, 'access', _7 => _7.customAppearance, 'optionalAccess', _8 => _8.body]),
265
- _optionalChain([customAppearance, 'optionalAccess', _9 => _9.container])
266
- ]
267
- },
268
- children
269
- );
270
- };
271
- var CardFooter = ({
272
- children,
273
- customAppearance
274
- }) => {
275
- const cardContext = _react2.default.useContext(CardContext);
276
- const footerStyles = useCardFooterStyles(
277
- cardContext.themeColor,
278
- cardContext.isFooterBlurred
279
- );
280
- return /* @__PURE__ */ _react2.default.createElement(
281
- _reactnative.View,
282
- {
283
- style: [
284
- styles.footer,
285
- footerStyles,
286
- _optionalChain([cardContext, 'access', _10 => _10.customAppearance, 'optionalAccess', _11 => _11.footer]),
287
- _optionalChain([customAppearance, 'optionalAccess', _12 => _12.container])
288
- ]
289
- },
290
- children
291
- );
292
- };
293
- var CardTitle = ({
294
- children,
295
- customAppearance
296
- }) => {
297
- const cardContext = _react2.default.useContext(CardContext);
298
- const { titleColor } = useCardTextStyles(cardContext.themeColor);
299
- return /* @__PURE__ */ _react2.default.createElement(
300
- _reactnative.Text,
301
- {
302
- style: [
303
- styles.title,
304
- { color: titleColor },
305
- _optionalChain([cardContext, 'access', _13 => _13.customAppearance, 'optionalAccess', _14 => _14.title]),
306
- _optionalChain([customAppearance, 'optionalAccess', _15 => _15.text])
307
- ]
308
- },
309
- children
310
- );
311
- };
312
- var CardDescription = ({
313
- children,
314
- customAppearance
315
- }) => {
316
- const cardContext = _react2.default.useContext(CardContext);
317
- const { descriptionColor } = useCardTextStyles(cardContext.themeColor);
318
- return /* @__PURE__ */ _react2.default.createElement(
319
- _reactnative.Text,
320
- {
321
- style: [
322
- styles.description,
323
- { color: descriptionColor },
324
- _optionalChain([cardContext, 'access', _16 => _16.customAppearance, 'optionalAccess', _17 => _17.description]),
325
- _optionalChain([customAppearance, 'optionalAccess', _18 => _18.text])
326
- ]
327
- },
328
- children
329
- );
330
- };
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;
@@ -1,191 +0,0 @@
1
- import React, { ReactNode } from 'react';
2
- import { ViewStyle, TextStyle, GestureResponderEvent } from 'react-native';
3
- import { ThemeColor, Radius } from '@xaui/core/types';
4
- import { E as ElevationLevel } from '../button.type-j1ZdkkSl.cjs';
5
-
6
- type CardCustomAppearance = {
7
- /**
8
- * Custom styles for the card container
9
- */
10
- container?: ViewStyle;
11
- /**
12
- * Custom styles for the card header section
13
- */
14
- header?: ViewStyle;
15
- /**
16
- * Custom styles for the card body section
17
- */
18
- body?: ViewStyle;
19
- /**
20
- * Custom styles for the card footer section
21
- */
22
- footer?: ViewStyle;
23
- /**
24
- * Custom styles for title text
25
- */
26
- title?: TextStyle;
27
- /**
28
- * Custom styles for description text
29
- */
30
- description?: TextStyle;
31
- };
32
- type CardProps = {
33
- /**
34
- * Content to render inside the card.
35
- */
36
- children: ReactNode;
37
- /**
38
- * The theme color of the card.
39
- * @default 'default'
40
- */
41
- themeColor?: ThemeColor;
42
- /**
43
- * Card corner radius.
44
- * @default 'lg'
45
- */
46
- radius?: Radius;
47
- /**
48
- * Card padding (applies to all sides).
49
- * @default 16
50
- */
51
- padding?: number;
52
- /**
53
- * Android elevation level from 0 to 4.
54
- * @default 0
55
- */
56
- elevation?: ElevationLevel;
57
- /**
58
- * Whether the card should take full width of its container.
59
- * @default false
60
- */
61
- fullWidth?: boolean;
62
- /**
63
- * Whether hover interactions are enabled.
64
- * @default false
65
- */
66
- isHoverable?: boolean;
67
- /**
68
- * Whether press interactions are enabled.
69
- * @default false
70
- */
71
- isPressable?: boolean;
72
- /**
73
- * Whether the whole card should be blurred.
74
- * @default false
75
- */
76
- isBlurred?: boolean;
77
- /**
78
- * Whether the footer section should be blurred.
79
- * @default false
80
- */
81
- isFooterBlurred?: boolean;
82
- /**
83
- * Whether the card is disabled.
84
- * @default false
85
- */
86
- isDisabled?: boolean;
87
- /**
88
- * Disable all card animations.
89
- * @default false
90
- */
91
- disableAnimation?: boolean;
92
- /**
93
- * Disable press ripple animation.
94
- * @default false
95
- */
96
- disableRipple?: boolean;
97
- /**
98
- * Allow text selection while pressing a pressable card.
99
- * @default false
100
- */
101
- allowTextSelectionOnPress?: boolean;
102
- /**
103
- * Custom appearance styles for card parts.
104
- */
105
- customAppearance?: CardCustomAppearance;
106
- /**
107
- * Callback fired when card is pressed.
108
- */
109
- onPress?: (event: GestureResponderEvent) => void;
110
- /**
111
- * Callback fired when card is long pressed.
112
- */
113
- onLongPress?: (event: GestureResponderEvent) => void;
114
- /**
115
- * Callback fired when card press starts.
116
- */
117
- onPressIn?: (event: GestureResponderEvent) => void;
118
- /**
119
- * Callback fired when card press ends.
120
- */
121
- onPressOut?: (event: GestureResponderEvent) => void;
122
- };
123
- type CardHeaderProps = {
124
- /**
125
- * Header content.
126
- */
127
- children: ReactNode;
128
- /**
129
- * Custom styles for the header container.
130
- */
131
- customAppearance?: {
132
- container?: ViewStyle;
133
- };
134
- };
135
- type CardBodyProps = {
136
- /**
137
- * Body content.
138
- */
139
- children: ReactNode;
140
- /**
141
- * Custom styles for the body container.
142
- */
143
- customAppearance?: {
144
- container?: ViewStyle;
145
- };
146
- };
147
- type CardFooterProps = {
148
- /**
149
- * Footer content.
150
- */
151
- children: ReactNode;
152
- /**
153
- * Custom styles for the footer container.
154
- */
155
- customAppearance?: {
156
- container?: ViewStyle;
157
- };
158
- };
159
- type CardTitleProps = {
160
- /**
161
- * Title content.
162
- */
163
- children: ReactNode;
164
- /**
165
- * Custom styles for the title text.
166
- */
167
- customAppearance?: {
168
- text?: TextStyle;
169
- };
170
- };
171
- type CardDescriptionProps = {
172
- /**
173
- * Description content.
174
- */
175
- children: ReactNode;
176
- /**
177
- * Custom styles for the description text.
178
- */
179
- customAppearance?: {
180
- text?: TextStyle;
181
- };
182
- };
183
-
184
- declare const Card: React.FC<CardProps>;
185
- declare const CardHeader: React.FC<CardHeaderProps>;
186
- declare const CardBody: React.FC<CardBodyProps>;
187
- declare const CardFooter: React.FC<CardFooterProps>;
188
- declare const CardTitle: React.FC<CardTitleProps>;
189
- declare const CardDescription: React.FC<CardDescriptionProps>;
190
-
191
- export { Card, CardBody, type CardBodyProps, type CardCustomAppearance, CardDescription, type CardDescriptionProps, CardFooter, type CardFooterProps, CardHeader, type CardHeaderProps, type CardProps, CardTitle, type CardTitleProps };
@@ -1,191 +0,0 @@
1
- import React, { ReactNode } from 'react';
2
- import { ViewStyle, TextStyle, GestureResponderEvent } from 'react-native';
3
- import { ThemeColor, Radius } from '@xaui/core/types';
4
- import { E as ElevationLevel } from '../button.type-j1ZdkkSl.js';
5
-
6
- type CardCustomAppearance = {
7
- /**
8
- * Custom styles for the card container
9
- */
10
- container?: ViewStyle;
11
- /**
12
- * Custom styles for the card header section
13
- */
14
- header?: ViewStyle;
15
- /**
16
- * Custom styles for the card body section
17
- */
18
- body?: ViewStyle;
19
- /**
20
- * Custom styles for the card footer section
21
- */
22
- footer?: ViewStyle;
23
- /**
24
- * Custom styles for title text
25
- */
26
- title?: TextStyle;
27
- /**
28
- * Custom styles for description text
29
- */
30
- description?: TextStyle;
31
- };
32
- type CardProps = {
33
- /**
34
- * Content to render inside the card.
35
- */
36
- children: ReactNode;
37
- /**
38
- * The theme color of the card.
39
- * @default 'default'
40
- */
41
- themeColor?: ThemeColor;
42
- /**
43
- * Card corner radius.
44
- * @default 'lg'
45
- */
46
- radius?: Radius;
47
- /**
48
- * Card padding (applies to all sides).
49
- * @default 16
50
- */
51
- padding?: number;
52
- /**
53
- * Android elevation level from 0 to 4.
54
- * @default 0
55
- */
56
- elevation?: ElevationLevel;
57
- /**
58
- * Whether the card should take full width of its container.
59
- * @default false
60
- */
61
- fullWidth?: boolean;
62
- /**
63
- * Whether hover interactions are enabled.
64
- * @default false
65
- */
66
- isHoverable?: boolean;
67
- /**
68
- * Whether press interactions are enabled.
69
- * @default false
70
- */
71
- isPressable?: boolean;
72
- /**
73
- * Whether the whole card should be blurred.
74
- * @default false
75
- */
76
- isBlurred?: boolean;
77
- /**
78
- * Whether the footer section should be blurred.
79
- * @default false
80
- */
81
- isFooterBlurred?: boolean;
82
- /**
83
- * Whether the card is disabled.
84
- * @default false
85
- */
86
- isDisabled?: boolean;
87
- /**
88
- * Disable all card animations.
89
- * @default false
90
- */
91
- disableAnimation?: boolean;
92
- /**
93
- * Disable press ripple animation.
94
- * @default false
95
- */
96
- disableRipple?: boolean;
97
- /**
98
- * Allow text selection while pressing a pressable card.
99
- * @default false
100
- */
101
- allowTextSelectionOnPress?: boolean;
102
- /**
103
- * Custom appearance styles for card parts.
104
- */
105
- customAppearance?: CardCustomAppearance;
106
- /**
107
- * Callback fired when card is pressed.
108
- */
109
- onPress?: (event: GestureResponderEvent) => void;
110
- /**
111
- * Callback fired when card is long pressed.
112
- */
113
- onLongPress?: (event: GestureResponderEvent) => void;
114
- /**
115
- * Callback fired when card press starts.
116
- */
117
- onPressIn?: (event: GestureResponderEvent) => void;
118
- /**
119
- * Callback fired when card press ends.
120
- */
121
- onPressOut?: (event: GestureResponderEvent) => void;
122
- };
123
- type CardHeaderProps = {
124
- /**
125
- * Header content.
126
- */
127
- children: ReactNode;
128
- /**
129
- * Custom styles for the header container.
130
- */
131
- customAppearance?: {
132
- container?: ViewStyle;
133
- };
134
- };
135
- type CardBodyProps = {
136
- /**
137
- * Body content.
138
- */
139
- children: ReactNode;
140
- /**
141
- * Custom styles for the body container.
142
- */
143
- customAppearance?: {
144
- container?: ViewStyle;
145
- };
146
- };
147
- type CardFooterProps = {
148
- /**
149
- * Footer content.
150
- */
151
- children: ReactNode;
152
- /**
153
- * Custom styles for the footer container.
154
- */
155
- customAppearance?: {
156
- container?: ViewStyle;
157
- };
158
- };
159
- type CardTitleProps = {
160
- /**
161
- * Title content.
162
- */
163
- children: ReactNode;
164
- /**
165
- * Custom styles for the title text.
166
- */
167
- customAppearance?: {
168
- text?: TextStyle;
169
- };
170
- };
171
- type CardDescriptionProps = {
172
- /**
173
- * Description content.
174
- */
175
- children: ReactNode;
176
- /**
177
- * Custom styles for the description text.
178
- */
179
- customAppearance?: {
180
- text?: TextStyle;
181
- };
182
- };
183
-
184
- declare const Card: React.FC<CardProps>;
185
- declare const CardHeader: React.FC<CardHeaderProps>;
186
- declare const CardBody: React.FC<CardBodyProps>;
187
- declare const CardFooter: React.FC<CardFooterProps>;
188
- declare const CardTitle: React.FC<CardTitleProps>;
189
- declare const CardDescription: React.FC<CardDescriptionProps>;
190
-
191
- export { Card, CardBody, type CardBodyProps, type CardCustomAppearance, CardDescription, type CardDescriptionProps, CardFooter, type CardFooterProps, CardHeader, type CardHeaderProps, type CardProps, CardTitle, type CardTitleProps };