@zohodesk/components 1.0.0-alpha-226 → 1.0.0-alpha-227

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 (38) hide show
  1. package/README.md +13 -0
  2. package/es/DateTime/DateWidget.module.css +0 -4
  3. package/es/MultiSelect/AdvancedGroupMultiSelect.js +7 -4
  4. package/es/MultiSelect/AdvancedMultiSelect.js +6 -3
  5. package/es/MultiSelect/AdvancedMultiSelect.module.css +8 -8
  6. package/es/MultiSelect/MultiSelect.js +7 -4
  7. package/es/MultiSelect/MultiSelect.module.css +8 -13
  8. package/es/MultiSelect/MultiSelectWithAvatar.js +6 -3
  9. package/es/MultiSelect/SelectedOptions.js +3 -2
  10. package/es/Radio/Radio.js +1 -2
  11. package/es/Radio/Radio.module.css +2 -2
  12. package/es/RippleEffect/RippleEffect.js +7 -4
  13. package/es/RippleEffect/RippleEffect.module.css +3 -0
  14. package/es/Select/Select.module.css +1 -1
  15. package/es/Select/SelectWithAvatar.js +7 -4
  16. package/es/Tag/Tag.js +10 -4
  17. package/es/Tag/Tag.module.css +14 -11
  18. package/es/TextBoxIcon/TextBoxIcon.js +1 -1
  19. package/es/TextBoxIcon/TextBoxIcon.module.css +5 -2
  20. package/lib/DateTime/DateWidget.module.css +0 -4
  21. package/lib/MultiSelect/AdvancedGroupMultiSelect.js +7 -4
  22. package/lib/MultiSelect/AdvancedMultiSelect.js +6 -3
  23. package/lib/MultiSelect/AdvancedMultiSelect.module.css +8 -8
  24. package/lib/MultiSelect/MultiSelect.js +7 -4
  25. package/lib/MultiSelect/MultiSelect.module.css +8 -13
  26. package/lib/MultiSelect/MultiSelectWithAvatar.js +6 -3
  27. package/lib/MultiSelect/SelectedOptions.js +3 -2
  28. package/lib/Radio/Radio.js +1 -3
  29. package/lib/Radio/Radio.module.css +2 -2
  30. package/lib/RippleEffect/RippleEffect.js +7 -4
  31. package/lib/RippleEffect/RippleEffect.module.css +3 -0
  32. package/lib/Select/Select.module.css +1 -1
  33. package/lib/Select/SelectWithAvatar.js +7 -4
  34. package/lib/Tag/Tag.js +10 -4
  35. package/lib/Tag/Tag.module.css +14 -11
  36. package/lib/TextBoxIcon/TextBoxIcon.js +1 -1
  37. package/lib/TextBoxIcon/TextBoxIcon.module.css +5 -2
  38. package/package.json +1 -1
package/README.md CHANGED
@@ -32,6 +32,19 @@ In this Package, we Provide Some Basic Components to Build Web App
32
32
  - TextBoxIcon
33
33
  - Tooltip
34
34
 
35
+ # 1.0.0-alpha-227
36
+
37
+ - isReadOnly and needEffect prop added in Tag Component for read-only case
38
+ - needEffect prop added for the below components: ( This props has been added for read-only case )
39
+ => Advanced Group Multi Select
40
+ => Advanced Multi Select
41
+ => Multi Select
42
+ => Multi Select With Avatar
43
+ => Select With Avatar
44
+ - isReadonly prop added for SelectedOption component
45
+ - Read-only class added for TextBoxIcon component
46
+ - Removed click action in tag multi select component for read-only case
47
+ - Changed the cursor default to not-allowed in Radio component for read-only case
35
48
  # 1.0.0-alpha-226
36
49
 
37
50
  - ListContainer Implemented in => ListItem,ListItemWithAvatar,ListItemWithIcon,ListItemWithRadio,ListItemWithCheckBox
@@ -6,10 +6,6 @@
6
6
  .readOnly, .readOnly > input, .disabled {
7
7
  cursor: not-allowed;
8
8
  }
9
- .readOnly,
10
- .disabled {
11
- composes: readonly from '../common/common.module.css';
12
- }
13
9
  .enabled {
14
10
  cursor: pointer;
15
11
  }
@@ -855,7 +855,8 @@ class AdvancedGroupMultiSelect extends React.Component {
855
855
  i18nKeys,
856
856
  a11y,
857
857
  isSearchClearOnSelect,
858
- palette
858
+ palette,
859
+ needEffect
859
860
  } = this.props;
