@pingux/astro 2.146.0 → 2.147.1-alpha.0
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,17 +1,4 @@
|
|
|
1
|
-
import React
|
|
2
|
-
import {
|
|
3
|
-
import type { Node } from '@react-types/shared';
|
|
4
|
-
type GridListProps = {
|
|
5
|
-
containerProps: object;
|
|
6
|
-
rowProps: object;
|
|
7
|
-
cellProps: object;
|
|
8
|
-
children?: React.ReactNode;
|
|
9
|
-
isReorderable?: boolean;
|
|
10
|
-
items: Iterable<object>;
|
|
11
|
-
keyboardNavigationBehavior?: 'arrow' | 'tab';
|
|
12
|
-
onAction?: (key: Key) => void;
|
|
13
|
-
onSelectionChange?: (keys: Selection) => void;
|
|
14
|
-
collection: Collection<Node<object>>;
|
|
15
|
-
};
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { GridListProps } from '../../types/gridList';
|
|
16
3
|
declare const GridList: (props: GridListProps) => React.JSX.Element;
|
|
17
4
|
export default GridList;
|
|
@@ -1,18 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
declare const _default: {
|
|
3
3
|
title: string;
|
|
4
|
-
component: (props:
|
|
5
|
-
containerProps: object;
|
|
6
|
-
rowProps: object;
|
|
7
|
-
cellProps: object;
|
|
8
|
-
children?: React.ReactNode;
|
|
9
|
-
isReorderable?: boolean | undefined;
|
|
10
|
-
items: Iterable<object>;
|
|
11
|
-
keyboardNavigationBehavior?: "tab" | "arrow" | undefined;
|
|
12
|
-
onAction?: ((key: React.Key) => void) | undefined;
|
|
13
|
-
onSelectionChange?: ((keys: Selection) => void) | undefined;
|
|
14
|
-
collection: import("react-stately").Collection<import("@react-types/shared").Node<object>>;
|
|
15
|
-
}) => React.JSX.Element;
|
|
4
|
+
component: (props: import("../../types/gridList").GridListProps) => React.JSX.Element;
|
|
16
5
|
argTypes: {
|
|
17
6
|
isReorderable: {
|
|
18
7
|
description: string;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ListLayout } from '@react-stately/layout';
|
|
3
3
|
import { ListViewProps } from '../../types/listView';
|
|
4
|
+
import { ExampleItemProps } from './ListView.stories';
|
|
4
5
|
export declare const collectionTypes: {
|
|
5
6
|
ITEM: string;
|
|
6
7
|
LOADER: string;
|
|
7
8
|
PLACEHOLDER: string;
|
|
8
9
|
};
|
|
9
10
|
export declare function useListLayout(state: any): ListLayout<unknown>;
|
|
10
|
-
declare const ListView: React.ForwardRefExoticComponent<ListViewProps & React.RefAttributes<unknown>>;
|
|
11
|
+
declare const ListView: React.ForwardRefExoticComponent<ListViewProps<ExampleItemProps> & React.RefAttributes<unknown>>;
|
|
11
12
|
export default ListView;
|
|
@@ -3,8 +3,17 @@ import { Collection, DisabledBehavior, ListState, SelectionBehavior } from 'reac
|
|
|
3
3
|
import { DraggableCollectionState, DroppableCollectionState } from '@react-stately/dnd';
|
|
4
4
|
import type { FocusStrategy, KeyboardDelegate, Node } from '@react-types/shared';
|
|
5
5
|
import { DraggableCollectionStateOptions, DroppableCollectionOptions, DroppableCollectionStateOptions } from './dnd';
|
|
6
|
-
export interface GridListProps
|
|
6
|
+
export interface GridListProps {
|
|
7
7
|
isReorderable?: boolean;
|
|
8
|
+
rowProps?: object;
|
|
9
|
+
cellProps?: object;
|
|
10
|
+
containerProps?: object;
|
|
11
|
+
items: Iterable<object>;
|
|
12
|
+
children?: React.ReactNode;
|
|
13
|
+
keyboardNavigationBehavior?: 'arrow' | 'tab';
|
|
14
|
+
onAction?: (key: Key) => void;
|
|
15
|
+
onSelectionChange?: (keys: Selection) => void;
|
|
16
|
+
collection?: Collection<Node<object>>;
|
|
8
17
|
}
|
|
9
18
|
export type GridListRowProps = SharedGridListItemProps;
|
|
10
19
|
export interface GridRowProps {
|
|
@@ -20,9 +29,6 @@ interface SharedGridListItemProps {
|
|
|
20
29
|
item: Node<object>;
|
|
21
30
|
state: ListState<object>;
|
|
22
31
|
}
|
|
23
|
-
interface SharedGridProps {
|
|
24
|
-
isReorderable?: boolean;
|
|
25
|
-
}
|
|
26
32
|
export interface UseGridListItemProps extends SharedGridListItemProps {
|
|
27
33
|
cellRef: React.Ref<HTMLDivElement>;
|
|
28
34
|
ref: RefObject<HTMLElement>;
|
|
@@ -31,7 +37,7 @@ export interface UseGridListProps extends ReorderableProps {
|
|
|
31
37
|
shouldAllowDuplicateSelectionEvents?: boolean;
|
|
32
38
|
hasAutoFocus?: boolean | FocusStrategy;
|
|
33
39
|
children?: React.ReactNode;
|
|
34
|
-
collection
|
|
40
|
+
collection?: Collection<Node<object>>;
|
|
35
41
|
defaultSelectedKeys?: Iterable<Key> | 'all';
|
|
36
42
|
disabledBehavior?: DisabledBehavior;
|
|
37
43
|
disabledKeys?: Iterable<Key>;
|
|
@@ -5,7 +5,7 @@ import type { GridNode } from '@react-types/grid';
|
|
|
5
5
|
import { ThemeUICSSObject } from 'theme-ui';
|
|
6
6
|
import { ExampleItemProps } from '../components/ListView/ListView.stories';
|
|
7
7
|
export type SelectionOptions = 'expansion' | 'single' | 'multiple' | 'none';
|
|
8
|
-
export interface ListViewProps extends Omit<TreeProps<
|
|
8
|
+
export interface ListViewProps<T extends ExampleItemProps> extends Omit<TreeProps<T>, 'selectionMode'> {
|
|
9
9
|
selectionStyle?: string;
|
|
10
10
|
isHoverable?: boolean;
|
|
11
11
|
loadingState?: string;
|