@zohodesk/components 1.0.0-temp-178 → 1.0.0-temp-180

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.
Files changed (100) hide show
  1. package/.cli/AppearanceThemeValidationExcludeFiles.js +1 -0
  2. package/.cli/PropLessFiles.html +1 -1
  3. package/.cli/PropUnificationExcludeFilesArray.js +231 -0
  4. package/.cli/propValidation_report.html +24 -2
  5. package/PropValidationExcludeFilesArray.js +1 -0
  6. package/README.md +6 -0
  7. package/assets/Appearance/dark/mode/Component_DarkMode.module.css +3 -0
  8. package/assets/Appearance/light/mode/Component_LightMode.module.css +3 -0
  9. package/assets/Appearance/pureDark/mode/Component_PureDarkMode.module.css +3 -0
  10. package/es/Avatar/Avatar.js +2 -1
  11. package/es/Avatar/Avatar.module.css +12 -0
  12. package/es/AvatarTeam/AvatarTeam.module.css +2 -0
  13. package/es/AvatarTeam/__tests__/__snapshots__/AvatarTeam.spec.js.snap +1 -0
  14. package/es/Button/css/Button.module.css +9 -1
  15. package/es/Buttongroup/Buttongroup.module.css +3 -2
  16. package/es/CheckBox/CheckBox.module.css +2 -0
  17. package/es/DateTime/DateTime.module.css +3 -2
  18. package/es/DateTime/YearView.module.css +1 -1
  19. package/es/DateTime/dateFormatUtils/dateFormat.js +6 -1
  20. package/es/DropBox/DropBoxElement/css/DropBoxElement.module.css +8 -4
  21. package/es/DropBox/css/DropBox.module.css +1 -0
  22. package/es/DropDown/DropDownHeading.module.css +6 -0
  23. package/es/DropDown/DropDownItem.module.css +3 -0
  24. package/es/Label/Label.module.css +2 -1
  25. package/es/ListItem/ListContainer.js +1 -1
  26. package/es/ListItem/ListItem.module.css +28 -18
  27. package/es/MultiSelect/Suggestions.js +2 -1
  28. package/es/PopOver/PopOver.module.css +1 -0
  29. package/es/Radio/Radio.module.css +1 -0
  30. package/es/Ribbon/Ribbon.module.css +9 -6
  31. package/es/Select/Select.js +3 -2
  32. package/es/Switch/Switch.js +2 -2
  33. package/es/Switch/Switch.module.css +2 -0
  34. package/es/Switch/__tests__/__snapshots__/Switch.spec.js.snap +22 -22
  35. package/es/Tab/Tab.module.css +3 -3
  36. package/es/Tag/Tag.module.css +8 -3
  37. package/es/TextBox/TextBox.module.css +25 -5
  38. package/es/TextBoxIcon/TextBoxIcon.module.css +5 -0
  39. package/es/Textarea/Textarea.module.css +9 -3
  40. package/es/Tooltip/Tooltip.module.css +5 -1
  41. package/es/common/common.module.css +2 -2
  42. package/es/common/customscroll.module.css +37 -0
  43. package/es/v1/Avatar/Avatar.js +2 -1
  44. package/es/v1/ListItem/ListContainer.js +1 -1
  45. package/es/v1/Modal/Modal.js +86 -114
  46. package/es/v1/MultiSelect/Suggestions.js +2 -1
  47. package/es/v1/Select/Select.js +3 -2
  48. package/es/v1/Switch/Switch.js +2 -2
  49. package/es/v1/Typography/css/Typography.module.css +83 -112
  50. package/es/v1/Typography/css/cssJSLogic.js +6 -2
  51. package/es/v1/Typography/props/propTypes.js +2 -2
  52. package/es/v1/Typography/utils/index.js +50 -0
  53. package/lib/Avatar/Avatar.js +2 -1
  54. package/lib/Avatar/Avatar.module.css +12 -0
  55. package/lib/AvatarTeam/AvatarTeam.module.css +2 -0
  56. package/lib/AvatarTeam/__tests__/__snapshots__/AvatarTeam.spec.js.snap +1 -0
  57. package/lib/Button/css/Button.module.css +9 -1
  58. package/lib/Buttongroup/Buttongroup.module.css +3 -2
  59. package/lib/CheckBox/CheckBox.module.css +2 -0
  60. package/lib/DateTime/DateTime.module.css +3 -2
  61. package/lib/DateTime/YearView.module.css +1 -1
  62. package/lib/DateTime/dateFormatUtils/dateFormat.js +6 -1
  63. package/lib/DropBox/DropBoxElement/css/DropBoxElement.module.css +8 -4
  64. package/lib/DropBox/css/DropBox.module.css +1 -0
  65. package/lib/DropDown/DropDownHeading.module.css +6 -0
  66. package/lib/DropDown/DropDownItem.module.css +3 -0
  67. package/lib/Label/Label.module.css +2 -1
  68. package/lib/ListItem/ListContainer.js +1 -1
  69. package/lib/ListItem/ListItem.module.css +28 -18
  70. package/lib/MultiSelect/Suggestions.js +2 -1
  71. package/lib/PopOver/PopOver.module.css +1 -0
  72. package/lib/Radio/Radio.module.css +1 -0
  73. package/lib/Ribbon/Ribbon.module.css +9 -6
  74. package/lib/Select/Select.js +3 -2
  75. package/lib/Switch/Switch.js +2 -2
  76. package/lib/Switch/Switch.module.css +2 -0
  77. package/lib/Switch/__tests__/__snapshots__/Switch.spec.js.snap +22 -22
  78. package/lib/Tab/Tab.module.css +3 -3
  79. package/lib/Tag/Tag.module.css +8 -3
  80. package/lib/TextBox/TextBox.module.css +25 -5
  81. package/lib/TextBoxIcon/TextBoxIcon.module.css +5 -0
  82. package/lib/Textarea/Textarea.module.css +9 -3
  83. package/lib/Tooltip/Tooltip.module.css +5 -1
  84. package/lib/common/common.module.css +2 -2
  85. package/lib/common/customscroll.module.css +37 -0
  86. package/lib/v1/Avatar/Avatar.js +2 -1
  87. package/lib/v1/ListItem/ListContainer.js +1 -1
  88. package/lib/v1/Modal/Modal.js +118 -164
  89. package/lib/v1/MultiSelect/Suggestions.js +2 -1
  90. package/lib/v1/Select/Select.js +3 -2
  91. package/lib/v1/Switch/Switch.js +2 -2
  92. package/lib/v1/Typography/css/Typography.module.css +83 -112
  93. package/lib/v1/Typography/css/cssJSLogic.js +7 -3
  94. package/lib/v1/Typography/props/propTypes.js +2 -2
  95. package/lib/v1/Typography/utils/index.js +59 -0
  96. package/package.json +12 -10
  97. package/propValidationArg.json +8 -0
  98. package/result.json +1 -1
  99. package/es/v1/Typography/css/letterSpacingMap.js +0 -12
  100. package/lib/v1/Typography/css/letterSpacingMap.js +0 -20