860
861
  let {
861
862
  clearText = 'Clear all'
@@ -884,7 +885,7 @@ class AdvancedGroupMultiSelect extends React.Component {
884
885
  let setAriaId = this.getNextAriaId();
885
886
  let ariaErrorId = this.getNextAriaId();
886
887
  return /*#__PURE__*/React.createElement("div", {
887
- className: `${style.wrapper} ${isDisabled ? style.disabled : ''}`,
888
+ className: `${style.wrapper} ${isDisabled ? style.disabled : ''} ${needEffect && !(isDisabled || isReadOnly) ? style.effect : ''}`,
888
889
  "data-id": `${isDisabled ? `${dataId}_disabled` : isReadOnly ? `${dataId}_readOnly` : dataId}`,
889
890
  "data-title": isDisabled ? title : '',
890
891
  onClick: this.handleInputFocus
@@ -1060,7 +1061,8 @@ AdvancedGroupMultiSelect.defaultProps = {
1060
1061
  isPadding: false,
1061
1062
  i18nKeys: {},
1062
1063
  a11y: {},
1063
- isSearchClearOnSelect: true
1064
+ isSearchClearOnSelect: true,
1065
+ needEffect: PropTypes.bool
1064
1066
  };
1065
1067
  AdvancedGroupMultiSelect.propTypes = {
1066
1068
  animationStyle: PropTypes.string,
@@ -1110,7 +1112,8 @@ AdvancedGroupMultiSelect.propTypes = {
1110
1112
  variant: PropTypes.string,
1111
1113
  htmlId: PropTypes.string,
1112
1114
  isSearchClearOnSelect: PropTypes.bool,
1113
- palette: PropTypes.oneOf(['default', 'dark'])
1115
+ palette: PropTypes.oneOf(['default', 'dark']),
1116
+ needEffect: true
1114
1117
  };
1115
1118
 
1116
1119
  if (false) {
@@ -349,7 +349,8 @@ export class AdvancedMultiSelectComponent extends MultiSelectComponent {
349
349
  borderColor,
350
350
  isBoxPaddingNeed,
351
351
  getFooter,
352
- customProps
352
+ customProps,
353
+ needEffect
353
354
  } = this.props;
354
355
  let {
355
356
  SuggestionsProps = {},
@@ -382,7 +383,7 @@ export class AdvancedMultiSelectComponent extends MultiSelectComponent {
382
383
  const setAriaId = this.getNextAriaId();
383
384
  const ariaErrorId = this.getNextAriaId();
384
385
  return /*#__PURE__*/React.createElement("div", {
385
- className: `${style.wrapper} ${isDisabled ? style.disabled : ''} ${borderColor === 'transparent' ? style.transparentContainer : ''}`,
386
+ className: `${style.wrapper} ${isDisabled ? style.disabled : ''} ${borderColor === 'transparent' ? style.transparentContainer : ''} ${needEffect && !(isDisabled || isReadOnly) ? style.effect : ''}`,
386
387
  "data-id": dataIdMultiSelectComp,
387
388
  "data-title": isDisabled ? title : '',
388
389
  onClick: this.handleInputFocus
@@ -525,6 +526,7 @@ AdvancedMultiSelectComponent.propTypes = {
525
526
  //For grouping multiSelect
526
527
  getPublicMethods: PropTypes.func,
527
528
  optionType: PropTypes.oneOf(['default', 'avatar', 'icon']),
529
+ needEffect: PropTypes.bool,
528
530
  animationStyle: PropTypes.string,
529
531
  defaultDropBoxPosition: PropTypes.oneOf(['bottom', 'top', 'left', 'right']),
530
532
  dropBoxSize: PropTypes.oneOf(['small', 'medium', 'large']),
@@ -599,7 +601,8 @@ AdvancedMultiSelectComponent.defaultProps = {
599
601
  borderColor: 'default',
600
602
  isBoxPaddingNeed: true,
601
603
  isSearchClearOnSelect: true,
602
- customProps: {}
604
+ customProps: {},
605
+ needEffect: true
603
606
  };
604
607
  AdvancedMultiSelectComponent.displayName = 'AdvancedMultiSelect';
605
608
  const AdvancedMultiSelect = Popup(AdvancedMultiSelectComponent);
@@ -1,8 +1,8 @@
1
1
  .wrapper {
2
2
  position: relative;
3
3
  }
4
- .disabled {
5
- composes: disabled from '../common/common.module.css';
4
+ .disabled, .readOnly {
5
+ cursor: not-allowed;
6
6
  }
7
7
  .container {
8
8
  max-height: var(--zd_size120);
@@ -16,28 +16,28 @@
16
16
  .borderColor_transparent {
17
17
  border-bottom-color: var(--zdt_advancedmultiselect_transparent_border);
18
18
  }
19
- .borderColor_transparent:hover {
19
+ .effect .borderColor_transparent:hover {
20
20
  border-bottom-color: var(--zdt_advancedmultiselect_transparent_hover_border);
21
21
  }
22
- .borderColor_transparent.active {
22
+ .effect .borderColor_transparent.active {
23
23
  border-bottom-color: var(--zdt_advancedmultiselect_transparent_active_border);
24
24
  }
25
25
  .borderColor_default {
26
26
  border-bottom-color: var(--zdt_advancedmultiselect_default_border);
27
27
  }
28
- .borderColor_default:hover {
28
+ .effect .borderColor_default:hover {
29
29
  border-bottom-color: var(--zdt_advancedmultiselect_default_hover_border);
30
30
  }
31
- .borderColor_default.active {
31
+ .effect .borderColor_default.active {
32
32
  border-bottom-color: var(--zdt_advancedmultiselect_default_active_border);
33
33
  }
34
34
  .borderColor_dark {
35
35
  border-bottom-color: var(--zdt_advancedmultiselect_dark_border);
36
36
  }
37
- .borderColor_dark:hover {
37
+ .effect .borderColor_dark:hover {
38
38
  border-bottom-color: var(--zdt_advancedmultiselect_dark_hover_border);
39
39
  }
40
- .borderColor_dark.active {
40
+ .effect .borderColor_dark.active {
41
41
  border-bottom-color: var(--zdt_advancedmultiselect_dark_active_border);
42
42
  }
43
43
  [dir=ltr] .container.medium {
@@ -870,7 +870,8 @@ export class MultiSelectComponent extends React.Component {
870
870
  a11y,
871
871
  children,
872
872
  customChildrenClass,
873
- getFooter
873
+ getFooter,
874
+ needEffect
874
875
  } = this.props;
875
876
  const {
876
877
  clearText = 'Clear all',
@@ -898,7 +899,7 @@ export class MultiSelectComponent extends React.Component {
898
899
  const ariaErrorId = this.getNextAriaId();
899
900
  const isShowClearIcon = !isReadOnly && !isDisabled && !disableAction && selectedOptions.length > 1;
900
901
  return /*#__PURE__*/React.createElement("div", {
901
- className: `${style.wrapper} ${isDisabled ? style.disabled : ''} ${isReadOnly ? style.readOnly : ''} ${disableAction ? CssProvider('isBlock') : ''} ${borderColor === 'transparent' ? style.transparentContainer : ''}`,
902
+ className: `${style.wrapper} ${isDisabled ? style.disabled : ''} ${isReadOnly ? style.readOnly : ''} ${disableAction ? CssProvider('isBlock') : ''} ${borderColor === 'transparent' ? style.transparentContainer : ''} ${needEffect && !(isDisabled || isReadOnly) ? style.effect : ''}`,
902
903
  "data-id": `${isDisabled ? `${dataId}_disabled` : isReadOnly ? `${dataId}_readOnly` : dataId}`,
903
904
  "data-title": isDisabled ? title : '',
904
905
  onClick: this.handleInputFocus
@@ -1102,7 +1103,8 @@ MultiSelectComponent.propTypes = {
1102
1103
  children: PropTypes.node,
1103
1104
  customChildrenClass: PropTypes.string,
1104
1105
  disabledOptions: PropTypes.arrayOf(PropTypes.string),
1105
- getFooter: PropTypes.func
1106
+ getFooter: PropTypes.func,
1107
+ needEffect: PropTypes.bool
1106
1108
  };
1107
1109
  MultiSelectComponent.defaultProps = {
1108
1110
  animationStyle: 'bounce',
@@ -1132,7 +1134,8 @@ MultiSelectComponent.defaultProps = {
1132
1134
  a11y: {},
1133
1135
  textBoxClass: '',
1134
1136
  palette: 'default',
1135
- isSearchClearOnSelect: true
1137
+ isSearchClearOnSelect: true,
1138
+ needEffect: true
1136
1139
  };
1137
1140
 
1138
1141
  if (false) {
@@ -2,14 +2,9 @@
2
2
  position: relative;
3
3
  }
4
4
 
5
- .disabled {
6
- composes: disabled from '../common/common.module.css';
5
+ .disabled, .readOnly {
6
+ cursor: not-allowed;
7
7
  }
8
-
9
- .readOnly {
10
- composes: readonly from '../common/common.module.css';
11
- }
12
-
13
8
  .container {
14
9
  max-height: var(--zd_size120);
15
10
  composes: oflowy from '../common/common.module.css';
@@ -22,28 +17,28 @@
22
17
  .borderColor_transparent {
23
18
  border-bottom-color: var(--zdt_multiselect_transparent_border);
24
19
  }
25
- .borderColor_transparent:hover {
20
+ .effect .borderColor_transparent:hover {
26
21
  border-bottom-color: var(--zdt_multiselect_transparent_hover_border);
27
22
  }
28
- .borderColor_transparent.active {
23
+ .effect .borderColor_transparent.active {
29
24
  border-bottom-color: var(--zdt_multiselect_transparent_active_border);
30
25
  }
31
26
  .borderColor_default {
32
27
  border-bottom-color: var(--zdt_multiselect_default_border);
33
28
  }
34
- .borderColor_default:hover {
29
+ .effect .borderColor_default:hover {
35
30
  border-bottom-color: var(--zdt_multiselect_default_hover_border);
36
31
  }
37
- .borderColor_default.active {
32
+ .effect .borderColor_default.active {
38
33
  border-bottom-color: var(--zdt_multiselect_default_active_border);
39
34
  }
40
35
  .borderColor_dark {
41
36
  border-bottom-color: var(--zdt_multiselect_dark_border);
42
37
  }
43
- .borderColor_dark:hover {
38
+ .effect .borderColor_dark:hover {
44
39
  border-bottom-color: var(--zdt_multiselect_dark_hover_border);
45
40
  }
46
- .borderColor_dark.active {
41
+ .effect .borderColor_dark.active {
47
42
  border-bottom-color: var(--zdt_multiselect_dark_active_border);
48
43
  }
49
44
 
@@ -87,7 +87,8 @@ class MultiSelectWithAvatarComponent extends MultiSelectComponent {
87
87
  a11y,
88
88
  children,
89
89
  customChildrenClass,
90
- isBoxPaddingNeed
90
+ isBoxPaddingNeed,
91
+ needEffect
91
92
  } = this.props;
92
93
  const {
93
94
  clearText = 'Clear all'
@@ -115,7 +116,7 @@ class MultiSelectWithAvatarComponent extends MultiSelectComponent {
115
116
  const popUpState = !isReadOnly && !isDisabled && !disableAction && isPopupOpen;
116
117
  const isShowClearIcon = !isReadOnly && !isDisabled && !disableAction && selectedOptions.length > 1;
117
118
  return /*#__PURE__*/React.createElement("div", {
118
- className: ` ${style.wrapper} ${isDisabled ? style.disabled : ''} ${isReadOnly ? style.readOnly : ''} ${disableAction ? CssProvider('isBlock') : ''} ${borderColor === 'transparent' ? style.transparentContainer : ''}`,
119
+ className: ` ${style.wrapper} ${isDisabled ? style.disabled : ''} ${isReadOnly ? style.readOnly : ''} ${disableAction ? CssProvider('isBlock') : ''} ${borderColor === 'transparent' ? style.transparentContainer : ''} ${needEffect && !(isDisabled || isReadOnly) ? style.effect : ''}`,
119
120
  "data-id": `${isDisabled ? `${dataId}_disabled` : isReadOnly ? `${dataId}_readOnly` : dataId}`,
120
121
  "data-title": isDisabled ? title : '',
121
122
  onClick: this.handleInputFocus
@@ -288,6 +289,7 @@ MultiSelectWithAvatarComponent.propTypes = {
288
289
  palette: PropTypes.oneOf(['default', 'dark']),
289
290
  htmlId: PropTypes.string,
290
291
  isBoxPaddingNeed: PropTypes.bool,
292
+ needEffect: PropTypes.bool,
291
293
 
292
294
  /**** Popup props ****/
293
295
  isPopupOpen: PropTypes.bool,
@@ -337,7 +339,8 @@ MultiSelectWithAvatarComponent.defaultProps = {
337
339
  a11y: {},
338
340
  palette: 'default',
339
341
  isBoxPaddingNeed: true,
340
- isSearchClearOnSelect: true
342
+ isSearchClearOnSelect: true,
343
+ needEffect: true
341
344
  };
342
345
  MultiSelectWithAvatarComponent.displayName = 'MultiSelectWithAvatar';
343
346
  const MultiSelectWithAvatar = Popup(MultiSelectWithAvatarComponent);
@@ -37,13 +37,14 @@ export default class SelectedOptions extends React.PureComponent {
37
37
  } = option;
38
38
  const commonProps = {
39
39
  disabled: isDisabled,
40
- onRemove: isDisabled ? null : onRemove,
40
+ onRemove: isDisabled || isReadOnly ? null : onRemove,
41
41
  text: value,
42
42
  palette: isDarkPalette,
43
43
  onSelectTag: isReadOnly ? null : onSelect,
44
44
  getRef: getRef,
45
45
  initial: value,
46
- id: id
46
+ id: id,
47
+ isReadOnly: isReadOnly
47
48
  };
48
49
 
49
50
  if (optionType === 'avatar') {
package/es/Radio/Radio.js CHANGED
@@ -3,7 +3,6 @@ import React from 'react';
3
3
  import PropTypes from 'prop-types';
4
4
  import Label from '../Label/Label';
5
5
  import { Container, Box } from '../Layout';
6
- import CssProvider from '../Provider/CssProvider';
7
6
  import style from './Radio.module.css';
8
7
  export default class Radio extends React.Component {
9
8
  constructor(props) {
@@ -45,7 +44,7 @@ export default class Radio extends React.Component {
45
44
  customRadio = '',
46
45
  customLabel = ''
47
46
  } = customClass;
48
- let accessMode = isReadOnly ? style.readonly : disabled ? CssProvider('isDisabled') : style.pointer;
47
+ let accessMode = isReadOnly ? style.readonly : disabled ? style.disabled : style.pointer;
49
48
  let toolTip = disabled ? disabledTitle : title ? title : null;
50
49
  let {
51
50
  ariaHidden,
@@ -18,8 +18,8 @@
18
18
  .pointer {
19
19
  cursor: pointer;
20
20
  }
21
- .readonly {
22
- cursor: default;
21
+ .readonly, .disabled {
22
+ cursor: not-allowed;
23
23
  }
24
24
  .radio {
25
25
  composes: offSelection from '../common/common.module.css';
@@ -10,9 +10,10 @@ export default function RippleEffect(props) {
10
10
  palette,
11
11
  hoverType,
12
12
  isNeedEffect,
13
- needBorder
13
+ needBorder,
14
+ isCopyTextEnabled
14
15
  } = props;
15
- let className = isNeedEffect ? `${style.effect} ${style[palette]} ${needBorder ? style.border : ''} ${style[`${hoverType}Hover`] ? style[`${hoverType}Hover`] : ''} ${isActive && !isDisabled ? style.active : ''} ${isDisabled ? '' : style.hoverEffect} ${isDisabled ? CssProvider('isDisabled') : ''}` : '';
16
+ let className = isNeedEffect ? `${style.effect} ${style[palette]} ${needBorder ? style.border : ''} ${style[`${hoverType}Hover`] ? style[`${hoverType}Hover`] : ''} ${isActive && !isDisabled ? style.active : ''} ${isDisabled ? '' : style.hoverEffect} ${isCopyTextEnabled ? style.notAllowed : isDisabled ? CssProvider('isDisabled') : ''}` : '';
16
17
  let child = React.Children.only(children);
17
18
  return /*#__PURE__*/React.cloneElement(child, {
18
19
  className: `${child.props.className || ''} ${className}`
@@ -24,7 +25,8 @@ RippleEffect.defaultProps = {
24
25
  isNeedEffect: true,
25
26
  needBorder: true,
26
27
  hoverType: 'default',
27
- palette: 'default'
28
+ palette: 'default',
29
+ isCopyTextEnabled: false
28
30
  };
29
31
  RippleEffect.propTypes = {
30
32
  children: PropTypes.node,
@@ -33,7 +35,8 @@ RippleEffect.propTypes = {
33
35
  isDisabled: PropTypes.bool,
34
36
  isNeedEffect: PropTypes.bool,
35
37
  needBorder: PropTypes.bool,
36
- palette: PropTypes.oneOf(['default', 'primary', 'primaryLight', 'primaryFilled', 'primaryDark', 'green', 'danger'])
38
+ palette: PropTypes.oneOf(['default', 'primary', 'primaryLight', 'primaryFilled', 'primaryDark', 'green', 'danger']),
39
+ isCopyTextEnabled: PropTypes.bool
37
40
  };
38
41
 
39
42
  if (false) {
@@ -65,3 +65,6 @@
65
65
  .hoverEffect:hover.primaryDark.bgHover, .hoverEffect:focus.primaryDark.bgHover {
66
66
  background-color: var(--zdt_rippleeffect_primary_dark_bg);
67
67
  }
68
+ .notAllowed {
69
+ cursor: not-allowed;
70
+ }
@@ -47,7 +47,7 @@
47
47
  padding: var(--zd_size10) 0;
48
48
  }
49
49
  .readonly {
50
- composes: readonly from '../common/common.module.css';
50
+ --textboxicon_icon_cursor: not-allowed;
51
51
  }
52
52
  .transparentContainer .arrowIcon {
53
53
  opacity: 0;
@@ -141,7 +141,8 @@ class SelectWithAvatarComponent extends SelectComponent {
141
141
  tagSize,
142
142
  groupName,
143
143
  i18nKeys,
144
- htmlId
144
+ htmlId,
145
+ needEffect
145
146
  } = this.props;
146
147
  i18nKeys = Object.assign({}, i18nKeys, {
147
148
  emptyText: i18nKeys.emptyText || emptyMessage,
@@ -164,7 +165,7 @@ class SelectWithAvatarComponent extends SelectComponent {
164
165
  let setAriaId = this.getNextAriaId();
165
166
  let ariaErrorId = this.getNextAriaId();
166
167
  return /*#__PURE__*/React.createElement("div", {
167
- className: `${style.wrapper} ${isDisabled ? style.disabled : ''} ${isReadOnly ? style.readOnly : ''} ${className ? className : ''}`,
168
+ className: `${style.wrapper} ${isDisabled ? style.disabled : ''} ${isReadOnly ? style.readOnly : ''} ${needEffect && !(isDisabled || isReadOnly) ? style.effect : ''} ${className ? className : ''}`,
168
169
  "data-id": `${isDisabled ? `${dataId}_disabled` : isReadOnly ? `${dataId}_readOnly` : dataId}`,
169
170
  "data-title": isDisabled ? title : ''
170
171
  }, /*#__PURE__*/React.createElement(Container, {
@@ -342,7 +343,8 @@ SelectWithAvatarComponent.propTypes = {
342
343
  title: PropTypes.string,
343
344
  togglePopup: PropTypes.func,
344
345
  valueField: PropTypes.string,
345
- htmlId: PropTypes.string
346
+ htmlId: PropTypes.string,
347
+ needEffect: PropTypes.bool
346
348
  };
347
349
  SelectWithAvatarComponent.defaultProps = {
348
350
  animationStyle: 'bounce',
@@ -363,7 +365,8 @@ SelectWithAvatarComponent.defaultProps = {
363
365
  dataId: 'selectWithAvatar',
364
366
  borderColor: 'default',
365
367
  isSearchClearOnClose: true,
366
- i18nKeys: {}
368
+ i18nKeys: {},
369
+ needEffect: true
367
370
  };
368
371
  SelectWithAvatarComponent.displayName = 'SelectWithAvatar';
369
372
  let SelectWithAvatar = Popup(SelectWithAvatarComponent);
package/es/Tag/Tag.js CHANGED
@@ -78,7 +78,9 @@ export default class Tag extends PureComponent {
78
78
  tooltip,
79
79
  avatarPalette,
80
80
  customClass,
81
- a11y
81
+ a11y,
82
+ needEffect,
83
+ isReadOnly
82
84
  } = this.props;
83
85
  let {
84
86
  customTag = '',
@@ -93,7 +95,7 @@ export default class Tag extends PureComponent {
93
95
  } = a11y;
94
96
  let isDarkPalette = palette === 'dark';
95
97
  return /*#__PURE__*/React.createElement("div", {
96
- className: `${style.container} ${active ? `${style.selected} ${style[`active${palette}`]}` : ''} ${onRemove ? active ? `${style[`active${size}Effect`]}` : '' : ''} ${style[size]} ${rounded ? style.lgRadius : style.smRadius} ${style[palette]} ${disabled ? style.disabled : ''} ${onSelectTag ? style.pointer : ''} ${customTag}`,
98
+ className: `${style.container} ${needEffect && !isReadOnly ? style.effect : style.readonly} ${active ? `${style.selected} ${style[`active${palette}`]}` : ''} ${onRemove ? active ? `${style[`active${size}Effect`]}` : '' : ''} ${style[size]} ${rounded ? style.lgRadius : style.smRadius} ${style[palette]} ${disabled ? style.disabled : ''} ${onSelectTag ? style.pointer : ''} ${customTag}`,
97
99
  "data-id": active ? `${dataId}_TagSelected` : `${dataId}_Tag`,
98
100
  onClick: this.handleSelect,
99
101
  ref: this.getRef,
@@ -148,7 +150,9 @@ Tag.defaultProps = {
148
150
  size: 'medium',
149
151
  dataId: 'tag',
150
152
  customClass: {},
151
- a11y: {}
153
+ a11y: {},
154
+ needEffect: true,
155
+ isReadOnly: false
152
156
  };
153
157
  Tag.propTypes = {
154
158
  active: PropTypes.bool,
@@ -179,7 +183,9 @@ Tag.propTypes = {
179
183
  }),
180
184
  a11y: PropTypes.shape({
181
185
  clearLabel: PropTypes.string
182
- })
186
+ }),
187
+ needEffect: PropTypes.bool,
188
+ isReadOnly: PropTypes.bool
183
189
  };
184
190
 
185
191
  if (false) {
@@ -50,9 +50,12 @@
50
50
  }
51
51
  .disabled {
52
52
  pointer-events: none;
53
- --tag_cursor: not-allowed;
54
53
  --tag_text_color: var(--zdt_tag_disabled_text);
55
54
  }
55
+ .readonly,
56
+ .disabled {
57
+ --tag_cursor: not-allowed;
58
+ }
56
59
  .pointer {
57
60
  --tag_cursor: pointer;
58
61
  }
@@ -158,11 +161,11 @@
158
161
  .danger {
159
162
  --tag_bg_color: var(--zdt_tag_default_danger_bg);
160
163
  }
161
- .default:hover {
164
+ .effect.default:hover {
162
165
  --tag_bg_color: var(--zdt_tag_default_hover_bg);
163
166
  }
164
167
  .activedefault,
165
- .activedefault:hover {
168
+ .effect.activedefault:hover {
166
169
  --tag_bg_color: var(--zdt_tag_active_default_bg);
167
170
  }
168
171
  .activeprimaryClose,
@@ -170,11 +173,11 @@
170
173
  --tag_closeicon_bg_color: var(--zdt_tag_primary_bg);
171
174
  }
172
175
 
173
- .danger:hover {
176
+ .effect.danger:hover {
174
177
  --tag_bg_color: var(--zdt_tag_danger_hover_bg);
175
178
  }
176
179
  .activedanger,
177
- .activedanger:hover {
180
+ .effect.activedanger:hover {
178
181
  --tag_bg_color: var(--zdt_tag_danger_hover_bg);
179
182
  }
180
183
  .activedangerClose,
@@ -187,7 +190,7 @@
187
190
  --tag_text_color: var(--zdt_tag_secondary_text);
188
191
  }
189
192
  .activesecondary,
190
- .secondary:hover {
193
+ .effect.secondary:hover {
191
194
  --tag_bg_color: var(--zdt_tag_secondary_hover_bg);
192
195
  }
193
196
 
@@ -196,12 +199,12 @@
196
199
  --tag_border_width: 1px;
197
200
  --tag_border_color: var(--zdt_tag_pure_border);
198
201
  }
199
- .pureDotted:hover {
202
+ .effect.pureDotted:hover {
200
203
  --tag_bg_color: var(--zdt_tag_pure_hover_bg);
201
204
  --tag_border_color: var(--zdt_tag_pure_hover_border);
202
205
  }
203
206
  .activepureDotted,
204
- .activepureDotted:hover {
207
+ .effect.activepureDotted:hover {
205
208
  --tag_bg_color: var(--zdt_tag_pure_bg);
206
209
  }
207
210
 
@@ -210,10 +213,10 @@
210
213
  --tag_border_width: 1px;
211
214
  --tag_border_color: var(--zdt_tag_primary_border);
212
215
  }
213
- .primaryDotted:hover,
216
+ .effect.primaryDotted:hover,
214
217
  .activeprimaryDotted,
215
218
  .primary,
216
- .primary:hover {
219
+ .effect.primary:hover {
217
220
  --tag_bg_color: var(--zdt_tag_active_default_bg);
218
221
  }
219
222
 
@@ -228,7 +231,7 @@
228
231
  --tag_bg_color: var(--zdt_tag_dark_bg);
229
232
  --tag_text_color: var(--zdt_tag_dark_text);
230
233
  }
231
- .dark:hover {
234
+ .effect.dark:hover {
232
235
  --tag_bg_color: var(--zdt_tag_dark_hover_bg);
233
236
  --tag_text_color: var(--zdt_tag_dark_hover_text);
234
237
  }
@@ -100,7 +100,7 @@ export default class TextBoxIcon extends React.Component {
100
100
  return /*#__PURE__*/React.createElement(Container, {
101
101
  alignBox: "row",
102
102
  isCover: false,
103
- className: `${style.container} ${isDisabled ? style.disabled : isReadOnly ? needEffect ? style.effect : '' : style.effect} ${isActive || isFocus ? style.effectFocused : ''} ${customTBoxWrap} ${iconOnHover && (isReadOnly || isDisabled) ? style.iconOnHoverReadonly : iconOnHover && !(isReadOnly || isDisabled) ? style.iconOnHoverStyle : ''}`,
103
+ className: `${style.container} ${isDisabled ? style.disabled : isReadOnly ? needEffect ? style.effect : style.readonly : style.effect} ${isActive || isFocus ? style.effectFocused : ''} ${customTBoxWrap} ${iconOnHover && (isReadOnly || isDisabled) ? style.iconOnHoverReadonly : iconOnHover && !(isReadOnly || isDisabled) ? style.iconOnHoverStyle : ''}`,
104
104
  "data-title": isDisabled ? title : ''
105
105
  }, /*#__PURE__*/React.createElement(Box, {
106
106
  flexible: true
@@ -12,8 +12,11 @@
12
12
  composes: varClass;
13
13
  position: relative;
14
14
  }
15
- .disabled {
16
- composes: disabled from '../common/common.module.css';
15
+ .disabled,.readonly {
16
+ --textboxicon_icon_cursor: not-allowed;
17
+ }
18
+ .disabled, .readonly {
19
+ cursor: not-allowed;
17
20
  }
18
21
  .icon {
19
22
  composes: offSelection from '../common/common.module.css';
@@ -6,10 +6,6 @@
6
6
  .readOnly, .readOnly > input, .disabled {
7
7
  cursor: not-allowed;
8
8
  }
9
- .readOnly,
10
- .disabled {
11
- composes: readonly from '../common/common.module.css';
12
- }
13
9
  .enabled {
14
10
  cursor: pointer;
15
11
  }
@@ -945,7 +945,8 @@ var AdvancedGroupMultiSelect = /*#__PURE__*/function (_React$Component) {
945
945
  i18nKeys = _this$props8.i18nKeys,
946
946
  a11y = _this$props8.a11y,
947
947
  isSearchClearOnSelect = _this$props8.isSearchClearOnSelect,
948
- palette = _this$props8.palette;
948
+ palette = _this$props8.palette,
949
+ needEffect = _this$props8.needEffect;
949
950
  var _i18nKeys = i18nKeys,
950
951
  _i18nKeys$clearText = _i18nKeys.clearText,
951
952
  clearText = _i18nKeys$clearText === void 0 ? 'Clear all' : _i18nKeys$clearText;
@@ -973,7 +974,7 @@ var AdvancedGroupMultiSelect = /*#__PURE__*/function (_React$Component) {
973
974
  var setAriaId = this.getNextAriaId();
974
975
  var ariaErrorId = this.getNextAriaId();
975
976
  return /*#__PURE__*/_react["default"].createElement("div", {
976
- className: "".concat(_MultiSelectModule["default"].wrapper, " ").concat(isDisabled ? _MultiSelectModule["default"].disabled : ''),
977
+ className: "".concat(_MultiSelectModule["default"].wrapper, " ").concat(isDisabled ? _MultiSelectModule["default"].disabled : '', " ").concat(needEffect && !(isDisabled || isReadOnly) ? _MultiSelectModule["default"].effect : ''),
977
978
  "data-id": "".concat(isDisabled ? "".concat(dataId, "_disabled") : isReadOnly ? "".concat(dataId, "_readOnly") : dataId),
978
979
  "data-title": isDisabled ? title : '',
979
980
  onClick: this.handleInputFocus
@@ -1150,7 +1151,8 @@ AdvancedGroupMultiSelect.defaultProps = {
1150
1151
  isPadding: false,
1151
1152
  i18nKeys: {},
1152
1153
  a11y: {},
1153
- isSearchClearOnSelect: true
1154
+ isSearchClearOnSelect: true,
1155
+ needEffect: _propTypes["default"].bool
1154
1156
  };
1155
1157
  AdvancedGroupMultiSelect.propTypes = {
1156
1158
  animationStyle: _propTypes["default"].string,
@@ -1200,7 +1202,8 @@ AdvancedGroupMultiSelect.propTypes = {
1200
1202
  variant: _propTypes["default"].string,
1201
1203
  htmlId: _propTypes["default"].string,
1202
1204
  isSearchClearOnSelect: _propTypes["default"].bool,
1203
- palette: _propTypes["default"].oneOf(['default', 'dark'])
1205
+ palette: _propTypes["default"].oneOf(['default', 'dark']),
1206
+ needEffect: true
1204
1207
  };
1205
1208
 
1206
1209
  if (false) {
@@ -411,7 +411,8 @@ var AdvancedMultiSelectComponent = /*#__PURE__*/function (_MultiSelectComponent)
411
411
  borderColor = _this$props5.borderColor,
412
412
  isBoxPaddingNeed = _this$props5.isBoxPaddingNeed,
413
413
  getFooter = _this$props5.getFooter,
414
- customProps = _this$props5.customProps;
414
+ customProps = _this$props5.customProps,
415
+ needEffect = _this$props5.needEffect;
415
416
  var _customProps$Suggesti = customProps.SuggestionsProps,
416
417
  SuggestionsProps = _customProps$Suggesti === void 0 ? {} : _customProps$Suggesti,
417
418
  _customProps$DropBoxP = customProps.DropBoxProps,
@@ -441,7 +442,7 @@ var AdvancedMultiSelectComponent = /*#__PURE__*/function (_MultiSelectComponent)
441
442
  var setAriaId = this.getNextAriaId();
442
443
  var ariaErrorId = this.getNextAriaId();
443
444
  return /*#__PURE__*/_react["default"].createElement("div", {
444
- className: "".concat(_AdvancedMultiSelectModule["default"].wrapper, " ").concat(isDisabled ? _AdvancedMultiSelectModule["default"].disabled : '', " ").concat(borderColor === 'transparent' ? _AdvancedMultiSelectModule["default"].transparentContainer : ''),
445
+ className: "".concat(_AdvancedMultiSelectModule["default"].wrapper, " ").concat(isDisabled ? _AdvancedMultiSelectModule["default"].disabled : '', " ").concat(borderColor === 'transparent' ? _AdvancedMultiSelectModule["default"].transparentContainer : '', " ").concat(needEffect && !(isDisabled || isReadOnly) ? _AdvancedMultiSelectModule["default"].effect : ''),
445
446
  "data-id": dataIdMultiSelectComp,
446
447
  "data-title": isDisabled ? title : '',
447
448
  onClick: this.handleInputFocus
@@ -588,6 +589,7 @@ AdvancedMultiSelectComponent.propTypes = {
588
589
  //For grouping multiSelect
589
590
  getPublicMethods: _propTypes["default"].func,
590
591
  optionType: _propTypes["default"].oneOf(['default', 'avatar', 'icon']),
592
+ needEffect: _propTypes["default"].bool,
591
593
  animationStyle: _propTypes["default"].string,
592
594
  defaultDropBoxPosition: _propTypes["default"].oneOf(['bottom', 'top', 'left', 'right']),
593
595
  dropBoxSize: _propTypes["default"].oneOf(['small', 'medium', 'large']),
@@ -662,7 +664,8 @@ AdvancedMultiSelectComponent.defaultProps = {
662
664
  borderColor: 'default',
663
665
  isBoxPaddingNeed: true,
664
666
  isSearchClearOnSelect: true,
665
- customProps: {}
667
+ customProps: {},
668
+ needEffect: true
666
669
  };
667
670
  AdvancedMultiSelectComponent.displayName = 'AdvancedMultiSelect';
668
671
  var AdvancedMultiSelect = (0, _Popup["default"])(AdvancedMultiSelectComponent);
@@ -1,8 +1,8 @@
1
1
  .wrapper {
2
2
  position: relative;
3
3
  }
4
- .disabled {
5
- composes: disabled from '../common/common.module.css';
4
+ .disabled, .readOnly {
5
+ cursor: not-allowed;
6
6
  }
7
7
  .container {
8
8
  max-height: var(--zd_size120);
@@ -16,28 +16,28 @@
16
16
  .borderColor_transparent {
17
17
  border-bottom-color: var(--zdt_advancedmultiselect_transparent_border);
18
18
  }
19
- .borderColor_transparent:hover {
19
+ .effect .borderColor_transparent:hover {
20
20
  border-bottom-color: var(--zdt_advancedmultiselect_transparent_hover_border);
21
21
  }
22
- .borderColor_transparent.active {
22
+ .effect .borderColor_transparent.active {
23
23
  border-bottom-color: var(--zdt_advancedmultiselect_transparent_active_border);
24
24
  }
25
25
  .borderColor_default {
26
26
  border-bottom-color: var(--zdt_advancedmultiselect_default_border);
27
27
  }
28
- .borderColor_default:hover {
28
+ .effect .borderColor_default:hover {
29
29
  border-bottom-color: var(--zdt_advancedmultiselect_default_hover_border);
30
30
  }
31
- .borderColor_default.active {
31
+ .effect .borderColor_default.active {
32
32
  border-bottom-color: var(--zdt_advancedmultiselect_default_active_border);
33
33
  }
34
34
  .borderColor_dark {
35
35
  border-bottom-color: var(--zdt_advancedmultiselect_dark_border);
36
36
  }
37
- .borderColor_dark:hover {
37
+ .effect .borderColor_dark:hover {
38
38
  border-bottom-color: var(--zdt_advancedmultiselect_dark_hover_border);
39
39
  }
40
- .borderColor_dark.active {
40
+ .effect .borderColor_dark.active {
41
41
  border-bottom-color: var(--zdt_advancedmultiselect_dark_active_border);
42
42
  }
43
43
  [dir=ltr] .container.medium {
@@ -942,7 +942,8 @@ var MultiSelectComponent = /*#__PURE__*/function (_React$Component) {
942
942
  a11y = _this$props13.a11y,
943
943
  children = _this$props13.children,
944
944
  customChildrenClass = _this$props13.customChildrenClass,
945
- getFooter = _this$props13.getFooter;
945
+ getFooter = _this$props13.getFooter,
946
+ needEffect = _this$props13.needEffect;
946
947
  var _i18nKeys = i18nKeys,
947
948
  _i18nKeys$clearText = _i18nKeys.clearText,
948
949
  clearText = _i18nKeys$clearText === void 0 ? 'Clear all' : _i18nKeys$clearText,
@@ -968,7 +969,7 @@ var MultiSelectComponent = /*#__PURE__*/function (_React$Component) {
968
969
  var ariaErrorId = this.getNextAriaId();
969
970
  var isShowClearIcon = !isReadOnly && !isDisabled && !disableAction && selectedOptions.length > 1;
970
971
  return /*#__PURE__*/_react["default"].createElement("div", {
971
- className: "".concat(_MultiSelectModule["default"].wrapper, " ").concat(isDisabled ? _MultiSelectModule["default"].disabled : '', " ").concat(isReadOnly ? _MultiSelectModule["default"].readOnly : '', " ").concat(disableAction ? (0, _CssProvider["default"])('isBlock') : '', " ").concat(borderColor === 'transparent' ? _MultiSelectModule["default"].transparentContainer : ''),
972
+ className: "".concat(_MultiSelectModule["default"].wrapper, " ").concat(isDisabled ? _MultiSelectModule["default"].disabled : '', " ").concat(isReadOnly ? _MultiSelectModule["default"].readOnly : '', " ").concat(disableAction ? (0, _CssProvider["default"])('isBlock') : '', " ").concat(borderColor === 'transparent' ? _MultiSelectModule["default"].transparentContainer : '', " ").concat(needEffect && !(isDisabled || isReadOnly) ? _MultiSelectModule["default"].effect : ''),
972
973
  "data-id": "".concat(isDisabled ? "".concat(dataId, "_disabled") : isReadOnly ? "".concat(dataId, "_readOnly") : dataId),
973
974
  "data-title": isDisabled ? title : '',
974
975
  onClick: this.handleInputFocus
@@ -1175,7 +1176,8 @@ MultiSelectComponent.propTypes = {
1175
1176
  children: _propTypes["default"].node,
1176
1177
  customChildrenClass: _propTypes["default"].string,
1177
1178
  disabledOptions: _propTypes["default"].arrayOf(_propTypes["default"].string),
1178
- getFooter: _propTypes["default"].func
1179
+ getFooter: _propTypes["default"].func,
1180
+ needEffect: _propTypes["default"].bool
1179
1181
  };
1180
1182
  MultiSelectComponent.defaultProps = {
1181
1183
  animationStyle: 'bounce',
@@ -1205,7 +1207,8 @@ MultiSelectComponent.defaultProps = {
1205
1207
  a11y: {},
1206
1208
  textBoxClass: '',
1207
1209
  palette: 'default',
1208
- isSearchClearOnSelect: true
1210
+ isSearchClearOnSelect: true,
1211
+ needEffect: true
1209
1212
  };
1210
1213
 
1211
1214
  if (false) {
@@ -2,14 +2,9 @@
2
2
  position: relative;
3
3
  }
4
4
 
5
- .disabled {
6
- composes: disabled from '../common/common.module.css';
5
+ .disabled, .readOnly {
6
+ cursor: not-allowed;
7
7
  }
8
-
9
- .readOnly {
10
- composes: readonly from '../common/common.module.css';
11
- }
12
-
13
8
  .container {
14
9
  max-height: var(--zd_size120);
15
10
  composes: oflowy from '../common/common.module.css';
@@ -22,28 +17,28 @@
22
17
  .borderColor_transparent {
23
18
  border-bottom-color: var(--zdt_multiselect_transparent_border);
24
19
  }
25
- .borderColor_transparent:hover {
20
+ .effect .borderColor_transparent:hover {
26
21
  border-bottom-color: var(--zdt_multiselect_transparent_hover_border);
27
22
  }
28
- .borderColor_transparent.active {
23
+ .effect .borderColor_transparent.active {
29
24
  border-bottom-color: var(--zdt_multiselect_transparent_active_border);
30
25
  }
31
26
  .borderColor_default {
32
27
  border-bottom-color: var(--zdt_multiselect_default_border);
33
28
  }
34
- .borderColor_default:hover {
29
+ .effect .borderColor_default:hover {
35
30
  border-bottom-color: var(--zdt_multiselect_default_hover_border);
36
31
  }
37
- .borderColor_default.active {
32
+ .effect .borderColor_default.active {
38
33
  border-bottom-color: var(--zdt_multiselect_default_active_border);
39
34
  }
40
35
  .borderColor_dark {
41
36
  border-bottom-color: var(--zdt_multiselect_dark_border);
42
37
  }
43
- .borderColor_dark:hover {
38
+ .effect .borderColor_dark:hover {
44
39
  border-bottom-color: var(--zdt_multiselect_dark_hover_border);
45
40
  }
46
- .borderColor_dark.active {
41
+ .effect .borderColor_dark.active {
47
42
  border-bottom-color: var(--zdt_multiselect_dark_active_border);
48
43
  }
49
44
 
@@ -140,7 +140,8 @@ var MultiSelectWithAvatarComponent = /*#__PURE__*/function (_MultiSelectComponen
140
140
  a11y = _this$props.a11y,
141
141
  children = _this$props.children,
142
142
  customChildrenClass = _this$props.customChildrenClass,
143
- isBoxPaddingNeed = _this$props.isBoxPaddingNeed;
143
+ isBoxPaddingNeed = _this$props.isBoxPaddingNeed,
144
+ needEffect = _this$props.needEffect;
144
145
  var _i18nKeys = i18nKeys,
145
146
  _i18nKeys$clearText = _i18nKeys.clearText,
146
147
  clearText = _i18nKeys$clearText === void 0 ? 'Clear all' : _i18nKeys$clearText;
@@ -165,7 +166,7 @@ var MultiSelectWithAvatarComponent = /*#__PURE__*/function (_MultiSelectComponen
165
166
  var popUpState = !isReadOnly && !isDisabled && !disableAction && isPopupOpen;
166
167
  var isShowClearIcon = !isReadOnly && !isDisabled && !disableAction && selectedOptions.length > 1;
167
168
  return /*#__PURE__*/_react["default"].createElement("div", {
168
- className: " ".concat(_MultiSelectModule["default"].wrapper, " ").concat(isDisabled ? _MultiSelectModule["default"].disabled : '', " ").concat(isReadOnly ? _MultiSelectModule["default"].readOnly : '', " ").concat(disableAction ? (0, _CssProvider["default"])('isBlock') : '', " ").concat(borderColor === 'transparent' ? _MultiSelectModule["default"].transparentContainer : ''),
169
+ className: " ".concat(_MultiSelectModule["default"].wrapper, " ").concat(isDisabled ? _MultiSelectModule["default"].disabled : '', " ").concat(isReadOnly ? _MultiSelectModule["default"].readOnly : '', " ").concat(disableAction ? (0, _CssProvider["default"])('isBlock') : '', " ").concat(borderColor === 'transparent' ? _MultiSelectModule["default"].transparentContainer : '', " ").concat(needEffect && !(isDisabled || isReadOnly) ? _MultiSelectModule["default"].effect : ''),
169
170
  "data-id": "".concat(isDisabled ? "".concat(dataId, "_disabled") : isReadOnly ? "".concat(dataId, "_readOnly") : dataId),
170
171
  "data-title": isDisabled ? title : '',
171
172
  onClick: this.handleInputFocus
@@ -339,6 +340,7 @@ MultiSelectWithAvatarComponent.propTypes = {
339
340
  palette: _propTypes["default"].oneOf(['default', 'dark']),
340
341
  htmlId: _propTypes["default"].string,
341
342
  isBoxPaddingNeed: _propTypes["default"].bool,
343
+ needEffect: _propTypes["default"].bool,
342
344
 
343
345
  /**** Popup props ****/
344
346
  isPopupOpen: _propTypes["default"].bool,
@@ -388,7 +390,8 @@ MultiSelectWithAvatarComponent.defaultProps = {
388
390
  a11y: {},
389
391
  palette: 'default',
390
392
  isBoxPaddingNeed: true,
391
- isSearchClearOnSelect: true
393
+ isSearchClearOnSelect: true,
394
+ needEffect: true
392
395
  };
393
396
  MultiSelectWithAvatarComponent.displayName = 'MultiSelectWithAvatar';
394
397
  var MultiSelectWithAvatar = (0, _Popup["default"])(MultiSelectWithAvatarComponent);
@@ -76,13 +76,14 @@ var SelectedOptions = /*#__PURE__*/function (_React$PureComponent) {
76
76
  isDisabled = option.isDisabled;
77
77
  var commonProps = {
78
78
  disabled: isDisabled,
79
- onRemove: isDisabled ? null : onRemove,
79
+ onRemove: isDisabled || isReadOnly ? null : onRemove,
80
80
  text: value,
81
81
  palette: isDarkPalette,
82
82
  onSelectTag: isReadOnly ? null : onSelect,
83
83
  getRef: getRef,
84
84
  initial: value,
85
- id: id
85
+ id: id,
86
+ isReadOnly: isReadOnly
86
87
  };
87
88
 
88
89
  if (optionType === 'avatar') {
@@ -15,8 +15,6 @@ var _Label = _interopRequireDefault(require("../Label/Label"));
15
15
 
16
16
  var _Layout = require("../Layout");
17
17
 
18
- var _CssProvider = _interopRequireDefault(require("../Provider/CssProvider"));
19
-
20
18
  var _RadioModule = _interopRequireDefault(require("./Radio.module.css"));
21
19
 
22
20
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
@@ -92,7 +90,7 @@ var Radio = /*#__PURE__*/function (_React$Component) {
92
90
  customRadio = _customClass$customRa2 === void 0 ? '' : _customClass$customRa2,
93
91
  _customClass$customLa = customClass.customLabel,
94
92
  customLabel = _customClass$customLa === void 0 ? '' : _customClass$customLa;
95
- var accessMode = isReadOnly ? _RadioModule["default"].readonly : disabled ? (0, _CssProvider["default"])('isDisabled') : _RadioModule["default"].pointer;
93
+ var accessMode = isReadOnly ? _RadioModule["default"].readonly : disabled ? _RadioModule["default"].disabled : _RadioModule["default"].pointer;
96
94
  var toolTip = disabled ? disabledTitle : title ? title : null;
97
95
  var ariaHidden = a11y.ariaHidden,
98
96
  _a11y$role = a11y.role,
@@ -18,8 +18,8 @@
18
18
  .pointer {
19
19
  cursor: pointer;
20
20
  }
21
- .readonly {
22
- cursor: default;
21
+ .readonly, .disabled {
22
+ cursor: not-allowed;
23
23
  }
24
24
  .radio {
25
25
  composes: offSelection from '../common/common.module.css';
@@ -22,8 +22,9 @@ function RippleEffect(props) {
22
22
  palette = props.palette,
23
23
  hoverType = props.hoverType,
24
24
  isNeedEffect = props.isNeedEffect,
25
- needBorder = props.needBorder;
26
- var className = isNeedEffect ? "".concat(_RippleEffectModule["default"].effect, " ").concat(_RippleEffectModule["default"][palette], " ").concat(needBorder ? _RippleEffectModule["default"].border : '', " ").concat(_RippleEffectModule["default"]["".concat(hoverType, "Hover")] ? _RippleEffectModule["default"]["".concat(hoverType, "Hover")] : '', " ").concat(isActive && !isDisabled ? _RippleEffectModule["default"].active : '', " ").concat(isDisabled ? '' : _RippleEffectModule["default"].hoverEffect, " ").concat(isDisabled ? (0, _CssProvider["default"])('isDisabled') : '') : '';
25
+ needBorder = props.needBorder,
26
+ isCopyTextEnabled = props.isCopyTextEnabled;
27
+ var className = isNeedEffect ? "".concat(_RippleEffectModule["default"].effect, " ").concat(_RippleEffectModule["default"][palette], " ").concat(needBorder ? _RippleEffectModule["default"].border : '', " ").concat(_RippleEffectModule["default"]["".concat(hoverType, "Hover")] ? _RippleEffectModule["default"]["".concat(hoverType, "Hover")] : '', " ").concat(isActive && !isDisabled ? _RippleEffectModule["default"].active : '', " ").concat(isDisabled ? '' : _RippleEffectModule["default"].hoverEffect, " ").concat(isCopyTextEnabled ? _RippleEffectModule["default"].notAllowed : isDisabled ? (0, _CssProvider["default"])('isDisabled') : '') : '';
27
28
 
28
29
  var child = _react["default"].Children.only(children);
29
30
 
@@ -38,7 +39,8 @@ RippleEffect.defaultProps = {
38
39
  isNeedEffect: true,
39
40
  needBorder: true,
40
41
  hoverType: 'default',
41
- palette: 'default'
42
+ palette: 'default',
43
+ isCopyTextEnabled: false
42
44
  };
43
45
  RippleEffect.propTypes = {
44
46
  children: _propTypes["default"].node,
@@ -47,7 +49,8 @@ RippleEffect.propTypes = {
47
49
  isDisabled: _propTypes["default"].bool,
48
50
  isNeedEffect: _propTypes["default"].bool,
49
51
  needBorder: _propTypes["default"].bool,
50
- palette: _propTypes["default"].oneOf(['default', 'primary', 'primaryLight', 'primaryFilled', 'primaryDark', 'green', 'danger'])
52
+ palette: _propTypes["default"].oneOf(['default', 'primary', 'primaryLight', 'primaryFilled', 'primaryDark', 'green', 'danger']),
53
+ isCopyTextEnabled: _propTypes["default"].bool
51
54
  };
52
55
 
53
56
  if (false) {
@@ -65,3 +65,6 @@
65
65
  .hoverEffect:hover.primaryDark.bgHover, .hoverEffect:focus.primaryDark.bgHover {
66
66
  background-color: var(--zdt_rippleeffect_primary_dark_bg);
67
67
  }
68
+ .notAllowed {
69
+ cursor: not-allowed;
70
+ }
@@ -47,7 +47,7 @@
47
47
  padding: var(--zd_size10) 0;
48
48
  }
49
49
  .readonly {
50
- composes: readonly from '../common/common.module.css';
50
+ --textboxicon_icon_cursor: not-allowed;
51
51
  }
52
52
  .transparentContainer .arrowIcon {
53
53
  opacity: 0;
@@ -187,7 +187,8 @@ var SelectWithAvatarComponent = /*#__PURE__*/function (_SelectComponent) {
187
187
  tagSize = _this$props.tagSize,
188
188
  groupName = _this$props.groupName,
189
189
  i18nKeys = _this$props.i18nKeys,
190
- htmlId = _this$props.htmlId;
190
+ htmlId = _this$props.htmlId,
191
+ needEffect = _this$props.needEffect;
191
192
  i18nKeys = Object.assign({}, i18nKeys, {
192
193
  emptyText: i18nKeys.emptyText || emptyMessage,
193
194
  searchEmptyText: i18nKeys.searchEmptyText || searchEmptyMessage
@@ -209,7 +210,7 @@ var SelectWithAvatarComponent = /*#__PURE__*/function (_SelectComponent) {
209
210
  var setAriaId = this.getNextAriaId();
210
211
  var ariaErrorId = this.getNextAriaId();
211
212
  return /*#__PURE__*/_react["default"].createElement("div", {
212
- className: "".concat(_MultiSelectModule["default"].wrapper, " ").concat(isDisabled ? _MultiSelectModule["default"].disabled : '', " ").concat(isReadOnly ? _MultiSelectModule["default"].readOnly : '', " ").concat(className ? className : ''),
213
+ className: "".concat(_MultiSelectModule["default"].wrapper, " ").concat(isDisabled ? _MultiSelectModule["default"].disabled : '', " ").concat(isReadOnly ? _MultiSelectModule["default"].readOnly : '', " ").concat(needEffect && !(isDisabled || isReadOnly) ? _MultiSelectModule["default"].effect : '', " ").concat(className ? className : ''),
213
214
  "data-id": "".concat(isDisabled ? "".concat(dataId, "_disabled") : isReadOnly ? "".concat(dataId, "_readOnly") : dataId),
214
215
  "data-title": isDisabled ? title : ''
215
216
  }, /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
@@ -389,7 +390,8 @@ SelectWithAvatarComponent.propTypes = {
389
390
  title: _propTypes["default"].string,
390
391
  togglePopup: _propTypes["default"].func,
391
392
  valueField: _propTypes["default"].string,
392
- htmlId: _propTypes["default"].string
393
+ htmlId: _propTypes["default"].string,
394
+ needEffect: _propTypes["default"].bool
393
395
  };
394
396
  SelectWithAvatarComponent.defaultProps = {
395
397
  animationStyle: 'bounce',
@@ -410,7 +412,8 @@ SelectWithAvatarComponent.defaultProps = {
410
412
  dataId: 'selectWithAvatar',
411
413
  borderColor: 'default',
412
414
  isSearchClearOnClose: true,
413
- i18nKeys: {}
415
+ i18nKeys: {},
416
+ needEffect: true
414
417
  };
415
418
  SelectWithAvatarComponent.displayName = 'SelectWithAvatar';
416
419
  var SelectWithAvatar = (0, _Popup["default"])(SelectWithAvatarComponent);
package/lib/Tag/Tag.js CHANGED
@@ -132,7 +132,9 @@ var Tag = /*#__PURE__*/function (_PureComponent) {
132
132
  tooltip = _this$props4.tooltip,
133
133
  avatarPalette = _this$props4.avatarPalette,
134
134
  customClass = _this$props4.customClass,
135
- a11y = _this$props4.a11y;
135
+ a11y = _this$props4.a11y,
136
+ needEffect = _this$props4.needEffect,
137
+ isReadOnly = _this$props4.isReadOnly;
136
138
  var _customClass$customTa = customClass.customTag,
137
139
  customTag = _customClass$customTa === void 0 ? '' : _customClass$customTa,
138
140
  _customClass$customTa2 = customClass.customTagClose,
@@ -147,7 +149,7 @@ var Tag = /*#__PURE__*/function (_PureComponent) {
147
149
  clearLabel = _a11y$clearLabel === void 0 ? 'Delete' : _a11y$clearLabel;
148
150
  var isDarkPalette = palette === 'dark';
149
151
  return /*#__PURE__*/_react["default"].createElement("div", {
150
- className: "".concat(_TagModule["default"].container, " ").concat(active ? "".concat(_TagModule["default"].selected, " ").concat(_TagModule["default"]["active".concat(palette)]) : '', " ").concat(onRemove ? active ? "".concat(_TagModule["default"]["active".concat(size, "Effect")]) : '' : '', " ").concat(_TagModule["default"][size], " ").concat(rounded ? _TagModule["default"].lgRadius : _TagModule["default"].smRadius, " ").concat(_TagModule["default"][palette], " ").concat(disabled ? _TagModule["default"].disabled : '', " ").concat(onSelectTag ? _TagModule["default"].pointer : '', " ").concat(customTag),
152
+ className: "".concat(_TagModule["default"].container, " ").concat(needEffect && !isReadOnly ? _TagModule["default"].effect : _TagModule["default"].readonly, " ").concat(active ? "".concat(_TagModule["default"].selected, " ").concat(_TagModule["default"]["active".concat(palette)]) : '', " ").concat(onRemove ? active ? "".concat(_TagModule["default"]["active".concat(size, "Effect")]) : '' : '', " ").concat(_TagModule["default"][size], " ").concat(rounded ? _TagModule["default"].lgRadius : _TagModule["default"].smRadius, " ").concat(_TagModule["default"][palette], " ").concat(disabled ? _TagModule["default"].disabled : '', " ").concat(onSelectTag ? _TagModule["default"].pointer : '', " ").concat(customTag),
151
153
  "data-id": active ? "".concat(dataId, "_TagSelected") : "".concat(dataId, "_Tag"),
152
154
  onClick: this.handleSelect,
153
155
  ref: this.getRef,
@@ -204,7 +206,9 @@ Tag.defaultProps = {
204
206
  size: 'medium',
205
207
  dataId: 'tag',
206
208
  customClass: {},
207
- a11y: {}
209
+ a11y: {},
210
+ needEffect: true,
211
+ isReadOnly: false
208
212
  };
209
213
  Tag.propTypes = {
210
214
  active: _propTypes.PropTypes.bool,
@@ -235,7 +239,9 @@ Tag.propTypes = {
235
239
  }),
236
240
  a11y: _propTypes.PropTypes.shape({
237
241
  clearLabel: _propTypes.PropTypes.string
238
- })
242
+ }),
243
+ needEffect: _propTypes.PropTypes.bool,
244
+ isReadOnly: _propTypes.PropTypes.bool
239
245
  };
240
246
 
241
247
  if (false) {
@@ -50,9 +50,12 @@
50
50
  }
51
51
  .disabled {
52
52
  pointer-events: none;
53
- --tag_cursor: not-allowed;
54
53
  --tag_text_color: var(--zdt_tag_disabled_text);
55
54
  }
55
+ .readonly,
56
+ .disabled {
57
+ --tag_cursor: not-allowed;
58
+ }
56
59
  .pointer {
57
60
  --tag_cursor: pointer;
58
61
  }
@@ -158,11 +161,11 @@
158
161
  .danger {
159
162
  --tag_bg_color: var(--zdt_tag_default_danger_bg);
160
163
  }
161
- .default:hover {
164
+ .effect.default:hover {
162
165
  --tag_bg_color: var(--zdt_tag_default_hover_bg);
163
166
  }
164
167
  .activedefault,
165
- .activedefault:hover {
168
+ .effect.activedefault:hover {
166
169
  --tag_bg_color: var(--zdt_tag_active_default_bg);
167
170
  }
168
171
  .activeprimaryClose,
@@ -170,11 +173,11 @@
170
173
  --tag_closeicon_bg_color: var(--zdt_tag_primary_bg);
171
174
  }
172
175
 
173
- .danger:hover {
176
+ .effect.danger:hover {
174
177
  --tag_bg_color: var(--zdt_tag_danger_hover_bg);
175
178
  }
176
179
  .activedanger,
177
- .activedanger:hover {
180
+ .effect.activedanger:hover {
178
181
  --tag_bg_color: var(--zdt_tag_danger_hover_bg);
179
182
  }
180
183
  .activedangerClose,
@@ -187,7 +190,7 @@
187
190
  --tag_text_color: var(--zdt_tag_secondary_text);
188
191
  }
189
192
  .activesecondary,
190
- .secondary:hover {
193
+ .effect.secondary:hover {
191
194
  --tag_bg_color: var(--zdt_tag_secondary_hover_bg);
192
195
  }
193
196
 
@@ -196,12 +199,12 @@
196
199
  --tag_border_width: 1px;
197
200
  --tag_border_color: var(--zdt_tag_pure_border);
198
201
  }
199
- .pureDotted:hover {
202
+ .effect.pureDotted:hover {
200
203
  --tag_bg_color: var(--zdt_tag_pure_hover_bg);
201
204
  --tag_border_color: var(--zdt_tag_pure_hover_border);
202
205
  }
203
206
  .activepureDotted,
204
- .activepureDotted:hover {
207
+ .effect.activepureDotted:hover {
205
208
  --tag_bg_color: var(--zdt_tag_pure_bg);
206
209
  }
207
210
 
@@ -210,10 +213,10 @@
210
213
  --tag_border_width: 1px;
211
214
  --tag_border_color: var(--zdt_tag_primary_border);
212
215
  }
213
- .primaryDotted:hover,
216
+ .effect.primaryDotted:hover,
214
217
  .activeprimaryDotted,
215
218
  .primary,
216
- .primary:hover {
219
+ .effect.primary:hover {
217
220
  --tag_bg_color: var(--zdt_tag_active_default_bg);
218
221
  }
219
222
 
@@ -228,7 +231,7 @@
228
231
  --tag_bg_color: var(--zdt_tag_dark_bg);
229
232
  --tag_text_color: var(--zdt_tag_dark_text);
230
233
  }
231
- .dark:hover {
234
+ .effect.dark:hover {
232
235
  --tag_bg_color: var(--zdt_tag_dark_hover_bg);
233
236
  --tag_text_color: var(--zdt_tag_dark_hover_text);
234
237
  }
@@ -144,7 +144,7 @@ var TextBoxIcon = /*#__PURE__*/function (_React$Component) {
144
144
  return /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
145
145
  alignBox: "row",
146
146
  isCover: false,
147
- className: "".concat(_TextBoxIconModule["default"].container, " ").concat(isDisabled ? _TextBoxIconModule["default"].disabled : isReadOnly ? needEffect ? _TextBoxIconModule["default"].effect : '' : _TextBoxIconModule["default"].effect, " ").concat(isActive || isFocus ? _TextBoxIconModule["default"].effectFocused : '', " ").concat(customTBoxWrap, " ").concat(iconOnHover && (isReadOnly || isDisabled) ? _TextBoxIconModule["default"].iconOnHoverReadonly : iconOnHover && !(isReadOnly || isDisabled) ? _TextBoxIconModule["default"].iconOnHoverStyle : ''),
147
+ className: "".concat(_TextBoxIconModule["default"].container, " ").concat(isDisabled ? _TextBoxIconModule["default"].disabled : isReadOnly ? needEffect ? _TextBoxIconModule["default"].effect : _TextBoxIconModule["default"].readonly : _TextBoxIconModule["default"].effect, " ").concat(isActive || isFocus ? _TextBoxIconModule["default"].effectFocused : '', " ").concat(customTBoxWrap, " ").concat(iconOnHover && (isReadOnly || isDisabled) ? _TextBoxIconModule["default"].iconOnHoverReadonly : iconOnHover && !(isReadOnly || isDisabled) ? _TextBoxIconModule["default"].iconOnHoverStyle : ''),
148
148
  "data-title": isDisabled ? title : ''
149
149
  }, /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
150
150
  flexible: true
@@ -12,8 +12,11 @@
12
12
  composes: varClass;
13
13
  position: relative;
14
14
  }
15
- .disabled {
16
- composes: disabled from '../common/common.module.css';
15
+ .disabled,.readonly {
16
+ --textboxicon_icon_cursor: not-allowed;
17
+ }
18
+ .disabled, .readonly {
19
+ cursor: not-allowed;
17
20
  }
18
21
  .icon {
19
22
  composes: offSelection from '../common/common.module.css';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zohodesk/components",
3
- "version": "1.0.0-alpha-226",
3
+ "version": "1.0.0-alpha-227",
4
4
  "main": "lib/index.js",
5
5
  "module": "es/index.js",
6
6
  "jsnext:main": "es/index.js",