oziko-ui-kit 0.0.137 → 0.0.140
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/assets/DMSans-Italic-VariableFont_opsz,wght.ttf +0 -0
- package/dist/assets/DMSans-VariableFont_opsz,wght.ttf +0 -0
- package/dist/assets/JetBrainsMono-Italic-VariableFont_wght.ttf +0 -0
- package/dist/assets/JetBrainsMono-VariableFont_wght.ttf +0 -0
- package/dist/assets/fonts/inter/DMSans-Italic-VariableFont_opsz,wght.ttf +0 -0
- package/dist/assets/fonts/inter/DMSans-VariableFont_opsz,wght.ttf +0 -0
- package/dist/assets/fonts/inter/JetBrainsMono-Italic-VariableFont_wght.ttf +0 -0
- package/dist/assets/fonts/inter/JetBrainsMono-VariableFont_wght.ttf +0 -0
- package/dist/assets/inter/DMSans-Italic-VariableFont_opsz,wght.ttf +0 -0
- package/dist/assets/inter/DMSans-VariableFont_opsz,wght.ttf +0 -0
- package/dist/assets/inter/JetBrainsMono-Italic-VariableFont_wght.ttf +0 -0
- package/dist/assets/inter/JetBrainsMono-VariableFont_wght.ttf +0 -0
- package/dist/components/atoms/button/Button.d.ts +1 -1
- package/dist/components/atoms/divider/Divider.d.ts +6 -0
- package/dist/components/atoms/icon/Icon.d.ts +1 -0
- package/dist/components/atoms/inputs/minimized/boolean/Boolean.d.ts +0 -2
- package/dist/components/atoms/inputs/normal/boolean/Boolean.d.ts +6 -11
- package/dist/components/atoms/inputs/normal/location/Location.d.ts +2 -5
- package/dist/components/atoms/inputs/normal/object/ObjectInput.d.ts +6 -4
- package/dist/components/atoms/inputs/normal/rich-text/RichText.d.ts +0 -4
- package/dist/components/atoms/inputs/normal/storage/Storage.d.ts +0 -16
- package/dist/components/atoms/inputs/normal/text-area/TextArea.d.ts +0 -7
- package/dist/components/atoms/select-option/SelectOption.d.ts +1 -0
- package/dist/components/molecules/accordion/Accordion.d.ts +2 -22
- package/dist/components/molecules/accordion/Accordion.types.d.ts +59 -0
- package/dist/components/molecules/accordion/AccordionElement.d.ts +4 -17
- package/dist/components/molecules/navigator-item/NavigatorItem.d.ts +1 -0
- package/dist/components/molecules/select/Select.d.ts +15 -4
- package/dist/components/organisms/table/Column.d.ts +30 -0
- package/dist/components/organisms/table/Table.d.ts +36 -28
- package/dist/custom-hooks/useInputRepresenter.d.ts +2 -1
- package/dist/index.css +2511 -944
- package/dist/index.export.d.ts +10 -0
- package/dist/index.mjs +16 -16
- package/dist/index.mjs.map +1 -1
- package/dist/utils/iconList.d.ts +1 -1
- package/dist/utils/spicaSvgIcons.d.ts +75 -0
- package/package.json +1 -1
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -5,7 +5,7 @@ import { TypeFlexDimension } from "../../../utils/interface";
|
|
|
5
5
|
export type TypeButton = {
|
|
6
6
|
fullWidth?: boolean;
|
|
7
7
|
containerProps?: TypeFluidContainer;
|
|
8
|
-
shape?: "default" | "circle" | "round";
|
|
8
|
+
shape?: "default" | "circle" | "round" | "chip";
|
|
9
9
|
variant?: "solid" | "outlined" | "dashed" | "filled" | "text" | "link" | "icon";
|
|
10
10
|
color?: "primary" | "default" | "success" | "danger" | "soft" | "transparent";
|
|
11
11
|
loading?: boolean;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import { TypeFlexElement } from "../../../flex-element/FlexElement";
|
|
2
1
|
export type TypeInputBooleanMinimized = {
|
|
3
2
|
checked: boolean;
|
|
4
3
|
disabled?: boolean;
|
|
5
|
-
containerProps?: TypeFlexElement;
|
|
6
4
|
onChange?: (checked: boolean) => void;
|
|
7
5
|
};
|
|
8
6
|
declare const _default: import("react").NamedExoticComponent<TypeInputBooleanMinimized>;
|
|
@@ -1,20 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { TypeFluidContainer } from "../../../fluid-container/FluidContainer";
|
|
3
|
-
import { TypeSwitch } from "../../../switch/Switch";
|
|
4
|
-
import { TypeFlexElement } from "../../../flex-element/FlexElement";
|
|
1
|
+
import { IconName } from "../../../../../utils/iconList";
|
|
5
2
|
export type TypeBooleanInput = {
|
|
6
3
|
checked?: boolean;
|
|
7
4
|
label?: string;
|
|
5
|
+
hideLabel?: boolean;
|
|
8
6
|
disabled?: boolean;
|
|
9
|
-
containerProps?: TypeFluidContainer;
|
|
10
|
-
switchContainerProps?: TypeFlexElement;
|
|
11
|
-
suffixProps?: TypeFlexElement;
|
|
12
|
-
rootProps?: TypeFlexElement;
|
|
13
|
-
labelProps?: TypeText;
|
|
14
7
|
description?: string;
|
|
15
8
|
onChange?: (checked: boolean) => void;
|
|
16
|
-
|
|
9
|
+
iconName?: IconName;
|
|
17
10
|
className?: string;
|
|
18
11
|
};
|
|
19
|
-
declare const _default: import("react").NamedExoticComponent<TypeBooleanInput
|
|
12
|
+
declare const _default: import("react").NamedExoticComponent<TypeBooleanInput & {
|
|
13
|
+
ref?: import("react").RefObject<HTMLDivElement | null>;
|
|
14
|
+
} & import("../../../../../index.export").TypeFlexContainer & import("../../../../../index.export").TypeFlexDimension & Omit<import("react").HTMLAttributes<HTMLDivElement>, "prefix" | "onChange">>;
|
|
20
15
|
export default _default;
|
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import "../../../../../../node_modules/leaflet/dist/leaflet.css";
|
|
3
2
|
import { TypeCoordinates } from "../../../map/Map";
|
|
4
3
|
export type TypeLocationInput = {
|
|
5
4
|
coordinates?: TypeCoordinates;
|
|
6
5
|
title?: string;
|
|
7
6
|
onChange?: (coordinates: TypeCoordinates) => void;
|
|
8
|
-
|
|
7
|
+
className?: string;
|
|
9
8
|
};
|
|
10
|
-
declare const _default: React.NamedExoticComponent<TypeLocationInput
|
|
11
|
-
ref?: React.RefObject<HTMLDivElement | null>;
|
|
12
|
-
} & import("../../../../../index.export").TypeFlexContainer & import("../../../../../index.export").TypeFlexDimension & Omit<React.HTMLAttributes<HTMLDivElement>, "prefix" | "onChange">>;
|
|
9
|
+
declare const _default: React.NamedExoticComponent<TypeLocationInput>;
|
|
13
10
|
export default _default;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { TypeFlexElement } from "../../../flex-element/FlexElement";
|
|
1
|
+
import React from "react";
|
|
3
2
|
import { TypeInputRepresenterError, TypeProperties, TypeRepresenterValue } from "../../../../../custom-hooks/useInputRepresenter";
|
|
3
|
+
import { TypeFlexElement } from "../../../flex-element/FlexElement";
|
|
4
|
+
import { TypeText } from "../../../text/Text";
|
|
4
5
|
export type TypeObjectInput = {
|
|
5
6
|
value?: TypeRepresenterValue;
|
|
6
7
|
properties: TypeProperties;
|
|
@@ -11,6 +12,7 @@ export type TypeObjectInput = {
|
|
|
11
12
|
helperTextProps?: TypeText;
|
|
12
13
|
onChange?: (value: any) => void;
|
|
13
14
|
errors?: TypeInputRepresenterError;
|
|
14
|
-
|
|
15
|
-
|
|
15
|
+
className?: string;
|
|
16
|
+
};
|
|
17
|
+
declare const _default: React.NamedExoticComponent<TypeObjectInput>;
|
|
16
18
|
export default _default;
|
|
@@ -1,14 +1,10 @@
|
|
|
1
1
|
import { JSX } from "react";
|
|
2
2
|
import { TypeFlexElement } from "../../../flex-element/FlexElement";
|
|
3
3
|
import { IconName } from "../../../../../utils/iconList";
|
|
4
|
-
import { TypeFluidContainer } from "../../../fluid-container/FluidContainer";
|
|
5
4
|
export type TypeRichTextInput = {
|
|
6
5
|
headerProps?: {
|
|
7
6
|
icon?: IconName;
|
|
8
7
|
label?: string;
|
|
9
|
-
iconProps?: TypeFlexElement;
|
|
10
|
-
labelProps?: TypeFlexElement;
|
|
11
|
-
container?: TypeFluidContainer;
|
|
12
8
|
};
|
|
13
9
|
value?: string;
|
|
14
10
|
className?: string;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ReactNode } from "react";
|
|
2
2
|
import { TypeFlexElement } from "../../../flex-element/FlexElement";
|
|
3
|
-
import { TypeFluidContainer } from "../../../fluid-container/FluidContainer";
|
|
4
3
|
import { TypeText } from "../../../text/Text";
|
|
5
4
|
import { IconName } from "../../../../../utils/iconList";
|
|
6
5
|
import { TypeFile } from "../../../../../utils/interface";
|
|
@@ -8,30 +7,15 @@ export type TypeStorageInput = {
|
|
|
8
7
|
label?: string;
|
|
9
8
|
file?: TypeFile;
|
|
10
9
|
containerProps?: TypeFlexElement;
|
|
11
|
-
topContainerProps?: {
|
|
12
|
-
container?: TypeFluidContainer;
|
|
13
|
-
root?: TypeFlexElement;
|
|
14
|
-
rootChildren?: TypeText;
|
|
15
|
-
suffix?: TypeFlexElement;
|
|
16
|
-
suffixChildren?: TypeFlexElement;
|
|
17
|
-
editIcon?: IconName;
|
|
18
|
-
deleteIcon?: IconName;
|
|
19
|
-
hideActions?: boolean;
|
|
20
|
-
disableEditIcon?: boolean;
|
|
21
|
-
disableDeleteIcon?: boolean;
|
|
22
|
-
};
|
|
23
10
|
dropzoneContainerProps?: {
|
|
24
|
-
container?: TypeFlexElement;
|
|
25
11
|
uploadIcon?: IconName;
|
|
26
12
|
previewIcon?: IconName;
|
|
27
13
|
description?: ReactNode;
|
|
28
14
|
};
|
|
29
15
|
description?: string;
|
|
30
16
|
errorMessage?: string;
|
|
31
|
-
helperTextContainerProps?: TypeFlexElement;
|
|
32
17
|
helperTextProps?: TypeText;
|
|
33
18
|
onUpload?: (file: File) => void;
|
|
34
|
-
onDelete?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
|
|
35
19
|
onPreview?: () => void;
|
|
36
20
|
onClickShowFileSelect?: () => void;
|
|
37
21
|
};
|
|
@@ -1,20 +1,13 @@
|
|
|
1
1
|
import { ChangeEventHandler } from "react";
|
|
2
2
|
import { TypeFlexElement } from "../../../flex-element/FlexElement";
|
|
3
|
-
import { TypeFluidContainer } from "../../../fluid-container/FluidContainer";
|
|
4
3
|
import { IconName } from "../../../../../utils/iconList";
|
|
5
4
|
export type TypeTextArea = {
|
|
6
5
|
value?: string;
|
|
7
6
|
textAreaProps?: React.TextareaHTMLAttributes<HTMLTextAreaElement> & {
|
|
8
7
|
rows?: number;
|
|
9
8
|
cols?: number;
|
|
10
|
-
ref?: React.RefObject<HTMLTextAreaElement>;
|
|
11
9
|
};
|
|
12
|
-
textAreaContainerProps?: TypeFlexElement;
|
|
13
10
|
containerProps?: TypeFlexElement;
|
|
14
|
-
titlePrefixProps?: TypeFlexElement;
|
|
15
|
-
titleRootProps?: TypeFlexElement;
|
|
16
|
-
titleSuffixProps?: TypeFlexElement;
|
|
17
|
-
titleContainerProps?: TypeFluidContainer;
|
|
18
11
|
title?: string;
|
|
19
12
|
icon?: IconName;
|
|
20
13
|
description?: string;
|
|
@@ -1,25 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
export type TypeAccordionItem = {
|
|
5
|
-
title: React.ReactNode;
|
|
6
|
-
content: React.ReactNode;
|
|
7
|
-
icon?: React.ReactNode;
|
|
8
|
-
className?: string;
|
|
9
|
-
};
|
|
10
|
-
export type TypeAccordionGroup = TypeFlexElement & {
|
|
11
|
-
items: TypeAccordionItem[];
|
|
12
|
-
defaultActiveIndex?: number;
|
|
13
|
-
icon?: React.ReactNode;
|
|
14
|
-
bordered?: boolean;
|
|
15
|
-
header?: TypeFluidContainer;
|
|
16
|
-
openClassName?: string;
|
|
17
|
-
itemClassName?: string;
|
|
18
|
-
contentClassName?: string;
|
|
19
|
-
headerClassName?: string;
|
|
20
|
-
suffixOnHover?: boolean;
|
|
21
|
-
noBackgroundOnFocus?: boolean;
|
|
22
|
-
disableSuffixIcon?: boolean;
|
|
23
|
-
};
|
|
2
|
+
import { TypeAccordionGroup, TypeAccordionItem } from "./Accordion.types";
|
|
3
|
+
export type { TypeAccordionItem, TypeAccordionGroup };
|
|
24
4
|
declare const _default: React.NamedExoticComponent<TypeAccordionGroup>;
|
|
25
5
|
export default _default;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { TypeFluidContainer } from "../../atoms/fluid-container/FluidContainer";
|
|
2
|
+
import { TypeFlexElement } from "../../atoms/flex-element/FlexElement";
|
|
3
|
+
export type TypeAccordionItem = {
|
|
4
|
+
title: React.ReactNode;
|
|
5
|
+
content: React.ReactNode;
|
|
6
|
+
icon?: React.ReactNode;
|
|
7
|
+
className?: string;
|
|
8
|
+
headingPadding?: string;
|
|
9
|
+
bodyPadding?: string;
|
|
10
|
+
borderBottom?: boolean;
|
|
11
|
+
defaultOpen?: boolean;
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
};
|
|
14
|
+
export type TypeAccordionElement = {
|
|
15
|
+
title: React.ReactNode;
|
|
16
|
+
children: React.ReactNode;
|
|
17
|
+
isOpen: boolean;
|
|
18
|
+
onClick: () => void;
|
|
19
|
+
icon?: React.ReactNode;
|
|
20
|
+
bordered?: boolean;
|
|
21
|
+
openClassName?: string;
|
|
22
|
+
itemClassName?: string;
|
|
23
|
+
contentClassName?: string;
|
|
24
|
+
headerClassName?: string;
|
|
25
|
+
suffixOnHover?: boolean;
|
|
26
|
+
noBackgroundOnFocus?: boolean;
|
|
27
|
+
disableSuffixIcon?: boolean;
|
|
28
|
+
disabled?: boolean;
|
|
29
|
+
borderBottom?: boolean;
|
|
30
|
+
headingPadding?: string;
|
|
31
|
+
bodyPadding?: string;
|
|
32
|
+
titleSize?: string;
|
|
33
|
+
titleWeight?: number | string;
|
|
34
|
+
chevronSize?: number;
|
|
35
|
+
mountContent?: "always" | "lazy";
|
|
36
|
+
};
|
|
37
|
+
export type TypeAccordionGroup = TypeFlexElement & {
|
|
38
|
+
items: TypeAccordionItem[];
|
|
39
|
+
defaultActiveIndex?: number;
|
|
40
|
+
icon?: React.ReactNode;
|
|
41
|
+
bordered?: boolean;
|
|
42
|
+
header?: TypeFluidContainer;
|
|
43
|
+
openClassName?: string;
|
|
44
|
+
itemClassName?: string;
|
|
45
|
+
contentClassName?: string;
|
|
46
|
+
headerClassName?: string;
|
|
47
|
+
suffixOnHover?: boolean;
|
|
48
|
+
noBackgroundOnFocus?: boolean;
|
|
49
|
+
disableSuffixIcon?: boolean;
|
|
50
|
+
multiOpen?: boolean;
|
|
51
|
+
borderBottom?: boolean;
|
|
52
|
+
headingPadding?: string;
|
|
53
|
+
bodyPadding?: string;
|
|
54
|
+
titleSize?: string;
|
|
55
|
+
titleWeight?: number | string;
|
|
56
|
+
chevronSize?: number;
|
|
57
|
+
mountContent?: "always" | "lazy";
|
|
58
|
+
gap?: number;
|
|
59
|
+
};
|
|
@@ -1,18 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
icon?: React.ReactNode | IconName;
|
|
6
|
-
isOpen: boolean;
|
|
7
|
-
bordered?: boolean;
|
|
8
|
-
openClassName?: string;
|
|
9
|
-
itemClassName?: string;
|
|
10
|
-
contentClassName?: string;
|
|
11
|
-
headerClassName?: string;
|
|
12
|
-
suffixOnHover?: boolean;
|
|
13
|
-
noBackgroundOnFocus?: boolean;
|
|
14
|
-
onClick: () => void;
|
|
15
|
-
disableSuffixIcon?: boolean;
|
|
16
|
-
};
|
|
17
|
-
declare const _default: import("react").NamedExoticComponent<TypeAccordionElement>;
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { TypeAccordionElement } from "./Accordion.types";
|
|
3
|
+
export type { TypeAccordionElement };
|
|
4
|
+
declare const _default: React.NamedExoticComponent<TypeAccordionElement>;
|
|
18
5
|
export default _default;
|
|
@@ -1,19 +1,30 @@
|
|
|
1
|
-
import { Ref, RefObject } from "react";
|
|
1
|
+
import React, { Ref, RefObject } from "react";
|
|
2
2
|
import { TypeFluidContainer } from "../../atoms/fluid-container/FluidContainer";
|
|
3
3
|
import { TypeLabeledValue } from "../../atoms/select-option/SelectOption";
|
|
4
|
+
import { IconName } from "../../../utils/iconList";
|
|
4
5
|
export type TypeValue = string | number | (string | number)[];
|
|
5
6
|
export type TypeSelectRef = {
|
|
6
7
|
toggleDropdown: (toggleValue?: boolean) => void;
|
|
7
8
|
clear: () => void;
|
|
8
9
|
};
|
|
10
|
+
export type TypeOptionGroup = {
|
|
11
|
+
label: string;
|
|
12
|
+
items: (string | number | TypeLabeledValue)[];
|
|
13
|
+
};
|
|
9
14
|
export type TypeSelect = {
|
|
10
15
|
value?: TypeValue;
|
|
11
|
-
options
|
|
16
|
+
options?: (string | number | TypeLabeledValue)[];
|
|
17
|
+
groups?: TypeOptionGroup[];
|
|
12
18
|
placeholder?: string;
|
|
13
19
|
placement?: "bottom" | "top";
|
|
14
20
|
multiple?: boolean;
|
|
15
21
|
maxCount?: number;
|
|
16
22
|
disabled?: boolean;
|
|
23
|
+
clearable?: boolean;
|
|
24
|
+
searchable?: boolean;
|
|
25
|
+
showFooter?: boolean;
|
|
26
|
+
allowFreeform?: boolean;
|
|
27
|
+
prefixIcon?: IconName;
|
|
17
28
|
popupClassName?: string;
|
|
18
29
|
optionProps?: TypeFluidContainer;
|
|
19
30
|
selectRef?: Ref<TypeSelectRef>;
|
|
@@ -21,12 +32,12 @@ export type TypeSelect = {
|
|
|
21
32
|
onChange?: (value: TypeValue) => void;
|
|
22
33
|
externalDropdownRef?: RefObject<HTMLDivElement | null>;
|
|
23
34
|
};
|
|
24
|
-
declare const _default:
|
|
35
|
+
declare const _default: React.NamedExoticComponent<TypeSelect & {
|
|
25
36
|
prefix?: import("../../atoms/flex-element/FlexElement").TypeFlexElement;
|
|
26
37
|
root?: import("../../atoms/flex-element/FlexElement").TypeFlexElement;
|
|
27
38
|
suffix?: import("../../atoms/flex-element/FlexElement").TypeFlexElement;
|
|
28
39
|
mode?: "hug" | "fill" | "middle";
|
|
29
40
|
} & {
|
|
30
41
|
ref?: RefObject<HTMLDivElement | null>;
|
|
31
|
-
} & import("../../../index.export").TypeFlexContainer & import("../../../index.export").TypeFlexDimension & Omit<
|
|
42
|
+
} & import("../../../index.export").TypeFlexContainer & import("../../../index.export").TypeFlexDimension & Omit<React.HTMLAttributes<HTMLDivElement>, "prefix" | "onChange">>;
|
|
32
43
|
export default _default;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { TypeFlexElement } from "../../../components/atoms/flex-element/FlexElement";
|
|
3
|
+
export declare const parsePx: (value: string | undefined) => number;
|
|
4
|
+
export type TableColumnContainerProps = {
|
|
5
|
+
columnKey?: string;
|
|
6
|
+
children?: React.ReactNode;
|
|
7
|
+
className?: string;
|
|
8
|
+
width?: string;
|
|
9
|
+
minWidth?: string;
|
|
10
|
+
updateColumnWidth?: (key: string, newWidth: string) => void;
|
|
11
|
+
noResizeable?: boolean;
|
|
12
|
+
style?: React.CSSProperties;
|
|
13
|
+
};
|
|
14
|
+
export type TableHeaderCellProps = TypeFlexElement & {
|
|
15
|
+
border?: boolean;
|
|
16
|
+
headerAlign?: "left" | "center" | "right";
|
|
17
|
+
};
|
|
18
|
+
export type TableCellProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
19
|
+
focused?: boolean;
|
|
20
|
+
};
|
|
21
|
+
export declare const HeaderCell: ({ border, headerAlign, children, ...props }: TableHeaderCellProps) => import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export declare const Cell: ({ children, focused, ...props }: TableCellProps) => import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
export declare const DefaultSkeletonCell: () => import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
declare const Column: React.NamedExoticComponent<TableColumnContainerProps> & {
|
|
25
|
+
readonly type: ({ columnKey, children, className, width, minWidth, updateColumnWidth, noResizeable, style, }: TableColumnContainerProps) => import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
} & {
|
|
27
|
+
Header: ({ border, headerAlign, children, ...props }: TableHeaderCellProps) => import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
Cell: ({ children, focused, ...props }: TableCellProps) => import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
};
|
|
30
|
+
export default Column;
|
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { TypeFlexElement } from "../../../components/atoms/flex-element/FlexElement";
|
|
3
2
|
export type TableColumnRenderCellParams<TRow = any> = {
|
|
4
3
|
row: TRow;
|
|
5
4
|
rowIndex: number;
|
|
5
|
+
/** @deprecated Always false — cell focus has been removed. Kept for API compatibility. */
|
|
6
6
|
isFocused: boolean;
|
|
7
7
|
columnKey: string;
|
|
8
8
|
};
|
|
9
|
+
export type TableCellParams<TRow = any> = {
|
|
10
|
+
row: TRow;
|
|
11
|
+
rowIndex: number;
|
|
12
|
+
columnKey: string;
|
|
13
|
+
};
|
|
9
14
|
export type TableColumn<TRow = any> = {
|
|
10
15
|
key: string;
|
|
11
16
|
header: React.ReactNode;
|
|
@@ -17,16 +22,27 @@ export type TableSaveToLocalStorage = {
|
|
|
17
22
|
id: string;
|
|
18
23
|
save?: boolean;
|
|
19
24
|
};
|
|
25
|
+
/** @deprecated Cell-level keyboard navigation has been removed. */
|
|
20
26
|
export type TableCellKeyDownParams = {
|
|
21
27
|
columnKey: string;
|
|
22
28
|
rowIndex: number;
|
|
23
29
|
event: KeyboardEvent;
|
|
24
30
|
};
|
|
31
|
+
export type TableRowClickParams<TRow = any> = {
|
|
32
|
+
row: TRow;
|
|
33
|
+
rowIndex: number;
|
|
34
|
+
event: React.MouseEvent<HTMLTableRowElement>;
|
|
35
|
+
};
|
|
25
36
|
export type TableSkeletonCellParams<TRow = any> = {
|
|
26
37
|
column: TableColumn<TRow>;
|
|
27
38
|
rowIndex: number;
|
|
28
39
|
};
|
|
29
|
-
export type
|
|
40
|
+
export type TableEmptyStateProps = {
|
|
41
|
+
title?: React.ReactNode;
|
|
42
|
+
description?: React.ReactNode;
|
|
43
|
+
actions?: React.ReactNode;
|
|
44
|
+
};
|
|
45
|
+
export type TableProps<TRow = any> = {
|
|
30
46
|
columns: TableColumn<TRow>[];
|
|
31
47
|
data: TRow[];
|
|
32
48
|
loading?: boolean;
|
|
@@ -35,34 +51,26 @@ export type TypeTable<TRow = any> = {
|
|
|
35
51
|
saveToLocalStorage?: TableSaveToLocalStorage;
|
|
36
52
|
fixedColumns?: string[];
|
|
37
53
|
noResizeableColumns?: string[];
|
|
38
|
-
|
|
54
|
+
onRowClick?: (params: TableRowClickParams<TRow>) => void;
|
|
39
55
|
tableClassName?: string;
|
|
56
|
+
/** @deprecated No-op — columns are now <th>/<td> elements. */
|
|
40
57
|
columnClassName?: string;
|
|
41
58
|
headerClassName?: string;
|
|
42
59
|
cellClassName?: string;
|
|
60
|
+
/** @deprecated Cell focus has been removed. Use onRowClick instead. */
|
|
61
|
+
isCellFocusable?: (params: TableCellParams<TRow>) => boolean;
|
|
62
|
+
/** @deprecated Cell-level keyboard navigation has been removed. */
|
|
63
|
+
onCellKeyDown?: (params: TableCellKeyDownParams) => void;
|
|
64
|
+
emptyState?: TableEmptyStateProps;
|
|
43
65
|
};
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
export type
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
};
|
|
56
|
-
export type TypeColumnComponent = React.FC<TypeColumn> & {
|
|
57
|
-
Header: typeof HeaderCell;
|
|
58
|
-
Cell: typeof Cell;
|
|
59
|
-
};
|
|
60
|
-
export type TypeHeaderCell = TypeFlexElement & {
|
|
61
|
-
border?: boolean;
|
|
62
|
-
headerAlign?: "left" | "center" | "right";
|
|
63
|
-
};
|
|
64
|
-
declare const HeaderCell: ({ border, headerAlign, children, ...props }: TypeHeaderCell) => import("react/jsx-runtime").JSX.Element;
|
|
65
|
-
export type TypeCell = React.HTMLAttributes<HTMLDivElement> & {
|
|
66
|
-
focused?: boolean;
|
|
67
|
-
};
|
|
68
|
-
declare const Cell: ({ children, focused, ...props }: TypeCell) => import("react/jsx-runtime").JSX.Element;
|
|
66
|
+
export type { TableColumnContainerProps, TableHeaderCellProps, TableCellProps, } from "./Column";
|
|
67
|
+
/** @deprecated Use TableProps instead */
|
|
68
|
+
export type TypeTable<TRow = any> = TableProps<TRow>;
|
|
69
|
+
/** @deprecated Use TableColumnContainerProps instead */
|
|
70
|
+
export type { TableColumnContainerProps as TypeColumn } from "./Column";
|
|
71
|
+
/** @deprecated Use TableHeaderCellProps instead */
|
|
72
|
+
export type { TableHeaderCellProps as TypeHeaderCell } from "./Column";
|
|
73
|
+
/** @deprecated Use TableCellProps instead */
|
|
74
|
+
export type { TableCellProps as TypeCell } from "./Column";
|
|
75
|
+
declare const Table: <TRow = any>(props: TableProps<TRow>) => React.ReactElement;
|
|
76
|
+
export default Table;
|
|
@@ -43,7 +43,7 @@ export type TypeValueType = string | number | boolean | string[] | number[] | bo
|
|
|
43
43
|
export type TypeRepresenterValue = {
|
|
44
44
|
[key: string]: TypeValueType | TypeRepresenterValue;
|
|
45
45
|
};
|
|
46
|
-
export type TypeInputType = "string" | "number" | "textarea" | "date" | "boolean" | "color" | "storage" | "multiselect" | "location" | "richtext" | "object" | "array" | "chip" | "relation" | "select";
|
|
46
|
+
export type TypeInputType = "string" | "number" | "textarea" | "date" | "boolean" | "color" | "storage" | "multiselect" | "location" | "richtext" | "object" | "array" | "chip" | "relation" | "select" | "json";
|
|
47
47
|
type TypeOptions = {
|
|
48
48
|
position?: "top" | "bottom" | "left" | "right";
|
|
49
49
|
index?: boolean;
|
|
@@ -119,6 +119,7 @@ export type TypeInputTypeMap = {
|
|
|
119
119
|
chip: (props: TypeChipInputProps<string[] | number[]>) => ReactNode;
|
|
120
120
|
relation: (props: TypeRelationInputProps<TypeLabeledValue[] | TypeLabeledValue>) => ReactNode;
|
|
121
121
|
select: (props: TypeSelectInputProps<string>) => ReactNode;
|
|
122
|
+
json: (props: TypeInputProps<any>) => ReactNode;
|
|
122
123
|
};
|
|
123
124
|
declare const types: TypeInputTypeMap;
|
|
124
125
|
type TypeUseInputRepresenter = {
|