@ant-design/icons 5.2.5 → 5.2.6-alpha.0
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/dist/index.umd.js +2608 -3334
- package/dist/index.umd.min.js +1 -1
- package/es/components/AntdIcon.d.ts +2 -1
- package/es/components/IconBase.d.ts +1 -1
- package/es/components/IconFont.d.ts +2 -4
- package/es/utils.d.ts +2 -6
- package/es/utils.js +5 -1
- package/lib/components/AntdIcon.d.ts +2 -1
- package/lib/components/IconBase.d.ts +1 -1
- package/lib/components/IconFont.d.ts +2 -4
- package/lib/index.js +1 -1
- package/lib/utils.d.ts +2 -6
- package/lib/utils.js +6 -2
- package/package.json +2 -2
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import type { IconDefinition } from '@ant-design/icons-svg/lib/types';
|
|
3
3
|
import type { IconBaseProps } from './Icon';
|
|
4
|
-
import { getTwoToneColor,
|
|
4
|
+
import { getTwoToneColor, setTwoToneColor } from './twoTonePrimaryColor';
|
|
5
|
+
import type { TwoToneColor } from './twoTonePrimaryColor';
|
|
5
6
|
export interface AntdIconProps extends IconBaseProps {
|
|
6
7
|
twoToneColor?: TwoToneColor;
|
|
7
8
|
}
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { IconBaseProps } from './Icon';
|
|
2
|
+
import type { IconBaseProps } from './Icon';
|
|
3
3
|
export interface CustomIconOptions {
|
|
4
4
|
scriptUrl?: string | string[];
|
|
5
|
-
extraCommonProps?:
|
|
6
|
-
[key: string]: any;
|
|
7
|
-
};
|
|
5
|
+
extraCommonProps?: Record<string, unknown>;
|
|
8
6
|
}
|
|
9
7
|
export interface IconFontProps<T extends string = string> extends IconBaseProps {
|
|
10
8
|
type: T;
|
package/es/utils.d.ts
CHANGED
|
@@ -3,12 +3,8 @@ import React from 'react';
|
|
|
3
3
|
export declare function warning(valid: boolean, message: string): void;
|
|
4
4
|
export declare function isIconDefinition(target: any): target is IconDefinition;
|
|
5
5
|
export declare function normalizeAttrs(attrs?: Attrs): Attrs;
|
|
6
|
-
export
|
|
7
|
-
|
|
8
|
-
}
|
|
9
|
-
export declare function generate(node: AbstractNode, key: string, rootProps?: {
|
|
10
|
-
[key: string]: any;
|
|
11
|
-
} | false): any;
|
|
6
|
+
export type Attrs = Record<string, string>;
|
|
7
|
+
export declare function generate(node: AbstractNode, key: string, rootProps?: Record<string, string> | false): any;
|
|
12
8
|
export declare function getSecondaryColor(primaryColor: string): string;
|
|
13
9
|
export declare function normalizeTwoToneColors(twoToneColor: string | [string, string] | undefined): string[];
|
|
14
10
|
export declare const svgBaseProps: {
|
package/es/utils.js
CHANGED
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
2
|
import _typeof from "@babel/runtime/helpers/esm/typeof";
|
|
3
3
|
import { generate as generateColor } from '@ant-design/colors';
|
|
4
|
-
import camelCase from 'lodash.camelcase';
|
|
5
4
|
import { updateCSS } from "rc-util/es/Dom/dynamicCSS";
|
|
6
5
|
import { getShadowRoot } from "rc-util/es/Dom/shadow";
|
|
7
6
|
import warn from "rc-util/es/warning";
|
|
8
7
|
import React, { useContext, useEffect } from 'react';
|
|
9
8
|
import IconContext from "./components/Context";
|
|
9
|
+
function camelCase(input) {
|
|
10
|
+
return input.replace(/-(.)/g, function (match, g) {
|
|
11
|
+
return g.toUpperCase();
|
|
12
|
+
});
|
|
13
|
+
}
|
|
10
14
|
export function warning(valid, message) {
|
|
11
15
|
warn(valid, "[@ant-design/icons] ".concat(message));
|
|
12
16
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import type { IconDefinition } from '@ant-design/icons-svg/lib/types';
|
|
3
3
|
import type { IconBaseProps } from './Icon';
|
|
4
|
-
import { getTwoToneColor,
|
|
4
|
+
import { getTwoToneColor, setTwoToneColor } from './twoTonePrimaryColor';
|
|
5
|
+
import type { TwoToneColor } from './twoTonePrimaryColor';
|
|
5
6
|
export interface AntdIconProps extends IconBaseProps {
|
|
6
7
|
twoToneColor?: TwoToneColor;
|
|
7
8
|
}
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { IconBaseProps } from './Icon';
|
|
2
|
+
import type { IconBaseProps } from './Icon';
|
|
3
3
|
export interface CustomIconOptions {
|
|
4
4
|
scriptUrl?: string | string[];
|
|
5
|
-
extraCommonProps?:
|
|
6
|
-
[key: string]: any;
|
|
7
|
-
};
|
|
5
|
+
extraCommonProps?: Record<string, unknown>;
|
|
8
6
|
}
|
|
9
7
|
export interface IconFontProps<T extends string = string> extends IconBaseProps {
|
|
10
8
|
type: T;
|
package/lib/index.js
CHANGED
|
@@ -20,7 +20,7 @@ _export(exports, {
|
|
|
20
20
|
}
|
|
21
21
|
});
|
|
22
22
|
var _Context = /*#__PURE__*/ _interop_require_default(require("./components/Context"));
|
|
23
|
-
_export_star(require("./icons/index"), exports);
|
|
23
|
+
_export_star(require("./icons/index.js"), exports);
|
|
24
24
|
_export_star(require("./components/twoTonePrimaryColor"), exports);
|
|
25
25
|
var _IconFont = /*#__PURE__*/ _interop_require_default(require("./components/IconFont"));
|
|
26
26
|
var _Icon = /*#__PURE__*/ _interop_require_default(require("./components/Icon"));
|
package/lib/utils.d.ts
CHANGED
|
@@ -3,12 +3,8 @@ import React from 'react';
|
|
|
3
3
|
export declare function warning(valid: boolean, message: string): void;
|
|
4
4
|
export declare function isIconDefinition(target: any): target is IconDefinition;
|
|
5
5
|
export declare function normalizeAttrs(attrs?: Attrs): Attrs;
|
|
6
|
-
export
|
|
7
|
-
|
|
8
|
-
}
|
|
9
|
-
export declare function generate(node: AbstractNode, key: string, rootProps?: {
|
|
10
|
-
[key: string]: any;
|
|
11
|
-
} | false): any;
|
|
6
|
+
export type Attrs = Record<string, string>;
|
|
7
|
+
export declare function generate(node: AbstractNode, key: string, rootProps?: Record<string, string> | false): any;
|
|
12
8
|
export declare function getSecondaryColor(primaryColor: string): string;
|
|
13
9
|
export declare function normalizeTwoToneColors(twoToneColor: string | [string, string] | undefined): string[];
|
|
14
10
|
export declare const svgBaseProps: {
|
package/lib/utils.js
CHANGED
|
@@ -38,7 +38,6 @@ _export(exports, {
|
|
|
38
38
|
}
|
|
39
39
|
});
|
|
40
40
|
var _colors = require("@ant-design/colors");
|
|
41
|
-
var _lodashcamelcase = /*#__PURE__*/ _interop_require_default(require("lodash.camelcase"));
|
|
42
41
|
var _dynamicCSS = require("rc-util/lib/Dom/dynamicCSS");
|
|
43
42
|
var _shadow = require("rc-util/lib/Dom/shadow");
|
|
44
43
|
var _warning = /*#__PURE__*/ _interop_require_default(require("rc-util/lib/warning"));
|
|
@@ -116,6 +115,11 @@ function _object_spread(target) {
|
|
|
116
115
|
}
|
|
117
116
|
return target;
|
|
118
117
|
}
|
|
118
|
+
function camelCase(input) {
|
|
119
|
+
return input.replace(/-(.)/g, function(match, g) {
|
|
120
|
+
return g.toUpperCase();
|
|
121
|
+
});
|
|
122
|
+
}
|
|
119
123
|
function warning(valid, message) {
|
|
120
124
|
(0, _warning.default)(valid, "[@ant-design/icons] ".concat(message));
|
|
121
125
|
}
|
|
@@ -133,7 +137,7 @@ function normalizeAttrs() {
|
|
|
133
137
|
break;
|
|
134
138
|
default:
|
|
135
139
|
delete acc[key];
|
|
136
|
-
acc[(
|
|
140
|
+
acc[camelCase(key)] = val;
|
|
137
141
|
}
|
|
138
142
|
return acc;
|
|
139
143
|
}, {});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ant-design/icons",
|
|
3
|
-
"version": "5.2.
|
|
3
|
+
"version": "5.2.6-alpha.0",
|
|
4
4
|
"repository": "https://github.com/ant-design/ant-design-icons/tree/master/packages/icons-react",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"contributors": [
|
|
@@ -32,7 +32,6 @@
|
|
|
32
32
|
"@ant-design/icons-svg": "^4.3.0",
|
|
33
33
|
"@babel/runtime": "^7.11.2",
|
|
34
34
|
"classnames": "^2.2.6",
|
|
35
|
-
"lodash.camelcase": "^4.3.0",
|
|
36
35
|
"rc-util": "^5.31.1"
|
|
37
36
|
},
|
|
38
37
|
"devDependencies": {
|
|
@@ -62,6 +61,7 @@
|
|
|
62
61
|
"father": "^4.0.0",
|
|
63
62
|
"glob": "^7.1.6",
|
|
64
63
|
"history": "^4.9.0",
|
|
64
|
+
"lodash": "^4.17.21",
|
|
65
65
|
"mobx": "^5.1.0",
|
|
66
66
|
"mobx-react": "^6.1.3",
|
|
67
67
|
"prettier": "^2.2.1",
|