@xaui/native 0.9.1-alpha.35 → 0.9.1-alpha.36
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-I66VMLHE.cjs → chunk-2L7FOIWY.cjs} +21 -21
- package/dist/{chunk-VSALV7VO.cjs → chunk-2LNE4PWB.cjs} +2 -2
- package/dist/{chunk-HVD5EX7V.js → chunk-2OZPOWFB.js} +1 -1
- package/dist/{chunk-6M7RUU7V.cjs → chunk-2SCE7TFZ.cjs} +64 -64
- package/dist/{chunk-L55CDXNI.js → chunk-3YZSUDZ2.js} +108 -102
- package/dist/{chunk-NLASSGA7.js → chunk-4XFEEBPU.js} +10 -2
- package/dist/{chunk-4SLOOIE5.cjs → chunk-5BNIIDQD.cjs} +2 -2
- package/dist/{chunk-HXL2QCMR.js → chunk-5GMU7ESV.js} +14 -14
- package/dist/{chunk-Q3D6KIVF.cjs → chunk-6N5ZCEAB.cjs} +104 -98
- package/dist/{chunk-GBFQZQ77.js → chunk-6U5IUUAR.js} +2 -2
- package/dist/{chunk-XWMB66ZM.cjs → chunk-ADQVA2FQ.cjs} +2 -2
- package/dist/{chunk-YUG22AXX.cjs → chunk-AQXNEV6J.cjs} +16 -16
- package/dist/{chunk-CNNLMMFV.cjs → chunk-AZRMOWRG.cjs} +6 -6
- package/dist/{chunk-JCYWU5TO.js → chunk-B6OKVLC7.js} +1 -1
- package/dist/{chunk-M2BGCN77.js → chunk-BAPXLO5N.js} +4 -4
- package/dist/{chunk-MHEL3NAN.js → chunk-CVCE7TW5.js} +53 -53
- package/dist/{chunk-BA2MPBCO.js → chunk-DL2PGB5G.js} +58 -58
- package/dist/{chunk-NFFL3E4N.js → chunk-DOLWSO7A.js} +2 -2
- package/dist/{chunk-ZA6RT3XQ.js → chunk-E5ZW7MBW.js} +16 -16
- package/dist/{chunk-K7LLERKT.cjs → chunk-EFPWXJAJ.cjs} +11 -11
- package/dist/{chunk-GGW42MY4.js → chunk-FJ5TLRT3.js} +2 -1
- package/dist/{chunk-CYS6U374.cjs → chunk-FVKIQBHS.cjs} +4 -4
- package/dist/{chunk-PBR44KVV.cjs → chunk-FYCDRRJ2.cjs} +22 -22
- package/dist/{chunk-DBXFFJTC.cjs → chunk-GHKJ6MUH.cjs} +8 -8
- package/dist/{chunk-QY4MN7X3.cjs → chunk-GPZSTEEI.cjs} +12 -12
- package/dist/{chunk-OHEHPQLC.cjs → chunk-HQVVQGYV.cjs} +2 -2
- package/dist/{chunk-MC7SY2QH.cjs → chunk-HT7H35GU.cjs} +2 -1
- package/dist/{chunk-PCWT2YBE.cjs → chunk-ISPOIMGX.cjs} +2 -2
- package/dist/{chunk-TZG3DERP.js → chunk-JB5XANQY.js} +1 -1
- package/dist/{chunk-I6ZB3FZI.cjs → chunk-K3AVOT6L.cjs} +2 -2
- package/dist/{chunk-AYOVBZAX.js → chunk-K7GAHNMJ.js} +3 -3
- package/dist/{chunk-2IWL6R3D.js → chunk-KZVHC4FL.js} +3 -3
- package/dist/{chunk-AOEXU5UV.cjs → chunk-LCDHTLSG.cjs} +3 -3
- package/dist/{chunk-UORTYL63.cjs → chunk-MFXZHLOU.cjs} +11 -11
- package/dist/{chunk-MSMZBUZO.cjs → chunk-N2U63JUX.cjs} +6 -6
- package/dist/{chunk-SLUJFE6R.js → chunk-OMV5MUTM.js} +15 -15
- package/dist/{chunk-MEYCZS32.js → chunk-OSCW7I4H.js} +1 -1
- package/dist/{chunk-WJPQARJ5.js → chunk-OWE5IID7.js} +1 -1
- package/dist/{chunk-DUQUCOUY.cjs → chunk-PGQWUASE.cjs} +2 -2
- package/dist/{chunk-LZK77LFX.js → chunk-QZO57TPX.js} +1 -1
- package/dist/{chunk-7CTIE42J.cjs → chunk-RPOKLFRB.cjs} +16 -8
- package/dist/{chunk-U3RDU3HU.js → chunk-RSGIJ6RI.js} +2 -2
- package/dist/{chunk-UR6DNU2M.js → chunk-SAGMDVFU.js} +2 -2
- package/dist/{chunk-CM4LI5OH.cjs → chunk-TE7KVFE4.cjs} +9 -9
- package/dist/{chunk-NMAZ2TQF.js → chunk-U3HFQHGZ.js} +1 -1
- package/dist/{chunk-XNNJM5DQ.js → chunk-UCW25LL6.js} +75 -75
- package/dist/{chunk-ZC35YYKS.js → chunk-V5IVMZQJ.js} +1 -1
- package/dist/{chunk-HNW4HIMO.js → chunk-VWATEE5O.js} +15 -15
- package/dist/{chunk-TVCS5UOE.cjs → chunk-XARBUUIE.cjs} +49 -49
- package/dist/{chunk-OX2YNMNS.cjs → chunk-ZU3XQZ63.cjs} +63 -63
- package/dist/components/alert/index.cjs +7 -7
- package/dist/components/alert/index.js +6 -6
- package/dist/components/avatar/index.cjs +5 -5
- package/dist/components/avatar/index.js +4 -4
- package/dist/components/badge/index.cjs +4 -4
- package/dist/components/badge/index.js +3 -3
- package/dist/components/button/index.cjs +6 -6
- package/dist/components/button/index.js +5 -5
- package/dist/components/card/index.cjs +5 -5
- package/dist/components/card/index.js +4 -4
- package/dist/components/checkbox/index.cjs +5 -5
- package/dist/components/checkbox/index.js +4 -4
- package/dist/components/chip/index.cjs +7 -7
- package/dist/components/chip/index.js +6 -6
- package/dist/components/divider/index.cjs +4 -4
- package/dist/components/divider/index.js +3 -3
- package/dist/components/field-group/index.cjs +28 -0
- package/dist/components/{input-group → field-group}/index.d.cts +60 -60
- package/dist/components/{input-group → field-group}/index.d.ts +60 -60
- package/dist/components/field-group/index.js +28 -0
- package/dist/components/input-otp/index.cjs +4 -4
- package/dist/components/input-otp/index.js +3 -3
- package/dist/components/radio/index.cjs +5 -5
- package/dist/components/radio/index.js +4 -4
- package/dist/components/skeleton/index.cjs +4 -4
- package/dist/components/skeleton/index.js +3 -3
- package/dist/components/spinner/index.cjs +4 -4
- package/dist/components/spinner/index.js +3 -3
- package/dist/components/switch/index.cjs +5 -5
- package/dist/components/switch/index.js +4 -4
- package/dist/components/text-area/index.cjs +5 -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 +4 -4
- package/dist/components/text-field/index.cjs +26 -0
- package/dist/components/{input → text-field}/index.d.cts +43 -43
- package/dist/components/{input → text-field}/index.d.ts +43 -43
- package/dist/components/text-field/index.js +26 -0
- package/dist/components/typography/index.cjs +4 -4
- package/dist/components/typography/index.js +3 -3
- package/dist/components/view/index.cjs +4 -4
- package/dist/components/view/index.js +3 -3
- package/dist/index.cjs +26 -26
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +60 -60
- package/dist/system/index.cjs +7 -7
- package/dist/system/index.js +6 -6
- 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 +3 -3
- package/dist/theme/index.js +2 -2
- package/package.json +16 -16
- package/dist/components/input/index.cjs +0 -26
- 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.js';
|
|
4
4
|
import { S as Size, R as RadiusKey } from './theme.type-C2gNHpEx.js';
|
|
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 };
|
|
@@ -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,7 @@
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _chunkHQVVQGYVcjs = require('../chunk-HQVVQGYV.cjs');
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
|
|
@@ -17,7 +17,7 @@ var _chunkOHEHPQLCcjs = require('../chunk-OHEHPQLC.cjs');
|
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
var _chunk57SJ4LJFcjs = require('../chunk-57SJ4LJF.cjs');
|
|
20
|
-
require('../chunk-
|
|
20
|
+
require('../chunk-HT7H35GU.cjs');
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
|
|
@@ -34,4 +34,4 @@ require('../chunk-MC7SY2QH.cjs');
|
|
|
34
34
|
|
|
35
35
|
|
|
36
36
|
|
|
37
|
-
exports.ThemeContext = _chunk57SJ4LJFcjs.ThemeContext; exports.XAUIProvider =
|
|
37
|
+
exports.ThemeContext = _chunk57SJ4LJFcjs.ThemeContext; exports.XAUIProvider = _chunkHQVVQGYVcjs.XAUIProvider; exports.buildRadius = _chunkHQVVQGYVcjs.buildRadius; exports.buildShadows = _chunkHQVVQGYVcjs.buildShadows; exports.createTheme = _chunkHQVVQGYVcjs.createTheme; exports.defaultTheme = _chunkHQVVQGYVcjs.defaultTheme; exports.deriveColors = _chunkHQVVQGYVcjs.deriveColors; exports.deriveTint = _chunk57SJ4LJFcjs.deriveTint; exports.palette = _chunkHQVVQGYVcjs.palette; exports.primitives = _chunkHQVVQGYVcjs.primitives; exports.sourceKeys = _chunkHQVVQGYVcjs.sourceKeys; exports.tokens = _chunkHQVVQGYVcjs.tokens; exports.useColorMode = _chunk57SJ4LJFcjs.useColorMode; exports.useThemeColor = _chunk57SJ4LJFcjs.useThemeColor; exports.useXAUITheme = _chunk57SJ4LJFcjs.useXAUITheme;
|
package/dist/theme/index.js
CHANGED
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
primitives,
|
|
10
10
|
sourceKeys,
|
|
11
11
|
tokens
|
|
12
|
-
} from "../chunk-
|
|
12
|
+
} from "../chunk-JB5XANQY.js";
|
|
13
13
|
import {
|
|
14
14
|
ThemeContext,
|
|
15
15
|
deriveTint,
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
useThemeColor,
|
|
18
18
|
useXAUITheme
|
|
19
19
|
} from "../chunk-A3EGFI6T.js";
|
|
20
|
-
import "../chunk-
|
|
20
|
+
import "../chunk-FJ5TLRT3.js";
|
|
21
21
|
export {
|
|
22
22
|
ThemeContext,
|
|
23
23
|
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.36",
|
|
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": {
|
|
@@ -187,6 +177,16 @@
|
|
|
187
177
|
"default": "./dist/components/text-area/index.cjs"
|
|
188
178
|
}
|
|
189
179
|
},
|
|
180
|
+
"./text-field": {
|
|
181
|
+
"import": {
|
|
182
|
+
"types": "./dist/components/text-field/index.d.ts",
|
|
183
|
+
"default": "./dist/components/text-field/index.js"
|
|
184
|
+
},
|
|
185
|
+
"require": {
|
|
186
|
+
"types": "./dist/components/text-field/index.d.cts",
|
|
187
|
+
"default": "./dist/components/text-field/index.cjs"
|
|
188
|
+
}
|
|
189
|
+
},
|
|
190
190
|
"./typography": {
|
|
191
191
|
"import": {
|
|
192
192
|
"types": "./dist/components/typography/index.d.ts",
|
|
@@ -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,26 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Input,
|
|
3
|
-
InputDescription,
|
|
4
|
-
InputError,
|
|
5
|
-
InputField,
|
|
6
|
-
InputLabel,
|
|
7
|
-
InputRoot,
|
|
8
|
-
inputRecipe,
|
|
9
|
-
useInput
|
|
10
|
-
} from "../../chunk-L55CDXNI.js";
|
|
11
|
-
import "../../chunk-YXPYOOHU.js";
|
|
12
|
-
import "../../chunk-36PRYGAM.js";
|
|
13
|
-
import "../../chunk-4GTAZM2C.js";
|
|
14
|
-
import "../../chunk-MEYCZS32.js";
|
|
15
|
-
import "../../chunk-A3EGFI6T.js";
|
|
16
|
-
import "../../chunk-GGW42MY4.js";
|
|
17
|
-
export {
|
|
18
|
-
Input,
|
|
19
|
-
InputDescription,
|
|
20
|
-
InputError,
|
|
21
|
-
InputField,
|
|
22
|
-
InputLabel,
|
|
23
|
-
InputRoot,
|
|
24
|
-
inputRecipe,
|
|
25
|
-
useInput
|
|
26
|
-
};
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
var _chunkTVCS5UOEcjs = require('../../chunk-TVCS5UOE.cjs');
|
|
11
|
-
require('../../chunk-Q3D6KIVF.cjs');
|
|
12
|
-
require('../../chunk-PCWT2YBE.cjs');
|
|
13
|
-
require('../../chunk-54FJOKAN.cjs');
|
|
14
|
-
require('../../chunk-H4E4HDEP.cjs');
|
|
15
|
-
require('../../chunk-FNEUOBCV.cjs');
|
|
16
|
-
require('../../chunk-I6ZB3FZI.cjs');
|
|
17
|
-
require('../../chunk-57SJ4LJF.cjs');
|
|
18
|
-
require('../../chunk-MC7SY2QH.cjs');
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
exports.InputGroup = _chunkTVCS5UOEcjs.InputGroup; exports.InputGroupField = _chunkTVCS5UOEcjs.InputGroupField; exports.InputGroupIcon = _chunkTVCS5UOEcjs.InputGroupIcon; exports.InputGroupPrefix = _chunkTVCS5UOEcjs.InputGroupPrefix; exports.InputGroupRoot = _chunkTVCS5UOEcjs.InputGroupRoot; exports.InputGroupSuffix = _chunkTVCS5UOEcjs.InputGroupSuffix; exports.decoratorPadding = _chunkTVCS5UOEcjs.decoratorPadding; exports.useInputGroup = _chunkTVCS5UOEcjs.useInputGroup;
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
InputGroup,
|
|
3
|
-
InputGroupField,
|
|
4
|
-
InputGroupIcon,
|
|
5
|
-
InputGroupPrefix,
|
|
6
|
-
InputGroupRoot,
|
|
7
|
-
InputGroupSuffix,
|
|
8
|
-
decoratorPadding,
|
|
9
|
-
useInputGroup
|
|
10
|
-
} from "../../chunk-MHEL3NAN.js";
|
|
11
|
-
import "../../chunk-L55CDXNI.js";
|
|
12
|
-
import "../../chunk-WJPQARJ5.js";
|
|
13
|
-
import "../../chunk-YXPYOOHU.js";
|
|
14
|
-
import "../../chunk-36PRYGAM.js";
|
|
15
|
-
import "../../chunk-4GTAZM2C.js";
|
|
16
|
-
import "../../chunk-MEYCZS32.js";
|
|
17
|
-
import "../../chunk-A3EGFI6T.js";
|
|
18
|
-
import "../../chunk-GGW42MY4.js";
|
|
19
|
-
export {
|
|
20
|
-
InputGroup,
|
|
21
|
-
InputGroupField,
|
|
22
|
-
InputGroupIcon,
|
|
23
|
-
InputGroupPrefix,
|
|
24
|
-
InputGroupRoot,
|
|
25
|
-
InputGroupSuffix,
|
|
26
|
-
decoratorPadding,
|
|
27
|
-
useInputGroup
|
|
28
|
-
};
|