@wonderflow/react-components 2.25.1 → 2.25.2
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/modal/modal-content.js +1 -1
- package/modal/modal.d.ts +2 -2
- package/modal/modal.js +1 -1
- package/package.json +1 -1
- package/themes/dark.css +1 -1
- package/themes/light.css +1 -1
- package/themes.css +3 -3
package/modal/modal-content.js
CHANGED
|
@@ -8,7 +8,7 @@ import { useModalContext } from './modal-context';
|
|
|
8
8
|
export const ModalContent = forwardRef(({ children, className, title, ...props }, forwardedRef) => {
|
|
9
9
|
const { onClose, titleId } = useModalContext();
|
|
10
10
|
return (React.createElement(Elevator, { resting: 4 },
|
|
11
|
-
React.createElement("div", { className: clsx(Content, className), ref: forwardedRef, ...props },
|
|
11
|
+
React.createElement("div", { className: clsx(Content, className), ref: forwardedRef, "data-theme": "light", ...props },
|
|
12
12
|
React.createElement("header", { className: Header },
|
|
13
13
|
onClose && React.createElement(IconButton, { onClick: onClose, className: CloseButton, icon: "xmark", kind: "flat" }),
|
|
14
14
|
React.createElement(Title, { level: "5", id: titleId }, title)),
|
package/modal/modal.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export declare type ModalProps = PropsWithClass & {
|
|
1
|
+
import React, { PropsWithChildren } from 'react';
|
|
2
|
+
export declare type ModalProps = PropsWithChildren<PropsWithClass> & {
|
|
3
3
|
visible?: boolean;
|
|
4
4
|
overlayColor?: 'light' | 'dark' | 'auto';
|
|
5
5
|
closeOnClickOutside?: boolean;
|
package/modal/modal.js
CHANGED
|
@@ -18,7 +18,7 @@ const ModalElement = forwardRef(({ children, className, overlayColor = 'dark', c
|
|
|
18
18
|
React.createElement("div", { role: "dialog", "aria-modal": "true", "aria-labelledby": ctx.titleId, className: clsx(ModalClass, className), ref: forwardedRef, ...props },
|
|
19
19
|
React.createElement(m.span, { key: seedID('modal-backdrop'), className: Backdrop, "data-overlay-color": overlayColor, initial: { opacity: 0 }, animate: { opacity: 0.95 }, exit: { opacity: 0 }, transition: { duration: 0.2 } }),
|
|
20
20
|
React.createElement(FocusOn, { onClickOutside: () => closeOnClickOutside && ctx.onClose(), onEscapeKey: ctx.onClose },
|
|
21
|
-
React.createElement(m.div, { key: seedID('modal-container'), className: Container,
|
|
21
|
+
React.createElement(m.div, { key: seedID('modal-container'), className: Container, initial: { scale: 0.98, opacity: 0 }, animate: { scale: 1, opacity: 1 }, exit: { scale: 0.98, opacity: 0 }, transition: { ease: 'easeOut', duration: 0.1 } }, children))))))));
|
|
22
22
|
});
|
|
23
23
|
export const Modal = ({ visible, ...props }) => {
|
|
24
24
|
if (typeof visible === 'boolean') {
|
package/package.json
CHANGED
package/themes/dark.css
CHANGED
package/themes/light.css
CHANGED
package/themes.css
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
color: var(--global-foreground);
|
|
5
5
|
/**
|
|
6
6
|
* Do not edit directly
|
|
7
|
-
* Generated on
|
|
7
|
+
* Generated on Tue, 05 Oct 2021 06:51:20 GMT
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
color: var(--global-foreground);
|
|
52
52
|
/**
|
|
53
53
|
* Do not edit directly
|
|
54
|
-
* Generated on
|
|
54
|
+
* Generated on Tue, 05 Oct 2021 06:51:20 GMT
|
|
55
55
|
*/
|
|
56
56
|
|
|
57
57
|
|
|
@@ -99,7 +99,7 @@
|
|
|
99
99
|
color: var(--global-foreground);
|
|
100
100
|
/**
|
|
101
101
|
* Do not edit directly
|
|
102
|
-
* Generated on
|
|
102
|
+
* Generated on Tue, 05 Oct 2021 06:51:20 GMT
|
|
103
103
|
*/
|
|
104
104
|
|
|
105
105
|
|