diff --git a/src/lib/kit/components/AccordeonCard/AccordeonCard.scss b/src/lib/kit/components/AccordeonCard/AccordeonCard.scss index cf3d3ce1..73220633 100644 --- a/src/lib/kit/components/AccordeonCard/AccordeonCard.scss +++ b/src/lib/kit/components/AccordeonCard/AccordeonCard.scss @@ -63,18 +63,6 @@ order: -1; } - &-content-title { - font-weight: 700; - - &_size_s { - font-size: 13px; - } - - &_size_m { - font-size: 16px; - } - } - &-content-description { margin-top: 12px; color: var(--g-color-text-complementary); diff --git a/src/lib/kit/components/AccordeonCard/AccordeonCard.tsx b/src/lib/kit/components/AccordeonCard/AccordeonCard.tsx index 8bbccdb3..57332f32 100644 --- a/src/lib/kit/components/AccordeonCard/AccordeonCard.tsx +++ b/src/lib/kit/components/AccordeonCard/AccordeonCard.tsx @@ -1,7 +1,7 @@ import React from 'react'; import {ChevronDown} from '@gravity-ui/icons'; -import {Button, Icon} from '@gravity-ui/uikit'; +import {Button, Icon, Text} from '@gravity-ui/uikit'; import _ from 'lodash'; import {block} from '../../utils'; @@ -69,6 +69,18 @@ export const AccordeonCard: React.FC = ({ } }); + const currentHeaderVariant = React.useMemo(() => { + if (!_.isString(header)) { + return 'body-1'; + } + + if (titleSize === 'm') { + return 'subheader-2'; + } + + return 'subheader-1'; + }, [titleSize]); + return (
= ({ onClick={!ignoreHeaderToggle && !alwaysOpen ? handleToggle : undefined} >
- - {header} - + {header} {description ? ( = ({ disabled={titlePopoverDisabled} placement={COMMON_POPOVER_PLACEMENT} > -
+ {propsTitle} -
+ {description ? (
diff --git a/src/lib/kit/components/Card/__snapshots__/Card.visual.test.tsx-snapshots/Card-Accordeon-Card-array-spec-dark-chromium-linux.png b/src/lib/kit/components/Card/__snapshots__/Card.visual.test.tsx-snapshots/Card-Accordeon-Card-array-spec-dark-chromium-linux.png index a30ad4e0..92eaa458 100644 Binary files a/src/lib/kit/components/Card/__snapshots__/Card.visual.test.tsx-snapshots/Card-Accordeon-Card-array-spec-dark-chromium-linux.png and b/src/lib/kit/components/Card/__snapshots__/Card.visual.test.tsx-snapshots/Card-Accordeon-Card-array-spec-dark-chromium-linux.png differ diff --git a/src/lib/kit/components/Card/__snapshots__/Card.visual.test.tsx-snapshots/Card-Accordeon-Card-array-spec-light-chromium-linux.png b/src/lib/kit/components/Card/__snapshots__/Card.visual.test.tsx-snapshots/Card-Accordeon-Card-array-spec-light-chromium-linux.png index ba2c81da..a0c70f54 100644 Binary files a/src/lib/kit/components/Card/__snapshots__/Card.visual.test.tsx-snapshots/Card-Accordeon-Card-array-spec-light-chromium-linux.png and b/src/lib/kit/components/Card/__snapshots__/Card.visual.test.tsx-snapshots/Card-Accordeon-Card-array-spec-light-chromium-linux.png differ diff --git a/src/lib/kit/components/Card/__snapshots__/Card.visual.test.tsx-snapshots/Card-Accordeon-Card-object-spec-dark-chromium-linux.png b/src/lib/kit/components/Card/__snapshots__/Card.visual.test.tsx-snapshots/Card-Accordeon-Card-object-spec-dark-chromium-linux.png index 00eb5cd5..d9146e8f 100644 Binary files a/src/lib/kit/components/Card/__snapshots__/Card.visual.test.tsx-snapshots/Card-Accordeon-Card-object-spec-dark-chromium-linux.png and b/src/lib/kit/components/Card/__snapshots__/Card.visual.test.tsx-snapshots/Card-Accordeon-Card-object-spec-dark-chromium-linux.png differ diff --git a/src/lib/kit/components/Card/__snapshots__/Card.visual.test.tsx-snapshots/Card-Accordeon-Card-object-spec-light-chromium-linux.png b/src/lib/kit/components/Card/__snapshots__/Card.visual.test.tsx-snapshots/Card-Accordeon-Card-object-spec-light-chromium-linux.png index 87272499..d9cb4a29 100644 Binary files a/src/lib/kit/components/Card/__snapshots__/Card.visual.test.tsx-snapshots/Card-Accordeon-Card-object-spec-light-chromium-linux.png and b/src/lib/kit/components/Card/__snapshots__/Card.visual.test.tsx-snapshots/Card-Accordeon-Card-object-spec-light-chromium-linux.png differ diff --git a/src/lib/kit/components/Card/__snapshots__/Card.visual.test.tsx-snapshots/Card-Section-Card-array-spec-dark-chromium-linux.png b/src/lib/kit/components/Card/__snapshots__/Card.visual.test.tsx-snapshots/Card-Section-Card-array-spec-dark-chromium-linux.png index 2616caf7..d3f0a781 100644 Binary files a/src/lib/kit/components/Card/__snapshots__/Card.visual.test.tsx-snapshots/Card-Section-Card-array-spec-dark-chromium-linux.png and b/src/lib/kit/components/Card/__snapshots__/Card.visual.test.tsx-snapshots/Card-Section-Card-array-spec-dark-chromium-linux.png differ diff --git a/src/lib/kit/components/Card/__snapshots__/Card.visual.test.tsx-snapshots/Card-Section-Card-array-spec-light-chromium-linux.png b/src/lib/kit/components/Card/__snapshots__/Card.visual.test.tsx-snapshots/Card-Section-Card-array-spec-light-chromium-linux.png index 2dea006f..74b6338c 100644 Binary files a/src/lib/kit/components/Card/__snapshots__/Card.visual.test.tsx-snapshots/Card-Section-Card-array-spec-light-chromium-linux.png and b/src/lib/kit/components/Card/__snapshots__/Card.visual.test.tsx-snapshots/Card-Section-Card-array-spec-light-chromium-linux.png differ diff --git a/src/lib/kit/components/Card/__snapshots__/Card.visual.test.tsx-snapshots/Card-Section-Card-object-spec-dark-chromium-linux.png b/src/lib/kit/components/Card/__snapshots__/Card.visual.test.tsx-snapshots/Card-Section-Card-object-spec-dark-chromium-linux.png index 27b323cc..9522c697 100644 Binary files a/src/lib/kit/components/Card/__snapshots__/Card.visual.test.tsx-snapshots/Card-Section-Card-object-spec-dark-chromium-linux.png and b/src/lib/kit/components/Card/__snapshots__/Card.visual.test.tsx-snapshots/Card-Section-Card-object-spec-dark-chromium-linux.png differ diff --git a/src/lib/kit/components/Card/__snapshots__/Card.visual.test.tsx-snapshots/Card-Section-Card-object-spec-light-chromium-linux.png b/src/lib/kit/components/Card/__snapshots__/Card.visual.test.tsx-snapshots/Card-Section-Card-object-spec-light-chromium-linux.png index e796f06c..0e235d8e 100644 Binary files a/src/lib/kit/components/Card/__snapshots__/Card.visual.test.tsx-snapshots/Card-Section-Card-object-spec-light-chromium-linux.png and b/src/lib/kit/components/Card/__snapshots__/Card.visual.test.tsx-snapshots/Card-Section-Card-object-spec-light-chromium-linux.png differ diff --git a/src/lib/kit/components/Card/__snapshots__/Card.visual.test.tsx-snapshots/Card-view-Accordeon-Card-array-spec-dark-chromium-linux.png b/src/lib/kit/components/Card/__snapshots__/Card.visual.test.tsx-snapshots/Card-view-Accordeon-Card-array-spec-dark-chromium-linux.png index fb9aacce..ecde48e7 100644 Binary files a/src/lib/kit/components/Card/__snapshots__/Card.visual.test.tsx-snapshots/Card-view-Accordeon-Card-array-spec-dark-chromium-linux.png and b/src/lib/kit/components/Card/__snapshots__/Card.visual.test.tsx-snapshots/Card-view-Accordeon-Card-array-spec-dark-chromium-linux.png differ diff --git a/src/lib/kit/components/Card/__snapshots__/Card.visual.test.tsx-snapshots/Card-view-Accordeon-Card-array-spec-light-chromium-linux.png b/src/lib/kit/components/Card/__snapshots__/Card.visual.test.tsx-snapshots/Card-view-Accordeon-Card-array-spec-light-chromium-linux.png index 1a2f7aab..d3ee523e 100644 Binary files a/src/lib/kit/components/Card/__snapshots__/Card.visual.test.tsx-snapshots/Card-view-Accordeon-Card-array-spec-light-chromium-linux.png and b/src/lib/kit/components/Card/__snapshots__/Card.visual.test.tsx-snapshots/Card-view-Accordeon-Card-array-spec-light-chromium-linux.png differ diff --git a/src/lib/kit/components/Card/__snapshots__/Card.visual.test.tsx-snapshots/Card-view-Accordeon-Card-object-spec-dark-chromium-linux.png b/src/lib/kit/components/Card/__snapshots__/Card.visual.test.tsx-snapshots/Card-view-Accordeon-Card-object-spec-dark-chromium-linux.png index 5d957aed..b6ef076c 100644 Binary files a/src/lib/kit/components/Card/__snapshots__/Card.visual.test.tsx-snapshots/Card-view-Accordeon-Card-object-spec-dark-chromium-linux.png and b/src/lib/kit/components/Card/__snapshots__/Card.visual.test.tsx-snapshots/Card-view-Accordeon-Card-object-spec-dark-chromium-linux.png differ diff --git a/src/lib/kit/components/Card/__snapshots__/Card.visual.test.tsx-snapshots/Card-view-Accordeon-Card-object-spec-light-chromium-linux.png b/src/lib/kit/components/Card/__snapshots__/Card.visual.test.tsx-snapshots/Card-view-Accordeon-Card-object-spec-light-chromium-linux.png index f981aa38..4731b827 100644 Binary files a/src/lib/kit/components/Card/__snapshots__/Card.visual.test.tsx-snapshots/Card-view-Accordeon-Card-object-spec-light-chromium-linux.png and b/src/lib/kit/components/Card/__snapshots__/Card.visual.test.tsx-snapshots/Card-view-Accordeon-Card-object-spec-light-chromium-linux.png differ diff --git a/src/lib/kit/components/Card/__snapshots__/Card.visual.test.tsx-snapshots/Card-view-Section-Card-array-spec-dark-chromium-linux.png b/src/lib/kit/components/Card/__snapshots__/Card.visual.test.tsx-snapshots/Card-view-Section-Card-array-spec-dark-chromium-linux.png index 2af40b2d..5dfb019c 100644 Binary files a/src/lib/kit/components/Card/__snapshots__/Card.visual.test.tsx-snapshots/Card-view-Section-Card-array-spec-dark-chromium-linux.png and b/src/lib/kit/components/Card/__snapshots__/Card.visual.test.tsx-snapshots/Card-view-Section-Card-array-spec-dark-chromium-linux.png differ diff --git a/src/lib/kit/components/Card/__snapshots__/Card.visual.test.tsx-snapshots/Card-view-Section-Card-array-spec-light-chromium-linux.png b/src/lib/kit/components/Card/__snapshots__/Card.visual.test.tsx-snapshots/Card-view-Section-Card-array-spec-light-chromium-linux.png index b30a90e9..19a2aef8 100644 Binary files a/src/lib/kit/components/Card/__snapshots__/Card.visual.test.tsx-snapshots/Card-view-Section-Card-array-spec-light-chromium-linux.png and b/src/lib/kit/components/Card/__snapshots__/Card.visual.test.tsx-snapshots/Card-view-Section-Card-array-spec-light-chromium-linux.png differ diff --git a/src/lib/kit/components/Card/__snapshots__/Card.visual.test.tsx-snapshots/Card-view-Section-Card-object-spec-dark-chromium-linux.png b/src/lib/kit/components/Card/__snapshots__/Card.visual.test.tsx-snapshots/Card-view-Section-Card-object-spec-dark-chromium-linux.png index 408d883f..8dc9ea12 100644 Binary files a/src/lib/kit/components/Card/__snapshots__/Card.visual.test.tsx-snapshots/Card-view-Section-Card-object-spec-dark-chromium-linux.png and b/src/lib/kit/components/Card/__snapshots__/Card.visual.test.tsx-snapshots/Card-view-Section-Card-object-spec-dark-chromium-linux.png differ diff --git a/src/lib/kit/components/Card/__snapshots__/Card.visual.test.tsx-snapshots/Card-view-Section-Card-object-spec-light-chromium-linux.png b/src/lib/kit/components/Card/__snapshots__/Card.visual.test.tsx-snapshots/Card-view-Section-Card-object-spec-light-chromium-linux.png index a5cfa650..ed4b6cfb 100644 Binary files a/src/lib/kit/components/Card/__snapshots__/Card.visual.test.tsx-snapshots/Card-view-Section-Card-object-spec-light-chromium-linux.png and b/src/lib/kit/components/Card/__snapshots__/Card.visual.test.tsx-snapshots/Card-view-Section-Card-object-spec-light-chromium-linux.png differ diff --git a/src/lib/kit/components/Inputs/ArrayBase/__snapshots__/ArrayBase.visual.test.tsx-snapshots/Array-Base-view-default-dark-chromium-linux.png b/src/lib/kit/components/Inputs/ArrayBase/__snapshots__/ArrayBase.visual.test.tsx-snapshots/Array-Base-view-default-dark-chromium-linux.png index 342b9144..1adb6333 100644 Binary files a/src/lib/kit/components/Inputs/ArrayBase/__snapshots__/ArrayBase.visual.test.tsx-snapshots/Array-Base-view-default-dark-chromium-linux.png and b/src/lib/kit/components/Inputs/ArrayBase/__snapshots__/ArrayBase.visual.test.tsx-snapshots/Array-Base-view-default-dark-chromium-linux.png differ diff --git a/src/lib/kit/components/Inputs/ArrayBase/__snapshots__/ArrayBase.visual.test.tsx-snapshots/Array-Base-view-default-light-chromium-linux.png b/src/lib/kit/components/Inputs/ArrayBase/__snapshots__/ArrayBase.visual.test.tsx-snapshots/Array-Base-view-default-light-chromium-linux.png index c0f704aa..b3607023 100644 Binary files a/src/lib/kit/components/Inputs/ArrayBase/__snapshots__/ArrayBase.visual.test.tsx-snapshots/Array-Base-view-default-light-chromium-linux.png and b/src/lib/kit/components/Inputs/ArrayBase/__snapshots__/ArrayBase.visual.test.tsx-snapshots/Array-Base-view-default-light-chromium-linux.png differ diff --git a/src/lib/kit/components/Inputs/CardOneOf/__snapshots__/CardOneOf.visual.test.tsx-snapshots/Card-OneOf-view-object-dark-chromium-linux.png b/src/lib/kit/components/Inputs/CardOneOf/__snapshots__/CardOneOf.visual.test.tsx-snapshots/Card-OneOf-view-object-dark-chromium-linux.png index 9a1f12f9..474abcc2 100644 Binary files a/src/lib/kit/components/Inputs/CardOneOf/__snapshots__/CardOneOf.visual.test.tsx-snapshots/Card-OneOf-view-object-dark-chromium-linux.png and b/src/lib/kit/components/Inputs/CardOneOf/__snapshots__/CardOneOf.visual.test.tsx-snapshots/Card-OneOf-view-object-dark-chromium-linux.png differ diff --git a/src/lib/kit/components/Inputs/CardOneOf/__snapshots__/CardOneOf.visual.test.tsx-snapshots/Card-OneOf-view-object-light-chromium-linux.png b/src/lib/kit/components/Inputs/CardOneOf/__snapshots__/CardOneOf.visual.test.tsx-snapshots/Card-OneOf-view-object-light-chromium-linux.png index fe7d0831..e4c72600 100644 Binary files a/src/lib/kit/components/Inputs/CardOneOf/__snapshots__/CardOneOf.visual.test.tsx-snapshots/Card-OneOf-view-object-light-chromium-linux.png and b/src/lib/kit/components/Inputs/CardOneOf/__snapshots__/CardOneOf.visual.test.tsx-snapshots/Card-OneOf-view-object-light-chromium-linux.png differ diff --git a/src/lib/kit/components/Inputs/CardOneOf/__snapshots__/CardOneOf.visual.test.tsx-snapshots/Card-OneOf-view-string-dark-chromium-linux.png b/src/lib/kit/components/Inputs/CardOneOf/__snapshots__/CardOneOf.visual.test.tsx-snapshots/Card-OneOf-view-string-dark-chromium-linux.png index d303deea..f62fb204 100644 Binary files a/src/lib/kit/components/Inputs/CardOneOf/__snapshots__/CardOneOf.visual.test.tsx-snapshots/Card-OneOf-view-string-dark-chromium-linux.png and b/src/lib/kit/components/Inputs/CardOneOf/__snapshots__/CardOneOf.visual.test.tsx-snapshots/Card-OneOf-view-string-dark-chromium-linux.png differ diff --git a/src/lib/kit/components/Inputs/CardOneOf/__snapshots__/CardOneOf.visual.test.tsx-snapshots/Card-OneOf-view-string-light-chromium-linux.png b/src/lib/kit/components/Inputs/CardOneOf/__snapshots__/CardOneOf.visual.test.tsx-snapshots/Card-OneOf-view-string-light-chromium-linux.png index 94f5796d..714ac9aa 100644 Binary files a/src/lib/kit/components/Inputs/CardOneOf/__snapshots__/CardOneOf.visual.test.tsx-snapshots/Card-OneOf-view-string-light-chromium-linux.png and b/src/lib/kit/components/Inputs/CardOneOf/__snapshots__/CardOneOf.visual.test.tsx-snapshots/Card-OneOf-view-string-light-chromium-linux.png differ diff --git a/src/lib/kit/components/Inputs/Checkbox/__snapshots__/Checkbox.visual.test.tsx-snapshots/Checkbox-view-default-dark-chromium-linux.png b/src/lib/kit/components/Inputs/Checkbox/__snapshots__/Checkbox.visual.test.tsx-snapshots/Checkbox-view-default-dark-chromium-linux.png index c1b00c02..a1a604a3 100644 Binary files a/src/lib/kit/components/Inputs/Checkbox/__snapshots__/Checkbox.visual.test.tsx-snapshots/Checkbox-view-default-dark-chromium-linux.png and b/src/lib/kit/components/Inputs/Checkbox/__snapshots__/Checkbox.visual.test.tsx-snapshots/Checkbox-view-default-dark-chromium-linux.png differ diff --git a/src/lib/kit/components/Inputs/Checkbox/__snapshots__/Checkbox.visual.test.tsx-snapshots/Checkbox-view-default-light-chromium-linux.png b/src/lib/kit/components/Inputs/Checkbox/__snapshots__/Checkbox.visual.test.tsx-snapshots/Checkbox-view-default-light-chromium-linux.png index 3b315b4b..fa6150b7 100644 Binary files a/src/lib/kit/components/Inputs/Checkbox/__snapshots__/Checkbox.visual.test.tsx-snapshots/Checkbox-view-default-light-chromium-linux.png and b/src/lib/kit/components/Inputs/Checkbox/__snapshots__/Checkbox.visual.test.tsx-snapshots/Checkbox-view-default-light-chromium-linux.png differ diff --git a/src/lib/kit/components/Inputs/FileInput/FileInput.scss b/src/lib/kit/components/Inputs/FileInput/FileInput.scss index 5ad39d32..0d1a380b 100644 --- a/src/lib/kit/components/Inputs/FileInput/FileInput.scss +++ b/src/lib/kit/components/Inputs/FileInput/FileInput.scss @@ -11,9 +11,5 @@ display: block; margin: auto 10px; max-width: 160px; - text-overflow: ellipsis; - overflow: hidden; - white-space: nowrap; - color: var(--g-color-text-secondary); } } diff --git a/src/lib/kit/components/Inputs/FileInput/FileInput.tsx b/src/lib/kit/components/Inputs/FileInput/FileInput.tsx index 7b302bd1..4a938d83 100644 --- a/src/lib/kit/components/Inputs/FileInput/FileInput.tsx +++ b/src/lib/kit/components/Inputs/FileInput/FileInput.tsx @@ -1,7 +1,7 @@ import React from 'react'; import {Xmark} from '@gravity-ui/icons'; -import {Button, Icon, Label} from '@gravity-ui/uikit'; +import {Button, Icon, Label, Text} from '@gravity-ui/uikit'; import {StringInputProps} from '../../../../core'; import i18n from '../../../../kit/i18n'; @@ -82,7 +82,9 @@ export const FileInput: React.FC = ({name, input, spec}) => { tabIndex={-1} accept={spec.viewSpec.fileInput?.accept} /> - {fileNameContent} + + {fileNameContent} + {value ? (