@xaui/native 0.9.1-alpha.40 → 0.9.1-alpha.42

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 (101) hide show
  1. package/dist/{chunk-TJ74XVZN.cjs → chunk-3JXI2IHV.cjs} +8 -8
  2. package/dist/{chunk-C5YLPCFC.cjs → chunk-4KSKQD37.cjs} +5 -5
  3. package/dist/{chunk-DA3OKXHV.cjs → chunk-54CWXA34.cjs} +59 -59
  4. package/dist/{chunk-XV735BSA.cjs → chunk-66FOASTP.cjs} +6 -6
  5. package/dist/{chunk-UFTCTTKK.js → chunk-6CO6FM67.js} +15 -15
  6. package/dist/{chunk-RU7JCMWC.cjs → chunk-76XDVA24.cjs} +6 -6
  7. package/dist/{chunk-G7P3ERYF.cjs → chunk-7KLBTMXV.cjs} +5 -5
  8. package/dist/{chunk-NWGLP6JX.cjs → chunk-7TOG4TVU.cjs} +15 -15
  9. package/dist/{chunk-ZFOOJK37.cjs → chunk-AAVCMCJ3.cjs} +2 -2
  10. package/dist/{chunk-T5FV5F7A.cjs → chunk-C5LONNXT.cjs} +6 -6
  11. package/dist/{chunk-XFPQFCEK.js → chunk-DY3SUG5P.js} +6 -6
  12. package/dist/{chunk-KCMYU7WF.js → chunk-EYD4H4X6.js} +1 -1
  13. package/dist/{chunk-DHGLGSH6.js → chunk-FBCWNXZC.js} +58 -58
  14. package/dist/{chunk-2XPG2243.js → chunk-GJSFKH4L.js} +16 -16
  15. package/dist/{chunk-DD4276RF.js → chunk-HA6BFY3A.js} +6 -6
  16. package/dist/{chunk-GFUZ3MUT.cjs → chunk-HOI5425P.cjs} +6 -6
  17. package/dist/{chunk-LRN3RNDO.js → chunk-JKP4TPIL.js} +16 -16
  18. package/dist/{chunk-6UEZJRVI.js → chunk-LIUO6D3D.js} +75 -75
  19. package/dist/{chunk-DIBUQ46Y.js → chunk-MXGER5PI.js} +5 -5
  20. package/dist/{chunk-EZEYMLO3.js → chunk-N5AEXTUM.js} +4 -4
  21. package/dist/chunk-NA262TF2.js +724 -0
  22. package/dist/{chunk-R73XQK7X.cjs → chunk-NCCRQK3P.cjs} +5 -5
  23. package/dist/{chunk-5VKYNBNA.js → chunk-NHZRQM5J.js} +4 -4
  24. package/dist/chunk-QWMVMLSU.cjs +407 -0
  25. package/dist/{chunk-GA6PBWNT.js → chunk-QZ24MZRX.js} +1 -1
  26. package/dist/{chunk-YVHT2UVW.js → chunk-R7BU4CPS.js} +1 -1
  27. package/dist/{chunk-6DOLGZVV.cjs → chunk-S4QUM4EE.cjs} +4 -4
  28. package/dist/{chunk-DG2I4PJG.js → chunk-SACDOFGF.js} +15 -15
  29. package/dist/{chunk-ABAGZTXZ.cjs → chunk-SIP5J7HU.cjs} +15 -15
  30. package/dist/{chunk-3E7CDKFO.cjs → chunk-TGMVEHV7.cjs} +61 -61
  31. package/dist/{chunk-YGYYJ3LQ.js → chunk-TRETQZEW.js} +5 -5
  32. package/dist/{chunk-UAWBAD4E.cjs → chunk-URA25DU4.cjs} +5 -5
  33. package/dist/{chunk-BRRXFOBY.js → chunk-USF6EWYR.js} +7 -7
  34. package/dist/{chunk-5R26NM4M.cjs → chunk-VPQPFLT5.cjs} +6 -6
  35. package/dist/chunk-VT34G7RT.js +518 -0
  36. package/dist/{chunk-7YF5NAHQ.cjs → chunk-VZK3NLBH.cjs} +7 -7
  37. package/dist/{chunk-N3KTZMPG.js → chunk-XNMZQSY5.js} +5 -5
  38. package/dist/chunk-ZTBA7CNK.cjs +510 -0
  39. package/dist/components/accordion/index.cjs +5 -5
  40. package/dist/components/accordion/index.js +4 -4
  41. package/dist/components/alert/index.cjs +6 -6
  42. package/dist/components/alert/index.js +5 -5
  43. package/dist/components/avatar/index.cjs +4 -4
  44. package/dist/components/avatar/index.js +3 -3
  45. package/dist/components/badge/index.cjs +4 -4
  46. package/dist/components/badge/index.js +3 -3
  47. package/dist/components/button/index.cjs +5 -5
  48. package/dist/components/button/index.js +4 -4
  49. package/dist/components/card/index.cjs +5 -5
  50. package/dist/components/card/index.js +4 -4
  51. package/dist/components/checkbox/index.cjs +5 -5
  52. package/dist/components/checkbox/index.js +4 -4
  53. package/dist/components/chip/index.cjs +6 -6
  54. package/dist/components/chip/index.js +5 -5
  55. package/dist/components/divider/index.cjs +4 -4
  56. package/dist/components/divider/index.js +3 -3
  57. package/dist/components/field-group/index.cjs +5 -5
  58. package/dist/components/field-group/index.js +4 -4
  59. package/dist/components/input-otp/index.cjs +4 -4
  60. package/dist/components/input-otp/index.js +3 -3
  61. package/dist/components/menu/index.cjs +5 -5
  62. package/dist/components/menu/index.js +4 -4
  63. package/dist/components/popover/index.cjs +5 -5
  64. package/dist/components/popover/index.js +4 -4
  65. package/dist/components/radio/index.cjs +5 -5
  66. package/dist/components/radio/index.js +4 -4
  67. package/dist/components/select/index.cjs +5 -5
  68. package/dist/components/select/index.js +4 -4
  69. package/dist/components/slider/index.cjs +33 -0
  70. package/dist/components/slider/index.d.cts +284 -0
  71. package/dist/components/slider/index.d.ts +284 -0
  72. package/dist/components/slider/index.js +33 -0
  73. package/dist/components/spinner/index.cjs +1 -1
  74. package/dist/components/spinner/index.js +1 -1
  75. package/dist/components/switch/index.cjs +5 -5
  76. package/dist/components/switch/index.js +4 -4
  77. package/dist/components/tabs/index.cjs +33 -0
  78. package/dist/components/tabs/index.d.cts +261 -0
  79. package/dist/components/tabs/index.d.ts +261 -0
  80. package/dist/components/tabs/index.js +33 -0
  81. package/dist/components/text-area/index.cjs +5 -5
  82. package/dist/components/text-area/index.js +4 -4
  83. package/dist/components/text-field/index.cjs +4 -4
  84. package/dist/components/text-field/index.js +3 -3
  85. package/dist/components/typography/index.cjs +4 -4
  86. package/dist/components/typography/index.js +3 -3
  87. package/dist/index.cjs +73 -27
  88. package/dist/index.d.cts +2 -0
  89. package/dist/index.d.ts +2 -0
  90. package/dist/index.js +84 -38
  91. package/dist/system/index.cjs +7 -7
  92. package/dist/system/index.js +7 -7
  93. package/package.json +21 -1
  94. package/dist/{chunk-4CUZZWFW.js → chunk-26OGEFQI.js} +3 -3
  95. package/dist/{chunk-H7DS4IO7.js → chunk-346QBNUD.js} +4 -4
  96. package/dist/{chunk-J3MB4PI5.cjs → chunk-A7YB7YWX.cjs} +3 -3
  97. package/dist/{chunk-AMCSSOJT.cjs → chunk-BNFIFRQA.cjs} +3 -3
  98. package/dist/{chunk-6L2TS2R3.cjs → chunk-KSUV74BE.cjs} +3 -3
  99. package/dist/{chunk-HDVVZG4S.cjs → chunk-RKCWYUGA.cjs} +3 -3
  100. package/dist/{chunk-2NRZKJG7.js → chunk-S2WNWMNT.js} +4 -4
  101. package/dist/{chunk-73RKQC5X.js → chunk-SZLXPF3G.js} +3 -3
