@fountain-ui/core 2.0.0-beta.98 → 3.0.0-alpha.1
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 +2 -2
- package/build/commonjs/Accordion/index.js.map +1 -1
- package/build/commonjs/Accordion/useVariantStyleMap.js +4 -2
- 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.map +1 -1
- package/build/commonjs/Badge/index.js +2 -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/index.js +2 -2
- package/build/commonjs/Button/index.js.map +1 -1
- package/build/commonjs/Button/useVariantStyleMap.js +10 -2
- package/build/commonjs/Button/useVariantStyleMap.js.map +1 -1
- package/build/commonjs/Checkbox/Checkbox.js +0 -1
- package/build/commonjs/Checkbox/Checkbox.js.map +1 -1
- package/build/commonjs/Checkbox/index.js +2 -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 +2 -2
- package/build/commonjs/Chip/index.js.map +1 -1
- package/build/commonjs/Chip/useChipStyle.js +15 -3
- 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 +24 -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 +5 -1
- 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/index.js +2 -2
- package/build/commonjs/Divider/index.js.map +1 -1
- package/build/commonjs/Empty/Empty.js +2 -2
- 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 +2 -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 +2 -2
- package/build/commonjs/Pagination/index.js.map +1 -1
- package/build/commonjs/Radio/Radio.js +1 -2
- 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 +2 -2
- package/build/commonjs/Snackbar/index.js.map +1 -1
- package/build/commonjs/SnackbarContent/SnackbarContent.js +15 -5
- 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 +2 -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 +2 -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 +2 -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.map +1 -1
- package/build/commonjs/Tooltip/Tooltip.js +6 -1
- package/build/commonjs/Tooltip/Tooltip.js.map +1 -1
- package/build/commonjs/Tooltip/index.js +2 -2
- package/build/commonjs/Tooltip/index.js.map +1 -1
- package/build/commonjs/Typography/index.js +2 -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 +1 -1
- package/build/module/Accordion/index.js.map +1 -1
- package/build/module/Accordion/useVariantStyleMap.js +4 -2
- 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.map +1 -1
- package/build/module/Badge/index.js +1 -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/index.js +1 -1
- package/build/module/Button/index.js.map +1 -1
- package/build/module/Button/useVariantStyleMap.js +10 -2
- package/build/module/Button/useVariantStyleMap.js.map +1 -1
- package/build/module/Checkbox/Checkbox.js +0 -1
- package/build/module/Checkbox/Checkbox.js.map +1 -1
- package/build/module/Checkbox/index.js +1 -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 +1 -1
- package/build/module/Chip/index.js.map +1 -1
- package/build/module/Chip/useChipStyle.js +14 -3
- 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 +3 -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 +4 -1
- 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/index.js +1 -1
- package/build/module/Divider/index.js.map +1 -1
- package/build/module/Empty/Empty.js +2 -2
- 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 +1 -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 +1 -1
- package/build/module/Pagination/index.js.map +1 -1
- package/build/module/Radio/Radio.js +1 -2
- 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 +1 -1
- package/build/module/Snackbar/index.js.map +1 -1
- package/build/module/SnackbarContent/SnackbarContent.js +16 -6
- 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 +1 -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 +1 -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 +1 -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.map +1 -1
- package/build/module/Tooltip/Tooltip.js +6 -1
- package/build/module/Tooltip/Tooltip.js.map +1 -1
- package/build/module/Tooltip/index.js +1 -1
- package/build/module/Tooltip/index.js.map +1 -1
- package/build/module/Typography/index.js +1 -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 +2 -2
- package/build/typescript/AppBar/AppBarProps.d.ts +2 -1
- package/build/typescript/Badge/index.d.ts +2 -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/index.d.ts +2 -2
- package/build/typescript/Checkbox/index.d.ts +2 -2
- package/build/typescript/Chip/index.d.ts +2 -2
- package/build/typescript/Dialog/DialogContext.d.ts +7 -0
- package/build/typescript/Dialog/index.d.ts +4 -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/index.d.ts +2 -2
- package/build/typescript/IconButton/IconButtonProps.d.ts +5 -0
- package/build/typescript/IconButton/index.d.ts +2 -2
- package/build/typescript/Pagination/index.d.ts +2 -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 +2 -2
- package/build/typescript/SnackbarContent/index.d.ts +2 -2
- package/build/typescript/SvgIcon/index.d.ts +2 -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 +2 -2
- package/build/typescript/TextField/index.d.ts +2 -2
- package/build/typescript/Toolbar/ToolbarProps.d.ts +9 -2
- package/build/typescript/Tooltip/index.d.ts +2 -2
- package/build/typescript/Typography/index.d.ts +2 -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 +2 -2
- package/src/Accordion/useVariantStyleMap.ts +2 -0
- package/src/AppBar/AppBar.tsx +7 -13
- package/src/AppBar/AppBarProps.ts +2 -1
- package/src/AppBar/index.ts +1 -1
- package/src/Badge/index.ts +2 -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/index.ts +2 -2
- package/src/Button/useVariantStyleMap.ts +10 -2
- package/src/Checkbox/Checkbox.tsx +0 -1
- package/src/Checkbox/index.ts +2 -2
- package/src/Checkbox/useVariantStyleMap.ts +3 -0
- package/src/Chip/index.ts +2 -2
- package/src/Chip/useChipStyle.ts +13 -2
- package/src/Dialog/Dialog.tsx +9 -19
- package/src/Dialog/DialogContext.tsx +14 -0
- package/src/Dialog/index.ts +4 -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 +5 -0
- 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/index.ts +2 -2
- package/src/Empty/Empty.tsx +2 -3
- package/src/IconButton/IconButton.tsx +33 -3
- package/src/IconButton/IconButtonProps.ts +6 -0
- package/src/IconButton/index.ts +2 -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 +2 -2
- package/src/Radio/Radio.tsx +1 -4
- 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 +2 -2
- package/src/SnackbarContent/SnackbarContent.tsx +21 -11
- package/src/SnackbarContent/StatusIcon.tsx +0 -2
- package/src/SnackbarContent/index.ts +2 -2
- package/src/SvgIcon/index.ts +2 -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 +2 -2
- package/src/TextField/TextField.tsx +0 -1
- package/src/TextField/index.tsx +2 -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 +1 -1
- package/src/Tooltip/Tooltip.tsx +6 -1
- package/src/Tooltip/index.ts +2 -2
- package/src/Typography/index.ts +2 -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/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/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/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/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,182 +0,0 @@
|
|
|
1
|
-
import React, { cloneElement, forwardRef, useEffect, useImperativeHandle, useMemo, useRef } from 'react';
|
|
2
|
-
import { View } from 'react-native';
|
|
3
|
-
import { css, useTheme } from '../styles';
|
|
4
|
-
import { useSyncAnimatedValue } from '../hooks';
|
|
5
|
-
import TabIndicator from './LegacyTabIndicator';
|
|
6
|
-
import ScrollableTabsView from './ScrollableTabsView';
|
|
7
|
-
import IndexAwareTab from './IndexAwareTab';
|
|
8
|
-
import useTabCoordinates from './useTabCoordinates';
|
|
9
|
-
import useTabInnerContentsWidth from './useTabInnerContentsWidth';
|
|
10
|
-
import useIndexStore from './useIndexStore';
|
|
11
|
-
import InternalContext from './InternalContext';
|
|
12
|
-
import { isEveryTabCoordinatesDefined } from './utils';
|
|
13
|
-
|
|
14
|
-
const useStyles = function () {
|
|
15
|
-
const theme = useTheme();
|
|
16
|
-
return {
|
|
17
|
-
root: {},
|
|
18
|
-
fixedRoot: {
|
|
19
|
-
flexDirection: 'row'
|
|
20
|
-
},
|
|
21
|
-
fixedTab: {
|
|
22
|
-
flex: 1
|
|
23
|
-
},
|
|
24
|
-
scrollableContainer: {
|
|
25
|
-
paddingHorizontal: theme.spacing(1)
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
const Tabs = /*#__PURE__*/forwardRef(function Tabs(props, ref) {
|
|
31
|
-
var _React$Children$map;
|
|
32
|
-
|
|
33
|
-
const {
|
|
34
|
-
children,
|
|
35
|
-
indicatorColor = 'primary',
|
|
36
|
-
initialIndex = 0,
|
|
37
|
-
disableIndicator = false,
|
|
38
|
-
indicatorAnimationDisabled = false,
|
|
39
|
-
indicatorSize = 'full',
|
|
40
|
-
keyboardDismissMode = 'none',
|
|
41
|
-
keyboardShouldPersistTaps = 'never',
|
|
42
|
-
onChange,
|
|
43
|
-
scrollable = false,
|
|
44
|
-
scrollViewContentContainerStyle,
|
|
45
|
-
style,
|
|
46
|
-
variant = 'primary',
|
|
47
|
-
UNSTABLE_sharedIndex,
|
|
48
|
-
onTabSelected
|
|
49
|
-
} = props;
|
|
50
|
-
const fallbackSharedIndex = useSyncAnimatedValue({
|
|
51
|
-
initialValue: initialIndex
|
|
52
|
-
});
|
|
53
|
-
const sharedIndex = UNSTABLE_sharedIndex ?? fallbackSharedIndex;
|
|
54
|
-
const realInitialIndex = sharedIndex.initialValue;
|
|
55
|
-
const currentIndexRef = useRef(initialIndex);
|
|
56
|
-
|
|
57
|
-
const setTab = newIndex => {
|
|
58
|
-
const currentIndex = currentIndexRef.current;
|
|
59
|
-
onTabSelected === null || onTabSelected === void 0 ? void 0 : onTabSelected(newIndex, currentIndex);
|
|
60
|
-
sharedIndex.animatedValue.setValue(newIndex);
|
|
61
|
-
};
|
|
62
|
-
|
|
63
|
-
useImperativeHandle(ref, () => ({
|
|
64
|
-
setTab
|
|
65
|
-
}), [sharedIndex]);
|
|
66
|
-
const styles = useStyles();
|
|
67
|
-
const [outerCoordinates, updateCoordinate] = useTabCoordinates(children);
|
|
68
|
-
const [innerContentsWidthList, updateInnerContentsWidth] = useTabInnerContentsWidth(children);
|
|
69
|
-
const canRenderIndicator = indicatorSize === 'fit-content' ? isEveryTabCoordinatesDefined(innerContentsWidthList, children) : isEveryTabCoordinatesDefined(outerCoordinates, children);
|
|
70
|
-
const indexStore = useIndexStore(sharedIndex);
|
|
71
|
-
const coordinates = useMemo(() => {
|
|
72
|
-
if (indicatorSize !== 'fit-content') {
|
|
73
|
-
return outerCoordinates;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
return innerContentsWidthList.map((innerContentWidth, idx) => {
|
|
77
|
-
const {
|
|
78
|
-
x1: outerX1,
|
|
79
|
-
x2: outerX2
|
|
80
|
-
} = outerCoordinates[idx];
|
|
81
|
-
const tabWidth = outerX2 - outerX1;
|
|
82
|
-
const distanceFromParent = (tabWidth - innerContentWidth) / 2;
|
|
83
|
-
const indicatorStartCoordinate = outerX1 + distanceFromParent;
|
|
84
|
-
return {
|
|
85
|
-
x1: indicatorStartCoordinate,
|
|
86
|
-
x2: indicatorStartCoordinate + innerContentWidth
|
|
87
|
-
};
|
|
88
|
-
});
|
|
89
|
-
}, [outerCoordinates, innerContentsWidthList, variant]);
|
|
90
|
-
useEffect(() => {
|
|
91
|
-
return indexStore.subscribe(newIndex => {
|
|
92
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(newIndex);
|
|
93
|
-
currentIndexRef.current = newIndex;
|
|
94
|
-
});
|
|
95
|
-
}, [indexStore, onChange]);
|
|
96
|
-
const tabElements = (_React$Children$map = React.Children.map(children, (child, index) => {
|
|
97
|
-
if (!child) {
|
|
98
|
-
return null;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
const onTabInnerLayout = event => {
|
|
102
|
-
const {
|
|
103
|
-
width
|
|
104
|
-
} = event.nativeEvent.layout;
|
|
105
|
-
updateInnerContentsWidth(index, width);
|
|
106
|
-
};
|
|
107
|
-
|
|
108
|
-
const onLayout = event => {
|
|
109
|
-
var _child$props$onLayout, _child$props;
|
|
110
|
-
|
|
111
|
-
const {
|
|
112
|
-
x,
|
|
113
|
-
width
|
|
114
|
-
} = event.nativeEvent.layout;
|
|
115
|
-
updateCoordinate(index, x, width); // @ts-ignore
|
|
116
|
-
|
|
117
|
-
(_child$props$onLayout = (_child$props = child.props).onLayout) === null || _child$props$onLayout === void 0 ? void 0 : _child$props$onLayout.call(_child$props, event);
|
|
118
|
-
};
|
|
119
|
-
|
|
120
|
-
const onMouseDown = e => {
|
|
121
|
-
if (keyboardShouldPersistTaps === 'always') {
|
|
122
|
-
e.preventDefault();
|
|
123
|
-
}
|
|
124
|
-
};
|
|
125
|
-
|
|
126
|
-
const onPress = () => {
|
|
127
|
-
var _child$props$onPress, _child$props2;
|
|
128
|
-
|
|
129
|
-
setTab(index); // @ts-ignore
|
|
130
|
-
|
|
131
|
-
(_child$props$onPress = (_child$props2 = child.props).onPress) === null || _child$props$onPress === void 0 ? void 0 : _child$props$onPress.call(_child$props2);
|
|
132
|
-
}; // @ts-ignore
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
const tabElement = /*#__PURE__*/cloneElement(child, {
|
|
136
|
-
enableIndicator: !disableIndicator && !canRenderIndicator,
|
|
137
|
-
indicatorColor,
|
|
138
|
-
onTabInnerLayout,
|
|
139
|
-
onLayout,
|
|
140
|
-
onPress,
|
|
141
|
-
onMouseDown,
|
|
142
|
-
variant,
|
|
143
|
-
indicatorSize,
|
|
144
|
-
style: scrollable ? undefined : styles.fixedTab
|
|
145
|
-
});
|
|
146
|
-
return /*#__PURE__*/React.createElement(IndexAwareTab, {
|
|
147
|
-
children: tabElement,
|
|
148
|
-
index: index,
|
|
149
|
-
initialIndex: realInitialIndex
|
|
150
|
-
});
|
|
151
|
-
})) === null || _React$Children$map === void 0 ? void 0 : _React$Children$map.filter(Boolean);
|
|
152
|
-
const tabIndicator = canRenderIndicator ? /*#__PURE__*/React.createElement(TabIndicator, {
|
|
153
|
-
animationDisabled: indicatorAnimationDisabled,
|
|
154
|
-
color: indicatorColor,
|
|
155
|
-
coordinates: coordinates,
|
|
156
|
-
disabled: disableIndicator,
|
|
157
|
-
initialIndex: realInitialIndex,
|
|
158
|
-
scrollable: scrollable
|
|
159
|
-
}) : null;
|
|
160
|
-
return /*#__PURE__*/React.createElement(InternalContext.Provider, {
|
|
161
|
-
value: {
|
|
162
|
-
indexStore
|
|
163
|
-
}
|
|
164
|
-
}, /*#__PURE__*/React.createElement(View, {
|
|
165
|
-
style: css([styles.root, scrollable ? undefined : styles.fixedRoot, style])
|
|
166
|
-
}, scrollable ? /*#__PURE__*/React.createElement(ScrollableTabsView, {
|
|
167
|
-
automaticallyAdjustContentInsets: false,
|
|
168
|
-
bounces: false,
|
|
169
|
-
contentContainerStyle: css([styles.scrollableContainer, scrollViewContentContainerStyle]),
|
|
170
|
-
coordinates: coordinates,
|
|
171
|
-
directionalLockEnabled: true,
|
|
172
|
-
horizontal: true,
|
|
173
|
-
initialIndex: realInitialIndex,
|
|
174
|
-
scrollsToTop: false,
|
|
175
|
-
showsHorizontalScrollIndicator: false,
|
|
176
|
-
showsVerticalScrollIndicator: false,
|
|
177
|
-
keyboardDismissMode: keyboardDismissMode,
|
|
178
|
-
keyboardShouldPersistTaps: keyboardShouldPersistTaps
|
|
179
|
-
}, tabElements, tabIndicator) : /*#__PURE__*/React.createElement(React.Fragment, null, tabElements, tabIndicator)));
|
|
180
|
-
});
|
|
181
|
-
export default Tabs;
|
|
182
|
-
//# sourceMappingURL=LegacyTabs.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["React","cloneElement","forwardRef","useEffect","useImperativeHandle","useMemo","useRef","View","css","useTheme","useSyncAnimatedValue","TabIndicator","ScrollableTabsView","IndexAwareTab","useTabCoordinates","useTabInnerContentsWidth","useIndexStore","InternalContext","isEveryTabCoordinatesDefined","useStyles","theme","root","fixedRoot","flexDirection","fixedTab","flex","scrollableContainer","paddingHorizontal","spacing","Tabs","props","ref","children","indicatorColor","initialIndex","disableIndicator","indicatorAnimationDisabled","indicatorSize","keyboardDismissMode","keyboardShouldPersistTaps","onChange","scrollable","scrollViewContentContainerStyle","style","variant","UNSTABLE_sharedIndex","onTabSelected","fallbackSharedIndex","initialValue","sharedIndex","realInitialIndex","currentIndexRef","setTab","newIndex","currentIndex","current","animatedValue","setValue","styles","outerCoordinates","updateCoordinate","innerContentsWidthList","updateInnerContentsWidth","canRenderIndicator","indexStore","coordinates","map","innerContentWidth","idx","x1","outerX1","x2","outerX2","tabWidth","distanceFromParent","indicatorStartCoordinate","subscribe","tabElements","Children","child","index","onTabInnerLayout","event","width","nativeEvent","layout","onLayout","x","onMouseDown","e","preventDefault","onPress","tabElement","enableIndicator","undefined","filter","Boolean","tabIndicator"],"sources":["LegacyTabs.tsx"],"sourcesContent":["import React, { cloneElement, forwardRef, useEffect, useImperativeHandle, useMemo, useRef } from 'react';\nimport type { GestureResponderEvent, LayoutChangeEvent } from 'react-native';\nimport { View } from 'react-native';\nimport { NamedStylesStringUnion, UseStyles } from '@fountain-ui/styles';\nimport { css, useTheme } from '../styles';\nimport { useSyncAnimatedValue } from '../hooks';\nimport type TabsProps from './LegacyTabsProps';\nimport type { TabsInstance } from './types';\nimport TabIndicator from './LegacyTabIndicator';\nimport ScrollableTabsView from './ScrollableTabsView';\nimport IndexAwareTab from './IndexAwareTab';\nimport useTabCoordinates from './useTabCoordinates';\nimport useTabInnerContentsWidth from './useTabInnerContentsWidth';\nimport useIndexStore from './useIndexStore';\nimport InternalContext from './InternalContext';\nimport { isEveryTabCoordinatesDefined } from './utils';\n\ntype TabsStyleKeys =\n | 'root'\n | 'fixedRoot'\n | 'fixedTab'\n | 'scrollableContainer';\n\ntype TabsStyles = NamedStylesStringUnion<TabsStyleKeys>;\n\nconst useStyles: UseStyles<TabsStyles> = function (): TabsStyles {\n const theme = useTheme();\n\n return {\n root: {},\n fixedRoot: {\n flexDirection: 'row',\n },\n fixedTab: {\n flex: 1,\n },\n scrollableContainer: {\n paddingHorizontal: theme.spacing(1),\n },\n };\n};\n\nconst Tabs = forwardRef<TabsInstance, TabsProps>(function Tabs(props, ref) {\n const {\n children,\n indicatorColor = 'primary',\n initialIndex = 0,\n disableIndicator = false,\n indicatorAnimationDisabled = false,\n indicatorSize = 'full',\n keyboardDismissMode = 'none',\n keyboardShouldPersistTaps = 'never',\n onChange,\n scrollable = false,\n scrollViewContentContainerStyle,\n style,\n variant = 'primary',\n UNSTABLE_sharedIndex,\n onTabSelected,\n } = props;\n\n const fallbackSharedIndex = useSyncAnimatedValue({ initialValue: initialIndex });\n const sharedIndex = UNSTABLE_sharedIndex ?? fallbackSharedIndex;\n const realInitialIndex = sharedIndex.initialValue;\n\n const currentIndexRef = useRef(initialIndex);\n\n const setTab = (newIndex: number) => {\n const currentIndex = currentIndexRef.current;\n onTabSelected?.(newIndex, currentIndex);\n\n sharedIndex.animatedValue.setValue(newIndex);\n };\n\n useImperativeHandle(\n ref,\n () => ({\n setTab,\n }),\n [sharedIndex],\n );\n\n const styles = useStyles();\n\n const [outerCoordinates, updateCoordinate] = useTabCoordinates(children);\n const [innerContentsWidthList, updateInnerContentsWidth] = useTabInnerContentsWidth(children);\n\n const canRenderIndicator = indicatorSize === 'fit-content'\n ? isEveryTabCoordinatesDefined(innerContentsWidthList, children)\n : isEveryTabCoordinatesDefined(outerCoordinates, children);\n\n const indexStore = useIndexStore(sharedIndex);\n\n const coordinates = useMemo(() => {\n if (indicatorSize !== 'fit-content') {\n return outerCoordinates;\n }\n\n return innerContentsWidthList.map((innerContentWidth, idx) => {\n const { x1: outerX1, x2: outerX2 } = outerCoordinates[idx];\n\n const tabWidth = outerX2 - outerX1;\n const distanceFromParent = (tabWidth - innerContentWidth) / 2;\n const indicatorStartCoordinate = outerX1 + distanceFromParent;\n\n return {\n x1: indicatorStartCoordinate,\n x2: indicatorStartCoordinate + innerContentWidth,\n };\n });\n }, [outerCoordinates, innerContentsWidthList, variant]);\n\n useEffect(() => {\n return indexStore.subscribe(newIndex => {\n onChange?.(newIndex);\n currentIndexRef.current = newIndex;\n });\n }, [indexStore, onChange]);\n\n const tabElements = React.Children.map(children, (child, index) => {\n if (!child) {\n return null;\n }\n\n const onTabInnerLayout = (event: LayoutChangeEvent) => {\n const { width } = event.nativeEvent.layout;\n\n updateInnerContentsWidth(index, width);\n };\n\n const onLayout = (event: LayoutChangeEvent) => {\n const { x, width } = event.nativeEvent.layout;\n\n updateCoordinate(index, x, width);\n\n // @ts-ignore\n child.props.onLayout?.(event);\n };\n\n const onMouseDown = (e: GestureResponderEvent) => {\n if (keyboardShouldPersistTaps === 'always') {\n e.preventDefault();\n }\n };\n\n const onPress = () => {\n setTab(index);\n\n // @ts-ignore\n child.props.onPress?.();\n };\n\n // @ts-ignore\n const tabElement = cloneElement(child, {\n enableIndicator: !disableIndicator && !canRenderIndicator,\n indicatorColor,\n onTabInnerLayout,\n onLayout,\n onPress,\n onMouseDown,\n variant,\n indicatorSize,\n style: scrollable ? undefined : styles.fixedTab,\n });\n\n return (\n <IndexAwareTab\n children={tabElement}\n index={index}\n initialIndex={realInitialIndex}\n />\n );\n })?.filter(Boolean);\n\n const tabIndicator = canRenderIndicator ? (\n <TabIndicator\n animationDisabled={indicatorAnimationDisabled}\n color={indicatorColor}\n coordinates={coordinates}\n disabled={disableIndicator}\n initialIndex={realInitialIndex}\n scrollable={scrollable}\n />\n ) : null;\n\n return (\n <InternalContext.Provider value={{ indexStore }}>\n <View\n style={css([\n styles.root,\n scrollable ? undefined : styles.fixedRoot,\n style,\n ])}\n >\n {scrollable ? (\n <ScrollableTabsView\n automaticallyAdjustContentInsets={false}\n bounces={false}\n contentContainerStyle={css([\n styles.scrollableContainer,\n scrollViewContentContainerStyle,\n ])}\n coordinates={coordinates}\n directionalLockEnabled={true}\n horizontal={true}\n initialIndex={realInitialIndex}\n scrollsToTop={false}\n showsHorizontalScrollIndicator={false}\n showsVerticalScrollIndicator={false}\n keyboardDismissMode={keyboardDismissMode}\n keyboardShouldPersistTaps={keyboardShouldPersistTaps}\n >\n {tabElements}\n {tabIndicator}\n </ScrollableTabsView>\n ) : (\n <React.Fragment>\n {tabElements}\n {tabIndicator}\n </React.Fragment>\n )}\n </View>\n </InternalContext.Provider>\n );\n});\n\nexport default Tabs;\n"],"mappings":"AAAA,OAAOA,KAAP,IAAgBC,YAAhB,EAA8BC,UAA9B,EAA0CC,SAA1C,EAAqDC,mBAArD,EAA0EC,OAA1E,EAAmFC,MAAnF,QAAiG,OAAjG;AAEA,SAASC,IAAT,QAAqB,cAArB;AAEA,SAASC,GAAT,EAAcC,QAAd,QAA8B,WAA9B;AACA,SAASC,oBAAT,QAAqC,UAArC;AAGA,OAAOC,YAAP,MAAyB,sBAAzB;AACA,OAAOC,kBAAP,MAA+B,sBAA/B;AACA,OAAOC,aAAP,MAA0B,iBAA1B;AACA,OAAOC,iBAAP,MAA8B,qBAA9B;AACA,OAAOC,wBAAP,MAAqC,4BAArC;AACA,OAAOC,aAAP,MAA0B,iBAA1B;AACA,OAAOC,eAAP,MAA4B,mBAA5B;AACA,SAASC,4BAAT,QAA6C,SAA7C;;AAUA,MAAMC,SAAgC,GAAG,YAAwB;EAC7D,MAAMC,KAAK,GAAGX,QAAQ,EAAtB;EAEA,OAAO;IACHY,IAAI,EAAE,EADH;IAEHC,SAAS,EAAE;MACPC,aAAa,EAAE;IADR,CAFR;IAKHC,QAAQ,EAAE;MACNC,IAAI,EAAE;IADA,CALP;IAQHC,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AAf"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["LegacyTabsProps.ts"],"sourcesContent":["import type { ReactNode, Ref } from 'react';\nimport type { ViewProps } from 'react-native';\nimport type { TabVariant, TabIndicatorSize } from '../Tab';\nimport type { ExtendedStyle, OverridableComponentProps, SyncAnimatedValue } from '../types';\nimport type { TabIndicatorColor } from './LegacyTabIndicatorProps';\nimport type { KeyboardDismissMode, KeyboardShouldPersistTaps, TabsInstance } from './types';\n\nexport default interface TabsProps extends OverridableComponentProps<ViewProps, {\n ref?: Ref<TabsInstance>;\n\n /**\n * Collection of Tab components.\n */\n children: ReactNode;\n\n /**\n * If `true`, the indicator is disabled.\n * @default false\n */\n disableIndicator?: boolean;\n\n /**\n * The color of tab indicator\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 `true`, tab indicator selection animation disabled.\n * @default 'false'\n */\n indicatorAnimationDisabled?: boolean;\n\n /**\n * Index of initial tab that should be selected.\n * @default 0\n */\n initialIndex?: number;\n\n /**\n * keyboard dismissing condition of dragging.\n * @default 'none'\n */\n keyboardDismissMode?: KeyboardDismissMode,\n\n /**\n * keyboard persisting condition of tapping.\n * @default 'never'\n */\n keyboardShouldPersistTaps?: KeyboardShouldPersistTaps,\n\n /**\n * Callback fired when a tab is selected.\n */\n onChange?: (newIndex: number) => void;\n\n /**\n * If `true`, the component will be able to scroll.\n * @default false\n */\n scrollable?: boolean;\n\n /**\n * These styles will be applied to the scroll view content container which wraps all of the child views.\n */\n scrollViewContentContainerStyle?: ExtendedStyle | ExtendedStyle[];\n\n /**\n * Unstable API.\n */\n UNSTABLE_sharedIndex?: SyncAnimatedValue;\n\n /**\n * The variant to use.\n * @default 'primary'\n */\n variant?: TabVariant;\n\n /**\n * Callback function executed when a Tab is selected.\n * Executed even if the index does not change when a Tab is pressed.\n * Receives the next tab index and the current tab index as parameters.\n */\n onTabSelected?: (newIndex: number, currentIndex: number) => void;\n}> {}\n"],"mappings":""}
|
|
@@ -1,169 +0,0 @@
|
|
|
1
|
-
import React, { useImperativeHandle, useRef } from 'react';
|
|
2
|
-
import { Animated } from 'react-native';
|
|
3
|
-
import { css } from '../styles';
|
|
4
|
-
import { useAnimatedValue } from '../hooks';
|
|
5
|
-
import OutlinedTextField from './OutlinedTextField';
|
|
6
|
-
import { blurAnimationDuration, focusAnimationDuration } from './utils';
|
|
7
|
-
const TextField = /*#__PURE__*/React.forwardRef(function TextField(props, ref) {
|
|
8
|
-
const {
|
|
9
|
-
disabled = false,
|
|
10
|
-
error = false,
|
|
11
|
-
keyboardType = 'default',
|
|
12
|
-
icon,
|
|
13
|
-
label,
|
|
14
|
-
onBlur,
|
|
15
|
-
onChangeText,
|
|
16
|
-
onFocus,
|
|
17
|
-
onIconPress,
|
|
18
|
-
onSubmitEditing,
|
|
19
|
-
placeholder: placeholderProp,
|
|
20
|
-
secureTextEntry = false,
|
|
21
|
-
value,
|
|
22
|
-
style: styleProp
|
|
23
|
-
} = props;
|
|
24
|
-
const innerRef = useRef(null); //@ts-ignore
|
|
25
|
-
|
|
26
|
-
useImperativeHandle(ref, () => ({
|
|
27
|
-
focus: () => {
|
|
28
|
-
var _innerRef$current;
|
|
29
|
-
|
|
30
|
-
(_innerRef$current = innerRef.current) === null || _innerRef$current === void 0 ? void 0 : _innerRef$current.focus();
|
|
31
|
-
},
|
|
32
|
-
isFocused: () => {
|
|
33
|
-
const current = innerRef.current;
|
|
34
|
-
return current ? current.isFocused() : false;
|
|
35
|
-
},
|
|
36
|
-
clear: () => {
|
|
37
|
-
var _innerRef$current2;
|
|
38
|
-
|
|
39
|
-
(_innerRef$current2 = innerRef.current) === null || _innerRef$current2 === void 0 ? void 0 : _innerRef$current2.clear();
|
|
40
|
-
},
|
|
41
|
-
blur: () => {
|
|
42
|
-
var _innerRef$current3;
|
|
43
|
-
|
|
44
|
-
(_innerRef$current3 = innerRef.current) === null || _innerRef$current3 === void 0 ? void 0 : _innerRef$current3.blur();
|
|
45
|
-
},
|
|
46
|
-
setStyle: style => {
|
|
47
|
-
var _innerRef$current4;
|
|
48
|
-
|
|
49
|
-
(_innerRef$current4 = innerRef.current) === null || _innerRef$current4 === void 0 ? void 0 : _innerRef$current4.setNativeProps({
|
|
50
|
-
style
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
|
-
}));
|
|
54
|
-
const animatedLabel = useAnimatedValue(value ? 0 : 1);
|
|
55
|
-
const animatedError = useAnimatedValue(error ? 1 : 0);
|
|
56
|
-
const [focused, setFocused] = React.useState(false);
|
|
57
|
-
const [placeholder, setPlaceholder] = React.useState('');
|
|
58
|
-
const [labelLayout, setLabelLayout] = React.useState({
|
|
59
|
-
measured: false,
|
|
60
|
-
width: 0,
|
|
61
|
-
height: 0
|
|
62
|
-
});
|
|
63
|
-
|
|
64
|
-
const minimizeLabel = () => {
|
|
65
|
-
Animated.timing(animatedLabel, {
|
|
66
|
-
toValue: 0,
|
|
67
|
-
duration: blurAnimationDuration,
|
|
68
|
-
useNativeDriver: false
|
|
69
|
-
}).start();
|
|
70
|
-
};
|
|
71
|
-
|
|
72
|
-
const restoreLabel = () => {
|
|
73
|
-
Animated.timing(animatedLabel, {
|
|
74
|
-
toValue: 1,
|
|
75
|
-
duration: focusAnimationDuration,
|
|
76
|
-
useNativeDriver: false
|
|
77
|
-
}).start();
|
|
78
|
-
};
|
|
79
|
-
|
|
80
|
-
const showError = () => {
|
|
81
|
-
Animated.timing(animatedError, {
|
|
82
|
-
toValue: 1,
|
|
83
|
-
duration: focusAnimationDuration,
|
|
84
|
-
useNativeDriver: false
|
|
85
|
-
}).start();
|
|
86
|
-
};
|
|
87
|
-
|
|
88
|
-
const hideError = () => {
|
|
89
|
-
Animated.timing(animatedError, {
|
|
90
|
-
toValue: 0,
|
|
91
|
-
duration: blurAnimationDuration,
|
|
92
|
-
useNativeDriver: false
|
|
93
|
-
}).start();
|
|
94
|
-
};
|
|
95
|
-
|
|
96
|
-
const showPlaceholder = () => {
|
|
97
|
-
placeholderProp && setPlaceholder(placeholderProp);
|
|
98
|
-
};
|
|
99
|
-
|
|
100
|
-
const hidePlaceholder = () => setPlaceholder('');
|
|
101
|
-
|
|
102
|
-
React.useEffect(() => {
|
|
103
|
-
value || focused ? minimizeLabel() : restoreLabel();
|
|
104
|
-
}, [focused, value, labelLayout]);
|
|
105
|
-
React.useEffect(() => {
|
|
106
|
-
animatedError ? showError() : hideError();
|
|
107
|
-
}, [animatedError]);
|
|
108
|
-
React.useEffect(() => {
|
|
109
|
-
focused || !label ? showPlaceholder() : hidePlaceholder();
|
|
110
|
-
}, [focused, label]);
|
|
111
|
-
|
|
112
|
-
const handleFocus = event => {
|
|
113
|
-
if (disabled) {
|
|
114
|
-
return;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
setFocused(true);
|
|
118
|
-
onFocus === null || onFocus === void 0 ? void 0 : onFocus(event);
|
|
119
|
-
};
|
|
120
|
-
|
|
121
|
-
const handleBlur = event => {
|
|
122
|
-
setFocused(false);
|
|
123
|
-
onBlur === null || onBlur === void 0 ? void 0 : onBlur(event);
|
|
124
|
-
};
|
|
125
|
-
|
|
126
|
-
const style = css([{
|
|
127
|
-
opacity: disabled ? 0.3 : 1
|
|
128
|
-
}, styleProp]);
|
|
129
|
-
|
|
130
|
-
const handleLayoutAnimatedText = event => {
|
|
131
|
-
setLabelLayout({
|
|
132
|
-
width: event.nativeEvent.layout.width,
|
|
133
|
-
height: event.nativeEvent.layout.height,
|
|
134
|
-
measured: true
|
|
135
|
-
});
|
|
136
|
-
};
|
|
137
|
-
|
|
138
|
-
const forceFocus = () => {
|
|
139
|
-
var _innerRef$current5;
|
|
140
|
-
|
|
141
|
-
(_innerRef$current5 = innerRef.current) === null || _innerRef$current5 === void 0 ? void 0 : _innerRef$current5.focus();
|
|
142
|
-
};
|
|
143
|
-
|
|
144
|
-
return /*#__PURE__*/React.createElement(OutlinedTextField, {
|
|
145
|
-
animatedError: animatedError,
|
|
146
|
-
animatedLabel: animatedLabel,
|
|
147
|
-
disabled: disabled,
|
|
148
|
-
error: error,
|
|
149
|
-
focused: focused,
|
|
150
|
-
forceFocus: forceFocus,
|
|
151
|
-
icon: icon,
|
|
152
|
-
keyboardType: keyboardType,
|
|
153
|
-
label: label,
|
|
154
|
-
labelLayout: labelLayout,
|
|
155
|
-
onFocus: handleFocus,
|
|
156
|
-
onBlur: handleBlur,
|
|
157
|
-
onChangeText: onChangeText,
|
|
158
|
-
onIconPress: onIconPress,
|
|
159
|
-
onLayoutAnimatedText: handleLayoutAnimatedText,
|
|
160
|
-
onSubmitEditing: onSubmitEditing,
|
|
161
|
-
placeholder: placeholder,
|
|
162
|
-
ref: innerRef,
|
|
163
|
-
secureTextEntry: secureTextEntry,
|
|
164
|
-
style: style,
|
|
165
|
-
value: value
|
|
166
|
-
});
|
|
167
|
-
});
|
|
168
|
-
export default TextField;
|
|
169
|
-
//# sourceMappingURL=LegacyTextField.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["React","useImperativeHandle","useRef","Animated","css","useAnimatedValue","OutlinedTextField","blurAnimationDuration","focusAnimationDuration","TextField","forwardRef","props","ref","disabled","error","keyboardType","icon","label","onBlur","onChangeText","onFocus","onIconPress","onSubmitEditing","placeholder","placeholderProp","secureTextEntry","value","style","styleProp","innerRef","focus","current","isFocused","clear","blur","setStyle","setNativeProps","animatedLabel","animatedError","focused","setFocused","useState","setPlaceholder","labelLayout","setLabelLayout","measured","width","height","minimizeLabel","timing","toValue","duration","useNativeDriver","start","restoreLabel","showError","hideError","showPlaceholder","hidePlaceholder","useEffect","handleFocus","event","handleBlur","opacity","handleLayoutAnimatedText","nativeEvent","layout","forceFocus"],"sources":["LegacyTextField.tsx"],"sourcesContent":["import React, { useImperativeHandle, useRef } from 'react';\nimport { Animated, LayoutChangeEvent, NativeSyntheticEvent, TargetedEvent, TextInput } from 'react-native';\nimport { css } from '../styles';\nimport { useAnimatedValue } from '../hooks';\nimport OutlinedTextField from './OutlinedTextField';\nimport TextFieldProps, { setStyleProp } from './LegacyTextFieldProps';\nimport { blurAnimationDuration, focusAnimationDuration } from './utils';\n\nconst TextField = React.forwardRef<TextInput, TextFieldProps>(function TextField(props, ref) {\n const {\n disabled = false,\n error = false,\n keyboardType = 'default',\n icon,\n label,\n onBlur,\n onChangeText,\n onFocus,\n onIconPress,\n onSubmitEditing,\n placeholder: placeholderProp,\n secureTextEntry = false,\n value,\n style: styleProp,\n } = props;\n\n const innerRef = useRef<TextInput | null>(null);\n //@ts-ignore\n useImperativeHandle(ref, () => ({\n focus: () => {\n innerRef.current?.focus();\n },\n isFocused: () => {\n const current = innerRef.current;\n return current ? current.isFocused() : false;\n },\n clear: () => {\n innerRef.current?.clear();\n },\n blur: () => {\n innerRef.current?.blur();\n },\n setStyle: (style: setStyleProp) => {\n innerRef.current?.setNativeProps({\n style,\n });\n },\n }));\n\n const animatedLabel = useAnimatedValue(value ? 0 : 1);\n const animatedError = useAnimatedValue(error ? 1 : 0);\n const [focused, setFocused] = React.useState(false);\n const [placeholder, setPlaceholder] = React.useState('');\n const [labelLayout, setLabelLayout] = React.useState({\n measured: false,\n width: 0,\n height: 0,\n });\n\n const minimizeLabel = () => {\n Animated.timing(animatedLabel, {\n toValue: 0,\n duration: blurAnimationDuration,\n useNativeDriver: false,\n }).start();\n };\n\n const restoreLabel = () => {\n Animated.timing(animatedLabel, {\n toValue: 1,\n duration: focusAnimationDuration,\n useNativeDriver: false,\n }).start();\n };\n\n const showError = () => {\n Animated.timing(animatedError, {\n toValue: 1,\n duration: focusAnimationDuration,\n useNativeDriver: false,\n }).start();\n };\n\n const hideError = () => {\n Animated.timing(animatedError, {\n toValue: 0,\n duration: blurAnimationDuration,\n useNativeDriver: false,\n }).start();\n };\n\n const showPlaceholder = () => {\n placeholderProp && setPlaceholder(placeholderProp);\n };\n\n const hidePlaceholder = () => setPlaceholder('');\n\n React.useEffect(() => {\n value || focused ? minimizeLabel() : restoreLabel();\n }, [focused, value, labelLayout]);\n\n React.useEffect(() => {\n animatedError ? showError() : hideError();\n }, [animatedError]);\n\n React.useEffect(() => {\n focused || !label ? showPlaceholder() : hidePlaceholder();\n }, [focused, label]);\n\n const handleFocus = (event: NativeSyntheticEvent<TargetedEvent>) => {\n if (disabled) {\n return;\n }\n\n setFocused(true);\n onFocus?.(event);\n };\n\n const handleBlur = (event: NativeSyntheticEvent<TargetedEvent>) => {\n setFocused(false);\n onBlur?.(event);\n };\n\n const style = css([\n { opacity: disabled ? 0.3 : 1 },\n styleProp,\n ]);\n\n const handleLayoutAnimatedText = (event: LayoutChangeEvent) => {\n setLabelLayout({\n width: event.nativeEvent.layout.width,\n height: event.nativeEvent.layout.height,\n measured: true,\n });\n };\n\n const forceFocus = () => {\n innerRef.current?.focus();\n };\n\n return (\n <OutlinedTextField\n animatedError={animatedError}\n animatedLabel={animatedLabel}\n disabled={disabled}\n error={error}\n focused={focused}\n forceFocus={forceFocus}\n icon={icon}\n keyboardType={keyboardType}\n label={label}\n labelLayout={labelLayout}\n onFocus={handleFocus}\n onBlur={handleBlur}\n onChangeText={onChangeText}\n onIconPress={onIconPress}\n onLayoutAnimatedText={handleLayoutAnimatedText}\n onSubmitEditing={onSubmitEditing}\n placeholder={placeholder}\n ref={innerRef}\n secureTextEntry={secureTextEntry}\n style={style}\n value={value}\n />\n );\n});\n\nexport default TextField;\n"],"mappings":"AAAA,OAAOA,KAAP,IAAgBC,mBAAhB,EAAqCC,MAArC,QAAmD,OAAnD;AACA,SAASC,QAAT,QAA4F,cAA5F;AACA,SAASC,GAAT,QAAoB,WAApB;AACA,SAASC,gBAAT,QAAiC,UAAjC;AACA,OAAOC,iBAAP,MAA8B,qBAA9B;AAEA,SAASC,qBAAT,EAAgCC,sBAAhC,QAA8D,SAA9D;AAEA,MAAMC,SAAS,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AAlB,CAAyBnB,MAFtB;MAGXF,QAAQ,EAAE;IAHC,CAAD,CAAd;EAKH,CAND;;EAQA,MAAMsB,UAAU,GAAG,MAAM;IAAA;;IACrB,sBAAAtC,QAAQ,CAACE,OAAT,0EAAkBD,KAAlB;EACH,CAFD;;EAIA,oBACI,oBAAC,iBAAD;IACI,aAAa,EAAEQ,aADnB;IAEI,aAAa,EAAED,aAFnB;IAGI,QAAQ,EAAExB,QAHd;IAII,KAAK,EAAEC,KAJX;IAKI,OAAO,EAAEyB,OALb;IAMI,UAAU,EAAE4B,UANhB;IAOI,IAAI,EAAEnD,IAPV;IAQI,YAAY,EAAED,YARlB;IASI,KAAK,EAAEE,KATX;IAUI,WAAW,EAAE0B,WAVjB;IAWI,OAAO,EAAEiB,WAXb;IAYI,MAAM,EAAEE,UAZZ;IAaI,YAAY,EAAE3C,YAblB;IAcI,WAAW,EAAEE,WAdjB;IAeI,oBAAoB,EAAE2C,wBAf1B;IAgBI,eAAe,EAAE1C,eAhBrB;IAiBI,WAAW,EAAEC,WAjBjB;IAkBI,GAAG,EAAEM,QAlBT;IAmBI,eAAe,EAAEJ,eAnBrB;IAoBI,KAAK,EAAEE,KApBX;IAqBI,KAAK,EAAED;EArBX,EADJ;AAyBH,CA7JiB,CAAlB;AA+JA,eAAejB,SAAf"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["LegacyTextFieldProps.ts"],"sourcesContent":["import React from 'react';\nimport { NativeSyntheticEvent, TargetedEvent } from 'react-native';\nimport { ComponentProps } from '../types';\n\ntype TextFieldKeyboardType = 'default' | 'numeric' | 'email-address';\n\nexport interface setStyleProp {\n fontFamily: string;\n}\n\nexport default interface TextFieldProps extends ComponentProps<{\n /**\n * If true, user won't be able to interact with the component.\n * @default false\n */\n disabled?: boolean;\n\n /**\n * Whether to style the TextField with error style.\n * @default false\n */\n error?: boolean,\n\n /**\n * It is an icon placed to the right of the TextField.\n */\n icon?: React.ReactElement;\n\n /**\n * User can specify the keyboard type.\n * @default 'default'\n */\n keyboardType?: TextFieldKeyboardType;\n\n /**\n * The text to use for the floating label.\n */\n label?: string;\n\n /**\n * Callback that is called when the textField is blurred.\n */\n onBlur?: (event: NativeSyntheticEvent<TargetedEvent>) => void,\n\n /**\n * Callback that is called when the textField's text changes.\n */\n onChangeText?: (value: string) => void,\n\n /**\n * Callback that is called when the textField is focused.\n */\n onFocus?: (event: NativeSyntheticEvent<TargetedEvent>) => void,\n\n /**\n * Callback that is called when icon pressed.\n */\n onIconPress?: () => void;\n\n /**\n * Callback that is called when enter or submit key pressed.\n */\n onSubmitEditing?: () => void\n\n /**\n * Placeholder for textField.\n */\n placeholder?: string;\n\n /**\n * If true, the text input obscures the text entered so that sensitive text like passwords stay secure.\n * @default false\n */\n secureTextEntry?: boolean;\n\n /**\n * Value of the textField.\n */\n value?: string;\n}> {}\n"],"mappings":""}
|
|
@@ -1,174 +0,0 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
-
|
|
3
|
-
import React from 'react';
|
|
4
|
-
import { Platform, TextInput, View } from 'react-native';
|
|
5
|
-
import { createFontStyle, css, useTheme } from '../styles';
|
|
6
|
-
import IconButton from '../IconButton';
|
|
7
|
-
import InputLabel from './InputLabel';
|
|
8
|
-
import { defaultHeight, iconSize, inputPaddingHorizontal, labelFontSize, labelPaddingTop, labelYOffset } from './utils';
|
|
9
|
-
|
|
10
|
-
const useStyles = function () {
|
|
11
|
-
const theme = useTheme();
|
|
12
|
-
return {
|
|
13
|
-
outline: {
|
|
14
|
-
position: 'absolute',
|
|
15
|
-
left: 0,
|
|
16
|
-
right: 0,
|
|
17
|
-
bottom: 0,
|
|
18
|
-
borderRadius: theme.shape.roundness
|
|
19
|
-
},
|
|
20
|
-
input: {
|
|
21
|
-
flexGrow: 1,
|
|
22
|
-
paddingHorizontal: inputPaddingHorizontal,
|
|
23
|
-
textAlignVertical: 'center',
|
|
24
|
-
textAlign: 'left',
|
|
25
|
-
zIndex: theme.zIndex.textField
|
|
26
|
-
},
|
|
27
|
-
iconContainer: {
|
|
28
|
-
position: 'absolute',
|
|
29
|
-
width: 24,
|
|
30
|
-
height: 24,
|
|
31
|
-
justifyContent: 'center',
|
|
32
|
-
alignItems: 'center',
|
|
33
|
-
right: 12
|
|
34
|
-
}
|
|
35
|
-
};
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
const OutlinedTextField = /*#__PURE__*/React.forwardRef(function OutlinedTextField(props, ref) {
|
|
39
|
-
const {
|
|
40
|
-
animatedError,
|
|
41
|
-
animatedLabel,
|
|
42
|
-
disabled,
|
|
43
|
-
error,
|
|
44
|
-
focused,
|
|
45
|
-
forceFocus,
|
|
46
|
-
icon,
|
|
47
|
-
keyboardType,
|
|
48
|
-
label,
|
|
49
|
-
labelLayout,
|
|
50
|
-
onBlur,
|
|
51
|
-
onChangeText,
|
|
52
|
-
onFocus,
|
|
53
|
-
onIconPress,
|
|
54
|
-
onLayoutAnimatedText,
|
|
55
|
-
onSubmitEditing,
|
|
56
|
-
placeholder,
|
|
57
|
-
secureTextEntry,
|
|
58
|
-
style,
|
|
59
|
-
value
|
|
60
|
-
} = props;
|
|
61
|
-
const theme = useTheme();
|
|
62
|
-
const styles = useStyles();
|
|
63
|
-
const hasActiveOutline = focused || error;
|
|
64
|
-
const inputTextColor = disabled ? theme.palette.tertiary.main : theme.palette.primary.main;
|
|
65
|
-
const activeColor = error ? theme.palette.warning.main : disabled ? theme.palette.tertiary.main : theme.palette.accent.main;
|
|
66
|
-
const placeholderColor = disabled ? theme.palette.tertiary.main : theme.palette.text.hint;
|
|
67
|
-
const outlineColor = theme.palette.border.default;
|
|
68
|
-
const errorColor = disabled ? theme.palette.tertiary.main : theme.palette.warning.main;
|
|
69
|
-
const typography = theme.typography.body2;
|
|
70
|
-
const fontSize = typography.fontSize.unitless;
|
|
71
|
-
const labelScale = labelFontSize / fontSize;
|
|
72
|
-
const labelWidth = labelLayout.width;
|
|
73
|
-
const labelHeight = labelLayout.height;
|
|
74
|
-
const labelHalfWidth = labelWidth / 2;
|
|
75
|
-
const labelHalfHeight = labelHeight / 2;
|
|
76
|
-
const labelTranslateX = -1 * (labelHalfWidth - labelScale * labelWidth / 2 - (fontSize - labelFontSize) * labelScale);
|
|
77
|
-
const minInputHeight = defaultHeight - labelPaddingTop;
|
|
78
|
-
const inputHeight = labelHeight < minInputHeight ? minInputHeight : labelHeight;
|
|
79
|
-
const topPosition = Math.floor(((inputHeight > 0 ? inputHeight : 0) - labelHeight) / 2 + labelPaddingTop);
|
|
80
|
-
const iconTopPosition = (defaultHeight - (label ? 0 : labelPaddingTop) - iconSize - (label ? labelYOffset : 0)) / 2;
|
|
81
|
-
const labelTranslateY = -labelHalfHeight - (topPosition + labelYOffset);
|
|
82
|
-
const placeholderOpacity = hasActiveOutline ? animatedLabel.interpolate({
|
|
83
|
-
inputRange: [0, 1],
|
|
84
|
-
outputRange: [hasActiveOutline ? 0 : 1, 1]
|
|
85
|
-
}) : labelLayout.measured ? 1 : 0;
|
|
86
|
-
const labelProps = {
|
|
87
|
-
activeColor,
|
|
88
|
-
error,
|
|
89
|
-
errorColor,
|
|
90
|
-
fontSize,
|
|
91
|
-
hasActiveOutline,
|
|
92
|
-
label,
|
|
93
|
-
labelScale,
|
|
94
|
-
labelTranslateX,
|
|
95
|
-
labelTranslateY,
|
|
96
|
-
onLayoutAnimatedText,
|
|
97
|
-
placeholderColor,
|
|
98
|
-
placeholderOpacity,
|
|
99
|
-
topPosition
|
|
100
|
-
};
|
|
101
|
-
const inputTextFontStyle = createFontStyle(theme, {
|
|
102
|
-
selector: typo => typo.caption2,
|
|
103
|
-
color: inputTextColor
|
|
104
|
-
});
|
|
105
|
-
const outlineStyle = css([styles.outline, {
|
|
106
|
-
borderWidth: hasActiveOutline ? 2 : 1,
|
|
107
|
-
borderColor: error ? errorColor : hasActiveOutline ? activeColor : outlineColor,
|
|
108
|
-
top: label ? 6 : 0
|
|
109
|
-
}]);
|
|
110
|
-
const textInputStyle = css([inputTextFontStyle, styles.input, {
|
|
111
|
-
fontSize,
|
|
112
|
-
color: inputTextColor,
|
|
113
|
-
height: inputHeight
|
|
114
|
-
}, icon && {
|
|
115
|
-
marginRight: iconSize + 20,
|
|
116
|
-
paddingRight: 0
|
|
117
|
-
}, Platform.OS === 'web' && {
|
|
118
|
-
//@ts-ignore
|
|
119
|
-
outlineWidth: 0
|
|
120
|
-
}]);
|
|
121
|
-
const containerStyle = css([{
|
|
122
|
-
paddingTop: label ? labelPaddingTop : 0,
|
|
123
|
-
minHeight: label ? defaultHeight : defaultHeight + labelYOffset
|
|
124
|
-
}]);
|
|
125
|
-
const iconContainerStyle = css([styles.iconContainer, {
|
|
126
|
-
top: iconTopPosition
|
|
127
|
-
}]);
|
|
128
|
-
|
|
129
|
-
const onIconButtonPress = () => {
|
|
130
|
-
forceFocus();
|
|
131
|
-
onIconPress === null || onIconPress === void 0 ? void 0 : onIconPress();
|
|
132
|
-
};
|
|
133
|
-
|
|
134
|
-
return /*#__PURE__*/React.createElement(View, {
|
|
135
|
-
style: style
|
|
136
|
-
}, /*#__PURE__*/React.createElement(View, {
|
|
137
|
-
pointerEvents: 'none',
|
|
138
|
-
style: outlineStyle
|
|
139
|
-
}), /*#__PURE__*/React.createElement(View, {
|
|
140
|
-
style: containerStyle
|
|
141
|
-
}, label ? /*#__PURE__*/React.createElement(InputLabel, _extends({
|
|
142
|
-
animatedLabel: animatedLabel,
|
|
143
|
-
animatedError: animatedError,
|
|
144
|
-
focused: focused,
|
|
145
|
-
labelLayout: labelLayout,
|
|
146
|
-
placeholder: placeholder,
|
|
147
|
-
value: value
|
|
148
|
-
}, labelProps)) : null, /*#__PURE__*/React.createElement(TextInput, {
|
|
149
|
-
autoCapitalize: 'none',
|
|
150
|
-
autoCorrect: false,
|
|
151
|
-
disableFullscreenUI: true,
|
|
152
|
-
ref: ref,
|
|
153
|
-
onChangeText: onChangeText,
|
|
154
|
-
placeholder: placeholder,
|
|
155
|
-
placeholderTextColor: placeholderColor,
|
|
156
|
-
editable: !disabled,
|
|
157
|
-
selectionColor: activeColor,
|
|
158
|
-
onFocus: onFocus,
|
|
159
|
-
onBlur: onBlur,
|
|
160
|
-
onSubmitEditing: onSubmitEditing,
|
|
161
|
-
keyboardType: keyboardType,
|
|
162
|
-
secureTextEntry: secureTextEntry,
|
|
163
|
-
underlineColorAndroid: 'transparent',
|
|
164
|
-
style: textInputStyle,
|
|
165
|
-
value: value
|
|
166
|
-
})), icon ? /*#__PURE__*/React.createElement(View, {
|
|
167
|
-
style: iconContainerStyle
|
|
168
|
-
}, /*#__PURE__*/React.createElement(IconButton, {
|
|
169
|
-
children: icon,
|
|
170
|
-
onPress: onIconButtonPress
|
|
171
|
-
})) : null);
|
|
172
|
-
});
|
|
173
|
-
export default OutlinedTextField;
|
|
174
|
-
//# sourceMappingURL=OutlinedTextField.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["React","Platform","TextInput","View","createFontStyle","css","useTheme","IconButton","InputLabel","defaultHeight","iconSize","inputPaddingHorizontal","labelFontSize","labelPaddingTop","labelYOffset","useStyles","theme","outline","position","left","right","bottom","borderRadius","shape","roundness","input","flexGrow","paddingHorizontal","textAlignVertical","textAlign","zIndex","textField","iconContainer","width","height","justifyContent","alignItems","OutlinedTextField","forwardRef","props","ref","animatedError","animatedLabel","disabled","error","focused","forceFocus","icon","keyboardType","label","labelLayout","onBlur","onChangeText","onFocus","onIconPress","onLayoutAnimatedText","onSubmitEditing","placeholder","secureTextEntry","style","value","styles","hasActiveOutline","inputTextColor","palette","tertiary","main","primary","activeColor","warning","accent","placeholderColor","text","hint","outlineColor","border","default","errorColor","typography","body2","fontSize","unitless","labelScale","labelWidth","labelHeight","labelHalfWidth","labelHalfHeight","labelTranslateX","minInputHeight","inputHeight","topPosition","Math","floor","iconTopPosition","labelTranslateY","placeholderOpacity","interpolate","inputRange","outputRange","measured","labelProps","inputTextFontStyle","selector","typo","caption2","color","outlineStyle","borderWidth","borderColor","top","textInputStyle","marginRight","paddingRight","OS","outlineWidth","containerStyle","paddingTop","minHeight","iconContainerStyle","onIconButtonPress"],"sources":["OutlinedTextField.tsx"],"sourcesContent":["import React from 'react';\nimport { Animated, LayoutChangeEvent, Platform, TextInput, View } from 'react-native';\nimport { NamedStylesStringUnion, UseStyles } from '@fountain-ui/styles';\nimport { createFontStyle, css, useTheme } from '../styles';\nimport IconButton from '../IconButton';\nimport TextFieldProps from './LegacyTextFieldProps';\nimport InputLabel from './InputLabel';\nimport {\n defaultHeight,\n iconSize,\n inputPaddingHorizontal,\n labelFontSize,\n labelPaddingTop,\n labelYOffset,\n} from './utils';\n\ninterface OutlinedTextFieldProps extends TextFieldProps {\n animatedError: Animated.Value;\n animatedLabel: Animated.Value;\n focused: boolean;\n forceFocus: () => void;\n labelLayout: { measured: boolean; width: number; height: number };\n onLayoutAnimatedText: (event: LayoutChangeEvent) => void;\n}\n\ntype OutlinedTextFieldStyles = NamedStylesStringUnion<'outline' | 'input' | 'iconContainer'>;\n\nconst useStyles: UseStyles<OutlinedTextFieldStyles> = function (): OutlinedTextFieldStyles {\n const theme = useTheme();\n\n return {\n outline: {\n position: 'absolute',\n left: 0,\n right: 0,\n bottom: 0,\n borderRadius: theme.shape.roundness,\n },\n input: {\n flexGrow: 1,\n paddingHorizontal: inputPaddingHorizontal,\n textAlignVertical: 'center',\n textAlign: 'left',\n zIndex: theme.zIndex.textField,\n },\n iconContainer: {\n position: 'absolute',\n width: 24,\n height: 24,\n justifyContent: 'center',\n alignItems: 'center',\n right: 12,\n },\n };\n};\n\nconst OutlinedTextField = React.forwardRef<TextInput, OutlinedTextFieldProps>(function OutlinedTextField(props, ref) {\n const {\n animatedError,\n animatedLabel,\n disabled,\n error,\n focused,\n forceFocus,\n icon,\n keyboardType,\n label,\n labelLayout,\n onBlur,\n onChangeText,\n onFocus,\n onIconPress,\n onLayoutAnimatedText,\n onSubmitEditing,\n placeholder,\n secureTextEntry,\n style,\n value,\n } = props;\n\n const theme = useTheme();\n\n const styles = useStyles();\n\n const hasActiveOutline = focused || error;\n const inputTextColor = disabled ? theme.palette.tertiary.main : theme.palette.primary.main;\n const activeColor = error\n ? theme.palette.warning.main\n : disabled\n ? theme.palette.tertiary.main\n : theme.palette.accent.main;\n const placeholderColor = disabled ? theme.palette.tertiary.main : theme.palette.text.hint;\n const outlineColor = theme.palette.border.default;\n const errorColor = disabled ? theme.palette.tertiary.main : theme.palette.warning.main;\n\n const typography = theme.typography.body2;\n const fontSize = typography.fontSize.unitless;\n\n const labelScale = labelFontSize / fontSize;\n const labelWidth = labelLayout.width;\n const labelHeight = labelLayout.height;\n const labelHalfWidth = labelWidth / 2;\n const labelHalfHeight = labelHeight / 2;\n\n const labelTranslateX = -1 * (labelHalfWidth - (labelScale * labelWidth) / 2 - (fontSize - labelFontSize) * labelScale);\n const minInputHeight = defaultHeight - labelPaddingTop;\n const inputHeight = labelHeight < minInputHeight ? minInputHeight : labelHeight;\n const topPosition = Math.floor(((inputHeight > 0 ? inputHeight : 0) - labelHeight) / 2 + labelPaddingTop);\n const iconTopPosition = (defaultHeight - (label ? 0 : labelPaddingTop) - iconSize - (label ? labelYOffset : 0)) / 2;\n const labelTranslateY = -labelHalfHeight - (topPosition + labelYOffset);\n\n const placeholderOpacity = hasActiveOutline\n ? animatedLabel.interpolate({\n inputRange: [0, 1],\n outputRange: [hasActiveOutline ? 0 : 1, 1],\n })\n : labelLayout.measured ? 1 : 0;\n\n const labelProps = {\n activeColor,\n error,\n errorColor,\n fontSize,\n hasActiveOutline,\n label,\n labelScale,\n labelTranslateX,\n labelTranslateY,\n onLayoutAnimatedText,\n placeholderColor,\n placeholderOpacity,\n topPosition,\n };\n\n const inputTextFontStyle = createFontStyle(theme, {\n selector: (typo) => typo.caption2,\n color: inputTextColor,\n });\n\n const outlineStyle = css([\n styles.outline,\n {\n borderWidth: hasActiveOutline ? 2 : 1,\n borderColor: error ? errorColor : (hasActiveOutline ? activeColor : outlineColor),\n top: label ? 6 : 0,\n },\n ]);\n\n const textInputStyle = css([\n inputTextFontStyle,\n styles.input,\n {\n fontSize,\n color: inputTextColor,\n height: inputHeight,\n },\n icon && {\n marginRight: iconSize + 20,\n paddingRight: 0,\n },\n Platform.OS === 'web' && {\n //@ts-ignore\n outlineWidth: 0,\n },\n ]);\n\n const containerStyle = css([\n {\n paddingTop: label ? labelPaddingTop : 0,\n minHeight: label ? defaultHeight : defaultHeight + labelYOffset,\n },\n ]);\n\n const iconContainerStyle = css([\n styles.iconContainer,\n { top: iconTopPosition },\n ]);\n\n const onIconButtonPress = () => {\n forceFocus();\n onIconPress?.();\n };\n\n return (\n <View style={style}>\n <View\n pointerEvents={'none'}\n style={outlineStyle}\n />\n <View style={containerStyle}>\n {label ? (\n <InputLabel\n animatedLabel={animatedLabel}\n animatedError={animatedError}\n focused={focused}\n labelLayout={labelLayout}\n placeholder={placeholder}\n value={value}\n {...labelProps}\n />\n ) : null}\n <TextInput\n autoCapitalize={'none'}\n autoCorrect={false}\n disableFullscreenUI={true}\n ref={ref}\n onChangeText={onChangeText}\n placeholder={placeholder}\n placeholderTextColor={placeholderColor}\n editable={!disabled}\n selectionColor={activeColor}\n onFocus={onFocus}\n onBlur={onBlur}\n onSubmitEditing={onSubmitEditing}\n keyboardType={keyboardType}\n secureTextEntry={secureTextEntry}\n underlineColorAndroid={'transparent'}\n style={textInputStyle}\n value={value}\n />\n </View>\n {icon ? (\n <View style={iconContainerStyle}>\n <IconButton\n children={icon}\n onPress={onIconButtonPress}\n />\n </View>\n ) : null}\n </View>\n );\n});\n\nexport default OutlinedTextField;\n"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAAsCC,QAAtC,EAAgDC,SAAhD,EAA2DC,IAA3D,QAAuE,cAAvE;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