@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,6 +1,10 @@
1
+ import {
2
+ CheckmarkIcon
3
+ } from "../chunk-GBHQCAKW.js";
4
+ import "../chunk-DXXNBF5P.js";
1
5
  import {
2
6
  useXUITheme
3
- } from "../chunk-GHCVNQET.js";
7
+ } from "../chunk-LTKYHG5V.js";
4
8
 
5
9
  // src/components/select/select.tsx
6
10
  import React3, { useCallback as useCallback2, useMemo as useMemo2 } from "react";
@@ -713,25 +717,9 @@ var Select = ({
713
717
  };
714
718
 
715
719
  // src/components/select/select-item.tsx
716
- import React5, { useContext } from "react";
720
+ import React4, { useContext } from "react";
717
721
  import { Pressable as Pressable3, Text as Text3, View as View3 } from "react-native";
718
722
 
719
- // src/components/select/checkmark-icon.tsx
720
- import React4 from "react";
721
- import Svg2, { Polyline } from "react-native-svg";
722
- function CheckmarkIcon({ color, size }) {
723
- return /* @__PURE__ */ React4.createElement(Svg2, { width: size, height: size, viewBox: "0 0 17 18", fill: "none" }, /* @__PURE__ */ React4.createElement(
724
- Polyline,
725
- {
726
- points: "1 9 7 14 15 4",
727
- stroke: color,
728
- strokeWidth: 2,
729
- strokeLinecap: "round",
730
- strokeLinejoin: "round"
731
- }
732
- ));
733
- }
734
-
735
723
  // src/components/select/select-item.hook.ts
736
724
  import { useMemo as useMemo3 } from "react";
737
725
  import { getSafeThemeColor as getSafeThemeColor2 } from "@xaui/core";
@@ -851,7 +839,7 @@ var SelectItem = ({
851
839
  }
852
840
  onSelected?.();
853
841
  };
854
- return /* @__PURE__ */ React5.createElement(
842
+ return /* @__PURE__ */ React4.createElement(
855
843
  Pressable3,
856
844
  {
857
845
  onPress: handlePress,
@@ -868,7 +856,7 @@ var SelectItem = ({
868
856
  ]
869
857
  },
870
858
  startContent,
871
- /* @__PURE__ */ React5.createElement(View3, { style: styles2.content }, /* @__PURE__ */ React5.createElement(
859
+ /* @__PURE__ */ React4.createElement(View3, { style: styles2.content }, /* @__PURE__ */ React4.createElement(
872
860
  Text3,
873
861
  {
874
862
  style: [
@@ -878,7 +866,7 @@ var SelectItem = ({
878
866
  ]
879
867
  },
880
868
  label
881
- ), description && /* @__PURE__ */ React5.createElement(
869
+ ), description && /* @__PURE__ */ React4.createElement(
882
870
  Text3,
883
871
  {
884
872
  style: [
@@ -888,7 +876,7 @@ var SelectItem = ({
888
876
  },
889
877
  description
890
878
  )),
891
- isSelected && (selectedIcon || /* @__PURE__ */ React5.createElement(CheckmarkIcon, { color: checkmarkColor, size: 16 })),
879
+ isSelected && (selectedIcon || /* @__PURE__ */ React4.createElement(CheckmarkIcon, { color: checkmarkColor, size: 16 })),
892
880
  endContent
893
881
  );
894
882
  };
@@ -1,46 +1,15 @@
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);
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }require('../chunk-HSPTLUFA.cjs');
29
2
 
30
- // src/components/skeleton/index.ts
31
- var skeleton_exports = {};
32
- __export(skeleton_exports, {
33
- Skeleton: () => Skeleton
34
- });
35
- module.exports = __toCommonJS(skeleton_exports);
3
+
4
+ var _chunkOQ2BLOOGcjs = require('../chunk-OQ2BLOOG.cjs');
36
5
 
37
6
  // src/components/skeleton/skeleton.tsx
38
- var import_react6 = __toESM(require("react"), 1);
39
- var import_react_native5 = require("react-native");
7
+ var _react = require('react'); var _react2 = _interopRequireDefault(_react);
8
+ var _reactnative = require('react-native');
40
9
 
41
10
  // src/components/skeleton/skeleton.style.ts
42
- var import_react_native = require("react-native");
43
- var styles = import_react_native.StyleSheet.create({
11
+
12
+ var styles = _reactnative.StyleSheet.create({
44
13
  skeleton: {
45
14
  width: "100%",
46
15
  height: 16,
@@ -49,45 +18,6 @@ var styles = import_react_native.StyleSheet.create({
49
18
  }
50
19
  });
51
20
 
52
- // src/core/theme-context.tsx
53
- var import_react4 = __toESM(require("react"), 1);
54
- var import_react_native3 = require("react-native");
55
- var import_theme = require("@xaui/core/theme");
56
- var import_palette = require("@xaui/core/palette");
57
-
58
- // src/core/portal/portal.tsx
59
- var import_react2 = require("react");
60
-
61
- // src/core/portal/portal-context.ts
62
- var import_react = require("react");
63
- var PortalContext = (0, import_react.createContext)(null);
64
-
65
- // src/core/portal/portal-host.tsx
66
- var import_react3 = __toESM(require("react"), 1);
67
- var import_react_native2 = require("react-native");
68
- var hostStyles = import_react_native2.StyleSheet.create({
69
- container: {
70
- flex: 1
71
- }
72
- });
73
-
74
- // src/core/theme-context.tsx
75
- var XUIThemeContext = (0, import_react4.createContext)(null);
76
-
77
- // src/core/theme-hooks.ts
78
- var import_react5 = require("react");
79
- var import_react_native4 = require("react-native");
80
- function useXUITheme() {
81
- const theme = (0, import_react5.useContext)(XUIThemeContext);
82
- if (!theme) {
83
- throw new Error("useXUITheme must be used within XUIProvider");
84
- }
85
- return theme;
86
- }
87
-
88
- // src/core/index.ts
89
- var import_theme2 = require("@xaui/core/theme");
90
-
91
21
  // src/components/skeleton/skeleton.tsx
92
22
  var Skeleton = ({
93
23
  children,
@@ -99,29 +29,29 @@ var Skeleton = ({
99
29
  radius = "md",
100
30
  style
101
31
  }) => {
102
- const theme = useXUITheme();
103
- const opacity = (0, import_react6.useRef)(new import_react_native5.Animated.Value(0.6)).current;
104
- const resolvedColor = (0, import_react6.useMemo)(
105
- () => skeletonColor ?? theme.colors.default.background,
32
+ const theme = _chunkOQ2BLOOGcjs.useXUITheme.call(void 0, );
33
+ const opacity = _react.useRef.call(void 0, new _reactnative.Animated.Value(0.6)).current;
34
+ const resolvedColor = _react.useMemo.call(void 0,
35
+ () => _nullishCoalesce(skeletonColor, () => ( theme.colors.default.background)),
106
36
  [skeletonColor, theme.colors.default.background]
107
37
  );
108
- const resolvedRadius = (0, import_react6.useMemo)(
38
+ const resolvedRadius = _react.useMemo.call(void 0,
109
39
  () => theme.borderRadius[radius],
110
40
  [radius, theme.borderRadius]
111
41
  );
112
- (0, import_react6.useEffect)(() => {
42
+ _react.useEffect.call(void 0, () => {
113
43
  if (isLoaded || disableAnimation) {
114
44
  opacity.setValue(1);
115
45
  return;
116
46
  }
117
- const loop = import_react_native5.Animated.loop(
118
- import_react_native5.Animated.sequence([
119
- import_react_native5.Animated.timing(opacity, {
47
+ const loop = _reactnative.Animated.loop(
48
+ _reactnative.Animated.sequence([
49
+ _reactnative.Animated.timing(opacity, {
120
50
  toValue: 0.35,
121
51
  duration: 700,
122
52
  useNativeDriver: true
123
53
  }),
124
- import_react_native5.Animated.timing(opacity, {
54
+ _reactnative.Animated.timing(opacity, {
125
55
  toValue: 0.9,
126
56
  duration: 700,
127
57
  useNativeDriver: true
@@ -134,10 +64,10 @@ var Skeleton = ({
134
64
  };
135
65
  }, [disableAnimation, isLoaded, opacity]);
136
66
  if (isLoaded) {
137
- return /* @__PURE__ */ import_react6.default.createElement(import_react6.default.Fragment, null, children);
67
+ return /* @__PURE__ */ _react2.default.createElement(_react2.default.Fragment, null, children);
138
68
  }
139
- return /* @__PURE__ */ import_react6.default.createElement(
140
- import_react_native5.Animated.View,
69
+ return /* @__PURE__ */ _react2.default.createElement(
70
+ _reactnative.Animated.View,
141
71
  {
142
72
  style: [
143
73
  styles.skeleton,
@@ -154,7 +84,6 @@ var Skeleton = ({
154
84
  );
155
85
  };
156
86
  Skeleton.displayName = "Skeleton";
157
- // Annotate the CommonJS export names for ESM import in node:
158
- 0 && (module.exports = {
159
- Skeleton
160
- });
87
+
88
+
89
+ exports.Skeleton = Skeleton;
@@ -1,7 +1,7 @@
1
- import "../chunk-CZFDZPAS.js";
1
+ import "../chunk-DXXNBF5P.js";
2
2
  import {
3
3
  useXUITheme
4
- } from "../chunk-I4V5Y5GD.js";
4
+ } from "../chunk-LTKYHG5V.js";
5
5
 
6
6
  // src/components/skeleton/skeleton.tsx
7
7
  import React, { useEffect, useMemo, useRef } from "react";