@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
@@ -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-D8tzEBo7.js';
3
- export { S as SpinnerPlacement } from '../button.type-D8tzEBo7.js';
4
- import { ViewStyle, GestureResponderEvent } from 'react-native';
5
- import { S as Size, T as ThemeColor } from '../index-BOw6tbkc.js';
2
+ import { ViewStyle, TextStyle, GestureResponderEvent } from 'react-native';
3
+ import { T as ThemeColor, S as Size } from '../index-BOw6tbkc.js';
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 };
@@ -1,11 +1,10 @@
1
1
  import {
2
2
  ActivityIndicator
3
- } from "../chunk-F7WH4DMG.js";
4
- import "../chunk-DXXNBF5P.js";
3
+ } from "../chunk-UI5L26KD.js";
5
4
  import {
6
5
  useBorderRadiusStyles,
7
6
  useXUITheme
8
- } from "../chunk-LTKYHG5V.js";
7
+ } from "../chunk-GHCVNQET.js";
9
8
 
10
9
  // src/components/button/button.tsx
11
10
  import React from "react";
@@ -0,0 +1,4 @@
1
+ type ButtonRadius = 'none' | 'sm' | 'md' | 'lg' | 'full';
2
+ type ElevationLevel = 0 | 1 | 2 | 3 | 4;
3
+
4
+ export type { ButtonRadius as B, ElevationLevel as E };
@@ -0,0 +1,4 @@
1
+ type ButtonRadius = 'none' | 'sm' | 'md' | 'lg' | 'full';
2
+ type ElevationLevel = 0 | 1 | 2 | 3 | 4;
3
+
4
+ export type { ButtonRadius as B, ElevationLevel as E };
@@ -209,6 +209,7 @@ var Card = ({
209
209
  children,
210
210
  themeColor = "default",
211
211
  radius = "lg",
212
+ padding = 16,
212
213
  elevation = 0,
213
214
  fullWidth = false,
214
215
  isHoverable = false,
@@ -299,6 +300,7 @@ var Card = ({
299
300
  fullWidth && styles.fullWidth,
300
301
  isDisabled && styles.disabled,
301
302
  {
303
+ padding,
302
304
  transform: [{ scale: animatedScale }],
303
305
  opacity: animatedOpacity
304
306
  },
@@ -1,7 +1,7 @@
1
1
  import React, { ReactNode } from 'react';
2
2
  import { ViewStyle, TextStyle, GestureResponderEvent } from 'react-native';
3
3
  import { T as ThemeColor, R as Radius } from '../index-BOw6tbkc.cjs';
4
- import { E as ElevationLevel } from '../button.type-ikaWzhIg.cjs';
4
+ import { E as ElevationLevel } from '../button.type-j1ZdkkSl.cjs';
5
5
 
6
6
  type CardCustomAppearance = {
7
7
  /**
@@ -44,6 +44,11 @@ type CardProps = {
44
44
  * @default 'lg'
45
45
  */
46
46
  radius?: Radius;
47
+ /**
48
+ * Card padding (applies to all sides).
49
+ * @default 16
50
+ */
51
+ padding?: number;
47
52
  /**
48
53
  * Android elevation level from 0 to 4.
49
54
  * @default 0
@@ -1,7 +1,7 @@
1
1
  import React, { ReactNode } from 'react';
2
2
  import { ViewStyle, TextStyle, GestureResponderEvent } from 'react-native';
3
3
  import { T as ThemeColor, R as Radius } from '../index-BOw6tbkc.js';
4
- import { E as ElevationLevel } from '../button.type-D8tzEBo7.js';
4
+ import { E as ElevationLevel } from '../button.type-j1ZdkkSl.js';
5
5
 
6
6
  type CardCustomAppearance = {
7
7
  /**
@@ -44,6 +44,11 @@ type CardProps = {
44
44
  * @default 'lg'
45
45
  */
46
46
  radius?: Radius;
47
+ /**
48
+ * Card padding (applies to all sides).
49
+ * @default 16
50
+ */
51
+ padding?: number;
47
52
  /**
48
53
  * Android elevation level from 0 to 4.
49
54
  * @default 0
@@ -1,8 +1,8 @@
1
- import "../chunk-DXXNBF5P.js";
1
+ import "../chunk-CZFDZPAS.js";
2
2
  import {
3
3
  useBorderRadiusStyles,
4
4
  useXUITheme
5
- } from "../chunk-LTKYHG5V.js";
5
+ } from "../chunk-I4V5Y5GD.js";
6
6
 
7
7
  // src/components/card/card.tsx
8
8
  import React from "react";
@@ -117,6 +117,7 @@ var Card = ({
117
117
  children,
118
118
  themeColor = "default",
119
119
  radius = "lg",
120
+ padding = 16,
120
121
  elevation = 0,
121
122
  fullWidth = false,
122
123
  isHoverable = false,
@@ -207,6 +208,7 @@ var Card = ({
207
208
  fullWidth && styles.fullWidth,
208
209
  isDisabled && styles.disabled,
209
210
  {
211
+ padding,
210
212
  transform: [{ scale: animatedScale }],
211
213
  opacity: animatedOpacity
212
214
  },
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  useBorderRadiusStyles
3
- } from "../chunk-LTKYHG5V.js";
3
+ } from "../chunk-I4V5Y5GD.js";
4
4
 
5
5
  // src/components/carousel/carousel.tsx
6
6
  import React3, { useState, useRef, useCallback, useEffect } from "react";