@micromag/element-call-to-action 0.3.60 → 0.3.61
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 +41 -5
- package/lib/index.js +41 -5
- package/package.json +6 -6
package/es/index.js
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
2
2
|
import _objectSpread from '@babel/runtime/helpers/objectSpread2';
|
|
3
3
|
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
4
|
-
import { faChevronUp } from '@fortawesome/free-solid-svg-icons';
|
|
5
|
-
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
|
6
4
|
import { useGesture } from '@use-gesture/react';
|
|
7
5
|
import classNames from 'classnames';
|
|
8
6
|
import PropTypes from 'prop-types';
|
|
@@ -13,6 +11,45 @@ import Button from '@micromag/element-button';
|
|
|
13
11
|
import Text from '@micromag/element-text';
|
|
14
12
|
import WebView from '@micromag/element-webview';
|
|
15
13
|
|
|
14
|
+
var propTypes$1 = {
|
|
15
|
+
color: PropTypes.string,
|
|
16
|
+
className: PropTypes.string
|
|
17
|
+
};
|
|
18
|
+
var defaultProps$1 = {
|
|
19
|
+
color: 'currentColor',
|
|
20
|
+
className: null
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
var Arrow = function Arrow(_ref) {
|
|
24
|
+
var color = _ref.color,
|
|
25
|
+
className = _ref.className;
|
|
26
|
+
return /*#__PURE__*/React.createElement("svg", {
|
|
27
|
+
version: "1.1",
|
|
28
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
29
|
+
xmlnsXlink: "http://www.w3.org/1999/xlink",
|
|
30
|
+
x: "0",
|
|
31
|
+
y: "0px",
|
|
32
|
+
width: "48.53px",
|
|
33
|
+
height: "12.38px",
|
|
34
|
+
viewBox: "0 0 48.53 12.38",
|
|
35
|
+
className: className,
|
|
36
|
+
xmlSpace: "preserve"
|
|
37
|
+
}, /*#__PURE__*/React.createElement("g", {
|
|
38
|
+
transform: "matrix(1, 0, 0, 1, 0, 0)"
|
|
39
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
40
|
+
id: "b",
|
|
41
|
+
fill: "none",
|
|
42
|
+
stroke: color,
|
|
43
|
+
strokeWidth: "3px",
|
|
44
|
+
strokeLinejoin: "round",
|
|
45
|
+
strokeLinecap: "round",
|
|
46
|
+
d: "M1.5,10.88L24.26,1.5l22.77,9.38"
|
|
47
|
+
})));
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
Arrow.propTypes = propTypes$1;
|
|
51
|
+
Arrow.defaultProps = defaultProps$1;
|
|
52
|
+
|
|
16
53
|
var styles = {"container":"micromag-element-call-to-action-container","arrow":"micromag-element-call-to-action-arrow","upAndDown":"micromag-element-call-to-action-upAndDown","icon":"micromag-element-call-to-action-icon","label":"micromag-element-call-to-action-label","button":"micromag-element-call-to-action-button","selfTargetLink":"micromag-element-call-to-action-selfTargetLink","leavingFrame":"micromag-element-call-to-action-leavingFrame","appear":"micromag-element-call-to-action-appear","animationDisabled":"micromag-element-call-to-action-animationDisabled","invalidUrl":"micromag-element-call-to-action-invalidUrl","disabled":"micromag-element-call-to-action-disabled","inWebView":"micromag-element-call-to-action-inWebView","withMargin":"micromag-element-call-to-action-withMargin","webView":"micromag-element-call-to-action-webView","visible":"micromag-element-call-to-action-visible"};
|
|
17
54
|
|
|
18
55
|
var propTypes = {
|
|
@@ -183,10 +220,9 @@ function CallToAction(_ref) {
|
|
|
183
220
|
}, [setShowWebView]);
|
|
184
221
|
var ArrowElement = arrow !== null ? /*#__PURE__*/React.createElement("div", {
|
|
185
222
|
className: classNames([styles.arrow, _defineProperty({}, arrowClassName, arrowClassName !== null)])
|
|
186
|
-
}, arrow) : /*#__PURE__*/React.createElement(
|
|
223
|
+
}, arrow) : /*#__PURE__*/React.createElement(Arrow, {
|
|
187
224
|
className: classNames([styles.arrow, _defineProperty({}, arrowClassName, arrowClassName !== null)]),
|
|
188
|
-
style: arrowStyle
|
|
189
|
-
icon: faChevronUp
|
|
225
|
+
style: arrowStyle
|
|
190
226
|
});
|
|
191
227
|
return active ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
192
228
|
className: classNames([styles.container, (_ref8 = {}, _defineProperty(_ref8, className, className !== null), _defineProperty(_ref8, styles.disabled, disabled), _defineProperty(_ref8, styles.animationDisabled, animationDisabled), _defineProperty(_ref8, styles.invalidUrl, !validUrl), _defineProperty(_ref8, styles.inWebView, inWebView), _ref8)]),
|
package/lib/index.js
CHANGED
|
@@ -3,8 +3,6 @@
|
|
|
3
3
|
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
4
4
|
var _objectSpread = require('@babel/runtime/helpers/objectSpread2');
|
|
5
5
|
var _slicedToArray = require('@babel/runtime/helpers/slicedToArray');
|
|
6
|
-
var freeSolidSvgIcons = require('@fortawesome/free-solid-svg-icons');
|
|
7
|
-
var reactFontawesome = require('@fortawesome/react-fontawesome');
|
|
8
6
|
var react = require('@use-gesture/react');
|
|
9
7
|
var classNames = require('classnames');
|
|
10
8
|
var PropTypes = require('prop-types');
|
|
@@ -27,6 +25,45 @@ var Button__default = /*#__PURE__*/_interopDefaultLegacy(Button);
|
|
|
27
25
|
var Text__default = /*#__PURE__*/_interopDefaultLegacy(Text);
|
|
28
26
|
var WebView__default = /*#__PURE__*/_interopDefaultLegacy(WebView);
|
|
29
27
|
|
|
28
|
+
var propTypes$1 = {
|
|
29
|
+
color: PropTypes__default["default"].string,
|
|
30
|
+
className: PropTypes__default["default"].string
|
|
31
|
+
};
|
|
32
|
+
var defaultProps$1 = {
|
|
33
|
+
color: 'currentColor',
|
|
34
|
+
className: null
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
var Arrow = function Arrow(_ref) {
|
|
38
|
+
var color = _ref.color,
|
|
39
|
+
className = _ref.className;
|
|
40
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
41
|
+
version: "1.1",
|
|
42
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
43
|
+
xmlnsXlink: "http://www.w3.org/1999/xlink",
|
|
44
|
+
x: "0",
|
|
45
|
+
y: "0px",
|
|
46
|
+
width: "48.53px",
|
|
47
|
+
height: "12.38px",
|
|
48
|
+
viewBox: "0 0 48.53 12.38",
|
|
49
|
+
className: className,
|
|
50
|
+
xmlSpace: "preserve"
|
|
51
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
52
|
+
transform: "matrix(1, 0, 0, 1, 0, 0)"
|
|
53
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
54
|
+
id: "b",
|
|
55
|
+
fill: "none",
|
|
56
|
+
stroke: color,
|
|
57
|
+
strokeWidth: "3px",
|
|
58
|
+
strokeLinejoin: "round",
|
|
59
|
+
strokeLinecap: "round",
|
|
60
|
+
d: "M1.5,10.88L24.26,1.5l22.77,9.38"
|
|
61
|
+
})));
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
Arrow.propTypes = propTypes$1;
|
|
65
|
+
Arrow.defaultProps = defaultProps$1;
|
|
66
|
+
|
|
30
67
|
var styles = {"container":"micromag-element-call-to-action-container","arrow":"micromag-element-call-to-action-arrow","upAndDown":"micromag-element-call-to-action-upAndDown","icon":"micromag-element-call-to-action-icon","label":"micromag-element-call-to-action-label","button":"micromag-element-call-to-action-button","selfTargetLink":"micromag-element-call-to-action-selfTargetLink","leavingFrame":"micromag-element-call-to-action-leavingFrame","appear":"micromag-element-call-to-action-appear","animationDisabled":"micromag-element-call-to-action-animationDisabled","invalidUrl":"micromag-element-call-to-action-invalidUrl","disabled":"micromag-element-call-to-action-disabled","inWebView":"micromag-element-call-to-action-inWebView","withMargin":"micromag-element-call-to-action-withMargin","webView":"micromag-element-call-to-action-webView","visible":"micromag-element-call-to-action-visible"};
|
|
31
68
|
|
|
32
69
|
var propTypes = {
|
|
@@ -197,10 +234,9 @@ function CallToAction(_ref) {
|
|
|
197
234
|
}, [setShowWebView]);
|
|
198
235
|
var ArrowElement = arrow !== null ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
199
236
|
className: classNames__default["default"]([styles.arrow, _defineProperty__default["default"]({}, arrowClassName, arrowClassName !== null)])
|
|
200
|
-
}, arrow) : /*#__PURE__*/React__default["default"].createElement(
|
|
237
|
+
}, arrow) : /*#__PURE__*/React__default["default"].createElement(Arrow, {
|
|
201
238
|
className: classNames__default["default"]([styles.arrow, _defineProperty__default["default"]({}, arrowClassName, arrowClassName !== null)]),
|
|
202
|
-
style: arrowStyle
|
|
203
|
-
icon: freeSolidSvgIcons.faChevronUp
|
|
239
|
+
style: arrowStyle
|
|
204
240
|
});
|
|
205
241
|
return active ? /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
206
242
|
className: classNames__default["default"]([styles.container, (_ref8 = {}, _defineProperty__default["default"](_ref8, className, className !== null), _defineProperty__default["default"](_ref8, styles.disabled, disabled), _defineProperty__default["default"](_ref8, styles.animationDisabled, animationDisabled), _defineProperty__default["default"](_ref8, styles.invalidUrl, !validUrl), _defineProperty__default["default"](_ref8, styles.inWebView, inWebView), _ref8)]),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@micromag/element-call-to-action",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.61",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"javascript"
|
|
@@ -52,10 +52,10 @@
|
|
|
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.3.
|
|
56
|
-
"@micromag/element-button": "^0.3.
|
|
57
|
-
"@micromag/element-text": "^0.3.
|
|
58
|
-
"@micromag/element-webview": "^0.3.
|
|
55
|
+
"@micromag/core": "^0.3.61",
|
|
56
|
+
"@micromag/element-button": "^0.3.61",
|
|
57
|
+
"@micromag/element-text": "^0.3.61",
|
|
58
|
+
"@micromag/element-webview": "^0.3.61",
|
|
59
59
|
"@react-spring/core": "^9.1.1",
|
|
60
60
|
"@react-spring/web": "^9.1.1",
|
|
61
61
|
"@use-gesture/react": "^10.2.4",
|
|
@@ -68,5 +68,5 @@
|
|
|
68
68
|
"publishConfig": {
|
|
69
69
|
"access": "public"
|
|
70
70
|
},
|
|
71
|
-
"gitHead": "
|
|
71
|
+
"gitHead": "d6066e12f37c8516f07172ea225667d28dca6434"
|
|
72
72
|
}
|