@xaui/native 0.9.1-alpha.35 → 0.9.1-alpha.37
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-ZC35YYKS.js → chunk-2PMXMKS5.js} +13 -8
- package/dist/{chunk-CYS6U374.cjs → chunk-3P6M2R4S.cjs} +6 -6
- package/dist/{chunk-7CTIE42J.cjs → chunk-437QULXO.cjs} +16 -8
- package/dist/{chunk-M2BGCN77.js → chunk-4PTWZCOK.js} +9 -9
- package/dist/{chunk-ZA6RT3XQ.js → chunk-5PPNDKRX.js} +16 -16
- package/dist/{chunk-AYOVBZAX.js → chunk-6G3XWPNP.js} +5 -5
- package/dist/{chunk-PCWT2YBE.cjs → chunk-7B3UBUC6.cjs} +3 -3
- package/dist/{chunk-HXL2QCMR.js → chunk-7LSY4WFL.js} +14 -14
- package/dist/{chunk-OHEHPQLC.cjs → chunk-ACAPTWE3.cjs} +16 -12
- package/dist/{chunk-I66VMLHE.cjs → chunk-AP6RVIIK.cjs} +21 -21
- package/dist/{chunk-UR6DNU2M.js → chunk-BORJJYDW.js} +4 -4
- package/dist/{chunk-XWMB66ZM.cjs → chunk-C5VDFRAD.cjs} +3 -3
- package/dist/{chunk-PBR44KVV.cjs → chunk-CUQTAPBU.cjs} +22 -22
- package/dist/{chunk-QY4MN7X3.cjs → chunk-DKH6BNPF.cjs} +15 -15
- package/dist/{chunk-6M7RUU7V.cjs → chunk-DRMT346W.cjs} +64 -64
- package/dist/chunk-DVDQSW7U.cjs +1006 -0
- package/dist/{chunk-NMAZ2TQF.js → chunk-E3X5ODKQ.js} +3 -3
- package/dist/{chunk-U3RDU3HU.js → chunk-EOJ5MYAQ.js} +5 -5
- package/dist/{chunk-UORTYL63.cjs → chunk-FTQHDJYL.cjs} +14 -14
- package/dist/{chunk-DBXFFJTC.cjs → chunk-GTT4NHS2.cjs} +11 -11
- package/dist/{chunk-WJPQARJ5.js → chunk-HXW4ANVB.js} +3 -3
- package/dist/{chunk-MSMZBUZO.cjs → chunk-IGLKACSR.cjs} +7 -7
- package/dist/{chunk-HNW4HIMO.js → chunk-IKJVLJKT.js} +15 -15
- package/dist/{chunk-CNNLMMFV.cjs → chunk-ITURCQMQ.cjs} +7 -7
- package/dist/{chunk-DUQUCOUY.cjs → chunk-JB5LGQ54.cjs} +3 -3
- package/dist/{chunk-NLASSGA7.js → chunk-JDSE4TQL.js} +10 -2
- package/dist/{chunk-GBFQZQ77.js → chunk-JXNFOOKC.js} +7 -7
- package/dist/{chunk-Q3D6KIVF.cjs → chunk-LEWW24RQ.cjs} +105 -99
- package/dist/{chunk-MEYCZS32.js → chunk-M63GFNKV.js} +19 -4
- package/dist/chunk-MESKS6AI.js +0 -0
- package/dist/{chunk-MHEL3NAN.js → chunk-NKPTXTTS.js} +53 -53
- package/dist/{chunk-VSALV7VO.cjs → chunk-NTD3NPRX.cjs} +3 -3
- package/dist/{chunk-HVD5EX7V.js → chunk-O3A3DBSZ.js} +3 -3
- package/dist/chunk-OJCCV65P.cjs +1 -0
- package/dist/{chunk-JCYWU5TO.js → chunk-OULTSBKU.js} +3 -3
- package/dist/{chunk-CM4LI5OH.cjs → chunk-P747CRAY.cjs} +9 -9
- package/dist/{chunk-BA2MPBCO.js → chunk-RGKWNK4T.js} +58 -58
- package/dist/{chunk-NFFL3E4N.js → chunk-RVRVGG73.js} +4 -4
- package/dist/{chunk-L55CDXNI.js → chunk-SMW6ZWMH.js} +110 -104
- package/dist/{chunk-YUG22AXX.cjs → chunk-SNIHUKDA.cjs} +16 -16
- package/dist/{chunk-SLUJFE6R.js → chunk-SO5UAGIU.js} +15 -15
- package/dist/{chunk-2IWL6R3D.js → chunk-TDYPY2J7.js} +8 -8
- package/dist/{chunk-LZK77LFX.js → chunk-TJHYSSBZ.js} +3 -3
- package/dist/{chunk-I6ZB3FZI.cjs → chunk-TK44VBIE.cjs} +22 -7
- package/dist/{chunk-OX2YNMNS.cjs → chunk-UBOXW5WO.cjs} +63 -63
- package/dist/{chunk-XNNJM5DQ.js → chunk-UGF35NSE.js} +75 -75
- package/dist/{chunk-AOEXU5UV.cjs → chunk-VFTT3Q4B.cjs} +4 -4
- package/dist/{chunk-4SLOOIE5.cjs → chunk-WDDXU3OH.cjs} +14 -9
- package/dist/{chunk-TZG3DERP.js → chunk-WKCQ6VGW.js} +15 -11
- package/dist/{chunk-TVCS5UOE.cjs → chunk-WVLSQO6K.cjs} +49 -49
- package/dist/chunk-XWY4DF37.js +1143 -0
- package/dist/{chunk-K7LLERKT.cjs → chunk-ZJWEVFAO.cjs} +12 -12
- package/dist/components/alert/index.cjs +7 -8
- package/dist/components/alert/index.d.cts +1 -1
- package/dist/components/alert/index.d.ts +1 -1
- package/dist/components/alert/index.js +6 -7
- package/dist/components/avatar/index.cjs +4 -5
- package/dist/components/avatar/index.d.cts +3 -3
- package/dist/components/avatar/index.d.ts +3 -3
- package/dist/components/avatar/index.js +3 -4
- package/dist/components/badge/index.cjs +3 -4
- package/dist/components/badge/index.d.cts +1 -1
- package/dist/components/badge/index.d.ts +1 -1
- package/dist/components/badge/index.js +2 -3
- package/dist/components/button/index.cjs +6 -7
- package/dist/components/button/index.d.cts +168 -168
- package/dist/components/button/index.d.ts +168 -168
- package/dist/components/button/index.js +5 -6
- package/dist/components/card/index.cjs +5 -6
- package/dist/components/card/index.d.cts +169 -169
- package/dist/components/card/index.d.ts +169 -169
- package/dist/components/card/index.js +4 -5
- package/dist/components/checkbox/index.cjs +5 -6
- package/dist/components/checkbox/index.d.cts +336 -336
- package/dist/components/checkbox/index.d.ts +336 -336
- package/dist/components/checkbox/index.js +4 -5
- package/dist/components/chip/index.cjs +7 -8
- package/dist/components/chip/index.d.cts +169 -169
- package/dist/components/chip/index.d.ts +169 -169
- package/dist/components/chip/index.js +6 -7
- package/dist/components/divider/index.cjs +3 -4
- package/dist/components/divider/index.d.cts +1 -1
- package/dist/components/divider/index.d.ts +1 -1
- package/dist/components/divider/index.js +2 -3
- package/dist/components/field-group/index.cjs +27 -0
- package/dist/components/{input-group → field-group}/index.d.cts +66 -66
- package/dist/components/{input-group → field-group}/index.d.ts +66 -66
- package/dist/components/field-group/index.js +27 -0
- package/dist/components/input-otp/index.cjs +3 -4
- package/dist/components/input-otp/index.d.cts +1 -1
- package/dist/components/input-otp/index.d.ts +1 -1
- package/dist/components/input-otp/index.js +2 -3
- package/dist/components/radio/index.cjs +5 -6
- package/dist/components/radio/index.d.cts +336 -336
- package/dist/components/radio/index.d.ts +336 -336
- package/dist/components/radio/index.js +4 -5
- package/dist/components/select/index.cjs +47 -0
- package/dist/components/select/index.d.cts +519 -0
- package/dist/components/select/index.d.ts +519 -0
- package/dist/components/select/index.js +47 -0
- package/dist/components/skeleton/index.cjs +3 -4
- package/dist/components/skeleton/index.d.cts +1 -1
- package/dist/components/skeleton/index.d.ts +1 -1
- package/dist/components/skeleton/index.js +2 -3
- package/dist/components/spinner/index.cjs +4 -5
- package/dist/components/spinner/index.d.cts +1 -1
- package/dist/components/spinner/index.d.ts +1 -1
- package/dist/components/spinner/index.js +3 -4
- package/dist/components/switch/index.cjs +5 -6
- package/dist/components/switch/index.d.cts +338 -338
- package/dist/components/switch/index.d.ts +338 -338
- package/dist/components/switch/index.js +4 -5
- package/dist/components/text-area/index.cjs +4 -5
- package/dist/components/text-area/index.d.cts +10 -10
- package/dist/components/text-area/index.d.ts +10 -10
- package/dist/components/text-area/index.js +3 -4
- 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 +3 -4
- package/dist/components/typography/index.d.cts +2 -2
- package/dist/components/typography/index.d.ts +2 -2
- package/dist/components/typography/index.js +2 -3
- package/dist/components/view/index.cjs +3 -4
- package/dist/components/view/index.d.cts +6 -6
- package/dist/components/view/index.d.ts +6 -6
- package/dist/components/view/index.js +2 -3
- package/dist/index.cjs +64 -28
- package/dist/index.d.cts +4 -3
- package/dist/index.d.ts +4 -3
- package/dist/index.js +100 -64
- package/dist/system/index.cjs +10 -10
- package/dist/system/index.d.cts +15 -2
- package/dist/system/index.d.ts +15 -2
- package/dist/system/index.js +8 -8
- package/dist/{input.type-D2qgi03E.d.ts → text-field.type-0l73acce.d.ts} +24 -24
- package/dist/{input.type-BUMDlzL9.d.cts → text-field.type-DBh06DU5.d.cts} +24 -24
- package/dist/theme/index.cjs +4 -3
- package/dist/theme/index.d.cts +21 -1
- package/dist/theme/index.d.ts +21 -1
- package/dist/theme/index.js +3 -2
- package/package.json +26 -16
- package/dist/chunk-GGW42MY4.js +0 -20
- package/dist/chunk-MC7SY2QH.cjs +0 -20
- package/dist/components/input/index.cjs +0 -26
- package/dist/components/input/index.d.cts +0 -205
- package/dist/components/input/index.d.ts +0 -205
- package/dist/components/input/index.js +0 -26
- package/dist/components/input-group/index.cjs +0 -28
- package/dist/components/input-group/index.js +0 -28
|
@@ -3,7 +3,7 @@ import { StyleProp, TextStyle, ViewStyle, TextInputProps, TextProps, ViewProps }
|
|
|
3
3
|
import { T as TextStyleProps, V as ViewStyleProps } from './style-props.type-CfnoGEP7.cjs';
|
|
4
4
|
import { S as Size, R as RadiusKey } from './theme.type-C2gNHpEx.cjs';
|
|
5
5
|
|
|
6
|
-
type
|
|
6
|
+
type TextFieldSlot = 'root' | 'label' | 'field' | 'textArea' | 'placeholder' | 'description' | 'error' | 'prefix' | 'suffix' | 'icon';
|
|
7
7
|
/**
|
|
8
8
|
* The library's four emphasis levels, narrowed like the `Card`'s (§1 bis). A field
|
|
9
9
|
* **reports nothing** — an error is `isInvalid`, which is a state and not a variant — so
|
|
@@ -27,7 +27,7 @@ type InputSlot = 'root' | 'label' | 'field' | 'textArea' | 'placeholder' | 'desc
|
|
|
27
27
|
* and we ship at `1`. That is the one shipped default where the two differ;
|
|
28
28
|
* `createTheme({ borderWidth: { field: 0 } })` reproduces theirs.
|
|
29
29
|
*/
|
|
30
|
-
type
|
|
30
|
+
type TextFieldVariant = 'primary' | 'secondary' | 'tertiary' | 'ghost';
|
|
31
31
|
/**
|
|
32
32
|
* Where the label sits relative to the field's box.
|
|
33
33
|
*
|
|
@@ -36,24 +36,24 @@ type InputVariant = 'primary' | 'secondary' | 'tertiary' | 'ghost';
|
|
|
36
36
|
* own padding, so the JSX is identical either way and nothing is reparented (R4).
|
|
37
37
|
*
|
|
38
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 `
|
|
40
|
-
* `
|
|
39
|
+
* field is the first thing in the column's flow: write `TextField.Description` and
|
|
40
|
+
* `TextField.Error` after the field, which is where they belong anyway.
|
|
41
41
|
*/
|
|
42
|
-
type
|
|
43
|
-
type
|
|
42
|
+
type TextFieldLabelPlacement = 'outside' | 'inside';
|
|
43
|
+
type TextFieldSize = Size;
|
|
44
44
|
/**
|
|
45
|
-
* What the `
|
|
45
|
+
* What the `TextField` itself understands. R14 — a name in here is the component's, so the
|
|
46
46
|
* style prop that shares it is not exposed: `size` is the field's scale and never
|
|
47
47
|
* `ViewStyle`'s, and `color` is R7's tint.
|
|
48
48
|
*/
|
|
49
|
-
type
|
|
50
|
-
variant?:
|
|
49
|
+
type TextFieldOwnProps = {
|
|
50
|
+
variant?: TextFieldVariant;
|
|
51
51
|
/** The field's height, its padding, the gaps and the type. Never width. */
|
|
52
|
-
size?:
|
|
52
|
+
size?: TextFieldSize;
|
|
53
53
|
/** Overrides the `field` radius the theme chose for every size. */
|
|
54
54
|
radius?: RadiusKey;
|
|
55
55
|
/** Above the box, or lifted into it. @default 'outside' */
|
|
56
|
-
labelPlacement?:
|
|
56
|
+
labelPlacement?: TextFieldLabelPlacement;
|
|
57
57
|
/**
|
|
58
58
|
* A raw tint (`'#7c3aed'`), never a token (R7). It lands where the variant put its
|
|
59
59
|
* tokens — the fill of a `default`, the border of a `tertiary` — and, because the focus
|
|
@@ -65,7 +65,7 @@ type InputOwnProps = {
|
|
|
65
65
|
* treatment off: an error outranks focus, and a field that is both should read as
|
|
66
66
|
* wrong rather than as busy.
|
|
67
67
|
*
|
|
68
|
-
* It does **not** mount or unmount `
|
|
68
|
+
* It does **not** mount or unmount `TextField.Error`. That stays the caller's — a slot that
|
|
69
69
|
* silently renders nothing is a slot you cannot debug.
|
|
70
70
|
*/
|
|
71
71
|
isInvalid?: boolean;
|
|
@@ -76,10 +76,10 @@ type InputOwnProps = {
|
|
|
76
76
|
};
|
|
77
77
|
/**
|
|
78
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 `
|
|
79
|
+
* already claims. **`TextInputProps` are not here**: they belong to `TextField.Field`, which
|
|
80
80
|
* is the node that has them.
|
|
81
81
|
*/
|
|
82
|
-
type
|
|
82
|
+
type TextFieldProps = TextFieldOwnProps & Omit<ViewProps, keyof TextFieldOwnProps> & Omit<ViewStyleProps, keyof TextFieldOwnProps | keyof ViewProps> & {
|
|
83
83
|
/** R12 — merge into the single child instead of rendering a `View`. */
|
|
84
84
|
asChild?: boolean;
|
|
85
85
|
};
|
|
@@ -89,14 +89,14 @@ type InputProps = InputOwnProps & Omit<ViewProps, keyof InputOwnProps> & Omit<Vi
|
|
|
89
89
|
* `editable` is absent: it is `disabled` under another name, and R8 keeps that off the
|
|
90
90
|
* public surface — `isDisabled` on the root is what stops the field.
|
|
91
91
|
*/
|
|
92
|
-
type
|
|
92
|
+
type TextFieldFieldProps = Omit<TextInputProps, 'editable'> & Omit<TextStyleProps, keyof TextInputProps>;
|
|
93
93
|
/** `Text`'s own props win over the `TextStyle` keys of the same name (R14). */
|
|
94
|
-
type
|
|
94
|
+
type TextFieldTextProps = TextProps & Omit<TextStyleProps, keyof TextProps> & {
|
|
95
95
|
children?: ReactNode;
|
|
96
96
|
};
|
|
97
|
-
type
|
|
98
|
-
type
|
|
99
|
-
type
|
|
97
|
+
type TextFieldLabelProps = TextFieldTextProps;
|
|
98
|
+
type TextFieldDescriptionProps = TextFieldTextProps;
|
|
99
|
+
type TextFieldErrorProps = TextFieldTextProps;
|
|
100
100
|
/**
|
|
101
101
|
* Read off `TextInput`'s own props rather than spelled out: React Native has renamed the
|
|
102
102
|
* payload of these two more than once, and a hand-written `NativeSyntheticEvent<…>` here
|
|
@@ -109,10 +109,10 @@ type FieldBlurEvent = Parameters<NonNullable<TextInputProps['onBlur']>>[0];
|
|
|
109
109
|
* cached `StyleSheet` reference with the uncached tint pass layered over it, so a slot
|
|
110
110
|
* merges its own `style` on top and does no work of its own.
|
|
111
111
|
*/
|
|
112
|
-
type
|
|
112
|
+
type TextFieldContextValue = {
|
|
113
113
|
labelStyle: StyleProp<TextStyle>;
|
|
114
114
|
fieldStyle: StyleProp<TextStyle>;
|
|
115
|
-
/** Layered *over* `fieldStyle` by `
|
|
115
|
+
/** Layered *over* `fieldStyle` by `TextField.TextArea`: only what a multiline field adds. */
|
|
116
116
|
textAreaStyle: StyleProp<TextStyle>;
|
|
117
117
|
/**
|
|
118
118
|
* Values, not a style: `rows` is a raw number, so the height it implies is arithmetic
|
|
@@ -126,7 +126,7 @@ type InputContextValue = {
|
|
|
126
126
|
descriptionStyle: StyleProp<TextStyle>;
|
|
127
127
|
errorStyle: StyleProp<TextStyle>;
|
|
128
128
|
/**
|
|
129
|
-
* The two decorators of
|
|
129
|
+
* The two decorators of a `FieldGroup`, already pinned to their edge and inset by the
|
|
130
130
|
* field's own padding. They are resolved here, on the root, because the size that
|
|
131
131
|
* decides that padding is the root's — the group itself adds no axis of its own.
|
|
132
132
|
*/
|
|
@@ -149,7 +149,7 @@ type InputContextValue = {
|
|
|
149
149
|
/**
|
|
150
150
|
* The focus state lives on the **root**, because the root's recipe resolves on it (R5)
|
|
151
151
|
* and it needs the value before it renders — but the node that hears the event is
|
|
152
|
-
* `
|
|
152
|
+
* `TextField.Field`, three levels down. These are how it reports back. Their identity is
|
|
153
153
|
* stable, so publishing them costs no re-render of a memoized slot.
|
|
154
154
|
*/
|
|
155
155
|
onFieldFocus: (event: FieldFocusEvent) => void;
|
|
@@ -164,4 +164,4 @@ type InputContextValue = {
|
|
|
164
164
|
isInvalid: boolean;
|
|
165
165
|
};
|
|
166
166
|
|
|
167
|
-
export type {
|
|
167
|
+
export type { TextFieldFieldProps as T, TextFieldProps as a, TextFieldContextValue as b, TextFieldDescriptionProps as c, TextFieldErrorProps as d, TextFieldLabelPlacement as e, TextFieldLabelProps as f, TextFieldSize as g, TextFieldSlot as h, TextFieldVariant as i };
|
package/dist/theme/index.cjs
CHANGED
|
@@ -9,7 +9,8 @@
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _chunkACAPTWE3cjs = require('../chunk-ACAPTWE3.cjs');
|
|
13
|
+
require('../chunk-WDDXU3OH.cjs');
|
|
13
14
|
|
|
14
15
|
|
|
15
16
|
|
|
@@ -17,7 +18,7 @@ var _chunkOHEHPQLCcjs = require('../chunk-OHEHPQLC.cjs');
|
|
|
17
18
|
|
|
18
19
|
|
|
19
20
|
var _chunk57SJ4LJFcjs = require('../chunk-57SJ4LJF.cjs');
|
|
20
|
-
require('../chunk-
|
|
21
|
+
require('../chunk-TK44VBIE.cjs');
|
|
21
22
|
|
|
22
23
|
|
|
23
24
|
|
|
@@ -34,4 +35,4 @@ require('../chunk-MC7SY2QH.cjs');
|
|
|
34
35
|
|
|
35
36
|
|
|
36
37
|
|
|
37
|
-
exports.ThemeContext = _chunk57SJ4LJFcjs.ThemeContext; exports.XAUIProvider =
|
|
38
|
+
exports.ThemeContext = _chunk57SJ4LJFcjs.ThemeContext; exports.XAUIProvider = _chunkACAPTWE3cjs.XAUIProvider; exports.buildRadius = _chunkACAPTWE3cjs.buildRadius; exports.buildShadows = _chunkACAPTWE3cjs.buildShadows; exports.createTheme = _chunkACAPTWE3cjs.createTheme; exports.defaultTheme = _chunkACAPTWE3cjs.defaultTheme; exports.deriveColors = _chunkACAPTWE3cjs.deriveColors; exports.deriveTint = _chunk57SJ4LJFcjs.deriveTint; exports.palette = _chunkACAPTWE3cjs.palette; exports.primitives = _chunkACAPTWE3cjs.primitives; exports.sourceKeys = _chunkACAPTWE3cjs.sourceKeys; exports.tokens = _chunkACAPTWE3cjs.tokens; exports.useColorMode = _chunk57SJ4LJFcjs.useColorMode; exports.useThemeColor = _chunk57SJ4LJFcjs.useThemeColor; exports.useXAUITheme = _chunk57SJ4LJFcjs.useXAUITheme;
|
package/dist/theme/index.d.cts
CHANGED
|
@@ -12,6 +12,14 @@ type XAUIProviderProps = {
|
|
|
12
12
|
theme?: XAUIThemeSet;
|
|
13
13
|
/** Controlled: the library owns neither the state nor its persistence. */
|
|
14
14
|
colorMode?: ColorModePreference;
|
|
15
|
+
/**
|
|
16
|
+
* Mounts the `PortalHost` overlays render into. Set false only to mount one yourself,
|
|
17
|
+
* somewhere the provider cannot reach — under a gesture root, say. Without a host
|
|
18
|
+
* anywhere, `Portal` renders nothing and overlays are silently absent.
|
|
19
|
+
*
|
|
20
|
+
* @default true
|
|
21
|
+
*/
|
|
22
|
+
hasPortalHost?: boolean;
|
|
15
23
|
};
|
|
16
24
|
|
|
17
25
|
/**
|
|
@@ -20,8 +28,14 @@ type XAUIProviderProps = {
|
|
|
20
28
|
* `theme` is expected to come from `createTheme` at module level. The provider selects a
|
|
21
29
|
* mode from an already-resolved set rather than memoizing on the prop's identity — which
|
|
22
30
|
* is what the v0 provider did, rebuilding every style in the app on each parent render.
|
|
31
|
+
*
|
|
32
|
+
* It also mounts the `PortalHost` every overlay renders into. That is here rather than in
|
|
33
|
+
* the app because forgetting it is silent: `Portal` renders nothing outside a host, so a
|
|
34
|
+
* select would open onto an empty screen with no error to read. An app that needs the
|
|
35
|
+
* host somewhere else — under a gesture root, or inside its own navigation container —
|
|
36
|
+
* sets `hasPortalHost={false}` and mounts one itself.
|
|
23
37
|
*/
|
|
24
|
-
declare function XAUIProvider({ children, theme, colorMode, }: XAUIProviderProps): react.JSX.Element;
|
|
38
|
+
declare function XAUIProvider({ children, theme, colorMode, hasPortalHost, }: XAUIProviderProps): react.JSX.Element;
|
|
25
39
|
|
|
26
40
|
/**
|
|
27
41
|
* Build a theme once, at module level:
|
|
@@ -391,6 +405,12 @@ declare function buildRadius(base: number): XAUIRadius;
|
|
|
391
405
|
/**
|
|
392
406
|
* Three roles, not an sm→xl scale — which is what lets dark mode drop the surface shadow
|
|
393
407
|
* entirely instead of shipping a scale that reads as dirt on a dark background.
|
|
408
|
+
*
|
|
409
|
+
* `overlay` was heavier: a 24-point blur eight points down at 16 of Android's elevation.
|
|
410
|
+
* Android draws elevation on its own curve and draws it strongly, so a panel that read as
|
|
411
|
+
* lifted on iOS read as detached on Android — a dark halo the width of the gap between it
|
|
412
|
+
* and the field it came out of. Half the elevation and two thirds of the blur still say
|
|
413
|
+
* "above the page" without the panel looking cut out of it.
|
|
394
414
|
*/
|
|
395
415
|
declare function buildShadows(mode: ColorMode): XAUITheme['shadows'];
|
|
396
416
|
|
package/dist/theme/index.d.ts
CHANGED
|
@@ -12,6 +12,14 @@ type XAUIProviderProps = {
|
|
|
12
12
|
theme?: XAUIThemeSet;
|
|
13
13
|
/** Controlled: the library owns neither the state nor its persistence. */
|
|
14
14
|
colorMode?: ColorModePreference;
|
|
15
|
+
/**
|
|
16
|
+
* Mounts the `PortalHost` overlays render into. Set false only to mount one yourself,
|
|
17
|
+
* somewhere the provider cannot reach — under a gesture root, say. Without a host
|
|
18
|
+
* anywhere, `Portal` renders nothing and overlays are silently absent.
|
|
19
|
+
*
|
|
20
|
+
* @default true
|
|
21
|
+
*/
|
|
22
|
+
hasPortalHost?: boolean;
|
|
15
23
|
};
|
|
16
24
|
|
|
17
25
|
/**
|
|
@@ -20,8 +28,14 @@ type XAUIProviderProps = {
|
|
|
20
28
|
* `theme` is expected to come from `createTheme` at module level. The provider selects a
|
|
21
29
|
* mode from an already-resolved set rather than memoizing on the prop's identity — which
|
|
22
30
|
* is what the v0 provider did, rebuilding every style in the app on each parent render.
|
|
31
|
+
*
|
|
32
|
+
* It also mounts the `PortalHost` every overlay renders into. That is here rather than in
|
|
33
|
+
* the app because forgetting it is silent: `Portal` renders nothing outside a host, so a
|
|
34
|
+
* select would open onto an empty screen with no error to read. An app that needs the
|
|
35
|
+
* host somewhere else — under a gesture root, or inside its own navigation container —
|
|
36
|
+
* sets `hasPortalHost={false}` and mounts one itself.
|
|
23
37
|
*/
|
|
24
|
-
declare function XAUIProvider({ children, theme, colorMode, }: XAUIProviderProps): react.JSX.Element;
|
|
38
|
+
declare function XAUIProvider({ children, theme, colorMode, hasPortalHost, }: XAUIProviderProps): react.JSX.Element;
|
|
25
39
|
|
|
26
40
|
/**
|
|
27
41
|
* Build a theme once, at module level:
|
|
@@ -391,6 +405,12 @@ declare function buildRadius(base: number): XAUIRadius;
|
|
|
391
405
|
/**
|
|
392
406
|
* Three roles, not an sm→xl scale — which is what lets dark mode drop the surface shadow
|
|
393
407
|
* entirely instead of shipping a scale that reads as dirt on a dark background.
|
|
408
|
+
*
|
|
409
|
+
* `overlay` was heavier: a 24-point blur eight points down at 16 of Android's elevation.
|
|
410
|
+
* Android draws elevation on its own curve and draws it strongly, so a panel that read as
|
|
411
|
+
* lifted on iOS read as detached on Android — a dark halo the width of the gap between it
|
|
412
|
+
* and the field it came out of. Half the elevation and two thirds of the blur still say
|
|
413
|
+
* "above the page" without the panel looking cut out of it.
|
|
394
414
|
*/
|
|
395
415
|
declare function buildShadows(mode: ColorMode): XAUITheme['shadows'];
|
|
396
416
|
|
package/dist/theme/index.js
CHANGED
|
@@ -9,7 +9,8 @@ import {
|
|
|
9
9
|
primitives,
|
|
10
10
|
sourceKeys,
|
|
11
11
|
tokens
|
|
12
|
-
} from "../chunk-
|
|
12
|
+
} from "../chunk-WKCQ6VGW.js";
|
|
13
|
+
import "../chunk-2PMXMKS5.js";
|
|
13
14
|
import {
|
|
14
15
|
ThemeContext,
|
|
15
16
|
deriveTint,
|
|
@@ -17,7 +18,7 @@ import {
|
|
|
17
18
|
useThemeColor,
|
|
18
19
|
useXAUITheme
|
|
19
20
|
} from "../chunk-A3EGFI6T.js";
|
|
20
|
-
import "../chunk-
|
|
21
|
+
import "../chunk-M63GFNKV.js";
|
|
21
22
|
export {
|
|
22
23
|
ThemeContext,
|
|
23
24
|
XAUIProvider,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xaui/native",
|
|
3
|
-
"version": "0.9.1-alpha.
|
|
3
|
+
"version": "0.9.1-alpha.37",
|
|
4
4
|
"description": "Composition-first React Native UI components with native animations powered by Reanimated",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react-native",
|
|
@@ -107,24 +107,14 @@
|
|
|
107
107
|
"default": "./dist/components/divider/index.cjs"
|
|
108
108
|
}
|
|
109
109
|
},
|
|
110
|
-
"./
|
|
110
|
+
"./field-group": {
|
|
111
111
|
"import": {
|
|
112
|
-
"types": "./dist/components/
|
|
113
|
-
"default": "./dist/components/
|
|
112
|
+
"types": "./dist/components/field-group/index.d.ts",
|
|
113
|
+
"default": "./dist/components/field-group/index.js"
|
|
114
114
|
},
|
|
115
115
|
"require": {
|
|
116
|
-
"types": "./dist/components/
|
|
117
|
-
"default": "./dist/components/
|
|
118
|
-
}
|
|
119
|
-
},
|
|
120
|
-
"./input-group": {
|
|
121
|
-
"import": {
|
|
122
|
-
"types": "./dist/components/input-group/index.d.ts",
|
|
123
|
-
"default": "./dist/components/input-group/index.js"
|
|
124
|
-
},
|
|
125
|
-
"require": {
|
|
126
|
-
"types": "./dist/components/input-group/index.d.cts",
|
|
127
|
-
"default": "./dist/components/input-group/index.cjs"
|
|
116
|
+
"types": "./dist/components/field-group/index.d.cts",
|
|
117
|
+
"default": "./dist/components/field-group/index.cjs"
|
|
128
118
|
}
|
|
129
119
|
},
|
|
130
120
|
"./input-otp": {
|
|
@@ -147,6 +137,16 @@
|
|
|
147
137
|
"default": "./dist/components/radio/index.cjs"
|
|
148
138
|
}
|
|
149
139
|
},
|
|
140
|
+
"./select": {
|
|
141
|
+
"import": {
|
|
142
|
+
"types": "./dist/components/select/index.d.ts",
|
|
143
|
+
"default": "./dist/components/select/index.js"
|
|
144
|
+
},
|
|
145
|
+
"require": {
|
|
146
|
+
"types": "./dist/components/select/index.d.cts",
|
|
147
|
+
"default": "./dist/components/select/index.cjs"
|
|
148
|
+
}
|
|
149
|
+
},
|
|
150
150
|
"./skeleton": {
|
|
151
151
|
"import": {
|
|
152
152
|
"types": "./dist/components/skeleton/index.d.ts",
|
|
@@ -187,6 +187,16 @@
|
|
|
187
187
|
"default": "./dist/components/text-area/index.cjs"
|
|
188
188
|
}
|
|
189
189
|
},
|
|
190
|
+
"./text-field": {
|
|
191
|
+
"import": {
|
|
192
|
+
"types": "./dist/components/text-field/index.d.ts",
|
|
193
|
+
"default": "./dist/components/text-field/index.js"
|
|
194
|
+
},
|
|
195
|
+
"require": {
|
|
196
|
+
"types": "./dist/components/text-field/index.d.cts",
|
|
197
|
+
"default": "./dist/components/text-field/index.cjs"
|
|
198
|
+
}
|
|
199
|
+
},
|
|
190
200
|
"./typography": {
|
|
191
201
|
"import": {
|
|
192
202
|
"types": "./dist/components/typography/index.d.ts",
|
package/dist/chunk-GGW42MY4.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
// src/utils/stable-hash.ts
|
|
2
|
-
function canonical(value) {
|
|
3
|
-
if (value === null || typeof value !== "object") return JSON.stringify(value) ?? "null";
|
|
4
|
-
if (Array.isArray(value)) return `[${value.map(canonical).join(",")}]`;
|
|
5
|
-
const entries = Object.entries(value).filter(([, v]) => typeof v !== "function").sort(([a], [b]) => a < b ? -1 : 1).map(([k, v]) => `${JSON.stringify(k)}:${canonical(v)}`);
|
|
6
|
-
return `{${entries.join(",")}}`;
|
|
7
|
-
}
|
|
8
|
-
function stableHash(value) {
|
|
9
|
-
const input = canonical(value);
|
|
10
|
-
let hash = 2166136261;
|
|
11
|
-
for (let i = 0; i < input.length; i++) {
|
|
12
|
-
hash ^= input.charCodeAt(i);
|
|
13
|
-
hash = Math.imul(hash, 16777619) >>> 0;
|
|
14
|
-
}
|
|
15
|
-
return hash.toString(36);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export {
|
|
19
|
-
stableHash
|
|
20
|
-
};
|
package/dist/chunk-MC7SY2QH.cjs
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }// src/utils/stable-hash.ts
|
|
2
|
-
function canonical(value) {
|
|
3
|
-
if (value === null || typeof value !== "object") return _nullishCoalesce(JSON.stringify(value), () => ( "null"));
|
|
4
|
-
if (Array.isArray(value)) return `[${value.map(canonical).join(",")}]`;
|
|
5
|
-
const entries = Object.entries(value).filter(([, v]) => typeof v !== "function").sort(([a], [b]) => a < b ? -1 : 1).map(([k, v]) => `${JSON.stringify(k)}:${canonical(v)}`);
|
|
6
|
-
return `{${entries.join(",")}}`;
|
|
7
|
-
}
|
|
8
|
-
function stableHash(value) {
|
|
9
|
-
const input = canonical(value);
|
|
10
|
-
let hash = 2166136261;
|
|
11
|
-
for (let i = 0; i < input.length; i++) {
|
|
12
|
-
hash ^= input.charCodeAt(i);
|
|
13
|
-
hash = Math.imul(hash, 16777619) >>> 0;
|
|
14
|
-
}
|
|
15
|
-
return hash.toString(36);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
exports.stableHash = stableHash;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
var _chunkQ3D6KIVFcjs = require('../../chunk-Q3D6KIVF.cjs');
|
|
11
|
-
require('../../chunk-54FJOKAN.cjs');
|
|
12
|
-
require('../../chunk-H4E4HDEP.cjs');
|
|
13
|
-
require('../../chunk-FNEUOBCV.cjs');
|
|
14
|
-
require('../../chunk-I6ZB3FZI.cjs');
|
|
15
|
-
require('../../chunk-57SJ4LJF.cjs');
|
|
16
|
-
require('../../chunk-MC7SY2QH.cjs');
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
exports.Input = _chunkQ3D6KIVFcjs.Input; exports.InputDescription = _chunkQ3D6KIVFcjs.InputDescription; exports.InputError = _chunkQ3D6KIVFcjs.InputError; exports.InputField = _chunkQ3D6KIVFcjs.InputField; exports.InputLabel = _chunkQ3D6KIVFcjs.InputLabel; exports.InputRoot = _chunkQ3D6KIVFcjs.InputRoot; exports.inputRecipe = _chunkQ3D6KIVFcjs.inputRecipe; exports.useInput = _chunkQ3D6KIVFcjs.useInput;
|
|
@@ -1,205 +0,0 @@
|
|
|
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 InputVariant, g as InputSize, e as InputLabelPlacement, b as InputContextValue, h as InputSlot } from '../../input.type-BUMDlzL9.cjs';
|
|
7
|
-
export { c as InputDescriptionProps, d as InputErrorProps, I as InputFieldProps, f as InputLabelProps, a as InputProps } from '../../input.type-BUMDlzL9.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
|
-
* <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>
|
|
24
|
-
*
|
|
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
|
-
* ```
|
|
31
|
-
*
|
|
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
|
-
*
|
|
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 InputRoot: react.ForwardRefExoticComponent<{
|
|
41
|
-
variant?: InputVariant;
|
|
42
|
-
size?: InputSize;
|
|
43
|
-
radius?: RadiusKey;
|
|
44
|
-
labelPlacement?: InputLabelPlacement;
|
|
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?: 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" | "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 InputDescription: 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
|
-
* <Input isInvalid={Boolean(error)}>
|
|
87
|
-
* <Input.Field value={value} onChangeText={onChange} />
|
|
88
|
-
* {error ? <Input.Error>{error}</Input.Error> : null}
|
|
89
|
-
* </Input>
|
|
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 InputError: 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
|
-
* <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.
|
|
118
|
-
*/
|
|
119
|
-
declare const InputField: 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 InputLabel: react.ForwardRefExoticComponent<react_native.TextProps & Omit<TextStyleProps, keyof react_native.TextProps> & {
|
|
132
|
-
children?: react.ReactNode;
|
|
133
|
-
} & react.RefAttributes<Text>>;
|
|
134
|
-
|
|
135
|
-
declare const useInput: () => InputContextValue;
|
|
136
|
-
|
|
137
|
-
declare const inputRecipe: Recipe<"label" | "field" | "description" | "suffix" | "root" | "icon" | "textArea" | "placeholder" | "error" | "prefix", InputVariant, {
|
|
138
|
-
readonly size: {
|
|
139
|
-
readonly xs: (theme: XAUITheme) => SlotStyles<InputSlot>;
|
|
140
|
-
readonly sm: (theme: XAUITheme) => SlotStyles<InputSlot>;
|
|
141
|
-
readonly md: (theme: XAUITheme) => SlotStyles<InputSlot>;
|
|
142
|
-
readonly lg: (theme: XAUITheme) => SlotStyles<InputSlot>;
|
|
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 Input: react.ForwardRefExoticComponent<{
|
|
171
|
-
variant?: InputVariant;
|
|
172
|
-
size?: InputSize;
|
|
173
|
-
radius?: RadiusKey;
|
|
174
|
-
labelPlacement?: InputLabelPlacement;
|
|
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?: InputVariant;
|
|
182
|
-
size?: InputSize;
|
|
183
|
-
radius?: RadiusKey;
|
|
184
|
-
labelPlacement?: InputLabelPlacement;
|
|
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" | "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" | "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 { Input, InputContextValue, InputDescription, InputError, InputField, InputLabel, InputLabelPlacement, InputRoot, InputSize, InputSlot, InputVariant, inputRecipe, useInput };
|