- {theme?.map((color, index) => {
- return (
-
{
- const newTheme = [...theme];
- newTheme[index] = v.toHexString();
- setTheme(newTheme);
- }}>
- {}}
- className="h-full min-h-[118px] w-full cursor-pointer transition first:rounded-l last:rounded-r hover:z-10 hover:scale-105 hover:shadow-lg"
- style={{ backgroundColor: color }}>
-
- );
- })}
-
-
- );
-};
-
-export default NewColorThemeModal;
diff --git a/web/src/components/ui/text/Text.tsx b/web/src/components/ui/text/Text.tsx
index fe4141d11..530574825 100644
--- a/web/src/components/ui/text/Text.tsx
+++ b/web/src/components/ui/text/Text.tsx
@@ -68,13 +68,7 @@ const TextWrapper: React.FC<
const title = tooltip ? (typeof tooltip === 'string' ? tooltip : (children as string)) : '';
- return tooltip ? (
- >(
- ({ children, ...props }) => {
- const [isHovering, setIsHovering] = useState(false);
- const { title, shortcuts = [], forceShow, performant } = props;
-
- if (!title && !shortcuts.length && !forceShow) {
- return <>{children}>;
- }
-
- if (performant && !isHovering) {
- return
{children};
- }
-
- return
{children};
- }
-);
-AppTooltip.displayName = 'AppTooltip';
-
-const PerformanceTooltip: React.FC<
- PropsWithChildren<{
- setIsHovering: (v: boolean) => void;
- }>
-> = React.memo(({ children, setIsHovering }) => {
- return (
-
{
- setIsHovering(true);
- }}>
- {children}
-
- );
-});
-PerformanceTooltip.displayName = 'PerformanceTooltip';
-
-const BusterTooltip: React.FC
> = ({
- children,
- mouseEnterDelay = 0.75,
- mouseLeaveDelay = 0.15,
- destroyTooltipOnHide = true,
- trigger = 'hover',
- arrow = false,
- title = '',
- forceShow = false,
- performant = false,
- shortcuts = [], //⌘
- align,
- ...props
-}) => {
- const memoizedTitle = useMemo(() => {
- if (title) {
- return (
-
- {title}
-
-
- );
- }
- return null;
- }, [title, shortcuts]);
-
- return (
-
- {children}
-
- );
-};
-BusterTooltip.displayName = 'BusterTooltip';
diff --git a/web/src/components/ui/tooltip/Tooltip.stories.tsx b/web/src/components/ui/tooltip/Tooltip.stories.tsx
index 0aa2ef432..62ac9d868 100644
--- a/web/src/components/ui/tooltip/Tooltip.stories.tsx
+++ b/web/src/components/ui/tooltip/Tooltip.stories.tsx
@@ -25,9 +25,9 @@ const meta = {
control: 'text',
description: 'The text content of the tooltip'
},
- shortcut: {
+ shortcuts: {
control: 'object',
- description: 'Array of keyboard shortcuts to display'
+ description: 'Array of keyboard shortcutss to display'
},
children: {
control: 'object',
@@ -68,20 +68,20 @@ export const Basic: Story = {
}
};
-// With keyboard shortcuts
+// With keyboard shortcutss
export const WithShortcut: Story = {
args: {
title: 'Save file',
- shortcut: ['S'],
+ shortcuts: ['S'],
children:
}
};
-// Multiple shortcuts
+// Multiple shortcutss
export const MultipleShortcuts: Story = {
args: {
title: 'Undo action',
- shortcut: ['⌘', 'Z'],
+ shortcuts: ['⌘', 'Z'],
children:
}
};
diff --git a/web/src/components/ui/tooltip/Tooltip.tsx b/web/src/components/ui/tooltip/Tooltip.tsx
index 7fbad165d..ec41b5317 100644
--- a/web/src/components/ui/tooltip/Tooltip.tsx
+++ b/web/src/components/ui/tooltip/Tooltip.tsx
@@ -12,8 +12,8 @@ export interface TooltipProps
extends Pick, 'align' | 'side' | 'sideOffset'>,
Pick, 'delayDuration' | 'skipDelayDuration'> {
children: React.ReactNode;
- title: string;
- shortcut?: string[];
+ title: string | undefined;
+ shortcuts?: string[];
open?: boolean;
}
@@ -22,21 +22,21 @@ export const Tooltip = React.memo(
children,
title,
sideOffset,
- shortcut,
+ shortcuts,
delayDuration = 0,
skipDelayDuration,
align,
side,
open
}) => {
- if (!title && !shortcut?.length) return children;
+ if (!title || (!title && !shortcuts?.length)) return children;
return (
{children}
-
+
diff --git a/web/src/components/ui/tooltip/index.ts b/web/src/components/ui/tooltip/index.ts
index 879d56979..43ec514f9 100644
--- a/web/src/components/ui/tooltip/index.ts
+++ b/web/src/components/ui/tooltip/index.ts
@@ -1,4 +1,7 @@
-export * from './AppTooltip';
export * from './AppPopover';
export * from './AppPopoverMenu';
export * from './Tooltip';
+
+import { Tooltip } from './Tooltip';
+
+export { Tooltip as AppTooltip };
diff --git a/web/src/controllers/MetricController/MetricViewChart/MetricEditController/MetricStylingApp/StylingAppStyling/EditPieShowInnerLabel.tsx b/web/src/controllers/MetricController/MetricViewChart/MetricEditController/MetricStylingApp/StylingAppStyling/EditPieShowInnerLabel.tsx
index 37de63002..62e19d215 100644
--- a/web/src/controllers/MetricController/MetricViewChart/MetricEditController/MetricStylingApp/StylingAppStyling/EditPieShowInnerLabel.tsx
+++ b/web/src/controllers/MetricController/MetricViewChart/MetricEditController/MetricStylingApp/StylingAppStyling/EditPieShowInnerLabel.tsx
@@ -15,12 +15,10 @@ export const EditPieShowInnerLabel = React.memo(
return (
-
- onUpdateChartConfig({ pieShowInnerLabel: value })}
- />
-
+
onUpdateChartConfig({ pieShowInnerLabel: value })}
+ />
);
diff --git a/web/src/controllers/MetricController/MetricViewChart/MetricEditController/MetricStylingApp/StylingAppVisualize/SelectChartType/SelectChartType.tsx b/web/src/controllers/MetricController/MetricViewChart/MetricEditController/MetricStylingApp/StylingAppVisualize/SelectChartType/SelectChartType.tsx
index 34adfde02..302ddc82b 100644
--- a/web/src/controllers/MetricController/MetricViewChart/MetricEditController/MetricStylingApp/StylingAppVisualize/SelectChartType/SelectChartType.tsx
+++ b/web/src/controllers/MetricController/MetricViewChart/MetricEditController/MetricStylingApp/StylingAppVisualize/SelectChartType/SelectChartType.tsx
@@ -147,7 +147,7 @@ const ChartButton: React.FC<{
const { styles, cx } = useStyles();
return (
-
+
!disabled && onSelectChartType(id)}
diff --git a/web/src/controllers/TermIndividualController/TermDatasetSelect.tsx b/web/src/controllers/TermIndividualController/TermDatasetSelect.tsx
index 350241f2f..80f60c56d 100644
--- a/web/src/controllers/TermIndividualController/TermDatasetSelect.tsx
+++ b/web/src/controllers/TermIndividualController/TermDatasetSelect.tsx
@@ -50,7 +50,7 @@ export const DatasetList: React.FC<{
))}
-
+
{selectedDatasets.length === 0 ? (
) : (
diff --git a/web/src/controllers/TermIndividualController/TermIndividualHeaderSider.tsx b/web/src/controllers/TermIndividualController/TermIndividualHeaderSider.tsx
index e11e8d54a..1d41fae4b 100644
--- a/web/src/controllers/TermIndividualController/TermIndividualHeaderSider.tsx
+++ b/web/src/controllers/TermIndividualController/TermIndividualHeaderSider.tsx
@@ -1,18 +1,16 @@
import React from 'react';
-
-import { AppMaterialIcons, AppTooltip, AppTooltipProps } from '@/components/ui';
-import { Text } from '@/components/ui';
-
-const memoizedTrigger: AppTooltipProps['trigger'] = ['click'];
+import { AppTooltip } from '@/components/ui/tooltip';
+import { CircleQuestion } from '@/components/ui/icons';
+import { Text } from '@/components/ui/typography';
export const TermIndividualHeaderSider: React.FC = () => {
return (
Details
diff --git a/web/src/layouts/ChatLayout/ChatContainer/ChatContent/ChatInput/SubmitButton.tsx b/web/src/layouts/ChatLayout/ChatContainer/ChatContent/ChatInput/SubmitButton.tsx
index 9ba856f2d..66e02d274 100644
--- a/web/src/layouts/ChatLayout/ChatContainer/ChatContent/ChatInput/SubmitButton.tsx
+++ b/web/src/layouts/ChatLayout/ChatContainer/ChatContent/ChatInput/SubmitButton.tsx
@@ -34,8 +34,8 @@ export const SubmitButton: React.FC
= React.memo(
+ delayDuration={1.5}
+ skipDelayDuration={0}>