@fountain-ui/core 2.0.0-beta.93 → 2.0.0-beta.94
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/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/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/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 +2 -2
- 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/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,85 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ViewProps } from 'react-native';
|
|
3
|
+
import type { OverridableComponentProps } from '../types';
|
|
4
|
+
|
|
5
|
+
export interface PaginationRenderItemParams {
|
|
6
|
+
/**
|
|
7
|
+
* Index of the pagination item.
|
|
8
|
+
*/
|
|
9
|
+
index: number;
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* If `true`, the pagination item is disabled.
|
|
13
|
+
*/
|
|
14
|
+
disabled: boolean;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* If `true` the pagination item is selected.
|
|
18
|
+
*/
|
|
19
|
+
selected: boolean;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export default interface PaginationProps extends OverridableComponentProps<ViewProps, {
|
|
23
|
+
/**
|
|
24
|
+
* The Number of pages that change when the button is pressed
|
|
25
|
+
* @default 1
|
|
26
|
+
*/
|
|
27
|
+
bundleSize?: number,
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* The pagination will be added relative to this node.
|
|
31
|
+
*/
|
|
32
|
+
children?: React.ReactNode;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* The total number of pages.
|
|
36
|
+
*/
|
|
37
|
+
count: number,
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* If `true`, the pagination is disabled.
|
|
41
|
+
* @default false
|
|
42
|
+
*/
|
|
43
|
+
disabled?: boolean;
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* If `true`, hide the page indicator.
|
|
48
|
+
* @default false
|
|
49
|
+
*/
|
|
50
|
+
hideIndicator?: boolean,
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* If `true`, hide the next-page button.
|
|
54
|
+
* @default false
|
|
55
|
+
*/
|
|
56
|
+
hideNextButton?: boolean,
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* If `true`, hide the previous-page button.
|
|
60
|
+
* @default false
|
|
61
|
+
*/
|
|
62
|
+
hidePrevButton?: boolean,
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* If `true`, pagination is infinite.
|
|
66
|
+
* @default false
|
|
67
|
+
*/
|
|
68
|
+
infinite?: boolean,
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Callback fired when the page is changed.
|
|
72
|
+
*/
|
|
73
|
+
onChange?: (page: number) => void,
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* The current page number.
|
|
77
|
+
*/
|
|
78
|
+
page: number;
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Render the item.
|
|
82
|
+
* @default (item) => <PaginationItem {...item} />
|
|
83
|
+
*/
|
|
84
|
+
renderItem?: (params: PaginationRenderItemParams) => React.ReactNode;
|
|
85
|
+
}> {}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Text } from 'react-native';
|
|
3
|
+
import type { NamedStylesStringUnion, UseStyles } from '@fountain-ui/styles';
|
|
4
|
+
import { commonColors, typographyOf } from '@fountain-ui/styles';
|
|
5
|
+
import Divider from '../Divider';
|
|
6
|
+
import Row from '../Row';
|
|
7
|
+
import { createFontStyle, useTheme } from '../styles';
|
|
8
|
+
import type PaginationProps from './PaginationProps';
|
|
9
|
+
|
|
10
|
+
type NumberPaginationStyles = NamedStylesStringUnion<'root' | 'divider'>;
|
|
11
|
+
|
|
12
|
+
const useStyles: UseStyles<NumberPaginationStyles> = function (): NumberPaginationStyles {
|
|
13
|
+
const theme = useTheme();
|
|
14
|
+
|
|
15
|
+
return {
|
|
16
|
+
root: {
|
|
17
|
+
backgroundColor: commonColors.static.weakOpacity,
|
|
18
|
+
borderRadius: theme.shape.radius.full,
|
|
19
|
+
paddingHorizontal: theme.spacing(1.25),
|
|
20
|
+
paddingVertical: theme.spacing(0.5),
|
|
21
|
+
},
|
|
22
|
+
divider: {
|
|
23
|
+
alignSelf: 'center',
|
|
24
|
+
borderColor: commonColors.static.weakOpacityInverse,
|
|
25
|
+
height: 6,
|
|
26
|
+
},
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
interface NumberPaginationProps {
|
|
31
|
+
currentPage: PaginationProps['page'];
|
|
32
|
+
maxPage: PaginationProps['count'];
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export default function NumberPagination(props: NumberPaginationProps) {
|
|
36
|
+
const {
|
|
37
|
+
currentPage,
|
|
38
|
+
maxPage,
|
|
39
|
+
} = props;
|
|
40
|
+
|
|
41
|
+
const styles = useStyles();
|
|
42
|
+
|
|
43
|
+
const theme = useTheme();
|
|
44
|
+
|
|
45
|
+
const typography = typographyOf({
|
|
46
|
+
fontSize: 9.5,
|
|
47
|
+
lineHeight: 11.4,
|
|
48
|
+
fontFamily: 'Pretendard-SemiBold',
|
|
49
|
+
letterSpacing: -0.19,
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
const currentFontStyle = createFontStyle(theme, {
|
|
53
|
+
selector: (_) => typography,
|
|
54
|
+
color: commonColors.static.strongInverse,
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
const countFontStyle = createFontStyle(theme, {
|
|
58
|
+
selector: (_) => typography,
|
|
59
|
+
color: commonColors.static.baseOpacityInverse,
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
return (
|
|
63
|
+
<Row style={styles.root}>
|
|
64
|
+
<Text style={currentFontStyle}>
|
|
65
|
+
{currentPage + 1}
|
|
66
|
+
</Text>
|
|
67
|
+
|
|
68
|
+
<Divider
|
|
69
|
+
style={styles.divider}
|
|
70
|
+
vertical={true}
|
|
71
|
+
/>
|
|
72
|
+
|
|
73
|
+
<Text style={countFontStyle}>
|
|
74
|
+
{maxPage}
|
|
75
|
+
</Text>
|
|
76
|
+
</Row>
|
|
77
|
+
);
|
|
78
|
+
}
|
|
@@ -6,7 +6,9 @@ import { ChevronLeft, ChevronRight } from '../internal/icons';
|
|
|
6
6
|
import { css, useTheme } from '../styles';
|
|
7
7
|
import IconButton from '../IconButton';
|
|
8
8
|
import PaginationItem from '../PaginationItem';
|
|
9
|
+
import NumberPagination from './NumberPagination';
|
|
9
10
|
import type PaginationProps from './PaginationProps';
|
|
11
|
+
import type { PaginationVariant } from './PaginationProps';
|
|
10
12
|
|
|
11
13
|
type PaginationStyleKeys =
|
|
12
14
|
| 'root'
|
|
@@ -73,6 +75,7 @@ export default function Pagination(props: PaginationProps) {
|
|
|
73
75
|
page,
|
|
74
76
|
renderItem = ({ index, ...rest }) => <PaginationItem key={`${index}`} {...rest}/>,
|
|
75
77
|
style,
|
|
78
|
+
variant = 'dot' as PaginationVariant,
|
|
76
79
|
...otherProps
|
|
77
80
|
} = props;
|
|
78
81
|
|
|
@@ -107,28 +110,35 @@ export default function Pagination(props: PaginationProps) {
|
|
|
107
110
|
|
|
108
111
|
const prevButton = !hidePrevButton ? (
|
|
109
112
|
<IconButton
|
|
110
|
-
children={<ChevronLeft/>}
|
|
111
113
|
color={'tertiary'}
|
|
112
114
|
disabled={disabled || (!infinite && page <= firstPage)}
|
|
113
115
|
onPress={handlePrevPress}
|
|
114
116
|
size={'small'}
|
|
115
117
|
style={children ? styles.prevAnchor : styles.prevInline}
|
|
116
|
-
|
|
118
|
+
>
|
|
119
|
+
<ChevronLeft/>
|
|
120
|
+
</IconButton>
|
|
117
121
|
) : null;
|
|
118
122
|
|
|
119
123
|
const nextButton = !hideNextButton ? (
|
|
120
124
|
<IconButton
|
|
121
|
-
children={<ChevronRight/>}
|
|
122
125
|
color={'tertiary'}
|
|
123
126
|
disabled={disabled || (!infinite && page + bundleSize > lastPage)}
|
|
124
127
|
onPress={handleNextPress}
|
|
125
128
|
size={'small'}
|
|
126
129
|
style={children ? styles.nextAnchor : styles.nextInline}
|
|
127
|
-
|
|
130
|
+
>
|
|
131
|
+
<ChevronRight/>
|
|
132
|
+
</IconButton>
|
|
128
133
|
) : null;
|
|
129
134
|
|
|
130
135
|
const items = !hideIndicator ? (
|
|
131
|
-
|
|
136
|
+
variant === 'number' ? (
|
|
137
|
+
<NumberPagination
|
|
138
|
+
currentPage={page}
|
|
139
|
+
maxPage={count}
|
|
140
|
+
/>
|
|
141
|
+
) : times(i => renderItem({ index: i, disabled, selected: i === page }), count)
|
|
132
142
|
) : null;
|
|
133
143
|
|
|
134
144
|
const containerProps = {
|
|
@@ -2,6 +2,9 @@ import React from 'react';
|
|
|
2
2
|
import type { ViewProps } from 'react-native';
|
|
3
3
|
import type { OverridableComponentProps } from '../types';
|
|
4
4
|
|
|
5
|
+
export const paginationVariants = ['dot', 'number'] as const;
|
|
6
|
+
export type PaginationVariant = typeof paginationVariants[number];
|
|
7
|
+
|
|
5
8
|
export interface PaginationRenderItemParams {
|
|
6
9
|
/**
|
|
7
10
|
* Index of the pagination item.
|
|
@@ -82,4 +85,10 @@ export default interface PaginationProps extends OverridableComponentProps<ViewP
|
|
|
82
85
|
* @default (item) => <PaginationItem {...item} />
|
|
83
86
|
*/
|
|
84
87
|
renderItem?: (params: PaginationRenderItemParams) => React.ReactNode;
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Determines design variations of the component.
|
|
91
|
+
* @default 'dot'
|
|
92
|
+
*/
|
|
93
|
+
variant?: PaginationVariant;
|
|
85
94
|
}> {}
|
package/src/Pagination/index.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { default } from './
|
|
2
|
-
export type { default as PaginationProps } from './
|
|
1
|
+
export { default } from './LegacyPagination';
|
|
2
|
+
export type { default as PaginationProps } from './LegacyPaginationProps';
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { View } from 'react-native';
|
|
3
|
+
import { NamedStylesStringUnion, UseStyles } from '@fountain-ui/styles';
|
|
4
|
+
import { css, useTheme } from '../styles';
|
|
5
|
+
import type PaginationItemProps from './PaginationItemProps';
|
|
6
|
+
|
|
7
|
+
type PaginationItemStyles = NamedStylesStringUnion<'root' | 'selected' | 'unselected'>;
|
|
8
|
+
|
|
9
|
+
const useStyles: UseStyles<PaginationItemStyles> = function (): PaginationItemStyles {
|
|
10
|
+
const theme = useTheme();
|
|
11
|
+
|
|
12
|
+
const size = 6;
|
|
13
|
+
|
|
14
|
+
return {
|
|
15
|
+
root: {
|
|
16
|
+
width: size,
|
|
17
|
+
height: size,
|
|
18
|
+
borderRadius: size * 0.5,
|
|
19
|
+
marginHorizontal: theme.spacing(1),
|
|
20
|
+
},
|
|
21
|
+
selected: {
|
|
22
|
+
backgroundColor: theme.palette.secondary.main,
|
|
23
|
+
},
|
|
24
|
+
unselected: {
|
|
25
|
+
backgroundColor: '#D1D1D1',
|
|
26
|
+
},
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
function PaginationItem(props: PaginationItemProps) {
|
|
31
|
+
const {
|
|
32
|
+
disabled,
|
|
33
|
+
selected,
|
|
34
|
+
style,
|
|
35
|
+
...otherProps
|
|
36
|
+
} = props;
|
|
37
|
+
|
|
38
|
+
const styles = useStyles();
|
|
39
|
+
|
|
40
|
+
return (
|
|
41
|
+
<View
|
|
42
|
+
style={css([
|
|
43
|
+
styles.root,
|
|
44
|
+
selected ? styles.selected : styles.unselected,
|
|
45
|
+
style,
|
|
46
|
+
])}
|
|
47
|
+
{...otherProps}
|
|
48
|
+
/>
|
|
49
|
+
);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export default React.memo(PaginationItem);
|
|
@@ -19,10 +19,10 @@ const useStyles: UseStyles<PaginationItemStyles> = function (): PaginationItemSt
|
|
|
19
19
|
marginHorizontal: theme.spacing(1),
|
|
20
20
|
},
|
|
21
21
|
selected: {
|
|
22
|
-
backgroundColor: theme.palette.
|
|
22
|
+
backgroundColor: theme.palette.fill.base,
|
|
23
23
|
},
|
|
24
24
|
unselected: {
|
|
25
|
-
backgroundColor:
|
|
25
|
+
backgroundColor: theme.palette.status.disabled,
|
|
26
26
|
},
|
|
27
27
|
};
|
|
28
28
|
};
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import React, { useEffect } from 'react';
|
|
2
|
+
import { Animated, Easing } from 'react-native';
|
|
3
|
+
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
4
|
+
import { NamedStylesStringUnion, UseStyles } from '@fountain-ui/styles';
|
|
5
|
+
import Slide from '../Slide';
|
|
6
|
+
import SnackbarContent from '../SnackbarContent';
|
|
7
|
+
import { useAnimatedValue } from '../hooks';
|
|
8
|
+
import { useTheme } from '../styles';
|
|
9
|
+
import { isNotAndroid12 } from '../utils';
|
|
10
|
+
import type SnackbarProps from './LegacySnackbarProps';
|
|
11
|
+
|
|
12
|
+
type SnackBarStyles = NamedStylesStringUnion<'root'>;
|
|
13
|
+
|
|
14
|
+
const fadeDuration = 300;
|
|
15
|
+
const fadeAnimationDelay = 100;
|
|
16
|
+
|
|
17
|
+
const useStyles: UseStyles<SnackBarStyles> = function (): SnackBarStyles {
|
|
18
|
+
const theme = useTheme();
|
|
19
|
+
const insets = useSafeAreaInsets();
|
|
20
|
+
|
|
21
|
+
return {
|
|
22
|
+
root: {
|
|
23
|
+
alignSelf: 'center',
|
|
24
|
+
bottom: theme.spacing(2),
|
|
25
|
+
maxWidth: 480,
|
|
26
|
+
paddingBottom: insets.bottom,
|
|
27
|
+
paddingHorizontal: theme.spacing(2),
|
|
28
|
+
position: 'absolute',
|
|
29
|
+
width: '100%',
|
|
30
|
+
// TODO: Need to remove zIndex.
|
|
31
|
+
zIndex: 32,
|
|
32
|
+
},
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
export default function Snackbar(props: SnackbarProps) {
|
|
37
|
+
const {
|
|
38
|
+
actionLabel,
|
|
39
|
+
animatedY,
|
|
40
|
+
autoHideDuration = null,
|
|
41
|
+
children,
|
|
42
|
+
message,
|
|
43
|
+
title,
|
|
44
|
+
startIcon,
|
|
45
|
+
onActionPress,
|
|
46
|
+
onClose,
|
|
47
|
+
style,
|
|
48
|
+
visible = false,
|
|
49
|
+
...otherProps
|
|
50
|
+
} = props;
|
|
51
|
+
|
|
52
|
+
const autoHideTimer = React.useRef<number | null>(null);
|
|
53
|
+
|
|
54
|
+
const clearAutoHideTimeout = () => {
|
|
55
|
+
if (autoHideTimer.current !== null) {
|
|
56
|
+
clearTimeout(autoHideTimer.current);
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
React.useEffect(() => {
|
|
61
|
+
return () => {
|
|
62
|
+
clearAutoHideTimeout();
|
|
63
|
+
};
|
|
64
|
+
}, []);
|
|
65
|
+
|
|
66
|
+
React.useEffect(() => {
|
|
67
|
+
if (visible && autoHideDuration !== null) {
|
|
68
|
+
clearAutoHideTimeout();
|
|
69
|
+
|
|
70
|
+
// @ts-ignore
|
|
71
|
+
autoHideTimer.current = setTimeout(() => {
|
|
72
|
+
if (onClose) {
|
|
73
|
+
onClose();
|
|
74
|
+
}
|
|
75
|
+
}, autoHideDuration);
|
|
76
|
+
}
|
|
77
|
+
}, [visible, autoHideDuration, onClose]);
|
|
78
|
+
|
|
79
|
+
const styles = useStyles();
|
|
80
|
+
|
|
81
|
+
const [exited, setExited] = React.useState(true);
|
|
82
|
+
|
|
83
|
+
const animatedOpacity = useAnimatedValue(0);
|
|
84
|
+
|
|
85
|
+
const animatedStyle = {
|
|
86
|
+
opacity: animatedOpacity,
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
useEffect(() => {
|
|
90
|
+
Animated.timing(animatedOpacity, {
|
|
91
|
+
toValue: visible ? 1 : 0,
|
|
92
|
+
duration: fadeDuration,
|
|
93
|
+
delay: visible ? fadeAnimationDelay : 0,
|
|
94
|
+
easing: Easing.out(Easing.exp),
|
|
95
|
+
useNativeDriver: isNotAndroid12,
|
|
96
|
+
}).start();
|
|
97
|
+
}, [visible]);
|
|
98
|
+
|
|
99
|
+
if (!visible && exited) {
|
|
100
|
+
return null;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
return (
|
|
104
|
+
<Animated.View
|
|
105
|
+
style={[
|
|
106
|
+
animatedStyle,
|
|
107
|
+
styles.root,
|
|
108
|
+
style,
|
|
109
|
+
]}
|
|
110
|
+
{...otherProps}
|
|
111
|
+
>
|
|
112
|
+
<Slide
|
|
113
|
+
animatedY={animatedY}
|
|
114
|
+
appear={visible}
|
|
115
|
+
onEnter={() => setExited(false)}
|
|
116
|
+
onExited={() => setExited(true)}
|
|
117
|
+
>
|
|
118
|
+
{children ? children : (
|
|
119
|
+
<SnackbarContent
|
|
120
|
+
title={title}
|
|
121
|
+
startIcon={startIcon}
|
|
122
|
+
actionLabel={actionLabel}
|
|
123
|
+
message={message}
|
|
124
|
+
onActionPress={onActionPress}
|
|
125
|
+
/>
|
|
126
|
+
)}
|
|
127
|
+
</Slide>
|
|
128
|
+
</Animated.View>
|
|
129
|
+
);
|
|
130
|
+
};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
import type { Animated, ViewProps } from 'react-native';
|
|
4
|
+
import type { OverridableComponentProps } from '../types';
|
|
5
|
+
|
|
6
|
+
export default interface SnackbarProps extends OverridableComponentProps<ViewProps, {
|
|
7
|
+
/**
|
|
8
|
+
* The text to use for the action component.
|
|
9
|
+
*/
|
|
10
|
+
actionLabel?: string;
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* y value for animating.
|
|
14
|
+
*/
|
|
15
|
+
animatedY?: Animated.Value;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* The number of milliseconds to wait before automatically calling the
|
|
19
|
+
* `onDismiss` function. `onDismiss` should then set the state of the `visible`
|
|
20
|
+
* prop to hide the `Snackbar`. This behavior is disabled by default with
|
|
21
|
+
* the `null` value.
|
|
22
|
+
* @default null
|
|
23
|
+
*/
|
|
24
|
+
autoHideDuration?: number | null;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Replace the `SnackbarContent` component.
|
|
28
|
+
*/
|
|
29
|
+
children?: React.ReactNode;
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* The message to display.
|
|
33
|
+
*/
|
|
34
|
+
message?: string;
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Callback fired when the action component pressed.
|
|
38
|
+
*/
|
|
39
|
+
onActionPress?: () => void;
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Callback fired when the component requests to be closed.
|
|
43
|
+
*/
|
|
44
|
+
onClose?: () => void;
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Element placed before the title and message.
|
|
48
|
+
*/
|
|
49
|
+
startIcon?: React.ReactElement;
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* The title to display.
|
|
53
|
+
*/
|
|
54
|
+
title?: string;
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* If `true`, `Snackbar` is shown.
|
|
58
|
+
* @default false
|
|
59
|
+
*/
|
|
60
|
+
visible?: boolean;
|
|
61
|
+
}> {}
|
|
@@ -3,7 +3,7 @@ import { Animated, Easing } from 'react-native';
|
|
|
3
3
|
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
4
4
|
import { NamedStylesStringUnion, UseStyles } from '@fountain-ui/styles';
|
|
5
5
|
import Slide from '../Slide';
|
|
6
|
-
import SnackbarContent from '../SnackbarContent';
|
|
6
|
+
import SnackbarContent from '../SnackbarContent/SnackbarContent';
|
|
7
7
|
import { useAnimatedValue } from '../hooks';
|
|
8
8
|
import { useTheme } from '../styles';
|
|
9
9
|
import { isNotAndroid12 } from '../utils';
|
|
@@ -35,14 +35,15 @@ const useStyles: UseStyles<SnackBarStyles> = function (): SnackBarStyles {
|
|
|
35
35
|
|
|
36
36
|
export default function Snackbar(props: SnackbarProps) {
|
|
37
37
|
const {
|
|
38
|
-
|
|
38
|
+
actionContent,
|
|
39
39
|
animatedY,
|
|
40
40
|
autoHideDuration = null,
|
|
41
41
|
children,
|
|
42
42
|
message,
|
|
43
43
|
title,
|
|
44
44
|
startIcon,
|
|
45
|
-
|
|
45
|
+
status = 'info',
|
|
46
|
+
onPress,
|
|
46
47
|
onClose,
|
|
47
48
|
style,
|
|
48
49
|
visible = false,
|
|
@@ -119,9 +120,10 @@ export default function Snackbar(props: SnackbarProps) {
|
|
|
119
120
|
<SnackbarContent
|
|
120
121
|
title={title}
|
|
121
122
|
startIcon={startIcon}
|
|
122
|
-
|
|
123
|
+
status={status}
|
|
124
|
+
actionContent={actionContent}
|
|
123
125
|
message={message}
|
|
124
|
-
|
|
126
|
+
onPress={onPress}
|
|
125
127
|
/>
|
|
126
128
|
)}
|
|
127
129
|
</Slide>
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
3
2
|
import type { Animated, ViewProps } from 'react-native';
|
|
4
3
|
import type { OverridableComponentProps } from '../types';
|
|
5
4
|
|
|
5
|
+
export const snackbarStatus = ['info', 'success', 'fail'] as const;
|
|
6
|
+
export type SnackbarStatus = typeof snackbarStatus[number];
|
|
7
|
+
|
|
6
8
|
export default interface SnackbarProps extends OverridableComponentProps<ViewProps, {
|
|
7
9
|
/**
|
|
8
10
|
* The text to use for the action component.
|
|
9
11
|
*/
|
|
10
|
-
|
|
12
|
+
actionContent?: string | React.ReactNode;
|
|
11
13
|
|
|
12
14
|
/**
|
|
13
15
|
* y value for animating.
|
|
@@ -36,7 +38,7 @@ export default interface SnackbarProps extends OverridableComponentProps<ViewPro
|
|
|
36
38
|
/**
|
|
37
39
|
* Callback fired when the action component pressed.
|
|
38
40
|
*/
|
|
39
|
-
|
|
41
|
+
onPress?: () => void;
|
|
40
42
|
|
|
41
43
|
/**
|
|
42
44
|
* Callback fired when the component requests to be closed.
|
|
@@ -48,6 +50,12 @@ export default interface SnackbarProps extends OverridableComponentProps<ViewPro
|
|
|
48
50
|
*/
|
|
49
51
|
startIcon?: React.ReactElement;
|
|
50
52
|
|
|
53
|
+
/**
|
|
54
|
+
* The status of the snackbar, which determines its visual style and optional icon.
|
|
55
|
+
* @default 'info'
|
|
56
|
+
*/
|
|
57
|
+
status?: SnackbarStatus;
|
|
58
|
+
|
|
51
59
|
/**
|
|
52
60
|
* The title to display.
|
|
53
61
|
*/
|
package/src/Snackbar/index.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { default } from './
|
|
2
|
-
export type { default as SnackbarProps } from './
|
|
1
|
+
export { default } from './LegacySnackbar';
|
|
2
|
+
export type { default as SnackbarProps } from './LegacySnackbarProps';
|