@mittwald/flow-react-components 0.1.0-alpha.397 → 0.1.0-alpha.398
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 +12 -0
- package/dist/css/List.css +1 -1
- package/dist/js/ContextMenu.js +3 -3
- package/dist/js/{ContextMenuSection-CmajFz_f.js → ContextMenuSection-kLzjPKqH.js} +12 -12
- package/dist/js/{ContextMenuTrigger-BAV29sr-.js → ContextMenuTrigger-C6ZCPTHC.js} +1 -1
- package/dist/js/List.js +575 -538
- package/dist/js/{Section-wjl9OuOK.js → Section-BPfvjI0d.js} +1 -1
- package/dist/js/Section.js +1 -1
- package/dist/js/Tabs.js +2 -2
- package/dist/js/all.css +1 -1
- package/dist/js/types/components/List/components/Items/Items.d.ts +4 -1
- package/dist/js/types/components/List/components/Items/components/Item/Item.d.ts +4 -1
- package/dist/js/types/components/List/model/List.d.ts +3 -3
- package/dist/js/types/components/List/model/item/ItemView.d.ts +5 -1
- package/dist/js/types/components/List/model/types.d.ts +1 -1
- package/dist/js/types/components/List/stories/ListItem.stories.d.ts +1 -2
- package/package.json +4 -4
|
@@ -3,7 +3,10 @@ import { Key } from 'react-aria-components';
|
|
|
3
3
|
interface Props extends PropsWithChildren {
|
|
4
4
|
id: Key;
|
|
5
5
|
data: never;
|
|
6
|
+
tiles?: boolean;
|
|
6
7
|
}
|
|
7
8
|
export declare const Item: (props: Props) => React.JSX.Element | null;
|
|
8
|
-
export declare const ItemContainer: FC<PropsWithChildren
|
|
9
|
+
export declare const ItemContainer: FC<PropsWithChildren & {
|
|
10
|
+
tiles?: boolean;
|
|
11
|
+
}>;
|
|
9
12
|
export default Item;
|
|
@@ -10,6 +10,7 @@ import { ItemView } from './item/ItemView';
|
|
|
10
10
|
import { Table } from './table/Table';
|
|
11
11
|
import { default as z } from 'zod';
|
|
12
12
|
export declare class List<T> {
|
|
13
|
+
static readonly viewModeSettingsStorageSchema: z.ZodOptional<z.ZodEnum<["list", "table", "tiles"]>>;
|
|
13
14
|
readonly filters: Filter<T, never, never>[];
|
|
14
15
|
readonly itemView?: ItemView<T>;
|
|
15
16
|
readonly table?: Table<T>;
|
|
@@ -25,19 +26,18 @@ export declare class List<T> {
|
|
|
25
26
|
readonly componentProps: ListSupportedComponentProps;
|
|
26
27
|
viewMode: ListViewMode;
|
|
27
28
|
readonly setViewMode: (viewMode: ListViewMode) => void;
|
|
28
|
-
private readonly settingsStore?;
|
|
29
29
|
readonly supportsSettingsStorage: boolean;
|
|
30
30
|
readonly settingStorageKey?: string;
|
|
31
|
+
private readonly settingsStore?;
|
|
31
32
|
private readonly viewModeStorageKey?;
|
|
32
33
|
private readonly filterSettingsStorageKey?;
|
|
33
|
-
static readonly viewModeSettingsStorageSchema: z.ZodOptional<z.ZodEnum<["list", "table"]>>;
|
|
34
34
|
constructor(shape: ListShape<T>);
|
|
35
35
|
get isFiltered(): boolean;
|
|
36
36
|
get visibleSorting(): Sorting<T>[];
|
|
37
37
|
static useNew<T>(shape: ListShape<T>): List<T>;
|
|
38
38
|
storeFilterDefaultSettings(): void;
|
|
39
39
|
getStoredFilterDefaultSettings(): Record<string, string[]> | undefined;
|
|
40
|
-
getStoredViewModeDefaultSetting(): "table" | "list" | undefined;
|
|
40
|
+
getStoredViewModeDefaultSetting(): "table" | "list" | "tiles" | undefined;
|
|
41
41
|
getSorting(id: string): Sorting<T>;
|
|
42
42
|
clearSorting(): void;
|
|
43
43
|
resetFilters(): void;
|
|
@@ -7,6 +7,8 @@ export interface ItemViewShape<T> {
|
|
|
7
7
|
defaultExpanded?: (data: T) => boolean;
|
|
8
8
|
renderFn?: RenderItemFn<T>;
|
|
9
9
|
fallback?: ReactElement;
|
|
10
|
+
showList?: boolean;
|
|
11
|
+
showTiles?: boolean;
|
|
10
12
|
}
|
|
11
13
|
export declare class ItemView<T> {
|
|
12
14
|
readonly list: List<T>;
|
|
@@ -14,8 +16,10 @@ export declare class ItemView<T> {
|
|
|
14
16
|
readonly href?: (data: T) => string;
|
|
15
17
|
readonly defaultExpanded?: (data: T) => boolean;
|
|
16
18
|
readonly fallback?: ReactElement;
|
|
19
|
+
readonly showTiles?: boolean;
|
|
20
|
+
readonly showList?: boolean;
|
|
17
21
|
private readonly renderFn?;
|
|
18
22
|
constructor(list: List<T>, shape?: ItemViewShape<T>);
|
|
19
|
-
render(data: T): ReactNode;
|
|
20
23
|
private static fallbackRenderItemFn;
|
|
24
|
+
render(data: T): ReactNode;
|
|
21
25
|
}
|
|
@@ -37,6 +37,6 @@ export interface ListShape<T> extends ListSupportedComponentProps {
|
|
|
37
37
|
defaultViewMode?: ListViewMode;
|
|
38
38
|
}
|
|
39
39
|
export type PropertyRecord<T, TValue> = Partial<Record<PropertyName<T>, TValue>>;
|
|
40
|
-
export type ListViewMode = "table" | "list";
|
|
40
|
+
export type ListViewMode = "table" | "list" | "tiles";
|
|
41
41
|
export type ItemActionFn<T> = (data: T) => void;
|
|
42
42
|
export type GetItemId<T> = (data: T) => string;
|
|
@@ -5,7 +5,6 @@ export default meta;
|
|
|
5
5
|
type Story = StoryObj<typeof List>;
|
|
6
6
|
export declare const Default: Story;
|
|
7
7
|
export declare const WithTopContent: Story;
|
|
8
|
-
export declare const
|
|
9
|
-
export declare const SmallSpace: Story;
|
|
8
|
+
export declare const WithBottomContent: Story;
|
|
10
9
|
export declare const WithActionGroup: Story;
|
|
11
10
|
export declare const WithMultipleTexts: Story;
|
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.398",
|
|
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.398",
|
|
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.398",
|
|
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": "eb1235fa43e63935e704828846059d35f6d5ddc0"
|
|
555
555
|
}
|