@xaui/native 0.1.5 → 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 (128) 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 +3 -3
  125. package/dist/typography/index.js +1 -1
  126. package/dist/view/index.cjs +4 -4
  127. package/dist/view/index.js +2 -2
  128. package/package.json +8 -3
@@ -2,7 +2,7 @@ import React, { ReactNode } from 'react';
2
2
  import { ViewStyle, TextStyle } from 'react-native';
3
3
  import { T as ThemeColor, S as Size, R as Radius } from '../index-BOw6tbkc.cjs';
4
4
 
5
- type AutocompleteVariant = 'outlined' | 'flat' | 'light' | 'faded' | 'underlined';
5
+ type AutocompleteVariant = 'bordered' | 'colored' | 'light' | 'underlined';
6
6
  type AutocompleteLabelPlacement = 'inside' | 'outside' | 'outside-left' | 'outside-top';
7
7
  type AutocompleteMenuTrigger = 'focus' | 'input' | 'manual';
8
8
  type AutocompleteCustomAppearance = {
@@ -2,7 +2,7 @@ import React, { ReactNode } from 'react';
2
2
  import { ViewStyle, TextStyle } from 'react-native';
3
3
  import { T as ThemeColor, S as Size, R as Radius } from '../index-BOw6tbkc.js';
4
4
 
5
- type AutocompleteVariant = 'outlined' | 'flat' | 'light' | 'faded' | 'underlined';
5
+ type AutocompleteVariant = 'bordered' | 'colored' | 'light' | 'underlined';
6
6
  type AutocompleteLabelPlacement = 'inside' | 'outside' | 'outside-left' | 'outside-top';
7
7
  type AutocompleteMenuTrigger = 'focus' | 'input' | 'manual';
8
8
  type AutocompleteCustomAppearance = {
@@ -5,7 +5,7 @@ import "../chunk-SHBDANQN.js";
5
5
  import {
6
6
  Portal,
7
7
  useXUITheme
8
- } from "../chunk-LVNBYERF.js";
8
+ } from "../chunk-RBSA4NH4.js";
9
9
 
10
10
  // src/components/autocomplete/autocomplete.tsx
11
11
  import React4, { useCallback as useCallback3, useMemo as useMemo3, useRef as useRef3, useState as useState3 } from "react";
@@ -21,7 +21,7 @@ var AutocompleteContext = createContext({
21
21
 
22
22
  // src/components/autocomplete/autocomplete.hook.ts
23
23
  import { useMemo } from "react";
24
- import { getSafeThemeColor } from "@xaui/core";
24
+ import { getSafeThemeColor, withOpacity } from "@xaui/core";
25
25
  import { colors } from "@xaui/core/palette";
26
26
  var useAutocompleteColorScheme = (themeColor) => {
27
27
  const theme = useXUITheme();
@@ -93,28 +93,23 @@ var useAutocompleteVariantStyles = (themeColor, variant, isInvalid) => {
93
93
  const { theme, colorScheme } = useAutocompleteColorScheme(themeColor);
94
94
  return useMemo(() => {
95
95
  let borderColor = isInvalid ? theme.colors.danger.main : colorScheme.main;
96
- if ((variant === "outlined" || variant === "faded") && themeColor === "default") {
96
+ if (variant === "bordered" && themeColor === "default") {
97
97
  borderColor = colors.gray[300];
98
98
  }
99
99
  const styles4 = {
100
- outlined: {
100
+ bordered: {
101
101
  backgroundColor: "transparent",
102
102
  borderWidth: theme.borderWidth.md,
103
103
  borderColor
104
104
  },
105
- flat: {
106
- backgroundColor: colorScheme.background,
105
+ colored: {
106
+ backgroundColor: withOpacity(colorScheme.container, 0.5),
107
107
  borderWidth: 0
108
108
  },
109
109
  light: {
110
110
  backgroundColor: "transparent",
111
111
  borderWidth: 0
112
112
  },
113
- faded: {
114
- backgroundColor: `${colorScheme.background}90`,
115
- borderWidth: theme.borderWidth.md,
116
- borderColor
117
- },
118
113
  underlined: {
119
114
  backgroundColor: "transparent",
120
115
  borderBottomWidth: theme.borderWidth.md,
@@ -420,7 +415,7 @@ var styles2 = StyleSheet2.create({
420
415
  });
421
416
 
422
417
  // src/components/dialogs/autocomplete-dialog/autocomplete-dialog-header.tsx
423
- import { withOpacity } from "@xaui/core";
418
+ import { withOpacity as withOpacity2 } from "@xaui/core";
424
419
  var AutocompleteDialogHeader = ({
425
420
  title,
426
421
  inputValue,
@@ -451,11 +446,11 @@ var AutocompleteDialogHeader = ({
451
446
  value: inputValue,
452
447
  onChangeText: onInputChange,
453
448
  placeholder,
454
- placeholderTextColor: withOpacity(theme.colors.foreground, 0.5),
449
+ placeholderTextColor: withOpacity2(theme.colors.foreground, 0.5),
455
450
  style: [
456
451
  styles2.input,
457
452
  {
458
- backgroundColor: theme.colors.default.background,
453
+ backgroundColor: theme.colors.default.container,
459
454
  color: theme.colors.foreground
460
455
  },
461
456
  inputTextStyle
@@ -562,7 +557,7 @@ var AutocompleteDialog = ({
562
557
  [children]
563
558
  );
564
559
  const checkmarkColor = theme.colors[themeColor].main;
565
- const checkmarkBackgroundColor = theme.colors[themeColor].background;
560
+ const checkmarkBackgroundColor = theme.colors[themeColor].container;
566
561
  useAutocompleteDialogAnimation({ visible, fadeAnim, slideAnim, scaleAnim });
567
562
  useEffect3(() => {
568
563
  if (!visible) return;
@@ -748,7 +743,7 @@ var AutocompleteTrigger = ({
748
743
  var defaultPlaceholder = "Search...";
749
744
  var Autocomplete = ({
750
745
  children,
751
- variant = "flat",
746
+ variant = "colored",
752
747
  themeColor = "default",
753
748
  size = "md",
754
749
  radius = "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/avatar/avatar.tsx
7
7
  var _react = require('react'); var _react2 = _interopRequireDefault(_react);
@@ -50,7 +50,7 @@ function resolveAvatarSize(size) {
50
50
  return sizeMap[size];
51
51
  }
52
52
  function useAvatarSizeStyles(size) {
53
- const theme = _chunkRZJFCDFScjs.useXUITheme.call(void 0, );
53
+ const theme = _chunk7UFBLUMVcjs.useXUITheme.call(void 0, );
54
54
  const resolvedSize = _react.useMemo.call(void 0, () => resolveAvatarSize(size), [size]);
55
55
  const fontSize = _react.useMemo.call(void 0, () => {
56
56
  if (typeof size === "number") {
@@ -64,7 +64,7 @@ function useAvatarSizeStyles(size) {
64
64
  };
65
65
  }
66
66
  function useAvatarRadiusStyles(radius, size) {
67
- const theme = _chunkRZJFCDFScjs.useXUITheme.call(void 0, );
67
+ const theme = _chunk7UFBLUMVcjs.useXUITheme.call(void 0, );
68
68
  return _react.useMemo.call(void 0, () => {
69
69
  if (radius === "full") {
70
70
  return { borderRadius: size / 2 };
@@ -80,21 +80,21 @@ function useAvatarRadiusStyles(radius, size) {
80
80
  }, [radius, size, theme]);
81
81
  }
82
82
  function useAvatarColors(themeColor, isDisabled) {
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 backgroundColor = _react.useMemo.call(void 0, () => {
87
87
  if (isDisabled) {
88
88
  return theme.colors.background;
89
89
  }
90
- return colorScheme.background;
91
- }, [colorScheme.background, isDisabled, theme.colors.background]);
90
+ return colorScheme.container;
91
+ }, [colorScheme.container, isDisabled, theme.colors.background]);
92
92
  const textColor = _react.useMemo.call(void 0, () => {
93
93
  if (safeThemeColor === "default") {
94
94
  return theme.colors.foreground;
95
95
  }
96
- return colorScheme.main;
97
- }, [safeThemeColor, colorScheme.main, theme.colors.foreground]);
96
+ return colorScheme.onContainer;
97
+ }, [safeThemeColor, colorScheme.onContainer, theme.colors.foreground]);
98
98
  return {
99
99
  backgroundColor,
100
100
  textColor,
@@ -199,7 +199,7 @@ var AvatarGroup = ({
199
199
  renderCount,
200
200
  customAppearance
201
201
  }) => {
202
- const theme = _chunkRZJFCDFScjs.useXUITheme.call(void 0, );
202
+ const theme = _chunk7UFBLUMVcjs.useXUITheme.call(void 0, );
203
203
  const resolvedSize = resolveAvatarSize(size);
204
204
  const spacing = theme.spacing.xs;
205
205
  const overlap = Math.round(resolvedSize * 0.28);
@@ -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/avatar/avatar.tsx
7
7
  import React from "react";
@@ -87,14 +87,14 @@ function useAvatarColors(themeColor, isDisabled) {
87
87
  if (isDisabled) {
88
88
  return theme.colors.background;
89
89
  }
90
- return colorScheme.background;
91
- }, [colorScheme.background, isDisabled, theme.colors.background]);
90
+ return colorScheme.container;
91
+ }, [colorScheme.container, isDisabled, theme.colors.background]);
92
92
  const textColor = useMemo(() => {
93
93
  if (safeThemeColor === "default") {
94
94
  return theme.colors.foreground;
95
95
  }
96
- return colorScheme.main;
97
- }, [safeThemeColor, colorScheme.main, theme.colors.foreground]);
96
+ return colorScheme.onContainer;
97
+ }, [safeThemeColor, colorScheme.onContainer, theme.colors.foreground]);
98
98
  return {
99
99
  backgroundColor,
100
100
  textColor,
@@ -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 _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/badge/badge.tsx
7
7
  var _react = require('react'); var _react2 = _interopRequireDefault(_react);
@@ -41,7 +41,7 @@ var fontSizeMap = {
41
41
  lg: 12
42
42
  };
43
43
  function useBadgeSizeStyles(size, isDot, isOneChar) {
44
- const theme = _chunkRZJFCDFScjs.useXUITheme.call(void 0, );
44
+ const theme = _chunk7UFBLUMVcjs.useXUITheme.call(void 0, );
45
45
  return _react.useMemo.call(void 0, () => {
46
46
  const { height, minWidth, dot } = sizeMap[size];
47
47
  const fontSize = fontSizeMap[size];
@@ -71,38 +71,37 @@ function useBadgeSizeStyles(size, isDot, isOneChar) {
71
71
  }, [isDot, isOneChar, size, theme]);
72
72
  }
73
73
  function useBadgeVariantStyles(themeColor, variant) {
74
- const theme = _chunkRZJFCDFScjs.useXUITheme.call(void 0, );
74
+ const theme = _chunk7UFBLUMVcjs.useXUITheme.call(void 0, );
75
75
  const safeThemeColor = _core.getSafeThemeColor.call(void 0, themeColor);
76
76
  const colorScheme = theme.colors[safeThemeColor];
77
77
  return _react.useMemo.call(void 0, () => {
78
- const isDark = theme.mode === "dark";
79
78
  if (variant === "flat") {
80
79
  return {
81
- backgroundColor: isDark ? _core.withOpacity.call(void 0, colorScheme.background, 0.5) : colorScheme.background,
82
- color: colorScheme.main
80
+ backgroundColor: colorScheme.container,
81
+ color: colorScheme.onContainer
83
82
  };
84
83
  }
85
84
  if (variant === "faded") {
86
85
  return {
87
- backgroundColor: isDark ? _core.withOpacity.call(void 0, colorScheme.background, 0.35) : _core.withOpacity.call(void 0, colorScheme.background, 0.7),
88
- color: colorScheme.main
86
+ backgroundColor: _core.withOpacity.call(void 0, colorScheme.container, 0.7),
87
+ color: colorScheme.onContainer
89
88
  };
90
89
  }
91
90
  if (variant === "shadow") {
92
91
  return {
93
- backgroundColor: isDark ? colorScheme.background : colorScheme.main,
94
- color: isDark ? colorScheme.main : colorScheme.foreground,
92
+ backgroundColor: colorScheme.main,
93
+ color: colorScheme.onMain,
95
94
  shadow: theme.shadows.sm
96
95
  };
97
96
  }
98
97
  return {
99
- backgroundColor: isDark ? colorScheme.background : colorScheme.main,
100
- color: isDark ? colorScheme.main : colorScheme.foreground
98
+ backgroundColor: colorScheme.main,
99
+ color: colorScheme.onMain
101
100
  };
102
101
  }, [colorScheme, theme, variant]);
103
102
  }
104
103
  function useBadgeRadiusStyles(radius, height) {
105
- const theme = _chunkRZJFCDFScjs.useXUITheme.call(void 0, );
104
+ const theme = _chunk7UFBLUMVcjs.useXUITheme.call(void 0, );
106
105
  return _react.useMemo.call(void 0, () => {
107
106
  if (radius === "full") {
108
107
  return { borderRadius: height / 2 };
@@ -148,7 +147,7 @@ var Badge = ({
148
147
  if (!shouldRender && !children) {
149
148
  return null;
150
149
  }
151
- const forceOneChar = isOneChar || radius === "full";
150
+ const forceOneChar = isOneChar;
152
151
  const sizeStyles = useBadgeSizeStyles(size, isDot, forceOneChar);
153
152
  const variantStyles = useBadgeVariantStyles(themeColor, variant);
154
153
  const radiusStyles = useBadgeRadiusStyles(radius, sizeStyles.height);
@@ -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/badge/badge.tsx
7
7
  import React from "react";
@@ -75,29 +75,28 @@ function useBadgeVariantStyles(themeColor, variant) {
75
75
  const safeThemeColor = getSafeThemeColor(themeColor);
76
76
  const colorScheme = theme.colors[safeThemeColor];
77
77
  return useMemo(() => {
78
- const isDark = theme.mode === "dark";
79
78
  if (variant === "flat") {
80
79
  return {
81
- backgroundColor: isDark ? withOpacity(colorScheme.background, 0.5) : colorScheme.background,
82
- color: colorScheme.main
80
+ backgroundColor: colorScheme.container,
81
+ color: colorScheme.onContainer
83
82
  };
84
83
  }
85
84
  if (variant === "faded") {
86
85
  return {
87
- backgroundColor: isDark ? withOpacity(colorScheme.background, 0.35) : withOpacity(colorScheme.background, 0.7),
88
- color: colorScheme.main
86
+ backgroundColor: withOpacity(colorScheme.container, 0.7),
87
+ color: colorScheme.onContainer
89
88
  };
90
89
  }
91
90
  if (variant === "shadow") {
92
91
  return {
93
- backgroundColor: isDark ? colorScheme.background : colorScheme.main,
94
- color: isDark ? colorScheme.main : colorScheme.foreground,
92
+ backgroundColor: colorScheme.main,
93
+ color: colorScheme.onMain,
95
94
  shadow: theme.shadows.sm
96
95
  };
97
96
  }
98
97
  return {
99
- backgroundColor: isDark ? colorScheme.background : colorScheme.main,
100
- color: isDark ? colorScheme.main : colorScheme.foreground
98
+ backgroundColor: colorScheme.main,
99
+ color: colorScheme.onMain
101
100
  };
102
101
  }, [colorScheme, theme, variant]);
103
102
  }
@@ -148,7 +147,7 @@ var Badge = ({
148
147
  if (!shouldRender && !children) {
149
148
  return null;
150
149
  }
151
- const forceOneChar = isOneChar || radius === "full";
150
+ const forceOneChar = isOneChar;
152
151
  const sizeStyles = useBadgeSizeStyles(size, isDot, forceOneChar);
153
152
  const variantStyles = useBadgeVariantStyles(themeColor, variant);
154
153
  const radiusStyles = useBadgeRadiusStyles(radius, sizeStyles.height);
@@ -1,9 +1,9 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../chunk-EUQDGTST.cjs');
2
2
 
3
3
 
4
- var _chunk3XWF77Y3cjs = require('../chunk-3XWF77Y3.cjs');
4
+ var _chunkBYWUAPC4cjs = require('../chunk-BYWUAPC4.cjs');
5
5
  require('../chunk-56RPWZD2.cjs');
6
- require('../chunk-RZJFCDFS.cjs');
6
+ require('../chunk-7UFBLUMV.cjs');
7
7
 
8
8
 
9
- exports.BottomSheet = _chunk3XWF77Y3cjs.BottomSheet;
9
+ exports.BottomSheet = _chunkBYWUAPC4cjs.BottomSheet;
@@ -1,9 +1,9 @@
1
1
  import "../chunk-DECMUMCI.js";
2
2
  import {
3
3
  BottomSheet
4
- } from "../chunk-K24VDBNN.js";
4
+ } from "../chunk-4JFWQ5XT.js";
5
5
  import "../chunk-SHBDANQN.js";
6
- import "../chunk-LVNBYERF.js";
6
+ import "../chunk-RBSA4NH4.js";
7
7
  export {
8
8
  BottomSheet
9
9
  };
@@ -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/bottom-tab-bar/bottom-tab-bar.tsx
7
7
  var _react = require('react'); var _react2 = _interopRequireDefault(_react);
@@ -49,7 +49,7 @@ var useBottomTabBarSizeStyles = (size) => {
49
49
  return _react.useMemo.call(void 0, () => sizeMap[size], [size]);
50
50
  };
51
51
  var useBottomTabBarColors = (themeColor, activeColor, inactiveColor, indicatorColor) => {
52
- const theme = _chunkRZJFCDFScjs.useXUITheme.call(void 0, );
52
+ const theme = _chunk7UFBLUMVcjs.useXUITheme.call(void 0, );
53
53
  const colorScheme = theme.colors[_core.getSafeThemeColor.call(void 0, themeColor)];
54
54
  return _react.useMemo.call(void 0, () => {
55
55
  return {
@@ -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/bottom-tab-bar/bottom-tab-bar.tsx
7
7
  import React2, { useMemo as useMemo3, useState as useState2 } from "react";
@@ -1,11 +1,11 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 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 _chunkFBTBWI3Pcjs = require('../chunk-FBTBWI3P.cjs');
3
+ var _chunkYIEUN3G5cjs = require('../chunk-YIEUN3G5.cjs');
4
4
  require('../chunk-56RPWZD2.cjs');
5
5
 
6
6
 
7
7
 
8
- var _chunkRZJFCDFScjs = require('../chunk-RZJFCDFS.cjs');
8
+ var _chunk7UFBLUMVcjs = require('../chunk-7UFBLUMV.cjs');
9
9
 
10
10
  // src/components/button/button.tsx
11
11
  var _react = require('react'); var _react2 = _interopRequireDefault(_react);
@@ -56,22 +56,20 @@ var styles = _reactnative.StyleSheet.create({
56
56
 
57
57
  var _core = require('@xaui/core');
58
58
  var useTextStyles = (themeColor, variant) => {
59
- const theme = _chunkRZJFCDFScjs.useXUITheme.call(void 0, );
59
+ const theme = _chunk7UFBLUMVcjs.useXUITheme.call(void 0, );
60
60
  const safeThemeColor = _core.getSafeThemeColor.call(void 0, themeColor);
61
61
  const colorScheme = theme.colors[safeThemeColor];
62
62
  const textColor = _react.useMemo.call(void 0, () => {
63
- const isDark = theme.mode === "dark";
64
- if (variant === "solid") {
65
- return isDark ? colorScheme.main : colorScheme.foreground;
66
- }
63
+ if (variant === "solid") return colorScheme.onMain;
64
+ if (variant === "flat" || variant === "faded") return colorScheme.onContainer;
67
65
  return colorScheme.main;
68
- }, [variant, colorScheme, theme]);
66
+ }, [variant, colorScheme]);
69
67
  return {
70
68
  textColor
71
69
  };
72
70
  };
73
71
  function useSizesStyles(size) {
74
- const theme = _chunkRZJFCDFScjs.useXUITheme.call(void 0, );
72
+ const theme = _chunk7UFBLUMVcjs.useXUITheme.call(void 0, );
75
73
  const sizeStyles = _react.useMemo.call(void 0, () => {
76
74
  const sizes = {
77
75
  xs: {
@@ -113,23 +111,22 @@ function useSizesStyles(size) {
113
111
  return { sizeStyles, spinnerSize };
114
112
  }
115
113
  function useVariantSizesStyles(themeColor, variant, elevation = 0) {
116
- const theme = _chunkRZJFCDFScjs.useXUITheme.call(void 0, );
114
+ const theme = _chunk7UFBLUMVcjs.useXUITheme.call(void 0, );
117
115
  const safeThemeColor = _core.getSafeThemeColor.call(void 0, themeColor);
118
116
  const colorScheme = theme.colors[safeThemeColor];
119
117
  const variantStyles = _react.useMemo.call(void 0, () => {
120
- const isDark = theme.mode === "dark";
121
118
  const styles2 = {
122
119
  solid: {
123
- backgroundColor: isDark ? colorScheme.background : colorScheme.main,
120
+ backgroundColor: colorScheme.main,
124
121
  borderWidth: 0
125
122
  },
126
- outlined: {
123
+ bordered: {
127
124
  backgroundColor: "transparent",
128
125
  borderWidth: theme.borderWidth.md,
129
126
  borderColor: colorScheme.main
130
127
  },
131
128
  flat: {
132
- backgroundColor: isDark ? _core.withOpacity.call(void 0, colorScheme.background, 0.5) : colorScheme.background,
129
+ backgroundColor: colorScheme.container,
133
130
  borderWidth: 0
134
131
  },
135
132
  light: {
@@ -137,13 +134,13 @@ function useVariantSizesStyles(themeColor, variant, elevation = 0) {
137
134
  borderWidth: 0
138
135
  },
139
136
  faded: {
140
- backgroundColor: `${colorScheme.background}95`,
137
+ backgroundColor: colorScheme.container,
141
138
  borderWidth: theme.borderWidth.md,
142
- borderColor: `${colorScheme.main}90`
139
+ borderColor: colorScheme.main
143
140
  }
144
141
  };
145
142
  const baseStyle = styles2[variant];
146
- const shouldApplyElevation = variant !== "outlined" && variant !== "light";
143
+ const shouldApplyElevation = variant !== "bordered" && variant !== "light";
147
144
  const shadowStyles = elevation === 0 ? {} : elevation === 1 ? theme.shadows.sm : elevation === 2 ? theme.shadows.md : elevation === 3 ? theme.shadows.lg : theme.shadows.xl;
148
145
  return {
149
146
  ...baseStyle,
@@ -210,7 +207,7 @@ var Button = ({
210
207
  const animatedScale = _react2.default.useRef(new _reactnative.Animated.Value(1)).current;
211
208
  const animatedOpacity = _react2.default.useRef(new _reactnative.Animated.Value(1)).current;
212
209
  const { sizeStyles, spinnerSize } = useSizesStyles(size);
213
- const radiusStyles = _chunkRZJFCDFScjs.useBorderRadiusStyles.call(void 0, radius);
210
+ const radiusStyles = _chunk7UFBLUMVcjs.useBorderRadiusStyles.call(void 0, radius);
214
211
  const variantStyles = useVariantSizesStyles(themeColor, variant, elevation);
215
212
  const { textColor } = useTextStyles(themeColor, variant);
216
213
  const handlePressIn = (event) => {
@@ -226,7 +223,7 @@ var Button = ({
226
223
  _optionalChain([onPressOut, 'optionalCall', _2 => _2(event)]);
227
224
  };
228
225
  const spinner = /* @__PURE__ */ _react2.default.createElement(
229
- _chunkFBTBWI3Pcjs.ActivityIndicator,
226
+ _chunkYIEUN3G5cjs.ActivityIndicator,
230
227
  {
231
228
  variant: "circular",
232
229
  themeColor: variant === "solid" ? void 0 : themeColor,
@@ -300,7 +297,7 @@ var iconButtonStyles = _reactnative.StyleSheet.create({
300
297
  // src/components/button/icon-button.hook.ts
301
298
 
302
299
  var useIconButtonSizeStyles = (size) => {
303
- const theme = _chunkRZJFCDFScjs.useXUITheme.call(void 0, );
300
+ const theme = _chunk7UFBLUMVcjs.useXUITheme.call(void 0, );
304
301
  return _react.useMemo.call(void 0, () => {
305
302
  const sizeMap = {
306
303
  xs: { width: theme.componentSizes.xs, height: theme.componentSizes.xs },
@@ -331,7 +328,7 @@ var IconButton = ({
331
328
  const animatedScale = _react2.default.useRef(new _reactnative.Animated.Value(1)).current;
332
329
  const animatedOpacity = _react2.default.useRef(new _reactnative.Animated.Value(1)).current;
333
330
  const sizeStyles = useIconButtonSizeStyles(size);
334
- const radiusStyles = _chunkRZJFCDFScjs.useBorderRadiusStyles.call(void 0, radius);
331
+ const radiusStyles = _chunk7UFBLUMVcjs.useBorderRadiusStyles.call(void 0, radius);
335
332
  const variantStyles = useVariantSizesStyles(themeColor, variant, elevation);
336
333
  const { textColor } = useTextStyles(themeColor, variant);
337
334
  const handlePressIn = (event) => {
@@ -378,7 +375,7 @@ var IconButton = ({
378
375
  ]
379
376
  },
380
377
  isLoading ? /* @__PURE__ */ _react2.default.createElement(
381
- _chunkFBTBWI3Pcjs.ActivityIndicator,
378
+ _chunkYIEUN3G5cjs.ActivityIndicator,
382
379
  {
383
380
  variant: "circular",
384
381
  themeColor: variant === "solid" ? void 0 : themeColor,
@@ -2,7 +2,7 @@ import React, { ReactNode } from 'react';
2
2
  import { ViewStyle, TextStyle, GestureResponderEvent } from 'react-native';
3
3
  import { T as ThemeColor, S as Size } from '../index-BOw6tbkc.cjs';
4
4
 
5
- type ButtonVariant = 'solid' | 'outlined' | 'flat' | 'light' | 'faded';
5
+ type ButtonVariant = 'solid' | 'bordered' | 'flat' | 'light' | 'faded';
6
6
  type ButtonRadius = 'none' | 'sm' | 'md' | 'lg' | 'full';
7
7
  type SpinnerPlacement = 'start' | 'end';
8
8
  type ElevationLevel = 0 | 1 | 2 | 3 | 4;
@@ -75,7 +75,7 @@ type ButtonProps = {
75
75
  isLoading?: boolean;
76
76
  /**
77
77
  * Android elevation level from 0 to 4.
78
- * Does not apply to `outlined` and `light` variants.
78
+ * Does not apply to `bordered` and `light` variants.
79
79
  * @default 0
80
80
  */
81
81
  elevation?: ElevationLevel;
@@ -140,7 +140,7 @@ type IconButtonProps = {
140
140
  isLoading?: boolean;
141
141
  /**
142
142
  * Android elevation level from 0 to 4.
143
- * Does not apply to `outlined` and `light` variants.
143
+ * Does not apply to `bordered` and `light` variants.
144
144
  * @default 0
145
145
  */
146
146
  elevation?: ElevationLevel;
@@ -2,7 +2,7 @@ import React, { ReactNode } from 'react';
2
2
  import { ViewStyle, TextStyle, GestureResponderEvent } from 'react-native';
3
3
  import { T as ThemeColor, S as Size } from '../index-BOw6tbkc.js';
4
4
 
5
- type ButtonVariant = 'solid' | 'outlined' | 'flat' | 'light' | 'faded';
5
+ type ButtonVariant = 'solid' | 'bordered' | 'flat' | 'light' | 'faded';
6
6
  type ButtonRadius = 'none' | 'sm' | 'md' | 'lg' | 'full';
7
7
  type SpinnerPlacement = 'start' | 'end';
8
8
  type ElevationLevel = 0 | 1 | 2 | 3 | 4;
@@ -75,7 +75,7 @@ type ButtonProps = {
75
75
  isLoading?: boolean;
76
76
  /**
77
77
  * Android elevation level from 0 to 4.
78
- * Does not apply to `outlined` and `light` variants.
78
+ * Does not apply to `bordered` and `light` variants.
79
79
  * @default 0
80
80
  */
81
81
  elevation?: ElevationLevel;
@@ -140,7 +140,7 @@ type IconButtonProps = {
140
140
  isLoading?: boolean;
141
141
  /**
142
142
  * Android elevation level from 0 to 4.
143
- * Does not apply to `outlined` and `light` variants.
143
+ * Does not apply to `bordered` and `light` variants.
144
144
  * @default 0
145
145
  */
146
146
  elevation?: ElevationLevel;
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  ActivityIndicator
3
- } from "../chunk-J3BOFXIH.js";
3
+ } from "../chunk-VSZEXOUN.js";
4
4
  import "../chunk-SHBDANQN.js";
5
5
  import {
6
6
  useBorderRadiusStyles,
7
7
  useXUITheme
8
- } from "../chunk-LVNBYERF.js";
8
+ } from "../chunk-RBSA4NH4.js";
9
9
 
10
10
  // src/components/button/button.tsx
11
11
  import React from "react";
@@ -54,18 +54,16 @@ var styles = StyleSheet.create({
54
54
 
55
55
  // src/components/button/button.hook.ts
56
56
  import { useMemo } from "react";
57
- import { getSafeThemeColor, withOpacity } from "@xaui/core";
57
+ import { getSafeThemeColor } from "@xaui/core";
58
58
  var useTextStyles = (themeColor, variant) => {
59
59
  const theme = useXUITheme();
60
60
  const safeThemeColor = getSafeThemeColor(themeColor);
61
61
  const colorScheme = theme.colors[safeThemeColor];
62
62
  const textColor = useMemo(() => {
63
- const isDark = theme.mode === "dark";
64
- if (variant === "solid") {
65
- return isDark ? colorScheme.main : colorScheme.foreground;
66
- }
63
+ if (variant === "solid") return colorScheme.onMain;
64
+ if (variant === "flat" || variant === "faded") return colorScheme.onContainer;
67
65
  return colorScheme.main;
68
- }, [variant, colorScheme, theme]);
66
+ }, [variant, colorScheme]);
69
67
  return {
70
68
  textColor
71
69
  };
@@ -117,19 +115,18 @@ function useVariantSizesStyles(themeColor, variant, elevation = 0) {
117
115
  const safeThemeColor = getSafeThemeColor(themeColor);
118
116
  const colorScheme = theme.colors[safeThemeColor];
119
117
  const variantStyles = useMemo(() => {
120
- const isDark = theme.mode === "dark";
121
118
  const styles2 = {
122
119
  solid: {
123
- backgroundColor: isDark ? colorScheme.background : colorScheme.main,
120
+ backgroundColor: colorScheme.main,
124
121
  borderWidth: 0
125
122
  },
126
- outlined: {
123
+ bordered: {
127
124
  backgroundColor: "transparent",
128
125
  borderWidth: theme.borderWidth.md,
129
126
  borderColor: colorScheme.main
130
127
  },
131
128
  flat: {
132
- backgroundColor: isDark ? withOpacity(colorScheme.background, 0.5) : colorScheme.background,
129
+ backgroundColor: colorScheme.container,
133
130
  borderWidth: 0
134
131
  },
135
132
  light: {
@@ -137,13 +134,13 @@ function useVariantSizesStyles(themeColor, variant, elevation = 0) {
137
134
  borderWidth: 0
138
135
  },
139
136
  faded: {
140
- backgroundColor: `${colorScheme.background}95`,
137
+ backgroundColor: colorScheme.container,
141
138
  borderWidth: theme.borderWidth.md,
142
- borderColor: `${colorScheme.main}90`
139
+ borderColor: colorScheme.main
143
140
  }
144
141
  };
145
142
  const baseStyle = styles2[variant];
146
- const shouldApplyElevation = variant !== "outlined" && variant !== "light";
143
+ const shouldApplyElevation = variant !== "bordered" && variant !== "light";
147
144
  const shadowStyles = elevation === 0 ? {} : elevation === 1 ? theme.shadows.sm : elevation === 2 ? theme.shadows.md : elevation === 3 ? theme.shadows.lg : theme.shadows.xl;
148
145
  return {
149
146
  ...baseStyle,