@xaui/native 0.9.1-alpha.3 → 0.9.1-alpha.31

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 (149) hide show
  1. package/dist/chunk-3FV4COTM.js +68 -0
  2. package/dist/chunk-423RQBOX.js +21 -0
  3. package/dist/chunk-42FMGB5M.js +661 -0
  4. package/dist/chunk-4GTAZM2C.js +174 -0
  5. package/dist/chunk-4XPLPQLM.cjs +147 -0
  6. package/dist/{chunk-3QBT3Q65.cjs → chunk-57SJ4LJF.cjs} +7 -2
  7. package/dist/chunk-5GO7MAVY.cjs +74 -0
  8. package/dist/chunk-5PTBRJM7.cjs +346 -0
  9. package/dist/chunk-5RQ7AZPN.cjs +455 -0
  10. package/dist/chunk-5Z4P6WHR.cjs +525 -0
  11. package/dist/chunk-7DPL3ZDS.cjs +21 -0
  12. package/dist/chunk-7EIHHOHP.cjs +42 -0
  13. package/dist/chunk-7SEZGVTY.js +62 -0
  14. package/dist/chunk-7XKQJQF2.cjs +70 -0
  15. package/dist/{chunk-X2K2FX3W.js → chunk-A3EGFI6T.js} +6 -1
  16. package/dist/chunk-A5OCK3C2.js +525 -0
  17. package/dist/chunk-AETWQQWU.cjs +92 -0
  18. package/dist/chunk-ANNUYP55.cjs +431 -0
  19. package/dist/chunk-BA2DBSAN.js +102 -0
  20. package/dist/chunk-BFMTUMTU.js +669 -0
  21. package/dist/chunk-BVJQ3UPZ.js +62 -0
  22. package/dist/chunk-DFME724B.js +147 -0
  23. package/dist/chunk-E2CWBQTV.js +119 -0
  24. package/dist/chunk-EGLLDKN6.js +9 -0
  25. package/dist/chunk-EJQCQPET.cjs +9 -0
  26. package/dist/chunk-F6CQ6CBI.cjs +112 -0
  27. package/dist/chunk-F6W3JQ7K.js +42 -0
  28. package/dist/chunk-FNEUOBCV.cjs +174 -0
  29. package/dist/chunk-G7K652GC.js +145 -0
  30. package/dist/chunk-GGW42MY4.js +20 -0
  31. package/dist/chunk-GLGU2WFL.cjs +190 -0
  32. package/dist/chunk-GPVNCJ3Z.cjs +696 -0
  33. package/dist/chunk-GVQOD3VW.js +74 -0
  34. package/dist/chunk-IHOCANCQ.js +293 -0
  35. package/dist/chunk-JDFV4W6N.cjs +700 -0
  36. package/dist/chunk-KOC3KQIT.js +124 -0
  37. package/dist/chunk-KPWZLUES.cjs +124 -0
  38. package/dist/chunk-L7JN6OBQ.cjs +314 -0
  39. package/dist/chunk-MC7SY2QH.cjs +20 -0
  40. package/dist/chunk-MDVSCWJI.js +314 -0
  41. package/dist/chunk-N527BTY4.cjs +366 -0
  42. package/dist/chunk-NYRXUGVL.js +104 -0
  43. package/dist/{chunk-AW63PTQ4.cjs → chunk-OHEHPQLC.cjs} +72 -72
  44. package/dist/chunk-Q3WFY5N3.js +366 -0
  45. package/dist/chunk-QGN2BBJO.cjs +104 -0
  46. package/dist/chunk-RDTKAAHX.js +346 -0
  47. package/dist/chunk-TGZZ3RZU.cjs +86 -0
  48. package/dist/{chunk-2KXQATVL.js → chunk-TZG3DERP.js} +46 -46
  49. package/dist/chunk-URSKA2VR.js +190 -0
  50. package/dist/chunk-V4WDMM6Z.js +86 -0
  51. package/dist/chunk-VJEER76X.js +455 -0
  52. package/dist/chunk-VZBWYWEI.cjs +736 -0
  53. package/dist/chunk-WR7YLDVV.cjs +68 -0
  54. package/dist/chunk-X4HQ4H2V.js +701 -0
  55. package/dist/chunk-XFSW3ZNI.cjs +145 -0
  56. package/dist/chunk-XQFAUDR2.cjs +62 -0
  57. package/dist/chunk-ZH5XVNHG.js +92 -0
  58. package/dist/chunk-ZH6BHLQR.js +431 -0
  59. package/dist/chunk-ZP2E2H2G.cjs +119 -0
  60. package/dist/chunk-ZVWXM3UK.cjs +293 -0
  61. package/dist/close-button.type-BUYuoSt2.d.ts +36 -0
  62. package/dist/close-button.type-CHsgZ3wO.d.cts +36 -0
  63. package/dist/components/alert/index.cjs +20 -0
  64. package/dist/components/alert/index.d.cts +169 -0
  65. package/dist/components/alert/index.d.ts +169 -0
  66. package/dist/components/alert/index.js +20 -0
  67. package/dist/components/button/index.cjs +21 -0
  68. package/dist/components/button/index.d.cts +613 -0
  69. package/dist/components/button/index.d.ts +613 -0
  70. package/dist/components/button/index.js +21 -0
  71. package/dist/components/card/index.cjs +22 -0
  72. package/dist/components/card/index.d.cts +620 -0
  73. package/dist/components/card/index.d.ts +620 -0
  74. package/dist/components/card/index.js +22 -0
  75. package/dist/components/checkbox/index.cjs +26 -0
  76. package/dist/components/checkbox/index.d.cts +1136 -0
  77. package/dist/components/checkbox/index.d.ts +1136 -0
  78. package/dist/components/checkbox/index.js +26 -0
  79. package/dist/components/chip/index.cjs +20 -0
  80. package/dist/components/chip/index.d.cts +608 -0
  81. package/dist/components/chip/index.d.ts +608 -0
  82. package/dist/components/chip/index.js +20 -0
  83. package/dist/components/divider/index.cjs +13 -0
  84. package/dist/components/divider/index.d.cts +117 -0
  85. package/dist/components/divider/index.d.ts +117 -0
  86. package/dist/components/divider/index.js +13 -0
  87. package/dist/components/input/index.cjs +25 -0
  88. package/dist/components/input/index.d.cts +205 -0
  89. package/dist/components/input/index.d.ts +205 -0
  90. package/dist/components/input/index.js +25 -0
  91. package/dist/components/input-group/index.cjs +27 -0
  92. package/dist/components/input-group/index.d.cts +270 -0
  93. package/dist/components/input-group/index.d.ts +270 -0
  94. package/dist/components/input-group/index.js +27 -0
  95. package/dist/components/input-otp/index.cjs +29 -0
  96. package/dist/components/input-otp/index.d.cts +325 -0
  97. package/dist/components/input-otp/index.d.ts +325 -0
  98. package/dist/components/input-otp/index.js +29 -0
  99. package/dist/components/radio/index.cjs +26 -0
  100. package/dist/components/radio/index.d.cts +1102 -0
  101. package/dist/components/radio/index.d.ts +1102 -0
  102. package/dist/components/radio/index.js +26 -0
  103. package/dist/components/spinner/index.cjs +16 -0
  104. package/dist/components/spinner/index.d.cts +104 -0
  105. package/dist/components/spinner/index.d.ts +104 -0
  106. package/dist/components/spinner/index.js +16 -0
  107. package/dist/components/switch/index.cjs +27 -0
  108. package/dist/components/switch/index.d.cts +1154 -0
  109. package/dist/components/switch/index.d.ts +1154 -0
  110. package/dist/components/switch/index.js +27 -0
  111. package/dist/components/text-area/index.cjs +14 -0
  112. package/dist/components/text-area/index.d.cts +73 -0
  113. package/dist/components/text-area/index.d.ts +73 -0
  114. package/dist/components/text-area/index.js +14 -0
  115. package/dist/components/typography/index.cjs +15 -0
  116. package/dist/components/typography/index.d.cts +116 -0
  117. package/dist/components/typography/index.d.ts +116 -0
  118. package/dist/components/typography/index.js +15 -0
  119. package/dist/components/view/index.cjs +17 -0
  120. package/dist/components/view/index.d.cts +152 -0
  121. package/dist/components/view/index.d.ts +152 -0
  122. package/dist/components/view/index.js +17 -0
  123. package/dist/create-recipe-BdVd2ffi.d.ts +114 -0
  124. package/dist/create-recipe-dC7wMfnj.d.cts +114 -0
  125. package/dist/icon.type-Kml72iSz.d.ts +73 -0
  126. package/dist/icon.type-d_i9ma-i.d.cts +73 -0
  127. package/dist/index.cjs +252 -4
  128. package/dist/index.d.cts +110 -4
  129. package/dist/index.d.ts +110 -4
  130. package/dist/index.js +271 -23
  131. package/dist/input.type-BUMDlzL9.d.cts +167 -0
  132. package/dist/input.type-D2qgi03E.d.ts +167 -0
  133. package/dist/pressable-feedback.type-BA2C9sSz.d.cts +127 -0
  134. package/dist/pressable-feedback.type-Bs4dQlGj.d.ts +127 -0
  135. package/dist/style-props.type-CfnoGEP7.d.cts +31 -0
  136. package/dist/style-props.type-CfnoGEP7.d.ts +31 -0
  137. package/dist/system/index.cjs +60 -3
  138. package/dist/system/index.d.cts +347 -181
  139. package/dist/system/index.d.ts +347 -181
  140. package/dist/system/index.js +71 -14
  141. package/dist/theme/index.cjs +4 -3
  142. package/dist/theme/index.d.cts +34 -23
  143. package/dist/theme/index.d.ts +34 -23
  144. package/dist/theme/index.js +3 -2
  145. package/dist/{theme.type-C9bFJKFm.d.cts → theme.type-C2gNHpEx.d.cts} +1 -1
  146. package/dist/{theme.type-C9bFJKFm.d.ts → theme.type-C2gNHpEx.d.ts} +1 -1
  147. package/package.json +184 -18
  148. package/dist/chunk-QAMNNTGM.js +0 -637
  149. package/dist/chunk-V63JO65F.cjs +0 -637
