diff --git a/assets/images/icon-copy-clipboard-fleet-blue-20x20@2x.png b/assets/images/icon-copy-clipboard-fleet-blue-20x20@2x.png deleted file mode 100644 index 467bca2c5..000000000 Binary files a/assets/images/icon-copy-clipboard-fleet-blue-20x20@2x.png and /dev/null differ diff --git a/assets/images/icon-download-12x12@2x.png b/assets/images/icon-download-12x12@2x.png deleted file mode 100644 index 0891b7dec..000000000 Binary files a/assets/images/icon-download-12x12@2x.png and /dev/null differ diff --git a/assets/images/icon-eye-16x16@2x.png b/assets/images/icon-eye-16x16@2x.png deleted file mode 100644 index d4959ce34..000000000 Binary files a/assets/images/icon-eye-16x16@2x.png and /dev/null differ diff --git a/assets/images/icon-pencil-14x14@2x.png b/assets/images/icon-pencil-14x14@2x.png deleted file mode 100644 index 730406b7e..000000000 Binary files a/assets/images/icon-pencil-14x14@2x.png and /dev/null differ diff --git a/assets/images/icon-plus-16x16@2x.png b/assets/images/icon-plus-16x16@2x.png deleted file mode 100644 index 6fa0f0403..000000000 Binary files a/assets/images/icon-plus-16x16@2x.png and /dev/null differ diff --git a/assets/images/icon-trash-14x14@2x.png b/assets/images/icon-trash-14x14@2x.png deleted file mode 100644 index 10ae5956f..000000000 Binary files a/assets/images/icon-trash-14x14@2x.png and /dev/null differ diff --git a/frontend/components/AddHostsModal/PlatformWrapper/PlatformWrapper.tsx b/frontend/components/AddHostsModal/PlatformWrapper/PlatformWrapper.tsx index 5de8c11c4..3df659eba 100644 --- a/frontend/components/AddHostsModal/PlatformWrapper/PlatformWrapper.tsx +++ b/frontend/components/AddHostsModal/PlatformWrapper/PlatformWrapper.tsx @@ -11,6 +11,7 @@ import { stringToClipboard } from "utilities/copy_text"; import configAPI from "services/entities/config"; import Button from "components/buttons/Button"; +import Icon from "components/Icon/Icon"; import RevealButton from "components/buttons/RevealButton"; // @ts-ignore import InputField from "components/forms/fields/InputField"; @@ -20,9 +21,6 @@ import TabsWrapper from "components/TabsWrapper"; import { isValidPemCertificate } from "../../../pages/hosts/ManageHostsPage/helpers"; -import CopyIcon from "../../../../assets/images/icon-copy-clipboard-fleet-blue-20x20@2x.png"; -import DownloadIcon from "../../../../assets/images/icon-download-12x12@2x.png"; - interface IPlatformSubNav { name: string; type: string; @@ -196,14 +194,14 @@ const PlatformWrapper = ({
)} - Download - download - + +

) : (

@@ -288,18 +286,18 @@ const PlatformWrapper = ({ )}{" "} - {copyMessage[packageType] && ( - {`${copyMessage[packageType]} `} - )} + {copyMessage[packageType] && ( + {`${copyMessage[packageType]} `} + )} @@ -344,13 +342,17 @@ const PlatformWrapper = ({ Osquery uses an enroll secret to authenticate with the Fleet server.
- Download - download icon - + +

{renderFleetCertificateBlock("plain")} @@ -368,10 +370,14 @@ const PlatformWrapper = ({ {fetchCertificateError} ) : ( - + )}

diff --git a/frontend/components/AddHostsModal/PlatformWrapper/_styles.scss b/frontend/components/AddHostsModal/PlatformWrapper/_styles.scss index c4aff4918..be9f866a4 100644 --- a/frontend/components/AddHostsModal/PlatformWrapper/_styles.scss +++ b/frontend/components/AddHostsModal/PlatformWrapper/_styles.scss @@ -85,11 +85,14 @@ } .buttons { - display: block; + display: flex; + flex-direction: row-reverse; align-items: center; - position: absolute; - right: 15px; + position: relative; top: 40px; + margin-right: $pad-medium; + height: 12px; + gap: $pad-small; a { display: flex; @@ -104,7 +107,7 @@ &__run-osquery-input { .buttons { - top: 12px; + top: 34px; } } @@ -147,12 +150,6 @@ } } - &__advanced--osqueryd { - .buttons { - top: 73px; - } - } - .download-certificate--tooltip { margin-bottom: 0; div { diff --git a/frontend/components/EnrollSecrets/EnrollSecretModal/EnrollSecretModal.tsx b/frontend/components/EnrollSecrets/EnrollSecretModal/EnrollSecretModal.tsx index f58c15d1b..85fcaa0c1 100644 --- a/frontend/components/EnrollSecrets/EnrollSecretModal/EnrollSecretModal.tsx +++ b/frontend/components/EnrollSecrets/EnrollSecretModal/EnrollSecretModal.tsx @@ -5,10 +5,9 @@ import { IEnrollSecret } from "interfaces/enroll_secret"; import Modal from "components/Modal"; import Button from "components/buttons/Button"; +import Icon from "components/Icon/Icon"; import EnrollSecretTable from "../EnrollSecretTable"; -import PlusIcon from "../../../../assets/images/icon-plus-16x16@2x.png"; - interface IEnrollSecretModal { selectedTeam: number; onReturnToApp: () => void; @@ -90,7 +89,7 @@ const EnrollSecretModal = ({ variant="text-icon" > <> - Add secret Add secret icon + Add secret diff --git a/frontend/components/EnrollSecrets/EnrollSecretTable/EnrollSecretRow/EnrollSecretRow.tsx b/frontend/components/EnrollSecrets/EnrollSecretTable/EnrollSecretRow/EnrollSecretRow.tsx index a8a934682..7fdac85b2 100644 --- a/frontend/components/EnrollSecrets/EnrollSecretTable/EnrollSecretRow/EnrollSecretRow.tsx +++ b/frontend/components/EnrollSecrets/EnrollSecretTable/EnrollSecretRow/EnrollSecretRow.tsx @@ -78,7 +78,7 @@ const EnrollSecretRow = ({ className={`${baseClass}__copy-secret-icon`} onClick={onCopySecret} > - + - show/hide + diff --git a/frontend/components/buttons/ActionButtons/ActionButtons.tsx b/frontend/components/buttons/ActionButtons/ActionButtons.tsx index d80ddd4df..994cc94d1 100644 --- a/frontend/components/buttons/ActionButtons/ActionButtons.tsx +++ b/frontend/components/buttons/ActionButtons/ActionButtons.tsx @@ -4,6 +4,8 @@ import Button from "components/buttons/Button"; import { ButtonVariant } from "components/buttons/Button/Button"; // @ts-ignore import DropdownButton from "components/buttons/DropdownButton"; +import Icon from "components/Icon/Icon"; + import MoreIcon from "../../../../assets/images/icon-more-menu-3x13@2x.png"; export interface IActionButtonProps { @@ -61,11 +63,7 @@ const ActionButtons = ({ baseClass, actions }: IProps): JSX.Element => { )) diff --git a/frontend/components/buttons/Button/Button.tsx b/frontend/components/buttons/Button/Button.tsx index c0ebb0c85..f5d5e1df2 100644 --- a/frontend/components/buttons/Button/Button.tsx +++ b/frontend/components/buttons/Button/Button.tsx @@ -15,6 +15,8 @@ export type ButtonVariant = | "label" | "text-link" | "text-icon" + | "icon" // Buttons without text + | "small-icon" // Buttons without text | "inverse" | "inverse-alert" | "block" @@ -113,6 +115,7 @@ class Button extends React.Component { variant === "text-link" || variant === "inverse" || variant === "text-icon" || + variant === "icon" || variant === "label"; return ( diff --git a/frontend/components/buttons/Button/_styles.scss b/frontend/components/buttons/Button/_styles.scss index d73daeaee..2111bd32a 100644 --- a/frontend/components/buttons/Button/_styles.scss +++ b/frontend/components/buttons/Button/_styles.scss @@ -196,7 +196,10 @@ $base-class: "button"; } } - &--text-icon { + // &--icon, &--small-icon used for no text and svg icons + &--text-icon, + &--icon, + &--small-icon { @include button-variant(transparent); padding: 0; border: 0; @@ -223,7 +226,25 @@ $base-class: "button"; &:focus { color: $core-vibrant-blue-over; } + + // globally styled gap between text and icon + .children-wrapper { + gap: $pad-small; + } } + + &--icon { + svg { + padding: $pad-icon; + } + } + + &--small-icon { + svg { + padding: $pad-small; + } + } + &--small-text-icon { @include button-variant(transparent); margin-left: $pad-medium; diff --git a/frontend/components/buttons/RevealButton/_styles.scss b/frontend/components/buttons/RevealButton/_styles.scss index b31155aef..88c3fe554 100644 --- a/frontend/components/buttons/RevealButton/_styles.scss +++ b/frontend/components/buttons/RevealButton/_styles.scss @@ -2,5 +2,4 @@ display: inline-flex; align-items: center; padding: $pad-small $pad-xxsmall; // larger clickable area - gap: $pad-xsmall; } diff --git a/frontend/components/forms/fields/InputFieldHiddenContent/InputFieldHiddenContent.tsx b/frontend/components/forms/fields/InputFieldHiddenContent/InputFieldHiddenContent.tsx index f534e2ac7..0c9b0a43d 100644 --- a/frontend/components/forms/fields/InputFieldHiddenContent/InputFieldHiddenContent.tsx +++ b/frontend/components/forms/fields/InputFieldHiddenContent/InputFieldHiddenContent.tsx @@ -60,7 +60,7 @@ const InputFieldHiddenContent = ({ className={`${baseClass}__copy-secret-icon`} onClick={onCopySecret} > - + diff --git a/frontend/pages/admin/TeamManagementPage/TeamDetailsWrapper/TeamDetailsWrapper.tsx b/frontend/pages/admin/TeamManagementPage/TeamDetailsWrapper/TeamDetailsWrapper.tsx index 52e236e27..b270d501d 100644 --- a/frontend/pages/admin/TeamManagementPage/TeamDetailsWrapper/TeamDetailsWrapper.tsx +++ b/frontend/pages/admin/TeamManagementPage/TeamDetailsWrapper/TeamDetailsWrapper.tsx @@ -35,10 +35,6 @@ import SecretEditorModal from "../../../../components/EnrollSecrets/SecretEditor import AddHostsModal from "../../../../components/AddHostsModal"; import EnrollSecretModal from "../../../../components/EnrollSecrets/EnrollSecretModal"; -import EyeIcon from "../../../../../assets/images/icon-eye-16x16@2x.png"; -import PencilIcon from "../../../../../assets/images/icon-pencil-14x14@2x.png"; -import TrashIcon from "../../../../../assets/images/icon-trash-14x14@2x.png"; - const baseClass = "team-details"; interface ITeamDetailsSubNavItem { @@ -418,21 +414,21 @@ const TeamDetailsWrapper = ({ type: "secondary", label: "Manage enroll secrets", buttonVariant: "text-icon", - icon: EyeIcon, + icon: "eye", onClick: toggleManageEnrollSecretsModal, }, { type: "secondary", label: "Edit team", buttonVariant: "text-icon", - icon: PencilIcon, + icon: "pencil", onClick: toggleEditTeamModal, }, { type: "secondary", label: "Delete team", buttonVariant: "text-icon", - icon: TrashIcon, + icon: "trash", hideAction: !isGlobalAdmin, onClick: toggleDeleteTeamModal, }, diff --git a/frontend/pages/hosts/ManageHostsPage/ManageHostsPage.tsx b/frontend/pages/hosts/ManageHostsPage/ManageHostsPage.tsx index 4dd385258..ff43ce20f 100644 --- a/frontend/pages/hosts/ManageHostsPage/ManageHostsPage.tsx +++ b/frontend/pages/hosts/ManageHostsPage/ManageHostsPage.tsx @@ -60,6 +60,7 @@ import { import { getNextLocationPath } from "utilities/helpers"; import Button from "components/buttons/Button"; +import Icon from "components/Icon/Icon"; // @ts-ignore import Dropdown from "components/forms/fields/Dropdown"; import TableContainer from "components/TableContainer"; @@ -96,7 +97,6 @@ import DeleteHostModal from "../components/DeleteHostModal"; import DeleteLabelModal from "./components/DeleteLabelModal"; import EditColumnsIcon from "../../../../assets/images/icon-edit-columns-16x16@2x.png"; import CloseIconBlack from "../../../../assets/images/icon-close-fleet-black-16x16@2x.png"; -import DownloadIcon from "../../../../assets/images/icon-download-12x12@2x.png"; import LabelFilterSelect from "./components/LabelFilterSelect"; import HostsFilterBlock from "./components/HostsFilterBlock"; @@ -1260,10 +1260,11 @@ const ManageHostsPage = ({ )} diff --git a/frontend/pages/hosts/ManageHostsPage/components/CustomLabelGroupHeading/CustomLabelGroupHeading.tsx b/frontend/pages/hosts/ManageHostsPage/components/CustomLabelGroupHeading/CustomLabelGroupHeading.tsx index ff0a05302..9f3682ba6 100644 --- a/frontend/pages/hosts/ManageHostsPage/components/CustomLabelGroupHeading/CustomLabelGroupHeading.tsx +++ b/frontend/pages/hosts/ManageHostsPage/components/CustomLabelGroupHeading/CustomLabelGroupHeading.tsx @@ -4,12 +4,12 @@ * https://react-select.com/components */ import Button from "components/buttons/Button"; +import Icon from "components/Icon/Icon"; import { ILabel } from "interfaces/label"; import React, { useRef } from "react"; import { components, GroupHeadingProps } from "react-select-5"; import { IEmptyOption, IGroupOption } from "../LabelFilterSelect/helpers"; -import PlusIcon from "../../../../../../assets/images/icon-plus-16x16@2x.png"; const baseClass = "custom-label-group-heading"; @@ -53,8 +53,8 @@ const CustomLabelGroupHeading = ( className={`${baseClass}__add-label-btn`} > <> - Add label - Add label icon + Add label + )} diff --git a/frontend/pages/hosts/ManageHostsPage/components/HostsFilterBlock/HostsFilterBlock.tsx b/frontend/pages/hosts/ManageHostsPage/components/HostsFilterBlock/HostsFilterBlock.tsx index 593939acd..9cd443ed0 100644 --- a/frontend/pages/hosts/ManageHostsPage/components/HostsFilterBlock/HostsFilterBlock.tsx +++ b/frontend/pages/hosts/ManageHostsPage/components/HostsFilterBlock/HostsFilterBlock.tsx @@ -25,6 +25,7 @@ import { // @ts-ignore import Dropdown from "components/forms/fields/Dropdown"; import Button from "components/buttons/Button"; +import Icon from "components/Icon/Icon"; import FilterPill from "../FilterPill"; import PoliciesFilter from "../PoliciesFilter"; @@ -32,8 +33,6 @@ import { MAC_SETTINGS_FILTER_OPTIONS } from "../../HostsPageConfig"; import DiskEncryptionStatusFilter from "../DiskEncryptionStatusFilter"; import BootstrapPackageStatusFilter from "../BootstrapPackageStatusFilter/BootstrapPackageStatusFilter"; -import PencilIcon from "../../../../../../assets/images/icon-pencil-14x14@2x.png"; -import TrashIcon from "../../../../../../assets/images/icon-trash-14x14@2x.png"; import PolicyIcon from "../../../../../../assets/images/icon-policy-fleet-black-12x12@2x.png"; const baseClass = "hosts-filter-block"; @@ -137,11 +136,11 @@ const HostsFilterBlock = ({ /> {label_type !== "builtin" && !isOnlyObserver && ( <> - - )} diff --git a/frontend/pages/hosts/details/HostDetailsPage/modals/OSPolicyModal/OSPolicyModal.tsx b/frontend/pages/hosts/details/HostDetailsPage/modals/OSPolicyModal/OSPolicyModal.tsx index be88be9e3..05749a456 100644 --- a/frontend/pages/hosts/details/HostDetailsPage/modals/OSPolicyModal/OSPolicyModal.tsx +++ b/frontend/pages/hosts/details/HostDetailsPage/modals/OSPolicyModal/OSPolicyModal.tsx @@ -8,11 +8,10 @@ import InputField from "components/forms/fields/InputField"; import Modal from "components/Modal"; import TooltipWrapper from "components/TooltipWrapper"; import Button from "components/buttons/Button"; +import Icon from "components/Icon/Icon"; import { ITeam } from "interfaces/team"; -import CopyIcon from "../../../../../../../assets/images/icon-copy-clipboard-fleet-blue-20x20@2x.png"; - interface IRenderOSPolicyModal { onCreateNewPolicy: (team: ITeam) => void; onCancel: () => void; @@ -59,11 +58,11 @@ const OSPolicyModal = ({ >{`${copyMessage} `} )} diff --git a/frontend/pages/policies/PolicyPage/components/PolicyForm/PolicyForm.tsx b/frontend/pages/policies/PolicyPage/components/PolicyForm/PolicyForm.tsx index 6ff5ba22e..6255d8d35 100644 --- a/frontend/pages/policies/PolicyPage/components/PolicyForm/PolicyForm.tsx +++ b/frontend/pages/policies/PolicyPage/components/PolicyForm/PolicyForm.tsx @@ -26,11 +26,11 @@ import RevealButton from "components/buttons/RevealButton"; import Checkbox from "components/forms/fields/Checkbox"; import TooltipWrapper from "components/TooltipWrapper"; import Spinner from "components/Spinner"; +import Icon from "components/Icon/Icon"; import AutoSizeInputField from "components/forms/fields/AutoSizeInputField"; import PremiumFeatureIconWithTooltip from "components/PremiumFeatureIconWithTooltip"; import SaveNewPolicyModal from "../SaveNewPolicyModal"; import InfoIcon from "../../../../../../assets/images/icon-info-purple-14x14@2x.png"; -import PencilIcon from "../../../../../../assets/images/icon-pencil-14x14@2x.png"; const baseClass = "policy-form"; @@ -288,7 +288,7 @@ const PolicyForm = ({ } return ( - ); @@ -365,16 +369,17 @@ const PolicyForm = ({ onKeyPress={onInputKeypress} isFocused={isEditingDescription} /> - setIsEditingDescription(true)} > - Edit name - + ); @@ -403,16 +408,17 @@ const PolicyForm = ({ onKeyPress={onInputKeypress} isFocused={isEditingResolution} /> - setIsEditingResolution(true)} > - Edit name - + ); diff --git a/frontend/pages/policies/PolicyPage/components/PolicyForm/_styles.scss b/frontend/pages/policies/PolicyPage/components/PolicyForm/_styles.scss index e8f64b4dc..8c397d6c3 100644 --- a/frontend/pages/policies/PolicyPage/components/PolicyForm/_styles.scss +++ b/frontend/pages/policies/PolicyPage/components/PolicyForm/_styles.scss @@ -41,7 +41,8 @@ .edit-link { cursor: pointer; - padding-left: 12px; + padding-left: $pad-small; + height: 16px; } .name-description-resolve { @@ -82,8 +83,6 @@ } } .edit-icon { - width: 14px; - height: 14px; opacity: 1; transition: opacity 0.2s; margin-left: 0; diff --git a/frontend/pages/policies/PolicyPage/components/QueryResults/QueryResults.tsx b/frontend/pages/policies/PolicyPage/components/QueryResults/QueryResults.tsx index 97d305e0e..e6a9fff91 100644 --- a/frontend/pages/policies/PolicyPage/components/QueryResults/QueryResults.tsx +++ b/frontend/pages/policies/PolicyPage/components/QueryResults/QueryResults.tsx @@ -11,16 +11,16 @@ import { ICampaign } from "interfaces/campaign"; import { ITarget } from "interfaces/target"; import Button from "components/buttons/Button"; +import Icon from "components/Icon/Icon"; import TabsWrapper from "components/TabsWrapper"; import InfoBanner from "components/InfoBanner"; import ShowQueryModal from "components/modals/ShowQueryModal"; + import QueryResultsHeading from "components/queries/queryResults/QueryResultsHeading"; import AwaitingResults from "components/queries/queryResults/AwaitingResults"; import PolicyQueryTable from "../PolicyQueriesTable/PolicyQueriesTable"; import PolicyQueriesErrorsTable from "../PolicyQueriesErrorsTable/PolicyQueriesErrorsTable"; -import DownloadIcon from "../../../../../../assets/images/icon-download-12x12@2x.png"; -import EyeIcon from "../../../../../../assets/images/icon-eye-16x16@2x.png"; interface IQueryResultsProps { campaign: ICampaign; @@ -115,10 +115,10 @@ const QueryResults = ({ diff --git a/frontend/pages/queries/QueryPage/components/QueryForm/QueryForm.tsx b/frontend/pages/queries/QueryPage/components/QueryForm/QueryForm.tsx index e5a121ec7..8dd9211ff 100644 --- a/frontend/pages/queries/QueryPage/components/QueryForm/QueryForm.tsx +++ b/frontend/pages/queries/QueryPage/components/QueryForm/QueryForm.tsx @@ -24,10 +24,10 @@ import Button from "components/buttons/Button"; import RevealButton from "components/buttons/RevealButton"; import Checkbox from "components/forms/fields/Checkbox"; import Spinner from "components/Spinner"; +import Icon from "components/Icon/Icon"; import AutoSizeInputField from "components/forms/fields/AutoSizeInputField"; import NewQueryModal from "../NewQueryModal"; import InfoIcon from "../../../../../../assets/images/icon-info-purple-14x14@2x.png"; -import PencilIcon from "../../../../../../assets/images/icon-pencil-14x14@2x.png"; const baseClass = "query-form"; @@ -344,13 +344,17 @@ const QueryForm = ({ onKeyPress={onInputKeypress} isFocused={isEditingName} /> - setIsEditingName(true)}> - Edit name setIsEditingName(true)} + > + - + ); @@ -376,16 +380,17 @@ const QueryForm = ({ onKeyPress={onInputKeypress} isFocused={isEditingDescription} /> - setIsEditingDescription(true)} > - Edit name - + ); diff --git a/frontend/pages/queries/QueryPage/components/QueryForm/_styles.scss b/frontend/pages/queries/QueryPage/components/QueryForm/_styles.scss index 683b2bd18..b46777bce 100644 --- a/frontend/pages/queries/QueryPage/components/QueryForm/_styles.scss +++ b/frontend/pages/queries/QueryPage/components/QueryForm/_styles.scss @@ -41,7 +41,8 @@ .edit-link { cursor: pointer; - padding-left: 12px; + padding-left: $pad-small; + height: 16px; } .name-description { diff --git a/frontend/pages/queries/QueryPage/components/QueryResults/QueryResults.tsx b/frontend/pages/queries/QueryPage/components/QueryResults/QueryResults.tsx index d6a06193d..471ab27f4 100644 --- a/frontend/pages/queries/QueryPage/components/QueryResults/QueryResults.tsx +++ b/frontend/pages/queries/QueryPage/components/QueryResults/QueryResults.tsx @@ -11,6 +11,7 @@ import { ICampaign } from "interfaces/campaign"; import { ITarget } from "interfaces/target"; import Button from "components/buttons/Button"; +import Icon from "components/Icon/Icon"; import TableContainer from "components/TableContainer"; import TabsWrapper from "components/TabsWrapper"; import ShowQueryModal from "components/modals/ShowQueryModal"; @@ -19,9 +20,6 @@ import AwaitingResults from "components/queries/queryResults/AwaitingResults"; import resultsTableHeaders from "./QueryResultsTableConfig"; -import DownloadIcon from "../../../../../../assets/images/icon-download-12x12@2x.png"; -import EyeIcon from "../../../../../../assets/images/icon-eye-16x16@2x.png"; - interface IQueryResultsProps { campaign: ICampaign; isQueryFinished: boolean; @@ -134,10 +132,10 @@ const QueryResults = ({ diff --git a/frontend/styles/var/padding.scss b/frontend/styles/var/padding.scss index d8110439e..91b426edc 100644 --- a/frontend/styles/var/padding.scss +++ b/frontend/styles/var/padding.scss @@ -2,6 +2,7 @@ $pad-auto: auto; $pad-xxsmall: px-to-rem(2); $pad-xsmall: px-to-rem(4); $pad-small: px-to-rem(8); +$pad-icon: px-to-rem(14); $pad-medium: px-to-rem(16); $pad-large: px-to-rem(24); $pad-xlarge: px-to-rem(32);