@@ -23,9 +23,17 @@
23
23
  -ms-scrollbar-highlight-color: var(--zd-scroll-bg);
24
24
  -ms-scrollbar-face-color: var(--zd-scroll-thump);
25
25
  }
26
+ .scroll::-webkit-scrollbar,
27
+ .scroll ::-webkit-scrollbar {
28
+ /* css:theme-validation:ignore */
29
+ }
26
30
  .scroll::-webkit-scrollbar, .scroll ::-webkit-scrollbar {
27
31
  background: var(--zd-scroll-corner-bg);
28
32
  }
33
+ .scroll::-webkit-scrollbar:hover,
34
+ .scroll ::-webkit-scrollbar:hover {
35
+ /* css:theme-validation:ignore */
36
+ }
29
37
  .scroll::-webkit-scrollbar:hover, .scroll ::-webkit-scrollbar:hover {
30
38
  background: var(--zd-scroll-bg);
31
39
  }
@@ -43,6 +51,11 @@
43
51
  width: 0 ;
44
52
  height: 0 ;
45
53
  }
54
+ .scroll::-webkit-scrollbar-track:vertical,
55
+ .scroll ::-webkit-scrollbar-track:vertical {
56
+ /* css:theme-validation:ignore */
57
+ /* css:theme-validation:ignore */
58
+ }
46
59
  [dir=ltr] .scroll::-webkit-scrollbar-track:vertical, [dir=ltr] .scroll ::-webkit-scrollbar-track:vertical {
47
60
  border-left: 1px solid transparent;
48
61
  border-right: 1px solid transparent;
@@ -51,13 +64,26 @@
51
64
  border-right: 1px solid transparent;
52
65
  border-left: 1px solid transparent;
53
66
  }
