@xaui/native 0.9.1-alpha.24 → 0.9.1-alpha.25

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.
@@ -1,148 +1,140 @@
1
1
  import * as react from 'react';
2
- import { ReactNode } from 'react';
3
2
  import * as react_native from 'react-native';
4
- import { StyleProp, TextStyle, TextInputProps, TextProps, ViewStyle, ViewProps } from 'react-native';
5
- import { T as TextStyleProps, V as ViewStyleProps } from '../../style-props.type-CfnoGEP7.cjs';
6
- import { S as Size, R as RadiusKey, X as XAUITheme } from '../../theme.type-C2gNHpEx.cjs';
3
+ import { View, Text, TextInput } from 'react-native';
4
+ import { V as ViewStyleProps, T as TextStyleProps } from '../../style-props.type-CfnoGEP7.cjs';
5
+ import { R as RadiusKey, X as XAUITheme } from '../../theme.type-C2gNHpEx.cjs';
6
+ import { i as InputVariant, g as InputSize, e as InputLabelPlacement, b as InputContextValue, h as InputSlot } from '../../input.type-BpJeUIe8.cjs';
7
+ export { c as InputDescriptionProps, d as InputErrorProps, I as InputFieldProps, f as InputLabelProps, a as InputProps } from '../../input.type-BpJeUIe8.cjs';
7
8
  import { R as Recipe, g as SlotStyles, j as StyleFn } from '../../create-recipe-dBN_ewZc.cjs';
8
9
 
9
- type InputSlot = 'root' | 'label' | 'field' | 'placeholder' | 'description' | 'error';
10
10
  /**
11
- * The library's four emphasis levels, narrowed like the `Card`'s (§1 bis). A field
12
- * **reports nothing** — an error is `isInvalid`, which is a state and not a variant — so
13
- * `success`, `warning` and `danger` are absent here for the same reason they are there.
11
+ * A text field, with the label, the hint and the error that make it usable.
14
12
  *
15
- * This is where the theme's `field*` family is finally read, and the four names split
16
- * HeroUI's two-name `primary | secondary` by saying what each of their ends already is:
13
+ * ```tsx
14
+ * <Input>
15
+ * <Input.Label>Courriel</Input.Label>
16
+ * <Input.Field
17
+ * value={email}
18
+ * onChangeText={setEmail}
19
+ * placeholder="nom@exemple.fr"
20
+ * keyboardType="email-address"
21
+ * />
22
+ * <Input.Description>On ne le partage jamais.</Input.Description>
23
+ * </Input>
17
24
  *
18
- * - **`primary`** — the `fieldBackground` fill plus the theme's `field` shadow. HeroUI's
19
- * `primary`, with the elevation their flat token only implies.
20
- * - **`secondary`** — the neutral `default` fill. HeroUI's `secondary`, and the default
21
- * here: on a plain background a white field is its border and nothing else, while on a
22
- * card the `fieldBackground` token *is* the card's own colour.
23
- * - **`tertiary`** — the border alone, no fill. The same drop the `Button`'s `tertiary`
24
- * makes.
25
- * - **`ghost`** — neither. A bare field for a toolbar or an inline edit; it has no border
26
- * to move, so its focus shows in the caret alone.
25
+ * <Input isInvalid={Boolean(error)}>
26
+ * <Input.Label>Mot de passe</Input.Label>
27
+ * <Input.Field secureTextEntry value={password} onChangeText={setPassword} />
28
+ * {error ? <Input.Error>{error}</Input.Error> : null}
29
+ * </Input>
30
+ * ```
27
31
  *
28
- * The first three name the `fieldBorder` edge and `ghost` gives it up. Its width is the
29
- * theme's `borderWidth.field` HeroUI's `--field-border-width`, which they ship at `0`
30
- * and we ship at `1`. That is the one shipped default where the two differ;
31
- * `createTheme({ borderWidth: { field: 0 } })` reproduces theirs.
32
- */
33
- type InputVariant = 'primary' | 'secondary' | 'tertiary' | 'ghost';
34
- /**
35
- * Where the label sits relative to the field's box.
32
+ * **The root is the column, not the field.** `Input.Field` is the `TextInput`, which is
33
+ * what makes the label, the hint and the error slots of one component rather than three
34
+ * components a form has to keep in step — and it is why `TextInputProps` are on the field
35
+ * rather than on the root.
36
36
  *
37
- * `outside` is the label above the box, in the column's flow. `inside` lifts it into the
38
- * box, above the text the label is taken **out of flow** and placed against the box's
39
- * own padding, so the JSX is identical either way and nothing is reparented (R4).
40
- *
41
- * Because the inside label positions itself against the top of the root, it assumes the
42
- * field is the first thing in the column's flow: write `Input.Description` and
43
- * `Input.Error` after the field, which is where they belong anyway.
37
+ * There is no auto-wrap here (R3): a string child of an input is not a label, a value or
38
+ * a placeholder in any way the component could guess.
44
39
  */
