@micromag/screen-urbania-recommendation 0.3.496 → 0.3.500
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/es/index.js +11 -1
- package/lib/index.js +10 -0
- package/package.json +14 -14
package/es/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FormattedMessage, defineMessage } from 'react-intl';
|
|
1
|
+
import { useIntl, FormattedMessage, defineMessage } from 'react-intl';
|
|
2
2
|
import _objectSpread from '@babel/runtime/helpers/objectSpread2';
|
|
3
3
|
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
4
4
|
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
@@ -75,6 +75,7 @@ var UrbaniaRecommendation = function UrbaniaRecommendation(_ref) {
|
|
|
75
75
|
current = _ref.current,
|
|
76
76
|
active = _ref.active,
|
|
77
77
|
className = _ref.className;
|
|
78
|
+
var intl = useIntl();
|
|
78
79
|
var trackScreenEvent = useTrackScreenEvent();
|
|
79
80
|
var _useScreenSize = useScreenSize(),
|
|
80
81
|
width = _useScreenSize.width,
|
|
@@ -390,6 +391,15 @@ var UrbaniaRecommendation = function UrbaniaRecommendation(_ref) {
|
|
|
390
391
|
className: classNames([styles.visualButton, _defineProperty({}, styles.transitioning, visualModalTransitioning)]),
|
|
391
392
|
onClick: onClickVisual,
|
|
392
393
|
disabled: isPreview || backgroundAnimationStarted || visualModalOpened,
|
|
394
|
+
focusable: current && !isPreview && !visualModalOpened,
|
|
395
|
+
"aria-label": intl.formatMessage({
|
|
396
|
+
id: "XHO5Ua",
|
|
397
|
+
defaultMessage: [{
|
|
398
|
+
"type": 0,
|
|
399
|
+
"value": "Expand visual"
|
|
400
|
+
}]
|
|
401
|
+
}),
|
|
402
|
+
"aria-pressed": visualModalOpened,
|
|
393
403
|
style: {
|
|
394
404
|
transform: visualModalTransitioning ? "scale(".concat(width / textContainerWidth, ")") : null
|
|
395
405
|
}
|
package/lib/index.js
CHANGED
|
@@ -79,6 +79,7 @@ var UrbaniaRecommendation = function UrbaniaRecommendation(_ref) {
|
|
|
79
79
|
current = _ref.current,
|
|
80
80
|
active = _ref.active,
|
|
81
81
|
className = _ref.className;
|
|
82
|
+
var intl = reactIntl.useIntl();
|
|
82
83
|
var trackScreenEvent = hooks.useTrackScreenEvent();
|
|
83
84
|
var _useScreenSize = contexts.useScreenSize(),
|
|
84
85
|
width = _useScreenSize.width,
|
|
@@ -394,6 +395,15 @@ var UrbaniaRecommendation = function UrbaniaRecommendation(_ref) {
|
|
|
394
395
|
className: classNames([styles.visualButton, _defineProperty({}, styles.transitioning, visualModalTransitioning)]),
|
|
395
396
|
onClick: onClickVisual,
|
|
396
397
|
disabled: isPreview || backgroundAnimationStarted || visualModalOpened,
|
|
398
|
+
focusable: current && !isPreview && !visualModalOpened,
|
|
399
|
+
"aria-label": intl.formatMessage({
|
|
400
|
+
id: "XHO5Ua",
|
|
401
|
+
defaultMessage: [{
|
|
402
|
+
"type": 0,
|
|
403
|
+
"value": "Expand visual"
|
|
404
|
+
}]
|
|
405
|
+
}),
|
|
406
|
+
"aria-pressed": visualModalOpened,
|
|
397
407
|
style: {
|
|
398
408
|
transform: visualModalTransitioning ? "scale(".concat(width / textContainerWidth, ")") : null
|
|
399
409
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@micromag/screen-urbania-recommendation",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.500",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"keywords": [
|
|
@@ -61,18 +61,18 @@
|
|
|
61
61
|
},
|
|
62
62
|
"dependencies": {
|
|
63
63
|
"@babel/runtime": "^7.13.10",
|
|
64
|
-
"@micromag/core": "^0.3.
|
|
65
|
-
"@micromag/element-background": "^0.3.
|
|
66
|
-
"@micromag/element-button": "^0.3.
|
|
67
|
-
"@micromag/element-container": "^0.3.
|
|
68
|
-
"@micromag/element-footer": "^0.3.
|
|
69
|
-
"@micromag/element-header": "^0.3.
|
|
70
|
-
"@micromag/element-heading": "^0.3.
|
|
71
|
-
"@micromag/element-layout": "^0.3.
|
|
72
|
-
"@micromag/element-scroll": "^0.3.
|
|
73
|
-
"@micromag/element-text": "^0.3.
|
|
74
|
-
"@micromag/element-visual": "^0.3.
|
|
75
|
-
"@micromag/transforms": "^0.3.
|
|
64
|
+
"@micromag/core": "^0.3.497",
|
|
65
|
+
"@micromag/element-background": "^0.3.497",
|
|
66
|
+
"@micromag/element-button": "^0.3.497",
|
|
67
|
+
"@micromag/element-container": "^0.3.497",
|
|
68
|
+
"@micromag/element-footer": "^0.3.497",
|
|
69
|
+
"@micromag/element-header": "^0.3.497",
|
|
70
|
+
"@micromag/element-heading": "^0.3.497",
|
|
71
|
+
"@micromag/element-layout": "^0.3.497",
|
|
72
|
+
"@micromag/element-scroll": "^0.3.500",
|
|
73
|
+
"@micromag/element-text": "^0.3.497",
|
|
74
|
+
"@micromag/element-visual": "^0.3.497",
|
|
75
|
+
"@micromag/transforms": "^0.3.497",
|
|
76
76
|
"classnames": "^2.2.6",
|
|
77
77
|
"lodash": "^4.17.21",
|
|
78
78
|
"prop-types": "^15.7.2",
|
|
@@ -83,5 +83,5 @@
|
|
|
83
83
|
"access": "public",
|
|
84
84
|
"registry": "https://registry.npmjs.org/"
|
|
85
85
|
},
|
|
86
|
-
"gitHead": "
|
|
86
|
+
"gitHead": "ec754f9301e9fbd5c7ee1e929acb5355c732cfd6"
|
|
87
87
|
}
|