@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
|
@@ -0,0 +1,86 @@
|
|
|
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 { UseSelectOptions } from '@entropix/core';
|
|
5
|
+
|
|
6
|
+
interface SelectProps extends UseSelectOptions {
|
|
7
|
+
/** Label text displayed above the select */
|
|
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
|
+
* Select -- compound component root that provides select state via context.
|
|
19
|
+
*
|
|
20
|
+
* ```tsx
|
|
21
|
+
* <Select label="Country" onChange={setCountry} placeholder="Choose...">
|
|
22
|
+
* <SelectTrigger />
|
|
23
|
+
* <SelectContent>
|
|
24
|
+
* <SelectOption value="us">United States</SelectOption>
|
|
25
|
+
* <SelectOption value="ca">Canada</SelectOption>
|
|
26
|
+
* </SelectContent>
|
|
27
|
+
* </Select>
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
declare function Select({ label, style, textStyle, children, testID, ...options }: SelectProps): react_jsx_runtime.JSX.Element;
|
|
31
|
+
|
|
32
|
+
interface SelectTriggerProps extends Omit<PressableProps, "disabled" | "onPress" | "style" | "children"> {
|
|
33
|
+
/** Placeholder text when no value is selected */
|
|
34
|
+
placeholder?: string;
|
|
35
|
+
/** Display label for the currently selected value */
|
|
36
|
+
displayValue?: string;
|
|
37
|
+
/** Override container style */
|
|
38
|
+
style?: StyleProp<ViewStyle>;
|
|
39
|
+
/** Override text style */
|
|
40
|
+
textStyle?: TextStyle;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* SelectTrigger -- the button that opens the select dropdown.
|
|
44
|
+
*
|
|
45
|
+
* Renders as a bordered input-like row with the selected value
|
|
46
|
+
* (or placeholder) and a chevron indicator.
|
|
47
|
+
*/
|
|
48
|
+
declare function SelectTrigger({ placeholder, displayValue, style, textStyle, ...rest }: SelectTriggerProps): react_jsx_runtime.JSX.Element;
|
|
49
|
+
|
|
50
|
+
interface SelectContentProps {
|
|
51
|
+
children: React.ReactNode;
|
|
52
|
+
/** Override listbox container style */
|
|
53
|
+
style?: StyleProp<ViewStyle>;
|
|
54
|
+
/** testID for testing */
|
|
55
|
+
testID?: string;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* SelectContent -- the dropdown listbox rendered inside a Modal.
|
|
59
|
+
*
|
|
60
|
+
* Displays the option list when the select is open.
|
|
61
|
+
* Tapping the overlay closes the select.
|
|
62
|
+
*/
|
|
63
|
+
declare function SelectContent({ children, style, testID }: SelectContentProps): react_jsx_runtime.JSX.Element | null;
|
|
64
|
+
|
|
65
|
+
interface SelectOptionProps extends Omit<PressableProps, "disabled" | "onPress" | "style" | "children"> {
|
|
66
|
+
/** The value this option represents */
|
|
67
|
+
value: string;
|
|
68
|
+
/** Index of this option in the list (auto-assigned by SelectContent if omitted) */
|
|
69
|
+
index?: number;
|
|
70
|
+
/** Whether this option is disabled */
|
|
71
|
+
disabled?: boolean;
|
|
72
|
+
/** Override container style */
|
|
73
|
+
style?: StyleProp<ViewStyle>;
|
|
74
|
+
/** Override text style */
|
|
75
|
+
textStyle?: TextStyle;
|
|
76
|
+
children: React.ReactNode;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* SelectOption -- an individual option within SelectContent.
|
|
80
|
+
*
|
|
81
|
+
* Renders as a Pressable row. Selected option gets a highlight
|
|
82
|
+
* background to indicate the current selection.
|
|
83
|
+
*/
|
|
84
|
+
declare function SelectOption({ value, index, disabled, style, textStyle, children, ...rest }: SelectOptionProps): react_jsx_runtime.JSX.Element;
|
|
85
|
+
|
|
86
|
+
export { Select, SelectContent, type SelectContentProps, SelectOption, type SelectOptionProps, type SelectProps, SelectTrigger, type SelectTriggerProps };
|
package/dist/select.d.ts
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
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 { UseSelectOptions } from '@entropix/core';
|
|
5
|
+
|
|
6
|
+
interface SelectProps extends UseSelectOptions {
|
|
7
|
+
/** Label text displayed above the select */
|
|
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
|
+
* Select -- compound component root that provides select state via context.
|
|
19
|
+
*
|
|
20
|
+
* ```tsx
|
|
21
|
+
* <Select label="Country" onChange={setCountry} placeholder="Choose...">
|
|
22
|
+
* <SelectTrigger />
|
|
23
|
+
* <SelectContent>
|
|
24
|
+
* <SelectOption value="us">United States</SelectOption>
|
|
25
|
+
* <SelectOption value="ca">Canada</SelectOption>
|
|
26
|
+
* </SelectContent>
|
|
27
|
+
* </Select>
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
declare function Select({ label, style, textStyle, children, testID, ...options }: SelectProps): react_jsx_runtime.JSX.Element;
|
|
31
|
+
|
|
32
|
+
interface SelectTriggerProps extends Omit<PressableProps, "disabled" | "onPress" | "style" | "children"> {
|
|
33
|
+
/** Placeholder text when no value is selected */
|
|
34
|
+
placeholder?: string;
|
|
35
|
+
/** Display label for the currently selected value */
|
|
36
|
+
displayValue?: string;
|
|
37
|
+
/** Override container style */
|
|
38
|
+
style?: StyleProp<ViewStyle>;
|
|
39
|
+
/** Override text style */
|
|
40
|
+
textStyle?: TextStyle;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* SelectTrigger -- the button that opens the select dropdown.
|
|
44
|
+
*
|
|
45
|
+
* Renders as a bordered input-like row with the selected value
|
|
46
|
+
* (or placeholder) and a chevron indicator.
|
|
47
|
+
*/
|
|
48
|
+
declare function SelectTrigger({ placeholder, displayValue, style, textStyle, ...rest }: SelectTriggerProps): react_jsx_runtime.JSX.Element;
|
|
49
|
+
|
|
50
|
+
interface SelectContentProps {
|
|
51
|
+
children: React.ReactNode;
|
|
52
|
+
/** Override listbox container style */
|
|
53
|
+
style?: StyleProp<ViewStyle>;
|
|
54
|
+
/** testID for testing */
|
|
55
|
+
testID?: string;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* SelectContent -- the dropdown listbox rendered inside a Modal.
|
|
59
|
+
*
|
|
60
|
+
* Displays the option list when the select is open.
|
|
61
|
+
* Tapping the overlay closes the select.
|
|
62
|
+
*/
|
|
63
|
+
declare function SelectContent({ children, style, testID }: SelectContentProps): react_jsx_runtime.JSX.Element | null;
|
|
64
|
+
|
|
65
|
+
interface SelectOptionProps extends Omit<PressableProps, "disabled" | "onPress" | "style" | "children"> {
|
|
66
|
+
/** The value this option represents */
|
|
67
|
+
value: string;
|
|
68
|
+
/** Index of this option in the list (auto-assigned by SelectContent if omitted) */
|
|
69
|
+
index?: number;
|
|
70
|
+
/** Whether this option is disabled */
|
|
71
|
+
disabled?: boolean;
|
|
72
|
+
/** Override container style */
|
|
73
|
+
style?: StyleProp<ViewStyle>;
|
|
74
|
+
/** Override text style */
|
|
75
|
+
textStyle?: TextStyle;
|
|
76
|
+
children: React.ReactNode;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* SelectOption -- an individual option within SelectContent.
|
|
80
|
+
*
|
|
81
|
+
* Renders as a Pressable row. Selected option gets a highlight
|
|
82
|
+
* background to indicate the current selection.
|
|
83
|
+
*/
|
|
84
|
+
declare function SelectOption({ value, index, disabled, style, textStyle, children, ...rest }: SelectOptionProps): react_jsx_runtime.JSX.Element;
|
|
85
|
+
|
|
86
|
+
export { Select, SelectContent, type SelectContentProps, SelectOption, type SelectOptionProps, type SelectProps, SelectTrigger, type SelectTriggerProps };
|
package/dist/select.js
ADDED
package/dist/switch.cjs
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkZPAOLIIG_cjs = require('./chunk-ZPAOLIIG.cjs');
|
|
4
|
+
require('./chunk-P5NAXMSC.cjs');
|
|
5
|
+
require('./chunk-BOUIB4OY.cjs');
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
Object.defineProperty(exports, "Switch", {
|
|
10
|
+
enumerable: true,
|
|
11
|
+
get: function () { return chunkZPAOLIIG_cjs.Switch; }
|
|
12
|
+
});
|
|
13
|
+
//# sourceMappingURL=switch.cjs.map
|
|
14
|
+
//# sourceMappingURL=switch.cjs.map
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { PressableProps, StyleProp, ViewStyle } from 'react-native';
|
|
3
|
+
|
|
4
|
+
interface SwitchProps extends Omit<PressableProps, "disabled" | "onPress" | "style" | "children"> {
|
|
5
|
+
/** Controlled checked state */
|
|
6
|
+
checked?: boolean;
|
|
7
|
+
/** Default checked state for uncontrolled mode */
|
|
8
|
+
defaultChecked?: boolean;
|
|
9
|
+
/** Called when checked state changes */
|
|
10
|
+
onChange?: (checked: boolean) => void;
|
|
11
|
+
/** Whether the switch is disabled */
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
/** Accessible label */
|
|
14
|
+
label?: string;
|
|
15
|
+
/** Override track style */
|
|
16
|
+
style?: StyleProp<ViewStyle>;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Switch — styled toggle with track + sliding thumb.
|
|
20
|
+
*
|
|
21
|
+
* ```tsx
|
|
22
|
+
* <Switch checked={isOn} onChange={setIsOn} label="Notifications" />
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
declare function Switch({ checked, defaultChecked, onChange, disabled, label, style, ...rest }: SwitchProps): react_jsx_runtime.JSX.Element;
|
|
26
|
+
|
|
27
|
+
export { Switch, type SwitchProps };
|
package/dist/switch.d.ts
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { PressableProps, StyleProp, ViewStyle } from 'react-native';
|
|
3
|
+
|
|
4
|
+
interface SwitchProps extends Omit<PressableProps, "disabled" | "onPress" | "style" | "children"> {
|
|
5
|
+
/** Controlled checked state */
|
|
6
|
+
checked?: boolean;
|
|
7
|
+
/** Default checked state for uncontrolled mode */
|
|
8
|
+
defaultChecked?: boolean;
|
|
9
|
+
/** Called when checked state changes */
|
|
10
|
+
onChange?: (checked: boolean) => void;
|
|
11
|
+
/** Whether the switch is disabled */
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
/** Accessible label */
|
|
14
|
+
label?: string;
|
|
15
|
+
/** Override track style */
|
|
16
|
+
style?: StyleProp<ViewStyle>;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Switch — styled toggle with track + sliding thumb.
|
|
20
|
+
*
|
|
21
|
+
* ```tsx
|
|
22
|
+
* <Switch checked={isOn} onChange={setIsOn} label="Notifications" />
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
declare function Switch({ checked, defaultChecked, onChange, disabled, label, style, ...rest }: SwitchProps): react_jsx_runtime.JSX.Element;
|
|
26
|
+
|
|
27
|
+
export { Switch, type SwitchProps };
|
package/dist/switch.js
ADDED
package/dist/tabs.cjs
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunk2SQB7RNT_cjs = require('./chunk-2SQB7RNT.cjs');
|
|
4
|
+
require('./chunk-P5NAXMSC.cjs');
|
|
5
|
+
require('./chunk-BOUIB4OY.cjs');
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
Object.defineProperty(exports, "Tab", {
|
|
10
|
+
enumerable: true,
|
|
11
|
+
get: function () { return chunk2SQB7RNT_cjs.Tab; }
|
|
12
|
+
});
|
|
13
|
+
Object.defineProperty(exports, "TabList", {
|
|
14
|
+
enumerable: true,
|
|
15
|
+
get: function () { return chunk2SQB7RNT_cjs.TabList; }
|
|
16
|
+
});
|
|
17
|
+
Object.defineProperty(exports, "TabPanel", {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: function () { return chunk2SQB7RNT_cjs.TabPanel; }
|
|
20
|
+
});
|
|
21
|
+
Object.defineProperty(exports, "Tabs", {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
get: function () { return chunk2SQB7RNT_cjs.Tabs; }
|
|
24
|
+
});
|
|
25
|
+
//# sourceMappingURL=tabs.cjs.map
|
|
26
|
+
//# sourceMappingURL=tabs.cjs.map
|
package/dist/tabs.d.cts
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { StyleProp, ViewStyle, PressableProps, TextStyle } from 'react-native';
|
|
4
|
+
import { UseTabsOptions } from '@entropix/core';
|
|
5
|
+
|
|
6
|
+
interface TabsProps extends UseTabsOptions {
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
style?: StyleProp<ViewStyle>;
|
|
9
|
+
}
|
|
10
|
+
declare function Tabs({ children, style, ...options }: TabsProps): react_jsx_runtime.JSX.Element;
|
|
11
|
+
|
|
12
|
+
interface TabListProps {
|
|
13
|
+
children: React.ReactNode;
|
|
14
|
+
style?: StyleProp<ViewStyle>;
|
|
15
|
+
}
|
|
16
|
+
declare function TabList({ children, style }: TabListProps): react_jsx_runtime.JSX.Element;
|
|
17
|
+
|
|
18
|
+
interface TabProps extends Omit<PressableProps, "onPress" | "style" | "children"> {
|
|
19
|
+
value: string;
|
|
20
|
+
children: React.ReactNode;
|
|
21
|
+
style?: StyleProp<ViewStyle>;
|
|
22
|
+
textStyle?: TextStyle;
|
|
23
|
+
}
|
|
24
|
+
declare function Tab({ value, children, style, textStyle, ...rest }: TabProps): react_jsx_runtime.JSX.Element;
|
|
25
|
+
|
|
26
|
+
interface TabPanelProps {
|
|
27
|
+
value: string;
|
|
28
|
+
children: React.ReactNode;
|
|
29
|
+
style?: StyleProp<ViewStyle>;
|
|
30
|
+
}
|
|
31
|
+
declare function TabPanel({ value, children, style }: TabPanelProps): react_jsx_runtime.JSX.Element | null;
|
|
32
|
+
|
|
33
|
+
export { Tab, TabList, type TabListProps, TabPanel, type TabPanelProps, type TabProps, Tabs, type TabsProps };
|
package/dist/tabs.d.ts
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { StyleProp, ViewStyle, PressableProps, TextStyle } from 'react-native';
|
|
4
|
+
import { UseTabsOptions } from '@entropix/core';
|
|
5
|
+
|
|
6
|
+
interface TabsProps extends UseTabsOptions {
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
style?: StyleProp<ViewStyle>;
|
|
9
|
+
}
|
|
10
|
+
declare function Tabs({ children, style, ...options }: TabsProps): react_jsx_runtime.JSX.Element;
|
|
11
|
+
|
|
12
|
+
interface TabListProps {
|
|
13
|
+
children: React.ReactNode;
|
|
14
|
+
style?: StyleProp<ViewStyle>;
|
|
15
|
+
}
|
|
16
|
+
declare function TabList({ children, style }: TabListProps): react_jsx_runtime.JSX.Element;
|
|
17
|
+
|
|
18
|
+
interface TabProps extends Omit<PressableProps, "onPress" | "style" | "children"> {
|
|
19
|
+
value: string;
|
|
20
|
+
children: React.ReactNode;
|
|
21
|
+
style?: StyleProp<ViewStyle>;
|
|
22
|
+
textStyle?: TextStyle;
|
|
23
|
+
}
|
|
24
|
+
declare function Tab({ value, children, style, textStyle, ...rest }: TabProps): react_jsx_runtime.JSX.Element;
|
|
25
|
+
|
|
26
|
+
interface TabPanelProps {
|
|
27
|
+
value: string;
|
|
28
|
+
children: React.ReactNode;
|
|
29
|
+
style?: StyleProp<ViewStyle>;
|
|
30
|
+
}
|
|
31
|
+
declare function TabPanel({ value, children, style }: TabPanelProps): react_jsx_runtime.JSX.Element | null;
|
|
32
|
+
|
|
33
|
+
export { Tab, TabList, type TabListProps, TabPanel, type TabPanelProps, type TabProps, Tabs, type TabsProps };
|
package/dist/tabs.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkUYXJHKYK_cjs = require('./chunk-UYXJHKYK.cjs');
|
|
4
|
+
require('./chunk-P5NAXMSC.cjs');
|
|
5
|
+
require('./chunk-BOUIB4OY.cjs');
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
Object.defineProperty(exports, "Textarea", {
|
|
10
|
+
enumerable: true,
|
|
11
|
+
get: function () { return chunkUYXJHKYK_cjs.Textarea; }
|
|
12
|
+
});
|
|
13
|
+
//# sourceMappingURL=textarea.cjs.map
|
|
14
|
+
//# sourceMappingURL=textarea.cjs.map
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { StyleProp, ViewStyle, TextStyle } from 'react-native';
|
|
3
|
+
|
|
4
|
+
type TextareaSize = "sm" | "md" | "lg";
|
|
5
|
+
interface TextareaProps {
|
|
6
|
+
/** Controlled value */
|
|
7
|
+
value?: string;
|
|
8
|
+
/** Default value for uncontrolled mode */
|
|
9
|
+
defaultValue?: string;
|
|
10
|
+
/** Called when the value changes */
|
|
11
|
+
onChange?: (value: string) => void;
|
|
12
|
+
/** Whether the textarea is disabled */
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
/** Whether the textarea is read-only */
|
|
15
|
+
readOnly?: boolean;
|
|
16
|
+
/** Whether the textarea is required */
|
|
17
|
+
required?: boolean;
|
|
18
|
+
/** Whether the textarea is in an invalid state */
|
|
19
|
+
invalid?: boolean;
|
|
20
|
+
/** Label text displayed above the textarea */
|
|
21
|
+
label?: string;
|
|
22
|
+
/** Helper text displayed below the textarea */
|
|
23
|
+
helperText?: string;
|
|
24
|
+
/** Error message displayed below the textarea when invalid */
|
|
25
|
+
errorMessage?: string;
|
|
26
|
+
/** Placeholder text */
|
|
27
|
+
placeholder?: string;
|
|
28
|
+
/** Number of visible lines. Default: 4 */
|
|
29
|
+
numberOfLines?: number;
|
|
30
|
+
/** Size variant. Default: "md" */
|
|
31
|
+
size?: TextareaSize;
|
|
32
|
+
/** Override wrapper View style */
|
|
33
|
+
style?: StyleProp<ViewStyle>;
|
|
34
|
+
/** Override TextInput style */
|
|
35
|
+
inputStyle?: StyleProp<TextStyle>;
|
|
36
|
+
/** Override label and helper Text style */
|
|
37
|
+
textStyle?: TextStyle;
|
|
38
|
+
/** testID for testing */
|
|
39
|
+
testID?: string;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Textarea -- multiline text input with label, helper text, and error message.
|
|
43
|
+
*
|
|
44
|
+
* ```tsx
|
|
45
|
+
* <Textarea
|
|
46
|
+
* label="Description"
|
|
47
|
+
* placeholder="Enter description..."
|
|
48
|
+
* numberOfLines={6}
|
|
49
|
+
* onChange={setDescription}
|
|
50
|
+
* />
|
|
51
|
+
* ```
|
|
52
|
+
*/
|
|
53
|
+
declare function Textarea({ value, defaultValue, onChange, disabled, readOnly, required, invalid, label, helperText, errorMessage, placeholder, numberOfLines, size, style, inputStyle, textStyle, testID, }: TextareaProps): react_jsx_runtime.JSX.Element;
|
|
54
|
+
|
|
55
|
+
export { Textarea, type TextareaProps, type TextareaSize };
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { StyleProp, ViewStyle, TextStyle } from 'react-native';
|
|
3
|
+
|
|
4
|
+
type TextareaSize = "sm" | "md" | "lg";
|
|
5
|
+
interface TextareaProps {
|
|
6
|
+
/** Controlled value */
|
|
7
|
+
value?: string;
|
|
8
|
+
/** Default value for uncontrolled mode */
|
|
9
|
+
defaultValue?: string;
|
|
10
|
+
/** Called when the value changes */
|
|
11
|
+
onChange?: (value: string) => void;
|
|
12
|
+
/** Whether the textarea is disabled */
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
/** Whether the textarea is read-only */
|
|
15
|
+
readOnly?: boolean;
|
|
16
|
+
/** Whether the textarea is required */
|
|
17
|
+
required?: boolean;
|
|
18
|
+
/** Whether the textarea is in an invalid state */
|
|
19
|
+
invalid?: boolean;
|
|
20
|
+
/** Label text displayed above the textarea */
|
|
21
|
+
label?: string;
|
|
22
|
+
/** Helper text displayed below the textarea */
|
|
23
|
+
helperText?: string;
|
|
24
|
+
/** Error message displayed below the textarea when invalid */
|
|
25
|
+
errorMessage?: string;
|
|
26
|
+
/** Placeholder text */
|
|
27
|
+
placeholder?: string;
|
|
28
|
+
/** Number of visible lines. Default: 4 */
|
|
29
|
+
numberOfLines?: number;
|
|
30
|
+
/** Size variant. Default: "md" */
|
|
31
|
+
size?: TextareaSize;
|
|
32
|
+
/** Override wrapper View style */
|
|
33
|
+
style?: StyleProp<ViewStyle>;
|
|
34
|
+
/** Override TextInput style */
|
|
35
|
+
inputStyle?: StyleProp<TextStyle>;
|
|
36
|
+
/** Override label and helper Text style */
|
|
37
|
+
textStyle?: TextStyle;
|
|
38
|
+
/** testID for testing */
|
|
39
|
+
testID?: string;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Textarea -- multiline text input with label, helper text, and error message.
|
|
43
|
+
*
|
|
44
|
+
* ```tsx
|
|
45
|
+
* <Textarea
|
|
46
|
+
* label="Description"
|
|
47
|
+
* placeholder="Enter description..."
|
|
48
|
+
* numberOfLines={6}
|
|
49
|
+
* onChange={setDescription}
|
|
50
|
+
* />
|
|
51
|
+
* ```
|
|
52
|
+
*/
|
|
53
|
+
declare function Textarea({ value, defaultValue, onChange, disabled, readOnly, required, invalid, label, helperText, errorMessage, placeholder, numberOfLines, size, style, inputStyle, textStyle, testID, }: TextareaProps): react_jsx_runtime.JSX.Element;
|
|
54
|
+
|
|
55
|
+
export { Textarea, type TextareaProps, type TextareaSize };
|
package/dist/textarea.js
ADDED
package/dist/theme.cjs
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkBOUIB4OY_cjs = require('./chunk-BOUIB4OY.cjs');
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
Object.defineProperty(exports, "EntropixProvider", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function () { return chunkBOUIB4OY_cjs.EntropixProvider; }
|
|
10
|
+
});
|
|
11
|
+
Object.defineProperty(exports, "registerBrand", {
|
|
12
|
+
enumerable: true,
|
|
13
|
+
get: function () { return chunkBOUIB4OY_cjs.registerBrand; }
|
|
14
|
+
});
|
|
15
|
+
Object.defineProperty(exports, "useTheme", {
|
|
16
|
+
enumerable: true,
|
|
17
|
+
get: function () { return chunkBOUIB4OY_cjs.useTheme; }
|
|
18
|
+
});
|
|
19
|
+
//# sourceMappingURL=theme.cjs.map
|
|
20
|
+
//# sourceMappingURL=theme.cjs.map
|
package/dist/theme.d.cts
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
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
|
+
|
|
6
|
+
type EntropixTheme = typeof tokens;
|
|
7
|
+
type ThemeMode = "light" | "dark";
|
|
8
|
+
type BrandName = string;
|
|
9
|
+
interface ThemeContextValue {
|
|
10
|
+
mode: ThemeMode;
|
|
11
|
+
brand: BrandName;
|
|
12
|
+
tokens: EntropixTheme;
|
|
13
|
+
baseTokens: typeof tokens$1;
|
|
14
|
+
}
|
|
15
|
+
type BrandThemes = Record<ThemeMode, EntropixTheme>;
|
|
16
|
+
/**
|
|
17
|
+
* registerBrand — Register a custom brand's theme tokens.
|
|
18
|
+
*
|
|
19
|
+
* Call this before rendering EntropixProvider to make a brand available.
|
|
20
|
+
*
|
|
21
|
+
* ```ts
|
|
22
|
+
* import { tokens as acmeLight } from "@entropix/tokens/brands/ocean/native/light";
|
|
23
|
+
* import { tokens as acmeDark } from "@entropix/tokens/brands/ocean/native/dark";
|
|
24
|
+
*
|
|
25
|
+
* registerBrand("ocean", { light: acmeLight, dark: acmeDark });
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
declare function registerBrand(name: string, themes: BrandThemes): void;
|
|
29
|
+
interface EntropixProviderProps {
|
|
30
|
+
/** Theme mode: "light" or "dark". Default: "light" */
|
|
31
|
+
mode?: ThemeMode;
|
|
32
|
+
/** Brand name. Default: "default" */
|
|
33
|
+
brand?: BrandName;
|
|
34
|
+
/** Override tokens directly (bypasses brand registry) */
|
|
35
|
+
tokens?: EntropixTheme;
|
|
36
|
+
children: React.ReactNode;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* EntropixProvider — Provides theme tokens to all Entropix components.
|
|
40
|
+
*
|
|
41
|
+
* Wrap your app root with this provider. All Entropix components will
|
|
42
|
+
* automatically pick up the current theme tokens.
|
|
43
|
+
*
|
|
44
|
+
* ```tsx
|
|
45
|
+
* <EntropixProvider brand="ocean" mode="dark">
|
|
46
|
+
* <App />
|
|
47
|
+
* </EntropixProvider>
|
|
48
|
+
* ```
|
|
49
|
+
*/
|
|
50
|
+
declare function EntropixProvider({ mode, brand, tokens: tokenOverride, children, }: EntropixProviderProps): react_jsx_runtime.JSX.Element;
|
|
51
|
+
/**
|
|
52
|
+
* useTheme — Access current Entropix theme tokens.
|
|
53
|
+
*
|
|
54
|
+
* Returns the resolved token values for the current theme and brand.
|
|
55
|
+
* Must be used within an EntropixProvider.
|
|
56
|
+
*/
|
|
57
|
+
declare function useTheme(): ThemeContextValue;
|
|
58
|
+
|
|
59
|
+
export { type BrandName, EntropixProvider, type EntropixProviderProps, type EntropixTheme, type ThemeMode, registerBrand, useTheme };
|
package/dist/theme.d.ts
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
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
|
+
|
|
6
|
+
type EntropixTheme = typeof tokens;
|
|
7
|
+
type ThemeMode = "light" | "dark";
|
|
8
|
+
type BrandName = string;
|
|
9
|
+
interface ThemeContextValue {
|
|
10
|
+
mode: ThemeMode;
|
|
11
|
+
brand: BrandName;
|
|
12
|
+
tokens: EntropixTheme;
|
|
13
|
+
baseTokens: typeof tokens$1;
|
|
14
|
+
}
|
|
15
|
+
type BrandThemes = Record<ThemeMode, EntropixTheme>;
|
|
16
|
+
/**
|
|
17
|
+
* registerBrand — Register a custom brand's theme tokens.
|
|
18
|
+
*
|
|
19
|
+
* Call this before rendering EntropixProvider to make a brand available.
|
|
20
|
+
*
|
|
21
|
+
* ```ts
|
|
22
|
+
* import { tokens as acmeLight } from "@entropix/tokens/brands/ocean/native/light";
|
|
23
|
+
* import { tokens as acmeDark } from "@entropix/tokens/brands/ocean/native/dark";
|
|
24
|
+
*
|
|
25
|
+
* registerBrand("ocean", { light: acmeLight, dark: acmeDark });
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
declare function registerBrand(name: string, themes: BrandThemes): void;
|
|
29
|
+
interface EntropixProviderProps {
|
|
30
|
+
/** Theme mode: "light" or "dark". Default: "light" */
|
|
31
|
+
mode?: ThemeMode;
|
|
32
|
+
/** Brand name. Default: "default" */
|
|
33
|
+
brand?: BrandName;
|
|
34
|
+
/** Override tokens directly (bypasses brand registry) */
|
|
35
|
+
tokens?: EntropixTheme;
|
|
36
|
+
children: React.ReactNode;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* EntropixProvider — Provides theme tokens to all Entropix components.
|
|
40
|
+
*
|
|
41
|
+
* Wrap your app root with this provider. All Entropix components will
|
|
42
|
+
* automatically pick up the current theme tokens.
|
|
43
|
+
*
|
|
44
|
+
* ```tsx
|
|
45
|
+
* <EntropixProvider brand="ocean" mode="dark">
|
|
46
|
+
* <App />
|
|
47
|
+
* </EntropixProvider>
|
|
48
|
+
* ```
|
|
49
|
+
*/
|
|
50
|
+
declare function EntropixProvider({ mode, brand, tokens: tokenOverride, children, }: EntropixProviderProps): react_jsx_runtime.JSX.Element;
|
|
51
|
+
/**
|
|
52
|
+
* useTheme — Access current Entropix theme tokens.
|
|
53
|
+
*
|
|
54
|
+
* Returns the resolved token values for the current theme and brand.
|
|
55
|
+
* Must be used within an EntropixProvider.
|
|
56
|
+
*/
|
|
57
|
+
declare function useTheme(): ThemeContextValue;
|
|
58
|
+
|
|
59
|
+
export { type BrandName, EntropixProvider, type EntropixProviderProps, type EntropixTheme, type ThemeMode, registerBrand, useTheme };
|
package/dist/theme.js
ADDED
package/dist/toggle.cjs
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkOMKUPSHJ_cjs = require('./chunk-OMKUPSHJ.cjs');
|
|
4
|
+
require('./chunk-P5NAXMSC.cjs');
|
|
5
|
+
require('./chunk-BOUIB4OY.cjs');
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
Object.defineProperty(exports, "Toggle", {
|
|
10
|
+
enumerable: true,
|
|
11
|
+
get: function () { return chunkOMKUPSHJ_cjs.Toggle; }
|
|
12
|
+
});
|
|
13
|
+
Object.defineProperty(exports, "ToggleInner", {
|
|
14
|
+
enumerable: true,
|
|
15
|
+
get: function () { return chunkOMKUPSHJ_cjs.ToggleInner; }
|
|
16
|
+
});
|
|
17
|
+
//# sourceMappingURL=toggle.cjs.map
|
|
18
|
+
//# sourceMappingURL=toggle.cjs.map
|