diff --git a/src/components/Alert/Alert.jsx b/src/components/Alert/Alert.jsx index 34bf8623c..fd74236dd 100644 --- a/src/components/Alert/Alert.jsx +++ b/src/components/Alert/Alert.jsx @@ -1,9 +1,7 @@ import PropTypes from 'prop-types'; import React, { useContext } from 'react'; -import { - RUIContext, - withGlobalProps, -} from '../../provider'; +import { withGlobalProps } from '../../providers/globalProps'; +import { TranslationsContext } from '../../providers/translations'; import { classNames } from '../../utils/classNames'; import { transferProps } from '../../utils/transferProps'; import { getRootColorClassName } from '../_helpers/getRootColorClassName'; @@ -17,7 +15,7 @@ export const Alert = ({ onClose, ...restProps }) => { - const { translations } = useContext(RUIContext); + const translations = useContext(TranslationsContext); return (
Dark alert: Stands out on light backgrounds. + {' '} ``` diff --git a/src/components/Badge/Badge.jsx b/src/components/Badge/Badge.jsx index 653938fff..aa887a5ad 100644 --- a/src/components/Badge/Badge.jsx +++ b/src/components/Badge/Badge.jsx @@ -1,6 +1,6 @@ import PropTypes from 'prop-types'; import React from 'react'; -import { withGlobalProps } from '../../provider'; +import { withGlobalProps } from '../../providers/globalProps'; import { classNames } from '../../utils/classNames'; import { transferProps } from '../../utils/transferProps'; import { getRootColorClassName } from '../_helpers/getRootColorClassName'; diff --git a/src/components/Button/Button.jsx b/src/components/Button/Button.jsx index c934f13e1..320563181 100644 --- a/src/components/Button/Button.jsx +++ b/src/components/Button/Button.jsx @@ -1,6 +1,6 @@ import PropTypes from 'prop-types'; import React, { useContext } from 'react'; -import { withGlobalProps } from '../../provider'; +import { withGlobalProps } from '../../providers/globalProps'; import { classNames } from '../../utils/classNames'; import { transferProps } from '../../utils/transferProps'; import { getRootColorClassName } from '../_helpers/getRootColorClassName'; diff --git a/src/components/ButtonGroup/ButtonGroup.jsx b/src/components/ButtonGroup/ButtonGroup.jsx index e894fb92a..450a42ddd 100644 --- a/src/components/ButtonGroup/ButtonGroup.jsx +++ b/src/components/ButtonGroup/ButtonGroup.jsx @@ -2,7 +2,7 @@ import PropTypes from 'prop-types'; import React, { useMemo, } from 'react'; -import { withGlobalProps } from '../../provider'; +import { withGlobalProps } from '../../providers/globalProps'; import { classNames } from '../../utils/classNames'; import { transferProps } from '../../utils/transferProps'; import { getRootPriorityClassName } from '../_helpers/getRootPriorityClassName'; diff --git a/src/components/Card/Card.jsx b/src/components/Card/Card.jsx index 8616ee555..69045a962 100644 --- a/src/components/Card/Card.jsx +++ b/src/components/Card/Card.jsx @@ -1,6 +1,6 @@ import PropTypes from 'prop-types'; import React from 'react'; -import { withGlobalProps } from '../../provider'; +import { withGlobalProps } from '../../providers/globalProps'; import { classNames } from '../../utils/classNames'; import { transferProps } from '../../utils/transferProps'; import { getRootColorClassName } from '../_helpers/getRootColorClassName'; diff --git a/src/components/Card/CardBody.jsx b/src/components/Card/CardBody.jsx index 729ab157c..9037f1eca 100644 --- a/src/components/Card/CardBody.jsx +++ b/src/components/Card/CardBody.jsx @@ -1,6 +1,6 @@ import PropTypes from 'prop-types'; import React from 'react'; -import { withGlobalProps } from '../../provider'; +import { withGlobalProps } from '../../providers/globalProps'; import { transferProps } from '../../utils/transferProps'; import styles from './Card.module.scss'; diff --git a/src/components/Card/CardFooter.jsx b/src/components/Card/CardFooter.jsx index 5da62a79b..953c8141c 100644 --- a/src/components/Card/CardFooter.jsx +++ b/src/components/Card/CardFooter.jsx @@ -1,7 +1,7 @@ import PropTypes from 'prop-types'; import React from 'react'; -import { withGlobalProps } from '../../provider'; import { transferProps } from '../../utils/transferProps'; +import { withGlobalProps } from '../../providers/globalProps'; import { isChildrenEmpty } from '../_helpers/isChildrenEmpty'; import styles from './Card.module.scss'; diff --git a/src/components/CheckboxField/CheckboxField.jsx b/src/components/CheckboxField/CheckboxField.jsx index e3eed3794..2c35432d5 100644 --- a/src/components/CheckboxField/CheckboxField.jsx +++ b/src/components/CheckboxField/CheckboxField.jsx @@ -1,6 +1,6 @@ import PropTypes from 'prop-types'; import React, { useContext } from 'react'; -import { withGlobalProps } from '../../provider'; +import { withGlobalProps } from '../../providers/globalProps'; import { classNames } from '../../utils/classNames'; import { transferProps } from '../../utils/transferProps'; import { getRootValidationStateClassName } from '../_helpers/getRootValidationStateClassName'; diff --git a/src/components/FileInputField/FileInputField.jsx b/src/components/FileInputField/FileInputField.jsx index 0b7ee6a6e..113139c6a 100644 --- a/src/components/FileInputField/FileInputField.jsx +++ b/src/components/FileInputField/FileInputField.jsx @@ -1,6 +1,6 @@ import PropTypes from 'prop-types'; import React, { useContext } from 'react'; -import { withGlobalProps } from '../../provider'; +import { withGlobalProps } from '../../providers/globalProps'; import { classNames } from '../../utils/classNames'; import { transferProps } from '../../utils/transferProps'; import { getRootValidationStateClassName } from '../_helpers/getRootValidationStateClassName'; diff --git a/src/components/FormLayout/FormLayout.jsx b/src/components/FormLayout/FormLayout.jsx index f4ec3b607..2b385c5d1 100644 --- a/src/components/FormLayout/FormLayout.jsx +++ b/src/components/FormLayout/FormLayout.jsx @@ -1,6 +1,6 @@ import PropTypes from 'prop-types'; import React, { useMemo } from 'react'; -import { withGlobalProps } from '../../provider'; +import { withGlobalProps } from '../../providers/globalProps'; import { classNames } from '../../utils/classNames'; import { transferProps } from '../../utils/transferProps'; import { isChildrenEmpty } from '../_helpers/isChildrenEmpty'; diff --git a/src/components/FormLayout/FormLayoutCustomField.jsx b/src/components/FormLayout/FormLayoutCustomField.jsx index 56ed69774..933d8210c 100644 --- a/src/components/FormLayout/FormLayoutCustomField.jsx +++ b/src/components/FormLayout/FormLayoutCustomField.jsx @@ -1,6 +1,6 @@ import PropTypes from 'prop-types'; import React, { useContext } from 'react'; -import { withGlobalProps } from '../../provider'; +import { withGlobalProps } from '../../providers/globalProps'; import { classNames } from '../../utils/classNames'; import { transferProps } from '../../utils/transferProps'; import { getRootSizeClassName } from '../_helpers/getRootSizeClassName'; diff --git a/src/components/Grid/Grid.jsx b/src/components/Grid/Grid.jsx index 8acae0fad..3dd7b4902 100644 --- a/src/components/Grid/Grid.jsx +++ b/src/components/Grid/Grid.jsx @@ -1,6 +1,6 @@ import PropTypes from 'prop-types'; import React from 'react'; -import { withGlobalProps } from '../../provider'; +import { withGlobalProps } from '../../providers/globalProps'; import { transferProps } from '../../utils/transferProps'; import { isChildrenEmpty } from '../_helpers/isChildrenEmpty'; import { generateResponsiveCustomProperties } from './_helpers/generateResponsiveCustomProperties'; diff --git a/src/components/Grid/GridSpan.jsx b/src/components/Grid/GridSpan.jsx index 5630a7588..a4f9ad9f8 100644 --- a/src/components/Grid/GridSpan.jsx +++ b/src/components/Grid/GridSpan.jsx @@ -1,6 +1,6 @@ import PropTypes from 'prop-types'; import React from 'react'; -import { withGlobalProps } from '../../provider'; +import { withGlobalProps } from '../../providers/globalProps'; import { transferProps } from '../../utils/transferProps'; import { isChildrenEmpty } from '../_helpers/isChildrenEmpty'; import { generateResponsiveCustomProperties } from './_helpers/generateResponsiveCustomProperties'; diff --git a/src/components/InputGroup/InputGroup.jsx b/src/components/InputGroup/InputGroup.jsx index 57e89f675..dcb230bec 100644 --- a/src/components/InputGroup/InputGroup.jsx +++ b/src/components/InputGroup/InputGroup.jsx @@ -3,8 +3,7 @@ import React, { useContext, useMemo, } from 'react'; -import { Text } from '../Text'; -import { withGlobalProps } from '../../provider'; +import { withGlobalProps } from '../../providers/globalProps'; import { classNames } from '../../utils/classNames'; import { transferProps } from '../../utils/transferProps'; import { getRootSizeClassName } from '../_helpers/getRootSizeClassName'; @@ -12,6 +11,7 @@ import { getRootValidationStateClassName } from '../_helpers/getRootValidationSt import { isChildrenEmpty } from '../_helpers/isChildrenEmpty'; import { resolveContextOrProp } from '../_helpers/resolveContextOrProp'; import { FormLayoutContext } from '../FormLayout'; +import { Text } from '../Text'; import { InputGroupContext } from './InputGroupContext'; import styles from './InputGroup.module.scss'; diff --git a/src/components/Modal/Modal.jsx b/src/components/Modal/Modal.jsx index d24b0f15a..fd95d7a1a 100644 --- a/src/components/Modal/Modal.jsx +++ b/src/components/Modal/Modal.jsx @@ -1,7 +1,7 @@ import PropTypes from 'prop-types'; import React, { useRef } from 'react'; import { createPortal } from 'react-dom'; -import { withGlobalProps } from '../../provider'; +import { withGlobalProps } from '../../providers/globalProps'; import { classNames } from '../../utils/classNames'; import { transferProps } from '../../utils/transferProps'; import { getPositionClassName } from './_helpers/getPositionClassName'; diff --git a/src/components/Modal/ModalBody.jsx b/src/components/Modal/ModalBody.jsx index d81822b9a..0f54c497d 100644 --- a/src/components/Modal/ModalBody.jsx +++ b/src/components/Modal/ModalBody.jsx @@ -1,6 +1,6 @@ import PropTypes from 'prop-types'; import React from 'react'; -import { withGlobalProps } from '../../provider'; +import { withGlobalProps } from '../../providers/globalProps'; import { classNames } from '../../utils/classNames'; import { transferProps } from '../../utils/transferProps'; import { isChildrenEmpty } from '../_helpers/isChildrenEmpty'; diff --git a/src/components/Modal/ModalCloseButton.jsx b/src/components/Modal/ModalCloseButton.jsx index 2144269f0..eeecccf64 100644 --- a/src/components/Modal/ModalCloseButton.jsx +++ b/src/components/Modal/ModalCloseButton.jsx @@ -1,9 +1,7 @@ import PropTypes from 'prop-types'; import React, { useContext } from 'react'; -import { - RUIContext, - withGlobalProps, -} from '../../provider'; +import { TranslationsContext } from '../../providers/translations'; +import { withGlobalProps } from '../../providers/globalProps'; import { transferProps } from '../../utils/transferProps'; import styles from './ModalCloseButton.module.scss'; @@ -13,7 +11,7 @@ export const ModalCloseButton = React.forwardRef((props, ref) => { ...restProps } = props; - const { translations } = useContext(RUIContext); + const translations = useContext(TranslationsContext); return (
- + ); }); ``` @@ -126,7 +126,7 @@ React.createElement(() => { React UI docs. You may not need it in your application. */} return ( -