67
+ .scroll::-webkit-scrollbar-track:vertical:hover,
68
+ .scroll ::-webkit-scrollbar-track:vertical:hover {
69
+ /* css:theme-validation:ignore */
70
+ }
54
71
  .scroll::-webkit-scrollbar-track:vertical:hover, .scroll ::-webkit-scrollbar-track:vertical:hover {
55
72
  border-color: var(--zd-scroll-border);
56
73
  }
74
+ .scroll::-webkit-scrollbar-track:horizontal,
75
+ .scroll ::-webkit-scrollbar-track:horizontal {
76
+ /* css:theme-validation:ignore */
77
+ /* css:theme-validation:ignore */
78
+ }
57
79
  .scroll::-webkit-scrollbar-track:horizontal, .scroll ::-webkit-scrollbar-track:horizontal {
58
80
  border-top: 1px solid transparent;
59
81
  border-bottom: 1px solid transparent;
60
82
  }
83
+ .scroll::-webkit-scrollbar-track:horizontal:hover,
84
+ .scroll ::-webkit-scrollbar-track:horizontal:hover {
85
+ /* css:theme-validation:ignore */
86
+ }
61
87
  .scroll::-webkit-scrollbar-track:horizontal:hover, .scroll ::-webkit-scrollbar-track:horizontal:hover {
62
88
  border-color: var(--zd-scroll-border);
63
89
  }
@@ -66,6 +92,8 @@
66
92
  }
67
93
  .scroll::-webkit-scrollbar-thumb,
68
94
  .scroll ::-webkit-scrollbar-thumb {
95
+ /* css:theme-validation:ignore */
96
+ /* css:theme-validation:ignore */
69
97
  /* display: none; */
70
98
  }
71
99
  .scroll::-webkit-scrollbar-thumb, .scroll ::-webkit-scrollbar-thumb {
@@ -74,6 +102,11 @@
74
102
  background-clip: padding-box;
75
103
  border: 3px solid transparent;
76
104
  }
105
+ .scroll::-webkit-scrollbar-thumb:hover,
106
+ .scroll ::-webkit-scrollbar-thumb:hover {
107
+ /* css:theme-validation:ignore */
108
+ /* css:theme-validation:ignore */
109
+ }
77
110
  .scroll::-webkit-scrollbar-thumb:hover, .scroll ::-webkit-scrollbar-thumb:hover {
78
111
  background: var(--zd-scroll-thump-hoverbg);
79
112
  background-clip: padding-box;
@@ -83,6 +116,10 @@
83
116
  .scroll *:hover > ::-webkit-scrollbar-thumb {
84
117
  display: block;
85
118
  } */
119
+ .scroll::-webkit-scrollbar-corner,
120
+ .scroll ::-webkit-scrollbar-corner {
121
+ /* css:theme-validation:ignore */
122
+ }
86
123
  .scroll::-webkit-scrollbar-corner, .scroll ::-webkit-scrollbar-corner {
87
124
  background: var(--zd-scroll-corner-bg);
88
125
  }
@@ -111,7 +111,8 @@ function Avatar(props) {
111
111
  "data-id": dataId,
112
112
  "data-test-id": dataId,
113
113
  onClick: onClick,
114
- "data-selector-id": dataSelectorId
114
+ "data-selector-id": dataSelectorId,
115
+ tabIndex: onClick ? 0 : null
115
116
  }, AvatarProps), showInitial && !showAlternateAvatar && /*#__PURE__*/React.createElement("span", {
116
117
  className: `${style.initial}`,
117
118
  "data-id": `${dataId}_AvatarInitial`,
@@ -89,7 +89,7 @@ const ListContainer = props => {
89
89
  eleRef: eleRef,
90
90
  tagName: isLink ? 'a' : 'li',
91
91
  "data-title": isDisabled ? disableTitle : title
92
- }, options, customProps), children);
92
+ }, options, customProps, a11y), children);
93
93
  };