45
- type InputLabelPlacement = 'outside' | 'inside';
46
- type InputSize = Size;
47
- /**
48
- * What the `Input` itself understands. R14 — a name in here is the component's, so the
49
- * style prop that shares it is not exposed: `size` is the field's scale and never
50
- * `ViewStyle`'s, and `color` is R7's tint.
51
- */
52
- type InputOwnProps = {
40
+ declare const InputRoot: react.ForwardRefExoticComponent<{
53
41
  variant?: InputVariant;
54
- /** The field's height, its padding, the gaps and the type. Never width. */
55
42
  size?: InputSize;
56
- /** Overrides the `field` radius the theme chose for every size. */
57
43
  radius?: RadiusKey;
58
- /** Above the box, or lifted into it. @default 'outside' */
59
44
  labelPlacement?: InputLabelPlacement;
60
- /**
61
- * A raw tint (`'#7c3aed'`), never a token (R7). It lands where the variant put its
62
- * tokens — the fill of a `default`, the border of a `tertiary` — and, because the focus
63
- * colour is a role like any other, it is also what the field borders on focus.
64
- */
65
45
  color?: string;
66
- /**
67
- * Paints the border, the label and the description in `danger`, and takes the focus
68
- * treatment off: an error outranks focus, and a field that is both should read as
69
- * wrong rather than as busy.
70
- *
71
- * It does **not** mount or unmount `Input.Error`. That stays the caller's — a slot that
72
- * silently renders nothing is a slot you cannot debug.
73
- */
74
46
  isInvalid?: boolean;
75
- /** Dims the field and makes it uneditable. */
76
47
  isDisabled?: boolean;
77
- style?: StyleProp<ViewStyle>;
78
- children?: ReactNode;
79
- };
48
+ style?: react_native.StyleProp<react_native.ViewStyle>;
49
+ children?: react.ReactNode;
50
+ } & Omit<react_native.ViewProps, keyof {
51
+ variant?: InputVariant;
52
+ size?: InputSize;
53
+ radius?: RadiusKey;
54
+ labelPlacement?: InputLabelPlacement;
55
+ color?: string;
56
+ isInvalid?: boolean;
57
+ isDisabled?: boolean;
58
+ style?: react_native.StyleProp<react_native.ViewStyle>;
59
+ children?: react.ReactNode;
60
+ }> & Omit<ViewStyleProps, "color" | "pointerEvents" | "style" | "children" | "hitSlop" | "id" | "needsOffscreenAlphaCompositing" | "onLayout" | "removeClippedSubviews" | "testID" | "nativeID" | "collapsable" | "collapsableChildren" | "onBlur" | "onFocus" | "renderToHardwareTextureAndroid" | "focusable" | "tabIndex" | "shouldRasterizeIOS" | "isTVSelectable" | "hasTVPreferredFocus" | "tvParallaxShiftDistanceX" | "tvParallaxShiftDistanceY" | "tvParallaxTiltAngle" | "tvParallaxMagnification" | "onStartShouldSetResponder" | "onMoveShouldSetResponder" | "onResponderEnd" | "onResponderGrant" | "onResponderReject" | "onResponderMove" | "onResponderRelease" | "onResponderStart" | "onResponderTerminationRequest" | "onResponderTerminate" | "onStartShouldSetResponderCapture" | "onMoveShouldSetResponderCapture" | "onTouchStart" | "onTouchMove" | "onTouchEnd" | "onTouchCancel" | "onTouchEndCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerUp" | "onPointerUpCapture" | "accessible" | "accessibilityActions" | "accessibilityLabel" | "aria-label" | "accessibilityRole" | "accessibilityState" | "aria-busy" | "aria-checked" | "aria-disabled" | "aria-expanded" | "aria-selected" | "accessibilityHint" | "accessibilityValue" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "onAccessibilityAction" | "importantForAccessibility" | "aria-hidden" | "aria-modal" | "role" | "accessibilityLabelledBy" | "aria-labelledby" | "accessibilityLiveRegion" | "aria-live" | "screenReaderFocusable" | "accessibilityElementsHidden" | "accessibilityViewIsModal" | "onAccessibilityEscape" | "onAccessibilityTap" | "onMagicTap" | "accessibilityIgnoresInvertColors" | "accessibilityLanguage" | "accessibilityShowsLargeContentViewer" | "accessibilityLargeContentTitle" | "accessibilityRespondsToUserInteraction" | "isDisabled" | "radius" | "size" | "variant" | "labelPlacement" | "isInvalid"> & {
61
+ asChild?: boolean;
62
+ } & react.RefAttributes<View>>;
63
+
80
64
  /**
81
- * R14 the input's own props, the wrapper `View`'s, and every `ViewStyle` key neither
82
- * already claims. **`TextInputProps` are not here**: they belong to `Input.Field`, which
83
- * is the node that has them.
65
+ * The hint under the field the format expected, what the value is used for.
66
+ *
67
+ * It carries the id the field points at with `aria-describedby`, so it is read after the
68
+ * label rather than skipped. It turns `danger` with `isInvalid`, like the label.
69
+ *
70
+ * It sits inset by half the field's padding, so the column reads as one block rather than
71
+ * as a label, a box and a stray line.
84
72
  */
