@skbkontur/icons 1.4.1 → 1.4.2
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 +11 -0
- package/esm/internal/BaseIcon.js +6 -2
- package/internal/BaseIcon.js +6 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
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.2](https://git.skbkontur.ru/ui/ui-parking/compare/@skbkontur/icons@1.4.1...@skbkontur/icons@1.4.2) (2023-08-11)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **icons:** pass styles to root ([7851f8b](https://git.skbkontur.ru/ui/ui-parking/commits/7851f8be39f248e5ef69afabbe83ed3023fbaccc))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
## [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
18
|
|
|
8
19
|
**Note:** Version bump only for package @skbkontur/icons
|
package/esm/internal/BaseIcon.js
CHANGED
|
@@ -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:
|
|
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
|
}
|
package/internal/BaseIcon.js
CHANGED
|
@@ -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:
|
|
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
|
}
|