@mapples/ui 1.0.2
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/README.md +297 -0
- package/dist/components/inputs/Button/Button.d.ts +44 -0
- package/dist/components/inputs/Button/Button.d.ts.map +1 -0
- package/dist/components/inputs/Button/Button.js +34 -0
- package/dist/components/inputs/Button/Button.js.map +1 -0
- package/dist/components/inputs/Button/index.d.ts +5 -0
- package/dist/components/inputs/Button/index.d.ts.map +1 -0
- package/dist/components/inputs/Button/index.js +5 -0
- package/dist/components/inputs/Button/index.js.map +1 -0
- package/dist/components/inputs/Button/schematics.d.ts +11 -0
- package/dist/components/inputs/Button/schematics.d.ts.map +1 -0
- package/dist/components/inputs/Button/schematics.js +14 -0
- package/dist/components/inputs/Button/schematics.js.map +1 -0
- package/dist/components/inputs/IconButton/IconButton.d.ts +62 -0
- package/dist/components/inputs/IconButton/IconButton.d.ts.map +1 -0
- package/dist/components/inputs/IconButton/IconButton.js +55 -0
- package/dist/components/inputs/IconButton/IconButton.js.map +1 -0
- package/dist/components/inputs/IconButton/MockIcon.d.ts +6 -0
- package/dist/components/inputs/IconButton/MockIcon.d.ts.map +1 -0
- package/dist/components/inputs/IconButton/MockIcon.js +9 -0
- package/dist/components/inputs/IconButton/MockIcon.js.map +1 -0
- package/dist/components/inputs/IconButton/index.d.ts +4 -0
- package/dist/components/inputs/IconButton/index.d.ts.map +1 -0
- package/dist/components/inputs/IconButton/index.js +4 -0
- package/dist/components/inputs/IconButton/index.js.map +1 -0
- package/dist/components/inputs/IconButton/schematics.d.ts +3 -0
- package/dist/components/inputs/IconButton/schematics.d.ts.map +1 -0
- package/dist/components/inputs/IconButton/schematics.js +6 -0
- package/dist/components/inputs/IconButton/schematics.js.map +1 -0
- package/dist/components/inputs/Pressable/Pressable.d.ts +9 -0
- package/dist/components/inputs/Pressable/Pressable.d.ts.map +1 -0
- package/dist/components/inputs/Pressable/Pressable.js +10 -0
- package/dist/components/inputs/Pressable/Pressable.js.map +1 -0
- package/dist/components/inputs/Pressable/index.d.ts +5 -0
- package/dist/components/inputs/Pressable/index.d.ts.map +1 -0
- package/dist/components/inputs/Pressable/index.js +5 -0
- package/dist/components/inputs/Pressable/index.js.map +1 -0
- package/dist/components/inputs/Pressable/schematics.d.ts +3 -0
- package/dist/components/inputs/Pressable/schematics.d.ts.map +1 -0
- package/dist/components/inputs/Pressable/schematics.js +6 -0
- package/dist/components/inputs/Pressable/schematics.js.map +1 -0
- package/dist/components/inputs/TextInput/TextInput.d.ts +32 -0
- package/dist/components/inputs/TextInput/TextInput.d.ts.map +1 -0
- package/dist/components/inputs/TextInput/TextInput.js +34 -0
- package/dist/components/inputs/TextInput/TextInput.js.map +1 -0
- package/dist/components/inputs/TextInput/index.d.ts +4 -0
- package/dist/components/inputs/TextInput/index.d.ts.map +1 -0
- package/dist/components/inputs/TextInput/index.js +4 -0
- package/dist/components/inputs/TextInput/index.js.map +1 -0
- package/dist/components/inputs/TextInput/schematics.d.ts +3 -0
- package/dist/components/inputs/TextInput/schematics.d.ts.map +1 -0
- package/dist/components/inputs/TextInput/schematics.js +6 -0
- package/dist/components/inputs/TextInput/schematics.js.map +1 -0
- package/dist/components/inputs/index.d.ts +10 -0
- package/dist/components/inputs/index.d.ts.map +1 -0
- package/dist/components/inputs/index.js +10 -0
- package/dist/components/inputs/index.js.map +1 -0
- package/dist/components/inputs/schematics.d.ts +3 -0
- package/dist/components/inputs/schematics.d.ts.map +1 -0
- package/dist/components/inputs/schematics.js +11 -0
- package/dist/components/inputs/schematics.js.map +1 -0
- package/dist/components/media/Icon/Icon.d.ts +21 -0
- package/dist/components/media/Icon/Icon.d.ts.map +1 -0
- package/dist/components/media/Icon/Icon.js +25 -0
- package/dist/components/media/Icon/Icon.js.map +1 -0
- package/dist/components/media/Icon/MockIcon.d.ts +6 -0
- package/dist/components/media/Icon/MockIcon.d.ts.map +1 -0
- package/dist/components/media/Icon/MockIcon.js +9 -0
- package/dist/components/media/Icon/MockIcon.js.map +1 -0
- package/dist/components/media/Icon/index.d.ts +4 -0
- package/dist/components/media/Icon/index.d.ts.map +1 -0
- package/dist/components/media/Icon/index.js +4 -0
- package/dist/components/media/Icon/index.js.map +1 -0
- package/dist/components/media/Icon/schematics.d.ts +3 -0
- package/dist/components/media/Icon/schematics.d.ts.map +1 -0
- package/dist/components/media/Icon/schematics.js +6 -0
- package/dist/components/media/Icon/schematics.js.map +1 -0
- package/dist/components/media/Image/Image.d.ts +58 -0
- package/dist/components/media/Image/Image.d.ts.map +1 -0
- package/dist/components/media/Image/Image.js +40 -0
- package/dist/components/media/Image/Image.js.map +1 -0
- package/dist/components/media/Image/index.d.ts +4 -0
- package/dist/components/media/Image/index.d.ts.map +1 -0
- package/dist/components/media/Image/index.js +4 -0
- package/dist/components/media/Image/index.js.map +1 -0
- package/dist/components/media/Image/schematics.d.ts +3 -0
- package/dist/components/media/Image/schematics.d.ts.map +1 -0
- package/dist/components/media/Image/schematics.js +6 -0
- package/dist/components/media/Image/schematics.js.map +1 -0
- package/dist/components/media/Video/Video.d.ts +28 -0
- package/dist/components/media/Video/Video.d.ts.map +1 -0
- package/dist/components/media/Video/Video.js +26 -0
- package/dist/components/media/Video/Video.js.map +1 -0
- package/dist/components/media/Video/index.d.ts +4 -0
- package/dist/components/media/Video/index.d.ts.map +1 -0
- package/dist/components/media/Video/index.js +4 -0
- package/dist/components/media/Video/index.js.map +1 -0
- package/dist/components/media/Video/schematics.d.ts +3 -0
- package/dist/components/media/Video/schematics.d.ts.map +1 -0
- package/dist/components/media/Video/schematics.js +6 -0
- package/dist/components/media/Video/schematics.js.map +1 -0
- package/dist/components/media/index.d.ts +8 -0
- package/dist/components/media/index.d.ts.map +1 -0
- package/dist/components/media/index.js +8 -0
- package/dist/components/media/index.js.map +1 -0
- package/dist/components/media/schematics.d.ts +3 -0
- package/dist/components/media/schematics.d.ts.map +1 -0
- package/dist/components/media/schematics.js +9 -0
- package/dist/components/media/schematics.js.map +1 -0
- package/dist/components/typography/Text/Text.d.ts +52 -0
- package/dist/components/typography/Text/Text.d.ts.map +1 -0
- package/dist/components/typography/Text/Text.js +41 -0
- package/dist/components/typography/Text/Text.js.map +1 -0
- package/dist/components/typography/Text/index.d.ts +4 -0
- package/dist/components/typography/Text/index.d.ts.map +1 -0
- package/dist/components/typography/Text/index.js +4 -0
- package/dist/components/typography/Text/index.js.map +1 -0
- package/dist/components/typography/Text/schematics.d.ts +3 -0
- package/dist/components/typography/Text/schematics.d.ts.map +1 -0
- package/dist/components/typography/Text/schematics.js +6 -0
- package/dist/components/typography/Text/schematics.js.map +1 -0
- package/dist/components/typography/Typography/Typography.d.ts +15 -0
- package/dist/components/typography/Typography/Typography.d.ts.map +1 -0
- package/dist/components/typography/Typography/Typography.js +11 -0
- package/dist/components/typography/Typography/Typography.js.map +1 -0
- package/dist/components/typography/Typography/index.d.ts +4 -0
- package/dist/components/typography/Typography/index.d.ts.map +1 -0
- package/dist/components/typography/Typography/index.js +4 -0
- package/dist/components/typography/Typography/index.js.map +1 -0
- package/dist/components/typography/Typography/schematics.d.ts +3 -0
- package/dist/components/typography/Typography/schematics.d.ts.map +1 -0
- package/dist/components/typography/Typography/schematics.js +6 -0
- package/dist/components/typography/Typography/schematics.js.map +1 -0
- package/dist/components/typography/index.d.ts +6 -0
- package/dist/components/typography/index.d.ts.map +1 -0
- package/dist/components/typography/index.js +6 -0
- package/dist/components/typography/index.js.map +1 -0
- package/dist/components/typography/schematics.d.ts +3 -0
- package/dist/components/typography/schematics.d.ts.map +1 -0
- package/dist/components/typography/schematics.js +7 -0
- package/dist/components/typography/schematics.js.map +1 -0
- package/dist/components/views/FlatList/FlatList.d.ts +16 -0
- package/dist/components/views/FlatList/FlatList.d.ts.map +1 -0
- package/dist/components/views/FlatList/FlatList.js +23 -0
- package/dist/components/views/FlatList/FlatList.js.map +1 -0
- package/dist/components/views/FlatList/index.d.ts +4 -0
- package/dist/components/views/FlatList/index.d.ts.map +1 -0
- package/dist/components/views/FlatList/index.js +4 -0
- package/dist/components/views/FlatList/index.js.map +1 -0
- package/dist/components/views/FlatList/schematics.d.ts +6 -0
- package/dist/components/views/FlatList/schematics.d.ts.map +1 -0
- package/dist/components/views/FlatList/schematics.js +18 -0
- package/dist/components/views/FlatList/schematics.js.map +1 -0
- package/dist/components/views/ImageBackgroundView/ImageBackgroundView.d.ts +22 -0
- package/dist/components/views/ImageBackgroundView/ImageBackgroundView.d.ts.map +1 -0
- package/dist/components/views/ImageBackgroundView/ImageBackgroundView.js +25 -0
- package/dist/components/views/ImageBackgroundView/ImageBackgroundView.js.map +1 -0
- package/dist/components/views/ImageBackgroundView/index.d.ts +4 -0
- package/dist/components/views/ImageBackgroundView/index.d.ts.map +1 -0
- package/dist/components/views/ImageBackgroundView/index.js +4 -0
- package/dist/components/views/ImageBackgroundView/index.js.map +1 -0
- package/dist/components/views/ImageBackgroundView/schematics.d.ts +3 -0
- package/dist/components/views/ImageBackgroundView/schematics.d.ts.map +1 -0
- package/dist/components/views/ImageBackgroundView/schematics.js +6 -0
- package/dist/components/views/ImageBackgroundView/schematics.js.map +1 -0
- package/dist/components/views/SafeAreaView/SafeAreaView.d.ts +11 -0
- package/dist/components/views/SafeAreaView/SafeAreaView.d.ts.map +1 -0
- package/dist/components/views/SafeAreaView/SafeAreaView.js +10 -0
- package/dist/components/views/SafeAreaView/SafeAreaView.js.map +1 -0
- package/dist/components/views/SafeAreaView/index.d.ts +4 -0
- package/dist/components/views/SafeAreaView/index.d.ts.map +1 -0
- package/dist/components/views/SafeAreaView/index.js +4 -0
- package/dist/components/views/SafeAreaView/index.js.map +1 -0
- package/dist/components/views/SafeAreaView/schematics.d.ts +3 -0
- package/dist/components/views/SafeAreaView/schematics.d.ts.map +1 -0
- package/dist/components/views/SafeAreaView/schematics.js +6 -0
- package/dist/components/views/SafeAreaView/schematics.js.map +1 -0
- package/dist/components/views/ScrollView/ScrollView.d.ts +40 -0
- package/dist/components/views/ScrollView/ScrollView.d.ts.map +1 -0
- package/dist/components/views/ScrollView/ScrollView.js +34 -0
- package/dist/components/views/ScrollView/ScrollView.js.map +1 -0
- package/dist/components/views/ScrollView/index.d.ts +4 -0
- package/dist/components/views/ScrollView/index.d.ts.map +1 -0
- package/dist/components/views/ScrollView/index.js +4 -0
- package/dist/components/views/ScrollView/index.js.map +1 -0
- package/dist/components/views/ScrollView/schematics.d.ts +4 -0
- package/dist/components/views/ScrollView/schematics.d.ts.map +1 -0
- package/dist/components/views/ScrollView/schematics.js +10 -0
- package/dist/components/views/ScrollView/schematics.js.map +1 -0
- package/dist/components/views/View/View.d.ts +40 -0
- package/dist/components/views/View/View.d.ts.map +1 -0
- package/dist/components/views/View/View.js +34 -0
- package/dist/components/views/View/View.js.map +1 -0
- package/dist/components/views/View/index.d.ts +4 -0
- package/dist/components/views/View/index.d.ts.map +1 -0
- package/dist/components/views/View/index.js +4 -0
- package/dist/components/views/View/index.js.map +1 -0
- package/dist/components/views/View/schematics.d.ts +4 -0
- package/dist/components/views/View/schematics.d.ts.map +1 -0
- package/dist/components/views/View/schematics.js +10 -0
- package/dist/components/views/View/schematics.js.map +1 -0
- package/dist/components/views/index.d.ts +12 -0
- package/dist/components/views/index.d.ts.map +1 -0
- package/dist/components/views/index.js +12 -0
- package/dist/components/views/index.js.map +1 -0
- package/dist/components/views/schematics.d.ts +18 -0
- package/dist/components/views/schematics.d.ts.map +1 -0
- package/dist/components/views/schematics.js +18 -0
- package/dist/components/views/schematics.js.map +1 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +15 -0
- package/dist/index.js.map +1 -0
- package/dist/schematics.d.ts +20 -0
- package/dist/schematics.d.ts.map +1 -0
- package/dist/schematics.js +27 -0
- package/dist/schematics.js.map +1 -0
- package/package.json +36 -0
package/README.md
ADDED
|
@@ -0,0 +1,297 @@
|
|
|
1
|
+
# @mapples/ui
|
|
2
|
+
|
|
3
|
+
A comprehensive React Native UI component library with built-in styling support and visual editor integration.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
The `@mapples/ui` package provides a complete set of customizable React Native components that integrate seamlessly with the Mapples styling system. Each component is designed to work both in traditional React Native applications and in visual editors for drag-and-drop interface building.
|
|
8
|
+
|
|
9
|
+
## Features
|
|
10
|
+
|
|
11
|
+
- 🎨 **Built-in Styling**: All components support the `@mapples/style` system for consistent theming
|
|
12
|
+
- 🖱️ **Visual Editor Ready**: Components include schematics for visual editor integration
|
|
13
|
+
- 📱 **React Native Compatible**: Built on top of React Native and Expo components
|
|
14
|
+
- 🔧 **TypeScript Support**: Full TypeScript definitions and IntelliSense support
|
|
15
|
+
- 🎯 **Accessible**: Components follow accessibility best practices
|
|
16
|
+
- 🚀 **Performance Optimized**: Uses React.forwardRef for optimal performance
|
|
17
|
+
|
|
18
|
+
## Installation
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
npm install @mapples/ui
|
|
22
|
+
# or
|
|
23
|
+
yarn add @mapples/ui
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Component Categories
|
|
27
|
+
|
|
28
|
+
### Views
|
|
29
|
+
|
|
30
|
+
Container components for layout and structure:
|
|
31
|
+
|
|
32
|
+
- **View**: Basic container component with styling support
|
|
33
|
+
- **SafeAreaView**: Container that respects device safe areas
|
|
34
|
+
- **ScrollView**: Scrollable container with styling support
|
|
35
|
+
- **FlatList**: Optimized list component with styling support
|
|
36
|
+
- **ImageBackgroundView**: Container with background image support
|
|
37
|
+
|
|
38
|
+
### Typography
|
|
39
|
+
|
|
40
|
+
Text display components:
|
|
41
|
+
|
|
42
|
+
- **Text**: Customizable text component with styling support
|
|
43
|
+
- **Typography**: Advanced typography component with variant support
|
|
44
|
+
|
|
45
|
+
### Inputs
|
|
46
|
+
|
|
47
|
+
Interactive input components:
|
|
48
|
+
|
|
49
|
+
- **Button**: Customizable button with label and styling support
|
|
50
|
+
- **TextInput**: Text input with styling support
|
|
51
|
+
- **IconButton**: Button with icon support
|
|
52
|
+
- **Pressable**: Enhanced pressable component with styling
|
|
53
|
+
|
|
54
|
+
### Media
|
|
55
|
+
|
|
56
|
+
Media display components:
|
|
57
|
+
|
|
58
|
+
- **Image**: Image component with styling support (uses Expo Image)
|
|
59
|
+
- **Video**: Video component with styling support
|
|
60
|
+
- **Icon**: Icon component with SVG support
|
|
61
|
+
|
|
62
|
+
## Usage Examples
|
|
63
|
+
|
|
64
|
+
### Basic Button
|
|
65
|
+
|
|
66
|
+
```tsx
|
|
67
|
+
import { Button } from '@mapples/ui';
|
|
68
|
+
|
|
69
|
+
function MyComponent() {
|
|
70
|
+
return (
|
|
71
|
+
<Button
|
|
72
|
+
label="Click me"
|
|
73
|
+
onPress={() => console.log('Button pressed')}
|
|
74
|
+
styled={{
|
|
75
|
+
style: {
|
|
76
|
+
backgroundColor: 'blue',
|
|
77
|
+
padding: 16,
|
|
78
|
+
borderRadius: 8,
|
|
79
|
+
},
|
|
80
|
+
styleTypography: {
|
|
81
|
+
color: 'white',
|
|
82
|
+
fontSize: 16,
|
|
83
|
+
fontWeight: 'bold',
|
|
84
|
+
},
|
|
85
|
+
}}
|
|
86
|
+
/>
|
|
87
|
+
);
|
|
88
|
+
}
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### Styled View Container
|
|
92
|
+
|
|
93
|
+
```tsx
|
|
94
|
+
import { View, Text } from '@mapples/ui';
|
|
95
|
+
|
|
96
|
+
function MyContainer() {
|
|
97
|
+
return (
|
|
98
|
+
<View
|
|
99
|
+
styled={{
|
|
100
|
+
style: {
|
|
101
|
+
backgroundColor: 'lightblue',
|
|
102
|
+
padding: 20,
|
|
103
|
+
borderRadius: 12,
|
|
104
|
+
margin: 16,
|
|
105
|
+
},
|
|
106
|
+
}}
|
|
107
|
+
>
|
|
108
|
+
<Text
|
|
109
|
+
text="Hello, World!"
|
|
110
|
+
styled={{
|
|
111
|
+
style: {
|
|
112
|
+
fontSize: 18,
|
|
113
|
+
color: 'darkblue',
|
|
114
|
+
textAlign: 'center',
|
|
115
|
+
},
|
|
116
|
+
}}
|
|
117
|
+
/>
|
|
118
|
+
</View>
|
|
119
|
+
);
|
|
120
|
+
}
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
### Image with Styling
|
|
124
|
+
|
|
125
|
+
```tsx
|
|
126
|
+
import { Image } from '@mapples/ui';
|
|
127
|
+
|
|
128
|
+
function MyImage() {
|
|
129
|
+
return (
|
|
130
|
+
<Image
|
|
131
|
+
source={{ uri: 'https://example.com/image.jpg' }}
|
|
132
|
+
alt="Example image"
|
|
133
|
+
styled={{
|
|
134
|
+
style: {
|
|
135
|
+
width: 200,
|
|
136
|
+
height: 200,
|
|
137
|
+
borderRadius: 8,
|
|
138
|
+
},
|
|
139
|
+
styleImage: {
|
|
140
|
+
resizeMode: 'cover',
|
|
141
|
+
},
|
|
142
|
+
}}
|
|
143
|
+
/>
|
|
144
|
+
);
|
|
145
|
+
}
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
### Text Input
|
|
149
|
+
|
|
150
|
+
```tsx
|
|
151
|
+
import { TextInput } from '@mapples/ui';
|
|
152
|
+
|
|
153
|
+
function MyInput() {
|
|
154
|
+
const [text, setText] = useState('');
|
|
155
|
+
|
|
156
|
+
return (
|
|
157
|
+
<TextInput
|
|
158
|
+
placeholder="Enter your text"
|
|
159
|
+
value={text}
|
|
160
|
+
onChangeText={setText}
|
|
161
|
+
styled={{
|
|
162
|
+
style: {
|
|
163
|
+
borderWidth: 1,
|
|
164
|
+
borderColor: 'gray',
|
|
165
|
+
padding: 12,
|
|
166
|
+
borderRadius: 8,
|
|
167
|
+
fontSize: 16,
|
|
168
|
+
},
|
|
169
|
+
}}
|
|
170
|
+
/>
|
|
171
|
+
);
|
|
172
|
+
}
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
## Visual Editor Integration
|
|
176
|
+
|
|
177
|
+
The UI package includes comprehensive schematics for visual editor integration:
|
|
178
|
+
|
|
179
|
+
```tsx
|
|
180
|
+
import { Components, Groups } from '@mapples/ui';
|
|
181
|
+
|
|
182
|
+
// Components registry for visual editors
|
|
183
|
+
console.log(Components); // All available components
|
|
184
|
+
console.log(Groups); // Component groups for organization
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
### Component Groups
|
|
188
|
+
|
|
189
|
+
Components are organized into logical groups:
|
|
190
|
+
|
|
191
|
+
- **View Group**: Container and layout components
|
|
192
|
+
- **Typography Group**: Text and typography components
|
|
193
|
+
- **Input Group**: Interactive input components
|
|
194
|
+
- **Media Group**: Image, video, and media components
|
|
195
|
+
|
|
196
|
+
## Styling System Integration
|
|
197
|
+
|
|
198
|
+
All components support the `@mapples/style` system through the `styled` prop:
|
|
199
|
+
|
|
200
|
+
```tsx
|
|
201
|
+
<Component
|
|
202
|
+
styled={{
|
|
203
|
+
style: {
|
|
204
|
+
// Container styling
|
|
205
|
+
backgroundColor: 'white',
|
|
206
|
+
padding: 16,
|
|
207
|
+
},
|
|
208
|
+
styleTypography: {
|
|
209
|
+
// Typography-specific styling (for text components)
|
|
210
|
+
fontSize: 18,
|
|
211
|
+
color: 'black',
|
|
212
|
+
},
|
|
213
|
+
styleImage: {
|
|
214
|
+
// Image-specific styling (for image components)
|
|
215
|
+
resizeMode: 'cover',
|
|
216
|
+
},
|
|
217
|
+
}}
|
|
218
|
+
/>
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
## System Palette
|
|
222
|
+
|
|
223
|
+
The package includes a system color palette for consistent theming:
|
|
224
|
+
|
|
225
|
+
```tsx
|
|
226
|
+
import { SystemPalette } from '@mapples/ui';
|
|
227
|
+
|
|
228
|
+
// Available colors
|
|
229
|
+
SystemPalette.text; // '#000000'
|
|
230
|
+
SystemPalette.background; // '#fafafa'
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
## TypeScript Support
|
|
234
|
+
|
|
235
|
+
All components are fully typed with TypeScript:
|
|
236
|
+
|
|
237
|
+
```tsx
|
|
238
|
+
import { ButtonProps, ViewProps, TextProps } from '@mapples/ui';
|
|
239
|
+
|
|
240
|
+
// Props are fully typed
|
|
241
|
+
const buttonProps: ButtonProps = {
|
|
242
|
+
label: 'My Button',
|
|
243
|
+
onPress: () => {},
|
|
244
|
+
styled: {
|
|
245
|
+
style: { backgroundColor: 'blue' },
|
|
246
|
+
},
|
|
247
|
+
};
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
## Icons
|
|
251
|
+
|
|
252
|
+
The package includes SVG icons for visual editors:
|
|
253
|
+
|
|
254
|
+
```tsx
|
|
255
|
+
import Icon from '@mapples/ui/assets';
|
|
256
|
+
|
|
257
|
+
// Available icons
|
|
258
|
+
<Icon.Button />
|
|
259
|
+
<Icon.Text />
|
|
260
|
+
<Icon.Image />
|
|
261
|
+
<Icon.View />
|
|
262
|
+
// ... and many more
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
## Development
|
|
266
|
+
|
|
267
|
+
### Building
|
|
268
|
+
|
|
269
|
+
```bash
|
|
270
|
+
npm run build
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
### Linting
|
|
274
|
+
|
|
275
|
+
```bash
|
|
276
|
+
npm run lint
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
## Contributing
|
|
280
|
+
|
|
281
|
+
1. Fork the repository
|
|
282
|
+
2. Create your feature branch (`git checkout -b feature/amazing-feature`)
|
|
283
|
+
3. Commit your changes (`git commit -m 'Add some amazing feature'`)
|
|
284
|
+
4. Push to the branch (`git push origin feature/amazing-feature`)
|
|
285
|
+
5. Open a Pull Request
|
|
286
|
+
|
|
287
|
+
## License
|
|
288
|
+
|
|
289
|
+
MIT © [Mapples](https://mapples.org)
|
|
290
|
+
|
|
291
|
+
## Support
|
|
292
|
+
|
|
293
|
+
For support and questions:
|
|
294
|
+
|
|
295
|
+
- 📧 Email: support@mapples.org
|
|
296
|
+
- 🌐 Website: https://mapples.org
|
|
297
|
+
- 📖 Documentation: https://docs.mapples.org
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { StyledProp, StyledProps } from '@mapples/style';
|
|
2
|
+
import { PressableProps, TextStyle, View } from 'react-native';
|
|
3
|
+
/**
|
|
4
|
+
* Props for the Button component.
|
|
5
|
+
*
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
export interface ButtonProps extends PressableProps {
|
|
9
|
+
/** The text label to display on the button */
|
|
10
|
+
label?: string;
|
|
11
|
+
/** Styling configuration for the button and its typography */
|
|
12
|
+
styled?: StyledProps<PressableProps> & {
|
|
13
|
+
/** Typography-specific styling for the button label */
|
|
14
|
+
styleTypography?: StyledProp<TextStyle>;
|
|
15
|
+
};
|
|
16
|
+
/** Typography variant to apply to the button label */
|
|
17
|
+
typographyVariant?: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* A customizable button component with built-in styling support.
|
|
21
|
+
*
|
|
22
|
+
* The Button component extends React Native's Pressable with additional styling
|
|
23
|
+
* capabilities and typography support. It can display a text label and supports
|
|
24
|
+
* all standard pressable interactions.
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* ```tsx
|
|
28
|
+
* <Button
|
|
29
|
+
* label="Click me"
|
|
30
|
+
* onPress={() => console.log('Button pressed')}
|
|
31
|
+
* styled={{
|
|
32
|
+
* style: { backgroundColor: 'blue', padding: 16 },
|
|
33
|
+
* styleTypography: { color: 'white', fontSize: 16 }
|
|
34
|
+
* }}
|
|
35
|
+
* />
|
|
36
|
+
* ```
|
|
37
|
+
*
|
|
38
|
+
* @public
|
|
39
|
+
*/
|
|
40
|
+
declare const Button: import("react").ForwardRefExoticComponent<ButtonProps & {
|
|
41
|
+
children?: import("react").ReactNode | undefined;
|
|
42
|
+
} & import("react").RefAttributes<View>>;
|
|
43
|
+
export default Button;
|
|
44
|
+
//# sourceMappingURL=Button.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../../src/components/inputs/Button/Button.tsx"],"names":[],"mappings":"AAEA,OAAO,EAEL,UAAU,EACV,WAAW,EAEZ,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAE/D;;;;GAIG;AACH,MAAM,WAAW,WAAY,SAAQ,cAAc;IACjD,8CAA8C;IAC9C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,8DAA8D;IAC9D,MAAM,CAAC,EAAE,WAAW,CAAC,cAAc,CAAC,GAAG;QACrC,uDAAuD;QACvD,eAAe,CAAC,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC;KACzC,CAAC;IACF,sDAAsD;IACtD,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,QAAA,MAAM,MAAM;;wCAiBX,CAAC;AAGF,eAAe,MAAM,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { forwardRef } from 'react';
|
|
2
|
+
import { StyledPressable, Typography, } from '@mapples/style';
|
|
3
|
+
/**
|
|
4
|
+
* A customizable button component with built-in styling support.
|
|
5
|
+
*
|
|
6
|
+
* The Button component extends React Native's Pressable with additional styling
|
|
7
|
+
* capabilities and typography support. It can display a text label and supports
|
|
8
|
+
* all standard pressable interactions.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```tsx
|
|
12
|
+
* <Button
|
|
13
|
+
* label="Click me"
|
|
14
|
+
* onPress={() => console.log('Button pressed')}
|
|
15
|
+
* styled={{
|
|
16
|
+
* style: { backgroundColor: 'blue', padding: 16 },
|
|
17
|
+
* styleTypography: { color: 'white', fontSize: 16 }
|
|
18
|
+
* }}
|
|
19
|
+
* />
|
|
20
|
+
* ```
|
|
21
|
+
*
|
|
22
|
+
* @public
|
|
23
|
+
*/
|
|
24
|
+
const Button = forwardRef(({ label, styled = {}, typographyVariant, ...props }, ref) => {
|
|
25
|
+
const { styleTypography, ...styledPressableProps } = styled;
|
|
26
|
+
return (<StyledPressable ref={ref} styled={styledPressableProps} {...props}>
|
|
27
|
+
{label && (<Typography style={styled?.styleTypography} variant={typographyVariant}>
|
|
28
|
+
{label}
|
|
29
|
+
</Typography>)}
|
|
30
|
+
</StyledPressable>);
|
|
31
|
+
});
|
|
32
|
+
Button.displayName = 'Button';
|
|
33
|
+
export default Button;
|
|
34
|
+
//# sourceMappingURL=Button.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Button.js","sourceRoot":"","sources":["../../../../src/components/inputs/Button/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAqB,MAAM,OAAO,CAAC;AAEtD,OAAO,EACL,eAAe,EAGf,UAAU,GACX,MAAM,gBAAgB,CAAC;AAoBxB;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,MAAM,GAAG,UAAU,CACvB,CAAC,EAAE,KAAK,EAAE,MAAM,GAAG,EAAE,EAAE,iBAAiB,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE;IAC3D,MAAM,EAAE,eAAe,EAAE,GAAG,oBAAoB,EAAE,GAAG,MAAM,CAAC;IAE5D,OAAO,CACL,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,oBAAoB,CAAC,CAAC,IAAI,KAAK,CAAC,CACjE;QAAA,CAAC,KAAK,IAAI,CACR,CAAC,UAAU,CACT,KAAK,CAAC,CAAC,MAAM,EAAE,eAAe,CAAC,CAC/B,OAAO,CAAC,CAAC,iBAAiB,CAAC,CAE3B;YAAA,CAAC,KAAK,CACR;UAAA,EAAE,UAAU,CAAC,CACd,CACH;MAAA,EAAE,eAAe,CAAC,CACnB,CAAC;AACJ,CAAC,CACF,CAAC;AACF,MAAM,CAAC,WAAW,GAAG,QAAQ,CAAC;AAE9B,eAAe,MAAM,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/inputs/Button/index.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,UAAU,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AAEzB,eAAe,MAAM,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/inputs/Button/index.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,UAAU,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AAEzB,eAAe,MAAM,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { RegisteredComponent } from '@mapples/types';
|
|
2
|
+
/**
|
|
3
|
+
* Schematic configuration for the Button component.
|
|
4
|
+
*
|
|
5
|
+
* This configuration defines how the Button component appears in visual editors,
|
|
6
|
+
* including its properties, styling options, and default values.
|
|
7
|
+
*
|
|
8
|
+
* @public
|
|
9
|
+
*/
|
|
10
|
+
export declare const ButtonSchematic: RegisteredComponent;
|
|
11
|
+
//# sourceMappingURL=schematics.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schematics.d.ts","sourceRoot":"","sources":["../../../../src/components/inputs/Button/schematics.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAIrD;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe,EAAE,mBAG7B,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import Button from './Button';
|
|
2
|
+
/**
|
|
3
|
+
* Schematic configuration for the Button component.
|
|
4
|
+
*
|
|
5
|
+
* This configuration defines how the Button component appears in visual editors,
|
|
6
|
+
* including its properties, styling options, and default values.
|
|
7
|
+
*
|
|
8
|
+
* @public
|
|
9
|
+
*/
|
|
10
|
+
export const ButtonSchematic = {
|
|
11
|
+
type: 'Button',
|
|
12
|
+
Component: Button,
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=schematics.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schematics.js","sourceRoot":"","sources":["../../../../src/components/inputs/Button/schematics.ts"],"names":[],"mappings":"AAEA,OAAO,MAAM,MAAM,UAAU,CAAC;AAE9B;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,eAAe,GAAwB;IAClD,IAAI,EAAE,QAAQ;IACd,SAAS,EAAE,MAAM;CAClB,CAAC"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
|
+
import { StyledProp, StyledProps, WithStyledProps } from '@mapples/style';
|
|
3
|
+
import { PressableProps, TextStyle, View, ViewProps } from 'react-native';
|
|
4
|
+
/**
|
|
5
|
+
* Props for the IconButton component.
|
|
6
|
+
*
|
|
7
|
+
* @public
|
|
8
|
+
*/
|
|
9
|
+
export type IconProps = PropsWithChildren<Omit<WithStyledProps<PressableProps>, 'styled'> & {
|
|
10
|
+
/** Styling configuration for the button container and SVG icon */
|
|
11
|
+
styled?: StyledProps<ViewProps> & {
|
|
12
|
+
/** SVG-specific styling */
|
|
13
|
+
styleSvg?: StyledProp<TextStyle>;
|
|
14
|
+
};
|
|
15
|
+
}> & {
|
|
16
|
+
/** URI for the SVG icon to display */
|
|
17
|
+
uri?: string;
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* A customizable icon button component with SVG support.
|
|
21
|
+
*
|
|
22
|
+
* The IconButton component displays an SVG icon that can be pressed.
|
|
23
|
+
* It supports both remote SVG URIs and fallback mock icons, with
|
|
24
|
+
* comprehensive styling support for both the button container and the icon.
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* ```tsx
|
|
28
|
+
* <IconButton
|
|
29
|
+
* uri="https://example.com/icon.svg"
|
|
30
|
+
* onPress={() => console.log('Icon pressed')}
|
|
31
|
+
* styled={{
|
|
32
|
+
* style: {
|
|
33
|
+
* width: 48,
|
|
34
|
+
* height: 48,
|
|
35
|
+
* backgroundColor: 'lightblue',
|
|
36
|
+
* borderRadius: 24,
|
|
37
|
+
* },
|
|
38
|
+
* styleSvg: {
|
|
39
|
+
* width: 24,
|
|
40
|
+
* height: 24,
|
|
41
|
+
* color: 'blue',
|
|
42
|
+
* },
|
|
43
|
+
* }}
|
|
44
|
+
* />
|
|
45
|
+
* ```
|
|
46
|
+
*
|
|
47
|
+
* @public
|
|
48
|
+
*/
|
|
49
|
+
declare const IconButton: import("react").ForwardRefExoticComponent<Omit<WithStyledProps<PressableProps>, "styled"> & {
|
|
50
|
+
/** Styling configuration for the button container and SVG icon */
|
|
51
|
+
styled?: StyledProps<ViewProps> & {
|
|
52
|
+
/** SVG-specific styling */
|
|
53
|
+
styleSvg?: StyledProp<TextStyle>;
|
|
54
|
+
};
|
|
55
|
+
} & {
|
|
56
|
+
children?: import("react").ReactNode | undefined;
|
|
57
|
+
} & {
|
|
58
|
+
/** URI for the SVG icon to display */
|
|
59
|
+
uri?: string;
|
|
60
|
+
} & import("react").RefAttributes<View>>;
|
|
61
|
+
export default IconButton;
|
|
62
|
+
//# sourceMappingURL=IconButton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IconButton.d.ts","sourceRoot":"","sources":["../../../../src/components/inputs/IconButton/IconButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAEtD,OAAO,EAGL,UAAU,EACV,WAAW,EAEX,eAAe,EAChB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAK1E;;;;GAIG;AACH,MAAM,MAAM,SAAS,GAAG,iBAAiB,CACvC,IAAI,CAAC,eAAe,CAAC,cAAc,CAAC,EAAE,QAAQ,CAAC,GAAG;IAChD,kEAAkE;IAClE,MAAM,CAAC,EAAE,WAAW,CAAC,SAAS,CAAC,GAAG;QAChC,2BAA2B;QAC3B,QAAQ,CAAC,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC;KAClC,CAAC;CACH,CACF,GAAG;IACF,sCAAsC;IACtC,GAAG,CAAC,EAAE,MAAM,CAAC;CACd,CAAC;AAIF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,QAAA,MAAM,UAAU;IA3CZ,kEAAkE;aACzD,WAAW,CAAC,SAAS,CAAC,GAAG;QAChC,2BAA2B;QAC3B,QAAQ,CAAC,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC;KAClC;;;;IAGH,sCAAsC;UAChC,MAAM;wCAkEb,CAAC;AAGF,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { forwardRef } from 'react';
|
|
2
|
+
import { styled, StyledPressable, Styler, } from '@mapples/style';
|
|
3
|
+
import { SvgUri } from 'react-native-svg';
|
|
4
|
+
import MockIcon from './MockIcon';
|
|
5
|
+
const StyledSvgUri = styled(SvgUri);
|
|
6
|
+
/**
|
|
7
|
+
* A customizable icon button component with SVG support.
|
|
8
|
+
*
|
|
9
|
+
* The IconButton component displays an SVG icon that can be pressed.
|
|
10
|
+
* It supports both remote SVG URIs and fallback mock icons, with
|
|
11
|
+
* comprehensive styling support for both the button container and the icon.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```tsx
|
|
15
|
+
* <IconButton
|
|
16
|
+
* uri="https://example.com/icon.svg"
|
|
17
|
+
* onPress={() => console.log('Icon pressed')}
|
|
18
|
+
* styled={{
|
|
19
|
+
* style: {
|
|
20
|
+
* width: 48,
|
|
21
|
+
* height: 48,
|
|
22
|
+
* backgroundColor: 'lightblue',
|
|
23
|
+
* borderRadius: 24,
|
|
24
|
+
* },
|
|
25
|
+
* styleSvg: {
|
|
26
|
+
* width: 24,
|
|
27
|
+
* height: 24,
|
|
28
|
+
* color: 'blue',
|
|
29
|
+
* },
|
|
30
|
+
* }}
|
|
31
|
+
* />
|
|
32
|
+
* ```
|
|
33
|
+
*
|
|
34
|
+
* @public
|
|
35
|
+
*/
|
|
36
|
+
const IconButton = forwardRef(({ styled, uri, ...props }, ref) => {
|
|
37
|
+
const { styleSvg, ...styledViewProps } = styled || {};
|
|
38
|
+
const ejectStyle = Styler.flatten(styleSvg);
|
|
39
|
+
return (<StyledPressable ref={ref} styled={styledViewProps} {...props}>
|
|
40
|
+
{uri ? (<StyledSvgUri uri={uri} styled={{
|
|
41
|
+
width: ejectStyle?.width,
|
|
42
|
+
height: ejectStyle?.height,
|
|
43
|
+
color: ejectStyle?.color,
|
|
44
|
+
style: styleSvg,
|
|
45
|
+
}}/>) : (<MockIcon styled={{
|
|
46
|
+
width: ejectStyle?.width,
|
|
47
|
+
height: ejectStyle?.height,
|
|
48
|
+
color: ejectStyle?.color,
|
|
49
|
+
style: styleSvg,
|
|
50
|
+
}}/>)}
|
|
51
|
+
</StyledPressable>);
|
|
52
|
+
});
|
|
53
|
+
IconButton.displayName = 'IconButton';
|
|
54
|
+
export default IconButton;
|
|
55
|
+
//# sourceMappingURL=IconButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IconButton.js","sourceRoot":"","sources":["../../../../src/components/inputs/IconButton/IconButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAqB,MAAM,OAAO,CAAC;AAEtD,OAAO,EACL,MAAM,EACN,eAAe,EAGf,MAAM,GAEP,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAE1C,OAAO,QAAQ,MAAM,YAAY,CAAC;AAoBlC,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC;AAEpC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,MAAM,UAAU,GAAG,UAAU,CAC3B,CAAC,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE;IACjC,MAAM,EAAE,QAAQ,EAAE,GAAG,eAAe,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;IAEtD,MAAM,UAAU,GAAG,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IAE5C,OAAO,CACL,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,eAAe,CAAC,CAAC,IAAI,KAAK,CAAC,CAC5D;QAAA,CAAC,GAAG,CAAC,CAAC,CAAC,CACL,CAAC,YAAY,CACX,GAAG,CAAC,CAAC,GAAG,CAAC,CACT,MAAM,CAAC,CAAC;gBACN,KAAK,EAAE,UAAU,EAAE,KAAwB;gBAC3C,MAAM,EAAE,UAAU,EAAE,MAAyB;gBAC7C,KAAK,EAAE,UAAU,EAAE,KAAK;gBACxB,KAAK,EAAE,QAAQ;aAChB,CAAC,EACF,CACH,CAAC,CAAC,CAAC,CACF,CAAC,QAAQ,CACP,MAAM,CAAC,CAAC;gBACN,KAAK,EAAE,UAAU,EAAE,KAAwB;gBAC3C,MAAM,EAAE,UAAU,EAAE,MAAyB;gBAC7C,KAAK,EAAE,UAAU,EAAE,KAAK;gBACxB,KAAK,EAAE,QAAQ;aAChB,CAAC,EACF,CACH,CACH;MAAA,EAAE,eAAe,CAAC,CACnB,CAAC;AACJ,CAAC,CACF,CAAC;AACF,UAAU,CAAC,WAAW,GAAG,YAAY,CAAC;AAEtC,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { SvgProps } from 'react-native-svg';
|
|
2
|
+
declare const _default: import("react").ForwardRefExoticComponent<{
|
|
3
|
+
styled?: import("@mapples/style").StyledProps<Partial<SvgProps>> | undefined;
|
|
4
|
+
} & SvgProps & import("react").RefAttributes<unknown>>;
|
|
5
|
+
export default _default;
|
|
6
|
+
//# sourceMappingURL=MockIcon.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MockIcon.d.ts","sourceRoot":"","sources":["../../../../src/components/inputs/IconButton/MockIcon.tsx"],"names":[],"mappings":"AAGA,OAAY,EAAE,QAAQ,EAAQ,MAAM,kBAAkB,CAAC;;;;AAUvD,wBAAgC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { styled } from '@mapples/style';
|
|
2
|
+
import Svg, { Path } from 'react-native-svg';
|
|
3
|
+
const MockIcon = (props) => {
|
|
4
|
+
return (<Svg {...props} viewBox="0 0 256 256">
|
|
5
|
+
<Path d="M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16h64a8,8,0,0,0,7.59-5.47l14.83-44.48L163,151.43a8.07,8.07,0,0,0,4.46-4.46l14.62-36.55,44.48-14.83A8,8,0,0,0,232,88V56A16,16,0,0,0,216,40ZM112.41,157.47,98.23,200H40V172l52-52,30.42,30.42L117,152.57A8,8,0,0,0,112.41,157.47ZM216,82.23,173.47,96.41a8,8,0,0,0-4.9,4.62l-14.72,36.82L138.58,144l-35.27-35.27a16,16,0,0,0-22.62,0L40,149.37V56H216Zm12.68,33a8,8,0,0,0-7.21-1.1l-23.8,7.94a8,8,0,0,0-4.9,4.61l-14.31,35.77-35.77,14.31a8,8,0,0,0-4.61,4.9l-7.94,23.8A8,8,0,0,0,137.73,216H216a16,16,0,0,0,16-16V121.73A8,8,0,0,0,228.68,115.24ZM216,200H148.83l3.25-9.75,35.51-14.2a8.07,8.07,0,0,0,4.46-4.46l14.2-35.51,9.75-3.25Z"></Path>
|
|
6
|
+
</Svg>);
|
|
7
|
+
};
|
|
8
|
+
export default styled(MockIcon);
|
|
9
|
+
//# sourceMappingURL=MockIcon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MockIcon.js","sourceRoot":"","sources":["../../../../src/components/inputs/IconButton/MockIcon.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,GAAG,EAAE,EAAY,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAEvD,MAAM,QAAQ,GAAiB,CAAC,KAAK,EAAE,EAAE;IACvC,OAAO,CACL,CAAC,GAAG,CAAC,IAAI,KAAK,CAAC,CAAC,OAAO,CAAC,aAAa,CACnC;MAAA,CAAC,IAAI,CAAC,CAAC,CAAC,spBAAspB,CAAC,EAAE,IAAI,CACvqB;IAAA,EAAE,GAAG,CAAC,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,MAAM,CAAC,QAAQ,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/inputs/IconButton/index.tsx"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,cAAc,CAAC;AACtC,cAAc,cAAc,CAAC;AAE7B,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/inputs/IconButton/index.tsx"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,cAAc,CAAC;AACtC,cAAc,cAAc,CAAC;AAE7B,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schematics.d.ts","sourceRoot":"","sources":["../../../../src/components/inputs/IconButton/schematics.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAIrD,eAAO,MAAM,oBAAoB,EAAE,mBAGlC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schematics.js","sourceRoot":"","sources":["../../../../src/components/inputs/IconButton/schematics.ts"],"names":[],"mappings":"AAEA,OAAO,UAAU,MAAM,cAAc,CAAC;AAEtC,MAAM,CAAC,MAAM,oBAAoB,GAAwB;IACvD,IAAI,EAAE,YAAY;IAClB,SAAS,EAAE,UAAU;CACtB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { PressableProps as RNPressableProps, View } from 'react-native';
|
|
2
|
+
export interface PressableProps extends RNPressableProps {
|
|
3
|
+
label?: string;
|
|
4
|
+
}
|
|
5
|
+
declare const Pressable: import("react").ForwardRefExoticComponent<PressableProps & {
|
|
6
|
+
children?: import("react").ReactNode | undefined;
|
|
7
|
+
} & import("react").RefAttributes<View>>;
|
|
8
|
+
export default Pressable;
|
|
9
|
+
//# sourceMappingURL=Pressable.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Pressable.d.ts","sourceRoot":"","sources":["../../../../src/components/inputs/Pressable/Pressable.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,cAAc,IAAI,gBAAgB,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAExE,MAAM,WAAW,cAAe,SAAQ,gBAAgB;IACtD,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,QAAA,MAAM,SAAS;;wCAQd,CAAC;AAGF,eAAe,SAAS,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { forwardRef } from 'react';
|
|
2
|
+
import { StyledPressable } from '@mapples/style';
|
|
3
|
+
const Pressable = forwardRef(({ label, children, ...props }, ref) => {
|
|
4
|
+
return (<StyledPressable onPress={console.log} ref={ref} {...props}>
|
|
5
|
+
{children}
|
|
6
|
+
</StyledPressable>);
|
|
7
|
+
});
|
|
8
|
+
Pressable.displayName = 'Pressable';
|
|
9
|
+
export default Pressable;
|
|
10
|
+
//# sourceMappingURL=Pressable.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Pressable.js","sourceRoot":"","sources":["../../../../src/components/inputs/Pressable/Pressable.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAqB,MAAM,OAAO,CAAC;AAEtD,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAOjD,MAAM,SAAS,GAAG,UAAU,CAC1B,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE;IACrC,OAAO,CACL,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,KAAK,CAAC,CACzD;QAAA,CAAC,QAAQ,CACX;MAAA,EAAE,eAAe,CAAC,CACnB,CAAC;AACJ,CAAC,CACF,CAAC;AACF,SAAS,CAAC,WAAW,GAAG,WAAW,CAAC;AAEpC,eAAe,SAAS,CAAC"}
|