@zohodesk/components 1.0.0-temp-199.9 → 1.0.0-temp-216.1

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 (98) hide show
  1. package/.cli/propValidation_report.html +1 -1
  2. package/README.md +0 -9
  3. package/assets/Appearance/dark/mode/Component_DarkMode.module.css +9 -5
  4. package/assets/Appearance/dark/themes/blue/blue_ComponentTheme_DarkTheme.module.css +5 -0
  5. package/assets/Appearance/dark/themes/green/green_ComponentTheme_DarkTheme.module.css +5 -0
  6. package/assets/Appearance/dark/themes/orange/orange_ComponentTheme_DarkTheme.module.css +5 -0
  7. package/assets/Appearance/dark/themes/red/red_ComponentTheme_DarkTheme.module.css +5 -0
  8. package/assets/Appearance/dark/themes/yellow/yellow_ComponentTheme_DarkTheme.module.css +5 -0
  9. package/assets/Appearance/light/mode/Component_LightMode.module.css +9 -5
  10. package/assets/Appearance/light/themes/blue/blue_ComponentTheme_LightTheme.module.css +5 -0
  11. package/assets/Appearance/light/themes/green/green_ComponentTheme_LightTheme.module.css +5 -0
  12. package/assets/Appearance/light/themes/orange/orange_ComponentTheme_LightTheme.module.css +5 -0
  13. package/assets/Appearance/light/themes/red/red_ComponentTheme_LightTheme.module.css +5 -0
  14. package/assets/Appearance/light/themes/yellow/yellow_ComponentTheme_LightTheme.module.css +5 -0
  15. package/assets/Appearance/pureDark/mode/Component_PureDarkMode.module.css +9 -5
  16. package/assets/Appearance/pureDark/themes/blue/blue_ComponentTheme_PureDarkTheme.module.css +5 -0
  17. package/assets/Appearance/pureDark/themes/green/green_ComponentTheme_PureDarkTheme.module.css +5 -0
  18. package/assets/Appearance/pureDark/themes/orange/orange_ComponentTheme_PureDarkTheme.module.css +5 -0
  19. package/assets/Appearance/pureDark/themes/red/red_ComponentTheme_PureDarkTheme.module.css +5 -0
  20. package/assets/Appearance/pureDark/themes/yellow/yellow_ComponentTheme_PureDarkTheme.module.css +5 -0
  21. package/es/Button/Button.js +0 -2
  22. package/es/Button/css/Button.module.css +37 -1
  23. package/es/Button/css/cssJSLogic.js +10 -1
  24. package/es/DropBox/DropBoxElement/DropBoxElement.js +1 -3
  25. package/es/DropBox/DropBoxElement/__tests__/__snapshots__/DropBoxElement.spec.js.snap +2 -4
  26. package/es/DropBox/DropBoxElement/css/DropBoxElement.module.css +53 -56
  27. package/es/DropBox/DropBoxElement/css/cssJSLogic.js +4 -4
  28. package/es/DropBox/__tests__/__snapshots__/DropBox.spec.js.snap +2 -4
  29. package/es/DropDown/__tests__/__snapshots__/DropDown.spec.js.snap +1 -3
  30. package/es/ListItem/ListItem.js +2 -2
  31. package/es/ListItem/ListItem.module.css +2 -15
  32. package/es/ListItem/ListItemWithAvatar.js +3 -3
  33. package/es/ListItem/ListItemWithIcon.js +2 -2
  34. package/es/MultiSelect/AdvancedGroupMultiSelect.js +2 -7
  35. package/es/MultiSelect/MultiSelect.js +2 -7
  36. package/es/MultiSelect/Suggestions.js +5 -14
  37. package/es/MultiSelect/props/defaultProps.js +4 -9
  38. package/es/MultiSelect/props/propTypes.js +3 -9
  39. package/es/Popup/Popup.js +83 -232
  40. package/es/Provider/LibraryContext.js +3 -1
  41. package/es/ResponsiveDropBox/__tests__/__snapshots__/ResponsiveDropBox.spec.js.snap +2 -4
  42. package/es/Select/GroupSelect.js +1 -5
  43. package/es/Select/SelectWithAvatar.js +2 -7
  44. package/es/Select/SelectWithIcon.js +2 -4
  45. package/es/Select/props/defaultProps.js +1 -2
  46. package/es/Select/props/propTypes.js +2 -4
  47. package/es/common/common.module.css +0 -5
  48. package/es/utils/Common.js +1 -2
  49. package/es/v1/ListItem/ListItem.js +1 -1
  50. package/es/v1/MultiSelect/AdvancedMultiSelect.js +1 -2
  51. package/es/v1/MultiSelect/MultiSelect.js +2 -7
  52. package/es/v1/MultiSelect/Suggestions.js +4 -8
  53. package/es/v1/MultiSelect/props/defaultProps.js +2 -4
  54. package/es/v1/MultiSelect/props/propTypes.js +2 -6
  55. package/es/v1/Select/GroupSelect.js +2 -7
  56. package/es/v1/Select/SelectWithAvatar.js +2 -7
  57. package/es/v1/Select/props/defaultProps.js +2 -4
  58. package/es/v1/Select/props/propTypes.js +2 -6
  59. package/lib/Button/Button.js +0 -2
  60. package/lib/Button/css/Button.module.css +37 -1
  61. package/lib/Button/css/cssJSLogic.js +15 -2
  62. package/lib/DropBox/DropBoxElement/DropBoxElement.js +1 -3
  63. package/lib/DropBox/DropBoxElement/__tests__/__snapshots__/DropBoxElement.spec.js.snap +2 -4
  64. package/lib/DropBox/DropBoxElement/css/DropBoxElement.module.css +53 -56
  65. package/lib/DropBox/DropBoxElement/css/cssJSLogic.js +2 -2
  66. package/lib/DropBox/__tests__/__snapshots__/DropBox.spec.js.snap +2 -4
  67. package/lib/DropDown/__tests__/__snapshots__/DropDown.spec.js.snap +1 -3
  68. package/lib/ListItem/ListItem.js +2 -2
  69. package/lib/ListItem/ListItem.module.css +2 -15
  70. package/lib/ListItem/ListItemWithAvatar.js +3 -3
  71. package/lib/ListItem/ListItemWithIcon.js +2 -2
  72. package/lib/MultiSelect/AdvancedGroupMultiSelect.js +3 -7
  73. package/lib/MultiSelect/MultiSelect.js +3 -6
  74. package/lib/MultiSelect/Suggestions.js +5 -12
  75. package/lib/MultiSelect/props/defaultProps.js +4 -9
  76. package/lib/MultiSelect/props/propTypes.js +3 -8
  77. package/lib/Popup/Popup.js +114 -282
  78. package/lib/Provider/LibraryContext.js +3 -1
  79. package/lib/ResponsiveDropBox/__tests__/__snapshots__/ResponsiveDropBox.spec.js.snap +2 -4
  80. package/lib/Select/GroupSelect.js +2 -4
  81. package/lib/Select/SelectWithAvatar.js +3 -8
  82. package/lib/Select/SelectWithIcon.js +3 -5
  83. package/lib/Select/props/defaultProps.js +1 -2
  84. package/lib/Select/props/propTypes.js +2 -4
  85. package/lib/common/common.module.css +0 -5
  86. package/lib/utils/Common.js +1 -5
  87. package/lib/v1/ListItem/ListItem.js +1 -1
  88. package/lib/v1/MultiSelect/AdvancedMultiSelect.js +1 -3
  89. package/lib/v1/MultiSelect/MultiSelect.js +3 -8
  90. package/lib/v1/MultiSelect/Suggestions.js +4 -8
  91. package/lib/v1/MultiSelect/props/defaultProps.js +2 -4
  92. package/lib/v1/MultiSelect/props/propTypes.js +2 -6
  93. package/lib/v1/Select/GroupSelect.js +3 -8
  94. package/lib/v1/Select/SelectWithAvatar.js +3 -8
  95. package/lib/v1/Select/props/defaultProps.js +2 -4
  96. package/lib/v1/Select/props/propTypes.js +2 -6
  97. package/package.json +2 -2
  98. package/result.json +1 -1
