@zohodesk/components 1.6.6 → 1.6.7-exp-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.
Files changed (69) hide show
  1. package/README.md +10 -0
  2. package/es/Avatar/Avatar.module.css +8 -8
  3. package/es/AvatarTeam/AvatarTeam.module.css +30 -30
  4. package/es/Button/css/Button.module.css +19 -19
  5. package/es/Buttongroup/Buttongroup.module.css +3 -5
  6. package/es/Card/Card.module.css +6 -4
  7. package/es/DateTime/DateWidget.module.css +1 -1
  8. package/es/DropBox/DropBoxElement/css/DropBoxElement.module.css +2 -2
  9. package/es/DropDown/DropDownHeading.module.css +4 -4
  10. package/es/DropDown/DropDownItem.module.css +4 -4
  11. package/es/DropDown/DropDownSearch.module.css +3 -3
  12. package/es/Label/Label.module.css +5 -5
  13. package/es/ListItem/ListItem.module.css +19 -30
  14. package/es/MultiSelect/MobileHeader/MobileHeader.module.css +1 -1
  15. package/es/Radio/Radio.module.css +8 -9
  16. package/es/Ribbon/Ribbon.module.css +16 -19
  17. package/es/RippleEffect/RippleEffect.module.css +55 -17
  18. package/es/Stencils/Stencils.module.css +30 -14
  19. package/es/Tag/Tag.module.css +17 -18
  20. package/es/TextBox/TextBox.module.css +9 -9
  21. package/es/TextBoxIcon/TextBoxIcon.module.css +1 -1
  22. package/es/Textarea/Textarea.module.css +18 -18
  23. package/es/Tooltip/Tooltip.module.css +2 -2
  24. package/es/Typography/Typography.js +18 -8
  25. package/es/Typography/__tests__/Typography.spec.js +198 -6
  26. package/es/Typography/__tests__/__snapshots__/Typography.spec.js.snap +1235 -2
  27. package/es/Typography/css/Typography.module.css +4 -0
  28. package/es/Typography/css/cssJSLogic.js +53 -21
  29. package/es/Typography/props/defaultProps.js +4 -3
  30. package/es/Typography/props/propTypes.js +68 -26
  31. package/es/Typography/utils/textHighlighter.js +2 -2
  32. package/es/common/avatarsizes.module.css +16 -16
  33. package/es/shared/InputFieldLine/InputFieldLine.module.css +2 -2
  34. package/es/v1/Switch/css/Switch_v1.module.css +28 -28
  35. package/lib/Avatar/Avatar.module.css +8 -8
  36. package/lib/AvatarTeam/AvatarTeam.module.css +30 -30
  37. package/lib/Button/css/Button.module.css +19 -19
  38. package/lib/Buttongroup/Buttongroup.module.css +3 -5
  39. package/lib/Card/Card.module.css +6 -4
  40. package/lib/DateTime/DateWidget.module.css +1 -1
  41. package/lib/DropBox/DropBoxElement/css/DropBoxElement.module.css +2 -2
  42. package/lib/DropDown/DropDownHeading.module.css +4 -4
  43. package/lib/DropDown/DropDownItem.module.css +4 -4
  44. package/lib/DropDown/DropDownSearch.module.css +3 -3
  45. package/lib/Label/Label.module.css +5 -5
  46. package/lib/ListItem/ListItem.module.css +19 -30
  47. package/lib/MultiSelect/MobileHeader/MobileHeader.module.css +1 -1
  48. package/lib/Radio/Radio.module.css +8 -9
  49. package/lib/Ribbon/Ribbon.module.css +16 -19
  50. package/lib/RippleEffect/RippleEffect.module.css +55 -17
  51. package/lib/Stencils/Stencils.module.css +30 -14
  52. package/lib/Tag/Tag.module.css +17 -18
  53. package/lib/TextBox/TextBox.module.css +9 -9
  54. package/lib/TextBoxIcon/TextBoxIcon.module.css +1 -1
  55. package/lib/Textarea/Textarea.module.css +18 -18
  56. package/lib/Tooltip/Tooltip.module.css +2 -2
  57. package/lib/Typography/Typography.js +15 -5
  58. package/lib/Typography/__tests__/Typography.spec.js +284 -92
  59. package/lib/Typography/__tests__/__snapshots__/Typography.spec.js.snap +1235 -2
  60. package/lib/Typography/css/Typography.module.css +4 -0
  61. package/lib/Typography/css/cssJSLogic.js +38 -6
  62. package/lib/Typography/props/defaultProps.js +6 -3
  63. package/lib/Typography/props/propTypes.js +67 -23
  64. package/lib/Typography/utils/textHighlighter.js +3 -3
  65. package/lib/common/avatarsizes.module.css +16 -16
  66. package/lib/shared/InputFieldLine/InputFieldLine.module.css +2 -2
  67. package/lib/v1/Switch/css/Switch_v1.module.css +28 -28
  68. package/package.json +13 -10
  69. package/_react-cli.config.js +0 -24
