@xaui/native 0.1.4 → 0.2.0

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 (130) hide show
  1. package/README.md +109 -113
  2. package/dist/alert/index.cjs +6 -9
  3. package/dist/alert/index.js +4 -7
  4. package/dist/app-bar/index.cjs +4 -4
  5. package/dist/app-bar/index.js +2 -2
  6. package/dist/autocomplete/index.cjs +20 -25
  7. package/dist/autocomplete/index.d.cts +1 -1
  8. package/dist/autocomplete/index.d.ts +1 -1
  9. package/dist/autocomplete/index.js +11 -16
  10. package/dist/avatar/index.cjs +9 -9
  11. package/dist/avatar/index.js +5 -5
  12. package/dist/badge/index.cjs +13 -14
  13. package/dist/badge/index.js +10 -11
  14. package/dist/bottom-sheet/index.cjs +3 -3
  15. package/dist/bottom-sheet/index.js +2 -2
  16. package/dist/bottom-tab-bar/index.cjs +2 -2
  17. package/dist/bottom-tab-bar/index.js +1 -1
  18. package/dist/button/index.cjs +19 -22
  19. package/dist/button/index.d.cts +3 -3
  20. package/dist/button/index.d.ts +3 -3
  21. package/dist/button/index.js +12 -15
  22. package/dist/card/index.cjs +8 -8
  23. package/dist/card/index.js +3 -3
  24. package/dist/carousel/index.cjs +2 -2
  25. package/dist/carousel/index.js +1 -1
  26. package/dist/checkbox/index.cjs +11 -11
  27. package/dist/checkbox/index.js +6 -6
  28. package/dist/chip/index.cjs +11 -11
  29. package/dist/chip/index.js +9 -9
  30. package/dist/{chunk-K24VDBNN.js → chunk-4JFWQ5XT.js} +2 -2
  31. package/dist/{chunk-RZJFCDFS.cjs → chunk-7UFBLUMV.cjs} +13 -19
  32. package/dist/{chunk-M6A23KUM.js → chunk-A45TVXU5.js} +29 -5
  33. package/dist/{chunk-3XWF77Y3.cjs → chunk-BYWUAPC4.cjs} +4 -4
  34. package/dist/{chunk-X5KNZ6YJ.cjs → chunk-DJ4Q37UT.cjs} +2 -2
  35. package/dist/{chunk-LVNBYERF.js → chunk-RBSA4NH4.js} +13 -19
  36. package/dist/{chunk-HYL4EU3Y.cjs → chunk-UGEINZM7.cjs} +14 -13
  37. package/dist/{chunk-WGWXGIZ3.js → chunk-UU4HHBDN.js} +10 -9
  38. package/dist/{chunk-J3BOFXIH.js → chunk-VSZEXOUN.js} +4 -4
  39. package/dist/{chunk-FBTBWI3P.cjs → chunk-YIEUN3G5.cjs} +7 -7
  40. package/dist/{chunk-43I45LX7.cjs → chunk-ZH6ZSV2Q.cjs} +33 -9
  41. package/dist/{chunk-2JKWVIPB.js → chunk-ZY7IUTAT.js} +1 -1
  42. package/dist/color-picker/index.cjs +7 -7
  43. package/dist/color-picker/index.d.cts +1 -1
  44. package/dist/color-picker/index.d.ts +1 -1
  45. package/dist/color-picker/index.js +4 -4
  46. package/dist/core/index.cjs +2 -2
  47. package/dist/core/index.d.cts +1 -2
  48. package/dist/core/index.d.ts +1 -2
  49. package/dist/core/index.js +1 -1
  50. package/dist/datepicker/index.cjs +28 -30
  51. package/dist/datepicker/index.d.cts +1 -1
  52. package/dist/datepicker/index.d.ts +1 -1
  53. package/dist/datepicker/index.js +17 -19
  54. package/dist/dialog/index.cjs +5 -5
  55. package/dist/dialog/index.js +1 -1
  56. package/dist/divider/index.cjs +3 -3
  57. package/dist/divider/index.js +2 -2
  58. package/dist/drawer/index.cjs +4 -4
  59. package/dist/drawer/index.js +3 -3
  60. package/dist/expansion-panel/index.cjs +12 -12
  61. package/dist/expansion-panel/index.js +3 -3
  62. package/dist/fab/index.cjs +4 -4
  63. package/dist/fab/index.js +3 -3
  64. package/dist/fab-menu/index.cjs +8 -8
  65. package/dist/fab-menu/index.js +4 -4
  66. package/dist/feature-discovery/index.cjs +6 -6
  67. package/dist/feature-discovery/index.js +5 -5
  68. package/dist/indicator/index.cjs +3 -3
  69. package/dist/indicator/index.js +2 -2
  70. package/dist/input/index.cjs +38 -20
  71. package/dist/input/index.d.cts +2 -2
  72. package/dist/input/index.d.ts +2 -2
  73. package/dist/input/index.js +36 -18
  74. package/dist/input-trigger/index.cjs +193 -4
  75. package/dist/input-trigger/index.d.cts +5 -3
  76. package/dist/input-trigger/index.d.ts +5 -3
  77. package/dist/input-trigger/index.js +192 -3
  78. package/dist/{input-trigger.type-BL70fHE9.d.cts → input-trigger.type-By_1ZjKd.d.cts} +86 -3
  79. package/dist/{input-trigger.type-BODYStHk.d.ts → input-trigger.type-DlSqg2eG.d.ts} +86 -3
  80. package/dist/list/index.cjs +6 -6
  81. package/dist/list/index.js +2 -2
  82. package/dist/menu/index.cjs +4 -4
  83. package/dist/menu/index.js +2 -2
  84. package/dist/menubox/index.cjs +7 -7
  85. package/dist/menubox/index.d.cts +1 -1
  86. package/dist/menubox/index.d.ts +1 -1
  87. package/dist/menubox/index.js +3 -3
  88. package/dist/picker/index.cjs +7 -7
  89. package/dist/picker/index.d.cts +1 -1
  90. package/dist/picker/index.d.ts +1 -1
  91. package/dist/picker/index.js +4 -4
  92. package/dist/progress/index.cjs +3 -3
  93. package/dist/progress/index.js +2 -2
  94. package/dist/radio/index.cjs +9 -9
  95. package/dist/radio/index.js +3 -3
  96. package/dist/refresh-control/index.cjs +45 -0
  97. package/dist/refresh-control/index.d.cts +55 -0
  98. package/dist/refresh-control/index.d.ts +55 -0
  99. package/dist/refresh-control/index.js +45 -0
  100. package/dist/segment-button/index.cjs +8 -8
  101. package/dist/segment-button/index.js +5 -5
  102. package/dist/select/index.cjs +50 -58
  103. package/dist/select/index.d.cts +2 -2
  104. package/dist/select/index.d.ts +2 -2
  105. package/dist/select/index.js +37 -45
  106. package/dist/skeleton/index.cjs +4 -4
  107. package/dist/skeleton/index.js +3 -3
  108. package/dist/slider/index.cjs +5 -5
  109. package/dist/slider/index.js +1 -1
  110. package/dist/snackbar/index.cjs +6 -6
  111. package/dist/snackbar/index.js +4 -4
  112. package/dist/snippet/index.cjs +4 -4
  113. package/dist/snippet/index.js +2 -2
  114. package/dist/stepper/index.cjs +3 -3
  115. package/dist/stepper/index.js +2 -2
  116. package/dist/switch/index.cjs +8 -8
  117. package/dist/switch/index.js +2 -2
  118. package/dist/tabs/index.cjs +7 -7
  119. package/dist/tabs/index.js +4 -4
  120. package/dist/timepicker/index.cjs +7 -7
  121. package/dist/timepicker/index.js +4 -4
  122. package/dist/toolbar/index.cjs +3 -3
  123. package/dist/toolbar/index.js +2 -2
  124. package/dist/typography/index.cjs +5 -3
  125. package/dist/typography/index.d.cts +4 -0
  126. package/dist/typography/index.d.ts +4 -0
  127. package/dist/typography/index.js +3 -1
  128. package/dist/view/index.cjs +4 -4
  129. package/dist/view/index.js +2 -2
  130. package/package.json +8 -3
