@stella-source/stellasource-dsl 0.1.6 → 0.2.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 (72) hide show
  1. package/dist/cjs/index.js +4545 -105
  2. package/dist/cjs/index.js.map +1 -1
  3. package/dist/cjs/styles.css +1 -1
  4. package/dist/cjs/types/components/IconButton/IconButton.d.ts +1 -1
  5. package/dist/cjs/types/components/IconButton/IconButton.stories.d.ts +1 -1
  6. package/dist/cjs/types/components/IconButton/types.d.ts +4 -1
  7. package/dist/cjs/types/components/Pagination/Pagination.d.ts +4 -0
  8. package/dist/cjs/types/components/Pagination/Pagination.stories.d.ts +13 -0
  9. package/dist/cjs/types/components/Pagination/styles.d.ts +14 -0
  10. package/dist/cjs/types/components/Pagination/types.d.ts +12 -0
  11. package/dist/cjs/types/components/StellaButton/StellaButton.d.ts +1 -1
  12. package/dist/cjs/types/components/StellaButton/StellaButton.stories.d.ts +1 -1
  13. package/dist/cjs/types/components/StellaButton/types.d.ts +1 -0
  14. package/dist/cjs/types/components/StellaIcon/types.d.ts +1 -1
  15. package/dist/cjs/types/components/Sync/Sync.d.ts +4 -0
  16. package/dist/cjs/types/components/Sync/Sync.stories.d.ts +20 -0
  17. package/dist/cjs/types/components/Sync/styles.d.ts +7 -0
  18. package/dist/cjs/types/components/Sync/types.d.ts +8 -0
  19. package/dist/cjs/types/components/Table/Table.d.ts +4 -0
  20. package/dist/cjs/types/components/Table/Table.stories.d.ts +23 -0
  21. package/dist/cjs/types/components/Table/TableComponents/IndeterminateCheckbox.d.ts +8 -0
  22. package/dist/cjs/types/components/Table/TableComponents/RowOptions.d.ts +12 -0
  23. package/dist/cjs/types/components/Table/TableComponents/TableHeaderCell.d.ts +18 -0
  24. package/dist/cjs/types/components/Table/TableModule.d.ts +6 -0
  25. package/dist/cjs/types/components/Table/styles.d.ts +44 -0
  26. package/dist/cjs/types/components/Table/types.d.ts +50 -0
  27. package/dist/cjs/types/components/TableUnitsAndTotals/TableUnitsAndTotals.d.ts +4 -0
  28. package/dist/cjs/types/components/TableUnitsAndTotals/TableUnitsAndTotals.stories.d.ts +6 -0
  29. package/dist/cjs/types/components/TableUnitsAndTotals/styles.d.ts +7 -0
  30. package/dist/cjs/types/components/TableUnitsAndTotals/types.d.ts +32 -0
  31. package/dist/cjs/types/components/TextField/PasswordInput/styles.d.ts +1 -1
  32. package/dist/cjs/types/index.d.ts +5 -1
  33. package/dist/cjs/types/shared/utils/dateHelpers.d.ts +3 -0
  34. package/dist/cjs/types/shared/utils/numberHelpers.d.ts +1 -0
  35. package/dist/cjs/types/shared/utils/testing.d.ts +1 -1
  36. package/dist/esm/index.esm.js +4987 -551
  37. package/dist/esm/index.esm.js.map +1 -1
  38. package/dist/esm/styles.css +1 -1
  39. package/dist/esm/types/components/IconButton/IconButton.d.ts +1 -1
  40. package/dist/esm/types/components/IconButton/IconButton.stories.d.ts +1 -1
  41. package/dist/esm/types/components/IconButton/types.d.ts +4 -1
  42. package/dist/esm/types/components/Pagination/Pagination.d.ts +4 -0
  43. package/dist/esm/types/components/Pagination/Pagination.stories.d.ts +13 -0
  44. package/dist/esm/types/components/Pagination/styles.d.ts +14 -0
  45. package/dist/esm/types/components/Pagination/types.d.ts +12 -0
  46. package/dist/esm/types/components/StellaButton/StellaButton.d.ts +1 -1
  47. package/dist/esm/types/components/StellaButton/StellaButton.stories.d.ts +1 -1
  48. package/dist/esm/types/components/StellaButton/types.d.ts +1 -0
  49. package/dist/esm/types/components/StellaIcon/types.d.ts +1 -1
  50. package/dist/esm/types/components/Sync/Sync.d.ts +4 -0
  51. package/dist/esm/types/components/Sync/Sync.stories.d.ts +20 -0
  52. package/dist/esm/types/components/Sync/styles.d.ts +7 -0
  53. package/dist/esm/types/components/Sync/types.d.ts +8 -0
  54. package/dist/esm/types/components/Table/Table.d.ts +4 -0
  55. package/dist/esm/types/components/Table/Table.stories.d.ts +23 -0
  56. package/dist/esm/types/components/Table/TableComponents/IndeterminateCheckbox.d.ts +8 -0
  57. package/dist/esm/types/components/Table/TableComponents/RowOptions.d.ts +12 -0
  58. package/dist/esm/types/components/Table/TableComponents/TableHeaderCell.d.ts +18 -0
  59. package/dist/esm/types/components/Table/TableModule.d.ts +6 -0
  60. package/dist/esm/types/components/Table/styles.d.ts +44 -0
  61. package/dist/esm/types/components/Table/types.d.ts +50 -0
  62. package/dist/esm/types/components/TableUnitsAndTotals/TableUnitsAndTotals.d.ts +4 -0
  63. package/dist/esm/types/components/TableUnitsAndTotals/TableUnitsAndTotals.stories.d.ts +6 -0
  64. package/dist/esm/types/components/TableUnitsAndTotals/styles.d.ts +7 -0
  65. package/dist/esm/types/components/TableUnitsAndTotals/types.d.ts +32 -0
  66. package/dist/esm/types/components/TextField/PasswordInput/styles.d.ts +1 -1
  67. package/dist/esm/types/index.d.ts +5 -1
  68. package/dist/esm/types/shared/utils/dateHelpers.d.ts +3 -0
  69. package/dist/esm/types/shared/utils/numberHelpers.d.ts +1 -0
  70. package/dist/esm/types/shared/utils/testing.d.ts +1 -1
  71. package/dist/index.d.ts +111 -5
  72. package/package.json +14 -9
