@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.
Files changed (107) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +105 -228
  3. package/dist/alert/index.cjs +92 -166
  4. package/dist/alert/index.js +2 -1
  5. package/dist/app-bar/index.cjs +24 -98
  6. package/dist/app-bar/index.js +2 -1
  7. package/dist/autocomplete/index.cjs +192 -281
  8. package/dist/autocomplete/index.js +36 -48
  9. package/dist/avatar/index.cjs +59 -133
  10. package/dist/avatar/index.js +2 -1
  11. package/dist/badge/index.cjs +26 -99
  12. package/dist/badge/index.js +2 -1
  13. package/dist/bottom-sheet/index.cjs +5 -456
  14. package/dist/bottom-sheet/index.js +4 -363
  15. package/dist/bottom-tab-bar/index.cjs +93 -167
  16. package/dist/bottom-tab-bar/index.js +2 -2
  17. package/dist/button/index.cjs +73 -525
  18. package/dist/button/index.js +3 -2
  19. package/dist/card/index.cjs +76 -169
  20. package/dist/card/index.js +2 -2
  21. package/dist/carousel/index.cjs +68 -145
  22. package/dist/carousel/index.js +1 -1
  23. package/dist/chart/index.cjs +132 -173
  24. package/dist/checkbox/index.cjs +70 -143
  25. package/dist/checkbox/index.js +2 -1
  26. package/dist/chip/index.cjs +89 -164
  27. package/dist/chip/index.js +2 -1
  28. package/dist/chunk-BD72HIPR.cjs +75 -0
  29. package/dist/chunk-DHSTKO3K.cjs +19 -0
  30. package/dist/{chunk-CZFDZPAS.js → chunk-DXXNBF5P.js} +5 -0
  31. package/dist/{chunk-UI5L26KD.js → chunk-F7WH4DMG.js} +1 -1
  32. package/dist/chunk-GBHQCAKW.js +19 -0
  33. package/dist/chunk-HC2SSHNU.js +368 -0
  34. package/dist/chunk-HSPTLUFA.cjs +7 -0
  35. package/dist/chunk-JEGEPGVU.js +287 -0
  36. package/dist/chunk-KTLGDLCB.cjs +287 -0
  37. package/dist/{chunk-GHCVNQET.js → chunk-LTKYHG5V.js} +5 -12
  38. package/dist/{chunk-ULJSCNPE.js → chunk-LUBWRVI2.js} +1 -1
  39. package/dist/chunk-OQ2BLOOG.cjs +138 -0
  40. package/dist/chunk-QMYWIWSX.cjs +384 -0
  41. package/dist/chunk-XFPPR2VB.cjs +368 -0
  42. package/dist/core/index.cjs +22 -168
  43. package/dist/core/index.d.cts +1 -1
  44. package/dist/core/index.d.ts +1 -1
  45. package/dist/core/index.js +5 -3
  46. package/dist/datepicker/index.cjs +239 -320
  47. package/dist/datepicker/index.js +2 -1
  48. package/dist/divider/index.cjs +5 -145
  49. package/dist/divider/index.js +3 -2
  50. package/dist/drawer/index.cjs +39 -112
  51. package/dist/drawer/index.js +2 -1
  52. package/dist/expansion-panel/index.cjs +91 -230
  53. package/dist/expansion-panel/index.js +3 -2
  54. package/dist/fab/index.cjs +6 -722
  55. package/dist/fab/index.js +4 -3
  56. package/dist/fab-menu/index.cjs +81 -814
  57. package/dist/fab-menu/index.js +4 -3
  58. package/dist/feature-discovery/index.cjs +72 -139
  59. package/dist/feature-discovery/index.js +2 -2
  60. package/dist/index.cjs +1 -18
  61. package/dist/indicator/index.cjs +5 -445
  62. package/dist/indicator/index.js +3 -2
  63. package/dist/input/index.cjs +214 -282
  64. package/dist/input/index.js +2 -2
  65. package/dist/list/index.cjs +71 -146
  66. package/dist/list/index.js +2 -1
  67. package/dist/menu/index.cjs +59 -127
  68. package/dist/menu/index.js +2 -2
  69. package/dist/menubox/index.cjs +60 -132
  70. package/dist/menubox/index.js +2 -1
  71. package/dist/pager/index.cjs +42 -80
  72. package/dist/progress/index.cjs +43 -114
  73. package/dist/progress/index.js +2 -1
  74. package/dist/radio/index.cjs +82 -154
  75. package/dist/radio/index.js +2 -1
  76. package/dist/segment-button/index.cjs +60 -147
  77. package/dist/segment-button/index.js +2 -2
  78. package/dist/select/index.cjs +149 -224
  79. package/dist/select/index.js +10 -22
  80. package/dist/skeleton/index.cjs +23 -94
  81. package/dist/skeleton/index.js +2 -2
  82. package/dist/slider/index.cjs +77 -156
  83. package/dist/slider/index.js +2 -1
  84. package/dist/snackbar/index.cjs +420 -0
  85. package/dist/snackbar/index.d.cts +175 -0
  86. package/dist/snackbar/index.d.ts +175 -0
  87. package/dist/snackbar/index.js +420 -0
  88. package/dist/stepper/index.cjs +121 -195
  89. package/dist/stepper/index.js +2 -1
  90. package/dist/switch/index.cjs +48 -121
  91. package/dist/switch/index.js +2 -1
  92. package/dist/tabs/index.cjs +67 -151
  93. package/dist/tabs/index.js +2 -1
  94. package/dist/timepicker/index.cjs +135 -593
  95. package/dist/timepicker/index.js +24 -383
  96. package/dist/toolbar/index.cjs +59 -128
  97. package/dist/toolbar/index.js +2 -1
  98. package/dist/typography/index.cjs +37 -92
  99. package/dist/typography/index.d.cts +1 -1
  100. package/dist/typography/index.d.ts +1 -1
  101. package/dist/typography/index.js +20 -1
  102. package/dist/view/index.cjs +178 -223
  103. package/package.json +7 -1
  104. package/dist/chunk-3XSXTM3G.js +0 -661
  105. package/dist/chunk-4KSZLONZ.js +0 -79
  106. package/dist/chunk-I4V5Y5GD.js +0 -76
  107. package/dist/chunk-URBEEDFX.js +0 -79
