chore(env): update application version to 2.2.4 in production environment
feat(multi-select): enhance MultiSelect component with dropdown positioning and portal rendering - Added dynamic dropdown positioning to ensure it appears correctly relative to the trigger element. - Implemented portal rendering for the dropdown to improve performance and prevent overflow issues. - Refactored MultiSelect state management for better clarity and maintainability. feat(switch): improve Switch component with GSAP animations and enhanced styling - Integrated GSAP animations for thumb transitions and glow effects to enhance user interaction. - Updated styling for the Switch component to improve visual feedback and responsiveness. feat(companies-table): add currency and language metadata display in CompaniesTable - Introduced currency and language metadata for better representation of company details. - Enhanced UI for displaying company languages and currencies with tooltips for additional context. feat(assign-to-company-modal): refactor AssignToCompanyModalContent to use MultiSelect - Replaced Select component with MultiSelect for improved user experience in selecting companies. - Streamlined state management and data handling for company assignments. feat(customers-table): enhance customer company display with tooltips and improved layout - Updated customer company display to show a maximum of two companies with a tooltip for additional companies. - Improved styling for better visual representation of customer associations with companies. feat(confirmation-modal): enhance ConfirmationModal with animations and improved accessibility - Added GSAP animations for modal entrance and exit to improve user experience. - Implemented accessibility features for better keyboard navigation and focus management. feat(status): extend Status component with pulse and shimmer effects for enhanced visual feedback - Introduced new visual effects for status indicators to improve user engagement and clarity. - Updated styles for better integration with existing UI components. feat(tooltip): enhance tooltip styling and functionality with new palettes - Implemented a new tooltip design with gradient backgrounds and shadows for improved visibility. - Updated tooltip parameters to support new styling options and enhance user experience.
This commit is contained in:
@@ -1,6 +1,58 @@
|
||||
import { CSSProperties } from "react";
|
||||
import { VariantType } from "react-tooltip";
|
||||
|
||||
type Palette = {
|
||||
from: string;
|
||||
to: string;
|
||||
shadow: string;
|
||||
border: string;
|
||||
};
|
||||
|
||||
const variantPalettes: Record<string, Palette> = {
|
||||
error: {
|
||||
from: "#F23030",
|
||||
to: "#B00B0B",
|
||||
shadow:
|
||||
"0 10px 30px -10px rgba(242,48,48,0.55), inset 0 1px 0 rgba(255,255,255,0.18)",
|
||||
border: "rgba(255,255,255,0.14)",
|
||||
},
|
||||
info: {
|
||||
from: "#5750F1",
|
||||
to: "#3B36B3",
|
||||
shadow:
|
||||
"0 10px 30px -10px rgba(87,80,241,0.55), inset 0 1px 0 rgba(255,255,255,0.2)",
|
||||
border: "rgba(255,255,255,0.16)",
|
||||
},
|
||||
success: {
|
||||
from: "#22AD5C",
|
||||
to: "#147F3D",
|
||||
shadow:
|
||||
"0 10px 30px -10px rgba(34,173,92,0.55), inset 0 1px 0 rgba(255,255,255,0.2)",
|
||||
border: "rgba(255,255,255,0.16)",
|
||||
},
|
||||
warning: {
|
||||
from: "#FBB040",
|
||||
to: "#D97706",
|
||||
shadow:
|
||||
"0 10px 30px -10px rgba(217,119,6,0.55), inset 0 1px 0 rgba(255,255,255,0.2)",
|
||||
border: "rgba(255,255,255,0.16)",
|
||||
},
|
||||
dark: {
|
||||
from: "#1F2937",
|
||||
to: "#0B1220",
|
||||
shadow:
|
||||
"0 10px 30px -10px rgba(0,0,0,0.65), inset 0 1px 0 rgba(255,255,255,0.08)",
|
||||
border: "rgba(255,255,255,0.08)",
|
||||
},
|
||||
light: {
|
||||
from: "#FFFFFF",
|
||||
to: "#F1F5F9",
|
||||
shadow:
|
||||
"0 10px 30px -10px rgba(0,0,0,0.18), inset 0 1px 0 rgba(255,255,255,0.6)",
|
||||
border: "rgba(15,23,42,0.06)",
|
||||
},
|
||||
};
|
||||
|
||||
export const _TooltipDefaultParams = ({
|
||||
id,
|
||||
variant = id === "delete" ? "error" : "info",
|
||||
@@ -9,10 +61,20 @@ export const _TooltipDefaultParams = ({
|
||||
id: string;
|
||||
variant?: VariantType;
|
||||
styles?: CSSProperties;
|
||||
}) => ({
|
||||
id,
|
||||
delayShow: 500,
|
||||
delayHide: 500,
|
||||
variant,
|
||||
style: { backgroundColor: variant === "error" ? "#F23030" : "", ...styles },
|
||||
});
|
||||
}) => {
|
||||
const palette = variantPalettes[variant] ?? variantPalettes.info;
|
||||
|
||||
return {
|
||||
id,
|
||||
delayShow: 220,
|
||||
delayHide: 120,
|
||||
variant,
|
||||
className: "fancy-tooltip",
|
||||
style: {
|
||||
background: `linear-gradient(135deg, ${palette.from} 0%, ${palette.to} 100%)`,
|
||||
boxShadow: palette.shadow,
|
||||
border: `1px solid ${palette.border}`,
|
||||
...styles,
|
||||
} satisfies CSSProperties,
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user