gantri-components 2.110.0 → 2.112.0-beta.1
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/components/dropdown-menu/dropdown-menu.styles.d.ts +3 -2
- package/dist/components/dropdown-menu/dropdown-menu.types.d.ts +2 -0
- package/dist/components/image/image.types.d.ts +6 -0
- package/dist/components/table/components/table-draggable-row/table-draggable-row.styles.d.ts +0 -3
- package/dist/components/table/hooks/use-selectable-table-rows/components/clear-selected-rows/clear-selected-rows.d.ts +2 -0
- package/dist/components/table/hooks/use-selectable-table-rows/components/clear-selected-rows/clear-selected-rows.styles.d.ts +2 -0
- package/dist/components/table/hooks/use-selectable-table-rows/components/clear-selected-rows/index.d.ts +1 -0
- package/dist/components/table/hooks/use-selectable-table-rows/components/selectable-row-cell/index.d.ts +1 -0
- package/dist/components/table/hooks/use-selectable-table-rows/components/selectable-row-cell/selectable-row-cell.d.ts +4 -0
- package/dist/components/table/hooks/use-selectable-table-rows/components/selectable-row-cell/selectable-row-cell.styles.d.ts +2 -0
- package/dist/components/table/hooks/use-selectable-table-rows/components/selectable-row-cell/selectable-row-cell.types.d.ts +6 -0
- package/dist/components/table/hooks/use-selectable-table-rows/components/selectable-table-row-footer/index.d.ts +1 -0
- package/dist/components/table/hooks/use-selectable-table-rows/components/selectable-table-row-footer/selectable-table-row-footer.d.ts +3 -0
- package/dist/components/table/hooks/use-selectable-table-rows/components/selectable-table-row-footer/selectable-table-row-footer.types.d.ts +3 -0
- package/dist/components/table/hooks/use-selectable-table-rows/components/selectable-table-row-header/index.d.ts +1 -0
- package/dist/components/table/hooks/use-selectable-table-rows/components/selectable-table-row-header/selectable-table-row-header.d.ts +4 -0
- package/dist/components/table/hooks/use-selectable-table-rows/components/selectable-table-row-header/selectable-table-row-header.types.d.ts +5 -0
- package/dist/components/table/hooks/use-selectable-table-rows/helpers/get-row-range/get-row-range.d.ts +3 -0
- package/dist/components/table/hooks/use-selectable-table-rows/helpers/get-row-range/get-row-range.types.d.ts +6 -0
- package/dist/components/table/hooks/use-selectable-table-rows/helpers/get-row-range/index.d.ts +1 -0
- package/dist/components/table/hooks/use-selectable-table-rows/index.d.ts +1 -0
- package/dist/components/table/hooks/use-selectable-table-rows/use-selectable-table-rows.constants.d.ts +6 -0
- package/dist/components/table/hooks/use-selectable-table-rows/use-selectable-table-rows.d.ts +10 -0
- package/dist/components/table/hooks/use-selectable-table-rows/use-selectable-table-rows.types.d.ts +9 -0
- package/dist/components/typography/typography.types.d.ts +4 -1
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/use-provider/index.d.ts +1 -0
- package/dist/hooks/use-provider/use-provider.d.ts +33 -0
- package/dist/hooks/use-provider/use-provider.types.d.ts +2 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.umd.js +1 -1
- package/package.json +1 -1
|
@@ -8,7 +8,8 @@ export declare const StyledContainer: import("styled-components").StyledComponen
|
|
|
8
8
|
export declare const StyledHeader: import("styled-components").StyledComponent<"header", import("styled-components").DefaultTheme, {}, never>;
|
|
9
9
|
export declare const StyledItem: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
|
|
10
10
|
$basic: boolean;
|
|
11
|
-
$disabled
|
|
11
|
+
$disabled?: boolean | undefined;
|
|
12
|
+
$isHeading?: boolean | undefined;
|
|
12
13
|
$justifyContent: Property.JustifyContent | undefined;
|
|
13
|
-
$selected
|
|
14
|
+
$selected?: boolean | undefined;
|
|
14
15
|
}, never>;
|
|
@@ -21,6 +21,8 @@ export interface DropdownMenuProps<T = Record<string, unknown>> {
|
|
|
21
21
|
onKeyDown?: (event: KeyboardEvent) => void;
|
|
22
22
|
onPreselectedIndexChange?: (index: number) => void;
|
|
23
23
|
onSelect?: (item: T | null) => void;
|
|
24
|
+
/** `item` should contain `isHeading: true` */
|
|
25
|
+
renderHeading?: (item: T) => Maybe<ReactNode>;
|
|
24
26
|
renderItem?: (item: T) => Maybe<ReactNode>;
|
|
25
27
|
searchType?: 'startsWith' | 'contains' | 'endsWith';
|
|
26
28
|
searchable?: boolean;
|
|
@@ -50,6 +50,12 @@ export interface ImageProps {
|
|
|
50
50
|
*
|
|
51
51
|
* q => quarter width
|
|
52
52
|
*
|
|
53
|
+
* fh => desktop full width, tablet half width, mobile half width
|
|
54
|
+
*
|
|
55
|
+
* hf => desktop half width, tablet full width, mobile full width
|
|
56
|
+
*
|
|
57
|
+
* hf => desktop half width, tablet full width, mobile full width
|
|
58
|
+
*
|
|
53
59
|
* ffh => desktop full width, tablet full width, mobile half width
|
|
54
60
|
*
|
|
55
61
|
* hff => desktop half width, tablet full width, mobile full width
|
package/dist/components/table/components/table-draggable-row/table-draggable-row.styles.d.ts
CHANGED
|
@@ -1,4 +1 @@
|
|
|
1
|
-
export declare const StyledDraggableRowTr: import("styled-components").StyledComponent<"tr", import("styled-components").DefaultTheme, {
|
|
2
|
-
reorderEnabled: boolean;
|
|
3
|
-
}, never>;
|
|
4
1
|
export declare const StyledDraggableRowWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const StyledPointerFlex: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("../../../../../flex/flex.types").FlexProps & import("react").RefAttributes<import("../../../../../flex/flex.types").FlexProps>>, import("styled-components").DefaultTheme, {}, never>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './clear-selected-rows';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './selectable-row-cell';
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import React, { PropsWithChildren } from 'react';
|
|
2
|
+
import { RowData } from '@tanstack/react-table';
|
|
3
|
+
import { SelectableRowCellProps } from './selectable-row-cell.types';
|
|
4
|
+
export declare const SelectableRowCell: <TData extends RowData<import("../../../..").CustomTData>>(props: React.PropsWithChildren<SelectableRowCellProps<TData>>) => JSX.Element;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const StyledCheckboxCell: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("../../../../../cell/cell.types").CellProps & import("react").RefAttributes<import("../../../../../cell/cell.types").CellProps>>, import("styled-components").DefaultTheme, {}, never>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './selectable-table-row-footer';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './selectable-table-row-header';
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import React, { PropsWithChildren } from 'react';
|
|
2
|
+
import { RowData } from '@tanstack/react-table';
|
|
3
|
+
import { SelectableRowHeaderProps } from './selectable-table-row-header.types';
|
|
4
|
+
export declare const SelectableRowHeader: <TData extends RowData<import("../../../..").CustomTData>>(props: React.PropsWithChildren<SelectableRowHeaderProps<TData>>) => JSX.Element;
|
package/dist/components/table/hooks/use-selectable-table-rows/helpers/get-row-range/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './get-row-range';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './use-selectable-table-rows';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { RowData } from '@tanstack/react-table';
|
|
2
|
+
export declare const useSelectableTableRows: <TData extends RowData<import("../..").CustomTData>>() => {
|
|
3
|
+
deselectRows: (rowIds: (string | number)[]) => void;
|
|
4
|
+
getIsRowSelected: (rowId: number | string) => boolean;
|
|
5
|
+
getSelectedRowData: (props: {
|
|
6
|
+
idProperty: keyof TData;
|
|
7
|
+
records: TData[];
|
|
8
|
+
}) => (TData | undefined)[];
|
|
9
|
+
selectRows: (rowIds: (string | number)[]) => void;
|
|
10
|
+
};
|
package/dist/components/table/hooks/use-selectable-table-rows/use-selectable-table-rows.types.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { RowData } from '@tanstack/react-table';
|
|
2
|
+
import { rowSelectionTypes } from './use-selectable-table-rows.constants';
|
|
3
|
+
export interface RowSelection<TData extends RowData> {
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
idProperty?: keyof TData;
|
|
6
|
+
onSelect?: (selectedRecords: TData[]) => void;
|
|
7
|
+
type: RowSelectionType;
|
|
8
|
+
}
|
|
9
|
+
export type RowSelectionType = typeof rowSelectionTypes[keyof typeof rowSelectionTypes];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Property } from 'csstype';
|
|
2
2
|
import { DefaultTheme } from 'styled-components';
|
|
3
|
-
import { AriaAttributes, CSSProperties } from 'react';
|
|
3
|
+
import { AriaAttributes, CSSProperties, ReactElement } from 'react';
|
|
4
4
|
import { ResolutionAwareProp } from '../../types/resolution-aware-prop.type';
|
|
5
5
|
import { ElementSpacingProps } from '../box/box.types';
|
|
6
6
|
export type TypographyColor = keyof DefaultTheme['colors']['typography'];
|
|
@@ -30,6 +30,9 @@ export interface TypographyProps extends Partial<TypographyDefaultProps>, AriaAt
|
|
|
30
30
|
textStyle?: TextStyle;
|
|
31
31
|
transform?: Property.TextTransform;
|
|
32
32
|
tx?: string;
|
|
33
|
+
txComponents?: readonly ReactElement[] | {
|
|
34
|
+
readonly [tagName: string]: ReactElement;
|
|
35
|
+
};
|
|
33
36
|
txValues?: Record<string, unknown>;
|
|
34
37
|
/** @deprecated
|
|
35
38
|
* use `htmlTag` instead
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './use-provider';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './use-provider';
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import React, { PropsWithChildren } from 'react';
|
|
2
|
+
import { GenericContextValue } from './use-provider.types';
|
|
3
|
+
export declare const createGenericContext: <Type>(defaultValue: Type) => React.Context<GenericContextValue<Type>>;
|
|
4
|
+
/**
|
|
5
|
+
* ```
|
|
6
|
+
* const defaultMyValue = 'foo';
|
|
7
|
+
*
|
|
8
|
+
* const MyContext = createGenericContext(defaultMyValue);
|
|
9
|
+
*
|
|
10
|
+
* const OuterWrapper = () => {
|
|
11
|
+
* const MyProvider = useProvider({
|
|
12
|
+
* Context: MyContext,
|
|
13
|
+
* defaultValue: defaultMyValue,
|
|
14
|
+
* });
|
|
15
|
+
*
|
|
16
|
+
* return (
|
|
17
|
+
* <MyProvider>
|
|
18
|
+
* <InnerComponent />
|
|
19
|
+
* </MyProvider>
|
|
20
|
+
* );
|
|
21
|
+
* }
|
|
22
|
+
*
|
|
23
|
+
* const InnerComponent = () => {
|
|
24
|
+
* const [myValue, setMyValue] = useContext(MyContext);
|
|
25
|
+
*
|
|
26
|
+
* // ...
|
|
27
|
+
* }
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
export declare const useProvider: <Type>(props: {
|
|
31
|
+
Context: React.Context<GenericContextValue<Type>>;
|
|
32
|
+
defaultValue: Type;
|
|
33
|
+
}) => React.MemoExoticComponent<({ children }: PropsWithChildren<Record<never, never>>) => JSX.Element>;
|