@tactics/toddle-styleguide 0.1.3 → 0.1.5
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/App.tsx +58 -14
- package/index.d.ts +21 -8
- package/index.tsx +36 -9
- package/jest.config.js +2 -0
- package/package.json +4 -4
- package/src/components/atoms/blocked-message/__snapshots__/blocked-message.test.js.snap +87 -0
- package/src/components/atoms/blocked-message/blocked-message.component.d.ts +5 -0
- package/src/components/atoms/blocked-message/blocked-message.component.tsx +23 -0
- package/src/components/atoms/blocked-message/blocked-message.preview.d.ts +1 -0
- package/src/components/atoms/blocked-message/blocked-message.preview.tsx +23 -0
- package/src/components/atoms/blocked-message/blocked-message.styles.d.ts +22 -0
- package/src/components/atoms/blocked-message/blocked-message.styles.js +25 -0
- package/src/components/atoms/blocked-message/blocked-message.test.js +12 -0
- package/src/components/atoms/calendar/__snapshots__/calendar.test.js.snap +1691 -613
- package/src/components/atoms/calendar/calendar.test.js +4 -2
- package/src/components/atoms/calendar-select/__snapshots__/calendar-select.test.js.snap +247 -0
- package/src/components/atoms/calendar-select/calendar-select.component.d.ts +7 -0
- package/src/components/atoms/calendar-select/calendar-select.component.tsx +56 -0
- package/src/components/atoms/calendar-select/calendar-select.preview.d.ts +1 -0
- package/src/components/atoms/calendar-select/calendar-select.preview.tsx +17 -0
- package/src/components/atoms/calendar-select/calendar-select.styles.d.ts +24 -0
- package/src/components/atoms/calendar-select/calendar-select.styles.js +30 -0
- package/src/components/atoms/calendar-select/calendar-select.test.js +20 -0
- package/src/components/atoms/contact-role/__snapshots__/contact-role.test.js.snap +75 -0
- package/src/components/atoms/contact-role/contact-role.component.d.ts +6 -0
- package/src/components/atoms/contact-role/contact-role.component.tsx +22 -0
- package/src/components/atoms/contact-role/contact-role.preview.d.ts +1 -0
- package/src/components/atoms/contact-role/contact-role.preview.tsx +17 -0
- package/src/components/atoms/contact-role/contact-role.styles.d.ts +19 -0
- package/src/components/atoms/contact-role/contact-role.styles.js +20 -0
- package/src/components/atoms/contact-role/contact-role.test.js +18 -0
- package/src/components/atoms/date-input/__snapshots__/date-input.test.js.snap +1 -1
- package/src/components/atoms/date-input/date-input.test.js +3 -1
- package/src/components/atoms/day-select/components/day/day.component.tsx +1 -1
- package/src/components/atoms/day-select/components/day/day.styles.d.ts +43 -36
- package/src/components/atoms/day-select/components/day/day.styles.js +3 -0
- package/src/components/atoms/day-select/day-select.component.tsx +17 -14
- package/src/components/atoms/day-select/day-select.styles.d.ts +8 -8
- package/src/components/atoms/default-select/__snapshots__/default-select.test.js.snap +102 -0
- package/src/components/atoms/default-select/default-select.component.d.ts +6 -0
- package/src/components/atoms/default-select/default-select.component.tsx +33 -0
- package/src/components/atoms/default-select/default-select.preview.d.ts +1 -0
- package/src/components/atoms/default-select/default-select.preview.tsx +34 -0
- package/src/components/atoms/default-select/default-select.styles.d.ts +20 -0
- package/src/components/atoms/default-select/default-select.styles.js +23 -0
- package/src/components/atoms/default-select/default-select.test.js +17 -0
- package/src/components/atoms/department_logo/__snapshots__/department-logo.test.js.snap +16 -0
- package/src/components/atoms/department_logo/department-logo.component.d.ts +5 -0
- package/src/components/atoms/department_logo/department-logo.component.tsx +17 -0
- package/src/components/atoms/department_logo/department-logo.preview.d.ts +1 -0
- package/src/components/atoms/department_logo/department-logo.preview.tsx +11 -0
- package/src/components/atoms/department_logo/department-logo.styles.d.ts +8 -0
- package/src/components/atoms/department_logo/department-logo.styles.js +11 -0
- package/src/components/atoms/department_logo/department-logo.test.js +12 -0
- package/src/components/atoms/filter-tab/__snapshots__/filter-tab.test.js.snap +8 -2
- package/src/components/atoms/filter-tab/filter-tab.component.d.ts +2 -1
- package/src/components/atoms/filter-tab/filter-tab.component.tsx +3 -1
- package/src/components/atoms/filter-tab/filter-tab.preview.tsx +48 -5
- package/src/components/atoms/filter-tab/filter-tab.styles.js +6 -3
- package/src/components/atoms/filter-tab/filter-tab.test.js +6 -2
- package/src/components/atoms/footer/__snapshots__/footer.test.js.snap +68 -0
- package/src/components/atoms/footer/footer.component.d.ts +6 -0
- package/src/components/atoms/footer/footer.component.tsx +19 -0
- package/src/components/atoms/footer/footer.preview.d.ts +1 -0
- package/src/components/atoms/footer/footer.preview.tsx +29 -0
- package/src/components/atoms/footer/footer.styles.d.ts +15 -0
- package/src/components/atoms/footer/footer.styles.js +21 -0
- package/src/components/atoms/footer/footer.test.js +13 -0
- package/src/components/atoms/increment-input/__snapshots__/increment-input.test.js.snap +0 -1
- package/src/components/atoms/increment-input/increment-input.styles.js +0 -1
- package/src/components/atoms/search/__snapshots__/search.test.js.snap +87 -0
- package/src/components/atoms/search/search.component.d.ts +8 -0
- package/src/components/atoms/search/search.component.tsx +32 -0
- package/src/components/atoms/search/search.preview.d.ts +1 -0
- package/src/components/atoms/search/search.preview.tsx +18 -0
- package/src/components/atoms/search/search.styles.d.ts +21 -0
- package/src/components/atoms/search/search.styles.js +26 -0
- package/src/components/atoms/search/search.test.js +20 -0
- package/src/components/atoms/select-link/__snapshots__/select-link.test.js.snap +45 -0
- package/src/components/atoms/select-link/select-link.component.d.ts +6 -0
- package/src/components/atoms/select-link/select-link.component.tsx +26 -0
- package/src/components/atoms/select-link/select-link.preview.d.ts +1 -0
- package/src/components/atoms/select-link/select-link.preview.tsx +20 -0
- package/src/components/atoms/select-link/select-link.styles.d.ts +17 -0
- package/src/components/atoms/select-link/select-link.styles.js +20 -0
- package/src/components/atoms/select-link/select-link.test.js +17 -0
- package/src/components/atoms/select-list-item/__snapshots__/select-list-item.test.js.snap +195 -1
- package/src/components/atoms/select-list-item/select-list-item.styles.js +1 -0
- package/src/components/atoms/select-list-item/select-list-item.test.js +1 -1
- package/src/components/atoms/split-container/__snapshots__/split-container.test.js.snap +247 -0
- package/src/components/atoms/split-container/split-container.component.d.ts +7 -0
- package/src/components/atoms/split-container/split-container.component.tsx +27 -0
- package/src/components/atoms/split-container/split-container.preview.d.ts +1 -0
- package/src/components/atoms/split-container/split-container.preview.tsx +62 -0
- package/src/components/atoms/{form-actions/form-action.styles.d.ts → split-container/split-container.styles.d.ts} +1 -1
- package/src/components/atoms/{form-actions/form-action.styles.js → split-container/split-container.styles.js} +1 -1
- package/src/components/atoms/split-container/split-container.test.js +45 -0
- package/src/components/atoms/text-bubble/__snapshots__/text-bubble.test.js.snap +230 -60
- package/src/components/atoms/text-bubble/components/timestamp/timestamp.component.d.ts +6 -0
- package/src/components/atoms/text-bubble/components/timestamp/timestamp.component.tsx +20 -0
- package/src/components/atoms/text-bubble/components/timestamp/timestamp.styles.d.ts +10 -0
- package/src/components/atoms/text-bubble/components/timestamp/timestamp.styles.js +12 -0
- package/src/components/atoms/text-bubble/text-bubble.component.d.ts +3 -2
- package/src/components/atoms/text-bubble/text-bubble.component.tsx +11 -4
- package/src/components/atoms/text-bubble/text-bubble.preview.tsx +37 -17
- package/src/components/atoms/text-bubble/text-bubble.styles.d.ts +29 -24
- package/src/components/atoms/text-bubble/text-bubble.styles.js +17 -13
- package/src/components/atoms/text-bubble/text-bubble.test.js +7 -0
- package/src/components/atoms/wide-button/__snapshots__/wide-button.test.js.snap +93 -2
- package/src/components/atoms/wide-button/wide-button.component.d.ts +2 -1
- package/src/components/atoms/wide-button/wide-button.component.tsx +8 -2
- package/src/components/atoms/wide-button/wide-button.preview.tsx +10 -0
- package/src/components/atoms/wide-button/wide-button.styles.d.ts +3 -7
- package/src/components/atoms/wide-button/wide-button.styles.js +4 -2
- package/src/components/atoms/wide-button/wide-button.test.js +14 -0
- package/src/util/date.d.ts +1 -0
- package/src/util/date.tsx +10 -0
- package/src/components/atoms/form-actions/__snapshots__/form-action.test.js.snap +0 -176
- package/src/components/atoms/form-actions/form-action.component.d.ts +0 -7
- package/src/components/atoms/form-actions/form-action.component.tsx +0 -27
- package/src/components/atoms/form-actions/form-action.preview.d.ts +0 -1
- package/src/components/atoms/form-actions/form-action.preview.tsx +0 -29
- package/src/components/atoms/form-actions/form-action.test.js +0 -32
package/App.tsx
CHANGED
|
@@ -9,10 +9,8 @@ import 'intl/locale-data/jsonp/en';
|
|
|
9
9
|
|
|
10
10
|
// Components
|
|
11
11
|
import {ThemeCtx} from './src/context/theme.context';
|
|
12
|
-
|
|
13
12
|
import {StaffMemberTheme} from './src/theme/provider';
|
|
14
13
|
import {LoadFonts} from './src/theme/font';
|
|
15
|
-
|
|
16
14
|
import {AvatarPreview} from './src/components/atoms/avatar/avatar.preview';
|
|
17
15
|
import {ButtonPreview} from './src/components/atoms/button/button.preview';
|
|
18
16
|
import {PillPreview} from './src/components/atoms/pill/pill.preview';
|
|
@@ -35,7 +33,7 @@ import {CheckboxPreview} from './src/components/atoms/checkbox/checkbox.preview'
|
|
|
35
33
|
import {CheckPreview} from './src/components/atoms/check-switch/check-switch.preview';
|
|
36
34
|
import {WideButtonPreview} from './src/components/atoms/wide-button/wide-button.preview';
|
|
37
35
|
import {PressableIconPreview} from './src/components/atoms/pressable-icon/pressable-icon.preview';
|
|
38
|
-
import {
|
|
36
|
+
import {SplitContainerPreview} from './src/components/atoms/split-container/split-container.preview';
|
|
39
37
|
import {CalendarPreview} from './src/components/atoms/calendar/calendar.preview';
|
|
40
38
|
import {QuickFilterPreview} from './src/components/atoms/quick-filter/quick-filter.prevriew';
|
|
41
39
|
import {DateInputPreview} from './src/components/atoms/date-input/date-input.preview';
|
|
@@ -48,6 +46,13 @@ import {DaySelectPreview} from './src/components/atoms/day-select/day-select.pre
|
|
|
48
46
|
import {IncrementInputPreview} from './src/components/atoms/increment-input/increment-input.preview';
|
|
49
47
|
import {SwipePreview} from './src/components/atoms/swipe/swipe.preview';
|
|
50
48
|
import {LogoPreview} from './src/components/atoms/logo/logo.preview';
|
|
49
|
+
import {ContactRolePreview} from './src/components/atoms/contact-role/contact-role.preview';
|
|
50
|
+
import {SearchPreview} from './src/components/atoms/search/search.preview';
|
|
51
|
+
import {BlockedMessagePreview} from './src/components/atoms/blocked-message/blocked-message.preview';
|
|
52
|
+
import {DepartmentLogoPreview} from './src/components/atoms/department_logo/department-logo.preview';
|
|
53
|
+
import {CalendarSelectPreview} from './src/components/atoms/calendar-select/calendar-select.preview';
|
|
54
|
+
import {FooterPreview} from './src/components/atoms/footer/footer.preview';
|
|
55
|
+
import {DefaulSelectPreview} from './src/components/atoms/default-select/default-select.preview';
|
|
51
56
|
|
|
52
57
|
const Stack = createNativeStackNavigator();
|
|
53
58
|
|
|
@@ -102,10 +107,6 @@ const HomeScreen = ({navigation}: {navigation: any}) => {
|
|
|
102
107
|
title="Info component"
|
|
103
108
|
onPress={() => navigation.push('info')}
|
|
104
109
|
/>
|
|
105
|
-
<ReactBtn
|
|
106
|
-
title="child-list-item"
|
|
107
|
-
onPress={() => navigation.push('childList')}
|
|
108
|
-
/>
|
|
109
110
|
<ReactBtn
|
|
110
111
|
title="Wide Button"
|
|
111
112
|
onPress={() => navigation.push('wide-button')}
|
|
@@ -133,14 +134,18 @@ const HomeScreen = ({navigation}: {navigation: any}) => {
|
|
|
133
134
|
/>
|
|
134
135
|
<ReactBtn title="Tag" onPress={() => navigation.push('tag')} />
|
|
135
136
|
<ReactBtn
|
|
136
|
-
title="
|
|
137
|
-
onPress={() => navigation.push('
|
|
137
|
+
title="split-container"
|
|
138
|
+
onPress={() => navigation.push('split-container')}
|
|
138
139
|
/>
|
|
139
140
|
<ReactBtn
|
|
140
141
|
title="Select Picker"
|
|
141
142
|
onPress={() => navigation.push('select-picker')}
|
|
142
143
|
/>
|
|
143
144
|
<ReactBtn title="Popover" onPress={() => navigation.push('popover')} />
|
|
145
|
+
<ReactBtn
|
|
146
|
+
title="Filter Tab"
|
|
147
|
+
onPress={() => navigation.push('filter tab')}
|
|
148
|
+
/>
|
|
144
149
|
<ReactBtn
|
|
145
150
|
title="Child list item"
|
|
146
151
|
onPress={() => navigation.push('child-list-item')}
|
|
@@ -168,6 +173,28 @@ const HomeScreen = ({navigation}: {navigation: any}) => {
|
|
|
168
173
|
title="daySelect"
|
|
169
174
|
onPress={() => navigation.push('day-select')}
|
|
170
175
|
/>
|
|
176
|
+
<ReactBtn title="search" onPress={() => navigation.push('search')} />
|
|
177
|
+
<ReactBtn
|
|
178
|
+
title="Blocked message"
|
|
179
|
+
onPress={() => navigation.push('blocked-message')}
|
|
180
|
+
/>
|
|
181
|
+
<ReactBtn
|
|
182
|
+
title="departmentLogo"
|
|
183
|
+
onPress={() => navigation.push('departmentLogo')}
|
|
184
|
+
/>
|
|
185
|
+
<ReactBtn
|
|
186
|
+
title="Contact role"
|
|
187
|
+
onPress={() => navigation.push('contact-role')}
|
|
188
|
+
/>
|
|
189
|
+
<ReactBtn
|
|
190
|
+
title="calendarSelect"
|
|
191
|
+
onPress={() => navigation.push('calendar-select')}
|
|
192
|
+
/>
|
|
193
|
+
<ReactBtn title="footer" onPress={() => navigation.push('footer')} />
|
|
194
|
+
<ReactBtn
|
|
195
|
+
title="Default select"
|
|
196
|
+
onPress={() => navigation.push('default-select')}
|
|
197
|
+
/>
|
|
171
198
|
</ScrollView>
|
|
172
199
|
);
|
|
173
200
|
};
|
|
@@ -243,8 +270,8 @@ function App() {
|
|
|
243
270
|
{() => <TimeTrackerPreview />}
|
|
244
271
|
</Stack.Screen>
|
|
245
272
|
<Stack.Screen name="tag">{() => <TagPreview />}</Stack.Screen>
|
|
246
|
-
<Stack.Screen name="
|
|
247
|
-
{() => <
|
|
273
|
+
<Stack.Screen name="split-container">
|
|
274
|
+
{() => <SplitContainerPreview />}
|
|
248
275
|
</Stack.Screen>
|
|
249
276
|
<Stack.Screen name="select-picker">
|
|
250
277
|
{() => <SelectPickerPreview />}
|
|
@@ -261,12 +288,12 @@ function App() {
|
|
|
261
288
|
<Stack.Screen name="child-list-item">
|
|
262
289
|
{() => <ChildListItemPreview />}
|
|
263
290
|
</Stack.Screen>
|
|
264
|
-
<Stack.Screen name="filter-range">
|
|
265
|
-
{() => <FilterRangePreview />}
|
|
266
|
-
</Stack.Screen>
|
|
267
291
|
<Stack.Screen name="timeline">
|
|
268
292
|
{() => <TimeLinePreview />}
|
|
269
293
|
</Stack.Screen>
|
|
294
|
+
<Stack.Screen name="filter-range">
|
|
295
|
+
{() => <FilterRangePreview />}
|
|
296
|
+
</Stack.Screen>
|
|
270
297
|
<Stack.Screen name="day-select">
|
|
271
298
|
{() => <DaySelectPreview />}
|
|
272
299
|
</Stack.Screen>
|
|
@@ -275,6 +302,23 @@ function App() {
|
|
|
275
302
|
</Stack.Screen>
|
|
276
303
|
<Stack.Screen name="swiper">{() => <SwipePreview />}</Stack.Screen>
|
|
277
304
|
<Stack.Screen name="logo">{() => <LogoPreview />}</Stack.Screen>
|
|
305
|
+
<Stack.Screen name="contact-role">
|
|
306
|
+
{() => <ContactRolePreview />}
|
|
307
|
+
</Stack.Screen>
|
|
308
|
+
<Stack.Screen name="search">{() => <SearchPreview />}</Stack.Screen>
|
|
309
|
+
<Stack.Screen name="blocked-message">
|
|
310
|
+
{() => <BlockedMessagePreview />}
|
|
311
|
+
</Stack.Screen>
|
|
312
|
+
<Stack.Screen name="departmentLogo">
|
|
313
|
+
{() => <DepartmentLogoPreview />}
|
|
314
|
+
</Stack.Screen>
|
|
315
|
+
<Stack.Screen name="calendar-select">
|
|
316
|
+
{() => <CalendarSelectPreview />}
|
|
317
|
+
</Stack.Screen>
|
|
318
|
+
<Stack.Screen name="footer">{() => <FooterPreview />}</Stack.Screen>
|
|
319
|
+
<Stack.Screen name="default-select">
|
|
320
|
+
{() => <DefaulSelectPreview />}
|
|
321
|
+
</Stack.Screen>
|
|
278
322
|
</Stack.Navigator>
|
|
279
323
|
</NavigationContainer>
|
|
280
324
|
</ThemeCtx.Provider>
|
package/index.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ import { Checkbox } from './src/components/atoms/checkbox/checkbox.component';
|
|
|
8
8
|
import { ChildListItem } from './src/components/atoms/child-list-item/child-list-item.component';
|
|
9
9
|
import { ContactItem } from './src/components/atoms/contact-item/contact-item.component';
|
|
10
10
|
import { FilterTab } from './src/components/atoms/filter-tab/filter-tab.component';
|
|
11
|
-
import {
|
|
11
|
+
import { SplitContainer } from './src/components/atoms/split-container/split-container.component';
|
|
12
12
|
import { ImageBubble } from './src/components/atoms/image-bubble/image-bubble.component';
|
|
13
13
|
import { Info } from './src/components/atoms/info/info.component';
|
|
14
14
|
import { Pill } from './src/components/atoms/pill/pill.component';
|
|
@@ -27,10 +27,23 @@ import { Calendar } from './src/components/atoms/calendar/calendar.component';
|
|
|
27
27
|
import { IncrementInput } from './src/components/atoms/increment-input/increment-input.component';
|
|
28
28
|
import { Swipe } from './src/components/atoms/swipe/swipe.component';
|
|
29
29
|
import { Logo } from './src/components/atoms/logo/logo.component';
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
|
|
30
|
+
import { DaySelect } from './src/components/atoms/day-select/day-select.component';
|
|
31
|
+
import { Search } from './src/components/atoms/search/search.component';
|
|
32
|
+
import { BlockedMessage } from './src/components/atoms/blocked-message/blocked-message.component';
|
|
33
|
+
import { DepartmentLogo } from './src/components/atoms/department_logo/department-logo.component';
|
|
34
|
+
import { ContactRole } from './src/components/atoms/contact-role/contact-role.component';
|
|
35
|
+
import { Timeline } from './src/components/atoms/timeline/timeline.component';
|
|
36
|
+
import { SelectPicker } from './src/components/atoms/select-picker/select-picker.component';
|
|
37
|
+
import { CalendarSelect } from './src/components/atoms/calendar-select/calendar-select.component';
|
|
38
|
+
import { DateInput } from './src/components/atoms/date-input/date-input.component';
|
|
39
|
+
import { FilterRange } from './src/components/atoms/filter-range/filter-range.component';
|
|
40
|
+
import { Footer } from './src/components/atoms/footer/footer.component';
|
|
41
|
+
import { DefaultSelect } from './src/components/atoms/default-select/default-select.component';
|
|
42
|
+
import { BubbleAlignment } from './src/types/bubble-alignment.enum';
|
|
43
|
+
import { KeyBoardTypes } from './src/types/keyboard-types.enum';
|
|
44
|
+
import { Size } from './src/types/size.enum';
|
|
45
|
+
import { VisualState } from './src/types/visual-state.enum';
|
|
46
|
+
import { Initials } from './src/models/initials.model';
|
|
47
|
+
import { ThemeCtx } from './src/context/theme.context';
|
|
48
|
+
import { Scale } from './src/theme/scale/index';
|
|
49
|
+
export { Initials, BubbleAlignment, KeyBoardTypes, Size, Scale, VisualState, ThemeCtx, Avatar, Button, CancelLink, Check, Checkbox, ChildListItem, ContactItem, FilterTab, SplitContainer, ImageBubble, Info, Pill, Popover, PressableIcon, QuickFilter, Search, SelectListItem, Snackbar, Tag, TextBubble, TextInput, TimeTracker, WideButton, Icon, Calendar, IncrementInput, Swipe, Logo, DaySelect, BlockedMessage, DepartmentLogo, ContactRole, Timeline, SelectPicker, CalendarSelect, DateInput, FilterRange, Footer, DefaultSelect, };
|
package/index.tsx
CHANGED
|
@@ -4,6 +4,7 @@ import 'intl';
|
|
|
4
4
|
import 'intl/locale-data/jsonp/en';
|
|
5
5
|
|
|
6
6
|
import App from './App';
|
|
7
|
+
|
|
7
8
|
registerRootComponent(App);
|
|
8
9
|
|
|
9
10
|
// Exports of components
|
|
@@ -15,7 +16,7 @@ import {Checkbox} from './src/components/atoms/checkbox/checkbox.component';
|
|
|
15
16
|
import {ChildListItem} from './src/components/atoms/child-list-item/child-list-item.component';
|
|
16
17
|
import {ContactItem} from './src/components/atoms/contact-item/contact-item.component';
|
|
17
18
|
import {FilterTab} from './src/components/atoms/filter-tab/filter-tab.component';
|
|
18
|
-
import {
|
|
19
|
+
import {SplitContainer} from './src/components/atoms/split-container/split-container.component';
|
|
19
20
|
import {ImageBubble} from './src/components/atoms/image-bubble/image-bubble.component';
|
|
20
21
|
import {Info} from './src/components/atoms/info/info.component';
|
|
21
22
|
import {Pill} from './src/components/atoms/pill/pill.component';
|
|
@@ -35,24 +36,39 @@ import {IncrementInput} from './src/components/atoms/increment-input/increment-i
|
|
|
35
36
|
import {Swipe} from './src/components/atoms/swipe/swipe.component';
|
|
36
37
|
import {Logo} from './src/components/atoms/logo/logo.component';
|
|
37
38
|
import {DaySelect} from './src/components/atoms/day-select/day-select.component';
|
|
39
|
+
import {Search} from './src/components/atoms/search/search.component';
|
|
40
|
+
import {BlockedMessage} from './src/components/atoms/blocked-message/blocked-message.component';
|
|
41
|
+
import {DepartmentLogo} from './src/components/atoms/department_logo/department-logo.component';
|
|
42
|
+
import {ContactRole} from './src/components/atoms/contact-role/contact-role.component';
|
|
43
|
+
import {Timeline} from './src/components/atoms/timeline/timeline.component';
|
|
44
|
+
import {SelectPicker} from './src/components/atoms/select-picker/select-picker.component';
|
|
45
|
+
import {CalendarSelect} from './src/components/atoms/calendar-select/calendar-select.component';
|
|
46
|
+
import {DateInput} from './src/components/atoms/date-input/date-input.component';
|
|
47
|
+
import {FilterRange} from './src/components/atoms/filter-range/filter-range.component';
|
|
48
|
+
import {Footer} from './src/components/atoms/footer/footer.component';
|
|
49
|
+
import {DefaultSelect} from './src/components/atoms/default-select/default-select.component';
|
|
38
50
|
|
|
39
51
|
// Exports of enums
|
|
40
|
-
import {BubbleAlignment} from
|
|
41
|
-
import {KeyBoardTypes} from
|
|
42
|
-
import {Size} from
|
|
43
|
-
import {VisualState} from
|
|
52
|
+
import {BubbleAlignment} from './src/types/bubble-alignment.enum';
|
|
53
|
+
import {KeyBoardTypes} from './src/types/keyboard-types.enum';
|
|
54
|
+
import {Size} from './src/types/size.enum';
|
|
55
|
+
import {VisualState} from './src/types/visual-state.enum';
|
|
44
56
|
|
|
45
57
|
// Exports of models
|
|
46
|
-
import {Initials} from
|
|
58
|
+
import {Initials} from './src/models/initials.model';
|
|
47
59
|
|
|
48
60
|
// Exports of context
|
|
49
|
-
import {ThemeCtx} from
|
|
61
|
+
import {ThemeCtx} from './src/context/theme.context';
|
|
62
|
+
|
|
63
|
+
//Export of Theme
|
|
64
|
+
import {Scale} from './src/theme/scale/index';
|
|
50
65
|
|
|
51
66
|
export {
|
|
52
67
|
Initials,
|
|
53
68
|
BubbleAlignment,
|
|
54
69
|
KeyBoardTypes,
|
|
55
70
|
Size,
|
|
71
|
+
Scale,
|
|
56
72
|
VisualState,
|
|
57
73
|
ThemeCtx,
|
|
58
74
|
Avatar,
|
|
@@ -63,13 +79,14 @@ export {
|
|
|
63
79
|
ChildListItem,
|
|
64
80
|
ContactItem,
|
|
65
81
|
FilterTab,
|
|
66
|
-
|
|
82
|
+
SplitContainer,
|
|
67
83
|
ImageBubble,
|
|
68
84
|
Info,
|
|
69
85
|
Pill,
|
|
70
86
|
Popover,
|
|
71
87
|
PressableIcon,
|
|
72
88
|
QuickFilter,
|
|
89
|
+
Search,
|
|
73
90
|
SelectListItem,
|
|
74
91
|
Snackbar,
|
|
75
92
|
Tag,
|
|
@@ -82,5 +99,15 @@ export {
|
|
|
82
99
|
IncrementInput,
|
|
83
100
|
Swipe,
|
|
84
101
|
Logo,
|
|
85
|
-
DaySelect
|
|
102
|
+
DaySelect,
|
|
103
|
+
BlockedMessage,
|
|
104
|
+
DepartmentLogo,
|
|
105
|
+
ContactRole,
|
|
106
|
+
Timeline,
|
|
107
|
+
SelectPicker,
|
|
108
|
+
CalendarSelect,
|
|
109
|
+
DateInput,
|
|
110
|
+
FilterRange,
|
|
111
|
+
Footer,
|
|
112
|
+
DefaultSelect,
|
|
86
113
|
};
|
package/jest.config.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tactics/toddle-styleguide",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.5",
|
|
4
4
|
"main": "index.tsx",
|
|
5
5
|
"types": "index.d.ts",
|
|
6
6
|
"prepublish": "tsc",
|
|
@@ -16,7 +16,6 @@
|
|
|
16
16
|
"npm": "please-use-yarn",
|
|
17
17
|
"yarn": "3.3.1"
|
|
18
18
|
},
|
|
19
|
-
"private": false,
|
|
20
19
|
"packageManager": "yarn@3.3.1",
|
|
21
20
|
"dependencies": {
|
|
22
21
|
"@callstack/react-theme-provider": "^3.0.8",
|
|
@@ -37,11 +36,12 @@
|
|
|
37
36
|
"expo-status-bar": "~1.4.0",
|
|
38
37
|
"intl": "^1.2.5",
|
|
39
38
|
"jsc-android": "^250230.2.1",
|
|
40
|
-
"luxon": "^3.
|
|
39
|
+
"luxon": "^3.2.0",
|
|
41
40
|
"react": "18.0.0",
|
|
42
41
|
"react-dom": "18.0.0",
|
|
43
42
|
"react-native": "0.69.6",
|
|
44
|
-
"react-native-
|
|
43
|
+
"react-native-calendar-strip": "^2.2.6",
|
|
44
|
+
"react-native-calendars": "^1.1293.0",
|
|
45
45
|
"react-native-gesture-handler": "~2.5.0",
|
|
46
46
|
"react-native-picker-select": "^8.0.4",
|
|
47
47
|
"react-native-safe-area-context": "4.3.1",
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`Blocked message visual test renders a cancel link with label "cancel" that is pressable 1`] = `
|
|
4
|
+
<View
|
|
5
|
+
style={
|
|
6
|
+
{
|
|
7
|
+
"alignItems": "center",
|
|
8
|
+
"backgroundColor": "#FBD9D9",
|
|
9
|
+
"borderRadius": 8,
|
|
10
|
+
"display": "flex",
|
|
11
|
+
"flexDirection": "row",
|
|
12
|
+
"paddingBottom": 24,
|
|
13
|
+
"paddingLeft": 24,
|
|
14
|
+
"paddingRight": 24,
|
|
15
|
+
"paddingTop": 24,
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
>
|
|
19
|
+
<RNSVGSvgView
|
|
20
|
+
align="xMidYMid"
|
|
21
|
+
bbHeight="28"
|
|
22
|
+
bbWidth="28"
|
|
23
|
+
fill="none"
|
|
24
|
+
focusable={false}
|
|
25
|
+
height="28"
|
|
26
|
+
meetOrSlice={0}
|
|
27
|
+
minX={0}
|
|
28
|
+
minY={0}
|
|
29
|
+
style={
|
|
30
|
+
[
|
|
31
|
+
{
|
|
32
|
+
"backgroundColor": "transparent",
|
|
33
|
+
"borderWidth": 0,
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"flex": 0,
|
|
37
|
+
"height": 28,
|
|
38
|
+
"width": 28,
|
|
39
|
+
},
|
|
40
|
+
]
|
|
41
|
+
}
|
|
42
|
+
vbHeight={27}
|
|
43
|
+
vbWidth={26}
|
|
44
|
+
width="28"
|
|
45
|
+
>
|
|
46
|
+
<RNSVGGroup
|
|
47
|
+
fill={null}
|
|
48
|
+
propList={
|
|
49
|
+
[
|
|
50
|
+
"fill",
|
|
51
|
+
]
|
|
52
|
+
}
|
|
53
|
+
>
|
|
54
|
+
<RNSVGPath
|
|
55
|
+
d="M13 9V13.5M13 18H13.0108M22.75 13.5C22.75 19.0919 18.3848 23.625 13 23.625C7.61522 23.625 3.25 19.0919 3.25 13.5C3.25 7.90812 7.61522 3.375 13 3.375C18.3848 3.375 22.75 7.90812 22.75 13.5Z"
|
|
56
|
+
propList={
|
|
57
|
+
[
|
|
58
|
+
"stroke",
|
|
59
|
+
"strokeWidth",
|
|
60
|
+
"strokeLinecap",
|
|
61
|
+
"strokeLinejoin",
|
|
62
|
+
]
|
|
63
|
+
}
|
|
64
|
+
stroke={4291976798}
|
|
65
|
+
strokeLinecap={1}
|
|
66
|
+
strokeLinejoin={1}
|
|
67
|
+
strokeWidth="2"
|
|
68
|
+
/>
|
|
69
|
+
</RNSVGGroup>
|
|
70
|
+
</RNSVGSvgView>
|
|
71
|
+
<Text
|
|
72
|
+
style={
|
|
73
|
+
{
|
|
74
|
+
"color": "#D25E5E",
|
|
75
|
+
"flex": 1,
|
|
76
|
+
"fontFamily": "Montserrat",
|
|
77
|
+
"fontSize": 14,
|
|
78
|
+
"lineHeight": 22.4,
|
|
79
|
+
"marginLeft": 16,
|
|
80
|
+
"textAlign": "center",
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
>
|
|
84
|
+
You shall not pass!!!!
|
|
85
|
+
</Text>
|
|
86
|
+
</View>
|
|
87
|
+
`;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import {useContext} from 'react';
|
|
3
|
+
|
|
4
|
+
import {Text, View} from 'react-native';
|
|
5
|
+
import {Icon} from '../../../icons/index';
|
|
6
|
+
import {ThemeCtx} from '../../../context/theme.context';
|
|
7
|
+
import {Stylesheet} from './blocked-message.styles';
|
|
8
|
+
|
|
9
|
+
type BlockedMessageProps = {
|
|
10
|
+
message: string;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export const BlockedMessage = ({message}: BlockedMessageProps) => {
|
|
14
|
+
const context = useContext(ThemeCtx);
|
|
15
|
+
const styles = Stylesheet(context);
|
|
16
|
+
|
|
17
|
+
return (
|
|
18
|
+
<View style={styles.container}>
|
|
19
|
+
<Icon.Outline.ExclamationCircle color={context.colors.ui.error.dark} />
|
|
20
|
+
<Text style={styles.message}>{message}</Text>
|
|
21
|
+
</View>
|
|
22
|
+
);
|
|
23
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const BlockedMessagePreview: ({}: {}) => JSX.Element;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import {BlockedMessage} from './blocked-message.component';
|
|
3
|
+
const {View} = require('react-native');
|
|
4
|
+
|
|
5
|
+
export const BlockedMessagePreview = ({}: {}) => {
|
|
6
|
+
return (
|
|
7
|
+
<View
|
|
8
|
+
style={{
|
|
9
|
+
flex: 1,
|
|
10
|
+
alignItems: 'center',
|
|
11
|
+
justifyContent: 'center',
|
|
12
|
+
}}
|
|
13
|
+
>
|
|
14
|
+
<View style={{width: '90%'}}>
|
|
15
|
+
<BlockedMessage
|
|
16
|
+
message={
|
|
17
|
+
'Ex-partner, wegens echtscheiding geen contact meer toegestaan!'
|
|
18
|
+
}
|
|
19
|
+
/>
|
|
20
|
+
</View>
|
|
21
|
+
</View>
|
|
22
|
+
);
|
|
23
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export function Stylesheet(context: any): {
|
|
2
|
+
container: {
|
|
3
|
+
display: 'flex';
|
|
4
|
+
flexDirection: 'row';
|
|
5
|
+
alignItems: 'center';
|
|
6
|
+
backgroundColor: any;
|
|
7
|
+
borderRadius: number;
|
|
8
|
+
paddingLeft: number;
|
|
9
|
+
paddingTop: number;
|
|
10
|
+
paddingRight: number;
|
|
11
|
+
paddingBottom: number;
|
|
12
|
+
};
|
|
13
|
+
message: {
|
|
14
|
+
textAlign: 'center';
|
|
15
|
+
color: any;
|
|
16
|
+
marginLeft: number;
|
|
17
|
+
fontFamily: string;
|
|
18
|
+
fontSize: number;
|
|
19
|
+
lineHeight: number;
|
|
20
|
+
flex: number;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import {StyleSheet} from 'react-native';
|
|
2
|
+
import {Font} from '../../../theme/font';
|
|
3
|
+
import {Scale} from '../../../theme/scale';
|
|
4
|
+
|
|
5
|
+
export const Stylesheet = (context) =>
|
|
6
|
+
StyleSheet.create({
|
|
7
|
+
container: {
|
|
8
|
+
display: 'flex',
|
|
9
|
+
flexDirection: 'row',
|
|
10
|
+
alignItems: 'center',
|
|
11
|
+
backgroundColor: context.colors.ui.error.xlight,
|
|
12
|
+
borderRadius: Scale.xs,
|
|
13
|
+
paddingLeft: Scale.l,
|
|
14
|
+
paddingTop: Scale.l,
|
|
15
|
+
paddingRight: Scale.l,
|
|
16
|
+
paddingBottom: Scale.l,
|
|
17
|
+
},
|
|
18
|
+
message: {
|
|
19
|
+
flex: 1,
|
|
20
|
+
...Font.regular,
|
|
21
|
+
textAlign: 'center',
|
|
22
|
+
color: context.colors.ui.error.dark,
|
|
23
|
+
marginLeft: Scale.m,
|
|
24
|
+
},
|
|
25
|
+
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import render from 'react-test-renderer';
|
|
3
|
+
import {BlockedMessage} from './blocked-message.component';
|
|
4
|
+
|
|
5
|
+
describe('Blocked message visual test', () => {
|
|
6
|
+
it('renders a cancel link with label "cancel" that is pressable', function () {
|
|
7
|
+
const tree = render
|
|
8
|
+
.create(<BlockedMessage message={'You shall not pass!!!!'} />)
|
|
9
|
+
.toJSON();
|
|
10
|
+
expect(tree).toMatchSnapshot();
|
|
11
|
+
});
|
|
12
|
+
});
|