@@ -177,6 +177,10 @@
177
177
  white-space: pre-wrap
178
178
  }
179
179
 
180
+ .whiteSpace_breakSpaces {
181
+ white-space: break-spaces;
182
+ }
183
+
180
184
 
181
185
 
182
186
  /*...............Font Size Start.........*/
@@ -17,31 +17,63 @@ function cssJSLogic(_ref) {
17
17
  var props = _ref.props,
18
18
  style = _ref.style;
19
19
  var $flag_reset = props.$flag_reset,
20
+ shouldReset = props.shouldReset,
20
21
  $flag_dotted = props.$flag_dotted,
22
+ isDotted = props.isDotted,
21
23
  $ui_size = props.$ui_size,
24
+ size = props.size,
22
25
  $ui_lineClamp = props.$ui_lineClamp,
26
+ lineClamp = props.lineClamp,
23
27
  $ui_lineHeight = props.$ui_lineHeight,
28
+ lineHeight = props.lineHeight,
24
29
  $ui_display = props.$ui_display,
30
+ display = props.display,
25
31
  $ui_weight = props.$ui_weight,
32
+ weight = props.weight,
26
33
  $ui_typeFace = props.$ui_typeFace,
34
+ typeFace = props.typeFace,
27
35
  $ui_textAlign = props.$ui_textAlign,
36
+ textAlign = props.textAlign,
28
37
  $ui_letterSpacing = props.$ui_letterSpacing,
38
+ letterSpacing = props.letterSpacing,
29
39
  $ui_transform = props.$ui_transform,
40
+ transform = props.transform,
30
41
  $ui_decoration = props.$ui_decoration,
42
+ decoration = props.decoration,
31
43
  $ui_className = props.$ui_className,
44
+ customClass = props.customClass,
32
45
  $ui_wordBreak = props.$ui_wordBreak,
46
+ wordBreak = props.wordBreak,
33
47
  $ui_wordWrap = props.$ui_wordWrap,
34
- $ui_whiteSpace = props.$ui_whiteSpace;
48
+ wordWrap = props.wordWrap,
49
+ $ui_whiteSpace = props.$ui_whiteSpace,
50
+ whiteSpace = props.whiteSpace;
51
+ var finalReset = shouldReset !== undefined ? shouldReset : $flag_reset;
52
+ var finalDotted = isDotted !== undefined ? isDotted : $flag_dotted;
53
+ var finalSize = size !== undefined ? size : $ui_size;
54
+ var finalLineClamp = lineClamp !== undefined ? lineClamp : $ui_lineClamp;
55
+ var finalDisplay = display !== undefined ? display : $ui_display;
56
+ var finalWeight = weight !== undefined ? weight : $ui_weight;
57
+ var finalTypeFace = typeFace !== undefined ? typeFace : $ui_typeFace;
58
+ var finalTextAlign = textAlign !== undefined ? textAlign : $ui_textAlign;
59
+ var finalTransform = transform !== undefined ? transform : $ui_transform;
60
+ var finalDecoration = decoration !== undefined ? decoration : $ui_decoration;
61
+ var finalClassName = customClass !== undefined ? customClass : $ui_className;
62
+ var finalWordBreak = wordBreak !== undefined ? wordBreak : $ui_wordBreak;
63
+ var finalWordWrap = wordWrap !== undefined ? wordWrap : $ui_wordWrap;
64
+ var finalWhiteSpace = whiteSpace !== undefined ? whiteSpace : $ui_whiteSpace;
65
+ var finalLineHeight = lineHeight !== undefined ? lineHeight : $ui_lineHeight;
66
+ var finalLetterSpacing = letterSpacing !== undefined ? letterSpacing : $ui_letterSpacing;
35
67
 
36
- if ($ui_letterSpacing) {
37
- $ui_letterSpacing = _utils2.letterspacingMapping[$ui_letterSpacing];
68
+ if (finalLetterSpacing) {
69
+ finalLetterSpacing = _utils2.letterspacingMapping[finalLetterSpacing];
38
70
  }
39
71
 
40
- if ($ui_lineHeight) {
41
- $ui_lineHeight = _utils2.lineheightMapping[$ui_lineHeight];
72
+ if (finalLineHeight) {
73
+ finalLineHeight = _utils2.lineheightMapping[finalLineHeight];
42
74
  }
43
75
 
44
- var typographyClass = (0, _utils.compileClassNames)((_compileClassNames = {}, _defineProperty(_compileClassNames, style.reset, $flag_reset), _defineProperty(_compileClassNames, style.dotted, $flag_dotted), _defineProperty(_compileClassNames, style["size".concat($ui_size)], !!$ui_size), _defineProperty(_compileClassNames, style["lineclamp_".concat($ui_lineClamp)], !!$ui_lineClamp), _defineProperty(_compileClassNames, style["lineheight_".concat($ui_lineHeight)], !!$ui_lineHeight), _defineProperty(_compileClassNames, style["display_".concat($ui_display)], !!$ui_display), _defineProperty(_compileClassNames, style["font_".concat($ui_weight)], !!$ui_weight), _defineProperty(_compileClassNames, style["fontStyles_".concat($ui_typeFace)], !!$ui_typeFace), _defineProperty(_compileClassNames, style["textalign_".concat($ui_textAlign)], !!$ui_textAlign), _defineProperty(_compileClassNames, style["letterspacing_".concat($ui_letterSpacing)], !!$ui_letterSpacing), _defineProperty(_compileClassNames, style["transform_".concat($ui_transform)], !!$ui_transform), _defineProperty(_compileClassNames, style["decoration_".concat($ui_decoration)], !!$ui_decoration), _defineProperty(_compileClassNames, $ui_className, !!$ui_className), _defineProperty(_compileClassNames, style["wordBreak_".concat($ui_wordBreak)], !!$ui_wordBreak), _defineProperty(_compileClassNames, style["wordWrap_".concat($ui_wordWrap)], !!$ui_wordWrap), _defineProperty(_compileClassNames, style["whiteSpace_".concat($ui_whiteSpace)], !!$ui_whiteSpace), _compileClassNames));
76
+ var typographyClass = (0, _utils.compileClassNames)((_compileClassNames = {}, _defineProperty(_compileClassNames, style.reset, finalReset), _defineProperty(_compileClassNames, style.dotted, finalDotted), _defineProperty(_compileClassNames, style["size".concat(finalSize)], !!finalSize), _defineProperty(_compileClassNames, style["lineclamp_".concat(finalLineClamp)], !!finalLineClamp), _defineProperty(_compileClassNames, style["lineheight_".concat(finalLineHeight)], !!finalLineHeight), _defineProperty(_compileClassNames, style["display_".concat(finalDisplay)], !!finalDisplay), _defineProperty(_compileClassNames, style["font_".concat(finalWeight)], !!finalWeight), _defineProperty(_compileClassNames, style["fontStyles_".concat(finalTypeFace)], !!finalTypeFace), _defineProperty(_compileClassNames, style["textalign_".concat(finalTextAlign)], !!finalTextAlign), _defineProperty(_compileClassNames, style["letterspacing_".concat(finalLetterSpacing)], !!finalLetterSpacing), _defineProperty(_compileClassNames, style["transform_".concat(finalTransform)], !!finalTransform), _defineProperty(_compileClassNames, style["decoration_".concat(finalDecoration)], !!finalDecoration), _defineProperty(_compileClassNames, finalClassName, !!finalClassName), _defineProperty(_compileClassNames, style["wordBreak_".concat(finalWordBreak)], !!finalWordBreak), _defineProperty(_compileClassNames, style["wordWrap_".concat(finalWordWrap)], !!finalWordWrap), _defineProperty(_compileClassNames, style["whiteSpace_".concat(finalWhiteSpace)], !!finalWhiteSpace), _compileClassNames));
45
77
  return {
46
78
  typographyClass: typographyClass
47
79
  };
@@ -4,13 +4,16 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.defaultProps = void 0;
7
+
8
+ var _constants = require("@zohodesk/dotkit/es/utils/constants");
9
+
7
10
  var defaultProps = {
8
11
  $ui_className: '',
9
12
  $ui_tagName: 'div',
10
13
  $flag_reset: false,
11
14
  $flag_dotted: false,
12
- $tagAttributes_text: {},
13
- $a11yAttributes_text: {},
14
- $ui_highlightConfig: {}
15
+ $tagAttributes_text: _constants.DUMMY_OBJECT,
16
+ $a11yAttributes_text: _constants.DUMMY_OBJECT,
17
+ $ui_highlightConfig: _constants.DUMMY_OBJECT
15
18
  };
16
19
  exports.defaultProps = defaultProps;
@@ -15,49 +15,93 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
15
15
 
16
16
  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
17
17
 
18
+ // Define prop types once to avoid duplication
19
+ var propTypeDefinitions = {
20
+ shouldReset: _propTypes["default"].bool,
21
+ display: _propTypes["default"].oneOf(['block', 'inlineBlock', 'inline', 'initial']),
22
+ weight: _propTypes["default"].oneOf(['regular', 'light', 'semibold', 'bold']),
23
+ isDotted: _propTypes["default"].bool,
24
+ textAlign: _propTypes["default"].oneOf(['left', 'right', 'center', 'justify']),
25
+ transform: _propTypes["default"].oneOf(['default', 'upper', 'lower', 'capital']),
26
+ lineClamp: _propTypes["default"].oneOf(['1', '2', '3', '4', '5']),
27
+ typeFace: _propTypes["default"].oneOf(['normal', 'italic']),
28
+ decoration: _propTypes["default"].oneOf(['default', 'underline', 'strike', 'overline']),
29
+ size: _propTypes["default"].oneOf(['7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '24', '25', '26', '28', '29', '30', '32', '34', '35', '36', '40', '50', 'inherit']),
30
+ lineHeight: _propTypes["default"].oneOf(['0', '0.1', '0.2', '0.3', '0.4', '0.5', '0.6', '0.7', '0.8', '0.9', '1', '1.1', '1.2', '1.3', '1.4', '1.5', '1.6', '1.7', '1.8', '1.9', '2', 'normal', 'initial', 'inherit']),
31
+ letterSpacing: _propTypes["default"].oneOf(['0.1', '0.2', '0.3', '0.4', '0.5', '0.6', '0.7', '0.8', '0.9', '1', '1.1', '1.2', '1.3', '1.4', '1.5', '1.6', '1.7', '1.8', '1.9', '2', 'inherit']),
32
+ wordBreak: _propTypes["default"].oneOf(['breakAll', 'keepAll', 'breakWord']),
33
+ wordWrap: _propTypes["default"].oneOf(['normal', 'break']),
34
+ whiteSpace: _propTypes["default"].oneOf(['normal', 'noWrap', 'pre', 'preLine', 'preWrap', 'breakSpaces']),
35
+ customClass: _propTypes["default"].string
36
+ };
18
37
  var typoStyleProps = {
19
- $flag_reset: _propTypes["default"].bool,
20
- $flag_dotted: _propTypes["default"].bool,
21
- $ui_display: _propTypes["default"].oneOf(['block', 'inlineBlock', 'inline', 'initial']),
22
- $ui_weight: _propTypes["default"].oneOf(['regular', 'light', 'semibold', 'bold']),
23
- $ui_textAlign: _propTypes["default"].oneOf(['left', 'right', 'center', 'justify']),
24
- $ui_transform: _propTypes["default"].oneOf(['default', 'upper', 'lower', 'capital']),
25
- $ui_lineClamp: _propTypes["default"].oneOf(['1', '2', '3', '4', '5']),
26
- $ui_typeFace: _propTypes["default"].oneOf(['normal', 'italic']),
27
- $ui_decoration: _propTypes["default"].oneOf(['default', 'underline', 'strike', 'overline']),
28
- $ui_size: _propTypes["default"].oneOf(['7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '24', '25', '26', '28', '29', '30', '32', '34', '35', '36', '40', '50', 'inherit']),
29
- $ui_lineHeight: _propTypes["default"].oneOf(['0', '0.1', '0.2', '0.3', '0.4', '0.5', '0.6', '0.7', '0.8', '0.9', '1', '1.1', '1.2', '1.3', '1.4', '1.5', '1.6', '1.7', '1.8', '1.9', '2', 'normal', 'initial', 'inherit']),
30
- $ui_letterSpacing: _propTypes["default"].oneOf(['0.1', '0.2', '0.3', '0.4', '0.5', '0.6', '0.7', '0.8', '0.9', '1', '1.1', '1.2', '1.3', '1.4', '1.5', '1.6', '1.7', '1.8', '1.9', '2', 'inherit']),
31
- $ui_wordBreak: _propTypes["default"].oneOf(['breakAll', 'keepAll', 'breakWord']),
32
- $ui_wordWrap: _propTypes["default"].oneOf(['normal', 'break']),
33
- $ui_whiteSpace: _propTypes["default"].oneOf(['normal', 'noWrap', 'pre', 'preLine', 'preWrap']),
34
- $ui_className: _propTypes["default"].string
38
+ $flag_reset: propTypeDefinitions.shouldReset,
39
+ shouldReset: propTypeDefinitions.shouldReset,
40
+ $flag_dotted: propTypeDefinitions.isDotted,
41
+ isDotted: propTypeDefinitions.isDotted,
42
+ $ui_display: propTypeDefinitions.display,
43
+ display: propTypeDefinitions.display,
44
+ $ui_weight: propTypeDefinitions.weight,
45
+ weight: propTypeDefinitions.weight,
46
+ $ui_textAlign: propTypeDefinitions.textAlign,
47
+ textAlign: propTypeDefinitions.textAlign,
48
+ $ui_transform: propTypeDefinitions.transform,
49
+ transform: propTypeDefinitions.transform,
50
+ $ui_lineClamp: propTypeDefinitions.lineClamp,
51
+ lineClamp: propTypeDefinitions.lineClamp,
52
+ $ui_typeFace: propTypeDefinitions.typeFace,
53
+ typeFace: propTypeDefinitions.typeFace,
54
+ $ui_decoration: propTypeDefinitions.decoration,
55
+ decoration: propTypeDefinitions.decoration,
56
+ $ui_size: propTypeDefinitions.size,
57
+ size: propTypeDefinitions.size,
58
+ $ui_lineHeight: propTypeDefinitions.lineHeight,
59
+ lineHeight: propTypeDefinitions.lineHeight,
60
+ $ui_letterSpacing: propTypeDefinitions.letterSpacing,
61
+ letterSpacing: propTypeDefinitions.letterSpacing,
62
+ $ui_wordBreak: propTypeDefinitions.wordBreak,
63
+ wordBreak: propTypeDefinitions.wordBreak,
64
+ $ui_wordWrap: propTypeDefinitions.wordWrap,
65
+ wordWrap: propTypeDefinitions.wordWrap,
66
+ $ui_whiteSpace: propTypeDefinitions.whiteSpace,
67
+ whiteSpace: propTypeDefinitions.whiteSpace,
68
+ $ui_className: propTypeDefinitions.customClass,
69
+ customClass: propTypeDefinitions.customClass
35
70
  };
36
71
  var highlightProps = {
37
72
  customStyle: _propTypes["default"].object,
38
73
  shouldExcludeIndices: _propTypes["default"].bool,
39
74
  isCaseSensitive: _propTypes["default"].bool,
40
75
  isWholeWord: _propTypes["default"].bool,
41
- tagName: _propTypes["default"].string,
76
+ as: _propTypes["default"].string,
42
77
  renderHighlight: _propTypes["default"].oneOfType([_propTypes["default"].func, _propTypes["default"].node]),
43
78
  styleConfiguration: _propTypes["default"].shape(typoStyleProps)
44
79
  };
45
80
 
81
+ var highlightDataItemShape = _propTypes["default"].shape(_objectSpread({
82
+ text: _propTypes["default"].string,
83
+ index: _propTypes["default"].oneOfType([_propTypes["default"].arrayOf(_propTypes["default"].number), _propTypes["default"].number])
84
+ }, highlightProps));
85
+
86
+ var highlightConfigShape = _propTypes["default"].shape(_objectSpread({
87
+ data: _propTypes["default"].arrayOf(_propTypes["default"].oneOfType([_propTypes["default"].string, highlightDataItemShape]))
88
+ }, highlightProps));
89
+
46
90
  var propTypes = _objectSpread(_objectSpread({}, typoStyleProps), {}, {
47
91
  children: _propTypes["default"].node,
48
92
  $ui_tagName: _propTypes["default"].string,
93
+ as: _propTypes["default"].string,
49
94
  $i18n_dataTitle: _propTypes["default"].string,
95
+ dataTitle: _propTypes["default"].string,
50
96
  testId: _propTypes["default"].string,
51
97
  customId: _propTypes["default"].string,
52
98
  customStyle: _propTypes["default"].object,
53
99
  $a11yAttributes_text: _propTypes["default"].object,
100
+ a11yAttributes: _propTypes["default"].object,
54
101
  $tagAttributes_text: _propTypes["default"].object,
55
- $ui_highlightConfig: _propTypes["default"].shape(_objectSpread({
56
- data: _propTypes["default"].arrayOf(_propTypes["default"].oneOfType([_propTypes["default"].string, _propTypes["default"].shape(_objectSpread({
57
- text: _propTypes["default"].string,
58
- index: _propTypes["default"].oneOfType([_propTypes["default"].arrayOf(_propTypes["default"].number), _propTypes["default"].number])
59
- }, highlightProps))]))
60
- }, highlightProps))
102
+ tagAttributes: _propTypes["default"].object,
103
+ $ui_highlightConfig: highlightConfigShape,
104
+ highlightConfig: highlightConfigShape
61
105
  });
62
106
 
63
107
  exports.propTypes = propTypes;
@@ -34,8 +34,8 @@ function highlightText(config) {
34
34
  enableCaseSensitiveMatch = _config$isCaseSensiti === void 0 ? false : _config$isCaseSensiti,
35
35
  _config$isWholeWord = config.isWholeWord,
36
36
  matchWholeWordOnly = _config$isWholeWord === void 0 ? false : _config$isWholeWord,
37
- _config$tagName = config.tagName,
38
- wrapperTagName = _config$tagName === void 0 ? 'span' : _config$tagName,
37
+ _config$as = config.as,
38
+ wrapperTagName = _config$as === void 0 ? 'span' : _config$as,
39
39
  customRenderer = config.renderHighlight;
40
40
 
41
41
  if (!sourceText || !(highlightData !== null && highlightData !== void 0 && highlightData.length)) {
@@ -78,7 +78,7 @@ function highlightText(config) {
78
78
  shouldExcludeIndices: itemConfiguration.shouldExcludeIndices !== undefined ? itemConfiguration.shouldExcludeIndices : shouldExcludeIndices,
79
79
  isCaseSensitive: itemConfiguration.isCaseSensitive !== undefined ? itemConfiguration.isCaseSensitive : enableCaseSensitiveMatch,
80
80
  matchWholeWordOnly: itemConfiguration.isWholeWord !== undefined ? itemConfiguration.isWholeWord : matchWholeWordOnly,
81
- wrapperTagName: itemConfiguration.tagName !== undefined ? itemConfiguration.tagName : wrapperTagName,
81
+ wrapperTagName: itemConfiguration.as !== undefined ? itemConfiguration.as : wrapperTagName,
82
82
  customStyle: customStyle,
83
83
  customRenderer: itemConfiguration.renderHighlight !== undefined ? itemConfiguration.renderHighlight : customRenderer,
84
84
  highlightClasses: typographyClass,
@@ -1,8 +1,8 @@
1
1
  /*Avatar common Sizes*/
2
2
  .varClass {
3
3
  /* avatar size default variables */
4
- --avatar_width: 34px;
5
- --avatar_height: 34px;
4
+ --avatar_width: var(--zd_size34);
5
+ --avatar_height: var(--zd_size34);
6
6
  }
7
7
  .small,
8
8
  .xsmall,
@@ -16,34 +16,34 @@
16
16
  height: var(--avatar_height);
17
17
  }
18
18
  .small {
19
- --avatar_height: 22px;
20
- --avatar_width: 22px;
19
+ --avatar_height: var(--zd_size22);
20
+ --avatar_width: var(--zd_size22);
21
21
  }
22
22
  .xxsmall {
23
- --avatar_height: 18px;
24
- --avatar_width: 18px;
23
+ --avatar_height: var(--zd_size18);
24
+ --avatar_width: var(--zd_size18);
25
25
  }
26
26
  .xsmall {
27
- --avatar_height: 30px;
28
- --avatar_width: 30px;
27
+ --avatar_height: var(--zd_size30);
28
+ --avatar_width: var(--zd_size30);
29
29
  }
30
30
 
31
31
  .medium {
32
- --avatar_height: 34px;
33
- --avatar_width: 34px;
32
+ --avatar_height: var(--zd_size34);
33
+ --avatar_width: var(--zd_size34);
34
34
  }
35
35
 
36
36
  .xmedium {
37
- --avatar_height: 40px;
38
- --avatar_width: 40px;
37
+ --avatar_height: var(--zd_size40);
38
+ --avatar_width: var(--zd_size40);
39
39
  }
40
40
 
41
41
  .large {
42
- --avatar_height: 60px;
43
- --avatar_width: 60px;
42
+ --avatar_height: var(--zd_size60);
43
+ --avatar_width: var(--zd_size60);
44
44
  }
45
45
 
46
46
  .xlarge {
47
- --avatar_height: 80px;
48
- --avatar_width: 80px;
47
+ --avatar_height: var(--zd_size80);
48
+ --avatar_width: var(--zd_size80);
49
49
  }
@@ -59,12 +59,12 @@
59
59
 
60
60
  .padding_small,
61
61
  .padding_xmedium {
62
- --local_padding: 3px;
62
+ --local_padding: var(--zd_size3);
63
63
  }
64
64
 
65
65
  .padding_medium,
66
66
  .padding_large {
67
- --local_padding: 8px;
67
+ --local_padding: var(--zd_size8);
68
68
  }
69
69
 
70
70
  .xmedium {
@@ -4,47 +4,47 @@
4
4
  gap: var(--zd_size6) ;
5
5
  }
6
6
  .small {
7
- --local-switch-track-width: 22px;
8
- --local-switch-track-height: 12px;
7
+ --local-switch-track-width: var(--zd_size22);
8
+ --local-switch-track-height: var(--zd_size12);
9
9
  --local-switch-track-border-radius: 8px;
10
- --local-switch-thumb-size: 10px;
11
- --local-switch-onLabel-height: 6px;
12
- --local-switch-onLabel-left: 5px;
13
- --local-switch-offLabel-size: 7px;
14
- --local-switch-offLabel-right: 2px;
10
+ --local-switch-thumb-size: var(--zd_size10);
11
+ --local-switch-onLabel-height: var(--zd_size6);
12
+ --local-switch-onLabel-left: var(--zd_size5);
13
+ --local-switch-offLabel-size: var(--zd_size7);
14
+ --local-switch-offLabel-right: var(--zd_size2);
15
15
  --local-switch-onLabel-scaleX: 1.2;
16
16
  }
17
17
  .medium {
18
- --local-switch-track-width: 28px;
19
- --local-switch-track-height: 16px;
18
+ --local-switch-track-width: var(--zd_size28);
19
+ --local-switch-track-height: var(--zd_size16);
20
20
  --local-switch-track-border-radius: 16px;
21
- --local-switch-thumb-size: 14px;
22
- --local-switch-onLabel-height: 8px;
23
- --local-switch-onLabel-left: 6px;
24
- --local-switch-offLabel-size: 8px;
25
- --local-switch-offLabel-right: 3px;
21
+ --local-switch-thumb-size: var(--zd_size14);
22
+ --local-switch-onLabel-height: var(--zd_size8);
23
+ --local-switch-onLabel-left: var(--zd_size6);
24
+ --local-switch-offLabel-size: var(--zd_size8);
25
+ --local-switch-offLabel-right: var(--zd_size3);
26
26
  --local-switch-onLabel-scaleX: 1.4;
27
27
  }
28
28
  .large {
29
- --local-switch-track-width: 34px;
30
- --local-switch-track-height: 20px;
29
+ --local-switch-track-width: var(--zd_size34);
30
+ --local-switch-track-height: var(--zd_size20);
31
31
  --local-switch-track-border-radius: 10px;
32
- --local-switch-thumb-size: 18px;
33
- --local-switch-onLabel-height: 10px;
34
- --local-switch-onLabel-left: 7px;
35
- --local-switch-offLabel-size: 9px;
36
- --local-switch-offLabel-right: 4px;
32
+ --local-switch-thumb-size: var(--zd_size18);
33
+ --local-switch-onLabel-height: var(--zd_size10);
34
+ --local-switch-onLabel-left: var(--zd_size7);
35
+ --local-switch-offLabel-size: var(--zd_size9);
36
+ --local-switch-offLabel-right: var(--zd_size4);
37
37
  --local-switch-onLabel-scaleX: 1.6;
38
38
  }
39
39
  .xlarge {
40
- --local-switch-track-width: 40px;
41
- --local-switch-track-height: 24px;
40
+ --local-switch-track-width: var(--zd_size40);
41
+ --local-switch-track-height: var(--zd_size24);
42
42
  --local-switch-track-border-radius: 12px;
43
- --local-switch-thumb-size: 22px;
44
- --local-switch-onLabel-height: 12px;
45
- --local-switch-onLabel-left: 8px;
46
- --local-switch-offLabel-size: 10px;
47
- --local-switch-offLabel-right: 5px;
43
+ --local-switch-thumb-size: var(--zd_size22);
44
+ --local-switch-onLabel-height: var(--zd_size12);
45
+ --local-switch-onLabel-left: var(--zd_size8);
46
+ --local-switch-offLabel-size: var(--zd_size10);
47
+ --local-switch-offLabel-right: var(--zd_size5);
48
48
  --local-switch-onLabel-scaleX: 1.8;
49
49
  }
50
50
  .disabled, .readonly {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zohodesk/components",
3
- "version": "1.6.6",
3
+ "version": "1.6.7-exp-0",
4
4
  "main": "es/index.js",
5
5
  "module": "es/index.js",
6
6
  "private": false,
@@ -28,13 +28,13 @@
28
28
  "build:lib": "cbt build:lib src,assets lib,assets",
29
29
  "build:es": "cbt build:es src,assets es,assets",
30
30
  "build:es:watch": "cbt build:es src es",
31
- "build": "npm run theme:validate && npm run build:lib && npm run build:es",
31
+ "build": "npm run theme:validate && npm run build:lib && npm run build:es && npm run cssVariableConvert ",
32
32
  "build:local": "npm run build",
33
33
  "build:watch": "npm run build:es:watch --module:mode=dev -- -w",
34
34
  "coverage": "react-cli coverage",
35
35
  "prepare": "npm run init && npm run css:build ",
36
- "prepublishOnly": "node prePublish.js && npm run download_only && npm run css:review && npm run review:props ",
37
- "postpublish": "node postPublish.js",
36
+ "prepublishOnly": "node ../prePublish.js && npm run download_only && npm run css:review && npm run review:props ",
37
+ "postpublish": "node ../postPublish.js",
38
38
  "report": "react-cli publish:report",
39
39
  "test": "react-cli test",
40
40
  "customTest": "node ./__testUtils__/runTest.js",
@@ -44,7 +44,7 @@
44
44
  "build:external": "npm run clean && npm run init && npm run docsjs:build && npm run build:externalDocCopy && npm run externalDocHTMLChange",
45
45
  "download": "npm run download_only && cd ../ && npm run download",
46
46
  "download_only": "react-cli clean ./node_modules ./package-lock.json && npm install --legacy-peer-deps",
47
- "expublish": "npm publish --tag experimental-version",
47
+ "expublish": "node ../publish.js -- exp",
48
48
  "css:lineheight:validate": "node ./node_modules/@zohodesk-private/node-plugins/es/lineheight_automation/lineHeightErrorCheck.js ./src/",
49
49
  "variable:addignore": "node ./node_modules/@zohodesk-private/css-variable-migrator/es/variableIgnore.js ./src",
50
50
  "variable:convert": "node ./node_modules/@zohodesk-private/css-variable-migrator/es/pxParserPostcss.js ./src",
@@ -61,7 +61,10 @@
61
61
  "css:layer_config_validate": "node ./node_modules/@zohodesk-private/node-plugins/es/css_layer_generator/validate.js css_layer_config.json ./src/ ./assets",
62
62
  "css:build": "npm run css:layer_config_validate && npm run css:layer_generate_order && npm run build",
63
63
  "css:layer_remove": "node ./node_modules/@zohodesk-private/node-plugins/es/css_layer_generator/remove_layer.js ./es ./assets css_layer_config.json --rewrite=src=es --rewrite=assets=assets",
64
- "css:audit": "npx css-audit --common-css=common/common.module.css --dir src --port 8085 --report "
64
+ "css:audit": "npx css-audit --common-css=common/common.module.css --dir src --port 8085 --report ",
65
+ "cssVariableConvert": "react-cli variableConverter ./lib ./lib && react-cli variableConverter ./es ./es",
66
+ "publish": "node ../publish.js",
67
+ "check_package": "node ../check_dependencies.js"
65
68
  },
66
69
  "devDependencies": {
67
70
  "postcss-discard-comments": "^7.0.5",
@@ -80,9 +83,9 @@
80
83
  "@zohodesk/hooks": "2.0.8",
81
84
  "@zohodesk/icons": "1.2.8",
82
85
  "@zohodesk/layout": "3.1.0",
83
- "@zohodesk/svg": "1.3.3",
86
+ "@zohodesk/svg": "1.3.4",
84
87
  "@zohodesk/utils": "1.3.16",
85
- "@zohodesk/variables": "1.3.0",
88
+ "@zohodesk/variables": "1.3.1",
86
89
  "@zohodesk/virtualizer": "1.0.13",
87
90
  "react-sortable-hoc": "^0.8.3",
88
91
  "velocity-react": "1.4.3",
@@ -98,8 +101,8 @@
98
101
  },
99
102
  "peerDependencies": {
100
103
  "@zohodesk/icons": "1.2.8",
101
- "@zohodesk/variables": "1.3.0",
102
- "@zohodesk/svg": "1.3.3",
104
+ "@zohodesk/variables": "1.3.1",
105
+ "@zohodesk/svg": "1.3.4",
103
106
  "@zohodesk/virtualizer": "1.0.13",
104
107
  "velocity-react": "1.4.3",
105
108
  "react-sortable-hoc": "^0.8.3",
@@ -1,24 +0,0 @@
1
- exports.config = {
2
- "preprocess": {
3
- "runner": "./preprocess/index.js"
4
- },
5
- "css": {
6
- "plugins": {
7
- "hasRTL": true,
8
- "cssVariableReplacement": true
9
- },
10
- "patterns": {
11
- "cssVariableReplacement": [
12
- "**/src/**",
13
- "**/lib/**",
14
- "**/es/**",
15
- "!**/node_modules/**"
16
- ],
17
- "hasRTL": [
18
- "**/src/**",
19
- "!**/node_modules/**"
20
- ]
21
- },
22
- "cssVariableReplacementConfig": "./node_modules/@zohodesk-private/css-variable-migrator/es/config/cssVariableReplacementOptions.json"
23
- }
24
- }