@fountain-ui/core 2.0.0-beta.9 → 2.0.0-beta.90
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/CHANGELOG.md +32 -0
- package/build/commonjs/Accordion/Accordion.js +110 -27
- package/build/commonjs/Accordion/Accordion.js.map +1 -1
- package/build/commonjs/Accordion/AccordionProps.js.map +1 -1
- package/build/commonjs/Badge/Badge.js +5 -14
- package/build/commonjs/Badge/Badge.js.map +1 -1
- package/build/commonjs/Badge/BadgeProps.js.map +1 -1
- package/build/commonjs/Button/Button.js +6 -3
- package/build/commonjs/Button/Button.js.map +1 -1
- package/build/commonjs/ButtonBase/ButtonBase.js +65 -51
- package/build/commonjs/ButtonBase/ButtonBase.js.map +1 -1
- package/build/commonjs/ButtonBase/ButtonBaseProps.js.map +1 -1
- package/build/commonjs/Checkbox/CheckboxProps.js.map +1 -1
- package/build/commonjs/Chip/Chip.js +11 -9
- package/build/commonjs/Chip/Chip.js.map +1 -1
- package/build/commonjs/Chip/ChipProps.js.map +1 -1
- package/build/commonjs/CircularProgress/CircularProgress.js +27 -28
- package/build/commonjs/CircularProgress/CircularProgress.js.map +1 -1
- package/build/commonjs/Dialog/Dialog.js +118 -10
- package/build/commonjs/Dialog/Dialog.js.map +1 -1
- package/build/commonjs/Dialog/DialogProps.js.map +1 -1
- package/build/commonjs/Divider/Divider.js +26 -18
- package/build/commonjs/Divider/Divider.js.map +1 -1
- package/build/commonjs/Divider/DividerProps.js.map +1 -1
- package/build/commonjs/Image/Image.js +58 -14
- package/build/commonjs/Image/Image.js.map +1 -1
- package/build/commonjs/Image/ImageProps.js.map +1 -1
- package/build/commonjs/Image/index.js.map +1 -1
- package/build/commonjs/ImageCore/ImageCoreNative.js +36 -26
- package/build/commonjs/ImageCore/ImageCoreNative.js.map +1 -1
- package/build/commonjs/ImageCore/ImageCoreProps.js.map +1 -1
- package/build/commonjs/ImageCore/ImageCoreWeb.js +19 -1
- package/build/commonjs/ImageCore/ImageCoreWeb.js.map +1 -1
- package/build/commonjs/ImageCore/ImageFileExtensionContext.js +14 -0
- package/build/commonjs/ImageCore/ImageFileExtensionContext.js.map +1 -0
- package/build/commonjs/ImageCore/ImageFileExtensionProvider.js +42 -0
- package/build/commonjs/ImageCore/ImageFileExtensionProvider.js.map +1 -0
- package/build/commonjs/ImageCore/index.js +17 -5
- package/build/commonjs/ImageCore/index.js.map +1 -1
- package/build/commonjs/ImageCore/index.native.js +27 -0
- package/build/commonjs/ImageCore/index.native.js.map +1 -1
- package/build/commonjs/Modal/AnimatedContainer/index.js +167 -0
- package/build/commonjs/Modal/AnimatedContainer/index.js.map +1 -0
- package/build/commonjs/Modal/Modal.js +43 -9
- package/build/commonjs/Modal/Modal.js.map +1 -1
- package/build/commonjs/Modal/ModalProps.js +12 -0
- package/build/commonjs/Modal/ModalProps.js.map +1 -1
- package/build/commonjs/Modal/index.js +8 -0
- package/build/commonjs/Modal/index.js.map +1 -1
- package/build/commonjs/Paper/Paper.js +1 -1
- package/build/commonjs/Paper/Paper.js.map +1 -1
- package/build/commonjs/Radio/Radio.js +11 -4
- package/build/commonjs/Radio/Radio.js.map +1 -1
- package/build/commonjs/Radio/RadioProps.js.map +1 -1
- package/build/commonjs/Slide/Slide.js +41 -27
- package/build/commonjs/Slide/Slide.js.map +1 -1
- package/build/commonjs/Slide/SlideProps.js.map +1 -1
- package/build/commonjs/Snackbar/Snackbar.js +34 -7
- package/build/commonjs/Snackbar/Snackbar.js.map +1 -1
- package/build/commonjs/Snackbar/SnackbarProps.js.map +1 -1
- package/build/commonjs/SnackbarContent/SnackbarContent.js +32 -14
- package/build/commonjs/SnackbarContent/SnackbarContent.js.map +1 -1
- package/build/commonjs/SnackbarContent/SnackbarContentProps.js.map +1 -1
- package/build/commonjs/SvgIcon/SvgIcon.js +1 -1
- package/build/commonjs/SvgIcon/SvgIcon.js.map +1 -1
- package/build/commonjs/Tab/Tab.js +66 -20
- package/build/commonjs/Tab/Tab.js.map +1 -1
- package/build/commonjs/Tab/TabIndicator.js +11 -7
- package/build/commonjs/Tab/TabIndicator.js.map +1 -1
- package/build/commonjs/Tab/TabProps.js.map +1 -1
- package/build/commonjs/Tab/index.js.map +1 -1
- package/build/commonjs/Tabs/IndexAwareTab.js +35 -0
- package/build/commonjs/Tabs/IndexAwareTab.js.map +1 -0
- package/build/commonjs/Tabs/InternalContext.js +17 -0
- package/build/commonjs/Tabs/InternalContext.js.map +1 -0
- package/build/commonjs/Tabs/ScrollableTabsView.js +35 -0
- package/build/commonjs/Tabs/ScrollableTabsView.js.map +1 -0
- package/build/commonjs/Tabs/TabIndicator.js +73 -28
- package/build/commonjs/Tabs/TabIndicator.js.map +1 -1
- package/build/commonjs/Tabs/TabIndicatorProps.js.map +1 -1
- package/build/commonjs/Tabs/Tabs.js +119 -83
- package/build/commonjs/Tabs/Tabs.js.map +1 -1
- package/build/commonjs/Tabs/TabsProps.js.map +1 -1
- package/build/commonjs/Tabs/index.js.map +1 -1
- package/build/commonjs/Tabs/types.js +2 -0
- package/build/commonjs/Tabs/types.js.map +1 -0
- package/build/commonjs/Tabs/useIndexStore.js +35 -0
- package/build/commonjs/Tabs/useIndexStore.js.map +1 -0
- package/build/commonjs/Tabs/useScrollViewReaction.js +69 -0
- package/build/commonjs/Tabs/useScrollViewReaction.js.map +1 -0
- package/build/commonjs/Tabs/useTabCoordinates.js +30 -0
- package/build/commonjs/Tabs/useTabCoordinates.js.map +1 -0
- package/build/commonjs/Tabs/useTabInnerContentsWidth.js +30 -0
- package/build/commonjs/Tabs/useTabInnerContentsWidth.js.map +1 -0
- package/build/commonjs/Tabs/utils.js +19 -0
- package/build/commonjs/Tabs/utils.js.map +1 -0
- package/build/commonjs/TextField/InputLabel.js +6 -3
- package/build/commonjs/TextField/InputLabel.js.map +1 -1
- package/build/commonjs/TextField/OutlinedTextField.js +6 -2
- package/build/commonjs/TextField/OutlinedTextField.js.map +1 -1
- package/build/commonjs/TextField/TextField.js +15 -8
- package/build/commonjs/TextField/TextField.js.map +1 -1
- package/build/commonjs/TextField/TextFieldProps.js.map +1 -1
- package/build/commonjs/Tooltip/Tooltip.js +50 -31
- package/build/commonjs/Tooltip/Tooltip.js.map +1 -1
- package/build/commonjs/Tooltip/TooltipProps.js.map +1 -1
- package/build/commonjs/Typography/Typography.js +14 -5
- package/build/commonjs/Typography/Typography.js.map +1 -1
- package/build/commonjs/Typography/TypographyProps.js.map +1 -1
- package/build/commonjs/animated/AnimatedPressable.js +2 -3
- package/build/commonjs/animated/AnimatedPressable.js.map +1 -1
- package/build/commonjs/hooks/index.js +32 -0
- package/build/commonjs/hooks/index.js.map +1 -1
- package/build/commonjs/hooks/useAnimatedValue.js +31 -0
- package/build/commonjs/hooks/useAnimatedValue.js.map +1 -0
- package/build/commonjs/hooks/useCollapsibleAppBar.js +41 -54
- package/build/commonjs/hooks/useCollapsibleAppBar.js.map +1 -1
- package/build/commonjs/hooks/useDebounce.js +33 -0
- package/build/commonjs/hooks/useDebounce.js.map +1 -0
- package/build/commonjs/hooks/useFadeInAppBar.js +21 -23
- package/build/commonjs/hooks/useFadeInAppBar.js.map +1 -1
- package/build/commonjs/hooks/useImperativeState.js +26 -0
- package/build/commonjs/hooks/useImperativeState.js.map +1 -0
- package/build/commonjs/hooks/useSyncAnimatedValue.js +40 -0
- package/build/commonjs/hooks/useSyncAnimatedValue.js.map +1 -0
- package/build/commonjs/hooks/useThrottle.js +3 -7
- package/build/commonjs/hooks/useThrottle.js.map +1 -1
- package/build/commonjs/hooks/useValidWindowDimensions/index.ios.js +14 -7
- package/build/commonjs/hooks/useValidWindowDimensions/index.ios.js.map +1 -1
- package/build/commonjs/index.js +28 -0
- package/build/commonjs/index.js.map +1 -1
- package/build/commonjs/internal/hooks/index.js +0 -8
- package/build/commonjs/internal/hooks/index.js.map +1 -1
- package/build/commonjs/internal/hooks/useHeight.js +3 -9
- package/build/commonjs/internal/hooks/useHeight.js.map +1 -1
- package/build/commonjs/internal/icons/Checkbox.js +1 -1
- package/build/commonjs/internal/icons/Checkbox.js.map +1 -1
- package/build/commonjs/internal/icons/CheckboxChecked.js +1 -1
- package/build/commonjs/internal/icons/CheckboxChecked.js.map +1 -1
- package/build/commonjs/internal/icons/ChevronDown.js +1 -1
- package/build/commonjs/internal/icons/ChevronDown.js.map +1 -1
- package/build/commonjs/internal/icons/ChevronLeft.js +1 -1
- package/build/commonjs/internal/icons/ChevronLeft.js.map +1 -1
- package/build/commonjs/internal/icons/ChevronRight.js +1 -1
- package/build/commonjs/internal/icons/ChevronRight.js.map +1 -1
- package/build/commonjs/internal/icons/Close.js +1 -1
- package/build/commonjs/internal/icons/Close.js.map +1 -1
- package/build/commonjs/internal/icons/Radio.js +1 -1
- package/build/commonjs/internal/icons/Radio.js.map +1 -1
- package/build/commonjs/internal/icons/RadioChecked.js +1 -1
- package/build/commonjs/internal/icons/RadioChecked.js.map +1 -1
- package/build/commonjs/store/MockStore.js +27 -0
- package/build/commonjs/store/MockStore.js.map +1 -0
- package/build/commonjs/store/SimpleStore.js +59 -0
- package/build/commonjs/store/SimpleStore.js.map +1 -0
- package/build/commonjs/store/index.js +24 -0
- package/build/commonjs/store/index.js.map +1 -0
- package/build/commonjs/store/types.js +2 -0
- package/build/commonjs/store/types.js.map +1 -0
- package/build/commonjs/types/index.js.map +1 -1
- package/build/commonjs/utils/index.js +8 -0
- package/build/commonjs/utils/index.js.map +1 -1
- package/build/commonjs/utils/isNotAndroid12.js +20 -0
- package/build/commonjs/utils/isNotAndroid12.js.map +1 -0
- package/build/module/Accordion/Accordion.js +111 -29
- package/build/module/Accordion/Accordion.js.map +1 -1
- package/build/module/Accordion/AccordionProps.js.map +1 -1
- package/build/module/Badge/Badge.js +5 -14
- package/build/module/Badge/Badge.js.map +1 -1
- package/build/module/Badge/BadgeProps.js.map +1 -1
- package/build/module/Button/Button.js +6 -3
- package/build/module/Button/Button.js.map +1 -1
- package/build/module/ButtonBase/ButtonBase.js +64 -49
- package/build/module/ButtonBase/ButtonBase.js.map +1 -1
- package/build/module/ButtonBase/ButtonBaseProps.js.map +1 -1
- package/build/module/Checkbox/CheckboxProps.js.map +1 -1
- package/build/module/Chip/Chip.js +11 -9
- package/build/module/Chip/Chip.js.map +1 -1
- package/build/module/Chip/ChipProps.js.map +1 -1
- package/build/module/CircularProgress/CircularProgress.js +25 -23
- package/build/module/CircularProgress/CircularProgress.js.map +1 -1
- package/build/module/Dialog/Dialog.js +109 -8
- package/build/module/Dialog/Dialog.js.map +1 -1
- package/build/module/Dialog/DialogProps.js.map +1 -1
- package/build/module/Divider/Divider.js +26 -18
- package/build/module/Divider/Divider.js.map +1 -1
- package/build/module/Divider/DividerProps.js.map +1 -1
- package/build/module/Image/Image.js +54 -12
- package/build/module/Image/Image.js.map +1 -1
- package/build/module/Image/ImageProps.js.map +1 -1
- package/build/module/Image/index.js.map +1 -1
- package/build/module/ImageCore/ImageCoreNative.js +31 -25
- package/build/module/ImageCore/ImageCoreNative.js.map +1 -1
- package/build/module/ImageCore/ImageCoreProps.js.map +1 -1
- package/build/module/ImageCore/ImageCoreWeb.js +19 -1
- package/build/module/ImageCore/ImageCoreWeb.js.map +1 -1
- package/build/module/ImageCore/ImageFileExtensionContext.js +5 -0
- package/build/module/ImageCore/ImageFileExtensionContext.js.map +1 -0
- package/build/module/ImageCore/ImageFileExtensionProvider.js +24 -0
- package/build/module/ImageCore/ImageFileExtensionProvider.js.map +1 -0
- package/build/module/ImageCore/index.js +2 -1
- package/build/module/ImageCore/index.js.map +1 -1
- package/build/module/ImageCore/index.native.js +2 -0
- package/build/module/ImageCore/index.native.js.map +1 -1
- package/build/module/Modal/AnimatedContainer/index.js +144 -0
- package/build/module/Modal/AnimatedContainer/index.js.map +1 -0
- package/build/module/Modal/Modal.js +43 -9
- package/build/module/Modal/Modal.js.map +1 -1
- package/build/module/Modal/ModalProps.js +5 -0
- package/build/module/Modal/ModalProps.js.map +1 -1
- package/build/module/Modal/index.js +1 -0
- package/build/module/Modal/index.js.map +1 -1
- package/build/module/Paper/Paper.js +1 -1
- package/build/module/Paper/Paper.js.map +1 -1
- package/build/module/Radio/Radio.js +9 -5
- package/build/module/Radio/Radio.js.map +1 -1
- package/build/module/Radio/RadioProps.js.map +1 -1
- package/build/module/Slide/Slide.js +39 -23
- package/build/module/Slide/Slide.js.map +1 -1
- package/build/module/Slide/SlideProps.js.map +1 -1
- package/build/module/Snackbar/Snackbar.js +25 -5
- package/build/module/Snackbar/Snackbar.js.map +1 -1
- package/build/module/Snackbar/SnackbarProps.js.map +1 -1
- package/build/module/SnackbarContent/SnackbarContent.js +21 -6
- package/build/module/SnackbarContent/SnackbarContent.js.map +1 -1
- package/build/module/SnackbarContent/SnackbarContentProps.js.map +1 -1
- package/build/module/SvgIcon/SvgIcon.js +1 -1
- package/build/module/SvgIcon/SvgIcon.js.map +1 -1
- package/build/module/Tab/Tab.js +63 -21
- package/build/module/Tab/Tab.js.map +1 -1
- package/build/module/Tab/TabIndicator.js +11 -7
- package/build/module/Tab/TabIndicator.js.map +1 -1
- package/build/module/Tab/TabProps.js.map +1 -1
- package/build/module/Tab/index.js.map +1 -1
- package/build/module/Tabs/IndexAwareTab.js +23 -0
- package/build/module/Tabs/IndexAwareTab.js.map +1 -0
- package/build/module/Tabs/InternalContext.js +7 -0
- package/build/module/Tabs/InternalContext.js.map +1 -0
- package/build/module/Tabs/ScrollableTabsView.js +22 -0
- package/build/module/Tabs/ScrollableTabsView.js.map +1 -0
- package/build/module/Tabs/TabIndicator.js +66 -25
- package/build/module/Tabs/TabIndicator.js.map +1 -1
- package/build/module/Tabs/TabIndicatorProps.js.map +1 -1
- package/build/module/Tabs/Tabs.js +109 -72
- package/build/module/Tabs/Tabs.js.map +1 -1
- package/build/module/Tabs/TabsProps.js.map +1 -1
- package/build/module/Tabs/index.js.map +1 -1
- package/build/module/Tabs/types.js +2 -0
- package/build/module/Tabs/types.js.map +1 -0
- package/build/module/Tabs/useIndexStore.js +25 -0
- package/build/module/Tabs/useIndexStore.js.map +1 -0
- package/build/module/Tabs/useScrollViewReaction.js +57 -0
- package/build/module/Tabs/useScrollViewReaction.js.map +1 -0
- package/build/module/Tabs/useTabCoordinates.js +21 -0
- package/build/module/Tabs/useTabCoordinates.js.map +1 -0
- package/build/module/Tabs/useTabInnerContentsWidth.js +21 -0
- package/build/module/Tabs/useTabInnerContentsWidth.js.map +1 -0
- package/build/module/Tabs/utils.js +9 -0
- package/build/module/Tabs/utils.js.map +1 -0
- package/build/module/TextField/InputLabel.js +7 -4
- package/build/module/TextField/InputLabel.js.map +1 -1
- package/build/module/TextField/OutlinedTextField.js +7 -3
- package/build/module/TextField/OutlinedTextField.js.map +1 -1
- package/build/module/TextField/TextField.js +13 -5
- package/build/module/TextField/TextField.js.map +1 -1
- package/build/module/TextField/TextFieldProps.js.map +1 -1
- package/build/module/Tooltip/Tooltip.js +48 -25
- package/build/module/Tooltip/Tooltip.js.map +1 -1
- package/build/module/Tooltip/TooltipProps.js.map +1 -1
- package/build/module/Typography/Typography.js +14 -5
- package/build/module/Typography/Typography.js.map +1 -1
- package/build/module/Typography/TypographyProps.js.map +1 -1
- package/build/module/animated/AnimatedPressable.js +2 -3
- package/build/module/animated/AnimatedPressable.js.map +1 -1
- package/build/module/hooks/index.js +4 -0
- package/build/module/hooks/index.js.map +1 -1
- package/build/module/hooks/useAnimatedValue.js +22 -0
- package/build/module/hooks/useAnimatedValue.js.map +1 -0
- package/build/module/hooks/useCollapsibleAppBar.js +42 -52
- package/build/module/hooks/useCollapsibleAppBar.js.map +1 -1
- package/build/module/hooks/useDebounce.js +25 -0
- package/build/module/hooks/useDebounce.js.map +1 -0
- package/build/module/hooks/useFadeInAppBar.js +23 -20
- package/build/module/hooks/useFadeInAppBar.js.map +1 -1
- package/build/module/hooks/useImperativeState.js +17 -0
- package/build/module/hooks/useImperativeState.js.map +1 -0
- package/build/module/hooks/useSyncAnimatedValue.js +28 -0
- package/build/module/hooks/useSyncAnimatedValue.js.map +1 -0
- package/build/module/hooks/useThrottle.js +3 -3
- package/build/module/hooks/useThrottle.js.map +1 -1
- package/build/module/hooks/useValidWindowDimensions/index.ios.js +15 -9
- package/build/module/hooks/useValidWindowDimensions/index.ios.js.map +1 -1
- package/build/module/index.js +2 -0
- package/build/module/index.js.map +1 -1
- package/build/module/internal/hooks/index.js +0 -1
- package/build/module/internal/hooks/index.js.map +1 -1
- package/build/module/internal/hooks/useHeight.js +3 -4
- package/build/module/internal/hooks/useHeight.js.map +1 -1
- package/build/module/internal/icons/Checkbox.js +1 -1
- package/build/module/internal/icons/Checkbox.js.map +1 -1
- package/build/module/internal/icons/CheckboxChecked.js +1 -1
- package/build/module/internal/icons/CheckboxChecked.js.map +1 -1
- package/build/module/internal/icons/ChevronDown.js +1 -1
- package/build/module/internal/icons/ChevronDown.js.map +1 -1
- package/build/module/internal/icons/ChevronLeft.js +1 -1
- package/build/module/internal/icons/ChevronLeft.js.map +1 -1
- package/build/module/internal/icons/ChevronRight.js +1 -1
- package/build/module/internal/icons/ChevronRight.js.map +1 -1
- package/build/module/internal/icons/Close.js +1 -1
- package/build/module/internal/icons/Close.js.map +1 -1
- package/build/module/internal/icons/Radio.js +1 -1
- package/build/module/internal/icons/Radio.js.map +1 -1
- package/build/module/internal/icons/RadioChecked.js +1 -1
- package/build/module/internal/icons/RadioChecked.js.map +1 -1
- package/build/module/store/MockStore.js +18 -0
- package/build/module/store/MockStore.js.map +1 -0
- package/build/module/store/SimpleStore.js +50 -0
- package/build/module/store/SimpleStore.js.map +1 -0
- package/build/module/store/index.js +3 -0
- package/build/module/store/index.js.map +1 -0
- package/build/module/store/types.js +2 -0
- package/build/module/store/types.js.map +1 -0
- package/build/module/types/index.js.map +1 -1
- package/build/module/utils/index.js +1 -0
- package/build/module/utils/index.js.map +1 -1
- package/build/module/utils/isNotAndroid12.js +6 -0
- package/build/module/utils/isNotAndroid12.js.map +1 -0
- package/build/typescript/Accordion/Accordion.d.ts +1 -0
- package/build/typescript/Accordion/AccordionProps.d.ts +14 -11
- package/build/typescript/AspectRatio/AspectRatioNative.d.ts +1 -0
- package/build/typescript/AspectRatio/AspectRatioWeb.d.ts +1 -0
- package/build/typescript/Avatar/Avatar.d.ts +1 -0
- package/build/typescript/Badge/Badge.d.ts +1 -0
- package/build/typescript/Badge/BadgeProps.d.ts +5 -0
- package/build/typescript/Button/Button.d.ts +1 -0
- package/build/typescript/ButtonBase/ButtonBase.d.ts +1 -0
- package/build/typescript/ButtonBase/ButtonBaseProps.d.ts +8 -0
- package/build/typescript/Card/Card.d.ts +1 -0
- package/build/typescript/CardActions/CardActions.d.ts +1 -0
- package/build/typescript/CardContent/CardContent.d.ts +1 -0
- package/build/typescript/CardMedia/CardMedia.d.ts +1 -0
- package/build/typescript/Checkbox/Checkbox.d.ts +1 -0
- package/build/typescript/Checkbox/CheckboxProps.d.ts +1 -1
- package/build/typescript/Chip/Chip.d.ts +1 -0
- package/build/typescript/Chip/ChipProps.d.ts +4 -0
- package/build/typescript/CircularProgress/CircularProgress.d.ts +3 -2
- package/build/typescript/Column/Column.d.ts +1 -0
- package/build/typescript/Dialog/Dialog.d.ts +1 -0
- package/build/typescript/Dialog/DialogProps.d.ts +10 -0
- package/build/typescript/DialogActions/DialogActions.d.ts +1 -0
- package/build/typescript/DialogContent/DialogContent.d.ts +1 -0
- package/build/typescript/DialogMedia/DialogMedia.d.ts +1 -0
- package/build/typescript/DialogTitle/DialogTitle.d.ts +1 -0
- package/build/typescript/Divider/Divider.d.ts +1 -0
- package/build/typescript/Divider/DividerProps.d.ts +22 -1
- package/build/typescript/Fab/Fab.d.ts +1 -0
- package/build/typescript/Flexbox/Flexbox.d.ts +1 -0
- package/build/typescript/IconButton/IconButton.d.ts +1 -0
- package/build/typescript/Image/Image.d.ts +1 -0
- package/build/typescript/Image/ImageProps.d.ts +30 -2
- package/build/typescript/Image/index.d.ts +1 -1
- package/build/typescript/ImageCore/ImageCoreNative.d.ts +1 -0
- package/build/typescript/ImageCore/ImageCoreProps.d.ts +5 -1
- package/build/typescript/ImageCore/ImageCoreWeb.d.ts +1 -0
- package/build/typescript/ImageCore/ImageFileExtensionContext.d.ts +3 -0
- package/build/typescript/ImageCore/ImageFileExtensionProvider.d.ts +13 -0
- package/build/typescript/ImageCore/index.d.ts +3 -1
- package/build/typescript/ImageCore/index.native.d.ts +2 -0
- package/build/typescript/Link/Link.d.ts +1 -0
- package/build/typescript/List/List.d.ts +1 -0
- package/build/typescript/ListItem/ListItem.d.ts +1 -0
- package/build/typescript/ListItemIcon/ListItemIcon.d.ts +1 -0
- package/build/typescript/ListItemSecondaryAction/ListItemSecondaryAction.d.ts +1 -0
- package/build/typescript/ListItemText/ListItemText.d.ts +1 -0
- package/build/typescript/ListSubheader/ListSubheader.d.ts +1 -0
- package/build/typescript/Menu/Menu.d.ts +1 -0
- package/build/typescript/MenuItem/MenuItem.d.ts +1 -0
- package/build/typescript/Modal/AnimatedContainer/index.d.ts +5 -0
- package/build/typescript/Modal/Modal.d.ts +1 -0
- package/build/typescript/Modal/ModalProps.d.ts +47 -0
- package/build/typescript/Modal/index.d.ts +2 -1
- package/build/typescript/Pagination/Pagination.d.ts +1 -0
- package/build/typescript/Portal/Portal.d.ts +1 -0
- package/build/typescript/Radio/Radio.d.ts +1 -0
- package/build/typescript/Radio/RadioProps.d.ts +13 -0
- package/build/typescript/RadioGroup/RadioGroup.d.ts +1 -0
- package/build/typescript/Row/Row.d.ts +1 -0
- package/build/typescript/Slide/Slide.d.ts +1 -0
- package/build/typescript/Slide/SlideProps.d.ts +2 -3
- package/build/typescript/Slider/Slider.d.ts +1 -1
- package/build/typescript/Snackbar/Snackbar.d.ts +1 -0
- package/build/typescript/Snackbar/SnackbarProps.d.ts +10 -3
- package/build/typescript/SnackbarContent/SnackbarContent.d.ts +1 -0
- package/build/typescript/SnackbarContent/SnackbarContentProps.d.ts +9 -0
- package/build/typescript/Spacer/Spacer.d.ts +1 -0
- package/build/typescript/SvgIcon/SvgIcon.d.ts +1 -0
- package/build/typescript/Switch/Switch.d.ts +1 -0
- package/build/typescript/Tab/Tab.d.ts +1 -0
- package/build/typescript/Tab/TabIndicator.d.ts +5 -1
- package/build/typescript/Tab/TabProps.d.ts +21 -2
- package/build/typescript/Tab/index.d.ts +1 -1
- package/build/typescript/TabBase/TabBase.d.ts +1 -0
- package/build/typescript/Tabs/IndexAwareTab.d.ts +8 -0
- package/build/typescript/Tabs/InternalContext.d.ts +7 -0
- package/build/typescript/Tabs/ScrollableTabsView.d.ts +8 -0
- package/build/typescript/Tabs/TabIndicator.d.ts +1 -0
- package/build/typescript/Tabs/TabIndicatorProps.d.ts +10 -5
- package/build/typescript/Tabs/Tabs.d.ts +4 -1
- package/build/typescript/Tabs/TabsProps.d.ts +37 -13
- package/build/typescript/Tabs/index.d.ts +1 -0
- package/build/typescript/Tabs/types.d.ts +9 -0
- package/build/typescript/Tabs/useIndexStore.d.ts +3 -0
- package/build/typescript/Tabs/useScrollViewReaction.d.ts +8 -0
- package/build/typescript/Tabs/useTabCoordinates.d.ts +6 -0
- package/build/typescript/Tabs/useTabInnerContentsWidth.d.ts +6 -0
- package/build/typescript/Tabs/utils.d.ts +3 -0
- package/build/typescript/TextField/InputLabel.d.ts +1 -0
- package/build/typescript/TextField/TextFieldProps.d.ts +3 -0
- package/build/typescript/Toolbar/Toolbar.d.ts +1 -0
- package/build/typescript/Tooltip/Tooltip.d.ts +1 -0
- package/build/typescript/Tooltip/TooltipProps.d.ts +26 -1
- package/build/typescript/Typography/TypographyProps.d.ts +22 -1
- package/build/typescript/animated/AnimatedPressable.d.ts +2 -2
- package/build/typescript/hooks/index.d.ts +5 -0
- package/build/typescript/hooks/useAnimatedValue.d.ts +2 -0
- package/build/typescript/hooks/useCollapsibleAppBar.d.ts +2 -0
- package/build/typescript/hooks/useDebounce.d.ts +1 -0
- package/build/typescript/hooks/useFadeInAppBar.d.ts +1 -0
- package/build/typescript/hooks/useImperativeState.d.ts +6 -0
- package/build/typescript/hooks/useSyncAnimatedValue.d.ts +6 -0
- package/build/typescript/hooks/useValidWindowDimensions/index.ios.d.ts +2 -1
- package/build/typescript/index.d.ts +2 -0
- package/build/typescript/internal/hooks/index.d.ts +0 -1
- package/build/typescript/internal/icons/Checkbox.d.ts +9 -7
- package/build/typescript/internal/icons/CheckboxChecked.d.ts +9 -7
- package/build/typescript/internal/icons/ChevronDown.d.ts +9 -7
- package/build/typescript/internal/icons/ChevronLeft.d.ts +9 -7
- package/build/typescript/internal/icons/ChevronRight.d.ts +9 -7
- package/build/typescript/internal/icons/CircularProgress.d.ts +1 -0
- package/build/typescript/internal/icons/Close.d.ts +9 -7
- package/build/typescript/internal/icons/Radio.d.ts +9 -7
- package/build/typescript/internal/icons/RadioChecked.d.ts +9 -7
- package/build/typescript/store/MockStore.d.ts +7 -0
- package/build/typescript/store/SimpleStore.d.ts +10 -0
- package/build/typescript/store/index.d.ts +3 -0
- package/build/typescript/store/types.d.ts +10 -0
- package/build/typescript/types/index.d.ts +6 -0
- package/build/typescript/utils/index.d.ts +1 -0
- package/build/typescript/utils/isNotAndroid12.d.ts +2 -0
- package/package.json +9 -9
- package/src/Accordion/Accordion.tsx +147 -51
- package/src/Accordion/AccordionProps.ts +15 -11
- package/src/Badge/Badge.tsx +6 -16
- package/src/Badge/BadgeProps.ts +6 -0
- package/src/Button/Button.tsx +8 -2
- package/src/ButtonBase/ButtonBase.tsx +79 -44
- package/src/ButtonBase/ButtonBaseProps.ts +10 -0
- package/src/Checkbox/CheckboxProps.ts +1 -1
- package/src/Chip/Chip.tsx +13 -9
- package/src/Chip/ChipProps.ts +5 -0
- package/src/CircularProgress/CircularProgress.tsx +41 -33
- package/src/Dialog/Dialog.tsx +136 -14
- package/src/Dialog/DialogProps.ts +12 -0
- package/src/Divider/Divider.tsx +23 -14
- package/src/Divider/DividerProps.ts +27 -1
- package/src/Image/Image.tsx +78 -16
- package/src/Image/ImageProps.ts +36 -2
- package/src/Image/index.ts +1 -1
- package/src/ImageCore/ImageCoreNative.tsx +29 -19
- package/src/ImageCore/ImageCoreProps.ts +6 -1
- package/src/ImageCore/ImageCoreWeb.tsx +22 -2
- package/src/ImageCore/ImageFileExtensionContext.ts +7 -0
- package/src/ImageCore/ImageFileExtensionProvider.tsx +33 -0
- package/src/ImageCore/index.native.ts +3 -1
- package/src/ImageCore/index.ts +4 -1
- package/src/Modal/AnimatedContainer/index.tsx +172 -0
- package/src/Modal/Modal.tsx +44 -12
- package/src/Modal/ModalProps.ts +59 -1
- package/src/Modal/index.ts +2 -1
- package/src/Paper/Paper.tsx +1 -1
- package/src/Radio/Radio.tsx +10 -7
- package/src/Radio/RadioProps.ts +16 -0
- package/src/Slide/Slide.tsx +33 -27
- package/src/Slide/SlideProps.ts +2 -3
- package/src/Snackbar/Snackbar.tsx +33 -7
- package/src/Snackbar/SnackbarProps.ts +19 -9
- package/src/SnackbarContent/SnackbarContent.tsx +42 -10
- package/src/SnackbarContent/SnackbarContentProps.ts +14 -3
- package/src/SvgIcon/SvgIcon.tsx +1 -1
- package/src/Tab/Tab.tsx +85 -28
- package/src/Tab/TabIndicator.tsx +17 -15
- package/src/Tab/TabProps.ts +24 -2
- package/src/Tab/index.ts +1 -1
- package/src/Tabs/IndexAwareTab.tsx +29 -0
- package/src/Tabs/InternalContext.ts +13 -0
- package/src/Tabs/ScrollableTabsView.tsx +28 -0
- package/src/Tabs/TabIndicator.tsx +74 -37
- package/src/Tabs/TabIndicatorProps.ts +12 -5
- package/src/Tabs/Tabs.tsx +139 -93
- package/src/Tabs/TabsProps.ts +43 -23
- package/src/Tabs/index.ts +2 -1
- package/src/Tabs/types.ts +18 -0
- package/src/Tabs/useIndexStore.ts +31 -0
- package/src/Tabs/useScrollViewReaction.ts +62 -0
- package/src/Tabs/useTabCoordinates.ts +25 -0
- package/src/Tabs/useTabInnerContentsWidth.ts +26 -0
- package/src/Tabs/utils.ts +14 -0
- package/src/TextField/InputLabel.tsx +6 -1
- package/src/TextField/OutlinedTextField.tsx +8 -2
- package/src/TextField/TextField.tsx +10 -4
- package/src/TextField/TextFieldProps.ts +4 -0
- package/src/Tooltip/Tooltip.tsx +57 -26
- package/src/Tooltip/TooltipProps.ts +26 -1
- package/src/Typography/Typography.tsx +12 -3
- package/src/Typography/TypographyProps.ts +30 -1
- package/src/animated/AnimatedPressable.tsx +1 -2
- package/src/hooks/index.ts +6 -0
- package/src/hooks/useAnimatedValue.ts +21 -0
- package/src/hooks/useCollapsibleAppBar.ts +64 -47
- package/src/hooks/useDebounce.ts +23 -0
- package/src/hooks/useFadeInAppBar.ts +23 -17
- package/src/hooks/useImperativeState.ts +24 -0
- package/src/hooks/useSyncAnimatedValue.ts +38 -0
- package/src/hooks/useThrottle.ts +3 -3
- package/src/hooks/useValidWindowDimensions/index.ios.ts +16 -10
- package/src/index.ts +4 -0
- package/src/internal/hooks/index.ts +0 -1
- package/src/internal/hooks/useHeight.ts +4 -5
- package/src/internal/icons/Checkbox.tsx +1 -1
- package/src/internal/icons/CheckboxChecked.tsx +1 -1
- package/src/internal/icons/ChevronDown.tsx +1 -1
- package/src/internal/icons/ChevronLeft.tsx +1 -1
- package/src/internal/icons/ChevronRight.tsx +1 -1
- package/src/internal/icons/Close.tsx +1 -1
- package/src/internal/icons/Radio.tsx +1 -1
- package/src/internal/icons/RadioChecked.tsx +1 -1
- package/src/store/MockStore.ts +21 -0
- package/src/store/SimpleStore.ts +50 -0
- package/src/store/index.ts +3 -0
- package/src/store/types.ts +12 -0
- package/src/types/index.ts +7 -0
- package/src/utils/index.ts +1 -0
- package/src/utils/isNotAndroid12.ts +7 -0
- package/build/commonjs/ButtonBase/ButtonBase.ios.js +0 -101
- package/build/commonjs/ButtonBase/ButtonBase.ios.js.map +0 -1
- package/build/commonjs/ButtonBase/useDisabledReaction/index.js +0 -21
- package/build/commonjs/ButtonBase/useDisabledReaction/index.js.map +0 -1
- package/build/commonjs/ButtonBase/useDisabledReaction/index.native.js +0 -9
- package/build/commonjs/ButtonBase/useDisabledReaction/index.native.js.map +0 -1
- package/build/commonjs/ImageCore/ImageCoreNative.ios.js +0 -60
- package/build/commonjs/ImageCore/ImageCoreNative.ios.js.map +0 -1
- package/build/commonjs/internal/hooks/useWidth.js +0 -29
- package/build/commonjs/internal/hooks/useWidth.js.map +0 -1
- package/build/module/ButtonBase/ButtonBase.ios.js +0 -82
- package/build/module/ButtonBase/ButtonBase.ios.js.map +0 -1
- package/build/module/ButtonBase/useDisabledReaction/index.js +0 -12
- package/build/module/ButtonBase/useDisabledReaction/index.js.map +0 -1
- package/build/module/ButtonBase/useDisabledReaction/index.native.js +0 -2
- package/build/module/ButtonBase/useDisabledReaction/index.native.js.map +0 -1
- package/build/module/ImageCore/ImageCoreNative.ios.js +0 -45
- package/build/module/ImageCore/ImageCoreNative.ios.js.map +0 -1
- package/build/module/internal/hooks/useWidth.js +0 -15
- package/build/module/internal/hooks/useWidth.js.map +0 -1
- package/build/typescript/ButtonBase/ButtonBase.ios.d.ts +0 -2
- package/build/typescript/ButtonBase/useDisabledReaction/index.d.ts +0 -2
- package/build/typescript/ButtonBase/useDisabledReaction/index.native.d.ts +0 -2
- package/build/typescript/ImageCore/ImageCoreNative.ios.d.ts +0 -2
- package/build/typescript/internal/hooks/useWidth.d.ts +0 -2
- package/src/ButtonBase/ButtonBase.ios.tsx +0 -95
- package/src/ButtonBase/useDisabledReaction/index.native.ts +0 -4
- package/src/ButtonBase/useDisabledReaction/index.ts +0 -16
- package/src/ImageCore/ImageCoreNative.ios.tsx +0 -46
- package/src/internal/hooks/useWidth.ts +0 -17
|
@@ -13,7 +13,7 @@ declare const _default: React.MemoExoticComponent<{
|
|
|
13
13
|
opacity?: import("react-native-svg").NumberProp | undefined;
|
|
14
14
|
readonly height?: import("react-native-svg").NumberProp | undefined;
|
|
15
15
|
readonly width?: import("react-native-svg").NumberProp | undefined;
|
|
16
|
-
transform?: string | import("react-native-
|
|
16
|
+
transform?: string | (import("react-native").PerpectiveTransform | import("react-native").RotateTransform | import("react-native").RotateXTransform | import("react-native").RotateYTransform | import("react-native").RotateZTransform | import("react-native").ScaleTransform | import("react-native").ScaleXTransform | import("react-native").ScaleYTransform | import("react-native").TranslateXTransform | import("react-native").TranslateYTransform | import("react-native").SkewXTransform | import("react-native").SkewYTransform | import("react-native").MatrixTransform)[] | import("react-native-svg").ColumnMajorTransformMatrix | undefined;
|
|
17
17
|
rotation?: import("react-native-svg").NumberProp | undefined;
|
|
18
18
|
scaleX?: import("react-native-svg").NumberProp | undefined;
|
|
19
19
|
scaleY?: import("react-native-svg").NumberProp | undefined;
|
|
@@ -21,10 +21,13 @@ declare const _default: React.MemoExoticComponent<{
|
|
|
21
21
|
translateY?: import("react-native-svg").NumberProp | undefined;
|
|
22
22
|
readonly style?: import("@emotion/native").ReactNativeStyle | import("@emotion/native").ReactNativeStyle[] | undefined;
|
|
23
23
|
onLayout?: ((event: import("react-native").LayoutChangeEvent) => void) | undefined;
|
|
24
|
+
title?: string | undefined;
|
|
25
|
+
clipPath?: string | undefined;
|
|
26
|
+
marker?: string | undefined;
|
|
27
|
+
mask?: string | undefined;
|
|
24
28
|
scale?: import("react-native-svg").NumberArray | undefined;
|
|
25
29
|
skewX?: import("react-native-svg").NumberProp | undefined;
|
|
26
30
|
skewY?: import("react-native-svg").NumberProp | undefined;
|
|
27
|
-
title?: string | undefined;
|
|
28
31
|
readonly viewBox?: string | undefined;
|
|
29
32
|
preserveAspectRatio?: string | undefined;
|
|
30
33
|
fillOpacity?: import("react-native-svg").NumberProp | undefined;
|
|
@@ -39,7 +42,6 @@ declare const _default: React.MemoExoticComponent<{
|
|
|
39
42
|
strokeMiterlimit?: import("react-native-svg").NumberProp | undefined;
|
|
40
43
|
vectorEffect?: import("react-native-svg").VectorEffect | undefined;
|
|
41
44
|
clipRule?: import("react-native-svg").FillRule | undefined;
|
|
42
|
-
clipPath?: string | undefined;
|
|
43
45
|
translate?: import("react-native-svg").NumberArray | undefined;
|
|
44
46
|
origin?: import("react-native-svg").NumberArray | undefined;
|
|
45
47
|
originX?: import("react-native-svg").NumberProp | undefined;
|
|
@@ -69,11 +71,11 @@ declare const _default: React.MemoExoticComponent<{
|
|
|
69
71
|
delayPressOut?: number | undefined;
|
|
70
72
|
delayLongPress?: number | undefined;
|
|
71
73
|
id?: string | undefined;
|
|
72
|
-
marker?: string | undefined;
|
|
73
74
|
markerStart?: string | undefined;
|
|
74
75
|
markerMid?: string | undefined;
|
|
75
76
|
markerEnd?: string | undefined;
|
|
76
|
-
|
|
77
|
+
accessibilityLabel?: string | undefined;
|
|
78
|
+
accessible?: boolean | undefined;
|
|
77
79
|
font?: import("react-native-svg").FontObject | undefined;
|
|
78
80
|
fontStretch?: import("react-native-svg").FontStretch | undefined;
|
|
79
81
|
textAnchor?: import("react-native-svg").TextAnchor | undefined;
|
|
@@ -103,20 +105,20 @@ declare const _default: React.MemoExoticComponent<{
|
|
|
103
105
|
onTouchEnd?: ((event: import("react-native").GestureResponderEvent) => void) | undefined;
|
|
104
106
|
onTouchCancel?: ((event: import("react-native").GestureResponderEvent) => void) | undefined;
|
|
105
107
|
onTouchEndCapture?: ((event: import("react-native").GestureResponderEvent) => void) | undefined;
|
|
106
|
-
accessible?: boolean | undefined;
|
|
107
108
|
accessibilityActions?: readonly Readonly<{
|
|
108
109
|
name: string;
|
|
109
110
|
label?: string | undefined;
|
|
110
111
|
}>[] | undefined;
|
|
111
|
-
accessibilityLabel?: string | undefined;
|
|
112
112
|
accessibilityRole?: import("react-native").AccessibilityRole | undefined;
|
|
113
113
|
accessibilityState?: import("react-native").AccessibilityState | undefined;
|
|
114
114
|
accessibilityHint?: string | undefined;
|
|
115
115
|
accessibilityValue?: import("react-native").AccessibilityValue | undefined;
|
|
116
116
|
onAccessibilityAction?: ((event: import("react-native").AccessibilityActionEvent) => void) | undefined;
|
|
117
|
+
accessibilityLabelledBy?: string | string[] | undefined;
|
|
117
118
|
accessibilityLiveRegion?: "none" | "polite" | "assertive" | undefined;
|
|
118
119
|
importantForAccessibility?: "auto" | "yes" | "no" | "no-hide-descendants" | undefined;
|
|
119
120
|
accessibilityElementsHidden?: boolean | undefined;
|
|
121
|
+
accessibilityLanguage?: string | undefined;
|
|
120
122
|
accessibilityViewIsModal?: boolean | undefined;
|
|
121
123
|
onAccessibilityEscape?: (() => void) | undefined;
|
|
122
124
|
onAccessibilityTap?: (() => void) | undefined;
|
|
@@ -13,7 +13,7 @@ declare const _default: React.MemoExoticComponent<{
|
|
|
13
13
|
opacity?: import("react-native-svg").NumberProp | undefined;
|
|
14
14
|
readonly height?: import("react-native-svg").NumberProp | undefined;
|
|
15
15
|
readonly width?: import("react-native-svg").NumberProp | undefined;
|
|
16
|
-
transform?: string | import("react-native-
|
|
16
|
+
transform?: string | (import("react-native").PerpectiveTransform | import("react-native").RotateTransform | import("react-native").RotateXTransform | import("react-native").RotateYTransform | import("react-native").RotateZTransform | import("react-native").ScaleTransform | import("react-native").ScaleXTransform | import("react-native").ScaleYTransform | import("react-native").TranslateXTransform | import("react-native").TranslateYTransform | import("react-native").SkewXTransform | import("react-native").SkewYTransform | import("react-native").MatrixTransform)[] | import("react-native-svg").ColumnMajorTransformMatrix | undefined;
|
|
17
17
|
rotation?: import("react-native-svg").NumberProp | undefined;
|
|
18
18
|
scaleX?: import("react-native-svg").NumberProp | undefined;
|
|
19
19
|
scaleY?: import("react-native-svg").NumberProp | undefined;
|
|
@@ -21,10 +21,13 @@ declare const _default: React.MemoExoticComponent<{
|
|
|
21
21
|
translateY?: import("react-native-svg").NumberProp | undefined;
|
|
22
22
|
readonly style?: import("@emotion/native").ReactNativeStyle | import("@emotion/native").ReactNativeStyle[] | undefined;
|
|
23
23
|
onLayout?: ((event: import("react-native").LayoutChangeEvent) => void) | undefined;
|
|
24
|
+
title?: string | undefined;
|
|
25
|
+
clipPath?: string | undefined;
|
|
26
|
+
marker?: string | undefined;
|
|
27
|
+
mask?: string | undefined;
|
|
24
28
|
scale?: import("react-native-svg").NumberArray | undefined;
|
|
25
29
|
skewX?: import("react-native-svg").NumberProp | undefined;
|
|
26
30
|
skewY?: import("react-native-svg").NumberProp | undefined;
|
|
27
|
-
title?: string | undefined;
|
|
28
31
|
readonly viewBox?: string | undefined;
|
|
29
32
|
preserveAspectRatio?: string | undefined;
|
|
30
33
|
fillOpacity?: import("react-native-svg").NumberProp | undefined;
|
|
@@ -39,7 +42,6 @@ declare const _default: React.MemoExoticComponent<{
|
|
|
39
42
|
strokeMiterlimit?: import("react-native-svg").NumberProp | undefined;
|
|
40
43
|
vectorEffect?: import("react-native-svg").VectorEffect | undefined;
|
|
41
44
|
clipRule?: import("react-native-svg").FillRule | undefined;
|
|
42
|
-
clipPath?: string | undefined;
|
|
43
45
|
translate?: import("react-native-svg").NumberArray | undefined;
|
|
44
46
|
origin?: import("react-native-svg").NumberArray | undefined;
|
|
45
47
|
originX?: import("react-native-svg").NumberProp | undefined;
|
|
@@ -69,11 +71,11 @@ declare const _default: React.MemoExoticComponent<{
|
|
|
69
71
|
delayPressOut?: number | undefined;
|
|
70
72
|
delayLongPress?: number | undefined;
|
|
71
73
|
id?: string | undefined;
|
|
72
|
-
marker?: string | undefined;
|
|
73
74
|
markerStart?: string | undefined;
|
|
74
75
|
markerMid?: string | undefined;
|
|
75
76
|
markerEnd?: string | undefined;
|
|
76
|
-
|
|
77
|
+
accessibilityLabel?: string | undefined;
|
|
78
|
+
accessible?: boolean | undefined;
|
|
77
79
|
font?: import("react-native-svg").FontObject | undefined;
|
|
78
80
|
fontStretch?: import("react-native-svg").FontStretch | undefined;
|
|
79
81
|
textAnchor?: import("react-native-svg").TextAnchor | undefined;
|
|
@@ -103,20 +105,20 @@ declare const _default: React.MemoExoticComponent<{
|
|
|
103
105
|
onTouchEnd?: ((event: import("react-native").GestureResponderEvent) => void) | undefined;
|
|
104
106
|
onTouchCancel?: ((event: import("react-native").GestureResponderEvent) => void) | undefined;
|
|
105
107
|
onTouchEndCapture?: ((event: import("react-native").GestureResponderEvent) => void) | undefined;
|
|
106
|
-
accessible?: boolean | undefined;
|
|
107
108
|
accessibilityActions?: readonly Readonly<{
|
|
108
109
|
name: string;
|
|
109
110
|
label?: string | undefined;
|
|
110
111
|
}>[] | undefined;
|
|
111
|
-
accessibilityLabel?: string | undefined;
|
|
112
112
|
accessibilityRole?: import("react-native").AccessibilityRole | undefined;
|
|
113
113
|
accessibilityState?: import("react-native").AccessibilityState | undefined;
|
|
114
114
|
accessibilityHint?: string | undefined;
|
|
115
115
|
accessibilityValue?: import("react-native").AccessibilityValue | undefined;
|
|
116
116
|
onAccessibilityAction?: ((event: import("react-native").AccessibilityActionEvent) => void) | undefined;
|
|
117
|
+
accessibilityLabelledBy?: string | string[] | undefined;
|
|
117
118
|
accessibilityLiveRegion?: "none" | "polite" | "assertive" | undefined;
|
|
118
119
|
importantForAccessibility?: "auto" | "yes" | "no" | "no-hide-descendants" | undefined;
|
|
119
120
|
accessibilityElementsHidden?: boolean | undefined;
|
|
121
|
+
accessibilityLanguage?: string | undefined;
|
|
120
122
|
accessibilityViewIsModal?: boolean | undefined;
|
|
121
123
|
onAccessibilityEscape?: (() => void) | undefined;
|
|
122
124
|
onAccessibilityTap?: (() => void) | undefined;
|
|
@@ -13,7 +13,7 @@ declare const _default: React.MemoExoticComponent<{
|
|
|
13
13
|
opacity?: import("react-native-svg").NumberProp | undefined;
|
|
14
14
|
readonly height?: import("react-native-svg").NumberProp | undefined;
|
|
15
15
|
readonly width?: import("react-native-svg").NumberProp | undefined;
|
|
16
|
-
transform?: string | import("react-native-
|
|
16
|
+
transform?: string | (import("react-native").PerpectiveTransform | import("react-native").RotateTransform | import("react-native").RotateXTransform | import("react-native").RotateYTransform | import("react-native").RotateZTransform | import("react-native").ScaleTransform | import("react-native").ScaleXTransform | import("react-native").ScaleYTransform | import("react-native").TranslateXTransform | import("react-native").TranslateYTransform | import("react-native").SkewXTransform | import("react-native").SkewYTransform | import("react-native").MatrixTransform)[] | import("react-native-svg").ColumnMajorTransformMatrix | undefined;
|
|
17
17
|
rotation?: import("react-native-svg").NumberProp | undefined;
|
|
18
18
|
scaleX?: import("react-native-svg").NumberProp | undefined;
|
|
19
19
|
scaleY?: import("react-native-svg").NumberProp | undefined;
|
|
@@ -21,10 +21,13 @@ declare const _default: React.MemoExoticComponent<{
|
|
|
21
21
|
translateY?: import("react-native-svg").NumberProp | undefined;
|
|
22
22
|
readonly style?: import("@emotion/native").ReactNativeStyle | import("@emotion/native").ReactNativeStyle[] | undefined;
|
|
23
23
|
onLayout?: ((event: import("react-native").LayoutChangeEvent) => void) | undefined;
|
|
24
|
+
title?: string | undefined;
|
|
25
|
+
clipPath?: string | undefined;
|
|
26
|
+
marker?: string | undefined;
|
|
27
|
+
mask?: string | undefined;
|
|
24
28
|
scale?: import("react-native-svg").NumberArray | undefined;
|
|
25
29
|
skewX?: import("react-native-svg").NumberProp | undefined;
|
|
26
30
|
skewY?: import("react-native-svg").NumberProp | undefined;
|
|
27
|
-
title?: string | undefined;
|
|
28
31
|
readonly viewBox?: string | undefined;
|
|
29
32
|
preserveAspectRatio?: string | undefined;
|
|
30
33
|
fillOpacity?: import("react-native-svg").NumberProp | undefined;
|
|
@@ -39,7 +42,6 @@ declare const _default: React.MemoExoticComponent<{
|
|
|
39
42
|
strokeMiterlimit?: import("react-native-svg").NumberProp | undefined;
|
|
40
43
|
vectorEffect?: import("react-native-svg").VectorEffect | undefined;
|
|
41
44
|
clipRule?: import("react-native-svg").FillRule | undefined;
|
|
42
|
-
clipPath?: string | undefined;
|
|
43
45
|
translate?: import("react-native-svg").NumberArray | undefined;
|
|
44
46
|
origin?: import("react-native-svg").NumberArray | undefined;
|
|
45
47
|
originX?: import("react-native-svg").NumberProp | undefined;
|
|
@@ -69,11 +71,11 @@ declare const _default: React.MemoExoticComponent<{
|
|
|
69
71
|
delayPressOut?: number | undefined;
|
|
70
72
|
delayLongPress?: number | undefined;
|
|
71
73
|
id?: string | undefined;
|
|
72
|
-
marker?: string | undefined;
|
|
73
74
|
markerStart?: string | undefined;
|
|
74
75
|
markerMid?: string | undefined;
|
|
75
76
|
markerEnd?: string | undefined;
|
|
76
|
-
|
|
77
|
+
accessibilityLabel?: string | undefined;
|
|
78
|
+
accessible?: boolean | undefined;
|
|
77
79
|
font?: import("react-native-svg").FontObject | undefined;
|
|
78
80
|
fontStretch?: import("react-native-svg").FontStretch | undefined;
|
|
79
81
|
textAnchor?: import("react-native-svg").TextAnchor | undefined;
|
|
@@ -103,20 +105,20 @@ declare const _default: React.MemoExoticComponent<{
|
|
|
103
105
|
onTouchEnd?: ((event: import("react-native").GestureResponderEvent) => void) | undefined;
|
|
104
106
|
onTouchCancel?: ((event: import("react-native").GestureResponderEvent) => void) | undefined;
|
|
105
107
|
onTouchEndCapture?: ((event: import("react-native").GestureResponderEvent) => void) | undefined;
|
|
106
|
-
accessible?: boolean | undefined;
|
|
107
108
|
accessibilityActions?: readonly Readonly<{
|
|
108
109
|
name: string;
|
|
109
110
|
label?: string | undefined;
|
|
110
111
|
}>[] | undefined;
|
|
111
|
-
accessibilityLabel?: string | undefined;
|
|
112
112
|
accessibilityRole?: import("react-native").AccessibilityRole | undefined;
|
|
113
113
|
accessibilityState?: import("react-native").AccessibilityState | undefined;
|
|
114
114
|
accessibilityHint?: string | undefined;
|
|
115
115
|
accessibilityValue?: import("react-native").AccessibilityValue | undefined;
|
|
116
116
|
onAccessibilityAction?: ((event: import("react-native").AccessibilityActionEvent) => void) | undefined;
|
|
117
|
+
accessibilityLabelledBy?: string | string[] | undefined;
|
|
117
118
|
accessibilityLiveRegion?: "none" | "polite" | "assertive" | undefined;
|
|
118
119
|
importantForAccessibility?: "auto" | "yes" | "no" | "no-hide-descendants" | undefined;
|
|
119
120
|
accessibilityElementsHidden?: boolean | undefined;
|
|
121
|
+
accessibilityLanguage?: string | undefined;
|
|
120
122
|
accessibilityViewIsModal?: boolean | undefined;
|
|
121
123
|
onAccessibilityEscape?: (() => void) | undefined;
|
|
122
124
|
onAccessibilityTap?: (() => void) | undefined;
|
|
@@ -13,7 +13,7 @@ declare const _default: React.MemoExoticComponent<{
|
|
|
13
13
|
opacity?: import("react-native-svg").NumberProp | undefined;
|
|
14
14
|
readonly height?: import("react-native-svg").NumberProp | undefined;
|
|
15
15
|
readonly width?: import("react-native-svg").NumberProp | undefined;
|
|
16
|
-
transform?: string | import("react-native-
|
|
16
|
+
transform?: string | (import("react-native").PerpectiveTransform | import("react-native").RotateTransform | import("react-native").RotateXTransform | import("react-native").RotateYTransform | import("react-native").RotateZTransform | import("react-native").ScaleTransform | import("react-native").ScaleXTransform | import("react-native").ScaleYTransform | import("react-native").TranslateXTransform | import("react-native").TranslateYTransform | import("react-native").SkewXTransform | import("react-native").SkewYTransform | import("react-native").MatrixTransform)[] | import("react-native-svg").ColumnMajorTransformMatrix | undefined;
|
|
17
17
|
rotation?: import("react-native-svg").NumberProp | undefined;
|
|
18
18
|
scaleX?: import("react-native-svg").NumberProp | undefined;
|
|
19
19
|
scaleY?: import("react-native-svg").NumberProp | undefined;
|
|
@@ -21,10 +21,13 @@ declare const _default: React.MemoExoticComponent<{
|
|
|
21
21
|
translateY?: import("react-native-svg").NumberProp | undefined;
|
|
22
22
|
readonly style?: import("@emotion/native").ReactNativeStyle | import("@emotion/native").ReactNativeStyle[] | undefined;
|
|
23
23
|
onLayout?: ((event: import("react-native").LayoutChangeEvent) => void) | undefined;
|
|
24
|
+
title?: string | undefined;
|
|
25
|
+
clipPath?: string | undefined;
|
|
26
|
+
marker?: string | undefined;
|
|
27
|
+
mask?: string | undefined;
|
|
24
28
|
scale?: import("react-native-svg").NumberArray | undefined;
|
|
25
29
|
skewX?: import("react-native-svg").NumberProp | undefined;
|
|
26
30
|
skewY?: import("react-native-svg").NumberProp | undefined;
|
|
27
|
-
title?: string | undefined;
|
|
28
31
|
readonly viewBox?: string | undefined;
|
|
29
32
|
preserveAspectRatio?: string | undefined;
|
|
30
33
|
fillOpacity?: import("react-native-svg").NumberProp | undefined;
|
|
@@ -39,7 +42,6 @@ declare const _default: React.MemoExoticComponent<{
|
|
|
39
42
|
strokeMiterlimit?: import("react-native-svg").NumberProp | undefined;
|
|
40
43
|
vectorEffect?: import("react-native-svg").VectorEffect | undefined;
|
|
41
44
|
clipRule?: import("react-native-svg").FillRule | undefined;
|
|
42
|
-
clipPath?: string | undefined;
|
|
43
45
|
translate?: import("react-native-svg").NumberArray | undefined;
|
|
44
46
|
origin?: import("react-native-svg").NumberArray | undefined;
|
|
45
47
|
originX?: import("react-native-svg").NumberProp | undefined;
|
|
@@ -69,11 +71,11 @@ declare const _default: React.MemoExoticComponent<{
|
|
|
69
71
|
delayPressOut?: number | undefined;
|
|
70
72
|
delayLongPress?: number | undefined;
|
|
71
73
|
id?: string | undefined;
|
|
72
|
-
marker?: string | undefined;
|
|
73
74
|
markerStart?: string | undefined;
|
|
74
75
|
markerMid?: string | undefined;
|
|
75
76
|
markerEnd?: string | undefined;
|
|
76
|
-
|
|
77
|
+
accessibilityLabel?: string | undefined;
|
|
78
|
+
accessible?: boolean | undefined;
|
|
77
79
|
font?: import("react-native-svg").FontObject | undefined;
|
|
78
80
|
fontStretch?: import("react-native-svg").FontStretch | undefined;
|
|
79
81
|
textAnchor?: import("react-native-svg").TextAnchor | undefined;
|
|
@@ -103,20 +105,20 @@ declare const _default: React.MemoExoticComponent<{
|
|
|
103
105
|
onTouchEnd?: ((event: import("react-native").GestureResponderEvent) => void) | undefined;
|
|
104
106
|
onTouchCancel?: ((event: import("react-native").GestureResponderEvent) => void) | undefined;
|
|
105
107
|
onTouchEndCapture?: ((event: import("react-native").GestureResponderEvent) => void) | undefined;
|
|
106
|
-
accessible?: boolean | undefined;
|
|
107
108
|
accessibilityActions?: readonly Readonly<{
|
|
108
109
|
name: string;
|
|
109
110
|
label?: string | undefined;
|
|
110
111
|
}>[] | undefined;
|
|
111
|
-
accessibilityLabel?: string | undefined;
|
|
112
112
|
accessibilityRole?: import("react-native").AccessibilityRole | undefined;
|
|
113
113
|
accessibilityState?: import("react-native").AccessibilityState | undefined;
|
|
114
114
|
accessibilityHint?: string | undefined;
|
|
115
115
|
accessibilityValue?: import("react-native").AccessibilityValue | undefined;
|
|
116
116
|
onAccessibilityAction?: ((event: import("react-native").AccessibilityActionEvent) => void) | undefined;
|
|
117
|
+
accessibilityLabelledBy?: string | string[] | undefined;
|
|
117
118
|
accessibilityLiveRegion?: "none" | "polite" | "assertive" | undefined;
|
|
118
119
|
importantForAccessibility?: "auto" | "yes" | "no" | "no-hide-descendants" | undefined;
|
|
119
120
|
accessibilityElementsHidden?: boolean | undefined;
|
|
121
|
+
accessibilityLanguage?: string | undefined;
|
|
120
122
|
accessibilityViewIsModal?: boolean | undefined;
|
|
121
123
|
onAccessibilityEscape?: (() => void) | undefined;
|
|
122
124
|
onAccessibilityTap?: (() => void) | undefined;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { MonoStore, StoreSubscription, DispatchAction } from './types';
|
|
2
|
+
export default class MockStore<S> implements MonoStore<S> {
|
|
3
|
+
dispatch(action: DispatchAction<S>): void;
|
|
4
|
+
getState(): S;
|
|
5
|
+
removeAllListeners(): void;
|
|
6
|
+
subscribe(listener: (state: S) => void): StoreSubscription;
|
|
7
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { DispatchAction, MonoStore, StoreSubscription } from './types';
|
|
2
|
+
export default class SimpleStore<S> implements MonoStore<S> {
|
|
3
|
+
private state;
|
|
4
|
+
private listeners;
|
|
5
|
+
constructor(initialState: S);
|
|
6
|
+
dispatch(action: DispatchAction<S>): void;
|
|
7
|
+
getState(): S;
|
|
8
|
+
subscribe(listener: (state: S) => void): StoreSubscription;
|
|
9
|
+
removeAllListeners(): void;
|
|
10
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export interface StoreSubscription {
|
|
2
|
+
(): void;
|
|
3
|
+
}
|
|
4
|
+
export declare type DispatchAction<State> = State | ((prevState: State) => State);
|
|
5
|
+
export interface MonoStore<S> {
|
|
6
|
+
dispatch: (action: DispatchAction<S>) => void;
|
|
7
|
+
getState: () => S;
|
|
8
|
+
subscribe: (listener: (state: S) => void) => StoreSubscription;
|
|
9
|
+
removeAllListeners: () => void;
|
|
10
|
+
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { Animated } from 'react-native';
|
|
1
2
|
import type { FountainUiStyle } from '@fountain-ui/styles';
|
|
2
3
|
export declare type ExtendedStyle<StyleType extends FountainUiStyle = FountainUiStyle> = StyleType;
|
|
3
4
|
export declare type ComponentProps<P = {}> = BaseProps & Readonly<P>;
|
|
@@ -8,3 +9,8 @@ export interface BaseProps extends Readonly<{
|
|
|
8
9
|
}
|
|
9
10
|
export type { Theme } from '@fountain-ui/styles';
|
|
10
11
|
export declare type CommonComponentColor = 'primary' | 'secondary' | 'tertiary' | 'warning' | 'accent';
|
|
12
|
+
export interface SyncAnimatedValue {
|
|
13
|
+
animatedValue: Animated.Value;
|
|
14
|
+
initialValue: number;
|
|
15
|
+
getCurrentValue: () => number;
|
|
16
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fountain-ui/core",
|
|
3
|
-
"version": "2.0.0-beta.
|
|
3
|
+
"version": "2.0.0-beta.90",
|
|
4
4
|
"author": "Fountain-UI Team",
|
|
5
5
|
"description": "React components that implement Tappytoon's Fountain Design.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -14,18 +14,18 @@
|
|
|
14
14
|
"prepare": "bob build"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@fountain-ui/styles": "^2.0.0-beta.
|
|
18
|
-
"@fountain-ui/utils": "^2.0.0-beta.
|
|
17
|
+
"@fountain-ui/styles": "^2.0.0-beta.12",
|
|
18
|
+
"@fountain-ui/utils": "^2.0.0-beta.4"
|
|
19
19
|
},
|
|
20
20
|
"peerDependencies": {
|
|
21
21
|
"@react-native-community/slider": "^4.1.6",
|
|
22
22
|
"react": "^16.8.0 || ^17.0.0",
|
|
23
23
|
"react-dom": "^16.8.0 || ^17.0.0",
|
|
24
24
|
"react-native": "^0.63.0",
|
|
25
|
-
"react-native-fast-image": "
|
|
25
|
+
"react-native-fast-image": "8.6.3",
|
|
26
26
|
"react-native-reanimated": "^2.0.0",
|
|
27
|
-
"react-native-safe-area-context": "^
|
|
28
|
-
"react-native-svg": "^
|
|
27
|
+
"react-native-safe-area-context": "^4.0.0",
|
|
28
|
+
"react-native-svg": "^13.14.0"
|
|
29
29
|
},
|
|
30
30
|
"peerDependenciesMeta": {
|
|
31
31
|
"@react-native-community/slider": {
|
|
@@ -42,8 +42,8 @@
|
|
|
42
42
|
}
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"react-native-reanimated": "^2.
|
|
46
|
-
"react-native-svg": "^
|
|
45
|
+
"react-native-reanimated": "^2.17.0",
|
|
46
|
+
"react-native-svg": "^13.14.0"
|
|
47
47
|
},
|
|
48
48
|
"react-native-builder-bob": {
|
|
49
49
|
"source": "./src",
|
|
@@ -67,5 +67,5 @@
|
|
|
67
67
|
"publishConfig": {
|
|
68
68
|
"access": "public"
|
|
69
69
|
},
|
|
70
|
-
"gitHead": "
|
|
70
|
+
"gitHead": "365f287c04429ca14768c328384f4dbd24d26b4e"
|
|
71
71
|
}
|
|
@@ -1,94 +1,190 @@
|
|
|
1
|
-
import React, { useState } from 'react';
|
|
2
|
-
import
|
|
1
|
+
import React, { useEffect, useRef, useState } from 'react';
|
|
2
|
+
import { LayoutChangeEvent, View } from 'react-native';
|
|
3
|
+
import Animated, {
|
|
4
|
+
useAnimatedStyle,
|
|
5
|
+
useSharedValue,
|
|
6
|
+
withDelay,
|
|
7
|
+
withTiming,
|
|
8
|
+
WithTimingConfig,
|
|
9
|
+
} from 'react-native-reanimated';
|
|
3
10
|
import { NamedStylesStringUnion, UseStyles } from '@fountain-ui/styles';
|
|
4
|
-
import {
|
|
11
|
+
import { useTheme } from '../styles';
|
|
12
|
+
import { ChevronDown } from '../internal/icons';
|
|
5
13
|
import ButtonBase from '../ButtonBase';
|
|
6
14
|
import Column from '../Column';
|
|
7
|
-
import
|
|
15
|
+
import Row from '../Row';
|
|
8
16
|
import Spacer from '../Spacer';
|
|
9
17
|
import Typography from '../Typography';
|
|
10
|
-
import { useTheme } from '../styles';
|
|
11
18
|
|
|
12
19
|
import AccordionProps from './AccordionProps';
|
|
13
20
|
|
|
14
|
-
type AccordionStyles = NamedStylesStringUnion<
|
|
21
|
+
type AccordionStyles = NamedStylesStringUnion<
|
|
22
|
+
'root'
|
|
23
|
+
| 'title'
|
|
24
|
+
| 'titleColumn'
|
|
25
|
+
| 'subtitle'
|
|
26
|
+
| 'contentView'
|
|
27
|
+
>;
|
|
15
28
|
|
|
16
|
-
const
|
|
29
|
+
const ROTATE_HIDE_DEGREE = 0;
|
|
30
|
+
const ROTATE_SHOW_DEGREE = 180;
|
|
31
|
+
const ANIMATION_CONFIG: Readonly<WithTimingConfig> = { duration: 200 };
|
|
32
|
+
const INITIAL_EXPANDED_DELAY_MILLIS = 100;
|
|
33
|
+
const CONTENT_OPACITY_DELAY_MILLIS = 200;
|
|
17
34
|
|
|
18
35
|
const useStyles: UseStyles<AccordionStyles> = function (): AccordionStyles {
|
|
19
36
|
const theme = useTheme();
|
|
20
37
|
|
|
21
38
|
return {
|
|
22
|
-
root: {
|
|
23
|
-
|
|
24
|
-
|
|
39
|
+
root: { marginBottom: theme.spacing(3) },
|
|
40
|
+
title: {
|
|
41
|
+
borderRadius: theme.spacing(4),
|
|
42
|
+
backgroundColor: theme.palette.paper.grey,
|
|
43
|
+
paddingHorizontal: theme.spacing(4),
|
|
44
|
+
paddingVertical: theme.spacing(3.5),
|
|
45
|
+
alignItems: 'center',
|
|
46
|
+
height: 64,
|
|
47
|
+
},
|
|
48
|
+
titleColumn: { flexShrink: 1 },
|
|
49
|
+
subtitle: {
|
|
50
|
+
fontSize: 11,
|
|
51
|
+
lineHeight: 12,
|
|
52
|
+
fontFamily: 'Inter-Regular',
|
|
53
|
+
},
|
|
54
|
+
contentView: {
|
|
55
|
+
position: 'absolute',
|
|
56
|
+
width: '100%',
|
|
57
|
+
borderRadius: theme.spacing(4),
|
|
58
|
+
backgroundColor: theme.palette.paper.grey,
|
|
59
|
+
paddingHorizontal: theme.spacing(4),
|
|
60
|
+
paddingVertical: theme.spacing(6),
|
|
61
|
+
marginTop: theme.spacing(1),
|
|
25
62
|
},
|
|
26
63
|
};
|
|
27
64
|
};
|
|
28
65
|
|
|
29
66
|
export default function Accordion(props: AccordionProps) {
|
|
30
67
|
const {
|
|
68
|
+
title,
|
|
69
|
+
subTitle,
|
|
31
70
|
content,
|
|
32
|
-
LeftIcon,
|
|
33
71
|
RightIcon,
|
|
34
|
-
|
|
35
|
-
|
|
72
|
+
LeftComponent,
|
|
73
|
+
isInitialExpanded = false,
|
|
36
74
|
} = props;
|
|
37
75
|
|
|
38
76
|
const styles = useStyles();
|
|
77
|
+
const theme = useTheme();
|
|
78
|
+
const CONTENT_MARGIN_HEIGHT = theme.spacing(2);
|
|
39
79
|
|
|
40
80
|
const [isExpanded, setIsExpanded] = useState(false);
|
|
41
|
-
const
|
|
81
|
+
const shouldInitialExpandedRef = useRef<boolean>(isInitialExpanded);
|
|
82
|
+
|
|
83
|
+
const rotate = useSharedValue(ROTATE_HIDE_DEGREE);
|
|
84
|
+
const animatedOpacity = useSharedValue(0);
|
|
85
|
+
|
|
86
|
+
const animatedHeight = useSharedValue(0);
|
|
87
|
+
const [contentHeight, setContentHeight] = useState(0);
|
|
42
88
|
|
|
43
89
|
const animatedChevronDownStyles = useAnimatedStyle(() => ({
|
|
44
90
|
transform: [{ rotate: `${rotate.value}deg` }],
|
|
45
|
-
}));
|
|
91
|
+
}), []);
|
|
92
|
+
|
|
93
|
+
const animatedContentBackgroundStyles = useAnimatedStyle(() => ({
|
|
94
|
+
height: animatedHeight.value,
|
|
95
|
+
overflow: 'hidden',
|
|
96
|
+
}), []);
|
|
97
|
+
|
|
98
|
+
const animatedContentStyle = useAnimatedStyle(() => ({
|
|
99
|
+
opacity: animatedOpacity.value,
|
|
100
|
+
}), []);
|
|
46
101
|
|
|
47
102
|
const onPress = () => {
|
|
48
103
|
setIsExpanded(prev => !prev);
|
|
49
|
-
rotate.value = withTiming(!isExpanded ? 180 : 0, ANIMATION_OPTION);
|
|
50
104
|
};
|
|
51
105
|
|
|
106
|
+
const onLayout = (event: LayoutChangeEvent) => {
|
|
107
|
+
const height = event.nativeEvent.layout.height + CONTENT_MARGIN_HEIGHT;
|
|
108
|
+
setContentHeight(height);
|
|
109
|
+
|
|
110
|
+
if (shouldInitialExpandedRef.current) {
|
|
111
|
+
shouldInitialExpandedRef.current = false;
|
|
112
|
+
setTimeout(() => setIsExpanded(true), INITIAL_EXPANDED_DELAY_MILLIS);
|
|
113
|
+
}
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
useEffect(() => {
|
|
117
|
+
rotate.value = withTiming(isExpanded ? ROTATE_SHOW_DEGREE : ROTATE_HIDE_DEGREE, ANIMATION_CONFIG);
|
|
118
|
+
|
|
119
|
+
animatedHeight.value = withTiming(isExpanded ? contentHeight : 0, ANIMATION_CONFIG);
|
|
120
|
+
|
|
121
|
+
animatedOpacity.value = isExpanded
|
|
122
|
+
? withDelay(CONTENT_OPACITY_DELAY_MILLIS, withTiming(1, ANIMATION_CONFIG))
|
|
123
|
+
: withTiming(0, ANIMATION_CONFIG);
|
|
124
|
+
}, [isExpanded, contentHeight]);
|
|
125
|
+
|
|
52
126
|
return (
|
|
53
|
-
<Column>
|
|
54
|
-
<ButtonBase
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
127
|
+
<Column style={styles.root}>
|
|
128
|
+
<ButtonBase onPress={onPress}>
|
|
129
|
+
<Row style={styles.title}>
|
|
130
|
+
{LeftComponent ? LeftComponent : null}
|
|
131
|
+
|
|
132
|
+
<Column style={styles.titleColumn}>
|
|
133
|
+
<Typography
|
|
134
|
+
variant={'subtitle2'}
|
|
135
|
+
children={title}
|
|
136
|
+
color={'textPrimary'}
|
|
137
|
+
numberOfLines={1}
|
|
138
|
+
disableFontScaling={true}
|
|
139
|
+
/>
|
|
140
|
+
|
|
141
|
+
{subTitle ? (
|
|
142
|
+
<React.Fragment>
|
|
143
|
+
<Spacer size={0.5}/>
|
|
144
|
+
|
|
145
|
+
<Typography
|
|
146
|
+
style={styles.subtitle}
|
|
147
|
+
color={'tertiary'}
|
|
148
|
+
children={subTitle}
|
|
149
|
+
numberOfLines={1}
|
|
150
|
+
disableFontScaling={true}
|
|
151
|
+
/>
|
|
152
|
+
</React.Fragment>
|
|
153
|
+
) : null}
|
|
154
|
+
</Column>
|
|
155
|
+
|
|
156
|
+
<Spacer flex={1}/>
|
|
157
|
+
|
|
158
|
+
<Spacer size={3}/>
|
|
159
|
+
|
|
75
160
|
<Animated.View style={animatedChevronDownStyles}>
|
|
76
|
-
{RightIcon ? RightIcon :
|
|
161
|
+
{RightIcon ? RightIcon : (
|
|
162
|
+
<ChevronDown
|
|
163
|
+
width={20}
|
|
164
|
+
height={20}
|
|
165
|
+
color={'tertiary'}
|
|
166
|
+
/>
|
|
167
|
+
)}
|
|
77
168
|
</Animated.View>
|
|
78
|
-
</
|
|
169
|
+
</Row>
|
|
79
170
|
</ButtonBase>
|
|
80
171
|
|
|
81
|
-
{
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
172
|
+
<Animated.View style={animatedContentBackgroundStyles}>
|
|
173
|
+
<View
|
|
174
|
+
onLayout={onLayout}
|
|
175
|
+
style={styles.contentView}
|
|
176
|
+
>
|
|
177
|
+
<Animated.View style={animatedContentStyle}>
|
|
178
|
+
{typeof content === 'string' ? (
|
|
179
|
+
<Typography
|
|
180
|
+
variant={'subtitle2'}
|
|
181
|
+
color={'tertiary'}
|
|
182
|
+
children={content}
|
|
183
|
+
/>
|
|
184
|
+
) : (content)}
|
|
185
|
+
</Animated.View>
|
|
186
|
+
</View>
|
|
187
|
+
</Animated.View>
|
|
92
188
|
</Column>
|
|
93
189
|
);
|
|
94
190
|
}
|