@mittwald/flow-react-components 0.1.0-alpha.176 → 0.1.0-alpha.178
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/dist/{Accordion-O-Jl-Hbg.js → Accordion-D6IGGC6n.js} +3 -3
- package/dist/Accordion.js +1 -1
- package/dist/{Action-Cv3knooL.js → Action-DZ-dUjY_.js} +1 -1
- package/dist/Action.js +1 -1
- package/dist/ActionGroup.js +1 -1
- package/dist/Avatar.js +1 -1
- package/dist/Breadcrumb.js +2 -2
- package/dist/{Button-Dh-FA0K8.js → Button-BRmT11B1.js} +5 -5
- package/dist/Button.js +1 -1
- package/dist/{Checkbox-Loys48Py.js → Checkbox-DpsQsjyp.js} +4 -4
- package/dist/Checkbox.js +1 -1
- package/dist/{CheckboxButton-CLN_ayxn.js → CheckboxButton-D5pCUqHX.js} +2 -2
- package/dist/CheckboxButton.js +1 -1
- package/dist/CheckboxGroup.js +6 -6
- package/dist/{Content-D-V-g5Ba.js → Content-DbQrGIyx.js} +1 -1
- package/dist/Content.js +1 -1
- package/dist/ContextMenu.js +3 -3
- package/dist/{ContextMenu.module-BfwGh62L.js → ContextMenu.module-BZingr2B.js} +3 -3
- package/dist/{ContextMenuTrigger-B8ZhwBtd.js → ContextMenuTrigger-DuiGa0Zj.js} +13 -12
- package/dist/ContextualHelp.js +4 -4
- package/dist/CopyButton.js +5 -5
- package/dist/CounterBadge.js +1 -1
- package/dist/{FieldDescription-UlaeRaWw.js → FieldDescription-BODxBmfa.js} +2 -2
- package/dist/FieldDescription.js +1 -1
- package/dist/{FieldError-CZPQzNSz.js → FieldError-BZeDqyag.js} +3 -3
- package/dist/FieldError.js +1 -1
- package/dist/{FormField.module-DHK6nIcD.js → FormField.module-CqWpTQKP.js} +1 -1
- package/dist/{Header-CDc5qD5M.js → Header-Bq7WZg8g.js} +1 -1
- package/dist/Header.js +1 -1
- package/dist/{Heading-BkHvZG9C.js → Heading-1M1gRZfk.js} +1 -1
- package/dist/Heading.js +1 -1
- package/dist/{Icon-N96KD633.js → Icon-BCN5qdXA.js} +1 -1
- package/dist/Icon.js +1 -1
- package/dist/{IconCheck-CNdrJb3W.js → IconCheck-BYubSDLL.js} +1 -1
- package/dist/{IconCheckboxEmpty-Bnof97E6.js → IconCheckboxEmpty-FQyDmq2k.js} +1 -1
- package/dist/{IconCheckboxIndeterminate-I0e87J_L.js → IconCheckboxIndeterminate-DBBytCg7.js} +1 -1
- package/dist/{IconChevronDown-H4ANoHQh.js → IconChevronDown-d3q78pVs.js} +1 -1
- package/dist/{IconChevronRight-BcvVk4gi.js → IconChevronRight-DLHldFgq.js} +1 -1
- package/dist/{IconChevronUp-DGairnIU.js → IconChevronUp-D62-9iee.js} +1 -1
- package/dist/{IconClose-B9Tmq1hI.js → IconClose-9DrWhSP2.js} +1 -1
- package/dist/{IconContextMenu-BbFVCu4A.js → IconContextMenu-Cy6_2TgT.js} +1 -1
- package/dist/{IconCopy-DdwkwK5i.js → IconCopy-C3V1hvRq.js} +1 -1
- package/dist/{IconDanger-29U5NbR-.js → IconDanger-B4gH_wD5.js} +1 -1
- package/dist/{IconInfo-DThm-qJW.js → IconInfo-CtOUGSwO.js} +1 -1
- package/dist/{IconPending-DY8n9LcJ.js → IconPending-7zAFcMDq.js} +1 -1
- package/dist/{IconPlus-z8tyCb_p.js → IconPlus-BVE-NWUJ.js} +1 -1
- package/dist/{IconRadioOn-CnchpCt3.js → IconRadioOn-hKPuJBpt.js} +1 -1
- package/dist/{IconSearch-BdmeRdRR.js → IconSearch-Bxe-heXD.js} +1 -1
- package/dist/{IconSucceeded-BviPRC9T.js → IconSucceeded-BXmn4l1i.js} +1 -1
- package/dist/{IconWarning-DlSgqOij.js → IconWarning-C_OvWQWl.js} +1 -1
- package/dist/Icons.js +18 -18
- package/dist/Image.js +1 -1
- package/dist/Initials.js +1 -1
- package/dist/InlineAlert.js +2 -2
- package/dist/InlineCode.js +15 -3
- package/dist/{Label-DeWqZ-Tg.js → Label-RMBiypQZ.js} +1 -1
- package/dist/Label.js +1 -1
- package/dist/LayoutCard.js +1 -1
- package/dist/{Link-BoQ8K6ao.js → Link-IBPoxx55.js} +1 -1
- package/dist/Link.js +1 -1
- package/dist/List.js +482 -374
- package/dist/{LoadingSpinner-BYjfjRAx.js → LoadingSpinner-D8TQ918m.js} +2 -2
- package/dist/LoadingSpinner.js +1 -1
- package/dist/{MenuItem-DvOltniq.js → MenuItem-Cb7EDu-b.js} +5 -5
- package/dist/MenuItem.js +1 -1
- package/dist/Modal.js +6 -6
- package/dist/Navigation.js +2 -2
- package/dist/Notification.js +5 -5
- package/dist/NumberField.js +22 -22
- package/dist/Popover-D-W1fcm7.js +46 -0
- package/dist/Popover.js +1 -1
- package/dist/RadioGroup.js +16 -16
- package/dist/Section.js +26 -22
- package/dist/Select.js +14 -14
- package/dist/Skeleton-CgOx_15R.js +14 -0
- package/dist/Skeleton.js +1 -1
- package/dist/Slider.js +4 -4
- package/dist/StatusBadge.js +3 -3
- package/dist/{StatusIcon-DiPKxCw-.js → StatusIcon-B3uPCHqB.js} +4 -4
- package/dist/StatusIcon.js +1 -1
- package/dist/Switch.js +9 -9
- package/dist/Tabs.js +7 -7
- package/dist/{Text-DMctOg-g.js → Text-SLaOJhzj.js} +1 -1
- package/dist/Text.js +1 -1
- package/dist/TextArea.js +2 -2
- package/dist/TextField-DhdMjRzb.js +27 -0
- package/dist/TextField.js +3 -24
- package/dist/{TextFieldBase-CjN1n7TY.js → TextFieldBase-Duo_ZSZk.js} +10 -10
- package/dist/{flowComponent-CuEuCXRI.js → flowComponent-CwV0a4FM.js} +1 -0
- package/dist/hooks.js +5 -10
- package/dist/react-hook-form.js +2 -2
- package/dist/styles.css +1 -1
- package/dist/types/components/List/List.d.ts +4 -2
- package/dist/types/components/List/components/Footer/{PaginationInfos → components/PaginationInfos}/PaginationInfos.d.ts +1 -1
- package/dist/types/components/List/components/Footer/{ShowNextBatchButton → components/ShowNextBatchButton}/ShowNextBatchButton.d.ts +1 -1
- package/dist/types/components/List/components/Header/{Header/Header.d.ts → Header.d.ts} +1 -1
- package/dist/types/components/List/components/Header/{FilterPicker → components/FilterPicker}/FilterPicker.d.ts +1 -1
- package/dist/types/components/List/components/Header/components/SearchField/SearchField.d.ts +9 -0
- package/dist/types/components/List/components/Header/components/SearchField/index.d.ts +4 -0
- package/dist/types/components/List/components/Header/{SortingPickerItem → components/SortingPickerItem}/SortingPickerItem.d.ts +1 -1
- package/dist/types/components/List/components/Items/Items.d.ts +6 -0
- package/dist/types/components/List/components/Items/components/EmptyView/EmptyView.d.ts +3 -0
- package/dist/types/components/List/components/Items/components/FallbackItems/FallbackItems.d.ts +3 -0
- package/dist/types/components/List/components/Items/components/Item/Item.d.ts +8 -0
- package/dist/types/components/List/components/Items/{OptionsButton → components/Item/components/OptionsButton}/OptionsButton.d.ts +1 -1
- package/dist/types/components/List/components/Items/components/Item/components/SkeletonView/SkeletonView.d.ts +3 -0
- package/dist/types/components/List/components/Items/components/Item/components/View/View.d.ts +6 -0
- package/dist/types/components/List/components/Items/components/Item/components/View/index.d.ts +4 -0
- package/dist/types/components/List/components/Items/components/Item/index.d.ts +4 -0
- package/dist/types/components/List/components/Items/index.d.ts +4 -0
- package/dist/types/components/List/index.d.ts +7 -9
- package/dist/types/components/List/model/List.d.ts +6 -3
- package/dist/types/components/List/model/ReactTable.d.ts +2 -0
- package/dist/types/components/List/model/item/Item.d.ts +0 -3
- package/dist/types/components/List/model/item/ItemCollection.d.ts +1 -2
- package/dist/types/components/List/model/item/ItemView.d.ts +22 -0
- package/dist/types/components/List/model/loading/types.d.ts +2 -0
- package/dist/types/components/List/model/pagination/BatchesController.d.ts +2 -3
- package/dist/types/components/List/model/search/Search.d.ts +14 -0
- package/dist/types/components/List/model/search/types.d.ts +13 -0
- package/dist/types/components/List/model/types.d.ts +5 -2
- package/dist/types/components/List/{components/Header → setupComponents}/ListFilter.d.ts +2 -2
- package/dist/types/components/List/setupComponents/ListItem.d.ts +10 -0
- package/dist/types/components/List/setupComponents/ListSearch.d.ts +9 -0
- package/dist/types/components/List/{components/Header → setupComponents}/ListSorting.d.ts +1 -1
- package/dist/types/components/List/stories/Default.stories.d.ts +0 -1
- package/dist/types/components/List/stories/ListItem.stories.d.ts +0 -2
- package/dist/types/components/List/testData/domainApi.d.ts +1 -0
- package/dist/types/components/List/typedList.d.ts +9 -5
- package/dist/types/components/Popover/Popover.d.ts +2 -0
- package/dist/types/components/propTypes/index.d.ts +2 -0
- package/dist/types/lib/controller/overlay/context.d.ts +1 -0
- package/dist/types/lib/propsContext/propsContext.d.ts +2 -0
- package/dist/types/lib/slotContext/slotContext.d.ts +1 -0
- package/dist/useOnChange-C1Quwyuz.js +12 -0
- package/package.json +4 -4
- package/dist/InlineCode-BT-PKxVv.js +0 -18
- package/dist/Popover-C2uIpso8.js +0 -44
- package/dist/Skeleton-CKLaTmDR.js +0 -22
- package/dist/types/components/List/components/Items/ItemList/ItemList.d.ts +0 -6
- package/dist/types/components/List/components/Items/ItemList/index.d.ts +0 -4
- package/dist/types/components/List/components/Items/ItemSkeleton/ItemSkeleton.d.ts +0 -3
- package/dist/types/components/List/components/Items/ListItem/FallbackRenderer.d.ts +0 -7
- package/dist/types/components/List/components/Items/ListItem/ListItem.d.ts +0 -7
- package/dist/types/components/List/components/Items/ListItem/index.d.ts +0 -4
- package/dist/types/components/List/components/Items/ListItemView.d.ts +0 -9
- /package/dist/types/components/List/components/Footer/{Footer/Footer.d.ts → Footer.d.ts} +0 -0
- /package/dist/types/components/List/components/Footer/{PaginationInfos → components/PaginationInfos}/index.d.ts +0 -0
- /package/dist/types/components/List/components/Footer/{ShowNextBatchButton → components/ShowNextBatchButton}/index.d.ts +0 -0
- /package/dist/types/components/List/components/Footer/{Footer/index.d.ts → index.d.ts} +0 -0
- /package/dist/types/components/List/components/Header/{ActiveFilters → components/ActiveFilters}/ActiveFilters.d.ts +0 -0
- /package/dist/types/components/List/components/Header/{ActiveFilters → components/ActiveFilters}/index.d.ts +0 -0
- /package/dist/types/components/List/components/Header/{FilterPicker → components/FilterPicker}/index.d.ts +0 -0
- /package/dist/types/components/List/components/Header/{SortingPicker → components/SortingPicker}/SortingPicker.d.ts +0 -0
- /package/dist/types/components/List/components/Header/{SortingPicker → components/SortingPicker}/index.d.ts +0 -0
- /package/dist/types/components/List/components/Header/{SortingPickerItem → components/SortingPickerItem}/index.d.ts +0 -0
- /package/dist/types/components/List/components/Header/{Header/index.d.ts → index.d.ts} +0 -0
- /package/dist/types/components/List/components/Items/{OptionsButton → components/Item/components/OptionsButton}/index.d.ts +0 -0
- /package/dist/types/components/List/{components → setupComponents}/ListLoaderAsync.d.ts +0 -0
- /package/dist/types/components/List/{components → setupComponents}/ListLoaderAsyncResource.d.ts +0 -0
- /package/dist/types/components/List/{components → setupComponents}/ListStaticData.d.ts +0 -0
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { PropsWithChildren, default as React } from 'react';
|
|
2
|
+
import { FlowComponentProps } from '../../lib/componentFactory/flowComponent';
|
|
3
|
+
import { ItemListProps } from './components/Items/Items';
|
|
2
4
|
|
|
3
|
-
interface
|
|
5
|
+
export interface ListProps extends PropsWithChildren, ItemListProps, FlowComponentProps {
|
|
4
6
|
batchSize?: number;
|
|
5
7
|
}
|
|
6
|
-
export declare
|
|
8
|
+
export declare const List: React.ForwardRefExoticComponent<ListProps & React.RefAttributes<never>>;
|
|
7
9
|
export default List;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { PropsWithClassName } from '../../../../../../lib/types/props';
|
|
3
|
+
import { Search } from '../../../../model/search/Search';
|
|
4
|
+
|
|
5
|
+
interface Props extends PropsWithClassName {
|
|
6
|
+
search: Search<never>;
|
|
7
|
+
}
|
|
8
|
+
export declare const SearchField: FC<Props>;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { GridListProps } from 'react-aria-components';
|
|
3
|
+
|
|
4
|
+
export type ItemListProps = Pick<GridListProps<never>, "aria-labelledby" | "aria-label" | "className" | "onAction">;
|
|
5
|
+
export declare const Items: FC<ItemListProps>;
|
|
6
|
+
export default Items;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { FC, PropsWithChildren, default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
interface Props extends PropsWithChildren {
|
|
4
|
+
data: never;
|
|
5
|
+
}
|
|
6
|
+
export declare const Item: (props: Props) => React.JSX.Element;
|
|
7
|
+
export declare const ItemContainer: FC<PropsWithChildren>;
|
|
8
|
+
export default Item;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { PropsWithChildren, default as React } from 'react';
|
|
2
|
+
import { PropsWithClassName, PropsWithContainerBreakpointSize } from '../../../../../../../../lib/types/props';
|
|
3
|
+
|
|
4
|
+
type Props = PropsWithChildren & PropsWithClassName & PropsWithContainerBreakpointSize;
|
|
5
|
+
export declare const View: (props: Props) => React.JSX.Element;
|
|
6
|
+
export default View;
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
export type { RenderItemFn } from './model/item/types';
|
|
2
|
+
export { View as ListItemView } from './components/Items/components/Item/components/View';
|
|
3
3
|
export * from './List';
|
|
4
|
+
export * from './setupComponents/ListFilter';
|
|
5
|
+
export * from './setupComponents/ListSorting';
|
|
6
|
+
export * from './setupComponents/ListItem';
|
|
7
|
+
export * from './setupComponents/ListLoaderAsync';
|
|
8
|
+
export * from './setupComponents/ListStaticData';
|
|
4
9
|
export * from './typedList';
|
|
5
|
-
export * from './components/Header/ListFilter';
|
|
6
|
-
export * from './components/Header/ListSorting';
|
|
7
|
-
export * from './components/Items/ListItemView';
|
|
8
|
-
export * from './components/Items/ListItem';
|
|
9
|
-
export * from './components/ListLoaderAsync';
|
|
10
|
-
export * from './components/ListStaticData';
|
|
11
|
-
export default List;
|
|
@@ -5,19 +5,22 @@ import { Sorting } from './sorting/Sorting';
|
|
|
5
5
|
import { default as ReactTable } from './ReactTable';
|
|
6
6
|
import { ListShape } from './types';
|
|
7
7
|
import { IncrementalLoader } from './loading/IncrementalLoader';
|
|
8
|
-
import {
|
|
8
|
+
import { Search } from './search/Search';
|
|
9
|
+
import { ItemView } from './item/ItemView';
|
|
9
10
|
|
|
10
11
|
export declare class List<T> {
|
|
11
12
|
readonly filters: Filter<T, never, never>[];
|
|
13
|
+
readonly itemView: ItemView<T>;
|
|
14
|
+
readonly search?: Search<T>;
|
|
12
15
|
readonly sorting: Sorting<T>[];
|
|
13
16
|
readonly items: ItemCollection<T>;
|
|
14
|
-
readonly render?: RenderItemFn<T>;
|
|
15
17
|
readonly reactTable: ReactTable<T>;
|
|
16
18
|
readonly batches: BatchesController<T>;
|
|
17
19
|
readonly loader: IncrementalLoader<T>;
|
|
20
|
+
readonly hasAction: boolean;
|
|
18
21
|
private constructor();
|
|
19
22
|
static useNew<T>(shape: ListShape<T>): List<T>;
|
|
20
|
-
isFiltered(): boolean;
|
|
23
|
+
get isFiltered(): boolean;
|
|
21
24
|
getSorting(id: string): Sorting<T>;
|
|
22
25
|
clearSorting(): void;
|
|
23
26
|
clearFilters(): void;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Column, Table, TableOptions } from '@tanstack/react-table';
|
|
2
2
|
import { default as List } from './List';
|
|
3
3
|
import { PropertyName } from './types';
|
|
4
|
+
import { SearchValue } from './search/types';
|
|
4
5
|
|
|
5
6
|
export declare class ReactTable<T> {
|
|
6
7
|
readonly list: List<T>;
|
|
@@ -12,6 +13,7 @@ export declare class ReactTable<T> {
|
|
|
12
13
|
private useUpdateTableState;
|
|
13
14
|
private onTableStateChange;
|
|
14
15
|
private getUpdatedTableState;
|
|
16
|
+
get searchString(): SearchValue;
|
|
15
17
|
getTableColumn(property: PropertyName<T>): Column<T>;
|
|
16
18
|
private getTableColumnDefs;
|
|
17
19
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { ItemCollection } from './ItemCollection';
|
|
2
|
-
import { ReactNode } from 'react';
|
|
3
2
|
import { Row } from '@tanstack/react-table';
|
|
4
3
|
|
|
5
4
|
export declare class Item<T> {
|
|
@@ -7,7 +6,5 @@ export declare class Item<T> {
|
|
|
7
6
|
readonly data: T;
|
|
8
7
|
readonly collection: ItemCollection<T>;
|
|
9
8
|
constructor(collection: ItemCollection<T>, id: string, data: T);
|
|
10
|
-
render(): ReactNode;
|
|
11
9
|
static fromRow<T>(collection: ItemCollection<T>, row: Row<T>): Item<T>;
|
|
12
|
-
private static fallbackRenderItemFn;
|
|
13
10
|
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ReactElement, ReactNode } from 'react';
|
|
2
|
+
import { RenderItemFn } from './types';
|
|
3
|
+
import { default as List } from '../List';
|
|
4
|
+
|
|
5
|
+
export interface ItemViewShape<T> {
|
|
6
|
+
textValue?: (data: T) => string;
|
|
7
|
+
href?: (data: T) => string;
|
|
8
|
+
onAction?: (data: T) => void;
|
|
9
|
+
renderFn?: RenderItemFn<T>;
|
|
10
|
+
fallback?: ReactElement;
|
|
11
|
+
}
|
|
12
|
+
export declare class ItemView<T> {
|
|
13
|
+
readonly list: List<T>;
|
|
14
|
+
readonly textValue?: (data: T) => string;
|
|
15
|
+
readonly href?: (data: T) => string;
|
|
16
|
+
readonly onAction?: (data: T) => void;
|
|
17
|
+
readonly fallback?: ReactElement;
|
|
18
|
+
private readonly renderFn?;
|
|
19
|
+
constructor(list: List<T>, shape?: ItemViewShape<T>);
|
|
20
|
+
render(data: T): ReactNode;
|
|
21
|
+
private static fallbackRenderItemFn;
|
|
22
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { PropertyRecord } from '../types';
|
|
2
2
|
import { FilterMode } from '../filter/types';
|
|
3
3
|
import { AsyncResource } from '@mittwald/react-use-promise';
|
|
4
|
+
import { SearchValue } from '../search/types';
|
|
4
5
|
|
|
5
6
|
type DataLoaderSortOptions<T> = PropertyRecord<T, "asc" | "desc">;
|
|
6
7
|
type DataLoaderFilterOptions<T> = PropertyRecord<T, {
|
|
@@ -14,6 +15,7 @@ interface DataLoaderPaginationOptions {
|
|
|
14
15
|
export interface DataLoaderOptions<T> {
|
|
15
16
|
sorting?: DataLoaderSortOptions<T>;
|
|
16
17
|
filtering?: DataLoaderFilterOptions<T>;
|
|
18
|
+
searchString?: SearchValue;
|
|
17
19
|
pagination?: DataLoaderPaginationOptions;
|
|
18
20
|
}
|
|
19
21
|
export interface DataLoaderResult<T> {
|
|
@@ -8,9 +8,8 @@ export declare class BatchesController<T> {
|
|
|
8
8
|
private get reactTable();
|
|
9
9
|
getBatchIndex(): number;
|
|
10
10
|
hasNextBatch(): boolean;
|
|
11
|
-
getTotalItemsCount(): number
|
|
12
|
-
|
|
13
|
-
getVisibleItemsCount(): number | undefined;
|
|
11
|
+
getTotalItemsCount(): number;
|
|
12
|
+
getVisibleItemsCount(): number;
|
|
14
13
|
updateItemTotalCount(value: number): void;
|
|
15
14
|
reset(): void;
|
|
16
15
|
nextBatch(): void;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { default as List } from '../List';
|
|
2
|
+
import { SearchFieldRenderComponent, SearchShape, SearchValue } from './types';
|
|
3
|
+
|
|
4
|
+
export declare class Search<T> {
|
|
5
|
+
readonly list: List<T>;
|
|
6
|
+
readonly render?: SearchFieldRenderComponent;
|
|
7
|
+
private onUpdateCallbacks;
|
|
8
|
+
constructor(list: List<T>, searchShape: SearchShape<T>);
|
|
9
|
+
get value(): SearchValue;
|
|
10
|
+
get isSet(): boolean;
|
|
11
|
+
setValue(value: SearchValue): void;
|
|
12
|
+
clear(): void;
|
|
13
|
+
onUpdated(cb: () => unknown): void;
|
|
14
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ComponentType } from 'react';
|
|
2
|
+
|
|
3
|
+
interface SearchFieldRenderProps {
|
|
4
|
+
onChange: (value: SearchValue) => unknown;
|
|
5
|
+
value: SearchValue;
|
|
6
|
+
className?: string;
|
|
7
|
+
}
|
|
8
|
+
export type SearchFieldRenderComponent = ComponentType<SearchFieldRenderProps>;
|
|
9
|
+
export type SearchValue = string | undefined;
|
|
10
|
+
export interface SearchShape<IgnoredT> {
|
|
11
|
+
render?: SearchFieldRenderComponent;
|
|
12
|
+
}
|
|
13
|
+
export {};
|
|
@@ -3,15 +3,18 @@ import { SortingShape } from './sorting/types';
|
|
|
3
3
|
import { BatchesControllerShape } from './pagination/types';
|
|
4
4
|
import { FilterShape } from './filter/types';
|
|
5
5
|
import { IncrementalLoaderShape } from './loading/types';
|
|
6
|
-
import {
|
|
6
|
+
import { SearchShape } from './search/types';
|
|
7
|
+
import { ItemViewShape } from './item/ItemView';
|
|
7
8
|
|
|
8
9
|
export type PropertyName<T> = never extends T ? string : DeepKeys<T>;
|
|
9
10
|
export type PropertyValue<T, TProp> = DeepValue<T, TProp>;
|
|
10
11
|
export interface ListShape<T> {
|
|
11
12
|
loader?: IncrementalLoaderShape<T>;
|
|
12
|
-
render?: RenderItemFn<T>;
|
|
13
13
|
filters?: FilterShape<T, never, never>[];
|
|
14
|
+
itemView?: ItemViewShape<T>;
|
|
15
|
+
search?: SearchShape<T>;
|
|
14
16
|
sorting?: SortingShape<T>[];
|
|
15
17
|
batchesController?: BatchesControllerShape;
|
|
18
|
+
hasAction: boolean;
|
|
16
19
|
}
|
|
17
20
|
export type PropertyRecord<T, TValue> = Partial<Record<PropertyName<T>, TValue>>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { FilterShape, FilterValue } from '
|
|
1
|
+
import { FilterShape, FilterValue } from '../model/filter/types';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
|
-
import { PropertyName } from '
|
|
3
|
+
import { PropertyName } from '../model/types';
|
|
4
4
|
|
|
5
5
|
type Props<T, TProp extends PropertyName<T>, TMatcherValue> = Omit<FilterShape<T, TProp, TMatcherValue>, "type">;
|
|
6
6
|
export declare const ListFilter: <T, const TProp extends PropertyName<T> = PropertyName<T>, TMatcherValue = FilterValue<T, TProp>>(ignoredProps: Props<T, TProp, TMatcherValue>) => null;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ComponentType } from 'react';
|
|
2
|
+
import { RenderItemFn } from '../model/item/types';
|
|
3
|
+
import { ItemViewShape } from '../model/item/ItemView';
|
|
4
|
+
|
|
5
|
+
type Props<T> = Omit<ItemViewShape<T>, "renderFn"> & {
|
|
6
|
+
children: RenderItemFn<T>;
|
|
7
|
+
};
|
|
8
|
+
export declare const ListItem: <T>(ignoredProps: Props<T>) => null;
|
|
9
|
+
export declare const TypedListItem: <T>() => ComponentType<Props<T>>;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { SearchFieldRenderComponent, SearchShape } from '../model/search/types';
|
|
2
|
+
import { ComponentType } from 'react';
|
|
3
|
+
|
|
4
|
+
type Props<T> = Omit<SearchShape<T>, "render"> & {
|
|
5
|
+
children?: SearchFieldRenderComponent;
|
|
6
|
+
};
|
|
7
|
+
export declare function ListSearch<T = never>(ignoredProps: Props<T>): null;
|
|
8
|
+
export declare const TypedListSearch: <T>() => ComponentType<Props<T>>;
|
|
9
|
+
export {};
|
|
@@ -7,7 +7,5 @@ type Story = StoryObj<typeof List>;
|
|
|
7
7
|
export declare const Default: Story;
|
|
8
8
|
export declare const WithTopContent: Story;
|
|
9
9
|
export declare const WithContent: Story;
|
|
10
|
-
export declare const WithLink: Story;
|
|
11
|
-
export declare const WithButton: Story;
|
|
12
10
|
export declare const SmallSpace: Story;
|
|
13
11
|
export declare const CustomContainerBreakpoint: Story;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import { default as List } from './List';
|
|
2
|
-
|
|
3
1
|
export declare const typedList: <T>() => {
|
|
4
|
-
List:
|
|
2
|
+
List: import('react').ForwardRefExoticComponent<import('./List').ListProps & import('react').RefAttributes<never>>;
|
|
5
3
|
Filter: <const TProp extends import('./model/types').PropertyName<T>, TMatcherValue = import('../../lib/types/array').ItemType<NonNullable<import('@tanstack/table-core').DeepValue<T, TProp>>>>(props: {
|
|
6
4
|
name?: string;
|
|
7
5
|
property: TProp;
|
|
@@ -9,10 +7,16 @@ export declare const typedList: <T>() => {
|
|
|
9
7
|
values?: TMatcherValue[] | undefined;
|
|
10
8
|
matcher?: import('./model/filter/types').FilterMatcher<T, TProp, TMatcherValue> | undefined;
|
|
11
9
|
}) => import('react').ReactNode;
|
|
10
|
+
Search: import('react').ComponentType<Omit<import('./model/search/types').SearchShape<T>, "render"> & {
|
|
11
|
+
children?: import('./model/search/types').SearchFieldRenderComponent;
|
|
12
|
+
}>;
|
|
12
13
|
Sorting: import('react').ComponentType<import('./model/sorting/types').SortingShape<T>>;
|
|
13
|
-
|
|
14
|
-
children: import('
|
|
14
|
+
Item: import('react').ComponentType<Omit<import('./model/item/ItemView').ItemViewShape<T>, "renderFn"> & {
|
|
15
|
+
children: import('.').RenderItemFn<T>;
|
|
15
16
|
}>;
|
|
17
|
+
ItemView: (props: {
|
|
18
|
+
children?: import('react').ReactNode | undefined;
|
|
19
|
+
} & import('../../lib/types/props').PropsWithClassName & import('../../lib/types/props').PropsWithContainerBreakpointSize) => import("react").JSX.Element;
|
|
16
20
|
StaticData: import('react').ComponentType<{
|
|
17
21
|
data: T[];
|
|
18
22
|
}>;
|
|
@@ -4,7 +4,9 @@ import { OverlayController } from '../../lib/controller';
|
|
|
4
4
|
import * as Aria from "react-aria-components";
|
|
5
5
|
export interface PopoverProps extends PropsWithChildren<Omit<Aria.PopoverProps, "children">> {
|
|
6
6
|
withTip?: boolean;
|
|
7
|
+
isDialogContent?: boolean;
|
|
7
8
|
controller?: OverlayController;
|
|
9
|
+
contentClassName?: string;
|
|
8
10
|
}
|
|
9
11
|
export declare const Popover: React.ForwardRefExoticComponent<PopoverProps & React.RefAttributes<never>>;
|
|
10
12
|
export default Popover;
|
|
@@ -37,6 +37,7 @@ import { ContextualHelpProps } from '../ContextualHelp';
|
|
|
37
37
|
import { PopoverProps } from '../Popover';
|
|
38
38
|
import { ContextMenuSectionProps } from '../ContextMenu/components/ContextMenuSection';
|
|
39
39
|
import { OverlayTriggerProps } from '../OverlayTrigger';
|
|
40
|
+
import { ListProps } from '../List';
|
|
40
41
|
|
|
41
42
|
export * from './types';
|
|
42
43
|
export interface FlowComponentPropsTypes {
|
|
@@ -65,6 +66,7 @@ export interface FlowComponentPropsTypes {
|
|
|
65
66
|
Label: LabelProps;
|
|
66
67
|
LayoutCard: LayoutCardProps;
|
|
67
68
|
Link: LinkProps;
|
|
69
|
+
List: ListProps;
|
|
68
70
|
MenuItem: MenuItemProps;
|
|
69
71
|
Modal: ModalProps;
|
|
70
72
|
NumberField: NumberFieldProps;
|
|
@@ -30,6 +30,7 @@ export declare const overlayContext: import('react').Context<Partial<{
|
|
|
30
30
|
Label: OverlayController | undefined;
|
|
31
31
|
LayoutCard: OverlayController | undefined;
|
|
32
32
|
Link: OverlayController | undefined;
|
|
33
|
+
List: OverlayController | undefined;
|
|
33
34
|
MenuItem: OverlayController | undefined;
|
|
34
35
|
Modal: OverlayController | undefined;
|
|
35
36
|
NumberField: OverlayController | undefined;
|
|
@@ -26,6 +26,7 @@ export declare const propsContext: import('react').Context<Partial<{
|
|
|
26
26
|
Label: import('./types').ComponentPropsContext<"Label">;
|
|
27
27
|
LayoutCard: import('./types').ComponentPropsContext<"LayoutCard">;
|
|
28
28
|
Link: import('./types').ComponentPropsContext<"Link">;
|
|
29
|
+
List: import('./types').ComponentPropsContext<"List">;
|
|
29
30
|
MenuItem: import('./types').ComponentPropsContext<"MenuItem">;
|
|
30
31
|
Modal: import('./types').ComponentPropsContext<"Modal">;
|
|
31
32
|
NumberField: import('./types').ComponentPropsContext<"NumberField">;
|
|
@@ -71,6 +72,7 @@ export declare const PropsContextProvider: import('react').Provider<Partial<{
|
|
|
71
72
|
Label: import('./types').ComponentPropsContext<"Label">;
|
|
72
73
|
LayoutCard: import('./types').ComponentPropsContext<"LayoutCard">;
|
|
73
74
|
Link: import('./types').ComponentPropsContext<"Link">;
|
|
75
|
+
List: import('./types').ComponentPropsContext<"List">;
|
|
74
76
|
MenuItem: import('./types').ComponentPropsContext<"MenuItem">;
|
|
75
77
|
Modal: import('./types').ComponentPropsContext<"Modal">;
|
|
76
78
|
NumberField: import('./types').ComponentPropsContext<"NumberField">;
|
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.178",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A React implementation of Flow, mittwald’s design system",
|
|
6
6
|
"homepage": "https://mittwald.github.io/flow",
|
|
@@ -280,7 +280,7 @@
|
|
|
280
280
|
"dependencies": {
|
|
281
281
|
"@chakra-ui/live-region": "^2.1.0",
|
|
282
282
|
"@internationalized/string-compiler": "^3.2.4",
|
|
283
|
-
"@mittwald/react-tunnel": "^0.1.0-alpha.
|
|
283
|
+
"@mittwald/react-tunnel": "^0.1.0-alpha.178",
|
|
284
284
|
"@mittwald/react-use-promise": "^2.3.13",
|
|
285
285
|
"@react-aria/utils": "^3.24.1",
|
|
286
286
|
"@react-types/shared": "^3.23.1",
|
|
@@ -307,7 +307,7 @@
|
|
|
307
307
|
},
|
|
308
308
|
"devDependencies": {
|
|
309
309
|
"@faker-js/faker": "^8.4.1",
|
|
310
|
-
"@mittwald/flow-design-tokens": "^0.1.0-alpha.
|
|
310
|
+
"@mittwald/flow-design-tokens": "^0.1.0-alpha.178",
|
|
311
311
|
"@mittwald/react-use-promise": "^2.3.13",
|
|
312
312
|
"@nx/storybook": "^19.4.0",
|
|
313
313
|
"@storybook/addon-a11y": "^8.1.11",
|
|
@@ -383,5 +383,5 @@
|
|
|
383
383
|
"optional": true
|
|
384
384
|
}
|
|
385
385
|
},
|
|
386
|
-
"gitHead": "
|
|
386
|
+
"gitHead": "8c545aff9374b22d8452669d93cad471ae1c4aa1"
|
|
387
387
|
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
/* */
|
|
3
|
-
import e from "react";
|
|
4
|
-
import i from "clsx";
|
|
5
|
-
import { C as l } from "./ClearPropsContext-CUvsbMn8.js";
|
|
6
|
-
import "./propsContext-DzAKlmhS.js";
|
|
7
|
-
import "@react-aria/utils";
|
|
8
|
-
import "remeda";
|
|
9
|
-
import "dot-prop";
|
|
10
|
-
const m = "flow--inline-code", c = {
|
|
11
|
-
inlineCode: m
|
|
12
|
-
}, u = (o) => {
|
|
13
|
-
const { children: t, className: n, ...r } = o, s = i(c.inlineCode, n);
|
|
14
|
-
return /* @__PURE__ */ e.createElement(l, null, /* @__PURE__ */ e.createElement("code", { ...r, className: s }, t));
|
|
15
|
-
};
|
|
16
|
-
export {
|
|
17
|
-
u as I
|
|
18
|
-
};
|
package/dist/Popover-C2uIpso8.js
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
/* */
|
|
3
|
-
import o from "react";
|
|
4
|
-
import * as r from "react-aria-components";
|
|
5
|
-
import w from "clsx";
|
|
6
|
-
import "mobx";
|
|
7
|
-
import { u as O } from "./useOverlayController-D8N4X2rc.js";
|
|
8
|
-
import { f as C } from "./flowComponent-CuEuCXRI.js";
|
|
9
|
-
import { O as h } from "./OverlayContextProvider-DJzKzUwy.js";
|
|
10
|
-
const u = "flow--popover", x = "flow--popover--content", E = "flow--popover--tip", t = {
|
|
11
|
-
popover: u,
|
|
12
|
-
content: x,
|
|
13
|
-
tip: E,
|
|
14
|
-
"popover-slide": "flow--popover--popover-slide"
|
|
15
|
-
}, B = C("Popover", (n) => {
|
|
16
|
-
const {
|
|
17
|
-
children: p,
|
|
18
|
-
className: s,
|
|
19
|
-
controller: l,
|
|
20
|
-
withTip: a,
|
|
21
|
-
refProp: c,
|
|
22
|
-
defaultOpen: m = !1,
|
|
23
|
-
...i
|
|
24
|
-
} = n, v = O("Popover", {
|
|
25
|
-
reuseControllerFromContext: !0,
|
|
26
|
-
defaultOpen: m
|
|
27
|
-
}), e = l ?? v, f = e.useIsOpen(), P = w(t.popover, s);
|
|
28
|
-
return /* @__PURE__ */ o.createElement(
|
|
29
|
-
r.Popover,
|
|
30
|
-
{
|
|
31
|
-
...i,
|
|
32
|
-
className: P,
|
|
33
|
-
containerPadding: 16,
|
|
34
|
-
ref: c,
|
|
35
|
-
isOpen: f,
|
|
36
|
-
onOpenChange: (d) => e.setOpen(d)
|
|
37
|
-
},
|
|
38
|
-
a && /* @__PURE__ */ o.createElement(r.OverlayArrow, { className: t.tip }, /* @__PURE__ */ o.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16" }, /* @__PURE__ */ o.createElement("path", { d: "M0 0 L8 8 L16 0" }))),
|
|
39
|
-
/* @__PURE__ */ o.createElement(r.Dialog, { className: t.content }, /* @__PURE__ */ o.createElement(h, { type: "Popover", controller: e }, p))
|
|
40
|
-
);
|
|
41
|
-
});
|
|
42
|
-
export {
|
|
43
|
-
B as P
|
|
44
|
-
};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
/* */
|
|
3
|
-
import r from "react";
|
|
4
|
-
import m from "clsx";
|
|
5
|
-
const a = "flow--skeleton", c = "flow--skeleton--shimmer", i = {
|
|
6
|
-
skeleton: a,
|
|
7
|
-
shimmer: c
|
|
8
|
-
}, d = (e) => {
|
|
9
|
-
const { width: s, height: t, className: o, ...l } = e, n = m(i.skeleton, o);
|
|
10
|
-
return /* @__PURE__ */ r.createElement(
|
|
11
|
-
"div",
|
|
12
|
-
{
|
|
13
|
-
className: n,
|
|
14
|
-
"aria-hidden": !0,
|
|
15
|
-
style: { height: t, width: s },
|
|
16
|
-
...l
|
|
17
|
-
}
|
|
18
|
-
);
|
|
19
|
-
};
|
|
20
|
-
export {
|
|
21
|
-
d as S
|
|
22
|
-
};
|