Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cf-component-icon

Package Overview
Dependencies
Maintainers
16
Versions
70
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cf-component-icon - npm Package Compare versions

Comparing version 2.2.1 to 2.2.2

44

dist/cf-component-icon.js

@@ -14,10 +14,10 @@ (function webpackUniversalModuleDefinition(root, factory) {

/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId])
/******/ return installedModules[moduleId].exports;
/******/
/******/ // Create a new module (and put it into the cache)

@@ -29,23 +29,23 @@ /******/ var module = installedModules[moduleId] = {

/******/ };
/******/
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ // Flag the module as loaded
/******/ module.l = true;
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/
/******/ // identity function for calling harmony imports with the correct context
/******/ __webpack_require__.i = function(value) { return value; };
/******/
/******/ // define getter function for harmony exports

@@ -61,3 +61,3 @@ /******/ __webpack_require__.d = function(exports, name, getter) {

/******/ };
/******/
/******/ // getDefaultExport function for compatibility with non-harmony modules

@@ -71,11 +71,11 @@ /******/ __webpack_require__.n = function(module) {

/******/ };
/******/
/******/ // Object.prototype.hasOwnProperty.call
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "";
/******/
/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = 86);
/******/ return __webpack_require__(__webpack_require__.s = 49);
/******/ })

@@ -92,3 +92,3 @@ /************************************************************************/

/***/ 52:
/***/ 26:
/***/ (function(module, exports, __webpack_require__) {

@@ -108,3 +108,3 @@

/***/ 85:
/***/ 48:
/***/ (function(module, exports, __webpack_require__) {

@@ -125,3 +125,3 @@

var _options = __webpack_require__(52);
var _options = __webpack_require__(26);

@@ -189,3 +189,3 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

/***/ 86:
/***/ 49:
/***/ (function(module, exports, __webpack_require__) {

@@ -201,7 +201,7 @@

var _Icon = __webpack_require__(85);
var _Icon = __webpack_require__(48);
var _Icon2 = _interopRequireDefault(_Icon);
var _options = __webpack_require__(52);
var _options = __webpack_require__(26);

@@ -208,0 +208,0 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

@@ -1,1 +0,1 @@

!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("react"));else if("function"==typeof define&&define.amd)define(["react"],t);else{var r=t("object"==typeof exports?require("react"):e.React);for(var o in r)("object"==typeof exports?exports:e)[o]=r[o]}}(this,function(e){return function(e){function t(o){if(r[o])return r[o].exports;var n=r[o]={i:o,l:!1,exports:{}};return e[o].call(n.exports,n,n.exports,t),n.l=!0,n.exports}var r={};return t.m=e,t.c=r,t.i=function(e){return e},t.d=function(e,r,o){t.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:o})},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=86)}({0:function(t,r){t.exports=e},52:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.TYPES="caret-up chevron-up caret-down chevron-down caret-left chevron-left caret-right chevron-right ok-sign exclamation-sign info-sign pause time ok clipboard bolt chart drive filter flowchart hamburger lock list file shield plus happy sad search wrench remove remove-sign speech gear help widen calendar facebook twitter googleplus linkedin resize-horizontal upload loading close".split(" "),t.SIZES="2x 3x 4x large xlarge".split(" ")},85:function(e,t,r){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function p(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,r,o){return r&&e(t.prototype,r),o&&e(t,o),t}}(),c=r(0),u=o(c),l=r(52),a=function(e){function t(){return n(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return p(t,e),s(t,[{key:"render",value:function(){var e="cf-icon cf-icon--"+this.props.type;return this.props.size&&(e+=" cf-icon--"+this.props.size),this.props.border&&(e+=" cf-icon--border"),this.props.spin&&(e+=" cf-icon--spin"),this.props.muted&&(e+=" cf-icon--muted"),this.props.white&&(e+=" cf-icon--white"),u.default.createElement("i",{className:e,role:this.props.role},this.props.label&&u.default.createElement("span",{className:"cf-icon__label"},this.props.label))}}]),t}(u.default.Component);a.propTypes={label:c.PropTypes.oneOfType([c.PropTypes.string,c.PropTypes.oneOf([!1])]).isRequired,type:c.PropTypes.oneOf(l.TYPES).isRequired,size:c.PropTypes.oneOf(l.SIZES),border:c.PropTypes.bool,spin:c.PropTypes.bool,muted:c.PropTypes.bool,white:c.PropTypes.bool,role:c.PropTypes.string},t.default=a},86:function(e,t,r){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.SIZES=t.TYPES=void 0;var n=r(85),i=o(n),p=r(52);t.TYPES=p.TYPES,t.SIZES=p.SIZES,t.default=i.default}})});
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("react"));else if("function"==typeof define&&define.amd)define(["react"],t);else{var r=t("object"==typeof exports?require("react"):e.React);for(var o in r)("object"==typeof exports?exports:e)[o]=r[o]}}(this,function(e){return function(e){function t(o){if(r[o])return r[o].exports;var n=r[o]={i:o,l:!1,exports:{}};return e[o].call(n.exports,n,n.exports,t),n.l=!0,n.exports}var r={};return t.m=e,t.c=r,t.i=function(e){return e},t.d=function(e,r,o){t.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:o})},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=49)}({0:function(t,r){t.exports=e},26:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.TYPES="caret-up chevron-up caret-down chevron-down caret-left chevron-left caret-right chevron-right ok-sign exclamation-sign info-sign pause time ok clipboard bolt chart drive filter flowchart hamburger lock list file shield plus happy sad search wrench remove remove-sign speech gear help widen calendar facebook twitter googleplus linkedin resize-horizontal upload loading close".split(" "),t.SIZES="2x 3x 4x large xlarge".split(" ")},48:function(e,t,r){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function p(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,r,o){return r&&e(t.prototype,r),o&&e(t,o),t}}(),c=r(0),u=o(c),l=r(26),a=function(e){function t(){return n(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return p(t,e),s(t,[{key:"render",value:function(){var e="cf-icon cf-icon--"+this.props.type;return this.props.size&&(e+=" cf-icon--"+this.props.size),this.props.border&&(e+=" cf-icon--border"),this.props.spin&&(e+=" cf-icon--spin"),this.props.muted&&(e+=" cf-icon--muted"),this.props.white&&(e+=" cf-icon--white"),u.default.createElement("i",{className:e,role:this.props.role},this.props.label&&u.default.createElement("span",{className:"cf-icon__label"},this.props.label))}}]),t}(u.default.Component);a.propTypes={label:c.PropTypes.oneOfType([c.PropTypes.string,c.PropTypes.oneOf([!1])]).isRequired,type:c.PropTypes.oneOf(l.TYPES).isRequired,size:c.PropTypes.oneOf(l.SIZES),border:c.PropTypes.bool,spin:c.PropTypes.bool,muted:c.PropTypes.bool,white:c.PropTypes.bool,role:c.PropTypes.string},t.default=a},49:function(e,t,r){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.SIZES=t.TYPES=void 0;var n=r(48),i=o(n),p=r(26);t.TYPES=p.TYPES,t.SIZES=p.SIZES,t.default=i.default}})});

