@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
|
@@ -10,7 +10,7 @@ import Typography from '../Typography';
|
|
|
10
10
|
import type SnackbarContentProps from './SnackbarContentProps';
|
|
11
11
|
import StatusIcon from './StatusIcon';
|
|
12
12
|
|
|
13
|
-
type SnackBarContentStyles = NamedStylesStringUnion<'root' | 'actionButton'>;
|
|
13
|
+
type SnackBarContentStyles = NamedStylesStringUnion<'root' | 'actionButton' | 'actionLabel' | 'actionElement'>;
|
|
14
14
|
|
|
15
15
|
const useStyles: UseStyles<SnackBarContentStyles> = function (): SnackBarContentStyles {
|
|
16
16
|
const theme = useTheme();
|
|
@@ -30,6 +30,14 @@ const useStyles: UseStyles<SnackBarContentStyles> = function (): SnackBarContent
|
|
|
30
30
|
actionButton: {
|
|
31
31
|
marginLeft: theme.spacing(6),
|
|
32
32
|
},
|
|
33
|
+
actionLabel: {
|
|
34
|
+
paddingBottom: theme.spacing(1.5),
|
|
35
|
+
paddingTop: theme.spacing(1.25),
|
|
36
|
+
},
|
|
37
|
+
actionElement: {
|
|
38
|
+
paddingLeft: theme.spacing(2),
|
|
39
|
+
paddingVertical: theme.spacing(1.25),
|
|
40
|
+
},
|
|
33
41
|
};
|
|
34
42
|
};
|
|
35
43
|
|
|
@@ -51,21 +59,28 @@ export default function SnackbarContent(props: SnackbarContentProps) {
|
|
|
51
59
|
|
|
52
60
|
const titleFontStyle = createFontStyle(theme, {
|
|
53
61
|
selector: (_) => typographyOf({
|
|
54
|
-
fontSize:
|
|
55
|
-
lineHeight:
|
|
56
|
-
fontFamily: '
|
|
62
|
+
fontSize: 15,
|
|
63
|
+
lineHeight: 19.5,
|
|
64
|
+
fontFamily: 'PretendardStd-SemiBold',
|
|
57
65
|
letterSpacing: 0,
|
|
58
66
|
}),
|
|
59
67
|
color: theme.palette.text.strongInverse,
|
|
60
68
|
});
|
|
61
69
|
|
|
62
70
|
const messageFontStyle = createFontStyle(theme, {
|
|
63
|
-
selector: (_) =>
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
71
|
+
selector: (_) => title
|
|
72
|
+
? typographyOf({
|
|
73
|
+
fontSize: 12,
|
|
74
|
+
lineHeight: 15.6,
|
|
75
|
+
fontFamily: 'PretendardStd-Regular',
|
|
76
|
+
letterSpacing: 0,
|
|
77
|
+
})
|
|
78
|
+
: typographyOf({
|
|
79
|
+
fontSize: 14,
|
|
80
|
+
lineHeight: 18.2,
|
|
81
|
+
fontFamily: 'PretendardStd-Regular',
|
|
82
|
+
letterSpacing: 0,
|
|
83
|
+
}),
|
|
69
84
|
color: theme.palette.text.strongInverse,
|
|
70
85
|
});
|
|
71
86
|
|
|
@@ -129,11 +144,17 @@ export default function SnackbarContent(props: SnackbarContentProps) {
|
|
|
129
144
|
|
|
130
145
|
<View style={styles.actionButton}>
|
|
131
146
|
{typeof actionContent === 'string' ? (
|
|
132
|
-
<
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
147
|
+
<View style={styles.actionLabel}>
|
|
148
|
+
<Text
|
|
149
|
+
children={actionContent}
|
|
150
|
+
style={labelFontStyle}
|
|
151
|
+
/>
|
|
152
|
+
</View>
|
|
153
|
+
) : (
|
|
154
|
+
<View style={styles.actionElement}>
|
|
155
|
+
{actionContent}
|
|
156
|
+
</View>
|
|
157
|
+
)}
|
|
137
158
|
</View>
|
|
138
159
|
</React.Fragment>
|
|
139
160
|
) : null}
|
package/src/Tab/Tab.tsx
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Platform, Text, View } from 'react-native';
|
|
3
3
|
import Badge from '../Badge';
|
|
4
|
-
import Spacer from '../Spacer';
|
|
5
4
|
import TabBase from '../TabBase';
|
|
6
|
-
import {
|
|
5
|
+
import type { TabsColor } from '../Tabs';
|
|
6
|
+
import { css, StyleSheet } from '../styles';
|
|
7
7
|
import { cloneElementSafely } from '../utils';
|
|
8
8
|
import type TabProps from './TabProps';
|
|
9
|
-
import type { TabVariant } from './TabProps';
|
|
9
|
+
import type { TabSize, TabVariant } from './TabProps';
|
|
10
10
|
import useVariantStyleMap from './useVariantStyleMap';
|
|
11
11
|
|
|
12
12
|
const styles = StyleSheet.create({
|
|
@@ -26,23 +26,23 @@ export default function Tab(props: TabProps) {
|
|
|
26
26
|
children,
|
|
27
27
|
enableIndicator = false,
|
|
28
28
|
icon: defaultIcon,
|
|
29
|
+
parentColor = 'default' as TabsColor,
|
|
29
30
|
selected = false,
|
|
30
31
|
selectedIcon,
|
|
32
|
+
size = 'medium' as TabSize,
|
|
31
33
|
variant = 'default' as TabVariant,
|
|
32
34
|
style: styleProp,
|
|
35
|
+
innerStyle: innerStyleProp,
|
|
33
36
|
onTabInnerLayout,
|
|
34
37
|
...otherProps
|
|
35
38
|
} = props;
|
|
36
39
|
|
|
37
|
-
const theme = useTheme();
|
|
38
|
-
|
|
39
|
-
const vertical = variant === 'bottom-navigation';
|
|
40
|
-
|
|
41
40
|
const {
|
|
42
41
|
container: containerStyle,
|
|
42
|
+
iconContainer: iconContainerStyle,
|
|
43
43
|
inner: innerStyle,
|
|
44
44
|
label: labelStyle,
|
|
45
|
-
} = useVariantStyleMap(variant, selected);
|
|
45
|
+
} = useVariantStyleMap(variant, selected, size, parentColor);
|
|
46
46
|
|
|
47
47
|
const tabBaseStyle = css([
|
|
48
48
|
styles.root,
|
|
@@ -53,13 +53,11 @@ export default function Tab(props: TabProps) {
|
|
|
53
53
|
const tabInnerStyle = css([
|
|
54
54
|
styles.filledInner,
|
|
55
55
|
innerStyle,
|
|
56
|
+
innerStyleProp,
|
|
56
57
|
]);
|
|
57
58
|
|
|
58
|
-
const pressEffect = selected ? 'none' : 'opacity';
|
|
59
|
-
|
|
60
59
|
const icon = selected ? (selectedIcon || defaultIcon) : defaultIcon;
|
|
61
|
-
const
|
|
62
|
-
const iconElement = cloneElementSafely(icon, { fill: iconColor });
|
|
60
|
+
const iconElement = cloneElementSafely(icon);
|
|
63
61
|
|
|
64
62
|
const tabElement = typeof children !== 'string' ? (
|
|
65
63
|
cloneElementSafely(children, {
|
|
@@ -69,25 +67,37 @@ export default function Tab(props: TabProps) {
|
|
|
69
67
|
<React.Fragment>
|
|
70
68
|
{iconElement ? (
|
|
71
69
|
<React.Fragment>
|
|
72
|
-
<Badge
|
|
73
|
-
{
|
|
70
|
+
<Badge
|
|
71
|
+
horizontalOffset={-4}
|
|
72
|
+
invisible={!badgeVisible}
|
|
73
|
+
verticalOffset={-4}
|
|
74
|
+
>
|
|
75
|
+
<View style={iconContainerStyle}>
|
|
76
|
+
{iconElement}
|
|
77
|
+
</View>
|
|
74
78
|
</Badge>
|
|
75
79
|
|
|
76
|
-
<
|
|
80
|
+
<Text style={css(labelStyle)}>
|
|
81
|
+
{children}
|
|
82
|
+
</Text>
|
|
77
83
|
</React.Fragment>
|
|
78
|
-
) :
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
84
|
+
) : (
|
|
85
|
+
<Badge
|
|
86
|
+
horizontalOffset={-7}
|
|
87
|
+
invisible={!badgeVisible}
|
|
88
|
+
verticalOffset={3}
|
|
89
|
+
>
|
|
90
|
+
<Text style={css(labelStyle)}>
|
|
91
|
+
{children}
|
|
92
|
+
</Text>
|
|
93
|
+
</Badge>
|
|
94
|
+
)}
|
|
83
95
|
</React.Fragment>
|
|
84
96
|
);
|
|
85
97
|
|
|
86
98
|
return (
|
|
87
99
|
<TabBase
|
|
88
|
-
pressEffect={pressEffect}
|
|
89
100
|
style={tabBaseStyle}
|
|
90
|
-
vertical={vertical}
|
|
91
101
|
{...otherProps}
|
|
92
102
|
>
|
|
93
103
|
<View onLayout={onTabInnerLayout} style={tabInnerStyle}>
|
package/src/Tab/TabProps.ts
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { LayoutChangeEvent } from 'react-native';
|
|
3
3
|
import type { TabBaseProps } from '../TabBase';
|
|
4
|
-
import type {
|
|
4
|
+
import type { TabsColor } from '../Tabs';
|
|
5
|
+
import type { ExtendedStyle, OverridableComponentProps } from '../types';
|
|
5
6
|
|
|
6
|
-
export const
|
|
7
|
+
export const tabSizes = ['small', 'medium'] as const;
|
|
8
|
+
export type TabSize = typeof tabSizes[number];
|
|
9
|
+
|
|
10
|
+
export const tabVariants = ['default', 'circular', 'circular-home', 'bottom-navigation'] as const;
|
|
7
11
|
export type TabVariant = typeof tabVariants[number];
|
|
8
12
|
|
|
9
13
|
export default interface TabProps extends OverridableComponentProps<TabBaseProps, {
|
|
@@ -24,6 +28,13 @@ export default interface TabProps extends OverridableComponentProps<TabBaseProps
|
|
|
24
28
|
*/
|
|
25
29
|
enableIndicator?: boolean;
|
|
26
30
|
|
|
31
|
+
/**
|
|
32
|
+
* The color value inherited from the parent Tabs component.
|
|
33
|
+
* This allows Tab components to apply consistent styling based on the Tabs container's color scheme.
|
|
34
|
+
* @default 'default'
|
|
35
|
+
*/
|
|
36
|
+
parentColor?: TabsColor;
|
|
37
|
+
|
|
27
38
|
/**
|
|
28
39
|
* If `true`, the component is selected.
|
|
29
40
|
* @default false
|
|
@@ -40,6 +51,12 @@ export default interface TabProps extends OverridableComponentProps<TabBaseProps
|
|
|
40
51
|
*/
|
|
41
52
|
selectedIcon?: React.ReactElement;
|
|
42
53
|
|
|
54
|
+
/**
|
|
55
|
+
* The size of the Tab.
|
|
56
|
+
* @default 'medium'
|
|
57
|
+
*/
|
|
58
|
+
size?: TabSize;
|
|
59
|
+
|
|
43
60
|
/**
|
|
44
61
|
* The variant to use.
|
|
45
62
|
* @default 'default'
|
|
@@ -50,4 +67,10 @@ export default interface TabProps extends OverridableComponentProps<TabBaseProps
|
|
|
50
67
|
* Function to be passed to the child component's onLayout prop.
|
|
51
68
|
*/
|
|
52
69
|
onTabInnerLayout?: (event: LayoutChangeEvent) => void;
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Custom style to apply to the inner container of the Tab.
|
|
73
|
+
* This allows customization of the tab's inner layout and appearance.
|
|
74
|
+
*/
|
|
75
|
+
innerStyle?: ExtendedStyle | ExtendedStyle[];
|
|
53
76
|
}> {}
|
package/src/Tab/index.ts
CHANGED
|
@@ -2,16 +2,23 @@ import { useMemo } from 'react';
|
|
|
2
2
|
import { TextStyle } from 'react-native';
|
|
3
3
|
import type { FountainUiStyle } from '@fountain-ui/styles';
|
|
4
4
|
import { typographyOf } from '@fountain-ui/styles';
|
|
5
|
+
import type { TabsColor } from '../Tabs';
|
|
5
6
|
import { createFontStyle, useTheme } from '../styles';
|
|
6
|
-
import type { TabVariant } from './TabProps';
|
|
7
|
+
import type { TabSize, TabVariant } from './TabProps';
|
|
7
8
|
|
|
8
9
|
interface VariantStyle {
|
|
9
10
|
container: FountainUiStyle;
|
|
11
|
+
iconContainer?: FountainUiStyle;
|
|
10
12
|
inner?: FountainUiStyle;
|
|
11
13
|
label: TextStyle;
|
|
12
14
|
}
|
|
13
15
|
|
|
14
|
-
export default function useVariantStyleMap(
|
|
16
|
+
export default function useVariantStyleMap(
|
|
17
|
+
variant: TabVariant,
|
|
18
|
+
selected: boolean,
|
|
19
|
+
size: TabSize,
|
|
20
|
+
parentColor: TabsColor,
|
|
21
|
+
): VariantStyle {
|
|
15
22
|
const theme = useTheme();
|
|
16
23
|
|
|
17
24
|
return useMemo<VariantStyle>(() => {
|
|
@@ -25,21 +32,57 @@ export default function useVariantStyleMap(variant: TabVariant, selected: boolea
|
|
|
25
32
|
inner: {
|
|
26
33
|
backgroundColor: selected
|
|
27
34
|
? theme.palette.fill.base
|
|
28
|
-
:
|
|
35
|
+
: parentColor === 'alt'
|
|
36
|
+
? theme.palette.surface.base
|
|
37
|
+
: theme.palette.fill.weaker,
|
|
29
38
|
borderRadius: theme.shape.radius.full,
|
|
30
|
-
|
|
31
|
-
|
|
39
|
+
flexDirection: 'row',
|
|
40
|
+
gap: 5,
|
|
41
|
+
paddingBottom: 7.5,
|
|
42
|
+
paddingHorizontal: 14,
|
|
43
|
+
paddingTop: 6.5,
|
|
44
|
+
},
|
|
45
|
+
label: createFontStyle(theme, {
|
|
46
|
+
selector: (_) => typographyOf({
|
|
47
|
+
fontSize: size === 'small' ? 14 : 15,
|
|
48
|
+
lineHeight: size === 'small' ? 18.2 : 19.5,
|
|
49
|
+
fontFamily: 'PretendardStd-SemiBold',
|
|
50
|
+
letterSpacing: 0,
|
|
51
|
+
}),
|
|
52
|
+
color: selected
|
|
53
|
+
? theme.palette.text.strongInverse
|
|
54
|
+
: theme.palette.text.base,
|
|
55
|
+
}),
|
|
56
|
+
};
|
|
57
|
+
case 'circular-home':
|
|
58
|
+
return {
|
|
59
|
+
container: {
|
|
60
|
+
paddingBottom: 4,
|
|
61
|
+
paddingHorizontal: 3,
|
|
62
|
+
},
|
|
63
|
+
inner: {
|
|
64
|
+
backgroundColor: selected
|
|
65
|
+
? theme.palette.fill.base
|
|
66
|
+
: theme.palette.surface.base,
|
|
67
|
+
borderRadius: theme.shape.radius.full,
|
|
68
|
+
borderWidth: selected ? undefined : 0.5,
|
|
69
|
+
borderColor: selected ? undefined : theme.palette.border.weak,
|
|
70
|
+
flexDirection: 'row',
|
|
71
|
+
gap: 5,
|
|
72
|
+
paddingBottom: 7.5,
|
|
73
|
+
paddingHorizontal: 14,
|
|
74
|
+
paddingTop: 6.5,
|
|
32
75
|
},
|
|
33
76
|
label: createFontStyle(theme, {
|
|
34
77
|
selector: (_) => typographyOf({
|
|
35
78
|
fontSize: 14,
|
|
36
79
|
lineHeight: 18.2,
|
|
37
|
-
fontFamily: '
|
|
38
|
-
letterSpacing: 0,
|
|
80
|
+
fontFamily: 'LexendDeca-Medium',
|
|
81
|
+
letterSpacing: -0.28,
|
|
39
82
|
}),
|
|
40
83
|
color: selected
|
|
41
84
|
? theme.palette.text.strongInverse
|
|
42
|
-
: theme.palette.text.
|
|
85
|
+
: theme.palette.text.base,
|
|
43
86
|
}),
|
|
44
87
|
};
|
|
45
88
|
case 'bottom-navigation':
|
|
@@ -48,15 +91,19 @@ export default function useVariantStyleMap(variant: TabVariant, selected: boolea
|
|
|
48
91
|
alignItems: 'center',
|
|
49
92
|
height: 49,
|
|
50
93
|
justifyContent: 'flex-start',
|
|
51
|
-
|
|
52
|
-
|
|
94
|
+
maxWidth: 64,
|
|
95
|
+
paddingTop: 10,
|
|
96
|
+
},
|
|
97
|
+
inner: {
|
|
98
|
+
flexDirection: 'column',
|
|
99
|
+
gap: 5,
|
|
53
100
|
},
|
|
54
101
|
label: createFontStyle(theme, {
|
|
55
102
|
selector: (_) => typographyOf({
|
|
56
|
-
fontSize: 10,
|
|
57
|
-
lineHeight: 10,
|
|
58
|
-
fontFamily: '
|
|
59
|
-
letterSpacing: -0.
|
|
103
|
+
fontSize: 10.5,
|
|
104
|
+
lineHeight: 10.5,
|
|
105
|
+
fontFamily: 'PretendardStd-Medium',
|
|
106
|
+
letterSpacing: -0.105,
|
|
60
107
|
}),
|
|
61
108
|
color: selected
|
|
62
109
|
? theme.palette.text.strong
|
|
@@ -67,13 +114,19 @@ export default function useVariantStyleMap(variant: TabVariant, selected: boolea
|
|
|
67
114
|
default:
|
|
68
115
|
return {
|
|
69
116
|
container: {
|
|
70
|
-
|
|
117
|
+
paddingHorizontal: 10,
|
|
118
|
+
},
|
|
119
|
+
inner: {
|
|
120
|
+
flexDirection: 'row',
|
|
121
|
+
gap: 5,
|
|
122
|
+
paddingHorizontal: 1,
|
|
123
|
+
paddingVertical: 10,
|
|
71
124
|
},
|
|
72
125
|
label: createFontStyle(theme, {
|
|
73
126
|
selector: (_) => typographyOf({
|
|
74
|
-
fontSize: 15,
|
|
75
|
-
lineHeight: 18.75,
|
|
76
|
-
fontFamily: '
|
|
127
|
+
fontSize: size === 'small' ? 15 : 16,
|
|
128
|
+
lineHeight: size === 'small' ? 18.75 : 20,
|
|
129
|
+
fontFamily: selected ? 'PretendardStd-SemiBold' : 'PretendardStd-Medium',
|
|
77
130
|
letterSpacing: 0,
|
|
78
131
|
}),
|
|
79
132
|
color: selected
|
|
@@ -82,5 +135,5 @@ export default function useVariantStyleMap(variant: TabVariant, selected: boolea
|
|
|
82
135
|
}),
|
|
83
136
|
};
|
|
84
137
|
}
|
|
85
|
-
}, [theme, variant, selected]);
|
|
138
|
+
}, [theme, variant, selected, size, parentColor]);
|
|
86
139
|
}
|
package/src/TabBase/TabBase.tsx
CHANGED
|
@@ -3,7 +3,7 @@ import { css, NamedStylesStringUnion, UseStyles } from '@fountain-ui/styles';
|
|
|
3
3
|
import ButtonBase from '../ButtonBase';
|
|
4
4
|
import type TabBaseProps from './TabBaseProps';
|
|
5
5
|
|
|
6
|
-
type TabBaseStyles = NamedStylesStringUnion<'root'
|
|
6
|
+
type TabBaseStyles = NamedStylesStringUnion<'root'>;
|
|
7
7
|
|
|
8
8
|
const useStyles: UseStyles<TabBaseStyles> = function (): TabBaseStyles {
|
|
9
9
|
return {
|
|
@@ -11,12 +11,6 @@ const useStyles: UseStyles<TabBaseStyles> = function (): TabBaseStyles {
|
|
|
11
11
|
alignItems: 'center',
|
|
12
12
|
justifyContent: 'center',
|
|
13
13
|
},
|
|
14
|
-
row: {
|
|
15
|
-
flexDirection: 'row',
|
|
16
|
-
},
|
|
17
|
-
column: {
|
|
18
|
-
flexDirection: 'column',
|
|
19
|
-
},
|
|
20
14
|
};
|
|
21
15
|
};
|
|
22
16
|
|
|
@@ -26,7 +20,6 @@ export default function TabBase(props: TabBaseProps) {
|
|
|
26
20
|
disabled = false,
|
|
27
21
|
onPress,
|
|
28
22
|
selected = false,
|
|
29
|
-
vertical = false,
|
|
30
23
|
style,
|
|
31
24
|
...otherProps
|
|
32
25
|
} = props;
|
|
@@ -39,7 +32,6 @@ export default function TabBase(props: TabBaseProps) {
|
|
|
39
32
|
disabled={disabled}
|
|
40
33
|
style={css([
|
|
41
34
|
styles.root,
|
|
42
|
-
vertical ? styles.column : styles.row,
|
|
43
35
|
style,
|
|
44
36
|
])}
|
|
45
37
|
{...otherProps}
|
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,13 @@ import useTabInnerContentsWidth from './useTabInnerContentsWidth';
|
|
|
16
16
|
import useIndexStore from './useIndexStore';
|
|
17
17
|
import InternalContext from './InternalContext';
|
|
18
18
|
import { isEveryTabCoordinatesDefined } from './utils';
|
|
19
|
+
import { defaultCoordinate } from './TabCoordinate';
|
|
20
|
+
import useTabsStyle from './useTabsStyle';
|
|
19
21
|
|
|
20
22
|
type TabsStyleKeys =
|
|
21
23
|
| 'root'
|
|
22
24
|
| 'fixedRoot'
|
|
23
25
|
| 'fixedTab'
|
|
24
|
-
| 'scrollableContainer'
|
|
25
26
|
| 'bottomDivider';
|
|
26
27
|
|
|
27
28
|
type TabsStyles = NamedStylesStringUnion<TabsStyleKeys>;
|
|
@@ -37,9 +38,6 @@ const useStyles: UseStyles<TabsStyles> = function (): TabsStyles {
|
|
|
37
38
|
fixedTab: {
|
|
38
39
|
flex: 1,
|
|
39
40
|
},
|
|
40
|
-
scrollableContainer: {
|
|
41
|
-
paddingHorizontal: theme.spacing(1),
|
|
42
|
-
},
|
|
43
41
|
bottomDivider: {
|
|
44
42
|
borderBottomColor: theme.palette.border.base,
|
|
45
43
|
borderBottomWidth: 0.5,
|
|
@@ -60,6 +58,7 @@ const Tabs = forwardRef<TabsInstance, TabsProps>(function Tabs(props, ref) {
|
|
|
60
58
|
scrollable = false,
|
|
61
59
|
scrollViewContentContainerStyle,
|
|
62
60
|
showDivider = false,
|
|
61
|
+
size = 'medium' as TabSize,
|
|
63
62
|
style,
|
|
64
63
|
variant = 'default' as TabVariant,
|
|
65
64
|
UNSTABLE_sharedIndex,
|
|
@@ -72,6 +71,11 @@ const Tabs = forwardRef<TabsInstance, TabsProps>(function Tabs(props, ref) {
|
|
|
72
71
|
|
|
73
72
|
const currentIndexRef = useRef(initialIndex);
|
|
74
73
|
|
|
74
|
+
const {
|
|
75
|
+
container: containerStyle,
|
|
76
|
+
contentContainer: contentContainerStyle,
|
|
77
|
+
} = useTabsStyle(variant, size, scrollable);
|
|
78
|
+
|
|
75
79
|
const setTab = (newIndex: number) => {
|
|
76
80
|
const currentIndex = currentIndexRef.current;
|
|
77
81
|
onTabSelected?.(newIndex, currentIndex);
|
|
@@ -110,7 +114,12 @@ const Tabs = forwardRef<TabsInstance, TabsProps>(function Tabs(props, ref) {
|
|
|
110
114
|
}
|
|
111
115
|
|
|
112
116
|
return innerContentsWidthList.map((innerContentWidth, idx) => {
|
|
113
|
-
const
|
|
117
|
+
const outerCoordinate = outerCoordinates[idx];
|
|
118
|
+
if (!outerCoordinate) {
|
|
119
|
+
return defaultCoordinate;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
const { x1: outerX1, x2: outerX2 } = outerCoordinate;
|
|
114
123
|
|
|
115
124
|
const tabWidth = outerX2 - outerX1;
|
|
116
125
|
const distanceFromParent = (tabWidth - innerContentWidth) / 2;
|
|
@@ -163,6 +172,9 @@ const Tabs = forwardRef<TabsInstance, TabsProps>(function Tabs(props, ref) {
|
|
|
163
172
|
child.props.onPress?.();
|
|
164
173
|
};
|
|
165
174
|
|
|
175
|
+
// @ts-ignore
|
|
176
|
+
const tabStyle = child.props.style;
|
|
177
|
+
|
|
166
178
|
// @ts-ignore
|
|
167
179
|
const tabElement = cloneElement(child, {
|
|
168
180
|
enableIndicator: !disableIndicator && !canRenderIndicator,
|
|
@@ -170,9 +182,14 @@ const Tabs = forwardRef<TabsInstance, TabsProps>(function Tabs(props, ref) {
|
|
|
170
182
|
onLayout,
|
|
171
183
|
onPress,
|
|
172
184
|
onMouseDown,
|
|
185
|
+
parentColor: color,
|
|
186
|
+
size,
|
|
173
187
|
variant,
|
|
174
188
|
indicatorSize,
|
|
175
|
-
style:
|
|
189
|
+
style: css([
|
|
190
|
+
scrollable ? undefined : styles.fixedTab,
|
|
191
|
+
tabStyle,
|
|
192
|
+
]),
|
|
176
193
|
});
|
|
177
194
|
|
|
178
195
|
return (
|
|
@@ -202,6 +219,7 @@ const Tabs = forwardRef<TabsInstance, TabsProps>(function Tabs(props, ref) {
|
|
|
202
219
|
<View
|
|
203
220
|
style={css([
|
|
204
221
|
styles.root,
|
|
222
|
+
containerStyle,
|
|
205
223
|
{ backgroundColor: backgroundColorMap[color] },
|
|
206
224
|
showDivider ? styles.bottomDivider : undefined,
|
|
207
225
|
scrollable ? undefined : styles.fixedRoot,
|
|
@@ -213,7 +231,7 @@ const Tabs = forwardRef<TabsInstance, TabsProps>(function Tabs(props, ref) {
|
|
|
213
231
|
automaticallyAdjustContentInsets={false}
|
|
214
232
|
bounces={false}
|
|
215
233
|
contentContainerStyle={css([
|
|
216
|
-
|
|
234
|
+
contentContainerStyle,
|
|
217
235
|
scrollViewContentContainerStyle,
|
|
218
236
|
])}
|
|
219
237
|
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
|
*/
|
package/src/Tabs/index.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { default } from './Tabs';
|
|
2
|
-
export type { default as TabsProps } from './TabsProps';
|
|
2
|
+
export type { default as TabsProps, TabIndicatorSize, TabsColor } from './TabsProps';
|
|
3
3
|
export { tabIndicatorSizes, tabsColors } from './TabsProps';
|
|
4
4
|
export type { TabsInstance } from './types';
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { useMemo } from 'react';
|
|
2
|
+
import type { FountainUiStyle } from '@fountain-ui/styles';
|
|
3
|
+
import { useBreakpointUp } from '../hooks';
|
|
4
|
+
import { useTheme } from '../styles';
|
|
5
|
+
import type { TabSize, TabVariant } from '../Tab';
|
|
6
|
+
|
|
7
|
+
interface TabsStyle {
|
|
8
|
+
container: FountainUiStyle;
|
|
9
|
+
contentContainer?: FountainUiStyle;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export default function useTabsStyle(variant: TabVariant, size: TabSize, scrollable: boolean) {
|
|
13
|
+
const theme = useTheme();
|
|
14
|
+
|
|
15
|
+
const isTablet = useBreakpointUp('md', true, false);
|
|
16
|
+
|
|
17
|
+
return useMemo<TabsStyle>(() => {
|
|
18
|
+
switch (variant) {
|
|
19
|
+
case 'circular': {
|
|
20
|
+
const paddingHorizontal = isTablet ? 20 : (size === 'small' ? 8 : 12);
|
|
21
|
+
|
|
22
|
+
return {
|
|
23
|
+
container: {
|
|
24
|
+
paddingBottom: 8,
|
|
25
|
+
paddingHorizontal: scrollable ? 0 : paddingHorizontal,
|
|
26
|
+
},
|
|
27
|
+
contentContainer: {
|
|
28
|
+
paddingHorizontal: scrollable ? paddingHorizontal : 0,
|
|
29
|
+
},
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
case 'circular-home': {
|
|
33
|
+
const paddingHorizontal = isTablet ? 20 : 8;
|
|
34
|
+
|
|
35
|
+
return {
|
|
36
|
+
container: {
|
|
37
|
+
paddingBottom: 8,
|
|
38
|
+
paddingHorizontal: scrollable ? 0 : paddingHorizontal,
|
|
39
|
+
},
|
|
40
|
+
contentContainer: {
|
|
41
|
+
paddingHorizontal: scrollable ? paddingHorizontal : 0,
|
|
42
|
+
},
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
case 'bottom-navigation': {
|
|
46
|
+
const paddingHorizontal = 24;
|
|
47
|
+
|
|
48
|
+
return {
|
|
49
|
+
container: {
|
|
50
|
+
...(isTablet ? {
|
|
51
|
+
alignSelf: 'center',
|
|
52
|
+
minWidth: 460,
|
|
53
|
+
} : {}),
|
|
54
|
+
justifyContent: 'space-between',
|
|
55
|
+
paddingHorizontal: scrollable ? 0 : paddingHorizontal,
|
|
56
|
+
},
|
|
57
|
+
contentContainer: {
|
|
58
|
+
paddingHorizontal: scrollable ? paddingHorizontal : 0,
|
|
59
|
+
},
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
case 'default':
|
|
63
|
+
default: {
|
|
64
|
+
const paddingHorizontal = isTablet ? 14 : 6;
|
|
65
|
+
|
|
66
|
+
return {
|
|
67
|
+
container: {
|
|
68
|
+
paddingHorizontal: scrollable ? 0 : paddingHorizontal,
|
|
69
|
+
},
|
|
70
|
+
contentContainer: {
|
|
71
|
+
paddingHorizontal: scrollable ? paddingHorizontal : 0,
|
|
72
|
+
},
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}, [theme, variant, isTablet, size, scrollable]);
|
|
77
|
+
}
|