@wonderflow/react-components 3.0.0-next.6 → 3.0.0-next.7

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,7 +1,9 @@
1
1
  import React, { ReactNode } from 'react';
2
2
  export declare type ModalContentProps = PropsWithClass & {
3
3
  title: ReactNode;
4
+ theme?: 'dark' | 'light' | 'auto';
4
5
  };
5
6
  export declare const ModalContent: React.ForwardRefExoticComponent<PropsWithClass & {
6
7
  title: ReactNode;
8
+ theme?: "auto" | "light" | "dark" | undefined;
7
9
  } & React.RefAttributes<HTMLDivElement>>;
@@ -3,10 +3,10 @@ import React, { forwardRef } from 'react';
3
3
  import { Content, Header, CloseButton } from './modal-content.module.css';
4
4
  import { Title, Elevator, IconButton, Stack } from '../../';
5
5
  import { useModalContext } from '../modal-context';
6
- export const ModalContent = forwardRef(({ children, className, title, ...otherProps }, forwardedRef) => {
6
+ export const ModalContent = forwardRef(({ children, className, title, theme = 'light', ...otherProps }, forwardedRef) => {
7
7
  const { onClose, titleId } = useModalContext();
8
8
  return (React.createElement(Elevator, { resting: 4 },
9
- React.createElement("div", { className: clsx(Content, className), ref: forwardedRef, "data-theme": "light", ...otherProps },
9
+ React.createElement("div", { className: clsx(Content, className), ref: forwardedRef, "data-theme": theme, ...otherProps },
10
10
  React.createElement(Stack, { verticalAlign: "center", fill: false, horizontalAlign: "space-between", direction: "row", className: Header },
11
11
  React.createElement(Title, { level: "5", id: titleId }, title),
12
12
  onClose && React.createElement(IconButton, { onClick: onClose, className: CloseButton, icon: "xmark", kind: "flat" })),
package/modal/modal.js CHANGED
@@ -10,9 +10,9 @@ export const Modal = forwardRef(({ children, className, overlayColor = 'dark', c
10
10
  const seedID = useUIDSeed();
11
11
  return (React.createElement(ModalProvider, { onClose: onClose },
12
12
  React.createElement(ModalContext.Consumer, null, (ctx) => (React.createElement("div", { role: "dialog", "aria-modal": "true", "aria-labelledby": ctx.titleId, className: clsx(ModalClass, className), ref: forwardedRef, ...otherProps },
13
- React.createElement(motion.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 } }),
13
+ React.createElement(motion.span, { key: seedID('modal-backdrop'), className: Backdrop, "data-overlay-color": overlayColor, initial: { opacity: 0 }, animate: { opacity: 0.95 }, transition: { duration: 0.2 } }),
14
14
  React.createElement(FocusOn, { onClickOutside: ctx.onClose, onEscapeKey: ctx.onClose },
15
- React.createElement(motion.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)))))));
15
+ React.createElement(motion.div, { key: seedID('modal-container'), className: Container, initial: { scale: 0.98, opacity: 0 }, animate: { scale: 1, opacity: 1 }, transition: { ease: 'easeOut', duration: 0.1 } }, children)))))));
16
16
  });
17
17
  Modal.displayName = 'Modal';
18
18
  Modal.Content = ModalContent;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@wonderflow/react-components",
3
3
  "description": "UI components from Wonderflow's Wanda design system",
4
- "version": "3.0.0-next.6",
4
+ "version": "3.0.0-next.7",
5
5
  "author": "Wonderflow",
6
6
  "license": "MIT",
7
7
  "main": "index.js",
package/themes/dark.css CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Thu, 16 Dec 2021 08:41:53 GMT
3
+ * Generated on Thu, 16 Dec 2021 09:42:51 GMT
4
4
  */
5
5
 
6
6
  :root {
package/themes/light.css CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Thu, 16 Dec 2021 08:41:53 GMT
3
+ * Generated on Thu, 16 Dec 2021 09:42:51 GMT
4
4
  */
5
5
 
6
6
  :root {
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 Thu, 16 Dec 2021 08:41:53 GMT
7
+ * Generated on Thu, 16 Dec 2021 09:42:51 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 Thu, 16 Dec 2021 08:41:53 GMT
54
+ * Generated on Thu, 16 Dec 2021 09:42:51 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 Thu, 16 Dec 2021 08:41:53 GMT
102
+ * Generated on Thu, 16 Dec 2021 09:42:51 GMT
103
103
  */
104
104
 
105
105