@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
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { useMemo } from 'react';
|
|
2
|
+
import type { FountainUiStyle } from '@fountain-ui/styles';
|
|
3
|
+
import { useBreakpointUp } from '../hooks';
|
|
4
|
+
import { useTheme } from '../styles';
|
|
5
|
+
import type { TabSize, TabVariant } from '../Tab';
|
|
6
|
+
|
|
7
|
+
interface TabsStyle {
|
|
8
|
+
container: FountainUiStyle;
|
|
9
|
+
contentContainer?: FountainUiStyle;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export default function useTabsStyle(variant: TabVariant, size: TabSize, scrollable: boolean) {
|
|
13
|
+
const theme = useTheme();
|
|
14
|
+
|
|
15
|
+
const isSmallUp = useBreakpointUp('sm', true, false);
|
|
16
|
+
|
|
17
|
+
const isMediumUp = useBreakpointUp('md', true, false);
|
|
18
|
+
|
|
19
|
+
return useMemo<TabsStyle>(() => {
|
|
20
|
+
switch (variant) {
|
|
21
|
+
case 'circular': {
|
|
22
|
+
const paddingHorizontal = isSmallUp ? 20 : (size === 'small' ? 8 : 12);
|
|
23
|
+
|
|
24
|
+
return {
|
|
25
|
+
container: {
|
|
26
|
+
paddingBottom: 8,
|
|
27
|
+
paddingHorizontal: scrollable ? 0 : paddingHorizontal,
|
|
28
|
+
},
|
|
29
|
+
contentContainer: {
|
|
30
|
+
paddingHorizontal: scrollable ? paddingHorizontal : 0,
|
|
31
|
+
},
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
case 'circular-home': {
|
|
35
|
+
const paddingHorizontal = isSmallUp ? 20 : 8;
|
|
36
|
+
|
|
37
|
+
return {
|
|
38
|
+
container: {
|
|
39
|
+
paddingBottom: 8,
|
|
40
|
+
paddingHorizontal: scrollable ? 0 : paddingHorizontal,
|
|
41
|
+
},
|
|
42
|
+
contentContainer: {
|
|
43
|
+
paddingHorizontal: scrollable ? paddingHorizontal : 0,
|
|
44
|
+
},
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
case 'bottom-navigation': {
|
|
48
|
+
const paddingHorizontal = 24;
|
|
49
|
+
|
|
50
|
+
return {
|
|
51
|
+
container: {
|
|
52
|
+
...(isMediumUp ? {
|
|
53
|
+
alignSelf: 'center',
|
|
54
|
+
minWidth: 460,
|
|
55
|
+
} : {}),
|
|
56
|
+
justifyContent: 'space-between',
|
|
57
|
+
paddingHorizontal: scrollable ? 0 : paddingHorizontal,
|
|
58
|
+
},
|
|
59
|
+
contentContainer: {
|
|
60
|
+
paddingHorizontal: scrollable ? paddingHorizontal : 0,
|
|
61
|
+
},
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
case 'default':
|
|
65
|
+
default: {
|
|
66
|
+
const paddingHorizontal = isSmallUp ? 14 : 6;
|
|
67
|
+
|
|
68
|
+
return {
|
|
69
|
+
container: {
|
|
70
|
+
paddingHorizontal: scrollable ? 0 : paddingHorizontal,
|
|
71
|
+
},
|
|
72
|
+
contentContainer: {
|
|
73
|
+
paddingHorizontal: scrollable ? paddingHorizontal : 0,
|
|
74
|
+
},
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}, [theme, variant, isMediumUp, isSmallUp, size, scrollable]);
|
|
79
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useState } from 'react';
|
|
1
|
+
import React, { useCallback, useLayoutEffect, useRef, useState } from 'react';
|
|
2
2
|
import type { NativeSyntheticEvent, TextInputFocusEventData } from 'react-native';
|
|
3
3
|
import { Platform, StyleSheet, Text, TextInput, View } from 'react-native';
|
|
4
4
|
import type { FountainUiStyle } from '@fountain-ui/styles';
|
|
@@ -11,6 +11,8 @@ import type TextFieldProps from './TextFieldProps';
|
|
|
11
11
|
import type { TextFieldStatus, TextFieldVariant } from './TextFieldProps';
|
|
12
12
|
import useVariantStyleMap from './useVariantStyleMap';
|
|
13
13
|
|
|
14
|
+
const isWeb = Platform.OS === 'web';
|
|
15
|
+
|
|
14
16
|
const styles = StyleSheet.create({
|
|
15
17
|
root: {
|
|
16
18
|
alignItems: 'center',
|
|
@@ -19,9 +21,37 @@ const styles = StyleSheet.create({
|
|
|
19
21
|
input: {
|
|
20
22
|
flexGrow: 1,
|
|
21
23
|
},
|
|
24
|
+
inputWrapper: {
|
|
25
|
+
flexGrow: 1,
|
|
26
|
+
flexShrink: 1,
|
|
27
|
+
},
|
|
28
|
+
placeholderWrapper: {
|
|
29
|
+
...StyleSheet.absoluteFillObject,
|
|
30
|
+
justifyContent: 'center',
|
|
31
|
+
},
|
|
22
32
|
secureToggleButton: {
|
|
23
33
|
alignItems: 'flex-end',
|
|
24
34
|
padding: 0,
|
|
35
|
+
position: 'absolute',
|
|
36
|
+
right: 0,
|
|
37
|
+
},
|
|
38
|
+
searchIconContainer: {
|
|
39
|
+
left: 12,
|
|
40
|
+
position: 'absolute',
|
|
41
|
+
},
|
|
42
|
+
loadingSinner: {
|
|
43
|
+
height: 19,
|
|
44
|
+
width: 19,
|
|
45
|
+
},
|
|
46
|
+
clearButton: {
|
|
47
|
+
height: 36,
|
|
48
|
+
position: 'absolute',
|
|
49
|
+
right: 2,
|
|
50
|
+
width: 32,
|
|
51
|
+
},
|
|
52
|
+
secureButtonContainer: {
|
|
53
|
+
justifyContent: 'center',
|
|
54
|
+
width: 32,
|
|
25
55
|
},
|
|
26
56
|
});
|
|
27
57
|
|
|
@@ -29,15 +59,20 @@ const TextField = React.forwardRef<TextInput, TextFieldProps>(function TextField
|
|
|
29
59
|
const {
|
|
30
60
|
autoFocus,
|
|
31
61
|
containerStyle: containerStyleProp,
|
|
62
|
+
multiline,
|
|
32
63
|
editable = true,
|
|
33
64
|
hint,
|
|
65
|
+
inputFontSize = 'large',
|
|
34
66
|
isLoading,
|
|
67
|
+
maxLength,
|
|
35
68
|
onBlur,
|
|
36
69
|
onChangeText: onChangeTextProp,
|
|
37
70
|
onFocus,
|
|
71
|
+
placeholder: placeholderProp,
|
|
38
72
|
placeholderTextColor: placeholderTextColorProp,
|
|
39
73
|
secureTextEntry: secureTextEntryProp,
|
|
40
74
|
showClearButton: showClearButtonProp,
|
|
75
|
+
showWordCounter = false,
|
|
41
76
|
status = 'default' as TextFieldStatus,
|
|
42
77
|
style: styleProp,
|
|
43
78
|
title,
|
|
@@ -55,7 +90,18 @@ const TextField = React.forwardRef<TextInput, TextFieldProps>(function TextField
|
|
|
55
90
|
const [isFocused, setIsFocused] = useState<boolean>(autoFocus ?? false);
|
|
56
91
|
const [secureTextEntry, setSecureTextEntry] = useState<boolean>(secureTextEntryProp ?? false);
|
|
57
92
|
|
|
58
|
-
const
|
|
93
|
+
const internalRef = useRef<TextInput>(null);
|
|
94
|
+
|
|
95
|
+
const mergedRef = useCallback((node: TextInput | null) => {
|
|
96
|
+
(internalRef as React.MutableRefObject<TextInput | null>).current = node;
|
|
97
|
+
if (typeof ref === 'function') {
|
|
98
|
+
ref(node);
|
|
99
|
+
} else if (ref) {
|
|
100
|
+
(ref as React.MutableRefObject<TextInput | null>).current = node;
|
|
101
|
+
}
|
|
102
|
+
}, [ref]);
|
|
103
|
+
|
|
104
|
+
const variantStyles = useVariantStyleMap(variant, status, isFocused, inputFontSize);
|
|
59
105
|
|
|
60
106
|
const handleBlur = (event: NativeSyntheticEvent<TextInputFocusEventData>) => {
|
|
61
107
|
setIsFocused(false);
|
|
@@ -71,6 +117,21 @@ const TextField = React.forwardRef<TextInput, TextFieldProps>(function TextField
|
|
|
71
117
|
setSecureTextEntry((current) => !current);
|
|
72
118
|
};
|
|
73
119
|
|
|
120
|
+
const resizeHeight = useCallback(() => {
|
|
121
|
+
const el = internalRef.current as unknown as HTMLTextAreaElement | null;
|
|
122
|
+
if (el) {
|
|
123
|
+
el.style.height = 'auto';
|
|
124
|
+
el.style.height = `${el.scrollHeight}px`;
|
|
125
|
+
}
|
|
126
|
+
}, []);
|
|
127
|
+
|
|
128
|
+
useLayoutEffect(() => {
|
|
129
|
+
const shouldResizeHeight = multiline && isWeb;
|
|
130
|
+
if (shouldResizeHeight) {
|
|
131
|
+
resizeHeight();
|
|
132
|
+
}
|
|
133
|
+
}, [resizeHeight, multiline, value]);
|
|
134
|
+
|
|
74
135
|
const handleChangeText = (text: string) => {
|
|
75
136
|
onChangeTextProp?.(text);
|
|
76
137
|
};
|
|
@@ -89,11 +150,15 @@ const TextField = React.forwardRef<TextInput, TextFieldProps>(function TextField
|
|
|
89
150
|
const inputStyle = css([
|
|
90
151
|
styles.input,
|
|
91
152
|
variantStyles.inputStyle,
|
|
92
|
-
|
|
153
|
+
variantStyles.inputFontStyle,
|
|
154
|
+
isWeb ? { outlineWidth: 0 } as FountainUiStyle : {},
|
|
93
155
|
styleProp,
|
|
94
156
|
]);
|
|
95
157
|
|
|
96
|
-
const
|
|
158
|
+
const placeholderFontStyle = css([
|
|
159
|
+
variantStyles.inputFontStyle,
|
|
160
|
+
{ color: placeholderTextColorProp ?? theme.palette.status.disabledLabel },
|
|
161
|
+
]);
|
|
97
162
|
|
|
98
163
|
const containerStyle = css([
|
|
99
164
|
styles.root,
|
|
@@ -112,66 +177,96 @@ const TextField = React.forwardRef<TextInput, TextFieldProps>(function TextField
|
|
|
112
177
|
) : null}
|
|
113
178
|
|
|
114
179
|
<Row style={containerStyle}>
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
<
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
180
|
+
<React.Fragment>
|
|
181
|
+
{isSearch ? (
|
|
182
|
+
<View style={styles.searchIconContainer}>
|
|
183
|
+
{isLoading ? (
|
|
184
|
+
<LoadingSpinner style={styles.loadingSinner}/>
|
|
185
|
+
) : (
|
|
186
|
+
<Search
|
|
187
|
+
color={'base'}
|
|
188
|
+
height={19}
|
|
189
|
+
width={19}
|
|
190
|
+
/>
|
|
191
|
+
)}
|
|
192
|
+
</View>
|
|
193
|
+
) : null}
|
|
126
194
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
195
|
+
<View style={styles.inputWrapper}>
|
|
196
|
+
<View
|
|
197
|
+
pointerEvents={'none'}
|
|
198
|
+
style={styles.placeholderWrapper}
|
|
199
|
+
>
|
|
200
|
+
{placeholderProp && !value ? (
|
|
201
|
+
<Text
|
|
202
|
+
children={placeholderProp}
|
|
203
|
+
numberOfLines={1}
|
|
204
|
+
style={placeholderFontStyle}
|
|
205
|
+
/>
|
|
206
|
+
) : null}
|
|
207
|
+
</View>
|
|
208
|
+
|
|
209
|
+
<TextInput
|
|
210
|
+
autoFocus={autoFocus}
|
|
211
|
+
editable={!disabled}
|
|
212
|
+
maxLength={maxLength}
|
|
213
|
+
onBlur={handleBlur}
|
|
214
|
+
onChangeText={handleChangeText}
|
|
215
|
+
onFocus={handleFocus}
|
|
216
|
+
ref={mergedRef}
|
|
217
|
+
secureTextEntry={secureTextEntry}
|
|
218
|
+
style={inputStyle}
|
|
219
|
+
value={value}
|
|
220
|
+
multiline={multiline}
|
|
221
|
+
{...otherProps}
|
|
222
|
+
/>
|
|
223
|
+
</View>
|
|
224
|
+
</React.Fragment>
|
|
140
225
|
|
|
141
226
|
{showClearButton && value?.length && value.length > 0 ? (
|
|
142
227
|
<IconButton
|
|
143
228
|
color={'base'}
|
|
144
229
|
children={
|
|
145
230
|
<Clear
|
|
146
|
-
height={
|
|
147
|
-
width={15}
|
|
231
|
+
height={17.31}
|
|
232
|
+
width={15.9}
|
|
148
233
|
/>
|
|
149
234
|
}
|
|
150
235
|
onPress={handleClear}
|
|
236
|
+
style={styles.clearButton}
|
|
151
237
|
/>
|
|
152
238
|
) : null}
|
|
153
239
|
|
|
154
240
|
{secureTextEntryProp && !isSearch ? (
|
|
155
|
-
<
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
241
|
+
<View style={styles.secureButtonContainer}>
|
|
242
|
+
<IconButton
|
|
243
|
+
color={'base'}
|
|
244
|
+
onPress={handleSecureTogglePress}
|
|
245
|
+
style={styles.secureToggleButton}
|
|
246
|
+
>
|
|
247
|
+
{secureTextEntry ? (
|
|
248
|
+
<EyeOff
|
|
249
|
+
height={19}
|
|
250
|
+
width={17.42}
|
|
251
|
+
/>
|
|
252
|
+
) : (
|
|
253
|
+
<EyeOn
|
|
254
|
+
height={19}
|
|
255
|
+
width={17.42}
|
|
256
|
+
/>
|
|
257
|
+
)}
|
|
258
|
+
</IconButton>
|
|
259
|
+
</View>
|
|
172
260
|
) : null}
|
|
173
261
|
</Row>
|
|
174
262
|
|
|
263
|
+
{showWordCounter && maxLength && !isSearch ? (
|
|
264
|
+
<Text
|
|
265
|
+
children={`${value?.length ?? 0}/${maxLength}`}
|
|
266
|
+
style={variantStyles.hintStyle}
|
|
267
|
+
/>
|
|
268
|
+
) : null}
|
|
269
|
+
|
|
175
270
|
{hint && !isSearch ? (
|
|
176
271
|
<Text
|
|
177
272
|
children={hint}
|
|
@@ -9,6 +9,9 @@ export type TextFieldStatus = typeof textFieldStatus[number];
|
|
|
9
9
|
export const textFieldVariants = ['default', 'search'] as const;
|
|
10
10
|
export type TextFieldVariant = typeof textFieldVariants[number];
|
|
11
11
|
|
|
12
|
+
export const textFieldInputFontSizes = ['large', 'small'] as const;
|
|
13
|
+
export type TextFieldInputFontSize = typeof textFieldInputFontSizes[number];
|
|
14
|
+
|
|
12
15
|
export default interface TextFieldProps extends OverridableComponentProps<TextInputProps, {
|
|
13
16
|
/**
|
|
14
17
|
* Determines the style of the container that wraps the input.
|
|
@@ -47,4 +50,17 @@ export default interface TextFieldProps extends OverridableComponentProps<TextIn
|
|
|
47
50
|
* @default default
|
|
48
51
|
*/
|
|
49
52
|
variant?: TextFieldVariant;
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Determines the font size of the input.
|
|
56
|
+
* @default large
|
|
57
|
+
*/
|
|
58
|
+
inputFontSize?: TextFieldInputFontSize;
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Determines whether to display the word counter below the input.
|
|
62
|
+
* Requires maxLength to be set.
|
|
63
|
+
* @default false
|
|
64
|
+
*/
|
|
65
|
+
showWordCounter?: boolean;
|
|
50
66
|
}> {}
|
|
@@ -1,11 +1,38 @@
|
|
|
1
1
|
import { useMemo } from 'react';
|
|
2
|
+
import type { TextStyle } from 'react-native';
|
|
2
3
|
import type { FountainUiStyle, Theme } from '@fountain-ui/styles';
|
|
3
4
|
import { typographyOf } from '@fountain-ui/styles';
|
|
4
5
|
import { createFontStyle, useTheme } from '../styles';
|
|
5
|
-
import type { TextFieldStatus, TextFieldVariant } from './TextFieldProps';
|
|
6
|
+
import type { TextFieldInputFontSize, TextFieldStatus, TextFieldVariant } from './TextFieldProps';
|
|
7
|
+
|
|
8
|
+
const fontSizeStyleMap = {
|
|
9
|
+
large: {
|
|
10
|
+
fontSize: 18,
|
|
11
|
+
lineHeight: 27,
|
|
12
|
+
fontFamily: 'PretendardStd-SemiBold',
|
|
13
|
+
letterSpacing: 0,
|
|
14
|
+
},
|
|
15
|
+
small: {
|
|
16
|
+
fontSize: 14,
|
|
17
|
+
lineHeight: 21,
|
|
18
|
+
fontFamily: 'PretendardStd-Medium',
|
|
19
|
+
letterSpacing: 0,
|
|
20
|
+
},
|
|
21
|
+
} as const;
|
|
22
|
+
|
|
23
|
+
const containerPaddingMap = {
|
|
24
|
+
large: {
|
|
25
|
+
paddingVertical: 14,
|
|
26
|
+
},
|
|
27
|
+
small: {
|
|
28
|
+
paddingTop: 18,
|
|
29
|
+
paddingBottom: 16,
|
|
30
|
+
},
|
|
31
|
+
} as const;
|
|
6
32
|
|
|
7
33
|
interface VariantStyleMap {
|
|
8
34
|
containerStyle?: FountainUiStyle;
|
|
35
|
+
inputFontStyle?: TextStyle;
|
|
9
36
|
inputStyle?: FountainUiStyle;
|
|
10
37
|
hintStyle?: FountainUiStyle;
|
|
11
38
|
}
|
|
@@ -31,7 +58,12 @@ function useStatusColor(theme: Theme, status: TextFieldStatus): { borderColor: s
|
|
|
31
58
|
}
|
|
32
59
|
}
|
|
33
60
|
|
|
34
|
-
export default function useVariantStyleMap(
|
|
61
|
+
export default function useVariantStyleMap(
|
|
62
|
+
variant: TextFieldVariant,
|
|
63
|
+
status: TextFieldStatus,
|
|
64
|
+
isFocused: boolean,
|
|
65
|
+
inputFontSize: TextFieldInputFontSize = 'large',
|
|
66
|
+
): VariantStyleMap {
|
|
35
67
|
const theme = useTheme();
|
|
36
68
|
|
|
37
69
|
const {
|
|
@@ -47,24 +79,21 @@ export default function useVariantStyleMap(variant: TextFieldVariant, status: Te
|
|
|
47
79
|
containerStyle: {
|
|
48
80
|
borderBottomColor: status === 'default' && isFocused ? theme.palette.border.strong : borderColor,
|
|
49
81
|
borderBottomWidth: 1,
|
|
82
|
+
gap: 16,
|
|
83
|
+
minHeight: 54,
|
|
84
|
+
...containerPaddingMap[inputFontSize],
|
|
50
85
|
},
|
|
51
86
|
inputStyle: {
|
|
52
|
-
|
|
53
|
-
paddingVertical: theme.spacing(4),
|
|
54
|
-
...createFontStyle(theme, {
|
|
55
|
-
selector: (_) => typographyOf({
|
|
56
|
-
fontSize: 18,
|
|
57
|
-
lineHeight: 27,
|
|
58
|
-
fontFamily: 'PretendardStd-SemiBold',
|
|
59
|
-
letterSpacing: 0,
|
|
60
|
-
}),
|
|
61
|
-
color: theme.palette.text.strong,
|
|
62
|
-
}),
|
|
87
|
+
padding: 0,
|
|
63
88
|
},
|
|
89
|
+
inputFontStyle: createFontStyle(theme, {
|
|
90
|
+
selector: (_) => typographyOf(fontSizeStyleMap[inputFontSize]),
|
|
91
|
+
color: theme.palette.text.strong,
|
|
92
|
+
}),
|
|
64
93
|
hintStyle: {
|
|
65
94
|
marginTop: theme.spacing(2),
|
|
66
95
|
...createFontStyle(theme, {
|
|
67
|
-
|
|
96
|
+
selector: (typography) => typography.caption1['regular'],
|
|
68
97
|
color: hintColor,
|
|
69
98
|
}),
|
|
70
99
|
},
|
|
@@ -76,25 +105,23 @@ export default function useVariantStyleMap(variant: TextFieldVariant, status: Te
|
|
|
76
105
|
borderColor: theme.palette.border.base,
|
|
77
106
|
borderRadius: theme.shape.radius.md,
|
|
78
107
|
borderWidth: 0.5,
|
|
79
|
-
|
|
80
|
-
|
|
108
|
+
paddingBottom: 12,
|
|
109
|
+
paddingHorizontal: 39,
|
|
110
|
+
paddingTop: 11,
|
|
81
111
|
},
|
|
82
112
|
inputStyle: {
|
|
83
|
-
|
|
84
|
-
paddingLeft: theme.spacing(2),
|
|
85
|
-
paddingRight: theme.spacing(1),
|
|
86
|
-
paddingTop: theme.spacing(2.25),
|
|
87
|
-
...createFontStyle(theme, {
|
|
88
|
-
selector: (_) => typographyOf({
|
|
89
|
-
fontSize: 16,
|
|
90
|
-
lineHeight: 19.2,
|
|
91
|
-
fontFamily: 'PretendardStd-SemiBold',
|
|
92
|
-
letterSpacing: -0.16,
|
|
93
|
-
}),
|
|
94
|
-
color: theme.palette.text.strong,
|
|
95
|
-
}),
|
|
113
|
+
padding: 0,
|
|
96
114
|
},
|
|
115
|
+
inputFontStyle: createFontStyle(theme, {
|
|
116
|
+
selector: (_) => typographyOf({
|
|
117
|
+
fontSize: 16,
|
|
118
|
+
lineHeight: 19.2,
|
|
119
|
+
fontFamily: 'PretendardStd-SemiBold',
|
|
120
|
+
letterSpacing: -0.16,
|
|
121
|
+
}),
|
|
122
|
+
color: theme.palette.text.strong,
|
|
123
|
+
}),
|
|
97
124
|
};
|
|
98
125
|
}
|
|
99
|
-
}, [theme, borderColor, hintColor, variant, isFocused]);
|
|
126
|
+
}, [theme, borderColor, hintColor, variant, isFocused, inputFontSize]);
|
|
100
127
|
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { StyleSheet } from 'react-native';
|
|
3
|
+
import IconButton from '../../IconButton';
|
|
4
|
+
import { AppBarChevronLeft } from '../../internal';
|
|
5
|
+
import type BackButtonProps from './BackButtonProps';
|
|
6
|
+
import { css } from '@fountain-ui/styles';
|
|
7
|
+
|
|
8
|
+
const styles = StyleSheet.create({
|
|
9
|
+
root: {
|
|
10
|
+
height: 40,
|
|
11
|
+
left: 4,
|
|
12
|
+
paddingLeft: 5,
|
|
13
|
+
paddingRight: 11,
|
|
14
|
+
paddingVertical: 8,
|
|
15
|
+
position: 'absolute',
|
|
16
|
+
width: 40,
|
|
17
|
+
},
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
export default function BackButton(props: BackButtonProps) {
|
|
21
|
+
const {
|
|
22
|
+
style: styleProp,
|
|
23
|
+
...otherProps
|
|
24
|
+
} = props;
|
|
25
|
+
|
|
26
|
+
const rootStyle = css([
|
|
27
|
+
styles.root,
|
|
28
|
+
styleProp,
|
|
29
|
+
]);
|
|
30
|
+
|
|
31
|
+
return (
|
|
32
|
+
<IconButton
|
|
33
|
+
style={rootStyle}
|
|
34
|
+
{...otherProps}
|
|
35
|
+
>
|
|
36
|
+
<AppBarChevronLeft
|
|
37
|
+
height={24}
|
|
38
|
+
width={24}
|
|
39
|
+
/>
|
|
40
|
+
</IconButton>
|
|
41
|
+
);
|
|
42
|
+
}
|
package/src/Toolbar/Toolbar.tsx
CHANGED
|
@@ -1,23 +1,26 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { View } from 'react-native';
|
|
2
3
|
import type { FountainUiStyle, NamedStylesStringUnion, UseStyles } from '@fountain-ui/styles';
|
|
3
4
|
import Row from '../Row';
|
|
4
|
-
import {
|
|
5
|
+
import { useBreakpointUp } from '../hooks';
|
|
6
|
+
import { css } from '../styles';
|
|
7
|
+
import BackButton from './BackButton';
|
|
5
8
|
import type ToolbarProps from './ToolbarProps';
|
|
6
9
|
import type { ToolbarSize } from './ToolbarProps';
|
|
7
10
|
|
|
8
|
-
type ToolbarStyles = NamedStylesStringUnion<'
|
|
11
|
+
type ToolbarStyles = NamedStylesStringUnion<'container' | 'root'>;
|
|
9
12
|
|
|
10
13
|
const useStyles: UseStyles<ToolbarStyles> = function (): ToolbarStyles {
|
|
11
|
-
const
|
|
14
|
+
const shouldApplyHorizontalPadding = useBreakpointUp('sm', true, false);
|
|
12
15
|
|
|
13
16
|
return {
|
|
17
|
+
container: {
|
|
18
|
+
paddingHorizontal: shouldApplyHorizontalPadding ? 8 : 0,
|
|
19
|
+
},
|
|
14
20
|
root: {
|
|
15
21
|
alignItems: 'center',
|
|
16
22
|
flexWrap: 'nowrap',
|
|
17
23
|
},
|
|
18
|
-
gutters: {
|
|
19
|
-
paddingHorizontal: theme.spacing(4),
|
|
20
|
-
},
|
|
21
24
|
};
|
|
22
25
|
};
|
|
23
26
|
|
|
@@ -27,9 +30,8 @@ const sizeMap: Record<ToolbarSize, FountainUiStyle> = {
|
|
|
27
30
|
large: { height: 56 },
|
|
28
31
|
};
|
|
29
32
|
|
|
30
|
-
|
|
33
|
+
const Toolbar = (props: ToolbarProps) => {
|
|
31
34
|
const {
|
|
32
|
-
disableGutters = false,
|
|
33
35
|
size = 'medium',
|
|
34
36
|
style,
|
|
35
37
|
...otherProps
|
|
@@ -37,15 +39,22 @@ export default function Toolbar(props: ToolbarProps) {
|
|
|
37
39
|
|
|
38
40
|
const styles = useStyles();
|
|
39
41
|
|
|
42
|
+
const rootStyle = css([
|
|
43
|
+
styles.root,
|
|
44
|
+
sizeMap[size],
|
|
45
|
+
style,
|
|
46
|
+
]);
|
|
47
|
+
|
|
40
48
|
return (
|
|
41
|
-
<
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
])}
|
|
48
|
-
{...otherProps}
|
|
49
|
-
/>
|
|
49
|
+
<View style={styles.container}>
|
|
50
|
+
<Row
|
|
51
|
+
style={rootStyle}
|
|
52
|
+
{...otherProps}
|
|
53
|
+
/>
|
|
54
|
+
</View>
|
|
50
55
|
);
|
|
51
56
|
};
|
|
57
|
+
|
|
58
|
+
Toolbar.BackButton = BackButton;
|
|
59
|
+
|
|
60
|
+
export default Toolbar;
|
|
@@ -11,12 +11,6 @@ export default interface ToolbarProps extends OverridableComponentProps<RowProps
|
|
|
11
11
|
*/
|
|
12
12
|
children: React.ReactNode,
|
|
13
13
|
|
|
14
|
-
/**
|
|
15
|
-
* If `true`, disables gutter padding.
|
|
16
|
-
* @default false
|
|
17
|
-
*/
|
|
18
|
-
disableGutters?: boolean,
|
|
19
|
-
|
|
20
14
|
/**
|
|
21
15
|
* Determines the height of the toolbar.
|
|
22
16
|
* @default 'medium'
|
|
@@ -1,2 +1,6 @@
|
|
|
1
1
|
export { default } from './Beak';
|
|
2
2
|
export type { default as BeakProps } from './BeakProps';
|
|
3
|
+
export { default as HorizontalLargeBeak } from './HorizontalLargeBeak';
|
|
4
|
+
export { default as HorizontalSmallBeak } from './HorizontalSmallBeak';
|
|
5
|
+
export { default as VerticalLargeBeak } from './VerticalLargeBeak';
|
|
6
|
+
export { default as VerticalSmallBeak } from './VerticalSmallBeak';
|