@@ -9,7 +9,7 @@
9
9
  --dark-navy: #1f4168;
10
10
  --primary-blue: #336dae;
11
11
  --sky-blue: #7099c6;
12
- --light-blue: #ebf0fa;
12
+ --DSL-light-blue: #ebf0fa;
13
13
  --pale-blue: #f8fafe;
14
14
  /* greys */
15
15
  --medium-grey: #c6c6c6;
@@ -1,4 +1,4 @@
1
1
  import React from "react";
2
2
  import { IconButtonProps } from "./types";
3
- declare const IconButton: ({ iconName, onClick, disabled, variant, isLoading, ariaLabel, className, id, htmlProps, size, }: IconButtonProps) => React.JSX.Element;
3
+ declare const IconButton: React.ForwardRefExoticComponent<Omit<IconButtonProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
4
4
  export default IconButton;
@@ -2,7 +2,7 @@ import { IconButtonProps } from "./types";
2
2
  import { StellaButtonVariant } from "../StellaButton/types";
3
3
  declare const _default: {
4
4
  title: string;
5
- component: ({ iconName, onClick, disabled, variant, isLoading, ariaLabel, className, id, htmlProps, size, }: IconButtonProps) => import("react").JSX.Element;
5
+ component: import("react").ForwardRefExoticComponent<Omit<IconButtonProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
6
6
  tags: string[];
7
7
  parameters: {};
8
8
  argTypes: {
@@ -5,11 +5,14 @@ export interface IconButtonProps {
5
5
  iconName: `${StellaIconDefinition}`;
6
6
  ariaLabel: string;
7
7
  size?: number;
8
- onClick: () => void;
8
+ onClick: (e?: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
9
9
  id?: string;
10
10
  className?: string;
11
11
  isLoading?: boolean;
12
12
  disabled?: boolean;
13
+ ref?: React.Ref<HTMLButtonElement>;
14
+ preventDefault?: boolean;
15
+ dataTestId?: string;
13
16
  variant?: `${StellaButtonVariant}`;
14
17
  htmlProps?: HTMLAttributes<HTMLButtonElement>;
15
18
  }
@@ -0,0 +1,4 @@
1
+ import React from "react";
2
+ import { PaginationProps } from "./types";
3
+ declare const Pagination: ({ isLoading, rowsPerPage, totalRows, ariaLabel, onPageChange, startingPage, id, className, htmlProps, }: PaginationProps) => React.JSX.Element;
4
+ export default Pagination;
@@ -0,0 +1,13 @@
1
+ import { PaginationProps } from "./types";
2
+ declare const _default: {
3
+ title: string;
4
+ component: ({ isLoading, rowsPerPage, totalRows, ariaLabel, onPageChange, startingPage, id, className, htmlProps, }: PaginationProps) => import("react").JSX.Element;
5
+ tags: string[];
6
+ parameters: {};
7
+ argTypes: {};
8
+ args: PaginationProps;
9
+ };
10
+ export default _default;
11
+ export declare const Pagination: {
12
+ args: {};
13
+ };
@@ -0,0 +1,14 @@
1
+ declare const PaginationContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, never>> & string;
2
+ declare const CustomSelect: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").SelectHTMLAttributes<HTMLSelectElement>, HTMLSelectElement>, never>> & string;
3
+ declare const DarkText: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>> & string;
4
+ declare const LightText: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>> & string;
5
+ declare const CustomSelectContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
6
+ $currentPageCount: number;
7
+ }>> & string;
8
+ declare const SelectCaret: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<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>>;
9
+ declare const RowInfo: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
10
+ declare const PageInfo: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
11
+ declare const LoadingContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
12
+ declare const PageText: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>> & string;
13
+ declare const PageTotals: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>> & string;
14
+ export { PaginationContainer, LoadingContainer, RowInfo, PageInfo, CustomSelect, CustomSelectContainer, SelectCaret, DarkText, LightText, PageTotals, PageText, };
@@ -0,0 +1,12 @@
1
+ import { HTMLAttributes } from "react";
2
+ export interface PaginationProps {
3
+ id?: string;
4
+ className?: string;
5
+ htmlProps?: HTMLAttributes<HTMLElement>;
6
+ isLoading?: boolean;
7
+ rowsPerPage?: number;
8
+ ariaLabel?: string;
9
+ totalRows: number;
10
+ onPageChange?: (page: number, pageSize: number) => void;
11
+ startingPage?: number;
12
+ }
@@ -1,4 +1,4 @@
1
1
  import React from "react";
2
2
  import { StellaButtonProps } from "./types";
3
- declare const StellaButton: ({ disabled, variant, label, startIcon, endIcon, isLoading, className, id, htmlProps, onClick, preventDefault, type, }: StellaButtonProps) => React.JSX.Element;
3
+ declare const StellaButton: React.ForwardRefExoticComponent<Omit<StellaButtonProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
4
4
  export default StellaButton;
@@ -2,7 +2,7 @@ import { StellaButtonVariant } from "./types";
2
2
  import { StellaButtonIcons, StellaButtonProps } from "./types";
3
3
  declare const _default: {
4
4
  title: string;
5
- component: ({ disabled, variant, label, startIcon, endIcon, isLoading, className, id, htmlProps, onClick, preventDefault, type, }: StellaButtonProps) => import("react").JSX.Element;
5
+ component: import("react").ForwardRefExoticComponent<Omit<StellaButtonProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
6
6
  tags: string[];
7
7
  parameters: {};
8
8
  argTypes: {
@@ -20,5 +20,6 @@ export interface StellaButtonProps {
20
20
  disabled?: boolean;
21
21
  preventDefault?: boolean;
22
22
  variant?: `${StellaButtonVariant}`;
23
+ ref?: React.Ref<HTMLButtonElement>;
23
24
  htmlProps?: HTMLAttributes<HTMLButtonElement>;
24
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";
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";
2
2
  export interface StellaIconProps {
3
3
  iconName: StellaIconDefinition;
4
4
  size?: number;
@@ -0,0 +1,4 @@
1
+ import React from "react";
2
+ import { SyncProps } from "./types";
3
+ declare const Sync: ({ dataTestId, onClick, className, id, showTime, labelPosition, }: SyncProps) => React.JSX.Element;
4
+ export default Sync;
@@ -0,0 +1,20 @@
1
+ import { SyncProps } from "./types";
2
+ declare const _default: {
3
+ title: string;
4
+ component: ({ dataTestId, onClick, className, id, showTime, labelPosition, }: SyncProps) => import("react").JSX.Element;
5
+ tags: string[];
6
+ parameters: {};
7
+ argTypes: {
8
+ labelPosition: {
9
+ options: string[];
10
+ control: {
11
+ type: string;
12
+ };
13
+ };
14
+ };
15
+ args: SyncProps;
16
+ };
17
+ export default _default;
18
+ export declare const Sync: {
19
+ args: {};
20
+ };
@@ -0,0 +1,7 @@
1
+ interface SyncContainerProps {
2
+ $labelPosition?: "right" | "left";
3
+ }
4
+ declare const SyncContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, SyncContainerProps>> & string;
5
+ declare const CustomLabel: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("../Label/types").LabelProps | import("../Label/types").LabelWithChildrenProps, import("styled-components/dist/types").BaseObject>> & 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>>;
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>> & string & Omit<import("react").ForwardRefExoticComponent<Omit<import("../IconButton/types").IconButtonProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>>, keyof import("react").Component<any, {}, any>>;
7
+ export { CustomIconButton, CustomLabel, SyncContainer };
@@ -0,0 +1,8 @@
1
+ export interface SyncProps {
2
+ id: string;
3
+ className?: string;
4
+ onClick?: (e?: React.MouseEvent<HTMLButtonElement, MouseEvent>, time?: string) => void;
5
+ dataTestId?: string;
6
+ showTime?: boolean;
7
+ labelPosition?: "right" | "left";
8
+ }
@@ -0,0 +1,4 @@
1
+ import React from "react";
2
+ import { TableProps } from "./types";
3
+ declare function Table<T>({ columns, data, isLoading, serverSide, onPageChange, onSortChange, onFilterChange, onRowSelect, rowStatuses, showSelection, showRowOptions, showPagination, variant, paginationDetails, selectionMenuItems, dataAuto, dataTestId, id, className, htmlProps, }: TableProps<T>): React.JSX.Element;
4
+ export default Table;
@@ -0,0 +1,23 @@
1
+ import TableComponent from "./Table";
2
+ import { TableProps } from "./types";
3
+ interface Person {
4
+ id: number;
5
+ name: string;
6
+ access: string;
7
+ age: number;
8
+ status: string;
9
+ }
10
+ declare const _default: {
11
+ title: string;
12
+ component: typeof TableComponent;
13
+ tags: string[];
14
+ parameters: {};
15
+ argTypes: {};
16
+ args: TableProps<Person>;
17
+ };
18
+ export default _default;
19
+ export declare const Table: {
20
+ args: {
21
+ variant: string;
22
+ };
23
+ };
@@ -0,0 +1,8 @@
1
+ import React, { ChangeEvent } from "react";
2
+ interface IndeterminateCheckboxProps {
3
+ isIndeterminate?: boolean;
4
+ isChecked?: boolean;
5
+ onChange?: (event: ChangeEvent<HTMLInputElement>) => void;
6
+ }
7
+ declare const IndeterminateCheckbox: ({ isIndeterminate, isChecked, onChange, }: IndeterminateCheckboxProps) => React.JSX.Element;
8
+ export default IndeterminateCheckbox;
@@ -0,0 +1,12 @@
1
+ import { Row } from "@tanstack/react-table";
2
+ import React from "react";
3
+ interface RowOptionsProps {
4
+ row: Row<any>;
5
+ selectionMenuItems?: {
6
+ label: string;
7
+ onClick: (row: Row<any>) => void;
8
+ conditional?: () => boolean;
9
+ }[];
10
+ }
11
+ declare const RowOptions: ({ row, selectionMenuItems }: RowOptionsProps) => React.JSX.Element;
12
+ export default RowOptions;
@@ -0,0 +1,18 @@
1
+ import { Header } from "@tanstack/react-table";
2
+ import React from "react";
3
+ interface HeaderCellProps {
4
+ serverSide?: boolean;
5
+ header: Header<any, unknown>;
6
+ filters: Record<string, (string | number)[]>;
7
+ sorting: {
8
+ id: string;
9
+ desc: boolean;
10
+ }[];
11
+ scrollPosition: {
12
+ atLeft: boolean;
13
+ atRight: boolean;
14
+ };
15
+ onFilterMenuInteraction?: (id: string | number, active: boolean) => void;
16
+ }
17
+ declare const TableHeaderCell: ({ header, serverSide, filters, sorting, scrollPosition, onFilterMenuInteraction, }: HeaderCellProps) => React.JSX.Element;
18
+ export default TableHeaderCell;
@@ -0,0 +1,6 @@
1
+ import type { FilterFn } from "@tanstack/react-table";
2
+ declare module "@tanstack/react-table" {
3
+ interface FilterFns {
4
+ number: FilterFn<unknown>;
5
+ }
6
+ }
@@ -0,0 +1,44 @@
1
+ import { Column, SortDirection } from "@tanstack/react-table";
2
+ interface HeaderIconButtonProps {
3
+ $active: boolean;
4
+ $sort?: false | SortDirection;
5
+ }
6
+ declare const HeaderCell: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").ThHTMLAttributes<HTMLTableHeaderCellElement>, HTMLTableHeaderCellElement>, {
7
+ $isPinnedLeft?: boolean;
8
+ $isPinnedRight?: boolean;
9
+ $columnInfo: Column<any, unknown>;
10
+ $filterMenuOpen?: boolean;
11
+ }>> & string;
12
+ declare const HeaderCellPosition: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
13
+ declare const TableWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
14
+ declare const TableWrapperScroll: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
15
+ $filterMenuOpen: boolean;
16
+ }>> & string;
17
+ declare const StyledTable: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").TableHTMLAttributes<HTMLTableElement>, HTMLTableElement>, never>> & string;
18
+ declare const CustomIconButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<Omit<import("../IconButton/types").IconButtonProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>, HeaderIconButtonProps>> & string & Omit<import("react").ForwardRefExoticComponent<Omit<import("../IconButton/types").IconButtonProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>>, keyof import("react").Component<any, {}, any>>;
19
+ declare const SortButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("styled-components").FastOmit<Omit<import("../IconButton/types").IconButtonProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>, keyof HeaderIconButtonProps> & HeaderIconButtonProps, HeaderIconButtonProps>> & string;
20
+ declare const HeaderRow: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLTableRowElement>, HTMLTableRowElement>, never>> & string;
21
+ declare const CellRow: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLTableRowElement>, HTMLTableRowElement>, never>> & string;
22
+ declare const FilterMenu: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
23
+ declare const Checkbox: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>>, never>, never>> & string;
24
+ declare const MenuItemGroup: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
25
+ declare const BodyCell: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").TdHTMLAttributes<HTMLTableDataCellElement>, HTMLTableDataCellElement>, {
26
+ $isPinnedLeft?: boolean;
27
+ $isPinnedRight?: boolean;
28
+ $columnInfo: Column<any, unknown>;
29
+ $isLastRow: boolean;
30
+ }>> & string;
31
+ declare const MenuButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, never>> & string;
32
+ declare const MenuItem: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
33
+ declare const MenuItemOption: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {
34
+ $applied: boolean;
35
+ }>> & string;
36
+ declare const FilterLabelTransparent: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
37
+ declare const FilterBoxLabel: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, never>> & string;
38
+ declare const LoadingShimmer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
39
+ $width?: string;
40
+ $height?: string;
41
+ }>> & string;
42
+ declare const CustomPagination: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("../Pagination/types").PaginationProps, never>> & string & Omit<({ isLoading, rowsPerPage, totalRows, ariaLabel, onPageChange, startingPage, id, className, htmlProps, }: import("../Pagination/types").PaginationProps) => import("react").JSX.Element, keyof import("react").Component<any, {}, any>>;
43
+ declare const KebabAlign: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
44
+ export { HeaderCell, TableWrapper, TableWrapperScroll, StyledTable, CustomIconButton, SortButton, HeaderRow, FilterMenu, Checkbox, BodyCell, HeaderCellPosition, MenuButton, MenuItem, FilterBoxLabel, LoadingShimmer, FilterLabelTransparent, CustomPagination, CellRow, MenuItemGroup, KebabAlign, MenuItemOption, };
@@ -0,0 +1,50 @@
1
+ import { ColumnDef, ColumnFiltersState, Row } from "@tanstack/react-table";
2
+ import { HTMLAttributes } from "react";
3
+ declare enum TableVariant {
4
+ PRIMARY = "Primary",
5
+ SECONDARY = "Secondary"
6
+ }
7
+ interface PaginationDetails {
8
+ startingPage: number;
9
+ totalRows: number;
10
+ rowsPerPage?: number;
11
+ }
12
+ export interface TableProps<T> {
13
+ columns: ColumnDef<T, any>[];
14
+ data: T[];
15
+ isLoading?: boolean;
16
+ serverSide?: boolean;
17
+ onPageChange?: (page: number, pageSize: number) => void;
18
+ onSortChange?: (sort: {
19
+ id: string;
20
+ desc: boolean;
21
+ }[]) => void;
22
+ onFilterChange?: (filters: ColumnFiltersState) => void;
23
+ onRowSelect?: (rows: T[]) => void;
24
+ showSelection?: boolean;
25
+ showRowOptions?: boolean;
26
+ showPagination?: boolean;
27
+ variant?: `${TableVariant}`;
28
+ selectionMenuItems?: {
29
+ label: string;
30
+ onClick: (row: Row<T>) => void;
31
+ conditional?: () => boolean;
32
+ }[];
33
+ dataTestId?: string;
34
+ dataAuto?: string;
35
+ id?: string;
36
+ className?: string;
37
+ htmlProps?: HTMLAttributes<HTMLTableElement>;
38
+ paginationDetails?: PaginationDetails;
39
+ rowStatuses?: Record<number | string, RowStatus>;
40
+ }
41
+ export interface CustomColumnMeta {
42
+ headerAlign?: "left" | "right";
43
+ cellAlign?: "left" | "right";
44
+ dataType?: "string" | "number";
45
+ pin?: "left" | "right";
46
+ filterOptions?: string[] | number[];
47
+ singleSelect?: boolean;
48
+ }
49
+ export type RowStatus = "action-pending" | "completed";
50
+ export {};
@@ -0,0 +1,4 @@
1
+ import React from "react";
2
+ import { TableUnitsAndTotals as TableUnitsAndTotalsProps } from "./types";
3
+ declare const TableUnitsAndTotals: ({ id, className, value, subValue, variant, leftCategory, rightCategory, }: TableUnitsAndTotalsProps) => React.JSX.Element;
4
+ export default TableUnitsAndTotals;
@@ -0,0 +1,6 @@
1
+ import { Meta, StoryObj } from "@storybook/react";
2
+ import TableUnitsAndTotalsComponent from "./TableUnitsAndTotals";
3
+ declare const meta: Meta<typeof TableUnitsAndTotalsComponent>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof TableUnitsAndTotalsComponent>;
6
+ export declare const TableUnitsAndTotals: Story;
@@ -0,0 +1,7 @@
1
+ declare const Container: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
2
+ declare const Column: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
3
+ $align: "left" | "right";
4
+ }>> & string;
5
+ declare const HeaderText: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>> & string;
6
+ declare const SubHeaderText: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>> & string;
7
+ export { Container, Column, HeaderText, SubHeaderText };
@@ -0,0 +1,32 @@
1
+ export declare enum QuoteVariants {
2
+ TOTAL_PRICE = "total-price",
3
+ TOTAL_WEIGHT = "total-weight"
4
+ }
5
+ export declare enum QuoteCategory {
6
+ ITEM = "/item",
7
+ HOUR = "/hr",
8
+ CWT = "CWT",
9
+ LBS = "lbs",
10
+ KG = "kg",
11
+ TON = "ton"
12
+ }
13
+ interface TableUnitsAndTotalsProps {
14
+ id?: string;
15
+ className?: string;
16
+ value: number;
17
+ subValue?: number;
18
+ rightCategory?: `${QuoteCategory}`;
19
+ }
20
+ interface TotalPriceProps {
21
+ variant: QuoteVariants.TOTAL_PRICE;
22
+ leftCategory?: `${TableUnitsAndTotalsLeftCategory}`;
23
+ }
24
+ interface TotalWeightProps {
25
+ variant: QuoteVariants.TOTAL_WEIGHT;
26
+ leftCategory?: never;
27
+ }
28
+ export type TableUnitsAndTotals = TableUnitsAndTotalsProps & (TotalPriceProps | TotalWeightProps);
29
+ export declare enum TableUnitsAndTotalsLeftCategory {
30
+ US_CURRENCY = "$"
31
+ }
32
+ export {};
@@ -1,2 +1,2 @@
1
- declare const CustomIconButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("../../IconButton/types").IconButtonProps, never>> & string & Omit<({ iconName, onClick, disabled, variant, isLoading, ariaLabel, className, id, htmlProps, size, }: import("../../IconButton/types").IconButtonProps) => import("react").JSX.Element, keyof import("react").Component<any, {}, any>>;
1
+ 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>> & string & Omit<import("react").ForwardRefExoticComponent<Omit<import("../../IconButton/types").IconButtonProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>>, keyof import("react").Component<any, {}, any>>;
2
2
  export { CustomIconButton };
@@ -9,10 +9,14 @@ import IconButton from "./components/IconButton/IconButton";
9
9
  import TextInput from "./components/TextField/TextInput/TextInput";
10
10
  import PasswordInput from "./components/TextField/PasswordInput/PasswordInput";
11
11
  import NumberInput from "./components/TextField/NumberInput/NumberInput";
12
+ import Table from "./components/Table/Table";
13
+ import Pagination from "./components/Pagination/Pagination";
14
+ import Sync from "./components/Sync/Sync";
15
+ import TableUnitsAndTotals from "./components/TableUnitsAndTotals/TableUnitsAndTotals";
12
16
  /** Types */
13
17
  import { StellaButtonVariant } from "./components/StellaButton/types";
14
18
  /** Tokens */
15
19
  import { Styles } from "./shared/tokens";
16
20
  import "./shared/tokens/tokens.css";
17
21
  export type { StellaIconDefinition } from "./components/StellaIcon/types";
18
- export { Label, StellaButton, IconButton, Loader, HelperText, Tooltip, StellaIcon, TextInput, PasswordInput, NumberInput, StellaButtonVariant, Styles, };
22
+ export { Label, StellaButton, IconButton, Loader, HelperText, Tooltip, StellaIcon, TextInput, PasswordInput, NumberInput, Table, Pagination, Sync, TableUnitsAndTotals, StellaButtonVariant, Styles, };
@@ -0,0 +1,3 @@
1
+ type DateInput = Date | string | undefined;
2
+ export declare function formatDateToTime(date: DateInput, convertUtc?: boolean): string;
3
+ export {};
@@ -1 +1,2 @@
1
1
  export declare const formatDynamicNumbersWithCommas: (num: number | string, decimalPlaces: number) => string;
2
+ export declare const formatNumberWithDecimals: (num: number | string, decimalPlaces?: number, isCurrency?: boolean) => string;
@@ -4,7 +4,7 @@ import { Options } from "@testing-library/user-event";
4
4
  declare const setup: (jsx: React.JSX.Element, setupOptions?: Options) => {
5
5
  container: HTMLElement;
6
6
  baseElement: HTMLElement;
7
- debug: (baseElement?: ReactDOMClient.Container | any | Array<ReactDOMClient.Container | any> | undefined, maxLength?: number | undefined, options?: import("pretty-format").OptionsReceived | undefined) => void;
7
+ debug: (baseElement?: import("react-dom/client").Container | (Element | Document) | Array<import("react-dom/client").Container | (Element | Document)> | undefined, maxLength?: number | undefined, options?: import("pretty-format").OptionsReceived | undefined) => void;
8
8
  rerender: (ui: React.ReactNode) => void;
9
9
  unmount: () => void;
10
10
  asFragment: () => DocumentFragment;