@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
|
@@ -49,13 +49,13 @@ export default function useVariantStyleMap(variant: BadgeVariant, size: BadgeSiz
|
|
|
49
49
|
large: typographyOf({
|
|
50
50
|
fontSize: 14,
|
|
51
51
|
lineHeight: 14,
|
|
52
|
-
fontFamily: '
|
|
52
|
+
fontFamily: 'PretendardStd-Bold',
|
|
53
53
|
letterSpacing: -0.7,
|
|
54
54
|
}),
|
|
55
55
|
medium: typographyOf({
|
|
56
56
|
fontSize: 12,
|
|
57
57
|
lineHeight: 12,
|
|
58
|
-
fontFamily: '
|
|
58
|
+
fontFamily: 'PretendardStd-Bold',
|
|
59
59
|
letterSpacing: -0.6,
|
|
60
60
|
}),
|
|
61
61
|
};
|
|
@@ -13,7 +13,7 @@ const useStyles: UseStyles<BottomSheetTitleStyles> = function (): BottomSheetTit
|
|
|
13
13
|
|
|
14
14
|
return {
|
|
15
15
|
root: {
|
|
16
|
-
alignItems: '
|
|
16
|
+
alignItems: 'flex-start',
|
|
17
17
|
gap: theme.spacing(8),
|
|
18
18
|
justifyContent: 'space-between',
|
|
19
19
|
marginBottom: theme.spacing(4),
|
|
@@ -22,6 +22,7 @@ const useStyles: UseStyles<BottomSheetTitleStyles> = function (): BottomSheetTit
|
|
|
22
22
|
title: {
|
|
23
23
|
paddingBottom: theme.spacing(1.25),
|
|
24
24
|
paddingTop: theme.spacing(1),
|
|
25
|
+
minWidth: 0,
|
|
25
26
|
},
|
|
26
27
|
actionButton: {
|
|
27
28
|
paddingBottom: theme.spacing(1.75),
|
|
@@ -72,8 +73,10 @@ export default function BottomSheetTitle(props: BottomSheetTitleProps) {
|
|
|
72
73
|
<Button
|
|
73
74
|
children={actionButtonProps.title}
|
|
74
75
|
color={'accent'}
|
|
76
|
+
disabled={actionButtonProps.disabled ?? false}
|
|
75
77
|
disableMinWidth={true}
|
|
76
78
|
onPress={actionButtonProps.onPress}
|
|
79
|
+
size={'large'}
|
|
77
80
|
style={styles.actionButton}
|
|
78
81
|
variant={'text'}
|
|
79
82
|
/>
|
package/src/Button/Button.tsx
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { Linking, Text } from 'react-native';
|
|
2
|
+
import { Linking, Text, View } from 'react-native';
|
|
3
3
|
import type { FontStyle, NamedStylesStringUnion, UseStyles } from '@fountain-ui/styles';
|
|
4
4
|
import { typographyOf } from '@fountain-ui/styles';
|
|
5
5
|
import ButtonBase from '../ButtonBase/ButtonBase';
|
|
@@ -10,7 +10,7 @@ import type ButtonProps from './ButtonProps';
|
|
|
10
10
|
import type { ButtonColor, ButtonSize, ButtonVariant } from './ButtonProps';
|
|
11
11
|
import useVariantStyleMap from './useVariantStyleMap';
|
|
12
12
|
|
|
13
|
-
type ButtonStyles = NamedStylesStringUnion<'root' | 'fullWidth' | 'large' | 'medium' | 'small' | 'loadingSpinner'>;
|
|
13
|
+
type ButtonStyles = NamedStylesStringUnion<'root' | 'fullWidth' | 'large' | 'medium' | 'small' | 'loadingSpinner' | 'iconContainer'>;
|
|
14
14
|
|
|
15
15
|
const useStyles: UseStyles<ButtonStyles> = function (): ButtonStyles {
|
|
16
16
|
const theme = useTheme();
|
|
@@ -21,30 +21,34 @@ const useStyles: UseStyles<ButtonStyles> = function (): ButtonStyles {
|
|
|
21
21
|
borderRadius: theme.shape.radius.sm,
|
|
22
22
|
flexDirection: 'row',
|
|
23
23
|
justifyContent: 'center',
|
|
24
|
+
minHeight: 32,
|
|
24
25
|
},
|
|
25
26
|
fullWidth: {
|
|
26
27
|
width: '100%',
|
|
27
28
|
},
|
|
28
29
|
large: {
|
|
29
|
-
gap:
|
|
30
|
+
gap: 8,
|
|
30
31
|
minWidth: 104,
|
|
31
|
-
paddingHorizontal:
|
|
32
|
-
paddingVertical:
|
|
32
|
+
paddingHorizontal: 24,
|
|
33
|
+
paddingVertical: 14,
|
|
33
34
|
},
|
|
34
35
|
medium: {
|
|
35
|
-
gap:
|
|
36
|
+
gap: 6,
|
|
36
37
|
minWidth: 88,
|
|
37
|
-
paddingHorizontal:
|
|
38
|
-
paddingVertical:
|
|
38
|
+
paddingHorizontal: 16,
|
|
39
|
+
paddingVertical: 11,
|
|
39
40
|
},
|
|
40
41
|
small: {
|
|
41
42
|
minWidth: 64,
|
|
42
|
-
paddingHorizontal:
|
|
43
|
-
paddingVertical:
|
|
43
|
+
paddingHorizontal: 10,
|
|
44
|
+
paddingVertical: 8,
|
|
44
45
|
},
|
|
45
46
|
loadingSpinner: {
|
|
46
47
|
position: 'absolute',
|
|
47
48
|
},
|
|
49
|
+
iconContainer: {
|
|
50
|
+
paddingTop: 1,
|
|
51
|
+
},
|
|
48
52
|
};
|
|
49
53
|
};
|
|
50
54
|
|
|
@@ -82,6 +86,7 @@ export default function Button(props: ButtonProps) {
|
|
|
82
86
|
color: colorProp = 'primary' as ButtonColor,
|
|
83
87
|
disabled: disabledProp = false,
|
|
84
88
|
disableMinWidth = false,
|
|
89
|
+
disablePadding = false,
|
|
85
90
|
endIcon: endIconProp,
|
|
86
91
|
fullWidth = false,
|
|
87
92
|
href,
|
|
@@ -113,15 +118,26 @@ export default function Button(props: ButtonProps) {
|
|
|
113
118
|
opacity: isLoading ? 0 : 1,
|
|
114
119
|
};
|
|
115
120
|
|
|
116
|
-
const startIcon =
|
|
117
|
-
|
|
121
|
+
const startIcon = startIconProp ? (
|
|
122
|
+
<View style={styles.iconContainer}>
|
|
123
|
+
{cloneElementSafely(startIconProp, iconProps)}
|
|
124
|
+
</View>
|
|
125
|
+
) : null;
|
|
126
|
+
|
|
127
|
+
const endIcon = endIconProp ? (
|
|
128
|
+
<View style={styles.iconContainer}>
|
|
129
|
+
{cloneElementSafely(endIconProp, iconProps)}
|
|
130
|
+
</View>
|
|
131
|
+
) : null;
|
|
118
132
|
|
|
119
133
|
const buttonBaseStyle = css([
|
|
120
134
|
styles.root,
|
|
121
135
|
containerStyle,
|
|
122
136
|
styles[size],
|
|
137
|
+
(variant === 'capsuleSolid' || variant === 'capsuleOutlined') && size === 'small' ? { paddingHorizontal: 12 } : undefined,
|
|
123
138
|
fullWidth ? styles.fullWidth : undefined,
|
|
124
139
|
disableMinWidth ? { minWidth: 0 } : undefined,
|
|
140
|
+
disablePadding ? { paddingHorizontal: 0, paddingVertical: 0 } : undefined,
|
|
125
141
|
styleProp,
|
|
126
142
|
]);
|
|
127
143
|
|
|
@@ -46,6 +46,12 @@ export default interface ButtonProps extends OverridableComponentProps<ButtonBas
|
|
|
46
46
|
*/
|
|
47
47
|
disableMinWidth?: boolean;
|
|
48
48
|
|
|
49
|
+
/**
|
|
50
|
+
* Determines whether padding should be applied.
|
|
51
|
+
* @default false
|
|
52
|
+
*/
|
|
53
|
+
disablePadding?: boolean;
|
|
54
|
+
|
|
49
55
|
/**
|
|
50
56
|
* Element placed after the children.
|
|
51
57
|
*/
|
|
@@ -169,7 +169,7 @@ export default function useVariantStyleMap(variant: ButtonVariant, color: Button
|
|
|
169
169
|
},
|
|
170
170
|
};
|
|
171
171
|
|
|
172
|
-
if (variantStyleMap[variant][color]) {
|
|
172
|
+
if (variantStyleMap[variant]?.[color]) {
|
|
173
173
|
return variantStyleMap[variant][color] as UseVariantStyleMapReturns;
|
|
174
174
|
}
|
|
175
175
|
|
package/src/ButtonBase/index.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { default } from './
|
|
1
|
+
export { default } from './ButtonBase';
|
|
2
2
|
export type { default as ButtonBaseProps } from './ButtonBaseProps';
|
|
@@ -22,6 +22,7 @@ export default function Checkbox(props: CheckboxProps) {
|
|
|
22
22
|
const theme = useTheme();
|
|
23
23
|
|
|
24
24
|
const {
|
|
25
|
+
checkboxContainerStyle,
|
|
25
26
|
checkboxStyle,
|
|
26
27
|
containerStyle,
|
|
27
28
|
iconColor,
|
|
@@ -50,14 +51,16 @@ export default function Checkbox(props: CheckboxProps) {
|
|
|
50
51
|
style={rootStyle}
|
|
51
52
|
{...otherProps}
|
|
52
53
|
>
|
|
53
|
-
<View style={
|
|
54
|
-
{
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
54
|
+
<View style={checkboxContainerStyle}>
|
|
55
|
+
<View style={checkboxStyle}>
|
|
56
|
+
{checked ? (
|
|
57
|
+
<CheckboxOnIcon
|
|
58
|
+
fill={iconColor}
|
|
59
|
+
height={7.5}
|
|
60
|
+
width={11}
|
|
61
|
+
/>
|
|
62
|
+
) : null}
|
|
63
|
+
</View>
|
|
61
64
|
</View>
|
|
62
65
|
|
|
63
66
|
{children ? (
|
|
@@ -12,6 +12,7 @@ const styles = StyleSheet.create({
|
|
|
12
12
|
});
|
|
13
13
|
|
|
14
14
|
type useVariantStyleMapReturns = {
|
|
15
|
+
checkboxContainerStyle?: FountainUiStyle;
|
|
15
16
|
checkboxStyle?: FountainUiStyle;
|
|
16
17
|
containerStyle?: FountainUiStyle;
|
|
17
18
|
iconColor?: string;
|
|
@@ -23,6 +24,10 @@ export default function useVariantStyleMap(variant: CheckboxVariant, checked: bo
|
|
|
23
24
|
switch (variant) {
|
|
24
25
|
case 'square':
|
|
25
26
|
return {
|
|
27
|
+
checkboxContainerStyle: {
|
|
28
|
+
alignSelf: 'flex-start',
|
|
29
|
+
paddingTop: 3,
|
|
30
|
+
},
|
|
26
31
|
checkboxStyle: css([
|
|
27
32
|
styles.checkbox,
|
|
28
33
|
{
|
|
@@ -37,9 +42,9 @@ export default function useVariantStyleMap(variant: CheckboxVariant, checked: bo
|
|
|
37
42
|
},
|
|
38
43
|
]),
|
|
39
44
|
containerStyle: {
|
|
40
|
-
alignItems: 'center',
|
|
41
45
|
flexDirection: 'row',
|
|
42
46
|
gap: theme.spacing(3),
|
|
47
|
+
paddingVertical: theme.spacing(2),
|
|
43
48
|
},
|
|
44
49
|
iconColor: theme.palette.fill.baseAlt,
|
|
45
50
|
};
|
package/src/Chip/Chip.tsx
CHANGED
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Text, View } from 'react-native';
|
|
3
|
+
import ButtonBase from '../ButtonBase';
|
|
4
|
+
import { Close } from '../internal';
|
|
3
5
|
import { css } from '../styles';
|
|
4
6
|
import { cloneElementSafely } from '../utils';
|
|
5
|
-
import ButtonBase from '../ButtonBase/ButtonBase';
|
|
6
7
|
import type ChipProps from './ChipProps';
|
|
7
|
-
import type { ChipSize } from './ChipProps';
|
|
8
|
+
import type { ChipColor, ChipSize } from './ChipProps';
|
|
8
9
|
import useChipStyle from './useChipStyle';
|
|
9
10
|
|
|
10
11
|
export default function Chip(props: ChipProps) {
|
|
11
12
|
const {
|
|
12
13
|
children,
|
|
13
|
-
|
|
14
|
+
color = 'default' as ChipColor,
|
|
14
15
|
numberOfLines,
|
|
15
16
|
onPress,
|
|
17
|
+
selected = false,
|
|
16
18
|
size = 'small' as ChipSize,
|
|
17
19
|
startElement: startElementProp,
|
|
18
20
|
startElementVariant = 'default',
|
|
@@ -22,26 +24,26 @@ export default function Chip(props: ChipProps) {
|
|
|
22
24
|
|
|
23
25
|
const {
|
|
24
26
|
container: containerStyle,
|
|
25
|
-
|
|
27
|
+
closeButton: closeButtonStyle,
|
|
26
28
|
label: labelStyle,
|
|
27
29
|
startElement: startElementStyle,
|
|
28
|
-
|
|
30
|
+
startElementContainer: startElementContainerStyle,
|
|
31
|
+
} = useChipStyle(size, startElementVariant, color, selected);
|
|
29
32
|
|
|
30
33
|
const chipStyle = css([
|
|
31
34
|
containerStyle,
|
|
32
35
|
styleProp,
|
|
33
36
|
]);
|
|
34
37
|
|
|
35
|
-
const startElement =
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
) : cloneElementSafely(startElementProp, { style: startElementStyle });
|
|
41
|
-
const endElement = cloneElementSafely(endElementProp, { style: endElementStyle });
|
|
38
|
+
const startElement = (
|
|
39
|
+
<View style={startElementContainerStyle}>
|
|
40
|
+
{cloneElementSafely(startElementProp, { style: startElementStyle })}
|
|
41
|
+
</View>
|
|
42
|
+
);
|
|
42
43
|
|
|
43
44
|
return (
|
|
44
45
|
<ButtonBase
|
|
46
|
+
disabled={!onPress}
|
|
45
47
|
onPress={onPress}
|
|
46
48
|
style={chipStyle}
|
|
47
49
|
{...otherProps}
|
|
@@ -54,7 +56,12 @@ export default function Chip(props: ChipProps) {
|
|
|
54
56
|
style={labelStyle}
|
|
55
57
|
/>
|
|
56
58
|
|
|
57
|
-
{
|
|
59
|
+
{selected ? (
|
|
60
|
+
<Close
|
|
61
|
+
color={'baseInverse'}
|
|
62
|
+
style={closeButtonStyle}
|
|
63
|
+
/>
|
|
64
|
+
) : null}
|
|
58
65
|
</ButtonBase>
|
|
59
66
|
);
|
|
60
67
|
}
|
package/src/Chip/ChipProps.ts
CHANGED
|
@@ -2,6 +2,9 @@ import React from 'react';
|
|
|
2
2
|
import { OverridableComponentProps } from '../types';
|
|
3
3
|
import type { ButtonBaseProps } from '../ButtonBase';
|
|
4
4
|
|
|
5
|
+
export const chipColors = ['default', 'white'] as const;
|
|
6
|
+
export type ChipColor = typeof chipColors[number];
|
|
7
|
+
|
|
5
8
|
export const chipSizes = ['large', 'small'] as const;
|
|
6
9
|
export type ChipSize = typeof chipSizes[number];
|
|
7
10
|
|
|
@@ -10,20 +13,26 @@ export type ChipStartElementVariant = typeof chipStartElementVariants[number];
|
|
|
10
13
|
|
|
11
14
|
export default interface ChipProps extends OverridableComponentProps<ButtonBaseProps, {
|
|
12
15
|
/**
|
|
13
|
-
*
|
|
16
|
+
* The content of the component.
|
|
14
17
|
*/
|
|
15
|
-
|
|
18
|
+
children: string;
|
|
16
19
|
|
|
17
20
|
/**
|
|
18
|
-
*
|
|
21
|
+
* Set backgroundColor of the component.
|
|
22
|
+
* @default 'default'
|
|
19
23
|
*/
|
|
20
|
-
|
|
24
|
+
color?: ChipColor;
|
|
21
25
|
|
|
22
26
|
/**
|
|
23
27
|
* Number of lines of children.
|
|
24
28
|
*/
|
|
25
29
|
numberOfLines?: number;
|
|
26
30
|
|
|
31
|
+
/**
|
|
32
|
+
* If `true`, showing a close icon and applying a highlighted style.
|
|
33
|
+
*/
|
|
34
|
+
selected?: boolean;
|
|
35
|
+
|
|
27
36
|
/**
|
|
28
37
|
* Determines size of component.
|
|
29
38
|
* @default 'small'
|
package/src/Chip/index.ts
CHANGED
package/src/Chip/useChipStyle.ts
CHANGED
|
@@ -2,13 +2,14 @@ import { useMemo } from 'react';
|
|
|
2
2
|
import type { TextStyle } from 'react-native';
|
|
3
3
|
import type { FountainUiStyle } from '@fountain-ui/styles';
|
|
4
4
|
import { createFontStyle, useTheme } from '../styles';
|
|
5
|
-
import type { ChipSize, ChipStartElementVariant } from './ChipProps';
|
|
5
|
+
import type { ChipColor, ChipSize, ChipStartElementVariant } from './ChipProps';
|
|
6
6
|
|
|
7
7
|
interface ChipStyle {
|
|
8
8
|
container: FountainUiStyle;
|
|
9
|
-
|
|
9
|
+
closeButton?: FountainUiStyle;
|
|
10
10
|
label: TextStyle;
|
|
11
11
|
startElement?: FountainUiStyle;
|
|
12
|
+
startElementContainer?: FountainUiStyle;
|
|
12
13
|
}
|
|
13
14
|
|
|
14
15
|
type VariantStyleMap = Record<ChipStartElementVariant, Partial<ChipStyle>>;
|
|
@@ -17,7 +18,8 @@ type VariantStyleMap = Record<ChipStartElementVariant, Partial<ChipStyle>>;
|
|
|
17
18
|
export default function useChipStyle(
|
|
18
19
|
size: ChipSize,
|
|
19
20
|
startElementVariant: ChipStartElementVariant,
|
|
20
|
-
|
|
21
|
+
color: ChipColor,
|
|
22
|
+
selected: boolean,
|
|
21
23
|
): ChipStyle {
|
|
22
24
|
const theme = useTheme();
|
|
23
25
|
|
|
@@ -25,22 +27,22 @@ export default function useChipStyle(
|
|
|
25
27
|
const fontStyleMap: Record<ChipSize, TextStyle> = {
|
|
26
28
|
small: createFontStyle(theme, {
|
|
27
29
|
selector: (typography) => typography.caption1.medium,
|
|
28
|
-
color: theme.palette.text.strong,
|
|
30
|
+
color: selected ? theme.palette.text.strongInverse : theme.palette.text.strong,
|
|
29
31
|
}),
|
|
30
32
|
large: createFontStyle(theme, {
|
|
31
33
|
selector: (typography) => typography.body2.medium,
|
|
32
|
-
color: theme.palette.text.strong,
|
|
34
|
+
color: selected ? theme.palette.text.strongInverse : theme.palette.text.strong,
|
|
33
35
|
}),
|
|
34
36
|
};
|
|
35
37
|
|
|
36
|
-
const
|
|
38
|
+
const closeButtonStyleMap: Record<ChipSize, FountainUiStyle> = {
|
|
37
39
|
small: {
|
|
38
40
|
height: 14,
|
|
39
41
|
marginLeft: theme.spacing(2),
|
|
40
42
|
width: 8.17,
|
|
41
43
|
},
|
|
42
44
|
large: {
|
|
43
|
-
height:
|
|
45
|
+
height: 17,
|
|
44
46
|
marginLeft: theme.spacing(2.5),
|
|
45
47
|
width: 9,
|
|
46
48
|
},
|
|
@@ -48,7 +50,10 @@ export default function useChipStyle(
|
|
|
48
50
|
|
|
49
51
|
const baseContainerStyle: FountainUiStyle = {
|
|
50
52
|
alignItems: 'center',
|
|
51
|
-
backgroundColor: theme.palette.fill.
|
|
53
|
+
backgroundColor: selected ? theme.palette.fill.base
|
|
54
|
+
: color === 'white'
|
|
55
|
+
? theme.palette.surface.base
|
|
56
|
+
: theme.palette.fill.weaker,
|
|
52
57
|
borderRadius: theme.shape.radius.full,
|
|
53
58
|
flexDirection: 'row',
|
|
54
59
|
overflow: 'hidden',
|
|
@@ -65,9 +70,11 @@ export default function useChipStyle(
|
|
|
65
70
|
},
|
|
66
71
|
startElement: {
|
|
67
72
|
borderRadius: theme.shape.radius.full,
|
|
68
|
-
height: isLarge ?
|
|
73
|
+
height: isLarge ? 26 : 23,
|
|
74
|
+
width: isLarge ? 26 : 23,
|
|
75
|
+
},
|
|
76
|
+
startElementContainer: {
|
|
69
77
|
marginRight: theme.spacing(isLarge ? 1.5 : 1.25),
|
|
70
|
-
width: isLarge ? 24 : 22,
|
|
71
78
|
},
|
|
72
79
|
},
|
|
73
80
|
icon: {
|
|
@@ -77,11 +84,18 @@ export default function useChipStyle(
|
|
|
77
84
|
paddingVertical: theme.spacing(isLarge ? 1.5 : 1.25),
|
|
78
85
|
},
|
|
79
86
|
startElement: {
|
|
87
|
+
color: selected
|
|
88
|
+
? theme.palette.icon.strongInverse
|
|
89
|
+
: theme.palette.icon.strong,
|
|
90
|
+
height: isLarge ? 17 : 16,
|
|
91
|
+
width: isLarge ? 17 : 16,
|
|
92
|
+
},
|
|
93
|
+
startElementContainer: {
|
|
80
94
|
alignItems: 'center',
|
|
81
|
-
height: isLarge ?
|
|
95
|
+
height: isLarge ? 24 : 21,
|
|
82
96
|
justifyContent: 'center',
|
|
83
97
|
marginRight: theme.spacing(isLarge ? 1 : 0.75),
|
|
84
|
-
width: isLarge ?
|
|
98
|
+
width: isLarge ? 24 : 21,
|
|
85
99
|
},
|
|
86
100
|
},
|
|
87
101
|
image: {
|
|
@@ -91,9 +105,11 @@ export default function useChipStyle(
|
|
|
91
105
|
},
|
|
92
106
|
startElement: {
|
|
93
107
|
borderRadius: theme.shape.radius.full,
|
|
94
|
-
height: isLarge ?
|
|
108
|
+
height: isLarge ? 36 : 31,
|
|
109
|
+
width: isLarge ? 48 : 40,
|
|
110
|
+
},
|
|
111
|
+
startElementContainer: {
|
|
95
112
|
marginRight: theme.spacing(1.5),
|
|
96
|
-
width: isLarge ? 45 : 40,
|
|
97
113
|
},
|
|
98
114
|
},
|
|
99
115
|
default: {
|
|
@@ -109,11 +125,12 @@ export default function useChipStyle(
|
|
|
109
125
|
container: {
|
|
110
126
|
...baseContainerStyle,
|
|
111
127
|
...variantStyleMap[startElementVariant]?.container,
|
|
112
|
-
...(
|
|
128
|
+
...(selected ? { paddingRight: theme.spacing(isLarge ? 2.5 : 2.25) } : {}),
|
|
113
129
|
},
|
|
114
|
-
|
|
130
|
+
closeButton: closeButtonStyleMap[size],
|
|
115
131
|
label: fontStyleMap[size],
|
|
116
132
|
startElement: variantStyleMap[startElementVariant]?.startElement,
|
|
133
|
+
startElementContainer: variantStyleMap[startElementVariant]?.startElementContainer,
|
|
117
134
|
};
|
|
118
|
-
}, [theme, size, startElementVariant]);
|
|
135
|
+
}, [theme, size, startElementVariant, color, selected]);
|
|
119
136
|
}
|
package/src/Dialog/Dialog.tsx
CHANGED
|
@@ -14,7 +14,6 @@ export default function Dialog(props: DialogProps) {
|
|
|
14
14
|
const {
|
|
15
15
|
animationType = ANIMATION_TYPE.SLIDE,
|
|
16
16
|
children,
|
|
17
|
-
fullScreen = false,
|
|
18
17
|
hideBackdrop,
|
|
19
18
|
onClose,
|
|
20
19
|
style: styleProp,
|
|
@@ -24,7 +23,7 @@ export default function Dialog(props: DialogProps) {
|
|
|
24
23
|
...otherProps
|
|
25
24
|
} = props;
|
|
26
25
|
|
|
27
|
-
const styles = useDialogStyle(size
|
|
26
|
+
const styles = useDialogStyle(size);
|
|
28
27
|
|
|
29
28
|
const { height: screenHeight } = useWindowDimensions();
|
|
30
29
|
|
|
@@ -51,7 +50,7 @@ export default function Dialog(props: DialogProps) {
|
|
|
51
50
|
toValue: 0,
|
|
52
51
|
type: ANIMATION_TYPE.FADE,
|
|
53
52
|
}];
|
|
54
|
-
} else if (animationType === ANIMATION_TYPE.SLIDE
|
|
53
|
+
} else if (animationType === ANIMATION_TYPE.SLIDE) {
|
|
55
54
|
return [
|
|
56
55
|
{
|
|
57
56
|
toValue: screenHeight,
|
|
@@ -70,7 +69,7 @@ export default function Dialog(props: DialogProps) {
|
|
|
70
69
|
toValue: screenHeight,
|
|
71
70
|
type: ANIMATION_TYPE.SLIDE,
|
|
72
71
|
}];
|
|
73
|
-
}, [animationType,
|
|
72
|
+
}, [animationType, screenHeight]);
|
|
74
73
|
|
|
75
74
|
const openAnimation = useMemo<AnimationUnit[]>(() => {
|
|
76
75
|
if (animationType === ANIMATION_TYPE.FADE) {
|
|
@@ -78,7 +77,7 @@ export default function Dialog(props: DialogProps) {
|
|
|
78
77
|
toValue: 1,
|
|
79
78
|
type: ANIMATION_TYPE.FADE,
|
|
80
79
|
}];
|
|
81
|
-
} else if (animationType === ANIMATION_TYPE.SLIDE
|
|
80
|
+
} else if (animationType === ANIMATION_TYPE.SLIDE) {
|
|
82
81
|
return [
|
|
83
82
|
{
|
|
84
83
|
toValue: 0,
|
|
@@ -97,9 +96,9 @@ export default function Dialog(props: DialogProps) {
|
|
|
97
96
|
toValue: 0,
|
|
98
97
|
type: ANIMATION_TYPE.SLIDE,
|
|
99
98
|
}];
|
|
100
|
-
}, [animationType
|
|
99
|
+
}, [animationType]);
|
|
101
100
|
|
|
102
|
-
const initialOpacity = animationType === ANIMATION_TYPE.SLIDE
|
|
101
|
+
const initialOpacity = animationType === ANIMATION_TYPE.SLIDE ? 1 : undefined;
|
|
103
102
|
|
|
104
103
|
const initialTranslateY = animationType === ANIMATION_TYPE.FADE ? 0 : undefined;
|
|
105
104
|
|
|
@@ -124,7 +123,7 @@ export default function Dialog(props: DialogProps) {
|
|
|
124
123
|
>
|
|
125
124
|
<DialogProvider value={{ size }}>
|
|
126
125
|
{topElement ? (
|
|
127
|
-
<Column style={
|
|
126
|
+
<Column style={styles.topElementContainer}>
|
|
128
127
|
<Column
|
|
129
128
|
style={styles.topElementContent}
|
|
130
129
|
onLayout={handleTopElementLayout}
|
|
@@ -143,4 +142,4 @@ export default function Dialog(props: DialogProps) {
|
|
|
143
142
|
</DialogProvider>
|
|
144
143
|
</Modal>
|
|
145
144
|
);
|
|
146
|
-
}
|
|
145
|
+
}
|
|
@@ -3,7 +3,7 @@ import type { ModalProps } from '../Modal';
|
|
|
3
3
|
import type { OverridableComponentProps } from '../types';
|
|
4
4
|
import { ANIMATION_TYPE } from '../Modal';
|
|
5
5
|
|
|
6
|
-
export const dialogSizes = ['small', 'medium', 'large'] as const;
|
|
6
|
+
export const dialogSizes = ['small', 'medium', 'large', 'full'] as const;
|
|
7
7
|
export type DialogSize = typeof dialogSizes[number];
|
|
8
8
|
|
|
9
9
|
export default interface DialogProps extends OverridableComponentProps<ModalProps, {
|
|
@@ -18,12 +18,6 @@ export default interface DialogProps extends OverridableComponentProps<ModalProp
|
|
|
18
18
|
*/
|
|
19
19
|
children?: React.ReactNode;
|
|
20
20
|
|
|
21
|
-
/**
|
|
22
|
-
* If `true`, the dialog is full-screen.
|
|
23
|
-
* @default false
|
|
24
|
-
*/
|
|
25
|
-
fullScreen?: boolean;
|
|
26
|
-
|
|
27
21
|
/**
|
|
28
22
|
* Determines the minWidth of the Dialog.
|
|
29
23
|
* @default 'medium'
|
|
@@ -15,14 +15,16 @@ export default function useDialogSectionStyle() {
|
|
|
15
15
|
return useMemo<FountainUiStyle>(() => {
|
|
16
16
|
const sizePaddingHorizontalMap: Record<DialogSize, FountainUiStyle> = {
|
|
17
17
|
small: {
|
|
18
|
-
paddingHorizontal:
|
|
18
|
+
paddingHorizontal: 24,
|
|
19
19
|
},
|
|
20
20
|
medium: {
|
|
21
|
-
|
|
22
|
-
paddingHorizontal: theme.spacing(windowWidth >= 448 ? 8 : 6),
|
|
21
|
+
paddingHorizontal: windowWidth >= 448 ? 32 : 24,
|
|
23
22
|
},
|
|
24
23
|
large: {
|
|
25
|
-
paddingHorizontal:
|
|
24
|
+
paddingHorizontal: 32,
|
|
25
|
+
},
|
|
26
|
+
full: {
|
|
27
|
+
paddingHorizontal: windowWidth >= 448 ? 32 : 24,
|
|
26
28
|
},
|
|
27
29
|
};
|
|
28
30
|
|