@xaui/native 0.9.1-alpha.21 → 0.9.1-alpha.23
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-RMLFMRWL.js → chunk-2U6JR7BF.js} +5 -5
- package/dist/{chunk-N7C4UNUL.js → chunk-3JATAB7S.js} +23 -1
- package/dist/chunk-4MHJOWM4.cjs +364 -0
- package/dist/{chunk-2WMVDMFV.cjs → chunk-6HXWQ5AU.cjs} +2 -2
- package/dist/chunk-6WW4CSPY.cjs +82 -0
- package/dist/chunk-AHL33YAO.js +425 -0
- package/dist/{chunk-XHZBXYVU.js → chunk-AKXG43S4.js} +1 -1
- package/dist/{chunk-4NE3SLTM.cjs → chunk-BH5DSJVX.cjs} +102 -73
- package/dist/{chunk-BPBY7ON7.cjs → chunk-BNWS26PX.cjs} +19 -21
- package/dist/{chunk-5LC6KVL3.cjs → chunk-DXGQ43IV.cjs} +3 -3
- package/dist/chunk-E3LXUXE7.js +451 -0
- package/dist/{chunk-ISVUXVFL.js → chunk-FNQF4KQV.js} +19 -71
- package/dist/{chunk-YRCUALUQ.js → chunk-FTCTTBLG.js} +7 -9
- package/dist/{chunk-JL27KVRT.js → chunk-FVP5FUVS.js} +3 -3
- package/dist/{chunk-UL263KGM.cjs → chunk-GBPWTFTU.cjs} +10 -10
- package/dist/{chunk-TUJBDS5M.js → chunk-GG2WWCBK.js} +10 -10
- package/dist/{chunk-EVXZGNPA.cjs → chunk-HUZ4AUM2.cjs} +98 -98
- package/dist/chunk-I6PE5UUH.cjs +425 -0
- package/dist/{chunk-33QILJJH.cjs → chunk-IBEX4XGV.cjs} +11 -11
- package/dist/{chunk-IBRVMLUF.js → chunk-KM2TI5IC.js} +107 -80
- package/dist/chunk-OGC4RKE3.js +364 -0
- package/dist/{chunk-JXLRHKCQ.js → chunk-OYZYWWJ6.js} +1 -1
- package/dist/{chunk-EXX6ATAS.js → chunk-PMO62QK4.js} +101 -101
- package/dist/{chunk-UBA6AEY6.cjs → chunk-RAWOJ3N3.cjs} +8 -8
- package/dist/chunk-TIP3T7JJ.cjs +451 -0
- package/dist/{chunk-APCBIHLR.cjs → chunk-VDRRD6GM.cjs} +29 -81
- package/dist/{chunk-UVO4GFSW.cjs → chunk-YXVKQMCK.cjs} +23 -1
- package/dist/chunk-ZQ3JSWRO.js +82 -0
- package/dist/close-button.type-BUYuoSt2.d.ts +36 -0
- package/dist/close-button.type-CHsgZ3wO.d.cts +36 -0
- package/dist/components/alert/index.cjs +17 -0
- package/dist/components/alert/index.d.cts +169 -0
- package/dist/components/alert/index.d.ts +169 -0
- package/dist/components/alert/index.js +17 -0
- package/dist/components/button/index.cjs +6 -7
- package/dist/components/button/index.d.cts +74 -125
- package/dist/components/button/index.d.ts +74 -125
- package/dist/components/button/index.js +5 -6
- package/dist/components/card/index.cjs +5 -6
- package/dist/components/card/index.d.cts +74 -74
- package/dist/components/card/index.d.ts +74 -74
- package/dist/components/card/index.js +4 -5
- package/dist/components/chip/index.cjs +17 -0
- package/dist/components/chip/index.d.cts +608 -0
- package/dist/components/chip/index.d.ts +608 -0
- package/dist/components/chip/index.js +17 -0
- package/dist/components/input/index.cjs +14 -0
- package/dist/components/input/index.d.cts +213 -0
- package/dist/components/input/index.d.ts +213 -0
- package/dist/components/input/index.js +14 -0
- package/dist/components/typography/index.cjs +4 -4
- package/dist/components/typography/index.d.cts +4 -4
- package/dist/components/typography/index.d.ts +4 -4
- package/dist/components/typography/index.js +3 -3
- package/dist/components/view/index.cjs +3 -3
- package/dist/components/view/index.d.cts +7 -7
- package/dist/components/view/index.d.ts +7 -7
- package/dist/components/view/index.js +2 -2
- package/dist/{create-recipe-CC3NNCqF.d.ts → create-recipe-C4JkINrA.d.ts} +18 -5
- package/dist/{create-recipe-CPBFg7ym.d.cts → create-recipe-dBN_ewZc.d.cts} +18 -5
- package/dist/{icon.type-Cs1tMX0W.d.cts → icon.type-CF4KiMKl.d.cts} +1 -1
- package/dist/{icon.type-BkcEPJbK.d.ts → icon.type-Dq4_qePa.d.ts} +1 -1
- package/dist/index.cjs +44 -14
- package/dist/index.d.cts +9 -5
- package/dist/index.d.ts +9 -5
- package/dist/index.js +74 -44
- package/dist/{pressable-feedback.type-wfeiJz5m.d.cts → pressable-feedback.type-BA2C9sSz.d.cts} +1 -1
- package/dist/{pressable-feedback.type-DsvWZXWC.d.ts → pressable-feedback.type-Bs4dQlGj.d.ts} +1 -1
- package/dist/{style-props.type-B1BG5TCm.d.cts → style-props.type-CfnoGEP7.d.cts} +1 -1
- package/dist/{style-props.type-B1BG5TCm.d.ts → style-props.type-CfnoGEP7.d.ts} +1 -1
- package/dist/system/index.cjs +15 -7
- package/dist/system/index.d.cts +175 -101
- package/dist/system/index.d.ts +175 -101
- package/dist/system/index.js +15 -7
- package/dist/theme/index.cjs +2 -2
- package/dist/theme/index.d.cts +10 -10
- package/dist/theme/index.d.ts +10 -10
- package/dist/theme/index.js +1 -1
- package/package.json +31 -1
- package/dist/chunk-RRRGLRRP.cjs +0 -28
- package/dist/chunk-SGHP76GU.js +0 -28
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
import * as react_native from 'react-native';
|
|
4
|
+
import { StyleProp, TextStyle, TextInputProps, TextProps, ViewStyle, ViewProps } from 'react-native';
|
|
5
|
+
import { T as TextStyleProps, V as ViewStyleProps } from '../../style-props.type-CfnoGEP7.cjs';
|
|
6
|
+
import { S as Size, R as RadiusKey, X as XAUITheme } from '../../theme.type-C2gNHpEx.cjs';
|
|
7
|
+
import { R as Recipe, g as SlotStyles, j as StyleFn } from '../../create-recipe-dBN_ewZc.cjs';
|
|
8
|
+
|
|
9
|
+
type InputSlot = 'root' | 'label' | 'field' | 'placeholder' | 'description' | 'error';
|
|
10
|
+
/**
|
|
11
|
+
* The library's four emphasis levels, narrowed like the `Card`'s (§1 bis). A field
|
|
12
|
+
* **reports nothing** — an error is `isInvalid`, which is a state and not a variant — so
|
|
13
|
+
* `success`, `warning` and `danger` are absent here for the same reason they are there.
|
|
14
|
+
*
|
|
15
|
+
* This is where the theme's `field*` family is finally read, and the four names split
|
|
16
|
+
* HeroUI's two-name `primary | secondary` by saying what each of their ends already is:
|
|
17
|
+
*
|
|
18
|
+
* - **`primary`** — the `fieldBackground` fill plus the theme's `field` shadow. HeroUI's
|
|
19
|
+
* `primary`, with the elevation their flat token only implies.
|
|
20
|
+
* - **`secondary`** — the neutral `default` fill. HeroUI's `secondary`, and the default
|
|
21
|
+
* here: on a plain background a white field is its border and nothing else, while on a
|
|
22
|
+
* card the `fieldBackground` token *is* the card's own colour.
|
|
23
|
+
* - **`tertiary`** — the border alone, no fill. The same drop the `Button`'s `tertiary`
|
|
24
|
+
* makes.
|
|
25
|
+
* - **`ghost`** — neither. A bare field for a toolbar or an inline edit; it has no border
|
|
26
|
+
* to move, so its focus shows in the caret alone.
|
|
27
|
+
*
|
|
28
|
+
* The first three name the `fieldBorder` edge and `ghost` gives it up. Its width is the
|
|
29
|
+
* theme's `borderWidth.field` — HeroUI's `--field-border-width`, which they ship at `0`
|
|
30
|
+
* and we ship at `1`. That is the one shipped default where the two differ;
|
|
31
|
+
* `createTheme({ borderWidth: { field: 0 } })` reproduces theirs.
|
|
32
|
+
*/
|
|
33
|
+
type InputVariant = 'primary' | 'secondary' | 'tertiary' | 'ghost';
|
|
34
|
+
/**
|
|
35
|
+
* Where the label sits relative to the field's box.
|
|
36
|
+
*
|
|
37
|
+
* `outside` is the label above the box, in the column's flow. `inside` lifts it into the
|
|
38
|
+
* box, above the text — the label is taken **out of flow** and placed against the box's
|
|
39
|
+
* own padding, so the JSX is identical either way and nothing is reparented (R4).
|
|
40
|
+
*
|
|
41
|
+
* Because the inside label positions itself against the top of the root, it assumes the
|
|
42
|
+
* field is the first thing in the column's flow: write `Input.Description` and
|
|
43
|
+
* `Input.Error` after the field, which is where they belong anyway.
|
|
44
|
+
*/
|
|
45
|
+
type InputLabelPlacement = 'outside' | 'inside';
|
|
46
|
+
type InputSize = Size;
|
|
47
|
+
/**
|
|
48
|
+
* What the `Input` itself understands. R14 — a name in here is the component's, so the
|
|
49
|
+
* style prop that shares it is not exposed: `size` is the field's scale and never
|
|
50
|
+
* `ViewStyle`'s, and `color` is R7's tint.
|
|
51
|
+
*/
|
|
52
|
+
type InputOwnProps = {
|
|
53
|
+
variant?: InputVariant;
|
|
54
|
+
/** The field's height, its padding, the gaps and the type. Never width. */
|
|
55
|
+
size?: InputSize;
|
|
56
|
+
/** Overrides the `field` radius the theme chose for every size. */
|
|
57
|
+
radius?: RadiusKey;
|
|
58
|
+
/** Above the box, or lifted into it. @default 'outside' */
|
|
59
|
+
labelPlacement?: InputLabelPlacement;
|
|
60
|
+
/**
|
|
61
|
+
* A raw tint (`'#7c3aed'`), never a token (R7). It lands where the variant put its
|
|
62
|
+
* tokens — the fill of a `default`, the border of a `tertiary` — and, because the focus
|
|
63
|
+
* colour is a role like any other, it is also what the field borders on focus.
|
|
64
|
+
*/
|
|
65
|
+
color?: string;
|
|
66
|
+
/**
|
|
67
|
+
* Paints the border, the label and the description in `danger`, and takes the focus
|
|
68
|
+
* treatment off: an error outranks focus, and a field that is both should read as
|
|
69
|
+
* wrong rather than as busy.
|
|
70
|
+
*
|
|
71
|
+
* It does **not** mount or unmount `Input.Error`. That stays the caller's — a slot that
|
|
72
|
+
* silently renders nothing is a slot you cannot debug.
|
|
73
|
+
*/
|
|
74
|
+
isInvalid?: boolean;
|
|
75
|
+
/** Dims the field and makes it uneditable. */
|
|
76
|
+
isDisabled?: boolean;
|
|
77
|
+
style?: StyleProp<ViewStyle>;
|
|
78
|
+
children?: ReactNode;
|
|
79
|
+
};
|
|
80
|
+
/**
|
|
81
|
+
* R14 — the input's own props, the wrapper `View`'s, and every `ViewStyle` key neither
|
|
82
|
+
* already claims. **`TextInputProps` are not here**: they belong to `Input.Field`, which
|
|
83
|
+
* is the node that has them.
|
|
84
|
+
*/
|
|
85
|
+
type InputProps = InputOwnProps & Omit<ViewProps, keyof InputOwnProps> & Omit<ViewStyleProps, keyof InputOwnProps | keyof ViewProps> & {
|
|
86
|
+
/** R12 — merge into the single child instead of rendering a `View`. */
|
|
87
|
+
asChild?: boolean;
|
|
88
|
+
};
|
|
89
|
+
/**
|
|
90
|
+
* Everything `TextInput` accepts, plus the `TextStyle` keys as props (R14).
|
|
91
|
+
*
|
|
92
|
+
* `editable` is absent: it is `disabled` under another name, and R8 keeps that off the
|
|
93
|
+
* public surface — `isDisabled` on the root is what stops the field.
|
|
94
|
+
*/
|
|
95
|
+
type InputFieldProps = Omit<TextInputProps, 'editable'> & Omit<TextStyleProps, keyof TextInputProps>;
|
|
96
|
+
/** `Text`'s own props win over the `TextStyle` keys of the same name (R14). */
|
|
97
|
+
type InputTextProps = TextProps & Omit<TextStyleProps, keyof TextProps> & {
|
|
98
|
+
children?: ReactNode;
|
|
99
|
+
};
|
|
100
|
+
type InputLabelProps = InputTextProps;
|
|
101
|
+
type InputDescriptionProps = InputTextProps;
|
|
102
|
+
type InputErrorProps = InputTextProps;
|
|
103
|
+
/**
|
|
104
|
+
* Read off `TextInput`'s own props rather than spelled out: React Native has renamed the
|
|
105
|
+
* payload of these two more than once, and a hand-written `NativeSyntheticEvent<…>` here
|
|
106
|
+
* would be a second declaration free to drift from the node that actually fires them.
|
|
107
|
+
*/
|
|
108
|
+
type FieldFocusEvent = Parameters<NonNullable<TextInputProps['onFocus']>>[0];
|
|
109
|
+
type FieldBlurEvent = Parameters<NonNullable<TextInputProps['onBlur']>>[0];
|
|
110
|
+
/**
|
|
111
|
+
* R5 — resolved styles, not props for a slot to resolve a second time. Each entry is the
|
|
112
|
+
* cached `StyleSheet` reference with the uncached tint pass layered over it, so a slot
|
|
113
|
+
* merges its own `style` on top and does no work of its own.
|
|
114
|
+
*/
|
|
115
|
+
type InputContextValue = {
|
|
116
|
+
labelStyle: StyleProp<TextStyle>;
|
|
117
|
+
fieldStyle: StyleProp<TextStyle>;
|
|
118
|
+
descriptionStyle: StyleProp<TextStyle>;
|
|
119
|
+
errorStyle: StyleProp<TextStyle>;
|
|
120
|
+
/**
|
|
121
|
+
* A value and not a style: `placeholderTextColor` is a `TextInput` prop, so the root
|
|
122
|
+
* flattens its placeholder slot once here rather than in the field.
|
|
123
|
+
*/
|
|
124
|
+
placeholderTextColor?: string;
|
|
125
|
+
/**
|
|
126
|
+
* The focus state lives on the **root**, because the root's recipe resolves on it (R5)
|
|
127
|
+
* and it needs the value before it renders — but the node that hears the event is
|
|
128
|
+
* `Input.Field`, three levels down. These are how it reports back. Their identity is
|
|
129
|
+
* stable, so publishing them costs no re-render of a memoized slot.
|
|
130
|
+
*/
|
|
131
|
+
onFieldFocus: (event: FieldFocusEvent) => void;
|
|
132
|
+
onFieldBlur: (event: FieldBlurEvent) => void;
|
|
133
|
+
/**
|
|
134
|
+
* The id the label carries and the field points at, so a screen reader reads "Courriel,
|
|
135
|
+
* champ de saisie" rather than just the placeholder.
|
|
136
|
+
*/
|
|
137
|
+
labelId: string;
|
|
138
|
+
descriptionId: string;
|
|
139
|
+
isDisabled: boolean;
|
|
140
|
+
isInvalid: boolean;
|
|
141
|
+
};
|
|
142
|
+
|
|
143
|
+
declare const useInput: () => InputContextValue;
|
|
144
|
+
|
|
145
|
+
declare const inputRecipe: Recipe<"label" | "field" | "description" | "root" | "placeholder" | "error", InputVariant, {
|
|
146
|
+
readonly size: {
|
|
147
|
+
readonly xs: (theme: XAUITheme) => SlotStyles<InputSlot>;
|
|
148
|
+
readonly sm: (theme: XAUITheme) => SlotStyles<InputSlot>;
|
|
149
|
+
readonly md: (theme: XAUITheme) => SlotStyles<InputSlot>;
|
|
150
|
+
readonly lg: (theme: XAUITheme) => SlotStyles<InputSlot>;
|
|
151
|
+
};
|
|
152
|
+
readonly radius: Record<RadiusKey, StyleFn<"field">>;
|
|
153
|
+
/**
|
|
154
|
+
* `outside` is the base behaviour, so it adds nothing — it is declared because an
|
|
155
|
+
* axis needs both of its values for the selection to be typed, and because a reader
|
|
156
|
+
* looking for "what does outside do" should find the answer here rather than infer it
|
|
157
|
+
* from an absence. The size-dependent half of `inside` is in `compoundVariants`.
|
|
158
|
+
*/
|
|
159
|
+
readonly labelPlacement: {
|
|
160
|
+
readonly outside: () => {};
|
|
161
|
+
readonly inside: () => {};
|
|
162
|
+
};
|
|
163
|
+
readonly isInvalid: {
|
|
164
|
+
readonly true: (theme: XAUITheme) => {
|
|
165
|
+
field: {
|
|
166
|
+
borderColor: string;
|
|
167
|
+
};
|
|
168
|
+
label: {
|
|
169
|
+
color: string;
|
|
170
|
+
};
|
|
171
|
+
description: {
|
|
172
|
+
color: string;
|
|
173
|
+
};
|
|
174
|
+
};
|
|
175
|
+
};
|
|
176
|
+
}>;
|
|
177
|
+
|
|
178
|
+
declare const Input: react.ForwardRefExoticComponent<{
|
|
179
|
+
variant?: InputVariant;
|
|
180
|
+
size?: InputSize;
|
|
181
|
+
radius?: RadiusKey;
|
|
182
|
+
labelPlacement?: InputLabelPlacement;
|
|
183
|
+
color?: string;
|
|
184
|
+
isInvalid?: boolean;
|
|
185
|
+
isDisabled?: boolean;
|
|
186
|
+
style?: react_native.StyleProp<react_native.ViewStyle>;
|
|
187
|
+
children?: react.ReactNode;
|
|
188
|
+
} & Omit<react_native.ViewProps, keyof {
|
|
189
|
+
variant?: InputVariant;
|
|
190
|
+
size?: InputSize;
|
|
191
|
+
radius?: RadiusKey;
|
|
192
|
+
labelPlacement?: InputLabelPlacement;
|
|
193
|
+
color?: string;
|
|
194
|
+
isInvalid?: boolean;
|
|
195
|
+
isDisabled?: boolean;
|
|
196
|
+
style?: react_native.StyleProp<react_native.ViewStyle>;
|
|
197
|
+
children?: react.ReactNode;
|
|
198
|
+
}> & Omit<ViewStyleProps, "color" | "pointerEvents" | "style" | "children" | "hitSlop" | "id" | "needsOffscreenAlphaCompositing" | "onLayout" | "removeClippedSubviews" | "testID" | "nativeID" | "collapsable" | "collapsableChildren" | "onBlur" | "onFocus" | "renderToHardwareTextureAndroid" | "focusable" | "tabIndex" | "shouldRasterizeIOS" | "isTVSelectable" | "hasTVPreferredFocus" | "tvParallaxShiftDistanceX" | "tvParallaxShiftDistanceY" | "tvParallaxTiltAngle" | "tvParallaxMagnification" | "onStartShouldSetResponder" | "onMoveShouldSetResponder" | "onResponderEnd" | "onResponderGrant" | "onResponderReject" | "onResponderMove" | "onResponderRelease" | "onResponderStart" | "onResponderTerminationRequest" | "onResponderTerminate" | "onStartShouldSetResponderCapture" | "onMoveShouldSetResponderCapture" | "onTouchStart" | "onTouchMove" | "onTouchEnd" | "onTouchCancel" | "onTouchEndCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerUp" | "onPointerUpCapture" | "accessible" | "accessibilityActions" | "accessibilityLabel" | "aria-label" | "accessibilityRole" | "accessibilityState" | "aria-busy" | "aria-checked" | "aria-disabled" | "aria-expanded" | "aria-selected" | "accessibilityHint" | "accessibilityValue" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "onAccessibilityAction" | "importantForAccessibility" | "aria-hidden" | "aria-modal" | "role" | "accessibilityLabelledBy" | "aria-labelledby" | "accessibilityLiveRegion" | "aria-live" | "screenReaderFocusable" | "accessibilityElementsHidden" | "accessibilityViewIsModal" | "onAccessibilityEscape" | "onAccessibilityTap" | "onMagicTap" | "accessibilityIgnoresInvertColors" | "accessibilityLanguage" | "accessibilityShowsLargeContentViewer" | "accessibilityLargeContentTitle" | "accessibilityRespondsToUserInteraction" | "isDisabled" | "radius" | "size" | "variant" | "labelPlacement" | "isInvalid"> & {
|
|
199
|
+
asChild?: boolean;
|
|
200
|
+
} & react.RefAttributes<react_native.View>> & {
|
|
201
|
+
Label: react.ForwardRefExoticComponent<react_native.TextProps & Omit<TextStyleProps, keyof react_native.TextProps> & {
|
|
202
|
+
children?: react.ReactNode;
|
|
203
|
+
} & react.RefAttributes<react_native.Text>>;
|
|
204
|
+
Field: react.ForwardRefExoticComponent<Omit<react_native.TextInputProps, "editable"> & Omit<TextStyleProps, keyof react_native.TextInputProps> & react.RefAttributes<react_native.TextInput>>;
|
|
205
|
+
Description: react.ForwardRefExoticComponent<react_native.TextProps & Omit<TextStyleProps, keyof react_native.TextProps> & {
|
|
206
|
+
children?: react.ReactNode;
|
|
207
|
+
} & react.RefAttributes<react_native.Text>>;
|
|
208
|
+
Error: react.ForwardRefExoticComponent<react_native.TextProps & Omit<TextStyleProps, keyof react_native.TextProps> & {
|
|
209
|
+
children?: react.ReactNode;
|
|
210
|
+
} & react.RefAttributes<react_native.Text>>;
|
|
211
|
+
};
|
|
212
|
+
|
|
213
|
+
export { Input, type InputContextValue, type InputDescriptionProps, type InputErrorProps, type InputFieldProps, type InputLabelPlacement, type InputLabelProps, type InputProps, type InputSize, type InputSlot, type InputVariant, inputRecipe, useInput };
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
import * as react_native from 'react-native';
|
|
4
|
+
import { StyleProp, TextStyle, TextInputProps, TextProps, ViewStyle, ViewProps } from 'react-native';
|
|
5
|
+
import { T as TextStyleProps, V as ViewStyleProps } from '../../style-props.type-CfnoGEP7.js';
|
|
6
|
+
import { S as Size, R as RadiusKey, X as XAUITheme } from '../../theme.type-C2gNHpEx.js';
|
|
7
|
+
import { R as Recipe, g as SlotStyles, j as StyleFn } from '../../create-recipe-C4JkINrA.js';
|
|
8
|
+
|
|
9
|
+
type InputSlot = 'root' | 'label' | 'field' | 'placeholder' | 'description' | 'error';
|
|
10
|
+
/**
|
|
11
|
+
* The library's four emphasis levels, narrowed like the `Card`'s (§1 bis). A field
|
|
12
|
+
* **reports nothing** — an error is `isInvalid`, which is a state and not a variant — so
|
|
13
|
+
* `success`, `warning` and `danger` are absent here for the same reason they are there.
|
|
14
|
+
*
|
|
15
|
+
* This is where the theme's `field*` family is finally read, and the four names split
|
|
16
|
+
* HeroUI's two-name `primary | secondary` by saying what each of their ends already is:
|
|
17
|
+
*
|
|
18
|
+
* - **`primary`** — the `fieldBackground` fill plus the theme's `field` shadow. HeroUI's
|
|
19
|
+
* `primary`, with the elevation their flat token only implies.
|
|
20
|
+
* - **`secondary`** — the neutral `default` fill. HeroUI's `secondary`, and the default
|
|
21
|
+
* here: on a plain background a white field is its border and nothing else, while on a
|
|
22
|
+
* card the `fieldBackground` token *is* the card's own colour.
|
|
23
|
+
* - **`tertiary`** — the border alone, no fill. The same drop the `Button`'s `tertiary`
|
|
24
|
+
* makes.
|
|
25
|
+
* - **`ghost`** — neither. A bare field for a toolbar or an inline edit; it has no border
|
|
26
|
+
* to move, so its focus shows in the caret alone.
|
|
27
|
+
*
|
|
28
|
+
* The first three name the `fieldBorder` edge and `ghost` gives it up. Its width is the
|
|
29
|
+
* theme's `borderWidth.field` — HeroUI's `--field-border-width`, which they ship at `0`
|
|
30
|
+
* and we ship at `1`. That is the one shipped default where the two differ;
|
|
31
|
+
* `createTheme({ borderWidth: { field: 0 } })` reproduces theirs.
|
|
32
|
+
*/
|
|
33
|
+
type InputVariant = 'primary' | 'secondary' | 'tertiary' | 'ghost';
|
|
34
|
+
/**
|
|
35
|
+
* Where the label sits relative to the field's box.
|
|
36
|
+
*
|
|
37
|
+
* `outside` is the label above the box, in the column's flow. `inside` lifts it into the
|
|
38
|
+
* box, above the text — the label is taken **out of flow** and placed against the box's
|
|
39
|
+
* own padding, so the JSX is identical either way and nothing is reparented (R4).
|
|
40
|
+
*
|
|
41
|
+
* Because the inside label positions itself against the top of the root, it assumes the
|
|
42
|
+
* field is the first thing in the column's flow: write `Input.Description` and
|
|
43
|
+
* `Input.Error` after the field, which is where they belong anyway.
|
|
44
|
+
*/
|
|
45
|
+
type InputLabelPlacement = 'outside' | 'inside';
|
|
46
|
+
type InputSize = Size;
|
|
47
|
+
/**
|
|
48
|
+
* What the `Input` itself understands. R14 — a name in here is the component's, so the
|
|
49
|
+
* style prop that shares it is not exposed: `size` is the field's scale and never
|
|
50
|
+
* `ViewStyle`'s, and `color` is R7's tint.
|
|
51
|
+
*/
|
|
52
|
+
type InputOwnProps = {
|
|
53
|
+
variant?: InputVariant;
|
|
54
|
+
/** The field's height, its padding, the gaps and the type. Never width. */
|
|
55
|
+
size?: InputSize;
|
|
56
|
+
/** Overrides the `field` radius the theme chose for every size. */
|
|
57
|
+
radius?: RadiusKey;
|
|
58
|
+
/** Above the box, or lifted into it. @default 'outside' */
|
|
59
|
+
labelPlacement?: InputLabelPlacement;
|
|
60
|
+
/**
|
|
61
|
+
* A raw tint (`'#7c3aed'`), never a token (R7). It lands where the variant put its
|
|
62
|
+
* tokens — the fill of a `default`, the border of a `tertiary` — and, because the focus
|
|
63
|
+
* colour is a role like any other, it is also what the field borders on focus.
|
|
64
|
+
*/
|
|
65
|
+
color?: string;
|
|
66
|
+
/**
|
|
67
|
+
* Paints the border, the label and the description in `danger`, and takes the focus
|
|
68
|
+
* treatment off: an error outranks focus, and a field that is both should read as
|
|
69
|
+
* wrong rather than as busy.
|
|
70
|
+
*
|
|
71
|
+
* It does **not** mount or unmount `Input.Error`. That stays the caller's — a slot that
|
|
72
|
+
* silently renders nothing is a slot you cannot debug.
|
|
73
|
+
*/
|
|
74
|
+
isInvalid?: boolean;
|
|
75
|
+
/** Dims the field and makes it uneditable. */
|
|
76
|
+
isDisabled?: boolean;
|
|
77
|
+
style?: StyleProp<ViewStyle>;
|
|
78
|
+
children?: ReactNode;
|
|
79
|
+
};
|
|
80
|
+
/**
|
|
81
|
+
* R14 — the input's own props, the wrapper `View`'s, and every `ViewStyle` key neither
|
|
82
|
+
* already claims. **`TextInputProps` are not here**: they belong to `Input.Field`, which
|
|
83
|
+
* is the node that has them.
|
|
84
|
+
*/
|
|
85
|
+
type InputProps = InputOwnProps & Omit<ViewProps, keyof InputOwnProps> & Omit<ViewStyleProps, keyof InputOwnProps | keyof ViewProps> & {
|
|
86
|
+
/** R12 — merge into the single child instead of rendering a `View`. */
|
|
87
|
+
asChild?: boolean;
|
|
88
|
+
};
|
|
89
|
+
/**
|
|
90
|
+
* Everything `TextInput` accepts, plus the `TextStyle` keys as props (R14).
|
|
91
|
+
*
|
|
92
|
+
* `editable` is absent: it is `disabled` under another name, and R8 keeps that off the
|
|
93
|
+
* public surface — `isDisabled` on the root is what stops the field.
|
|
94
|
+
*/
|
|
95
|
+
type InputFieldProps = Omit<TextInputProps, 'editable'> & Omit<TextStyleProps, keyof TextInputProps>;
|
|
96
|
+
/** `Text`'s own props win over the `TextStyle` keys of the same name (R14). */
|
|
97
|
+
type InputTextProps = TextProps & Omit<TextStyleProps, keyof TextProps> & {
|
|
98
|
+
children?: ReactNode;
|
|
99
|
+
};
|
|
100
|
+
type InputLabelProps = InputTextProps;
|
|
101
|
+
type InputDescriptionProps = InputTextProps;
|
|
102
|
+
type InputErrorProps = InputTextProps;
|
|
103
|
+
/**
|
|
104
|
+
* Read off `TextInput`'s own props rather than spelled out: React Native has renamed the
|
|
105
|
+
* payload of these two more than once, and a hand-written `NativeSyntheticEvent<…>` here
|
|
106
|
+
* would be a second declaration free to drift from the node that actually fires them.
|
|
107
|
+
*/
|
|
108
|
+
type FieldFocusEvent = Parameters<NonNullable<TextInputProps['onFocus']>>[0];
|
|
109
|
+
type FieldBlurEvent = Parameters<NonNullable<TextInputProps['onBlur']>>[0];
|
|
110
|
+
/**
|
|
111
|
+
* R5 — resolved styles, not props for a slot to resolve a second time. Each entry is the
|
|
112
|
+
* cached `StyleSheet` reference with the uncached tint pass layered over it, so a slot
|
|
113
|
+
* merges its own `style` on top and does no work of its own.
|
|
114
|
+
*/
|
|
115
|
+
type InputContextValue = {
|
|
116
|
+
labelStyle: StyleProp<TextStyle>;
|
|
117
|
+
fieldStyle: StyleProp<TextStyle>;
|
|
118
|
+
descriptionStyle: StyleProp<TextStyle>;
|
|
119
|
+
errorStyle: StyleProp<TextStyle>;
|
|
120
|
+
/**
|
|
121
|
+
* A value and not a style: `placeholderTextColor` is a `TextInput` prop, so the root
|
|
122
|
+
* flattens its placeholder slot once here rather than in the field.
|
|
123
|
+
*/
|
|
124
|
+
placeholderTextColor?: string;
|
|
125
|
+
/**
|
|
126
|
+
* The focus state lives on the **root**, because the root's recipe resolves on it (R5)
|
|
127
|
+
* and it needs the value before it renders — but the node that hears the event is
|
|
128
|
+
* `Input.Field`, three levels down. These are how it reports back. Their identity is
|
|
129
|
+
* stable, so publishing them costs no re-render of a memoized slot.
|
|
130
|
+
*/
|
|
131
|
+
onFieldFocus: (event: FieldFocusEvent) => void;
|
|
132
|
+
onFieldBlur: (event: FieldBlurEvent) => void;
|
|
133
|
+
/**
|
|
134
|
+
* The id the label carries and the field points at, so a screen reader reads "Courriel,
|
|
135
|
+
* champ de saisie" rather than just the placeholder.
|
|
136
|
+
*/
|
|
137
|
+
labelId: string;
|
|
138
|
+
descriptionId: string;
|
|
139
|
+
isDisabled: boolean;
|
|
140
|
+
isInvalid: boolean;
|
|
141
|
+
};
|
|
142
|
+
|
|
143
|
+
declare const useInput: () => InputContextValue;
|
|
144
|
+
|
|
145
|
+
declare const inputRecipe: Recipe<"label" | "field" | "description" | "root" | "placeholder" | "error", InputVariant, {
|
|
146
|
+
readonly size: {
|
|
147
|
+
readonly xs: (theme: XAUITheme) => SlotStyles<InputSlot>;
|
|
148
|
+
readonly sm: (theme: XAUITheme) => SlotStyles<InputSlot>;
|
|
149
|
+
readonly md: (theme: XAUITheme) => SlotStyles<InputSlot>;
|
|
150
|
+
readonly lg: (theme: XAUITheme) => SlotStyles<InputSlot>;
|
|
151
|
+
};
|
|
152
|
+
readonly radius: Record<RadiusKey, StyleFn<"field">>;
|
|
153
|
+
/**
|
|
154
|
+
* `outside` is the base behaviour, so it adds nothing — it is declared because an
|
|
155
|
+
* axis needs both of its values for the selection to be typed, and because a reader
|
|
156
|
+
* looking for "what does outside do" should find the answer here rather than infer it
|
|
157
|
+
* from an absence. The size-dependent half of `inside` is in `compoundVariants`.
|
|
158
|
+
*/
|
|
159
|
+
readonly labelPlacement: {
|
|
160
|
+
readonly outside: () => {};
|
|
161
|
+
readonly inside: () => {};
|
|
162
|
+
};
|
|
163
|
+
readonly isInvalid: {
|
|
164
|
+
readonly true: (theme: XAUITheme) => {
|
|
165
|
+
field: {
|
|
166
|
+
borderColor: string;
|
|
167
|
+
};
|
|
168
|
+
label: {
|
|
169
|
+
color: string;
|
|
170
|
+
};
|
|
171
|
+
description: {
|
|
172
|
+
color: string;
|
|
173
|
+
};
|
|
174
|
+
};
|
|
175
|
+
};
|
|
176
|
+
}>;
|
|
177
|
+
|
|
178
|
+
declare const Input: react.ForwardRefExoticComponent<{
|
|
179
|
+
variant?: InputVariant;
|
|
180
|
+
size?: InputSize;
|
|
181
|
+
radius?: RadiusKey;
|
|
182
|
+
labelPlacement?: InputLabelPlacement;
|
|
183
|
+
color?: string;
|
|
184
|
+
isInvalid?: boolean;
|
|
185
|
+
isDisabled?: boolean;
|
|
186
|
+
style?: react_native.StyleProp<react_native.ViewStyle>;
|
|
187
|
+
children?: react.ReactNode;
|
|
188
|
+
} & Omit<react_native.ViewProps, keyof {
|
|
189
|
+
variant?: InputVariant;
|
|
190
|
+
size?: InputSize;
|
|
191
|
+
radius?: RadiusKey;
|
|
192
|
+
labelPlacement?: InputLabelPlacement;
|
|
193
|
+
color?: string;
|
|
194
|
+
isInvalid?: boolean;
|
|
195
|
+
isDisabled?: boolean;
|
|
196
|
+
style?: react_native.StyleProp<react_native.ViewStyle>;
|
|
197
|
+
children?: react.ReactNode;
|
|
198
|
+
}> & Omit<ViewStyleProps, "color" | "pointerEvents" | "style" | "children" | "hitSlop" | "id" | "needsOffscreenAlphaCompositing" | "onLayout" | "removeClippedSubviews" | "testID" | "nativeID" | "collapsable" | "collapsableChildren" | "onBlur" | "onFocus" | "renderToHardwareTextureAndroid" | "focusable" | "tabIndex" | "shouldRasterizeIOS" | "isTVSelectable" | "hasTVPreferredFocus" | "tvParallaxShiftDistanceX" | "tvParallaxShiftDistanceY" | "tvParallaxTiltAngle" | "tvParallaxMagnification" | "onStartShouldSetResponder" | "onMoveShouldSetResponder" | "onResponderEnd" | "onResponderGrant" | "onResponderReject" | "onResponderMove" | "onResponderRelease" | "onResponderStart" | "onResponderTerminationRequest" | "onResponderTerminate" | "onStartShouldSetResponderCapture" | "onMoveShouldSetResponderCapture" | "onTouchStart" | "onTouchMove" | "onTouchEnd" | "onTouchCancel" | "onTouchEndCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerUp" | "onPointerUpCapture" | "accessible" | "accessibilityActions" | "accessibilityLabel" | "aria-label" | "accessibilityRole" | "accessibilityState" | "aria-busy" | "aria-checked" | "aria-disabled" | "aria-expanded" | "aria-selected" | "accessibilityHint" | "accessibilityValue" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "onAccessibilityAction" | "importantForAccessibility" | "aria-hidden" | "aria-modal" | "role" | "accessibilityLabelledBy" | "aria-labelledby" | "accessibilityLiveRegion" | "aria-live" | "screenReaderFocusable" | "accessibilityElementsHidden" | "accessibilityViewIsModal" | "onAccessibilityEscape" | "onAccessibilityTap" | "onMagicTap" | "accessibilityIgnoresInvertColors" | "accessibilityLanguage" | "accessibilityShowsLargeContentViewer" | "accessibilityLargeContentTitle" | "accessibilityRespondsToUserInteraction" | "isDisabled" | "radius" | "size" | "variant" | "labelPlacement" | "isInvalid"> & {
|
|
199
|
+
asChild?: boolean;
|
|
200
|
+
} & react.RefAttributes<react_native.View>> & {
|
|
201
|
+
Label: react.ForwardRefExoticComponent<react_native.TextProps & Omit<TextStyleProps, keyof react_native.TextProps> & {
|
|
202
|
+
children?: react.ReactNode;
|
|
203
|
+
} & react.RefAttributes<react_native.Text>>;
|
|
204
|
+
Field: react.ForwardRefExoticComponent<Omit<react_native.TextInputProps, "editable"> & Omit<TextStyleProps, keyof react_native.TextInputProps> & react.RefAttributes<react_native.TextInput>>;
|
|
205
|
+
Description: react.ForwardRefExoticComponent<react_native.TextProps & Omit<TextStyleProps, keyof react_native.TextProps> & {
|
|
206
|
+
children?: react.ReactNode;
|
|
207
|
+
} & react.RefAttributes<react_native.Text>>;
|
|
208
|
+
Error: react.ForwardRefExoticComponent<react_native.TextProps & Omit<TextStyleProps, keyof react_native.TextProps> & {
|
|
209
|
+
children?: react.ReactNode;
|
|
210
|
+
} & react.RefAttributes<react_native.Text>>;
|
|
211
|
+
};
|
|
212
|
+
|
|
213
|
+
export { Input, type InputContextValue, type InputDescriptionProps, type InputErrorProps, type InputFieldProps, type InputLabelPlacement, type InputLabelProps, type InputProps, type InputSize, type InputSlot, type InputVariant, inputRecipe, useInput };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Input,
|
|
3
|
+
inputRecipe,
|
|
4
|
+
useInput
|
|
5
|
+
} from "../../chunk-E3LXUXE7.js";
|
|
6
|
+
import "../../chunk-3JATAB7S.js";
|
|
7
|
+
import "../../chunk-A3EGFI6T.js";
|
|
8
|
+
import "../../chunk-PMO62QK4.js";
|
|
9
|
+
import "../../chunk-GGW42MY4.js";
|
|
10
|
+
export {
|
|
11
|
+
Input,
|
|
12
|
+
inputRecipe,
|
|
13
|
+
useInput
|
|
14
|
+
};
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
6
|
-
require('../../chunk-
|
|
7
|
-
require('../../chunk-EVXZGNPA.cjs');
|
|
5
|
+
var _chunkRAWOJ3N3cjs = require('../../chunk-RAWOJ3N3.cjs');
|
|
6
|
+
require('../../chunk-YXVKQMCK.cjs');
|
|
8
7
|
require('../../chunk-57SJ4LJF.cjs');
|
|
8
|
+
require('../../chunk-HUZ4AUM2.cjs');
|
|
9
9
|
require('../../chunk-MC7SY2QH.cjs');
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
exports.TextSpan =
|
|
14
|
+
exports.TextSpan = _chunkRAWOJ3N3cjs.TextSpan; exports.Typography = _chunkRAWOJ3N3cjs.Typography; exports.typographyRecipe = _chunkRAWOJ3N3cjs.typographyRecipe;
|
|
@@ -2,8 +2,8 @@ import * as react from 'react';
|
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
3
|
import * as react_native from 'react-native';
|
|
4
4
|
import { TextProps, StyleProp, TextStyle, Text } from 'react-native';
|
|
5
|
-
import { T as TextStyleProps } from '../../style-props.type-
|
|
6
|
-
import { R as Recipe } from '../../create-recipe-
|
|
5
|
+
import { T as TextStyleProps } from '../../style-props.type-CfnoGEP7.cjs';
|
|
6
|
+
import { R as Recipe } from '../../create-recipe-dBN_ewZc.cjs';
|
|
7
7
|
import { X as XAUITheme } from '../../theme.type-C2gNHpEx.cjs';
|
|
8
8
|
|
|
9
9
|
/**
|
|
@@ -76,7 +76,7 @@ declare const Typography: react.ForwardRefExoticComponent<Omit<react_native.Text
|
|
|
76
76
|
asChild?: boolean;
|
|
77
77
|
style?: react_native.StyleProp<react_native.TextStyle>;
|
|
78
78
|
children?: react.ReactNode;
|
|
79
|
-
} & Omit<TextStyleProps, "color" | "pointerEvents" | "style" | "children" | "id" | "onLayout" | "testID" | "nativeID" | "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" | "
|
|
79
|
+
} & Omit<TextStyleProps, "color" | "pointerEvents" | "disabled" | "style" | "children" | "id" | "onLayout" | "testID" | "nativeID" | "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" | "onPress" | "onPressIn" | "onPressOut" | "onLongPress" | "pressRetentionOffset" | "asChild" | "variant" | "allowFontScaling" | "ellipsizeMode" | "lineBreakMode" | "numberOfLines" | "onTextLayout" | "maxFontSizeMultiplier" | "minimumFontScale" | "adjustsFontSizeToFit" | "dynamicTypeRamp" | "suppressHighlighting" | "lineBreakStrategyIOS" | "selectable" | "selectionColor" | "textBreakStrategy" | "dataDetectorType" | "android_hyphenationFrequency"> & react.RefAttributes<Text>>;
|
|
80
80
|
|
|
81
81
|
/**
|
|
82
82
|
* A fragment of text, styled apart from the text around it.
|
|
@@ -101,7 +101,7 @@ declare const TextSpan: react.ForwardRefExoticComponent<Omit<react_native.TextPr
|
|
|
101
101
|
asChild?: boolean;
|
|
102
102
|
style?: react_native.StyleProp<react_native.TextStyle>;
|
|
103
103
|
children?: react.ReactNode;
|
|
104
|
-
} & Omit<TextStyleProps, "pointerEvents" | "style" | "children" | "id" | "onLayout" | "testID" | "nativeID" | "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" | "
|
|
104
|
+
} & Omit<TextStyleProps, "pointerEvents" | "disabled" | "style" | "children" | "id" | "onLayout" | "testID" | "nativeID" | "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" | "onPress" | "onPressIn" | "onPressOut" | "onLongPress" | "pressRetentionOffset" | "asChild" | "allowFontScaling" | "ellipsizeMode" | "lineBreakMode" | "numberOfLines" | "onTextLayout" | "maxFontSizeMultiplier" | "minimumFontScale" | "adjustsFontSizeToFit" | "dynamicTypeRamp" | "suppressHighlighting" | "lineBreakStrategyIOS" | "selectable" | "selectionColor" | "textBreakStrategy" | "dataDetectorType" | "android_hyphenationFrequency"> & react.RefAttributes<Text>>;
|
|
105
105
|
|
|
106
106
|
/** Every role produces the same one slot, so the recipe's style functions share a shape. */
|
|
107
107
|
type StyleFn = (theme: XAUITheme) => Record<TypographySlot, TextStyle>;
|
|
@@ -2,8 +2,8 @@ import * as react from 'react';
|
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
3
|
import * as react_native from 'react-native';
|
|
4
4
|
import { TextProps, StyleProp, TextStyle, Text } from 'react-native';
|
|
5
|
-
import { T as TextStyleProps } from '../../style-props.type-
|
|
6
|
-
import { R as Recipe } from '../../create-recipe-
|
|
5
|
+
import { T as TextStyleProps } from '../../style-props.type-CfnoGEP7.js';
|
|
6
|
+
import { R as Recipe } from '../../create-recipe-C4JkINrA.js';
|
|
7
7
|
import { X as XAUITheme } from '../../theme.type-C2gNHpEx.js';
|
|
8
8
|
|
|
9
9
|
/**
|
|
@@ -76,7 +76,7 @@ declare const Typography: react.ForwardRefExoticComponent<Omit<react_native.Text
|
|
|
76
76
|
asChild?: boolean;
|
|
77
77
|
style?: react_native.StyleProp<react_native.TextStyle>;
|
|
78
78
|
children?: react.ReactNode;
|
|
79
|
-
} & Omit<TextStyleProps, "color" | "pointerEvents" | "style" | "children" | "id" | "onLayout" | "testID" | "nativeID" | "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" | "
|
|
79
|
+
} & Omit<TextStyleProps, "color" | "pointerEvents" | "disabled" | "style" | "children" | "id" | "onLayout" | "testID" | "nativeID" | "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" | "onPress" | "onPressIn" | "onPressOut" | "onLongPress" | "pressRetentionOffset" | "asChild" | "variant" | "allowFontScaling" | "ellipsizeMode" | "lineBreakMode" | "numberOfLines" | "onTextLayout" | "maxFontSizeMultiplier" | "minimumFontScale" | "adjustsFontSizeToFit" | "dynamicTypeRamp" | "suppressHighlighting" | "lineBreakStrategyIOS" | "selectable" | "selectionColor" | "textBreakStrategy" | "dataDetectorType" | "android_hyphenationFrequency"> & react.RefAttributes<Text>>;
|
|
80
80
|
|
|
81
81
|
/**
|
|
82
82
|
* A fragment of text, styled apart from the text around it.
|
|
@@ -101,7 +101,7 @@ declare const TextSpan: react.ForwardRefExoticComponent<Omit<react_native.TextPr
|
|
|
101
101
|
asChild?: boolean;
|
|
102
102
|
style?: react_native.StyleProp<react_native.TextStyle>;
|
|
103
103
|
children?: react.ReactNode;
|
|
104
|
-
} & Omit<TextStyleProps, "pointerEvents" | "style" | "children" | "id" | "onLayout" | "testID" | "nativeID" | "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" | "
|
|
104
|
+
} & Omit<TextStyleProps, "pointerEvents" | "disabled" | "style" | "children" | "id" | "onLayout" | "testID" | "nativeID" | "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" | "onPress" | "onPressIn" | "onPressOut" | "onLongPress" | "pressRetentionOffset" | "asChild" | "allowFontScaling" | "ellipsizeMode" | "lineBreakMode" | "numberOfLines" | "onTextLayout" | "maxFontSizeMultiplier" | "minimumFontScale" | "adjustsFontSizeToFit" | "dynamicTypeRamp" | "suppressHighlighting" | "lineBreakStrategyIOS" | "selectable" | "selectionColor" | "textBreakStrategy" | "dataDetectorType" | "android_hyphenationFrequency"> & react.RefAttributes<Text>>;
|
|
105
105
|
|
|
106
106
|
/** Every role produces the same one slot, so the recipe's style functions share a shape. */
|
|
107
107
|
type StyleFn = (theme: XAUITheme) => Record<TypographySlot, TextStyle>;
|
|
@@ -2,10 +2,10 @@ import {
|
|
|
2
2
|
TextSpan,
|
|
3
3
|
Typography,
|
|
4
4
|
typographyRecipe
|
|
5
|
-
} from "../../chunk-
|
|
6
|
-
import "../../chunk-
|
|
7
|
-
import "../../chunk-EXX6ATAS.js";
|
|
5
|
+
} from "../../chunk-2U6JR7BF.js";
|
|
6
|
+
import "../../chunk-3JATAB7S.js";
|
|
8
7
|
import "../../chunk-A3EGFI6T.js";
|
|
8
|
+
import "../../chunk-PMO62QK4.js";
|
|
9
9
|
import "../../chunk-GGW42MY4.js";
|
|
10
10
|
export {
|
|
11
11
|
TextSpan,
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
8
|
-
require('../../chunk-
|
|
7
|
+
var _chunkIBEX4XGVcjs = require('../../chunk-IBEX4XGV.cjs');
|
|
8
|
+
require('../../chunk-HUZ4AUM2.cjs');
|
|
9
9
|
require('../../chunk-MC7SY2QH.cjs');
|
|
10
10
|
|
|
11
11
|
|
|
@@ -13,4 +13,4 @@ require('../../chunk-MC7SY2QH.cjs');
|
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
exports.Column =
|
|
16
|
+
exports.Column = _chunkIBEX4XGVcjs.Column; exports.Grid = _chunkIBEX4XGVcjs.Grid; exports.Row = _chunkIBEX4XGVcjs.Row; exports.Stack = _chunkIBEX4XGVcjs.Stack; exports.useGrid = _chunkIBEX4XGVcjs.useGrid;
|