@@ -6,7 +6,7 @@ var _chunkXSQPVDFHcjs = require('./chunk-XSQPVDFH.cjs');
6
6
  var _chunk4KFKWBN5cjs = require('./chunk-4KFKWBN5.cjs');
7
7
 
8
8
 
9
- var _chunk3E7CDKFOcjs = require('./chunk-3E7CDKFO.cjs');
9
+ var _chunkTGMVEHV7cjs = require('./chunk-TGMVEHV7.cjs');
10
10
 
11
11
 
12
12
  var _chunk7DPL3ZDScjs = require('./chunk-7DPL3ZDS.cjs');
@@ -16,14 +16,14 @@ var _chunkEJQCQPETcjs = require('./chunk-EJQCQPET.cjs');
16
16
 
17
17
 
18
18
 
19
- var _chunkFNEUOBCVcjs = require('./chunk-FNEUOBCV.cjs');
19
+ var _chunk7GHM4GKLcjs = require('./chunk-7GHM4GKL.cjs');
20
20
 
21
21
 
22
- var _chunk57SJ4LJFcjs = require('./chunk-57SJ4LJF.cjs');
23
22
 
23
+ var _chunkFNEUOBCVcjs = require('./chunk-FNEUOBCV.cjs');
24
24
 
25
25
 
26
- var _chunk7GHM4GKLcjs = require('./chunk-7GHM4GKL.cjs');
26
+ var _chunk57SJ4LJFcjs = require('./chunk-57SJ4LJF.cjs');
27
27
 
28
28
 
29
29
  var _chunkTK44VBIEcjs = require('./chunk-TK44VBIE.cjs');
