@fountain-ui/core 3.0.0-alpha.2 → 3.0.0-alpha.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/commonjs/Accordion/Accordion.js +7 -4
- package/build/commonjs/Accordion/Accordion.js.map +1 -1
- package/build/commonjs/Accordion/useVariantStyleMap.js +15 -8
- package/build/commonjs/Accordion/useVariantStyleMap.js.map +1 -1
- package/build/commonjs/AppBar/AppBar.js +6 -1
- package/build/commonjs/AppBar/AppBar.js.map +1 -1
- package/build/commonjs/Badge/Badge.js +4 -3
- package/build/commonjs/Badge/Badge.js.map +1 -1
- package/build/commonjs/Badge/BadgeProps.js.map +1 -1
- package/build/commonjs/Badge/useVariantStyleMap.js +2 -2
- package/build/commonjs/Badge/useVariantStyleMap.js.map +1 -1
- package/build/commonjs/BottomSheetTitle/BottomSheetTitle.js +5 -2
- package/build/commonjs/BottomSheetTitle/BottomSheetTitle.js.map +1 -1
- package/build/commonjs/BottomSheetTitle/BottomSheetTitleProps.js.map +1 -1
- package/build/commonjs/Button/Button.js +26 -12
- package/build/commonjs/Button/Button.js.map +1 -1
- package/build/commonjs/Button/ButtonProps.js.map +1 -1
- package/build/commonjs/Button/useVariantStyleMap.js +3 -1
- package/build/commonjs/Button/useVariantStyleMap.js.map +1 -1
- package/build/commonjs/ButtonBase/index.js +2 -2
- package/build/commonjs/ButtonBase/index.js.map +1 -1
- package/build/commonjs/Checkbox/Checkbox.js +4 -1
- package/build/commonjs/Checkbox/Checkbox.js.map +1 -1
- package/build/commonjs/Checkbox/useVariantStyleMap.js +6 -2
- package/build/commonjs/Checkbox/useVariantStyleMap.js.map +1 -1
- package/build/commonjs/Chip/Chip.js +21 -14
- package/build/commonjs/Chip/Chip.js.map +1 -1
- package/build/commonjs/Chip/ChipProps.js +3 -1
- package/build/commonjs/Chip/ChipProps.js.map +1 -1
- package/build/commonjs/Chip/index.js +6 -0
- package/build/commonjs/Chip/index.js.map +1 -1
- package/build/commonjs/Chip/useChipStyle.js +29 -19
- package/build/commonjs/Chip/useChipStyle.js.map +1 -1
- package/build/commonjs/Dialog/Dialog.js +7 -10
- package/build/commonjs/Dialog/Dialog.js.map +1 -1
- package/build/commonjs/Dialog/DialogProps.js +1 -1
- package/build/commonjs/Dialog/DialogProps.js.map +1 -1
- package/build/commonjs/Dialog/useDialogSectionStyle.js +6 -4
- package/build/commonjs/Dialog/useDialogSectionStyle.js.map +1 -1
- package/build/commonjs/Dialog/useDialogStyle.js +19 -8
- package/build/commonjs/Dialog/useDialogStyle.js.map +1 -1
- package/build/commonjs/DialogActions/DialogActions.js +0 -1
- package/build/commonjs/DialogActions/DialogActions.js.map +1 -1
- package/build/commonjs/DialogTitle/DialogLargeTitle.js +80 -0
- package/build/commonjs/DialogTitle/DialogLargeTitle.js.map +1 -0
- package/build/commonjs/DialogTitle/DialogTitle.js +8 -4
- package/build/commonjs/DialogTitle/DialogTitle.js.map +1 -1
- package/build/commonjs/Divider/Divider.js +17 -9
- package/build/commonjs/Divider/Divider.js.map +1 -1
- package/build/commonjs/Divider/DividerProps.js +1 -1
- package/build/commonjs/Divider/DividerProps.js.map +1 -1
- package/build/commonjs/Empty/Empty.js +1 -1
- package/build/commonjs/Empty/Empty.js.map +1 -1
- package/build/commonjs/Flexbox/Flexbox.js +2 -0
- package/build/commonjs/Flexbox/Flexbox.js.map +1 -1
- package/build/commonjs/Flexbox/FlexboxProps.js.map +1 -1
- package/build/commonjs/IconButton/IconButton.js +3 -0
- package/build/commonjs/IconButton/IconButton.js.map +1 -1
- package/build/commonjs/IconButton/IconButtonProps.js +1 -1
- package/build/commonjs/IconButton/IconButtonProps.js.map +1 -1
- package/build/commonjs/ImageCore/ImageCoreNative.js +1 -1
- package/build/commonjs/ImageCore/ImageCoreNative.js.map +1 -1
- package/build/commonjs/ListItem/ListItem.js +38 -26
- package/build/commonjs/ListItem/ListItem.js.map +1 -1
- package/build/commonjs/ListItem/ListItemProps.js.map +1 -1
- package/build/commonjs/ListItemIcon/ListItemIcon.js +1 -2
- package/build/commonjs/ListItemIcon/ListItemIcon.js.map +1 -1
- package/build/commonjs/ListItemSecondaryAction/ListItemSecondaryAction.js +2 -0
- package/build/commonjs/ListItemSecondaryAction/ListItemSecondaryAction.js.map +1 -1
- package/build/commonjs/ListItemText/ListItemText.js +20 -21
- package/build/commonjs/ListItemText/ListItemText.js.map +1 -1
- package/build/commonjs/ListItemText/ListItemTextProps.js.map +1 -1
- package/build/commonjs/ListSubheader/ListSubheader.js +1 -1
- package/build/commonjs/ListSubheader/ListSubheader.js.map +1 -1
- package/build/commonjs/Pagination/NumberPagination.js +1 -1
- package/build/commonjs/Pagination/NumberPagination.js.map +1 -1
- package/build/commonjs/Pagination/Pagination.js +2 -0
- package/build/commonjs/Pagination/Pagination.js.map +1 -1
- package/build/commonjs/Pagination/PaginationProps.js +3 -1
- package/build/commonjs/Pagination/PaginationProps.js.map +1 -1
- package/build/commonjs/Pagination/index.js +6 -0
- package/build/commonjs/Pagination/index.js.map +1 -1
- package/build/commonjs/PaginationItem/PaginationItem.js +32 -22
- package/build/commonjs/PaginationItem/PaginationItem.js.map +1 -1
- package/build/commonjs/PaginationItem/PaginationItemProps.js.map +1 -1
- package/build/commonjs/Radio/Radio.js +11 -4
- package/build/commonjs/Radio/Radio.js.map +1 -1
- package/build/commonjs/RadioGroup/RadioGroup.js +2 -27
- package/build/commonjs/RadioGroup/RadioGroup.js.map +1 -1
- package/build/commonjs/Section/Section.js +32 -0
- package/build/commonjs/Section/Section.js.map +1 -0
- package/build/commonjs/Section/SectionProps.js +2 -0
- package/build/commonjs/Section/SectionProps.js.map +1 -0
- package/build/commonjs/Section/index.js +16 -0
- package/build/commonjs/Section/index.js.map +1 -0
- package/build/commonjs/ShadowView/ShadowView.native.js +4 -0
- package/build/commonjs/ShadowView/ShadowView.native.js.map +1 -1
- package/build/commonjs/SnackbarContent/SnackbarContent.js +26 -9
- package/build/commonjs/SnackbarContent/SnackbarContent.js.map +1 -1
- package/build/commonjs/Tab/Tab.js +18 -18
- package/build/commonjs/Tab/Tab.js.map +1 -1
- package/build/commonjs/Tab/TabProps.js +4 -2
- package/build/commonjs/Tab/TabProps.js.map +1 -1
- package/build/commonjs/Tab/index.js +14 -0
- package/build/commonjs/Tab/index.js.map +1 -1
- package/build/commonjs/Tab/useVariantStyleMap.js +60 -16
- package/build/commonjs/Tab/useVariantStyleMap.js.map +1 -1
- package/build/commonjs/TabBase/TabBase.js +1 -8
- package/build/commonjs/TabBase/TabBase.js.map +1 -1
- package/build/commonjs/TabBase/TabBaseProps.js.map +1 -1
- package/build/commonjs/Tabs/Tabs.js +9 -5
- package/build/commonjs/Tabs/Tabs.js.map +1 -1
- package/build/commonjs/Tabs/TabsProps.js.map +1 -1
- package/build/commonjs/Tabs/useTabsStyle.js +54 -0
- package/build/commonjs/Tabs/useTabsStyle.js.map +1 -0
- package/build/commonjs/TextField/TextField.js +1 -1
- package/build/commonjs/TextField/TextField.js.map +1 -1
- package/build/commonjs/TextField/useVariantStyleMap.js +4 -3
- package/build/commonjs/TextField/useVariantStyleMap.js.map +1 -1
- package/build/commonjs/Toolbar/BackButton/BackButton.js +47 -0
- package/build/commonjs/Toolbar/BackButton/BackButton.js.map +1 -0
- package/build/commonjs/Toolbar/BackButton/BackButtonProps.js +2 -0
- package/build/commonjs/Toolbar/BackButton/BackButtonProps.js.map +1 -0
- package/build/commonjs/Toolbar/BackButton/index.js +16 -0
- package/build/commonjs/Toolbar/BackButton/index.js.map +1 -0
- package/build/commonjs/Toolbar/Toolbar.js +8 -4
- package/build/commonjs/Toolbar/Toolbar.js.map +1 -1
- package/build/commonjs/Tooltip/Beaks/index.js +32 -0
- package/build/commonjs/Tooltip/Beaks/index.js.map +1 -1
- package/build/commonjs/Tooltip/Tooltip.js +11 -18
- package/build/commonjs/Tooltip/Tooltip.js.map +1 -1
- package/build/commonjs/Tooltip/index.js +19 -0
- package/build/commonjs/Tooltip/index.js.map +1 -1
- package/build/commonjs/Typography/Typography.js +9 -2
- package/build/commonjs/Typography/Typography.js.map +1 -1
- package/build/commonjs/Typography/TypographyProps.js.map +1 -1
- package/build/commonjs/hooks/useBreakpointUp.js +4 -1
- package/build/commonjs/hooks/useBreakpointUp.js.map +1 -1
- package/build/commonjs/hooks/useCollapsibleAppBar.js +1 -1
- package/build/commonjs/hooks/useCollapsibleAppBar.js.map +1 -1
- package/build/commonjs/hooks/useContentContainerStyle.js +21 -28
- package/build/commonjs/hooks/useContentContainerStyle.js.map +1 -1
- package/build/commonjs/hooks/useFadeInAppBar.js +1 -1
- package/build/commonjs/hooks/useFadeInAppBar.js.map +1 -1
- package/build/commonjs/index.js +21 -0
- package/build/commonjs/index.js.map +1 -1
- package/build/commonjs/internal/icons/AppBarChevronLeft.js +23 -0
- package/build/commonjs/internal/icons/AppBarChevronLeft.js.map +1 -0
- package/build/commonjs/internal/icons/ChevronLeft.js +4 -2
- package/build/commonjs/internal/icons/ChevronLeft.js.map +1 -1
- package/build/commonjs/internal/icons/ChevronRight.js +4 -2
- package/build/commonjs/internal/icons/ChevronRight.js.map +1 -1
- package/build/commonjs/internal/icons/Close.js +4 -2
- package/build/commonjs/internal/icons/Close.js.map +1 -1
- package/build/commonjs/internal/icons/index.js +8 -0
- package/build/commonjs/internal/icons/index.js.map +1 -1
- package/build/module/Accordion/Accordion.js +7 -4
- package/build/module/Accordion/Accordion.js.map +1 -1
- package/build/module/Accordion/useVariantStyleMap.js +15 -8
- package/build/module/Accordion/useVariantStyleMap.js.map +1 -1
- package/build/module/AppBar/AppBar.js +5 -1
- package/build/module/AppBar/AppBar.js.map +1 -1
- package/build/module/Badge/Badge.js +4 -3
- package/build/module/Badge/Badge.js.map +1 -1
- package/build/module/Badge/BadgeProps.js.map +1 -1
- package/build/module/Badge/useVariantStyleMap.js +2 -2
- package/build/module/Badge/useVariantStyleMap.js.map +1 -1
- package/build/module/BottomSheetTitle/BottomSheetTitle.js +5 -2
- package/build/module/BottomSheetTitle/BottomSheetTitle.js.map +1 -1
- package/build/module/BottomSheetTitle/BottomSheetTitleProps.js.map +1 -1
- package/build/module/Button/Button.js +27 -13
- package/build/module/Button/Button.js.map +1 -1
- package/build/module/Button/ButtonProps.js.map +1 -1
- package/build/module/Button/useVariantStyleMap.js +3 -1
- package/build/module/Button/useVariantStyleMap.js.map +1 -1
- package/build/module/ButtonBase/index.js +1 -1
- package/build/module/ButtonBase/index.js.map +1 -1
- package/build/module/Checkbox/Checkbox.js +4 -1
- package/build/module/Checkbox/Checkbox.js.map +1 -1
- package/build/module/Checkbox/useVariantStyleMap.js +6 -2
- package/build/module/Checkbox/useVariantStyleMap.js.map +1 -1
- package/build/module/Chip/Chip.js +17 -13
- package/build/module/Chip/Chip.js.map +1 -1
- package/build/module/Chip/ChipProps.js +1 -0
- package/build/module/Chip/ChipProps.js.map +1 -1
- package/build/module/Chip/index.js +1 -1
- package/build/module/Chip/index.js.map +1 -1
- package/build/module/Chip/useChipStyle.js +29 -19
- package/build/module/Chip/useChipStyle.js.map +1 -1
- package/build/module/Dialog/Dialog.js +7 -9
- package/build/module/Dialog/Dialog.js.map +1 -1
- package/build/module/Dialog/DialogProps.js +1 -1
- package/build/module/Dialog/DialogProps.js.map +1 -1
- package/build/module/Dialog/useDialogSectionStyle.js +6 -4
- package/build/module/Dialog/useDialogSectionStyle.js.map +1 -1
- package/build/module/Dialog/useDialogStyle.js +18 -8
- package/build/module/Dialog/useDialogStyle.js.map +1 -1
- package/build/module/DialogActions/DialogActions.js +0 -1
- package/build/module/DialogActions/DialogActions.js.map +1 -1
- package/build/module/DialogTitle/DialogLargeTitle.js +65 -0
- package/build/module/DialogTitle/DialogLargeTitle.js.map +1 -0
- package/build/module/DialogTitle/DialogTitle.js +6 -3
- package/build/module/DialogTitle/DialogTitle.js.map +1 -1
- package/build/module/Divider/Divider.js +7 -0
- package/build/module/Divider/Divider.js.map +1 -1
- package/build/module/Divider/DividerProps.js +1 -1
- package/build/module/Divider/DividerProps.js.map +1 -1
- package/build/module/Empty/Empty.js +1 -1
- package/build/module/Empty/Empty.js.map +1 -1
- package/build/module/Flexbox/Flexbox.js +2 -0
- package/build/module/Flexbox/Flexbox.js.map +1 -1
- package/build/module/Flexbox/FlexboxProps.js.map +1 -1
- package/build/module/IconButton/IconButton.js +3 -0
- package/build/module/IconButton/IconButton.js.map +1 -1
- package/build/module/IconButton/IconButtonProps.js +1 -1
- package/build/module/IconButton/IconButtonProps.js.map +1 -1
- package/build/module/ImageCore/ImageCoreNative.js +1 -1
- package/build/module/ImageCore/ImageCoreNative.js.map +1 -1
- package/build/module/ListItem/ListItem.js +36 -28
- package/build/module/ListItem/ListItem.js.map +1 -1
- package/build/module/ListItem/ListItemProps.js.map +1 -1
- package/build/module/ListItemIcon/ListItemIcon.js +1 -2
- package/build/module/ListItemIcon/ListItemIcon.js.map +1 -1
- package/build/module/ListItemSecondaryAction/ListItemSecondaryAction.js +2 -0
- package/build/module/ListItemSecondaryAction/ListItemSecondaryAction.js.map +1 -1
- package/build/module/ListItemText/ListItemText.js +17 -19
- package/build/module/ListItemText/ListItemText.js.map +1 -1
- package/build/module/ListItemText/ListItemTextProps.js.map +1 -1
- package/build/module/ListSubheader/ListSubheader.js +1 -1
- package/build/module/ListSubheader/ListSubheader.js.map +1 -1
- package/build/module/Pagination/NumberPagination.js +1 -1
- package/build/module/Pagination/NumberPagination.js.map +1 -1
- package/build/module/Pagination/Pagination.js +2 -0
- package/build/module/Pagination/Pagination.js.map +1 -1
- package/build/module/Pagination/PaginationProps.js +1 -0
- package/build/module/Pagination/PaginationProps.js.map +1 -1
- package/build/module/Pagination/index.js +1 -1
- package/build/module/Pagination/index.js.map +1 -1
- package/build/module/PaginationItem/PaginationItem.js +28 -21
- package/build/module/PaginationItem/PaginationItem.js.map +1 -1
- package/build/module/PaginationItem/PaginationItemProps.js.map +1 -1
- package/build/module/Radio/Radio.js +10 -4
- package/build/module/Radio/Radio.js.map +1 -1
- package/build/module/RadioGroup/RadioGroup.js +2 -20
- package/build/module/RadioGroup/RadioGroup.js.map +1 -1
- package/build/module/Section/Section.js +19 -0
- package/build/module/Section/Section.js.map +1 -0
- package/build/module/Section/SectionProps.js +2 -0
- package/build/module/Section/SectionProps.js.map +1 -0
- package/build/module/Section/index.js +2 -0
- package/build/module/Section/index.js.map +1 -0
- package/build/module/ShadowView/ShadowView.native.js +4 -0
- package/build/module/ShadowView/ShadowView.native.js.map +1 -1
- package/build/module/SnackbarContent/SnackbarContent.js +26 -9
- package/build/module/SnackbarContent/SnackbarContent.js.map +1 -1
- package/build/module/Tab/Tab.js +19 -18
- package/build/module/Tab/Tab.js.map +1 -1
- package/build/module/Tab/TabProps.js +2 -1
- package/build/module/Tab/TabProps.js.map +1 -1
- package/build/module/Tab/index.js +1 -0
- package/build/module/Tab/index.js.map +1 -1
- package/build/module/Tab/useVariantStyleMap.js +60 -16
- package/build/module/Tab/useVariantStyleMap.js.map +1 -1
- package/build/module/TabBase/TabBase.js +1 -8
- package/build/module/TabBase/TabBase.js.map +1 -1
- package/build/module/TabBase/TabBaseProps.js.map +1 -1
- package/build/module/Tabs/Tabs.js +8 -5
- package/build/module/Tabs/Tabs.js.map +1 -1
- package/build/module/Tabs/TabsProps.js.map +1 -1
- package/build/module/Tabs/useTabsStyle.js +44 -0
- package/build/module/Tabs/useTabsStyle.js.map +1 -0
- package/build/module/TextField/TextField.js +1 -1
- package/build/module/TextField/TextField.js.map +1 -1
- package/build/module/TextField/useVariantStyleMap.js +4 -3
- package/build/module/TextField/useVariantStyleMap.js.map +1 -1
- package/build/module/Toolbar/BackButton/BackButton.js +32 -0
- package/build/module/Toolbar/BackButton/BackButton.js.map +1 -0
- package/build/module/Toolbar/BackButton/BackButtonProps.js +2 -0
- package/build/module/Toolbar/BackButton/BackButtonProps.js.map +1 -0
- package/build/module/Toolbar/BackButton/index.js +2 -0
- package/build/module/Toolbar/BackButton/index.js.map +1 -0
- package/build/module/Toolbar/Toolbar.js +7 -3
- package/build/module/Toolbar/Toolbar.js.map +1 -1
- package/build/module/Tooltip/Beaks/index.js +4 -0
- package/build/module/Tooltip/Beaks/index.js.map +1 -1
- package/build/module/Tooltip/Tooltip.js +4 -10
- package/build/module/Tooltip/Tooltip.js.map +1 -1
- package/build/module/Tooltip/index.js +1 -0
- package/build/module/Tooltip/index.js.map +1 -1
- package/build/module/Typography/Typography.js +9 -2
- package/build/module/Typography/Typography.js.map +1 -1
- package/build/module/Typography/TypographyProps.js.map +1 -1
- package/build/module/hooks/useBreakpointUp.js +4 -1
- package/build/module/hooks/useBreakpointUp.js.map +1 -1
- package/build/module/hooks/useCollapsibleAppBar.js +1 -1
- package/build/module/hooks/useCollapsibleAppBar.js.map +1 -1
- package/build/module/hooks/useContentContainerStyle.js +23 -26
- package/build/module/hooks/useContentContainerStyle.js.map +1 -1
- package/build/module/hooks/useFadeInAppBar.js +1 -1
- package/build/module/hooks/useFadeInAppBar.js.map +1 -1
- package/build/module/index.js +2 -0
- package/build/module/index.js.map +1 -1
- package/build/module/internal/icons/AppBarChevronLeft.js +9 -0
- package/build/module/internal/icons/AppBarChevronLeft.js.map +1 -0
- package/build/module/internal/icons/ChevronLeft.js +4 -2
- package/build/module/internal/icons/ChevronLeft.js.map +1 -1
- package/build/module/internal/icons/ChevronRight.js +4 -2
- package/build/module/internal/icons/ChevronRight.js.map +1 -1
- package/build/module/internal/icons/Close.js +4 -2
- package/build/module/internal/icons/Close.js.map +1 -1
- package/build/module/internal/icons/index.js +1 -0
- package/build/module/internal/icons/index.js.map +1 -1
- package/build/typescript/Accordion/useVariantStyleMap.d.ts +1 -0
- package/build/typescript/Badge/BadgeProps.d.ts +10 -5
- package/build/typescript/BottomSheetTitle/BottomSheetTitleProps.d.ts +1 -0
- package/build/typescript/Button/ButtonProps.d.ts +5 -0
- package/build/typescript/ButtonBase/index.d.ts +1 -1
- package/build/typescript/Checkbox/useVariantStyleMap.d.ts +1 -0
- package/build/typescript/Chip/ChipProps.d.ts +11 -4
- package/build/typescript/Chip/index.d.ts +1 -1
- package/build/typescript/Chip/useChipStyle.d.ts +4 -3
- package/build/typescript/Dialog/DialogProps.d.ts +1 -6
- package/build/typescript/Dialog/useDialogStyle.d.ts +1 -1
- package/build/typescript/DialogTitle/DialogLargeTitle.d.ts +9 -0
- package/build/typescript/DialogTitle/DialogTitle.d.ts +6 -1
- package/build/typescript/Divider/DividerProps.d.ts +1 -1
- package/build/typescript/Flexbox/FlexboxProps.d.ts +4 -0
- package/build/typescript/IconButton/IconButtonProps.d.ts +1 -1
- package/build/typescript/ListItem/ListItem.d.ts +1 -1
- package/build/typescript/ListItem/ListItemProps.d.ts +4 -0
- package/build/typescript/ListItemText/ListItemTextProps.d.ts +2 -9
- package/build/typescript/Pagination/PaginationProps.d.ts +12 -0
- package/build/typescript/Pagination/index.d.ts +2 -2
- package/build/typescript/PaginationItem/PaginationItemProps.d.ts +6 -0
- package/build/typescript/Section/Section.d.ts +3 -0
- package/build/typescript/Section/SectionProps.d.ts +6 -0
- package/build/typescript/Section/index.d.ts +2 -0
- package/build/typescript/Tab/TabProps.d.ts +8 -1
- package/build/typescript/Tab/index.d.ts +2 -1
- package/build/typescript/Tab/useVariantStyleMap.d.ts +3 -2
- package/build/typescript/TabBase/TabBaseProps.d.ts +0 -5
- package/build/typescript/Tabs/Tabs.d.ts +1 -1
- package/build/typescript/Tabs/TabsProps.d.ts +6 -1
- package/build/typescript/Tabs/useTabsStyle.d.ts +7 -0
- package/build/typescript/Toolbar/BackButton/BackButton.d.ts +3 -0
- package/build/typescript/Toolbar/BackButton/BackButtonProps.d.ts +4 -0
- package/build/typescript/Toolbar/BackButton/index.d.ts +2 -0
- package/build/typescript/Toolbar/Toolbar.d.ts +6 -1
- package/build/typescript/Tooltip/Beaks/index.d.ts +4 -0
- package/build/typescript/Tooltip/index.d.ts +1 -0
- package/build/typescript/Typography/TypographyProps.d.ts +4 -0
- package/build/typescript/hooks/useContentContainerStyle.d.ts +4 -8
- package/build/typescript/index.d.ts +2 -0
- package/build/typescript/internal/icons/AppBarChevronLeft.d.ts +131 -0
- package/build/typescript/internal/icons/index.d.ts +1 -0
- package/package.json +5 -5
- package/src/Accordion/Accordion.tsx +11 -8
- package/src/Accordion/useVariantStyleMap.ts +14 -6
- package/src/AppBar/AppBar.tsx +4 -0
- package/src/Badge/Badge.tsx +4 -3
- package/src/Badge/BadgeProps.ts +12 -6
- package/src/Badge/useVariantStyleMap.ts +2 -2
- package/src/BottomSheetTitle/BottomSheetTitle.tsx +4 -1
- package/src/BottomSheetTitle/BottomSheetTitleProps.ts +1 -0
- package/src/Button/Button.tsx +28 -12
- package/src/Button/ButtonProps.ts +6 -0
- package/src/Button/useVariantStyleMap.ts +1 -1
- package/src/ButtonBase/index.ts +1 -1
- package/src/Checkbox/Checkbox.tsx +11 -8
- package/src/Checkbox/useVariantStyleMap.ts +6 -1
- package/src/Chip/Chip.tsx +20 -13
- package/src/Chip/ChipProps.ts +13 -4
- package/src/Chip/index.ts +1 -1
- package/src/Chip/useChipStyle.ts +34 -17
- package/src/Dialog/Dialog.tsx +8 -9
- package/src/Dialog/DialogProps.ts +1 -7
- package/src/Dialog/useDialogSectionStyle.ts +6 -4
- package/src/Dialog/useDialogStyle.ts +19 -7
- package/src/DialogActions/DialogActions.tsx +0 -1
- package/src/DialogTitle/DialogLargeTitle.tsx +95 -0
- package/src/DialogTitle/DialogTitle.tsx +6 -1
- package/src/Divider/Divider.tsx +5 -0
- package/src/Divider/DividerProps.ts +1 -1
- package/src/Empty/Empty.tsx +1 -1
- package/src/Flexbox/Flexbox.tsx +2 -0
- package/src/Flexbox/FlexboxProps.ts +5 -0
- package/src/IconButton/IconButton.tsx +2 -0
- package/src/IconButton/IconButtonProps.ts +1 -0
- package/src/ImageCore/ImageCoreNative.tsx +1 -1
- package/src/ListItem/ListItem.tsx +61 -30
- package/src/ListItem/ListItemProps.ts +5 -0
- package/src/ListItemIcon/ListItemIcon.tsx +1 -2
- package/src/ListItemSecondaryAction/ListItemSecondaryAction.tsx +2 -0
- package/src/ListItemText/ListItemText.tsx +20 -28
- package/src/ListItemText/ListItemTextProps.ts +2 -10
- package/src/ListSubheader/ListSubheader.tsx +1 -1
- package/src/Pagination/NumberPagination.tsx +1 -1
- package/src/Pagination/Pagination.tsx +3 -2
- package/src/Pagination/PaginationProps.ts +15 -0
- package/src/Pagination/index.ts +2 -2
- package/src/PaginationItem/PaginationItem.tsx +31 -24
- package/src/PaginationItem/PaginationItemProps.ts +7 -0
- package/src/Radio/Radio.tsx +12 -3
- package/src/RadioGroup/RadioGroup.tsx +2 -28
- package/src/Section/Section.tsx +26 -0
- package/src/Section/SectionProps.ts +6 -0
- package/src/Section/index.ts +2 -0
- package/src/ShadowView/ShadowView.native.tsx +4 -0
- package/src/SnackbarContent/SnackbarContent.tsx +36 -15
- package/src/Tab/Tab.tsx +28 -22
- package/src/Tab/TabProps.ts +10 -1
- package/src/Tab/index.ts +2 -1
- package/src/Tab/useVariantStyleMap.ts +65 -17
- package/src/TabBase/TabBase.tsx +1 -9
- package/src/TabBase/TabBaseProps.ts +0 -6
- package/src/Tabs/Tabs.tsx +7 -6
- package/src/Tabs/TabsProps.ts +7 -1
- package/src/Tabs/useTabsStyle.ts +49 -0
- package/src/TextField/TextField.tsx +1 -1
- package/src/TextField/useVariantStyleMap.ts +4 -3
- package/src/Toolbar/BackButton/BackButton.tsx +44 -0
- package/src/Toolbar/BackButton/BackButtonProps.ts +4 -0
- package/src/Toolbar/BackButton/index.ts +2 -0
- package/src/Toolbar/Toolbar.tsx +6 -1
- package/src/Tooltip/Beaks/index.ts +4 -0
- package/src/Tooltip/Tooltip.tsx +4 -9
- package/src/Tooltip/index.ts +1 -0
- package/src/Typography/Typography.tsx +3 -1
- package/src/Typography/TypographyProps.ts +5 -0
- package/src/hooks/useBreakpointUp.ts +3 -1
- package/src/hooks/useCollapsibleAppBar.ts +1 -1
- package/src/hooks/useContentContainerStyle.ts +26 -34
- package/src/hooks/useFadeInAppBar.ts +1 -1
- package/src/index.ts +3 -0
- package/src/internal/icons/AppBarChevronLeft.tsx +15 -0
- package/src/internal/icons/ChevronLeft.tsx +4 -1
- package/src/internal/icons/ChevronRight.tsx +4 -1
- package/src/internal/icons/Close.tsx +4 -1
- package/src/internal/icons/index.ts +1 -0
- package/build/commonjs/ButtonBase/LegacyButtonBase.js +0 -126
- package/build/commonjs/ButtonBase/LegacyButtonBase.js.map +0 -1
- package/build/module/ButtonBase/LegacyButtonBase.js +0 -106
- package/build/module/ButtonBase/LegacyButtonBase.js.map +0 -1
- package/build/typescript/ButtonBase/LegacyButtonBase.d.ts +0 -5
- package/src/ButtonBase/LegacyButtonBase.tsx +0 -135
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["PaginationItemProps.ts"],"sourcesContent":["import type { ViewProps } from 'react-native';\nimport type { OverridableComponentProps } from '../types';\n\nexport default interface PaginationItemProps extends OverridableComponentProps<ViewProps, {\n /**\n * If `true`, the pagination item is disabled.\n * @default false\n */\n disabled?: boolean;\n\n /**\n * If `true` the pagination item is selected.\n * @default false\n */\n selected?: boolean;\n}> {}\n"],"mappings":""}
|
|
1
|
+
{"version":3,"names":[],"sources":["PaginationItemProps.ts"],"sourcesContent":["import type { ViewProps } from 'react-native';\nimport type { OverridableComponentProps } from '../types';\nimport { PaginationColor } from '../Pagination';\n\nexport default interface PaginationItemProps extends OverridableComponentProps<ViewProps, {\n /**\n * Set color of dot.\n * @default 'base'\n */\n color?: PaginationColor;\n\n /**\n * If `true`, the pagination item is disabled.\n * @default false\n */\n disabled?: boolean;\n\n /**\n * If `true` the pagination item is selected.\n * @default false\n */\n selected?: boolean;\n}> {}\n"],"mappings":""}
|
|
@@ -29,17 +29,22 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
29
29
|
|
|
30
30
|
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); }
|
|
31
31
|
|
|
32
|
+
const DEFAULT_START_ICON_SIZE = 21;
|
|
33
|
+
|
|
32
34
|
const useStyles = function () {
|
|
33
35
|
const theme = (0, _styles.useTheme)();
|
|
34
36
|
return {
|
|
35
37
|
root: {
|
|
36
38
|
alignItems: 'center',
|
|
39
|
+
borderBottomColor: theme.palette.border.weak,
|
|
40
|
+
borderBottomWidth: 0.5,
|
|
37
41
|
flexDirection: 'row',
|
|
38
|
-
gap:
|
|
39
|
-
justifyContent: 'space-between'
|
|
42
|
+
gap: 32,
|
|
43
|
+
justifyContent: 'space-between',
|
|
44
|
+
paddingVertical: 14
|
|
40
45
|
},
|
|
41
46
|
content: {
|
|
42
|
-
gap:
|
|
47
|
+
gap: 8,
|
|
43
48
|
minHeight: 20
|
|
44
49
|
}
|
|
45
50
|
};
|
|
@@ -78,7 +83,9 @@ function Radio(props) {
|
|
|
78
83
|
const checkedIcon = checkIconProp ?? defaultCheckedIcon;
|
|
79
84
|
const icon = isChecked ? checkedIcon : null;
|
|
80
85
|
const startIcon = (0, _utils.cloneElementSafely)(startIconProp, {
|
|
81
|
-
color: 'strong'
|
|
86
|
+
color: 'strong',
|
|
87
|
+
height: DEFAULT_START_ICON_SIZE,
|
|
88
|
+
width: DEFAULT_START_ICON_SIZE
|
|
82
89
|
});
|
|
83
90
|
const rootStyle = (0, _styles.css)([styles.root, style]);
|
|
84
91
|
const fontStyle = (0, _styles.createFontStyle)(theme, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useStyles","theme","useTheme","root","alignItems","flexDirection","gap","
|
|
1
|
+
{"version":3,"names":["DEFAULT_START_ICON_SIZE","useStyles","theme","useTheme","root","alignItems","borderBottomColor","palette","border","weak","borderBottomWidth","flexDirection","gap","justifyContent","paddingVertical","content","minHeight","Radio","props","checked","children","checkedIcon","checkIconProp","disabled","onChange","onChangeProp","startIcon","startIconProp","style","value","otherProps","styles","context","useContext","RadioContext","handlePress","isChecked","defaultCheckedIcon","icon","cloneElementSafely","color","height","width","rootStyle","css","fontStyle","createFontStyle","selector","typography","body1","regular","text","strong"],"sources":["Radio.tsx"],"sourcesContent":["import React, { useContext } from 'react';\nimport { Text } from 'react-native';\nimport type { NamedStylesStringUnion, UseStyles } from '@fountain-ui/styles';\nimport ButtonBase from '../ButtonBase';\nimport { Check as CheckedIcon } from '../internal';\nimport Row from '../Row';\nimport { createFontStyle, css, useTheme } from '../styles';\nimport { cloneElementSafely } from '../utils';\nimport { RadioContext } from '../RadioGroup/RadioContextProvider';\nimport type RadioProps from './RadioProps';\n\nconst DEFAULT_START_ICON_SIZE = 21;\n\ntype RadioStyles = NamedStylesStringUnion<'root' | 'content'>;\n\nconst useStyles: UseStyles<RadioStyles> = function (): RadioStyles {\n const theme = useTheme();\n\n return {\n root: {\n alignItems: 'center',\n borderBottomColor: theme.palette.border.weak,\n borderBottomWidth: 0.5,\n flexDirection: 'row',\n gap: 32,\n justifyContent: 'space-between',\n paddingVertical: 14,\n },\n content: {\n gap: 8,\n minHeight: 20,\n },\n };\n};\n\nexport default function Radio(props: RadioProps) {\n const {\n checked = false,\n children,\n checkedIcon: checkIconProp,\n disabled = false,\n onChange: onChangeProp,\n startIcon: startIconProp,\n style,\n value,\n ...otherProps\n } = props;\n\n const theme = useTheme();\n\n const styles = useStyles();\n\n const context = useContext(RadioContext);\n\n const handlePress = () => {\n const onChange = context?.onChange ?? onChangeProp;\n if (onChange) {\n onChange(value);\n }\n };\n\n const isChecked = context?.value === value ?? checked;\n\n const defaultCheckedIcon = (\n <CheckedIcon color={'accent'}/>\n );\n\n const checkedIcon = checkIconProp ?? defaultCheckedIcon;\n const icon = isChecked ? checkedIcon : null;\n\n const startIcon = cloneElementSafely(startIconProp, {\n color: 'strong',\n height: DEFAULT_START_ICON_SIZE,\n width: DEFAULT_START_ICON_SIZE,\n });\n\n const rootStyle = css([\n styles.root,\n style,\n ]);\n\n const fontStyle = createFontStyle(theme, {\n selector: (typography) => typography.body1.regular,\n color: theme.palette.text.strong,\n });\n\n return (\n <ButtonBase\n disabled={disabled}\n onPress={handlePress}\n style={rootStyle}\n {...otherProps}\n >\n <Row\n alignItems={'center'}\n style={styles.content}\n >\n {startIcon}\n\n <Text\n children={children}\n style={fontStyle}\n />\n </Row>\n\n {icon}\n </ButtonBase>\n );\n};\n"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAGA,MAAMA,uBAAuB,GAAG,EAAhC;;AAIA,MAAMC,SAAiC,GAAG,YAAyB;EAC/D,MAAMC,KAAK,GAAG,IAAAC,gBAAA,GAAd;EAEA,OAAO;IACHC,IAAI,EAAE;MACFC,UAAU,EAAE,QADV;MAEFC,iBAAiB,EAAEJ,KAAK,CAACK,OAAN,CAAcC,MAAd,CAAqBC,IAFtC;MAGFC,iBAAiB,EAAE,GAHjB;MAIFC,aAAa,EAAE,KAJb;MAKFC,GAAG,EAAE,EALH;MAMFC,cAAc,EAAE,eANd;MAOFC,eAAe,EAAE;IAPf,CADH;IAUHC,OAAO,EAAE;MACLH,GAAG,EAAE,CADA;MAELI,SAAS,EAAE;IAFN;EAVN,CAAP;AAeH,CAlBD;;AAoBe,SAASC,KAAT,CAAeC,KAAf,EAAkC;EAC7C,MAAM;IACFC,OAAO,GAAG,KADR;IAEFC,QAFE;IAGFC,WAAW,EAAEC,aAHX;IAIFC,QAAQ,GAAG,KAJT;IAKFC,QAAQ,EAAEC,YALR;IAMFC,SAAS,EAAEC,aANT;IAOFC,KAPE;IAQFC,KARE;IASF,GAAGC;EATD,IAUFZ,KAVJ;EAYA,MAAMhB,KAAK,GAAG,IAAAC,gBAAA,GAAd;EAEA,MAAM4B,MAAM,GAAG9B,SAAS,EAAxB;EAEA,MAAM+B,OAAO,GAAG,IAAAC,iBAAA,EAAWC,kCAAX,CAAhB;;EAEA,MAAMC,WAAW,GAAG,MAAM;IACtB,MAAMX,QAAQ,GAAG,CAAAQ,OAAO,SAAP,I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L,CADJ;AAsBH;;AAAA"}
|
|
@@ -5,33 +5,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = RadioGroup;
|
|
7
7
|
|
|
8
|
-
var _react =
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
|
|
10
10
|
var _reactNative = require("react-native");
|
|
11
11
|
|
|
12
|
-
var _styles = require("../styles");
|
|
13
|
-
|
|
14
|
-
var _utils = require("../utils");
|
|
15
|
-
|
|
16
12
|
var _RadioContextProvider = _interopRequireDefault(require("./RadioContextProvider"));
|
|
17
13
|
|
|
18
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
15
|
|
|
20
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
21
|
-
|
|
22
|
-
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; }
|
|
23
|
-
|
|
24
|
-
const useStyles = function () {
|
|
25
|
-
const theme = (0, _styles.useTheme)();
|
|
26
|
-
return {
|
|
27
|
-
root: {
|
|
28
|
-
borderBottomColor: theme.palette.border.weak,
|
|
29
|
-
borderBottomWidth: 0.5,
|
|
30
|
-
paddingVertical: theme.spacing(3.5)
|
|
31
|
-
}
|
|
32
|
-
};
|
|
33
|
-
};
|
|
34
|
-
|
|
35
16
|
function RadioGroup(props) {
|
|
36
17
|
const {
|
|
37
18
|
children,
|
|
@@ -39,18 +20,12 @@ function RadioGroup(props) {
|
|
|
39
20
|
onChange,
|
|
40
21
|
...otherProps
|
|
41
22
|
} = props;
|
|
42
|
-
const styles = useStyles();
|
|
43
|
-
|
|
44
|
-
const radios = _react.Children.map(children, child => /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
45
|
-
style: styles.root
|
|
46
|
-
}, (0, _utils.cloneElementSafely)(child)));
|
|
47
|
-
|
|
48
23
|
return /*#__PURE__*/_react.default.createElement(_RadioContextProvider.default, {
|
|
49
24
|
value: {
|
|
50
25
|
value,
|
|
51
26
|
onChange
|
|
52
27
|
}
|
|
53
|
-
}, /*#__PURE__*/_react.default.createElement(_reactNative.View, otherProps,
|
|
28
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNative.View, otherProps, children));
|
|
54
29
|
}
|
|
55
30
|
|
|
56
31
|
;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["RadioGroup","props","children","value","onChange","otherProps"],"sources":["RadioGroup.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\nimport RadioContextProvider from './RadioContextProvider';\nimport type RadioGroupProps from './RadioGroupProps';\n\nexport default function RadioGroup(props: RadioGroupProps) {\n const {\n children,\n value,\n onChange,\n ...otherProps\n } = props;\n\n return (\n <RadioContextProvider value={{ value, onChange }}>\n <View {...otherProps}>\n {children}\n </View>\n </RadioContextProvider>\n );\n};\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;;;AAGe,SAASA,UAAT,CAAoBC,KAApB,EAA4C;EACvD,MAAM;IACFC,QADE;IAEFC,KAFE;IAGFC,QAHE;IAIF,GAAGC;EAJD,IAKFJ,KALJ;EAOA,oBACI,6BAAC,6BAAD;IAAsB,KAAK,EAAE;MAAEE,KAAF;MAASC;IAAT;EAA7B,gBACI,6BAAC,iBAAD,EAAUC,UAAV,EACKH,QADL,CADJ,CADJ;AAOH;;AAAA"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = Section;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
var _reactNative = require("react-native");
|
|
11
|
+
|
|
12
|
+
var _hooks = require("../hooks");
|
|
13
|
+
|
|
14
|
+
var _styles = require("../styles");
|
|
15
|
+
|
|
16
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
+
|
|
18
|
+
function Section(props) {
|
|
19
|
+
const {
|
|
20
|
+
children,
|
|
21
|
+
maxWidth,
|
|
22
|
+
style: styleProp
|
|
23
|
+
} = props;
|
|
24
|
+
const styles = (0, _hooks.useContentContainerStyle)({
|
|
25
|
+
maxWidth
|
|
26
|
+
});
|
|
27
|
+
const rootStyle = (0, _styles.css)([styles, styleProp]);
|
|
28
|
+
return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
29
|
+
style: rootStyle
|
|
30
|
+
}, children);
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=Section.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["Section","props","children","maxWidth","style","styleProp","styles","useContentContainerStyle","rootStyle","css"],"sources":["Section.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\nimport { useContentContainerStyle } from '../hooks';\nimport { css } from '../styles';\nimport type SectionProps from './SectionProps';\n\nexport default function Section(props: SectionProps) {\n const {\n children,\n maxWidth,\n style: styleProp,\n } = props;\n\n const styles = useContentContainerStyle({ maxWidth });\n\n const rootStyle = css([\n styles,\n styleProp,\n ]);\n\n return (\n <View style={rootStyle}>\n {children}\n </View>\n );\n}\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;;;AAGe,SAASA,OAAT,CAAiBC,KAAjB,EAAsC;EACjD,MAAM;IACFC,QADE;IAEFC,QAFE;IAGFC,KAAK,EAAEC;EAHL,IAIFJ,KAJJ;EAMA,MAAMK,MAAM,GAAG,IAAAC,+BAAA,EAAyB;IAAEJ;EAAF,CAAzB,CAAf;EAEA,MAAMK,SAAS,GAAG,IAAAC,WAAA,EAAI,CAClBH,MADkB,EAElBD,SAFkB,CAAJ,CAAlB;EAKA,oBACI,6BAAC,iBAAD;IAAM,KAAK,EAAEG;EAAb,GACKN,QADL,CADJ;AAKH"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["SectionProps.ts"],"sourcesContent":["import type { ViewProps } from 'react-native';\nimport type { OverridableComponentProps } from '../types';\n\nexport default interface SectionProps extends OverridableComponentProps<ViewProps, {\n maxWidth?: number;\n}> {}\n"],"mappings":""}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "default", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _Section.default;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
var _Section = _interopRequireDefault(require("./Section"));
|
|
14
|
+
|
|
15
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
16
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export { default } from './Section';\nexport type { default as SectionProps } from './SectionProps';\n"],"mappings":";;;;;;;;;;;;AAAA"}
|
|
@@ -29,6 +29,8 @@ function ShadowView(props) {
|
|
|
29
29
|
const {
|
|
30
30
|
borderRadius,
|
|
31
31
|
height,
|
|
32
|
+
maxHeight,
|
|
33
|
+
maxWidth,
|
|
32
34
|
width
|
|
33
35
|
} = styleProp;
|
|
34
36
|
return nativeShadows.reduce((accumulator, nativeShadow) => {
|
|
@@ -37,6 +39,8 @@ function ShadowView(props) {
|
|
|
37
39
|
}, {
|
|
38
40
|
borderRadius: borderRadius ?? 0,
|
|
39
41
|
height,
|
|
42
|
+
maxHeight,
|
|
43
|
+
maxWidth,
|
|
40
44
|
width
|
|
41
45
|
}])
|
|
42
46
|
}, accumulator);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["ShadowView","props","children","style","styleProp","variant","otherProps","theme","useTheme","nativeShadows","shadow","borderRadius","height","width","reduce","accumulator","nativeShadow","css"],"sources":["ShadowView.native.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\nimport type { FountainUiStyle, ShadowVariant } from '@fountain-ui/styles';\nimport { css, useTheme } from '../styles';\nimport type ShadowViewProps from './ShadowViewProps';\n\nexport default function ShadowView(props: ShadowViewProps) {\n const {\n children,\n style: styleProp = {},\n variant = 100 as ShadowVariant,\n ...otherProps\n } = props;\n\n const theme = useTheme();\n\n const { nativeShadows } = theme.shadow[variant];\n\n const {\n borderRadius,\n height,\n width,\n } = styleProp as FountainUiStyle;\n\n return nativeShadows.reduce((accumulator, nativeShadow) => {\n return (\n <View\n style={css([\n { ...nativeShadow },\n {\n borderRadius: borderRadius ?? 0,\n height,\n width,\n },\n ])}\n >\n {accumulator}\n </View>\n );\n }, (\n <View\n style={styleProp}\n {...otherProps}\n >\n {children}\n </View>\n ));\n}\n"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;;;;;AAGe,SAASA,UAAT,CAAoBC,KAApB,EAA4C;EACvD,MAAM;IACFC,QADE;IAEFC,KAAK,EAAEC,SAAS,GAAG,EAFjB;IAGFC,OAAO,GAAG,GAHR;IAIF,GAAGC;EAJD,IAKFL,KALJ;EAOA,MAAMM,KAAK,GAAG,IAAAC,gBAAA,GAAd;EAEA,MAAM;IAAEC;EAAF,IAAoBF,KAAK,CAACG,MAAN,CAAaL,OAAb,CAA1B;EAEA,MAAM;IACFM,YADE;IAEFC,MAFE;IAGFC;
|
|
1
|
+
{"version":3,"names":["ShadowView","props","children","style","styleProp","variant","otherProps","theme","useTheme","nativeShadows","shadow","borderRadius","height","maxHeight","maxWidth","width","reduce","accumulator","nativeShadow","css"],"sources":["ShadowView.native.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\nimport type { FountainUiStyle, ShadowVariant } from '@fountain-ui/styles';\nimport { css, useTheme } from '../styles';\nimport type ShadowViewProps from './ShadowViewProps';\n\nexport default function ShadowView(props: ShadowViewProps) {\n const {\n children,\n style: styleProp = {},\n variant = 100 as ShadowVariant,\n ...otherProps\n } = props;\n\n const theme = useTheme();\n\n const { nativeShadows } = theme.shadow[variant];\n\n const {\n borderRadius,\n height,\n maxHeight,\n maxWidth,\n width,\n } = styleProp as FountainUiStyle;\n\n return nativeShadows.reduce((accumulator, nativeShadow) => {\n return (\n <View\n style={css([\n { ...nativeShadow },\n {\n borderRadius: borderRadius ?? 0,\n height,\n maxHeight,\n maxWidth,\n width,\n },\n ])}\n >\n {accumulator}\n </View>\n );\n }, (\n <View\n style={styleProp}\n {...otherProps}\n >\n {children}\n </View>\n ));\n}\n"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;;;;;AAGe,SAASA,UAAT,CAAoBC,KAApB,EAA4C;EACvD,MAAM;IACFC,QADE;IAEFC,KAAK,EAAEC,SAAS,GAAG,EAFjB;IAGFC,OAAO,GAAG,GAHR;IAIF,GAAGC;EAJD,IAKFL,KALJ;EAOA,MAAMM,KAAK,GAAG,IAAAC,gBAAA,GAAd;EAEA,MAAM;IAAEC;EAAF,IAAoBF,KAAK,CAACG,MAAN,CAAaL,OAAb,CAA1B;EAEA,MAAM;IACFM,YADE;IAEFC,MAFE;IAGFC,SAHE;IAIFC,QAJE;IAKFC;EALE,IAMFX,SANJ;EAQA,OAAOK,aAAa,CAACO,MAAd,CAAqB,CAACC,WAAD,EAAcC,YAAd,KAA+B;IACvD,oBACI,6BAAC,iBAAD;MACI,KAAK,EAAE,IAAAC,WAAA,EAAI,CACP,EAAE,GAAGD;MAAL,CADO,EAEP;QACIP,YAAY,EAAEA,YAAY,IAAI,CADlC;QAEIC,MAFJ;QAGIC,SAHJ;QAIIC,QAJJ;QAKIC;MALJ,CAFO,CAAJ;IADX,GAYKE,WAZL,CADJ;EAgBH,CAjBM,eAkBH,6BAAC,iBAAD;IACI,KAAK,EAAEb;EADX,GAEQE,UAFR,GAIKJ,QAJL,CAlBG,CAAP;AAyBH"}
|
|
@@ -43,6 +43,14 @@ const useStyles = function () {
|
|
|
43
43
|
},
|
|
44
44
|
actionButton: {
|
|
45
45
|
marginLeft: theme.spacing(6)
|
|
46
|
+
},
|
|
47
|
+
actionLabel: {
|
|
48
|
+
paddingBottom: theme.spacing(1.5),
|
|
49
|
+
paddingTop: theme.spacing(1.25)
|
|
50
|
+
},
|
|
51
|
+
actionElement: {
|
|
52
|
+
paddingLeft: theme.spacing(2),
|
|
53
|
+
paddingVertical: theme.spacing(1.25)
|
|
46
54
|
}
|
|
47
55
|
};
|
|
48
56
|
};
|
|
@@ -62,18 +70,23 @@ function SnackbarContent(props) {
|
|
|
62
70
|
const theme = (0, _styles2.useTheme)();
|
|
63
71
|
const titleFontStyle = (0, _styles2.createFontStyle)(theme, {
|
|
64
72
|
selector: _ => (0, _styles.typographyOf)({
|
|
65
|
-
fontSize:
|
|
66
|
-
lineHeight:
|
|
67
|
-
fontFamily: '
|
|
73
|
+
fontSize: 15,
|
|
74
|
+
lineHeight: 19.5,
|
|
75
|
+
fontFamily: 'PretendardStd-SemiBold',
|
|
68
76
|
letterSpacing: 0
|
|
69
77
|
}),
|
|
70
78
|
color: theme.palette.text.strongInverse
|
|
71
79
|
});
|
|
72
80
|
const messageFontStyle = (0, _styles2.createFontStyle)(theme, {
|
|
73
|
-
selector: _ => (0, _styles.typographyOf)({
|
|
74
|
-
fontSize:
|
|
75
|
-
lineHeight:
|
|
76
|
-
fontFamily: '
|
|
81
|
+
selector: _ => title ? (0, _styles.typographyOf)({
|
|
82
|
+
fontSize: 12,
|
|
83
|
+
lineHeight: 15.6,
|
|
84
|
+
fontFamily: 'PretendardStd-Regular',
|
|
85
|
+
letterSpacing: 0
|
|
86
|
+
}) : (0, _styles.typographyOf)({
|
|
87
|
+
fontSize: 14,
|
|
88
|
+
lineHeight: 18.2,
|
|
89
|
+
fontFamily: 'PretendardStd-Regular',
|
|
77
90
|
letterSpacing: 0
|
|
78
91
|
}),
|
|
79
92
|
color: theme.palette.text.strongInverse
|
|
@@ -113,10 +126,14 @@ function SnackbarContent(props) {
|
|
|
113
126
|
flex: 1
|
|
114
127
|
}), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
115
128
|
style: styles.actionButton
|
|
116
|
-
}, typeof actionContent === 'string' ? /*#__PURE__*/_react.default.createElement(_reactNative.
|
|
129
|
+
}, typeof actionContent === 'string' ? /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
130
|
+
style: styles.actionLabel
|
|
131
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
|
|
117
132
|
children: actionContent,
|
|
118
133
|
style: labelFontStyle
|
|
119
|
-
}) :
|
|
134
|
+
})) : /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
135
|
+
style: styles.actionElement
|
|
136
|
+
}, actionContent))) : null);
|
|
120
137
|
}
|
|
121
138
|
|
|
122
139
|
;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useStyles","theme","useTheme","root","flexDirection","alignItems","alignSelf","backgroundColor","palette","surface","accent","borderRadius","maxWidth","paddingBottom","spacing","paddingHorizontal","paddingTop","actionButton","marginLeft","SnackbarContent","props","actionContent","message","title","onPress","style","styleProp","status","startIcon","otherProps","styles","titleFontStyle","createFontStyle","selector","_","typographyOf","fontSize","lineHeight","fontFamily","letterSpacing","color","text","strongInverse","messageFontStyle","labelFontStyle","hasActionButton","rootStyle","css","shape","radius","xl","undefined","width"],"sources":["SnackbarContent.tsx"],"sourcesContent":["import React from 'react';\nimport { Text, View } from 'react-native';\nimport { typographyOf } from '@fountain-ui/styles';\nimport type { NamedStylesStringUnion, UseStyles } from '@fountain-ui/styles';\nimport { createFontStyle, css, useTheme } from '../styles';\nimport ButtonBase from '../ButtonBase/ButtonBase';\nimport Column from '../Column';\nimport Spacer from '../Spacer';\nimport Typography from '../Typography';\nimport type SnackbarContentProps from './SnackbarContentProps';\nimport StatusIcon from './StatusIcon';\n\ntype SnackBarContentStyles = NamedStylesStringUnion<'root' | 'actionButton'>;\n\nconst useStyles: UseStyles<SnackBarContentStyles> = function (): SnackBarContentStyles {\n const theme = useTheme();\n\n return {\n root: {\n flexDirection: 'row',\n alignItems: 'center',\n alignSelf: 'center',\n backgroundColor: theme.palette.surface.accent,\n borderRadius: 22,\n maxWidth: 400,\n paddingBottom: theme.spacing(2.25),\n paddingHorizontal: theme.spacing(4),\n paddingTop: theme.spacing(2),\n },\n actionButton: {\n marginLeft: theme.spacing(6),\n },\n };\n};\n\nexport default function SnackbarContent(props: SnackbarContentProps) {\n const {\n actionContent,\n message,\n title,\n onPress,\n style: styleProp,\n status = 'info',\n startIcon,\n ...otherProps\n } = props;\n\n const styles = useStyles();\n\n const theme = useTheme();\n\n const titleFontStyle = createFontStyle(theme, {\n selector: (_) => typographyOf({\n fontSize:
|
|
1
|
+
{"version":3,"names":["useStyles","theme","useTheme","root","flexDirection","alignItems","alignSelf","backgroundColor","palette","surface","accent","borderRadius","maxWidth","paddingBottom","spacing","paddingHorizontal","paddingTop","actionButton","marginLeft","actionLabel","actionElement","paddingLeft","paddingVertical","SnackbarContent","props","actionContent","message","title","onPress","style","styleProp","status","startIcon","otherProps","styles","titleFontStyle","createFontStyle","selector","_","typographyOf","fontSize","lineHeight","fontFamily","letterSpacing","color","text","strongInverse","messageFontStyle","labelFontStyle","hasActionButton","rootStyle","css","shape","radius","xl","undefined","width"],"sources":["SnackbarContent.tsx"],"sourcesContent":["import React from 'react';\nimport { Text, View } from 'react-native';\nimport { typographyOf } from '@fountain-ui/styles';\nimport type { NamedStylesStringUnion, UseStyles } from '@fountain-ui/styles';\nimport { createFontStyle, css, useTheme } from '../styles';\nimport ButtonBase from '../ButtonBase/ButtonBase';\nimport Column from '../Column';\nimport Spacer from '../Spacer';\nimport Typography from '../Typography';\nimport type SnackbarContentProps from './SnackbarContentProps';\nimport StatusIcon from './StatusIcon';\n\ntype SnackBarContentStyles = NamedStylesStringUnion<'root' | 'actionButton' | 'actionLabel' | 'actionElement'>;\n\nconst useStyles: UseStyles<SnackBarContentStyles> = function (): SnackBarContentStyles {\n const theme = useTheme();\n\n return {\n root: {\n flexDirection: 'row',\n alignItems: 'center',\n alignSelf: 'center',\n backgroundColor: theme.palette.surface.accent,\n borderRadius: 22,\n maxWidth: 400,\n paddingBottom: theme.spacing(2.25),\n paddingHorizontal: theme.spacing(4),\n paddingTop: theme.spacing(2),\n },\n actionButton: {\n marginLeft: theme.spacing(6),\n },\n actionLabel: {\n paddingBottom: theme.spacing(1.5),\n paddingTop: theme.spacing(1.25),\n },\n actionElement: {\n paddingLeft: theme.spacing(2),\n paddingVertical: theme.spacing(1.25),\n },\n };\n};\n\nexport default function SnackbarContent(props: SnackbarContentProps) {\n const {\n actionContent,\n message,\n title,\n onPress,\n style: styleProp,\n status = 'info',\n startIcon,\n ...otherProps\n } = props;\n\n const styles = useStyles();\n\n const theme = useTheme();\n\n const titleFontStyle = createFontStyle(theme, {\n selector: (_) => typographyOf({\n fontSize: 15,\n lineHeight: 19.5,\n fontFamily: 'PretendardStd-SemiBold',\n letterSpacing: 0,\n }),\n color: theme.palette.text.strongInverse,\n });\n\n const messageFontStyle = createFontStyle(theme, {\n selector: (_) => title\n ? typographyOf({\n fontSize: 12,\n lineHeight: 15.6,\n fontFamily: 'PretendardStd-Regular',\n letterSpacing: 0,\n })\n : typographyOf({\n fontSize: 14,\n lineHeight: 18.2,\n fontFamily: 'PretendardStd-Regular',\n letterSpacing: 0,\n }),\n color: theme.palette.text.strongInverse,\n });\n\n const labelFontStyle = createFontStyle(theme, {\n selector: (_) => typographyOf({\n fontSize: 13,\n lineHeight: 16.25,\n fontFamily: 'LexendDeca-SemiBold',\n letterSpacing: -0.26,\n }),\n color: theme.palette.text.accent,\n });\n\n const hasActionButton = !!(actionContent && onPress);\n\n const rootStyle = css([\n styles.root,\n startIcon ? { borderRadius: theme.shape.radius.xl } : undefined,\n hasActionButton ? { width: '100%' } : undefined,\n styleProp,\n ]);\n\n return (\n <ButtonBase\n disabled={!onPress}\n onPress={onPress}\n style={rootStyle}\n {...otherProps}\n >\n {startIcon ? (\n <React.Fragment>\n {startIcon}\n\n <Spacer size={3}/>\n </React.Fragment>\n ) : status !== 'info' ? (\n <React.Fragment>\n <StatusIcon status={status}/>\n\n <Spacer size={1.5}/>\n </React.Fragment>\n ) : null}\n\n <Column>\n {title ? (\n <Typography\n children={title}\n style={css([titleFontStyle])}\n />\n ) : null}\n\n <Text\n children={message}\n style={css([messageFontStyle])}\n />\n </Column>\n\n {actionContent ? (\n <React.Fragment>\n <Spacer flex={1}/>\n\n <View style={styles.actionButton}>\n {typeof actionContent === 'string' ? (\n <View style={styles.actionLabel}>\n <Text\n children={actionContent}\n style={labelFontStyle}\n />\n </View>\n ) : (\n <View style={styles.actionElement}>\n {actionContent}\n </View>\n )}\n </View>\n </React.Fragment>\n ) : null}\n </ButtonBase>\n );\n};\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AAEA;;;;;;AAIA,MAAMA,SAA2C,GAAG,YAAmC;EACnF,MAAMC,KAAK,GAAG,IAAAC,iBAAA,GAAd;EAEA,OAAO;IACHC,IAAI,EAAE;MACFC,aAAa,EAAE,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
11
|
|
|
12
12
|
var _Badge = _interopRequireDefault(require("../Badge"));
|
|
13
13
|
|
|
14
|
-
var _Spacer = _interopRequireDefault(require("../Spacer"));
|
|
15
|
-
|
|
16
14
|
var _TabBase = _interopRequireDefault(require("../TabBase"));
|
|
17
15
|
|
|
18
16
|
var _styles = require("../styles");
|
|
@@ -45,39 +43,41 @@ function Tab(props) {
|
|
|
45
43
|
icon: defaultIcon,
|
|
46
44
|
selected = false,
|
|
47
45
|
selectedIcon,
|
|
46
|
+
size = 'medium',
|
|
48
47
|
variant = 'default',
|
|
49
48
|
style: styleProp,
|
|
50
49
|
onTabInnerLayout,
|
|
51
50
|
...otherProps
|
|
52
51
|
} = props;
|
|
53
|
-
const theme = (0, _styles.useTheme)();
|
|
54
|
-
const vertical = variant === 'bottom-navigation';
|
|
55
52
|
const {
|
|
56
53
|
container: containerStyle,
|
|
54
|
+
iconContainer: iconContainerStyle,
|
|
57
55
|
inner: innerStyle,
|
|
58
56
|
label: labelStyle
|
|
59
|
-
} = (0, _useVariantStyleMap.default)(variant, selected);
|
|
57
|
+
} = (0, _useVariantStyleMap.default)(variant, selected, size);
|
|
60
58
|
const tabBaseStyle = (0, _styles.css)([styles.root, containerStyle, styleProp]);
|
|
61
59
|
const tabInnerStyle = (0, _styles.css)([styles.filledInner, innerStyle]);
|
|
62
|
-
const pressEffect = selected ? 'none' : 'opacity';
|
|
63
60
|
const icon = selected ? selectedIcon || defaultIcon : defaultIcon;
|
|
64
|
-
const
|
|
65
|
-
const iconElement = (0, _utils.cloneElementSafely)(icon, {
|
|
66
|
-
fill: iconColor
|
|
67
|
-
});
|
|
61
|
+
const iconElement = (0, _utils.cloneElementSafely)(icon);
|
|
68
62
|
const tabElement = typeof children !== 'string' ? (0, _utils.cloneElementSafely)(children, {
|
|
69
63
|
selected
|
|
70
64
|
}) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, iconElement ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_Badge.default, {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
}
|
|
65
|
+
horizontalOffset: -4,
|
|
66
|
+
invisible: !badgeVisible,
|
|
67
|
+
verticalOffset: -4
|
|
68
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
69
|
+
style: iconContainerStyle
|
|
70
|
+
}, iconElement)), /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
|
|
71
|
+
style: (0, _styles.css)(labelStyle)
|
|
72
|
+
}, children)) : /*#__PURE__*/_react.default.createElement(_Badge.default, {
|
|
73
|
+
horizontalOffset: -7,
|
|
74
|
+
invisible: !badgeVisible,
|
|
75
|
+
verticalOffset: 3
|
|
76
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
|
|
75
77
|
style: (0, _styles.css)(labelStyle)
|
|
76
|
-
}, children));
|
|
78
|
+
}, children)));
|
|
77
79
|
return /*#__PURE__*/_react.default.createElement(_TabBase.default, _extends({
|
|
78
|
-
|
|
79
|
-
style: tabBaseStyle,
|
|
80
|
-
vertical: vertical
|
|
80
|
+
style: tabBaseStyle
|
|
81
81
|
}, otherProps), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
82
82
|
onLayout: onTabInnerLayout,
|
|
83
83
|
style: tabInnerStyle
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["styles","StyleSheet","create","root","Platform","OS","minWidth","filledInner","alignItems","justifyContent","Tab","props","badgeVisible","children","enableIndicator","icon","defaultIcon","selected","selectedIcon","variant","style","styleProp","onTabInnerLayout","otherProps","
|
|
1
|
+
{"version":3,"names":["styles","StyleSheet","create","root","Platform","OS","minWidth","filledInner","alignItems","justifyContent","Tab","props","badgeVisible","children","enableIndicator","icon","defaultIcon","selected","selectedIcon","size","variant","style","styleProp","onTabInnerLayout","otherProps","container","containerStyle","iconContainer","iconContainerStyle","inner","innerStyle","label","labelStyle","useVariantStyleMap","tabBaseStyle","css","tabInnerStyle","iconElement","cloneElementSafely","tabElement"],"sources":["Tab.tsx"],"sourcesContent":["import React from 'react';\nimport { Platform, Text, View } from 'react-native';\nimport Badge from '../Badge';\nimport TabBase from '../TabBase';\nimport { css, StyleSheet } from '../styles';\nimport { cloneElementSafely } from '../utils';\nimport type TabProps from './TabProps';\nimport type { TabSize, TabVariant } from './TabProps';\nimport useVariantStyleMap from './useVariantStyleMap';\n\nconst styles = StyleSheet.create({\n root: {\n // TODO: Remove redundant platform checking\n ...(Platform.OS === 'web' ? { minWidth: 'auto' } : {}),\n },\n filledInner: {\n alignItems: 'center',\n justifyContent: 'center',\n },\n});\n\nexport default function Tab(props: TabProps) {\n const {\n badgeVisible = false,\n children,\n enableIndicator = false,\n icon: defaultIcon,\n selected = false,\n selectedIcon,\n size = 'medium' as TabSize,\n variant = 'default' as TabVariant,\n style: styleProp,\n onTabInnerLayout,\n ...otherProps\n } = props;\n\n const {\n container: containerStyle,\n iconContainer: iconContainerStyle,\n inner: innerStyle,\n label: labelStyle,\n } = useVariantStyleMap(variant, selected, size);\n\n const tabBaseStyle = css([\n styles.root,\n containerStyle,\n styleProp,\n ]);\n\n const tabInnerStyle = css([\n styles.filledInner,\n innerStyle,\n ]);\n\n const icon = selected ? (selectedIcon || defaultIcon) : defaultIcon;\n const iconElement = cloneElementSafely(icon);\n\n const tabElement = typeof children !== 'string' ? (\n cloneElementSafely(children, {\n selected,\n })\n ) : (\n <React.Fragment>\n {iconElement ? (\n <React.Fragment>\n <Badge\n horizontalOffset={-4}\n invisible={!badgeVisible}\n verticalOffset={-4}\n >\n <View style={iconContainerStyle}>\n {iconElement}\n </View>\n </Badge>\n\n <Text style={css(labelStyle)}>\n {children}\n </Text>\n </React.Fragment>\n ) : (\n <Badge\n horizontalOffset={-7}\n invisible={!badgeVisible}\n verticalOffset={3}\n >\n <Text style={css(labelStyle)}>\n {children}\n </Text>\n </Badge>\n )}\n </React.Fragment>\n );\n\n return (\n <TabBase\n style={tabBaseStyle}\n {...other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G,IAAAC,yBAAA,EAAmBvB,IAAnB,CAApB;EAEA,MAAMwB,UAAU,GAAG,OAAO1B,QAAP,KAAoB,QAApB,GACf,IAAAyB,yBAAA,EAAmBzB,QAAnB,EAA6B;IACzBI;EADyB,CAA7B,CADe,gBAKf,6BAAC,cAAD,CAAO,QAAP,QACKoB,WAAW,gBACR,6BAAC,cAAD,CAAO,QAAP,qBACI,6BAAC,cAAD;IACI,gBAAgB,EAAE,CAAC,CADvB;IAEI,SAAS,EAAE,CAACzB,YAFhB;IAGI,cAAc,EAAE,CAAC;EAHrB,gBAKI,6BAAC,iBAAD;IAAM,KAAK,EAAEgB;EAAb,GACKS,WADL,CALJ,CADJ,eAWI,6BAAC,iBAAD;IAAM,KAAK,EAAE,IAAAF,WAAA,EAAIH,UAAJ;EAAb,GACKnB,QADL,CAXJ,CADQ,gBAiBR,6BAAC,cAAD;IACI,gBAAgB,EAAE,CAAC,CADvB;IAEI,SAAS,EAAE,CAACD,YAFhB;IAGI,cAAc,EAAE;EAHpB,gBAKI,6BAAC,iBAAD;IAAM,KAAK,EAAE,IAAAuB,WAAA,EAAIH,UAAJ;EAAb,GACKnB,QADL,CALJ,CAlBR,CALJ;EAoCA,oBACI,6BAAC,gBAAD;IACI,KAAK,EAAEqB;EADX,GAEQV,UAFR,gBAII,6BAAC,iBAAD;IAAM,QAAQ,EAAED,gBAAhB;IAAkC,KAAK,EAAEa;EAAzC,GACKG,UADL,CAJJ,CADJ;AAUH;;AAAA"}
|
|
@@ -3,7 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.tabVariants = void 0;
|
|
7
|
-
const
|
|
6
|
+
exports.tabVariants = exports.tabSizes = void 0;
|
|
7
|
+
const tabSizes = ['small', 'medium'];
|
|
8
|
+
exports.tabSizes = tabSizes;
|
|
9
|
+
const tabVariants = ['default', 'circular', 'circular-home', 'bottom-navigation'];
|
|
8
10
|
exports.tabVariants = tabVariants;
|
|
9
11
|
//# sourceMappingURL=TabProps.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["tabVariants"],"sources":["TabProps.ts"],"sourcesContent":["import React from 'react';\nimport type { LayoutChangeEvent } from 'react-native';\nimport type { TabBaseProps } from '../TabBase';\nimport type { OverridableComponentProps } from '../types';\n\nexport const tabVariants = ['default', 'circular', 'bottom-navigation'] as const;\nexport type TabVariant = typeof tabVariants[number];\n\nexport default interface TabProps extends OverridableComponentProps<TabBaseProps, {\n /**\n * If `true`, the badge is visible.\n * @default false\n */\n badgeVisible?: boolean;\n\n /**\n * The label of the Tab.\n */\n children: string | React.ReactElement;\n\n /**\n * If `true`, the indicator is enabled.\n * @default false\n */\n enableIndicator?: boolean;\n\n /**\n * If `true`, the component is selected.\n * @default false\n */\n selected?: boolean;\n\n /**\n * Element placed before the children.\n */\n icon?: React.ReactElement;\n\n /**\n * If supplied, use this icon on selected state.\n */\n selectedIcon?: React.ReactElement;\n\n /**\n * The variant to use.\n * @default 'default'\n */\n variant?: TabVariant;\n\n /**\n * Function to be passed to the child component's onLayout prop.\n */\n onTabInnerLayout?: (event: LayoutChangeEvent) => void;\n}> {}\n"],"mappings":";;;;;;AAKO,MAAMA,WAAW,GAAG,CAAC,SAAD,EAAY,UAAZ,EAAwB,
|
|
1
|
+
{"version":3,"names":["tabSizes","tabVariants"],"sources":["TabProps.ts"],"sourcesContent":["import React from 'react';\nimport type { LayoutChangeEvent } from 'react-native';\nimport type { TabBaseProps } from '../TabBase';\nimport type { OverridableComponentProps } from '../types';\n\nexport const tabSizes = ['small', 'medium'] as const;\nexport type TabSize = typeof tabSizes[number];\n\nexport const tabVariants = ['default', 'circular', 'circular-home', 'bottom-navigation'] as const;\nexport type TabVariant = typeof tabVariants[number];\n\nexport default interface TabProps extends OverridableComponentProps<TabBaseProps, {\n /**\n * If `true`, the badge is visible.\n * @default false\n */\n badgeVisible?: boolean;\n\n /**\n * The label of the Tab.\n */\n children: string | React.ReactElement;\n\n /**\n * If `true`, the indicator is enabled.\n * @default false\n */\n enableIndicator?: boolean;\n\n /**\n * If `true`, the component is selected.\n * @default false\n */\n selected?: boolean;\n\n /**\n * Element placed before the children.\n */\n icon?: React.ReactElement;\n\n /**\n * If supplied, use this icon on selected state.\n */\n selectedIcon?: React.ReactElement;\n\n /**\n * The size of the Tab.\n * @default 'medium'\n */\n size?: TabSize;\n\n /**\n * The variant to use.\n * @default 'default'\n */\n variant?: TabVariant;\n\n /**\n * Function to be passed to the child component's onLayout prop.\n */\n onTabInnerLayout?: (event: LayoutChangeEvent) => void;\n}> {}\n"],"mappings":";;;;;;AAKO,MAAMA,QAAQ,GAAG,CAAC,OAAD,EAAU,QAAV,CAAjB;;AAGA,MAAMC,WAAW,GAAG,CAAC,SAAD,EAAY,UAAZ,EAAwB,eAAxB,EAAyC,mBAAzC,CAApB"}
|
|
@@ -9,8 +9,22 @@ Object.defineProperty(exports, "default", {
|
|
|
9
9
|
return _Tab.default;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
|
+
Object.defineProperty(exports, "tabSizes", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () {
|
|
15
|
+
return _TabProps.tabSizes;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
Object.defineProperty(exports, "tabVariants", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function () {
|
|
21
|
+
return _TabProps.tabVariants;
|
|
22
|
+
}
|
|
23
|
+
});
|
|
12
24
|
|
|
13
25
|
var _Tab = _interopRequireDefault(require("./Tab"));
|
|
14
26
|
|
|
27
|
+
var _TabProps = require("./TabProps");
|
|
28
|
+
|
|
15
29
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
16
30
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export { default } from './Tab';\nexport type { default as TabProps, TabVariant } from './TabProps';\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export { default } from './Tab';\nexport type { default as TabProps, TabSize, TabVariant } from './TabProps';\nexport { tabSizes, tabVariants } from './TabProps';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AAEA"}
|