@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
@@ -2,7 +2,7 @@
2
2
 
3
3
 
4
4
 
5
- var _chunkRZJFCDFScjs = require('../chunk-RZJFCDFS.cjs');
5
+ var _chunk7UFBLUMVcjs = require('../chunk-7UFBLUMV.cjs');
6
6
 
7
7
  // src/components/card/card.tsx
8
8
  var _react = require('react'); var _react2 = _interopRequireDefault(_react);
@@ -59,20 +59,20 @@ var styles = _reactnative.StyleSheet.create({
59
59
 
60
60
  var _core = require('@xaui/core');
61
61
  var useCardContainerStyles = (themeColor, isBlurred) => {
62
- const theme = _chunkRZJFCDFScjs.useXUITheme.call(void 0, );
62
+ const theme = _chunk7UFBLUMVcjs.useXUITheme.call(void 0, );
63
63
  return _react.useMemo.call(void 0, () => {
64
64
  const safeThemeColor = _core.getSafeThemeColor.call(void 0, themeColor);
65
65
  const colorScheme = theme.colors[safeThemeColor];
66
66
  const isDefaultThemeColor = safeThemeColor === "default";
67
- const defaultBackgroundColor = theme.mode === "dark" ? theme.colors.default.background : "#FFFFFF";
67
+ const defaultBackgroundColor = theme.mode === "dark" ? theme.colors.default.container : "#FFFFFF";
68
68
  return {
69
- backgroundColor: isBlurred ? theme.mode === "dark" ? "rgba(24, 24, 27, 0.82)" : "rgba(255, 255, 255, 0.82)" : isDefaultThemeColor ? defaultBackgroundColor : colorScheme.background,
69
+ backgroundColor: isBlurred ? theme.mode === "dark" ? "rgba(24, 24, 27, 0.82)" : "rgba(255, 255, 255, 0.82)" : isDefaultThemeColor ? defaultBackgroundColor : colorScheme.container,
70
70
  borderColor: _core.withOpacity.call(void 0, colorScheme.main, 0.05)
71
71
  };
72
72
  }, [isBlurred, theme, themeColor]);
73
73
  };
74
74
  var useCardElevationStyles = (elevation = 0) => {
75
- const theme = _chunkRZJFCDFScjs.useXUITheme.call(void 0, );
75
+ const theme = _chunk7UFBLUMVcjs.useXUITheme.call(void 0, );
76
76
  return _react.useMemo.call(void 0, () => {
77
77
  const shadowStyles = elevation === 0 ? {} : elevation === 1 ? theme.shadows.sm : elevation === 2 ? theme.shadows.md : elevation === 3 ? theme.shadows.lg : theme.shadows.xl;
78
78
  return {
@@ -82,7 +82,7 @@ var useCardElevationStyles = (elevation = 0) => {
82
82
  }, [elevation, theme]);
83
83
  };
84
84
  var useCardTextStyles = (themeColor) => {
85
- const theme = _chunkRZJFCDFScjs.useXUITheme.call(void 0, );
85
+ const theme = _chunk7UFBLUMVcjs.useXUITheme.call(void 0, );
86
86
  return _react.useMemo.call(void 0, () => {
87
87
  const safeThemeColor = _core.getSafeThemeColor.call(void 0, themeColor);
88
88
  const colorScheme = theme.colors[safeThemeColor];
@@ -93,7 +93,7 @@ var useCardTextStyles = (themeColor) => {
93
93
  }, [theme, themeColor]);
94
94
  };
95
95
  var useCardFooterStyles = (themeColor, isFooterBlurred) => {
96
- const theme = _chunkRZJFCDFScjs.useXUITheme.call(void 0, );
96
+ const theme = _chunk7UFBLUMVcjs.useXUITheme.call(void 0, );
97
97
  return _react.useMemo.call(void 0, () => {
98
98
  const safeThemeColor = _core.getSafeThemeColor.call(void 0, themeColor);
99
99
  const colorScheme = theme.colors[safeThemeColor];
@@ -136,7 +136,7 @@ var Card = ({
136
136
  }) => {
137
137
  const animatedScale = _react2.default.useRef(new _reactnative.Animated.Value(1)).current;
138
138
  const animatedOpacity = _react2.default.useRef(new _reactnative.Animated.Value(1)).current;
139
- const radiusStyles = _chunkRZJFCDFScjs.useBorderRadiusStyles.call(void 0, radius);
139
+ const radiusStyles = _chunk7UFBLUMVcjs.useBorderRadiusStyles.call(void 0, radius);
140
140
  const containerStyles = useCardContainerStyles(themeColor, isBlurred);
141
141
  const elevationStyles = useCardElevationStyles(elevation);
142
142
  const contextValue = _react2.default.useMemo(
@@ -2,7 +2,7 @@ import "../chunk-SHBDANQN.js";
2
2
  import {
3
3
  useBorderRadiusStyles,
4
4
  useXUITheme
5
- } from "../chunk-LVNBYERF.js";
5
+ } from "../chunk-RBSA4NH4.js";
6
6
 
7
7
  // src/components/card/card.tsx
8
8
  import React from "react";
@@ -64,9 +64,9 @@ var useCardContainerStyles = (themeColor, isBlurred) => {
64
64
  const safeThemeColor = getSafeThemeColor(themeColor);
65
65
  const colorScheme = theme.colors[safeThemeColor];
66
66
  const isDefaultThemeColor = safeThemeColor === "default";
67
- const defaultBackgroundColor = theme.mode === "dark" ? theme.colors.default.background : "#FFFFFF";
67
+ const defaultBackgroundColor = theme.mode === "dark" ? theme.colors.default.container : "#FFFFFF";
68
68
  return {
69
- backgroundColor: isBlurred ? theme.mode === "dark" ? "rgba(24, 24, 27, 0.82)" : "rgba(255, 255, 255, 0.82)" : isDefaultThemeColor ? defaultBackgroundColor : colorScheme.background,
69
+ backgroundColor: isBlurred ? theme.mode === "dark" ? "rgba(24, 24, 27, 0.82)" : "rgba(255, 255, 255, 0.82)" : isDefaultThemeColor ? defaultBackgroundColor : colorScheme.container,
70
70
  borderColor: withOpacity(colorScheme.main, 0.05)
71
71
  };
72
72
  }, [isBlurred, theme, themeColor]);
@@ -1,6 +1,6 @@
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 _chunkRZJFCDFScjs = require('../chunk-RZJFCDFS.cjs');
3
+ var _chunk7UFBLUMVcjs = require('../chunk-7UFBLUMV.cjs');
4
4
 
5
5
  // src/components/carousel/carousel.tsx
6
6
  var _react = require('react'); var _react2 = _interopRequireDefault(_react);
@@ -253,7 +253,7 @@ function Carousel({
253
253
  const onActiveItemChangeRef = _react.useRef.call(void 0, onActiveItemChange);
254
254
  onActiveItemChangeRef.current = onActiveItemChange;
255
255
  const scrollX = _reactnativereanimated.useSharedValue.call(void 0, 0);
256
- const { borderRadius } = _chunkRZJFCDFScjs.useBorderRadiusStyles.call(void 0, radius);
256
+ const { borderRadius } = _chunk7UFBLUMVcjs.useBorderRadiusStyles.call(void 0, radius);
257
257
  const defaultSpacing = layout === "multi-browse" ? DEFAULT_ITEM_SPACING_MULTI_BROWSE : DEFAULT_ITEM_SPACING;
258
258
  const resolvedSpacing = _nullishCoalesce(itemSpacing, () => ( defaultSpacing));
259
259
  const isFullScreen = layout === "full-screen";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  useBorderRadiusStyles
3
- } from "../chunk-LVNBYERF.js";
3
+ } from "../chunk-RBSA4NH4.js";
4
4
 
5
5
  // src/components/carousel/carousel.tsx
6
6
  import React3, { useState, useRef, useCallback, useEffect } from "react";
@@ -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/checkbox/checkbox.tsx
7
7
  var _react = require('react'); var _react2 = _interopRequireDefault(_react);
@@ -158,7 +158,7 @@ function CheckboxIcon({
158
158
 
159
159
  var _core = require('@xaui/core');
160
160
  function useSizeStyles(size, variant) {
161
- const theme = _chunkRZJFCDFScjs.useXUITheme.call(void 0, );
161
+ const theme = _chunk7UFBLUMVcjs.useXUITheme.call(void 0, );
162
162
  const sizeStyles = _react.useMemo.call(void 0, () => {
163
163
  const sizes = {
164
164
  xs: {
@@ -187,7 +187,7 @@ function useSizeStyles(size, variant) {
187
187
  return sizeStyles;
188
188
  }
189
189
  function useRadiusStyles(radius) {
190
- const theme = _chunkRZJFCDFScjs.useXUITheme.call(void 0, );
190
+ const theme = _chunk7UFBLUMVcjs.useXUITheme.call(void 0, );
191
191
  const radiusStyles = _react.useMemo.call(void 0, () => {
192
192
  const radii = {
193
193
  none: theme.borderRadius.none,
@@ -201,13 +201,13 @@ function useRadiusStyles(radius) {
201
201
  return radiusStyles;
202
202
  }
203
203
  function useCheckmarkColors(themeColor, variant, isActive) {
204
- const theme = _chunkRZJFCDFScjs.useXUITheme.call(void 0, );
204
+ const theme = _chunk7UFBLUMVcjs.useXUITheme.call(void 0, );
205
205
  const safeThemeColor = _core.getSafeThemeColor.call(void 0, themeColor);
206
206
  const colorScheme = theme.colors[safeThemeColor];
207
207
  const checkmarkColors = _react.useMemo.call(void 0, () => {
208
208
  if (variant === "filled") {
209
209
  return {
210
- checked: colorScheme.foreground,
210
+ checked: colorScheme.onMain,
211
211
  unchecked: void 0
212
212
  };
213
213
  }
@@ -219,25 +219,25 @@ function useCheckmarkColors(themeColor, variant, isActive) {
219
219
  }
220
220
  if (themeColor !== "default") {
221
221
  return {
222
- checked: colorScheme.foreground,
223
- unchecked: colorScheme.background
222
+ checked: colorScheme.onMain,
223
+ unchecked: colorScheme.container
224
224
  };
225
225
  }
226
226
  return {
227
227
  checked: theme.colors.foreground,
228
- unchecked: colorScheme.background
228
+ unchecked: colorScheme.container
229
229
  };
230
230
  }, [variant, colorScheme, isActive, themeColor, theme.colors]);
231
231
  return checkmarkColors;
232
232
  }
233
233
  function useVariantStyles(themeColor, variant, isActive) {
234
- const theme = _chunkRZJFCDFScjs.useXUITheme.call(void 0, );
234
+ const theme = _chunk7UFBLUMVcjs.useXUITheme.call(void 0, );
235
235
  const safeThemeColor = _core.getSafeThemeColor.call(void 0, themeColor);
236
236
  const colorScheme = theme.colors[safeThemeColor];
237
237
  const variantStyles = _react.useMemo.call(void 0, () => {
238
238
  if (variant === "filled") {
239
239
  return {
240
- backgroundColor: "transparent",
240
+ backgroundColor: isActive ? colorScheme.main : "transparent",
241
241
  borderWidth: isActive ? 0 : theme.borderWidth.md,
242
242
  borderColor: isActive ? "transparent" : colorScheme.main
243
243
  };
@@ -318,7 +318,7 @@ var Checkbox = ({
318
318
  style,
319
319
  onValueChange
320
320
  }) => {
321
- const theme = _chunkRZJFCDFScjs.useXUITheme.call(void 0, );
321
+ const theme = _chunk7UFBLUMVcjs.useXUITheme.call(void 0, );
322
322
  const colorScheme = theme.colors[_core.getSafeThemeColor.call(void 0, themeColor)];
323
323
  const isControlled = typeof isCheckedProp === "boolean";
324
324
  const [internalChecked, setInternalChecked] = _react.useState.call(void 0, _nullishCoalesce(isCheckedProp, () => ( false)));
@@ -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/checkbox/checkbox.tsx
7
7
  import React2, { useEffect as useEffect2, useRef as useRef2, useState } from "react";
@@ -207,7 +207,7 @@ function useCheckmarkColors(themeColor, variant, isActive) {
207
207
  const checkmarkColors = useMemo(() => {
208
208
  if (variant === "filled") {
209
209
  return {
210
- checked: colorScheme.foreground,
210
+ checked: colorScheme.onMain,
211
211
  unchecked: void 0
212
212
  };
213
213
  }
@@ -219,13 +219,13 @@ function useCheckmarkColors(themeColor, variant, isActive) {
219
219
  }
220
220
  if (themeColor !== "default") {
221
221
  return {
222
- checked: colorScheme.foreground,
223
- unchecked: colorScheme.background
222
+ checked: colorScheme.onMain,
223
+ unchecked: colorScheme.container
224
224
  };
225
225
  }
226
226
  return {
227
227
  checked: theme.colors.foreground,
228
- unchecked: colorScheme.background
228
+ unchecked: colorScheme.container
229
229
  };
230
230
  }, [variant, colorScheme, isActive, themeColor, theme.colors]);
231
231
  return checkmarkColors;
@@ -237,7 +237,7 @@ function useVariantStyles(themeColor, variant, isActive) {
237
237
  const variantStyles = useMemo(() => {
238
238
  if (variant === "filled") {
239
239
  return {
240
- backgroundColor: "transparent",
240
+ backgroundColor: isActive ? colorScheme.main : "transparent",
241
241
  borderWidth: isActive ? 0 : theme.borderWidth.md,
242
242
  borderColor: isActive ? "transparent" : colorScheme.main
243
243
  };
@@ -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/chip/chip.tsx
7
7
  var _react = require('react'); var _react2 = _interopRequireDefault(_react);
@@ -78,7 +78,7 @@ function useChipCloseSize(size) {
78
78
  return _react.useMemo.call(void 0, () => closeSizeMap[size], [size]);
79
79
  }
80
80
  function useChipRadiusStyles(radius, height) {
81
- const theme = _chunkRZJFCDFScjs.useXUITheme.call(void 0, );
81
+ const theme = _chunk7UFBLUMVcjs.useXUITheme.call(void 0, );
82
82
  return _react.useMemo.call(void 0, () => {
83
83
  if (radius === "full") {
84
84
  return { borderRadius: height / 2 };
@@ -87,7 +87,7 @@ function useChipRadiusStyles(radius, height) {
87
87
  }, [height, radius, theme.borderRadius]);
88
88
  }
89
89
  function useChipVariantStyles(themeColor, variant) {
90
- const theme = _chunkRZJFCDFScjs.useXUITheme.call(void 0, );
90
+ const theme = _chunk7UFBLUMVcjs.useXUITheme.call(void 0, );
91
91
  const safeColor = _core.getSafeThemeColor.call(void 0, themeColor);
92
92
  const colorScheme = theme.colors[safeColor];
93
93
  return _react.useMemo.call(void 0, () => {
@@ -106,33 +106,33 @@ function useChipVariantStyles(themeColor, variant) {
106
106
  };
107
107
  case "flat":
108
108
  return {
109
- backgroundColor: colorScheme.background,
110
- color: colorScheme.main
109
+ backgroundColor: colorScheme.container,
110
+ color: colorScheme.onContainer
111
111
  };
112
112
  case "faded":
113
113
  return {
114
- backgroundColor: _core.withOpacity.call(void 0, colorScheme.background, 0.7),
115
- color: colorScheme.main,
114
+ backgroundColor: _core.withOpacity.call(void 0, colorScheme.container, 0.7),
115
+ color: colorScheme.onContainer,
116
116
  borderWidth: 1,
117
117
  borderColor: _core.withOpacity.call(void 0, colorScheme.main, 0.3)
118
118
  };
119
119
  case "shadow":
120
120
  return {
121
121
  backgroundColor: colorScheme.main,
122
- color: colorScheme.foreground,
122
+ color: colorScheme.onMain,
123
123
  shadow: theme.shadows.sm
124
124
  };
125
125
  case "dot":
126
126
  return {
127
- backgroundColor: colorScheme.background,
128
- color: colorScheme.main,
127
+ backgroundColor: colorScheme.container,
128
+ color: colorScheme.onContainer,
129
129
  dotColor: colorScheme.main
130
130
  };
131
131
  case "solid":
132
132
  default:
133
133
  return {
134
134
  backgroundColor: colorScheme.main,
135
- color: colorScheme.foreground
135
+ color: colorScheme.onMain
136
136
  };
137
137
  }
138
138
  }, [colorScheme, theme, variant]);
@@ -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/chip/chip.tsx
7
7
  import React from "react";
@@ -106,33 +106,33 @@ function useChipVariantStyles(themeColor, variant) {
106
106
  };
107
107
  case "flat":
108
108
  return {
109
- backgroundColor: colorScheme.background,
110
- color: colorScheme.main
109
+ backgroundColor: colorScheme.container,
110
+ color: colorScheme.onContainer
111
111
  };
112
112
  case "faded":
113
113
  return {
114
- backgroundColor: withOpacity(colorScheme.background, 0.7),
115
- color: colorScheme.main,
114
+ backgroundColor: withOpacity(colorScheme.container, 0.7),
115
+ color: colorScheme.onContainer,
116
116
  borderWidth: 1,
117
117
  borderColor: withOpacity(colorScheme.main, 0.3)
118
118
  };
119
119
  case "shadow":
120
120
  return {
121
121
  backgroundColor: colorScheme.main,
122
- color: colorScheme.foreground,
122
+ color: colorScheme.onMain,
123
123
  shadow: theme.shadows.sm
124
124
  };
125
125
  case "dot":
126
126
  return {
127
- backgroundColor: colorScheme.background,
128
- color: colorScheme.main,
127
+ backgroundColor: colorScheme.container,
128
+ color: colorScheme.onContainer,
129
129
  dotColor: colorScheme.main
130
130
  };
131
131
  case "solid":
132
132
  default:
133
133
  return {
134
134
  backgroundColor: colorScheme.main,
135
- color: colorScheme.foreground
135
+ color: colorScheme.onMain
136
136
  };
137
137
  }
138
138
  }, [colorScheme, theme, variant]);
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  Portal,
3
3
  useXUITheme
4
- } from "./chunk-LVNBYERF.js";
4
+ } from "./chunk-RBSA4NH4.js";
5
5
 
6
6
  // src/components/bottom-sheet/bottom-sheet.tsx
7
7
  import React from "react";
@@ -238,7 +238,7 @@ var useBottomSheetStyles = (themeColor, radius) => {
238
238
  const colorScheme = theme.colors[safeThemeColor];
239
239
  const sheetStyles = useMemo(
240
240
  () => ({
241
- backgroundColor: colorScheme.background ?? theme.colors.background ?? "#ffffff",
241
+ backgroundColor: colorScheme.container ?? theme.colors.background ?? "#ffffff",
242
242
  borderTopLeftRadius: theme.borderRadius[radius],
243
243
  borderTopRightRadius: theme.borderRadius[radius]
244
244
  }),
@@ -1,4 +1,4 @@
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(); } }// src/core/portal/portal.tsx
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; }// src/core/portal/portal.tsx
2
2
  var _react = require('react'); var _react2 = _interopRequireDefault(_react);
3
3
 
4
4
  // src/core/portal/portal-context.ts
@@ -56,41 +56,35 @@ var PortalHost = ({ children }) => {
56
56
  var _theme = require('@xaui/core/theme');
57
57
  var _palette = require('@xaui/core/palette');
58
58
  var XUIThemeContext = _react.createContext.call(void 0, null);
59
- function XUIProvider({
60
- children,
61
- theme: lightTheme,
62
- darkTheme
63
- }) {
59
+ function XUIProvider({ children, theme }) {
64
60
  const colorScheme = _nullishCoalesce(_reactnative.useColorScheme.call(void 0, ), () => ( "light"));
65
- const theme = _react2.default.useMemo(() => {
66
- if (!darkTheme && !lightTheme) return _theme.defaultTheme;
67
- const activeTheme = colorScheme === "dark" && darkTheme ? darkTheme : lightTheme;
68
- const mode = colorScheme === "dark" && darkTheme ? "dark" : "light";
69
- if (!activeTheme) return _theme.defaultTheme;
61
+ const appTheme = _react2.default.useMemo(() => {
62
+ const isDarkMode = colorScheme === "dark";
63
+ if (!theme) return isDarkMode ? _theme.defaultDarkTheme : _theme.defaultTheme;
70
64
  return {
71
65
  ..._theme.defaultTheme,
72
- ...activeTheme,
73
- mode,
66
+ ...theme,
67
+ mode: colorScheme,
74
68
  colors: {
75
69
  ..._theme.defaultTheme.colors,
76
- ...activeTheme.colors
70
+ ..._optionalChain([theme, 'optionalAccess', _ => _.colors])
77
71
  },
78
72
  fontFamilies: {
79
73
  ..._theme.defaultTheme.fontFamilies,
80
- ...activeTheme.fontFamilies
74
+ ..._optionalChain([theme, 'optionalAccess', _2 => _2.fontFamilies])
81
75
  },
82
76
  fontSizes: {
83
77
  ..._theme.defaultTheme.fontSizes,
84
- ...activeTheme.fontSizes
78
+ ..._optionalChain([theme, 'optionalAccess', _3 => _3.fontSizes])
85
79
  },
86
80
  componentSizes: {
87
81
  ..._theme.defaultTheme.componentSizes,
88
- ...activeTheme.componentSizes
82
+ ..._optionalChain([theme, 'optionalAccess', _4 => _4.componentSizes])
89
83
  },
90
84
  palette: _palette.colors
91
85
  };
92
- }, [lightTheme, darkTheme, colorScheme]);
93
- return /* @__PURE__ */ _react2.default.createElement(XUIThemeContext.Provider, { value: theme }, /* @__PURE__ */ _react2.default.createElement(PortalHost, null, children));
86
+ }, [colorScheme, theme]);
87
+ return /* @__PURE__ */ _react2.default.createElement(XUIThemeContext.Provider, { value: appTheme }, /* @__PURE__ */ _react2.default.createElement(PortalHost, null, children));
94
88
  }
95
89
 
96
90
  // src/core/theme-hooks.ts
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  useXUITheme
3
- } from "./chunk-LVNBYERF.js";
3
+ } from "./chunk-RBSA4NH4.js";
4
4
 
5
5
  // src/components/input-trigger/input-trigger.tsx
6
6
  import React from "react";
@@ -63,6 +63,7 @@ var useInputTriggerVariantStyles = ({
63
63
  const safeThemeColor = getSafeThemeColor(themeColor);
64
64
  const colorScheme = theme.colors[safeThemeColor];
65
65
  return useMemo(() => {
66
+ const isDark = theme.mode === "dark";
66
67
  const neutralBorder = withOpacity(theme.colors.foreground, 0.1);
67
68
  const textColor = isDisabled ? withOpacity(theme.colors.foreground, 0.55) : theme.colors.foreground;
68
69
  const placeholderColor = withOpacity(theme.colors.foreground, 0.45);
@@ -96,10 +97,9 @@ var useInputTriggerVariantStyles = ({
96
97
  helperColor
97
98
  };
98
99
  }
99
- if (variant === "faded") {
100
+ if (variant === "light") {
100
101
  return {
101
102
  container: {
102
- backgroundColor: withOpacity(colorScheme.background, 0.68),
103
103
  borderColor: isInvalid ? theme.colors.danger.main : "transparent",
104
104
  borderWidth: isInvalid ? theme.borderWidth.md : 0
105
105
  },
@@ -112,7 +112,7 @@ var useInputTriggerVariantStyles = ({
112
112
  }
113
113
  return {
114
114
  container: {
115
- backgroundColor: colorScheme.background,
115
+ backgroundColor: withOpacity(colorScheme.container, isDark ? 0.25 : 0.4),
116
116
  borderColor: isInvalid ? withPaletteNumber(theme.colors.danger.main, 500) : "transparent",
117
117
  borderWidth: isInvalid ? theme.borderWidth.md : 0
118
118
  },
@@ -145,6 +145,26 @@ var styles = StyleSheet.create({
145
145
  flexDirection: "row",
146
146
  alignItems: "center"
147
147
  },
148
+ fileTrigger: {
149
+ alignItems: "center",
150
+ justifyContent: "center"
151
+ },
152
+ filePlusButton: {
153
+ alignItems: "center",
154
+ justifyContent: "center"
155
+ },
156
+ fileContent: {
157
+ textAlign: "center"
158
+ },
159
+ fileCustomContent: {
160
+ alignItems: "center"
161
+ },
162
+ fileSelectedContent: {
163
+ width: "100%",
164
+ alignItems: "center",
165
+ justifyContent: "center",
166
+ overflow: "hidden"
167
+ },
148
168
  underlinedWrapper: {
149
169
  borderBottomLeftRadius: 0,
150
170
  borderBottomRightRadius: 0,
@@ -177,7 +197,7 @@ var InputTrigger = ({
177
197
  startContent,
178
198
  endContent,
179
199
  themeColor = "primary",
180
- variant = "flat",
200
+ variant = "colored",
181
201
  size = "md",
182
202
  radius = "md",
183
203
  isDisabled = false,
@@ -309,5 +329,9 @@ var InputTrigger = ({
309
329
  };
310
330
 
311
331
  export {
332
+ useInputTriggerSizeStyles,
333
+ useInputTriggerRadiusStyles,
334
+ useInputTriggerVariantStyles,
335
+ styles,
312
336
  InputTrigger
313
337
  };
@@ -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; }
2
2
 
3
3
 
4
- var _chunkRZJFCDFScjs = require('./chunk-RZJFCDFS.cjs');
4
+ var _chunk7UFBLUMVcjs = require('./chunk-7UFBLUMV.cjs');
5
5
 
6
6
  // src/components/bottom-sheet/bottom-sheet.tsx
7
7
  var _react = require('react'); var _react2 = _interopRequireDefault(_react);
@@ -233,12 +233,12 @@ var useBottomSheetAnimation = ({
233
233
  };
234
234
  };
235
235
  var useBottomSheetStyles = (themeColor, radius) => {
236
- const theme = _chunkRZJFCDFScjs.useXUITheme.call(void 0, );
236
+ const theme = _chunk7UFBLUMVcjs.useXUITheme.call(void 0, );
237
237
  const safeThemeColor = _core.getSafeThemeColor.call(void 0, themeColor);
238
238
  const colorScheme = theme.colors[safeThemeColor];
239
239
  const sheetStyles = _react.useMemo.call(void 0,
240
240
  () => ({
241
- backgroundColor: _nullishCoalesce(_nullishCoalesce(colorScheme.background, () => ( theme.colors.background)), () => ( "#ffffff")),
241
+ backgroundColor: _nullishCoalesce(_nullishCoalesce(colorScheme.container, () => ( theme.colors.background)), () => ( "#ffffff")),
242
242
  borderTopLeftRadius: theme.borderRadius[radius],
243
243
  borderTopRightRadius: theme.borderRadius[radius]
244
244
  }),
@@ -332,7 +332,7 @@ var BottomSheet = ({
332
332
  close();
333
333
  }
334
334
  };
335
- return /* @__PURE__ */ _react2.default.createElement(_chunkRZJFCDFScjs.Portal, null, showBackdrop && /* @__PURE__ */ _react2.default.createElement(_reactnative.Animated.View, { style: [styles.backdrop, { opacity: backdropOpacity }] }, /* @__PURE__ */ _react2.default.createElement(_reactnative.Pressable, { style: styles.backdrop, onPress: handleBackdropPress })), /* @__PURE__ */ _react2.default.createElement(
335
+ return /* @__PURE__ */ _react2.default.createElement(_chunk7UFBLUMVcjs.Portal, null, showBackdrop && /* @__PURE__ */ _react2.default.createElement(_reactnative.Animated.View, { style: [styles.backdrop, { opacity: backdropOpacity }] }, /* @__PURE__ */ _react2.default.createElement(_reactnative.Pressable, { style: styles.backdrop, onPress: handleBackdropPress })), /* @__PURE__ */ _react2.default.createElement(
336
336
  _reactnative.Animated.View,
337
337
  {
338
338
  style: [
@@ -1,6 +1,6 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
2
2
 
3
- var _chunkRZJFCDFScjs = require('./chunk-RZJFCDFS.cjs');
3
+ var _chunk7UFBLUMVcjs = require('./chunk-7UFBLUMV.cjs');
4
4
 
5
5
  // src/components/divider/divider.tsx
6
6
  var _react = require('react'); var _react2 = _interopRequireDefault(_react);
@@ -25,7 +25,7 @@ var styles = _reactnative.StyleSheet.create({
25
25
 
26
26
  var _core = require('@xaui/core');
27
27
  var useDividerColor = (themeColor, customColor) => {
28
- const theme = _chunkRZJFCDFScjs.useXUITheme.call(void 0, );
28
+ const theme = _chunk7UFBLUMVcjs.useXUITheme.call(void 0, );
29
29
  const dividerColor = _react.useMemo.call(void 0, () => {
30
30
  if (customColor) {
31
31
  return customColor;
@@ -53,44 +53,38 @@ var PortalHost = ({ children }) => {
53
53
  // src/core/theme-context.tsx
54
54
  import React3, { createContext as createContext2 } from "react";
55
55
  import { useColorScheme } from "react-native";
56
- import { defaultTheme } from "@xaui/core/theme";
56
+ import { defaultDarkTheme, defaultTheme } from "@xaui/core/theme";
57
57
  import { colors } from "@xaui/core/palette";
58
58
  var XUIThemeContext = createContext2(null);
59
- function XUIProvider({
60
- children,
61
- theme: lightTheme,
62
- darkTheme
63
- }) {
59
+ function XUIProvider({ children, theme }) {
64
60
  const colorScheme = useColorScheme() ?? "light";
65
- const theme = React3.useMemo(() => {
66
- if (!darkTheme && !lightTheme) return defaultTheme;
67
- const activeTheme = colorScheme === "dark" && darkTheme ? darkTheme : lightTheme;
68
- const mode = colorScheme === "dark" && darkTheme ? "dark" : "light";
69
- if (!activeTheme) return defaultTheme;
61
+ const appTheme = React3.useMemo(() => {
62
+ const isDarkMode = colorScheme === "dark";
63
+ if (!theme) return isDarkMode ? defaultDarkTheme : defaultTheme;
70
64
  return {
71
65
  ...defaultTheme,
72
- ...activeTheme,
73
- mode,
66
+ ...theme,
67
+ mode: colorScheme,
74
68
  colors: {
75
69
  ...defaultTheme.colors,
76
- ...activeTheme.colors
70
+ ...theme?.colors
77
71
  },
78
72
  fontFamilies: {
79
73
  ...defaultTheme.fontFamilies,
80
- ...activeTheme.fontFamilies
74
+ ...theme?.fontFamilies
81
75
  },
82
76
  fontSizes: {
83
77
  ...defaultTheme.fontSizes,
84
- ...activeTheme.fontSizes
78
+ ...theme?.fontSizes
85
79
  },
86
80
  componentSizes: {
87
81
  ...defaultTheme.componentSizes,
88
- ...activeTheme.componentSizes
82
+ ...theme?.componentSizes
89
83
  },
90
84
  palette: colors
91
85
  };
92
- }, [lightTheme, darkTheme, colorScheme]);
93
- return /* @__PURE__ */ React3.createElement(XUIThemeContext.Provider, { value: theme }, /* @__PURE__ */ React3.createElement(PortalHost, null, children));
86
+ }, [colorScheme, theme]);
87
+ return /* @__PURE__ */ React3.createElement(XUIThemeContext.Provider, { value: appTheme }, /* @__PURE__ */ React3.createElement(PortalHost, null, children));
94
88
  }
95
89
 
96
90
  // src/core/theme-hooks.ts