@@ -81,7 +81,7 @@ const ListItem = props => {
81
81
  autoHover: autoHover,
82
82
  needTick: needTick,
83
83
  needBorder: needBorder,
84
- customClass: `${customListItem} ${needMultiLineText ? style.txtAlignBaseLine + ' ' + style.autoHeight : ''} ${customListItem}`,
84
+ customClass: customListItem,
85
85
  dataId: dataIdString,
86
86
  dataSelectorId: `${dataSelectorId}`,
87
87
  isLink: isLink,
@@ -549,8 +549,7 @@ export class AdvancedMultiSelectComponent extends MultiSelectComponent {
549
549
  role: 'option'
550
550
  },
551
551
  dataId: `${dataIdMultiSelectComp}_Options`,
552
- ...SuggestionsProps,
553
- needMultiLineText: true
552
+ ...SuggestionsProps
554
553
  }) : /*#__PURE__*/React.createElement(EmptyState, {
555
554
  isLoading: isFetchingOptions,
556
555
  options: options,
@@ -1002,12 +1002,8 @@ export class MultiSelectComponent extends React.Component {
1002
1002
  boxSize,
1003
1003
  isLoading,
1004
1004
  selectAllText,
1005
- needSelectAll,
1006
- customProps
1005
+ needSelectAll
1007
1006
  } = this.props;
1008
- const {
1009
- suggestionsProps = {}
1010
- } = customProps;
1011
1007
  const {
1012
1008
  selectedOptions,
1013
1009
  searchStr,
@@ -1097,8 +1093,7 @@ export class MultiSelectComponent extends React.Component {
1097
1093
  selectedOptions: selectedOptionIds,
1098
1094
  a11y: {
1099
1095
  role: 'option'
1100
- },
1101
- ...suggestionsProps
1096
+ }
1102
1097
  }) : /*#__PURE__*/React.createElement(EmptyState, {
1103
1098
  isLoading: isFetchingOptions,
1104
1099
  options: options,
@@ -27,8 +27,7 @@ export default class Suggestions extends React.PureComponent {
27
27
  avatarPalette,
28
28
  palette,
29
29
  htmlId,
30
- a11y,
31
- needMultiLineText
30
+ a11y
32
31
  } = this.props;
33
32
  const {
34
33
  ariaParentRole,
@@ -93,8 +92,7 @@ export default class Suggestions extends React.PureComponent {
93
92
  size: listItemSize,
94
93
  avatarPalette: avatarPalette,
95
94
  palette: palette,
96
- a11y: list_a11y,
97
- needMultiLineText: needMultiLineText
95
+ a11y: list_a11y
98
96
  });
99
97
  } else if (optionType === 'icon') {
100
98
  return /*#__PURE__*/React.createElement(ListItemWithIcon, { ...commonProps,
@@ -114,8 +112,7 @@ export default class Suggestions extends React.PureComponent {
114
112
  iconSize: iconSize,
115
113
  size: listItemSize,
116
114
  palette: palette,
117
- a11y: list_a11y,
118
- needMultiLineText: needMultiLineText
115
+ a11y: list_a11y
119
116
  });
120
117
  }
121
118
 
@@ -134,8 +131,7 @@ export default class Suggestions extends React.PureComponent {
134
131
  active: isActive,
135
132
  size: listItemSize,
136
133
  palette: palette,
137
- a11y: list_a11y,
138
- needMultiLineText: needMultiLineText
134
+ a11y: list_a11y
139
135
  });
140
136
  })));
