@zohodesk/components 1.6.22-exp-1 → 1.6.23-exp-2

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 (106) hide show
  1. package/README.md +4 -0
  2. package/es/Accordion/Accordion.js +2 -1
  3. package/es/Accordion/AccordionItem.js +3 -2
  4. package/es/AppContainer/AppContainer.js +2 -1
  5. package/es/Avatar/Avatar.js +5 -4
  6. package/es/AvatarTeam/AvatarTeam.js +4 -3
  7. package/es/Button/Button.js +5 -4
  8. package/es/Buttongroup/Buttongroup.js +4 -3
  9. package/es/CheckBox/CheckBox.js +8 -7
  10. package/es/ColorSelect/_shared/ColorIndicator/ColorIndicator.js +2 -1
  11. package/es/DateTime/CalendarView.js +2 -1
  12. package/es/DateTime/DateTime.js +5 -4
  13. package/es/DateTime/DateTimePopupFooter.js +2 -1
  14. package/es/DateTime/DateWidget.js +4 -3
  15. package/es/DateTime/Time.js +2 -1
  16. package/es/DropBox/DropBox.js +3 -2
  17. package/es/DropBox/DropBoxElement/DropBoxElement.js +6 -5
  18. package/es/DropDown/DropDown.js +2 -1
  19. package/es/DropDown/DropDownHeading.js +2 -1
  20. package/es/DropDown/DropDownItem.js +6 -5
  21. package/es/DropDown/DropDownSearch.js +2 -1
  22. package/es/DropDown/DropDownSeparator.js +2 -1
  23. package/es/Label/Label.js +3 -2
  24. package/es/ListItem/ListItemWithAvatar.js +2 -1
  25. package/es/ListItem/ListItemWithCheckBox.js +2 -1
  26. package/es/ListItem/ListItemWithIcon.js +3 -2
  27. package/es/ListItem/ListItemWithRadio.js +2 -1
  28. package/es/MultiSelect/AdvancedGroupMultiSelect.js +8 -7
  29. package/es/MultiSelect/AdvancedMultiSelect.js +4 -3
  30. package/es/MultiSelect/EmptyState.js +5 -4
  31. package/es/MultiSelect/MobileHeader/MobileHeader.js +2 -1
  32. package/es/MultiSelect/MultiSelect.js +6 -5
  33. package/es/MultiSelect/MultiSelectWithAvatar.js +3 -2
  34. package/es/PopOver/PopOver.js +3 -2
  35. package/es/Radio/Radio.js +4 -3
  36. package/es/Ribbon/Ribbon.js +7 -6
  37. package/es/Select/GroupSelect.js +5 -4
  38. package/es/Select/Select.js +4 -3
  39. package/es/Select/SelectWithAvatar.js +4 -3
  40. package/es/Select/SelectWithIcon.js +4 -3
  41. package/es/Stencils/Stencils.js +2 -1
  42. package/es/Switch/Switch.js +3 -2
  43. package/es/Tab/Tabs.js +4 -3
  44. package/es/Tag/Tag.js +5 -4
  45. package/es/TextBox/TextBox.js +2 -1
  46. package/es/Textarea/Textarea.js +2 -1
  47. package/es/Tooltip/Tooltip.js +5 -4
  48. package/es/deprecated/Switch/Switch.js +3 -2
  49. package/es/semantic/Button/Button.js +2 -1
  50. package/es/v1/Button/Button.js +3 -1
  51. package/es/v1/Switch/Switch.js +4 -3
  52. package/es/v1/shared/Loader/Loader.js +4 -3
  53. package/es/v1/shared/SuccessTick/SuccessTick.js +2 -1
  54. package/lib/Accordion/Accordion.js +3 -1
  55. package/lib/Accordion/AccordionItem.js +4 -2
  56. package/lib/AppContainer/AppContainer.js +3 -1
  57. package/lib/Avatar/Avatar.js +6 -4
  58. package/lib/AvatarTeam/AvatarTeam.js +4 -2
  59. package/lib/Button/Button.js +6 -4
  60. package/lib/Buttongroup/Buttongroup.js +5 -3
  61. package/lib/CheckBox/CheckBox.js +9 -7
  62. package/lib/ColorSelect/_shared/ColorIndicator/ColorIndicator.js +3 -1
  63. package/lib/DateTime/CalendarView.js +3 -1
  64. package/lib/DateTime/DateTime.js +6 -4
  65. package/lib/DateTime/DateTimePopupFooter.js +3 -1
  66. package/lib/DateTime/DateWidget.js +5 -3
  67. package/lib/DateTime/Time.js +3 -1
  68. package/lib/DropBox/DropBox.js +4 -2
  69. package/lib/DropBox/DropBoxElement/DropBoxElement.js +7 -5
  70. package/lib/DropDown/DropDown.js +3 -1
  71. package/lib/DropDown/DropDownHeading.js +3 -1
  72. package/lib/DropDown/DropDownItem.js +7 -5
  73. package/lib/DropDown/DropDownSearch.js +3 -1
  74. package/lib/DropDown/DropDownSeparator.js +3 -1
  75. package/lib/Label/Label.js +3 -1
  76. package/lib/ListItem/ListItemWithAvatar.js +3 -1
  77. package/lib/ListItem/ListItemWithCheckBox.js +3 -1
  78. package/lib/ListItem/ListItemWithIcon.js +4 -2
  79. package/lib/ListItem/ListItemWithRadio.js +3 -1
  80. package/lib/MultiSelect/AdvancedGroupMultiSelect.js +8 -6
  81. package/lib/MultiSelect/AdvancedMultiSelect.js +4 -2
  82. package/lib/MultiSelect/EmptyState.js +6 -4
  83. package/lib/MultiSelect/MobileHeader/MobileHeader.js +3 -1
  84. package/lib/MultiSelect/MultiSelect.js +6 -4
  85. package/lib/MultiSelect/MultiSelectWithAvatar.js +4 -2
  86. package/lib/PopOver/PopOver.js +4 -2
  87. package/lib/Radio/Radio.js +5 -3
  88. package/lib/Ribbon/Ribbon.js +7 -5
  89. package/lib/Select/GroupSelect.js +6 -4
  90. package/lib/Select/Select.js +5 -3
  91. package/lib/Select/SelectWithAvatar.js +5 -3
  92. package/lib/Select/SelectWithIcon.js +5 -3
  93. package/lib/Stencils/Stencils.js +3 -1
  94. package/lib/Switch/Switch.js +4 -2
  95. package/lib/Tab/Tabs.js +5 -3
  96. package/lib/Tag/Tag.js +6 -4
  97. package/lib/TextBox/TextBox.js +3 -1
  98. package/lib/Textarea/Textarea.js +3 -1
  99. package/lib/Tooltip/Tooltip.js +6 -4
  100. package/lib/deprecated/Switch/Switch.js +4 -2
  101. package/lib/semantic/Button/Button.js +3 -1
  102. package/lib/v1/Button/Button.js +3 -1
  103. package/lib/v1/Switch/Switch.js +5 -3
  104. package/lib/v1/shared/Loader/Loader.js +5 -3
  105. package/lib/v1/shared/SuccessTick/SuccessTick.js +3 -1
  106. package/package.json +1 -1
