@fountain-ui/core 3.0.0-alpha.4 → 3.0.0-alpha.41
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 +20 -13
- 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 +1 -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 +6 -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/Modal/Modal.js +1 -1
- package/build/commonjs/Modal/Modal.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 +81 -0
- package/build/commonjs/Tabs/useTabsStyle.js.map +1 -0
- package/build/commonjs/TextField/TextField.js +60 -15
- 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 +22 -12
- package/build/commonjs/Toolbar/Toolbar.js.map +1 -1
- package/build/commonjs/Toolbar/ToolbarProps.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 +18 -22
- package/build/commonjs/Tooltip/Tooltip.js.map +1 -1
- package/build/commonjs/Tooltip/TooltipProps.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 +21 -13
- 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 +4 -4
- 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 +20 -13
- 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 +1 -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 +6 -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/Modal/Modal.js +1 -1
- package/build/module/Modal/Modal.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 +71 -0
- package/build/module/Tabs/useTabsStyle.js.map +1 -0
- package/build/module/TextField/TextField.js +60 -15
- 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 +20 -12
- package/build/module/Toolbar/Toolbar.js.map +1 -1
- package/build/module/Toolbar/ToolbarProps.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 +11 -14
- package/build/module/Tooltip/Tooltip.js.map +1 -1
- package/build/module/Tooltip/TooltipProps.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 +22 -13
- 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 +4 -4
- 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/Toolbar/ToolbarProps.d.ts +0 -5
- package/build/typescript/Tooltip/Beaks/index.d.ts +4 -0
- package/build/typescript/Tooltip/TooltipProps.d.ts +2 -2
- 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 +2 -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 +23 -14
- package/src/Accordion/AccordionProps.ts +4 -2
- package/src/Accordion/useVariantStyleMap.ts +14 -6
- package/src/AppBar/AppBar.tsx +2 -2
- 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 +5 -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/Modal/Modal.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 +79 -0
- package/src/TextField/TextField.tsx +99 -45
- 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 +26 -17
- package/src/Toolbar/ToolbarProps.ts +0 -6
- package/src/Tooltip/Beaks/index.ts +4 -0
- package/src/Tooltip/Tooltip.tsx +10 -12
- package/src/Tooltip/TooltipProps.ts +2 -2
- 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 +27 -24
- package/src/hooks/useContentContainerStyle.ts +43 -31
- package/src/hooks/useFadeInAppBar.ts +4 -4
- 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
|
@@ -33,6 +33,8 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
33
33
|
|
|
34
34
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
35
35
|
|
|
36
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
37
|
+
|
|
36
38
|
const ROTATE_HIDE_DEGREE = 0;
|
|
37
39
|
const ROTATE_SHOW_DEGREE = 180;
|
|
38
40
|
const ANIMATION_CONFIG = {
|
|
@@ -64,7 +66,9 @@ function Accordion(props) {
|
|
|
64
66
|
RightIcon,
|
|
65
67
|
LeftComponent,
|
|
66
68
|
isInitialExpanded = false,
|
|
67
|
-
|
|
69
|
+
style: styleProp,
|
|
70
|
+
variant = 'solid',
|
|
71
|
+
...otherProps
|
|
68
72
|
} = props;
|
|
69
73
|
const styles = useStyles();
|
|
70
74
|
const theme = (0, _styles2.useTheme)();
|
|
@@ -75,6 +79,7 @@ function Accordion(props) {
|
|
|
75
79
|
container: containerStyle,
|
|
76
80
|
content: contentStyle,
|
|
77
81
|
contentFont: contentFontStyle,
|
|
82
|
+
iconContainer: iconContainerStyle,
|
|
78
83
|
subTitleFont: subTitleFontStyle,
|
|
79
84
|
title: titleStyle,
|
|
80
85
|
titleFont: titleFontStyle
|
|
@@ -87,14 +92,14 @@ function Accordion(props) {
|
|
|
87
92
|
transform: [{
|
|
88
93
|
rotate: `${rotate.value}deg`
|
|
89
94
|
}]
|
|
90
|
-
}), []);
|
|
95
|
+
}), [rotate]);
|
|
91
96
|
const animatedContentBackgroundStyles = (0, _reactNativeReanimated.useAnimatedStyle)(() => ({
|
|
92
97
|
height: animatedHeight.value,
|
|
93
98
|
overflow: 'hidden'
|
|
94
|
-
}), []);
|
|
99
|
+
}), [animatedHeight]);
|
|
95
100
|
const animatedContentStyle = (0, _reactNativeReanimated.useAnimatedStyle)(() => ({
|
|
96
101
|
opacity: animatedOpacity.value
|
|
97
|
-
}), []);
|
|
102
|
+
}), [animatedOpacity]);
|
|
98
103
|
|
|
99
104
|
const onPress = () => {
|
|
100
105
|
setIsExpanded(prev => !prev);
|
|
@@ -115,10 +120,10 @@ function Accordion(props) {
|
|
|
115
120
|
animatedHeight.value = (0, _reactNativeReanimated.withTiming)(isExpanded ? contentHeight : 0, ANIMATION_CONFIG);
|
|
116
121
|
animatedOpacity.value = isExpanded ? (0, _reactNativeReanimated.withDelay)(CONTENT_OPACITY_DELAY_MILLIS, (0, _reactNativeReanimated.withTiming)(1, ANIMATION_CONFIG)) : (0, _reactNativeReanimated.withTiming)(0, ANIMATION_CONFIG);
|
|
117
122
|
}, [isExpanded, contentHeight]);
|
|
118
|
-
const rootStyle = (0, _styles.css)([styles.root, containerStyle]);
|
|
119
|
-
return /*#__PURE__*/_react.default.createElement(_Column.default, {
|
|
123
|
+
const rootStyle = (0, _styles.css)([styles.root, containerStyle, styleProp]);
|
|
124
|
+
return /*#__PURE__*/_react.default.createElement(_Column.default, _extends({
|
|
120
125
|
style: rootStyle
|
|
121
|
-
}, /*#__PURE__*/_react.default.createElement(_ButtonBase.default, {
|
|
126
|
+
}, otherProps), /*#__PURE__*/_react.default.createElement(_ButtonBase.default, {
|
|
122
127
|
onPress: onPress
|
|
123
128
|
}, /*#__PURE__*/_react.default.createElement(_Row.default, {
|
|
124
129
|
style: titleStyle
|
|
@@ -126,24 +131,26 @@ function Accordion(props) {
|
|
|
126
131
|
flexShrink: 1
|
|
127
132
|
}, /*#__PURE__*/_react.default.createElement(_Row.default, {
|
|
128
133
|
alignItems: 'center'
|
|
129
|
-
}, LeftComponent ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null,
|
|
134
|
+
}, LeftComponent ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
135
|
+
style: iconContainerStyle
|
|
136
|
+
}, LeftComponent), /*#__PURE__*/_react.default.createElement(_Spacer.default, {
|
|
130
137
|
size: 1.5
|
|
131
138
|
})) : null, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
|
|
132
139
|
allowFontScaling: false,
|
|
133
140
|
children: title,
|
|
134
|
-
numberOfLines:
|
|
141
|
+
numberOfLines: 3,
|
|
135
142
|
style: titleFontStyle
|
|
136
|
-
})), subTitle && variant === 'solid' ?
|
|
143
|
+
})), subTitle && variant === 'solid' ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_Spacer.default, {
|
|
137
144
|
size: 1.5
|
|
138
|
-
}), /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
|
|
145
|
+
}), typeof subTitle === 'string' ? /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
|
|
139
146
|
allowFontScaling: false,
|
|
140
147
|
children: subTitle,
|
|
141
148
|
numberOfLines: 1,
|
|
142
149
|
style: subTitleFontStyle
|
|
143
|
-
})
|
|
150
|
+
}) : subTitle) : null), /*#__PURE__*/_react.default.createElement(_Spacer.default, {
|
|
144
151
|
flex: 1
|
|
145
152
|
}), /*#__PURE__*/_react.default.createElement(_Spacer.default, {
|
|
146
|
-
size:
|
|
153
|
+
size: 4
|
|
147
154
|
}), /*#__PURE__*/_react.default.createElement(_reactNativeReanimated.default.View, {
|
|
148
155
|
style: animatedChevronDownStyles
|
|
149
156
|
}, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["ROTATE_HIDE_DEGREE","ROTATE_SHOW_DEGREE","ANIMATION_CONFIG","duration","INITIAL_EXPANDED_DELAY_MILLIS","CONTENT_OPACITY_DELAY_MILLIS","useStyles","theme","useTheme","root","marginBottom","spacing","rightIcon","alignItems","height","justifyContent","width","Accordion","props","title","subTitle","content","RightIcon","LeftComponent","isInitialExpanded","variant","styles","CONTENT_MARGIN_HEIGHT","isExpanded","setIsExpanded","useState","shouldInitialExpandedRef","useRef","container","containerStyle","contentStyle","contentFont","contentFontStyle","subTitleFont","subTitleFontStyle","titleStyle","titleFont","titleFontStyle","useVariantStyleMap","rotate","useSharedValue","animatedOpacity","animatedHeight","contentHeight","setContentHeight","animatedChevronDownStyles","useAnimatedStyle","transform","value","animatedContentBackgroundStyles","overflow","animatedContentStyle","opacity","onPress","prev","onLayout","event","nativeEvent","layout","current","setTimeout","useEffect","withTiming","withDelay","rootStyle","css"],"sources":["Accordion.tsx"],"sourcesContent":["import React, { useEffect, useRef, useState } from 'react';\nimport { LayoutChangeEvent, Text, View, ViewStyle } from 'react-native';\nimport Animated, {\n useAnimatedStyle,\n useSharedValue,\n withDelay,\n withTiming,\n WithTimingConfig,\n} from 'react-native-reanimated';\nimport { css, NamedStylesStringUnion, UseStyles } from '@fountain-ui/styles';\nimport { useTheme } from '../styles';\nimport { ChevronDown } from '../internal/icons';\nimport ButtonBase from '../ButtonBase';\nimport Column from '../Column';\nimport Row from '../Row';\nimport Spacer from '../Spacer';\nimport type AccordionProps from './AccordionProps';\nimport type { AccordionVariant } from './AccordionProps';\nimport useVariantStyleMap from './useVariantStyleMap';\n\ntype AccordionStyles = NamedStylesStringUnion<'root' | 'rightIcon'>;\n\nconst ROTATE_HIDE_DEGREE = 0;\nconst ROTATE_SHOW_DEGREE = 180;\nconst ANIMATION_CONFIG: Readonly<WithTimingConfig> = { duration: 200 };\nconst INITIAL_EXPANDED_DELAY_MILLIS = 100;\nconst CONTENT_OPACITY_DELAY_MILLIS = 200;\n\nconst useStyles: UseStyles<AccordionStyles> = function (): AccordionStyles {\n const theme = useTheme();\n\n return {\n root: { marginBottom: theme.spacing(3) },\n rightIcon: {\n alignItems: 'center',\n height: 32,\n justifyContent: 'center',\n width: 32,\n },\n };\n};\n\nexport default function Accordion(props: AccordionProps) {\n const {\n title,\n subTitle,\n content,\n RightIcon,\n LeftComponent,\n isInitialExpanded = false,\n variant = 'solid' as AccordionVariant,\n } = props;\n\n const styles = useStyles();\n const theme = useTheme();\n const CONTENT_MARGIN_HEIGHT = theme.spacing(2);\n\n const [isExpanded, setIsExpanded] = useState<boolean>(false);\n const shouldInitialExpandedRef = useRef<boolean>(isInitialExpanded);\n\n const {\n container: containerStyle,\n content: contentStyle,\n contentFont: contentFontStyle,\n subTitleFont: subTitleFontStyle,\n title: titleStyle,\n titleFont: titleFontStyle,\n } = useVariantStyleMap(variant);\n\n const rotate = useSharedValue(ROTATE_HIDE_DEGREE);\n const animatedOpacity = useSharedValue(0);\n\n const animatedHeight = useSharedValue(0);\n const [contentHeight, setContentHeight] = useState(0);\n\n const animatedChevronDownStyles = useAnimatedStyle(() => ({\n transform: [{ rotate: `${rotate.value}deg` }],\n }), []);\n\n const animatedContentBackgroundStyles = useAnimatedStyle(() => ({\n height: animatedHeight.value,\n overflow: 'hidden',\n } as ViewStyle), []);\n\n const animatedContentStyle = useAnimatedStyle(() => ({\n opacity: animatedOpacity.value,\n }), []);\n\n const onPress = () => {\n setIsExpanded(prev => !prev);\n };\n\n const onLayout = (event: LayoutChangeEvent) => {\n const height = event.nativeEvent.layout.height + CONTENT_MARGIN_HEIGHT;\n setContentHeight(height);\n\n if (shouldInitialExpandedRef.current) {\n shouldInitialExpandedRef.current = false;\n setTimeout(() => setIsExpanded(true), INITIAL_EXPANDED_DELAY_MILLIS);\n }\n };\n\n useEffect(() => {\n rotate.value = withTiming(isExpanded ? ROTATE_SHOW_DEGREE : ROTATE_HIDE_DEGREE, ANIMATION_CONFIG);\n\n animatedHeight.value = withTiming(isExpanded ? contentHeight : 0, ANIMATION_CONFIG);\n\n animatedOpacity.value = isExpanded\n ? withDelay(CONTENT_OPACITY_DELAY_MILLIS, withTiming(1, ANIMATION_CONFIG))\n : withTiming(0, ANIMATION_CONFIG);\n }, [isExpanded, contentHeight]);\n\n const rootStyle = css([\n styles.root,\n containerStyle,\n ]);\n\n return (\n <Column style={rootStyle}>\n <ButtonBase onPress={onPress}>\n <Row style={titleStyle}>\n <Column flexShrink={1}>\n <Row alignItems={'center'}>\n {LeftComponent ? (\n <React.Fragment>\n {LeftComponent}\n\n <Spacer size={1.5}/>\n </React.Fragment>\n ) : null}\n\n <Text\n allowFontScaling={false}\n children={title}\n numberOfLines={1}\n style={titleFontStyle}\n />\n </Row>\n\n {subTitle && variant === 'solid' ?\n typeof subTitle === 'string' ? (\n <React.Fragment>\n <Spacer size={1.5}/>\n\n <Text\n allowFontScaling={false}\n children={subTitle}\n numberOfLines={1}\n style={subTitleFontStyle}\n />\n </React.Fragment>\n ) : (subTitle)\n : null}\n </Column>\n\n <Spacer flex={1}/>\n\n <Spacer size={3}/>\n\n <Animated.View style={animatedChevronDownStyles}>\n <View style={styles.rightIcon}>\n {RightIcon ? RightIcon : (\n <ChevronDown\n width={16}\n height={16}\n color={'base'}\n />\n )}\n </View>\n </Animated.View>\n </Row>\n </ButtonBase>\n\n <Animated.View style={animatedContentBackgroundStyles}>\n <View\n onLayout={onLayout}\n style={contentStyle}\n >\n <Animated.View style={animatedContentStyle}>\n {typeof content === 'string' ? (\n <Text\n allowFontScaling={false}\n children={content}\n style={contentFontStyle}\n />\n ) : (content)}\n </Animated.View>\n </View>\n </Animated.View>\n </Column>\n );\n}\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AAOA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAGA;;;;;;;;AAIA,MAAMA,kBAAkB,GAAG,CAA3B;AACA,MAAMC,kBAAkB,GAAG,GAA3B;AACA,MAAMC,gBAA4C,GAAG;EAAEC,QAAQ,EAAE;AAAZ,CAArD;AACA,MAAMC,6BAA6B,GAAG,GAAtC;AACA,MAAMC,4BAA4B,GAAG,GAArC;;AAEA,MAAMC,SAAqC,GAAG,YAA6B;EACvE,MAAMC,KAAK,GAAG,IAAAC,iBAAA,GAAd;EAEA,OAAO;IACHC,IAAI,EAAE;MAAEC,YAAY,EAAEH,KAAK,CAACI,OAAN,CAAc,CAAd;IAAhB,CADH;IAEHC,SAAS,EAAE;MACPC,UAAU,EAAE,QADL;MAEPC,MAAM,EAAE,EAFD;MAGPC,cAAc,EAAE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I,KAAK,EAAE;EAHX,EAFR,CADJ,CAvCJ,CADJ,CADJ,eAuDI,6BAAC,8BAAD,CAAU,IAAV;IAAe,KAAK,EAAEgC;EAAtB,gBACI,6BAAC,iBAAD;IACI,QAAQ,EAAEM,QADd;IAEI,KAAK,EAAEzB;EAFX,gBAII,6BAAC,8BAAD,CAAU,IAAV;IAAe,KAAK,EAAEqB;EAAtB,GACK,OAAOnC,OAAP,KAAmB,QAAnB,gBACG,6BAAC,iBAAD;IACI,gBAAgB,EAAE,KADtB;IAEI,QAAQ,EAAEA,OAFd;IAGI,KAAK,EAAEgB;EAHX,EADH,GAMIhB,OAPT,CAJJ,CADJ,CAvDJ,CADJ;AA0EH"}
|
|
1
|
+
{"version":3,"names":["ROTATE_HIDE_DEGREE","ROTATE_SHOW_DEGREE","ANIMATION_CONFIG","duration","INITIAL_EXPANDED_DELAY_MILLIS","CONTENT_OPACITY_DELAY_MILLIS","useStyles","theme","useTheme","root","marginBottom","spacing","rightIcon","alignItems","height","justifyContent","width","Accordion","props","title","subTitle","content","RightIcon","LeftComponent","isInitialExpanded","style","styleProp","variant","otherProps","styles","CONTENT_MARGIN_HEIGHT","isExpanded","setIsExpanded","useState","shouldInitialExpandedRef","useRef","container","containerStyle","contentStyle","contentFont","contentFontStyle","iconContainer","iconContainerStyle","subTitleFont","subTitleFontStyle","titleStyle","titleFont","titleFontStyle","useVariantStyleMap","rotate","useSharedValue","animatedOpacity","animatedHeight","contentHeight","setContentHeight","animatedChevronDownStyles","useAnimatedStyle","transform","value","animatedContentBackgroundStyles","overflow","animatedContentStyle","opacity","onPress","prev","onLayout","event","nativeEvent","layout","current","setTimeout","useEffect","withTiming","withDelay","rootStyle","css"],"sources":["Accordion.tsx"],"sourcesContent":["import React, { useEffect, useRef, useState } from 'react';\nimport { LayoutChangeEvent, Text, View, ViewStyle } from 'react-native';\nimport Animated, {\n useAnimatedStyle,\n useSharedValue,\n withDelay,\n withTiming,\n WithTimingConfig,\n} from 'react-native-reanimated';\nimport { css, NamedStylesStringUnion, UseStyles } from '@fountain-ui/styles';\nimport { useTheme } from '../styles';\nimport { ChevronDown } from '../internal/icons';\nimport ButtonBase from '../ButtonBase';\nimport Column from '../Column';\nimport Row from '../Row';\nimport Spacer from '../Spacer';\nimport type AccordionProps from './AccordionProps';\nimport type { AccordionVariant } from './AccordionProps';\nimport useVariantStyleMap from './useVariantStyleMap';\n\ntype AccordionStyles = NamedStylesStringUnion<'root' | 'rightIcon'>;\n\nconst ROTATE_HIDE_DEGREE = 0;\nconst ROTATE_SHOW_DEGREE = 180;\nconst ANIMATION_CONFIG: Readonly<WithTimingConfig> = { duration: 200 };\nconst INITIAL_EXPANDED_DELAY_MILLIS = 100;\nconst CONTENT_OPACITY_DELAY_MILLIS = 200;\n\nconst useStyles: UseStyles<AccordionStyles> = function (): AccordionStyles {\n const theme = useTheme();\n\n return {\n root: { marginBottom: theme.spacing(3) },\n rightIcon: {\n alignItems: 'center',\n height: 32,\n justifyContent: 'center',\n width: 32,\n },\n };\n};\n\nexport default function Accordion(props: AccordionProps) {\n const {\n title,\n subTitle,\n content,\n RightIcon,\n LeftComponent,\n isInitialExpanded = false,\n style: styleProp,\n variant = 'solid' as AccordionVariant,\n ...otherProps\n } = props;\n\n const styles = useStyles();\n const theme = useTheme();\n const CONTENT_MARGIN_HEIGHT = theme.spacing(2);\n\n const [isExpanded, setIsExpanded] = useState<boolean>(false);\n const shouldInitialExpandedRef = useRef<boolean>(isInitialExpanded);\n\n const {\n container: containerStyle,\n content: contentStyle,\n contentFont: contentFontStyle,\n iconContainer: iconContainerStyle,\n subTitleFont: subTitleFontStyle,\n title: titleStyle,\n titleFont: titleFontStyle,\n } = useVariantStyleMap(variant);\n\n const rotate = useSharedValue(ROTATE_HIDE_DEGREE);\n const animatedOpacity = useSharedValue(0);\n\n const animatedHeight = useSharedValue(0);\n const [contentHeight, setContentHeight] = useState(0);\n\n const animatedChevronDownStyles = useAnimatedStyle(() => ({\n transform: [{ rotate: `${rotate.value}deg` }],\n }), [rotate]);\n\n const animatedContentBackgroundStyles = useAnimatedStyle(() => ({\n height: animatedHeight.value,\n overflow: 'hidden',\n } as ViewStyle), [animatedHeight]);\n\n const animatedContentStyle = useAnimatedStyle(() => ({\n opacity: animatedOpacity.value,\n }), [animatedOpacity]);\n\n const onPress = () => {\n setIsExpanded(prev => !prev);\n };\n\n const onLayout = (event: LayoutChangeEvent) => {\n const height = event.nativeEvent.layout.height + CONTENT_MARGIN_HEIGHT;\n setContentHeight(height);\n\n if (shouldInitialExpandedRef.current) {\n shouldInitialExpandedRef.current = false;\n setTimeout(() => setIsExpanded(true), INITIAL_EXPANDED_DELAY_MILLIS);\n }\n };\n\n useEffect(() => {\n rotate.value = withTiming(isExpanded ? ROTATE_SHOW_DEGREE : ROTATE_HIDE_DEGREE, ANIMATION_CONFIG);\n\n animatedHeight.value = withTiming(isExpanded ? contentHeight : 0, ANIMATION_CONFIG);\n\n animatedOpacity.value = isExpanded\n ? withDelay(CONTENT_OPACITY_DELAY_MILLIS, withTiming(1, ANIMATION_CONFIG))\n : withTiming(0, ANIMATION_CONFIG);\n }, [isExpanded, contentHeight]);\n\n const rootStyle = css([\n styles.root,\n containerStyle,\n styleProp,\n ]);\n\n return (\n <Column\n style={rootStyle}\n {...otherProps}\n >\n <ButtonBase onPress={onPress}>\n <Row style={titleStyle}>\n <Column flexShrink={1}>\n <Row alignItems={'center'}>\n {LeftComponent ? (\n <React.Fragment>\n <View style={iconContainerStyle}>\n {LeftComponent}\n </View>\n\n <Spacer size={1.5}/>\n </React.Fragment>\n ) : null}\n\n <Text\n allowFontScaling={false}\n children={title}\n numberOfLines={3}\n style={titleFontStyle}\n />\n </Row>\n\n {subTitle && variant === 'solid' ? (\n <React.Fragment>\n <Spacer size={1.5}/>\n\n {typeof subTitle === 'string' ? (\n <Text\n allowFontScaling={false}\n children={subTitle}\n numberOfLines={1}\n style={subTitleFontStyle}\n />\n ) : (subTitle)}\n </React.Fragment>\n ) : null}\n </Column>\n\n <Spacer flex={1}/>\n\n <Spacer size={4}/>\n\n <Animated.View style={animatedChevronDownStyles}>\n <View style={styles.rightIcon}>\n {RightIcon ? RightIcon : (\n <ChevronDown\n width={16}\n height={16}\n color={'base'}\n />\n )}\n </View>\n </Animated.View>\n </Row>\n </ButtonBase>\n\n <Animated.View style={animatedContentBackgroundStyles}>\n <View\n onLayout={onLayout}\n style={contentStyle}\n >\n <Animated.View style={animatedContentStyle}>\n {typeof content === 'string' ? (\n <Text\n allowFontScaling={false}\n children={content}\n style={contentFontStyle}\n />\n ) : (content)}\n </Animated.View>\n </View>\n </Animated.View>\n </Column>\n );\n}\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AAOA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAGA;;;;;;;;;;AAIA,MAAMA,kBAAkB,GAAG,CAA3B;AACA,MAAMC,kBAAkB,GAAG,GAA3B;AACA,MAAMC,gBAA4C,GAAG;EAAEC,QAAQ,EAAE;AAAZ,CAArD;AACA,MAAMC,6BAA6B,GAAG,GAAtC;AACA,MAAMC,4BAA4B,GAAG,GAArC;;AAEA,MAAMC,SAAqC,GAAG,YAA6B;EACvE,MAAMC,KAAK,GAAG,IAAAC,iBAAA,GAAd;EAEA,OAAO;IACHC,IAAI,EAAE;MAAEC,YAAY,EAAEH,KAAK,CAACI,OAAN,CAAc,CAAd;IAAhB,CADH;IAEHC,SAAS,EAAE;MACPC,UAAU,EAAE,QADL;MAEPC,MAAM,EAAE,EAFD;MAGPC,cAAc,EAAE,QAHT;MAIPC,KAAK,EAAE;IAJA;EAFR,CAAP;AASH,CAZD;;AAce,SAASC,SAAT,CAAmBC,KAAnB,EAA0C;EACrD,MAAM;IACFC,KADE;IAEFC,QAFE;IAGFC,OAHE;IAIFC,SAJE;IAKFC,aALE;IAMFC,iBAAiB,GAAG,KANlB;IAOFC,KAAK,EAAEC,SAPL;IAQFC,OAAO,GAAG,OARR;IASF,GAAGC;EATD,IAUFV,KAVJ;EAYA,MA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qC;EAAtB,gBACI,6BAAC,iBAAD;IACI,QAAQ,EAAEM,QADd;IAEI,KAAK,EAAE3B;EAFX,gBAII,6BAAC,8BAAD,CAAU,IAAV;IAAe,KAAK,EAAEuB;EAAtB,GACK,OAAOxC,OAAP,KAAmB,QAAnB,gBACG,6BAAC,iBAAD;IACI,gBAAgB,EAAE,KADtB;IAEI,QAAQ,EAAEA,OAFd;IAGI,KAAK,EAAEmB;EAHX,EADH,GAMInB,OAPT,CAJJ,CADJ,CA5DJ,CADJ;AA+EH"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["accordionVariants"],"sources":["AccordionProps.ts"],"sourcesContent":["import React from 'react';\n\nexport const accordionVariants = ['solid', 'line', 'underline'] as const;\nexport type AccordionVariant = typeof accordionVariants[number];\n\nexport default interface AccordionProps {\n /**\n * The title of the component.\n */\n title: string | React.ReactNode;\n\n /**\n * The subtitle of the component. (Only for solid variant)\n */\n subTitle?: string | React.ReactNode;\n\n /**\n * The component to the left of the title.\n */\n LeftComponent?: React.ReactNode;\n\n /**\n * The icon to the right of the title.\n */\n RightIcon?: React.ReactElement;\n\n /**\n * The content of the component.\n */\n content: string | React.ReactNode;\n\n /**\n * The initial state of expanding\n * @default false\n */\n isInitialExpanded?: boolean;\n\n /**\n * Determines design variations of the component.\n * @default 'solid'\n */\n variant: AccordionVariant;\n}\n"],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"names":["accordionVariants"],"sources":["AccordionProps.ts"],"sourcesContent":["import React from 'react';\nimport type { ColumnProps } from '../Column';\nimport type { OverridableComponentProps } from '../types';\n\nexport const accordionVariants = ['solid', 'line', 'underline'] as const;\nexport type AccordionVariant = typeof accordionVariants[number];\n\nexport default interface AccordionProps extends OverridableComponentProps<Omit<ColumnProps, 'children'>, {\n /**\n * The title of the component.\n */\n title: string | React.ReactNode;\n\n /**\n * The subtitle of the component. (Only for solid variant)\n */\n subTitle?: string | React.ReactNode;\n\n /**\n * The component to the left of the title.\n */\n LeftComponent?: React.ReactNode;\n\n /**\n * The icon to the right of the title.\n */\n RightIcon?: React.ReactElement;\n\n /**\n * The content of the component.\n */\n content: string | React.ReactNode;\n\n /**\n * The initial state of expanding\n * @default false\n */\n isInitialExpanded?: boolean;\n\n /**\n * Determines design variations of the component.\n * @default 'solid'\n */\n variant: AccordionVariant;\n}> {}\n"],"mappings":";;;;;;AAIO,MAAMA,iBAAiB,GAAG,CAAC,OAAD,EAAU,MAAV,EAAkB,WAAlB,CAA1B"}
|
|
@@ -25,10 +25,12 @@ function useVariantStyleMap(variant) {
|
|
|
25
25
|
content: {
|
|
26
26
|
borderTopColor: theme.palette.border.weak,
|
|
27
27
|
borderTopWidth: 0.5,
|
|
28
|
+
left: 0,
|
|
28
29
|
marginHorizontal: theme.spacing(4),
|
|
29
30
|
paddingBottom: theme.spacing(5),
|
|
30
31
|
paddingTop: theme.spacing(4),
|
|
31
|
-
position: 'absolute'
|
|
32
|
+
position: 'absolute',
|
|
33
|
+
right: 0
|
|
32
34
|
},
|
|
33
35
|
contentFont: (0, _styles2.createFontStyle)(theme, {
|
|
34
36
|
selector: typography => typography.body3.regular,
|
|
@@ -46,9 +48,9 @@ function useVariantStyleMap(variant) {
|
|
|
46
48
|
},
|
|
47
49
|
titleFont: (0, _styles2.createFontStyle)(theme, {
|
|
48
50
|
selector: _ => (0, _styles.typographyOf)({
|
|
49
|
-
fontSize:
|
|
50
|
-
lineHeight:
|
|
51
|
-
fontFamily: '
|
|
51
|
+
fontSize: 16,
|
|
52
|
+
lineHeight: 20.8,
|
|
53
|
+
fontFamily: 'PretendardStd-SemiBold',
|
|
52
54
|
letterSpacing: 0
|
|
53
55
|
}),
|
|
54
56
|
color: theme.palette.text.strong
|
|
@@ -65,15 +67,20 @@ function useVariantStyleMap(variant) {
|
|
|
65
67
|
content: {
|
|
66
68
|
borderTopColor: theme.palette.border.weak,
|
|
67
69
|
borderTopWidth: 0.5,
|
|
70
|
+
left: 0,
|
|
68
71
|
marginHorizontal: theme.spacing(4),
|
|
69
72
|
paddingBottom: theme.spacing(4),
|
|
70
73
|
paddingTop: theme.spacing(3),
|
|
71
|
-
position: 'absolute'
|
|
74
|
+
position: 'absolute',
|
|
75
|
+
right: 0
|
|
72
76
|
},
|
|
73
77
|
contentFont: (0, _styles2.createFontStyle)(theme, {
|
|
74
78
|
selector: typography => typography.caption2.regular,
|
|
75
79
|
color: theme.palette.text.base
|
|
76
80
|
}),
|
|
81
|
+
iconContainer: {
|
|
82
|
+
paddingTop: 1
|
|
83
|
+
},
|
|
77
84
|
title: {
|
|
78
85
|
alignItems: 'center',
|
|
79
86
|
paddingBottom: theme.spacing(1),
|
|
@@ -112,9 +119,9 @@ function useVariantStyleMap(variant) {
|
|
|
112
119
|
},
|
|
113
120
|
titleFont: (0, _styles2.createFontStyle)(theme, {
|
|
114
121
|
selector: _ => (0, _styles.typographyOf)({
|
|
115
|
-
fontSize:
|
|
116
|
-
lineHeight:
|
|
117
|
-
fontFamily: '
|
|
122
|
+
fontSize: 16,
|
|
123
|
+
lineHeight: 20.8,
|
|
124
|
+
fontFamily: 'PretendardStd-SemiBold',
|
|
118
125
|
letterSpacing: 0
|
|
119
126
|
}),
|
|
120
127
|
color: theme.palette.text.strong
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useVariantStyleMap","variant","theme","useTheme","useMemo","container","backgroundColor","palette","surface","supportive","borderRadius","shape","radius","md","content","borderTopColor","border","weak","borderTopWidth","marginHorizontal","spacing","paddingBottom","paddingTop","position","contentFont","createFontStyle","selector","typography","body3","regular","color","text","base","subTitleFont","caption1","title","alignItems","paddingLeft","paddingRight","paddingVertical","titleFont","_","typographyOf","fontSize","lineHeight","fontFamily","letterSpacing","strong","borderColor","borderWidth","caption2","caption1short","semiBold","borderBottomColor","borderBottomWidth"],"sources":["useVariantStyleMap.ts"],"sourcesContent":["import { useMemo } from 'react';\nimport type { TextStyle } from 'react-native';\nimport type { FountainUiStyle } from '@fountain-ui/styles';\nimport { typographyOf } from '@fountain-ui/styles';\nimport { createFontStyle, useTheme } from '../styles';\nimport type { AccordionVariant } from './AccordionProps';\n\ninterface VariantStyle {\n container: FountainUiStyle;\n content: FountainUiStyle;\n contentFont: TextStyle;\n subTitleFont?: TextStyle;\n title: FountainUiStyle;\n titleFont: TextStyle;\n}\n\nexport default function useVariantStyleMap(variant: AccordionVariant): VariantStyle {\n const theme = useTheme();\n\n return useMemo(() => {\n switch (variant) {\n default:\n case 'solid':\n return {\n container: {\n backgroundColor: theme.palette.surface.supportive,\n borderRadius: theme.shape.radius.md,\n },\n content: {\n borderTopColor: theme.palette.border.weak,\n borderTopWidth: 0.5,\n marginHorizontal: theme.spacing(4),\n paddingBottom: theme.spacing(5),\n paddingTop: theme.spacing(4),\n position: 'absolute',\n },\n contentFont: createFontStyle(theme, {\n selector: (typography) => typography.body3.regular,\n color: theme.palette.text.base,\n }),\n subTitleFont: createFontStyle(theme, {\n selector: (typography) => typography.caption1.regular,\n color: theme.palette.text.base,\n }),\n title: {\n alignItems: 'center',\n paddingLeft: theme.spacing(4),\n paddingRight: theme.spacing(2),\n paddingVertical: theme.spacing(4),\n },\n titleFont: createFontStyle(theme, {\n selector: (_) => typographyOf({\n fontSize: 15,\n lineHeight: 19.5,\n fontFamily: 'Pretendard-SemiBold',\n letterSpacing: 0,\n }),\n color: theme.palette.text.strong,\n }),\n };\n case 'line':\n return {\n container: {\n borderColor: theme.palette.border.weak,\n borderRadius: theme.shape.radius.md,\n borderWidth: 1,\n },\n content: {\n borderTopColor: theme.palette.border.weak,\n borderTopWidth: 0.5,\n marginHorizontal: theme.spacing(4),\n paddingBottom: theme.spacing(4),\n paddingTop: theme.spacing(3),\n position: 'absolute',\n },\n contentFont: createFontStyle(theme, {\n selector: (typography) => typography.caption2.regular,\n color: theme.palette.text.base,\n }),\n title: {\n alignItems: 'center',\n paddingBottom: theme.spacing(1),\n paddingLeft: theme.spacing(4),\n paddingRight: theme.spacing(2),\n paddingTop: theme.spacing(0.75),\n },\n titleFont: createFontStyle(theme, {\n selector: (typography) => typography.caption1short.semiBold,\n color: theme.palette.text.base,\n }),\n };\n case 'underline':\n return {\n container: {\n borderBottomColor: theme.palette.border.weak,\n borderBottomWidth: 1,\n },\n content: {\n borderTopColor: theme.palette.border.weak,\n borderTopWidth: 0.5,\n paddingBottom: theme.spacing(5),\n paddingLeft: theme.spacing(0.5),\n paddingRight: theme.spacing(2),\n paddingTop: theme.spacing(4),\n },\n contentFont: createFontStyle(theme, {\n selector: (typography) => typography.body3.regular,\n color: theme.palette.text.base,\n }),\n title: {\n alignItems: 'center',\n paddingLeft: theme.spacing(0.5),\n paddingVertical: theme.spacing(2),\n },\n titleFont: createFontStyle(theme, {\n selector: (_) => typographyOf({\n fontSize: 15,\n lineHeight: 19.5,\n fontFamily: 'Pretendard-SemiBold',\n letterSpacing: 0,\n }),\n color: theme.palette.text.strong,\n }),\n };\n }\n }, [theme, variant]);\n}\n"],"mappings":";;;;;;;AAAA;;AAGA;;AACA;;AAYe,SAASA,kBAAT,CAA4BC,OAA5B,EAAqE;EAChF,MAAMC,KAAK,GAAG,IAAAC,iBAAA,GAAd;EAEA,OAAO,IAAAC,cAAA,EAAQ,MAAM;IACjB,QAAQH,OAAR;MACI;MACA,KAAK,OAAL;QACI,OAAO;UACHI,SAAS,EAAE;YACPC,eAAe,EAAEJ,KAAK,CAACK,OAAN,CAAcC,OAAd,CAAsBC,UADhC;YAEPC,YAAY,EAAER,KAAK,CAACS,KAAN,CAAYC,MAAZ,CAAmBC;UAF1B,CADR;UAKHC,OAAO,EAAE;YACLC,cAAc,EAAEb,KAAK,CAACK,OAAN,CAAcS,MAAd,CAAqBC,IADhC;YAELC,cAAc,EAAE,GAFX;YAGLC,gBAAgB,EAAEjB,KAAK,CAACkB,OAAN,CAAc,CAAd,CAHb;YAILC,aAAa,EAAEnB,KAAK,CAACkB,OAAN,CAAc,CAAd,CAJV;YAKLE,UAAU,EAAEpB,KAAK,CAACkB,OAAN,CAAc,CAAd,CALP;Y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KAAK,CAACK,OAAN,CAAcS,MAAd,CAAqBC,IADhC;YAELC,cAAc,EAAE,GAFX;YAGLG,aAAa,EAAEnB,KAAK,CAACkB,OAAN,CAAc,CAAd,CAHV;YAILiB,WAAW,EAAEnC,KAAK,CAACkB,OAAN,CAAc,GAAd,CAJR;YAKLkB,YAAY,EAAEpC,KAAK,CAACkB,OAAN,CAAc,CAAd,CALT;YAMLE,UAAU,EAAEpB,KAAK,CAACkB,OAAN,CAAc,CAAd;UANP,CALN;UAaHI,WAAW,EAAE,IAAAC,wBAAA,EAAgBvB,KAAhB,EAAuB;YAChCwB,QAAQ,EAAGC,UAAD,IAAgBA,UAAU,CAACC,KAAX,CAAiBC,OADX;YAEhCC,KAAK,EAAE5B,KAAK,CAACK,OAAN,CAAcwB,IAAd,CAAmBC;UAFM,CAAvB,CAbV;UAiBHG,KAAK,EAAE;YACHC,UAAU,EAAE,QADT;YAEHC,WAAW,EAAEnC,KAAK,CAACkB,OAAN,CAAc,GAAd,CAFV;YAGHmB,eAAe,EAAErC,KAAK,CAACkB,OAAN,CAAc,CAAd;UAHd,CAjBJ;UAsBHoB,SAAS,EAAE,IAAAf,wBAAA,EAAgBvB,KAAhB,EAAuB;YAC9BwB,QAAQ,EAAGe,CAAD,IAAO,IAAAC,oBAAA,EAAa;cAC1BC,QAAQ,EAAE,EADgB;cAE1BC,UAAU,EAAE,IAFc;cAG1BC,UAAU,EAAE,qBAHc;cAI1BC,aAAa,EAAE;YAJW,CAAb,CADa;YAO9BhB,KAAK,EAAE5B,KAAK,CAACK,OAAN,CAAcwB,IAAd,CAAmBgB;UAPI,CAAvB;QAtBR,CAAP;IAxER;EAyGH,CA1GM,EA0GJ,CAAC7C,KAAD,EAAQD,OAAR,CA1GI,CAAP;AA2GH"}
|
|
1
|
+
{"version":3,"names":["useVariantStyleMap","variant","theme","useTheme","useMemo","container","backgroundColor","palette","surface","supportive","borderRadius","shape","radius","md","content","borderTopColor","border","weak","borderTopWidth","left","marginHorizontal","spacing","paddingBottom","paddingTop","position","right","contentFont","createFontStyle","selector","typography","body3","regular","color","text","base","subTitleFont","caption1","title","alignItems","paddingLeft","paddingRight","paddingVertical","titleFont","_","typographyOf","fontSize","lineHeight","fontFamily","letterSpacing","strong","borderColor","borderWidth","caption2","iconContainer","caption1short","semiBold","borderBottomColor","borderBottomWidth"],"sources":["useVariantStyleMap.ts"],"sourcesContent":["import { useMemo } from 'react';\nimport type { TextStyle } from 'react-native';\nimport type { FountainUiStyle } from '@fountain-ui/styles';\nimport { typographyOf } from '@fountain-ui/styles';\nimport { createFontStyle, useTheme } from '../styles';\nimport type { AccordionVariant } from './AccordionProps';\n\ninterface VariantStyle {\n container: FountainUiStyle;\n content: FountainUiStyle;\n contentFont: TextStyle;\n iconContainer?: FountainUiStyle;\n subTitleFont?: TextStyle;\n title: FountainUiStyle;\n titleFont: TextStyle;\n}\n\nexport default function useVariantStyleMap(variant: AccordionVariant): VariantStyle {\n const theme = useTheme();\n\n return useMemo(() => {\n switch (variant) {\n default:\n case 'solid':\n return {\n container: {\n backgroundColor: theme.palette.surface.supportive,\n borderRadius: theme.shape.radius.md,\n },\n content: {\n borderTopColor: theme.palette.border.weak,\n borderTopWidth: 0.5,\n left: 0,\n marginHorizontal: theme.spacing(4),\n paddingBottom: theme.spacing(5),\n paddingTop: theme.spacing(4),\n position: 'absolute',\n right: 0,\n },\n contentFont: createFontStyle(theme, {\n selector: (typography) => typography.body3.regular,\n color: theme.palette.text.base,\n }),\n subTitleFont: createFontStyle(theme, {\n selector: (typography) => typography.caption1.regular,\n color: theme.palette.text.base,\n }),\n title: {\n alignItems: 'center',\n paddingLeft: theme.spacing(4),\n paddingRight: theme.spacing(2),\n paddingVertical: theme.spacing(4),\n },\n titleFont: createFontStyle(theme, {\n selector: (_) => typographyOf({\n fontSize: 16,\n lineHeight: 20.8,\n fontFamily: 'PretendardStd-SemiBold',\n letterSpacing: 0,\n }),\n color: theme.palette.text.strong,\n }),\n };\n case 'line':\n return {\n container: {\n borderColor: theme.palette.border.weak,\n borderRadius: theme.shape.radius.md,\n borderWidth: 1,\n },\n content: {\n borderTopColor: theme.palette.border.weak,\n borderTopWidth: 0.5,\n left: 0,\n marginHorizontal: theme.spacing(4),\n paddingBottom: theme.spacing(4),\n paddingTop: theme.spacing(3),\n position: 'absolute',\n right: 0,\n },\n contentFont: createFontStyle(theme, {\n selector: (typography) => typography.caption2.regular,\n color: theme.palette.text.base,\n }),\n iconContainer: {\n paddingTop: 1,\n },\n title: {\n alignItems: 'center',\n paddingBottom: theme.spacing(1),\n paddingLeft: theme.spacing(4),\n paddingRight: theme.spacing(2),\n paddingTop: theme.spacing(0.75),\n },\n titleFont: createFontStyle(theme, {\n selector: (typography) => typography.caption1short.semiBold,\n color: theme.palette.text.base,\n }),\n };\n case 'underline':\n return {\n container: {\n borderBottomColor: theme.palette.border.weak,\n borderBottomWidth: 1,\n },\n content: {\n borderTopColor: theme.palette.border.weak,\n borderTopWidth: 0.5,\n paddingBottom: theme.spacing(5),\n paddingLeft: theme.spacing(0.5),\n paddingRight: theme.spacing(2),\n paddingTop: theme.spacing(4),\n },\n contentFont: createFontStyle(theme, {\n selector: (typography) => typography.body3.regular,\n color: theme.palette.text.base,\n }),\n title: {\n alignItems: 'center',\n paddingLeft: theme.spacing(0.5),\n paddingVertical: theme.spacing(2),\n },\n titleFont: createFontStyle(theme, {\n selector: (_) => typographyOf({\n fontSize: 16,\n lineHeight: 20.8,\n fontFamily: 'PretendardStd-SemiBold',\n letterSpacing: 0,\n }),\n color: theme.palette.text.strong,\n }),\n };\n }\n }, [theme, variant]);\n}\n"],"mappings":";;;;;;;AAAA;;AAGA;;AACA;;AAae,SAASA,kBAAT,CAA4BC,OAA5B,EAAqE;EAChF,MAAMC,KAAK,GAAG,IAAAC,iBAAA,GAAd;EAEA,OAAO,IAAAC,cAAA,EAAQ,MAAM;IACjB,QAAQH,OAAR;MACI;MACA,KAAK,OAAL;QACI,OAAO;UACHI,SAAS,EAAE;YACPC,eAAe,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;UAHd,CAjBJ;UAsBHqB,SAAS,EAAE,IAAAf,wBAAA,EAAgBzB,KAAhB,EAAuB;YAC9B0B,QAAQ,EAAGe,CAAD,IAAO,IAAAC,oBAAA,EAAa;cAC1BC,QAAQ,EAAE,EADgB;cAE1BC,UAAU,EAAE,IAFc;cAG1BC,UAAU,EAAE,wBAHc;cAI1BC,aAAa,EAAE;YAJW,CAAb,CADa;YAO9BhB,KAAK,EAAE9B,KAAK,CAACK,OAAN,CAAc0B,IAAd,CAAmBgB;UAPI,CAAvB;QAtBR,CAAP;IA/ER;EAgHH,CAjHM,EAiHJ,CAAC/C,KAAD,EAAQD,OAAR,CAjHI,CAAP;AAkHH"}
|
|
@@ -36,7 +36,7 @@ const AppBar = /*#__PURE__*/_react.default.forwardRef(function AppBar(props, ref
|
|
|
36
36
|
const theme = (0, _styles.useTheme)();
|
|
37
37
|
const styles = useStyles();
|
|
38
38
|
const backgroundColorMap = {
|
|
39
|
-
default: theme.palette.background.
|
|
39
|
+
default: theme.palette.background.base,
|
|
40
40
|
alt: theme.palette.background.alt
|
|
41
41
|
};
|
|
42
42
|
const paperStyle = (0, _styles.css)([styles.root, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useStyles","theme","useTheme","root","flexDirection","flexShrink","width","zIndex","appBar","AppBar","React","forwardRef","props","ref","color","style","otherProps","styles","backgroundColorMap","default","palette","background","alt","paperStyle","css","backgroundColor"],"sources":["AppBar.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\nimport { NamedStylesStringUnion, UseStyles } from '@fountain-ui/styles';\nimport { css, useTheme } from '../styles';\nimport type AppBarProps from './AppBarProps';\nimport type { AppBarColor } from './AppBarProps';\n\ntype AppBarStyleKeys = 'root';\n\ntype AppBarStyles = NamedStylesStringUnion<AppBarStyleKeys>;\n\nconst useStyles: UseStyles<AppBarStyles> = function (): AppBarStyles {\n const theme = useTheme();\n\n return {\n root: {\n flexDirection: 'column',\n flexShrink: 0,\n width: '100%',\n zIndex: theme.zIndex.appBar,\n },\n };\n};\n\nconst AppBar = React.forwardRef<View, AppBarProps>(function AppBar(props, ref) {\n const {\n color = 'default',\n style,\n ...otherProps\n } = props;\n\n const theme = useTheme();\n\n const styles = useStyles();\n\n const backgroundColorMap: Record<AppBarColor, string> = {\n default: theme.palette.background.
|
|
1
|
+
{"version":3,"names":["useStyles","theme","useTheme","root","flexDirection","flexShrink","width","zIndex","appBar","AppBar","React","forwardRef","props","ref","color","style","otherProps","styles","backgroundColorMap","default","palette","background","base","alt","paperStyle","css","backgroundColor"],"sources":["AppBar.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\nimport type { NamedStylesStringUnion, UseStyles } from '@fountain-ui/styles';\nimport { css, useTheme } from '../styles';\nimport type AppBarProps from './AppBarProps';\nimport type { AppBarColor } from './AppBarProps';\n\ntype AppBarStyleKeys = 'root';\n\ntype AppBarStyles = NamedStylesStringUnion<AppBarStyleKeys>;\n\nconst useStyles: UseStyles<AppBarStyles> = function (): AppBarStyles {\n const theme = useTheme();\n\n return {\n root: {\n flexDirection: 'column',\n flexShrink: 0,\n width: '100%',\n zIndex: theme.zIndex.appBar,\n },\n };\n};\n\nconst AppBar = React.forwardRef<View, AppBarProps>(function AppBar(props, ref) {\n const {\n color = 'default',\n style,\n ...otherProps\n } = props;\n\n const theme = useTheme();\n\n const styles = useStyles();\n\n const backgroundColorMap: Record<AppBarColor, string> = {\n default: theme.palette.background.base,\n alt: theme.palette.background.alt,\n };\n\n const paperStyle = css([\n styles.root,\n { backgroundColor: backgroundColorMap[color] },\n style,\n ]);\n\n return (\n <View\n ref={ref}\n style={paperStyle}\n {...otherProps}\n />\n );\n});\n\nexport default AppBar;\n"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;;;;;AAQA,MAAMA,SAAkC,GAAG,YAA0B;EACjE,MAAMC,KAAK,GAAG,IAAAC,gBAAA,GAAd;EAEA,OAAO;IACHC,IAAI,EAAE;MACFC,aAAa,EAAE,QADb;MAEFC,UAAU,EAAE,CAFV;MAGFC,KAAK,EAAE,MAHL;MAIFC,MAAM,EAAEN,KAAK,CAACM,MAAN,CAAaC;IAJnB;EADH,CAAP;AAQH,CAXD;;AAaA,MAAMC,MAAM,gBAAGC,cAAA,CAAMC,UAAN,CAAoC,SAASF,MAAT,CAAgBG,KAAhB,EAAuBC,GAAvB,EAA4B;EAC3E,MAAM;IACFC,KAAK,GAAG,SADN;IAEFC,KAFE;IAGF,GAAGC;EAHD,IAIFJ,KAJJ;EAMA,MAAMX,KAAK,GAAG,IAAAC,gBAAA,GAAd;EAEA,MAAMe,MAAM,GAAGjB,SAAS,EAAxB;EAEA,MAAMkB,kBAA+C,GAAG;IACpDC,OAAO,EAAElB,KAAK,CAACmB,OAAN,CAAcC,UAAd,CAAyBC,IADkB;IAEpDC,GAAG,EAAEtB,KAAK,CAACmB,OAAN,CAAcC,UAAd,CAAyBE;EAFsB,CAAxD;EAKA,MAAMC,UAAU,GAAG,IAAAC,WAAA,EAAI,CACnBR,MAAM,CAACd,IADY,EAEnB;IAAEuB,eAAe,EAAER,kBAAkB,CAACJ,KAAD;EAArC,CAFmB,EAGnBC,KAHmB,CAAJ,CAAnB;EAMA,oBACI,6BAAC,iBAAD;IACI,GAAG,EAAEF,GADT;IAEI,KAAK,EAAEW;EAFX,GAGQR,UAHR,EADJ;AAOH,CA7Bc,CAAf;;eA+BeP,M"}
|
|
@@ -27,12 +27,13 @@ function Badge(props) {
|
|
|
27
27
|
children,
|
|
28
28
|
color = 'accent',
|
|
29
29
|
content,
|
|
30
|
+
horizontalOffset = 0,
|
|
30
31
|
invisible = false,
|
|
31
32
|
position = defaultPosition,
|
|
32
33
|
size = 'medium',
|
|
33
34
|
style: styleProp,
|
|
34
|
-
offset = 0,
|
|
35
35
|
variant = 'dot',
|
|
36
|
+
verticalOffset = 0,
|
|
36
37
|
...otherProps
|
|
37
38
|
} = props;
|
|
38
39
|
const {
|
|
@@ -41,8 +42,8 @@ function Badge(props) {
|
|
|
41
42
|
} = (0, _useVariantStyleMap.default)(variant, size, color);
|
|
42
43
|
const rootStyle = (0, _styles.css)([styleProp]);
|
|
43
44
|
const badgeStyle = (0, _styles.css)([baseBadgeStyle, {
|
|
44
|
-
[position.vertical]:
|
|
45
|
-
[position.horizontal]:
|
|
45
|
+
[position.vertical]: verticalOffset,
|
|
46
|
+
[position.horizontal]: horizontalOffset
|
|
46
47
|
}]);
|
|
47
48
|
return /*#__PURE__*/_react.default.createElement(_reactNative.View, _extends({
|
|
48
49
|
style: rootStyle
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["defaultPosition","vertical","horizontal","Badge","props","children","color","content","invisible","position","size","style","styleProp","
|
|
1
|
+
{"version":3,"names":["defaultPosition","vertical","horizontal","Badge","props","children","color","content","horizontalOffset","invisible","position","size","style","styleProp","variant","verticalOffset","otherProps","badge","baseBadgeStyle","contentFont","contentFontStyle","useVariantStyleMap","rootStyle","css","badgeStyle","undefined"],"sources":["Badge.tsx"],"sourcesContent":["import React from 'react';\nimport { Text, View } from 'react-native';\nimport { css } from '../styles';\nimport type BadgeProps from './BadgeProps';\nimport type { BadgeColor, BadgePosition, BadgeSize, BadgeVariant } from './BadgeProps';\nimport useVariantStyleMap from './useVariantStyleMap';\n\nconst defaultPosition: BadgePosition = {\n vertical: 'top',\n horizontal: 'right',\n};\n\nexport default function Badge(props: BadgeProps) {\n const {\n children,\n color = 'accent' as BadgeColor,\n content,\n horizontalOffset = 0,\n invisible = false,\n position = defaultPosition,\n size = 'medium' as BadgeSize,\n style: styleProp,\n variant = 'dot' as BadgeVariant,\n verticalOffset = 0,\n ...otherProps\n } = props;\n\n const {\n badge: baseBadgeStyle,\n contentFont: contentFontStyle,\n } = useVariantStyleMap(variant, size, color);\n\n const rootStyle = css([\n styleProp,\n ]);\n\n const badgeStyle = css([\n baseBadgeStyle,\n {\n [position.vertical]: verticalOffset,\n [position.horizontal]: horizontalOffset,\n },\n ]);\n\n return (\n <View\n style={rootStyle}\n {...otherProps}\n >\n {children}\n\n {!invisible ? (\n <View style={badgeStyle}>\n {content !== undefined && content !== null ? (\n <Text style={contentFontStyle}>{content}</Text>\n ) : null}\n </View>\n ) : null}\n </View>\n );\n};\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AAGA;;;;;;AAEA,MAAMA,eAA8B,GAAG;EACnCC,QAAQ,EAAE,KADyB;EAEnCC,UAAU,EAAE;AAFuB,CAAvC;;AAKe,SAASC,KAAT,CAAeC,KAAf,EAAkC;EAC7C,MAAM;IACFC,QADE;IAEFC,KAAK,GAAG,QAFN;IAGFC,OAHE;IAIFC,gBAAgB,GAAG,CAJjB;IAKFC,SAAS,GAAG,KALV;IAMFC,QAAQ,GAAGV,eANT;IAOFW,IAAI,GAAG,QAPL;IAQFC,KAAK,EAAEC,SARL;IASFC,OAAO,GAAG,KATR;IAUFC,cAAc,GAAG,CAVf;IAWF,GAAGC;EAXD,IAYFZ,KAZJ;EAcA,MAAM;IACFa,KAAK,EAAEC,cADL;IAEFC,WAAW,EAAEC;EAFX,IAGF,IAAAC,2BAAA,EAAmBP,OAAnB,EAA4BH,IAA5B,EAAkCL,KAAlC,CAHJ;EAKA,MAAMgB,SAAS,GAAG,IAAAC,WAAA,EAAI,CAClBV,SADkB,CAAJ,CAAlB;EAIA,MAAMW,UAAU,GAAG,IAAAD,WAAA,EAAI,CACnBL,cADmB,EAEnB;IACI,CAACR,QAAQ,CAACT,QAAV,GAAqBc,cADzB;IAEI,CAACL,QAAQ,CAACR,UAAV,GAAuBM;EAF3B,CAFmB,CAAJ,CAAnB;EAQA,oBACI,6BAAC,iBAAD;IACI,KAAK,EAAEc;EADX,GAEQN,UAFR,GAIKX,QAJL,EAMK,CAACI,SAAD,gBACG,6BAAC,iBAAD;IAAM,KAAK,EAAEe;EAAb,GACKjB,OAAO,KAAKkB,SAAZ,IAAyBlB,OAAO,KAAK,IAArC,gBACG,6BAAC,iBAAD;IAAM,KAAK,EAAEa;EAAb,GAAgCb,OAAhC,CADH,GAEG,IAHR,CADH,GAMG,IAZR,CADJ;AAgBH;;AAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["badgeHorizontalPositions","badgeVerticalPositions","badgeColors","badgeSizes","badgeVariants"],"sources":["BadgeProps.ts"],"sourcesContent":["import React from 'react';\nimport type { ViewProps } from 'react-native';\nimport type { OverridableComponentProps } from '../types';\n\nexport const badgeHorizontalPositions = ['right', 'left'] as const;\nexport type BadgeHorizontalPosition = typeof badgeHorizontalPositions[number];\n\nexport const badgeVerticalPositions = ['top', 'bottom'] as const;\nexport type BadgeVerticalPosition = typeof badgeVerticalPositions[number];\n\nexport interface BadgePosition {\n vertical: BadgeVerticalPosition;\n horizontal: BadgeHorizontalPosition;\n}\n\nexport const badgeColors = ['accent', 'danger'] as const;\nexport type BadgeColor = typeof badgeColors[number];\n\nexport const badgeSizes = ['large', 'medium'] as const;\nexport type BadgeSize = typeof badgeSizes[number];\n\nexport const badgeVariants = ['dot', 'number'] as const;\nexport type BadgeVariant = typeof badgeVariants[number];\n\nexport default interface BadgeProps extends OverridableComponentProps<ViewProps, {\n /**\n * The badge will be added relative to this node.\n */\n children?: React.ReactNode;\n\n /**\n *\n * @default 'accent'\n */\n color?: BadgeColor;\n\n /**\n * (only number variant)\n */\n content?: number;\n\n /**\n * If `true`, the badge is invisible.\n * @default false\n */\n invisible?: boolean;\n\n /**\n * The position of the badge.\n * @default {\n * vertical: 'top',\n * horizontal: 'right',\n * }\n */\n position?: BadgePosition;\n\n /**\n
|
|
1
|
+
{"version":3,"names":["badgeHorizontalPositions","badgeVerticalPositions","badgeColors","badgeSizes","badgeVariants"],"sources":["BadgeProps.ts"],"sourcesContent":["import React from 'react';\nimport type { ViewProps } from 'react-native';\nimport type { OverridableComponentProps } from '../types';\n\nexport const badgeHorizontalPositions = ['right', 'left'] as const;\nexport type BadgeHorizontalPosition = typeof badgeHorizontalPositions[number];\n\nexport const badgeVerticalPositions = ['top', 'bottom'] as const;\nexport type BadgeVerticalPosition = typeof badgeVerticalPositions[number];\n\nexport interface BadgePosition {\n vertical: BadgeVerticalPosition;\n horizontal: BadgeHorizontalPosition;\n}\n\nexport const badgeColors = ['accent', 'danger'] as const;\nexport type BadgeColor = typeof badgeColors[number];\n\nexport const badgeSizes = ['large', 'medium'] as const;\nexport type BadgeSize = typeof badgeSizes[number];\n\nexport const badgeVariants = ['dot', 'number'] as const;\nexport type BadgeVariant = typeof badgeVariants[number];\n\nexport default interface BadgeProps extends OverridableComponentProps<ViewProps, {\n /**\n * The badge will be added relative to this node.\n */\n children?: React.ReactNode;\n\n /**\n *\n * @default 'accent'\n */\n color?: BadgeColor;\n\n /**\n * (only number variant)\n */\n content?: number;\n\n /**\n * The horizontal offset of the badge.\n * @default 0\n */\n horizontalOffset?: number;\n\n /**\n * If `true`, the badge is invisible.\n * @default false\n */\n invisible?: boolean;\n\n /**\n * The position of the badge.\n * @default {\n * vertical: 'top',\n * horizontal: 'right',\n * }\n */\n position?: BadgePosition;\n\n /**\n *\n */\n size?: BadgeSize;\n\n /**\n *\n * @default 'dot'\n */\n variant?: BadgeVariant;\n\n /**\n * The vertical offset of the badge.\n * @default 0\n */\n verticalOffset?: number;\n}> {}\n"],"mappings":";;;;;;AAIO,MAAMA,wBAAwB,GAAG,CAAC,OAAD,EAAU,MAAV,CAAjC;;AAGA,MAAMC,sBAAsB,GAAG,CAAC,KAAD,EAAQ,QAAR,CAA/B;;AAQA,MAAMC,WAAW,GAAG,CAAC,QAAD,EAAW,QAAX,CAApB;;AAGA,MAAMC,UAAU,GAAG,CAAC,OAAD,EAAU,QAAV,CAAnB;;AAGA,MAAMC,aAAa,GAAG,CAAC,KAAD,EAAQ,QAAR,CAAtB"}
|
|
@@ -47,13 +47,13 @@ function useVariantStyleMap(variant, size, color) {
|
|
|
47
47
|
large: (0, _styles.typographyOf)({
|
|
48
48
|
fontSize: 14,
|
|
49
49
|
lineHeight: 14,
|
|
50
|
-
fontFamily: '
|
|
50
|
+
fontFamily: 'PretendardStd-Bold',
|
|
51
51
|
letterSpacing: -0.7
|
|
52
52
|
}),
|
|
53
53
|
medium: (0, _styles.typographyOf)({
|
|
54
54
|
fontSize: 12,
|
|
55
55
|
lineHeight: 12,
|
|
56
|
-
fontFamily: '
|
|
56
|
+
fontFamily: 'PretendardStd-Bold',
|
|
57
57
|
letterSpacing: -0.6
|
|
58
58
|
})
|
|
59
59
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["sizeMap","dot","medium","number","large","getColorMap","theme","accent","palette","fill","danger","status","useVariantStyleMap","variant","size","color","useTheme","useMemo","badgeSize","process","env","NODE_ENV","undefined","console","warn","colorMap","commonBadgeStyle","backgroundColor","borderRadius","shape","radius","full","height","position","width","fontStyleMap","typographyOf","fontSize","lineHeight","fontFamily","letterSpacing","badge","alignItems","justifyContent","contentFont","createFontStyle","selector","_","commonColors","opacity","white"],"sources":["useVariantStyleMap.ts"],"sourcesContent":["import { useMemo } from 'react';\nimport type { TextStyle } from 'react-native';\nimport type { FontStyle, FountainUiStyle, Theme } from '@fountain-ui/styles';\nimport { commonColors, typographyOf } from '@fountain-ui/styles';\nimport { createFontStyle, useTheme } from '../styles';\nimport type { BadgeColor, BadgeSize, BadgeVariant } from './BadgeProps';\n\nconst sizeMap: Record<BadgeVariant, Partial<Record<BadgeSize, number>>> = {\n dot: {\n medium: 4,\n },\n number: {\n large: 26,\n medium: 22,\n },\n};\n\nconst getColorMap = (theme: Theme): Record<BadgeColor, string> => ({\n accent: theme.palette.fill.accent,\n danger: theme.palette.status.danger,\n});\n\ninterface VariantStyle {\n badge: FountainUiStyle;\n contentFont?: TextStyle;\n}\n\nexport default function useVariantStyleMap(variant: BadgeVariant, size: BadgeSize, color: BadgeColor): VariantStyle {\n const theme = useTheme();\n\n return useMemo<VariantStyle>(() => {\n const badgeSize = sizeMap[variant][size] ?? sizeMap[variant].medium;\n\n if (process.env.NODE_ENV !== 'production' && sizeMap[variant][size] === undefined) {\n console.warn('The selected size is not supported for the chosen variant.');\n }\n\n const colorMap = getColorMap(theme);\n\n const commonBadgeStyle: FountainUiStyle = {\n backgroundColor: colorMap[color],\n borderRadius: theme.shape.radius.full,\n height: badgeSize,\n position: 'absolute',\n width: badgeSize,\n };\n\n const fontStyleMap: Record<BadgeSize, FontStyle> = {\n large: typographyOf({\n fontSize: 14,\n lineHeight: 14,\n fontFamily: '
|
|
1
|
+
{"version":3,"names":["sizeMap","dot","medium","number","large","getColorMap","theme","accent","palette","fill","danger","status","useVariantStyleMap","variant","size","color","useTheme","useMemo","badgeSize","process","env","NODE_ENV","undefined","console","warn","colorMap","commonBadgeStyle","backgroundColor","borderRadius","shape","radius","full","height","position","width","fontStyleMap","typographyOf","fontSize","lineHeight","fontFamily","letterSpacing","badge","alignItems","justifyContent","contentFont","createFontStyle","selector","_","commonColors","opacity","white"],"sources":["useVariantStyleMap.ts"],"sourcesContent":["import { useMemo } from 'react';\nimport type { TextStyle } from 'react-native';\nimport type { FontStyle, FountainUiStyle, Theme } from '@fountain-ui/styles';\nimport { commonColors, typographyOf } from '@fountain-ui/styles';\nimport { createFontStyle, useTheme } from '../styles';\nimport type { BadgeColor, BadgeSize, BadgeVariant } from './BadgeProps';\n\nconst sizeMap: Record<BadgeVariant, Partial<Record<BadgeSize, number>>> = {\n dot: {\n medium: 4,\n },\n number: {\n large: 26,\n medium: 22,\n },\n};\n\nconst getColorMap = (theme: Theme): Record<BadgeColor, string> => ({\n accent: theme.palette.fill.accent,\n danger: theme.palette.status.danger,\n});\n\ninterface VariantStyle {\n badge: FountainUiStyle;\n contentFont?: TextStyle;\n}\n\nexport default function useVariantStyleMap(variant: BadgeVariant, size: BadgeSize, color: BadgeColor): VariantStyle {\n const theme = useTheme();\n\n return useMemo<VariantStyle>(() => {\n const badgeSize = sizeMap[variant][size] ?? sizeMap[variant].medium;\n\n if (process.env.NODE_ENV !== 'production' && sizeMap[variant][size] === undefined) {\n console.warn('The selected size is not supported for the chosen variant.');\n }\n\n const colorMap = getColorMap(theme);\n\n const commonBadgeStyle: FountainUiStyle = {\n backgroundColor: colorMap[color],\n borderRadius: theme.shape.radius.full,\n height: badgeSize,\n position: 'absolute',\n width: badgeSize,\n };\n\n const fontStyleMap: Record<BadgeSize, FontStyle> = {\n large: typographyOf({\n fontSize: 14,\n lineHeight: 14,\n fontFamily: 'PretendardStd-Bold',\n letterSpacing: -0.7,\n }),\n medium: typographyOf({\n fontSize: 12,\n lineHeight: 12,\n fontFamily: 'PretendardStd-Bold',\n letterSpacing: -0.6,\n }),\n };\n\n switch (variant) {\n default:\n case 'dot':\n return {\n badge: { ...commonBadgeStyle },\n };\n case 'number':\n return {\n badge: {\n ...commonBadgeStyle,\n alignItems: 'center',\n justifyContent: 'center',\n },\n contentFont: createFontStyle(theme, {\n selector: (_) => fontStyleMap[size],\n color: commonColors.opacity.white['100'],\n }),\n };\n }\n }, [theme, variant, size, color]);\n}\n"],"mappings":";;;;;;;AAAA;;AAGA;;AACA;;AAGA,MAAMA,OAAiE,GAAG;EACtEC,GAAG,EAAE;IACDC,MAAM,EAAE;EADP,CADiE;EAItEC,MAAM,EAAE;IACJC,KAAK,EAAE,EADH;IAEJF,MAAM,EAAE;EAFJ;AAJ8D,CAA1E;;AAUA,MAAMG,WAAW,GAAIC,KAAD,KAA+C;EAC/DC,MAAM,EAAED,KAAK,CAACE,OAAN,CAAcC,IAAd,CAAmBF,MADoC;EAE/DG,MAAM,EAAEJ,KAAK,CAACE,OAAN,CAAcG,MAAd,CAAqBD;AAFkC,CAA/C,CAApB;;AAUe,SAASE,kBAAT,CAA4BC,OAA5B,EAAmDC,IAAnD,EAAoEC,KAApE,EAAqG;EAChH,MAAMT,KAAK,GAAG,IAAAU,iBAAA,GAAd;EAEA,OAAO,IAAAC,cAAA,EAAsB,MAAM;IAC/B,MAAMC,SAAS,GAAGlB,OAAO,CAACa,OAAD,CAAP,CAAiBC,IAAjB,KAA0Bd,OAAO,CAACa,OAAD,CAAP,CAAiBX,MAA7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C,OAAb,CAAqBC,KAArB,CAA2B,KAA3B;UAFyB,CAAvB;QANV,CAAP;IAPR;EAmBH,CAnDM,EAmDJ,CAAC5C,KAAD,EAAQO,OAAR,EAAiBC,IAAjB,EAAuBC,KAAvB,CAnDI,CAAP;AAoDH"}
|
|
@@ -23,15 +23,17 @@ const useStyles = function () {
|
|
|
23
23
|
const theme = (0, _styles.useTheme)();
|
|
24
24
|
return {
|
|
25
25
|
root: {
|
|
26
|
-
alignItems: '
|
|
26
|
+
alignItems: 'flex-start',
|
|
27
27
|
gap: theme.spacing(8),
|
|
28
28
|
justifyContent: 'space-between',
|
|
29
29
|
marginBottom: theme.spacing(4),
|
|
30
30
|
paddingHorizontal: theme.spacing(6)
|
|
31
31
|
},
|
|
32
32
|
title: {
|
|
33
|
+
flexShrink: 1,
|
|
33
34
|
paddingBottom: theme.spacing(1.25),
|
|
34
|
-
paddingTop: theme.spacing(1)
|
|
35
|
+
paddingTop: theme.spacing(1),
|
|
36
|
+
minWidth: 0
|
|
35
37
|
},
|
|
36
38
|
actionButton: {
|
|
37
39
|
paddingBottom: theme.spacing(1.75),
|
|
@@ -64,8 +66,10 @@ function BottomSheetTitle(props) {
|
|
|
64
66
|
}), actionButtonProps ? /*#__PURE__*/_react.default.createElement(_Button.default, {
|
|
65
67
|
children: actionButtonProps.title,
|
|
66
68
|
color: 'accent',
|
|
69
|
+
disabled: actionButtonProps.disabled ?? false,
|
|
67
70
|
disableMinWidth: true,
|
|
68
71
|
onPress: actionButtonProps.onPress,
|
|
72
|
+
size: 'large',
|
|
69
73
|
style: styles.actionButton,
|
|
70
74
|
variant: 'text'
|
|
71
75
|
}) : null);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useStyles","theme","useTheme","root","alignItems","gap","spacing","justifyContent","marginBottom","paddingHorizontal","title","paddingBottom","paddingTop","actionButton","BottomSheetTitle","props","actionButtonProps","children","style","styleProp","otherProps","styles","rootStyle","css","titleFontStyle","createFontStyle","selector","typography","header3","semiBold","color","palette","text","strong","titleStyle","onPress"],"sources":["BottomSheetTitle.tsx"],"sourcesContent":["import React from 'react';\nimport { Text } from 'react-native';\nimport type { NamedStylesStringUnion, UseStyles } from '@fountain-ui/styles';\nimport Button from '../Button/Button';\nimport Row from '../Row';\nimport { createFontStyle, css, useTheme } from '../styles';\nimport type BottomSheetTitleProps from './BottomSheetTitleProps';\n\ntype BottomSheetTitleStyles = NamedStylesStringUnion<'root' | 'title' | 'actionButton'>;\n\nconst useStyles: UseStyles<BottomSheetTitleStyles> = function (): BottomSheetTitleStyles {\n const theme = useTheme();\n\n return {\n root: {\n alignItems: '
|
|
1
|
+
{"version":3,"names":["useStyles","theme","useTheme","root","alignItems","gap","spacing","justifyContent","marginBottom","paddingHorizontal","title","flexShrink","paddingBottom","paddingTop","minWidth","actionButton","BottomSheetTitle","props","actionButtonProps","children","style","styleProp","otherProps","styles","rootStyle","css","titleFontStyle","createFontStyle","selector","typography","header3","semiBold","color","palette","text","strong","titleStyle","disabled","onPress"],"sources":["BottomSheetTitle.tsx"],"sourcesContent":["import React from 'react';\nimport { Text } from 'react-native';\nimport type { NamedStylesStringUnion, UseStyles } from '@fountain-ui/styles';\nimport Button from '../Button/Button';\nimport Row from '../Row';\nimport { createFontStyle, css, useTheme } from '../styles';\nimport type BottomSheetTitleProps from './BottomSheetTitleProps';\n\ntype BottomSheetTitleStyles = NamedStylesStringUnion<'root' | 'title' | 'actionButton'>;\n\nconst useStyles: UseStyles<BottomSheetTitleStyles> = function (): BottomSheetTitleStyles {\n const theme = useTheme();\n\n return {\n root: {\n alignItems: 'flex-start',\n gap: theme.spacing(8),\n justifyContent: 'space-between',\n marginBottom: theme.spacing(4),\n paddingHorizontal: theme.spacing(6),\n },\n title: {\n flexShrink: 1,\n paddingBottom: theme.spacing(1.25),\n paddingTop: theme.spacing(1),\n minWidth: 0,\n },\n actionButton: {\n paddingBottom: theme.spacing(1.75),\n paddingHorizontal: 0,\n paddingTop: theme.spacing(1.25),\n },\n };\n};\n\nexport default function BottomSheetTitle(props: BottomSheetTitleProps) {\n const {\n actionButtonProps,\n children,\n style: styleProp,\n ...otherProps\n } = props;\n\n const theme = useTheme();\n\n const styles = useStyles();\n\n const rootStyle = css([\n styles.root,\n styleProp,\n ]);\n\n const titleFontStyle = createFontStyle(theme, {\n selector: (typography) => typography.header3.semiBold,\n color: theme.palette.text.strong,\n });\n\n const titleStyle = css([\n styles.title,\n titleFontStyle,\n ]);\n\n return (\n <Row\n style={rootStyle}\n {...otherProps}\n >\n <Text\n children={children}\n style={titleStyle}\n />\n\n {actionButtonProps ? (\n <Button\n children={actionButtonProps.title}\n color={'accent'}\n disabled={actionButtonProps.disabled ?? false}\n disableMinWidth={true}\n onPress={actionButtonProps.onPress}\n size={'large'}\n style={styles.actionButton}\n variant={'text'}\n />\n ) : null}\n </Row>\n );\n}\n"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;;;;;AAKA,MAAMA,SAA4C,GAAG,YAAoC;EACrF,MAAMC,KAAK,GAAG,IAAAC,gBAAA,GAAd;EAEA,OAAO;IACHC,IAAI,EAAE;MACFC,UAAU,EAAE,YADV;MAEFC,GAAG,EAAEJ,KAAK,CAACK,OAAN,CAAc,CAAd,CAFH;MAGFC,cAAc,EAAE,eAHd;MAIFC,YAAY,EAAEP,KAAK,CAACK,OAAN,CAAc,CAAd,CAJZ;MAKFG,iBAAiB,EAAER,KAAK,CAACK,OAAN,CAAc,CAAd;IALjB,CADH;IAQHI,KAAK,EAAE;MACHC,UAAU,EAAE,CADT;MAEHC,aAAa,EAAEX,KAAK,CAACK,OAAN,CAAc,IAAd,CAFZ;MAGHO,UAAU,EAAEZ,KAAK,CAACK,OAAN,CAAc,CAAd,CAHT;MAIHQ,QAAQ,EAAE;IAJP,CARJ;IAcHC,YAAY,EAAE;MACVH,aAAa,EAAEX,KAAK,CAACK,OAAN,CAAc,IAAd,CADL;MAEVG,iBAAiB,EAAE,CAFT;MAGVI,UAAU,EAAEZ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version":3,"names":[],"sources":["BottomSheetTitleProps.ts"],"sourcesContent":["import type { OverridableComponentProps } from '../types';\nimport type { RowProps } from '../Row';\n\ntype ActionButtonProps = {\n title: string;\n onPress: () => void;\n};\n\nexport default interface BottomSheetTitleProps extends OverridableComponentProps<RowProps, {\n children: string;\n actionButtonProps?: ActionButtonProps;\n}> {}\n"],"mappings":""}
|
|
1
|
+
{"version":3,"names":[],"sources":["BottomSheetTitleProps.ts"],"sourcesContent":["import type { OverridableComponentProps } from '../types';\nimport type { RowProps } from '../Row';\n\ntype ActionButtonProps = {\n disabled?: boolean | undefined;\n title: string;\n onPress: () => void;\n};\n\nexport default interface BottomSheetTitleProps extends OverridableComponentProps<RowProps, {\n children: string;\n actionButtonProps?: ActionButtonProps;\n}> {}\n"],"mappings":""}
|
|
@@ -32,30 +32,34 @@ const useStyles = function () {
|
|
|
32
32
|
alignItems: 'center',
|
|
33
33
|
borderRadius: theme.shape.radius.sm,
|
|
34
34
|
flexDirection: 'row',
|
|
35
|
-
justifyContent: 'center'
|
|
35
|
+
justifyContent: 'center',
|
|
36
|
+
minHeight: 32
|
|
36
37
|
},
|
|
37
38
|
fullWidth: {
|
|
38
39
|
width: '100%'
|
|
39
40
|
},
|
|
40
41
|
large: {
|
|
41
|
-
gap:
|
|
42
|
+
gap: 8,
|
|
42
43
|
minWidth: 104,
|
|
43
|
-
paddingHorizontal:
|
|
44
|
-
paddingVertical:
|
|
44
|
+
paddingHorizontal: 24,
|
|
45
|
+
paddingVertical: 14
|
|
45
46
|
},
|
|
46
47
|
medium: {
|
|
47
|
-
gap:
|
|
48
|
+
gap: 6,
|
|
48
49
|
minWidth: 88,
|
|
49
|
-
paddingHorizontal:
|
|
50
|
-
paddingVertical:
|
|
50
|
+
paddingHorizontal: 16,
|
|
51
|
+
paddingVertical: 11
|
|
51
52
|
},
|
|
52
53
|
small: {
|
|
53
54
|
minWidth: 64,
|
|
54
|
-
paddingHorizontal:
|
|
55
|
-
paddingVertical:
|
|
55
|
+
paddingHorizontal: 10,
|
|
56
|
+
paddingVertical: 8
|
|
56
57
|
},
|
|
57
58
|
loadingSpinner: {
|
|
58
59
|
position: 'absolute'
|
|
60
|
+
},
|
|
61
|
+
iconContainer: {
|
|
62
|
+
paddingTop: 1
|
|
59
63
|
}
|
|
60
64
|
};
|
|
61
65
|
};
|
|
@@ -95,6 +99,7 @@ function Button(props) {
|
|
|
95
99
|
color: colorProp = 'primary',
|
|
96
100
|
disabled: disabledProp = false,
|
|
97
101
|
disableMinWidth = false,
|
|
102
|
+
disablePadding = false,
|
|
98
103
|
endIcon: endIconProp,
|
|
99
104
|
fullWidth = false,
|
|
100
105
|
href,
|
|
@@ -120,10 +125,19 @@ function Button(props) {
|
|
|
120
125
|
fill: iconColor,
|
|
121
126
|
opacity: isLoading ? 0 : 1
|
|
122
127
|
};
|
|
123
|
-
const startIcon =
|
|
124
|
-
|
|
125
|
-
|
|
128
|
+
const startIcon = startIconProp ? /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
129
|
+
style: styles.iconContainer
|
|
130
|
+
}, (0, _utils.cloneElementSafely)(startIconProp, iconProps)) : null;
|
|
131
|
+
const endIcon = endIconProp ? /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
132
|
+
style: styles.iconContainer
|
|
133
|
+
}, (0, _utils.cloneElementSafely)(endIconProp, iconProps)) : null;
|
|
134
|
+
const buttonBaseStyle = (0, _styles2.css)([styles.root, containerStyle, styles[size], (variant === 'capsuleSolid' || variant === 'capsuleOutlined') && size === 'small' ? {
|
|
135
|
+
paddingHorizontal: 12
|
|
136
|
+
} : undefined, fullWidth ? styles.fullWidth : undefined, disableMinWidth ? {
|
|
126
137
|
minWidth: 0
|
|
138
|
+
} : undefined, disablePadding ? {
|
|
139
|
+
paddingHorizontal: 0,
|
|
140
|
+
paddingVertical: 0
|
|
127
141
|
} : undefined, styleProp]);
|
|
128
142
|
const fontStyle = (0, _styles2.createFontStyle)(theme, {
|
|
129
143
|
selector: _ => fontStyleMap[size],
|