@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
|
@@ -13,7 +13,7 @@ var _reactNativeSafeAreaContext = require("react-native-safe-area-context");
|
|
|
13
13
|
|
|
14
14
|
var _Slide = _interopRequireDefault(require("../Slide"));
|
|
15
15
|
|
|
16
|
-
var _SnackbarContent = _interopRequireDefault(require("../SnackbarContent
|
|
16
|
+
var _SnackbarContent = _interopRequireDefault(require("../SnackbarContent"));
|
|
17
17
|
|
|
18
18
|
var _hooks = require("../hooks");
|
|
19
19
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["fadeDuration","fadeAnimationDelay","useStyles","theme","useTheme","insets","useSafeAreaInsets","root","alignSelf","bottom","spacing","maxWidth","paddingBottom","paddingHorizontal","position","width","zIndex","Snackbar","props","actionContent","animatedY","autoHideDuration","children","message","title","startIcon","status","onPress","onClose","style","visible","otherProps","autoHideTimer","React","useRef","clearAutoHideTimeout","current","clearTimeout","useEffect","setTimeout","styles","exited","setExited","useState","animatedOpacity","useAnimatedValue","animatedStyle","opacity","Animated","timing","toValue","duration","delay","easing","Easing","out","exp","useNativeDriver","isNotAndroid12","start"],"sources":["Snackbar.tsx"],"sourcesContent":["import React, { useEffect } from 'react';\nimport { Animated, Easing } from 'react-native';\nimport { useSafeAreaInsets } from 'react-native-safe-area-context';\nimport { NamedStylesStringUnion, UseStyles } from '@fountain-ui/styles';\nimport Slide from '../Slide';\nimport SnackbarContent from '../SnackbarContent
|
|
1
|
+
{"version":3,"names":["fadeDuration","fadeAnimationDelay","useStyles","theme","useTheme","insets","useSafeAreaInsets","root","alignSelf","bottom","spacing","maxWidth","paddingBottom","paddingHorizontal","position","width","zIndex","Snackbar","props","actionContent","animatedY","autoHideDuration","children","message","title","startIcon","status","onPress","onClose","style","visible","otherProps","autoHideTimer","React","useRef","clearAutoHideTimeout","current","clearTimeout","useEffect","setTimeout","styles","exited","setExited","useState","animatedOpacity","useAnimatedValue","animatedStyle","opacity","Animated","timing","toValue","duration","delay","easing","Easing","out","exp","useNativeDriver","isNotAndroid12","start"],"sources":["Snackbar.tsx"],"sourcesContent":["import React, { useEffect } from 'react';\nimport { Animated, Easing } from 'react-native';\nimport { useSafeAreaInsets } from 'react-native-safe-area-context';\nimport { NamedStylesStringUnion, UseStyles } from '@fountain-ui/styles';\nimport Slide from '../Slide';\nimport SnackbarContent from '../SnackbarContent';\nimport { useAnimatedValue } from '../hooks';\nimport { useTheme } from '../styles';\nimport { isNotAndroid12 } from '../utils';\nimport type SnackbarProps from './SnackbarProps';\n\ntype SnackBarStyles = NamedStylesStringUnion<'root'>;\n\nconst fadeDuration = 300;\nconst fadeAnimationDelay = 100;\n\nconst useStyles: UseStyles<SnackBarStyles> = function (): SnackBarStyles {\n const theme = useTheme();\n const insets = useSafeAreaInsets();\n\n return {\n root: {\n alignSelf: 'center',\n bottom: theme.spacing(2),\n maxWidth: 480,\n paddingBottom: insets.bottom,\n paddingHorizontal: theme.spacing(2),\n position: 'absolute',\n width: '100%',\n // TODO: Need to remove zIndex.\n zIndex: 32,\n },\n };\n};\n\nexport default function Snackbar(props: SnackbarProps) {\n const {\n actionContent,\n animatedY,\n autoHideDuration = null,\n children,\n message,\n title,\n startIcon,\n status = 'info',\n onPress,\n onClose,\n style,\n visible = false,\n ...otherProps\n } = props;\n\n const autoHideTimer = React.useRef<number | null>(null);\n\n const clearAutoHideTimeout = () => {\n if (autoHideTimer.current !== null) {\n clearTimeout(autoHideTimer.current);\n }\n };\n\n React.useEffect(() => {\n return () => {\n clearAutoHideTimeout();\n };\n }, []);\n\n React.useEffect(() => {\n if (visible && autoHideDuration !== null) {\n clearAutoHideTimeout();\n\n // @ts-ignore\n autoHideTimer.current = setTimeout(() => {\n if (onClose) {\n onClose();\n }\n }, autoHideDuration);\n }\n }, [visible, autoHideDuration, onClose]);\n\n const styles = useStyles();\n\n const [exited, setExited] = React.useState(true);\n\n const animatedOpacity = useAnimatedValue(0);\n\n const animatedStyle = {\n opacity: animatedOpacity,\n };\n\n useEffect(() => {\n Animated.timing(animatedOpacity, {\n toValue: visible ? 1 : 0,\n duration: fadeDuration,\n delay: visible ? fadeAnimationDelay : 0,\n easing: Easing.out(Easing.exp),\n useNativeDriver: isNotAndroid12,\n }).start();\n }, [visible]);\n\n if (!visible && exited) {\n return null;\n }\n\n return (\n <Animated.View\n style={[\n animatedStyle,\n styles.root,\n style,\n ]}\n {...otherProps}\n >\n <Slide\n animatedY={animatedY}\n appear={visible}\n onEnter={() => setExited(false)}\n onExited={() => setExited(true)}\n >\n {children ? children : (\n <SnackbarContent\n title={title}\n startIcon={startIcon}\n status={status}\n actionContent={actionContent}\n message={message}\n onPress={onPress}\n />\n )}\n </Slide>\n </Animated.View>\n );\n};\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAKA,MAAMA,YAAY,GAAG,GAArB;AACA,MAAMC,kBAAkB,GAAG,GAA3B;;AAEA,MAAMC,SAAoC,GAAG,YAA4B;EACrE,MAAMC,KAAK,GAAG,IAAAC,gBAAA,GAAd;EACA,MAAMC,MAAM,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EAAEI,OALb;IAMI,OAAO,EAAEI;EANb,EAPR,CARJ,CADJ;AA4BH;;AAAA"}
|
|
@@ -6,11 +6,19 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
Object.defineProperty(exports, "default", {
|
|
7
7
|
enumerable: true,
|
|
8
8
|
get: function () {
|
|
9
|
-
return
|
|
9
|
+
return _Snackbar.default;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
|
+
Object.defineProperty(exports, "snackbarStatus", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () {
|
|
15
|
+
return _SnackbarProps.snackbarStatus;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
var _Snackbar = _interopRequireDefault(require("./Snackbar"));
|
|
12
20
|
|
|
13
|
-
var
|
|
21
|
+
var _SnackbarProps = require("./SnackbarProps");
|
|
14
22
|
|
|
15
23
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
16
24
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export { default } from './
|
|
1
|
+
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export { default } from './Snackbar';\nexport type { default as SnackbarProps } from './SnackbarProps';\nexport { snackbarStatus } from './SnackbarProps';\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;;AAEA"}
|
|
@@ -33,11 +33,16 @@ const useStyles = function () {
|
|
|
33
33
|
root: {
|
|
34
34
|
flexDirection: 'row',
|
|
35
35
|
alignItems: 'center',
|
|
36
|
+
alignSelf: 'center',
|
|
36
37
|
backgroundColor: theme.palette.surface.accent,
|
|
37
38
|
borderRadius: 22,
|
|
39
|
+
maxWidth: 400,
|
|
38
40
|
paddingBottom: theme.spacing(2.25),
|
|
39
41
|
paddingHorizontal: theme.spacing(4),
|
|
40
42
|
paddingTop: theme.spacing(2)
|
|
43
|
+
},
|
|
44
|
+
actionButton: {
|
|
45
|
+
marginLeft: theme.spacing(6)
|
|
41
46
|
}
|
|
42
47
|
};
|
|
43
48
|
};
|
|
@@ -82,8 +87,11 @@ function SnackbarContent(props) {
|
|
|
82
87
|
}),
|
|
83
88
|
color: theme.palette.text.accent
|
|
84
89
|
});
|
|
90
|
+
const hasActionButton = !!(actionContent && onPress);
|
|
85
91
|
const rootStyle = (0, _styles2.css)([styles.root, startIcon ? {
|
|
86
92
|
borderRadius: theme.shape.radius.xl
|
|
93
|
+
} : undefined, hasActionButton ? {
|
|
94
|
+
width: '100%'
|
|
87
95
|
} : undefined, styleProp]);
|
|
88
96
|
return /*#__PURE__*/_react.default.createElement(_ButtonBase.default, _extends({
|
|
89
97
|
disabled: !onPress,
|
|
@@ -103,12 +111,12 @@ function SnackbarContent(props) {
|
|
|
103
111
|
style: (0, _styles2.css)([messageFontStyle])
|
|
104
112
|
})), actionContent ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_Spacer.default, {
|
|
105
113
|
flex: 1
|
|
106
|
-
}), /*#__PURE__*/_react.default.createElement(
|
|
107
|
-
|
|
108
|
-
}
|
|
114
|
+
}), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
115
|
+
style: styles.actionButton
|
|
116
|
+
}, typeof actionContent === 'string' ? /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
|
|
109
117
|
children: actionContent,
|
|
110
118
|
style: labelFontStyle
|
|
111
|
-
}) : actionContent) : null);
|
|
119
|
+
}) : actionContent)) : null);
|
|
112
120
|
}
|
|
113
121
|
|
|
114
122
|
;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useStyles","theme","useTheme","root","flexDirection","alignItems","backgroundColor","palette","surface","accent","borderRadius","paddingBottom","spacing","paddingHorizontal","paddingTop","SnackbarContent","props","actionContent","message","title","onPress","style","styleProp","status","startIcon","otherProps","styles","titleFontStyle","createFontStyle","selector","_","typographyOf","fontSize","lineHeight","fontFamily","letterSpacing","color","text","strongInverse","messageFontStyle","labelFontStyle","rootStyle","css","shape","radius","xl","undefined"],"sources":["SnackbarContent.tsx"],"sourcesContent":["import React from 'react';\nimport { Text } from 'react-native';\nimport { typographyOf } from '@fountain-ui/styles';\nimport type { NamedStylesStringUnion, UseStyles } from '@fountain-ui/styles';\nimport { createFontStyle, css, useTheme } from '../styles';\nimport ButtonBase from '../ButtonBase/ButtonBase';\nimport Column from '../Column';\nimport Spacer from '../Spacer';\nimport Typography from '../Typography';\nimport type SnackbarContentProps from './SnackbarContentProps';\nimport StatusIcon from './StatusIcon';\n\ntype SnackBarContentStyles = NamedStylesStringUnion<'root'>;\n\nconst useStyles: UseStyles<SnackBarContentStyles> = function (): SnackBarContentStyles {\n const theme = useTheme();\n\n return {\n root: {\n flexDirection: 'row',\n alignItems: 'center',\n backgroundColor: theme.palette.surface.accent,\n borderRadius: 22,\n paddingBottom: theme.spacing(2.25),\n paddingHorizontal: theme.spacing(4),\n paddingTop: theme.spacing(2),\n },\n };\n};\n\nexport default function SnackbarContent(props: SnackbarContentProps) {\n const {\n actionContent,\n message,\n title,\n onPress,\n style: styleProp,\n status = 'info',\n startIcon,\n ...otherProps\n } = props;\n\n const styles = useStyles();\n\n const theme = useTheme();\n\n const titleFontStyle = createFontStyle(theme, {\n selector: (_) => typographyOf({\n fontSize: 14,\n lineHeight: 18.2,\n fontFamily: 'Pretendard-SemiBold',\n letterSpacing: 0,\n }),\n color: theme.palette.text.strongInverse,\n });\n\n const messageFontStyle = createFontStyle(theme, {\n selector: (_) => typographyOf({\n fontSize: 13,\n lineHeight: 16.9,\n fontFamily: 'Pretendard-Regular',\n letterSpacing: 0,\n }),\n color: theme.palette.text.strongInverse,\n });\n\n const labelFontStyle = createFontStyle(theme, {\n selector: (_) => typographyOf({\n fontSize: 13,\n lineHeight: 16.25,\n fontFamily: 'LexendDeca-SemiBold',\n letterSpacing: -0.26,\n }),\n color: theme.palette.text.accent,\n });\n\n const rootStyle = css([\n styles.root,\n startIcon ? { borderRadius: theme.shape.radius.xl } : undefined,\n styleProp,\n ]);\n\n return (\n <ButtonBase\n disabled={!onPress}\n onPress={onPress}\n style={rootStyle}\n {...otherProps}\n >\n {startIcon ? (\n <React.Fragment>\n {startIcon}\n\n <Spacer size={3}/>\n </React.Fragment>\n ) : status !== 'info' ? (\n <React.Fragment>\n <StatusIcon status={status}/>\n\n <Spacer size={1.5}/>\n </React.Fragment>\n ) : null}\n\n <Column>\n {title ? (\n <Typography\n children={title}\n style={css([titleFontStyle])}\n />\n ) : null}\n\n <Text\n children={message}\n style={css([messageFontStyle])}\n />\n </Column>\n\n {actionContent ? (\n <React.Fragment>\n <Spacer flex={1}/>\n\n <
|
|
1
|
+
{"version":3,"names":["useStyles","theme","useTheme","root","flexDirection","alignItems","alignSelf","backgroundColor","palette","surface","accent","borderRadius","maxWidth","paddingBottom","spacing","paddingHorizontal","paddingTop","actionButton","marginLeft","SnackbarContent","props","actionContent","message","title","onPress","style","styleProp","status","startIcon","otherProps","styles","titleFontStyle","createFontStyle","selector","_","typographyOf","fontSize","lineHeight","fontFamily","letterSpacing","color","text","strongInverse","messageFontStyle","labelFontStyle","hasActionButton","rootStyle","css","shape","radius","xl","undefined","width"],"sources":["SnackbarContent.tsx"],"sourcesContent":["import React from 'react';\nimport { Text, View } from 'react-native';\nimport { typographyOf } from '@fountain-ui/styles';\nimport type { NamedStylesStringUnion, UseStyles } from '@fountain-ui/styles';\nimport { createFontStyle, css, useTheme } from '../styles';\nimport ButtonBase from '../ButtonBase/ButtonBase';\nimport Column from '../Column';\nimport Spacer from '../Spacer';\nimport Typography from '../Typography';\nimport type SnackbarContentProps from './SnackbarContentProps';\nimport StatusIcon from './StatusIcon';\n\ntype SnackBarContentStyles = NamedStylesStringUnion<'root' | 'actionButton'>;\n\nconst useStyles: UseStyles<SnackBarContentStyles> = function (): SnackBarContentStyles {\n const theme = useTheme();\n\n return {\n root: {\n flexDirection: 'row',\n alignItems: 'center',\n alignSelf: 'center',\n backgroundColor: theme.palette.surface.accent,\n borderRadius: 22,\n maxWidth: 400,\n paddingBottom: theme.spacing(2.25),\n paddingHorizontal: theme.spacing(4),\n paddingTop: theme.spacing(2),\n },\n actionButton: {\n marginLeft: theme.spacing(6),\n },\n };\n};\n\nexport default function SnackbarContent(props: SnackbarContentProps) {\n const {\n actionContent,\n message,\n title,\n onPress,\n style: styleProp,\n status = 'info',\n startIcon,\n ...otherProps\n } = props;\n\n const styles = useStyles();\n\n const theme = useTheme();\n\n const titleFontStyle = createFontStyle(theme, {\n selector: (_) => typographyOf({\n fontSize: 14,\n lineHeight: 18.2,\n fontFamily: 'Pretendard-SemiBold',\n letterSpacing: 0,\n }),\n color: theme.palette.text.strongInverse,\n });\n\n const messageFontStyle = createFontStyle(theme, {\n selector: (_) => typographyOf({\n fontSize: 13,\n lineHeight: 16.9,\n fontFamily: 'Pretendard-Regular',\n letterSpacing: 0,\n }),\n color: theme.palette.text.strongInverse,\n });\n\n const labelFontStyle = createFontStyle(theme, {\n selector: (_) => typographyOf({\n fontSize: 13,\n lineHeight: 16.25,\n fontFamily: 'LexendDeca-SemiBold',\n letterSpacing: -0.26,\n }),\n color: theme.palette.text.accent,\n });\n\n const hasActionButton = !!(actionContent && onPress);\n\n const rootStyle = css([\n styles.root,\n startIcon ? { borderRadius: theme.shape.radius.xl } : undefined,\n hasActionButton ? { width: '100%' } : undefined,\n styleProp,\n ]);\n\n return (\n <ButtonBase\n disabled={!onPress}\n onPress={onPress}\n style={rootStyle}\n {...otherProps}\n >\n {startIcon ? (\n <React.Fragment>\n {startIcon}\n\n <Spacer size={3}/>\n </React.Fragment>\n ) : status !== 'info' ? (\n <React.Fragment>\n <StatusIcon status={status}/>\n\n <Spacer size={1.5}/>\n </React.Fragment>\n ) : null}\n\n <Column>\n {title ? (\n <Typography\n children={title}\n style={css([titleFontStyle])}\n />\n ) : null}\n\n <Text\n children={message}\n style={css([messageFontStyle])}\n />\n </Column>\n\n {actionContent ? (\n <React.Fragment>\n <Spacer flex={1}/>\n\n <View style={styles.actionButton}>\n {typeof actionContent === 'string' ? (\n <Text\n children={actionContent}\n style={labelFontStyle}\n />\n ) : (actionContent)}\n </View>\n </React.Fragment>\n ) : null}\n </ButtonBase>\n );\n};\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AAEA;;;;;;AAIA,MAAMA,SAA2C,GAAG,YAAmC;EACnF,MAAMC,KAAK,GAAG,IAAAC,iBAAA,GAAd;EAEA,OAAO;IACHC,IAAI,EAAE;MACFC,aAAa,EAAE,KADb;MAEFC,UAAU,EAAE,QAFV;MAGFC,SAAS,EAAE,QAHT;MAIFC,eAAe,EAAEN,KAAK,CAACO,OAAN,CAAcC,OAAd,CAAsBC,MAJrC;MAKFC,YAAY,EAAE,EALZ;MAMFC,QAAQ,EAAE,GANR;MAOFC,aAAa,EAAEZ,KAAK,CAACa,OAAN,CAAc,IAAd,CAPb;MAQFC,iBAAiB,EAAEd,KAAK,CAACa,OAAN,CAAc,CAAd,CARjB;MASFE,UAAU,EAAEf,KAAK,CAACa,OAAN,CAAc,CAAd;IATV,CADH;IAYHG,YAAY,EAAE;MACVC,UAAU,EAAEjB,KAAK,CAACa,OAAN,CAAc,CAAd;IADF;EAZX,CAAP;AAgBH,CAnBD;;AAqBe,SAASK,eAAT,CAAyBC,KAAzB,EAAsD;EACjE,MAAM;IACFC,aADE;IAEFC,OAFE;IAGFC,KAHE;IAIFC,OAJE;IAKFC,KAAK,EAAEC,SALL;IAMFC,MAAM,GAAG,MANP;IAOFC,SAPE;IAQF,GAAGC;EARD,IASFT,KATJ;EAWA,MAAMU,MAAM,GAAG9B,SAAS,EAAxB;EAEA,MAAMC,KAAK,GAAG,IAAAC,iBAAA,GAAd;EAEA,MAAM6B,cAAc,GAAG,IAAAC,wBAAA,EAAgB/B,KAAhB,EAAuB;IAC1CgC,QAAQ,EAAGC,CAAD,IAAO,IAAAC,oBAAA,EAAa;MAC1BC,QA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;IACI,QAAQ,EAAE,CAACF,OADf;IAEI,OAAO,EAAEA,OAFb;IAGI,KAAK,EAAEsB;EAHX,GAIQjB,UAJR,GAMKD,SAAS,gBACN,6BAAC,cAAD,CAAO,QAAP,QACKA,SADL,eAGI,6BAAC,eAAD;IAAQ,IAAI,EAAE;EAAd,EAHJ,CADM,GAMND,MAAM,KAAK,MAAX,gBACA,6BAAC,cAAD,CAAO,QAAP,qBACI,6BAAC,mBAAD;IAAY,MAAM,EAAEA;EAApB,EADJ,eAGI,6BAAC,eAAD;IAAQ,IAAI,EAAE;EAAd,EAHJ,CADA,GAMA,IAlBR,eAoBI,6BAAC,eAAD,QACKJ,KAAK,gBACF,6BAAC,mBAAD;IACI,QAAQ,EAAEA,KADd;IAEI,KAAK,EAAE,IAAAwB,YAAA,EAAI,CAAChB,cAAD,CAAJ;EAFX,EADE,GAKF,IANR,eAQI,6BAAC,iBAAD;IACI,QAAQ,EAAET,OADd;IAEI,KAAK,EAAE,IAAAyB,YAAA,EAAI,CAACJ,gBAAD,CAAJ;EAFX,EARJ,CApBJ,EAkCKtB,aAAa,gBACV,6BAAC,cAAD,CAAO,QAAP,qBACI,6BAAC,eAAD;IAAQ,IAAI,EAAE;EAAd,EADJ,eAGI,6BAAC,iBAAD;IAAM,KAAK,EAAES,MAAM,CAACb;EAApB,GACK,OAAOI,aAAP,KAAyB,QAAzB,gBACG,6BAAC,iBAAD;IACI,QAAQ,EAAEA,aADd;IAEI,KAAK,EAAEuB;EAFX,EADH,GAKIvB,aANT,CAHJ,CADU,GAaV,IA/CR,CADJ;AAmDH;;AAAA"}
|
|
@@ -23,14 +23,12 @@ function StatusIcon(props) {
|
|
|
23
23
|
case 'success':
|
|
24
24
|
return /*#__PURE__*/_react.default.createElement(_icons.CheckCircle, {
|
|
25
25
|
color: 'accent',
|
|
26
|
-
enableV2: true,
|
|
27
26
|
height: 17,
|
|
28
27
|
width: 14
|
|
29
28
|
});
|
|
30
29
|
|
|
31
30
|
case 'fail':
|
|
32
31
|
return /*#__PURE__*/_react.default.createElement(_icons.InfoCircle, {
|
|
33
|
-
enableV2: true,
|
|
34
32
|
fill: theme.palette.status.danger,
|
|
35
33
|
height: 17,
|
|
36
34
|
width: 14
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["StatusIcon","props","status","theme","useTheme","palette","danger"],"sources":["StatusIcon.tsx"],"sourcesContent":["import React from 'react';\nimport { CheckCircle, InfoCircle } from '../internal/icons';\nimport { useTheme } from '../styles';\nimport type SnackbarContentProps from './SnackbarContentProps';\n\ninterface StatusIconProps {\n status: SnackbarContentProps['status'];\n}\n\nexport default function StatusIcon(props: StatusIconProps) {\n const { status } = props;\n\n const theme = useTheme();\n\n switch (status) {\n case 'success':\n return (\n <CheckCircle\n color={'accent'}\n
|
|
1
|
+
{"version":3,"names":["StatusIcon","props","status","theme","useTheme","palette","danger"],"sources":["StatusIcon.tsx"],"sourcesContent":["import React from 'react';\nimport { CheckCircle, InfoCircle } from '../internal/icons';\nimport { useTheme } from '../styles';\nimport type SnackbarContentProps from './SnackbarContentProps';\n\ninterface StatusIconProps {\n status: SnackbarContentProps['status'];\n}\n\nexport default function StatusIcon(props: StatusIconProps) {\n const { status } = props;\n\n const theme = useTheme();\n\n switch (status) {\n case 'success':\n return (\n <CheckCircle\n color={'accent'}\n height={17}\n width={14}\n />\n );\n case 'fail':\n return (\n <InfoCircle\n fill={theme.palette.status.danger}\n height={17}\n width={14}\n />\n );\n default:\n return null;\n }\n}\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;;;AAOe,SAASA,UAAT,CAAoBC,KAApB,EAA4C;EACvD,MAAM;IAAEC;EAAF,IAAaD,KAAnB;EAEA,MAAME,KAAK,GAAG,IAAAC,gBAAA,GAAd;;EAEA,QAAQF,MAAR;IACI,KAAK,SAAL;MACI,oBACI,6BAAC,kBAAD;QACI,KAAK,EAAE,QADX;QAEI,MAAM,EAAE,EAFZ;QAGI,KAAK,EAAE;MAHX,EADJ;;IAOJ,KAAK,MAAL;MACI,oBACI,6BAAC,iBAAD;QACI,IAAI,EAAEC,KAAK,CAACE,OAAN,CAAcH,MAAd,CAAqBI,MAD/B;QAEI,MAAM,EAAE,EAFZ;QAGI,KAAK,EAAE;MAHX,EADJ;;IAOJ;MACI,OAAO,IAAP;EAlBR;AAoBH"}
|
|
@@ -6,11 +6,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
Object.defineProperty(exports, "default", {
|
|
7
7
|
enumerable: true,
|
|
8
8
|
get: function () {
|
|
9
|
-
return
|
|
9
|
+
return _SnackbarContent.default;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
12
|
|
|
13
|
-
var
|
|
13
|
+
var _SnackbarContent = _interopRequireDefault(require("./SnackbarContent"));
|
|
14
14
|
|
|
15
15
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
16
16
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export { default } from './
|
|
1
|
+
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export { default } from './SnackbarContent';\nexport type { default as SnackbarContentProps } from './SnackbarContentProps';\n"],"mappings":";;;;;;;;;;;;AAAA"}
|
|
@@ -6,11 +6,25 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
Object.defineProperty(exports, "default", {
|
|
7
7
|
enumerable: true,
|
|
8
8
|
get: function () {
|
|
9
|
-
return
|
|
9
|
+
return _SvgIcon.default;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
|
+
Object.defineProperty(exports, "svgIconColors", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () {
|
|
15
|
+
return _SvgIconProps.svgIconColors;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
Object.defineProperty(exports, "svgIconSizes", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function () {
|
|
21
|
+
return _SvgIconProps.svgIconSizes;
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
var _SvgIcon = _interopRequireDefault(require("./SvgIcon"));
|
|
12
26
|
|
|
13
|
-
var
|
|
27
|
+
var _SvgIconProps = require("./SvgIconProps");
|
|
14
28
|
|
|
15
29
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
16
30
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export { default } from './
|
|
1
|
+
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export { default } from './SvgIcon';\nexport type { default as SvgIconProps } from './SvgIconProps';\nexport { svgIconColors, svgIconSizes } from './SvgIconProps';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AAEA"}
|
|
@@ -13,7 +13,7 @@ var _Badge = _interopRequireDefault(require("../Badge"));
|
|
|
13
13
|
|
|
14
14
|
var _Spacer = _interopRequireDefault(require("../Spacer"));
|
|
15
15
|
|
|
16
|
-
var _TabBase = _interopRequireDefault(require("../TabBase
|
|
16
|
+
var _TabBase = _interopRequireDefault(require("../TabBase"));
|
|
17
17
|
|
|
18
18
|
var _styles = require("../styles");
|
|
19
19
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["styles","StyleSheet","create","root","Platform","OS","minWidth","filledInner","alignItems","justifyContent","Tab","props","badgeVisible","children","enableIndicator","icon","defaultIcon","selected","selectedIcon","variant","style","styleProp","onTabInnerLayout","otherProps","theme","useTheme","vertical","container","containerStyle","inner","innerStyle","label","labelStyle","useVariantStyleMap","tabBaseStyle","css","tabInnerStyle","pressEffect","iconColor","palette","strong","base","iconElement","cloneElementSafely","fill","tabElement"],"sources":["Tab.tsx"],"sourcesContent":["import React from 'react';\nimport { Platform, Text, View } from 'react-native';\nimport Badge from '../Badge';\nimport Spacer from '../Spacer';\nimport TabBase from '../TabBase
|
|
1
|
+
{"version":3,"names":["styles","StyleSheet","create","root","Platform","OS","minWidth","filledInner","alignItems","justifyContent","Tab","props","badgeVisible","children","enableIndicator","icon","defaultIcon","selected","selectedIcon","variant","style","styleProp","onTabInnerLayout","otherProps","theme","useTheme","vertical","container","containerStyle","inner","innerStyle","label","labelStyle","useVariantStyleMap","tabBaseStyle","css","tabInnerStyle","pressEffect","iconColor","palette","strong","base","iconElement","cloneElementSafely","fill","tabElement"],"sources":["Tab.tsx"],"sourcesContent":["import React from 'react';\nimport { Platform, Text, View } from 'react-native';\nimport Badge from '../Badge';\nimport Spacer from '../Spacer';\nimport TabBase from '../TabBase';\nimport { css, StyleSheet, useTheme } from '../styles';\nimport { cloneElementSafely } from '../utils';\nimport type TabProps from './TabProps';\nimport type { TabVariant } from './TabProps';\nimport useVariantStyleMap from './useVariantStyleMap';\n\nconst styles = StyleSheet.create({\n root: {\n // TODO: Remove redundant platform checking\n ...(Platform.OS === 'web' ? { minWidth: 'auto' } : {}),\n },\n filledInner: {\n alignItems: 'center',\n justifyContent: 'center',\n },\n});\n\nexport default function Tab(props: TabProps) {\n const {\n badgeVisible = false,\n children,\n enableIndicator = false,\n icon: defaultIcon,\n selected = false,\n selectedIcon,\n variant = 'default' as TabVariant,\n style: styleProp,\n onTabInnerLayout,\n ...otherProps\n } = props;\n\n const theme = useTheme();\n\n const vertical = variant === 'bottom-navigation';\n\n const {\n container: containerStyle,\n inner: innerStyle,\n label: labelStyle,\n } = useVariantStyleMap(variant, selected);\n\n const tabBaseStyle = css([\n styles.root,\n containerStyle,\n styleProp,\n ]);\n\n const tabInnerStyle = css([\n styles.filledInner,\n innerStyle,\n ]);\n\n const pressEffect = selected ? 'none' : 'opacity';\n\n const icon = selected ? (selectedIcon || defaultIcon) : defaultIcon;\n const iconColor = selected ? theme.palette.icon.strong : theme.palette.icon.base;\n const iconElement = cloneElementSafely(icon, { fill: iconColor });\n\n const tabElement = typeof children !== 'string' ? (\n cloneElementSafely(children, {\n selected,\n })\n ) : (\n <React.Fragment>\n {iconElement ? (\n <React.Fragment>\n <Badge invisible={!badgeVisible}>\n {iconElement}\n </Badge>\n\n <Spacer size={1.25}/>\n </React.Fragment>\n ) : null}\n\n <Text style={css(labelStyle)}>\n {children}\n </Text>\n </React.Fragment>\n );\n\n return (\n <TabBase\n pressEffect={pressEffect}\n style={tabBaseStyle}\n vertical={vertical}\n {...otherProps}\n >\n <View onLayout={onTabInnerLayout} style={tabInnerStyle}>\n {tabElement}\n </View>\n </TabBase>\n );\n};\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAGA;;;;;;AAEA,MAAMA,MAAM,GAAGC,kBAAA,CAAWC,MAAX,CAAkB;EAC7BC,IAAI,EAAE,EACF;IACA,IAAIC,qBAAA,CAASC,EAAT,KAAgB,KAAhB,GAAwB;MAAEC,QAAQ,EAAE;IAAZ,CAAxB,GAA+C,EAAnD;EAFE,CADuB;EAK7BC,WAAW,EAAE;IACTC,UAAU,EAAE,QADH;IAETC,cAAc,EAAE;EAFP;AALgB,CAAlB,CAAf;;AAWe,SAASC,GAAT,CAAaC,KAAb,EAA8B;EACzC,MAAM;IACFC,YAAY,GAAG,KADb;IAEFC,QAFE;IAGFC,eAAe,GAAG,KAHhB;IAIFC,IAAI,EAAEC,WAJJ;IAKFC,QAAQ,GAAG,KALT;IAMFC,YANE;IAOFC,OAAO,GAAG,SAPR;IAQFC,KAAK,EAAEC,SARL;IASFC,gBATE;IAUF,GAAGC;EAVD,IAWFZ,KAXJ;EAaA,MAAMa,KAAK,GAAG,IAAAC,gBAAA,GAAd;EAEA,MAAMC,QAAQ,GAAGP,OAAO,KAAK,mBAA7B;EAEA,MAAM;IACFQ,SAAS,EAAEC,cADT;IAEFC,KAAK,EAAEC,UAFL;IAGFC,KAAK,EAAEC;EAHL,IAIF,IAAAC,2BAAA,EAAmBd,OAAnB,EAA4BF,QAA5B,CAJJ;EAMA,MAAMiB,YAAY,GAAG,IAAAC,WA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"}
|
|
@@ -6,11 +6,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
Object.defineProperty(exports, "default", {
|
|
7
7
|
enumerable: true,
|
|
8
8
|
get: function () {
|
|
9
|
-
return
|
|
9
|
+
return _Tab.default;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
12
|
|
|
13
|
-
var
|
|
13
|
+
var _Tab = _interopRequireDefault(require("./Tab"));
|
|
14
14
|
|
|
15
15
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
16
16
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export { default } from './
|
|
1
|
+
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export { default } from './Tab';\nexport type { default as TabProps, TabVariant } from './TabProps';\n"],"mappings":";;;;;;;;;;;;AAAA"}
|
|
@@ -6,11 +6,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
Object.defineProperty(exports, "default", {
|
|
7
7
|
enumerable: true,
|
|
8
8
|
get: function () {
|
|
9
|
-
return
|
|
9
|
+
return _TabBase.default;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
12
|
|
|
13
|
-
var
|
|
13
|
+
var _TabBase = _interopRequireDefault(require("./TabBase"));
|
|
14
14
|
|
|
15
15
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
16
16
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export { default } from './
|
|
1
|
+
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export { default } from './TabBase';\nexport type { default as TabBaseProps } from './TabBaseProps';\n"],"mappings":";;;;;;;;;;;;AAAA"}
|
|
@@ -50,7 +50,7 @@ const useStyles = function () {
|
|
|
50
50
|
},
|
|
51
51
|
bottomDivider: {
|
|
52
52
|
borderBottomColor: theme.palette.border.base,
|
|
53
|
-
borderBottomWidth:
|
|
53
|
+
borderBottomWidth: 0.5
|
|
54
54
|
}
|
|
55
55
|
};
|
|
56
56
|
};
|
|
@@ -60,6 +60,7 @@ const Tabs = /*#__PURE__*/(0, _react.forwardRef)(function Tabs(props, ref) {
|
|
|
60
60
|
|
|
61
61
|
const {
|
|
62
62
|
children,
|
|
63
|
+
color = 'default',
|
|
63
64
|
initialIndex = 0,
|
|
64
65
|
disableIndicator = false,
|
|
65
66
|
indicatorSize = 'fit-content',
|
|
@@ -91,11 +92,16 @@ const Tabs = /*#__PURE__*/(0, _react.forwardRef)(function Tabs(props, ref) {
|
|
|
91
92
|
setTab
|
|
92
93
|
}), [sharedIndex]);
|
|
93
94
|
const styles = useStyles();
|
|
95
|
+
const theme = (0, _styles.useTheme)();
|
|
94
96
|
const [outerCoordinates, updateCoordinate] = (0, _useTabCoordinates.default)(children);
|
|
95
97
|
const [innerContentsWidthList, updateInnerContentsWidth] = (0, _useTabInnerContentsWidth.default)(children);
|
|
96
98
|
const canRenderIndicator = indicatorSize === 'fit-content' ? (0, _utils.isEveryTabCoordinatesDefined)(innerContentsWidthList, children) : (0, _utils.isEveryTabCoordinatesDefined)(outerCoordinates, children);
|
|
97
99
|
const indexStore = (0, _useIndexStore.default)(sharedIndex);
|
|
98
100
|
const coordinates = (0, _react.useMemo)(() => {
|
|
101
|
+
if (outerCoordinates.length === 0) {
|
|
102
|
+
return [];
|
|
103
|
+
}
|
|
104
|
+
|
|
99
105
|
if (indicatorSize !== 'fit-content') {
|
|
100
106
|
return outerCoordinates;
|
|
101
107
|
}
|
|
@@ -113,7 +119,7 @@ const Tabs = /*#__PURE__*/(0, _react.forwardRef)(function Tabs(props, ref) {
|
|
|
113
119
|
x2: indicatorStartCoordinate + innerContentWidth
|
|
114
120
|
};
|
|
115
121
|
});
|
|
116
|
-
}, [outerCoordinates, innerContentsWidthList
|
|
122
|
+
}, [outerCoordinates, innerContentsWidthList]);
|
|
117
123
|
(0, _react.useEffect)(() => {
|
|
118
124
|
return indexStore.subscribe(newIndex => {
|
|
119
125
|
onChange === null || onChange === void 0 ? void 0 : onChange(newIndex);
|
|
@@ -180,12 +186,18 @@ const Tabs = /*#__PURE__*/(0, _react.forwardRef)(function Tabs(props, ref) {
|
|
|
180
186
|
disabled: disableIndicator,
|
|
181
187
|
initialIndex: realInitialIndex
|
|
182
188
|
}) : null;
|
|
189
|
+
const backgroundColorMap = {
|
|
190
|
+
default: theme.palette.background.base,
|
|
191
|
+
alt: theme.palette.background.alt
|
|
192
|
+
};
|
|
183
193
|
return /*#__PURE__*/_react.default.createElement(_InternalContext.default.Provider, {
|
|
184
194
|
value: {
|
|
185
195
|
indexStore
|
|
186
196
|
}
|
|
187
197
|
}, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
188
|
-
style: (0, _styles.css)([styles.root,
|
|
198
|
+
style: (0, _styles.css)([styles.root, {
|
|
199
|
+
backgroundColor: backgroundColorMap[color]
|
|
200
|
+
}, showDivider ? styles.bottomDivider : undefined, scrollable ? undefined : styles.fixedRoot, style])
|
|
189
201
|
}, scrollable ? /*#__PURE__*/_react.default.createElement(_ScrollableTabsView.default, {
|
|
190
202
|
automaticallyAdjustContentInsets: false,
|
|
191
203
|
bounces: false,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useStyles","theme","useTheme","root","fixedRoot","flexDirection","fixedTab","flex","scrollableContainer","paddingHorizontal","spacing","bottomDivider","borderBottomColor","palette","border","base","borderBottomWidth","Tabs","forwardRef","props","ref","children","initialIndex","disableIndicator","indicatorSize","keyboardDismissMode","keyboardShouldPersistTaps","onChange","scrollable","scrollViewContentContainerStyle","showDivider","style","variant","UNSTABLE_sharedIndex","onTabSelected","fallbackSharedIndex","useSyncAnimatedValue","initialValue","sharedIndex","realInitialIndex","currentIndexRef","useRef","setTab","newIndex","currentIndex","current","animatedValue","setValue","useImperativeHandle","styles","outerCoordinates","updateCoordinate","useTabCoordinates","innerContentsWidthList","updateInnerContentsWidth","useTabInnerContentsWidth","canRenderIndicator","isEveryTabCoordinatesDefined","indexStore","useIndexStore","coordinates","useMemo","map","innerContentWidth","idx","x1","outerX1","x2","outerX2","tabWidth","distanceFromParent","indicatorStartCoordinate","useEffect","subscribe","tabElements","React","Children","child","index","onTabInnerLayout","event","width","nativeEvent","layout","onLayout","x","onMouseDown","e","preventDefault","onPress","tabElement","cloneElement","enableIndicator","undefined","filter","Boolean","tabIndicator","css"],"sources":["Tabs.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 { TabVariant } from '../Tab/TabProps';\nimport type TabsProps from './TabsProps';\nimport type { TabsInstance } from './types';\nimport TabIndicator from './TabIndicator';\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 | 'bottomDivider';\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 bottomDivider: {\n borderBottomColor: theme.palette.border.base,\n borderBottomWidth: 1,\n },\n };\n};\n\nconst Tabs = forwardRef<TabsInstance, TabsProps>(function Tabs(props, ref) {\n const {\n children,\n initialIndex = 0,\n disableIndicator = false,\n indicatorSize = 'fit-content',\n keyboardDismissMode = 'none',\n keyboardShouldPersistTaps = 'never',\n onChange,\n scrollable = false,\n scrollViewContentContainerStyle,\n showDivider = false,\n style,\n variant = 'default' as TabVariant,\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, indicatorSize]);\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 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 coordinates={coordinates}\n disabled={disableIndicator}\n initialIndex={realInitialIndex}\n />\n ) : null;\n\n return (\n <InternalContext.Provider value={{ indexStore }}>\n <View\n style={css([\n styles.root,\n showDivider ? styles.bottomDivider : undefined,\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 </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,EAAE,IAAAqE,WAAA,EAAI,CACvBhD,MAAM,CAACzC,mBADgB,EAEvBqB,+BAFuB,CAAJ,CAH3B;IAOI,WAAW,EAAE+B,WAPjB;IAQI,sBAAsB,EAAE,IAR5B;IASI,UAAU,EAAE,IAThB;IAUI,YAAY,EAAErB,gBAVlB;IAWI,YAAY,EAAE,KAXlB;IAYI,8BAA8B,EAAE,KAZpC;IAaI,4BAA4B,EAAE,KAblC;IAcI,mBAAmB,EAAEd,mBAdzB;IAeI,yBAAyB,EAAEC;EAf/B,GAiBKgD,WAjBL,EAkBKsB,YAlBL,CADO,gBAsBP,6BAAC,cAAD,CAAO,QAAP,QACKtB,WADL,EAEKsB,YAFL,CA9BR,CADJ,CADJ;AAwCH,CAlLY,CAAb;eAoLe/E,I"}
|
|
1
|
+
{"version":3,"names":["useStyles","theme","useTheme","root","fixedRoot","flexDirection","fixedTab","flex","scrollableContainer","paddingHorizontal","spacing","bottomDivider","borderBottomColor","palette","border","base","borderBottomWidth","Tabs","forwardRef","props","ref","children","color","initialIndex","disableIndicator","indicatorSize","keyboardDismissMode","keyboardShouldPersistTaps","onChange","scrollable","scrollViewContentContainerStyle","showDivider","style","variant","UNSTABLE_sharedIndex","onTabSelected","fallbackSharedIndex","useSyncAnimatedValue","initialValue","sharedIndex","realInitialIndex","currentIndexRef","useRef","setTab","newIndex","currentIndex","current","animatedValue","setValue","useImperativeHandle","styles","outerCoordinates","updateCoordinate","useTabCoordinates","innerContentsWidthList","updateInnerContentsWidth","useTabInnerContentsWidth","canRenderIndicator","isEveryTabCoordinatesDefined","indexStore","useIndexStore","coordinates","useMemo","length","map","innerContentWidth","idx","x1","outerX1","x2","outerX2","tabWidth","distanceFromParent","indicatorStartCoordinate","useEffect","subscribe","tabElements","React","Children","child","index","onTabInnerLayout","event","width","nativeEvent","layout","onLayout","x","onMouseDown","e","preventDefault","onPress","tabElement","cloneElement","enableIndicator","undefined","filter","Boolean","tabIndicator","backgroundColorMap","default","background","alt","css","backgroundColor"],"sources":["Tabs.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 { TabVariant } from '../Tab';\nimport type TabsProps from './TabsProps';\nimport type { TabsColor } from './TabsProps';\nimport type { TabsInstance } from './types';\nimport TabIndicator from './TabIndicator';\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 | 'bottomDivider';\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 bottomDivider: {\n borderBottomColor: theme.palette.border.base,\n borderBottomWidth: 0.5,\n },\n };\n};\n\nconst Tabs = forwardRef<TabsInstance, TabsProps>(function Tabs(props, ref) {\n const {\n children,\n color = 'default',\n initialIndex = 0,\n disableIndicator = false,\n indicatorSize = 'fit-content',\n keyboardDismissMode = 'none',\n keyboardShouldPersistTaps = 'never',\n onChange,\n scrollable = false,\n scrollViewContentContainerStyle,\n showDivider = false,\n style,\n variant = 'default' as TabVariant,\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 theme = useTheme();\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 (outerCoordinates.length === 0) {\n return [];\n }\n\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]);\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 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 coordinates={coordinates}\n disabled={disableIndicator}\n initialIndex={realInitialIndex}\n />\n ) : null;\n\n const backgroundColorMap: Record<TabsColor, string> = {\n default: theme.palette.background.base,\n alt: theme.palette.background.alt,\n };\n\n return (\n <InternalContext.Provider value={{ indexStore }}>\n <View\n style={css([\n styles.root,\n { backgroundColor: backgroundColorMap[color] },\n showDivider ? styles.bottomDivider : undefined,\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;;AAEA;;AAEA;;AACA;;AAKA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;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PS,WAAW,GAAGmB,MAAM,CAACvC,aAAV,GAA0BoF,SAH9B,EAIPlE,UAAU,GAAGkE,SAAH,GAAe7C,MAAM,CAAC9C,SAJzB,EAKP4B,KALO,CAAJ;EADX,GASKH,UAAU,gBACP,6BAAC,2BAAD;IACI,gCAAgC,EAAE,KADtC;IAEI,OAAO,EAAE,KAFb;IAGI,qBAAqB,EAAE,IAAA0E,WAAA,EAAI,CACvBrD,MAAM,CAAC1C,mBADgB,EAEvBsB,+BAFuB,CAAJ,CAH3B;IAOI,WAAW,EAAE+B,WAPjB;IAQI,sBAAsB,EAAE,IAR5B;IASI,UAAU,EAAE,IAThB;IAUI,YAAY,EAAErB,gBAVlB;IAWI,YAAY,EAAE,KAXlB;IAYI,8BAA8B,EAAE,KAZpC;IAaI,4BAA4B,EAAE,KAblC;IAcI,mBAAmB,EAAEd,mBAdzB;IAeI,yBAAyB,EAAEC;EAf/B,GAiBKiD,WAjBL,EAkBKsB,YAlBL,CADO,gBAsBP,6BAAC,cAAD,CAAO,QAAP,QACKtB,WADL,EAEKsB,YAFL,CA/BR,CADJ,CADJ;AAyCH,CA/LY,CAAb;eAiMejF,I"}
|
|
@@ -3,7 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.tabIndicatorSizes = void 0;
|
|
6
|
+
exports.tabsColors = exports.tabIndicatorSizes = void 0;
|
|
7
|
+
const tabsColors = ['default', 'alt'];
|
|
8
|
+
exports.tabsColors = tabsColors;
|
|
7
9
|
const tabIndicatorSizes = ['fit-content', 'full'];
|
|
8
10
|
exports.tabIndicatorSizes = tabIndicatorSizes;
|
|
9
11
|
//# sourceMappingURL=TabsProps.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["tabIndicatorSizes"],"sources":["TabsProps.ts"],"sourcesContent":["import type { ReactNode, Ref } from 'react';\nimport type { ViewProps } from 'react-native';\nimport type { TabVariant } from '../Tab
|
|
1
|
+
{"version":3,"names":["tabsColors","tabIndicatorSizes"],"sources":["TabsProps.ts"],"sourcesContent":["import type { ReactNode, Ref } from 'react';\nimport type { ViewProps } from 'react-native';\nimport type { TabVariant } from '../Tab';\nimport type { ExtendedStyle, OverridableComponentProps, SyncAnimatedValue } from '../types';\nimport type { KeyboardDismissMode, KeyboardShouldPersistTaps, TabsInstance } from './types';\n\nexport const tabsColors = ['default', 'alt'] as const;\nexport type TabsColor = typeof tabsColors[number];\n\nexport const tabIndicatorSizes = ['fit-content', 'full'] as const;\nexport type TabIndicatorSize = typeof tabIndicatorSizes[number];\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 * The color of the component. It supports those theme colors that make sense for this component.\n * @default 'default'\n */\n color?: TabsColor;\n\n /**\n * If `true`, the indicator is disabled.\n * @default false\n */\n disableIndicator?: boolean;\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 'fit-content'\n */\n indicatorSize?: TabIndicatorSize;\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 * Determines whether to display the bottom border.\n * @default false\n */\n showDivider?: boolean;\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":";;;;;;AAMO,MAAMA,UAAU,GAAG,CAAC,SAAD,EAAY,KAAZ,CAAnB;;AAGA,MAAMC,iBAAiB,GAAG,CAAC,aAAD,EAAgB,MAAhB,CAA1B"}
|
|
@@ -6,11 +6,25 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
Object.defineProperty(exports, "default", {
|
|
7
7
|
enumerable: true,
|
|
8
8
|
get: function () {
|
|
9
|
-
return
|
|
9
|
+
return _Tabs.default;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
|
+
Object.defineProperty(exports, "tabIndicatorSizes", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () {
|
|
15
|
+
return _TabsProps.tabIndicatorSizes;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
Object.defineProperty(exports, "tabsColors", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function () {
|
|
21
|
+
return _TabsProps.tabsColors;
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
var _Tabs = _interopRequireDefault(require("./Tabs"));
|
|
12
26
|
|
|
13
|
-
var
|
|
27
|
+
var _TabsProps = require("./TabsProps");
|
|
14
28
|
|
|
15
29
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
16
30
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export { default } from './
|
|
1
|
+
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export { default } from './Tabs';\nexport type { default as TabsProps } from './TabsProps';\nexport { tabIndicatorSizes, tabsColors } from './TabsProps';\nexport type { TabsInstance } from './types';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AAEA"}
|
|
@@ -111,7 +111,6 @@ const TextField = /*#__PURE__*/_react.default.forwardRef(function TextField(prop
|
|
|
111
111
|
style: containerStyle
|
|
112
112
|
}, isSearch ? isLoading ? /*#__PURE__*/_react.default.createElement(_icons.LoadingSpinner, null) : /*#__PURE__*/_react.default.createElement(_icons.Search, {
|
|
113
113
|
color: 'base',
|
|
114
|
-
enableV2: true,
|
|
115
114
|
height: 18,
|
|
116
115
|
width: 18
|
|
117
116
|
}) : null, /*#__PURE__*/_react.default.createElement(_reactNative.TextInput, _extends({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["styles","StyleSheet","create","root","alignItems","flexGrow","input","secureToggleButton","padding","TextField","React","forwardRef","props","ref","autoFocus","containerStyle","containerStyleProp","editable","hint","isLoading","onBlur","onChangeText","onChangeTextProp","onFocus","placeholderTextColor","placeholderTextColorProp","secureTextEntry","secureTextEntryProp","showClearButton","showClearButtonProp","status","style","styleProp","title","value","variant","otherProps","isSearch","disabled","theme","useTheme","isFocused","setIsFocused","useState","setSecureTextEntry","variantStyles","useVariantStyleMap","handleBlur","event","handleFocus","handleSecureTogglePress","current","handleChangeText","text","handleClear","titleFontStyle","createFontStyle","color","palette","strong","inputStyle","css","Platform","OS","outlineWidth","disabledLabel","opacity","length","hintStyle"],"sources":["TextField.tsx"],"sourcesContent":["import React, { useState } from 'react';\nimport type { NativeSyntheticEvent, TextInputFocusEventData } from 'react-native';\nimport { Platform, StyleSheet, Text, TextInput, View } from 'react-native';\nimport type { FountainUiStyle } from '@fountain-ui/styles';\nimport { css } from '@fountain-ui/styles';\nimport IconButton from '../IconButton/IconButton';\nimport { Clear, EyeOff, EyeOn, LoadingSpinner, Search } from '../internal/icons';\nimport Row from '../Row';\nimport { createFontStyle, useTheme } from '../styles';\nimport type TextFieldProps from './TextFieldProps';\nimport type { TextFieldStatus, TextFieldVariant } from './TextFieldProps';\nimport useVariantStyleMap from './useVariantStyleMap';\n\nconst styles = StyleSheet.create({\n root: {\n alignItems: 'center',\n flexGrow: 1,\n },\n input: {\n flexGrow: 1,\n },\n secureToggleButton: {\n alignItems: 'flex-end',\n padding: 0,\n },\n});\n\nconst TextField = React.forwardRef<TextInput, TextFieldProps>(function TextField(props, ref) {\n const {\n autoFocus,\n containerStyle: containerStyleProp,\n editable = true,\n hint,\n isLoading,\n onBlur,\n onChangeText: onChangeTextProp,\n onFocus,\n placeholderTextColor: placeholderTextColorProp,\n secureTextEntry: secureTextEntryProp,\n showClearButton: showClearButtonProp,\n status = 'default' as TextFieldStatus,\n style: styleProp,\n title,\n value,\n variant = 'default' as TextFieldVariant,\n ...otherProps\n } = props;\n\n const isSearch = variant === 'search';\n\n const disabled = !editable || isLoading;\n\n const theme = useTheme();\n\n const [isFocused, setIsFocused] = useState<boolean>(autoFocus ?? false);\n const [secureTextEntry, setSecureTextEntry] = useState<boolean>(secureTextEntryProp ?? false);\n\n const variantStyles = useVariantStyleMap(variant, status, isFocused);\n\n const handleBlur = (event: NativeSyntheticEvent<TextInputFocusEventData>) => {\n setIsFocused(false);\n onBlur?.(event);\n };\n\n const handleFocus = (event: NativeSyntheticEvent<TextInputFocusEventData>) => {\n setIsFocused(true);\n onFocus?.(event);\n };\n\n const handleSecureTogglePress = () => {\n setSecureTextEntry((current) => !current);\n };\n\n const handleChangeText = (text: string) => {\n onChangeTextProp?.(text);\n };\n\n const handleClear = () => {\n handleChangeText('');\n };\n\n const showClearButton = showClearButtonProp ?? isSearch;\n\n const titleFontStyle = createFontStyle(theme, {\n // selector: (typography) => typography.caption1['semiBold']\n color: theme.palette.text.strong,\n });\n\n const inputStyle = css([\n styles.input,\n variantStyles.inputStyle,\n Platform.OS === 'web' ? { outlineWidth: 0 } as FountainUiStyle : {},\n styleProp,\n ]);\n\n const placeholderTextColor = placeholderTextColorProp ?? theme.palette.status.disabledLabel;\n\n const containerStyle = css([\n styles.root,\n variantStyles.containerStyle,\n { opacity: disabled ? 0.3 : 1 },\n containerStyleProp,\n ]);\n\n return (\n <View>\n {title && !isSearch ? (\n <Text\n children={title}\n style={titleFontStyle}\n />\n ) : null}\n\n <Row style={containerStyle}>\n {isSearch ? (\n isLoading ? (\n <LoadingSpinner/>\n ) : (\n <Search\n color={'base'}\n enableV2={true}\n height={18}\n width={18}\n />\n )\n ) : null}\n\n <TextInput\n autoFocus={autoFocus}\n editable={!disabled}\n onBlur={handleBlur}\n onChangeText={handleChangeText}\n onFocus={handleFocus}\n placeholderTextColor={placeholderTextColor}\n ref={ref}\n secureTextEntry={secureTextEntry}\n style={inputStyle}\n value={value}\n {...otherProps}\n />\n\n {showClearButton && value?.length && value.length > 0 ? (\n <IconButton\n color={'base'}\n children={\n <Clear\n height={13.75}\n width={15}\n />\n }\n onPress={handleClear}\n />\n ) : null}\n\n {secureTextEntryProp && !isSearch ? (\n <IconButton\n color={'base'}\n onPress={handleSecureTogglePress}\n style={styles.secureToggleButton}\n >\n {secureTextEntry ? (\n <EyeOff\n height={19}\n width={17.42}\n />\n ) : (\n <EyeOn\n height={19}\n width={17.42}\n />\n )}\n </IconButton>\n ) : null}\n </Row>\n\n {hint && !isSearch ? (\n <Text\n children={hint}\n style={variantStyles.hintStyle}\n />\n ) : null}\n </View>\n );\n});\n\nexport default TextField;\n"],"mappings":";;;;;;;AAAA;;AAEA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AAGA;;;;;;;;;;AAEA,MAAMA,MAAM,GAAGC,uBAAA,CAAWC,MAAX,CAAkB;EAC7BC,IAAI,EAAE;IACFC,UAAU,EAAE,QADV;IAEFC,QAAQ,EAAE;EAFR,CADuB;EAK7BC,KAAK,EAAE;IACHD,QAAQ,EAAE;EADP,CALsB;EAQ7BE,kBAAkB,EAAE;IAChBH,UAAU,EAAE,UADI;IAEhBI,OAAO,EAAE;EAFO;AARS,CAAlB,CAAf;;AAcA,MAAMC,SAAS,gBAAGC,cAAA,CAAMC,UAAN,CA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B,CAAlB;;eA8Je3D,S"}
|
|
1
|
+
{"version":3,"names":["styles","StyleSheet","create","root","alignItems","flexGrow","input","secureToggleButton","padding","TextField","React","forwardRef","props","ref","autoFocus","containerStyle","containerStyleProp","editable","hint","isLoading","onBlur","onChangeText","onChangeTextProp","onFocus","placeholderTextColor","placeholderTextColorProp","secureTextEntry","secureTextEntryProp","showClearButton","showClearButtonProp","status","style","styleProp","title","value","variant","otherProps","isSearch","disabled","theme","useTheme","isFocused","setIsFocused","useState","setSecureTextEntry","variantStyles","useVariantStyleMap","handleBlur","event","handleFocus","handleSecureTogglePress","current","handleChangeText","text","handleClear","titleFontStyle","createFontStyle","color","palette","strong","inputStyle","css","Platform","OS","outlineWidth","disabledLabel","opacity","length","hintStyle"],"sources":["TextField.tsx"],"sourcesContent":["import React, { useState } from 'react';\nimport type { NativeSyntheticEvent, TextInputFocusEventData } from 'react-native';\nimport { Platform, StyleSheet, Text, TextInput, View } from 'react-native';\nimport type { FountainUiStyle } from '@fountain-ui/styles';\nimport { css } from '@fountain-ui/styles';\nimport IconButton from '../IconButton/IconButton';\nimport { Clear, EyeOff, EyeOn, LoadingSpinner, Search } from '../internal/icons';\nimport Row from '../Row';\nimport { createFontStyle, useTheme } from '../styles';\nimport type TextFieldProps from './TextFieldProps';\nimport type { TextFieldStatus, TextFieldVariant } from './TextFieldProps';\nimport useVariantStyleMap from './useVariantStyleMap';\n\nconst styles = StyleSheet.create({\n root: {\n alignItems: 'center',\n flexGrow: 1,\n },\n input: {\n flexGrow: 1,\n },\n secureToggleButton: {\n alignItems: 'flex-end',\n padding: 0,\n },\n});\n\nconst TextField = React.forwardRef<TextInput, TextFieldProps>(function TextField(props, ref) {\n const {\n autoFocus,\n containerStyle: containerStyleProp,\n editable = true,\n hint,\n isLoading,\n onBlur,\n onChangeText: onChangeTextProp,\n onFocus,\n placeholderTextColor: placeholderTextColorProp,\n secureTextEntry: secureTextEntryProp,\n showClearButton: showClearButtonProp,\n status = 'default' as TextFieldStatus,\n style: styleProp,\n title,\n value,\n variant = 'default' as TextFieldVariant,\n ...otherProps\n } = props;\n\n const isSearch = variant === 'search';\n\n const disabled = !editable || isLoading;\n\n const theme = useTheme();\n\n const [isFocused, setIsFocused] = useState<boolean>(autoFocus ?? false);\n const [secureTextEntry, setSecureTextEntry] = useState<boolean>(secureTextEntryProp ?? false);\n\n const variantStyles = useVariantStyleMap(variant, status, isFocused);\n\n const handleBlur = (event: NativeSyntheticEvent<TextInputFocusEventData>) => {\n setIsFocused(false);\n onBlur?.(event);\n };\n\n const handleFocus = (event: NativeSyntheticEvent<TextInputFocusEventData>) => {\n setIsFocused(true);\n onFocus?.(event);\n };\n\n const handleSecureTogglePress = () => {\n setSecureTextEntry((current) => !current);\n };\n\n const handleChangeText = (text: string) => {\n onChangeTextProp?.(text);\n };\n\n const handleClear = () => {\n handleChangeText('');\n };\n\n const showClearButton = showClearButtonProp ?? isSearch;\n\n const titleFontStyle = createFontStyle(theme, {\n // selector: (typography) => typography.caption1['semiBold']\n color: theme.palette.text.strong,\n });\n\n const inputStyle = css([\n styles.input,\n variantStyles.inputStyle,\n Platform.OS === 'web' ? { outlineWidth: 0 } as FountainUiStyle : {},\n styleProp,\n ]);\n\n const placeholderTextColor = placeholderTextColorProp ?? theme.palette.status.disabledLabel;\n\n const containerStyle = css([\n styles.root,\n variantStyles.containerStyle,\n { opacity: disabled ? 0.3 : 1 },\n containerStyleProp,\n ]);\n\n return (\n <View>\n {title && !isSearch ? (\n <Text\n children={title}\n style={titleFontStyle}\n />\n ) : null}\n\n <Row style={containerStyle}>\n {isSearch ? (\n isLoading ? (\n <LoadingSpinner/>\n ) : (\n <Search\n color={'base'}\n height={18}\n width={18}\n />\n )\n ) : null}\n\n <TextInput\n autoFocus={autoFocus}\n editable={!disabled}\n onBlur={handleBlur}\n onChangeText={handleChangeText}\n onFocus={handleFocus}\n placeholderTextColor={placeholderTextColor}\n ref={ref}\n secureTextEntry={secureTextEntry}\n style={inputStyle}\n value={value}\n {...otherProps}\n />\n\n {showClearButton && value?.length && value.length > 0 ? (\n <IconButton\n color={'base'}\n children={\n <Clear\n height={13.75}\n width={15}\n />\n }\n onPress={handleClear}\n />\n ) : null}\n\n {secureTextEntryProp && !isSearch ? (\n <IconButton\n color={'base'}\n onPress={handleSecureTogglePress}\n style={styles.secureToggleButton}\n >\n {secureTextEntry ? (\n <EyeOff\n height={19}\n width={17.42}\n />\n ) : (\n <EyeOn\n height={19}\n width={17.42}\n />\n )}\n </IconButton>\n ) : null}\n </Row>\n\n {hint && !isSearch ? (\n <Text\n children={hint}\n style={variantStyles.hintStyle}\n />\n ) : null}\n </View>\n );\n});\n\nexport default TextField;\n"],"mappings":";;;;;;;AAAA;;AAEA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AAGA;;;;;;;;;;AAEA,MAAMA,MAAM,GAAGC,uBAAA,CAAWC,MAAX,CAAkB;EAC7BC,IAAI,EAAE;IACFC,UAAU,EAAE,QADV;IAEFC,QAAQ,EAAE;EAFR,CADuB;EAK7BC,KAAK,EAAE;IACHD,QAAQ,EAAE;EADP,CALsB;EAQ7BE,kBAAkB,EAAE;IAChBH,UAAU,EAAE,UADI;IAEhBI,OAAO,EAAE;EAFO;AARS,CAAlB,CAAf;;AAcA,MAAMC,SAAS,gBAAGC,cAAA,CAAMC,UAAN,CAA4C,SAASF,SAAT,CAAmBG,KAAnB,EAA0BC,GAA1B,EAA+B;EACzF,MAAM;IACFC,SADE;IAEFC,cAAc,EAAEC,kBAFd;IAGFC,QAAQ,GAAG,IAHT;IAIFC,IAJE;IAKFC,SALE;IAMFC,MANE;IAOFC,YAAY,EAAEC,gBAPZ;IAQFC,OARE;IASFC,oBAAoB,EAAEC,wBATpB;IAUFC,eAAe,EAAEC,mBAVf;IAWFC,eAAe,EAAEC,mBAXf;IAYFC,MAAM,GAAG,SAZP;IAaFC,KAAK,EAAEC,SAbL;IAcFC,KAdE;IAeFC,KAfE;IAgBFC,OAAO,GAAG,SAhBR;IAiBF,GAAGC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