@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.
- package/button/button.d.ts +1 -1
- package/card/card.d.ts +1 -2
- package/clamp-text/clamp-text.d.ts +1 -1
- package/container/container.d.ts +1 -1
- package/dropdown/dropdown-item.d.ts +1 -1
- package/dropdown/dropdown-item.js +1 -3
- package/icon-button/icon-button.d.ts +1 -2
- package/icon-button/icon-button.module.css +3 -3
- package/list/list.d.ts +1 -1
- 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/prose/prose.d.ts +1 -1
- package/snackbar/snackbar.d.ts +1 -1
- package/stack/stack.d.ts +1 -1
- package/star-meter/star-meter.d.ts +1 -2
- package/text/text.d.ts +1 -1
- package/textfield/base-field/base-field.d.ts +1 -1
- package/themes/dark.css +1 -1
- package/themes/light.css +1 -1
- package/themes.css +3 -3
- package/title/title.d.ts +1 -1
package/button/button.d.ts
CHANGED
|
@@ -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
|
|
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'];
|
package/container/container.d.ts
CHANGED
|
@@ -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:
|
|
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:
|
|
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:
|
|
20
|
+
padding: 0;
|
|
21
21
|
}
|
|
22
22
|
}
|
package/list/list.d.ts
CHANGED
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/prose/prose.d.ts
CHANGED
package/snackbar/snackbar.d.ts
CHANGED
package/stack/stack.d.ts
CHANGED
package/text/text.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { InputHTMLAttributes } from 'react';
|
|
2
|
-
import
|
|
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
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
|
|
package/title/title.d.ts
CHANGED