@skbkontur/icons 1.20.1-ec84b.0 → 1.20.1
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,14 @@
|
|
|
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.20.1](https://git.skbkontur.ru/ui/ui-parking-2/compare/@skbkontur/icons@1.20.0...@skbkontur/icons@1.20.1) (2025-12-10)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @skbkontur/icons
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
6
14
|
# [1.20.0](https://git.skbkontur.ru/ui/ui-parking-2/compare/@skbkontur/icons@1.19.1...@skbkontur/icons@1.20.0) (2025-10-15)
|
|
7
15
|
|
|
8
16
|
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
declare const _default: Meta;
|
|
1
|
+
declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0fc72a6d").R, import("@storybook/types").Args>;
|
|
3
2
|
export default _default;
|
|
4
3
|
export declare const IconsStoryDump: () => null;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
declare const _default: Meta;
|
|
1
|
+
declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0fc72a6d").R, import("@storybook/types").Args>;
|
|
3
2
|
export default _default;
|
|
4
3
|
export declare const IconsStoryDump: () => null;
|
package/esm/internal/BaseIcon.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { __assign, __rest } from "tslib";
|
|
2
|
+
/* eslint-disable react/display-name */
|
|
2
3
|
import React, { useCallback, useRef, useState } from 'react';
|
|
3
4
|
import { forwardRef } from '../helpers/forwardRef';
|
|
4
5
|
import { IconDataTids } from './Icon';
|
|
@@ -35,14 +36,12 @@ export var BaseIcon = forwardRef('BaseIcon', function (_a, ref) {
|
|
|
35
36
|
onKeyUp === null || onKeyUp === void 0 ? void 0 : onKeyUp(e);
|
|
36
37
|
}, [focusVisible, onKeyUp]);
|
|
37
38
|
var disableFocusVisible = useCallback(function (e) {
|
|
38
|
-
|
|
39
|
-
setFocusVisible(false);
|
|
40
|
-
}
|
|
39
|
+
focusVisible && setFocusVisible(false);
|
|
41
40
|
onBlur === null || onBlur === void 0 ? void 0 : onBlur(e);
|
|
42
41
|
}, [focusVisible, onBlur]);
|
|
43
|
-
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, outline: focusVisible ? undefined : 'none' }, (align !== 'center' ? style : {})), xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 ".concat(viewBoxSize, " ").concat(viewBoxSize), "aria-hidden": ariaHidden
|
|
42
|
+
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, outline: focusVisible ? undefined : 'none' }, (align !== 'center' ? style : {})), xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 ".concat(viewBoxSize, " ").concat(viewBoxSize), "aria-hidden": ariaHidden, tabIndex: tabIndex, onKeyUp: enableFocusVisibleOnTab, onBlur: disableFocusVisible }, rest), children));
|
|
44
43
|
if (align === 'center') {
|
|
45
|
-
return (React.createElement("span", { "aria-hidden": ariaHidden
|
|
44
|
+
return (React.createElement("span", { "aria-hidden": ariaHidden, style: __assign({ display: 'inline-flex', alignItems: 'center' }, style) },
|
|
46
45
|
React.createElement("span", { ref: zeroWidthSpaceRef }),
|
|
47
46
|
icon));
|
|
48
47
|
}
|
package/helpers/forwardRef.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.forwardRef =
|
|
3
|
+
exports.forwardRef = void 0;
|
|
4
4
|
var tslib_1 = require("tslib");
|
|
5
5
|
var react_1 = tslib_1.__importDefault(require("react"));
|
|
6
6
|
function forwardNameAndTag(name, render) {
|
|
@@ -12,3 +12,4 @@ function forwardNameAndTag(name, render) {
|
|
|
12
12
|
function forwardRef(name, render) {
|
|
13
13
|
return forwardNameAndTag(name, react_1.default.forwardRef(render));
|
|
14
14
|
}
|
|
15
|
+
exports.forwardRef = forwardRef;
|
package/internal/BaseIcon.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.BaseIcon = void 0;
|
|
4
4
|
var tslib_1 = require("tslib");
|
|
5
|
+
/* eslint-disable react/display-name */
|
|
5
6
|
var react_1 = tslib_1.__importStar(require("react"));
|
|
6
7
|
var forwardRef_1 = require("../helpers/forwardRef");
|
|
7
8
|
var Icon_1 = require("./Icon");
|
|
@@ -38,14 +39,12 @@ exports.BaseIcon = (0, forwardRef_1.forwardRef)('BaseIcon', function (_a, ref) {
|
|
|
38
39
|
onKeyUp === null || onKeyUp === void 0 ? void 0 : onKeyUp(e);
|
|
39
40
|
}, [focusVisible, onKeyUp]);
|
|
40
41
|
var disableFocusVisible = (0, react_1.useCallback)(function (e) {
|
|
41
|
-
|
|
42
|
-
setFocusVisible(false);
|
|
43
|
-
}
|
|
42
|
+
focusVisible && setFocusVisible(false);
|
|
44
43
|
onBlur === null || onBlur === void 0 ? void 0 : onBlur(e);
|
|
45
44
|
}, [focusVisible, onBlur]);
|
|
46
|
-
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, outline: focusVisible ? undefined : 'none' }, (align !== 'center' ? style : {})), xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 ".concat(viewBoxSize, " ").concat(viewBoxSize), "aria-hidden": ariaHidden
|
|
45
|
+
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, outline: focusVisible ? undefined : 'none' }, (align !== 'center' ? style : {})), xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 ".concat(viewBoxSize, " ").concat(viewBoxSize), "aria-hidden": ariaHidden, tabIndex: tabIndex, onKeyUp: enableFocusVisibleOnTab, onBlur: disableFocusVisible }, rest), children));
|
|
47
46
|
if (align === 'center') {
|
|
48
|
-
return (react_1.default.createElement("span", { "aria-hidden": ariaHidden
|
|
47
|
+
return (react_1.default.createElement("span", { "aria-hidden": ariaHidden, style: tslib_1.__assign({ display: 'inline-flex', alignItems: 'center' }, style) },
|
|
49
48
|
react_1.default.createElement("span", { ref: zeroWidthSpaceRef }),
|
|
50
49
|
icon));
|
|
51
50
|
}
|
package/internal/utils.js
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ZERO_WIDTH_SPACE = exports.isNonNullable = void 0;
|
|
4
|
-
exports.mergeRefs = mergeRefs;
|
|
5
|
-
exports.isDocument = isDocument;
|
|
6
|
-
exports.isShadowRoot = isShadowRoot;
|
|
3
|
+
exports.isShadowRoot = exports.isDocument = exports.ZERO_WIDTH_SPACE = exports.mergeRefs = exports.isNonNullable = void 0;
|
|
7
4
|
/**
|
|
8
5
|
* Проверяет, не является ли переданный аргумент null или undefined и исключает типы null и undefined из типа аргумента
|
|
9
6
|
*
|
|
@@ -39,6 +36,7 @@ function mergeRefs(refs) {
|
|
|
39
36
|
});
|
|
40
37
|
};
|
|
41
38
|
}
|
|
39
|
+
exports.mergeRefs = mergeRefs;
|
|
42
40
|
/**
|
|
43
41
|
* Character for center alignment.
|
|
44
42
|
*
|
|
@@ -56,6 +54,7 @@ exports.ZERO_WIDTH_SPACE = String.fromCharCode(0x200b);
|
|
|
56
54
|
function isDocument(node) {
|
|
57
55
|
return node.nodeType === Node.DOCUMENT_NODE;
|
|
58
56
|
}
|
|
57
|
+
exports.isDocument = isDocument;
|
|
59
58
|
/**
|
|
60
59
|
* Checks if the node is a ShadowRoot.
|
|
61
60
|
*
|
|
@@ -67,3 +66,4 @@ function isDocument(node) {
|
|
|
67
66
|
function isShadowRoot(node) {
|
|
68
67
|
return node.nodeType === Node.DOCUMENT_FRAGMENT_NODE && 'adoptedStyleSheets' in node;
|
|
69
68
|
}
|
|
69
|
+
exports.isShadowRoot = isShadowRoot;
|