@mrcaktuz/sds-react 0.0.0-stage → 0.1.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.
- package/README.md +421 -2
- package/dist/grid.cjs +15699 -0
- package/dist/grid.d.cts +43 -0
- package/dist/grid.d.ts +43 -0
- package/dist/grid.js +15653 -0
- package/dist/index.cjs +259 -0
- package/dist/index.d.cts +52 -0
- package/dist/index.d.ts +52 -0
- package/dist/index.js +232 -0
- package/package.json +48 -3
package/dist/grid.d.cts
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import React__default, { Ref, ReactNode, CSSProperties } from 'react';
|
|
3
|
+
import { GridProps, GridElement } from '@vaadin/react-components/Grid.js';
|
|
4
|
+
export { GridDataProvider as SDSGridDataProvider, GridElement as SDSGridElement } from '@vaadin/react-components/Grid.js';
|
|
5
|
+
export { GridColumn as SDSGridColumn } from '@vaadin/react-components/GridColumn.js';
|
|
6
|
+
export { GridFilterColumn as SDSGridFilterColumn } from '@vaadin/react-components/GridFilterColumn.js';
|
|
7
|
+
export { GridSelectionColumn as SDSGridSelectionColumn } from '@vaadin/react-components/GridSelectionColumn.js';
|
|
8
|
+
export { GridSortColumn as SDSGridSortColumn } from '@vaadin/react-components/GridSortColumn.js';
|
|
9
|
+
|
|
10
|
+
type SDSGridProps<TItem> = Omit<GridProps<TItem>, 'theme'> & {
|
|
11
|
+
/** Background on every other row (Figma "Content alt") */
|
|
12
|
+
stripes?: boolean;
|
|
13
|
+
/** Vertical borders between columns */
|
|
14
|
+
columnBorders?: boolean;
|
|
15
|
+
/** No outer border nor radius */
|
|
16
|
+
noBorder?: boolean;
|
|
17
|
+
ref?: Ref<GridElement<TItem>>;
|
|
18
|
+
};
|
|
19
|
+
declare function SDSGrid<TItem>({ stripes, columnBorders, noBorder, className, ...props }: SDSGridProps<TItem>): React.JSX.Element;
|
|
20
|
+
|
|
21
|
+
/** DOM cell renderer: no React inside the cells of the fork */
|
|
22
|
+
type SDSGridForkBodyRenderer<TItem = unknown> = (root: HTMLElement, column: HTMLElement, model: {
|
|
23
|
+
item: TItem;
|
|
24
|
+
index: number;
|
|
25
|
+
}) => void;
|
|
26
|
+
type LooseProps = {
|
|
27
|
+
children?: ReactNode;
|
|
28
|
+
className?: string;
|
|
29
|
+
style?: CSSProperties;
|
|
30
|
+
[property: string]: unknown;
|
|
31
|
+
};
|
|
32
|
+
type SDSGridForkProps = LooseProps & {
|
|
33
|
+
stripes?: boolean;
|
|
34
|
+
columnBorders?: boolean;
|
|
35
|
+
noBorder?: boolean;
|
|
36
|
+
};
|
|
37
|
+
declare function SDSGridFork({ stripes, columnBorders, noBorder, className, ...props }: SDSGridForkProps): React__default.JSX.Element;
|
|
38
|
+
declare const SDSGridForkColumn: React__default.FC<LooseProps>;
|
|
39
|
+
declare const SDSGridForkSortColumn: React__default.FC<LooseProps>;
|
|
40
|
+
declare const SDSGridForkFilterColumn: React__default.FC<LooseProps>;
|
|
41
|
+
declare const SDSGridForkSelectionColumn: React__default.FC<LooseProps>;
|
|
42
|
+
|
|
43
|
+
export { SDSGrid, SDSGridFork, type SDSGridForkBodyRenderer, SDSGridForkColumn, SDSGridForkFilterColumn, type SDSGridForkProps, SDSGridForkSelectionColumn, SDSGridForkSortColumn, type SDSGridProps };
|
package/dist/grid.d.ts
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import React__default, { Ref, ReactNode, CSSProperties } from 'react';
|
|
3
|
+
import { GridProps, GridElement } from '@vaadin/react-components/Grid.js';
|
|
4
|
+
export { GridDataProvider as SDSGridDataProvider, GridElement as SDSGridElement } from '@vaadin/react-components/Grid.js';
|
|
5
|
+
export { GridColumn as SDSGridColumn } from '@vaadin/react-components/GridColumn.js';
|
|
6
|
+
export { GridFilterColumn as SDSGridFilterColumn } from '@vaadin/react-components/GridFilterColumn.js';
|
|
7
|
+
export { GridSelectionColumn as SDSGridSelectionColumn } from '@vaadin/react-components/GridSelectionColumn.js';
|
|
8
|
+
export { GridSortColumn as SDSGridSortColumn } from '@vaadin/react-components/GridSortColumn.js';
|
|
9
|
+
|
|
10
|
+
type SDSGridProps<TItem> = Omit<GridProps<TItem>, 'theme'> & {
|
|
11
|
+
/** Background on every other row (Figma "Content alt") */
|
|
12
|
+
stripes?: boolean;
|
|
13
|
+
/** Vertical borders between columns */
|
|
14
|
+
columnBorders?: boolean;
|
|
15
|
+
/** No outer border nor radius */
|
|
16
|
+
noBorder?: boolean;
|
|
17
|
+
ref?: Ref<GridElement<TItem>>;
|
|
18
|
+
};
|
|
19
|
+
declare function SDSGrid<TItem>({ stripes, columnBorders, noBorder, className, ...props }: SDSGridProps<TItem>): React.JSX.Element;
|
|
20
|
+
|
|
21
|
+
/** DOM cell renderer: no React inside the cells of the fork */
|
|
22
|
+
type SDSGridForkBodyRenderer<TItem = unknown> = (root: HTMLElement, column: HTMLElement, model: {
|
|
23
|
+
item: TItem;
|
|
24
|
+
index: number;
|
|
25
|
+
}) => void;
|
|
26
|
+
type LooseProps = {
|
|
27
|
+
children?: ReactNode;
|
|
28
|
+
className?: string;
|
|
29
|
+
style?: CSSProperties;
|
|
30
|
+
[property: string]: unknown;
|
|
31
|
+
};
|
|
32
|
+
type SDSGridForkProps = LooseProps & {
|
|
33
|
+
stripes?: boolean;
|
|
34
|
+
columnBorders?: boolean;
|
|
35
|
+
noBorder?: boolean;
|
|
36
|
+
};
|
|
37
|
+
declare function SDSGridFork({ stripes, columnBorders, noBorder, className, ...props }: SDSGridForkProps): React__default.JSX.Element;
|
|
38
|
+
declare const SDSGridForkColumn: React__default.FC<LooseProps>;
|
|
39
|
+
declare const SDSGridForkSortColumn: React__default.FC<LooseProps>;
|
|
40
|
+
declare const SDSGridForkFilterColumn: React__default.FC<LooseProps>;
|
|
41
|
+
declare const SDSGridForkSelectionColumn: React__default.FC<LooseProps>;
|
|
42
|
+
|
|
43
|
+
export { SDSGrid, SDSGridFork, type SDSGridForkBodyRenderer, SDSGridForkColumn, SDSGridForkFilterColumn, type SDSGridForkProps, SDSGridForkSelectionColumn, SDSGridForkSortColumn, type SDSGridProps };
|