package/dist/index.d.ts CHANGED
@@ -1,6 +1,112 @@
1
- export { AnimationConfig, AnimationProp, AsChildProps, Axes, CompoundVariant, FeedbackContext, FeedbackVariant, HIGHLIGHT_OPACITY, MergeableProps, PRESS_DURATION, PRESS_SCALE, PossibleRef, PressableFeedback, PressableFeedbackHighlightProps, PressableFeedbackProps, PressableFeedbackRippleProps, RELEASE_DURATION, RIPPLE_COVERAGE, RIPPLE_DURATION, RIPPLE_OPACITY, Recipe, RecipeConfig, ResolveArgs, ResolvedAnimation, ResolvedSelection, ResolvedStyles, Selection, Slot, SlotAnimation, SlotProps, SlotStyle, SlotStyles, StateName, States, StyleFn, TintArgs, VariantColors, VariantRole, VariantTokens, childrenToString, createRecipe, createSlotContext, mergeProps, mergeRefs, resolveAnimation, resolveSlotAnimation, useFeedback } from './system/index.js';
1
+ export { Alert, AlertCloseProps, AlertContentProps, AlertContextValue, AlertDescriptionProps, AlertIconProps, AlertProps, AlertSize, AlertSlot, AlertTitleProps, AlertVariant, alertRecipe, useAlert } from './components/alert/index.js';
2
+ export { Button, ButtonContextValue, ButtonIconProps, ButtonLabelProps, ButtonProps, ButtonSize, ButtonSlot, ButtonSpinnerProps, ButtonVariant, buttonRecipe, useButton } from './components/button/index.js';
3
+ export { CARD_BACKGROUND, Card, CardBackgroundProps, CardBodyProps, CardContextValue, CardDescriptionProps, CardFooterProps, CardHeaderProps, CardProps, CardSize, CardSlot, CardTitleProps, CardVariant, cardRecipe, markBackground, useCard } from './components/card/index.js';
4
+ export { Checkbox, CheckboxContextValue, CheckboxIndicator, CheckboxIndicatorProps, CheckboxLabel, CheckboxLabelProps, CheckboxProps, CheckboxRoot, CheckboxSize, CheckboxSlot, CheckboxVariant, checkboxRecipe, useCheckbox } from './components/checkbox/index.js';
5
+ export { Chip, ChipAvatarProps, ChipCloseProps, ChipContextValue, ChipDotProps, ChipIconProps, ChipLabelProps, ChipProps, ChipSize, ChipSlot, ChipVariant, chipRecipe, useChip } from './components/chip/index.js';
6
+ export { Divider, DividerOrientation, DividerProps, DividerSize, DividerSlot, dividerRecipe } from './components/divider/index.js';
7
+ export { Input, InputDescription, InputError, InputField, InputLabel, InputRoot, inputRecipe, useInput } from './components/input/index.js';
8
+ export { InputGroup, InputGroupContextValue, InputGroupField, InputGroupFieldProps, InputGroupIcon, InputGroupIconProps, InputGroupPrefix, InputGroupPrefixProps, InputGroupProps, InputGroupRoot, InputGroupSide, InputGroupSuffix, InputGroupSuffixProps, decoratorPadding, useInputGroup } from './components/input-group/index.js';
9
+ export { InputOTP, InputOTPBoxContextValue, InputOTPBoxProps, InputOTPCaretProps, InputOTPContextValue, InputOTPGroupProps, InputOTPHandle, InputOTPPattern, InputOTPPlaceholderProps, InputOTPProps, InputOTPRenderState, InputOTPSeparatorProps, InputOTPSize, InputOTPSlot, InputOTPValueProps, InputOTPVariant, OTPSlotState, OTP_ALPHANUMERIC, OTP_DIGITS, OTP_LETTERS, buildSlots, extractPastedCode, inputOTPRecipe, useInputOTP, useInputOTPBox } from './components/input-otp/index.js';
10
+ export { Radio, RadioContextValue, RadioIndicator, RadioIndicatorProps, RadioLabel, RadioLabelProps, RadioProps, RadioRoot, RadioSize, RadioSlot, RadioVariant, radioRecipe, useRadio } from './components/radio/index.js';
11
+ export { Spinner, SpinnerProps, SpinnerSize, SpinnerSlot, SpinnerVariant, spinnerRecipe } from './components/spinner/index.js';
12
+ export { Switch, SwitchContextValue, SwitchLabel, SwitchLabelProps, SwitchProps, SwitchRoot, SwitchSize, SwitchSlot, SwitchThumb, SwitchThumbProps, SwitchTrack, SwitchTrackProps, SwitchVariant, switchRecipe, useSwitch } from './components/switch/index.js';
13
+ export { TextArea, TextAreaContextValue, TextAreaFieldProps, TextAreaProps, useTextArea } from './components/text-area/index.js';
14
+ export { TextSpan, TextSpanProps, Typography, TypographyProps, TypographySlot, TypographyVariant, typographyRecipe } from './components/typography/index.js';
15
+ export { AxisProps, Column, ColumnProps, Grid, GridContextValue, GridItemProps, GridProps, Row, RowProps, Stack, StackItemProps, StackProps, useGrid } from './components/view/index.js';
16
+ import { RefCallback } from 'react';
17
+ import { PossibleRef } from './system/index.js';
18
+ export { AsChildProps, CloseButton, CloseButtonSlots, FEEDBACK_OVERLAY, HIGHLIGHT_DURATION, HIGHLIGHT_OPACITY, Icon, IconContext, MergeableProps, PRESS_DURATION, PRESS_SCALE, Portal, PortalContext, PortalHost, PortalHostProps, PortalMethods, PortalProps, PressableFeedback, PressableFeedbackHighlightProps, PressableFeedbackRippleProps, RIPPLE_CONFIRM_DURATION, RIPPLE_EXPAND_DURATION, RIPPLE_FADE_IN, RIPPLE_FADE_OUT, RIPPLE_FADE_OUT_DELAY, RIPPLE_OPACITY, RIPPLE_START_SCALE, SCALE_REFERENCE_WIDTH, SelectionFill, SelectionFillProps, Slot, SlotProps, childrenToString, closeButtonBase, createSlotContext, markOverlay, mergeProps, mergeRefs, pressScaleFor, radiusAxis, resolveAnimation, resolveSlotAnimation, rippleRadiusFor, useFeedback, useIconContext, useStyleProps } from './system/index.js';
19
+ import { GestureResponderEvent, ViewStyle } from 'react-native';
20
+ export { C as CloseButtonProps } from './close-button.type-BUYuoSt2.js';
21
+ export { b as IconComponentProps, I as IconContextValue, a as IconProps } from './icon.type-Kml72iSz.js';
22
+ export { A as Axes, C as CompoundVariant, R as Recipe, d as RecipeConfig, b as ResolveArgs, e as ResolvedSelection, f as ResolvedStyles, g as Selection, h as SlotStyle, S as SlotStyles, i as StateName, j as States, a as StyleFn, T as TintArgs, V as VariantColors, k as VariantRole, l as VariantTokens, c as createRecipe } from './create-recipe-BdVd2ffi.js';
23
+ export { D as DirectionalStyleKey, I as ImageStyleProps, S as StyleProps, T as TextStyleProps, V as ViewStyleProps } from './style-props.type-CfnoGEP7.js';
2
24
  export { ColorModePreference, PaletteFamily, PaletteShade, ThemeContext, XAUIProvider, XAUIProviderProps, XAUITint, buildRadius, buildShadows, createTheme, defaultTheme, deriveColors, deriveTint, palette, primitives, sourceKeys, tokens, useColorMode, useThemeColor, useXAUITheme } from './theme/index.js';
