@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,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/list/list.tsx
7
7
  var _react = require('react'); var _react2 = _interopRequireDefault(_react);
@@ -45,7 +45,7 @@ var styles = _reactnative.StyleSheet.create({
45
45
 
46
46
 
47
47
  var ListDivider = () => {
48
- const theme = _chunkRZJFCDFScjs.useXUITheme.call(void 0, );
48
+ const theme = _chunk7UFBLUMVcjs.useXUITheme.call(void 0, );
49
49
  return /* @__PURE__ */ _react2.default.createElement(
50
50
  _reactnative.View,
51
51
  {
@@ -143,7 +143,7 @@ var List = ({
143
143
  // src/components/list/list.hook.ts
144
144
 
145
145
  var useListItemSizeStyles = (size) => {
146
- const theme = _chunkRZJFCDFScjs.useXUITheme.call(void 0, );
146
+ const theme = _chunk7UFBLUMVcjs.useXUITheme.call(void 0, );
147
147
  return _react.useMemo.call(void 0, () => {
148
148
  const sizes = {
149
149
  xs: {
@@ -189,7 +189,7 @@ var ListItem = ({
189
189
  onPress
190
190
  }) => {
191
191
  const context = _react.useContext.call(void 0, ListContext);
192
- const theme = _chunkRZJFCDFScjs.useXUITheme.call(void 0, );
192
+ const theme = _chunk7UFBLUMVcjs.useXUITheme.call(void 0, );
193
193
  const selectionMode = _nullishCoalesce(_optionalChain([context, 'optionalAccess', _2 => _2.selectionMode]), () => ( "none"));
194
194
  const isPressable = _nullishCoalesce(_optionalChain([context, 'optionalAccess', _3 => _3.isPressable]), () => ( true));
195
195
  const isSelectable = _nullishCoalesce(_optionalChain([context, 'optionalAccess', _4 => _4.isSelectable]), () => ( false));
@@ -199,7 +199,7 @@ var ListItem = ({
199
199
  const sizeStyles = useListItemSizeStyles(size);
200
200
  const safeThemeColor = _core.getSafeThemeColor.call(void 0, themeColor);
201
201
  const colorScheme = theme.colors[safeThemeColor];
202
- const backgroundColor = isSelected ? colorScheme.background : "transparent";
202
+ const backgroundColor = isSelected ? colorScheme.container : "transparent";
203
203
  const titleColor = isDisabled ? theme.colors.foreground + "50" : theme.colors.foreground;
204
204
  const descriptionColor = isDisabled ? theme.colors.foreground + "50" : theme.colors.foreground + "99";
205
205
  const handlePress = () => {
@@ -301,7 +301,7 @@ function ListBuilder({
301
301
  style,
302
302
  flatListProps
303
303
  }) {
304
- const theme = _chunkRZJFCDFScjs.useXUITheme.call(void 0, );
304
+ const theme = _chunk7UFBLUMVcjs.useXUITheme.call(void 0, );
305
305
  const isControlled = controlledSelectedKeys !== void 0;
306
306
  const [internalSelectedKeys, setInternalSelectedKeys] = _react.useState.call(void 0, defaultSelectedKeys);
307
307
  const selectedKeys = isControlled ? controlledSelectedKeys : internalSelectedKeys;
@@ -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/list/list.tsx
7
7
  import React2, { useCallback, useMemo, useState } from "react";
@@ -199,7 +199,7 @@ var ListItem = ({
199
199
  const sizeStyles = useListItemSizeStyles(size);
200
200
  const safeThemeColor = getSafeThemeColor(themeColor);
201
201
  const colorScheme = theme.colors[safeThemeColor];
202
- const backgroundColor = isSelected ? colorScheme.background : "transparent";
202
+ const backgroundColor = isSelected ? colorScheme.container : "transparent";
203
203
  const titleColor = isDisabled ? theme.colors.foreground + "50" : theme.colors.foreground;
204
204
  const descriptionColor = isDisabled ? theme.colors.foreground + "50" : theme.colors.foreground + "99";
205
205
  const handlePress = () => {
@@ -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/menu/menu.tsx
7
7
  var _react = require('react'); var _react2 = _interopRequireDefault(_react);
@@ -160,7 +160,7 @@ var Menu = ({
160
160
  customAppearance,
161
161
  maxHeight = 280
162
162
  }) => {
163
- const theme = _chunkRZJFCDFScjs.useXUITheme.call(void 0, );
163
+ const theme = _chunk7UFBLUMVcjs.useXUITheme.call(void 0, );
164
164
  const { triggerRef, triggerPosition } = useMenuTriggerMeasurements(visible);
165
165
  const { contentSize, handleContentLayout, isMeasured } = useMenuContentLayout(visible);
166
166
  const menuPosition = useMenuPosition(triggerPosition, contentSize, position);
@@ -201,7 +201,7 @@ var Menu = ({
201
201
  {
202
202
  top: isMeasured ? menuPosition.top : -9999,
203
203
  left: isMeasured ? menuPosition.left : -9999,
204
- backgroundColor: theme.mode === "dark" ? theme.colors.default.background : theme.colors.background,
204
+ backgroundColor: theme.mode === "dark" ? theme.colors.default.container : theme.colors.background,
205
205
  borderRadius: theme.borderRadius.md,
206
206
  opacity: isMeasured ? opacity : 0,
207
207
  transform: [{ scale }],
@@ -274,7 +274,7 @@ var MenuItem = ({
274
274
  customAppearance,
275
275
  accessibilityLabel
276
276
  }) => {
277
- const theme = _chunkRZJFCDFScjs.useXUITheme.call(void 0, );
277
+ const theme = _chunk7UFBLUMVcjs.useXUITheme.call(void 0, );
278
278
  const titleColor = isDisabled ? theme.colors.foreground + "50" : theme.colors.foreground;
279
279
  const renderTitle = () => {
280
280
  if (typeof title === "string" || typeof title === "number") {
@@ -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/menu/menu.tsx
7
7
  import React from "react";
@@ -201,7 +201,7 @@ var Menu = ({
201
201
  {
202
202
  top: isMeasured ? menuPosition.top : -9999,
203
203
  left: isMeasured ? menuPosition.left : -9999,
204
- backgroundColor: theme.mode === "dark" ? theme.colors.default.background : theme.colors.background,
204
+ backgroundColor: theme.mode === "dark" ? theme.colors.default.container : theme.colors.background,
205
205
  borderRadius: theme.borderRadius.md,
206
206
  opacity: isMeasured ? opacity : 0,
207
207
  transform: [{ scale }],
@@ -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/menubox/menubox.tsx
7
7
  var _react = require('react'); var _react2 = _interopRequireDefault(_react);
@@ -51,7 +51,7 @@ var MenuBox = ({
51
51
  style,
52
52
  backgroundColor
53
53
  }) => {
54
- const theme = _chunkRZJFCDFScjs.useXUITheme.call(void 0, );
54
+ const theme = _chunk7UFBLUMVcjs.useXUITheme.call(void 0, );
55
55
  const itemCount = _react.Children.count(children);
56
56
  const itemKeys = _react.useMemo.call(void 0, () => {
57
57
  const keys = [];
@@ -68,7 +68,7 @@ var MenuBox = ({
68
68
  const getItemIndex = (itemKey) => {
69
69
  return itemKeys.indexOf(itemKey);
70
70
  };
71
- const bgColor = _nullishCoalesce(backgroundColor, () => ( theme.colors.default.background));
71
+ const bgColor = _nullishCoalesce(backgroundColor, () => ( theme.colors.default.container));
72
72
  const contextValue = _react.useMemo.call(void 0,
73
73
  () => ({
74
74
  size,
@@ -91,7 +91,7 @@ var MenuBox = ({
91
91
  // src/components/menubox/menubox.hook.ts
92
92
 
93
93
  var useMenuBoxItemSizeStyles = (size) => {
94
- const theme = _chunkRZJFCDFScjs.useXUITheme.call(void 0, );
94
+ const theme = _chunk7UFBLUMVcjs.useXUITheme.call(void 0, );
95
95
  return _react.useMemo.call(void 0, () => {
96
96
  const sizes = {
97
97
  xs: {
@@ -123,7 +123,7 @@ var useMenuBoxItemSizeStyles = (size) => {
123
123
  }, [size, theme]);
124
124
  };
125
125
  var useMenuBoxRadiusStyles = (radius, isFirst, isLast) => {
126
- const theme = _chunkRZJFCDFScjs.useXUITheme.call(void 0, );
126
+ const theme = _chunk7UFBLUMVcjs.useXUITheme.call(void 0, );
127
127
  return _react.useMemo.call(void 0, () => {
128
128
  const radiusMap = {
129
129
  none: theme.borderRadius.none,
@@ -178,7 +178,7 @@ var runMenuBoxPressOutAnimation = (animatedScale, animatedOpacity) => {
178
178
  // src/components/menubox/menubox-item.tsx
179
179
  var MenuBoxItem = (props) => {
180
180
  const context = _react.useContext.call(void 0, MenuBoxContext);
181
- const theme = _chunkRZJFCDFScjs.useXUITheme.call(void 0, );
181
+ const theme = _chunk7UFBLUMVcjs.useXUITheme.call(void 0, );
182
182
  const animatedScale = _react2.default.useRef(new _reactnative.Animated.Value(1)).current;
183
183
  const animatedOpacity = _react2.default.useRef(new _reactnative.Animated.Value(1)).current;
184
184
  const {
@@ -193,7 +193,7 @@ var MenuBoxItem = (props) => {
193
193
  } = props;
194
194
  const size = _nullishCoalesce(_optionalChain([context, 'optionalAccess', _ => _.size]), () => ( "md"));
195
195
  const radius = _nullishCoalesce(_optionalChain([context, 'optionalAccess', _2 => _2.radius]), () => ( "lg"));
196
- const itemBackgroundColor = _nullishCoalesce(_optionalChain([context, 'optionalAccess', _3 => _3.backgroundColor]), () => ( (theme.mode === "dark" ? theme.colors.default.background : theme.colors.background)));
196
+ const itemBackgroundColor = _nullishCoalesce(_optionalChain([context, 'optionalAccess', _3 => _3.backgroundColor]), () => ( (theme.mode === "dark" ? theme.colors.default.container : theme.colors.background)));
197
197
  const spacing = _nullishCoalesce(_optionalChain([context, 'optionalAccess', _4 => _4.spacing]), () => ( 0));
198
198
  const itemCount = _nullishCoalesce(_optionalChain([context, 'optionalAccess', _5 => _5.itemCount]), () => ( 1));
199
199
  const index = _nullishCoalesce(_optionalChain([context, 'optionalAccess', _6 => _6.getItemIndex, 'call', _7 => _7(itemKey)]), () => ( 0));
@@ -86,7 +86,7 @@ type MenuBoxProps = {
86
86
  style?: ViewStyle;
87
87
  /**
88
88
  * Background color for MenuBox items
89
- * Uses `theme.colors.default.background` by default
89
+ * Uses `theme.colors.default.container` by default
90
90
  */
91
91
  backgroundColor?: string;
92
92
  };
@@ -86,7 +86,7 @@ type MenuBoxProps = {
86
86
  style?: ViewStyle;
87
87
  /**
88
88
  * Background color for MenuBox items
89
- * Uses `theme.colors.default.background` by default
89
+ * Uses `theme.colors.default.container` by default
90
90
  */
91
91
  backgroundColor?: string;
92
92
  };
@@ -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/menubox/menubox.tsx
7
7
  import React, { useMemo, Children, isValidElement } from "react";
@@ -68,7 +68,7 @@ var MenuBox = ({
68
68
  const getItemIndex = (itemKey) => {
69
69
  return itemKeys.indexOf(itemKey);
70
70
  };
71
- const bgColor = backgroundColor ?? theme.colors.default.background;
71
+ const bgColor = backgroundColor ?? theme.colors.default.container;
72
72
  const contextValue = useMemo(
73
73
  () => ({
74
74
  size,
@@ -193,7 +193,7 @@ var MenuBoxItem = (props) => {
193
193
  } = props;
194
194
  const size = context?.size ?? "md";
195
195
  const radius = context?.radius ?? "lg";
196
- const itemBackgroundColor = context?.backgroundColor ?? (theme.mode === "dark" ? theme.colors.default.background : theme.colors.background);
196
+ const itemBackgroundColor = context?.backgroundColor ?? (theme.mode === "dark" ? theme.colors.default.container : theme.colors.background);
197
197
  const spacing = context?.spacing ?? 0;
198
198
  const itemCount = context?.itemCount ?? 1;
199
199
  const index = context?.getItemIndex(itemKey) ?? 0;
@@ -1,13 +1,13 @@
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 _chunk43I45LX7cjs = require('../chunk-43I45LX7.cjs');
3
+ var _chunkZH6ZSV2Qcjs = require('../chunk-ZH6ZSV2Q.cjs');
4
4
 
5
5
 
6
- var _chunk3XWF77Y3cjs = require('../chunk-3XWF77Y3.cjs');
6
+ var _chunkBYWUAPC4cjs = require('../chunk-BYWUAPC4.cjs');
7
7
  require('../chunk-56RPWZD2.cjs');
8
8
 
9
9
 
10
- var _chunkRZJFCDFScjs = require('../chunk-RZJFCDFS.cjs');
10
+ var _chunk7UFBLUMVcjs = require('../chunk-7UFBLUMV.cjs');
11
11
 
12
12
  // src/components/picker/picker.tsx
13
13
  var _react = require('react'); var _react2 = _interopRequireDefault(_react);
@@ -140,7 +140,7 @@ var Picker = ({
140
140
  errorMessage,
141
141
  sheetTitle,
142
142
  themeColor = "primary",
143
- variant = "flat",
143
+ variant = "colored",
144
144
  size = "md",
145
145
  radius = "md",
146
146
  isOpened,
@@ -156,7 +156,7 @@ var Picker = ({
156
156
  const [internalIsOpen, setInternalIsOpen] = _react.useState.call(void 0, false);
157
157
  const isControlled = isOpened !== void 0;
158
158
  const isOpen = isControlled ? Boolean(isOpened) : internalIsOpen;
159
- const theme = _chunkRZJFCDFScjs.useXUITheme.call(void 0, );
159
+ const theme = _chunk7UFBLUMVcjs.useXUITheme.call(void 0, );
160
160
  const sheetBackground = theme.mode === "dark" ? theme.colors.background : "#ffffff";
161
161
  const safeThemeColor = _core.getSafeThemeColor.call(void 0, themeColor);
162
162
  const colorScheme = theme.colors[safeThemeColor];
@@ -187,7 +187,7 @@ var Picker = ({
187
187
  };
188
188
  const chevronColor = _core.withOpacity.call(void 0, theme.colors.foreground, 0.45);
189
189
  return /* @__PURE__ */ _react2.default.createElement(_react2.default.Fragment, null, /* @__PURE__ */ _react2.default.createElement(
190
- _chunk43I45LX7cjs.InputTrigger,
190
+ _chunkZH6ZSV2Qcjs.InputTrigger,
191
191
  {
192
192
  value: displayLabel,
193
193
  placeholder,
@@ -206,7 +206,7 @@ var Picker = ({
206
206
  onPress: handleOpen
207
207
  }
208
208
  ), /* @__PURE__ */ _react2.default.createElement(
209
- _chunk3XWF77Y3cjs.BottomSheet,
209
+ _chunkBYWUAPC4cjs.BottomSheet,
210
210
  {
211
211
  isOpen,
212
212
  snapPoints: [Math.min(0.35 + options.length * 0.065, 0.85)],
@@ -1,7 +1,7 @@
1
1
  import React, { ReactNode } from 'react';
2
2
  import { ViewStyle } from 'react-native';
3
3
  import { T as ThemeColor, R as Radius } from '../index-DyU3sW3_.cjs';
4
- import { d as InputTriggerLabelPlacement, b as InputTriggerVariant, c as InputTriggerSize } from '../input-trigger.type-BL70fHE9.cjs';
4
+ import { d as InputTriggerLabelPlacement, b as InputTriggerVariant, c as InputTriggerSize } from '../input-trigger.type-By_1ZjKd.cjs';
5
5
 
6
6
  type PickerOption = {
7
7
  /**
@@ -1,7 +1,7 @@
1
1
  import React, { ReactNode } from 'react';
2
2
  import { ViewStyle } from 'react-native';
3
3
  import { T as ThemeColor, R as Radius } from '../index-DyU3sW3_.js';
4
- import { d as InputTriggerLabelPlacement, b as InputTriggerVariant, c as InputTriggerSize } from '../input-trigger.type-BODYStHk.js';
4
+ import { d as InputTriggerLabelPlacement, b as InputTriggerVariant, c as InputTriggerSize } from '../input-trigger.type-DlSqg2eG.js';
5
5
 
6
6
  type PickerOption = {
7
7
  /**
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  InputTrigger
3
- } from "../chunk-M6A23KUM.js";
3
+ } from "../chunk-A45TVXU5.js";
4
4
  import {
5
5
  BottomSheet
6
- } from "../chunk-K24VDBNN.js";
6
+ } from "../chunk-4JFWQ5XT.js";
7
7
  import "../chunk-SHBDANQN.js";
8
8
  import {
9
9
  useXUITheme
10
- } from "../chunk-LVNBYERF.js";
10
+ } from "../chunk-RBSA4NH4.js";
11
11
 
12
12
  // src/components/picker/picker.tsx
13
13
  import React, { useState } from "react";
@@ -140,7 +140,7 @@ var Picker = ({
140
140
  errorMessage,
141
141
  sheetTitle,
142
142
  themeColor = "primary",
143
- variant = "flat",
143
+ variant = "colored",
144
144
  size = "md",
145
145
  radius = "md",
146
146
  isOpened,
@@ -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(); } }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/progress/progress.tsx
7
7
  var _react = require('react'); var _react2 = _interopRequireDefault(_react);
@@ -157,10 +157,10 @@ var Progress = (props) => {
157
157
  size,
158
158
  disableAnimation = false
159
159
  } = props;
160
- const theme = _chunkRZJFCDFScjs.useXUITheme.call(void 0, );
160
+ const theme = _chunk7UFBLUMVcjs.useXUITheme.call(void 0, );
161
161
  const colorScheme = theme.colors[themeColor];
162
162
  const mainColor = _nullishCoalesce(color, () => ( colorScheme.main));
163
- const trackColor = _nullishCoalesce(backgroundColor, () => ( colorScheme.background));
163
+ const trackColor = _nullishCoalesce(backgroundColor, () => ( colorScheme.container));
164
164
  const clampedValue = clampProgress(value);
165
165
  const accessibilityValue = {
166
166
  min: 0,
@@ -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/progress/progress.tsx
7
7
  import React3 from "react";
@@ -160,7 +160,7 @@ var Progress = (props) => {
160
160
  const theme = useXUITheme();
161
161
  const colorScheme = theme.colors[themeColor];
162
162
  const mainColor = color ?? colorScheme.main;
163
- const trackColor = backgroundColor ?? colorScheme.background;
163
+ const trackColor = backgroundColor ?? colorScheme.container;
164
164
  const clampedValue = clampProgress(value);
165
165
  const accessibilityValue = {
166
166
  min: 0,
@@ -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/radio/radio.tsx
7
7
  var _react = require('react'); var _react2 = _interopRequireDefault(_react);
@@ -18,7 +18,7 @@ var RadioGroupContext = _react2.default.createContext(
18
18
 
19
19
 
20
20
  function useSizeStyles(size, variant) {
21
- const theme = _chunkRZJFCDFScjs.useXUITheme.call(void 0, );
21
+ const theme = _chunk7UFBLUMVcjs.useXUITheme.call(void 0, );
22
22
  const sizeStyles = _react.useMemo.call(void 0, () => {
23
23
  const sizes = {
24
24
  xs: {
@@ -47,7 +47,7 @@ function useSizeStyles(size, variant) {
47
47
  return sizeStyles;
48
48
  }
49
49
  function useRadiusStyles(radius) {
50
- const theme = _chunkRZJFCDFScjs.useXUITheme.call(void 0, );
50
+ const theme = _chunk7UFBLUMVcjs.useXUITheme.call(void 0, );
51
51
  const radiusStyles = _react.useMemo.call(void 0, () => {
52
52
  const radii = {
53
53
  none: theme.borderRadius.none,
@@ -61,7 +61,7 @@ function useRadiusStyles(radius) {
61
61
  return radiusStyles;
62
62
  }
63
63
  function useDotColors(themeColor, variant, isActive) {
64
- const theme = _chunkRZJFCDFScjs.useXUITheme.call(void 0, );
64
+ const theme = _chunk7UFBLUMVcjs.useXUITheme.call(void 0, );
65
65
  const safeThemeColor = _core.getSafeThemeColor.call(void 0, themeColor);
66
66
  const colorScheme = theme.colors[safeThemeColor];
67
67
  const dotColors = _react.useMemo.call(void 0, () => {
@@ -72,7 +72,7 @@ function useDotColors(themeColor, variant, isActive) {
72
72
  }
73
73
  if (variant === "filled") {
74
74
  return {
75
- checked: colorScheme.foreground
75
+ checked: colorScheme.onMain
76
76
  };
77
77
  }
78
78
  return {
@@ -82,13 +82,13 @@ function useDotColors(themeColor, variant, isActive) {
82
82
  return dotColors;
83
83
  }
84
84
  function useVariantStyles(themeColor, variant, isActive) {
85
- const theme = _chunkRZJFCDFScjs.useXUITheme.call(void 0, );
85
+ const theme = _chunk7UFBLUMVcjs.useXUITheme.call(void 0, );
86
86
  const safeThemeColor = _core.getSafeThemeColor.call(void 0, themeColor);
87
87
  const colorScheme = theme.colors[safeThemeColor];
88
88
  const variantStyles = _react.useMemo.call(void 0, () => {
89
89
  if (variant === "filled") {
90
90
  return {
91
- backgroundColor: "transparent",
91
+ backgroundColor: isActive ? colorScheme.main : "transparent",
92
92
  borderWidth: isActive ? 0 : theme.borderWidth.md,
93
93
  borderColor: isActive ? "transparent" : colorScheme.main
94
94
  };
@@ -244,7 +244,7 @@ var Radio = ({
244
244
  onValueChange
245
245
  }) => {
246
246
  const group = _react.useContext.call(void 0, RadioGroupContext);
247
- const theme = _chunkRZJFCDFScjs.useXUITheme.call(void 0, );
247
+ const theme = _chunk7UFBLUMVcjs.useXUITheme.call(void 0, );
248
248
  const resolvedLabelAlignment = _nullishCoalesce(_nullishCoalesce(labelAlignment, () => ( _optionalChain([group, 'optionalAccess', _ => _.labelAlignment]))), () => ( "right"));
249
249
  const resolvedThemeColor = _nullishCoalesce(_nullishCoalesce(themeColor, () => ( _optionalChain([group, 'optionalAccess', _2 => _2.themeColor]))), () => ( "primary"));
250
250
  const resolvedVariant = _nullishCoalesce(_nullishCoalesce(variant, () => ( _optionalChain([group, 'optionalAccess', _3 => _3.variant]))), () => ( "filled"));
@@ -410,7 +410,7 @@ var RadioGroup = ({
410
410
  gap,
411
411
  style
412
412
  }) => {
413
- const theme = _chunkRZJFCDFScjs.useXUITheme.call(void 0, );
413
+ const theme = _chunk7UFBLUMVcjs.useXUITheme.call(void 0, );
414
414
  const isControlled = typeof value === "string";
415
415
  const [internalValue, setInternalValue] = _react.useState.call(void 0, defaultValue);
416
416
  const selectedValue = isControlled ? value : internalValue;
@@ -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/radio/radio.tsx
7
7
  import React2, { useContext, useEffect, useRef, useState } from "react";
@@ -72,7 +72,7 @@ function useDotColors(themeColor, variant, isActive) {
72
72
  }
73
73
  if (variant === "filled") {
74
74
  return {
75
- checked: colorScheme.foreground
75
+ checked: colorScheme.onMain
76
76
  };
77
77
  }
78
78
  return {
@@ -88,7 +88,7 @@ function useVariantStyles(themeColor, variant, isActive) {
88
88
  const variantStyles = useMemo(() => {
89
89
  if (variant === "filled") {
90
90
  return {
91
- backgroundColor: "transparent",
91
+ backgroundColor: isActive ? colorScheme.main : "transparent",
92
92
  borderWidth: isActive ? 0 : theme.borderWidth.md,
93
93
  borderColor: isActive ? "transparent" : colorScheme.main
94
94
  };
@@ -0,0 +1,45 @@
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(); } }require('../chunk-56RPWZD2.cjs');
2
+
3
+
4
+ var _chunk7UFBLUMVcjs = require('../chunk-7UFBLUMV.cjs');
5
+
6
+ // src/components/refresh-control/refresh-control.tsx
7
+ var _react = require('react'); var _react2 = _interopRequireDefault(_react);
8
+ var _reactnative = require('react-native');
9
+ var PullToRefresh = ({
10
+ refreshing,
11
+ onRefresh,
12
+ enabled = true,
13
+ themeColor = "primary",
14
+ color,
15
+ title,
16
+ titleColor,
17
+ progressViewOffset,
18
+ children,
19
+ refreshControlProps
20
+ }) => {
21
+ const theme = _chunk7UFBLUMVcjs.useXUITheme.call(void 0, );
22
+ const indicatorColor = _nullishCoalesce(color, () => ( theme.colors[themeColor].main));
23
+ const indicatorTitleColor = _nullishCoalesce(titleColor, () => ( theme.colors.foreground));
24
+ const refreshControl = /* @__PURE__ */ _react2.default.createElement(
25
+ _reactnative.RefreshControl,
26
+ {
27
+ refreshing,
28
+ onRefresh,
29
+ enabled,
30
+ colors: [indicatorColor],
31
+ tintColor: indicatorColor,
32
+ title,
33
+ titleColor: indicatorTitleColor,
34
+ progressViewOffset,
35
+ ...refreshControlProps
36
+ }
37
+ );
38
+ return _react2.default.cloneElement(children, {
39
+ refreshControl
40
+ });
41
+ };
42
+ PullToRefresh.displayName = "PullToRefresh";
43
+
44
+
45
+ exports.PullToRefresh = PullToRefresh;
@@ -0,0 +1,55 @@
1
+ import React, { ReactElement } from 'react';
2
+ import { RefreshControlProps } from 'react-native';
3
+ import { T as ThemeColor } from '../index-DyU3sW3_.cjs';
4
+
5
+ type SupportedChildProps = {
6
+ refreshControl?: ReactElement | null;
7
+ };
8
+ type PullToRefreshProps = {
9
+ /**
10
+ * Whether the refresh indicator is visible.
11
+ */
12
+ refreshing: boolean;
13
+ /**
14
+ * Callback fired when user triggers pull-to-refresh.
15
+ */
16
+ onRefresh: () => void | Promise<void>;
17
+ /**
18
+ * Whether pull-to-refresh is enabled.
19
+ * @default true
20
+ */
21
+ enabled?: boolean;
22
+ /**
23
+ * Theme color used for the refresh indicator.
24
+ * @default 'primary'
25
+ */
26
+ themeColor?: ThemeColor;
27
+ /**
28
+ * Override indicator color.
29
+ */
30
+ color?: string;
31
+ /**
32
+ * Title shown near the refresh indicator.
33
+ */
34
+ title?: string;
35
+ /**
36
+ * Override title color.
37
+ */
38
+ titleColor?: string;
39
+ /**
40
+ * Progress offset from top (Android).
41
+ */
42
+ progressViewOffset?: number;
43
+ /**
44
+ * Scrollable child that accepts `refreshControl` prop.
45
+ */
46
+ children: ReactElement<SupportedChildProps>;
47
+ /**
48
+ * Additional native refresh control props.
49
+ */
50
+ refreshControlProps?: Omit<RefreshControlProps, 'refreshing' | 'onRefresh' | 'enabled' | 'colors' | 'tintColor' | 'title' | 'titleColor' | 'progressViewOffset'>;
51
+ };
52
+
53
+ declare const PullToRefresh: React.FC<PullToRefreshProps>;
54
+
55
+ export { PullToRefresh, type PullToRefreshProps };
@@ -0,0 +1,55 @@
1
+ import React, { ReactElement } from 'react';
2
+ import { RefreshControlProps } from 'react-native';
3
+ import { T as ThemeColor } from '../index-DyU3sW3_.js';
4
+
5
+ type SupportedChildProps = {
6
+ refreshControl?: ReactElement | null;
7
+ };
8
+ type PullToRefreshProps = {
9
+ /**
10
+ * Whether the refresh indicator is visible.
11
+ */
12
+ refreshing: boolean;
13
+ /**
14
+ * Callback fired when user triggers pull-to-refresh.
15
+ */
16
+ onRefresh: () => void | Promise<void>;
17
+ /**
18
+ * Whether pull-to-refresh is enabled.
19
+ * @default true
20
+ */
21
+ enabled?: boolean;
22
+ /**
23
+ * Theme color used for the refresh indicator.
24
+ * @default 'primary'
25
+ */
26
+ themeColor?: ThemeColor;
27
+ /**
28
+ * Override indicator color.
29
+ */
30
+ color?: string;
31
+ /**
32
+ * Title shown near the refresh indicator.
33
+ */
34
+ title?: string;
35
+ /**
36
+ * Override title color.
37
+ */
38
+ titleColor?: string;
39
+ /**
40
+ * Progress offset from top (Android).
41
+ */
42
+ progressViewOffset?: number;
43
+ /**
44
+ * Scrollable child that accepts `refreshControl` prop.
45
+ */
46
+ children: ReactElement<SupportedChildProps>;
47
+ /**
48
+ * Additional native refresh control props.
49
+ */
50
+ refreshControlProps?: Omit<RefreshControlProps, 'refreshing' | 'onRefresh' | 'enabled' | 'colors' | 'tintColor' | 'title' | 'titleColor' | 'progressViewOffset'>;
51
+ };
52
+
53
+ declare const PullToRefresh: React.FC<PullToRefreshProps>;
54
+
55
+ export { PullToRefresh, type PullToRefreshProps };