@@ -275,7 +275,7 @@ var ButtonRoot = _react.forwardRef.call(void 0, function Button({
275
275
  );
276
276
  }
277
277
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ButtonProvider, { value: context, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
278
- _chunk3E7CDKFOcjs.PressableFeedback,
278
+ _chunkTGMVEHV7cjs.PressableFeedback,
279
279
  {
280
280
  ref,
281
281
  isPressed,
@@ -24,10 +24,13 @@ import {
24
24
  } from "./chunk-F6W3JQ7K.js";
25
25
  import {
26
26
  PressableFeedback
27
- } from "./chunk-6UEZJRVI.js";
27
+ } from "./chunk-LIUO6D3D.js";
28
28
  import {
29
29
  usePressState
30
30
  } from "./chunk-423RQBOX.js";
31
+ import {
32
+ createSlotContext
33
+ } from "./chunk-K72UDPVN.js";
31
34
  import {
32
35
  createRecipe,
33
36
  radiusAxis
@@ -35,9 +38,6 @@ import {
35
38
  import {
36
39
  useXAUITheme
37
40
  } from "./chunk-A3EGFI6T.js";
38
- import {
39
- createSlotContext
40
- } from "./chunk-K72UDPVN.js";
41
41
  import {
42
42
  useStyleProps
43
43
  } from "./chunk-M63GFNKV.js";
@@ -0,0 +1,407 @@
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
+
3
+ var _chunk7EIHHOHPcjs = require('./chunk-7EIHHOHP.cjs');
4
+
5
+
6
+ var _chunkTGMVEHV7cjs = require('./chunk-TGMVEHV7.cjs');
7
+
8
+
9
+ var _chunk7DPL3ZDScjs = require('./chunk-7DPL3ZDS.cjs');
10
+
11
+
12
+
13
+ var _chunk7GHM4GKLcjs = require('./chunk-7GHM4GKL.cjs');
14
+
15
+
16
+
17
+ var _chunkFNEUOBCVcjs = require('./chunk-FNEUOBCV.cjs');
18
+
19
+
20
+ var _chunk57SJ4LJFcjs = require('./chunk-57SJ4LJF.cjs');
21
+
22
+
23
+ var _chunkTK44VBIEcjs = require('./chunk-TK44VBIE.cjs');
24
+
25
+ // src/components/tabs/tabs-content.tsx
26
+ var _react = require('react');
27
+ var _reactnative = require('react-native');
28
+
29
+ // src/components/tabs/tabs.context.ts
30
+ var [TabsProvider, useTabs] = _chunk7GHM4GKLcjs.createSlotContext.call(void 0, "Tabs");
31
+ var [TabsTriggerProvider, useTabsTrigger] = _chunk7GHM4GKLcjs.createSlotContext.call(void 0, "Tabs.Trigger");
32
+
33
+ // src/components/tabs/tabs-content.tsx
34
+ var _jsxruntime = require('react/jsx-runtime');
35
+ var TabsContent = _react.forwardRef.call(void 0, function TabsContent2({ value, children, accessibilityRole = "tab", style, ...props }, ref) {
36
+ const { value: selected } = useTabs();
37
+ const [styleProps, rest] = _chunkTK44VBIEcjs.useStyleProps.call(void 0, props);
38
+ if (selected !== value) return null;
39
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
40
+ _reactnative.View,
41
+ {
42
+ ref,
43
+ accessibilityRole,
44
+ ...rest,
45
+ style: [styleProps, style],
46
+ children
47
+ }
48
+ );
49
+ });
50
+ TabsContent.displayName = "XAUI.Tabs.Content";
51
+
52
+ // src/components/tabs/tabs-indicator.tsx
53
+
54
+
55
+
56
+
57
+
58
+ var _reactnativereanimated = require('react-native-reanimated'); var _reactnativereanimated2 = _interopRequireDefault(_reactnativereanimated);
59
+
60
+ // src/components/tabs/tabs.animation.ts
61
+ var INDICATOR_SPRING = { damping: 20, stiffness: 220, mass: 0.6 };
62
+
63
+ // src/components/tabs/tabs-indicator.tsx
64
+
65
+ function TabsIndicator({ style, ...props }) {
66
+ const { indicatorStyle, value, rects } = useTabs();
67
+ const [styleProps, rest] = _chunkTK44VBIEcjs.useStyleProps.call(void 0, props);
68
+ const rect = value === void 0 ? void 0 : rects[value];
69
+ const x = _reactnativereanimated.useSharedValue.call(void 0, _nullishCoalesce(_optionalChain([rect, 'optionalAccess', _ => _.x]), () => ( 0)));
70
+ const width = _reactnativereanimated.useSharedValue.call(void 0, _nullishCoalesce(_optionalChain([rect, 'optionalAccess', _2 => _2.width]), () => ( 0)));
71
+ const hasArrived = _reactnativereanimated.useSharedValue.call(void 0, rect !== void 0);
72
+ _react.useEffect.call(void 0, () => {
73
+ if (rect === void 0) return;
74
+ if (hasArrived.get()) {
75
+ x.set(_reactnativereanimated.withSpring.call(void 0, rect.x, INDICATOR_SPRING));
76
+ width.set(_reactnativereanimated.withSpring.call(void 0, rect.width, INDICATOR_SPRING));
77
+ } else {
78
+ x.set(rect.x);
79
+ width.set(rect.width);
80
+ hasArrived.set(true);
81
+ }
82
+ }, [rect, hasArrived, width, x]);
83
+ const travel = _reactnativereanimated.useAnimatedStyle.call(void 0, () => ({
84
+ transform: [{ translateX: x.get() }],
85
+ width: width.get(),
86
+ opacity: hasArrived.get() ? 1 : 0
87
+ }));
88
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnativereanimated2.default.View, { ...rest, style: [indicatorStyle, travel, styleProps, style] });
89
+ }
90
+ TabsIndicator.displayName = "XAUI.Tabs.Indicator";
91
+
92
+ // src/components/tabs/tabs-label.tsx
93
+
94
+
95
+
96
+ var TabsLabel = _react.forwardRef.call(void 0, function TabsLabel2({ children, numberOfLines = 1, style, ...props }, ref) {
97
+ const { labelStyle, labelSelectedStyle } = useTabs();
98
+ const { isSelected } = useTabsTrigger();
99
+ const [styleProps, rest] = _chunkTK44VBIEcjs.useStyleProps.call(void 0, props);
100
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
101
+ _reactnative.Text,
102
+ {
103
+ ref,
104
+ numberOfLines,
105
+ ...rest,
106
+ style: [labelStyle, isSelected && labelSelectedStyle, styleProps, style],
107
+ children
108
+ }
109
+ );
110
+ });
111
+ TabsLabel.displayName = "XAUI.Tabs.Label";
112
+
113
+ // src/components/tabs/tabs-list.tsx
114
+
115
+
116
+
117
+ var TabsList = _react.forwardRef.call(void 0, function TabsList2({ children, accessibilityRole = "tablist", style, ...props }, ref) {
118
+ const { listStyle } = useTabs();
119
+ const [styleProps, rest] = _chunkTK44VBIEcjs.useStyleProps.call(void 0, props);
120
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
121
+ _reactnative.View,
122
+ {
123
+ ref,
124
+ accessibilityRole,
125
+ ...rest,
126
+ style: [listStyle, styleProps, style],
127
+ children
128
+ }
129
+ );
130
+ });
131
+ TabsList.displayName = "XAUI.Tabs.List";
132
+
133
+ // src/components/tabs/tabs-trigger.tsx
134
+
135
+
136
+ var TabsTrigger = _react.forwardRef.call(void 0, function TabsTrigger2({
137
+ value,
138
+ children,
139
+ isDisabled = false,
140
+ asChild = false,
141
+ accessibilityRole = "tab",
142
+ accessibilityState,
143
+ style,
144
+ onLayout,
145
+ onPress,
146
+ onPressIn,
147
+ onPressOut,
148
+ ...props
149
+ }, ref) {
150
+ const {
151
+ triggerStyle,
152
+ value: selected,
153
+ isDisabled: isRootDisabled,
154
+ select,
155
+ setRect
156
+ } = useTabs();
157
+ const [styleProps, rest] = _chunkTK44VBIEcjs.useStyleProps.call(void 0, props);
158
+ const [isPressed, press] = _chunk7DPL3ZDScjs.usePressState.call(void 0, { onPressIn, onPressOut });
159
+ const isSelected = selected === value;
160
+ const disabled = isRootDisabled || isDisabled;
161
+ const measure = _react.useCallback.call(void 0,
162
+ (event) => {
163
+ _optionalChain([onLayout, 'optionalCall', _3 => _3(event)]);
164
+ const { x, width } = event.nativeEvent.layout;
165
+ setRect(value, { x, width });
166
+ },
167
+ [onLayout, setRect, value]
168
+ );
169
+ const handlePress = _react.useCallback.call(void 0,
170
+ (event) => {
171
+ _optionalChain([onPress, 'optionalCall', _4 => _4(event)]);
172
+ select(value);
173
+ },
174
+ [onPress, select, value]
175
+ );
176
+ const context = _react.useMemo.call(void 0,
177
+ () => ({ isSelected, isPressed, isDisabled: disabled }),
178
+ [isSelected, isPressed, disabled]
179
+ );
180
+ const text = typeof children === "function" ? null : _chunk7GHM4GKLcjs.childrenToString.call(void 0, children);
181
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TabsTriggerProvider, { value: context, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
182
+ _chunkTGMVEHV7cjs.PressableFeedback,
183
+ {
184
+ ref,
185
+ isPressed,
186
+ isDisabled: disabled,
187
+ asChild,
188
+ accessibilityRole,
189
+ accessibilityState: {
190
+ disabled,
191
+ selected: isSelected,
192
+ ...accessibilityState
193
+ },
194
+ ...rest,
195
+ onLayout: measure,
196
+ style: [
197
+ triggerStyle,
198
+ styleProps,
199
+ typeof style === "function" ? style({ pressed: isPressed }) : style
200
+ ],
201
+ onPress: handlePress,
202
+ onPressIn: press.onPressIn,
203
+ onPressOut: press.onPressOut,
204
+ children: typeof children === "function" ? children(context) : text !== null ? (
205
+ // R3 — a stringifiable tab becomes its label, which is what makes the common
206
+ // case `<Tabs.Trigger value="all">Tout</Tabs.Trigger>`.
207
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TabsLabel, { children: text })
208
+ ) : children
209
+ }
210
+ ) });
211
+ });
212
+ TabsTrigger.displayName = "XAUI.Tabs.Trigger";
213
+
214
+ // src/components/tabs/tabs.tsx
215
+
216
+
217
+
218
+ // src/components/tabs/tabs.recipe.ts
219
+ var SLOTS = ["root", "list", "trigger", "label", "indicator", "content"];
220
+ var VARIANT_TOKENS = {
221
+ primary: { bg: "default", bgSelected: "segment", fgSelected: "segmentForeground" },
222
+ secondary: { bgSelected: "accent", fgSelected: "foreground" },
223
+ // The accent rather than the foreground: with nothing else moving, the colour is the
224
+ // whole signal, and a chosen tab in plain ink reads as one that is merely darker.
225
+ light: { fgSelected: "accent" }
226
+ };
227
+ var SIZES = {
228
+ sm: { paddingHorizontal: 2.5, paddingVertical: 1, gap: 1, label: "sm" },
229
+ md: { paddingHorizontal: 3, paddingVertical: 1.5, gap: 1.5, label: "md" },
230
+ lg: { paddingHorizontal: 4, paddingVertical: 2, gap: 2, label: "lg" }
231
+ };
232
+ var TRACK_INSET = 3;
233
+ function sizeAxis(step) {
234
+ const { paddingHorizontal, paddingVertical, gap, label } = step;
235
+ return (theme) => ({
236
+ trigger: {
237
+ paddingHorizontal: theme.spacing(paddingHorizontal),
238
+ paddingVertical: theme.spacing(paddingVertical),
239
+ gap: theme.spacing(gap)
240
+ },
241
+ label: {
242
+ fontSize: theme.fontSizes[label],
243
+ lineHeight: theme.lineHeights[label]
244
+ }
245
+ });
246
+ }
247
+ var tabsRecipe = _chunkFNEUOBCVcjs.createRecipe.call(void 0, {
248
+ slots: SLOTS,
249
+ base: (theme) => ({
250
+ root: { flexDirection: "column", gap: theme.spacing(2) },
251
+ list: {
252
+ // Hugs its tabs rather than filling the row. A tab bar as wide as the screen with
253
+ // three tabs in it is a segmented control pretending to be a navigation bar.
254
+ alignSelf: "flex-start",
255
+ flexDirection: "row",
256
+ alignItems: "center",
257
+ borderCurve: "continuous"
258
+ },
259
+ trigger: {
260
+ flexDirection: "row",
261
+ alignItems: "center",
262
+ justifyContent: "center"
263
+ },
264
+ label: {
265
+ fontFamily: theme.fontFamilies.body,
266
+ fontWeight: theme.fontWeights.medium,
267
+ color: theme.colors.muted
268
+ },
269
+ // Behind the triggers, not over them: it is the surface the chosen tab sits on.
270
+ indicator: { position: "absolute", zIndex: 0, borderCurve: "continuous" }
271
+ }),
272
+ variantTokens: VARIANT_TOKENS,
273
+ paint: (_theme, colors) => ({
274
+ list: { backgroundColor: colors.bg },
275
+ indicator: { backgroundColor: colors.bgSelected },
276
+ // Read by the root and handed to the chosen trigger's label alone, which is why it is
277
+ // on a slot the recipe otherwise leaves to `muted`.
278
+ content: { color: colors.fgSelected }
279
+ }),
280
+ variants: {
281
+ size: {
282
+ sm: sizeAxis(SIZES.sm),
283
+ md: sizeAxis(SIZES.md),
284
+ lg: sizeAxis(SIZES.lg)
285
+ },
286
+ radius: _chunkFNEUOBCVcjs.radiusAxis.call(void 0, "list", "indicator")
287
+ },
288
+ /**
289
+ * Where the shapes differ, and `light` is absent on purpose: the base gives the list no
290
+ * padding, no corner and no edge, so a shape that adds none of them is the base itself.
291
+ * `primary` is a pill inside a filled track, so the track is padded and both corners are
292
+ * round; `secondary` is a rule along a bottom edge, so the track carries a hairline and
293
+ * the indicator is that rule.
294
+ */
295
+ compoundVariants: [
296
+ {
297
+ when: { variant: "primary" },
298
+ style: (theme) => ({
299
+ list: { padding: TRACK_INSET, borderRadius: theme.radius["3xl"] },
300
+ indicator: {
301
+ top: TRACK_INSET,
302
+ bottom: TRACK_INSET,
303
+ borderRadius: theme.radius["3xl"],
304
+ ...theme.shadows.surface
305
+ }
306
+ })
307
+ },
308
+ {
309
+ when: { variant: "secondary" },
310
+ style: (theme) => ({
311
+ list: {
312
+ borderBottomWidth: theme.borderWidth.default,
313
+ borderColor: theme.colors.border
314
+ },
315
+ // Two points rather than a hairline: a rule that says which tab is chosen has to
316
+ // outweigh the one it sits on.
317
+ indicator: { bottom: 0, height: 2, borderRadius: 0 }
318
+ })
319
+ }
320
+ ],
321
+ states: {
322
+ disabled: (theme) => ({ list: { opacity: theme.opacity.disabled } })
323
+ },
324
+ defaultVariants: { variant: "primary", size: "md" }
325
+ });
326
+
327
+ // src/components/tabs/tabs.tsx
328
+
329
+ var TabsRoot = _react.forwardRef.call(void 0, function Tabs({
330
+ children,
331
+ variant,
332
+ size,
333
+ radius,
334
+ color,
335
+ value: controlledValue,
336
+ defaultValue,
337
+ onValueChange,
338
+ isDisabled = false,
339
+ style,
340
+ ...props
341
+ }, ref) {
342
+ const theme = _chunk57SJ4LJFcjs.useXAUITheme.call(void 0, );
343
+ const [styleProps, rest] = _chunkTK44VBIEcjs.useStyleProps.call(void 0, props);
344
+ const [rects, setRects] = _react.useState.call(void 0, {});
345
+ const [value, setValue] = _chunk7EIHHOHPcjs.useControllableState.call(void 0, {
346
+ value: controlledValue,
347
+ defaultValue,
348
+ onChange: onValueChange
349
+ });
350
+ const selection = { variant, size, radius };
351
+ const styles = tabsRecipe.resolve({
352
+ theme,
353
+ selection,
354
+ states: { disabled: isDisabled }
355
+ });
356
+ const tint = color ? tabsRecipe.tint({ theme, color, selection }) : void 0;
357
+ const select = _react.useCallback.call(void 0, (next) => setValue(next), [setValue]);
358
+ const setRect = _react.useCallback.call(void 0, (tab, rect) => {
359
+ setRects((current) => {
360
+ const previous = current[tab];
361
+ if (previous && previous.x === rect.x && previous.width === rect.width)
362
+ return current;
363
+ return { ...current, [tab]: rect };
364
+ });
365
+ }, []);
366
+ const context = _react.useMemo.call(void 0, () => {
367
+ const selected = _reactnative.StyleSheet.flatten([styles.content, _optionalChain([tint, 'optionalAccess', _5 => _5.content])]);
368
+ return {
369
+ listStyle: tint ? [styles.list, tint.list] : styles.list,
370
+ triggerStyle: styles.trigger,
371
+ labelStyle: styles.label,
372
+ labelSelectedStyle: { color: selected.color },
373
+ indicatorStyle: tint ? [styles.indicator, tint.indicator] : styles.indicator,
374
+ contentStyle: void 0,
375
+ variant: _nullishCoalesce(variant, () => ( "primary")),
376
+ value,
377
+ isDisabled,
378
+ select,
379
+ rects,
380
+ setRect
381
+ };
382
+ }, [styles, tint, variant, value, isDisabled, select, rects, setRect]);
383
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TabsProvider, { value: context, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.View, { ref, ...rest, style: [styles.root, styleProps, style], children }) });
384
+ });
385
+ TabsRoot.displayName = "XAUI.Tabs.Root";
386
+
387
+ // src/components/tabs/index.ts
388
+ var Tabs2 = Object.assign(TabsRoot, {
389
+ List: TabsList,
390
+ Trigger: TabsTrigger,
391
+ Label: TabsLabel,
392
+ Indicator: TabsIndicator,
393
+ Content: TabsContent
394
+ });
395
+
396
+
397
+
398
+
399
+
400
+
401
+
402
+
403
+
404
+
405
+
406
+
407
+ exports.useTabs = useTabs; exports.useTabsTrigger = useTabsTrigger; exports.TabsContent = TabsContent; exports.TabsIndicator = TabsIndicator; exports.TabsLabel = TabsLabel; exports.TabsList = TabsList; exports.TabsTrigger = TabsTrigger; exports.tabsRecipe = tabsRecipe; exports.TabsRoot = TabsRoot; exports.Tabs = Tabs2;
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  TextFieldField,
3
3
  useTextField