3
- export { C as ColorMode, F as FontSizeKey, a as FontWeightKey, R as RadiusKey, S as Size, X as XAUIColors, b as XAUIDerivedColors, c as XAUIPrimitiveColors, d as XAUIRadius, e as XAUIShadow, f as XAUISourceColors, g as XAUITheme, h as XAUIThemeConfig, i as XAUIThemeSet } from './theme.type-C9bFJKFm.js';
4
- import 'react';
5
- import 'react-native';
25
+ export { C as ColorMode, F as FontSizeKey, b as FontWeightKey, R as RadiusKey, S as Size, a as XAUIColors, c as XAUIDerivedColors, d as XAUIPrimitiveColors, e as XAUIRadius, f as XAUIShadow, g as XAUISourceColors, X as XAUITheme, h as XAUIThemeConfig, i as XAUIThemeSet } from './theme.type-C2gNHpEx.js';
26
+ export { b as InputContextValue, c as InputDescriptionProps, d as InputErrorProps, I as InputFieldProps, e as InputLabelPlacement, f as InputLabelProps, a as InputProps, g as InputSize, h as InputSlot, i as InputVariant } from './input.type-D2qgi03E.js';
27
+ export { A as AnimationConfig, a as AnimationProp, F as FeedbackContext, P as PressableFeedbackProps, R as RadiusStyle, b as ResolvedAnimation, c as RippleWave, S as SlotAnimation } from './pressable-feedback.type-Bs4dQlGj.js';
6
28
  import 'react-native-reanimated';
