@festo-ui/react 5.1.0-dev.186 → 5.1.0-dev.190

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.
@@ -1,8 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import { PolymorphicRef } from '../../../helper/types';
3
- export { Ref, ReactElement, RefAttributes } from 'react';
4
3
  declare module 'react' {
5
- function forwardRef<T, P = {}>(render: (props: P, ref: Ref<T>) => ReactElement | null): (props: P & RefAttributes<T>) => ReactElement | null;
4
+ function forwardRef<T, P = {}>(render: (props: P, ref: React.Ref<T>) => React.ReactElement | null): (props: P & React.RefAttributes<T>) => React.ReactElement | null;
6
5
  }
7
6
  interface MobileFlyoutItemBaseProps {
8
7
  icon?: string;
@@ -15,5 +14,5 @@ declare const MobileFlyoutItem: <C extends import("react").ElementType<any> = "a
15
14
  children?: import("react").ReactNode;
16
15
  } & Omit<import("react").PropsWithoutRef<import("react").ComponentProps<C>>, "component" | keyof MobileFlyoutItemBaseProps> & {
17
16
  ref?: PolymorphicRef<C> | undefined;
18
- } & import("react").RefAttributes<unknown>) => ReactElement | null;
17
+ } & import("react").RefAttributes<unknown>) => React.ReactElement | null;
19
18
  export default MobileFlyoutItem;
@@ -1,16 +1,15 @@
1
1
  import cn from 'classnames';
2
2
  import { forwardRef, useContext } from 'react';
3
3
  import MobileFlyoutContext from '../MobileFlyoutContext';
4
- import { jsx as _jsx } from "react/jsx-runtime";
5
- import { jsxs as _jsxs } from "react/jsx-runtime";
6
- export { Ref, ReactElement, RefAttributes } from 'react';
4
+
7
5
  /*
8
6
  * Augment `forwardRef` only for this module so that storybook can infer controls
9
7
  * (despite component being wrapped in forwardRef)
10
8
  * https://fettblog.eu/typescript-react-generic-forward-refs/#option-3%3A-augment-forwardref
11
9
  * https://github.com/microsoft/TypeScript/pull/30215
12
10
  */
13
-
11
+ import { jsx as _jsx } from "react/jsx-runtime";
12
+ import { jsxs as _jsxs } from "react/jsx-runtime";
14
13
  const MobileFlyoutItem = /*#__PURE__*/forwardRef((_ref, ref) => {
15
14
  let {
16
15
  component,
@@ -15,10 +15,8 @@ const ModalBase = /*#__PURE__*/forwardRef((_ref, ref) => {
15
15
  children
16
16
  } = _ref;
17
17
  const backdropRef = useRef(null);
18
- const modalRef = useRef(null);
19
18
  const divRef = useRef(null);
20
- const combinedRef = useForkRef(ref, modalRef);
21
- const allRefs = useForkRef(combinedRef, divRef);
19
+ const allRefs = useForkRef(ref, divRef);
22
20
  const container = divRef?.current?.ownerDocument || document;
23
21
  useOnClickOutside(divRef, () => onClose?.());
24
22
  useEffect(() => {
@@ -47,7 +45,7 @@ const ModalBase = /*#__PURE__*/forwardRef((_ref, ref) => {
47
45
  className: "fr-modal-backdrop fwe-modal-backdrop"
48
46
  })
49
47
  }), /*#__PURE__*/_jsx(CSSTransition, {
50
- ref: modalRef,
48
+ nodeRef: divRef,
51
49
  unmountOnExit: true,
52
50
  classNames: "fr-modal",
53
51
  appear: true,
@@ -3,24 +3,6 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- Object.defineProperty(exports, "ReactElement", {
7
- enumerable: true,
8
- get: function () {
9
- return _react.ReactElement;
10
- }
11
- });
12
- Object.defineProperty(exports, "Ref", {
13
- enumerable: true,
14
- get: function () {
15
- return _react.Ref;
16
- }
17
- });
18
- Object.defineProperty(exports, "RefAttributes", {
19
- enumerable: true,
20
- get: function () {
21
- return _react.RefAttributes;
22
- }
23
- });
24
6
  exports.default = void 0;
25
7
  var _classnames = _interopRequireDefault(require("classnames"));
26
8
  var _react = require("react");
@@ -20,10 +20,8 @@ const ModalBase = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
20
20
  children
21
21
  } = _ref;
22
22
  const backdropRef = (0, _react.useRef)(null);
23
- const modalRef = (0, _react.useRef)(null);
24
23
  const divRef = (0, _react.useRef)(null);
25
- const combinedRef = (0, _useForkRef.default)(ref, modalRef);
26
- const allRefs = (0, _useForkRef.default)(combinedRef, divRef);
24
+ const allRefs = (0, _useForkRef.default)(ref, divRef);
27
25
  const container = divRef?.current?.ownerDocument || document;
28
26
  (0, _useOnClickOutside.default)(divRef, () => onClose?.());
29
27
  (0, _react.useEffect)(() => {
@@ -52,7 +50,7 @@ const ModalBase = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
52
50
  className: "fr-modal-backdrop fwe-modal-backdrop"
53
51
  })
54
52
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactTransitionGroup.CSSTransition, {
55
- ref: modalRef,
53
+ nodeRef: divRef,
56
54
  unmountOnExit: true,
57
55
  classNames: "fr-modal",
58
56
  appear: true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@festo-ui/react",
3
- "version": "5.1.0-dev.186",
3
+ "version": "5.1.0-dev.190",
4
4
  "author": "Festo UI (styleguide@festo.com)",
5
5
  "license": "apache-2.0",
6
6
  "exports": {