@xaui/native 0.0.21 → 0.0.24

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 (113) hide show
  1. package/README.md +195 -2
  2. package/dist/alert/index.js +1 -2
  3. package/dist/app-bar/index.cjs +217 -0
  4. package/dist/app-bar/index.d.cts +52 -0
  5. package/dist/app-bar/index.d.ts +52 -0
  6. package/dist/app-bar/index.js +142 -0
  7. package/dist/autocomplete/index.js +48 -36
  8. package/dist/avatar/index.js +1 -2
  9. package/dist/badge/index.js +1 -2
  10. package/dist/bottom-sheet/index.js +1 -2
  11. package/dist/bottom-tab-bar/index.cjs +571 -0
  12. package/dist/bottom-tab-bar/index.d.cts +211 -0
  13. package/dist/bottom-tab-bar/index.d.ts +211 -0
  14. package/dist/bottom-tab-bar/index.js +497 -0
  15. package/dist/button/index.d.cts +102 -5
  16. package/dist/button/index.d.ts +102 -5
  17. package/dist/button/index.js +2 -3
  18. package/dist/button.type-j1ZdkkSl.d.cts +4 -0
  19. package/dist/button.type-j1ZdkkSl.d.ts +4 -0
  20. package/dist/card/index.cjs +2 -0
  21. package/dist/card/index.d.cts +6 -1
  22. package/dist/card/index.d.ts +6 -1
  23. package/dist/card/index.js +4 -2
  24. package/dist/carousel/index.js +1 -1
  25. package/dist/chart/index.cjs +1067 -0
  26. package/dist/chart/index.d.cts +218 -0
  27. package/dist/chart/index.d.ts +218 -0
  28. package/dist/chart/index.js +1026 -0
  29. package/dist/checkbox/index.js +1 -2
  30. package/dist/chip/index.js +1 -2
  31. package/dist/chunk-3XSXTM3G.js +661 -0
  32. package/dist/chunk-4KSZLONZ.js +79 -0
  33. package/dist/{chunk-DXXNBF5P.js → chunk-CZFDZPAS.js} +0 -5
  34. package/dist/{chunk-LTKYHG5V.js → chunk-GHCVNQET.js} +12 -5
  35. package/dist/chunk-I4V5Y5GD.js +76 -0
  36. package/dist/{chunk-F7WH4DMG.js → chunk-UI5L26KD.js} +1 -1
  37. package/dist/{chunk-LUBWRVI2.js → chunk-ULJSCNPE.js} +1 -1
  38. package/dist/chunk-URBEEDFX.js +79 -0
  39. package/dist/core/index.js +3 -5
  40. package/dist/datepicker/index.js +1 -2
  41. package/dist/divider/index.js +2 -3
  42. package/dist/drawer/index.cjs +310 -0
  43. package/dist/drawer/index.d.cts +58 -0
  44. package/dist/drawer/index.d.ts +58 -0
  45. package/dist/drawer/index.js +236 -0
  46. package/dist/{accordion → expansion-panel}/index.cjs +45 -45
  47. package/dist/{accordion → expansion-panel}/index.d.cts +30 -30
  48. package/dist/{accordion → expansion-panel}/index.d.ts +30 -30
  49. package/dist/{accordion → expansion-panel}/index.js +40 -41
  50. package/dist/fab/index.d.cts +3 -3
  51. package/dist/fab/index.d.ts +3 -3
  52. package/dist/fab/index.js +3 -4
  53. package/dist/fab-menu/index.d.cts +2 -2
  54. package/dist/fab-menu/index.d.ts +2 -2
  55. package/dist/fab-menu/index.js +3 -4
  56. package/dist/{fab.type-Ba0QMprb.d.ts → fab.type-CgIYqQlT.d.ts} +1 -1
  57. package/dist/{fab.type-U09H8B7D.d.cts → fab.type-l2vjG8-p.d.cts} +1 -1
  58. package/dist/feature-discovery/index.cjs +531 -0
  59. package/dist/feature-discovery/index.d.cts +82 -0
  60. package/dist/feature-discovery/index.d.ts +82 -0
  61. package/dist/feature-discovery/index.js +464 -0
  62. package/dist/indicator/index.js +2 -3
  63. package/dist/input/index.cjs +258 -164
  64. package/dist/input/index.d.cts +15 -1
  65. package/dist/input/index.d.ts +15 -1
  66. package/dist/input/index.js +219 -126
  67. package/dist/list/index.js +1 -2
  68. package/dist/menu/index.js +2 -2
  69. package/dist/menubox/index.cjs +369 -0
  70. package/dist/menubox/index.d.cts +98 -0
  71. package/dist/menubox/index.d.ts +98 -0
  72. package/dist/menubox/index.js +296 -0
  73. package/dist/pager/index.cjs +243 -0
  74. package/dist/pager/index.d.cts +93 -0
  75. package/dist/pager/index.d.ts +93 -0
  76. package/dist/pager/index.js +205 -0
  77. package/dist/progress/index.js +1 -2
  78. package/dist/radio/index.cjs +537 -0
  79. package/dist/radio/index.d.cts +145 -0
  80. package/dist/radio/index.d.ts +145 -0
  81. package/dist/radio/index.js +464 -0
  82. package/dist/segment-button/index.js +2 -2
  83. package/dist/select/index.js +22 -10
  84. package/dist/skeleton/index.js +2 -2
  85. package/dist/slider/index.cjs +655 -0
  86. package/dist/slider/index.d.cts +171 -0
  87. package/dist/slider/index.d.ts +171 -0
  88. package/dist/slider/index.js +575 -0
  89. package/dist/stepper/index.cjs +624 -0
  90. package/dist/stepper/index.d.cts +137 -0
  91. package/dist/stepper/index.d.ts +137 -0
  92. package/dist/stepper/index.js +549 -0
  93. package/dist/switch/index.js +1 -2
  94. package/dist/tabs/index.cjs +523 -0
  95. package/dist/tabs/index.d.cts +176 -0
  96. package/dist/tabs/index.d.ts +176 -0
  97. package/dist/tabs/index.js +438 -0
  98. package/dist/timepicker/index.cjs +1280 -0
  99. package/dist/timepicker/index.d.cts +215 -0
  100. package/dist/timepicker/index.d.ts +215 -0
  101. package/dist/timepicker/index.js +1181 -0
  102. package/dist/toolbar/index.cjs +395 -0
  103. package/dist/toolbar/index.d.cts +100 -0
  104. package/dist/toolbar/index.d.ts +100 -0
  105. package/dist/toolbar/index.js +325 -0
  106. package/dist/typography/index.js +1 -2
  107. package/dist/view/index.cjs +16 -2
  108. package/dist/view/index.js +16 -2
  109. package/package.json +73 -8
  110. package/dist/button.type-D8tzEBo7.d.ts +0 -104
  111. package/dist/button.type-ikaWzhIg.d.cts +0 -104
  112. package/dist/chunk-GBHQCAKW.js +0 -19
  113. package/dist/chunk-JEGEPGVU.js +0 -287