29
+
30
+ type ControllableStateOptions<T> = {
31
+ /** Present means controlled: the caller owns the value and this never stores one. */
32
+ value?: T;
33
+ /** The starting value when uncontrolled. */
34
+ defaultValue: T;
35
+ /** Called with every new value, controlled or not. */
36
+ onChange?: (value: T) => void;
37
+ };
38
+ /**
39
+ * One state that works both ways, so a component never has two code paths for "the
40
+ * caller drives this" and "we do".
41
+ *
42
+ * The setter is stable across renders and reads the current value from a ref, so a
43
+ * handler built on it can be passed to a memoized child without rebuilding it on every
44
+ * render — which is the whole reason components reach for this rather than a local
45
+ * `useState` plus an `if`.
46
+ */
47
+ declare function useControllableState<T>({ value, defaultValue, onChange, }: ControllableStateOptions<T>): [T, (next: T | ((current: T) => T)) => void];
48
+
49
+ /**
50
+ * `mergeRefs` for a component that renders: memoized on the refs it was given, so React
51
+ * does not detach and reattach every one of them on each render — which it does whenever
52
+ * a ref callback changes identity, and which costs a node measurement every time.
53
+ */
54
+ declare function useMergedRef<T>(...refs: Array<PossibleRef<T>>): RefCallback<T>;
55
+
56
+ /**
57
+ * `null` as much as `undefined`: that is how `PressableProps` types its handlers, and a
58
+ * root forwarding what it was given should not have to launder them first.
59
+ */
60
+ type PressHandlers = {
61
+ onPressIn?: PressHandler | null;
62
+ onPressOut?: PressHandler | null;
63
+ };
64
+ type PressHandler = (event: GestureResponderEvent) => void;
65
+ /**
66
+ * The press state a root owns, with the handlers that maintain it.
67
+ *
68
+ * It exists because every pressable component needs the same three things and gets one
69
+ * of them wrong on its own: the state has to be *up here* — the recipe resolves on it
70
+ * (R5) — the caller's handlers must be **composed, never replaced**, and the returned
71
+ * handlers must keep their identity so passing them down does not defeat a memo.
72
+ *
73
+ * ```tsx
74
+ * const [isPressed, pressHandlers] = usePressState(props)
75
+ * const styles = recipe.resolve({ theme, selection, states: { pressed: isPressed } })
76
+ * <PressableFeedback isPressed={isPressed} {...pressHandlers} />
77
+ * ```
78
+ */
79
+ declare function usePressState(handlers?: PressHandlers): [boolean, {
80
+ onPressIn: PressHandler;
81
+ onPressOut: PressHandler;
82
+ }];
83
+
84
+ /**
85
+ * The value from the render before this one, `undefined` on the first.
86
+ *
87
+ * Written in an effect rather than during render on purpose: reading it mid-render would
88
+ * make "previous" mean something different depending on whether React re-ran the render,
89
+ * which under StrictMode it does.
90
+ */
91
+ declare function usePrevious<T>(value: T): T | undefined;
92
+
93
+ /**
94
+ * One turn. Slow enough to read as waiting, fast enough not to read as stuck — HeroUI
95
+ * arrives at the same figure from the other side, a 1000ms turn played at 1.1×.
96
+ *
97
+ * It is a constant rather than a parameter because the library turns at one speed: two
98
+ * spinners on one screen at two rates is a bug, and the only way to be sure of that is
99
+ * for there to be one number.
100
+ */
101
+ declare const ROTATION_DURATION = 900;
102
+ /**
103
+ * A full turn, repeating, on the UI thread. Returns the animated style to merge onto the
104
+ * node that spins.
105
+ *
106
+ * **A caller that must animate nothing does not call it.** Hooks cannot be conditional,
107
+ * so "no animation" is only true if this one is never reached — which is why both call
108
+ * sites render two components rather than branch inside one.
109
+ */
110
+ declare function useRotation(): ViewStyle;
111
+
112
+ export { type ControllableStateOptions, PossibleRef, type PressHandlers, ROTATION_DURATION, useControllableState, useMergedRef, usePressState, usePrevious, useRotation };
package/dist/index.js CHANGED
@@ -1,22 +1,8 @@
1
1
  import {
2
- HIGHLIGHT_OPACITY,
3
- PRESS_DURATION,
4
- PRESS_SCALE,
5
- PressableFeedback,
6
- RELEASE_DURATION,
7
- RIPPLE_COVERAGE,
8
- RIPPLE_DURATION,
9
- RIPPLE_OPACITY,
10
- Slot,
11
- childrenToString,
12
- createRecipe,
13
- createSlotContext,
14
- mergeProps,
15
- mergeRefs,
16
- resolveAnimation,
17
- resolveSlotAnimation,
18
- useFeedback
19
- } from "./chunk-QAMNNTGM.js";
2
+ Portal,
3
+ PortalContext,
4
+ PortalHost
5
+ } from "./chunk-7SEZGVTY.js";
20
6
  import {
21
7
  XAUIProvider,
22
8
  buildRadius,
@@ -28,45 +14,307 @@ import {
28
14
  primitives,
29
15
  sourceKeys,
30
16
  tokens
31
- } from "./chunk-2KXQATVL.js";
17
+ } from "./chunk-TZG3DERP.js";
18
+ import {
19
+ InputOTP,
20
+ OTP_ALPHANUMERIC,
21
+ OTP_DIGITS,
22
+ OTP_LETTERS,
23
+ buildSlots,
24
+ extractPastedCode,
25
+ inputOTPRecipe,
26
+ useInputOTP,
27
+ useInputOTPBox
28
+ } from "./chunk-X4HQ4H2V.js";
29
+ import {
30
+ Radio,
31
+ RadioIndicator,
32
+ RadioLabel,
33
+ RadioRoot,
34
+ radioRecipe,
35
+ useRadio
36
+ } from "./chunk-IHOCANCQ.js";
37
+ import {
38
+ Spinner,
39
+ spinnerRecipe
40
+ } from "./chunk-KOC3KQIT.js";
41
+ import {
42
+ Switch,
43
+ SwitchLabel,
44
+ SwitchRoot,
45
+ SwitchThumb,
46
+ SwitchTrack,
47
+ switchRecipe,
48
+ useSwitch
49
+ } from "./chunk-42FMGB5M.js";
50
+ import {
51
+ TextArea,
52
+ useTextArea
53
+ } from "./chunk-GVQOD3VW.js";
54
+ import {
55
+ TextSpan,
56
+ Typography,
57
+ typographyRecipe
58
+ } from "./chunk-NYRXUGVL.js";
59
+ import {
60
+ Column,
61
+ Grid,
62
+ Row,
63
+ Stack,
64
+ useGrid
65
+ } from "./chunk-G7K652GC.js";
66
+ import {
67
+ Alert,
68
+ alertRecipe,
69
+ useAlert
70
+ } from "./chunk-Q3WFY5N3.js";
71
+ import {
72
+ Button,
73
+ buttonRecipe,
74
+ useButton
75
+ } from "./chunk-MDVSCWJI.js";
76
+ import {
77
+ ROTATION_DURATION,
78
+ useMergedRef,
79
+ usePrevious,
80
+ useRotation
81
+ } from "./chunk-BVJQ3UPZ.js";
82
+ import {
83
+ CARD_BACKGROUND,
84
+ Card,
85
+ cardRecipe,
86
+ markBackground,
87
+ useCard
88
+ } from "./chunk-VJEER76X.js";
89
+ import {
90
+ Checkbox,
91
+ CheckboxIndicator,
92
+ CheckboxLabel,
93
+ CheckboxRoot,
94
+ checkboxRecipe,
95
+ useCheckbox
96
+ } from "./chunk-RDTKAAHX.js";
97
+ import {
98
+ SelectionFill
99
+ } from "./chunk-BA2DBSAN.js";
100
+ import {
101
+ useControllableState
102
+ } from "./chunk-F6W3JQ7K.js";
103
+ import {
104
+ Chip,
105
+ chipRecipe,
106
+ useChip
107
+ } from "./chunk-ZH6BHLQR.js";
108
+ import {
109
+ CloseButton,
110
+ closeButtonBase
111
+ } from "./chunk-V4WDMM6Z.js";
112
+ import {
113
+ FEEDBACK_OVERLAY,
114
+ HIGHLIGHT_DURATION,
115
+ HIGHLIGHT_OPACITY,
116
+ PRESS_DURATION,
117
+ PRESS_SCALE,
118
+ PressableFeedback,
119
+ RIPPLE_CONFIRM_DURATION,
120
+ RIPPLE_EXPAND_DURATION,
121
+ RIPPLE_FADE_IN,
122
+ RIPPLE_FADE_OUT,
123
+ RIPPLE_FADE_OUT_DELAY,
124
+ RIPPLE_OPACITY,
125
+ RIPPLE_START_SCALE,
126
+ SCALE_REFERENCE_WIDTH,
127
+ markOverlay,
128
+ pressScaleFor,
129
+ resolveAnimation,
130
+ resolveSlotAnimation,
131
+ rippleRadiusFor,
132
+ useFeedback
133
+ } from "./chunk-BFMTUMTU.js";
134
+ import {
135
+ usePressState
136
+ } from "./chunk-423RQBOX.js";
137
+ import "./chunk-EGLLDKN6.js";
138
+ import {
139
+ Divider,
140
+ dividerRecipe
141
+ } from "./chunk-ZH5XVNHG.js";
142
+ import {
143
+ InputGroup,
144
+ InputGroupField,
145
+ InputGroupIcon,
146
+ InputGroupPrefix,
147
+ InputGroupRoot,
148
+ InputGroupSuffix,
149
+ decoratorPadding,
150
+ useInputGroup
151
+ } from "./chunk-DFME724B.js";
152
+ import {
153
+ Input,
154
+ InputDescription,
155
+ InputError,
156
+ InputField,
157
+ InputLabel,
158
+ InputRoot,
159
+ inputRecipe,
160
+ useInput
161
+ } from "./chunk-A5OCK3C2.js";
162
+ import {
163
+ Icon,
164
+ IconContext,
165
+ useIconContext
166
+ } from "./chunk-3FV4COTM.js";
167
+ import {
168
+ createRecipe,
169
+ radiusAxis
170
+ } from "./chunk-4GTAZM2C.js";
32
171
  import {
33
172
  ThemeContext,
34
173
  deriveTint,
35
174
  useColorMode,
36
175
  useThemeColor,
37
176
  useXAUITheme
38
- } from "./chunk-X2K2FX3W.js";
177
+ } from "./chunk-A3EGFI6T.js";
178
+ import {
179
+ Slot,
180
+ childrenToString,
181
+ createSlotContext,
182
+ mergeProps
183
+ } from "./chunk-E2CWBQTV.js";
184
+ import {
185
+ mergeRefs,
186
+ useStyleProps
187
+ } from "./chunk-URSKA2VR.js";
188
+ import "./chunk-GGW42MY4.js";
39
189
  export {
190
+ Alert,
191
+ Button,
192
+ CARD_BACKGROUND,
193
+ Card,
194
+ Checkbox,
195
+ CheckboxIndicator,
196
+ CheckboxLabel,
197
+ CheckboxRoot,
198
+ Chip,
199
+ CloseButton,
200
+ Column,
201
+ Divider,
202
+ FEEDBACK_OVERLAY,
203
+ Grid,
204
+ HIGHLIGHT_DURATION,
40
205
  HIGHLIGHT_OPACITY,
206
+ Icon,
207
+ IconContext,
208
+ Input,
209
+ InputDescription,
210
+ InputError,
211
+ InputField,
212
+ InputGroup,
213
+ InputGroupField,
214
+ InputGroupIcon,
215
+ InputGroupPrefix,
216
+ InputGroupRoot,
217
+ InputGroupSuffix,
218
+ InputLabel,
219
+ InputOTP,
220
+ InputRoot,
221
+ OTP_ALPHANUMERIC,
222
+ OTP_DIGITS,
223
+ OTP_LETTERS,
41
224
  PRESS_DURATION,
42
225
  PRESS_SCALE,
226
+ Portal,
227
+ PortalContext,
228
+ PortalHost,
43
229
  PressableFeedback,
44
- RELEASE_DURATION,
45
- RIPPLE_COVERAGE,
46
- RIPPLE_DURATION,
230
+ RIPPLE_CONFIRM_DURATION,
231
+ RIPPLE_EXPAND_DURATION,
232
+ RIPPLE_FADE_IN,
233
+ RIPPLE_FADE_OUT,
234
+ RIPPLE_FADE_OUT_DELAY,
47
235
  RIPPLE_OPACITY,
236
+ RIPPLE_START_SCALE,
237
+ ROTATION_DURATION,
238
+ Radio,
239
+ RadioIndicator,
240
+ RadioLabel,
241
+ RadioRoot,
242
+ Row,
243
+ SCALE_REFERENCE_WIDTH,
244
+ SelectionFill,
48
245
  Slot,
246
+ Spinner,
247
+ Stack,
248
+ Switch,
249
+ SwitchLabel,
250
+ SwitchRoot,
251
+ SwitchThumb,
252
+ SwitchTrack,
253
+ TextArea,
254
+ TextSpan,
49
255
  ThemeContext,
256
+ Typography,
50
257
  XAUIProvider,
258
+ alertRecipe,
51
259
  buildRadius,
52
260
  buildShadows,
261
+ buildSlots,
262
+ buttonRecipe,
263
+ cardRecipe,
264
+ checkboxRecipe,
53
265
  childrenToString,
266
+ chipRecipe,
267
+ closeButtonBase,
54
268
  createRecipe,
55
269
  createSlotContext,
56
270
  createTheme,
271
+ decoratorPadding,
57
272
  defaultTheme,
58
273
  deriveColors,
59
274
  deriveTint,
275
+ dividerRecipe,
276
+ extractPastedCode,
277
+ inputOTPRecipe,
278
+ inputRecipe,
279
+ markBackground,
280
+ markOverlay,
60
281
  mergeProps,
61
282
  mergeRefs,
62
283
  palette,
284
+ pressScaleFor,
63
285
  primitives,
286
+ radioRecipe,
287
+ radiusAxis,
64
288
  resolveAnimation,
65
289
  resolveSlotAnimation,
290
+ rippleRadiusFor,
66
291
  sourceKeys,
292
+ spinnerRecipe,
293
+ switchRecipe,
67
294
  tokens,
295
+ typographyRecipe,
296
+ useAlert,
297
+ useButton,
298
+ useCard,
299
+ useCheckbox,
300
+ useChip,
68
301
  useColorMode,
302
+ useControllableState,
69
303
  useFeedback,
304
+ useGrid,
305
+ useIconContext,
306
+ useInput,
307
+ useInputGroup,
308
+ useInputOTP,
309
+ useInputOTPBox,
310
+ useMergedRef,
311
+ usePressState,
312
+ usePrevious,
313
+ useRadio,
314
+ useRotation,
315
+ useStyleProps,
316
+ useSwitch,
317
+ useTextArea,
70
318
  useThemeColor,
71
319
  useXAUITheme
72
320
  };
