@fountain-ui/core 3.0.0-alpha.5 → 3.0.0-alpha.50
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/build/commonjs/Accordion/Accordion.js +20 -13
- package/build/commonjs/Accordion/Accordion.js.map +1 -1
- package/build/commonjs/Accordion/AccordionProps.js.map +1 -1
- package/build/commonjs/Accordion/useVariantStyleMap.js +13 -6
- package/build/commonjs/Accordion/useVariantStyleMap.js.map +1 -1
- package/build/commonjs/AppBar/AppBar.js +1 -1
- package/build/commonjs/AppBar/AppBar.js.map +1 -1
- package/build/commonjs/AspectRatio/AspectRatioNative.js +1 -1
- package/build/commonjs/AspectRatio/AspectRatioNative.js.map +1 -1
- package/build/commonjs/AspectRatio/AspectRatioWeb.js +1 -1
- package/build/commonjs/AspectRatio/AspectRatioWeb.js.map +1 -1
- package/build/commonjs/Badge/Badge.js +4 -3
- package/build/commonjs/Badge/Badge.js.map +1 -1
- package/build/commonjs/Badge/BadgeProps.js.map +1 -1
- package/build/commonjs/BottomSheetTitle/BottomSheetTitle.js +7 -3
- package/build/commonjs/BottomSheetTitle/BottomSheetTitle.js.map +1 -1
- package/build/commonjs/BottomSheetTitle/BottomSheetTitleProps.js.map +1 -1
- package/build/commonjs/Button/Button.js +26 -12
- package/build/commonjs/Button/Button.js.map +1 -1
- package/build/commonjs/Button/ButtonProps.js.map +1 -1
- package/build/commonjs/Button/useVariantStyleMap.js +18 -0
- package/build/commonjs/Button/useVariantStyleMap.js.map +1 -1
- package/build/commonjs/ButtonBase/ButtonBase.js +1 -1
- package/build/commonjs/ButtonBase/ButtonBase.js.map +1 -1
- package/build/commonjs/ButtonBase/index.js +2 -2
- package/build/commonjs/ButtonBase/index.js.map +1 -1
- package/build/commonjs/Checkbox/Checkbox.js +4 -1
- package/build/commonjs/Checkbox/Checkbox.js.map +1 -1
- package/build/commonjs/Checkbox/useVariantStyleMap.js +6 -2
- package/build/commonjs/Checkbox/useVariantStyleMap.js.map +1 -1
- package/build/commonjs/Chip/Chip.js +27 -14
- package/build/commonjs/Chip/Chip.js.map +1 -1
- package/build/commonjs/Chip/ChipProps.js +5 -1
- package/build/commonjs/Chip/ChipProps.js.map +1 -1
- package/build/commonjs/Chip/index.js +12 -0
- package/build/commonjs/Chip/index.js.map +1 -1
- package/build/commonjs/Chip/useChipStyle.js +59 -32
- package/build/commonjs/Chip/useChipStyle.js.map +1 -1
- package/build/commonjs/Dialog/Dialog.js +11 -12
- package/build/commonjs/Dialog/Dialog.js.map +1 -1
- package/build/commonjs/Dialog/DialogProps.js +1 -1
- package/build/commonjs/Dialog/DialogProps.js.map +1 -1
- package/build/commonjs/Dialog/useDialogSectionStyle.js +6 -4
- package/build/commonjs/Dialog/useDialogSectionStyle.js.map +1 -1
- package/build/commonjs/Dialog/useDialogStyle.js +19 -8
- package/build/commonjs/Dialog/useDialogStyle.js.map +1 -1
- package/build/commonjs/DialogActions/DialogActions.js +0 -1
- package/build/commonjs/DialogActions/DialogActions.js.map +1 -1
- package/build/commonjs/DialogTitle/DialogLargeTitle.js +80 -0
- package/build/commonjs/DialogTitle/DialogLargeTitle.js.map +1 -0
- package/build/commonjs/DialogTitle/DialogTitle.js +8 -4
- package/build/commonjs/DialogTitle/DialogTitle.js.map +1 -1
- package/build/commonjs/Divider/Divider.js +17 -9
- package/build/commonjs/Divider/Divider.js.map +1 -1
- package/build/commonjs/Divider/DividerProps.js +1 -1
- package/build/commonjs/Divider/DividerProps.js.map +1 -1
- package/build/commonjs/Empty/Empty.js +1 -1
- package/build/commonjs/Empty/Empty.js.map +1 -1
- package/build/commonjs/Flexbox/Flexbox.js +2 -0
- package/build/commonjs/Flexbox/Flexbox.js.map +1 -1
- package/build/commonjs/Flexbox/FlexboxProps.js.map +1 -1
- package/build/commonjs/IconButton/IconButton.js +3 -0
- package/build/commonjs/IconButton/IconButton.js.map +1 -1
- package/build/commonjs/IconButton/IconButtonProps.js +1 -1
- package/build/commonjs/IconButton/IconButtonProps.js.map +1 -1
- package/build/commonjs/Image/Image.js +13 -4
- package/build/commonjs/Image/Image.js.map +1 -1
- package/build/commonjs/Image/ImageProps.js.map +1 -1
- package/build/commonjs/Image/OverlayCloseButton/OverlayCloseButton.js +46 -0
- package/build/commonjs/Image/OverlayCloseButton/OverlayCloseButton.js.map +1 -0
- package/build/commonjs/Image/OverlayCloseButton/OverlayCloseButtonProps.js +2 -0
- package/build/commonjs/Image/OverlayCloseButton/OverlayCloseButtonProps.js.map +1 -0
- package/build/commonjs/Image/OverlayCloseButton/index.js +16 -0
- package/build/commonjs/Image/OverlayCloseButton/index.js.map +1 -0
- package/build/commonjs/Image/preload.js +10 -0
- package/build/commonjs/Image/preload.js.map +1 -0
- package/build/commonjs/Image/preload.native.js +22 -0
- package/build/commonjs/Image/preload.native.js.map +1 -0
- package/build/commonjs/ImageCore/ImageCoreNative.js +13 -10
- package/build/commonjs/ImageCore/ImageCoreNative.js.map +1 -1
- package/build/commonjs/ImageCore/ImageCoreProps.js.map +1 -1
- package/build/commonjs/ListItem/ListItem.js +5 -15
- package/build/commonjs/ListItem/ListItem.js.map +1 -1
- package/build/commonjs/ListItemText/ListItemText.js +2 -2
- package/build/commonjs/ListItemText/ListItemText.js.map +1 -1
- package/build/commonjs/ListSubheader/ListSubheader.js +1 -1
- package/build/commonjs/ListSubheader/ListSubheader.js.map +1 -1
- package/build/commonjs/Modal/Modal.js +29 -20
- package/build/commonjs/Modal/Modal.js.map +1 -1
- package/build/commonjs/Modal/ModalProps.js.map +1 -1
- package/build/commonjs/Pagination/NumberPagination.js +4 -2
- package/build/commonjs/Pagination/NumberPagination.js.map +1 -1
- package/build/commonjs/Pagination/Pagination.js +2 -0
- package/build/commonjs/Pagination/Pagination.js.map +1 -1
- package/build/commonjs/Pagination/PaginationProps.js +3 -1
- package/build/commonjs/Pagination/PaginationProps.js.map +1 -1
- package/build/commonjs/Pagination/index.js +6 -0
- package/build/commonjs/Pagination/index.js.map +1 -1
- package/build/commonjs/PaginationItem/PaginationItem.js +32 -22
- package/build/commonjs/PaginationItem/PaginationItem.js.map +1 -1
- package/build/commonjs/PaginationItem/PaginationItemProps.js.map +1 -1
- package/build/commonjs/Radio/Radio.js +31 -8
- package/build/commonjs/Radio/Radio.js.map +1 -1
- package/build/commonjs/Radio/RadioProps.js.map +1 -1
- package/build/commonjs/RadioGroup/RadioGroup.js +2 -27
- package/build/commonjs/RadioGroup/RadioGroup.js.map +1 -1
- package/build/commonjs/ShadowView/ShadowView.native.js +1 -1
- package/build/commonjs/ShadowView/ShadowView.native.js.map +1 -1
- package/build/commonjs/Slider/Slider.js +22 -18
- package/build/commonjs/Slider/Slider.js.map +1 -1
- package/build/commonjs/SnackbarContent/SnackbarContent.js +24 -7
- package/build/commonjs/SnackbarContent/SnackbarContent.js.map +1 -1
- package/build/commonjs/Tab/Tab.js +21 -19
- package/build/commonjs/Tab/Tab.js.map +1 -1
- package/build/commonjs/Tab/TabProps.js +4 -2
- package/build/commonjs/Tab/TabProps.js.map +1 -1
- package/build/commonjs/Tab/index.js +14 -0
- package/build/commonjs/Tab/index.js.map +1 -1
- package/build/commonjs/Tab/useVariantStyleMap.js +57 -16
- package/build/commonjs/Tab/useVariantStyleMap.js.map +1 -1
- package/build/commonjs/TabBase/TabBase.js +1 -8
- package/build/commonjs/TabBase/TabBase.js.map +1 -1
- package/build/commonjs/TabBase/TabBaseProps.js.map +1 -1
- package/build/commonjs/Tabs/Tabs.js +32 -11
- 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/useTabsStyle.js +81 -0
- package/build/commonjs/Tabs/useTabsStyle.js.map +1 -0
- package/build/commonjs/TextField/TextField.js +99 -17
- package/build/commonjs/TextField/TextField.js.map +1 -1
- package/build/commonjs/TextField/TextFieldProps.js +3 -1
- package/build/commonjs/TextField/TextFieldProps.js.map +1 -1
- package/build/commonjs/TextField/useVariantStyleMap.js +50 -30
- package/build/commonjs/TextField/useVariantStyleMap.js.map +1 -1
- package/build/commonjs/Toolbar/BackButton/BackButton.js +47 -0
- package/build/commonjs/Toolbar/BackButton/BackButton.js.map +1 -0
- package/build/commonjs/Toolbar/BackButton/BackButtonProps.js +2 -0
- package/build/commonjs/Toolbar/BackButton/BackButtonProps.js.map +1 -0
- package/build/commonjs/Toolbar/BackButton/index.js +16 -0
- package/build/commonjs/Toolbar/BackButton/index.js.map +1 -0
- package/build/commonjs/Toolbar/Toolbar.js +22 -12
- package/build/commonjs/Toolbar/Toolbar.js.map +1 -1
- package/build/commonjs/Toolbar/ToolbarProps.js.map +1 -1
- package/build/commonjs/Tooltip/Beaks/index.js +32 -0
- package/build/commonjs/Tooltip/Beaks/index.js.map +1 -1
- package/build/commonjs/Tooltip/Tooltip.js +23 -23
- package/build/commonjs/Tooltip/Tooltip.js.map +1 -1
- package/build/commonjs/Tooltip/TooltipProps.js.map +1 -1
- package/build/commonjs/Tooltip/index.js +19 -0
- package/build/commonjs/Tooltip/index.js.map +1 -1
- package/build/commonjs/Typography/Typography.js +9 -2
- package/build/commonjs/Typography/Typography.js.map +1 -1
- package/build/commonjs/Typography/TypographyProps.js.map +1 -1
- package/build/commonjs/hooks/useCollapsibleAppBar.js +21 -13
- package/build/commonjs/hooks/useCollapsibleAppBar.js.map +1 -1
- package/build/commonjs/hooks/useContentContainerStyle.js +35 -17
- package/build/commonjs/hooks/useContentContainerStyle.js.map +1 -1
- package/build/commonjs/hooks/useFadeInAppBar.js +4 -4
- package/build/commonjs/hooks/useFadeInAppBar.js.map +1 -1
- package/build/commonjs/internal/icons/AppBarChevronLeft.js +23 -0
- package/build/commonjs/internal/icons/AppBarChevronLeft.js.map +1 -0
- package/build/commonjs/internal/icons/ChevronLeft.js +4 -2
- package/build/commonjs/internal/icons/ChevronLeft.js.map +1 -1
- package/build/commonjs/internal/icons/ChevronRight.js +4 -2
- package/build/commonjs/internal/icons/ChevronRight.js.map +1 -1
- package/build/commonjs/internal/icons/ChipClose.js +23 -0
- package/build/commonjs/internal/icons/ChipClose.js.map +1 -0
- package/build/commonjs/internal/icons/Clear.js +3 -3
- package/build/commonjs/internal/icons/Clear.js.map +1 -1
- package/build/commonjs/internal/icons/Close.js +4 -2
- package/build/commonjs/internal/icons/Close.js.map +1 -1
- package/build/commonjs/internal/icons/CloseCircleFillPierced.js +23 -0
- package/build/commonjs/internal/icons/CloseCircleFillPierced.js.map +1 -0
- package/build/commonjs/internal/icons/Search.js +2 -2
- package/build/commonjs/internal/icons/Search.js.map +1 -1
- package/build/commonjs/internal/icons/index.js +24 -0
- package/build/commonjs/internal/icons/index.js.map +1 -1
- package/build/module/Accordion/Accordion.js +20 -13
- package/build/module/Accordion/Accordion.js.map +1 -1
- package/build/module/Accordion/AccordionProps.js.map +1 -1
- package/build/module/Accordion/useVariantStyleMap.js +13 -6
- package/build/module/Accordion/useVariantStyleMap.js.map +1 -1
- package/build/module/AppBar/AppBar.js +1 -1
- package/build/module/AppBar/AppBar.js.map +1 -1
- package/build/module/AspectRatio/AspectRatioNative.js +1 -1
- package/build/module/AspectRatio/AspectRatioNative.js.map +1 -1
- package/build/module/AspectRatio/AspectRatioWeb.js +1 -1
- package/build/module/AspectRatio/AspectRatioWeb.js.map +1 -1
- package/build/module/Badge/Badge.js +4 -3
- package/build/module/Badge/Badge.js.map +1 -1
- package/build/module/Badge/BadgeProps.js.map +1 -1
- package/build/module/BottomSheetTitle/BottomSheetTitle.js +7 -3
- package/build/module/BottomSheetTitle/BottomSheetTitle.js.map +1 -1
- package/build/module/BottomSheetTitle/BottomSheetTitleProps.js.map +1 -1
- package/build/module/Button/Button.js +27 -13
- package/build/module/Button/Button.js.map +1 -1
- package/build/module/Button/ButtonProps.js.map +1 -1
- package/build/module/Button/useVariantStyleMap.js +18 -0
- package/build/module/Button/useVariantStyleMap.js.map +1 -1
- package/build/module/ButtonBase/ButtonBase.js +1 -1
- package/build/module/ButtonBase/ButtonBase.js.map +1 -1
- package/build/module/ButtonBase/index.js +1 -1
- package/build/module/ButtonBase/index.js.map +1 -1
- package/build/module/Checkbox/Checkbox.js +4 -1
- package/build/module/Checkbox/Checkbox.js.map +1 -1
- package/build/module/Checkbox/useVariantStyleMap.js +6 -2
- package/build/module/Checkbox/useVariantStyleMap.js.map +1 -1
- package/build/module/Chip/Chip.js +23 -13
- package/build/module/Chip/Chip.js.map +1 -1
- package/build/module/Chip/ChipProps.js +2 -0
- package/build/module/Chip/ChipProps.js.map +1 -1
- package/build/module/Chip/index.js +1 -1
- package/build/module/Chip/index.js.map +1 -1
- package/build/module/Chip/useChipStyle.js +59 -32
- package/build/module/Chip/useChipStyle.js.map +1 -1
- package/build/module/Dialog/Dialog.js +11 -11
- package/build/module/Dialog/Dialog.js.map +1 -1
- package/build/module/Dialog/DialogProps.js +1 -1
- package/build/module/Dialog/DialogProps.js.map +1 -1
- package/build/module/Dialog/useDialogSectionStyle.js +6 -4
- package/build/module/Dialog/useDialogSectionStyle.js.map +1 -1
- package/build/module/Dialog/useDialogStyle.js +18 -8
- package/build/module/Dialog/useDialogStyle.js.map +1 -1
- package/build/module/DialogActions/DialogActions.js +0 -1
- package/build/module/DialogActions/DialogActions.js.map +1 -1
- package/build/module/DialogTitle/DialogLargeTitle.js +65 -0
- package/build/module/DialogTitle/DialogLargeTitle.js.map +1 -0
- package/build/module/DialogTitle/DialogTitle.js +6 -3
- package/build/module/DialogTitle/DialogTitle.js.map +1 -1
- package/build/module/Divider/Divider.js +7 -0
- package/build/module/Divider/Divider.js.map +1 -1
- package/build/module/Divider/DividerProps.js +1 -1
- package/build/module/Divider/DividerProps.js.map +1 -1
- package/build/module/Empty/Empty.js +1 -1
- package/build/module/Empty/Empty.js.map +1 -1
- package/build/module/Flexbox/Flexbox.js +2 -0
- package/build/module/Flexbox/Flexbox.js.map +1 -1
- package/build/module/Flexbox/FlexboxProps.js.map +1 -1
- package/build/module/IconButton/IconButton.js +3 -0
- package/build/module/IconButton/IconButton.js.map +1 -1
- package/build/module/IconButton/IconButtonProps.js +1 -1
- package/build/module/IconButton/IconButtonProps.js.map +1 -1
- package/build/module/Image/Image.js +11 -4
- package/build/module/Image/Image.js.map +1 -1
- package/build/module/Image/ImageProps.js.map +1 -1
- package/build/module/Image/OverlayCloseButton/OverlayCloseButton.js +31 -0
- package/build/module/Image/OverlayCloseButton/OverlayCloseButton.js.map +1 -0
- package/build/module/Image/OverlayCloseButton/OverlayCloseButtonProps.js +2 -0
- package/build/module/Image/OverlayCloseButton/OverlayCloseButtonProps.js.map +1 -0
- package/build/module/Image/OverlayCloseButton/index.js +2 -0
- package/build/module/Image/OverlayCloseButton/index.js.map +1 -0
- package/build/module/Image/preload.js +3 -0
- package/build/module/Image/preload.js.map +1 -0
- package/build/module/Image/preload.native.js +12 -0
- package/build/module/Image/preload.native.js.map +1 -0
- package/build/module/ImageCore/ImageCoreNative.js +14 -10
- package/build/module/ImageCore/ImageCoreNative.js.map +1 -1
- package/build/module/ImageCore/ImageCoreProps.js.map +1 -1
- package/build/module/ListItem/ListItem.js +5 -15
- package/build/module/ListItem/ListItem.js.map +1 -1
- package/build/module/ListItemText/ListItemText.js +2 -2
- package/build/module/ListItemText/ListItemText.js.map +1 -1
- package/build/module/ListSubheader/ListSubheader.js +1 -1
- package/build/module/ListSubheader/ListSubheader.js.map +1 -1
- package/build/module/Modal/Modal.js +30 -21
- package/build/module/Modal/Modal.js.map +1 -1
- package/build/module/Modal/ModalProps.js.map +1 -1
- package/build/module/Pagination/NumberPagination.js +4 -2
- package/build/module/Pagination/NumberPagination.js.map +1 -1
- package/build/module/Pagination/Pagination.js +2 -0
- package/build/module/Pagination/Pagination.js.map +1 -1
- package/build/module/Pagination/PaginationProps.js +1 -0
- package/build/module/Pagination/PaginationProps.js.map +1 -1
- package/build/module/Pagination/index.js +1 -1
- package/build/module/Pagination/index.js.map +1 -1
- package/build/module/PaginationItem/PaginationItem.js +28 -21
- package/build/module/PaginationItem/PaginationItem.js.map +1 -1
- package/build/module/PaginationItem/PaginationItemProps.js.map +1 -1
- package/build/module/Radio/Radio.js +28 -8
- package/build/module/Radio/Radio.js.map +1 -1
- package/build/module/Radio/RadioProps.js.map +1 -1
- package/build/module/RadioGroup/RadioGroup.js +2 -20
- package/build/module/RadioGroup/RadioGroup.js.map +1 -1
- package/build/module/ShadowView/ShadowView.native.js +2 -2
- package/build/module/ShadowView/ShadowView.native.js.map +1 -1
- package/build/module/Slider/Slider.js +22 -18
- package/build/module/Slider/Slider.js.map +1 -1
- package/build/module/SnackbarContent/SnackbarContent.js +24 -7
- package/build/module/SnackbarContent/SnackbarContent.js.map +1 -1
- package/build/module/Tab/Tab.js +22 -19
- package/build/module/Tab/Tab.js.map +1 -1
- package/build/module/Tab/TabProps.js +2 -1
- package/build/module/Tab/TabProps.js.map +1 -1
- package/build/module/Tab/index.js +1 -0
- package/build/module/Tab/index.js.map +1 -1
- package/build/module/Tab/useVariantStyleMap.js +57 -16
- package/build/module/Tab/useVariantStyleMap.js.map +1 -1
- package/build/module/TabBase/TabBase.js +1 -8
- package/build/module/TabBase/TabBase.js.map +1 -1
- package/build/module/TabBase/TabBaseProps.js.map +1 -1
- package/build/module/Tabs/Tabs.js +31 -12
- 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/useTabsStyle.js +71 -0
- package/build/module/Tabs/useTabsStyle.js.map +1 -0
- package/build/module/TextField/TextField.js +99 -18
- package/build/module/TextField/TextField.js.map +1 -1
- package/build/module/TextField/TextFieldProps.js +1 -0
- package/build/module/TextField/TextFieldProps.js.map +1 -1
- package/build/module/TextField/useVariantStyleMap.js +49 -30
- package/build/module/TextField/useVariantStyleMap.js.map +1 -1
- package/build/module/Toolbar/BackButton/BackButton.js +32 -0
- package/build/module/Toolbar/BackButton/BackButton.js.map +1 -0
- package/build/module/Toolbar/BackButton/BackButtonProps.js +2 -0
- package/build/module/Toolbar/BackButton/BackButtonProps.js.map +1 -0
- package/build/module/Toolbar/BackButton/index.js +2 -0
- package/build/module/Toolbar/BackButton/index.js.map +1 -0
- package/build/module/Toolbar/Toolbar.js +20 -12
- package/build/module/Toolbar/Toolbar.js.map +1 -1
- package/build/module/Toolbar/ToolbarProps.js.map +1 -1
- package/build/module/Tooltip/Beaks/index.js +4 -0
- package/build/module/Tooltip/Beaks/index.js.map +1 -1
- package/build/module/Tooltip/Tooltip.js +17 -16
- package/build/module/Tooltip/Tooltip.js.map +1 -1
- package/build/module/Tooltip/TooltipProps.js.map +1 -1
- package/build/module/Tooltip/index.js +1 -0
- package/build/module/Tooltip/index.js.map +1 -1
- package/build/module/Typography/Typography.js +9 -2
- package/build/module/Typography/Typography.js.map +1 -1
- package/build/module/Typography/TypographyProps.js.map +1 -1
- package/build/module/hooks/useCollapsibleAppBar.js +22 -13
- package/build/module/hooks/useCollapsibleAppBar.js.map +1 -1
- package/build/module/hooks/useContentContainerStyle.js +32 -13
- package/build/module/hooks/useContentContainerStyle.js.map +1 -1
- package/build/module/hooks/useFadeInAppBar.js +4 -4
- package/build/module/hooks/useFadeInAppBar.js.map +1 -1
- package/build/module/internal/icons/AppBarChevronLeft.js +9 -0
- package/build/module/internal/icons/AppBarChevronLeft.js.map +1 -0
- package/build/module/internal/icons/ChevronLeft.js +4 -2
- package/build/module/internal/icons/ChevronLeft.js.map +1 -1
- package/build/module/internal/icons/ChevronRight.js +4 -2
- package/build/module/internal/icons/ChevronRight.js.map +1 -1
- package/build/module/internal/icons/ChipClose.js +9 -0
- package/build/module/internal/icons/ChipClose.js.map +1 -0
- package/build/module/internal/icons/Clear.js +3 -3
- package/build/module/internal/icons/Clear.js.map +1 -1
- package/build/module/internal/icons/Close.js +4 -2
- package/build/module/internal/icons/Close.js.map +1 -1
- package/build/module/internal/icons/CloseCircleFillPierced.js +9 -0
- package/build/module/internal/icons/CloseCircleFillPierced.js.map +1 -0
- package/build/module/internal/icons/Search.js +2 -2
- package/build/module/internal/icons/Search.js.map +1 -1
- package/build/module/internal/icons/index.js +3 -0
- package/build/module/internal/icons/index.js.map +1 -1
- package/build/typescript/Accordion/Accordion.d.ts +0 -1
- package/build/typescript/Accordion/AccordionProps.d.ts +4 -1
- package/build/typescript/Accordion/useVariantStyleMap.d.ts +1 -0
- package/build/typescript/AspectRatio/AspectRatioNative.d.ts +0 -1
- package/build/typescript/AspectRatio/AspectRatioWeb.d.ts +0 -1
- package/build/typescript/Avatar/Avatar.d.ts +0 -1
- package/build/typescript/Badge/Badge.d.ts +0 -1
- package/build/typescript/Badge/BadgeProps.d.ts +10 -5
- package/build/typescript/BottomSheetActions/BottomSheetActions.d.ts +0 -1
- package/build/typescript/BottomSheetContent/BottomSheetContent.d.ts +0 -1
- package/build/typescript/BottomSheetTitle/BottomSheetTitle.d.ts +0 -1
- package/build/typescript/BottomSheetTitle/BottomSheetTitleProps.d.ts +3 -3
- package/build/typescript/Button/Button.d.ts +0 -1
- package/build/typescript/Button/ButtonProps.d.ts +5 -0
- package/build/typescript/ButtonBase/ButtonBase.d.ts +0 -1
- package/build/typescript/ButtonBase/index.d.ts +1 -1
- package/build/typescript/ButtonSet/ButtonSet.d.ts +0 -1
- package/build/typescript/Card/Card.d.ts +0 -1
- package/build/typescript/CardActions/CardActions.d.ts +0 -1
- package/build/typescript/CardContent/CardContent.d.ts +0 -1
- package/build/typescript/CardMedia/CardMedia.d.ts +0 -1
- package/build/typescript/Checkbox/Checkbox.d.ts +0 -1
- package/build/typescript/Checkbox/useVariantStyleMap.d.ts +1 -0
- package/build/typescript/Chip/Chip.d.ts +0 -1
- package/build/typescript/Chip/ChipProps.d.ts +18 -4
- package/build/typescript/Chip/index.d.ts +2 -2
- package/build/typescript/Chip/useChipStyle.d.ts +6 -3
- package/build/typescript/CircularProgress/CircularProgress.d.ts +0 -1
- package/build/typescript/Column/Column.d.ts +0 -1
- package/build/typescript/Dialog/Dialog.d.ts +0 -1
- package/build/typescript/Dialog/DialogProps.d.ts +1 -6
- package/build/typescript/Dialog/useDialogSectionStyle.d.ts +1 -2
- package/build/typescript/Dialog/useDialogStyle.d.ts +1 -1
- package/build/typescript/DialogActions/DialogActions.d.ts +0 -1
- package/build/typescript/DialogContent/DialogContent.d.ts +0 -1
- package/build/typescript/DialogMedia/DialogMedia.d.ts +0 -1
- package/build/typescript/DialogTitle/DialogLargeTitle.d.ts +8 -0
- package/build/typescript/DialogTitle/DialogTitle.d.ts +6 -2
- package/build/typescript/Divider/Divider.d.ts +0 -1
- package/build/typescript/Divider/DividerProps.d.ts +1 -1
- package/build/typescript/Empty/Empty.d.ts +0 -1
- package/build/typescript/Fab/Fab.d.ts +0 -1
- package/build/typescript/Flexbox/Flexbox.d.ts +0 -1
- package/build/typescript/Flexbox/FlexboxProps.d.ts +4 -0
- package/build/typescript/IconButton/IconButton.d.ts +0 -1
- package/build/typescript/IconButton/IconButtonProps.d.ts +1 -1
- package/build/typescript/Image/Image.d.ts +6 -2
- package/build/typescript/Image/ImageProps.d.ts +6 -0
- package/build/typescript/Image/OverlayCloseButton/OverlayCloseButton.d.ts +2 -0
- package/build/typescript/Image/OverlayCloseButton/OverlayCloseButtonProps.d.ts +3 -0
- package/build/typescript/Image/OverlayCloseButton/index.d.ts +2 -0
- package/build/typescript/Image/preload.d.ts +2 -0
- package/build/typescript/Image/preload.native.d.ts +2 -0
- package/build/typescript/ImageCore/ImageCoreNative.d.ts +0 -1
- package/build/typescript/ImageCore/ImageCoreProps.d.ts +1 -0
- package/build/typescript/ImageCore/ImageCoreWeb.d.ts +0 -1
- package/build/typescript/Link/Link.d.ts +0 -1
- package/build/typescript/List/List.d.ts +0 -1
- package/build/typescript/ListItem/ListItem.d.ts +0 -1
- package/build/typescript/ListItemIcon/ListItemIcon.d.ts +0 -1
- package/build/typescript/ListItemSecondaryAction/ListItemSecondaryAction.d.ts +0 -1
- package/build/typescript/ListItemText/ListItemText.d.ts +0 -1
- package/build/typescript/ListSubheader/ListSubheader.d.ts +0 -1
- package/build/typescript/Menu/Menu.d.ts +0 -1
- package/build/typescript/MenuItem/MenuItem.d.ts +0 -1
- package/build/typescript/Modal/AnimatedContainer/index.d.ts +0 -1
- package/build/typescript/Modal/Modal.d.ts +0 -1
- package/build/typescript/Modal/ModalProps.d.ts +8 -0
- package/build/typescript/Pagination/NumberPagination.d.ts +0 -1
- package/build/typescript/Pagination/Pagination.d.ts +0 -1
- package/build/typescript/Pagination/PaginationProps.d.ts +12 -0
- package/build/typescript/Pagination/index.d.ts +2 -2
- package/build/typescript/PaginationItem/PaginationItemProps.d.ts +6 -0
- package/build/typescript/Portal/Portal.d.ts +0 -1
- package/build/typescript/Radio/Radio.d.ts +0 -1
- package/build/typescript/Radio/RadioProps.d.ts +4 -0
- package/build/typescript/RadioGroup/RadioGroup.d.ts +0 -1
- package/build/typescript/Row/Row.d.ts +0 -1
- package/build/typescript/Section/Section.d.ts +0 -1
- package/build/typescript/ShadowView/ShadowView.d.ts +0 -1
- package/build/typescript/ShadowView/ShadowView.native.d.ts +0 -1
- package/build/typescript/Slide/Slide.d.ts +0 -1
- package/build/typescript/Slider/Slider.d.ts +1 -1
- package/build/typescript/Snackbar/Snackbar.d.ts +0 -1
- package/build/typescript/SnackbarContent/SnackbarContent.d.ts +0 -1
- package/build/typescript/SnackbarContent/StatusIcon.d.ts +0 -1
- package/build/typescript/Spacer/Spacer.d.ts +0 -1
- package/build/typescript/SvgIcon/SvgIcon.d.ts +0 -1
- package/build/typescript/Switch/Switch.d.ts +0 -1
- package/build/typescript/Tab/Tab.d.ts +0 -1
- package/build/typescript/Tab/TabProps.d.ts +21 -2
- package/build/typescript/Tab/index.d.ts +2 -1
- package/build/typescript/Tab/useVariantStyleMap.d.ts +4 -2
- package/build/typescript/TabBase/TabBase.d.ts +0 -1
- package/build/typescript/TabBase/TabBaseProps.d.ts +0 -5
- package/build/typescript/Tabs/ScrollableTabsView.d.ts +0 -1
- package/build/typescript/Tabs/TabIndicator.d.ts +0 -1
- package/build/typescript/Tabs/Tabs.d.ts +1 -1
- package/build/typescript/Tabs/TabsProps.d.ts +6 -1
- package/build/typescript/Tabs/index.d.ts +1 -1
- package/build/typescript/Tabs/useTabsStyle.d.ts +8 -0
- package/build/typescript/TextField/TextFieldProps.d.ts +13 -0
- package/build/typescript/TextField/useVariantStyleMap.d.ts +4 -2
- package/build/typescript/Toggle/Toggle.d.ts +0 -1
- package/build/typescript/Toolbar/BackButton/BackButton.d.ts +2 -0
- package/build/typescript/Toolbar/BackButton/BackButtonProps.d.ts +4 -0
- package/build/typescript/Toolbar/BackButton/index.d.ts +2 -0
- package/build/typescript/Toolbar/Toolbar.d.ts +6 -2
- package/build/typescript/Toolbar/ToolbarProps.d.ts +0 -5
- package/build/typescript/Tooltip/Beaks/Beak.d.ts +0 -1
- package/build/typescript/Tooltip/Beaks/HorizontalLargeBeak.d.ts +0 -1
- package/build/typescript/Tooltip/Beaks/HorizontalSmallBeak.d.ts +0 -1
- package/build/typescript/Tooltip/Beaks/VerticalLargeBeak.d.ts +0 -1
- package/build/typescript/Tooltip/Beaks/VerticalSmallBeak.d.ts +0 -1
- package/build/typescript/Tooltip/Beaks/index.d.ts +4 -0
- package/build/typescript/Tooltip/Tooltip.d.ts +0 -1
- package/build/typescript/Tooltip/TooltipProps.d.ts +2 -2
- package/build/typescript/Tooltip/index.d.ts +1 -0
- package/build/typescript/Typography/TypographyProps.d.ts +4 -0
- package/build/typescript/animated/AnimatedAppBar.d.ts +1 -2
- package/build/typescript/animated/AnimatedFlatList.d.ts +1 -2
- package/build/typescript/animated/AnimatedTypography.d.ts +1 -2
- package/build/typescript/hooks/useCollapsibleAppBar.d.ts +2 -1
- package/build/typescript/hooks/useContentContainerStyle.d.ts +2 -1
- package/build/typescript/internal/icons/AppBarChevronLeft.d.ts +358 -0
- package/build/typescript/internal/icons/Check.d.ts +300 -73
- package/build/typescript/internal/icons/CheckCircle.d.ts +300 -73
- package/build/typescript/internal/icons/Checkbox.d.ts +300 -73
- package/build/typescript/internal/icons/CheckboxChecked.d.ts +300 -73
- package/build/typescript/internal/icons/CheckboxOn.d.ts +300 -73
- package/build/typescript/internal/icons/ChevronDown.d.ts +300 -73
- package/build/typescript/internal/icons/ChevronLeft.d.ts +300 -73
- package/build/typescript/internal/icons/ChevronRight.d.ts +300 -73
- package/build/typescript/internal/icons/ChipClose.d.ts +358 -0
- package/build/typescript/internal/icons/CircularProgress.d.ts +0 -1
- package/build/typescript/internal/icons/Clear.d.ts +300 -73
- package/build/typescript/internal/icons/Close.d.ts +300 -73
- package/build/typescript/internal/icons/CloseCircleFillPierced.d.ts +358 -0
- package/build/typescript/internal/icons/EyeOff.d.ts +300 -73
- package/build/typescript/internal/icons/EyeOn.d.ts +300 -73
- package/build/typescript/internal/icons/InfoCircle.d.ts +300 -73
- package/build/typescript/internal/icons/LoadingSpinner/index.d.ts +0 -1
- package/build/typescript/internal/icons/LoadingSpinner/index.native.d.ts +0 -1
- package/build/typescript/internal/icons/Radio.d.ts +300 -73
- package/build/typescript/internal/icons/RadioChecked.d.ts +300 -73
- package/build/typescript/internal/icons/Search.d.ts +300 -73
- package/build/typescript/internal/icons/index.d.ts +3 -0
- package/package.json +10 -10
- package/src/Accordion/Accordion.tsx +23 -14
- package/src/Accordion/AccordionProps.ts +4 -2
- package/src/Accordion/useVariantStyleMap.ts +12 -4
- package/src/AppBar/AppBar.tsx +2 -2
- package/src/AspectRatio/AspectRatioNative.tsx +2 -2
- package/src/AspectRatio/AspectRatioWeb.tsx +3 -3
- package/src/Badge/Badge.tsx +4 -3
- package/src/Badge/BadgeProps.ts +12 -6
- package/src/BottomSheetTitle/BottomSheetTitle.tsx +6 -2
- package/src/BottomSheetTitle/BottomSheetTitleProps.ts +3 -3
- package/src/Button/Button.tsx +28 -12
- package/src/Button/ButtonProps.ts +6 -0
- package/src/Button/useVariantStyleMap.ts +18 -0
- package/src/ButtonBase/ButtonBase.tsx +1 -1
- package/src/ButtonBase/index.ts +1 -1
- package/src/Checkbox/Checkbox.tsx +11 -8
- package/src/Checkbox/useVariantStyleMap.ts +6 -1
- package/src/Chip/Chip.tsx +27 -13
- package/src/Chip/ChipProps.ts +22 -4
- package/src/Chip/index.ts +2 -2
- package/src/Chip/useChipStyle.ts +75 -29
- package/src/Dialog/Dialog.tsx +13 -11
- package/src/Dialog/DialogProps.ts +1 -7
- package/src/Dialog/useDialogSectionStyle.ts +6 -4
- package/src/Dialog/useDialogStyle.ts +19 -7
- package/src/DialogActions/DialogActions.tsx +0 -1
- package/src/DialogTitle/DialogLargeTitle.tsx +95 -0
- package/src/DialogTitle/DialogTitle.tsx +6 -1
- package/src/Divider/Divider.tsx +5 -0
- package/src/Divider/DividerProps.ts +1 -1
- package/src/Empty/Empty.tsx +1 -1
- package/src/Flexbox/Flexbox.tsx +2 -0
- package/src/Flexbox/FlexboxProps.ts +5 -0
- package/src/IconButton/IconButton.tsx +2 -0
- package/src/IconButton/IconButtonProps.ts +1 -0
- package/src/Image/Image.tsx +13 -4
- package/src/Image/ImageProps.ts +7 -0
- package/src/Image/OverlayCloseButton/OverlayCloseButton.tsx +41 -0
- package/src/Image/OverlayCloseButton/OverlayCloseButtonProps.ts +3 -0
- package/src/Image/OverlayCloseButton/index.ts +2 -0
- package/src/Image/preload.native.ts +6 -0
- package/src/Image/preload.ts +5 -0
- package/src/ImageCore/ImageCoreNative.tsx +13 -10
- package/src/ImageCore/ImageCoreProps.ts +1 -0
- package/src/ListItem/ListItem.tsx +5 -15
- package/src/ListItemText/ListItemText.tsx +2 -2
- package/src/ListSubheader/ListSubheader.tsx +1 -1
- package/src/Modal/Modal.tsx +12 -4
- package/src/Modal/ModalProps.ts +9 -0
- package/src/Pagination/NumberPagination.tsx +7 -2
- package/src/Pagination/Pagination.tsx +3 -2
- package/src/Pagination/PaginationProps.ts +15 -0
- package/src/Pagination/index.ts +2 -2
- package/src/PaginationItem/PaginationItem.tsx +31 -24
- package/src/PaginationItem/PaginationItemProps.ts +7 -0
- package/src/Radio/Radio.tsx +46 -17
- package/src/Radio/RadioProps.ts +6 -0
- package/src/RadioGroup/RadioGroup.tsx +2 -28
- package/src/ShadowView/ShadowView.native.tsx +2 -2
- package/src/Slider/Slider.tsx +1 -0
- package/src/SnackbarContent/SnackbarContent.tsx +35 -14
- package/src/Tab/Tab.tsx +32 -22
- package/src/Tab/TabProps.ts +25 -2
- package/src/Tab/index.ts +2 -1
- package/src/Tab/useVariantStyleMap.ts +70 -17
- package/src/TabBase/TabBase.tsx +1 -9
- package/src/TabBase/TabBaseProps.ts +0 -6
- package/src/Tabs/Tabs.tsx +40 -13
- package/src/Tabs/TabsProps.ts +7 -1
- package/src/Tabs/index.ts +1 -1
- package/src/Tabs/useTabsStyle.ts +79 -0
- package/src/TextField/TextField.tsx +142 -47
- package/src/TextField/TextFieldProps.ts +16 -0
- package/src/TextField/useVariantStyleMap.ts +57 -30
- package/src/Toolbar/BackButton/BackButton.tsx +42 -0
- package/src/Toolbar/BackButton/BackButtonProps.ts +4 -0
- package/src/Toolbar/BackButton/index.ts +2 -0
- package/src/Toolbar/Toolbar.tsx +26 -17
- package/src/Toolbar/ToolbarProps.ts +0 -6
- package/src/Tooltip/Beaks/index.ts +4 -0
- package/src/Tooltip/Tooltip.tsx +16 -13
- package/src/Tooltip/TooltipProps.ts +2 -2
- package/src/Tooltip/index.ts +1 -0
- package/src/Typography/Typography.tsx +3 -1
- package/src/Typography/TypographyProps.ts +5 -0
- package/src/hooks/useCollapsibleAppBar.ts +27 -24
- package/src/hooks/useContentContainerStyle.ts +29 -12
- package/src/hooks/useFadeInAppBar.ts +4 -4
- package/src/internal/icons/AppBarChevronLeft.tsx +15 -0
- package/src/internal/icons/ChevronLeft.tsx +4 -1
- package/src/internal/icons/ChevronRight.tsx +4 -1
- package/src/internal/icons/ChipClose.tsx +13 -0
- package/src/internal/icons/Clear.tsx +3 -3
- package/src/internal/icons/Close.tsx +4 -1
- package/src/internal/icons/CloseCircleFillPierced.tsx +13 -0
- package/src/internal/icons/Search.tsx +2 -2
- package/src/internal/icons/index.ts +3 -0
- package/build/commonjs/ButtonBase/LegacyButtonBase.js +0 -126
- package/build/commonjs/ButtonBase/LegacyButtonBase.js.map +0 -1
- package/build/module/ButtonBase/LegacyButtonBase.js +0 -106
- package/build/module/ButtonBase/LegacyButtonBase.js.map +0 -1
- package/build/typescript/ButtonBase/LegacyButtonBase.d.ts +0 -5
- package/src/ButtonBase/LegacyButtonBase.tsx +0 -135
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["iconButtonColors"],"sources":["IconButtonProps.ts"],"sourcesContent":["import React from 'react';\nimport type { ButtonBaseProps } from '../ButtonBase';\nimport type { SvgIconSize } from '../SvgIcon/SvgIconProps';\nimport type { OverridableComponentProps } from '../types';\n\nexport const iconButtonColors = [\n 'strong',\n 'base',\n 'staticStrongInverse',\n 'disabled',\n] as const;\nexport type IconButtonColor = typeof iconButtonColors[number];\n\nexport default interface IconButtonProps extends OverridableComponentProps<ButtonBaseProps, {\n /**\n * The icon element.\n */\n children: React.ReactElement;\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n * @default 'strong'\n */\n color?: IconButtonColor;\n\n /**\n * Determines the size of the icon that goes inside the button.\n * @default 'medium'\n */\n iconSize?: SvgIconSize;\n\n /**\n * Determines whether to show the loading status or not.\n * @default false\n */\n isLoading?: boolean;\n}> {}\n"],"mappings":"AAKA,OAAO,MAAMA,gBAAgB,GAAG,CAC5B,QAD4B,EAE5B,MAF4B,EAG5B,qBAH4B,EAI5B,
|
|
1
|
+
{"version":3,"names":["iconButtonColors"],"sources":["IconButtonProps.ts"],"sourcesContent":["import React from 'react';\nimport type { ButtonBaseProps } from '../ButtonBase';\nimport type { SvgIconSize } from '../SvgIcon/SvgIconProps';\nimport type { OverridableComponentProps } from '../types';\n\nexport const iconButtonColors = [\n 'strong',\n 'base',\n 'staticStrongInverse',\n 'staticBaseOpacityInverse',\n 'disabled',\n] as const;\nexport type IconButtonColor = typeof iconButtonColors[number];\n\nexport default interface IconButtonProps extends OverridableComponentProps<ButtonBaseProps, {\n /**\n * The icon element.\n */\n children: React.ReactElement;\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n * @default 'strong'\n */\n color?: IconButtonColor;\n\n /**\n * Determines the size of the icon that goes inside the button.\n * @default 'medium'\n */\n iconSize?: SvgIconSize;\n\n /**\n * Determines whether to show the loading status or not.\n * @default false\n */\n isLoading?: boolean;\n}> {}\n"],"mappings":"AAKA,OAAO,MAAMA,gBAAgB,GAAG,CAC5B,QAD4B,EAE5B,MAF4B,EAG5B,qBAH4B,EAI5B,0BAJ4B,EAK5B,UAL4B,CAAzB"}
|
|
@@ -4,6 +4,8 @@ import React, { useState } from 'react';
|
|
|
4
4
|
import { Text, View } from 'react-native';
|
|
5
5
|
import ImageCore from '../ImageCore';
|
|
6
6
|
import { css, StyleSheet, useTheme } from '../styles';
|
|
7
|
+
import OverlayCloseButton from './OverlayCloseButton';
|
|
8
|
+
import preload from './preload';
|
|
7
9
|
|
|
8
10
|
const useStyles = function () {
|
|
9
11
|
const theme = useTheme();
|
|
@@ -17,9 +19,9 @@ const useStyles = function () {
|
|
|
17
19
|
backgroundColor: theme.palette.paper.grey
|
|
18
20
|
},
|
|
19
21
|
outlined: {
|
|
20
|
-
borderWidth:
|
|
22
|
+
borderWidth: 0.5,
|
|
21
23
|
borderStyle: 'solid',
|
|
22
|
-
borderColor: theme.palette.
|
|
24
|
+
borderColor: theme.palette.border.weak
|
|
23
25
|
},
|
|
24
26
|
error: {
|
|
25
27
|
alignItems: 'center',
|
|
@@ -46,11 +48,12 @@ function determinePlaceholderMode(props) {
|
|
|
46
48
|
return props.placeholder ? 'custom' : 'default';
|
|
47
49
|
}
|
|
48
50
|
|
|
49
|
-
|
|
51
|
+
function Image(props) {
|
|
50
52
|
const {
|
|
51
53
|
alt,
|
|
52
54
|
cache = 'immutable',
|
|
53
55
|
disableDrag,
|
|
56
|
+
disableFadeIn,
|
|
54
57
|
disableLongClick,
|
|
55
58
|
disableOutline,
|
|
56
59
|
disablePlaceholder,
|
|
@@ -95,6 +98,7 @@ export default function Image(props) {
|
|
|
95
98
|
alt: alt,
|
|
96
99
|
cache: cache,
|
|
97
100
|
disableDrag: disableDrag,
|
|
101
|
+
disableFadeIn: disableFadeIn,
|
|
98
102
|
disableLongClick: disableLongClick,
|
|
99
103
|
height: '100%',
|
|
100
104
|
loading: loading,
|
|
@@ -107,5 +111,8 @@ export default function Image(props) {
|
|
|
107
111
|
style: StyleSheet.absoluteFill
|
|
108
112
|
}, overlaidChildren) : null);
|
|
109
113
|
}
|
|
110
|
-
|
|
114
|
+
|
|
115
|
+
Image.OverlayCloseButton = OverlayCloseButton;
|
|
116
|
+
Image.preload = preload;
|
|
117
|
+
export default Image;
|
|
111
118
|
//# sourceMappingURL=Image.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useState","Text","View","ImageCore","css","StyleSheet","useTheme","useStyles","theme","root","rounded","borderRadius","shape","roundness","overflow","placeholder","backgroundColor","palette","paper","grey","outlined","borderWidth","
|
|
1
|
+
{"version":3,"names":["React","useState","Text","View","ImageCore","css","StyleSheet","useTheme","OverlayCloseButton","preload","useStyles","theme","root","rounded","borderRadius","shape","roundness","overflow","placeholder","backgroundColor","palette","paper","grey","outlined","borderWidth","borderStyle","borderColor","border","weak","error","alignItems","height","justifyContent","width","errorText","color","text","primary","fontFamily","fontSize","letterSpacing","lineHeight","textAlign","determinePlaceholderMode","props","disablePlaceholder","Image","alt","cache","disableDrag","disableFadeIn","disableLongClick","disableOutline","loading","onError","onErrorProp","onLoad","onLoadProp","overlaidChildren","resizeMode","source","style","square","otherProps","failed","setFailed","styles","placeholderMode","undefined","absoluteFill","zIndex","uri"],"sources":["Image.tsx"],"sourcesContent":["import React, { useState } from 'react';\nimport { Text, View } from 'react-native';\nimport type { NamedStylesStringUnion, UseStyles } from '@fountain-ui/styles';\nimport type { ImageCoreProps } from '../ImageCore';\nimport ImageCore from '../ImageCore';\nimport { css, StyleSheet, useTheme } from '../styles';\nimport type ImageProps from './ImageProps';\nimport OverlayCloseButton from './OverlayCloseButton';\nimport preload from './preload';\n\ntype PlaceholderMode =\n | 'default'\n | 'custom'\n | 'none';\n\ntype ImageStyleKeys =\n | 'root'\n | 'rounded'\n | 'placeholder'\n | 'outlined'\n | 'error'\n | 'errorText';\n\ntype ImageStyles = NamedStylesStringUnion<ImageStyleKeys>;\n\nconst useStyles: UseStyles<ImageStyles> = function (): ImageStyles {\n const theme = useTheme();\n\n return {\n root: {},\n rounded: {\n borderRadius: theme.shape.roundness,\n overflow: 'hidden',\n },\n placeholder: {\n backgroundColor: theme.palette.paper.grey,\n },\n outlined: {\n borderWidth: 0.5,\n borderStyle: 'solid',\n borderColor: theme.palette.border.weak,\n },\n error: {\n alignItems: 'center',\n height: '100%',\n justifyContent: 'center',\n width: '100%',\n },\n errorText: {\n color: theme.palette.text.primary,\n fontFamily: 'Inter-Medium',\n fontSize: 12,\n letterSpacing: 0,\n lineHeight: 18,\n textAlign: 'center',\n },\n };\n};\n\nfunction determinePlaceholderMode(props: ImageProps): PlaceholderMode {\n if (props.disablePlaceholder) {\n return 'none';\n }\n\n return props.placeholder ? 'custom' : 'default';\n}\n\nfunction Image(props: ImageProps) {\n const {\n alt,\n cache = 'immutable',\n disableDrag,\n disableFadeIn,\n disableLongClick,\n disableOutline,\n disablePlaceholder,\n error,\n loading = 'lazy',\n onError: onErrorProp,\n onLoad: onLoadProp,\n overlaidChildren,\n placeholder,\n resizeMode = 'cover',\n source,\n style,\n square = false,\n ...otherProps\n } = props;\n\n const [failed, setFailed] = useState(false);\n\n const styles = useStyles();\n\n const onLoad: ImageCoreProps['onLoad'] = () => {\n setFailed(false);\n\n onLoadProp?.();\n };\n\n const onError: ImageCoreProps['onError'] = () => {\n setFailed(true);\n\n onErrorProp?.();\n };\n\n const placeholderMode = determinePlaceholderMode(props);\n\n return (\n <View\n style={css([\n styles.root,\n !disableOutline ? styles.outlined : undefined,\n !square ? styles.rounded : undefined,\n placeholderMode === 'default' ? styles.placeholder : undefined,\n style,\n ])}\n {...otherProps}\n >\n {placeholderMode === 'custom' ? (\n <View\n style={css([\n StyleSheet.absoluteFill,\n { zIndex: -1 },\n ])}\n >\n {placeholder}\n </View>\n ) : null}\n\n {failed ? (\n <View style={styles.error}>\n {error ?? (\n <Text\n children={alt}\n style={styles.errorText}\n />\n )}\n </View>\n ) : source.uri ? (\n <ImageCore\n alt={alt}\n cache={cache}\n disableDrag={disableDrag}\n disableFadeIn={disableFadeIn}\n disableLongClick={disableLongClick}\n height={'100%'}\n loading={loading}\n onError={onError}\n onLoad={onLoad}\n resizeMode={resizeMode}\n source={source}\n width={'100%'}\n />\n ) : null}\n\n {overlaidChildren ? (\n <View style={StyleSheet.absoluteFill}>\n {overlaidChildren}\n </View>\n ) : null}\n </View>\n );\n}\n\nImage.OverlayCloseButton = OverlayCloseButton;\nImage.preload = preload;\n\nexport default Image;\n"],"mappings":"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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["ImageProps.ts"],"sourcesContent":["import React from 'react';\nimport type { ViewProps } from 'react-native';\nimport type { OverridableComponentProps } from '../types';\nimport type { ImageSource, Loading, ResizeMode, CacheControl } from '../ImageCore';\n\n/**\n * Image file quality.\n * Request image by query string.\n */\nexport type ImageQuality = 'small' | 'medium' | 'large';\n\nexport default interface ImageProps extends OverridableComponentProps<ViewProps, {\n /**\n * Indicating the alternate fallback content to be displayed\n * if the image has not been loaded.\n */\n alt?: string;\n\n /**\n * Disable drag event for web.\n * @default false\n */\n disableDrag?: boolean,\n\n /**\n * Disable Long click event for web.\n * @default false\n */\n disableLongClick?: boolean,\n\n /**\n * If `true`, the image outline is not rendered.\n * @default false\n */\n disableOutline?: boolean;\n\n /**\n * If `true`, the placeholder is not rendered.\n * @default false\n */\n disablePlaceholder?: boolean;\n\n /**\n * Custom error element. Default is simple alt text.\n */\n error?: React.ReactElement | null;\n\n /**\n * Web only. Loading the document by determining whether to load\n * the image immediately (`eager`) or on an as-needed basis (`lazy`).\n * On React Native, it always works as `lazy`.\n * @default 'lazy'\n */\n loading?: Loading;\n\n /**\n * error event handler\n */\n onError?: () => void;\n\n /**\n * image loaded event handler\n */\n onLoad?: () => void;\n\n /**\n * The children on top this image.\n */\n overlaidChildren?: React.ReactElement;\n\n /**\n * Custom placeholder element.\n */\n placeholder?: React.ReactElement;\n\n /**\n * Determines how to resize the image when the frame doesn't match the raw image dimensions.\n * @default 'cover'\n */\n resizeMode?: ResizeMode;\n\n /**\n * The image source.\n */\n source: ImageSource;\n\n /**\n * If `true`, rounded corners are disabled.\n * @default false\n */\n square?: boolean;\n\n /***\n * FastImage cache control value.\n * @default 'immutable'\n */\n cache?: CacheControl;\n}> {}\n"],"mappings":""}
|
|
1
|
+
{"version":3,"names":[],"sources":["ImageProps.ts"],"sourcesContent":["import React from 'react';\nimport type { ViewProps } from 'react-native';\nimport type { OverridableComponentProps } from '../types';\nimport type { ImageSource, Loading, ResizeMode, CacheControl } from '../ImageCore';\n\n/**\n * Image file quality.\n * Request image by query string.\n */\nexport type ImageQuality = 'small' | 'medium' | 'large';\n\nexport default interface ImageProps extends OverridableComponentProps<ViewProps, {\n /**\n * Indicating the alternate fallback content to be displayed\n * if the image has not been loaded.\n */\n alt?: string;\n\n /**\n * Disable drag event for web.\n * @default false\n */\n disableDrag?: boolean,\n\n /**\n * Disable Long click event for web.\n * @default false\n */\n disableLongClick?: boolean,\n\n /**\n * If true, disables the fade-in opacity animation on image load.\n * Only affects native platforms.\n * @default false\n */\n disableFadeIn?: boolean;\n\n /**\n * If `true`, the image outline is not rendered.\n * @default false\n */\n disableOutline?: boolean;\n\n /**\n * If `true`, the placeholder is not rendered.\n * @default false\n */\n disablePlaceholder?: boolean;\n\n /**\n * Custom error element. Default is simple alt text.\n */\n error?: React.ReactElement | null;\n\n /**\n * Web only. Loading the document by determining whether to load\n * the image immediately (`eager`) or on an as-needed basis (`lazy`).\n * On React Native, it always works as `lazy`.\n * @default 'lazy'\n */\n loading?: Loading;\n\n /**\n * error event handler\n */\n onError?: () => void;\n\n /**\n * image loaded event handler\n */\n onLoad?: () => void;\n\n /**\n * The children on top this image.\n */\n overlaidChildren?: React.ReactElement;\n\n /**\n * Custom placeholder element.\n */\n placeholder?: React.ReactElement;\n\n /**\n * Determines how to resize the image when the frame doesn't match the raw image dimensions.\n * @default 'cover'\n */\n resizeMode?: ResizeMode;\n\n /**\n * The image source.\n */\n source: ImageSource;\n\n /**\n * If `true`, rounded corners are disabled.\n * @default false\n */\n square?: boolean;\n\n /***\n * FastImage cache control value.\n * @default 'immutable'\n */\n cache?: CacheControl;\n}> {}\n"],"mappings":""}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
+
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { commonColors } from '@fountain-ui/styles';
|
|
5
|
+
import IconButton from '../../IconButton';
|
|
6
|
+
import { CloseCircleFillPierced } from '../../internal';
|
|
7
|
+
import { css, StyleSheet } from '../../styles';
|
|
8
|
+
const styles = StyleSheet.create({
|
|
9
|
+
root: {
|
|
10
|
+
height: 40,
|
|
11
|
+
left: 8,
|
|
12
|
+
position: 'absolute',
|
|
13
|
+
top: 8,
|
|
14
|
+
width: 40
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
export default function OverlayCloseButton(props) {
|
|
18
|
+
const {
|
|
19
|
+
style: styleProp,
|
|
20
|
+
...otherProps
|
|
21
|
+
} = props;
|
|
22
|
+
const rootStyle = css([styles.root, styleProp]);
|
|
23
|
+
return /*#__PURE__*/React.createElement(IconButton, _extends({
|
|
24
|
+
style: rootStyle
|
|
25
|
+
}, otherProps), /*#__PURE__*/React.createElement(CloseCircleFillPierced, {
|
|
26
|
+
fill: commonColors.static.baseOpacityInverse,
|
|
27
|
+
height: 21,
|
|
28
|
+
width: 21
|
|
29
|
+
}));
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=OverlayCloseButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","commonColors","IconButton","CloseCircleFillPierced","css","StyleSheet","styles","create","root","height","left","position","top","width","OverlayCloseButton","props","style","styleProp","otherProps","rootStyle","static","baseOpacityInverse"],"sources":["OverlayCloseButton.tsx"],"sourcesContent":["import React from 'react';\nimport { commonColors } from '@fountain-ui/styles';\nimport IconButton from '../../IconButton';\nimport { CloseCircleFillPierced } from '../../internal';\nimport { css, StyleSheet } from '../../styles';\nimport type OverlayCloseButtonProps from './OverlayCloseButtonProps';\n\nconst styles = StyleSheet.create({\n root: {\n height: 40,\n left: 8,\n position: 'absolute',\n top: 8,\n width: 40,\n },\n});\n\nexport default function OverlayCloseButton(props: OverlayCloseButtonProps) {\n const {\n style: styleProp,\n ...otherProps\n } = props;\n\n const rootStyle = css([\n styles.root,\n styleProp,\n ]);\n\n return (\n <IconButton\n style={rootStyle}\n {...otherProps}\n >\n <CloseCircleFillPierced\n fill={commonColors.static.baseOpacityInverse}\n height={21}\n width={21}\n />\n </IconButton>\n );\n}\n"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,YAAT,QAA6B,qBAA7B;AACA,OAAOC,UAAP,MAAuB,kBAAvB;AACA,SAASC,sBAAT,QAAuC,gBAAvC;AACA,SAASC,GAAT,EAAcC,UAAd,QAAgC,cAAhC;AAGA,MAAMC,MAAM,GAAGD,UAAU,CAACE,MAAX,CAAkB;EAC7BC,IAAI,EAAE;IACFC,MAAM,EAAE,EADN;IAEFC,IAAI,EAAE,CAFJ;IAGFC,QAAQ,EAAE,UAHR;IAIFC,GAAG,EAAE,CAJH;IAKFC,KAAK,EAAE;EALL;AADuB,CAAlB,CAAf;AAUA,eAAe,SAASC,kBAAT,CAA4BC,KAA5B,EAA4D;EACvE,MAAM;IACFC,KAAK,EAAEC,SADL;IAEF,GAAGC;EAFD,IAGFH,KAHJ;EAKA,MAAMI,SAAS,GAAGf,GAAG,CAAC,CAClBE,MAAM,CAACE,IADW,EAElBS,SAFkB,CAAD,CAArB;EAKA,oBACI,oBAAC,UAAD;IACI,KAAK,EAAEE;EADX,GAEQD,UAFR,gBAII,oBAAC,sBAAD;IACI,IAAI,EAAEjB,YAAY,CAACmB,MAAb,CAAoBC,kBAD9B;IAEI,MAAM,EAAE,EAFZ;IAGI,KAAK,EAAE;EAHX,EAJJ,CADJ;AAYH"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["OverlayCloseButtonProps.ts"],"sourcesContent":["import type { IconButtonProps } from '../../IconButton';\n\nexport default interface OverlayCloseButtonProps extends Omit<IconButtonProps, 'children'> {}"],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["default"],"sources":["index.ts"],"sourcesContent":["export { default } from './OverlayCloseButton';\nexport type { default as OverlayCloseButtonProps } from './OverlayCloseButtonProps';"],"mappings":"AAAA,SAASA,OAAT,QAAwB,sBAAxB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["preload","_sources"],"sources":["preload.ts"],"sourcesContent":["import type { ImageSource } from '../ImageCore';\n\nexport default function preload(_sources: ImageSource[]) {\n // No-op on web\n}\n"],"mappings":"AAEA,eAAe,SAASA,OAAT,CAAiBC,QAAjB,EAA0C,CACrD;AACH"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["FastImage","preload","sources","map","uri"],"sources":["preload.native.ts"],"sourcesContent":["import FastImage from '@d11/react-native-fast-image';\nimport type { ImageSource } from '../ImageCore';\n\nexport default function preload(sources: ImageSource[]) {\n FastImage.preload(sources.map(({ uri }) => ({ uri })));\n}\n"],"mappings":"AAAA,OAAOA,SAAP,MAAsB,8BAAtB;AAGA,eAAe,SAASC,OAAT,CAAiBC,OAAjB,EAAyC;EACpDF,SAAS,CAACC,OAAV,CAAkBC,OAAO,CAACC,GAAR,CAAY;IAAA,IAAC;MAAEC;IAAF,CAAD;IAAA,OAAc;MAAEA;IAAF,CAAd;EAAA,CAAZ,CAAlB;AACH"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useCallback, useContext } from 'react';
|
|
2
2
|
import { Animated } from 'react-native';
|
|
3
|
-
import FastImage from 'react-native-fast-image';
|
|
3
|
+
import FastImage from '@d11/react-native-fast-image';
|
|
4
4
|
import { useAnimatedValue } from '../hooks';
|
|
5
5
|
import { isNotAndroid12 } from '../utils';
|
|
6
6
|
import ImageFileExtensionContext from './ImageFileExtensionContext'; // @ts-ignore
|
|
@@ -12,6 +12,7 @@ const ANIMATION_DURATION = 200;
|
|
|
12
12
|
export default function ImageCore(props) {
|
|
13
13
|
const {
|
|
14
14
|
cache,
|
|
15
|
+
disableFadeIn,
|
|
15
16
|
height,
|
|
16
17
|
onError,
|
|
17
18
|
onLoad,
|
|
@@ -19,16 +20,19 @@ export default function ImageCore(props) {
|
|
|
19
20
|
source,
|
|
20
21
|
width
|
|
21
22
|
} = props;
|
|
22
|
-
const opacity = useAnimatedValue(INITIAL_OPACITY);
|
|
23
|
+
const opacity = useAnimatedValue(disableFadeIn ? LOADED_OPACITY : INITIAL_OPACITY);
|
|
23
24
|
const acceptHeader = useContext(ImageFileExtensionContext);
|
|
24
25
|
const handleLoad = useCallback(() => {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
26
|
+
if (!disableFadeIn) {
|
|
27
|
+
Animated.timing(opacity, {
|
|
28
|
+
toValue: LOADED_OPACITY,
|
|
29
|
+
duration: ANIMATION_DURATION,
|
|
30
|
+
useNativeDriver: isNotAndroid12
|
|
31
|
+
}).start();
|
|
32
|
+
}
|
|
33
|
+
|
|
30
34
|
onLoad === null || onLoad === void 0 ? void 0 : onLoad();
|
|
31
|
-
}, [onLoad]);
|
|
35
|
+
}, [disableFadeIn, onLoad]);
|
|
32
36
|
return /*#__PURE__*/React.createElement(AnimatedFastImage, {
|
|
33
37
|
onError: onError,
|
|
34
38
|
onLoad: handleLoad,
|
|
@@ -43,8 +47,8 @@ export default function ImageCore(props) {
|
|
|
43
47
|
style: [{
|
|
44
48
|
opacity
|
|
45
49
|
}, {
|
|
46
|
-
width,
|
|
47
|
-
height
|
|
50
|
+
width: width,
|
|
51
|
+
height: height
|
|
48
52
|
}]
|
|
49
53
|
});
|
|
50
54
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useCallback","useContext","Animated","FastImage","useAnimatedValue","isNotAndroid12","ImageFileExtensionContext","AnimatedFastImage","createAnimatedComponent","INITIAL_OPACITY","LOADED_OPACITY","ANIMATION_DURATION","ImageCore","props","cache","height","onError","onLoad","resizeMode","source","width","opacity","acceptHeader","handleLoad","timing","toValue","duration","useNativeDriver","start","uri","headers"],"sources":["ImageCoreNative.tsx"],"sourcesContent":["import React, { useCallback, useContext } from 'react';\nimport { Animated } from 'react-native';\nimport FastImage from 'react-native-fast-image';\nimport { useAnimatedValue } from '../hooks';\nimport { isNotAndroid12 } from '../utils';\nimport type ImageCoreProps from './ImageCoreProps';\nimport ImageFileExtensionContext from './ImageFileExtensionContext';\n\n// @ts-ignore\nconst AnimatedFastImage = Animated.createAnimatedComponent(FastImage);\n\nconst INITIAL_OPACITY = 0;\nconst LOADED_OPACITY = 1;\n\nconst ANIMATION_DURATION = 200;\n\nexport default function ImageCore(props: ImageCoreProps) {\n const {\n cache,\n height,\n onError,\n onLoad,\n resizeMode,\n source,\n width,\n } = props;\n\n const opacity = useAnimatedValue(INITIAL_OPACITY);\n\n const acceptHeader = useContext(ImageFileExtensionContext);\n\n const handleLoad = useCallback(() => {\n Animated.timing(opacity, {\n
|
|
1
|
+
{"version":3,"names":["React","useCallback","useContext","Animated","FastImage","useAnimatedValue","isNotAndroid12","ImageFileExtensionContext","AnimatedFastImage","createAnimatedComponent","INITIAL_OPACITY","LOADED_OPACITY","ANIMATION_DURATION","ImageCore","props","cache","disableFadeIn","height","onError","onLoad","resizeMode","source","width","opacity","acceptHeader","handleLoad","timing","toValue","duration","useNativeDriver","start","uri","headers"],"sources":["ImageCoreNative.tsx"],"sourcesContent":["import React, { useCallback, useContext } from 'react';\nimport { Animated, DimensionValue } from 'react-native';\nimport FastImage from '@d11/react-native-fast-image';\nimport { useAnimatedValue } from '../hooks';\nimport { isNotAndroid12 } from '../utils';\nimport type ImageCoreProps from './ImageCoreProps';\nimport ImageFileExtensionContext from './ImageFileExtensionContext';\n\n// @ts-ignore\nconst AnimatedFastImage = Animated.createAnimatedComponent(FastImage);\n\nconst INITIAL_OPACITY = 0;\nconst LOADED_OPACITY = 1;\n\nconst ANIMATION_DURATION = 200;\n\nexport default function ImageCore(props: ImageCoreProps) {\n const {\n cache,\n disableFadeIn,\n height,\n onError,\n onLoad,\n resizeMode,\n source,\n width,\n } = props;\n\n const opacity = useAnimatedValue(disableFadeIn ? LOADED_OPACITY : INITIAL_OPACITY);\n\n const acceptHeader = useContext(ImageFileExtensionContext);\n\n const handleLoad = useCallback(() => {\n if (!disableFadeIn) {\n Animated.timing(opacity, {\n toValue: LOADED_OPACITY,\n duration: ANIMATION_DURATION,\n useNativeDriver: isNotAndroid12,\n }).start();\n }\n\n onLoad?.();\n }, [disableFadeIn, onLoad]);\n\n return (\n <AnimatedFastImage\n onError={onError}\n onLoad={handleLoad}\n resizeMode={resizeMode}\n source={{\n cache,\n uri: source.uri,\n headers: {\n 'Accept': acceptHeader,\n },\n }}\n style={[\n { opacity },\n { width: width as DimensionValue, height: height as DimensionValue },\n ]}\n />\n );\n};\n"],"mappings":"AAAA,OAAOA,KAAP,IAAgBC,WAAhB,EAA6BC,UAA7B,QAA+C,OAA/C;AACA,SAASC,QAAT,QAAyC,cAAzC;AACA,OAAOC,SAAP,MAAsB,8BAAtB;AACA,SAASC,gBAAT,QAAiC,UAAjC;AACA,SAASC,cAAT,QAA+B,UAA/B;AAEA,OAAOC,yBAAP,MAAsC,6BAAtC,C,CAEA;;AACA,MAAMC,iBAAiB,GAAGL,QAAQ,CAACM,uBAAT,CAAiCL,SAAjC,CAA1B;AAEA,MAAMM,eAAe,GAAG,CAAxB;AACA,MAAMC,cAAc,GAAG,CAAvB;AAEA,MAAMC,kBAAkB,GAAG,GAA3B;AAEA,eAAe,SAASC,SAAT,CAAmBC,KAAnB,EAA0C;EACrD,MAAM;IACFC,KADE;IAEFC,aAFE;IAGFC,MAHE;IAIFC,OAJE;IAKFC,MALE;IAMFC,UANE;IAOFC,MAPE;IAQFC;EARE,IASFR,KATJ;EAWA,MAAMS,OAAO,GAAGlB,gBAAgB,CAACW,aAAa,GAAGL,cAAH,GAAoBD,eAAlC,CAAhC;EAEA,MAAMc,YAAY,GAAGtB,UAAU,CAACK,yBAAD,CAA/B;EAEA,MAAMkB,UAAU,GAAGxB,WAAW,CAAC,MAAM;IACjC,IAAI,CAACe,aAAL,EAAoB;MAChBb,QAAQ,CAACuB,MAAT,CAAgBH,OAAhB,EAAyB;QACrBI,OAAO,EAAEhB,cADY;QAErBiB,QAAQ,EAAEhB,kBAFW;QAGrBiB,eAAe,EAAEvB;MAHI,CAAzB,EAIGwB,KAJH;IAKH;;IAEDX,MAAM,SAAN,IAAAA,MAAM,WAAN,YAAAA,MAAM;EACT,CAV6B,EAU3B,CAACH,aAAD,EAAgBG,MAAhB,CAV2B,CAA9B;EAYA,oBACI,oBAAC,iBAAD;IACI,OAAO,EAAED,OADb;IAEI,MAAM,EAAEO,UAFZ;IAGI,UAAU,EAAEL,UAHhB;IAII,MAAM,EAAE;MACJL,KADI;MAEJgB,GAAG,EAAEV,MAAM,CAACU,GAFR;MAGJC,OAAO,EAAE;QACL,UAAUR;MADL;IAHL,CAJZ;IAWI,KAAK,EAAE,CACH;MAAED;IAAF,CADG,EAEH;MAAED,KAAK,EAAEA,KAAT;MAAkCL,MAAM,EAAEA;IAA1C,CAFG;EAXX,EADJ;AAkBH;AAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["ImageCoreProps.ts"],"sourcesContent":["export interface ImageSource {\n uri?: string;\n}\n\nexport type ResizeMode = 'cover' | 'contain';\n\nexport type Loading = 'lazy' | 'eager';\n\nexport type CacheControl = 'immutable' | 'web' | 'cacheOnly';\n\nexport default interface ImageCoreProps extends Readonly<{\n alt?: string;\n cache?: CacheControl;\n disableDrag?: boolean,\n disableLongClick?: boolean,\n height?: number | string;\n loading: Loading;\n onError?: () => void;\n onLoad?: () => void;\n resizeMode: ResizeMode;\n source: ImageSource;\n width?: number | string;\n}> {}"],"mappings":""}
|
|
1
|
+
{"version":3,"names":[],"sources":["ImageCoreProps.ts"],"sourcesContent":["export interface ImageSource {\n uri?: string;\n}\n\nexport type ResizeMode = 'cover' | 'contain';\n\nexport type Loading = 'lazy' | 'eager';\n\nexport type CacheControl = 'immutable' | 'web' | 'cacheOnly';\n\nexport default interface ImageCoreProps extends Readonly<{\n alt?: string;\n cache?: CacheControl;\n disableDrag?: boolean,\n disableFadeIn?: boolean,\n disableLongClick?: boolean,\n height?: number | string;\n loading: Loading;\n onError?: () => void;\n onLoad?: () => void;\n resizeMode: ResizeMode;\n source: ImageSource;\n width?: number | string;\n}> {}"],"mappings":""}
|
|
@@ -9,20 +9,14 @@ const useStyles = function () {
|
|
|
9
9
|
const theme = useTheme();
|
|
10
10
|
return {
|
|
11
11
|
content: {
|
|
12
|
+
borderBottomColor: theme.palette.border.weak,
|
|
13
|
+
borderBottomWidth: 0.5,
|
|
12
14
|
gap: theme.spacing(2),
|
|
13
15
|
paddingVertical: theme.spacing(3.75),
|
|
14
|
-
paddingHorizontal: theme.spacing(4),
|
|
15
16
|
width: '100%'
|
|
16
17
|
},
|
|
17
18
|
description: {
|
|
18
19
|
paddingRight: theme.spacing(20)
|
|
19
|
-
},
|
|
20
|
-
divider: {
|
|
21
|
-
borderBottomColor: theme.palette.border.weak,
|
|
22
|
-
borderBottomWidth: 0.5
|
|
23
|
-
},
|
|
24
|
-
dividerWrapper: {
|
|
25
|
-
paddingHorizontal: theme.spacing(4)
|
|
26
20
|
}
|
|
27
21
|
};
|
|
28
22
|
};
|
|
@@ -47,8 +41,8 @@ export default function ListItem(props) {
|
|
|
47
41
|
const contentWrapperStyle = css([styles.content, style]);
|
|
48
42
|
const descriptionFontStyle = createFontStyle(theme, {
|
|
49
43
|
selector: _ => typographyOf({
|
|
50
|
-
fontSize:
|
|
51
|
-
lineHeight:
|
|
44
|
+
fontSize: 14,
|
|
45
|
+
lineHeight: 19.6,
|
|
52
46
|
fontFamily: 'PretendardStd-Regular',
|
|
53
47
|
letterSpacing: 0
|
|
54
48
|
}),
|
|
@@ -68,11 +62,7 @@ export default function ListItem(props) {
|
|
|
68
62
|
style: contentWrapperStyle
|
|
69
63
|
}, content) : /*#__PURE__*/React.createElement(View, {
|
|
70
64
|
style: contentWrapperStyle
|
|
71
|
-
}, content)
|
|
72
|
-
style: styles.dividerWrapper
|
|
73
|
-
}, /*#__PURE__*/React.createElement(View, {
|
|
74
|
-
style: styles.divider
|
|
75
|
-
})))
|
|
65
|
+
}, content))
|
|
76
66
|
);
|
|
77
67
|
}
|
|
78
68
|
;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","Platform","Text","View","typographyOf","ButtonBase","Row","createFontStyle","css","useTheme","useStyles","theme","content","
|
|
1
|
+
{"version":3,"names":["React","Platform","Text","View","typographyOf","ButtonBase","Row","createFontStyle","css","useTheme","useStyles","theme","content","borderBottomColor","palette","border","weak","borderBottomWidth","gap","spacing","paddingVertical","width","description","paddingRight","ListItem","props","alignItems","button","children","disabled","onPress","style","otherProps","styles","rootComponentProps","accessibilityRole","OS","undefined","contentWrapperStyle","descriptionFontStyle","selector","_","fontSize","lineHeight","fontFamily","letterSpacing","color","text","base"],"sources":["ListItem.tsx"],"sourcesContent":["import React from 'react';\nimport type { FlexStyle } from 'react-native';\nimport { Platform, Text, View } from 'react-native';\nimport type { NamedStylesStringUnion, UseStyles } from '@fountain-ui/styles';\nimport { typographyOf } from '@fountain-ui/styles';\nimport ButtonBase from '../ButtonBase';\nimport Row from '../Row';\nimport { createFontStyle, css, useTheme } from '../styles';\nimport type ListItemProps from './ListItemProps';\n\ntype ListItemStyles = NamedStylesStringUnion<'content' | 'description'>;\n\nconst useStyles: UseStyles<ListItemStyles> = function (): ListItemStyles {\n const theme = useTheme();\n\n return {\n content: {\n borderBottomColor: theme.palette.border.weak,\n borderBottomWidth: 0.5,\n gap: theme.spacing(2),\n paddingVertical: theme.spacing(3.75),\n width: '100%',\n },\n description: {\n paddingRight: theme.spacing(20),\n },\n };\n};\n\nexport default function ListItem(props: ListItemProps) {\n const {\n alignItems = 'center' as FlexStyle['alignItems'],\n button = false,\n children,\n description,\n disabled = false,\n onPress,\n style,\n ...otherProps\n } = props;\n\n const theme = useTheme();\n\n const styles = useStyles();\n\n const rootComponentProps = {\n accessibilityRole: Platform.OS === 'web' ? 'listitem' : undefined,\n ...otherProps,\n };\n\n const contentWrapperStyle = css([\n styles.content,\n style,\n ]);\n\n const descriptionFontStyle = createFontStyle(theme, {\n selector: (_) => typographyOf({\n fontSize: 14,\n lineHeight: 19.6,\n fontFamily: 'PretendardStd-Regular',\n letterSpacing: 0,\n }),\n color: theme.palette.text.base,\n });\n\n const content = (\n <React.Fragment>\n <Row alignItems={alignItems}>\n {children}\n </Row>\n\n {description ? (\n <Text style={css([\n styles.description,\n descriptionFontStyle,\n ])}>\n {description}\n </Text>\n ) : null}\n </React.Fragment>\n );\n\n return (\n // @ts-ignore\n <View {...rootComponentProps}>\n {button ? (\n <ButtonBase\n disabled={disabled}\n onPress={onPress}\n style={contentWrapperStyle}\n >\n {content}\n </ButtonBase>\n ) : (\n <View style={contentWrapperStyle}>\n {content}\n </View>\n )}\n </View>\n );\n};\n"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,OAAlB;AAEA,SAASC,QAAT,EAAmBC,IAAnB,EAAyBC,IAAzB,QAAqC,cAArC;AAEA,SAASC,YAAT,QAA6B,qBAA7B;AACA,OAAOC,UAAP,MAAuB,eAAvB;AACA,OAAOC,GAAP,MAAgB,QAAhB;AACA,SAASC,eAAT,EAA0BC,GAA1B,EAA+BC,QAA/B,QAA+C,WAA/C;;AAKA,MAAMC,SAAoC,GAAG,YAA4B;EACrE,MAAMC,KAAK,GAAGF,QAAQ,EAAtB;EAEA,OAAO;IACHG,OAAO,EAAE;MACLC,iBAAiB,EAAEF,KAAK,CAACG,OAAN,CAAcC,MAAd,CAAqBC,IADnC;MAELC,iBAAiB,EAAE,GAFd;MAGLC,GAAG,EAAEP,KAAK,CAACQ,OAAN,CAAc,CAAd,CAHA;MAILC,eAAe,EAAET,KAAK,CAACQ,OAAN,CAAc,IAAd,CAJZ;MAKLE,KAAK,EAAE;IALF,CADN;IAQHC,WAAW,EAAE;MACTC,YAAY,EAAEZ,KAAK,CAACQ,OAAN,CAAc,EAAd;IADL;EARV,CAAP;AAYH,CAfD;;AAiBA,eAAe,SAASK,QAAT,CAAkBC,KAAlB,EAAwC;EACnD,MAAM;IACFC,UAAU,GAAG,QADX;IAEFC,MAAM,GAAG,KAFP;IAGFC,QAHE;IAIFN,WAJE;IAKFO,QAAQ,GAAG,KALT;IAMFC,OANE;IAOFC,KAPE;IAQF,GAAGC;EARD,IASFP,KATJ;EAWA,MAAMd,KAAK,GAAGF,QAAQ,EAAtB;EAEA,MAAMwB,MAAM,GAAGvB,SAAS,EAAxB;EAEA,MAAMwB,kBAAkB,GAAG;IACvBC,iBAAiB,EAAElC,QAAQ,CAACmC,EAAT,KAAgB,KAAhB,GAAwB,UAAxB,GAAqCC,SADjC;IAEvB,GAAGL;EAFoB,CAA3B;EAKA,MAAMM,mBAAmB,GAAG9B,GAAG,CAAC,CAC5ByB,MAAM,CAACrB,OADqB,EAE5BmB,KAF4B,CAAD,CAA/B;EAKA,MAAMQ,oBAAoB,GAAGhC,eAAe,CAACI,KAAD,EAAQ;IAChD6B,QAAQ,EAAGC,CAAD,IAAOrC,YAAY,CAAC;MAC1BsC,QAAQ,EAAE,EADgB;MAE1BC,UAAU,EAAE,IAFc;MAG1BC,UAAU,EAAE,uBAHc;MAI1BC,aAAa,EAAE;IAJW,CAAD,CADmB;IAOhDC,KAAK,EAAEnC,KAAK,CAACG,OAAN,CAAciC,IAAd,CAAmBC;EAPsB,CAAR,CAA5C;EAUA,MAAMpC,OAAO,gBACT,oBAAC,KAAD,CAAO,QAAP,qBACI,oBAAC,GAAD;IAAK,UAAU,EAAEc;EAAjB,GACKE,QADL,CADJ,EAKKN,WAAW,gBACR,oBAAC,IAAD;IAAM,KAAK,EAAEd,GAAG,CAAC,CACbyB,MAAM,CAACX,WADM,EAEbiB,oBAFa,CAAD;EAAhB,GAIKjB,WAJL,CADQ,GAOR,IAZR,CADJ;EAiBA;IAAA;IACI;IACA,oBAAC,IAAD,EAAUY,kBAAV,EACKP,MAAM,gBACH,oBAAC,UAAD;MACI,QAAQ,EAAEE,QADd;MAEI,OAAO,EAAEC,OAFb;MAGI,KAAK,EAAEQ;IAHX,GAKK1B,OALL,CADG,gBASH,oBAAC,IAAD;MAAM,KAAK,EAAE0B;IAAb,GACK1B,OADL,CAVR;EAFJ;AAkBH;AAAA"}
|
|
@@ -25,8 +25,8 @@ export default function ListItemText(props) {
|
|
|
25
25
|
const styles = useStyles();
|
|
26
26
|
const fontStyle = createFontStyle(theme, {
|
|
27
27
|
selector: _ => typographyOf({
|
|
28
|
-
fontSize:
|
|
29
|
-
lineHeight:
|
|
28
|
+
fontSize: 16,
|
|
29
|
+
lineHeight: 19.2,
|
|
30
30
|
fontFamily: 'PretendardStd-Medium',
|
|
31
31
|
letterSpacing: 0
|
|
32
32
|
}),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","Text","typographyOf","Column","createFontStyle","css","useTheme","useStyles","root","flexGrow","flexShrink","ListItemText","props","children","style","otherProps","theme","styles","fontStyle","selector","_","fontSize","lineHeight","fontFamily","letterSpacing","color","palette","text","strong"],"sources":["ListItemText.tsx"],"sourcesContent":["import React from 'react';\nimport { Text } from 'react-native';\nimport type { NamedStylesStringUnion, UseStyles } from '@fountain-ui/styles';\nimport { typographyOf } from '@fountain-ui/styles';\nimport Column from '../Column';\nimport { createFontStyle, css, useTheme } from '../styles';\nimport type ListItemTextProps from './ListItemTextProps';\n\ntype ListItemTextStyles = NamedStylesStringUnion<'root'>;\n\nconst useStyles: UseStyles<ListItemTextStyles> = function (): ListItemTextStyles {\n return {\n root: {\n flexGrow: 1,\n flexShrink: 1,\n },\n };\n};\n\nexport default function ListItemText(props: ListItemTextProps) {\n const {\n children,\n style,\n ...otherProps\n } = props;\n\n const theme = useTheme();\n\n const styles = useStyles();\n\n const fontStyle = createFontStyle(theme, {\n selector: (_) => typographyOf({\n fontSize:
|
|
1
|
+
{"version":3,"names":["React","Text","typographyOf","Column","createFontStyle","css","useTheme","useStyles","root","flexGrow","flexShrink","ListItemText","props","children","style","otherProps","theme","styles","fontStyle","selector","_","fontSize","lineHeight","fontFamily","letterSpacing","color","palette","text","strong"],"sources":["ListItemText.tsx"],"sourcesContent":["import React from 'react';\nimport { Text } from 'react-native';\nimport type { NamedStylesStringUnion, UseStyles } from '@fountain-ui/styles';\nimport { typographyOf } from '@fountain-ui/styles';\nimport Column from '../Column';\nimport { createFontStyle, css, useTheme } from '../styles';\nimport type ListItemTextProps from './ListItemTextProps';\n\ntype ListItemTextStyles = NamedStylesStringUnion<'root'>;\n\nconst useStyles: UseStyles<ListItemTextStyles> = function (): ListItemTextStyles {\n return {\n root: {\n flexGrow: 1,\n flexShrink: 1,\n },\n };\n};\n\nexport default function ListItemText(props: ListItemTextProps) {\n const {\n children,\n style,\n ...otherProps\n } = props;\n\n const theme = useTheme();\n\n const styles = useStyles();\n\n const fontStyle = createFontStyle(theme, {\n selector: (_) => typographyOf({\n fontSize: 16,\n lineHeight: 19.2,\n fontFamily: 'PretendardStd-Medium',\n letterSpacing: 0,\n }),\n color: theme.palette.text.strong,\n });\n\n return (\n <Column\n style={css([\n styles.root,\n style,\n ])}\n {...otherProps}\n >\n <Text style={fontStyle}>\n {children}\n </Text>\n </Column>\n );\n};\n"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,IAAT,QAAqB,cAArB;AAEA,SAASC,YAAT,QAA6B,qBAA7B;AACA,OAAOC,MAAP,MAAmB,WAAnB;AACA,SAASC,eAAT,EAA0BC,GAA1B,EAA+BC,QAA/B,QAA+C,WAA/C;;AAKA,MAAMC,SAAwC,GAAG,YAAgC;EAC7E,OAAO;IACHC,IAAI,EAAE;MACFC,QAAQ,EAAE,CADR;MAEFC,UAAU,EAAE;IAFV;EADH,CAAP;AAMH,CAPD;;AASA,eAAe,SAASC,YAAT,CAAsBC,KAAtB,EAAgD;EAC3D,MAAM;IACFC,QADE;IAEFC,KAFE;IAGF,GAAGC;EAHD,IAIFH,KAJJ;EAMA,MAAMI,KAAK,GAAGV,QAAQ,EAAtB;EAEA,MAAMW,MAAM,GAAGV,SAAS,EAAxB;EAEA,MAAMW,SAAS,GAAGd,eAAe,CAACY,KAAD,EAAQ;IACrCG,QAAQ,EAAGC,CAAD,IAAOlB,YAAY,CAAC;MAC1BmB,QAAQ,EAAE,EADgB;MAE1BC,UAAU,EAAE,IAFc;MAG1BC,UAAU,EAAE,sBAHc;MAI1BC,aAAa,EAAE;IAJW,CAAD,CADQ;IAOrCC,KAAK,EAAET,KAAK,CAACU,OAAN,CAAcC,IAAd,CAAmBC;EAPW,CAAR,CAAjC;EAUA,oBACI,oBAAC,MAAD;IACI,KAAK,EAAEvB,GAAG,CAAC,CACPY,MAAM,CAACT,IADA,EAEPM,KAFO,CAAD;EADd,GAKQC,UALR,gBAOI,oBAAC,IAAD;IAAM,KAAK,EAAEG;EAAb,GACKL,QADL,CAPJ,CADJ;AAaH;AAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","Platform","Row","Typography","EdgeInsets","ListSubheader","props","children","disableTypography","otherProps","accessibilityRole","OS","undefined","horizontal"],"sources":["ListSubheader.tsx"],"sourcesContent":["import React from 'react';\nimport { Platform } from 'react-native';\nimport Row from '../Row';\nimport Typography from '../Typography';\nimport { EdgeInsets } from '../styles';\nimport type ListSubheaderProps from './ListSubheaderProps';\n\nexport default function ListSubheader(props: ListSubheaderProps) {\n const {\n children,\n disableTypography = false,\n ...otherProps\n } = props;\n\n const accessibilityRole = Platform.OS === 'web' ? 'listitem' : undefined;\n\n return (\n <Row\n // @ts-ignore\n accessibilityRole={accessibilityRole}\n insets={EdgeInsets.horizontal(4)}\n {...otherProps}\n >\n {disableTypography ? (\n children\n ) : (\n <Typography\n children={children}\n color={'strong'}\n variant={'
|
|
1
|
+
{"version":3,"names":["React","Platform","Row","Typography","EdgeInsets","ListSubheader","props","children","disableTypography","otherProps","accessibilityRole","OS","undefined","horizontal"],"sources":["ListSubheader.tsx"],"sourcesContent":["import React from 'react';\nimport { Platform } from 'react-native';\nimport Row from '../Row';\nimport Typography from '../Typography';\nimport { EdgeInsets } from '../styles';\nimport type ListSubheaderProps from './ListSubheaderProps';\n\nexport default function ListSubheader(props: ListSubheaderProps) {\n const {\n children,\n disableTypography = false,\n ...otherProps\n } = props;\n\n const accessibilityRole = Platform.OS === 'web' ? 'listitem' : undefined;\n\n return (\n <Row\n // @ts-ignore\n accessibilityRole={accessibilityRole}\n insets={EdgeInsets.horizontal(4)}\n {...otherProps}\n >\n {disableTypography ? (\n children\n ) : (\n <Typography\n children={children}\n color={'strong'}\n variant={'caption2'}\n />\n )}\n </Row>\n );\n};\n"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,QAAT,QAAyB,cAAzB;AACA,OAAOC,GAAP,MAAgB,QAAhB;AACA,OAAOC,UAAP,MAAuB,eAAvB;AACA,SAASC,UAAT,QAA2B,WAA3B;AAGA,eAAe,SAASC,aAAT,CAAuBC,KAAvB,EAAkD;EAC7D,MAAM;IACFC,QADE;IAEFC,iBAAiB,GAAG,KAFlB;IAGF,GAAGC;EAHD,IAIFH,KAJJ;EAMA,MAAMI,iBAAiB,GAAGT,QAAQ,CAACU,EAAT,KAAgB,KAAhB,GAAwB,UAAxB,GAAqCC,SAA/D;EAEA,oBACI,oBAAC,GAAD,CACI;EADJ;IAEI,iBAAiB,EAAEF,iBAFvB;IAGI,MAAM,EAAEN,UAAU,CAACS,UAAX,CAAsB,CAAtB;EAHZ,GAIQJ,UAJR,GAMKD,iBAAiB,GACdD,QADc,gBAGd,oBAAC,UAAD;IACI,QAAQ,EAAEA,QADd;IAEI,KAAK,EAAE,QAFX;IAGI,OAAO,EAAE;EAHb,EATR,CADJ;AAkBH;AAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
2
|
|
|
3
3
|
import React from 'react';
|
|
4
|
-
import { View } from 'react-native';
|
|
4
|
+
import { KeyboardAvoidingView, Platform, View } from 'react-native';
|
|
5
5
|
import { css, StyleSheet } from '../styles';
|
|
6
6
|
import { useElevationStyle } from '../hooks';
|
|
7
7
|
import AnimatedContainer from './AnimatedContainer';
|
|
@@ -14,7 +14,8 @@ export const createModalCloseEvent = reason => ({
|
|
|
14
14
|
export default function Modal(props) {
|
|
15
15
|
const {
|
|
16
16
|
animationStyle,
|
|
17
|
-
|
|
17
|
+
avoidKeyboard = false,
|
|
18
|
+
backdropOpacity = 0.75,
|
|
18
19
|
children,
|
|
19
20
|
closeAnimation,
|
|
20
21
|
disableAnimation = false,
|
|
@@ -66,25 +67,33 @@ export default function Modal(props) {
|
|
|
66
67
|
}
|
|
67
68
|
}
|
|
68
69
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
70
|
+
const Container = avoidKeyboard ? KeyboardAvoidingView : View;
|
|
71
|
+
const containerProps = avoidKeyboard ? {
|
|
72
|
+
behavior: Platform.OS === 'ios' ? 'padding' : undefined
|
|
73
|
+
} : {};
|
|
74
|
+
return (
|
|
75
|
+
/*#__PURE__*/
|
|
76
|
+
// @ts-expect-error
|
|
77
|
+
React.createElement(Container, _extends({}, containerProps, {
|
|
78
|
+
style: css([StyleSheet.absoluteFill, elevationStyle, style])
|
|
79
|
+
}, otherProps), !hideBackdrop && visible ? /*#__PURE__*/React.createElement(SimpleBackdrop, {
|
|
80
|
+
onPress: handleBackdropPress,
|
|
81
|
+
opacity: backdropOpacity
|
|
82
|
+
}) : null, !disableAnimation ? /*#__PURE__*/React.createElement(AnimatedContainer, {
|
|
83
|
+
children: children,
|
|
84
|
+
closeAnimation: closeAnimation,
|
|
85
|
+
initialOpacity: initialOpacity,
|
|
86
|
+
initialTranslateY: initialTranslateY,
|
|
87
|
+
onEnter: onEnter,
|
|
88
|
+
onEntered: onEntered,
|
|
89
|
+
onExit: onExit,
|
|
90
|
+
onExited: onExited,
|
|
91
|
+
openAnimation: openAnimation,
|
|
92
|
+
offsetAnimation: offsetAnimation,
|
|
93
|
+
style: animationStyle,
|
|
94
|
+
visible: visible
|
|
95
|
+
}) : children)
|
|
96
|
+
);
|
|
88
97
|
}
|
|
89
98
|
;
|
|
90
99
|
//# sourceMappingURL=Modal.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","View","css","StyleSheet","useElevationStyle","AnimatedContainer","SimpleBackdrop","createModalCloseEvent","reason","metadata","Modal","props","animationStyle","backdropOpacity","children","closeAnimation","disableAnimation","hideBackdrop","initialOpacity","initialTranslateY","onClose","onEnter","onEnterProp","onEntered","onEnteredProp","onExit","onExitProp","onExited","onExitedProp","openAnimation","offsetAnimation","style","visible","otherProps","handleBackdropPress","exited","setExited","useState","elevationStyle","absoluteFill"],"sources":["Modal.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\nimport { css, StyleSheet } from '../styles';\nimport { useElevationStyle } from '../hooks';\nimport type ModalProps from './ModalProps';\nimport AnimatedContainer from './AnimatedContainer';\nimport SimpleBackdrop from './SimpleBackdrop';\n\nexport type ModalCloseReasonType = 'OUTSIDE_PRESS' | 'HARDWARE_BACK_PRESS' | 'CLOSE_BUTTON_PRESS' | 'UNKNOWN';\n\nexport interface ModalCloseEvent {\n metadata: {\n reason: ModalCloseReasonType\n };\n}\n\nexport const createModalCloseEvent = (reason: ModalCloseReasonType) => ({\n metadata: {\n reason,\n },\n});\n\nexport default function Modal(props: ModalProps) {\n const {\n animationStyle,\n backdropOpacity = 0.
|
|
1
|
+
{"version":3,"names":["React","KeyboardAvoidingView","Platform","View","css","StyleSheet","useElevationStyle","AnimatedContainer","SimpleBackdrop","createModalCloseEvent","reason","metadata","Modal","props","animationStyle","avoidKeyboard","backdropOpacity","children","closeAnimation","disableAnimation","hideBackdrop","initialOpacity","initialTranslateY","onClose","onEnter","onEnterProp","onEntered","onEnteredProp","onExit","onExitProp","onExited","onExitedProp","openAnimation","offsetAnimation","style","visible","otherProps","handleBackdropPress","exited","setExited","useState","elevationStyle","Container","containerProps","behavior","OS","undefined","absoluteFill"],"sources":["Modal.tsx"],"sourcesContent":["import React from 'react';\nimport { KeyboardAvoidingView, Platform, View } from 'react-native';\nimport { css, StyleSheet } from '../styles';\nimport { useElevationStyle } from '../hooks';\nimport type ModalProps from './ModalProps';\nimport AnimatedContainer from './AnimatedContainer';\nimport SimpleBackdrop from './SimpleBackdrop';\n\nexport type ModalCloseReasonType = 'OUTSIDE_PRESS' | 'HARDWARE_BACK_PRESS' | 'CLOSE_BUTTON_PRESS' | 'UNKNOWN';\n\nexport interface ModalCloseEvent {\n metadata: {\n reason: ModalCloseReasonType\n };\n}\n\nexport const createModalCloseEvent = (reason: ModalCloseReasonType) => ({\n metadata: {\n reason,\n },\n});\n\nexport default function Modal(props: ModalProps) {\n const {\n animationStyle,\n avoidKeyboard = false,\n backdropOpacity = 0.75,\n children,\n closeAnimation,\n disableAnimation = false,\n hideBackdrop = false,\n initialOpacity,\n initialTranslateY,\n onClose,\n onEnter: onEnterProp,\n onEntered: onEnteredProp,\n onExit: onExitProp,\n onExited: onExitedProp,\n openAnimation,\n offsetAnimation,\n style,\n visible,\n ...otherProps\n } = props;\n\n const handleBackdropPress = () => {\n if (onClose) {\n onClose(createModalCloseEvent('OUTSIDE_PRESS'));\n }\n };\n\n const [exited, setExited] = React.useState(true);\n\n const elevationStyle = useElevationStyle(6);\n\n const onEnter = () => {\n setExited(false);\n onEnterProp?.();\n };\n\n const onEntered = () => {\n onEnteredProp?.();\n };\n\n const onExit = () => {\n onExitProp?.();\n };\n\n const onExited = () => {\n setExited(true);\n onExitedProp?.();\n };\n\n if (!visible) {\n if (disableAnimation || exited) {\n return null;\n }\n }\n\n const Container = avoidKeyboard ? KeyboardAvoidingView : View;\n const containerProps = avoidKeyboard ? {\n behavior: Platform.OS === 'ios' ? 'padding' : undefined,\n } : {};\n\n return (\n // @ts-expect-error\n <Container\n {...containerProps}\n style={css([\n StyleSheet.absoluteFill,\n elevationStyle,\n style,\n ])}\n {...otherProps}\n >\n {(!hideBackdrop && visible) ? (\n <SimpleBackdrop\n onPress={handleBackdropPress}\n opacity={backdropOpacity}\n />\n ) : null}\n\n {!disableAnimation ? (\n <AnimatedContainer\n children={children}\n closeAnimation={closeAnimation}\n initialOpacity={initialOpacity}\n initialTranslateY={initialTranslateY}\n onEnter={onEnter}\n onEntered={onEntered}\n onExit={onExit}\n onExited={onExited}\n openAnimation={openAnimation}\n offsetAnimation={offsetAnimation}\n style={animationStyle}\n visible={visible}\n />\n ) : children}\n </Container>\n );\n};\n"],"mappings":"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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["ANIMATION_TYPE"],"sources":["ModalProps.ts"],"sourcesContent":["import React from 'react';\nimport type { ViewProps } from 'react-native';\nimport { Animated } from 'react-native';\nimport type { ComponentProps, OverridableComponentProps } from '../types';\nimport { ModalCloseEvent } from './Modal';\n\nexport const enum ANIMATION_TYPE {\n SLIDE = 'slide',\n FADE = 'fade',\n}\n\nexport type AnimationUnit = Omit<Animated.TimingAnimationConfig, 'useNativeDriver'> & {\n /**\n * Type of animation used when the dialog opens and closes.\n */\n type: ANIMATION_TYPE;\n}\n\nexport default interface ModalProps extends OverridableComponentProps<ViewProps, {\n /**\n * Style object provided to animation component.\n */\n animationStyle?: ComponentProps['style'];\n\n /**\n * Opacity for backdrop.\n * @default 0.5\n */\n backdropOpacity?: number;\n\n /**\n * A single child content element.\n */\n children: React.ReactElement;\n\n /**\n * If `true`, the animation is disabled.\n * @default false\n */\n disableAnimation?: boolean;\n\n /**\n * Animation used when the modal closes.\n */\n closeAnimation?: AnimationUnit[] | undefined;\n\n /**\n * If `true`, the backdrop is not rendered.\n * @default false\n */\n hideBackdrop?: boolean;\n\n /**\n * Set the initial value of opacity for animating.\n */\n initialOpacity?: number | undefined;\n\n /**\n * Set the initial value of transition y for animating.\n */\n initialTranslateY?: number | undefined;\n\n /**\n * Callback fired when the component requests to be closed.\n */\n onClose?: (event?: ModalCloseEvent) => void;\n\n /**\n * Callback fired when the enter animation will start.\n */\n onEnter?: () => void | undefined;\n\n /**\n * Callback fired when the enter animation is completed.\n */\n onEntered?: () => void | undefined;\n\n /**\n * Callback fired when the exit animation will start.\n */\n onExit?: () => void | undefined;\n\n /**\n * Callback fired when the exit animation is completed.\n */\n onExited?: () => void | undefined;\n\n /**\n * Animation used when the modal opens.\n */\n openAnimation?: AnimationUnit[] | undefined;\n\n /**\n * Additional offset animation applied when the modal opens.\n */\n offsetAnimation?: AnimationUnit[] | undefined;\n\n /**\n * If `true`, the modal is visible.\n */\n visible: boolean;\n}> {}\n"],"mappings":"AAMA,WAAkBA,cAAlB;;WAAkBA,c;EAAAA,c;EAAAA,c;GAAAA,c,KAAAA,c"}
|
|
1
|
+
{"version":3,"names":["ANIMATION_TYPE"],"sources":["ModalProps.ts"],"sourcesContent":["import React from 'react';\nimport type { ViewProps } from 'react-native';\nimport { Animated } from 'react-native';\nimport type { ComponentProps, OverridableComponentProps } from '../types';\nimport { ModalCloseEvent } from './Modal';\n\nexport const enum ANIMATION_TYPE {\n SLIDE = 'slide',\n FADE = 'fade',\n}\n\nexport type AnimationUnit = Omit<Animated.TimingAnimationConfig, 'useNativeDriver'> & {\n /**\n * Type of animation used when the dialog opens and closes.\n */\n type: ANIMATION_TYPE;\n}\n\nexport default interface ModalProps extends OverridableComponentProps<ViewProps, {\n /**\n * Style object provided to animation component.\n */\n animationStyle?: ComponentProps['style'];\n\n /**\n * Opacity for backdrop.\n * @default 0.5\n */\n backdropOpacity?: number;\n\n /**\n * A single child content element.\n */\n children: React.ReactElement;\n\n /**\n * If `true`, the modal wraps its content in a `KeyboardAvoidingView` so\n * that on iOS the visible area shrinks when the software keyboard appears.\n * Intended for centered modals; leave `false` for bottom-anchored or\n * full-screen overlays that manage their own keyboard handling.\n * @default false\n */\n avoidKeyboard?: boolean;\n\n /**\n * If `true`, the animation is disabled.\n * @default false\n */\n disableAnimation?: boolean;\n\n /**\n * Animation used when the modal closes.\n */\n closeAnimation?: AnimationUnit[] | undefined;\n\n /**\n * If `true`, the backdrop is not rendered.\n * @default false\n */\n hideBackdrop?: boolean;\n\n /**\n * Set the initial value of opacity for animating.\n */\n initialOpacity?: number | undefined;\n\n /**\n * Set the initial value of transition y for animating.\n */\n initialTranslateY?: number | undefined;\n\n /**\n * Callback fired when the component requests to be closed.\n */\n onClose?: (event?: ModalCloseEvent) => void;\n\n /**\n * Callback fired when the enter animation will start.\n */\n onEnter?: () => void | undefined;\n\n /**\n * Callback fired when the enter animation is completed.\n */\n onEntered?: () => void | undefined;\n\n /**\n * Callback fired when the exit animation will start.\n */\n onExit?: () => void | undefined;\n\n /**\n * Callback fired when the exit animation is completed.\n */\n onExited?: () => void | undefined;\n\n /**\n * Animation used when the modal opens.\n */\n openAnimation?: AnimationUnit[] | undefined;\n\n /**\n * Additional offset animation applied when the modal opens.\n */\n offsetAnimation?: AnimationUnit[] | undefined;\n\n /**\n * If `true`, the modal is visible.\n */\n visible: boolean;\n}> {}\n"],"mappings":"AAMA,WAAkBA,cAAlB;;WAAkBA,c;EAAAA,c;EAAAA,c;GAAAA,c,KAAAA,c"}
|
|
@@ -32,7 +32,7 @@ export default function NumberPagination(props) {
|
|
|
32
32
|
const typography = typographyOf({
|
|
33
33
|
fontSize: 9.5,
|
|
34
34
|
lineHeight: 11.4,
|
|
35
|
-
fontFamily: '
|
|
35
|
+
fontFamily: 'PretendardStd-SemiBold',
|
|
36
36
|
letterSpacing: -0.19
|
|
37
37
|
});
|
|
38
38
|
const currentFontStyle = createFontStyle(theme, {
|
|
@@ -46,7 +46,9 @@ export default function NumberPagination(props) {
|
|
|
46
46
|
return /*#__PURE__*/React.createElement(Row, {
|
|
47
47
|
style: styles.root
|
|
48
48
|
}, /*#__PURE__*/React.createElement(Text, {
|
|
49
|
-
style: currentFontStyle
|
|
49
|
+
style: [currentFontStyle, {
|
|
50
|
+
fontVariant: ['tabular-nums']
|
|
51
|
+
}]
|
|
50
52
|
}, currentPage + 1), /*#__PURE__*/React.createElement(Divider, {
|
|
51
53
|
style: styles.divider,
|
|
52
54
|
vertical: true
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","Text","commonColors","typographyOf","Divider","Row","createFontStyle","useTheme","useStyles","theme","root","backgroundColor","static","weakOpacity","borderRadius","shape","radius","full","paddingHorizontal","spacing","paddingVertical","divider","alignSelf","borderColor","weakOpacityInverse","height","NumberPagination","props","currentPage","maxPage","styles","typography","fontSize","lineHeight","fontFamily","letterSpacing","currentFontStyle","selector","_","color","strongInverse","countFontStyle","baseOpacityInverse"],"sources":["NumberPagination.tsx"],"sourcesContent":["import React from 'react';\nimport { Text } from 'react-native';\nimport type { NamedStylesStringUnion, UseStyles } from '@fountain-ui/styles';\nimport { commonColors, typographyOf } from '@fountain-ui/styles';\nimport Divider from '../Divider';\nimport Row from '../Row';\nimport { createFontStyle, useTheme } from '../styles';\nimport type PaginationProps from './PaginationProps';\n\ntype NumberPaginationStyles = NamedStylesStringUnion<'root' | 'divider'>;\n\nconst useStyles: UseStyles<NumberPaginationStyles> = function (): NumberPaginationStyles {\n const theme = useTheme();\n\n return {\n root: {\n backgroundColor: commonColors.static.weakOpacity,\n borderRadius: theme.shape.radius.full,\n paddingHorizontal: theme.spacing(1.25),\n paddingVertical: theme.spacing(0.5),\n },\n divider: {\n alignSelf: 'center',\n borderColor: commonColors.static.weakOpacityInverse,\n height: 6,\n },\n };\n};\n\ninterface NumberPaginationProps {\n currentPage: PaginationProps['page'];\n maxPage: PaginationProps['count'];\n}\n\nexport default function NumberPagination(props: NumberPaginationProps) {\n const {\n currentPage,\n maxPage,\n } = props;\n\n const styles = useStyles();\n\n const theme = useTheme();\n\n const typography = typographyOf({\n fontSize: 9.5,\n lineHeight: 11.4,\n fontFamily: '
|
|
1
|
+
{"version":3,"names":["React","Text","commonColors","typographyOf","Divider","Row","createFontStyle","useTheme","useStyles","theme","root","backgroundColor","static","weakOpacity","borderRadius","shape","radius","full","paddingHorizontal","spacing","paddingVertical","divider","alignSelf","borderColor","weakOpacityInverse","height","NumberPagination","props","currentPage","maxPage","styles","typography","fontSize","lineHeight","fontFamily","letterSpacing","currentFontStyle","selector","_","color","strongInverse","countFontStyle","baseOpacityInverse","fontVariant"],"sources":["NumberPagination.tsx"],"sourcesContent":["import React from 'react';\nimport { Text } from 'react-native';\nimport type { NamedStylesStringUnion, UseStyles } from '@fountain-ui/styles';\nimport { commonColors, typographyOf } from '@fountain-ui/styles';\nimport Divider from '../Divider';\nimport Row from '../Row';\nimport { createFontStyle, useTheme } from '../styles';\nimport type PaginationProps from './PaginationProps';\n\ntype NumberPaginationStyles = NamedStylesStringUnion<'root' | 'divider'>;\n\nconst useStyles: UseStyles<NumberPaginationStyles> = function (): NumberPaginationStyles {\n const theme = useTheme();\n\n return {\n root: {\n backgroundColor: commonColors.static.weakOpacity,\n borderRadius: theme.shape.radius.full,\n paddingHorizontal: theme.spacing(1.25),\n paddingVertical: theme.spacing(0.5),\n },\n divider: {\n alignSelf: 'center',\n borderColor: commonColors.static.weakOpacityInverse,\n height: 6,\n },\n };\n};\n\ninterface NumberPaginationProps {\n currentPage: PaginationProps['page'];\n maxPage: PaginationProps['count'];\n}\n\nexport default function NumberPagination(props: NumberPaginationProps) {\n const {\n currentPage,\n maxPage,\n } = props;\n\n const styles = useStyles();\n\n const theme = useTheme();\n\n const typography = typographyOf({\n fontSize: 9.5,\n lineHeight: 11.4,\n fontFamily: 'PretendardStd-SemiBold',\n letterSpacing: -0.19,\n });\n\n const currentFontStyle = createFontStyle(theme, {\n selector: (_) => typography,\n color: commonColors.static.strongInverse,\n });\n\n const countFontStyle = createFontStyle(theme, {\n selector: (_) => typography,\n color: commonColors.static.baseOpacityInverse,\n });\n\n return (\n <Row style={styles.root}>\n <Text\n style={[\n currentFontStyle,\n { fontVariant: ['tabular-nums'] },\n ]}\n >\n {currentPage + 1}\n </Text>\n\n <Divider\n style={styles.divider}\n vertical={true}\n />\n\n <Text style={countFontStyle}>\n {maxPage}\n </Text>\n </Row>\n );\n}\n"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,IAAT,QAAqB,cAArB;AAEA,SAASC,YAAT,EAAuBC,YAAvB,QAA2C,qBAA3C;AACA,OAAOC,OAAP,MAAoB,YAApB;AACA,OAAOC,GAAP,MAAgB,QAAhB;AACA,SAASC,eAAT,EAA0BC,QAA1B,QAA0C,WAA1C;;AAKA,MAAMC,SAA4C,GAAG,YAAoC;EACrF,MAAMC,KAAK,GAAGF,QAAQ,EAAtB;EAEA,OAAO;IACHG,IAAI,EAAE;MACFC,eAAe,EAAET,YAAY,CAACU,MAAb,CAAoBC,WADnC;MAEFC,YAAY,EAAEL,KAAK,CAACM,KAAN,CAAYC,MAAZ,CAAmBC,IAF/B;MAGFC,iBAAiB,EAAET,KAAK,CAACU,OAAN,CAAc,IAAd,CAHjB;MAIFC,eAAe,EAAEX,KAAK,CAACU,OAAN,CAAc,GAAd;IAJf,CADH;IAOHE,OAAO,EAAE;MACLC,SAAS,EAAE,QADN;MAELC,WAAW,EAAErB,YAAY,CAACU,MAAb,CAAoBY,kBAF5B;MAGLC,MAAM,EAAE;IAHH;EAPN,CAAP;AAaH,CAhBD;;AAuBA,eAAe,SAASC,gBAAT,CAA0BC,KAA1B,EAAwD;EACnE,MAAM;IACFC,WADE;IAEFC;EAFE,IAGFF,KAHJ;EAKA,MAAMG,MAAM,GAAGtB,SAAS,EAAxB;EAEA,MAAMC,KAAK,GAAGF,QAAQ,EAAtB;EAEA,MAAMwB,UAAU,GAAG5B,YAAY,CAAC;IAC5B6B,QAAQ,EAAE,GADkB;IAE5BC,UAAU,EAAE,IAFgB;IAG5BC,UAAU,EAAE,wBAHgB;IAI5BC,aAAa,EAAE,CAAC;EAJY,CAAD,CAA/B;EAOA,MAAMC,gBAAgB,GAAG9B,eAAe,CAACG,KAAD,EAAQ;IAC5C4B,QAAQ,EAAGC,CAAD,IAAOP,UAD2B;IAE5CQ,KAAK,EAAErC,YAAY,CAACU,MAAb,CAAoB4B;EAFiB,CAAR,CAAxC;EAKA,MAAMC,cAAc,GAAGnC,eAAe,CAACG,KAAD,EAAQ;IAC1C4B,QAAQ,EAAGC,CAAD,IAAOP,UADyB;IAE1CQ,KAAK,EAAErC,YAAY,CAACU,MAAb,CAAoB8B;EAFe,CAAR,CAAtC;EAKA,oBACI,oBAAC,GAAD;IAAK,KAAK,EAAEZ,MAAM,CAACpB;EAAnB,gBACI,oBAAC,IAAD;IACI,KAAK,EAAE,CACH0B,gBADG,EAEH;MAAEO,WAAW,EAAE,CAAC,cAAD;IAAf,CAFG;EADX,GAMKf,WAAW,GAAG,CANnB,CADJ,eAUI,oBAAC,OAAD;IACI,KAAK,EAAEE,MAAM,CAACT,OADlB;IAEI,QAAQ,EAAE;EAFd,EAVJ,eAeI,oBAAC,IAAD;IAAM,KAAK,EAAEoB;EAAb,GACKZ,OADL,CAfJ,CADJ;AAqBH"}
|