141
137
  }
@@ -117,8 +117,7 @@ export const MultiSelect_defaultProps = {
117
117
  keepSelectedOptions: false,
118
118
  selectedOptionsCount: 0,
119
119
  cardHeaderName: '',
120
- needResponsive: true,
121
- customProps: {}
120
+ needResponsive: true
122
121
  };
123
122
  export const MultiSelectHeader_defaultProps = {
124
123
  dataId: 'MultiSelectHeader'
@@ -162,6 +161,5 @@ export const SelectedOptions_defaultProps = {
162
161
  dataId: 'selectedOptions'
163
162
  };
164
163
  export const Suggestions_defaultProps = {
165
- a11y: {},
166
- needMultiLineText: false
164
+ a11y: {}
167
165
  };
@@ -108,10 +108,7 @@ export const MultiSelect_propTypes = {
108
108
  needSelectAll: PropTypes.bool,
109
109
  selectAllText: PropTypes.string,
110
110
  setAriaId: PropTypes.string,
111
- ariaErrorId: PropTypes.string,
112
- customProps: {
113
- suggestionsProps: PropTypes.object
114
- }
111
+ ariaErrorId: PropTypes.string
115
112
  };
116
113
  export const MultiSelectHeader_propTypes = {
117
114
  dataId: PropTypes.string,
@@ -176,8 +173,7 @@ export const Suggestions_propTypes = {
176
173
  logo: PropTypes.string,
177
174
  optionType: PropTypes.string,
178
175
  listItemProps: PropTypes.object
179
- })),
180
- needMultiLineText: PropTypes.bool
176
+ }))
181
177
  };
182
178
  export const AdvancedGroupMultiSelect_propTypes = {
183
179
  animationStyle: PropTypes.string,
@@ -590,12 +590,8 @@ export class GroupSelectComponent extends PureComponent {
590
590
  htmlId,
591
591
  iconOnHover,
592
592
  isLoading,
593
- dataSelectorId,
594
- customProps
593
+ dataSelectorId
595
594
  } = this.props;
596
- const {
597
- suggestionsProps = {}
598
- } = customProps;
599
595
  i18nKeys = Object.assign({}, i18nKeys, {
600
596
  emptyText: i18nKeys.emptyText || emptyMessage,
601
597
  searchEmptyText: i18nKeys.searchEmptyText || searchEmptyMessage
@@ -788,8 +784,7 @@ export class GroupSelectComponent extends PureComponent {
788
784
  ariaParentRole: 'listbox',
789
785
  role: 'option'
790
786
  },
791
- dataId: `${dataId}_Options`,
792
- ...suggestionsProps
787
+ dataId: `${dataId}_Options`
793
788
  }));