@@ -0,0 +1,167 @@
1
+ import { ReactNode } from 'react';
2
+ import { StyleProp, TextStyle, ViewStyle, TextInputProps, TextProps, ViewProps } from 'react-native';
3
+ import { T as TextStyleProps, V as ViewStyleProps } from './style-props.type-CfnoGEP7.cjs';
4
+ import { S as Size, R as RadiusKey } from './theme.type-C2gNHpEx.cjs';
5
+
6
+ type InputSlot = 'root' | 'label' | 'field' | 'textArea' | 'placeholder' | 'description' | 'error' | 'prefix' | 'suffix' | 'icon';
7
+ /**
8
+ * The library's four emphasis levels, narrowed like the `Card`'s (§1 bis). A field
9
+ * **reports nothing** — an error is `isInvalid`, which is a state and not a variant — so
10
+ * `success`, `warning` and `danger` are absent here for the same reason they are there.
11
+ *
12
+ * This is where the theme's `field*` family is finally read, and the four names split
13
+ * HeroUI's two-name `primary | secondary` by saying what each of their ends already is:
14
+ *
15
+ * - **`primary`** — the `fieldBackground` fill plus the theme's `field` shadow. HeroUI's
16
+ * `primary`, with the elevation their flat token only implies.
17
+ * - **`secondary`** — the neutral `default` fill. HeroUI's `secondary`, and the default
18
+ * here: on a plain background a white field is its border and nothing else, while on a
19
+ * card the `fieldBackground` token *is* the card's own colour.
20
+ * - **`tertiary`** — the border alone, no fill. The same drop the `Button`'s `tertiary`
21
+ * makes.
22
+ * - **`ghost`** — neither. A bare field for a toolbar or an inline edit; it has no border
23
+ * to move, so its focus shows in the caret alone.
24
+ *
25
+ * The first three name the `fieldBorder` edge and `ghost` gives it up. Its width is the
26
+ * theme's `borderWidth.field` — HeroUI's `--field-border-width`, which they ship at `0`
27
+ * and we ship at `1`. That is the one shipped default where the two differ;
28
+ * `createTheme({ borderWidth: { field: 0 } })` reproduces theirs.
29
+ */
30
+ type InputVariant = 'primary' | 'secondary' | 'tertiary' | 'ghost';
31
+ /**
32
+ * Where the label sits relative to the field's box.
33
+ *
34
+ * `outside` is the label above the box, in the column's flow. `inside` lifts it into the
35
+ * box, above the text — the label is taken **out of flow** and placed against the box's
36
+ * own padding, so the JSX is identical either way and nothing is reparented (R4).
37
+ *
38
+ * Because the inside label positions itself against the top of the root, it assumes the
39
+ * field is the first thing in the column's flow: write `Input.Description` and
40
+ * `Input.Error` after the field, which is where they belong anyway.
41
+ */
42
+ type InputLabelPlacement = 'outside' | 'inside';
43
+ type InputSize = Size;
44
+ /**
45
+ * What the `Input` itself understands. R14 — a name in here is the component's, so the
46
+ * style prop that shares it is not exposed: `size` is the field's scale and never
47
+ * `ViewStyle`'s, and `color` is R7's tint.
48
+ */
49
+ type InputOwnProps = {
50
+ variant?: InputVariant;
51
+ /** The field's height, its padding, the gaps and the type. Never width. */
52
+ size?: InputSize;
53
+ /** Overrides the `field` radius the theme chose for every size. */
54
+ radius?: RadiusKey;
55
+ /** Above the box, or lifted into it. @default 'outside' */
56
+ labelPlacement?: InputLabelPlacement;
57
+ /**
58
+ * A raw tint (`'#7c3aed'`), never a token (R7). It lands where the variant put its
59
+ * tokens — the fill of a `default`, the border of a `tertiary` — and, because the focus
60
+ * colour is a role like any other, it is also what the field borders on focus.
61
+ */
62
+ color?: string;
63
+ /**
64
+ * Paints the border, the label and the description in `danger`, and takes the focus
65
+ * treatment off: an error outranks focus, and a field that is both should read as
66
+ * wrong rather than as busy.
67
+ *
68
+ * It does **not** mount or unmount `Input.Error`. That stays the caller's — a slot that
69
+ * silently renders nothing is a slot you cannot debug.
70
+ */
71
+ isInvalid?: boolean;
72
+ /** Dims the field and makes it uneditable. */
73
+ isDisabled?: boolean;
74
+ style?: StyleProp<ViewStyle>;
75
+ children?: ReactNode;
76
+ };
77
+ /**
78
+ * R14 — the input's own props, the wrapper `View`'s, and every `ViewStyle` key neither
79
+ * already claims. **`TextInputProps` are not here**: they belong to `Input.Field`, which
80
+ * is the node that has them.
81
+ */
82
+ type InputProps = InputOwnProps & Omit<ViewProps, keyof InputOwnProps> & Omit<ViewStyleProps, keyof InputOwnProps | keyof ViewProps> & {
83
+ /** R12 — merge into the single child instead of rendering a `View`. */
84
+ asChild?: boolean;
85
+ };
86
+ /**
87
+ * Everything `TextInput` accepts, plus the `TextStyle` keys as props (R14).
88
+ *
89
+ * `editable` is absent: it is `disabled` under another name, and R8 keeps that off the
90
+ * public surface — `isDisabled` on the root is what stops the field.
91
+ */
92
+ type InputFieldProps = Omit<TextInputProps, 'editable'> & Omit<TextStyleProps, keyof TextInputProps>;
93
+ /** `Text`'s own props win over the `TextStyle` keys of the same name (R14). */
94
+ type InputTextProps = TextProps & Omit<TextStyleProps, keyof TextProps> & {
95
+ children?: ReactNode;
96
+ };
97
+ type InputLabelProps = InputTextProps;
98
+ type InputDescriptionProps = InputTextProps;
99
+ type InputErrorProps = InputTextProps;
100
+ /**
101
+ * Read off `TextInput`'s own props rather than spelled out: React Native has renamed the
102
+ * payload of these two more than once, and a hand-written `NativeSyntheticEvent<…>` here
103
+ * would be a second declaration free to drift from the node that actually fires them.
104
+ */
105
+ type FieldFocusEvent = Parameters<NonNullable<TextInputProps['onFocus']>>[0];
106
+ type FieldBlurEvent = Parameters<NonNullable<TextInputProps['onBlur']>>[0];
107
+ /**
108
+ * R5 — resolved styles, not props for a slot to resolve a second time. Each entry is the
109
+ * cached `StyleSheet` reference with the uncached tint pass layered over it, so a slot
110
+ * merges its own `style` on top and does no work of its own.
111
+ */
112
+ type InputContextValue = {
113
+ labelStyle: StyleProp<TextStyle>;
114
+ fieldStyle: StyleProp<TextStyle>;
115
+ /** Layered *over* `fieldStyle` by `Input.TextArea`: only what a multiline field adds. */
116
+ textAreaStyle: StyleProp<TextStyle>;
117
+ /**
118
+ * Values, not a style: `rows` is a raw number, so the height it implies is arithmetic
119
+ * the slot does — and these are the two measurements it needs, flattened once here
120
+ * rather than in every text area on the screen.
121
+ */
122
+ textArea: {
123
+ lineHeight: number;
124
+ paddingVertical: number;
125
+ };
126
+ descriptionStyle: StyleProp<TextStyle>;
127
+ errorStyle: StyleProp<TextStyle>;
128
+ /**
129
+ * The two decorators of an `InputGroup`, already pinned to their edge and inset by the
130
+ * field's own padding. They are resolved here, on the root, because the size that
131
+ * decides that padding is the root's — the group itself adds no axis of its own.
132
+ */
133
+ prefixStyle: StyleProp<ViewStyle>;
134
+ suffixStyle: StyleProp<ViewStyle>;
135
+ /**
136
+ * Values, not a style: an icon is a third party's component, and `size` and `color` are
137
+ * props it takes rather than a style it accepts. Flattened once here, the way the `Chip`
138
+ * and the `Alert` publish theirs.
139
+ */
140
+ icon: {
141
+ size: number | undefined;
142
+ color: string | undefined;
143
+ };
144
+ /**
145
+ * A value and not a style: `placeholderTextColor` is a `TextInput` prop, so the root
146
+ * flattens its placeholder slot once here rather than in the field.
147
+ */
148
+ placeholderTextColor?: string;
149
+ /**
150
+ * The focus state lives on the **root**, because the root's recipe resolves on it (R5)
151
+ * and it needs the value before it renders — but the node that hears the event is
152
+ * `Input.Field`, three levels down. These are how it reports back. Their identity is
153
+ * stable, so publishing them costs no re-render of a memoized slot.
154
+ */
155
+ onFieldFocus: (event: FieldFocusEvent) => void;
156
+ onFieldBlur: (event: FieldBlurEvent) => void;
157
+ /**
158
+ * The id the label carries and the field points at, so a screen reader reads "Courriel,
159
+ * champ de saisie" rather than just the placeholder.
160
+ */
161
+ labelId: string;
162
+ descriptionId: string;
163
+ isDisabled: boolean;
164
+ isInvalid: boolean;
165
+ };
166
+
167
+ export type { InputFieldProps as I, InputProps as a, InputContextValue as b, InputDescriptionProps as c, InputErrorProps as d, InputLabelPlacement as e, InputLabelProps as f, InputSize as g, InputSlot as h, InputVariant as i };