@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
@@ -131,6 +131,20 @@ declare const TextInput: React.ForwardRefExoticComponent<Omit<react_native.TextI
131
131
  customAppearance?: TextInputCustomAppearance;
132
132
  } & React.RefAttributes<TextInput$1>>;
133
133
 
134
+ type TextAreaProps = Omit<TextInputProps, 'multiline'> & {
135
+ /**
136
+ * Minimum number of rows.
137
+ * @default 3
138
+ */
139
+ minRows?: number;
140
+ /**
141
+ * Optional maximum number of rows before scrolling.
142
+ */
143
+ maxRows?: number;
144
+ };
145
+
146
+ declare const TextArea: React.FC<TextAreaProps>;
147
+
134
148
  type DateSeparator = '-' | '/' | '.';
135
149
  type DateOrder = 'YMD' | 'DMY' | 'MDY';
136
150
  type TimeInputGranularity = 'minute' | 'second';
@@ -489,4 +503,4 @@ declare const NumberInput: React.ForwardRefExoticComponent<NumberInputProps & Re
489
503
 
490
504
  declare const getDateOrder: (locale: string) => DateOrder;
491
505
 
492
- export { DateInput, type DateInputProps, type DateOrder, type DateSeparator, DateTimeInput, type DateTimeInputProps, NumberInput, type NumberInputCustomAppearance, type NumberInputProps, OTPInput, type OTPInputCustomAppearance, type OTPInputProps, TextInput, type TextInputCustomAppearance, type TextInputLabelPlacement, type TextInputProps, type TextInputSize, type TextInputVariant, TimeInput, type TimeInputGranularity, type TimeInputProps, getDateOrder };
506
+ export { DateInput, type DateInputProps, type DateOrder, type DateSeparator, DateTimeInput, type DateTimeInputProps, NumberInput, type NumberInputCustomAppearance, type NumberInputProps, OTPInput, type OTPInputCustomAppearance, type OTPInputProps, TextArea, type TextAreaProps, TextInput, type TextInputCustomAppearance, type TextInputLabelPlacement, type TextInputProps, type TextInputSize, type TextInputVariant, TimeInput, type TimeInputGranularity, type TimeInputProps, getDateOrder };
@@ -131,6 +131,20 @@ declare const TextInput: React.ForwardRefExoticComponent<Omit<react_native.TextI
131
131
  customAppearance?: TextInputCustomAppearance;
132
132
  } & React.RefAttributes<TextInput$1>>;
133
133
 
134
+ type TextAreaProps = Omit<TextInputProps, 'multiline'> & {
135
+ /**
136
+ * Minimum number of rows.
137
+ * @default 3
138
+ */
139
+ minRows?: number;
140
+ /**
141
+ * Optional maximum number of rows before scrolling.
142
+ */
143
+ maxRows?: number;
144
+ };
145
+
146
+ declare const TextArea: React.FC<TextAreaProps>;
147
+
134
148
  type DateSeparator = '-' | '/' | '.';
135
149
  type DateOrder = 'YMD' | 'DMY' | 'MDY';
136
150
  type TimeInputGranularity = 'minute' | 'second';
@@ -489,4 +503,4 @@ declare const NumberInput: React.ForwardRefExoticComponent<NumberInputProps & Re
489
503
 
490
504
  declare const getDateOrder: (locale: string) => DateOrder;
491
505
 
