@tactics/toddle-styleguide 0.0.6 → 0.0.7

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 (3) hide show
  1. package/App.tsx +241 -0
  2. package/app.json +33 -0
  3. package/package.json +1 -1
package/App.tsx ADDED
@@ -0,0 +1,241 @@
1
+ import React from 'react';
2
+ import {Button as ReactBtn, ScrollView} from 'react-native';
3
+ import {NavigationContainer} from '@react-navigation/native';
4
+ import {createNativeStackNavigator} from '@react-navigation/native-stack';
5
+
6
+ // Components
7
+ import {ThemeCtx} from './src/context/theme.context';
8
+
9
+ import {StaffMemberTheme} from './src/theme/provider';
10
+ import {LoadFonts} from './src/theme/font';
11
+
12
+ import {AvatarPreview} from './src/components/atoms/avatar/avatar.preview';
13
+ import {ButtonPreview} from './src/components/atoms/button/button.preview';
14
+ import {PillPreview} from './src/components/atoms/pill/pill.preview';
15
+ import {SnackbarPreview} from './src/components/atoms/snackbar/snackbar.preview';
16
+ import {TextBubblePreview} from './src/components/atoms/text-bubble/text-bubble.preview';
17
+ import {ImageBubblePreview} from './src/components/atoms/image-bubble/image-bubble.preview';
18
+ import {TimeTrackerPreview} from './src/components/atoms/time-tracker/time-tracker.preview';
19
+ import {CancelLinkPreview} from './src/components/atoms/cancel-link/cancel-link.preview';
20
+ import {InfoPreview} from './src/components/atoms/info/info.preview';
21
+ import {IconSolidPreview} from './src/icons/solid/solid.preview';
22
+ import {IconOutlineWhitePreview} from './src/icons/outline/outline-white.preview';
23
+ import {IconOutlineDefaultPreview} from './src/icons/outline/outline-default.preview';
24
+ import {IconOutlineGreyPreview} from './src/icons/outline/outline-grey.preview';
25
+ import {TagPreview} from './src/components/atoms/tag/tag.preview';
26
+ import {FilterTabPreview} from './src/components/atoms/filter-tab/filter-tab.preview';
27
+ import {ContactItemPreview} from './src/components/atoms/contact-item/contact-item.preview';
28
+ import {SelectListItemPreview} from './src/components/atoms/select-list-item/select-list-item-preview';
29
+ import {CheckboxPreview} from './src/components/atoms/checkbox/checkbox.preview';
30
+ import {CheckPreview} from './src/components/atoms/check-switch/check-switch.preview';
31
+ import {WideButtonPreview} from './src/components/atoms/wide-button/wide-button.preview';
32
+ import {PressableIconPreview} from './src/components/atoms/pressable-icon/pressable-icon.preview';
33
+ import {FormActionPreview} from './src/components/atoms/form-actions/form-action.preview';
34
+ import {CalendarPreview} from './src/components/atoms/calendar/calendar.preview';
35
+ import {QuickFilterPreview} from './src/components/atoms/quick-filter/quick-filter.prevriew';
36
+ import {TextInputPreview} from './src/components/atoms/text-input/text-input.preview';
37
+ import {ChildListItemPreview} from './src/components/atoms/child-list-item/child-list-item.preview';
38
+ import {TimeLinePreview} from './src/components/atoms/timeline/timeline.preview';
39
+ import {IncrementInputPreview} from './src/components/atoms/increment-input/increment-input.preview';
40
+ import {SwipePreview} from './src/components/atoms/swipe/swipe.preview';
41
+ import {LogoPreview} from './src/components/atoms/logo/logo.preview';
42
+
43
+ const Stack = createNativeStackNavigator();
44
+
45
+ const HomeScreen = ({navigation}: {navigation: any}) => {
46
+ return (
47
+ <ScrollView
48
+ style={{
49
+ flex: 1,
50
+ }}
51
+ contentContainerStyle={{
52
+ alignItems: 'center',
53
+ justifyContent: 'center',
54
+ }}
55
+ >
56
+ <ReactBtn title="Avatar" onPress={() => navigation.push('avatar')} />
57
+ <ReactBtn title="Button" onPress={() => navigation.push('button')} />
58
+ <ReactBtn title="Pill" onPress={() => navigation.push('pill')} />
59
+ <ReactBtn title="Snackbar" onPress={() => navigation.push('snackbar')} />
60
+ <ReactBtn
61
+ title="textInputs"
62
+ onPress={() => navigation.push('textInputs')}
63
+ />
64
+ <ReactBtn
65
+ title="textBubble"
66
+ onPress={() => navigation.push('textBubble')}
67
+ />
68
+ <ReactBtn
69
+ title="ImageBubble"
70
+ onPress={() => navigation.push('image-bubble')}
71
+ />
72
+ <ReactBtn
73
+ title="Pressable Icon"
74
+ onPress={() => navigation.push('pressable-icon')}
75
+ />
76
+ <ReactBtn
77
+ title="Select-list-item"
78
+ onPress={() => navigation.push('select-list-item')}
79
+ />
80
+ <ReactBtn
81
+ title="Cancel link"
82
+ onPress={() => navigation.push('cancel-link')}
83
+ />
84
+ <ReactBtn
85
+ title="ContactItem"
86
+ onPress={() => navigation.push('contact-item')}
87
+ />
88
+ <ReactBtn
89
+ title="Check switch"
90
+ onPress={() => navigation.push('check-switch')}
91
+ />
92
+ <ReactBtn
93
+ title="Info component"
94
+ onPress={() => navigation.push('info')}
95
+ />
96
+ <ReactBtn
97
+ title="child-list-item"
98
+ onPress={() => navigation.push('childList')}
99
+ />
100
+ <ReactBtn
101
+ title="Wide Button"
102
+ onPress={() => navigation.push('wide-button')}
103
+ />
104
+ <ReactBtn
105
+ title="Icons Default"
106
+ onPress={() => navigation.push('icons default')}
107
+ />
108
+ <ReactBtn
109
+ title="Icons grey"
110
+ onPress={() => navigation.push('icons grey')}
111
+ />
112
+ <ReactBtn
113
+ title="Icons White"
114
+ onPress={() => navigation.push('icons white')}
115
+ />
116
+ <ReactBtn
117
+ title="Icons Solid"
118
+ onPress={() => navigation.push('icons solid')}
119
+ />
120
+ <ReactBtn title="Checkbox" onPress={() => navigation.push('checkbox')} />
121
+ <ReactBtn
122
+ title="TimeTracker"
123
+ onPress={() => navigation.push('time-tracker')}
124
+ />
125
+ <ReactBtn title="Tag" onPress={() => navigation.push('tag')} />
126
+ <ReactBtn
127
+ title="formAction"
128
+ onPress={() => navigation.push('form-action')}
129
+ />
130
+ <ReactBtn title="Calendar" onPress={() => navigation.push('calendar')} />
131
+ <ReactBtn
132
+ title="quickFilter"
133
+ onPress={() => navigation.push('quick-filter')}
134
+ />
135
+ <ReactBtn
136
+ title="Increment input"
137
+ onPress={() => navigation.push('increment-input')}
138
+ />
139
+ <ReactBtn title="swiper" onPress={() => navigation.push('swiper')} />
140
+ <ReactBtn title="logo" onPress={() => navigation.push('logo')} />
141
+ </ScrollView>
142
+ );
143
+ };
144
+
145
+ function App() {
146
+ const [fontsLoaded] = LoadFonts();
147
+
148
+ if (!fontsLoaded) {
149
+ return null;
150
+ }
151
+
152
+ return (
153
+ <ThemeCtx.Provider value={StaffMemberTheme}>
154
+ <NavigationContainer>
155
+ <Stack.Navigator>
156
+ <Stack.Screen name="home">
157
+ {(props) => <HomeScreen {...props} />}
158
+ </Stack.Screen>
159
+ <Stack.Screen name="avatar">{() => <AvatarPreview />}</Stack.Screen>
160
+ <Stack.Screen name="button">{() => <ButtonPreview />}</Stack.Screen>
161
+ <Stack.Screen name="pill">{() => <PillPreview />}</Stack.Screen>
162
+ <Stack.Screen name="snackbar">
163
+ {() => <SnackbarPreview />}
164
+ </Stack.Screen>
165
+ <Stack.Screen name="textInputs">
166
+ {() => <TextInputPreview />}
167
+ </Stack.Screen>
168
+ <Stack.Screen name="textBubble">
169
+ {() => <TextBubblePreview />}
170
+ </Stack.Screen>
171
+ <Stack.Screen name="image-bubble">
172
+ {() => <ImageBubblePreview />}
173
+ </Stack.Screen>
174
+ <Stack.Screen name="pressable-icon">
175
+ {() => <PressableIconPreview />}
176
+ </Stack.Screen>
177
+ <Stack.Screen name="cancel-link">
178
+ {() => <CancelLinkPreview />}
179
+ </Stack.Screen>
180
+ <Stack.Screen name="contact-item">
181
+ {() => <ContactItemPreview />}
182
+ </Stack.Screen>
183
+ <Stack.Screen name="wide-button">
184
+ {() => <WideButtonPreview />}
185
+ </Stack.Screen>
186
+ <Stack.Screen name="info">{() => <InfoPreview />}</Stack.Screen>
187
+ <Stack.Screen name="check-switch">
188
+ {() => <CheckPreview />}
189
+ </Stack.Screen>
190
+ <Stack.Screen name="icons default">
191
+ {() => <IconOutlineDefaultPreview />}
192
+ </Stack.Screen>
193
+ <Stack.Screen name="icons grey">
194
+ {() => <IconOutlineGreyPreview />}
195
+ </Stack.Screen>
196
+ <Stack.Screen name="icons white">
197
+ {() => <IconOutlineWhitePreview />}
198
+ </Stack.Screen>
199
+ <Stack.Screen name="icons solid">
200
+ {() => <IconSolidPreview />}
201
+ </Stack.Screen>
202
+ <Stack.Screen name="select-list-item">
203
+ {() => <SelectListItemPreview />}
204
+ </Stack.Screen>
205
+ <Stack.Screen name="filter tab">
206
+ {() => <FilterTabPreview />}
207
+ </Stack.Screen>
208
+ <Stack.Screen name="checkbox">
209
+ {() => <CheckboxPreview />}
210
+ </Stack.Screen>
211
+ <Stack.Screen name="time-tracker">
212
+ {() => <TimeTrackerPreview />}
213
+ </Stack.Screen>
214
+ <Stack.Screen name="tag">{() => <TagPreview />}</Stack.Screen>
215
+ <Stack.Screen name="form-action">
216
+ {() => <FormActionPreview />}
217
+ </Stack.Screen>
218
+ <Stack.Screen name="calendar">
219
+ {() => <CalendarPreview />}
220
+ </Stack.Screen>
221
+ <Stack.Screen name="quick-filter">
222
+ {() => <QuickFilterPreview />}
223
+ </Stack.Screen>
224
+ <Stack.Screen name="childList">
225
+ {() => <ChildListItemPreview />}
226
+ </Stack.Screen>
227
+ <Stack.Screen name="timeline">
228
+ {() => <TimeLinePreview />}
229
+ </Stack.Screen>
230
+ <Stack.Screen name="increment-input">
231
+ {() => <IncrementInputPreview />}
232
+ </Stack.Screen>
233
+ <Stack.Screen name="swiper">{() => <SwipePreview />}</Stack.Screen>
234
+ <Stack.Screen name="logo">{() => <LogoPreview />}</Stack.Screen>
235
+ </Stack.Navigator>
236
+ </NavigationContainer>
237
+ </ThemeCtx.Provider>
238
+ );
239
+ }
240
+
241
+ export default App;
package/app.json ADDED
@@ -0,0 +1,33 @@
1
+ {
2
+ "expo": {
3
+ "name": "Styleguide",
4
+ "slug": "Styleguide",
5
+ "version": "1.0.0",
6
+ "orientation": "portrait",
7
+ "icon": "./assets/icon.png",
8
+ "userInterfaceStyle": "light",
9
+ "splash": {
10
+ "image": "./assets/splash.png",
11
+ "resizeMode": "contain",
12
+ "backgroundColor": "#ffffff"
13
+ },
14
+ "updates": {
15
+ "fallbackToCacheTimeout": 0
16
+ },
17
+ "assetBundlePatterns": [
18
+ "**/*"
19
+ ],
20
+ "ios": {
21
+ "supportsTablet": true
22
+ },
23
+ "android": {
24
+ "adaptiveIcon": {
25
+ "foregroundImage": "./assets/adaptive-icon.png",
26
+ "backgroundColor": "#FFFFFF"
27
+ }
28
+ },
29
+ "web": {
30
+ "favicon": "./assets/favicon.png"
31
+ }
32
+ }
33
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tactics/toddle-styleguide",
3
- "version": "0.0.6",
3
+ "version": "0.0.7",
4
4
  "main": "index.tsx",
5
5
  "types": "index.d.ts",
6
6
  "prepublish": "tsc",