@zohodesk/utils 1.0.4 → 1.0.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 +10 -1
- package/es/mergeStyle.js +0 -2
- package/es/omit.js +0 -1
- package/es/props/uiProps.js +16 -1
- package/package.json +14 -6
|
@@ -38,4 +38,13 @@ export const decorationList = {
|
|
|
38
38
|
underLine: 'decoration_underline',
|
|
39
39
|
none: 'decoration_none'
|
|
40
40
|
};
|
|
41
|
-
export const decorations = Object.values(decorationList);
|
|
41
|
+
export const decorations = Object.values(decorationList);
|
|
42
|
+
export const positionList = {
|
|
43
|
+
left: 'position_left',
|
|
44
|
+
right: 'position_right',
|
|
45
|
+
top: 'position_top',
|
|
46
|
+
bottom: 'position_bottom',
|
|
47
|
+
center: 'position_center'
|
|
48
|
+
};
|
|
49
|
+
export const positionKeys = Object.keys(positionList);
|
|
50
|
+
export const positions = Object.values(positionList);
|
package/es/mergeStyle.js
CHANGED
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, decorations } from '../constantProps';
|
|
5
|
+
import { variants, colors, sizes, shapes, decorations, positions } from '../constantProps';
|
|
6
6
|
export const getVariantProps = (variants, exvariant) => {
|
|
7
7
|
let variant = [];
|
|
8
8
|
|
|
@@ -77,4 +77,19 @@ export const getDecorationProps = (decorations, exDecorations) => {
|
|
|
77
77
|
};
|
|
78
78
|
export const decorationProps = {
|
|
79
79
|
decoration: PropTypes.oneOf(decorations)
|
|
80
|
+
};
|
|
81
|
+
export const getPositionProps = (positions, expositions) => {
|
|
82
|
+
let position = [];
|
|
83
|
+
|
|
84
|
+
if (expositions) {
|
|
85
|
+
position = [...expositions];
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
position = [...position, ...positions];
|
|
89
|
+
return {
|
|
90
|
+
position: PropTypes.oneOf(position)
|
|
91
|
+
};
|
|
92
|
+
};
|
|
93
|
+
export const positionProps = {
|
|
94
|
+
position: PropTypes.oneOf(positions)
|
|
80
95
|
};
|
package/package.json
CHANGED
|
@@ -1,12 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zohodesk/utils",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "",
|
|
3
|
+
"version": "1.0.6",
|
|
4
|
+
"description": "Unified Component Library - Utils",
|
|
5
|
+
"main": "es/index.js",
|
|
6
|
+
"module": "es/index.js",
|
|
5
7
|
"private": false,
|
|
6
8
|
"publishConfig": {
|
|
7
9
|
"access": "public"
|
|
8
10
|
},
|
|
9
|
-
"
|
|
11
|
+
"author": "Z Team",
|
|
12
|
+
"homepage": "https://www.npmjs.com/search?q=@zohodesk",
|
|
13
|
+
"license": "ISC",
|
|
14
|
+
"keywords": [
|
|
15
|
+
"UCL",
|
|
16
|
+
"ZOHODESK",
|
|
17
|
+
"ZTEAM",
|
|
18
|
+
"LIBRARY"
|
|
19
|
+
],
|
|
10
20
|
"scripts": {
|
|
11
21
|
"build": "type react-cli && react-cli build:component:es",
|
|
12
22
|
"build_watch": "react-cli build:component:es -w",
|
|
@@ -20,7 +30,5 @@
|
|
|
20
30
|
"es",
|
|
21
31
|
"!**/__tests__"
|
|
22
32
|
],
|
|
23
|
-
"
|
|
24
|
-
"license": "ISC",
|
|
25
|
-
"gitHead": "e57c562c44c9b82f9e2fa2df1e3c97d106efb72d"
|
|
33
|
+
"gitHead": "ce180d1ede1d0c31aab26be5c0efdefe603b574f"
|
|
26
34
|
}
|