@stella-source/stellasource-dsl 0.2.2 → 0.2.4

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.
@@ -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, rowStatuses, showSelection, showRowOptions, showPagination, variant, paginationDetails, selectionMenuItems, dataAuto, dataTestId, id, className, htmlProps, resetTrigger, }: TableProps<T>): React.JSX.Element;
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, resetTrigger, emptyTableState, }: TableProps<T>): React.JSX.Element;
4
4
  export default Table;
@@ -0,0 +1,13 @@
1
+ import React from "react";
2
+ interface EmptyTableStateProps {
3
+ id?: string;
4
+ className?: string;
5
+ header: string;
6
+ subHeader?: string;
7
+ showClearFilterButton?: boolean;
8
+ onClearFilters?: () => void;
9
+ colSpan: number;
10
+ size?: "small" | "large";
11
+ }
12
+ declare const EmptyTableState: ({ id, className, header, subHeader, showClearFilterButton, colSpan, size, onClearFilters, }: EmptyTableStateProps) => React.JSX.Element;
13
+ export default EmptyTableState;
@@ -12,7 +12,7 @@ declare const HeaderCell: import("styled-components/dist/types").IStyledComponen
12
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
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
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;
15
+ $stopScroll: boolean;
16
16
  }>> & string;
17
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
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>>;
@@ -41,4 +41,11 @@ declare const LoadingShimmer: import("styled-components/dist/types").IStyledComp
41
41
  }>> & string;
42
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
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, };
44
+ declare const EmptyTableCell: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").TdHTMLAttributes<HTMLTableDataCellElement>, HTMLTableDataCellElement>, never>> & string;
45
+ declare const EmptyTableSection: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, {
46
+ $size?: "small" | "large";
47
+ }>> & string;
48
+ declare const EmptyTableHeader: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, never>> & string;
49
+ declare const EmptyTableSubHeader: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, never>> & string;
50
+ declare const ClearFilterButtonRow: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
51
+ 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, };
@@ -38,6 +38,11 @@ export interface TableProps<T> {
38
38
  paginationDetails?: PaginationDetails;
39
39
  rowStatuses?: Record<number | string, RowStatus>;
40
40
  resetTrigger?: number;
41
+ emptyTableState: {
42
+ header: string;
43
+ subHeader?: string;
44
+ showClearFilterButton?: boolean;
45
+ };
41
46
  }