85
- type InputProps = InputOwnProps & Omit<ViewProps, keyof InputOwnProps> & Omit<ViewStyleProps, keyof InputOwnProps | keyof ViewProps> & {
86
- /** R12 — merge into the single child instead of rendering a `View`. */
87
- asChild?: boolean;
88
- };
73
+ declare const InputDescription: react.ForwardRefExoticComponent<react_native.TextProps & Omit<TextStyleProps, keyof react_native.TextProps> & {
74
+ children?: react.ReactNode;
75
+ } & react.RefAttributes<Text>>;
76
+
89
77
  /**
90
- * Everything `TextInput` accepts, plus the `TextStyle` keys as props (R14).
78
+ * What is wrong with the value, in `danger`.
79
+ *
80
+ * **It always renders what it is given.** `isInvalid` paints the border, the label and the
81
+ * description; it does not mount or unmount this slot, because a slot that silently
82
+ * renders nothing is a slot you cannot debug — you write the condition yourself and see
83
+ * it:
84
+ *
85
+ * ```tsx
86
+ * <Input isInvalid={Boolean(error)}>
87
+ * <Input.Field value={value} onChangeText={onChange} />
88
+ * {error ? <Input.Error>{error}</Input.Error> : null}
89
+ * </Input>
90
+ * ```
91
91
  *
92
- * `editable` is absent: it is `disabled` under another name, and R8 keeps that off the
93
- * public surface `isDisabled` on the root is what stops the field.
92
+ * `accessibilityLiveRegion` is deliberately not set: an error that appears while you are
93
+ * still typing in the field is announced by the field's own `aria-invalid`, and a live
94
+ * region on top of that reads the message on every keystroke that changes it.
94
95
  */
95
- type InputFieldProps = Omit<TextInputProps, 'editable'> & Omit<TextStyleProps, keyof TextInputProps>;
96
- /** `Text`'s own props win over the `TextStyle` keys of the same name (R14). */
97
- type InputTextProps = TextProps & Omit<TextStyleProps, keyof TextProps> & {
98
- children?: ReactNode;
99
- };
100
- type InputLabelProps = InputTextProps;
101
- type InputDescriptionProps = InputTextProps;
102
- type InputErrorProps = InputTextProps;
96
+ declare const InputError: react.ForwardRefExoticComponent<react_native.TextProps & Omit<TextStyleProps, keyof react_native.TextProps> & {
97
+ children?: react.ReactNode;
98
+ } & react.RefAttributes<Text>>;
99
+
103
100
  /**
104
- * Read off `TextInput`'s own props rather than spelled out: React Native has renamed the
105
- * payload of these two more than once, and a hand-written `NativeSyntheticEvent<…>` here
106
- * would be a second declaration free to drift from the node that actually fires them.
101
+ * The `TextInput` itself the one node of this component that the user types into.
102
+ *
103
+ * ```tsx
104
+ * <Input.Field value={email} onChangeText={setEmail} placeholder="nom@exemple.fr" />
105
+ * ```
106
+ *
107
+ * It takes everything `TextInput` takes, which is why `value`, `defaultValue`, `onChange`,
108
+ * `keyboardType`, `secureTextEntry`, `autoComplete` and `multiline` are written here and
109
+ * not on the root. There is no `type`: that is an HTML prop, and React Native splits it
110
+ * into `inputMode`, `keyboardType`, `secureTextEntry` and `autoComplete`.
111
+ *
112
+ * What it does *not* take is `editable`: that is `disabled` under another name, and R8
113
+ * keeps it off the public surface — `isDisabled` on the root is what stops the field.
114
+ *
115
+ * It reports focus up rather than styling it (R5): the root's recipe resolves on the
116
+ * focus state, so the root owns it and this composes the caller's handlers into the two
117
+ * the context published.
107
118
  */
108
- type FieldFocusEvent = Parameters<NonNullable<TextInputProps['onFocus']>>[0];
109
- type FieldBlurEvent = Parameters<NonNullable<TextInputProps['onBlur']>>[0];
119
+ declare const InputField: react.ForwardRefExoticComponent<Omit<react_native.TextInputProps, "editable"> & Omit<TextStyleProps, keyof react_native.TextInputProps> & react.RefAttributes<TextInput>>;
120
+
110
121
  /**
111
- * R5 resolved styles, not props for a slot to resolve a second time. Each entry is the
112
- * cached `StyleSheet` reference with the uncached tint pass layered over it, so a slot
113
- * merges its own `style` on top and does no work of its own.
122
+ * What the field is for. It turns `danger` with `isInvalid`, so the field that is wrong is
123
+ * findable on a long form without reading every message.
124
+ *
125
+ * It carries the id the field points at, which is what makes a screen reader announce
126
+ * "Courriel, champ de saisie" instead of reading the placeholder and hoping.
127
+ *
128
+ * Its colour comes from the theme's `foreground` rather than the variant's: the label sits
129
+ * outside the box, on the screen behind it, so a tinted field does not tint it.
114
130
  */
