@micromag/element-call-to-action 0.2.301 → 0.2.315
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 +10 -5
- package/lib/index.js +10 -5
- package/package.json +4 -4
package/es/index.js
CHANGED
|
@@ -23,7 +23,8 @@ var propTypes = {
|
|
|
23
23
|
animationDisabled: PropTypes.bool,
|
|
24
24
|
callToAction: PropTypes$1.callToAction,
|
|
25
25
|
dragAmount: PropTypes.number,
|
|
26
|
-
className: PropTypes.string
|
|
26
|
+
className: PropTypes.string,
|
|
27
|
+
focusable: PropTypes.bool
|
|
27
28
|
};
|
|
28
29
|
var defaultProps = {
|
|
29
30
|
elRef: null,
|
|
@@ -31,7 +32,8 @@ var defaultProps = {
|
|
|
31
32
|
animationDisabled: false,
|
|
32
33
|
callToAction: null,
|
|
33
34
|
dragAmount: 50,
|
|
34
|
-
className: null
|
|
35
|
+
className: null,
|
|
36
|
+
focusable: true
|
|
35
37
|
};
|
|
36
38
|
|
|
37
39
|
var CallToAction = function CallToAction(_ref) {
|
|
@@ -42,7 +44,8 @@ var CallToAction = function CallToAction(_ref) {
|
|
|
42
44
|
animationDisabled = _ref.animationDisabled,
|
|
43
45
|
callToAction = _ref.callToAction,
|
|
44
46
|
dragAmount = _ref.dragAmount,
|
|
45
|
-
className = _ref.className
|
|
47
|
+
className = _ref.className,
|
|
48
|
+
focusable = _ref.focusable;
|
|
46
49
|
|
|
47
50
|
var _ref2 = callToAction || {},
|
|
48
51
|
_ref2$active = _ref2.active,
|
|
@@ -119,13 +122,15 @@ var CallToAction = function CallToAction(_ref) {
|
|
|
119
122
|
}) : null, /*#__PURE__*/React.createElement("a", {
|
|
120
123
|
className: styles.selfTargetLink,
|
|
121
124
|
href: url,
|
|
122
|
-
ref: selfTargetLinkRef
|
|
125
|
+
ref: selfTargetLinkRef,
|
|
126
|
+
tabIndex: focusable ? '0' : '-1'
|
|
123
127
|
}), /*#__PURE__*/React.createElement(Button, Object.assign({
|
|
124
128
|
href: url,
|
|
125
129
|
external: true,
|
|
126
130
|
className: styles.button,
|
|
127
131
|
withoutStyle: true,
|
|
128
|
-
refButton: buttonRef
|
|
132
|
+
refButton: buttonRef,
|
|
133
|
+
focusable: focusable
|
|
129
134
|
}, swipeUpEnabled && !disabled ? bind() : null), swipeUpEnabled ? /*#__PURE__*/React.createElement(FontAwesomeIcon, {
|
|
130
135
|
className: styles.arrow,
|
|
131
136
|
style: arrowStyle,
|
package/lib/index.js
CHANGED
|
@@ -35,7 +35,8 @@ var propTypes = {
|
|
|
35
35
|
animationDisabled: PropTypes__default['default'].bool,
|
|
36
36
|
callToAction: core.PropTypes.callToAction,
|
|
37
37
|
dragAmount: PropTypes__default['default'].number,
|
|
38
|
-
className: PropTypes__default['default'].string
|
|
38
|
+
className: PropTypes__default['default'].string,
|
|
39
|
+
focusable: PropTypes__default['default'].bool
|
|
39
40
|
};
|
|
40
41
|
var defaultProps = {
|
|
41
42
|
elRef: null,
|
|
@@ -43,7 +44,8 @@ var defaultProps = {
|
|
|
43
44
|
animationDisabled: false,
|
|
44
45
|
callToAction: null,
|
|
45
46
|
dragAmount: 50,
|
|
46
|
-
className: null
|
|
47
|
+
className: null,
|
|
48
|
+
focusable: true
|
|
47
49
|
};
|
|
48
50
|
|
|
49
51
|
var CallToAction = function CallToAction(_ref) {
|
|
@@ -54,7 +56,8 @@ var CallToAction = function CallToAction(_ref) {
|
|
|
54
56
|
animationDisabled = _ref.animationDisabled,
|
|
55
57
|
callToAction = _ref.callToAction,
|
|
56
58
|
dragAmount = _ref.dragAmount,
|
|
57
|
-
className = _ref.className
|
|
59
|
+
className = _ref.className,
|
|
60
|
+
focusable = _ref.focusable;
|
|
58
61
|
|
|
59
62
|
var _ref2 = callToAction || {},
|
|
60
63
|
_ref2$active = _ref2.active,
|
|
@@ -131,13 +134,15 @@ var CallToAction = function CallToAction(_ref) {
|
|
|
131
134
|
}) : null, /*#__PURE__*/React__default['default'].createElement("a", {
|
|
132
135
|
className: styles.selfTargetLink,
|
|
133
136
|
href: url,
|
|
134
|
-
ref: selfTargetLinkRef
|
|
137
|
+
ref: selfTargetLinkRef,
|
|
138
|
+
tabIndex: focusable ? '0' : '-1'
|
|
135
139
|
}), /*#__PURE__*/React__default['default'].createElement(components.Button, Object.assign({
|
|
136
140
|
href: url,
|
|
137
141
|
external: true,
|
|
138
142
|
className: styles.button,
|
|
139
143
|
withoutStyle: true,
|
|
140
|
-
refButton: buttonRef
|
|
144
|
+
refButton: buttonRef,
|
|
145
|
+
focusable: focusable
|
|
141
146
|
}, swipeUpEnabled && !disabled ? bind() : null), swipeUpEnabled ? /*#__PURE__*/React__default['default'].createElement(reactFontawesome.FontAwesomeIcon, {
|
|
142
147
|
className: styles.arrow,
|
|
143
148
|
style: arrowStyle,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@micromag/element-call-to-action",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.315",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"javascript"
|
|
@@ -52,8 +52,8 @@
|
|
|
52
52
|
"@fortawesome/fontawesome-svg-core": "^1.2.32",
|
|
53
53
|
"@fortawesome/free-solid-svg-icons": "^5.15.1",
|
|
54
54
|
"@fortawesome/react-fontawesome": "^0.1.13",
|
|
55
|
-
"@micromag/core": "^0.2.
|
|
56
|
-
"@micromag/element-text": "^0.2.
|
|
55
|
+
"@micromag/core": "^0.2.315",
|
|
56
|
+
"@micromag/element-text": "^0.2.315",
|
|
57
57
|
"@react-spring/core": "^9.1.1",
|
|
58
58
|
"@react-spring/web": "^9.1.1",
|
|
59
59
|
"classnames": "^2.2.6",
|
|
@@ -66,5 +66,5 @@
|
|
|
66
66
|
"publishConfig": {
|
|
67
67
|
"access": "public"
|
|
68
68
|
},
|
|
69
|
-
"gitHead": "
|
|
69
|
+
"gitHead": "a08edd143bdd81de6477f637e08046e0130da237"
|
|
70
70
|
}
|