@festo-ui/react 7.3.0-dev.469 → 7.3.0-dev.470

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.
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ import { ModalBaseProps } from './ModalBase';
3
+ interface CustomModalProps extends ModalBaseProps {
4
+ large?: boolean;
5
+ title?: string;
6
+ subtitle?: string;
7
+ }
8
+ declare const CustomModal: (props: CustomModalProps & import("react").RefAttributes<HTMLDivElement>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | null;
9
+ export default CustomModal;
@@ -0,0 +1,44 @@
1
+ import cn from 'classnames';
2
+ import { forwardRef } from 'react';
3
+ import ModalBase from "./ModalBase.js";
4
+ import { jsx as _jsx } from "react/jsx-runtime";
5
+ import { jsxs as _jsxs } from "react/jsx-runtime";
6
+ const CustomModal = /*#__PURE__*/forwardRef((_ref, ref) => {
7
+ let {
8
+ isOpen,
9
+ onClose,
10
+ large,
11
+ title,
12
+ subtitle,
13
+ className,
14
+ children
15
+ } = _ref;
16
+ return /*#__PURE__*/_jsxs(ModalBase, {
17
+ isOpen: isOpen,
18
+ className: cn({
19
+ 'fwe-modal--large': large
20
+ }, className),
21
+ ref: ref,
22
+ onClose: onClose,
23
+ children: [/*#__PURE__*/_jsx("button", {
24
+ className: "fwe-modal-close-btn",
25
+ type: "button",
26
+ "aria-label": "Close",
27
+ onClick: onClose,
28
+ children: /*#__PURE__*/_jsx("span", {
29
+ className: "fwe-sr-only",
30
+ children: "Close"
31
+ })
32
+ }), title && /*#__PURE__*/_jsxs("div", {
33
+ className: "fwe-modal-header",
34
+ children: [subtitle && /*#__PURE__*/_jsx("h2", {
35
+ className: "fwe-modal-h2",
36
+ children: subtitle
37
+ }), /*#__PURE__*/_jsx("h1", {
38
+ className: "fwe-modal-h1",
39
+ children: title
40
+ })]
41
+ }), children]
42
+ });
43
+ });
44
+ export default CustomModal;
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _classnames = _interopRequireDefault(require("classnames"));
8
+ var _react = require("react");
9
+ var _ModalBase = _interopRequireDefault(require("./ModalBase.js"));
10
+ var _jsxRuntime = require("react/jsx-runtime");
11
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
12
+ const CustomModal = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
13
+ let {
14
+ isOpen,
15
+ onClose,
16
+ large,
17
+ title,
18
+ subtitle,
19
+ className,
20
+ children
21
+ } = _ref;
22
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_ModalBase.default, {
23
+ isOpen: isOpen,
24
+ className: (0, _classnames.default)({
25
+ 'fwe-modal--large': large
26
+ }, className),
27
+ ref: ref,
28
+ onClose: onClose,
29
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("button", {
30
+ className: "fwe-modal-close-btn",
31
+ type: "button",
32
+ "aria-label": "Close",
33
+ onClick: onClose,
34
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
35
+ className: "fwe-sr-only",
36
+ children: "Close"
37
+ })
38
+ }), title && /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
39
+ className: "fwe-modal-header",
40
+ children: [subtitle && /*#__PURE__*/(0, _jsxRuntime.jsx)("h2", {
41
+ className: "fwe-modal-h2",
42
+ children: subtitle
43
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)("h1", {
44
+ className: "fwe-modal-h1",
45
+ children: title
46
+ })]
47
+ }), children]
48
+ });
49
+ });
50
+ var _default = exports.default = CustomModal;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@festo-ui/react",
3
- "version": "7.3.0-dev.469",
3
+ "version": "7.3.0-dev.470",
4
4
  "author": "Festo UI (styleguide@festo.com)",
5
5
  "license": "apache-2.0",
6
6
  "type": "module",