@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 +1 @@
|
|
|
1
|
-
{"version":3,"names":["buttonColors","buttonSizes","buttonVariants"],"sources":["ButtonProps.ts"],"sourcesContent":["import React from 'react';\nimport type { ButtonBaseProps } from '../ButtonBase';\nimport type { OverridableComponentProps } from '../types';\n\nexport const buttonColors = [\n 'accent',\n 'primary',\n 'danger',\n 'disabled',\n 'secondary',\n 'accentAlt',\n] as const;\nexport type ButtonColor = typeof buttonColors[number];\n\nexport const buttonSizes = [\n 'small',\n 'medium',\n 'large',\n] as const;\nexport type ButtonSize = typeof buttonSizes[number];\n\nexport const buttonVariants = [\n 'solid',\n 'outlined',\n 'text',\n 'capsuleSolid',\n 'capsuleOutlined',\n] as const;\nexport type ButtonVariant = typeof buttonVariants[number];\n\nexport default interface ButtonProps extends OverridableComponentProps<ButtonBaseProps, {\n /**\n * The content of the button.\n */\n children: string;\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n * @default 'primary'\n */\n color?: ButtonColor;\n\n /**\n * Determines whether minWidth should be applied.\n * @default false\n */\n disableMinWidth?: boolean;\n\n /**\n * Element placed after the children.\n */\n endIcon?: React.ReactElement;\n\n /**\n * If `true`, the button will take up the full width of its container.\n * @default false\n */\n fullWidth?: boolean;\n\n /**\n * The URL to link to when the button is clicked.\n */\n href?: string;\n\n /**\n * Determines whether to show the loading status or not.\n * @default false\n */\n isLoading?: boolean;\n\n /**\n * The size of the button.\n * @default 'medium'\n */\n size?: ButtonSize;\n\n /**\n * Element placed before the children.\n */\n startIcon?: React.ReactElement;\n\n /**\n * The variant to use.\n * @default 'solid'\n */\n variant?: ButtonVariant;\n}> {}\n"],"mappings":";;;;;;AAIO,MAAMA,YAAY,GAAG,CACxB,QADwB,EAExB,SAFwB,EAGxB,QAHwB,EAIxB,UAJwB,EAKxB,WALwB,EAMxB,WANwB,CAArB;;AAUA,MAAMC,WAAW,GAAG,CACvB,OADuB,EAEvB,QAFuB,EAGvB,OAHuB,CAApB;;AAOA,MAAMC,cAAc,GAAG,CAC1B,OAD0B,EAE1B,UAF0B,EAG1B,MAH0B,EAI1B,cAJ0B,EAK1B,iBAL0B,CAAvB"}
|
|
1
|
+
{"version":3,"names":["buttonColors","buttonSizes","buttonVariants"],"sources":["ButtonProps.ts"],"sourcesContent":["import React from 'react';\nimport type { ButtonBaseProps } from '../ButtonBase';\nimport type { OverridableComponentProps } from '../types';\n\nexport const buttonColors = [\n 'accent',\n 'primary',\n 'danger',\n 'disabled',\n 'secondary',\n 'accentAlt',\n] as const;\nexport type ButtonColor = typeof buttonColors[number];\n\nexport const buttonSizes = [\n 'small',\n 'medium',\n 'large',\n] as const;\nexport type ButtonSize = typeof buttonSizes[number];\n\nexport const buttonVariants = [\n 'solid',\n 'outlined',\n 'text',\n 'capsuleSolid',\n 'capsuleOutlined',\n] as const;\nexport type ButtonVariant = typeof buttonVariants[number];\n\nexport default interface ButtonProps extends OverridableComponentProps<ButtonBaseProps, {\n /**\n * The content of the button.\n */\n children: string;\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n * @default 'primary'\n */\n color?: ButtonColor;\n\n /**\n * Determines whether minWidth should be applied.\n * @default false\n */\n disableMinWidth?: boolean;\n\n /**\n * Determines whether padding should be applied.\n * @default false\n */\n disablePadding?: boolean;\n\n /**\n * Element placed after the children.\n */\n endIcon?: React.ReactElement;\n\n /**\n * If `true`, the button will take up the full width of its container.\n * @default false\n */\n fullWidth?: boolean;\n\n /**\n * The URL to link to when the button is clicked.\n */\n href?: string;\n\n /**\n * Determines whether to show the loading status or not.\n * @default false\n */\n isLoading?: boolean;\n\n /**\n * The size of the button.\n * @default 'medium'\n */\n size?: ButtonSize;\n\n /**\n * Element placed before the children.\n */\n startIcon?: React.ReactElement;\n\n /**\n * The variant to use.\n * @default 'solid'\n */\n variant?: ButtonVariant;\n}> {}\n"],"mappings":";;;;;;AAIO,MAAMA,YAAY,GAAG,CACxB,QADwB,EAExB,SAFwB,EAGxB,QAHwB,EAIxB,UAJwB,EAKxB,WALwB,EAMxB,WANwB,CAArB;;AAUA,MAAMC,WAAW,GAAG,CACvB,OADuB,EAEvB,QAFuB,EAGvB,OAHuB,CAApB;;AAOA,MAAMC,cAAc,GAAG,CAC1B,OAD0B,EAE1B,UAF0B,EAG1B,MAH0B,EAI1B,cAJ0B,EAK1B,iBAL0B,CAAvB"}
|
|
@@ -162,6 +162,15 @@ function useVariantStyleMap(variant, color) {
|
|
|
162
162
|
},
|
|
163
163
|
labelColor: theme.palette.status.disabledLabel,
|
|
164
164
|
iconColor: theme.palette.status.disabledLabel
|
|
165
|
+
},
|
|
166
|
+
accent: {
|
|
167
|
+
container: {
|
|
168
|
+
borderColor: theme.palette.border.accent,
|
|
169
|
+
borderRadius: theme.shape.radius.full,
|
|
170
|
+
borderWidth: 1
|
|
171
|
+
},
|
|
172
|
+
labelColor: theme.palette.text.accent,
|
|
173
|
+
iconColor: theme.palette.icon.accent
|
|
165
174
|
}
|
|
166
175
|
}
|
|
167
176
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useVariantStyleMap","variant","color","theme","useTheme","useMemo","palette","variantStyleMap","solid","accent","container","backgroundColor","fill","labelColor","commonColors","static","strongInverse","iconColor","primary","base","text","icon","danger","status","disabled","onDisabled","outlined","borderColor","border","borderWidth","disabledLabel","strong","secondary","accentAlt","capsuleSolid","borderRadius","shape","radius","full","capsuleOutlined","process","env","NODE_ENV","console","warn"],"sources":["useVariantStyleMap.ts"],"sourcesContent":["import { useMemo } from 'react';\nimport type { FountainUiStyle } from '@fountain-ui/styles';\nimport { commonColors } from '@fountain-ui/styles';\nimport { useTheme } from '../styles';\nimport { ButtonColor, ButtonVariant } from './ButtonProps';\n\ntype UseVariantStyleMapReturns = {\n container?: FountainUiStyle;\n iconColor?: string;\n labelColor?: string;\n}\n\ntype VariantStyleMap = {\n [variant in ButtonVariant]: {\n [color in ButtonColor]?: UseVariantStyleMapReturns;\n }\n};\n\nexport default function useVariantStyleMap(variant: ButtonVariant, color: ButtonColor): UseVariantStyleMapReturns {\n const theme = useTheme();\n\n return useMemo(() => {\n const { palette } = theme;\n\n const variantStyleMap: VariantStyleMap = {\n solid: {\n accent: {\n container: {\n backgroundColor: palette.fill.accent,\n },\n labelColor: commonColors.static.strongInverse,\n iconColor: commonColors.static.strongInverse,\n },\n primary: {\n container: {\n backgroundColor: palette.fill.base,\n },\n labelColor: palette.text.strongInverse,\n iconColor: palette.icon.strongInverse,\n },\n danger: {\n container: {\n backgroundColor: palette.status.danger,\n },\n labelColor: commonColors.static.strongInverse,\n iconColor: commonColors.static.strongInverse,\n },\n disabled: {\n container: {\n backgroundColor: palette.status.disabled,\n },\n labelColor: palette.status.onDisabled,\n iconColor: palette.status.onDisabled,\n },\n },\n outlined: {\n accent: {\n container: {\n borderColor: palette.border.accent,\n borderWidth: 1,\n },\n labelColor: palette.text.accent,\n iconColor: palette.icon.accent,\n },\n primary: {\n container: {\n borderColor: palette.border.base,\n borderWidth: 1,\n },\n labelColor: palette.text.base,\n iconColor: palette.icon.base,\n },\n disabled: {\n container: {\n borderColor: palette.status.disabled,\n borderWidth: 1,\n },\n labelColor: palette.status.disabledLabel,\n iconColor: palette.status.disabledLabel,\n },\n },\n text: {\n primary: {\n labelColor: palette.text.strong,\n iconColor: palette.icon.strong,\n },\n secondary: {\n labelColor: palette.text.base,\n iconColor: palette.icon.base,\n },\n accent: {\n labelColor: palette.text.accent,\n iconColor: palette.icon.accent,\n },\n accentAlt: {\n labelColor: palette.text.accentAlt,\n iconColor: palette.icon.accentAlt,\n },\n danger: {\n labelColor: palette.status.danger,\n iconColor: palette.status.danger,\n },\n disabled: {\n labelColor: palette.status.disabledLabel,\n iconColor: palette.status.disabledLabel,\n },\n },\n capsuleSolid: {\n accent: {\n container: {\n backgroundColor: theme.palette.fill.accent,\n borderRadius: theme.shape.radius.full,\n },\n labelColor: commonColors.static.strongInverse,\n iconColor: commonColors.static.strongInverse,\n },\n primary: {\n container: {\n backgroundColor: theme.palette.fill.base,\n borderRadius: theme.shape.radius.full,\n },\n labelColor: palette.text.strongInverse,\n iconColor: palette.icon.strongInverse,\n },\n danger: {\n container: {\n backgroundColor: theme.palette.status.danger,\n borderRadius: theme.shape.radius.full,\n },\n labelColor: commonColors.static.strongInverse,\n iconColor: commonColors.static.strongInverse,\n },\n secondary: {\n container: {\n backgroundColor: commonColors.static.strongInverse,\n borderRadius: theme.shape.radius.full,\n },\n labelColor: theme.palette.text.strong,\n iconColor: theme.palette.icon.strong,\n },\n disabled: {\n container: {\n backgroundColor: theme.palette.status.disabled,\n borderRadius: theme.shape.radius.full,\n },\n labelColor: theme.palette.status.onDisabled,\n iconColor: theme.palette.status.onDisabled,\n },\n },\n capsuleOutlined: {\n primary: {\n container: {\n borderColor: theme.palette.border.base,\n borderRadius: theme.shape.radius.full,\n borderWidth: 1,\n },\n labelColor: theme.palette.text.strong,\n iconColor: theme.palette.icon.strong,\n },\n disabled: {\n container: {\n borderColor: theme.palette.status.disabled,\n borderRadius: theme.shape.radius.full,\n borderWidth: 1,\n },\n labelColor: theme.palette.status.disabledLabel,\n iconColor: theme.palette.status.disabledLabel,\n },\n },\n };\n\n if (variantStyleMap[variant]?.[color]) {\n return variantStyleMap[variant][color] as UseVariantStyleMapReturns;\n }\n\n if (process.env.NODE_ENV !== 'production') {\n console.warn('The selected color is not supported for the chosen variant.');\n }\n\n return {};\n }, [theme, variant, color]);\n}\n"],"mappings":";;;;;;;AAAA;;AAEA;;AACA;;AAee,SAASA,kBAAT,CAA4BC,OAA5B,EAAoDC,KAApD,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,CAAJ,EAAuC;MACnC,OAAOK,eAAe,CAACN,OAAD,CAAf,CAAyBC,KAAzB,CAAP;IACH;;IAED,IAAIsC,OAAO,CAACC,GAAR,CAAYC,QAAZ,KAAyB,YAA7B,EAA2C;MACvCC,OAAO,CAACC,IAAR,CAAa,6DAAb;IACH;;IAED,OAAO,EAAP;EACH,CA/JM,EA+JJ,CAACzC,KAAD,EAAQF,OAAR,EAAiBC,KAAjB,CA/JI,CAAP;AAgKH"}
|
|
1
|
+
{"version":3,"names":["useVariantStyleMap","variant","color","theme","useTheme","useMemo","palette","variantStyleMap","solid","accent","container","backgroundColor","fill","labelColor","commonColors","static","strongInverse","iconColor","primary","base","text","icon","danger","status","disabled","onDisabled","outlined","borderColor","border","borderWidth","disabledLabel","strong","secondary","accentAlt","capsuleSolid","borderRadius","shape","radius","full","capsuleOutlined","process","env","NODE_ENV","console","warn"],"sources":["useVariantStyleMap.ts"],"sourcesContent":["import { useMemo } from 'react';\nimport type { FountainUiStyle } from '@fountain-ui/styles';\nimport { commonColors } from '@fountain-ui/styles';\nimport { useTheme } from '../styles';\nimport { ButtonColor, ButtonVariant } from './ButtonProps';\n\ntype UseVariantStyleMapReturns = {\n container?: FountainUiStyle;\n iconColor?: string;\n labelColor?: string;\n}\n\ntype VariantStyleMap = {\n [variant in ButtonVariant]: {\n [color in ButtonColor]?: UseVariantStyleMapReturns;\n }\n};\n\nexport default function useVariantStyleMap(variant: ButtonVariant, color: ButtonColor): UseVariantStyleMapReturns {\n const theme = useTheme();\n\n return useMemo(() => {\n const { palette } = theme;\n\n const variantStyleMap: VariantStyleMap = {\n solid: {\n accent: {\n container: {\n backgroundColor: palette.fill.accent,\n },\n labelColor: commonColors.static.strongInverse,\n iconColor: commonColors.static.strongInverse,\n },\n primary: {\n container: {\n backgroundColor: palette.fill.base,\n },\n labelColor: palette.text.strongInverse,\n iconColor: palette.icon.strongInverse,\n },\n danger: {\n container: {\n backgroundColor: palette.status.danger,\n },\n labelColor: commonColors.static.strongInverse,\n iconColor: commonColors.static.strongInverse,\n },\n disabled: {\n container: {\n backgroundColor: palette.status.disabled,\n },\n labelColor: palette.status.onDisabled,\n iconColor: palette.status.onDisabled,\n },\n },\n outlined: {\n accent: {\n container: {\n borderColor: palette.border.accent,\n borderWidth: 1,\n },\n labelColor: palette.text.accent,\n iconColor: palette.icon.accent,\n },\n primary: {\n container: {\n borderColor: palette.border.base,\n borderWidth: 1,\n },\n labelColor: palette.text.base,\n iconColor: palette.icon.base,\n },\n disabled: {\n container: {\n borderColor: palette.status.disabled,\n borderWidth: 1,\n },\n labelColor: palette.status.disabledLabel,\n iconColor: palette.status.disabledLabel,\n },\n },\n text: {\n primary: {\n labelColor: palette.text.strong,\n iconColor: palette.icon.strong,\n },\n secondary: {\n labelColor: palette.text.base,\n iconColor: palette.icon.base,\n },\n accent: {\n labelColor: palette.text.accent,\n iconColor: palette.icon.accent,\n },\n accentAlt: {\n labelColor: palette.text.accentAlt,\n iconColor: palette.icon.accentAlt,\n },\n danger: {\n labelColor: palette.status.danger,\n iconColor: palette.status.danger,\n },\n disabled: {\n labelColor: palette.status.disabledLabel,\n iconColor: palette.status.disabledLabel,\n },\n },\n capsuleSolid: {\n accent: {\n container: {\n backgroundColor: theme.palette.fill.accent,\n borderRadius: theme.shape.radius.full,\n },\n labelColor: commonColors.static.strongInverse,\n iconColor: commonColors.static.strongInverse,\n },\n primary: {\n container: {\n backgroundColor: theme.palette.fill.base,\n borderRadius: theme.shape.radius.full,\n },\n labelColor: palette.text.strongInverse,\n iconColor: palette.icon.strongInverse,\n },\n danger: {\n container: {\n backgroundColor: theme.palette.status.danger,\n borderRadius: theme.shape.radius.full,\n },\n labelColor: commonColors.static.strongInverse,\n iconColor: commonColors.static.strongInverse,\n },\n secondary: {\n container: {\n backgroundColor: commonColors.static.strongInverse,\n borderRadius: theme.shape.radius.full,\n },\n labelColor: theme.palette.text.strong,\n iconColor: theme.palette.icon.strong,\n },\n disabled: {\n container: {\n backgroundColor: theme.palette.status.disabled,\n borderRadius: theme.shape.radius.full,\n },\n labelColor: theme.palette.status.onDisabled,\n iconColor: theme.palette.status.onDisabled,\n },\n },\n capsuleOutlined: {\n primary: {\n container: {\n borderColor: theme.palette.border.base,\n borderRadius: theme.shape.radius.full,\n borderWidth: 1,\n },\n labelColor: theme.palette.text.strong,\n iconColor: theme.palette.icon.strong,\n },\n disabled: {\n container: {\n borderColor: theme.palette.status.disabled,\n borderRadius: theme.shape.radius.full,\n borderWidth: 1,\n },\n labelColor: theme.palette.status.disabledLabel,\n iconColor: theme.palette.status.disabledLabel,\n },\n accent: {\n container: {\n borderColor: theme.palette.border.accent,\n borderRadius: theme.shape.radius.full,\n borderWidth: 1,\n },\n labelColor: theme.palette.text.accent,\n iconColor: theme.palette.icon.accent,\n },\n },\n };\n\n if (variantStyleMap[variant]?.[color]) {\n return variantStyleMap[variant][color] as UseVariantStyleMapReturns;\n }\n\n if (process.env.NODE_ENV !== 'production') {\n console.warn('The selected color is not supported for the chosen variant.');\n }\n\n return {};\n }, [theme, variant, color]);\n}\n"],"mappings":";;;;;;;AAAA;;AAEA;;AACA;;AAee,SAASA,kBAAT,CAA4BC,OAA5B,EAAoDC,KAApD,EAAmG;EAC9G,MAAMC,KAAK,GAAG,IAAAC,iBAAA,GAAd;EAEA,OAAO,IAAAC,cAAA,EAAQ,MAAM;IAAA;;IACjB,MAAM;MAAEC;IAAF,IAAcH,KAApB;IAEA,MAAMI,eAAgC,GAAG;MACrCC,KAAK,EAAE;QACHC,MAAM,EAAE;UACJC,SAAS,EAAE;YACPC,eAAe,EAAEL,OAAO,CAACM,IAAR,CAAaH;UADvB,CADP;UAIJI,UAAU,EAAEC,oBAAA,CAAaC,MAAb,CAAoBC,aAJ5B;UAKJC,SAAS,EAAEH,oBAAA,CAAaC,MAAb,CAAoBC;QAL3B,CADL;QAQHE,OAAO,EAAE;UACLR,SAAS,EAAE;YACPC,eAAe,EAAEL,OAAO,CAACM,IAAR,CAAaO;UADvB,CADN;UAILN,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B,EAA2C;MACvCC,OAAO,CAACC,IAAR,CAAa,6DAAb;IACH;;IAED,OAAO,EAAP;EACH,CAxKM,EAwKJ,CAACzC,KAAD,EAAQF,OAAR,EAAiBC,KAAjB,CAxKI,CAAP;AAyKH"}
|
|
@@ -26,7 +26,7 @@ const ORIGINAL_OPACITY = 1;
|
|
|
26
26
|
exports.ORIGINAL_OPACITY = ORIGINAL_OPACITY;
|
|
27
27
|
const ACTIVE_OPACITY = .65;
|
|
28
28
|
const ORIGINAL_SCALE = 1;
|
|
29
|
-
const MINIFIED_SCALE = .
|
|
29
|
+
const MINIFIED_SCALE = .98; // at "node_modules/react-native/Libraries/Pressability.js"
|
|
30
30
|
// const DEFAULT_MIN_PRESS_DURATION = 130;
|
|
31
31
|
|
|
32
32
|
const SCALE_EFFECT_PRESS_IN_DELAY = 130;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["ORIGINAL_OPACITY","ACTIVE_OPACITY","ORIGINAL_SCALE","MINIFIED_SCALE","SCALE_EFFECT_PRESS_IN_DELAY","OPACITY_EFFECT_PRESS_IN_DELAY","startTimingAnimationWithDefaults","value","toValue","Animated","timing","duration","useNativeDriver","isNotAndroid12","start","ButtonBase","props","children","disabled","disableThrottle","onPress","_onPress","onPressOut","pressEffect","pressDelay","pressDelayOrNil","style","styleProp","throttleMillis","otherProps","useCallback","handlePress","useThrottle","periodMillis","callback","opacity","useAnimatedValue","scale","startScaleAnimation","pressIn","isHover","startOpacityAnimation","setValue","startPressAnimation","handlePressIn","handlePressOut","animatedStyle","transform","defaultPressDelay","hovered","undefined"],"sources":["ButtonBase.tsx"],"sourcesContent":["import React, { useCallback } from 'react';\nimport { Animated } from 'react-native';\nimport { useAnimatedValue, useThrottle } from '../hooks';\nimport { isNotAndroid12 } from '../utils';\nimport { AnimatedPressable } from '../animated';\nimport type ButtonBaseProps from './ButtonBaseProps';\n\ninterface StartPressAnimation {\n (pressIn: boolean, isHover: boolean): void;\n}\n\nexport const ORIGINAL_OPACITY = 1;\nconst ACTIVE_OPACITY = .65;\n\nconst ORIGINAL_SCALE = 1;\nconst MINIFIED_SCALE = .
|
|
1
|
+
{"version":3,"names":["ORIGINAL_OPACITY","ACTIVE_OPACITY","ORIGINAL_SCALE","MINIFIED_SCALE","SCALE_EFFECT_PRESS_IN_DELAY","OPACITY_EFFECT_PRESS_IN_DELAY","startTimingAnimationWithDefaults","value","toValue","Animated","timing","duration","useNativeDriver","isNotAndroid12","start","ButtonBase","props","children","disabled","disableThrottle","onPress","_onPress","onPressOut","pressEffect","pressDelay","pressDelayOrNil","style","styleProp","throttleMillis","otherProps","useCallback","handlePress","useThrottle","periodMillis","callback","opacity","useAnimatedValue","scale","startScaleAnimation","pressIn","isHover","startOpacityAnimation","setValue","startPressAnimation","handlePressIn","handlePressOut","animatedStyle","transform","defaultPressDelay","hovered","undefined"],"sources":["ButtonBase.tsx"],"sourcesContent":["import React, { useCallback } from 'react';\nimport { Animated } from 'react-native';\nimport { useAnimatedValue, useThrottle } from '../hooks';\nimport { isNotAndroid12 } from '../utils';\nimport { AnimatedPressable } from '../animated';\nimport type ButtonBaseProps from './ButtonBaseProps';\n\ninterface StartPressAnimation {\n (pressIn: boolean, isHover: boolean): void;\n}\n\nexport const ORIGINAL_OPACITY = 1;\nconst ACTIVE_OPACITY = .65;\n\nconst ORIGINAL_SCALE = 1;\nconst MINIFIED_SCALE = .98;\n\n// at \"node_modules/react-native/Libraries/Pressability.js\"\n// const DEFAULT_MIN_PRESS_DURATION = 130;\nconst SCALE_EFFECT_PRESS_IN_DELAY = 130;\nconst OPACITY_EFFECT_PRESS_IN_DELAY = 0;\n\ntype TimingAnimationValue = Animated.Value | Animated.ValueXY;\ntype TimingAnimationToValue = Animated.TimingAnimationConfig['toValue'];\n\nconst startTimingAnimationWithDefaults = (\n value: TimingAnimationValue,\n toValue: TimingAnimationToValue,\n) => {\n Animated.timing(value, {\n toValue,\n duration: 150,\n useNativeDriver: isNotAndroid12,\n }).start();\n};\n\nexport default function ButtonBase(props: ButtonBaseProps) {\n const {\n children,\n disabled = false,\n disableThrottle = false,\n onPress: _onPress,\n onPressOut,\n pressEffect = 'opacity',\n pressDelay: pressDelayOrNil,\n style: styleProp,\n throttleMillis = 650,\n ...otherProps\n } = props;\n\n const onPress = useCallback(() => _onPress?.(), [_onPress]);\n const handlePress = useThrottle({\n periodMillis: disableThrottle ? 0 : throttleMillis,\n callback: onPress,\n });\n\n const opacity = useAnimatedValue(ORIGINAL_OPACITY);\n const scale = useAnimatedValue(ORIGINAL_SCALE);\n\n const startScaleAnimation = useCallback<StartPressAnimation>((pressIn, isHover) => {\n if (!isHover) {\n startTimingAnimationWithDefaults(\n scale,\n pressIn ? MINIFIED_SCALE : ORIGINAL_SCALE,\n );\n }\n }, []);\n\n const startOpacityAnimation = useCallback<StartPressAnimation>((pressIn) => {\n if (pressIn) {\n opacity.setValue(ACTIVE_OPACITY);\n } else {\n startTimingAnimationWithDefaults(opacity, ORIGINAL_OPACITY);\n }\n }, []);\n\n const startPressAnimation = useCallback<StartPressAnimation>((pressIn, isHover = false) => {\n if (pressEffect === 'scale') {\n startScaleAnimation(pressIn, isHover);\n } else if (pressEffect === 'opacity') {\n startOpacityAnimation(pressIn, isHover);\n }\n }, [pressEffect]);\n\n const handlePressIn = useCallback(() => {\n startPressAnimation(true, false);\n }, [startPressAnimation]);\n\n const handlePressOut = useCallback(() => {\n onPressOut && onPressOut();\n\n startPressAnimation(false, false);\n }, [startPressAnimation, onPressOut]);\n\n const animatedStyle = {\n opacity,\n transform: [{ scale }],\n };\n\n const defaultPressDelay = pressEffect === 'scale'\n ? SCALE_EFFECT_PRESS_IN_DELAY\n : OPACITY_EFFECT_PRESS_IN_DELAY;\n const pressDelay = pressDelayOrNil ?? defaultPressDelay;\n\n return (\n <AnimatedPressable\n disabled={disabled}\n onPress={handlePress}\n onPressIn={handlePressIn}\n onPressOut={handlePressOut}\n style={[\n animatedStyle,\n styleProp,\n ]}\n unstable_pressDelay={pressDelay}\n {...otherProps}\n >\n {typeof children !== 'function' ? (\n ({ hovered }) => {\n if (hovered !== undefined && !disabled) {\n startPressAnimation(hovered, true);\n }\n\n return children;\n }\n ) : children}\n </AnimatedPressable>\n );\n};\n"],"mappings":";;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;;;;;;;AAOO,MAAMA,gBAAgB,GAAG,CAAzB;;AACP,MAAMC,cAAc,GAAG,GAAvB;AAEA,MAAMC,cAAc,GAAG,CAAvB;AACA,MAAMC,cAAc,GAAG,GAAvB,C,CAEA;AACA;;AACA,MAAMC,2BAA2B,GAAG,GAApC;AACA,MAAMC,6BAA6B,GAAG,CAAtC;;AAKA,MAAMC,gCAAgC,GAAG,CACrCC,KADqC,EAErCC,OAFqC,KAGpC;EACDC,qBAAA,CAASC,MAAT,CAAgBH,KAAhB,EAAuB;IACnBC,OADmB;IAEnBG,QAAQ,EAAE,GAFS;IAGnBC,eAAe,EAAEC;EAHE,CAAvB,EAIGC,KAJH;AAKH,CATD;;AAWe,SAASC,UAAT,CAAoBC,KAApB,EAA4C;EACvD,MAAM;IACFC,QADE;IAEFC,QAAQ,GAAG,KAFT;IAGFC,eAAe,GAAG,KAHhB;IAIFC,OAAO,EAAEC,QAJP;IAKFC,UALE;IAMFC,WAAW,GAAG,SANZ;IAOFC,UAAU,EAAEC,eAPV;IAQFC,KAAK,EAAEC,SARL;IASFC,cAAc,GAAG,GATf;IAUF,GAAGC;EAVD,IAWFb,KAXJ;EAaA,MAAMI,OAAO,GAAG,IAAAU,kBAAA,EAAY,MAAMT,QAAN,aAAMA,QAAN,uBAAMA,QAAQ,EAA1B,EAAgC,CAACA,QAAD,CAAhC,CAAhB;EACA,MAAMU,WAAW,GAAG,IAAAC,kBAAA,EAAY;IAC5BC,YAAY,EAAEd,eAAe,GAAG,CAAH,GAAOS,cADR;IAE5BM,QAAQ,EAAEd;EAFkB,CAAZ,CAApB;EAKA,MAAMe,OAAO,GAAG,IAAAC,uBAAA,EAAiBpC,gBAAjB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vB;EAMA,MAAMwB,aAAa,GAAG;IAClBX,OADkB;IAElBY,SAAS,EAAE,CAAC;MAAEV;IAAF,CAAD;EAFO,CAAtB;EAKA,MAAMW,iBAAiB,GAAGzB,WAAW,KAAK,OAAhB,GACpBnB,2BADoB,GAEpBC,6BAFN;EAGA,MAAMmB,UAAU,GAAGC,eAAe,IAAIuB,iBAAtC;EAEA,oBACI,6BAAC,2BAAD;IACI,QAAQ,EAAE9B,QADd;IAEI,OAAO,EAAEa,WAFb;IAGI,SAAS,EAAEa,aAHf;IAII,UAAU,EAAEC,cAJhB;IAKI,KAAK,EAAE,CACHC,aADG,EAEHnB,SAFG,CALX;IASI,mBAAmB,EAAEH;EATzB,GAUQK,UAVR,GAYK,OAAOZ,QAAP,KAAoB,UAApB,GACG,QAAiB;IAAA,IAAhB;MAAEgC;IAAF,CAAgB;;IACb,IAAIA,OAAO,KAAKC,SAAZ,IAAyB,CAAChC,QAA9B,EAAwC;MACpCyB,mBAAmB,CAACM,OAAD,EAAU,IAAV,CAAnB;IACH;;IAED,OAAOhC,QAAP;EACH,CAPJ,GAQGA,QApBR,CADJ;AAwBH;;AAAA"}
|
|
@@ -6,11 +6,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
Object.defineProperty(exports, "default", {
|
|
7
7
|
enumerable: true,
|
|
8
8
|
get: function () {
|
|
9
|
-
return
|
|
9
|
+
return _ButtonBase.default;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
12
|
|
|
13
|
-
var
|
|
13
|
+
var _ButtonBase = _interopRequireDefault(require("./ButtonBase"));
|
|
14
14
|
|
|
15
15
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
16
16
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export { default } from './
|
|
1
|
+
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export { default } from './ButtonBase';\nexport type { default as ButtonBaseProps } from './ButtonBaseProps';\n"],"mappings":";;;;;;;;;;;;AAAA"}
|
|
@@ -35,6 +35,7 @@ function Checkbox(props) {
|
|
|
35
35
|
} = props;
|
|
36
36
|
const theme = (0, _styles.useTheme)();
|
|
37
37
|
const {
|
|
38
|
+
checkboxContainerStyle,
|
|
38
39
|
checkboxStyle,
|
|
39
40
|
containerStyle,
|
|
40
41
|
iconColor
|
|
@@ -56,12 +57,14 @@ function Checkbox(props) {
|
|
|
56
57
|
onPress: handlePress,
|
|
57
58
|
style: rootStyle
|
|
58
59
|
}, otherProps), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
60
|
+
style: checkboxContainerStyle
|
|
61
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
59
62
|
style: checkboxStyle
|
|
60
63
|
}, checked ? /*#__PURE__*/_react.default.createElement(_icons.CheckboxOn, {
|
|
61
64
|
fill: iconColor,
|
|
62
65
|
height: 7.5,
|
|
63
66
|
width: 11
|
|
64
|
-
}) : null), children ? /*#__PURE__*/_react.default.createElement(_Row.default, {
|
|
67
|
+
}) : null)), children ? /*#__PURE__*/_react.default.createElement(_Row.default, {
|
|
65
68
|
flexGrow: 1,
|
|
66
69
|
flexShrink: 1
|
|
67
70
|
}, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Checkbox","props","checked","children","disabled","onChange","style","styleProp","variant","otherProps","theme","useTheme","checkboxStyle","containerStyle","iconColor","useVariantStyleMap","rootStyle","css","undefined","fontStyle","createFontStyle","selector","typography","body2","regular","color","palette","text","strong","handlePress"],"sources":["Checkbox.tsx"],"sourcesContent":["import React from 'react';\nimport { Text, View } from 'react-native';\nimport ButtonBase from '../ButtonBase';\nimport { CheckboxOn as CheckboxOnIcon } from '../internal/icons';\nimport Row from '../Row';\nimport { createFontStyle, css, useTheme } from '../styles';\nimport type CheckboxProps from './CheckboxProps';\nimport type { CheckboxVariant } from './CheckboxProps';\nimport useVariantStyleMap from './useVariantStyleMap';\n\nexport default function Checkbox(props: CheckboxProps) {\n const {\n checked = false,\n children,\n disabled = false,\n onChange,\n style: styleProp,\n variant = 'square' as CheckboxVariant,\n ...otherProps\n } = props;\n\n const theme = useTheme();\n\n const {\n checkboxStyle,\n containerStyle,\n iconColor,\n } = useVariantStyleMap(variant, checked);\n\n const rootStyle = css([\n children ? containerStyle : undefined,\n styleProp,\n ]);\n\n const fontStyle = createFontStyle(theme, {\n selector: (typography) => typography.body2.regular,\n color: theme.palette.text.strong,\n });\n\n const handlePress = () => {\n if (onChange) {\n onChange(!checked);\n }\n };\n\n return (\n <ButtonBase\n disabled={disabled}\n onPress={handlePress}\n style={rootStyle}\n {...otherProps}\n >\n <View style={
|
|
1
|
+
{"version":3,"names":["Checkbox","props","checked","children","disabled","onChange","style","styleProp","variant","otherProps","theme","useTheme","checkboxContainerStyle","checkboxStyle","containerStyle","iconColor","useVariantStyleMap","rootStyle","css","undefined","fontStyle","createFontStyle","selector","typography","body2","regular","color","palette","text","strong","handlePress"],"sources":["Checkbox.tsx"],"sourcesContent":["import React from 'react';\nimport { Text, View } from 'react-native';\nimport ButtonBase from '../ButtonBase';\nimport { CheckboxOn as CheckboxOnIcon } from '../internal/icons';\nimport Row from '../Row';\nimport { createFontStyle, css, useTheme } from '../styles';\nimport type CheckboxProps from './CheckboxProps';\nimport type { CheckboxVariant } from './CheckboxProps';\nimport useVariantStyleMap from './useVariantStyleMap';\n\nexport default function Checkbox(props: CheckboxProps) {\n const {\n checked = false,\n children,\n disabled = false,\n onChange,\n style: styleProp,\n variant = 'square' as CheckboxVariant,\n ...otherProps\n } = props;\n\n const theme = useTheme();\n\n const {\n checkboxContainerStyle,\n checkboxStyle,\n containerStyle,\n iconColor,\n } = useVariantStyleMap(variant, checked);\n\n const rootStyle = css([\n children ? containerStyle : undefined,\n styleProp,\n ]);\n\n const fontStyle = createFontStyle(theme, {\n selector: (typography) => typography.body2.regular,\n color: theme.palette.text.strong,\n });\n\n const handlePress = () => {\n if (onChange) {\n onChange(!checked);\n }\n };\n\n return (\n <ButtonBase\n disabled={disabled}\n onPress={handlePress}\n style={rootStyle}\n {...otherProps}\n >\n <View style={checkboxContainerStyle}>\n <View style={checkboxStyle}>\n {checked ? (\n <CheckboxOnIcon\n fill={iconColor}\n height={7.5}\n width={11}\n />\n ) : null}\n </View>\n </View>\n\n {children ? (\n <Row\n flexGrow={1}\n flexShrink={1}\n >\n <Text\n children={children}\n style={fontStyle}\n />\n </Row>\n ) : null}\n </ButtonBase>\n );\n};\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAGA;;;;;;AAEe,SAASA,QAAT,CAAkBC,KAAlB,EAAwC;EACnD,MAAM;IACFC,OAAO,GAAG,KADR;IAEFC,QAFE;IAGFC,QAAQ,GAAG,KAHT;IAIFC,QAJE;IAKFC,KAAK,EAAEC,SALL;IAMFC,OAAO,GAAG,QANR;IAOF,GAAGC;EAPD,IAQFR,KARJ;EAUA,MAAMS,KAAK,GAAG,IAAAC,gBAAA,GAAd;EAEA,MAAM;IACFC,sBADE;IAEFC,aAFE;IAGFC,cAHE;IAIFC;EAJE,IAKF,IAAAC,2BAAA,EAAmBR,OAAnB,EAA4BN,OAA5B,CALJ;EAOA,MAAMe,SAAS,GAAG,IAAAC,WAAA,EAAI,CAClBf,QAAQ,GAAGW,cAAH,GAAoBK,SADV,EAElBZ,SAFkB,CAAJ,CAAlB;EAKA,MAAMa,SAAS,GAAG,IAAAC,uBAAA,EAAgBX,KAAhB,EAAuB;IACrCY,QAAQ,EAAGC,UAAD,IAAgBA,UAAU,CAACC,KAAX,CAAiBC,OADN;IAErCC,KAAK,EAAEhB,KAAK,CAACiB,OAAN,CAAcC,IAAd,CAAmBC;EAFW,CAAvB,CAAlB;;EAKA,MAAMC,WAAW,GAAG,MAAM;IACtB,IAAIzB,QAAJ,EAAc;MACVA,QAAQ,CAAC,CAACH,OAAF,CAAR;IACH;EACJ,CAJD;;EAMA,oBACI,6BAAC,mBAAD;IACI,QAAQ,EAAEE,QADd;IAEI,OAAO,EAAE0B,WAFb;IAGI,KAAK,EAAEb;EAHX,GAIQR,UAJR,gBAMI,6BAAC,iBAAD;IAAM,KAAK,EAAEG;EAAb,gBACI,6BAAC,iBAAD;IAAM,KAAK,EAAEC;EAAb,GACKX,OAAO,gBACJ,6BAAC,iBAAD;IACI,IAAI,EAAEa,SADV;IAEI,MAAM,EAAE,GAFZ;IAGI,KAAK,EAAE;EAHX,EADI,GAMJ,IAPR,CADJ,CANJ,EAkBKZ,QAAQ,gBACL,6BAAC,YAAD;IACI,QAAQ,EAAE,CADd;IAEI,UAAU,EAAE;EAFhB,gBAII,6BAAC,iBAAD;IACI,QAAQ,EAAEA,QADd;IAEI,KAAK,EAAEiB;EAFX,EAJJ,CADK,GAUL,IA5BR,CADJ;AAgCH;;AAAA"}
|
|
@@ -25,6 +25,10 @@ function useVariantStyleMap(variant, checked) {
|
|
|
25
25
|
switch (variant) {
|
|
26
26
|
case 'square':
|
|
27
27
|
return {
|
|
28
|
+
checkboxContainerStyle: {
|
|
29
|
+
alignSelf: 'flex-start',
|
|
30
|
+
paddingTop: 3
|
|
31
|
+
},
|
|
28
32
|
checkboxStyle: (0, _styles2.css)([styles.checkbox, {
|
|
29
33
|
borderColor: theme.palette.border.base,
|
|
30
34
|
borderRadius: theme.shape.radius.xs,
|
|
@@ -36,9 +40,9 @@ function useVariantStyleMap(variant, checked) {
|
|
|
36
40
|
} : {})
|
|
37
41
|
}]),
|
|
38
42
|
containerStyle: {
|
|
39
|
-
alignItems: 'center',
|
|
40
43
|
flexDirection: 'row',
|
|
41
|
-
gap: theme.spacing(3)
|
|
44
|
+
gap: theme.spacing(3),
|
|
45
|
+
paddingVertical: theme.spacing(2)
|
|
42
46
|
},
|
|
43
47
|
iconColor: theme.palette.fill.baseAlt
|
|
44
48
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["styles","StyleSheet","create","checkbox","alignItems","borderWidth","justifyContent","useVariantStyleMap","variant","checked","theme","useTheme","checkboxStyle","css","borderColor","palette","border","base","borderRadius","shape","radius","xs","height","width","backgroundColor","fill","containerStyle","flexDirection","gap","spacing","iconColor","baseAlt","full","accent","borderBottomColor","weak","borderBottomWidth","
|
|
1
|
+
{"version":3,"names":["styles","StyleSheet","create","checkbox","alignItems","borderWidth","justifyContent","useVariantStyleMap","variant","checked","theme","useTheme","checkboxContainerStyle","alignSelf","paddingTop","checkboxStyle","css","borderColor","palette","border","base","borderRadius","shape","radius","xs","height","width","backgroundColor","fill","containerStyle","flexDirection","gap","spacing","paddingVertical","iconColor","baseAlt","full","accent","borderBottomColor","weak","borderBottomWidth","commonColors","static","strongInverse"],"sources":["useVariantStyleMap.ts"],"sourcesContent":["import { StyleSheet } from 'react-native';\nimport { commonColors, FountainUiStyle } from '@fountain-ui/styles';\nimport { css, useTheme } from '../styles';\nimport type { CheckboxVariant } from './CheckboxProps';\n\nconst styles = StyleSheet.create({\n checkbox: {\n alignItems: 'center',\n borderWidth: 1,\n justifyContent: 'center',\n },\n});\n\ntype useVariantStyleMapReturns = {\n checkboxContainerStyle?: FountainUiStyle;\n checkboxStyle?: FountainUiStyle;\n containerStyle?: FountainUiStyle;\n iconColor?: string;\n};\n\nexport default function useVariantStyleMap(variant: CheckboxVariant, checked: boolean): useVariantStyleMapReturns {\n const theme = useTheme();\n\n switch (variant) {\n case 'square':\n return {\n checkboxContainerStyle: {\n alignSelf: 'flex-start',\n paddingTop: 3,\n },\n checkboxStyle: css([\n styles.checkbox,\n {\n borderColor: theme.palette.border.base,\n borderRadius: theme.shape.radius.xs,\n height: 18,\n width: 18,\n ...(checked ? {\n backgroundColor: theme.palette.fill.base,\n borderColor: theme.palette.fill.base,\n } : {}),\n },\n ]),\n containerStyle: {\n flexDirection: 'row',\n gap: theme.spacing(3),\n paddingVertical: theme.spacing(2),\n },\n iconColor: theme.palette.fill.baseAlt,\n };\n case 'round':\n return {\n checkboxStyle: css([\n styles.checkbox,\n {\n borderColor: theme.palette.border.base,\n borderRadius: theme.shape.radius.full,\n height: 20,\n width: 20,\n ...(checked ? {\n backgroundColor: theme.palette.fill.accent,\n borderColor: theme.palette.fill.accent,\n } : {}),\n },\n ]),\n containerStyle: {\n alignItems: 'center',\n borderBottomColor: theme.palette.border.weak,\n borderBottomWidth: 0.5,\n flexDirection: 'row-reverse',\n gap: theme.spacing(8),\n paddingVertical: theme.spacing(3.5),\n },\n iconColor: commonColors.static.strongInverse,\n };\n default:\n return {};\n }\n}\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AAGA,MAAMA,MAAM,GAAGC,uBAAA,CAAWC,MAAX,CAAkB;EAC7BC,QAAQ,EAAE;IACNC,UAAU,EAAE,QADN;IAENC,WAAW,EAAE,CAFP;IAGNC,cAAc,EAAE;EAHV;AADmB,CAAlB,CAAf;;AAee,SAASC,kBAAT,CAA4BC,OAA5B,EAAsDC,OAAtD,EAAmG;EAC9G,MAAMC,KAAK,GAAG,IAAAC,iBAAA,GAAd;;EAEA,QAAQH,OAAR;IACI,KAAK,QAAL;MACI,OAAO;QACHI,sBAAsB,EAAE;UACpBC,SAAS,EAAE,YADS;UAEpBC,UAAU,EAAE;QAFQ,CADrB;QAKHC,aAAa,EAAE,IAAAC,YAAA,EAAI,CACfhB,MAAM,CAACG,QADQ,EAEf;UACIc,WAAW,EAAEP,KAAK,CAACQ,OAAN,CAAcC,MAAd,CAAqBC,IADtC;UAEIC,YAAY,EAAEX,KAAK,CAACY,KAAN,CAAYC,MAAZ,CAAmBC,EAFrC;UAGIC,MAAM,EAAE,EAHZ;UAIIC,KAAK,EAAE,EAJX;UAKI,IAAIjB,OAAO,GAAG;YACVkB,eAAe,EAAEjB,KAAK,CAACQ,OAAN,CAAcU,IAAd,CAAmBR,IAD1B;YAEVH,WAAW,EAAEP,KAAK,CAACQ,OAAN,CAAcU,IAAd,CAAmBR;UAFtB,CAAH,GAGP,E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
|
|
|
10
10
|
var _reactNative = require("react-native");
|
|
11
11
|
|
|
12
|
+
var _ButtonBase = _interopRequireDefault(require("../ButtonBase"));
|
|
13
|
+
|
|
14
|
+
var _internal = require("../internal");
|
|
15
|
+
|
|
12
16
|
var _styles = require("../styles");
|
|
13
17
|
|
|
14
18
|
var _utils = require("../utils");
|
|
15
19
|
|
|
16
|
-
var _ButtonBase = _interopRequireDefault(require("../ButtonBase/ButtonBase"));
|
|
17
|
-
|
|
18
20
|
var _useChipStyle = _interopRequireDefault(require("./useChipStyle"));
|
|
19
21
|
|
|
20
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -24,9 +26,10 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
|
|
|
24
26
|
function Chip(props) {
|
|
25
27
|
const {
|
|
26
28
|
children,
|
|
27
|
-
|
|
29
|
+
color = 'default',
|
|
28
30
|
numberOfLines,
|
|
29
31
|
onPress,
|
|
32
|
+
selected = false,
|
|
30
33
|
size = 'small',
|
|
31
34
|
startElement: startElementProp,
|
|
32
35
|
startElementVariant = 'default',
|
|
@@ -35,26 +38,34 @@ function Chip(props) {
|
|
|
35
38
|
} = props;
|
|
36
39
|
const {
|
|
37
40
|
container: containerStyle,
|
|
38
|
-
|
|
41
|
+
closeButtonContainer: closeButtonContainerStyle,
|
|
42
|
+
closeIconSize,
|
|
39
43
|
label: labelStyle,
|
|
40
|
-
startElement: startElementStyle
|
|
41
|
-
|
|
44
|
+
startElement: startElementStyle,
|
|
45
|
+
startElementContainer: startElementContainerStyle
|
|
46
|
+
} = (0, _useChipStyle.default)(size, startElementVariant, color, selected);
|
|
42
47
|
const chipStyle = (0, _styles.css)([containerStyle, styleProp]);
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
48
|
+
|
|
49
|
+
const startElement = /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
50
|
+
style: startElementContainerStyle
|
|
51
|
+
}, (0, _utils.cloneElementSafely)(startElementProp, {
|
|
46
52
|
style: startElementStyle
|
|
47
|
-
});
|
|
48
|
-
|
|
49
|
-
style: endElementStyle
|
|
50
|
-
});
|
|
53
|
+
}));
|
|
54
|
+
|
|
51
55
|
return /*#__PURE__*/_react.default.createElement(_ButtonBase.default, _extends({
|
|
56
|
+
disabled: !onPress,
|
|
52
57
|
onPress: onPress,
|
|
53
58
|
style: chipStyle
|
|
54
59
|
}, otherProps), startElement, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
|
|
55
60
|
children: children,
|
|
56
61
|
numberOfLines: numberOfLines,
|
|
57
62
|
style: labelStyle
|
|
58
|
-
}),
|
|
63
|
+
}), selected ? /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
64
|
+
style: closeButtonContainerStyle
|
|
65
|
+
}, /*#__PURE__*/_react.default.createElement(_internal.ChipClose, {
|
|
66
|
+
color: 'baseInverse',
|
|
67
|
+
height: closeIconSize === null || closeIconSize === void 0 ? void 0 : closeIconSize.height,
|
|
68
|
+
width: closeIconSize === null || closeIconSize === void 0 ? void 0 : closeIconSize.width
|
|
69
|
+
})) : null);
|
|
59
70
|
}
|
|
60
71
|
//# sourceMappingURL=Chip.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Chip","props","children","
|
|
1
|
+
{"version":3,"names":["Chip","props","children","color","numberOfLines","onPress","selected","size","startElement","startElementProp","startElementVariant","style","styleProp","otherProps","container","containerStyle","closeButtonContainer","closeButtonContainerStyle","closeIconSize","label","labelStyle","startElementStyle","startElementContainer","startElementContainerStyle","useChipStyle","chipStyle","css","cloneElementSafely","height","width"],"sources":["Chip.tsx"],"sourcesContent":["import React from 'react';\nimport { Text, View } from 'react-native';\nimport ButtonBase from '../ButtonBase';\nimport { ChipClose } from '../internal';\nimport { css } from '../styles';\nimport { cloneElementSafely } from '../utils';\nimport type ChipProps from './ChipProps';\nimport type { ChipColor, ChipSize } from './ChipProps';\nimport useChipStyle from './useChipStyle';\n\nexport default function Chip(props: ChipProps) {\n const {\n children,\n color = 'default' as ChipColor,\n numberOfLines,\n onPress,\n selected = false,\n size = 'small' as ChipSize,\n startElement: startElementProp,\n startElementVariant = 'default',\n style: styleProp,\n ...otherProps\n } = props;\n\n const {\n container: containerStyle,\n closeButtonContainer: closeButtonContainerStyle,\n closeIconSize,\n label: labelStyle,\n startElement: startElementStyle,\n startElementContainer: startElementContainerStyle,\n } = useChipStyle(size, startElementVariant, color, selected);\n\n const chipStyle = css([\n containerStyle,\n styleProp,\n ]);\n\n const startElement = (\n <View style={startElementContainerStyle}>\n {cloneElementSafely(startElementProp, { style: startElementStyle })}\n </View>\n );\n\n return (\n <ButtonBase\n disabled={!onPress}\n onPress={onPress}\n style={chipStyle}\n {...otherProps}\n >\n {startElement}\n\n <Text\n children={children}\n numberOfLines={numberOfLines}\n style={labelStyle}\n />\n\n {selected ? (\n <View style={closeButtonContainerStyle}>\n <ChipClose\n color={'baseInverse'}\n height={closeIconSize?.height}\n width={closeIconSize?.width}\n />\n </View>\n ) : null}\n </ButtonBase>\n );\n}\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAGA;;;;;;AAEe,SAASA,IAAT,CAAcC,KAAd,EAAgC;EAC3C,MAAM;IACFC,QADE;IAEFC,KAAK,GAAG,SAFN;IAGFC,aAHE;IAIFC,OAJE;IAKFC,QAAQ,GAAG,KALT;IAMFC,IAAI,GAAG,OANL;IAOFC,YAAY,EAAEC,gBAPZ;IAQFC,mBAAmB,GAAG,SARpB;IASFC,KAAK,EAAEC,SATL;IAUF,GAAGC;EAVD,IAWFZ,KAXJ;EAaA,MAAM;IACFa,SAAS,EAAEC,cADT;IAEFC,oBAAoB,EAAEC,yBAFpB;IAGFC,aAHE;IAIFC,KAAK,EAAEC,UAJL;IAKFZ,YAAY,EAAEa,iBALZ;IAMFC,qBAAqB,EAAEC;EANrB,IAOF,IAAAC,qBAAA,EAAajB,IAAb,EAAmBG,mBAAnB,EAAwCP,KAAxC,EAA+CG,QAA/C,CAPJ;EASA,MAAMmB,SAAS,GAAG,IAAAC,WAAA,EAAI,CAClBX,cADkB,EAElBH,SAFkB,CAAJ,CAAlB;;EAKA,MAAMJ,YAAY,gBACd,6BAAC,iBAAD;IAAM,KAAK,EAAEe;EAAb,GACK,IAAAI,yBAAA,EAAmBlB,gBAAnB,EAAqC;IAAEE,KAAK,EAAEU;EAAT,CAArC,CADL,CADJ;;EAMA,oBACI,6BAAC,mBAAD;IACI,QAAQ,EAAE,CAAChB,OADf;IAEI,OAAO,EAAEA,OAFb;IAGI,KAAK,EAAEoB;EAHX,GAIQZ,UAJR,GAMKL,YANL,eAQI,6BAAC,iBAAD;IACI,QAAQ,EAAEN,QADd;IAEI,aAAa,EAAEE,aAFnB;IAGI,KAAK,EAAEgB;EAHX,EARJ,EAcKd,QAAQ,gBACL,6BAAC,iBAAD;IAAM,KAAK,EAAEW;EAAb,gBACI,6BAAC,mBAAD;IACI,KAAK,EAAE,aADX;IAEI,MAAM,EAAEC,aAAF,aAAEA,aAAF,uBAAEA,aAAa,CAAEU,MAF3B;IAGI,KAAK,EAAEV,aAAF,aAAEA,aAAF,uBAAEA,aAAa,CAAEW;EAH1B,EADJ,CADK,GAQL,IAtBR,CADJ;AA0BH"}
|
|
@@ -3,7 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.chipStartElementVariants = exports.chipSizes = void 0;
|
|
6
|
+
exports.chipStartElementVariants = exports.chipSizes = exports.chipColors = void 0;
|
|
7
|
+
const chipColors = ['default', 'white'];
|
|
8
|
+
exports.chipColors = chipColors;
|
|
7
9
|
const chipSizes = ['large', 'small'];
|
|
8
10
|
exports.chipSizes = chipSizes;
|
|
9
11
|
const chipStartElementVariants = ['default', 'avatar', 'image', 'icon'];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["chipSizes","chipStartElementVariants"],"sources":["ChipProps.ts"],"sourcesContent":["import React from 'react';\nimport { OverridableComponentProps } from '../types';\nimport type { ButtonBaseProps } from '../ButtonBase';\n\nexport const chipSizes = ['large', 'small'] as const;\nexport type ChipSize = typeof chipSizes[number];\n\nexport const chipStartElementVariants = ['default', 'avatar', 'image', 'icon'] as const;\nexport type ChipStartElementVariant = typeof chipStartElementVariants[number];\n\nexport default interface ChipProps extends OverridableComponentProps<ButtonBaseProps, {\n /**\n *
|
|
1
|
+
{"version":3,"names":["chipColors","chipSizes","chipStartElementVariants"],"sources":["ChipProps.ts"],"sourcesContent":["import React from 'react';\nimport { OverridableComponentProps } from '../types';\nimport type { ButtonBaseProps } from '../ButtonBase';\n\nexport const chipColors = ['default', 'white'] as const;\nexport type ChipColor = typeof chipColors[number];\n\nexport const chipSizes = ['large', 'small'] as const;\nexport type ChipSize = typeof chipSizes[number];\n\nexport const chipStartElementVariants = ['default', 'avatar', 'image', 'icon'] as const;\nexport type ChipStartElementVariant = typeof chipStartElementVariants[number];\n\nexport default interface ChipProps extends OverridableComponentProps<ButtonBaseProps, {\n /**\n * The content of the component.\n */\n children: string;\n\n /**\n * Set backgroundColor of the component.\n * @default 'default'\n */\n color?: ChipColor;\n\n /**\n * Number of lines of children.\n */\n numberOfLines?: number;\n\n /**\n * If `true`, showing a close icon and applying a highlighted style.\n */\n selected?: boolean;\n\n /**\n * Determines size of component.\n * @default 'small'\n */\n size?: ChipSize;\n\n /**\n * Element placed before the children.\n */\n startElement?: React.ReactElement;\n\n /**\n * Determines the style of the start element.\n */\n startElementVariant?: ChipStartElementVariant;\n}> {}\n"],"mappings":";;;;;;AAIO,MAAMA,UAAU,GAAG,CAAC,SAAD,EAAY,OAAZ,CAAnB;;AAGA,MAAMC,SAAS,GAAG,CAAC,OAAD,EAAU,OAAV,CAAlB;;AAGA,MAAMC,wBAAwB,GAAG,CAAC,SAAD,EAAY,QAAZ,EAAsB,OAAtB,EAA+B,MAA/B,CAAjC"}
|
|
@@ -3,6 +3,12 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
+
Object.defineProperty(exports, "chipColors", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _ChipProps.chipColors;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
6
12
|
Object.defineProperty(exports, "chipSizes", {
|
|
7
13
|
enumerable: true,
|
|
8
14
|
get: function () {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export { default } from './Chip';\nexport type { default as ChipProps } from './ChipProps';\nexport { chipSizes, chipStartElementVariants } from './ChipProps';\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export { default } from './Chip';\nexport type { default as ChipProps } from './ChipProps';\nexport { chipColors, chipSizes, chipStartElementVariants } from './ChipProps';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AAEA"}
|
|
@@ -9,37 +9,45 @@ var _react = require("react");
|
|
|
9
9
|
|
|
10
10
|
var _styles = require("../styles");
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
const closeButtonContainerStyleMap = {
|
|
13
|
+
small: {
|
|
14
|
+
marginLeft: 8,
|
|
15
|
+
paddingTop: 1
|
|
16
|
+
},
|
|
17
|
+
large: {
|
|
18
|
+
marginLeft: 10,
|
|
19
|
+
paddingTop: 1
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
const closeIconSize = {
|
|
23
|
+
small: {
|
|
24
|
+
height: 14,
|
|
25
|
+
width: 8.17
|
|
26
|
+
},
|
|
27
|
+
large: {
|
|
28
|
+
height: 16,
|
|
29
|
+
width: 9
|
|
30
|
+
}
|
|
31
|
+
}; // TODO: need to refactoring...
|
|
32
|
+
|
|
33
|
+
function useChipStyle(size, startElementVariant, color, selected) {
|
|
14
34
|
const theme = (0, _styles.useTheme)();
|
|
15
35
|
return (0, _react.useMemo)(() => {
|
|
16
|
-
var _variantStyleMap$star, _variantStyleMap$star2;
|
|
36
|
+
var _variantStyleMap$star, _variantStyleMap$star2, _variantStyleMap$star3;
|
|
17
37
|
|
|
18
38
|
const fontStyleMap = {
|
|
19
39
|
small: (0, _styles.createFontStyle)(theme, {
|
|
20
40
|
selector: typography => typography.caption1.medium,
|
|
21
|
-
color: theme.palette.text.strong
|
|
41
|
+
color: selected ? theme.palette.text.strongInverse : theme.palette.text.strong
|
|
22
42
|
}),
|
|
23
43
|
large: (0, _styles.createFontStyle)(theme, {
|
|
24
44
|
selector: typography => typography.body2.medium,
|
|
25
|
-
color: theme.palette.text.strong
|
|
45
|
+
color: selected ? theme.palette.text.strongInverse : theme.palette.text.strong
|
|
26
46
|
})
|
|
27
47
|
};
|
|
28
|
-
const endElementStyleMap = {
|
|
29
|
-
small: {
|
|
30
|
-
height: 14,
|
|
31
|
-
marginLeft: theme.spacing(2),
|
|
32
|
-
width: 8.17
|
|
33
|
-
},
|
|
34
|
-
large: {
|
|
35
|
-
height: 16,
|
|
36
|
-
marginLeft: theme.spacing(2.5),
|
|
37
|
-
width: 9
|
|
38
|
-
}
|
|
39
|
-
};
|
|
40
48
|
const baseContainerStyle = {
|
|
41
49
|
alignItems: 'center',
|
|
42
|
-
backgroundColor: theme.palette.fill.weaker,
|
|
50
|
+
backgroundColor: selected ? theme.palette.fill.base : color === 'white' ? theme.palette.surface.base : theme.palette.fill.weaker,
|
|
43
51
|
borderRadius: theme.shape.radius.full,
|
|
44
52
|
flexDirection: 'row',
|
|
45
53
|
overflow: 'hidden'
|
|
@@ -54,9 +62,11 @@ function useChipStyle(size, startElementVariant, isEndElement) {
|
|
|
54
62
|
},
|
|
55
63
|
startElement: {
|
|
56
64
|
borderRadius: theme.shape.radius.full,
|
|
57
|
-
height: isLarge ?
|
|
58
|
-
|
|
59
|
-
|
|
65
|
+
height: isLarge ? 26 : 23,
|
|
66
|
+
width: isLarge ? 26 : 23
|
|
67
|
+
},
|
|
68
|
+
startElementContainer: {
|
|
69
|
+
marginRight: theme.spacing(isLarge ? 1.5 : 1.25)
|
|
60
70
|
}
|
|
61
71
|
},
|
|
62
72
|
icon: {
|
|
@@ -66,11 +76,16 @@ function useChipStyle(size, startElementVariant, isEndElement) {
|
|
|
66
76
|
paddingVertical: theme.spacing(isLarge ? 1.5 : 1.25)
|
|
67
77
|
},
|
|
68
78
|
startElement: {
|
|
79
|
+
color: selected ? theme.palette.icon.strongInverse : theme.palette.icon.strong,
|
|
80
|
+
height: isLarge ? 17 : 16,
|
|
81
|
+
width: isLarge ? 17 : 16
|
|
82
|
+
},
|
|
83
|
+
startElementContainer: {
|
|
69
84
|
alignItems: 'center',
|
|
70
|
-
height: isLarge ?
|
|
85
|
+
height: isLarge ? 24 : 21,
|
|
71
86
|
justifyContent: 'center',
|
|
72
87
|
marginRight: theme.spacing(isLarge ? 1 : 0.75),
|
|
73
|
-
width: isLarge ?
|
|
88
|
+
width: isLarge ? 24 : 21
|
|
74
89
|
}
|
|
75
90
|
},
|
|
76
91
|
image: {
|
|
@@ -80,15 +95,18 @@ function useChipStyle(size, startElementVariant, isEndElement) {
|
|
|
80
95
|
},
|
|
81
96
|
startElement: {
|
|
82
97
|
borderRadius: theme.shape.radius.full,
|
|
83
|
-
height: isLarge ?
|
|
84
|
-
|
|
85
|
-
|
|
98
|
+
height: isLarge ? 36 : 31,
|
|
99
|
+
width: isLarge ? 48 : 40
|
|
100
|
+
},
|
|
101
|
+
startElementContainer: {
|
|
102
|
+
marginRight: theme.spacing(1.5)
|
|
86
103
|
}
|
|
87
104
|
},
|
|
88
105
|
default: {
|
|
89
106
|
container: {
|
|
90
107
|
paddingBottom: theme.spacing(1.75),
|
|
91
|
-
|
|
108
|
+
paddingLeft: theme.spacing(isLarge ? 3.5 : 3),
|
|
109
|
+
paddingRight: theme.spacing(isLarge ? 3.5 : 3),
|
|
92
110
|
paddingTop: theme.spacing(1.5)
|
|
93
111
|
}
|
|
94
112
|
}
|
|
@@ -96,14 +114,16 @@ function useChipStyle(size, startElementVariant, isEndElement) {
|
|
|
96
114
|
return {
|
|
97
115
|
container: { ...baseContainerStyle,
|
|
98
116
|
...((_variantStyleMap$star = variantStyleMap[startElementVariant]) === null || _variantStyleMap$star === void 0 ? void 0 : _variantStyleMap$star.container),
|
|
99
|
-
...(
|
|
117
|
+
...(selected ? {
|
|
100
118
|
paddingRight: theme.spacing(isLarge ? 2.5 : 2.25)
|
|
101
119
|
} : {})
|
|
102
120
|
},
|
|
103
|
-
|
|
121
|
+
closeButtonContainer: closeButtonContainerStyleMap[size],
|
|
122
|
+
closeIconSize: closeIconSize[size],
|
|
104
123
|
label: fontStyleMap[size],
|
|
105
|
-
startElement: (_variantStyleMap$star2 = variantStyleMap[startElementVariant]) === null || _variantStyleMap$star2 === void 0 ? void 0 : _variantStyleMap$star2.startElement
|
|
124
|
+
startElement: (_variantStyleMap$star2 = variantStyleMap[startElementVariant]) === null || _variantStyleMap$star2 === void 0 ? void 0 : _variantStyleMap$star2.startElement,
|
|
125
|
+
startElementContainer: (_variantStyleMap$star3 = variantStyleMap[startElementVariant]) === null || _variantStyleMap$star3 === void 0 ? void 0 : _variantStyleMap$star3.startElementContainer
|
|
106
126
|
};
|
|
107
|
-
}, [theme, size, startElementVariant]);
|
|
127
|
+
}, [theme, size, startElementVariant, color, selected]);
|
|
108
128
|
}
|
|
109
129
|
//# sourceMappingURL=useChipStyle.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useChipStyle","size","startElementVariant","isEndElement","theme","useTheme","useMemo","fontStyleMap","small","createFontStyle","selector","typography","caption1","medium","color","palette","text","strong","large","body2","endElementStyleMap","height","marginLeft","spacing","width","baseContainerStyle","alignItems","backgroundColor","fill","weaker","borderRadius","shape","radius","full","flexDirection","overflow","isLarge","variantStyleMap","avatar","container","paddingLeft","paddingRight","paddingVertical","startElement","marginRight","icon","justifyContent","image","default","paddingBottom","paddingHorizontal","paddingTop","endElement","label"],"sources":["useChipStyle.ts"],"sourcesContent":["import { useMemo } from 'react';\nimport type { TextStyle } from 'react-native';\nimport type { FountainUiStyle } from '@fountain-ui/styles';\nimport { createFontStyle, useTheme } from '../styles';\nimport type { ChipSize, ChipStartElementVariant } from './ChipProps';\n\ninterface ChipStyle {\n container: FountainUiStyle;\n endElement?: FountainUiStyle;\n label: TextStyle;\n startElement?: FountainUiStyle;\n}\n\ntype VariantStyleMap = Record<ChipStartElementVariant, Partial<ChipStyle>>;\n\n// TODO: need to refactoring...\nexport default function useChipStyle(\n size: ChipSize,\n startElementVariant: ChipStartElementVariant,\n isEndElement: boolean,\n): ChipStyle {\n const theme = useTheme();\n\n return useMemo<ChipStyle>(() => {\n const fontStyleMap: Record<ChipSize, TextStyle> = {\n small: createFontStyle(theme, {\n selector: (typography) => typography.caption1.medium,\n color: theme.palette.text.strong,\n }),\n large: createFontStyle(theme, {\n selector: (typography) => typography.body2.medium,\n color: theme.palette.text.strong,\n }),\n };\n\n const endElementStyleMap: Record<ChipSize, FountainUiStyle> = {\n small: {\n height: 14,\n marginLeft: theme.spacing(2),\n width: 8.17,\n },\n large: {\n height: 16,\n marginLeft: theme.spacing(2.5),\n width: 9,\n },\n };\n\n const baseContainerStyle: FountainUiStyle = {\n alignItems: 'center',\n backgroundColor: theme.palette.fill.weaker,\n borderRadius: theme.shape.radius.full,\n flexDirection: 'row',\n overflow: 'hidden',\n };\n\n const isLarge = size === 'large';\n\n const variantStyleMap: VariantStyleMap = {\n avatar: {\n container: {\n paddingLeft: theme.spacing(isLarge ? 1.5 : 1.25),\n paddingRight: theme.spacing(isLarge ? 3.5 : 3),\n paddingVertical: theme.spacing(isLarge ? 1.25 : 1),\n },\n startElement: {\n borderRadius: theme.shape.radius.full,\n height: isLarge ? 24 : 22,\n marginRight: theme.spacing(isLarge ? 1.5 : 1.25),\n width: isLarge ? 24 : 22,\n },\n },\n icon: {\n container: {\n paddingLeft: theme.spacing(1.5),\n paddingRight: theme.spacing(isLarge ? 3.5 : 3),\n paddingVertical: theme.spacing(isLarge ? 1.5 : 1.25),\n },\n startElement: {\n alignItems: 'center',\n height: isLarge ? 22 : 20,\n justifyContent: 'center',\n marginRight: theme.spacing(isLarge ? 1 : 0.75),\n width: isLarge ? 22 : 20,\n },\n },\n image: {\n container: {\n alignItems: 'center',\n paddingRight: theme.spacing(isLarge ? 3.5 : 3),\n },\n startElement: {\n borderRadius: theme.shape.radius.full,\n height: isLarge ? 34 : 30,\n marginRight: theme.spacing(1.5),\n width: isLarge ? 45 : 40,\n },\n },\n default: {\n container: {\n paddingBottom: theme.spacing(1.75),\n paddingHorizontal: theme.spacing(isLarge ? 3.5 : 3),\n paddingTop: theme.spacing(1.5),\n },\n },\n };\n\n return {\n container: {\n ...baseContainerStyle,\n ...variantStyleMap[startElementVariant]?.container,\n ...(isEndElement ? { paddingRight: theme.spacing(isLarge ? 2.5 : 2.25) } : {}),\n },\n endElement: endElementStyleMap[size],\n label: fontStyleMap[size],\n startElement: variantStyleMap[startElementVariant]?.startElement,\n };\n }, [theme, size, startElementVariant]);\n}\n"],"mappings":";;;;;;;AAAA;;AAGA;;AAYA;AACe,SAASA,YAAT,CACXC,IADW,EAEXC,mBAFW,EAGXC,YAHW,EAIF;EACT,MAAMC,KAAK,GAAG,IAAAC,gBAAA,GAAd;EAEA,OAAO,IAAAC,cAAA,EAAmB,MAAM;IAAA;;IAC5B,MAAMC,YAAyC,GAAG;MAC9CC,KAAK,EAAE,IAAAC,uBAAA,EAAgBL,KAAhB,EAAuB;QAC1BM,QAAQ,EAAGC,UAAD,IAAgBA,UAAU,CAACC,QAAX,CAAoBC,MADpB;QAE1BC,KAAK,EAAEV,KAAK,CAACW,OAAN,CAAcC,IAAd,CAAmBC;MAFA,CAAvB,CADuC;MAK9CC,KAAK,EAAE,IAAAT,uBAAA,EAAgBL,KAAhB,EAAuB;QAC1BM,QAAQ,EAAGC,UAAD,IAAgBA,UAAU,CAACQ,KAAX,CAAiBN,MADjB;QAE1BC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K,CAACmB,OAAN,CAAc,GAAd;QAHL;MADN;IAxC4B,CAAzC;IAiDA,OAAO;MACHgB,SAAS,EAAE,EACP,GAAGd,kBADI;QAEP,6BAAGY,eAAe,CAACnC,mBAAD,CAAlB,0DAAG,sBAAsCqC,SAAzC,CAFO;QAGP,IAAIpC,YAAY,GAAG;UAAEsC,YAAY,EAAErC,KAAK,CAACmB,OAAN,CAAca,OAAO,GAAG,GAAH,GAAS,IAA9B;QAAhB,CAAH,GAA2D,EAA3E;MAHO,CADR;MAMHgB,UAAU,EAAEhC,kBAAkB,CAACnB,IAAD,CAN3B;MAOHoD,KAAK,EAAE9C,YAAY,CAACN,IAAD,CAPhB;MAQH0C,YAAY,4BAAEN,eAAe,CAACnC,mBAAD,CAAjB,2DAAE,uBAAsCyC;IARjD,CAAP;EAUH,CA9FM,EA8FJ,CAACvC,KAAD,EAAQH,IAAR,EAAcC,mBAAd,CA9FI,CAAP;AA+FH"}
|
|
1
|
+
{"version":3,"names":["closeButtonContainerStyleMap","small","marginLeft","paddingTop","large","closeIconSize","height","width","useChipStyle","size","startElementVariant","color","selected","theme","useTheme","useMemo","fontStyleMap","createFontStyle","selector","typography","caption1","medium","palette","text","strongInverse","strong","body2","baseContainerStyle","alignItems","backgroundColor","fill","base","surface","weaker","borderRadius","shape","radius","full","flexDirection","overflow","isLarge","variantStyleMap","avatar","container","paddingLeft","spacing","paddingRight","paddingVertical","startElement","startElementContainer","marginRight","icon","justifyContent","image","default","paddingBottom","closeButtonContainer","label"],"sources":["useChipStyle.ts"],"sourcesContent":["import { useMemo } from 'react';\nimport type { TextStyle } from 'react-native';\nimport type { FountainUiStyle } from '@fountain-ui/styles';\nimport type { SvgIconProps } from '../SvgIcon';\nimport { createFontStyle, useTheme } from '../styles';\nimport type { ChipColor, ChipSize, ChipStartElementVariant } from './ChipProps';\n\ninterface ChipStyle {\n container: FountainUiStyle;\n closeButtonContainer?: FountainUiStyle;\n closeIconSize?: Pick<SvgIconProps, 'height' | 'width'>;\n label: TextStyle;\n startElement?: FountainUiStyle;\n startElementContainer?: FountainUiStyle;\n}\n\ntype VariantStyleMap = Record<ChipStartElementVariant, Partial<ChipStyle>>;\n\nconst closeButtonContainerStyleMap: Record<ChipSize, FountainUiStyle> = {\n small: {\n marginLeft: 8,\n paddingTop: 1,\n },\n large: {\n marginLeft: 10,\n paddingTop: 1,\n },\n};\n\nconst closeIconSize: Record<ChipSize, ChipStyle['closeIconSize']> = {\n small: {\n height: 14,\n width: 8.17,\n },\n large: {\n height: 16,\n width: 9,\n },\n};\n\n// TODO: need to refactoring...\nexport default function useChipStyle(\n size: ChipSize,\n startElementVariant: ChipStartElementVariant,\n color: ChipColor,\n selected: boolean,\n): ChipStyle {\n const theme = useTheme();\n\n return useMemo<ChipStyle>(() => {\n const fontStyleMap: Record<ChipSize, TextStyle> = {\n small: createFontStyle(theme, {\n selector: (typography) => typography.caption1.medium,\n color: selected ? theme.palette.text.strongInverse : theme.palette.text.strong,\n }),\n large: createFontStyle(theme, {\n selector: (typography) => typography.body2.medium,\n color: selected ? theme.palette.text.strongInverse : theme.palette.text.strong,\n }),\n };\n\n const baseContainerStyle: FountainUiStyle = {\n alignItems: 'center',\n backgroundColor: selected ? theme.palette.fill.base\n : color === 'white'\n ? theme.palette.surface.base\n : theme.palette.fill.weaker,\n borderRadius: theme.shape.radius.full,\n flexDirection: 'row',\n overflow: 'hidden',\n };\n\n const isLarge = size === 'large';\n\n const variantStyleMap: VariantStyleMap = {\n avatar: {\n container: {\n paddingLeft: theme.spacing(isLarge ? 1.5 : 1.25),\n paddingRight: theme.spacing(isLarge ? 3.5 : 3),\n paddingVertical: theme.spacing(isLarge ? 1.25 : 1),\n },\n startElement: {\n borderRadius: theme.shape.radius.full,\n height: isLarge ? 26 : 23,\n width: isLarge ? 26 : 23,\n },\n startElementContainer: {\n marginRight: theme.spacing(isLarge ? 1.5 : 1.25),\n },\n },\n icon: {\n container: {\n paddingLeft: theme.spacing(1.5),\n paddingRight: theme.spacing(isLarge ? 3.5 : 3),\n paddingVertical: theme.spacing(isLarge ? 1.5 : 1.25),\n },\n startElement: {\n color: selected\n ? theme.palette.icon.strongInverse\n : theme.palette.icon.strong,\n height: isLarge ? 17 : 16,\n width: isLarge ? 17 : 16,\n },\n startElementContainer: {\n alignItems: 'center',\n height: isLarge ? 24 : 21,\n justifyContent: 'center',\n marginRight: theme.spacing(isLarge ? 1 : 0.75),\n width: isLarge ? 24 : 21,\n },\n },\n image: {\n container: {\n alignItems: 'center',\n paddingRight: theme.spacing(isLarge ? 3.5 : 3),\n },\n startElement: {\n borderRadius: theme.shape.radius.full,\n height: isLarge ? 36 : 31,\n width: isLarge ? 48 : 40,\n },\n startElementContainer: {\n marginRight: theme.spacing(1.5),\n },\n },\n default: {\n container: {\n paddingBottom: theme.spacing(1.75),\n paddingLeft: theme.spacing(isLarge ? 3.5 : 3),\n paddingRight: theme.spacing(isLarge ? 3.5 : 3),\n paddingTop: theme.spacing(1.5),\n },\n },\n };\n\n return {\n container: {\n ...baseContainerStyle,\n ...variantStyleMap[startElementVariant]?.container,\n ...(selected ? { paddingRight: theme.spacing(isLarge ? 2.5 : 2.25) } : {}),\n },\n closeButtonContainer: closeButtonContainerStyleMap[size],\n closeIconSize: closeIconSize[size],\n label: fontStyleMap[size],\n startElement: variantStyleMap[startElementVariant]?.startElement,\n startElementContainer: variantStyleMap[startElementVariant]?.startElementContainer,\n };\n }, [theme, size, startElementVariant, color, selected]);\n}\n"],"mappings":";;;;;;;AAAA;;AAIA;;AAcA,MAAMA,4BAA+D,GAAG;EACpEC,KAAK,EAAE;IACHC,UAAU,EAAE,CADT;IAEHC,UAAU,EAAE;EAFT,CAD6D;EAKpEC,KAAK,EAAE;IACHF,UAAU,EAAE,EADT;IAEHC,UAAU,EAAE;EAFT;AAL6D,CAAxE;AAWA,MAAME,aAA2D,GAAG;EAChEJ,KAAK,EAAE;IACHK,MAAM,EAAE,EADL;IAEHC,KAAK,EAAE;EAFJ,CADyD;EAKhEH,KAA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