@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
|
@@ -1,36 +1,46 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import type { FlexStyle } from 'react-native';
|
|
3
|
+
import { Platform, Text, View } from 'react-native';
|
|
4
|
+
import type { NamedStylesStringUnion, UseStyles } from '@fountain-ui/styles';
|
|
5
|
+
import { typographyOf } from '@fountain-ui/styles';
|
|
4
6
|
import ButtonBase from '../ButtonBase';
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
+
import Row from '../Row';
|
|
8
|
+
import { createFontStyle, css, useTheme } from '../styles';
|
|
9
|
+
import type ListItemProps from './ListItemProps';
|
|
7
10
|
|
|
8
|
-
type ListItemStyles = NamedStylesStringUnion<'
|
|
11
|
+
type ListItemStyles = NamedStylesStringUnion<'content' | 'description'>;
|
|
9
12
|
|
|
10
13
|
const useStyles: UseStyles<ListItemStyles> = function (): ListItemStyles {
|
|
11
14
|
const theme = useTheme();
|
|
12
15
|
|
|
13
16
|
return {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
17
|
+
content: {
|
|
18
|
+
borderBottomColor: theme.palette.border.weak,
|
|
19
|
+
borderBottomWidth: 0.5,
|
|
20
|
+
gap: theme.spacing(2),
|
|
21
|
+
paddingVertical: theme.spacing(3.75),
|
|
18
22
|
width: '100%',
|
|
19
23
|
},
|
|
24
|
+
description: {
|
|
25
|
+
paddingRight: theme.spacing(20),
|
|
26
|
+
},
|
|
20
27
|
};
|
|
21
28
|
};
|
|
22
29
|
|
|
23
30
|
export default function ListItem(props: ListItemProps) {
|
|
24
31
|
const {
|
|
25
|
-
alignItems = 'center',
|
|
32
|
+
alignItems = 'center' as FlexStyle['alignItems'],
|
|
26
33
|
button = false,
|
|
27
34
|
children,
|
|
35
|
+
description,
|
|
28
36
|
disabled = false,
|
|
29
37
|
onPress,
|
|
30
38
|
style,
|
|
31
39
|
...otherProps
|
|
32
40
|
} = props;
|
|
33
41
|
|
|
42
|
+
const theme = useTheme();
|
|
43
|
+
|
|
34
44
|
const styles = useStyles();
|
|
35
45
|
|
|
36
46
|
const rootComponentProps = {
|
|
@@ -38,33 +48,54 @@ export default function ListItem(props: ListItemProps) {
|
|
|
38
48
|
...otherProps,
|
|
39
49
|
};
|
|
40
50
|
|
|
41
|
-
const
|
|
42
|
-
styles.
|
|
43
|
-
{ alignItems },
|
|
51
|
+
const contentWrapperStyle = css([
|
|
52
|
+
styles.content,
|
|
44
53
|
style,
|
|
45
54
|
]);
|
|
46
55
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
56
|
+
const descriptionFontStyle = createFontStyle(theme, {
|
|
57
|
+
selector: (_) => typographyOf({
|
|
58
|
+
fontSize: 14,
|
|
59
|
+
lineHeight: 19.6,
|
|
60
|
+
fontFamily: 'PretendardStd-Regular',
|
|
61
|
+
letterSpacing: 0,
|
|
62
|
+
}),
|
|
63
|
+
color: theme.palette.text.base,
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
const content = (
|
|
67
|
+
<React.Fragment>
|
|
68
|
+
<Row alignItems={alignItems}>
|
|
69
|
+
{children}
|
|
70
|
+
</Row>
|
|
71
|
+
|
|
72
|
+
{description ? (
|
|
73
|
+
<Text style={css([
|
|
74
|
+
styles.description,
|
|
75
|
+
descriptionFontStyle,
|
|
76
|
+
])}>
|
|
77
|
+
{description}
|
|
78
|
+
</Text>
|
|
79
|
+
) : null}
|
|
80
|
+
</React.Fragment>
|
|
81
|
+
);
|
|
82
|
+
|
|
83
|
+
return (
|
|
84
|
+
// @ts-ignore
|
|
85
|
+
<View {...rootComponentProps}>
|
|
86
|
+
{button ? (
|
|
51
87
|
<ButtonBase
|
|
52
88
|
disabled={disabled}
|
|
53
89
|
onPress={onPress}
|
|
54
|
-
style={
|
|
90
|
+
style={contentWrapperStyle}
|
|
55
91
|
>
|
|
56
|
-
{
|
|
92
|
+
{content}
|
|
57
93
|
</ButtonBase>
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
<View
|
|
65
|
-
children={children}
|
|
66
|
-
style={rootStyle}
|
|
67
|
-
{...rootComponentProps}
|
|
68
|
-
/>
|
|
94
|
+
) : (
|
|
95
|
+
<View style={contentWrapperStyle}>
|
|
96
|
+
{content}
|
|
97
|
+
</View>
|
|
98
|
+
)}
|
|
99
|
+
</View>
|
|
69
100
|
);
|
|
70
101
|
};
|
|
@@ -16,6 +16,11 @@ export default interface ListItemProps extends OverridableComponentProps<React.P
|
|
|
16
16
|
*/
|
|
17
17
|
button?: boolean;
|
|
18
18
|
|
|
19
|
+
/**
|
|
20
|
+
* Displays a description in this item.
|
|
21
|
+
*/
|
|
22
|
+
description?: string;
|
|
23
|
+
|
|
19
24
|
/**
|
|
20
25
|
* Whether to prevent interaction with the ButtonBase.
|
|
21
26
|
* @default false
|
|
@@ -9,6 +9,8 @@ type ListItemSecondaryActionStyles = NamedStylesStringUnion<'root'>;
|
|
|
9
9
|
const useStyles: UseStyles<ListItemSecondaryActionStyles> = function (): ListItemSecondaryActionStyles {
|
|
10
10
|
return {
|
|
11
11
|
root: {
|
|
12
|
+
alignItems: 'center',
|
|
13
|
+
flexDirection: 'row',
|
|
12
14
|
flexShrink: 0,
|
|
13
15
|
marginLeft: 'auto',
|
|
14
16
|
},
|
|
@@ -1,37 +1,42 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { Text } from 'react-native';
|
|
3
|
+
import type { NamedStylesStringUnion, UseStyles } from '@fountain-ui/styles';
|
|
4
|
+
import { typographyOf } from '@fountain-ui/styles';
|
|
3
5
|
import Column from '../Column';
|
|
4
|
-
import
|
|
5
|
-
import { css, useTheme } from '../styles';
|
|
6
|
+
import { createFontStyle, css, useTheme } from '../styles';
|
|
6
7
|
import type ListItemTextProps from './ListItemTextProps';
|
|
7
8
|
|
|
8
|
-
type ListItemTextStyles = NamedStylesStringUnion<'root'
|
|
9
|
+
type ListItemTextStyles = NamedStylesStringUnion<'root'>;
|
|
9
10
|
|
|
10
11
|
const useStyles: UseStyles<ListItemTextStyles> = function (): ListItemTextStyles {
|
|
11
|
-
const theme = useTheme();
|
|
12
|
-
|
|
13
12
|
return {
|
|
14
13
|
root: {
|
|
15
14
|
flexGrow: 1,
|
|
16
15
|
flexShrink: 1,
|
|
17
16
|
},
|
|
18
|
-
multiline: {
|
|
19
|
-
marginBottom: theme.spacing(1),
|
|
20
|
-
},
|
|
21
17
|
};
|
|
22
18
|
};
|
|
23
19
|
|
|
24
20
|
export default function ListItemText(props: ListItemTextProps) {
|
|
25
21
|
const {
|
|
26
|
-
|
|
27
|
-
secondary,
|
|
22
|
+
children,
|
|
28
23
|
style,
|
|
29
24
|
...otherProps
|
|
30
25
|
} = props;
|
|
31
26
|
|
|
27
|
+
const theme = useTheme();
|
|
28
|
+
|
|
32
29
|
const styles = useStyles();
|
|
33
30
|
|
|
34
|
-
const
|
|
31
|
+
const fontStyle = createFontStyle(theme, {
|
|
32
|
+
selector: (_) => typographyOf({
|
|
33
|
+
fontSize: 16,
|
|
34
|
+
lineHeight: 19.2,
|
|
35
|
+
fontFamily: 'PretendardStd-Medium',
|
|
36
|
+
letterSpacing: 0,
|
|
37
|
+
}),
|
|
38
|
+
color: theme.palette.text.strong,
|
|
39
|
+
});
|
|
35
40
|
|
|
36
41
|
return (
|
|
37
42
|
<Column
|
|
@@ -41,22 +46,9 @@ export default function ListItemText(props: ListItemTextProps) {
|
|
|
41
46
|
])}
|
|
42
47
|
{...otherProps}
|
|
43
48
|
>
|
|
44
|
-
{
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
color={'strong'}
|
|
48
|
-
variant={'body3'}
|
|
49
|
-
style={isMultiline ? styles.multiline : undefined}
|
|
50
|
-
/>
|
|
51
|
-
) : null}
|
|
52
|
-
|
|
53
|
-
{secondary ? (
|
|
54
|
-
<Typography
|
|
55
|
-
children={secondary}
|
|
56
|
-
color={'strong'}
|
|
57
|
-
variant={'body3'}
|
|
58
|
-
/>
|
|
59
|
-
) : null}
|
|
49
|
+
<Text style={fontStyle}>
|
|
50
|
+
{children}
|
|
51
|
+
</Text>
|
|
60
52
|
</Column>
|
|
61
53
|
);
|
|
62
54
|
};
|
|
@@ -1,17 +1,9 @@
|
|
|
1
|
-
import type { TypographyProps } from '../Typography';
|
|
2
1
|
import type { OverridableComponentProps } from '../types';
|
|
3
2
|
import type { ColumnProps } from '../Column';
|
|
4
3
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export default interface ListItemTextProps extends OverridableComponentProps<BaseProps, {
|
|
4
|
+
export default interface ListItemTextProps extends OverridableComponentProps<ColumnProps, {
|
|
8
5
|
/**
|
|
9
6
|
* The main content element.
|
|
10
7
|
*/
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* The secondary content element.
|
|
15
|
-
*/
|
|
16
|
-
secondary?: TypographyProps['children'];
|
|
8
|
+
children: string;
|
|
17
9
|
}> {}
|
|
@@ -45,7 +45,7 @@ export default function NumberPagination(props: NumberPaginationProps) {
|
|
|
45
45
|
const typography = typographyOf({
|
|
46
46
|
fontSize: 9.5,
|
|
47
47
|
lineHeight: 11.4,
|
|
48
|
-
fontFamily: '
|
|
48
|
+
fontFamily: 'PretendardStd-SemiBold',
|
|
49
49
|
letterSpacing: -0.19,
|
|
50
50
|
});
|
|
51
51
|
|
|
@@ -61,7 +61,12 @@ export default function NumberPagination(props: NumberPaginationProps) {
|
|
|
61
61
|
|
|
62
62
|
return (
|
|
63
63
|
<Row style={styles.root}>
|
|
64
|
-
<Text
|
|
64
|
+
<Text
|
|
65
|
+
style={[
|
|
66
|
+
currentFontStyle,
|
|
67
|
+
{ fontVariant: ['tabular-nums'] },
|
|
68
|
+
]}
|
|
69
|
+
>
|
|
65
70
|
{currentPage + 1}
|
|
66
71
|
</Text>
|
|
67
72
|
|
|
@@ -8,7 +8,7 @@ import IconButton from '../IconButton';
|
|
|
8
8
|
import PaginationItem from '../PaginationItem';
|
|
9
9
|
import NumberPagination from './NumberPagination';
|
|
10
10
|
import type PaginationProps from './PaginationProps';
|
|
11
|
-
import type { PaginationVariant } from './PaginationProps';
|
|
11
|
+
import type { PaginationColor, PaginationVariant } from './PaginationProps';
|
|
12
12
|
|
|
13
13
|
type PaginationStyleKeys =
|
|
14
14
|
| 'root'
|
|
@@ -65,6 +65,7 @@ export default function Pagination(props: PaginationProps) {
|
|
|
65
65
|
const {
|
|
66
66
|
bundleSize = 1,
|
|
67
67
|
children,
|
|
68
|
+
color = 'base' as PaginationColor,
|
|
68
69
|
count,
|
|
69
70
|
disabled = false,
|
|
70
71
|
hideIndicator = false,
|
|
@@ -134,7 +135,7 @@ export default function Pagination(props: PaginationProps) {
|
|
|
134
135
|
currentPage={page}
|
|
135
136
|
maxPage={count}
|
|
136
137
|
/>
|
|
137
|
-
) : times(i => renderItem({ index: i, disabled, selected: i === page }), count)
|
|
138
|
+
) : times(i => renderItem({ color, index: i, disabled, selected: i === page }), count)
|
|
138
139
|
) : null;
|
|
139
140
|
|
|
140
141
|
const containerProps = {
|
|
@@ -2,10 +2,19 @@ import React from 'react';
|
|
|
2
2
|
import type { ViewProps } from 'react-native';
|
|
3
3
|
import type { OverridableComponentProps } from '../types';
|
|
4
4
|
|
|
5
|
+
export const paginationColors = ['base', 'static'] as const;
|
|
6
|
+
export type PaginationColor = typeof paginationColors[number];
|
|
7
|
+
|
|
5
8
|
export const paginationVariants = ['dot', 'number'] as const;
|
|
6
9
|
export type PaginationVariant = typeof paginationVariants[number];
|
|
7
10
|
|
|
8
11
|
export interface PaginationRenderItemParams {
|
|
12
|
+
/**
|
|
13
|
+
* Set color of dot.
|
|
14
|
+
* @default 'base'
|
|
15
|
+
*/
|
|
16
|
+
color?: PaginationColor;
|
|
17
|
+
|
|
9
18
|
/**
|
|
10
19
|
* Index of the pagination item.
|
|
11
20
|
*/
|
|
@@ -34,6 +43,12 @@ export default interface PaginationProps extends OverridableComponentProps<ViewP
|
|
|
34
43
|
*/
|
|
35
44
|
children?: React.ReactNode;
|
|
36
45
|
|
|
46
|
+
/**
|
|
47
|
+
* Set color of dot.
|
|
48
|
+
* @default 'base'
|
|
49
|
+
*/
|
|
50
|
+
color?: PaginationColor;
|
|
51
|
+
|
|
37
52
|
/**
|
|
38
53
|
* The total number of pages.
|
|
39
54
|
*/
|
package/src/Pagination/index.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { default } from './Pagination';
|
|
2
|
-
export type { default as PaginationProps } from './PaginationProps';
|
|
3
|
-
export { paginationVariants } from './PaginationProps';
|
|
2
|
+
export type { default as PaginationProps, PaginationColor, PaginationVariant } from './PaginationProps';
|
|
3
|
+
export { paginationColors, paginationVariants } from './PaginationProps';
|
|
@@ -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
|
])}
|