@wonderflow/react-components 2.25.0-beta.8 → 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.
@@ -1,6 +1,6 @@
1
1
  import { MouseEvent } from 'react';
2
- import type * as Polymorphic from '../polymorphic';
3
2
  import { IconNames } from '../icons/types';
3
+ import { Polymorphic } from '../';
4
4
  export declare type ButtonProps = PropsWithClass & {
5
5
  kind?: 'primary' | 'secondary' | 'flat';
6
6
  dimension?: 'regular' | 'small' | 'big';
package/card/card.d.ts CHANGED
@@ -1,6 +1,5 @@
1
1
  import { ReactNode } from 'react';
2
- import type * as Polymorphic from '../polymorphic';
3
- import { StackProps } from '../';
2
+ import { StackProps, Polymorphic } from '../';
4
3
  import { TokensTypes } from '@wonderflow/tokens/platforms/web/types';
5
4
  export declare type CardProps = PropsWithClass & Pick<StackProps, 'wrap' | 'columnGap' | 'rowGap' | 'verticalAlign' | 'horizontalAlign'> & {
6
5
  padding?: false | TokensTypes['space'];
@@ -1,5 +1,5 @@
1
1
  import { ReactNode } from 'react';
2
- import type * as Polymorphic from '../polymorphic';
2
+ import { Polymorphic } from '../';
3
3
  export declare type ClampTextProps = PropsWithClass & {
4
4
  children: ReactNode;
5
5
  rows?: number;
@@ -1,4 +1,4 @@
1
- import type * as Polymorphic from '../polymorphic';
1
+ import { Polymorphic } from '../';
2
2
  export declare type ContainerProps = {
3
3
  dimension?: 'full' | 'medium' | 'large';
4
4
  padding?: boolean;
@@ -1,6 +1,6 @@
1
1
  import { ReactNode } from 'react';
2
- import type * as Polymorphic from '../polymorphic';
3
2
  import { IconNames } from '../icons/types';
3
+ import { Polymorphic } from '../';
4
4
  export declare type DropdownItemProps = PropsWithClass & {
5
5
  children: ReactNode;
6
6
  icon?: IconNames;
@@ -1,9 +1,7 @@
1
1
  import React, { useCallback, forwardRef, useRef, useMemo } from 'react';
2
- import { Icon } from '../icon';
3
- import { Stack } from '../stack';
4
2
  import { useRovingTabIndex, useFocusEffect } from 'react-roving-tabindex';
5
3
  import { DropdownItem as DropdownItemClass, Icon as IconClass } from './dropdown-item.module.css';
6
- import { Tooltip } from '../';
4
+ import { Tooltip, Stack, Icon } from '../';
7
5
  import clsx from 'clsx';
8
6
  export const DropdownItem = forwardRef(({ className, children, onClick, icon, dimension = 'regular', as: Wrapper = 'button', iconPosition = 'left', description, ...props }, forwardedRef) => {
9
7
  const itemRef = useRef(forwardedRef);
@@ -1,5 +1,4 @@
1
- import { Button, ButtonProps } from '../';
2
- import type * as Polymorphic from '../polymorphic';
1
+ import { Button, ButtonProps, Polymorphic } from '../';
3
2
  export declare type IconButtonProps = PropsWithClass & Pick<ButtonProps, 'kind' | 'dimension' | 'icon' | 'disabled' | 'onClick'>;
4
3
  declare type PolymorphicIconButton = Polymorphic.ForwardRefComponent<Polymorphic.IntrinsicElement<typeof Button>, Polymorphic.OwnProps<typeof Button> & IconButtonProps>;
5
4
  export declare const IconButton: PolymorphicIconButton;
@@ -5,18 +5,18 @@
5
5
  &[data-button-dimension='small'] {
6
6
  inline-size: env(--space-24);
7
7
  min-inline-size: env(--space-24);
8
- padding: inherit;
8
+ padding: 0;
9
9
  }
10
10
 
11
11
  &[data-button-dimension='regular'] {
12
12
  inline-size: env(--space-40);
13
13
  min-inline-size: env(--space-40);
14
- padding: inherit;
14
+ padding: 0;
15
15
  }
16
16
 
17
17
  &[data-button-dimension='big'] {
18
18
  inline-size: env(--space-48);
19
19
  min-inline-size: env(--space-48);
20
- padding: inherit;
20
+ padding: 0;
21
21
  }
22
22
  }
package/list/list.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import type * as Polymorphic from '../polymorphic';
2
1
  import { IconNames } from '../icons/types';
2
+ import { Polymorphic } from '../';
3
3
  export declare type ListProps = PropsWithClass & {
4
4
  dimension?: 'small' | 'regular' | 'big';
5
5
  marker?: IconNames;
@@ -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, "data-theme": "light", initial: { scale: 0.98, opacity: 0 }, animate: { scale: 1, opacity: 1 }, exit: { scale: 0.98, opacity: 0 }, transition: { ease: 'easeOut', duration: 0.1 } }, children))))))));
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
@@ -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": "2.25.0-beta.8",
4
+ "version": "2.25.2",
5
5
  "author": "Wonderflow",
