@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,96 +1,25 @@
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/radio/index.ts
31
- var radio_exports = {};
32
- __export(radio_exports, {
33
- Radio: () => Radio,
34
- RadioGroup: () => RadioGroup
35
- });
36
- module.exports = __toCommonJS(radio_exports);
37
-
38
- // src/components/radio/radio.tsx
39
- var import_react8 = __toESM(require("react"), 1);
40
- var import_react_native6 = require("react-native");
41
- var import_core3 = require("@xaui/core");
42
-
43
- // src/core/theme-context.tsx
44
- var import_react4 = __toESM(require("react"), 1);
45
- var import_react_native2 = require("react-native");
46
- var import_theme = require("@xaui/core/theme");
47
- var import_palette = require("@xaui/core/palette");
48
-
49
- // src/core/portal/portal.tsx
50
- var import_react2 = require("react");
51
-
52
- // src/core/portal/portal-context.ts
53
- var import_react = require("react");
54
- var PortalContext = (0, import_react.createContext)(null);
55
-
56
- // src/core/portal/portal-host.tsx
57
- var import_react3 = __toESM(require("react"), 1);
58
- var import_react_native = require("react-native");
59
- var hostStyles = import_react_native.StyleSheet.create({
60
- container: {
61
- flex: 1
62
- }
63
- });
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');
64
2
 
65
- // src/core/theme-context.tsx
66
- var XUIThemeContext = (0, import_react4.createContext)(null);
67
3
 
68
- // src/core/theme-hooks.ts
69
- var import_react5 = require("react");
70
- var import_react_native3 = require("react-native");
71
- function useXUITheme() {
72
- const theme = (0, import_react5.useContext)(XUIThemeContext);
73
- if (!theme) {
74
- throw new Error("useXUITheme must be used within XUIProvider");
75
- }
76
- return theme;
77
- }
4
+ var _chunkOQ2BLOOGcjs = require('../chunk-OQ2BLOOG.cjs');
78
5
 
79
- // src/core/index.ts
80
- var import_theme2 = require("@xaui/core/theme");
6
+ // src/components/radio/radio.tsx
7
+ var _react = require('react'); var _react2 = _interopRequireDefault(_react);
8
+ var _reactnative = require('react-native');
9
+ var _core = require('@xaui/core');
81
10
 
82
11
  // src/components/radio/radio-context.ts