4
- } from "./chunk-2NRZKJG7.js";
4
+ } from "./chunk-S2WNWMNT.js";
5
5
  import {
6
6
  Icon
7
7
  } from "./chunk-FHUYHV6J.js";
@@ -5,7 +5,7 @@ import {
5
5
  TextFieldLabel,
6
6
  TextFieldRoot,
7
7
  useTextField
8
- } from "./chunk-2NRZKJG7.js";
8
+ } from "./chunk-S2WNWMNT.js";
9
9
  import {
10
10
  createSlotContext
11
11
  } from "./chunk-K72UDPVN.js";
@@ -1,7 +1,7 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); 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 _chunkJ3MB4PI5cjs = require('./chunk-J3MB4PI5.cjs');
4
+ var _chunkA7YB7YWXcjs = require('./chunk-A7YB7YWX.cjs');
5
5
 
6
6
 
7
7
  var _chunk4KFKWBN5cjs = require('./chunk-4KFKWBN5.cjs');
@@ -36,7 +36,7 @@ var FieldGroupField = _react.forwardRef.call(void 0,
36
36
  () => decoratorPadding(prefixWidth, suffixWidth),
37
37
  [prefixWidth, suffixWidth]
38
38
  );
39
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJ3MB4PI5cjs.TextFieldField, { ref, ...props, style: [padding, style] });
39
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkA7YB7YWXcjs.TextFieldField, { ref, ...props, style: [padding, style] });
40
40
  }
