react-native-mantine 0.2.0 → 0.4.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.
Files changed (190) hide show
  1. package/README.md +613 -7
  2. package/lib/commonjs/components/Accordion/index.js +1 -2
  3. package/lib/commonjs/components/Accordion/index.js.map +1 -1
  4. package/lib/commonjs/components/Anchor/index.js +1 -2
  5. package/lib/commonjs/components/Anchor/index.js.map +1 -1
  6. package/lib/commonjs/components/AspectRatio/index.js +1 -2
  7. package/lib/commonjs/components/AspectRatio/index.js.map +1 -1
  8. package/lib/commonjs/components/Avatar/index.js +1 -2
  9. package/lib/commonjs/components/Avatar/index.js.map +1 -1
  10. package/lib/commonjs/components/BackgroundImage/index.js +1 -2
  11. package/lib/commonjs/components/BackgroundImage/index.js.map +1 -1
  12. package/lib/commonjs/components/Badge/index.js +1 -2
  13. package/lib/commonjs/components/Badge/index.js.map +1 -1
  14. package/lib/commonjs/components/Blockquote/index.js +1 -2
  15. package/lib/commonjs/components/Blockquote/index.js.map +1 -1
  16. package/lib/commonjs/components/Breadcrumbs/index.js +1 -2
  17. package/lib/commonjs/components/Breadcrumbs/index.js.map +1 -1
  18. package/lib/commonjs/components/Button/index.js +5 -3
  19. package/lib/commonjs/components/Button/index.js.map +1 -1
  20. package/lib/commonjs/components/Card/index.js +1 -2
  21. package/lib/commonjs/components/Card/index.js.map +1 -1
  22. package/lib/commonjs/components/Center/index.js +1 -2
  23. package/lib/commonjs/components/Center/index.js.map +1 -1
  24. package/lib/commonjs/components/Checkbox/index.js +1 -2
  25. package/lib/commonjs/components/Checkbox/index.js.map +1 -1
  26. package/lib/commonjs/components/Chip/index.js +1 -2
  27. package/lib/commonjs/components/Chip/index.js.map +1 -1
  28. package/lib/commonjs/components/CloseButton/index.js +1 -2
  29. package/lib/commonjs/components/CloseButton/index.js.map +1 -1
  30. package/lib/commonjs/components/Code/index.js +1 -2
  31. package/lib/commonjs/components/Code/index.js.map +1 -1
  32. package/lib/commonjs/components/Collapse/index.js +1 -2
  33. package/lib/commonjs/components/Collapse/index.js.map +1 -1
  34. package/lib/commonjs/components/ColorSwatch/index.js +1 -2
  35. package/lib/commonjs/components/ColorSwatch/index.js.map +1 -1
  36. package/lib/commonjs/components/Container/index.js +1 -2
  37. package/lib/commonjs/components/Container/index.js.map +1 -1
  38. package/lib/commonjs/components/CopyButton/index.js +4 -4
  39. package/lib/commonjs/components/CopyButton/index.js.map +1 -1
  40. package/lib/commonjs/components/Dialog/index.js +5 -6
  41. package/lib/commonjs/components/Dialog/index.js.map +1 -1
  42. package/lib/commonjs/components/Divider/index.js +1 -2
  43. package/lib/commonjs/components/Divider/index.js.map +1 -1
  44. package/lib/commonjs/components/Drawer/index.js +1 -2
  45. package/lib/commonjs/components/Drawer/index.js.map +1 -1
  46. package/lib/commonjs/components/Flex/index.js +1 -2
  47. package/lib/commonjs/components/Flex/index.js.map +1 -1
  48. package/lib/commonjs/components/Grid/index.js +1 -2
  49. package/lib/commonjs/components/Grid/index.js.map +1 -1
  50. package/lib/commonjs/components/Image/index.js +1 -2
  51. package/lib/commonjs/components/Image/index.js.map +1 -1
  52. package/lib/commonjs/components/Indicator/index.js +1 -2
  53. package/lib/commonjs/components/Indicator/index.js.map +1 -1
  54. package/lib/commonjs/components/Kbd/index.js +1 -2
  55. package/lib/commonjs/components/Kbd/index.js.map +1 -1
  56. package/lib/commonjs/components/List/index.js +1 -2
  57. package/lib/commonjs/components/List/index.js.map +1 -1
  58. package/lib/commonjs/components/Mark/index.js +1 -2
  59. package/lib/commonjs/components/Mark/index.js.map +1 -1
  60. package/lib/commonjs/components/MediaQuery/index.js +1 -2
  61. package/lib/commonjs/components/MediaQuery/index.js.map +1 -1
  62. package/lib/commonjs/components/Menu/index.js +1 -2
  63. package/lib/commonjs/components/Menu/index.js.map +1 -1
  64. package/lib/commonjs/components/Modal/index.js +1 -2
  65. package/lib/commonjs/components/Modal/index.js.map +1 -1
  66. package/lib/commonjs/components/MultiSelect/index.js +1 -2
  67. package/lib/commonjs/components/MultiSelect/index.js.map +1 -1
  68. package/lib/commonjs/components/NativeSelect/index.js +1 -2
  69. package/lib/commonjs/components/NativeSelect/index.js.map +1 -1
  70. package/lib/commonjs/components/NavLink/index.js +1 -2
  71. package/lib/commonjs/components/NavLink/index.js.map +1 -1
  72. package/lib/commonjs/components/Notification/index.js +1 -2
  73. package/lib/commonjs/components/Notification/index.js.map +1 -1
  74. package/lib/commonjs/components/NumberInput/index.js +1 -2
  75. package/lib/commonjs/components/NumberInput/index.js.map +1 -1
  76. package/lib/commonjs/components/Overlay/index.js +1 -2
  77. package/lib/commonjs/components/Overlay/index.js.map +1 -1
  78. package/lib/commonjs/components/Pagination/index.js +1 -2
  79. package/lib/commonjs/components/Pagination/index.js.map +1 -1
  80. package/lib/commonjs/components/Paper/index.js +1 -2
  81. package/lib/commonjs/components/Paper/index.js.map +1 -1
  82. package/lib/commonjs/components/PasswordInput/index.js +1 -2
  83. package/lib/commonjs/components/PasswordInput/index.js.map +1 -1
  84. package/lib/commonjs/components/Popover/index.js +1 -2
  85. package/lib/commonjs/components/Popover/index.js.map +1 -1
  86. package/lib/commonjs/components/Portal/index.js +1 -2
  87. package/lib/commonjs/components/Portal/index.js.map +1 -1
  88. package/lib/commonjs/components/Radio/index.js +1 -2
  89. package/lib/commonjs/components/Radio/index.js.map +1 -1
  90. package/lib/commonjs/components/Rating/index.js +1 -2
  91. package/lib/commonjs/components/Rating/index.js.map +1 -1
  92. package/lib/commonjs/components/RingProgress/index.js +1 -2
  93. package/lib/commonjs/components/RingProgress/index.js.map +1 -1
  94. package/lib/commonjs/components/SegmentedControl/index.js +1 -2
  95. package/lib/commonjs/components/SegmentedControl/index.js.map +1 -1
  96. package/lib/commonjs/components/Select/index.js +1 -2
  97. package/lib/commonjs/components/Select/index.js.map +1 -1
  98. package/lib/commonjs/components/SimpleGrid/index.js +1 -2
  99. package/lib/commonjs/components/SimpleGrid/index.js.map +1 -1
  100. package/lib/commonjs/components/Skeleton/index.js +1 -2
  101. package/lib/commonjs/components/Skeleton/index.js.map +1 -1
  102. package/lib/commonjs/components/Slider/index.js +1 -2
  103. package/lib/commonjs/components/Slider/index.js.map +1 -1
  104. package/lib/commonjs/components/Spoiler/index.js +1 -2
  105. package/lib/commonjs/components/Spoiler/index.js.map +1 -1
  106. package/lib/commonjs/components/Stepper/index.js +1 -2
  107. package/lib/commonjs/components/Stepper/index.js.map +1 -1
  108. package/lib/commonjs/components/Switch/index.js +1 -2
  109. package/lib/commonjs/components/Switch/index.js.map +1 -1
  110. package/lib/commonjs/components/Table/index.js +1 -2
  111. package/lib/commonjs/components/Table/index.js.map +1 -1
  112. package/lib/commonjs/components/TextInput/index.js +1 -2
  113. package/lib/commonjs/components/TextInput/index.js.map +1 -1
  114. package/lib/commonjs/components/ThemeIcon/index.js +4 -5
  115. package/lib/commonjs/components/ThemeIcon/index.js.map +1 -1
  116. package/lib/commonjs/components/Timeline/index.js +1 -2
  117. package/lib/commonjs/components/Timeline/index.js.map +1 -1
  118. package/lib/commonjs/components/Title/index.js +1 -2
  119. package/lib/commonjs/components/Title/index.js.map +1 -1
  120. package/lib/commonjs/components/Tooltip/index.js +1 -2
  121. package/lib/commonjs/components/Tooltip/index.js.map +1 -1
  122. package/lib/commonjs/components/TransferList/index.js +1 -2
  123. package/lib/commonjs/components/TransferList/index.js.map +1 -1
  124. package/lib/commonjs/components/Transition/index.js +1 -2
  125. package/lib/commonjs/components/Transition/index.js.map +1 -1
  126. package/lib/commonjs/components/UnstyledButton/UnstyledButton.js +2 -6
  127. package/lib/commonjs/components/UnstyledButton/UnstyledButton.js.map +1 -1
  128. package/lib/commonjs/components/index.js +87 -87
  129. package/lib/commonjs/components/index.js.map +1 -1
  130. package/lib/commonjs/hooks/useCachedResources.js +1 -2
  131. package/lib/commonjs/hooks/useCachedResources.js.map +1 -1
  132. package/lib/commonjs/package.json +1 -0
  133. package/lib/commonjs/theme/create-theme.js +3 -1
  134. package/lib/commonjs/theme/create-theme.js.map +1 -1
  135. package/lib/commonjs/theme/functions/fns/index.js +1 -2
  136. package/lib/commonjs/theme/functions/fns/index.js.map +1 -1
  137. package/lib/commonjs/theme/get-size/index.js +2 -2
  138. package/lib/commonjs/theme/get-size/index.js.map +1 -1
  139. package/lib/commonjs/theme/theme-provider.js +10 -9
  140. package/lib/commonjs/theme/theme-provider.js.map +1 -1
  141. package/lib/module/components/Button/index.js +4 -1
  142. package/lib/module/components/Button/index.js.map +1 -1
  143. package/lib/module/components/CopyButton/index.js +3 -3
  144. package/lib/module/components/CopyButton/index.js.map +1 -1
  145. package/lib/module/components/Dialog/index.js +4 -4
  146. package/lib/module/components/Dialog/index.js.map +1 -1
  147. package/lib/module/components/ThemeIcon/index.js +3 -3
  148. package/lib/module/components/ThemeIcon/index.js.map +1 -1
  149. package/lib/module/components/UnstyledButton/UnstyledButton.js +1 -4
  150. package/lib/module/components/UnstyledButton/UnstyledButton.js.map +1 -1
  151. package/lib/module/package.json +1 -0
  152. package/lib/module/theme/create-theme.js +3 -1
  153. package/lib/module/theme/create-theme.js.map +1 -1
  154. package/lib/module/theme/get-size/index.js +2 -2
  155. package/lib/module/theme/get-size/index.js.map +1 -1
  156. package/lib/module/theme/theme-provider.js +9 -7
  157. package/lib/module/theme/theme-provider.js.map +1 -1
  158. package/lib/typescript/commonjs/src/components/Button/index.d.ts.map +1 -1
  159. package/lib/typescript/commonjs/src/components/CopyButton/index.d.ts +1 -1
  160. package/lib/typescript/commonjs/src/components/CopyButton/index.d.ts.map +1 -1
  161. package/lib/typescript/commonjs/src/components/Group/index.d.ts.map +1 -1
  162. package/lib/typescript/commonjs/src/components/Stack/index.d.ts.map +1 -1
  163. package/lib/typescript/commonjs/src/components/UnstyledButton/UnstyledButton.d.ts.map +1 -1
  164. package/lib/typescript/commonjs/src/theme/create-theme.d.ts.map +1 -1
  165. package/lib/typescript/commonjs/src/theme/functions/fns/helpers.d.ts.map +1 -1
  166. package/lib/typescript/commonjs/src/theme/functions/fns/index.d.ts.map +1 -1
  167. package/lib/typescript/commonjs/src/theme/functions/fns/radius.d.ts.map +1 -1
  168. package/lib/typescript/commonjs/src/theme/functions/fns/variant.d.ts.map +1 -1
  169. package/lib/typescript/commonjs/src/theme/theme-provider.d.ts.map +1 -1
  170. package/lib/typescript/module/src/components/Button/index.d.ts.map +1 -1
  171. package/lib/typescript/module/src/components/CopyButton/index.d.ts +1 -1
  172. package/lib/typescript/module/src/components/CopyButton/index.d.ts.map +1 -1
  173. package/lib/typescript/module/src/components/Group/index.d.ts.map +1 -1
  174. package/lib/typescript/module/src/components/Stack/index.d.ts.map +1 -1
  175. package/lib/typescript/module/src/components/UnstyledButton/UnstyledButton.d.ts.map +1 -1
  176. package/lib/typescript/module/src/theme/create-theme.d.ts.map +1 -1
  177. package/lib/typescript/module/src/theme/functions/fns/helpers.d.ts.map +1 -1
  178. package/lib/typescript/module/src/theme/functions/fns/index.d.ts.map +1 -1
  179. package/lib/typescript/module/src/theme/functions/fns/radius.d.ts.map +1 -1
  180. package/lib/typescript/module/src/theme/functions/fns/variant.d.ts.map +1 -1
  181. package/lib/typescript/module/src/theme/theme-provider.d.ts.map +1 -1
  182. package/package.json +11 -10
  183. package/src/components/Button/index.tsx +8 -3
  184. package/src/components/CopyButton/index.tsx +3 -3
  185. package/src/components/Dialog/index.tsx +4 -4
  186. package/src/components/ThemeIcon/index.tsx +3 -3
  187. package/src/components/UnstyledButton/UnstyledButton.tsx +1 -2
  188. package/src/theme/create-theme.ts +2 -1
  189. package/src/theme/get-size/index.ts +2 -2
  190. package/src/theme/theme-provider.tsx +7 -7
