@hero-design/rn 8.44.0-alpha.0 → 8.44.0
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/.turbo/turbo-build.log +1 -1
- package/CHANGELOG.md +30 -0
- package/assets/fonts/hero-icons-mobile.ttf +0 -0
- package/es/index.js +2773 -2662
- package/jest-setup.ts +2 -0
- package/lib/assets/fonts/hero-icons-mobile.ttf +0 -0
- package/lib/index.js +2776 -2666
- package/package.json +23 -24
- package/rollup.config.js +0 -1
- package/src/components/Accordion/__tests__/__snapshots__/AccordionItem.spec.tsx.snap +564 -384
- package/src/components/Accordion/__tests__/__snapshots__/StyledAccordion.spec.tsx.snap +76 -20
- package/src/components/Accordion/__tests__/__snapshots__/index.spec.tsx.snap +791 -605
- package/src/components/Alert/__tests__/__snapshots__/index.spec.tsx.snap +848 -567
- package/src/components/Attachment/__tests__/__snapshots__/index.spec.tsx.snap +172 -110
- package/src/components/Avatar/AvatarStack/__tests__/__snapshots__/StyledAvatarStack.spec.tsx.snap +138 -70
- package/src/components/Avatar/AvatarStack/__tests__/__snapshots__/index.spec.tsx.snap +745 -581
- package/src/components/Avatar/__tests__/__snapshots__/StyledAvatar.spec.tsx.snap +158 -57
- package/src/components/Avatar/__tests__/__snapshots__/index.spec.tsx.snap +273 -153
- package/src/components/Badge/__tests__/__snapshots__/Badge.spec.tsx.snap +391 -223
- package/src/components/Badge/__tests__/__snapshots__/Status.spec.tsx.snap +119 -63
- package/src/components/BottomNavigation/__tests__/__snapshots__/index.spec.tsx.snap +306 -242
- package/src/components/BottomSheet/__tests__/__snapshots__/index.spec.tsx.snap +317 -183
- package/src/components/Box/__tests__/__snapshots__/index.spec.tsx.snap +1042 -454
- package/src/components/Button/LoadingIndicator/StyledLoadingIndicator.tsx +6 -10
- package/src/components/Button/LoadingIndicator/__tests__/__snapshots__/StyledLoadingIndicator.spec.tsx.snap +400 -140
- package/src/components/Button/LoadingIndicator/__tests__/__snapshots__/index.spec.tsx.snap +1090 -880
- package/src/components/Button/StyledButton.tsx +4 -0
- package/src/components/Button/UtilityButton/__tests__/__snapshots__/index.spec.tsx.snap +196 -106
- package/src/components/Button/__tests__/__snapshots__/Button.spec.tsx.snap +1675 -1125
- package/src/components/Button/__tests__/__snapshots__/IconButton.spec.tsx.snap +71 -26
- package/src/components/Button/__tests__/__snapshots__/StyledButton.spec.tsx.snap +1651 -665
- package/src/components/Calendar/__tests__/__snapshots__/CalendarRowItem.spec.tsx.snap +555 -330
- package/src/components/Card/DataCard/__tests__/__snapshots__/StyledDataCard.spec.tsx.snap +265 -69
- package/src/components/Card/DataCard/__tests__/__snapshots__/index.spec.tsx.snap +205 -65
- package/src/components/Card/__tests__/__snapshots__/StyledCard.spec.tsx.snap +36 -8
- package/src/components/Card/__tests__/__snapshots__/index.spec.tsx.snap +292 -124
- package/src/components/Carousel/CardCarousel.tsx +10 -7
- package/src/components/Carousel/__tests__/__snapshots__/CardCarousel.spec.tsx.snap +486 -406
- package/src/components/Carousel/__tests__/__snapshots__/StyledCardCarousel.spec.tsx.snap +197 -70
- package/src/components/Carousel/__tests__/__snapshots__/StyledCarousel.spec.tsx.snap +41 -13
- package/src/components/Carousel/__tests__/__snapshots__/index.spec.tsx.snap +1742 -1526
- package/src/components/Carousel/__tests__/index.spec.tsx +50 -3
- package/src/components/Carousel/index.tsx +16 -22
- package/src/components/Checkbox/__tests__/__snapshots__/StyledCheckbox.spec.tsx.snap +404 -112
- package/src/components/Checkbox/__tests__/__snapshots__/index.spec.tsx.snap +574 -334
- package/src/components/Chip/StyledChip.tsx +121 -0
- package/src/components/Chip/__tests__/__snapshots__/index.spec.tsx.snap +1483 -0
- package/src/components/Chip/__tests__/index.spec.tsx +136 -0
- package/src/components/Chip/index.tsx +82 -0
- package/src/components/Collapse/__tests__/__snapshots__/StyledCollapse.spec.tsx.snap +73 -17
- package/src/components/Collapse/__tests__/__snapshots__/index.spec.tsx.snap +94 -38
- package/src/components/Collapse/index.tsx +1 -1
- package/src/components/ContentNavigator/__tests__/__snapshots__/StyledContentNavigator.spec.tsx.snap +37 -9
- package/src/components/ContentNavigator/__tests__/__snapshots__/index.spec.tsx.snap +424 -268
- package/src/components/DatePicker/__tests__/__snapshots__/DatePicker.spec.tsx.snap +586 -466
- package/src/components/DatePicker/__tests__/__snapshots__/DatePickerAndroid.spec.tsx.snap +200 -160
- package/src/components/DatePicker/__tests__/__snapshots__/DatePickerCalendar.spec.tsx.snap +192 -152
- package/src/components/DatePicker/__tests__/__snapshots__/DatePickerIOS.spec.tsx.snap +471 -389
- package/src/components/Divider/__tests__/__snapshots__/StyledDivider.spec.tsx.snap +464 -128
- package/src/components/Drawer/DragableDrawer/__tests__/__snapshots__/index.spec.tsx.snap +97 -69
- package/src/components/Drawer/__tests__/__snapshots__/index.spec.tsx.snap +327 -192
- package/src/components/Empty/__tests__/__snapshots__/index.spec.tsx.snap +169 -113
- package/src/components/Error/StyledError.tsx +2 -1
- package/src/components/Error/__tests__/__snapshots__/index.spec.tsx.snap +390 -262
- package/src/components/Error/__tests__/index.spec.tsx +9 -6
- package/src/components/FAB/ActionGroup/__tests__/__snapshots__/index.spec.tsx.snap +860 -723
- package/src/components/FAB/__tests__/__snapshots__/AnimatedFABIcon.spec.tsx.snap +98 -42
- package/src/components/FAB/__tests__/__snapshots__/StyledFAB.spec.tsx.snap +199 -99
- package/src/components/FAB/__tests__/__snapshots__/index.spec.tsx.snap +293 -185
- package/src/components/HeroDesignProvider/__tests__/__snapshots__/index.spec.tsx.snap +45 -17
- package/src/components/Icon/HeroIcon/glyphMap.json +1 -1
- package/src/components/Icon/IconList.ts +3 -0
- package/src/components/Icon/__tests__/__snapshots__/index.spec.tsx.snap +158 -46
- package/src/components/Image/__tests__/__snapshots__/index.spec.tsx.snap +164 -52
- package/src/components/List/__tests__/__snapshots__/BasicListItem.spec.tsx.snap +242 -170
- package/src/components/List/__tests__/__snapshots__/ListItem.spec.tsx.snap +760 -588
- package/src/components/List/__tests__/__snapshots__/StyledBasicListItem.spec.tsx.snap +272 -128
- package/src/components/List/__tests__/__snapshots__/StyledListItem.spec.tsx.snap +477 -193
- package/src/components/Modal/__tests__/__snapshots__/index.spec.tsx.snap +169 -0
- package/src/components/Modal/__tests__/index.spec.tsx +99 -0
- package/src/components/Modal/index.tsx +178 -82
- package/src/components/PageControl/__tests__/__snapshots__/index.spec.tsx.snap +84 -41
- package/src/components/PageControl/index.tsx +1 -0
- package/src/components/PinInput/__tests__/StyledPinInput.spec.tsx +9 -4
- package/src/components/PinInput/__tests__/__snapshots__/PinCell.spec.tsx.snap +293 -153
- package/src/components/PinInput/__tests__/__snapshots__/StyledPinInput.spec.tsx.snap +15 -48
- package/src/components/PinInput/__tests__/__snapshots__/index.spec.tsx.snap +809 -697
- package/src/components/Portal/__tests__/PortalHost.spec.tsx +12 -14
- package/src/components/Portal/__tests__/__snapshots__/index.spec.tsx.snap +43 -15
- package/src/components/Progress/__tests__/__snapshots__/index.spec.js.snap +743 -603
- package/src/components/Radio/__tests__/__snapshots__/Radio.spec.tsx.snap +188 -116
- package/src/components/Radio/__tests__/__snapshots__/RadioGroup.spec.tsx.snap +257 -205
- package/src/components/Rate/__tests__/__snapshots__/index.spec.tsx.snap +864 -600
- package/src/components/RefreshControl/__tests__/__snapshots__/index.spec.tsx.snap +128 -44
- package/src/components/RichTextEditor/__tests__/EditorToolbar.spec.tsx +5 -2
- package/src/components/RichTextEditor/__tests__/RichTextEditor.spec.tsx +3 -3
- package/src/components/RichTextEditor/__tests__/__snapshots__/EditorToolbar.spec.tsx.snap +413 -266
- package/src/components/RichTextEditor/__tests__/__snapshots__/MentionList.spec.tsx.snap +64 -35
- package/src/components/RichTextEditor/__tests__/__snapshots__/RichTextEditor.spec.tsx.snap +371 -297
- package/src/components/SectionHeading/__tests__/__snapshots__/StyledHeading.spec.tsx.snap +158 -46
- package/src/components/SectionHeading/__tests__/__snapshots__/index.spec.tsx.snap +394 -226
- package/src/components/Select/MultiSelect/__tests__/__snapshots__/Option.spec.tsx.snap +93 -57
- package/src/components/Select/MultiSelect/__tests__/__snapshots__/OptionList.spec.tsx.snap +2387 -2151
- package/src/components/Select/MultiSelect/__tests__/__snapshots__/index.spec.tsx.snap +621 -28
- package/src/components/Select/MultiSelect/__tests__/index.spec.tsx +7 -6
- package/src/components/Select/SingleSelect/__tests__/__snapshots__/Option.spec.tsx.snap +73 -37
- package/src/components/Select/SingleSelect/__tests__/__snapshots__/OptionList.spec.tsx.snap +2321 -2085
- package/src/components/Select/SingleSelect/__tests__/__snapshots__/index.spec.tsx.snap +473 -23
- package/src/components/Skeleton/__tests__/__snapshots__/index.spec.tsx.snap +490 -294
- package/src/components/Slider/__tests__/__snapshots__/index.spec.tsx.snap +117 -33
- package/src/components/Spinner/__tests__/__snapshots__/AnimatedSpinner.spec.tsx.snap +105 -77
- package/src/components/Spinner/__tests__/__snapshots__/StyledSpinner.spec.tsx.snap +1308 -636
- package/src/components/Spinner/__tests__/__snapshots__/index.spec.tsx.snap +121 -93
- package/src/components/Success/StyledSuccess.tsx +2 -1
- package/src/components/Success/__tests__/__snapshots__/index.spec.tsx.snap +388 -258
- package/src/components/Success/__tests__/index.spec.tsx +9 -6
- package/src/components/Swipeable/__tests__/__snapshots__/SwipeableAction.spec.tsx.snap +210 -75
- package/src/components/Swipeable/__tests__/__snapshots__/index.spec.tsx.snap +58 -30
- package/src/components/Swipeable/index.tsx +3 -3
- package/src/components/Switch/SelectorSwitch/__tests__/__snapshots__/Option.spec.tsx.snap +226 -114
- package/src/components/Switch/SelectorSwitch/__tests__/__snapshots__/index.spec.tsx.snap +146 -109
- package/src/components/Switch/__tests__/__snapshots__/StyledSwitch.spec.tsx.snap +202 -62
- package/src/components/Switch/__tests__/__snapshots__/index.spec.tsx.snap +132 -68
- package/src/components/Tabs/__tests__/SceneView.spec.tsx +7 -7
- package/src/components/Tabs/__tests__/__snapshots__/SceneView.spec.tsx.snap +206 -94
- package/src/components/Tabs/__tests__/__snapshots__/ScrollableTabs.spec.tsx.snap +2217 -1962
- package/src/components/Tabs/__tests__/__snapshots__/ScrollableTabsHeader.spec.tsx.snap +523 -455
- package/src/components/Tabs/__tests__/__snapshots__/TabWithBadge.spec.tsx.snap +121 -65
- package/src/components/Tabs/__tests__/__snapshots__/index.spec.tsx.snap +1641 -1398
- package/src/components/Tag/__tests__/__snapshots__/Tag.spec.tsx.snap +554 -274
- package/src/components/TextInput/__tests__/__snapshots__/StyledTextInput.spec.tsx.snap +1542 -646
- package/src/components/TextInput/__tests__/__snapshots__/index.spec.tsx.snap +3177 -2701
- package/src/components/TimePicker/__tests__/__snapshots__/TimePickerAndroid.spec.tsx.snap +390 -310
- package/src/components/TimePicker/__tests__/__snapshots__/TimePickerIOS.spec.tsx.snap +662 -540
- package/src/components/Toast/__tests__/__snapshots__/Toast.spec.tsx.snap +871 -573
- package/src/components/Toast/__tests__/__snapshots__/ToastContainer.spec.tsx.snap +180 -68
- package/src/components/Toolbar/__tests__/__snapshots__/ToolbarGroup.spec.tsx.snap +582 -426
- package/src/components/Toolbar/__tests__/__snapshots__/ToolbarItem.spec.tsx.snap +683 -363
- package/src/components/Typography/Body/__tests__/__snapshots__/StyledBody.tsx.snap +704 -256
- package/src/components/Typography/Body/__tests__/__snapshots__/index.spec.tsx.snap +855 -323
- package/src/components/Typography/Caption/__tests__/__snapshots__/StyledCaption.spec.tsx.snap +430 -150
- package/src/components/Typography/Caption/__tests__/__snapshots__/index.spec.tsx.snap +572 -208
- package/src/components/Typography/Label/__tests__/__snapshots__/StyledLabel.tsx.snap +328 -104
- package/src/components/Typography/Label/__tests__/__snapshots__/index.spec.tsx.snap +462 -154
- package/src/components/Typography/Text/__tests__/__snapshots__/StyledText.spec.tsx.snap +900 -340
- package/src/components/Typography/Title/__tests__/__snapshots__/StyledTitle.tsx.snap +880 -320
- package/src/components/Typography/Title/__tests__/__snapshots__/index.spec.tsx.snap +1035 -391
- package/src/index.ts +2 -2
- package/src/testHelpers/renderWithTheme.tsx +2 -2
- package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +38 -1
- package/src/theme/components/button.ts +0 -1
- package/src/theme/components/chip.ts +47 -0
- package/src/theme/getTheme.ts +3 -0
- package/testUtils/setup.tsx +0 -18
- package/tsconfig.json +4 -1
- package/types/components/Accordion/AccordionItem.d.ts +2 -1
- package/types/components/Accordion/index.d.ts +1 -1
- package/types/components/Attachment/index.d.ts +2 -1
- package/types/components/Avatar/Avatar.d.ts +2 -1
- package/types/components/Avatar/AvatarStack/index.d.ts +2 -2
- package/types/components/Avatar/index.d.ts +3 -2
- package/types/components/Badge/StyledBadge.d.ts +0 -4
- package/types/components/BottomSheet/Footer.d.ts +2 -1
- package/types/components/BottomSheet/Header.d.ts +2 -1
- package/types/components/BottomSheet/ScrollView.d.ts +1 -0
- package/types/components/BottomSheet/StyledBottomSheet.d.ts +0 -4
- package/types/components/Box/index.d.ts +2 -1
- package/types/components/Button/IconButton.d.ts +2 -1
- package/types/components/Button/LoadingIndicator/StyledLoadingIndicator.d.ts +3 -3
- package/types/components/Button/LoadingIndicator/index.d.ts +2 -1
- package/types/components/Button/UtilityButton/index.d.ts +2 -1
- package/types/components/Calendar/CalendarRowItem.d.ts +2 -1
- package/types/components/Calendar/StyledCalendar.d.ts +1 -1
- package/types/components/Calendar/index.d.ts +2 -1
- package/types/components/Carousel/CardCarousel.d.ts +1 -1
- package/types/components/Carousel/CarouselItem.d.ts +2 -1
- package/types/components/Carousel/index.d.ts +2 -2
- package/types/components/Checkbox/index.d.ts +2 -1
- package/types/components/Chip/StyledChip.d.ts +31 -0
- package/types/components/Chip/index.d.ts +27 -0
- package/types/components/Collapse/StyledCollapse.d.ts +0 -2
- package/types/components/Collapse/index.d.ts +2 -1
- package/types/components/ContentNavigator/index.d.ts +2 -1
- package/types/components/DatePicker/DatePickerAndroid.d.ts +2 -1
- package/types/components/DatePicker/DatePickerCalendar.d.ts +2 -1
- package/types/components/DatePicker/DatePickerIOS.d.ts +2 -1
- package/types/components/DatePicker/index.d.ts +2 -1
- package/types/components/Divider/index.d.ts +2 -1
- package/types/components/Drawer/StyledDrawer.d.ts +0 -6
- package/types/components/Error/StyledError.d.ts +3 -9
- package/types/components/FAB/ActionGroup/ActionItem.d.ts +2 -1
- package/types/components/FAB/ActionGroup/StyledActionGroup.d.ts +0 -4
- package/types/components/FAB/AnimatedFABIcon.d.ts +2 -1
- package/types/components/HeroDesignProvider/index.d.ts +2 -1
- package/types/components/Icon/AnimatedIcon.d.ts +2 -1
- package/types/components/Icon/IconList.d.ts +1 -1
- package/types/components/Icon/index.d.ts +3 -2
- package/types/components/Icon/utils.d.ts +1 -1
- package/types/components/Image/index.d.ts +1 -0
- package/types/components/Modal/index.d.ts +12 -8
- package/types/components/PageControl/StyledPageControl.d.ts +0 -2
- package/types/components/PageControl/index.d.ts +2 -1
- package/types/components/PinInput/PinCell.d.ts +2 -1
- package/types/components/Portal/PortalHost.d.ts +1 -1
- package/types/components/Portal/PortalProvider.d.ts +1 -1
- package/types/components/Portal/index.d.ts +2 -2
- package/types/components/Progress/ProgressBar.d.ts +1 -0
- package/types/components/Progress/StyledProgressBar.d.ts +0 -2
- package/types/components/Progress/index.d.ts +1 -0
- package/types/components/Rate/StyledRate.d.ts +0 -2
- package/types/components/Rate/index.d.ts +2 -1
- package/types/components/RefreshControl/index.d.ts +2 -1
- package/types/components/RichTextEditor/EditorToolbar.d.ts +2 -1
- package/types/components/RichTextEditor/MentionList.d.ts +2 -1
- package/types/components/RichTextEditor/index.d.ts +2 -2
- package/types/components/Select/BaseOptionList.d.ts +1 -1
- package/types/components/Select/Footer.d.ts +2 -1
- package/types/components/Select/MultiSelect/Option.d.ts +2 -1
- package/types/components/Select/MultiSelect/OptionList.d.ts +2 -1
- package/types/components/Select/MultiSelect/index.d.ts +1 -1
- package/types/components/Select/SingleSelect/Option.d.ts +2 -1
- package/types/components/Select/SingleSelect/OptionList.d.ts +1 -1
- package/types/components/Select/SingleSelect/StyledSingleSelect.d.ts +2 -1
- package/types/components/Select/SingleSelect/index.d.ts +1 -1
- package/types/components/Select/helpers.d.ts +1 -2
- package/types/components/Select/index.d.ts +2 -1
- package/types/components/Skeleton/index.d.ts +2 -1
- package/types/components/Slider/index.d.ts +2 -1
- package/types/components/Spinner/AnimatedSpinner.d.ts +2 -1
- package/types/components/Success/StyledSuccess.d.ts +3 -7
- package/types/components/Swipeable/SwipeableAction.d.ts +2 -2
- package/types/components/Swipeable/index.d.ts +3 -3
- package/types/components/Switch/SelectorSwitch/Option.d.ts +2 -1
- package/types/components/Switch/SelectorSwitch/StyledSelectorSwitch.d.ts +0 -6
- package/types/components/Switch/StyledSwitch.d.ts +0 -2
- package/types/components/Tabs/ActiveTabIndicator.d.ts +2 -1
- package/types/components/Tabs/SceneView.d.ts +1 -1
- package/types/components/Tabs/ScrollableTabs.d.ts +2 -1
- package/types/components/Tabs/ScrollableTabsHeader.d.ts +2 -1
- package/types/components/Tabs/StyledScrollableTabs.d.ts +0 -4
- package/types/components/Tabs/StyledTabs.d.ts +0 -4
- package/types/components/Tabs/TabWithBadge.d.ts +2 -2
- package/types/components/Tabs/index.d.ts +2 -1
- package/types/components/TextInput/StyledTextInput.d.ts +1 -1
- package/types/components/TextInput/index.d.ts +1 -1
- package/types/components/TimePicker/TimePickerAndroid.d.ts +2 -1
- package/types/components/TimePicker/TimePickerIOS.d.ts +2 -1
- package/types/components/TimePicker/index.d.ts +2 -1
- package/types/components/Toast/StyledToast.d.ts +0 -2
- package/types/components/Toast/Toast.d.ts +1 -0
- package/types/components/Toast/ToastProvider.d.ts +2 -1
- package/types/components/Toast/index.d.ts +1 -1
- package/types/components/Toolbar/ToolbarGroup.d.ts +2 -1
- package/types/components/Toolbar/ToolbarItem.d.ts +2 -1
- package/types/components/Toolbar/index.d.ts +3 -2
- package/types/components/Typography/Body/index.d.ts +2 -1
- package/types/components/Typography/Caption/index.d.ts +2 -1
- package/types/components/Typography/Label/index.d.ts +2 -1
- package/types/components/Typography/Text/index.d.ts +2 -1
- package/types/components/Typography/Title/index.d.ts +2 -1
- package/types/index.d.ts +2 -2
- package/types/testHelpers/renderWithTheme.d.ts +1 -0
- package/types/theme/ThemeSwitcher.d.ts +2 -2
- package/types/theme/components/button.d.ts +0 -1
- package/types/theme/components/chip.d.ts +40 -0
- package/types/theme/getTheme.d.ts +2 -0
- package/.turbo/turbo-publish:npm.log +0 -0
- package/src/components/Modal/ModalContentWrapper.tsx +0 -112
- package/src/components/Modal/ModalPresenter/ModalPresenter.tsx +0 -135
- package/src/components/Modal/ModalPresenter/index.tsx +0 -9
- package/src/components/Modal/ModalProvider.tsx +0 -8
- package/types/components/Modal/ModalContentWrapper.d.ts +0 -16
- package/types/components/Modal/ModalPresenter/ModalPresenter.d.ts +0 -34
- package/types/components/Modal/ModalPresenter/index.d.ts +0 -3
- package/types/components/Modal/ModalProvider.d.ts +0 -5
package/src/index.ts
CHANGED
|
@@ -25,6 +25,7 @@ import Button from './components/Button';
|
|
|
25
25
|
import Calendar from './components/Calendar';
|
|
26
26
|
import Carousel from './components/Carousel';
|
|
27
27
|
import Card from './components/Card';
|
|
28
|
+
import Chip from './components/Chip';
|
|
28
29
|
import Collapse from './components/Collapse';
|
|
29
30
|
import Checkbox from './components/Checkbox';
|
|
30
31
|
import ContentNavigator from './components/ContentNavigator';
|
|
@@ -38,7 +39,6 @@ import HeroDesignProvider from './components/HeroDesignProvider';
|
|
|
38
39
|
import Icon from './components/Icon';
|
|
39
40
|
import Image from './components/Image';
|
|
40
41
|
import List from './components/List';
|
|
41
|
-
import Modal from './components/Modal';
|
|
42
42
|
import PinInput from './components/PinInput';
|
|
43
43
|
import Progress from './components/Progress';
|
|
44
44
|
import Slider from './components/Slider';
|
|
@@ -90,6 +90,7 @@ export {
|
|
|
90
90
|
Calendar,
|
|
91
91
|
Card,
|
|
92
92
|
Carousel,
|
|
93
|
+
Chip,
|
|
93
94
|
Collapse,
|
|
94
95
|
Checkbox,
|
|
95
96
|
ContentNavigator,
|
|
@@ -103,7 +104,6 @@ export {
|
|
|
103
104
|
Image,
|
|
104
105
|
HeroDesignProvider,
|
|
105
106
|
List,
|
|
106
|
-
Modal,
|
|
107
107
|
PinInput,
|
|
108
108
|
Progress,
|
|
109
109
|
Portal,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { render } from '@testing-library/react-native'; // eslint-disable-line import/no-extraneous-dependencies
|
|
3
|
-
import { ThemeProvider } from '@emotion/react';
|
|
4
3
|
import type { RenderOptions } from '@testing-library/react-native';
|
|
5
4
|
import { theme } from '../index';
|
|
5
|
+
import HeroDesignProvider from '../components/HeroDesignProvider';
|
|
6
6
|
|
|
7
7
|
const renderWithTheme = (ui: JSX.Element, options?: RenderOptions) =>
|
|
8
|
-
render(<
|
|
8
|
+
render(<HeroDesignProvider theme={theme}>{ui}</HeroDesignProvider>, options);
|
|
9
9
|
|
|
10
10
|
export default renderWithTheme;
|
|
@@ -237,7 +237,6 @@ exports[`theme returns correct theme object 1`] = `
|
|
|
237
237
|
"space": {
|
|
238
238
|
"buttonPadding": 16,
|
|
239
239
|
"iconPadding": 12,
|
|
240
|
-
"loadingIndicatorWrapperVerticalPadding": 1,
|
|
241
240
|
"textButtonPadding": 12,
|
|
242
241
|
"utilityPadding": 8,
|
|
243
242
|
},
|
|
@@ -353,6 +352,44 @@ exports[`theme returns correct theme object 1`] = `
|
|
|
353
352
|
"wrapperPadding": 16,
|
|
354
353
|
},
|
|
355
354
|
},
|
|
355
|
+
"chip": {
|
|
356
|
+
"borderWidths": {
|
|
357
|
+
"icon": 2,
|
|
358
|
+
"wrapper": 1,
|
|
359
|
+
},
|
|
360
|
+
"colors": {
|
|
361
|
+
"filledBackground": "#ffffff",
|
|
362
|
+
"outlinedBackground": "transparent",
|
|
363
|
+
"primaryBackground": "#001f23",
|
|
364
|
+
"secondaryBackground": "#ece8ef",
|
|
365
|
+
"selectedPrimaryText": "#ffffff",
|
|
366
|
+
"wrapperBorder": "#001f23",
|
|
367
|
+
"wrapperSelectedBorder": "transparent",
|
|
368
|
+
},
|
|
369
|
+
"radii": {
|
|
370
|
+
"wrapper": 999,
|
|
371
|
+
},
|
|
372
|
+
"shadows": {
|
|
373
|
+
"filledWrapper": {
|
|
374
|
+
"elevation": 3,
|
|
375
|
+
"shadowColor": "#001f23",
|
|
376
|
+
"shadowOffset": {
|
|
377
|
+
"height": 2,
|
|
378
|
+
"width": 0,
|
|
379
|
+
},
|
|
380
|
+
"shadowOpacity": 0.12,
|
|
381
|
+
"shadowRadius": 4,
|
|
382
|
+
},
|
|
383
|
+
},
|
|
384
|
+
"sizes": {
|
|
385
|
+
"wrapperBorder": 1,
|
|
386
|
+
},
|
|
387
|
+
"space": {
|
|
388
|
+
"iconWrapperMarginRight": 8,
|
|
389
|
+
"wrapperHorizontalPadding": 12,
|
|
390
|
+
"wrapperVerticalPadding": 8,
|
|
391
|
+
},
|
|
392
|
+
},
|
|
356
393
|
"contentNavigator": {
|
|
357
394
|
"space": {
|
|
358
395
|
"valueHorizontalPadding": 8,
|
|
@@ -21,7 +21,6 @@ const getButtonTheme = (theme: GlobalTheme) => {
|
|
|
21
21
|
textButtonPadding: theme.space.smallMedium,
|
|
22
22
|
iconPadding: theme.space.smallMedium,
|
|
23
23
|
utilityPadding: theme.space.small,
|
|
24
|
-
loadingIndicatorWrapperVerticalPadding: theme.space.xxsmall / 2,
|
|
25
24
|
};
|
|
26
25
|
|
|
27
26
|
const sizes = {
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { GlobalTheme } from '../global';
|
|
2
|
+
|
|
3
|
+
const getChipTheme = (theme: GlobalTheme) => {
|
|
4
|
+
const colors = {
|
|
5
|
+
primaryBackground: theme.colors.darkGlobalSurface,
|
|
6
|
+
secondaryBackground: theme.colors.highlightedSurface,
|
|
7
|
+
filledBackground: theme.colors.defaultGlobalSurface,
|
|
8
|
+
outlinedBackground: 'transparent',
|
|
9
|
+
wrapperBorder: theme.colors.primaryOutline,
|
|
10
|
+
wrapperSelectedBorder: 'transparent',
|
|
11
|
+
selectedPrimaryText: theme.colors.defaultGlobalSurface,
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
const space = {
|
|
15
|
+
wrapperHorizontalPadding: theme.space.smallMedium,
|
|
16
|
+
wrapperVerticalPadding: theme.space.small,
|
|
17
|
+
iconWrapperMarginRight: theme.space.small,
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
const sizes = {
|
|
21
|
+
wrapperBorder: theme.borderWidths.base,
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
const radii = {
|
|
25
|
+
wrapper: theme.radii.rounded,
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
const borderWidths = {
|
|
29
|
+
wrapper: theme.borderWidths.base,
|
|
30
|
+
icon: theme.borderWidths.medium,
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
const shadows = {
|
|
34
|
+
filledWrapper: theme.shadows.default,
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
return {
|
|
38
|
+
colors,
|
|
39
|
+
space,
|
|
40
|
+
sizes,
|
|
41
|
+
radii,
|
|
42
|
+
borderWidths,
|
|
43
|
+
shadows,
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
export default getChipTheme;
|
package/src/theme/getTheme.ts
CHANGED
|
@@ -13,6 +13,7 @@ import getCardTheme from './components/card';
|
|
|
13
13
|
import getCarouselTheme, { CarouselThemeType } from './components/carousel';
|
|
14
14
|
import getCardCarouselTheme from './components/cardCarousel';
|
|
15
15
|
import getCheckboxTheme from './components/checkbox';
|
|
16
|
+
import getChipTheme from './components/chip';
|
|
16
17
|
import getContentNavigatorTheme from './components/contentNavigator';
|
|
17
18
|
import getDatePickerTheme from './components/datePicker';
|
|
18
19
|
import getDividerTheme from './components/divider';
|
|
@@ -63,6 +64,7 @@ type Theme = GlobalTheme & {
|
|
|
63
64
|
carousel: CarouselThemeType;
|
|
64
65
|
cardCarousel: ReturnType<typeof getCardCarouselTheme>;
|
|
65
66
|
checkbox: ReturnType<typeof getCheckboxTheme>;
|
|
67
|
+
chip: ReturnType<typeof getChipTheme>;
|
|
66
68
|
contentNavigator: ReturnType<typeof getContentNavigatorTheme>;
|
|
67
69
|
datePicker: ReturnType<typeof getDatePickerTheme>;
|
|
68
70
|
divider: ReturnType<typeof getDividerTheme>;
|
|
@@ -119,6 +121,7 @@ const getTheme = (
|
|
|
119
121
|
carousel: getCarouselTheme(globalTheme),
|
|
120
122
|
cardCarousel: getCardCarouselTheme(globalTheme),
|
|
121
123
|
checkbox: getCheckboxTheme(globalTheme),
|
|
124
|
+
chip: getChipTheme(globalTheme),
|
|
122
125
|
contentNavigator: getContentNavigatorTheme(globalTheme),
|
|
123
126
|
datePicker: getDatePickerTheme(globalTheme),
|
|
124
127
|
divider: getDividerTheme(globalTheme),
|
package/testUtils/setup.tsx
CHANGED
|
@@ -132,22 +132,4 @@ jest.mock('react-native/Libraries/Utilities/BackHandler', () => {
|
|
|
132
132
|
);
|
|
133
133
|
});
|
|
134
134
|
|
|
135
|
-
jest.mock('react-native-root-siblings', () => {
|
|
136
|
-
const React = jest.requireActual('react');
|
|
137
|
-
|
|
138
|
-
class RootSiblingsManager extends React.Component {
|
|
139
|
-
constructor(props) {
|
|
140
|
-
super(props);
|
|
141
|
-
}
|
|
142
|
-
render() {
|
|
143
|
-
return React.createElement('RootSiblingsManager', this.props, this.props.children);
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
return {
|
|
148
|
-
__esModule: true,
|
|
149
|
-
default: RootSiblingsManager,
|
|
150
|
-
};
|
|
151
|
-
});
|
|
152
|
-
|
|
153
135
|
export {};
|
package/tsconfig.json
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import type { ReactElement } from 'react';
|
|
2
3
|
import type { StyleProp, ViewStyle } from 'react-native';
|
|
3
4
|
import type { Variant } from './StyledAccordion';
|
|
@@ -10,5 +11,5 @@ export type AccordionItemProps = {
|
|
|
10
11
|
style?: StyleProp<ViewStyle>;
|
|
11
12
|
testID?: string;
|
|
12
13
|
};
|
|
13
|
-
declare const AccordionItem: ({ header, content, open, onPress, variant, style, testID, }: AccordionItemProps) => JSX.Element;
|
|
14
|
+
declare const AccordionItem: ({ header, content, open, onPress, variant, style, testID, }: AccordionItemProps) => React.JSX.Element;
|
|
14
15
|
export default AccordionItem;
|
|
@@ -35,5 +35,5 @@ export interface AccordionProps<K extends Key> {
|
|
|
35
35
|
*/
|
|
36
36
|
testID?: string;
|
|
37
37
|
}
|
|
38
|
-
declare const Accordion: <K extends React.Key>({ items, activeItemKey, onItemPress, variant, style, testID, }: AccordionProps<K>) => JSX.Element;
|
|
38
|
+
declare const Accordion: <K extends React.Key>({ items, activeItemKey, onItemPress, variant, style, testID, }: AccordionProps<K>) => React.JSX.Element;
|
|
39
39
|
export default Accordion;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import type { ReactElement } from 'react';
|
|
2
3
|
import { StyleProp, ViewStyle } from 'react-native';
|
|
3
4
|
import { IconProps } from '../Icon';
|
|
@@ -33,5 +34,5 @@ interface AttachmentProps {
|
|
|
33
34
|
*/
|
|
34
35
|
testID?: string;
|
|
35
36
|
}
|
|
36
|
-
declare const Attachment: ({ filename, previewElement, onRemove, onDownload, backgroundHighlighted, style, testID, }: AttachmentProps) => JSX.Element;
|
|
37
|
+
declare const Attachment: ({ filename, previewElement, onRemove, onDownload, backgroundHighlighted, style, testID, }: AttachmentProps) => React.JSX.Element;
|
|
37
38
|
export default Attachment;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import type { ImageSourcePropType, StyleProp, ViewProps, ViewStyle } from 'react-native';
|
|
2
3
|
export interface AvatarProps extends ViewProps {
|
|
3
4
|
/**
|
|
@@ -29,5 +30,5 @@ export interface AvatarProps extends ViewProps {
|
|
|
29
30
|
*/
|
|
30
31
|
testID?: string;
|
|
31
32
|
}
|
|
32
|
-
declare const Avatar: ({ onPress, source, testID, style, title, size, intent, }: AvatarProps) => JSX.Element | null;
|
|
33
|
+
declare const Avatar: ({ onPress, source, testID, style, title, size, intent, }: AvatarProps) => React.JSX.Element | null;
|
|
33
34
|
export default Avatar;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ReactElement } from 'react';
|
|
1
|
+
import React, { ReactElement } from 'react';
|
|
2
2
|
import { StyleProp, ViewStyle } from 'react-native';
|
|
3
3
|
import { AvatarProps } from '../Avatar';
|
|
4
4
|
export interface AvatarStackProps extends Pick<AvatarProps, 'size'> {
|
|
@@ -19,5 +19,5 @@ export interface AvatarStackProps extends Pick<AvatarProps, 'size'> {
|
|
|
19
19
|
*/
|
|
20
20
|
testID?: string;
|
|
21
21
|
}
|
|
22
|
-
declare const AvatarStack: ({ children, max, size, style, testID, }: AvatarStackProps) => JSX.Element;
|
|
22
|
+
declare const AvatarStack: ({ children, max, size, style, testID, }: AvatarStackProps) => React.JSX.Element;
|
|
23
23
|
export default AvatarStack;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { useAvatarColors } from './AvatarStack/utils';
|
|
2
|
-
declare const _default: (({ onPress, source, testID, style, title, size, intent, }: import("./Avatar").AvatarProps) => JSX.Element | null) & {
|
|
3
|
-
Stack: ({ children, max, size, style, testID, }: import("./AvatarStack").AvatarStackProps) => JSX.Element;
|
|
3
|
+
declare const _default: (({ onPress, source, testID, style, title, size, intent, }: import("./Avatar").AvatarProps) => import("react").JSX.Element | null) & {
|
|
4
|
+
Stack: ({ children, max, size, style, testID, }: import("./AvatarStack").AvatarStackProps) => import("react").JSX.Element;
|
|
4
5
|
};
|
|
5
6
|
export default _default;
|
|
6
7
|
export { useAvatarColors };
|
|
@@ -3,8 +3,6 @@ import { Animated } from 'react-native';
|
|
|
3
3
|
type ThemeIntent = 'primary' | 'success' | 'warning' | 'danger' | 'info' | 'archived';
|
|
4
4
|
type ThemePadding = 'narrowContent' | 'wideContent';
|
|
5
5
|
declare const StyledView: import("@emotion/native").StyledComponent<Animated.AnimatedProps<import("react-native").ViewProps & import("react").RefAttributes<import("react-native").View>> & {
|
|
6
|
-
children?: import("react").ReactNode;
|
|
7
|
-
} & {
|
|
8
6
|
theme?: import("@emotion/react").Theme | undefined;
|
|
9
7
|
as?: import("react").ElementType<any> | undefined;
|
|
10
8
|
} & {
|
|
@@ -16,8 +14,6 @@ declare const StyledText: import("@emotion/native").StyledComponent<import("../T
|
|
|
16
14
|
as?: import("react").ElementType<any> | undefined;
|
|
17
15
|
}, {}, {}>;
|
|
18
16
|
declare const StyledStatus: import("@emotion/native").StyledComponent<Animated.AnimatedProps<import("react-native").ViewProps & import("react").RefAttributes<import("react-native").View>> & {
|
|
19
|
-
children?: import("react").ReactNode;
|
|
20
|
-
} & {
|
|
21
17
|
theme?: import("@emotion/react").Theme | undefined;
|
|
22
18
|
as?: import("react").ElementType<any> | undefined;
|
|
23
19
|
} & {
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import type { ReactElement } from 'react';
|
|
2
3
|
declare const Header: ({ content, showDivider, onRequestClose, showCloseButton, }: {
|
|
3
4
|
content: string | ReactElement;
|
|
4
5
|
showDivider: boolean;
|
|
5
6
|
onRequestClose?: (() => void) | undefined;
|
|
6
7
|
showCloseButton: boolean;
|
|
7
|
-
}) => JSX.Element;
|
|
8
|
+
}) => React.JSX.Element;
|
|
8
9
|
export default Header;
|
|
@@ -14,14 +14,10 @@ declare const StyledKeyboardAvoidingView: import("@emotion/native").StyledCompon
|
|
|
14
14
|
ref?: import("react").Ref<KeyboardAvoidingView> | undefined;
|
|
15
15
|
}>;
|
|
16
16
|
declare const StyledBottomSheet: import("@emotion/native").StyledComponent<Animated.AnimatedProps<ViewProps & import("react").RefAttributes<SafeAreaView>> & {
|
|
17
|
-
children?: import("react").ReactNode;
|
|
18
|
-
} & {
|
|
19
17
|
theme?: import("@emotion/react").Theme | undefined;
|
|
20
18
|
as?: import("react").ElementType<any> | undefined;
|
|
21
19
|
}, {}, {}>;
|
|
22
20
|
declare const StyledBackdrop: import("@emotion/native").StyledComponent<Animated.AnimatedProps<import("react-native").PressableProps & import("react").RefAttributes<View>> & {
|
|
23
|
-
children?: import("react").ReactNode;
|
|
24
|
-
} & {
|
|
25
21
|
theme?: import("@emotion/react").Theme | undefined;
|
|
26
22
|
as?: import("react").ElementType<any> | undefined;
|
|
27
23
|
}, {}, {}>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import type { BoxViewProps, FlexStyleProps, StyleProps } from './types';
|
|
2
3
|
export interface BoxProps extends StyleProps, FlexStyleProps, BoxViewProps {
|
|
3
4
|
}
|
|
4
|
-
declare const Box: ({ children, style, testID, ...otherProps }: BoxProps) => JSX.Element;
|
|
5
|
+
declare const Box: ({ children, style, testID, ...otherProps }: BoxProps) => React.JSX.Element;
|
|
5
6
|
export default Box;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import type { StyleProp, ViewStyle, TouchableOpacityProps } from 'react-native';
|
|
2
3
|
import type { IconProps, IconName } from '../Icon';
|
|
3
4
|
export interface IconButtonProps {
|
|
@@ -34,5 +35,5 @@ export interface IconButtonProps {
|
|
|
34
35
|
*/
|
|
35
36
|
testID?: string;
|
|
36
37
|
}
|
|
37
|
-
declare const IconButton: ({ hitSlop, onPress, icon, disabled, testID, style, size, intent, }: IconButtonProps) => JSX.Element;
|
|
38
|
+
declare const IconButton: ({ hitSlop, onPress, icon, disabled, testID, style, size, intent, }: IconButtonProps) => React.JSX.Element;
|
|
38
39
|
export default IconButton;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { View } from 'react-native';
|
|
3
|
-
import type { ViewProps } from 'react-native';
|
|
4
2
|
import type { Theme } from '@emotion/react';
|
|
3
|
+
import type { ViewProps } from 'react-native';
|
|
4
|
+
import { View } from 'react-native';
|
|
5
5
|
type ThemeVariant = 'basic-transparent' | 'filled-primary' | 'filled-secondary' | 'filled-danger' | 'outlined-primary' | 'outlined-secondary' | 'outlined-danger' | 'text-primary' | 'text-secondary' | 'text-danger';
|
|
6
6
|
declare const StyledLoadingIndicatorWrapper: import("@emotion/native").StyledComponent<ViewProps & {
|
|
7
7
|
theme?: Theme | undefined;
|
|
@@ -18,4 +18,4 @@ declare const StyledLoadingDot: import("@emotion/native").StyledComponent<ViewPr
|
|
|
18
18
|
}, {}, {
|
|
19
19
|
ref?: import("react").Ref<View> | undefined;
|
|
20
20
|
}>;
|
|
21
|
-
export {
|
|
21
|
+
export { StyledLoadingDot, StyledLoadingIndicatorWrapper };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import type { StyleProp, ViewStyle, ViewProps } from 'react-native';
|
|
2
3
|
type ThemeVariant = 'basic-transparent' | 'filled-primary' | 'filled-secondary' | 'filled-danger' | 'outlined-primary' | 'outlined-secondary' | 'outlined-danger' | 'text-primary' | 'text-secondary' | 'text-danger';
|
|
3
4
|
interface LoadingIndicatorProps extends ViewProps {
|
|
@@ -22,5 +23,5 @@ interface LoadingIndicatorProps extends ViewProps {
|
|
|
22
23
|
*/
|
|
23
24
|
themeVariant: ThemeVariant;
|
|
24
25
|
}
|
|
25
|
-
declare const LoadingIndicator: ({ count, size, testID, themeVariant, ...nativeProps }: LoadingIndicatorProps) => JSX.Element;
|
|
26
|
+
declare const LoadingIndicator: ({ count, size, testID, themeVariant, ...nativeProps }: LoadingIndicatorProps) => React.JSX.Element;
|
|
26
27
|
export default LoadingIndicator;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import type { ReactChild } from 'react';
|
|
2
3
|
import type { ViewProps } from 'react-native';
|
|
3
4
|
import type { IconName } from '../../Icon';
|
|
@@ -19,5 +20,5 @@ export interface UtilityButtonProps extends ViewProps {
|
|
|
19
20
|
*/
|
|
20
21
|
intent?: 'primary' | 'text';
|
|
21
22
|
}
|
|
22
|
-
declare const UtilityButton: ({ icon, onPress, text, testID, intent, style, hitSlop, }: UtilityButtonProps) => JSX.Element;
|
|
23
|
+
declare const UtilityButton: ({ icon, onPress, text, testID, intent, style, hitSlop, }: UtilityButtonProps) => React.JSX.Element;
|
|
23
24
|
export default UtilityButton;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
export interface CalendarRowItemProps {
|
|
2
3
|
date?: Date;
|
|
3
4
|
onPress?: () => void;
|
|
@@ -6,5 +7,5 @@ export interface CalendarRowItemProps {
|
|
|
6
7
|
textIntent?: 'body' | 'subdued';
|
|
7
8
|
marked?: boolean;
|
|
8
9
|
}
|
|
9
|
-
declare const CalendarRowItem: ({ date, onPress, isCurrent, isSelected, textIntent, marked, }: CalendarRowItemProps) => JSX.Element;
|
|
10
|
+
declare const CalendarRowItem: ({ date, onPress, isCurrent, isSelected, textIntent, marked, }: CalendarRowItemProps) => React.JSX.Element;
|
|
10
11
|
export default CalendarRowItem;
|
|
@@ -23,7 +23,7 @@ declare const StyledCalendarCell: import("@emotion/native").StyledComponent<impo
|
|
|
23
23
|
theme?: import("@emotion/react").Theme | undefined;
|
|
24
24
|
as?: import("react").ElementType<any> | undefined;
|
|
25
25
|
} & {
|
|
26
|
-
variant?: "
|
|
26
|
+
variant?: "default" | "selected" | "current" | undefined;
|
|
27
27
|
}, {}, {
|
|
28
28
|
ref?: import("react").Ref<TouchableOpacity> | undefined;
|
|
29
29
|
}>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
export interface CalendarProps {
|
|
2
3
|
/**
|
|
3
4
|
* Selected date value.
|
|
@@ -53,5 +54,5 @@ export interface CalendarProps {
|
|
|
53
54
|
*/
|
|
54
55
|
monthPickerCancelLabel?: string;
|
|
55
56
|
}
|
|
56
|
-
declare const Calendar: ({ value, visibleDate, onChange, onPreviousPress, onNextPress, onTitlePress, minDate, maxDate, markedDates, testID, onMonthChange, onToggleMonthPicker, monthPickerConfirmLabel, monthPickerCancelLabel, }: CalendarProps) => JSX.Element;
|
|
57
|
+
declare const Calendar: ({ value, visibleDate, onChange, onPreviousPress, onNextPress, onTitlePress, minDate, maxDate, markedDates, testID, onMonthChange, onToggleMonthPicker, monthPickerConfirmLabel, monthPickerCancelLabel, }: CalendarProps) => React.JSX.Element;
|
|
57
58
|
export default Calendar;
|
|
@@ -38,4 +38,4 @@ export interface CardCarouselProps {
|
|
|
38
38
|
ref?: React.Ref<CardCarouselHandles>;
|
|
39
39
|
onLayout?: (event: LayoutChangeEvent) => void;
|
|
40
40
|
}
|
|
41
|
-
export declare const CardCarousel: React.ForwardRefExoticComponent<
|
|
41
|
+
export declare const CardCarousel: React.ForwardRefExoticComponent<Omit<CardCarouselProps, "ref"> & React.RefAttributes<CardCarouselHandles>>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { CarouselData } from './types';
|
|
2
3
|
interface CarouselItemProps extends Omit<CarouselData, 'background'> {
|
|
3
4
|
width: number;
|
|
4
5
|
}
|
|
5
|
-
declare const CarouselItem: ({ width, image, content, heading, body, }: CarouselItemProps) => JSX.Element;
|
|
6
|
+
declare const CarouselItem: ({ width, image, content, heading, body, }: CarouselItemProps) => React.JSX.Element;
|
|
6
7
|
export default CarouselItem;
|
|
@@ -38,7 +38,7 @@ interface CarouselProps extends ViewProps {
|
|
|
38
38
|
pageControlPosition?: 'top' | 'bottom';
|
|
39
39
|
}
|
|
40
40
|
export declare function useStateFromProp<T>(initialValue: T): [T, Dispatch<SetStateAction<T>>];
|
|
41
|
-
declare const _default: (({ items, onItemIndexChange, renderActions, selectedItemIndex, style, shouldShowPagination, pageControlPosition, ...nativeProps }: CarouselProps) => JSX.Element) & {
|
|
42
|
-
Card: React.ForwardRefExoticComponent<
|
|
41
|
+
declare const _default: (({ items, onItemIndexChange, renderActions, selectedItemIndex, style, shouldShowPagination, testID, pageControlPosition, ...nativeProps }: CarouselProps) => React.JSX.Element) & {
|
|
42
|
+
Card: React.ForwardRefExoticComponent<Omit<import("./CardCarousel").CardCarouselProps, "ref"> & React.RefAttributes<import("./CardCarousel").CardCarouselHandles>>;
|
|
43
43
|
};
|
|
44
44
|
export default _default;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import type { StyleProp, ViewStyle } from 'react-native';
|
|
2
3
|
export interface CheckboxProps {
|
|
3
4
|
/**
|
|
@@ -39,5 +40,5 @@ type getStateType = {
|
|
|
39
40
|
readonly: boolean;
|
|
40
41
|
};
|
|
41
42
|
export declare const getThemeState: ({ disabled, readonly }: getStateType) => "default" | "disabled" | "readonly";
|
|
42
|
-
declare const Checkbox: ({ checked, description, withBorder, disabled, onPress, style, testID, readonly, }: CheckboxProps) => JSX.Element;
|
|
43
|
+
declare const Checkbox: ({ checked, description, withBorder, disabled, onPress, style, testID, readonly, }: CheckboxProps) => React.JSX.Element;
|
|
43
44
|
export default Checkbox;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { TouchableOpacity } from 'react-native';
|
|
3
|
+
type StyledChipWrapperProps = {
|
|
4
|
+
themeVariant?: 'outlined' | 'filled';
|
|
5
|
+
themeSelected?: boolean;
|
|
6
|
+
};
|
|
7
|
+
declare const StyledChipWrapper: import("@emotion/native").StyledComponent<import("react-native").TouchableOpacityProps & {
|
|
8
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
9
|
+
as?: import("react").ElementType<any> | undefined;
|
|
10
|
+
} & StyledChipWrapperProps, {}, {
|
|
11
|
+
ref?: import("react").Ref<TouchableOpacity> | undefined;
|
|
12
|
+
}>;
|
|
13
|
+
declare const StyledIconWrapper: import("@emotion/native").StyledComponent<import("../Box").BoxProps & {
|
|
14
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
15
|
+
as?: import("react").ElementType<any> | undefined;
|
|
16
|
+
}, {}, {}>;
|
|
17
|
+
declare const StyledLabel: import("@emotion/native").StyledComponent<import("../Typography/Body").BodyProps & {
|
|
18
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
19
|
+
as?: import("react").ElementType<any> | undefined;
|
|
20
|
+
} & {
|
|
21
|
+
themeSelected?: boolean | undefined;
|
|
22
|
+
themeVariant?: "filled" | "outlined" | undefined;
|
|
23
|
+
}, {}, {}>;
|
|
24
|
+
declare const StyledIcon: import("@emotion/native").StyledComponent<import("../Icon").IconProps & {
|
|
25
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
26
|
+
as?: import("react").ElementType<any> | undefined;
|
|
27
|
+
} & {
|
|
28
|
+
themeSelected?: boolean | undefined;
|
|
29
|
+
themeVariant?: "filled" | "outlined" | undefined;
|
|
30
|
+
}, {}, {}>;
|
|
31
|
+
export { StyledChipWrapper, StyledIcon, StyledIconWrapper, StyledLabel };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ViewProps } from 'react-native';
|
|
3
|
+
import { IconName } from '../Icon';
|
|
4
|
+
export interface ChipProps extends ViewProps {
|
|
5
|
+
/**
|
|
6
|
+
* The label of the chip.
|
|
7
|
+
*/
|
|
8
|
+
label: string;
|
|
9
|
+
/**
|
|
10
|
+
* Variant of the chip.
|
|
11
|
+
*/
|
|
12
|
+
variant?: 'outlined' | 'filled';
|
|
13
|
+
/**
|
|
14
|
+
* Whether the chip is selected.
|
|
15
|
+
*/
|
|
16
|
+
selected?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Icon of the chip. Usable only with `variant="filled"`.
|
|
19
|
+
*/
|
|
20
|
+
icon?: IconName;
|
|
21
|
+
/**
|
|
22
|
+
* Callback when the chip is pressed.
|
|
23
|
+
*/
|
|
24
|
+
onPress?: () => void;
|
|
25
|
+
}
|
|
26
|
+
declare const Chip: ({ label, variant, selected, icon, onPress, ...otherProps }: ChipProps) => React.JSX.Element;
|
|
27
|
+
export default Chip;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { Animated, View } from 'react-native';
|
|
3
3
|
declare const StyledWrapper: import("@emotion/native").StyledComponent<Animated.AnimatedProps<import("react-native").ViewProps & import("react").RefAttributes<View>> & {
|
|
4
|
-
children?: import("react").ReactNode;
|
|
5
|
-
} & {
|
|
6
4
|
theme?: import("@emotion/react").Theme | undefined;
|
|
7
5
|
as?: import("react").ElementType<any> | undefined;
|
|
8
6
|
}, {}, {}>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
|
+
import React from 'react';
|
|
2
3
|
import type { StyleProp, ViewProps, ViewStyle } from 'react-native';
|
|
3
4
|
export interface CollapseProps extends ViewProps {
|
|
4
5
|
children: ReactNode;
|
|
@@ -15,5 +16,5 @@ export interface CollapseProps extends ViewProps {
|
|
|
15
16
|
*/
|
|
16
17
|
testID?: string;
|
|
17
18
|
}
|
|
18
|
-
declare const Collapse: ({ open, children, testID, style, onLayout, }: CollapseProps) => JSX.Element;
|
|
19
|
+
declare const Collapse: ({ open, children, testID, style, onLayout, }: CollapseProps) => React.JSX.Element;
|
|
19
20
|
export default Collapse;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import type { ReactElement } from 'react';
|
|
2
3
|
import type { StyleProp, ViewStyle } from 'react-native';
|
|
3
4
|
interface ContentNavigatorProps {
|
|
@@ -38,5 +39,5 @@ interface ContentNavigatorProps {
|
|
|
38
39
|
*/
|
|
39
40
|
testID?: string;
|
|
40
41
|
}
|
|
41
|
-
declare function ContentNavigator({ onPreviousPress, onNextPress, onPress, value, previousDisabled, nextDisabled, fontSize, testID, style, }: ContentNavigatorProps): JSX.Element;
|
|
42
|
+
declare function ContentNavigator({ onPreviousPress, onNextPress, onPress, value, previousDisabled, nextDisabled, fontSize, testID, style, }: ContentNavigatorProps): React.JSX.Element;
|
|
42
43
|
export default ContentNavigator;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import type { DatePickerProps } from './types';
|
|
2
|
-
declare const DatePickerAndroid: ({ value, minDate, maxDate, label, placeholder, onChange, displayFormat, disabled, required, error, helpText, style, testID, }: Omit<DatePickerProps, 'variant' | 'monthPickerConfirmLabel' | 'monthPickerCancelLabel'>) => JSX.Element;
|
|
3
|
+
declare const DatePickerAndroid: ({ value, minDate, maxDate, label, placeholder, onChange, displayFormat, disabled, required, error, helpText, style, testID, }: Omit<DatePickerProps, 'variant' | 'monthPickerConfirmLabel' | 'monthPickerCancelLabel'>) => React.JSX.Element;
|
|
3
4
|
export default DatePickerAndroid;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import type { DatePickerProps } from './types';
|
|
2
|
-
declare const DatePickerCalendar: ({ value, minDate, maxDate, label, placeholder, onChange, confirmLabel, displayFormat, disabled, required, error, helpText, style, testID, monthPickerConfirmLabel, monthPickerCancelLabel, }: Omit<DatePickerProps, 'variant'>) => JSX.Element;
|
|
3
|
+
declare const DatePickerCalendar: ({ value, minDate, maxDate, label, placeholder, onChange, confirmLabel, displayFormat, disabled, required, error, helpText, style, testID, monthPickerConfirmLabel, monthPickerCancelLabel, }: Omit<DatePickerProps, 'variant'>) => React.JSX.Element;
|
|
3
4
|
export default DatePickerCalendar;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import type { DatePickerProps } from './types';
|
|
2
3
|
export declare const getInitialDateValue: (value: Date, minDate?: Date | undefined, maxDate?: Date | undefined) => Date;
|
|
3
|
-
declare const DatePickerIOS: ({ value, minDate, maxDate, label, placeholder, onChange, confirmLabel, displayFormat, disabled, required, error, helpText, style, testID, }: Omit<DatePickerProps, 'variant' | 'monthPickerConfirmLabel' | 'monthPickerCancelLabel'>) => JSX.Element;
|
|
4
|
+
declare const DatePickerIOS: ({ value, minDate, maxDate, label, placeholder, onChange, confirmLabel, displayFormat, disabled, required, error, helpText, style, testID, }: Omit<DatePickerProps, 'variant' | 'monthPickerConfirmLabel' | 'monthPickerCancelLabel'>) => React.JSX.Element;
|
|
4
5
|
export default DatePickerIOS;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import type { DatePickerProps } from './types';
|
|
2
|
-
declare const DatePicker: ({ variant, ...props }: DatePickerProps) => JSX.Element;
|
|
3
|
+
declare const DatePicker: ({ variant, ...props }: DatePickerProps) => React.JSX.Element;
|
|
3
4
|
export default DatePicker;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import type { StyleProp, ViewStyle, ViewProps } from 'react-native';
|
|
2
3
|
interface DividerProps extends ViewProps {
|
|
3
4
|
/**
|
|
@@ -17,5 +18,5 @@ interface DividerProps extends ViewProps {
|
|
|
17
18
|
*/
|
|
18
19
|
testID?: string;
|
|
19
20
|
}
|
|
20
|
-
declare const Divider: ({ marginHorizontal, marginVertical, style, testID, ...nativeProps }: DividerProps) => JSX.Element;
|
|
21
|
+
declare const Divider: ({ marginHorizontal, marginVertical, style, testID, ...nativeProps }: DividerProps) => React.JSX.Element;
|
|
21
22
|
export default Divider;
|