41
41
  );
42
42
  FieldGroupField.displayName = "XAUI.FieldGroup.Field";
@@ -44,7 +44,7 @@ FieldGroupField.displayName = "XAUI.FieldGroup.Field";
44
44
  // src/components/field-group/field-group-icon.tsx
45
45
 
46
46
  function FieldGroupIcon({ size, color, ...rest }) {
47
- const { icon } = _chunkJ3MB4PI5cjs.useTextField.call(void 0, );
47
+ const { icon } = _chunkA7YB7YWXcjs.useTextField.call(void 0, );
48
48
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk4KFKWBN5cjs.Icon, { size: _nullishCoalesce(size, () => ( icon.size)), color: _nullishCoalesce(color, () => ( icon.color)), ...rest });
49
49
  }
50
50
  FieldGroupIcon.displayName = "XAUI.FieldGroup.Icon";
@@ -58,7 +58,7 @@ var _reactnative = require('react-native');
58
58
 
59
59
  var FieldGroupDecorator = _react.forwardRef.call(void 0,
60
60
  function FieldGroupDecorator2({ side, children, isDecorative = false, onLayout, style, ...props }, ref) {
61
- const { prefixStyle, suffixStyle, isDisabled } = _chunkJ3MB4PI5cjs.useTextField.call(void 0, );
61
+ const { prefixStyle, suffixStyle, isDisabled } = _chunkA7YB7YWXcjs.useTextField.call(void 0, );
62
62
  const { setPrefixWidth, setSuffixWidth } = useFieldGroup();
63
63
  const [styleProps, rest] = _chunkTK44VBIEcjs.useStyleProps.call(void 0, props);
64
64
  const report = side === "prefix" ? setPrefixWidth : setSuffixWidth;
@@ -1,7 +1,7 @@
1
1
  import { useControllableState } from "./chunk-F6W3JQ7K.js";
2
+ import { createSlotContext } from "./chunk-K72UDPVN.js";
2
3
  import { createRecipe, radiusAxis } from "./chunk-4GTAZM2C.js";
3
4
  import { useXAUITheme } from "./chunk-A3EGFI6T.js";
4
- import { createSlotContext } from "./chunk-K72UDPVN.js";
5
5
  import { useStyleProps } from "./chunk-M63GFNKV.js";
6
6
 
7
7
  // src/components/input-otp/input-otp-box.tsx
@@ -40,10 +40,10 @@ function InputOTPCaret({
40
40
  });
41
41
  }
42
42
  InputOTPCaret.displayName = "XAUI.InputOTP.Caret";
43
- const _worklet_16670090179149_init_data = {
44
- code: "function chunkDG2I4PJGJs1(){const{opacity}=this.__closure;return{opacity:opacity.value};}",
45
- location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-DG2I4PJG.js",
46
- sourceMap: "{\"version\":3,\"names\":[\"chunkDG2I4PJGJs1\",\"opacity\",\"__closure\",\"value\"],\"sources\":[\"/home/runner/work/xaui/xaui/packages/native/dist/chunk-DG2I4PJG.js\"],\"mappings\":\"AA8DyC,SAAAA,gBAAMA,CAAA,QAAAC,OAAA,OAAAC,SAAA,CAE3C,MAAO,CAAED,OAAO,CAAEA,OAAO,CAACE,KAAM,CAAC,CACnC\",\"ignoreList\":[]}"
43
+ const _worklet_15888708666305_init_data = {
44
+ code: "function chunkSACDOFGFJs1(){const{opacity}=this.__closure;return{opacity:opacity.value};}",
45
+ location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-SACDOFGF.js",
46
+ sourceMap: "{\"version\":3,\"names\":[\"chunkSACDOFGFJs1\",\"opacity\",\"__closure\",\"value\"],\"sources\":[\"/home/runner/work/xaui/xaui/packages/native/dist/chunk-SACDOFGF.js\"],\"mappings\":\"AA8DyC,SAAAA,gBAAMA,CAAA,QAAAC,OAAA,OAAAC,SAAA,CAE3C,MAAO,CAAED,OAAO,CAAEA,OAAO,CAACE,KAAM,CAAC,CACnC\",\"ignoreList\":[]}"
47
47
  };
48
48
  function BlinkingCaret({
49
49
  style
@@ -56,26 +56,26 @@ function BlinkingCaret({
56
56
  }), -1, true);
57
57
  return () => cancelAnimation(opacity);
58
58
  }, [opacity]);
59
- const animatedStyle = useAnimatedStyle(function chunkDG2I4PJGJs1Factory({
60
- _worklet_16670090179149_init_data,
59
+ const animatedStyle = useAnimatedStyle(function chunkSACDOFGFJs1Factory({
60
+ _worklet_15888708666305_init_data,
61
61
  opacity
62
62
  }) {
63
63
  const _e = [new global.Error(), -2, -27];
64
- const chunkDG2I4PJGJs1 = function () {
64
+ const chunkSACDOFGFJs1 = function () {
65
65
  return {
66
66
  opacity: opacity.value
67
67
  };
68
68
  };
69
- chunkDG2I4PJGJs1.__closure = {
69
+ chunkSACDOFGFJs1.__closure = {
70
70
  opacity
71
71
  };
72
- chunkDG2I4PJGJs1.__workletHash = 16670090179149;
73
- chunkDG2I4PJGJs1.__pluginVersion = "0.7.4";
74
- chunkDG2I4PJGJs1.__initData = _worklet_16670090179149_init_data;
75
- chunkDG2I4PJGJs1.__stackDetails = _e;
76
- return chunkDG2I4PJGJs1;
72
+ chunkSACDOFGFJs1.__workletHash = 15888708666305;
73
+ chunkSACDOFGFJs1.__pluginVersion = "0.7.4";
74
+ chunkSACDOFGFJs1.__initData = _worklet_15888708666305_init_data;
75
+ chunkSACDOFGFJs1.__stackDetails = _e;
76
+ return chunkSACDOFGFJs1;
77
77
  }({
78
- _worklet_16670090179149_init_data,
78
+ _worklet_15888708666305_init_data,
79
79
  opacity
80
80
  }), [opacity]);
81
81
  return /* @__PURE__ */jsx(Animated.View, {
@@ -37,9 +37,9 @@ function _optionalChain(ops) {
37
37
  return value;
38
38
  }
39
39
  var _chunk7EIHHOHPcjs = require('./chunk-7EIHHOHP.cjs');
40
+ var _chunk7GHM4GKLcjs = require('./chunk-7GHM4GKL.cjs');
40
41
  var _chunkFNEUOBCVcjs = require('./chunk-FNEUOBCV.cjs');
41
42
  var _chunk57SJ4LJFcjs = require('./chunk-57SJ4LJF.cjs');
42
- var _chunk7GHM4GKLcjs = require('./chunk-7GHM4GKL.cjs');
43
43
  var _chunkTK44VBIEcjs = require('./chunk-TK44VBIE.cjs');
44
44
 
45
45
  // src/components/input-otp/input-otp-box.tsx
@@ -78,10 +78,10 @@ function InputOTPCaret({
78
78
  });
79
79
  }
80
80
  InputOTPCaret.displayName = "XAUI.InputOTP.Caret";
81
- const _worklet_9856484408150_init_data = {
82
- code: "function chunkABAGZTXZCjs1(){const{opacity}=this.__closure;return{opacity:opacity.value};}",
83
- location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-ABAGZTXZ.cjs",
84
- sourceMap: "{\"version\":3,\"names\":[\"chunkABAGZTXZCjs1\",\"opacity\",\"__closure\",\"value\"],\"sources\":[\"/home/runner/work/xaui/xaui/packages/native/dist/chunk-ABAGZTXZ.cjs\"],\"mappings\":\"AA8D6E,SAAAA,iBAAMA,CAAA,QAAAC,OAAA,OAAAC,SAAA,CAE/E,MAAO,CAAED,OAAO,CAAEA,OAAO,CAACE,KAAM,CAAC,CACnC\",\"ignoreList\":[]}"
81
+ const _worklet_1955422709024_init_data = {
82
+ code: "function chunkSIP5J7HUCjs1(){const{opacity}=this.__closure;return{opacity:opacity.value};}",
83
+ location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-SIP5J7HU.cjs",
84
+ sourceMap: "{\"version\":3,\"names\":[\"chunkSIP5J7HUCjs1\",\"opacity\",\"__closure\",\"value\"],\"sources\":[\"/home/runner/work/xaui/xaui/packages/native/dist/chunk-SIP5J7HU.cjs\"],\"mappings\":\"AA8D6E,SAAAA,iBAAMA,CAAA,QAAAC,OAAA,OAAAC,SAAA,CAE/E,MAAO,CAAED,OAAO,CAAEA,OAAO,CAACE,KAAM,CAAC,CACnC\",\"ignoreList\":[]}"
85
85
  };
86
86
  function BlinkingCaret({
87
87
  style
@@ -94,26 +94,26 @@ function BlinkingCaret({
94
94
  }), -1, true);
95
95
  return () => _reactnativereanimated.cancelAnimation.call(void 0, opacity);
96
96
  }, [opacity]);
97
- const animatedStyle = _reactnativereanimated.useAnimatedStyle.call(void 0, function chunkABAGZTXZCjs1Factory({
98
- _worklet_9856484408150_init_data,
97
+ const animatedStyle = _reactnativereanimated.useAnimatedStyle.call(void 0, function chunkSIP5J7HUCjs1Factory({
98
+ _worklet_1955422709024_init_data,
99
99
  opacity
100
100
  }) {
101
101
  const _e = [new global.Error(), -2, -27];
102
- const chunkABAGZTXZCjs1 = function () {
102
+ const chunkSIP5J7HUCjs1 = function () {
103
103
  return {
104
104
  opacity: opacity.value
105
105
  };
106
106
  };
107
- chunkABAGZTXZCjs1.__closure = {
107
+ chunkSIP5J7HUCjs1.__closure = {
108
108
  opacity
109
109
  };
110
- chunkABAGZTXZCjs1.__workletHash = 9856484408150;
111
- chunkABAGZTXZCjs1.__pluginVersion = "0.7.4";
112
- chunkABAGZTXZCjs1.__initData = _worklet_9856484408150_init_data;
113
- chunkABAGZTXZCjs1.__stackDetails = _e;
114
- return chunkABAGZTXZCjs1;
110
+ chunkSIP5J7HUCjs1.__workletHash = 1955422709024;
111
+ chunkSIP5J7HUCjs1.__pluginVersion = "0.7.4";
112
+ chunkSIP5J7HUCjs1.__initData = _worklet_1955422709024_init_data;
113
+ chunkSIP5J7HUCjs1.__stackDetails = _e;
114
+ return chunkSIP5J7HUCjs1;
115
115
  }({
116
- _worklet_9856484408150_init_data,
116
+ _worklet_1955422709024_init_data,
117
117
  opacity
118
118
  }), [opacity]);
119
119
  return /* @__PURE__ */_jsxruntime.jsx.call(void 0, _reactnativereanimated2.default.View, {