@@ -0,0 +1,497 @@
1
+ import "../chunk-CZFDZPAS.js";
2
+ import {
3
+ useXUITheme
4
+ } from "../chunk-I4V5Y5GD.js";
5
+
6
+ // src/components/bottom-tab-bar/bottom-tab-bar.tsx
7
+ import React2, { useMemo as useMemo3, useState as useState2 } from "react";
8
+ import { View as View2 } from "react-native";
9
+
10
+ // src/components/bottom-tab-bar/bottom-tab-bar.hook.ts
11
+ import { useMemo } from "react";
12
+ import { getSafeThemeColor, withOpacity } from "@xaui/core";
13
+ var sizeMap = {
14
+ sm: {
15
+ minHeight: 68,
16
+ iconSize: 20,
17
+ indicatorWidth: 58,
18
+ indicatorHeight: 30,
19
+ indicatorRadius: 15,
20
+ itemPaddingTop: 8,
21
+ itemPaddingBottom: 6,
22
+ labelSize: 11,
23
+ labelSpacing: 4
24
+ },
25
+ md: {
26
+ minHeight: 78,
27
+ iconSize: 24,
28
+ indicatorWidth: 64,
29
+ indicatorHeight: 32,
30
+ indicatorRadius: 16,
31
+ itemPaddingTop: 10,
32
+ itemPaddingBottom: 8,
33
+ labelSize: 12,
34
+ labelSpacing: 4
35
+ },
36
+ lg: {
37
+ minHeight: 86,
38
+ iconSize: 26,
39
+ indicatorWidth: 70,
40
+ indicatorHeight: 36,
41
+ indicatorRadius: 18,
42
+ itemPaddingTop: 11,
43
+ itemPaddingBottom: 10,
44
+ labelSize: 13,
45
+ labelSpacing: 5
46
+ }
47
+ };
48
+ var useBottomTabBarSizeStyles = (size) => {
49
+ return useMemo(() => sizeMap[size], [size]);
50
+ };
51
+ var useBottomTabBarColors = (themeColor, activeColor, inactiveColor, indicatorColor) => {
52
+ const theme = useXUITheme();
53
+ const colorScheme = theme.colors[getSafeThemeColor(themeColor)];
54
+ return useMemo(() => {
55
+ return {
56
+ activeColor: activeColor ?? colorScheme.main,
57
+ inactiveColor: inactiveColor ?? withOpacity(theme.colors.foreground, 0.66),
58
+ indicatorColor: indicatorColor ?? withOpacity(colorScheme.main, theme.mode === "dark" ? 0.28 : 0.16),
59
+ containerColor: theme.colors.background,
60
+ borderColor: withOpacity(theme.colors.foreground, 0.08)
61
+ };
62
+ }, [activeColor, colorScheme.main, indicatorColor, inactiveColor, theme]);
63
+ };
64
+
65
+ // src/components/bottom-tab-bar/bottom-tab-bar-context.ts
66
+ import { createContext, useContext } from "react";
67
+ var BottomTabBarContext = createContext(
68
+ null
69
+ );
70
+ var useBottomTabBarContext = () => {
71
+ return useContext(BottomTabBarContext);
72
+ };
73
+
74
+ // src/components/bottom-tab-bar/bottom-tab-bar-item.tsx
75
+ import React, { useEffect, useMemo as useMemo2, useRef, useState } from "react";
76
+ import { Animated, Pressable, Text, View } from "react-native";
77
+
78
+ // src/components/bottom-tab-bar/bottom-tab-bar.style.ts
79
+ import { StyleSheet } from "react-native";
80
+ var styles = StyleSheet.create({
81
+ container: {
82
+ flexDirection: "row",
83
+ alignItems: "stretch",
84
+ width: "100%",
85
+ borderTopWidth: 1
86
+ },
87
+ itemPressable: {
88
+ flex: 1
89
+ },
90
+ itemContainer: {
91
+ flex: 1,
92
+ alignItems: "center",
93
+ justifyContent: "center"
94
+ },
95
+ itemContainerInline: {
96
+ flexDirection: "row"
97
+ },
98
+ indicator: {
99
+ alignItems: "center",
100
+ justifyContent: "center",
101
+ position: "relative"
102
+ },
103
+ indicatorContent: {
104
+ flexDirection: "row",
105
+ alignItems: "center",
106
+ justifyContent: "center"
107
+ },
108
+ indicatorBackground: {
109
+ position: "absolute"
110
+ },
111
+ label: {
112
+ fontWeight: "600",
113
+ letterSpacing: 0.1
114
+ },
115
+ inlineLabel: {
116
+ marginLeft: 6
117
+ },
118
+ badgeContainer: {
119
+ position: "absolute",
120
+ top: -4,
121
+ right: -10
122
+ },
123
+ disabled: {
124
+ opacity: 0.5
125
+ }
126
+ });
127
+
128
+ // src/components/bottom-tab-bar/bottom-tab-bar-item.tsx
129
+ var resolveIconNode = (icon, params) => {
130
+ if (typeof icon === "function") {
131
+ return icon(params);
132
+ }
133
+ return icon;
134
+ };
135
+ var BottomTabBarItem = ({
136
+ itemKey,
137
+ label,
138
+ icon,
139
+ activeIcon,
140
+ badge,
141
+ isDisabled = false,
142
+ isSelected,
143
+ showLabel,
144
+ activeColor,
145
+ inactiveColor,
146
+ indicatorColor,
147
+ style,
148
+ customAppearance,
149
+ onPress,
150
+ onLongPress,
151
+ accessibilityLabel,
152
+ testID
153
+ }) => {
154
+ const INLINE_INDICATOR_HORIZONTAL_PADDING = 10;
155
+ const INLINE_INDICATOR_VERTICAL_PADDING = 14;
156
+ const ICON_ONLY_INDICATOR_HORIZONTAL_PADDING = 10;
157
+ const ICON_ONLY_INDICATOR_VERTICAL_PADDING = 10;
158
+ const context = useBottomTabBarContext();
159
+ const selected = isSelected ?? context?.selectedKey === itemKey;
160
+ const disabled = isDisabled || !!context?.isDisabled;
161
+ const resolvedVariant = context?.variant ?? "stacked";
162
+ const isIconOnly = resolvedVariant === "icon-only";
163
+ const resolvedShowLabel = isIconOnly ? false : showLabel ?? context?.showLabel ?? true;
164
+ const isInline = resolvedVariant === "inline";
165
+ const resolvedSize = context?.size ?? "md";
166
+ const resolvedThemeColor = context?.themeColor ?? "primary";
167
+ const [contentSize, setContentSize] = useState({ width: 0, height: 0 });
168
+ const sizeStyles = useBottomTabBarSizeStyles(resolvedSize);
169
+ const resolvedIndicatorWidth = isInline ? Math.max(
170
+ sizeStyles.indicatorHeight,
171
+ contentSize.width + INLINE_INDICATOR_HORIZONTAL_PADDING * 2
172
+ ) : isIconOnly ? Math.max(
173
+ sizeStyles.indicatorWidth,
174
+ contentSize.width + ICON_ONLY_INDICATOR_HORIZONTAL_PADDING * 2
175
+ ) : sizeStyles.indicatorWidth;
176
+ const resolvedIndicatorHeight = isInline ? Math.max(
177
+ sizeStyles.indicatorHeight,
178
+ contentSize.height + INLINE_INDICATOR_VERTICAL_PADDING * 1.35
179
+ ) : isIconOnly ? Math.max(
180
+ sizeStyles.indicatorHeight,
181
+ contentSize.height + ICON_ONLY_INDICATOR_VERTICAL_PADDING * 2
182
+ ) : sizeStyles.indicatorHeight;
183
+ const colors = useBottomTabBarColors(
184
+ resolvedThemeColor,
185
+ activeColor ?? context?.activeColor,
186
+ inactiveColor ?? context?.inactiveColor,
187
+ indicatorColor ?? context?.indicatorColor
188
+ );
189
+ const indicatorScale = useRef(new Animated.Value(selected ? 1 : 0.75)).current;
190
+ const indicatorOpacity = useRef(new Animated.Value(selected ? 1 : 0)).current;
191
+ useEffect(() => {
192
+ Animated.parallel([
193
+ Animated.spring(indicatorScale, {
194
+ toValue: selected ? 1 : 0.75,
195
+ friction: 9,
196
+ tension: 95,
197
+ useNativeDriver: true
198
+ }),
199
+ Animated.timing(indicatorOpacity, {
200
+ toValue: selected ? 1 : 0,
201
+ duration: selected ? 180 : 140,
202
+ useNativeDriver: true
203
+ })
204
+ ]).start();
205
+ }, [indicatorOpacity, indicatorScale, selected]);
206
+ const iconColor = selected ? colors.activeColor : colors.inactiveColor;
207
+ const iconNode = useMemo2(() => {
208
+ const params = {
209
+ focused: !!selected,
210
+ color: iconColor,
211
+ size: sizeStyles.iconSize
212
+ };
213
+ if (selected && activeIcon) {
214
+ return resolveIconNode(activeIcon, params);
215
+ }
216
+ return resolveIconNode(icon, params);
217
+ }, [activeIcon, icon, iconColor, selected, sizeStyles.iconSize]);
218
+ const labelNode = resolvedShowLabel ? /* @__PURE__ */ React.createElement(
219
+ Text,
220
+ {
221
+ numberOfLines: 1,
222
+ style: [
223
+ styles.label,
224
+ isInline && styles.inlineLabel,
225
+ {
226
+ color: iconColor,
227
+ fontSize: sizeStyles.labelSize
228
+ },
229
+ customAppearance?.label
230
+ ]
231
+ },
232
+ label
233
+ ) : null;
234
+ return /* @__PURE__ */ React.createElement(
235
+ Pressable,
236
+ {
237
+ onPress: (event) => {
238
+ if (disabled) return;
239
+ context?.onSelectionChange?.(itemKey);
240
+ onPress?.(event);
241
+ },
242
+ onLongPress,
243
+ disabled,
244
+ accessibilityRole: "tab",
245
+ accessibilityState: { selected: !!selected, disabled },
246
+ accessibilityLabel,
247
+ testID,
248
+ style: styles.itemPressable
249
+ },
250
+ /* @__PURE__ */ React.createElement(
251
+ View,
252
+ {
253
+ style: [
254
+ styles.itemContainer,
255
+ isInline && styles.itemContainerInline,
256
+ {
257
+ paddingTop: sizeStyles.itemPaddingTop,
258
+ paddingBottom: sizeStyles.itemPaddingBottom
259
+ },
260
+ disabled && styles.disabled,
261
+ style,
262
+ customAppearance?.container
263
+ ]
264
+ },
265
+ /* @__PURE__ */ React.createElement(
266
+ Animated.View,
267
+ {
268
+ style: [
269
+ styles.indicator,
270
+ {
271
+ width: resolvedIndicatorWidth,
272
+ height: resolvedIndicatorHeight,
273
+ marginBottom: !isInline && resolvedShowLabel ? sizeStyles.labelSpacing : 0
274
+ },
275
+ customAppearance?.indicator
276
+ ]
277
+ },
278
+ /* @__PURE__ */ React.createElement(
279
+ Animated.View,
280
+ {
281
+ style: [
282
+ styles.indicatorBackground,
283
+ {
284
+ width: resolvedIndicatorWidth,
285
+ height: resolvedIndicatorHeight,
286
+ borderRadius: resolvedIndicatorHeight / 2,
287
+ backgroundColor: colors.indicatorColor,
288
+ transform: [{ scale: indicatorScale }],
289
+ opacity: indicatorOpacity
290
+ }
291
+ ]
292
+ }
293
+ ),
294
+ /* @__PURE__ */ React.createElement(
295
+ View,
296
+ {
297
+ style: styles.indicatorContent,
298
+ onLayout: (event) => {
299
+ if (!isInline && !isIconOnly) return;
300
+ const nextWidth = Math.ceil(event.nativeEvent.layout.width);
301
+ const nextHeight = Math.ceil(event.nativeEvent.layout.height);
302
+ setContentSize(
303
+ (prev) => prev.width === nextWidth && prev.height === nextHeight ? prev : { width: nextWidth, height: nextHeight }
304
+ );
305
+ }
306
+ },
307
+ iconNode,
308
+ badge ? /* @__PURE__ */ React.createElement(View, { style: styles.badgeContainer }, badge) : null,
309
+ isInline ? labelNode : null
310
+ )
311
+ ),
312
+ !isInline ? labelNode : null
313
+ )
314
+ );
315
+ };
316
+
317
+ // src/components/bottom-tab-bar/bottom-tab-bar.tsx
318
+ var isExpoRouterMode = (props) => {
319
+ return "state" in props && "navigation" in props && "descriptors" in props && !!props.state && !!props.navigation && !!props.descriptors;
320
+ };
321
+ var getRouteLabel = (route, options, focused, color, variant) => {
322
+ if (typeof options.tabBarLabel === "function") {
323
+ return options.tabBarLabel({
324
+ focused,
325
+ color,
326
+ children: options.title ?? route.name,
327
+ position: variant === "inline" ? "beside-icon" : "below-icon"
328
+ });
329
+ }
330
+ if (typeof options.tabBarLabel === "string") {
331
+ return options.tabBarLabel;
332
+ }
333
+ if (typeof options.title === "string") {
334
+ return options.title;
335
+ }
336
+ return route.name;
337
+ };
338
+ var BottomTabBar = (props) => {
339
+ const {
340
+ themeColor = "primary",
341
+ size = "md",
342
+ variant = "stacked",
343
+ isDisabled = false,
344
+ showLabel = true,
345
+ insetBottom = 0,
346
+ indicatorColor,
347
+ activeColor,
348
+ inactiveColor,
349
+ style,
350
+ customAppearance
351
+ } = props;
352
+ const sizeStyles = useBottomTabBarSizeStyles(size);
353
+ const colors = useBottomTabBarColors(
354
+ themeColor,
355
+ activeColor,
356
+ inactiveColor,
357
+ indicatorColor
358
+ );
359
+ if (isExpoRouterMode(props)) {
360
+ const { state, descriptors, navigation, insets } = props;
361
+ const currentRoute = state.routes[state.index];
362
+ const focusedOptions = descriptors[currentRoute.key]?.options;
363
+ const focusedStyle = focusedOptions?.tabBarStyle;
364
+ if (focusedStyle?.display === "none") {
365
+ return null;
366
+ }
367
+ const routerInsetBottom = insets?.bottom ?? insetBottom;
368
+ return /* @__PURE__ */ React2.createElement(
369
+ View2,
370
+ {
371
+ style: [
372
+ styles.container,
373
+ {
374
+ minHeight: sizeStyles.minHeight + routerInsetBottom,
375
+ paddingBottom: routerInsetBottom,
376
+ backgroundColor: colors.containerColor,
377
+ borderTopColor: colors.borderColor
378
+ },
379
+ style,
380
+ customAppearance?.container
381
+ ]
382
+ },
383
+ state.routes.filter((route) => descriptors[route.key]?.options.href !== null).map((route) => {
384
+ const routeOptions = descriptors[route.key]?.options ?? {};
385
+ const focused = currentRoute.key === route.key;
386
+ const routeActiveColor = routeOptions.tabBarActiveTintColor ?? activeColor;
387
+ const routeInactiveColor = routeOptions.tabBarInactiveTintColor ?? inactiveColor;
388
+ const labelColor = focused ? routeActiveColor ?? colors.activeColor : routeInactiveColor ?? colors.inactiveColor;
389
+ return /* @__PURE__ */ React2.createElement(
390
+ BottomTabBarItem,
391
+ {
392
+ key: route.key,
393
+ itemKey: route.key,
394
+ label: getRouteLabel(
395
+ route,
396
+ routeOptions,
397
+ focused,
398
+ labelColor,
399
+ variant
400
+ ),
401
+ icon: routeOptions.tabBarIcon,
402
+ isSelected: focused,
403
+ showLabel: routeOptions.tabBarShowLabel ?? showLabel,
404
+ activeColor: routeActiveColor,
405
+ inactiveColor: routeInactiveColor,
406
+ badge: routeOptions.tabBarBadge,
407
+ accessibilityLabel: routeOptions.tabBarAccessibilityLabel,
408
+ testID: routeOptions.tabBarButtonTestID,
409
+ style: routeOptions.tabBarItemStyle,
410
+ isDisabled,
411
+ onPress: () => {
412
+ const event = navigation.emit({
413
+ type: "tabPress",
414
+ target: route.key,
415
+ canPreventDefault: true
416
+ });
417
+ if (!focused && !event.defaultPrevented) {
418
+ navigation.navigate(route.name, route.params);
419
+ }
420
+ },
421
+ onLongPress: () => {
422
+ navigation.emit({
423
+ type: "tabLongPress",
424
+ target: route.key
425
+ });
426
+ }
427
+ }
428
+ );
429
+ })
430
+ );
431
+ }
432
+ const { children, selectedKey, defaultSelectedKey, onSelectionChange } = props;
433
+ const firstItemKey = React2.useMemo(() => {
434
+ const child = React2.Children.toArray(children)[0];
435
+ if (React2.isValidElement(child)) {
436
+ return child.props.itemKey;
437
+ }
438
+ return void 0;
439
+ }, [children]);
440
+ const isControlled = typeof selectedKey === "string";
441
+ const [internalSelectedKey, setInternalSelectedKey] = useState2(
442
+ defaultSelectedKey ?? firstItemKey
443
+ );
444
+ const resolvedSelectedKey = isControlled ? selectedKey : internalSelectedKey;
445
+ const handleSelectionChange = (nextKey) => {
446
+ if (!isControlled) {
447
+ setInternalSelectedKey(nextKey);
448
+ }
449
+ onSelectionChange?.(nextKey);
450
+ };
451
+ const contextValue = useMemo3(
452
+ () => ({
453
+ selectedKey: resolvedSelectedKey,
454
+ onSelectionChange: handleSelectionChange,
455
+ isDisabled,
456
+ showLabel,
457
+ size,
458
+ variant,
459
+ themeColor,
460
+ indicatorColor,
461
+ activeColor,
462
+ inactiveColor
463
+ }),
464
+ [
465
+ activeColor,
466
+ inactiveColor,
467
+ indicatorColor,
468
+ isDisabled,
469
+ resolvedSelectedKey,
470
+ showLabel,
471
+ size,
472
+ variant,
473
+ themeColor
474
+ ]
475
+ );
476
+ return /* @__PURE__ */ React2.createElement(BottomTabBarContext.Provider, { value: contextValue }, /* @__PURE__ */ React2.createElement(
477
+ View2,
478
+ {
479
+ style: [
480
+ styles.container,
481
+ {
482
+ minHeight: sizeStyles.minHeight + insetBottom,
483
+ paddingBottom: insetBottom,
484
+ backgroundColor: colors.containerColor,
485
+ borderTopColor: colors.borderColor
486
+ },
487
+ style,
488
+ customAppearance?.container
489
+ ]
490
+ },
491
+ children
492
+ ));
493
+ };
494
+ export {
495
+ BottomTabBar,
496
+ BottomTabBarItem
497
+ };
@@ -1,8 +1,105 @@
1
1
  import React, { ReactNode } from 'react';