794
789
  }) : /*#__PURE__*/React.createElement(EmptyState, {
795
790
  options: revampedGroups,
@@ -163,12 +163,8 @@ class SelectWithAvatarComponent extends SelectComponent {
163
163
  needEffect,
164
164
  isLoading,
165
165
  dataSelectorId,
166
- getTargetRef,
167
- customProps
166
+ getTargetRef
168
167
  } = this.props;
169
- const {
170
- suggestionsProps = {}
171
- } = customProps;
172
168
  i18nKeys = Object.assign({}, i18nKeys, {
173
169
  emptyText: i18nKeys.emptyText || emptyMessage,
174
170
  searchEmptyText: i18nKeys.searchEmptyText || searchEmptyMessage
@@ -325,8 +321,7 @@ class SelectWithAvatarComponent extends SelectComponent {
325
321
  a11y: {
326
322
  ariaParentRole: 'listbox',
327
323
  role: 'option'
328
- },
329
- ...suggestionsProps
324
+ }
330
325
  }) : /*#__PURE__*/React.createElement(EmptyState, {
331
326
  isLoading: isFetchingOptions,
332
327
  options: options,
@@ -69,8 +69,7 @@ export const GroupSelect_defaultProps = {
69
69
  isRestrictScroll: false,
70
70
  i18nKeys: {},
71
71
  iconOnHover: false,
72
- isLoading: false,
73
- customProps: {}
72
+ isLoading: false
74
73
  };
75
74
  export const SelectWithAvatar_defaultProps = {
76
75
  animationStyle: 'bounce',
@@ -96,8 +95,7 @@ export const SelectWithAvatar_defaultProps = {
96
95
  isRestrictScroll: false,
97
96
  i18nKeys: {},
98
97
  needEffect: true,
99
- isLoading: false,
100
- customProps: {}
98
+ isLoading: false
101
99
  };
102
100
  export const SelectWithIcon_defaultProps = {
103
101
  isReadOnly: false,
@@ -174,10 +174,7 @@ export const GroupSelect_propTypes = {
174
174
  }),
175
175
  isLoading: PropTypes.bool,
176
176
  dataSelectorId: PropTypes.string,
177
- isDefaultSelectValue: PropTypes.bool,
178
- customProps: PropTypes.shape({
179
- suggestionsProps: PropTypes.object
180
- })
177
+ isDefaultSelectValue: PropTypes.bool
181
178
  };
182
179
  export const SelectWithAvatar_propTypes = { ...Select_propTypes,
183
180
  textBoxClass: PropTypes.string,
@@ -238,8 +235,7 @@ export const SelectWithAvatar_propTypes = { ...Select_propTypes,
238
235
  htmlId: PropTypes.string,
239
236
  needEffect: PropTypes.bool,
240
237
  isLoading: PropTypes.bool,
241
- dataSelectorId: PropTypes.string,
242
- customProps: PropTypes.object
238
+ dataSelectorId: PropTypes.string
243
239
  };
244
240
  export const SelectWithIcon_propTypes = {
245
241
  animationStyle: PropTypes.oneOf(['default', 'bounce']),
@@ -26,8 +26,6 @@ Button text and children props?
26
26
  use children for both cases
27
27
  toLowerCase check needed?
28
28
  */
29
-
30
- /* eslint css-modules/no-unused-class: [2, { markAsUsed: ['small','medium','large','xlarge','button_medium','button_small','primary','primaryfilled','danger','dangerfilled','plainprimary', 'plainsecondary', 'secondary', 'secondaryfilled', 'successFilled','tertiaryFilled'] }] */
31
29
  function Button(props) {
32
30
  var text = props.text,
33
31
  disabled = props.disabled,
@@ -38,7 +38,6 @@
38
38
  }
39
39
 
40
40
  .native:disabled {
41
- pointer-events: none;
42
41
  --button_cursor: not-allowed;
43
42
  --button_opacity: 0.4;
44
43
  }
@@ -525,4 +524,41 @@
525
524
 
526
525
  .loader{
527
526
  color:var(--dot_mirror)
527
+ }
528
+
529
+ [dir=ltr] .strike {
530
+ background-image: repeating-linear-gradient(120deg, var(--button_strike_color), var(--button_strike_color) 1px, var(--button_bg_color) 0px, var(--button_bg_color) 8px);
531
+ }
532
+
533
+ [dir=rtl] .strike {
534
+ background-image: repeating-linear-gradient(-120deg, var(--button_strike_color), var(--button_strike_color) 1px, var(--button_bg_color) 0px, var(--button_bg_color) 8px);
535
+ }
536
+ .primaryStrike {
537
+ --button_strike_color: var(--zdt_button_primary_strike);
538
+ }
539
+ .primaryfilledStrike {
540
+ --button_strike_color: var(--zdt_button_primaryFilled_strike);
541
+ --button_border_color: var(--zdt_button_primaryfill_bg);
542
+ }
543
+ .dangerStrike {
544
+ --button_strike_color: var(--zdt_button_danger_strike);
545
+ }
546
+ .dangerfilledStrike {
547
+ --button_strike_color: var(--zdt_button_dangerFilled_strike);
548
+ --button_border_color: var(--zdt_button_dangerfill_bg);
549
+ }
550
+ .secondaryStrike {
551
+ --button_strike_color: var(--zdt_button_secondary_border);
552
+ }
553
+ .secondaryfilledStrike {
554
+ --button_strike_color: var(--zdt_button_secondaryFilled_strike);
555
+ --button_border_color: var(--zdt_button_secondaryfill_bg);
556
+ }
557
+ .tertiaryfilledStrike {
558
+ --button_strike_color: var(--zdt_button_tertiaryFilled_strike);
559
+ --button_border_color: var(--zdt_button_tertiaryfill_bg);
560
+ }
561
+ .successfilledStrike {
562
+ --button_strike_color: var(--zdt_button_successFilled_strike);
563
+ --button_border_color: var(--zdt_button_successfill_bg);
528
564
  }
@@ -5,8 +5,14 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports["default"] = cssJSLogic;
7
7
 
8
+ var _react = require("react");
9
+
8
10
  var _utils = require("@zohodesk/utils");
9
11
 
12
+ var _LibraryContextInit = _interopRequireDefault(require("../../Provider/LibraryContextInit"));
13
+
14
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
15
+
10
16
  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
11
17
 
12
18
  function cssJSLogic(_ref) {
@@ -21,16 +27,23 @@ function cssJSLogic(_ref) {
21
27
  size = props.size,
22
28
  children = props.children,
23
29
  palette = props.palette,
24
- status = props.status;
30
+ status = props.status,
31
+ disabled = props.disabled;
25
32
  var _customClass$customBu = customClass.customButton,
26
33
  customButton = _customClass$customBu === void 0 ? '' : _customClass$customBu,
27
34
  _customClass$customSt = customClass.customStatus,
28
35
  customStatus = _customClass$customSt === void 0 ? '' : _customClass$customSt,
29
36
  _customClass$customSt2 = customClass.customStatusSize,
30
37
  customStatusSize = _customClass$customSt2 === void 0 ? '' : _customClass$customSt2;
38
+
39
+ var _useContext = (0, _react.useContext)(_LibraryContextInit["default"]),
40
+ shouldStrikeThroughDisabledButton = _useContext.shouldStrikeThroughDisabledButton;
41
+
42
+ var strikeExcludedPalettes = ['plainprimary', 'plainsecondary'];
31
43
  var paletteLower = palette.toLowerCase();
32
44
  var statusLower = status.toLowerCase();
33
- var buttonClass = (0, _utils.compileClassNames)((_compileClassNames = {}, _defineProperty(_compileClassNames, customButton, !!customButton), _defineProperty(_compileClassNames, style.bold, isBold), _defineProperty(_compileClassNames, style["default"], !needAppearance), _defineProperty(_compileClassNames, style[paletteLower], needAppearance), _defineProperty(_compileClassNames, style.rounded, needAppearance && rounded), _defineProperty(_compileClassNames, style[size.toLowerCase()], needAppearance && !children), _defineProperty(_compileClassNames, style["".concat(size, "Btn")], needAppearance && children), _defineProperty(_compileClassNames, style["".concat(size, "Btn").concat(paletteLower)], needAppearance && children && rounded), _defineProperty(_compileClassNames, style.loader, !!needAppearance && statusLower !== 'none'), _compileClassNames));
45
+ var canStrikeThrough = !strikeExcludedPalettes.includes(paletteLower);
46
+ var buttonClass = (0, _utils.compileClassNames)((_compileClassNames = {}, _defineProperty(_compileClassNames, customButton, !!customButton), _defineProperty(_compileClassNames, style.bold, isBold), _defineProperty(_compileClassNames, style["default"], !needAppearance), _defineProperty(_compileClassNames, style[paletteLower], needAppearance), _defineProperty(_compileClassNames, style.rounded, needAppearance && rounded), _defineProperty(_compileClassNames, style[size.toLowerCase()], needAppearance && !children), _defineProperty(_compileClassNames, style["".concat(size, "Btn")], needAppearance && children), _defineProperty(_compileClassNames, style["".concat(size, "Btn").concat(paletteLower)], needAppearance && children && rounded), _defineProperty(_compileClassNames, "".concat(style["".concat(paletteLower, "Strike")], " ").concat(style.strike), disabled && canStrikeThrough && shouldStrikeThroughDisabledButton), _defineProperty(_compileClassNames, style.loader, !!needAppearance && statusLower !== 'none'), _compileClassNames));
34
47
  var loaderParentClass = (0, _utils.compileClassNames)((_compileClassNames2 = {}, _defineProperty(_compileClassNames2, customStatusSize, !!customStatusSize), _defineProperty(_compileClassNames2, style.loading, statusLower === 'loading'), _defineProperty(_compileClassNames2, style["".concat(size, "loading")], statusLower === 'loading'), _defineProperty(_compileClassNames2, style.success, statusLower != 'loading'), _compileClassNames2));
35
48
  var loaderChildClass = (0, _utils.compileClassNames)((_compileClassNames3 = {}, _defineProperty(_compileClassNames3, customStatus, !!customStatus), _defineProperty(_compileClassNames3, style.loadingelement, statusLower === 'loading'), _defineProperty(_compileClassNames3, style["".concat(paletteLower, "element")], statusLower === 'loading'), _defineProperty(_compileClassNames3, style.successelement, statusLower != 'loading'), _defineProperty(_compileClassNames3, style["".concat(paletteLower, "success")], statusLower != 'loading'), _compileClassNames3));
36
49
  return {
@@ -115,8 +115,6 @@ function DropBoxElement(props) {
115
115
  style: inlineStyle,
116
116
  "data-tour": tourId,
117
117
  "data-position": boxPosition,
118
- "data-box-direction": boxDirection,
119
- "data-arrow-position": arrowPosition,
120
118
  id: htmlId,
121
119
  role: role,
122
120
  "aria-multiselectable": ariaMultiselectable,
@@ -136,7 +134,7 @@ function DropBoxElement(props) {
136
134
  }, isModel ? /*#__PURE__*/_react["default"].createElement("div", {
137
135
  className: _DropBoxElementModule["default"].closeBar
138
136
  }) : null, isArrow && !isModel && /*#__PURE__*/_react["default"].createElement("div", {
139
- className: _DropBoxElementModule["default"].arrowPosition,
137
+ className: _DropBoxElementModule["default"][arrowPosition],
140
138
  style: arrowstyle,
141
139
  "data-id": "".concat(dataId, "_arrow"),
142
140
  "data-test-id": "".concat(dataId, "_arrow"),
@@ -5,8 +5,6 @@ exports[`DropBoxElement rendering the defult props 1`] = `
5
5
  <div
6
6
  class="main hidden container bottomStart default"
7
7
  data-a11y-focus-main-area="true"
8
- data-arrow-position="end"
9
- data-box-direction="bottom"
10
8
  data-id="dropBox"
11
9
  data-position="bottomStart"
12
10
  data-selector-id="dropBox"
@@ -14,14 +12,14 @@ exports[`DropBoxElement rendering the defult props 1`] = `
14
12
  dot-ui-element="dropbox"
15
13
  >
16
14
  <div
17
- class="subContainer shadow radius defaultPalette"
15
+ class="subContainer bottom_shadow radius defaultPalette"
18
16
  data-id="dropBox_subcontainer"
19
17
  data-selector-id="dropBox_subcontainer"
20
18
  data-test-id="dropBox_subcontainer"
21
19
  tabindex="-1"
22
20
  >
23
21
  <div
24
- class="arrowPosition"
22
+ class="end"
25
23
  data-id="dropBox_arrow"
26
24
  data-selector-id="dropBox_arrow"
27
25
  data-test-id="dropBox_arrow"
@@ -73,19 +73,19 @@
73
73
  }
74
74
 
75
75
  /* shadow */
76
- [data-box-direction="top"]>.shadow {
76
+ .top_shadow {
77
77
  --dropbox_box_shadow: var(--zd_bs_dropbox_top);
78
78
  }
79
79
 
80
- [data-box-direction="left"]>.shadow {
80
+ .left_shadow {
81
81
  --dropbox_box_shadow: var(--zd_bs_dropbox_left);
82
82
  }
83
83
 
84
- [data-box-direction="right"]>.shadow {
84
+ .right_shadow {
85
85
  --dropbox_box_shadow: var(--zd_bs_dropbox_right);
86
86
  }
87
87
 
88
- [data-box-direction="bottom"]>.shadow {
88
+ .bottom_shadow {
89
89
  --dropbox_box_shadow: var(--zd_bs_dropbox_bottom);
90
90
  }
91
91
 
@@ -158,41 +158,41 @@
158
158
  transform: translateY(-50%);
159
159
  }
160
160
 
161
- /* space for arrow using data-box-direction attribute*/
162
- .arrow[data-box-direction="top"] {
161
+ /* space for arrow */
162
+ .arrowtop {
163
163
  padding-bottom: var(--zd_size10) ;
164
164
  }
165
165
 
166
- .arrow[data-box-direction="right"] {
166
+ .arrowright {
167
167
  padding-left: var(--zd_size10) ;
168
168
  }
169
169
 
170
- .arrow[data-box-direction="left"] {
170
+ .arrowleft {
171
171
  padding-right: var(--zd_size10) ;
172
172
  }
173
173
 
174
- .arrow[data-box-direction="bottom"] {
174
+ .arrowbottom {
175
175
  padding-top: var(--zd_size10) ;
176
176
  }
177
177
 
178
- /* space from target using data-box-direction attribute*/
179
- .paddingSpace[data-box-direction="top"] {
178
+ /* space from target */
179
+ .paddingSpace_top {
180
180
  padding-bottom: var(--zd_size5) ;
181
181
  }
182
182
 
183
- .paddingSpace[data-box-direction="right"] {
183
+ .paddingSpace_right {
184
184
  padding-left: var(--zd_size5) ;
185
185
  }
186
186
 
187
- .paddingSpace[data-box-direction="left"] {
187
+ .paddingSpace_left {
188
188
  padding-right: var(--zd_size5) ;
189
189
  }
190
190
 
191
- .paddingSpace[data-box-direction="bottom"] {
191
+ .paddingSpace_bottom {
192
192
  padding-top: var(--zd_size5) ;
193
193
  }
194
194
 
195
- .arrowBase {
195
+ .arrow {
196
196
  position: absolute;
197
197
  height: var(--zd_size34) ;
198
198
  width: var(--zd_size34) ;
@@ -213,106 +213,107 @@
213
213
  }
214
214
 
215
215
  /* arrow placement styles */
216
- .arrowPosition {
217
- composes: arrowBase;
216
+ .start,
217
+ .end,
218
+ .mid {
219
+ composes: arrow;
218
220
  }
219
221
 
220
- .boxDirection[data-box-direction="top"][data-arrow-position="start"] .arrowPosition,
221
- .boxDirection[data-box-direction="top"][data-arrow-position="end"] .arrowPosition,
222
- .boxDirection[data-box-direction="top"][data-arrow-position="mid"] .arrowPosition {
222
+ .top .start,
223
+ .top .end,
224
+ .top .mid {
223
225
  bottom: calc( var(--zd_size17) * -1 ) ;
224
226
  }
225
227
 
226
- .boxDirection[data-box-direction="top"][data-arrow-position="start"] .arrowPosition {
228
+ .top .start {
227
229
  left: var(--zd_size28) ;
228
230
  }
229
231
 
230
- .boxDirection[data-box-direction="top"][data-arrow-position="end"] .arrowPosition {
232
+ .top .end {
231
233
  right: var(--zd_size28) ;
232
234
  transform: rotate(180deg) translateX(-50%);
233
235
  }
234
236
 
235
- .boxDirection[data-box-direction="top"][data-arrow-position="mid"] .arrowPosition {
237
+ .top .mid {
236
238
  left: 50% ;
237
239
  }
238
240
 
239
- .boxDirection[data-box-direction="top"][data-arrow-position="start"] .arrowPosition,
240
- .boxDirection[data-box-direction="top"][data-arrow-position="mid"] .arrowPosition {
241
+ .top .start,
242
+ .top .mid {
241
243
  transform: rotate(180deg) translateX(50%);
242
244
  }
243
245
 
244
- .boxDirection[data-box-direction="bottom"][data-arrow-position="start"] .arrowPosition,
245
- .boxDirection[data-box-direction="bottom"][data-arrow-position="end"] .arrowPosition,
246
- .boxDirection[data-box-direction="bottom"][data-arrow-position="mid"] .arrowPosition {
246
+ .bottom .start,
247
+ .bottom .end,
248
+ .bottom .mid {
247
249
  top: calc( var(--zd_size17) * -1 ) ;
248
250
  }
249
251
 
250
- .boxDirection[data-box-direction="bottom"][data-arrow-position="start"] .arrowPosition {
252
+ .bottom .start {
251
253
  left: var(--zd_size28) ;
252
254
  }
253
255
 
254
- .boxDirection[data-box-direction="bottom"][data-arrow-position="mid"] .arrowPosition {
256
+ .bottom .mid {
255
257
  left: 50% ;
256
258
  }
257
259
 
258
- .boxDirection[data-box-direction="bottom"][data-arrow-position="end"] .arrowPosition {
260
+ .bottom .end {
259
261
  right: var(--zd_size28) ;
260
262
  transform: translateX(50%);
261
263
  }
262
264
 
263
- .boxDirection[data-box-direction="bottom"][data-arrow-position="mid"] .arrowPosition,
264
- .boxDirection[data-box-direction="bottom"][data-arrow-position="start"] .arrowPosition {
265
+ .bottom .mid,
266
+ .bottom .start {
265
267
  transform: translateX(-50%);
266
268
  }
267
269
 
268
- .boxDirection[data-box-direction="left"][data-arrow-position="start"] .arrowPosition,
269
- .boxDirection[data-box-direction="left"][data-arrow-position="mid"] .arrowPosition,
270
- .boxDirection[data-box-direction="left"][data-arrow-position="end"] .arrowPosition {
270
+ .left .start,
271
+ .left .mid,
272
+ .left .end {
271
273
  right: calc( var(--zd_size17) * -1 ) ;
272
274
  }
273
275
 
274
- .boxDirection[data-box-direction="left"][data-arrow-position="start"] .arrowPosition {
276
+ .left .start {
275
277
  top: var(--zd_size28) ;
276
278
  }
277
279
 
278
- .boxDirection[data-box-direction="left"][data-arrow-position="end"] .arrowPosition {
280
+ .left .end {
279
281
  transform: rotate(90deg) translateX(50%);
280
282
  bottom: var(--zd_size28) ;
281
283
  }
282
284
 
283
- .boxDirection[data-box-direction="left"][data-arrow-position="mid"] .arrowPosition {
285
+ .left .mid {
284
286
  top: 50% ;
285
287
  }
286
288
 
287
- .boxDirection[data-box-direction="left"][data-arrow-position="start"] .arrowPosition,
288
- .boxDirection[data-box-direction="left"][data-arrow-position="mid"] .arrowPosition {
289
+ .left .start,
290
+ .left .mid {
289
291
  transform: rotate(90deg) translateX(-50%);
290
292
  }
291
293
 
292
- .boxDirection[data-box-direction="right"][data-arrow-position="start"] .arrowPosition,
293
- .boxDirection[data-box-direction="right"][data-arrow-position="mid"] .arrowPosition,
294
- .boxDirection[data-box-direction="right"][data-arrow-position="end"] .arrowPosition {
294
+ .right .start,
295
+ .right .mid,
296
+ .right .end {
295
297
  left: calc( var(--zd_size17) * -1 ) ;
296
298
  }
297
299
 
298
- .boxDirection[data-box-direction="right"][data-arrow-position="start"] .arrowPosition {
300
+ .right .start {
299
301
  top: var(--zd_size28) ;
300
302
  }
301
303
 
302
- .boxDirection[data-box-direction="right"][data-arrow-position="mid"] .arrowPosition {
304
+ .right .mid {
303
305
  top: 50% ;
304
306
  }
305
307
 
306
- .boxDirection[data-box-direction="right"][data-arrow-position="start"] .arrowPosition,
307
- .boxDirection[data-box-direction="right"][data-arrow-position="mid"] .arrowPosition {
308
+ .right .start,
309
+ .right .mid {
308
310
  transform: rotate(-90deg) translateX(50%);
309
311
  }
310
312
 
311
- .boxDirection[data-box-direction="right"][data-arrow-position="end"] .arrowPosition {
313
+ .right .end {
312
314
  bottom: var(--zd_size28) ;
313
315
  transform: rotate(-90deg) translateX(-50%);
314
316
  }
315
- [data-visible="hidden"],
316
317
  .hidden {
317
318
  visibility: hidden;
318
319
  opacity: 0;
@@ -320,7 +321,7 @@
320
321
  pointer-events: none;
321
322
  }
322
323
 
323
- [data-visible="hidden"] .subContainer, .hidden .subContainer {
324
+ .hidden .subContainer {
324
325
  box-shadow: none;
325
326
  }
326
327
 
@@ -341,21 +342,17 @@
341
342
  composes: animationBasic;
342
343
  composes: fadeIn modeForward from '../../../common/animation.module.css';
343
344
  }
344
-
345
345
  .scaleIn {
346
346
  composes: animationBasic;
347
347
  composes: scaleIn from '../../../common/animation.module.css';
348
348
  }
349
-
350
349
  .bounce {
351
350
  composes: animationBasic;
352
351
  }
353
-
354
352
  [dir=ltr] .bounce {
355
353
  animation-name: animation;
356
354
  animation-timing-function: cubic-bezier(0.4, 1, 0.65, 1.1);
357
355
  }
358
-
359
356
  [dir=rtl] .bounce {
360
357
  animation-name: animation;
361
358
  animation-timing-function: cubic-bezier(0.4, 1, 0.65, 1.1);
@@ -417,7 +414,7 @@
417
414
  }
418
415
 
419
416
  .closeBar {
420
- /* Variable:Ignore */
417
+ /* Variable:Ignore */
421
418
  height: 6px;
422
419
  width: 20% ;
423
420
  border-radius: 5px;
@@ -55,8 +55,8 @@ function cssJSLogic(_ref) {
55
55
  customMobileDropBoxWrap = _customClass$customMo2 === void 0 ? '' : _customClass$customMo2;
56
56
  var animationValue = animationStyle === 'default' ? 'fadeInScale' : animationStyle; // const {needBoxStyle,boxstyle} = useDropboxPosCalc(props)
57
57
 
58
- var boxClassName = (0, _utils.compileClassNames)((_compileClassNames = {}, _defineProperty(_compileClassNames, style.main, true), _defineProperty(_compileClassNames, style.hidden, !isActive), _defineProperty(_compileClassNames, style.responsive, !!isModel), _defineProperty(_compileClassNames, customMobileDropBoxWrap, !!isModel), _defineProperty(_compileClassNames, customDropBoxWrap, !isModel), _defineProperty(_compileClassNames, style.container, isAbsolute && !isModel), _defineProperty(_compileClassNames, style[boxPosition], isAbsolute && !isModel), _defineProperty(_compileClassNames, style.fixedContainer, !isAbsolute && !isModel), _defineProperty(_compileClassNames, style[size], size && !isModel), _defineProperty(_compileClassNames, style.boxDirection, !isModel && isActive && isArrow), _defineProperty(_compileClassNames, style.arrow, !isModel && isActive && isArrow && isAbsolute), _defineProperty(_compileClassNames, style.paddingSpace, !isModel && isActive && !isArrow && isPadding), _compileClassNames));
59
- var subContainerClass = (0, _utils.compileClassNames)((_compileClassNames2 = {}, _defineProperty(_compileClassNames2, style.subContainer, true), _defineProperty(_compileClassNames2, customMobileDropBox, !!isModel), _defineProperty(_compileClassNames2, style.mobRadius, !!isModel), _defineProperty(_compileClassNames2, style.slideUp, !!isModel && isActive), _defineProperty(_compileClassNames2, customDropBox, !isModel), _defineProperty(_compileClassNames2, style.shadow, !isModel), _defineProperty(_compileClassNames2, style.boxPadding, !isModel && isBoxPaddingNeed), _defineProperty(_compileClassNames2, style.radius, !isModel && isRadius), _defineProperty(_compileClassNames2, style[animationValue], !isModel && isAnimate && !isReducedMotion && isActive && !!animationStyle), _compileClassNames2));
58
+ var boxClassName = (0, _utils.compileClassNames)((_compileClassNames = {}, _defineProperty(_compileClassNames, style.main, true), _defineProperty(_compileClassNames, style.hidden, !isActive), _defineProperty(_compileClassNames, style.responsive, !!isModel), _defineProperty(_compileClassNames, customMobileDropBoxWrap, !!isModel), _defineProperty(_compileClassNames, customDropBoxWrap, !isModel), _defineProperty(_compileClassNames, style.container, isAbsolute && !isModel), _defineProperty(_compileClassNames, style[boxPosition], isAbsolute && !isModel), _defineProperty(_compileClassNames, style.fixedContainer, !isAbsolute && !isModel), _defineProperty(_compileClassNames, style[size], size && !isModel), _defineProperty(_compileClassNames, style[boxDirection], !isModel && isActive && isArrow), _defineProperty(_compileClassNames, style["arrow".concat(boxDirection)], !isModel && isActive && isArrow && isAbsolute), _defineProperty(_compileClassNames, style["paddingSpace_".concat(boxDirection)], !isModel && isActive && !isArrow && isPadding), _compileClassNames));
59
+ var subContainerClass = (0, _utils.compileClassNames)((_compileClassNames2 = {}, _defineProperty(_compileClassNames2, style.subContainer, true), _defineProperty(_compileClassNames2, customMobileDropBox, !!isModel), _defineProperty(_compileClassNames2, style.mobRadius, !!isModel), _defineProperty(_compileClassNames2, style.slideUp, !!isModel && isActive), _defineProperty(_compileClassNames2, customDropBox, !isModel), _defineProperty(_compileClassNames2, style["".concat(boxDirection, "_shadow")], !isModel), _defineProperty(_compileClassNames2, style.boxPadding, !isModel && isBoxPaddingNeed), _defineProperty(_compileClassNames2, style.radius, !isModel && isRadius), _defineProperty(_compileClassNames2, style[animationValue], !isModel && isAnimate && !isReducedMotion && isActive && !!animationStyle), _compileClassNames2));
60
60
  var inlineStyle = !isModel ? isAbsolute ? needBoxStyle && boxstyle : positionsOffset && positionsOffset[boxPosition] || {} : {};
61
61
 
62
62
  if (zIndexStyle) {