@megafon/ui-core 9.0.0-alpha.18 → 9.0.0-alpha.19

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.
@@ -1,6 +1,6 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import * as React from 'react';
3
- import { cnCreate, filterDataAttrs } from '@megafon/ui-helpers';
3
+ import { cnCreate, convert, filterDataAttrs, textConvertConfig, titleConvertConfig } from '@megafon/ui-helpers';
4
4
  import Header from "../Header/Header";
5
5
  import Preloader from "../Preloader/Preloader";
6
6
  import "./Row.css";
@@ -72,9 +72,9 @@ var Row = function Row(_ref) {
72
72
  className: cn('title', [classes.title]),
73
73
  as: isSmallSize ? 'h5' : 'h3',
74
74
  space: isSmallSize ? 'tight' : 'wide'
75
- }, title), !!subTitle && /*#__PURE__*/React.createElement("div", {
75
+ }, convert(title, titleConvertConfig)), !!subTitle && /*#__PURE__*/React.createElement("div", {
76
76
  className: cn('sub-title', [classes.subtitle])
77
- }, subTitle)), !showLoader ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
77
+ }, convert(subTitle, textConvertConfig))), !showLoader ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
78
78
  className: cn('children')
79
79
  }, children), showArrow && /*#__PURE__*/React.createElement(ArrowRight, _extends({
80
80
  className: cn('arrow')
@@ -81,9 +81,9 @@ var Row = function Row(_ref) {
81
81
  className: cn('title', [classes.title]),
82
82
  as: isSmallSize ? 'h5' : 'h3',
83
83
  space: isSmallSize ? 'tight' : 'wide'
84
- }, title), !!subTitle && /*#__PURE__*/React.createElement("div", {
84
+ }, (0, _uiHelpers.convert)(title, _uiHelpers.titleConvertConfig)), !!subTitle && /*#__PURE__*/React.createElement("div", {
85
85
  className: cn('sub-title', [classes.subtitle])
86
- }, subTitle)), !showLoader ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
86
+ }, (0, _uiHelpers.convert)(subTitle, _uiHelpers.textConvertConfig))), !showLoader ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
87
87
  className: cn('children')
88
88
  }, children), showArrow && /*#__PURE__*/React.createElement(ArrowRight, (0, _extends2["default"])({
89
89
  className: cn('arrow')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@megafon/ui-core",
3
- "version": "9.0.0-alpha.18",
3
+ "version": "9.0.0-alpha.19",
4
4
  "files": [
5
5
  "dist",
6
6
  "styles"
@@ -50,7 +50,7 @@
50
50
  "@babel/preset-env": "^7.8.6",
51
51
  "@babel/preset-react": "^7.8.3",
52
52
  "@babel/preset-typescript": "^7.8.3",
53
- "@megafon/ui-icons": "^4.0.0-alpha.9",
53
+ "@megafon/ui-icons": "^4.0.0-alpha.10",
54
54
  "@svgr/core": "^2.4.1",
55
55
  "@testing-library/jest-dom": "^6.5.0",
56
56
  "@testing-library/react": "^16.0.1",
@@ -102,7 +102,7 @@
102
102
  "react-transition-group": "^4.4.5",
103
103
  "simplebar": "^6.2.6",
104
104
  "simplebar-react": "^3.2.5",
105
- "swiper": "^11.1.1"
105
+ "swiper": "^12.1.2"
106
106
  },
107
- "gitHead": "61b804a3e89d0d7f4a8ecf324b9947bad1b7c898"
107
+ "gitHead": "2f3dd547a16bc1a6a3dfb947ba63a003ac691e73"
108
108
  }
package/styles/base.scss CHANGED
@@ -155,3 +155,57 @@ h5 {
155
155
  text-decoration: underline;
156
156
  }
157
157
  }
158
+ @mixin focus($offset: 2px) {
159
+ &:focus-visible {
160
+ @include focus-outline-styles($offset);
161
+ }
162
+
163
+ &:focus {
164
+ outline: none;
165
+ }
166
+ }
167
+ @mixin focus-outline-styles($offset: 2px) {
168
+ outline-offset: $offset;
169
+
170
+ animation: focus-outline-shrink 0.3s linear forwards;
171
+
172
+ @keyframes focus-outline-shrink {
173
+ from {
174
+ outline: 0 solid var(--137C);
175
+ }
176
+
177
+ to {
178
+ outline: 4px solid var(--137C);
179
+ }
180
+ }
181
+ }
182
+ @mixin focus-without-animation($offset: 2px) {
183
+ outline: 4px solid var(--137C);
184
+ outline-offset: $offset;
185
+ }
186
+ @mixin resetDefaultButtonStyles {
187
+ box-sizing: border-box;
188
+ margin: 0;
189
+ padding: 0;
190
+ border: none;
191
+ border-radius: 0;
192
+
193
+ color: inherit;
194
+ font-size: inherit;
195
+ font-family: inherit;
196
+ line-height: inherit;
197
+ text-decoration: none;
198
+
199
+ background-color: transparent;
200
+ outline: none;
201
+ cursor: pointer;
202
+
203
+ appearance: none;
204
+ -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
205
+
206
+ &:disabled {
207
+ color: inherit;
208
+
209
+ cursor: auto;
210
+ }
211
+ }