@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
|
@@ -1,47 +1,54 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { View } from 'react-native';
|
|
3
|
-
import { NamedStylesStringUnion, UseStyles } from '@fountain-ui/styles';
|
|
2
|
+
import { StyleSheet, View, ViewStyle } from 'react-native';
|
|
3
|
+
import { commonColors, NamedStylesStringUnion, UseStyles } from '@fountain-ui/styles';
|
|
4
|
+
import { PaginationColor } from '../Pagination';
|
|
4
5
|
import { css, useTheme } from '../styles';
|
|
5
6
|
import type PaginationItemProps from './PaginationItemProps';
|
|
6
7
|
|
|
7
|
-
|
|
8
|
+
const DEFAULT_SIZE = 6;
|
|
8
9
|
|
|
9
|
-
const
|
|
10
|
+
const styles = StyleSheet.create({
|
|
11
|
+
root: {
|
|
12
|
+
width: DEFAULT_SIZE,
|
|
13
|
+
height: DEFAULT_SIZE,
|
|
14
|
+
borderRadius: DEFAULT_SIZE * 0.5,
|
|
15
|
+
marginHorizontal: 4,
|
|
16
|
+
},
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
function getBackgroundColor(color: PaginationColor, selected: boolean): ViewStyle['backgroundColor'] {
|
|
10
20
|
const theme = useTheme();
|
|
11
21
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
backgroundColor: theme.palette.status.disabled,
|
|
26
|
-
},
|
|
27
|
-
};
|
|
28
|
-
};
|
|
22
|
+
switch (color) {
|
|
23
|
+
case 'static':
|
|
24
|
+
return selected
|
|
25
|
+
? commonColors.static.strongInverse
|
|
26
|
+
: commonColors.static.weakOpacityInverse;
|
|
27
|
+
case 'base':
|
|
28
|
+
default:
|
|
29
|
+
return selected
|
|
30
|
+
? theme.palette.fill.base
|
|
31
|
+
: theme.palette.status.disabled;
|
|
32
|
+
|
|
33
|
+
}
|
|
34
|
+
}
|
|
29
35
|
|
|
30
36
|
function PaginationItem(props: PaginationItemProps) {
|
|
31
37
|
const {
|
|
38
|
+
color = 'base' as PaginationColor,
|
|
32
39
|
disabled,
|
|
33
|
-
selected,
|
|
40
|
+
selected = false,
|
|
34
41
|
style,
|
|
35
42
|
...otherProps
|
|
36
43
|
} = props;
|
|
37
44
|
|
|
38
|
-
const
|
|
45
|
+
const backgroundColor = getBackgroundColor(color, selected);
|
|
39
46
|
|
|
40
47
|
return (
|
|
41
48
|
<View
|
|
42
49
|
style={css([
|
|
43
50
|
styles.root,
|
|
44
|
-
|
|
51
|
+
{ backgroundColor },
|
|
45
52
|
style,
|
|
46
53
|
])}
|
|
47
54
|
{...otherProps}
|
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
import type { ViewProps } from 'react-native';
|
|
2
2
|
import type { OverridableComponentProps } from '../types';
|
|
3
|
+
import { PaginationColor } from '../Pagination';
|
|
3
4
|
|
|
4
5
|
export default interface PaginationItemProps extends OverridableComponentProps<ViewProps, {
|
|
6
|
+
/**
|
|
7
|
+
* Set color of dot.
|
|
8
|
+
* @default 'base'
|
|
9
|
+
*/
|
|
10
|
+
color?: PaginationColor;
|
|
11
|
+
|
|
5
12
|
/**
|
|
6
13
|
* If `true`, the pagination item is disabled.
|
|
7
14
|
* @default false
|
package/src/Radio/Radio.tsx
CHANGED
|
@@ -9,6 +9,8 @@ import { cloneElementSafely } from '../utils';
|
|
|
9
9
|
import { RadioContext } from '../RadioGroup/RadioContextProvider';
|
|
10
10
|
import type RadioProps from './RadioProps';
|
|
11
11
|
|
|
12
|
+
const DEFAULT_START_ICON_SIZE = 21;
|
|
13
|
+
|
|
12
14
|
type RadioStyles = NamedStylesStringUnion<'root' | 'content'>;
|
|
13
15
|
|
|
14
16
|
const useStyles: UseStyles<RadioStyles> = function (): RadioStyles {
|
|
@@ -17,12 +19,15 @@ const useStyles: UseStyles<RadioStyles> = function (): RadioStyles {
|
|
|
17
19
|
return {
|
|
18
20
|
root: {
|
|
19
21
|
alignItems: 'center',
|
|
22
|
+
borderBottomColor: theme.palette.border.weak,
|
|
23
|
+
borderBottomWidth: 0.5,
|
|
20
24
|
flexDirection: 'row',
|
|
21
|
-
gap:
|
|
25
|
+
gap: 32,
|
|
22
26
|
justifyContent: 'space-between',
|
|
27
|
+
paddingVertical: 14,
|
|
23
28
|
},
|
|
24
29
|
content: {
|
|
25
|
-
gap:
|
|
30
|
+
gap: 8,
|
|
26
31
|
minHeight: 20,
|
|
27
32
|
},
|
|
28
33
|
};
|
|
@@ -63,7 +68,11 @@ export default function Radio(props: RadioProps) {
|
|
|
63
68
|
const checkedIcon = checkIconProp ?? defaultCheckedIcon;
|
|
64
69
|
const icon = isChecked ? checkedIcon : null;
|
|
65
70
|
|
|
66
|
-
const startIcon = cloneElementSafely(startIconProp, {
|
|
71
|
+
const startIcon = cloneElementSafely(startIconProp, {
|
|
72
|
+
color: 'strong',
|
|
73
|
+
height: DEFAULT_START_ICON_SIZE,
|
|
74
|
+
width: DEFAULT_START_ICON_SIZE,
|
|
75
|
+
});
|
|
67
76
|
|
|
68
77
|
const rootStyle = css([
|
|
69
78
|
styles.root,
|
|
@@ -1,26 +1,8 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { View } from 'react-native';
|
|
3
|
-
import type { NamedStylesStringUnion, UseStyles } from '@fountain-ui/styles';
|
|
4
|
-
import { useTheme } from '../styles';
|
|
5
|
-
import type { FalsyReactElement } from '../utils';
|
|
6
|
-
import { cloneElementSafely } from '../utils';
|
|
7
3
|
import RadioContextProvider from './RadioContextProvider';
|
|
8
4
|
import type RadioGroupProps from './RadioGroupProps';
|
|
9
5
|
|
|
10
|
-
type RadioItemStyles = NamedStylesStringUnion<'root'>;
|
|
11
|
-
|
|
12
|
-
const useStyles: UseStyles<RadioItemStyles> = function (): RadioItemStyles {
|
|
13
|
-
const theme = useTheme();
|
|
14
|
-
|
|
15
|
-
return {
|
|
16
|
-
root: {
|
|
17
|
-
borderBottomColor: theme.palette.border.weak,
|
|
18
|
-
borderBottomWidth: 0.5,
|
|
19
|
-
paddingVertical: theme.spacing(3.5),
|
|
20
|
-
},
|
|
21
|
-
};
|
|
22
|
-
};
|
|
23
|
-
|
|
24
6
|
export default function RadioGroup(props: RadioGroupProps) {
|
|
25
7
|
const {
|
|
26
8
|
children,
|
|
@@ -29,18 +11,10 @@ export default function RadioGroup(props: RadioGroupProps) {
|
|
|
29
11
|
...otherProps
|
|
30
12
|
} = props;
|
|
31
13
|
|
|
32
|
-
const styles = useStyles();
|
|
33
|
-
|
|
34
|
-
const radios = Children.map(children, (child) => (
|
|
35
|
-
<View style={styles.root}>
|
|
36
|
-
{cloneElementSafely(child as FalsyReactElement)}
|
|
37
|
-
</View>
|
|
38
|
-
));
|
|
39
|
-
|
|
40
14
|
return (
|
|
41
15
|
<RadioContextProvider value={{ value, onChange }}>
|
|
42
16
|
<View {...otherProps}>
|
|
43
|
-
{
|
|
17
|
+
{children}
|
|
44
18
|
</View>
|
|
45
19
|
</RadioContextProvider>
|
|
46
20
|
);
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { View } from 'react-native';
|
|
3
|
+
import { useContentContainerStyle } from '../hooks';
|
|
4
|
+
import { css } from '../styles';
|
|
5
|
+
import type SectionProps from './SectionProps';
|
|
6
|
+
|
|
7
|
+
export default function Section(props: SectionProps) {
|
|
8
|
+
const {
|
|
9
|
+
children,
|
|
10
|
+
maxWidth,
|
|
11
|
+
style: styleProp,
|
|
12
|
+
} = props;
|
|
13
|
+
|
|
14
|
+
const styles = useContentContainerStyle({ maxWidth });
|
|
15
|
+
|
|
16
|
+
const rootStyle = css([
|
|
17
|
+
styles,
|
|
18
|
+
styleProp,
|
|
19
|
+
]);
|
|
20
|
+
|
|
21
|
+
return (
|
|
22
|
+
<View style={rootStyle}>
|
|
23
|
+
{children}
|
|
24
|
+
</View>
|
|
25
|
+
);
|
|
26
|
+
}
|
|
@@ -19,6 +19,8 @@ export default function ShadowView(props: ShadowViewProps) {
|
|
|
19
19
|
const {
|
|
20
20
|
borderRadius,
|
|
21
21
|
height,
|
|
22
|
+
maxHeight,
|
|
23
|
+
maxWidth,
|
|
22
24
|
width,
|
|
23
25
|
} = styleProp as FountainUiStyle;
|
|
24
26
|
|
|
@@ -30,6 +32,8 @@ export default function ShadowView(props: ShadowViewProps) {
|
|
|
30
32
|
{
|
|
31
33
|
borderRadius: borderRadius ?? 0,
|
|
32
34
|
height,
|
|
35
|
+
maxHeight,
|
|
36
|
+
maxWidth,
|
|
33
37
|
width,
|
|
34
38
|
},
|
|
35
39
|
])}
|
|
@@ -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,11 @@
|
|
|
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 { css, StyleSheet
|
|
5
|
+
import { css, StyleSheet } from '../styles';
|
|
7
6
|
import { cloneElementSafely } from '../utils';
|
|
8
7
|
import type TabProps from './TabProps';
|
|
9
|
-
import type { TabVariant } from './TabProps';
|
|
8
|
+
import type { TabSize, TabVariant } from './TabProps';
|
|
10
9
|
import useVariantStyleMap from './useVariantStyleMap';
|
|
11
10
|
|
|
12
11
|
const styles = StyleSheet.create({
|
|
@@ -28,21 +27,19 @@ export default function Tab(props: TabProps) {
|
|
|
28
27
|
icon: defaultIcon,
|
|
29
28
|
selected = false,
|
|
30
29
|
selectedIcon,
|
|
30
|
+
size = 'medium' as TabSize,
|
|
31
31
|
variant = 'default' as TabVariant,
|
|
32
32
|
style: styleProp,
|
|
33
33
|
onTabInnerLayout,
|
|
34
34
|
...otherProps
|
|
35
35
|
} = props;
|
|
36
36
|
|
|
37
|
-
const theme = useTheme();
|
|
38
|
-
|
|
39
|
-
const vertical = variant === 'bottom-navigation';
|
|
40
|
-
|
|
41
37
|
const {
|
|
42
38
|
container: containerStyle,
|
|
39
|
+
iconContainer: iconContainerStyle,
|
|
43
40
|
inner: innerStyle,
|
|
44
41
|
label: labelStyle,
|
|
45
|
-
} = useVariantStyleMap(variant, selected);
|
|
42
|
+
} = useVariantStyleMap(variant, selected, size);
|
|
46
43
|
|
|
47
44
|
const tabBaseStyle = css([
|
|
48
45
|
styles.root,
|
|
@@ -55,11 +52,8 @@ export default function Tab(props: TabProps) {
|
|
|
55
52
|
innerStyle,
|
|
56
53
|
]);
|
|
57
54
|
|
|
58
|
-
const pressEffect = selected ? 'none' : 'opacity';
|
|
59
|
-
|
|
60
55
|
const icon = selected ? (selectedIcon || defaultIcon) : defaultIcon;
|
|
61
|
-
const
|
|
62
|
-
const iconElement = cloneElementSafely(icon, { fill: iconColor });
|
|
56
|
+
const iconElement = cloneElementSafely(icon);
|
|
63
57
|
|
|
64
58
|
const tabElement = typeof children !== 'string' ? (
|
|
65
59
|
cloneElementSafely(children, {
|
|
@@ -69,25 +63,37 @@ export default function Tab(props: TabProps) {
|
|
|
69
63
|
<React.Fragment>
|
|
70
64
|
{iconElement ? (
|
|
71
65
|
<React.Fragment>
|
|
72
|
-
<Badge
|
|
73
|
-
{
|
|
66
|
+
<Badge
|
|
67
|
+
horizontalOffset={-4}
|
|
68
|
+
invisible={!badgeVisible}
|
|
69
|
+
verticalOffset={-4}
|
|
70
|
+
>
|
|
71
|
+
<View style={iconContainerStyle}>
|
|
72
|
+
{iconElement}
|
|
73
|
+
</View>
|
|
74
74
|
</Badge>
|
|
75
75
|
|
|
76
|
-
<
|
|
76
|
+
<Text style={css(labelStyle)}>
|
|
77
|
+
{children}
|
|
78
|
+
</Text>
|
|
77
79
|
</React.Fragment>
|
|
78
|
-
) :
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
80
|
+
) : (
|
|
81
|
+
<Badge
|
|
82
|
+
horizontalOffset={-7}
|
|
83
|
+
invisible={!badgeVisible}
|
|
84
|
+
verticalOffset={3}
|
|
85
|
+
>
|
|
86
|
+
<Text style={css(labelStyle)}>
|
|
87
|
+
{children}
|
|
88
|
+
</Text>
|
|
89
|
+
</Badge>
|
|
90
|
+
)}
|
|
83
91
|
</React.Fragment>
|
|
84
92
|
);
|
|
85
93
|
|
|
86
94
|
return (
|
|
87
95
|
<TabBase
|
|
88
|
-
pressEffect={pressEffect}
|
|
89
96
|
style={tabBaseStyle}
|
|
90
|
-
vertical={vertical}
|
|
91
97
|
{...otherProps}
|
|
92
98
|
>
|
|
93
99
|
<View onLayout={onTabInnerLayout} style={tabInnerStyle}>
|
package/src/Tab/TabProps.ts
CHANGED
|
@@ -3,7 +3,10 @@ import type { LayoutChangeEvent } from 'react-native';
|
|
|
3
3
|
import type { TabBaseProps } from '../TabBase';
|
|
4
4
|
import type { OverridableComponentProps } from '../types';
|
|
5
5
|
|
|
6
|
-
export const
|
|
6
|
+
export const tabSizes = ['small', 'medium'] as const;
|
|
7
|
+
export type TabSize = typeof tabSizes[number];
|
|
8
|
+
|
|
9
|
+
export const tabVariants = ['default', 'circular', 'circular-home', 'bottom-navigation'] as const;
|
|
7
10
|
export type TabVariant = typeof tabVariants[number];
|
|
8
11
|
|
|
9
12
|
export default interface TabProps extends OverridableComponentProps<TabBaseProps, {
|
|
@@ -40,6 +43,12 @@ export default interface TabProps extends OverridableComponentProps<TabBaseProps
|
|
|
40
43
|
*/
|
|
41
44
|
selectedIcon?: React.ReactElement;
|
|
42
45
|
|
|
46
|
+
/**
|
|
47
|
+
* The size of the Tab.
|
|
48
|
+
* @default 'medium'
|
|
49
|
+
*/
|
|
50
|
+
size?: TabSize;
|
|
51
|
+
|
|
43
52
|
/**
|
|
44
53
|
* The variant to use.
|
|
45
54
|
* @default 'default'
|
package/src/Tab/index.ts
CHANGED
|
@@ -3,15 +3,16 @@ import { TextStyle } from 'react-native';
|
|
|
3
3
|
import type { FountainUiStyle } from '@fountain-ui/styles';
|
|
4
4
|
import { typographyOf } from '@fountain-ui/styles';
|
|
5
5
|
import { createFontStyle, useTheme } from '../styles';
|
|
6
|
-
import type { TabVariant } from './TabProps';
|
|
6
|
+
import type { TabSize, TabVariant } from './TabProps';
|
|
7
7
|
|
|
8
8
|
interface VariantStyle {
|
|
9
9
|
container: FountainUiStyle;
|
|
10
|
+
iconContainer?: FountainUiStyle;
|
|
10
11
|
inner?: FountainUiStyle;
|
|
11
12
|
label: TextStyle;
|
|
12
13
|
}
|
|
13
14
|
|
|
14
|
-
export default function useVariantStyleMap(variant: TabVariant, selected: boolean): VariantStyle {
|
|
15
|
+
export default function useVariantStyleMap(variant: TabVariant, selected: boolean, size: TabSize): VariantStyle {
|
|
15
16
|
const theme = useTheme();
|
|
16
17
|
|
|
17
18
|
return useMemo<VariantStyle>(() => {
|
|
@@ -27,19 +28,53 @@ export default function useVariantStyleMap(variant: TabVariant, selected: boolea
|
|
|
27
28
|
? theme.palette.fill.base
|
|
28
29
|
: theme.palette.fill.weaker,
|
|
29
30
|
borderRadius: theme.shape.radius.full,
|
|
30
|
-
|
|
31
|
-
|
|
31
|
+
flexDirection: 'row',
|
|
32
|
+
gap: 5,
|
|
33
|
+
paddingBottom: 7.5,
|
|
34
|
+
paddingHorizontal: 14,
|
|
35
|
+
paddingTop: 6.5,
|
|
36
|
+
},
|
|
37
|
+
label: createFontStyle(theme, {
|
|
38
|
+
selector: (_) => typographyOf({
|
|
39
|
+
fontSize: size === 'small' ? 14 : 15,
|
|
40
|
+
lineHeight: size === 'small' ? 18.2 : 19.5,
|
|
41
|
+
fontFamily: 'PretendardStd-SemiBold',
|
|
42
|
+
letterSpacing: 0,
|
|
43
|
+
}),
|
|
44
|
+
color: selected
|
|
45
|
+
? theme.palette.text.strongInverse
|
|
46
|
+
: theme.palette.text.base,
|
|
47
|
+
}),
|
|
48
|
+
};
|
|
49
|
+
case 'circular-home':
|
|
50
|
+
return {
|
|
51
|
+
container: {
|
|
52
|
+
paddingBottom: 4,
|
|
53
|
+
paddingHorizontal: 3,
|
|
54
|
+
},
|
|
55
|
+
inner: {
|
|
56
|
+
backgroundColor: selected
|
|
57
|
+
? theme.palette.fill.base
|
|
58
|
+
: theme.palette.surface.base,
|
|
59
|
+
borderRadius: theme.shape.radius.full,
|
|
60
|
+
borderWidth: selected ? undefined : 0.5,
|
|
61
|
+
borderColor: selected ? undefined : theme.palette.border.weak,
|
|
62
|
+
flexDirection: 'row',
|
|
63
|
+
gap: 5,
|
|
64
|
+
paddingBottom: 7.5,
|
|
65
|
+
paddingHorizontal: 14,
|
|
66
|
+
paddingTop: 6.5,
|
|
32
67
|
},
|
|
33
68
|
label: createFontStyle(theme, {
|
|
34
69
|
selector: (_) => typographyOf({
|
|
35
70
|
fontSize: 14,
|
|
36
71
|
lineHeight: 18.2,
|
|
37
|
-
fontFamily: '
|
|
38
|
-
letterSpacing: 0,
|
|
72
|
+
fontFamily: 'LexendDeca-Medium',
|
|
73
|
+
letterSpacing: -0.28,
|
|
39
74
|
}),
|
|
40
75
|
color: selected
|
|
41
76
|
? theme.palette.text.strongInverse
|
|
42
|
-
: theme.palette.text.
|
|
77
|
+
: theme.palette.text.base,
|
|
43
78
|
}),
|
|
44
79
|
};
|
|
45
80
|
case 'bottom-navigation':
|
|
@@ -48,15 +83,22 @@ export default function useVariantStyleMap(variant: TabVariant, selected: boolea
|
|
|
48
83
|
alignItems: 'center',
|
|
49
84
|
height: 49,
|
|
50
85
|
justifyContent: 'flex-start',
|
|
51
|
-
paddingTop:
|
|
86
|
+
paddingTop: 10.5,
|
|
52
87
|
width: 48,
|
|
53
88
|
},
|
|
89
|
+
iconContainer: {
|
|
90
|
+
padding: 0.75,
|
|
91
|
+
},
|
|
92
|
+
inner: {
|
|
93
|
+
flexDirection: 'column',
|
|
94
|
+
gap: 4.75,
|
|
95
|
+
},
|
|
54
96
|
label: createFontStyle(theme, {
|
|
55
97
|
selector: (_) => typographyOf({
|
|
56
|
-
fontSize: 10,
|
|
57
|
-
lineHeight: 10,
|
|
58
|
-
fontFamily: '
|
|
59
|
-
letterSpacing: -0.
|
|
98
|
+
fontSize: 10.5,
|
|
99
|
+
lineHeight: 10.5,
|
|
100
|
+
fontFamily: 'PretendardStd-Medium',
|
|
101
|
+
letterSpacing: -0.105,
|
|
60
102
|
}),
|
|
61
103
|
color: selected
|
|
62
104
|
? theme.palette.text.strong
|
|
@@ -67,13 +109,19 @@ export default function useVariantStyleMap(variant: TabVariant, selected: boolea
|
|
|
67
109
|
default:
|
|
68
110
|
return {
|
|
69
111
|
container: {
|
|
70
|
-
|
|
112
|
+
paddingHorizontal: 10,
|
|
113
|
+
},
|
|
114
|
+
inner: {
|
|
115
|
+
flexDirection: 'row',
|
|
116
|
+
gap: 5,
|
|
117
|
+
paddingHorizontal: 1,
|
|
118
|
+
paddingVertical: 10,
|
|
71
119
|
},
|
|
72
120
|
label: createFontStyle(theme, {
|
|
73
121
|
selector: (_) => typographyOf({
|
|
74
|
-
fontSize: 15,
|
|
75
|
-
lineHeight: 18.75,
|
|
76
|
-
fontFamily: '
|
|
122
|
+
fontSize: size === 'small' ? 15 : 16,
|
|
123
|
+
lineHeight: size === 'small' ? 18.75 : 20,
|
|
124
|
+
fontFamily: selected ? 'PretendardStd-SemiBold' : 'PretendardStd-Medium',
|
|
77
125
|
letterSpacing: 0,
|
|
78
126
|
}),
|
|
79
127
|
color: selected
|
|
@@ -82,5 +130,5 @@ export default function useVariantStyleMap(variant: TabVariant, selected: boolea
|
|
|
82
130
|
}),
|
|
83
131
|
};
|
|
84
132
|
}
|
|
85
|
-
}, [theme, variant, selected]);
|
|
133
|
+
}, [theme, variant, selected, size]);
|
|
86
134
|
}
|
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}
|