@entropix/react-native 0.1.0
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/LICENSE +21 -0
- package/dist/index.cjs +1246 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +465 -0
- package/dist/index.d.ts +465 -0
- package/dist/index.js +1212 -0
- package/dist/index.js.map +1 -0
- package/package.json +83 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,465 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { tokens as tokens$1 } from '@entropix/tokens/native';
|
|
4
|
+
import { tokens } from '@entropix/tokens/native/light';
|
|
5
|
+
import { AccessibilityProps, UseDialogOptions, UseTabsOptions, UseAccordionOptions, UseMenuOptions } from '@entropix/core';
|
|
6
|
+
import { AccessibilityRole, AccessibilityState, AccessibilityValue, PressableProps, StyleProp, ViewStyle, TextStyle, ViewProps, TextProps } from 'react-native';
|
|
7
|
+
|
|
8
|
+
type EntropixTheme = typeof tokens;
|
|
9
|
+
type ThemeMode = "light" | "dark";
|
|
10
|
+
interface ThemeContextValue {
|
|
11
|
+
mode: ThemeMode;
|
|
12
|
+
tokens: EntropixTheme;
|
|
13
|
+
baseTokens: typeof tokens$1;
|
|
14
|
+
}
|
|
15
|
+
interface EntropixProviderProps {
|
|
16
|
+
/** Theme mode: "light" or "dark". Default: "light" */
|
|
17
|
+
mode?: ThemeMode;
|
|
18
|
+
children: React.ReactNode;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* EntropixProvider — Provides theme tokens to all Entropix components.
|
|
22
|
+
*
|
|
23
|
+
* Wrap your app root with this provider. All Entropix components will
|
|
24
|
+
* automatically pick up the current theme tokens.
|
|
25
|
+
*
|
|
26
|
+
* ```tsx
|
|
27
|
+
* <EntropixProvider mode="dark">
|
|
28
|
+
* <App />
|
|
29
|
+
* </EntropixProvider>
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
declare function EntropixProvider({ mode, children, }: EntropixProviderProps): react_jsx_runtime.JSX.Element;
|
|
33
|
+
/**
|
|
34
|
+
* useTheme — Access current Entropix theme tokens.
|
|
35
|
+
*
|
|
36
|
+
* Returns the resolved token values for the current theme (light or dark).
|
|
37
|
+
* Must be used within an EntropixProvider.
|
|
38
|
+
*/
|
|
39
|
+
declare function useTheme(): ThemeContextValue;
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* The RN accessibility props that mapAccessibilityToRN produces.
|
|
43
|
+
* These spread directly onto Pressable/View/Text components.
|
|
44
|
+
*/
|
|
45
|
+
interface RNAccessibilityProps {
|
|
46
|
+
accessible?: boolean;
|
|
47
|
+
accessibilityRole?: AccessibilityRole;
|
|
48
|
+
accessibilityLabel?: string;
|
|
49
|
+
accessibilityHint?: string;
|
|
50
|
+
accessibilityLabelledBy?: string | string[];
|
|
51
|
+
accessibilityState?: AccessibilityState;
|
|
52
|
+
accessibilityValue?: AccessibilityValue;
|
|
53
|
+
accessibilityLiveRegion?: "none" | "polite" | "assertive";
|
|
54
|
+
accessibilityElementsHidden?: boolean;
|
|
55
|
+
importantForAccessibility?: "auto" | "yes" | "no" | "no-hide-descendants";
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Maps platform-neutral AccessibilityProps from @entropix/core
|
|
60
|
+
* to React Native accessibility props.
|
|
61
|
+
*
|
|
62
|
+
* Key differences from the web adapter:
|
|
63
|
+
* - Boolean states aggregated into accessibilityState object
|
|
64
|
+
* - Value props aggregated into accessibilityValue object
|
|
65
|
+
* - describedBy maps to accessibilityHint (closest RN equivalent)
|
|
66
|
+
* - hidden maps to both iOS (accessibilityElementsHidden) and Android (importantForAccessibility)
|
|
67
|
+
* - modal, hasPopup, controls, owns, tabIndex, pressed are silently dropped (no RN equivalent)
|
|
68
|
+
*/
|
|
69
|
+
declare function mapAccessibilityToRN(props: AccessibilityProps): RNAccessibilityProps;
|
|
70
|
+
|
|
71
|
+
type ButtonVariant = "primary" | "secondary" | "outline" | "ghost" | "danger";
|
|
72
|
+
type ButtonSize = "sm" | "md" | "lg";
|
|
73
|
+
interface ButtonProps extends Omit<PressableProps, "disabled" | "onPress" | "style" | "children"> {
|
|
74
|
+
/** Called when the button is pressed */
|
|
75
|
+
onPress?: () => void;
|
|
76
|
+
/** Whether the button is disabled */
|
|
77
|
+
disabled?: boolean;
|
|
78
|
+
/** Whether the button is in a loading state */
|
|
79
|
+
loading?: boolean;
|
|
80
|
+
/** Visual variant. Default: "primary" */
|
|
81
|
+
variant?: ButtonVariant;
|
|
82
|
+
/** Size. Default: "md" */
|
|
83
|
+
size?: ButtonSize;
|
|
84
|
+
/** Override container style */
|
|
85
|
+
style?: StyleProp<ViewStyle>;
|
|
86
|
+
/** Override label text style */
|
|
87
|
+
textStyle?: TextStyle;
|
|
88
|
+
children?: React.ReactNode;
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Button — styled React Native button with variant and size support.
|
|
92
|
+
*
|
|
93
|
+
* ```tsx
|
|
94
|
+
* <Button variant="primary" size="md" onPress={handlePress}>
|
|
95
|
+
* Save Changes
|
|
96
|
+
* </Button>
|
|
97
|
+
* ```
|
|
98
|
+
*/
|
|
99
|
+
declare function Button({ onPress, disabled, loading, variant, size, style, textStyle, children, ...rest }: ButtonProps): react_jsx_runtime.JSX.Element;
|
|
100
|
+
|
|
101
|
+
interface ToggleProps extends Omit<PressableProps, "disabled" | "onPress" | "style" | "children"> {
|
|
102
|
+
/** Controlled checked state */
|
|
103
|
+
checked?: boolean;
|
|
104
|
+
/** Default checked state for uncontrolled mode */
|
|
105
|
+
defaultChecked?: boolean;
|
|
106
|
+
/** Called when checked state changes */
|
|
107
|
+
onChange?: (checked: boolean) => void;
|
|
108
|
+
/** Whether the toggle is disabled */
|
|
109
|
+
disabled?: boolean;
|
|
110
|
+
/** Accessible label */
|
|
111
|
+
label?: string;
|
|
112
|
+
/** Override container style */
|
|
113
|
+
style?: StyleProp<ViewStyle>;
|
|
114
|
+
/** Override label text style */
|
|
115
|
+
textStyle?: TextStyle;
|
|
116
|
+
children?: React.ReactNode;
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Toggle — styled checkbox toggle.
|
|
120
|
+
*
|
|
121
|
+
* Renders as a bordered pill that fills blue when checked.
|
|
122
|
+
*
|
|
123
|
+
* ```tsx
|
|
124
|
+
* <Toggle onChange={setChecked}>Accept Terms</Toggle>
|
|
125
|
+
* ```
|
|
126
|
+
*/
|
|
127
|
+
declare function Toggle(props: ToggleProps): react_jsx_runtime.JSX.Element;
|
|
128
|
+
|
|
129
|
+
interface SwitchProps extends Omit<PressableProps, "disabled" | "onPress" | "style" | "children"> {
|
|
130
|
+
/** Controlled checked state */
|
|
131
|
+
checked?: boolean;
|
|
132
|
+
/** Default checked state for uncontrolled mode */
|
|
133
|
+
defaultChecked?: boolean;
|
|
134
|
+
/** Called when checked state changes */
|
|
135
|
+
onChange?: (checked: boolean) => void;
|
|
136
|
+
/** Whether the switch is disabled */
|
|
137
|
+
disabled?: boolean;
|
|
138
|
+
/** Accessible label */
|
|
139
|
+
label?: string;
|
|
140
|
+
/** Override track style */
|
|
141
|
+
style?: StyleProp<ViewStyle>;
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* Switch — styled toggle with track + sliding thumb.
|
|
145
|
+
*
|
|
146
|
+
* ```tsx
|
|
147
|
+
* <Switch checked={isOn} onChange={setIsOn} label="Notifications" />
|
|
148
|
+
* ```
|
|
149
|
+
*/
|
|
150
|
+
declare function Switch({ checked, defaultChecked, onChange, disabled, label, style, ...rest }: SwitchProps): react_jsx_runtime.JSX.Element;
|
|
151
|
+
|
|
152
|
+
interface DialogProps extends UseDialogOptions {
|
|
153
|
+
children: React.ReactNode;
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* Dialog root — provides dialog state to compound sub-components.
|
|
157
|
+
* Renders no UI of its own.
|
|
158
|
+
*/
|
|
159
|
+
declare function Dialog({ children, isOpen, defaultOpen, onOpenChange, closeOnOverlayPress, closeOnEscape, modal, role, }: DialogProps): react_jsx_runtime.JSX.Element;
|
|
160
|
+
|
|
161
|
+
interface DialogTriggerProps extends Omit<PressableProps, "onPress" | "style"> {
|
|
162
|
+
children?: React.ReactNode;
|
|
163
|
+
style?: StyleProp<ViewStyle>;
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* DialogTrigger — Pressable that opens/closes the dialog.
|
|
167
|
+
*/
|
|
168
|
+
declare function DialogTrigger({ children, style, ...rest }: DialogTriggerProps): react_jsx_runtime.JSX.Element;
|
|
169
|
+
|
|
170
|
+
interface DialogContentProps extends Omit<ViewProps, "style"> {
|
|
171
|
+
children?: React.ReactNode;
|
|
172
|
+
style?: StyleProp<ViewStyle>;
|
|
173
|
+
/** Style for the inner card. */
|
|
174
|
+
cardStyle?: StyleProp<ViewStyle>;
|
|
175
|
+
/** Modal animation type. Default: "fade" */
|
|
176
|
+
animationType?: "none" | "slide" | "fade";
|
|
177
|
+
/** Whether the modal background is transparent. Default: true */
|
|
178
|
+
transparent?: boolean;
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* DialogContent — wraps children in RN's Modal component.
|
|
182
|
+
*
|
|
183
|
+
* Modal provides native focus trapping for screen readers.
|
|
184
|
+
* onRequestClose handles Android back button (maps to core's "dismiss" intent).
|
|
185
|
+
*/
|
|
186
|
+
declare function DialogContent({ children, style, cardStyle, animationType, transparent, ...rest }: DialogContentProps): react_jsx_runtime.JSX.Element;
|
|
187
|
+
|
|
188
|
+
interface DialogTitleProps extends Omit<TextProps, "style"> {
|
|
189
|
+
children?: React.ReactNode;
|
|
190
|
+
style?: StyleProp<TextStyle>;
|
|
191
|
+
}
|
|
192
|
+
/**
|
|
193
|
+
* DialogTitle — Text element with nativeID for accessibility linking.
|
|
194
|
+
* Uses accessibilityRole="header" for screen reader heading semantics.
|
|
195
|
+
*/
|
|
196
|
+
declare function DialogTitle({ children, style, ...rest }: DialogTitleProps): react_jsx_runtime.JSX.Element;
|
|
197
|
+
|
|
198
|
+
interface DialogDescriptionProps extends Omit<TextProps, "style"> {
|
|
199
|
+
children?: React.ReactNode;
|
|
200
|
+
style?: StyleProp<TextStyle>;
|
|
201
|
+
}
|
|
202
|
+
/**
|
|
203
|
+
* DialogDescription — Text element with nativeID for accessibility linking.
|
|
204
|
+
*/
|
|
205
|
+
declare function DialogDescription({ children, style, ...rest }: DialogDescriptionProps): react_jsx_runtime.JSX.Element;
|
|
206
|
+
|
|
207
|
+
interface DialogCloseProps extends Omit<PressableProps, "onPress" | "style"> {
|
|
208
|
+
children?: React.ReactNode;
|
|
209
|
+
style?: StyleProp<ViewStyle>;
|
|
210
|
+
}
|
|
211
|
+
/**
|
|
212
|
+
* DialogClose — Pressable that closes the dialog.
|
|
213
|
+
* Renders as a positioned "✕" button by default if no children provided.
|
|
214
|
+
*/
|
|
215
|
+
declare function DialogClose({ children, style, ...rest }: DialogCloseProps): react_jsx_runtime.JSX.Element;
|
|
216
|
+
|
|
217
|
+
interface DialogOverlayProps {
|
|
218
|
+
style?: StyleProp<ViewStyle>;
|
|
219
|
+
testID?: string;
|
|
220
|
+
}
|
|
221
|
+
/**
|
|
222
|
+
* DialogOverlay — backdrop element behind dialog content.
|
|
223
|
+
* Note: With the self-styled DialogContent, the overlay is built into the
|
|
224
|
+
* Modal wrapper. This component is kept for consumers who need a separate
|
|
225
|
+
* overlay element (e.g., custom dismiss-on-tap behavior outside DialogContent).
|
|
226
|
+
*/
|
|
227
|
+
declare function DialogOverlay({ style, testID }: DialogOverlayProps): react_jsx_runtime.JSX.Element | null;
|
|
228
|
+
|
|
229
|
+
interface TabsProps extends UseTabsOptions {
|
|
230
|
+
children: React.ReactNode;
|
|
231
|
+
style?: StyleProp<ViewStyle>;
|
|
232
|
+
}
|
|
233
|
+
declare function Tabs({ children, style, ...options }: TabsProps): react_jsx_runtime.JSX.Element;
|
|
234
|
+
|
|
235
|
+
interface TabListProps {
|
|
236
|
+
children: React.ReactNode;
|
|
237
|
+
style?: StyleProp<ViewStyle>;
|
|
238
|
+
}
|
|
239
|
+
declare function TabList({ children, style }: TabListProps): react_jsx_runtime.JSX.Element;
|
|
240
|
+
|
|
241
|
+
interface TabProps extends Omit<PressableProps, "onPress" | "style" | "children"> {
|
|
242
|
+
value: string;
|
|
243
|
+
children: React.ReactNode;
|
|
244
|
+
style?: StyleProp<ViewStyle>;
|
|
245
|
+
textStyle?: TextStyle;
|
|
246
|
+
}
|
|
247
|
+
declare function Tab({ value, children, style, textStyle, ...rest }: TabProps): react_jsx_runtime.JSX.Element;
|
|
248
|
+
|
|
249
|
+
interface TabPanelProps {
|
|
250
|
+
value: string;
|
|
251
|
+
children: React.ReactNode;
|
|
252
|
+
style?: StyleProp<ViewStyle>;
|
|
253
|
+
}
|
|
254
|
+
declare function TabPanel({ value, children, style }: TabPanelProps): react_jsx_runtime.JSX.Element | null;
|
|
255
|
+
|
|
256
|
+
interface AccordionProps extends UseAccordionOptions {
|
|
257
|
+
children: React.ReactNode;
|
|
258
|
+
style?: StyleProp<ViewStyle>;
|
|
259
|
+
}
|
|
260
|
+
declare function Accordion({ children, style, ...options }: AccordionProps): react_jsx_runtime.JSX.Element;
|
|
261
|
+
|
|
262
|
+
interface AccordionItemProps {
|
|
263
|
+
value: string;
|
|
264
|
+
/** Whether this is the last item (hides bottom border). Auto-detected if omitted. */
|
|
265
|
+
isLast?: boolean;
|
|
266
|
+
children: React.ReactNode;
|
|
267
|
+
style?: StyleProp<ViewStyle>;
|
|
268
|
+
}
|
|
269
|
+
declare function AccordionItem({ value, isLast, children, style, }: AccordionItemProps): react_jsx_runtime.JSX.Element;
|
|
270
|
+
|
|
271
|
+
interface AccordionTriggerProps extends Omit<PressableProps, "onPress" | "style" | "children"> {
|
|
272
|
+
children: React.ReactNode;
|
|
273
|
+
style?: StyleProp<ViewStyle>;
|
|
274
|
+
textStyle?: TextStyle;
|
|
275
|
+
}
|
|
276
|
+
declare function AccordionTrigger({ children, style, textStyle, ...rest }: AccordionTriggerProps): react_jsx_runtime.JSX.Element;
|
|
277
|
+
|
|
278
|
+
interface AccordionPanelProps {
|
|
279
|
+
children: React.ReactNode;
|
|
280
|
+
style?: StyleProp<ViewStyle>;
|
|
281
|
+
}
|
|
282
|
+
declare function AccordionPanel({ children, style }: AccordionPanelProps): react_jsx_runtime.JSX.Element | null;
|
|
283
|
+
|
|
284
|
+
interface MenuProps extends UseMenuOptions {
|
|
285
|
+
children: React.ReactNode;
|
|
286
|
+
}
|
|
287
|
+
declare function Menu({ children, ...options }: MenuProps): react_jsx_runtime.JSX.Element;
|
|
288
|
+
|
|
289
|
+
interface MenuTriggerProps extends Omit<PressableProps, "onPress" | "style"> {
|
|
290
|
+
children: React.ReactNode;
|
|
291
|
+
style?: StyleProp<ViewStyle>;
|
|
292
|
+
}
|
|
293
|
+
declare function MenuTrigger({ children, style, ...rest }: MenuTriggerProps): react_jsx_runtime.JSX.Element;
|
|
294
|
+
|
|
295
|
+
interface MenuContentProps {
|
|
296
|
+
children: React.ReactNode;
|
|
297
|
+
style?: StyleProp<ViewStyle>;
|
|
298
|
+
testID?: string;
|
|
299
|
+
}
|
|
300
|
+
declare function MenuContent({ children, style, testID }: MenuContentProps): react_jsx_runtime.JSX.Element | null;
|
|
301
|
+
|
|
302
|
+
interface MenuItemProps extends Omit<PressableProps, "onPress" | "disabled" | "style"> {
|
|
303
|
+
index: number;
|
|
304
|
+
onSelect?: () => void;
|
|
305
|
+
disabled?: boolean;
|
|
306
|
+
children: React.ReactNode;
|
|
307
|
+
style?: StyleProp<ViewStyle>;
|
|
308
|
+
textStyle?: TextStyle;
|
|
309
|
+
}
|
|
310
|
+
declare function MenuItem({ index, onSelect, disabled, children, style, textStyle, ...rest }: MenuItemProps): react_jsx_runtime.JSX.Element;
|
|
311
|
+
|
|
312
|
+
/**
|
|
313
|
+
* Breakpoint values in pixels, matching @entropix/tokens breakpoint primitives.
|
|
314
|
+
*/
|
|
315
|
+
declare const BREAKPOINTS: {
|
|
316
|
+
readonly sm: 640;
|
|
317
|
+
readonly md: 768;
|
|
318
|
+
readonly lg: 1024;
|
|
319
|
+
readonly xl: 1280;
|
|
320
|
+
readonly "2xl": 1536;
|
|
321
|
+
};
|
|
322
|
+
type Breakpoint = "base" | "sm" | "md" | "lg" | "xl" | "2xl";
|
|
323
|
+
/**
|
|
324
|
+
* Returns the current breakpoint name based on screen width.
|
|
325
|
+
* Uses React Native's Dimensions API and listens for screen size changes
|
|
326
|
+
* (orientation changes, split-screen, etc.).
|
|
327
|
+
*
|
|
328
|
+
* - `"base"` — <640px (phones portrait)
|
|
329
|
+
* - `"sm"` — ≥640px (phones landscape)
|
|
330
|
+
* - `"md"` — ≥768px (tablets portrait)
|
|
331
|
+
* - `"lg"` — ≥1024px (tablets landscape)
|
|
332
|
+
* - `"xl"` — ≥1280px (large tablets / desktop)
|
|
333
|
+
* - `"2xl"` — ≥1536px (wide screens)
|
|
334
|
+
*
|
|
335
|
+
* ```tsx
|
|
336
|
+
* const breakpoint = useBreakpoint();
|
|
337
|
+
* const isMobile = breakpoint === "base" || breakpoint === "sm";
|
|
338
|
+
* ```
|
|
339
|
+
*/
|
|
340
|
+
declare function useBreakpoint(): Breakpoint;
|
|
341
|
+
/**
|
|
342
|
+
* Returns true if the current screen width is at or above the given breakpoint.
|
|
343
|
+
*
|
|
344
|
+
* ```tsx
|
|
345
|
+
* const isTablet = useBreakpointValue("md");
|
|
346
|
+
* // true when screen ≥768px (tablet portrait and up)
|
|
347
|
+
* ```
|
|
348
|
+
*/
|
|
349
|
+
declare function useBreakpointValue(breakpoint: Exclude<Breakpoint, "base">): boolean;
|
|
350
|
+
/**
|
|
351
|
+
* Returns the current screen dimensions, updating on orientation/size changes.
|
|
352
|
+
*
|
|
353
|
+
* ```tsx
|
|
354
|
+
* const { width, height } = useScreenDimensions();
|
|
355
|
+
* ```
|
|
356
|
+
*/
|
|
357
|
+
declare function useScreenDimensions(): {
|
|
358
|
+
width: number;
|
|
359
|
+
height: number;
|
|
360
|
+
};
|
|
361
|
+
|
|
362
|
+
type SpacingSize$1 = "none" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl";
|
|
363
|
+
interface StackProps extends ViewProps {
|
|
364
|
+
/** Gap between children. Default uses space.layout.stack token (16px) */
|
|
365
|
+
gap?: SpacingSize$1;
|
|
366
|
+
/** Cross-axis alignment */
|
|
367
|
+
align?: "start" | "center" | "end" | "stretch";
|
|
368
|
+
/** Whether to take full width */
|
|
369
|
+
fullWidth?: boolean;
|
|
370
|
+
children?: React.ReactNode;
|
|
371
|
+
}
|
|
372
|
+
/**
|
|
373
|
+
* Stack — vertical flex layout primitive for React Native.
|
|
374
|
+
*
|
|
375
|
+
* Uses the `space.layout.stack` token (16px) as default gap.
|
|
376
|
+
*
|
|
377
|
+
* ```tsx
|
|
378
|
+
* <Stack gap="lg" align="center">
|
|
379
|
+
* <Button>First</Button>
|
|
380
|
+
* <Button>Second</Button>
|
|
381
|
+
* </Stack>
|
|
382
|
+
* ```
|
|
383
|
+
*/
|
|
384
|
+
declare function Stack({ gap, align, fullWidth, style, children, ...rest }: StackProps): react_jsx_runtime.JSX.Element;
|
|
385
|
+
|
|
386
|
+
type SpacingSize = "none" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl";
|
|
387
|
+
interface InlineProps extends ViewProps {
|
|
388
|
+
/** Gap between children. Default uses space.layout.inline token (12px) */
|
|
389
|
+
gap?: SpacingSize;
|
|
390
|
+
/** Cross-axis alignment */
|
|
391
|
+
align?: "start" | "center" | "end" | "stretch" | "baseline";
|
|
392
|
+
/** Main-axis justification */
|
|
393
|
+
justify?: "start" | "center" | "end" | "between" | "around";
|
|
394
|
+
/** Whether to wrap children */
|
|
395
|
+
wrap?: boolean;
|
|
396
|
+
children?: React.ReactNode;
|
|
397
|
+
}
|
|
398
|
+
/**
|
|
399
|
+
* Inline — horizontal flex layout primitive for React Native.
|
|
400
|
+
*
|
|
401
|
+
* Uses the `space.layout.inline` token (12px) as default gap.
|
|
402
|
+
*
|
|
403
|
+
* ```tsx
|
|
404
|
+
* <Inline gap="sm" justify="between" wrap>
|
|
405
|
+
* <Button variant="primary">Save</Button>
|
|
406
|
+
* <Button variant="ghost">Cancel</Button>
|
|
407
|
+
* </Inline>
|
|
408
|
+
* ```
|
|
409
|
+
*/
|
|
410
|
+
declare function Inline({ gap, align, justify, wrap, style, children, ...rest }: InlineProps): react_jsx_runtime.JSX.Element;
|
|
411
|
+
|
|
412
|
+
type ContainerSize = "xs" | "sm" | "md" | "lg" | "xl" | "full";
|
|
413
|
+
interface ContainerProps extends ViewProps {
|
|
414
|
+
/** Maximum width constraint. Default: "lg" (1024px). On mobile this mainly affects tablet/web. */
|
|
415
|
+
maxWidth?: ContainerSize;
|
|
416
|
+
/** Whether to center children horizontally */
|
|
417
|
+
center?: boolean;
|
|
418
|
+
children?: React.ReactNode;
|
|
419
|
+
}
|
|
420
|
+
/**
|
|
421
|
+
* Container — responsive page-level wrapper with adaptive horizontal padding.
|
|
422
|
+
*
|
|
423
|
+
* Padding scales with screen size using breakpoint tokens:
|
|
424
|
+
* - Mobile (<768px): `space.layout.page-margin` (24px)
|
|
425
|
+
* - Tablet (≥768px): `space.layout.page-margin-md` (32px)
|
|
426
|
+
* - Desktop (≥1024px): `space.layout.page-margin-lg` (40px)
|
|
427
|
+
*
|
|
428
|
+
* ```tsx
|
|
429
|
+
* <Container maxWidth="lg">
|
|
430
|
+
* <Stack gap="xl">
|
|
431
|
+
* <Text>Page content</Text>
|
|
432
|
+
* </Stack>
|
|
433
|
+
* </Container>
|
|
434
|
+
* ```
|
|
435
|
+
*/
|
|
436
|
+
declare function Container({ maxWidth, center, style, children, ...rest }: ContainerProps): react_jsx_runtime.JSX.Element;
|
|
437
|
+
|
|
438
|
+
interface DividerProps extends ViewProps {
|
|
439
|
+
/** Orientation of the divider */
|
|
440
|
+
orientation?: "horizontal" | "vertical";
|
|
441
|
+
/** Spacing above and below (or left and right for vertical) */
|
|
442
|
+
spacing?: "sm" | "md" | "lg";
|
|
443
|
+
}
|
|
444
|
+
/**
|
|
445
|
+
* Divider — visual separator line for React Native.
|
|
446
|
+
*
|
|
447
|
+
* Uses the `color.border.default` token for line color.
|
|
448
|
+
*
|
|
449
|
+
* ```tsx
|
|
450
|
+
* <Stack>
|
|
451
|
+
* <Text>Section A</Text>
|
|
452
|
+
* <Divider spacing="md" />
|
|
453
|
+
* <Text>Section B</Text>
|
|
454
|
+
* </Stack>
|
|
455
|
+
*
|
|
456
|
+
* <Inline>
|
|
457
|
+
* <Text>Left</Text>
|
|
458
|
+
* <Divider orientation="vertical" spacing="sm" />
|
|
459
|
+
* <Text>Right</Text>
|
|
460
|
+
* </Inline>
|
|
461
|
+
* ```
|
|
462
|
+
*/
|
|
463
|
+
declare function Divider({ orientation, spacing, style, ...rest }: DividerProps): react_jsx_runtime.JSX.Element;
|
|
464
|
+
|
|
465
|
+
export { Accordion, AccordionItem, type AccordionItemProps, AccordionPanel, type AccordionPanelProps, type AccordionProps, AccordionTrigger, type AccordionTriggerProps, BREAKPOINTS, type Breakpoint, Button, type ButtonProps, Container, type ContainerProps, type ContainerSize, Dialog, DialogClose, type DialogCloseProps, DialogContent, type DialogContentProps, DialogDescription, type DialogDescriptionProps, DialogOverlay, type DialogOverlayProps, type DialogProps, DialogTitle, type DialogTitleProps, DialogTrigger, type DialogTriggerProps, Divider, type DividerProps, EntropixProvider, type EntropixProviderProps, type EntropixTheme, Inline, type InlineProps, Menu, MenuContent, type MenuContentProps, MenuItem, type MenuItemProps, type MenuProps, MenuTrigger, type MenuTriggerProps, type RNAccessibilityProps, type SpacingSize$1 as SpacingSize, Stack, type StackProps, Switch, type SwitchProps, Tab, TabList, type TabListProps, TabPanel, type TabPanelProps, type TabProps, Tabs, type TabsProps, type ThemeMode, Toggle, type ToggleProps, mapAccessibilityToRN, useBreakpoint, useBreakpointValue, useScreenDimensions, useTheme };
|