115
- type InputContextValue = {
116
- labelStyle: StyleProp<TextStyle>;
117
- fieldStyle: StyleProp<TextStyle>;
118
- descriptionStyle: StyleProp<TextStyle>;
119
- errorStyle: StyleProp<TextStyle>;
120
- /**
121
- * A value and not a style: `placeholderTextColor` is a `TextInput` prop, so the root
122
- * flattens its placeholder slot once here rather than in the field.
123
- */
124
- placeholderTextColor?: string;
125
- /**
126
- * The focus state lives on the **root**, because the root's recipe resolves on it (R5)
127
- * and it needs the value before it renders — but the node that hears the event is
128
- * `Input.Field`, three levels down. These are how it reports back. Their identity is
129
- * stable, so publishing them costs no re-render of a memoized slot.
130
- */
131
- onFieldFocus: (event: FieldFocusEvent) => void;
132
- onFieldBlur: (event: FieldBlurEvent) => void;
133
- /**
134
- * The id the label carries and the field points at, so a screen reader reads "Courriel,
135
- * champ de saisie" rather than just the placeholder.
136
- */
137
- labelId: string;
138
- descriptionId: string;
139
- isDisabled: boolean;
140
- isInvalid: boolean;
141
- };
131
+ declare const InputLabel: react.ForwardRefExoticComponent<react_native.TextProps & Omit<TextStyleProps, keyof react_native.TextProps> & {
132
+ children?: react.ReactNode;
133
+ } & react.RefAttributes<Text>>;
142
134
 
143
135
  declare const useInput: () => InputContextValue;
144
136
 