83
- var import_react6 = __toESM(require("react"), 1);
84
- var RadioGroupContext = import_react6.default.createContext(
12
+
13
+ var RadioGroupContext = _react2.default.createContext(
85
14
  null
86
15
  );
87
16
 
88
17
  // src/components/radio/radio.hook.ts
89
- var import_react7 = require("react");
90
- var import_core = require("@xaui/core");
18
+
19
+
91
20
  function useSizeStyles(size, variant) {
92
- const theme = useXUITheme();
93
- const sizeStyles = (0, import_react7.useMemo)(() => {
21
+ const theme = _chunkOQ2BLOOGcjs.useXUITheme.call(void 0, );
22
+ const sizeStyles = _react.useMemo.call(void 0, () => {
94
23
  const sizes = {
95
24
  xs: {
96
25
  radioSize: 14,
@@ -118,8 +47,8 @@ function useSizeStyles(size, variant) {
118
47
  return sizeStyles;
119
48
  }
120
49
  function useRadiusStyles(radius) {
121
- const theme = useXUITheme();
122
- const radiusStyles = (0, import_react7.useMemo)(() => {
50
+ const theme = _chunkOQ2BLOOGcjs.useXUITheme.call(void 0, );
51
+ const radiusStyles = _react.useMemo.call(void 0, () => {
123
52
  const radii = {
124
53
  none: theme.borderRadius.none,
125
54
  sm: theme.borderRadius.sm,
@@ -132,10 +61,10 @@ function useRadiusStyles(radius) {
132
61
  return radiusStyles;
133
62
  }
134
63
  function useDotColors(themeColor, variant, isActive) {
135
- const theme = useXUITheme();
136
- const safeThemeColor = (0, import_core.getSafeThemeColor)(themeColor);
64
+ const theme = _chunkOQ2BLOOGcjs.useXUITheme.call(void 0, );
65
+ const safeThemeColor = _core.getSafeThemeColor.call(void 0, themeColor);
137
66
  const colorScheme = theme.colors[safeThemeColor];
138
- const dotColors = (0, import_react7.useMemo)(() => {
67
+ const dotColors = _react.useMemo.call(void 0, () => {
139
68
  if (!isActive) {
140
69
  return {
141
70
  checked: "transparent"
@@ -153,10 +82,10 @@ function useDotColors(themeColor, variant, isActive) {
153
82
  return dotColors;
154
83
  }
155
84
  function useVariantStyles(themeColor, variant, isActive) {
156
- const theme = useXUITheme();
157
- const safeThemeColor = (0, import_core.getSafeThemeColor)(themeColor);
85
+ const theme = _chunkOQ2BLOOGcjs.useXUITheme.call(void 0, );
86
+ const safeThemeColor = _core.getSafeThemeColor.call(void 0, themeColor);
158
87
  const colorScheme = theme.colors[safeThemeColor];
159
- const variantStyles = (0, import_react7.useMemo)(() => {
88
+ const variantStyles = _react.useMemo.call(void 0, () => {
160
89
  if (variant === "filled") {
161
90
  return {
162
91
  backgroundColor: "transparent",
@@ -173,7 +102,7 @@ function useVariantStyles(themeColor, variant, isActive) {
173
102
  return variantStyles;
174
103
  }
175
104
  function useContainerStyles(labelAlignment) {
176
- const containerStyles = (0, import_react7.useMemo)(() => {
105
+ const containerStyles = _react.useMemo.call(void 0, () => {
177
106
  const isJustified = labelAlignment === "justify-left" || labelAlignment === "justify-right";
178
107
  return {
179
108
  flexDirection: labelAlignment === "left" || labelAlignment === "justify-left" ? "row-reverse" : "row",
@@ -184,8 +113,8 @@ function useContainerStyles(labelAlignment) {
184
113
  }
185
114
 
186
115
  // src/components/radio/radio.style.ts
187
- var import_react_native4 = require("react-native");
188
- var styles = import_react_native4.StyleSheet.create({
116
+
117
+ var styles = _reactnative.StyleSheet.create({
189
118
  group: {
190
119
  width: "100%"
191
120
  },
@@ -225,16 +154,16 @@ var styles = import_react_native4.StyleSheet.create({
225
154
  });
226
155
 
227
156
  // src/components/radio/radio.animation.ts
228
- var import_react_native5 = require("react-native");
157
+
229
158
  var runDotInAnimation = (dotScale, dotOpacity) => {
230
- import_react_native5.Animated.parallel([
231
- import_react_native5.Animated.spring(dotScale, {
159
+ _reactnative.Animated.parallel([
160
+ _reactnative.Animated.spring(dotScale, {
232
161
  toValue: 1,
233
162
  useNativeDriver: true,
234
163
  tension: 90,
235
164
  friction: 9
236
165
  }),
237
- import_react_native5.Animated.timing(dotOpacity, {
166
+ _reactnative.Animated.timing(dotOpacity, {
238
167
  toValue: 1,
239
168
  duration: 180,
240
169
  useNativeDriver: true
@@ -242,14 +171,14 @@ var runDotInAnimation = (dotScale, dotOpacity) => {
242
171
  ]).start();
243
172
  };
244
173
  var runDotOutAnimation = (dotScale, dotOpacity) => {
245
- import_react_native5.Animated.parallel([
246
- import_react_native5.Animated.spring(dotScale, {
174
+ _reactnative.Animated.parallel([
175
+ _reactnative.Animated.spring(dotScale, {
247
176
  toValue: 0,
248
177
  useNativeDriver: true,
249
178
  tension: 90,
250
179
  friction: 9
251
180
  }),
252
- import_react_native5.Animated.timing(dotOpacity, {
181
+ _reactnative.Animated.timing(dotOpacity, {
253
182
  toValue: 0,
254
183
  duration: 140,
255
184
  useNativeDriver: true
@@ -257,13 +186,13 @@ var runDotOutAnimation = (dotScale, dotOpacity) => {
257
186
  ]).start();
258
187
  };
259
188
  var runBackgroundInAnimation = (backgroundScale, backgroundOpacity) => {
260
- import_react_native5.Animated.parallel([
261
- import_react_native5.Animated.timing(backgroundScale, {
189
+ _reactnative.Animated.parallel([
190
+ _reactnative.Animated.timing(backgroundScale, {
262
191
  toValue: 1,
263
192
  duration: 200,
264
193
  useNativeDriver: true
265
194
  }),
266
- import_react_native5.Animated.timing(backgroundOpacity, {
195
+ _reactnative.Animated.timing(backgroundOpacity, {
267
196
  toValue: 1,
268
197
  duration: 200,
269
198
  useNativeDriver: true
@@ -271,13 +200,13 @@ var runBackgroundInAnimation = (backgroundScale, backgroundOpacity) => {
271
200
  ]).start();
272
201
  };
273
202
  var runBackgroundOutAnimation = (backgroundScale, backgroundOpacity) => {
274
- import_react_native5.Animated.parallel([
275
- import_react_native5.Animated.timing(backgroundScale, {
203
+ _reactnative.Animated.parallel([
204
+ _reactnative.Animated.timing(backgroundScale, {
276
205
  toValue: 0.5,
277
206
  duration: 200,
278
207
  useNativeDriver: true
279
208
  }),
280
- import_react_native5.Animated.timing(backgroundOpacity, {
209
+ _reactnative.Animated.timing(backgroundOpacity, {
281
210
  toValue: 0,
282
211
  duration: 200,
283
212
  useNativeDriver: true
@@ -285,13 +214,13 @@ var runBackgroundOutAnimation = (backgroundScale, backgroundOpacity) => {
285
214
  ]).start();
286
215
  };
287
216
  var runPressInAnimation = (scale) => {
288
- import_react_native5.Animated.spring(scale, {
217
+ _reactnative.Animated.spring(scale, {
289
218
  toValue: 0.95,
290
219
  useNativeDriver: true
291
220
  }).start();
292
221
  };
293
222
  var runPressOutAnimation = (scale) => {
294
- import_react_native5.Animated.spring(scale, {
223
+ _reactnative.Animated.spring(scale, {
295
224
  toValue: 1,
296
225
  useNativeDriver: true
297
226
  }).start();
@@ -314,26 +243,26 @@ var Radio = ({
314
243
  style,
315
244
  onValueChange
316
245
  }) => {
317
- const group = (0, import_react8.useContext)(RadioGroupContext);
318
- const theme = useXUITheme();
319
- const resolvedLabelAlignment = labelAlignment ?? group?.labelAlignment ?? "right";
320
- const resolvedThemeColor = themeColor ?? group?.themeColor ?? "primary";
321
- const resolvedVariant = variant ?? group?.variant ?? "filled";
322
- const resolvedSize = size ?? group?.size ?? "md";
323
- const resolvedRadius = radius ?? group?.radius ?? "full";
324
- const resolvedFullWidth = fullWidth ?? group?.fullWidth ?? false;
325
- const resolvedDisabled = !!(isDisabled || group?.isDisabled);
246
+ const group = _react.useContext.call(void 0, RadioGroupContext);
247
+ const theme = _chunkOQ2BLOOGcjs.useXUITheme.call(void 0, );
248
+ const resolvedLabelAlignment = _nullishCoalesce(_nullishCoalesce(labelAlignment, () => ( _optionalChain([group, 'optionalAccess', _ => _.labelAlignment]))), () => ( "right"));
249
+ const resolvedThemeColor = _nullishCoalesce(_nullishCoalesce(themeColor, () => ( _optionalChain([group, 'optionalAccess', _2 => _2.themeColor]))), () => ( "primary"));
250
+ const resolvedVariant = _nullishCoalesce(_nullishCoalesce(variant, () => ( _optionalChain([group, 'optionalAccess', _3 => _3.variant]))), () => ( "filled"));
251
+ const resolvedSize = _nullishCoalesce(_nullishCoalesce(size, () => ( _optionalChain([group, 'optionalAccess', _4 => _4.size]))), () => ( "md"));
252
+ const resolvedRadius = _nullishCoalesce(_nullishCoalesce(radius, () => ( _optionalChain([group, 'optionalAccess', _5 => _5.radius]))), () => ( "full"));
253
+ const resolvedFullWidth = _nullishCoalesce(_nullishCoalesce(fullWidth, () => ( _optionalChain([group, 'optionalAccess', _6 => _6.fullWidth]))), () => ( false));
254
+ const resolvedDisabled = !!(isDisabled || _optionalChain([group, 'optionalAccess', _7 => _7.isDisabled]));
326
255
  const isInGroup = !!group && typeof value === "string";
327
256
  const isControlledStandalone = typeof isCheckedProp === "boolean";
328
- const [internalChecked, setInternalChecked] = (0, import_react8.useState)(defaultChecked);
257
+ const [internalChecked, setInternalChecked] = _react.useState.call(void 0, defaultChecked);
329
258
  const groupChecked = isInGroup ? group.selectedValue === value : false;
330
259
  const isChecked = isInGroup ? groupChecked : isControlledStandalone ? isCheckedProp : internalChecked;
331
- const colorScheme = theme.colors[(0, import_core3.getSafeThemeColor)(resolvedThemeColor)];
332
- const scale = (0, import_react8.useRef)(new import_react_native6.Animated.Value(1)).current;
333
- const backgroundScale = (0, import_react8.useRef)(new import_react_native6.Animated.Value(0.5)).current;
334
- const backgroundOpacity = (0, import_react8.useRef)(new import_react_native6.Animated.Value(0)).current;
335
- const dotScale = (0, import_react8.useRef)(new import_react_native6.Animated.Value(isChecked ? 1 : 0)).current;
336
- const dotOpacity = (0, import_react8.useRef)(new import_react_native6.Animated.Value(isChecked ? 1 : 0)).current;
260
+ const colorScheme = theme.colors[_core.getSafeThemeColor.call(void 0, resolvedThemeColor)];
261
+ const scale = _react.useRef.call(void 0, new _reactnative.Animated.Value(1)).current;
262
+ const backgroundScale = _react.useRef.call(void 0, new _reactnative.Animated.Value(0.5)).current;
263
+ const backgroundOpacity = _react.useRef.call(void 0, new _reactnative.Animated.Value(0)).current;
264
+ const dotScale = _react.useRef.call(void 0, new _reactnative.Animated.Value(isChecked ? 1 : 0)).current;
265
+ const dotOpacity = _react.useRef.call(void 0, new _reactnative.Animated.Value(isChecked ? 1 : 0)).current;
337
266
  const sizeStyles = useSizeStyles(resolvedSize, resolvedVariant);
338
267
  const radiusStyles = useRadiusStyles(resolvedRadius);
339
268
  const dotColors = useDotColors(resolvedThemeColor, resolvedVariant, isChecked);
@@ -343,7 +272,7 @@ var Radio = ({
343
272
  isChecked
344
273
  );
345
274
  const containerStyles = useContainerStyles(resolvedLabelAlignment);
346
- (0, import_react8.useEffect)(() => {
275
+ _react.useEffect.call(void 0, () => {
347
276
  if (resolvedVariant !== "filled") return;
348
277
  if (isChecked) {
349
278
  runBackgroundInAnimation(backgroundScale, backgroundOpacity);
@@ -351,7 +280,7 @@ var Radio = ({
351
280
  runBackgroundOutAnimation(backgroundScale, backgroundOpacity);
352
281
  }
353
282
  }, [backgroundOpacity, backgroundScale, isChecked, resolvedVariant]);
354
- (0, import_react8.useEffect)(() => {
283
+ _react.useEffect.call(void 0, () => {
355
284
  if (isChecked) {
356
285
  runDotInAnimation(dotScale, dotOpacity);
357
286
  } else {
@@ -361,14 +290,14 @@ var Radio = ({
361
290
  const handlePress = () => {
362
291
  if (resolvedDisabled || isChecked) return;
363
292
  if (isInGroup && value) {
364
- group.onValueChange?.(value);
365
- onValueChange?.(true);
293
+ _optionalChain([group, 'access', _8 => _8.onValueChange, 'optionalCall', _9 => _9(value)]);
294
+ _optionalChain([onValueChange, 'optionalCall', _10 => _10(true)]);
366
295
  return;
367
296
  }
368
297
  if (!isControlledStandalone) {
369
298
  setInternalChecked(true);
370
299
  }
371
- onValueChange?.(true);
300
+ _optionalChain([onValueChange, 'optionalCall', _11 => _11(true)]);
372
301
  };
373
302
  const handlePressIn = () => {
374
303
  if (resolvedDisabled) return;
@@ -378,8 +307,8 @@ var Radio = ({
378
307
  if (resolvedDisabled) return;
379
308
  runPressOutAnimation(scale);
380
309
  };
381
- return /* @__PURE__ */ import_react8.default.createElement(
382
- import_react_native6.Pressable,
310
+ return /* @__PURE__ */ _react2.default.createElement(
311
+ _reactnative.Pressable,
383
312
  {
384
313
  onPress: handlePress,
385
314
  onPressIn: handlePressIn,
@@ -400,8 +329,8 @@ var Radio = ({
400
329
  style
401
330
  ]
402
331
  },
403
- /* @__PURE__ */ import_react8.default.createElement(
404
- import_react_native6.Animated.View,
332
+ /* @__PURE__ */ _react2.default.createElement(
333
+ _reactnative.Animated.View,
405
334
  {
406
335
  style: [
407
336
  styles.radio,
@@ -416,8 +345,8 @@ var Radio = ({
416
345
  }
417
346
  ]
418
347
  },
419
- resolvedVariant === "filled" && /* @__PURE__ */ import_react8.default.createElement(
420
- import_react_native6.Animated.View,
348
+ resolvedVariant === "filled" && /* @__PURE__ */ _react2.default.createElement(
349
+ _reactnative.Animated.View,
421
350
  {
422
351
  style: [
423
352
  styles.background,
@@ -430,8 +359,8 @@ var Radio = ({
430
359
  ]
431
360
  }
432
361
  ),
433
- /* @__PURE__ */ import_react8.default.createElement(
434
- import_react_native6.Animated.View,
362
+ /* @__PURE__ */ _react2.default.createElement(
363
+ _reactnative.Animated.View,
435
364
  {
436
365
  style: [
437
366
  styles.dot,
@@ -447,8 +376,8 @@ var Radio = ({
447
376
  }
448
377
  )
449
378
  ),
450
- label && /* @__PURE__ */ import_react8.default.createElement(
451
- import_react_native6.Text,
379
+ label && /* @__PURE__ */ _react2.default.createElement(
380
+ _reactnative.Text,
452
381
  {
453
382
  style: [
454
383
  styles.label,
@@ -463,8 +392,8 @@ var Radio = ({
463
392
  };
464
393
 
465
394
  // src/components/radio/radio-group.tsx
466
- var import_react9 = __toESM(require("react"), 1);
467
- var import_react_native7 = require("react-native");
395
+
396
+
468
397
  var RadioGroup = ({
469
398
  children,
470
399
  value,
@@ -481,18 +410,18 @@ var RadioGroup = ({
481
410
  gap,
482
411
  style
483
412
  }) => {
484
- const theme = useXUITheme();
413
+ const theme = _chunkOQ2BLOOGcjs.useXUITheme.call(void 0, );
485
414
  const isControlled = typeof value === "string";
486
- const [internalValue, setInternalValue] = (0, import_react9.useState)(defaultValue);
415
+ const [internalValue, setInternalValue] = _react.useState.call(void 0, defaultValue);
487
416
  const selectedValue = isControlled ? value : internalValue;
488
417
  const handleValueChange = (nextValue) => {
489
418
  if (nextValue === selectedValue) return;
490
419
  if (!isControlled) {
491
420
  setInternalValue(nextValue);
492
421
  }
493
- onValueChange?.(nextValue);
422
+ _optionalChain([onValueChange, 'optionalCall', _12 => _12(nextValue)]);
494
423
  };
495
- const contextValue = (0, import_react9.useMemo)(
424
+ const contextValue = _react.useMemo.call(void 0,
496
425
  () => ({
497
426
  selectedValue,
498
427
  isDisabled,
@@ -515,14 +444,14 @@ var RadioGroup = ({
515
444
  variant
516
445
  ]
517
446
  );
518
- return /* @__PURE__ */ import_react9.default.createElement(RadioGroupContext.Provider, { value: contextValue }, /* @__PURE__ */ import_react9.default.createElement(
519
- import_react_native7.View,
447
+ return /* @__PURE__ */ _react2.default.createElement(RadioGroupContext.Provider, { value: contextValue }, /* @__PURE__ */ _react2.default.createElement(
448
+ _reactnative.View,
520
449
  {
521
450
  style: [
522
451
  styles.group,
523
452
  {
524
453
  flexDirection: orientation === "horizontal" ? "row" : "column",
525
- gap: gap ?? theme.spacing.sm
454
+ gap: _nullishCoalesce(gap, () => ( theme.spacing.sm))
526
455
  },
527
456
  style
528
457
  ]
@@ -530,8 +459,7 @@ var RadioGroup = ({
530
459
  children
531
460
  ));
532
461
  };
533
- // Annotate the CommonJS export names for ESM import in node:
534
- 0 && (module.exports = {
535
- Radio,
536
- RadioGroup
537
- });
462
+
463
+
464
+
465
+ exports.Radio = Radio; exports.RadioGroup = RadioGroup;
@@ -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/radio/radio.tsx
6
7
  import React2, { useContext, useEffect, useRef, useState } from "react";