@fountain-ui/core 2.0.0-beta.98 → 3.0.0-alpha.2
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 +0 -1
- package/build/commonjs/Accordion/Accordion.js.map +1 -1
- package/build/commonjs/Accordion/index.js +10 -2
- package/build/commonjs/Accordion/index.js.map +1 -1
- package/build/commonjs/Accordion/useVariantStyleMap.js +6 -6
- package/build/commonjs/Accordion/useVariantStyleMap.js.map +1 -1
- package/build/commonjs/AppBar/AppBar.js +8 -8
- package/build/commonjs/AppBar/AppBar.js.map +1 -1
- package/build/commonjs/AppBar/AppBarProps.js +7 -0
- package/build/commonjs/AppBar/AppBarProps.js.map +1 -1
- package/build/commonjs/AppBar/index.js +8 -0
- package/build/commonjs/AppBar/index.js.map +1 -1
- package/build/commonjs/Badge/index.js +28 -2
- package/build/commonjs/Badge/index.js.map +1 -1
- package/build/commonjs/Badge/useVariantStyleMap.js +15 -6
- package/build/commonjs/Badge/useVariantStyleMap.js.map +1 -1
- package/build/commonjs/{PaginationItem/LegacyPaginationItem.js → BottomSheetActions/BottomSheetActions.js} +10 -23
- package/build/commonjs/BottomSheetActions/BottomSheetActions.js.map +1 -0
- package/build/commonjs/BottomSheetActions/BottomSheetActionsProps.js +2 -0
- package/build/commonjs/BottomSheetActions/BottomSheetActionsProps.js.map +1 -0
- package/build/commonjs/BottomSheetActions/index.js +16 -0
- package/build/commonjs/BottomSheetActions/index.js.map +1 -0
- package/build/commonjs/{SvgIcon/LegacySvgIcon.js → BottomSheetContent/BottomSheetContent.js} +23 -23
- package/build/commonjs/BottomSheetContent/BottomSheetContent.js.map +1 -0
- package/build/commonjs/BottomSheetContent/BottomSheetContentProps.js +2 -0
- package/build/commonjs/BottomSheetContent/BottomSheetContentProps.js.map +1 -0
- package/build/commonjs/BottomSheetContent/index.js +16 -0
- package/build/commonjs/BottomSheetContent/index.js.map +1 -0
- package/build/commonjs/BottomSheetTitle/BottomSheetTitle.js +73 -0
- package/build/commonjs/BottomSheetTitle/BottomSheetTitle.js.map +1 -0
- package/build/commonjs/BottomSheetTitle/BottomSheetTitleProps.js +2 -0
- package/build/commonjs/BottomSheetTitle/BottomSheetTitleProps.js.map +1 -0
- package/build/commonjs/{CheckboxGroup → BottomSheetTitle}/index.js +2 -2
- package/build/commonjs/BottomSheetTitle/index.js.map +1 -0
- package/build/commonjs/Button/Button.js +5 -8
- package/build/commonjs/Button/Button.js.map +1 -1
- package/build/commonjs/Button/ButtonProps.js +7 -7
- package/build/commonjs/Button/ButtonProps.js.map +1 -1
- package/build/commonjs/Button/index.js +22 -2
- package/build/commonjs/Button/index.js.map +1 -1
- package/build/commonjs/Button/useVariantStyleMap.js +4 -0
- package/build/commonjs/Button/useVariantStyleMap.js.map +1 -1
- package/build/commonjs/Checkbox/Checkbox.js +1 -2
- package/build/commonjs/Checkbox/Checkbox.js.map +1 -1
- package/build/commonjs/Checkbox/index.js +10 -2
- package/build/commonjs/Checkbox/index.js.map +1 -1
- package/build/commonjs/Checkbox/useVariantStyleMap.js +4 -1
- package/build/commonjs/Checkbox/useVariantStyleMap.js.map +1 -1
- package/build/commonjs/Chip/index.js +16 -2
- package/build/commonjs/Chip/index.js.map +1 -1
- package/build/commonjs/Chip/useChipStyle.js +3 -7
- package/build/commonjs/Chip/useChipStyle.js.map +1 -1
- package/build/commonjs/Dialog/Dialog.js +10 -21
- package/build/commonjs/Dialog/Dialog.js.map +1 -1
- package/build/commonjs/Dialog/DialogContext.js +19 -0
- package/build/commonjs/Dialog/DialogContext.js.map +1 -0
- package/build/commonjs/Dialog/index.js +32 -2
- package/build/commonjs/Dialog/index.js.map +1 -1
- package/build/commonjs/Dialog/useDialogSectionStyle.js +40 -0
- package/build/commonjs/Dialog/useDialogSectionStyle.js.map +1 -0
- package/build/commonjs/Dialog/useDialogStyle.js +16 -18
- package/build/commonjs/Dialog/useDialogStyle.js.map +1 -1
- package/build/commonjs/DialogActions/DialogActions.js +17 -2
- package/build/commonjs/DialogActions/DialogActions.js.map +1 -1
- package/build/commonjs/DialogActions/index.js +2 -2
- package/build/commonjs/DialogActions/index.js.map +1 -1
- package/build/commonjs/DialogContent/DialogContent.js +6 -3
- package/build/commonjs/DialogContent/DialogContent.js.map +1 -1
- package/build/commonjs/DialogContent/index.js +2 -2
- package/build/commonjs/DialogContent/index.js.map +1 -1
- package/build/commonjs/DialogMedia/DialogMedia.js +1 -0
- package/build/commonjs/DialogMedia/DialogMedia.js.map +1 -1
- package/build/commonjs/DialogMedia/index.js +2 -2
- package/build/commonjs/DialogMedia/index.js.map +1 -1
- package/build/commonjs/DialogTitle/DialogTitle.js +4 -1
- package/build/commonjs/DialogTitle/DialogTitle.js.map +1 -1
- package/build/commonjs/DialogTitle/index.js +2 -2
- package/build/commonjs/DialogTitle/index.js.map +1 -1
- package/build/commonjs/Divider/Divider.js +1 -1
- package/build/commonjs/Divider/Divider.js.map +1 -1
- package/build/commonjs/Divider/DividerProps.js +3 -3
- package/build/commonjs/Divider/DividerProps.js.map +1 -1
- package/build/commonjs/Divider/index.js +16 -2
- package/build/commonjs/Divider/index.js.map +1 -1
- package/build/commonjs/Empty/Empty.js +3 -4
- package/build/commonjs/Empty/Empty.js.map +1 -1
- package/build/commonjs/IconButton/IconButton.js +26 -2
- package/build/commonjs/IconButton/IconButton.js.map +1 -1
- package/build/commonjs/IconButton/IconButtonProps.js.map +1 -1
- package/build/commonjs/IconButton/index.js +10 -2
- package/build/commonjs/IconButton/index.js.map +1 -1
- package/build/commonjs/ListItemText/ListItemText.js +4 -4
- package/build/commonjs/ListItemText/ListItemText.js.map +1 -1
- package/build/commonjs/ListSubheader/ListSubheader.js +2 -2
- package/build/commonjs/ListSubheader/ListSubheader.js.map +1 -1
- package/build/commonjs/Pagination/Pagination.js +0 -4
- package/build/commonjs/Pagination/Pagination.js.map +1 -1
- package/build/commonjs/Pagination/index.js +10 -2
- package/build/commonjs/Pagination/index.js.map +1 -1
- package/build/commonjs/Radio/Radio.js +2 -3
- package/build/commonjs/Radio/Radio.js.map +1 -1
- package/build/commonjs/Radio/index.js +2 -2
- package/build/commonjs/Radio/index.js.map +1 -1
- package/build/commonjs/RadioGroup/index.js +2 -2
- package/build/commonjs/RadioGroup/index.js.map +1 -1
- package/build/commonjs/ShadowView/ShadowView.native.js +17 -5
- package/build/commonjs/ShadowView/ShadowView.native.js.map +1 -1
- package/build/commonjs/Snackbar/Snackbar.js +1 -1
- package/build/commonjs/Snackbar/Snackbar.js.map +1 -1
- package/build/commonjs/Snackbar/index.js +10 -2
- package/build/commonjs/Snackbar/index.js.map +1 -1
- package/build/commonjs/SnackbarContent/SnackbarContent.js +12 -4
- package/build/commonjs/SnackbarContent/SnackbarContent.js.map +1 -1
- package/build/commonjs/SnackbarContent/StatusIcon.js +0 -2
- package/build/commonjs/SnackbarContent/StatusIcon.js.map +1 -1
- package/build/commonjs/SnackbarContent/index.js +2 -2
- package/build/commonjs/SnackbarContent/index.js.map +1 -1
- package/build/commonjs/SvgIcon/index.js +16 -2
- package/build/commonjs/SvgIcon/index.js.map +1 -1
- package/build/commonjs/Tab/Tab.js +1 -1
- package/build/commonjs/Tab/Tab.js.map +1 -1
- package/build/commonjs/Tab/index.js +2 -2
- package/build/commonjs/Tab/index.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/Tabs.js +15 -3
- package/build/commonjs/Tabs/Tabs.js.map +1 -1
- package/build/commonjs/Tabs/TabsProps.js +3 -1
- package/build/commonjs/Tabs/TabsProps.js.map +1 -1
- package/build/commonjs/Tabs/index.js +16 -2
- package/build/commonjs/Tabs/index.js.map +1 -1
- package/build/commonjs/TextField/TextField.js +0 -1
- package/build/commonjs/TextField/TextField.js.map +1 -1
- package/build/commonjs/TextField/index.js +10 -2
- package/build/commonjs/TextField/index.js.map +1 -1
- package/build/commonjs/Toggle/Toggle.js +5 -3
- package/build/commonjs/Toggle/Toggle.js.map +1 -1
- package/build/commonjs/Toolbar/Toolbar.js +17 -6
- package/build/commonjs/Toolbar/Toolbar.js.map +1 -1
- package/build/commonjs/Toolbar/ToolbarProps.js +7 -0
- package/build/commonjs/Toolbar/ToolbarProps.js.map +1 -1
- package/build/commonjs/Toolbar/index.js +8 -0
- package/build/commonjs/Toolbar/index.js.map +1 -1
- package/build/commonjs/Tooltip/Tooltip.js +1 -2
- package/build/commonjs/Tooltip/Tooltip.js.map +1 -1
- package/build/commonjs/Tooltip/index.js +22 -2
- package/build/commonjs/Tooltip/index.js.map +1 -1
- package/build/commonjs/Typography/index.js +10 -2
- package/build/commonjs/Typography/index.js.map +1 -1
- package/build/commonjs/index.js +63 -21
- package/build/commonjs/index.js.map +1 -1
- package/build/commonjs/internal/icons/LoadingSpinner/index.js +14 -4
- package/build/commonjs/internal/icons/LoadingSpinner/index.js.map +1 -1
- package/build/commonjs/internal/icons/LoadingSpinner/index.native.js +14 -4
- package/build/commonjs/internal/icons/LoadingSpinner/index.native.js.map +1 -1
- package/build/commonjs/utils/createSvgIcon.js +2 -10
- package/build/commonjs/utils/createSvgIcon.js.map +1 -1
- package/build/module/Accordion/Accordion.js +0 -1
- package/build/module/Accordion/Accordion.js.map +1 -1
- package/build/module/Accordion/index.js +2 -1
- package/build/module/Accordion/index.js.map +1 -1
- package/build/module/Accordion/useVariantStyleMap.js +6 -6
- package/build/module/Accordion/useVariantStyleMap.js.map +1 -1
- package/build/module/AppBar/AppBar.js +8 -8
- package/build/module/AppBar/AppBar.js.map +1 -1
- package/build/module/AppBar/AppBarProps.js +1 -1
- package/build/module/AppBar/AppBarProps.js.map +1 -1
- package/build/module/AppBar/index.js +1 -0
- package/build/module/AppBar/index.js.map +1 -1
- package/build/module/Badge/index.js +2 -1
- package/build/module/Badge/index.js.map +1 -1
- package/build/module/Badge/useVariantStyleMap.js +15 -6
- package/build/module/Badge/useVariantStyleMap.js.map +1 -1
- package/build/module/{PaginationItem/LegacyPaginationItem.js → BottomSheetActions/BottomSheetActions.js} +9 -20
- package/build/module/BottomSheetActions/BottomSheetActions.js.map +1 -0
- package/build/module/BottomSheetActions/BottomSheetActionsProps.js +2 -0
- package/build/module/BottomSheetActions/BottomSheetActionsProps.js.map +1 -0
- package/build/module/BottomSheetActions/index.js +2 -0
- package/build/module/BottomSheetActions/index.js.map +1 -0
- package/build/module/BottomSheetContent/BottomSheetContent.js +32 -0
- package/build/module/BottomSheetContent/BottomSheetContent.js.map +1 -0
- package/build/module/BottomSheetContent/BottomSheetContentProps.js +2 -0
- package/build/module/BottomSheetContent/BottomSheetContentProps.js.map +1 -0
- package/build/module/BottomSheetContent/index.js +2 -0
- package/build/module/BottomSheetContent/index.js.map +1 -0
- package/build/module/BottomSheetTitle/BottomSheetTitle.js +60 -0
- package/build/module/BottomSheetTitle/BottomSheetTitle.js.map +1 -0
- package/build/module/BottomSheetTitle/BottomSheetTitleProps.js +2 -0
- package/build/module/BottomSheetTitle/BottomSheetTitleProps.js.map +1 -0
- package/build/module/BottomSheetTitle/index.js +2 -0
- package/build/module/BottomSheetTitle/index.js.map +1 -0
- package/build/module/Button/Button.js +6 -9
- package/build/module/Button/Button.js.map +1 -1
- package/build/module/Button/ButtonProps.js +3 -3
- package/build/module/Button/ButtonProps.js.map +1 -1
- package/build/module/Button/index.js +2 -1
- package/build/module/Button/index.js.map +1 -1
- package/build/module/Button/useVariantStyleMap.js +4 -0
- package/build/module/Button/useVariantStyleMap.js.map +1 -1
- package/build/module/Checkbox/Checkbox.js +1 -2
- package/build/module/Checkbox/Checkbox.js.map +1 -1
- package/build/module/Checkbox/index.js +2 -1
- package/build/module/Checkbox/index.js.map +1 -1
- package/build/module/Checkbox/useVariantStyleMap.js +4 -1
- package/build/module/Checkbox/useVariantStyleMap.js.map +1 -1
- package/build/module/Chip/index.js +2 -1
- package/build/module/Chip/index.js.map +1 -1
- package/build/module/Chip/useChipStyle.js +3 -7
- package/build/module/Chip/useChipStyle.js.map +1 -1
- package/build/module/Dialog/Dialog.js +11 -19
- package/build/module/Dialog/Dialog.js.map +1 -1
- package/build/module/Dialog/DialogContext.js +7 -0
- package/build/module/Dialog/DialogContext.js.map +1 -0
- package/build/module/Dialog/index.js +4 -1
- package/build/module/Dialog/index.js.map +1 -1
- package/build/module/Dialog/useDialogSectionStyle.js +29 -0
- package/build/module/Dialog/useDialogSectionStyle.js.map +1 -0
- package/build/module/Dialog/useDialogStyle.js +16 -18
- package/build/module/Dialog/useDialogStyle.js.map +1 -1
- package/build/module/DialogActions/DialogActions.js +18 -3
- package/build/module/DialogActions/DialogActions.js.map +1 -1
- package/build/module/DialogActions/index.js +1 -1
- package/build/module/DialogActions/index.js.map +1 -1
- package/build/module/DialogContent/DialogContent.js +5 -3
- package/build/module/DialogContent/DialogContent.js.map +1 -1
- package/build/module/DialogContent/index.js +1 -1
- package/build/module/DialogContent/index.js.map +1 -1
- package/build/module/DialogMedia/DialogMedia.js +1 -0
- package/build/module/DialogMedia/DialogMedia.js.map +1 -1
- package/build/module/DialogMedia/index.js +1 -1
- package/build/module/DialogMedia/index.js.map +1 -1
- package/build/module/DialogTitle/DialogTitle.js +3 -1
- package/build/module/DialogTitle/DialogTitle.js.map +1 -1
- package/build/module/DialogTitle/index.js +1 -1
- package/build/module/DialogTitle/index.js.map +1 -1
- package/build/module/Divider/Divider.js +1 -1
- package/build/module/Divider/Divider.js.map +1 -1
- package/build/module/Divider/DividerProps.js +1 -1
- package/build/module/Divider/DividerProps.js.map +1 -1
- package/build/module/Divider/index.js +2 -1
- package/build/module/Divider/index.js.map +1 -1
- package/build/module/Empty/Empty.js +3 -4
- package/build/module/Empty/Empty.js.map +1 -1
- package/build/module/IconButton/IconButton.js +25 -3
- package/build/module/IconButton/IconButton.js.map +1 -1
- package/build/module/IconButton/IconButtonProps.js.map +1 -1
- package/build/module/IconButton/index.js +2 -1
- package/build/module/IconButton/index.js.map +1 -1
- package/build/module/ListItemText/ListItemText.js +4 -4
- package/build/module/ListItemText/ListItemText.js.map +1 -1
- package/build/module/ListSubheader/ListSubheader.js +2 -2
- package/build/module/ListSubheader/ListSubheader.js.map +1 -1
- package/build/module/Pagination/Pagination.js +0 -4
- package/build/module/Pagination/Pagination.js.map +1 -1
- package/build/module/Pagination/index.js +2 -1
- package/build/module/Pagination/index.js.map +1 -1
- package/build/module/Radio/Radio.js +2 -3
- package/build/module/Radio/Radio.js.map +1 -1
- package/build/module/Radio/index.js +1 -1
- package/build/module/Radio/index.js.map +1 -1
- package/build/module/RadioGroup/index.js +1 -1
- package/build/module/RadioGroup/index.js.map +1 -1
- package/build/module/ShadowView/ShadowView.native.js +17 -5
- package/build/module/ShadowView/ShadowView.native.js.map +1 -1
- package/build/module/Snackbar/Snackbar.js +1 -1
- package/build/module/Snackbar/Snackbar.js.map +1 -1
- package/build/module/Snackbar/index.js +2 -1
- package/build/module/Snackbar/index.js.map +1 -1
- package/build/module/SnackbarContent/SnackbarContent.js +13 -5
- package/build/module/SnackbarContent/SnackbarContent.js.map +1 -1
- package/build/module/SnackbarContent/StatusIcon.js +0 -2
- package/build/module/SnackbarContent/StatusIcon.js.map +1 -1
- package/build/module/SnackbarContent/index.js +1 -1
- package/build/module/SnackbarContent/index.js.map +1 -1
- package/build/module/SvgIcon/index.js +2 -1
- package/build/module/SvgIcon/index.js.map +1 -1
- package/build/module/Tab/Tab.js +1 -1
- package/build/module/Tab/Tab.js.map +1 -1
- package/build/module/Tab/index.js +1 -1
- package/build/module/Tab/index.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/Tabs.js +15 -3
- package/build/module/Tabs/Tabs.js.map +1 -1
- package/build/module/Tabs/TabsProps.js +1 -0
- package/build/module/Tabs/TabsProps.js.map +1 -1
- package/build/module/Tabs/index.js +2 -1
- package/build/module/Tabs/index.js.map +1 -1
- package/build/module/TextField/TextField.js +0 -1
- package/build/module/TextField/TextField.js.map +1 -1
- package/build/module/TextField/index.js +2 -1
- package/build/module/TextField/index.js.map +1 -1
- package/build/module/Toggle/Toggle.js +5 -3
- package/build/module/Toggle/Toggle.js.map +1 -1
- package/build/module/Toolbar/Toolbar.js +16 -6
- package/build/module/Toolbar/Toolbar.js.map +1 -1
- package/build/module/Toolbar/ToolbarProps.js +1 -1
- package/build/module/Toolbar/ToolbarProps.js.map +1 -1
- package/build/module/Toolbar/index.js +1 -0
- package/build/module/Toolbar/index.js.map +1 -1
- package/build/module/Tooltip/Tooltip.js +1 -2
- package/build/module/Tooltip/Tooltip.js.map +1 -1
- package/build/module/Tooltip/index.js +2 -1
- package/build/module/Tooltip/index.js.map +1 -1
- package/build/module/Typography/index.js +2 -1
- package/build/module/Typography/index.js.map +1 -1
- package/build/module/index.js +6 -2
- package/build/module/index.js.map +1 -1
- package/build/module/internal/icons/LoadingSpinner/index.js +13 -4
- package/build/module/internal/icons/LoadingSpinner/index.js.map +1 -1
- package/build/module/internal/icons/LoadingSpinner/index.native.js +13 -4
- package/build/module/internal/icons/LoadingSpinner/index.native.js.map +1 -1
- package/build/module/utils/createSvgIcon.js +2 -9
- package/build/module/utils/createSvgIcon.js.map +1 -1
- package/build/typescript/Accordion/index.d.ts +3 -2
- package/build/typescript/AppBar/AppBarProps.d.ts +2 -1
- package/build/typescript/AppBar/index.d.ts +1 -0
- package/build/typescript/Badge/index.d.ts +3 -2
- package/build/typescript/BottomSheetActions/BottomSheetActions.d.ts +3 -0
- package/build/typescript/BottomSheetActions/BottomSheetActionsProps.d.ts +4 -0
- package/build/typescript/BottomSheetActions/index.d.ts +2 -0
- package/build/typescript/BottomSheetContent/BottomSheetContent.d.ts +3 -0
- package/build/typescript/BottomSheetContent/BottomSheetContentProps.d.ts +4 -0
- package/build/typescript/BottomSheetContent/index.d.ts +2 -0
- package/build/typescript/BottomSheetTitle/BottomSheetTitle.d.ts +3 -0
- package/build/typescript/BottomSheetTitle/BottomSheetTitleProps.d.ts +12 -0
- package/build/typescript/BottomSheetTitle/index.d.ts +2 -0
- package/build/typescript/Button/ButtonProps.d.ts +6 -6
- package/build/typescript/Button/index.d.ts +3 -2
- package/build/typescript/Checkbox/index.d.ts +3 -2
- package/build/typescript/Chip/index.d.ts +3 -2
- package/build/typescript/Dialog/DialogContext.d.ts +7 -0
- package/build/typescript/Dialog/index.d.ts +5 -2
- package/build/typescript/Dialog/useDialogSectionStyle.d.ts +2 -0
- package/build/typescript/Dialog/useDialogStyle.d.ts +1 -1
- package/build/typescript/DialogActions/index.d.ts +1 -1
- package/build/typescript/DialogContent/index.d.ts +2 -2
- package/build/typescript/DialogMedia/index.d.ts +2 -2
- package/build/typescript/DialogTitle/index.d.ts +2 -2
- package/build/typescript/Divider/DividerProps.d.ts +3 -3
- package/build/typescript/Divider/index.d.ts +3 -2
- package/build/typescript/IconButton/IconButtonProps.d.ts +5 -0
- package/build/typescript/IconButton/index.d.ts +3 -2
- package/build/typescript/Pagination/index.d.ts +3 -2
- package/build/typescript/Radio/index.d.ts +2 -2
- package/build/typescript/RadioGroup/index.d.ts +1 -1
- package/build/typescript/Snackbar/index.d.ts +3 -2
- package/build/typescript/SnackbarContent/index.d.ts +2 -2
- package/build/typescript/SvgIcon/index.d.ts +3 -2
- package/build/typescript/Tab/index.d.ts +2 -2
- package/build/typescript/TabBase/index.d.ts +1 -1
- package/build/typescript/Tabs/Tabs.d.ts +1 -1
- package/build/typescript/Tabs/TabsProps.d.ts +8 -1
- package/build/typescript/Tabs/index.d.ts +3 -2
- package/build/typescript/TextField/index.d.ts +3 -2
- package/build/typescript/Toolbar/ToolbarProps.d.ts +9 -2
- package/build/typescript/Toolbar/index.d.ts +1 -0
- package/build/typescript/Tooltip/index.d.ts +3 -2
- package/build/typescript/Typography/index.d.ts +3 -2
- package/build/typescript/index.d.ts +6 -2
- package/build/typescript/internal/icons/Check.d.ts +125 -2
- package/build/typescript/internal/icons/CheckCircle.d.ts +125 -2
- package/build/typescript/internal/icons/Checkbox.d.ts +125 -2
- package/build/typescript/internal/icons/CheckboxChecked.d.ts +125 -2
- package/build/typescript/internal/icons/CheckboxOn.d.ts +125 -2
- package/build/typescript/internal/icons/ChevronDown.d.ts +125 -2
- package/build/typescript/internal/icons/ChevronLeft.d.ts +125 -2
- package/build/typescript/internal/icons/ChevronRight.d.ts +125 -2
- package/build/typescript/internal/icons/Clear.d.ts +125 -2
- package/build/typescript/internal/icons/Close.d.ts +125 -2
- package/build/typescript/internal/icons/EyeOff.d.ts +125 -2
- package/build/typescript/internal/icons/EyeOn.d.ts +125 -2
- package/build/typescript/internal/icons/InfoCircle.d.ts +125 -2
- package/build/typescript/internal/icons/Radio.d.ts +125 -2
- package/build/typescript/internal/icons/RadioChecked.d.ts +125 -2
- package/build/typescript/internal/icons/Search.d.ts +125 -2
- package/build/typescript/utils/createSvgIcon.d.ts +1 -5
- package/package.json +4 -4
- package/src/Accordion/Accordion.tsx +0 -1
- package/src/Accordion/index.ts +3 -2
- package/src/Accordion/useVariantStyleMap.ts +4 -4
- package/src/AppBar/AppBar.tsx +7 -13
- package/src/AppBar/AppBarProps.ts +2 -1
- package/src/AppBar/index.ts +2 -1
- package/src/Badge/index.ts +13 -2
- package/src/Badge/useVariantStyleMap.ts +17 -7
- package/src/BottomSheetActions/BottomSheetActions.tsx +42 -0
- package/src/BottomSheetActions/BottomSheetActionsProps.ts +4 -0
- package/src/BottomSheetActions/index.ts +2 -0
- package/src/BottomSheetContent/BottomSheetContent.tsx +45 -0
- package/src/BottomSheetContent/BottomSheetContentProps.ts +4 -0
- package/src/BottomSheetContent/index.ts +2 -0
- package/src/BottomSheetTitle/BottomSheetTitle.tsx +83 -0
- package/src/BottomSheetTitle/BottomSheetTitleProps.ts +12 -0
- package/src/BottomSheetTitle/index.ts +2 -0
- package/src/Button/Button.tsx +11 -13
- package/src/Button/ButtonProps.ts +6 -6
- package/src/Button/index.ts +3 -2
- package/src/Button/useVariantStyleMap.ts +4 -0
- package/src/Checkbox/Checkbox.tsx +1 -2
- package/src/Checkbox/index.ts +3 -2
- package/src/Checkbox/useVariantStyleMap.ts +3 -0
- package/src/Chip/index.ts +3 -2
- package/src/Chip/useChipStyle.ts +2 -6
- package/src/Dialog/Dialog.tsx +9 -19
- package/src/Dialog/DialogContext.tsx +14 -0
- package/src/Dialog/index.ts +5 -2
- package/src/Dialog/useDialogSectionStyle.ts +31 -0
- package/src/Dialog/useDialogStyle.ts +14 -22
- package/src/DialogActions/DialogActions.tsx +28 -3
- package/src/DialogActions/index.ts +1 -1
- package/src/DialogContent/DialogContent.tsx +6 -2
- package/src/DialogContent/index.ts +2 -2
- package/src/DialogMedia/DialogMedia.tsx +1 -0
- package/src/DialogMedia/index.ts +2 -2
- package/src/DialogTitle/DialogTitle.tsx +4 -0
- package/src/DialogTitle/index.ts +2 -2
- package/src/Divider/Divider.tsx +1 -1
- package/src/Divider/DividerProps.ts +3 -3
- package/src/Divider/index.ts +3 -2
- package/src/Empty/Empty.tsx +3 -5
- package/src/IconButton/IconButton.tsx +33 -3
- package/src/IconButton/IconButtonProps.ts +6 -0
- package/src/IconButton/index.ts +3 -2
- package/src/ListItemText/ListItemText.tsx +4 -4
- package/src/ListSubheader/ListSubheader.tsx +2 -2
- package/src/Pagination/Pagination.tsx +0 -4
- package/src/Pagination/index.ts +3 -2
- package/src/Radio/Radio.tsx +2 -5
- package/src/Radio/index.ts +2 -2
- package/src/RadioGroup/index.ts +1 -1
- package/src/ShadowView/ShadowView.native.tsx +21 -10
- package/src/Snackbar/Snackbar.tsx +1 -1
- package/src/Snackbar/index.ts +3 -2
- package/src/SnackbarContent/SnackbarContent.tsx +18 -10
- package/src/SnackbarContent/StatusIcon.tsx +0 -2
- package/src/SnackbarContent/index.ts +2 -2
- package/src/SvgIcon/index.ts +3 -2
- package/src/Tab/Tab.tsx +1 -1
- package/src/Tab/index.ts +2 -2
- package/src/TabBase/index.ts +1 -1
- package/src/Tabs/Tabs.tsx +17 -3
- package/src/Tabs/TabsProps.ts +10 -1
- package/src/Tabs/index.ts +3 -2
- package/src/TextField/TextField.tsx +0 -1
- package/src/TextField/index.tsx +3 -2
- package/src/Toggle/Toggle.tsx +7 -5
- package/src/Toolbar/Toolbar.tsx +13 -6
- package/src/Toolbar/ToolbarProps.ts +11 -2
- package/src/Toolbar/index.ts +2 -1
- package/src/Tooltip/Tooltip.tsx +1 -2
- package/src/Tooltip/index.ts +3 -2
- package/src/Typography/index.ts +3 -2
- package/src/index.ts +9 -3
- package/src/internal/icons/LoadingSpinner/index.native.tsx +17 -7
- package/src/internal/icons/LoadingSpinner/index.tsx +17 -7
- package/src/utils/createSvgIcon.tsx +3 -21
- package/build/commonjs/Accordion/LegacyAccordion.js +0 -171
- package/build/commonjs/Accordion/LegacyAccordion.js.map +0 -1
- package/build/commonjs/Accordion/LegacyAccordionProps.js +0 -2
- package/build/commonjs/Accordion/LegacyAccordionProps.js.map +0 -1
- package/build/commonjs/Badge/LegacyBadge.js +0 -61
- package/build/commonjs/Badge/LegacyBadge.js.map +0 -1
- package/build/commonjs/Badge/LegacyBadgeProps.js +0 -2
- package/build/commonjs/Badge/LegacyBadgeProps.js.map +0 -1
- package/build/commonjs/Button/LegacyButton.js +0 -144
- package/build/commonjs/Button/LegacyButton.js.map +0 -1
- package/build/commonjs/Button/LegacyButtonProps.js +0 -2
- package/build/commonjs/Button/LegacyButtonProps.js.map +0 -1
- package/build/commonjs/Checkbox/LegacyCheckbox.js +0 -65
- package/build/commonjs/Checkbox/LegacyCheckbox.js.map +0 -1
- package/build/commonjs/Checkbox/LegacyCheckboxProps.js +0 -2
- package/build/commonjs/Checkbox/LegacyCheckboxProps.js.map +0 -1
- package/build/commonjs/CheckboxGroup/CheckboxGroup.js +0 -50
- package/build/commonjs/CheckboxGroup/CheckboxGroup.js.map +0 -1
- package/build/commonjs/CheckboxGroup/CheckboxGroupProps.js +0 -2
- package/build/commonjs/CheckboxGroup/CheckboxGroupProps.js.map +0 -1
- package/build/commonjs/CheckboxGroup/index.js.map +0 -1
- package/build/commonjs/Chip/LegacyChip.js +0 -98
- package/build/commonjs/Chip/LegacyChip.js.map +0 -1
- package/build/commonjs/Chip/LegacyChipProps.js +0 -2
- package/build/commonjs/Chip/LegacyChipProps.js.map +0 -1
- package/build/commonjs/Dialog/LegacyDialog.js +0 -181
- package/build/commonjs/Dialog/LegacyDialog.js.map +0 -1
- package/build/commonjs/Dialog/LegacyDialogProps.js +0 -2
- package/build/commonjs/Dialog/LegacyDialogProps.js.map +0 -1
- package/build/commonjs/DialogActions/LegacyDialogActions.js +0 -30
- package/build/commonjs/DialogActions/LegacyDialogActions.js.map +0 -1
- package/build/commonjs/DialogContent/LegacyDialogContent.js +0 -36
- package/build/commonjs/DialogContent/LegacyDialogContent.js.map +0 -1
- package/build/commonjs/DialogContent/LegacyDialogContentProps.js +0 -2
- package/build/commonjs/DialogContent/LegacyDialogContentProps.js.map +0 -1
- package/build/commonjs/DialogMedia/LegacyDialogMedia.js +0 -33
- package/build/commonjs/DialogMedia/LegacyDialogMedia.js.map +0 -1
- package/build/commonjs/DialogMedia/LegacyDialogMediaProps.js +0 -2
- package/build/commonjs/DialogMedia/LegacyDialogMediaProps.js.map +0 -1
- package/build/commonjs/DialogTitle/LegacyDialogTitle.js +0 -36
- package/build/commonjs/DialogTitle/LegacyDialogTitle.js.map +0 -1
- package/build/commonjs/DialogTitle/LegacyDialogTitleProps.js +0 -2
- package/build/commonjs/DialogTitle/LegacyDialogTitleProps.js.map +0 -1
- package/build/commonjs/Divider/LegacyDivider.js +0 -114
- package/build/commonjs/Divider/LegacyDivider.js.map +0 -1
- package/build/commonjs/Divider/LegacyDividerProps.js +0 -2
- package/build/commonjs/Divider/LegacyDividerProps.js.map +0 -1
- package/build/commonjs/IconButton/LegacyIconButton.js +0 -89
- package/build/commonjs/IconButton/LegacyIconButton.js.map +0 -1
- package/build/commonjs/IconButton/LegacyIconButtonProps.js +0 -2
- package/build/commonjs/IconButton/LegacyIconButtonProps.js.map +0 -1
- package/build/commonjs/Pagination/LegacyPagination.js +0 -145
- package/build/commonjs/Pagination/LegacyPagination.js.map +0 -1
- package/build/commonjs/Pagination/LegacyPaginationProps.js +0 -2
- package/build/commonjs/Pagination/LegacyPaginationProps.js.map +0 -1
- package/build/commonjs/PaginationItem/LegacyPaginationItem.js.map +0 -1
- package/build/commonjs/Radio/LegacyRadio.js +0 -82
- package/build/commonjs/Radio/LegacyRadio.js.map +0 -1
- package/build/commonjs/Radio/LegacyRadioProps.js +0 -2
- package/build/commonjs/Radio/LegacyRadioProps.js.map +0 -1
- package/build/commonjs/RadioGroup/LegacyRadioGroup.js +0 -31
- package/build/commonjs/RadioGroup/LegacyRadioGroup.js.map +0 -1
- package/build/commonjs/Snackbar/LegacySnackbar.js +0 -134
- package/build/commonjs/Snackbar/LegacySnackbar.js.map +0 -1
- package/build/commonjs/Snackbar/LegacySnackbarProps.js +0 -2
- package/build/commonjs/Snackbar/LegacySnackbarProps.js.map +0 -1
- package/build/commonjs/SnackbarContent/LegacySnackbarContent.js +0 -105
- package/build/commonjs/SnackbarContent/LegacySnackbarContent.js.map +0 -1
- package/build/commonjs/SnackbarContent/LegacySnackbarContentProps.js +0 -2
- package/build/commonjs/SnackbarContent/LegacySnackbarContentProps.js.map +0 -1
- package/build/commonjs/SvgIcon/LegacySvgIcon.js.map +0 -1
- package/build/commonjs/SvgIcon/LegacySvgIconProps.js +0 -2
- package/build/commonjs/SvgIcon/LegacySvgIconProps.js.map +0 -1
- package/build/commonjs/Tab/LegacyTab.js +0 -126
- package/build/commonjs/Tab/LegacyTab.js.map +0 -1
- package/build/commonjs/Tab/LegacyTabProps.js +0 -2
- package/build/commonjs/Tab/LegacyTabProps.js.map +0 -1
- package/build/commonjs/Tab/TabIndicator.js +0 -44
- package/build/commonjs/Tab/TabIndicator.js.map +0 -1
- package/build/commonjs/TabBase/LegacyTabBase.js +0 -57
- package/build/commonjs/TabBase/LegacyTabBase.js.map +0 -1
- package/build/commonjs/Tabs/LegacyTabIndicator.js +0 -120
- package/build/commonjs/Tabs/LegacyTabIndicator.js.map +0 -1
- package/build/commonjs/Tabs/LegacyTabIndicatorProps.js +0 -2
- package/build/commonjs/Tabs/LegacyTabIndicatorProps.js.map +0 -1
- package/build/commonjs/Tabs/LegacyTabs.js +0 -207
- package/build/commonjs/Tabs/LegacyTabs.js.map +0 -1
- package/build/commonjs/Tabs/LegacyTabsProps.js +0 -2
- package/build/commonjs/Tabs/LegacyTabsProps.js.map +0 -1
- package/build/commonjs/TextField/InputLabel.js +0 -163
- package/build/commonjs/TextField/InputLabel.js.map +0 -1
- package/build/commonjs/TextField/LegacyTextField.js +0 -195
- package/build/commonjs/TextField/LegacyTextField.js.map +0 -1
- package/build/commonjs/TextField/LegacyTextFieldProps.js +0 -2
- package/build/commonjs/TextField/LegacyTextFieldProps.js.map +0 -1
- package/build/commonjs/TextField/OutlinedTextField.js +0 -190
- package/build/commonjs/TextField/OutlinedTextField.js.map +0 -1
- package/build/commonjs/Tooltip/LegacyTooltip.js +0 -147
- package/build/commonjs/Tooltip/LegacyTooltip.js.map +0 -1
- package/build/commonjs/Tooltip/LegacyTooltipProps.js +0 -2
- package/build/commonjs/Tooltip/LegacyTooltipProps.js.map +0 -1
- package/build/commonjs/Tooltip/UpArrow.js +0 -34
- package/build/commonjs/Tooltip/UpArrow.js.map +0 -1
- package/build/commonjs/Tooltip/UpArrowProps.js +0 -2
- package/build/commonjs/Tooltip/UpArrowProps.js.map +0 -1
- package/build/commonjs/Typography/LegacyTypography.js +0 -142
- package/build/commonjs/Typography/LegacyTypography.js.map +0 -1
- package/build/commonjs/Typography/LegacyTypographyProps.js +0 -2
- package/build/commonjs/Typography/LegacyTypographyProps.js.map +0 -1
- package/build/module/Accordion/LegacyAccordion.js +0 -148
- package/build/module/Accordion/LegacyAccordion.js.map +0 -1
- package/build/module/Accordion/LegacyAccordionProps.js +0 -2
- package/build/module/Accordion/LegacyAccordionProps.js.map +0 -1
- package/build/module/Badge/LegacyBadge.js +0 -48
- package/build/module/Badge/LegacyBadge.js.map +0 -1
- package/build/module/Badge/LegacyBadgeProps.js +0 -2
- package/build/module/Badge/LegacyBadgeProps.js.map +0 -1
- package/build/module/Button/LegacyButton.js +0 -127
- package/build/module/Button/LegacyButton.js.map +0 -1
- package/build/module/Button/LegacyButtonProps.js +0 -2
- package/build/module/Button/LegacyButtonProps.js.map +0 -1
- package/build/module/Checkbox/LegacyCheckbox.js +0 -52
- package/build/module/Checkbox/LegacyCheckbox.js.map +0 -1
- package/build/module/Checkbox/LegacyCheckboxProps.js +0 -2
- package/build/module/Checkbox/LegacyCheckboxProps.js.map +0 -1
- package/build/module/CheckboxGroup/CheckboxGroup.js +0 -34
- package/build/module/CheckboxGroup/CheckboxGroup.js.map +0 -1
- package/build/module/CheckboxGroup/CheckboxGroupProps.js +0 -2
- package/build/module/CheckboxGroup/CheckboxGroupProps.js.map +0 -1
- package/build/module/CheckboxGroup/index.js +0 -2
- package/build/module/CheckboxGroup/index.js.map +0 -1
- package/build/module/Chip/LegacyChip.js +0 -84
- package/build/module/Chip/LegacyChip.js.map +0 -1
- package/build/module/Chip/LegacyChipProps.js +0 -2
- package/build/module/Chip/LegacyChipProps.js.map +0 -1
- package/build/module/Dialog/LegacyDialog.js +0 -160
- package/build/module/Dialog/LegacyDialog.js.map +0 -1
- package/build/module/Dialog/LegacyDialogProps.js +0 -2
- package/build/module/Dialog/LegacyDialogProps.js.map +0 -1
- package/build/module/DialogActions/LegacyDialogActions.js +0 -17
- package/build/module/DialogActions/LegacyDialogActions.js.map +0 -1
- package/build/module/DialogContent/LegacyDialogContent.js +0 -22
- package/build/module/DialogContent/LegacyDialogContent.js.map +0 -1
- package/build/module/DialogContent/LegacyDialogContentProps.js +0 -2
- package/build/module/DialogContent/LegacyDialogContentProps.js.map +0 -1
- package/build/module/DialogMedia/LegacyDialogMedia.js +0 -21
- package/build/module/DialogMedia/LegacyDialogMedia.js.map +0 -1
- package/build/module/DialogMedia/LegacyDialogMediaProps.js +0 -2
- package/build/module/DialogMedia/LegacyDialogMediaProps.js.map +0 -1
- package/build/module/DialogTitle/LegacyDialogTitle.js +0 -22
- package/build/module/DialogTitle/LegacyDialogTitle.js.map +0 -1
- package/build/module/DialogTitle/LegacyDialogTitleProps.js +0 -2
- package/build/module/DialogTitle/LegacyDialogTitleProps.js.map +0 -1
- package/build/module/Divider/LegacyDivider.js +0 -100
- package/build/module/Divider/LegacyDivider.js.map +0 -1
- package/build/module/Divider/LegacyDividerProps.js +0 -2
- package/build/module/Divider/LegacyDividerProps.js.map +0 -1
- package/build/module/IconButton/LegacyIconButton.js +0 -74
- package/build/module/IconButton/LegacyIconButton.js.map +0 -1
- package/build/module/IconButton/LegacyIconButtonProps.js +0 -2
- package/build/module/IconButton/LegacyIconButtonProps.js.map +0 -1
- package/build/module/Pagination/LegacyPagination.js +0 -129
- package/build/module/Pagination/LegacyPagination.js.map +0 -1
- package/build/module/Pagination/LegacyPaginationProps.js +0 -2
- package/build/module/Pagination/LegacyPaginationProps.js.map +0 -1
- package/build/module/PaginationItem/LegacyPaginationItem.js.map +0 -1
- package/build/module/Radio/LegacyRadio.js +0 -63
- package/build/module/Radio/LegacyRadio.js.map +0 -1
- package/build/module/Radio/LegacyRadioProps.js +0 -2
- package/build/module/Radio/LegacyRadioProps.js.map +0 -1
- package/build/module/RadioGroup/LegacyRadioGroup.js +0 -18
- package/build/module/RadioGroup/LegacyRadioGroup.js.map +0 -1
- package/build/module/Snackbar/LegacySnackbar.js +0 -107
- package/build/module/Snackbar/LegacySnackbar.js.map +0 -1
- package/build/module/Snackbar/LegacySnackbarProps.js +0 -2
- package/build/module/Snackbar/LegacySnackbarProps.js.map +0 -1
- package/build/module/SnackbarContent/LegacySnackbarContent.js +0 -84
- package/build/module/SnackbarContent/LegacySnackbarContent.js.map +0 -1
- package/build/module/SnackbarContent/LegacySnackbarContentProps.js +0 -2
- package/build/module/SnackbarContent/LegacySnackbarContentProps.js.map +0 -1
- package/build/module/SvgIcon/LegacySvgIcon.js +0 -30
- package/build/module/SvgIcon/LegacySvgIcon.js.map +0 -1
- package/build/module/SvgIcon/LegacySvgIconProps.js +0 -2
- package/build/module/SvgIcon/LegacySvgIconProps.js.map +0 -1
- package/build/module/Tab/LegacyTab.js +0 -105
- package/build/module/Tab/LegacyTab.js.map +0 -1
- package/build/module/Tab/LegacyTabProps.js +0 -2
- package/build/module/Tab/LegacyTabProps.js.map +0 -1
- package/build/module/Tab/TabIndicator.js +0 -31
- package/build/module/Tab/TabIndicator.js.map +0 -1
- package/build/module/TabBase/LegacyTabBase.js +0 -44
- package/build/module/TabBase/LegacyTabBase.js.map +0 -1
- package/build/module/Tabs/LegacyTabIndicator.js +0 -99
- package/build/module/Tabs/LegacyTabIndicator.js.map +0 -1
- package/build/module/Tabs/LegacyTabIndicatorProps.js +0 -2
- package/build/module/Tabs/LegacyTabIndicatorProps.js.map +0 -1
- package/build/module/Tabs/LegacyTabs.js +0 -182
- package/build/module/Tabs/LegacyTabs.js.map +0 -1
- package/build/module/Tabs/LegacyTabsProps.js +0 -2
- package/build/module/Tabs/LegacyTabsProps.js.map +0 -1
- package/build/module/TextField/InputLabel.js +0 -149
- package/build/module/TextField/InputLabel.js.map +0 -1
- package/build/module/TextField/LegacyTextField.js +0 -169
- package/build/module/TextField/LegacyTextField.js.map +0 -1
- package/build/module/TextField/LegacyTextFieldProps.js +0 -2
- package/build/module/TextField/LegacyTextFieldProps.js.map +0 -1
- package/build/module/TextField/OutlinedTextField.js +0 -174
- package/build/module/TextField/OutlinedTextField.js.map +0 -1
- package/build/module/Tooltip/LegacyTooltip.js +0 -121
- package/build/module/Tooltip/LegacyTooltip.js.map +0 -1
- package/build/module/Tooltip/LegacyTooltipProps.js +0 -2
- package/build/module/Tooltip/LegacyTooltipProps.js.map +0 -1
- package/build/module/Tooltip/UpArrow.js +0 -22
- package/build/module/Tooltip/UpArrow.js.map +0 -1
- package/build/module/Tooltip/UpArrowProps.js +0 -2
- package/build/module/Tooltip/UpArrowProps.js.map +0 -1
- package/build/module/Typography/LegacyTypography.js +0 -126
- package/build/module/Typography/LegacyTypography.js.map +0 -1
- package/build/module/Typography/LegacyTypographyProps.js +0 -2
- package/build/module/Typography/LegacyTypographyProps.js.map +0 -1
- package/build/typescript/Accordion/LegacyAccordion.d.ts +0 -3
- package/build/typescript/Accordion/LegacyAccordionProps.d.ts +0 -28
- package/build/typescript/Badge/LegacyBadge.d.ts +0 -3
- package/build/typescript/Badge/LegacyBadgeProps.d.ts +0 -34
- package/build/typescript/Button/LegacyButton.d.ts +0 -3
- package/build/typescript/Button/LegacyButtonProps.d.ts +0 -51
- package/build/typescript/Checkbox/LegacyCheckbox.d.ts +0 -3
- package/build/typescript/Checkbox/LegacyCheckboxProps.d.ts +0 -36
- package/build/typescript/CheckboxGroup/CheckboxGroup.d.ts +0 -3
- package/build/typescript/CheckboxGroup/CheckboxGroupProps.d.ts +0 -11
- package/build/typescript/CheckboxGroup/index.d.ts +0 -2
- package/build/typescript/Chip/LegacyChip.d.ts +0 -3
- package/build/typescript/Chip/LegacyChipProps.d.ts +0 -28
- package/build/typescript/Dialog/LegacyDialog.d.ts +0 -3
- package/build/typescript/Dialog/LegacyDialogProps.d.ts +0 -25
- package/build/typescript/DialogActions/LegacyDialogActions.d.ts +0 -3
- package/build/typescript/DialogContent/LegacyDialogContent.d.ts +0 -3
- package/build/typescript/DialogContent/LegacyDialogContentProps.d.ts +0 -10
- package/build/typescript/DialogMedia/LegacyDialogMedia.d.ts +0 -3
- package/build/typescript/DialogMedia/LegacyDialogMediaProps.d.ts +0 -15
- package/build/typescript/DialogTitle/LegacyDialogTitle.d.ts +0 -3
- package/build/typescript/DialogTitle/LegacyDialogTitleProps.d.ts +0 -15
- package/build/typescript/Divider/LegacyDivider.d.ts +0 -3
- package/build/typescript/Divider/LegacyDividerProps.d.ts +0 -41
- package/build/typescript/IconButton/LegacyIconButton.d.ts +0 -3
- package/build/typescript/IconButton/LegacyIconButtonProps.d.ts +0 -30
- package/build/typescript/Pagination/LegacyPagination.d.ts +0 -3
- package/build/typescript/Pagination/LegacyPaginationProps.d.ts +0 -71
- package/build/typescript/PaginationItem/LegacyPaginationItem.d.ts +0 -5
- package/build/typescript/Radio/LegacyRadio.d.ts +0 -3
- package/build/typescript/Radio/LegacyRadioProps.d.ts +0 -43
- package/build/typescript/RadioGroup/LegacyRadioGroup.d.ts +0 -3
- package/build/typescript/Snackbar/LegacySnackbar.d.ts +0 -3
- package/build/typescript/Snackbar/LegacySnackbarProps.d.ts +0 -51
- package/build/typescript/SnackbarContent/LegacySnackbarContent.d.ts +0 -3
- package/build/typescript/SnackbarContent/LegacySnackbarContentProps.d.ts +0 -26
- package/build/typescript/SvgIcon/LegacySvgIcon.d.ts +0 -3
- package/build/typescript/SvgIcon/LegacySvgIconProps.d.ts +0 -35
- package/build/typescript/Tab/LegacyTab.d.ts +0 -3
- package/build/typescript/Tab/LegacyTabProps.d.ts +0 -58
- package/build/typescript/Tab/TabIndicator.d.ts +0 -7
- package/build/typescript/TabBase/LegacyTabBase.d.ts +0 -3
- package/build/typescript/Tabs/LegacyTabIndicator.d.ts +0 -3
- package/build/typescript/Tabs/LegacyTabIndicatorProps.d.ts +0 -32
- package/build/typescript/Tabs/LegacyTabs.d.ts +0 -5
- package/build/typescript/Tabs/LegacyTabsProps.d.ts +0 -79
- package/build/typescript/TextField/InputLabel.d.ts +0 -33
- package/build/typescript/TextField/LegacyTextField.d.ts +0 -5
- package/build/typescript/TextField/LegacyTextFieldProps.d.ts +0 -67
- package/build/typescript/TextField/OutlinedTextField.d.ts +0 -17
- package/build/typescript/Tooltip/LegacyTooltip.d.ts +0 -3
- package/build/typescript/Tooltip/LegacyTooltipProps.d.ts +0 -72
- package/build/typescript/Tooltip/UpArrow.d.ts +0 -5
- package/build/typescript/Tooltip/UpArrowProps.d.ts +0 -17
- package/build/typescript/Typography/LegacyTypography.d.ts +0 -5
- package/build/typescript/Typography/LegacyTypographyProps.d.ts +0 -81
- package/src/Accordion/LegacyAccordion.tsx +0 -188
- package/src/Accordion/LegacyAccordionProps.ts +0 -34
- package/src/Badge/LegacyBadge.tsx +0 -66
- package/src/Badge/LegacyBadgeProps.ts +0 -40
- package/src/Button/LegacyButton.tsx +0 -157
- package/src/Button/LegacyButtonProps.ts +0 -62
- package/src/Checkbox/LegacyCheckbox.tsx +0 -62
- package/src/Checkbox/LegacyCheckboxProps.ts +0 -42
- package/src/CheckboxGroup/CheckboxGroup.tsx +0 -47
- package/src/CheckboxGroup/CheckboxGroupProps.ts +0 -11
- package/src/CheckboxGroup/index.ts +0 -2
- package/src/Chip/LegacyChip.tsx +0 -116
- package/src/Chip/LegacyChipProps.ts +0 -33
- package/src/Dialog/LegacyDialog.tsx +0 -198
- package/src/Dialog/LegacyDialogProps.ts +0 -28
- package/src/DialogActions/LegacyDialogActions.tsx +0 -23
- package/src/DialogContent/LegacyDialogContent.tsx +0 -30
- package/src/DialogContent/LegacyDialogContentProps.ts +0 -10
- package/src/DialogMedia/LegacyDialogMedia.tsx +0 -21
- package/src/DialogMedia/LegacyDialogMediaProps.ts +0 -16
- package/src/DialogTitle/LegacyDialogTitle.tsx +0 -30
- package/src/DialogTitle/LegacyDialogTitleProps.ts +0 -16
- package/src/Divider/LegacyDivider.tsx +0 -114
- package/src/Divider/LegacyDividerProps.ts +0 -48
- package/src/IconButton/LegacyIconButton.tsx +0 -97
- package/src/IconButton/LegacyIconButtonProps.ts +0 -36
- package/src/Pagination/LegacyPagination.tsx +0 -168
- package/src/Pagination/LegacyPaginationProps.ts +0 -85
- package/src/PaginationItem/LegacyPaginationItem.tsx +0 -52
- package/src/Radio/LegacyRadio.tsx +0 -72
- package/src/Radio/LegacyRadioProps.ts +0 -50
- package/src/RadioGroup/LegacyRadioGroup.tsx +0 -20
- package/src/Snackbar/LegacySnackbar.tsx +0 -130
- package/src/Snackbar/LegacySnackbarProps.ts +0 -61
- package/src/SnackbarContent/LegacySnackbarContent.tsx +0 -129
- package/src/SnackbarContent/LegacySnackbarContentProps.ts +0 -30
- package/src/SvgIcon/LegacySvgIcon.tsx +0 -36
- package/src/SvgIcon/LegacySvgIconProps.ts +0 -41
- package/src/Tab/LegacyTab.tsx +0 -141
- package/src/Tab/LegacyTabProps.ts +0 -68
- package/src/Tab/TabIndicator.tsx +0 -38
- package/src/TabBase/LegacyTabBase.tsx +0 -55
- package/src/Tabs/LegacyTabIndicator.tsx +0 -112
- package/src/Tabs/LegacyTabIndicatorProps.ts +0 -37
- package/src/Tabs/LegacyTabs.tsx +0 -227
- package/src/Tabs/LegacyTabsProps.ts +0 -93
- package/src/TextField/InputLabel.tsx +0 -234
- package/src/TextField/LegacyTextField.tsx +0 -168
- package/src/TextField/LegacyTextFieldProps.ts +0 -80
- package/src/TextField/OutlinedTextField.tsx +0 -234
- package/src/Tooltip/LegacyTooltip.tsx +0 -167
- package/src/Tooltip/LegacyTooltipProps.ts +0 -86
- package/src/Tooltip/UpArrow.tsx +0 -21
- package/src/Tooltip/UpArrowProps.ts +0 -19
- package/src/Typography/LegacyTypography.tsx +0 -107
- package/src/Typography/LegacyTypographyProps.ts +0 -122
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = Tab;
|
|
7
|
-
|
|
8
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
-
|
|
10
|
-
var _reactNative = require("react-native");
|
|
11
|
-
|
|
12
|
-
var _Badge = _interopRequireDefault(require("../Badge"));
|
|
13
|
-
|
|
14
|
-
var _TabBase = _interopRequireDefault(require("../TabBase"));
|
|
15
|
-
|
|
16
|
-
var _styles = require("../styles");
|
|
17
|
-
|
|
18
|
-
var _TabIndicator = _interopRequireDefault(require("./TabIndicator"));
|
|
19
|
-
|
|
20
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
|
-
|
|
22
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
23
|
-
|
|
24
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
25
|
-
|
|
26
|
-
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); }
|
|
27
|
-
|
|
28
|
-
const styles = _styles.StyleSheet.create({
|
|
29
|
-
root: { // TODO: Remove redundant platform checking
|
|
30
|
-
...(_reactNative.Platform.OS === 'web' ? {
|
|
31
|
-
minWidth: 'auto'
|
|
32
|
-
} : {}),
|
|
33
|
-
minHeight: 40
|
|
34
|
-
},
|
|
35
|
-
bottomNavigation: {
|
|
36
|
-
minHeight: 56
|
|
37
|
-
},
|
|
38
|
-
filledInner: {
|
|
39
|
-
justifyContent: 'center'
|
|
40
|
-
},
|
|
41
|
-
tertiary: {
|
|
42
|
-
minHeight: 44
|
|
43
|
-
}
|
|
44
|
-
});
|
|
45
|
-
|
|
46
|
-
function Tab(props) {
|
|
47
|
-
const {
|
|
48
|
-
badgeVisible = false,
|
|
49
|
-
children,
|
|
50
|
-
enableIndicator = false,
|
|
51
|
-
icon: defaultIcon,
|
|
52
|
-
indicatorColor = 'primary',
|
|
53
|
-
indicatorSize = 'full',
|
|
54
|
-
selected = false,
|
|
55
|
-
selectedIcon,
|
|
56
|
-
variant = 'primary',
|
|
57
|
-
style,
|
|
58
|
-
onTabInnerLayout,
|
|
59
|
-
...otherProps
|
|
60
|
-
} = props;
|
|
61
|
-
const theme = (0, _styles.useTheme)();
|
|
62
|
-
const vertical = variant === 'bottom-navigation';
|
|
63
|
-
const color = selected ? theme.palette.text.primary : variant === 'contained' ? theme.palette.text.secondary : theme.palette.text.hint;
|
|
64
|
-
const containedStyle = {
|
|
65
|
-
borderColor: selected ? theme.palette.primary.main : theme.palette.border.default,
|
|
66
|
-
borderRadius: theme.shape.roundnessExtra,
|
|
67
|
-
borderWidth: selected ? 1.5 : 1,
|
|
68
|
-
minHeight: 'auto',
|
|
69
|
-
paddingHorizontal: theme.spacing(3),
|
|
70
|
-
paddingVertical: theme.spacing(1.5)
|
|
71
|
-
};
|
|
72
|
-
const tabBaseStyle = (0, _styles.css)([styles.root, variant === 'bottom-navigation' && styles.bottomNavigation, variant === 'contained' && containedStyle, variant === 'tertiary' && styles.tertiary, style]);
|
|
73
|
-
const tabInnerStyle = (0, _styles.css)([styles.root, styles.filledInner]);
|
|
74
|
-
const fontStyle = (0, _styles.createFontStyle)(theme, {
|
|
75
|
-
selector: typo => {
|
|
76
|
-
switch (variant) {
|
|
77
|
-
case 'primary':
|
|
78
|
-
return typo.h2;
|
|
79
|
-
|
|
80
|
-
case 'secondary':
|
|
81
|
-
return typo.button2;
|
|
82
|
-
|
|
83
|
-
case 'tertiary':
|
|
84
|
-
return typo.h3;
|
|
85
|
-
|
|
86
|
-
case 'contained':
|
|
87
|
-
return selected ? { ...typo.subtitle2,
|
|
88
|
-
fontWeight: typo.fontWeight.medium
|
|
89
|
-
} : typo.body2;
|
|
90
|
-
|
|
91
|
-
default:
|
|
92
|
-
return typo.flag;
|
|
93
|
-
}
|
|
94
|
-
},
|
|
95
|
-
color
|
|
96
|
-
});
|
|
97
|
-
const pressEffect = selected ? 'none' : 'opacity';
|
|
98
|
-
const icon = selected ? selectedIcon || defaultIcon : defaultIcon;
|
|
99
|
-
const iconElement = icon ? /*#__PURE__*/(0, _react.cloneElement)(icon, {
|
|
100
|
-
fill: color
|
|
101
|
-
}) : null;
|
|
102
|
-
const tabElement = typeof children !== 'string' ? /*#__PURE__*/_react.default.cloneElement(children, {
|
|
103
|
-
selected
|
|
104
|
-
}) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_Badge.default, {
|
|
105
|
-
children: iconElement,
|
|
106
|
-
invisible: !badgeVisible
|
|
107
|
-
}), /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
|
|
108
|
-
children: children,
|
|
109
|
-
style: (0, _styles.css)(fontStyle)
|
|
110
|
-
}));
|
|
111
|
-
const tabIndicator = enableIndicator && selected ? /*#__PURE__*/_react.default.createElement(_TabIndicator.default, {
|
|
112
|
-
indicatorSize: indicatorSize,
|
|
113
|
-
color: indicatorColor
|
|
114
|
-
}) : null;
|
|
115
|
-
return /*#__PURE__*/_react.default.createElement(_TabBase.default, _extends({
|
|
116
|
-
pressEffect: pressEffect,
|
|
117
|
-
style: tabBaseStyle,
|
|
118
|
-
vertical: vertical
|
|
119
|
-
}, otherProps), indicatorSize === 'fit-content' ? /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
120
|
-
onLayout: onTabInnerLayout,
|
|
121
|
-
style: tabInnerStyle
|
|
122
|
-
}, tabElement, tabIndicator) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, tabElement, tabIndicator));
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
;
|
|
126
|
-
//# sourceMappingURL=LegacyTab.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["styles","StyleSheet","create","root","Platform","OS","minWidth","minHeight","bottomNavigation","filledInner","justifyContent","tertiary","Tab","props","badgeVisible","children","enableIndicator","icon","defaultIcon","indicatorColor","indicatorSize","selected","selectedIcon","variant","style","onTabInnerLayout","otherProps","theme","useTheme","vertical","color","palette","text","primary","secondary","hint","containedStyle","borderColor","main","border","default","borderRadius","shape","roundnessExtra","borderWidth","paddingHorizontal","spacing","paddingVertical","tabBaseStyle","css","tabInnerStyle","fontStyle","createFontStyle","selector","typo","h2","button2","h3","subtitle2","fontWeight","medium","body2","flag","pressEffect","iconElement","cloneElement","fill","tabElement","React","tabIndicator"],"sources":["LegacyTab.tsx"],"sourcesContent":["import React, { cloneElement } from 'react';\nimport { Platform, Text, View } from 'react-native';\nimport Badge from '../Badge';\nimport TabBase from '../TabBase';\nimport { createFontStyle, css, StyleSheet, useTheme } from '../styles';\nimport type TabProps from './LegacyTabProps';\nimport TabIndicator from './TabIndicator';\n\nconst styles = StyleSheet.create({\n root: {\n // TODO: Remove redundant platform checking\n ...(Platform.OS === 'web' ? { minWidth: 'auto' } : {}),\n minHeight: 40,\n },\n bottomNavigation: {\n minHeight: 56,\n },\n filledInner: {\n justifyContent: 'center',\n },\n tertiary: {\n minHeight: 44,\n },\n});\n\nexport default function Tab(props: TabProps) {\n const {\n badgeVisible = false,\n children,\n enableIndicator = false,\n icon: defaultIcon,\n indicatorColor = 'primary',\n indicatorSize = 'full',\n selected = false,\n selectedIcon,\n variant = 'primary',\n style,\n onTabInnerLayout,\n ...otherProps\n } = props;\n\n const theme = useTheme();\n\n const vertical = variant === 'bottom-navigation';\n\n const color = selected\n ? theme.palette.text.primary\n : variant === 'contained'\n ? theme.palette.text.secondary\n : theme.palette.text.hint;\n\n const containedStyle = {\n borderColor: selected ? theme.palette.primary.main : theme.palette.border.default,\n borderRadius: theme.shape.roundnessExtra,\n borderWidth: selected ? 1.5 : 1,\n minHeight: 'auto',\n paddingHorizontal: theme.spacing(3),\n paddingVertical: theme.spacing(1.5),\n };\n\n const tabBaseStyle = css([\n styles.root,\n variant === 'bottom-navigation' && styles.bottomNavigation,\n variant === 'contained' && containedStyle,\n variant === 'tertiary' && styles.tertiary,\n style,\n ]);\n\n const tabInnerStyle = css([\n styles.root,\n styles.filledInner,\n ]);\n\n const fontStyle = createFontStyle(theme, {\n selector: (typo) => {\n switch (variant) {\n case 'primary':\n return typo.h2;\n case 'secondary':\n return typo.button2;\n case 'tertiary':\n return typo.h3;\n case 'contained':\n return selected\n ? { ...typo.subtitle2, fontWeight: typo.fontWeight.medium }\n : typo.body2;\n default:\n return typo.flag;\n }\n },\n color,\n });\n const pressEffect = selected ? 'none' : 'opacity';\n\n const icon = selected ? (selectedIcon || defaultIcon) : defaultIcon;\n const iconElement = icon ? cloneElement(icon, { fill: color }) : null;\n\n const tabElement = typeof children !== 'string' ? (\n React.cloneElement(children, {\n selected,\n })\n ) : (\n <React.Fragment>\n <Badge\n children={iconElement}\n invisible={!badgeVisible}\n />\n\n <Text\n children={children}\n style={css(fontStyle)}\n />\n </React.Fragment>\n );\n const tabIndicator = (enableIndicator && selected)\n ? <TabIndicator indicatorSize={indicatorSize} color={indicatorColor}/>\n : null;\n\n return (\n <TabBase\n pressEffect={pressEffect}\n style={tabBaseStyle}\n vertical={vertical}\n {...otherProps}\n >\n {indicatorSize === 'fit-content' ? (\n <View onLayout={onTabInnerLayout} style={tabInnerStyle}>\n {tabElement}\n\n {tabIndicator}\n </View>\n ) : (\n <React.Fragment>\n {tabElement}\n\n {tabIndicator}\n </React.Fragment>\n )}\n </TabBase>\n );\n};\n"],"mappings":"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"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["LegacyTabProps.ts"],"sourcesContent":["import React from 'react';\nimport type { LayoutChangeEvent } from 'react-native';\nimport type { TabBaseProps } from '../TabBase';\nimport type { OverridableComponentProps } from '../types';\n\nexport type TabVariant = 'primary' | 'secondary' | 'tertiary' | 'bottom-navigation' | 'contained';\nexport type TabIndicatorColor = 'primary' | 'secondary';\nexport type TabIndicatorSize = 'full' | 'fit-content';\n\nexport default interface TabProps extends OverridableComponentProps<TabBaseProps, {\n /**\n * If `true`, the badge is visible.\n * @default false\n */\n badgeVisible?: boolean;\n\n /**\n * The label of the Tab.\n */\n children: string | React.ReactElement;\n\n /**\n * If `true`, the indicator is enabled.\n * @default false\n */\n enableIndicator?: boolean;\n\n /**\n * If `true`, the component is selected.\n * @default false\n */\n selected?: boolean;\n\n /**\n * Element placed before the children.\n */\n icon?: React.ReactElement;\n\n /**\n * Tab indicator color\n * @default 'primary'\n */\n indicatorColor?: TabIndicatorColor;\n\n /**\n * The size of tab indicator.\n * 'full' adjusts the indicator to the size of the Tab,\n * while 'fit-content' adjusts the indicator to the size of the content inside the Tab.\n * @default 'full'\n */\n indicatorSize?: TabIndicatorSize;\n\n /**\n * If supplied, use this icon on selected state.\n */\n selectedIcon?: React.ReactElement;\n\n /**\n * The variant to use.\n * @default 'primary'\n */\n variant?: TabVariant;\n\n /**\n * Function to be passed to the child component's onLayout prop.\n */\n onTabInnerLayout?: (event: LayoutChangeEvent) => void;\n}> {}\n"],"mappings":""}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
|
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
|
-
var _reactNative = require("react-native");
|
|
11
|
-
|
|
12
|
-
var _styles = require("../styles");
|
|
13
|
-
|
|
14
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
-
|
|
16
|
-
const useStyles = function (color, indicatorSize) {
|
|
17
|
-
const theme = (0, _styles.useTheme)();
|
|
18
|
-
return {
|
|
19
|
-
root: {
|
|
20
|
-
backgroundColor: theme.palette[color].main,
|
|
21
|
-
bottom: 0,
|
|
22
|
-
height: 2,
|
|
23
|
-
left: indicatorSize === 'fit-content' ? 0 : 12,
|
|
24
|
-
right: indicatorSize === 'fit-content' ? 0 : 12,
|
|
25
|
-
position: 'absolute'
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
const TabIndicator = function TabIndicator(_ref) {
|
|
31
|
-
let {
|
|
32
|
-
indicatorSize,
|
|
33
|
-
color
|
|
34
|
-
} = _ref;
|
|
35
|
-
const styles = useStyles(color, indicatorSize);
|
|
36
|
-
return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
37
|
-
style: styles.root
|
|
38
|
-
});
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
var _default = /*#__PURE__*/_react.default.memo(TabIndicator);
|
|
42
|
-
|
|
43
|
-
exports.default = _default;
|
|
44
|
-
//# sourceMappingURL=TabIndicator.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["useStyles","color","indicatorSize","theme","useTheme","root","backgroundColor","palette","main","bottom","height","left","right","position","TabIndicator","styles","React","memo"],"sources":["TabIndicator.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\nimport { NamedStylesStringUnion } from '@fountain-ui/styles';\nimport { useTheme } from '../styles';\nimport type { TabIndicatorColor, TabIndicatorSize } from './LegacyTabProps';\n\ntype TabIndicatorStyles = NamedStylesStringUnion<'root'>;\n\nconst useStyles: (color: TabIndicatorColor, indicatorSize: TabIndicatorSize) => TabIndicatorStyles =\n function (color: TabIndicatorColor, indicatorSize): TabIndicatorStyles {\n const theme = useTheme();\n\n return {\n root: {\n backgroundColor: theme.palette[color].main,\n bottom: 0,\n height: 2,\n left: indicatorSize === 'fit-content' ? 0 : 12,\n right: indicatorSize === 'fit-content' ? 0 : 12,\n position: 'absolute',\n },\n };\n };\n\nconst TabIndicator = function TabIndicator({\n indicatorSize,\n color,\n}: { indicatorSize: TabIndicatorSize; color: TabIndicatorColor }) {\n const styles = useStyles(color, indicatorSize);\n\n return (\n <View\n style={styles.root}\n />\n );\n};\n\nexport default React.memo(TabIndicator);\n"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;;;AAKA,MAAMA,SAA4F,GAC9F,UAAUC,KAAV,EAAoCC,aAApC,EAAuE;EACnE,MAAMC,KAAK,GAAG,IAAAC,gBAAA,GAAd;EAEA,OAAO;IACHC,IAAI,EAAE;MACFC,eAAe,EAAEH,KAAK,CAACI,OAAN,CAAcN,KAAd,EAAqBO,IADpC;MAEFC,MAAM,EAAE,CAFN;MAGFC,MAAM,EAAE,CAHN;MAIFC,IAAI,EAAET,aAAa,KAAK,aAAlB,GAAkC,CAAlC,GAAsC,EAJ1C;MAKFU,KAAK,EAAEV,aAAa,KAAK,aAAlB,GAAkC,CAAlC,GAAsC,EAL3C;MAMFW,QAAQ,EAAE;IANR;EADH,CAAP;AAUH,CAdL;;AAgBA,MAAMC,YAAY,GAAG,SAASA,YAAT,OAG6C;EAAA,IAHvB;IACvCZ,aADuC;IAEvCD;EAFuC,CAGuB;EAC9D,MAAMc,MAAM,GAAGf,SAAS,CAACC,KAAD,EAAQC,aAAR,CAAxB;EAEA,oBACI,6BAAC,iBAAD;IACI,KAAK,EAAEa,MAAM,CAACV;EADlB,EADJ;AAKH,CAXD;;4BAaeW,cAAA,CAAMC,IAAN,CAAWH,YAAX,C"}
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = TabBase;
|
|
7
|
-
|
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
|
-
var _styles = require("@fountain-ui/styles");
|
|
11
|
-
|
|
12
|
-
var _styles2 = require("../styles");
|
|
13
|
-
|
|
14
|
-
var _ButtonBase = _interopRequireDefault(require("../ButtonBase"));
|
|
15
|
-
|
|
16
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
-
|
|
18
|
-
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); }
|
|
19
|
-
|
|
20
|
-
const useStyles = function () {
|
|
21
|
-
const theme = (0, _styles2.useTheme)();
|
|
22
|
-
return {
|
|
23
|
-
root: {
|
|
24
|
-
alignItems: 'center',
|
|
25
|
-
justifyContent: 'center',
|
|
26
|
-
paddingHorizontal: theme.spacing(3),
|
|
27
|
-
minHeight: 48
|
|
28
|
-
},
|
|
29
|
-
row: {
|
|
30
|
-
flexDirection: 'row'
|
|
31
|
-
},
|
|
32
|
-
column: {
|
|
33
|
-
flexDirection: 'column'
|
|
34
|
-
}
|
|
35
|
-
};
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
function TabBase(props) {
|
|
39
|
-
const {
|
|
40
|
-
children,
|
|
41
|
-
disabled = false,
|
|
42
|
-
onPress,
|
|
43
|
-
selected = false,
|
|
44
|
-
vertical = false,
|
|
45
|
-
style,
|
|
46
|
-
...otherProps
|
|
47
|
-
} = props;
|
|
48
|
-
const styles = useStyles();
|
|
49
|
-
return /*#__PURE__*/_react.default.createElement(_ButtonBase.default, _extends({
|
|
50
|
-
onPress: onPress,
|
|
51
|
-
disabled: disabled,
|
|
52
|
-
style: (0, _styles.css)([styles.root, vertical ? styles.column : styles.row, style])
|
|
53
|
-
}, otherProps), children);
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
;
|
|
57
|
-
//# sourceMappingURL=LegacyTabBase.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["useStyles","theme","useTheme","root","alignItems","justifyContent","paddingHorizontal","spacing","minHeight","row","flexDirection","column","TabBase","props","children","disabled","onPress","selected","vertical","style","otherProps","styles","css"],"sources":["LegacyTabBase.tsx"],"sourcesContent":["import React from 'react';\nimport { css, NamedStylesStringUnion, UseStyles } from '@fountain-ui/styles';\nimport { useTheme } from '../styles';\nimport ButtonBase from '../ButtonBase';\nimport type TabBaseProps from './TabBaseProps';\n\ntype TabBaseStyles = NamedStylesStringUnion<'root' | 'row' | 'column'>;\n\nconst useStyles: UseStyles<TabBaseStyles> = function (): TabBaseStyles {\n const theme = useTheme();\n\n return {\n root: {\n alignItems: 'center',\n justifyContent: 'center',\n paddingHorizontal: theme.spacing(3),\n minHeight: 48,\n },\n row: {\n flexDirection: 'row',\n },\n column: {\n flexDirection: 'column',\n },\n };\n};\n\nexport default function TabBase(props: TabBaseProps) {\n const {\n children,\n disabled = false,\n onPress,\n selected = false,\n vertical = false,\n style,\n ...otherProps\n } = props;\n\n const styles = useStyles();\n\n return (\n <ButtonBase\n onPress={onPress}\n disabled={disabled}\n style={css([\n styles.root,\n vertical ? styles.column : styles.row,\n style,\n ])}\n {...otherProps}\n >\n {children}\n </ButtonBase>\n );\n};\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;;;;;AAKA,MAAMA,SAAmC,GAAG,YAA2B;EACnE,MAAMC,KAAK,GAAG,IAAAC,iBAAA,GAAd;EAEA,OAAO;IACHC,IAAI,EAAE;MACFC,UAAU,EAAE,QADV;MAEFC,cAAc,EAAE,QAFd;MAGFC,iBAAiB,EAAEL,KAAK,CAACM,OAAN,CAAc,CAAd,CAHjB;MAIFC,SAAS,EAAE;IAJT,CADH;IAOHC,GAAG,EAAE;MACDC,aAAa,EAAE;IADd,CAPF;IAUHC,MAAM,EAAE;MACJD,aAAa,EAAE;IADX;EAVL,CAAP;AAcH,CAjBD;;AAmBe,SAASE,OAAT,CAAiBC,KAAjB,EAAsC;EACjD,MAAM;IACFC,QADE;IAEFC,QAAQ,GAAG,KAFT;IAGFC,OAHE;IAIFC,QAAQ,GAAG,KAJT;IAKFC,QAAQ,GAAG,KALT;IAMFC,KANE;IAOF,GAAGC;EAPD,IAQFP,KARJ;EAUA,MAAMQ,MAAM,GAAGrB,SAAS,EAAxB;EAEA,oBACI,6BAAC,mBAAD;IACI,OAAO,EAAEgB,OADb;IAEI,QAAQ,EAAED,QAFd;IAGI,KAAK,EAAE,IAAAO,WAAA,EAAI,CACPD,MAAM,CAAClB,IADA,EAEPe,QAAQ,GAAGG,MAAM,CAACV,MAAV,GAAmBU,MAAM,CAACZ,GAF3B,EAGPU,KAHO,CAAJ;EAHX,GAQQC,UARR,GAUKN,QAVL,CADJ;AAcH;;AAAA"}
|
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = TabIndicator;
|
|
7
|
-
|
|
8
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
-
|
|
10
|
-
var _reactNative = require("react-native");
|
|
11
|
-
|
|
12
|
-
var _styles = require("../styles");
|
|
13
|
-
|
|
14
|
-
var _hooks = require("../hooks");
|
|
15
|
-
|
|
16
|
-
var _utils = require("../utils");
|
|
17
|
-
|
|
18
|
-
var _TabCoordinate = require("./TabCoordinate");
|
|
19
|
-
|
|
20
|
-
var _InternalContext = _interopRequireDefault(require("./InternalContext"));
|
|
21
|
-
|
|
22
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
23
|
-
|
|
24
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
25
|
-
|
|
26
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
27
|
-
|
|
28
|
-
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); }
|
|
29
|
-
|
|
30
|
-
const INDICATOR_WIDTH = 10;
|
|
31
|
-
const INDICATOR_HEIGHT = 2;
|
|
32
|
-
const SCROLLABLE_TABS_INSET = 12 * 2;
|
|
33
|
-
|
|
34
|
-
const useStyles = function (color) {
|
|
35
|
-
const theme = (0, _styles.useTheme)();
|
|
36
|
-
return {
|
|
37
|
-
root: {
|
|
38
|
-
backgroundColor: theme.palette[color].main,
|
|
39
|
-
left: 0,
|
|
40
|
-
bottom: 0,
|
|
41
|
-
width: INDICATOR_WIDTH,
|
|
42
|
-
height: INDICATOR_HEIGHT,
|
|
43
|
-
position: 'absolute'
|
|
44
|
-
},
|
|
45
|
-
disabled: {
|
|
46
|
-
height: 0
|
|
47
|
-
}
|
|
48
|
-
};
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
const startAnimation = (value, toValue, animationDisabled) => {
|
|
52
|
-
_reactNative.Animated.timing(value, {
|
|
53
|
-
toValue: toValue,
|
|
54
|
-
duration: !animationDisabled ? 300 : 0,
|
|
55
|
-
easing: _reactNative.Easing.bezier(0.25, 1, 0.5, 1),
|
|
56
|
-
useNativeDriver: _utils.isNotAndroid12
|
|
57
|
-
}).start();
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
function TabIndicator(props) {
|
|
61
|
-
const {
|
|
62
|
-
animationDisabled = false,
|
|
63
|
-
color = 'primary',
|
|
64
|
-
coordinates,
|
|
65
|
-
disabled,
|
|
66
|
-
initialIndex,
|
|
67
|
-
scrollable,
|
|
68
|
-
style,
|
|
69
|
-
...otherProps
|
|
70
|
-
} = props;
|
|
71
|
-
const styles = useStyles(color);
|
|
72
|
-
const computeAnimationValues = (0, _react.useCallback)(currentIndex => {
|
|
73
|
-
const {
|
|
74
|
-
x1,
|
|
75
|
-
x2
|
|
76
|
-
} = coordinates[currentIndex] ?? _TabCoordinate.defaultCoordinate;
|
|
77
|
-
const tabWidth = x2 - x1;
|
|
78
|
-
const nextTranslateX = x1 + (tabWidth - INDICATOR_WIDTH) / 2;
|
|
79
|
-
const inset = scrollable ? SCROLLABLE_TABS_INSET : 0;
|
|
80
|
-
const nextScaleX = (tabWidth - inset) / INDICATOR_WIDTH;
|
|
81
|
-
return {
|
|
82
|
-
tx: nextTranslateX,
|
|
83
|
-
sx: nextScaleX
|
|
84
|
-
};
|
|
85
|
-
}, [coordinates, scrollable]);
|
|
86
|
-
const {
|
|
87
|
-
tx: initialTx,
|
|
88
|
-
sx: initialSx
|
|
89
|
-
} = computeAnimationValues(initialIndex);
|
|
90
|
-
const translateX = (0, _hooks.useAnimatedValue)(initialTx);
|
|
91
|
-
const scaleX = (0, _hooks.useAnimatedValue)(initialSx);
|
|
92
|
-
const {
|
|
93
|
-
indexStore
|
|
94
|
-
} = (0, _react.useContext)(_InternalContext.default);
|
|
95
|
-
(0, _react.useEffect)(() => {
|
|
96
|
-
const scrollToIndex = index => {
|
|
97
|
-
const {
|
|
98
|
-
tx,
|
|
99
|
-
sx
|
|
100
|
-
} = computeAnimationValues(index);
|
|
101
|
-
startAnimation(translateX, tx, animationDisabled);
|
|
102
|
-
startAnimation(scaleX, sx, animationDisabled);
|
|
103
|
-
};
|
|
104
|
-
|
|
105
|
-
scrollToIndex(indexStore.getState());
|
|
106
|
-
return indexStore.subscribe(scrollToIndex);
|
|
107
|
-
}, [computeAnimationValues, animationDisabled, indexStore]);
|
|
108
|
-
return /*#__PURE__*/_react.default.createElement(_reactNative.Animated.View, _extends({
|
|
109
|
-
style: [styles.root, disabled ? styles.disabled : undefined, {
|
|
110
|
-
transform: [{
|
|
111
|
-
translateX
|
|
112
|
-
}, {
|
|
113
|
-
scaleX
|
|
114
|
-
}]
|
|
115
|
-
}, style]
|
|
116
|
-
}, otherProps));
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
;
|
|
120
|
-
//# sourceMappingURL=LegacyTabIndicator.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["INDICATOR_WIDTH","INDICATOR_HEIGHT","SCROLLABLE_TABS_INSET","useStyles","color","theme","useTheme","root","backgroundColor","palette","main","left","bottom","width","height","position","disabled","startAnimation","value","toValue","animationDisabled","Animated","timing","duration","easing","Easing","bezier","useNativeDriver","isNotAndroid12","start","TabIndicator","props","coordinates","initialIndex","scrollable","style","otherProps","styles","computeAnimationValues","useCallback","currentIndex","x1","x2","defaultCoordinate","tabWidth","nextTranslateX","inset","nextScaleX","tx","sx","initialTx","initialSx","translateX","useAnimatedValue","scaleX","indexStore","useContext","InternalContext","useEffect","scrollToIndex","index","getState","subscribe","undefined","transform"],"sources":["LegacyTabIndicator.tsx"],"sourcesContent":["import React, { useCallback, useContext, useEffect } from 'react';\nimport { Animated, Easing } from 'react-native';\nimport { NamedStylesStringUnion } from '@fountain-ui/styles';\nimport { useTheme } from '../styles';\nimport { useAnimatedValue } from '../hooks';\nimport { isNotAndroid12 } from '../utils';\nimport type TabIndicatorProps from './LegacyTabIndicatorProps';\nimport type { TabIndicatorColor } from './LegacyTabIndicatorProps';\nimport { defaultCoordinate } from './TabCoordinate';\nimport InternalContext from './InternalContext';\n\ntype TabIndicatorStyles = NamedStylesStringUnion<'root' | 'disabled'>;\n\nconst INDICATOR_WIDTH = 10;\nconst INDICATOR_HEIGHT = 2;\n\nconst SCROLLABLE_TABS_INSET = 12 * 2;\n\nconst useStyles: (color: TabIndicatorColor) => TabIndicatorStyles =\n function (color: TabIndicatorColor): TabIndicatorStyles {\n const theme = useTheme();\n\n return {\n root: {\n backgroundColor: theme.palette[color].main,\n left: 0,\n bottom: 0,\n width: INDICATOR_WIDTH,\n height: INDICATOR_HEIGHT,\n position: 'absolute',\n },\n disabled: {\n height: 0,\n },\n };\n };\n\nconst startAnimation = (value: Animated.Value, toValue: number, animationDisabled: boolean) => {\n Animated.timing(value, {\n toValue: toValue,\n duration: !animationDisabled ? 300: 0,\n easing: Easing.bezier(0.25, 1, 0.5, 1),\n useNativeDriver: isNotAndroid12,\n }).start();\n};\n\nexport default function TabIndicator(props: TabIndicatorProps) {\n const {\n animationDisabled = false,\n color = 'primary',\n coordinates,\n disabled,\n initialIndex,\n scrollable,\n style,\n ...otherProps\n } = props;\n\n const styles = useStyles(color);\n\n const computeAnimationValues = useCallback((currentIndex: number) => {\n const { x1, x2 } = coordinates[currentIndex] ?? defaultCoordinate;\n\n const tabWidth = x2 - x1;\n\n const nextTranslateX = x1 + (tabWidth - INDICATOR_WIDTH) / 2;\n\n const inset = scrollable ? SCROLLABLE_TABS_INSET : 0;\n const nextScaleX = (tabWidth - inset) / INDICATOR_WIDTH;\n\n return { tx: nextTranslateX, sx: nextScaleX };\n }, [coordinates, scrollable]);\n\n const {\n tx: initialTx,\n sx: initialSx,\n } = computeAnimationValues(initialIndex);\n\n const translateX = useAnimatedValue(initialTx);\n const scaleX = useAnimatedValue(initialSx);\n\n const { indexStore } = useContext(InternalContext);\n\n useEffect(() => {\n const scrollToIndex = (index: number) => {\n const { tx, sx } = computeAnimationValues(index);\n\n startAnimation(translateX, tx, animationDisabled);\n startAnimation(scaleX, sx, animationDisabled);\n };\n\n scrollToIndex(indexStore.getState());\n\n return indexStore.subscribe(scrollToIndex);\n }, [\n computeAnimationValues,\n animationDisabled,\n indexStore,\n ]);\n\n return (\n <Animated.View\n style={[\n styles.root,\n disabled ? styles.disabled : undefined,\n { transform: [{ translateX }, { scaleX }] },\n style,\n ]}\n {...otherProps}\n />\n );\n};\n"],"mappings":"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"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["LegacyTabIndicatorProps.ts"],"sourcesContent":["import type { ViewProps } from 'react-native';\nimport type { OverridableComponentProps } from '../types';\nimport type TabCoordinate from './TabCoordinate';\n\nexport type TabIndicatorColor = 'primary' | 'secondary';\n\nexport default interface TabIndicatorProps extends OverridableComponentProps<ViewProps, {\n /**\n * If `true`, tab shifting animation will be disabled\n */\n animationDisabled?: boolean;\n /**\n * Tab item coordinates.\n */\n coordinates: TabCoordinate[];\n\n /**\n * Indicator color.\n * @default: 'primary'\n */\n color?: TabIndicatorColor;\n\n /**\n * If `true`, the indicator is disabled.\n */\n disabled: boolean;\n\n /**\n * Initial index.\n */\n initialIndex: number;\n\n /**\n * If `true`, the tab will be able to scroll.\n */\n scrollable: boolean;\n}> {}\n"],"mappings":""}
|
|
@@ -1,207 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
|
|
8
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
-
|
|
10
|
-
var _reactNative = require("react-native");
|
|
11
|
-
|
|
12
|
-
var _styles = require("../styles");
|
|
13
|
-
|
|
14
|
-
var _hooks = require("../hooks");
|
|
15
|
-
|
|
16
|
-
var _LegacyTabIndicator = _interopRequireDefault(require("./LegacyTabIndicator"));
|
|
17
|
-
|
|
18
|
-
var _ScrollableTabsView = _interopRequireDefault(require("./ScrollableTabsView"));
|
|
19
|
-
|
|
20
|
-
var _IndexAwareTab = _interopRequireDefault(require("./IndexAwareTab"));
|
|
21
|
-
|
|
22
|
-
var _useTabCoordinates = _interopRequireDefault(require("./useTabCoordinates"));
|
|
23
|
-
|
|
24
|
-
var _useTabInnerContentsWidth = _interopRequireDefault(require("./useTabInnerContentsWidth"));
|
|
25
|
-
|
|
26
|
-
var _useIndexStore = _interopRequireDefault(require("./useIndexStore"));
|
|
27
|
-
|
|
28
|
-
var _InternalContext = _interopRequireDefault(require("./InternalContext"));
|
|
29
|
-
|
|
30
|
-
var _utils = require("./utils");
|
|
31
|
-
|
|
32
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
33
|
-
|
|
34
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
35
|
-
|
|
36
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
37
|
-
|
|
38
|
-
const useStyles = function () {
|
|
39
|
-
const theme = (0, _styles.useTheme)();
|
|
40
|
-
return {
|
|
41
|
-
root: {},
|
|
42
|
-
fixedRoot: {
|
|
43
|
-
flexDirection: 'row'
|
|
44
|
-
},
|
|
45
|
-
fixedTab: {
|
|
46
|
-
flex: 1
|
|
47
|
-
},
|
|
48
|
-
scrollableContainer: {
|
|
49
|
-
paddingHorizontal: theme.spacing(1)
|
|
50
|
-
}
|
|
51
|
-
};
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
const Tabs = /*#__PURE__*/(0, _react.forwardRef)(function Tabs(props, ref) {
|
|
55
|
-
var _React$Children$map;
|
|
56
|
-
|
|
57
|
-
const {
|
|
58
|
-
children,
|
|
59
|
-
indicatorColor = 'primary',
|
|
60
|
-
initialIndex = 0,
|
|
61
|
-
disableIndicator = false,
|
|
62
|
-
indicatorAnimationDisabled = false,
|
|
63
|
-
indicatorSize = 'full',
|
|
64
|
-
keyboardDismissMode = 'none',
|
|
65
|
-
keyboardShouldPersistTaps = 'never',
|
|
66
|
-
onChange,
|
|
67
|
-
scrollable = false,
|
|
68
|
-
scrollViewContentContainerStyle,
|
|
69
|
-
style,
|
|
70
|
-
variant = 'primary',
|
|
71
|
-
UNSTABLE_sharedIndex,
|
|
72
|
-
onTabSelected
|
|
73
|
-
} = props;
|
|
74
|
-
const fallbackSharedIndex = (0, _hooks.useSyncAnimatedValue)({
|
|
75
|
-
initialValue: initialIndex
|
|
76
|
-
});
|
|
77
|
-
const sharedIndex = UNSTABLE_sharedIndex ?? fallbackSharedIndex;
|
|
78
|
-
const realInitialIndex = sharedIndex.initialValue;
|
|
79
|
-
const currentIndexRef = (0, _react.useRef)(initialIndex);
|
|
80
|
-
|
|
81
|
-
const setTab = newIndex => {
|
|
82
|
-
const currentIndex = currentIndexRef.current;
|
|
83
|
-
onTabSelected === null || onTabSelected === void 0 ? void 0 : onTabSelected(newIndex, currentIndex);
|
|
84
|
-
sharedIndex.animatedValue.setValue(newIndex);
|
|
85
|
-
};
|
|
86
|
-
|
|
87
|
-
(0, _react.useImperativeHandle)(ref, () => ({
|
|
88
|
-
setTab
|
|
89
|
-
}), [sharedIndex]);
|
|
90
|
-
const styles = useStyles();
|
|
91
|
-
const [outerCoordinates, updateCoordinate] = (0, _useTabCoordinates.default)(children);
|
|
92
|
-
const [innerContentsWidthList, updateInnerContentsWidth] = (0, _useTabInnerContentsWidth.default)(children);
|
|
93
|
-
const canRenderIndicator = indicatorSize === 'fit-content' ? (0, _utils.isEveryTabCoordinatesDefined)(innerContentsWidthList, children) : (0, _utils.isEveryTabCoordinatesDefined)(outerCoordinates, children);
|
|
94
|
-
const indexStore = (0, _useIndexStore.default)(sharedIndex);
|
|
95
|
-
const coordinates = (0, _react.useMemo)(() => {
|
|
96
|
-
if (indicatorSize !== 'fit-content') {
|
|
97
|
-
return outerCoordinates;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
return innerContentsWidthList.map((innerContentWidth, idx) => {
|
|
101
|
-
const {
|
|
102
|
-
x1: outerX1,
|
|
103
|
-
x2: outerX2
|
|
104
|
-
} = outerCoordinates[idx];
|
|
105
|
-
const tabWidth = outerX2 - outerX1;
|
|
106
|
-
const distanceFromParent = (tabWidth - innerContentWidth) / 2;
|
|
107
|
-
const indicatorStartCoordinate = outerX1 + distanceFromParent;
|
|
108
|
-
return {
|
|
109
|
-
x1: indicatorStartCoordinate,
|
|
110
|
-
x2: indicatorStartCoordinate + innerContentWidth
|
|
111
|
-
};
|
|
112
|
-
});
|
|
113
|
-
}, [outerCoordinates, innerContentsWidthList, variant]);
|
|
114
|
-
(0, _react.useEffect)(() => {
|
|
115
|
-
return indexStore.subscribe(newIndex => {
|
|
116
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(newIndex);
|
|
117
|
-
currentIndexRef.current = newIndex;
|
|
118
|
-
});
|
|
119
|
-
}, [indexStore, onChange]);
|
|
120
|
-
const tabElements = (_React$Children$map = _react.default.Children.map(children, (child, index) => {
|
|
121
|
-
if (!child) {
|
|
122
|
-
return null;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
const onTabInnerLayout = event => {
|
|
126
|
-
const {
|
|
127
|
-
width
|
|
128
|
-
} = event.nativeEvent.layout;
|
|
129
|
-
updateInnerContentsWidth(index, width);
|
|
130
|
-
};
|
|
131
|
-
|
|
132
|
-
const onLayout = event => {
|
|
133
|
-
var _child$props$onLayout, _child$props;
|
|
134
|
-
|
|
135
|
-
const {
|
|
136
|
-
x,
|
|
137
|
-
width
|
|
138
|
-
} = event.nativeEvent.layout;
|
|
139
|
-
updateCoordinate(index, x, width); // @ts-ignore
|
|
140
|
-
|
|
141
|
-
(_child$props$onLayout = (_child$props = child.props).onLayout) === null || _child$props$onLayout === void 0 ? void 0 : _child$props$onLayout.call(_child$props, event);
|
|
142
|
-
};
|
|
143
|
-
|
|
144
|
-
const onMouseDown = e => {
|
|
145
|
-
if (keyboardShouldPersistTaps === 'always') {
|
|
146
|
-
e.preventDefault();
|
|
147
|
-
}
|
|
148
|
-
};
|
|
149
|
-
|
|
150
|
-
const onPress = () => {
|
|
151
|
-
var _child$props$onPress, _child$props2;
|
|
152
|
-
|
|
153
|
-
setTab(index); // @ts-ignore
|
|
154
|
-
|
|
155
|
-
(_child$props$onPress = (_child$props2 = child.props).onPress) === null || _child$props$onPress === void 0 ? void 0 : _child$props$onPress.call(_child$props2);
|
|
156
|
-
}; // @ts-ignore
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
const tabElement = /*#__PURE__*/(0, _react.cloneElement)(child, {
|
|
160
|
-
enableIndicator: !disableIndicator && !canRenderIndicator,
|
|
161
|
-
indicatorColor,
|
|
162
|
-
onTabInnerLayout,
|
|
163
|
-
onLayout,
|
|
164
|
-
onPress,
|
|
165
|
-
onMouseDown,
|
|
166
|
-
variant,
|
|
167
|
-
indicatorSize,
|
|
168
|
-
style: scrollable ? undefined : styles.fixedTab
|
|
169
|
-
});
|
|
170
|
-
return /*#__PURE__*/_react.default.createElement(_IndexAwareTab.default, {
|
|
171
|
-
children: tabElement,
|
|
172
|
-
index: index,
|
|
173
|
-
initialIndex: realInitialIndex
|
|
174
|
-
});
|
|
175
|
-
})) === null || _React$Children$map === void 0 ? void 0 : _React$Children$map.filter(Boolean);
|
|
176
|
-
const tabIndicator = canRenderIndicator ? /*#__PURE__*/_react.default.createElement(_LegacyTabIndicator.default, {
|
|
177
|
-
animationDisabled: indicatorAnimationDisabled,
|
|
178
|
-
color: indicatorColor,
|
|
179
|
-
coordinates: coordinates,
|
|
180
|
-
disabled: disableIndicator,
|
|
181
|
-
initialIndex: realInitialIndex,
|
|
182
|
-
scrollable: scrollable
|
|
183
|
-
}) : null;
|
|
184
|
-
return /*#__PURE__*/_react.default.createElement(_InternalContext.default.Provider, {
|
|
185
|
-
value: {
|
|
186
|
-
indexStore
|
|
187
|
-
}
|
|
188
|
-
}, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
189
|
-
style: (0, _styles.css)([styles.root, scrollable ? undefined : styles.fixedRoot, style])
|
|
190
|
-
}, scrollable ? /*#__PURE__*/_react.default.createElement(_ScrollableTabsView.default, {
|
|
191
|
-
automaticallyAdjustContentInsets: false,
|
|
192
|
-
bounces: false,
|
|
193
|
-
contentContainerStyle: (0, _styles.css)([styles.scrollableContainer, scrollViewContentContainerStyle]),
|
|
194
|
-
coordinates: coordinates,
|
|
195
|
-
directionalLockEnabled: true,
|
|
196
|
-
horizontal: true,
|
|
197
|
-
initialIndex: realInitialIndex,
|
|
198
|
-
scrollsToTop: false,
|
|
199
|
-
showsHorizontalScrollIndicator: false,
|
|
200
|
-
showsVerticalScrollIndicator: false,
|
|
201
|
-
keyboardDismissMode: keyboardDismissMode,
|
|
202
|
-
keyboardShouldPersistTaps: keyboardShouldPersistTaps
|
|
203
|
-
}, tabElements, tabIndicator) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, tabElements, tabIndicator)));
|
|
204
|
-
});
|
|
205
|
-
var _default = Tabs;
|
|
206
|
-
exports.default = _default;
|
|
207
|
-
//# sourceMappingURL=LegacyTabs.js.map
|