@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.js CHANGED
@@ -14377,6 +14377,10 @@ var Button = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
14377
14377
  size: iconSize
14378
14378
  }) : /* When Icon is not present, animate the margin from 0 to the needed value*/
14379
14379
  loading && /*#__PURE__*/React__default.createElement(motion.div, {
14380
+ animate: {
14381
+ width: "auto",
14382
+ scale: 1
14383
+ },
14380
14384
  className: "neeto-ui-btn__spinner-wrapper",
14381
14385
  exit: {
14382
14386
  width: 0,
@@ -14388,10 +14392,6 @@ var Button = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
14388
14392
  },
14389
14393
  transition: {
14390
14394
  bounce: false
14391
- },
14392
- animate: {
14393
- width: "auto",
14394
- scale: 1
14395
14395
  }
14396
14396
  }, /*#__PURE__*/React__default.createElement(Spinner$1, {
14397
14397
  "aria-hidden": "true",
@@ -14553,6 +14553,12 @@ var hideOnEsc = {
14553
14553
  };
14554
14554
  }
14555
14555
  };
14556
+ var plugins = [hideOnEsc, {
14557
+ name: "onClose",
14558
+ fn: function fn() {
14559
+ return {};
14560
+ }
14561
+ }];
14556
14562
  var Dropdown = function Dropdown(_ref2) {
14557
14563
  var icon = _ref2.icon,
14558
14564
  label = _ref2.label,
@@ -14611,10 +14617,6 @@ var Dropdown = function Dropdown(_ref2) {
14611
14617
  };
14612
14618
  var dropdownClassname = dropdownProps.classNames,
14613
14619
  otherDropdownProps = _objectWithoutProperties$1(dropdownProps, _excluded3);
14614
-
14615
- // hideOnClick determines whether the dropdown should be hidden when the user clicks outside of the dropdown.
14616
- // https://atomiks.github.io/tippyjs/v6/all-props/#hideonclick
14617
- var hideOnClick = isControlled ? false : closeOnOutsideClick || "toggle";
14618
14620
  var close = function close() {
14619
14621
  instance.hide();
14620
14622
  onClose();
@@ -14623,20 +14625,23 @@ var Dropdown = function Dropdown(_ref2) {
14623
14625
  interactive: true,
14624
14626
  animation: false,
14625
14627
  arrow: false,
14626
- duration: 0,
14627
- hideOnClick: hideOnClick,
14628
+ duration: 0
14629
+ // hideOnClick determines whether the dropdown should be hidden when the user clicks outside of the dropdown.
14630
+ // https://atomiks.github.io/tippyjs/v6/all-props/#hideonclick
14631
+ ,
14632
+ hideOnClick: isControlled ? undefined : closeOnOutsideClick || "toggle",
14628
14633
  hideOnEsc: closeOnEsc,
14629
14634
  maxWidth: "none",
14630
14635
  offset: 0,
14631
14636
  placement: position || PLACEMENT.bottomEnd,
14632
- plugins: [hideOnEsc],
14637
+ plugins: plugins,
14633
14638
  popperOptions: {
14634
14639
  strategy: strategy,
14635
14640
  modifiers: dropdownModifiers
14636
14641
  },
14637
14642
  role: "dropdown",
14638
14643
  theme: "light",
14639
- trigger: TRIGGERS[trigger],
14644
+ trigger: isControlled ? undefined : TRIGGERS[trigger],
14640
14645
  className: classnames$1("neeto-ui-dropdown", _defineProperty$7({}, className, className)),
14641
14646
  content: mounted ? /*#__PURE__*/React__default.createElement("div", _extends$4({
14642
14647
  "data-cy": "".concat(hyphenize(label), "-dropdown-container"),