@@ -11,3 +11,2 @@ var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

import PropTypes from 'prop-types';
import { TYPES, SIZES } from './options';

@@ -54,4 +53,4 @@ var Icon = function (_React$Component) {

label: PropTypes.oneOfType([PropTypes.string, PropTypes.oneOf([false])]).isRequired,
type: PropTypes.oneOf(TYPES).isRequired,
size: PropTypes.oneOf(SIZES),
type: PropTypes.oneOf(['bolt', 'calendar', 'caret-down', 'caret-left', 'caret-right', 'caret-up', 'chart', 'chevron-down', 'chevron-left', 'chevron-right', 'chevron-up', 'clipboard', 'close', 'drive', 'exclamation-sign', 'facebook', 'file', 'filter', 'flowchart', 'gear', 'googleplus', 'hamburger', 'happy', 'help', 'info-sign', 'linkedin', 'list', 'loading', 'lock', 'ok', 'ok-sign', 'pause', 'plus', 'refresh', 'remove', 'remove-sign', 'resize-horizontal', 'sad', 'search', 'shield', 'speech', 'time', 'twitter', 'upload', 'widen', 'wrench']).isRequired,
size: PropTypes.oneOf(['2x', '3x', '4x', 'large', 'xlarge']),
border: PropTypes.bool,

@@ -58,0 +57,0 @@ spin: PropTypes.bool,

import Icon from './Icon';
import { TYPES, SIZES } from './options';
export { TYPES, SIZES };
export default Icon;

@@ -17,4 +17,2 @@ 'use strict';

var _options = require('./options');
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

@@ -68,4 +66,4 @@

label: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.oneOf([false])]).isRequired,
type: _propTypes2.default.oneOf(_options.TYPES).isRequired,
size: _propTypes2.default.oneOf(_options.SIZES),
type: _propTypes2.default.oneOf(['bolt', 'calendar', 'caret-down', 'caret-left', 'caret-right', 'caret-up', 'chart', 'chevron-down', 'chevron-left', 'chevron-right', 'chevron-up', 'clipboard', 'close', 'drive', 'exclamation-sign', 'facebook', 'file', 'filter', 'flowchart', 'gear', 'googleplus', 'hamburger', 'happy', 'help', 'info-sign', 'linkedin', 'list', 'loading', 'lock', 'ok', 'ok-sign', 'pause', 'plus', 'refresh', 'remove', 'remove-sign', 'resize-horizontal', 'sad', 'search', 'shield', 'speech', 'time', 'twitter', 'upload', 'widen', 'wrench']).isRequired,
size: _propTypes2.default.oneOf(['2x', '3x', '4x', 'large', 'xlarge']),
border: _propTypes2.default.bool,

