@harnessio/ui 1.3.0 → 1.3.1

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/index.d.ts CHANGED
@@ -1707,7 +1707,12 @@ declare namespace components {
1707
1707
  rbacTooltip,
1708
1708
  toast,
1709
1709
  Toaster,
1710
+ CustomToast,
1711
+ InfoToastSeverity,
1712
+ InfoToastCtaPosition,
1713
+ InfoToastOptions,
1710
1714
  ToastParamsType,
1715
+ InfoToastParamsType,
1711
1716
  LoadingToastParamsType,
1712
1717
  PromiseToastParamsType,
1713
1718
  ToastPromiseType,
@@ -1969,6 +1974,25 @@ declare interface CustomItemProps extends React.HTMLAttributes<HTMLDivElement> {
1969
1974
  children: ReactNode;
1970
1975
  }
1971
1976
 
1977
+ declare function CustomToast({ toastId, variant, title, description, onClose, closeButton, action, secondaryAction, ctaPosition, severity, promise, successMessage, errorMessage }: CustomToastProps): JSX_2.Element;
1978
+
1979
+ declare interface CustomToastProps {
1980
+ toastId: string | number;
1981
+ variant?: VariantProps<typeof toastVariants>['variant'];
1982
+ title: string;
1983
+ description?: ReactNode;
1984
+ onClose?: () => void;
1985
+ className?: string;
1986
+ closeButton?: boolean;
1987
+ action?: Action;
1988
+ secondaryAction?: Action;
1989
+ ctaPosition?: InfoToastCtaPosition;
1990
+ severity?: InfoToastSeverity;
1991
+ promise?: Promise<any>;
1992
+ successMessage?: string;
1993
+ errorMessage?: string;
1994
+ }
1995
+
1972
1996
  declare const DataTable: (<TData>({ data, columns, size, variant, paginationProps, getRowClassName, onRowClick, getRowLink, disableHighlightOnHover, className, currentSorting, currentRowSelection, onSortingChange: externalOnSortingChange, enableRowSelection, onRowSelectionChange: externalOnRowSelectionChange, enableExpanding, getRowCanExpand, getRowCanSelect, getIsRowDisabled, initiallyExpandAllRows, currentExpanded, onExpandedChange: externalOnExpandedChange, renderSubComponent, getSubRows, _enableColumnResizing, getRowId, visibleColumns, columnPinning, manualSorting, stickyHeader, maxHeight, rowPinning, onRowPinningChange: externalOnRowPinningChange, enableRowPinning }: DataTableProps<TData>) => JSX_2.Element) & {
1973
1997
  ColumnFilter: FC<DataTableColumnFilterDropdownProps>;
1974
1998
  };
@@ -4105,6 +4129,22 @@ declare interface IndeterminateProgressProps {
4105
4129
  variant: 'indeterminate';
4106
4130
  }
4107
4131
 
4132
+ declare type InfoToastCtaPosition = 'top' | 'bottom';
4133
+
4134
+ declare type InfoToastOptions = ToastOptions & {
4135
+ secondaryAction?: Action;
4136
+ ctaPosition?: InfoToastCtaPosition;
4137
+ severity?: InfoToastSeverity;
4138
+ };
4139
+
4140
+ declare type InfoToastParamsType = {
4141
+ title: string;
4142
+ description?: ReactNode;
4143
+ options?: InfoToastOptions;
4144
+ };
4145
+
4146
+ declare type InfoToastSeverity = 'Critical' | 'High' | 'Medium' | 'Low';
4147
+
4108
4148
  declare const INITIAL_ZOOM_LEVEL = 1;
4109
4149
 
4110
4150
  /**
@@ -7848,7 +7888,7 @@ declare function Title({ children, className }: {
7848
7888
 
7849
7889
  declare const toast: (({ title, description, options }: ToastParamsType) => string | number) & {
7850
7890
  danger: ({ title, description, options }: ToastParamsType) => string | number;
7851
- info: ({ title, description, options }: ToastParamsType) => string | number;
7891
+ info: ({ title, description, options }: InfoToastParamsType) => string | number;
7852
7892
  loading: ({ title, options }: LoadingToastParamsType) => string | number;
7853
7893
  success: ({ title, description, options }: ToastParamsType) => string | number;
7854
7894
  promise: (promise: ToastPromiseType, { loadingMessage, successMessage, errorMessage, options }: PromiseToastParamsType) => string | number;
@@ -7871,6 +7911,10 @@ declare type ToastParamsType = {
7871
7911
 
7872
7912
  declare type ToastPromiseType<T = any> = Promise<T>;
7873
7913
 
7914
+ declare const toastVariants: (props?: ({
7915
+ variant?: "default" | "danger" | "success" | "info" | "loading" | null | undefined;
7916
+ } & ClassProp) | undefined) => string;
7917
+
7874
7918
  declare const Toggle: ForwardRefExoticComponent<ToggleProps & RefAttributes<HTMLButtonElement>>;
7875
7919
 
7876
7920
  declare const ToggleGroup: {
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { i as s } from "./index-CdF49wK7.js";
2
- import { i as e } from "./index-D700tRfv.js";
2
+ import { i as e } from "./index-CJ0gE3U4.js";
3
3
  import { i as a } from "./index-D9neDRZf.js";
4
4
  import { i as m } from "./index-C4bDY5-3.js";
5
5
  import { i as f } from "./index-DchZrYRY.js";