@fountain-ui/core 3.0.0-alpha.3 → 3.0.0-alpha.31
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 +15 -8
- package/build/commonjs/Accordion/Accordion.js.map +1 -1
- package/build/commonjs/Accordion/AccordionProps.js.map +1 -1
- package/build/commonjs/Accordion/useVariantStyleMap.js +15 -8
- package/build/commonjs/Accordion/useVariantStyleMap.js.map +1 -1
- package/build/commonjs/AppBar/AppBar.js +7 -2
- package/build/commonjs/AppBar/AppBar.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/Badge/useVariantStyleMap.js +2 -2
- package/build/commonjs/Badge/useVariantStyleMap.js.map +1 -1
- package/build/commonjs/BottomSheetTitle/BottomSheetTitle.js +5 -2
- 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 +9 -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 +25 -14
- package/build/commonjs/Chip/Chip.js.map +1 -1
- package/build/commonjs/Chip/ChipProps.js +3 -1
- package/build/commonjs/Chip/ChipProps.js.map +1 -1
- package/build/commonjs/Chip/index.js +6 -0
- package/build/commonjs/Chip/index.js.map +1 -1
- package/build/commonjs/Chip/useChipStyle.js +51 -31
- package/build/commonjs/Chip/useChipStyle.js.map +1 -1
- package/build/commonjs/Dialog/Dialog.js +10 -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 +2 -2
- package/build/commonjs/Image/Image.js.map +1 -1
- package/build/commonjs/ImageCore/ImageCoreNative.js +1 -1
- package/build/commonjs/ImageCore/ImageCoreNative.js.map +1 -1
- package/build/commonjs/ListItem/ListItem.js +38 -26
- package/build/commonjs/ListItem/ListItem.js.map +1 -1
- package/build/commonjs/ListItem/ListItemProps.js.map +1 -1
- package/build/commonjs/ListItemIcon/ListItemIcon.js +1 -2
- package/build/commonjs/ListItemIcon/ListItemIcon.js.map +1 -1
- package/build/commonjs/ListItemSecondaryAction/ListItemSecondaryAction.js +2 -0
- package/build/commonjs/ListItemSecondaryAction/ListItemSecondaryAction.js.map +1 -1
- package/build/commonjs/ListItemText/ListItemText.js +20 -21
- package/build/commonjs/ListItemText/ListItemText.js.map +1 -1
- package/build/commonjs/ListItemText/ListItemTextProps.js.map +1 -1
- package/build/commonjs/ListSubheader/ListSubheader.js +1 -1
- package/build/commonjs/ListSubheader/ListSubheader.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 +11 -4
- package/build/commonjs/Radio/Radio.js.map +1 -1
- package/build/commonjs/RadioGroup/RadioGroup.js +2 -27
- package/build/commonjs/RadioGroup/RadioGroup.js.map +1 -1
- package/build/commonjs/Section/Section.js +32 -0
- package/build/commonjs/Section/Section.js.map +1 -0
- package/build/commonjs/Section/SectionProps.js +2 -0
- package/build/commonjs/Section/SectionProps.js.map +1 -0
- package/build/commonjs/Section/index.js +16 -0
- package/build/commonjs/Section/index.js.map +1 -0
- package/build/commonjs/ShadowView/ShadowView.native.js +4 -0
- package/build/commonjs/ShadowView/ShadowView.native.js.map +1 -1
- package/build/commonjs/SnackbarContent/SnackbarContent.js +26 -9
- 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 +59 -18
- 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 +23 -7
- 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 +80 -0
- package/build/commonjs/Tabs/useTabsStyle.js.map +1 -0
- package/build/commonjs/TextField/TextField.js +48 -12
- package/build/commonjs/TextField/TextField.js.map +1 -1
- package/build/commonjs/TextField/useVariantStyleMap.js +29 -29
- 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 +8 -4
- package/build/commonjs/Toolbar/Toolbar.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 +11 -18
- package/build/commonjs/Tooltip/Tooltip.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/useBreakpointUp.js +4 -1
- package/build/commonjs/hooks/useBreakpointUp.js.map +1 -1
- package/build/commonjs/hooks/useCollapsibleAppBar.js +3 -10
- package/build/commonjs/hooks/useCollapsibleAppBar.js.map +1 -1
- package/build/commonjs/hooks/useContentContainerStyle.js +39 -25
- package/build/commonjs/hooks/useContentContainerStyle.js.map +1 -1
- package/build/commonjs/hooks/useFadeInAppBar.js +2 -2
- package/build/commonjs/hooks/useFadeInAppBar.js.map +1 -1
- package/build/commonjs/index.js +21 -0
- package/build/commonjs/index.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/Search.js +2 -2
- package/build/commonjs/internal/icons/Search.js.map +1 -1
- package/build/commonjs/internal/icons/index.js +16 -0
- package/build/commonjs/internal/icons/index.js.map +1 -1
- package/build/module/Accordion/Accordion.js +15 -8
- package/build/module/Accordion/Accordion.js.map +1 -1
- package/build/module/Accordion/AccordionProps.js.map +1 -1
- package/build/module/Accordion/useVariantStyleMap.js +15 -8
- package/build/module/Accordion/useVariantStyleMap.js.map +1 -1
- package/build/module/AppBar/AppBar.js +6 -2
- package/build/module/AppBar/AppBar.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/Badge/useVariantStyleMap.js +2 -2
- package/build/module/Badge/useVariantStyleMap.js.map +1 -1
- package/build/module/BottomSheetTitle/BottomSheetTitle.js +5 -2
- 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 +9 -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 +21 -13
- package/build/module/Chip/Chip.js.map +1 -1
- package/build/module/Chip/ChipProps.js +1 -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 +51 -31
- package/build/module/Chip/useChipStyle.js.map +1 -1
- package/build/module/Dialog/Dialog.js +10 -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 +2 -2
- package/build/module/Image/Image.js.map +1 -1
- package/build/module/ImageCore/ImageCoreNative.js +1 -1
- package/build/module/ImageCore/ImageCoreNative.js.map +1 -1
- package/build/module/ListItem/ListItem.js +36 -28
- package/build/module/ListItem/ListItem.js.map +1 -1
- package/build/module/ListItem/ListItemProps.js.map +1 -1
- package/build/module/ListItemIcon/ListItemIcon.js +1 -2
- package/build/module/ListItemIcon/ListItemIcon.js.map +1 -1
- package/build/module/ListItemSecondaryAction/ListItemSecondaryAction.js +2 -0
- package/build/module/ListItemSecondaryAction/ListItemSecondaryAction.js.map +1 -1
- package/build/module/ListItemText/ListItemText.js +17 -19
- package/build/module/ListItemText/ListItemText.js.map +1 -1
- package/build/module/ListItemText/ListItemTextProps.js.map +1 -1
- package/build/module/ListSubheader/ListSubheader.js +1 -1
- package/build/module/ListSubheader/ListSubheader.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 +10 -4
- package/build/module/Radio/Radio.js.map +1 -1
- package/build/module/RadioGroup/RadioGroup.js +2 -20
- package/build/module/RadioGroup/RadioGroup.js.map +1 -1
- package/build/module/Section/Section.js +19 -0
- package/build/module/Section/Section.js.map +1 -0
- package/build/module/Section/SectionProps.js +2 -0
- package/build/module/Section/SectionProps.js.map +1 -0
- package/build/module/Section/index.js +2 -0
- package/build/module/Section/index.js.map +1 -0
- package/build/module/ShadowView/ShadowView.native.js +4 -0
- package/build/module/ShadowView/ShadowView.native.js.map +1 -1
- package/build/module/SnackbarContent/SnackbarContent.js +26 -9
- 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 +59 -18
- 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 +21 -7
- 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 +70 -0
- package/build/module/Tabs/useTabsStyle.js.map +1 -0
- package/build/module/TextField/TextField.js +48 -12
- package/build/module/TextField/TextField.js.map +1 -1
- package/build/module/TextField/useVariantStyleMap.js +29 -29
- 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 +7 -3
- package/build/module/Toolbar/Toolbar.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 +4 -10
- package/build/module/Tooltip/Tooltip.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/useBreakpointUp.js +4 -1
- package/build/module/hooks/useBreakpointUp.js.map +1 -1
- package/build/module/hooks/useCollapsibleAppBar.js +4 -10
- package/build/module/hooks/useCollapsibleAppBar.js.map +1 -1
- package/build/module/hooks/useContentContainerStyle.js +43 -25
- package/build/module/hooks/useContentContainerStyle.js.map +1 -1
- package/build/module/hooks/useFadeInAppBar.js +2 -2
- package/build/module/hooks/useFadeInAppBar.js.map +1 -1
- package/build/module/index.js +2 -0
- package/build/module/index.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/Search.js +2 -2
- package/build/module/internal/icons/Search.js.map +1 -1
- package/build/module/internal/icons/index.js +2 -0
- package/build/module/internal/icons/index.js.map +1 -1
- package/build/typescript/Accordion/AccordionProps.d.ts +4 -1
- package/build/typescript/Accordion/useVariantStyleMap.d.ts +1 -0
- package/build/typescript/Badge/BadgeProps.d.ts +10 -5
- package/build/typescript/BottomSheetTitle/BottomSheetTitleProps.d.ts +1 -0
- package/build/typescript/Button/ButtonProps.d.ts +5 -0
- package/build/typescript/ButtonBase/index.d.ts +1 -1
- package/build/typescript/Checkbox/useVariantStyleMap.d.ts +1 -0
- package/build/typescript/Chip/ChipProps.d.ts +11 -4
- package/build/typescript/Chip/index.d.ts +1 -1
- package/build/typescript/Chip/useChipStyle.d.ts +6 -3
- package/build/typescript/Dialog/DialogProps.d.ts +1 -6
- package/build/typescript/Dialog/useDialogStyle.d.ts +1 -1
- package/build/typescript/DialogTitle/DialogLargeTitle.d.ts +9 -0
- package/build/typescript/DialogTitle/DialogTitle.d.ts +6 -1
- package/build/typescript/Divider/DividerProps.d.ts +1 -1
- package/build/typescript/Flexbox/FlexboxProps.d.ts +4 -0
- package/build/typescript/IconButton/IconButtonProps.d.ts +1 -1
- package/build/typescript/ListItem/ListItem.d.ts +1 -1
- package/build/typescript/ListItem/ListItemProps.d.ts +4 -0
- package/build/typescript/ListItemText/ListItemTextProps.d.ts +2 -9
- 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/Section/Section.d.ts +3 -0
- package/build/typescript/Section/SectionProps.d.ts +6 -0
- package/build/typescript/Section/index.d.ts +2 -0
- 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/TabBaseProps.d.ts +0 -5
- 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/useVariantStyleMap.d.ts +2 -0
- package/build/typescript/Toolbar/BackButton/BackButton.d.ts +3 -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 -1
- package/build/typescript/Tooltip/Beaks/index.d.ts +4 -0
- package/build/typescript/Tooltip/index.d.ts +1 -0
- package/build/typescript/Typography/TypographyProps.d.ts +4 -0
- package/build/typescript/hooks/useCollapsibleAppBar.d.ts +0 -1
- package/build/typescript/hooks/useContentContainerStyle.d.ts +5 -8
- package/build/typescript/index.d.ts +2 -0
- package/build/typescript/internal/icons/AppBarChevronLeft.d.ts +131 -0
- package/build/typescript/internal/icons/ChipClose.d.ts +131 -0
- package/build/typescript/internal/icons/index.d.ts +2 -0
- package/package.json +5 -5
- package/src/Accordion/Accordion.tsx +18 -9
- package/src/Accordion/AccordionProps.ts +4 -2
- package/src/Accordion/useVariantStyleMap.ts +14 -6
- package/src/AppBar/AppBar.tsx +5 -1
- package/src/Badge/Badge.tsx +4 -3
- package/src/Badge/BadgeProps.ts +12 -6
- package/src/Badge/useVariantStyleMap.ts +2 -2
- package/src/BottomSheetTitle/BottomSheetTitle.tsx +4 -1
- package/src/BottomSheetTitle/BottomSheetTitleProps.ts +1 -0
- package/src/Button/Button.tsx +28 -12
- package/src/Button/ButtonProps.ts +6 -0
- package/src/Button/useVariantStyleMap.ts +9 -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 +24 -13
- package/src/Chip/ChipProps.ts +13 -4
- package/src/Chip/index.ts +1 -1
- package/src/Chip/useChipStyle.ts +59 -29
- package/src/Dialog/Dialog.tsx +12 -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 +3 -3
- package/src/ImageCore/ImageCoreNative.tsx +1 -1
- package/src/ListItem/ListItem.tsx +61 -30
- package/src/ListItem/ListItemProps.ts +5 -0
- package/src/ListItemIcon/ListItemIcon.tsx +1 -2
- package/src/ListItemSecondaryAction/ListItemSecondaryAction.tsx +2 -0
- package/src/ListItemText/ListItemText.tsx +20 -28
- package/src/ListItemText/ListItemTextProps.ts +2 -10
- package/src/ListSubheader/ListSubheader.tsx +1 -1
- 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 +12 -3
- package/src/RadioGroup/RadioGroup.tsx +2 -28
- package/src/Section/Section.tsx +26 -0
- package/src/Section/SectionProps.ts +6 -0
- package/src/Section/index.ts +2 -0
- package/src/ShadowView/ShadowView.native.tsx +4 -0
- package/src/SnackbarContent/SnackbarContent.tsx +36 -15
- 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 +72 -19
- package/src/TabBase/TabBase.tsx +1 -9
- package/src/TabBase/TabBaseProps.ts +0 -6
- package/src/Tabs/Tabs.tsx +26 -8
- package/src/Tabs/TabsProps.ts +7 -1
- package/src/Tabs/index.ts +1 -1
- package/src/Tabs/useTabsStyle.ts +77 -0
- package/src/TextField/TextField.tsx +69 -26
- package/src/TextField/useVariantStyleMap.ts +29 -27
- package/src/Toolbar/BackButton/BackButton.tsx +44 -0
- package/src/Toolbar/BackButton/BackButtonProps.ts +4 -0
- package/src/Toolbar/BackButton/index.ts +2 -0
- package/src/Toolbar/Toolbar.tsx +6 -1
- package/src/Tooltip/Beaks/index.ts +4 -0
- package/src/Tooltip/Tooltip.tsx +4 -9
- package/src/Tooltip/index.ts +1 -0
- package/src/Typography/Typography.tsx +3 -1
- package/src/Typography/TypographyProps.ts +5 -0
- package/src/hooks/useBreakpointUp.ts +3 -1
- package/src/hooks/useCollapsibleAppBar.ts +4 -23
- package/src/hooks/useContentContainerStyle.ts +43 -31
- package/src/hooks/useFadeInAppBar.ts +2 -2
- package/src/index.ts +3 -0
- 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/Search.tsx +2 -2
- package/src/internal/icons/index.ts +2 -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
package/src/Chip/index.ts
CHANGED
package/src/Chip/useChipStyle.ts
CHANGED
|
@@ -1,23 +1,49 @@
|
|
|
1
1
|
import { useMemo } from 'react';
|
|
2
2
|
import type { TextStyle } from 'react-native';
|
|
3
3
|
import type { FountainUiStyle } from '@fountain-ui/styles';
|
|
4
|
+
import type { SvgIconProps } from '../SvgIcon';
|
|
4
5
|
import { createFontStyle, useTheme } from '../styles';
|
|
5
|
-
import type { ChipSize, ChipStartElementVariant } from './ChipProps';
|
|
6
|
+
import type { ChipColor, ChipSize, ChipStartElementVariant } from './ChipProps';
|
|
6
7
|
|
|
7
8
|
interface ChipStyle {
|
|
8
9
|
container: FountainUiStyle;
|
|
9
|
-
|
|
10
|
+
closeButtonContainer?: FountainUiStyle;
|
|
11
|
+
closeIconSize?: Pick<SvgIconProps, 'height' | 'width'>;
|
|
10
12
|
label: TextStyle;
|
|
11
13
|
startElement?: FountainUiStyle;
|
|
14
|
+
startElementContainer?: FountainUiStyle;
|
|
12
15
|
}
|
|
13
16
|
|
|
14
17
|
type VariantStyleMap = Record<ChipStartElementVariant, Partial<ChipStyle>>;
|
|
15
18
|
|
|
19
|
+
const closeButtonContainerStyleMap: Record<ChipSize, FountainUiStyle> = {
|
|
20
|
+
small: {
|
|
21
|
+
marginLeft: 8,
|
|
22
|
+
paddingTop: 1,
|
|
23
|
+
},
|
|
24
|
+
large: {
|
|
25
|
+
marginLeft: 10,
|
|
26
|
+
paddingTop: 1,
|
|
27
|
+
},
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
const closeIconSize: Record<ChipSize, ChipStyle['closeIconSize']> = {
|
|
31
|
+
small: {
|
|
32
|
+
height: 14,
|
|
33
|
+
width: 8.17,
|
|
34
|
+
},
|
|
35
|
+
large: {
|
|
36
|
+
height: 16,
|
|
37
|
+
width: 9,
|
|
38
|
+
},
|
|
39
|
+
};
|
|
40
|
+
|
|
16
41
|
// TODO: need to refactoring...
|
|
17
42
|
export default function useChipStyle(
|
|
18
43
|
size: ChipSize,
|
|
19
44
|
startElementVariant: ChipStartElementVariant,
|
|
20
|
-
|
|
45
|
+
color: ChipColor,
|
|
46
|
+
selected: boolean,
|
|
21
47
|
): ChipStyle {
|
|
22
48
|
const theme = useTheme();
|
|
23
49
|
|
|
@@ -25,30 +51,20 @@ export default function useChipStyle(
|
|
|
25
51
|
const fontStyleMap: Record<ChipSize, TextStyle> = {
|
|
26
52
|
small: createFontStyle(theme, {
|
|
27
53
|
selector: (typography) => typography.caption1.medium,
|
|
28
|
-
color: theme.palette.text.strong,
|
|
54
|
+
color: selected ? theme.palette.text.strongInverse : theme.palette.text.strong,
|
|
29
55
|
}),
|
|
30
56
|
large: createFontStyle(theme, {
|
|
31
57
|
selector: (typography) => typography.body2.medium,
|
|
32
|
-
color: theme.palette.text.strong,
|
|
58
|
+
color: selected ? theme.palette.text.strongInverse : theme.palette.text.strong,
|
|
33
59
|
}),
|
|
34
60
|
};
|
|
35
61
|
|
|
36
|
-
const endElementStyleMap: Record<ChipSize, FountainUiStyle> = {
|
|
37
|
-
small: {
|
|
38
|
-
height: 14,
|
|
39
|
-
marginLeft: theme.spacing(2),
|
|
40
|
-
width: 8.17,
|
|
41
|
-
},
|
|
42
|
-
large: {
|
|
43
|
-
height: 16,
|
|
44
|
-
marginLeft: theme.spacing(2.5),
|
|
45
|
-
width: 9,
|
|
46
|
-
},
|
|
47
|
-
};
|
|
48
|
-
|
|
49
62
|
const baseContainerStyle: FountainUiStyle = {
|
|
50
63
|
alignItems: 'center',
|
|
51
|
-
backgroundColor: theme.palette.fill.
|
|
64
|
+
backgroundColor: selected ? theme.palette.fill.base
|
|
65
|
+
: color === 'white'
|
|
66
|
+
? theme.palette.surface.base
|
|
67
|
+
: theme.palette.fill.weaker,
|
|
52
68
|
borderRadius: theme.shape.radius.full,
|
|
53
69
|
flexDirection: 'row',
|
|
54
70
|
overflow: 'hidden',
|
|
@@ -65,9 +81,11 @@ export default function useChipStyle(
|
|
|
65
81
|
},
|
|
66
82
|
startElement: {
|
|
67
83
|
borderRadius: theme.shape.radius.full,
|
|
68
|
-
height: isLarge ?
|
|
84
|
+
height: isLarge ? 26 : 23,
|
|
85
|
+
width: isLarge ? 26 : 23,
|
|
86
|
+
},
|
|
87
|
+
startElementContainer: {
|
|
69
88
|
marginRight: theme.spacing(isLarge ? 1.5 : 1.25),
|
|
70
|
-
width: isLarge ? 24 : 22,
|
|
71
89
|
},
|
|
72
90
|
},
|
|
73
91
|
icon: {
|
|
@@ -77,11 +95,18 @@ export default function useChipStyle(
|
|
|
77
95
|
paddingVertical: theme.spacing(isLarge ? 1.5 : 1.25),
|
|
78
96
|
},
|
|
79
97
|
startElement: {
|
|
98
|
+
color: selected
|
|
99
|
+
? theme.palette.icon.strongInverse
|
|
100
|
+
: theme.palette.icon.strong,
|
|
101
|
+
height: isLarge ? 17 : 16,
|
|
102
|
+
width: isLarge ? 17 : 16,
|
|
103
|
+
},
|
|
104
|
+
startElementContainer: {
|
|
80
105
|
alignItems: 'center',
|
|
81
|
-
height: isLarge ?
|
|
106
|
+
height: isLarge ? 24 : 21,
|
|
82
107
|
justifyContent: 'center',
|
|
83
108
|
marginRight: theme.spacing(isLarge ? 1 : 0.75),
|
|
84
|
-
width: isLarge ?
|
|
109
|
+
width: isLarge ? 24 : 21,
|
|
85
110
|
},
|
|
86
111
|
},
|
|
87
112
|
image: {
|
|
@@ -91,15 +116,18 @@ export default function useChipStyle(
|
|
|
91
116
|
},
|
|
92
117
|
startElement: {
|
|
93
118
|
borderRadius: theme.shape.radius.full,
|
|
94
|
-
height: isLarge ?
|
|
119
|
+
height: isLarge ? 36 : 31,
|
|
120
|
+
width: isLarge ? 48 : 40,
|
|
121
|
+
},
|
|
122
|
+
startElementContainer: {
|
|
95
123
|
marginRight: theme.spacing(1.5),
|
|
96
|
-
width: isLarge ? 45 : 40,
|
|
97
124
|
},
|
|
98
125
|
},
|
|
99
126
|
default: {
|
|
100
127
|
container: {
|
|
101
128
|
paddingBottom: theme.spacing(1.75),
|
|
102
|
-
|
|
129
|
+
paddingLeft: theme.spacing(isLarge ? 3.5 : 3),
|
|
130
|
+
paddingRight: theme.spacing(isLarge ? 3.5 : 3),
|
|
103
131
|
paddingTop: theme.spacing(1.5),
|
|
104
132
|
},
|
|
105
133
|
},
|
|
@@ -109,11 +137,13 @@ export default function useChipStyle(
|
|
|
109
137
|
container: {
|
|
110
138
|
...baseContainerStyle,
|
|
111
139
|
...variantStyleMap[startElementVariant]?.container,
|
|
112
|
-
...(
|
|
140
|
+
...(selected ? { paddingRight: theme.spacing(isLarge ? 2.5 : 2.25) } : {}),
|
|
113
141
|
},
|
|
114
|
-
|
|
142
|
+
closeButtonContainer: closeButtonContainerStyleMap[size],
|
|
143
|
+
closeIconSize: closeIconSize[size],
|
|
115
144
|
label: fontStyleMap[size],
|
|
116
145
|
startElement: variantStyleMap[startElementVariant]?.startElement,
|
|
146
|
+
startElementContainer: variantStyleMap[startElementVariant]?.startElementContainer,
|
|
117
147
|
};
|
|
118
|
-
}, [theme, size, startElementVariant]);
|
|
148
|
+
}, [theme, size, startElementVariant, color, selected]);
|
|
119
149
|
}
|
package/src/Dialog/Dialog.tsx
CHANGED
|
@@ -8,13 +8,12 @@ import type DialogProps from './DialogProps';
|
|
|
8
8
|
import { DialogProvider } from './DialogContext';
|
|
9
9
|
import useDialogStyle from './useDialogStyle';
|
|
10
10
|
|
|
11
|
-
const
|
|
11
|
+
const TOP_ELEMENT_HIDDEN_OFFSET = 16;
|
|
12
12
|
|
|
13
13
|
export default function Dialog(props: DialogProps) {
|
|
14
14
|
const {
|
|
15
15
|
animationType = ANIMATION_TYPE.SLIDE,
|
|
16
16
|
children,
|
|
17
|
-
fullScreen = false,
|
|
18
17
|
hideBackdrop,
|
|
19
18
|
onClose,
|
|
20
19
|
style: styleProp,
|
|
@@ -24,7 +23,7 @@ export default function Dialog(props: DialogProps) {
|
|
|
24
23
|
...otherProps
|
|
25
24
|
} = props;
|
|
26
25
|
|
|
27
|
-
const styles = useDialogStyle(size
|
|
26
|
+
const styles = useDialogStyle(size);
|
|
28
27
|
|
|
29
28
|
const { height: screenHeight } = useWindowDimensions();
|
|
30
29
|
|
|
@@ -39,8 +38,10 @@ export default function Dialog(props: DialogProps) {
|
|
|
39
38
|
return [];
|
|
40
39
|
}
|
|
41
40
|
|
|
41
|
+
const topElementHeightWithoutOffset = Math.max(0, topElementHeight - TOP_ELEMENT_HIDDEN_OFFSET);
|
|
42
|
+
|
|
42
43
|
return [{
|
|
43
|
-
toValue: (
|
|
44
|
+
toValue: (topElementHeightWithoutOffset) / 2,
|
|
44
45
|
type: ANIMATION_TYPE.SLIDE,
|
|
45
46
|
}];
|
|
46
47
|
}, [topElementHeight]);
|
|
@@ -51,7 +52,7 @@ export default function Dialog(props: DialogProps) {
|
|
|
51
52
|
toValue: 0,
|
|
52
53
|
type: ANIMATION_TYPE.FADE,
|
|
53
54
|
}];
|
|
54
|
-
} else if (animationType === ANIMATION_TYPE.SLIDE
|
|
55
|
+
} else if (animationType === ANIMATION_TYPE.SLIDE) {
|
|
55
56
|
return [
|
|
56
57
|
{
|
|
57
58
|
toValue: screenHeight,
|
|
@@ -70,7 +71,7 @@ export default function Dialog(props: DialogProps) {
|
|
|
70
71
|
toValue: screenHeight,
|
|
71
72
|
type: ANIMATION_TYPE.SLIDE,
|
|
72
73
|
}];
|
|
73
|
-
}, [animationType,
|
|
74
|
+
}, [animationType, screenHeight]);
|
|
74
75
|
|
|
75
76
|
const openAnimation = useMemo<AnimationUnit[]>(() => {
|
|
76
77
|
if (animationType === ANIMATION_TYPE.FADE) {
|
|
@@ -78,7 +79,7 @@ export default function Dialog(props: DialogProps) {
|
|
|
78
79
|
toValue: 1,
|
|
79
80
|
type: ANIMATION_TYPE.FADE,
|
|
80
81
|
}];
|
|
81
|
-
} else if (animationType === ANIMATION_TYPE.SLIDE
|
|
82
|
+
} else if (animationType === ANIMATION_TYPE.SLIDE) {
|
|
82
83
|
return [
|
|
83
84
|
{
|
|
84
85
|
toValue: 0,
|
|
@@ -97,9 +98,9 @@ export default function Dialog(props: DialogProps) {
|
|
|
97
98
|
toValue: 0,
|
|
98
99
|
type: ANIMATION_TYPE.SLIDE,
|
|
99
100
|
}];
|
|
100
|
-
}, [animationType
|
|
101
|
+
}, [animationType]);
|
|
101
102
|
|
|
102
|
-
const initialOpacity = animationType === ANIMATION_TYPE.SLIDE
|
|
103
|
+
const initialOpacity = animationType === ANIMATION_TYPE.SLIDE ? 1 : undefined;
|
|
103
104
|
|
|
104
105
|
const initialTranslateY = animationType === ANIMATION_TYPE.FADE ? 0 : undefined;
|
|
105
106
|
|
|
@@ -124,7 +125,7 @@ export default function Dialog(props: DialogProps) {
|
|
|
124
125
|
>
|
|
125
126
|
<DialogProvider value={{ size }}>
|
|
126
127
|
{topElement ? (
|
|
127
|
-
<Column style={
|
|
128
|
+
<Column style={styles.topElementContainer}>
|
|
128
129
|
<Column
|
|
129
130
|
style={styles.topElementContent}
|
|
130
131
|
onLayout={handleTopElementLayout}
|
|
@@ -143,4 +144,4 @@ export default function Dialog(props: DialogProps) {
|
|
|
143
144
|
</DialogProvider>
|
|
144
145
|
</Modal>
|
|
145
146
|
);
|
|
146
|
-
}
|
|
147
|
+
}
|
|
@@ -3,7 +3,7 @@ import type { ModalProps } from '../Modal';
|
|
|
3
3
|
import type { OverridableComponentProps } from '../types';
|
|
4
4
|
import { ANIMATION_TYPE } from '../Modal';
|
|
5
5
|
|
|
6
|
-
export const dialogSizes = ['small', 'medium', 'large'] as const;
|
|
6
|
+
export const dialogSizes = ['small', 'medium', 'large', 'full'] as const;
|
|
7
7
|
export type DialogSize = typeof dialogSizes[number];
|
|
8
8
|
|
|
9
9
|
export default interface DialogProps extends OverridableComponentProps<ModalProps, {
|
|
@@ -18,12 +18,6 @@ export default interface DialogProps extends OverridableComponentProps<ModalProp
|
|
|
18
18
|
*/
|
|
19
19
|
children?: React.ReactNode;
|
|
20
20
|
|
|
21
|
-
/**
|
|
22
|
-
* If `true`, the dialog is full-screen.
|
|
23
|
-
* @default false
|
|
24
|
-
*/
|
|
25
|
-
fullScreen?: boolean;
|
|
26
|
-
|
|
27
21
|
/**
|
|
28
22
|
* Determines the minWidth of the Dialog.
|
|
29
23
|
* @default 'medium'
|
|
@@ -15,14 +15,16 @@ export default function useDialogSectionStyle() {
|
|
|
15
15
|
return useMemo<FountainUiStyle>(() => {
|
|
16
16
|
const sizePaddingHorizontalMap: Record<DialogSize, FountainUiStyle> = {
|
|
17
17
|
small: {
|
|
18
|
-
paddingHorizontal:
|
|
18
|
+
paddingHorizontal: 24,
|
|
19
19
|
},
|
|
20
20
|
medium: {
|
|
21
|
-
|
|
22
|
-
paddingHorizontal: theme.spacing(windowWidth >= 448 ? 8 : 6),
|
|
21
|
+
paddingHorizontal: windowWidth >= 448 ? 32 : 24,
|
|
23
22
|
},
|
|
24
23
|
large: {
|
|
25
|
-
paddingHorizontal:
|
|
24
|
+
paddingHorizontal: 32,
|
|
25
|
+
},
|
|
26
|
+
full: {
|
|
27
|
+
paddingHorizontal: windowWidth >= 448 ? 32 : 24,
|
|
26
28
|
},
|
|
27
29
|
};
|
|
28
30
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { useMemo } from 'react';
|
|
2
2
|
import { useWindowDimensions } from 'react-native';
|
|
3
|
+
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
3
4
|
import type { FountainUiStyle, NamedStylesStringUnion } from '@fountain-ui/styles';
|
|
4
5
|
import { useTheme } from '../styles';
|
|
5
6
|
import type { DialogSize } from './DialogProps';
|
|
@@ -13,7 +14,7 @@ type DialogStyleKeys =
|
|
|
13
14
|
|
|
14
15
|
type DialogStyles = NamedStylesStringUnion<DialogStyleKeys>;
|
|
15
16
|
|
|
16
|
-
export default function useDialogStyle(size: DialogSize
|
|
17
|
+
export default function useDialogStyle(size: DialogSize): DialogStyles {
|
|
17
18
|
const theme = useTheme();
|
|
18
19
|
|
|
19
20
|
const {
|
|
@@ -21,6 +22,11 @@ export default function useDialogStyle(size: DialogSize, fullScreen: boolean): D
|
|
|
21
22
|
width: windowWidth,
|
|
22
23
|
} = useWindowDimensions();
|
|
23
24
|
|
|
25
|
+
const {
|
|
26
|
+
bottom: bottomSafeAreaInset,
|
|
27
|
+
top: topSafeAreaInset,
|
|
28
|
+
} = useSafeAreaInsets();
|
|
29
|
+
|
|
24
30
|
return useMemo(() => {
|
|
25
31
|
const sizeStyleMap: Record<DialogSize, FountainUiStyle> = {
|
|
26
32
|
small: {
|
|
@@ -34,32 +40,38 @@ export default function useDialogStyle(size: DialogSize, fullScreen: boolean): D
|
|
|
34
40
|
minHeight: 360,
|
|
35
41
|
width: 512,
|
|
36
42
|
},
|
|
43
|
+
full: {
|
|
44
|
+
paddingBottom: bottomSafeAreaInset,
|
|
45
|
+
paddingTop: Math.max(0, topSafeAreaInset - 3),
|
|
46
|
+
},
|
|
37
47
|
};
|
|
38
48
|
|
|
39
|
-
const containerPaddingVertical =
|
|
49
|
+
const containerPaddingVertical = 24;
|
|
40
50
|
const dialogMaxHeight = windowHeight - containerPaddingVertical * 2;
|
|
41
51
|
const dialogMaxWidth = sizeStyleMap[size]?.maxWidth;
|
|
42
52
|
|
|
53
|
+
const isFullScreen = size === 'full';
|
|
54
|
+
|
|
43
55
|
return {
|
|
44
56
|
root: {
|
|
45
57
|
alignItems: 'center',
|
|
46
58
|
justifyContent: 'center',
|
|
47
59
|
zIndex: theme.zIndex.dialog,
|
|
48
60
|
},
|
|
49
|
-
container:
|
|
61
|
+
container: isFullScreen ? {
|
|
50
62
|
height: '100%',
|
|
51
63
|
width: '100%',
|
|
52
64
|
} : {
|
|
53
65
|
alignItems: 'center',
|
|
54
|
-
|
|
55
|
-
paddingHorizontal: theme.spacing(windowWidth > 320 ? 6 : 4),
|
|
66
|
+
paddingHorizontal: windowWidth > theme.breakpoints.values.xs ? 24 : 16,
|
|
56
67
|
paddingVertical: containerPaddingVertical,
|
|
57
68
|
width: '100%',
|
|
58
69
|
},
|
|
59
|
-
paper:
|
|
70
|
+
paper: isFullScreen ? {
|
|
60
71
|
backgroundColor: theme.palette.surface.base,
|
|
61
72
|
height: '100%',
|
|
62
73
|
width: '100%',
|
|
74
|
+
...sizeStyleMap[size],
|
|
63
75
|
} : {
|
|
64
76
|
backgroundColor: theme.palette.surface.base,
|
|
65
77
|
borderRadius: theme.shape.radius.xl,
|
|
@@ -78,5 +90,5 @@ export default function useDialogStyle(size: DialogSize, fullScreen: boolean): D
|
|
|
78
90
|
width: '100%',
|
|
79
91
|
},
|
|
80
92
|
};
|
|
81
|
-
}, [theme, windowHeight, windowWidth, size,
|
|
93
|
+
}, [theme, windowHeight, windowWidth, size, bottomSafeAreaInset, topSafeAreaInset]);
|
|
82
94
|
}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { StyleSheet, Text, View } from 'react-native';
|
|
3
|
+
import type { DialogProps } from '../Dialog';
|
|
4
|
+
import type DialogTitleProps from './DialogTitleProps';
|
|
5
|
+
import { createFontStyle, css, useTheme } from '../styles';
|
|
6
|
+
import IconButton from '../IconButton';
|
|
7
|
+
import { ChevronLeft, Close } from '../internal';
|
|
8
|
+
|
|
9
|
+
const styles = StyleSheet.create({
|
|
10
|
+
root: {
|
|
11
|
+
alignItems: 'center',
|
|
12
|
+
height: 64,
|
|
13
|
+
justifyContent: 'center',
|
|
14
|
+
paddingHorizontal: 80,
|
|
15
|
+
width: '100%',
|
|
16
|
+
},
|
|
17
|
+
backButton: {
|
|
18
|
+
height: 40,
|
|
19
|
+
left: 20,
|
|
20
|
+
paddingLeft: 5,
|
|
21
|
+
paddingRight: 11,
|
|
22
|
+
paddingVertical: 8,
|
|
23
|
+
position: 'absolute',
|
|
24
|
+
width: 40,
|
|
25
|
+
},
|
|
26
|
+
closeButton: {
|
|
27
|
+
height: 40,
|
|
28
|
+
left: 20,
|
|
29
|
+
padding: 8,
|
|
30
|
+
position: 'absolute',
|
|
31
|
+
width: 40,
|
|
32
|
+
},
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
interface DialogLargeTitleProps extends DialogTitleProps {
|
|
36
|
+
closeButtonType?: 'back' | 'close';
|
|
37
|
+
onClose: DialogProps['onClose'];
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export default function DialogLargeTitle(props: DialogLargeTitleProps) {
|
|
41
|
+
const {
|
|
42
|
+
children,
|
|
43
|
+
closeButtonType = 'close',
|
|
44
|
+
onClose,
|
|
45
|
+
style: styleProp,
|
|
46
|
+
...otherProps
|
|
47
|
+
} = props;
|
|
48
|
+
|
|
49
|
+
const theme = useTheme();
|
|
50
|
+
|
|
51
|
+
const fontStyle = createFontStyle(theme, {
|
|
52
|
+
selector: (typo) => typo.header4.semiBold,
|
|
53
|
+
color: theme.palette.text.strong,
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
const rootStyle = css([
|
|
57
|
+
styles.root,
|
|
58
|
+
styleProp,
|
|
59
|
+
]);
|
|
60
|
+
|
|
61
|
+
return (
|
|
62
|
+
<View
|
|
63
|
+
style={rootStyle}
|
|
64
|
+
{...otherProps}
|
|
65
|
+
>
|
|
66
|
+
{typeof onClose === 'function' ? (
|
|
67
|
+
closeButtonType === 'back' ? (
|
|
68
|
+
<IconButton
|
|
69
|
+
style={styles.backButton}
|
|
70
|
+
onPress={onClose}
|
|
71
|
+
>
|
|
72
|
+
<ChevronLeft
|
|
73
|
+
color={'strong'}
|
|
74
|
+
size={'large'}
|
|
75
|
+
/>
|
|
76
|
+
</IconButton>
|
|
77
|
+
) : (
|
|
78
|
+
<IconButton
|
|
79
|
+
style={styles.closeButton}
|
|
80
|
+
onPress={onClose}
|
|
81
|
+
>
|
|
82
|
+
<Close
|
|
83
|
+
color={'strong'}
|
|
84
|
+
size={'large'}
|
|
85
|
+
/>
|
|
86
|
+
</IconButton>
|
|
87
|
+
)
|
|
88
|
+
) : null}
|
|
89
|
+
|
|
90
|
+
<Text style={fontStyle}>
|
|
91
|
+
{children}
|
|
92
|
+
</Text>
|
|
93
|
+
</View>
|
|
94
|
+
);
|
|
95
|
+
}
|
|
@@ -3,6 +3,7 @@ import { Text, View } from 'react-native';
|
|
|
3
3
|
import type { NamedStylesStringUnion, UseStyles } from '@fountain-ui/styles';
|
|
4
4
|
import { useDialogSectionStyle } from '../Dialog';
|
|
5
5
|
import { createFontStyle, css, useTheme } from '../styles';
|
|
6
|
+
import DialogLargeTitle from './DialogLargeTitle';
|
|
6
7
|
import type DialogTitleProps from './DialogTitleProps';
|
|
7
8
|
|
|
8
9
|
type DialogTitleStyles = NamedStylesStringUnion<'root' | 'title'>;
|
|
@@ -20,7 +21,7 @@ const useStyles: UseStyles<DialogTitleStyles> = function (): DialogTitleStyles {
|
|
|
20
21
|
};
|
|
21
22
|
};
|
|
22
23
|
|
|
23
|
-
|
|
24
|
+
const DialogTitle = (props: DialogTitleProps) => {
|
|
24
25
|
const {
|
|
25
26
|
children,
|
|
26
27
|
style: styleProp,
|
|
@@ -62,3 +63,7 @@ export default function DialogTitle(props: DialogTitleProps) {
|
|
|
62
63
|
</View>
|
|
63
64
|
);
|
|
64
65
|
};
|
|
66
|
+
|
|
67
|
+
DialogTitle.Large = DialogLargeTitle;
|
|
68
|
+
|
|
69
|
+
export default DialogTitle;
|
package/src/Divider/Divider.tsx
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Text, View } from 'react-native';
|
|
3
3
|
import type { Theme } from '@fountain-ui/styles';
|
|
4
|
+
import { commonColors } from '@fountain-ui/styles';
|
|
4
5
|
import { createFontStyle, css, StyleSheet, useTheme } from '../styles';
|
|
5
6
|
import { ExtendedStyle } from '../types';
|
|
6
7
|
import type DividerProps from './DividerProps';
|
|
@@ -29,6 +30,10 @@ function selectBorderColor(theme: Theme, variant: DividerVariant, vertical: bool
|
|
|
29
30
|
return vertical ? theme.palette.border.weaker : theme.palette.border.weak;
|
|
30
31
|
case 'strong':
|
|
31
32
|
return vertical ? theme.palette.border.weak : theme.palette.border.base;
|
|
33
|
+
case 'strongStatic':
|
|
34
|
+
return commonColors.opacity.white['13'];
|
|
35
|
+
case 'baseStatic':
|
|
36
|
+
return commonColors.opacity.white['10'];
|
|
32
37
|
}
|
|
33
38
|
}
|
|
34
39
|
|
|
@@ -5,7 +5,7 @@ import type { OverridableComponentProps } from '../types';
|
|
|
5
5
|
export const dividerElementAligns = ['start', 'center', 'end'] as const;
|
|
6
6
|
export type DividerElementAlign = typeof dividerElementAligns[number];
|
|
7
7
|
|
|
8
|
-
export const dividerVariants = ['base', 'strong'] as const;
|
|
8
|
+
export const dividerVariants = ['base', 'strong', 'baseStatic', 'strongStatic'] as const;
|
|
9
9
|
export type DividerVariant = typeof dividerVariants[number];
|
|
10
10
|
|
|
11
11
|
export default interface DividerProps extends OverridableComponentProps<ViewProps, {
|
package/src/Empty/Empty.tsx
CHANGED
|
@@ -55,7 +55,7 @@ export default function Empty(props: EmptyProps) {
|
|
|
55
55
|
});
|
|
56
56
|
|
|
57
57
|
const descriptionFontStyle = createFontStyle(theme, {
|
|
58
|
-
selector: (typography) => typography.
|
|
58
|
+
selector: (typography) => typography.body3.regular,
|
|
59
59
|
color: theme.palette.text.base,
|
|
60
60
|
});
|
|
61
61
|
|
package/src/Flexbox/Flexbox.tsx
CHANGED
|
@@ -27,6 +27,7 @@ export default function createFlexbox(direction: 'row' | 'column') {
|
|
|
27
27
|
flexGrow,
|
|
28
28
|
flexShrink,
|
|
29
29
|
flexWrap,
|
|
30
|
+
gap,
|
|
30
31
|
children,
|
|
31
32
|
insets,
|
|
32
33
|
justifyContent,
|
|
@@ -46,6 +47,7 @@ export default function createFlexbox(direction: 'row' | 'column') {
|
|
|
46
47
|
flexGrow,
|
|
47
48
|
flexShrink,
|
|
48
49
|
flexWrap,
|
|
50
|
+
gap,
|
|
49
51
|
justifyContent,
|
|
50
52
|
overflow,
|
|
51
53
|
};
|
|
@@ -48,6 +48,11 @@ export default interface FlexboxProps extends OverridableComponentProps<ViewProp
|
|
|
48
48
|
*/
|
|
49
49
|
flexWrap?: FlexStyle['flexWrap'];
|
|
50
50
|
|
|
51
|
+
/**
|
|
52
|
+
* Defines the spacing between items in a flex container.
|
|
53
|
+
*/
|
|
54
|
+
gap?: number | undefined;
|
|
55
|
+
|
|
51
56
|
/**
|
|
52
57
|
* Content of this component.
|
|
53
58
|
*/
|
|
@@ -36,6 +36,8 @@ function selectIconColor(theme: Theme, color: IconButtonColor) {
|
|
|
36
36
|
return theme.palette.icon.base;
|
|
37
37
|
case 'staticStrongInverse':
|
|
38
38
|
return commonColors.static.strongInverse;
|
|
39
|
+
case 'staticBaseOpacityInverse':
|
|
40
|
+
return commonColors.static.baseOpacityInverse;
|
|
39
41
|
case 'disabled':
|
|
40
42
|
return theme.palette.status.disabled;
|
|
41
43
|
}
|
package/src/Image/Image.tsx
CHANGED
|
@@ -34,9 +34,9 @@ const useStyles: UseStyles<ImageStyles> = function (): ImageStyles {
|
|
|
34
34
|
backgroundColor: theme.palette.paper.grey,
|
|
35
35
|
},
|
|
36
36
|
outlined: {
|
|
37
|
-
borderWidth:
|
|
37
|
+
borderWidth: 0.5,
|
|
38
38
|
borderStyle: 'solid',
|
|
39
|
-
borderColor: theme.palette.
|
|
39
|
+
borderColor: theme.palette.border.weak,
|
|
40
40
|
},
|
|
41
41
|
error: {
|
|
42
42
|
alignItems: 'center',
|
|
@@ -156,4 +156,4 @@ export default function Image(props: ImageProps) {
|
|
|
156
156
|
) : null}
|
|
157
157
|
</View>
|
|
158
158
|
);
|
|
159
|
-
};
|
|
159
|
+
};
|
|
@@ -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 type ImageCoreProps from './ImageCoreProps';
|