From 362d05f65d058566825eb5e57a1e1dc59b2f7421 Mon Sep 17 00:00:00 2001 From: David Newell Date: Wed, 14 Aug 2024 09:54:37 +0100 Subject: [PATCH] chore: remove antd (#24256) --- .eslintrc.js | 16 - .storybook/preview.tsx | 1 - .storybook/storybook.scss | 16 - .storybook/test-runner.ts | 1 - frontend/@posthog/apps-common/package.json | 1 - frontend/@posthog/lemon-ui/package.json | 1 - .../components/KeyboardShortcut.scss | 6 - frontend/src/lib/components/FullScreen.tsx | 2 +- .../components/InsightLabel/InsightLabel.scss | 7 - .../IntervalFilter/IntervalFilter.tsx | 2 +- .../TaxonomicFilter/InfiniteList.scss | 7 - .../TaxonomicFilter/InfiniteList.tsx | 2 +- .../src/lib/hooks/useOutsideClickHandler.ts | 2 +- .../lib/lemon-ui/LemonButton/LemonButton.scss | 15 - .../lemon-ui/LemonCheckbox/LemonCheckbox.scss | 2 +- frontend/src/lib/lemon-ui/Popover/Popover.tsx | 4 +- frontend/src/scenes/cohorts/Cohort.tsx | 2 - frontend/src/scenes/cohorts/CohortEdit.tsx | 8 +- frontend/src/scenes/cohorts/Cohorts.scss | 9 - .../src/scenes/dashboard/DashboardItems.scss | 5 - .../src/scenes/dashboard/DashboardItems.tsx | 2 +- .../src/scenes/experiments/Experiment.scss | 23 - .../src/scenes/feature-flags/FeatureFlag.scss | 11 - .../feature-flags/FeatureFlagProjects.tsx | 2 +- frontend/src/scenes/funnels/Funnel.scss | 4 - .../FunnelBarVertical/FunnelBarVertical.scss | 5 - .../insights/EmptyStates/EmptyStates.scss | 8 - .../SystemStatus/KafkaInspectorTab.tsx | 7 +- .../scenes/notebooks/Notebook/Notebook.scss | 6 - .../project-homepage/ProjectHomepage.scss | 8 - .../stories/How to build a form.stories.mdx | 1 - .../stories/How to use components.stories.mdx | 1 - frontend/src/styles/antd.less | 45 -- frontend/src/styles/global.scss | 170 ++---- frontend/src/styles/index.tsx | 1 - frontend/src/styles/vars.scss | 4 - frontend/src/toolbar/styles.scss | 1 - jest.config.ts | 1 - package.json | 2 - pnpm-lock.yaml | 568 +----------------- webpack.config.js | 2 - 41 files changed, 79 insertions(+), 902 deletions(-) delete mode 100644 .storybook/storybook.scss delete mode 100644 frontend/src/styles/antd.less diff --git a/.eslintrc.js b/.eslintrc.js index 01f8b844bfd..d3d6deb301d 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -118,22 +118,6 @@ module.exports = { name: '@ant-design/icons', message: 'Please use icons from the @posthog/icons package instead', }, - { - name: 'antd', - importNames: [ - 'Card', - 'Col', - 'Row', - 'Alert', - 'Tooltip', - 'Progress', - 'Radio', - 'Divider', - 'Popconfirm', - 'Table', - ], - message: 'please use the Lemon equivalent instead', - }, ], }, ], diff --git a/.storybook/preview.tsx b/.storybook/preview.tsx index 0996efeff52..e81ceec38df 100644 --- a/.storybook/preview.tsx +++ b/.storybook/preview.tsx @@ -1,5 +1,4 @@ import '~/styles' -import './storybook.scss' import type { Meta, Parameters, Preview } from '@storybook/react' import { Title, Subtitle, Description, Primary, Controls, Stories } from '@storybook/blocks' import { worker } from '~/mocks/browser' diff --git a/.storybook/storybook.scss b/.storybook/storybook.scss deleted file mode 100644 index b0be268408f..00000000000 --- a/.storybook/storybook.scss +++ /dev/null @@ -1,16 +0,0 @@ -// Counteract toolbar styles -.sb-show-main { - .ant-modal-mask, - .ant-modal-wrap { - z-index: 1050 !important; - } - - .ant-select-dropdown, - .ant-picker-dropdown { - z-index: 1060 !important; - } - - .ant-tooltip { - z-index: 1060 !important; - } -} diff --git a/.storybook/test-runner.ts b/.storybook/test-runner.ts index 026a3f786ad..cda11a2e933 100644 --- a/.storybook/test-runner.ts +++ b/.storybook/test-runner.ts @@ -54,7 +54,6 @@ declare module '@storybook/types' { const RETRY_TIMES = 2 const LOADER_SELECTORS = [ - '.ant-skeleton', '.Spinner', '.LemonSkeleton', '.LemonTableLoader', diff --git a/frontend/@posthog/apps-common/package.json b/frontend/@posthog/apps-common/package.json index f505f3a224a..3c56baf15ca 100644 --- a/frontend/@posthog/apps-common/package.json +++ b/frontend/@posthog/apps-common/package.json @@ -17,7 +17,6 @@ }, "peerDependencies": { "@posthog/lemon-ui": "*", - "antd": "*", "kea": "*", "kea-router": "*", "react": "*", diff --git a/frontend/@posthog/lemon-ui/package.json b/frontend/@posthog/lemon-ui/package.json index 3119d6264d8..c5c85f2a276 100644 --- a/frontend/@posthog/lemon-ui/package.json +++ b/frontend/@posthog/lemon-ui/package.json @@ -17,7 +17,6 @@ "typescript": ">=4.0.0" }, "peerDependencies": { - "antd": "*", "kea": "*", "kea-router": "*", "react": "*", diff --git a/frontend/src/layout/navigation-3000/components/KeyboardShortcut.scss b/frontend/src/layout/navigation-3000/components/KeyboardShortcut.scss index 8ee3e44a802..28f5c41f95c 100644 --- a/frontend/src/layout/navigation-3000/components/KeyboardShortcut.scss +++ b/frontend/src/layout/navigation-3000/components/KeyboardShortcut.scss @@ -20,12 +20,6 @@ background: none; } - .ant-tooltip & { - color: #fff; - background: rgba(#000, 0.333); - border-color: rgba(#fff, 0.333); - } - & + .KeyboardShortcut__key { margin-left: 0.25rem; } diff --git a/frontend/src/lib/components/FullScreen.tsx b/frontend/src/lib/components/FullScreen.tsx index 95859d4efe8..478cdb523b4 100644 --- a/frontend/src/lib/components/FullScreen.tsx +++ b/frontend/src/lib/components/FullScreen.tsx @@ -1,7 +1,7 @@ import { useEffect } from 'react' export function FullScreen({ onExit }: { onExit?: () => any }): null { - const selector = 'aside.ant-layout-sider, .layout-top-content' + const selector = '.layout-top-content' useEffect(() => { const myClasses = window.document.querySelectorAll(selector) diff --git a/frontend/src/lib/components/InsightLabel/InsightLabel.scss b/frontend/src/lib/components/InsightLabel/InsightLabel.scss index 3021375c9a4..f6e7f377ff0 100644 --- a/frontend/src/lib/components/InsightLabel/InsightLabel.scss +++ b/frontend/src/lib/components/InsightLabel/InsightLabel.scss @@ -8,13 +8,6 @@ font-weight: bold; } - .ant-tag { - margin-right: 0; - color: var(--primary-alt); - background-color: var(--border-light); - border: 0; - } - .graph-series-glyph { padding: 0 6px; margin-right: 4px; diff --git a/frontend/src/lib/components/IntervalFilter/IntervalFilter.tsx b/frontend/src/lib/components/IntervalFilter/IntervalFilter.tsx index 1edb60a8415..522ba901a97 100644 --- a/frontend/src/lib/components/IntervalFilter/IntervalFilter.tsx +++ b/frontend/src/lib/components/IntervalFilter/IntervalFilter.tsx @@ -18,7 +18,7 @@ export function IntervalFilter({ disabled }: IntervalFilterProps): JSX.Element { return ( <> - grouped by + grouped by diff --git a/frontend/src/lib/hooks/useOutsideClickHandler.ts b/frontend/src/lib/hooks/useOutsideClickHandler.ts index a0ebd2fbb3a..7306837906b 100644 --- a/frontend/src/lib/hooks/useOutsideClickHandler.ts +++ b/frontend/src/lib/hooks/useOutsideClickHandler.ts @@ -3,7 +3,7 @@ import { useEffect } from 'react' export const CLICK_OUTSIDE_BLOCK_CLASS = 'click-outside-block' -const exceptions = ['.ant-select-dropdown *', `.${CLICK_OUTSIDE_BLOCK_CLASS}`, `.${CLICK_OUTSIDE_BLOCK_CLASS} *`] +const exceptions = [`.${CLICK_OUTSIDE_BLOCK_CLASS}`, `.${CLICK_OUTSIDE_BLOCK_CLASS} *`] export function useOutsideClickHandler( refs: React.MutableRefObject[], diff --git a/frontend/src/lib/lemon-ui/LemonButton/LemonButton.scss b/frontend/src/lib/lemon-ui/LemonButton/LemonButton.scss index ba819db9f35..e4e592e6b3f 100644 --- a/frontend/src/lib/lemon-ui/LemonButton/LemonButton.scss +++ b/frontend/src/lib/lemon-ui/LemonButton/LemonButton.scss @@ -335,21 +335,6 @@ } } - .ant-tooltip & { - // Buttons have an overriden style in tooltips, as they are always dark - &:hover { - background: rgb(255 255 255 / 15%) !important; - } - - &:active { - background: rgb(255 255 255 / 20%) !important; - } - - .LemonButton__icon { - color: #fff !important; - } - } - @include shared-variables; @include size-variables; } diff --git a/frontend/src/lib/lemon-ui/LemonCheckbox/LemonCheckbox.scss b/frontend/src/lib/lemon-ui/LemonCheckbox/LemonCheckbox.scss index d83d4f5e898..6af35383fcc 100644 --- a/frontend/src/lib/lemon-ui/LemonCheckbox/LemonCheckbox.scss +++ b/frontend/src/lib/lemon-ui/LemonCheckbox/LemonCheckbox.scss @@ -6,7 +6,7 @@ line-height: 1.5rem; .LemonCheckbox__input { - width: 0 !important; // Some ant-form styles override this so we mark as important + width: 0 !important; height: 0 !important; appearance: none !important; } diff --git a/frontend/src/lib/lemon-ui/Popover/Popover.tsx b/frontend/src/lib/lemon-ui/Popover/Popover.tsx index 5c8aa405293..8d1eb2c6c66 100644 --- a/frontend/src/lib/lemon-ui/Popover/Popover.tsx +++ b/frontend/src/lib/lemon-ui/Popover/Popover.tsx @@ -47,9 +47,7 @@ export interface PopoverProps { /** Whether default box padding should be applies. @default true */ padded?: boolean middleware?: Middleware[] - /** Any other refs that needs to be taken into account for handling outside clicks e.g. other nested popovers. - * Works also with strings, matching classnames or ids, for antd legacy components that don't support refs - * **/ + /** Any other refs that needs to be taken into account for handling outside clicks e.g. other nested popovers. */ additionalRefs?: React.MutableRefObject[] referenceRef?: UseFloatingReturn['refs']['reference'] floatingRef?: UseFloatingReturn['refs']['floating'] diff --git a/frontend/src/scenes/cohorts/Cohort.tsx b/frontend/src/scenes/cohorts/Cohort.tsx index 2286edee5e4..210a21dc16b 100644 --- a/frontend/src/scenes/cohorts/Cohort.tsx +++ b/frontend/src/scenes/cohorts/Cohort.tsx @@ -1,5 +1,3 @@ -import 'antd/lib/dropdown/style/index.css' - import { CohortEdit } from 'scenes/cohorts/CohortEdit' import { SceneExport } from 'scenes/sceneTypes' diff --git a/frontend/src/scenes/cohorts/CohortEdit.tsx b/frontend/src/scenes/cohorts/CohortEdit.tsx index cdd7fdd0c7e..aa6bf12c75f 100644 --- a/frontend/src/scenes/cohorts/CohortEdit.tsx +++ b/frontend/src/scenes/cohorts/CohortEdit.tsx @@ -219,18 +219,14 @@ export function CohortEdit({ id }: CohortLogicProps): JSX.Element { -
- {cohort.csv?.name ?? 'File chosen'} -
+
{cohort.csv?.name ?? 'File chosen'}
) : ( <> -
- Drag a file here or click to browse for a file -
+
Drag a file here or click to browse for a file
)} diff --git a/frontend/src/scenes/cohorts/Cohorts.scss b/frontend/src/scenes/cohorts/Cohorts.scss index 3d6cc05cb56..4a33556c6f1 100644 --- a/frontend/src/scenes/cohorts/Cohorts.scss +++ b/frontend/src/scenes/cohorts/Cohorts.scss @@ -1,17 +1,8 @@ -.cohorts-drawer .ant-drawer-content-wrapper { - width: 100% !important; - max-width: 850px !important; -} - .cohort-recalculating { padding: 0.5rem 1rem; margin-top: 1rem; background-color: var(--bg-3000); border-radius: var(--radius); - - .ant-spin-spinning { - margin-right: 0.375rem; - } } .cohort-csv-dragger { diff --git a/frontend/src/scenes/dashboard/DashboardItems.scss b/frontend/src/scenes/dashboard/DashboardItems.scss index 574d5fdd3e6..53c81cd6498 100644 --- a/frontend/src/scenes/dashboard/DashboardItems.scss +++ b/frontend/src/scenes/dashboard/DashboardItems.scss @@ -84,8 +84,3 @@ cursor: ns-resize; } } - -// All dropdowns must be below top navigation -.ant-dropdown { - z-index: 700; -} diff --git a/frontend/src/scenes/dashboard/DashboardItems.tsx b/frontend/src/scenes/dashboard/DashboardItems.tsx index 4d74b142e26..8e028a2fb79 100644 --- a/frontend/src/scenes/dashboard/DashboardItems.tsx +++ b/frontend/src/scenes/dashboard/DashboardItems.tsx @@ -99,7 +99,7 @@ export function DashboardItems(): JSX.Element { isDragging.current = false }, 250) }} - draggableCancel=".anticon,.ant-dropdown,table,button,.Popover" + draggableCancel=".anticon,table,button,.Popover" > {tiles?.map((tile: DashboardTile) => { const { insight: legacyInsight, text } = tile diff --git a/frontend/src/scenes/experiments/Experiment.scss b/frontend/src/scenes/experiments/Experiment.scss index 0631a78f6a7..df10e7141aa 100644 --- a/frontend/src/scenes/experiments/Experiment.scss +++ b/frontend/src/scenes/experiments/Experiment.scss @@ -22,10 +22,6 @@ padding-bottom: 1rem; margin-top: 0.5rem; - .ant-form-horizontal { - min-height: 32px; - } - .border-top { border-top-left-radius: 4px; border-top-right-radius: 4px; @@ -75,14 +71,6 @@ margin-bottom: 1rem; border-top: 1px solid var(--border); } - - .ant-input-number-disabled { - color: black; - } - - .ant-input[disabled] { - color: black; - } } .view-experiment { @@ -97,12 +85,6 @@ .participants { background-color: white; - - .ant-collapse-header { - padding-top: 0.5rem; - padding-bottom: 0.5rem; - padding-left: 0.75rem; - } } .variants-list { @@ -123,11 +105,6 @@ padding-top: 1rem; } - .ant-collapse-content-box { - display: flex; - flex-flow: column; - } - .secondary-progress { margin-top: 0.5rem; diff --git a/frontend/src/scenes/feature-flags/FeatureFlag.scss b/frontend/src/scenes/feature-flags/FeatureFlag.scss index d1d77b96dc8..1ced200bbde 100644 --- a/frontend/src/scenes/feature-flags/FeatureFlag.scss +++ b/frontend/src/scenes/feature-flags/FeatureFlag.scss @@ -5,19 +5,8 @@ border: 1px solid var(--border); border-radius: var(--radius); - .ant-form-item { - min-height: 32px; - } - .label-row { font-weight: bold; - - .ant-col { - display: flex; - align-items: center; - justify-content: space-between; - min-height: 32px; - } } .VariantFormList__row { diff --git a/frontend/src/scenes/feature-flags/FeatureFlagProjects.tsx b/frontend/src/scenes/feature-flags/FeatureFlagProjects.tsx index 3d7adeae62c..99ce22a5453 100644 --- a/frontend/src/scenes/feature-flags/FeatureFlagProjects.tsx +++ b/frontend/src/scenes/feature-flags/FeatureFlagProjects.tsx @@ -140,7 +140,7 @@ function FeatureFlagCopySection(): JSX.Element { return hasMultipleProjects && featureFlag.can_edit ? ( <>

