@skbkontur/icons 1.4.1 → 1.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,25 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [1.4.3](https://git.skbkontur.ru/ui/ui-parking/compare/@skbkontur/icons@1.4.2...@skbkontur/icons@1.4.3) (2023-08-18)
7
+
8
+ **Note:** Version bump only for package @skbkontur/icons
9
+
10
+
11
+
12
+
13
+
14
+ ## [1.4.2](https://git.skbkontur.ru/ui/ui-parking/compare/@skbkontur/icons@1.4.1...@skbkontur/icons@1.4.2) (2023-08-11)
15
+
16
+
17
+ ### Bug Fixes
18
+
19
+ * **icons:** pass styles to root ([7851f8b](https://git.skbkontur.ru/ui/ui-parking/commits/7851f8be39f248e5ef69afabbe83ed3023fbaccc))
20
+
21
+
22
+
23
+
24
+
6
25
  ## [1.4.1](https://git.skbkontur.ru/ui/ui-parking/compare/@skbkontur/icons@1.4.0...@skbkontur/icons@1.4.1) (2023-08-01)
7
26
 
8
27
  **Note:** Version bump only for package @skbkontur/icons
package/README.md CHANGED
@@ -57,10 +57,10 @@ type IconProps = {
57
57
  Импортировать иконки рекомендуется по одной, напрямую из целевого файла
58
58
 
59
59
  ```ts
60
- import { CheckAIcon } from '@skbkontur/icons/CheckAIcon'; // ✅
61
- import { MathDeltaIcon } from '@skbkontur/icons/MathDeltaIcon'; // ✅
62
- import { MathDeltaIcon20Light } from '@skbkontur/icons/MathDeltaIcon20Light'; // ✅
63
- import { ArchiveBoxIcon24Solid } from '@skbkontur/icons/ArchiveBoxIcon24Solid'; // ✅
60
+ import { CheckAIcon } from '@skbkontur/icons/icons/CheckAIcon'; // ✅
61
+ import { MathDeltaIcon } from '@skbkontur/icons/icons/MathDeltaIcon'; // ✅
62
+ import { MathDeltaIcon20Light } from '@skbkontur/icons/icons/MathDeltaIcon/MathDeltaIcon20Light'; // ✅
63
+ import { ArchiveBoxIcon24Solid } from '@skbkontur/icons/icons/ArchiveBoxIcon/ArchiveBoxIcon24Solid'; // ✅
64
64
  ```
65
65
 
66
66
  Импорт из корня может привезти к нехватки памяти во время билдинга проекта, т.к. будут импортированны сразу все файлы
@@ -6,9 +6,13 @@ import { ZERO_WIDTH_SPACE } from './chars';
6
6
  import { forwardRef } from '../helpers/forwardRef';
7
7
  export var BaseIcon = forwardRef('BaseIcon', function (_a, ref) {
8
8
  var color = _a.color, size = _a.size, style = _a.style, _b = _a["aria-hidden"], ariaHidden = _b === void 0 ? true : _b, _c = _a.viewBoxSize, viewBoxSize = _c === void 0 ? 16 : _c, _d = _a.align, align = _d === void 0 ? 'center' : _d, children = _a.children, rest = __rest(_a, ["color", "size", "style", 'aria-hidden', "viewBoxSize", "align", "children"]);
9
- var icon = (React.createElement("svg", __assign({ "data-tid": IconDataTids.root, ref: ref, width: size || viewBoxSize, height: size || viewBoxSize, style: __assign({ fill: color !== null && color !== void 0 ? color : 'currentColor', marginBottom: align === 'none' || align === 'center' ? 0 : '-0.1875em', flexShrink: 0 }, style), xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 " + viewBoxSize + " " + viewBoxSize, "aria-hidden": ariaHidden }, rest), children));
9
+ var icon = (React.createElement("svg", __assign({ "data-tid": IconDataTids.root, ref: ref, width: size || viewBoxSize, height: size || viewBoxSize, style: Object.assign({
10
+ fill: color !== null && color !== void 0 ? color : 'currentColor',
11
+ marginBottom: align === 'none' || align === 'center' ? 0 : '-0.1875em',
12
+ flexShrink: 0,
13
+ }, align !== 'center' ? style : undefined), xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 " + viewBoxSize + " " + viewBoxSize, "aria-hidden": ariaHidden }, rest), children));
10
14
  if (align === 'center') {
11
- return (React.createElement("span", { "aria-hidden": ariaHidden, style: { display: 'inline-flex', alignItems: 'center' } },
15
+ return (React.createElement("span", { "aria-hidden": ariaHidden, style: __assign({ display: 'inline-flex', alignItems: 'center' }, style) },
12
16
  ZERO_WIDTH_SPACE,
13
17
  icon));
14
18
  }
@@ -9,9 +9,13 @@ var chars_1 = require("./chars");
9
9
  var forwardRef_1 = require("../helpers/forwardRef");
10
10
  exports.BaseIcon = forwardRef_1.forwardRef('BaseIcon', function (_a, ref) {
11
11
  var color = _a.color, size = _a.size, style = _a.style, _b = _a["aria-hidden"], ariaHidden = _b === void 0 ? true : _b, _c = _a.viewBoxSize, viewBoxSize = _c === void 0 ? 16 : _c, _d = _a.align, align = _d === void 0 ? 'center' : _d, children = _a.children, rest = tslib_1.__rest(_a, ["color", "size", "style", 'aria-hidden', "viewBoxSize", "align", "children"]);
12
- var icon = (react_1.default.createElement("svg", tslib_1.__assign({ "data-tid": Icon_1.IconDataTids.root, ref: ref, width: size || viewBoxSize, height: size || viewBoxSize, style: tslib_1.__assign({ fill: color !== null && color !== void 0 ? color : 'currentColor', marginBottom: align === 'none' || align === 'center' ? 0 : '-0.1875em', flexShrink: 0 }, style), xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 " + viewBoxSize + " " + viewBoxSize, "aria-hidden": ariaHidden }, rest), children));
12
+ var icon = (react_1.default.createElement("svg", tslib_1.__assign({ "data-tid": Icon_1.IconDataTids.root, ref: ref, width: size || viewBoxSize, height: size || viewBoxSize, style: Object.assign({
13
+ fill: color !== null && color !== void 0 ? color : 'currentColor',
14
+ marginBottom: align === 'none' || align === 'center' ? 0 : '-0.1875em',
15
+ flexShrink: 0,
16
+ }, align !== 'center' ? style : undefined), xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 " + viewBoxSize + " " + viewBoxSize, "aria-hidden": ariaHidden }, rest), children));
13
17
  if (align === 'center') {
14
- return (react_1.default.createElement("span", { "aria-hidden": ariaHidden, style: { display: 'inline-flex', alignItems: 'center' } },
18
+ return (react_1.default.createElement("span", { "aria-hidden": ariaHidden, style: tslib_1.__assign({ display: 'inline-flex', alignItems: 'center' }, style) },
15
19
  chars_1.ZERO_WIDTH_SPACE,
16
20
  icon));
17
21
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@skbkontur/icons",
3
3
  "description": "react-ui-icons",
4
- "version": "1.4.1",
4
+ "version": "1.4.3",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
7
7
  },