@tactics/toddle-styleguide 0.0.2 → 0.0.3
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/.github/workflows/publish_styleguide.yaml +30 -0
- package/App.tsx +21 -5
- package/index.tsx +16 -1
- package/package.json +5 -2
- package/src/components/atoms/calendar/__snapshots__/calendar.test.js.snap +5813 -0
- package/src/components/atoms/calendar/calendar.component.tsx +94 -0
- package/src/components/atoms/calendar/calendar.preview.tsx +44 -0
- package/src/components/atoms/calendar/calendar.styles.js +88 -0
- package/src/components/atoms/calendar/calendar.test.js +30 -0
- package/src/components/atoms/increment-input/__snapshots__/increment-input.test.js.snap +210 -0
- package/src/components/atoms/increment-input/increment-input.component.tsx +41 -0
- package/src/components/atoms/increment-input/increment-input.preview.tsx +28 -0
- package/src/components/atoms/increment-input/increment-input.styles.js +49 -0
- package/src/components/atoms/increment-input/increment-input.test.js +14 -0
- package/src/components/atoms/swipe/Swipe.styles.js +12 -0
- package/src/components/atoms/swipe/__snapshots__/swipe.test.js.snap +589 -0
- package/src/components/atoms/swipe/swipe.component.tsx +39 -0
- package/src/components/atoms/swipe/swipe.preview.tsx +64 -0
- package/src/components/atoms/swipe/swipe.test.js +46 -0
- package/src/components/atoms/timeline/__snapshots__/timeline.test.js.snap +181 -0
- package/src/components/atoms/timeline/timeline.component.tsx +161 -0
- package/src/components/atoms/timeline/timeline.preview.tsx +43 -0
- package/src/components/atoms/timeline/timeline.styles.js +41 -0
- package/src/components/atoms/timeline/timeline.test.js +18 -0
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
name: Create Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- '*'
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
build:
|
|
10
|
+
name: Create Release
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
steps:
|
|
13
|
+
- name: Checkout code
|
|
14
|
+
uses: actions/checkout@v2
|
|
15
|
+
- name: Create Release
|
|
16
|
+
id: create_release
|
|
17
|
+
uses: actions/create-release@v1
|
|
18
|
+
env:
|
|
19
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
20
|
+
with:
|
|
21
|
+
tag_name: ${{ github.ref }}
|
|
22
|
+
release_name: Release ${{ github.ref }}
|
|
23
|
+
draft: false
|
|
24
|
+
prerelease: false
|
|
25
|
+
|
|
26
|
+
- name: Publish to npm
|
|
27
|
+
uses: JS-DevTools/npm-publish@v1
|
|
28
|
+
with:
|
|
29
|
+
token: ${{ secrets.NPM_TOKEN }}
|
|
30
|
+
access: 'public'
|
package/App.tsx
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import {Button as ReactBtn, ScrollView} from 'react-native';
|
|
3
3
|
import {NavigationContainer} from '@react-navigation/native';
|
|
4
4
|
import {createNativeStackNavigator} from '@react-navigation/native-stack';
|
|
5
5
|
|
|
@@ -23,7 +23,6 @@ import {IconOutlineWhitePreview} from './src/icons/outline/outline-white.preview
|
|
|
23
23
|
import {IconOutlineDefaultPreview} from './src/icons/outline/outline-default.preview';
|
|
24
24
|
import {IconOutlineGreyPreview} from './src/icons/outline/outline-grey.preview';
|
|
25
25
|
import {TagPreview} from './src/components/atoms/tag/tag.preview';
|
|
26
|
-
import {PopoverHeadingPreview} from './src/components/atoms/popover-heading/popover-heading.preview';
|
|
27
26
|
import {FilterTabPreview} from './src/components/atoms/filter-tab/filter-tab.preview';
|
|
28
27
|
import {ContactItemPreview} from './src/components/atoms/contact-item/contact-item.preview';
|
|
29
28
|
import {SelectListItemPreview} from './src/components/atoms/select-list-item/select-list-item-preview';
|
|
@@ -32,9 +31,13 @@ import {CheckPreview} from './src/components/atoms/check-switch/check-switch.pre
|
|
|
32
31
|
import {WideButtonPreview} from './src/components/atoms/wide-button/wide-button.preview';
|
|
33
32
|
import {PressableIconPreview} from './src/components/atoms/pressable-icon/pressable-icon.preview';
|
|
34
33
|
import {FormActionPreview} from './src/components/atoms/form-actions/form-action.preview';
|
|
34
|
+
import {CalendarPreview} from './src/components/atoms/calendar/calendar.preview';
|
|
35
35
|
import {QuickFilterPreview} from './src/components/atoms/quick-filter/quick-filter.prevriew';
|
|
36
36
|
import {TextInputPreview} from './src/components/atoms/text-input/text-input.preview';
|
|
37
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';
|
|
38
41
|
|
|
39
42
|
const Stack = createNativeStackNavigator();
|
|
40
43
|
|
|
@@ -122,10 +125,16 @@ const HomeScreen = ({navigation}: {navigation: any}) => {
|
|
|
122
125
|
title="formAction"
|
|
123
126
|
onPress={() => navigation.push('form-action')}
|
|
124
127
|
/>
|
|
128
|
+
<ReactBtn title="Calendar" onPress={() => navigation.push('calendar')} />
|
|
125
129
|
<ReactBtn
|
|
126
130
|
title="quickFilter"
|
|
127
131
|
onPress={() => navigation.push('quick-filter')}
|
|
128
132
|
/>
|
|
133
|
+
<ReactBtn
|
|
134
|
+
title="Increment input"
|
|
135
|
+
onPress={() => navigation.push('increment-input')}
|
|
136
|
+
/>
|
|
137
|
+
<ReactBtn title="swiper" onPress={() => navigation.push('swiper')} />
|
|
129
138
|
</ScrollView>
|
|
130
139
|
);
|
|
131
140
|
};
|
|
@@ -190,9 +199,6 @@ function App() {
|
|
|
190
199
|
<Stack.Screen name="select-list-item">
|
|
191
200
|
{() => <SelectListItemPreview />}
|
|
192
201
|
</Stack.Screen>
|
|
193
|
-
<Stack.Screen name="popover-heading">
|
|
194
|
-
{() => <PopoverHeadingPreview />}
|
|
195
|
-
</Stack.Screen>
|
|
196
202
|
<Stack.Screen name="filter tab">
|
|
197
203
|
{() => <FilterTabPreview />}
|
|
198
204
|
</Stack.Screen>
|
|
@@ -206,12 +212,22 @@ function App() {
|
|
|
206
212
|
<Stack.Screen name="form-action">
|
|
207
213
|
{() => <FormActionPreview />}
|
|
208
214
|
</Stack.Screen>
|
|
215
|
+
<Stack.Screen name="calendar">
|
|
216
|
+
{() => <CalendarPreview />}
|
|
217
|
+
</Stack.Screen>
|
|
209
218
|
<Stack.Screen name="quick-filter">
|
|
210
219
|
{() => <QuickFilterPreview />}
|
|
211
220
|
</Stack.Screen>
|
|
212
221
|
<Stack.Screen name="childList">
|
|
213
222
|
{() => <ChildListItemPreview />}
|
|
214
223
|
</Stack.Screen>
|
|
224
|
+
<Stack.Screen name="timeline">
|
|
225
|
+
{() => <TimeLinePreview />}
|
|
226
|
+
</Stack.Screen>
|
|
227
|
+
<Stack.Screen name="increment-input">
|
|
228
|
+
{() => <IncrementInputPreview />}
|
|
229
|
+
</Stack.Screen>
|
|
230
|
+
<Stack.Screen name="swiper">{() => <SwipePreview />}</Stack.Screen>
|
|
215
231
|
</Stack.Navigator>
|
|
216
232
|
</NavigationContainer>
|
|
217
233
|
</ThemeCtx.Provider>
|
package/index.tsx
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
// Needed to run Expo
|
|
2
|
+
import registerRootComponent from 'expo/build/launch/registerRootComponent';
|
|
3
|
+
|
|
4
|
+
import App from './App';
|
|
5
|
+
registerRootComponent(App);
|
|
6
|
+
|
|
7
|
+
// Exports of components
|
|
1
8
|
import {Avatar} from './src/components/atoms/avatar/avatar.component';
|
|
2
9
|
import {Button} from './src/components/atoms/button/button.component';
|
|
3
10
|
import {CancelLink} from './src/components/atoms/cancel-link/cancel-link.component';
|
|
@@ -20,6 +27,10 @@ import {TextBubble} from './src/components/atoms/text-bubble/text-bubble.compone
|
|
|
20
27
|
import {TextInput} from './src/components/atoms/text-input/text-input.component';
|
|
21
28
|
import {TimeTracker} from './src/components/atoms/time-tracker/time-tracker.component';
|
|
22
29
|
import {WideButton} from './src/components/atoms/wide-button/wide-button.component';
|
|
30
|
+
import { Icon } from './src/icons';
|
|
31
|
+
import { Calendar } from './src/components/atoms/calendar/calendar.component';
|
|
32
|
+
import { IncrementInput } from './src/components/atoms/increment-input/increment-input.component';
|
|
33
|
+
import { Swipe } from './src/components/atoms/swipe/swipe.component';
|
|
23
34
|
|
|
24
35
|
export {
|
|
25
36
|
Avatar,
|
|
@@ -43,5 +54,9 @@ export {
|
|
|
43
54
|
TextBubble,
|
|
44
55
|
TextInput,
|
|
45
56
|
TimeTracker,
|
|
46
|
-
WideButton
|
|
57
|
+
WideButton,
|
|
58
|
+
Icon,
|
|
59
|
+
Calendar,
|
|
60
|
+
IncrementInput,
|
|
61
|
+
Swipe
|
|
47
62
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tactics/toddle-styleguide",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
4
|
"main": "index.tsx",
|
|
5
5
|
"types": "types/index.d.ts",
|
|
6
6
|
"scripts": {
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
"@react-navigation/native-stack": "^6.9.1",
|
|
23
23
|
"@react-navigation/stack": "^6.3.3",
|
|
24
24
|
"@tactics/kinderopvang-branding": "^1.0.1",
|
|
25
|
+
"@types/xdate": "^0.8.32",
|
|
25
26
|
"expo": "~46.0.16",
|
|
26
27
|
"expo-font": "^10.2.1",
|
|
27
28
|
"expo-linear-gradient": "~11.4.0",
|
|
@@ -30,9 +31,11 @@
|
|
|
30
31
|
"react": "18.0.0",
|
|
31
32
|
"react-dom": "18.0.0",
|
|
32
33
|
"react-native": "0.69.6",
|
|
34
|
+
"react-native-calendars": "^1.1292.0",
|
|
33
35
|
"react-native-safe-area-context": "4.3.1",
|
|
34
36
|
"react-native-screens": "~3.15.0",
|
|
35
37
|
"react-native-svg": "12.3.0",
|
|
38
|
+
"react-native-swiper": "^1.6.0",
|
|
36
39
|
"react-native-web": "~0.18.7",
|
|
37
40
|
"react-test-renderer": "^18.2.0"
|
|
38
41
|
},
|
|
@@ -41,7 +44,7 @@
|
|
|
41
44
|
"@babel/preset-typescript": "^7.18.6",
|
|
42
45
|
"@types/jest": "^29.2.1",
|
|
43
46
|
"@types/node": "^18.11.7",
|
|
44
|
-
"@types/react": "^18.0.
|
|
47
|
+
"@types/react": "^18.0.25",
|
|
45
48
|
"@types/react-dom": "^18.0.8",
|
|
46
49
|
"@types/react-native": "^0.70.7",
|
|
47
50
|
"@types/react-test-renderer": "^18.0.0",
|