diff --git a/resources/web/deployment.yaml b/resources/web/deployment.yaml index 37b6eb12de..7f791a4e30 100644 --- a/resources/web/deployment.yaml +++ b/resources/web/deployment.yaml @@ -16,7 +16,7 @@ spec: spec: containers: - name: busola - image: europe-docker.pkg.dev/kyma-project/dev/busola-web:PR-2590 + image: europe-docker.pkg.dev/kyma-project/dev/busola-web:PR-2585 imagePullPolicy: Always resources: requests: diff --git a/src/components/BusolaExtensions/ColumnsInput.js b/src/components/BusolaExtensions/ColumnsInput.js index 9cf7497c3a..0adf9c2d58 100644 --- a/src/components/BusolaExtensions/ColumnsInput.js +++ b/src/components/BusolaExtensions/ColumnsInput.js @@ -1,7 +1,6 @@ -import React from 'react'; import { useTranslation } from 'react-i18next'; -import { MessageStrip } from '@ui5/webcomponents-react'; -import { FormInput, Checkbox } from 'fundamental-react'; +import { CheckBox, MessageStrip } from '@ui5/webcomponents-react'; +import { FormInput } from 'fundamental-react'; export function ColumnsInput({ value: columns, setValue: setColumns }) { const { t } = useTranslation(); @@ -17,7 +16,7 @@ export function ColumnsInput({ value: columns, setValue: setColumns }) { return columns.map(value => { return (
- { value.isSelected = e.target.checked; diff --git a/src/components/BusolaExtensions/ExtensibilityStarterForm.scss b/src/components/BusolaExtensions/ExtensibilityStarterForm.scss index 2ba1957af4..df19c2d43b 100644 --- a/src/components/BusolaExtensions/ExtensibilityStarterForm.scss +++ b/src/components/BusolaExtensions/ExtensibilityStarterForm.scss @@ -3,8 +3,8 @@ grid-template-columns: 1fr 8fr 8fr 3fr; column-gap: 20px; - .fd-checkbox__label { - padding: 6px; + ui5-checkbox { + margin-top: -6.75px; } } diff --git a/src/components/Extensibility/components-form/Modules/Modules.js b/src/components/Extensibility/components-form/Modules/Modules.js index 3c9a770ce5..42ce964ad7 100644 --- a/src/components/Extensibility/components-form/Modules/Modules.js +++ b/src/components/Extensibility/components-form/Modules/Modules.js @@ -1,11 +1,9 @@ -import React from 'react'; import { useUIStore } from '@ui-schema/ui-schema'; import { useJsonata } from '../../hooks/useJsonata'; import { useVariables } from '../../hooks/useVariables'; import { fromJS } from 'immutable'; -import { Icon, Link, MessageStrip } from '@ui5/webcomponents-react'; -import { Checkbox } from 'fundamental-react'; +import { CheckBox, Icon, Link, MessageStrip } from '@ui5/webcomponents-react'; import './Modules.scss'; import { useGetTranslation } from 'components/Extensibility/helpers'; @@ -18,7 +16,7 @@ export function Modules({ storeKeys, resource, onChange, schema, required }) { const { t } = useTranslation(); const sectionName = schema.get('name'); - const setCheckbox = (fullValue, key, entryValue, checked, index) => { + const setCheckbox = (key, entryValue, checked, index) => { if (checked) { onChange({ storeKeys, @@ -140,13 +138,11 @@ export function Modules({ storeKeys, resource, onChange, schema, required }) { return ( <>
-
+
{index === 0 ? `${sectionName}:` : ''}
- { setCheckbox( @@ -161,10 +157,10 @@ export function Modules({ storeKeys, resource, onChange, schema, required }) { : index, ); }} - > - {name} - + text={name} + /> {t('extensibility.widgets.modules.documentation')} (
- setWithMemory(!withMemory)} dir="rtl" - > - {t('namespaces.create-modal.create-resource-quota')} - + text={t('namespaces.create-modal.create-resource-quota')} + /> { @@ -282,14 +281,12 @@ export function NamespaceCreate({ title={t('namespaces.create-modal.apply-limits')} actions={() => (
- setWithLimits(!withLimits)} dir="rtl" - > - {t('namespaces.create-modal.create-limit-range')} - + text={t('namespaces.create-modal.create-limit-range')} + /> { diff --git a/src/shared/ResourceForm/inputs/Checkboxes.js b/src/shared/ResourceForm/inputs/Checkboxes.js index 4484739c7f..a2253bfc9b 100644 --- a/src/shared/ResourceForm/inputs/Checkboxes.js +++ b/src/shared/ResourceForm/inputs/Checkboxes.js @@ -1,8 +1,7 @@ -import React from 'react'; -import { Checkbox, FormRadioGroup } from 'fundamental-react'; +import { FormRadioGroup } from 'fundamental-react'; import { Tooltip } from 'shared/components/Tooltip/Tooltip'; -import { Icon } from '@ui5/webcomponents-react'; +import { CheckBox, Icon } from '@ui5/webcomponents-react'; export function Checkboxes({ value = [], @@ -30,20 +29,14 @@ export function Checkboxes({ ref={inputRef} style={{ opacity: 0, position: 'absolute', left: '-1000px' }} /> - {options.map(({ key, text, description }, index) => ( + {options.map(({ key, text, description }) => (
-
- updateValue(key, e.target.checked)} - > - {text} - -
+ updateValue(key, e.target.checked)} + text={text} + />
{description && ( diff --git a/src/shared/components/Checkbox/Checkbox.js b/src/shared/components/Checkbox/Checkbox.js deleted file mode 100644 index 42b280b2cd..0000000000 --- a/src/shared/components/Checkbox/Checkbox.js +++ /dev/null @@ -1,109 +0,0 @@ -import { FormItem, FormLabel } from 'fundamental-react'; -import PropTypes from 'prop-types'; -import React, { useEffect, useRef, useState } from 'react'; - -const getCheckStatus = (checked, indeterminate) => { - if (indeterminate) { - return 'mixed'; - } else if (checked) { - return 'true'; - } else { - return 'false'; - } -}; - -export const Checkbox = React.forwardRef( - ( - { - className, - initialChecked = false, - disabled, - disableStyles, - id, - indeterminate, - inline, - inputProps, - labelProps, - name, - onChange, - value, - ...props - }, - ref, - ) => { - const [checked, setChecked] = useState(initialChecked); - const inputEl = useRef(); - - useEffect(() => { - inputEl && (inputEl.current.indeterminate = indeterminate); - }); - - useEffect(() => { - setChecked(initialChecked); - }, [initialChecked]); - - return ( - - { - const newChecked = !checked; - setChecked(newChecked); - onChange(e, newChecked); - }} - ref={inputEl} - type="checkbox" - /> - - {value} - - - ); - }, -); - -Checkbox.displayName = 'Checkbox'; - -Checkbox.propTypes = { - className: PropTypes.string, - - initialChecked: PropTypes.bool, - disabled: PropTypes.bool, - disableStyles: PropTypes.bool, - id: PropTypes.string, - indeterminate: PropTypes.bool, - inline: PropTypes.bool, - inputProps: PropTypes.object, - labelProps: PropTypes.object, - name: PropTypes.string, - value: PropTypes.string, - onChange: PropTypes.func, -}; - -Checkbox.defaultProps = { - onChange: () => void 0, -}; - -Checkbox.propDescriptions = { - checked: - 'Set to **true** when checkbox input is checked and a controlled component.', - defaultChecked: - 'Set to **true** when the checkbox input is checked and an uncontrolled component.', - indeterminate: 'When true, the checkbox renders a "mixed" state.', - inline: '_INTERNAL USE ONLY._', - inputProps: 'Props to be spread to the component `` element.', - labelProps: 'Props to be spread to the component `