quicksnack 3.13.6 → 3.14.0

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.
@@ -54,7 +54,7 @@ var Dropdown = function (_a) {
54
54
  var handleClose = (0, react_1.useCallback)(function () { return setIsOpen(false); }, [setIsOpen]);
55
55
  react_1.default.useEffect(function () {
56
56
  if (isOpen) {
57
- document.addEventListener('click', handleClose);
57
+ setTimeout(function () { return document.addEventListener('click', handleClose); }, 1);
58
58
  }
59
59
  return function () {
60
60
  document.removeEventListener('click', handleClose);
@@ -1,9 +1,14 @@
1
1
  import { BoxProps } from "../Box/Box";
2
2
  import React from "react";
3
+ interface ItemWithElement {
4
+ element: JSX.Element;
5
+ stretch?: boolean;
6
+ forceEqualWidth?: boolean;
7
+ }
3
8
  interface Props extends BoxProps {
4
9
  stretch?: boolean;
5
10
  forceEqualWidth?: boolean;
6
- items: Array<JSX.Element | false>;
11
+ items: Array<JSX.Element | false | ItemWithElement>;
7
12
  }
8
13
  export declare const Floater: React.FC<React.PropsWithChildren<Props>>;
9
14
  export {};
@@ -41,7 +41,7 @@ var Floater = function (_a) {
41
41
  .filter(Boolean)
42
42
  .map(function (item, i) {
43
43
  return hasElement(item)
44
- ? (react_1.default.createElement(FloaterItem_1.FloaterItem, { key: i, laptopWidth: item.forceEqualWidth ? "".concat(100 / items.length, "%") : undefined, stretch: item.stretch }, item.element))
44
+ ? (react_1.default.createElement(FloaterItem_1.FloaterItem, { key: i, laptopWidth: item.forceEqualWidth ? "".concat(100 / items.length, "%") : undefined, stretch: item.stretch || false }, item.element))
45
45
  : react_1.default.createElement(FloaterItem_1.FloaterItem, { key: i, laptopWidth: forceEqualWidth ? "".concat(100 / items.length, "%") : undefined, stretch: stretch }, item);
46
46
  }));
47
47
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "quicksnack",
3
3
  "description": "Quickly create beautiful admin layouts using react",
4
- "version": "3.13.6",
4
+ "version": "3.14.0",
5
5
  "private": false,
6
6
  "files": [
7
7
  "dist/**"