@sima-land/ui-nucleons 41.0.0 → 41.1.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sima-land/ui-nucleons",
3
- "version": "41.0.0",
3
+ "version": "41.1.0",
4
4
  "repository": "ssh://git@github.com:sima-land/ui-nucleons.git",
5
5
  "author": "www.sima-land.ru team",
6
6
  "license": "Apache-2.0",
@@ -0,0 +1,17 @@
1
+ import React from 'react';
2
+ export interface StrokedSVGProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'children'> {
3
+ /** Компонент, выводящий svg-элемент. */
4
+ component: React.ComponentType<React.SVGAttributes<SVGSVGElement>>;
5
+ /** Ширина внешней обводки. */
6
+ stroke?: string;
7
+ /** Цвет внешней обводки. */
8
+ strokeWidth?: number;
9
+ /** Цвет заливки. */
10
+ fill?: string;
11
+ }
12
+ /**
13
+ * Выводит иконку с внешней обводкой.
14
+ * @param props Свойства.
15
+ * @return Элемент.
16
+ */
17
+ export declare const StrokedSVG: React.ForwardRefExoticComponent<StrokedSVGProps & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,52 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
+ }) : (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ o[k2] = m[k];
8
+ }));
9
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
10
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
11
+ }) : function(o, v) {
12
+ o["default"] = v;
13
+ });
14
+ var __importStar = (this && this.__importStar) || function (mod) {
15
+ if (mod && mod.__esModule) return mod;
16
+ var result = {};
17
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
18
+ __setModuleDefault(result, mod);
19
+ return result;
20
+ };
21
+ var __rest = (this && this.__rest) || function (s, e) {
22
+ var t = {};
23
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
24
+ t[p] = s[p];
25
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
26
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
27
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
28
+ t[p[i]] = s[p[i]];
29
+ }
30
+ return t;
31
+ };
32
+ var __importDefault = (this && this.__importDefault) || function (mod) {
33
+ return (mod && mod.__esModule) ? mod : { "default": mod };
34
+ };
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.StrokedSVG = void 0;
37
+ const react_1 = __importStar(require("react"));
38
+ const colors_1 = require("../colors");
39
+ const classnames_1 = __importDefault(require("classnames"));
40
+ const index_module_scss_1 = __importDefault(require("./index.module.scss"));
41
+ /**
42
+ * Выводит иконку с внешней обводкой.
43
+ * @param props Свойства.
44
+ * @return Элемент.
45
+ */
46
+ exports.StrokedSVG = (0, react_1.forwardRef)((_a, ref) => {
47
+ var { component: Tag, fill, stroke = colors_1.COLORS.get('gray4'), strokeWidth = 1, className } = _a, restProps = __rest(_a, ["component", "fill", "stroke", "strokeWidth", "className"]);
48
+ return (react_1.default.createElement("div", Object.assign({ ref: ref, className: (0, classnames_1.default)(index_module_scss_1.default.root, className) }, restProps),
49
+ react_1.default.createElement(Tag, { stroke: stroke, strokeWidth: `${strokeWidth * 2}px`, className: index_module_scss_1.default.stroke }),
50
+ react_1.default.createElement(Tag, { fill: fill, className: index_module_scss_1.default.svg })));
51
+ });
52
+ exports.StrokedSVG.displayName = 'StrokedSVG';
@@ -0,0 +1,17 @@
1
+ .root {
2
+ display: inline-flex;
3
+ position: relative;
4
+ }
5
+
6
+ .stroke {
7
+ overflow: visible;
8
+ display: block;
9
+ position: absolute;
10
+ top: 0;
11
+ left: 0;
12
+ }
13
+
14
+ .svg {
15
+ display: block;
16
+ position: relative;
17
+ }
@@ -220,9 +220,9 @@
220
220
  display: block;
221
221
  max-width: 100%;
222
222
  margin-bottom: 32px;
223
- }
224
- @include breakpoints.up('xs') {
225
- margin-bottom: 40px;
223
+ @include breakpoints.up('xs') {
224
+ margin-bottom: 40px;
225
+ }
226
226
  }
227
227
 
228
228
  // цитата