@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.
Files changed (93) hide show
  1. package/dist/accordion.cjs +26 -0
  2. package/dist/accordion.d.cts +34 -0
  3. package/dist/accordion.d.ts +34 -0
  4. package/dist/accordion.js +5 -0
  5. package/dist/button.cjs +14 -0
  6. package/dist/button.d.cts +35 -0
  7. package/dist/button.d.ts +35 -0
  8. package/dist/button.js +5 -0
  9. package/dist/checkbox.cjs +14 -0
  10. package/dist/checkbox.d.cts +41 -0
  11. package/dist/checkbox.d.ts +41 -0
  12. package/dist/checkbox.js +5 -0
  13. package/dist/chunk-2SQB7RNT.cjs +110 -0
  14. package/dist/chunk-3MHE2C74.js +143 -0
  15. package/dist/chunk-45KMMZUT.js +131 -0
  16. package/dist/chunk-64DK6YFL.js +164 -0
  17. package/dist/chunk-73BDGPZT.js +89 -0
  18. package/dist/chunk-B5YFEA66.cjs +243 -0
  19. package/dist/chunk-BOUIB4OY.cjs +56 -0
  20. package/dist/chunk-C6HF6QXK.js +154 -0
  21. package/dist/chunk-CXQNNEPC.js +249 -0
  22. package/dist/chunk-EFRYMWJB.js +86 -0
  23. package/dist/chunk-FQUZIDVS.cjs +174 -0
  24. package/dist/chunk-G7WPUTB6.cjs +258 -0
  25. package/dist/chunk-HH3CEDSH.js +122 -0
  26. package/dist/chunk-IRQWSFCZ.cjs +156 -0
  27. package/dist/chunk-KU24A5PQ.js +92 -0
  28. package/dist/chunk-OMKUPSHJ.cjs +95 -0
  29. package/dist/chunk-P5NAXMSC.cjs +91 -0
  30. package/dist/chunk-PKDXWKLO.cjs +245 -0
  31. package/dist/chunk-PVTPOJRU.js +155 -0
  32. package/dist/chunk-Q7TEJ62Q.cjs +160 -0
  33. package/dist/chunk-THX22NZW.cjs +146 -0
  34. package/dist/chunk-UHVTF2Y4.js +172 -0
  35. package/dist/chunk-UYXJHKYK.cjs +166 -0
  36. package/dist/chunk-VP567WZL.js +237 -0
  37. package/dist/chunk-XBNX4SLA.js +105 -0
  38. package/dist/chunk-XND7AIKO.cjs +133 -0
  39. package/dist/chunk-XSOLJOBG.js +238 -0
  40. package/dist/chunk-Z2MBHXUQ.cjs +127 -0
  41. package/dist/chunk-ZPAOLIIG.cjs +88 -0
  42. package/dist/chunk-ZYOTKLBG.js +52 -0
  43. package/dist/dialog.cjs +38 -0
  44. package/dist/dialog.d.cts +83 -0
  45. package/dist/dialog.d.ts +83 -0
  46. package/dist/dialog.js +5 -0
  47. package/dist/index.cjs +187 -2063
  48. package/dist/index.d.cts +21 -651
  49. package/dist/index.d.ts +21 -651
  50. package/dist/index.js +15 -2025
  51. package/dist/input.cjs +14 -0
  52. package/dist/input.d.cts +57 -0
  53. package/dist/input.d.ts +57 -0
  54. package/dist/input.js +5 -0
  55. package/dist/layout.cjs +25 -0
  56. package/dist/layout.d.cts +108 -0
  57. package/dist/layout.d.ts +108 -0
  58. package/dist/layout.js +4 -0
  59. package/dist/menu.cjs +26 -0
  60. package/dist/menu.d.cts +34 -0
  61. package/dist/menu.d.ts +34 -0
  62. package/dist/menu.js +5 -0
  63. package/dist/radio.cjs +18 -0
  64. package/dist/radio.d.cts +55 -0
  65. package/dist/radio.d.ts +55 -0
  66. package/dist/radio.js +5 -0
  67. package/dist/select.cjs +26 -0
  68. package/dist/select.d.cts +86 -0
  69. package/dist/select.d.ts +86 -0
  70. package/dist/select.js +5 -0
  71. package/dist/switch.cjs +14 -0
  72. package/dist/switch.d.cts +27 -0
  73. package/dist/switch.d.ts +27 -0
  74. package/dist/switch.js +5 -0
  75. package/dist/tabs.cjs +26 -0
  76. package/dist/tabs.d.cts +33 -0
  77. package/dist/tabs.d.ts +33 -0
  78. package/dist/tabs.js +5 -0
  79. package/dist/textarea.cjs +14 -0
  80. package/dist/textarea.d.cts +55 -0
  81. package/dist/textarea.d.ts +55 -0
  82. package/dist/textarea.js +5 -0
  83. package/dist/theme.cjs +20 -0
  84. package/dist/theme.d.cts +59 -0
  85. package/dist/theme.d.ts +59 -0
  86. package/dist/theme.js +3 -0
  87. package/dist/toggle.cjs +18 -0
  88. package/dist/toggle.d.cts +41 -0
  89. package/dist/toggle.d.ts +41 -0
  90. package/dist/toggle.js +5 -0
  91. package/package.json +146 -4
  92. package/dist/index.cjs.map +0 -1
  93. 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 };
@@ -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
@@ -0,0 +1,5 @@
1
+ export { Select, SelectContent, SelectOption, SelectTrigger } from './chunk-XSOLJOBG.js';
2
+ import './chunk-73BDGPZT.js';
3
+ import './chunk-ZYOTKLBG.js';
4
+ //# sourceMappingURL=select.js.map
5
+ //# sourceMappingURL=select.js.map
@@ -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 };
@@ -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
@@ -0,0 +1,5 @@
1
+ export { Switch } from './chunk-EFRYMWJB.js';
2
+ import './chunk-73BDGPZT.js';
3
+ import './chunk-ZYOTKLBG.js';
4
+ //# sourceMappingURL=switch.js.map
5
+ //# sourceMappingURL=switch.js.map
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
@@ -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,5 @@
1
+ export { Tab, TabList, TabPanel, Tabs } from './chunk-XBNX4SLA.js';
2
+ import './chunk-73BDGPZT.js';
3
+ import './chunk-ZYOTKLBG.js';
4
+ //# sourceMappingURL=tabs.js.map
5
+ //# sourceMappingURL=tabs.js.map
@@ -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 };
@@ -0,0 +1,5 @@
1
+ export { Textarea } from './chunk-64DK6YFL.js';
2
+ import './chunk-73BDGPZT.js';
3
+ import './chunk-ZYOTKLBG.js';
4
+ //# sourceMappingURL=textarea.js.map
5
+ //# sourceMappingURL=textarea.js.map
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
@@ -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 };
@@ -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
@@ -0,0 +1,3 @@
1
+ export { EntropixProvider, registerBrand, useTheme } from './chunk-ZYOTKLBG.js';
2
+ //# sourceMappingURL=theme.js.map
3
+ //# sourceMappingURL=theme.js.map
@@ -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