@cloudflare/component-arrow-swivel
Advanced tools
Comparing version 3.0.57 to 4.0.0
@@ -5,37 +5,43 @@ import * as React from 'react'; | ||
import { createComponent } from '@cloudflare/style-container'; | ||
const CaretIconWrapper = createComponent(({ | ||
isActive, | ||
startAngle, | ||
endAngle, | ||
duration | ||
}) => ({ | ||
position: 'relative', | ||
top: '0.2rem', | ||
display: 'inline-block', | ||
'& svg': { | ||
transform: `rotate(${isActive ? endAngle : startAngle}deg)`, | ||
transition: `transform ${duration}ms ease` | ||
} | ||
}), 'span'); | ||
var CaretIconWrapper = createComponent(_ref => { | ||
var { | ||
isActive, | ||
startAngle, | ||
endAngle, | ||
duration | ||
} = _ref; | ||
return { | ||
position: 'relative', | ||
top: '0.2rem', | ||
display: 'inline-block', | ||
'& svg': { | ||
transform: "rotate(".concat(isActive ? endAngle : startAngle, "deg)"), | ||
transition: "transform ".concat(duration, "ms ease") | ||
} | ||
}; | ||
}, 'span'); | ||
const ArrowSwivel = ({ | ||
onClick, | ||
isActive = false, | ||
startAngle = 0, | ||
endAngle = 90, | ||
duration = 200, | ||
color = 'blue.4', | ||
size | ||
}) => /*#__PURE__*/React.createElement(CaretIconWrapper, { | ||
startAngle: startAngle, | ||
endAngle: endAngle, | ||
onClick: onClick, | ||
isActive: isActive, | ||
duration: duration | ||
}, /*#__PURE__*/React.createElement(Icon, { | ||
label: "caret-right", | ||
type: "caret-right", | ||
color: color, | ||
size: size | ||
})); | ||
var ArrowSwivel = _ref2 => { | ||
var { | ||
onClick, | ||
isActive = false, | ||
startAngle = 0, | ||
endAngle = 90, | ||
duration = 200, | ||
color = 'blue.4', | ||
size | ||
} = _ref2; | ||
return /*#__PURE__*/React.createElement(CaretIconWrapper, { | ||
startAngle: startAngle, | ||
endAngle: endAngle, | ||
onClick: onClick, | ||
isActive: isActive, | ||
duration: duration | ||
}, /*#__PURE__*/React.createElement(Icon, { | ||
label: "caret-right", | ||
type: "caret-right", | ||
color: color, | ||
size: size | ||
})); | ||
}; | ||
@@ -42,0 +48,0 @@ ArrowSwivel.propTypes = { |
import ArrowSwivelUnstyled from './ArrowSwivel'; | ||
import ArrowSwivelTheme from './ArrowSwivelTheme'; | ||
import { applyTheme } from '@cloudflare/style-container'; | ||
const ArrowSwivel = applyTheme(ArrowSwivelUnstyled, ArrowSwivelTheme); | ||
var ArrowSwivel = applyTheme(ArrowSwivelUnstyled, ArrowSwivelTheme); | ||
export { ArrowSwivel, ArrowSwivelUnstyled, ArrowSwivelTheme }; |
"use strict"; | ||
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); } | ||
@@ -20,5 +20,5 @@ Object.defineProperty(exports, "__esModule", { | ||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } | ||
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | ||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } | ||
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } | ||
@@ -25,0 +25,0 @@ var CaretIconWrapper = (0, _styleContainer.createComponent)(function (_ref) { |
@@ -6,15 +6,15 @@ "use strict"; | ||
}); | ||
Object.defineProperty(exports, "ArrowSwivelUnstyled", { | ||
exports.ArrowSwivel = void 0; | ||
Object.defineProperty(exports, "ArrowSwivelTheme", { | ||
enumerable: true, | ||
get: function get() { | ||
return _ArrowSwivel.default; | ||
return _ArrowSwivelTheme.default; | ||
} | ||
}); | ||
Object.defineProperty(exports, "ArrowSwivelTheme", { | ||
Object.defineProperty(exports, "ArrowSwivelUnstyled", { | ||
enumerable: true, | ||
get: function get() { | ||
return _ArrowSwivelTheme.default; | ||
return _ArrowSwivel.default; | ||
} | ||
}); | ||
exports.ArrowSwivel = void 0; | ||
@@ -21,0 +21,0 @@ var _ArrowSwivel = _interopRequireDefault(require("./ArrowSwivel")); |
{ | ||
"name": "@cloudflare/component-arrow-swivel", | ||
"description": "", | ||
"version": "3.0.57", | ||
"version": "4.0.0", | ||
"main": "lib/index.js", | ||
@@ -11,11 +11,12 @@ "module": "es/index.js", | ||
"publishConfig": { | ||
"registry": "https://registry.npmjs.org/", | ||
"access": "public" | ||
"access": "public", | ||
"main": "lib/index.js", | ||
"module": "es/index.js" | ||
}, | ||
"dependencies": { | ||
"@cloudflare/component-icon": "^7.2.25", | ||
"@cloudflare/style-container": "^7.8.46", | ||
"@cloudflare/component-icon": "^8.0.0", | ||
"prop-types": "^15.6.0" | ||
}, | ||
"peerDependencies": { | ||
"@cloudflare/style-container": "^7.9.0", | ||
"react": "^15.0.0-0 || ^16.0.0-0 || ^17.0.0-0" | ||
@@ -33,4 +34,3 @@ }, | ||
"test-watch": "stratus test --watch" | ||
}, | ||
"gitHead": "db9637310d476ef91a50177d026526ca40cb9330" | ||
} | ||
} | ||
} |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
192
155593
+ Added@cloudflare/component-icon@8.0.0(transitive)
- Removed@cloudflare/style-container@^7.8.46
- Removed@cloudflare/component-icon@7.2.25(transitive)