42
47
  export interface CustomColumnMeta {
43
48
  headerAlign?: "left" | "right";
@@ -13,16 +13,16 @@ export declare enum QuoteCategory {
13
13
  interface TableUnitsAndTotalsProps {
14
14
  id?: string;
15
15
  className?: string;
16
- value: number;
17
- subValue?: number;
16
+ value: number | string;
17
+ subValue?: number | string;
18
18
  rightCategory?: `${QuoteCategory}`;
19
19
  }
20
20
  interface TotalPriceProps {
21
- variant: QuoteVariants.TOTAL_PRICE;
21
+ variant: `${QuoteVariants.TOTAL_PRICE}`;
22
22
  leftCategory?: `${TableUnitsAndTotalsLeftCategory}`;
23
23
  }
24
24
  interface TotalWeightProps {
25
- variant: QuoteVariants.TOTAL_WEIGHT;
25
+ variant: `${QuoteVariants.TOTAL_WEIGHT}`;
26
26
  leftCategory?: never;
27
27
  }
28
28
  export type TableUnitsAndTotals = TableUnitsAndTotalsProps & (TotalPriceProps | TotalWeightProps);
@@ -1,3 +1,4 @@
1
+ /** Imports */
1
2
  /** Components */
2
3
  import Label from "./components/Label/Label";
3
4
  import StellaButton from "./components/StellaButton/StellaButton";
@@ -18,5 +19,7 @@ import { StellaButtonVariant } from "./components/StellaButton/types";
18
19
  /** Tokens */
19
20
  import { Styles } from "./shared/tokens";
20
21
  import "./shared/tokens/tokens.css";
22
+ /**Exports */
23
+ export * from "./components/TableUnitsAndTotals/types";
21
24
  export type { StellaIconDefinition } from "./components/StellaIcon/types";
22
25
  export { Label, StellaButton, IconButton, Loader, HelperText, Tooltip, StellaIcon, TextInput, PasswordInput, NumberInput, Table, Pagination, Sync, TableUnitsAndTotals, StellaButtonVariant, Styles, };
@@ -0,0 +1,4 @@
1
+ import { WhiteLabelCSSOverridesProps } from "./WhiteLabelCSSOverrides";
2
+ export declare const getValueFromColorVar: (color?: string) => string | undefined;
3
+ export declare const getButtonHover: (all: WhiteLabelCSSOverridesProps) => string;
4
+ export declare const getButtonHoverST: (all: WhiteLabelCSSOverridesProps) => string;
@@ -0,0 +1,9 @@
1
+ export interface WhiteLabelCSSOverridesProps {
2
+ primary?: string;
3
+ secondary?: string;
4
+ tertiary?: string;
5
+ quaternary?: string;
6
+ accent?: string;
7
+ }
8
+ declare const WhiteLabelCSSOverrides: import("react").NamedExoticComponent<import("styled-components").ExecutionProps & WhiteLabelCSSOverridesProps>;
9
+ export default WhiteLabelCSSOverrides;
@@ -1,2 +1 @@
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;
package/dist/index.d.ts CHANGED
@@ -274,10 +274,15 @@ interface TableProps<T> {
274
274
  paginationDetails?: PaginationDetails;
275
275
  rowStatuses?: Record<number | string, RowStatus>;
276
276
  resetTrigger?: number;
277
+ emptyTableState: {
278
+ header: string;
279
+ subHeader?: string;
280
+ showClearFilterButton?: boolean;
281
+ };
277
282
  }
278
283
  type RowStatus = "action-pending" | "completed";
279
284
 
280
- declare function Table<T>({ columns, data, isLoading, serverSide, onPageChange, onSortChange, onFilterChange, onRowSelect, rowStatuses, showSelection, showRowOptions, showPagination, variant, paginationDetails, selectionMenuItems, dataAuto, dataTestId, id, className, htmlProps, resetTrigger, }: TableProps<T>): React$1.JSX.Element;
285
+ declare function Table<T>({ columns, data, isLoading, serverSide, onPageChange, onSortChange, onFilterChange, onRowSelect, rowStatuses, showSelection, showRowOptions, showPagination, variant, paginationDetails, selectionMenuItems, dataAuto, dataTestId, id, className, htmlProps, resetTrigger, emptyTableState, }: TableProps<T>): React$1.JSX.Element;
281
286
 
282
287
  interface PaginationProps {
283
288
  id?: string;
@@ -320,16 +325,16 @@ declare enum QuoteCategory {
320
325
  interface TableUnitsAndTotalsProps {
321
326
  id?: string;
322
327
  className?: string;
323
- value: number;
324
- subValue?: number;
328
+ value: number | string;
329
+ subValue?: number | string;
325
330
  rightCategory?: `${QuoteCategory}`;
326
331
  }
327
332
  interface TotalPriceProps {
328
- variant: QuoteVariants.TOTAL_PRICE;
333
+ variant: `${QuoteVariants.TOTAL_PRICE}`;
329
334
  leftCategory?: `${TableUnitsAndTotalsLeftCategory}`;
330
335
  }
331
336
  interface TotalWeightProps {
332
- variant: QuoteVariants.TOTAL_WEIGHT;
337
+ variant: `${QuoteVariants.TOTAL_WEIGHT}`;
333
338
  leftCategory?: never;
334
339
  }
335
340
  type TableUnitsAndTotals$1 = TableUnitsAndTotalsProps & (TotalPriceProps | TotalWeightProps);
@@ -400,5 +405,5 @@ declare const Styles: {
400
405
  };
401
406
  };
402
407
 
403
- export { HelperText, IconButton, Label, Loader, NumberInput, Pagination, PasswordInput, StellaButton, StellaButtonVariant, StellaIcon, Styles, Sync, Table, TableUnitsAndTotals, TextInput, Tooltip };
408
+ export { HelperText, IconButton, Label, Loader, NumberInput, Pagination, PasswordInput, QuoteCategory, QuoteVariants, StellaButton, StellaButtonVariant, StellaIcon, Styles, Sync, Table, TableUnitsAndTotals, TableUnitsAndTotalsLeftCategory, TextInput, Tooltip };
404
409
  export type { StellaIconDefinition };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stella-source/stellasource-dsl",
3
- "version": "0.2.2",
3
+ "version": "0.2.4",
4
4
  "description": "Design System owned and operated by Stella Source.",
5
5
  "files": [
6
6
  "dist"