@salutejs/plasma-new-hope 0.138.0-canary.1406.10670971125.0 → 0.138.0-canary.1406.10679978473.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (28) hide show
  1. package/cjs/components/Combobox/ComboboxNew/Combobox.js +63 -62
  2. package/cjs/components/Combobox/ComboboxNew/Combobox.js.map +1 -1
  3. package/cjs/components/Combobox/ComboboxNew/hooks/useKeyboardNavigation.js +8 -8
  4. package/cjs/components/Combobox/ComboboxNew/hooks/useKeyboardNavigation.js.map +1 -1
  5. package/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +2 -2
  6. package/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js.map +1 -1
  7. package/emotion/cjs/components/Combobox/ComboboxNew/Combobox.js +63 -62
  8. package/emotion/cjs/components/Combobox/ComboboxNew/hooks/useKeyboardNavigation.js +8 -8
  9. package/emotion/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +2 -2
  10. package/emotion/es/components/Combobox/ComboboxNew/Combobox.js +63 -62
  11. package/emotion/es/components/Combobox/ComboboxNew/hooks/useKeyboardNavigation.js +8 -8
  12. package/emotion/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +2 -2
  13. package/es/components/Combobox/ComboboxNew/Combobox.js +63 -62
  14. package/es/components/Combobox/ComboboxNew/Combobox.js.map +1 -1
  15. package/es/components/Combobox/ComboboxNew/hooks/useKeyboardNavigation.js +8 -8
  16. package/es/components/Combobox/ComboboxNew/hooks/useKeyboardNavigation.js.map +1 -1
  17. package/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +2 -2
  18. package/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js.map +1 -1
  19. package/package.json +2 -2
  20. package/styled-components/cjs/components/Combobox/ComboboxNew/Combobox.js +63 -62
  21. package/styled-components/cjs/components/Combobox/ComboboxNew/hooks/useKeyboardNavigation.js +8 -8
  22. package/styled-components/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +2 -2
  23. package/styled-components/es/components/Combobox/ComboboxNew/Combobox.js +63 -62
  24. package/styled-components/es/components/Combobox/ComboboxNew/hooks/useKeyboardNavigation.js +8 -8
  25. package/styled-components/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +2 -2
  26. package/types/components/Combobox/ComboboxNew/Combobox.d.ts.map +1 -1
  27. package/types/components/Combobox/ComboboxNew/hooks/useKeyboardNavigation.d.ts +2 -2
  28. package/types/components/Combobox/ComboboxNew/hooks/useKeyboardNavigation.d.ts.map +1 -1
@@ -133,7 +133,7 @@ var comboboxRoot = exports.comboboxRoot = function comboboxRoot(Root) {
133
133
  type: 'reset'
134
134
  });
135
135
 
136
- // Проверяем, отличается ли значение инпуте от выбранного value после закрытия дропдауна.
136
+ // Проверяем, отличается ли значение в инпуте от выбранного value после закрытия дропдауна.
137
137
  // Если изменилось, то возвращаем label выбранного айтема.
138
138
  // Если нет выбранного элемента, то стираем значение инпута.
