)
onClose={onClose}
body={body}
primaryButton={
-
{translate(
isOptimizing
? 'quality_gates.cayc.review_optimize_modal.confirm_text'
: 'quality_gates.cayc.review_update_modal.confirm_text',
)}
-
+
}
secondaryButtonLabel={translate('close')}
/>
diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/CopyQualityGateForm.tsx b/server/sonar-web/src/main/js/apps/quality-gates/components/CopyQualityGateForm.tsx
index ee09f47d308..5f9eb9f44a3 100644
--- a/server/sonar-web/src/main/js/apps/quality-gates/components/CopyQualityGateForm.tsx
+++ b/server/sonar-web/src/main/js/apps/quality-gates/components/CopyQualityGateForm.tsx
@@ -17,7 +17,8 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import { ButtonPrimary, FormField, InputField, Modal } from 'design-system';
+import { Button, ButtonVariety } from '@sonarsource/echoes-react';
+import { FormField, InputField, Modal } from 'design-system';
import * as React from 'react';
import { useRouter } from '~sonar-aligned/components/hoc/withRouter';
import MandatoryFieldsExplanation from '../../../components/ui/MandatoryFieldsExplanation';
@@ -77,9 +78,15 @@ export default function CopyQualityGateForm({ qualityGate, onClose }: Readonly
}
primaryButton={
-
+
{translate('copy')}
-
+
}
secondaryButtonLabel={translate('cancel')}
/>
diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/CreateQualityGateForm.tsx b/server/sonar-web/src/main/js/apps/quality-gates/components/CreateQualityGateForm.tsx
index 05d5ddc3f1c..d823757a924 100644
--- a/server/sonar-web/src/main/js/apps/quality-gates/components/CreateQualityGateForm.tsx
+++ b/server/sonar-web/src/main/js/apps/quality-gates/components/CreateQualityGateForm.tsx
@@ -17,7 +17,8 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import { ButtonSecondary, FormField, InputField, Modal } from 'design-system';
+import { Button } from '@sonarsource/echoes-react';
+import { FormField, InputField, Modal } from 'design-system';
import * as React from 'react';
import { useRouter } from '~sonar-aligned/components/hoc/withRouter';
import MandatoryFieldsExplanation from '../../../components/ui/MandatoryFieldsExplanation';
@@ -82,14 +83,14 @@ export default function CreateQualityGateForm({ onClose }: Readonly) {
isScrollable
body={body}
primaryButton={
-
{translate('quality_gate.create')}
-
+
}
secondaryButtonLabel={translate('cancel')}
/>
diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/DeleteQualityGateForm.tsx b/server/sonar-web/src/main/js/apps/quality-gates/components/DeleteQualityGateForm.tsx
index 3c92d5e320a..a4dfe88e761 100644
--- a/server/sonar-web/src/main/js/apps/quality-gates/components/DeleteQualityGateForm.tsx
+++ b/server/sonar-web/src/main/js/apps/quality-gates/components/DeleteQualityGateForm.tsx
@@ -17,7 +17,8 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import { DangerButtonPrimary, Modal } from 'design-system';
+import { Button, ButtonVariety } from '@sonarsource/echoes-react';
+import { Modal } from 'design-system';
import * as React from 'react';
import { useRouter } from '~sonar-aligned/components/hoc/withRouter';
import { translate, translateWithParameters } from '../../../helpers/l10n';
@@ -45,9 +46,9 @@ export default function DeleteQualityGateForm({ qualityGate, onClose }: Readonly
onClose={onClose}
body={translateWithParameters('quality_gates.delete.confirm.message', qualityGate.name)}
primaryButton={
-
+
{translate('delete')}
-
+
}
secondaryButtonLabel={translate('cancel')}
/>
diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/EditConditionModal.tsx b/server/sonar-web/src/main/js/apps/quality-gates/components/EditConditionModal.tsx
index c12319f7aa8..7c9a805007d 100644
--- a/server/sonar-web/src/main/js/apps/quality-gates/components/EditConditionModal.tsx
+++ b/server/sonar-web/src/main/js/apps/quality-gates/components/EditConditionModal.tsx
@@ -17,7 +17,8 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import { ButtonPrimary, FormField, Highlight, Modal, Note } from 'design-system';
+import { Button, ButtonVariety } from '@sonarsource/echoes-react';
+import { FormField, Highlight, Modal, Note } from 'design-system';
import { isArray } from 'lodash';
import * as React from 'react';
import { getLocalizedMetricName, translate } from '../../../helpers/l10n';
@@ -121,9 +122,9 @@ export default function EditConditionModal({
onClose={onClose}
body={renderBody()}
primaryButton={
-
+
{translate('quality_gates.update_condition')}
-
+
}
secondaryButtonLabel={translate('close')}
/>
diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/ListHeader.tsx b/server/sonar-web/src/main/js/apps/quality-gates/components/ListHeader.tsx
index dd33243d83b..93896aa991d 100644
--- a/server/sonar-web/src/main/js/apps/quality-gates/components/ListHeader.tsx
+++ b/server/sonar-web/src/main/js/apps/quality-gates/components/ListHeader.tsx
@@ -18,7 +18,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import { ButtonPrimary, HelperHintIcon, Title } from 'design-system';
+import { Button, ButtonVariety } from '@sonarsource/echoes-react';
+import { HelperHintIcon, Title } from 'design-system';
import * as React from 'react';
import DocHelpTooltip from '~sonar-aligned/components/controls/DocHelpTooltip';
import ModalButton, { ModalProps } from '../../../components/controls/ModalButton';
@@ -40,9 +41,9 @@ function CreateQualityGateModal() {
{({ onClick }) => (
-
+
{translate('create')}
-
+
)}
diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/QualityGatePermissionsAddModalRenderer.tsx b/server/sonar-web/src/main/js/apps/quality-gates/components/QualityGatePermissionsAddModalRenderer.tsx
index 5d5f021c213..5fc9f6ad88e 100644
--- a/server/sonar-web/src/main/js/apps/quality-gates/components/QualityGatePermissionsAddModalRenderer.tsx
+++ b/server/sonar-web/src/main/js/apps/quality-gates/components/QualityGatePermissionsAddModalRenderer.tsx
@@ -17,8 +17,8 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import { IconPeople, SelectAsync } from '@sonarsource/echoes-react';
-import { ButtonPrimary, GenericAvatar, Modal, Note } from 'design-system';
+import { Button, ButtonVariety, IconPeople, SelectAsync } from '@sonarsource/echoes-react';
+import { GenericAvatar, Modal, Note } from 'design-system';
import * as React from 'react';
import Avatar from '../../../components/ui/Avatar';
import { translate } from '../../../helpers/l10n';
@@ -69,9 +69,14 @@ export default function QualityGatePermissionsAddModalRenderer(
}
primaryButton={
-
+
{translate('add_verb')}
-
+
}
secondaryButtonLabel={translate('cancel')}
/>
diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/RenameQualityGateForm.tsx b/server/sonar-web/src/main/js/apps/quality-gates/components/RenameQualityGateForm.tsx
index 49977a45bc0..76c8b5d2547 100644
--- a/server/sonar-web/src/main/js/apps/quality-gates/components/RenameQualityGateForm.tsx
+++ b/server/sonar-web/src/main/js/apps/quality-gates/components/RenameQualityGateForm.tsx
@@ -18,7 +18,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import { ButtonPrimary, FormField, InputField, Modal } from 'design-system';
+import { Button, ButtonVariety } from '@sonarsource/echoes-react';
+import { FormField, InputField, Modal } from 'design-system';
import * as React from 'react';
import { useRouter } from '~sonar-aligned/components/hoc/withRouter';
import MandatoryFieldsExplanation from '../../../components/ui/MandatoryFieldsExplanation';
@@ -78,9 +79,15 @@ export default function RenameQualityGateForm({ qualityGate, onClose }: Readonly
}
primaryButton={
-
+
{translate('rename')}
-
+
}
secondaryButtonLabel={translate('cancel')}
/>
diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/changelog/ChangelogContainer.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/changelog/ChangelogContainer.tsx
index 723dd1764c1..0f37e03c4ac 100644
--- a/server/sonar-web/src/main/js/apps/quality-profiles/changelog/ChangelogContainer.tsx
+++ b/server/sonar-web/src/main/js/apps/quality-profiles/changelog/ChangelogContainer.tsx
@@ -17,7 +17,8 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import { ButtonSecondary, Spinner } from 'design-system';
+import { Button } from '@sonarsource/echoes-react';
+import { Spinner } from 'design-system';
import * as React from 'react';
import { withRouter } from '~sonar-aligned/components/hoc/withRouter';
import { Location, Router } from '~sonar-aligned/types/router';
@@ -159,9 +160,7 @@ class ChangelogContainer extends React.PureComponent {
{shouldDisplayFooter && (
-
- {translate('show_more')}
-
+ {translate('show_more')}
)}
diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/changelog/ChangelogSearch.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/changelog/ChangelogSearch.tsx
index 34c44082203..62de980541c 100644
--- a/server/sonar-web/src/main/js/apps/quality-profiles/changelog/ChangelogSearch.tsx
+++ b/server/sonar-web/src/main/js/apps/quality-profiles/changelog/ChangelogSearch.tsx
@@ -17,7 +17,8 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import { ButtonSecondary, DateRangePicker } from 'design-system';
+import { Button } from '@sonarsource/echoes-react';
+import { DateRangePicker } from 'design-system';
import * as React from 'react';
import { useIntl } from 'react-intl';
@@ -43,9 +44,9 @@ export default function ChangelogSearch(props: ChangelogSearchProps) {
onChange={props.onDateRangeChange}
value={dateRange}
/>
-
+
{intl.formatMessage({ id: 'reset_verb' })}
-
+
);
}
diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/compare/ComparisonResultActivation.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/compare/ComparisonResultActivation.tsx
index 7df42fa7ea5..e12115032a1 100644
--- a/server/sonar-web/src/main/js/apps/quality-profiles/compare/ComparisonResultActivation.tsx
+++ b/server/sonar-web/src/main/js/apps/quality-profiles/compare/ComparisonResultActivation.tsx
@@ -17,7 +17,8 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import { ButtonSecondary, Spinner } from 'design-system';
+import { Button } from '@sonarsource/echoes-react';
+import { Spinner } from 'design-system';
import * as React from 'react';
import { useIntl } from 'react-intl';
import { Profile } from '../../../api/quality-profiles';
@@ -61,13 +62,13 @@ export default function ComparisonResultActivation(props: React.PropsWithChildre
return (
-
{intl.formatMessage({ id: 'activate' })}
-
+
{isOpen && (
diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/components/DeleteProfileForm.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/components/DeleteProfileForm.tsx
index 021aabf6ac5..0bc3426a8a6 100644
--- a/server/sonar-web/src/main/js/apps/quality-profiles/components/DeleteProfileForm.tsx
+++ b/server/sonar-web/src/main/js/apps/quality-profiles/components/DeleteProfileForm.tsx
@@ -17,7 +17,8 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import { DangerButtonPrimary, FlagMessage, Modal } from 'design-system';
+import { Button, ButtonVariety } from '@sonarsource/echoes-react';
+import { FlagMessage, Modal } from 'design-system';
import * as React from 'react';
import { translate, translateWithParameters } from '../../../helpers/l10n';
import { Profile } from '../types';
@@ -65,14 +66,15 @@ export default function DeleteProfileForm(props: DeleteProfileFormProps) {
>
}
primaryButton={
- {
props.onDelete();
}}
- disabled={loading}
+ isDisabled={loading}
+ variety={ButtonVariety.Danger}
>
{translate('delete')}
-
+
}
secondaryButtonLabel={translate('cancel')}
/>
diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/components/ProfileModalForm.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/components/ProfileModalForm.tsx
index 13a3906d0f7..d0b3b274548 100644
--- a/server/sonar-web/src/main/js/apps/quality-profiles/components/ProfileModalForm.tsx
+++ b/server/sonar-web/src/main/js/apps/quality-profiles/components/ProfileModalForm.tsx
@@ -17,7 +17,8 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import { ButtonPrimary, FlagMessage, FormField, InputField, Modal } from 'design-system';
+import { Button, ButtonVariety } from '@sonarsource/echoes-react';
+import { FlagMessage, FormField, InputField, Modal } from 'design-system';
import * as React from 'react';
import MandatoryFieldsExplanation from '../../../components/ui/MandatoryFieldsExplanation';
import { KeyboardKeys } from '../../../helpers/keycodes';
@@ -114,9 +115,9 @@ export default function ProfileModalForm(props: ProfileModalFormProps) {
>
}
primaryButton={
-
+
{translate(labels.button)}
-
+
}
secondaryButtonLabel={translate('cancel')}
/>
diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileInheritance.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileInheritance.tsx
index 0147482a4d6..635efa7538a 100644
--- a/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileInheritance.tsx
+++ b/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileInheritance.tsx
@@ -17,8 +17,9 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
+import { Button } from '@sonarsource/echoes-react';
import classNames from 'classnames';
-import { ButtonSecondary, FlagMessage, Spinner, SubTitle, Table } from 'design-system';
+import { FlagMessage, Spinner, SubTitle, Table } from 'design-system';
import * as React from 'react';
import { translate } from '../../../helpers/l10n';
import { useProfileInheritanceQuery } from '../../../queries/quality-profiles';
@@ -71,12 +72,9 @@ export default function ProfileInheritance(props: Readonly) {
{translate('quality_profiles.profile_inheritance')}
{profile.actions?.edit && !profile.isBuiltIn && (
-
+
{translate('quality_profiles.change_parent')}
-
+
)}
diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfilePermissionsForm.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfilePermissionsForm.tsx
index b7c40626aa9..4b46d1b2cba 100644
--- a/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfilePermissionsForm.tsx
+++ b/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfilePermissionsForm.tsx
@@ -17,7 +17,8 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import { ButtonPrimary, FormField, Modal } from 'design-system';
+import { Button, ButtonVariety } from '@sonarsource/echoes-react';
+import { FormField, Modal } from 'design-system';
import * as React from 'react';
import { translate } from '../../../helpers/l10n';
import { useAddGroupMutation, useAddUserMutation } from '../../../queries/quality-profiles';
@@ -74,9 +75,14 @@ export default function ProfilePermissionForm(props: Readonly) {
onClose={props.onClose}
loading={loading}
primaryButton={
-
+
{translate('add_verb')}
-
+
}
secondaryButtonLabel={translate('cancel')}
body={
diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileProjects.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileProjects.tsx
index 672acc4d574..0da921ca31b 100644
--- a/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileProjects.tsx
+++ b/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileProjects.tsx
@@ -17,8 +17,8 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import { Link, Spinner } from '@sonarsource/echoes-react';
-import { Badge, ButtonSecondary, ContentCell, SubTitle, Table, TableRow } from 'design-system';
+import { Button, Link, Spinner } from '@sonarsource/echoes-react';
+import { Badge, ContentCell, SubTitle, Table, TableRow } from 'design-system';
import * as React from 'react';
import { getProfileProjects } from '../../../api/quality-profiles';
import ListFooter from '../../../components/controls/ListFooter';
@@ -182,13 +182,13 @@ export default class ProfileProjects extends React.PureComponent {
{translate('projects')}
}
{profile.actions?.associateProjects && (
-
{translate('quality_profiles.change_projects')}
-
+
)}
diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/home/PageHeader.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/home/PageHeader.tsx
index 46746dd69a2..55043a09630 100644
--- a/server/sonar-web/src/main/js/apps/quality-profiles/home/PageHeader.tsx
+++ b/server/sonar-web/src/main/js/apps/quality-profiles/home/PageHeader.tsx
@@ -17,7 +17,8 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import { ButtonPrimary, ButtonSecondary, FlagMessage, Link } from 'design-system';
+import { Button, ButtonGroup, ButtonVariety } from '@sonarsource/echoes-react';
+import { FlagMessage, Link } from 'design-system';
import * as React from 'react';
import { useIntl } from 'react-intl';
import { useLocation, useRouter } from '~sonar-aligned/components/hoc/withRouter';
@@ -71,22 +72,19 @@ export default function PageHeader(props: Readonly) {
{actions.create && (
-
-
+ setModal('createProfile')}
+ variety={ButtonVariety.Primary}
>
{intl.formatMessage({ id: 'create' })}
-
- setModal('restoreProfile')}
- >
+
+ setModal('restoreProfile')}>
{intl.formatMessage({ id: 'restore' })}
-
-
+
+
{languages.length === 0 && (
{intl.formatMessage({ id: 'quality_profiles.no_languages_available' })}
diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/home/RestoreProfileForm.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/home/RestoreProfileForm.tsx
index a0baa2dd6fc..224775aa7e1 100644
--- a/server/sonar-web/src/main/js/apps/quality-profiles/home/RestoreProfileForm.tsx
+++ b/server/sonar-web/src/main/js/apps/quality-profiles/home/RestoreProfileForm.tsx
@@ -17,7 +17,8 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import { ButtonPrimary, FileInput, FlagMessage, FormField, Modal, Spinner } from 'design-system';
+import { Button, ButtonVariety } from '@sonarsource/echoes-react';
+import { FileInput, FlagMessage, FormField, Modal } from 'design-system';
import * as React from 'react';
import { useRef, useState } from 'react';
import { useIntl } from 'react-intl';
@@ -116,20 +117,19 @@ export default function RestoreProfileForm({ onClose, onRestore }: Readonly
-
-
- {intl.formatMessage({ id: 'restore' })}
-
- >
+
+ {intl.formatMessage({ id: 'restore' })}
+
) : (
-
+
{intl.formatMessage({ id: 'close' })}
-
+
)
}
secondaryButtonLabel={intl.formatMessage({ id: ruleSuccesses == null ? 'cancel' : 'close' })}
diff --git a/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotCommentModal.tsx b/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotCommentModal.tsx
index bd19b600e54..3c6aa215a12 100644
--- a/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotCommentModal.tsx
+++ b/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotCommentModal.tsx
@@ -17,7 +17,8 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import { ButtonPrimary, FormField, InputTextArea, Modal } from 'design-system';
+import { Button, ButtonVariety } from '@sonarsource/echoes-react';
+import { FormField, InputTextArea, Modal } from 'design-system';
import * as React from 'react';
import FormattingTips from '../../../components/common/FormattingTips';
import { translate } from '../../../helpers/l10n';
@@ -51,9 +52,13 @@ export default function HotspotCommentModal(props: HotspotCommentPopupProps) {
}
primaryButton={
- props.onSubmit(comment)} disabled={!comment}>
+ props.onSubmit(comment)}
+ isDisabled={!comment}
+ variety={ButtonVariety.Primary}
+ >
{translate('hotspots.comment.submit')}
-
+
}
secondaryButtonLabel={translate('cancel')}
/>
diff --git a/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotReviewHistoryAndComments.tsx b/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotReviewHistoryAndComments.tsx
index 620b0bf9d75..84e8590b686 100644
--- a/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotReviewHistoryAndComments.tsx
+++ b/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotReviewHistoryAndComments.tsx
@@ -17,7 +17,8 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import { ButtonSecondary, PageTitle } from 'design-system';
+import { Button } from '@sonarsource/echoes-react';
+import { PageTitle } from 'design-system';
import * as React from 'react';
import {
commentSecurityHotspot,
@@ -87,9 +88,9 @@ export default class HotspotReviewHistoryAndComments extends React.PureComponent
/>
{isLoggedIn(currentUser) && (
-
+
{translate('hotspots.status.add_comment')}
-
+
)}
{translate('hotspots.success_dialog.do_not_show')}
-
-
+ {
props.onSwitchFilterToStatusOfUpdatedHotspot();
props.onClose();
}}
>
{translateWithParameters('hotspots.see_x_hotspots', statusLabel)}
-
-
+
+
{translate('hotspots.continue_to_next_hotspot')}
-
-
+
+
);
}
diff --git a/server/sonar-web/src/main/js/apps/security-hotspots/components/status/StatusReviewButton.tsx b/server/sonar-web/src/main/js/apps/security-hotspots/components/status/StatusReviewButton.tsx
index 171ea409a3c..ce7f094868d 100644
--- a/server/sonar-web/src/main/js/apps/security-hotspots/components/status/StatusReviewButton.tsx
+++ b/server/sonar-web/src/main/js/apps/security-hotspots/components/status/StatusReviewButton.tsx
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import { ButtonPrimary } from 'design-system';
+import { Button, ButtonVariety } from '@sonarsource/echoes-react';
import * as React from 'react';
import withCurrentUserContext from '../../../../app/components/current-user/withCurrentUserContext';
import Tooltip from '../../../../components/controls/Tooltip';
@@ -44,9 +44,14 @@ export function StatusReviewButton(props: StatusProps) {
content={readonly ? translate('hotspots.status.cannot_change_status') : null}
side="bottom"
>
- setIsOpen(true)} disabled={readonly}>
+ setIsOpen(true)}
+ isDisabled={readonly}
+ variety={ButtonVariety.Primary}
+ >
{translate('hotspots.status.review')}
-
+
{isOpen && (
diff --git a/server/sonar-web/src/main/js/apps/security-hotspots/components/status/StatusSelectionRenderer.tsx b/server/sonar-web/src/main/js/apps/security-hotspots/components/status/StatusSelectionRenderer.tsx
index 67d15a1fcf6..02f175802cc 100644
--- a/server/sonar-web/src/main/js/apps/security-hotspots/components/status/StatusSelectionRenderer.tsx
+++ b/server/sonar-web/src/main/js/apps/security-hotspots/components/status/StatusSelectionRenderer.tsx
@@ -17,7 +17,8 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import { ButtonPrimary, FormField, InputTextArea, Modal, Note, SelectionCard } from 'design-system';
+import { Button, ButtonVariety } from '@sonarsource/echoes-react';
+import { FormField, InputTextArea, Modal, Note, SelectionCard } from 'design-system';
import * as React from 'react';
import FormattingTips from '../../../../components/common/FormattingTips';
import { translate } from '../../../../helpers/l10n';
@@ -87,9 +88,13 @@ export default function StatusSelectionRenderer(props: StatusSelectionRendererPr
>
}
primaryButton={
-
+
{translate('hotspots.status.change_status')}
-
+
}
/>
);
diff --git a/server/sonar-web/src/main/js/apps/sessions/components/LoginForm.tsx b/server/sonar-web/src/main/js/apps/sessions/components/LoginForm.tsx
index 5db5d5d0efd..3fbb7a98667 100644
--- a/server/sonar-web/src/main/js/apps/sessions/components/LoginForm.tsx
+++ b/server/sonar-web/src/main/js/apps/sessions/components/LoginForm.tsx
@@ -17,14 +17,8 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import {
- ButtonPrimary,
- ButtonSecondary,
- FormField,
- InputField,
- Link,
- Spinner,
-} from 'design-system';
+import { Button, ButtonVariety, LinkStandalone, Spinner } from '@sonarsource/echoes-react';
+import { FormField, InputField } from 'design-system';
import * as React from 'react';
import { translate } from '../../../helpers/l10n';
@@ -79,13 +73,13 @@ export default class LoginForm extends React.PureComponent {
render() {
if (this.state.collapsed) {
return (
-
{translate('login.more_options')}
-
+
);
}
return (
@@ -117,12 +111,12 @@ export default class LoginForm extends React.PureComponent {
-
-
-
{translate('go_back')}
-
+
+
+ {translate('go_back')}
+
{translate('sessions.log_in')}
-
+
diff --git a/server/sonar-web/src/main/js/apps/settings/components/DefinitionActions.tsx b/server/sonar-web/src/main/js/apps/settings/components/DefinitionActions.tsx
index 158dce175b5..a505333cf00 100644
--- a/server/sonar-web/src/main/js/apps/settings/components/DefinitionActions.tsx
+++ b/server/sonar-web/src/main/js/apps/settings/components/DefinitionActions.tsx
@@ -17,7 +17,8 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import { ButtonPrimary, ButtonSecondary, DangerButtonPrimary, Modal, Note } from 'design-system';
+import { Button, ButtonGroup, ButtonVariety } from '@sonarsource/echoes-react';
+import { Modal, Note } from 'design-system';
import * as React from 'react';
import { translate, translateWithParameters } from '../../../helpers/l10n';
import { Setting } from '../../../types/settings';
@@ -68,9 +69,9 @@ export default class DefinitionActions extends React.PureComponent
}
primaryButton={
-
+
{translate('reset_verb')}
-
+
}
secondaryButtonLabel={translate('cancel')}
/>
@@ -86,30 +87,31 @@ export default class DefinitionActions extends React.PureComponent
return (
- {hasValueChanged && (
-
- {translate('save')}
-
- )}
+
+ {hasValueChanged && (
+
+ {translate('save')}
+
+ )}
- {showReset && (
-
- {translate('reset_verb')}
-
- )}
+ {showReset && (
+
+ {translate('reset_verb')}
+
+ )}
- {showCancel && (
-
- {translate('cancel')}
-
- )}
+ {showCancel && {translate('cancel')} }
+
{showReset && (
diff --git a/server/sonar-web/src/main/js/apps/settings/components/NewCodeDefinition.tsx b/server/sonar-web/src/main/js/apps/settings/components/NewCodeDefinition.tsx
index a574b35d2e3..6810c2a1263 100644
--- a/server/sonar-web/src/main/js/apps/settings/components/NewCodeDefinition.tsx
+++ b/server/sonar-web/src/main/js/apps/settings/components/NewCodeDefinition.tsx
@@ -18,9 +18,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import { Spinner } from '@sonarsource/echoes-react';
+import { Button, ButtonGroup, ButtonVariety, Spinner } from '@sonarsource/echoes-react';
import classNames from 'classnames';
-import { ButtonPrimary, ButtonSecondary } from 'design-system';
import React, { useCallback, useEffect } from 'react';
import { FormattedMessage } from 'react-intl';
import DocumentationLink from '../../../components/common/DocumentationLink';
@@ -158,18 +157,18 @@ export default function NewCodeDefinition() {
{!isSaving && (
- <>
-
- {translate('save')}
-
-
+
+ {translate('save')}
+
+
{translate('cancel')}
-
- >
+
+
)}
diff --git a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmBindingDefinitionBox.tsx b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmBindingDefinitionBox.tsx
index f9aa868d3d0..7fc9a555001 100644
--- a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmBindingDefinitionBox.tsx
+++ b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmBindingDefinitionBox.tsx
@@ -18,10 +18,10 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
+import { Button, ButtonGroup, ButtonVariety } from '@sonarsource/echoes-react';
import {
BasicSeparator,
ButtonSecondary,
- DangerButtonSecondary,
FlagErrorIcon,
FlagMessage,
FlagSuccessIcon,
@@ -150,8 +150,8 @@ export default function AlmBindingDefinitionBox(props: AlmBindingDefinitionBoxPr
return (
-
-
+
{translate('edit')}
-
-
+ {
props.onDelete(definition.key);
}}
+ variety={ButtonVariety.DangerOutline}
>
{translate('delete')}
-
-
+
+
{definition.key}
diff --git a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmBindingDefinitionFormRenderer.tsx b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmBindingDefinitionFormRenderer.tsx
index f72477945d5..0a2b1bdf067 100644
--- a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmBindingDefinitionFormRenderer.tsx
+++ b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmBindingDefinitionFormRenderer.tsx
@@ -17,7 +17,8 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import { ButtonPrimary, FlagMessage, Modal, PageContentFontWrapper, Spinner } from 'design-system';
+import { Button, ButtonVariety } from '@sonarsource/echoes-react';
+import { FlagMessage, Modal, PageContentFontWrapper, Spinner } from 'design-system';
import * as React from 'react';
import { translate } from '../../../../helpers/l10n';
import {
@@ -131,14 +132,15 @@ export default class AlmBindingDefinitionFormRenderer extends React.PureComponen
primaryButton={
<>
-
{translate('settings.almintegration.form.save')}
-
+
>
}
secondaryButtonLabel={translate('cancel')}
diff --git a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmTabRenderer.tsx b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmTabRenderer.tsx
index 161c0051952..6b510ee45bd 100644
--- a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmTabRenderer.tsx
+++ b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmTabRenderer.tsx
@@ -17,7 +17,8 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import { ButtonPrimary, FlagMessage, Link, Spinner, getTabId, getTabPanelId } from 'design-system';
+import { Button, ButtonVariety } from '@sonarsource/echoes-react';
+import { FlagMessage, Link, Spinner, getTabId, getTabPanelId } from 'design-system';
import * as React from 'react';
import { FormattedMessage } from 'react-intl';
import { translate } from '../../../../helpers/l10n';
@@ -83,13 +84,14 @@ export default function AlmTabRenderer(props: Readonly
) {
0 ? 'sw-mb-5' : 'sw-my-3'}>
-
{translate('settings.almintegration.create')}
-
+
{definitions.map((def) => (
diff --git a/server/sonar-web/src/main/js/apps/settings/components/authentication/AuthenticationSecuredField.tsx b/server/sonar-web/src/main/js/apps/settings/components/authentication/AuthenticationSecuredField.tsx
index bed6bf52c4a..597c43a89cc 100644
--- a/server/sonar-web/src/main/js/apps/settings/components/authentication/AuthenticationSecuredField.tsx
+++ b/server/sonar-web/src/main/js/apps/settings/components/authentication/AuthenticationSecuredField.tsx
@@ -17,7 +17,8 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import { ButtonSecondary, InputField, InputTextArea } from 'design-system';
+import { Button } from '@sonarsource/echoes-react';
+import { InputField, InputTextArea } from 'design-system';
import React, { useEffect } from 'react';
import { translate } from '../../../../helpers/l10n';
import { DefinitionV2, ExtendedSettingDefinition, SettingType } from '../../../../types/settings';
@@ -68,13 +69,13 @@ export default function AuthenticationSecuredField(props: SamlToggleFieldProps)
{showSecretField && (
{translate('settings.almintegration.form.secret.field')}
-
{
setShowSecretField(false);
}}
>
{translate('settings.almintegration.form.secret.update_field')}
-
+
)}
>
diff --git a/server/sonar-web/src/main/js/apps/settings/components/authentication/AutoProvisionningConsent.tsx b/server/sonar-web/src/main/js/apps/settings/components/authentication/AutoProvisionningConsent.tsx
index 391e56b57ee..1f78fefae0e 100644
--- a/server/sonar-web/src/main/js/apps/settings/components/authentication/AutoProvisionningConsent.tsx
+++ b/server/sonar-web/src/main/js/apps/settings/components/authentication/AutoProvisionningConsent.tsx
@@ -18,7 +18,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import { ButtonSecondary, Modal } from 'design-system';
+import { Button } from '@sonarsource/echoes-react';
+import { Modal } from 'design-system';
import { noop } from 'lodash';
import * as React from 'react';
import { FormattedMessage, useIntl } from 'react-intl';
@@ -90,14 +91,14 @@ export default function AutoProvisioningConsent() {
+
-
+
}
secondaryButton={
-
+
-
+
}
/>
diff --git a/server/sonar-web/src/main/js/apps/settings/components/authentication/ConfigurationForm.tsx b/server/sonar-web/src/main/js/apps/settings/components/authentication/ConfigurationForm.tsx
index 9f1e35b7133..eba9057fa8b 100644
--- a/server/sonar-web/src/main/js/apps/settings/components/authentication/ConfigurationForm.tsx
+++ b/server/sonar-web/src/main/js/apps/settings/components/authentication/ConfigurationForm.tsx
@@ -18,8 +18,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import { Spinner } from '@sonarsource/echoes-react';
-import { ButtonPrimary, FlagMessage, Modal } from 'design-system';
+import { Button, ButtonVariety, Spinner } from '@sonarsource/echoes-react';
+import { FlagMessage, Modal } from 'design-system';
import { keyBy } from 'lodash';
import * as React from 'react';
import { FormattedMessage } from 'react-intl';
@@ -133,11 +133,17 @@ export default function ConfigurationForm(props: Readonly) {
isScrollable
onClose={props.onClose}
primaryButton={
-
+
{translate('settings.almintegration.form.save')}
-
+
}
/>
);
diff --git a/server/sonar-web/src/main/js/apps/settings/components/authentication/GitHubConfigurationForm.tsx b/server/sonar-web/src/main/js/apps/settings/components/authentication/GitHubConfigurationForm.tsx
index 6d5e2ea39ca..23e5a512e67 100644
--- a/server/sonar-web/src/main/js/apps/settings/components/authentication/GitHubConfigurationForm.tsx
+++ b/server/sonar-web/src/main/js/apps/settings/components/authentication/GitHubConfigurationForm.tsx
@@ -17,8 +17,8 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import { Spinner } from '@sonarsource/echoes-react';
-import { ButtonPrimary, FlagMessage, Modal } from 'design-system';
+import { Button, ButtonVariety, Spinner } from '@sonarsource/echoes-react';
+import { FlagMessage, Modal } from 'design-system';
import { isEmpty, keyBy } from 'lodash';
import React, { useEffect, useState } from 'react';
import { FormattedMessage } from 'react-intl';
@@ -235,9 +235,15 @@ export default function GitHubConfigurationForm(props: Readonly) {
primaryButton={
<>
-
+
-
+
>
}
/>
diff --git a/server/sonar-web/src/main/js/apps/settings/components/authentication/GitLabConfigurationForm.tsx b/server/sonar-web/src/main/js/apps/settings/components/authentication/GitLabConfigurationForm.tsx
index 10fc99408d6..b7324db3e73 100644
--- a/server/sonar-web/src/main/js/apps/settings/components/authentication/GitLabConfigurationForm.tsx
+++ b/server/sonar-web/src/main/js/apps/settings/components/authentication/GitLabConfigurationForm.tsx
@@ -18,7 +18,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import { ButtonPrimary, FlagMessage, Modal, Spinner } from 'design-system';
+import { Button, ButtonVariety } from '@sonarsource/echoes-react';
+import { FlagMessage, Modal, Spinner } from 'design-system';
import { keyBy } from 'lodash';
import React, { SyntheticEvent, useEffect, useState } from 'react';
import { FormattedMessage } from 'react-intl';
@@ -218,9 +219,14 @@ export default function GitLabConfigurationForm(props: Readonly) {
primaryButton={
<>
-
+
{translate('settings.almintegration.form.save')}
-
+
>
}
/>
diff --git a/server/sonar-web/src/main/js/apps/settings/components/authentication/TabHeader.tsx b/server/sonar-web/src/main/js/apps/settings/components/authentication/TabHeader.tsx
index 44dcf633d15..aa8d438430b 100644
--- a/server/sonar-web/src/main/js/apps/settings/components/authentication/TabHeader.tsx
+++ b/server/sonar-web/src/main/js/apps/settings/components/authentication/TabHeader.tsx
@@ -17,7 +17,8 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import { BasicSeparator, ButtonPrimary, SubHeading } from 'design-system';
+import { Button, ButtonVariety } from '@sonarsource/echoes-react';
+import { BasicSeparator, SubHeading } from 'design-system';
import React, { ReactElement } from 'react';
import { translate } from '../../../../helpers/l10n';
@@ -39,9 +40,9 @@ export default function TabHeader({
{title}
{showCreate && (
-
+
{translate('settings.authentication.form.create')}
-
+
)}
{configurationValidity}
diff --git a/server/sonar-web/src/main/js/apps/settings/components/authentication/TestConfiguration.tsx b/server/sonar-web/src/main/js/apps/settings/components/authentication/TestConfiguration.tsx
index 18ced49b36a..e9c58bdb0bd 100644
--- a/server/sonar-web/src/main/js/apps/settings/components/authentication/TestConfiguration.tsx
+++ b/server/sonar-web/src/main/js/apps/settings/components/authentication/TestConfiguration.tsx
@@ -18,7 +18,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import { ButtonSecondary, FlagMessage, Spinner, Variant } from 'design-system';
+import { Button } from '@sonarsource/echoes-react';
+import { FlagMessage, Spinner, Variant } from 'design-system';
import React from 'react';
import { translate } from '../../../../helpers/l10n';
@@ -52,13 +53,13 @@ export default function GitLabConfigurationValidity(props: Readonly) {
>
{loading ? undefined : flagMessageContent}
-
{translate(`${intlPrefix}.test`)}
-
+
>
);
}
diff --git a/server/sonar-web/src/main/js/apps/settings/components/inputs/InputForJSON.tsx b/server/sonar-web/src/main/js/apps/settings/components/inputs/InputForJSON.tsx
index d4cadbe0665..39ca71cd72e 100644
--- a/server/sonar-web/src/main/js/apps/settings/components/inputs/InputForJSON.tsx
+++ b/server/sonar-web/src/main/js/apps/settings/components/inputs/InputForJSON.tsx
@@ -18,7 +18,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import { ButtonPrimary, FlagMessage, InputTextArea } from 'design-system';
+import { Button, ButtonVariety } from '@sonarsource/echoes-react';
+import { FlagMessage, InputTextArea } from 'design-system';
import * as React from 'react';
import { translate } from '../../../../helpers/l10n';
import { DefaultSpecializedInputProps, getPropertyName } from '../../utils';
@@ -65,9 +66,9 @@ export default class InputForJSON extends React.PureComponent
-
+
{translate('settings.json.format')}
-
+
{formatError && (
diff --git a/server/sonar-web/src/main/js/apps/settings/components/inputs/InputForSecured.tsx b/server/sonar-web/src/main/js/apps/settings/components/inputs/InputForSecured.tsx
index 8a4db97608c..d374ff41838 100644
--- a/server/sonar-web/src/main/js/apps/settings/components/inputs/InputForSecured.tsx
+++ b/server/sonar-web/src/main/js/apps/settings/components/inputs/InputForSecured.tsx
@@ -17,7 +17,8 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import { ButtonSecondary, LockIcon } from 'design-system';
+import { Button } from '@sonarsource/echoes-react';
+import { LockIcon } from 'design-system';
import * as React from 'react';
import { translate } from '../../../../helpers/l10n';
import {
@@ -95,9 +96,7 @@ export default class InputForSecured extends React.PureComponent
{
return (
-
- {translate('change_verb')}
-
+ {translate('change_verb')}
);
}
diff --git a/server/sonar-web/src/main/js/apps/system/components/ChangeLogLevelForm.tsx b/server/sonar-web/src/main/js/apps/system/components/ChangeLogLevelForm.tsx
index a7593bf8391..ba99739c585 100644
--- a/server/sonar-web/src/main/js/apps/system/components/ChangeLogLevelForm.tsx
+++ b/server/sonar-web/src/main/js/apps/system/components/ChangeLogLevelForm.tsx
@@ -17,8 +17,8 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import { RadioButtonGroup } from '@sonarsource/echoes-react';
-import { ButtonPrimary, FlagMessage, Modal } from 'design-system';
+import { Button, ButtonVariety, RadioButtonGroup } from '@sonarsource/echoes-react';
+import { FlagMessage, Modal } from 'design-system';
import * as React from 'react';
import { setLogLevel } from '../../../api/system';
import { translate } from '../../../helpers/l10n';
@@ -87,9 +87,15 @@ export default class ChangeLogLevelForm extends React.PureComponent
}
primaryButton={
-
+
{translate('save')}
-
+
}
secondaryButtonLabel={translate('cancel')}
loading={updating}
diff --git a/server/sonar-web/src/main/js/apps/users/Header.tsx b/server/sonar-web/src/main/js/apps/users/Header.tsx
index 1b4c87b33f5..7dc105c9017 100644
--- a/server/sonar-web/src/main/js/apps/users/Header.tsx
+++ b/server/sonar-web/src/main/js/apps/users/Header.tsx
@@ -18,7 +18,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import { ButtonPrimary, FlagMessage, Link, Title } from 'design-system';
+import { Button, ButtonVariety } from '@sonarsource/echoes-react';
+import { FlagMessage, Link, Title } from 'design-system';
import * as React from 'react';
import { FormattedMessage } from 'react-intl';
import { DocLink } from '../../helpers/doc-links';
@@ -40,13 +41,14 @@ export default function Header(props: Props) {
{translate('users.page')}
- setOpenUserForm(true)}
+ variety={ButtonVariety.Primary}
>
{translate('users.create_user')}
-
+
{manageProvider === undefined ? (
diff --git a/server/sonar-web/src/main/js/apps/users/components/PasswordForm.tsx b/server/sonar-web/src/main/js/apps/users/components/PasswordForm.tsx
index bbece8dbdb0..2dd07421c0b 100644
--- a/server/sonar-web/src/main/js/apps/users/components/PasswordForm.tsx
+++ b/server/sonar-web/src/main/js/apps/users/components/PasswordForm.tsx
@@ -18,14 +18,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import {
- ButtonPrimary,
- FlagMessage,
- FormField,
- InputField,
- Modal,
- addGlobalSuccessMessage,
-} from 'design-system';
+import { Button, ButtonVariety } from '@sonarsource/echoes-react';
+import { FlagMessage, FormField, InputField, Modal, addGlobalSuccessMessage } from 'design-system';
import * as React from 'react';
import { changePassword } from '../../../api/users';
import { CurrentUserContext } from '../../../app/components/current-user/CurrentUserContext';
@@ -156,13 +150,14 @@ export default function PasswordForm(props: Props) {
onClose={props.onClose}
loading={submitting}
primaryButton={
-
{translate('change_verb')}
-
+
}
secondaryButtonLabel={translate('cancel')}
/>
diff --git a/server/sonar-web/src/main/js/apps/users/components/TokensFormItem.tsx b/server/sonar-web/src/main/js/apps/users/components/TokensFormItem.tsx
index c6ec562dba3..3a8344cdb36 100644
--- a/server/sonar-web/src/main/js/apps/users/components/TokensFormItem.tsx
+++ b/server/sonar-web/src/main/js/apps/users/components/TokensFormItem.tsx
@@ -19,15 +19,9 @@
*/
import styled from '@emotion/styled';
+import { Button, ButtonVariety } from '@sonarsource/echoes-react';
import classNames from 'classnames';
-import {
- ContentCell,
- DangerButtonSecondary,
- FlagWarningIcon,
- Spinner,
- TableRow,
- themeColor,
-} from 'design-system';
+import { ContentCell, FlagWarningIcon, TableRow, themeColor } from 'design-system';
import * as React from 'react';
import { FormattedMessage } from 'react-intl';
import ConfirmButton from '../../../components/controls/ConfirmButton';
@@ -115,15 +109,15 @@ export default function TokensFormItem(props: Readonly
) {
{token.isExpired && (
-
-
- {translate('remove')}
-
-
+ {translate('remove')}
+
)}
{!token.isExpired && deleteConfirmation === 'modal' && (
@@ -141,31 +135,32 @@ export default function TokensFormItem(props: Readonly) {
onConfirm={handleRevoke}
>
{({ onClick }) => (
-
{translate('users.tokens.revoke')}
-
+
)}
)}
{!token.isExpired && deleteConfirmation === 'inline' && (
-
-
-
{showConfirmation ? translate('users.tokens.sure') : translate('users.tokens.revoke')}
-
+
)}
diff --git a/server/sonar-web/src/main/js/apps/webhooks/components/DeleteWebhookForm.tsx b/server/sonar-web/src/main/js/apps/webhooks/components/DeleteWebhookForm.tsx
index 2bae38ed2f7..dd1bfdc5781 100644
--- a/server/sonar-web/src/main/js/apps/webhooks/components/DeleteWebhookForm.tsx
+++ b/server/sonar-web/src/main/js/apps/webhooks/components/DeleteWebhookForm.tsx
@@ -17,7 +17,8 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import { DangerButtonPrimary, Modal } from 'design-system';
+import { Button, ButtonVariety } from '@sonarsource/echoes-react';
+import { Modal } from 'design-system';
import * as React from 'react';
import { translate, translateWithParameters } from '../../../helpers/l10n';
import { WebhookResponse } from '../../../types/webhook';
@@ -51,9 +52,9 @@ export default function DeleteWebhookForm({ onClose, onSubmit, webhook }: Props)
isOverflowVisible
body={renderForm}
primaryButton={
-
+
{translate('delete')}
-
+
}
secondaryButtonLabel={translate('cancel')}
/>
diff --git a/server/sonar-web/src/main/js/apps/webhooks/components/PageActions.tsx b/server/sonar-web/src/main/js/apps/webhooks/components/PageActions.tsx
index 8fcebb986f7..02c10857831 100644
--- a/server/sonar-web/src/main/js/apps/webhooks/components/PageActions.tsx
+++ b/server/sonar-web/src/main/js/apps/webhooks/components/PageActions.tsx
@@ -18,7 +18,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import { ButtonPrimary } from 'design-system';
+import { Button, ButtonVariety } from '@sonarsource/echoes-react';
import * as React from 'react';
import { useState } from 'react';
import Tooltip from '../../../components/controls/Tooltip';
@@ -53,18 +53,22 @@ export default function PageActions(props: Props) {
if (webhooksCount >= WEBHOOKS_LIMIT) {
return (
-
+
{translate('create')}
-
+
);
}
return (
<>
-
+
{translate('create')}
-
+
{openCreate && }
>
);
diff --git a/server/sonar-web/src/main/js/components/SourceViewer/SourceViewerCode.tsx b/server/sonar-web/src/main/js/components/SourceViewer/SourceViewerCode.tsx
index 9243f006f31..ca0531b8a1f 100644
--- a/server/sonar-web/src/main/js/components/SourceViewer/SourceViewerCode.tsx
+++ b/server/sonar-web/src/main/js/components/SourceViewer/SourceViewerCode.tsx
@@ -17,7 +17,8 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import { ButtonSecondary, LightLabel, SonarCodeColorizer, Spinner } from 'design-system';
+import { Button } from '@sonarsource/echoes-react';
+import { LightLabel, SonarCodeColorizer, Spinner } from 'design-system';
import * as React from 'react';
import { MetricKey } from '~sonar-aligned/types/metrics';
import { decorateWithUnderlineFlags } from '../../helpers/code-viewer';
@@ -292,9 +293,9 @@ export default class SourceViewerCode extends React.PureComponent
) : (
-
+
{translate('source_viewer.load_more_code')}
-
+
)}
)}
@@ -331,9 +332,9 @@ export default class SourceViewerCode extends React.PureComponent
) : (
-
+
{translate('source_viewer.load_more_code')}
-
+
)}
)}
diff --git a/server/sonar-web/src/main/js/components/activity-graph/AddGraphMetric.tsx b/server/sonar-web/src/main/js/components/activity-graph/AddGraphMetric.tsx
index 6af52bfce2f..709fd8f98ea 100644
--- a/server/sonar-web/src/main/js/components/activity-graph/AddGraphMetric.tsx
+++ b/server/sonar-web/src/main/js/components/activity-graph/AddGraphMetric.tsx
@@ -17,7 +17,8 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import { ButtonSecondary, ChevronDownIcon, Dropdown, TextMuted } from 'design-system';
+import { Button } from '@sonarsource/echoes-react';
+import { ChevronDownIcon, Dropdown, TextMuted } from 'design-system';
import { sortBy } from 'lodash';
import * as React from 'react';
import { MetricKey, MetricType } from '~sonar-aligned/types/metrics';
@@ -151,7 +152,7 @@ export default class AddGraphMetric extends React.PureComponent {
/>
}
>
- {
>
-
+
);
}
diff --git a/server/sonar-web/src/main/js/components/activity-graph/GraphsHeader.tsx b/server/sonar-web/src/main/js/components/activity-graph/GraphsHeader.tsx
index 13265163d17..84838048d91 100644
--- a/server/sonar-web/src/main/js/components/activity-graph/GraphsHeader.tsx
+++ b/server/sonar-web/src/main/js/components/activity-graph/GraphsHeader.tsx
@@ -18,8 +18,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import { DropdownMenu, DropdownMenuAlign } from '@sonarsource/echoes-react';
-import { ButtonSecondary, ChevronDownIcon, TextMuted } from 'design-system';
+import { Button, DropdownMenu, DropdownMenuAlign } from '@sonarsource/echoes-react';
+import { ChevronDownIcon, TextMuted } from 'design-system';
import * as React from 'react';
import { translate } from '../../helpers/l10n';
import { GraphType } from '../../types/project-activity';
@@ -78,7 +78,7 @@ export default function GraphsHeader(props: Props) {
-
-
+
{isCustomGraph(graph) &&
diff --git a/server/sonar-web/src/main/js/components/common/ResetPasswordForm.tsx b/server/sonar-web/src/main/js/components/common/ResetPasswordForm.tsx
index bf14308c9e1..4484b0414b8 100644
--- a/server/sonar-web/src/main/js/components/common/ResetPasswordForm.tsx
+++ b/server/sonar-web/src/main/js/components/common/ResetPasswordForm.tsx
@@ -18,7 +18,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import { ButtonPrimary, FlagMessage, FormField, InputField } from 'design-system';
+import { Button, ButtonVariety } from '@sonarsource/echoes-react';
+import { FlagMessage, FormField, InputField } from 'design-system';
import * as React from 'react';
import { changePassword } from '../../api/users';
import MandatoryFieldsExplanation from '../../components/ui/MandatoryFieldsExplanation';
@@ -140,9 +141,9 @@ export default function ResetPasswordForm({
-
+
{translate('update_verb')}
-
+
);
diff --git a/server/sonar-web/src/main/js/components/common/RestartButton.tsx b/server/sonar-web/src/main/js/components/common/RestartButton.tsx
index df29387ebd5..b3ef6a973ea 100644
--- a/server/sonar-web/src/main/js/components/common/RestartButton.tsx
+++ b/server/sonar-web/src/main/js/components/common/RestartButton.tsx
@@ -18,7 +18,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import { DangerButtonSecondary } from 'design-system';
+import { Button, ButtonVariety } from '@sonarsource/echoes-react';
import * as React from 'react';
import { restart } from '../../api/system';
import ConfirmButton from '../../components/controls/ConfirmButton';
@@ -50,15 +50,16 @@ export default class RestartButton extends React.PureComponent
{
onConfirm={this.handleConfirm}
>
{({ onClick }) => (
-
{systemStatus === 'RESTARTING'
? translate('system.restart_in_progress')
: translate('system.restart_server')}
-
+
)}
);
diff --git a/server/sonar-web/src/main/js/components/controls/HomePageSelect.tsx b/server/sonar-web/src/main/js/components/controls/HomePageSelect.tsx
index e0fe8fbe090..6bbdd29c686 100644
--- a/server/sonar-web/src/main/js/components/controls/HomePageSelect.tsx
+++ b/server/sonar-web/src/main/js/components/controls/HomePageSelect.tsx
@@ -17,7 +17,8 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import { ButtonSecondary, DiscreetInteractiveIcon, HomeFillIcon, HomeIcon } from 'design-system';
+import { Button } from '@sonarsource/echoes-react';
+import { DiscreetInteractiveIcon, HomeFillIcon, HomeIcon } from 'design-system';
import React from 'react';
import { useIntl } from 'react-intl';
import { setHomePage } from '../../api/users';
@@ -75,15 +76,15 @@ export function HomePageSelect(props: Readonly) {
onClick={handleClick}
/>
) : (
- }
+ prefix={ }
className={className}
- disabled={isDefault}
+ isDisabled={isDefault}
onClick={handleClick}
>
{intl.formatMessage({ id: 'overview.set_as_homepage' })}
-
+
)}
);
diff --git a/server/sonar-web/src/main/js/components/controls/ListFooter.tsx b/server/sonar-web/src/main/js/components/controls/ListFooter.tsx
index ac622c08ca0..22fc0692d78 100644
--- a/server/sonar-web/src/main/js/components/controls/ListFooter.tsx
+++ b/server/sonar-web/src/main/js/components/controls/ListFooter.tsx
@@ -18,8 +18,9 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import styled from '@emotion/styled';
+import { Button } from '@sonarsource/echoes-react';
import classNames from 'classnames';
-import { ButtonSecondary, Spinner, themeColor } from 'design-system';
+import { Spinner, themeColor } from 'design-system';
import * as React from 'react';
import { formatMeasure } from '~sonar-aligned/helpers/measures';
import { MetricType } from '~sonar-aligned/types/metrics';
@@ -73,26 +74,26 @@ export default function ListFooter(props: ListFooterProps) {
let button;
if (needReload && props.reload) {
button = (
-
{translate('reload')}
-
+
);
} else if (hasMore && props.loadMore) {
button = (
-
{translate('show_more')}
-
+
);
}
diff --git a/server/sonar-web/src/main/js/components/controls/ValidationModal.tsx b/server/sonar-web/src/main/js/components/controls/ValidationModal.tsx
index 82fcd4ae4dd..9f12993c289 100644
--- a/server/sonar-web/src/main/js/components/controls/ValidationModal.tsx
+++ b/server/sonar-web/src/main/js/components/controls/ValidationModal.tsx
@@ -17,7 +17,8 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import { ButtonPrimary, ButtonSecondary, Modal } from 'design-system';
+import { Button, ButtonVariety } from '@sonarsource/echoes-react';
+import { Modal } from 'design-system';
import { FormikValues } from 'formik';
import * as React from 'react';
import { translate } from '../../helpers/l10n';
@@ -55,21 +56,22 @@ export default class ValidationModal extends React.PureC
{this.props.confirmButtonText}
-
+
}
secondaryButton={
-
{translate('cancel')}
-
+
}
/>
>
diff --git a/server/sonar-web/src/main/js/components/rules/MoreInfoRuleDescription.tsx b/server/sonar-web/src/main/js/components/rules/MoreInfoRuleDescription.tsx
index 2023eead139..c59bf878380 100644
--- a/server/sonar-web/src/main/js/components/rules/MoreInfoRuleDescription.tsx
+++ b/server/sonar-web/src/main/js/components/rules/MoreInfoRuleDescription.tsx
@@ -18,7 +18,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import styled from '@emotion/styled';
-import { ButtonSecondary, FlagMessage, SubTitle, themeBorder, themeColor } from 'design-system';
+import { Button } from '@sonarsource/echoes-react';
+import { FlagMessage, SubTitle, themeBorder, themeColor } from 'design-system';
import * as React from 'react';
import { RuleDescriptionSection } from '../../apps/coding-rules/rule';
import { translate } from '../../helpers/l10n';
@@ -64,14 +65,14 @@ export default class MoreInfoRuleDescription extends React.PureComponent
{translate('coding_rules.more_info.notification_message')}
- {
this.handleNotificationScroll();
}}
>
{translate('coding_rules.more_info.scroll_message')}
-
+
)}
--
2.39.5