@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,47 +1,29 @@
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(); } } 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-HSPTLUFA.cjs');
2
+
29
3
 
30
- // src/components/alert/index.ts
31
- var alert_exports = {};
32
- __export(alert_exports, {
33
- Alert: () => Alert
34
- });
35
- module.exports = __toCommonJS(alert_exports);
4
+
5
+ var _chunkOQ2BLOOGcjs = require('../chunk-OQ2BLOOG.cjs');
36
6
 
37
7
  // src/components/alert/alert.tsx
38
- var import_react8 = __toESM(require("react"), 1);
39
- var import_react_native5 = require("react-native");
40
- var import_react_native_reanimated = __toESM(require("react-native-reanimated"), 1);
8
+
9
+
10
+
11
+
12
+
13
+
14
+
15
+ var _react = require('react'); var _react2 = _interopRequireDefault(_react);
16
+ var _reactnative = require('react-native');
17
+
18
+
19
+
20
+
21
+
22
+ var _reactnativereanimated = require('react-native-reanimated'); var _reactnativereanimated2 = _interopRequireDefault(_reactnativereanimated);
41
23
 
42
24
  // src/components/alert/alert.style.ts
43
- var import_react_native = require("react-native");
44
- var styles = import_react_native.StyleSheet.create({
25
+
26
+ var styles = _reactnative.StyleSheet.create({
45
27
  container: {
46
28
  flexDirection: "row",
47
29
  alignItems: "center",
@@ -79,66 +61,11 @@ var styles = import_react_native.StyleSheet.create({
79
61
  });
80
62
 
81
63
  // src/components/alert/alert.hook.ts
82
- var import_react6 = require("react");
83
- var import_core = require("@xaui/core");
84
64
 
85
- // src/core/theme-context.tsx
86
- var import_react4 = __toESM(require("react"), 1);
87
- var import_react_native3 = require("react-native");
88
- var import_theme = require("@xaui/core/theme");
89
- var import_palette = require("@xaui/core/palette");
90
-
91
- // src/core/portal/portal.tsx
92
- var import_react2 = require("react");
93
-
94
- // src/core/portal/portal-context.ts
95
- var import_react = require("react");
96
- var PortalContext = (0, import_react.createContext)(null);
97
-
98
- // src/core/portal/portal-host.tsx
99
- var import_react3 = __toESM(require("react"), 1);
100
- var import_react_native2 = require("react-native");
101
- var hostStyles = import_react_native2.StyleSheet.create({
102
- container: {
103
- flex: 1
104
- }
105
- });
106
-
107
- // src/core/theme-context.tsx
108
- var XUIThemeContext = (0, import_react4.createContext)(null);
109
-
110
- // src/core/theme-hooks.ts
111
- var import_react5 = require("react");
112
- var import_react_native4 = require("react-native");
113
- function useXUITheme() {
114
- const theme = (0, import_react5.useContext)(XUIThemeContext);
115
- if (!theme) {
116
- throw new Error("useXUITheme must be used within XUIProvider");
117
- }
118
- return theme;
119
- }
120
- function useBorderRadiusStyles(radius) {
121
- const theme = useXUITheme();
122
- const borderRadius = (0, import_react5.useMemo)(() => {
123
- const radiusMap = {
124
- none: theme.borderRadius.none,
125
- sm: theme.borderRadius.sm,
126
- md: theme.borderRadius.md,
127
- lg: theme.borderRadius.lg,
128
- full: theme.borderRadius.full
129
- };
130
- return { borderRadius: radiusMap[radius] };
131
- }, [radius, theme]);
132
- return borderRadius;
133
- }
134
-
135
- // src/core/index.ts
136
- var import_theme2 = require("@xaui/core/theme");
137
-
138
- // src/components/alert/alert.hook.ts
65
+ var _core = require('@xaui/core');
139
66
  var useAlertColorScheme = (themeColor) => {
140
- const theme = useXUITheme();
141
- const safeThemeColor = (0, import_core.getSafeThemeColor)(themeColor);
67
+ const theme = _chunkOQ2BLOOGcjs.useXUITheme.call(void 0, );
68
+ const safeThemeColor = _core.getSafeThemeColor.call(void 0, themeColor);
142
69
  return {
143
70
  theme,
144
71
  colorScheme: theme.colors[safeThemeColor],
@@ -147,10 +74,10 @@ var useAlertColorScheme = (themeColor) => {
147
74
  };
148
75
  var useAlertContainerStyles = (themeColor, variant) => {
149
76
  const { theme, colorScheme, isDefault } = useAlertColorScheme(themeColor);
150
- const containerStyles = (0, import_react6.useMemo)(() => {
151
- const backgroundColor = variant === "solid" ? colorScheme.main : variant === "flat" ? colorScheme.background : variant === "faded" ? (0, import_core.withOpacity)(colorScheme.background, 0.75) : "transparent";
77
+ const containerStyles = _react.useMemo.call(void 0, () => {
78
+ const backgroundColor = variant === "solid" ? colorScheme.main : variant === "flat" ? colorScheme.background : variant === "faded" ? _core.withOpacity.call(void 0, colorScheme.background, 0.75) : "transparent";
152
79
  const borderWidth = variant === "bordered" || variant === "faded" ? theme.borderWidth.md : 0;
153
- const borderColor = variant === "bordered" ? (0, import_core.withOpacity)(colorScheme.main, 0.75) : variant === "faded" ? (0, import_core.withOpacity)(isDefault ? theme.colors.foreground : colorScheme.main, 0.25) : "transparent";
80
+ const borderColor = variant === "bordered" ? _core.withOpacity.call(void 0, colorScheme.main, 0.75) : variant === "faded" ? _core.withOpacity.call(void 0, isDefault ? theme.colors.foreground : colorScheme.main, 0.25) : "transparent";
154
81
  return {
155
82
  backgroundColor,
156
83
  borderColor,
@@ -163,10 +90,10 @@ var useAlertContainerStyles = (themeColor, variant) => {
163
90
  };
164
91
  var useAlertIconWrapperStyles = (themeColor, variant) => {
165
92
  const { theme, colorScheme, isDefault } = useAlertColorScheme(themeColor);
166
- const iconWrapperStyles = (0, import_react6.useMemo)(() => {
167
- const backgroundColor = variant === "solid" ? (0, import_core.withOpacity)(colorScheme.foreground, 0.16) : (0, import_core.withOpacity)(isDefault ? theme.colors.foreground : colorScheme.main, 0.12);
93
+ const iconWrapperStyles = _react.useMemo.call(void 0, () => {
94
+ const backgroundColor = variant === "solid" ? _core.withOpacity.call(void 0, colorScheme.foreground, 0.16) : _core.withOpacity.call(void 0, isDefault ? theme.colors.foreground : colorScheme.main, 0.12);
168
95
  const borderWidth = variant === "bordered" || variant === "faded" ? theme.borderWidth.xs : 0;
169
- const borderColor = (0, import_core.withOpacity)(
96
+ const borderColor = _core.withOpacity.call(void 0,
170
97
  isDefault ? theme.colors.foreground : colorScheme.main,
171
98
  0.2
172
99
  );
@@ -180,7 +107,7 @@ var useAlertIconWrapperStyles = (themeColor, variant) => {
180
107
  };
181
108
  var useAlertTextStyles = (themeColor, variant) => {
182
109
  const { theme, colorScheme, isDefault } = useAlertColorScheme(themeColor);
183
- const textStyles = (0, import_react6.useMemo)(() => {
110
+ const textStyles = _react.useMemo.call(void 0, () => {
184
111
  const baseTextColor = variant === "solid" ? colorScheme.foreground : isDefault ? theme.colors.foreground : colorScheme.main;
185
112
  return {
186
113
  titleStyles: {
@@ -189,7 +116,7 @@ var useAlertTextStyles = (themeColor, variant) => {
189
116
  fontWeight: theme.fontWeights.semibold
190
117
  },
191
118
  descriptionStyles: {
192
- color: (0, import_core.withOpacity)(baseTextColor, 0.75),
119
+ color: _core.withOpacity.call(void 0, baseTextColor, 0.75),
193
120
  fontSize: theme.fontSizes.xs,
194
121
  fontWeight: theme.fontWeights.normal
195
122
  },
@@ -201,11 +128,11 @@ var useAlertTextStyles = (themeColor, variant) => {
201
128
  };
202
129
 
203
130
  // src/components/alert/alert-icons.tsx
204
- var import_react7 = __toESM(require("react"), 1);
205
- var import_react_native_svg = __toESM(require("react-native-svg"), 1);
131
+
132
+ var _reactnativesvg = require('react-native-svg'); var _reactnativesvg2 = _interopRequireDefault(_reactnativesvg);
206
133
  function InfoIcon({ color, size }) {
207
- return /* @__PURE__ */ import_react7.default.createElement(import_react_native_svg.default, { width: size, height: size, viewBox: "0 0 24 24", fill: "none" }, /* @__PURE__ */ import_react7.default.createElement(import_react_native_svg.Circle, { cx: 12, cy: 12, r: 10, stroke: color, strokeWidth: 2 }), /* @__PURE__ */ import_react7.default.createElement(
208
- import_react_native_svg.Line,
134
+ return /* @__PURE__ */ _react2.default.createElement(_reactnativesvg2.default, { width: size, height: size, viewBox: "0 0 24 24", fill: "none" }, /* @__PURE__ */ _react2.default.createElement(_reactnativesvg.Circle, { cx: 12, cy: 12, r: 10, stroke: color, strokeWidth: 2 }), /* @__PURE__ */ _react2.default.createElement(
135
+ _reactnativesvg.Line,
209
136
  {
210
137
  x1: 12,
211
138
  y1: 10,
@@ -215,11 +142,11 @@ function InfoIcon({ color, size }) {
215
142
  strokeWidth: 2,
216
143
  strokeLinecap: "round"
217
144
  }
218
- ), /* @__PURE__ */ import_react7.default.createElement(import_react_native_svg.Circle, { cx: 12, cy: 7, r: 1, fill: color }));
145
+ ), /* @__PURE__ */ _react2.default.createElement(_reactnativesvg.Circle, { cx: 12, cy: 7, r: 1, fill: color }));
219
146
  }
220
147
  function SuccessIcon({ color, size }) {
221
- return /* @__PURE__ */ import_react7.default.createElement(import_react_native_svg.default, { width: size, height: size, viewBox: "0 0 24 24", fill: "none" }, /* @__PURE__ */ import_react7.default.createElement(import_react_native_svg.Circle, { cx: 12, cy: 12, r: 10, stroke: color, strokeWidth: 2 }), /* @__PURE__ */ import_react7.default.createElement(
222
- import_react_native_svg.Path,
148
+ return /* @__PURE__ */ _react2.default.createElement(_reactnativesvg2.default, { width: size, height: size, viewBox: "0 0 24 24", fill: "none" }, /* @__PURE__ */ _react2.default.createElement(_reactnativesvg.Circle, { cx: 12, cy: 12, r: 10, stroke: color, strokeWidth: 2 }), /* @__PURE__ */ _react2.default.createElement(
149
+ _reactnativesvg.Path,
223
150
  {
224
151
  d: "M7 12.5L10.2 15.5L17 9",
225
152
  stroke: color,
@@ -230,16 +157,16 @@ function SuccessIcon({ color, size }) {
230
157
  ));
231
158
  }
232
159
  function WarningIcon({ color, size }) {
233
- return /* @__PURE__ */ import_react7.default.createElement(import_react_native_svg.default, { width: size, height: size, viewBox: "0 0 24 24", fill: "none" }, /* @__PURE__ */ import_react7.default.createElement(
234
- import_react_native_svg.Path,
160
+ return /* @__PURE__ */ _react2.default.createElement(_reactnativesvg2.default, { width: size, height: size, viewBox: "0 0 24 24", fill: "none" }, /* @__PURE__ */ _react2.default.createElement(
161
+ _reactnativesvg.Path,
235
162
  {
236
163
  d: "M12 3L22 20H2L12 3Z",
237
164
  stroke: color,
238
165
  strokeWidth: 2,
239
166
  strokeLinejoin: "round"
240
167
  }
241
- ), /* @__PURE__ */ import_react7.default.createElement(
242
- import_react_native_svg.Line,
168
+ ), /* @__PURE__ */ _react2.default.createElement(
169
+ _reactnativesvg.Line,
243
170
  {
244
171
  x1: 12,
245
172
  y1: 9,
@@ -249,11 +176,11 @@ function WarningIcon({ color, size }) {
249
176
  strokeWidth: 2,
250
177
  strokeLinecap: "round"
251
178
  }
252
- ), /* @__PURE__ */ import_react7.default.createElement(import_react_native_svg.Circle, { cx: 12, cy: 17, r: 1, fill: color }));
179
+ ), /* @__PURE__ */ _react2.default.createElement(_reactnativesvg.Circle, { cx: 12, cy: 17, r: 1, fill: color }));
253
180
  }
254
181
  function DangerIcon({ color, size }) {
255
- return /* @__PURE__ */ import_react7.default.createElement(import_react_native_svg.default, { width: size, height: size, viewBox: "0 0 24 24", fill: "none" }, /* @__PURE__ */ import_react7.default.createElement(import_react_native_svg.Circle, { cx: 12, cy: 12, r: 10, stroke: color, strokeWidth: 2 }), /* @__PURE__ */ import_react7.default.createElement(
256
- import_react_native_svg.Line,
182
+ return /* @__PURE__ */ _react2.default.createElement(_reactnativesvg2.default, { width: size, height: size, viewBox: "0 0 24 24", fill: "none" }, /* @__PURE__ */ _react2.default.createElement(_reactnativesvg.Circle, { cx: 12, cy: 12, r: 10, stroke: color, strokeWidth: 2 }), /* @__PURE__ */ _react2.default.createElement(
183
+ _reactnativesvg.Line,
257
184
  {
258
185
  x1: 9,
259
186
  y1: 9,
@@ -263,8 +190,8 @@ function DangerIcon({ color, size }) {
263
190
  strokeWidth: 2,
264
191
  strokeLinecap: "round"
265
192
  }
266
- ), /* @__PURE__ */ import_react7.default.createElement(
267
- import_react_native_svg.Line,
193
+ ), /* @__PURE__ */ _react2.default.createElement(
194
+ _reactnativesvg.Line,
268
195
  {
269
196
  x1: 15,
270
197
  y1: 9,
@@ -278,7 +205,7 @@ function DangerIcon({ color, size }) {
278
205
  }
279
206
 
280
207
  // src/components/alert/alert.tsx
281
- var import_icons = require("@xaui/icons");
208
+ var _icons = require('@xaui/icons');
282
209
  var iconMap = {
283
210
  default: InfoIcon,
284
211
  primary: InfoIcon,
@@ -304,72 +231,72 @@ var Alert = ({
304
231
  onClose,
305
232
  onVisibleChange
306
233
  }) => {
307
- const [internalVisible, setInternalVisible] = (0, import_react8.useState)(isVisible ?? true);
308
- const [shouldRender, setShouldRender] = (0, import_react8.useState)(isVisible ?? true);
234
+ const [internalVisible, setInternalVisible] = _react.useState.call(void 0, _nullishCoalesce(isVisible, () => ( true)));
235
+ const [shouldRender, setShouldRender] = _react.useState.call(void 0, _nullishCoalesce(isVisible, () => ( true)));
309
236
  const isControlled = typeof isVisible === "boolean";
310
237
  const visible = isControlled ? isVisible : internalVisible;
311
- const opacity = (0, import_react_native_reanimated.useSharedValue)(1);
312
- const scale = (0, import_react_native_reanimated.useSharedValue)(1);
313
- const radiusStyles = useBorderRadiusStyles(radius);
238
+ const opacity = _reactnativereanimated.useSharedValue.call(void 0, 1);
239
+ const scale = _reactnativereanimated.useSharedValue.call(void 0, 1);
240
+ const radiusStyles = _chunkOQ2BLOOGcjs.useBorderRadiusStyles.call(void 0, radius);
314
241
  const containerStyles = useAlertContainerStyles(themeColor, variant);
315
242
  const iconWrapperStyles = useAlertIconWrapperStyles(themeColor, variant);
316
243
  const { titleStyles, descriptionStyles, iconColor, closeButtonColor } = useAlertTextStyles(themeColor, variant);
317
- const finishClosing = (0, import_react8.useCallback)(() => {
244
+ const finishClosing = _react.useCallback.call(void 0, () => {
318
245
  setShouldRender(false);
319
246
  if (!isControlled) {
320
247
  setInternalVisible(false);
321
248
  }
322
- onVisibleChange?.(false);
323
- onClose?.();
249
+ _optionalChain([onVisibleChange, 'optionalCall', _ => _(false)]);
250
+ _optionalChain([onClose, 'optionalCall', _2 => _2()]);
324
251
  }, [isControlled, onClose, onVisibleChange]);
325
- const handleClose = (0, import_react8.useCallback)(() => {
252
+ const handleClose = _react.useCallback.call(void 0, () => {
326
253
  if (!visible) return;
327
- opacity.value = (0, import_react_native_reanimated.withTiming)(0, { duration: 250 });
328
- scale.value = (0, import_react_native_reanimated.withTiming)(0.95, { duration: 250 }, (finished) => {
254
+ opacity.value = _reactnativereanimated.withTiming.call(void 0, 0, { duration: 250 });
255
+ scale.value = _reactnativereanimated.withTiming.call(void 0, 0.95, { duration: 250 }, (finished) => {
329
256
  if (finished) {
330
- (0, import_react_native_reanimated.runOnJS)(finishClosing)();
257
+ _reactnativereanimated.runOnJS.call(void 0, finishClosing)();
331
258
  }
332
259
  });
333
260
  }, [finishClosing, opacity, scale, visible]);
334
- (0, import_react8.useEffect)(() => {
261
+ _react.useEffect.call(void 0, () => {
335
262
  if (visible && !shouldRender) {
336
263
  setShouldRender(true);
337
264
  opacity.value = 0;
338
265
  scale.value = 0.95;
339
- opacity.value = (0, import_react_native_reanimated.withTiming)(1, { duration: 250 });
340
- scale.value = (0, import_react_native_reanimated.withTiming)(1, { duration: 250 });
266
+ opacity.value = _reactnativereanimated.withTiming.call(void 0, 1, { duration: 250 });
267
+ scale.value = _reactnativereanimated.withTiming.call(void 0, 1, { duration: 250 });
341
268
  return;
342
269
  }
343
270
  if (!visible && shouldRender) {
344
271
  handleClose();
345
272
  }
346
273
  }, [visible, shouldRender, opacity, scale, handleClose]);
347
- const animatedStyle = (0, import_react_native_reanimated.useAnimatedStyle)(() => ({
274
+ const animatedStyle = _reactnativereanimated.useAnimatedStyle.call(void 0, () => ({
348
275
  opacity: opacity.value,
349
276
  transform: [{ scale: scale.value }]
350
277
  }));
351
- const IconComponent = iconMap[themeColor] ?? InfoIcon;
278
+ const IconComponent = _nullishCoalesce(iconMap[themeColor], () => ( InfoIcon));
352
279
  const shouldShowClose = Boolean(closeButton || isClosable || onClose);
353
280
  const renderIcon = () => {
354
281
  if (hideIcon) return null;
355
- if (icon && (0, import_react8.isValidElement)(icon)) {
356
- return (0, import_react8.cloneElement)(icon, { color: iconColor, size: 22 });
282
+ if (icon && _react.isValidElement.call(void 0, icon)) {
283
+ return _react.cloneElement.call(void 0, icon, { color: iconColor, size: 22 });
357
284
  }
358
285
  if (icon) {
359
- return /* @__PURE__ */ import_react8.default.createElement(import_react_native5.Text, { style: [styles.iconText, { color: iconColor }] }, icon);
286
+ return /* @__PURE__ */ _react2.default.createElement(_reactnative.Text, { style: [styles.iconText, { color: iconColor }] }, icon);
360
287
  }
361
- return /* @__PURE__ */ import_react8.default.createElement(IconComponent, { color: iconColor, size: 22 });
288
+ return /* @__PURE__ */ _react2.default.createElement(IconComponent, { color: iconColor, size: 22 });
362
289
  };
363
290
  const renderContentText = (content) => {
364
291
  if (content === null || content === void 0) return null;
365
292
  if (typeof content === "string" || typeof content === "number") {
366
- return /* @__PURE__ */ import_react8.default.createElement(
367
- import_react_native5.Text,
293
+ return /* @__PURE__ */ _react2.default.createElement(
294
+ _reactnative.Text,
368
295
  {
369
296
  style: [
370
297
  styles.description,
371
298
  descriptionStyles,
372
- customAppearance?.description
299
+ _optionalChain([customAppearance, 'optionalAccess', _3 => _3.description])
373
300
  ]
374
301
  },
375
302
  content
@@ -377,54 +304,53 @@ var Alert = ({
377
304
  }
378
305
  return content;
379
306
  };
380
- const titleNode = (0, import_react8.useMemo)(() => {
307
+ const titleNode = _react.useMemo.call(void 0, () => {
381
308
  if (title === null || title === void 0) return null;
382
309
  if (typeof title === "string" || typeof title === "number") {
383
- return /* @__PURE__ */ import_react8.default.createElement(import_react_native5.Text, { style: [styles.title, titleStyles, customAppearance?.title] }, title);
310
+ return /* @__PURE__ */ _react2.default.createElement(_reactnative.Text, { style: [styles.title, titleStyles, _optionalChain([customAppearance, 'optionalAccess', _4 => _4.title])] }, title);
384
311
  }
385
312
  return title;
386
- }, [title, customAppearance?.title, titleStyles]);
313
+ }, [title, _optionalChain([customAppearance, 'optionalAccess', _5 => _5.title]), titleStyles]);
387
314
  const descriptionNode = renderContentText(description);
388
315
  const childrenNode = renderContentText(children);
389
- const closeButtonNode = (0, import_react8.useMemo)(() => {
316
+ const closeButtonNode = _react.useMemo.call(void 0, () => {
390
317
  if (!closeButton) return null;
391
- if (!(0, import_react8.isValidElement)(closeButton)) return closeButton;
318
+ if (!_react.isValidElement.call(void 0, closeButton)) return closeButton;
392
319
  const existingOnPress = closeButton.props.onPress;
393
- return (0, import_react8.cloneElement)(closeButton, {
320
+ return _react.cloneElement.call(void 0, closeButton, {
394
321
  onPress: (event) => {
395
- existingOnPress?.(event);
322
+ _optionalChain([existingOnPress, 'optionalCall', _6 => _6(event)]);
396
323
  handleClose();
397
324
  }
398
325
  });
399
326
  }, [closeButton, handleClose]);
400
327
  if (!shouldRender) return null;
401
- return /* @__PURE__ */ import_react8.default.createElement(
402
- import_react_native_reanimated.default.View,
328
+ return /* @__PURE__ */ _react2.default.createElement(
329
+ _reactnativereanimated2.default.View,
403
330
  {
404
331
  accessibilityRole: "alert",
405
332
  style: [
406
333
  styles.container,
407
334
  containerStyles,
408
335
  radiusStyles,
409
- customAppearance?.container,
336
+ _optionalChain([customAppearance, 'optionalAccess', _7 => _7.container]),
410
337
  animatedStyle
411
338
  ]
412
339
  },
413
- !hideIcon && /* @__PURE__ */ import_react8.default.createElement(import_react_native5.View, { style: [styles.iconWrapper, iconWrapperStyles] }, renderIcon()),
414
- /* @__PURE__ */ import_react8.default.createElement(import_react_native5.View, { style: styles.mainWrapper }, titleNode, descriptionNode, childrenNode && /* @__PURE__ */ import_react8.default.createElement(import_react_native5.View, { style: styles.extraContent }, childrenNode)),
415
- shouldShowClose && /* @__PURE__ */ import_react8.default.createElement(import_react_native5.View, null, closeButtonNode ?? /* @__PURE__ */ import_react8.default.createElement(
416
- import_react_native5.Pressable,
340
+ !hideIcon && /* @__PURE__ */ _react2.default.createElement(_reactnative.View, { style: [styles.iconWrapper, iconWrapperStyles] }, renderIcon()),
341
+ /* @__PURE__ */ _react2.default.createElement(_reactnative.View, { style: styles.mainWrapper }, titleNode, descriptionNode, childrenNode && /* @__PURE__ */ _react2.default.createElement(_reactnative.View, { style: styles.extraContent }, childrenNode)),
342
+ shouldShowClose && /* @__PURE__ */ _react2.default.createElement(_reactnative.View, null, _nullishCoalesce(closeButtonNode, () => ( /* @__PURE__ */ _react2.default.createElement(
343
+ _reactnative.Pressable,
417
344
  {
418
345
  accessibilityRole: "button",
419
346
  accessibilityLabel: "Close",
420
347
  onPress: handleClose,
421
348
  style: styles.closeButton
422
349
  },
423
- /* @__PURE__ */ import_react8.default.createElement(import_icons.CloseIcon, { size: 20, color: closeButtonColor })
424
- ))
350
+ /* @__PURE__ */ _react2.default.createElement(_icons.CloseIcon, { size: 20, color: closeButtonColor })
351
+ ))))
425
352
  );
426
353
  };
427
- // Annotate the CommonJS export names for ESM import in node:
428
- 0 && (module.exports = {
429
- Alert
430
- });
354
+
355
+
356
+ exports.Alert = Alert;
@@ -1,7 +1,8 @@
1
+ import "../chunk-DXXNBF5P.js";
1
2
  import {
2
3
  useBorderRadiusStyles,
3
4
  useXUITheme
4
- } from "../chunk-URBEEDFX.js";
5
+ } from "../chunk-LTKYHG5V.js";
5
6
 
6
7
  // src/components/alert/alert.tsx
7
8
  import React2, {
@@ -1,88 +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);
29
-
30
- // src/components/app-bar/index.ts
31
- var app_bar_exports = {};
32
- __export(app_bar_exports, {
33
- AppBar: () => AppBar,
34
- AppBarContent: () => AppBarContent,
35
- AppBarEndContent: () => AppBarEndContent,
36
- AppBarStartContent: () => AppBarStartContent
37
- });
38
- module.exports = __toCommonJS(app_bar_exports);
39
-
40
- // src/components/app-bar/app-bar.tsx
41
- var import_react7 = __toESM(require("react"), 1);
42
- var import_react_native5 = require("react-native");
43
- var import_core2 = require("@xaui/core");
44
-
45
- // src/core/theme-context.tsx
46
- var import_react4 = __toESM(require("react"), 1);
47
- var import_react_native2 = require("react-native");
48
- var import_theme = require("@xaui/core/theme");
49
- var import_palette = require("@xaui/core/palette");
50
-
51
- // src/core/portal/portal.tsx
52
- var import_react2 = require("react");
53
-
54
- // src/core/portal/portal-context.ts
55
- var import_react = require("react");
56
- var PortalContext = (0, import_react.createContext)(null);
57
-
58
- // src/core/portal/portal-host.tsx
59
- var import_react3 = __toESM(require("react"), 1);
60
- var import_react_native = require("react-native");
61
- var hostStyles = import_react_native.StyleSheet.create({
62
- container: {
63
- flex: 1
64
- }
65
- });
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }require('../chunk-HSPTLUFA.cjs');
66
2
 
67
- // src/core/theme-context.tsx
68
- var XUIThemeContext = (0, import_react4.createContext)(null);
69
3
 
70
- // src/core/theme-hooks.ts
71
- var import_react5 = require("react");
72
- var import_react_native3 = require("react-native");
73
- function useXUITheme() {
74
- const theme = (0, import_react5.useContext)(XUIThemeContext);
75
- if (!theme) {
76
- throw new Error("useXUITheme must be used within XUIProvider");
77
- }
78
- return theme;
79
- }
4
+ var _chunkOQ2BLOOGcjs = require('../chunk-OQ2BLOOG.cjs');
80
5
 
81
- // src/core/index.ts
82
- var import_theme2 = require("@xaui/core/theme");
6
+ // src/components/app-bar/app-bar.tsx
7
+ var _react = require('react'); var _react2 = _interopRequireDefault(_react);
8
+ var _reactnative = require('react-native');
9
+ var _core = require('@xaui/core');
83
10
 
84
11
  // src/components/app-bar/app-bar.hook.ts
85
- var import_react6 = require("react");
12
+
86
13
  var resolveShadowStyle = (elevation, shadows) => {
87
14
  if (elevation <= 1) {
88
15
  return shadows.sm;
@@ -96,8 +23,8 @@ var resolveShadowStyle = (elevation, shadows) => {
96
23
  return shadows.xl;
97
24
  };
98
25
  var useAppBarElevationStyles = (elevation = 0) => {
99
- const theme = useXUITheme();
100
- return (0, import_react6.useMemo)(() => {
26
+ const theme = _chunkOQ2BLOOGcjs.useXUITheme.call(void 0, );
27
+ return _react.useMemo.call(void 0, () => {
101
28
  if (elevation <= 0) {
102
29
  return {};
103
30
  }
@@ -109,8 +36,8 @@ var useAppBarElevationStyles = (elevation = 0) => {
109
36
  };
110
37
 
111
38
  // src/components/app-bar/app-bar.style.ts
112
- var import_react_native4 = require("react-native");
113
- var styles = import_react_native4.StyleSheet.create({
39
+
40
+ var styles = _reactnative.StyleSheet.create({
114
41
  container: {
115
42
  width: "100%"
116
43
  },
@@ -164,16 +91,16 @@ var AppBar = ({
164
91
  children,
165
92
  style
166
93
  }) => {
167
- const theme = useXUITheme();
94
+ const theme = _chunkOQ2BLOOGcjs.useXUITheme.call(void 0, );
168
95
  const elevationStyles = useAppBarElevationStyles(elevation);
169
96
  const isFloating = variant === "floating";
170
- const safeThemeColor = (0, import_core2.getSafeThemeColor)(themeColor);
97
+ const safeThemeColor = _core.getSafeThemeColor.call(void 0, themeColor);
171
98
  const colorScheme = theme.colors[safeThemeColor];
172
99
  const isDefaultThemeColor = safeThemeColor === "default";
173
100
  const backgroundColor = isDefaultThemeColor ? theme.mode === "dark" ? theme.colors.default.background : "#FFFFFF" : colorScheme.background;
174
101
  const borderBottomColor = isDefaultThemeColor ? theme.mode === "dark" ? "rgba(255, 255, 255, 0.06)" : "rgba(0, 0, 0, 0.08)" : colorScheme.main;
175
- return /* @__PURE__ */ import_react7.default.createElement(import_react_native5.View, { style: [styles.container, isFloating && styles.floatingContainer] }, /* @__PURE__ */ import_react7.default.createElement(
176
- import_react_native5.View,
102
+ return /* @__PURE__ */ _react2.default.createElement(_reactnative.View, { style: [styles.container, isFloating && styles.floatingContainer] }, /* @__PURE__ */ _react2.default.createElement(
103
+ _reactnative.View,
177
104
  {
178
105
  style: [
179
106
  styles.appBar,
@@ -194,24 +121,23 @@ var AppBarStartContent = ({
194
121
  children,
195
122
  style
196
123
  }) => {
197
- return /* @__PURE__ */ import_react7.default.createElement(import_react_native5.View, { style: [styles.startContent, style] }, children);
124
+ return /* @__PURE__ */ _react2.default.createElement(_reactnative.View, { style: [styles.startContent, style] }, children);
198
125
  };
199
126
  var AppBarContent = ({
200
127
  children,
201
128
  style
202
129
  }) => {
203
- return /* @__PURE__ */ import_react7.default.createElement(import_react_native5.View, { style: [styles.content, style] }, children);
130
+ return /* @__PURE__ */ _react2.default.createElement(_reactnative.View, { style: [styles.content, style] }, children);
204
131
  };
205
132
  var AppBarEndContent = ({
206
133
  children,
207
134
  style
208
135
  }) => {
209
- return /* @__PURE__ */ import_react7.default.createElement(import_react_native5.View, { style: [styles.endContent, style] }, children);
136
+ return /* @__PURE__ */ _react2.default.createElement(_reactnative.View, { style: [styles.endContent, style] }, children);
210
137
  };
211
- // Annotate the CommonJS export names for ESM import in node:
212
- 0 && (module.exports = {
213
- AppBar,
214
- AppBarContent,
215
- AppBarEndContent,
216
- AppBarStartContent
217
- });
138
+
139
+
140
+
141
+
142
+
143
+ exports.AppBar = AppBar; exports.AppBarContent = AppBarContent; exports.AppBarEndContent = AppBarEndContent; exports.AppBarStartContent = AppBarStartContent;
@@ -1,6 +1,7 @@
1
+ import "../chunk-DXXNBF5P.js";
1
2
  import {
2
3
  useXUITheme
3
- } from "../chunk-4KSZLONZ.js";
4
+ } from "../chunk-LTKYHG5V.js";
4
5
 
5
6
  // src/components/app-bar/app-bar.tsx
6
7
  import React from "react";