@fountain-ui/core 2.0.0-beta.93 → 2.0.0-beta.95
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 +50 -52
- package/build/commonjs/Accordion/Accordion.js.map +1 -1
- package/build/commonjs/Accordion/AccordionProps.js +7 -0
- package/build/commonjs/Accordion/AccordionProps.js.map +1 -1
- package/build/commonjs/Accordion/LegacyAccordion.js +171 -0
- package/build/commonjs/Accordion/LegacyAccordion.js.map +1 -0
- package/build/commonjs/Accordion/LegacyAccordionProps.js +2 -0
- package/build/commonjs/Accordion/LegacyAccordionProps.js.map +1 -0
- package/build/commonjs/Accordion/index.js +2 -2
- package/build/commonjs/Accordion/index.js.map +1 -1
- package/build/commonjs/Accordion/useVariantStyleMap.js +126 -0
- package/build/commonjs/Accordion/useVariantStyleMap.js.map +1 -0
- package/build/commonjs/Badge/Badge.js +16 -20
- package/build/commonjs/Badge/Badge.js.map +1 -1
- package/build/commonjs/Badge/BadgeProps.js +15 -0
- package/build/commonjs/Badge/BadgeProps.js.map +1 -1
- package/build/commonjs/Badge/LegacyBadge.js +61 -0
- package/build/commonjs/Badge/LegacyBadge.js.map +1 -0
- package/build/commonjs/Badge/LegacyBadgeProps.js +2 -0
- package/build/commonjs/Badge/LegacyBadgeProps.js.map +1 -0
- package/build/commonjs/Badge/index.js +2 -2
- package/build/commonjs/Badge/index.js.map +1 -1
- package/build/commonjs/Badge/useVariantStyleMap.js +74 -0
- package/build/commonjs/Badge/useVariantStyleMap.js.map +1 -0
- package/build/commonjs/Button/Button.js +65 -23
- package/build/commonjs/Button/Button.js.map +1 -1
- package/build/commonjs/Button/ButtonProps.js +1 -1
- package/build/commonjs/Button/ButtonProps.js.map +1 -1
- package/build/commonjs/Button/useVariantStyleMap.js +86 -7
- package/build/commonjs/Button/useVariantStyleMap.js.map +1 -1
- package/build/commonjs/ButtonBase/ButtonBase.js +4 -10
- package/build/commonjs/ButtonBase/ButtonBase.js.map +1 -1
- package/build/commonjs/ButtonBase/LegacyButtonBase.js +126 -0
- package/build/commonjs/ButtonBase/LegacyButtonBase.js.map +1 -0
- package/build/commonjs/ButtonBase/index.js +2 -2
- package/build/commonjs/ButtonBase/index.js.map +1 -1
- package/build/commonjs/Chip/Chip.js +24 -62
- package/build/commonjs/Chip/Chip.js.map +1 -1
- package/build/commonjs/Chip/ChipProps.js +9 -0
- package/build/commonjs/Chip/ChipProps.js.map +1 -1
- package/build/commonjs/Chip/LegacyChip.js +98 -0
- package/build/commonjs/Chip/LegacyChip.js.map +1 -0
- package/build/commonjs/Chip/LegacyChipProps.js +2 -0
- package/build/commonjs/Chip/LegacyChipProps.js.map +1 -0
- package/build/commonjs/Chip/index.js +2 -2
- package/build/commonjs/Chip/index.js.map +1 -1
- package/build/commonjs/Chip/useChipStyle.js +113 -0
- package/build/commonjs/Chip/useChipStyle.js.map +1 -0
- package/build/commonjs/Dialog/Dialog.js +26 -50
- package/build/commonjs/Dialog/Dialog.js.map +1 -1
- package/build/commonjs/Dialog/DialogProps.js +7 -0
- package/build/commonjs/Dialog/DialogProps.js.map +1 -1
- package/build/commonjs/Dialog/LegacyDialog.js +181 -0
- package/build/commonjs/Dialog/LegacyDialog.js.map +1 -0
- package/build/commonjs/Dialog/LegacyDialogProps.js +2 -0
- package/build/commonjs/Dialog/LegacyDialogProps.js.map +1 -0
- package/build/commonjs/Dialog/index.js +2 -2
- package/build/commonjs/Dialog/index.js.map +1 -1
- package/build/commonjs/Dialog/useDialogStyle.js +81 -0
- package/build/commonjs/Dialog/useDialogStyle.js.map +1 -0
- package/build/commonjs/DialogActions/DialogActions.js +2 -2
- package/build/commonjs/DialogActions/DialogActions.js.map +1 -1
- package/build/commonjs/DialogActions/LegacyDialogActions.js +30 -0
- package/build/commonjs/DialogActions/LegacyDialogActions.js.map +1 -0
- package/build/commonjs/DialogActions/index.js +2 -2
- package/build/commonjs/DialogActions/index.js.map +1 -1
- package/build/commonjs/DialogContent/DialogContent.js +30 -11
- package/build/commonjs/DialogContent/DialogContent.js.map +1 -1
- package/build/commonjs/DialogContent/DialogContentProps.js.map +1 -1
- package/build/commonjs/DialogContent/LegacyDialogContent.js +36 -0
- package/build/commonjs/DialogContent/LegacyDialogContent.js.map +1 -0
- package/build/commonjs/DialogContent/LegacyDialogContentProps.js +2 -0
- package/build/commonjs/DialogContent/LegacyDialogContentProps.js.map +1 -0
- package/build/commonjs/DialogContent/index.js +2 -2
- package/build/commonjs/DialogContent/index.js.map +1 -1
- package/build/commonjs/DialogMedia/DialogMedia.js +24 -10
- package/build/commonjs/DialogMedia/DialogMedia.js.map +1 -1
- package/build/commonjs/DialogMedia/DialogMediaProps.js +7 -0
- package/build/commonjs/DialogMedia/DialogMediaProps.js.map +1 -1
- package/build/commonjs/DialogMedia/LegacyDialogMedia.js +33 -0
- package/build/commonjs/DialogMedia/LegacyDialogMedia.js.map +1 -0
- package/build/commonjs/DialogMedia/LegacyDialogMediaProps.js +2 -0
- package/build/commonjs/DialogMedia/LegacyDialogMediaProps.js.map +1 -0
- package/build/commonjs/DialogMedia/index.js +2 -2
- package/build/commonjs/DialogMedia/index.js.map +1 -1
- package/build/commonjs/DialogTitle/DialogTitle.js +27 -11
- package/build/commonjs/DialogTitle/DialogTitle.js.map +1 -1
- package/build/commonjs/DialogTitle/DialogTitleProps.js.map +1 -1
- package/build/commonjs/DialogTitle/LegacyDialogTitle.js +36 -0
- package/build/commonjs/DialogTitle/LegacyDialogTitle.js.map +1 -0
- package/build/commonjs/DialogTitle/LegacyDialogTitleProps.js +2 -0
- package/build/commonjs/DialogTitle/LegacyDialogTitleProps.js.map +1 -0
- package/build/commonjs/DialogTitle/index.js +2 -2
- package/build/commonjs/DialogTitle/index.js.map +1 -1
- package/build/commonjs/Empty/Empty.js +86 -0
- package/build/commonjs/Empty/Empty.js.map +1 -0
- package/build/commonjs/Empty/EmptyProps.js +2 -0
- package/build/commonjs/Empty/EmptyProps.js.map +1 -0
- package/build/commonjs/Empty/index.js +16 -0
- package/build/commonjs/Empty/index.js.map +1 -0
- package/build/commonjs/IconButton/LegacyIconButton.js +3 -2
- package/build/commonjs/IconButton/LegacyIconButton.js.map +1 -1
- package/build/commonjs/IconButton/LegacyIconButtonProps.js.map +1 -1
- package/build/commonjs/Pagination/LegacyPagination.js +145 -0
- package/build/commonjs/Pagination/LegacyPagination.js.map +1 -0
- package/build/commonjs/Pagination/LegacyPaginationProps.js +2 -0
- package/build/commonjs/Pagination/LegacyPaginationProps.js.map +1 -0
- package/build/commonjs/Pagination/NumberPagination.js +71 -0
- package/build/commonjs/Pagination/NumberPagination.js.map +1 -0
- package/build/commonjs/Pagination/Pagination.js +9 -5
- package/build/commonjs/Pagination/Pagination.js.map +1 -1
- package/build/commonjs/Pagination/PaginationProps.js +7 -0
- package/build/commonjs/Pagination/PaginationProps.js.map +1 -1
- package/build/commonjs/Pagination/index.js +2 -2
- package/build/commonjs/Pagination/index.js.map +1 -1
- package/build/commonjs/PaginationItem/LegacyPaginationItem.js +53 -0
- package/build/commonjs/PaginationItem/LegacyPaginationItem.js.map +1 -0
- package/build/commonjs/PaginationItem/PaginationItem.js +2 -2
- package/build/commonjs/PaginationItem/PaginationItem.js.map +1 -1
- package/build/commonjs/Snackbar/LegacySnackbar.js +134 -0
- package/build/commonjs/Snackbar/LegacySnackbar.js.map +1 -0
- package/build/commonjs/Snackbar/LegacySnackbarProps.js +2 -0
- package/build/commonjs/Snackbar/LegacySnackbarProps.js.map +1 -0
- package/build/commonjs/Snackbar/Snackbar.js +7 -5
- package/build/commonjs/Snackbar/Snackbar.js.map +1 -1
- package/build/commonjs/Snackbar/SnackbarProps.js +7 -0
- package/build/commonjs/Snackbar/SnackbarProps.js.map +1 -1
- package/build/commonjs/Snackbar/index.js +2 -2
- package/build/commonjs/Snackbar/index.js.map +1 -1
- package/build/commonjs/SnackbarContent/LegacySnackbarContent.js +105 -0
- package/build/commonjs/SnackbarContent/LegacySnackbarContent.js.map +1 -0
- package/build/commonjs/SnackbarContent/LegacySnackbarContentProps.js +2 -0
- package/build/commonjs/SnackbarContent/LegacySnackbarContentProps.js.map +1 -0
- package/build/commonjs/SnackbarContent/SnackbarContent.js +48 -38
- package/build/commonjs/SnackbarContent/SnackbarContent.js.map +1 -1
- package/build/commonjs/SnackbarContent/SnackbarContentProps.js.map +1 -1
- package/build/commonjs/SnackbarContent/StatusIcon.js +43 -0
- package/build/commonjs/SnackbarContent/StatusIcon.js.map +1 -0
- package/build/commonjs/SnackbarContent/index.js +2 -2
- package/build/commonjs/SnackbarContent/index.js.map +1 -1
- package/build/commonjs/Tab/LegacyTab.js +126 -0
- package/build/commonjs/Tab/LegacyTab.js.map +1 -0
- package/build/commonjs/Tab/LegacyTabProps.js +2 -0
- package/build/commonjs/Tab/LegacyTabProps.js.map +1 -0
- package/build/commonjs/Tab/Tab.js +31 -69
- package/build/commonjs/Tab/Tab.js.map +1 -1
- package/build/commonjs/Tab/TabIndicator.js.map +1 -1
- package/build/commonjs/Tab/TabProps.js +7 -0
- package/build/commonjs/Tab/TabProps.js.map +1 -1
- package/build/commonjs/Tab/index.js +2 -2
- package/build/commonjs/Tab/index.js.map +1 -1
- package/build/commonjs/Tab/useVariantStyleMap.js +80 -0
- package/build/commonjs/Tab/useVariantStyleMap.js.map +1 -0
- package/build/commonjs/TabBase/LegacyTabBase.js +57 -0
- package/build/commonjs/TabBase/LegacyTabBase.js.map +1 -0
- package/build/commonjs/TabBase/TabBase.js +1 -6
- package/build/commonjs/TabBase/TabBase.js.map +1 -1
- package/build/commonjs/TabBase/index.js +2 -2
- package/build/commonjs/TabBase/index.js.map +1 -1
- package/build/commonjs/Tabs/LegacyTabIndicator.js +119 -0
- package/build/commonjs/Tabs/LegacyTabIndicator.js.map +1 -0
- package/build/commonjs/Tabs/LegacyTabIndicatorProps.js +2 -0
- package/build/commonjs/Tabs/LegacyTabIndicatorProps.js.map +1 -0
- package/build/commonjs/Tabs/LegacyTabs.js +205 -0
- package/build/commonjs/Tabs/LegacyTabs.js.map +1 -0
- package/build/commonjs/Tabs/LegacyTabsProps.js +2 -0
- package/build/commonjs/Tabs/LegacyTabsProps.js.map +1 -0
- package/build/commonjs/Tabs/TabIndicator.js +5 -9
- package/build/commonjs/Tabs/TabIndicator.js.map +1 -1
- package/build/commonjs/Tabs/TabIndicatorProps.js.map +1 -1
- package/build/commonjs/Tabs/Tabs.js +10 -9
- package/build/commonjs/Tabs/Tabs.js.map +1 -1
- package/build/commonjs/Tabs/TabsProps.js +7 -0
- package/build/commonjs/Tabs/TabsProps.js.map +1 -1
- package/build/commonjs/Tabs/index.js +2 -2
- package/build/commonjs/Tabs/index.js.map +1 -1
- package/build/commonjs/TextField/LegacyTextField.js +195 -0
- package/build/commonjs/TextField/LegacyTextField.js.map +1 -0
- package/build/commonjs/TextField/LegacyTextFieldProps.js +2 -0
- package/build/commonjs/TextField/LegacyTextFieldProps.js.map +1 -0
- package/build/commonjs/TextField/OutlinedTextField.js.map +1 -1
- package/build/commonjs/TextField/TextField.js +105 -147
- package/build/commonjs/TextField/TextField.js.map +1 -1
- package/build/commonjs/TextField/TextFieldProps.js +9 -0
- package/build/commonjs/TextField/TextFieldProps.js.map +1 -1
- package/build/commonjs/TextField/index.js +2 -2
- package/build/commonjs/TextField/index.js.map +1 -1
- package/build/commonjs/TextField/useVariantStyleMap.js +103 -0
- package/build/commonjs/TextField/useVariantStyleMap.js.map +1 -0
- package/build/commonjs/Tooltip/Beaks/Beak.js +69 -0
- package/build/commonjs/Tooltip/Beaks/Beak.js.map +1 -0
- package/build/commonjs/Tooltip/Beaks/BeakProps.js +2 -0
- package/build/commonjs/Tooltip/Beaks/BeakProps.js.map +1 -0
- package/build/commonjs/Tooltip/Beaks/HorizontalLargeBeak.js +25 -0
- package/build/commonjs/Tooltip/Beaks/HorizontalLargeBeak.js.map +1 -0
- package/build/commonjs/Tooltip/Beaks/HorizontalSmallBeak.js +25 -0
- package/build/commonjs/Tooltip/Beaks/HorizontalSmallBeak.js.map +1 -0
- package/build/commonjs/Tooltip/Beaks/VerticalLargeBeak.js +25 -0
- package/build/commonjs/Tooltip/Beaks/VerticalLargeBeak.js.map +1 -0
- package/build/commonjs/Tooltip/Beaks/VerticalSmallBeak.js +25 -0
- package/build/commonjs/Tooltip/Beaks/VerticalSmallBeak.js.map +1 -0
- package/build/commonjs/Tooltip/Beaks/index.js +16 -0
- package/build/commonjs/Tooltip/Beaks/index.js.map +1 -0
- package/build/commonjs/Tooltip/LegacyTooltip.js +147 -0
- package/build/commonjs/Tooltip/LegacyTooltip.js.map +1 -0
- package/build/commonjs/Tooltip/LegacyTooltipProps.js +2 -0
- package/build/commonjs/Tooltip/LegacyTooltipProps.js.map +1 -0
- package/build/commonjs/Tooltip/Tooltip.js +101 -52
- package/build/commonjs/Tooltip/Tooltip.js.map +1 -1
- package/build/commonjs/Tooltip/TooltipProps.js +11 -0
- package/build/commonjs/Tooltip/TooltipProps.js.map +1 -1
- package/build/commonjs/Tooltip/index.js +2 -2
- package/build/commonjs/Tooltip/index.js.map +1 -1
- package/build/commonjs/hooks/useCollapsibleAppBar.js +2 -3
- package/build/commonjs/hooks/useCollapsibleAppBar.js.map +1 -1
- package/build/commonjs/index.js +21 -0
- package/build/commonjs/index.js.map +1 -1
- package/build/commonjs/internal/icons/CheckCircle.js +27 -0
- package/build/commonjs/internal/icons/CheckCircle.js.map +1 -0
- package/build/commonjs/internal/icons/Clear.js +27 -0
- package/build/commonjs/internal/icons/Clear.js.map +1 -0
- package/build/commonjs/internal/icons/EyeOff.js +31 -0
- package/build/commonjs/internal/icons/EyeOff.js.map +1 -0
- package/build/commonjs/internal/icons/EyeOn.js +27 -0
- package/build/commonjs/internal/icons/EyeOn.js.map +1 -0
- package/build/commonjs/internal/icons/InfoCircle.js +27 -0
- package/build/commonjs/internal/icons/InfoCircle.js.map +1 -0
- package/build/commonjs/internal/icons/LoadingSpinner/LoadingSpinnerProps.js +2 -0
- package/build/commonjs/internal/icons/LoadingSpinner/LoadingSpinnerProps.js.map +1 -0
- package/build/commonjs/internal/icons/LoadingSpinner/index.js +36 -0
- package/build/commonjs/internal/icons/LoadingSpinner/index.js.map +1 -0
- package/build/commonjs/internal/icons/LoadingSpinner/index.native.js +36 -0
- package/build/commonjs/internal/icons/LoadingSpinner/index.native.js.map +1 -0
- package/build/commonjs/internal/icons/LoadingSpinner/loadingSpinnerGray.json +1 -0
- package/build/commonjs/internal/icons/LoadingSpinner/loadingSpinnerWhite.json +1 -0
- package/build/commonjs/internal/icons/LoadingSpinner/utils.js +25 -0
- package/build/commonjs/internal/icons/LoadingSpinner/utils.js.map +1 -0
- package/build/commonjs/internal/icons/Search.js +23 -0
- package/build/commonjs/internal/icons/Search.js.map +1 -0
- package/build/commonjs/internal/icons/index.js +56 -0
- package/build/commonjs/internal/icons/index.js.map +1 -1
- package/build/module/Accordion/Accordion.js +47 -50
- package/build/module/Accordion/Accordion.js.map +1 -1
- package/build/module/Accordion/AccordionProps.js +1 -1
- package/build/module/Accordion/AccordionProps.js.map +1 -1
- package/build/module/Accordion/LegacyAccordion.js +148 -0
- package/build/module/Accordion/LegacyAccordion.js.map +1 -0
- package/build/module/Accordion/LegacyAccordionProps.js +2 -0
- package/build/module/Accordion/LegacyAccordionProps.js.map +1 -0
- package/build/module/Accordion/index.js +1 -1
- package/build/module/Accordion/index.js.map +1 -1
- package/build/module/Accordion/useVariantStyleMap.js +116 -0
- package/build/module/Accordion/useVariantStyleMap.js.map +1 -0
- package/build/module/Badge/Badge.js +17 -23
- package/build/module/Badge/Badge.js.map +1 -1
- package/build/module/Badge/BadgeProps.js +5 -1
- package/build/module/Badge/BadgeProps.js.map +1 -1
- package/build/module/Badge/LegacyBadge.js +48 -0
- package/build/module/Badge/LegacyBadge.js.map +1 -0
- package/build/module/Badge/LegacyBadgeProps.js +2 -0
- package/build/module/Badge/LegacyBadgeProps.js.map +1 -0
- package/build/module/Badge/index.js +1 -1
- package/build/module/Badge/index.js.map +1 -1
- package/build/module/Badge/useVariantStyleMap.js +64 -0
- package/build/module/Badge/useVariantStyleMap.js.map +1 -0
- package/build/module/Button/Button.js +59 -19
- package/build/module/Button/Button.js.map +1 -1
- package/build/module/Button/ButtonProps.js +1 -1
- package/build/module/Button/ButtonProps.js.map +1 -1
- package/build/module/Button/useVariantStyleMap.js +86 -7
- package/build/module/Button/useVariantStyleMap.js.map +1 -1
- package/build/module/ButtonBase/ButtonBase.js +4 -9
- package/build/module/ButtonBase/ButtonBase.js.map +1 -1
- package/build/module/ButtonBase/LegacyButtonBase.js +106 -0
- package/build/module/ButtonBase/LegacyButtonBase.js.map +1 -0
- package/build/module/ButtonBase/index.js +1 -1
- package/build/module/ButtonBase/index.js.map +1 -1
- package/build/module/Chip/Chip.js +25 -64
- package/build/module/Chip/Chip.js.map +1 -1
- package/build/module/Chip/ChipProps.js +2 -1
- package/build/module/Chip/ChipProps.js.map +1 -1
- package/build/module/Chip/LegacyChip.js +84 -0
- package/build/module/Chip/LegacyChip.js.map +1 -0
- package/build/module/Chip/LegacyChipProps.js +2 -0
- package/build/module/Chip/LegacyChipProps.js.map +1 -0
- package/build/module/Chip/index.js +1 -1
- package/build/module/Chip/index.js.map +1 -1
- package/build/module/Chip/useChipStyle.js +104 -0
- package/build/module/Chip/useChipStyle.js.map +1 -0
- package/build/module/Dialog/Dialog.js +23 -52
- 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/LegacyDialog.js +160 -0
- package/build/module/Dialog/LegacyDialog.js.map +1 -0
- package/build/module/Dialog/LegacyDialogProps.js +2 -0
- package/build/module/Dialog/LegacyDialogProps.js.map +1 -0
- package/build/module/Dialog/index.js +1 -1
- package/build/module/Dialog/index.js.map +1 -1
- package/build/module/Dialog/useDialogStyle.js +71 -0
- package/build/module/Dialog/useDialogStyle.js.map +1 -0
- package/build/module/DialogActions/DialogActions.js +2 -2
- package/build/module/DialogActions/DialogActions.js.map +1 -1
- package/build/module/DialogActions/LegacyDialogActions.js +17 -0
- package/build/module/DialogActions/LegacyDialogActions.js.map +1 -0
- package/build/module/DialogActions/index.js +1 -1
- package/build/module/DialogActions/index.js.map +1 -1
- package/build/module/DialogContent/DialogContent.js +32 -11
- package/build/module/DialogContent/DialogContent.js.map +1 -1
- package/build/module/DialogContent/DialogContentProps.js.map +1 -1
- package/build/module/DialogContent/LegacyDialogContent.js +22 -0
- package/build/module/DialogContent/LegacyDialogContent.js.map +1 -0
- package/build/module/DialogContent/LegacyDialogContentProps.js +2 -0
- package/build/module/DialogContent/LegacyDialogContentProps.js.map +1 -0
- package/build/module/DialogContent/index.js +1 -1
- package/build/module/DialogContent/index.js.map +1 -1
- package/build/module/DialogMedia/DialogMedia.js +24 -10
- package/build/module/DialogMedia/DialogMedia.js.map +1 -1
- package/build/module/DialogMedia/DialogMediaProps.js +1 -1
- package/build/module/DialogMedia/DialogMediaProps.js.map +1 -1
- package/build/module/DialogMedia/LegacyDialogMedia.js +21 -0
- package/build/module/DialogMedia/LegacyDialogMedia.js.map +1 -0
- package/build/module/DialogMedia/LegacyDialogMediaProps.js +2 -0
- package/build/module/DialogMedia/LegacyDialogMediaProps.js.map +1 -0
- package/build/module/DialogMedia/index.js +1 -1
- package/build/module/DialogMedia/index.js.map +1 -1
- package/build/module/DialogTitle/DialogTitle.js +29 -11
- package/build/module/DialogTitle/DialogTitle.js.map +1 -1
- package/build/module/DialogTitle/DialogTitleProps.js.map +1 -1
- package/build/module/DialogTitle/LegacyDialogTitle.js +22 -0
- package/build/module/DialogTitle/LegacyDialogTitle.js.map +1 -0
- package/build/module/DialogTitle/LegacyDialogTitleProps.js +2 -0
- package/build/module/DialogTitle/LegacyDialogTitleProps.js.map +1 -0
- package/build/module/DialogTitle/index.js +1 -1
- package/build/module/DialogTitle/index.js.map +1 -1
- package/build/module/Empty/Empty.js +71 -0
- package/build/module/Empty/Empty.js.map +1 -0
- package/build/module/Empty/EmptyProps.js +2 -0
- package/build/module/Empty/EmptyProps.js.map +1 -0
- package/build/module/Empty/index.js +2 -0
- package/build/module/Empty/index.js.map +1 -0
- package/build/module/IconButton/LegacyIconButton.js +3 -2
- package/build/module/IconButton/LegacyIconButton.js.map +1 -1
- package/build/module/IconButton/LegacyIconButtonProps.js.map +1 -1
- package/build/module/Pagination/LegacyPagination.js +129 -0
- package/build/module/Pagination/LegacyPagination.js.map +1 -0
- package/build/module/Pagination/LegacyPaginationProps.js +2 -0
- package/build/module/Pagination/LegacyPaginationProps.js.map +1 -0
- package/build/module/Pagination/NumberPagination.js +57 -0
- package/build/module/Pagination/NumberPagination.js.map +1 -0
- package/build/module/Pagination/Pagination.js +8 -5
- package/build/module/Pagination/Pagination.js.map +1 -1
- package/build/module/Pagination/PaginationProps.js +1 -1
- 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/LegacyPaginationItem.js +40 -0
- package/build/module/PaginationItem/LegacyPaginationItem.js.map +1 -0
- package/build/module/PaginationItem/PaginationItem.js +2 -2
- package/build/module/PaginationItem/PaginationItem.js.map +1 -1
- package/build/module/Snackbar/LegacySnackbar.js +107 -0
- package/build/module/Snackbar/LegacySnackbar.js.map +1 -0
- package/build/module/Snackbar/LegacySnackbarProps.js +2 -0
- package/build/module/Snackbar/LegacySnackbarProps.js.map +1 -0
- package/build/module/Snackbar/Snackbar.js +7 -5
- package/build/module/Snackbar/Snackbar.js.map +1 -1
- package/build/module/Snackbar/SnackbarProps.js +1 -1
- package/build/module/Snackbar/SnackbarProps.js.map +1 -1
- package/build/module/Snackbar/index.js +1 -1
- package/build/module/Snackbar/index.js.map +1 -1
- package/build/module/SnackbarContent/LegacySnackbarContent.js +84 -0
- package/build/module/SnackbarContent/LegacySnackbarContent.js.map +1 -0
- package/build/module/SnackbarContent/LegacySnackbarContentProps.js +2 -0
- package/build/module/SnackbarContent/LegacySnackbarContentProps.js.map +1 -0
- package/build/module/SnackbarContent/SnackbarContent.js +48 -35
- package/build/module/SnackbarContent/SnackbarContent.js.map +1 -1
- package/build/module/SnackbarContent/SnackbarContentProps.js.map +1 -1
- package/build/module/SnackbarContent/StatusIcon.js +31 -0
- package/build/module/SnackbarContent/StatusIcon.js.map +1 -0
- package/build/module/SnackbarContent/index.js +1 -1
- package/build/module/SnackbarContent/index.js.map +1 -1
- package/build/module/Tab/LegacyTab.js +105 -0
- package/build/module/Tab/LegacyTab.js.map +1 -0
- package/build/module/Tab/LegacyTabProps.js +2 -0
- package/build/module/Tab/LegacyTabProps.js.map +1 -0
- package/build/module/Tab/Tab.js +30 -66
- package/build/module/Tab/Tab.js.map +1 -1
- package/build/module/Tab/TabIndicator.js.map +1 -1
- package/build/module/Tab/TabProps.js +1 -1
- package/build/module/Tab/TabProps.js.map +1 -1
- package/build/module/Tab/index.js +1 -1
- package/build/module/Tab/index.js.map +1 -1
- package/build/module/Tab/useVariantStyleMap.js +70 -0
- package/build/module/Tab/useVariantStyleMap.js.map +1 -0
- package/build/module/TabBase/LegacyTabBase.js +44 -0
- package/build/module/TabBase/LegacyTabBase.js.map +1 -0
- package/build/module/TabBase/TabBase.js +1 -5
- package/build/module/TabBase/TabBase.js.map +1 -1
- package/build/module/TabBase/index.js +1 -1
- package/build/module/TabBase/index.js.map +1 -1
- package/build/module/Tabs/LegacyTabIndicator.js +98 -0
- package/build/module/Tabs/LegacyTabIndicator.js.map +1 -0
- package/build/module/Tabs/LegacyTabIndicatorProps.js +2 -0
- package/build/module/Tabs/LegacyTabIndicatorProps.js.map +1 -0
- package/build/module/Tabs/LegacyTabs.js +180 -0
- package/build/module/Tabs/LegacyTabs.js.map +1 -0
- package/build/module/Tabs/LegacyTabsProps.js +2 -0
- package/build/module/Tabs/LegacyTabsProps.js.map +1 -0
- package/build/module/Tabs/TabIndicator.js +5 -9
- package/build/module/Tabs/TabIndicator.js.map +1 -1
- package/build/module/Tabs/TabIndicatorProps.js.map +1 -1
- package/build/module/Tabs/Tabs.js +10 -9
- package/build/module/Tabs/Tabs.js.map +1 -1
- package/build/module/Tabs/TabsProps.js +1 -1
- package/build/module/Tabs/TabsProps.js.map +1 -1
- package/build/module/Tabs/index.js +1 -1
- package/build/module/Tabs/index.js.map +1 -1
- package/build/module/TextField/LegacyTextField.js +169 -0
- package/build/module/TextField/LegacyTextField.js.map +1 -0
- package/build/module/TextField/LegacyTextFieldProps.js +2 -0
- package/build/module/TextField/LegacyTextFieldProps.js.map +1 -0
- package/build/module/TextField/OutlinedTextField.js.map +1 -1
- package/build/module/TextField/TextField.js +104 -144
- package/build/module/TextField/TextField.js.map +1 -1
- package/build/module/TextField/TextFieldProps.js +2 -1
- package/build/module/TextField/TextFieldProps.js.map +1 -1
- package/build/module/TextField/index.js +1 -1
- package/build/module/TextField/index.js.map +1 -1
- package/build/module/TextField/useVariantStyleMap.js +94 -0
- package/build/module/TextField/useVariantStyleMap.js.map +1 -0
- package/build/module/Tooltip/Beaks/Beak.js +56 -0
- package/build/module/Tooltip/Beaks/Beak.js.map +1 -0
- package/build/module/Tooltip/Beaks/BeakProps.js +2 -0
- package/build/module/Tooltip/Beaks/BeakProps.js.map +1 -0
- package/build/module/Tooltip/Beaks/HorizontalLargeBeak.js +14 -0
- package/build/module/Tooltip/Beaks/HorizontalLargeBeak.js.map +1 -0
- package/build/module/Tooltip/Beaks/HorizontalSmallBeak.js +14 -0
- package/build/module/Tooltip/Beaks/HorizontalSmallBeak.js.map +1 -0
- package/build/module/Tooltip/Beaks/VerticalLargeBeak.js +14 -0
- package/build/module/Tooltip/Beaks/VerticalLargeBeak.js.map +1 -0
- package/build/module/Tooltip/Beaks/VerticalSmallBeak.js +14 -0
- package/build/module/Tooltip/Beaks/VerticalSmallBeak.js.map +1 -0
- package/build/module/Tooltip/Beaks/index.js +2 -0
- package/build/module/Tooltip/Beaks/index.js.map +1 -0
- package/build/module/Tooltip/LegacyTooltip.js +121 -0
- package/build/module/Tooltip/LegacyTooltip.js.map +1 -0
- package/build/module/Tooltip/LegacyTooltipProps.js +2 -0
- package/build/module/Tooltip/LegacyTooltipProps.js.map +1 -0
- package/build/module/Tooltip/Tooltip.js +97 -46
- package/build/module/Tooltip/Tooltip.js.map +1 -1
- package/build/module/Tooltip/TooltipProps.js +3 -1
- package/build/module/Tooltip/TooltipProps.js.map +1 -1
- package/build/module/Tooltip/index.js +1 -1
- package/build/module/Tooltip/index.js.map +1 -1
- package/build/module/hooks/useCollapsibleAppBar.js +2 -3
- package/build/module/hooks/useCollapsibleAppBar.js.map +1 -1
- package/build/module/index.js +2 -0
- package/build/module/index.js.map +1 -1
- package/build/module/internal/icons/CheckCircle.js +13 -0
- package/build/module/internal/icons/CheckCircle.js.map +1 -0
- package/build/module/internal/icons/Clear.js +13 -0
- package/build/module/internal/icons/Clear.js.map +1 -0
- package/build/module/internal/icons/EyeOff.js +17 -0
- package/build/module/internal/icons/EyeOff.js.map +1 -0
- package/build/module/internal/icons/EyeOn.js +13 -0
- package/build/module/internal/icons/EyeOn.js.map +1 -0
- package/build/module/internal/icons/InfoCircle.js +13 -0
- package/build/module/internal/icons/InfoCircle.js.map +1 -0
- package/build/module/internal/icons/LoadingSpinner/LoadingSpinnerProps.js +2 -0
- package/build/module/internal/icons/LoadingSpinner/LoadingSpinnerProps.js.map +1 -0
- package/build/module/internal/icons/LoadingSpinner/index.js +23 -0
- package/build/module/internal/icons/LoadingSpinner/index.js.map +1 -0
- package/build/module/internal/icons/LoadingSpinner/index.native.js +23 -0
- package/build/module/internal/icons/LoadingSpinner/index.native.js.map +1 -0
- package/build/module/internal/icons/LoadingSpinner/loadingSpinnerGray.json +1 -0
- package/build/module/internal/icons/LoadingSpinner/loadingSpinnerWhite.json +1 -0
- package/build/module/internal/icons/LoadingSpinner/utils.js +12 -0
- package/build/module/internal/icons/LoadingSpinner/utils.js.map +1 -0
- package/build/module/internal/icons/Search.js +9 -0
- package/build/module/internal/icons/Search.js.map +1 -0
- package/build/module/internal/icons/index.js +7 -0
- package/build/module/internal/icons/index.js.map +1 -1
- package/build/typescript/Accordion/Accordion.d.ts +1 -1
- package/build/typescript/Accordion/AccordionProps.d.ts +8 -1
- package/build/typescript/Accordion/LegacyAccordion.d.ts +3 -0
- package/build/typescript/Accordion/LegacyAccordionProps.d.ts +28 -0
- package/build/typescript/Accordion/index.d.ts +2 -2
- package/build/typescript/Accordion/useVariantStyleMap.d.ts +13 -0
- package/build/typescript/Badge/Badge.d.ts +1 -1
- package/build/typescript/Badge/BadgeProps.d.ts +28 -2
- package/build/typescript/Badge/LegacyBadge.d.ts +3 -0
- package/build/typescript/Badge/LegacyBadgeProps.d.ts +34 -0
- package/build/typescript/Badge/index.d.ts +2 -2
- package/build/typescript/Badge/useVariantStyleMap.d.ts +9 -0
- package/build/typescript/Button/ButtonProps.d.ts +6 -1
- package/build/typescript/Button/useVariantStyleMap.d.ts +2 -2
- package/build/typescript/ButtonBase/ButtonBase.d.ts +0 -1
- package/build/typescript/ButtonBase/LegacyButtonBase.d.ts +5 -0
- package/build/typescript/ButtonBase/index.d.ts +1 -1
- package/build/typescript/Chip/ChipProps.d.ts +13 -6
- package/build/typescript/Chip/LegacyChip.d.ts +3 -0
- package/build/typescript/Chip/LegacyChipProps.d.ts +28 -0
- package/build/typescript/Chip/index.d.ts +2 -2
- package/build/typescript/Chip/useChipStyle.d.ts +11 -0
- package/build/typescript/Dialog/DialogProps.d.ts +7 -0
- package/build/typescript/Dialog/LegacyDialog.d.ts +3 -0
- package/build/typescript/Dialog/LegacyDialogProps.d.ts +25 -0
- package/build/typescript/Dialog/index.d.ts +2 -2
- package/build/typescript/Dialog/useDialogStyle.d.ts +6 -0
- package/build/typescript/DialogActions/LegacyDialogActions.d.ts +3 -0
- package/build/typescript/DialogActions/index.d.ts +1 -1
- package/build/typescript/DialogContent/DialogContentProps.d.ts +5 -5
- package/build/typescript/DialogContent/LegacyDialogContent.d.ts +3 -0
- package/build/typescript/DialogContent/LegacyDialogContentProps.d.ts +10 -0
- package/build/typescript/DialogContent/index.d.ts +2 -2
- package/build/typescript/DialogMedia/DialogMediaProps.d.ts +7 -10
- package/build/typescript/DialogMedia/LegacyDialogMedia.d.ts +3 -0
- package/build/typescript/DialogMedia/LegacyDialogMediaProps.d.ts +15 -0
- package/build/typescript/DialogMedia/index.d.ts +2 -2
- package/build/typescript/DialogTitle/DialogTitleProps.d.ts +2 -13
- package/build/typescript/DialogTitle/LegacyDialogTitle.d.ts +3 -0
- package/build/typescript/DialogTitle/LegacyDialogTitleProps.d.ts +15 -0
- package/build/typescript/DialogTitle/index.d.ts +2 -2
- package/build/typescript/Empty/Empty.d.ts +3 -0
- package/build/typescript/Empty/EmptyProps.d.ts +27 -0
- package/build/typescript/Empty/index.d.ts +2 -0
- package/build/typescript/IconButton/LegacyIconButtonProps.d.ts +4 -0
- package/build/typescript/Pagination/LegacyPagination.d.ts +3 -0
- package/build/typescript/Pagination/LegacyPaginationProps.d.ts +71 -0
- package/build/typescript/Pagination/NumberPagination.d.ts +8 -0
- package/build/typescript/Pagination/PaginationProps.d.ts +7 -0
- package/build/typescript/Pagination/index.d.ts +2 -2
- package/build/typescript/PaginationItem/LegacyPaginationItem.d.ts +5 -0
- package/build/typescript/Snackbar/LegacySnackbar.d.ts +3 -0
- package/build/typescript/Snackbar/LegacySnackbarProps.d.ts +51 -0
- package/build/typescript/Snackbar/SnackbarProps.d.ts +9 -2
- package/build/typescript/Snackbar/index.d.ts +2 -2
- package/build/typescript/SnackbarContent/LegacySnackbarContent.d.ts +3 -0
- package/build/typescript/SnackbarContent/LegacySnackbarContentProps.d.ts +26 -0
- package/build/typescript/SnackbarContent/SnackbarContentProps.d.ts +5 -24
- package/build/typescript/SnackbarContent/StatusIcon.d.ts +7 -0
- package/build/typescript/SnackbarContent/index.d.ts +2 -2
- package/build/typescript/Tab/LegacyTab.d.ts +3 -0
- package/build/typescript/Tab/LegacyTabProps.d.ts +58 -0
- package/build/typescript/Tab/TabIndicator.d.ts +2 -2
- package/build/typescript/Tab/TabProps.d.ts +3 -16
- package/build/typescript/Tab/index.d.ts +2 -2
- package/build/typescript/Tab/useVariantStyleMap.d.ts +10 -0
- package/build/typescript/TabBase/LegacyTabBase.d.ts +3 -0
- package/build/typescript/TabBase/index.d.ts +1 -1
- package/build/typescript/Tabs/LegacyTabIndicator.d.ts +3 -0
- package/build/typescript/Tabs/LegacyTabIndicatorProps.d.ts +28 -0
- package/build/typescript/Tabs/LegacyTabs.d.ts +5 -0
- package/build/typescript/Tabs/LegacyTabsProps.d.ts +74 -0
- package/build/typescript/Tabs/TabIndicatorProps.d.ts +0 -10
- package/build/typescript/Tabs/Tabs.d.ts +1 -1
- package/build/typescript/Tabs/TabsProps.d.ts +10 -10
- package/build/typescript/Tabs/index.d.ts +2 -2
- package/build/typescript/TextField/LegacyTextField.d.ts +5 -0
- package/build/typescript/TextField/LegacyTextFieldProps.d.ts +67 -0
- package/build/typescript/TextField/OutlinedTextField.d.ts +1 -1
- package/build/typescript/TextField/TextField.d.ts +1 -1
- package/build/typescript/TextField/TextFieldProps.d.ts +25 -51
- package/build/typescript/TextField/index.d.ts +2 -2
- package/build/typescript/TextField/useVariantStyleMap.d.ts +9 -0
- package/build/typescript/Tooltip/Beaks/Beak.d.ts +3 -0
- package/build/typescript/Tooltip/Beaks/BeakProps.d.ts +4 -0
- package/build/typescript/Tooltip/Beaks/HorizontalLargeBeak.d.ts +3 -0
- package/build/typescript/Tooltip/Beaks/HorizontalSmallBeak.d.ts +3 -0
- package/build/typescript/Tooltip/Beaks/VerticalLargeBeak.d.ts +3 -0
- package/build/typescript/Tooltip/Beaks/VerticalSmallBeak.d.ts +3 -0
- package/build/typescript/Tooltip/Beaks/index.d.ts +2 -0
- package/build/typescript/Tooltip/LegacyTooltip.d.ts +3 -0
- package/build/typescript/Tooltip/LegacyTooltipProps.d.ts +72 -0
- package/build/typescript/Tooltip/TooltipProps.d.ts +19 -9
- package/build/typescript/Tooltip/index.d.ts +2 -2
- package/build/typescript/index.d.ts +2 -0
- package/build/typescript/internal/icons/CheckCircle.d.ts +8 -0
- package/build/typescript/internal/icons/Clear.d.ts +8 -0
- package/build/typescript/internal/icons/EyeOff.d.ts +8 -0
- package/build/typescript/internal/icons/EyeOn.d.ts +8 -0
- package/build/typescript/internal/icons/InfoCircle.d.ts +8 -0
- package/build/typescript/internal/icons/LoadingSpinner/LoadingSpinnerProps.d.ts +9 -0
- package/build/typescript/internal/icons/LoadingSpinner/index.d.ts +3 -0
- package/build/typescript/internal/icons/LoadingSpinner/index.native.d.ts +3 -0
- package/build/typescript/internal/icons/LoadingSpinner/utils.d.ts +3 -0
- package/build/typescript/internal/icons/Search.d.ts +8 -0
- package/build/typescript/internal/icons/index.d.ts +7 -0
- package/package.json +3 -3
- package/src/Accordion/Accordion.tsx +75 -72
- package/src/Accordion/AccordionProps.ts +11 -2
- package/src/Accordion/LegacyAccordion.tsx +188 -0
- package/src/Accordion/LegacyAccordionProps.ts +34 -0
- package/src/Accordion/index.ts +2 -2
- package/src/Accordion/useVariantStyleMap.ts +127 -0
- package/src/Badge/Badge.tsx +23 -29
- package/src/Badge/BadgeProps.ts +35 -2
- package/src/Badge/LegacyBadge.tsx +66 -0
- package/src/Badge/LegacyBadgeProps.ts +40 -0
- package/src/Badge/index.ts +2 -2
- package/src/Badge/useVariantStyleMap.ts +73 -0
- package/src/Button/Button.tsx +72 -22
- package/src/Button/ButtonProps.ts +8 -0
- package/src/Button/useVariantStyleMap.ts +88 -9
- package/src/ButtonBase/ButtonBase.tsx +4 -10
- package/src/ButtonBase/LegacyButtonBase.tsx +135 -0
- package/src/ButtonBase/index.ts +2 -2
- package/src/Chip/Chip.tsx +26 -82
- package/src/Chip/ChipProps.ts +16 -7
- package/src/Chip/LegacyChip.tsx +116 -0
- package/src/Chip/LegacyChipProps.ts +33 -0
- package/src/Chip/index.ts +2 -2
- package/src/Chip/useChipStyle.ts +123 -0
- package/src/Dialog/Dialog.tsx +27 -69
- package/src/Dialog/DialogProps.ts +9 -0
- package/src/Dialog/LegacyDialog.tsx +198 -0
- package/src/Dialog/LegacyDialogProps.ts +28 -0
- package/src/Dialog/index.ts +2 -2
- package/src/Dialog/useDialogStyle.ts +90 -0
- package/src/DialogActions/DialogActions.tsx +2 -4
- package/src/DialogActions/LegacyDialogActions.tsx +23 -0
- package/src/DialogActions/index.ts +2 -2
- package/src/DialogContent/DialogContent.tsx +47 -16
- package/src/DialogContent/DialogContentProps.ts +5 -5
- package/src/DialogContent/LegacyDialogContent.tsx +30 -0
- package/src/DialogContent/LegacyDialogContentProps.ts +10 -0
- package/src/DialogContent/index.ts +2 -2
- package/src/DialogMedia/DialogMedia.tsx +35 -8
- package/src/DialogMedia/DialogMediaProps.ts +7 -10
- package/src/DialogMedia/LegacyDialogMedia.tsx +21 -0
- package/src/DialogMedia/LegacyDialogMediaProps.ts +16 -0
- package/src/DialogMedia/index.ts +2 -2
- package/src/DialogTitle/DialogTitle.tsx +46 -16
- package/src/DialogTitle/DialogTitleProps.ts +2 -14
- package/src/DialogTitle/LegacyDialogTitle.tsx +30 -0
- package/src/DialogTitle/LegacyDialogTitleProps.ts +16 -0
- package/src/DialogTitle/index.ts +2 -2
- package/src/Empty/Empty.tsx +108 -0
- package/src/Empty/EmptyProps.ts +31 -0
- package/src/Empty/index.ts +2 -0
- package/src/IconButton/LegacyIconButton.tsx +3 -2
- package/src/IconButton/LegacyIconButtonProps.ts +5 -0
- package/src/Pagination/LegacyPagination.tsx +168 -0
- package/src/Pagination/LegacyPaginationProps.ts +85 -0
- package/src/Pagination/NumberPagination.tsx +78 -0
- package/src/Pagination/Pagination.tsx +15 -5
- package/src/Pagination/PaginationProps.ts +9 -0
- package/src/Pagination/index.ts +2 -2
- package/src/PaginationItem/LegacyPaginationItem.tsx +52 -0
- package/src/PaginationItem/PaginationItem.tsx +2 -2
- package/src/Snackbar/LegacySnackbar.tsx +130 -0
- package/src/Snackbar/LegacySnackbarProps.ts +61 -0
- package/src/Snackbar/Snackbar.tsx +7 -5
- package/src/Snackbar/SnackbarProps.ts +11 -3
- package/src/Snackbar/index.ts +2 -2
- package/src/SnackbarContent/LegacySnackbarContent.tsx +129 -0
- package/src/SnackbarContent/LegacySnackbarContentProps.ts +30 -0
- package/src/SnackbarContent/SnackbarContent.tsx +53 -48
- package/src/SnackbarContent/SnackbarContentProps.ts +10 -27
- package/src/SnackbarContent/StatusIcon.tsx +37 -0
- package/src/SnackbarContent/index.ts +2 -2
- package/src/Tab/LegacyTab.tsx +141 -0
- package/src/Tab/LegacyTabProps.ts +68 -0
- package/src/Tab/Tab.tsx +36 -79
- package/src/Tab/TabIndicator.tsx +5 -2
- package/src/Tab/TabProps.ts +3 -18
- package/src/Tab/index.ts +2 -2
- package/src/Tab/useVariantStyleMap.ts +86 -0
- package/src/TabBase/LegacyTabBase.tsx +55 -0
- package/src/TabBase/TabBase.tsx +0 -5
- package/src/TabBase/index.ts +2 -2
- package/src/Tabs/LegacyTabIndicator.tsx +111 -0
- package/src/Tabs/LegacyTabIndicatorProps.ts +33 -0
- package/src/Tabs/LegacyTabs.tsx +225 -0
- package/src/Tabs/LegacyTabsProps.ts +87 -0
- package/src/Tabs/TabIndicator.tsx +6 -12
- package/src/Tabs/TabIndicatorProps.ts +0 -13
- package/src/Tabs/Tabs.tsx +12 -8
- package/src/Tabs/TabsProps.ts +12 -11
- package/src/Tabs/index.ts +2 -2
- package/src/TextField/LegacyTextField.tsx +168 -0
- package/src/TextField/LegacyTextFieldProps.ts +80 -0
- package/src/TextField/OutlinedTextField.tsx +1 -1
- package/src/TextField/TextField.tsx +155 -137
- package/src/TextField/TextFieldProps.ts +27 -57
- package/src/TextField/index.tsx +2 -2
- package/src/TextField/useVariantStyleMap.ts +100 -0
- package/src/Tooltip/Beaks/Beak.tsx +53 -0
- package/src/Tooltip/Beaks/BeakProps.ts +4 -0
- package/src/Tooltip/Beaks/HorizontalLargeBeak.tsx +18 -0
- package/src/Tooltip/Beaks/HorizontalSmallBeak.tsx +18 -0
- package/src/Tooltip/Beaks/VerticalLargeBeak.tsx +18 -0
- package/src/Tooltip/Beaks/VerticalSmallBeak.tsx +18 -0
- package/src/Tooltip/Beaks/index.ts +2 -0
- package/src/Tooltip/LegacyTooltip.tsx +167 -0
- package/src/Tooltip/LegacyTooltipProps.ts +86 -0
- package/src/Tooltip/Tooltip.tsx +114 -66
- package/src/Tooltip/TooltipProps.ts +28 -10
- package/src/Tooltip/index.ts +2 -2
- package/src/hooks/useCollapsibleAppBar.ts +2 -3
- package/src/index.ts +3 -0
- package/src/internal/icons/CheckCircle.tsx +20 -0
- package/src/internal/icons/Clear.tsx +20 -0
- package/src/internal/icons/EyeOff.tsx +25 -0
- package/src/internal/icons/EyeOn.tsx +20 -0
- package/src/internal/icons/InfoCircle.tsx +21 -0
- package/src/internal/icons/LoadingSpinner/LoadingSpinnerProps.ts +11 -0
- package/src/internal/icons/LoadingSpinner/index.native.tsx +31 -0
- package/src/internal/icons/LoadingSpinner/index.tsx +31 -0
- package/src/internal/icons/LoadingSpinner/loadingSpinnerGray.json +1 -0
- package/src/internal/icons/LoadingSpinner/loadingSpinnerWhite.json +1 -0
- package/src/internal/icons/LoadingSpinner/utils.ts +14 -0
- package/src/internal/icons/Search.tsx +15 -0
- package/src/internal/icons/index.ts +7 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["EmptyProps.ts"],"sourcesContent":["import React from 'react';\nimport type { ViewProps } from 'react-native';\nimport type { OverridableComponentProps } from '../types';\n\nexport default interface EmptyProps extends OverridableComponentProps<Omit<ViewProps, 'children'>, {\n /**\n * Text displayed on the CTA button.\n */\n buttonTitle?: string;\n\n /**\n * Descriptive text shown below the title.\n */\n description?: string;\n\n /**\n * Content displayed at the top.\n * Can be an icon, image, or any visual element.\n */\n headerContent?: React.ReactNode;\n\n /**\n * Function called when the CTA button is pressed.\n */\n onButtonPress?: () => void;\n\n /**\n * The main title text.\n */\n title: string;\n}> {}\n"],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["default"],"sources":["index.ts"],"sourcesContent":["export { default } from './Empty';\nexport type { default as EmptyProps } from './EmptyProps';\n"],"mappings":"AAAA,SAASA,OAAT,QAAwB,SAAxB"}
|
|
@@ -33,13 +33,14 @@ export default function IconButton(props) {
|
|
|
33
33
|
onPress,
|
|
34
34
|
size = 'medium',
|
|
35
35
|
style,
|
|
36
|
+
iconSize,
|
|
36
37
|
...otherProps
|
|
37
38
|
} = props;
|
|
38
39
|
const theme = useTheme();
|
|
39
40
|
const styles = useStyles();
|
|
40
41
|
const icon = cloneElementSafely(children, {
|
|
41
|
-
width: iconSizes[size],
|
|
42
|
-
height: iconSizes[size],
|
|
42
|
+
width: iconSize ?? iconSizes[size],
|
|
43
|
+
height: iconSize ?? iconSizes[size],
|
|
43
44
|
color: color
|
|
44
45
|
});
|
|
45
46
|
const fontStyle = createFontStyle(theme, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","Text","ButtonBase","createFontStyle","css","useTheme","cloneElementSafely","iconSizes","tiny","small","medium","large","useStyles","theme","root","flexDirection","justifyContent","alignItems","padding","spacing","IconButton","props","children","color","disabled","label","onPress","size","style","otherProps","styles","icon","width","height","fontStyle","selector","typo","caption1","palette","main","labelStyle","rootStyle","handlePress"],"sources":["LegacyIconButton.tsx"],"sourcesContent":["import React from 'react';\nimport { Text } from 'react-native';\nimport { NamedStylesStringUnion, UseStyles } from '@fountain-ui/styles';\nimport ButtonBase from '../ButtonBase';\nimport { createFontStyle, css, useTheme } from '../styles';\nimport { cloneElementSafely } from '../utils';\nimport type IconButtonProps from './LegacyIconButtonProps';\nimport type { IconButtonSize } from './LegacyIconButtonProps';\n\ntype IconButtonStyles = NamedStylesStringUnion<'root'>;\n\ntype IconSizes = { [n in IconButtonSize]: number };\n\nconst iconSizes: IconSizes = {\n tiny: 16,\n small: 20,\n medium: 24,\n large: 28,\n};\n\nconst useStyles: UseStyles<IconButtonStyles> = function (): IconButtonStyles {\n const theme = useTheme();\n\n return {\n root: {\n flexDirection: 'column',\n justifyContent: 'center',\n alignItems: 'center',\n padding: theme.spacing(1),\n },\n };\n};\n\nexport default function IconButton(props: IconButtonProps) {\n const {\n children,\n color = 'primary',\n disabled = false,\n label,\n onPress,\n size = 'medium',\n style,\n ...otherProps\n } = props;\n\n const theme = useTheme();\n const styles = useStyles();\n\n const icon = cloneElementSafely(children, {\n width: iconSizes[size],\n height: iconSizes[size],\n color: color,\n });\n\n const fontStyle = createFontStyle(theme, {\n selector: (typo) => typo.caption1,\n color: theme.palette[color].main,\n });\n\n const labelStyle = css([\n fontStyle,\n ]);\n\n const rootStyle = css([\n styles.root,\n style,\n ]);\n\n const handlePress = async () => {\n if (disabled) {\n return;\n }\n if (onPress) {\n onPress();\n return;\n }\n };\n\n return (\n <ButtonBase\n disabled={disabled}\n onPress={handlePress}\n style={rootStyle}\n {...otherProps}\n >\n {icon}\n\n {label ? (\n <Text\n children={label}\n style={labelStyle}\n />\n ) : null}\n </ButtonBase>\n );\n};\n"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,IAAT,QAAqB,cAArB;AAEA,OAAOC,UAAP,MAAuB,eAAvB;AACA,SAASC,eAAT,EAA0BC,GAA1B,EAA+BC,QAA/B,QAA+C,WAA/C;AACA,SAASC,kBAAT,QAAmC,UAAnC;AAQA,MAAMC,SAAoB,GAAG;EACzBC,IAAI,EAAE,EADmB;EAEzBC,KAAK,EAAE,EAFkB;EAGzBC,MAAM,EAAE,EAHiB;EAIzBC,KAAK,EAAE;AAJkB,CAA7B;;AAOA,MAAMC,SAAsC,GAAG,YAA8B;EACzE,MAAMC,KAAK,GAAGR,QAAQ,EAAtB;EAEA,OAAO;IACHS,IAAI,EAAE;MACFC,aAAa,EAAE,QADb;MAEFC,cAAc,EAAE,QAFd;MAGFC,UAAU,EAAE,QAHV;MAIFC,OAAO,EAAEL,KAAK,CAACM,OAAN,CAAc,CAAd;IAJP;EADH,CAAP;AAQH,CAXD;;AAaA,eAAe,SAASC,UAAT,CAAoBC,KAApB,EAA4C;EACvD,MAAM;IACFC,QADE;IAEFC,KAAK,GAAG,SAFN;IAGFC,QAAQ,GAAG,KAHT;IAIFC,KAJE;IAKFC,OALE;IAMFC,IAAI,GAAG,QANL;IAOFC,KAPE;
|
|
1
|
+
{"version":3,"names":["React","Text","ButtonBase","createFontStyle","css","useTheme","cloneElementSafely","iconSizes","tiny","small","medium","large","useStyles","theme","root","flexDirection","justifyContent","alignItems","padding","spacing","IconButton","props","children","color","disabled","label","onPress","size","style","iconSize","otherProps","styles","icon","width","height","fontStyle","selector","typo","caption1","palette","main","labelStyle","rootStyle","handlePress"],"sources":["LegacyIconButton.tsx"],"sourcesContent":["import React from 'react';\nimport { Text } from 'react-native';\nimport { NamedStylesStringUnion, UseStyles } from '@fountain-ui/styles';\nimport ButtonBase from '../ButtonBase';\nimport { createFontStyle, css, useTheme } from '../styles';\nimport { cloneElementSafely } from '../utils';\nimport type IconButtonProps from './LegacyIconButtonProps';\nimport type { IconButtonSize } from './LegacyIconButtonProps';\n\ntype IconButtonStyles = NamedStylesStringUnion<'root'>;\n\ntype IconSizes = { [n in IconButtonSize]: number };\n\nconst iconSizes: IconSizes = {\n tiny: 16,\n small: 20,\n medium: 24,\n large: 28,\n};\n\nconst useStyles: UseStyles<IconButtonStyles> = function (): IconButtonStyles {\n const theme = useTheme();\n\n return {\n root: {\n flexDirection: 'column',\n justifyContent: 'center',\n alignItems: 'center',\n padding: theme.spacing(1),\n },\n };\n};\n\nexport default function IconButton(props: IconButtonProps) {\n const {\n children,\n color = 'primary',\n disabled = false,\n label,\n onPress,\n size = 'medium',\n style,\n iconSize,\n ...otherProps\n } = props;\n\n const theme = useTheme();\n const styles = useStyles();\n\n const icon = cloneElementSafely(children, {\n width: iconSize ?? iconSizes[size],\n height: iconSize ?? iconSizes[size],\n color: color,\n });\n\n const fontStyle = createFontStyle(theme, {\n selector: (typo) => typo.caption1,\n color: theme.palette[color].main,\n });\n\n const labelStyle = css([\n fontStyle,\n ]);\n\n const rootStyle = css([\n styles.root,\n style,\n ]);\n\n const handlePress = async () => {\n if (disabled) {\n return;\n }\n if (onPress) {\n onPress();\n return;\n }\n };\n\n return (\n <ButtonBase\n disabled={disabled}\n onPress={handlePress}\n style={rootStyle}\n {...otherProps}\n >\n {icon}\n\n {label ? (\n <Text\n children={label}\n style={labelStyle}\n />\n ) : null}\n </ButtonBase>\n );\n};\n"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,IAAT,QAAqB,cAArB;AAEA,OAAOC,UAAP,MAAuB,eAAvB;AACA,SAASC,eAAT,EAA0BC,GAA1B,EAA+BC,QAA/B,QAA+C,WAA/C;AACA,SAASC,kBAAT,QAAmC,UAAnC;AAQA,MAAMC,SAAoB,GAAG;EACzBC,IAAI,EAAE,EADmB;EAEzBC,KAAK,EAAE,EAFkB;EAGzBC,MAAM,EAAE,EAHiB;EAIzBC,KAAK,EAAE;AAJkB,CAA7B;;AAOA,MAAMC,SAAsC,GAAG,YAA8B;EACzE,MAAMC,KAAK,GAAGR,QAAQ,EAAtB;EAEA,OAAO;IACHS,IAAI,EAAE;MACFC,aAAa,EAAE,QADb;MAEFC,cAAc,EAAE,QAFd;MAGFC,UAAU,EAAE,QAHV;MAIFC,OAAO,EAAEL,KAAK,CAACM,OAAN,CAAc,CAAd;IAJP;EADH,CAAP;AAQH,CAXD;;AAaA,eAAe,SAASC,UAAT,CAAoBC,KAApB,EAA4C;EACvD,MAAM;IACFC,QADE;IAEFC,KAAK,GAAG,SAFN;IAGFC,QAAQ,GAAG,KAHT;IAIFC,KAJE;IAKFC,OALE;IAMFC,IAAI,GAAG,QANL;IAOFC,KAPE;IAQFC,QARE;IASF,GAAGC;EATD,IAUFT,KAVJ;EAYA,MAAMR,KAAK,GAAGR,QAAQ,EAAtB;EACA,MAAM0B,MAAM,GAAGnB,SAAS,EAAxB;EAEA,MAAMoB,IAAI,GAAG1B,kBAAkB,CAACgB,QAAD,EAAW;IACtCW,KAAK,EAAEJ,QAAQ,IAAItB,SAAS,CAACoB,IAAD,CADU;IAEtCO,MAAM,EAAEL,QAAQ,IAAItB,SAAS,CAACoB,IAAD,CAFS;IAGtCJ,KAAK,EAAEA;EAH+B,CAAX,CAA/B;EAMA,MAAMY,SAAS,GAAGhC,eAAe,CAACU,KAAD,EAAQ;IACrCuB,QAAQ,EAAGC,IAAD,IAAUA,IAAI,CAACC,QADY;IAErCf,KAAK,EAAEV,KAAK,CAAC0B,OAAN,CAAchB,KAAd,EAAqBiB;EAFS,CAAR,CAAjC;EAKA,MAAMC,UAAU,GAAGrC,GAAG,CAAC,CACnB+B,SADmB,CAAD,CAAtB;EAIA,MAAMO,SAAS,GAAGtC,GAAG,CAAC,CAClB2B,MAAM,CAACjB,IADW,EAElBc,KAFkB,CAAD,CAArB;;EAKA,MAAMe,WAAW,GAAG,YAAY;IAC5B,IAAInB,QAAJ,EAAc;MACV;IACH;;IACD,IAAIE,OAAJ,EAAa;MACTA,OAAO;MACP;IACH;EACJ,CARD;;EAUA,oBACI,oBAAC,UAAD;IACI,QAAQ,EAAEF,QADd;IAEI,OAAO,EAAEmB,WAFb;IAGI,KAAK,EAAED;EAHX,GAIQZ,UAJR,GAMKE,IANL,EAQKP,KAAK,gBACF,oBAAC,IAAD;IACI,QAAQ,EAAEA,KADd;IAEI,KAAK,EAAEgB;EAFX,EADE,GAKF,IAbR,CADJ;AAiBH;AAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["LegacyIconButtonProps.ts"],"sourcesContent":["import React from 'react';\nimport type { ButtonBaseProps } from '../ButtonBase';\nimport type { CommonComponentColor, OverridableComponentProps } from '../types';\n\nexport type IconButtonColor = CommonComponentColor;\n\nexport type IconButtonSize = 'medium' | 'large' | 'small' | 'tiny';\n\nexport default interface IconButtonProps extends OverridableComponentProps<ButtonBaseProps, {\n /**\n * The icon element.\n */\n children: React.ReactElement;\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n * @default 'primary'\n */\n color?: IconButtonColor;\n\n /**\n * If present, this is typography displayed at the bottom of the icon.\n */\n label?: string;\n\n /**\n * The size of the button.\n * @default 'medium'\n */\n size?: IconButtonSize;\n}> {}\n"],"mappings":""}
|
|
1
|
+
{"version":3,"names":[],"sources":["LegacyIconButtonProps.ts"],"sourcesContent":["import React from 'react';\nimport type { ButtonBaseProps } from '../ButtonBase';\nimport type { CommonComponentColor, OverridableComponentProps } from '../types';\n\nexport type IconButtonColor = CommonComponentColor;\n\nexport type IconButtonSize = 'medium' | 'large' | 'small' | 'tiny';\n\nexport default interface IconButtonProps extends OverridableComponentProps<ButtonBaseProps, {\n /**\n * The icon element.\n */\n children: React.ReactElement;\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n * @default 'primary'\n */\n color?: IconButtonColor;\n\n /**\n * If present, this is typography displayed at the bottom of the icon.\n */\n label?: string;\n\n /**\n * The size of the button.\n * @default 'medium'\n */\n size?: IconButtonSize;\n\n /**\n * The custom size of the Icon. Not preDefined.\n */\n iconSize?: number;\n}> {}\n"],"mappings":""}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
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); }
|
|
2
|
+
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { View } from 'react-native';
|
|
5
|
+
import { times } from '@fountain-ui/utils';
|
|
6
|
+
import { ChevronLeft, ChevronRight } from '../internal/icons';
|
|
7
|
+
import { css, useTheme } from '../styles';
|
|
8
|
+
import IconButton from '../IconButton';
|
|
9
|
+
import PaginationItem from '../PaginationItem/LegacyPaginationItem';
|
|
10
|
+
|
|
11
|
+
const useStyles = function () {
|
|
12
|
+
const theme = useTheme();
|
|
13
|
+
return {
|
|
14
|
+
root: {},
|
|
15
|
+
rootInline: {
|
|
16
|
+
flexDirection: 'row',
|
|
17
|
+
alignItems: 'center'
|
|
18
|
+
},
|
|
19
|
+
rootAnchor: {
|
|
20
|
+
flexDirection: 'column'
|
|
21
|
+
},
|
|
22
|
+
items: {
|
|
23
|
+
flexDirection: 'row',
|
|
24
|
+
justifyContent: 'center',
|
|
25
|
+
marginTop: theme.spacing(2)
|
|
26
|
+
},
|
|
27
|
+
arrowContainer: {
|
|
28
|
+
flexDirection: 'column',
|
|
29
|
+
justifyContent: 'center'
|
|
30
|
+
},
|
|
31
|
+
prevInline: {
|
|
32
|
+
marginRight: theme.spacing(1)
|
|
33
|
+
},
|
|
34
|
+
prevAnchor: {
|
|
35
|
+
position: 'absolute',
|
|
36
|
+
left: -24
|
|
37
|
+
},
|
|
38
|
+
nextInline: {
|
|
39
|
+
marginLeft: theme.spacing(1)
|
|
40
|
+
},
|
|
41
|
+
nextAnchor: {
|
|
42
|
+
position: 'absolute',
|
|
43
|
+
right: -24
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
export default function Pagination(props) {
|
|
49
|
+
const {
|
|
50
|
+
bundleSize = 1,
|
|
51
|
+
children,
|
|
52
|
+
count,
|
|
53
|
+
disabled = false,
|
|
54
|
+
hideIndicator = false,
|
|
55
|
+
hideNextButton = false,
|
|
56
|
+
hidePrevButton = false,
|
|
57
|
+
infinite = false,
|
|
58
|
+
onChange,
|
|
59
|
+
page,
|
|
60
|
+
renderItem = _ref => {
|
|
61
|
+
let {
|
|
62
|
+
index,
|
|
63
|
+
...rest
|
|
64
|
+
} = _ref;
|
|
65
|
+
return /*#__PURE__*/React.createElement(PaginationItem, _extends({
|
|
66
|
+
key: `${index}`
|
|
67
|
+
}, rest));
|
|
68
|
+
},
|
|
69
|
+
style,
|
|
70
|
+
...otherProps
|
|
71
|
+
} = props;
|
|
72
|
+
const styles = useStyles();
|
|
73
|
+
const firstPage = 0;
|
|
74
|
+
const lastPage = count - 1;
|
|
75
|
+
|
|
76
|
+
const handleChange = nextPage => {
|
|
77
|
+
if (nextPage >= firstPage && nextPage <= lastPage) {
|
|
78
|
+
if (onChange) {
|
|
79
|
+
onChange(nextPage);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
const handlePrevPress = () => {
|
|
85
|
+
const prevPage = page - bundleSize >= firstPage ? page - bundleSize : infinite ? count - bundleSize + page : firstPage;
|
|
86
|
+
handleChange(prevPage);
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
const handleNextPress = () => {
|
|
90
|
+
const nextPage = page + bundleSize <= lastPage ? page + bundleSize : infinite ? page + bundleSize - count : lastPage;
|
|
91
|
+
handleChange(nextPage);
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
const prevButton = !hidePrevButton ? /*#__PURE__*/React.createElement(IconButton, {
|
|
95
|
+
color: 'tertiary',
|
|
96
|
+
disabled: disabled || !infinite && page <= firstPage,
|
|
97
|
+
onPress: handlePrevPress,
|
|
98
|
+
size: 'small',
|
|
99
|
+
style: children ? styles.prevAnchor : styles.prevInline
|
|
100
|
+
}, /*#__PURE__*/React.createElement(ChevronLeft, null)) : null;
|
|
101
|
+
const nextButton = !hideNextButton ? /*#__PURE__*/React.createElement(IconButton, {
|
|
102
|
+
color: 'tertiary',
|
|
103
|
+
disabled: disabled || !infinite && page + bundleSize > lastPage,
|
|
104
|
+
onPress: handleNextPress,
|
|
105
|
+
size: 'small',
|
|
106
|
+
style: children ? styles.nextAnchor : styles.nextInline
|
|
107
|
+
}, /*#__PURE__*/React.createElement(ChevronRight, null)) : null;
|
|
108
|
+
const items = !hideIndicator ? times(i => renderItem({
|
|
109
|
+
index: i,
|
|
110
|
+
disabled,
|
|
111
|
+
selected: i === page
|
|
112
|
+
}), count) : null;
|
|
113
|
+
const containerProps = {
|
|
114
|
+
style: css([styles.root, children ? styles.rootAnchor : styles.rootInline, style]),
|
|
115
|
+
...otherProps
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
if (children) {
|
|
119
|
+
return /*#__PURE__*/React.createElement(View, containerProps, /*#__PURE__*/React.createElement(View, {
|
|
120
|
+
style: css(styles.arrowContainer)
|
|
121
|
+
}, children, prevButton, nextButton), /*#__PURE__*/React.createElement(View, {
|
|
122
|
+
style: css(styles.items)
|
|
123
|
+
}, items));
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
return /*#__PURE__*/React.createElement(View, containerProps, prevButton, items, nextButton);
|
|
127
|
+
}
|
|
128
|
+
;
|
|
129
|
+
//# sourceMappingURL=LegacyPagination.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","View","times","ChevronLeft","ChevronRight","css","useTheme","IconButton","PaginationItem","useStyles","theme","root","rootInline","flexDirection","alignItems","rootAnchor","items","justifyContent","marginTop","spacing","arrowContainer","prevInline","marginRight","prevAnchor","position","left","nextInline","marginLeft","nextAnchor","right","Pagination","props","bundleSize","children","count","disabled","hideIndicator","hideNextButton","hidePrevButton","infinite","onChange","page","renderItem","index","rest","style","otherProps","styles","firstPage","lastPage","handleChange","nextPage","handlePrevPress","prevPage","handleNextPress","prevButton","nextButton","i","selected","containerProps"],"sources":["LegacyPagination.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\nimport { NamedStylesStringUnion, UseStyles } from '@fountain-ui/styles';\nimport { times } from '@fountain-ui/utils';\nimport { ChevronLeft, ChevronRight } from '../internal/icons';\nimport { css, useTheme } from '../styles';\nimport IconButton from '../IconButton';\nimport PaginationItem from '../PaginationItem/LegacyPaginationItem';\nimport type PaginationProps from './LegacyPaginationProps';\n\ntype PaginationStyleKeys =\n | 'root'\n | 'rootInline'\n | 'rootAnchor'\n | 'items'\n | 'arrowContainer'\n | 'prevInline'\n | 'prevAnchor'\n | 'nextInline'\n | 'nextAnchor';\n\ntype PaginationStyles = NamedStylesStringUnion<PaginationStyleKeys>;\n\nconst useStyles: UseStyles<PaginationStyles> = function (): PaginationStyles {\n const theme = useTheme();\n\n return {\n root: {},\n rootInline: {\n flexDirection: 'row',\n alignItems: 'center',\n },\n rootAnchor: {\n flexDirection: 'column',\n },\n items: {\n flexDirection: 'row',\n justifyContent: 'center',\n marginTop: theme.spacing(2),\n },\n arrowContainer: {\n flexDirection: 'column',\n justifyContent: 'center',\n },\n prevInline: {\n marginRight: theme.spacing(1),\n },\n prevAnchor: {\n position: 'absolute',\n left: -24,\n },\n nextInline: {\n marginLeft: theme.spacing(1),\n },\n nextAnchor: {\n position: 'absolute',\n right: -24,\n },\n };\n};\n\nexport default function Pagination(props: PaginationProps) {\n const {\n bundleSize = 1,\n children,\n count,\n disabled = false,\n hideIndicator = false,\n hideNextButton = false,\n hidePrevButton = false,\n infinite = false,\n onChange,\n page,\n renderItem = ({ index, ...rest }) => <PaginationItem key={`${index}`} {...rest}/>,\n style,\n ...otherProps\n } = props;\n\n const styles = useStyles();\n\n const firstPage = 0;\n const lastPage = count - 1;\n\n const handleChange = (nextPage: number) => {\n if (nextPage >= firstPage && nextPage <= lastPage) {\n if (onChange) {\n onChange(nextPage);\n }\n }\n };\n\n const handlePrevPress = () => {\n const prevPage = page - bundleSize >= firstPage\n ? page - bundleSize\n : (infinite ? count - bundleSize + page : firstPage);\n\n handleChange(prevPage);\n };\n\n const handleNextPress = () => {\n const nextPage = page + bundleSize <= lastPage\n ? page + bundleSize\n : (infinite ? page + bundleSize - count : lastPage);\n\n handleChange(nextPage);\n };\n\n const prevButton = !hidePrevButton ? (\n <IconButton\n color={'tertiary'}\n disabled={disabled || (!infinite && page <= firstPage)}\n onPress={handlePrevPress}\n size={'small'}\n style={children ? styles.prevAnchor : styles.prevInline}\n >\n <ChevronLeft/>\n </IconButton>\n ) : null;\n\n const nextButton = !hideNextButton ? (\n <IconButton\n color={'tertiary'}\n disabled={disabled || (!infinite && page + bundleSize > lastPage)}\n onPress={handleNextPress}\n size={'small'}\n style={children ? styles.nextAnchor : styles.nextInline}\n >\n <ChevronRight/>\n </IconButton>\n ) : null;\n\n const items = !hideIndicator ? (\n times(i => renderItem({ index: i, disabled, selected: i === page }), count)\n ) : null;\n\n const containerProps = {\n style: css([\n styles.root,\n children ? styles.rootAnchor : styles.rootInline,\n style,\n ]),\n ...otherProps,\n };\n\n if (children) {\n return (\n <View {...containerProps}>\n <View style={css(styles.arrowContainer)}>\n {children}\n {prevButton}\n {nextButton}\n </View>\n\n <View style={css(styles.items)}>\n {items}\n </View>\n </View>\n );\n }\n\n return (\n <View {...containerProps}>\n {prevButton}\n {items}\n {nextButton}\n </View>\n );\n};\n"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,IAAT,QAAqB,cAArB;AAEA,SAASC,KAAT,QAAsB,oBAAtB;AACA,SAASC,WAAT,EAAsBC,YAAtB,QAA0C,mBAA1C;AACA,SAASC,GAAT,EAAcC,QAAd,QAA8B,WAA9B;AACA,OAAOC,UAAP,MAAuB,eAAvB;AACA,OAAOC,cAAP,MAA2B,wCAA3B;;AAgBA,MAAMC,SAAsC,GAAG,YAA8B;EACzE,MAAMC,KAAK,GAAGJ,QAAQ,EAAtB;EAEA,OAAO;IACHK,IAAI,EAAE,EADH;IAEHC,UAAU,EAAE;MACRC,aAAa,EAAE,KADP;MAERC,UAAU,EAAE;IAFJ,CAFT;IAMHC,UAAU,EAAE;MACRF,aAAa,EAAE;IADP,CANT;IASHG,KAAK,EAAE;MACHH,aAAa,EAAE,KADZ;MAEHI,cAAc,EAAE,QAFb;MAGHC,SAAS,EAAER,KAAK,CAACS,OAAN,CAAc,CAAd;IAHR,CATJ;IAcHC,cAAc,EAAE;MACZP,aAAa,EAAE,QADH;MAEZI,cAAc,EAAE;IAFJ,CAdb;IAkBHI,UAAU,EAAE;MACRC,WAAW,EAAEZ,KAAK,CAACS,OAAN,CAAc,CAAd;IADL,CAlBT;IAqBHI,UAAU,EAAE;MACRC,QAAQ,EAAE,UADF;MAERC,IAAI,EAAE,CAAC;IAFC,CArBT;IAyBHC,UAAU,EAAE;MACRC,UAAU,EAAEjB,KAAK,CAACS,OAAN,CAAc,CAAd;IADJ,CAzBT;IA4BHS,UAAU,EAAE;MACRJ,QAAQ,EAAE,UADF;MAERK,KAAK,EAAE,CAAC;IAFA;EA5BT,CAAP;AAiCH,CApCD;;AAsCA,eAAe,SAASC,UAAT,CAAoBC,KAApB,EAA4C;EACvD,MAAM;IACFC,UAAU,GAAG,CADX;IAEFC,QAFE;IAGFC,KAHE;IAIFC,QAAQ,GAAG,KAJT;IAKFC,aAAa,GAAG,KALd;IAMFC,cAAc,GAAG,KANf;IAOFC,cAAc,GAAG,KAPf;IAQFC,QAAQ,GAAG,KART;IASFC,QATE;IAUFC,IAVE;IAWFC,UAAU,GAAG;MAAA,IAAC;QAAEC,KAAF;QAAS,GAAGC;MAAZ,CAAD;MAAA,oBAAwB,oBAAC,cAAD;QAAgB,GAAG,EAAG,GAAED,KAAM;MAA9B,GAAqCC,IAArC,EAAxB;IAAA,CAXX;IAYFC,KAZE;IAaF,GAAGC;EAbD,IAcFf,KAdJ;EAgBA,MAAMgB,MAAM,GAAGtC,SAAS,EAAxB;EAEA,MAAMuC,SAAS,GAAG,CAAlB;EACA,MAAMC,QAAQ,GAAGf,KAAK,GAAG,CAAzB;;EAEA,MAAMgB,YAAY,GAAIC,QAAD,IAAsB;IACvC,IAAIA,QAAQ,IAAIH,SAAZ,IAAyBG,QAAQ,IAAIF,QAAzC,EAAmD;MAC/C,IAAIT,QAAJ,EAAc;QACVA,QAAQ,CAACW,QAAD,CAAR;MACH;IACJ;EACJ,CAND;;EAQA,MAAMC,eAAe,GAAG,MAAM;IAC1B,MAAMC,QAAQ,GAAGZ,IAAI,GAAGT,UAAP,IAAqBgB,SAArB,GACXP,IAAI,GAAGT,UADI,GAEVO,QAAQ,GAAGL,KAAK,GAAGF,UAAR,GAAqBS,IAAxB,GAA+BO,SAF9C;IAIAE,YAAY,CAACG,QAAD,CAAZ;EACH,CAND;;EAQA,MAAMC,eAAe,GAAG,MAAM;IAC1B,MAAMH,QAAQ,GAAGV,IAAI,GAAGT,UAAP,IAAqBiB,QAArB,GACXR,IAAI,GAAGT,UADI,GAEVO,QAAQ,GAAGE,IAAI,GAAGT,UAAP,GAAoBE,KAAvB,GAA+Be,QAF9C;IAIAC,YAAY,CAACC,QAAD,CAAZ;EACH,CAND;;EAQA,MAAMI,UAAU,GAAG,CAACjB,cAAD,gBACf,oBAAC,UAAD;IACI,KAAK,EAAE,UADX;IAEI,QAAQ,EAAEH,QAAQ,IAAK,CAACI,QAAD,IAAaE,IAAI,IAAIO,SAFhD;IAGI,OAAO,EAAEI,eAHb;IAII,IAAI,EAAE,OAJV;IAKI,KAAK,EAAEnB,QAAQ,GAAGc,MAAM,CAACxB,UAAV,GAAuBwB,MAAM,CAAC1B;EALjD,gBAOI,oBAAC,WAAD,OAPJ,CADe,GAUf,IAVJ;EAYA,MAAMmC,UAAU,GAAG,CAACnB,cAAD,gBACf,oBAAC,UAAD;IACI,KAAK,EAAE,UADX;IAEI,QAAQ,EAAEF,QAAQ,IAAK,CAACI,QAAD,IAAaE,IAAI,GAAGT,UAAP,GAAoBiB,QAF5D;IAGI,OAAO,EAAEK,eAHb;IAII,IAAI,EAAE,OAJV;IAKI,KAAK,EAAErB,QAAQ,GAAGc,MAAM,CAACnB,UAAV,GAAuBmB,MAAM,CAACrB;EALjD,gBAOI,oBAAC,YAAD,OAPJ,CADe,GAUf,IAVJ;EAYA,MAAMV,KAAK,GAAG,CAACoB,aAAD,GACVlC,KAAK,CAACuD,CAAC,IAAIf,UAAU,CAAC;IAAEC,KAAK,EAAEc,CAAT;IAAYtB,QAAZ;IAAsBuB,QAAQ,EAAED,CAAC,KAAKhB;EAAtC,CAAD,CAAhB,EAAgEP,KAAhE,CADK,GAEV,IAFJ;EAIA,MAAMyB,cAAc,GAAG;IACnBd,KAAK,EAAExC,GAAG,CAAC,CACP0C,MAAM,CAACpC,IADA,EAEPsB,QAAQ,GAAGc,MAAM,CAAChC,UAAV,GAAuBgC,MAAM,CAACnC,UAF/B,EAGPiC,KAHO,CAAD,CADS;IAMnB,GAAGC;EANgB,CAAvB;;EASA,IAAIb,QAAJ,EAAc;IACV,oBACI,oBAAC,IAAD,EAAU0B,cAAV,eACI,oBAAC,IAAD;MAAM,KAAK,EAAEtD,GAAG,CAAC0C,MAAM,CAAC3B,cAAR;IAAhB,GACKa,QADL,EAEKsB,UAFL,EAGKC,UAHL,CADJ,eAOI,oBAAC,IAAD;MAAM,KAAK,EAAEnD,GAAG,CAAC0C,MAAM,CAAC/B,KAAR;IAAhB,GACKA,KADL,CAPJ,CADJ;EAaH;;EAED,oBACI,oBAAC,IAAD,EAAU2C,cAAV,EACKJ,UADL,EAEKvC,KAFL,EAGKwC,UAHL,CADJ;AAOH;AAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["LegacyPaginationProps.ts"],"sourcesContent":["import React from 'react';\nimport type { ViewProps } from 'react-native';\nimport type { OverridableComponentProps } from '../types';\n\nexport interface PaginationRenderItemParams {\n /**\n * Index of the pagination item.\n */\n index: number;\n\n /**\n * If `true`, the pagination item is disabled.\n */\n disabled: boolean;\n\n /**\n * If `true` the pagination item is selected.\n */\n selected: boolean;\n}\n\nexport default interface PaginationProps extends OverridableComponentProps<ViewProps, {\n /**\n * The Number of pages that change when the button is pressed\n * @default 1\n */\n bundleSize?: number,\n\n /**\n * The pagination will be added relative to this node.\n */\n children?: React.ReactNode;\n\n /**\n * The total number of pages.\n */\n count: number,\n\n /**\n * If `true`, the pagination is disabled.\n * @default false\n */\n disabled?: boolean;\n\n\n /**\n * If `true`, hide the page indicator.\n * @default false\n */\n hideIndicator?: boolean,\n\n /**\n * If `true`, hide the next-page button.\n * @default false\n */\n hideNextButton?: boolean,\n\n /**\n * If `true`, hide the previous-page button.\n * @default false\n */\n hidePrevButton?: boolean,\n\n /**\n * If `true`, pagination is infinite.\n * @default false\n */\n infinite?: boolean,\n\n /**\n * Callback fired when the page is changed.\n */\n onChange?: (page: number) => void,\n\n /**\n * The current page number.\n */\n page: number;\n\n /**\n * Render the item.\n * @default (item) => <PaginationItem {...item} />\n */\n renderItem?: (params: PaginationRenderItemParams) => React.ReactNode;\n}> {}\n"],"mappings":""}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Text } from 'react-native';
|
|
3
|
+
import { commonColors, typographyOf } from '@fountain-ui/styles';
|
|
4
|
+
import Divider from '../Divider';
|
|
5
|
+
import Row from '../Row';
|
|
6
|
+
import { createFontStyle, useTheme } from '../styles';
|
|
7
|
+
|
|
8
|
+
const useStyles = function () {
|
|
9
|
+
const theme = useTheme();
|
|
10
|
+
return {
|
|
11
|
+
root: {
|
|
12
|
+
backgroundColor: commonColors.static.weakOpacity,
|
|
13
|
+
borderRadius: theme.shape.radius.full,
|
|
14
|
+
paddingHorizontal: theme.spacing(1.25),
|
|
15
|
+
paddingVertical: theme.spacing(0.5)
|
|
16
|
+
},
|
|
17
|
+
divider: {
|
|
18
|
+
alignSelf: 'center',
|
|
19
|
+
borderColor: commonColors.static.weakOpacityInverse,
|
|
20
|
+
height: 6
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export default function NumberPagination(props) {
|
|
26
|
+
const {
|
|
27
|
+
currentPage,
|
|
28
|
+
maxPage
|
|
29
|
+
} = props;
|
|
30
|
+
const styles = useStyles();
|
|
31
|
+
const theme = useTheme();
|
|
32
|
+
const typography = typographyOf({
|
|
33
|
+
fontSize: 9.5,
|
|
34
|
+
lineHeight: 11.4,
|
|
35
|
+
fontFamily: 'Pretendard-SemiBold',
|
|
36
|
+
letterSpacing: -0.19
|
|
37
|
+
});
|
|
38
|
+
const currentFontStyle = createFontStyle(theme, {
|
|
39
|
+
selector: _ => typography,
|
|
40
|
+
color: commonColors.static.strongInverse
|
|
41
|
+
});
|
|
42
|
+
const countFontStyle = createFontStyle(theme, {
|
|
43
|
+
selector: _ => typography,
|
|
44
|
+
color: commonColors.static.baseOpacityInverse
|
|
45
|
+
});
|
|
46
|
+
return /*#__PURE__*/React.createElement(Row, {
|
|
47
|
+
style: styles.root
|
|
48
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
49
|
+
style: currentFontStyle
|
|
50
|
+
}, currentPage + 1), /*#__PURE__*/React.createElement(Divider, {
|
|
51
|
+
style: styles.divider,
|
|
52
|
+
vertical: true
|
|
53
|
+
}), /*#__PURE__*/React.createElement(Text, {
|
|
54
|
+
style: countFontStyle
|
|
55
|
+
}, maxPage));
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=NumberPagination.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","Text","commonColors","typographyOf","Divider","Row","createFontStyle","useTheme","useStyles","theme","root","backgroundColor","static","weakOpacity","borderRadius","shape","radius","full","paddingHorizontal","spacing","paddingVertical","divider","alignSelf","borderColor","weakOpacityInverse","height","NumberPagination","props","currentPage","maxPage","styles","typography","fontSize","lineHeight","fontFamily","letterSpacing","currentFontStyle","selector","_","color","strongInverse","countFontStyle","baseOpacityInverse"],"sources":["NumberPagination.tsx"],"sourcesContent":["import React from 'react';\nimport { Text } from 'react-native';\nimport type { NamedStylesStringUnion, UseStyles } from '@fountain-ui/styles';\nimport { commonColors, typographyOf } from '@fountain-ui/styles';\nimport Divider from '../Divider';\nimport Row from '../Row';\nimport { createFontStyle, useTheme } from '../styles';\nimport type PaginationProps from './PaginationProps';\n\ntype NumberPaginationStyles = NamedStylesStringUnion<'root' | 'divider'>;\n\nconst useStyles: UseStyles<NumberPaginationStyles> = function (): NumberPaginationStyles {\n const theme = useTheme();\n\n return {\n root: {\n backgroundColor: commonColors.static.weakOpacity,\n borderRadius: theme.shape.radius.full,\n paddingHorizontal: theme.spacing(1.25),\n paddingVertical: theme.spacing(0.5),\n },\n divider: {\n alignSelf: 'center',\n borderColor: commonColors.static.weakOpacityInverse,\n height: 6,\n },\n };\n};\n\ninterface NumberPaginationProps {\n currentPage: PaginationProps['page'];\n maxPage: PaginationProps['count'];\n}\n\nexport default function NumberPagination(props: NumberPaginationProps) {\n const {\n currentPage,\n maxPage,\n } = props;\n\n const styles = useStyles();\n\n const theme = useTheme();\n\n const typography = typographyOf({\n fontSize: 9.5,\n lineHeight: 11.4,\n fontFamily: 'Pretendard-SemiBold',\n letterSpacing: -0.19,\n });\n\n const currentFontStyle = createFontStyle(theme, {\n selector: (_) => typography,\n color: commonColors.static.strongInverse,\n });\n\n const countFontStyle = createFontStyle(theme, {\n selector: (_) => typography,\n color: commonColors.static.baseOpacityInverse,\n });\n\n return (\n <Row style={styles.root}>\n <Text style={currentFontStyle}>\n {currentPage + 1}\n </Text>\n\n <Divider\n style={styles.divider}\n vertical={true}\n />\n\n <Text style={countFontStyle}>\n {maxPage}\n </Text>\n </Row>\n );\n}\n"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,IAAT,QAAqB,cAArB;AAEA,SAASC,YAAT,EAAuBC,YAAvB,QAA2C,qBAA3C;AACA,OAAOC,OAAP,MAAoB,YAApB;AACA,OAAOC,GAAP,MAAgB,QAAhB;AACA,SAASC,eAAT,EAA0BC,QAA1B,QAA0C,WAA1C;;AAKA,MAAMC,SAA4C,GAAG,YAAoC;EACrF,MAAMC,KAAK,GAAGF,QAAQ,EAAtB;EAEA,OAAO;IACHG,IAAI,EAAE;MACFC,eAAe,EAAET,YAAY,CAACU,MAAb,CAAoBC,WADnC;MAEFC,YAAY,EAAEL,KAAK,CAACM,KAAN,CAAYC,MAAZ,CAAmBC,IAF/B;MAGFC,iBAAiB,EAAET,KAAK,CAACU,OAAN,CAAc,IAAd,CAHjB;MAIFC,eAAe,EAAEX,KAAK,CAACU,OAAN,CAAc,GAAd;IAJf,CADH;IAOHE,OAAO,EAAE;MACLC,SAAS,EAAE,QADN;MAELC,WAAW,EAAErB,YAAY,CAACU,MAAb,CAAoBY,kBAF5B;MAGLC,MAAM,EAAE;IAHH;EAPN,CAAP;AAaH,CAhBD;;AAuBA,eAAe,SAASC,gBAAT,CAA0BC,KAA1B,EAAwD;EACnE,MAAM;IACFC,WADE;IAEFC;EAFE,IAGFF,KAHJ;EAKA,MAAMG,MAAM,GAAGtB,SAAS,EAAxB;EAEA,MAAMC,KAAK,GAAGF,QAAQ,EAAtB;EAEA,MAAMwB,UAAU,GAAG5B,YAAY,CAAC;IAC5B6B,QAAQ,EAAE,GADkB;IAE5BC,UAAU,EAAE,IAFgB;IAG5BC,UAAU,EAAE,qBAHgB;IAI5BC,aAAa,EAAE,CAAC;EAJY,CAAD,CAA/B;EAOA,MAAMC,gBAAgB,GAAG9B,eAAe,CAACG,KAAD,EAAQ;IAC5C4B,QAAQ,EAAGC,CAAD,IAAOP,UAD2B;IAE5CQ,KAAK,EAAErC,YAAY,CAACU,MAAb,CAAoB4B;EAFiB,CAAR,CAAxC;EAKA,MAAMC,cAAc,GAAGnC,eAAe,CAACG,KAAD,EAAQ;IAC1C4B,QAAQ,EAAGC,CAAD,IAAOP,UADyB;IAE1CQ,KAAK,EAAErC,YAAY,CAACU,MAAb,CAAoB8B;EAFe,CAAR,CAAtC;EAKA,oBACI,oBAAC,GAAD;IAAK,KAAK,EAAEZ,MAAM,CAACpB;EAAnB,gBACI,oBAAC,IAAD;IAAM,KAAK,EAAE0B;EAAb,GACKR,WAAW,GAAG,CADnB,CADJ,eAKI,oBAAC,OAAD;IACI,KAAK,EAAEE,MAAM,CAACT,OADlB;IAEI,QAAQ,EAAE;EAFd,EALJ,eAUI,oBAAC,IAAD;IAAM,KAAK,EAAEoB;EAAb,GACKZ,OADL,CAVJ,CADJ;AAgBH"}
|
|
@@ -7,6 +7,7 @@ import { ChevronLeft, ChevronRight } from '../internal/icons';
|
|
|
7
7
|
import { css, useTheme } from '../styles';
|
|
8
8
|
import IconButton from '../IconButton';
|
|
9
9
|
import PaginationItem from '../PaginationItem';
|
|
10
|
+
import NumberPagination from './NumberPagination';
|
|
10
11
|
|
|
11
12
|
const useStyles = function () {
|
|
12
13
|
const theme = useTheme();
|
|
@@ -67,6 +68,7 @@ export default function Pagination(props) {
|
|
|
67
68
|
}, rest));
|
|
68
69
|
},
|
|
69
70
|
style,
|
|
71
|
+
variant = 'dot',
|
|
70
72
|
...otherProps
|
|
71
73
|
} = props;
|
|
72
74
|
const styles = useStyles();
|
|
@@ -92,22 +94,23 @@ export default function Pagination(props) {
|
|
|
92
94
|
};
|
|
93
95
|
|
|
94
96
|
const prevButton = !hidePrevButton ? /*#__PURE__*/React.createElement(IconButton, {
|
|
95
|
-
children: /*#__PURE__*/React.createElement(ChevronLeft, null),
|
|
96
97
|
color: 'tertiary',
|
|
97
98
|
disabled: disabled || !infinite && page <= firstPage,
|
|
98
99
|
onPress: handlePrevPress,
|
|
99
100
|
size: 'small',
|
|
100
101
|
style: children ? styles.prevAnchor : styles.prevInline
|
|
101
|
-
}) : null;
|
|
102
|
+
}, /*#__PURE__*/React.createElement(ChevronLeft, null)) : null;
|
|
102
103
|
const nextButton = !hideNextButton ? /*#__PURE__*/React.createElement(IconButton, {
|
|
103
|
-
children: /*#__PURE__*/React.createElement(ChevronRight, null),
|
|
104
104
|
color: 'tertiary',
|
|
105
105
|
disabled: disabled || !infinite && page + bundleSize > lastPage,
|
|
106
106
|
onPress: handleNextPress,
|
|
107
107
|
size: 'small',
|
|
108
108
|
style: children ? styles.nextAnchor : styles.nextInline
|
|
109
|
-
}) : null;
|
|
110
|
-
const items = !hideIndicator ?
|
|
109
|
+
}, /*#__PURE__*/React.createElement(ChevronRight, null)) : null;
|
|
110
|
+
const items = !hideIndicator ? variant === 'number' ? /*#__PURE__*/React.createElement(NumberPagination, {
|
|
111
|
+
currentPage: page,
|
|
112
|
+
maxPage: count
|
|
113
|
+
}) : times(i => renderItem({
|
|
111
114
|
index: i,
|
|
112
115
|
disabled,
|
|
113
116
|
selected: i === page
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","View","times","ChevronLeft","ChevronRight","css","useTheme","IconButton","PaginationItem","useStyles","theme","root","rootInline","flexDirection","alignItems","rootAnchor","items","justifyContent","marginTop","spacing","arrowContainer","prevInline","marginRight","prevAnchor","position","left","nextInline","marginLeft","nextAnchor","right","Pagination","props","bundleSize","children","count","disabled","hideIndicator","hideNextButton","hidePrevButton","infinite","onChange","page","renderItem","index","rest","style","otherProps","styles","firstPage","lastPage","handleChange","nextPage","handlePrevPress","prevPage","handleNextPress","prevButton","nextButton","i","selected","containerProps"],"sources":["Pagination.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\nimport { NamedStylesStringUnion, UseStyles } from '@fountain-ui/styles';\nimport { times } from '@fountain-ui/utils';\nimport { ChevronLeft, ChevronRight } from '../internal/icons';\nimport { css, useTheme } from '../styles';\nimport IconButton from '../IconButton';\nimport PaginationItem from '../PaginationItem';\nimport type PaginationProps from './PaginationProps';\n\ntype PaginationStyleKeys =\n | 'root'\n | 'rootInline'\n | 'rootAnchor'\n | 'items'\n | 'arrowContainer'\n | 'prevInline'\n | 'prevAnchor'\n | 'nextInline'\n | 'nextAnchor';\n\ntype PaginationStyles = NamedStylesStringUnion<PaginationStyleKeys>;\n\nconst useStyles: UseStyles<PaginationStyles> = function (): PaginationStyles {\n const theme = useTheme();\n\n return {\n root: {},\n rootInline: {\n flexDirection: 'row',\n alignItems: 'center',\n },\n rootAnchor: {\n flexDirection: 'column',\n },\n items: {\n flexDirection: 'row',\n justifyContent: 'center',\n marginTop: theme.spacing(2),\n },\n arrowContainer: {\n flexDirection: 'column',\n justifyContent: 'center',\n },\n prevInline: {\n marginRight: theme.spacing(1),\n },\n prevAnchor: {\n position: 'absolute',\n left: -24,\n },\n nextInline: {\n marginLeft: theme.spacing(1),\n },\n nextAnchor: {\n position: 'absolute',\n right: -24,\n },\n };\n};\n\nexport default function Pagination(props: PaginationProps) {\n const {\n bundleSize = 1,\n children,\n count,\n disabled = false,\n hideIndicator = false,\n hideNextButton = false,\n hidePrevButton = false,\n infinite = false,\n onChange,\n page,\n renderItem = ({ index, ...rest }) => <PaginationItem key={`${index}`} {...rest}/>,\n style,\n ...otherProps\n } = props;\n\n const styles = useStyles();\n\n const firstPage = 0;\n const lastPage = count - 1;\n\n const handleChange = (nextPage: number) => {\n if (nextPage >= firstPage && nextPage <= lastPage) {\n if (onChange) {\n onChange(nextPage);\n }\n }\n };\n\n const handlePrevPress = () => {\n const prevPage = page - bundleSize >= firstPage\n ? page - bundleSize\n : (infinite ? count - bundleSize + page : firstPage);\n\n handleChange(prevPage);\n };\n\n const handleNextPress = () => {\n const nextPage = page + bundleSize <= lastPage\n ? page + bundleSize\n : (infinite ? page + bundleSize - count : lastPage);\n\n handleChange(nextPage);\n };\n\n const prevButton = !hidePrevButton ? (\n <IconButton\n
|
|
1
|
+
{"version":3,"names":["React","View","times","ChevronLeft","ChevronRight","css","useTheme","IconButton","PaginationItem","NumberPagination","useStyles","theme","root","rootInline","flexDirection","alignItems","rootAnchor","items","justifyContent","marginTop","spacing","arrowContainer","prevInline","marginRight","prevAnchor","position","left","nextInline","marginLeft","nextAnchor","right","Pagination","props","bundleSize","children","count","disabled","hideIndicator","hideNextButton","hidePrevButton","infinite","onChange","page","renderItem","index","rest","style","variant","otherProps","styles","firstPage","lastPage","handleChange","nextPage","handlePrevPress","prevPage","handleNextPress","prevButton","nextButton","i","selected","containerProps"],"sources":["Pagination.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\nimport { NamedStylesStringUnion, UseStyles } from '@fountain-ui/styles';\nimport { times } from '@fountain-ui/utils';\nimport { ChevronLeft, ChevronRight } from '../internal/icons';\nimport { css, useTheme } from '../styles';\nimport IconButton from '../IconButton';\nimport PaginationItem from '../PaginationItem';\nimport NumberPagination from './NumberPagination';\nimport type PaginationProps from './PaginationProps';\nimport type { PaginationVariant } from './PaginationProps';\n\ntype PaginationStyleKeys =\n | 'root'\n | 'rootInline'\n | 'rootAnchor'\n | 'items'\n | 'arrowContainer'\n | 'prevInline'\n | 'prevAnchor'\n | 'nextInline'\n | 'nextAnchor';\n\ntype PaginationStyles = NamedStylesStringUnion<PaginationStyleKeys>;\n\nconst useStyles: UseStyles<PaginationStyles> = function (): PaginationStyles {\n const theme = useTheme();\n\n return {\n root: {},\n rootInline: {\n flexDirection: 'row',\n alignItems: 'center',\n },\n rootAnchor: {\n flexDirection: 'column',\n },\n items: {\n flexDirection: 'row',\n justifyContent: 'center',\n marginTop: theme.spacing(2),\n },\n arrowContainer: {\n flexDirection: 'column',\n justifyContent: 'center',\n },\n prevInline: {\n marginRight: theme.spacing(1),\n },\n prevAnchor: {\n position: 'absolute',\n left: -24,\n },\n nextInline: {\n marginLeft: theme.spacing(1),\n },\n nextAnchor: {\n position: 'absolute',\n right: -24,\n },\n };\n};\n\nexport default function Pagination(props: PaginationProps) {\n const {\n bundleSize = 1,\n children,\n count,\n disabled = false,\n hideIndicator = false,\n hideNextButton = false,\n hidePrevButton = false,\n infinite = false,\n onChange,\n page,\n renderItem = ({ index, ...rest }) => <PaginationItem key={`${index}`} {...rest}/>,\n style,\n variant = 'dot' as PaginationVariant,\n ...otherProps\n } = props;\n\n const styles = useStyles();\n\n const firstPage = 0;\n const lastPage = count - 1;\n\n const handleChange = (nextPage: number) => {\n if (nextPage >= firstPage && nextPage <= lastPage) {\n if (onChange) {\n onChange(nextPage);\n }\n }\n };\n\n const handlePrevPress = () => {\n const prevPage = page - bundleSize >= firstPage\n ? page - bundleSize\n : (infinite ? count - bundleSize + page : firstPage);\n\n handleChange(prevPage);\n };\n\n const handleNextPress = () => {\n const nextPage = page + bundleSize <= lastPage\n ? page + bundleSize\n : (infinite ? page + bundleSize - count : lastPage);\n\n handleChange(nextPage);\n };\n\n const prevButton = !hidePrevButton ? (\n <IconButton\n color={'tertiary'}\n disabled={disabled || (!infinite && page <= firstPage)}\n onPress={handlePrevPress}\n size={'small'}\n style={children ? styles.prevAnchor : styles.prevInline}\n >\n <ChevronLeft/>\n </IconButton>\n ) : null;\n\n const nextButton = !hideNextButton ? (\n <IconButton\n color={'tertiary'}\n disabled={disabled || (!infinite && page + bundleSize > lastPage)}\n onPress={handleNextPress}\n size={'small'}\n style={children ? styles.nextAnchor : styles.nextInline}\n >\n <ChevronRight/>\n </IconButton>\n ) : null;\n\n const items = !hideIndicator ? (\n variant === 'number' ? (\n <NumberPagination\n currentPage={page}\n maxPage={count}\n />\n ) : times(i => renderItem({ index: i, disabled, selected: i === page }), count)\n ) : null;\n\n const containerProps = {\n style: css([\n styles.root,\n children ? styles.rootAnchor : styles.rootInline,\n style,\n ]),\n ...otherProps,\n };\n\n if (children) {\n return (\n <View {...containerProps}>\n <View style={css(styles.arrowContainer)}>\n {children}\n {prevButton}\n {nextButton}\n </View>\n\n <View style={css(styles.items)}>\n {items}\n </View>\n </View>\n );\n }\n\n return (\n <View {...containerProps}>\n {prevButton}\n {items}\n {nextButton}\n </View>\n );\n};\n"],"mappings":"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"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
export const paginationVariants = ['dot', 'number'];
|
|
2
2
|
//# sourceMappingURL=PaginationProps.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["PaginationProps.ts"],"sourcesContent":["import React from 'react';\nimport type { ViewProps } from 'react-native';\nimport type { OverridableComponentProps } from '../types';\n\nexport interface PaginationRenderItemParams {\n /**\n * Index of the pagination item.\n */\n index: number;\n\n /**\n * If `true`, the pagination item is disabled.\n */\n disabled: boolean;\n\n /**\n * If `true` the pagination item is selected.\n */\n selected: boolean;\n}\n\nexport default interface PaginationProps extends OverridableComponentProps<ViewProps, {\n /**\n * The Number of pages that change when the button is pressed\n * @default 1\n */\n bundleSize?: number,\n\n /**\n * The pagination will be added relative to this node.\n */\n children?: React.ReactNode;\n\n /**\n * The total number of pages.\n */\n count: number,\n\n /**\n * If `true`, the pagination is disabled.\n * @default false\n */\n disabled?: boolean;\n\n\n /**\n * If `true`, hide the page indicator.\n * @default false\n */\n hideIndicator?: boolean,\n\n /**\n * If `true`, hide the next-page button.\n * @default false\n */\n hideNextButton?: boolean,\n\n /**\n * If `true`, hide the previous-page button.\n * @default false\n */\n hidePrevButton?: boolean,\n\n /**\n * If `true`, pagination is infinite.\n * @default false\n */\n infinite?: boolean,\n\n /**\n * Callback fired when the page is changed.\n */\n onChange?: (page: number) => void,\n\n /**\n * The current page number.\n */\n page: number;\n\n /**\n * Render the item.\n * @default (item) => <PaginationItem {...item} />\n */\n renderItem?: (params: PaginationRenderItemParams) => React.ReactNode;\n}> {}\n"],"mappings":""}
|
|
1
|
+
{"version":3,"names":["paginationVariants"],"sources":["PaginationProps.ts"],"sourcesContent":["import React from 'react';\nimport type { ViewProps } from 'react-native';\nimport type { OverridableComponentProps } from '../types';\n\nexport const paginationVariants = ['dot', 'number'] as const;\nexport type PaginationVariant = typeof paginationVariants[number];\n\nexport interface PaginationRenderItemParams {\n /**\n * Index of the pagination item.\n */\n index: number;\n\n /**\n * If `true`, the pagination item is disabled.\n */\n disabled: boolean;\n\n /**\n * If `true` the pagination item is selected.\n */\n selected: boolean;\n}\n\nexport default interface PaginationProps extends OverridableComponentProps<ViewProps, {\n /**\n * The Number of pages that change when the button is pressed\n * @default 1\n */\n bundleSize?: number,\n\n /**\n * The pagination will be added relative to this node.\n */\n children?: React.ReactNode;\n\n /**\n * The total number of pages.\n */\n count: number,\n\n /**\n * If `true`, the pagination is disabled.\n * @default false\n */\n disabled?: boolean;\n\n\n /**\n * If `true`, hide the page indicator.\n * @default false\n */\n hideIndicator?: boolean,\n\n /**\n * If `true`, hide the next-page button.\n * @default false\n */\n hideNextButton?: boolean,\n\n /**\n * If `true`, hide the previous-page button.\n * @default false\n */\n hidePrevButton?: boolean,\n\n /**\n * If `true`, pagination is infinite.\n * @default false\n */\n infinite?: boolean,\n\n /**\n * Callback fired when the page is changed.\n */\n onChange?: (page: number) => void,\n\n /**\n * The current page number.\n */\n page: number;\n\n /**\n * Render the item.\n * @default (item) => <PaginationItem {...item} />\n */\n renderItem?: (params: PaginationRenderItemParams) => React.ReactNode;\n\n /**\n * Determines design variations of the component.\n * @default 'dot'\n */\n variant?: PaginationVariant;\n}> {}\n"],"mappings":"AAIA,OAAO,MAAMA,kBAAkB,GAAG,CAAC,KAAD,EAAQ,QAAR,CAA3B"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { default } from './
|
|
1
|
+
export { default } from './LegacyPagination';
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["default"],"sources":["index.ts"],"sourcesContent":["export { default } from './
|
|
1
|
+
{"version":3,"names":["default"],"sources":["index.ts"],"sourcesContent":["export { default } from './LegacyPagination';\nexport type { default as PaginationProps } from './LegacyPaginationProps';\n"],"mappings":"AAAA,SAASA,OAAT,QAAwB,oBAAxB"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
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); }
|
|
2
|
+
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { View } from 'react-native';
|
|
5
|
+
import { css, useTheme } from '../styles';
|
|
6
|
+
|
|
7
|
+
const useStyles = function () {
|
|
8
|
+
const theme = useTheme();
|
|
9
|
+
const size = 6;
|
|
10
|
+
return {
|
|
11
|
+
root: {
|
|
12
|
+
width: size,
|
|
13
|
+
height: size,
|
|
14
|
+
borderRadius: size * 0.5,
|
|
15
|
+
marginHorizontal: theme.spacing(1)
|
|
16
|
+
},
|
|
17
|
+
selected: {
|
|
18
|
+
backgroundColor: theme.palette.secondary.main
|
|
19
|
+
},
|
|
20
|
+
unselected: {
|
|
21
|
+
backgroundColor: '#D1D1D1'
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
function PaginationItem(props) {
|
|
27
|
+
const {
|
|
28
|
+
disabled,
|
|
29
|
+
selected,
|
|
30
|
+
style,
|
|
31
|
+
...otherProps
|
|
32
|
+
} = props;
|
|
33
|
+
const styles = useStyles();
|
|
34
|
+
return /*#__PURE__*/React.createElement(View, _extends({
|
|
35
|
+
style: css([styles.root, selected ? styles.selected : styles.unselected, style])
|
|
36
|
+
}, otherProps));
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export default /*#__PURE__*/React.memo(PaginationItem);
|
|
40
|
+
//# sourceMappingURL=LegacyPaginationItem.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","View","css","useTheme","useStyles","theme","size","root","width","height","borderRadius","marginHorizontal","spacing","selected","backgroundColor","palette","secondary","main","unselected","PaginationItem","props","disabled","style","otherProps","styles","memo"],"sources":["LegacyPaginationItem.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 PaginationItemProps from './PaginationItemProps';\n\ntype PaginationItemStyles = NamedStylesStringUnion<'root' | 'selected' | 'unselected'>;\n\nconst useStyles: UseStyles<PaginationItemStyles> = function (): PaginationItemStyles {\n const theme = useTheme();\n\n const size = 6;\n\n return {\n root: {\n width: size,\n height: size,\n borderRadius: size * 0.5,\n marginHorizontal: theme.spacing(1),\n },\n selected: {\n backgroundColor: theme.palette.secondary.main,\n },\n unselected: {\n backgroundColor: '#D1D1D1',\n },\n };\n};\n\nfunction PaginationItem(props: PaginationItemProps) {\n const {\n disabled,\n selected,\n style,\n ...otherProps\n } = props;\n\n const styles = useStyles();\n\n return (\n <View\n style={css([\n styles.root,\n selected ? styles.selected : styles.unselected,\n style,\n ])}\n {...otherProps}\n />\n );\n}\n\nexport default React.memo(PaginationItem);\n"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,IAAT,QAAqB,cAArB;AAEA,SAASC,GAAT,EAAcC,QAAd,QAA8B,WAA9B;;AAKA,MAAMC,SAA0C,GAAG,YAAkC;EACjF,MAAMC,KAAK,GAAGF,QAAQ,EAAtB;EAEA,MAAMG,IAAI,GAAG,CAAb;EAEA,OAAO;IACHC,IAAI,EAAE;MACFC,KAAK,EAAEF,IADL;MAEFG,MAAM,EAAEH,IAFN;MAGFI,YAAY,EAAEJ,IAAI,GAAG,GAHnB;MAIFK,gBAAgB,EAAEN,KAAK,CAACO,OAAN,CAAc,CAAd;IAJhB,CADH;IAOHC,QAAQ,EAAE;MACNC,eAAe,EAAET,KAAK,CAACU,OAAN,CAAcC,SAAd,CAAwBC;IADnC,CAPP;IAUHC,UAAU,EAAE;MACRJ,eAAe,EAAE;IADT;EAVT,CAAP;AAcH,CAnBD;;AAqBA,SAASK,cAAT,CAAwBC,KAAxB,EAAoD;EAChD,MAAM;IACFC,QADE;IAEFR,QAFE;IAGFS,KAHE;IAIF,GAAGC;EAJD,IAKFH,KALJ;EAOA,MAAMI,MAAM,GAAGpB,SAAS,EAAxB;EAEA,oBACI,oBAAC,IAAD;IACI,KAAK,EAAEF,GAAG,CAAC,CACPsB,MAAM,CAACjB,IADA,EAEPM,QAAQ,GAAGW,MAAM,CAACX,QAAV,GAAqBW,MAAM,CAACN,UAF7B,EAGPI,KAHO,CAAD;EADd,GAMQC,UANR,EADJ;AAUH;;AAED,4BAAevB,KAAK,CAACyB,IAAN,CAAWN,cAAX,CAAf"}
|
|
@@ -15,10 +15,10 @@ const useStyles = function () {
|
|
|
15
15
|
marginHorizontal: theme.spacing(1)
|
|
16
16
|
},
|
|
17
17
|
selected: {
|
|
18
|
-
backgroundColor: theme.palette.
|
|
18
|
+
backgroundColor: theme.palette.fill.base
|
|
19
19
|
},
|
|
20
20
|
unselected: {
|
|
21
|
-
backgroundColor:
|
|
21
|
+
backgroundColor: theme.palette.status.disabled
|
|
22
22
|
}
|
|
23
23
|
};
|
|
24
24
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","View","css","useTheme","useStyles","theme","size","root","width","height","borderRadius","marginHorizontal","spacing","selected","backgroundColor","palette","
|
|
1
|
+
{"version":3,"names":["React","View","css","useTheme","useStyles","theme","size","root","width","height","borderRadius","marginHorizontal","spacing","selected","backgroundColor","palette","fill","base","unselected","status","disabled","PaginationItem","props","style","otherProps","styles","memo"],"sources":["PaginationItem.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 PaginationItemProps from './PaginationItemProps';\n\ntype PaginationItemStyles = NamedStylesStringUnion<'root' | 'selected' | 'unselected'>;\n\nconst useStyles: UseStyles<PaginationItemStyles> = function (): PaginationItemStyles {\n const theme = useTheme();\n\n const size = 6;\n\n return {\n root: {\n width: size,\n height: size,\n borderRadius: size * 0.5,\n marginHorizontal: theme.spacing(1),\n },\n selected: {\n backgroundColor: theme.palette.fill.base,\n },\n unselected: {\n backgroundColor: theme.palette.status.disabled,\n },\n };\n};\n\nfunction PaginationItem(props: PaginationItemProps) {\n const {\n disabled,\n selected,\n style,\n ...otherProps\n } = props;\n\n const styles = useStyles();\n\n return (\n <View\n style={css([\n styles.root,\n selected ? styles.selected : styles.unselected,\n style,\n ])}\n {...otherProps}\n />\n );\n}\n\nexport default React.memo(PaginationItem);\n"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,IAAT,QAAqB,cAArB;AAEA,SAASC,GAAT,EAAcC,QAAd,QAA8B,WAA9B;;AAKA,MAAMC,SAA0C,GAAG,YAAkC;EACjF,MAAMC,KAAK,GAAGF,QAAQ,EAAtB;EAEA,MAAMG,IAAI,GAAG,CAAb;EAEA,OAAO;IACHC,IAAI,EAAE;MACFC,KAAK,EAAEF,IADL;MAEFG,MAAM,EAAEH,IAFN;MAGFI,YAAY,EAAEJ,IAAI,GAAG,GAHnB;MAIFK,gBAAgB,EAAEN,KAAK,CAACO,OAAN,CAAc,CAAd;IAJhB,CADH;IAOHC,QAAQ,EAAE;MACNC,eAAe,EAAET,KAAK,CAACU,OAAN,CAAcC,IAAd,CAAmBC;IAD9B,CAPP;IAUHC,UAAU,EAAE;MACRJ,eAAe,EAAET,KAAK,CAACU,OAAN,CAAcI,MAAd,CAAqBC;IAD9B;EAVT,CAAP;AAcH,CAnBD;;AAqBA,SAASC,cAAT,CAAwBC,KAAxB,EAAoD;EAChD,MAAM;IACFF,QADE;IAEFP,QAFE;IAGFU,KAHE;IAIF,GAAGC;EAJD,IAKFF,KALJ;EAOA,MAAMG,MAAM,GAAGrB,SAAS,EAAxB;EAEA,oBACI,oBAAC,IAAD;IACI,KAAK,EAAEF,GAAG,CAAC,CACPuB,MAAM,CAAClB,IADA,EAEPM,QAAQ,GAAGY,MAAM,CAACZ,QAAV,GAAqBY,MAAM,CAACP,UAF7B,EAGPK,KAHO,CAAD;EADd,GAMQC,UANR,EADJ;AAUH;;AAED,4BAAexB,KAAK,CAAC0B,IAAN,CAAWL,cAAX,CAAf"}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
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); }
|
|
2
|
+
|
|
3
|
+
import React, { useEffect } from 'react';
|
|
4
|
+
import { Animated, Easing } from 'react-native';
|
|
5
|
+
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
6
|
+
import Slide from '../Slide';
|
|
7
|
+
import SnackbarContent from '../SnackbarContent';
|
|
8
|
+
import { useAnimatedValue } from '../hooks';
|
|
9
|
+
import { useTheme } from '../styles';
|
|
10
|
+
import { isNotAndroid12 } from '../utils';
|
|
11
|
+
const fadeDuration = 300;
|
|
12
|
+
const fadeAnimationDelay = 100;
|
|
13
|
+
|
|
14
|
+
const useStyles = function () {
|
|
15
|
+
const theme = useTheme();
|
|
16
|
+
const insets = useSafeAreaInsets();
|
|
17
|
+
return {
|
|
18
|
+
root: {
|
|
19
|
+
alignSelf: 'center',
|
|
20
|
+
bottom: theme.spacing(2),
|
|
21
|
+
maxWidth: 480,
|
|
22
|
+
paddingBottom: insets.bottom,
|
|
23
|
+
paddingHorizontal: theme.spacing(2),
|
|
24
|
+
position: 'absolute',
|
|
25
|
+
width: '100%',
|
|
26
|
+
// TODO: Need to remove zIndex.
|
|
27
|
+
zIndex: 32
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export default function Snackbar(props) {
|
|
33
|
+
const {
|
|
34
|
+
actionLabel,
|
|
35
|
+
animatedY,
|
|
36
|
+
autoHideDuration = null,
|
|
37
|
+
children,
|
|
38
|
+
message,
|
|
39
|
+
title,
|
|
40
|
+
startIcon,
|
|
41
|
+
onActionPress,
|
|
42
|
+
onClose,
|
|
43
|
+
style,
|
|
44
|
+
visible = false,
|
|
45
|
+
...otherProps
|
|
46
|
+
} = props;
|
|
47
|
+
const autoHideTimer = React.useRef(null);
|
|
48
|
+
|
|
49
|
+
const clearAutoHideTimeout = () => {
|
|
50
|
+
if (autoHideTimer.current !== null) {
|
|
51
|
+
clearTimeout(autoHideTimer.current);
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
React.useEffect(() => {
|
|
56
|
+
return () => {
|
|
57
|
+
clearAutoHideTimeout();
|
|
58
|
+
};
|
|
59
|
+
}, []);
|
|
60
|
+
React.useEffect(() => {
|
|
61
|
+
if (visible && autoHideDuration !== null) {
|
|
62
|
+
clearAutoHideTimeout(); // @ts-ignore
|
|
63
|
+
|
|
64
|
+
autoHideTimer.current = setTimeout(() => {
|
|
65
|
+
if (onClose) {
|
|
66
|
+
onClose();
|
|
67
|
+
}
|
|
68
|
+
}, autoHideDuration);
|
|
69
|
+
}
|
|
70
|
+
}, [visible, autoHideDuration, onClose]);
|
|
71
|
+
const styles = useStyles();
|
|
72
|
+
const [exited, setExited] = React.useState(true);
|
|
73
|
+
const animatedOpacity = useAnimatedValue(0);
|
|
74
|
+
const animatedStyle = {
|
|
75
|
+
opacity: animatedOpacity
|
|
76
|
+
};
|
|
77
|
+
useEffect(() => {
|
|
78
|
+
Animated.timing(animatedOpacity, {
|
|
79
|
+
toValue: visible ? 1 : 0,
|
|
80
|
+
duration: fadeDuration,
|
|
81
|
+
delay: visible ? fadeAnimationDelay : 0,
|
|
82
|
+
easing: Easing.out(Easing.exp),
|
|
83
|
+
useNativeDriver: isNotAndroid12
|
|
84
|
+
}).start();
|
|
85
|
+
}, [visible]);
|
|
86
|
+
|
|
87
|
+
if (!visible && exited) {
|
|
88
|
+
return null;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
return /*#__PURE__*/React.createElement(Animated.View, _extends({
|
|
92
|
+
style: [animatedStyle, styles.root, style]
|
|
93
|
+
}, otherProps), /*#__PURE__*/React.createElement(Slide, {
|
|
94
|
+
animatedY: animatedY,
|
|
95
|
+
appear: visible,
|
|
96
|
+
onEnter: () => setExited(false),
|
|
97
|
+
onExited: () => setExited(true)
|
|
98
|
+
}, children ? children : /*#__PURE__*/React.createElement(SnackbarContent, {
|
|
99
|
+
title: title,
|
|
100
|
+
startIcon: startIcon,
|
|
101
|
+
actionLabel: actionLabel,
|
|
102
|
+
message: message,
|
|
103
|
+
onActionPress: onActionPress
|
|
104
|
+
})));
|
|
105
|
+
}
|
|
106
|
+
;
|
|
107
|
+
//# sourceMappingURL=LegacySnackbar.js.map
|