Feature flag copy

-
Copy your flag and its configuration to another project.
+
Copy your flag and its configuration to another project.
{hasStaticCohort && ( The flag you are about to copy references a static cohort. If the cohort with identical name does diff --git a/frontend/src/scenes/funnels/Funnel.scss b/frontend/src/scenes/funnels/Funnel.scss index 2953aa427e7..cbe8d33ebd1 100644 --- a/frontend/src/scenes/funnels/Funnel.scss +++ b/frontend/src/scenes/funnels/Funnel.scss @@ -2,9 +2,5 @@ .funnel-bins-custom-picker { width: 43px; // enough to hold two characters margin: 5px 0 5px 13px; // margin left comes from 24px (padding left select option) - 11px (padding inside input) - - .ant-input-number-handler-wrap { - display: none; - } } } diff --git a/frontend/src/scenes/funnels/FunnelBarVertical/FunnelBarVertical.scss b/frontend/src/scenes/funnels/FunnelBarVertical/FunnelBarVertical.scss index 8134c15ab25..eb7a5c9666b 100644 --- a/frontend/src/scenes/funnels/FunnelBarVertical/FunnelBarVertical.scss +++ b/frontend/src/scenes/funnels/FunnelBarVertical/FunnelBarVertical.scss @@ -171,11 +171,6 @@ .StepLegend { height: 100%; - - // overwrite antd-styles for legends without persons modal - // e.g. in exported insights - font-feature-settings: normal; - font-variant-numeric: normal; white-space: nowrap; border-left: 1px solid var(--border); diff --git a/frontend/src/scenes/insights/EmptyStates/EmptyStates.scss b/frontend/src/scenes/insights/EmptyStates/EmptyStates.scss index 1197cb0e5f0..ddae1edbb31 100644 --- a/frontend/src/scenes/insights/EmptyStates/EmptyStates.scss +++ b/frontend/src/scenes/insights/EmptyStates/EmptyStates.scss @@ -8,10 +8,6 @@ font-size: 1.1em; color: var(--muted); - .ant-empty { - margin: 1rem 0; - } - &.error { h2 { color: var(--danger); @@ -31,10 +27,6 @@ color: var(--primary-alt); } - button.ant-btn-lg { - height: 42px; - } - .empty-state-inner { display: flex; flex-direction: column; diff --git a/frontend/src/scenes/instance/SystemStatus/KafkaInspectorTab.tsx b/frontend/src/scenes/instance/SystemStatus/KafkaInspectorTab.tsx index cbf13c19dcf..4c13d014578 100644 --- a/frontend/src/scenes/instance/SystemStatus/KafkaInspectorTab.tsx +++ b/frontend/src/scenes/instance/SystemStatus/KafkaInspectorTab.tsx @@ -16,12 +16,7 @@ export function KafkaInspectorTab(): JSX.Element {
-
+
diff --git a/frontend/src/scenes/notebooks/Notebook/Notebook.scss b/frontend/src/scenes/notebooks/Notebook/Notebook.scss index 2bc1566e981..27f28b77f14 100644 --- a/frontend/src/scenes/notebooks/Notebook/Notebook.scss +++ b/frontend/src/scenes/notebooks/Notebook/Notebook.scss @@ -4,12 +4,6 @@ flex-direction: column; width: 100%; - // overriding ::selection is necessary here because - // antd makes it invisible otherwise - span::selection { - color: var(--primary-3000); - } - .NotebookEditor { position: relative; flex: 1; diff --git a/frontend/src/scenes/project-homepage/ProjectHomepage.scss b/frontend/src/scenes/project-homepage/ProjectHomepage.scss index b338e74e04d..1939a08c17f 100644 --- a/frontend/src/scenes/project-homepage/ProjectHomepage.scss +++ b/frontend/src/scenes/project-homepage/ProjectHomepage.scss @@ -12,14 +12,6 @@ flex-direction: row; align-items: center; - .ant-skeleton { - width: 300px; - - h3 { - margin: 0; - } - } - a { color: var(--text-3000); diff --git a/frontend/src/stories/How to build a form.stories.mdx b/frontend/src/stories/How to build a form.stories.mdx index 504cd7714e0..b8e20ca8719 100644 --- a/frontend/src/stories/How to build a form.stories.mdx +++ b/frontend/src/stories/How to build a form.stories.mdx @@ -119,7 +119,6 @@ export function FeatureFlag({ id }: { id?: string } = {}): JSX.Element { logic={featureFlagLogic} props={logicProps} formKey="featureFlag" - className="ant-form-vertical ant-form-hide-required-mark" enableFormOnSubmit // makes the HTML "submit" button work directly > diff --git a/frontend/src/stories/How to use components.stories.mdx b/frontend/src/stories/How to use components.stories.mdx index 1c4361326cb..4790ad63c96 100644 --- a/frontend/src/stories/How to use components.stories.mdx +++ b/frontend/src/stories/How to use components.stories.mdx @@ -23,5 +23,4 @@ Topics to cover here: - Can I nest components? Can I put a lemon table in a lemon table in a lemon table in a lemon switch's label? - What about common CSS variables, states (primary, secondary, danger, etc), how do I modify other components or states? - What CSS conventions do we use? Can I install my own css framework for that one new button? -- When to use lemon, when to use antd. - Everything with plenty of example code to copy. diff --git a/frontend/src/styles/antd.less b/frontend/src/styles/antd.less deleted file mode 100644 index 4dbcc0057a8..00000000000 --- a/frontend/src/styles/antd.less +++ /dev/null @@ -1,45 +0,0 @@ -/* This file sets theming configuration on Ant Design for PostHog. Ant uses LESS which is incompatible -with SASS, leading to duplicated config. When changing any variable here, please remember to update vars.scss too */ -@import 'antd/lib/style/themes/default.less'; -@import 'antd/dist/antd.less'; - -@text-color: var(--text-3000); -@text-muted: #5f5f5f; -@primary-color: #1d4aff; -@link-color: #1d4aff; -@success-color: #388600; -@warning-color: #f7a501; -@error-color: #db3707; -@font-size-base: 14px; -@heading-color: @text-color; -@text-color-secondary: #403939; -@disabled-color: @text-muted; -@border-radius-base: var(--radius); -@border-color-base: var(--border); -@body-background: var(--bg-light); -@component-background: var(--bg-light); -@layout-body-background: var(--bg-light); -@font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', 'Roboto', Helvetica, Arial, sans-serif, - 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; -@table-expanded-row-bg: var(--bg-3000); - -.hide-gte-lg { - display: none !important; - @media (max-width: @screen-lg-min) { - display: inherit !important; - } -} - -.hide-lte-lg { - display: none !important; - @media (min-width: @screen-lg-min) { - display: inherit !important; - } -} - -.hide-lte-md { - display: none !important; - @media (min-width: @screen-md-min) { - display: initial !important; - } -} diff --git a/frontend/src/styles/global.scss b/frontend/src/styles/global.scss index 5cf14619c44..2a9099cd959 100644 --- a/frontend/src/styles/global.scss +++ b/frontend/src/styles/global.scss @@ -32,6 +32,7 @@ body strong { // Disable default styling for ul ul { padding-left: 0; + margin-top: 0; margin-bottom: 0; list-style: none; } @@ -40,6 +41,7 @@ ul { *, *::before, *::after { + box-sizing: border-box; border-color: var(--border); border-style: solid; border-width: 0; @@ -57,10 +59,6 @@ input[type='radio'] { min-height: 2.5rem; margin: 1rem 0 0.25rem; - .ant-form-item { - margin-bottom: 0 !important; - } - @include screen($md) { flex-wrap: nowrap; } @@ -339,7 +337,10 @@ input::-ms-clear { } } -// AntD overrrides, placed inside `body` to increase specifity (nicely avoiding the need for !important) +html { + text-size-adjust: 100%; +} + body { // Remove below once we're using Tailwind's base --tw-content: ''; @@ -355,6 +356,13 @@ body { --tw-scale-x: 1; --tw-scale-y: 1; + margin: 0; + font-family: -apple-system, BlinkMacSystemFont, Inter, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, + 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; + font-size: 14px; + font-variant: tabular-nums; + line-height: 1.5715; + color: var(--text-3000); touch-action: manipulation; // Disable double-tap-to-zoom on mobile, making taps slightly snappier background: var(--bg-3000); @@ -391,7 +399,10 @@ body { h3, h4, h5 { + margin-top: 0; + margin-bottom: 0.5em; font-family: var(--font-title); + font-weight: 500; } h1, @@ -411,6 +422,10 @@ body { letter-spacing: 0.075em; } + small { + font-size: 80%; + } + pre, code, kbd, @@ -418,8 +433,10 @@ body { font-family: var(--font-mono); } - a { - color: var(--link); + pre { + margin-top: 0; + margin-bottom: 1em; + overflow: auto; } .LemonButton, @@ -435,98 +452,44 @@ body { } } - // AntD uses its own border color for the bottom of tab lists, but we want to use `var(--border)` - .ant-tabs-top, - .ant-tabs-bottom { - &, - & > div { - & > .ant-tabs-nav::before { - border-bottom-color: var(--border); - } - } - } - - .ant-dropdown { - color: var(--text-3000); - border-radius: var(--radius); - } - - .ant-dropdown-menu { - border-radius: var(--radius); - } - - .ant-modal-content { - box-shadow: var(--shadow-elevation-3000); - } - - .ant-modal-mask { - z-index: var(--z-ant-modal-mask); - } - - .ant-modal-wrap { - z-index: var(--z-ant-modal-wrap); - } - - .ant-message { - z-index: var(--z-ant-message); - } - - .ant-select-dropdown { - z-index: var(--z-ant-select-dropdown); - background-color: var(--bg-3000); - - .ant-select-item.ant-select-item-option { - background-color: var(--bg-3000); - - &.ant-select-item-option-active { - background-color: var(--border-3000); - } - } - } - - .ant-input-number:hover, - .ant-input-number-focused { - border-color: var(--border-bold); - } - - .ant-input-number-group-addon { - background: var(--bg-3000); - } - - .ant-picker-dropdown { - z-index: var(--z-ant-select-dropdown); - } - - .ant-card-bordered { - border-color: var(--border); - } - - .ant-card-body > :first-child { - margin-top: 0; - } - - .ant-form-item-label { - > label { - font-weight: 600; - - .ant-form-item-optional { - font-weight: 400; - color: var(--muted); - } - } - } - - .ant-form-item { - margin-bottom: 1rem; - - &:last-child { - margin-bottom: 0; - } - } - @include common-variables; } +a { + color: var(--link); + text-decoration: none; +} + +p { + margin-top: 0; + margin-bottom: 1em; +} + +table { + border-collapse: collapse; +} + +img { + vertical-align: middle; + border-style: none; +} + +button, +input, +optgroup, +select, +textarea { + margin: 0; + font-family: inherit; + font-size: inherit; + line-height: inherit; + color: inherit; +} + +[tabindex='-1']:focus { + outline: none !important; +} + .storybook-test-runner { &.storybook-test-runner--fullscreen { height: fit-content; @@ -550,9 +513,13 @@ body { } // Hide some parts of the UI that were causing flakiness - ::-webkit-scrollbar, * > ::-webkit-scrollbar, // Scrollbar in WebKit/Blink browsers - .LemonTabs__bar::after, // Active tab slider - .scrollable::after, // Scrollability indicators + ::-webkit-scrollbar, + *> ::-webkit-scrollbar, + // Scrollbar in WebKit/Blink browsers + .LemonTabs__bar::after, + // Active tab slider + .scrollable::after, + // Scrollability indicators .scrollable::before { display: none; } @@ -568,11 +535,6 @@ body { } } -.ant-radio-button-wrapper { - background: var(--secondary-3000); - border-color: transparent; -} - .ligatures-none { font-variant-ligatures: none; } diff --git a/frontend/src/styles/index.tsx b/frontend/src/styles/index.tsx index 30a6b4b80f5..4b3fa2e870f 100644 --- a/frontend/src/styles/index.tsx +++ b/frontend/src/styles/index.tsx @@ -1,2 +1 @@ -import './antd.less' /* Imports Ant Design's components */ import './global.scss' /* Contains PostHog's main styling configurations */ diff --git a/frontend/src/styles/vars.scss b/frontend/src/styles/vars.scss index e383c0ff70a..cf69c3a6e8c 100644 --- a/frontend/src/styles/vars.scss +++ b/frontend/src/styles/vars.scss @@ -195,16 +195,12 @@ $_lifecycle_dormant: map.get($colors, 'danger'); --z-bottom-notice: 5100; --z-command-palette: 1875; --z-force-modal-above-popovers: 1850; - --z-ant-message: 1070; --z-tooltip: 1070; - --z-ant-select-dropdown: 1065; --z-definition-popover: 1064; --z-popover: 1063; --z-graph-tooltip: 1062; --z-modal: 1060; - --z-ant-modal-wrap: 1060; --z-hedgehog-buddy: 1059; - --z-ant-modal-mask: 1050; --z-annotation-popover: 1049; --z-drawer: 950; --z-notifications-popover: 949; // below the TZ aware popover but over the main-nav diff --git a/frontend/src/toolbar/styles.scss b/frontend/src/toolbar/styles.scss index a26b8e128c6..bdc7a2eef79 100644 --- a/frontend/src/toolbar/styles.scss +++ b/frontend/src/toolbar/styles.scss @@ -1,6 +1,5 @@ @import '../styles/vars'; -// was inherited from antd.less before removing that *, *::before, *::after { diff --git a/jest.config.ts b/jest.config.ts index 558d43ffd60..53e5df59434 100644 --- a/jest.config.ts +++ b/jest.config.ts @@ -102,7 +102,6 @@ const config: Config = { '^lib/(.*)$': '/frontend/src/lib/$1', 'monaco-editor': '/node_modules/monaco-editor/esm/vs/editor/editor.api.d.ts', '^scenes/(.*)$': '/frontend/src/scenes/$1', - '^antd/es/(.*)$': 'antd/lib/$1', '^react-virtualized/dist/es/(.*)$': 'react-virtualized/dist/commonjs/$1', '^rrweb/es/rrweb': 'rrweb/dist/rrweb.min.js', d3: '/node_modules/d3/dist/d3.min.js', diff --git a/package.json b/package.json index e18943418cb..7a47c24ea5f 100644 --- a/package.json +++ b/package.json @@ -99,8 +99,6 @@ "@types/react-virtualized": "^9.21.23", "ajv": "^8.12.0", "algoliasearch": "^4.22.1", - "antd": "^4.17.1", - "antd-dayjs-webpack-plugin": "^1.0.6", "autoprefixer": "^10.4.13", "babel-preset-nano-react-app": "^0.1.0", "chart.js": "^4.4.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 932ec3615e0..5146fda8717 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -118,12 +118,6 @@ dependencies: algoliasearch: specifier: ^4.22.1 version: 4.22.1 - antd: - specifier: ^4.17.1 - version: 4.17.1(react-dom@18.2.0)(react@18.2.0) - antd-dayjs-webpack-plugin: - specifier: ^1.0.6 - version: 1.0.6(dayjs@1.11.11) autoprefixer: specifier: ^10.4.13 version: 10.4.13(postcss@8.4.31) @@ -878,19 +872,6 @@ packages: react-dom: 18.2.0(react@18.2.0) dev: false - /@ant-design/react-slick@0.28.1(react@18.2.0): - resolution: {integrity: sha512-Uk+GNexHOmiK3BMk/xvliNsNt+LYnN49u5o4lqeuMKXJlNqE9kGpEF03KpxDqu/zybO0/0yAJALha8oPtR5iHA==} - peerDependencies: - react: '>=16.0.0' - dependencies: - '@babel/runtime': 7.24.0 - classnames: 2.3.2 - json2mq: 0.2.0 - lodash: 4.17.21 - react: 18.2.0 - resize-observer-polyfill: 1.5.1 - dev: false - /@aw-web-design/x-default-browser@1.4.126: resolution: {integrity: sha512-Xk1sIhyNC/esHGGVjL/niHLowM0csl/kFO5uawBy4IrWwy0o1G8LGt3jP6nmWGz+USxeeqbihAmp/oVZju6wug==} hasBin: true @@ -9293,66 +9274,6 @@ packages: engines: {node: '>=12'} dev: true - /antd-dayjs-webpack-plugin@1.0.6(dayjs@1.11.11): - resolution: {integrity: sha512-UlK3BfA0iE2c5+Zz/Bd2iPAkT6cICtrKG4/swSik5MZweBHtgmu1aUQCHvICdiv39EAShdZy/edfP6mlkS/xXg==} - peerDependencies: - dayjs: '*' - dependencies: - dayjs: 1.11.11(patch_hash=lbfir4woetqmvzqg7l4q5mjtfq) - dev: false - - /antd@4.17.1(react-dom@18.2.0)(react@18.2.0): - resolution: {integrity: sha512-GNVuVnWJjFE1r3AGYc7vhy+gzlDAimAAZMTNCZdAncLBDN7gCTrf8euSb+C0TEqr7UV26yNGBQ9yGoeUcHUdSA==} - peerDependencies: - react: '>=16.9.0' - react-dom: '>=16.9.0' - dependencies: - '@ant-design/colors': 6.0.0 - '@ant-design/icons': 4.7.0(react-dom@18.2.0)(react@18.2.0) - '@ant-design/react-slick': 0.28.1(react@18.2.0) - '@babel/runtime': 7.24.0 - '@ctrl/tinycolor': 3.4.1 - array-tree-filter: 2.1.0 - classnames: 2.3.2 - copy-to-clipboard: 3.3.2 - lodash: 4.17.21 - moment: 2.29.4 - rc-cascader: 2.1.5(react-dom@18.2.0)(react@18.2.0) - rc-checkbox: 2.3.2(react-dom@18.2.0)(react@18.2.0) - rc-collapse: 3.1.0(react-dom@18.2.0)(react@18.2.0) - rc-dialog: 8.6.0(react-dom@18.2.0)(react@18.2.0) - rc-drawer: 4.4.3(react-dom@18.2.0)(react@18.2.0) - rc-dropdown: 3.2.0(react-dom@18.2.0)(react@18.2.0) - rc-field-form: 1.21.2(react-dom@18.2.0)(react@18.2.0) - rc-image: 5.2.5(react-dom@18.2.0)(react@18.2.0) - rc-input-number: 7.3.4(react-dom@18.2.0)(react@18.2.0) - rc-mentions: 1.6.1(react-dom@18.2.0)(react@18.2.0) - rc-menu: 9.0.14(react-dom@18.2.0)(react@18.2.0) - rc-motion: 2.6.2(react-dom@18.2.0)(react@18.2.0) - rc-notification: 4.5.7(react-dom@18.2.0)(react@18.2.0) - rc-pagination: 3.1.14(react-dom@18.2.0)(react@18.2.0) - rc-picker: 2.5.19(react-dom@18.2.0)(react@18.2.0) - rc-progress: 3.1.3(react-dom@18.2.0)(react@18.2.0) - rc-rate: 2.9.1(react-dom@18.2.0)(react@18.2.0) - rc-resize-observer: 1.2.0(react-dom@18.2.0)(react@18.2.0) - rc-select: 13.1.1(react-dom@18.2.0)(react@18.2.0) - rc-slider: 9.7.5(react-dom@18.2.0)(react@18.2.0) - rc-steps: 4.1.3(react-dom@18.2.0)(react@18.2.0) - rc-switch: 3.2.2(react-dom@18.2.0)(react@18.2.0) - rc-table: 7.19.2(react-dom@18.2.0)(react@18.2.0) - rc-tabs: 11.10.3(react-dom@18.2.0)(react@18.2.0) - rc-textarea: 0.3.4(react-dom@18.2.0)(react@18.2.0) - rc-tooltip: 5.1.1(react-dom@18.2.0)(react@18.2.0) - rc-tree: 5.2.2(react-dom@18.2.0)(react@18.2.0) - rc-tree-select: 4.6.3(react-dom@18.2.0)(react@18.2.0) - rc-trigger: 5.3.3(react-dom@18.2.0)(react@18.2.0) - rc-upload: 4.3.2(react-dom@18.2.0)(react@18.2.0) - rc-util: 5.24.4(react-dom@18.2.0)(react@18.2.0) - react: 18.2.0 - react-dom: 18.2.0(react@18.2.0) - scroll-into-view-if-needed: 2.2.26 - dev: false - /any-promise@1.3.0: resolution: {integrity: sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==} @@ -9455,10 +9376,6 @@ packages: is-string: 1.0.7 dev: true - /array-tree-filter@2.1.0: - resolution: {integrity: sha512-4ROwICNlNw/Hqa9v+rk5h22KjmzB1JGTMVKP2AKJBOCgb0yL0ASf0+YvCcLNNwquOHNX48jkeZIJ3a+oOQqKcw==} - dev: false - /array-union@2.1.0: resolution: {integrity: sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==} engines: {node: '>=8'} @@ -9593,10 +9510,6 @@ packages: resolution: {integrity: sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ==} dev: true - /async-validator@4.2.5: - resolution: {integrity: sha512-7HhHjtERjqlNbZtqNqy2rckN/SpOOlmDliet+lP7k+eKZEjPk3DgyeU9lIXLdeLz0uBbbVp+9Qdow9wJWgwwfg==} - dev: false - /async@3.2.4: resolution: {integrity: sha512-iAB+JbDEGXhyIUavoDl9WP/Jj106Kz9DEn1DPgYw5ruDn0e3Wgi3sKFm55sASdGBNOQB8F59d9qQ7deqrHA8wQ==} dev: true @@ -10582,10 +10495,6 @@ packages: - supports-color dev: true - /compute-scroll-into-view@1.0.16: - resolution: {integrity: sha512-a85LHKY81oQnikatZYA90pufpZ6sQx++BoCxOEMsjpZx+ZnaKGQnCyCehTRr/1p9GBIAHTjcU9k71kSYWloLiQ==} - dev: false - /concat-map@0.0.1: resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} @@ -10653,12 +10562,6 @@ packages: dependencies: is-what: 3.14.1 - /copy-to-clipboard@3.3.2: - resolution: {integrity: sha512-Vme1Z6RUDzrb6xAI7EZlVZ5uvOk2F//GaxKUxajDqm9LhOVM1inxNAD2vy+UZDYsd0uyA9s7b3/FVZPSxqrCfg==} - dependencies: - toggle-selection: 1.0.6 - dev: false - /core-js-compat@3.32.0: resolution: {integrity: sha512-7a9a3D1k4UCVKnLhrgALyFcP7YCsLOQIxPd0dKjf/6GuPcgyiGP70ewWdCGrSK7evyhymi0qO4EqCmSJofDeYw==} dependencies: @@ -11373,6 +11276,7 @@ packages: /date-fns@2.29.3: resolution: {integrity: sha512-dDCnyH2WnnKusqvZZ6+jA1O51Ibt8ZMRNkDZdyAyK4YfbDwa/cEmuztzG5pk6hqlp9aSBPYcjOlktquahGwGeA==} engines: {node: '>=0.11'} + dev: true /dayjs@1.11.11(patch_hash=lbfir4woetqmvzqg7l4q5mjtfq): resolution: {integrity: sha512-okzr3f11N6WuqYtZSvm+F776mB41wRZMhKP+hc34YdW+KmtYYK9iqvHSwo2k9FEH3fhGXvOPV6yz2IcSrfRUDg==} @@ -15278,12 +15182,6 @@ packages: resolution: {integrity: sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==} dev: true - /json2mq@0.2.0: - resolution: {integrity: sha512-SzoRg7ux5DWTII9J2qkrZrqV1gt+rTaoufMxEzXbS26Uid0NwaJd123HcoB80TgubEppxxIGdNxCx50fEoEWQA==} - dependencies: - string-convert: 0.2.1 - dev: false - /json5@1.0.1: resolution: {integrity: sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==} hasBin: true @@ -16127,6 +16025,7 @@ packages: /moment@2.29.4: resolution: {integrity: sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w==} + dev: true /monaco-editor-webpack-plugin@7.0.1(monaco-editor@0.49.0)(webpack@5.88.2): resolution: {integrity: sha512-M8qIqizltrPlIbrb73cZdTWfU9sIsUVFvAZkL3KGjAHmVWEJ0hZKa/uad14JuOckc0GwnCaoGHvMoYtJjVyCzw==} @@ -18228,163 +18127,6 @@ packages: resize-observer-polyfill: 1.5.1 dev: false - /rc-cascader@2.1.5(react-dom@18.2.0)(react@18.2.0): - resolution: {integrity: sha512-FiGPfSxKmSft2CT2XSr6HeKihqcxM+1ozmH6FGXTDthVNNvV0ai82CA6l30iPmMmlflwDfSm/623qkekqNq4BQ==} - peerDependencies: - react: '>=16.9.0' - react-dom: '>=16.9.0' - dependencies: - '@babel/runtime': 7.24.0 - array-tree-filter: 2.1.0 - rc-tree-select: 4.6.3(react-dom@18.2.0)(react@18.2.0) - rc-trigger: 5.3.3(react-dom@18.2.0)(react@18.2.0) - rc-util: 5.24.4(react-dom@18.2.0)(react@18.2.0) - react: 18.2.0 - react-dom: 18.2.0(react@18.2.0) - warning: 4.0.3 - dev: false - - /rc-checkbox@2.3.2(react-dom@18.2.0)(react@18.2.0): - resolution: {integrity: sha512-afVi1FYiGv1U0JlpNH/UaEXdh6WUJjcWokj/nUN2TgG80bfG+MDdbfHKlLcNNba94mbjy2/SXJ1HDgrOkXGAjg==} - peerDependencies: - react: '>=16.9.0' - react-dom: '>=16.9.0' - dependencies: - '@babel/runtime': 7.24.0 - classnames: 2.3.2 - react: 18.2.0 - react-dom: 18.2.0(react@18.2.0) - dev: false - - /rc-collapse@3.1.0(react-dom@18.2.0)(react@18.2.0): - resolution: {integrity: sha512-EwpNPJcLe7b+5JfyaxM9ZNnkCgqArt3QQO0Cr5p5plwz/C9h8liAmjYY5I4+hl9lAjBqb7ZwLu94+z+rt5g1WQ==} - peerDependencies: - react: '>=16.9.0' - react-dom: '>=16.9.0' - dependencies: - '@babel/runtime': 7.24.0 - classnames: 2.3.2 - rc-motion: 2.6.2(react-dom@18.2.0)(react@18.2.0) - rc-util: 5.24.4(react-dom@18.2.0)(react@18.2.0) - react: 18.2.0 - react-dom: 18.2.0(react@18.2.0) - shallowequal: 1.1.0 - dev: false - - /rc-dialog@8.6.0(react-dom@18.2.0)(react@18.2.0): - resolution: {integrity: sha512-GSbkfqjqxpZC5/zc+8H332+q5l/DKUhpQr0vdX2uDsxo5K0PhvaMEVjyoJUTkZ3+JstEADQji1PVLVb/2bJeOQ==} - peerDependencies: - react: '>=16.9.0' - react-dom: '>=16.9.0' - dependencies: - '@babel/runtime': 7.24.0 - classnames: 2.3.2 - rc-motion: 2.6.2(react-dom@18.2.0)(react@18.2.0) - rc-util: 5.24.4(react-dom@18.2.0)(react@18.2.0) - react: 18.2.0 - react-dom: 18.2.0(react@18.2.0) - dev: false - - /rc-drawer@4.4.3(react-dom@18.2.0)(react@18.2.0): - resolution: {integrity: sha512-FYztwRs3uXnFOIf1hLvFxIQP9MiZJA+0w+Os8dfDh/90X7z/HqP/Yg+noLCIeHEbKln1Tqelv8ymCAN24zPcfQ==} - peerDependencies: - react: '>=16.9.0' - react-dom: '>=16.9.0' - dependencies: - '@babel/runtime': 7.24.0 - classnames: 2.3.2 - rc-util: 5.24.4(react-dom@18.2.0)(react@18.2.0) - react: 18.2.0 - react-dom: 18.2.0(react@18.2.0) - dev: false - - /rc-dropdown@3.2.0(react-dom@18.2.0)(react@18.2.0): - resolution: {integrity: sha512-j1HSw+/QqlhxyTEF6BArVZnTmezw2LnSmRk6I9W7BCqNCKaRwleRmMMs1PHbuaG8dKHVqP6e21RQ7vPBLVnnNw==} - peerDependencies: - react: '*' - react-dom: '*' - dependencies: - '@babel/runtime': 7.24.0 - classnames: 2.3.2 - rc-trigger: 5.3.3(react-dom@18.2.0)(react@18.2.0) - react: 18.2.0 - react-dom: 18.2.0(react@18.2.0) - dev: false - - /rc-field-form@1.21.2(react-dom@18.2.0)(react@18.2.0): - resolution: {integrity: sha512-LR/bURt/Tf5g39mb0wtMtQuWn42d/7kEzpzlC5fNC7yaRVmLTtlPP4sBBlaViETM9uZQKLoaB0Pt9Mubhm9gow==} - engines: {node: '>=8.x'} - peerDependencies: - react: '>= 16.9.0' - react-dom: '>= 16.9.0' - dependencies: - '@babel/runtime': 7.24.0 - async-validator: 4.2.5 - rc-util: 5.24.4(react-dom@18.2.0)(react@18.2.0) - react: 18.2.0 - react-dom: 18.2.0(react@18.2.0) - dev: false - - /rc-image@5.2.5(react-dom@18.2.0)(react@18.2.0): - resolution: {integrity: sha512-qUfZjYIODxO0c8a8P5GeuclYXZjzW4hV/5hyo27XqSFo1DmTCs2HkVeQObkcIk5kNsJtgsj1KoPThVsSc/PXOw==} - peerDependencies: - react: '>=16.9.0' - react-dom: '>=16.9.0' - dependencies: - '@babel/runtime': 7.24.0 - classnames: 2.3.2 - rc-dialog: 8.6.0(react-dom@18.2.0)(react@18.2.0) - rc-util: 5.24.4(react-dom@18.2.0)(react@18.2.0) - react: 18.2.0 - react-dom: 18.2.0(react@18.2.0) - dev: false - - /rc-input-number@7.3.4(react-dom@18.2.0)(react@18.2.0): - resolution: {integrity: sha512-W9uqSzuvJUnz8H8vsVY4kx+yK51SsAxNTwr8SNH4G3XqQNocLVmKIibKFRjocnYX1RDHMND9FFbgj2h7E7nvGA==} - peerDependencies: - react: '>=16.9.0' - react-dom: '>=16.9.0' - dependencies: - '@babel/runtime': 7.24.0 - classnames: 2.3.2 - rc-util: 5.24.4(react-dom@18.2.0)(react@18.2.0) - react: 18.2.0 - react-dom: 18.2.0(react@18.2.0) - dev: false - - /rc-mentions@1.6.1(react-dom@18.2.0)(react@18.2.0): - resolution: {integrity: sha512-LDzGI8jJVGnkhpTZxZuYBhMz3avcZZqPGejikchh97xPni/g4ht714Flh7DVvuzHQ+BoKHhIjobHnw1rcP8erg==} - peerDependencies: - react: '>=16.9.0' - react-dom: '>=16.9.0' - dependencies: - '@babel/runtime': 7.24.0 - classnames: 2.3.2 - rc-menu: 9.0.14(react-dom@18.2.0)(react@18.2.0) - rc-textarea: 0.3.4(react-dom@18.2.0)(react@18.2.0) - rc-trigger: 5.3.3(react-dom@18.2.0)(react@18.2.0) - rc-util: 5.24.4(react-dom@18.2.0)(react@18.2.0) - react: 18.2.0 - react-dom: 18.2.0(react@18.2.0) - dev: false - - /rc-menu@9.0.14(react-dom@18.2.0)(react@18.2.0): - resolution: {integrity: sha512-CIox5mZeLDAi32SlHrV7UeSjv7tmJJhwRyxQtZCKt351w3q59XlL4WMFOmtT9gwIfP9h0XoxdBZUMe/xzkp78A==} - peerDependencies: - react: '>=16.9.0' - react-dom: '>=16.9.0' - dependencies: - '@babel/runtime': 7.24.0 - classnames: 2.3.2 - rc-motion: 2.6.2(react-dom@18.2.0)(react@18.2.0) - rc-overflow: 1.2.8(react-dom@18.2.0)(react@18.2.0) - rc-trigger: 5.3.3(react-dom@18.2.0)(react@18.2.0) - rc-util: 5.24.4(react-dom@18.2.0)(react@18.2.0) - react: 18.2.0 - react-dom: 18.2.0(react@18.2.0) - shallowequal: 1.1.0 - dev: false - /rc-motion@2.6.2(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-4w1FaX3dtV749P8GwfS4fYnFG4Rb9pxvCYPc/b2fw1cmlHJWNNgOFIz7ysiD+eOrzJSvnLJWlNQQncpNMXwwpg==} peerDependencies: @@ -18398,270 +18140,6 @@ packages: react-dom: 18.2.0(react@18.2.0) dev: false - /rc-notification@4.5.7(react-dom@18.2.0)(react@18.2.0): - resolution: {integrity: sha512-zhTGUjBIItbx96SiRu3KVURcLOydLUHZCPpYEn1zvh+re//Tnq/wSxN4FKgp38n4HOgHSVxcLEeSxBMTeBBDdw==} - engines: {node: '>=8.x'} - peerDependencies: - react: '>=16.9.0' - react-dom: '>=16.9.0' - dependencies: - '@babel/runtime': 7.24.0 - classnames: 2.3.2 - rc-motion: 2.6.2(react-dom@18.2.0)(react@18.2.0) - rc-util: 5.24.4(react-dom@18.2.0)(react@18.2.0) - react: 18.2.0 - react-dom: 18.2.0(react@18.2.0) - dev: false - - /rc-overflow@1.2.8(react-dom@18.2.0)(react@18.2.0): - resolution: {integrity: sha512-QJ0UItckWPQ37ZL1dMEBAdY1dhfTXFL9k6oTTcyydVwoUNMnMqCGqnRNA98axSr/OeDKqR6DVFyi8eA5RQI/uQ==} - peerDependencies: - react: '>=16.9.0' - react-dom: '>=16.9.0' - dependencies: - '@babel/runtime': 7.24.0 - classnames: 2.3.2 - rc-resize-observer: 1.2.0(react-dom@18.2.0)(react@18.2.0) - rc-util: 5.24.4(react-dom@18.2.0)(react@18.2.0) - react: 18.2.0 - react-dom: 18.2.0(react@18.2.0) - dev: false - - /rc-pagination@3.1.14(react-dom@18.2.0)(react@18.2.0): - resolution: {integrity: sha512-tcugvxrtPiVU00Uh0IwC8NIUlxa4KtA9pXcaMNJdSHeO2uQqVkHEwllsULTAWRF3zRV2ozo2weP/DRKIUrX+Zg==} - peerDependencies: - react: '>=16.9.0' - react-dom: '>=16.9.0' - dependencies: - '@babel/runtime': 7.24.0 - classnames: 2.3.2 - react: 18.2.0 - react-dom: 18.2.0(react@18.2.0) - dev: false - - /rc-picker@2.5.19(react-dom@18.2.0)(react@18.2.0): - resolution: {integrity: sha512-u6myoCu/qiQ0vLbNzSzNrzTQhs7mldArCpPHrEI6OUiifs+IPXmbesqSm0zilJjfzrZJLgYeyyOMSznSlh0GKA==} - engines: {node: '>=8.x'} - peerDependencies: - react: '>=16.9.0' - react-dom: '>=16.9.0' - dependencies: - '@babel/runtime': 7.24.0 - classnames: 2.3.2 - date-fns: 2.29.3 - dayjs: 1.11.11(patch_hash=lbfir4woetqmvzqg7l4q5mjtfq) - moment: 2.29.4 - rc-trigger: 5.3.3(react-dom@18.2.0)(react@18.2.0) - rc-util: 5.24.4(react-dom@18.2.0)(react@18.2.0) - react: 18.2.0 - react-dom: 18.2.0(react@18.2.0) - shallowequal: 1.1.0 - dev: false - - /rc-progress@3.1.3(react-dom@18.2.0)(react@18.2.0): - resolution: {integrity: sha512-Jl4fzbBExHYMoC6HBPzel0a9VmhcSXx24LVt/mdhDM90MuzoMCJjXZAlhA0V0CJi+SKjMhfBoIQ6Lla1nD4QNw==} - peerDependencies: - react: '>=16.9.0' - react-dom: '>=16.9.0' - dependencies: - '@babel/runtime': 7.24.0 - classnames: 2.3.2 - react: 18.2.0 - react-dom: 18.2.0(react@18.2.0) - dev: false - - /rc-rate@2.9.1(react-dom@18.2.0)(react@18.2.0): - resolution: {integrity: sha512-MmIU7FT8W4LYRRHJD1sgG366qKtSaKb67D0/vVvJYR0lrCuRrCiVQ5qhfT5ghVO4wuVIORGpZs7ZKaYu+KMUzA==} - engines: {node: '>=8.x'} - peerDependencies: - react: '>=16.9.0' - react-dom: '>=16.9.0' - dependencies: - '@babel/runtime': 7.24.0 - classnames: 2.3.2 - rc-util: 5.24.4(react-dom@18.2.0)(react@18.2.0) - react: 18.2.0 - react-dom: 18.2.0(react@18.2.0) - dev: false - - /rc-resize-observer@1.2.0(react-dom@18.2.0)(react@18.2.0): - resolution: {integrity: sha512-6W+UzT3PyDM0wVCEHfoW3qTHPTvbdSgiA43buiy8PzmeMnfgnDeb9NjdimMXMl3/TcrvvWl5RRVdp+NqcR47pQ==} - peerDependencies: - react: '>=16.9.0' - react-dom: '>=16.9.0' - dependencies: - '@babel/runtime': 7.24.0 - classnames: 2.3.2 - rc-util: 5.24.4(react-dom@18.2.0)(react@18.2.0) - react: 18.2.0 - react-dom: 18.2.0(react@18.2.0) - resize-observer-polyfill: 1.5.1 - dev: false - - /rc-select@13.1.1(react-dom@18.2.0)(react@18.2.0): - resolution: {integrity: sha512-Oy4L27x5QgGR8902pw0bJVjrTWFnKPKvdLHzJl5pjiA+jM1hpzDfLGg/bY2ntk5ElxxQKZUwbFKUeqfCQU7SrQ==} - engines: {node: '>=8.x'} - peerDependencies: - react: '*' - react-dom: '*' - dependencies: - '@babel/runtime': 7.24.0 - classnames: 2.3.2 - rc-motion: 2.6.2(react-dom@18.2.0)(react@18.2.0) - rc-overflow: 1.2.8(react-dom@18.2.0)(react@18.2.0) - rc-trigger: 5.3.3(react-dom@18.2.0)(react@18.2.0) - rc-util: 5.24.4(react-dom@18.2.0)(react@18.2.0) - rc-virtual-list: 3.4.11(react-dom@18.2.0)(react@18.2.0) - react: 18.2.0 - react-dom: 18.2.0(react@18.2.0) - dev: false - - /rc-slider@9.7.5(react-dom@18.2.0)(react@18.2.0): - resolution: {integrity: sha512-LV/MWcXFjco1epPbdw1JlLXlTgmWpB9/Y/P2yinf8Pg3wElHxA9uajN21lJiWtZjf5SCUekfSP6QMJfDo4t1hg==} - engines: {node: '>=8.x'} - peerDependencies: - react: '>=16.9.0' - react-dom: '>=16.9.0' - dependencies: - '@babel/runtime': 7.24.0 - classnames: 2.3.2 - rc-tooltip: 5.2.2(react-dom@18.2.0)(react@18.2.0) - rc-util: 5.24.4(react-dom@18.2.0)(react@18.2.0) - react: 18.2.0 - react-dom: 18.2.0(react@18.2.0) - shallowequal: 1.1.0 - dev: false - - /rc-steps@4.1.3(react-dom@18.2.0)(react@18.2.0): - resolution: {integrity: sha512-GXrMfWQOhN3sVze3JnzNboHpQdNHcdFubOETUHyDpa/U3HEKBZC3xJ8XK4paBgF4OJ3bdUVLC+uBPc6dCxvDYA==} - engines: {node: '>=8.x'} - peerDependencies: - react: '>=16.9.0' - react-dom: '>=16.9.0' - dependencies: - '@babel/runtime': 7.24.0 - classnames: 2.3.2 - rc-util: 5.24.4(react-dom@18.2.0)(react@18.2.0) - react: 18.2.0 - react-dom: 18.2.0(react@18.2.0) - dev: false - - /rc-switch@3.2.2(react-dom@18.2.0)(react@18.2.0): - resolution: {integrity: sha512-+gUJClsZZzvAHGy1vZfnwySxj+MjLlGRyXKXScrtCTcmiYNPzxDFOxdQ/3pK1Kt/0POvwJ/6ALOR8gwdXGhs+A==} - peerDependencies: - react: '>=16.9.0' - react-dom: '>=16.9.0' - dependencies: - '@babel/runtime': 7.24.0 - classnames: 2.3.2 - rc-util: 5.24.4(react-dom@18.2.0)(react@18.2.0) - react: 18.2.0 - react-dom: 18.2.0(react@18.2.0) - dev: false - - /rc-table@7.19.2(react-dom@18.2.0)(react@18.2.0): - resolution: {integrity: sha512-NdpnoM50MK02H5/hGOsObfxCvGFUG5cHB9turE5BKJ81T5Ycbq193w5tLhnpILXe//Oanzr47MdMxkUnVGP+qg==} - engines: {node: '>=8.x'} - peerDependencies: - react: '>=16.9.0' - react-dom: '>=16.9.0' - dependencies: - '@babel/runtime': 7.24.0 - classnames: 2.3.2 - rc-resize-observer: 1.2.0(react-dom@18.2.0)(react@18.2.0) - rc-util: 5.24.4(react-dom@18.2.0)(react@18.2.0) - react: 18.2.0 - react-dom: 18.2.0(react@18.2.0) - shallowequal: 1.1.0 - dev: false - - /rc-tabs@11.10.3(react-dom@18.2.0)(react@18.2.0): - resolution: {integrity: sha512-rPxsci+76/nnJowNOBO3LTi4eL6trG49cR9yPc4XbuyHXhCHUujN5F4+jFl7trISy+yVN6gCZ/wiTtVnkcR/UA==} - engines: {node: '>=8.x'} - peerDependencies: - react: '>=16.9.0' - react-dom: '>=16.9.0' - dependencies: - '@babel/runtime': 7.24.0 - classnames: 2.3.2 - rc-dropdown: 3.2.0(react-dom@18.2.0)(react@18.2.0) - rc-menu: 9.0.14(react-dom@18.2.0)(react@18.2.0) - rc-resize-observer: 1.2.0(react-dom@18.2.0)(react@18.2.0) - rc-util: 5.24.4(react-dom@18.2.0)(react@18.2.0) - react: 18.2.0 - react-dom: 18.2.0(react@18.2.0) - dev: false - - /rc-textarea@0.3.4(react-dom@18.2.0)(react@18.2.0): - resolution: {integrity: sha512-ILUYx831ZukQPv3m7R4RGRtVVWmL1LV4ME03L22mvT56US0DGCJJaRTHs4vmpcSjFHItph5OTmhodY4BOwy81A==} - peerDependencies: - react: '>=16.9.0' - react-dom: '>=16.9.0' - dependencies: - '@babel/runtime': 7.24.0 - classnames: 2.3.2 - rc-resize-observer: 1.2.0(react-dom@18.2.0)(react@18.2.0) - rc-util: 5.24.4(react-dom@18.2.0)(react@18.2.0) - react: 18.2.0 - react-dom: 18.2.0(react@18.2.0) - dev: false - - /rc-tooltip@5.1.1(react-dom@18.2.0)(react@18.2.0): - resolution: {integrity: sha512-alt8eGMJulio6+4/uDm7nvV+rJq9bsfxFDCI0ljPdbuoygUscbsMYb6EQgwib/uqsXQUvzk+S7A59uYHmEgmDA==} - peerDependencies: - react: '>=16.9.0' - react-dom: '>=16.9.0' - dependencies: - '@babel/runtime': 7.24.0 - rc-trigger: 5.3.3(react-dom@18.2.0)(react@18.2.0) - react: 18.2.0 - react-dom: 18.2.0(react@18.2.0) - dev: false - - /rc-tooltip@5.2.2(react-dom@18.2.0)(react@18.2.0): - resolution: {integrity: sha512-jtQzU/18S6EI3lhSGoDYhPqNpWajMtS5VV/ld1LwyfrDByQpYmw/LW6U7oFXXLukjfDHQ7Ju705A82PRNFWYhg==} - peerDependencies: - react: '>=16.9.0' - react-dom: '>=16.9.0' - dependencies: - '@babel/runtime': 7.24.0 - classnames: 2.3.2 - rc-trigger: 5.3.3(react-dom@18.2.0)(react@18.2.0) - react: 18.2.0 - react-dom: 18.2.0(react@18.2.0) - dev: false - - /rc-tree-select@4.6.3(react-dom@18.2.0)(react@18.2.0): - resolution: {integrity: sha512-VymfystOnW8EfoWaWehgB8zpYKgRZf4ILu9KHf7FJZVZ/1dnBEHDqg1bBi43/1BYLwYFKSKKSjkYyNYntWJM4A==} - peerDependencies: - react: '*' - react-dom: '*' - dependencies: - '@babel/runtime': 7.24.0 - classnames: 2.3.2 - rc-select: 13.1.1(react-dom@18.2.0)(react@18.2.0) - rc-tree: 5.2.2(react-dom@18.2.0)(react@18.2.0) - rc-util: 5.24.4(react-dom@18.2.0)(react@18.2.0) - react: 18.2.0 - react-dom: 18.2.0(react@18.2.0) - dev: false - - /rc-tree@5.2.2(react-dom@18.2.0)(react@18.2.0): - resolution: {integrity: sha512-ZQPGi5rGmipXvSUqeMbh0Rm0Cn2zFVWQFvS3sinH+lis5VNCChkFs2dAFpWZnb9/d/SZPeMfYG/x2XFq/q3UTA==} - engines: {node: '>=10.x'} - peerDependencies: - react: '*' - react-dom: '*' - dependencies: - '@babel/runtime': 7.24.0 - classnames: 2.3.2 - rc-motion: 2.6.2(react-dom@18.2.0)(react@18.2.0) - rc-util: 5.24.4(react-dom@18.2.0)(react@18.2.0) - rc-virtual-list: 3.4.11(react-dom@18.2.0)(react@18.2.0) - react: 18.2.0 - react-dom: 18.2.0(react@18.2.0) - dev: false - /rc-trigger@5.3.3(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-IC4nuTSAME7RJSgwvHCNDQrIzhvGMKf6NDu5veX+zk1MG7i1UnwTWWthcP9WHw3+FZfP3oZGvkrHFPu/EGkFKw==} engines: {node: '>=8.x'} @@ -18678,19 +18156,6 @@ packages: react-dom: 18.2.0(react@18.2.0) dev: false - /rc-upload@4.3.2(react-dom@18.2.0)(react@18.2.0): - resolution: {integrity: sha512-v0HdwC/19xKAn1OYZ4hTMUSqSs/IA0n1v4p/cioSSnKubHrdpcCXC45N+TFMSOZtBlf4+xMNCFo3KDih31lAMg==} - peerDependencies: - react: '>=16.9.0' - react-dom: '>=16.9.0' - dependencies: - '@babel/runtime': 7.24.0 - classnames: 2.3.2 - rc-util: 5.24.4(react-dom@18.2.0)(react@18.2.0) - react: 18.2.0 - react-dom: 18.2.0(react@18.2.0) - dev: false - /rc-util@5.24.4(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-2a4RQnycV9eV7lVZPEJ7QwJRPlZNc06J7CwcwZo4vIHr3PfUqtYgl1EkUV9ETAc6VRRi8XZOMFhYG63whlIC9Q==} peerDependencies: @@ -18704,21 +18169,6 @@ packages: shallowequal: 1.1.0 dev: false - /rc-virtual-list@3.4.11(react-dom@18.2.0)(react@18.2.0): - resolution: {integrity: sha512-BvUUH60kkeTBPigN5F89HtGaA5jSP4y2aM6cJ4dk9Y42I9yY+h6i08wF6UKeDcxdfOU8j3I5HxkSS/xA77J3wA==} - engines: {node: '>=8.x'} - peerDependencies: - react: '*' - react-dom: '*' - dependencies: - '@babel/runtime': 7.24.0 - classnames: 2.3.2 - rc-resize-observer: 1.2.0(react-dom@18.2.0)(react@18.2.0) - rc-util: 5.24.4(react-dom@18.2.0)(react@18.2.0) - react: 18.2.0 - react-dom: 18.2.0(react@18.2.0) - dev: false - /react-base16-styling@0.6.0: resolution: {integrity: sha512-yvh/7CArceR/jNATXOKDlvTnPKPmGZz7zsenQ3jUwLzHkNUR0CvY3yGYJbWJ/nnxsL8Sgmt5cO3/SILVuPO6TQ==} dependencies: @@ -19825,12 +19275,6 @@ packages: ajv-keywords: 5.1.0(ajv@8.12.0) dev: true - /scroll-into-view-if-needed@2.2.26: - resolution: {integrity: sha512-SQ6AOKfABaSchokAmmaxVnL9IArxEnLEX9j4wAZw+x4iUTb40q7irtHG3z4GtAWz5veVZcCnubXDBRyLVQaohw==} - dependencies: - compute-scroll-into-view: 1.0.16 - dev: false - /search-insights@2.13.0: resolution: {integrity: sha512-Orrsjf9trHHxFRuo9/rzm0KIWmgzE8RMlZMzuhZOJ01Rnz3D0YBAe+V6473t6/H6c7irs6Lt48brULAiRWb3Vw==} dev: false @@ -20245,10 +19689,6 @@ packages: engines: {node: '>=0.6.19'} dev: true - /string-convert@0.2.1: - resolution: {integrity: sha512-u/1tdPl4yQnPBjnVrmdLo9gtuLvELKsAoRapekWggdiQNvvvum+jYF329d84NAa660KQw7pB2n36KrIKVoXa3A==} - dev: false - /string-length@4.0.2: resolution: {integrity: sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==} engines: {node: '>=10'} @@ -20953,10 +20393,6 @@ packages: resolution: {integrity: sha512-IfajhBTeg0HlMXu1f+VMbPef05QpDTsZ9X2Yn1+8npdaXsXg/+wrm9Ze1WG5OS1UDC3qJ5EQN/XOZ3gfXjPFCw==} dev: true - /toggle-selection@1.0.6: - resolution: {integrity: sha512-BiZS+C1OS8g/q2RRbJmy59xpyghNBqrr6k5L/uKBGRsTfxmu3ffiRnd8mlGPUVayg8pvfi5urfnu8TU7DVOkLQ==} - dev: false - /toidentifier@1.0.1: resolution: {integrity: sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==} engines: {node: '>=0.6'} diff --git a/webpack.config.js b/webpack.config.js index aef12b7ab0c..78b7c411dc6 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -3,7 +3,6 @@ const path = require('path') const webpack = require('webpack') const HtmlWebpackPlugin = require('html-webpack-plugin') const HtmlWebpackHarddiskPlugin = require('html-webpack-harddisk-plugin') -const AntdDayjsWebpackPlugin = require('antd-dayjs-webpack-plugin') const MonacoWebpackPlugin = require('monaco-editor-webpack-plugin') const webpackDevServerHost = process.env.WEBPACK_HOT_RELOAD_HOST || '127.0.0.1' @@ -184,7 +183,6 @@ function createEntry(entry) { : {}), plugins: [ new MonacoWebpackPlugin(), - new AntdDayjsWebpackPlugin(), // common plugins for all entrypoints ].concat( entry === 'main'