2
- import { a as ButtonProps, b as ButtonVariant, B as ButtonRadius, E as ElevationLevel } from '../button.type-ikaWzhIg.cjs';
3
- export { S as SpinnerPlacement } from '../button.type-ikaWzhIg.cjs';
4
- import { ViewStyle, GestureResponderEvent } from 'react-native';
5
- import { S as Size, T as ThemeColor } from '../index-BOw6tbkc.cjs';
2
+ import { ViewStyle, TextStyle, GestureResponderEvent } from 'react-native';
3
+ import { T as ThemeColor, S as Size } from '../index-BOw6tbkc.cjs';
4
+
5
+ type ButtonVariant = 'solid' | 'outlined' | 'flat' | 'light' | 'faded';
6
+ type ButtonRadius = 'none' | 'sm' | 'md' | 'lg' | 'full';
7
+ type SpinnerPlacement = 'start' | 'end';
8
+ type ElevationLevel = 0 | 1 | 2 | 3 | 4;
9
+ type ButtonCustomAppearance = {
10
+ /**
11
+ * Custom styles for the outer container
12
+ */
13
+ container?: ViewStyle;
14
+ /**
15
+ * Custom styles for the button
16
+ */
17
+ button?: ViewStyle;
18
+ /**
19
+ * Custom styles for the button text
20
+ */
21
+ text?: TextStyle;
22
+ };
23
+ type ButtonProps = {
24
+ /**
25
+ * The content to display in the button.
26
+ */
27
+ children: ReactNode;
28
+ /**
29
+ * The theme color of the button.
30
+ * @default 'default'
31
+ */
32
+ themeColor?: ThemeColor;
33
+ /**
34
+ * The variant of the button.
35
+ * @default 'solid'
36
+ */
37
+ variant?: ButtonVariant;
38
+ /**
39
+ * The size of the button.
40
+ * @default 'md'
41
+ */
42
+ size?: Size;
43
+ /**
44
+ * The border radius of the button.
45
+ * @default 'md'
46
+ */
47
+ radius?: ButtonRadius;
48
+ /**
49
+ * Content to display at the start of the button.
50
+ */
51
+ startContent?: ReactNode;
52
+ /**
53
+ * Content to display at the end of the button.
54
+ */
55
+ endContent?: ReactNode;
56
+ /**
57
+ * The placement of the spinner when isLoading is true.
58
+ * @default 'start'
59
+ */
60
+ spinnerPlacement?: SpinnerPlacement;
61
+ /**
62
+ * Whether the button should take the full width of its container.
63
+ * @default false
64
+ */
65
+ fullWidth?: boolean;
66
+ /**
67
+ * Whether the button is disabled.
68
+ * @default false
69
+ */
70
+ isDisabled?: boolean;
71
+ /**
72
+ * Whether the button is in a loading state.
73
+ * @default false
74
+ */
75
+ isLoading?: boolean;
76
+ /**
77
+ * Android elevation level from 0 to 4.
78
+ * Does not apply to `outlined` and `light` variants.
79
+ * @default 0
80
+ */
81
+ elevation?: ElevationLevel;
82
+ /**
83
+ * Custom appearance styles for button parts
84
+ */
85
+ customAppearance?: ButtonCustomAppearance;
86
+ /**
87
+ * Callback fired when the button is pressed.
88
+ */
89
+ onPress?: (event: GestureResponderEvent) => void;
90
+ /**
91
+ * Callback fired when the button is long pressed.
92
+ */
93
+ onLongPress?: (event: GestureResponderEvent) => void;
94
+ /**
95
+ * Callback fired when the button press starts.
96
+ */
97
+ onPressIn?: (event: GestureResponderEvent) => void;
98
+ /**
99
+ * Callback fired when the button press ends.
100
+ */
101
+ onPressOut?: (event: GestureResponderEvent) => void;
102
+ };
6
103
 
7
104
  declare const Button: React.FC<ButtonProps>;
8
105
 
@@ -74,4 +171,4 @@ type IconButtonProps = {
74
171
 
75
172
  declare const IconButton: React.FC<IconButtonProps>;
76
173
 
77
- export { Button, ButtonProps, ButtonRadius, ButtonVariant, IconButton, type IconButtonProps };
174
+ export { Button, type ButtonProps, type ButtonRadius, type ButtonVariant, IconButton, type IconButtonProps, type SpinnerPlacement };