145
- declare const inputRecipe: Recipe<"label" | "field" | "description" | "root" | "placeholder" | "error", InputVariant, {
137
+ declare const inputRecipe: Recipe<"label" | "field" | "description" | "root" | "textArea" | "placeholder" | "error", InputVariant, {
146
138
  readonly size: {
147
139
  readonly xs: (theme: XAUITheme) => SlotStyles<InputSlot>;
148
140
  readonly sm: (theme: XAUITheme) => SlotStyles<InputSlot>;
@@ -210,4 +202,4 @@ declare const Input: react.ForwardRefExoticComponent<{
210
202
  } & react.RefAttributes<react_native.Text>>;
211
203
  };
212
204
 
213
- export { Input, type InputContextValue, type InputDescriptionProps, type InputErrorProps, type InputFieldProps, type InputLabelPlacement, type InputLabelProps, type InputProps, type InputSize, type InputSlot, type InputVariant, inputRecipe, useInput };
205
+ export { Input, InputContextValue, InputDescription, InputError, InputField, InputLabel, InputLabelPlacement, InputRoot, InputSize, InputSlot, InputVariant, inputRecipe, useInput };
@@ -1,148 +1,140 @@
1
1
  import * as react from 'react';
2
- import { ReactNode } from 'react';
3
2
  import * as react_native from 'react-native';
4
- import { StyleProp, TextStyle, TextInputProps, TextProps, ViewStyle, ViewProps } from 'react-native';
5
- import { T as TextStyleProps, V as ViewStyleProps } from '../../style-props.type-CfnoGEP7.js';
6
- import { S as Size, R as RadiusKey, X as XAUITheme } from '../../theme.type-C2gNHpEx.js';
3
+ import { View, Text, TextInput } from 'react-native';
4
+ import { V as ViewStyleProps, T as TextStyleProps } from '../../style-props.type-CfnoGEP7.js';
5
+ import { R as RadiusKey, X as XAUITheme } from '../../theme.type-C2gNHpEx.js';
6
+ import { i as InputVariant, g as InputSize, e as InputLabelPlacement, b as InputContextValue, h as InputSlot } from '../../input.type-DjyZ6P2C.js';
7
+ export { c as InputDescriptionProps, d as InputErrorProps, I as InputFieldProps, f as InputLabelProps, a as InputProps } from '../../input.type-DjyZ6P2C.js';
7
8
  import { R as Recipe, g as SlotStyles, j as StyleFn } from '../../create-recipe-C4JkINrA.js';
8
9
 
9
- type InputSlot = 'root' | 'label' | 'field' | 'placeholder' | 'description' | 'error';
10
10
  /**
11
- * The library's four emphasis levels, narrowed like the `Card`'s (§1 bis). A field
12
- * **reports nothing** — an error is `isInvalid`, which is a state and not a variant — so
13
- * `success`, `warning` and `danger` are absent here for the same reason they are there.
11
+ * A text field, with the label, the hint and the error that make it usable.
14
12
  *
15
- * This is where the theme's `field*` family is finally read, and the four names split
16
- * HeroUI's two-name `primary | secondary` by saying what each of their ends already is:
13
+ * ```tsx
14
+ * <Input>
15
+ * <Input.Label>Courriel</Input.Label>
16
+ * <Input.Field
17
+ * value={email}
18
+ * onChangeText={setEmail}
19
+ * placeholder="nom@exemple.fr"
20
+ * keyboardType="email-address"
21
+ * />
22
+ * <Input.Description>On ne le partage jamais.</Input.Description>
23
+ * </Input>
17
24
  *
18
- * - **`primary`** — the `fieldBackground` fill plus the theme's `field` shadow. HeroUI's
19
- * `primary`, with the elevation their flat token only implies.
20
- * - **`secondary`** — the neutral `default` fill. HeroUI's `secondary`, and the default
21
- * here: on a plain background a white field is its border and nothing else, while on a
22
- * card the `fieldBackground` token *is* the card's own colour.
23
- * - **`tertiary`** — the border alone, no fill. The same drop the `Button`'s `tertiary`
24
- * makes.
25
- * - **`ghost`** — neither. A bare field for a toolbar or an inline edit; it has no border
26
- * to move, so its focus shows in the caret alone.
25
+ * <Input isInvalid={Boolean(error)}>
26
+ * <Input.Label>Mot de passe</Input.Label>
27
+ * <Input.Field secureTextEntry value={password} onChangeText={setPassword} />
28
+ * {error ? <Input.Error>{error}</Input.Error> : null}
29
+ * </Input>
30
+ * ```
27
31
  *
28
- * The first three name the `fieldBorder` edge and `ghost` gives it up. Its width is the
29
- * theme's `borderWidth.field` HeroUI's `--field-border-width`, which they ship at `0`
30
- * and we ship at `1`. That is the one shipped default where the two differ;
31
- * `createTheme({ borderWidth: { field: 0 } })` reproduces theirs.
32
- */
33
- type InputVariant = 'primary' | 'secondary' | 'tertiary' | 'ghost';
34
- /**
35
- * Where the label sits relative to the field's box.
32
+ * **The root is the column, not the field.** `Input.Field` is the `TextInput`, which is
33
+ * what makes the label, the hint and the error slots of one component rather than three
34
+ * components a form has to keep in step — and it is why `TextInputProps` are on the field
35
+ * rather than on the root.
36
36
  *
37
- * `outside` is the label above the box, in the column's flow. `inside` lifts it into the
38
- * box, above the text the label is taken **out of flow** and placed against the box's
39
- * own padding, so the JSX is identical either way and nothing is reparented (R4).
40
- *
41
- * Because the inside label positions itself against the top of the root, it assumes the
42
- * field is the first thing in the column's flow: write `Input.Description` and
43
- * `Input.Error` after the field, which is where they belong anyway.
37
+ * There is no auto-wrap here (R3): a string child of an input is not a label, a value or
38
+ * a placeholder in any way the component could guess.
44
39
  */
45
- type InputLabelPlacement = 'outside' | 'inside';
46
- type InputSize = Size;
47
- /**
48
- * What the `Input` itself understands. R14 — a name in here is the component's, so the
49
- * style prop that shares it is not exposed: `size` is the field's scale and never
50
- * `ViewStyle`'s, and `color` is R7's tint.
51
- */
52
- type InputOwnProps = {
40
+ declare const InputRoot: react.ForwardRefExoticComponent<{
53
41
  variant?: InputVariant;
54
- /** The field's height, its padding, the gaps and the type. Never width. */
55
42
  size?: InputSize;
56
- /** Overrides the `field` radius the theme chose for every size. */
57
43
  radius?: RadiusKey;
58
- /** Above the box, or lifted into it. @default 'outside' */
59
44
  labelPlacement?: InputLabelPlacement;
60
- /**
61
- * A raw tint (`'#7c3aed'`), never a token (R7). It lands where the variant put its
62
- * tokens — the fill of a `default`, the border of a `tertiary` — and, because the focus
63
- * colour is a role like any other, it is also what the field borders on focus.
64
- */
65
45
  color?: string;
66
- /**
67
- * Paints the border, the label and the description in `danger`, and takes the focus
68
- * treatment off: an error outranks focus, and a field that is both should read as
69
- * wrong rather than as busy.
70
- *
71
- * It does **not** mount or unmount `Input.Error`. That stays the caller's — a slot that
72
- * silently renders nothing is a slot you cannot debug.
73
- */
74
46
  isInvalid?: boolean;
75
- /** Dims the field and makes it uneditable. */
76
47
  isDisabled?: boolean;
77
- style?: StyleProp<ViewStyle>;
78
- children?: ReactNode;
79
- };
48
+ style?: react_native.StyleProp<react_native.ViewStyle>;
49
+ children?: react.ReactNode;
50
+ } & Omit<react_native.ViewProps, keyof {
51
+ variant?: InputVariant;
52
+ size?: InputSize;
53
+ radius?: RadiusKey;
54
+ labelPlacement?: InputLabelPlacement;
55
+ color?: string;
56
+ isInvalid?: boolean;
57
+ isDisabled?: boolean;
58
+ style?: react_native.StyleProp<react_native.ViewStyle>;
59
+ children?: react.ReactNode;
60
+ }> & Omit<ViewStyleProps, "color" | "pointerEvents" | "style" | "children" | "hitSlop" | "id" | "needsOffscreenAlphaCompositing" | "onLayout" | "removeClippedSubviews" | "testID" | "nativeID" | "collapsable" | "collapsableChildren" | "onBlur" | "onFocus" | "renderToHardwareTextureAndroid" | "focusable" | "tabIndex" | "shouldRasterizeIOS" | "isTVSelectable" | "hasTVPreferredFocus" | "tvParallaxShiftDistanceX" | "tvParallaxShiftDistanceY" | "tvParallaxTiltAngle" | "tvParallaxMagnification" | "onStartShouldSetResponder" | "onMoveShouldSetResponder" | "onResponderEnd" | "onResponderGrant" | "onResponderReject" | "onResponderMove" | "onResponderRelease" | "onResponderStart" | "onResponderTerminationRequest" | "onResponderTerminate" | "onStartShouldSetResponderCapture" | "onMoveShouldSetResponderCapture" | "onTouchStart" | "onTouchMove" | "onTouchEnd" | "onTouchCancel" | "onTouchEndCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerUp" | "onPointerUpCapture" | "accessible" | "accessibilityActions" | "accessibilityLabel" | "aria-label" | "accessibilityRole" | "accessibilityState" | "aria-busy" | "aria-checked" | "aria-disabled" | "aria-expanded" | "aria-selected" | "accessibilityHint" | "accessibilityValue" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "onAccessibilityAction" | "importantForAccessibility" | "aria-hidden" | "aria-modal" | "role" | "accessibilityLabelledBy" | "aria-labelledby" | "accessibilityLiveRegion" | "aria-live" | "screenReaderFocusable" | "accessibilityElementsHidden" | "accessibilityViewIsModal" | "onAccessibilityEscape" | "onAccessibilityTap" | "onMagicTap" | "accessibilityIgnoresInvertColors" | "accessibilityLanguage" | "accessibilityShowsLargeContentViewer" | "accessibilityLargeContentTitle" | "accessibilityRespondsToUserInteraction" | "isDisabled" | "radius" | "size" | "variant" | "labelPlacement" | "isInvalid"> & {
61
+ asChild?: boolean;
62
+ } & react.RefAttributes<View>>;
63
+
80
64
  /**
81
- * R14 the input's own props, the wrapper `View`'s, and every `ViewStyle` key neither
82
- * already claims. **`TextInputProps` are not here**: they belong to `Input.Field`, which
83
- * is the node that has them.
65
+ * The hint under the field the format expected, what the value is used for.
66
+ *
67
+ * It carries the id the field points at with `aria-describedby`, so it is read after the
68
+ * label rather than skipped. It turns `danger` with `isInvalid`, like the label.
69
+ *
70
+ * It sits inset by half the field's padding, so the column reads as one block rather than
71
+ * as a label, a box and a stray line.
84
72
  */
85
- type InputProps = InputOwnProps & Omit<ViewProps, keyof InputOwnProps> & Omit<ViewStyleProps, keyof InputOwnProps | keyof ViewProps> & {
86
- /** R12 — merge into the single child instead of rendering a `View`. */
87
- asChild?: boolean;
88
- };
73
+ declare const InputDescription: react.ForwardRefExoticComponent<react_native.TextProps & Omit<TextStyleProps, keyof react_native.TextProps> & {
74
+ children?: react.ReactNode;
75
+ } & react.RefAttributes<Text>>;
76
+
89
77
  /**
90
- * Everything `TextInput` accepts, plus the `TextStyle` keys as props (R14).
78
+ * What is wrong with the value, in `danger`.
79
+ *
80
+ * **It always renders what it is given.** `isInvalid` paints the border, the label and the
81
+ * description; it does not mount or unmount this slot, because a slot that silently
82
+ * renders nothing is a slot you cannot debug — you write the condition yourself and see
83
+ * it:
84
+ *
85
+ * ```tsx
86
+ * <Input isInvalid={Boolean(error)}>
87
+ * <Input.Field value={value} onChangeText={onChange} />
88
+ * {error ? <Input.Error>{error}</Input.Error> : null}
89
+ * </Input>
90
+ * ```
91
91
  *
92
- * `editable` is absent: it is `disabled` under another name, and R8 keeps that off the
93
- * public surface `isDisabled` on the root is what stops the field.
92
+ * `accessibilityLiveRegion` is deliberately not set: an error that appears while you are
93
+ * still typing in the field is announced by the field's own `aria-invalid`, and a live
94
+ * region on top of that reads the message on every keystroke that changes it.
94
95
  */
95
- type InputFieldProps = Omit<TextInputProps, 'editable'> & Omit<TextStyleProps, keyof TextInputProps>;
96
- /** `Text`'s own props win over the `TextStyle` keys of the same name (R14). */
97
- type InputTextProps = TextProps & Omit<TextStyleProps, keyof TextProps> & {
98
- children?: ReactNode;
99
- };
100
- type InputLabelProps = InputTextProps;
101
- type InputDescriptionProps = InputTextProps;
102
- type InputErrorProps = InputTextProps;
96
+ declare const InputError: react.ForwardRefExoticComponent<react_native.TextProps & Omit<TextStyleProps, keyof react_native.TextProps> & {
97
+ children?: react.ReactNode;
98
+ } & react.RefAttributes<Text>>;
99
+
103
100
  /**
104
- * Read off `TextInput`'s own props rather than spelled out: React Native has renamed the
105
- * payload of these two more than once, and a hand-written `NativeSyntheticEvent<…>` here
106
- * would be a second declaration free to drift from the node that actually fires them.
101
+ * The `TextInput` itself the one node of this component that the user types into.
102
+ *
103
+ * ```tsx
104
+ * <Input.Field value={email} onChangeText={setEmail} placeholder="nom@exemple.fr" />
105
+ * ```
106
+ *
107
+ * It takes everything `TextInput` takes, which is why `value`, `defaultValue`, `onChange`,
108
+ * `keyboardType`, `secureTextEntry`, `autoComplete` and `multiline` are written here and
109
+ * not on the root. There is no `type`: that is an HTML prop, and React Native splits it
110
+ * into `inputMode`, `keyboardType`, `secureTextEntry` and `autoComplete`.
111
+ *
112
+ * What it does *not* take is `editable`: that is `disabled` under another name, and R8
113
+ * keeps it off the public surface — `isDisabled` on the root is what stops the field.
114
+ *
115
+ * It reports focus up rather than styling it (R5): the root's recipe resolves on the
116
+ * focus state, so the root owns it and this composes the caller's handlers into the two
117
+ * the context published.
107
118
  */
108
- type FieldFocusEvent = Parameters<NonNullable<TextInputProps['onFocus']>>[0];
109
- type FieldBlurEvent = Parameters<NonNullable<TextInputProps['onBlur']>>[0];
119
+ declare const InputField: react.ForwardRefExoticComponent<Omit<react_native.TextInputProps, "editable"> & Omit<TextStyleProps, keyof react_native.TextInputProps> & react.RefAttributes<TextInput>>;
120
+
110
121
  /**
111
- * R5 resolved styles, not props for a slot to resolve a second time. Each entry is the
112
- * cached `StyleSheet` reference with the uncached tint pass layered over it, so a slot
113
- * merges its own `style` on top and does no work of its own.
122
+ * What the field is for. It turns `danger` with `isInvalid`, so the field that is wrong is
123
+ * findable on a long form without reading every message.
124
+ *
125
+ * It carries the id the field points at, which is what makes a screen reader announce
126
+ * "Courriel, champ de saisie" instead of reading the placeholder and hoping.
127
+ *
128
+ * Its colour comes from the theme's `foreground` rather than the variant's: the label sits
129
+ * outside the box, on the screen behind it, so a tinted field does not tint it.
114
130
  */
115
- type InputContextValue = {
116
- labelStyle: StyleProp<TextStyle>;
117
- fieldStyle: StyleProp<TextStyle>;
118
- descriptionStyle: StyleProp<TextStyle>;
119
- errorStyle: StyleProp<TextStyle>;
120
- /**
121
- * A value and not a style: `placeholderTextColor` is a `TextInput` prop, so the root
122
- * flattens its placeholder slot once here rather than in the field.
123
- */
124
- placeholderTextColor?: string;
125
- /**
126
- * The focus state lives on the **root**, because the root's recipe resolves on it (R5)
127
- * and it needs the value before it renders — but the node that hears the event is
128
- * `Input.Field`, three levels down. These are how it reports back. Their identity is
129
- * stable, so publishing them costs no re-render of a memoized slot.
130
- */
131
- onFieldFocus: (event: FieldFocusEvent) => void;
132
- onFieldBlur: (event: FieldBlurEvent) => void;
133
- /**
134
- * The id the label carries and the field points at, so a screen reader reads "Courriel,
135
- * champ de saisie" rather than just the placeholder.
136
- */
137
- labelId: string;
138
- descriptionId: string;
139
- isDisabled: boolean;
140
- isInvalid: boolean;
141
- };
131
+ declare const InputLabel: react.ForwardRefExoticComponent<react_native.TextProps & Omit<TextStyleProps, keyof react_native.TextProps> & {
132
+ children?: react.ReactNode;
133
+ } & react.RefAttributes<Text>>;
142
134
 
143
135
  declare const useInput: () => InputContextValue;
144
136
 
145
- declare const inputRecipe: Recipe<"label" | "field" | "description" | "root" | "placeholder" | "error", InputVariant, {
137
+ declare const inputRecipe: Recipe<"label" | "field" | "description" | "root" | "textArea" | "placeholder" | "error", InputVariant, {
146
138
  readonly size: {
147
139
  readonly xs: (theme: XAUITheme) => SlotStyles<InputSlot>;
148
140
  readonly sm: (theme: XAUITheme) => SlotStyles<InputSlot>;
@@ -210,4 +202,4 @@ declare const Input: react.ForwardRefExoticComponent<{
210
202
  } & react.RefAttributes<react_native.Text>>;
211
203
  };
212
204
 
213
- export { Input, type InputContextValue, type InputDescriptionProps, type InputErrorProps, type InputFieldProps, type InputLabelPlacement, type InputLabelProps, type InputProps, type InputSize, type InputSlot, type InputVariant, inputRecipe, useInput };
205
+ export { Input, InputContextValue, InputDescription, InputError, InputField, InputLabel, InputLabelPlacement, InputRoot, InputSize, InputSlot, InputVariant, inputRecipe, useInput };
@@ -1,14 +1,24 @@
1
1
  import {
2
2
  Input,
3
+ InputDescription,
4
+ InputError,
5
+ InputField,
6
+ InputLabel,
7
+ InputRoot,
3
8
  inputRecipe,
4
9
  useInput
5
- } from "../../chunk-6RO26ORT.js";
10
+ } from "../../chunk-2OY76YNB.js";
6
11
  import "../../chunk-3JATAB7S.js";
7
12
  import "../../chunk-PMO62QK4.js";
8
13
  import "../../chunk-A3EGFI6T.js";
9
14
  import "../../chunk-GGW42MY4.js";
10
15
  export {
11
16
  Input,
17
+ InputDescription,
18
+ InputError,
19
+ InputField,
20
+ InputLabel,
21
+ InputRoot,
12
22
  inputRecipe,
13
23
  useInput
14
24
  };
@@ -8,7 +8,7 @@
8
8
 
9
9
 
10
10
 
11
- var _chunkLIQTGAI7cjs = require('../../chunk-LIQTGAI7.cjs');
11
+ var _chunkBULNTP5Ncjs = require('../../chunk-BULNTP5N.cjs');
12
12
  require('../../chunk-EJQCQPET.cjs');
13
13
  require('../../chunk-YXVKQMCK.cjs');
14
14
  require('../../chunk-HUZ4AUM2.cjs');
@@ -24,4 +24,4 @@ require('../../chunk-MC7SY2QH.cjs');
24
24
 
25
25
 
26
26
 
27
- exports.InputOTP = _chunkLIQTGAI7cjs.InputOTP; exports.OTP_ALPHANUMERIC = _chunkLIQTGAI7cjs.OTP_ALPHANUMERIC; exports.OTP_DIGITS = _chunkLIQTGAI7cjs.OTP_DIGITS; exports.OTP_LETTERS = _chunkLIQTGAI7cjs.OTP_LETTERS; exports.buildSlots = _chunkLIQTGAI7cjs.buildSlots; exports.extractPastedCode = _chunkLIQTGAI7cjs.extractPastedCode; exports.inputOTPRecipe = _chunkLIQTGAI7cjs.inputOTPRecipe; exports.useInputOTP = _chunkLIQTGAI7cjs.useInputOTP; exports.useInputOTPBox = _chunkLIQTGAI7cjs.useInputOTPBox;
27
+ exports.InputOTP = _chunkBULNTP5Ncjs.InputOTP; exports.OTP_ALPHANUMERIC = _chunkBULNTP5Ncjs.OTP_ALPHANUMERIC; exports.OTP_DIGITS = _chunkBULNTP5Ncjs.OTP_DIGITS; exports.OTP_LETTERS = _chunkBULNTP5Ncjs.OTP_LETTERS; exports.buildSlots = _chunkBULNTP5Ncjs.buildSlots; exports.extractPastedCode = _chunkBULNTP5Ncjs.extractPastedCode; exports.inputOTPRecipe = _chunkBULNTP5Ncjs.inputOTPRecipe; exports.useInputOTP = _chunkBULNTP5Ncjs.useInputOTP; exports.useInputOTPBox = _chunkBULNTP5Ncjs.useInputOTPBox;
@@ -8,7 +8,7 @@ import {
8
8
  inputOTPRecipe,
9
9
  useInputOTP,
10
10
  useInputOTPBox
11
- } from "../../chunk-J4QE34AU.js";
11
+ } from "../../chunk-I6UCYAO2.js";
12
12
  import "../../chunk-EGLLDKN6.js";
13
13
  import "../../chunk-3JATAB7S.js";
14
14
  import "../../chunk-PMO62QK4.js";
@@ -0,0 +1,13 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+
4
+ var _chunkGSEK6OCYcjs = require('../../chunk-GSEK6OCY.cjs');
5
+ require('../../chunk-YEW5LPWL.cjs');
6
+ require('../../chunk-YXVKQMCK.cjs');
7
+ require('../../chunk-HUZ4AUM2.cjs');
8
+ require('../../chunk-57SJ4LJF.cjs');
9
+ require('../../chunk-MC7SY2QH.cjs');
10
+
11
+
12
+
13
+ exports.TextArea = _chunkGSEK6OCYcjs.TextArea; exports.useTextArea = _chunkGSEK6OCYcjs.useTextArea;