139
139
  if (textValue !== value) {
@@ -188,7 +188,7 @@ var comboboxRoot = exports.comboboxRoot = function comboboxRoot(Root) {
188
188
  };
189
189
 
190
190
  // Обработчик открытия/закрытия выпадающего списка
191
- var handleToggle = function handleToggle(opened) {
191
+ var handleListToggle = function handleListToggle(opened) {
192
192
  if (disabled) {
193
193
  return;
194
194
  }
@@ -208,44 +208,45 @@ var comboboxRoot = exports.comboboxRoot = function comboboxRoot(Root) {
208
208
 
209
209
  // Обработчик выбора чекбоксов (только при multiple)
210
210
  var handleCheckboxChange = function handleCheckboxChange(item) {
211
- if (multiple) {
212
- var checkedCopy = new Map(checked);
213
- if (!checkedCopy.get(item.value)) {
214
- checkedCopy.set(item.value, true);
215
- (0, _utils3.updateDescendants)(item, checkedCopy, true);
216
- } else {
217
- checkedCopy.set(item.value, false);
218
- (0, _utils3.updateDescendants)(item, checkedCopy, false);
211
+ if (!multiple) {
212
+ return;
213
+ }
214
+ var checkedCopy = new Map(checked);
215
+ if (!checkedCopy.get(item.value)) {
216
+ checkedCopy.set(item.value, true);
217
+ (0, _utils3.updateDescendants)(item, checkedCopy, true);
218
+ } else {
219
+ checkedCopy.set(item.value, false);
220
+ (0, _utils3.updateDescendants)(item, checkedCopy, false);
221
+ }
222
+ (0, _utils3.updateAncestors)(item, checkedCopy);
223
+ var newValues = [];
224
+ valueToItemMap.forEach(function (item, key) {
225
+ if (checkedCopy.get(key)) {
226
+ newValues.push(item.value);
219
227
  }
220
- (0, _utils3.updateAncestors)(item, checkedCopy);
221
- var newValues = [];
222
- valueToItemMap.forEach(function (item, key) {
223
- if (checkedCopy.get(key)) {
224
- newValues.push(item.value);
225
- }
228
+ });
229
+ if (closeAfterSelect) {
230
+ dispatchPath({
231
+ type: 'reset'
226
232
  });
227
- if (closeAfterSelect) {
228
- dispatchPath({
229
- type: 'reset'
230
- });
231
- dispatchFocusedPath({
232
- type: 'reset'
233
+ dispatchFocusedPath({
234
+ type: 'reset'
235
+ });
236
+ }
237
+ if (onChange) {
238
+ onChange(newValues);
239
+ }
240
+
241
+ // После выбора/снятия чекбокса скроллим к инпуту
242
+ setTimeout(function () {
243
+ if (inputRef.current) {
244
+ inputRef.current.scrollIntoView({
245
+ behavior: 'smooth',
246
+ inline: 'start'
233
247
  });
234
248
  }
235
- if (onChange) {
236
- onChange(newValues);
237
- }
238
-
239
- // После выбора/снятия чекбокса скроллим к инпуту
240
- setTimeout(function () {
241
- if (inputRef.current) {
242
- inputRef.current.scrollIntoView({
243
- behavior: 'smooth',
244
- inline: 'start'
245
- });
246
- }
247
- }, 1);
248
- }
249
+ }, 1);
249
250
  };
250
251
 
251
252
  // Обработчик клика по айтему выпадающего списка
@@ -255,31 +256,31 @@ var comboboxRoot = exports.comboboxRoot = function comboboxRoot(Root) {
255
256
  }
256
257
  if (multiple) {
257
258
  handleCheckboxChange(item);
258
- } else {
259
- if (e) {
260
- e.stopPropagation();
261
- }
262
- var checkedCopy = new Map(checked);
263
- var isCurrentChecked = checkedCopy.get(item.value);
264
- checkedCopy.forEach(function (_, key) {
265
- checkedCopy.set(key, false);
259
+ return;
260
+ }
261
+ if (e) {
262
+ e.stopPropagation();
263
+ }
264
+ var checkedCopy = new Map(checked);
265
+ var isCurrentChecked = checkedCopy.get(item.value);
266
+ checkedCopy.forEach(function (_, key) {
267
+ checkedCopy.set(key, false);
268
+ });
269
+ if (!isCurrentChecked) {
270
+ checkedCopy.set(item.value, 'done');
271
+ (0, _utils3.updateSingleAncestors)(item, checkedCopy, 'dot');
272
+ }
273
+ setTextValue(isCurrentChecked ? '' : item.label);
274
+ if (closeAfterSelect) {
275
+ dispatchPath({
276
+ type: 'reset'
266
277
  });
267
- if (!isCurrentChecked) {
268
- checkedCopy.set(item.value, 'done');
269
- (0, _utils3.updateSingleAncestors)(item, checkedCopy, 'dot');
270
- }
271
- setTextValue(isCurrentChecked ? '' : item.label);
272
- if (closeAfterSelect) {
273
- dispatchPath({
274
- type: 'reset'
275
- });
276
- dispatchFocusedPath({
277
- type: 'reset'
278
- });
279
- }
280
- if (onChange) {
281
- onChange(isCurrentChecked ? '' : item.value);
282
- }
278
+ dispatchFocusedPath({
279
+ type: 'reset'
280
+ });
281
+ }
282
+ if (onChange) {
283
+ onChange(isCurrentChecked ? '' : item.value);
283
284
  }
284
285
  };
285
286
  var getChips = function getChips() {
@@ -308,7 +309,7 @@ var comboboxRoot = exports.comboboxRoot = function comboboxRoot(Root) {
308
309
  dispatchPath: dispatchPath,
309
310
  pathMap: pathMap,
310
311
  focusedToValueMap: focusedToValueMap,
311
- handleToggle: handleToggle,
312
+ handleListToggle: handleListToggle,
312
313
  handlePressDown: handlePressDown,
313
314
  multiselect: multiple,
314
315
  setTextValue: setTextValue
@@ -359,7 +360,7 @@ var comboboxRoot = exports.comboboxRoot = function comboboxRoot(Root) {
359
360
  ref: floatingPopoverRef,
360
361
  opened: isCurrentListOpen,
361
362
  onToggle: function onToggle(opened) {
362
- return opened && handleToggle(true);
363
+ return opened && handleListToggle(true);
363
364
  },
364
365
  placement: placement,
365
366
  portal: portal,
@@ -33,7 +33,7 @@ var useKeyNavigation = exports.useKeyNavigation = function useKeyNavigation(_ref
33
33
  dispatchPath = _ref.dispatchPath,
34
34
  pathMap = _ref.pathMap,
35
35
  focusedToValueMap = _ref.focusedToValueMap,
36
- handleToggle = _ref.handleToggle,
36
+ handleListToggle = _ref.handleListToggle,
37
37
  handlePressDown = _ref.handlePressDown,
38
38
  multiselect = _ref.multiselect,
39
39
  setTextValue = _ref.setTextValue;
@@ -62,7 +62,7 @@ var useKeyNavigation = exports.useKeyNavigation = function useKeyNavigation(_ref
62
62
  dispatchFocusedPath({
63
63
  type: 'set_initial_focus'
64
64
  });
65
- handleToggle(true);
65
+ handleListToggle(true);
66
66
  }
67
67
  if (path[0]) {
68
68
  event.stopPropagation();
@@ -91,7 +91,7 @@ var useKeyNavigation = exports.useKeyNavigation = function useKeyNavigation(_ref
91
91
  dispatchFocusedPath({
92
92
  type: 'set_initial_focus'
93
93
  });
94
- handleToggle(true);
94
+ handleListToggle(true);
95
95
  }
96
96
  if (path[0]) {
97
97
  event.stopPropagation();
@@ -116,7 +116,7 @@ var useKeyNavigation = exports.useKeyNavigation = function useKeyNavigation(_ref
116
116
  }
117
117
  }
118
118
  if (path.length === 1) {
119
- handleToggle(false);
119
+ handleListToggle(false);
120
120
  }
121
121
  }
122
122
  break;
@@ -213,7 +213,7 @@ var useKeyNavigation = exports.useKeyNavigation = function useKeyNavigation(_ref
213
213
  dispatchFocusedPath({
214
214
  type: 'reset'
215
215
  });
216
- handleToggle(false);
216
+ handleListToggle(false);
217
217
  setTextValue('');
218
218
  break;
219
219
  }
@@ -225,7 +225,7 @@ var useKeyNavigation = exports.useKeyNavigation = function useKeyNavigation(_ref
225
225
  dispatchFocusedPath({
226
226
  type: 'reset'
227
227
  });
228
- handleToggle(false);
228
+ handleListToggle(false);
229
229
  break;
230
230
  }
231
231
  case keys.Home:
@@ -247,7 +247,7 @@ var useKeyNavigation = exports.useKeyNavigation = function useKeyNavigation(_ref
247
247
  dispatchFocusedPath({
248
248
  type: 'set_initial_focus'
249
249
  });
250
- handleToggle(true);
250
+ handleListToggle(true);
251
251
  }
252
252
  break;
253
253
  }
@@ -271,7 +271,7 @@ var useKeyNavigation = exports.useKeyNavigation = function useKeyNavigation(_ref
271
271
  type: 'change_last_focus',
272
272
  value: (pathMap.get('root') || 0) - 1
273
273
  });
274
- handleToggle(true);
274
+ handleListToggle(true);
275
275
  }
276
276
  break;
277
277
  }
@@ -42,7 +42,7 @@ var Item = exports.Item = function Item(_ref) {
42
42
  renderItem = _useContext.renderItem,
43
43
  valueToItemMap = _useContext.valueToItemMap,
44
44
  treeId = _useContext.treeId;
45
- var isDisabledClassName = disabled ? _Combobox.classes.dropdownItemIsDisabled : undefined;
45
+ var disabledClassName = disabled ? _Combobox.classes.dropdownItemIsDisabled : undefined;
46
46
  var focusedClass = currentLevel === focusedPath.length - 1 && index === (focusedPath === null || focusedPath === void 0 ? void 0 : focusedPath[currentLevel]) ? _Combobox.classes.dropdownItemIsFocused : undefined;
47
47
  var activeClass = value === (path === null || path === void 0 ? void 0 : path[currentLevel + 1]) ? _Combobox.classes.dropdownItemIsActive : undefined;
48
48
  (0, _hooks.useDidMountEffect)(function () {
@@ -67,7 +67,7 @@ var Item = exports.Item = function Item(_ref) {
67
67
  handleItemClick(item, e);
68
68
  };
69
69
  return /*#__PURE__*/_react["default"].createElement(_Item.Wrapper, {
70
- className: (0, _utils2.cx)(isDisabledClassName, focusedClass, activeClass),
70
+ className: (0, _utils2.cx)(disabledClassName, focusedClass, activeClass),
71
71
  id: (0, _utils.getItemId)(treeId, value),
72
72
  ref: ref,
73
73
  onClick: handleClick,
@@ -124,7 +124,7 @@ export var comboboxRoot = function comboboxRoot(Root) {
124
124
  type: 'reset'
125
125
  });
126
126
 
127
- // Проверяем, отличается ли значение инпуте от выбранного value после закрытия дропдауна.
127
+ // Проверяем, отличается ли значение в инпуте от выбранного value после закрытия дропдауна.
128
128
  // Если изменилось, то возвращаем label выбранного айтема.
129
129
  // Если нет выбранного элемента, то стираем значение инпута.
130
130
  if (textValue !== value) {
@@ -179,7 +179,7 @@ export var comboboxRoot = function comboboxRoot(Root) {
179
179
  };
180
180
 
181
181
  // Обработчик открытия/закрытия выпадающего списка
182
- var handleToggle = function handleToggle(opened) {
182
+ var handleListToggle = function handleListToggle(opened) {
183
183
  if (disabled) {
184
184
  return;
185
185
  }
@@ -199,44 +199,45 @@ export var comboboxRoot = function comboboxRoot(Root) {
199
199
 
200
200
  // Обработчик выбора чекбоксов (только при multiple)
201
201
  var handleCheckboxChange = function handleCheckboxChange(item) {
202
- if (multiple) {
203
- var checkedCopy = new Map(checked);
204
- if (!checkedCopy.get(item.value)) {
205
- checkedCopy.set(item.value, true);
206
- updateDescendants(item, checkedCopy, true);
207
- } else {
208
- checkedCopy.set(item.value, false);
209
- updateDescendants(item, checkedCopy, false);
202
+ if (!multiple) {
203
+ return;
204
+ }
205
+ var checkedCopy = new Map(checked);
206
+ if (!checkedCopy.get(item.value)) {
207
+ checkedCopy.set(item.value, true);
208
+ updateDescendants(item, checkedCopy, true);
209
+ } else {
210
+ checkedCopy.set(item.value, false);
211
+ updateDescendants(item, checkedCopy, false);
212
+ }
213
+ updateAncestors(item, checkedCopy);
214
+ var newValues = [];
215
+ valueToItemMap.forEach(function (item, key) {
216
+ if (checkedCopy.get(key)) {
217
+ newValues.push(item.value);
210
218
  }
211
- updateAncestors(item, checkedCopy);
212
- var newValues = [];
213
- valueToItemMap.forEach(function (item, key) {
214
- if (checkedCopy.get(key)) {
215
- newValues.push(item.value);
216
- }
219
+ });
220
+ if (closeAfterSelect) {
221
+ dispatchPath({
222
+ type: 'reset'
217
223
  });
218
- if (closeAfterSelect) {
219
- dispatchPath({
220
- type: 'reset'
221
- });
222
- dispatchFocusedPath({
223
- type: 'reset'
224
+ dispatchFocusedPath({
225
+ type: 'reset'
226
+ });
227
+ }
228
+ if (onChange) {
229
+ onChange(newValues);
230
+ }
231
+
232
+ // После выбора/снятия чекбокса скроллим к инпуту
233
+ setTimeout(function () {
234
+ if (inputRef.current) {
235
+ inputRef.current.scrollIntoView({
236
+ behavior: 'smooth',
237
+ inline: 'start'
224
238
  });
225
239
  }
226
- if (onChange) {
227
- onChange(newValues);
228
- }
229
-
230
- // После выбора/снятия чекбокса скроллим к инпуту
231
- setTimeout(function () {
232
- if (inputRef.current) {
233
- inputRef.current.scrollIntoView({
234
- behavior: 'smooth',
235
- inline: 'start'
236
- });
237
- }
238
- }, 1);
239
- }
240
+ }, 1);
240
241
  };
241
242
 
242
243
  // Обработчик клика по айтему выпадающего списка
@@ -246,31 +247,31 @@ export var comboboxRoot = function comboboxRoot(Root) {
246
247
  }
247
248
  if (multiple) {
248
249
  handleCheckboxChange(item);
249
- } else {
250
- if (e) {
251
- e.stopPropagation();
252
- }
253
- var checkedCopy = new Map(checked);
254
- var isCurrentChecked = checkedCopy.get(item.value);
255
- checkedCopy.forEach(function (_, key) {
256
- checkedCopy.set(key, false);
250
+ return;
251
+ }
252
+ if (e) {
253
+ e.stopPropagation();
254
+ }
255
+ var checkedCopy = new Map(checked);
256
+ var isCurrentChecked = checkedCopy.get(item.value);
257
+ checkedCopy.forEach(function (_, key) {
258
+ checkedCopy.set(key, false);
259
+ });
260
+ if (!isCurrentChecked) {
261
+ checkedCopy.set(item.value, 'done');
262
+ updateSingleAncestors(item, checkedCopy, 'dot');
263
+ }
264
+ setTextValue(isCurrentChecked ? '' : item.label);
265
+ if (closeAfterSelect) {
266
+ dispatchPath({
267
+ type: 'reset'
257
268
  });
258
- if (!isCurrentChecked) {
259
- checkedCopy.set(item.value, 'done');
260
- updateSingleAncestors(item, checkedCopy, 'dot');
261
- }
262
- setTextValue(isCurrentChecked ? '' : item.label);
263
- if (closeAfterSelect) {
264
- dispatchPath({
265
- type: 'reset'
266
- });
267
- dispatchFocusedPath({
268
- type: 'reset'
269
- });
270
- }
271
- if (onChange) {
272
- onChange(isCurrentChecked ? '' : item.value);
273
- }
269
+ dispatchFocusedPath({
270
+ type: 'reset'
271
+ });
272
+ }
273
+ if (onChange) {
274
+ onChange(isCurrentChecked ? '' : item.value);
274
275
  }
275
276
  };
276
277
  var getChips = function getChips() {
@@ -299,7 +300,7 @@ export var comboboxRoot = function comboboxRoot(Root) {
299
300
  dispatchPath: dispatchPath,
300
301
  pathMap: pathMap,
301
302
  focusedToValueMap: focusedToValueMap,
302
- handleToggle: handleToggle,
303
+ handleListToggle: handleListToggle,
303
304
  handlePressDown: handlePressDown,
304
305
  multiselect: multiple,
305
306
  setTextValue: setTextValue
@@ -350,7 +351,7 @@ export var comboboxRoot = function comboboxRoot(Root) {
350
351
  ref: floatingPopoverRef,
351
352
  opened: isCurrentListOpen,
352
353
  onToggle: function onToggle(opened) {
353
- return opened && handleToggle(true);
354
+ return opened && handleListToggle(true);
354
355
  },
355
356
  placement: placement,
356
357
  portal: portal,
@@ -27,7 +27,7 @@ export var useKeyNavigation = function useKeyNavigation(_ref) {
27
27
  dispatchPath = _ref.dispatchPath,
28
28
  pathMap = _ref.pathMap,
29
29
  focusedToValueMap = _ref.focusedToValueMap,
30
- handleToggle = _ref.handleToggle,
30
+ handleListToggle = _ref.handleListToggle,
31
31
  handlePressDown = _ref.handlePressDown,
32
32
  multiselect = _ref.multiselect,
33
33
  setTextValue = _ref.setTextValue;
@@ -56,7 +56,7 @@ export var useKeyNavigation = function useKeyNavigation(_ref) {
56
56
  dispatchFocusedPath({
57
57
  type: 'set_initial_focus'
58
58
  });
59
- handleToggle(true);
59
+ handleListToggle(true);
60
60
  }
61
61
  if (path[0]) {
62
62
  event.stopPropagation();
@@ -85,7 +85,7 @@ export var useKeyNavigation = function useKeyNavigation(_ref) {
85
85
  dispatchFocusedPath({
86
86
  type: 'set_initial_focus'
87
87
  });
88
- handleToggle(true);
88
+ handleListToggle(true);
89
89
  }
90
90
  if (path[0]) {
91
91
  event.stopPropagation();
@@ -110,7 +110,7 @@ export var useKeyNavigation = function useKeyNavigation(_ref) {
110
110
  }
111
111
  }
112
112
  if (path.length === 1) {
113
- handleToggle(false);
113
+ handleListToggle(false);
114
114
  }
115
115
  }
116
116
  break;
@@ -207,7 +207,7 @@ export var useKeyNavigation = function useKeyNavigation(_ref) {
207
207
  dispatchFocusedPath({
208
208
  type: 'reset'
209
209
  });
210
- handleToggle(false);
210
+ handleListToggle(false);
211
211
  setTextValue('');
212
212
  break;
213
213
  }
@@ -219,7 +219,7 @@ export var useKeyNavigation = function useKeyNavigation(_ref) {
219
219
  dispatchFocusedPath({
220
220
  type: 'reset'
221
221
  });
222
- handleToggle(false);
222
+ handleListToggle(false);
223
223
  break;
224
224
  }
225
225
  case keys.Home:
@@ -241,7 +241,7 @@ export var useKeyNavigation = function useKeyNavigation(_ref) {
241
241
  dispatchFocusedPath({
242
242
  type: 'set_initial_focus'
243
243
  });
244
- handleToggle(true);
244
+ handleListToggle(true);
245
245
  }
246
246
  break;
247
247
  }
@@ -265,7 +265,7 @@ export var useKeyNavigation = function useKeyNavigation(_ref) {
265
265
  type: 'change_last_focus',
266
266
  value: (pathMap.get('root') || 0) - 1
267
267
  });
268
- handleToggle(true);
268
+ handleListToggle(true);
269
269
  }
270
270
  break;
271
271
  }
@@ -33,7 +33,7 @@ export var Item = function Item(_ref) {
33
33
  renderItem = _useContext.renderItem,
34
34
  valueToItemMap = _useContext.valueToItemMap,
35
35
  treeId = _useContext.treeId;
36
- var isDisabledClassName = disabled ? classes.dropdownItemIsDisabled : undefined;
36
+ var disabledClassName = disabled ? classes.dropdownItemIsDisabled : undefined;
37
37
  var focusedClass = currentLevel === focusedPath.length - 1 && index === (focusedPath === null || focusedPath === void 0 ? void 0 : focusedPath[currentLevel]) ? classes.dropdownItemIsFocused : undefined;
38
38
  var activeClass = value === (path === null || path === void 0 ? void 0 : path[currentLevel + 1]) ? classes.dropdownItemIsActive : undefined;
39
39
  useDidMountEffect(function () {
@@ -58,7 +58,7 @@ export var Item = function Item(_ref) {
58
58
  handleItemClick(item, e);
59
59
  };
60
60
  return /*#__PURE__*/React.createElement(Wrapper, {
61
- className: cx(isDisabledClassName, focusedClass, activeClass),
61
+ className: cx(disabledClassName, focusedClass, activeClass),
62
62
  id: getItemId(treeId, value),
63
63
  ref: ref,
64
64
  onClick: handleClick,
@@ -1 +1 @@
1
- {"version":3,"file":"Combobox.d.ts","sourceRoot":"","sources":["../../../../src/components/Combobox/ComboboxNew/Combobox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4F,MAAM,OAAO,CAAC;AAIjH,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAoB7C,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAKnE,eAAO,MAAM,OAAO,4BAAgD,CAAC;AAErE;;GAEG;AACH,eAAO,MAAM,YAAY,SAAU,UAAU,gBAAgB,EAAE,KAAK,aAAa,EAAE,OAAO,CAAC,CAAC,2FAmYtF,CAAC;AAEP,eAAO,MAAM,cAAc;;;mBArYQ,UAAU,gBAAgB,EAAE,KAAK,aAAa,EAAE,OAAO,CAAC,CAAC;;;;;;;;;;;;;;;;;;CA0Z3F,CAAC"}
1
+ {"version":3,"file":"Combobox.d.ts","sourceRoot":"","sources":["../../../../src/components/Combobox/ComboboxNew/Combobox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4F,MAAM,OAAO,CAAC;AAIjH,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAoB7C,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAKnE,eAAO,MAAM,OAAO,4BAAgD,CAAC;AAErE;;GAEG;AACH,eAAO,MAAM,YAAY,SAAU,UAAU,gBAAgB,EAAE,KAAK,aAAa,EAAE,OAAO,CAAC,CAAC,2FAsYtF,CAAC;AAEP,eAAO,MAAM,cAAc;;;mBAxYQ,UAAU,gBAAgB,EAAE,KAAK,aAAa,EAAE,OAAO,CAAC,CAAC;;;;;;;;;;;;;;;;;;CA6Z3F,CAAC"}
@@ -27,7 +27,7 @@ declare type Props = {
27
27
  dispatchPath: Dispatch<PathAction>;
28
28
  pathMap: PathMapType;
29
29
  focusedToValueMap: FocusedToValueMapType;
30
- handleToggle: (opened: boolean) => void;
30
+ handleListToggle: (opened: boolean) => void;
31
31
  handlePressDown: (item: ItemOptionTransformed, e?: React.MouseEvent<HTMLElement>) => void;
32
32
  multiselect: ComboboxProps['multiple'];
33
33
  setTextValue: React.Dispatch<React.SetStateAction<string>>;
@@ -35,6 +35,6 @@ declare type Props = {
35
35
  declare type ReturnedProps = {
36
36
  onKeyDown: (event: React.KeyboardEvent<HTMLElement>) => void;
37
37
  };
38
- export declare const useKeyNavigation: ({ focusedPath, dispatchFocusedPath, path, dispatchPath, pathMap, focusedToValueMap, handleToggle, handlePressDown, multiselect, setTextValue, }: Props) => ReturnedProps;
38
+ export declare const useKeyNavigation: ({ focusedPath, dispatchFocusedPath, path, dispatchPath, pathMap, focusedToValueMap, handleListToggle, handlePressDown, multiselect, setTextValue, }: Props) => ReturnedProps;
39
39
  export {};
40
40
  //# sourceMappingURL=useKeyboardNavigation.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useKeyboardNavigation.d.ts","sourceRoot":"","sources":["../../../../../src/components/Combobox/ComboboxNew/hooks/useKeyboardNavigation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAiB,QAAQ,EAAE,MAAM,OAAO,CAAC;AACrD,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AACzF,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAE5E,OAAO,EAAE,WAAW,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AAInE,eAAO,MAAM,IAAI;;;;;;;;;;;;;;CAchB,CAAC;AAEF,eAAO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