@tactics/toddle-styleguide 0.1.10 → 0.1.11
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 +13 -0
- package/index.d.ts +10 -1
- package/index.tsx +20 -0
- package/package.json +2 -2
- package/src/components/atoms/calendar/__snapshots__/calendar.test.js.snap +600 -1632
- package/src/components/atoms/calendar/calendar.component.d.ts +3 -3
- package/src/components/atoms/calendar/calendar.component.tsx +6 -10
- package/src/components/atoms/calendar/calendar.preview.tsx +3 -7
- package/src/components/atoms/calendar/calendar.test.js +4 -2
- package/src/components/atoms/calendar-select/calendar-select.component.d.ts +3 -3
- package/src/components/atoms/calendar-select/calendar-select.component.tsx +4 -4
- package/src/components/atoms/calendar-select/calendar-select.preview.tsx +9 -4
- package/src/components/atoms/calendar-select/calendar-select.test.js +2 -2
- 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 +2 -2
- package/src/components/atoms/date-input/date-input.component.tsx +5 -6
- package/src/components/atoms/date-input/date-input.preview.tsx +2 -2
- package/src/components/atoms/date-input/date-input.test.js +4 -2
- package/src/components/atoms/day-select/components/day/__snapshots__/day.test.js.snap +207 -0
- package/src/components/atoms/day-select/components/day/day.component.d.ts +3 -3
- package/src/components/atoms/day-select/components/day/day.component.tsx +5 -4
- package/src/components/atoms/day-select/components/day/day.test.js +37 -0
- package/src/components/atoms/day-select/day-select.component.d.ts +4 -4
- package/src/components/atoms/day-select/day-select.component.tsx +9 -9
- package/src/components/atoms/day-select/day-select.preview.tsx +6 -3
- package/src/components/atoms/heading-components/all-caps-heading/__snapshots__/all-caps-heading.test.js.snap +109 -0
- package/src/components/atoms/heading-components/all-caps-heading/all-caps-heading.component.d.ts +2 -0
- package/src/components/atoms/heading-components/all-caps-heading/all-caps-heading.component.tsx +17 -0
- package/src/components/atoms/heading-components/all-caps-heading/all-caps-heading.test.js +44 -0
- package/src/components/atoms/heading-components/heading.styles.d.ts +48 -0
- package/src/components/atoms/heading-components/heading.styles.js +63 -0
- package/src/components/atoms/heading-components/heading1/__snapshots__/heading1.test.js.snap +116 -0
- package/src/components/atoms/heading-components/heading1/heading1.component.d.ts +2 -0
- package/src/components/atoms/heading-components/heading1/heading1.component.tsx +17 -0
- package/src/components/atoms/heading-components/heading1/heading1.test.js +51 -0
- package/src/components/atoms/heading-components/heading2/__snapshots__/heading2.test.js.snap +116 -0
- package/src/components/atoms/heading-components/heading2/heading2.component.d.ts +2 -0
- package/src/components/atoms/heading-components/heading2/heading2.component.tsx +17 -0
- package/src/components/atoms/heading-components/heading2/heading2.test.js +51 -0
- package/src/components/atoms/heading-components/heading3/__snapshots__/heading3.test.js.snap +116 -0
- package/src/components/atoms/heading-components/heading3/heading3.component.d.ts +2 -0
- package/src/components/atoms/heading-components/heading3/heading3.component.tsx +17 -0
- package/src/components/atoms/heading-components/heading3/heading3.test.js +51 -0
- package/src/components/atoms/heading-components/heading4/__snapshots__/heading4.test.js.snap +116 -0
- package/src/components/atoms/heading-components/heading4/heading4.component.d.ts +2 -0
- package/src/components/atoms/heading-components/heading4/heading4.component.tsx +17 -0
- package/src/components/atoms/heading-components/heading4/heading4.test.js +51 -0
- package/src/components/atoms/heading-components/headings.preview.d.ts +1 -0
- package/src/components/atoms/heading-components/headings.preview.tsx +86 -0
- package/src/components/atoms/paragraph-components/paragraph/__snapshots__/paragraph.test.js.snap +116 -0
- package/src/components/atoms/paragraph-components/paragraph/paragraph.component.d.ts +2 -0
- package/src/components/atoms/paragraph-components/paragraph/paragraph.component.tsx +17 -0
- package/src/components/atoms/paragraph-components/paragraph/paragraph.test.js +76 -0
- package/src/components/atoms/paragraph-components/paragraph-components.preview.d.ts +1 -0
- package/src/components/atoms/paragraph-components/paragraph-components.preview.tsx +94 -0
- package/src/components/atoms/paragraph-components/paragraph-text.styles.d.ts +30 -0
- package/src/components/atoms/paragraph-components/paragraph-text.styles.js +41 -0
- package/src/components/atoms/paragraph-components/small-text/__snapshots__/small-text.test.js.snap +116 -0
- package/src/components/atoms/paragraph-components/small-text/small-text.component.d.ts +2 -0
- package/src/components/atoms/paragraph-components/small-text/small-text.component.tsx +17 -0
- package/src/components/atoms/paragraph-components/small-text/small-text.test.js +76 -0
- package/src/components/atoms/paragraph-components/tiny-text/__snapshots__/tiny-text.test.js.snap +116 -0
- package/src/components/atoms/paragraph-components/tiny-text/tiny-text.component.d.ts +2 -0
- package/src/components/atoms/paragraph-components/tiny-text/tiny-text.component.tsx +17 -0
- package/src/components/atoms/paragraph-components/tiny-text/tiny-text.test.js +76 -0
- package/src/components/atoms/text-bubble/__snapshots__/text-bubble.test.js.snap +7 -7
- package/src/components/atoms/text-bubble/components/timestamp/__snapshots__/timestamp.test.js.snap +18 -0
- package/src/components/atoms/text-bubble/components/timestamp/timestamp.component.d.ts +2 -2
- package/src/components/atoms/text-bubble/components/timestamp/timestamp.component.tsx +12 -3
- package/src/components/atoms/text-bubble/components/timestamp/timestamp.test.js +16 -0
- package/src/components/atoms/text-bubble/text-bubble.component.d.ts +2 -2
- package/src/components/atoms/text-bubble/text-bubble.component.tsx +2 -2
- package/src/components/atoms/text-bubble/text-bubble.preview.tsx +3 -2
- package/src/components/atoms/text-bubble/text-bubble.test.js +12 -7
- package/src/models/hex-color.model.d.ts +6 -0
- package/src/types/text-properties.type.d.ts +7 -0
- package/src/types/text-properties.type.ts +8 -0
- package/src/utilities/toddle-datetime/interfaces/duration.interface.d.ts +22 -0
- package/src/utilities/toddle-datetime/interfaces/duration.interface.tsx +23 -0
- package/src/utilities/toddle-datetime/interfaces/toddle-datetime.interface.d.ts +15 -0
- package/src/utilities/toddle-datetime/interfaces/toddle-datetime.interface.tsx +16 -0
- package/src/utilities/toddle-datetime/toddle-datetime.class.d.ts +20 -0
- package/src/utilities/toddle-datetime/toddle-datetime.class.tsx +82 -0
- package/src/utilities/toddle-datetime/toddle-datetime.test.js +102 -0
- package/src/utilities/toddle-datetime/types/duration-like.type.d.ts +2 -0
- package/src/utilities/toddle-datetime/types/duration-like.type.tsx +3 -0
- package/src/utilities/toddle-datetime/types/toddle-datetime.type.d.ts +2 -0
- package/src/utilities/toddle-datetime/types/toddle-datetime.type.tsx +12 -0
- package/tsconfig.json +2 -1
- package/src/util/date.d.ts +0 -4
- package/src/util/date.tsx +0 -19
package/App.tsx
CHANGED
|
@@ -55,6 +55,8 @@ import {FooterPreview} from './src/components/atoms/footer/footer.preview';
|
|
|
55
55
|
import {DefaulSelectPreview} from './src/components/atoms/default-select/default-select.preview';
|
|
56
56
|
import {PasswordInputPreview} from './src/components/atoms/password-input/password-input.preview';
|
|
57
57
|
import {MessageInputPreview} from './src/components/atoms/message-input/message-input.preview';
|
|
58
|
+
import {HeadingsPreview} from './src/components/atoms/heading-components/headings.preview';
|
|
59
|
+
import {ParagraphComponentsPreview} from './src/components/atoms/paragraph-components/paragraph-components.preview';
|
|
58
60
|
|
|
59
61
|
const Stack = createNativeStackNavigator();
|
|
60
62
|
|
|
@@ -205,6 +207,11 @@ const HomeScreen = ({navigation}: {navigation: any}) => {
|
|
|
205
207
|
title="Message input"
|
|
206
208
|
onPress={() => navigation.push('message-input')}
|
|
207
209
|
/>
|
|
210
|
+
<ReactBtn title="Headings" onPress={() => navigation.push('headings')} />
|
|
211
|
+
<ReactBtn
|
|
212
|
+
title="Paragraphs"
|
|
213
|
+
onPress={() => navigation.push('paragraphs')}
|
|
214
|
+
/>
|
|
208
215
|
</ScrollView>
|
|
209
216
|
);
|
|
210
217
|
};
|
|
@@ -335,6 +342,12 @@ function App() {
|
|
|
335
342
|
<Stack.Screen name="message-input">
|
|
336
343
|
{() => <MessageInputPreview />}
|
|
337
344
|
</Stack.Screen>
|
|
345
|
+
<Stack.Screen name="headings">
|
|
346
|
+
{() => <HeadingsPreview />}
|
|
347
|
+
</Stack.Screen>
|
|
348
|
+
<Stack.Screen name="paragraphs">
|
|
349
|
+
{() => <ParagraphComponentsPreview />}
|
|
350
|
+
</Stack.Screen>
|
|
338
351
|
</Stack.Navigator>
|
|
339
352
|
</NavigationContainer>
|
|
340
353
|
</ThemeCtx.Provider>
|
package/index.d.ts
CHANGED
|
@@ -41,11 +41,20 @@ import { Footer } from './src/components/atoms/footer/footer.component';
|
|
|
41
41
|
import { DefaultSelect } from './src/components/atoms/default-select/default-select.component';
|
|
42
42
|
import { PasswordInput } from './src/components/atoms/password-input/password-input.component';
|
|
43
43
|
import { MessageInput } from './src/components/atoms/message-input/message-input.component';
|
|
44
|
+
import { Heading1 } from './src/components/atoms/heading-components/heading1/heading1.component';
|
|
45
|
+
import { Heading2 } from './src/components/atoms/heading-components/heading2/heading2.component';
|
|
46
|
+
import { Heading3 } from './src/components/atoms/heading-components/heading3/heading3.component';
|
|
47
|
+
import { Heading4 } from './src/components/atoms/heading-components/heading4/heading4.component';
|
|
48
|
+
import { AllCapsHeading } from './src/components/atoms/heading-components/all-caps-heading/all-caps-heading.component';
|
|
49
|
+
import { Paragraph } from './src/components/atoms/paragraph-components/paragraph/paragraph.component';
|
|
50
|
+
import { SmallText } from './src/components/atoms/paragraph-components/small-text/small-text.component';
|
|
51
|
+
import { TinyText } from './src/components/atoms/paragraph-components/tiny-text/tiny-text.component';
|
|
44
52
|
import { BubbleAlignment } from './src/types/bubble-alignment.enum';
|
|
45
53
|
import { KeyBoardTypes } from './src/types/keyboard-types.enum';
|
|
46
54
|
import { Size } from './src/types/size.enum';
|
|
47
55
|
import { VisualState } from './src/types/visual-state.enum';
|
|
48
56
|
import { Initials } from './src/models/initials.model';
|
|
57
|
+
import { ToddleDateTime } from './src/utilities/toddle-datetime/toddle-datetime.class';
|
|
49
58
|
import { ThemeCtx } from './src/context/theme.context';
|
|
50
59
|
import { Scale } from './src/theme/scale/index';
|
|
51
|
-
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, PasswordInput, MessageInput, };
|
|
60
|
+
export { Initials, BubbleAlignment, KeyBoardTypes, Size, Scale, VisualState, ThemeCtx, ToddleDateTime, 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, PasswordInput, MessageInput, Heading1, Heading2, Heading3, Heading4, AllCapsHeading, Paragraph, SmallText, TinyText, };
|
package/index.tsx
CHANGED
|
@@ -49,6 +49,14 @@ import {Footer} from './src/components/atoms/footer/footer.component';
|
|
|
49
49
|
import {DefaultSelect} from './src/components/atoms/default-select/default-select.component';
|
|
50
50
|
import {PasswordInput} from './src/components/atoms/password-input/password-input.component';
|
|
51
51
|
import {MessageInput} from './src/components/atoms/message-input/message-input.component';
|
|
52
|
+
import {Heading1} from './src/components/atoms/heading-components/heading1/heading1.component';
|
|
53
|
+
import {Heading2} from './src/components/atoms/heading-components/heading2/heading2.component';
|
|
54
|
+
import {Heading3} from './src/components/atoms/heading-components/heading3/heading3.component';
|
|
55
|
+
import {Heading4} from './src/components/atoms/heading-components/heading4/heading4.component';
|
|
56
|
+
import {AllCapsHeading} from './src/components/atoms/heading-components/all-caps-heading/all-caps-heading.component';
|
|
57
|
+
import {Paragraph} from './src/components/atoms/paragraph-components/paragraph/paragraph.component';
|
|
58
|
+
import {SmallText} from './src/components/atoms/paragraph-components/small-text/small-text.component';
|
|
59
|
+
import {TinyText} from './src/components/atoms/paragraph-components/tiny-text/tiny-text.component';
|
|
52
60
|
|
|
53
61
|
// Exports of enums
|
|
54
62
|
import {BubbleAlignment} from './src/types/bubble-alignment.enum';
|
|
@@ -59,6 +67,9 @@ import {VisualState} from './src/types/visual-state.enum';
|
|
|
59
67
|
// Exports of models
|
|
60
68
|
import {Initials} from './src/models/initials.model';
|
|
61
69
|
|
|
70
|
+
// Exports of classes
|
|
71
|
+
import {ToddleDateTime} from './src/utilities/toddle-datetime/toddle-datetime.class';
|
|
72
|
+
|
|
62
73
|
// Exports of context
|
|
63
74
|
import {ThemeCtx} from './src/context/theme.context';
|
|
64
75
|
|
|
@@ -73,6 +84,7 @@ export {
|
|
|
73
84
|
Scale,
|
|
74
85
|
VisualState,
|
|
75
86
|
ThemeCtx,
|
|
87
|
+
ToddleDateTime,
|
|
76
88
|
Avatar,
|
|
77
89
|
Button,
|
|
78
90
|
CancelLink,
|
|
@@ -114,4 +126,12 @@ export {
|
|
|
114
126
|
DefaultSelect,
|
|
115
127
|
PasswordInput,
|
|
116
128
|
MessageInput,
|
|
129
|
+
Heading1,
|
|
130
|
+
Heading2,
|
|
131
|
+
Heading3,
|
|
132
|
+
Heading4,
|
|
133
|
+
AllCapsHeading,
|
|
134
|
+
Paragraph,
|
|
135
|
+
SmallText,
|
|
136
|
+
TinyText,
|
|
117
137
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tactics/toddle-styleguide",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.11",
|
|
4
4
|
"main": "index.tsx",
|
|
5
5
|
"types": "index.d.ts",
|
|
6
6
|
"prepublish": "tsc",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"start": "./node_modules/.bin/tsc && ./node_modules/.bin/expo start",
|
|
10
10
|
"test": "./node_modules/.bin/jest",
|
|
11
11
|
"format": "./node_modules/.bin/prettier --write src/.",
|
|
12
|
-
"types": "./node_modules/.bin/tsc index.tsx --declaration --allowJs --emitDeclarationOnly --esModuleInterop --jsx react-native --skipLibCheck"
|
|
12
|
+
"types": "./node_modules/.bin/tsc index.tsx --declaration --allowJs --emitDeclarationOnly --esModuleInterop --jsx react-native --skipLibCheck --target es5"
|
|
13
13
|
},
|
|
14
14
|
"engineStrict": true,
|
|
15
15
|
"engines": {
|