@micromag/element-call-to-action 0.2.401 → 0.2.403
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 +8 -8
- package/lib/index.js +12 -12
- package/package.json +5 -5
package/es/index.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
2
2
|
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
3
3
|
import _objectSpread from '@babel/runtime/helpers/objectSpread2';
|
|
4
|
-
import React, { useMemo, useRef, useState, useEffect } from 'react';
|
|
5
|
-
import PropTypes from 'prop-types';
|
|
6
|
-
import classNames from 'classnames';
|
|
7
|
-
import { useGesture } from 'react-use-gesture';
|
|
8
|
-
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
|
9
4
|
import { faChevronUp } from '@fortawesome/free-solid-svg-icons';
|
|
5
|
+
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
|
10
6
|
import { PropTypes as PropTypes$1 } from '@micromag/core';
|
|
11
|
-
import { isValidUrl, getStyleFromColor, isIos } from '@micromag/core/utils';
|
|
12
7
|
import { Button } from '@micromag/core/components';
|
|
8
|
+
import { isValidUrl, getStyleFromColor, isIos } from '@micromag/core/utils';
|
|
13
9
|
import Text from '@micromag/element-text';
|
|
10
|
+
import { useGesture } from '@use-gesture/react';
|
|
11
|
+
import classNames from 'classnames';
|
|
12
|
+
import PropTypes from 'prop-types';
|
|
13
|
+
import React, { useMemo, useRef, useState, useEffect } from 'react';
|
|
14
14
|
|
|
15
15
|
var styles = {"container":"micromag-element-call-to-action-container","arrow":"micromag-element-call-to-action-arrow","upAndDown":"micromag-element-call-to-action-upAndDown","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"};
|
|
16
16
|
|
|
@@ -36,7 +36,7 @@ var defaultProps = {
|
|
|
36
36
|
focusable: true
|
|
37
37
|
};
|
|
38
38
|
|
|
39
|
-
|
|
39
|
+
function CallToAction(_ref) {
|
|
40
40
|
var _ref6;
|
|
41
41
|
|
|
42
42
|
var elRef = _ref.elRef,
|
|
@@ -140,7 +140,7 @@ var CallToAction = function CallToAction(_ref) {
|
|
|
140
140
|
}, /*#__PURE__*/React.createElement(Text, Object.assign({}, label, {
|
|
141
141
|
inline: true
|
|
142
142
|
}))))) : null;
|
|
143
|
-
}
|
|
143
|
+
}
|
|
144
144
|
|
|
145
145
|
CallToAction.propTypes = propTypes;
|
|
146
146
|
CallToAction.defaultProps = defaultProps;
|
package/lib/index.js
CHANGED
|
@@ -3,26 +3,26 @@
|
|
|
3
3
|
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
4
4
|
var _slicedToArray = require('@babel/runtime/helpers/slicedToArray');
|
|
5
5
|
var _objectSpread = require('@babel/runtime/helpers/objectSpread2');
|
|
6
|
-
var React = require('react');
|
|
7
|
-
var PropTypes = require('prop-types');
|
|
8
|
-
var classNames = require('classnames');
|
|
9
|
-
var reactUseGesture = require('react-use-gesture');
|
|
10
|
-
var reactFontawesome = require('@fortawesome/react-fontawesome');
|
|
11
6
|
var freeSolidSvgIcons = require('@fortawesome/free-solid-svg-icons');
|
|
7
|
+
var reactFontawesome = require('@fortawesome/react-fontawesome');
|
|
12
8
|
var core = require('@micromag/core');
|
|
13
|
-
var utils = require('@micromag/core/utils');
|
|
14
9
|
var components = require('@micromag/core/components');
|
|
10
|
+
var utils = require('@micromag/core/utils');
|
|
15
11
|
var Text = require('@micromag/element-text');
|
|
12
|
+
var react = require('@use-gesture/react');
|
|
13
|
+
var classNames = require('classnames');
|
|
14
|
+
var PropTypes = require('prop-types');
|
|
15
|
+
var React = require('react');
|
|
16
16
|
|
|
17
17
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
18
18
|
|
|
19
19
|
var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
|
|
20
20
|
var _slicedToArray__default = /*#__PURE__*/_interopDefaultLegacy(_slicedToArray);
|
|
21
21
|
var _objectSpread__default = /*#__PURE__*/_interopDefaultLegacy(_objectSpread);
|
|
22
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
23
|
-
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
24
|
-
var classNames__default = /*#__PURE__*/_interopDefaultLegacy(classNames);
|
|
25
22
|
var Text__default = /*#__PURE__*/_interopDefaultLegacy(Text);
|
|
23
|
+
var classNames__default = /*#__PURE__*/_interopDefaultLegacy(classNames);
|
|
24
|
+
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
25
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
26
26
|
|
|
27
27
|
var styles = {"container":"micromag-element-call-to-action-container","arrow":"micromag-element-call-to-action-arrow","upAndDown":"micromag-element-call-to-action-upAndDown","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"};
|
|
28
28
|
|
|
@@ -48,7 +48,7 @@ var defaultProps = {
|
|
|
48
48
|
focusable: true
|
|
49
49
|
};
|
|
50
50
|
|
|
51
|
-
|
|
51
|
+
function CallToAction(_ref) {
|
|
52
52
|
var _ref6;
|
|
53
53
|
|
|
54
54
|
var elRef = _ref.elRef,
|
|
@@ -96,7 +96,7 @@ var CallToAction = function CallToAction(_ref) {
|
|
|
96
96
|
leaving = _useState2[0],
|
|
97
97
|
setLeaving = _useState2[1];
|
|
98
98
|
|
|
99
|
-
var bind =
|
|
99
|
+
var bind = react.useGesture({
|
|
100
100
|
onDrag: function onDrag(_ref4) {
|
|
101
101
|
var event = _ref4.event;
|
|
102
102
|
// fix firefox https://use-gesture.netlify.app/docs/faq/#why-cant-i-properly-drag-an-image-or-a-link
|
|
@@ -152,7 +152,7 @@ var CallToAction = function CallToAction(_ref) {
|
|
|
152
152
|
}, /*#__PURE__*/React__default["default"].createElement(Text__default["default"], Object.assign({}, label, {
|
|
153
153
|
inline: true
|
|
154
154
|
}))))) : null;
|
|
155
|
-
}
|
|
155
|
+
}
|
|
156
156
|
|
|
157
157
|
CallToAction.propTypes = propTypes;
|
|
158
158
|
CallToAction.defaultProps = defaultProps;
|
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.403",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"javascript"
|
|
@@ -52,19 +52,19 @@
|
|
|
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.403",
|
|
56
|
+
"@micromag/element-text": "^0.2.403",
|
|
57
57
|
"@react-spring/core": "^9.1.1",
|
|
58
58
|
"@react-spring/web": "^9.1.1",
|
|
59
|
+
"@use-gesture/react": "^10.2.4",
|
|
59
60
|
"classnames": "^2.2.6",
|
|
60
61
|
"lodash": "^4.17.21",
|
|
61
62
|
"prop-types": "^15.7.2",
|
|
62
63
|
"react-intl": "^5.12.1",
|
|
63
|
-
"react-use-gesture": "^9.0.0",
|
|
64
64
|
"uuid": "^8.3.2"
|
|
65
65
|
},
|
|
66
66
|
"publishConfig": {
|
|
67
67
|
"access": "public"
|
|
68
68
|
},
|
|
69
|
-
"gitHead": "
|
|
69
|
+
"gitHead": "7a6604651c990286e594350ef730d40772937195"
|
|
70
70
|
}
|