6
6
  "license": "MIT",
7
7
  "main": "index.js",
package/prose/prose.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type * as Polymorphic from '../polymorphic';
1
+ import { Polymorphic } from '../';
2
2
  export declare type ProseProps = {};
3
3
  declare type PolymorphicProse = Polymorphic.ForwardRefComponent<'div', ProseProps>;
4
4
  export declare const Prose: PolymorphicProse;
@@ -1,6 +1,6 @@
1
1
  import { ReactNode } from 'react';
2
- import type * as Polymorphic from '../polymorphic';
3
2
  import { IconNames } from '../icons/types';
3
+ import { Polymorphic } from '../';
4
4
  export declare type SnackbarProps = {
5
5
  icon?: IconNames;
6
6
  title?: string;
package/stack/stack.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type * as Polymorphic from '../polymorphic';
1
+ import { Polymorphic } from '../';
2
2
  import { TokensTypes } from '@wonderflow/tokens/platforms/web/types';
3
3
  export declare type StackProps = {
4
4
  rowGap?: 0 | TokensTypes['space'];
@@ -1,6 +1,5 @@
1
1
  import { ReactNode } from 'react';
2
- import type * as Polymorphic from '../polymorphic';
3
- import { Stack } from '../';
2
+ import { Stack, Polymorphic } from '../';
4
3
  export declare type StarMeterProps = PropsWithClass & {
5
4
  value: number;
6
5
  starCount?: number;
package/text/text.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type * as Polymorphic from '../polymorphic';
1
+ import { Polymorphic } from '../';
2
2
  import { TokensTypes } from '@wonderflow/tokens/platforms/web/types';
3
3
  export declare type TextProps = {
4
4
  size?: TokensTypes['font']['size'];
@@ -1,5 +1,5 @@
1
1
  import { InputHTMLAttributes } from 'react';
2
- import type * as Polymorphic from '../../polymorphic';
2
+ import { Polymorphic } from '../../';
3
3
  export declare type BaseFieldProps = InputHTMLAttributes<HTMLInputElement> & InputHTMLAttributes<HTMLTextAreaElement> & {
4
4
  invalid?: boolean;
5
5
  };
package/themes/dark.css CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Mon, 04 Oct 2021 15:22:49 GMT
3
+ * Generated on Tue, 05 Oct 2021 06:51:20 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 Mon, 04 Oct 2021 15:22:49 GMT
3
+ * Generated on Tue, 05 Oct 2021 06:51:20 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 Mon, 04 Oct 2021 15:22:49 GMT
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 Mon, 04 Oct 2021 15:22:49 GMT
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 Mon, 04 Oct 2021 15:22:49 GMT
102
+ * Generated on Tue, 05 Oct 2021 06:51:20 GMT
103
103
  */
104
104
 
105
105
 
package/title/title.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type * as Polymorphic from '../polymorphic';
1
+ import { Polymorphic } from '../';
2
2
  export declare type TitleProps = {
3
3
  level?: '1' | '2' | '3' | '4' | '5' | '6' | 'display';
4
4
  lineHeignt?: 'none' | 'small' | 'large';