@fountain-ui/core 3.0.0-alpha.2 → 3.0.0-alpha.21
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 +7 -4
- package/build/commonjs/Accordion/Accordion.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 +6 -1
- 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 +3 -1
- package/build/commonjs/Button/useVariantStyleMap.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 +21 -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 +29 -19
- package/build/commonjs/Chip/useChipStyle.js.map +1 -1
- package/build/commonjs/Dialog/Dialog.js +7 -10
- 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/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 +1 -1
- 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 +18 -18
- 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 +60 -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 +9 -5
- package/build/commonjs/Tabs/Tabs.js.map +1 -1
- package/build/commonjs/Tabs/TabsProps.js.map +1 -1
- package/build/commonjs/Tabs/useTabsStyle.js +54 -0
- package/build/commonjs/Tabs/useTabsStyle.js.map +1 -0
- package/build/commonjs/TextField/TextField.js +1 -1
- package/build/commonjs/TextField/TextField.js.map +1 -1
- package/build/commonjs/TextField/useVariantStyleMap.js +4 -3
- 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 +1 -1
- package/build/commonjs/hooks/useCollapsibleAppBar.js.map +1 -1
- package/build/commonjs/hooks/useContentContainerStyle.js +21 -28
- package/build/commonjs/hooks/useContentContainerStyle.js.map +1 -1
- package/build/commonjs/hooks/useFadeInAppBar.js +1 -1
- 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/Close.js +4 -2
- package/build/commonjs/internal/icons/Close.js.map +1 -1
- package/build/commonjs/internal/icons/index.js +8 -0
- package/build/commonjs/internal/icons/index.js.map +1 -1
- package/build/module/Accordion/Accordion.js +7 -4
- package/build/module/Accordion/Accordion.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 +5 -1
- 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 +3 -1
- package/build/module/Button/useVariantStyleMap.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 +17 -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 +29 -19
- package/build/module/Chip/useChipStyle.js.map +1 -1
- package/build/module/Dialog/Dialog.js +7 -9
- 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/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 +1 -1
- 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 +19 -18
- 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 +60 -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 +8 -5
- package/build/module/Tabs/Tabs.js.map +1 -1
- package/build/module/Tabs/TabsProps.js.map +1 -1
- package/build/module/Tabs/useTabsStyle.js +44 -0
- package/build/module/Tabs/useTabsStyle.js.map +1 -0
- package/build/module/TextField/TextField.js +1 -1
- package/build/module/TextField/TextField.js.map +1 -1
- package/build/module/TextField/useVariantStyleMap.js +4 -3
- 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 +1 -1
- package/build/module/hooks/useCollapsibleAppBar.js.map +1 -1
- package/build/module/hooks/useContentContainerStyle.js +23 -26
- package/build/module/hooks/useContentContainerStyle.js.map +1 -1
- package/build/module/hooks/useFadeInAppBar.js +1 -1
- 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/Close.js +4 -2
- package/build/module/internal/icons/Close.js.map +1 -1
- package/build/module/internal/icons/index.js +1 -0
- package/build/module/internal/icons/index.js.map +1 -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 +4 -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 +8 -1
- package/build/typescript/Tab/index.d.ts +2 -1
- package/build/typescript/Tab/useVariantStyleMap.d.ts +3 -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/useTabsStyle.d.ts +7 -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/useContentContainerStyle.d.ts +4 -8
- package/build/typescript/index.d.ts +2 -0
- package/build/typescript/internal/icons/AppBarChevronLeft.d.ts +131 -0
- package/build/typescript/internal/icons/index.d.ts +1 -0
- package/package.json +5 -5
- package/src/Accordion/Accordion.tsx +11 -8
- package/src/Accordion/useVariantStyleMap.ts +14 -6
- package/src/AppBar/AppBar.tsx +4 -0
- 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 +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 +20 -13
- package/src/Chip/ChipProps.ts +13 -4
- package/src/Chip/index.ts +1 -1
- package/src/Chip/useChipStyle.ts +34 -17
- package/src/Dialog/Dialog.tsx +8 -9
- 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/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 +1 -1
- 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 +28 -22
- package/src/Tab/TabProps.ts +10 -1
- package/src/Tab/index.ts +2 -1
- package/src/Tab/useVariantStyleMap.ts +65 -17
- package/src/TabBase/TabBase.tsx +1 -9
- package/src/TabBase/TabBaseProps.ts +0 -6
- package/src/Tabs/Tabs.tsx +7 -6
- package/src/Tabs/TabsProps.ts +7 -1
- package/src/Tabs/useTabsStyle.ts +49 -0
- package/src/TextField/TextField.tsx +1 -1
- package/src/TextField/useVariantStyleMap.ts +4 -3
- 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 +1 -1
- package/src/hooks/useContentContainerStyle.ts +26 -34
- package/src/hooks/useFadeInAppBar.ts +1 -1
- 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/Close.tsx +4 -1
- package/src/internal/icons/index.ts +1 -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/Tabs/Tabs.tsx
CHANGED
|
@@ -4,7 +4,7 @@ import { View } from 'react-native';
|
|
|
4
4
|
import { NamedStylesStringUnion, UseStyles } from '@fountain-ui/styles';
|
|
5
5
|
import { css, useTheme } from '../styles';
|
|
6
6
|
import { useSyncAnimatedValue } from '../hooks';
|
|
7
|
-
import type { TabVariant } from '../Tab';
|
|
7
|
+
import type { TabSize, TabVariant } from '../Tab';
|
|
8
8
|
import type TabsProps from './TabsProps';
|
|
9
9
|
import type { TabsColor } from './TabsProps';
|
|
10
10
|
import type { TabsInstance } from './types';
|
|
@@ -16,12 +16,12 @@ import useTabInnerContentsWidth from './useTabInnerContentsWidth';
|
|
|
16
16
|
import useIndexStore from './useIndexStore';
|
|
17
17
|
import InternalContext from './InternalContext';
|
|
18
18
|
import { isEveryTabCoordinatesDefined } from './utils';
|
|
19
|
+
import useTabsStyle from './useTabsStyle';
|
|
19
20
|
|
|
20
21
|
type TabsStyleKeys =
|
|
21
22
|
| 'root'
|
|
22
23
|
| 'fixedRoot'
|
|
23
24
|
| 'fixedTab'
|
|
24
|
-
| 'scrollableContainer'
|
|
25
25
|
| 'bottomDivider';
|
|
26
26
|
|
|
27
27
|
type TabsStyles = NamedStylesStringUnion<TabsStyleKeys>;
|
|
@@ -37,9 +37,6 @@ const useStyles: UseStyles<TabsStyles> = function (): TabsStyles {
|
|
|
37
37
|
fixedTab: {
|
|
38
38
|
flex: 1,
|
|
39
39
|
},
|
|
40
|
-
scrollableContainer: {
|
|
41
|
-
paddingHorizontal: theme.spacing(1),
|
|
42
|
-
},
|
|
43
40
|
bottomDivider: {
|
|
44
41
|
borderBottomColor: theme.palette.border.base,
|
|
45
42
|
borderBottomWidth: 0.5,
|
|
@@ -60,6 +57,7 @@ const Tabs = forwardRef<TabsInstance, TabsProps>(function Tabs(props, ref) {
|
|
|
60
57
|
scrollable = false,
|
|
61
58
|
scrollViewContentContainerStyle,
|
|
62
59
|
showDivider = false,
|
|
60
|
+
size = 'medium' as TabSize,
|
|
63
61
|
style,
|
|
64
62
|
variant = 'default' as TabVariant,
|
|
65
63
|
UNSTABLE_sharedIndex,
|
|
@@ -72,6 +70,8 @@ const Tabs = forwardRef<TabsInstance, TabsProps>(function Tabs(props, ref) {
|
|
|
72
70
|
|
|
73
71
|
const currentIndexRef = useRef(initialIndex);
|
|
74
72
|
|
|
73
|
+
const { container: containerStyle } = useTabsStyle(variant, size);
|
|
74
|
+
|
|
75
75
|
const setTab = (newIndex: number) => {
|
|
76
76
|
const currentIndex = currentIndexRef.current;
|
|
77
77
|
onTabSelected?.(newIndex, currentIndex);
|
|
@@ -170,6 +170,7 @@ const Tabs = forwardRef<TabsInstance, TabsProps>(function Tabs(props, ref) {
|
|
|
170
170
|
onLayout,
|
|
171
171
|
onPress,
|
|
172
172
|
onMouseDown,
|
|
173
|
+
size,
|
|
173
174
|
variant,
|
|
174
175
|
indicatorSize,
|
|
175
176
|
style: scrollable ? undefined : styles.fixedTab,
|
|
@@ -202,6 +203,7 @@ const Tabs = forwardRef<TabsInstance, TabsProps>(function Tabs(props, ref) {
|
|
|
202
203
|
<View
|
|
203
204
|
style={css([
|
|
204
205
|
styles.root,
|
|
206
|
+
containerStyle,
|
|
205
207
|
{ backgroundColor: backgroundColorMap[color] },
|
|
206
208
|
showDivider ? styles.bottomDivider : undefined,
|
|
207
209
|
scrollable ? undefined : styles.fixedRoot,
|
|
@@ -213,7 +215,6 @@ const Tabs = forwardRef<TabsInstance, TabsProps>(function Tabs(props, ref) {
|
|
|
213
215
|
automaticallyAdjustContentInsets={false}
|
|
214
216
|
bounces={false}
|
|
215
217
|
contentContainerStyle={css([
|
|
216
|
-
styles.scrollableContainer,
|
|
217
218
|
scrollViewContentContainerStyle,
|
|
218
219
|
])}
|
|
219
220
|
coordinates={coordinates}
|
package/src/Tabs/TabsProps.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ReactNode, Ref } from 'react';
|
|
2
2
|
import type { ViewProps } from 'react-native';
|
|
3
|
-
import type { TabVariant } from '../Tab';
|
|
3
|
+
import type { TabSize, TabVariant } from '../Tab';
|
|
4
4
|
import type { ExtendedStyle, OverridableComponentProps, SyncAnimatedValue } from '../types';
|
|
5
5
|
import type { KeyboardDismissMode, KeyboardShouldPersistTaps, TabsInstance } from './types';
|
|
6
6
|
|
|
@@ -78,6 +78,12 @@ export default interface TabsProps extends OverridableComponentProps<ViewProps,
|
|
|
78
78
|
*/
|
|
79
79
|
showDivider?: boolean;
|
|
80
80
|
|
|
81
|
+
/**
|
|
82
|
+
* The size of the Tab.
|
|
83
|
+
* @default 'medium'
|
|
84
|
+
*/
|
|
85
|
+
size?: TabSize;
|
|
86
|
+
|
|
81
87
|
/**
|
|
82
88
|
* Unstable API.
|
|
83
89
|
*/
|
|
@@ -0,0 +1,49 @@
|
|
|
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
|
+
}
|
|
10
|
+
|
|
11
|
+
export default function useTabsStyle(variant: TabVariant, size: TabSize) {
|
|
12
|
+
const theme = useTheme();
|
|
13
|
+
|
|
14
|
+
const isTablet = useBreakpointUp('md', true, false);
|
|
15
|
+
|
|
16
|
+
return useMemo<TabsStyle>(() => {
|
|
17
|
+
switch (variant) {
|
|
18
|
+
case 'circular':
|
|
19
|
+
return {
|
|
20
|
+
container: {
|
|
21
|
+
paddingBottom: 8,
|
|
22
|
+
paddingHorizontal: isTablet ? 20 : (size === 'small' ? 8 : 12),
|
|
23
|
+
},
|
|
24
|
+
};
|
|
25
|
+
case 'circular-home':
|
|
26
|
+
return {
|
|
27
|
+
container: {
|
|
28
|
+
paddingBottom: 8,
|
|
29
|
+
paddingHorizontal: isTablet ? 20 : 8,
|
|
30
|
+
},
|
|
31
|
+
};
|
|
32
|
+
case 'bottom-navigation':
|
|
33
|
+
return {
|
|
34
|
+
container: {
|
|
35
|
+
borderTopColor: theme.palette.border.base,
|
|
36
|
+
borderTopWidth: 0.5,
|
|
37
|
+
paddingHorizontal: 24,
|
|
38
|
+
},
|
|
39
|
+
};
|
|
40
|
+
case 'default':
|
|
41
|
+
default:
|
|
42
|
+
return {
|
|
43
|
+
container: {
|
|
44
|
+
paddingHorizontal: isTablet ? 14 : 6,
|
|
45
|
+
},
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
}, [theme, variant, isTablet, size]);
|
|
49
|
+
}
|
|
@@ -82,7 +82,7 @@ const TextField = React.forwardRef<TextInput, TextFieldProps>(function TextField
|
|
|
82
82
|
const showClearButton = showClearButtonProp ?? isSearch;
|
|
83
83
|
|
|
84
84
|
const titleFontStyle = createFontStyle(theme, {
|
|
85
|
-
|
|
85
|
+
selector: (typography) => typography.caption1['semiBold'],
|
|
86
86
|
color: theme.palette.text.strong,
|
|
87
87
|
});
|
|
88
88
|
|
|
@@ -49,13 +49,14 @@ export default function useVariantStyleMap(variant: TextFieldVariant, status: Te
|
|
|
49
49
|
borderBottomWidth: 1,
|
|
50
50
|
},
|
|
51
51
|
inputStyle: {
|
|
52
|
+
paddingLeft: 0,
|
|
52
53
|
paddingRight: theme.spacing(4),
|
|
53
54
|
paddingVertical: theme.spacing(4),
|
|
54
55
|
...createFontStyle(theme, {
|
|
55
56
|
selector: (_) => typographyOf({
|
|
56
57
|
fontSize: 18,
|
|
57
58
|
lineHeight: 27,
|
|
58
|
-
fontFamily: '
|
|
59
|
+
fontFamily: 'PretendardStd-SemiBold',
|
|
59
60
|
letterSpacing: 0,
|
|
60
61
|
}),
|
|
61
62
|
color: theme.palette.text.strong,
|
|
@@ -64,7 +65,7 @@ export default function useVariantStyleMap(variant: TextFieldVariant, status: Te
|
|
|
64
65
|
hintStyle: {
|
|
65
66
|
marginTop: theme.spacing(2),
|
|
66
67
|
...createFontStyle(theme, {
|
|
67
|
-
|
|
68
|
+
selector: (typography) => typography.caption1['regular'],
|
|
68
69
|
color: hintColor,
|
|
69
70
|
}),
|
|
70
71
|
},
|
|
@@ -88,7 +89,7 @@ export default function useVariantStyleMap(variant: TextFieldVariant, status: Te
|
|
|
88
89
|
selector: (_) => typographyOf({
|
|
89
90
|
fontSize: 16,
|
|
90
91
|
lineHeight: 19.2,
|
|
91
|
-
fontFamily: '
|
|
92
|
+
fontFamily: 'PretendardStd-SemiBold',
|
|
92
93
|
letterSpacing: -0.16,
|
|
93
94
|
}),
|
|
94
95
|
color: theme.palette.text.strong,
|
|
@@ -0,0 +1,44 @@
|
|
|
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
|
+
<React.Fragment>
|
|
37
|
+
<AppBarChevronLeft
|
|
38
|
+
height={18}
|
|
39
|
+
width={10}
|
|
40
|
+
/>
|
|
41
|
+
</React.Fragment>
|
|
42
|
+
</IconButton>
|
|
43
|
+
);
|
|
44
|
+
}
|
package/src/Toolbar/Toolbar.tsx
CHANGED
|
@@ -2,6 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import type { FountainUiStyle, NamedStylesStringUnion, UseStyles } from '@fountain-ui/styles';
|
|
3
3
|
import Row from '../Row';
|
|
4
4
|
import { css, useTheme } from '../styles';
|
|
5
|
+
import BackButton from './BackButton';
|
|
5
6
|
import type ToolbarProps from './ToolbarProps';
|
|
6
7
|
import type { ToolbarSize } from './ToolbarProps';
|
|
7
8
|
|
|
@@ -27,7 +28,7 @@ const sizeMap: Record<ToolbarSize, FountainUiStyle> = {
|
|
|
27
28
|
large: { height: 56 },
|
|
28
29
|
};
|
|
29
30
|
|
|
30
|
-
|
|
31
|
+
const Toolbar = (props: ToolbarProps) => {
|
|
31
32
|
const {
|
|
32
33
|
disableGutters = false,
|
|
33
34
|
size = 'medium',
|
|
@@ -49,3 +50,7 @@ export default function Toolbar(props: ToolbarProps) {
|
|
|
49
50
|
/>
|
|
50
51
|
);
|
|
51
52
|
};
|
|
53
|
+
|
|
54
|
+
Toolbar.BackButton = BackButton;
|
|
55
|
+
|
|
56
|
+
export default Toolbar;
|
|
@@ -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';
|
package/src/Tooltip/Tooltip.tsx
CHANGED
|
@@ -52,14 +52,14 @@ const useStyles: UseStyles<TooltipStyles> = function (): TooltipStyles {
|
|
|
52
52
|
},
|
|
53
53
|
small: {
|
|
54
54
|
borderRadius: theme.shape.radius.sm,
|
|
55
|
+
paddingBottom: theme.spacing(1.75),
|
|
55
56
|
paddingHorizontal: theme.spacing(2),
|
|
56
|
-
|
|
57
|
+
paddingTop: theme.spacing(1.5),
|
|
57
58
|
},
|
|
58
59
|
large: {
|
|
59
60
|
borderRadius: 5,
|
|
60
|
-
paddingBottom: theme.spacing(2.5),
|
|
61
61
|
paddingHorizontal: theme.spacing(4),
|
|
62
|
-
|
|
62
|
+
paddingVertical: theme.spacing(2),
|
|
63
63
|
},
|
|
64
64
|
};
|
|
65
65
|
};
|
|
@@ -140,12 +140,7 @@ export default function Tooltip(props: TooltipProps) {
|
|
|
140
140
|
|
|
141
141
|
const fontStyle = createFontStyle(theme, {
|
|
142
142
|
selector: (typo) => size === 'large'
|
|
143
|
-
?
|
|
144
|
-
fontSize: 13,
|
|
145
|
-
lineHeight: 19.5,
|
|
146
|
-
fontFamily: 'Pretendard-Regular',
|
|
147
|
-
letterSpacing: 0,
|
|
148
|
-
})
|
|
143
|
+
? typo.body3.regular
|
|
149
144
|
: typo.caption2.regular,
|
|
150
145
|
color: theme.palette.text.strongInverse,
|
|
151
146
|
});
|
package/src/Tooltip/index.ts
CHANGED
|
@@ -46,6 +46,7 @@ const Typography = React.forwardRef<Text, TypographyProps>(function Typography(p
|
|
|
46
46
|
color: colorProp = 'inherit' as TypographyColor,
|
|
47
47
|
ellipsizeMode = 'tail' as TextProps['ellipsizeMode'],
|
|
48
48
|
href,
|
|
49
|
+
lineHeight,
|
|
49
50
|
numberOfLines,
|
|
50
51
|
onPress,
|
|
51
52
|
selectable,
|
|
@@ -59,7 +60,7 @@ const Typography = React.forwardRef<Text, TypographyProps>(function Typography(p
|
|
|
59
60
|
const theme = useTheme();
|
|
60
61
|
|
|
61
62
|
const fontStyle = createFontStyle(theme, {
|
|
62
|
-
selector: (typography) => typography[variant][weight],
|
|
63
|
+
selector: (typography) => typography[variant]?.[weight],
|
|
63
64
|
color: selectColor(theme, colorProp),
|
|
64
65
|
});
|
|
65
66
|
|
|
@@ -71,6 +72,7 @@ const Typography = React.forwardRef<Text, TypographyProps>(function Typography(p
|
|
|
71
72
|
{ textAlign: align === 'inherit' ? 'auto' : align },
|
|
72
73
|
textWrapStyle as TextStyle,
|
|
73
74
|
fontStyle,
|
|
75
|
+
lineHeight ? { lineHeight } : undefined,
|
|
74
76
|
style,
|
|
75
77
|
]);
|
|
76
78
|
|
|
@@ -76,6 +76,11 @@ export default interface TypographyProps extends ComponentProps<{
|
|
|
76
76
|
*/
|
|
77
77
|
href?: string;
|
|
78
78
|
|
|
79
|
+
/**
|
|
80
|
+
* Defines the vertical spacing between lines of text.
|
|
81
|
+
*/
|
|
82
|
+
lineHeight?: TextStyle['lineHeight'];
|
|
83
|
+
|
|
79
84
|
/**
|
|
80
85
|
* Used to truncate the text with an ellipsis after computing the text
|
|
81
86
|
* layout, including line wrapping, such that the total number of lines
|
|
@@ -12,8 +12,10 @@ export default function useBreakpointUp<R>(target: Breakpoint, yes: R, no: R): R
|
|
|
12
12
|
// TODO: Needs to refactor
|
|
13
13
|
const isUp = useMemo<boolean>(() => {
|
|
14
14
|
switch (target) {
|
|
15
|
-
case '
|
|
15
|
+
case 'xxs':
|
|
16
16
|
return true;
|
|
17
|
+
case 'xs':
|
|
18
|
+
return current === 'xs' || current === 'sm' || current === 'md' || current === 'lg';
|
|
17
19
|
case 'sm':
|
|
18
20
|
return current === 'sm' || current === 'md' || current === 'lg';
|
|
19
21
|
case 'md':
|
|
@@ -205,7 +205,7 @@ export default function useCollapsibleAppBar(userOptions: Options = defaultOptio
|
|
|
205
205
|
|
|
206
206
|
translateY.value = withTiming(nextTranslateY, ANIMATION_CONFIG);
|
|
207
207
|
},
|
|
208
|
-
}
|
|
208
|
+
});
|
|
209
209
|
|
|
210
210
|
const hasCollapsible = collapsibleToolbarHeight > 0;
|
|
211
211
|
|
|
@@ -1,60 +1,52 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { FountainUiStyle } from '@fountain-ui/styles';
|
|
2
|
+
import { css, useTheme } from '../styles';
|
|
2
3
|
import type { Theme } from '../types';
|
|
3
|
-
import { useTheme } from '../styles';
|
|
4
|
-
import useBreakpointUp from './useBreakpointUp';
|
|
5
4
|
|
|
6
5
|
type Breakpoint = keyof Theme['breakpoints']['values'];
|
|
7
6
|
|
|
8
|
-
type ContentContainerStyle = ScrollViewProps['contentContainerStyle'];
|
|
9
|
-
|
|
10
7
|
export interface Config {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
styleProvider?: (theme: Theme) => ContentContainerStyle;
|
|
8
|
+
maxWidth?: number;
|
|
9
|
+
styleProvider?: (theme: Theme) => FountainUiStyle;
|
|
14
10
|
}
|
|
15
11
|
|
|
16
|
-
|
|
17
|
-
breakpoint
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
12
|
+
function getMaxWidth(theme: Theme, breakpoint: Breakpoint, customMaxWidth?: number): number | undefined {
|
|
13
|
+
switch (breakpoint) {
|
|
14
|
+
case 'lg':
|
|
15
|
+
case 'md':
|
|
16
|
+
return customMaxWidth ?? theme.breakpoints.values[breakpoint];
|
|
17
|
+
default:
|
|
18
|
+
return undefined;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
function getMaxWidth(theme: Theme, breakpoint: Breakpoint): ViewStyle['maxWidth'] {
|
|
22
|
+
function getPaddingHorizontal(theme: Theme, breakpoint: Breakpoint): number {
|
|
24
23
|
switch (breakpoint) {
|
|
25
|
-
case 'xs':
|
|
26
|
-
return theme.breakpoints.values['sm'];
|
|
27
24
|
case 'sm':
|
|
28
|
-
return theme.
|
|
29
|
-
|
|
30
|
-
return theme.
|
|
31
|
-
case 'lg':
|
|
32
|
-
return 'none';
|
|
25
|
+
return theme.spacing(6);
|
|
26
|
+
default:
|
|
27
|
+
return theme.spacing(4);
|
|
33
28
|
}
|
|
34
29
|
}
|
|
35
30
|
|
|
36
|
-
export default function useContentContainerStyle(config: Config =
|
|
31
|
+
export default function useContentContainerStyle(config: Config = {}): FountainUiStyle {
|
|
37
32
|
const {
|
|
38
|
-
|
|
39
|
-
maxWidth,
|
|
33
|
+
maxWidth: customMaxWidth,
|
|
40
34
|
styleProvider,
|
|
41
|
-
} =
|
|
42
|
-
...defaultConfig,
|
|
43
|
-
...config,
|
|
44
|
-
};
|
|
35
|
+
} = config;
|
|
45
36
|
|
|
46
37
|
const theme = useTheme();
|
|
47
38
|
|
|
39
|
+
const currentBreakpoint = theme.breakpoints.current;
|
|
40
|
+
|
|
48
41
|
const additionalStyle = styleProvider?.(theme);
|
|
49
42
|
|
|
50
|
-
|
|
43
|
+
return css([
|
|
51
44
|
{
|
|
52
45
|
alignSelf: 'center',
|
|
53
|
-
maxWidth: getMaxWidth(theme,
|
|
46
|
+
maxWidth: getMaxWidth(theme, currentBreakpoint, customMaxWidth),
|
|
47
|
+
paddingHorizontal: getPaddingHorizontal(theme, currentBreakpoint),
|
|
54
48
|
width: '100%',
|
|
55
49
|
},
|
|
56
50
|
additionalStyle,
|
|
57
|
-
];
|
|
58
|
-
|
|
59
|
-
return useBreakpointUp(breakpoint, yesStyle, additionalStyle);
|
|
51
|
+
]);
|
|
60
52
|
};
|
|
@@ -117,7 +117,7 @@ export default function useFadeInAppBar(userOptions: Options = defaultOptions):
|
|
|
117
117
|
onMomentumEnd: (event) => {
|
|
118
118
|
lastOffsetY.value = event.contentOffset.y;
|
|
119
119
|
},
|
|
120
|
-
}
|
|
120
|
+
});
|
|
121
121
|
|
|
122
122
|
const appBarStyle = [
|
|
123
123
|
animatedAppBarStyle,
|
package/src/index.ts
CHANGED
|
@@ -149,6 +149,9 @@ export * from './RadioGroup';
|
|
|
149
149
|
export { default as Row } from './Row';
|
|
150
150
|
export * from './Row';
|
|
151
151
|
|
|
152
|
+
export { default as Section } from './Section';
|
|
153
|
+
export * from './Section';
|
|
154
|
+
|
|
152
155
|
export { default as ShadowView } from './ShadowView';
|
|
153
156
|
export * from './ShadowView';
|
|
154
157
|
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Path } from 'react-native-svg';
|
|
3
|
+
import { createSvgIcon } from '../../utils';
|
|
4
|
+
|
|
5
|
+
export default createSvgIcon(
|
|
6
|
+
<React.Fragment>
|
|
7
|
+
<Path
|
|
8
|
+
fillRule="evenodd"
|
|
9
|
+
clipRule="evenodd"
|
|
10
|
+
d="M0.292893 9.70711C-0.0976311 9.31658 -0.0976311 8.68342 0.292893 8.29289L8.2929 0.292893C8.68342 -0.097631 9.31658 -0.097631 9.70711 0.292893C10.0976 0.683417 10.0976 1.31658 9.70711 1.70711L2.41421 9L9.70711 16.2929C10.0976 16.6834 10.0976 17.3166 9.70711 17.7071C9.31658 18.0976 8.68342 18.0976 8.29289 17.7071L0.292893 9.70711Z"
|
|
11
|
+
/>
|
|
12
|
+
</React.Fragment>,
|
|
13
|
+
'AppBarChevronLeft',
|
|
14
|
+
'0 0 10 18',
|
|
15
|
+
);
|
|
@@ -4,7 +4,10 @@ import { createSvgIcon } from '../../utils';
|
|
|
4
4
|
|
|
5
5
|
export default createSvgIcon(
|
|
6
6
|
<Path
|
|
7
|
-
|
|
7
|
+
fillRule="evenodd"
|
|
8
|
+
clipRule="evenodd"
|
|
9
|
+
d="M0 12C3.16267e-09 11.7348 0.105357 11.4804 0.292893 11.2929L6.29289 5.29289C6.68342 4.90237 7.31658 4.90237 7.70711 5.29289C8.09763 5.68342 8.09763 6.31658 7.70711 6.70711L2.41421 12L7.70711 17.2929C8.09763 17.6834 8.09763 18.3166 7.70711 18.7071C7.31658 19.0976 6.68342 19.0976 6.29289 18.7071L0.292893 12.7071C0.105357 12.5196 -3.16267e-09 12.2652 0 12Z"
|
|
8
10
|
/>,
|
|
9
11
|
'ChevronLeft',
|
|
12
|
+
'0 0 8 24',
|
|
10
13
|
);
|
|
@@ -4,7 +4,10 @@ import { createSvgIcon } from '../../utils';
|
|
|
4
4
|
|
|
5
5
|
export default createSvgIcon(
|
|
6
6
|
<Path
|
|
7
|
-
|
|
7
|
+
fillRule="evenodd"
|
|
8
|
+
clipRule="evenodd"
|
|
9
|
+
d="M8 12C8 12.2652 7.89464 12.5196 7.70711 12.7071L1.70711 18.7071C1.31658 19.0976 0.683417 19.0976 0.292892 18.7071C-0.0976309 18.3166 -0.0976309 17.6834 0.292893 17.2929L5.58579 12L0.292894 6.70711C-0.0976304 6.31658 -0.0976304 5.68342 0.292895 5.29289C0.683418 4.90237 1.31658 4.90237 1.70711 5.29289L7.70711 11.2929C7.89464 11.4804 8 11.7348 8 12Z"
|
|
8
10
|
/>,
|
|
9
11
|
'ChevronRight',
|
|
12
|
+
'0 0 8 24',
|
|
10
13
|
);
|
|
@@ -4,7 +4,10 @@ import { createSvgIcon } from '../../utils';
|
|
|
4
4
|
|
|
5
5
|
export default createSvgIcon(
|
|
6
6
|
<Path
|
|
7
|
-
|
|
7
|
+
fillRule="evenodd"
|
|
8
|
+
clipRule="evenodd"
|
|
9
|
+
d="M0.292893 5.29289C0.683417 4.90237 1.31658 4.90237 1.70711 5.29289L7 10.5858L12.2929 5.29289C12.6834 4.90237 13.3166 4.90237 13.7071 5.29289C14.0976 5.68342 14.0976 6.31658 13.7071 6.70711L8.41421 12L13.7071 17.2929C14.0976 17.6834 14.0976 18.3166 13.7071 18.7071C13.3166 19.0976 12.6834 19.0976 12.2929 18.7071L7 13.4142L1.70711 18.7071C1.31658 19.0976 0.683417 19.0976 0.292893 18.7071C-0.0976311 18.3166 -0.0976311 17.6834 0.292893 17.2929L5.58579 12L0.292893 6.70711C-0.0976311 6.31658 -0.0976311 5.68342 0.292893 5.29289Z"
|
|
8
10
|
/>,
|
|
9
11
|
'Close',
|
|
12
|
+
'0 0 14 24',
|
|
10
13
|
);
|