@elliemae/ds-icons 2.2.1 → 2.2.2-rc.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/cjs/utils/SvgIcon.js +14 -14
- package/esm/utils/SvgIcon.js +5 -5
- package/package.json +2 -2
- package/types/utils/SvgIcon.d.ts +2 -71
package/cjs/utils/SvgIcon.js
CHANGED
|
@@ -13,7 +13,7 @@ require('core-js/modules/esnext.iterator.filter.js');
|
|
|
13
13
|
require('core-js/modules/esnext.async-iterator.for-each.js');
|
|
14
14
|
require('core-js/modules/esnext.iterator.for-each.js');
|
|
15
15
|
require('react');
|
|
16
|
-
var
|
|
16
|
+
var dsPropsHelpers = require('@elliemae/ds-props-helpers');
|
|
17
17
|
var dsClassnames = require('@elliemae/ds-classnames');
|
|
18
18
|
var jsxRuntime = require('react/jsx-runtime');
|
|
19
19
|
|
|
@@ -33,7 +33,7 @@ const renderPaths = paths => paths.map((p, i) => /*#__PURE__*/_jsx__default["def
|
|
|
33
33
|
d: p
|
|
34
34
|
}, i));
|
|
35
35
|
|
|
36
|
-
|
|
36
|
+
const SvgIcon = _ref => {
|
|
37
37
|
let {
|
|
38
38
|
containerProps = {},
|
|
39
39
|
size,
|
|
@@ -62,21 +62,21 @@ function SvgIcon(_ref) {
|
|
|
62
62
|
viewBox: viewBox
|
|
63
63
|
}, void 0, renderPaths(paths))
|
|
64
64
|
}));
|
|
65
|
-
}
|
|
65
|
+
};
|
|
66
66
|
|
|
67
67
|
const iconProps = {
|
|
68
|
-
containerProps:
|
|
69
|
-
size:
|
|
70
|
-
color:
|
|
71
|
-
className:
|
|
72
|
-
component:
|
|
73
|
-
viewBox:
|
|
74
|
-
paths:
|
|
75
|
-
fill:
|
|
76
|
-
innerRef:
|
|
77
|
-
title:
|
|
68
|
+
containerProps: dsPropsHelpers.PropTypes.object.description('set of properties attached to the main container'),
|
|
69
|
+
size: dsPropsHelpers.PropTypes.oneOf(['xxs', 'xs', 's', 'm', 'l', 'xl', 'xxl']).description('size of the icon'),
|
|
70
|
+
color: dsPropsHelpers.PropTypes.oneOfType([dsPropsHelpers.PropTypes.tuple([dsPropsHelpers.PropTypes.oneOf(['neutral']), dsPropsHelpers.PropTypes.oneOf(['900'])]), dsPropsHelpers.PropTypes.tuple([dsPropsHelpers.PropTypes.oneOf(['neutral']), dsPropsHelpers.PropTypes.oneOf(['500'])]), dsPropsHelpers.PropTypes.tuple([dsPropsHelpers.PropTypes.oneOf(['neutral']), dsPropsHelpers.PropTypes.oneOf(['0'])]), dsPropsHelpers.PropTypes.tuple([dsPropsHelpers.PropTypes.oneOf(['danger']), dsPropsHelpers.PropTypes.oneOf(['900'])]), dsPropsHelpers.PropTypes.tuple([dsPropsHelpers.PropTypes.oneOf(['warning']), dsPropsHelpers.PropTypes.oneOf(['600'])]), dsPropsHelpers.PropTypes.tuple([dsPropsHelpers.PropTypes.oneOf(['warning']), dsPropsHelpers.PropTypes.oneOf(['900'])]), dsPropsHelpers.PropTypes.tuple([dsPropsHelpers.PropTypes.oneOf(['success']), dsPropsHelpers.PropTypes.oneOf(['900'])]), dsPropsHelpers.PropTypes.tuple([dsPropsHelpers.PropTypes.oneOf(['brand-primary']), dsPropsHelpers.PropTypes.oneOf(['600'])])]).description('icon color'),
|
|
71
|
+
className: dsPropsHelpers.PropTypes.string.description('html class attribute'),
|
|
72
|
+
component: dsPropsHelpers.PropTypes.oneOfType([dsPropsHelpers.PropTypes.string, dsPropsHelpers.PropTypes.node]).description('containers element'),
|
|
73
|
+
viewBox: dsPropsHelpers.PropTypes.string.description('view box'),
|
|
74
|
+
paths: dsPropsHelpers.PropTypes.oneOfType([dsPropsHelpers.PropTypes.string, dsPropsHelpers.PropTypes.arrayOf(dsPropsHelpers.PropTypes.string)]).description(''),
|
|
75
|
+
fill: dsPropsHelpers.PropTypes.string.description('fill attribute'),
|
|
76
|
+
innerRef: dsPropsHelpers.PropTypes.object.description('inner ref'),
|
|
77
|
+
title: dsPropsHelpers.PropTypes.object.description('Adds a title html element to the svg.')
|
|
78
78
|
};
|
|
79
|
-
const IconWithSchema =
|
|
79
|
+
const IconWithSchema = dsPropsHelpers.describe(SvgIcon);
|
|
80
80
|
IconWithSchema.propTypes = iconProps;
|
|
81
81
|
|
|
82
82
|
exports.IconWithSchema = IconWithSchema;
|
package/esm/utils/SvgIcon.js
CHANGED
|
@@ -9,7 +9,7 @@ import 'core-js/modules/esnext.iterator.filter.js';
|
|
|
9
9
|
import 'core-js/modules/esnext.async-iterator.for-each.js';
|
|
10
10
|
import 'core-js/modules/esnext.iterator.for-each.js';
|
|
11
11
|
import 'react';
|
|
12
|
-
import { PropTypes, describe } from '
|
|
12
|
+
import { PropTypes, describe } from '@elliemae/ds-props-helpers';
|
|
13
13
|
import { convertPropToCssClassName } from '@elliemae/ds-classnames';
|
|
14
14
|
import { jsx } from 'react/jsx-runtime';
|
|
15
15
|
|
|
@@ -23,7 +23,7 @@ const renderPaths = paths => paths.map((p, i) => /*#__PURE__*/_jsx("path", {
|
|
|
23
23
|
d: p
|
|
24
24
|
}, i));
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
const SvgIcon = _ref => {
|
|
27
27
|
let {
|
|
28
28
|
containerProps = {},
|
|
29
29
|
size,
|
|
@@ -52,14 +52,14 @@ function SvgIcon(_ref) {
|
|
|
52
52
|
viewBox: viewBox
|
|
53
53
|
}, void 0, renderPaths(paths))
|
|
54
54
|
}));
|
|
55
|
-
}
|
|
55
|
+
};
|
|
56
56
|
|
|
57
57
|
const iconProps = {
|
|
58
58
|
containerProps: PropTypes.object.description('set of properties attached to the main container'),
|
|
59
59
|
size: PropTypes.oneOf(['xxs', 'xs', 's', 'm', 'l', 'xl', 'xxl']).description('size of the icon'),
|
|
60
|
-
color: PropTypes.oneOf([
|
|
60
|
+
color: PropTypes.oneOfType([PropTypes.tuple([PropTypes.oneOf(['neutral']), PropTypes.oneOf(['900'])]), PropTypes.tuple([PropTypes.oneOf(['neutral']), PropTypes.oneOf(['500'])]), PropTypes.tuple([PropTypes.oneOf(['neutral']), PropTypes.oneOf(['0'])]), PropTypes.tuple([PropTypes.oneOf(['danger']), PropTypes.oneOf(['900'])]), PropTypes.tuple([PropTypes.oneOf(['warning']), PropTypes.oneOf(['600'])]), PropTypes.tuple([PropTypes.oneOf(['warning']), PropTypes.oneOf(['900'])]), PropTypes.tuple([PropTypes.oneOf(['success']), PropTypes.oneOf(['900'])]), PropTypes.tuple([PropTypes.oneOf(['brand-primary']), PropTypes.oneOf(['600'])])]).description('icon color'),
|
|
61
61
|
className: PropTypes.string.description('html class attribute'),
|
|
62
|
-
component: PropTypes.
|
|
62
|
+
component: PropTypes.oneOfType([PropTypes.string, PropTypes.node]).description('containers element'),
|
|
63
63
|
viewBox: PropTypes.string.description('view box'),
|
|
64
64
|
paths: PropTypes.oneOfType([PropTypes.string, PropTypes.arrayOf(PropTypes.string)]).description(''),
|
|
65
65
|
fill: PropTypes.string.description('fill attribute'),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-icons",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.2-rc.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Icons",
|
|
6
6
|
"module": "./esm/index.js",
|
|
@@ -1569,7 +1569,7 @@
|
|
|
1569
1569
|
"dev": "cross-env NODE_ENV=development && node ../../scripts/build/build.js -w"
|
|
1570
1570
|
},
|
|
1571
1571
|
"dependencies": {
|
|
1572
|
-
"@elliemae/ds-classnames": "2.2.
|
|
1572
|
+
"@elliemae/ds-classnames": "2.2.2-rc.0",
|
|
1573
1573
|
"react-desc": "~4.1.3"
|
|
1574
1574
|
},
|
|
1575
1575
|
"peerDependencies": {
|
package/types/utils/SvgIcon.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference path="../../../../../shared/typings/react-desc.d.ts" />
|
|
2
1
|
import React from 'react';
|
|
3
2
|
export declare type SvgIconSizeType = 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl';
|
|
4
3
|
export declare type SvgIconColorType = ['neutral', '900'] | ['neutral', '500'] | ['neutral', '0'] | ['danger', '900'] | ['warning', '600'] | ['success', '900'] | ['brand-primary', '600'];
|
|
@@ -14,75 +13,7 @@ export interface SvgIconPropType {
|
|
|
14
13
|
innerRef: any;
|
|
15
14
|
}
|
|
16
15
|
export declare type SvgIconType = React.ComponentType<SvgIconPropType>;
|
|
17
|
-
declare
|
|
18
|
-
declare
|
|
19
|
-
var propTypes: {
|
|
20
|
-
containerProps: {
|
|
21
|
-
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
22
|
-
deprecated: import("react-desc").PropTypesDescValidator;
|
|
23
|
-
};
|
|
24
|
-
isRequired: import("react-desc").PropTypesDescValue;
|
|
25
|
-
};
|
|
26
|
-
size: {
|
|
27
|
-
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
28
|
-
deprecated: import("react-desc").PropTypesDescValidator;
|
|
29
|
-
};
|
|
30
|
-
isRequired: import("react-desc").PropTypesDescValue;
|
|
31
|
-
};
|
|
32
|
-
color: {
|
|
33
|
-
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
34
|
-
deprecated: import("react-desc").PropTypesDescValidator;
|
|
35
|
-
};
|
|
36
|
-
isRequired: import("react-desc").PropTypesDescValue;
|
|
37
|
-
};
|
|
38
|
-
className: {
|
|
39
|
-
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
40
|
-
deprecated: import("react-desc").PropTypesDescValidator;
|
|
41
|
-
};
|
|
42
|
-
isRequired: import("react-desc").PropTypesDescValue;
|
|
43
|
-
};
|
|
44
|
-
component: {
|
|
45
|
-
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
46
|
-
deprecated: import("react-desc").PropTypesDescValidator;
|
|
47
|
-
};
|
|
48
|
-
isRequired: import("react-desc").PropTypesDescValue;
|
|
49
|
-
};
|
|
50
|
-
viewBox: {
|
|
51
|
-
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
52
|
-
deprecated: import("react-desc").PropTypesDescValidator;
|
|
53
|
-
};
|
|
54
|
-
isRequired: import("react-desc").PropTypesDescValue;
|
|
55
|
-
};
|
|
56
|
-
paths: {
|
|
57
|
-
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
58
|
-
deprecated: import("react-desc").PropTypesDescValidator;
|
|
59
|
-
};
|
|
60
|
-
isRequired: import("react-desc").PropTypesDescValue;
|
|
61
|
-
};
|
|
62
|
-
fill: {
|
|
63
|
-
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
64
|
-
deprecated: import("react-desc").PropTypesDescValidator;
|
|
65
|
-
};
|
|
66
|
-
isRequired: import("react-desc").PropTypesDescValue;
|
|
67
|
-
};
|
|
68
|
-
innerRef: {
|
|
69
|
-
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
70
|
-
deprecated: import("react-desc").PropTypesDescValidator;
|
|
71
|
-
};
|
|
72
|
-
isRequired: import("react-desc").PropTypesDescValue;
|
|
73
|
-
};
|
|
74
|
-
title: {
|
|
75
|
-
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
76
|
-
deprecated: import("react-desc").PropTypesDescValidator;
|
|
77
|
-
};
|
|
78
|
-
isRequired: import("react-desc").PropTypesDescValue;
|
|
79
|
-
};
|
|
80
|
-
};
|
|
81
|
-
}
|
|
82
|
-
declare const IconWithSchema: {
|
|
83
|
-
(props?: unknown): JSX.Element;
|
|
84
|
-
propTypes: unknown;
|
|
85
|
-
toTypescript: () => import("react-desc").TypescriptSchema;
|
|
86
|
-
};
|
|
16
|
+
declare const SvgIcon: React.ComponentType<SvgIconPropType>;
|
|
17
|
+
declare const IconWithSchema: import("@elliemae/ds-props-helpers/types/propTypes/types").DocumentedReactComponent<SvgIconPropType>;
|
|
87
18
|
export { IconWithSchema };
|
|
88
19
|
export default SvgIcon;
|