gantri-components 2.159.0-beta.4 → 2.159.0-beta.5

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,11 @@
1
+ import { HTMLAttributes, PropsWithChildren } from 'react';
1
2
  import { OptionalValues } from '../../../../types/common';
2
- import { FileUploaderProps } from '../../file-uploader.types';
3
- export interface IconDragProps extends OptionalValues<Required<Pick<FileUploaderProps, 'isDisabled' | 'isDraggable' | 'SortableDragHandleWrapper'>>> {
3
+ import { IconProps } from '../../../icon/icon.types';
4
+ export interface IconDragProps extends OptionalValues<Required<{
5
+ SortableDragHandleWrapper: (props: PropsWithChildren<HTMLAttributes<HTMLElement>>) => JSX.Element;
6
+ isDisabled: boolean;
7
+ isDraggable: boolean;
8
+ }>>, OptionalValues<{
9
+ color: IconProps['color'];
10
+ }> {
4
11
  }
@@ -2,6 +2,11 @@ import { FocusEventHandler, HTMLAttributes, PropsWithChildren, ReactNode } from
2
2
  import { ButtonProps } from '../button/button.types';
3
3
  import { BoxProps } from '../box/box.types';
4
4
  import { fileUploaderVariants } from './file-uploader.constants';
5
+ import { IconCopyUrlProps } from './components/icon-copy-url/icon-copy-url.types';
6
+ import { IconDragProps } from './components/icon-drag/icon-drag.types';
7
+ import { IconReplaceProps } from './components/icon-replace/icon-replace.types';
8
+ import { IconProps } from '../icon/icon.types';
9
+ import { OptionalValues } from '../../types';
5
10
  export type FileUploaderProps = {
6
11
  /** Any children passed will appear just within the uploader above everything else. Use this for notifications like download toasts. */
7
12
  children?: ReactNode;
@@ -77,12 +82,13 @@ export interface SelectedFileDetails {
77
82
  export type ValidateFile = (file: SelectedFileDetails) => Promise<string | undefined | void> | string | undefined | void;
78
83
  export type HandleFileSelected = (validFile: SelectedFileDetails) => Promise<any>;
79
84
  export type FileUploaderCustomContent = (props: {
80
- IconCopyUrl: () => JSX.Element;
85
+ IconCopyUrl: (props: OptionalValues<Pick<IconCopyUrlProps, 'color'>>) => JSX.Element;
81
86
  IconDelete: (props: {
87
+ color?: IconProps['color'];
82
88
  hideDeleteIcon: boolean | undefined;
83
89
  }) => JSX.Element;
84
- IconDrag: () => JSX.Element;
85
- IconReplace: () => JSX.Element;
90
+ IconDrag: (props: OptionalValues<Pick<IconDragProps, 'color'>>) => JSX.Element;
91
+ IconReplace: (props: OptionalValues<Pick<IconReplaceProps, 'color'>>) => JSX.Element;
86
92
  UploaderActionIcons: () => JSX.Element;
87
93
  fileName: string;
88
94
  fileUrl: string;