@tactics/toddle-styleguide 1.2.8 → 1.2.9
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/package.json +1 -1
- package/src/components/atoms/backdrop/backdrop.component.d.ts +4 -7
- package/src/components/atoms/calendar/__snapshots__/calendar.test.js.snap +18 -18
- package/src/components/atoms/calendar/calendar.component.d.ts +6 -11
- package/src/components/atoms/check-switch/check-switch.component.d.ts +3 -3
- package/src/components/atoms/footer/footer.component.d.ts +6 -6
- package/src/components/atoms/heading-components/all-caps-heading/all-caps-heading.component.d.ts +2 -10
- package/src/components/atoms/heading-components/heading1/heading1.component.d.ts +2 -10
- package/src/components/atoms/heading-components/heading2/heading2.component.d.ts +2 -10
- package/src/components/atoms/heading-components/heading3/heading3.component.d.ts +2 -10
- package/src/components/atoms/heading-components/heading4/heading4.component.d.ts +2 -10
- package/src/components/atoms/heading-components/index.d.ts +6 -6
- package/src/components/atoms/image-bubble/image-bubble.component.d.ts +6 -9
- package/src/components/atoms/increment-input/increment-input.component.d.ts +4 -8
- package/src/components/atoms/logo/logo.component.d.ts +4 -4
- package/src/components/atoms/paragraph-components/index.d.ts +4 -4
- package/src/components/atoms/paragraph-components/paragraph/paragraph.component.d.ts +2 -10
- package/src/components/atoms/paragraph-components/small-text/small-text.component.d.ts +2 -10
- package/src/components/atoms/paragraph-components/tiny-text/tiny-text.component.d.ts +2 -10
- package/src/components/atoms/quick-message/__snapshots__/quick-message.test.js.snap +72 -1
- package/src/components/atoms/quick-message/quick-message.component.d.ts +5 -8
- package/src/components/atoms/quick-message/quick-message.component.tsx +3 -1
- package/src/components/atoms/quick-message/quick-message.preview.tsx +10 -1
- package/src/components/atoms/quick-message/quick-message.styles.d.ts +13 -13
- package/src/components/atoms/quick-message/quick-message.styles.js +4 -2
- package/src/components/atoms/quick-message/quick-message.test.js +38 -6
- package/src/components/atoms/split-container/split-container.component.d.ts +4 -7
- package/src/components/atoms/static-wave/static-wave.component.d.ts +6 -11
- package/src/components/atoms/text-input/text-input.component.d.ts +6 -10
- package/src/components/atoms/text-input/text-input.component.tsx +6 -9
- package/src/components/atoms/text-input/text-input.preview.d.ts +1 -1
- package/src/components/atoms/text-input/text-input.preview.tsx +3 -3
- package/src/components/atoms/text-input/text-input.styles.d.ts +20 -44
- package/src/components/atoms/text-input/text-input.styles.js +7 -13
- package/src/components/molecules/avatar/avatar.component.d.ts +11 -18
- package/src/components/molecules/blocked-message/blocked-message.component.d.ts +2 -4
- package/src/components/molecules/button/button.component.d.ts +11 -20
- package/src/components/molecules/calendar-select/calendar-select.component.d.ts +7 -12
- package/src/components/molecules/cancel-link/cancel-link.component.d.ts +4 -4
- package/src/components/molecules/checkbox/checkbox.component.d.ts +5 -9
- package/src/components/molecules/contact-role/contact-role.component.d.ts +3 -6
- package/src/components/molecules/date-input/date-input.component.d.ts +4 -7
- package/src/components/molecules/day/day.component.d.ts +6 -6
- package/src/components/molecules/day/day.component.tsx +17 -4
- package/src/components/molecules/day/day.styles.d.ts +27 -44
- package/src/components/molecules/day/day.styles.js +14 -17
- package/src/components/molecules/default-select/default-select.component.d.ts +3 -6
- package/src/components/molecules/department_logo/department-logo.component.d.ts +3 -5
- package/src/components/molecules/failed-to-send/failed-bubble.component.d.ts +6 -11
- package/src/components/molecules/filter-range/filter-range.component.d.ts +7 -14
- package/src/components/molecules/filter-tab/filter-tab.component.d.ts +7 -11
- package/src/components/molecules/info/info.component.d.ts +4 -4
- package/src/components/molecules/language-button/language-button.component.d.ts +4 -8
- package/src/components/molecules/message-input/message-input.component.d.ts +7 -11
- package/src/components/molecules/more-info-button/more-info-button.component.d.ts +4 -8
- package/src/components/molecules/password-input/password-input.component.d.ts +5 -9
- package/src/components/molecules/password-input/password-input.component.tsx +7 -9
- package/src/components/molecules/password-input/password-input.styles.d.ts +27 -26
- package/src/components/molecules/password-input/password-input.styles.js +6 -6
- package/src/components/molecules/pill/pill.component.d.ts +5 -5
- package/src/components/molecules/pressable-icon/pressable-icon.component.d.ts +5 -10
- package/src/components/molecules/quick-filter/quick-filter.component.d.ts +9 -16
- package/src/components/molecules/search-input/__snapshots__/search.test.js.snap +23 -13
- package/src/components/molecules/search-input/search.component.d.ts +9 -16
- package/src/components/molecules/search-input/search.component.tsx +19 -30
- package/src/components/molecules/search-input/search.preview.d.ts +1 -1
- package/src/components/molecules/search-input/search.preview.tsx +8 -6
- package/src/components/molecules/search-input/search.styles.d.ts +31 -30
- package/src/components/molecules/search-input/search.styles.js +14 -8
- package/src/components/molecules/search-input/search.test.js +3 -1
- package/src/components/molecules/select-link/select-link.component.d.ts +4 -4
- package/src/components/molecules/select-list-item/select-list-item.component.d.ts +7 -13
- package/src/components/molecules/select-picker/select-picker.component.d.ts +8 -13
- package/src/components/molecules/send-bubble/send-text-bubble.component.d.ts +10 -17
- package/src/components/molecules/send-bubble/send-text-bubble.component.tsx +1 -5
- package/src/components/molecules/send-bubble/send-text-bubble.styles.d.ts +58 -74
- package/src/components/molecules/send-bubble/send-text-bubble.styles.js +2 -8
- package/src/components/molecules/snackbar/snackbar.component.d.ts +5 -5
- package/src/components/molecules/swipe/swipe.component.d.ts +5 -5
- package/src/components/molecules/tag/tag.component.d.ts +6 -11
- package/src/components/molecules/time-picker/time-picker.component.d.ts +5 -10
- package/src/components/molecules/time-tracker/time-tracker.component.d.ts +6 -10
- package/src/components/molecules/timeline/timeline.component.d.ts +3 -6
- package/src/components/molecules/timeline/timeline.styles.d.ts +40 -50
- package/src/components/molecules/timeline/timeline.styles.js +2 -2
- package/src/components/molecules/timestamp/timestamp.component.d.ts +4 -3
- package/src/components/molecules/timestamp/timestamp.component.tsx +4 -7
- package/src/components/molecules/wave-background/wave.component.d.ts +2 -7
- package/src/components/molecules/wide-button/wide-button.component.d.ts +6 -11
- package/src/components/organisms/child-list-item/__snapshots__/child-list-item.test.js.snap +165 -10
- package/src/components/organisms/child-list-item/child-list-item.component.d.ts +18 -32
- package/src/components/organisms/child-list-item/child-list-item.component.tsx +24 -1
- package/src/components/organisms/child-list-item/child-list-item.preview.tsx +11 -0
- package/src/components/organisms/child-list-item/child-list-item.styles.d.ts +35 -41
- package/src/components/organisms/child-list-item/child-list-item.styles.js +2 -3
- package/src/components/organisms/child-list-item/child-list-item.test.js +9 -4
- package/src/components/organisms/child-list-item/components/child-list-tag.component.d.ts +6 -0
- package/src/components/organisms/child-list-item/components/child-list-tag.component.tsx +28 -0
- package/src/components/organisms/child-list-item/components/child-list-tag.styles.d.ts +10 -0
- package/src/components/organisms/child-list-item/components/child-list-tag.styles.js +16 -0
- package/src/components/organisms/contact-item/contact-item.component.d.ts +6 -11
- package/src/components/organisms/day-select/day-select.component.d.ts +6 -10
- package/src/components/organisms/day-select/day-select.preview.tsx +9 -5
- package/src/components/organisms/loading-indicator/animation-style.animate.d.ts +3 -13
- package/src/components/organisms/loading-indicator/dot.component.d.ts +3 -3
- package/src/components/organisms/loading-indicator/loading-indicator.component.d.ts +2 -9
- package/src/components/organisms/my-child-list-item/__snapshots__/my-child-list-item.test.js.snap +143 -399
- package/src/components/organisms/my-child-list-item/my-child-list-item.component.d.ts +9 -18
- package/src/components/organisms/my-child-list-item/my-child-list-item.component.tsx +32 -59
- package/src/components/organisms/my-child-list-item/my-child-list-item.preview.tsx +36 -24
- package/src/components/organisms/my-child-list-item/my-child-list-item.styles.d.ts +32 -28
- package/src/components/organisms/my-child-list-item/my-child-list-item.styles.js +16 -11
- package/src/components/organisms/my-child-list-item/my-child-list-item.test.js +5 -22
- package/src/components/organisms/person-info-card/person-info-card.component.d.ts +10 -18
- package/src/components/organisms/tab-view/tab-view.component.d.ts +8 -12
- package/src/components/organisms/text-bubble/text-bubble.component.d.ts +15 -24
- package/src/components/organisms/text-bubble/text-bubble.component.tsx +3 -1
- package/src/components/organisms/text-bubble/text-bubble.preview.tsx +8 -4
- package/src/components/organisms/text-bubble/text-bubble.styles.d.ts +31 -44
- package/src/components/organisms/text-bubble/text-bubble.styles.js +2 -0
- package/src/components/templates/modal/components/fade-panel.component.d.ts +8 -16
- package/src/components/templates/modal/components/fade-panel.component.tsx +1 -1
- package/src/components/templates/modal/modal.component.d.ts +7 -14
- package/src/components/templates/popover/components/foreground/foreground.component.d.ts +4 -4
- package/src/components/templates/popover/components/modal/close/close.component.d.ts +4 -4
- package/src/components/templates/popover/components/modal/heading/heading.component.d.ts +4 -4
- package/src/components/templates/popover/components/modal/modal.component.d.ts +9 -17
- package/src/components/templates/popover/components/modal/scroll-content/scroll-content.component.d.ts +3 -5
- package/src/components/templates/popover/popover.component.d.ts +8 -15
- package/src/components/templates/popover-action/popover-action.component.d.ts +4 -8
- package/src/context/loading-dots.context.d.ts +6 -9
- package/src/context/theme.context.d.ts +47 -47
- package/src/gradients/main/main.gradient.d.ts +2 -4
- package/src/icons/index.d.ts +2 -7
- 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 -5
- package/src/icons/outline/chevron-left/chevron-left.icon.d.ts +2 -5
- package/src/icons/outline/chevron-right/chevron-right.icon.d.ts +2 -5
- package/src/icons/outline/clock/clock.icon.d.ts +2 -2
- package/src/icons/outline/cloud-download/cloud-download.icon.d.ts +2 -5
- package/src/icons/outline/currency-euro/currency-euro.icon.d.ts +2 -5
- package/src/icons/outline/document-text/document-text.icon.d.ts +2 -5
- package/src/icons/outline/exclamation/exclamation.icon.d.ts +2 -5
- package/src/icons/outline/exclamation-circle/exclamation-circle.icon.d.ts +2 -5
- package/src/icons/outline/eye/eye.icon.d.ts +2 -2
- package/src/icons/outline/eye-off/eye-off.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 -5
- 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 -5
- package/src/icons/outline/office-building/office-building.icon.d.ts +2 -5
- package/src/icons/outline/outline.d.ts +2 -6
- package/src/icons/outline/paper-airplane/paper-airplane.icon.d.ts +2 -5
- package/src/icons/outline/paperclip/paperclip.icon.d.ts +2 -5
- 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 -5
- 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 -5
- package/src/icons/outline/status-online/status-online.icon.d.ts +2 -5
- 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 -5
- package/src/icons/outline/users/users.icon.d.ts +2 -2
- package/src/icons/outline/xmark/xmark.icon.d.ts +2 -2
- package/src/icons/solid/calendar/calendar.icon.d.ts +2 -2
- package/src/icons/solid/chat/chat.icon.d.ts +2 -2
- package/src/icons/solid/chat-alt/chat-alt-solid.icon.d.ts +2 -2
- package/src/icons/solid/check-circle/check-circle.icon.d.ts +2 -5
- package/src/icons/solid/chevron-left/chevron-left.icon.d.ts +2 -5
- package/src/icons/solid/chevron-right/chevron-right.icon.d.ts +2 -5
- package/src/icons/solid/clock/clock-solid.icon.d.ts +2 -2
- package/src/icons/solid/cloud-download/cloud-download.icon.d.ts +2 -5
- package/src/icons/solid/currency-euro/currency-euro.icon.d.ts +2 -5
- package/src/icons/solid/document-text/document-text-solid.icon.d.ts +2 -5
- package/src/icons/solid/exclamation/exclamation.icon.d.ts +2 -5
- package/src/icons/solid/exclamation-circle/exclamation-circle.icon.d.ts +2 -5
- package/src/icons/solid/eye/eye.icon.d.ts +2 -2
- package/src/icons/solid/eye-off/eye-off.icon.d.ts +2 -2
- package/src/icons/solid/filter/filter.icon.d.ts +2 -2
- package/src/icons/solid/information-circle/information-circle-solid.icon.d.ts +2 -5
- package/src/icons/solid/logout/logout.icon.d.ts +2 -2
- package/src/icons/solid/mail/mail.icon.d.ts +2 -2
- package/src/icons/solid/mail-open/mail-open.icon.d.ts +2 -2
- package/src/icons/solid/menu/menu.icon.d.ts +2 -2
- package/src/icons/solid/minus-sm/minus-sm.icon.d.ts +2 -5
- package/src/icons/solid/office-building/office-building.icon.d.ts +2 -5
- package/src/icons/solid/paper-airplane/paper-airplane.icon.d.ts +2 -5
- package/src/icons/solid/paperclip/paperclip.icon.d.ts +2 -5
- 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/plus/plus.icon.d.ts +2 -2
- package/src/icons/solid/plus-sm/plus-sm.icon.d.ts +2 -5
- package/src/icons/solid/qrcode/qrcode.icon.d.ts +2 -2
- package/src/icons/solid/refresh/refresh-solid.icon.d.ts +2 -2
- package/src/icons/solid/search/search.icon.d.ts +2 -2
- package/src/icons/solid/selector/selector.icon.d.ts +2 -2
- package/src/icons/solid/sm-view-grid-add/sm-view-grid-add.icon.d.ts +2 -5
- package/src/icons/solid/solid.d.ts +2 -6
- package/src/icons/solid/status-online/status-online-solid.icon.d.ts +2 -5
- package/src/icons/solid/thumb-up/thumb-up.icon.d.ts +2 -2
- package/src/icons/solid/trash/trash-solid.icon.d.ts +2 -2
- package/src/icons/solid/user/user.icon.d.ts +2 -2
- package/src/icons/solid/user-group/user-group.icon.d.ts +2 -5
- package/src/icons/solid/users/users-solid.icon.d.ts +2 -2
- package/src/icons/solid/xmark/xmark.icon.d.ts +2 -2
- package/src/interfaces/icon.interface.d.ts +5 -5
- package/src/models/hex-color.model.d.ts +4 -4
- 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 +45 -45
- package/src/theme/provider/staff-member.theme.d.ts +45 -45
- package/src/theme/responsive/index.d.ts +2 -5
- 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 -41
- package/src/types/keyboard-types.enum.d.ts +7 -7
- package/src/types/loading-dots.type.d.ts +6 -6
- package/src/types/size.enum.d.ts +3 -3
- package/src/types/text-properties.type.d.ts +8 -8
- package/src/types/visual-state.enum.d.ts +5 -5
- package/src/utilities/color-handler/color-handler.d.ts +2 -6
- package/src/utilities/toddle-datetime/interfaces/duration.interface.d.ts +18 -18
- package/src/utilities/toddle-datetime/interfaces/toddle-datetime.interface.d.ts +18 -14
- package/src/utilities/toddle-datetime/interfaces/toddle-datetime.interface.tsx +6 -0
- package/src/utilities/toddle-datetime/toddle-datetime.class.d.ts +48 -92
- package/src/utilities/toddle-datetime/toddle-datetime.class.tsx +31 -2
- package/src/utilities/toddle-datetime/toddle-datetime.preview.tsx +114 -84
- package/src/utilities/toddle-datetime/types/duration.type.d.ts +4 -0
- package/src/utilities/toddle-datetime/types/{duration-like.type.tsx → duration.type.tsx} +3 -0
- package/src/utilities/toddle-datetime/types/toddle-datetime.type.d.ts +3 -11
- package/src/utilities/toddle-datetime/types/toddle-datetime.type.tsx +8 -1
- package/src/utilities/toddle-datetime/types/duration-like.type.d.ts +0 -2
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
type LanguageButtonProps = {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
label: string;
|
|
3
|
+
onPress?: () => void;
|
|
4
|
+
textColor?: string;
|
|
5
5
|
};
|
|
6
|
-
export declare const LanguageButton: ({
|
|
7
|
-
label,
|
|
8
|
-
onPress,
|
|
9
|
-
textColor,
|
|
10
|
-
}: LanguageButtonProps) => JSX.Element;
|
|
6
|
+
export declare const LanguageButton: ({ label, onPress, textColor, }: LanguageButtonProps) => JSX.Element;
|
|
11
7
|
export {};
|
|
@@ -1,13 +1,9 @@
|
|
|
1
|
-
import {TextInputProps} from 'react-native';
|
|
2
|
-
import {KeyBoardTypes} from '../../../types/keyboard-types.enum';
|
|
1
|
+
import { TextInputProps } from 'react-native';
|
|
2
|
+
import { KeyBoardTypes } from '../../../types/keyboard-types.enum';
|
|
3
3
|
interface MessageInputProps extends TextInputProps {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
keyboardType?: KeyBoardTypes;
|
|
5
|
+
onPressSend: () => void;
|
|
6
|
+
addAttachment: () => void;
|
|
7
7
|
}
|
|
8
|
-
declare const MessageInput: ({
|
|
9
|
-
|
|
10
|
-
onPressSend,
|
|
11
|
-
...props
|
|
12
|
-
}: MessageInputProps) => JSX.Element;
|
|
13
|
-
export {MessageInput};
|
|
8
|
+
declare const MessageInput: ({ keyboardType, onPressSend, ...props }: MessageInputProps) => JSX.Element;
|
|
9
|
+
export { MessageInput };
|
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
type MoreInfoButtonProps = {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
label: string;
|
|
3
|
+
onPress?: () => void;
|
|
4
|
+
textColor?: string;
|
|
5
5
|
};
|
|
6
|
-
export declare const MoreInfoButton: ({
|
|
7
|
-
label,
|
|
8
|
-
onPress,
|
|
9
|
-
textColor,
|
|
10
|
-
}: MoreInfoButtonProps) => JSX.Element;
|
|
6
|
+
export declare const MoreInfoButton: ({ label, onPress, textColor, }: MoreInfoButtonProps) => JSX.Element;
|
|
11
7
|
export {};
|
|
@@ -1,11 +1,7 @@
|
|
|
1
|
-
import {TextInputProps} from 'react-native';
|
|
2
|
-
import {KeyBoardTypes} from '../../../types/keyboard-types.enum';
|
|
3
|
-
interface PasswordInputProps
|
|
4
|
-
|
|
5
|
-
keyboardType?: KeyBoardTypes;
|
|
1
|
+
import { TextInputProps } from 'react-native';
|
|
2
|
+
import { KeyBoardTypes } from '../../../types/keyboard-types.enum';
|
|
3
|
+
interface PasswordInputProps extends Omit<TextInputProps, 'secureTextEntry' | 'keyboardType'> {
|
|
4
|
+
keyboardType?: KeyBoardTypes;
|
|
6
5
|
}
|
|
7
|
-
export declare const PasswordInput: ({
|
|
8
|
-
keyboardType,
|
|
9
|
-
...props
|
|
10
|
-
}: PasswordInputProps) => JSX.Element;
|
|
6
|
+
export declare const PasswordInput: ({ keyboardType, ...props }: PasswordInputProps) => JSX.Element;
|
|
11
7
|
export {};
|
|
@@ -24,15 +24,13 @@ export const PasswordInput = ({keyboardType, ...props}: PasswordInputProps) => {
|
|
|
24
24
|
|
|
25
25
|
return (
|
|
26
26
|
<View style={styles.container}>
|
|
27
|
-
<
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
/>
|
|
35
|
-
</View>
|
|
27
|
+
<RNTextInput
|
|
28
|
+
style={styles.textInput}
|
|
29
|
+
placeholderTextColor={Context.colors.ui.grey}
|
|
30
|
+
secureTextEntry={secure}
|
|
31
|
+
keyboardType={keyboardType ? keyboardType : KeyBoardTypes.DEFAULT}
|
|
32
|
+
{...props}
|
|
33
|
+
/>
|
|
36
34
|
<Pressable
|
|
37
35
|
style={styles.iconContainer}
|
|
38
36
|
onPress={() => setSecure(!secure)}
|
|
@@ -1,28 +1,29 @@
|
|
|
1
1
|
export function Stylesheet(Context: any): {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
2
|
+
container: {
|
|
3
|
+
width: string;
|
|
4
|
+
height: number;
|
|
5
|
+
flexDirection: "row";
|
|
6
|
+
backgroundColor: any;
|
|
7
|
+
borderRadius: number;
|
|
8
|
+
alignItems: "center";
|
|
9
|
+
};
|
|
10
|
+
textInput: {
|
|
11
|
+
lineHeight: number;
|
|
12
|
+
color: any;
|
|
13
|
+
fontFamily: string;
|
|
14
|
+
fontSize: number;
|
|
15
|
+
flex: number;
|
|
16
|
+
height: string;
|
|
17
|
+
paddingLeft: number;
|
|
18
|
+
justifyContent: "center";
|
|
19
|
+
};
|
|
20
|
+
iconContainer: {
|
|
21
|
+
height: string;
|
|
22
|
+
alignItems: "center";
|
|
23
|
+
justifyContent: "center";
|
|
24
|
+
paddingLeft: number;
|
|
25
|
+
paddingTop: number;
|
|
26
|
+
paddingRight: number;
|
|
27
|
+
paddingBottom: number;
|
|
28
|
+
};
|
|
28
29
|
};
|
|
@@ -12,19 +12,19 @@ export const Stylesheet = (Context) =>
|
|
|
12
12
|
borderRadius: Scale.xs,
|
|
13
13
|
alignItems: 'center',
|
|
14
14
|
},
|
|
15
|
-
textInputContainer: {
|
|
16
|
-
flex: 1,
|
|
17
|
-
},
|
|
18
15
|
textInput: {
|
|
16
|
+
flex: 1,
|
|
17
|
+
height: '100%',
|
|
19
18
|
paddingLeft: Scale.m,
|
|
20
|
-
|
|
21
|
-
paddingBottom: 0,
|
|
22
|
-
paddingRight: Scale.m,
|
|
19
|
+
justifyContent: 'center',
|
|
23
20
|
...Font.medium,
|
|
24
21
|
lineHeight: 20,
|
|
25
22
|
color: Context.colors.ui.black,
|
|
26
23
|
},
|
|
27
24
|
iconContainer: {
|
|
25
|
+
height: '100%',
|
|
26
|
+
alignItems: 'center',
|
|
27
|
+
justifyContent: 'center',
|
|
28
28
|
paddingLeft: Scale.m,
|
|
29
29
|
paddingTop: Scale.xs,
|
|
30
30
|
paddingRight: Scale.m,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {VisualState} from '../../../types/visual-state.enum';
|
|
1
|
+
import { VisualState } from '../../../types/visual-state.enum';
|
|
2
2
|
type PillProps = {
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
visualState: VisualState;
|
|
4
|
+
label: string;
|
|
5
5
|
};
|
|
6
|
-
declare const Pill: ({visualState, label}: PillProps) => JSX.Element;
|
|
7
|
-
export {Pill as Pill};
|
|
6
|
+
declare const Pill: ({ visualState, label }: PillProps) => JSX.Element;
|
|
7
|
+
export { Pill as Pill };
|
|
@@ -1,14 +1,9 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
type PressableIconProps = {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
icon: React.ReactElement;
|
|
4
|
+
inverted?: boolean;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
onPress?: () => void;
|
|
7
7
|
};
|
|
8
|
-
export declare const PressableIcon: ({
|
|
9
|
-
icon,
|
|
10
|
-
inverted,
|
|
11
|
-
disabled,
|
|
12
|
-
onPress,
|
|
13
|
-
}: PressableIconProps) => JSX.Element;
|
|
8
|
+
export declare const PressableIcon: ({ icon, inverted, disabled, onPress, }: PressableIconProps) => JSX.Element;
|
|
14
9
|
export {};
|
|
@@ -1,18 +1,11 @@
|
|
|
1
|
-
import {VisualState} from '../../../types/visual-state.enum';
|
|
1
|
+
import { VisualState } from '../../../types/visual-state.enum';
|
|
2
2
|
type QuickFilterProps = {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
3
|
+
id: string;
|
|
4
|
+
isLoading: boolean;
|
|
5
|
+
amount: number;
|
|
6
|
+
isSelected?: boolean;
|
|
7
|
+
onSelect: (id: string) => void;
|
|
8
|
+
visualState: VisualState;
|
|
9
9
|
};
|
|
10
|
-
declare const QuickFilter: ({
|
|
11
|
-
|
|
12
|
-
isLoading,
|
|
13
|
-
amount,
|
|
14
|
-
isSelected,
|
|
15
|
-
onSelect,
|
|
16
|
-
visualState,
|
|
17
|
-
}: QuickFilterProps) => JSX.Element;
|
|
18
|
-
export {QuickFilter as QuickFilter};
|
|
10
|
+
declare const QuickFilter: ({ id, isLoading, amount, isSelected, onSelect, visualState, }: QuickFilterProps) => JSX.Element;
|
|
11
|
+
export { QuickFilter as QuickFilter };
|
|
@@ -12,10 +12,6 @@ exports[`test search shows search field 1`] = `
|
|
|
12
12
|
"borderWidth": 1,
|
|
13
13
|
"flexDirection": "row",
|
|
14
14
|
"overflow": "hidden",
|
|
15
|
-
"paddingBottom": 8,
|
|
16
|
-
"paddingLeft": 16,
|
|
17
|
-
"paddingRight": 16,
|
|
18
|
-
"paddingTop": 8,
|
|
19
15
|
"width": "100%",
|
|
20
16
|
}
|
|
21
17
|
}
|
|
@@ -24,6 +20,10 @@ exports[`test search shows search field 1`] = `
|
|
|
24
20
|
style={
|
|
25
21
|
{
|
|
26
22
|
"flex": 1,
|
|
23
|
+
"paddingBottom": 8,
|
|
24
|
+
"paddingLeft": 16,
|
|
25
|
+
"paddingRight": 48,
|
|
26
|
+
"paddingTop": 8,
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
>
|
|
@@ -34,6 +34,8 @@ exports[`test search shows search field 1`] = `
|
|
|
34
34
|
placeholderTextColor="#9AA5B1"
|
|
35
35
|
style={
|
|
36
36
|
{
|
|
37
|
+
"borderColor": "blue",
|
|
38
|
+
"borderWidth": 1,
|
|
37
39
|
"color": "#1F2933",
|
|
38
40
|
"fontFamily": "SourceSansPro",
|
|
39
41
|
"fontSize": 16,
|
|
@@ -74,17 +76,25 @@ exports[`test search shows search field 1`] = `
|
|
|
74
76
|
onStartShouldSetResponder={[Function]}
|
|
75
77
|
style={
|
|
76
78
|
{
|
|
79
|
+
"alignItems": "center",
|
|
80
|
+
"borderColor": "red",
|
|
81
|
+
"borderWidth": 1,
|
|
82
|
+
"justifyContent": "center",
|
|
77
83
|
"marginLeft": 16,
|
|
84
|
+
"minHeight": 42,
|
|
85
|
+
"minWidth": 42,
|
|
86
|
+
"position": "absolute",
|
|
87
|
+
"right": 0,
|
|
78
88
|
}
|
|
79
89
|
}
|
|
80
90
|
>
|
|
81
91
|
<RNSVGSvgView
|
|
82
92
|
align="xMidYMid"
|
|
83
|
-
bbHeight="
|
|
84
|
-
bbWidth="
|
|
93
|
+
bbHeight="20"
|
|
94
|
+
bbWidth="20"
|
|
85
95
|
fill="none"
|
|
86
96
|
focusable={false}
|
|
87
|
-
height={
|
|
97
|
+
height={20}
|
|
88
98
|
meetOrSlice={0}
|
|
89
99
|
minX={0}
|
|
90
100
|
minY={0}
|
|
@@ -96,14 +106,14 @@ exports[`test search shows search field 1`] = `
|
|
|
96
106
|
},
|
|
97
107
|
{
|
|
98
108
|
"flex": 0,
|
|
99
|
-
"height":
|
|
100
|
-
"width":
|
|
109
|
+
"height": 20,
|
|
110
|
+
"width": 20,
|
|
101
111
|
},
|
|
102
112
|
]
|
|
103
113
|
}
|
|
104
|
-
vbHeight={
|
|
105
|
-
vbWidth={
|
|
106
|
-
width={
|
|
114
|
+
vbHeight={17}
|
|
115
|
+
vbWidth={17}
|
|
116
|
+
width={20}
|
|
107
117
|
>
|
|
108
118
|
<RNSVGGroup
|
|
109
119
|
fill={null}
|
|
@@ -114,7 +124,7 @@ exports[`test search shows search field 1`] = `
|
|
|
114
124
|
}
|
|
115
125
|
>
|
|
116
126
|
<RNSVGPath
|
|
117
|
-
d="
|
|
127
|
+
d="M1.75 15.25L15.25 1.75M1.75 1.75L15.25 15.25"
|
|
118
128
|
propList={
|
|
119
129
|
[
|
|
120
130
|
"stroke",
|
|
@@ -1,16 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
placeholder,
|
|
11
|
-
onchangeText,
|
|
12
|
-
value,
|
|
13
|
-
keyboardType,
|
|
14
|
-
onPressSearch,
|
|
15
|
-
}: SearchProps) => JSX.Element;
|
|
16
|
-
export {Search as Search};
|
|
1
|
+
import { TextInputProps } from 'react-native';
|
|
2
|
+
import { KeyBoardTypes } from '../../../types/keyboard-types.enum';
|
|
3
|
+
interface SearchProps extends TextInputProps {
|
|
4
|
+
keyboardType?: KeyBoardTypes;
|
|
5
|
+
onPressClear: () => void;
|
|
6
|
+
showClearIcon: boolean;
|
|
7
|
+
}
|
|
8
|
+
declare const Search: ({ keyboardType, onPressClear, showClearIcon, ...props }: SearchProps) => JSX.Element;
|
|
9
|
+
export { Search as Search };
|
|
@@ -5,54 +5,43 @@ import {
|
|
|
5
5
|
View,
|
|
6
6
|
TextInput as NativeTextInput,
|
|
7
7
|
Pressable,
|
|
8
|
-
|
|
8
|
+
TextInputProps,
|
|
9
9
|
} from 'react-native';
|
|
10
10
|
import {ThemeCtx} from '../../../context/theme.context';
|
|
11
11
|
import {Stylesheet} from './search.styles';
|
|
12
12
|
import {KeyBoardTypes} from '../../../types/keyboard-types.enum';
|
|
13
13
|
import {Icon} from '../../../icons/index';
|
|
14
|
+
import {Scale} from '../../../theme/scale/index';
|
|
14
15
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
onPressSearch: (text: string) => void;
|
|
21
|
-
};
|
|
16
|
+
interface SearchProps extends TextInputProps {
|
|
17
|
+
keyboardType?: KeyBoardTypes;
|
|
18
|
+
onPressClear: () => void;
|
|
19
|
+
showClearIcon: boolean;
|
|
20
|
+
}
|
|
22
21
|
|
|
23
22
|
const Search = ({
|
|
24
|
-
placeholder,
|
|
25
|
-
onchangeText,
|
|
26
|
-
value,
|
|
27
23
|
keyboardType,
|
|
28
|
-
|
|
24
|
+
onPressClear,
|
|
25
|
+
showClearIcon,
|
|
26
|
+
...props
|
|
29
27
|
}: SearchProps) => {
|
|
30
28
|
const context = useContext(ThemeCtx);
|
|
31
29
|
const styles = Stylesheet(context);
|
|
32
30
|
|
|
33
31
|
return (
|
|
34
32
|
<View style={styles.container}>
|
|
35
|
-
<
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
value={value}
|
|
43
|
-
/>
|
|
44
|
-
</View>
|
|
45
|
-
<Pressable
|
|
46
|
-
onPress={() => {
|
|
47
|
-
onPressSearch(value);
|
|
48
|
-
Keyboard.dismiss();
|
|
49
|
-
}}
|
|
50
|
-
style={styles.iconContainer}
|
|
51
|
-
>
|
|
33
|
+
<NativeTextInput
|
|
34
|
+
placeholderTextColor={context.colors.ui.grey}
|
|
35
|
+
style={styles.inputContainer}
|
|
36
|
+
keyboardType={keyboardType}
|
|
37
|
+
{...props}
|
|
38
|
+
/>
|
|
39
|
+
<Pressable onPress={onPressClear} style={styles.iconContainer}>
|
|
52
40
|
<Icon
|
|
53
41
|
style={'regular'}
|
|
54
|
-
name={'search'}
|
|
42
|
+
name={!showClearIcon ? 'search' : 'xmark'}
|
|
55
43
|
color={context.colors.ui.black}
|
|
44
|
+
size={showClearIcon ? Scale.m * 1.125 : undefined}
|
|
56
45
|
/>
|
|
57
46
|
</Pressable>
|
|
58
47
|
</View>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SearchPreview: ({}
|
|
1
|
+
export declare const SearchPreview: ({}?: {}) => JSX.Element;
|
|
@@ -1,23 +1,25 @@
|
|
|
1
1
|
import React, {useState} from 'react';
|
|
2
2
|
import {Search} from './search.component';
|
|
3
3
|
import {KeyBoardTypes} from '../../../types/keyboard-types.enum';
|
|
4
|
-
import {SafeAreaView} from 'react-native';
|
|
4
|
+
import {Keyboard, SafeAreaView} from 'react-native';
|
|
5
5
|
|
|
6
6
|
export const SearchPreview = ({} = {}) => {
|
|
7
7
|
const [input, setInput] = useState('');
|
|
8
8
|
|
|
9
|
-
const
|
|
10
|
-
|
|
9
|
+
const clearHandler = () => {
|
|
10
|
+
setInput('');
|
|
11
|
+
Keyboard.dismiss;
|
|
11
12
|
};
|
|
12
13
|
|
|
13
14
|
return (
|
|
14
|
-
<SafeAreaView>
|
|
15
|
+
<SafeAreaView style={{paddingHorizontal: 16}}>
|
|
15
16
|
<Search
|
|
16
17
|
placeholder={'Search field placeholder'}
|
|
17
|
-
|
|
18
|
+
onChangeText={(text: string) => setInput(text)}
|
|
18
19
|
value={input}
|
|
19
20
|
keyboardType={KeyBoardTypes.DEFAULT}
|
|
20
|
-
|
|
21
|
+
onPressClear={clearHandler}
|
|
22
|
+
showClearIcon={input.length > 0}
|
|
21
23
|
/>
|
|
22
24
|
</SafeAreaView>
|
|
23
25
|
);
|
|
@@ -1,32 +1,33 @@
|
|
|
1
1
|
export function Stylesheet(context: any): {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
2
|
+
container: {
|
|
3
|
+
width: string;
|
|
4
|
+
height: number;
|
|
5
|
+
flexDirection: "row";
|
|
6
|
+
borderStyle: "solid";
|
|
7
|
+
borderWidth: number;
|
|
8
|
+
borderColor: any;
|
|
9
|
+
borderRadius: number;
|
|
10
|
+
backgroundColor: any;
|
|
11
|
+
overflow: "hidden";
|
|
12
|
+
alignItems: "center";
|
|
13
|
+
paddingRight: number;
|
|
14
|
+
};
|
|
15
|
+
inputContainer: {
|
|
16
|
+
lineHeight: number;
|
|
17
|
+
color: any;
|
|
18
|
+
paddingLeft: number;
|
|
19
|
+
paddingTop: number;
|
|
20
|
+
paddingBottom: number;
|
|
21
|
+
fontFamily: string;
|
|
22
|
+
fontSize: number;
|
|
23
|
+
flex: number;
|
|
24
|
+
justifyContent: "center";
|
|
25
|
+
height: string;
|
|
26
|
+
};
|
|
27
|
+
iconContainer: {
|
|
28
|
+
minWidth: number;
|
|
29
|
+
minHeight: number;
|
|
30
|
+
justifyContent: "center";
|
|
31
|
+
alignItems: "center";
|
|
32
|
+
};
|
|
32
33
|
};
|
|
@@ -8,6 +8,7 @@ export const Stylesheet = (context) =>
|
|
|
8
8
|
StyleSheet.create({
|
|
9
9
|
container: {
|
|
10
10
|
width: '100%',
|
|
11
|
+
height: Scale.m * 2.75,
|
|
11
12
|
flexDirection: 'row',
|
|
12
13
|
borderStyle: 'solid',
|
|
13
14
|
borderWidth: 1,
|
|
@@ -16,20 +17,25 @@ export const Stylesheet = (context) =>
|
|
|
16
17
|
backgroundColor: context.colors.ui.white,
|
|
17
18
|
overflow: 'hidden',
|
|
18
19
|
alignItems: 'center',
|
|
19
|
-
|
|
20
|
-
paddingTop: Scale.xs,
|
|
21
|
-
paddingRight: Scale.m,
|
|
22
|
-
paddingBottom: Scale.xs,
|
|
20
|
+
paddingRight: Scale.xxs,
|
|
23
21
|
},
|
|
24
|
-
|
|
22
|
+
inputContainer: {
|
|
25
23
|
flex: 1,
|
|
26
|
-
|
|
27
|
-
|
|
24
|
+
justifyContent: 'center',
|
|
25
|
+
height: '100%',
|
|
28
26
|
...Font.medium,
|
|
29
27
|
lineHeight: 20,
|
|
30
28
|
color: context.colors.ui.black,
|
|
29
|
+
paddingLeft: Scale.m,
|
|
30
|
+
paddingTop: Scale.xs,
|
|
31
|
+
paddingBottom: Scale.xs,
|
|
31
32
|
},
|
|
32
33
|
iconContainer: {
|
|
33
|
-
|
|
34
|
+
minWidth: 42,
|
|
35
|
+
minHeight: 42,
|
|
36
|
+
justifyContent: 'center',
|
|
37
|
+
alignItems: 'center',
|
|
38
|
+
// position: 'absolute',
|
|
39
|
+
// right: Scale.xs,
|
|
34
40
|
},
|
|
35
41
|
});
|
|
@@ -10,7 +10,9 @@ describe('test search', () => {
|
|
|
10
10
|
<Search
|
|
11
11
|
keyboardType={KeyBoardTypes.DEFAULT}
|
|
12
12
|
placeholder="placeholder search field"
|
|
13
|
-
|
|
13
|
+
onChangeText={() => console.log('text is changed')}
|
|
14
|
+
onPressClear={() => console.log('clear input')}
|
|
15
|
+
showClearIcon={true}
|
|
14
16
|
/>
|
|
15
17
|
)
|
|
16
18
|
.toJSON();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
type SelectLinkProps = {
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
label: string;
|
|
3
|
+
onPress: () => void;
|
|
4
4
|
};
|
|
5
|
-
declare const SelectLink: ({label, onPress}: SelectLinkProps) => JSX.Element;
|
|
6
|
-
export {SelectLink as SelectLink};
|
|
5
|
+
declare const SelectLink: ({ label, onPress }: SelectLinkProps) => JSX.Element;
|
|
6
|
+
export { SelectLink as SelectLink };
|
|
@@ -1,16 +1,10 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
type SelectListProps = {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
title: string;
|
|
4
|
+
subtitle?: string;
|
|
5
|
+
icon: React.ReactElement;
|
|
6
|
+
onPress?: () => void;
|
|
7
|
+
inverse?: boolean;
|
|
8
8
|
};
|
|
9
|
-
declare const SelectListItem: ({
|
|
10
|
-
|
|
11
|
-
subtitle,
|
|
12
|
-
icon,
|
|
13
|
-
onPress,
|
|
14
|
-
inverse,
|
|
15
|
-
}: SelectListProps) => JSX.Element;
|
|
16
|
-
export {SelectListItem as SelectListItem};
|
|
9
|
+
declare const SelectListItem: ({ title, subtitle, icon, onPress, inverse, }: SelectListProps) => JSX.Element;
|
|
10
|
+
export { SelectListItem as SelectListItem };
|
|
@@ -1,16 +1,11 @@
|
|
|
1
1
|
type PickerProps = {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
2
|
+
placeholder?: string;
|
|
3
|
+
data: {
|
|
4
|
+
value: number | string;
|
|
5
|
+
label: string;
|
|
6
|
+
}[];
|
|
7
|
+
onChange: (item: string) => void;
|
|
8
|
+
defaultValue: string;
|
|
9
9
|
};
|
|
10
|
-
export declare const SelectPicker: ({
|
|
11
|
-
placeholder,
|
|
12
|
-
data,
|
|
13
|
-
onChange,
|
|
14
|
-
defaultValue,
|
|
15
|
-
}: PickerProps) => JSX.Element;
|
|
10
|
+
export declare const SelectPicker: ({ placeholder, data, onChange, defaultValue, }: PickerProps) => JSX.Element;
|
|
16
11
|
export {};
|