package/README.md CHANGED
@@ -1,28 +1,634 @@
1
- # react-native-mantine (WIP / Work in Progress)
1
+ # React Native Mantine
2
2
 
3
- Make Mantine Accessable on React Native
3
+ <div align="center">
4
+
5
+ [![npm version](https://img.shields.io/npm/v/react-native-mantine.svg)](https://www.npmjs.com/package/react-native-mantine)
6
+ [![license](https://img.shields.io/npm/l/react-native-mantine.svg)](https://github.com/auronsan/react-native-mantine/blob/main/LICENSE)
7
+ [![React Native](https://img.shields.io/badge/React%20Native-0.74.5-blue.svg)](https://reactnative.dev/)
8
+ [![TypeScript](https://img.shields.io/badge/TypeScript-5.2.2-blue.svg)](https://www.typescriptlang.org/)
9
+
10
+ A comprehensive React Native component library inspired by [Mantine](https://mantine.dev/), bringing beautiful and accessible UI components to your mobile applications.
11
+
12
+ [Installation](#installation) • [Components](#components) • [Usage](#usage) • [Theme](#theme-system) • [Example App](#example-app) • [Contributing](#contributing)
13
+
14
+ </div>
15
+
16
+ ---
17
+
18
+ ## Overview
19
+
20
+ **React Native Mantine** is a feature-rich component library that ports the popular Mantine UI library to React Native. With 70+ professionally designed components, a powerful theming system, and full TypeScript support, it provides everything you need to build stunning mobile applications.
21
+
22
+ ### Key Features
23
+
24
+ - **70+ Components** - Comprehensive collection organized by functionality
25
+ - **Full TypeScript Support** - Built with TypeScript 5.2.2 with strict mode
26
+ - **Powerful Theme System** - Extensive customization with color schemes, variants, and sizes
27
+ - **Consistent API** - Familiar API patterns across all components
28
+ - **Production Ready** - Thoroughly tested and battle-tested components
29
+ - **Active Development** - Regular updates and improvements
30
+ - **Zero Dependencies** - Minimal peer dependencies (React Native, expo-linear-gradient, expo-font, expo-clipboard)
31
+
32
+ ---
33
+
34
+ ## Quick Start
35
+
36
+ ### 🚀 Use the Template
37
+
38
+ The fastest way to get started is by using our GitHub template:
39
+
40
+ **[→ Use React Native Mantine Template](https://github.com/auronsan/react-native-mantine-template)**
41
+
42
+ This template includes all dependencies configured, TypeScript setup, and example components ready to use.
4
43
 
5
44
  ## Installation
6
45
 
7
- ```sh
46
+ ```bash
47
+ # Using npm
8
48
  npm install react-native-mantine
49
+
50
+ # Using yarn
51
+ yarn add react-native-mantine
52
+
53
+ # Using pnpm
54
+ pnpm add react-native-mantine
55
+ ```
56
+
57
+ ### Peer Dependencies
58
+
59
+ Ensure you have the following peer dependencies installed:
60
+
61
+ ```bash
62
+ npm install react react-native expo-linear-gradient expo-font expo-clipboard
63
+ ```
64
+
65
+ ---
66
+
67
+ ## Quick Start
68
+
69
+ Wrap your application with the `ThemeProvider` to enable theming:
70
+
71
+ ```tsx
72
+ import { ThemeProvider } from 'react-native-mantine';
73
+
74
+ export default function App() {
75
+ return (
76
+ <ThemeProvider>
77
+ {/* Your app components */}
78
+ </ThemeProvider>
79
+ );
80
+ }
81
+ ```
82
+
83
+ ### Basic Usage Example
84
+
85
+ ```tsx
86
+ import { Button, Text, Stack, Paper } from 'react-native-mantine';
87
+
88
+ function MyComponent() {
89
+ return (
90
+ <Stack spacing="md">
91
+ <Paper padding="lg" shadow="sm">
92
+ <Text size="xl" weight={700}>
93
+ Welcome to React Native Mantine
94
+ </Text>
95
+ <Text color="dimmed">
96
+ Build beautiful mobile apps with ease
97
+ </Text>
98
+ </Paper>
99
+
100
+ <Button variant="filled" color="blue" onPress={() => console.log('Pressed!')}>
101
+ Get Started
102
+ </Button>
103
+ </Stack>
104
+ );
105
+ }
106
+ ```
107
+
108
+ ---
109
+
110
+ ## Components
111
+
112
+ React Native Mantine includes a comprehensive set of components organized by category:
113
+
114
+ ### Core Components (9)
115
+
116
+ Essential building blocks for any application.
117
+
118
+ - **BoxView** - Base component for layout and styling
119
+ - **Group** - Horizontal layout with spacing control
120
+ - **Stack** - Vertical layout with spacing control
121
+ - **Text** - Styled text component with variants
122
+ - **Button** - Customizable button with variants and states
123
+ - **UnstyledButton** - Minimal button without default styles
124
+ - **ActionIcon** - Icon button for compact actions
125
+ - **Input** - Base input component
126
+ - **Loader** - Loading indicator with variants
127
+
128
+ ### Layout & Typography (8)
129
+
130
+ Components for structuring content and displaying text.
131
+
132
+ - **Center** - Center content horizontally and vertically
133
+ - **Container** - Responsive container with max-width
134
+ - **Flex** - Flexbox layout component
135
+ - **Space** - Add spacing between elements
136
+ - **Title** - Heading component (h1-h6)
137
+ - **Highlight** - Highlight text within strings
138
+ - **Mark** - Mark/highlight specific text
139
+ - **Code** - Display inline code
140
+
141
+ ### Feedback & Forms (12)
142
+
143
+ Visual feedback and form input components.
144
+
145
+ - **Badge** - Display tags, status, or categories
146
+ - **Avatar** - User avatar with image or initials
147
+ - **Paper** - Container with shadow and border
148
+ - **Divider** - Horizontal or vertical divider
149
+ - **Progress** - Progress bar indicator
150
+ - **Skeleton** - Loading placeholder
151
+ - **TextInput** - Single-line text input
152
+ - **Textarea** - Multi-line text input
153
+ - **PasswordInput** - Password input with visibility toggle
154
+ - **Switch** - Toggle switch control
155
+ - **Checkbox** - Checkbox input
156
+ - **Radio** - Radio button input
157
+
158
+ ### Overlays & Dialogs (13)
159
+
160
+ Interactive overlay components and modals.
161
+
162
+ - **Overlay** - Semi-transparent overlay
163
+ - **Portal** - Render components in a portal
164
+ - **Modal** - Modal dialog component
165
+ - **Drawer** - Slide-out drawer panel
166
+ - **Dialog** - Simple dialog for quick actions
167
+ - **Collapse** - Collapsible content container
168
+ - **Accordion** - Collapsible sections
169
+ - **Spoiler** - Hide content with show more/less
170
+ - **Notification** - Toast notification
171
+ - **NumberInput** - Numeric input with controls
172
+ - **PinInput** - PIN code input
173
+ - **Chip** - Selectable chip component
174
+ - **NativeSelect** - Native select dropdown
175
+
176
+ ### Data Display (9)
177
+
178
+ Components for displaying data and interactive controls.
179
+
180
+ - **Slider** - Slider input for range selection
181
+ - **Rating** - Star rating component
182
+ - **Stepper** - Step-by-step progress indicator
183
+ - **SegmentedControl** - Segmented control toggle
184
+ - **Pagination** - Pagination controls
185
+ - **Card** - Card container with sections
186
+ - **Timeline** - Vertical timeline component
187
+ - **Table** - Data table component
188
+ - **List** - Ordered or unordered lists
189
+
190
+ ### Media & Utilities (8)
191
+
192
+ Image display and utility components.
193
+
194
+ - **Image** - Image component with placeholder
195
+ - **BackgroundImage** - Background image container
196
+ - **ThemeIcon** - Icon with theme colors
197
+ - **ColorSwatch** - Color preview swatch
198
+ - **Transition** - Animation transition wrapper
199
+ - **CloseButton** - Close button icon
200
+ - **CopyButton** - Copy to clipboard button
201
+ - **Burger** - Hamburger menu button
202
+
203
+ ### Navigation & Advanced (13)
204
+
205
+ Navigation components and advanced features.
206
+
207
+ - **Anchor** - Styled link/anchor component
208
+ - **Kbd** - Keyboard key display
209
+ - **Indicator** - Badge indicator overlay
210
+ - **Grid** - Responsive grid layout
211
+ - **SimpleGrid** - Simple grid with equal columns
212
+ - **AspectRatio** - Maintain aspect ratio container
213
+ - **MediaQuery** - Responsive media queries
214
+ - **Blockquote** - Quote block styling
215
+ - **Breadcrumbs** - Breadcrumb navigation
216
+ - **NavLink** - Navigation link component
217
+ - **LoadingOverlay** - Full overlay with loader
218
+ - **Tooltip** - Tooltip on hover/press
219
+ - **Popover** - Popover menu
220
+ - **Menu** - Dropdown menu component
221
+ - **Select** - Select dropdown with search
222
+ - **MultiSelect** - Multi-selection dropdown
223
+ - **RingProgress** - Circular progress indicator
224
+ - **TransferList** - Dual list transfer component
225
+
226
+ ---
227
+
228
+ ## Theme System
229
+
230
+ React Native Mantine includes a powerful theming system that allows extensive customization of colors, sizes, spacing, and more.
231
+
232
+ ### Using the Theme Provider
233
+
234
+ ```tsx
235
+ import { ThemeProvider, createTheme } from 'react-native-mantine';
236
+
237
+ const customTheme = createTheme({
238
+ primaryColor: 'blue',
239
+ primaryShade: 6,
240
+ fontFamily: 'CustomFont',
241
+ });
242
+
243
+ function App() {
244
+ return (
245
+ <ThemeProvider theme={customTheme}>
246
+ {/* Your app */}
247
+ </ThemeProvider>
248
+ );
249
+ }
250
+ ```
251
+
252
+ ### Accessing Theme in Components
253
+
254
+ ```tsx
255
+ import { useTheme } from 'react-native-mantine';
256
+
257
+ function MyComponent() {
258
+ const theme = useTheme();
259
+
260
+ return (
261
+ <View style={{ backgroundColor: theme.colors.blue[6] }}>
262
+ <Text style={{ color: theme.white }}>
263
+ Themed Component
264
+ </Text>
265
+ </View>
266
+ );
267
+ }
268
+ ```
269
+
270
+ ### Theme Configuration
271
+
272
+ The theme object includes:
273
+
274
+ - **Colors** - 14 color palettes (blue, red, green, etc.) with 10 shades each
275
+ - **Primary Color** - Default component color
276
+ - **Font Sizes** - xs, sm, md, lg, xl
277
+ - **Spacing** - xs, sm, md, lg, xl
278
+ - **Radius** - Border radius values
279
+ - **Shadows** - Shadow presets (xs, sm, md, lg, xl)
280
+ - **Headings** - Typography for h1-h6
281
+ - **Dark/Light Mode** - Built-in color scheme support
282
+
283
+ ### Available Colors
284
+
285
+ - **Primary Colors:** blue, cyan, teal, green, lime
286
+ - **Accent Colors:** red, pink, grape, violet, indigo
287
+ - **Neutral Colors:** gray, gray2, dark, secondary
288
+ - **Warm Colors:** yellow, orange
289
+
290
+ ### Component Variants
291
+
292
+ Most components support multiple variants:
293
+
294
+ - **filled** - Solid background color
295
+ - **outline** - Border with transparent background
296
+ - **light** - Light background with theme color
297
+ - **white** - White background
298
+ - **default** - Default styling
299
+ - **subtle** - Minimal styling
300
+ - **gradient** - Gradient background (for buttons)
301
+
302
+ ### Sizes
303
+
304
+ Components support consistent sizing:
305
+
306
+ - **xs** - Extra small
307
+ - **sm** - Small
308
+ - **md** - Medium (default)
309
+ - **lg** - Large
310
+ - **xl** - Extra large
311
+
312
+ ---
313
+
314
+ ## Creating Custom Styles
315
+
316
+ Use the `createStyles` hook to create component-specific styles with theme access:
317
+
318
+ ```tsx
319
+ import { createStyles } from 'react-native-mantine';
320
+
321
+ const useStyles = createStyles((theme, params) => ({
322
+ container: {
323
+ backgroundColor: theme.colors[params.color][6],
324
+ padding: theme.spacing.md,
325
+ borderRadius: theme.radius.md,
326
+ },
327
+ text: {
328
+ color: theme.white,
329
+ fontSize: theme.fontSizes.lg,
330
+ },
331
+ }));
332
+
333
+ function MyComponent({ color = 'blue' }) {
334
+ const { styles } = useStyles({ color });
335
+
336
+ return (
337
+ <View style={styles.container}>
338
+ <Text style={styles.text}>Custom Styled Component</Text>
339
+ </View>
340
+ );
341
+ }
342
+ ```
343
+
344
+ ---
345
+
346
+ ## Advanced Examples
347
+
348
+ ### Button Variants
349
+
350
+ ```tsx
351
+ import { Stack, Button } from 'react-native-mantine';
352
+
353
+ function ButtonExamples() {
354
+ return (
355
+ <Stack spacing="md">
356
+ <Button variant="filled" color="blue">Filled Button</Button>
357
+ <Button variant="outline" color="red">Outline Button</Button>
358
+ <Button variant="light" color="green">Light Button</Button>
359
+ <Button variant="subtle" color="violet">Subtle Button</Button>
360
+ <Button variant="gradient" gradient={{ from: 'indigo', to: 'cyan' }}>
361
+ Gradient Button
362
+ </Button>
363
+ </Stack>
364
+ );
365
+ }
366
+ ```
367
+
368
+ ### Form Example
369
+
370
+ ```tsx
371
+ import { Stack, TextInput, PasswordInput, Checkbox, Button } from 'react-native-mantine';
372
+
373
+ function LoginForm() {
374
+ return (
375
+ <Stack spacing="md" padding="lg">
376
+ <TextInput
377
+ label="Email"
378
+ placeholder="your@email.com"
379
+ required
380
+ />
381
+ <PasswordInput
382
+ label="Password"
383
+ placeholder="Your password"
384
+ required
385
+ />
386
+ <Checkbox label="Remember me" />
387
+ <Button fullWidth>Sign In</Button>
388
+ </Stack>
389
+ );
390
+ }
391
+ ```
392
+
393
+ ### Modal Example
394
+
395
+ ```tsx
396
+ import { useState } from 'react';
397
+ import { Modal, Button, Text, Stack } from 'react-native-mantine';
398
+
399
+ function ModalExample() {
400
+ const [opened, setOpened] = useState(false);
401
+
402
+ return (
403
+ <>
404
+ <Button onPress={() => setOpened(true)}>Open Modal</Button>
405
+
406
+ <Modal
407
+ opened={opened}
408
+ onClose={() => setOpened(false)}
409
+ title="Welcome!"
410
+ >
411
+ <Stack spacing="md">
412
+ <Text>This is a modal dialog</Text>
413
+ <Button onPress={() => setOpened(false)}>Close</Button>
414
+ </Stack>
415
+ </Modal>
416
+ </>
417
+ );
418
+ }
419
+ ```
420
+
421
+ ### Grid Layout
422
+
423
+ ```tsx
424
+ import { Grid, Paper, Text } from 'react-native-mantine';
425
+
426
+ function GridExample() {
427
+ return (
428
+ <Grid>
429
+ <Grid.Col span={6}>
430
+ <Paper padding="md" shadow="sm">
431
+ <Text>Column 1</Text>
432
+ </Paper>
433
+ </Grid.Col>
434
+ <Grid.Col span={6}>
435
+ <Paper padding="md" shadow="sm">
436
+ <Text>Column 2</Text>
437
+ </Paper>
438
+ </Grid.Col>
439
+ <Grid.Col span={12}>
440
+ <Paper padding="md" shadow="sm">
441
+ <Text>Full Width Column</Text>
442
+ </Paper>
443
+ </Grid.Col>
444
+ </Grid>
445
+ );
446
+ }
447
+ ```
448
+
449
+ ---
450
+
451
+ ## Example App
452
+
453
+ The library includes a comprehensive example application showcasing all components with live examples and code snippets.
454
+
455
+ ### Running the Example App
456
+
457
+ ```bash
458
+ # Clone the repository
459
+ git clone https://github.com/auronsan/react-native-mantine.git
460
+ cd react-native-mantine
461
+
462
+ # Install dependencies
463
+ yarn install
464
+
465
+ # Run on iOS
466
+ yarn example ios
467
+
468
+ # Run on Android
469
+ yarn example android
470
+
471
+ # Start Metro bundler
472
+ yarn example start
473
+ ```
474
+
475
+ The example app includes:
476
+
477
+ - Interactive component showcase
478
+ - All 70+ components with examples
479
+ - Theme customization demos
480
+ - Component variant demonstrations
481
+ - Code examples for each component
482
+
483
+ ---
484
+
485
+ ## Development
486
+
487
+ ### Project Structure
488
+
489
+ ```
490
+ react-native-mantine/
491
+ ├── src/
492
+ │ ├── components/ # All component implementations
493
+ │ ├── theme/ # Theme system and utilities
494
+ │ └── hooks/ # Custom React hooks
495
+ ├── example/ # Example application
496
+ │ └── src/
497
+ │ ├── examples/ # Component examples
498
+ │ └── screens/ # Example app screens
499
+ ├── lib/ # Built library output
500
+ └── package.json
9
501
  ```
10
502
 
11
- ## Usage
503
+ ### Scripts
12
504
 
505
+ ```bash
506
+ # Development
507
+ yarn example start # Start example app
508
+ yarn example ios # Run on iOS
509
+ yarn example android # Run on Android
13
510
 
14
- ```js
511
+ # Testing & Quality
512
+ yarn test # Run Jest tests
513
+ yarn typecheck # TypeScript type checking
514
+ yarn lint # Run ESLint
515
+ yarn prettier:write # Format code
15
516
 
517
+ # Building
518
+ yarn prepare # Build library
519
+ yarn clean # Clean build artifacts
16
520
  ```
17
521
 
522
+ ### Building the Library
523
+
524
+ The library uses `react-native-builder-bob` for building:
525
+
526
+ ```bash
527
+ yarn prepare
528
+ ```
529
+
530
+ This generates:
531
+
532
+ - CommonJS output in `lib/commonjs/`
533
+ - ES modules output in `lib/module/`
534
+ - TypeScript definitions in `lib/typescript/`
535
+
536
+ ---
18
537
 
19
538
  ## Contributing
20
539
 
21
- See the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow.
540
+ Contributions are welcome! Please read our [Contributing Guide](CONTRIBUTING.md) for details on our code of conduct and the process for submitting pull requests.
541
+
542
+ ### Development Workflow
543
+
544
+ 1. Fork the repository
545
+ 2. Create your feature branch (`git checkout -b feature/amazing-feature`)
546
+ 3. Make your changes
547
+ 4. Run tests and linting (`yarn test && yarn lint`)
548
+ 5. Commit your changes (`git commit -m 'Add amazing feature'`)
549
+ 6. Push to the branch (`git push origin feature/amazing-feature`)
550
+ 7. Open a Pull Request
551
+
552
+ ### Component Development Guidelines
553
+
554
+ - Follow existing component patterns
555
+ - Include TypeScript types for all props
556
+ - Write tests for new components
557
+ - Add examples in the example app
558
+ - Document props and usage in JSDoc comments
559
+ - Support all standard variants and sizes where applicable
560
+
561
+ ---
562
+
563
+ ## Roadmap
564
+
565
+ - [ ] Additional components (Carousel, DatePicker, ColorPicker)
566
+ - [ ] Enhanced animations and transitions
567
+ - [ ] Web platform support
568
+ - [ ] Improved accessibility features
569
+ - [ ] Performance optimizations
570
+ - [ ] Comprehensive documentation site
571
+ - [ ] Storybook integration
572
+ - [ ] More theming options
573
+
574
+ ---
575
+
576
+ ## Browser/Platform Support
577
+
578
+ - iOS 13.0+
579
+ - Android API 21+
580
+ - React Native 0.70+
581
+
582
+ ---
583
+
584
+ ## Credits
585
+
586
+ This library is inspired by the excellent [Mantine](https://mantine.dev/) project by Vitaly Rtishchev. Special thanks to the Mantine team for creating such a wonderful UI library.
587
+
588
+ ---
22
589
 
23
590
  ## License
24
591
 
25
- MIT
592
+ MIT License - see the [LICENSE](LICENSE) file for details.
593
+
594
+ Copyright (c) 2024 Auronsan
595
+
596
+ ---
597
+
598
+ ## Documentation
599
+
600
+ Visit our official documentation site:
601
+
602
+ **https://auronsan.github.io/react-native-mantine/**
603
+
604
+ The documentation includes:
605
+ - Interactive component showcase
606
+ - Complete setup guide
607
+ - API reference
608
+ - Usage examples
609
+ - Theme customization guide
610
+
611
+ ---
612
+
613
+ ## Links
614
+
615
+ - [Documentation Site](https://auronsan.github.io/react-native-mantine/)
616
+ - [GitHub Repository](https://github.com/auronsan/react-native-mantine)
617
+ - [NPM Package](https://www.npmjs.com/package/react-native-mantine)
618
+ - [Issue Tracker](https://github.com/auronsan/react-native-mantine/issues)
619
+ - [Mantine (Web)](https://mantine.dev/)
620
+
621
+ ---
622
+
623
+ ## Support
624
+
625
+ If you like this project, please consider:
626
+
627
+ - Starring the repository on GitHub
628
+ - Reporting bugs and suggesting features
629
+ - Contributing to the codebase
630
+ - Sharing with other developers
26
631
 
27
632
  ---
28
633
 
634
+ Made with ❤️ by [Auronsan](https://github.com/auronsan)
@@ -13,8 +13,7 @@ var _themeProvider = require("../../theme/theme-provider.js");
13
13
  var _index4 = require("../../theme/index.js");
14
14
  var _rem = require("../../theme/utils/rem.js");
15
15
  var _jsxRuntime = require("react/jsx-runtime");
16
- function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
17
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
16
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
18
17
  const AccordionContext = /*#__PURE__*/(0, _react.createContext)(null);
19
18
  const useAccordionContext = () => {
20
19
  const context = (0, _react.useContext)(AccordionContext);