Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,9 @@ jobs:
${{ runner.os }}-yarn-
- name: Установка зависимостей
run: yarn add "install-peers-cli@https://github.com/evless/install-peers-cli#fix-yarn-policies" && yarn --frozen-lockfile
Copy link

Copilot AI Apr 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The workflow installs dependencies by running yarn add "install-peers-cli@...#fix-yarn-policies" inside CI. This mutates package.json/yarn.lock during the job and means CI is no longer validating the dependency graph that’s actually committed (and it adds extra network/registry variability). Prefer pinning the required install-peers-cli source in package.json (e.g., update the dependency to the GitHub URL or a published version) and then using a plain yarn --frozen-lockfile here.

Suggested change
run: yarn add "install-peers-cli@https://github.com/evless/install-peers-cli#fix-yarn-policies" && yarn --frozen-lockfile
run: yarn --frozen-lockfile

Copilot uses AI. Check for mistakes.
- name: Тесты
run: yarn test
- name: Проверка TS
run: yarn run tsc-dry-run
- name: Unit тесты
run: yarn run unit
- name: Проверка eslint & stylelint
run: yarn run lint
13 changes: 10 additions & 3 deletions .stylelintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,16 @@ module.exports = {
plugins: ['stylelint-order', 'stylelint-prettier'],
rules: {
'prettier/prettier': true,
'color-named': 'never',
'no-descending-specificity': null,
'selector-class-pattern': null,
'keyframes-name-pattern': null,
'custom-property-pattern': null,
'alpha-value-notation': 'number',
'value-keyword-case': null,
'declaration-block-no-redundant-longhand-properties': null,
'property-no-vendor-prefix': null,
'selector-not-notation': null,
'block-no-redundant-nested-style-rules': null,
'selector-pseudo-class-no-unknown': [
true,
{ ignorePseudoClasses: ['focus-visible', 'global'] },
Expand All @@ -17,7 +25,6 @@ module.exports = {
'never',
{ ignore: ['after-declaration'] },
],
'string-quotes': 'single',
'order/order': ['custom-properties', 'declarations', 'rules'],
'at-rule-no-unknown': [
true,
Expand Down Expand Up @@ -255,4 +262,4 @@ module.exports = {
},
],
},
};
};
20 changes: 11 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,10 @@
"scripts": {
"postinstall": "yarn install-peers && husky install",
"tsc-dry-run": "tsc --noEmit",
"lint:js": "eslint --ext .js,.jsx,.tsx,.ts --fix . --quiet",
"lint:css": "stylelint ./src/**/*.css --fix",
"lint:js": "eslint --ext .js,.jsx,.tsx,.ts . --quiet",
"lint:js:fix": "eslint --ext .js,.jsx,.tsx,.ts --fix . --quiet",
"lint:css": "stylelint ./src/**/*.css",
"lint:css:fix": "stylelint ./src/**/*.css --fix",
"lint": "yarn run lint:js && yarn run lint:css",
"format:svg": "prettier --write '**/*.svg' --parser html",
"pre-push": "yarn run tsc-dry-run",
Expand Down Expand Up @@ -136,10 +138,10 @@
"dotenv-expand": "^5.1.0",
"eslint": "^8.20.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-prettier": "^8.5.0",
"eslint-config-prettier": "^10.1.8",
"eslint-config-react-app": "^7.0.1",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-prettier": "^5.5.5",
"eslint-plugin-simple-import-sort": "^7.0.0",
"file-loader": "^6.2.0",
"fs-extra": "^10.0.1",
Expand All @@ -164,7 +166,7 @@
"postcss-preset-env": "^7.0.1",
"postcss-simple-vars": "^5.0.2",
"postcss-syntax": "^0.36.2",
"prettier": "^2.6.2",
"prettier": "^3.8.1",
"prompts": "^2.4.2",
"react": ">= 16.8.0",
"react-app-polyfill": "^3.0.0",
Expand All @@ -184,10 +186,10 @@
"semver": "^7.5.2",
"source-map-loader": "^3.0.0",
"style-loader": "^3.3.1",
"stylelint": "^10.1.0",
"stylelint-config-standard": "^18.3.0",
"stylelint-order": "^4.1.0",
"stylelint-prettier": "^1.1.1",
"stylelint": "^17.4.0",
"stylelint-config-standard": "^40.0.0",
"stylelint-order": "^8.1.1",
"stylelint-prettier": "^5.0.3",
"svgo": "^2.8.0",
"tailwindcss": "^3.0.2",
"terser-webpack-plugin": "^5.2.5",
Expand Down
10 changes: 6 additions & 4 deletions src/components/Collapse/__stand__/Collapse.dev.stand.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -242,15 +242,17 @@ export const CollapseExampleFullscreenContainer = () => {
position: relative;
display: grid;
grid-template-columns: 1fr 1fr;
grid-gap: var(--space-m);
gap: var(--space-m);

&-Item {
height: 360px;
.ct--Collapse-Content {
height: calc(
100% - calc(var(--control-height-s) + var(--control-border-width) + var(
--space-xs
) * 2)
100% -
calc(
var(--control-height-s) + var(--control-border-width) +
var(--space-xs) * 2
)
);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,19 @@
position: relative;
display: grid;
grid-template-columns: 1fr 1fr;
grid-gap: var(--space-m);
gap: var(--space-m);

&-Item {
height: 360px;

.ct--Collapse-Content {
height:
calc(
100% -
height: calc(
100% -
calc(
var(--control-height-s) + var(--control-border-width) +
var(--space-xs) * 2
var(--space-xs) * 2
)
);
);
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/components/DataCell/DataCell.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
var(--table-data-cell-level, 0) +
var(--table-data-cell-additional-space, calc(0 * 1px))
);

padding-right: var(--table-data-cell-padding-right);
padding-left: var(--table-data-cell-padding-left);

Expand Down Expand Up @@ -66,6 +65,7 @@

&-Text {
white-space: pre-wrap;
/* stylelint-disable-next-line declaration-property-value-keyword-no-deprecated -- TODO: найти замену deprecated break-word и проверить */
word-break: break-word;

&_lineClamp {
Expand Down
4 changes: 2 additions & 2 deletions src/components/Pagination/Pagination.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ export const Pagination = withCtx(

const refs = useMutableRef([onStepChange, total, onChange] as const);

const [stepValue, setStepValue, stepValueAtom] = useAtom(step);
const [offsetValue, setOffsetValue, offsetValueAtom] = useAtom(
const [stepValue, , stepValueAtom] = useAtom(step);
const [offsetValue, , offsetValueAtom] = useAtom(
guardOffset(offset, total),
);

Expand Down
3 changes: 2 additions & 1 deletion src/components/Table/TableCell/TableCell.css
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@
}

&:has([data-cell-edit-mode='true']) {
box-shadow: 1px 1px 0 0 var(--table-cell-edit-mode-border-color) inset,
box-shadow:
1px 1px 0 0 var(--table-cell-edit-mode-border-color) inset,
-1px -1px 0 0 var(--table-cell-edit-mode-border-color) inset;
}

Expand Down
48 changes: 22 additions & 26 deletions src/components/Table/TableData/TableData.css
Original file line number Diff line number Diff line change
Expand Up @@ -16,45 +16,41 @@
display: contents;

&_zebraStriped {
--table-data-cell-bg:
color-mix(
in srgb,
rgb(from var(--color-bg-stripe) r g b / 1) 5%,
var(--color-bg-default)
);
--table-data-cell-bg: color-mix(
in srgb,
rgb(from var(--color-bg-stripe) r g b / 1) 5%,
var(--color-bg-default)
);
}

&:has(> * > [data-row-active='true']) {
--table-data-cell-bg:
color-mix(
in srgb,
rgb(from var(--color-control-bg-primary) r g b / 1) 15%,
var(--color-bg-default)
);
--table-data-cell-bg: color-mix(
in srgb,
rgb(from var(--color-control-bg-primary) r g b / 1) 15%,
var(--color-bg-default)
);
}

&:has(> * > [data-row-hover='true']),
.ct--TableData_rowHoverEffect &:hover {
--table-data-cell-bg:
color-mix(
in srgb,
rgb(from var(--color-control-typo-ghost-hover) r g b / 1) 9%,
var(--color-bg-default)
);
--table-data-cell-bg: color-mix(
in srgb,
rgb(from var(--color-control-typo-ghost-hover) r g b / 1) 9%,
var(--color-bg-default)
);
}

&:has(> * > [data-row-hover='true'][data-row-active='true']),
.ct--TableData_rowHoverEffect &:hover:has(> * > [data-row-active='true']) {
--table-data-cell-bg:
--table-data-cell-bg: color-mix(
in srgb,
rgb(from var(--color-control-typo-ghost-hover) r g b / 1) 3%,
color-mix(
in srgb,
rgb(from var(--color-control-typo-ghost-hover) r g b / 1) 3%,
color-mix(
in srgb,
rgb(from var(--color-control-bg-primary) r g b / 1) 15%,
var(--color-bg-default)
)
);
rgb(from var(--color-control-bg-primary) r g b / 1) 15%,
var(--color-bg-default)
)
);
}
}
}
14 changes: 6 additions & 8 deletions src/components/Table/TableResizers/TableResizers.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,17 @@
--inner-line-width: 1px;
--fast-transition: 0.15s ease-out;
--resizer-width: 4px;
--resizer-top:
calc(
(var(--table-header-height) - var(--table-resizer-top-offset)) * -1
);
--resizer-top: calc(
(var(--table-header-height) - var(--table-resizer-top-offset)) * -1
);
position: absolute;
top: var(--resizer-top);
right: 0;
width: var(--resizer-width);
height:
calc(
var(--table-body-height) - var(--table-resizer-top-offset) -
height: calc(
var(--table-body-height) - var(--table-resizer-top-offset) -
var(--table-body-horizontal-scroll-height) - 2px
);
);
background-color: var(--color-bg-ghost);
opacity: 0;
cursor: col-resize;
Expand Down
48 changes: 22 additions & 26 deletions src/components/Table/TableRow/TableRow.css
Original file line number Diff line number Diff line change
Expand Up @@ -14,45 +14,41 @@
}

&_zebraStriped {
--table-data-cell-bg:
color-mix(
in srgb,
rgb(from var(--color-bg-stripe) r g b / 1) 5%,
var(--color-bg-default)
);
--table-data-cell-bg: color-mix(
in srgb,
rgb(from var(--color-bg-stripe) r g b / 1) 5%,
var(--color-bg-default)
);
}

&:has(> * > [data-row-active='true']) {
--table-data-cell-bg:
color-mix(
in srgb,
rgb(from var(--color-control-bg-primary) r g b / 1) 15%,
var(--color-bg-default)
);
--table-data-cell-bg: color-mix(
in srgb,
rgb(from var(--color-control-bg-primary) r g b / 1) 15%,
var(--color-bg-default)
);
}

&:has(> * > [data-row-hover='true']),
.ct--TableData_rowHoverEffect &:hover {
--table-data-cell-bg:
color-mix(
in srgb,
rgb(from var(--color-control-typo-ghost-hover) r g b / 1) 9%,
var(--color-bg-default)
);
--table-data-cell-bg: color-mix(
in srgb,
rgb(from var(--color-control-typo-ghost-hover) r g b / 1) 9%,
var(--color-bg-default)
);
}

&:has(> * > [data-row-hover='true'][data-row-active='true']),
.ct--TableData_rowHoverEffect &:hover:has(> * > [data-row-active='true']) {
--table-data-cell-bg:
--table-data-cell-bg: color-mix(
in srgb,
rgb(from var(--color-control-typo-ghost-hover) r g b / 1) 3%,
color-mix(
in srgb,
rgb(from var(--color-control-typo-ghost-hover) r g b / 1) 3%,
color-mix(
in srgb,
rgb(from var(--color-control-bg-primary) r g b / 1) 15%,
var(--color-bg-default)
)
);
rgb(from var(--color-control-bg-primary) r g b / 1) 15%,
var(--color-bg-default)
)
);
}

&-Cell {
Expand Down
2 changes: 1 addition & 1 deletion src/components/Table/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ export const transformColumns = <T>(
const gridIndex = prevItem
? prevItem.position.gridIndex + (prevItem.position.colSpan || 1)
: 0;
const mainId = level === 0 ? col++ : item.colId ?? 0;
const mainId = level === 0 ? col++ : (item.colId ?? 0);

const handledItem: Header<T> & {
position: Position;
Expand Down
10 changes: 5 additions & 5 deletions src/components/TextFieldCell/TextFieldCell.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
width: 100%;
height: 100%;
min-height: var(--text-filed-cell-min-height);
padding-left: var(
--text-filed-cell-padding-left,
var(--table-data-cell-padding-left)
);
padding-right: var(
--text-filed-cell-padding-right,
var(--table-data-cell-padding-right)
);
padding-left: var(
--text-filed-cell-padding-left,
var(--table-data-cell-padding-left)
);

&_size {
&_s {
Expand Down Expand Up @@ -62,8 +62,8 @@
& .TextFieldTypeTextArea_resize .FieldControlLayout-Container,
& .TextFieldTypeTextArea_resize .FieldControlLayout-Children,
& .TextFieldTypeTextArea_resize .TextFieldTypeTextArea-TextArea {
min-height: 100%;
height: 100%;
min-height: 100%;
}

& .TextAreaAutoSize {
Expand Down
6 changes: 2 additions & 4 deletions src/components/Toolbar/Toolbar.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,12 @@
}

&_defaultBrick {
border-radius:
var(--bar-default-border-radius)
border-radius: var(--bar-default-border-radius)
var(--bar-default-border-radius) 0 0;
}

&_brickDefault {
border-radius:
0 0 var(--bar-default-border-radius)
border-radius: 0 0 var(--bar-default-border-radius)
var(--bar-default-border-radius);
}
}
Expand Down
Loading
Loading