Skip to content

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/origin/master' into feat/n…
Browse files Browse the repository at this point in the history
…ew_file-upload-item
  • Loading branch information
fulcanellee committed Oct 22, 2024
2 parents b8ba1b2 + 9097936 commit b7c4e5e
Show file tree
Hide file tree
Showing 148 changed files with 510 additions and 186 deletions.
5 changes: 0 additions & 5 deletions .changeset/big-zebras-matter.md

This file was deleted.

Binary file removed .changeset/img.png
Binary file not shown.
Binary file removed .changeset/img_1.png
Binary file not shown.
5 changes: 0 additions & 5 deletions .changeset/spicy-cars-hunt.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/young-guests-cheat.md

This file was deleted.

14 changes: 7 additions & 7 deletions .storybook/package-sizes.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
"index.js": 7.4
},
"tooltip": {
"desktop.js": 48.8,
"index.js": 106.6,
"desktop.js": 48.9,
"index.js": 106.7,
"mobile.js": 78.1
},
"toast": {
Expand Down Expand Up @@ -52,7 +52,7 @@
"shared.js": 29.7
},
"table": {
"index.js": 170.1
"index.js": 170.2
},
"tab-bar": {
"index.js": 11,
Expand Down Expand Up @@ -86,7 +86,7 @@
"index.js": 4.1
},
"space": {
"index.js": 2.5
"index.js": 2.6
},
"sortable-list": {
"index.js": 53.7,
Expand Down Expand Up @@ -114,7 +114,7 @@
"desktop.js": 158.9,
"index.js": 303.3,
"mobile.js": 276.6,
"shared.js": 261.8
"shared.js": 261.9
},
"select-with-tags": {
"desktop.js": 286.9,
Expand Down Expand Up @@ -266,7 +266,7 @@
"shared.js": 11.9
},
"input-autocomplete": {
"desktop.js": 279.5,
"desktop.js": 279.6,
"index.js": 316,
"mobile.js": 288.5,
"shared.js": 2
Expand Down Expand Up @@ -299,7 +299,7 @@
"index.js": 1.8
},
"gallery": {
"index.js": 623.6
"index.js": 623.7
},
"form-control": {
"desktop.js": 4.1,
Expand Down
73 changes: 73 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,76 @@
## 47.24.0

<sup><time>15.10.2024</time></sup>

### [#1359](https://github.com/core-ds/core-components/pull/1359)

#### Что изменилось
- В сборку добавлено создание js-файлов для цветовых палитр. Это позволяет импортировать js-стили конкретной палитры.

#### Влияние на компоненты
- Минорное<br />`vars`



## 47.23.0

<sup><time>15.10.2024</time></sup>

### [#1407](https://github.com/core-ds/core-components/pull/1407)

#### Что изменилось
- Откат изменений скрытия футера при пустых опциях

#### Влияние на компоненты
- Патчи<br />`select`


### [#1415](https://github.com/core-ds/core-components/pull/1415)

#### Что изменилось
- Добавлен обработчик `onTargetClick`, вызываемый при нажатии на цель `Tooltip`

#### Влияние на компоненты
- Минорное<br />`tooltip`


### [#1414](https://github.com/core-ds/core-components/pull/1414)

#### Что изменилось
- Для дочернего компонента-обертки Space -> Item прокидываем key который передали или сгенерировал react

#### Влияние на компоненты
- Патчи<br />`space`


### [#1410](https://github.com/core-ds/core-components/pull/1410)

#### Что изменилось
- Исправлен расчет высоты пустого списка опций с включенным `limitDynamicOptionGroupSize`

#### Влияние на компоненты
- Патчи<br />`select`


### [#1381](https://github.com/core-ds/core-components/pull/1381)

#### Что изменилось
- Добавлены `inverted` цвета

#### Влияние на компоненты
- Минорное<br />`switch`


### [#1382](https://github.com/core-ds/core-components/pull/1382)

#### Что изменилось
- Исправлено скругление картинок до `16px`

#### Влияние на компоненты
- Патчи<br />`markdown`



## 47.22.0

<sup><time>11.10.2024</time></sup>
Expand Down
83 changes: 72 additions & 11 deletions bin/export-css-custom-properties-as-js-vars.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,21 @@ const distPath = '../packages/vars/dist';
fs.mkdirSync(path.resolve(__dirname, distPath), { recursive: true });

const BUILDS = ['es5', 'cssm', 'moderncssm', 'esm', 'modern'];
const PALETTES = [
'colors',
'colors-addons',
'colors-bluetint',
'colors-decorative',
'colors-indigo',
'colors-pfm',
'colors-qualitative',
'colors-sequential',
'colors-students',
'colors-transparent',
'colors-x5',
'shadows-bluetint',
'shadows-indigo',
];

function ensureDirectoryExist(filePath) {
const dirname = path.dirname(filePath);
Expand Down Expand Up @@ -48,18 +63,35 @@ function createExporter(buildName) {
};
}

/** формирует файлы деклараций d.ts */
function execTsc(destJsPath) {
return function () {
console.log(`create d.ts => ${destJsPath.split('/packages')[1]}`);

shell.exec(
`tsc --typeRoots [] --declaration --emitDeclarationOnly --allowJs ${destJsPath}`,
);
};
}

/** формирует путь для создания js модуля с css переменными (учитывая тип сборки) */
function createJSPathDestination(buildName, srcFileName) {
return path.resolve(
__dirname,
distPath,
buildName === 'es5' ? '' : buildName,
`${srcFileName}.js`,
);
}

/** собирает css переменные из vars/index.css в единый js модуль */
function exportCssVarsAsJs(srcFileName) {
const cssPath = path.resolve(__dirname, `../packages/vars/src/${srcFileName}.css`);
const css = fs.readFileSync(cssPath, 'utf-8');

return Promise.all(
BUILDS.map((buildName) => {
const destJsPath = path.resolve(
__dirname,
distPath,
buildName === 'es5' ? '' : buildName,
`${srcFileName}.js`,
);
const destJsPath = createJSPathDestination(buildName, srcFileName);

ensureDirectoryExist(destJsPath);
return postcss()
Expand All @@ -71,11 +103,35 @@ function exportCssVarsAsJs(srcFileName) {
}),
)
.process(css, { from: cssPath, to: destJsPath })
.then(() => {
shell.exec(
`tsc --typeRoots [] --declaration --emitDeclarationOnly --allowJs ${destJsPath}`,
);
});
.then(execTsc(destJsPath));
}),
);
}

