@xaui/native 0.9.1-alpha.4 → 0.9.1-alpha.40
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.
- package/dist/chunk-2EGR4LWD.js +145 -0
- package/dist/chunk-2NRZKJG7.js +531 -0
- package/dist/chunk-2PMXMKS5.js +67 -0
- package/dist/chunk-2XPG2243.js +586 -0
- package/dist/chunk-36PRYGAM.js +13 -0
- package/dist/chunk-3E7CDKFO.cjs +696 -0
- package/dist/chunk-3GFRSZYR.js +54 -0
- package/dist/chunk-423RQBOX.js +21 -0
- package/dist/chunk-4CUZZWFW.js +92 -0
- package/dist/chunk-4GTAZM2C.js +174 -0
- package/dist/chunk-4KFKWBN5.cjs +89 -0
- package/dist/{chunk-3QBT3Q65.cjs → chunk-57SJ4LJF.cjs} +7 -2
- package/dist/chunk-5R26NM4M.cjs +402 -0
- package/dist/chunk-5VKYNBNA.js +607 -0
- package/dist/chunk-64MXEVT3.js +66 -0
- package/dist/chunk-6DOLGZVV.cjs +147 -0
- package/dist/chunk-6L2TS2R3.cjs +92 -0
- package/dist/chunk-6UEZJRVI.js +669 -0
- package/dist/chunk-734MFAX4.js +27 -0
- package/dist/chunk-73RKQC5X.js +104 -0
- package/dist/chunk-7DPL3ZDS.cjs +21 -0
- package/dist/chunk-7EIHHOHP.cjs +42 -0
- package/dist/chunk-7GHM4GKL.cjs +119 -0
- package/dist/chunk-7YF5NAHQ.cjs +74 -0
- package/dist/{chunk-X2K2FX3W.js → chunk-A3EGFI6T.js} +6 -1
- package/dist/chunk-ABAGZTXZ.cjs +736 -0
- package/dist/{chunk-AW63PTQ4.cjs → chunk-ACAPTWE3.cjs} +85 -81
- package/dist/chunk-AMCSSOJT.cjs +104 -0
- package/dist/chunk-BA2DBSAN.js +102 -0
- package/dist/chunk-BRRXFOBY.js +431 -0
- package/dist/chunk-C5YLPCFC.cjs +293 -0
- package/dist/chunk-DA3OKXHV.cjs +700 -0
- package/dist/chunk-DD4276RF.js +366 -0
- package/dist/chunk-DG2I4PJG.js +701 -0
- package/dist/chunk-DHGLGSH6.js +661 -0
- package/dist/chunk-DIBUQ46Y.js +346 -0
- package/dist/chunk-EGLLDKN6.js +9 -0
- package/dist/chunk-EJQCQPET.cjs +9 -0
- package/dist/chunk-EKS3W46M.cjs +66 -0
- package/dist/chunk-EZEYMLO3.js +402 -0
- package/dist/chunk-F6CQ6CBI.cjs +112 -0
- package/dist/chunk-F6W3JQ7K.js +42 -0
- package/dist/chunk-FHUYHV6J.js +89 -0
- package/dist/chunk-FNEUOBCV.cjs +174 -0
- package/dist/chunk-G7P3ERYF.cjs +478 -0
- package/dist/chunk-GA6PBWNT.js +147 -0
- package/dist/chunk-GFUZ3MUT.cjs +455 -0
- package/dist/chunk-GGW43Q37.cjs +1 -0
- package/dist/chunk-GTR5X65M.cjs +27 -0
- package/dist/chunk-H4E4HDEP.cjs +13 -0
- package/dist/chunk-H7DS4IO7.js +198 -0
- package/dist/chunk-HDVVZG4S.cjs +198 -0
- package/dist/chunk-IKJVLJKT.js +151 -0
- package/dist/chunk-J3MB4PI5.cjs +531 -0
- package/dist/chunk-K72UDPVN.js +119 -0
- package/dist/chunk-KCMYU7WF.js +86 -0
- package/dist/chunk-LRN3RNDO.js +940 -0
- package/dist/chunk-LTX6TB5I.js +124 -0
- package/dist/chunk-LUPCPLND.cjs +145 -0
- package/dist/chunk-M63GFNKV.js +194 -0
- package/dist/chunk-N3KTZMPG.js +293 -0
- package/dist/chunk-NCTOTTVW.js +13 -0
- package/dist/chunk-NWGLP6JX.cjs +410 -0
- package/dist/chunk-R73XQK7X.cjs +314 -0
- package/dist/chunk-RU7JCMWC.cjs +881 -0
- package/dist/chunk-SNIHUKDA.cjs +184 -0
- package/dist/chunk-T5FV5F7A.cjs +607 -0
- package/dist/chunk-TDTUAIFF.cjs +153 -0
- package/dist/chunk-TJ74XVZN.cjs +431 -0
- package/dist/chunk-TK44VBIE.cjs +194 -0
- package/dist/chunk-UAWBAD4E.cjs +346 -0
- package/dist/chunk-UFTCTTKK.js +381 -0
- package/dist/chunk-WDDXU3OH.cjs +67 -0
- package/dist/chunk-WFEMJCXO.cjs +13 -0
- package/dist/chunk-WHJTBTYM.js +0 -0
- package/dist/{chunk-2KXQATVL.js → chunk-WKCQ6VGW.js} +59 -55
- package/dist/chunk-XFPQFCEK.js +455 -0
- package/dist/chunk-XSQPVDFH.cjs +60 -0
- package/dist/chunk-XTC2SLFT.js +153 -0
- package/dist/chunk-XV735BSA.cjs +366 -0
- package/dist/chunk-XWNG2U4K.cjs +124 -0
- package/dist/chunk-YGYYJ3LQ.js +314 -0
- package/dist/chunk-YVHT2UVW.js +74 -0
- package/dist/chunk-ZFOOJK37.cjs +86 -0
- package/dist/close-button.type-BUYuoSt2.d.ts +36 -0
- package/dist/close-button.type-CHsgZ3wO.d.cts +36 -0
- package/dist/components/accordion/index.cjs +35 -0
- package/dist/components/accordion/index.d.cts +299 -0
- package/dist/components/accordion/index.d.ts +299 -0
- package/dist/components/accordion/index.js +35 -0
- package/dist/components/alert/index.cjs +20 -0
- package/dist/components/alert/index.d.cts +169 -0
- package/dist/components/alert/index.d.ts +169 -0
- package/dist/components/alert/index.js +20 -0
- package/dist/components/avatar/index.cjs +16 -0
- package/dist/components/avatar/index.d.cts +131 -0
- package/dist/components/avatar/index.d.ts +131 -0
- package/dist/components/avatar/index.js +16 -0
- package/dist/components/badge/index.cjs +15 -0
- package/dist/components/badge/index.d.cts +157 -0
- package/dist/components/badge/index.d.ts +157 -0
- package/dist/components/badge/index.js +15 -0
- package/dist/components/button/index.cjs +22 -0
- package/dist/components/button/index.d.cts +613 -0
- package/dist/components/button/index.d.ts +613 -0
- package/dist/components/button/index.js +22 -0
- package/dist/components/card/index.cjs +22 -0
- package/dist/components/card/index.d.cts +620 -0
- package/dist/components/card/index.d.ts +620 -0
- package/dist/components/card/index.js +22 -0
- package/dist/components/checkbox/index.cjs +26 -0
- package/dist/components/checkbox/index.d.cts +1136 -0
- package/dist/components/checkbox/index.d.ts +1136 -0
- package/dist/components/checkbox/index.js +26 -0
- package/dist/components/chip/index.cjs +20 -0
- package/dist/components/chip/index.d.cts +608 -0
- package/dist/components/chip/index.d.ts +608 -0
- package/dist/components/chip/index.js +20 -0
- package/dist/components/divider/index.cjs +13 -0
- package/dist/components/divider/index.d.cts +117 -0
- package/dist/components/divider/index.d.ts +117 -0
- package/dist/components/divider/index.js +13 -0
- package/dist/components/field-group/index.cjs +27 -0
- package/dist/components/field-group/index.d.cts +270 -0
- package/dist/components/field-group/index.d.ts +270 -0
- package/dist/components/field-group/index.js +27 -0
- package/dist/components/input-otp/index.cjs +29 -0
- package/dist/components/input-otp/index.d.cts +325 -0
- package/dist/components/input-otp/index.d.ts +325 -0
- package/dist/components/input-otp/index.js +29 -0
- package/dist/components/menu/index.cjs +49 -0
- package/dist/components/menu/index.d.cts +351 -0
- package/dist/components/menu/index.d.ts +351 -0
- package/dist/components/menu/index.js +49 -0
- package/dist/components/popover/index.cjs +38 -0
- package/dist/components/popover/index.d.cts +254 -0
- package/dist/components/popover/index.d.ts +254 -0
- package/dist/components/popover/index.js +38 -0
- package/dist/components/radio/index.cjs +26 -0
- package/dist/components/radio/index.d.cts +1102 -0
- package/dist/components/radio/index.d.ts +1102 -0
- package/dist/components/radio/index.js +26 -0
- package/dist/components/select/index.cjs +50 -0
- package/dist/components/select/index.d.cts +498 -0
- package/dist/components/select/index.d.ts +498 -0
- package/dist/components/select/index.js +50 -0
- package/dist/components/skeleton/index.cjs +11 -0
- package/dist/components/skeleton/index.d.cts +111 -0
- package/dist/components/skeleton/index.d.ts +111 -0
- package/dist/components/skeleton/index.js +11 -0
- package/dist/components/spinner/index.cjs +17 -0
- package/dist/components/spinner/index.d.cts +104 -0
- package/dist/components/spinner/index.d.ts +104 -0
- package/dist/components/spinner/index.js +17 -0
- package/dist/components/switch/index.cjs +27 -0
- package/dist/components/switch/index.d.cts +1154 -0
- package/dist/components/switch/index.d.ts +1154 -0
- package/dist/components/switch/index.js +27 -0
- package/dist/components/text-area/index.cjs +14 -0
- package/dist/components/text-area/index.d.cts +73 -0
- package/dist/components/text-area/index.d.ts +73 -0
- package/dist/components/text-area/index.js +14 -0
- package/dist/components/text-field/index.cjs +25 -0
- package/dist/components/text-field/index.d.cts +205 -0
- package/dist/components/text-field/index.d.ts +205 -0
- package/dist/components/text-field/index.js +25 -0
- package/dist/components/typography/index.cjs +15 -0
- package/dist/components/typography/index.d.cts +116 -0
- package/dist/components/typography/index.d.ts +116 -0
- package/dist/components/typography/index.js +15 -0
- package/dist/components/view/index.cjs +17 -0
- package/dist/components/view/index.d.cts +152 -0
- package/dist/components/view/index.d.ts +152 -0
- package/dist/components/view/index.js +17 -0
- package/dist/create-recipe-BdVd2ffi.d.ts +114 -0
- package/dist/create-recipe-dC7wMfnj.d.cts +114 -0
- package/dist/icon.type-Kml72iSz.d.ts +73 -0
- package/dist/icon.type-d_i9ma-i.d.cts +73 -0
- package/dist/index.cjs +400 -4
- package/dist/index.d.cts +118 -4
- package/dist/index.d.ts +118 -4
- package/dist/index.js +423 -27
- package/dist/placement-DHa0Rrh1.d.cts +38 -0
- package/dist/placement-DHa0Rrh1.d.ts +38 -0
- package/dist/pressable-feedback.type-BA2C9sSz.d.cts +127 -0
- package/dist/pressable-feedback.type-Bs4dQlGj.d.ts +127 -0
- package/dist/style-props.type-CfnoGEP7.d.cts +31 -0
- package/dist/style-props.type-CfnoGEP7.d.ts +31 -0
- package/dist/system/index.cjs +73 -4
- package/dist/system/index.d.cts +379 -193
- package/dist/system/index.d.ts +379 -193
- package/dist/system/index.js +87 -18
- package/dist/text-field.type-0l73acce.d.ts +167 -0
- package/dist/text-field.type-DBh06DU5.d.cts +167 -0
- package/dist/theme/index.cjs +5 -3
- package/dist/theme/index.d.cts +55 -24
- package/dist/theme/index.d.ts +55 -24
- package/dist/theme/index.js +4 -2
- package/dist/{theme.type-C9bFJKFm.d.cts → theme.type-C2gNHpEx.d.cts} +1 -1
- package/dist/{theme.type-C9bFJKFm.d.ts → theme.type-C2gNHpEx.d.ts} +1 -1
- package/package.json +254 -18
- package/dist/chunk-ECDWSSHJ.js +0 -688
- package/dist/chunk-IYFGO523.cjs +0 -688
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Switch,
|
|
3
|
+
SwitchLabel,
|
|
4
|
+
SwitchRoot,
|
|
5
|
+
SwitchThumb,
|
|
6
|
+
SwitchTrack,
|
|
7
|
+
switchRecipe,
|
|
8
|
+
useSwitch
|
|
9
|
+
} from "../../chunk-DHGLGSH6.js";
|
|
10
|
+
import "../../chunk-F6W3JQ7K.js";
|
|
11
|
+
import "../../chunk-6UEZJRVI.js";
|
|
12
|
+
import "../../chunk-423RQBOX.js";
|
|
13
|
+
import "../../chunk-EGLLDKN6.js";
|
|
14
|
+
import "../../chunk-4GTAZM2C.js";
|
|
15
|
+
import "../../chunk-A3EGFI6T.js";
|
|
16
|
+
import "../../chunk-K72UDPVN.js";
|
|
17
|
+
import "../../chunk-36PRYGAM.js";
|
|
18
|
+
import "../../chunk-M63GFNKV.js";
|
|
19
|
+
export {
|
|
20
|
+
Switch,
|
|
21
|
+
SwitchLabel,
|
|
22
|
+
SwitchRoot,
|
|
23
|
+
SwitchThumb,
|
|
24
|
+
SwitchTrack,
|
|
25
|
+
switchRecipe,
|
|
26
|
+
useSwitch
|
|
27
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
var _chunk7YF5NAHQcjs = require('../../chunk-7YF5NAHQ.cjs');
|
|
5
|
+
require('../../chunk-J3MB4PI5.cjs');
|
|
6
|
+
require('../../chunk-FNEUOBCV.cjs');
|
|
7
|
+
require('../../chunk-57SJ4LJF.cjs');
|
|
8
|
+
require('../../chunk-7GHM4GKL.cjs');
|
|
9
|
+
require('../../chunk-H4E4HDEP.cjs');
|
|
10
|
+
require('../../chunk-TK44VBIE.cjs');
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
exports.TextArea = _chunk7YF5NAHQcjs.TextArea; exports.useTextArea = _chunk7YF5NAHQcjs.useTextArea;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
import { T as TextFieldFieldProps, a as TextFieldProps } from '../../text-field.type-DBh06DU5.cjs';
|
|
4
|
+
import * as react_native from 'react-native';
|
|
5
|
+
import { T as TextStyleProps } from '../../style-props.type-CfnoGEP7.cjs';
|
|
6
|
+
import '../../theme.type-C2gNHpEx.cjs';
|
|
7
|
+
|
|
8
|
+
type TextAreaOwnProps = {
|
|
9
|
+
/**
|
|
10
|
+
* How many lines tall the field starts. It is a **raw value**, not a token: it resolves
|
|
11
|
+
* outside the style cache from the line height the size chose, the same path `color`
|
|
12
|
+
* takes — which is what lets `rows={7}` exist without seven entries in the cache.
|
|
13
|
+
*
|
|
14
|
+
* @default 3
|
|
15
|
+
*/
|
|
16
|
+
rows?: number;
|
|
17
|
+
/**
|
|
18
|
+
* The ceiling, in lines. Past it the field stops growing and scrolls; unset, it grows
|
|
19
|
+
* with the text for as long as the text goes on.
|
|
20
|
+
*/
|
|
21
|
+
maxRows?: number;
|
|
22
|
+
children?: ReactNode;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Everything the `TextField` root understands, plus the two the shape of a multiline field
|
|
26
|
+
* needs. They sit on the **root** rather than on `TextArea.Field` for the reason `size`
|
|
27
|
+
* and `variant` do: the root is where the field's shape is decided, and the slot reads
|
|
28
|
+
* what it resolved.
|
|
29
|
+
*/
|
|
30
|
+
type TextAreaProps = Omit<TextFieldProps, 'children'> & TextAreaOwnProps;
|
|
31
|
+
/**
|
|
32
|
+
* Everything `TextField.Field` accepts except `multiline`, which this sets — it is the same
|
|
33
|
+
* `TextInput`, and the same props, with the three things several lines need.
|
|
34
|
+
*/
|
|
35
|
+
type TextAreaFieldProps = Omit<TextFieldFieldProps, 'multiline'>;
|
|
36
|
+
/**
|
|
37
|
+
* The one thing the `TextField`'s own context cannot carry, because `rows` is not the
|
|
38
|
+
* `TextField`'s business: a single-line field has no use for it, and a prop that does nothing
|
|
39
|
+
* in the common case is a prop that reads as broken.
|
|
40
|
+
*/
|
|
41
|
+
type TextAreaContextValue = {
|
|
42
|
+
rows: number;
|
|
43
|
+
maxRows: number | undefined;
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
declare const useTextArea: () => TextAreaContextValue;
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Three of the four slots **are** the `TextField`'s, re-exported rather than wrapped.
|
|
50
|
+
*
|
|
51
|
+
* A wrapper would add three components to the tree to change a `displayName` string, and
|
|
52
|
+
* the string it would change is the one that tells you the truth: a `XAUI.TextField.Label`
|
|
53
|
+
* showing up inside a `XAUI.TextArea.Root` is exactly what is happening. Only the field
|
|
54
|
+
* differs, and it is the only one written here.
|
|
55
|
+
*/
|
|
56
|
+
declare const TextArea: react.ForwardRefExoticComponent<Omit<TextFieldProps, "children"> & {
|
|
57
|
+
rows?: number;
|
|
58
|
+
maxRows?: number;
|
|
59
|
+
children?: react.ReactNode;
|
|
60
|
+
} & react.RefAttributes<react_native.View>> & {
|
|
61
|
+
Label: react.ForwardRefExoticComponent<react_native.TextProps & Omit<TextStyleProps, keyof react_native.TextProps> & {
|
|
62
|
+
children?: react.ReactNode;
|
|
63
|
+
} & react.RefAttributes<react_native.Text>>;
|
|
64
|
+
Field: react.ForwardRefExoticComponent<TextAreaFieldProps & react.RefAttributes<react_native.TextInput>>;
|
|
65
|
+
Description: react.ForwardRefExoticComponent<react_native.TextProps & Omit<TextStyleProps, keyof react_native.TextProps> & {
|
|
66
|
+
children?: react.ReactNode;
|
|
67
|
+
} & react.RefAttributes<react_native.Text>>;
|
|
68
|
+
Error: react.ForwardRefExoticComponent<react_native.TextProps & Omit<TextStyleProps, keyof react_native.TextProps> & {
|
|
69
|
+
children?: react.ReactNode;
|
|
70
|
+
} & react.RefAttributes<react_native.Text>>;
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
export { TextArea, type TextAreaContextValue, type TextAreaFieldProps, type TextAreaProps, useTextArea };
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
import { T as TextFieldFieldProps, a as TextFieldProps } from '../../text-field.type-0l73acce.js';
|
|
4
|
+
import * as react_native from 'react-native';
|
|
5
|
+
import { T as TextStyleProps } from '../../style-props.type-CfnoGEP7.js';
|
|
6
|
+
import '../../theme.type-C2gNHpEx.js';
|
|
7
|
+
|
|
8
|
+
type TextAreaOwnProps = {
|
|
9
|
+
/**
|
|
10
|
+
* How many lines tall the field starts. It is a **raw value**, not a token: it resolves
|
|
11
|
+
* outside the style cache from the line height the size chose, the same path `color`
|
|
12
|
+
* takes — which is what lets `rows={7}` exist without seven entries in the cache.
|
|
13
|
+
*
|
|
14
|
+
* @default 3
|
|
15
|
+
*/
|
|
16
|
+
rows?: number;
|
|
17
|
+
/**
|
|
18
|
+
* The ceiling, in lines. Past it the field stops growing and scrolls; unset, it grows
|
|
19
|
+
* with the text for as long as the text goes on.
|
|
20
|
+
*/
|
|
21
|
+
maxRows?: number;
|
|
22
|
+
children?: ReactNode;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Everything the `TextField` root understands, plus the two the shape of a multiline field
|
|
26
|
+
* needs. They sit on the **root** rather than on `TextArea.Field` for the reason `size`
|
|
27
|
+
* and `variant` do: the root is where the field's shape is decided, and the slot reads
|
|
28
|
+
* what it resolved.
|
|
29
|
+
*/
|
|
30
|
+
type TextAreaProps = Omit<TextFieldProps, 'children'> & TextAreaOwnProps;
|
|
31
|
+
/**
|
|
32
|
+
* Everything `TextField.Field` accepts except `multiline`, which this sets — it is the same
|
|
33
|
+
* `TextInput`, and the same props, with the three things several lines need.
|
|
34
|
+
*/
|
|
35
|
+
type TextAreaFieldProps = Omit<TextFieldFieldProps, 'multiline'>;
|
|
36
|
+
/**
|
|
37
|
+
* The one thing the `TextField`'s own context cannot carry, because `rows` is not the
|
|
38
|
+
* `TextField`'s business: a single-line field has no use for it, and a prop that does nothing
|
|
39
|
+
* in the common case is a prop that reads as broken.
|
|
40
|
+
*/
|
|
41
|
+
type TextAreaContextValue = {
|
|
42
|
+
rows: number;
|
|
43
|
+
maxRows: number | undefined;
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
declare const useTextArea: () => TextAreaContextValue;
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Three of the four slots **are** the `TextField`'s, re-exported rather than wrapped.
|
|
50
|
+
*
|
|
51
|
+
* A wrapper would add three components to the tree to change a `displayName` string, and
|
|
52
|
+
* the string it would change is the one that tells you the truth: a `XAUI.TextField.Label`
|
|
53
|
+
* showing up inside a `XAUI.TextArea.Root` is exactly what is happening. Only the field
|
|
54
|
+
* differs, and it is the only one written here.
|
|
55
|
+
*/
|
|
56
|
+
declare const TextArea: react.ForwardRefExoticComponent<Omit<TextFieldProps, "children"> & {
|
|
57
|
+
rows?: number;
|
|
58
|
+
maxRows?: number;
|
|
59
|
+
children?: react.ReactNode;
|
|
60
|
+
} & react.RefAttributes<react_native.View>> & {
|
|
61
|
+
Label: react.ForwardRefExoticComponent<react_native.TextProps & Omit<TextStyleProps, keyof react_native.TextProps> & {
|
|
62
|
+
children?: react.ReactNode;
|
|
63
|
+
} & react.RefAttributes<react_native.Text>>;
|
|
64
|
+
Field: react.ForwardRefExoticComponent<TextAreaFieldProps & react.RefAttributes<react_native.TextInput>>;
|
|
65
|
+
Description: react.ForwardRefExoticComponent<react_native.TextProps & Omit<TextStyleProps, keyof react_native.TextProps> & {
|
|
66
|
+
children?: react.ReactNode;
|
|
67
|
+
} & react.RefAttributes<react_native.Text>>;
|
|
68
|
+
Error: react.ForwardRefExoticComponent<react_native.TextProps & Omit<TextStyleProps, keyof react_native.TextProps> & {
|
|
69
|
+
children?: react.ReactNode;
|
|
70
|
+
} & react.RefAttributes<react_native.Text>>;
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
export { TextArea, type TextAreaContextValue, type TextAreaFieldProps, type TextAreaProps, useTextArea };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import {
|
|
2
|
+
TextArea,
|
|
3
|
+
useTextArea
|
|
4
|
+
} from "../../chunk-YVHT2UVW.js";
|
|
5
|
+
import "../../chunk-2NRZKJG7.js";
|
|
6
|
+
import "../../chunk-4GTAZM2C.js";
|
|
7
|
+
import "../../chunk-A3EGFI6T.js";
|
|
8
|
+
import "../../chunk-K72UDPVN.js";
|
|
9
|
+
import "../../chunk-36PRYGAM.js";
|
|
10
|
+
import "../../chunk-M63GFNKV.js";
|
|
11
|
+
export {
|
|
12
|
+
TextArea,
|
|
13
|
+
useTextArea
|
|
14
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
var _chunkJ3MB4PI5cjs = require('../../chunk-J3MB4PI5.cjs');
|
|
11
|
+
require('../../chunk-FNEUOBCV.cjs');
|
|
12
|
+
require('../../chunk-57SJ4LJF.cjs');
|
|
13
|
+
require('../../chunk-7GHM4GKL.cjs');
|
|
14
|
+
require('../../chunk-H4E4HDEP.cjs');
|
|
15
|
+
require('../../chunk-TK44VBIE.cjs');
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
exports.TextField = _chunkJ3MB4PI5cjs.TextField; exports.TextFieldDescription = _chunkJ3MB4PI5cjs.TextFieldDescription; exports.TextFieldError = _chunkJ3MB4PI5cjs.TextFieldError; exports.TextFieldField = _chunkJ3MB4PI5cjs.TextFieldField; exports.TextFieldLabel = _chunkJ3MB4PI5cjs.TextFieldLabel; exports.TextFieldRoot = _chunkJ3MB4PI5cjs.TextFieldRoot; exports.textFieldRecipe = _chunkJ3MB4PI5cjs.textFieldRecipe; exports.useTextField = _chunkJ3MB4PI5cjs.useTextField;
|
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import * as react_native from 'react-native';
|
|
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 TextFieldVariant, g as TextFieldSize, e as TextFieldLabelPlacement, b as TextFieldContextValue, h as TextFieldSlot } from '../../text-field.type-DBh06DU5.cjs';
|
|
7
|
+
export { c as TextFieldDescriptionProps, d as TextFieldErrorProps, T as TextFieldFieldProps, f as TextFieldLabelProps, a as TextFieldProps } from '../../text-field.type-DBh06DU5.cjs';
|
|
8
|
+
import { R as Recipe, S as SlotStyles, a as StyleFn } from '../../create-recipe-dC7wMfnj.cjs';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* A text field, with the label, the hint and the error that make it usable.
|
|
12
|
+
*
|
|
13
|
+
* ```tsx
|
|
14
|
+
* <TextField>
|
|
15
|
+
* <TextField.Label>Courriel</TextField.Label>
|
|
16
|
+
* <TextField.Field
|
|
17
|
+
* value={email}
|
|
18
|
+
* onChangeText={setEmail}
|
|
19
|
+
* placeholder="nom@exemple.fr"
|
|
20
|
+
* keyboardType="email-address"
|
|
21
|
+
* />
|
|
22
|
+
* <TextField.Description>On ne le partage jamais.</TextField.Description>
|
|
23
|
+
* </TextField>
|
|
24
|
+
*
|
|
25
|
+
* <TextField isInvalid={Boolean(error)}>
|
|
26
|
+
* <TextField.Label>Mot de passe</TextField.Label>
|
|
27
|
+
* <TextField.Field secureTextEntry value={password} onChangeText={setPassword} />
|
|
28
|
+
* {error ? <TextField.Error>{error}</TextField.Error> : null}
|
|
29
|
+
* </TextField>
|
|
30
|
+
* ```
|
|
31
|
+
*
|
|
32
|
+
* **The root is the column, not the field.** `TextField.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
|
+
*
|
|
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.
|
|
39
|
+
*/
|
|
40
|
+
declare const TextFieldRoot: react.ForwardRefExoticComponent<{
|
|
41
|
+
variant?: TextFieldVariant;
|
|
42
|
+
size?: TextFieldSize;
|
|
43
|
+
radius?: RadiusKey;
|
|
44
|
+
labelPlacement?: TextFieldLabelPlacement;
|
|
45
|
+
color?: string;
|
|
46
|
+
isInvalid?: boolean;
|
|
47
|
+
isDisabled?: boolean;
|
|
48
|
+
style?: react_native.StyleProp<react_native.ViewStyle>;
|
|
49
|
+
children?: react.ReactNode;
|
|
50
|
+
} & Omit<react_native.ViewProps, keyof {
|
|
51
|
+
variant?: TextFieldVariant;
|
|
52
|
+
size?: TextFieldSize;
|
|
53
|
+
radius?: RadiusKey;
|
|
54
|
+
labelPlacement?: TextFieldLabelPlacement;
|
|
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" | "size" | "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" | "variant" | "radius" | "isDisabled" | "isInvalid" | "labelPlacement"> & {
|
|
61
|
+
asChild?: boolean;
|
|
62
|
+
} & react.RefAttributes<View>>;
|
|
63
|
+
|
|
64
|
+
/**
|
|
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.
|
|
72
|
+
*/
|
|
73
|
+
declare const TextFieldDescription: react.ForwardRefExoticComponent<react_native.TextProps & Omit<TextStyleProps, keyof react_native.TextProps> & {
|
|
74
|
+
children?: react.ReactNode;
|
|
75
|
+
} & react.RefAttributes<Text>>;
|
|
76
|
+
|
|
77
|
+
/**
|
|
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
|
+
* <TextField isInvalid={Boolean(error)}>
|
|
87
|
+
* <TextField.Field value={value} onChangeText={onChange} />
|
|
88
|
+
* {error ? <TextField.Error>{error}</TextField.Error> : null}
|
|
89
|
+
* </TextField>
|
|
90
|
+
* ```
|
|
91
|
+
*
|
|
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.
|
|
95
|
+
*/
|
|
96
|
+
declare const TextFieldError: react.ForwardRefExoticComponent<react_native.TextProps & Omit<TextStyleProps, keyof react_native.TextProps> & {
|
|
97
|
+
children?: react.ReactNode;
|
|
98
|
+
} & react.RefAttributes<Text>>;
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* The `TextInput` itself — the one node of this component that the user types into.
|
|
102
|
+
*
|
|
103
|
+
* ```tsx
|
|
104
|
+
* <TextField.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.
|
|
118
|
+
*/
|
|
119
|
+
declare const TextFieldField: react.ForwardRefExoticComponent<Omit<react_native.TextInputProps, "editable"> & Omit<TextStyleProps, keyof react_native.TextInputProps> & react.RefAttributes<TextInput>>;
|
|
120
|
+
|
|
121
|
+
/**
|
|
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.
|
|
130
|
+
*/
|
|
131
|
+
declare const TextFieldLabel: react.ForwardRefExoticComponent<react_native.TextProps & Omit<TextStyleProps, keyof react_native.TextProps> & {
|
|
132
|
+
children?: react.ReactNode;
|
|
133
|
+
} & react.RefAttributes<Text>>;
|
|
134
|
+
|
|
135
|
+
declare const useTextField: () => TextFieldContextValue;
|
|
136
|
+
|
|
137
|
+
declare const textFieldRecipe: Recipe<"label" | "field" | "root" | "description" | "suffix" | "icon" | "textArea" | "placeholder" | "error" | "prefix", TextFieldVariant, {
|
|
138
|
+
readonly size: {
|
|
139
|
+
readonly xs: (theme: XAUITheme) => SlotStyles<TextFieldSlot>;
|
|
140
|
+
readonly sm: (theme: XAUITheme) => SlotStyles<TextFieldSlot>;
|
|
141
|
+
readonly md: (theme: XAUITheme) => SlotStyles<TextFieldSlot>;
|
|
142
|
+
readonly lg: (theme: XAUITheme) => SlotStyles<TextFieldSlot>;
|
|
143
|
+
};
|
|
144
|
+
readonly radius: Record<RadiusKey, StyleFn<"field">>;
|
|
145
|
+
/**
|
|
146
|
+
* `outside` is the base behaviour, so it adds nothing — it is declared because an
|
|
147
|
+
* axis needs both of its values for the selection to be typed, and because a reader
|
|
148
|
+
* looking for "what does outside do" should find the answer here rather than infer it
|
|
149
|
+
* from an absence. The size-dependent half of `inside` is in `compoundVariants`.
|
|
150
|
+
*/
|
|
151
|
+
readonly labelPlacement: {
|
|
152
|
+
readonly outside: () => {};
|
|
153
|
+
readonly inside: () => {};
|
|
154
|
+
};
|
|
155
|
+
readonly isInvalid: {
|
|
156
|
+
readonly true: (theme: XAUITheme) => {
|
|
157
|
+
field: {
|
|
158
|
+
borderColor: string;
|
|
159
|
+
};
|
|
160
|
+
label: {
|
|
161
|
+
color: string;
|
|
162
|
+
};
|
|
163
|
+
description: {
|
|
164
|
+
color: string;
|
|
165
|
+
};
|
|
166
|
+
};
|
|
167
|
+
};
|
|
168
|
+
}>;
|
|
169
|
+
|
|
170
|
+
declare const TextField: react.ForwardRefExoticComponent<{
|
|
171
|
+
variant?: TextFieldVariant;
|
|
172
|
+
size?: TextFieldSize;
|
|
173
|
+
radius?: RadiusKey;
|
|
174
|
+
labelPlacement?: TextFieldLabelPlacement;
|
|
175
|
+
color?: string;
|
|
176
|
+
isInvalid?: boolean;
|
|
177
|
+
isDisabled?: boolean;
|
|
178
|
+
style?: react_native.StyleProp<react_native.ViewStyle>;
|
|
179
|
+
children?: react.ReactNode;
|
|
180
|
+
} & Omit<react_native.ViewProps, keyof {
|
|
181
|
+
variant?: TextFieldVariant;
|
|
182
|
+
size?: TextFieldSize;
|
|
183
|
+
radius?: RadiusKey;
|
|
184
|
+
labelPlacement?: TextFieldLabelPlacement;
|
|
185
|
+
color?: string;
|
|
186
|
+
isInvalid?: boolean;
|
|
187
|
+
isDisabled?: boolean;
|
|
188
|
+
style?: react_native.StyleProp<react_native.ViewStyle>;
|
|
189
|
+
children?: react.ReactNode;
|
|
190
|
+
}> & Omit<ViewStyleProps, "color" | "pointerEvents" | "style" | "children" | "size" | "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" | "variant" | "radius" | "isDisabled" | "isInvalid" | "labelPlacement"> & {
|
|
191
|
+
asChild?: boolean;
|
|
192
|
+
} & react.RefAttributes<react_native.View>> & {
|
|
193
|
+
Label: react.ForwardRefExoticComponent<react_native.TextProps & Omit<TextStyleProps, keyof react_native.TextProps> & {
|
|
194
|
+
children?: react.ReactNode;
|
|
195
|
+
} & react.RefAttributes<react_native.Text>>;
|
|
196
|
+
Field: react.ForwardRefExoticComponent<Omit<react_native.TextInputProps, "editable"> & Omit<TextStyleProps, keyof react_native.TextInputProps> & react.RefAttributes<react_native.TextInput>>;
|
|
197
|
+
Description: react.ForwardRefExoticComponent<react_native.TextProps & Omit<TextStyleProps, keyof react_native.TextProps> & {
|
|
198
|
+
children?: react.ReactNode;
|
|
199
|
+
} & react.RefAttributes<react_native.Text>>;
|
|
200
|
+
Error: react.ForwardRefExoticComponent<react_native.TextProps & Omit<TextStyleProps, keyof react_native.TextProps> & {
|
|
201
|
+
children?: react.ReactNode;
|
|
202
|
+
} & react.RefAttributes<react_native.Text>>;
|
|
203
|
+
};
|
|
204
|
+
|
|
205
|
+
export { TextField, TextFieldContextValue, TextFieldDescription, TextFieldError, TextFieldField, TextFieldLabel, TextFieldLabelPlacement, TextFieldRoot, TextFieldSize, TextFieldSlot, TextFieldVariant, textFieldRecipe, useTextField };
|
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import * as react_native from 'react-native';
|
|
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 TextFieldVariant, g as TextFieldSize, e as TextFieldLabelPlacement, b as TextFieldContextValue, h as TextFieldSlot } from '../../text-field.type-0l73acce.js';
|
|
7
|
+
export { c as TextFieldDescriptionProps, d as TextFieldErrorProps, T as TextFieldFieldProps, f as TextFieldLabelProps, a as TextFieldProps } from '../../text-field.type-0l73acce.js';
|
|
8
|
+
import { R as Recipe, S as SlotStyles, a as StyleFn } from '../../create-recipe-BdVd2ffi.js';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* A text field, with the label, the hint and the error that make it usable.
|
|
12
|
+
*
|
|
13
|
+
* ```tsx
|
|
14
|
+
* <TextField>
|
|
15
|
+
* <TextField.Label>Courriel</TextField.Label>
|
|
16
|
+
* <TextField.Field
|
|
17
|
+
* value={email}
|
|
18
|
+
* onChangeText={setEmail}
|
|
19
|
+
* placeholder="nom@exemple.fr"
|
|
20
|
+
* keyboardType="email-address"
|
|
21
|
+
* />
|
|
22
|
+
* <TextField.Description>On ne le partage jamais.</TextField.Description>
|
|
23
|
+
* </TextField>
|
|
24
|
+
*
|
|
25
|
+
* <TextField isInvalid={Boolean(error)}>
|
|
26
|
+
* <TextField.Label>Mot de passe</TextField.Label>
|
|
27
|
+
* <TextField.Field secureTextEntry value={password} onChangeText={setPassword} />
|
|
28
|
+
* {error ? <TextField.Error>{error}</TextField.Error> : null}
|
|
29
|
+
* </TextField>
|
|
30
|
+
* ```
|
|
31
|
+
*
|
|
32
|
+
* **The root is the column, not the field.** `TextField.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
|
+
*
|
|
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.
|
|
39
|
+
*/
|
|
40
|
+
declare const TextFieldRoot: react.ForwardRefExoticComponent<{
|
|
41
|
+
variant?: TextFieldVariant;
|
|
42
|
+
size?: TextFieldSize;
|
|
43
|
+
radius?: RadiusKey;
|
|
44
|
+
labelPlacement?: TextFieldLabelPlacement;
|
|
45
|
+
color?: string;
|
|
46
|
+
isInvalid?: boolean;
|
|
47
|
+
isDisabled?: boolean;
|
|
48
|
+
style?: react_native.StyleProp<react_native.ViewStyle>;
|
|
49
|
+
children?: react.ReactNode;
|
|
50
|
+
} & Omit<react_native.ViewProps, keyof {
|
|
51
|
+
variant?: TextFieldVariant;
|
|
52
|
+
size?: TextFieldSize;
|
|
53
|
+
radius?: RadiusKey;
|
|
54
|
+
labelPlacement?: TextFieldLabelPlacement;
|
|
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" | "size" | "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" | "variant" | "radius" | "isDisabled" | "isInvalid" | "labelPlacement"> & {
|
|
61
|
+
asChild?: boolean;
|
|
62
|
+
} & react.RefAttributes<View>>;
|
|
63
|
+
|
|
64
|
+
/**
|
|
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.
|
|
72
|
+
*/
|
|
73
|
+
declare const TextFieldDescription: react.ForwardRefExoticComponent<react_native.TextProps & Omit<TextStyleProps, keyof react_native.TextProps> & {
|
|
74
|
+
children?: react.ReactNode;
|
|
75
|
+
} & react.RefAttributes<Text>>;
|
|
76
|
+
|
|
77
|
+
/**
|
|
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
|
+
* <TextField isInvalid={Boolean(error)}>
|
|
87
|
+
* <TextField.Field value={value} onChangeText={onChange} />
|
|
88
|
+
* {error ? <TextField.Error>{error}</TextField.Error> : null}
|
|
89
|
+
* </TextField>
|
|
90
|
+
* ```
|
|
91
|
+
*
|
|
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.
|
|
95
|
+
*/
|
|
96
|
+
declare const TextFieldError: react.ForwardRefExoticComponent<react_native.TextProps & Omit<TextStyleProps, keyof react_native.TextProps> & {
|
|
97
|
+
children?: react.ReactNode;
|
|
98
|
+
} & react.RefAttributes<Text>>;
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* The `TextInput` itself — the one node of this component that the user types into.
|
|
102
|
+
*
|
|
103
|
+
* ```tsx
|
|
104
|
+
* <TextField.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.
|
|
118
|
+
*/
|
|
119
|
+
declare const TextFieldField: react.ForwardRefExoticComponent<Omit<react_native.TextInputProps, "editable"> & Omit<TextStyleProps, keyof react_native.TextInputProps> & react.RefAttributes<TextInput>>;
|
|
120
|
+
|
|
121
|
+
/**
|
|
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.
|
|
130
|
+
*/
|
|
131
|
+
declare const TextFieldLabel: react.ForwardRefExoticComponent<react_native.TextProps & Omit<TextStyleProps, keyof react_native.TextProps> & {
|
|
132
|
+
children?: react.ReactNode;
|
|
133
|
+
} & react.RefAttributes<Text>>;
|
|
134
|
+
|
|
135
|
+
declare const useTextField: () => TextFieldContextValue;
|
|
136
|
+
|
|
137
|
+
declare const textFieldRecipe: Recipe<"label" | "field" | "root" | "description" | "suffix" | "icon" | "textArea" | "placeholder" | "error" | "prefix", TextFieldVariant, {
|
|
138
|
+
readonly size: {
|
|
139
|
+
readonly xs: (theme: XAUITheme) => SlotStyles<TextFieldSlot>;
|
|
140
|
+
readonly sm: (theme: XAUITheme) => SlotStyles<TextFieldSlot>;
|
|
141
|
+
readonly md: (theme: XAUITheme) => SlotStyles<TextFieldSlot>;
|
|
142
|
+
readonly lg: (theme: XAUITheme) => SlotStyles<TextFieldSlot>;
|
|
143
|
+
};
|
|
144
|
+
readonly radius: Record<RadiusKey, StyleFn<"field">>;
|
|
145
|
+
/**
|
|
146
|
+
* `outside` is the base behaviour, so it adds nothing — it is declared because an
|
|
147
|
+
* axis needs both of its values for the selection to be typed, and because a reader
|
|
148
|
+
* looking for "what does outside do" should find the answer here rather than infer it
|
|
149
|
+
* from an absence. The size-dependent half of `inside` is in `compoundVariants`.
|
|
150
|
+
*/
|
|
151
|
+
readonly labelPlacement: {
|
|
152
|
+
readonly outside: () => {};
|
|
153
|
+
readonly inside: () => {};
|
|
154
|
+
};
|
|
155
|
+
readonly isInvalid: {
|
|
156
|
+
readonly true: (theme: XAUITheme) => {
|
|
157
|
+
field: {
|
|
158
|
+
borderColor: string;
|
|
159
|
+
};
|
|
160
|
+
label: {
|
|
161
|
+
color: string;
|
|
162
|
+
};
|
|
163
|
+
description: {
|
|
164
|
+
color: string;
|
|
165
|
+
};
|
|
166
|
+
};
|
|
167
|
+
};
|
|
168
|
+
}>;
|
|
169
|
+
|
|
170
|
+
declare const TextField: react.ForwardRefExoticComponent<{
|
|
171
|
+
variant?: TextFieldVariant;
|
|
172
|
+
size?: TextFieldSize;
|
|
173
|
+
radius?: RadiusKey;
|
|
174
|
+
labelPlacement?: TextFieldLabelPlacement;
|
|
175
|
+
color?: string;
|
|
176
|
+
isInvalid?: boolean;
|
|
177
|
+
isDisabled?: boolean;
|
|
178
|
+
style?: react_native.StyleProp<react_native.ViewStyle>;
|
|
179
|
+
children?: react.ReactNode;
|
|
180
|
+
} & Omit<react_native.ViewProps, keyof {
|
|
181
|
+
variant?: TextFieldVariant;
|
|
182
|
+
size?: TextFieldSize;
|
|
183
|
+
radius?: RadiusKey;
|
|
184
|
+
labelPlacement?: TextFieldLabelPlacement;
|
|
185
|
+
color?: string;
|
|
186
|
+
isInvalid?: boolean;
|
|
187
|
+
isDisabled?: boolean;
|
|
188
|
+
style?: react_native.StyleProp<react_native.ViewStyle>;
|
|
189
|
+
children?: react.ReactNode;
|
|
190
|
+
}> & Omit<ViewStyleProps, "color" | "pointerEvents" | "style" | "children" | "size" | "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" | "variant" | "radius" | "isDisabled" | "isInvalid" | "labelPlacement"> & {
|
|
191
|
+
asChild?: boolean;
|
|
192
|
+
} & react.RefAttributes<react_native.View>> & {
|
|
193
|
+
Label: react.ForwardRefExoticComponent<react_native.TextProps & Omit<TextStyleProps, keyof react_native.TextProps> & {
|
|
194
|
+
children?: react.ReactNode;
|
|
195
|
+
} & react.RefAttributes<react_native.Text>>;
|
|
196
|
+
Field: react.ForwardRefExoticComponent<Omit<react_native.TextInputProps, "editable"> & Omit<TextStyleProps, keyof react_native.TextInputProps> & react.RefAttributes<react_native.TextInput>>;
|
|
197
|
+
Description: react.ForwardRefExoticComponent<react_native.TextProps & Omit<TextStyleProps, keyof react_native.TextProps> & {
|
|
198
|
+
children?: react.ReactNode;
|
|
199
|
+
} & react.RefAttributes<react_native.Text>>;
|
|
200
|
+
Error: react.ForwardRefExoticComponent<react_native.TextProps & Omit<TextStyleProps, keyof react_native.TextProps> & {
|
|
201
|
+
children?: react.ReactNode;
|
|
202
|
+
} & react.RefAttributes<react_native.Text>>;
|
|
203
|
+
};
|
|
204
|
+
|
|
205
|
+
export { TextField, TextFieldContextValue, TextFieldDescription, TextFieldError, TextFieldField, TextFieldLabel, TextFieldLabelPlacement, TextFieldRoot, TextFieldSize, TextFieldSlot, TextFieldVariant, textFieldRecipe, useTextField };
|