@tactics/toddle-styleguide 0.1.3 → 0.1.4
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 +42 -9
- package/index.d.ts +16 -7
- package/index.tsx +59 -40
- package/jest.config.js +2 -0
- package/package.json +4 -4
- package/src/components/atoms/avatar/avatar.component.d.ts +7 -7
- 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 +7 -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/button/button.component.d.ts +11 -6
- package/src/components/atoms/calendar/__snapshots__/calendar.test.js.snap +1691 -613
- package/src/components/atoms/calendar/calendar.component.d.ts +11 -6
- 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 +10 -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/cancel-link/cancel-link.component.d.ts +4 -4
- package/src/components/atoms/check-switch/check-switch.component.d.ts +3 -3
- package/src/components/atoms/checkbox/checkbox.component.d.ts +9 -5
- package/src/components/atoms/child-list-item/child-list-item.component.d.ts +28 -16
- package/src/components/atoms/contact-item/contact-item.component.d.ts +13 -7
- 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 +9 -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.component.d.ts +7 -4
- package/src/components/atoms/date-input/date-input.test.js +3 -1
- package/src/components/atoms/day-select/components/day/day.component.d.ts +6 -6
- 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.d.ts +10 -6
- 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/department_logo/__snapshots__/department-logo.test.js.snap +16 -0
- package/src/components/atoms/department_logo/department-logo.component.d.ts +7 -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-range/filter-range.component.d.ts +14 -7
- 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 +9 -5
- 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/form-actions/form-action.component.d.ts +4 -4
- package/src/components/atoms/image-bubble/image-bubble.component.d.ts +9 -6
- package/src/components/atoms/increment-input/__snapshots__/increment-input.test.js.snap +0 -1
- package/src/components/atoms/increment-input/increment-input.component.d.ts +6 -3
- package/src/components/atoms/increment-input/increment-input.styles.js +0 -1
- package/src/components/atoms/info/info.component.d.ts +4 -4
- package/src/components/atoms/logo/logo.component.d.ts +4 -4
- package/src/components/atoms/pill/pill.component.d.ts +5 -5
- package/src/components/atoms/popover/components/backdrop/backdrop.component.d.ts +3 -3
- package/src/components/atoms/popover/components/foreground/foreground.component.d.ts +4 -4
- package/src/components/atoms/popover/components/modal/close/close.component.d.ts +4 -4
- package/src/components/atoms/popover/components/modal/heading/heading.component.d.ts +4 -4
- package/src/components/atoms/popover/components/modal/modal.component.d.ts +15 -8
- package/src/components/atoms/popover/components/modal/scroll-content/scroll-content.component.d.ts +5 -3
- package/src/components/atoms/popover/popover.component.d.ts +13 -7
- package/src/components/atoms/pressable-icon/pressable-icon.component.d.ts +10 -5
- package/src/components/atoms/quick-filter/quick-filter.component.d.ts +14 -8
- package/src/components/atoms/search/__snapshots__/search.test.js.snap +87 -0
- package/src/components/atoms/search/search.component.d.ts +12 -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-list-item/__snapshots__/select-list-item.test.js.snap +2 -0
- package/src/components/atoms/select-list-item/select-list-item.component.d.ts +13 -7
- package/src/components/atoms/select-list-item/select-list-item.styles.js +1 -0
- package/src/components/atoms/select-picker/select-picker.component.d.ts +13 -8
- package/src/components/atoms/snackbar/snackbar.component.d.ts +5 -5
- package/src/components/atoms/swipe/swipe.component.d.ts +3 -3
- package/src/components/atoms/tag/tag.component.d.ts +13 -8
- package/src/components/atoms/text-bubble/text-bubble.component.d.ts +6 -6
- package/src/components/atoms/text-input/text-input.component.d.ts +10 -6
- package/src/components/atoms/text-input/text-input.preview.d.ts +1 -1
- package/src/components/atoms/time-tracker/time-tracker.component.d.ts +8 -5
- package/src/components/atoms/timeline/timeline.component.d.ts +6 -3
- 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 +11 -5
- 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/context/theme.context.d.ts +42 -42
- package/src/icons/index.d.ts +103 -51
- package/src/icons/outline/calendar/calendar.icon.d.ts +2 -2
- package/src/icons/outline/chat/chat.icon.d.ts +2 -2
- package/src/icons/outline/chat-alt/chat-alt.icon.d.ts +2 -2
- package/src/icons/outline/check-circle/check-circle.icon.d.ts +2 -2
- package/src/icons/outline/chevron-left/chevron-left.icon.d.ts +2 -2
- package/src/icons/outline/chevron-right/chevron-right.icon.d.ts +2 -2
- package/src/icons/outline/clock/clock.icon.d.ts +2 -2
- package/src/icons/outline/cloud-download/cloud-download.icon.d.ts +2 -2
- package/src/icons/outline/cross/cross.icon.d.ts +2 -2
- package/src/icons/outline/currency-euro/currency-euro.icon.d.ts +2 -2
- package/src/icons/outline/document-text/document-text.icon.d.ts +2 -2
- package/src/icons/outline/exclamation/exclamation.icon.d.ts +2 -2
- package/src/icons/outline/exclamation-circle/exclamation-circle.icon.d.ts +2 -2
- package/src/icons/outline/eye/eye.icon.d.ts +2 -2
- package/src/icons/outline/filter/filter.icon.d.ts +2 -2
- package/src/icons/outline/information-circle/information-circle.icon.d.ts +2 -2
- package/src/icons/outline/logout/logout.icon.d.ts +2 -2
- package/src/icons/outline/mail/mail.icon.d.ts +2 -2
- package/src/icons/outline/mail-open/mail-open.icon.d.ts +2 -2
- package/src/icons/outline/menu/menu.icon.d.ts +2 -2
- package/src/icons/outline/minus-sm/minus-sm.icon.d.ts +2 -2
- package/src/icons/outline/office-building/office-building.icon.d.ts +2 -2
- package/src/icons/outline/outline.d.ts +95 -39
- package/src/icons/outline/paper-airplane/paper-airplane.icon.d.ts +2 -2
- package/src/icons/outline/paperclip/paperclip.icon.d.ts +2 -2
- package/src/icons/outline/pencil/pencil.icon.d.ts +2 -2
- package/src/icons/outline/phone/phone.icon.d.ts +2 -2
- package/src/icons/outline/plus/plus.icon.d.ts +2 -2
- package/src/icons/outline/plus-sm/plus-sm.icon.d.ts +2 -2
- package/src/icons/outline/qrcode/qrcode.icon.d.ts +2 -2
- package/src/icons/outline/refresh/refresh.icon.d.ts +2 -2
- package/src/icons/outline/search/search.icon.d.ts +2 -2
- package/src/icons/outline/selector/selector.icon.d.ts +2 -2
- package/src/icons/outline/sm-view-grid-add/sm-view-grid-add.icon.d.ts +2 -2
- package/src/icons/outline/status-online/status-online.icon.d.ts +2 -2
- package/src/icons/outline/thumb-up/thumb-up.icon.d.ts +2 -2
- package/src/icons/outline/trash/trash.icon.d.ts +2 -2
- package/src/icons/outline/user/user.icon.d.ts +2 -2
- package/src/icons/outline/user-group/user-group.icon.d.ts +2 -2
- package/src/icons/outline/users/users.icon.d.ts +2 -2
- package/src/icons/solid/chat-alt/chat-alt-solid.icon.d.ts +2 -2
- package/src/icons/solid/clock/clock-solid.icon.d.ts +2 -2
- package/src/icons/solid/information-circle/information-circle-solid.icon.d.ts +2 -2
- package/src/icons/solid/pencil/pencil-solid.icon.d.ts +2 -2
- package/src/icons/solid/phone/phone-solid.icon.d.ts +2 -2
- package/src/icons/solid/refresh/refresh-solid.icon.d.ts +2 -2
- package/src/icons/solid/solid.d.ts +18 -8
- package/src/icons/solid/status-online/status-online-solid.icon.d.ts +2 -2
- package/src/icons/solid/trash/trash-solid.icon.d.ts +2 -2
- package/src/models/initials.model.d.ts +5 -5
- package/src/theme/font/font.d.ts +70 -70
- package/src/theme/font/index.d.ts +3 -3
- package/src/theme/provider/index.d.ts +3 -3
- package/src/theme/provider/parent.theme.d.ts +40 -40
- package/src/theme/provider/staff-member.theme.d.ts +40 -40
- package/src/theme/scale/index.d.ts +10 -10
- package/src/types/bubble-alignment.enum.d.ts +2 -2
- package/src/types/icontype.type.d.ts +1 -1
- package/src/types/keyboard-types.enum.d.ts +7 -7
- package/src/types/size.enum.d.ts +3 -3
- package/src/types/visual-state.enum.d.ts +4 -4
- package/src/util/date.d.ts +1 -1
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';
|
|
@@ -48,6 +46,11 @@ 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';
|
|
51
54
|
|
|
52
55
|
const Stack = createNativeStackNavigator();
|
|
53
56
|
|
|
@@ -102,10 +105,6 @@ const HomeScreen = ({navigation}: {navigation: any}) => {
|
|
|
102
105
|
title="Info component"
|
|
103
106
|
onPress={() => navigation.push('info')}
|
|
104
107
|
/>
|
|
105
|
-
<ReactBtn
|
|
106
|
-
title="child-list-item"
|
|
107
|
-
onPress={() => navigation.push('childList')}
|
|
108
|
-
/>
|
|
109
108
|
<ReactBtn
|
|
110
109
|
title="Wide Button"
|
|
111
110
|
onPress={() => navigation.push('wide-button')}
|
|
@@ -141,6 +140,10 @@ const HomeScreen = ({navigation}: {navigation: any}) => {
|
|
|
141
140
|
onPress={() => navigation.push('select-picker')}
|
|
142
141
|
/>
|
|
143
142
|
<ReactBtn title="Popover" onPress={() => navigation.push('popover')} />
|
|
143
|
+
<ReactBtn
|
|
144
|
+
title="Filter Tab"
|
|
145
|
+
onPress={() => navigation.push('filter tab')}
|
|
146
|
+
/>
|
|
144
147
|
<ReactBtn
|
|
145
148
|
title="Child list item"
|
|
146
149
|
onPress={() => navigation.push('child-list-item')}
|
|
@@ -168,6 +171,23 @@ const HomeScreen = ({navigation}: {navigation: any}) => {
|
|
|
168
171
|
title="daySelect"
|
|
169
172
|
onPress={() => navigation.push('day-select')}
|
|
170
173
|
/>
|
|
174
|
+
<ReactBtn title="search" onPress={() => navigation.push('search')} />
|
|
175
|
+
<ReactBtn
|
|
176
|
+
title="Blocked message"
|
|
177
|
+
onPress={() => navigation.push('blocked-message')}
|
|
178
|
+
/>
|
|
179
|
+
<ReactBtn
|
|
180
|
+
title="departmentLogo"
|
|
181
|
+
onPress={() => navigation.push('departmentLogo')}
|
|
182
|
+
/>
|
|
183
|
+
<ReactBtn
|
|
184
|
+
title="Contact role"
|
|
185
|
+
onPress={() => navigation.push('contact-role')}
|
|
186
|
+
/>
|
|
187
|
+
<ReactBtn
|
|
188
|
+
title="calendarSelect"
|
|
189
|
+
onPress={() => navigation.push('calendar-select')}
|
|
190
|
+
/>
|
|
171
191
|
</ScrollView>
|
|
172
192
|
);
|
|
173
193
|
};
|
|
@@ -261,12 +281,12 @@ function App() {
|
|
|
261
281
|
<Stack.Screen name="child-list-item">
|
|
262
282
|
{() => <ChildListItemPreview />}
|
|
263
283
|
</Stack.Screen>
|
|
264
|
-
<Stack.Screen name="filter-range">
|
|
265
|
-
{() => <FilterRangePreview />}
|
|
266
|
-
</Stack.Screen>
|
|
267
284
|
<Stack.Screen name="timeline">
|
|
268
285
|
{() => <TimeLinePreview />}
|
|
269
286
|
</Stack.Screen>
|
|
287
|
+
<Stack.Screen name="filter-range">
|
|
288
|
+
{() => <FilterRangePreview />}
|
|
289
|
+
</Stack.Screen>
|
|
270
290
|
<Stack.Screen name="day-select">
|
|
271
291
|
{() => <DaySelectPreview />}
|
|
272
292
|
</Stack.Screen>
|
|
@@ -275,6 +295,19 @@ function App() {
|
|
|
275
295
|
</Stack.Screen>
|
|
276
296
|
<Stack.Screen name="swiper">{() => <SwipePreview />}</Stack.Screen>
|
|
277
297
|
<Stack.Screen name="logo">{() => <LogoPreview />}</Stack.Screen>
|
|
298
|
+
<Stack.Screen name="contact-role">
|
|
299
|
+
{() => <ContactRolePreview />}
|
|
300
|
+
</Stack.Screen>
|
|
301
|
+
<Stack.Screen name="search">{() => <SearchPreview />}</Stack.Screen>
|
|
302
|
+
<Stack.Screen name="blocked-message">
|
|
303
|
+
{() => <BlockedMessagePreview />}
|
|
304
|
+
</Stack.Screen>
|
|
305
|
+
<Stack.Screen name="departmentLogo">
|
|
306
|
+
{() => <DepartmentLogoPreview />}
|
|
307
|
+
</Stack.Screen>
|
|
308
|
+
<Stack.Screen name="calendar-select">
|
|
309
|
+
{() => <CalendarSelectPreview />}
|
|
310
|
+
</Stack.Screen>
|
|
278
311
|
</Stack.Navigator>
|
|
279
312
|
</NavigationContainer>
|
|
280
313
|
</ThemeCtx.Provider>
|
package/index.d.ts
CHANGED
|
@@ -27,10 +27,19 @@ 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 { BubbleAlignment } from './src/types/bubble-alignment.enum';
|
|
39
|
+
import { KeyBoardTypes } from './src/types/keyboard-types.enum';
|
|
40
|
+
import { Size } from './src/types/size.enum';
|
|
41
|
+
import { VisualState } from './src/types/visual-state.enum';
|
|
42
|
+
import { Initials } from './src/models/initials.model';
|
|
43
|
+
import { ThemeCtx } from './src/context/theme.context';
|
|
44
|
+
import { Scale } from './src/theme/scale/index';
|
|
45
|
+
export { Initials, BubbleAlignment, KeyBoardTypes, Size, Scale, VisualState, ThemeCtx, Avatar, Button, CancelLink, Check, Checkbox, ChildListItem, ContactItem, FilterTab, FormAction, 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 };
|
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
|
|
@@ -35,52 +36,70 @@ 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";
|
|
38
46
|
|
|
39
47
|
// Exports of enums
|
|
40
|
-
import {BubbleAlignment} from
|
|
41
|
-
import {KeyBoardTypes} from
|
|
42
|
-
import {Size} from
|
|
43
|
-
import {VisualState} from
|
|
48
|
+
import {BubbleAlignment} from './src/types/bubble-alignment.enum';
|
|
49
|
+
import {KeyBoardTypes} from './src/types/keyboard-types.enum';
|
|
50
|
+
import {Size} from './src/types/size.enum';
|
|
51
|
+
import {VisualState} from './src/types/visual-state.enum';
|
|
44
52
|
|
|
45
53
|
// Exports of models
|
|
46
|
-
import {Initials} from
|
|
54
|
+
import {Initials} from './src/models/initials.model';
|
|
47
55
|
|
|
48
56
|
// Exports of context
|
|
49
|
-
import {ThemeCtx} from
|
|
57
|
+
import {ThemeCtx} from './src/context/theme.context';
|
|
58
|
+
|
|
59
|
+
//Export of Theme
|
|
60
|
+
import {Scale} from './src/theme/scale/index';
|
|
50
61
|
|
|
51
62
|
export {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
63
|
+
Initials,
|
|
64
|
+
BubbleAlignment,
|
|
65
|
+
KeyBoardTypes,
|
|
66
|
+
Size,
|
|
67
|
+
Scale,
|
|
68
|
+
VisualState,
|
|
69
|
+
ThemeCtx,
|
|
70
|
+
Avatar,
|
|
71
|
+
Button,
|
|
72
|
+
CancelLink,
|
|
73
|
+
Check,
|
|
74
|
+
Checkbox,
|
|
75
|
+
ChildListItem,
|
|
76
|
+
ContactItem,
|
|
77
|
+
FilterTab,
|
|
78
|
+
FormAction,
|
|
79
|
+
ImageBubble,
|
|
80
|
+
Info,
|
|
81
|
+
Pill,
|
|
82
|
+
Popover,
|
|
83
|
+
PressableIcon,
|
|
84
|
+
QuickFilter,
|
|
85
|
+
Search,
|
|
86
|
+
SelectListItem,
|
|
87
|
+
Snackbar,
|
|
88
|
+
Tag,
|
|
89
|
+
TextBubble,
|
|
90
|
+
TextInput,
|
|
91
|
+
TimeTracker,
|
|
92
|
+
WideButton,
|
|
93
|
+
Icon,
|
|
94
|
+
Calendar,
|
|
95
|
+
IncrementInput,
|
|
96
|
+
Swipe,
|
|
97
|
+
Logo,
|
|
98
|
+
DaySelect,
|
|
99
|
+
BlockedMessage,
|
|
100
|
+
DepartmentLogo,
|
|
101
|
+
ContactRole,
|
|
102
|
+
Timeline,
|
|
103
|
+
SelectPicker,
|
|
104
|
+
CalendarSelect
|
|
86
105
|
};
|
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.4",
|
|
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",
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import {ImageSourcePropType} from 'react-native';
|
|
3
|
+
import {Size} from '../../../types/size.enum';
|
|
4
|
+
import {Initials} from '../../../models/initials.model';
|
|
5
5
|
declare type AvatarProps = {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
source: ImageSourcePropType | Initials;
|
|
7
|
+
size: Size;
|
|
8
|
+
isBlocked?: boolean;
|
|
9
9
|
};
|
|
10
10
|
declare const Avatar: React.FC<AvatarProps>;
|
|
11
|
-
export {
|
|
11
|
+
export {Avatar as Avatar};
|
|
@@ -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
|
+
});
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
declare type ButtonProps = {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
label: string;
|
|
3
|
+
icon?: any;
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
onPress?: () => void;
|
|
6
6
|
};
|
|
7
|
-
declare const Button: ({
|
|
8
|
-
|
|
7
|
+
declare const Button: ({
|
|
8
|
+
label,
|
|
9
|
+
icon,
|
|
10
|
+
disabled,
|
|
11
|
+
onPress,
|
|
12
|
+
}: ButtonProps) => JSX.Element;
|
|
13
|
+
export {Button as Button};
|