@xaui/native 0.9.1-alpha.24 → 0.9.1-alpha.26
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-3LKGVKQY.cjs +145 -0
- package/dist/chunk-5OXZIZRZ.cjs +72 -0
- package/dist/{chunk-LIQTGAI7.cjs → chunk-BULNTP5N.cjs} +6 -7
- package/dist/{chunk-J4QE34AU.js → chunk-I6UCYAO2.js} +20 -21
- package/dist/{chunk-P2XA4DV7.cjs → chunk-JCKVYYZO.cjs} +86 -14
- package/dist/{chunk-GBPWTFTU.cjs → chunk-OHEHPQLC.cjs} +10 -1
- package/dist/{chunk-MRYLLKML.js → chunk-PQHC65AG.js} +15 -15
- package/dist/chunk-TR2TGPDQ.js +72 -0
- package/dist/{chunk-GG2WWCBK.js → chunk-TZG3DERP.js} +10 -1
- package/dist/{chunk-6RO26ORT.js → chunk-V2FQN6ZK.js} +85 -13
- package/dist/chunk-WEMZ4VMC.js +145 -0
- package/dist/{chunk-EWBBDVTM.cjs → chunk-WVCAFORA.cjs} +15 -15
- package/dist/components/alert/index.cjs +1 -1
- package/dist/components/alert/index.js +1 -1
- package/dist/components/button/index.cjs +3 -3
- package/dist/components/button/index.js +2 -2
- package/dist/components/chip/index.cjs +3 -3
- package/dist/components/chip/index.js +2 -2
- package/dist/components/input/index.cjs +12 -2
- package/dist/components/input/index.d.cts +109 -117
- package/dist/components/input/index.d.ts +109 -117
- package/dist/components/input/index.js +11 -1
- package/dist/components/input-group/index.cjs +26 -0
- package/dist/components/input-group/index.d.cts +270 -0
- package/dist/components/input-group/index.d.ts +270 -0
- package/dist/components/input-group/index.js +26 -0
- package/dist/components/input-otp/index.cjs +2 -2
- package/dist/components/input-otp/index.js +1 -1
- package/dist/components/text-area/index.cjs +13 -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 +13 -0
- package/dist/index.cjs +44 -10
- package/dist/index.d.cts +4 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.js +49 -15
- package/dist/input.type-BUMDlzL9.d.cts +167 -0
- package/dist/input.type-D2qgi03E.d.ts +167 -0
- package/dist/system/index.cjs +2 -2
- package/dist/system/index.js +5 -5
- package/dist/theme/index.cjs +2 -2
- package/dist/theme/index.js +1 -1
- package/package.json +21 -1
- package/dist/{chunk-4J26FA6O.js → chunk-3WISQT22.js} +3 -3
- package/dist/{chunk-AV5LMFS3.cjs → chunk-I7G77Q65.cjs} +2 -2
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { StyleProp, TextStyle, ViewStyle, TextInputProps, TextProps, ViewProps } from 'react-native';
|
|
3
|
+
import { T as TextStyleProps, V as ViewStyleProps } from './style-props.type-CfnoGEP7.cjs';
|
|
4
|
+
import { S as Size, R as RadiusKey } from './theme.type-C2gNHpEx.cjs';
|
|
5
|
+
|
|
6
|
+
type InputSlot = 'root' | 'label' | 'field' | 'textArea' | 'placeholder' | 'description' | 'error' | 'prefix' | 'suffix' | 'icon';
|
|
7
|
+
/**
|
|
8
|
+
* The library's four emphasis levels, narrowed like the `Card`'s (§1 bis). A field
|
|
9
|
+
* **reports nothing** — an error is `isInvalid`, which is a state and not a variant — so
|
|
10
|
+
* `success`, `warning` and `danger` are absent here for the same reason they are there.
|
|
11
|
+
*
|
|
12
|
+
* This is where the theme's `field*` family is finally read, and the four names split
|
|
13
|
+
* HeroUI's two-name `primary | secondary` by saying what each of their ends already is:
|
|
14
|
+
*
|
|
15
|
+
* - **`primary`** — the `fieldBackground` fill plus the theme's `field` shadow. HeroUI's
|
|
16
|
+
* `primary`, with the elevation their flat token only implies.
|
|
17
|
+
* - **`secondary`** — the neutral `default` fill. HeroUI's `secondary`, and the default
|
|
18
|
+
* here: on a plain background a white field is its border and nothing else, while on a
|
|
19
|
+
* card the `fieldBackground` token *is* the card's own colour.
|
|
20
|
+
* - **`tertiary`** — the border alone, no fill. The same drop the `Button`'s `tertiary`
|
|
21
|
+
* makes.
|
|
22
|
+
* - **`ghost`** — neither. A bare field for a toolbar or an inline edit; it has no border
|
|
23
|
+
* to move, so its focus shows in the caret alone.
|
|
24
|
+
*
|
|
25
|
+
* The first three name the `fieldBorder` edge and `ghost` gives it up. Its width is the
|
|
26
|
+
* theme's `borderWidth.field` — HeroUI's `--field-border-width`, which they ship at `0`
|
|
27
|
+
* and we ship at `1`. That is the one shipped default where the two differ;
|
|
28
|
+
* `createTheme({ borderWidth: { field: 0 } })` reproduces theirs.
|
|
29
|
+
*/
|
|
30
|
+
type InputVariant = 'primary' | 'secondary' | 'tertiary' | 'ghost';
|
|
31
|
+
/**
|
|
32
|
+
* Where the label sits relative to the field's box.
|
|
33
|
+
*
|
|
34
|
+
* `outside` is the label above the box, in the column's flow. `inside` lifts it into the
|
|
35
|
+
* box, above the text — the label is taken **out of flow** and placed against the box's
|
|
36
|
+
* own padding, so the JSX is identical either way and nothing is reparented (R4).
|
|
37
|
+
*
|
|
38
|
+
* Because the inside label positions itself against the top of the root, it assumes the
|
|
39
|
+
* field is the first thing in the column's flow: write `Input.Description` and
|
|
40
|
+
* `Input.Error` after the field, which is where they belong anyway.
|
|
41
|
+
*/
|
|
42
|
+
type InputLabelPlacement = 'outside' | 'inside';
|
|
43
|
+
type InputSize = Size;
|
|
44
|
+
/**
|
|
45
|
+
* What the `Input` itself understands. R14 — a name in here is the component's, so the
|
|
46
|
+
* style prop that shares it is not exposed: `size` is the field's scale and never
|
|
47
|
+
* `ViewStyle`'s, and `color` is R7's tint.
|
|
48
|
+
*/
|
|
49
|
+
type InputOwnProps = {
|
|
50
|
+
variant?: InputVariant;
|
|
51
|
+
/** The field's height, its padding, the gaps and the type. Never width. */
|
|
52
|
+
size?: InputSize;
|
|
53
|
+
/** Overrides the `field` radius the theme chose for every size. */
|
|
54
|
+
radius?: RadiusKey;
|
|
55
|
+
/** Above the box, or lifted into it. @default 'outside' */
|
|
56
|
+
labelPlacement?: InputLabelPlacement;
|
|
57
|
+
/**
|
|
58
|
+
* A raw tint (`'#7c3aed'`), never a token (R7). It lands where the variant put its
|
|
59
|
+
* tokens — the fill of a `default`, the border of a `tertiary` — and, because the focus
|
|
60
|
+
* colour is a role like any other, it is also what the field borders on focus.
|
|
61
|
+
*/
|
|
62
|
+
color?: string;
|
|
63
|
+
/**
|
|
64
|
+
* Paints the border, the label and the description in `danger`, and takes the focus
|
|
65
|
+
* treatment off: an error outranks focus, and a field that is both should read as
|
|
66
|
+
* wrong rather than as busy.
|
|
67
|
+
*
|
|
68
|
+
* It does **not** mount or unmount `Input.Error`. That stays the caller's — a slot that
|
|
69
|
+
* silently renders nothing is a slot you cannot debug.
|
|
70
|
+
*/
|
|
71
|
+
isInvalid?: boolean;
|
|
72
|
+
/** Dims the field and makes it uneditable. */
|
|
73
|
+
isDisabled?: boolean;
|
|
74
|
+
style?: StyleProp<ViewStyle>;
|
|
75
|
+
children?: ReactNode;
|
|
76
|
+
};
|
|
77
|
+
/**
|
|
78
|
+
* R14 — the input's own props, the wrapper `View`'s, and every `ViewStyle` key neither
|
|
79
|
+
* already claims. **`TextInputProps` are not here**: they belong to `Input.Field`, which
|
|
80
|
+
* is the node that has them.
|
|
81
|
+
*/
|
|
82
|
+
type InputProps = InputOwnProps & Omit<ViewProps, keyof InputOwnProps> & Omit<ViewStyleProps, keyof InputOwnProps | keyof ViewProps> & {
|
|
83
|
+
/** R12 — merge into the single child instead of rendering a `View`. */
|
|
84
|
+
asChild?: boolean;
|
|
85
|
+
};
|
|
86
|
+
/**
|
|
87
|
+
* Everything `TextInput` accepts, plus the `TextStyle` keys as props (R14).
|
|
88
|
+
*
|
|
89
|
+
* `editable` is absent: it is `disabled` under another name, and R8 keeps that off the
|
|
90
|
+
* public surface — `isDisabled` on the root is what stops the field.
|
|
91
|
+
*/
|
|
92
|
+
type InputFieldProps = Omit<TextInputProps, 'editable'> & Omit<TextStyleProps, keyof TextInputProps>;
|
|
93
|
+
/** `Text`'s own props win over the `TextStyle` keys of the same name (R14). */
|
|
94
|
+
type InputTextProps = TextProps & Omit<TextStyleProps, keyof TextProps> & {
|
|
95
|
+
children?: ReactNode;
|
|
96
|
+
};
|
|
97
|
+
type InputLabelProps = InputTextProps;
|
|
98
|
+
type InputDescriptionProps = InputTextProps;
|
|
99
|
+
type InputErrorProps = InputTextProps;
|
|
100
|
+
/**
|
|
101
|
+
* Read off `TextInput`'s own props rather than spelled out: React Native has renamed the
|
|
102
|
+
* payload of these two more than once, and a hand-written `NativeSyntheticEvent<…>` here
|
|
103
|
+
* would be a second declaration free to drift from the node that actually fires them.
|
|
104
|
+
*/
|
|
105
|
+
type FieldFocusEvent = Parameters<NonNullable<TextInputProps['onFocus']>>[0];
|
|
106
|
+
type FieldBlurEvent = Parameters<NonNullable<TextInputProps['onBlur']>>[0];
|
|
107
|
+
/**
|
|
108
|
+
* R5 — resolved styles, not props for a slot to resolve a second time. Each entry is the
|
|
109
|
+
* cached `StyleSheet` reference with the uncached tint pass layered over it, so a slot
|
|
110
|
+
* merges its own `style` on top and does no work of its own.
|
|
111
|
+
*/
|
|
112
|
+
type InputContextValue = {
|
|
113
|
+
labelStyle: StyleProp<TextStyle>;
|
|
114
|
+
fieldStyle: StyleProp<TextStyle>;
|
|
115
|
+
/** Layered *over* `fieldStyle` by `Input.TextArea`: only what a multiline field adds. */
|
|
116
|
+
textAreaStyle: StyleProp<TextStyle>;
|
|
117
|
+
/**
|
|
118
|
+
* Values, not a style: `rows` is a raw number, so the height it implies is arithmetic
|
|
119
|
+
* the slot does — and these are the two measurements it needs, flattened once here
|
|
120
|
+
* rather than in every text area on the screen.
|
|
121
|
+
*/
|
|
122
|
+
textArea: {
|
|
123
|
+
lineHeight: number;
|
|
124
|
+
paddingVertical: number;
|
|
125
|
+
};
|
|
126
|
+
descriptionStyle: StyleProp<TextStyle>;
|
|
127
|
+
errorStyle: StyleProp<TextStyle>;
|
|
128
|
+
/**
|
|
129
|
+
* The two decorators of an `InputGroup`, already pinned to their edge and inset by the
|
|
130
|
+
* field's own padding. They are resolved here, on the root, because the size that
|
|
131
|
+
* decides that padding is the root's — the group itself adds no axis of its own.
|
|
132
|
+
*/
|
|
133
|
+
prefixStyle: StyleProp<ViewStyle>;
|
|
134
|
+
suffixStyle: StyleProp<ViewStyle>;
|
|
135
|
+
/**
|
|
136
|
+
* Values, not a style: an icon is a third party's component, and `size` and `color` are
|
|
137
|
+
* props it takes rather than a style it accepts. Flattened once here, the way the `Chip`
|
|
138
|
+
* and the `Alert` publish theirs.
|
|
139
|
+
*/
|
|
140
|
+
icon: {
|
|
141
|
+
size: number | undefined;
|
|
142
|
+
color: string | undefined;
|
|
143
|
+
};
|
|
144
|
+
/**
|
|
145
|
+
* A value and not a style: `placeholderTextColor` is a `TextInput` prop, so the root
|
|
146
|
+
* flattens its placeholder slot once here rather than in the field.
|
|
147
|
+
*/
|
|
148
|
+
placeholderTextColor?: string;
|
|
149
|
+
/**
|
|
150
|
+
* The focus state lives on the **root**, because the root's recipe resolves on it (R5)
|
|
151
|
+
* and it needs the value before it renders — but the node that hears the event is
|
|
152
|
+
* `Input.Field`, three levels down. These are how it reports back. Their identity is
|
|
153
|
+
* stable, so publishing them costs no re-render of a memoized slot.
|
|
154
|
+
*/
|
|
155
|
+
onFieldFocus: (event: FieldFocusEvent) => void;
|
|
156
|
+
onFieldBlur: (event: FieldBlurEvent) => void;
|
|
157
|
+
/**
|
|
158
|
+
* The id the label carries and the field points at, so a screen reader reads "Courriel,
|
|
159
|
+
* champ de saisie" rather than just the placeholder.
|
|
160
|
+
*/
|
|
161
|
+
labelId: string;
|
|
162
|
+
descriptionId: string;
|
|
163
|
+
isDisabled: boolean;
|
|
164
|
+
isInvalid: boolean;
|
|
165
|
+
};
|
|
166
|
+
|
|
167
|
+
export type { InputFieldProps as I, InputProps as a, InputContextValue as b, InputDescriptionProps as c, InputErrorProps as d, InputLabelPlacement as e, InputLabelProps as f, InputSize as g, InputSlot as h, InputVariant as i };
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { StyleProp, TextStyle, ViewStyle, TextInputProps, TextProps, ViewProps } from 'react-native';
|
|
3
|
+
import { T as TextStyleProps, V as ViewStyleProps } from './style-props.type-CfnoGEP7.js';
|
|
4
|
+
import { S as Size, R as RadiusKey } from './theme.type-C2gNHpEx.js';
|
|
5
|
+
|
|
6
|
+
type InputSlot = 'root' | 'label' | 'field' | 'textArea' | 'placeholder' | 'description' | 'error' | 'prefix' | 'suffix' | 'icon';
|
|
7
|
+
/**
|
|
8
|
+
* The library's four emphasis levels, narrowed like the `Card`'s (§1 bis). A field
|
|
9
|
+
* **reports nothing** — an error is `isInvalid`, which is a state and not a variant — so
|
|
10
|
+
* `success`, `warning` and `danger` are absent here for the same reason they are there.
|
|
11
|
+
*
|
|
12
|
+
* This is where the theme's `field*` family is finally read, and the four names split
|
|
13
|
+
* HeroUI's two-name `primary | secondary` by saying what each of their ends already is:
|
|
14
|
+
*
|
|
15
|
+
* - **`primary`** — the `fieldBackground` fill plus the theme's `field` shadow. HeroUI's
|
|
16
|
+
* `primary`, with the elevation their flat token only implies.
|
|
17
|
+
* - **`secondary`** — the neutral `default` fill. HeroUI's `secondary`, and the default
|
|
18
|
+
* here: on a plain background a white field is its border and nothing else, while on a
|
|
19
|
+
* card the `fieldBackground` token *is* the card's own colour.
|
|
20
|
+
* - **`tertiary`** — the border alone, no fill. The same drop the `Button`'s `tertiary`
|
|
21
|
+
* makes.
|
|
22
|
+
* - **`ghost`** — neither. A bare field for a toolbar or an inline edit; it has no border
|
|
23
|
+
* to move, so its focus shows in the caret alone.
|
|
24
|
+
*
|
|
25
|
+
* The first three name the `fieldBorder` edge and `ghost` gives it up. Its width is the
|
|
26
|
+
* theme's `borderWidth.field` — HeroUI's `--field-border-width`, which they ship at `0`
|
|
27
|
+
* and we ship at `1`. That is the one shipped default where the two differ;
|
|
28
|
+
* `createTheme({ borderWidth: { field: 0 } })` reproduces theirs.
|
|
29
|
+
*/
|
|
30
|
+
type InputVariant = 'primary' | 'secondary' | 'tertiary' | 'ghost';
|
|
31
|
+
/**
|
|
32
|
+
* Where the label sits relative to the field's box.
|
|
33
|
+
*
|
|
34
|
+
* `outside` is the label above the box, in the column's flow. `inside` lifts it into the
|
|
35
|
+
* box, above the text — the label is taken **out of flow** and placed against the box's
|
|
36
|
+
* own padding, so the JSX is identical either way and nothing is reparented (R4).
|
|
37
|
+
*
|
|
38
|
+
* Because the inside label positions itself against the top of the root, it assumes the
|
|
39
|
+
* field is the first thing in the column's flow: write `Input.Description` and
|
|
40
|
+
* `Input.Error` after the field, which is where they belong anyway.
|
|
41
|
+
*/
|
|
42
|
+
type InputLabelPlacement = 'outside' | 'inside';
|
|
43
|
+
type InputSize = Size;
|
|
44
|
+
/**
|
|
45
|
+
* What the `Input` itself understands. R14 — a name in here is the component's, so the
|
|
46
|
+
* style prop that shares it is not exposed: `size` is the field's scale and never
|
|
47
|
+
* `ViewStyle`'s, and `color` is R7's tint.
|
|
48
|
+
*/
|
|
49
|
+
type InputOwnProps = {
|
|
50
|
+
variant?: InputVariant;
|
|
51
|
+
/** The field's height, its padding, the gaps and the type. Never width. */
|
|
52
|
+
size?: InputSize;
|
|
53
|
+
/** Overrides the `field` radius the theme chose for every size. */
|
|
54
|
+
radius?: RadiusKey;
|
|
55
|
+
/** Above the box, or lifted into it. @default 'outside' */
|
|
56
|
+
labelPlacement?: InputLabelPlacement;
|
|
57
|
+
/**
|
|
58
|
+
* A raw tint (`'#7c3aed'`), never a token (R7). It lands where the variant put its
|
|
59
|
+
* tokens — the fill of a `default`, the border of a `tertiary` — and, because the focus
|
|
60
|
+
* colour is a role like any other, it is also what the field borders on focus.
|
|
61
|
+
*/
|
|
62
|
+
color?: string;
|
|
63
|
+
/**
|
|
64
|
+
* Paints the border, the label and the description in `danger`, and takes the focus
|
|
65
|
+
* treatment off: an error outranks focus, and a field that is both should read as
|
|
66
|
+
* wrong rather than as busy.
|
|
67
|
+
*
|
|
68
|
+
* It does **not** mount or unmount `Input.Error`. That stays the caller's — a slot that
|
|
69
|
+
* silently renders nothing is a slot you cannot debug.
|
|
70
|
+
*/
|
|
71
|
+
isInvalid?: boolean;
|
|
72
|
+
/** Dims the field and makes it uneditable. */
|
|
73
|
+
isDisabled?: boolean;
|
|
74
|
+
style?: StyleProp<ViewStyle>;
|
|
75
|
+
children?: ReactNode;
|
|
76
|
+
};
|
|
77
|
+
/**
|
|
78
|
+
* R14 — the input's own props, the wrapper `View`'s, and every `ViewStyle` key neither
|
|
79
|
+
* already claims. **`TextInputProps` are not here**: they belong to `Input.Field`, which
|
|
80
|
+
* is the node that has them.
|
|
81
|
+
*/
|
|
82
|
+
type InputProps = InputOwnProps & Omit<ViewProps, keyof InputOwnProps> & Omit<ViewStyleProps, keyof InputOwnProps | keyof ViewProps> & {
|
|
83
|
+
/** R12 — merge into the single child instead of rendering a `View`. */
|
|
84
|
+
asChild?: boolean;
|
|
85
|
+
};
|
|
86
|
+
/**
|
|
87
|
+
* Everything `TextInput` accepts, plus the `TextStyle` keys as props (R14).
|
|
88
|
+
*
|
|
89
|
+
* `editable` is absent: it is `disabled` under another name, and R8 keeps that off the
|
|
90
|
+
* public surface — `isDisabled` on the root is what stops the field.
|
|
91
|
+
*/
|
|
92
|
+
type InputFieldProps = Omit<TextInputProps, 'editable'> & Omit<TextStyleProps, keyof TextInputProps>;
|
|
93
|
+
/** `Text`'s own props win over the `TextStyle` keys of the same name (R14). */
|
|
94
|
+
type InputTextProps = TextProps & Omit<TextStyleProps, keyof TextProps> & {
|
|
95
|
+
children?: ReactNode;
|
|
96
|
+
};
|
|
97
|
+
type InputLabelProps = InputTextProps;
|
|
98
|
+
type InputDescriptionProps = InputTextProps;
|
|
99
|
+
type InputErrorProps = InputTextProps;
|
|
100
|
+
/**
|
|
101
|
+
* Read off `TextInput`'s own props rather than spelled out: React Native has renamed the
|
|
102
|
+
* payload of these two more than once, and a hand-written `NativeSyntheticEvent<…>` here
|
|
103
|
+
* would be a second declaration free to drift from the node that actually fires them.
|
|
104
|
+
*/
|
|
105
|
+
type FieldFocusEvent = Parameters<NonNullable<TextInputProps['onFocus']>>[0];
|
|
106
|
+
type FieldBlurEvent = Parameters<NonNullable<TextInputProps['onBlur']>>[0];
|
|
107
|
+
/**
|
|
108
|
+
* R5 — resolved styles, not props for a slot to resolve a second time. Each entry is the
|
|
109
|
+
* cached `StyleSheet` reference with the uncached tint pass layered over it, so a slot
|
|
110
|
+
* merges its own `style` on top and does no work of its own.
|
|
111
|
+
*/
|
|
112
|
+
type InputContextValue = {
|
|
113
|
+
labelStyle: StyleProp<TextStyle>;
|
|
114
|
+
fieldStyle: StyleProp<TextStyle>;
|
|
115
|
+
/** Layered *over* `fieldStyle` by `Input.TextArea`: only what a multiline field adds. */
|
|
116
|
+
textAreaStyle: StyleProp<TextStyle>;
|
|
117
|
+
/**
|
|
118
|
+
* Values, not a style: `rows` is a raw number, so the height it implies is arithmetic
|
|
119
|
+
* the slot does — and these are the two measurements it needs, flattened once here
|
|
120
|
+
* rather than in every text area on the screen.
|
|
121
|
+
*/
|
|
122
|
+
textArea: {
|
|
123
|
+
lineHeight: number;
|
|
124
|
+
paddingVertical: number;
|
|
125
|
+
};
|
|
126
|
+
descriptionStyle: StyleProp<TextStyle>;
|
|
127
|
+
errorStyle: StyleProp<TextStyle>;
|
|
128
|
+
/**
|
|
129
|
+
* The two decorators of an `InputGroup`, already pinned to their edge and inset by the
|
|
130
|
+
* field's own padding. They are resolved here, on the root, because the size that
|
|
131
|
+
* decides that padding is the root's — the group itself adds no axis of its own.
|
|
132
|
+
*/
|
|
133
|
+
prefixStyle: StyleProp<ViewStyle>;
|
|
134
|
+
suffixStyle: StyleProp<ViewStyle>;
|
|
135
|
+
/**
|
|
136
|
+
* Values, not a style: an icon is a third party's component, and `size` and `color` are
|
|
137
|
+
* props it takes rather than a style it accepts. Flattened once here, the way the `Chip`
|
|
138
|
+
* and the `Alert` publish theirs.
|
|
139
|
+
*/
|
|
140
|
+
icon: {
|
|
141
|
+
size: number | undefined;
|
|
142
|
+
color: string | undefined;
|
|
143
|
+
};
|
|
144
|
+
/**
|
|
145
|
+
* A value and not a style: `placeholderTextColor` is a `TextInput` prop, so the root
|
|
146
|
+
* flattens its placeholder slot once here rather than in the field.
|
|
147
|
+
*/
|
|
148
|
+
placeholderTextColor?: string;
|
|
149
|
+
/**
|
|
150
|
+
* The focus state lives on the **root**, because the root's recipe resolves on it (R5)
|
|
151
|
+
* and it needs the value before it renders — but the node that hears the event is
|
|
152
|
+
* `Input.Field`, three levels down. These are how it reports back. Their identity is
|
|
153
|
+
* stable, so publishing them costs no re-render of a memoized slot.
|
|
154
|
+
*/
|
|
155
|
+
onFieldFocus: (event: FieldFocusEvent) => void;
|
|
156
|
+
onFieldBlur: (event: FieldBlurEvent) => void;
|
|
157
|
+
/**
|
|
158
|
+
* The id the label carries and the field points at, so a screen reader reads "Courriel,
|
|
159
|
+
* champ de saisie" rather than just the placeholder.
|
|
160
|
+
*/
|
|
161
|
+
labelId: string;
|
|
162
|
+
descriptionId: string;
|
|
163
|
+
isDisabled: boolean;
|
|
164
|
+
isInvalid: boolean;
|
|
165
|
+
};
|
|
166
|
+
|
|
167
|
+
export type { InputFieldProps as I, InputProps as a, InputContextValue as b, InputDescriptionProps as c, InputErrorProps as d, InputLabelPlacement as e, InputLabelProps as f, InputSize as g, InputSlot as h, InputVariant as i };
|
package/dist/system/index.cjs
CHANGED
|
@@ -11,7 +11,6 @@ var _chunkJ2JJLKLGcjs = require('../chunk-J2JJLKLG.cjs');
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
var _chunkB4W2XNBPcjs = require('../chunk-B4W2XNBP.cjs');
|
|
15
14
|
|
|
16
15
|
|
|
17
16
|
|
|
@@ -29,11 +28,12 @@ var _chunkB4W2XNBPcjs = require('../chunk-B4W2XNBP.cjs');
|
|
|
29
28
|
|
|
30
29
|
|
|
31
30
|
|
|
31
|
+
var _chunkIG4Q3WQOcjs = require('../chunk-IG4Q3WQO.cjs');
|
|
32
32
|
|
|
33
33
|
|
|
34
34
|
|
|
35
35
|
|
|
36
|
-
var
|
|
36
|
+
var _chunkB4W2XNBPcjs = require('../chunk-B4W2XNBP.cjs');
|
|
37
37
|
require('../chunk-EJQCQPET.cjs');
|
|
38
38
|
|
|
39
39
|
|
package/dist/system/index.js
CHANGED
|
@@ -7,11 +7,6 @@ import {
|
|
|
7
7
|
CloseButton,
|
|
8
8
|
closeButtonBase
|
|
9
9
|
} from "../chunk-A4RGJBP2.js";
|
|
10
|
-
import {
|
|
11
|
-
Icon,
|
|
12
|
-
IconContext,
|
|
13
|
-
useIconContext
|
|
14
|
-
} from "../chunk-ICR42HHG.js";
|
|
15
10
|
import {
|
|
16
11
|
FEEDBACK_OVERLAY,
|
|
17
12
|
HIGHLIGHT_DURATION,
|
|
@@ -34,6 +29,11 @@ import {
|
|
|
34
29
|
rippleRadiusFor,
|
|
35
30
|
useFeedback
|
|
36
31
|
} from "../chunk-4HELPMAK.js";
|
|
32
|
+
import {
|
|
33
|
+
Icon,
|
|
34
|
+
IconContext,
|
|
35
|
+
useIconContext
|
|
36
|
+
} from "../chunk-ICR42HHG.js";
|
|
37
37
|
import "../chunk-EGLLDKN6.js";
|
|
38
38
|
import {
|
|
39
39
|
createRecipe,
|
package/dist/theme/index.cjs
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _chunkOHEHPQLCcjs = require('../chunk-OHEHPQLC.cjs');
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
|
|
@@ -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 = _chunkOHEHPQLCcjs.XAUIProvider; exports.buildRadius = _chunkOHEHPQLCcjs.buildRadius; exports.buildShadows = _chunkOHEHPQLCcjs.buildShadows; exports.createTheme = _chunkOHEHPQLCcjs.createTheme; exports.defaultTheme = _chunkOHEHPQLCcjs.defaultTheme; exports.deriveColors = _chunkOHEHPQLCcjs.deriveColors; exports.deriveTint = _chunk57SJ4LJFcjs.deriveTint; exports.palette = _chunkOHEHPQLCcjs.palette; exports.primitives = _chunkOHEHPQLCcjs.primitives; exports.sourceKeys = _chunkOHEHPQLCcjs.sourceKeys; exports.tokens = _chunkOHEHPQLCcjs.tokens; exports.useColorMode = _chunk57SJ4LJFcjs.useColorMode; exports.useThemeColor = _chunk57SJ4LJFcjs.useThemeColor; exports.useXAUITheme = _chunk57SJ4LJFcjs.useXAUITheme;
|
package/dist/theme/index.js
CHANGED
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.26",
|
|
4
4
|
"description": "Composition-first React Native UI components with native animations powered by Reanimated",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react-native",
|
|
@@ -77,6 +77,16 @@
|
|
|
77
77
|
"default": "./dist/components/input/index.cjs"
|
|
78
78
|
}
|
|
79
79
|
},
|
|
80
|
+
"./input-group": {
|
|
81
|
+
"import": {
|
|
82
|
+
"types": "./dist/components/input-group/index.d.ts",
|
|
83
|
+
"default": "./dist/components/input-group/index.js"
|
|
84
|
+
},
|
|
85
|
+
"require": {
|
|
86
|
+
"types": "./dist/components/input-group/index.d.cts",
|
|
87
|
+
"default": "./dist/components/input-group/index.cjs"
|
|
88
|
+
}
|
|
89
|
+
},
|
|
80
90
|
"./input-otp": {
|
|
81
91
|
"import": {
|
|
82
92
|
"types": "./dist/components/input-otp/index.d.ts",
|
|
@@ -87,6 +97,16 @@
|
|
|
87
97
|
"default": "./dist/components/input-otp/index.cjs"
|
|
88
98
|
}
|
|
89
99
|
},
|
|
100
|
+
"./text-area": {
|
|
101
|
+
"import": {
|
|
102
|
+
"types": "./dist/components/text-area/index.d.ts",
|
|
103
|
+
"default": "./dist/components/text-area/index.js"
|
|
104
|
+
},
|
|
105
|
+
"require": {
|
|
106
|
+
"types": "./dist/components/text-area/index.d.cts",
|
|
107
|
+
"default": "./dist/components/text-area/index.cjs"
|
|
108
|
+
}
|
|
109
|
+
},
|
|
90
110
|
"./typography": {
|
|
91
111
|
"import": {
|
|
92
112
|
"types": "./dist/components/typography/index.d.ts",
|
|
@@ -2,13 +2,13 @@ import {
|
|
|
2
2
|
CloseButton,
|
|
3
3
|
closeButtonBase
|
|
4
4
|
} from "./chunk-A4RGJBP2.js";
|
|
5
|
-
import {
|
|
6
|
-
Icon
|
|
7
|
-
} from "./chunk-ICR42HHG.js";
|
|
8
5
|
import {
|
|
9
6
|
PressableFeedback,
|
|
10
7
|
usePressState
|
|
11
8
|
} from "./chunk-4HELPMAK.js";
|
|
9
|
+
import {
|
|
10
|
+
Icon
|
|
11
|
+
} from "./chunk-ICR42HHG.js";
|
|
12
12
|
import {
|
|
13
13
|
warnDev
|
|
14
14
|
} from "./chunk-EGLLDKN6.js";
|
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
var _chunkJ2JJLKLGcjs = require('./chunk-J2JJLKLG.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var _chunkB4W2XNBPcjs = require('./chunk-B4W2XNBP.cjs');
|
|
8
7
|
|
|
8
|
+
var _chunkIG4Q3WQOcjs = require('./chunk-IG4Q3WQO.cjs');
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var _chunkB4W2XNBPcjs = require('./chunk-B4W2XNBP.cjs');
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
var _chunkEJQCQPETcjs = require('./chunk-EJQCQPET.cjs');
|