@doist/reactist 17.7.0 → 17.8.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.
@@ -2065,26 +2065,27 @@ function Avatar(_ref) {
2065
2065
 
2066
2066
  Avatar.displayName = 'Avatar';
2067
2067
 
2068
- var modules_33c7c985 = {"badge":"d05d2b62","badge-neutral":"a14691f3","badge-positive":"_4e255fdb","badge-color":"a58624e2"};
2068
+ var modules_33c7c985 = {"badge":"_1eb9b834","badge-neutral":"e02d9b99","badge-positive":"_0243fb89","badge-color":"_85c0ffa3"};
2069
2069
 
2070
- const _excluded$p = ["variant", "children"];
2071
-
2072
- function Badge(_ref) {
2070
+ const _excluded$p = ["variant", "children", "exceptionallySetClassName"];
2071
+ const Badge = /*#__PURE__*/polymorphicComponent(function Badge(_ref, ref) {
2073
2072
  let {
2074
2073
  variant = 'neutral',
2075
- children
2074
+ children,
2075
+ exceptionallySetClassName
2076
2076
  } = _ref,
2077
2077
  rest = _objectWithoutProperties(_ref, _excluded$p);
2078
2078
 
2079
- const variantClassName = modules_33c7c985["badge-" + variant];
2080
2079
  return /*#__PURE__*/React.createElement(Box, _objectSpread2(_objectSpread2({}, rest), {}, {
2081
- className: [modules_33c7c985.badge, variantClassName]
2080
+ ref: ref,
2081
+ display: "inline",
2082
+ className: [modules_33c7c985.badge, modules_33c7c985["badge-" + variant], exceptionallySetClassName]
2082
2083
  }), children);
2083
- }
2084
+ });
2084
2085
 
2085
2086
  var modules_8f59d13b = {"overlay":"_868392ae","fadein":"_63d7ee15","fitContent":"b8548bf2","container":"_31956461","full":"_1007df83","large":"_10c275aa","medium":"_0ac526b4","small":"_30f38fdb","xlarge":"_54868e8b","expand":"c0bc68bc","buttonContainer":"_6527332a","headerContent":"_4750dc1b"};
2086
2087
 
2087
- const _excluded$q = ["isOpen", "onDismiss", "height", "width", "exceptionallySetClassName", "exceptionallySetOverlayClassName", "autoFocus", "hideOnEscape", "hideOnInteractOutside", "children"],
2088
+ const _excluded$q = ["isOpen", "onDismiss", "height", "width", "exceptionallySetClassName", "exceptionallySetOverlayClassName", "autoFocus", "hideOnEscape", "hideOnInteractOutside", "children", "portalElement"],
2088
2089
  _excluded2$1 = ["children", "button", "withDivider", "exceptionallySetClassName"],
2089
2090
  _excluded3 = ["exceptionallySetClassName", "children"],
2090
2091
  _excluded4 = ["exceptionallySetClassName", "withDivider"],
@@ -2119,7 +2120,8 @@ function Modal(_ref) {
2119
2120
  autoFocus = true,
2120
2121
  hideOnEscape = true,
2121
2122
  hideOnInteractOutside = true,
2122
- children
2123
+ children,
2124
+ portalElement
2123
2125
  } = _ref,
2124
2126
  props = _objectWithoutProperties(_ref, _excluded$q);
2125
2127
 
@@ -2165,12 +2167,19 @@ function Modal(_ref) {
2165
2167
  return /*#__PURE__*/React.createElement(portal.Portal // @ts-expect-error `portalRef` doesn't accept MutableRefObject initialized as null
2166
2168
  , {
2167
2169
  // @ts-expect-error `portalRef` doesn't accept MutableRefObject initialized as null
2168
- portalRef: portalRef
2170
+ portalRef: portalRef,
2171
+ portalElement: portalElement
2169
2172
  }, /*#__PURE__*/React.createElement(Box, {
2170
2173
  "data-testid": "modal-overlay",
2171
2174
  "data-overlay": true,
2172
2175
  className: classNames(modules_8f59d13b.overlay, modules_8f59d13b[height], modules_8f59d13b[width], exceptionallySetOverlayClassName),
2173
- onClick: hideOnInteractOutside ? handleBackdropClick : undefined,
2176
+
2177
+ /**
2178
+ * We're using `onPointerDown` instead of `onClick` to prevent
2179
+ * the modal from closing when the click starts inside the modal
2180
+ * and ends on the backdrop.
2181
+ */
2182
+ onPointerDown: hideOnInteractOutside ? handleBackdropClick : undefined,
2174
2183
  ref: backdropRef
2175
2184
  }, /*#__PURE__*/React.createElement(FocusLock, {
2176
2185
  autoFocus: autoFocus,