New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@ant-design/icons-react

Package Overview
Dependencies
Maintainers
3
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ant-design/icons-react - npm Package Compare versions

Comparing version 1.0.0-alpha.6 to 1.0.0-alpha.7

4

es/components/Icon.d.ts

@@ -21,4 +21,4 @@ import { IconDefinition, IconDefinitionGetter } from '@ant-design/icons/lib/types';

static displayName: string;
static definitions: MiniMap<IconDefinition>;
static add(...icons: IconDefinition[]): void;
static definitions: MiniMap<IconDefinition | IconDefinitionGetter>;
static add(...icons: Array<IconDefinition | IconDefinitionGetter>): void;
static clear(): void;

@@ -25,0 +25,0 @@ static get(key?: string, colors?: TwoToneColorPalette): IconDefinition | undefined;

@@ -8,3 +8,3 @@ import _extends from 'babel-runtime/helpers/extends';

import * as React from 'react';
import { generate, getIconNameAccordingToSuffix, getSecondaryColor, isIconDefinition, isIconDefinitionGetter, log, MiniMap } from '../utils';
import { generate, getSecondaryColor, isIconDefinition, isIconDefinitionGetter, log, MiniMap } from '../utils';
var twoToneColorPalette = {

@@ -50,3 +50,3 @@ primaryColor: '#333',

} else if (typeof type === 'string') {
target = Icon.get(getIconNameAccordingToSuffix(type), colors);
target = Icon.get(type, colors);
if (!target) {

@@ -53,0 +53,0 @@ log('Could not find icon: ' + type);

@@ -21,3 +21,2 @@ import { AbstractNode, IconDefinition, IconDefinitionGetter } from '@ant-design/icons/lib/types';

} | false): any;
export declare function getIconNameAccordingToSuffix(type: string): string | undefined;
export declare function getSecondaryColor(primaryColor: string): string;
import _extends from 'babel-runtime/helpers/extends';
import _classCallCheck from 'babel-runtime/helpers/classCallCheck';
import _createClass from 'babel-runtime/helpers/createClass';
import mapper from '@ant-design/icons/lib/mapNameToThemedName';
import { generate as generateColor } from 'ant-design-palettes';

@@ -88,10 +87,2 @@ import * as React from 'react';

}
var suffixTests = /(-o|-fill|-twotone)$/;
export function getIconNameAccordingToSuffix(type) {
if (suffixTests.test(type)) {
return type;
}
// use mapper from '@ant-design/icons/lib/mapNameToThemedName'
return mapper[type];
}
export function getSecondaryColor(primaryColor) {

@@ -98,0 +89,0 @@ // choose the second color

@@ -21,4 +21,4 @@ import { IconDefinition, IconDefinitionGetter } from '@ant-design/icons/lib/types';

static displayName: string;
static definitions: MiniMap<IconDefinition>;
static add(...icons: IconDefinition[]): void;
static definitions: MiniMap<IconDefinition | IconDefinitionGetter>;
static add(...icons: Array<IconDefinition | IconDefinitionGetter>): void;
static clear(): void;

@@ -25,0 +25,0 @@ static get(key?: string, colors?: TwoToneColorPalette): IconDefinition | undefined;

@@ -80,3 +80,3 @@ 'use strict';

} else if (typeof type === 'string') {
target = Icon.get((0, _utils.getIconNameAccordingToSuffix)(type), colors);
target = Icon.get(type, colors);
if (!target) {

@@ -83,0 +83,0 @@ (0, _utils.log)('Could not find icon: ' + type);

@@ -21,3 +21,2 @@ import { AbstractNode, IconDefinition, IconDefinitionGetter } from '@ant-design/icons/lib/types';

} | false): any;
export declare function getIconNameAccordingToSuffix(type: string): string | undefined;
export declare function getSecondaryColor(primaryColor: string): string;

@@ -25,9 +25,4 @@ 'use strict';

exports.generate = generate;
exports.getIconNameAccordingToSuffix = getIconNameAccordingToSuffix;
exports.getSecondaryColor = getSecondaryColor;
var _mapNameToThemedName = require('@ant-design/icons/lib/mapNameToThemedName');
var _mapNameToThemedName2 = _interopRequireDefault(_mapNameToThemedName);
var _antDesignPalettes = require('ant-design-palettes');

@@ -125,10 +120,2 @@

}
var suffixTests = /(-o|-fill|-twotone)$/;
function getIconNameAccordingToSuffix(type) {
if (suffixTests.test(type)) {
return type;
}
// use mapper from '@ant-design/icons/lib/mapNameToThemedName'
return _mapNameToThemedName2['default'][type];
}
function getSecondaryColor(primaryColor) {

@@ -135,0 +122,0 @@ // choose the second color

{
"name": "@ant-design/icons-react",
"version": "1.0.0-alpha.6",
"version": "1.0.0-alpha.7",
"main": "./lib/index.js",

@@ -39,2 +39,4 @@ "module": "./es/index.js",

"jest": "^23.4.2",
"mobx": "^5.1.0",
"mobx-react": "^5.2.5",
"rc-tools": "^8.1.6",

@@ -47,3 +49,3 @@ "react": "^16.4.2",

"tslint-react": "^3.6.0",
"typescript": "^2.9.2"
"typescript": "^3.0.3"
},

@@ -50,0 +52,0 @@ "dependencies": {

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