94
94
 
95
95
  ListContainer.defaultProps = ListContainerDefaultProps;
@@ -1,154 +1,126 @@
1
1
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
2
 
3
- /**** Libraries ****/
4
- import React from 'react';
3
+ import React, { useState, useRef, useEffect, useCallback } from 'react';
5
4
  import ReactDOM from 'react-dom';
5
+ import useEffectCallOnlyAfterState from '@zohodesk/hooks/es/utils/useEffectCallOnlyAfterState';
6
6
  import { defaultProps } from '../../Modal/props/defaultProps';
7
7
  import { propTypes } from '../../Modal/props/propTypes';
8
8
  import style from '../../AppContainer/AppContainer.module.css';
9
9
  let createdPortalIds = [];
10
10
  let newPortalPrefix = 'CPortal';
11
11
  let portalChildrenTopIndexValues;
12
- export default class Modal extends React.Component {
13
- constructor(props) {
14
- super(props);
15
- this.handleAddPortalId = this.handleAddPortalId.bind(this);
16
- this.handleRemovePortalId = this.handleRemovePortalId.bind(this);
17
- this.handleInsertPortalDiv = this.handleInsertPortalDiv.bind(this);
18
- this.getPortalDiv = this.getPortalDiv.bind(this);
19
- this.state = {
20
- isMounted: false
21
- };
22
- this.portalId = props.portalId;
23
- this.setRef = this.setRef.bind(this);
24
- this.ref = null; // this.portalDiv = document.createDocumentFragment();
25
- }
26
-
27
- setRef(ele) {
28
- this.ref = ele;
29
-
30
- if (this.isZIndexAppendNeeded) {
31
- this.ref.style.zIndex = this.zIndex;
32
- this.isZIndexAppendNeeded = false;
12
+ export default function Modal(props) {
13
+ let {
14
+ children,
15
+ isActive,
16
+ autoZIndexNeeded,
17
+ portalId: propPortalId
18
+ } = props;
19
+ const [isMounted, setMounted] = useState(false);
20
+ const portalId = useRef(propPortalId);
21
+ const ref = useRef(null);
22
+ const isZIndexAppendNeeded = useRef();
23
+ const zIndex = useRef();
24
+ const modalRoot = useRef();
25
+ const newModalRoot = useRef();
26
+ const containerDiv = useRef();
27
+ const portalDiv = useRef(); // document.createDocumentFragment()
28
+
29
+ const isCustomPortalId = useRef();
30
+ const setRef = useCallback(ele => {
31
+ ref.current = ele;
32
+
33
+ if (isZIndexAppendNeeded.current) {
34
+ ref.current.style.zIndex = zIndex.current;
35
+ isZIndexAppendNeeded.current = false;
33
36
  }
34
- }
35
-
36
- getPortalDiv() {
37
- this.modalRoot = this.props.portalId ? document.querySelector(`[data-portal=${this.props.portalId}]`) : '';
38
-
39
- if (!this.modalRoot) {
40
- this.portalId = this.handleAddPortalId();
41
- this.newModalRoot = document.createElement('div');
42
- this.newModalRoot.className = style.container;
43
- this.newModalRoot.setAttribute('data-portal', this.portalId);
44
- this.containerDiv && this.containerDiv.appendChild(this.newModalRoot);
45
- this.modalRoot = this.newModalRoot;
37
+ }, []);
38
+
39
+ function getPortalDiv() {
40
+ modalRoot.current = propPortalId ? document.querySelector(`[data-portal=${propPortalId}]`) : "";
41
+
42
+ if (!modalRoot.current) {
43
+ portalId.current = handleAddPortalId();
44
+ newModalRoot.current = document.createElement('div');
45
+ newModalRoot.current.className = style.container;
46
+ newModalRoot.current.setAttribute('data-portal', portalId.current);
47
+ containerDiv.current && containerDiv.current.appendChild(newModalRoot.current);
48
+ modalRoot.current = newModalRoot.current;
46
49
  }
47
50
 
48
- return this.modalRoot;
51
+ return modalRoot.current;
49
52
  }
50
53
 
51
- componentDidMount() {
52
- this.containerDiv = document.getElementsByTagName('desk')[0] ? document.getElementsByTagName('desk')[0] : document.getElementsByTagName('body')[0];
53
- this.portalDiv = this.getPortalDiv();
54
- this.setState({
55
- isMounted: true
56
- }, () => {
57
- this.handleInsertPortalDiv();
54
+ useEffect(() => {
55
+ containerDiv.current = document.getElementsByTagName("desk")[0] ? document.getElementsByTagName('desk')[0] : document.getElementsByTagName('body')[0];
56
+ portalDiv.current = getPortalDiv();
57
+ setMounted(true);
58
+ setTimeout(() => {
59
+ handleInsertPortalDiv();
58
60
  });
59
- }
60
-
61
- componentWillUnmount() {
62
- //this.modalRoot && this.modalRoot.removeChild(this.portalDiv);
63
- if (this.newModalRoot) {
64
- this.containerDiv && this.containerDiv.removeChild(this.newModalRoot);
65
- this.handleRemovePortalId();
66
- }
67
-
68
- if (this.zIndex && portalChildrenTopIndexValues === this.zIndex) {
69
- portalChildrenTopIndexValues -= 1;
70
- }
71
- }
61
+ return () => {
62
+ // modalRoot.current && modalRoot.current.removeChild(portalDiv.current);
63
+ if (newModalRoot.current) {
64
+ containerDiv.current && containerDiv.current.removeChild(newModalRoot.current);
65
+ handleRemovePortalId();
66
+ }
72
67
 
73
- componentDidUpdate(prevProps) {
74
- if (prevProps.isActive != this.props.isActive) {
75
- if (this.props.isActive) {
76
- this.handleInsertPortalDiv();
77
- } else if (this.zIndex && portalChildrenTopIndexValues === this.zIndex) {
68
+ if (zIndex.current && portalChildrenTopIndexValues === zIndex.current) {
78
69
  portalChildrenTopIndexValues -= 1;
79
70
  }
71
+ };
72
+ }, []);
73
+ useEffectCallOnlyAfterState(() => {
74
+ if (isActive) {
75
+ handleInsertPortalDiv();
76
+ } else if (zIndex.current && portalChildrenTopIndexValues === zIndex.current) {
77
+ portalChildrenTopIndexValues -= 1;
80
78
  }
81
- }
82
-
83
- handleInsertPortalDiv() {
84
- let {
85
- autoZIndexNeeded
86
- } = this.props;
87
-
88
- if (autoZIndexNeeded) {
89
- let {
90
- isActive
91
- } = this.props;
92
-
93
- if (isActive) {
94
- let newHighValue = Number(portalChildrenTopIndexValues || 10) + 1;
95
- portalChildrenTopIndexValues = newHighValue;
96
- this.zIndex = newHighValue;
97
-
98
- if (this.ref) {
99
- this.ref.style.zIndex = newHighValue;
100
- } else {
101
- this.isZIndexAppendNeeded = true;
102
- }
79
+ }, [isActive]);
80
+
81
+ function handleInsertPortalDiv() {
82
+ if (autoZIndexNeeded && isActive) {
83
+ let newHighValue = Number(portalChildrenTopIndexValues || 10) + 1;
84
+ portalChildrenTopIndexValues = newHighValue;
85
+ zIndex.current = newHighValue;
86
+
87
+ if (ref.current) {
88
+ ref.current.style.zIndex = newHighValue;
89
+ } else {
90
+ isZIndexAppendNeeded.current = true;
103
91
  }
104
92
  }
105
93
  }
106
94
 
107
- handleAddPortalId() {
95
+ function handleAddPortalId() {
108
96
  let createdPortalIdsLen = createdPortalIds.length;
109
97
  let newPortalId = createdPortalIdsLen ? createdPortalIds[createdPortalIdsLen - 1] + 1 : 1;
110
98
  createdPortalIds.push(newPortalId);
111
- this.portalId = newPortalId;
112
- this.isCustomPortalId = true;
99
+ portalId.current = newPortalId;
100
+ isCustomPortalId.current = true;
113
101
  return `${newPortalPrefix}${newPortalId}`;
114
102
  }
115
103
 
116
- handleRemovePortalId() {
117
- if (this.isCustomPortalId) {
118
- createdPortalIds = createdPortalIds.filter(id => id !== this.portalId);
104
+ function handleRemovePortalId() {
105
+ if (isCustomPortalId.current) {
106
+ createdPortalIds = createdPortalIds.filter(id => id !== portalId.current);
119
107
  }
120
108
  }
121
109
 
122
- render() {
123
- let {
124
- children
125
- } = this.props,
126
- {
127
- isMounted
128
- } = this.state;
129
- let Element = children.type,
130
- elementProps = children.props;
131
-
132
- if (isMounted) {
133
- if (Element) {
134
- return /*#__PURE__*/ReactDOM.createPortal( /*#__PURE__*/React.createElement(Element, _extends({
135
- ref: this.setRef
136
- }, elementProps)), this.portalDiv);
137
- }
110
+ let Element = children.type,
111
+ elementProps = children.props;
138
112
 
139
- return null;
113
+ if (isMounted) {
114
+ if (Element) {
115
+ return /*#__PURE__*/ReactDOM.createPortal( /*#__PURE__*/React.createElement(Element, _extends({
116
+ ref: setRef
117
+ }, elementProps)), portalDiv.current);
140
118
  }
141
119
 
142
120
  return null;
143
121
  }
144
122
 
123
+ return null;
145
124
  }
146
125
  Modal.defaultProps = defaultProps;
147
- Modal.propTypes = propTypes; // if (__DOCS__) {
148
- // Modal.docs = {
149
- // componentGroup: 'Atom',
150
- // folderName: 'Style Guide',
151
- // external: false,
152
- // description: ' '
153
- // };
154
- // }
126
+ Modal.propTypes = propTypes;
@@ -60,7 +60,8 @@ export default class Suggestions extends React.PureComponent {
60
60
  const isHighlight = hoverOption === index || id === hoverId ? true : false;
61
61
  const list_a11y = Object.assign({}, a11y, {
62
62
  ariaSelected: isActive,
63
- ariaLabel: value
63
+ ariaLabel: value,
64
+ 'data-a11y-list-active': isHighlight
64
65
  });
65
66
  const commonProps = {
66
67
  isDisabled,
@@ -298,7 +298,8 @@ export class SelectComponent extends Component {
298
298
  isPopupOpen,
299
299
  onKeyDown,
300
300
  isPopupOpenOnEnter,
301
- needCloseOnSelect
301
+ needCloseOnSelect,
302
+ isPopupReady
302
303
  } = this.props;
303
304
  let {
304
305
  hoverIndex,
@@ -351,7 +352,7 @@ export class SelectComponent extends Component {
351
352
  id
352
353
  } = option || {};
353
354
 
354
- if (isPopupOpen && !getIsEmptyValue(id) && onChange) {
355
+ if (isPopupReady && !getIsEmptyValue(id) && onChange) {
355
356
  onChange(id, optionsNormalize[id]);
356
357
  needCloseOnSelect && this.handlePopupClose(e);
357
358
  }
@@ -54,7 +54,6 @@ const Switch = props => {
54
54
  "data-title": disabled ? disableTitle : title,
55
55
  "aria-checked": checked,
56
56
  role: "switch",
57
- tabIndex: isReadOnly || disabled ? '-1' : '0',
58
57
  dataSelectorId: dataSelectorId
59
58
  }, SwitchProps), /*#__PURE__*/React.createElement(Box, {
60
59
  className: `${style[size]} ${customSwitchSize}`
@@ -72,7 +71,8 @@ const Switch = props => {
72
71
  htmlFor: id,
73
72
  "data-id": dataId,
74
73
  "data-test-id": dataId,
75
- className: `${style.label} ${style[`${size}Label`]} ${customSwitch}`
74
+ className: `${style.label} ${style[`${size}Label`]} ${customSwitch}`,
75
+ tabIndex: isReadOnly || disabled ? '-1' : '0'
76
76
  })), text && /*#__PURE__*/React.createElement(Label, _extends({
77
77
  text: text,
78
78
  palette: labelPalette,
@@ -238,130 +238,77 @@
238
238
  .lineheight_inherit{
239
239
  line-height: inherit;
240
240
  }
241
- .lineheight_0{
242
- line-height: 0px;
243
- }
244
- .lineheight_1{
245
- line-height: 1;
246
- }
247
- .lineheight_8{
248
- line-height: 8px;
249
- }
250
- .lineheight_10{
251
- line-height: 10px;
252
- }
253
- .lineheight_11{
254
- line-height: 11px;
255
- }
256
- .lineheight_12{
257
- line-height: 12px;
258
- }
259
- .lineheight_13{
260
- line-height: 13px;
261
- }
262
- .lineheight_14{
263
- line-height: 14px;
264
- }
265
- .lineheight_15{
266
- line-height: 15px;
267
- }
268
- .lineheight_16{
269
- line-height: 16px;
270
- }
271
- .lineheight_17{
272
- line-height: 17px;
273
- }
274
- .lineheight_18{
275
- line-height: 18px;
276
- }
277
- .lineheight_19{
278
- line-height: 19px;
279
- }
280
- .lineheight_20{
281
- line-height: 20px;
282
- }
283
- .lineheight_21{
284
- line-height: 21px;
285
- }
286
- .lineheight_22{
287
- line-height: 22px;
241
+ .lineheight_initial{
242
+ line-height: initial;
288
243
  }
289
- .lineheight_24{
290
- line-height: 24px;
244
+ .lineheight_normal{
245
+ line-height: normal;
291
246
  }
292
- .lineheight_25{
293
- line-height: 25px;
294
- }
295
- .lineheight_26{
296
- line-height: 26px;
297
- }
298
- .lineheight_27{
299
- line-height: 27px;
300
- }
301
- .lineheight_28{
302
- line-height: 28px;
247
+ .lineheight_0{
248
+ line-height: 0;
303
249
  }
304
- .lineheight_29{
305
- line-height: 29px;
250
+ .lineheight_0_1{
251
+ line-height: 0.1;
306
252
  }
307
- .lineheight_30{
308
- line-height: 30px;
253
+ .lineheight_0_2{
254
+ line-height: 0.2;
309
255
  }
310
- .lineheight_32{
311
- line-height: 32px;
256
+ .lineheight_0_3{
257
+ line-height: 0.3;
312
258
  }
313
- .lineheight_33{
314
- line-height: 33px;
259
+ .lineheight_0_4{
260
+ line-height: 0.4;
315
261
  }
316
- .lineheight_34{
317
- line-height: 34px;
262
+ .lineheight_0_5{
263
+ line-height: 0.5;
318
264
  }
319
- .lineheight_35{
320
- line-height: 35px;
265
+ .lineheight_0_6{
266
+ line-height: 0.6;
321
267
  }
322
- .lineheight_36{
323
- line-height: 36px;
268
+ .lineheight_0_7{
269
+ line-height: 0.7;
324
270
  }
325
- .lineheight_38{
326
- line-height: 38px;
271
+ .lineheight_0_8{
272
+ line-height: 0.8;
327
273
  }
328
- .lineheight_40{
329
- line-height: 40px;
274
+ .lineheight_0_9{
275
+ line-height: 0.9;
330
276
  }
331
- .lineheight_41{
332
- line-height: 41px;
277
+ .lineheight_1{
278
+ line-height: 1;
333
279
  }
334
- .lineheight_42{
335
- line-height: 42px;
280
+ .lineheight_1_1{
281
+ line-height: 1.1;
336
282
  }
337
- .lineheight_45{
338
- line-height: 45px;
283
+ .lineheight_1_2{
284
+ line-height: 1.2;
339
285
  }
340
- .lineheight_50{
341
- line-height: 50px;
286
+ .lineheight_1_3{
287
+ line-height: 1.3;
342
288
  }
343
- .lineheight_52{
344
- line-height: 52px;
289
+ .lineheight_1_4{
290
+ line-height: 1.4;
345
291
  }
346
- .lineheight_54{
347
- line-height: 54px;
292
+ .lineheight_1_5{
293
+ line-height: 1.5;
348
294
  }
349
- .lineheight_55{
350
- line-height: 55px;
295
+ .lineheight_1_6{
296
+ line-height: 1.6;
351
297
  }
352
- .lineheight_60{
353
- line-height: 60px;
298
+ .lineheight_1_7{
299
+ line-height: 1.7;
354
300
  }
355
- .lineheight_70{
356
- line-height: 70px;
301
+ .lineheight_1_8{
302
+ line-height: 1.8;
357
303
  }
358
- .lineheight_75{
359
- line-height: 75px;
304
+ .lineheight_1_9{
305
+ line-height: 1.9;
360
306
  }
361
- .lineheight_120{
362
- line-height: 120px;
307
+ .lineheight_2{
308
+ line-height: 2;
363
309
  }
364
310
 
311
+
365
312
  /*............... Lineheight End.........*/
366
313
 
367
314
  /*............... Letterspacing Start.........*/
@@ -369,41 +316,65 @@
369
316
  .letterspacing_inherit{
370
317
  letter-spacing:inherit;
371
318
  }
372
- .letterspacing_01{
319
+ .letterspacing_0_1{
373
320
  letter-spacing: 0.1px;
374
321
  }
375
- .letterspacing_02{
322
+ .letterspacing_0_2{
376
323
  letter-spacing: 0.2px;
377
324
  }
378
- .letterspacing_03{
325
+ .letterspacing_0_3{
379
326
  letter-spacing: 0.3px;
380
327
  }
381
- .letterspacing_04{
328
+ .letterspacing_0_4{
382
329
  letter-spacing: 0.4px;
383
330
  }
384
- .letterspacing_05{
331
+ .letterspacing_0_5{
385
332
  letter-spacing: 0.5px;
386
333
  }
387
- .letterspacing_06{
334
+ .letterspacing_0_6{
388
335
  letter-spacing: 0.6px;
389
336
  }
390
- .letterspacing_07{
337
+ .letterspacing_0_7{
391
338
  letter-spacing: 0.7px;
392
339
  }
393
- .letterspacing_08{
340
+ .letterspacing_0_8{
394
341
  letter-spacing: 0.8px;
395
342
  }
396
- .letterspacing_09{
343
+ .letterspacing_0_9{
397
344
  letter-spacing: 0.9px;
398
345
  }
399
346
  .letterspacing_1{
400
347
  letter-spacing: 1px;
401
348
  }
349
+ .letterspacing_1_1{
350
+ letter-spacing: 1.1px;
351
+ }
352
+ .letterspacing_1_2{
353
+ letter-spacing: 1.2px;
354
+ }
355
+ .letterspacing_1_3{
356
+ letter-spacing: 1.3px;
357
+ }
358
+ .letterspacing_1_4{
359
+ letter-spacing: 1.4px;
360
+ }
361
+ .letterspacing_1_5{
362
+ letter-spacing: 1.5px;
363
+ }
364
+ .letterspacing_1_6{
365
+ letter-spacing: 1.6px;
366
+ }
367
+ .letterspacing_1_7{
368
+ letter-spacing: 1.7px;
369
+ }
370
+ .letterspacing_1_8{
371
+ letter-spacing: 1.8px;
372
+ }
373
+ .letterspacing_1_9{
374
+ letter-spacing: 1.9px;
375
+ }
402
376
  .letterspacing_2{
403
377
  letter-spacing: 2px;
404
378
  }
405
- .letterspacing_4{
406
- letter-spacing: 4px;
407
- }
408
379
 
409
380
  /*............... Letterspacing End.........*/
@@ -1,5 +1,5 @@
1
1
  import { compileClassNames } from '@zohodesk/utils';
2
- import { letterspacingMapping } from './letterSpacingMap';
2
+ import { letterspacingMapping, lineheightMapping } from '../utils';
3
3
  export default function cssJSLogic(_ref) {
4
4
  let {
5
5
  props,
@@ -24,10 +24,14 @@ export default function cssJSLogic(_ref) {
24
24
  $ui_whiteSpace
25
25
  } = props;
26
26
 
27
- if ($ui_letterSpacing && $ui_letterSpacing.match(/\./g)) {
27
+ if ($ui_letterSpacing) {
28
28
  $ui_letterSpacing = letterspacingMapping[$ui_letterSpacing];
29
29
  }
30
30
 
31
+ if ($ui_lineHeight) {
32
+ $ui_lineHeight = lineheightMapping[$ui_lineHeight];
33
+ }
34
+
31
35
  let typographyClass = compileClassNames({
32
36
  [style.reset]: $flag_reset,
33
37
  [style.dotted]: $flag_dotted,