@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.
@@ -1,5 +1,3 @@
1
- import "core-js/modules/es.array.includes";
2
-
3
1
  /**
4
2
  * Opening the customization, need to addd for behaviour changes. also add only enabled.
5
3
  * @param {*} style
@@ -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
@@ -1,5 +1,3 @@
1
- import "core-js/modules/es.array.includes";
2
-
3
1
  /**
4
2
  * REPLACER_SYMBOL used to indentify
5
3
  */
package/es/omit.js CHANGED
@@ -1,4 +1,3 @@
1
- import "core-js/modules/es.array.includes";
2
1
  export default (keys => {
3
2
  return function omit(obj) {
4
3
  return Object.keys(obj).reduce((res, next) => {
@@ -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",
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
- "main": "es/index.js",
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
- "author": "",
24
- "license": "ISC",
25
- "gitHead": "e57c562c44c9b82f9e2fa2df1e3c97d106efb72d"
33
+ "gitHead": "ce180d1ede1d0c31aab26be5c0efdefe603b574f"
26
34
  }