UI - МЕЖПРОЕКТНАЯ КОММУНИКАЦИЯ: русификация и редизайн аналитики внутреннего контура

This commit is contained in:
DCCONSTRUCTIONS
2026-04-24 13:41:06 +03:00
parent cf6fca20aa
commit 52bd017d82
19 changed files with 498 additions and 140 deletions
@@ -36,6 +36,7 @@ interface TBarProps extends TShapeProps {
showPercentage?: boolean;
showTopBorderRadius?: boolean;
showBottomBorderRadius?: boolean;
borderRadius?: number;
dotted?: boolean;
}
@@ -95,6 +96,7 @@ const CustomBar = React.memo(function CustomBar(props: TBarProps) {
showPercentage,
showTopBorderRadius,
showBottomBorderRadius,
borderRadius,
} = props;
if (!height) return null;
@@ -109,8 +111,8 @@ const CustomBar = React.memo(function CustomBar(props: TBarProps) {
currentBarPercentage !== undefined &&
!Number.isNaN(currentBarPercentage);
const topBorderRadius = showTopBorderRadius ? BAR_TOP_BORDER_RADIUS : 0;
const bottomBorderRadius = showBottomBorderRadius ? BAR_BOTTOM_BORDER_RADIUS : 0;
const topBorderRadius = showTopBorderRadius ? (borderRadius ?? BAR_TOP_BORDER_RADIUS) : 0;
const bottomBorderRadius = showBottomBorderRadius ? (borderRadius ?? BAR_BOTTOM_BORDER_RADIUS) : 0;
return (
<g>
@@ -177,6 +179,7 @@ const createShapeVariant =
showPercentage={bar.showPercentage}
showTopBorderRadius={!!showTopBorderRadius}
showBottomBorderRadius={!!showBottomBorderRadius}
borderRadius={bar.borderRadius}
{...factoryProps}
/>
);
@@ -78,6 +78,7 @@ export type TBarItem<T extends string> = {
stackId: string;
showTopBorderRadius?: (barKey: string, payload: any) => boolean;
showBottomBorderRadius?: (barKey: string, payload: any) => boolean;
borderRadius?: number;
shapeVariant?: TBarChartShapeVariant;
};
@@ -104,14 +104,14 @@ export function CustomSearchSelect(props: ICustomSearchSelectProps) {
<button
ref={setReferenceElement}
type="button"
className={cn(
"flex w-full items-center justify-between gap-1 text-11",
{
"cursor-not-allowed text-secondary": disabled,
"cursor-pointer": !disabled,
},
customButtonClassName
)}
className={cn(
"flex w-full items-center justify-between gap-1 text-11",
{
"cursor-not-allowed text-secondary": disabled,
"cursor-pointer": !disabled,
},
customButtonClassName
)}
onClick={toggleDropdown}
>
{customButton}
@@ -122,7 +122,7 @@ export function CustomSearchSelect(props: ICustomSearchSelectProps) {
<button
ref={setReferenceElement}
type="button"
className={cn(
className={cn(
"flex w-full items-center justify-between gap-1 rounded-full border-0 outline-none",
{
"px-3 py-2 text-13": input,
@@ -180,13 +180,10 @@ export function CustomSearchSelect(props: ICustomSearchSelectProps) {
key={option.value}
value={option.value}
className={({ active }) =>
cn(
"nodedc-dropdown-option",
{
"bg-white/6": active,
"cursor-not-allowed text-placeholder opacity-60": option.disabled,
}
)
cn("nodedc-dropdown-option", {
"bg-white/6": active,
"cursor-not-allowed text-placeholder opacity-60": option.disabled,
})
}
onClick={() => {
if (!multiple) closeDropdown();
@@ -216,7 +213,7 @@ export function CustomSearchSelect(props: ICustomSearchSelectProps) {
<p className="px-1.5 py-1 text-placeholder italic">{noResultsMessage}</p>
)
) : (
<p className="px-1.5 py-1 text-placeholder italic">Loading...</p>
<p className="px-1.5 py-1 text-placeholder italic">Загрузка...</p>
)}
</div>
{footerOption}