492
- export { DateInput, type DateInputProps, type DateOrder, type DateSeparator, DateTimeInput, type DateTimeInputProps, NumberInput, type NumberInputCustomAppearance, type NumberInputProps, OTPInput, type OTPInputCustomAppearance, type OTPInputProps, TextInput, type TextInputCustomAppearance, type TextInputLabelPlacement, type TextInputProps, type TextInputSize, type TextInputVariant, TimeInput, type TimeInputGranularity, type TimeInputProps, getDateOrder };
506
+ export { DateInput, type DateInputProps, type DateOrder, type DateSeparator, DateTimeInput, type DateTimeInputProps, NumberInput, type NumberInputCustomAppearance, type NumberInputProps, OTPInput, type OTPInputCustomAppearance, type OTPInputProps, TextArea, type TextAreaProps, TextInput, type TextInputCustomAppearance, type TextInputLabelPlacement, type TextInputProps, type TextInputSize, type TextInputVariant, TimeInput, type TimeInputGranularity, type TimeInputProps, getDateOrder };
@@ -1,7 +1,7 @@
1
- import "../chunk-DXXNBF5P.js";
1
+ import "../chunk-CZFDZPAS.js";
2
2
  import {
3
3
  useXUITheme
4
- } from "../chunk-LTKYHG5V.js";
4
+ } from "../chunk-I4V5Y5GD.js";
5
5
 
6
6
  // src/components/input/input.tsx
7
7
  import React, { forwardRef, useMemo as useMemo2, useState, useRef, useEffect } from "react";
@@ -288,98 +288,115 @@ var TextInput = forwardRef(
288
288
  ]
289
289
  },
290
290
  label
