@stella-source/stellasource-dsl 3.5.1 → 3.6.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.
Files changed (34) hide show
  1. package/dist/cjs/index.js +630 -368
  2. package/dist/cjs/index.js.map +1 -1
  3. package/dist/cjs/types/components/CheckBox/CheckBox.d.ts +4 -0
  4. package/dist/cjs/types/components/CheckBox/CheckBox.stories.d.ts +30 -0
  5. package/dist/cjs/types/components/CheckBox/styles.d.ts +20 -0
  6. package/dist/cjs/types/components/CheckBox/types.d.ts +19 -0
  7. package/dist/cjs/types/components/CheckBoxGroup/CheckBoxGroup.d.ts +4 -0
  8. package/dist/cjs/types/components/CheckBoxGroup/CheckBoxGroup.stories.d.ts +63 -0
  9. package/dist/cjs/types/components/CheckBoxGroup/styles.d.ts +4 -0
  10. package/dist/cjs/types/components/CheckBoxGroup/types.d.ts +28 -0
  11. package/dist/cjs/types/components/Label/Label.d.ts +1 -1
  12. package/dist/cjs/types/components/Label/Label.stories.d.ts +1 -1
  13. package/dist/cjs/types/components/Label/styles.d.ts +2 -1
  14. package/dist/cjs/types/components/Label/types.d.ts +2 -0
  15. package/dist/cjs/types/components/Sync/styles.d.ts +1 -1
  16. package/dist/cjs/types/index.d.ts +3 -1
  17. package/dist/esm/index.esm.js +953 -693
  18. package/dist/esm/index.esm.js.map +1 -1
  19. package/dist/esm/types/components/CheckBox/CheckBox.d.ts +4 -0
  20. package/dist/esm/types/components/CheckBox/CheckBox.stories.d.ts +30 -0
  21. package/dist/esm/types/components/CheckBox/styles.d.ts +20 -0
  22. package/dist/esm/types/components/CheckBox/types.d.ts +19 -0
  23. package/dist/esm/types/components/CheckBoxGroup/CheckBoxGroup.d.ts +4 -0
  24. package/dist/esm/types/components/CheckBoxGroup/CheckBoxGroup.stories.d.ts +63 -0
  25. package/dist/esm/types/components/CheckBoxGroup/styles.d.ts +4 -0
  26. package/dist/esm/types/components/CheckBoxGroup/types.d.ts +28 -0
  27. package/dist/esm/types/components/Label/Label.d.ts +1 -1
  28. package/dist/esm/types/components/Label/Label.stories.d.ts +1 -1
  29. package/dist/esm/types/components/Label/styles.d.ts +2 -1
  30. package/dist/esm/types/components/Label/types.d.ts +2 -0
  31. package/dist/esm/types/components/Sync/styles.d.ts +1 -1
  32. package/dist/esm/types/index.d.ts +3 -1
  33. package/dist/index.d.ts +54 -2
  34. 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>, "$hideLabel"> & LabelComponentProps, never> & Partial<Pick<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, "$hideLabel"> & LabelComponentProps, never>>> & string;
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
  }
@@ -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 };
@@ -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, };