@zohodesk/utils 1.0.2-alpha.3 → 1.0.2-alpha.6
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/es/applyOpenToCustomize.js +0 -2
- package/es/constantProps/uiProps.js +8 -1
- package/es/omit.js +0 -1
- package/es/props/uiProps.js +19 -4
- package/package.json +2 -2
|
@@ -31,4 +31,11 @@ export const shapeList = {
|
|
|
31
31
|
roundedRect: 'shape_roundedRect',
|
|
32
32
|
rounded: 'shape_rounded'
|
|
33
33
|
};
|
|
34
|
-
export const shapes = Object.values(shapeList);
|
|
34
|
+
export const shapes = Object.values(shapeList);
|
|
35
|
+
export const decorationList = {
|
|
36
|
+
overLine: 'decoration_overline',
|
|
37
|
+
lineThrough: 'decoration_linethrough',
|
|
38
|
+
underLine: 'decoration_underline',
|
|
39
|
+
none: 'decoration_none'
|
|
40
|
+
};
|
|
41
|
+
export const decorations = Object.values(decorationList);
|
package/es/omit.js
CHANGED
package/es/props/uiProps.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
/* eslint-disable no-restricted-syntax */
|
|
4
4
|
import PropTypes from 'prop-types';
|
|
5
|
-
import { variants, colors, sizes, shapes } from
|
|
5
|
+
import { variants, colors, sizes, shapes, decorations } from '../constantProps';
|
|
6
6
|
export const getVariantProps = (variants, exvariant) => {
|
|
7
7
|
let variant = [];
|
|
8
8
|
|
|
@@ -48,11 +48,11 @@ export const getSizeProps = (sizes, exSizes) => {
|
|
|
48
48
|
export const sizeProps = {
|
|
49
49
|
size: PropTypes.oneOf(sizes)
|
|
50
50
|
};
|
|
51
|
-
export const getShapeProps = (shapes,
|
|
51
|
+
export const getShapeProps = (shapes, exShapes) => {
|
|
52
52
|
let shape = [];
|
|
53
53
|
|
|
54
|
-
if (
|
|
55
|
-
shape = [...
|
|
54
|
+
if (exShapes) {
|
|
55
|
+
shape = [...exShapes];
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
shape = [...shape, ...shapes];
|
|
@@ -62,4 +62,19 @@ export const getShapeProps = (shapes, exshapes) => {
|
|
|
62
62
|
};
|
|
63
63
|
export const shapeProps = {
|
|
64
64
|
shape: PropTypes.oneOf(shapes)
|
|
65
|
+
};
|
|
66
|
+
export const getDecorationProps = (decorations, exDecorations) => {
|
|
67
|
+
let decoration = [];
|
|
68
|
+
|
|
69
|
+
if (exDecorations) {
|
|
70
|
+
decoration = [...exDecorations];
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
decoration = [...decoration, ...decorations];
|
|
74
|
+
return {
|
|
75
|
+
textDecoration: PropTypes.oneOf(decoration)
|
|
76
|
+
};
|
|
77
|
+
};
|
|
78
|
+
export const decorationProps = {
|
|
79
|
+
decoration: PropTypes.oneOf(decorations)
|
|
65
80
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zohodesk/utils",
|
|
3
|
-
"version": "1.0.2-alpha.
|
|
3
|
+
"version": "1.0.2-alpha.6",
|
|
4
4
|
"description": "",
|
|
5
5
|
"private": false,
|
|
6
6
|
"publishConfig": {
|
|
@@ -22,5 +22,5 @@
|
|
|
22
22
|
],
|
|
23
23
|
"author": "",
|
|
24
24
|
"license": "ISC",
|
|
25
|
-
"gitHead": "
|
|
25
|
+
"gitHead": "1e10e361945e34249b07af74c82dfc9c142a37cb"
|
|
26
26
|
}
|