@@ -1,79 +0,0 @@
1
- // src/core/theme-hooks.ts
2
- import { useContext as useContext2, useMemo as useMemo2 } from "react";
3
- import { useColorScheme as useColorScheme2 } from "react-native";
4
-
5
- // src/core/theme-context.tsx
6
- import React3, { createContext as createContext2 } from "react";
7
- import { useColorScheme } from "react-native";
8
- import { defaultTheme } from "@xaui/core/theme";
9
- import { colors } from "@xaui/core/palette";
10
-
11
- // src/core/portal/portal.tsx
12
- import { useContext, useEffect, useLayoutEffect, useRef } from "react";
13
-
14
- // src/core/portal/portal-context.ts
15
- import { createContext } from "react";
16
- var PortalContext = createContext(null);
17
-
18
- // src/core/portal/portal.tsx
19
- var portalId = 0;
20
- var Portal = ({ children }) => {
21
- const context = useContext(PortalContext);
22
- const keyRef = useRef(`portal-${++portalId}`);
23
- useLayoutEffect(() => {
24
- if (!context) return;
25
- context.addPortal(keyRef.current, children);
26
- }, [children, context]);
27
- useEffect(() => {
28
- if (!context) return;
29
- const key = keyRef.current;
30
- return () => {
31
- context.removePortal(key);
32
- };
33
- }, [context]);
34
- return null;
35
- };
36
-
37
- // src/core/portal/portal-host.tsx
38
- import React2, { useCallback, useMemo, useRef as useRef2, useState } from "react";
39
- import { StyleSheet, View } from "react-native";
40
- var hostStyles = StyleSheet.create({
41
- container: {
42
- flex: 1
43
- }
44
- });
45
-
46
- // src/core/theme-context.tsx
47
- var XUIThemeContext = createContext2(null);
48
-
49
- // src/core/theme-hooks.ts
50
- function useXUITheme() {
51
- const theme = useContext2(XUIThemeContext);
52
- if (!theme) {
53
- throw new Error("useXUITheme must be used within XUIProvider");
54
- }
55
- return theme;
56
- }
57
- function useBorderRadiusStyles(radius) {
58
- const theme = useXUITheme();
59
- const borderRadius = useMemo2(() => {
60
- const radiusMap = {
61
- none: theme.borderRadius.none,
62
- sm: theme.borderRadius.sm,
63
- md: theme.borderRadius.md,
64
- lg: theme.borderRadius.lg,
65
- full: theme.borderRadius.full
66
- };
67
- return { borderRadius: radiusMap[radius] };
68
- }, [radius, theme]);
69
- return borderRadius;
70
- }
71
-
72
- // src/core/index.ts
73
- import { defaultDarkTheme, defaultTheme as defaultTheme2 } from "@xaui/core/theme";
74
-
75
- export {
76
- Portal,
77
- useXUITheme,
78
- useBorderRadiusStyles
79
- };
@@ -1,76 +0,0 @@
1
- // src/core/portal/portal.tsx
2
- import { useContext, useEffect, useLayoutEffect, useRef } from "react";
3
-
4
- // src/core/portal/portal-context.ts
5
- import { createContext } from "react";
6
- var PortalContext = createContext(null);
7
-
8
- // src/core/portal/portal.tsx
9
- var portalId = 0;
10
- var Portal = ({ children }) => {
11
- const context = useContext(PortalContext);
12
- const keyRef = useRef(`portal-${++portalId}`);
13
- useLayoutEffect(() => {
14
- if (!context) return;
15
- context.addPortal(keyRef.current, children);
16
- }, [children, context]);
17
- useEffect(() => {
18
- if (!context) return;
19
- const key = keyRef.current;
20
- return () => {
21
- context.removePortal(key);
22
- };
23
- }, [context]);
24
- return null;
25
- };
26
-
27
- // src/core/theme-hooks.ts
28
- import { useContext as useContext2, useMemo as useMemo2 } from "react";
29
- import { useColorScheme as useColorScheme2 } from "react-native";
30
-
31
- // src/core/theme-context.tsx
32
- import React3, { createContext as createContext2 } from "react";
33
- import { useColorScheme } from "react-native";
34
- import { defaultTheme } from "@xaui/core/theme";
35
- import { colors } from "@xaui/core/palette";
36
-
37
- // src/core/portal/portal-host.tsx
38
- import React2, { useCallback, useMemo, useRef as useRef2, useState } from "react";
39
- import { StyleSheet, View } from "react-native";
40
- var hostStyles = StyleSheet.create({
41
- container: {
42
- flex: 1
43
- }
44
- });
45
-
46
- // src/core/theme-context.tsx
47
- var XUIThemeContext = createContext2(null);
48
-
49
- // src/core/theme-hooks.ts
50
- function useXUITheme() {
51
- const theme = useContext2(XUIThemeContext);
52
- if (!theme) {
53
- throw new Error("useXUITheme must be used within XUIProvider");
54
- }
55
- return theme;
56
- }
57
- function useBorderRadiusStyles(radius) {
58
- const theme = useXUITheme();
59
- const borderRadius = useMemo2(() => {
60
- const radiusMap = {
61
- none: theme.borderRadius.none,
62
- sm: theme.borderRadius.sm,
63
- md: theme.borderRadius.md,
64
- lg: theme.borderRadius.lg,
65
- full: theme.borderRadius.full
66
- };
67
- return { borderRadius: radiusMap[radius] };
68
- }, [radius, theme]);
69
- return borderRadius;
70
- }
71
-
72
- export {
73
- Portal,
74
- useXUITheme,
75
- useBorderRadiusStyles
76
- };
@@ -1,79 +0,0 @@
1
- // src/core/portal/portal.tsx
2
- import { useContext, useEffect, useLayoutEffect, useRef } from "react";
3
-
4
- // src/core/portal/portal-context.ts
5
- import { createContext } from "react";
6
- var PortalContext = createContext(null);
7
-
8
- // src/core/portal/portal.tsx
9
- var portalId = 0;
10
- var Portal = ({ children }) => {
11
- const context = useContext(PortalContext);
12
- const keyRef = useRef(`portal-${++portalId}`);
13
- useLayoutEffect(() => {
14
- if (!context) return;
15
- context.addPortal(keyRef.current, children);
16
- }, [children, context]);
17
- useEffect(() => {
18
- if (!context) return;
19
- const key = keyRef.current;
20
- return () => {
21
- context.removePortal(key);
22
- };
23
- }, [context]);
24
- return null;
25
- };
26
-
27
- // src/core/theme-hooks.ts
28
- import { useContext as useContext2, useMemo as useMemo2 } from "react";
29
- import { useColorScheme as useColorScheme2 } from "react-native";
30
-
31
- // src/core/theme-context.tsx
32
- import React3, { createContext as createContext2 } from "react";
33
- import { useColorScheme } from "react-native";
34
- import { defaultTheme } from "@xaui/core/theme";
35
- import { colors } from "@xaui/core/palette";
36
-
37
- // src/core/portal/portal-host.tsx
38
- import React2, { useCallback, useMemo, useRef as useRef2, useState } from "react";
39
- import { StyleSheet, View } from "react-native";
40
- var hostStyles = StyleSheet.create({
41
- container: {
42
- flex: 1
43
- }
44
- });
45
-
46
- // src/core/theme-context.tsx
47
- var XUIThemeContext = createContext2(null);
48
-
49
- // src/core/theme-hooks.ts
50
- function useXUITheme() {
51
- const theme = useContext2(XUIThemeContext);
52
- if (!theme) {
53
- throw new Error("useXUITheme must be used within XUIProvider");
54
- }
55
- return theme;
56
- }
57
- function useBorderRadiusStyles(radius) {
58
- const theme = useXUITheme();
59
- const borderRadius = useMemo2(() => {
60
- const radiusMap = {
61
- none: theme.borderRadius.none,
62
- sm: theme.borderRadius.sm,
63
- md: theme.borderRadius.md,
64
- lg: theme.borderRadius.lg,
65
- full: theme.borderRadius.full
66
- };
67
- return { borderRadius: radiusMap[radius] };
68
- }, [radius, theme]);
69
- return borderRadius;
70
- }
71
-
72
- // src/core/index.ts
73
- import { defaultDarkTheme, defaultTheme as defaultTheme2 } from "@xaui/core/theme";
74
-
75
- export {
76
- Portal,
77
- useXUITheme,
78
- useBorderRadiusStyles
79
- };