@stella-source/stellasource-dsl 3.5.2 → 4.0.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/dist/cjs/index.js +920 -532
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/components/CheckBox/CheckBox.d.ts +4 -0
- package/dist/cjs/types/components/CheckBox/CheckBox.stories.d.ts +30 -0
- package/dist/cjs/types/components/CheckBox/styles.d.ts +20 -0
- package/dist/cjs/types/components/CheckBox/types.d.ts +19 -0
- package/dist/cjs/types/components/CheckBoxGroup/CheckBoxGroup.d.ts +4 -0
- package/dist/cjs/types/components/CheckBoxGroup/CheckBoxGroup.stories.d.ts +63 -0
- package/dist/cjs/types/components/CheckBoxGroup/styles.d.ts +4 -0
- package/dist/cjs/types/components/CheckBoxGroup/types.d.ts +28 -0
- package/dist/cjs/types/components/Label/Label.d.ts +1 -1
- package/dist/cjs/types/components/Label/Label.stories.d.ts +1 -1
- package/dist/cjs/types/components/Label/styles.d.ts +2 -1
- package/dist/cjs/types/components/Label/types.d.ts +2 -0
- package/dist/cjs/types/components/StellaIcon/types.d.ts +1 -1
- package/dist/cjs/types/components/Sync/styles.d.ts +1 -1
- package/dist/cjs/types/components/Table/Table.d.ts +1 -1
- package/dist/cjs/types/components/Table/TableComponents/CheckboxDropdownMenu.d.ts +26 -0
- package/dist/cjs/types/components/Table/styles.d.ts +3 -1
- package/dist/cjs/types/components/Table/types.d.ts +9 -3
- package/dist/cjs/types/components/Table/useTableState.d.ts +9 -0
- package/dist/cjs/types/index.d.ts +3 -1
- package/dist/esm/index.esm.js +1276 -890
- package/dist/esm/index.esm.js.map +1 -1
- package/dist/esm/types/components/CheckBox/CheckBox.d.ts +4 -0
- package/dist/esm/types/components/CheckBox/CheckBox.stories.d.ts +30 -0
- package/dist/esm/types/components/CheckBox/styles.d.ts +20 -0
- package/dist/esm/types/components/CheckBox/types.d.ts +19 -0
- package/dist/esm/types/components/CheckBoxGroup/CheckBoxGroup.d.ts +4 -0
- package/dist/esm/types/components/CheckBoxGroup/CheckBoxGroup.stories.d.ts +63 -0
- package/dist/esm/types/components/CheckBoxGroup/styles.d.ts +4 -0
- package/dist/esm/types/components/CheckBoxGroup/types.d.ts +28 -0
- package/dist/esm/types/components/Label/Label.d.ts +1 -1
- package/dist/esm/types/components/Label/Label.stories.d.ts +1 -1
- package/dist/esm/types/components/Label/styles.d.ts +2 -1
- package/dist/esm/types/components/Label/types.d.ts +2 -0
- package/dist/esm/types/components/StellaIcon/types.d.ts +1 -1
- package/dist/esm/types/components/Sync/styles.d.ts +1 -1
- package/dist/esm/types/components/Table/Table.d.ts +1 -1
- package/dist/esm/types/components/Table/TableComponents/CheckboxDropdownMenu.d.ts +26 -0
- package/dist/esm/types/components/Table/styles.d.ts +3 -1
- package/dist/esm/types/components/Table/types.d.ts +9 -3
- package/dist/esm/types/components/Table/useTableState.d.ts +9 -0
- package/dist/esm/types/index.d.ts +3 -1
- package/dist/index.d.ts +64 -6
- package/package.json +1 -1
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { CheckBoxProps } from "./types";
|
|
3
|
+
declare const CheckBox: ({ id, className, label, checked, indeterminate, disabled, defaultChecked, align, fontSize, onChange, htmlProps, }: CheckBoxProps) => React.JSX.Element;
|
|
4
|
+
export default CheckBox;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { CheckBoxFontSizeVariant, CheckBoxProps } from "./types";
|
|
3
|
+
declare const _default: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: ({ id, className, label, checked, indeterminate, disabled, defaultChecked, align, fontSize, onChange, htmlProps, }: CheckBoxProps) => React.JSX.Element;
|
|
6
|
+
tags: string[];
|
|
7
|
+
argTypes: {
|
|
8
|
+
label: {
|
|
9
|
+
control: string;
|
|
10
|
+
};
|
|
11
|
+
align: {
|
|
12
|
+
control: string;
|
|
13
|
+
options: string[];
|
|
14
|
+
};
|
|
15
|
+
fontSize: {
|
|
16
|
+
control: string;
|
|
17
|
+
options: CheckBoxFontSizeVariant[];
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
args: CheckBoxProps;
|
|
21
|
+
};
|
|
22
|
+
export default _default;
|
|
23
|
+
export declare const SingleCheckBox: {
|
|
24
|
+
args: {
|
|
25
|
+
disabled: boolean;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
export declare const MulitpleCheckBoxes: {
|
|
29
|
+
render: () => React.JSX.Element;
|
|
30
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
declare const IconWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "$disabled" | "$hasLabel"> & {
|
|
2
|
+
$disabled?: boolean;
|
|
3
|
+
$hasLabel?: boolean;
|
|
4
|
+
}, never> & Partial<Pick<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "$disabled" | "$hasLabel"> & {
|
|
5
|
+
$disabled?: boolean;
|
|
6
|
+
$hasLabel?: boolean;
|
|
7
|
+
}, never>>> & string;
|
|
8
|
+
declare const CheckBoxWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, "$align" | "$disabled" | "$fontSize"> & {
|
|
9
|
+
$disabled?: boolean;
|
|
10
|
+
$align?: "top" | "center";
|
|
11
|
+
$fontSize?: string | null;
|
|
12
|
+
}, never> & Partial<Pick<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, "$align" | "$disabled" | "$fontSize"> & {
|
|
13
|
+
$disabled?: boolean;
|
|
14
|
+
$align?: "top" | "center";
|
|
15
|
+
$fontSize?: string | null;
|
|
16
|
+
}, never>>> & string;
|
|
17
|
+
declare const HiddenInput: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, keyof import("react").ClassAttributes<HTMLInputElement> | keyof import("react").InputHTMLAttributes<HTMLInputElement>> & import("react").ClassAttributes<HTMLInputElement> & import("react").InputHTMLAttributes<HTMLInputElement>, "type"> & Partial<Pick<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, keyof import("react").ClassAttributes<HTMLInputElement> | keyof import("react").InputHTMLAttributes<HTMLInputElement>> & import("react").ClassAttributes<HTMLInputElement> & import("react").InputHTMLAttributes<HTMLInputElement>, "type">>> & string;
|
|
18
|
+
declare const LabelGroup: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never> & Partial<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>> & string;
|
|
19
|
+
declare const MainLabel: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never> & Partial<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>>> & string;
|
|
20
|
+
export { CheckBoxWrapper, HiddenInput, LabelGroup, MainLabel, IconWrapper };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { HTMLAttributes, ReactElement } from "react";
|
|
2
|
+
export declare enum CheckBoxFontSizeVariant {
|
|
3
|
+
SIZE_12 = "12px",
|
|
4
|
+
SIZE_14 = "14px",
|
|
5
|
+
SIZE_16 = "16px"
|
|
6
|
+
}
|
|
7
|
+
export interface CheckBoxProps {
|
|
8
|
+
id: string;
|
|
9
|
+
className?: string;
|
|
10
|
+
label?: string | ReactElement;
|
|
11
|
+
checked?: boolean;
|
|
12
|
+
indeterminate?: boolean;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
defaultChecked?: boolean;
|
|
15
|
+
align?: "top" | "center";
|
|
16
|
+
fontSize?: `${CheckBoxFontSizeVariant}`;
|
|
17
|
+
onChange?: (id: string, checked: boolean) => void;
|
|
18
|
+
htmlProps?: HTMLAttributes<HTMLInputElement>;
|
|
19
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { CheckBoxGroupProps } from "./types";
|
|
3
|
+
declare const CheckBoxGroup: ({ defaultOptions, onChange, heading, required, tooltipText, disabled, isSelectAllEnabled, fontSize, className, }: CheckBoxGroupProps) => React.JSX.Element;
|
|
4
|
+
export default CheckBoxGroup;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { CheckBoxGroupOption } from "./types";
|
|
3
|
+
import { CheckBoxFontSizeVariant } from "../CheckBox/types";
|
|
4
|
+
declare const _default: {
|
|
5
|
+
title: string;
|
|
6
|
+
component: ({ defaultOptions, onChange, heading, required, tooltipText, disabled, isSelectAllEnabled, fontSize, className, }: import("./types").CheckBoxGroupProps) => React.JSX.Element;
|
|
7
|
+
tags: string[];
|
|
8
|
+
argTypes: {
|
|
9
|
+
heading: {
|
|
10
|
+
control: string;
|
|
11
|
+
};
|
|
12
|
+
disabled: {
|
|
13
|
+
control: string;
|
|
14
|
+
};
|
|
15
|
+
isSelectAllEnabled: {
|
|
16
|
+
control: string;
|
|
17
|
+
};
|
|
18
|
+
fontSize: {
|
|
19
|
+
control: string;
|
|
20
|
+
options: CheckBoxFontSizeVariant[];
|
|
21
|
+
};
|
|
22
|
+
options: {
|
|
23
|
+
control: string;
|
|
24
|
+
};
|
|
25
|
+
onChange: {
|
|
26
|
+
action: string;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
args: {
|
|
30
|
+
heading: string;
|
|
31
|
+
disabled: boolean;
|
|
32
|
+
isSelectAllEnabled: boolean;
|
|
33
|
+
fontSize: CheckBoxFontSizeVariant;
|
|
34
|
+
options: CheckBoxGroupOption[];
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
export default _default;
|
|
38
|
+
type StoryArgs = {
|
|
39
|
+
heading?: string;
|
|
40
|
+
disabled?: boolean;
|
|
41
|
+
isSelectAllEnabled?: boolean;
|
|
42
|
+
fontSize?: string;
|
|
43
|
+
required?: boolean;
|
|
44
|
+
tooltipText?: string;
|
|
45
|
+
};
|
|
46
|
+
export declare const Default: {
|
|
47
|
+
render: (args: StoryArgs) => React.JSX.Element;
|
|
48
|
+
};
|
|
49
|
+
export declare const WithSelectAll: {
|
|
50
|
+
args: {
|
|
51
|
+
isSelectAllEnabled: boolean;
|
|
52
|
+
};
|
|
53
|
+
render: (args: StoryArgs) => React.JSX.Element;
|
|
54
|
+
};
|
|
55
|
+
export declare const NestedTree: {
|
|
56
|
+
render: () => React.JSX.Element;
|
|
57
|
+
};
|
|
58
|
+
export declare const AllDisabled: {
|
|
59
|
+
render: (args: StoryArgs) => React.JSX.Element;
|
|
60
|
+
args: {
|
|
61
|
+
disabled: boolean;
|
|
62
|
+
};
|
|
63
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
declare const GroupWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").FieldsetHTMLAttributes<HTMLFieldSetElement>, HTMLFieldSetElement>, never> & Partial<Pick<import("react").DetailedHTMLProps<import("react").FieldsetHTMLAttributes<HTMLFieldSetElement>, HTMLFieldSetElement>, never>>> & string;
|
|
2
|
+
declare const HeadingRow: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never> & Partial<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>> & string;
|
|
3
|
+
declare const Legend: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLLegendElement>, HTMLLegendElement>, never> & Partial<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLLegendElement>, HTMLLegendElement>, never>>> & string;
|
|
4
|
+
export { GroupWrapper, HeadingRow, Legend };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { ReactElement } from "react";
|
|
2
|
+
import { CheckBoxFontSizeVariant } from "../CheckBox/types";
|
|
3
|
+
export interface CheckBoxGroupOption {
|
|
4
|
+
id: string;
|
|
5
|
+
label: string | ReactElement;
|
|
6
|
+
checked?: boolean;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
indeterminate?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export interface CheckBoxGroupChangeOption {
|
|
11
|
+
id: string;
|
|
12
|
+
isChecked: boolean;
|
|
13
|
+
isSelectAllClicked: boolean;
|
|
14
|
+
}
|
|
15
|
+
export interface CheckBoxGroupChangePayload {
|
|
16
|
+
options: CheckBoxGroupChangeOption[];
|
|
17
|
+
}
|
|
18
|
+
export interface CheckBoxGroupProps {
|
|
19
|
+
defaultOptions: CheckBoxGroupOption[];
|
|
20
|
+
onChange: (payload: CheckBoxGroupChangePayload) => void;
|
|
21
|
+
heading?: string;
|
|
22
|
+
required?: boolean;
|
|
23
|
+
tooltipText?: string;
|
|
24
|
+
disabled?: boolean;
|
|
25
|
+
isSelectAllEnabled?: boolean;
|
|
26
|
+
fontSize?: `${CheckBoxFontSizeVariant}`;
|
|
27
|
+
className?: string;
|
|
28
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { LabelProps, LabelWithChildrenProps } from "./types";
|
|
3
|
-
declare const Label: ({ hideLabel, labelValue, required, tooltipText, children, htmlFor, htmlProps, id, className, }: LabelProps | LabelWithChildrenProps) => React.JSX.Element;
|
|
3
|
+
declare const Label: ({ hideLabel, labelValue, required, tooltipText, children, htmlFor, htmlProps, id, isPointerOnHover, className, }: LabelProps | LabelWithChildrenProps) => React.JSX.Element;
|
|
4
4
|
export default Label;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { LabelProps, LabelWithChildrenProps } from "./types";
|
|
2
2
|
declare const _default: {
|
|
3
3
|
title: string;
|
|
4
|
-
component: ({ hideLabel, labelValue, required, tooltipText, children, htmlFor, htmlProps, id, className, }: LabelProps | LabelWithChildrenProps) => import("react").JSX.Element;
|
|
4
|
+
component: ({ hideLabel, labelValue, required, tooltipText, children, htmlFor, htmlProps, id, isPointerOnHover, className, }: LabelProps | LabelWithChildrenProps) => import("react").JSX.Element;
|
|
5
5
|
tags: string[];
|
|
6
6
|
parameters: {};
|
|
7
7
|
args: LabelProps | LabelWithChildrenProps;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
interface LabelComponentProps {
|
|
2
2
|
$hideLabel?: boolean;
|
|
3
|
+
$isPointerOnHover?: boolean;
|
|
3
4
|
}
|
|
4
5
|
declare const RequiredIcon: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("../StellaIcon/types").StellaIconProps, never> & Partial<Pick<import("../StellaIcon/types").StellaIconProps, never>>> & string & Omit<({ iconName, size, color, className, id, dataTestId, }: import("../StellaIcon/types").StellaIconProps) => import("react").JSX.Element, keyof import("react").Component<any, {}, any>>;
|
|
5
6
|
declare const ToolTipIcon: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("../Tooltip/types").TooltipProps, never> & Partial<Pick<import("../Tooltip/types").TooltipProps, never>>> & string & Omit<({ title, placement, type, ariaLabel, iconSize, htmlProps, className, id, }: import("../Tooltip/types").TooltipProps) => import("react").JSX.Element, keyof import("react").Component<any, {}, any>>;
|
|
6
|
-
declare const LabelComponent: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>,
|
|
7
|
+
declare const LabelComponent: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, keyof LabelComponentProps> & LabelComponentProps, never> & Partial<Pick<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, keyof LabelComponentProps> & LabelComponentProps, never>>> & string;
|
|
7
8
|
declare const LabelContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never> & Partial<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>>> & string;
|
|
8
9
|
export { LabelComponent, RequiredIcon, ToolTipIcon, LabelContainer };
|
|
@@ -8,6 +8,7 @@ export interface LabelProps {
|
|
|
8
8
|
tooltipText?: string;
|
|
9
9
|
children?: never;
|
|
10
10
|
htmlFor: string;
|
|
11
|
+
isPointerOnHover?: boolean;
|
|
11
12
|
htmlProps?: HTMLAttributes<HTMLLabelElement>;
|
|
12
13
|
}
|
|
13
14
|
export interface LabelWithChildrenProps {
|
|
@@ -19,5 +20,6 @@ export interface LabelWithChildrenProps {
|
|
|
19
20
|
tooltipText?: string;
|
|
20
21
|
htmlFor?: never;
|
|
21
22
|
children: ReactElement;
|
|
23
|
+
isPointerOnHover?: boolean;
|
|
22
24
|
htmlProps?: HTMLAttributes<HTMLLabelElement>;
|
|
23
25
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type StellaIconDefinition = "search" | "required" | "help" | "info" | "kebab-menu" | "error" | "warning" | "filter" | "sort" | "close" | "add" | "stella-logo" | "chevron-right" | "chevron-down" | "caret-right" | "caret-down" | "success" | "in-progress" | "complete" | "calendar" | "unlocked" | "locked" | "settings" | "preferences" | "account-settings" | "user" | "company-details" | "collapse" | "expand" | "star-filled" | "star-outline" | "dashboard" | "shopping-cart" | "calculator" | "pricing-strategies" | "stella-finance" | "resource-center" | "line-item-pricing" | "basket-pricing" | "paperclip" | "thumbs-up" | "thumbs-down" | "send" | "palette" | "eye" | "eye-slash" | "sync" | "chevron-left" | "check-square" | "money" | "currency-dollar" | "x-circle" | "empty" | "hourglass-simple-low" | "broadcast" | "list-checks" | "note-pencil" | "truck";
|
|
1
|
+
export type StellaIconDefinition = "search" | "required" | "help" | "info" | "kebab-menu" | "error" | "warning" | "filter" | "sort" | "close" | "add" | "stella-logo" | "chevron-right" | "chevron-down" | "caret-right" | "caret-down" | "success" | "in-progress" | "complete" | "calendar" | "unlocked" | "locked" | "settings" | "preferences" | "account-settings" | "user" | "company-details" | "collapse" | "expand" | "star-filled" | "star-outline" | "dashboard" | "shopping-cart" | "calculator" | "pricing-strategies" | "stella-finance" | "resource-center" | "line-item-pricing" | "basket-pricing" | "paperclip" | "thumbs-up" | "thumbs-down" | "send" | "palette" | "eye" | "eye-slash" | "sync" | "chevron-left" | "check-square" | "money" | "currency-dollar" | "x-circle" | "empty" | "hourglass-simple-low" | "broadcast" | "list-checks" | "note-pencil" | "truck" | "table";
|
|
2
2
|
export interface StellaIconProps {
|
|
3
3
|
iconName: StellaIconDefinition;
|
|
4
4
|
size?: number;
|
|
@@ -2,6 +2,6 @@ interface SyncContainerProps {
|
|
|
2
2
|
$labelPosition?: "right" | "left";
|
|
3
3
|
}
|
|
4
4
|
declare const SyncContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "$labelPosition"> & SyncContainerProps, never> & Partial<Pick<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "$labelPosition"> & SyncContainerProps, never>>> & string;
|
|
5
|
-
declare const CustomLabel: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("../Label/types").LabelProps | import("../Label/types").LabelWithChildrenProps, never> & Partial<Pick<import("../Label/types").LabelProps | import("../Label/types").LabelWithChildrenProps, never>>> & string & Omit<({ hideLabel, labelValue, required, tooltipText, children, htmlFor, htmlProps, id, className, }: import("../Label/types").LabelProps | import("../Label/types").LabelWithChildrenProps) => import("react").JSX.Element, keyof import("react").Component<any, {}, any>>;
|
|
5
|
+
declare const CustomLabel: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("../Label/types").LabelProps | import("../Label/types").LabelWithChildrenProps, never> & Partial<Pick<import("../Label/types").LabelProps | import("../Label/types").LabelWithChildrenProps, never>>> & string & Omit<({ hideLabel, labelValue, required, tooltipText, children, htmlFor, htmlProps, id, isPointerOnHover, className, }: import("../Label/types").LabelProps | import("../Label/types").LabelWithChildrenProps) => import("react").JSX.Element, keyof import("react").Component<any, {}, any>>;
|
|
6
6
|
declare const CustomIconButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Omit<import("../IconButton/types").IconButtonProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>, never> & Partial<Pick<Omit<import("../IconButton/types").IconButtonProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>, never>>> & string & Omit<import("react").ForwardRefExoticComponent<Omit<import("../IconButton/types").IconButtonProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>>, keyof import("react").Component<any, {}, any>>;
|
|
7
7
|
export { CustomIconButton, CustomLabel, SyncContainer };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { TableProps } from "./types";
|
|
3
|
-
declare function Table<T>({ columns, data, isLoading, serverSide, onPageChange, onSortChange, onFilterChange, onRowSelect, onRowClick, rowStatuses, showSelection, showRowOptions, showPagination, variant, paginationDetails, selectionMenuItems, dataAuto, dataTestId, id, className, htmlProps, resetTrigger, emptyTableState, defaultFilters, staticFilters, }: TableProps<T>): React.JSX.Element;
|
|
3
|
+
declare function Table<T>({ columns, data, isLoading, serverSide, onPageChange, onSortChange, onFilterChange, onRowSelect, onRowClick, rowStatuses, showSelection, showRowOptions, showPagination, variant, paginationDetails, selectionMenuItems, dataAuto, dataTestId, id, className, htmlProps, resetTrigger, emptyTableState, defaultFilters, staticFilters, enableShowHide, globalActions, }: TableProps<T>): React.JSX.Element;
|
|
4
4
|
export default Table;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React, { RefObject } from "react";
|
|
2
|
+
export interface CheckboxDropdownOption {
|
|
3
|
+
key: string;
|
|
4
|
+
value: string;
|
|
5
|
+
}
|
|
6
|
+
interface CheckboxDropdownMenuProps {
|
|
7
|
+
options: CheckboxDropdownOption[];
|
|
8
|
+
selected: (string | number)[];
|
|
9
|
+
mode?: "search" | "singleSelect" | "multiSelect";
|
|
10
|
+
coords: {
|
|
11
|
+
top: number;
|
|
12
|
+
left: number;
|
|
13
|
+
};
|
|
14
|
+
menuRef: RefObject<HTMLDivElement | null>;
|
|
15
|
+
onApply: (selected: (string | number)[]) => void;
|
|
16
|
+
onClear: () => void;
|
|
17
|
+
showSelectAll?: boolean;
|
|
18
|
+
showClear?: boolean;
|
|
19
|
+
searchInputId?: string;
|
|
20
|
+
searchInputLabel?: string;
|
|
21
|
+
onSearch?: (value: string) => void;
|
|
22
|
+
onSearchBlur?: () => void;
|
|
23
|
+
serverSide?: boolean;
|
|
24
|
+
}
|
|
25
|
+
declare const CheckboxDropdownMenu: ({ options, selected, mode, coords, menuRef, onApply, onClear, showSelectAll, showClear, searchInputId, searchInputLabel, onSearch, onSearchBlur, serverSide, }: CheckboxDropdownMenuProps) => React.ReactPortal;
|
|
26
|
+
export default CheckboxDropdownMenu;
|
|
@@ -80,4 +80,6 @@ declare const EmptyTableSection: import("styled-components/dist/types").IStyledC
|
|
|
80
80
|
declare const EmptyTableHeader: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, never> & Partial<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, never>>> & string;
|
|
81
81
|
declare const EmptyTableSubHeader: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, never> & Partial<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, never>>> & string;
|
|
82
82
|
declare const ClearFilterButtonRow: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never> & Partial<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>> & string;
|
|
83
|
-
|
|
83
|
+
declare const ActionBar: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never> & Partial<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>> & string;
|
|
84
|
+
declare const GlobalActionWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never> & Partial<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>> & string;
|
|
85
|
+
export { HeaderCell, TableWrapper, TableWrapperScroll, StyledTable, CustomIconButton, SortButton, HeaderRow, FilterMenu, Checkbox, BodyCell, HeaderCellPosition, MenuButton, MenuItem, FilterBoxLabel, LoadingShimmer, FilterLabelTransparent, CustomPagination, CellRow, MenuItemGroup, KebabAlign, MenuItemOption, EmptyTableCell, EmptyTableSection, EmptyTableHeader, EmptyTableSubHeader, ClearFilterButtonRow, ActionBar, GlobalActionWrapper, };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ColumnDef, ColumnFiltersState, Row } from "@tanstack/react-table";
|
|
2
|
-
import { HTMLAttributes } from "react";
|
|
1
|
+
import { ColumnDef, ColumnFiltersState, Row, Table } from "@tanstack/react-table";
|
|
2
|
+
import { HTMLAttributes, ReactElement } from "react";
|
|
3
3
|
declare enum TableVariant {
|
|
4
4
|
PRIMARY = "Primary",
|
|
5
5
|
SECONDARY = "Secondary"
|
|
@@ -33,7 +33,7 @@ export interface TableProps<T> {
|
|
|
33
33
|
}[];
|
|
34
34
|
dataTestId?: string;
|
|
35
35
|
dataAuto?: string;
|
|
36
|
-
id
|
|
36
|
+
id: string;
|
|
37
37
|
className?: string;
|
|
38
38
|
htmlProps?: HTMLAttributes<HTMLTableElement>;
|
|
39
39
|
paginationDetails?: PaginationDetails;
|
|
@@ -53,6 +53,11 @@ export interface TableProps<T> {
|
|
|
53
53
|
id: string;
|
|
54
54
|
value: unknown;
|
|
55
55
|
}[];
|
|
56
|
+
enableShowHide?: boolean;
|
|
57
|
+
globalActions?: {
|
|
58
|
+
element: ReactElement;
|
|
59
|
+
onChange?: (table?: Table<T>) => void;
|
|
60
|
+
}[];
|
|
56
61
|
}
|
|
57
62
|
export interface CustomColumnMeta {
|
|
58
63
|
headerAlign?: "left" | "right";
|
|
@@ -64,6 +69,7 @@ export interface CustomColumnMeta {
|
|
|
64
69
|
value?: string;
|
|
65
70
|
}[];
|
|
66
71
|
filterMode?: "singleSelect" | "multiSelect" | "search";
|
|
72
|
+
defaultHidden?: boolean;
|
|
67
73
|
}
|
|
68
74
|
export type RowStatus = "action-pending" | "completed";
|
|
69
75
|
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ColumnSizingState, SortingState, VisibilityState } from "@tanstack/react-table";
|
|
2
|
+
type PersistedTableState = {
|
|
3
|
+
columnVisibility: VisibilityState;
|
|
4
|
+
columnSizing: ColumnSizingState;
|
|
5
|
+
sorting: SortingState;
|
|
6
|
+
};
|
|
7
|
+
export declare function loadTableState(tableId: string): Partial<PersistedTableState>;
|
|
8
|
+
export declare function usePersistTableState(tableId: string, state: Partial<PersistedTableState>, sizingDebounceMs?: number): void;
|
|
9
|
+
export {};
|
|
@@ -23,7 +23,9 @@ import { StellaButtonVariant } from "./components/StellaButton/types";
|
|
|
23
23
|
import { Styles } from "./shared/tokens";
|
|
24
24
|
import "./shared/tokens/tokens.css";
|
|
25
25
|
import OrderStatus from "./components/OrderStatus/OrderStatus";
|
|
26
|
+
import CheckBoxGroup from "./components/CheckBoxGroup/CheckBoxGroup";
|
|
27
|
+
import CheckBox from "./components/CheckBox/CheckBox";
|
|
26
28
|
/**Exports */
|
|
27
29
|
export type { StellaIconDefinition } from "./components/StellaIcon/types";
|
|
28
30
|
export type { CustomColumnMeta } from "./components/Table/types";
|
|
29
|
-
export { Tabs, Label, StellaButton, IconButton, Loader, HelperText, Tooltip, StellaIcon, TextInput, PasswordInput, NumberInput, Table, Pagination, Sync, TableUnitsAndTotals, StellaButtonVariant, PaymentStatus, OrderStatus, SelectorChip, Styles, };
|
|
31
|
+
export { Tabs, Label, StellaButton, IconButton, Loader, HelperText, Tooltip, StellaIcon, TextInput, PasswordInput, NumberInput, Table, Pagination, Sync, TableUnitsAndTotals, StellaButtonVariant, PaymentStatus, OrderStatus, SelectorChip, CheckBox, CheckBoxGroup, Styles, };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React$1, { HTMLAttributes, ReactElement } from 'react';
|
|
2
2
|
import { TooltipProps as TooltipProps$1 } from 'antd';
|
|
3
|
-
import { ColumnDef, ColumnFiltersState, Row } from '@tanstack/react-table';
|
|
3
|
+
import { ColumnDef, ColumnFiltersState, Row, Table as Table$1 } from '@tanstack/react-table';
|
|
4
4
|
|
|
5
5
|
interface LabelProps {
|
|
6
6
|
id: string;
|
|
@@ -11,6 +11,7 @@ interface LabelProps {
|
|
|
11
11
|
tooltipText?: string;
|
|
12
12
|
children?: never;
|
|
13
13
|
htmlFor: string;
|
|
14
|
+
isPointerOnHover?: boolean;
|
|
14
15
|
htmlProps?: HTMLAttributes<HTMLLabelElement>;
|
|
15
16
|
}
|
|
16
17
|
interface LabelWithChildrenProps {
|
|
@@ -22,10 +23,11 @@ interface LabelWithChildrenProps {
|
|
|
22
23
|
tooltipText?: string;
|
|
23
24
|
htmlFor?: never;
|
|
24
25
|
children: ReactElement;
|
|
26
|
+
isPointerOnHover?: boolean;
|
|
25
27
|
htmlProps?: HTMLAttributes<HTMLLabelElement>;
|
|
26
28
|
}
|
|
27
29
|
|
|
28
|
-
declare const Label: ({ hideLabel, labelValue, required, tooltipText, children, htmlFor, htmlProps, id, className, }: LabelProps | LabelWithChildrenProps) => React$1.JSX.Element;
|
|
30
|
+
declare const Label: ({ hideLabel, labelValue, required, tooltipText, children, htmlFor, htmlProps, id, isPointerOnHover, className, }: LabelProps | LabelWithChildrenProps) => React$1.JSX.Element;
|
|
29
31
|
|
|
30
32
|
declare enum StellaButtonIcons {
|
|
31
33
|
ADD = "add",
|
|
@@ -96,7 +98,7 @@ interface TooltipProps {
|
|
|
96
98
|
|
|
97
99
|
declare const Tooltip: ({ title, placement, type, ariaLabel, iconSize, htmlProps, className, id, }: TooltipProps) => React$1.JSX.Element;
|
|
98
100
|
|
|
99
|
-
type StellaIconDefinition = "search" | "required" | "help" | "info" | "kebab-menu" | "error" | "warning" | "filter" | "sort" | "close" | "add" | "stella-logo" | "chevron-right" | "chevron-down" | "caret-right" | "caret-down" | "success" | "in-progress" | "complete" | "calendar" | "unlocked" | "locked" | "settings" | "preferences" | "account-settings" | "user" | "company-details" | "collapse" | "expand" | "star-filled" | "star-outline" | "dashboard" | "shopping-cart" | "calculator" | "pricing-strategies" | "stella-finance" | "resource-center" | "line-item-pricing" | "basket-pricing" | "paperclip" | "thumbs-up" | "thumbs-down" | "send" | "palette" | "eye" | "eye-slash" | "sync" | "chevron-left" | "check-square" | "money" | "currency-dollar" | "x-circle" | "empty" | "hourglass-simple-low" | "broadcast" | "list-checks" | "note-pencil" | "truck";
|
|
101
|
+
type StellaIconDefinition = "search" | "required" | "help" | "info" | "kebab-menu" | "error" | "warning" | "filter" | "sort" | "close" | "add" | "stella-logo" | "chevron-right" | "chevron-down" | "caret-right" | "caret-down" | "success" | "in-progress" | "complete" | "calendar" | "unlocked" | "locked" | "settings" | "preferences" | "account-settings" | "user" | "company-details" | "collapse" | "expand" | "star-filled" | "star-outline" | "dashboard" | "shopping-cart" | "calculator" | "pricing-strategies" | "stella-finance" | "resource-center" | "line-item-pricing" | "basket-pricing" | "paperclip" | "thumbs-up" | "thumbs-down" | "send" | "palette" | "eye" | "eye-slash" | "sync" | "chevron-left" | "check-square" | "money" | "currency-dollar" | "x-circle" | "empty" | "hourglass-simple-low" | "broadcast" | "list-checks" | "note-pencil" | "truck" | "table";
|
|
100
102
|
interface StellaIconProps {
|
|
101
103
|
iconName: StellaIconDefinition;
|
|
102
104
|
size?: number;
|
|
@@ -258,7 +260,7 @@ interface TableProps<T> {
|
|
|
258
260
|
}[];
|
|
259
261
|
dataTestId?: string;
|
|
260
262
|
dataAuto?: string;
|
|
261
|
-
id
|
|
263
|
+
id: string;
|
|
262
264
|
className?: string;
|
|
263
265
|
htmlProps?: HTMLAttributes<HTMLTableElement>;
|
|
264
266
|
paginationDetails?: PaginationDetails;
|
|
@@ -278,6 +280,11 @@ interface TableProps<T> {
|
|
|
278
280
|
id: string;
|
|
279
281
|
value: unknown;
|
|
280
282
|
}[];
|
|
283
|
+
enableShowHide?: boolean;
|
|
284
|
+
globalActions?: {
|
|
285
|
+
element: ReactElement;
|
|
286
|
+
onChange?: (table?: Table$1<T>) => void;
|
|
287
|
+
}[];
|
|
281
288
|
}
|
|
282
289
|
interface CustomColumnMeta {
|
|
283
290
|
headerAlign?: "left" | "right";
|
|
@@ -289,10 +296,11 @@ interface CustomColumnMeta {
|
|
|
289
296
|
value?: string;
|
|
290
297
|
}[];
|
|
291
298
|
filterMode?: "singleSelect" | "multiSelect" | "search";
|
|
299
|
+
defaultHidden?: boolean;
|
|
292
300
|
}
|
|
293
301
|
type RowStatus = "action-pending" | "completed";
|
|
294
302
|
|
|
295
|
-
declare function Table<T>({ columns, data, isLoading, serverSide, onPageChange, onSortChange, onFilterChange, onRowSelect, onRowClick, rowStatuses, showSelection, showRowOptions, showPagination, variant, paginationDetails, selectionMenuItems, dataAuto, dataTestId, id, className, htmlProps, resetTrigger, emptyTableState, defaultFilters, staticFilters, }: TableProps<T>): React$1.JSX.Element;
|
|
303
|
+
declare function Table<T>({ columns, data, isLoading, serverSide, onPageChange, onSortChange, onFilterChange, onRowSelect, onRowClick, rowStatuses, showSelection, showRowOptions, showPagination, variant, paginationDetails, selectionMenuItems, dataAuto, dataTestId, id, className, htmlProps, resetTrigger, emptyTableState, defaultFilters, staticFilters, enableShowHide, globalActions, }: TableProps<T>): React$1.JSX.Element;
|
|
296
304
|
|
|
297
305
|
interface PaginationProps {
|
|
298
306
|
id?: string;
|
|
@@ -486,5 +494,55 @@ interface OrderStatusProps {
|
|
|
486
494
|
|
|
487
495
|
declare const OrderStatus: ({ variant, id, className, isPurchaser, }: OrderStatusProps) => React$1.JSX.Element;
|
|
488
496
|
|
|
489
|
-
|
|
497
|
+
declare enum CheckBoxFontSizeVariant {
|
|
498
|
+
SIZE_12 = "12px",
|
|
499
|
+
SIZE_14 = "14px",
|
|
500
|
+
SIZE_16 = "16px"
|
|
501
|
+
}
|
|
502
|
+
interface CheckBoxProps {
|
|
503
|
+
id: string;
|
|
504
|
+
className?: string;
|
|
505
|
+
label?: string | ReactElement;
|
|
506
|
+
checked?: boolean;
|
|
507
|
+
indeterminate?: boolean;
|
|
508
|
+
disabled?: boolean;
|
|
509
|
+
defaultChecked?: boolean;
|
|
510
|
+
align?: "top" | "center";
|
|
511
|
+
fontSize?: `${CheckBoxFontSizeVariant}`;
|
|
512
|
+
onChange?: (id: string, checked: boolean) => void;
|
|
513
|
+
htmlProps?: HTMLAttributes<HTMLInputElement>;
|
|
514
|
+
}
|
|
515
|
+
|
|
516
|
+
interface CheckBoxGroupOption {
|
|
517
|
+
id: string;
|
|
518
|
+
label: string | ReactElement;
|
|
519
|
+
checked?: boolean;
|
|
520
|
+
disabled?: boolean;
|
|
521
|
+
indeterminate?: boolean;
|
|
522
|
+
}
|
|
523
|
+
interface CheckBoxGroupChangeOption {
|
|
524
|
+
id: string;
|
|
525
|
+
isChecked: boolean;
|
|
526
|
+
isSelectAllClicked: boolean;
|
|
527
|
+
}
|
|
528
|
+
interface CheckBoxGroupChangePayload {
|
|
529
|
+
options: CheckBoxGroupChangeOption[];
|
|
530
|
+
}
|
|
531
|
+
interface CheckBoxGroupProps {
|
|
532
|
+
defaultOptions: CheckBoxGroupOption[];
|
|
533
|
+
onChange: (payload: CheckBoxGroupChangePayload) => void;
|
|
534
|
+
heading?: string;
|
|
535
|
+
required?: boolean;
|
|
536
|
+
tooltipText?: string;
|
|
537
|
+
disabled?: boolean;
|
|
538
|
+
isSelectAllEnabled?: boolean;
|
|
539
|
+
fontSize?: `${CheckBoxFontSizeVariant}`;
|
|
540
|
+
className?: string;
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
declare const CheckBoxGroup: ({ defaultOptions, onChange, heading, required, tooltipText, disabled, isSelectAllEnabled, fontSize, className, }: CheckBoxGroupProps) => React$1.JSX.Element;
|
|
544
|
+
|
|
545
|
+
declare const CheckBox: ({ id, className, label, checked, indeterminate, disabled, defaultChecked, align, fontSize, onChange, htmlProps, }: CheckBoxProps) => React$1.JSX.Element;
|
|
546
|
+
|
|
547
|
+
export { CheckBox, CheckBoxGroup, HelperText, IconButton, Label, Loader, NumberInput, OrderStatus, Pagination, PasswordInput, PaymentStatus, SelectorChip, StellaButton, StellaButtonVariant, StellaIcon, Styles, Sync, Table, TableUnitsAndTotals, Tabs, TextInput, Tooltip };
|
|
490
548
|
export type { CustomColumnMeta, StellaIconDefinition };
|