/** собирает js модуль для каждого css файла по отдельности */
function buildPalettesCustomCSSProperties() {
return Promise.all(
PALETTES.map((palette) => {
const cssPath = path.resolve(__dirname, `../packages/vars/src/${palette}.css`);
const css = fs.readFileSync(cssPath, 'utf-8');

BUILDS.map((buildName) => {
const destJsPath = createJSPathDestination(buildName, `${palette}.module`);

ensureDirectoryExist(destJsPath);

console.log(`build [ ${palette} => ${buildName} ]`);

return postcss()
.use(
exportCustomVariables({
exporter: createExporter(buildName),
destination: destJsPath,
}),
)
.process(css, { from: cssPath, to: destJsPath })
.then(execTsc(destJsPath));
});
}),
);
}
Expand All @@ -86,3 +142,8 @@ exportCssVarsAsJs('index')
console.error(reason);
process.exit(1);
});

buildPalettesCustomCSSProperties().catch((reason) => {
console.error(reason);
process.exit(1);
});
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@alfalab/core-components",
"version": "47.22.0",
"version": "47.24.0",
"private": true,
"workspaces": [
"packages/*"
Expand Down
2 changes: 1 addition & 1 deletion packages/accordion/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@
"@alfalab/core-components-typography": "^4.10.2"
},
"themesVersion": "13.4.0",
"varsVersion": "9.13.1"
"varsVersion": "9.14.0"
}
2 changes: 1 addition & 1 deletion packages/action-button/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@
"tslib": "^2.4.0"
},
"themesVersion": "13.4.0",
"varsVersion": "9.13.1"
"varsVersion": "9.14.0"
}
2 changes: 1 addition & 1 deletion packages/alert/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@
"tslib": "^2.4.0"
},
"themesVersion": "13.4.0",
"varsVersion": "9.13.1"
"varsVersion": "9.14.0"
}
2 changes: 1 addition & 1 deletion packages/amount-input/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@
"@alfalab/core-components-shared": "^0.13.0"
},
"themesVersion": "13.4.0",
"varsVersion": "9.13.1"
"varsVersion": "9.14.0"
}
2 changes: 1 addition & 1 deletion packages/amount/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@
"react": "^16.9.0 || ^17.0.1 || ^18.0.0"
},
"themesVersion": "13.4.0",
"varsVersion": "9.13.1"
"varsVersion": "9.14.0"
}
2 changes: 1 addition & 1 deletion packages/attach/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@
"tslib": "^2.4.0"
},
"themesVersion": "13.4.0",
"varsVersion": "9.13.1"
"varsVersion": "9.14.0"
}
2 changes: 1 addition & 1 deletion packages/backdrop/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@
"react": "^16.9.0 || ^17.0.1 || ^18.0.0"
},
"themesVersion": "13.4.0",
"varsVersion": "9.13.1"
"varsVersion": "9.14.0"
}
2 changes: 1 addition & 1 deletion packages/badge/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@
"tslib": "^2.4.0"
},
"themesVersion": "13.4.0",
"varsVersion": "9.13.1"
"varsVersion": "9.14.0"
}
2 changes: 1 addition & 1 deletion packages/bank-card/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@
"tslib": "^2.4.0"
},
"themesVersion": "13.4.0",
"varsVersion": "9.13.1"
"varsVersion": "9.14.0"
}
2 changes: 1 addition & 1 deletion packages/base-modal/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,5 @@
"react": "^16.9.0 || ^17.0.1 || ^18.0.0"
},
"themesVersion": "13.4.0",
"varsVersion": "9.13.1"
"varsVersion": "9.14.0"
}
2 changes: 1 addition & 1 deletion packages/bottom-sheet/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@
"tslib": "^2.4.0"
},
"themesVersion": "13.4.0",
"varsVersion": "9.13.1"
"varsVersion": "9.14.0"
}
2 changes: 1 addition & 1 deletion packages/button/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@
"site"
],
"themesVersion": "13.4.0",
"varsVersion": "9.13.1"
"varsVersion": "9.14.0"
}
2 changes: 1 addition & 1 deletion packages/calendar-input/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@
"@alfalab/core-components-shared": "^0.13.0"
},
"themesVersion": "13.4.0",
"varsVersion": "9.13.1"
"varsVersion": "9.14.0"
}
2 changes: 1 addition & 1 deletion packages/calendar-range/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@
"tslib": "^2.4.0"
},
"themesVersion": "13.4.0",
"varsVersion": "9.13.1"
"varsVersion": "9.14.0"
}
2 changes: 1 addition & 1 deletion packages/calendar-with-skeleton/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@
"tslib": "^2.4.0"
},
"themesVersion": "13.4.0",
"varsVersion": "9.13.1"
"varsVersion": "9.14.0"
}
2 changes: 1 addition & 1 deletion packages/calendar/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
"tslib": "^2.4.0"
},
"themesVersion": "13.4.0",
"varsVersion": "9.13.1"
"varsVersion": "9.14.0"
}
2 changes: 1 addition & 1 deletion packages/card-image/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@
"tslib": "^2.4.0"
},
"themesVersion": "13.4.0",
"varsVersion": "9.13.1"
"varsVersion": "9.14.0"
}
2 changes: 1 addition & 1 deletion packages/cdn-icon/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@
"tslib": "^2.4.0"
},
"themesVersion": "13.4.0",
"varsVersion": "9.13.1"
"varsVersion": "9.14.0"
}
Loading

0 comments on commit b7c4e5e

Please sign in to comment.