package/README.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  Dot UI is a customizable React component library built to deliver a clean, accessible, and developer-friendly UI experience. It offers a growing set of reusable components designed to align with modern design systems and streamline application development across projects.
4
4
 
5
+ # 1.6.23
6
+
7
+ - Removed the empty string fallback from the `font-family` variable definition in `AppContainer`, as the font fallback behavior is now handled correctly.
8
+
5
9
  # 1.6.22
6
10
 
7
11
  - Reordered className values to ensure customClass is always appended last to adopt CSS utility .
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
2
  import { Accordion_defaultProps } from "./props/defaultProps";
3
3
  import { Accordion_propTypes } from "./props/propTypes";
4
+ import { cn } from "@dot-system/css-utility";
4
5
  export default class Accordion extends React.Component {
5
6
  constructor(props) {
6
7
  super(props);
@@ -62,7 +63,7 @@ export default class Accordion extends React.Component {
62
63
  ariaHaspopup
63
64
  } = a11y;
64
65
  return /*#__PURE__*/React.createElement("div", {
65
- className: className ? className : '',
66
+ className: cn(className ? className : ''),
66
67
  style: {
67
68
  height
68
69
  },
@@ -3,6 +3,7 @@ import { AccordionItem_defaultProps } from "./props/defaultProps";
3
3
  import { AccordionItem_propTypes } from "./props/propTypes";
4
4
  import VelocityAnimation from "../VelocityAnimation/VelocityAnimation/VelocityAnimation";
5
5
  import VelocityAnimationGroup from "../VelocityAnimation/VelocityAnimationGroup/VelocityAnimationGroup";
6
+ import { cn } from "@dot-system/css-utility";
6
7
  export default class AccordionItem extends React.Component {
7
8
  constructor(props) {
8
9
  super(props);
@@ -36,13 +37,13 @@ export default class AccordionItem extends React.Component {
36
37
  role
37
38
  } = a11y;
38
39
  return /*#__PURE__*/React.createElement("div", {
39
- className: className ? className : '',
40
+ className: cn(className ? className : ''),
40
41
  "data-id": dataId,
41
42
  "data-test-id": dataId,
42
43
  role: role,
43
44
  "data-selector-id": dataSelectorId
44
45
  }, /*#__PURE__*/React.createElement("div", {
45
- className: innerClass ? innerClass : '',
46
+ className: cn(innerClass ? innerClass : ''),
46
47
  onClick: selectMenu.bind(this, id)
47
48
  }, children[0]), unMountItem ? /*#__PURE__*/React.createElement(VelocityAnimationGroup, {
48
49
  name: "slideDown",
@@ -5,6 +5,7 @@ import { defaultProps } from "./props/defaultProps";
5
5
  import { propTypes } from "./props/propTypes";
6
6
  import { Container, Box } from "../Layout";
7
7
  import Tooltip from "../Tooltip/Tooltip";
8
+ import { cn } from "@dot-system/css-utility";
8
9
  import "../common/basic.module.css";
9
10
  import '@zohodesk/variables/assets/colorVariables.module.css';
10
11
  import '@zohodesk/variables/assets/dotVariables.module.css';
@@ -119,7 +120,7 @@ export default class AppContainer extends React.Component {
119
120
  }, ContainerProps, ExtraProps), /*#__PURE__*/React.createElement(Box, {
120
121
  flexible: true
121
122
  }, children)), needTooltip ? /*#__PURE__*/React.createElement("div", _extends({}, ExtraProps, {
122
- className: `${style.container} ${style.tooltip} ${tooltipParentClass}`,
123
+ className: cn(`${style.container} ${style.tooltip} ${tooltipParentClass}`),
123
124
  "data-id": `${dataId}_tooltip`,
124
125
  "data-test-id": `${dataId}_tooltip`,
125
126
  "data-selector-id": `${dataSelectorId}_tooltip`
@@ -5,6 +5,7 @@ import { defaultProps } from "./props/defaultProps";
5
5
  import { propTypes } from "./props/propTypes";
6
6
  import { getInitial } from "../utils/getInitial";
7
7
  import AvatarSize from "../Provider/AvatarSize";
8
+ import { cn } from "@dot-system/css-utility";
8
9
  import style from "./Avatar.module.css";
9
10
  /*
10
11
  1. need to change name into firstName lastName
@@ -156,7 +157,7 @@ export default class Avatar extends React.Component {
156
157
  let borderStyle = (showDefaultBorder || !src || !showAvatar || showInitial) && needBorder ? `${style.border} ${borderOnActive ? style.borderOnActive : border ? style.borderOnHover : ''} ` : '';
157
158
  borderStyle = showAlternateAvatar ? '' : borderStyle;
158
159
  return /*#__PURE__*/React.createElement("div", _extends({
159
- className: `${style.avatar} ${style[size]} ${AvatarSize(size)} ${style[shapeStyle]} ${style[palette]} ${textStyle} ${borderStyle} ${customClass ? customClass : ''}`,
160
+ className: cn(`${style.avatar} ${style[size]} ${AvatarSize(size)} ${style[shapeStyle]} ${style[palette]} ${textStyle} ${borderStyle} ${customClass ? customClass : ''}`),
160
161
  "data-title": needTitle ? title ? title : name : null,
161
162
  "data-id": dataId,
162
163
  "data-test-id": dataId,
@@ -164,12 +165,12 @@ export default class Avatar extends React.Component {
164
165
  "data-selector-id": dataSelectorId,
165
166
  tabIndex: onClick ? 0 : null
166
167
  }, AvatarProps), showInitial && !showAlternateAvatar && /*#__PURE__*/React.createElement("span", {
167
- className: `${style.initial}`,
168
+ className: cn(`${style.initial}`),
168
169
  "data-id": `${dataId}_AvatarInitial`,
169
170
  "data-test-id": `${dataId}_AvatarInitial`,
170
171
  "data-selector-id": `${dataSelectorId}_AvatarInitial`
171
172
  }, initial), (showAvatar || showAlternateAvatar) && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("img", {
172
- className: `${style.image} ${isAnimate ? style.animate : ''} ${needInnerBorder ? style.innerBorder : ''}`,
173
+ className: cn(`${style.image} ${isAnimate ? style.animate : ''} ${needInnerBorder ? style.innerBorder : ''}`),
173
174
  "data-id": `${dataId}_AvatarImg`,
174
175
  "data-test-id": `${dataId}_AvatarImg`,
175
176
  "data-selector-id": `${dataSelectorId}_AvatarImg`,
@@ -179,7 +180,7 @@ export default class Avatar extends React.Component {
179
180
  src: showAlternateAvatar ? alternateSrc : src,
180
181
  alt: name
181
182
  }), showDefaultBorder ? null : /*#__PURE__*/React.createElement("span", {
182
- className: `${style.shadow} ${textStyle} `
183
+ className: cn(`${style.shadow} ${textStyle} `)
183
184
  })));
184
185
  }
185
186
 
@@ -4,6 +4,7 @@ import React from 'react';
4
4
  import { defaultProps } from "./props/defaultProps";
5
5
  import { propTypes } from "./props/propTypes";
6
6
  import Avatar from "../Avatar/Avatar";
7
+ import { cn } from "@dot-system/css-utility";
7
8
  import style from "./AvatarTeam.module.css";
8
9
  /* once avatar support firstname lastname and pattern
9
10
  pass lastName as team name and pattern ["FIRST_NAME","LAST_NAME"] as props
@@ -48,7 +49,7 @@ export default class AvatarTeam extends React.Component {
48
49
  } = customClass;
49
50
  let border = borderOnHover || onClick;
50
51
  return /*#__PURE__*/React.createElement("span", _extends({
51
- className: `${style.container} ${borderOnActive ? style.borderOnActive : border ? style.borderOnHover : ''} `,
52
+ className: cn(`${style.container} ${borderOnActive ? style.borderOnActive : border ? style.borderOnHover : ''} `),
52
53
  "data-id": dataId,
53
54
  "data-test-id": dataId,
54
55
  "data-selector-id": dataSelectorId
@@ -68,8 +69,8 @@ export default class AvatarTeam extends React.Component {
68
69
  needBorder: needBorder,
69
70
  needDefaultBorder: needDefaultBorder
70
71
  }, AvatarProps)), /*#__PURE__*/React.createElement("span", {
71
- className: `${style.team} ${isFilled ? `${style[`${palette}Filled`]}` : style.nofill}
72
- ${style[`${size}team`]} ${customAvatarTeam}`
72
+ className: cn(`${style.team} ${isFilled ? `${style[`${palette}Filled`]}` : style.nofill}
73
+ ${style[`${size}team`]} ${customAvatarTeam}`)
73
74
  }));
74
75
  }
75
76
 
@@ -10,6 +10,7 @@ import { mergeStyle } from '@zohodesk/utils'; // component registry
10
10
 
11
11
  import { withComponentRegistrar } from '@zohodesk/dotkit/es/react/ComponentRegistry'; // css
12
12
 
13
+ import { cn } from "@dot-system/css-utility";
13
14
  import style from "./css/Button.module.css";
14
15
  /*
15
16
  Button text and children props?
@@ -45,7 +46,7 @@ function Button(props) {
45
46
  });
46
47
  let statusLower = status.toLowerCase();
47
48
  return /*#__PURE__*/React.createElement("button", _extends({
48
- className: buttonClass,
49
+ className: cn(buttonClass),
49
50
  "data-id": disabled ? `${dataId}_disabled` : dataId,
50
51
  "data-test-id": disabled ? `${dataId}_disabled` : dataId,
51
52
  disabled: disabled || statusLower === 'loading',
@@ -57,11 +58,11 @@ function Button(props) {
57
58
  }, customProps, a11y, {
58
59
  id: id
59
60
  }), children ? children : text, statusLower !== 'none' && needAppearance && /*#__PURE__*/React.createElement("div", {
60
- className: finalStyle.overlay
61
+ className: cn(finalStyle.overlay)
61
62
  }, /*#__PURE__*/React.createElement("div", {
62
- className: loaderParentClass
63
+ className: cn(loaderParentClass)
63
64
  }, /*#__PURE__*/React.createElement("div", {
64
- className: loaderChildClass
65
+ className: cn(loaderChildClass)
65
66
  }))));
66
67
  }
67
68
 
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
2
  import { defaultProps } from "./props/defaultProps";
3
3
  import { propTypes } from "./props/propTypes";
4
+ import { cn } from "@dot-system/css-utility";
4
5
  import style from "./Buttongroup.module.css";
5
6
  /* eslint css-modules/no-unused-class: [2, { markAsUsed: ['footer','header',
6
7
  'tab','alignleft','alignright','aligncenter' ] }] */
@@ -18,17 +19,17 @@ export default class Buttongroup extends React.Component {
18
19
  let btnGroup = [];
19
20
  children && children.forEach(child => {
20
21
  let btnRight = /*#__PURE__*/React.createElement("span", {
21
- className: style[type]
22
+ className: cn(style[type])
22
23
  }, child);
23
24
  btnGroup.push(btnRight);
24
25
  });
25
26
  return /*#__PURE__*/React.createElement("div", {
26
- className: `${style.buttonGroup} ${style[type]} ${customClass ? customClass : ''}`,
27
+ className: cn(`${style.buttonGroup} ${style[type]} ${customClass ? customClass : ''}`),
27
28
  "data-id": dataId,
28
29
  "data-test-id": dataId,
29
30
  "data-selector-id": dataSelectorId
30
31
  }, /*#__PURE__*/React.createElement("div", {
31
- className: style[`align${buttonPosition}`]
32
+ className: cn(style[`align${buttonPosition}`])
32
33
  }, children));
33
34
  }
34
35
 
@@ -7,6 +7,7 @@ import Label from "../Label/Label";
7
7
  import Typography from "../Typography/Typography";
8
8
  import { Container, Box } from "../Layout";
9
9
  import CssProvider from "../Provider/CssProvider";
10
+ import { cn } from "@dot-system/css-utility";
10
11
  import style from "./CheckBox.module.css";
11
12
  export default class CheckBox extends React.Component {
12
13
  constructor(props) {
@@ -108,14 +109,14 @@ export default class CheckBox extends React.Component {
108
109
  ref: getRef,
109
110
  name: name
110
111
  }), /*#__PURE__*/React.createElement("label", {
111
- className: `${style.checkbox} ${accessMode} ${style[size]} ${customCBoxSize}`
112
+ className: cn(`${style.checkbox} ${accessMode} ${style[size]} ${customCBoxSize}`)
112
113
  }, activeStyle == 'tick' ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("svg", {
113
114
  xmlns: "http://www.w3.org/2000/svg",
114
115
  viewBox: "0 0 40 40"
115
116
  }, checked ? /*#__PURE__*/React.createElement("path", {
116
117
  xmlns: "http://www.w3.org/2000/svg",
117
118
  d: "M39,20V35a4,4,0,0,1-4,4H5a4,4,0,0,1-4-4V5A4,4,0,0,1,5,1H28.44",
118
- className: `${style.cbBox}`
119
+ className: cn(`${style.cbBox}`)
119
120
  }) : /*#__PURE__*/React.createElement("rect", {
120
121
  xmlns: "http://www.w3.org/2000/svg",
121
122
  x: "1",
@@ -123,14 +124,14 @@ export default class CheckBox extends React.Component {
123
124
  width: "38",
124
125
  height: "38",
125
126
  rx: "4",
126
- className: `${style.cbBox}`
127
+ className: cn(`${style.cbBox}`)
127
128
  })), checked ? /*#__PURE__*/React.createElement("svg", {
128
129
  xmlns: "http://www.w3.org/2000/svg",
129
130
  viewBox: "0 0 44 44",
130
- className: `${style.tick} ${style[`${size}tick`]} ${disabled ? CssProvider('isDisabled') : ''} ${customTickSize}`
131
+ className: cn(`${style.tick} ${style[`${size}tick`]} ${disabled ? CssProvider('isDisabled') : ''} ${customTickSize}`)
131
132
  }, /*#__PURE__*/React.createElement("polyline", {
132
133
  points: "12.56 19 19.61 26.06 40.39 5.28",
133
- className: `${style.tickPath} ${style.checkedtickPath}`
134
+ className: cn(`${style.tickPath} ${style.checkedtickPath}`)
134
135
  })) : null) : /*#__PURE__*/React.createElement("svg", {
135
136
  xmlns: "http://www.w3.org/2000/svg",
136
137
  viewBox: "0 0 40 40"
@@ -141,10 +142,10 @@ export default class CheckBox extends React.Component {
141
142
  width: "38",
142
143
  height: "38",
143
144
  rx: "4",
144
- className: `${style.cbBox}`
145
+ className: cn(`${style.cbBox}`)
145
146
  }), checked ? /*#__PURE__*/React.createElement("line", {
146
147
  xmlns: "http://www.w3.org/2000/svg",
147
- className: `${style.linePath} ${style.cbBox}`,
148
+ className: cn(`${style.linePath} ${style.cbBox}`),
148
149
  x1: "11.47",
149
150
  y1: "20",
150
151
  x2: "28.53",
@@ -4,6 +4,7 @@ import React from 'react';
4
4
  import { defaultProps } from "./props/defaultProps";
5
5
  import { propTypes } from "./props/propTypes";
6
6
  import { DUMMY_OBJECT } from "../../../utils/Common";
7
+ import { cn } from "@dot-system/css-utility";
7
8
  import style from "./ColorIndicator.module.css";
8
9
 
9
10
  function ColorIndicator(props) {
@@ -20,7 +21,7 @@ function ColorIndicator(props) {
20
21
  background
21
22
  } = colorConfig || DUMMY_OBJECT;
22
23
  return /*#__PURE__*/React.createElement("div", _extends({}, tagAttributes, a11yAttributes, {
23
- className: `${style.varClass} ${style.indicator} ${style[shape]} ${customClass}`,
24
+ className: cn(`${style.varClass} ${style.indicator} ${style[shape]} ${customClass}`),
24
25
  style: {
25
26
  backgroundColor: background
26
27
  },
@@ -2,6 +2,7 @@ import React from 'react';
2
2
  import { Span_propTypes, CalendarView_propTypes } from "./props/propTypes";
3
3
  import { CalendarView_defaultProps, Span_defaultProps } from "./props/defaultProps";
4
4
  import { Container, Box } from "../Layout";
5
+ import { cn } from "@dot-system/css-utility";
5
6
  import style from "./DateTime.module.css";
6
7
  import { getMonthEnd } from "../utils/datetime/common";
7
8
  import DaysRow from "./DaysRow";
@@ -177,7 +178,7 @@ export default class CalendarView extends React.PureComponent {
177
178
  }), /*#__PURE__*/React.createElement("div", {
178
179
  "data-id": `${dataId}_dateContainer`,
179
180
  "data-test-id": `${dataId}_dateContainer`,
180
- className: `${style.dateContainer} ${needBorder ? style.separator : ''}`
181
+ className: cn(`${style.dateContainer} ${needBorder ? style.separator : ''}`)
181
182
  }, rows));
182
183
  }
183
184
 
@@ -12,6 +12,7 @@ import YearView from "./YearView";
12
12
  import DateTimePopupHeader from "./DateTimePopupHeader";
13
13
  import DateTimePopupFooter from "./DateTimePopupFooter";
14
14
  import Time from "./Time";
15
+ import { cn } from "@dot-system/css-utility";
15
16
  import style from "./DateTime.module.css";
16
17
  import { formatDate, getMonthEnd } from "../utils/datetime/common";
17
18
  import { getIsEmptyValue } from "../utils/Common";
@@ -684,7 +685,7 @@ export default class DateTime extends React.PureComponent {
684
685
  }
685
686
 
686
687
  const childEle = /*#__PURE__*/React.createElement("div", {
687
- className: `${style.container} ${innerClass}`,
688
+ className: cn(`${style.container} ${innerClass}`),
688
689
  "data-id": `${dataId}_Calendar`,
689
690
  "data-test-id": `${dataId}_Calendar`,
690
691
  onClick: this.closePopup
@@ -696,7 +697,7 @@ export default class DateTime extends React.PureComponent {
696
697
  nextMonthTitleText: nextMonthTitleText,
697
698
  onModifyCalendar: this.modifyCalendar
698
699
  }), /*#__PURE__*/React.createElement("div", {
699
- className: style.subContainer
700
+ className: cn(style.subContainer)
700
701
  }, /*#__PURE__*/React.createElement(CalendarView, {
701
702
  needBorder: isDateTimeField || needAction,
702
703
  dataId: dataId,
@@ -735,7 +736,7 @@ export default class DateTime extends React.PureComponent {
735
736
  onCancel: this.handleClear,
736
737
  dataId: dataId
737
738
  }) : null, isYearView ? /*#__PURE__*/React.createElement("div", {
738
- className: style.yearContainer
739
+ className: cn(style.yearContainer)
739
740
  }, /*#__PURE__*/React.createElement(YearView, {
740
741
  onSelectYear: this.handleSelectYear,
741
742
  onSelectMonth: this.handleSelectMonthViaYearView,
@@ -746,7 +747,7 @@ export default class DateTime extends React.PureComponent {
746
747
  isMonthOpen: isMonthOpen
747
748
  })) : null), renderCustomFooter);
748
749
  return isDefaultPosition ? /*#__PURE__*/React.createElement("div", {
749
- className: `${style.dropBox} ${className}`,
750
+ className: cn(`${style.dropBox} ${className}`),
750
751
  "data-id": `${dataId}_dateBoxContainer`,
751
752
  "data-test-id": `${dataId}_dateBoxContainer`
752
753
  }, childEle) : isReady ? /*#__PURE__*/React.createElement(ResponsiveDropBox, _extends({
@@ -10,6 +10,7 @@ import { Container } from "../Layout";
10
10
  import Button from "../Button/Button";
11
11
  /** ** CSS *** */
12
12
 
13
+ import { cn } from "@dot-system/css-utility";
13
14
  import style from "./DateTime.module.css";
14
15
  export default class DateTimePopupFooter extends PureComponent {
15
16
  render() {
@@ -32,7 +33,7 @@ export default class DateTimePopupFooter extends PureComponent {
32
33
  onClick: onSubmit,
33
34
  dataId: `${dataId}_saveBtn`
34
35
  }), /*#__PURE__*/React.createElement("span", {
35
- className: style.space
36
+ className: cn(style.space)
36
37
  }), /*#__PURE__*/React.createElement(Button, {
37
38
  text: cancelText,
38
39
  size: "medium",
@@ -13,6 +13,7 @@ import { Container } from "../Layout";
13
13
  import TextBoxIcon from "../TextBoxIcon/TextBoxIcon";
14
14
  /**** CSS ****/
15
15
 
16
+ import { cn } from "@dot-system/css-utility";
16
17
  import style from "./DateWidget.module.css";
17
18
  /**** Methods ****/
18
19
 
@@ -1054,17 +1055,17 @@ class DateWidgetComponent extends React.Component {
1054
1055
  const showClear = !(isDisabled || isReadOnly) && (isDateEdited || value) ? true : false;
1055
1056
  const showError = needErrorOnBlur ? isError && !isFocused && !isPopupOpen : isError;
1056
1057
  return /*#__PURE__*/React.createElement("div", {
1057
- className: `${style.container}`
1058
+ className: cn(`${style.container}`)
1058
1059
  }, children ? /*#__PURE__*/React.createElement("div", {
1059
1060
  "data-id": `${isDisabled ? `${dataId}_disabled` : isReadOnly ? `${dataId}_readOnly` : `${dataId}_widget`}`,
1060
1061
  "data-test-id": `${isDisabled ? `${dataId}_disabled` : isReadOnly ? `${dataId}_readOnly` : `${dataId}_widget`}`,
1061
1062
  onClick: isDisabled || isReadOnly ? null : this.handleTogglePopup,
1062
1063
  ref: getTargetRef,
1063
- className: `${isDisabled ? style.disabled : style.enabled} ${className ? className : ''}`
1064
+ className: cn(`${isDisabled ? style.disabled : style.enabled} ${className ? className : ''}`)
1064
1065
  }, children) : /*#__PURE__*/React.createElement("div", {
1065
1066
  "data-id": `${isDisabled ? `${dataId}_disabled` : isReadOnly ? `${dataId}_readOnly` : `${dataId}_widget`}`,
1066
1067
  "data-test-id": `${isDisabled ? `${dataId}_disabled` : isReadOnly ? `${dataId}_readOnly` : `${dataId}_widget`}`,
1067
- className: ` ${style.textBox} ${isPopupOpen && !isDisabled ? style.textBoxFocus : ''} ${isDisabled ? style.disabled : isReadOnly ? style.readOnly : style.enabled} ${className ? className : ''}`,
1068
+ className: cn(` ${style.textBox} ${isPopupOpen && !isDisabled ? style.textBoxFocus : ''} ${isDisabled ? style.disabled : isReadOnly ? style.readOnly : style.enabled} ${className ? className : ''}`),
1068
1069
  onClick: !isAllowedDateType ? isDisabled || isReadOnly ? null : this.handleTogglePopup : null,
1069
1070
  ref: getTargetRef
1070
1071
  }, /*#__PURE__*/React.createElement(TextBoxIcon, _extends({
@@ -12,6 +12,7 @@ import { Container, Box } from "../Layout";
12
12
  import Select from "../Select/Select";
13
13
  /** ** CSS *** */
14
14
 
15
+ import { cn } from "@dot-system/css-utility";
15
16
  import style from "./DateTime.module.css";
16
17
  export default class Time extends PureComponent {
17
18
  render() {
@@ -39,7 +40,7 @@ export default class Time extends PureComponent {
39
40
  AmPmSelectProps = {}
40
41
  } = customProps;
41
42
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("span", {
42
- className: style.text
43
+ className: cn(style.text)
43
44
  }, timeText), /*#__PURE__*/React.createElement(Container, {
44
45
  alignBox: "row",
45
46
  align: "vertical",
@@ -11,6 +11,7 @@ import { DropBoxDefaultProps } from "./props/defaultProps";
11
11
  import { DropBoxPropTypes } from "./props/propTypes";
12
12
  import { stopPropagation } from "./../utils/Common";
13
13
  import isMobilePopover from "./utils/isMobilePopover";
14
+ import { cn } from "@dot-system/css-utility";
14
15
  import style from "./css/DropBox.module.css";
15
16
  export default function DropBox(props) {
16
17
  const dropBoxRef = useRef(null);
@@ -73,13 +74,13 @@ export default function DropBox(props) {
73
74
  return isModel && isActive ? /*#__PURE__*/React.createElement(Portal, {
74
75
  portalId: portalId
75
76
  }, /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
76
- className: `${style.freezeLayer} ${style.freeze}`,
77
+ className: cn(`${style.freezeLayer} ${style.freeze}`),
77
78
  style: zIndexStyle,
78
79
  onClick: stopPropagation
79
80
  }), dropBoxEle)) : !isAbsolutePositioningNeeded && isActive ? /*#__PURE__*/React.createElement(Portal, {
80
81
  portalId: portalId
81
82
  }, /*#__PURE__*/React.createElement(React.Fragment, null, isRestrictScroll ? /*#__PURE__*/React.createElement("div", {
82
- className: style.freezeLayer,
83
+ className: cn(style.freezeLayer),
83
84
  style: zIndexStyle,
84
85
  onClick: stopPropagation
85
86
  }) : null, dropBoxEle)) : dropBoxEle;
@@ -6,6 +6,7 @@ import { positionMapping } from '@zohodesk/dotkit/es/react/components/Popup/util
6
6
  import { DropBoxElementDefaultProps } from "./props/defaultProps";
7
7
  import { DropBoxElementPropTypes } from "./props/propTypes";
8
8
  import { mergeStyle } from '@zohodesk/utils';
9
+ import { cn } from "@dot-system/css-utility";
9
10
  import style from "./css/DropBoxElement.module.css";
10
11
  export default function DropBoxElement(props) {
11
12
  let {
@@ -107,7 +108,7 @@ export default function DropBoxElement(props) {
107
108
  }
108
109
  });
109
110
  return /*#__PURE__*/React.createElement("div", {
110
- className: boxClassName,
111
+ className: cn(boxClassName),
111
112
  "data-id": `${dataId}`,
112
113
  "data-test-id": `${dataId}`,
113
114
  "data-selector-id": dataSelectorId,
@@ -127,22 +128,22 @@ export default function DropBoxElement(props) {
127
128
  "dot-ui-element": "dropbox"
128
129
  }, /*#__PURE__*/React.createElement("div", {
129
130
  tabIndex: "-1",
130
- className: `${subContainerClass} ${style[`${palette}Palette`]}`,
131
+ className: cn(`${subContainerClass} ${style[`${palette}Palette`]}`),
131
132
  onClick: onClick,
132
133
  "data-id": `${dataId}_subcontainer`,
133
134
  "data-test-id": `${dataId}_subcontainer`,
134
135
  "data-selector-id": `${dataSelectorId}_subcontainer`,
135
136
  ref: setSubContainerRef
136
137
  }, isModel ? /*#__PURE__*/React.createElement("div", {
137
- className: style.closeBar
138
+ className: cn(style.closeBar)
138
139
  }) : null, isArrow && !isModel && /*#__PURE__*/React.createElement("div", {
139
- className: style.arrowPosition,
140
+ className: cn(style.arrowPosition),
140
141
  style: arrowstyle,
141
142
  "data-id": `${dataId}_arrow`,
142
143
  "data-test-id": `${dataId}_arrow`,
143
144
  "data-selector-id": `${dataSelectorId}_arrow`
144
145
  }, /*#__PURE__*/React.createElement("div", {
145
- className: style.arrowShape
146
+ className: cn(style.arrowShape)
146
147
  })), children));
147
148
  }
148
149
  DropBoxElement.propTypes = DropBoxElementPropTypes;
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
2
  import { DropDown_propTypes, DropDownTarget_propTypes, DropDownContainer_propTypes, DropDownItemContainer_propTypes } from "./props/propTypes";
3
3
  import { DropDownItemContainer_defaultProps } from "./props/defaultProps";
4
+ import { cn } from "@dot-system/css-utility";
4
5
  import style from "./DropDown.module.css";
5
6
  import PopOver, { PopOverTarget, PopOverContainer } from "../PopOver/PopOver";
6
7
  /* eslint css-modules/no-unused-class: [2, { markAsUsed: ['dropdown', 'shadow', 'target', 'menu', 'header', 'headertext', 'list', 'padding', 'listHover', 'active', 'children', 'user', 'footer', 'separator', 'small', 'search', 'medium', 'heading'] }] */
@@ -62,7 +63,7 @@ export class DropDownItemContainer extends React.Component {
62
63
  dataId
63
64
  } = this.props;
64
65
  return /*#__PURE__*/React.createElement("div", {
65
- className: style.listGroup,
66
+ className: cn(style.listGroup),
66
67
  onScroll: this.onScroll,
67
68
  ref: this.getRef,
68
69
  "data-id": dataId,
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
2
  import { DropDownHeading_propTypes } from "./props/propTypes";
3
3
  import { DropDownHeading_defaultProps } from "./props/defaultProps";
4
+ import { cn } from "@dot-system/css-utility";
4
5
  import style from "./DropDownHeading.module.css";
5
6
  export default class DropDownHeading extends React.Component {
6
7
  render() {
@@ -21,7 +22,7 @@ export default class DropDownHeading extends React.Component {
21
22
  ariaLabel
22
23
  } = a11y;
23
24
  return /*#__PURE__*/React.createElement("div", {
24
- className: `${style[palette]} ${customClass}`,
25
+ className: cn(`${style[palette]} ${customClass}`),
25
26
  "data-title": title,
26
27
  role: role,
27
28
  "aria-labelledby": ariaLabelledby,
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
2
  import { DropDownItem_propTypes } from "./props/propTypes";
3
3
  import { DropDownItem_defaultProps } from "./props/defaultProps";
4
+ import { cn } from "@dot-system/css-utility";
4
5
  import style from "./DropDownItem.module.css";
5
6
  export default class DropDownItem extends React.Component {
6
7
  constructor(props) {
@@ -54,20 +55,20 @@ export default class DropDownItem extends React.Component {
54
55
  customClass = ''
55
56
  } = this.props;
56
57
  return /*#__PURE__*/React.createElement("div", {
57
- className: `${style.list} ${active ? style.listActive : hightlight ? style.listHover : ''} ${children && children[1] ? style.padding : ''} ${customClass}`,
58
+ className: cn(`${style.list} ${active ? style.listActive : hightlight ? style.listHover : ''} ${children && children[1] ? style.padding : ''} ${customClass}`),
58
59
  onClick: this.onClick,
59
60
  onMouseOver: this.onHover,
60
61
  ref: this.getRef,
61
62
  "data-id": dataId,
62
63
  "data-test-id": dataId
63
64
  }, children && children[0] ? /*#__PURE__*/React.createElement("span", {
64
- className: style.children
65
+ className: cn(style.children)
65
66
  }, " ", children[0], " ") : children !== undefined ? /*#__PURE__*/React.createElement("span", {
66
- className: style.children
67
+ className: cn(style.children)
67
68
  }, " ", children, " ") : null, value ? /*#__PURE__*/React.createElement("span", {
68
- className: style.value
69
+ className: cn(style.value)
69
70
  }, value) : '', children && children[1] ? /*#__PURE__*/React.createElement("span", {
70
- className: style.user
71
+ className: cn(style.user)
71
72
  }, " ", children[1], " ") : '');
72
73
  }
73
74
 
@@ -2,6 +2,7 @@ import React from 'react';
2
2
  import { DropDownSearch_propTypes } from "./props/propTypes";
3
3
  import { DropDownSearch_defaultProps } from "./props/defaultProps";
4
4
  import TextBox from "../TextBox/TextBox";
5
+ import { cn } from "@dot-system/css-utility";
5
6
  import style from "./DropDownSearch.module.css";
6
7
  /* eslint css-modules/no-unused-class: [2, { markAsUsed: ['dropdown', 'menu', 'shadow', 'target', 'header', 'headertext', 'list', 'padding', 'listHover', 'active', 'children', 'user', 'footer', separator, 'small', 'search', 'medium', 'heading', 'listGroup'] }] */
7
8
 
@@ -45,7 +46,7 @@ export default class DropDownSearch extends React.Component {
45
46
  customTextBox = ''
46
47
  } = customClass;
47
48
  return /*#__PURE__*/React.createElement("div", {
48
- className: `${style.search} ${style[`${size}Search`]} ${searchClass}`,
49
+ className: cn(`${style.search} ${style[`${size}Search`]} ${searchClass}`),
49
50
  "data-id": dataId,
50
51
  "data-test-id": dataId
51
52
  }, /*#__PURE__*/React.createElement(TextBox, {
@@ -1,5 +1,6 @@
1
1
  import React from 'react';
2
2
  import { DropDownSeparator_propTypes } from "./props/propTypes";
3
+ import { cn } from "@dot-system/css-utility";
3
4
  import style from "./DropDownSeparator.module.css";
4
5
  export default class DropDownSeparator extends React.Component {
5
6
  render() {
@@ -7,7 +8,7 @@ export default class DropDownSeparator extends React.Component {
7
8
  customClass = ''
8
9
  } = this.props;
9
10
  return /*#__PURE__*/React.createElement("div", {
10
- className: `${style.separator} ${customClass}`
11
+ className: cn(`${style.separator} ${customClass}`)
11
12
  });
12
13
  }
13
14
 
package/es/Label/Label.js CHANGED
@@ -8,6 +8,7 @@ import { defaultProps } from "./props/defaultProps";
8
8
  import { propTypes } from "./props/propTypes";
9
9
  import Flex from '@zohodesk/layout/es/Flex/Flex';
10
10
  import { renderNode, isRenderable } from '@zohodesk/utils';
11
+ import { cn } from "@dot-system/css-utility";
11
12
  import style from "./Label.module.css";
12
13
  import colors from "./LabelColors.module.css";
13
14
  export default class Label extends React.Component {
@@ -38,8 +39,8 @@ export default class Label extends React.Component {
38
39
  tabIndex
39
40
  } = a11y;
40
41
  const labelElement = /*#__PURE__*/React.createElement("label", {
41
- className: `${style.label} ${style[type]} ${style[size]} ${colors[palette]} ${style[`font_${variant}`]}
42
- ${clipped ? style.dotted : ''} ${onClick ? style.pointer : style.cursor} ${customClass}`,
42
+ className: cn(`${style.label} ${style[type]} ${style[size]} ${colors[palette]} ${style[`font_${variant}`]}
43
+ ${clipped ? style.dotted : ''} ${onClick ? style.pointer : style.cursor} ${customClass}`),
43
44
  htmlFor: htmlFor,
44
45
  "data-title": title,
45
46
  "data-id": dataId,
@@ -16,6 +16,7 @@ import { Icon } from '@zohodesk/icons';
16
16
  import { renderNode, isRenderable } from '@zohodesk/utils';
17
17
  /**** CSS ****/
18
18
 
19
+ import { cn } from "@dot-system/css-utility";
19
20
  import style from "./ListItem.module.css";
20
21
  export default class ListItemWithAvatar extends React.PureComponent {
21
22
  constructor(props) {
@@ -128,7 +129,7 @@ export default class ListItemWithAvatar extends React.PureComponent {
128
129
  }, ContainerProps), /*#__PURE__*/React.createElement(Box, {
129
130
  className: style.contentWrapper
130
131
  }, name || imgSrc ? /*#__PURE__*/React.createElement("div", {
131
- className: `${style.leftAvatar}`
132
+ className: cn(`${style.leftAvatar}`)
132
133
  }, /*#__PURE__*/React.createElement(Box, {
133
134
  align: lhsAlignContent,
134
135
  className: `${style.lhsBoxInner} ${style.alignLhsBox_center}`
@@ -7,6 +7,7 @@ import { ListItemWithCheckBox_Props } from "./props/propTypes";
7
7
  import CheckBox from "../CheckBox/CheckBox";
8
8
  import { Box, Container } from "../Layout";
9
9
  import { renderNode, isRenderable } from '@zohodesk/utils';
10
+ import { cn } from "@dot-system/css-utility";
10
11
  import style from "./ListItem.module.css";
11
12
  export default class ListItemWithCheckBox extends React.Component {
12
13
  constructor(props) {
@@ -105,7 +106,7 @@ export default class ListItemWithCheckBox extends React.Component {
105
106
  }, ContainerProps), /*#__PURE__*/React.createElement(Box, {
106
107
  className: style.contentWrapper
107
108
  }, /*#__PURE__*/React.createElement("div", {
108
- className: `${style.iconBox} ${style[`lhsJustifyContent_${lhsJustifyContent}`]}`,
109
+ className: cn(`${style.iconBox} ${style[`lhsJustifyContent_${lhsJustifyContent}`]}`),
109
110
  "data-id": iconBoxDataId,
110
111
  "data-test-id": iconBoxDataId
111
112
  }, /*#__PURE__*/React.createElement(Box, {