@@ -72,0 +70,0 @@ spin: _propTypes2.default.bool,

@@ -6,3 +6,2 @@ 'use strict';

});
exports.SIZES = exports.TYPES = undefined;

@@ -13,8 +12,4 @@ var _Icon = require('./Icon');

var _options = require('./options');
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
exports.TYPES = _options.TYPES;
exports.SIZES = _options.SIZES;
exports.default = _Icon2.default;
{
"name": "cf-component-icon",
"description": "Cloudflare Icon Component",
"version": "2.2.1",
"version": "2.2.2",
"main": "lib/index.js",

@@ -6,0 +6,0 @@ "module": "es/index.js",

@@ -15,3 +15,3 @@ # cf-component-icon

import React from 'react';
import Icon, { TYPES, SIZES } from 'cf-component-icon';
import Icon from 'cf-component-icon';

@@ -22,3 +22,48 @@ const IconComponent = () => (

<p>
{TYPES.map(type => <Icon label={type} type={type} key={type} />)}
<Icon label="bolt" type="bolt" />
<Icon label="calendar" type="calendar" />
<Icon label="caret-down" type="caret-down" />
<Icon label="caret-left" type="caret-left" />
<Icon label="caret-right" type="caret-right" />
<Icon label="caret-up" type="caret-up" />
<Icon label="chart" type="chart" />
<Icon label="chevron-down" type="chevron-down" />
<Icon label="chevron-left" type="chevron-left" />
<Icon label="chevron-right" type="chevron-right" />
<Icon label="chevron-up" type="chevron-up" />
<Icon label="clipboard" type="clipboard" />
<Icon label="close" type="close" />
<Icon label="drive" type="drive" />
<Icon label="exclamation-sign" type="exclamation-sign" />
<Icon label="facebook" type="facebook" />
<Icon label="file" type="file" />
<Icon label="filter" type="filter" />
<Icon label="flowchart" type="flowchart" />
<Icon label="gear" type="gear" />
<Icon label="googleplus" type="googleplus" />
<Icon label="hamburger" type="hamburger" />
<Icon label="happy" type="happy" />
<Icon label="help" type="help" />
<Icon label="info-sign" type="info-sign" />
<Icon label="linkedin" type="linkedin" />
<Icon label="list" type="list" />
<Icon label="loading" type="loading" />
<Icon label="lock" type="lock" />
<Icon label="ok" type="ok" />
<Icon label="ok-sign" type="ok-sign" />
<Icon label="pause" type="pause" />
<Icon label="plus" type="plus" />
<Icon label="refresh" type="refresh" />
<Icon label="remove" type="remove" />
<Icon label="remove-sign" type="remove-sign" />
<Icon label="resize-horizontal" type="resize-horizontal" />
<Icon label="sad" type="sad" />
<Icon label="search" type="search" />
<Icon label="shield" type="shield" />
<Icon label="speech" type="speech" />
<Icon label="time" type="time" />
<Icon label="twitter" type="twitter" />
<Icon label="upload" type="upload" />
<Icon label="widen" type="widen" />
<Icon label="wrench" type="wrench" />
</p>

@@ -28,5 +73,7 @@

<p>
{SIZES.map(size => (
<Icon label={size} type="gear" size={size} key={size} />
))}
<Icon label="2x" type="gear" />
<Icon label="3x" type="gear" />
<Icon label="4x" type="gear" />
<Icon label="large" type="gear" />
<Icon label="xlarge" type="gear" />
</p>

@@ -33,0 +80,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc