@entropix/react-native 0.3.0 → 1.0.1
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/accordion.cjs +26 -0
- package/dist/accordion.d.cts +34 -0
- package/dist/accordion.d.ts +34 -0
- package/dist/accordion.js +5 -0
- package/dist/button.cjs +14 -0
- package/dist/button.d.cts +35 -0
- package/dist/button.d.ts +35 -0
- package/dist/button.js +5 -0
- package/dist/checkbox.cjs +14 -0
- package/dist/checkbox.d.cts +41 -0
- package/dist/checkbox.d.ts +41 -0
- package/dist/checkbox.js +5 -0
- package/dist/chunk-2SQB7RNT.cjs +110 -0
- package/dist/chunk-3MHE2C74.js +143 -0
- package/dist/chunk-45KMMZUT.js +131 -0
- package/dist/chunk-64DK6YFL.js +164 -0
- package/dist/chunk-73BDGPZT.js +89 -0
- package/dist/chunk-B5YFEA66.cjs +243 -0
- package/dist/chunk-BOUIB4OY.cjs +56 -0
- package/dist/chunk-C6HF6QXK.js +154 -0
- package/dist/chunk-CXQNNEPC.js +249 -0
- package/dist/chunk-EFRYMWJB.js +86 -0
- package/dist/chunk-FQUZIDVS.cjs +174 -0
- package/dist/chunk-G7WPUTB6.cjs +258 -0
- package/dist/chunk-HH3CEDSH.js +122 -0
- package/dist/chunk-IRQWSFCZ.cjs +156 -0
- package/dist/chunk-KU24A5PQ.js +92 -0
- package/dist/chunk-OMKUPSHJ.cjs +95 -0
- package/dist/chunk-P5NAXMSC.cjs +91 -0
- package/dist/chunk-PKDXWKLO.cjs +245 -0
- package/dist/chunk-PVTPOJRU.js +155 -0
- package/dist/chunk-Q7TEJ62Q.cjs +160 -0
- package/dist/chunk-THX22NZW.cjs +146 -0
- package/dist/chunk-UHVTF2Y4.js +172 -0
- package/dist/chunk-UYXJHKYK.cjs +166 -0
- package/dist/chunk-VP567WZL.js +237 -0
- package/dist/chunk-XBNX4SLA.js +105 -0
- package/dist/chunk-XND7AIKO.cjs +133 -0
- package/dist/chunk-XSOLJOBG.js +238 -0
- package/dist/chunk-Z2MBHXUQ.cjs +127 -0
- package/dist/chunk-ZPAOLIIG.cjs +88 -0
- package/dist/chunk-ZYOTKLBG.js +52 -0
- package/dist/dialog.cjs +38 -0
- package/dist/dialog.d.cts +83 -0
- package/dist/dialog.d.ts +83 -0
- package/dist/dialog.js +5 -0
- package/dist/index.cjs +187 -2063
- package/dist/index.d.cts +21 -651
- package/dist/index.d.ts +21 -651
- package/dist/index.js +15 -2025
- package/dist/input.cjs +14 -0
- package/dist/input.d.cts +57 -0
- package/dist/input.d.ts +57 -0
- package/dist/input.js +5 -0
- package/dist/layout.cjs +25 -0
- package/dist/layout.d.cts +108 -0
- package/dist/layout.d.ts +108 -0
- package/dist/layout.js +4 -0
- package/dist/menu.cjs +26 -0
- package/dist/menu.d.cts +34 -0
- package/dist/menu.d.ts +34 -0
- package/dist/menu.js +5 -0
- package/dist/radio.cjs +18 -0
- package/dist/radio.d.cts +55 -0
- package/dist/radio.d.ts +55 -0
- package/dist/radio.js +5 -0
- package/dist/select.cjs +26 -0
- package/dist/select.d.cts +86 -0
- package/dist/select.d.ts +86 -0
- package/dist/select.js +5 -0
- package/dist/switch.cjs +14 -0
- package/dist/switch.d.cts +27 -0
- package/dist/switch.d.ts +27 -0
- package/dist/switch.js +5 -0
- package/dist/tabs.cjs +26 -0
- package/dist/tabs.d.cts +33 -0
- package/dist/tabs.d.ts +33 -0
- package/dist/tabs.js +5 -0
- package/dist/textarea.cjs +14 -0
- package/dist/textarea.d.cts +55 -0
- package/dist/textarea.d.ts +55 -0
- package/dist/textarea.js +5 -0
- package/dist/theme.cjs +20 -0
- package/dist/theme.d.cts +59 -0
- package/dist/theme.d.ts +59 -0
- package/dist/theme.js +3 -0
- package/dist/toggle.cjs +18 -0
- package/dist/toggle.d.cts +41 -0
- package/dist/toggle.d.ts +41 -0
- package/dist/toggle.js +5 -0
- package/package.json +146 -4
- package/dist/index.cjs.map +0 -1
- package/dist/index.js.map +0 -1
package/dist/input.cjs
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkFQUZIDVS_cjs = require('./chunk-FQUZIDVS.cjs');
|
|
4
|
+
require('./chunk-P5NAXMSC.cjs');
|
|
5
|
+
require('./chunk-BOUIB4OY.cjs');
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
Object.defineProperty(exports, "Input", {
|
|
10
|
+
enumerable: true,
|
|
11
|
+
get: function () { return chunkFQUZIDVS_cjs.Input; }
|
|
12
|
+
});
|
|
13
|
+
//# sourceMappingURL=input.cjs.map
|
|
14
|
+
//# sourceMappingURL=input.cjs.map
|
package/dist/input.d.cts
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { StyleProp, ViewStyle, TextStyle } from 'react-native';
|
|
3
|
+
import { UseInputOptions } from '@entropix/core';
|
|
4
|
+
|
|
5
|
+
type InputSize = "sm" | "md" | "lg";
|
|
6
|
+
interface InputProps {
|
|
7
|
+
/** Controlled value */
|
|
8
|
+
value?: string;
|
|
9
|
+
/** Default value for uncontrolled mode */
|
|
10
|
+
defaultValue?: string;
|
|
11
|
+
/** Called when the value changes */
|
|
12
|
+
onChange?: (value: string) => void;
|
|
13
|
+
/** Whether the input is disabled */
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
/** Whether the input is read-only */
|
|
16
|
+
readOnly?: boolean;
|
|
17
|
+
/** Whether the input is required */
|
|
18
|
+
required?: boolean;
|
|
19
|
+
/** Whether the input is in an invalid state */
|
|
20
|
+
invalid?: boolean;
|
|
21
|
+
/** Label text displayed above the input */
|
|
22
|
+
label?: string;
|
|
23
|
+
/** Helper text displayed below the input */
|
|
24
|
+
helperText?: string;
|
|
25
|
+
/** Error message displayed below the input when invalid */
|
|
26
|
+
errorMessage?: string;
|
|
27
|
+
/** Placeholder text */
|
|
28
|
+
placeholder?: string;
|
|
29
|
+
/** Input type — maps to React Native keyboardType */
|
|
30
|
+
type?: UseInputOptions["type"];
|
|
31
|
+
/** Size variant. Default: "md" */
|
|
32
|
+
size?: InputSize;
|
|
33
|
+
/** Override wrapper View style */
|
|
34
|
+
style?: StyleProp<ViewStyle>;
|
|
35
|
+
/** Override TextInput style */
|
|
36
|
+
inputStyle?: StyleProp<TextStyle>;
|
|
37
|
+
/** Override label and helper Text style */
|
|
38
|
+
textStyle?: TextStyle;
|
|
39
|
+
/** testID for testing */
|
|
40
|
+
testID?: string;
|
|
41
|
+
variant?: string;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Input -- styled text input with label, helper text, and error message.
|
|
45
|
+
*
|
|
46
|
+
* ```tsx
|
|
47
|
+
* <Input
|
|
48
|
+
* label="Email"
|
|
49
|
+
* placeholder="you@example.com"
|
|
50
|
+
* type="email"
|
|
51
|
+
* onChange={setEmail}
|
|
52
|
+
* />
|
|
53
|
+
* ```
|
|
54
|
+
*/
|
|
55
|
+
declare function Input({ value, defaultValue, onChange, disabled, readOnly, required, invalid, label, helperText, errorMessage, placeholder, type, size, style, inputStyle, textStyle, testID, variant: _variant }: InputProps): react_jsx_runtime.JSX.Element;
|
|
56
|
+
|
|
57
|
+
export { Input, type InputProps, type InputSize };
|
package/dist/input.d.ts
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { StyleProp, ViewStyle, TextStyle } from 'react-native';
|
|
3
|
+
import { UseInputOptions } from '@entropix/core';
|
|
4
|
+
|
|
5
|
+
type InputSize = "sm" | "md" | "lg";
|
|
6
|
+
interface InputProps {
|
|
7
|
+
/** Controlled value */
|
|
8
|
+
value?: string;
|
|
9
|
+
/** Default value for uncontrolled mode */
|
|
10
|
+
defaultValue?: string;
|
|
11
|
+
/** Called when the value changes */
|
|
12
|
+
onChange?: (value: string) => void;
|
|
13
|
+
/** Whether the input is disabled */
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
/** Whether the input is read-only */
|
|
16
|
+
readOnly?: boolean;
|
|
17
|
+
/** Whether the input is required */
|
|
18
|
+
required?: boolean;
|
|
19
|
+
/** Whether the input is in an invalid state */
|
|
20
|
+
invalid?: boolean;
|
|
21
|
+
/** Label text displayed above the input */
|
|
22
|
+
label?: string;
|
|
23
|
+
/** Helper text displayed below the input */
|
|
24
|
+
helperText?: string;
|
|
25
|
+
/** Error message displayed below the input when invalid */
|
|
26
|
+
errorMessage?: string;
|
|
27
|
+
/** Placeholder text */
|
|
28
|
+
placeholder?: string;
|
|
29
|
+
/** Input type — maps to React Native keyboardType */
|
|
30
|
+
type?: UseInputOptions["type"];
|
|
31
|
+
/** Size variant. Default: "md" */
|
|
32
|
+
size?: InputSize;
|
|
33
|
+
/** Override wrapper View style */
|
|
34
|
+
style?: StyleProp<ViewStyle>;
|
|
35
|
+
/** Override TextInput style */
|
|
36
|
+
inputStyle?: StyleProp<TextStyle>;
|
|
37
|
+
/** Override label and helper Text style */
|
|
38
|
+
textStyle?: TextStyle;
|
|
39
|
+
/** testID for testing */
|
|
40
|
+
testID?: string;
|
|
41
|
+
variant?: string;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Input -- styled text input with label, helper text, and error message.
|
|
45
|
+
*
|
|
46
|
+
* ```tsx
|
|
47
|
+
* <Input
|
|
48
|
+
* label="Email"
|
|
49
|
+
* placeholder="you@example.com"
|
|
50
|
+
* type="email"
|
|
51
|
+
* onChange={setEmail}
|
|
52
|
+
* />
|
|
53
|
+
* ```
|
|
54
|
+
*/
|
|
55
|
+
declare function Input({ value, defaultValue, onChange, disabled, readOnly, required, invalid, label, helperText, errorMessage, placeholder, type, size, style, inputStyle, textStyle, testID, variant: _variant }: InputProps): react_jsx_runtime.JSX.Element;
|
|
56
|
+
|
|
57
|
+
export { Input, type InputProps, type InputSize };
|
package/dist/input.js
ADDED
package/dist/layout.cjs
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkG7WPUTB6_cjs = require('./chunk-G7WPUTB6.cjs');
|
|
4
|
+
require('./chunk-BOUIB4OY.cjs');
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
Object.defineProperty(exports, "Container", {
|
|
9
|
+
enumerable: true,
|
|
10
|
+
get: function () { return chunkG7WPUTB6_cjs.Container; }
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "Divider", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () { return chunkG7WPUTB6_cjs.Divider; }
|
|
15
|
+
});
|
|
16
|
+
Object.defineProperty(exports, "Inline", {
|
|
17
|
+
enumerable: true,
|
|
18
|
+
get: function () { return chunkG7WPUTB6_cjs.Inline; }
|
|
19
|
+
});
|
|
20
|
+
Object.defineProperty(exports, "Stack", {
|
|
21
|
+
enumerable: true,
|
|
22
|
+
get: function () { return chunkG7WPUTB6_cjs.Stack; }
|
|
23
|
+
});
|
|
24
|
+
//# sourceMappingURL=layout.cjs.map
|
|
25
|
+
//# sourceMappingURL=layout.cjs.map
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { ViewProps } from 'react-native';
|
|
4
|
+
|
|
5
|
+
type SpacingSize$1 = "none" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl";
|
|
6
|
+
interface StackProps extends ViewProps {
|
|
7
|
+
/** Gap between children. Default uses space.layout.stack token (16px) */
|
|
8
|
+
gap?: SpacingSize$1;
|
|
9
|
+
/** Cross-axis alignment */
|
|
10
|
+
align?: "start" | "center" | "end" | "stretch";
|
|
11
|
+
/** Whether to take full width */
|
|
12
|
+
fullWidth?: boolean;
|
|
13
|
+
children?: React.ReactNode;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Stack — vertical flex layout primitive for React Native.
|
|
17
|
+
*
|
|
18
|
+
* Uses the `space.layout.stack` token (16px) as default gap.
|
|
19
|
+
*
|
|
20
|
+
* ```tsx
|
|
21
|
+
* <Stack gap="lg" align="center">
|
|
22
|
+
* <Button>First</Button>
|
|
23
|
+
* <Button>Second</Button>
|
|
24
|
+
* </Stack>
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
declare function Stack({ gap, align, fullWidth, style, children, ...rest }: StackProps): react_jsx_runtime.JSX.Element;
|
|
28
|
+
|
|
29
|
+
type SpacingSize = "none" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl";
|
|
30
|
+
interface InlineProps extends ViewProps {
|
|
31
|
+
/** Gap between children. Default uses space.layout.inline token (12px) */
|
|
32
|
+
gap?: SpacingSize;
|
|
33
|
+
/** Cross-axis alignment */
|
|
34
|
+
align?: "start" | "center" | "end" | "stretch" | "baseline";
|
|
35
|
+
/** Main-axis justification */
|
|
36
|
+
justify?: "start" | "center" | "end" | "between" | "around";
|
|
37
|
+
/** Whether to wrap children */
|
|
38
|
+
wrap?: boolean;
|
|
39
|
+
children?: React.ReactNode;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Inline — horizontal flex layout primitive for React Native.
|
|
43
|
+
*
|
|
44
|
+
* Uses the `space.layout.inline` token (12px) as default gap.
|
|
45
|
+
*
|
|
46
|
+
* ```tsx
|
|
47
|
+
* <Inline gap="sm" justify="between" wrap>
|
|
48
|
+
* <Button variant="primary">Save</Button>
|
|
49
|
+
* <Button variant="ghost">Cancel</Button>
|
|
50
|
+
* </Inline>
|
|
51
|
+
* ```
|
|
52
|
+
*/
|
|
53
|
+
declare function Inline({ gap, align, justify, wrap, style, children, ...rest }: InlineProps): react_jsx_runtime.JSX.Element;
|
|
54
|
+
|
|
55
|
+
type ContainerSize = "xs" | "sm" | "md" | "lg" | "xl" | "full";
|
|
56
|
+
interface ContainerProps extends ViewProps {
|
|
57
|
+
/** Maximum width constraint. Default: "lg" (1024px). On mobile this mainly affects tablet/web. */
|
|
58
|
+
maxWidth?: ContainerSize;
|
|
59
|
+
/** Whether to center children horizontally */
|
|
60
|
+
center?: boolean;
|
|
61
|
+
children?: React.ReactNode;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Container — responsive page-level wrapper with adaptive horizontal padding.
|
|
65
|
+
*
|
|
66
|
+
* Padding scales with screen size using breakpoint tokens:
|
|
67
|
+
* - Mobile (<768px): `space.layout.page-margin` (24px)
|
|
68
|
+
* - Tablet (≥768px): `space.layout.page-margin-md` (32px)
|
|
69
|
+
* - Desktop (≥1024px): `space.layout.page-margin-lg` (40px)
|
|
70
|
+
*
|
|
71
|
+
* ```tsx
|
|
72
|
+
* <Container maxWidth="lg">
|
|
73
|
+
* <Stack gap="xl">
|
|
74
|
+
* <Text>Page content</Text>
|
|
75
|
+
* </Stack>
|
|
76
|
+
* </Container>
|
|
77
|
+
* ```
|
|
78
|
+
*/
|
|
79
|
+
declare function Container({ maxWidth, center, style, children, ...rest }: ContainerProps): react_jsx_runtime.JSX.Element;
|
|
80
|
+
|
|
81
|
+
interface DividerProps extends ViewProps {
|
|
82
|
+
/** Orientation of the divider */
|
|
83
|
+
orientation?: "horizontal" | "vertical";
|
|
84
|
+
/** Spacing above and below (or left and right for vertical) */
|
|
85
|
+
spacing?: "sm" | "md" | "lg";
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Divider — visual separator line for React Native.
|
|
89
|
+
*
|
|
90
|
+
* Uses the `color.border.default` token for line color.
|
|
91
|
+
*
|
|
92
|
+
* ```tsx
|
|
93
|
+
* <Stack>
|
|
94
|
+
* <Text>Section A</Text>
|
|
95
|
+
* <Divider spacing="md" />
|
|
96
|
+
* <Text>Section B</Text>
|
|
97
|
+
* </Stack>
|
|
98
|
+
*
|
|
99
|
+
* <Inline>
|
|
100
|
+
* <Text>Left</Text>
|
|
101
|
+
* <Divider orientation="vertical" spacing="sm" />
|
|
102
|
+
* <Text>Right</Text>
|
|
103
|
+
* </Inline>
|
|
104
|
+
* ```
|
|
105
|
+
*/
|
|
106
|
+
declare function Divider({ orientation, spacing, style, ...rest }: DividerProps): react_jsx_runtime.JSX.Element;
|
|
107
|
+
|
|
108
|
+
export { Container, type ContainerProps, type ContainerSize, Divider, type DividerProps, Inline, type InlineProps, type SpacingSize$1 as SpacingSize, Stack, type StackProps };
|
package/dist/layout.d.ts
ADDED
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { ViewProps } from 'react-native';
|
|
4
|
+
|
|
5
|
+
type SpacingSize$1 = "none" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl";
|
|
6
|
+
interface StackProps extends ViewProps {
|
|
7
|
+
/** Gap between children. Default uses space.layout.stack token (16px) */
|
|
8
|
+
gap?: SpacingSize$1;
|
|
9
|
+
/** Cross-axis alignment */
|
|
10
|
+
align?: "start" | "center" | "end" | "stretch";
|
|
11
|
+
/** Whether to take full width */
|
|
12
|
+
fullWidth?: boolean;
|
|
13
|
+
children?: React.ReactNode;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Stack — vertical flex layout primitive for React Native.
|
|
17
|
+
*
|
|
18
|
+
* Uses the `space.layout.stack` token (16px) as default gap.
|
|
19
|
+
*
|
|
20
|
+
* ```tsx
|
|
21
|
+
* <Stack gap="lg" align="center">
|
|
22
|
+
* <Button>First</Button>
|
|
23
|
+
* <Button>Second</Button>
|
|
24
|
+
* </Stack>
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
declare function Stack({ gap, align, fullWidth, style, children, ...rest }: StackProps): react_jsx_runtime.JSX.Element;
|
|
28
|
+
|
|
29
|
+
type SpacingSize = "none" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl";
|
|
30
|
+
interface InlineProps extends ViewProps {
|
|
31
|
+
/** Gap between children. Default uses space.layout.inline token (12px) */
|
|
32
|
+
gap?: SpacingSize;
|
|
33
|
+
/** Cross-axis alignment */
|
|
34
|
+
align?: "start" | "center" | "end" | "stretch" | "baseline";
|
|
35
|
+
/** Main-axis justification */
|
|
36
|
+
justify?: "start" | "center" | "end" | "between" | "around";
|
|
37
|
+
/** Whether to wrap children */
|
|
38
|
+
wrap?: boolean;
|
|
39
|
+
children?: React.ReactNode;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Inline — horizontal flex layout primitive for React Native.
|
|
43
|
+
*
|
|
44
|
+
* Uses the `space.layout.inline` token (12px) as default gap.
|
|
45
|
+
*
|
|
46
|
+
* ```tsx
|
|
47
|
+
* <Inline gap="sm" justify="between" wrap>
|
|
48
|
+
* <Button variant="primary">Save</Button>
|
|
49
|
+
* <Button variant="ghost">Cancel</Button>
|
|
50
|
+
* </Inline>
|
|
51
|
+
* ```
|
|
52
|
+
*/
|
|
53
|
+
declare function Inline({ gap, align, justify, wrap, style, children, ...rest }: InlineProps): react_jsx_runtime.JSX.Element;
|
|
54
|
+
|
|
55
|
+
type ContainerSize = "xs" | "sm" | "md" | "lg" | "xl" | "full";
|
|
56
|
+
interface ContainerProps extends ViewProps {
|
|
57
|
+
/** Maximum width constraint. Default: "lg" (1024px). On mobile this mainly affects tablet/web. */
|
|
58
|
+
maxWidth?: ContainerSize;
|
|
59
|
+
/** Whether to center children horizontally */
|
|
60
|
+
center?: boolean;
|
|
61
|
+
children?: React.ReactNode;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Container — responsive page-level wrapper with adaptive horizontal padding.
|
|
65
|
+
*
|
|
66
|
+
* Padding scales with screen size using breakpoint tokens:
|
|
67
|
+
* - Mobile (<768px): `space.layout.page-margin` (24px)
|
|
68
|
+
* - Tablet (≥768px): `space.layout.page-margin-md` (32px)
|
|
69
|
+
* - Desktop (≥1024px): `space.layout.page-margin-lg` (40px)
|
|
70
|
+
*
|
|
71
|
+
* ```tsx
|
|
72
|
+
* <Container maxWidth="lg">
|
|
73
|
+
* <Stack gap="xl">
|
|
74
|
+
* <Text>Page content</Text>
|
|
75
|
+
* </Stack>
|
|
76
|
+
* </Container>
|
|
77
|
+
* ```
|
|
78
|
+
*/
|
|
79
|
+
declare function Container({ maxWidth, center, style, children, ...rest }: ContainerProps): react_jsx_runtime.JSX.Element;
|
|
80
|
+
|
|
81
|
+
interface DividerProps extends ViewProps {
|
|
82
|
+
/** Orientation of the divider */
|
|
83
|
+
orientation?: "horizontal" | "vertical";
|
|
84
|
+
/** Spacing above and below (or left and right for vertical) */
|
|
85
|
+
spacing?: "sm" | "md" | "lg";
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Divider — visual separator line for React Native.
|
|
89
|
+
*
|
|
90
|
+
* Uses the `color.border.default` token for line color.
|
|
91
|
+
*
|
|
92
|
+
* ```tsx
|
|
93
|
+
* <Stack>
|
|
94
|
+
* <Text>Section A</Text>
|
|
95
|
+
* <Divider spacing="md" />
|
|
96
|
+
* <Text>Section B</Text>
|
|
97
|
+
* </Stack>
|
|
98
|
+
*
|
|
99
|
+
* <Inline>
|
|
100
|
+
* <Text>Left</Text>
|
|
101
|
+
* <Divider orientation="vertical" spacing="sm" />
|
|
102
|
+
* <Text>Right</Text>
|
|
103
|
+
* </Inline>
|
|
104
|
+
* ```
|
|
105
|
+
*/
|
|
106
|
+
declare function Divider({ orientation, spacing, style, ...rest }: DividerProps): react_jsx_runtime.JSX.Element;
|
|
107
|
+
|
|
108
|
+
export { Container, type ContainerProps, type ContainerSize, Divider, type DividerProps, Inline, type InlineProps, type SpacingSize$1 as SpacingSize, Stack, type StackProps };
|
package/dist/layout.js
ADDED
package/dist/menu.cjs
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkZ2MBHXUQ_cjs = require('./chunk-Z2MBHXUQ.cjs');
|
|
4
|
+
require('./chunk-P5NAXMSC.cjs');
|
|
5
|
+
require('./chunk-BOUIB4OY.cjs');
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
Object.defineProperty(exports, "Menu", {
|
|
10
|
+
enumerable: true,
|
|
11
|
+
get: function () { return chunkZ2MBHXUQ_cjs.Menu; }
|
|
12
|
+
});
|
|
13
|
+
Object.defineProperty(exports, "MenuContent", {
|
|
14
|
+
enumerable: true,
|
|
15
|
+
get: function () { return chunkZ2MBHXUQ_cjs.MenuContent; }
|
|
16
|
+
});
|
|
17
|
+
Object.defineProperty(exports, "MenuItem", {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: function () { return chunkZ2MBHXUQ_cjs.MenuItem; }
|
|
20
|
+
});
|
|
21
|
+
Object.defineProperty(exports, "MenuTrigger", {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
get: function () { return chunkZ2MBHXUQ_cjs.MenuTrigger; }
|
|
24
|
+
});
|
|
25
|
+
//# sourceMappingURL=menu.cjs.map
|
|
26
|
+
//# sourceMappingURL=menu.cjs.map
|
package/dist/menu.d.cts
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { UseMenuOptions } from '@entropix/core';
|
|
4
|
+
import { PressableProps, StyleProp, ViewStyle, TextStyle } from 'react-native';
|
|
5
|
+
|
|
6
|
+
interface MenuProps extends UseMenuOptions {
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
}
|
|
9
|
+
declare function Menu({ children, ...options }: MenuProps): react_jsx_runtime.JSX.Element;
|
|
10
|
+
|
|
11
|
+
interface MenuTriggerProps extends Omit<PressableProps, "onPress" | "style"> {
|
|
12
|
+
children: React.ReactNode;
|
|
13
|
+
style?: StyleProp<ViewStyle>;
|
|
14
|
+
}
|
|
15
|
+
declare function MenuTrigger({ children, style, ...rest }: MenuTriggerProps): react_jsx_runtime.JSX.Element;
|
|
16
|
+
|
|
17
|
+
interface MenuContentProps {
|
|
18
|
+
children: React.ReactNode;
|
|
19
|
+
style?: StyleProp<ViewStyle>;
|
|
20
|
+
testID?: string;
|
|
21
|
+
}
|
|
22
|
+
declare function MenuContent({ children, style, testID }: MenuContentProps): react_jsx_runtime.JSX.Element | null;
|
|
23
|
+
|
|
24
|
+
interface MenuItemProps extends Omit<PressableProps, "onPress" | "disabled" | "style"> {
|
|
25
|
+
index: number;
|
|
26
|
+
onSelect?: () => void;
|
|
27
|
+
disabled?: boolean;
|
|
28
|
+
children: React.ReactNode;
|
|
29
|
+
style?: StyleProp<ViewStyle>;
|
|
30
|
+
textStyle?: TextStyle;
|
|
31
|
+
}
|
|
32
|
+
declare function MenuItem({ index, onSelect, disabled, children, style, textStyle, ...rest }: MenuItemProps): react_jsx_runtime.JSX.Element;
|
|
33
|
+
|
|
34
|
+
export { Menu, MenuContent, type MenuContentProps, MenuItem, type MenuItemProps, type MenuProps, MenuTrigger, type MenuTriggerProps };
|
package/dist/menu.d.ts
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { UseMenuOptions } from '@entropix/core';
|
|
4
|
+
import { PressableProps, StyleProp, ViewStyle, TextStyle } from 'react-native';
|
|
5
|
+
|
|
6
|
+
interface MenuProps extends UseMenuOptions {
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
}
|
|
9
|
+
declare function Menu({ children, ...options }: MenuProps): react_jsx_runtime.JSX.Element;
|
|
10
|
+
|
|
11
|
+
interface MenuTriggerProps extends Omit<PressableProps, "onPress" | "style"> {
|
|
12
|
+
children: React.ReactNode;
|
|
13
|
+
style?: StyleProp<ViewStyle>;
|
|
14
|
+
}
|
|
15
|
+
declare function MenuTrigger({ children, style, ...rest }: MenuTriggerProps): react_jsx_runtime.JSX.Element;
|
|
16
|
+
|
|
17
|
+
interface MenuContentProps {
|
|
18
|
+
children: React.ReactNode;
|
|
19
|
+
style?: StyleProp<ViewStyle>;
|
|
20
|
+
testID?: string;
|
|
21
|
+
}
|
|
22
|
+
declare function MenuContent({ children, style, testID }: MenuContentProps): react_jsx_runtime.JSX.Element | null;
|
|
23
|
+
|
|
24
|
+
interface MenuItemProps extends Omit<PressableProps, "onPress" | "disabled" | "style"> {
|
|
25
|
+
index: number;
|
|
26
|
+
onSelect?: () => void;
|
|
27
|
+
disabled?: boolean;
|
|
28
|
+
children: React.ReactNode;
|
|
29
|
+
style?: StyleProp<ViewStyle>;
|
|
30
|
+
textStyle?: TextStyle;
|
|
31
|
+
}
|
|
32
|
+
declare function MenuItem({ index, onSelect, disabled, children, style, textStyle, ...rest }: MenuItemProps): react_jsx_runtime.JSX.Element;
|
|
33
|
+
|
|
34
|
+
export { Menu, MenuContent, type MenuContentProps, MenuItem, type MenuItemProps, type MenuProps, MenuTrigger, type MenuTriggerProps };
|
package/dist/menu.js
ADDED
package/dist/radio.cjs
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkTHX22NZW_cjs = require('./chunk-THX22NZW.cjs');
|
|
4
|
+
require('./chunk-P5NAXMSC.cjs');
|
|
5
|
+
require('./chunk-BOUIB4OY.cjs');
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
Object.defineProperty(exports, "RadioGroup", {
|
|
10
|
+
enumerable: true,
|
|
11
|
+
get: function () { return chunkTHX22NZW_cjs.RadioGroup; }
|
|
12
|
+
});
|
|
13
|
+
Object.defineProperty(exports, "RadioItem", {
|
|
14
|
+
enumerable: true,
|
|
15
|
+
get: function () { return chunkTHX22NZW_cjs.RadioItem; }
|
|
16
|
+
});
|
|
17
|
+
//# sourceMappingURL=radio.cjs.map
|
|
18
|
+
//# sourceMappingURL=radio.cjs.map
|
package/dist/radio.d.cts
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { StyleProp, ViewStyle, TextStyle, PressableProps } from 'react-native';
|
|
4
|
+
import { UseRadioGroupOptions } from '@entropix/core';
|
|
5
|
+
|
|
6
|
+
interface RadioGroupProps extends UseRadioGroupOptions {
|
|
7
|
+
/** Label text for the radio group */
|
|
8
|
+
label?: string;
|
|
9
|
+
/** Override wrapper View style */
|
|
10
|
+
style?: StyleProp<ViewStyle>;
|
|
11
|
+
/** Override label text style */
|
|
12
|
+
textStyle?: TextStyle;
|
|
13
|
+
children: React.ReactNode;
|
|
14
|
+
/** testID for testing */
|
|
15
|
+
testID?: string;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* RadioGroup -- container for RadioItem components.
|
|
19
|
+
*
|
|
20
|
+
* Provides radio group state via context. All RadioItem children
|
|
21
|
+
* share the same selection state.
|
|
22
|
+
*
|
|
23
|
+
* ```tsx
|
|
24
|
+
* <RadioGroup label="Color" onChange={setColor} defaultValue="red">
|
|
25
|
+
* <RadioItem value="red">Red</RadioItem>
|
|
26
|
+
* <RadioItem value="blue">Blue</RadioItem>
|
|
27
|
+
* </RadioGroup>
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
declare function RadioGroup({ label, style, textStyle, children, testID, ...options }: RadioGroupProps): react_jsx_runtime.JSX.Element;
|
|
31
|
+
|
|
32
|
+
interface RadioItemProps extends Omit<PressableProps, "disabled" | "onPress" | "style" | "children"> {
|
|
33
|
+
/** The value this radio option represents */
|
|
34
|
+
value: string;
|
|
35
|
+
/** Whether this option is disabled */
|
|
36
|
+
disabled?: boolean;
|
|
37
|
+
/** Override container style */
|
|
38
|
+
style?: StyleProp<ViewStyle>;
|
|
39
|
+
/** Override label text style */
|
|
40
|
+
textStyle?: TextStyle;
|
|
41
|
+
children?: React.ReactNode;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* RadioItem -- individual radio option within a RadioGroup.
|
|
45
|
+
*
|
|
46
|
+
* Renders a Pressable row with a circle indicator and label text.
|
|
47
|
+
* When selected, the circle shows a filled inner dot.
|
|
48
|
+
*
|
|
49
|
+
* ```tsx
|
|
50
|
+
* <RadioItem value="option-1">Option 1</RadioItem>
|
|
51
|
+
* ```
|
|
52
|
+
*/
|
|
53
|
+
declare function RadioItem({ value, disabled, style, textStyle, children, ...rest }: RadioItemProps): react_jsx_runtime.JSX.Element;
|
|
54
|
+
|
|
55
|
+
export { RadioGroup, type RadioGroupProps, RadioItem, type RadioItemProps };
|
package/dist/radio.d.ts
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { StyleProp, ViewStyle, TextStyle, PressableProps } from 'react-native';
|
|
4
|
+
import { UseRadioGroupOptions } from '@entropix/core';
|
|
5
|
+
|
|
6
|
+
interface RadioGroupProps extends UseRadioGroupOptions {
|
|
7
|
+
/** Label text for the radio group */
|
|
8
|
+
label?: string;
|
|
9
|
+
/** Override wrapper View style */
|
|
10
|
+
style?: StyleProp<ViewStyle>;
|
|
11
|
+
/** Override label text style */
|
|
12
|
+
textStyle?: TextStyle;
|
|
13
|
+
children: React.ReactNode;
|
|
14
|
+
/** testID for testing */
|
|
15
|
+
testID?: string;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* RadioGroup -- container for RadioItem components.
|
|
19
|
+
*
|
|
20
|
+
* Provides radio group state via context. All RadioItem children
|
|
21
|
+
* share the same selection state.
|
|
22
|
+
*
|
|
23
|
+
* ```tsx
|
|
24
|
+
* <RadioGroup label="Color" onChange={setColor} defaultValue="red">
|
|
25
|
+
* <RadioItem value="red">Red</RadioItem>
|
|
26
|
+
* <RadioItem value="blue">Blue</RadioItem>
|
|
27
|
+
* </RadioGroup>
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
declare function RadioGroup({ label, style, textStyle, children, testID, ...options }: RadioGroupProps): react_jsx_runtime.JSX.Element;
|
|
31
|
+
|
|
32
|
+
interface RadioItemProps extends Omit<PressableProps, "disabled" | "onPress" | "style" | "children"> {
|
|
33
|
+
/** The value this radio option represents */
|
|
34
|
+
value: string;
|
|
35
|
+
/** Whether this option is disabled */
|
|
36
|
+
disabled?: boolean;
|
|
37
|
+
/** Override container style */
|
|
38
|
+
style?: StyleProp<ViewStyle>;
|
|
39
|
+
/** Override label text style */
|
|
40
|
+
textStyle?: TextStyle;
|
|
41
|
+
children?: React.ReactNode;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* RadioItem -- individual radio option within a RadioGroup.
|
|
45
|
+
*
|
|
46
|
+
* Renders a Pressable row with a circle indicator and label text.
|
|
47
|
+
* When selected, the circle shows a filled inner dot.
|
|
48
|
+
*
|
|
49
|
+
* ```tsx
|
|
50
|
+
* <RadioItem value="option-1">Option 1</RadioItem>
|
|
51
|
+
* ```
|
|
52
|
+
*/
|
|
53
|
+
declare function RadioItem({ value, disabled, style, textStyle, children, ...rest }: RadioItemProps): react_jsx_runtime.JSX.Element;
|
|
54
|
+
|
|
55
|
+
export { RadioGroup, type RadioGroupProps, RadioItem, type RadioItemProps };
|
package/dist/radio.js
ADDED
package/dist/select.cjs
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkB5YFEA66_cjs = require('./chunk-B5YFEA66.cjs');
|
|
4
|
+
require('./chunk-P5NAXMSC.cjs');
|
|
5
|
+
require('./chunk-BOUIB4OY.cjs');
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
Object.defineProperty(exports, "Select", {
|
|
10
|
+
enumerable: true,
|
|
11
|
+
get: function () { return chunkB5YFEA66_cjs.Select; }
|
|
12
|
+
});
|
|
13
|
+
Object.defineProperty(exports, "SelectContent", {
|
|
14
|
+
enumerable: true,
|
|
15
|
+
get: function () { return chunkB5YFEA66_cjs.SelectContent; }
|
|
16
|
+
});
|
|
17
|
+
Object.defineProperty(exports, "SelectOption", {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: function () { return chunkB5YFEA66_cjs.SelectOption; }
|
|
20
|
+
});
|
|
21
|
+
Object.defineProperty(exports, "SelectTrigger", {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
get: function () { return chunkB5YFEA66_cjs.SelectTrigger; }
|
|
24
|
+
});
|
|
25
|
+
//# sourceMappingURL=select.cjs.map
|
|
26
|
+
//# sourceMappingURL=select.cjs.map
|