rsuite 6.2.0 → 6.2.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.
@@ -31,27 +31,28 @@ const PickerIndicator = ({
31
31
  size: size === 'xs' ? 'xs' : 'sm'
32
32
  });
33
33
  }
34
- const caret = caretAs && /*#__PURE__*/React.createElement(Icon, {
34
+ if (showCleanButton && !disabled) {
35
+ return /*#__PURE__*/React.createElement(CloseButton, {
36
+ className: prefix('clean'),
37
+ tabIndex: -1,
38
+ locale: {
39
+ closeLabel: clear
40
+ },
41
+ onClick: onClose
42
+ });
43
+ }
44
+ return caretAs && /*#__PURE__*/React.createElement(Icon, {
35
45
  as: caretAs,
36
46
  className: prefix('caret-icon'),
37
47
  "data-testid": "caret"
38
48
  });
39
- const cleanButton = showCleanButton && !disabled && /*#__PURE__*/React.createElement(CloseButton, {
40
- className: prefix('clean'),
41
- tabIndex: -1,
42
- locale: {
43
- closeLabel: clear
44
- },
45
- onClick: onClose
46
- });
47
- if (caret && cleanButton) {
48
- return /*#__PURE__*/React.createElement(React.Fragment, null, caret, cleanButton);
49
- }
50
- return cleanButton || caret || null;
51
49
  };
52
50
  const props = Component === InputGroup.Addon ? {
51
+ className: prefix('toggle-indicator'),
53
52
  disabled
54
- } : undefined;
53
+ } : Component === React.Fragment ? undefined : {
54
+ className: prefix('toggle-indicator')
55
+ };
55
56
  return /*#__PURE__*/React.createElement(Component, props, addon());
56
57
  };
57
58
  export default PickerIndicator;
@@ -367,6 +367,9 @@
367
367
 
368
368
  // Picker clear button
369
369
  .rs-picker-clean {
370
+ display: inline-flex;
371
+ align-items: center;
372
+ justify-content: center;
370
373
  color: var(--rs-text-secondary);
371
374
  transition: 0.2s color linear;
372
375
  cursor: pointer;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rsuite",
3
- "version": "6.2.0",
3
+ "version": "6.2.1",
4
4
  "description": "A suite of react components",
5
5
  "main": "cjs/index.js",
6
6
  "module": "esm/index.js",