From aab3a49f2cef632e265e161e66cf1b635f44162c Mon Sep 17 00:00:00 2001 From: Tom Moor Date: Sat, 8 Apr 2023 11:16:05 -0400 Subject: [PATCH] chore: Bump `outline-icons` (#5170 * Bump outline-icons to default use currentColor * wip --- app/actions/index.ts | 4 +--- app/components/Arrow.tsx | 12 +++------- app/components/Button.tsx | 23 +------------------ app/components/CommandBarItem.tsx | 3 +-- app/components/ContextMenu/MenuItem.tsx | 8 ++----- .../ContextMenu/OverflowMenuButton.tsx | 9 ++------ .../DefaultCollectionInputSelect.tsx | 2 +- app/components/DocumentBreadcrumb.tsx | 6 ++--- app/components/DocumentCard.tsx | 4 ++-- app/components/DocumentListItem.tsx | 1 + app/components/EventListItem.tsx | 14 +++++------ app/components/Header.tsx | 1 - app/components/List/Error.tsx | 4 ++-- app/components/Modal.tsx | 6 ++--- app/components/Sidebar/App.tsx | 8 +++---- app/components/Sidebar/Settings.tsx | 4 ++-- .../Sidebar/components/ArchiveLink.tsx | 2 +- .../Sidebar/components/Disclosure.tsx | 2 +- app/components/Sidebar/components/Header.tsx | 4 +--- .../Sidebar/components/HeaderButton.tsx | 4 ++-- .../Sidebar/components/HistoryNavigation.tsx | 4 ++-- .../Sidebar/components/TrashLink.tsx | 2 +- app/components/Toast.tsx | 10 ++++---- app/editor/components/LinkEditor.tsx | 12 ++++------ app/editor/components/ToolbarMenu.tsx | 2 +- app/hooks/useSettingsActions.tsx | 2 +- app/menus/CollectionMenu.tsx | 6 +---- app/menus/RevisionMenu.tsx | 1 - app/menus/TableOfContentsMenu.tsx | 1 - app/scenes/Archive.tsx | 2 +- app/scenes/Collection/Empty.tsx | 2 +- .../Document/components/CommentThreadItem.tsx | 1 + .../Document/components/DocumentMeta.tsx | 2 +- app/scenes/Document/components/Header.tsx | 2 -- app/scenes/Document/components/Notices.tsx | 3 +-- .../Document/components/ReferenceListItem.tsx | 6 +---- .../Document/components/SharePopover.tsx | 8 ++----- app/scenes/Drafts.tsx | 2 +- app/scenes/Home.tsx | 2 +- app/scenes/Login/index.tsx | 4 ++-- .../Search/components/RecentSearches.tsx | 2 +- app/scenes/Settings/Details.tsx | 2 +- app/scenes/Settings/Export.tsx | 2 +- app/scenes/Settings/Features.tsx | 2 +- app/scenes/Settings/GoogleAnalytics.tsx | 5 +--- app/scenes/Settings/Groups.tsx | 2 +- app/scenes/Settings/Import.tsx | 2 +- app/scenes/Settings/Members.tsx | 2 +- app/scenes/Settings/Notifications.tsx | 20 ++++++++-------- app/scenes/Settings/Preferences.tsx | 5 +--- app/scenes/Settings/Profile.tsx | 2 +- app/scenes/Settings/Security.tsx | 7 +++--- app/scenes/Settings/SelfHosted.tsx | 5 +--- app/scenes/Settings/Shares.tsx | 4 ++-- app/scenes/Settings/Tokens.tsx | 2 +- app/scenes/Settings/Zapier.tsx | 2 +- app/scenes/Templates.tsx | 2 +- app/scenes/Trash.tsx | 2 +- package.json | 2 +- plugins/webhooks/client/Settings.tsx | 2 +- shared/editor/components/DisabledEmbed.tsx | 2 +- shared/editor/components/FileExtension.tsx | 6 +---- shared/editor/components/Frame.tsx | 2 +- shared/editor/components/Image.tsx | 2 +- shared/editor/marks/Link.tsx | 2 +- shared/editor/nodes/Attachment.tsx | 2 +- shared/editor/nodes/Notice.tsx | 6 ++--- shared/editor/plugins/BlockMenuTrigger.tsx | 2 +- shared/i18n/locales/en_US/translation.json | 2 +- yarn.lock | 8 +++---- 70 files changed, 113 insertions(+), 190 deletions(-) diff --git a/app/actions/index.ts b/app/actions/index.ts index ed2218aca..e088c0026 100644 --- a/app/actions/index.ts +++ b/app/actions/index.ts @@ -49,9 +49,7 @@ export function actionToMenuItem( const title = resolve(action.name, context); const icon = resolvedIcon && action.iconInContextMenu !== false - ? React.cloneElement(resolvedIcon, { - color: "currentColor", - }) + ? resolvedIcon : undefined; if (resolvedChildren) { diff --git a/app/components/Arrow.tsx b/app/components/Arrow.tsx index ba462d577..149feb457 100644 --- a/app/components/Arrow.tsx +++ b/app/components/Arrow.tsx @@ -6,17 +6,11 @@ export default function Arrow() { width="13" height="30" viewBox="0 0 13 30" - fill="none" + fill="currentColor" xmlns="http://www.w3.org/2000/svg" > - - + + ); } diff --git a/app/components/Button.tsx b/app/components/Button.tsx index e374ea564..551ce6529 100644 --- a/app/components/Button.tsx +++ b/app/components/Button.tsx @@ -14,7 +14,6 @@ type RealProps = { $borderOnHover?: boolean; $neutral?: boolean; $danger?: boolean; - $iconColor?: string; }; const RealButton = styled(ActionButton)` @@ -37,14 +36,6 @@ const RealButton = styled(ActionButton)` appearance: none !important; ${undraggableOnDesktop()} - ${(props) => - !props.$borderOnHover && - ` - svg { - fill: ${props.$iconColor || "currentColor"}; - } - `} - &::-moz-focus-inner { padding: 0; border: 0; @@ -77,15 +68,6 @@ const RealButton = styled(ActionButton)` : `rgba(0, 0, 0, 0.07) 0px 1px 2px, ${props.theme.buttonNeutralBorder} 0 0 0 1px inset` }; - ${ - props.$borderOnHover - ? "" - : `svg { - fill: ${props.$iconColor || "currentColor"}; - }` - } - - &:hover:not(:disabled), &[aria-expanded="true"] { background: ${ @@ -156,7 +138,6 @@ export const Inner = styled.span<{ export type Props = ActionButtonProps & { icon?: React.ReactNode; - iconColor?: string; children?: React.ReactNode; disclosure?: boolean; neutral?: boolean; @@ -184,7 +165,6 @@ const Button = ( neutral, action, icon, - iconColor, borderOnHover, hideIcon, fullwidth, @@ -204,13 +184,12 @@ const Button = ( $danger={danger} $fullwidth={fullwidth} $borderOnHover={borderOnHover} - $iconColor={iconColor} {...rest} > {hasIcon && ic} {hasText && } - {disclosure && } + {disclosure && } ); diff --git a/app/components/CommandBarItem.tsx b/app/components/CommandBarItem.tsx index 7d578e784..c99b4a0eb 100644 --- a/app/components/CommandBarItem.tsx +++ b/app/components/CommandBarItem.tsx @@ -39,10 +39,9 @@ function CommandBarItem( // @ts-expect-error no icon on ActionImpl React.cloneElement(action.icon, { size: 22, - color: "currentColor", }) ) : ( - + )} diff --git a/app/components/ContextMenu/MenuItem.tsx b/app/components/ContextMenu/MenuItem.tsx index 79fdf459c..b58d33c8f 100644 --- a/app/components/ContextMenu/MenuItem.tsx +++ b/app/components/ContextMenu/MenuItem.tsx @@ -78,15 +78,11 @@ const MenuItem = ( > {selected !== undefined && ( <> - {selected ? : } + {selected ? : }   )} - {icon && ( - - {React.cloneElement(icon, { color: "currentColor" })} - - )} + {icon && {icon}} {children} )} diff --git a/app/components/ContextMenu/OverflowMenuButton.tsx b/app/components/ContextMenu/OverflowMenuButton.tsx index 1f25baf96..f72fd93e9 100644 --- a/app/components/ContextMenu/OverflowMenuButton.tsx +++ b/app/components/ContextMenu/OverflowMenuButton.tsx @@ -5,19 +5,14 @@ import NudeButton from "~/components/NudeButton"; type Props = React.ComponentProps & { className?: string; - iconColor?: string; }; -export default function OverflowMenuButton({ - iconColor, - className, - ...rest -}: Props) { +export default function OverflowMenuButton({ className, ...rest }: Props) { return ( {(props) => ( - + )} diff --git a/app/components/DefaultCollectionInputSelect.tsx b/app/components/DefaultCollectionInputSelect.tsx index c811dc0c9..9a9637eef 100644 --- a/app/components/DefaultCollectionInputSelect.tsx +++ b/app/components/DefaultCollectionInputSelect.tsx @@ -73,7 +73,7 @@ const DefaultCollectionInputSelect = ({ label: ( - + {t("Home")} diff --git a/app/components/DocumentBreadcrumb.tsx b/app/components/DocumentBreadcrumb.tsx index 89fc5e3a4..952ef2c1b 100644 --- a/app/components/DocumentBreadcrumb.tsx +++ b/app/components/DocumentBreadcrumb.tsx @@ -22,7 +22,7 @@ function useCategory(document: Document): MenuInternalLink | null { if (document.isDeleted) { return { type: "route", - icon: , + icon: , title: t("Trash"), to: "/trash", }; @@ -31,7 +31,7 @@ function useCategory(document: Document): MenuInternalLink | null { if (document.isArchived) { return { type: "route", - icon: , + icon: , title: t("Archive"), to: "/archive", }; @@ -40,7 +40,7 @@ function useCategory(document: Document): MenuInternalLink | null { if (document.isTemplate) { return { type: "route", - icon: , + icon: , title: t("Templates"), to: "/templates", }; diff --git a/app/components/DocumentCard.tsx b/app/components/DocumentCard.tsx index 14a2df413..81a74aa22 100644 --- a/app/components/DocumentCard.tsx +++ b/app/components/DocumentCard.tsx @@ -128,7 +128,7 @@ function DocumentCard(props: Props) { : document.titleWithDefault} - +