feat(theming): land Ant Design v5 overhaul — dynamic themes, real dark mode + massive styling refactor (#31590)

Co-authored-by: Enzo Martellucci <52219496+EnxDev@users.noreply.github.com>
Co-authored-by: Diego Pucci <diegopucci.me@gmail.com>
Co-authored-by: Mehmet Salih Yavuz <salih.yavuz@proton.me>
Co-authored-by: Geido <60598000+geido@users.noreply.github.com>
Co-authored-by: Alexandru Soare <37236580+alexandrusoare@users.noreply.github.com>
Co-authored-by: Damian Pendrak <dpendrak@gmail.com>
Co-authored-by: Pius Iniobong <67148161+payose@users.noreply.github.com>
Co-authored-by: Enzo Martellucci <enzomartellucci@gmail.com>
Co-authored-by: Kamil Gabryjelski <kamil.gabryjelski@gmail.com>
This commit is contained in:
Maxime Beauchemin
2025-06-20 13:38:58 -07:00
committed by GitHub
parent 2cc1ef88c8
commit dd129fa403
1267 changed files with 32958 additions and 23592 deletions

View File

@@ -22,8 +22,8 @@ import { HandlebarsViewer } from './components/Handlebars/HandlebarsViewer';
import { HandlebarsProps, HandlebarsStylesProps } from './types';
const Styles = styled.div<HandlebarsStylesProps>`
padding: ${({ theme }) => theme.gridUnit * 4}px;
border-radius: ${({ theme }) => theme.gridUnit * 2}px;
padding: ${({ theme }) => theme.sizeUnit * 4}px;
border-radius: ${({ theme }) => theme.borderRadius}px;
height: ${({ height }) => height}px;
width: ${({ width }) => width}px;
overflow: auto;

View File

@@ -16,7 +16,8 @@
* specific language governing permissions and limitations
* under the License.
*/
import { SafeMarkdown, styled, t } from '@superset-ui/core';
import { styled, t } from '@superset-ui/core';
import { SafeMarkdown } from '@superset-ui/core/components';
import Handlebars from 'handlebars';
import dayjs from 'dayjs';
import { useMemo, useState } from 'react';

View File

@@ -18,7 +18,8 @@
*/
import { debounce } from 'lodash';
import { formatSelectOptions } from '@superset-ui/chart-controls';
import { SLOW_DEBOUNCE, t } from '@superset-ui/core';
import { Constants } from '@superset-ui/core/components';
import { t } from '@superset-ui/core';
export const PAGE_SIZE_OPTIONS = formatSelectOptions<number>([
[0, t('page_size.all')],
@@ -36,5 +37,5 @@ export const PAGE_SIZE_OPTIONS = formatSelectOptions<number>([
export const debounceFunc = debounce(
(func: (val: string) => void, source: string) => func(source),
SLOW_DEBOUNCE,
Constants.SLOW_DEBOUNCE,
);

View File

@@ -20,9 +20,9 @@ import {
ControlSetItem,
CustomControlConfig,
sharedControls,
InfoTooltipWithTrigger,
} from '@superset-ui/chart-controls';
import { t, validateNonEmpty, useTheme, SafeMarkdown } from '@superset-ui/core';
import { t, validateNonEmpty, useTheme } from '@superset-ui/core';
import { InfoTooltip, SafeMarkdown } from '@superset-ui/core/components';
import { CodeEditor } from '../../components/CodeEditor/CodeEditor';
import { ControlHeader } from '../../components/ControlHeader/controlHeader';
import { debounceFunc } from '../../consts';
@@ -70,8 +70,8 @@ ${helperDescriptions
<ControlHeader>
<div>
{props.label}
<InfoTooltipWithTrigger
iconsStyle={{ marginLeft: theme.gridUnit }}
<InfoTooltip
iconStyle={{ marginLeft: theme.sizeUnit }}
tooltip={<SafeMarkdown source={helpersTooltipContent} />}
/>
</div>

View File

@@ -20,9 +20,9 @@ import {
ControlSetItem,
CustomControlConfig,
sharedControls,
InfoTooltipWithTrigger,
} from '@superset-ui/chart-controls';
import { t, useTheme } from '@superset-ui/core';
import { InfoTooltip } from '@superset-ui/core/components';
import { CodeEditor } from '../../components/CodeEditor/CodeEditor';
import { ControlHeader } from '../../components/ControlHeader/controlHeader';
import { debounceFunc } from '../../consts';
@@ -47,8 +47,8 @@ const StyleControl = (props: CustomControlConfig<StyleCustomControlProps>) => {
<ControlHeader>
<div>
{props.label}
<InfoTooltipWithTrigger
iconsStyle={{ marginLeft: theme.gridUnit }}
<InfoTooltip
iconStyle={{ marginLeft: theme.sizeUnit }}
tooltip={t('You need to configure HTML sanitization to use CSS')}
/>
</div>