@mittwald/flow-react-components 0.1.0-alpha.386 → 0.1.0-alpha.387
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/CHANGELOG.md +9 -0
- package/dist/js/types/components/Accordion/Accordion.d.ts +2 -0
- package/dist/js/types/components/ActionGroup/ActionGroup.d.ts +2 -0
- package/dist/js/types/components/Avatar/Avatar.d.ts +2 -1
- package/dist/js/types/components/Badge/Badge.d.ts +4 -0
- package/dist/js/types/components/Breadcrumb/Breadcrumb.d.ts +1 -1
- package/dist/js/types/components/Button/Button.d.ts +8 -3
- package/dist/js/types/components/CodeBlock/CodeBlock.d.ts +3 -0
- package/dist/js/types/components/ColumnLayout/ColumnLayout.d.ts +11 -0
- package/dist/js/types/components/ContextMenu/ContextMenu.d.ts +2 -0
- package/dist/js/types/components/CopyButton/CopyButton.d.ts +1 -0
- package/dist/js/types/components/CounterBadge/CounterBadge.d.ts +1 -0
- package/dist/js/types/components/DatePicker/DatePicker.d.ts +1 -0
- package/dist/js/types/components/DateRangePicker/DateRangePicker.d.ts +1 -0
- package/dist/js/types/components/FileCard/FileCard.d.ts +5 -0
- package/dist/js/types/components/FileField/FileField.d.ts +1 -0
- package/dist/js/types/components/HeaderNavigation/HeaderNavigation.d.ts +1 -1
- package/dist/js/types/components/Heading/Heading.d.ts +2 -1
- package/dist/js/types/components/Icon/Icon.d.ts +1 -1
- package/dist/js/types/components/IllustratedMessage/IllustratedMessage.d.ts +1 -1
- package/dist/js/types/components/InlineCode/InlineCode.d.ts +1 -0
- package/dist/js/types/components/Label/Label.d.ts +2 -0
- package/dist/js/types/components/LightBox/LightBox.d.ts +5 -0
- package/dist/js/types/components/Link/Link.d.ts +3 -1
- package/dist/js/types/components/List/List.d.ts +1 -0
- package/dist/js/types/components/Markdown/Markdown.d.ts +1 -0
- package/dist/js/types/components/Message/Message.d.ts +2 -1
- package/dist/js/types/components/Modal/Modal.d.ts +12 -1
- package/dist/js/types/components/Notification/Notification.d.ts +7 -0
- package/dist/js/types/components/Overlay/Overlay.d.ts +5 -2
- package/dist/js/types/components/OverlayTrigger/OverlayTrigger.d.ts +4 -3
- package/dist/js/types/components/Popover/Popover.d.ts +8 -1
- package/dist/js/types/components/ProgressBar/ProgressBar.d.ts +2 -1
- package/dist/js/types/components/Select/Select.d.ts +2 -0
- package/dist/js/types/components/Skeleton/Skeleton.d.ts +2 -0
- package/dist/js/types/components/SkeletonText/SkeletonText.d.ts +1 -0
- package/dist/js/types/components/Switch/Switch.d.ts +4 -1
- package/dist/js/types/components/Table/Table.d.ts +1 -0
- package/dist/js/types/components/TextArea/TextArea.d.ts +4 -0
- package/dist/js/types/components/TextFieldBase/TextFieldBase.d.ts +2 -0
- package/dist/js/types/components/TimeField/TimeField.d.ts +1 -0
- package/dist/js/types/lib/types/props.d.ts +2 -0
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,15 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See
|
|
4
4
|
[Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [0.1.0-alpha.387](https://github.com/mittwald/flow/compare/0.1.0-alpha.386...0.1.0-alpha.387) (2024-12-18)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @mittwald/flow-react-components
|
|
9
|
+
|
|
10
|
+
# Change Log
|
|
11
|
+
|
|
12
|
+
All notable changes to this project will be documented in this file. See
|
|
13
|
+
[Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
14
|
+
|
|
6
15
|
# [0.1.0-alpha.386](https://github.com/mittwald/flow/compare/0.1.0-alpha.385...0.1.0-alpha.386) (2024-12-18)
|
|
7
16
|
|
|
8
17
|
### Features
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { ComponentProps, FC, PropsWithChildren } from 'react';
|
|
2
2
|
export interface AccordionProps extends PropsWithChildren<ComponentProps<"div">> {
|
|
3
|
+
/** Whether the accordion should be initially expanded. */
|
|
3
4
|
defaultExpanded?: boolean;
|
|
5
|
+
/** The visual variant of the accordion. @default "default" */
|
|
4
6
|
variant?: "default" | "outline";
|
|
5
7
|
}
|
|
6
8
|
export declare const Accordion: FC<AccordionProps>;
|
|
@@ -2,7 +2,9 @@ import { PropsWithChildren, default as React } from 'react';
|
|
|
2
2
|
import { FlowComponentProps } from '../../lib/componentFactory/flowComponent';
|
|
3
3
|
import { PropsWithClassName } from '../../lib/types/props';
|
|
4
4
|
export interface ActionGroupProps extends PropsWithChildren, FlowComponentProps, PropsWithClassName {
|
|
5
|
+
/** Whether the breakpoints for a compact version should be ignored. */
|
|
5
6
|
ignoreBreakpoint?: boolean;
|
|
7
|
+
/** The spacing between the buttons inside the action group. @default "m" */
|
|
6
8
|
spacing?: "s" | "m";
|
|
7
9
|
}
|
|
8
10
|
export declare const ActionGroup: React.ForwardRefExoticComponent<ActionGroupProps & React.RefAttributes<never>>;
|
|
@@ -4,8 +4,9 @@ import { FlowComponentProps } from '../../lib/componentFactory/flowComponent';
|
|
|
4
4
|
export declare const avatarColors: readonly ["blue", "teal", "green", "violet", "lilac"];
|
|
5
5
|
export type AvatarColors = (typeof avatarColors)[number];
|
|
6
6
|
export interface AvatarProps extends PropsWithChildren, PropsWithClassName, FlowComponentProps {
|
|
7
|
-
/** @default "m" */
|
|
7
|
+
/** The size of the avatar. @default "m" */
|
|
8
8
|
size?: "xs" | "s" | "m" | "l";
|
|
9
|
+
/** The color of icons and initials inside the avatar. */
|
|
9
10
|
color?: AvatarColors;
|
|
10
11
|
}
|
|
11
12
|
export declare const Avatar: React.ForwardRefExoticComponent<AvatarProps & React.RefAttributes<never>>;
|
|
@@ -5,9 +5,13 @@ import { PressEvent } from '@react-types/shared';
|
|
|
5
5
|
export declare const badgeColors: readonly ["neutral", "blue", "navy", "violet", "teal", "lilac", "green", "orange", "red", "dark", "light"];
|
|
6
6
|
export type BadgeColors = (typeof badgeColors)[number];
|
|
7
7
|
export interface BadgeProps extends PropsWithChildren, FlowComponentProps, PropsWithClassName {
|
|
8
|
+
/** Handler that is called when the badge is pressed. */
|
|
8
9
|
onPress?: (e: PressEvent) => void;
|
|
10
|
+
/** Handler that is called when the badges close icon is pressed. */
|
|
9
11
|
onClose?: (e: PressEvent) => void;
|
|
12
|
+
/** The color of the badge. @default "neutral" */
|
|
10
13
|
color?: BadgeColors;
|
|
14
|
+
/** Whether the badge is disabled. */
|
|
11
15
|
isDisabled?: boolean;
|
|
12
16
|
}
|
|
13
17
|
export declare const Badge: React.ForwardRefExoticComponent<BadgeProps & React.RefAttributes<never>>;
|
|
@@ -2,7 +2,7 @@ import { FC, PropsWithChildren } from 'react';
|
|
|
2
2
|
import { BreadcrumbItemProps } from './components/BreadcrumbItem';
|
|
3
3
|
import * as Aria from "react-aria-components";
|
|
4
4
|
export interface BreadcrumbProps extends Omit<Aria.BreadcrumbsProps<BreadcrumbItemProps>, "children">, PropsWithChildren {
|
|
5
|
-
/** @default "primary" */
|
|
5
|
+
/** The color of the breadcrumb. @default "primary" */
|
|
6
6
|
color?: "primary" | "dark" | "light";
|
|
7
7
|
}
|
|
8
8
|
export declare const Breadcrumb: FC<BreadcrumbProps>;
|
|
@@ -2,16 +2,21 @@ import { PropsWithChildren, default as React } from 'react';
|
|
|
2
2
|
import { FlowComponentProps } from '../../lib/componentFactory/flowComponent';
|
|
3
3
|
import * as Aria from "react-aria-components";
|
|
4
4
|
export interface ButtonProps extends PropsWithChildren<Aria.ButtonProps>, FlowComponentProps {
|
|
5
|
+
/** Slot for button placement in action groups. */
|
|
5
6
|
slot?: string;
|
|
6
|
-
/** @default "primary" */
|
|
7
|
+
/** The color of the button. @default "primary" */
|
|
7
8
|
color?: "primary" | "accent" | "secondary" | "danger" | "dark" | "light";
|
|
8
|
-
/** @default "solid" */
|
|
9
|
+
/** The visual variant of the button. @default "solid" */
|
|
9
10
|
variant?: "plain" | "solid" | "soft" | "outline";
|
|
10
|
-
/** @default "m" */
|
|
11
|
+
/** The size of the button. @default "m" */
|
|
11
12
|
size?: "m" | "s";
|
|
13
|
+
/** Disables button but keeps it focusable. */
|
|
12
14
|
"aria-disabled"?: boolean;
|
|
15
|
+
/** Whether the button is in a pending state. */
|
|
13
16
|
isPending?: boolean;
|
|
17
|
+
/** Whether the button is in a succeeded state. */
|
|
14
18
|
isSucceeded?: boolean;
|
|
19
|
+
/** Whether the button is in a failed state. */
|
|
15
20
|
isFailed?: boolean;
|
|
16
21
|
}
|
|
17
22
|
export declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<never>>;
|
|
@@ -2,8 +2,11 @@ import { FC } from 'react';
|
|
|
2
2
|
import { SyntaxHighlighterProps } from 'react-syntax-highlighter';
|
|
3
3
|
import { PropsWithClassName } from '../../lib/types/props';
|
|
4
4
|
export interface CodeBlockProps extends Omit<SyntaxHighlighterProps, "children">, PropsWithClassName {
|
|
5
|
+
/** Adds a copy icon to the code block to copy its content. */
|
|
5
6
|
copyable?: boolean;
|
|
7
|
+
/** The color of the code block. @default "default" */
|
|
6
8
|
color?: "default" | "light" | "dark";
|
|
9
|
+
/** The code to display inside the code block. */
|
|
7
10
|
code: string | string[];
|
|
8
11
|
}
|
|
9
12
|
export declare const CodeBlock: FC<CodeBlockProps>;
|
|
@@ -2,11 +2,22 @@ import { FC, PropsWithChildren } from 'react';
|
|
|
2
2
|
import { PropsWithClassName, PropsWithElementType } from '../../lib/types/props';
|
|
3
3
|
type GapSize = "s" | "m" | "l" | "xl";
|
|
4
4
|
export interface ColumnLayoutProps extends PropsWithChildren, PropsWithElementType<"div" | "ul">, PropsWithClassName {
|
|
5
|
+
/** Column layout for container size s. */
|
|
5
6
|
s?: number[];
|
|
7
|
+
/** Column layout for container size m. */
|
|
6
8
|
m?: number[];
|
|
9
|
+
/** Column layout for container size l. */
|
|
7
10
|
l?: number[];
|
|
11
|
+
/**
|
|
12
|
+
* Size of the row and column gap between the content blocks inside the column
|
|
13
|
+
* layout.
|
|
14
|
+
*
|
|
15
|
+
* @default "m"
|
|
16
|
+
*/
|
|
8
17
|
gap?: GapSize;
|
|
18
|
+
/** Size of the row gap between the content blocks inside the column layout. */
|
|
9
19
|
rowGap?: GapSize;
|
|
20
|
+
/** Size of the column gap between the content blocks inside the column layout. */
|
|
10
21
|
columnGap?: GapSize;
|
|
11
22
|
}
|
|
12
23
|
export declare const ColumnLayout: FC<ColumnLayoutProps>;
|
|
@@ -4,7 +4,9 @@ import { PopoverProps } from '../Popover';
|
|
|
4
4
|
import { MenuItemProps } from '../MenuItem';
|
|
5
5
|
import * as Aria from "react-aria-components";
|
|
6
6
|
export interface ContextMenuProps extends Omit<PopoverProps, "withTip">, Pick<Aria.MenuProps<MenuItemProps>, "onAction" | "selectedKeys" | "defaultSelectedKeys" | "onSelectionChange" | "disabledKeys">, FlowComponentProps {
|
|
7
|
+
/** The type of selection that is allowed in the context menu. */
|
|
7
8
|
selectionMode?: "single" | "multiple" | "navigation";
|
|
9
|
+
/** Sets the context menu to a fixed width. */
|
|
8
10
|
width?: string | number;
|
|
9
11
|
}
|
|
10
12
|
export declare const ContextMenu: React.ForwardRefExoticComponent<ContextMenuProps & React.RefAttributes<never>>;
|
|
@@ -2,6 +2,7 @@ import { ReactNode, default as React } from 'react';
|
|
|
2
2
|
import { ButtonProps } from '../Button';
|
|
3
3
|
import { FlowComponentProps } from '../../lib/componentFactory/flowComponent';
|
|
4
4
|
export interface CopyButtonProps extends Omit<ButtonProps, "onPress" | "aria-label" | "render">, FlowComponentProps {
|
|
5
|
+
/** The text to copy. */
|
|
5
6
|
text: ReactNode;
|
|
6
7
|
}
|
|
7
8
|
export declare const CopyButton: React.ForwardRefExoticComponent<CopyButtonProps & React.RefAttributes<never>>;
|
|
@@ -2,6 +2,7 @@ import { default as React } from 'react';
|
|
|
2
2
|
import { PropsWithElementType } from '../../lib/types/props';
|
|
3
3
|
import { FlowComponentProps } from '../../lib/componentFactory/flowComponent';
|
|
4
4
|
export interface CounterBadgeProps extends PropsWithElementType<"span">, FlowComponentProps {
|
|
5
|
+
/** The number displayed inside the badge. */
|
|
5
6
|
count?: number;
|
|
6
7
|
}
|
|
7
8
|
export declare const CounterBadge: React.ForwardRefExoticComponent<CounterBadgeProps & React.RefAttributes<never>>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { PropsWithChildren, ReactNode, default as React } from 'react';
|
|
2
2
|
import * as Aria from "react-aria-components";
|
|
3
3
|
export interface DatePickerProps<T extends Aria.DateValue> extends PropsWithChildren<Omit<Aria.DatePickerProps<T>, "children">> {
|
|
4
|
+
/** The error message that is displayed below the input. */
|
|
4
5
|
errorMessage?: ReactNode;
|
|
5
6
|
}
|
|
6
7
|
export declare const DatePicker: React.ForwardRefExoticComponent<DatePickerProps<Aria.DateValue> & React.RefAttributes<never>>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { PropsWithChildren, ReactNode, default as React } from 'react';
|
|
2
2
|
import * as Aria from "react-aria-components";
|
|
3
3
|
export interface DateRangePickerProps<T extends Aria.DateValue> extends PropsWithChildren<Omit<Aria.DateRangePickerProps<T>, "children">> {
|
|
4
|
+
/** The error message that is displayed below the input. */
|
|
4
5
|
errorMessage?: ReactNode;
|
|
5
6
|
}
|
|
6
7
|
export declare const DateRangePicker: React.ForwardRefExoticComponent<DateRangePickerProps<Aria.DateValue> & React.RefAttributes<never>>;
|
|
@@ -2,10 +2,15 @@ import { default as React } from 'react';
|
|
|
2
2
|
import { PropsWithClassName, PropsWithElementType } from '../../lib/types/props';
|
|
3
3
|
import { LinkProps } from '../Link';
|
|
4
4
|
export interface FileCardProps extends PropsWithClassName, PropsWithElementType<"div" | "li">, Pick<LinkProps, "onPress" | "href" | "target" | "download"> {
|
|
5
|
+
/** The name of the file. */
|
|
5
6
|
name: string;
|
|
7
|
+
/** The type of the file. */
|
|
6
8
|
type?: string;
|
|
9
|
+
/** Handler that is called when the file cards delete button is clicked. */
|
|
7
10
|
onDelete?: () => void;
|
|
11
|
+
/** The size of the file in bytes. */
|
|
8
12
|
sizeInBytes?: number;
|
|
13
|
+
/** The source of an image file. */
|
|
9
14
|
imageSrc?: string;
|
|
10
15
|
}
|
|
11
16
|
export declare const FileCard: React.ForwardRefExoticComponent<FileCardProps & React.RefAttributes<never>>;
|
|
@@ -3,6 +3,7 @@ import { FileInputOnChangeHandler } from './components/FileInput';
|
|
|
3
3
|
import { FlowComponentProps } from '../../lib/componentFactory/flowComponent';
|
|
4
4
|
import type * as Aria from "react-aria-components";
|
|
5
5
|
export interface FileFieldProps extends PropsWithChildren, FlowComponentProps, Pick<Aria.InputProps, "accept" | "multiple" | "name">, Pick<Aria.TextFieldProps, "isRequired" | "isInvalid" | "validationBehavior" | "isDisabled"> {
|
|
6
|
+
/** Handler that is called when the file input changes. */
|
|
6
7
|
onChange?: FileInputOnChangeHandler;
|
|
7
8
|
}
|
|
8
9
|
export declare const FileField: React.ForwardRefExoticComponent<FileFieldProps & React.RefAttributes<never>>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ComponentProps, FC, PropsWithChildren } from 'react';
|
|
2
2
|
import { PropsWithClassName } from '../../lib/types/props';
|
|
3
3
|
export interface HeaderNavigationProps extends PropsWithChildren<ComponentProps<"nav">>, PropsWithClassName {
|
|
4
|
-
/** @default "primary" */
|
|
4
|
+
/** The color of the header navigation. @default "primary" */
|
|
5
5
|
color?: "primary" | "dark" | "light";
|
|
6
6
|
}
|
|
7
7
|
export declare const HeaderNavigation: FC<HeaderNavigationProps>;
|
|
@@ -2,8 +2,9 @@ import { default as React } from 'react';
|
|
|
2
2
|
import { FlowComponentProps } from '../../lib/componentFactory/flowComponent';
|
|
3
3
|
import * as Aria from "react-aria-components";
|
|
4
4
|
export interface HeadingProps extends Aria.HeadingProps, FlowComponentProps {
|
|
5
|
+
/** The font size of the heading. */
|
|
5
6
|
size?: "xs" | "s" | "m" | "l" | "xl" | "xxl";
|
|
6
|
-
/** @default "primary" */
|
|
7
|
+
/** The color of the heading. @default "primary" */
|
|
7
8
|
color?: "primary" | "dark" | "light";
|
|
8
9
|
}
|
|
9
10
|
export declare const Heading: React.ForwardRefExoticComponent<HeadingProps & React.RefAttributes<never>>;
|
|
@@ -2,7 +2,7 @@ import { PropsWithChildren, SVGAttributes, default as React } from 'react';
|
|
|
2
2
|
import { FlowComponentProps } from '../../lib/componentFactory/flowComponent';
|
|
3
3
|
type SvgAttributeProps = SVGAttributes<SVGSVGElement>;
|
|
4
4
|
export interface IconProps extends PropsWithChildren<Omit<SvgAttributeProps, "name">>, FlowComponentProps {
|
|
5
|
-
/** @default "m" */
|
|
5
|
+
/** The size of the icon. @default "m" */
|
|
6
6
|
size?: "s" | "m" | "l";
|
|
7
7
|
}
|
|
8
8
|
export declare const Icon: React.ForwardRefExoticComponent<IconProps & React.RefAttributes<never>>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ComponentProps, FC, PropsWithChildren } from 'react';
|
|
2
2
|
export interface IllustratedMessageProps extends PropsWithChildren<ComponentProps<"div">> {
|
|
3
|
-
/** @default "primary" */
|
|
3
|
+
/** The color of the illustrated message. @default "primary" */
|
|
4
4
|
color?: "primary" | "danger" | "light" | "dark";
|
|
5
5
|
}
|
|
6
6
|
export declare const IllustratedMessage: FC<IllustratedMessageProps>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ComponentProps, FC, PropsWithChildren } from 'react';
|
|
2
2
|
export interface InlineCodeProps extends PropsWithChildren<ComponentProps<"code">> {
|
|
3
|
+
/** The color schema of the inline code component. */
|
|
3
4
|
color?: "default" | "light" | "dark";
|
|
4
5
|
}
|
|
5
6
|
export declare const InlineCode: FC<InlineCodeProps>;
|
|
@@ -2,7 +2,9 @@ import { PropsWithChildren, default as React } from 'react';
|
|
|
2
2
|
import { FlowComponentProps } from '../../lib/componentFactory/flowComponent';
|
|
3
3
|
import * as Aria from "react-aria-components";
|
|
4
4
|
export interface LabelProps extends PropsWithChildren<Omit<Aria.LabelProps, "children">>, FlowComponentProps {
|
|
5
|
+
/** Whether the label should show an "optional" indicator. */
|
|
5
6
|
optional?: boolean;
|
|
7
|
+
/** Whether the label should be displayed as disabled. */
|
|
6
8
|
isDisabled?: boolean;
|
|
7
9
|
}
|
|
8
10
|
export declare const Label: React.ForwardRefExoticComponent<LabelProps & React.RefAttributes<never>>;
|
|
@@ -3,7 +3,12 @@ import { PropsWithChildren, default as React } from 'react';
|
|
|
3
3
|
import { PropsWithClassName } from '../../lib/types/props';
|
|
4
4
|
import { OverlayController } from '../../lib/controller';
|
|
5
5
|
export interface LightBoxProps extends PropsWithChildren, FlowComponentProps, PropsWithClassName {
|
|
6
|
+
/** An overlay controller to control the light box state. */
|
|
6
7
|
controller?: OverlayController;
|
|
8
|
+
/**
|
|
9
|
+
* Whether content can be displayed larger than the available space in the
|
|
10
|
+
* screen. @default true
|
|
11
|
+
*/
|
|
7
12
|
fitScreen?: boolean;
|
|
8
13
|
}
|
|
9
14
|
export declare const LightBox: React.ForwardRefExoticComponent<LightBoxProps & React.RefAttributes<never>>;
|
|
@@ -3,9 +3,11 @@ import { FlowComponentProps } from '../../lib/componentFactory/flowComponent';
|
|
|
3
3
|
import { PropsWithClassName } from '../../lib/types/props';
|
|
4
4
|
import * as Aria from "react-aria-components";
|
|
5
5
|
export interface LinkProps extends PropsWithChildren<Omit<Aria.LinkProps, "children" | "slot" | "className">>, FlowComponentProps, PropsWithClassName {
|
|
6
|
+
/** Whether the link should be styled for being displayed inside a text. */
|
|
6
7
|
inline?: boolean;
|
|
8
|
+
/** An alternative link component. */
|
|
7
9
|
linkComponent?: ComponentType<Omit<ComponentProps<"a">, "ref">>;
|
|
8
|
-
/** @default "primary" */
|
|
10
|
+
/** The color of the link. @default "primary" */
|
|
9
11
|
color?: "primary" | "dark" | "light";
|
|
10
12
|
"aria-current"?: string;
|
|
11
13
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { PropsWithChildren, default as React } from 'react';
|
|
2
2
|
import { ListShape } from './model/types';
|
|
3
3
|
export interface ListProps<T> extends PropsWithChildren, Omit<ListShape<T>, "search" | "loader" | "itemView" | "table" | "batchesController" | "filters" | "sorting"> {
|
|
4
|
+
/** The number of items to be displayed on one page. */
|
|
4
5
|
batchSize?: number;
|
|
5
6
|
}
|
|
6
7
|
export declare const List: React.ForwardRefExoticComponent<ListProps<never> & React.RefAttributes<never>>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
2
|
import { Options } from 'react-markdown';
|
|
3
3
|
export interface MarkdownProps extends Omit<Options, "components"> {
|
|
4
|
+
/** The color schema of the markdown component. */
|
|
4
5
|
color?: "dark" | "light" | "default";
|
|
5
6
|
}
|
|
6
7
|
export declare const Markdown: FC<MarkdownProps>;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { FC, PropsWithChildren } from 'react';
|
|
2
2
|
import { PropsWithClassName } from '../../lib/types/props';
|
|
3
3
|
export interface MessageProps extends PropsWithChildren, PropsWithClassName {
|
|
4
|
-
/** @default "sender" */
|
|
4
|
+
/** Determines the color of the message. @default "sender" */
|
|
5
5
|
type?: "responder" | "sender";
|
|
6
|
+
/** The orientation of the chat message. */
|
|
6
7
|
orientation?: "left" | "right";
|
|
7
8
|
}
|
|
8
9
|
export declare const Message: FC<MessageProps>;
|
|
@@ -3,12 +3,23 @@ import { OverlayController } from '../../lib/controller/overlay';
|
|
|
3
3
|
import { FlowComponentProps } from '../../lib/componentFactory/flowComponent';
|
|
4
4
|
import { PropsWithClassName } from '../../lib/types/props';
|
|
5
5
|
export interface ModalProps extends PropsWithChildren, FlowComponentProps, PropsWithClassName {
|
|
6
|
-
/** @default "s" */
|
|
6
|
+
/** The size of the modal. @default "s" */
|
|
7
7
|
size?: "s" | "m";
|
|
8
|
+
/** Whether the modal should be displayed as an off canvas. */
|
|
8
9
|
offCanvas?: boolean;
|
|
10
|
+
/**
|
|
11
|
+
* Whether the off canvas should be displayed on the right or left side of the
|
|
12
|
+
* screen. @default "right"
|
|
13
|
+
*/
|
|
9
14
|
offCanvasOrientation?: "left" | "right";
|
|
15
|
+
/** An overlay controller to control the modal state. */
|
|
10
16
|
controller?: OverlayController;
|
|
17
|
+
/**
|
|
18
|
+
* Accepts "actionConfirm" to use the modal as a confirmation modal for an
|
|
19
|
+
* action.
|
|
20
|
+
*/
|
|
11
21
|
slot?: string;
|
|
22
|
+
/** Whether the modal can be closed by clicking outside of it. */
|
|
12
23
|
isDismissable?: boolean;
|
|
13
24
|
}
|
|
14
25
|
export declare const Modal: React.ForwardRefExoticComponent<ModalProps & React.RefAttributes<never>>;
|
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
import { ComponentProps, FC, PropsWithChildren } from 'react';
|
|
2
2
|
import { PropsWithStatus } from '../../lib/types/props';
|
|
3
3
|
export interface NotificationProps extends PropsWithChildren<ComponentProps<"div">>, PropsWithStatus {
|
|
4
|
+
/** A link that is triggered when clicking the notification. */
|
|
4
5
|
href?: string;
|
|
6
|
+
/** Whether the notification should disappear automatically after some time. */
|
|
5
7
|
autoClose?: boolean;
|
|
8
|
+
/** Handler that is called when the notification is clicked. */
|
|
6
9
|
onClick?: () => void;
|
|
10
|
+
/**
|
|
11
|
+
* Handler that is called when the close button of the notification is
|
|
12
|
+
* clicked.
|
|
13
|
+
*/
|
|
7
14
|
onClose?: () => void;
|
|
8
15
|
}
|
|
9
16
|
export declare const Notification: FC<NotificationProps>;
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import { FC, PropsWithChildren } from 'react';
|
|
2
2
|
import { OverlayController } from '../../lib/controller';
|
|
3
|
-
|
|
3
|
+
import { PropsWithClassName } from '../../lib/types/props';
|
|
4
|
+
export interface OverlayProps extends PropsWithChildren, PropsWithClassName {
|
|
5
|
+
/** The controller to control the overlay state. */
|
|
4
6
|
controller?: OverlayController;
|
|
7
|
+
/** Whether the overlay can be closed by clicking outside of it. */
|
|
5
8
|
isDismissable?: boolean;
|
|
6
|
-
|
|
9
|
+
/** Whether the overlay is a modal or a light box. */
|
|
7
10
|
overlayType?: "Modal" | "LightBox";
|
|
8
11
|
}
|
|
9
12
|
export declare const Overlay: FC<OverlayProps>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ComponentType, FC, ReactNode } from 'react';
|
|
1
|
+
import { ComponentType, FC, PropsWithChildren, ReactNode } from 'react';
|
|
2
2
|
import { OverlayController } from '../../lib/controller';
|
|
3
3
|
import { FlowComponentName } from '../propTypes';
|
|
4
4
|
import { FlowComponentProps } from '../../lib/componentFactory/flowComponent';
|
|
@@ -6,9 +6,10 @@ type AriaComponentType = ComponentType<{
|
|
|
6
6
|
isOpen?: boolean;
|
|
7
7
|
children: ReactNode;
|
|
8
8
|
}>;
|
|
9
|
-
export interface OverlayTriggerProps extends FlowComponentProps {
|
|
9
|
+
export interface OverlayTriggerProps extends FlowComponentProps, PropsWithChildren {
|
|
10
|
+
/** Whether the overlay should be open initially. */
|
|
10
11
|
isDefaultOpen?: boolean;
|
|
11
|
-
|
|
12
|
+
/** A controller to control the state of the overlay. */
|
|
12
13
|
controller?: OverlayController;
|
|
13
14
|
}
|
|
14
15
|
interface Props extends OverlayTriggerProps {
|
|
@@ -2,11 +2,18 @@ import { PropsWithChildren, default as React } from 'react';
|
|
|
2
2
|
import { OverlayController } from '../../lib/controller';
|
|
3
3
|
import * as Aria from "react-aria-components";
|
|
4
4
|
export interface PopoverProps extends PropsWithChildren<Omit<Aria.PopoverProps, "children">> {
|
|
5
|
+
/**
|
|
6
|
+
* Whether the popover should display a tip, pointing towards the trigger
|
|
7
|
+
* element.
|
|
8
|
+
*/
|
|
5
9
|
withTip?: boolean;
|
|
10
|
+
/** Whether the popover contains a dialog. */
|
|
6
11
|
isDialogContent?: boolean;
|
|
12
|
+
/** An overlay controller to control the popover state. */
|
|
7
13
|
controller?: OverlayController;
|
|
14
|
+
/** A fixed width for the popover. */
|
|
8
15
|
width?: string | number;
|
|
9
|
-
/** @default "m" */
|
|
16
|
+
/** The popovers padding. @default "m" */
|
|
10
17
|
padding?: "s" | "m";
|
|
11
18
|
}
|
|
12
19
|
export declare const Popover: React.ForwardRefExoticComponent<PopoverProps & React.RefAttributes<never>>;
|
|
@@ -2,8 +2,9 @@ import { FC, PropsWithChildren } from 'react';
|
|
|
2
2
|
import { PropsWithStatus } from '../../lib/types/props';
|
|
3
3
|
import * as Aria from "react-aria-components";
|
|
4
4
|
export interface ProgressBarProps extends PropsWithChildren<Omit<Aria.ProgressBarProps, "children">>, PropsWithStatus {
|
|
5
|
+
/** Whether the max value should be displayed. */
|
|
5
6
|
showMaxValue?: boolean;
|
|
6
|
-
/** @default "m" */
|
|
7
|
+
/** The size variant of the progress bar @default "m" */
|
|
7
8
|
size?: "s" | "m";
|
|
8
9
|
}
|
|
9
10
|
export declare const ProgressBar: FC<ProgressBarProps>;
|
|
@@ -6,7 +6,9 @@ import * as Aria from "react-aria-components";
|
|
|
6
6
|
export interface SelectProps extends PropsWithChildren<Omit<Aria.SelectProps<{
|
|
7
7
|
example: string;
|
|
8
8
|
}>, "children" | "className">>, FlowComponentProps, PropsWithClassName {
|
|
9
|
+
/** Handler that is called when the selected value changes. */
|
|
9
10
|
onChange?: (value: string | number) => void;
|
|
11
|
+
/** An overlay controller to control the select option popover state. */
|
|
10
12
|
controller?: OverlayController;
|
|
11
13
|
}
|
|
12
14
|
export declare const Select: React.ForwardRefExoticComponent<SelectProps & React.RefAttributes<never>>;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { ComponentProps, FC } from 'react';
|
|
2
2
|
export interface SkeletonProps extends ComponentProps<"div"> {
|
|
3
|
+
/** The width of the skeleton. */
|
|
3
4
|
width?: string;
|
|
5
|
+
/** The height of the skeleton. */
|
|
4
6
|
height?: string;
|
|
5
7
|
}
|
|
6
8
|
export declare const Skeleton: FC<SkeletonProps>;
|
|
@@ -2,7 +2,10 @@ import { PropsWithChildren, default as React } from 'react';
|
|
|
2
2
|
import { FlowComponentProps } from '../../lib/componentFactory/flowComponent';
|
|
3
3
|
import * as Aria from "react-aria-components";
|
|
4
4
|
export interface SwitchProps extends PropsWithChildren<Omit<Aria.SwitchProps, "children">>, FlowComponentProps {
|
|
5
|
-
/**
|
|
5
|
+
/**
|
|
6
|
+
* Whether the label should appear before or after the switch. @default
|
|
7
|
+
* "trailing"
|
|
8
|
+
*/
|
|
6
9
|
labelPosition?: "leading" | "trailing";
|
|
7
10
|
}
|
|
8
11
|
export declare const Switch: React.ForwardRefExoticComponent<SwitchProps & React.RefAttributes<never>>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
2
|
import * as Aria from "react-aria-components";
|
|
3
3
|
export type TableProps = Aria.TableProps & {
|
|
4
|
+
/** The vertical alignment of the table cells content. */
|
|
4
5
|
verticalAlign?: "top" | "middle";
|
|
5
6
|
};
|
|
6
7
|
export declare const Table: FC<TableProps>;
|
|
@@ -3,6 +3,10 @@ import { TextFieldBaseProps } from '../TextFieldBase';
|
|
|
3
3
|
import { FlowComponentProps } from '../../lib/componentFactory/flowComponent';
|
|
4
4
|
import * as Aria from "react-aria-components";
|
|
5
5
|
export interface TextAreaProps extends Omit<TextFieldBaseProps, "input">, Pick<Aria.TextAreaProps, "placeholder" | "rows">, FlowComponentProps {
|
|
6
|
+
/**
|
|
7
|
+
* Whether the text area should grow if its content gets longer than its
|
|
8
|
+
* initial height.
|
|
9
|
+
*/
|
|
6
10
|
autoResizeMaxRows?: number;
|
|
7
11
|
}
|
|
8
12
|
export declare const TextArea: React.ForwardRefExoticComponent<TextAreaProps & React.RefAttributes<never>>;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { PropsWithChildren, ReactNode, default as React } from 'react';
|
|
2
2
|
import * as Aria from "react-aria-components";
|
|
3
3
|
export interface TextFieldBaseProps extends PropsWithChildren<Omit<Aria.TextFieldProps, "children">> {
|
|
4
|
+
/** The input element */
|
|
4
5
|
input: ReactNode;
|
|
6
|
+
/** Whether a character count should be displayed inside the field description. */
|
|
5
7
|
showCharacterCount?: boolean;
|
|
6
8
|
}
|
|
7
9
|
export declare const TextFieldBase: React.ForwardRefExoticComponent<TextFieldBaseProps & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { PropsWithChildren, ReactNode, default as React } from 'react';
|
|
2
2
|
import * as Aria from "react-aria-components";
|
|
3
3
|
export interface TimeFieldProps<T extends Aria.TimeValue> extends PropsWithChildren<Omit<Aria.TimeFieldProps<T>, "children">> {
|
|
4
|
+
/** An error message to be displayed below the field */
|
|
4
5
|
errorMessage?: ReactNode;
|
|
5
6
|
}
|
|
6
7
|
export declare const TimeField: React.ForwardRefExoticComponent<TimeFieldProps<Aria.TimeValue> & React.RefAttributes<never>>;
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { ExoticComponent, HTMLAttributes, ReactHTML } from 'react';
|
|
2
2
|
export type Status = "info" | "success" | "warning" | "danger";
|
|
3
3
|
export type PropsWithStatus<T extends Status = Status, P = unknown> = P & {
|
|
4
|
+
/** The elements status */
|
|
4
5
|
status?: T;
|
|
5
6
|
};
|
|
6
7
|
export interface PropsWithTunnel {
|
|
7
8
|
}
|
|
8
9
|
export interface PropsWithClassName {
|
|
10
|
+
/** The elements class name. */
|
|
9
11
|
className?: string;
|
|
10
12
|
}
|
|
11
13
|
export type PropsWithElementType<T extends keyof ReactHTML = never> = HTMLAttributes<HTMLElement> & {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mittwald/flow-react-components",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.387",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A React implementation of Flow, mittwald’s design system",
|
|
6
6
|
"homepage": "https://mittwald.github.io/flow",
|
|
@@ -425,7 +425,7 @@
|
|
|
425
425
|
"@chakra-ui/live-region": "^2.1.0",
|
|
426
426
|
"@internationalized/date": "^3.6.0",
|
|
427
427
|
"@internationalized/string-compiler": "^3.2.6",
|
|
428
|
-
"@mittwald/react-tunnel": "^0.1.0-alpha.
|
|
428
|
+
"@mittwald/react-tunnel": "^0.1.0-alpha.387",
|
|
429
429
|
"@mittwald/react-use-promise": "^2.6.0",
|
|
430
430
|
"@react-aria/form": "^3.0.11",
|
|
431
431
|
"@react-aria/utils": "^3.26.0",
|
|
@@ -456,7 +456,7 @@
|
|
|
456
456
|
},
|
|
457
457
|
"devDependencies": {
|
|
458
458
|
"@faker-js/faker": "^9.2.0",
|
|
459
|
-
"@mittwald/flow-design-tokens": "^0.1.0-alpha.
|
|
459
|
+
"@mittwald/flow-design-tokens": "^0.1.0-alpha.387",
|
|
460
460
|
"@mittwald/react-use-promise": "^2.6.0",
|
|
461
461
|
"@nx/storybook": "^20.1.3",
|
|
462
462
|
"@storybook/addon-a11y": "^8.4.5",
|
|
@@ -551,5 +551,5 @@
|
|
|
551
551
|
}
|
|
552
552
|
}
|
|
553
553
|
},
|
|
554
|
-
"gitHead": "
|
|
554
|
+
"gitHead": "4242fa57c7f347ac78a11b3b43dc9eced1e2b142"
|
|
555
555
|
}
|