@@ -1,12 +1,12 @@
1
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; }
2
2
 
3
- var _chunkHYL4EU3Ycjs = require('../chunk-HYL4EU3Y.cjs');
4
- require('../chunk-FBTBWI3P.cjs');
3
+ var _chunkUGEINZM7cjs = require('../chunk-UGEINZM7.cjs');
4
+ require('../chunk-YIEUN3G5.cjs');
5
5
  require('../chunk-56RPWZD2.cjs');
6
6
 
7
7
 
8
8
 
9
- var _chunkRZJFCDFScjs = require('../chunk-RZJFCDFS.cjs');
9
+ var _chunk7UFBLUMVcjs = require('../chunk-7UFBLUMV.cjs');
10
10
 
11
11
  // src/components/fab-menu/fab-menu.tsx
12
12
  var _react = require('react'); var _react2 = _interopRequireDefault(_react);
@@ -80,12 +80,12 @@ function useFabMenuState(controlledExpanded, onToggle) {
80
80
  return { expanded, toggle, close };
81
81
  }
82
82
  function useFabMenuItemStyles(themeColor) {
83
- const theme = _chunkRZJFCDFScjs.useXUITheme.call(void 0, );
83
+ const theme = _chunk7UFBLUMVcjs.useXUITheme.call(void 0, );
84
84
  const safeThemeColor = _core.getSafeThemeColor.call(void 0, themeColor);
85
85
  const colorScheme = theme.colors[safeThemeColor];
86
86
  const itemStyles = _react.useMemo.call(void 0, () => {
87
87
  const chipStyles = {
88
- backgroundColor: colorScheme.background,
88
+ backgroundColor: colorScheme.container,
89
89
  borderRadius: theme.borderRadius.full,
90
90
  color: colorScheme.main,
91
91
  fontSize: theme.fontSizes.md
@@ -96,7 +96,7 @@ function useFabMenuItemStyles(themeColor) {
96
96
  return itemStyles;
97
97
  }
98
98
  function useFabMenuOverlayColor() {
99
- const theme = _chunkRZJFCDFScjs.useXUITheme.call(void 0, );
99
+ const theme = _chunk7UFBLUMVcjs.useXUITheme.call(void 0, );
100
100
  return _react.useMemo.call(void 0, () => {
101
101
  return theme.mode === "dark" ? "rgba(0, 0, 0, 0.5)" : "rgba(0, 0, 0, 0.3)";
102
102
  }, [theme.mode]);
@@ -209,7 +209,7 @@ var FabMenu = ({
209
209
  }
210
210
  },
211
211
  /* @__PURE__ */ _react2.default.createElement(
212
- _chunkHYL4EU3Ycjs.Fab,
212
+ _chunkUGEINZM7cjs.Fab,
213
213
  {
214
214
  icon: currentIcon,
215
215
  label,
@@ -259,7 +259,7 @@ var FabMenu = ({
259
259
  })
260
260
  );
261
261
  }));
262
- return /* @__PURE__ */ _react2.default.createElement(_reactnative.View, { style: [styles.container, _optionalChain([customAppearance, 'optionalAccess', _11 => _11.container])] }, isPortalVisible && /* @__PURE__ */ _react2.default.createElement(_chunkRZJFCDFScjs.Portal, null, /* @__PURE__ */ _react2.default.createElement(_reactnative.View, { style: styles.portalRoot }, showOverlay && /* @__PURE__ */ _react2.default.createElement(
262
+ return /* @__PURE__ */ _react2.default.createElement(_reactnative.View, { style: [styles.container, _optionalChain([customAppearance, 'optionalAccess', _11 => _11.container])] }, isPortalVisible && /* @__PURE__ */ _react2.default.createElement(_chunk7UFBLUMVcjs.Portal, null, /* @__PURE__ */ _react2.default.createElement(_reactnative.View, { style: styles.portalRoot }, showOverlay && /* @__PURE__ */ _react2.default.createElement(
263
263
  _reactnative.Animated.View,
264
264
  {
265
265
  style: [
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  Fab
3
- } from "../chunk-WGWXGIZ3.js";
4
- import "../chunk-J3BOFXIH.js";
3
+ } from "../chunk-UU4HHBDN.js";
4
+ import "../chunk-VSZEXOUN.js";
5
5
  import "../chunk-SHBDANQN.js";
6
6
  import {
7
7
  Portal,
8
8
  useXUITheme
9
- } from "../chunk-LVNBYERF.js";
9
+ } from "../chunk-RBSA4NH4.js";
10
10
 
11
11
  // src/components/fab-menu/fab-menu.tsx
12
12
  import React from "react";
@@ -85,7 +85,7 @@ function useFabMenuItemStyles(themeColor) {
85
85
  const colorScheme = theme.colors[safeThemeColor];
86
86
  const itemStyles = useMemo(() => {
87
87
  const chipStyles = {
88
- backgroundColor: colorScheme.background,
88
+ backgroundColor: colorScheme.container,
89
89
  borderRadius: theme.borderRadius.full,
90
90
  color: colorScheme.main,
91
91
  fontSize: theme.fontSizes.md
@@ -1,7 +1,7 @@
1
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-56RPWZD2.cjs');
2
2
 
3
3
 
4
- var _chunkRZJFCDFScjs = require('../chunk-RZJFCDFS.cjs');
4
+ var _chunk7UFBLUMVcjs = require('../chunk-7UFBLUMV.cjs');
5
5
 
6
6
  // src/components/feature-discovery/feature-discovery.tsx
7
7
  var _react = require('react'); var _react2 = _interopRequireDefault(_react);
@@ -235,7 +235,7 @@ var useFeatureDiscoveryGeometry = (target, viewportWidth, viewportHeight, spotli
235
235
  };
236
236
  };
237
237
  var useFeatureDiscoveryTheme = (themeColor, overlayColor) => {
238
- const theme = _chunkRZJFCDFScjs.useXUITheme.call(void 0, );
238
+ const theme = _chunk7UFBLUMVcjs.useXUITheme.call(void 0, );
239
239
  const colorScheme = theme.colors[_core.getSafeThemeColor.call(void 0, themeColor)];
240
240
  const resolvedOverlayColor = _react.useMemo.call(void 0,
241
241
  () => _nullishCoalesce(overlayColor, () => ( _core.withOpacity.call(void 0, theme.colors.foreground, 0.42))),
@@ -421,7 +421,7 @@ var FeatureDiscovery = ({
421
421
  },
422
422
  /* @__PURE__ */ _react2.default.createElement(_reactnative.View, { style: styles.messageHeader }, /* @__PURE__ */ _react2.default.createElement(_reactnative.View, { style: styles.messageTitleWrapper }, renderContent(title, [
423
423
  styles.title,
424
- { color: colorScheme.foreground },
424
+ { color: colorScheme.onMain },
425
425
  { textAlign: isTargetOnLeft ? "left" : "right" },
426
426
  _optionalChain([customAppearance, 'optionalAccess', _8 => _8.title])
427
427
  ])), /* @__PURE__ */ _react2.default.createElement(
@@ -431,11 +431,11 @@ var FeatureDiscovery = ({
431
431
  style: styles.closeButton,
432
432
  accessibilityRole: "button"
433
433
  },
434
- /* @__PURE__ */ _react2.default.createElement(_reactnative.Text, { style: [styles.closeIcon, { color: colorScheme.foreground }] }, "\u2715")
434
+ /* @__PURE__ */ _react2.default.createElement(_reactnative.Text, { style: [styles.closeIcon, { color: colorScheme.onMain }] }, "\u2715")
435
435
  )),
436
436
  description ? renderContent(description, [
437
437
  styles.description,
438
- { color: _core.withOpacity.call(void 0, colorScheme.foreground, 0.9) },
438
+ { color: _core.withOpacity.call(void 0, colorScheme.onMain, 0.9) },
439
439
  { textAlign: isTargetOnLeft ? "left" : "right" },
440
440
  _optionalChain([customAppearance, 'optionalAccess', _9 => _9.description])
441
441
  ]) : null,
@@ -451,7 +451,7 @@ var FeatureDiscovery = ({
451
451
  },
452
452
  renderContent(actionText, [
453
453
  styles.actionText,
454
- { color: colorScheme.foreground },
454
+ { color: colorScheme.onMain },
455
455
  _optionalChain([customAppearance, 'optionalAccess', _10 => _10.actionText])
456
456
  ])
457
457
  ) : null
@@ -1,7 +1,7 @@
1
1
  import "../chunk-SHBDANQN.js";
2
2
  import {
3
3
  useXUITheme
4
- } from "../chunk-LVNBYERF.js";
4
+ } from "../chunk-RBSA4NH4.js";
5
5
 
6
6
  // src/components/feature-discovery/feature-discovery.tsx
7
7
  import React, { useEffect } from "react";
@@ -421,7 +421,7 @@ var FeatureDiscovery = ({
421
421
  },
422
422
  /* @__PURE__ */ React.createElement(View, { style: styles.messageHeader }, /* @__PURE__ */ React.createElement(View, { style: styles.messageTitleWrapper }, renderContent(title, [
423
423
  styles.title,
424
- { color: colorScheme.foreground },
424
+ { color: colorScheme.onMain },
425
425
  { textAlign: isTargetOnLeft ? "left" : "right" },
426
426
  customAppearance?.title
427
427
  ])), /* @__PURE__ */ React.createElement(
@@ -431,11 +431,11 @@ var FeatureDiscovery = ({
431
431
  style: styles.closeButton,
432
432
  accessibilityRole: "button"
433
433
  },
434
- /* @__PURE__ */ React.createElement(Text, { style: [styles.closeIcon, { color: colorScheme.foreground }] }, "\u2715")
434
+ /* @__PURE__ */ React.createElement(Text, { style: [styles.closeIcon, { color: colorScheme.onMain }] }, "\u2715")
435
435
  )),
436
436
  description ? renderContent(description, [
437
437
  styles.description,
438
- { color: withOpacity2(colorScheme.foreground, 0.9) },
438
+ { color: withOpacity2(colorScheme.onMain, 0.9) },
439
439
  { textAlign: isTargetOnLeft ? "left" : "right" },
440
440
  customAppearance?.description
441
441
  ]) : null,
@@ -451,7 +451,7 @@ var FeatureDiscovery = ({
451
451
  },
452
452
  renderContent(actionText, [
453
453
  styles.actionText,
454
- { color: colorScheme.foreground },
454
+ { color: colorScheme.onMain },
455
455
  customAppearance?.actionText
456
456
  ])
457
457
  ) : null
@@ -1,8 +1,8 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkFBTBWI3Pcjs = require('../chunk-FBTBWI3P.cjs');
3
+ var _chunkYIEUN3G5cjs = require('../chunk-YIEUN3G5.cjs');
4
4
  require('../chunk-56RPWZD2.cjs');
5
- require('../chunk-RZJFCDFS.cjs');
5
+ require('../chunk-7UFBLUMV.cjs');
6
6
 
7
7
 
8
- exports.ActivityIndicator = _chunkFBTBWI3Pcjs.ActivityIndicator;
8
+ exports.ActivityIndicator = _chunkYIEUN3G5cjs.ActivityIndicator;
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  ActivityIndicator
3
- } from "../chunk-J3BOFXIH.js";
3
+ } from "../chunk-VSZEXOUN.js";
4
4
  import "../chunk-SHBDANQN.js";
5
- import "../chunk-LVNBYERF.js";
5
+ import "../chunk-RBSA4NH4.js";
6
6
  export {
7
7
  ActivityIndicator
8
8
  };
@@ -1,7 +1,7 @@
1
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-56RPWZD2.cjs');
2
2
 
3
3
 
4
- var _chunkRZJFCDFScjs = require('../chunk-RZJFCDFS.cjs');
4
+ var _chunk7UFBLUMVcjs = require('../chunk-7UFBLUMV.cjs');
5
5
 
6
6
  // src/components/input/input.tsx
7
7
  var _react = require('react'); var _react2 = _interopRequireDefault(_react);
@@ -18,7 +18,7 @@ var _icons = require('@xaui/icons');
18
18
 
19
19
  var _core = require('@xaui/core');
20
20
  var useTextInputSizeStyles = (size) => {
21
- const theme = _chunkRZJFCDFScjs.useXUITheme.call(void 0, );
21
+ const theme = _chunk7UFBLUMVcjs.useXUITheme.call(void 0, );
22
22
  return _react.useMemo.call(void 0, () => {
23
23
  const sizeMap = {
24
24
  sm: {
@@ -53,7 +53,7 @@ var useTextInputSizeStyles = (size) => {
53
53
  }, [size, theme]);
54
54
  };
55
55
  var useTextInputRadiusStyles = (radius) => {
56
- const theme = _chunkRZJFCDFScjs.useXUITheme.call(void 0, );
56
+ const theme = _chunk7UFBLUMVcjs.useXUITheme.call(void 0, );
57
57
  return _react.useMemo.call(void 0, () => {
58
58
  if (radius === "full") {
59
59
  return { borderRadius: theme.borderRadius.full };
@@ -68,7 +68,7 @@ var useTextInputVariantStyles = ({
68
68
  isInvalid,
69
69
  isDisabled
70
70
  }) => {
71
- const theme = _chunkRZJFCDFScjs.useXUITheme.call(void 0, );
71
+ const theme = _chunk7UFBLUMVcjs.useXUITheme.call(void 0, );
72
72
  const safeThemeColor = _core.getSafeThemeColor.call(void 0, themeColor);
73
73
  const colorScheme = theme.colors[safeThemeColor];
74
74
  return _react.useMemo.call(void 0, () => {
@@ -108,10 +108,9 @@ var useTextInputVariantStyles = ({
108
108
  helperColor
109
109
  };
110
110
  }
111
- if (variant === "faded") {
111
+ if (variant === "light") {
112
112
  return {
113
113
  container: {
114
- backgroundColor: _core.withOpacity.call(void 0, colorScheme.background, 0.68),
115
114
  borderColor: isFocused || isInvalid ? focusColor : "transparent",
116
115
  borderWidth: isFocused || isInvalid ? theme.borderWidth.md : 0
117
116
  },
@@ -125,7 +124,7 @@ var useTextInputVariantStyles = ({
125
124
  }
126
125
  return {
127
126
  container: {
128
- backgroundColor: colorScheme.background,
127
+ backgroundColor: _core.withOpacity.call(void 0, colorScheme.container, 0.5),
129
128
  borderColor: isFocused || isInvalid ? _core.withPaletteNumber.call(void 0, focusColor, 500) : "transparent",
130
129
  borderWidth: isFocused || isInvalid ? theme.borderWidth.md : 0
131
130
  },
@@ -202,7 +201,7 @@ var TextInput = _react.forwardRef.call(void 0,
202
201
  startContent,
203
202
  endContent,
204
203
  themeColor = "primary",
205
- variant = "flat",
204
+ variant = "colored",
206
205
  size = "md",
207
206
  radius = "md",
208
207
  isSecured = false,
@@ -810,6 +809,7 @@ DateTimeInput.displayName = "DateTimeInput";
810
809
 
811
810
 
812
811
 
812
+
813
813
  // src/components/input/otp-input.hook.ts
814
814
 
815
815
  var segmentSizeMap = {
@@ -933,6 +933,12 @@ var otpStyles = _reactnative.StyleSheet.create({
933
933
  height: 1,
934
934
  opacity: 0
935
935
  },
936
+ underline: {
937
+ position: "absolute",
938
+ left: 0,
939
+ right: 0,
940
+ bottom: 0
941
+ },
936
942
  label: {
937
943
  fontWeight: "500"
938
944
  },
@@ -963,6 +969,7 @@ var OTPSegment = ({
963
969
  onPress
964
970
  }) => {
965
971
  const borderAnimation = _react.useRef.call(void 0, new _reactnative.Animated.Value(0)).current;
972
+ const isUnderlined = variantStyles.container.borderBottomWidth !== void 0;
966
973
  _react.useEffect.call(void 0, () => {
967
974
  _reactnative.Animated.timing(borderAnimation, {
968
975
  toValue: isActive ? 1 : 0,
@@ -970,6 +977,11 @@ var OTPSegment = ({
970
977
  useNativeDriver: false
971
978
  }).start();
972
979
  }, [borderAnimation, isActive]);
980
+ const unfocusedLineColor = isUnderlined ? _core.withOpacity.call(void 0, variantStyles.focusedBorderColor, 0.35) : variantStyles.unfocusedBorderColor;
981
+ const animatedBorderColor = borderAnimation.interpolate({
982
+ inputRange: [0, 1],
983
+ outputRange: [unfocusedLineColor, variantStyles.focusedBorderColor]
984
+ });
973
985
  return /* @__PURE__ */ _react2.default.createElement(
974
986
  _reactnative.Pressable,
975
987
  {
@@ -989,15 +1001,9 @@ var OTPSegment = ({
989
1001
  width: sizeStyles.width,
990
1002
  height: sizeStyles.height,
991
1003
  backgroundColor: variantStyles.container.backgroundColor,
992
- borderWidth: _nullishCoalesce(variantStyles.container.borderWidth, () => ( 0)),
993
- borderRadius: radiusStyles.borderRadius,
994
- borderColor: borderAnimation.interpolate({
995
- inputRange: [0, 1],
996
- outputRange: [
997
- variantStyles.unfocusedBorderColor,
998
- variantStyles.focusedBorderColor
999
- ]
1000
- })
1004
+ borderRadius: isUnderlined ? 0 : radiusStyles.borderRadius,
1005
+ borderWidth: isUnderlined ? 0 : _nullishCoalesce(variantStyles.container.borderWidth, () => ( 0)),
1006
+ borderColor: isUnderlined ? void 0 : animatedBorderColor
1001
1007
  },
1002
1008
  _optionalChain([customSegment, 'optionalAccess', _37 => _37.segment])
1003
1009
  ]
@@ -1039,6 +1045,18 @@ var OTPSegment = ({
1039
1045
  editable: !isDisabled,
1040
1046
  caretHidden: true
1041
1047
  }
1048
+ ),
1049
+ isUnderlined && /* @__PURE__ */ _react2.default.createElement(
1050
+ _reactnative.Animated.View,
1051
+ {
1052
+ style: [
1053
+ otpStyles.underline,
1054
+ {
1055
+ height: _nullishCoalesce(variantStyles.container.borderBottomWidth, () => ( 1)),
1056
+ backgroundColor: animatedBorderColor
1057
+ }
1058
+ ]
1059
+ }
1042
1060
  )
1043
1061
  )
1044
1062
  );
@@ -1049,7 +1067,7 @@ var OTPInput = ({
1049
1067
  defaultValue,
1050
1068
  onValueChange,
1051
1069
  onComplete,
1052
- variant = "flat",
1070
+ variant = "colored",
1053
1071
  size = "md",
1054
1072
  radius = "md",
1055
1073
  themeColor = "primary",
@@ -1326,7 +1344,7 @@ var NumberInput = _react.forwardRef.call(void 0,
1326
1344
  errorMessage,
1327
1345
  placeholder,
1328
1346
  themeColor = "primary",
1329
- variant = "flat",
1347
+ variant = "colored",
1330
1348
  size = "md",
1331
1349
  radius = "md",
1332
1350
  isDisabled = false,
@@ -1336,7 +1354,7 @@ var NumberInput = _react.forwardRef.call(void 0,
1336
1354
  fullWidth = true,
1337
1355
  customAppearance
1338
1356
  }, ref) => {
1339
- const theme = _chunkRZJFCDFScjs.useXUITheme.call(void 0, );
1357
+ const theme = _chunk7UFBLUMVcjs.useXUITheme.call(void 0, );
1340
1358
  const {
1341
1359
  displayValue,
1342
1360
  handleTextChange,
@@ -3,7 +3,7 @@ import React, { ReactNode } from 'react';
3
3
  import * as react_native from 'react-native';
4
4
  import { StyleProp, ViewStyle, TextStyle, TextInputProps as TextInputProps$1, TextInput as TextInput$1 } from 'react-native';
5
5
 
6
- type TextInputVariant = 'flat' | 'faded' | 'bordered' | 'underlined';
6
+ type TextInputVariant = 'colored' | 'light' | 'bordered' | 'underlined';
7
7
  type TextInputSize = 'sm' | 'md' | 'lg';
8
8
  type TextInputLabelPlacement = 'outside' | 'inside';
9
9
  type TextInputCustomAppearance = {
@@ -59,7 +59,7 @@ type TextInputProps = Omit<TextInputProps$1, 'value' | 'defaultValue' | 'style'>
59
59
  themeColor?: ThemeColor;
60
60
  /**
61
61
  * Visual style variant.
62
- * @default 'flat'
62
+ * @default 'colored'
63
63
  */
64
64
  variant?: TextInputVariant;
65
65
  /**
@@ -3,7 +3,7 @@ import React, { ReactNode } from 'react';
3
3
  import * as react_native from 'react-native';
4
4
  import { StyleProp, ViewStyle, TextStyle, TextInputProps as TextInputProps$1, TextInput as TextInput$1 } from 'react-native';
5
5
 
6
- type TextInputVariant = 'flat' | 'faded' | 'bordered' | 'underlined';
6
+ type TextInputVariant = 'colored' | 'light' | 'bordered' | 'underlined';
7
7
  type TextInputSize = 'sm' | 'md' | 'lg';
8
8
  type TextInputLabelPlacement = 'outside' | 'inside';
9
9
  type TextInputCustomAppearance = {
@@ -59,7 +59,7 @@ type TextInputProps = Omit<TextInputProps$1, 'value' | 'defaultValue' | 'style'>
59
59
  themeColor?: ThemeColor;
60
60
  /**
61
61
  * Visual style variant.
62
- * @default 'flat'
62
+ * @default 'colored'
63
63
  */
64
64
  variant?: TextInputVariant;
65
65
  /**
@@ -1,7 +1,7 @@
1
1
  import "../chunk-SHBDANQN.js";
2
2
  import {
3
3
  useXUITheme
4
- } from "../chunk-LVNBYERF.js";
4
+ } from "../chunk-RBSA4NH4.js";
5
5
 
6
6
  // src/components/input/input.tsx
7
7
  import React, { forwardRef, useMemo as useMemo2, useState, useRef, useEffect } from "react";
@@ -108,10 +108,9 @@ var useTextInputVariantStyles = ({
108
108
  helperColor
109
109
  };
110
110
  }
111
- if (variant === "faded") {
111
+ if (variant === "light") {
112
112
  return {
113
113
  container: {
114
- backgroundColor: withOpacity(colorScheme.background, 0.68),
115
114
  borderColor: isFocused || isInvalid ? focusColor : "transparent",
116
115
  borderWidth: isFocused || isInvalid ? theme.borderWidth.md : 0
117
116
  },
@@ -125,7 +124,7 @@ var useTextInputVariantStyles = ({
125
124
  }
126
125
  return {
127
126
  container: {
128
- backgroundColor: colorScheme.background,
127
+ backgroundColor: withOpacity(colorScheme.container, 0.5),
129
128
  borderColor: isFocused || isInvalid ? withPaletteNumber(focusColor, 500) : "transparent",
130
129
  borderWidth: isFocused || isInvalid ? theme.borderWidth.md : 0
131
130
  },
@@ -202,7 +201,7 @@ var TextInput = forwardRef(
202
201
  startContent,
203
202
  endContent,
204
203
  themeColor = "primary",
205
- variant = "flat",
204
+ variant = "colored",
206
205
  size = "md",
207
206
  radius = "md",
208
207
  isSecured = false,
@@ -809,6 +808,7 @@ import {
809
808
  TextInput as RNTextInput2,
810
809
  View as View2
811
810
  } from "react-native";
811
+ import { withOpacity as withOpacity2 } from "@xaui/core";
812
812
 
813
813
  // src/components/input/otp-input.hook.ts
814
814
  import { useCallback as useCallback2, useMemo as useMemo4, useRef as useRef2, useState as useState2 } from "react";
@@ -933,6 +933,12 @@ var otpStyles = StyleSheet3.create({
933
933
  height: 1,
934
934
  opacity: 0
935
935
  },
936
+ underline: {
937
+ position: "absolute",
938
+ left: 0,
939
+ right: 0,
940
+ bottom: 0
941
+ },
936
942
  label: {
937
943
  fontWeight: "500"
938
944
  },
@@ -963,6 +969,7 @@ var OTPSegment = ({
963
969
  onPress
964
970
  }) => {
965
971
  const borderAnimation = useRef3(new Animated2.Value(0)).current;
972
+ const isUnderlined = variantStyles.container.borderBottomWidth !== void 0;
966
973
  useEffect2(() => {
967
974
  Animated2.timing(borderAnimation, {
968
975
  toValue: isActive ? 1 : 0,
@@ -970,6 +977,11 @@ var OTPSegment = ({
970
977
  useNativeDriver: false
971
978
  }).start();
972
979
  }, [borderAnimation, isActive]);
980
+ const unfocusedLineColor = isUnderlined ? withOpacity2(variantStyles.focusedBorderColor, 0.35) : variantStyles.unfocusedBorderColor;
981
+ const animatedBorderColor = borderAnimation.interpolate({
982
+ inputRange: [0, 1],
983
+ outputRange: [unfocusedLineColor, variantStyles.focusedBorderColor]
984
+ });
973
985
  return /* @__PURE__ */ React4.createElement(
974
986
  Pressable2,
975
987
  {
@@ -989,15 +1001,9 @@ var OTPSegment = ({
989
1001
  width: sizeStyles.width,
990
1002
  height: sizeStyles.height,
991
1003
  backgroundColor: variantStyles.container.backgroundColor,
992
- borderWidth: variantStyles.container.borderWidth ?? 0,
993
- borderRadius: radiusStyles.borderRadius,
994
- borderColor: borderAnimation.interpolate({
995
- inputRange: [0, 1],
996
- outputRange: [
997
- variantStyles.unfocusedBorderColor,
998
- variantStyles.focusedBorderColor
999
- ]
1000
- })
1004
+ borderRadius: isUnderlined ? 0 : radiusStyles.borderRadius,
1005
+ borderWidth: isUnderlined ? 0 : variantStyles.container.borderWidth ?? 0,
1006
+ borderColor: isUnderlined ? void 0 : animatedBorderColor
1001
1007
  },
1002
1008
  customSegment?.segment
1003
1009
  ]
@@ -1039,6 +1045,18 @@ var OTPSegment = ({
1039
1045
  editable: !isDisabled,
1040
1046
  caretHidden: true
1041
1047
  }
1048
+ ),
1049
+ isUnderlined && /* @__PURE__ */ React4.createElement(
1050
+ Animated2.View,
1051
+ {
1052
+ style: [
1053
+ otpStyles.underline,
1054
+ {
1055
+ height: variantStyles.container.borderBottomWidth ?? 1,
1056
+ backgroundColor: animatedBorderColor
1057
+ }
1058
+ ]
1059
+ }
1042
1060
  )
1043
1061
  )
1044
1062
  );
@@ -1049,7 +1067,7 @@ var OTPInput = ({
1049
1067
  defaultValue,
1050
1068
  onValueChange,
1051
1069
  onComplete,
1052
- variant = "flat",
1070
+ variant = "colored",
1053
1071
  size = "md",
1054
1072
  radius = "md",
1055
1073
  themeColor = "primary",
@@ -1183,7 +1201,7 @@ OTPInput.displayName = "OTPInput";
1183
1201
  import React5, { forwardRef as forwardRef3 } from "react";
1184
1202
  import { Pressable as Pressable3, View as View3 } from "react-native";
1185
1203
  import { AddIcon, RemoveIcon } from "@xaui/icons";
1186
- import { withOpacity as withOpacity2 } from "@xaui/core";
1204
+ import { withOpacity as withOpacity3 } from "@xaui/core";
1187
1205
 
1188
1206
  // src/components/input/number-input.hook.ts
1189
1207
  import { useCallback as useCallback4, useMemo as useMemo5, useState as useState3 } from "react";
@@ -1326,7 +1344,7 @@ var NumberInput = forwardRef3(
1326
1344
  errorMessage,
1327
1345
  placeholder,
1328
1346
  themeColor = "primary",
1329
- variant = "flat",
1347
+ variant = "colored",
1330
1348
  size = "md",
1331
1349
  radius = "md",
1332
1350
  isDisabled = false,
@@ -1356,7 +1374,7 @@ var NumberInput = forwardRef3(
1356
1374
  formatOptions,
1357
1375
  locale
1358
1376
  });
1359
- const iconColor = withOpacity2(theme.colors.foreground, 0.7);
1377
+ const iconColor = withOpacity3(theme.colors.foreground, 0.7);
1360
1378
  const stepperContent = hideStepper || isReadOnly ? void 0 : /* @__PURE__ */ React5.createElement(
1361
1379
  View3,
1362
1380
  {