@bigbinary/neetoui 5.0.13 → 5.0.14

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.
package/index.cjs.js CHANGED
@@ -14406,6 +14406,10 @@ var Button = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, r
14406
14406
  size: iconSize
14407
14407
  }) : /* When Icon is not present, animate the margin from 0 to the needed value*/
14408
14408
  loading && /*#__PURE__*/React__default["default"].createElement(motion.div, {
14409
+ animate: {
14410
+ width: "auto",
14411
+ scale: 1
14412
+ },
14409
14413
  className: "neeto-ui-btn__spinner-wrapper",
14410
14414
  exit: {
14411
14415
  width: 0,
@@ -14417,10 +14421,6 @@ var Button = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, r
14417
14421
  },
14418
14422
  transition: {
14419
14423
  bounce: false
14420
- },
14421
- animate: {
14422
- width: "auto",
14423
- scale: 1
14424
14424
  }
14425
14425
  }, /*#__PURE__*/React__default["default"].createElement(Spinner$1, {
14426
14426
  "aria-hidden": "true",
@@ -14582,6 +14582,12 @@ var hideOnEsc = {
14582
14582
  };
14583
14583
  }
14584
14584
  };
14585
+ var plugins = [hideOnEsc, {
14586
+ name: "onClose",
14587
+ fn: function fn() {
14588
+ return {};
14589
+ }
14590
+ }];
14585
14591
  var Dropdown = function Dropdown(_ref2) {
14586
14592
  var icon = _ref2.icon,
14587
14593
  label = _ref2.label,
@@ -14640,10 +14646,6 @@ var Dropdown = function Dropdown(_ref2) {
14640
14646
  };
14641
14647
  var dropdownClassname = dropdownProps.classNames,
14642
14648
  otherDropdownProps = _objectWithoutProperties$1(dropdownProps, _excluded3);
14643
-
14644
- // hideOnClick determines whether the dropdown should be hidden when the user clicks outside of the dropdown.
14645
- // https://atomiks.github.io/tippyjs/v6/all-props/#hideonclick
14646
- var hideOnClick = isControlled ? false : closeOnOutsideClick || "toggle";
14647
14649
  var close = function close() {
14648
14650
  instance.hide();
14649
14651
  onClose();
@@ -14652,20 +14654,23 @@ var Dropdown = function Dropdown(_ref2) {
14652
14654
  interactive: true,
14653
14655
  animation: false,
14654
14656
  arrow: false,
14655
- duration: 0,
14656
- hideOnClick: hideOnClick,
14657
+ duration: 0
14658
+ // hideOnClick determines whether the dropdown should be hidden when the user clicks outside of the dropdown.
14659
+ // https://atomiks.github.io/tippyjs/v6/all-props/#hideonclick
14660
+ ,
14661
+ hideOnClick: isControlled ? undefined : closeOnOutsideClick || "toggle",
14657
14662
  hideOnEsc: closeOnEsc,
14658
14663
  maxWidth: "none",
14659
14664
  offset: 0,
14660
14665
  placement: position || PLACEMENT.bottomEnd,
14661
- plugins: [hideOnEsc],
14666
+ plugins: plugins,
14662
14667
  popperOptions: {
14663
14668
  strategy: strategy,
14664
14669
  modifiers: dropdownModifiers
14665
14670
  },
14666
14671
  role: "dropdown",
14667
14672
  theme: "light",
14668
- trigger: TRIGGERS[trigger],
14673
+ trigger: isControlled ? undefined : TRIGGERS[trigger],
14669
14674
  className: classnames$1("neeto-ui-dropdown", _defineProperty$7({}, className, className)),
14670
14675
  content: mounted ? /*#__PURE__*/React__default["default"].createElement("div", _extends$4({
14671
14676
  "data-cy": "".concat(hyphenize(label), "-dropdown-container"),