291
- ), /* @__PURE__ */ React.createElement(Pressable, { onPress: handleWrapperPress, disabled: isDisabled || isReadOnly }, /* @__PURE__ */ React.createElement(
292
- Animated.View,
291
+ ), /* @__PURE__ */ React.createElement(
292
+ Pressable,
293
293
  {
294
- style: [
295
- styles.inputWrapper,
296
- {
297
- minHeight: sizeStyles.minHeight,
298
- paddingVertical: sizeStyles.paddingVertical,
299
- paddingHorizontal: sizeStyles.paddingHorizontal,
300
- gap: sizeStyles.slotGap,
301
- backgroundColor: variantStyles.container.backgroundColor,
302
- borderWidth: variant === "underlined" ? 0 : variantStyles.container.borderWidth,
303
- ...variant === "underlined" && {
304
- borderBottomWidth: variantStyles.container.borderBottomWidth
305
- },
306
- borderRadius: variant === "underlined" ? 0 : radiusStyles.borderRadius,
307
- ...variant === "underlined" ? {
308
- borderBottomColor: borderAnimation.interpolate({
309
- inputRange: [0, 1],
310
- outputRange: [
311
- variantStyles.unfocusedBorderColor,
312
- variantStyles.focusedBorderColor
313
- ]
314
- })
315
- } : {
316
- borderColor: borderAnimation.interpolate({
317
- inputRange: [0, 1],
318
- outputRange: [
319
- variantStyles.unfocusedBorderColor,
320
- variantStyles.focusedBorderColor
321
- ]
322
- })
323
- }
324
- },
325
- variant === "underlined" && styles.underlinedWrapper,
326
- customAppearance?.inputWrapper
327
- ]
294
+ onPress: handleWrapperPress,
295
+ disabled: isDisabled || isReadOnly
328
296
  },
329
- startContent && /* @__PURE__ */ React.createElement(View, { style: styles.slot }, startContent),
330
- /* @__PURE__ */ React.createElement(View, { style: { flex: 1, gap: labelPlacement === "inside" && label ? 2 : 0 } }, label && labelPlacement === "inside" && /* @__PURE__ */ React.createElement(
331
- Text,
297
+ /* @__PURE__ */ React.createElement(
298
+ Animated.View,
332
299
  {
333
300
  style: [
334
- styles.label,
301
+ styles.inputWrapper,
335
302
  {
336
- color: variantStyles.labelColor,
337
- fontSize: sizeStyles.helperSize,
338
- paddingBottom: 2
303
+ minHeight: sizeStyles.minHeight,
304
+ paddingVertical: sizeStyles.paddingVertical,
305
+ paddingHorizontal: sizeStyles.paddingHorizontal,
306
+ gap: sizeStyles.slotGap,
307
+ backgroundColor: variantStyles.container.backgroundColor,
308
+ borderWidth: variant === "underlined" ? 0 : variantStyles.container.borderWidth,
309
+ ...variant === "underlined" && {
310
+ borderBottomWidth: variantStyles.container.borderBottomWidth
311
+ },
312
+ borderRadius: variant === "underlined" ? 0 : radiusStyles.borderRadius,
313
+ ...variant === "underlined" ? {
314
+ borderBottomColor: borderAnimation.interpolate({
315
+ inputRange: [0, 1],
316
+ outputRange: [
317
+ variantStyles.unfocusedBorderColor,
318
+ variantStyles.focusedBorderColor
319
+ ]
320
+ })
321
+ } : {
322
+ borderColor: borderAnimation.interpolate({
323
+ inputRange: [0, 1],
324
+ outputRange: [
325
+ variantStyles.unfocusedBorderColor,
326
+ variantStyles.focusedBorderColor
327
+ ]
328
+ })
329
+ }
339
330
  },
340
- customAppearance?.label
331
+ variant === "underlined" && styles.underlinedWrapper,
332
+ customAppearance?.inputWrapper
341
333
  ]
342
334
  },
343
- label
344
- ), /* @__PURE__ */ React.createElement(
345
- RNTextInput,
346
- {
347
- ref: typeof forwardedRef === "function" ? internalRef : forwardedRef || internalRef,
348
- value: inputValue,
349
- onChangeText: handleChangeText,
350
- onFocus: (event) => {
351
- setIsFocused(true);
352
- onFocus?.(event);
353
- },
354
- onBlur: (event) => {
355
- setIsFocused(false);
356
- onBlur?.(event);
335
+ startContent && /* @__PURE__ */ React.createElement(View, { style: styles.slot }, startContent),
336
+ /* @__PURE__ */ React.createElement(
337
+ View,
338
+ {
339
+ style: {
340
+ flex: 1,
341
+ gap: labelPlacement === "inside" && label ? 2 : 0
342
+ }
357
343
  },
358
- editable,
359
- secureTextEntry,
360
- placeholderTextColor: variantStyles.placeholderColor,
361
- style: [
362
- styles.input,
344
+ label && labelPlacement === "inside" && /* @__PURE__ */ React.createElement(
345
+ Text,
363
346
  {
364
- color: variantStyles.textColor,
365
- fontSize: sizeStyles.fontSize
347
+ style: [
348
+ styles.label,
349
+ {
350
+ color: variantStyles.labelColor,
351
+ fontSize: sizeStyles.helperSize,
352
+ paddingBottom: 2
353
+ },
354
+ customAppearance?.label
355
+ ]
366
356
  },
367
- customAppearance?.input
368
- ],
369
- ...nativeProps
370
- }
371
- )),
372
- showClearButton ? /* @__PURE__ */ React.createElement(
373
- Pressable,
374
- {
375
- onPress: handleClear,
376
- accessibilityLabel: "Clear input",
377
- accessibilityRole: "button",
378
- style: styles.clearButton
379
- },
380
- /* @__PURE__ */ React.createElement(CloseIcon, { size: 16, color: variantStyles.placeholderColor })
381
- ) : endContent && /* @__PURE__ */ React.createElement(View, { style: styles.slot }, endContent)
382
- ))),
357
+ label
358
+ ),
359
+ /* @__PURE__ */ React.createElement(
360
+ RNTextInput,
361
+ {
362
+ ref: typeof forwardedRef === "function" ? internalRef : forwardedRef || internalRef,
363
+ value: inputValue,
364
+ onChangeText: handleChangeText,
365
+ onFocus: (event) => {
366
+ setIsFocused(true);
367
+ onFocus?.(event);
368
+ },
369
+ onBlur: (event) => {
370
+ setIsFocused(false);
371
+ onBlur?.(event);
372
+ },
373
+ editable,
374
+ secureTextEntry,
375
+ placeholderTextColor: variantStyles.placeholderColor,
376
+ style: [
377
+ styles.input,
378
+ {
379
+ color: variantStyles.textColor,
380
+ fontSize: sizeStyles.fontSize
381
+ },
382
+ customAppearance?.input
383
+ ],
384
+ ...nativeProps
385
+ }
386
+ )
387
+ ),
388
+ showClearButton ? /* @__PURE__ */ React.createElement(
389
+ Pressable,
390
+ {
391
+ onPress: handleClear,
392
+ accessibilityLabel: "Clear input",
393
+ accessibilityRole: "button",
394
+ style: styles.clearButton
395
+ },
396
+ /* @__PURE__ */ React.createElement(CloseIcon, { size: 16, color: variantStyles.placeholderColor })
397
+ ) : endContent && /* @__PURE__ */ React.createElement(View, { style: styles.slot }, endContent)
398
+ )
399
+ )),
383
400
  helperText && /* @__PURE__ */ React.createElement(
384
401
  Text,
385
402
  {
@@ -399,8 +416,70 @@ var TextInput = forwardRef(
399
416
  );
400
417
  TextInput.displayName = "TextInput";
401
418
 
419
+ // src/components/input/textarea.tsx
420
+ import React2 from "react";
421
+
422
+ // src/components/input/textarea.style.ts
423
+ import { StyleSheet as StyleSheet2 } from "react-native";
424
+ var textAreaStyles = StyleSheet2.create({
425
+ inputWrapper: {
426
+ alignItems: "flex-start"
427
+ },
428
+ input: {
429
+ textAlignVertical: "top"
430
+ }
431
+ });
432
+
433
+ // src/components/input/textarea.tsx
434
+ var TextArea = ({
435
+ minRows = 3,
436
+ maxRows,
437
+ size = "md",
438
+ customAppearance,
439
+ numberOfLines,
440
+ textAlignVertical,
441
+ scrollEnabled,
442
+ ...props
443
+ }) => {
444
+ const sizeStyles = useTextInputSizeStyles(size);
445
+ const lineHeight = Math.round(sizeStyles.fontSize * 1.35);
446
+ const verticalPadding = sizeStyles.paddingVertical * 2;
447
+ const normalizedMaxRows = typeof maxRows === "number" ? Math.max(maxRows, minRows) : void 0;
448
+ const minHeight = minRows * lineHeight + verticalPadding;
449
+ const maxHeight = typeof normalizedMaxRows === "number" ? normalizedMaxRows * lineHeight + verticalPadding : void 0;
450
+ return /* @__PURE__ */ React2.createElement(
451
+ TextInput,
452
+ {
453
+ ...props,
454
+ size,
455
+ multiline: true,
456
+ numberOfLines: numberOfLines ?? minRows,
457
+ textAlignVertical: textAlignVertical ?? "top",
458
+ scrollEnabled: scrollEnabled ?? !!maxHeight,
459
+ customAppearance: {
460
+ ...customAppearance,
461
+ inputWrapper: [
462
+ textAreaStyles.inputWrapper,
463
+ {
464
+ minHeight,
465
+ ...maxHeight ? { maxHeight } : {}
466
+ },
467
+ customAppearance?.inputWrapper
468
+ ],
469
+ input: [
470
+ textAreaStyles.input,
471
+ {
472
+ lineHeight
473
+ },
474
+ customAppearance?.input
475
+ ]
476
+ }
477
+ }
478
+ );
479
+ };
480
+
402
481
  // src/components/input/date-time-input.tsx
403
- import React2, { forwardRef as forwardRef2, useCallback, useMemo as useMemo3 } from "react";
482
+ import React3, { forwardRef as forwardRef2, useCallback, useMemo as useMemo3 } from "react";
404
483
 
405
484
  // src/components/input/date-time-input.hook.ts
406
485
  var YMD_LOCALES = ["ja", "zh", "ko", "hu", "lt", "mn"];
@@ -532,7 +611,7 @@ var DateInput = forwardRef2(
532
611
  },
533
612
  [resolvedOrder, separator, onChangeText, onValueChange]
534
613
  );
535
- return /* @__PURE__ */ React2.createElement(
614
+ return /* @__PURE__ */ React3.createElement(
536
615
  TextInput,
537
616
  {
538
617
  ref,
@@ -565,7 +644,7 @@ var TimeInput = forwardRef2(
565
644
  },
566
645
  [granularity, hourCycle, onChangeText, onValueChange]
567
646
  );
568
- return /* @__PURE__ */ React2.createElement(
647
+ return /* @__PURE__ */ React3.createElement(
569
648
  TextInput,
570
649
  {
571
650
  ref,
@@ -611,7 +690,7 @@ var DateTimeInput = forwardRef2(
611
690
  },
612
691
  [resolvedOrder, separator, granularity, hourCycle, onChangeText, onValueChange]
613
692
  );
614
- return /* @__PURE__ */ React2.createElement(
693
+ return /* @__PURE__ */ React3.createElement(
615
694
  TextInput,
616
695
  {
617
696
  ref,
@@ -631,7 +710,7 @@ TimeInput.displayName = "TimeInput";
631
710
  DateTimeInput.displayName = "DateTimeInput";
632
711
 
633
712
  // src/components/input/otp-input.tsx
634
- import React3, { useEffect as useEffect2, useRef as useRef3 } from "react";
713
+ import React4, { useCallback as useCallback3, useEffect as useEffect2, useRef as useRef3 } from "react";
635
714
  import {
636
715
  Animated as Animated2,
637
716
  Pressable as Pressable2,
@@ -659,9 +738,7 @@ var useOTPInputState = ({
659
738
  allowedKeys
660
739
  }) => {
661
740
  const isControlled = typeof value === "string";
662
- const [internalValue, setInternalValue] = useState2(
663
- defaultValue ?? ""
664
- );
741
+ const [internalValue, setInternalValue] = useState2(defaultValue ?? "");
665
742
  const [activeIndex, setActiveIndex] = useState2(-1);
666
743
  const refs = useRef2([]);
667
744
  const currentValue = isControlled ? value : internalValue;
@@ -733,8 +810,8 @@ var useOTPInputState = ({
733
810
  };
734
811
 
735
812
  // src/components/input/otp-input.style.ts
736
- import { StyleSheet as StyleSheet2 } from "react-native";
737
- var otpStyles = StyleSheet2.create({
813
+ import { StyleSheet as StyleSheet3 } from "react-native";
814
+ var otpStyles = StyleSheet3.create({
738
815
  container: {
739
816
  gap: 6
740
817
  },
@@ -791,7 +868,8 @@ var OTPSegment = ({
791
868
  onChangeText,
792
869
  onKeyPress,
793
870
  onFocus,
794
- onBlur
871
+ onBlur,
872
+ onPress
795
873
  }) => {
796
874
  const borderAnimation = useRef3(new Animated2.Value(0)).current;
797
875
  useEffect2(() => {
@@ -801,18 +879,17 @@ var OTPSegment = ({
801
879
  useNativeDriver: false
802
880
  }).start();
803
881
  }, [borderAnimation, isActive]);
804
- return /* @__PURE__ */ React3.createElement(
882
+ return /* @__PURE__ */ React4.createElement(
805
883
  Pressable2,
806
884
  {
807
885
  onPress: () => {
808
886
  if (!isDisabled) {
809
- const inputEl = inputRef;
810
- if (typeof inputEl !== "function") return;
887
+ onPress();
811
888
  }
812
889
  },
813
890
  disabled: isDisabled
814
891
  },
815
- /* @__PURE__ */ React3.createElement(
892
+ /* @__PURE__ */ React4.createElement(
816
893
  Animated2.View,
817
894
  {
818
895
  style: [
@@ -834,7 +911,7 @@ var OTPSegment = ({
834
911
  customSegment?.segment
835
912
  ]
836
913
  },
837
- char && isSecured ? /* @__PURE__ */ React3.createElement(
914
+ char && isSecured ? /* @__PURE__ */ React4.createElement(
838
915
  View2,
839
916
  {
840
917
  style: [
@@ -842,7 +919,7 @@ var OTPSegment = ({
842
919
  { backgroundColor: variantStyles.textColor }
843
920
  ]
844
921
  }
845
- ) : /* @__PURE__ */ React3.createElement(
922
+ ) : /* @__PURE__ */ React4.createElement(
846
923
  Text2,
847
924
  {
848
925
  style: [
@@ -856,7 +933,7 @@ var OTPSegment = ({
856
933
  },
857
934
  char
858
935
  ),
859
- /* @__PURE__ */ React3.createElement(
936
+ /* @__PURE__ */ React4.createElement(
860
937
  RNTextInput2,
861
938
  {
862
939
  ref: inputRef,
@@ -929,7 +1006,19 @@ var OTPInput = ({
929
1006
  isInvalid,
930
1007
  isDisabled
931
1008
  });
932
- return /* @__PURE__ */ React3.createElement(
1009
+ const focusSegment = useCallback3(
1010
+ (index) => {
1011
+ if (isDisabled) return;
1012
+ refs.current[index]?.focus();
1013
+ },
1014
+ [isDisabled, refs]
1015
+ );
1016
+ const handleContainerPress = useCallback3(() => {
1017
+ const firstEmptyIndex = segments.findIndex((segment) => !segment);
1018
+ const targetIndex = firstEmptyIndex === -1 ? length - 1 : firstEmptyIndex;
1019
+ focusSegment(targetIndex);
1020
+ }, [focusSegment, length, segments]);
1021
+ return /* @__PURE__ */ React4.createElement(
933
1022
  View2,
934
1023
  {
935
1024
  style: [
@@ -939,7 +1028,7 @@ var OTPInput = ({
939
1028
  customAppearance?.container
940
1029
  ]
941
1030
  },
942
- label && /* @__PURE__ */ React3.createElement(
1031
+ label && /* @__PURE__ */ React4.createElement(
943
1032
  Text2,
944
1033
  {
945
1034
  style: [
@@ -953,12 +1042,14 @@ var OTPInput = ({
953
1042
  },
954
1043
  label
955
1044
  ),
956
- /* @__PURE__ */ React3.createElement(
957
- View2,
1045
+ /* @__PURE__ */ React4.createElement(
1046
+ Pressable2,
958
1047
  {
1048
+ onPress: handleContainerPress,
1049
+ disabled: isDisabled,
959
1050
  style: [otpStyles.segmentContainer, customAppearance?.segmentContainer]
960
1051
  },
961
- segments.map((char, index) => /* @__PURE__ */ React3.createElement(
1052
+ segments.map((char, index) => /* @__PURE__ */ React4.createElement(
962
1053
  OTPSegment,
963
1054
  {
964
1055
  key: index,
@@ -977,11 +1068,12 @@ var OTPInput = ({
977
1068
  onChangeText: (text) => handleSegmentChange(index, text),
978
1069
  onKeyPress: (key) => handleSegmentKeyPress(index, key),
979
1070
  onFocus: () => handleSegmentFocus(index),
980
- onBlur: handleSegmentBlur
1071
+ onBlur: handleSegmentBlur,
1072
+ onPress: () => focusSegment(index)
981
1073
  }
982
1074
  ))
983
1075
  ),
984
- helperText && /* @__PURE__ */ React3.createElement(
1076
+ helperText && /* @__PURE__ */ React4.createElement(
985
1077
  Text2,
986
1078
  {
987
1079
  style: [
@@ -997,13 +1089,13 @@ var OTPInput = ({
997
1089
  OTPInput.displayName = "OTPInput";
998
1090
 
999
1091
  // src/components/input/number-input.tsx
1000
- import React4, { forwardRef as forwardRef3 } from "react";
1092
+ import React5, { forwardRef as forwardRef3 } from "react";
1001
1093
  import { Pressable as Pressable3, View as View3 } from "react-native";
1002
1094
  import { AddIcon, RemoveIcon } from "@xaui/icons";
1003
1095
  import { withOpacity as withOpacity2 } from "@xaui/core";
1004
1096
 
1005
1097
  // src/components/input/number-input.hook.ts
1006
- import { useCallback as useCallback3, useMemo as useMemo5, useState as useState3 } from "react";
1098
+ import { useCallback as useCallback4, useMemo as useMemo5, useState as useState3 } from "react";
1007
1099
  var useNumberInputState = ({
1008
1100
  value,
1009
1101
  defaultValue,
@@ -1031,7 +1123,7 @@ var useNumberInputState = ({
1031
1123
  if (formatter) return formatter.format(currentValue);
1032
1124
  return String(currentValue);
1033
1125
  }, [currentValue, formatter, isEditing, rawText]);
1034
- const updateValue = useCallback3(
1126
+ const updateValue = useCallback4(
1035
1127
  (newValue) => {
1036
1128
  if (!isControlled) {
1037
1129
  setInternalValue(newValue);
@@ -1040,7 +1132,7 @@ var useNumberInputState = ({
1040
1132
  },
1041
1133
  [isControlled, onValueChange]
1042
1134
  );
1043
- const clamp = useCallback3(
1135
+ const clamp = useCallback4(
1044
1136
  (num) => {
1045
1137
  let clamped = num;
1046
1138
  if (minValue !== void 0 && clamped < minValue) clamped = minValue;
@@ -1049,7 +1141,7 @@ var useNumberInputState = ({
1049
1141
  },
1050
1142
  [minValue, maxValue]
1051
1143
  );
1052
- const handleTextChange = useCallback3(
1144
+ const handleTextChange = useCallback4(
1053
1145
  (text) => {
1054
1146
  setRawText(text);
1055
1147
  if (text === "" || text === "-") return;
@@ -1059,11 +1151,11 @@ var useNumberInputState = ({
1059
1151
  },
1060
1152
  [updateValue]
1061
1153
  );
1062
- const handleFocus = useCallback3(() => {
1154
+ const handleFocus = useCallback4(() => {
1063
1155
  setIsEditing(true);
1064
1156
  setRawText(currentValue !== void 0 ? String(currentValue) : "");
1065
1157
  }, [currentValue]);
1066
- const handleBlur = useCallback3(() => {
1158
+ const handleBlur = useCallback4(() => {
1067
1159
  setIsEditing(false);
1068
1160
  if (rawText === "" || rawText === "-") {
1069
1161
  updateValue(void 0);
@@ -1076,18 +1168,18 @@ var useNumberInputState = ({
1076
1168
  }
1077
1169
  updateValue(clamp(parsed));
1078
1170
  }, [rawText, clamp, updateValue]);
1079
- const handleClear = useCallback3(() => {
1171
+ const handleClear = useCallback4(() => {
1080
1172
  setRawText("");
1081
1173
  updateValue(void 0);
1082
1174
  }, [updateValue]);
1083
1175
  const canIncrement = maxValue === void 0 || (currentValue ?? 0) + step <= maxValue;
1084
1176
  const canDecrement = minValue === void 0 || (currentValue ?? 0) - step >= minValue;
1085
- const handleIncrement = useCallback3(() => {
1177
+ const handleIncrement = useCallback4(() => {
1086
1178
  const base = currentValue ?? 0;
1087
1179
  const newValue = clamp(base + step);
1088
1180
  updateValue(newValue);
1089
1181
  }, [currentValue, step, clamp, updateValue]);
1090
- const handleDecrement = useCallback3(() => {
1182
+ const handleDecrement = useCallback4(() => {
1091
1183
  const base = currentValue ?? 0;
1092
1184
  const newValue = clamp(base - step);
1093
1185
  updateValue(newValue);
@@ -1106,8 +1198,8 @@ var useNumberInputState = ({
1106
1198
  };
1107
1199
 
1108
1200
  // src/components/input/number-input.style.ts
1109
- import { StyleSheet as StyleSheet3 } from "react-native";
1110
- var numberInputStyles = StyleSheet3.create({
1201
+ import { StyleSheet as StyleSheet4 } from "react-native";
1202
+ var numberInputStyles = StyleSheet4.create({
1111
1203
  stepperContainer: {
1112
1204
  flexDirection: "row",
1113
1205
  alignItems: "center",
@@ -1174,7 +1266,7 @@ var NumberInput = forwardRef3(
1174
1266
  locale
1175
1267
  });
1176
1268
  const iconColor = withOpacity2(theme.colors.foreground, 0.7);
1177
- const stepperContent = hideStepper || isReadOnly ? void 0 : /* @__PURE__ */ React4.createElement(
1269
+ const stepperContent = hideStepper || isReadOnly ? void 0 : /* @__PURE__ */ React5.createElement(
1178
1270
  View3,
1179
1271
  {
1180
1272
  style: [
@@ -1182,7 +1274,7 @@ var NumberInput = forwardRef3(
1182
1274
  customAppearance?.stepperContainer
1183
1275
  ]
1184
1276
  },
1185
- /* @__PURE__ */ React4.createElement(
1277
+ /* @__PURE__ */ React5.createElement(
1186
1278
  Pressable3,
1187
1279
  {
1188
1280
  onPress: handleDecrement,
@@ -1195,9 +1287,9 @@ var NumberInput = forwardRef3(
1195
1287
  customAppearance?.stepperButton
1196
1288
  ]
1197
1289
  },
1198
- /* @__PURE__ */ React4.createElement(RemoveIcon, { size: 16, color: iconColor })
1290
+ /* @__PURE__ */ React5.createElement(RemoveIcon, { size: 16, color: iconColor })
1199
1291
  ),
1200
- /* @__PURE__ */ React4.createElement(
1292
+ /* @__PURE__ */ React5.createElement(
1201
1293
  Pressable3,
1202
1294
  {
1203
1295
  onPress: handleIncrement,
@@ -1210,10 +1302,10 @@ var NumberInput = forwardRef3(
1210
1302
  customAppearance?.stepperButton
1211
1303
  ]
1212
1304
  },
1213
- /* @__PURE__ */ React4.createElement(AddIcon, { size: 16, color: iconColor })
1305
+ /* @__PURE__ */ React5.createElement(AddIcon, { size: 16, color: iconColor })
1214
1306
  )
1215
1307
  );
1216
- return /* @__PURE__ */ React4.createElement(
1308
+ return /* @__PURE__ */ React5.createElement(
1217
1309
  TextInput,
1218
1310
  {
1219
1311
  ref,
@@ -1248,6 +1340,7 @@ export {
1248
1340
  DateTimeInput,
1249
1341
  NumberInput,
1250
1342
  OTPInput,
1343
+ TextArea,
1251
1344
  TextInput,
1252
1345
  TimeInput,
1253
1346
  getDateOrder
@@ -1,7 +1,6 @@
1
- import "../chunk-DXXNBF5P.js";
2
1
  import {
3
2
  useXUITheme
4
- } from "../chunk-LTKYHG5V.js";
3
+ } from "../chunk-4KSZLONZ.js";
5
4
 
6
5
  // src/components/list/list.tsx
7
6
  import React2, { useCallback, useMemo, useState } from "react";
@@ -1,7 +1,7 @@
1
- import "../chunk-DXXNBF5P.js";
1
+ import "../chunk-CZFDZPAS.js";
2
2
  import {
3
3
  useXUITheme
4
- } from "../chunk-LTKYHG5V.js";
4
+ } from "../chunk-I4V5Y5GD.js";
5
5
 
6
6
  // src/components/menu/menu.tsx
7
7
  import React from "react";